commerce-sdk-isomorphic 2.0.0 → 2.1.0-dev.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,c,d=function(e){return e&&e.Math==Math&&e},u=d("object"==typeof globalThis&&globalThis)||d("object"==typeof window&&window)||d("object"==typeof self&&self)||d("object"==typeof a&&a)||function(){return this}()||Function("return this")(),h=function(e){try{return!!e()}catch(e){return!0}},f=!h((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),l=!h((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),p=Function.prototype.call,g=l?p.bind(p):function(){return p.apply(p,arguments)},v={}.propertyIsEnumerable,b=Object.getOwnPropertyDescriptor,I={f:b&&!v.call({1:2},1)?function(e){var t=b(this,e);return!!t&&t.enumerable}:v},m=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=l&&y.bind(x,x),C=l?function(e){return e&&w(e)}:function(e){return e&&function(){return x.apply(e,arguments)}},P=C({}.toString),z=C("".slice),O=function(e){return z(P(e),8,-1)},E=Object,q=C("".split),j=h((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)},U=function(e){return _(e)?e:void 0},R=function(e,t){return arguments.length<2?U(u[e]):u[e]&&u[e][t]},B=C({}.isPrototypeOf),L=R("navigator","userAgent")||"",N=u.process,D=u.Deno,W=N&&N.versions||D&&D.version,F=W&&W.v8;F&&(c=(s=F.split("."))[0]>0&&s[0]<4?1:+(s[0]+s[1])),!c&&L&&(!(s=L.match(/Edge\/(\d+)/))||s[1]>=74)&&(s=L.match(/Chrome\/(\d+)/))&&(c=+s[1]);var G=c,H=!!Object.getOwnPropertySymbols&&!h((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=R("Symbol");return _(t)&&B(t.prototype,$(e))},J=String,K=function(e){try{return J(e)}catch(e){return"Object"}},Q=TypeError,X=function(e){if(_(e))return e;throw Q(K(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=C({}.hasOwnProperty),ce=Object.hasOwn||function(e,t){return se(oe(e),t)},de=0,ue=Math.random(),he=C(1..toString),fe=function(e){return"Symbol("+(void 0===e?"":e)+")_"+he(++de+ue,36)},le=ie("wks"),pe=u.Symbol,ge=pe&&pe.for,ve=V?pe:pe&&pe.withoutSetter||fe,be=function(e){if(!ce(le,e)||!H&&"string"!=typeof le[e]){var t="Symbol."+e;H&&ce(pe,e)?le[e]=pe[e]:le[e]=V&&ge?ge(t):ve(t)}return le[e]},Ie=TypeError,me=be("toPrimitive"),ke=function(e,t){if(!A(e)||Y(e))return e;var r,n=Z(e,me);if(n){if(void 0===t&&(t="default"),r=g(n,e,t),!A(r)||Y(r))return r;throw Ie("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),Ce=function(e){return we?xe.createElement(e):{}},Pe=!f&&!h((function(){return 7!=Object.defineProperty(Ce("div"),"a",{get:function(){return 7}}).a})),ze=Object.getOwnPropertyDescriptor,Oe={f:f?ze:function(e,t){if(e=M(e),t=ye(t),Pe)try{return ze(e,t)}catch(e){}if(ce(e,t))return m(!g(I.f,e,t),e[t])}},Ee=f&&h((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:f?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),Pe)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}},Ue=f?function(e,t,r){return Ae.f(e,t,m(1,r))}:function(e,t,r){return e[t]=r,e},Re=Function.prototype,Be=f&&Object.getOwnPropertyDescriptor,Le=ce(Re,"name"),Ne={EXISTS:Le,PROPER:Le&&"something"===function(){}.name,CONFIGURABLE:Le&&(!f||f&&Be(Re,"name").configurable)},De=C(Function.toString);_(ne.inspectSource)||(ne.inspectSource=function(e){return De(e)});var We,Fe,Ge,He=ne.inspectSource,Ve=u.WeakMap,$e=_(Ve)&&/native code/.test(He(Ve)),Ye=ie("keys"),Je=function(e){return Ye[e]||(Ye[e]=fe(e))},Ke={},Qe=u.TypeError,Xe=u.WeakMap;if($e||ne.state){var Ze=ne.state||(ne.state=new Xe),et=C(Ze.get),tt=C(Ze.has),rt=C(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},Fe=function(e){return et(Ze,e)||{}},Ge=function(e){return tt(Ze,e)}}else{var nt=Je("state");Ke[nt]=!0,We=function(e,t){if(ce(e,nt))throw new Qe("Object already initialized");return t.facade=e,Ue(e,nt,t),t},Fe=function(e){return ce(e,nt)?e[nt]:{}},Ge=function(e){return ce(e,nt)}}var it={set:We,get:Fe,has:Ge,enforce:function(e){return Ge(e)?Fe(e):We(e,{})},getterFor:function(e){return function(t){var r;if(!A(t)||(r=Fe(t)).type!==e)throw Qe("Incompatible receiver, "+e+" required");return r}}},at=o((function(e){var t=Ne.CONFIGURABLE,r=it.enforce,n=it.get,i=Object.defineProperty,a=f&&!h((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),(!ce(e,"name")||t&&e.name!==n)&&(f?i(e,"name",{value:n,configurable:!0}):e.name=n),a&&s&&ce(s,"arity")&&e.length!==s.arity&&i(e,"length",{value:s.arity});try{s&&ce(s,"constructor")&&s.constructor?f&&i(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var c=r(e);return ce(c,"source")||(c.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,ct=Math.floor,dt=Math.trunc||function(e){var t=+e;return(t>0?ct:st)(t)},ut=function(e){var t=+e;return t!=t||0===t?0:dt(t)},ht=Math.max,ft=Math.min,lt=function(e,t){var r=ut(e);return r<0?ht(r+t,0):ft(r,t)},pt=Math.min,gt=function(e){return e>0?pt(ut(e),9007199254740991):0},vt=function(e){return gt(e.length)},bt=function(e){return function(t,r,n){var i,a=M(t),o=vt(a),s=lt(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}},It={includes:bt(!0),indexOf:bt(!1)},mt=It.indexOf,kt=C([].push),yt=function(e,t){var r,n=M(e),i=0,a=[];for(r in n)!ce(Ke,r)&&ce(n,r)&&kt(a,r);for(;t.length>i;)ce(n,r=t[i++])&&(~mt(a,r)||kt(a,r));return a},xt=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],wt=xt.concat("length","prototype"),Ct={f:Object.getOwnPropertyNames||function(e){return yt(e,wt)}},Pt={f:Object.getOwnPropertySymbols},zt=C([].concat),Ot=R("Reflect","ownKeys")||function(e){var t=Ct.f(Se(e)),r=Pt.f;return r?zt(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];ce(e,s)||r&&ce(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)?h(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,Ut=Oe.f,Rt=function(e,t){var r,n,i,a,o,s=e.target,c=e.global,d=e.stat;if(r=c?u:d?u[s]||re(s,{}):(u[s]||{}).prototype)for(n in t){if(a=t[n],i=e.dontCallGetSet?(o=Ut(r,n))&&o.value:r[n],!At(c?n:s+(d?".":"#")+n,e.forced)&&void 0!==i){if(typeof a==typeof i)continue;Et(a,i)}(e.sham||i&&i.sham)&&Ue(a,"sham",!0),ot(r,n,a,e)}},Bt=Object.keys||function(e){return yt(e,xt)},Lt=h((function(){Bt(1)}));Rt({target:"Object",stat:!0,forced:Lt},{keys:function(e){return Bt(oe(e))}});var Nt={};Nt[be("toStringTag")]="z";var Dt,Wt="[object z]"===String(Nt),Ft=be("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),Ft))?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)},Jt={f:f&&!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}},Kt=R("document","documentElement"),Qt=Je("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{Dt=new ActiveXObject("htmlfile")}catch(e){}var e,t;tr="undefined"!=typeof document?document.domain&&Dt?er(Dt):((t=Ce("iframe")).style.display="none",Kt.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(Zt("document.F=Object")),e.close(),e.F):er(Dt);for(var r=xt.length;r--;)delete tr.prototype[xt[r]];return tr()};Ke[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:Jt.f(r,t)},nr=function(e,t,r){var n=ye(t);n in e?Ae.f(e,n,m(0,r)):e[n]=r},ir=Array,ar=Math.max,or=function(e,t,r){for(var n=vt(e),i=lt(t,n),a=lt(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=Ct.f,cr="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],dr={f:function(e){return cr&&"Window"==O(e)?function(e){try{return sr(e)}catch(e){return or(cr)}}(e):sr(M(e))}},ur={f:be},hr=u,fr=Ae.f,lr=Ae.f,pr=be("toStringTag"),gr=function(e,t,r){e&&!r&&(e=e.prototype),e&&!ce(e,pr)&&lr(e,pr,{configurable:!0,value:t})},vr=C(C.bind),br=function(e,t){return X(e),void 0===t?e:l?vr(e,t):function(){return e.apply(t,arguments)}},Ir=Array.isArray||function(e){return"Array"==O(e)},mr=function(){},kr=[],yr=R("Reflect","construct"),xr=/^\s*(?:class|function)\b/,wr=C(xr.exec),Cr=!xr.exec(mr),Pr=function(e){if(!_(e))return!1;try{return yr(mr,kr,e),!0}catch(e){return!1}},zr=function(e){if(!_(e))return!1;switch(Vt(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Cr||!!wr(xr,He(e))}catch(e){return!0}};zr.sham=!0;var Or=!yr||h((function(){var e;return Pr(Pr.call)||!Pr(Object)||!Pr((function(){e=!0}))||e}))?zr:Pr,Er=be("species"),qr=Array,jr=function(e,t){return new(function(e){var t;return Ir(e)&&(t=e.constructor,(Or(t)&&(t===qr||Ir(t.prototype))||A(t)&&null===(t=t[Er]))&&(t=void 0)),void 0===t?qr:t}(e))(0===t?0:t)},Sr=C([].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(c,d,u,h){for(var f,l,p=oe(c),g=j(p),v=br(d,u),b=vt(g),I=0,m=h||jr,k=t?m(c,b):r||o?m(c,0):void 0;b>I;I++)if((s||I in g)&&(l=v(f=g[I],I,p),e))if(t)k[I]=l;else if(l)switch(e){case 3:return!0;case 5:return f;case 6:return I;case 2:Sr(k,f)}else switch(e){case 4:return!1;case 7:Sr(k,f)}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=Je("hidden"),Ur=it.set,Rr=it.getterFor("Symbol"),Br=Object.prototype,Lr=u.Symbol,Nr=Lr&&Lr.prototype,Dr=u.TypeError,Wr=u.QObject,Fr=Oe.f,Gr=Ae.f,Hr=dr.f,Vr=I.f,$r=C([].push),Yr=ie("symbols"),Jr=ie("op-symbols"),Kr=ie("wks"),Qr=!Wr||!Wr.prototype||!Wr.prototype.findChild,Xr=f&&h((function(){return 7!=rr(Gr({},"a",{get:function(){return Gr(this,"a",{value:7}).a}})).a}))?function(e,t,r){var n=Fr(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(Nr);return Ur(r,{type:"Symbol",tag:e,description:t}),f||(r.description=t),r},en=function(e,t,r){e===Br&&en(Jr,t,r),Se(e);var n=ye(t);return Se(r),ce(Yr,n)?(r.enumerable?(ce(e,Ar)&&e[Ar][n]&&(e[Ar][n]=!1),r=rr(r,{enumerable:m(0,!1)})):(ce(e,Ar)||Gr(e,Ar,m(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){f&&!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&&ce(Yr,t)&&!ce(Jr,t))&&(!(r||!ce(this,t)||!ce(Yr,t)||ce(this,Ar)&&this[Ar][t])||r)},nn=function(e,t){var r=M(e),n=ye(t);if(r!==Br||!ce(Yr,n)||ce(Jr,n)){var i=Fr(r,n);return!i||!ce(Yr,n)||ce(r,Ar)&&r[Ar][n]||(i.enumerable=!0),i}},an=function(e){var t=Hr(M(e)),r=[];return _r(t,(function(e){ce(Yr,e)||ce(Ke,e)||$r(r,e)})),r},on=function(e){var t=e===Br,r=Hr(t?Jr:M(e)),n=[];return _r(r,(function(e){!ce(Yr,e)||t&&!ce(Br,e)||$r(n,Yr[e])})),n};H||(Nr=(Lr=function(){if(B(Nr,this))throw Dr("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?Yt(arguments[0]):void 0,t=fe(e),r=function(e){this===Br&&g(r,Jr,e),ce(this,Ar)&&ce(this[Ar],t)&&(this[Ar][t]=!1),Xr(this,t,m(1,e))};return f&&Qr&&Xr(Br,t,{configurable:!0,set:r}),Zr(t,e)}).prototype,ot(Nr,"toString",(function(){return Rr(this).tag})),ot(Lr,"withoutSetter",(function(e){return Zr(fe(e),e)})),I.f=rn,Ae.f=en,Jt.f=tn,Oe.f=nn,Ct.f=dr.f=an,Pt.f=on,ur.f=function(e){return Zr(be(e),e)},f&&(Gr(Nr,"description",{configurable:!0,get:function(){return Rr(this).description}}),ot(Br,"propertyIsEnumerable",rn,{unsafe:!0}))),Rt({global:!0,constructor:!0,wrap:!0,forced:!H,sham:!H},{Symbol:Lr}),_r(Bt(Kr),(function(e){!function(e){var t=hr.Symbol||(hr.Symbol={});ce(t,e)||fr(t,e,{value:ur.f(e)})}(e)})),Rt({target:"Symbol",stat:!0,forced:!H},{useSetter:function(){Qr=!0},useSimple:function(){Qr=!1}}),Rt({target:"Object",stat:!0,forced:!H,sham:!f},{create:function(e,t){return void 0===t?rr(e):tn(rr(e),t)},defineProperty:en,defineProperties:tn,getOwnPropertyDescriptor:nn}),Rt({target:"Object",stat:!0,forced:!H},{getOwnPropertyNames:an}),function(){var e=R("Symbol"),t=e&&e.prototype,r=t&&t.valueOf,n=be("toPrimitive");t&&!t[n]&&ot(t,n,(function(e){return g(r,this)}),{arity:1})}(),gr(Lr,"Symbol"),Ke[Ar]=!0;var sn=H&&!!Symbol.for&&!!Symbol.keyFor,cn=ie("string-to-symbol-registry"),dn=ie("symbol-to-string-registry");Rt({target:"Symbol",stat:!0,forced:!sn},{for:function(e){var t=Yt(e);if(ce(cn,t))return cn[t];var r=R("Symbol")(t);return cn[t]=r,dn[r]=t,r}});var un=ie("symbol-to-string-registry");Rt({target:"Symbol",stat:!0,forced:!sn},{keyFor:function(e){if(!Y(e))throw TypeError(K(e)+" is not a symbol");if(ce(un,e))return un[e]}});var hn=Function.prototype,fn=hn.apply,ln=hn.call,pn="object"==typeof Reflect&&Reflect.apply||(l?ln.bind(fn):function(){return ln.apply(fn,arguments)}),gn=C([].slice),vn=R("JSON","stringify"),bn=C(/./.exec),In=C("".charAt),mn=C("".charCodeAt),kn=C("".replace),yn=C(1..toString),xn=/[\uD800-\uDFFF]/g,wn=/^[\uD800-\uDBFF]$/,Cn=/^[\uDC00-\uDFFF]$/,Pn=!H||h((function(){var e=R("Symbol")();return"[null]"!=vn([e])||"{}"!=vn({a:e})||"{}"!=vn(Object(e))})),zn=h((function(){return'"\\udf06\\ud834"'!==vn("\udf06\ud834")||'"\\udead"'!==vn("\udead")})),On=function(e,t){var r=gn(arguments),n=t;if((A(t)||void 0!==e)&&!Y(e))return Ir(t)||(t=function(e,t){if(_(n)&&(t=g(n,this,e,t)),!Y(t))return t}),r[1]=t,pn(vn,null,r)},En=function(e,t,r){var n=In(r,t-1),i=In(r,t+1);return bn(wn,e)&&!bn(Cn,i)||bn(Cn,e)&&!bn(wn,n)?"\\u"+yn(mn(e,0),16):e};vn&&Rt({target:"JSON",stat:!0,arity:3,forced:Pn||zn},{stringify:function(e,t,r){var n=gn(arguments),i=pn(Pn?On:vn,null,n);return zn&&"string"==typeof i?kn(i,xn,En):i}});var qn=!H||h((function(){Pt.f(1)}));Rt({target:"Object",stat:!0,forced:qn},{getOwnPropertySymbols:function(e){var t=Pt.f;return t?t(oe(e)):[]}});var jn=be("species"),Sn=function(e){return G>=51||!h((function(){var t=[];return(t.constructor={})[jn]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},Tn=Mr.filter,Mn=Sn("filter");Rt({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,Un=h((function(){An(1)}));Rt({target:"Object",stat:!0,forced:!f||Un,sham:!f},{getOwnPropertyDescriptor:function(e,t){return An(M(e),t)}});var Rn={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},Bn=Ce("span").classList,Ln=Bn&&Bn.constructor&&Bn.constructor.prototype,Nn=Ln===Object.prototype?void 0:Ln,Dn=function(e,t){var r=[][e];return!!r&&h((function(){r.call(null,t||function(){return 1},1)}))},Wn=Mr.forEach,Fn=Dn("forEach")?[].forEach:function(e){return Wn(this,e,arguments.length>1?arguments[1]:void 0)},Gn=function(e){if(e&&e.forEach!==Fn)try{Ue(e,"forEach",Fn)}catch(t){e.forEach=Fn}};for(var Hn in Rn)Rn[Hn]&&Gn(u[Hn]&&u[Hn].prototype);Gn(Nn),Rt({target:"Object",stat:!0,sham:!f},{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=Jt.f;Rt({target:"Object",stat:!0,forced:Object.defineProperties!==Vn,sham:!f},{defineProperties:Vn});var $n=Ae.f;Rt({target:"Object",stat:!0,forced:Object.defineProperty!==$n,sham:!f},{defineProperty:$n});var Yn,Jn=be("match"),Kn=TypeError,Qn=function(e){if(function(e){var t;return A(e)&&(void 0!==(t=e[Jn])?!!t:"RegExp"==O(e))}(e))throw Kn("The method doesn't accept regular expressions");return e},Xn=be("match"),Zn=Oe.f,ei=C("".startsWith),ti=C("".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));Rt({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=Ne.PROPER,ci=RegExp.prototype.toString,di=h((function(){return"/a/b"!=ci.call({source:"a",flags:"b"})})),ui=si&&"toString"!=ci.name;function hi(e,t,r,n,i,a,o){try{var s=e[a](o),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,i)}function fi(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var a=e.apply(t,r);function o(e){hi(a,n,i,o,s,"next",e)}function s(e){hi(a,n,i,o,s,"throw",e)}o(void 0)}))}}function li(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 vi(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}(di||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||ce(e,"flags")||!B(oi,e)?t:g(ai,e)}(e))}),{unsafe:!0});var bi=Object.prototype,Ii=bi.hasOwnProperty,mi="function"==typeof Symbol?Symbol:{},ki=mi.iterator||"@@iterator",yi=mi.asyncIterator||"@@asyncIterator",xi=mi.toStringTag||"@@toStringTag";function wi(e,t,r,n){var i=t&&t.prototype instanceof zi?t:zi,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 Di()}for(r.method=i,r.arg=a;;){var o=r.delegate;if(o){var s=Ui(o,r);if(s){if(s===Pi)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=Ci(e,t,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===Pi)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}(e,r,o),a}function Ci(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}var Pi={};function zi(){}function Oi(){}function Ei(){}var qi={};qi[ki]=function(){return this};var ji=Object.getPrototypeOf,Si=ji&&ji(ji(Ni([])));Si&&Si!==bi&&Ii.call(Si,ki)&&(qi=Si);var Ti=Ei.prototype=zi.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=Ci(e[n],e,i);if("throw"!==s.type){var c=s.arg,d=c.value;return d&&"object"==typeof d&&Ii.call(d,"__await")?t.resolve(d.__await).then((function(e){r("next",e,a,o)}),(function(e){r("throw",e,a,o)})):t.resolve(d).then((function(e){c.value=e,a(c)}),(function(e){return r("throw",e,a,o)}))}o(s.arg)}(n,i,r,a)}))}return r=r?r.then(a,a):a()}}function Ui(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,Ui(e,t),"throw"===t.method))return Pi;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return Pi}var n=Ci(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,Pi;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,Pi):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,Pi)}function Ri(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(Ri,this),this.reset(!0)}function Ni(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(Ii.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return n.next=n}}return{next:Di}}function Di(){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)&&Ii.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(r,n){return a.type="throw",a.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var o=Ii.call(i,"catchLoc"),s=Ii.call(i,"finallyLoc");if(o&&s){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(o){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&Ii.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,Pi):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),Pi},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),Pi}},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:Ni(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),Pi}};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:Ni},Fi=Ae.f,Gi=be("unscopables"),Hi=Array.prototype;null==Hi[Gi]&&Fi(Hi,Gi,{configurable:!0,value:rr(null)});var Vi,$i,Yi,Ji=function(e){Hi[Gi][e]=!0},Ki={},Qi=!h((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),Xi=Je("IE_PROTO"),Zi=Object,ea=Zi.prototype,ta=Qi?Zi.getPrototypeOf:function(e){var t=oe(e);if(ce(t,Xi))return t[Xi];var r=t.constructor;return _(r)&&t instanceof r?r.prototype:t instanceof Zi?ea:null},ra=be("iterator"),na=!1;[].keys&&("next"in(Yi=[].keys())?($i=ta(ta(Yi)))!==Object.prototype&&(Vi=$i):na=!0),(null==Vi||h((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:m(+!n,r)}),gr(e,i,!1),Ki[i]=oa,e},ca=String,da=TypeError,ua=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,r={};try{(e=C(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 da("Can't set "+ca(e)+" as a prototype")}(n),t?e(r,n):r.__proto__=n,r}}():void 0),ha=Ne.PROPER,fa=Ne.CONFIGURABLE,la=ia.IteratorPrototype,pa=ia.BUGGY_SAFARI_ITERATORS,ga=be("iterator"),va=function(){return this},ba=function(e,t,r,n,i,a,o){sa(r,t,n);var s,c,d,u=function(e){if(e===i&&v)return v;if(!pa&&e in l)return l[e];switch(e){case"keys":case"values":case"entries":return function(){return new r(this,e)}}return function(){return new r(this)}},h=t+" Iterator",f=!1,l=e.prototype,p=l[ga]||l["@@iterator"]||i&&l[i],v=!pa&&p||u(i),b="Array"==t&&l.entries||p;if(b&&(s=ta(b.call(new e)))!==Object.prototype&&s.next&&(ta(s)!==la&&(ua?ua(s,la):_(s[ga])||ot(s,ga,va)),gr(s,h,!0)),ha&&"values"==i&&p&&"values"!==p.name&&(fa?Ue(l,"name","values"):(f=!0,v=function(){return g(p,this)})),i)if(c={values:u("values"),keys:a?v:u("keys"),entries:u("entries")},o)for(d in c)(pa||f||!(d in l))&&ot(l,d,c[d]);else Rt({target:t,proto:!0,forced:pa||f},c);return l[ga]!==v&&ot(l,ga,v,{name:i}),Ki[t]=v,c},Ia=Ae.f,ma=it.set,ka=it.getterFor("Array Iterator"),ya=ba(Array,"Array",(function(e,t){ma(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=Ki.Arguments=Ki.Array;if(Ji("keys"),Ji("values"),Ji("entries"),f&&"values"!==xa.name)try{Ia(xa,"name",{value:"values"})}catch(e){}var wa=C("".charAt),Ca=C("".charCodeAt),Pa=C("".slice),za=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=Ca(a,o))<55296||n>56319||o+1===s||(i=Ca(a,o+1))<56320||i>57343?e?wa(a,o):n:e?Pa(a,o,o+2):i-56320+(n-55296<<10)+65536}},Oa={codeAt:za(!1),charAt:za(!0)},Ea=Oa.charAt,qa=it.set,ja=it.getterFor("String Iterator");ba(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=be("iterator"),Ta=be("toStringTag"),Ma=ya.values,_a=function(e,t){if(e){if(e[Sa]!==Ma)try{Ue(e,Sa,Ma)}catch(t){e[Sa]=Ma}if(e[Ta]||Ue(e,Ta,t),Rn[t])for(var r in ya)if(e[r]!==ya[r])try{Ue(e,r,ya[r])}catch(t){e[r]=ya[r]}}};for(var Aa in Rn)_a(u[Aa]&&u[Aa].prototype,Aa);_a(Nn,"DOMTokenList");var Ua=be("iterator"),Ra=!h((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[Ua]||"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,Na=function(e,t){if(B(t,e))return e;throw La("Incorrect invocation")},Da=be("iterator"),Wa=function(e){if(null!=e)return Z(e,Da)||Z(e,"@@iterator")||Ki[Vt(e)]},Fa=TypeError,Ga=function(e,t){var r=arguments.length<2?Wa(e):t;if(X(r))return Se(g(r,e));throw Fa(K(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?Ja(e,t):Ka(e,Ya(or(e,0,n),t),Ya(or(e,n),t),t)},Ja=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},Ka=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=be("iterator"),Za=it.set,eo=it.getterFor("URLSearchParams"),to=it.getterFor("URLSearchParamsIterator"),ro=Object.getOwnPropertyDescriptor,no=function(e){if(!f)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,ho=u.TypeError,fo=u.decodeURIComponent,lo=u.encodeURIComponent,po=C("".charAt),go=C([].join),vo=C([].push),bo=C("".replace),Io=C([].shift),mo=C([].splice),ko=C("".split),yo=C("".slice),xo=/\+/g,wo=Array(4),Co=function(e){return wo[e-1]||(wo[e-1]=uo("((?:%[\\da-f]{2}){"+e+"})","gi"))},Po=function(e){try{return fo(e)}catch(t){return e}},zo=function(e){var t=bo(e,xo," "),r=4;try{return fo(t)}catch(e){for(;r;)t=bo(t,Co(r--),Po);return t}},Oo=/[!'()~]|%20/g,Eo={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},qo=function(e){return Eo[e]},jo=function(e){return bo(lo(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,c=Wa(e);if(c)for(r=(t=Ga(e,c)).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 ho("Expected sequence with length 2");vo(this.entries,{key:Yt(o.value),value:Yt(s.value)})}else for(var d in e)ce(e,d)&&vo(this.entries,{key:d,value:Yt(e[d])})},parseQuery:function(e){if(e)for(var t,r,n=ko(e,"&"),i=0;i<n.length;)(t=n[i++]).length&&(r=ko(t,"="),vo(this.entries,{key:zo(Io(r)),value:zo(go(r,"="))}))},serialize:function(){for(var e,t=this.entries,r=[],n=0;n<t.length;)e=t[n++],vo(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(){Na(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);vo(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?mo(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&&vo(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),c=0;c<i.length;c++)(r=i[c]).key===o&&(a?mo(i,c--,1):(a=!0,r.value=s));a||vo(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=br(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"),Rt({global:!0,constructor:!0,forced:!Ra},{URLSearchParams:Mo}),!Ra&&_(oo)){var Ao=C(co.has),Uo=C(co.set),Ro=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")||Uo(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),rr(e,{body:m(0,Yt(r)),headers:m(0,t)})}return e};if(_(io)&&Rt({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(e){return io(e,arguments.length>1?Ro(arguments[1]):{})}}),_(ao)){var Bo=function(e){return Na(this,so),new ao(e,arguments.length>1?Ro(arguments[1]):{})};so.constructor=Bo,Bo.prototype=so,Rt({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:Bo})}}var Lo={URLSearchParams:Mo,getState:eo};function No(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 Do(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?No(Object(r),!0).forEach((function(t){vi(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):No(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Wo=gi((function e(t){if(li(this,e),vi(this,"baseUri",void 0),vi(this,"proxy",void 0),vi(this,"headers",void 0),vi(this,"parameters",void 0),vi(this,"fetchOptions",void 0),vi(this,"transformRequest",void 0),vi(this,"throwOnBadResponse",void 0),this.headers=Do({},t.headers),this.parameters=Do({},t.parameters),!this.parameters.shortCode)throw new Error("Missing required parameter: shortCode");this.fetchOptions=Do({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 Fo(e){return(Fo="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)}vi(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}}}),Rt({global:!0},{globalThis:u});var Go="object"===("undefined"==typeof window?"undefined":Fo(window))&&"object"===Fo(window.document),Ho="object"===("undefined"==typeof process?"undefined":Fo(process))&&"object"===Fo(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}(),Jo=Function,Ko=C([].concat),Qo=C([].join),Xo={},Zo=function(e,t,r){if(!ce(Xo,t)){for(var n=[],i=0;i<t;i++)n[i]="a["+i+"]";Xo[t]=Jo("C,a","return new C("+Qo(n,",")+")")}return Xo[t](e,r)},es=l?Jo.bind:function(e){var t=X(this),r=t.prototype,n=gn(arguments,1),i=function(){var r=Ko(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(K(e)+" is not a constructor")},ns=R("Reflect","construct"),is=Object.prototype,as=[].push,os=h((function(){function e(){}return!(ns((function(){}),[],e)instanceof e)})),ss=!h((function(){ns((function(){}))})),cs=os||ss;Rt({target:"Reflect",stat:!0,forced:cs,sham:cs},{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 ds=TypeError,us=function(e){if(e>9007199254740991)throw ds("Maximum allowed index exceeded");return e},hs=be("isConcatSpreadable"),fs=G>=51||!h((function(){var e=[];return e[hs]=!1,e.concat()[0]!==e})),ls=Sn("concat"),ps=function(e){if(!A(e))return!1;var t=e[hs];return void 0!==t?!!t:Ir(e)};function gs(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function vs(e,t){return(vs=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function bs(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&&vs(e,t)}function Is(e,t){if(t&&("object"===Fo(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 ms(e){return(ms=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&&vs(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,ms(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),vs(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=ms(e);if(t){var i=ms(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Is(this,r)}}Rt({target:"Array",proto:!0,arity:1,forced:!fs||!ls},{concat:function(e){var t,r,n,i,a,o=oe(this),s=jr(o,0),c=0;for(t=-1,n=arguments.length;t<n;t++)if(ps(a=-1===t?o:arguments[t]))for(i=vt(a),us(c+i),r=0;r<i;r++,c++)r in a&&nr(s,c,a[r]);else us(c+1),nr(s,c++,a);return s.length=c,s}});var Cs=function(e){bs(r,e);var t=ws(r);function r(e){var n;return li(this,r),vi(gs(n=t.call(this,"".concat(e.status," ").concat(e.statusText))),"response",void 0),n.response=e,n}return gi(r)}(xs(Error));function Ps(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 zs(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ps(Object(r),!0).forEach((function(t){vi(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ps(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Os,Es,qs=function(){var e=fi(Wi.mark((function e(t,r,n,i){var a,o,s,c,d;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=zs(zs({},null==n?void 0:n.headers),null==r?void 0:r.headers),s=zs(zs({},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(c=e.sent,!i){e.next=7;break}return e.abrupt("return",c);case 7:if(null==n||!n.throwOnBadResponse||c.ok||304===c.status){e.next=11;break}throw new Cs(c);case 11:return e.next=13,c.text();case 13:return d=e.sent,e.abrupt("return",d?JSON.parse(d):{});case 15:case"end":return e.stop()}}),e)})));return function(t,r,n,i){return e.apply(this,arguments)}}(),js=u.RegExp,Ss=h((function(){var e=js("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),Ts=Ss||h((function(){return!js("a","y").sticky})),Ms={BROKEN_CARET:Ss||h((function(){var e=js("^r","gy");return e.lastIndex=2,null!=e.exec("str")})),MISSED_STICKY:Ts,UNSUPPORTED_Y:Ss},_s=u.RegExp,As=h((function(){var e=_s(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)})),Us=u.RegExp,Rs=h((function(){var e=Us("(?<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),Ns=RegExp.prototype.exec,Ds=Ns,Ws=C("".charAt),Fs=C("".indexOf),Gs=C("".replace),Hs=C("".slice),Vs=(Es=/b*/g,g(Ns,Os=/a/,"a"),g(Ns,Es,"a"),0!==Os.lastIndex||0!==Es.lastIndex),$s=Ms.BROKEN_CARET,Ys=void 0!==/()??/.exec("")[1];(Vs||Ys||$s||As||Rs)&&(Ds=function(e){var t,r,n,i,a,o,s,c=this,d=Bs(c),u=Yt(e),h=d.raw;if(h)return h.lastIndex=c.lastIndex,t=g(Ds,h,u),c.lastIndex=h.lastIndex,t;var f=d.groups,l=$s&&c.sticky,p=g(ai,c),v=c.source,b=0,I=u;if(l&&(p=Gs(p,"y",""),-1===Fs(p,"g")&&(p+="g"),I=Hs(u,c.lastIndex),c.lastIndex>0&&(!c.multiline||c.multiline&&"\n"!==Ws(u,c.lastIndex-1))&&(v="(?: "+v+")",I=" "+I,b++),r=new RegExp("^(?:"+v+")",p)),Ys&&(r=new RegExp("^"+v+"$(?!\\s)",p)),Vs&&(n=c.lastIndex),i=g(Ns,l?r:c,I),l?i?(i.input=Hs(i.input,b),i[0]=Hs(i[0],b),i.index=c.lastIndex,c.lastIndex+=i[0].length):c.lastIndex=0:Vs&&i&&(c.lastIndex=c.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&&f)for(i.groups=o=rr(null),a=0;a<f.length;a++)o[(s=f[a])[0]]=i[s[1]];return i});var Js=Ds;Rt({target:"RegExp",proto:!0,forced:/./.exec!==Js},{exec:Js});var Ks=be("species"),Qs=RegExp.prototype,Xs=function(e,t,r,n){var i=be(e),a=!h((function(){var t={};return t[i]=function(){return 7},7!=""[e](t)})),o=a&&!h((function(){var t=!1,r=/a/;return"split"===e&&((r={}).constructor={},r.constructor[Ks]=function(){return r},r.flags="",r[i]=/./[i]),r.exec=function(){return t=!0,null},r[i](""),!t}));if(!a||!o||r){var s=C(/./[i]),c=t(i,""[e],(function(e,t,r,n,i){var o=C(e),c=t.exec;return c===Js||c===Qs.exec?a&&!i?{done:!0,value:s(t,r,n)}:{done:!0,value:o(r,t,n)}:{done:!1}}));ot(String.prototype,e,c[0]),ot(Qs,i,c[1])}n&&Ue(Qs[i],"sham",!0)},Zs=Oa.charAt,ec=function(e,t,r){return t+(r?Zs(e,t).length:1)},tc=Math.floor,rc=C("".charAt),nc=C("".replace),ic=C("".slice),ac=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,oc=/\$([$&'`]|\d{1,2})/g,sc=function(e,t,r,n,i,a){var o=r+e.length,s=n.length,c=oc;return void 0!==i&&(i=oe(i),c=ac),nc(a,c,(function(a,c){var d;switch(rc(c,0)){case"$":return"$";case"&":return e;case"`":return ic(t,0,r);case"'":return ic(t,o);case"<":d=i[ic(c,1,-1)];break;default:var u=+c;if(0===u)return a;if(u>s){var h=tc(u/10);return 0===h?a:h<=s?void 0===n[h-1]?rc(c,1):n[h-1]+rc(c,1):a}d=n[u-1]}return void 0===d?"":d}))},cc=TypeError,dc=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(Js,e,t);throw cc("RegExp#exec called on incompatible receiver")},uc=be("replace"),hc=Math.max,fc=Math.min,lc=C([].concat),pc=C([].push),gc=C("".indexOf),vc=C("".slice),bc="$0"==="a".replace(/./,"$0"),Ic=!!/./[uc]&&""===/./[uc]("a","$0");Xs("replace",(function(e,t,r){var n=Ic?"$":"$0";return[function(e,r){var n=T(this),i=null==e?void 0:Z(e,uc);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===gc(i,n)&&-1===gc(i,"$<")){var s=r(t,a,o,i);if(s.done)return s.value}var c=_(i);c||(i=Yt(i));var d=a.global;if(d){var u=a.unicode;a.lastIndex=0}for(var h=[];;){var f=dc(a,o);if(null===f)break;if(pc(h,f),!d)break;""===Yt(f[0])&&(a.lastIndex=ec(o,gt(a.lastIndex),u))}for(var l,p="",g=0,v=0;v<h.length;v++){for(var b=Yt((f=h[v])[0]),I=hc(fc(ut(f.index),o.length),0),m=[],k=1;k<f.length;k++)pc(m,void 0===(l=f[k])?l:String(l));var y=f.groups;if(c){var x=lc([b],m,I,o);void 0!==y&&pc(x,y);var w=Yt(pn(i,void 0,x))}else w=sc(b,o,I,m,y,i);I>=g&&(p+=vc(o,g,I)+w,g=I+b.length)}return p+vc(o,g)}]}),!!h((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}))||!bc||Ic);var mc,kc=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)},yc=Object.assign,xc=Object.defineProperty,wc=C([].concat),Cc=!yc||h((function(){if(f&&1!==yc({b:1},yc(xc({},"a",{enumerable:!0,get:function(){xc(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!=yc({},e)[r]||"abcdefghijklmnopqrst"!=Bt(yc({},t)).join("")}))?function(e,t){for(var r=oe(e),n=arguments.length,i=1,a=Pt.f,o=I.f;n>i;)for(var s,c=j(arguments[i++]),d=a?wc(Bt(c),a(c)):Bt(c),u=d.length,h=0;u>h;)s=d[h++],f&&!g(o,c,s)||(r[s]=c[s]);return r}:yc,Pc=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},zc=function(e,t,r,n){try{return n?t(Se(r)[0],r[1]):t(r)}catch(t){Pc(e,"throw",t)}},Oc=be("iterator"),Ec=Array.prototype,qc=function(e){return void 0!==e&&(Ki.Array===e||Ec[Oc]===e)},jc=Array,Sc=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=br(i,n>2?arguments[2]:void 0));var o,s,c,d,u,h,f=Wa(t),l=0;if(!f||this===jc&&qc(f))for(o=vt(t),s=r?new this(o):jc(o);o>l;l++)h=a?i(t[l],l):t[l],nr(s,l,h);else for(u=(d=Ga(t,f)).next,s=r?new this:[];!(c=g(u,d)).done;l++)h=a?zc(d,i,[c.value,l],!0):c.value,nr(s,l,h);return s.length=l,s},Tc=/[^\0-\u007E]/,Mc=/[.\u3002\uFF0E\uFF61]/g,_c="Overflow: input needs wider integers to process",Ac=RangeError,Uc=C(Mc.exec),Rc=Math.floor,Bc=String.fromCharCode,Lc=C("".charCodeAt),Nc=C([].join),Dc=C([].push),Wc=C("".replace),Fc=C("".split),Gc=C("".toLowerCase),Hc=function(e){return e+22+75*(e<26)},Vc=function(e,t,r){var n=0;for(e=r?Rc(e/700):e>>1,e+=Rc(e/t);e>455;)e=Rc(e/35),n+=36;return Rc(n+36*e/(e+38))},$c=function(e){var t,r,n=[],i=(e=function(e){for(var t=[],r=0,n=e.length;r<n;){var i=Lc(e,r++);if(i>=55296&&i<=56319&&r<n){var a=Lc(e,r++);56320==(64512&a)?Dc(t,((1023&i)<<10)+(1023&a)+65536):(Dc(t,i),r--)}else Dc(t,i)}return t}(e)).length,a=128,o=0,s=72;for(t=0;t<e.length;t++)(r=e[t])<128&&Dc(n,Bc(r));var c=n.length,d=c;for(c&&Dc(n,"-");d<i;){var u=2147483647;for(t=0;t<e.length;t++)(r=e[t])>=a&&r<u&&(u=r);var h=d+1;if(u-a>Rc((2147483647-o)/h))throw Ac(_c);for(o+=(u-a)*h,a=u,t=0;t<e.length;t++){if((r=e[t])<a&&++o>2147483647)throw Ac(_c);if(r==a){for(var f=o,l=36;;){var p=l<=s?1:l>=s+26?26:l-s;if(f<p)break;var g=f-p,v=36-p;Dc(n,Bc(Hc(p+g%v))),f=Rc(g/v),l+=36}Dc(n,Bc(Hc(f))),s=Vc(o,h,d==c),o=0,d++}}o++,a++}return Nc(n,"")},Yc=Oa.codeAt,Jc=it.set,Kc=it.getterFor("URL"),Qc=Lo.URLSearchParams,Xc=Lo.getState,Zc=u.URL,ed=u.TypeError,td=u.parseInt,rd=Math.floor,nd=Math.pow,id=C("".charAt),ad=C(/./.exec),od=C([].join),sd=C(1..toString),cd=C([].pop),dd=C([].push),ud=C("".replace),hd=C([].shift),fd=C("".split),ld=C("".slice),pd=C("".toLowerCase),gd=C([].unshift),vd=/[a-z]/i,bd=/[\d+-.a-z]/i,Id=/\d/,md=/^0x/i,kd=/^[0-7]+$/,yd=/^\d+$/,xd=/^[\da-f]+$/i,wd=/[\0\t\n\r #%/:<>?@[\\\]^|]/,Cd=/[\0\t\n\r #/:<>?@[\\\]^|]/,Pd=/^[\u0000-\u0020]+|[\u0000-\u0020]+$/g,zd=/[\t\n\r]/g,Od=function(e){var t,r,n,i;if("number"==typeof e){for(t=[],r=0;r<4;r++)gd(t,e%256),e=rd(e/256);return od(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+=sd(e[r],16),r<7&&(t+=":")));return"["+t+"]"}return e},Ed={},qd=Cc({},Ed,{" ":1,'"':1,"<":1,">":1,"`":1}),jd=Cc({},qd,{"#":1,"?":1,"{":1,"}":1}),Sd=Cc({},jd,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),Td=function(e,t){var r=Yc(e,0);return r>32&&r<127&&!ce(t,e)?e:encodeURIComponent(e)},Md={ftp:21,file:null,http:80,https:443,ws:80,wss:443},_d=function(e,t){var r;return 2==e.length&&ad(vd,id(e,0))&&(":"==(r=id(e,1))||!t&&"|"==r)},Ad=function(e){var t;return e.length>1&&_d(ld(e,0,2))&&(2==e.length||"/"===(t=id(e,2))||"\\"===t||"?"===t||"#"===t)},Ud=function(e){return"."===e||"%2e"===pd(e)},Rd={},Bd={},Ld={},Nd={},Dd={},Wd={},Fd={},Gd={},Hd={},Vd={},$d={},Yd={},Jd={},Kd={},Qd={},Xd={},Zd={},eu={},tu={},ru={},nu={},iu=function(e,t,r){var n,i,a,o=Yt(e);if(t){if(i=this.parse(o))throw ed(i);this.searchParams=null}else{if(void 0!==r&&(n=new iu(r,!0)),i=this.parse(o,null,n))throw ed(i);(a=Xc(new Qc)).bindURL(this),this.searchParams=a}};iu.prototype={type:"URL",parse:function(e,t,r){var n,i,a,o,s,c=this,d=t||Rd,u=0,h="",f=!1,l=!1,p=!1;for(e=Yt(e),t||(c.scheme="",c.username="",c.password="",c.host=null,c.port=null,c.path=[],c.query=null,c.fragment=null,c.cannotBeABaseURL=!1,e=ud(e,Pd,"")),e=ud(e,zd,""),n=Sc(e);u<=n.length;){switch(i=n[u],d){case Rd:if(!i||!ad(vd,i)){if(t)return"Invalid scheme";d=Ld;continue}h+=pd(i),d=Bd;break;case Bd:if(i&&(ad(bd,i)||"+"==i||"-"==i||"."==i))h+=pd(i);else{if(":"!=i){if(t)return"Invalid scheme";h="",d=Ld,u=0;continue}if(t&&(c.isSpecial()!=ce(Md,h)||"file"==h&&(c.includesCredentials()||null!==c.port)||"file"==c.scheme&&!c.host))return;if(c.scheme=h,t)return void(c.isSpecial()&&Md[c.scheme]==c.port&&(c.port=null));h="","file"==c.scheme?d=Kd:c.isSpecial()&&r&&r.scheme==c.scheme?d=Nd:c.isSpecial()?d=Gd:"/"==n[u+1]?(d=Dd,u++):(c.cannotBeABaseURL=!0,dd(c.path,""),d=tu)}break;case Ld:if(!r||r.cannotBeABaseURL&&"#"!=i)return"Invalid scheme";if(r.cannotBeABaseURL&&"#"==i){c.scheme=r.scheme,c.path=or(r.path),c.query=r.query,c.fragment="",c.cannotBeABaseURL=!0,d=nu;break}d="file"==r.scheme?Kd:Wd;continue;case Nd:if("/"!=i||"/"!=n[u+1]){d=Wd;continue}d=Hd,u++;break;case Dd:if("/"==i){d=Vd;break}d=eu;continue;case Wd:if(c.scheme=r.scheme,i==mc)c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=or(r.path),c.query=r.query;else if("/"==i||"\\"==i&&c.isSpecial())d=Fd;else if("?"==i)c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=or(r.path),c.query="",d=ru;else{if("#"!=i){c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=or(r.path),c.path.length--,d=eu;continue}c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=or(r.path),c.query=r.query,c.fragment="",d=nu}break;case Fd:if(!c.isSpecial()||"/"!=i&&"\\"!=i){if("/"!=i){c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,d=eu;continue}d=Vd}else d=Hd;break;case Gd:if(d=Hd,"/"!=i||"/"!=id(h,u+1))continue;u++;break;case Hd:if("/"!=i&&"\\"!=i){d=Vd;continue}break;case Vd:if("@"==i){f&&(h="%40"+h),f=!0,a=Sc(h);for(var g=0;g<a.length;g++){var v=a[g];if(":"!=v||p){var b=Td(v,Sd);p?c.password+=b:c.username+=b}else p=!0}h=""}else if(i==mc||"/"==i||"?"==i||"#"==i||"\\"==i&&c.isSpecial()){if(f&&""==h)return"Invalid authority";u-=Sc(h).length+1,h="",d=$d}else h+=i;break;case $d:case Yd:if(t&&"file"==c.scheme){d=Xd;continue}if(":"!=i||l){if(i==mc||"/"==i||"?"==i||"#"==i||"\\"==i&&c.isSpecial()){if(c.isSpecial()&&""==h)return"Invalid host";if(t&&""==h&&(c.includesCredentials()||null!==c.port))return;if(o=c.parseHost(h))return o;if(h="",d=Zd,t)return;continue}"["==i?l=!0:"]"==i&&(l=!1),h+=i}else{if(""==h)return"Invalid host";if(o=c.parseHost(h))return o;if(h="",d=Jd,t==Yd)return}break;case Jd:if(!ad(Id,i)){if(i==mc||"/"==i||"?"==i||"#"==i||"\\"==i&&c.isSpecial()||t){if(""!=h){var I=td(h,10);if(I>65535)return"Invalid port";c.port=c.isSpecial()&&I===Md[c.scheme]?null:I,h=""}if(t)return;d=Zd;continue}return"Invalid port"}h+=i;break;case Kd:if(c.scheme="file","/"==i||"\\"==i)d=Qd;else{if(!r||"file"!=r.scheme){d=eu;continue}if(i==mc)c.host=r.host,c.path=or(r.path),c.query=r.query;else if("?"==i)c.host=r.host,c.path=or(r.path),c.query="",d=ru;else{if("#"!=i){Ad(od(or(n,u),""))||(c.host=r.host,c.path=or(r.path),c.shortenPath()),d=eu;continue}c.host=r.host,c.path=or(r.path),c.query=r.query,c.fragment="",d=nu}}break;case Qd:if("/"==i||"\\"==i){d=Xd;break}r&&"file"==r.scheme&&!Ad(od(or(n,u),""))&&(_d(r.path[0],!0)?dd(c.path,r.path[0]):c.host=r.host),d=eu;continue;case Xd:if(i==mc||"/"==i||"\\"==i||"?"==i||"#"==i){if(!t&&_d(h))d=eu;else if(""==h){if(c.host="",t)return;d=Zd}else{if(o=c.parseHost(h))return o;if("localhost"==c.host&&(c.host=""),t)return;h="",d=Zd}continue}h+=i;break;case Zd:if(c.isSpecial()){if(d=eu,"/"!=i&&"\\"!=i)continue}else if(t||"?"!=i)if(t||"#"!=i){if(i!=mc&&(d=eu,"/"!=i))continue}else c.fragment="",d=nu;else c.query="",d=ru;break;case eu:if(i==mc||"/"==i||"\\"==i&&c.isSpecial()||!t&&("?"==i||"#"==i)){if(".."===(s=pd(s=h))||"%2e."===s||".%2e"===s||"%2e%2e"===s?(c.shortenPath(),"/"==i||"\\"==i&&c.isSpecial()||dd(c.path,"")):Ud(h)?"/"==i||"\\"==i&&c.isSpecial()||dd(c.path,""):("file"==c.scheme&&!c.path.length&&_d(h)&&(c.host&&(c.host=""),h=id(h,0)+":"),dd(c.path,h)),h="","file"==c.scheme&&(i==mc||"?"==i||"#"==i))for(;c.path.length>1&&""===c.path[0];)hd(c.path);"?"==i?(c.query="",d=ru):"#"==i&&(c.fragment="",d=nu)}else h+=Td(i,jd);break;case tu:"?"==i?(c.query="",d=ru):"#"==i?(c.fragment="",d=nu):i!=mc&&(c.path[0]+=Td(i,Ed));break;case ru:t||"#"!=i?i!=mc&&("'"==i&&c.isSpecial()?c.query+="%27":c.query+="#"==i?"%23":Td(i,Ed)):(c.fragment="",d=nu);break;case nu:i!=mc&&(c.fragment+=Td(i,qd))}u++}},parseHost:function(e){var t,r,n;if("["==id(e,0)){if("]"!=id(e,e.length-1))return"Invalid host";if(!(t=function(e){var t,r,n,i,a,o,s,c=[0,0,0,0,0,0,0,0],d=0,u=null,h=0,f=function(){return id(e,h)};if(":"==f()){if(":"!=id(e,1))return;h+=2,u=++d}for(;f();){if(8==d)return;if(":"!=f()){for(t=r=0;r<4&&ad(xd,f());)t=16*t+td(f(),16),h++,r++;if("."==f()){if(0==r)return;if(h-=r,d>6)return;for(n=0;f();){if(i=null,n>0){if(!("."==f()&&n<4))return;h++}if(!ad(Id,f()))return;for(;ad(Id,f());){if(a=td(f(),10),null===i)i=a;else{if(0==i)return;i=10*i+a}if(i>255)return;h++}c[d]=256*c[d]+i,2!=++n&&4!=n||d++}if(4!=n)return;break}if(":"==f()){if(h++,!f())return}else if(f())return;c[d++]=t}else{if(null!==u)return;h++,u=++d}}if(null!==u)for(o=d-u,d=7;0!=d&&o>0;)s=c[d],c[d--]=c[u+o-1],c[u+--o]=s;else if(8!=d)return;return c}(ld(e,1,-1))))return"Invalid host";this.host=t}else if(this.isSpecial()){if(e=function(e){var t,r,n=[],i=Fc(Wc(Gc(e),Mc,"."),".");for(t=0;t<i.length;t++)r=i[t],Dc(n,Uc(Tc,r)?"xn--"+$c(r):r);return Nc(n,".")}(e),ad(wd,e))return"Invalid host";if(null===(t=function(e){var t,r,n,i,a,o,s,c=fd(e,".");if(c.length&&""==c[c.length-1]&&c.length--,(t=c.length)>4)return e;for(r=[],n=0;n<t;n++){if(""==(i=c[n]))return e;if(a=10,i.length>1&&"0"==id(i,0)&&(a=ad(md,i)?16:8,i=ld(i,8==a?1:2)),""===i)o=0;else{if(!ad(10==a?yd:8==a?kd:xd,i))return e;o=td(i,a)}dd(r,o)}for(n=0;n<t;n++)if(o=r[n],n==t-1){if(o>=nd(256,5-t))return null}else if(o>255)return null;for(s=cd(r),n=0;n<r.length;n++)s+=r[n]*nd(256,3-n);return s}(e)))return"Invalid host";this.host=t}else{if(ad(Cd,e))return"Invalid host";for(t="",r=Sc(e),n=0;n<r.length;n++)t+=Td(r[n],Ed);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"==this.scheme},includesCredentials:function(){return""!=this.username||""!=this.password},isSpecial:function(){return ce(Md,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"==this.scheme&&1==t&&_d(e[0],!0)||e.length--},serialize:function(){var e=this,t=e.scheme,r=e.username,n=e.password,i=e.host,a=e.port,o=e.path,s=e.query,c=e.fragment,d=t+":";return null!==i?(d+="//",e.includesCredentials()&&(d+=r+(n?":"+n:"")+"@"),d+=Od(i),null!==a&&(d+=":"+a)):"file"==t&&(d+="//"),d+=e.cannotBeABaseURL?o[0]:o.length?"/"+od(o,"/"):"",null!==s&&(d+="?"+s),null!==c&&(d+="#"+c),d},setHref:function(e){var t=this.parse(e);if(t)throw ed(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+"://"+Od(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse(Yt(e)+":",Rd)},getUsername:function(){return this.username},setUsername:function(e){var t=Sc(Yt(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var r=0;r<t.length;r++)this.username+=Td(t[r],Sd)}},getPassword:function(){return this.password},setPassword:function(e){var t=Sc(Yt(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var r=0;r<t.length;r++)this.password+=Td(t[r],Sd)}},getHost:function(){var e=this.host,t=this.port;return null===e?"":null===t?Od(e):Od(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,$d)},getHostname:function(){var e=this.host;return null===e?"":Od(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,Yd)},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,Jd))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+od(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,Zd))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){""==(e=Yt(e))?this.query=null:("?"==id(e,0)&&(e=ld(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))?("#"==id(e,0)&&(e=ld(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=Na(this,ou),r=Va(arguments.length,1)>1?arguments[1]:void 0,n=Jc(t,new iu(e,!1,r));f||(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 Kc(this)[e]()},set:t&&function(e){return Kc(this)[t](e)},configurable:!0,enumerable:!0}};if(f&&(kc(ou,"href",su("serialize","setHref")),kc(ou,"origin",su("getOrigin")),kc(ou,"protocol",su("getProtocol","setProtocol")),kc(ou,"username",su("getUsername","setUsername")),kc(ou,"password",su("getPassword","setPassword")),kc(ou,"host",su("getHost","setHost")),kc(ou,"hostname",su("getHostname","setHostname")),kc(ou,"port",su("getPort","setPort")),kc(ou,"pathname",su("getPathname","setPathname")),kc(ou,"search",su("getSearch","setSearch")),kc(ou,"searchParams",su("getSearchParams")),kc(ou,"hash",su("getHash","setHash"))),ot(ou,"toJSON",(function(){return Kc(this).serialize()}),{enumerable:!0}),ot(ou,"toString",(function(){return Kc(this).serialize()}),{enumerable:!0}),Zc){var cu=Zc.createObjectURL,du=Zc.revokeObjectURL;cu&&ot(au,"createObjectURL",br(cu,Zc)),du&&ot(au,"revokeObjectURL",br(du,Zc))}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=ms(e);if(t){var i=ms(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Is(this,r)}}gr(au,"URL"),Rt({global:!0,constructor:!0,forced:!Ra,sham:!f},{URL:au});var hu=function(e){bs(r,e);var t=uu(r);function r(e,n,i){var a;return li(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)),fu="commerce-sdk-isomorphic@2.0.0";function lu(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function pu(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?lu(Object(r),!0).forEach((function(t){vi(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):lu(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var gu=function(){function e(t){li(this,e),vi(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,c,d,u,h,f,l,p,g,v,b,I,m,k,y,x,w,C,P,z,O,E,q,j,S,T,M,_,A,U;return gi(e,[{key:"createBasket",value:(U=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;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 hu("/organizations/{organizationId}/baskets",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=31,qs(s.toString(),{method:"POST",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 31:return d=e.sent,e.abrupt("return",d);case 33:case"end":return e.stop()}}),e,this)}))),function(e,t){return U.apply(this,arguments)})},{key:"transferBasket",value:(A=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;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 hu("/organizations/{organizationId}/baskets/actions/transfer",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=30,qs(s.toString(),{method:"POST",headers:c},this.clientConfig,r);case 30:return d=e.sent,e.abrupt("return",d);case 32:case"end":return e.stop()}}),e,this)}))),function(e,t){return A.apply(this,arguments)})},{key:"mergeBasket",value:(_=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;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 hu("/organizations/{organizationId}/baskets/actions/merge",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=31,qs(s.toString(),{method:"POST",headers:c},this.clientConfig,r);case 31:return d=e.sent,e.abrupt("return",d);case 33:case"end":return e.stop()}}),e,this)}))),function(e,t){return _.apply(this,arguments)})},{key:"deleteBasket",value:(M=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;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 hu("/organizations/{organizationId}/baskets/{basketId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=37,qs(s.toString(),{method:"DELETE",headers:c},this.clientConfig,r);case 37:if(d=e.sent,!r){e.next=40;break}return e.abrupt("return",d);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return M.apply(this,arguments)})},{key:"getBasket",value:(T=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;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 hu("/organizations/{organizationId}/baskets/{basketId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=38,qs(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 38:return d=e.sent,e.abrupt("return",d);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return T.apply(this,arguments)})},{key:"updateBasket",value:(S=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;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 updateBasket: ".concat(e))})),s=new hu("/organizations/{organizationId}/baskets/{basketId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=38,qs(s.toString(),{method:"PATCH",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 38:return d=e.sent,e.abrupt("return",d);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return S.apply(this,arguments)})},{key:"updateAsAgentBasket",value:(j=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;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 hu("/organizations/{organizationId}/baskets/{basketId}/agent",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=38,qs(s.toString(),{method:"PUT",headers:c},this.clientConfig,r);case 38:return d=e.sent,e.abrupt("return",d);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return j.apply(this,arguments)})},{key:"updateBillingAddressForBasket",value:(q=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;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 hu("/organizations/{organizationId}/baskets/{basketId}/billing-address",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=40,qs(s.toString(),{method:"PUT",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 40:return d=e.sent,e.abrupt("return",d);case 42:case"end":return e.stop()}}),e,this)}))),function(e,t){return q.apply(this,arguments)})},{key:"addCouponToBasket",value:(E=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;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 hu("/organizations/{organizationId}/baskets/{basketId}/coupons",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=38,qs(s.toString(),{method:"POST",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 38:return d=e.sent,e.abrupt("return",d);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return E.apply(this,arguments)})},{key:"removeCouponFromBasket",value:(O=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;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 hu("/organizations/{organizationId}/baskets/{basketId}/coupons/{couponItemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=47,qs(s.toString(),{method:"DELETE",headers:c},this.clientConfig,r);case 47:return d=e.sent,e.abrupt("return",d);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return O.apply(this,arguments)})},{key:"updateCustomerForBasket",value:(z=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;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 hu("/organizations/{organizationId}/baskets/{basketId}/customer",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=38,qs(s.toString(),{method:"PUT",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 38:return d=e.sent,e.abrupt("return",d);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return z.apply(this,arguments)})},{key:"addGiftCertificateItemToBasket",value:(P=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;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 hu("/organizations/{organizationId}/baskets/{basketId}/gift-certificate-items",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=38,qs(s.toString(),{method:"POST",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 38:return d=e.sent,e.abrupt("return",d);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return P.apply(this,arguments)})},{key:"removeGiftCertificateItemFromBasket",value:(C=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;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 hu("/organizations/{organizationId}/baskets/{basketId}/gift-certificate-items/{giftCertificateItemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=47,qs(s.toString(),{method:"DELETE",headers:c},this.clientConfig,r);case 47:return d=e.sent,e.abrupt("return",d);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return C.apply(this,arguments)})},{key:"updateGiftCertificateItemInBasket",value:(w=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;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 hu("/organizations/{organizationId}/baskets/{basketId}/gift-certificate-items/{giftCertificateItemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=47,qs(s.toString(),{method:"PATCH",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 47:return d=e.sent,e.abrupt("return",d);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return w.apply(this,arguments)})},{key:"addItemToBasket",value:(x=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;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 hu("/organizations/{organizationId}/baskets/{basketId}/items",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=38,qs(s.toString(),{method:"POST",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 38:return d=e.sent,e.abrupt("return",d);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return x.apply(this,arguments)})},{key:"removeItemFromBasket",value:(y=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;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 hu("/organizations/{organizationId}/baskets/{basketId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=47,qs(s.toString(),{method:"DELETE",headers:c},this.clientConfig,r);case 47:return d=e.sent,e.abrupt("return",d);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return y.apply(this,arguments)})},{key:"updateItemInBasket",value:(k=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;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 hu("/organizations/{organizationId}/baskets/{basketId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=48,qs(s.toString(),{method:"PATCH",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 48:return d=e.sent,e.abrupt("return",d);case 50:case"end":return e.stop()}}),e,this)}))),function(e,t){return k.apply(this,arguments)})},{key:"addTaxesForBasketItem",value:(m=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;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 hu("/organizations/{organizationId}/baskets/{basketId}/items/{itemId}/taxes",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=46,qs(s.toString(),{method:"PUT",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 46:if(d=e.sent,!r){e.next=49;break}return e.abrupt("return",d);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return m.apply(this,arguments)})},{key:"addPaymentInstrumentToBasket",value:(I=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;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 hu("/organizations/{organizationId}/baskets/{basketId}/payment-instruments",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=38,qs(s.toString(),{method:"POST",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 38:return d=e.sent,e.abrupt("return",d);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return I.apply(this,arguments)})},{key:"removePaymentInstrumentFromBasket",value:(b=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;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 hu("/organizations/{organizationId}/baskets/{basketId}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=47,qs(s.toString(),{method:"DELETE",headers:c},this.clientConfig,r);case 47:return d=e.sent,e.abrupt("return",d);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return b.apply(this,arguments)})},{key:"updatePaymentInstrumentInBasket",value:(v=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;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 hu("/organizations/{organizationId}/baskets/{basketId}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=48,qs(s.toString(),{method:"PATCH",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 48:return d=e.sent,e.abrupt("return",d);case 50:case"end":return e.stop()}}),e,this)}))),function(e,t){return v.apply(this,arguments)})},{key:"getPaymentMethodsForBasket",value:(g=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;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 hu("/organizations/{organizationId}/baskets/{basketId}/payment-methods",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=38,qs(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 38:return d=e.sent,e.abrupt("return",d);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return g.apply(this,arguments)})},{key:"addPriceAdjustmentToBasket",value:(p=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;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 hu("/organizations/{organizationId}/baskets/{basketId}/price-adjustments",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=38,qs(s.toString(),{method:"POST",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 38:return d=e.sent,e.abrupt("return",d);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return p.apply(this,arguments)})},{key:"removePriceAdjustmentFromBasket",value:(l=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;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 hu("/organizations/{organizationId}/baskets/{basketId}/price-adjustments/{priceAdjustmentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=47,qs(s.toString(),{method:"DELETE",headers:c},this.clientConfig,r);case 47:return d=e.sent,e.abrupt("return",d);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return l.apply(this,arguments)})},{key:"updatePriceAdjustmentInBasket",value:(f=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;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 hu("/organizations/{organizationId}/baskets/{basketId}/price-adjustments/{priceAdjustmentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=46,qs(s.toString(),{method:"PATCH",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 46:return d=e.sent,e.abrupt("return",d);case 48:case"end":return e.stop()}}),e,this)}))),function(e,t){return f.apply(this,arguments)})},{key:"getPriceBooksForBasket",value:(h=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;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 hu("/organizations/{organizationId}/baskets/{basketId}/price-books",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=37,qs(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 37:return d=e.sent,e.abrupt("return",d);case 39:case"end":return e.stop()}}),e,this)}))),function(e,t){return h.apply(this,arguments)})},{key:"addPriceBooksToBasket",value:(u=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;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 hu("/organizations/{organizationId}/baskets/{basketId}/price-books",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=37,qs(s.toString(),{method:"PUT",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 37:if(d=e.sent,!r){e.next=40;break}return e.abrupt("return",d);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return u.apply(this,arguments)})},{key:"createShipmentForBasket",value:(d=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;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 hu("/organizations/{organizationId}/baskets/{basketId}/shipments",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=38,qs(s.toString(),{method:"POST",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 38:return d=e.sent,e.abrupt("return",d);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return d.apply(this,arguments)})},{key:"removeShipmentFromBasket",value:(c=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;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 hu("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=47,qs(s.toString(),{method:"DELETE",headers:c},this.clientConfig,r);case 47:return d=e.sent,e.abrupt("return",d);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return c.apply(this,arguments)})},{key:"updateShipmentForBasket",value:(s=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;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 hu("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=47,qs(s.toString(),{method:"PATCH",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 47:return d=e.sent,e.abrupt("return",d);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return s.apply(this,arguments)})},{key:"updateShippingAddressForShipment",value:(o=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;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 hu("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}/shipping-address",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=49,qs(s.toString(),{method:"PUT",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 49:return d=e.sent,e.abrupt("return",d);case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return o.apply(this,arguments)})},{key:"updateShippingMethodForShipment",value:(a=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;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 hu("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}/shipping-method",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=47,qs(s.toString(),{method:"PUT",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 47:return d=e.sent,e.abrupt("return",d);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"getShippingMethodsForShipment",value:(i=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;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 hu("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}/shipping-methods",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=47,qs(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 47:return d=e.sent,e.abrupt("return",d);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"updateAsStorefrontBasket",value:(n=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;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 hu("/organizations/{organizationId}/baskets/{basketId}/storefront",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=39,qs(s.toString(),{method:"PUT",headers:c},this.clientConfig,r);case 39:return d=e.sent,e.abrupt("return",d);case 41:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"getTaxesFromBasket",value:(r=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;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 hu("/organizations/{organizationId}/baskets/{basketId}/taxes",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=37,qs(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 37:return d=e.sent,e.abrupt("return",d);case 39:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"addTaxesForBasket",value:(t=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;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 hu("/organizations/{organizationId}/baskets/{basketId}/taxes",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=37,qs(s.toString(),{method:"PUT",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 37:if(d=e.sent,!r){e.next=40;break}return e.abrupt("return",d);case 40:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function vu(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function bu(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?vu(Object(r),!0).forEach((function(t){vi(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):vu(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}vi(gu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/checkout/shopper-baskets/{version}");var Iu=function(){function e(t){li(this,e),vi(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,n,i;return gi(e,[{key:"getShopperContext",value:(i=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;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 hu("/organizations/{organizationId}/shopper-context/{usid}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=bu(bu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=29,qs(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 29:return d=e.sent,e.abrupt("return",d);case 31:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"createShopperContext",value:(n=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;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 createShopperContext: ".concat(e))})),s=new hu("/organizations/{organizationId}/shopper-context/{usid}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=bu(bu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=29,qs(s.toString(),{method:"PUT",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 29:return d=e.sent,e.abrupt("return",d);case 31:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"deleteShopperContext",value:(r=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;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 hu("/organizations/{organizationId}/shopper-context/{usid}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=bu(bu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=29,qs(s.toString(),{method:"DELETE",headers:c},this.clientConfig,r);case 29:if(d=e.sent,!r){e.next=32;break}return e.abrupt("return",d);case 32:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"updateShopperContext",value:(t=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;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 updateShopperContext: ".concat(e))})),s=new hu("/organizations/{organizationId}/shopper-context/{usid}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=bu(bu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=29,qs(s.toString(),{method:"PATCH",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 29:return d=e.sent,e.abrupt("return",d);case 31:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function mu(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ku(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?mu(Object(r),!0).forEach((function(t){vi(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):mu(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}vi(Iu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/shopper/shopper-context/{version}");var yu=function(){function e(t){li(this,e),vi(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,c,d,u,h,f,l,p,g,v,b,I,m,k,y,x,w,C,P,z,O,E,q;return gi(e,[{key:"registerCustomer",value:(q=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;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 hu("/organizations/{organizationId}/customers",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ku(ku({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=28,qs(s.toString(),{method:"POST",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 28:return d=e.sent,e.abrupt("return",d);case 30:case"end":return e.stop()}}),e,this)}))),function(e,t){return q.apply(this,arguments)})},{key:"resetPassword",value:(E=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;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 hu("/organizations/{organizationId}/customers/password/actions/reset",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ku(ku({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=28,qs(s.toString(),{method:"POST",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 28:if(d=e.sent,!r){e.next=31;break}return e.abrupt("return",d);case 31:case"end":return e.stop()}}),e,this)}))),function(e,t){return E.apply(this,arguments)})},{key:"getResetPasswordToken",value:(O=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;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 hu("/organizations/{organizationId}/customers/password/actions/create-reset-token",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ku(ku({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=28,qs(s.toString(),{method:"POST",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 28:return d=e.sent,e.abrupt("return",d);case 30:case"end":return e.stop()}}),e,this)}))),function(e,t){return O.apply(this,arguments)})},{key:"registerExternalProfile",value:(z=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;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 hu("/organizations/{organizationId}/customers/external-profile",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ku(ku({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=28,qs(s.toString(),{method:"POST",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 28:return d=e.sent,e.abrupt("return",d);case 30:case"end":return e.stop()}}),e,this)}))),function(e,t){return z.apply(this,arguments)})},{key:"getExternalProfile",value:(P=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;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 hu("/organizations/{organizationId}/customers/external-profile",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ku(ku({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=46,qs(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 46:return d=e.sent,e.abrupt("return",d);case 48:case"end":return e.stop()}}),e,this)}))),function(e,t){return P.apply(this,arguments)})},{key:"getCustomer",value:(C=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;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 hu("/organizations/{organizationId}/customers/{customerId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ku(ku({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=37,qs(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 37:return d=e.sent,e.abrupt("return",d);case 39:case"end":return e.stop()}}),e,this)}))),function(e,t){return C.apply(this,arguments)})},{key:"updateCustomer",value:(w=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;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 hu("/organizations/{organizationId}/customers/{customerId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ku(ku({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=37,qs(s.toString(),{method:"PATCH",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 37:return d=e.sent,e.abrupt("return",d);case 39:case"end":return e.stop()}}),e,this)}))),function(e,t){return w.apply(this,arguments)})},{key:"createCustomerAddress",value:(x=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;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 hu("/organizations/{organizationId}/customers/{customerId}/addresses",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ku(ku({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=37,qs(s.toString(),{method:"POST",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 37:return d=e.sent,e.abrupt("return",d);case 39:case"end":return e.stop()}}),e,this)}))),function(e,t){return x.apply(this,arguments)})},{key:"getCustomerAddress",value:(y=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;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 hu("/organizations/{organizationId}/customers/{customerId}/addresses/{addressName}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ku(ku({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=46,qs(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 46:return d=e.sent,e.abrupt("return",d);case 48:case"end":return e.stop()}}),e,this)}))),function(e,t){return y.apply(this,arguments)})},{key:"removeCustomerAddress",value:(k=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;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 hu("/organizations/{organizationId}/customers/{customerId}/addresses/{addressName}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ku(ku({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=46,qs(s.toString(),{method:"DELETE",headers:c},this.clientConfig,r);case 46:if(d=e.sent,!r){e.next=49;break}return e.abrupt("return",d);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return k.apply(this,arguments)})},{key:"updateCustomerAddress",value:(m=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;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 hu("/organizations/{organizationId}/customers/{customerId}/addresses/{addressName}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ku(ku({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=46,qs(s.toString(),{method:"PATCH",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 46:return d=e.sent,e.abrupt("return",d);case 48:case"end":return e.stop()}}),e,this)}))),function(e,t){return m.apply(this,arguments)})},{key:"getCustomerBaskets",value:(I=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;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 hu("/organizations/{organizationId}/customers/{customerId}/baskets",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ku(ku({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=37,qs(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 37:return d=e.sent,e.abrupt("return",d);case 39:case"end":return e.stop()}}),e,this)}))),function(e,t){return I.apply(this,arguments)})},{key:"getCustomerOrders",value:(b=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;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 hu("/organizations/{organizationId}/customers/{customerId}/orders",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ku(ku({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=43,qs(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 43:return d=e.sent,e.abrupt("return",d);case 45:case"end":return e.stop()}}),e,this)}))),function(e,t){return b.apply(this,arguments)})},{key:"updateCustomerPassword",value:(v=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;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 hu("/organizations/{organizationId}/customers/{customerId}/password",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ku(ku({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=37,qs(s.toString(),{method:"PUT",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 37:if(d=e.sent,!r){e.next=40;break}return e.abrupt("return",d);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return v.apply(this,arguments)})},{key:"createCustomerPaymentInstrument",value:(g=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;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 hu("/organizations/{organizationId}/customers/{customerId}/payment-instruments",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ku(ku({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=37,qs(s.toString(),{method:"POST",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 37:return d=e.sent,e.abrupt("return",d);case 39:case"end":return e.stop()}}),e,this)}))),function(e,t){return g.apply(this,arguments)})},{key:"deleteCustomerPaymentInstrument",value:(p=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;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 hu("/organizations/{organizationId}/customers/{customerId}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ku(ku({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=46,qs(s.toString(),{method:"DELETE",headers:c},this.clientConfig,r);case 46:if(d=e.sent,!r){e.next=49;break}return e.abrupt("return",d);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return p.apply(this,arguments)})},{key:"getCustomerPaymentInstrument",value:(l=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;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 hu("/organizations/{organizationId}/customers/{customerId}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ku(ku({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=46,qs(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 46:return d=e.sent,e.abrupt("return",d);case 48:case"end":return e.stop()}}),e,this)}))),function(e,t){return l.apply(this,arguments)})},{key:"getCustomerProductLists",value:(f=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;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 hu("/organizations/{organizationId}/customers/{customerId}/product-lists",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ku(ku({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=37,qs(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 37:return d=e.sent,e.abrupt("return",d);case 39:case"end":return e.stop()}}),e,this)}))),function(e,t){return f.apply(this,arguments)})},{key:"createCustomerProductList",value:(h=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;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 hu("/organizations/{organizationId}/customers/{customerId}/product-lists",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ku(ku({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=37,qs(s.toString(),{method:"POST",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 37:return d=e.sent,e.abrupt("return",d);case 39:case"end":return e.stop()}}),e,this)}))),function(e,t){return h.apply(this,arguments)})},{key:"deleteCustomerProductList",value:(u=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;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 hu("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ku(ku({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=46,qs(s.toString(),{method:"DELETE",headers:c},this.clientConfig,r);case 46:if(d=e.sent,!r){e.next=49;break}return e.abrupt("return",d);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return u.apply(this,arguments)})},{key:"getCustomerProductList",value:(d=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;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 hu("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ku(ku({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=46,qs(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 46:return d=e.sent,e.abrupt("return",d);case 48:case"end":return e.stop()}}),e,this)}))),function(e,t){return d.apply(this,arguments)})},{key:"updateCustomerProductList",value:(c=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;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 hu("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ku(ku({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=46,qs(s.toString(),{method:"PATCH",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 46:return d=e.sent,e.abrupt("return",d);case 48:case"end":return e.stop()}}),e,this)}))),function(e,t){return c.apply(this,arguments)})},{key:"createCustomerProductListItem",value:(s=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;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 hu("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}/items",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ku(ku({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=46,qs(s.toString(),{method:"POST",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 46:return d=e.sent,e.abrupt("return",d);case 48:case"end":return e.stop()}}),e,this)}))),function(e,t){return s.apply(this,arguments)})},{key:"deleteCustomerProductListItem",value:(o=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;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 hu("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ku(ku({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=55,qs(s.toString(),{method:"DELETE",headers:c},this.clientConfig,r);case 55:if(d=e.sent,!r){e.next=58;break}return e.abrupt("return",d);case 58:case"end":return e.stop()}}),e,this)}))),function(e,t){return o.apply(this,arguments)})},{key:"getCustomerProductListItem",value:(a=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;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 hu("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ku(ku({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=55,qs(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 55:return d=e.sent,e.abrupt("return",d);case 57:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"updateCustomerProductListItem",value:(i=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;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 hu("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ku(ku({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=55,qs(s.toString(),{method:"PATCH",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 55:return d=e.sent,e.abrupt("return",d);case 57:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"getPublicProductListsBySearchTerm",value:(n=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;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 hu("/organizations/{organizationId}/product-lists",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ku(ku({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=31,qs(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 31:return d=e.sent,e.abrupt("return",d);case 33:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"getPublicProductList",value:(r=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;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 hu("/organizations/{organizationId}/product-lists/{listId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ku(ku({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=37,qs(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 37:return d=e.sent,e.abrupt("return",d);case 39:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getProductListItem",value:(t=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;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 hu("/organizations/{organizationId}/product-lists/{listId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ku(ku({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=46,qs(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 46:return d=e.sent,e.abrupt("return",d);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){vi(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}vi(yu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/customer/shopper-customers/{version}");var Cu=function(){function e(t){li(this,e),vi(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=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;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 hu("/organizations/{organizationId}/channels/{channelId}/results",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=wu(wu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=39,qs(s.toString(),{method:"POST",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 39:return d=e.sent,e.abrupt("return",d);case 41:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getSuggestions",value:(t=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;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 hu("/organizations/{organizationId}/channels/{channelId}/suggestions",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=wu(wu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=47,qs(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 47:return d=e.sent,e.abrupt("return",d);case 49:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function Pu(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function zu(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Pu(Object(r),!0).forEach((function(t){vi(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Pu(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}vi(Cu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/discovery/query/{version}");var Ou=function(){function e(t){li(this,e),vi(this,"clientConfig",void 0);var r=zu({},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=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;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 hu("/organizations/{organizationId}/pages",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=zu(zu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=42,qs(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 42:return d=e.sent,e.abrupt("return",d);case 44:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getPage",value:(t=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;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 hu("/organizations/{organizationId}/pages/{pageId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=zu(zu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=40,qs(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 40:return d=e.sent,e.abrupt("return",d);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){vi(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}vi(Ou,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/experience/shopper-experience/{version}");var ju=function(){function e(t){li(this,e),vi(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=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;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 hu("/organizations/{organizationId}/gift-certificate",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=qu(qu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=28,qs(s.toString(),{method:"POST",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 28:return d=e.sent,e.abrupt("return",d);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){vi(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}vi(ju,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/pricing/shopper-gift-certificates/{version}");var Mu=function(){function e(t){li(this,e),vi(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,c,d,u,h,f,l,p,g,v,b;return gi(e,[{key:"authenticateCustomer",value:(b=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;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 hu("/organizations/{organizationId}/oauth2/login",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Tu(Tu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=19,qs(s.toString(),{method:"POST",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 19:if(d=e.sent,!r){e.next=22;break}return e.abrupt("return",d);case 22:case"end":return e.stop()}}),e,this)}))),function(e,t){return b.apply(this,arguments)})},{key:"authorizePasswordlessCustomer",value:(v=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;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 hu("/organizations/{organizationId}/oauth2/passwordless/login",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Tu(Tu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=19,qs(s.toString(),{method:"POST",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 19:return d=e.sent,e.abrupt("return",d);case 21:case"end":return e.stop()}}),e,this)}))),function(e,t){return v.apply(this,arguments)})},{key:"logoutCustomer",value:(g=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;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 hu("/organizations/{organizationId}/oauth2/logout",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Tu(Tu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=39,qs(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 39:return d=e.sent,e.abrupt("return",d);case 41:case"end":return e.stop()}}),e,this)}))),function(e,t){return g.apply(this,arguments)})},{key:"authorizeCustomer",value:(p=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;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:if(void 0!==n.scope?o.scope=n.scope:void 0!==i.scope&&(o.scope=i.scope),void 0!==n.state?o.state=n.state:void 0!==i.state&&(o.state=i.state),void 0!==n.usid?o.usid=n.usid:void 0!==i.usid&&(o.usid=i.usid),void 0!==n.hint?o.hint=n.hint:void 0!==i.hint&&(o.hint=i.hint),void 0!==n.channel_id?o.channel_id=n.channel_id:void 0!==i.channel_id&&(o.channel_id=i.channel_id),void 0===n.code_challenge){e.next=49;break}o.code_challenge=n.code_challenge,e.next=54;break;case 49:if(void 0===i.code_challenge){e.next=53;break}o.code_challenge=i.code_challenge,e.next=54;break;case 53:throw new Error("Missing required query parameter: code_challenge");case 54:return void 0!==n.ui_locales?o.ui_locales=n.ui_locales:void 0!==i.ui_locales&&(o.ui_locales=i.ui_locales),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for authorizeCustomer: ".concat(e))})),s=new hu("/organizations/{organizationId}/oauth2/authorize",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Tu(Tu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=61,qs(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 61:if(d=e.sent,!r){e.next=64;break}return e.abrupt("return",d);case 64:case"end":return e.stop()}}),e,this)}))),function(e,t){return p.apply(this,arguments)})},{key:"getAccessToken",value:(l=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;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 hu("/organizations/{organizationId}/oauth2/token",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Tu(Tu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=19,qs(s.toString(),{method:"POST",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 19:return d=e.sent,e.abrupt("return",d);case 21:case"end":return e.stop()}}),e,this)}))),function(e,t){return l.apply(this,arguments)})},{key:"getSessionBridgeAccessToken",value:(f=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;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 hu("/organizations/{organizationId}/oauth2/session-bridge/token",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Tu(Tu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=19,qs(s.toString(),{method:"POST",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 19:return d=e.sent,e.abrupt("return",d);case 21:case"end":return e.stop()}}),e,this)}))),function(e,t){return f.apply(this,arguments)})},{key:"getTrustedSystemAccessToken",value:(h=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;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 hu("/organizations/{organizationId}/oauth2/trusted-system/token",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Tu(Tu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=19,qs(s.toString(),{method:"POST",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 19:return d=e.sent,e.abrupt("return",d);case 21:case"end":return e.stop()}}),e,this)}))),function(e,t){return h.apply(this,arguments)})},{key:"getTrustedAgentAuthorizationToken",value:(u=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;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 hu("/organizations/{organizationId}/oauth2/trusted-agent/authorize",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Tu(Tu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=82,qs(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 82:if(d=e.sent,!r){e.next=85;break}return e.abrupt("return",d);case 85:case"end":return e.stop()}}),e,this)}))),function(e,t){return u.apply(this,arguments)})},{key:"getTrustedAgentAccessToken",value:(d=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;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 hu("/organizations/{organizationId}/oauth2/trusted-agent/token",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Tu(Tu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=19,qs(s.toString(),{method:"POST",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 19:return d=e.sent,e.abrupt("return",d);case 21:case"end":return e.stop()}}),e,this)}))),function(e,t){return d.apply(this,arguments)})},{key:"getPasswordResetToken",value:(c=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;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 hu("/organizations/{organizationId}/oauth2/password/reset",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Tu(Tu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=19,qs(s.toString(),{method:"POST",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 19:if(d=e.sent,!r){e.next=22;break}return e.abrupt("return",d);case 22:case"end":return e.stop()}}),e,this)}))),function(e,t){return c.apply(this,arguments)})},{key:"resetPassword",value:(s=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;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 hu("/organizations/{organizationId}/oauth2/password/action",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Tu(Tu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=19,qs(s.toString(),{method:"POST",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 19:if(d=e.sent,!r){e.next=22;break}return e.abrupt("return",d);case 22:case"end":return e.stop()}}),e,this)}))),function(e,t){return s.apply(this,arguments)})},{key:"getPasswordLessAccessToken",value:(o=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;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 hu("/organizations/{organizationId}/oauth2/passwordless/token",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Tu(Tu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=19,qs(s.toString(),{method:"POST",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 19:return d=e.sent,e.abrupt("return",d);case 21:case"end":return e.stop()}}),e,this)}))),function(e,t){return o.apply(this,arguments)})},{key:"revokeToken",value:(a=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;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 hu("/organizations/{organizationId}/oauth2/revoke",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Tu(Tu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=19,qs(s.toString(),{method:"POST",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 19:return d=e.sent,e.abrupt("return",d);case 21:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"introspectToken",value:(i=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;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 hu("/organizations/{organizationId}/oauth2/introspect",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Tu(Tu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=19,qs(s.toString(),{method:"POST",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 19:return d=e.sent,e.abrupt("return",d);case 21:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"getUserInfo",value:(n=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;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 hu("/organizations/{organizationId}/oauth2/userinfo",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Tu(Tu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=20,qs(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 20:return d=e.sent,e.abrupt("return",d);case 22:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"getWellknownOpenidConfiguration",value:(r=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;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 hu("/organizations/{organizationId}/oauth2/.well-known/openid-configuration",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Tu(Tu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=19,qs(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 19:return d=e.sent,e.abrupt("return",d);case 21:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getJwksUri",value:(t=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;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 hu("/organizations/{organizationId}/oauth2/jwks",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Tu(Tu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=19,qs(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 19:return d=e.sent,e.abrupt("return",d);case 21: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){vi(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}vi(Mu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/shopper/auth/{version}");var Uu=function(){function e(t){li(this,e),vi(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,a,o,s,c;return gi(e,[{key:"createOrder",value:(c=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;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 hu("/organizations/{organizationId}/orders",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Au(Au({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=29,qs(s.toString(),{method:"POST",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 29:return d=e.sent,e.abrupt("return",d);case 31:case"end":return e.stop()}}),e,this)}))),function(e,t){return c.apply(this,arguments)})},{key:"getOrder",value:(s=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;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 hu("/organizations/{organizationId}/orders/{orderNo}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Au(Au({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=38,qs(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 38:return d=e.sent,e.abrupt("return",d);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return s.apply(this,arguments)})},{key:"guestOrderLookup",value:(o=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;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 hu("/organizations/{organizationId}/orders/{orderNo}/lookup",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Au(Au({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=38,qs(s.toString(),{method:"POST",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 38:return d=e.sent,e.abrupt("return",d);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return o.apply(this,arguments)})},{key:"createPaymentInstrumentForOrder",value:(a=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;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 hu("/organizations/{organizationId}/orders/{orderNo}/payment-instruments",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Au(Au({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=38,qs(s.toString(),{method:"POST",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 38:return d=e.sent,e.abrupt("return",d);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"removePaymentInstrumentFromOrder",value:(i=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;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 hu("/organizations/{organizationId}/orders/{orderNo}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Au(Au({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=47,qs(s.toString(),{method:"DELETE",headers:c},this.clientConfig,r);case 47:return d=e.sent,e.abrupt("return",d);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"updatePaymentInstrumentForOrder",value:(n=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;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 hu("/organizations/{organizationId}/orders/{orderNo}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Au(Au({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=47,qs(s.toString(),{method:"PATCH",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 47:return d=e.sent,e.abrupt("return",d);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"getPaymentMethodsForOrder",value:(r=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;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 hu("/organizations/{organizationId}/orders/{orderNo}/payment-methods",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Au(Au({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=38,qs(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 38:return d=e.sent,e.abrupt("return",d);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getTaxesFromOrder",value:(t=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;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 hu("/organizations/{organizationId}/orders/{orderNo}/taxes",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Au(Au({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=37,qs(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 37:return d=e.sent,e.abrupt("return",d);case 39:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function Ru(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Bu(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ru(Object(r),!0).forEach((function(t){vi(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ru(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}vi(Uu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/checkout/shopper-orders/{version}");var Lu=function(){function e(t){li(this,e),vi(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,n,i;return gi(e,[{key:"getProducts",value:(i=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;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 hu("/organizations/{organizationId}/products",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Bu(Bu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=44,qs(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 44:return d=e.sent,e.abrupt("return",d);case 46:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"getProduct",value:(n=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;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 hu("/organizations/{organizationId}/products/{id}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Bu(Bu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=44,qs(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 44:return d=e.sent,e.abrupt("return",d);case 46:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"getCategories",value:(r=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;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 hu("/organizations/{organizationId}/categories",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Bu(Bu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=39,qs(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 39:return d=e.sent,e.abrupt("return",d);case 41:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getCategory",value:(t=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;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 hu("/organizations/{organizationId}/categories/{id}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Bu(Bu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=39,qs(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 39:return d=e.sent,e.abrupt("return",d);case 41:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function Nu(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Du(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Nu(Object(r),!0).forEach((function(t){vi(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Nu(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}vi(Lu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/product/shopper-products/{version}");var Wu=function(){function e(t){li(this,e),vi(this,"clientConfig",void 0);var r=Du({},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=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;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 hu("/organizations/{organizationId}/promotions",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Du(Du({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=38,qs(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 38:return d=e.sent,e.abrupt("return",d);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getPromotionsForCampaign",value:(t=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;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 hu("/organizations/{organizationId}/promotions/campaigns/{campaignId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Du(Du({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=40,qs(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 40:return d=e.sent,e.abrupt("return",d);case 42:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();vi(Wu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/pricing/shopper-promotions/{version}");var Fu=TypeError,Gu=function(e,t){if(!delete e[t])throw Fu("Cannot delete property "+K(t)+" of "+K(e))},Hu=L.match(/firefox\/(\d+)/i),Vu=!!Hu&&+Hu[1],$u=/MSIE|Trident/.test(L),Yu=L.match(/AppleWebKit\/(\d+)\./),Ju=!!Yu&&+Yu[1],Ku=[],Qu=C(Ku.sort),Xu=C(Ku.push),Zu=h((function(){Ku.sort(void 0)})),eh=h((function(){Ku.sort(null)})),th=Dn("sort"),rh=!h((function(){if(G)return G<70;if(!(Vu&&Vu>3)){if($u)return!0;if(Ju)return Ju<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++)Ku.push({k:t+n,v:r})}for(Ku.sort((function(e,t){return t.v-e.v})),n=0;n<Ku.length;n++)t=Ku[n].k.charAt(0),i.charAt(i.length-1)!==t&&(i+=t);return"DGBEFHACIJK"!==i}}));function nh(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 ih(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?nh(Object(r),!0).forEach((function(t){vi(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):nh(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}Rt({target:"Array",proto:!0,forced:Zu||!eh||!th||!rh},{sort:function(e){void 0!==e&&X(e);var t=oe(this);if(rh)return void 0===e?Qu(t):Qu(t,e);var r,n,i=[],a=vt(t);for(n=0;n<a;n++)n in t&&Xu(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;)Gu(t,n++);return t}});var ah=function(){function e(t){li(this,e),vi(this,"clientConfig",void 0);var r=ih({},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=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;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 hu("/organizations/{organizationId}/product-search",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ih(ih({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=40,qs(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 40:return d=e.sent,e.abrupt("return",d);case 42:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getSearchSuggestions",value:(t=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;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 hu("/organizations/{organizationId}/search-suggestions",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ih(ih({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=40,qs(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 40:return d=e.sent,e.abrupt("return",d);case 42:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function oh(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 sh(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?oh(Object(r),!0).forEach((function(t){vi(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):oh(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}vi(ah,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/search/shopper-search/{version}/");var ch=function(){function e(t){li(this,e),vi(this,"clientConfig",void 0);var r=sh({},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=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;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 hu("/organizations/{organizationId}/url-mapping",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=sh(sh({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=38,qs(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 38:return d=e.sent,e.abrupt("return",d);case 40:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function dh(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 uh(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?dh(Object(r),!0).forEach((function(t){vi(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):dh(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}vi(ch,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/site/shopper-seo/{version}");var hh=function(){function e(t){li(this,e),vi(this,"clientConfig",void 0);var r=uh({},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=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;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 hu("/organizations/{organizationId}/store-search",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=uh(uh({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=37,qs(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 37:return d=e.sent,e.abrupt("return",d);case 39:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getStores",value:(t=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;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 hu("/organizations/{organizationId}/stores",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=uh(uh({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=38,qs(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 38:return d=e.sent,e.abrupt("return",d);case 40:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();vi(hh,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/store/shopper-stores/{version}");var fh=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;fh(o,0)||(n.lastIndex=0);var s=dc(n,i);return fh(n.lastIndex,o)||(n.lastIndex=o),null===s?-1:s.index}]}));var lh=Mr.map,ph=Sn("map");Rt({target:"Array",proto:!0,forced:!ph},{map:function(e){return lh(this,e,arguments.length>1?arguments[1]:void 0)}});var gh=be("iterator"),vh=!1;try{var bh=0,Ih={next:function(){return{done:!!bh++}},return:function(){vh=!0}};Ih[gh]=function(){return this},Array.from(Ih,(function(){throw 2}))}catch(e){}var mh,kh,yh,xh=function(e,t){if(!t&&!vh)return!1;var r=!1;try{var n={};n[gh]=function(){return{next:function(){return{done:r=!0}}}},e(n)}catch(e){}return r},wh="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView,Ch=Ae.f,Ph=it.enforce,zh=it.get,Oh=u.Int8Array,Eh=Oh&&Oh.prototype,qh=u.Uint8ClampedArray,jh=qh&&qh.prototype,Sh=Oh&&ta(Oh),Th=Eh&&ta(Eh),Mh=Object.prototype,_h=u.TypeError,Ah=be("toStringTag"),Uh=fe("TYPED_ARRAY_TAG"),Rh=wh&&!!ua&&"Opera"!==Vt(u.opera),Bh=!1,Lh={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},Nh={BigInt64Array:8,BigUint64Array:8},Dh=function(e){var t=ta(e);if(A(t)){var r=zh(t);return r&&ce(r,"TypedArrayConstructor")?r.TypedArrayConstructor:Dh(t)}},Wh=function(e){if(!A(e))return!1;var t=Vt(e);return ce(Lh,t)||ce(Nh,t)};for(mh in Lh)(yh=(kh=u[mh])&&kh.prototype)?Ph(yh).TypedArrayConstructor=kh:Rh=!1;for(mh in Nh)(yh=(kh=u[mh])&&kh.prototype)&&(Ph(yh).TypedArrayConstructor=kh);if((!Rh||!_(Sh)||Sh===Function.prototype)&&(Sh=function(){throw _h("Incorrect invocation")},Rh))for(mh in Lh)u[mh]&&ua(u[mh],Sh);if((!Rh||!Th||Th===Mh)&&(Th=Sh.prototype,Rh))for(mh in Lh)u[mh]&&ua(u[mh].prototype,Th);if(Rh&&ta(jh)!==Th&&ua(jh,Th),f&&!ce(Th,Ah))for(mh in Bh=!0,Ch(Th,Ah,{get:function(){return A(this)?this[Uh]:void 0}}),Lh)u[mh]&&Ue(u[mh],Uh,mh);var Fh={NATIVE_ARRAY_BUFFER_VIEWS:Rh,TYPED_ARRAY_TAG:Bh&&Uh,aTypedArray:function(e){if(Wh(e))return e;throw _h("Target is not a typed array")},aTypedArrayConstructor:function(e){if(_(e)&&(!ua||B(Sh,e)))return e;throw _h(K(e)+" is not a typed array constructor")},exportTypedArrayMethod:function(e,t,r,n){if(f){if(r)for(var i in Lh){var a=u[i];if(a&&ce(a.prototype,e))try{delete a.prototype[e]}catch(r){try{a.prototype[e]=t}catch(e){}}}Th[e]&&!r||ot(Th,e,r?t:Rh&&Eh[e]||t,n)}},exportTypedArrayStaticMethod:function(e,t,r){var n,i;if(f){if(ua){if(r)for(n in Lh)if((i=u[n])&&ce(i,e))try{delete i[e]}catch(e){}if(Sh[e]&&!r)return;try{return ot(Sh,e,r?t:Rh&&Sh[e]||t)}catch(e){}}for(n in Lh)!(i=u[n])||i[e]&&!r||ot(i,e,t)}},getTypedArrayConstructor:Dh,isView:function(e){if(!A(e))return!1;var t=Vt(e);return"DataView"===t||ce(Lh,t)||ce(Nh,t)},isTypedArray:Wh,TypedArray:Sh,TypedArrayPrototype:Th},Gh=Fh.NATIVE_ARRAY_BUFFER_VIEWS,Hh=u.ArrayBuffer,Vh=u.Int8Array,$h=!Gh||!h((function(){Vh(1)}))||!h((function(){new Vh(-1)}))||!xh((function(e){new Vh,new Vh(null),new Vh(1.5),new Vh(e)}),!0)||h((function(){return 1!==new Vh(new Hh(2),1,void 0).length})),Yh=RangeError,Jh=function(e){if(void 0===e)return 0;var t=ut(e),r=gt(t);if(t!==r)throw Yh("Wrong length or index");return r},Kh=Array,Qh=Math.abs,Xh=Math.pow,Zh=Math.floor,ef=Math.log,tf=Math.LN2,rf=function(e,t,r){var n,i,a,o=Kh(r),s=8*r-t-1,c=(1<<s)-1,d=c>>1,u=23===t?Xh(2,-24)-Xh(2,-77):0,h=e<0||0===e&&1/e<0?1:0,f=0;for((e=Qh(e))!=e||e===1/0?(i=e!=e?1:0,n=c):(n=Zh(ef(e)/tf),e*(a=Xh(2,-n))<1&&(n--,a*=2),(e+=n+d>=1?u/a:u*Xh(2,1-d))*a>=2&&(n++,a/=2),n+d>=c?(i=0,n=c):n+d>=1?(i=(e*a-1)*Xh(2,t),n+=d):(i=e*Xh(2,d-1)*Xh(2,t),n=0));t>=8;)o[f++]=255&i,i/=256,t-=8;for(n=n<<t|i,s+=t;s>0;)o[f++]=255&n,n/=256,s-=8;return o[--f]|=128*h,o},nf=function(e,t){var r,n=e.length,i=8*n-t-1,a=(1<<i)-1,o=a>>1,s=i-7,c=n-1,d=e[c--],u=127&d;for(d>>=7;s>0;)u=256*u+e[c--],s-=8;for(r=u&(1<<-s)-1,u>>=-s,s+=t;s>0;)r=256*r+e[c--],s-=8;if(0===u)u=1-o;else{if(u===a)return r?NaN:d?-1/0:1/0;r+=Xh(2,t),u-=o}return(d?-1:1)*r*Xh(2,u-t)},af=function(e){for(var t=oe(this),r=vt(t),n=arguments.length,i=lt(n>1?arguments[1]:void 0,r),a=n>2?arguments[2]:void 0,o=void 0===a?r:lt(a,r);o>i;)t[i++]=e;return t},of=Ct.f,sf=Ae.f,cf=Ne.PROPER,df=Ne.CONFIGURABLE,uf=it.get,hf=it.set,ff=u.ArrayBuffer,lf=ff,pf=lf&&lf.prototype,gf=u.DataView,vf=gf&&gf.prototype,bf=Object.prototype,If=u.Array,mf=u.RangeError,kf=C(af),yf=C([].reverse),xf=rf,wf=nf,Cf=function(e){return[255&e]},Pf=function(e){return[255&e,e>>8&255]},zf=function(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]},Of=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},Ef=function(e){return xf(e,23,4)},qf=function(e){return xf(e,52,8)},jf=function(e,t){sf(e.prototype,t,{get:function(){return uf(this)[t]}})},Sf=function(e,t,r,n){var i=Jh(r),a=uf(e);if(i+t>a.byteLength)throw mf("Wrong index");var o=uf(a.buffer).bytes,s=i+a.byteOffset,c=or(o,s,s+t);return n?c:yf(c)},Tf=function(e,t,r,n,i,a){var o=Jh(r),s=uf(e);if(o+t>s.byteLength)throw mf("Wrong index");for(var c=uf(s.buffer).bytes,d=o+s.byteOffset,u=n(+i),h=0;h<t;h++)c[d+h]=u[a?h:t-h-1]};if(wh){var Mf=cf&&"ArrayBuffer"!==ff.name;if(h((function(){ff(1)}))&&h((function(){new ff(-1)}))&&!h((function(){return new ff,new ff(1.5),new ff(NaN),Mf&&!df})))Mf&&df&&Ue(ff,"name","ArrayBuffer");else{(lf=function(e){return Na(this,pf),new ff(Jh(e))}).prototype=pf;for(var _f,Af=of(ff),Uf=0;Af.length>Uf;)(_f=Af[Uf++])in lf||Ue(lf,_f,ff[_f]);pf.constructor=lf}ua&&ta(vf)!==bf&&ua(vf,bf);var Rf=new gf(new lf(2)),Bf=C(vf.setInt8);Rf.setInt8(0,2147483648),Rf.setInt8(1,2147483649),!Rf.getInt8(0)&&Rf.getInt8(1)||Ba(vf,{setInt8:function(e,t){Bf(this,e,t<<24>>24)},setUint8:function(e,t){Bf(this,e,t<<24>>24)}},{unsafe:!0})}else pf=(lf=function(e){Na(this,pf);var t=Jh(e);hf(this,{bytes:kf(If(t),0),byteLength:t}),f||(this.byteLength=t)}).prototype,vf=(gf=function(e,t,r){Na(this,vf),Na(e,pf);var n=uf(e).byteLength,i=ut(t);if(i<0||i>n)throw mf("Wrong offset");if(i+(r=void 0===r?n-i:gt(r))>n)throw mf("Wrong length");hf(this,{buffer:e,byteLength:r,byteOffset:i}),f||(this.buffer=e,this.byteLength=r,this.byteOffset=i)}).prototype,f&&(jf(lf,"byteLength"),jf(gf,"buffer"),jf(gf,"byteLength"),jf(gf,"byteOffset")),Ba(vf,{getInt8:function(e){return Sf(this,1,e)[0]<<24>>24},getUint8:function(e){return Sf(this,1,e)[0]},getInt16:function(e){var t=Sf(this,2,e,arguments.length>1?arguments[1]:void 0);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=Sf(this,2,e,arguments.length>1?arguments[1]:void 0);return t[1]<<8|t[0]},getInt32:function(e){return Of(Sf(this,4,e,arguments.length>1?arguments[1]:void 0))},getUint32:function(e){return Of(Sf(this,4,e,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(e){return wf(Sf(this,4,e,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(e){return wf(Sf(this,8,e,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(e,t){Tf(this,1,e,Cf,t)},setUint8:function(e,t){Tf(this,1,e,Cf,t)},setInt16:function(e,t){Tf(this,2,e,Pf,t,arguments.length>2?arguments[2]:void 0)},setUint16:function(e,t){Tf(this,2,e,Pf,t,arguments.length>2?arguments[2]:void 0)},setInt32:function(e,t){Tf(this,4,e,zf,t,arguments.length>2?arguments[2]:void 0)},setUint32:function(e,t){Tf(this,4,e,zf,t,arguments.length>2?arguments[2]:void 0)},setFloat32:function(e,t){Tf(this,4,e,Ef,t,arguments.length>2?arguments[2]:void 0)},setFloat64:function(e,t){Tf(this,8,e,qf,t,arguments.length>2?arguments[2]:void 0)}});gr(lf,"ArrayBuffer"),gr(gf,"DataView");var Lf={ArrayBuffer:lf,DataView:gf},Nf=Math.floor,Df=Number.isInteger||function(e){return!A(e)&&isFinite(e)&&Nf(e)===e},Wf=RangeError,Ff=RangeError,Gf=function(e,t){var r=function(e){var t=ut(e);if(t<0)throw Wf("The argument can't be less than 0");return t}(e);if(r%t)throw Ff("Wrong offset");return r},Hf=Fh.aTypedArrayConstructor,Vf=function(e){var t,r,n,i,a,o,s=rs(this),c=oe(e),d=arguments.length,u=d>1?arguments[1]:void 0,h=void 0!==u,f=Wa(c);if(f&&!qc(f))for(o=(a=Ga(c,f)).next,c=[];!(i=g(o,a)).done;)c.push(i.value);for(h&&d>2&&(u=br(u,arguments[2])),r=vt(c),n=new(Hf(s))(r),t=0;r>t;t++)n[t]=h?u(c[t],t):c[t];return n},$f=be("species"),Yf=function(e){var t=R(e),r=Ae.f;f&&t&&!t[$f]&&r(t,$f,{configurable:!0,get:function(){return this}})};o((function(e){var t=Ct.f,r=Mr.forEach,n=it.get,i=it.set,a=it.enforce,o=Ae.f,s=Oe.f,c=Math.round,d=u.RangeError,h=Lf.ArrayBuffer,l=h.prototype,p=Lf.DataView,v=Fh.NATIVE_ARRAY_BUFFER_VIEWS,b=Fh.TYPED_ARRAY_TAG,I=Fh.TypedArray,k=Fh.TypedArrayPrototype,y=Fh.aTypedArrayConstructor,x=Fh.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},C=function(e,t){o(e,t,{get:function(){return n(this)[t]}})},P=function(e){var t;return B(l,e)||"ArrayBuffer"==(t=Vt(e))||"SharedArrayBuffer"==t},z=function(e,t){return x(e)&&!Y(t)&&t in e&&Df(+t)&&t>=0},O=function(e,t){return t=ye(t),z(e,t)?m(2,e[t]):s(e,t)},E=function(e,t,r){return t=ye(t),!(z(e,t)&&A(r)&&ce(r,"value"))||ce(r,"get")||ce(r,"set")||r.configurable||ce(r,"writable")&&!r.writable||ce(r,"enumerable")&&!r.enumerable?o(e,t,r):(e[t]=r.value,e)};f?(v||(Oe.f=O,Ae.f=E,C(k,"buffer"),C(k,"byteOffset"),C(k,"byteLength"),C(k,"length")),Rt({target:"Object",stat:!0,forced:!v},{getOwnPropertyDescriptor:O,defineProperty:E}),e.exports=function(e,s,f){var l=e.match(/\d+$/)[0]/8,m=e+(f?"Clamped":"")+"Array",y="get"+e,C="set"+e,z=u[m],O=z,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*l+r.byteOffset,!0)}(this,t)},set:function(e){return function(e,t,r){var i=n(e);f&&(r=(r=c(r))<0?0:r>255?255:255&r),i.view[C](t*l+i.byteOffset,r,!0)}(this,t,e)},enumerable:!0})};v?$h&&(O=s((function(e,t,r,n){return Na(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)?P(t)?void 0!==n?new z(t,Gf(r,l),n):void 0!==r?new z(t,Gf(r,l)):new z(t):x(t)?w(O,t):g(Vf,O,t):new z(Jh(t)),e,O)})),ua&&ua(O,I),r(t(z),(function(e){e in O||Ue(O,e,z[e])})),O.prototype=E):(O=s((function(e,t,r,n){Na(e,E);var a,o,s,c=0,u=0;if(A(t)){if(!P(t))return x(t)?w(O,t):g(Vf,O,t);a=t,u=Gf(r,l);var f=t.byteLength;if(void 0===n){if(f%l)throw d("Wrong length");if((o=f-u)<0)throw d("Wrong length")}else if((o=gt(n)*l)+u>f)throw d("Wrong length");s=o/l}else s=Jh(t),a=new h(o=s*l);for(i(e,{buffer:a,byteOffset:u,byteLength:o,length:s,view:new p(a)});c<s;)j(e,c++)})),ua&&ua(O,I),E=O.prototype=rr(k)),E.constructor!==O&&Ue(E,"constructor",O),a(E).TypedArrayConstructor=O,b&&Ue(E,b,m);var S=O!=z;q[m]=O,Rt({global:!0,constructor:!0,forced:S,sham:!v},q),"BYTES_PER_ELEMENT"in O||Ue(O,"BYTES_PER_ELEMENT",l),"BYTES_PER_ELEMENT"in E||Ue(E,"BYTES_PER_ELEMENT",l),Yf(m)}):e.exports=function(){}}))("Uint8",(function(e){return function(t,r,n){return e(this,t,r,n)}}));var Jf=Math.min,Kf=C([].copyWithin||function(e,t){var r=oe(this),n=vt(r),i=lt(e,n),a=lt(t,n),o=arguments.length>2?arguments[2]:void 0,s=Jf((void 0===o?n:lt(o,n))-a,n-i),c=1;for(a<i&&i<a+s&&(c=-1,a+=s-1,i+=s-1);s-- >0;)a in r?r[i]=r[a]:Gu(r,i),i+=c,a+=c;return r}),Qf=Fh.aTypedArray;(0,Fh.exportTypedArrayMethod)("copyWithin",(function(e,t){return Kf(Qf(this),e,t,arguments.length>2?arguments[2]:void 0)}));var Xf=Mr.every,Zf=Fh.aTypedArray;(0,Fh.exportTypedArrayMethod)("every",(function(e){return Xf(Zf(this),e,arguments.length>1?arguments[1]:void 0)}));var el=TypeError,tl=function(e){var t=ke(e,"number");if("number"==typeof t)throw el("Can't convert number to bigint");return BigInt(t)},rl=Fh.aTypedArray,nl=Fh.exportTypedArrayMethod,il=C("".slice);nl("fill",(function(e){var t=arguments.length;rl(this);var r="Big"===il(Vt(this),0,3)?tl(e):+e;return g(af,this,r,t>1?arguments[1]:void 0,t>2?arguments[2]:void 0)}),h((function(){var e=0;return new Int8Array(2).fill({valueOf:function(){return e++}}),1!==e})));var al=be("species"),ol=function(e,t){var r,n=Se(e).constructor;return void 0===n||null==(r=Se(n)[al])?t:rs(r)},sl=Fh.aTypedArrayConstructor,cl=Fh.getTypedArrayConstructor,dl=function(e){return sl(ol(e,cl(e)))},ul=function(e,t){return function(e,t){for(var r=0,n=vt(t),i=new e(n);n>r;)i[r]=t[r++];return i}(dl(e),t)},hl=Mr.filter,fl=Fh.aTypedArray;(0,Fh.exportTypedArrayMethod)("filter",(function(e){var t=hl(fl(this),e,arguments.length>1?arguments[1]:void 0);return ul(this,t)}));var ll=Mr.find,pl=Fh.aTypedArray;(0,Fh.exportTypedArrayMethod)("find",(function(e){return ll(pl(this),e,arguments.length>1?arguments[1]:void 0)}));var gl=Mr.findIndex,vl=Fh.aTypedArray;(0,Fh.exportTypedArrayMethod)("findIndex",(function(e){return gl(vl(this),e,arguments.length>1?arguments[1]:void 0)}));var bl=Mr.forEach,Il=Fh.aTypedArray;(0,Fh.exportTypedArrayMethod)("forEach",(function(e){bl(Il(this),e,arguments.length>1?arguments[1]:void 0)}));var ml=It.includes,kl=Fh.aTypedArray;(0,Fh.exportTypedArrayMethod)("includes",(function(e){return ml(kl(this),e,arguments.length>1?arguments[1]:void 0)}));var yl=It.indexOf,xl=Fh.aTypedArray;(0,Fh.exportTypedArrayMethod)("indexOf",(function(e){return yl(xl(this),e,arguments.length>1?arguments[1]:void 0)}));var wl=be("iterator"),Cl=u.Uint8Array,Pl=C(ya.values),zl=C(ya.keys),Ol=C(ya.entries),El=Fh.aTypedArray,ql=Fh.exportTypedArrayMethod,jl=Cl&&Cl.prototype,Sl=!h((function(){jl[wl].call([1])})),Tl=!!jl&&jl.values&&jl[wl]===jl.values&&"values"===jl.values.name,Ml=function(){return Pl(El(this))};ql("entries",(function(){return Ol(El(this))}),Sl),ql("keys",(function(){return zl(El(this))}),Sl),ql("values",Ml,Sl||!Tl,{name:"values"}),ql(wl,Ml,Sl||!Tl,{name:"values"});var _l=Fh.aTypedArray,Al=Fh.exportTypedArrayMethod,Ul=C([].join);Al("join",(function(e){return Ul(_l(this),e)}));var Rl=Math.min,Bl=[].lastIndexOf,Ll=!!Bl&&1/[1].lastIndexOf(1,-0)<0,Nl=Dn("lastIndexOf"),Dl=Ll||!Nl?function(e){if(Ll)return pn(Bl,this,arguments)||0;var t=M(this),r=vt(t),n=r-1;for(arguments.length>1&&(n=Rl(n,ut(arguments[1]))),n<0&&(n=r+n);n>=0;n--)if(n in t&&t[n]===e)return n||0;return-1}:Bl,Wl=Fh.aTypedArray;(0,Fh.exportTypedArrayMethod)("lastIndexOf",(function(e){var t=arguments.length;return pn(Dl,Wl(this),t>1?[e,arguments[1]]:[e])}));var Fl=Mr.map,Gl=Fh.aTypedArray;(0,Fh.exportTypedArrayMethod)("map",(function(e){return Fl(Gl(this),e,arguments.length>1?arguments[1]:void 0,(function(e,t){return new(dl(e))(t)}))}));var Hl=TypeError,Vl=function(e){return function(t,r,n,i){X(r);var a=oe(t),o=j(a),s=vt(a),c=e?s-1:0,d=e?-1:1;if(n<2)for(;;){if(c in o){i=o[c],c+=d;break}if(c+=d,e?c<0:s<=c)throw Hl("Reduce of empty array with no initial value")}for(;e?c>=0:s>c;c+=d)c in o&&(i=r(i,o[c],c,a));return i}},$l={left:Vl(!1),right:Vl(!0)},Yl=$l.left,Jl=Fh.aTypedArray;(0,Fh.exportTypedArrayMethod)("reduce",(function(e){var t=arguments.length;return Yl(Jl(this),e,t,t>1?arguments[1]:void 0)}));var Kl=$l.right,Ql=Fh.aTypedArray;(0,Fh.exportTypedArrayMethod)("reduceRight",(function(e){var t=arguments.length;return Kl(Ql(this),e,t,t>1?arguments[1]:void 0)}));var Xl=Fh.aTypedArray,Zl=Fh.exportTypedArrayMethod,ep=Math.floor;Zl("reverse",(function(){for(var e,t=Xl(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=Fh.aTypedArray,op=Fh.exportTypedArrayMethod,sp=!h((function(){var e=new Uint8ClampedArray(2);return g(ip,e,{length:1,0:3},1),3!==e[1]})),cp=sp&&Fh.NATIVE_ARRAY_BUFFER_VIEWS&&h((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=Gf(arguments.length>1?arguments[1]:void 0,1),r=oe(e);if(sp)return g(ip,this,r,t);var n=this.length,i=vt(r),a=0;if(i+t>n)throw tp("Wrong length");for(;a<i;)this[t+a]=r[a++]}),!sp||cp);var dp=Fh.aTypedArray;(0,Fh.exportTypedArrayMethod)("slice",(function(e,t){for(var r=gn(dp(this),e,t),n=dl(this),i=0,a=r.length,o=new n(a);a>i;)o[i]=r[i++];return o}),h((function(){new Int8Array(1).slice()})));var up=Mr.some,hp=Fh.aTypedArray;(0,Fh.exportTypedArrayMethod)("some",(function(e){return up(hp(this),e,arguments.length>1?arguments[1]:void 0)}));var fp=Fh.aTypedArray,lp=Fh.exportTypedArrayMethod,pp=u.Uint16Array,gp=pp&&C(pp.prototype.sort),vp=!(!gp||h((function(){gp(new pp(2),null)}))&&h((function(){gp(new pp(2),{})}))),bp=!!gp&&!h((function(){if(G)return G<74;if(Vu)return Vu<67;if($u)return!0;if(Ju)return Ju<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}));lp("sort",(function(e){return void 0!==e&&X(e),bp?gp(this,e):Qa(fp(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))}),!bp||vp);var Ip=u.Int8Array,mp=Fh.aTypedArray,kp=Fh.exportTypedArrayMethod,yp=[].toLocaleString,xp=!!Ip&&h((function(){yp.call(new Ip(1))}));kp("toLocaleString",(function(){return pn(yp,xp?gn(mp(this)):mp(this),gn(arguments))}),h((function(){return[1,2].toLocaleString()!=new Ip([1,2]).toLocaleString()}))||!h((function(){Ip.prototype.toLocaleString.call([1,2])})));var wp=Fh.exportTypedArrayMethod,Cp=u.Uint8Array,Pp=Cp&&Cp.prototype||{},zp=[].toString,Op=C([].join);h((function(){zp.call({})}))&&(zp=function(){return Op(this)});var Ep=Pp.toString!=zp;wp("toString",zp,Ep);var qp,jp,Sp,Tp,Mp="process"==O(u.process),_p=/(?:ipad|iphone|ipod).*applewebkit/i.test(L),Ap=u.setImmediate,Up=u.clearImmediate,Rp=u.process,Bp=u.Dispatch,Lp=u.Function,Np=u.MessageChannel,Dp=u.String,Wp=0,Fp={};try{qp=u.location}catch(e){}var Gp=function(e){if(ce(Fp,e)){var t=Fp[e];delete Fp[e],t()}},Hp=function(e){return function(){Gp(e)}},Vp=function(e){Gp(e.data)},$p=function(e){u.postMessage(Dp(e),qp.protocol+"//"+qp.host)};Ap&&Up||(Ap=function(e){Va(arguments.length,1);var t=_(e)?e:Lp(e),r=gn(arguments,1);return Fp[++Wp]=function(){pn(t,void 0,r)},jp(Wp),Wp},Up=function(e){delete Fp[e]},Mp?jp=function(e){Rp.nextTick(Hp(e))}:Bp&&Bp.now?jp=function(e){Bp.now(Hp(e))}:Np&&!_p?(Tp=(Sp=new Np).port2,Sp.port1.onmessage=Vp,jp=br(Tp.postMessage,Tp)):u.addEventListener&&_(u.postMessage)&&!u.importScripts&&qp&&"file:"!==qp.protocol&&!h($p)?(jp=$p,u.addEventListener("message",Vp,!1)):jp="onreadystatechange"in Ce("script")?function(e){Kt.appendChild(Ce("script")).onreadystatechange=function(){Kt.removeChild(this),Gp(e)}}:function(e){setTimeout(Hp(e),0)});var Yp,Jp,Kp,Qp,Xp,Zp,eg,tg,rg={set:Ap,clear:Up},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,cg=u.document,dg=u.process,ug=u.Promise,hg=ag(u,"queueMicrotask"),fg=hg&&hg.value;fg||(Yp=function(){var e,t;for(Mp&&(e=dg.domain)&&e.exit();Jp;){t=Jp.fn,Jp=Jp.next;try{t()}catch(e){throw Jp?Qp():Kp=void 0,e}}Kp=void 0,e&&e.enter()},_p||Mp||ig||!sg||!cg?!ng&&ug&&ug.resolve?((eg=ug.resolve(void 0)).constructor=ug,tg=br(eg.then,eg),Qp=function(){tg(Yp)}):Mp?Qp=function(){dg.nextTick(Yp)}:(og=br(og,u),Qp=function(){og(Yp)}):(Xp=!0,Zp=cg.createTextNode(""),new sg(Yp).observe(Zp,{characterData:!0}),Qp=function(){Zp.data=Xp=!Xp}));var lg=fg||function(e){var t={fn:e,next:void 0};Kp&&(Kp.next=t),Jp||(Jp=t,Qp()),Kp=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 vg=gg,bg=u.Promise,Ig="object"==typeof window&&"object"!=typeof Deno;bg&&bg.prototype;var mg,kg,yg,xg=be("species"),wg=!1,Cg=_(u.PromiseRejectionEvent),Pg={CONSTRUCTOR:At("Promise",(function(){var e=He(bg),t=e!==String(bg);if(!t&&66===G)return!0;if(G>=51&&/native code/.test(e))return!1;var r=new bg((function(e){e(1)})),n=function(e){e((function(){}),(function(){}))};return(r.constructor={})[xg]=n,!(wg=r.then((function(){}))instanceof n)||!t&&Ig&&!Cg})),REJECTION_EVENT:Cg,SUBCLASSING:wg},zg=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 zg(e)}},Eg=rg.set,qg=Pg.CONSTRUCTOR,jg=Pg.REJECTION_EVENT,Sg=Pg.SUBCLASSING,Tg=it.getterFor("Promise"),Mg=it.set,_g=bg&&bg.prototype,Ag=bg,Ug=_g,Rg=u.TypeError,Bg=u.document,Lg=u.process,Ng=Og.f,Dg=Ng,Wg=!!(Bg&&Bg.createEvent&&u.dispatchEvent),Fg=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,c=e.resolve,d=e.reject,u=e.domain;try{s?(o||(2===t.rejection&&Jg(t),t.rejection=1),!0===s?r=a:(u&&u.enter(),r=s(a),u&&(u.exit(),i=!0)),r===e.promise?d(Rg("Promise-chain cycle")):(n=Fg(r))?g(n,r,c,d):c(r)):d(a)}catch(e){u&&!i&&u.exit(),d(e)}},Hg=function(e,t){e.notified||(e.notified=!0,lg((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},Jg=function(e){g(Eg,u,(function(){var t=e.facade;Mp?Lg.emit("rejectionHandled",t):Vg("rejectionhandled",t,e.value)}))},Kg=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 Rg("Promise can't be resolved itself");var n=Fg(t);n?lg((function(){var r={done:!1};try{g(n,t,Kg(Xg,r,e),Kg(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&&(Ug=(Ag=function(e){Na(this,Ug),X(e),g(mg,this);var t=Tg(this);try{e(Kg(Xg,t),Kg(Qg,t))}catch(e){Qg(t,e)}}).prototype,(mg=function(e){Mg(this,{type:"Promise",done:!1,notified:!1,parent:!1,reactions:new vg,rejection:!1,state:0,value:void 0})}).prototype=ot(Ug,"then",(function(e,t){var r=Tg(this),n=Ng(ol(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):lg((function(){Gg(n,r)})),n.promise})),kg=function(){var e=new mg,t=Tg(e);this.promise=e,this.resolve=Kg(Xg,t),this.reject=Kg(Qg,t)},Og.f=Ng=function(e){return e===Ag||void 0===e?new kg(e):Dg(e)},_(bg)&&_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,Ug)}Rt({global:!0,constructor:!0,wrap:!0,forced:qg},{Promise:Ag}),gr(Ag,"Promise",!1),Yf("Promise");var Zg=TypeError,ev=function(e,t){this.stopped=e,this.result=t},tv=ev.prototype,rv=function(e,t,r){var n,i,a,o,s,c,d,u=r&&r.that,h=!(!r||!r.AS_ENTRIES),f=!(!r||!r.IS_RECORD),l=!(!r||!r.IS_ITERATOR),p=!(!r||!r.INTERRUPTED),v=br(t,u),b=function(e){return n&&Pc(n,"normal",e),new ev(!0,e)},I=function(e){return h?(Se(e),p?v(e[0],e[1],b):v(e[0],e[1])):p?v(e,b):v(e)};if(f)n=e.iterator;else if(l)n=e;else{if(!(i=Wa(e)))throw Zg(K(e)+" is not iterable");if(qc(i)){for(a=0,o=vt(e);o>a;a++)if((s=I(e[a]))&&B(tv,s))return s;return new ev(!1)}n=Ga(e,i)}for(c=f?e.next:n.next;!(d=g(c,n)).done;){try{s=I(d.value)}catch(e){Pc(n,"throw",e)}if("object"==typeof s&&s&&B(tv,s))return s}return new ev(!1)},nv=Pg.CONSTRUCTOR||!xh((function(e){bg.all(e).then(void 0,(function(){}))}));Rt({target:"Promise",stat:!0,forced:nv},{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;rv(e,(function(e){var c=o++,d=!1;s++,g(r,t,e).then((function(e){d||(d=!0,a[c]=e,--s||n(a))}),i)})),--s||n(a)}));return a.error&&i(a.value),r.promise}});var iv=Pg.CONSTRUCTOR,av=bg&&bg.prototype;if(Rt({target:"Promise",proto:!0,forced:iv,real:!0},{catch:function(e){return this.then(void 0,e)}}),_(bg)){var ov=R("Promise").prototype.catch;av.catch!==ov&&ot(av,"catch",ov,{unsafe:!0})}Rt({target:"Promise",stat:!0,forced:nv},{race:function(e){var t=this,r=Og.f(t),n=r.reject,i=pg((function(){var i=X(t.resolve);rv(e,(function(e){g(i,t,e).then(r.resolve,n)}))}));return i.error&&n(i.value),r.promise}}),Rt({target:"Promise",stat:!0,forced:Pg.CONSTRUCTOR},{reject:function(e){var t=Og.f(this);return g(t.reject,void 0,e),t.promise}});var sv=Pg.CONSTRUCTOR;function cv(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 dv(e){return function(e){if(Array.isArray(e))return cv(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 cv(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)?cv(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 uv(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 hv(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?uv(Object(r),!0).forEach((function(t){vi(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):uv(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}R("Promise"),Rt({target:"Promise",stat:!0,forced:sv},{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)}}),Rt({target:"Object",stat:!0},{fromEntries:function(e){var t={};return rv(e,(function(e,r){nr(t,e,r)}),{AS_ENTRIES:!0}),t}});var fv=Go?btoa:function(e){return Buffer.from(e).toString("base64")},lv=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}},pv=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},gv=function(){var e=fi(Wi.mark((function e(t){var r,n,i,a,o,s,c;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,dv(new Uint8Array(o)))),n=r(s),e.next=16;break;case 12:return e.next=14,import("crypto");case 14:c=e.sent,n=r(c.default.createHash("sha256").update(t).digest("base64"));case 16:if(0!==n.length){e.next=18;break}throw new Error("Problem generating code challenge");case 18:return e.abrupt("return",n);case 19:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();function vv(e,t,r){return bv.apply(this,arguments)}function bv(){return(bv=fi(Wi.mark((function e(t,r,n){var i,a,o,s,c,d,u,h;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,gv(r);case 2:return a=e.sent,(o=new Mu(t.clientConfig)).clientConfig.fetchOptions=hv(hv({},t.clientConfig.fetchOptions),{},{redirect:Go?"follow":"manual"}),s={parameters:hv(hv({client_id:t.clientConfig.parameters.clientId,channel_id:t.clientConfig.parameters.siteId,code_challenge:a},n.hint&&{hint:n.hint}),{},{organizationId:t.clientConfig.parameters.organizationId,redirect_uri:n.redirectURI,response_type:"code"},n.usid&&{usid:n.usid})},e.next=8,o.authorizeCustomer(s,!0);case 8:if(c=e.sent,d=(null===(i=c.headers)||void 0===i?void 0:i.get("location"))||c.url,u=new URL(d),h=Object.fromEntries(u.searchParams.entries()),!(c.status>=400||h.error)){e.next=14;break}throw new Cs(c);case 14:return e.abrupt("return",hv({url:d},lv(d)));case 15:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Iv(){return(Iv=fi(Wi.mark((function e(t,r,n){var i,a;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i="Basic ".concat(fv("".concat(t.clientConfig.parameters.clientId,":").concat(n.clientSecret))),a={headers:{Authorization:i},body:hv({grant_type:"client_credentials"},r.usid&&{usid:r.usid})},e.abrupt("return",t.getAccessToken(a));case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function mv(){return(mv=fi(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=pv(),e.next=3,vv(t,n,hv({redirectURI:r.redirectURI,hint:"guest"},r.usid&&{usid:r.usid}));case 3:return i=e.sent,a={client_id:t.clientConfig.parameters.clientId,channel_id:t.clientConfig.parameters.siteId,code:i.code,code_verifier:n,grant_type:"authorization_code_pkce",redirect_uri:r.redirectURI,usid:i.usid},e.abrupt("return",t.getAccessToken({body:a}));case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function kv(){return(kv=fi(Wi.mark((function e(t,r,n){var i,a,o,s,c,d,u,h,f,l,p,g,v,b;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=pv(),e.next=3,gv(a);case 3:return o=e.sent,(s=new Mu(t.clientConfig)).clientConfig.fetchOptions=hv(hv({},t.clientConfig.fetchOptions),{},{redirect:Go?"follow":"manual"}),c="Basic ".concat(fv("".concat(r.username,":").concat(r.password))),d={headers:{Authorization:c},parameters:{organizationId:t.clientConfig.parameters.organizationId},body:hv({redirect_uri:n.redirectURI,client_id:t.clientConfig.parameters.clientId,code_challenge:o,channel_id:t.clientConfig.parameters.siteId},n.usid&&{usid:n.usid})},e.next=10,s.authenticateCustomer(d,!0);case 10:if(u=e.sent,h=(null===(i=u.headers)||void 0===i?void 0:i.get("location"))||u.url,f=new URL(h),l=Object.fromEntries(f.searchParams.entries()),!(u.status>=400||l.error)){e.next=16;break}throw new Cs(u);case 16:if(p=lv(h),g={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},!r.clientSecret){e.next=22;break}return v="Basic ".concat(fv("".concat(t.clientConfig.parameters.clientId,":").concat(r.clientSecret))),b={headers:{Authorization:v},body:g},e.abrupt("return",t.getAccessToken(b));case 22:return e.abrupt("return",t.getAccessToken({body:g}));case 23:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var yv=Mr.find,xv=!0;"find"in[]&&Array(1).find((function(){xv=!1})),Rt({target:"Array",proto:!0,forced:xv},{find:function(e){return yv(this,e,arguments.length>1?arguments[1]:void 0)}}),Ji("find");function wv(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 Cv(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?wv(Object(r),!0).forEach((function(t){vi(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):wv(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Pv=function(e){var t=!1;return e&&(t=Boolean(Object.keys(e).find((function(e){return"content-type"===e.toLowerCase()})))),t},zv=function(){var e=fi(Wi.mark((function e(t){var r,n,i,a,o,s,c,d,u,h,f,l;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"],c=Cv(Cv({},a.parameters),null==i?void 0:i.customApiPathParameters),s.forEach((function(e){if(!c[e])throw new Error("Missing required property needed in options.customApiPathParameters or clientConfig.parameters: ".concat(e))})),c.apiVersion||(c.apiVersion="v1"),d=a,a.baseUri||(d=Cv(Cv({},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)),h=Pv(i.headers)||Pv(d.headers),f=i,h&&!u||(f=Cv(Cv({},i),{},{headers:Cv(Cv({},i.headers),!h&&{"Content-Type":"application/json"}),parameters:Cv(Cv({},i.parameters),u&&{siteId:a.parameters.siteId})})),l=new hu("/organizations/{organizationId}/{endpointPath}",d.baseUri,{pathParams:c,queryParams:f.parameters,origin:d.proxy}),e.abrupt("return",qs(l.toString(),f,d,o));case 13:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),Ov=Object.freeze({__proto__:null,isBrowser:Go,isNode:Ho,globalObject:Vo,hasFetchAvailable:$o,fetch:Yo,stringToBase64:fv,getCodeAndUsidFromUrl:lv,createCodeVerifier:pv,generateCodeChallenge:gv,authorize:vv,loginGuestUserPrivate:function(e,t,r){return Iv.apply(this,arguments)},loginGuestUser:function(e,t){return mv.apply(this,arguments)},loginRegisteredUserB2C:function(e,t,r){return kv.apply(this,arguments)},refreshAccessToken:function(e,t,r){var n={grant_type:"refresh_token",refresh_token:t.refreshToken,client_id:e.clientConfig.parameters.clientId,channel_id:e.clientConfig.parameters.siteId};if(r&&r.clientSecret){var i={headers:{Authorization:"Basic ".concat(fv("".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:zv,doFetch:qs});e.ClientConfig=Wo,e.ShopperBaskets=gu,e.ShopperContexts=Iu,e.ShopperCustomers=yu,e.ShopperDiscoverySearch=Cu,e.ShopperExperience=Ou,e.ShopperGiftCertificates=ju,e.ShopperLogin=Mu,e.ShopperOrders=Uu,e.ShopperProducts=Lu,e.ShopperPromotions=Wu,e.ShopperSearch=ah,e.ShopperSeo=ch,e.ShopperStores=hh,e.TemplateURL=hu,e.helpers=Ov,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")(),h=function(e){try{return!!e()}catch(e){return!0}},l=!h((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),f=!h((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,v=Object.getOwnPropertyDescriptor,m={f:v&&!I.call({1:2},1)?function(e){var t=v(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=h((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")||"",N=u.process,F=u.Deno,D=N&&N.versions||F&&F.version,W=D&&D.v8;W&&(d=(s=W.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&&!h((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(),he=z(1..toString),le=function(e){return"Symbol("+(void 0===e?"":e)+")_"+he(++ce+ue,36)},fe=ie("wks"),pe=u.Symbol,ge=pe&&pe.for,Ie=V?pe:pe&&pe.withoutSetter||le,ve=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]},me=TypeError,be=ve("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 me("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=!l&&!h((function(){return 7!=Object.defineProperty(ze("div"),"a",{get:function(){return 7}}).a})),Pe=Object.getOwnPropertyDescriptor,Oe={f:l?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(m.f,e,t),e[t])}},Ee=l&&h((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:l?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=l?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=l&&Object.getOwnPropertyDescriptor,Le=de(Ue,"name"),Ne={EXISTS:Le,PROPER:Le&&"something"===function(){}.name,CONFIGURABLE:Le&&(!l||l&&Be(Ue,"name").configurable)},Fe=z(Function.toString);_(ne.inspectSource)||(ne.inspectSource=function(e){return Fe(e)});var De,We,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]=le(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);De=function(e,t){if(tt(Ze,e))throw new Qe("Object already initialized");return t.facade=e,rt(Ze,e,t),t},We=function(e){return et(Ze,e)||{}},Ge=function(e){return tt(Ze,e)}}else{var nt=Ke("state");Je[nt]=!0,De=function(e,t){if(de(e,nt))throw new Qe("Object already initialized");return t.facade=e,Re(e,nt,t),t},We=function(e){return de(e,nt)?e[nt]:{}},Ge=function(e){return de(e,nt)}}var it={set:De,get:We,has:Ge,enforce:function(e){return Ge(e)?We(e):De(e,{})},getterFor:function(e){return function(t){var r;if(!A(t)||(r=We(t)).type!==e)throw Qe("Incompatible receiver, "+e+" required");return r}}},at=o((function(e){var t=Ne.CONFIGURABLE,r=it.enforce,n=it.get,i=Object.defineProperty,a=l&&!h((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)&&(l?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?l&&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)},ht=Math.max,lt=Math.min,ft=function(e,t){var r=ut(e);return r<0?ht(r+t,0):lt(r,t)},pt=Math.min,gt=function(e){return e>0?pt(ut(e),9007199254740991):0},It=function(e){return gt(e.length)},vt=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}},mt={includes:vt(!0),indexOf:vt(!1)},bt=mt.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)?h(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=h((function(){Bt(1)}));Ut({target:"Object",stat:!0,forced:Lt},{keys:function(e){return Bt(oe(e))}});var Nt={};Nt[ve("toStringTag")]="z";var Ft,Dt="[object z]"===String(Nt),Wt=ve("toStringTag"),Gt=Object,Ht="Arguments"==O(function(){return arguments}()),Vt=Dt?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),Wt))?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:l&&!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{Ft=new ActiveXObject("htmlfile")}catch(e){}var e,t;tr="undefined"!=typeof document?document.domain&&Ft?er(Ft):((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(Ft);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:ve},hr=u,lr=Ae.f,fr=Ae.f,pr=ve("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),vr=function(e,t){return X(e),void 0===t?e:f?Ir(e,t):function(){return e.apply(t,arguments)}},mr=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||h((function(){var e;return Cr(Cr.call)||!Cr(Object)||!Cr((function(){e=!0}))||e}))?Pr:Cr,Er=ve("species"),qr=Array,jr=function(e,t){return new(function(e){var t;return mr(e)&&(t=e.constructor,(Or(t)&&(t===qr||mr(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,h){for(var l,f,p=oe(d),g=j(p),I=vr(c,u),v=It(g),m=0,b=h||jr,k=t?b(d,v):r||o?b(d,0):void 0;v>m;m++)if((s||m in g)&&(f=I(l=g[m],m,p),e))if(t)k[m]=f;else if(f)switch(e){case 3:return!0;case 5:return l;case 6:return m;case 2:Sr(k,l)}else switch(e){case 4:return!1;case 7:Sr(k,l)}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,Nr=Lr&&Lr.prototype,Fr=u.TypeError,Dr=u.QObject,Wr=Oe.f,Gr=Ae.f,Hr=cr.f,Vr=m.f,$r=z([].push),Yr=ie("symbols"),Kr=ie("op-symbols"),Jr=ie("wks"),Qr=!Dr||!Dr.prototype||!Dr.prototype.findChild,Xr=l&&h((function(){return 7!=rr(Gr({},"a",{get:function(){return Gr(this,"a",{value:7}).a}})).a}))?function(e,t,r){var n=Wr(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(Nr);return Rr(r,{type:"Symbol",tag:e,description:t}),l||(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){l&&!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=Wr(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||(Nr=(Lr=function(){if(B(Nr,this))throw Fr("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?Yt(arguments[0]):void 0,t=le(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 l&&Qr&&Xr(Br,t,{configurable:!0,set:r}),Zr(t,e)}).prototype,ot(Nr,"toString",(function(){return Ur(this).tag})),ot(Lr,"withoutSetter",(function(e){return Zr(le(e),e)})),m.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(ve(e),e)},l&&(Gr(Nr,"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=hr.Symbol||(hr.Symbol={});de(t,e)||lr(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:!l},{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=ve("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 hn=Function.prototype,ln=hn.apply,fn=hn.call,pn="object"==typeof Reflect&&Reflect.apply||(f?fn.bind(ln):function(){return fn.apply(ln,arguments)}),gn=z([].slice),In=U("JSON","stringify"),vn=z(/./.exec),mn=z("".charAt),bn=z("".charCodeAt),kn=z("".replace),yn=z(1..toString),xn=/[\uD800-\uDFFF]/g,wn=/^[\uD800-\uDBFF]$/,zn=/^[\uDC00-\uDFFF]$/,Cn=!H||h((function(){var e=U("Symbol")();return"[null]"!=In([e])||"{}"!=In({a:e})||"{}"!=In(Object(e))})),Pn=h((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 mr(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=mn(r,t-1),i=mn(r,t+1);return vn(wn,e)&&!vn(zn,i)||vn(zn,e)&&!vn(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||h((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=ve("species"),Sn=function(e){return G>=51||!h((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=Dt?{}.toString:function(){return"[object "+Vt(this)+"]"};Dt||ot(Object.prototype,"toString",_n,{unsafe:!0});var An=Oe.f,Rn=h((function(){An(1)}));Ut({target:"Object",stat:!0,forced:!l||Rn,sham:!l},{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,Nn=Ln===Object.prototype?void 0:Ln,Fn=function(e,t){var r=[][e];return!!r&&h((function(){r.call(null,t||function(){return 1},1)}))},Dn=Mr.forEach,Wn=Fn("forEach")?[].forEach:function(e){return Dn(this,e,arguments.length>1?arguments[1]:void 0)},Gn=function(e){if(e&&e.forEach!==Wn)try{Re(e,"forEach",Wn)}catch(t){e.forEach=Wn}};for(var Hn in Un)Un[Hn]&&Gn(u[Hn]&&u[Hn].prototype);Gn(Nn),Ut({target:"Object",stat:!0,sham:!l},{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:!l},{defineProperties:Vn});var $n=Ae.f;Ut({target:"Object",stat:!0,forced:Object.defineProperty!==$n,sham:!l},{defineProperty:$n});var Yn,Kn=ve("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=ve("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=Ne.PROPER,di=RegExp.prototype.toString,ci=h((function(){return"/a/b"!=di.call({source:"a",flags:"b"})})),ui=si&&"toString"!=di.name;function hi(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 li(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var a=e.apply(t,r);function o(e){hi(a,n,i,o,s,"next",e)}function s(e){hi(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 vi=Object.prototype,mi=vi.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 Fi()}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(Ni([])));Si&&Si!==vi&&mi.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&&mi.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 Ni(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(mi.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:Fi}}function Fi(){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)&&mi.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=mi.call(i,"catchLoc"),s=mi.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&&mi.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:Ni(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),Ci}};var Di={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:Ni},Wi=Ae.f,Gi=ve("unscopables"),Hi=Array.prototype;null==Hi[Gi]&&Wi(Hi,Gi,{configurable:!0,value:rr(null)});var Vi,$i,Yi,Ki=function(e){Hi[Gi][e]=!0},Ji={},Qi=!h((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=ve("iterator"),na=!1;[].keys&&("next"in(Yi=[].keys())?($i=ta(ta(Yi)))!==Object.prototype&&(Vi=$i):na=!0),(null==Vi||h((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),ha=Ne.PROPER,la=Ne.CONFIGURABLE,fa=ia.IteratorPrototype,pa=ia.BUGGY_SAFARI_ITERATORS,ga=ve("iterator"),Ia=function(){return this},va=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)}},h=t+" Iterator",l=!1,f=e.prototype,p=f[ga]||f["@@iterator"]||i&&f[i],I=!pa&&p||u(i),v="Array"==t&&f.entries||p;if(v&&(s=ta(v.call(new e)))!==Object.prototype&&s.next&&(ta(s)!==fa&&(ua?ua(s,fa):_(s[ga])||ot(s,ga,Ia)),gr(s,h,!0)),ha&&"values"==i&&p&&"values"!==p.name&&(la?Re(f,"name","values"):(l=!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||l||!(c in f))&&ot(f,c,d[c]);else Ut({target:t,proto:!0,forced:pa||l},d);return f[ga]!==I&&ot(f,ga,I,{name:i}),Ji[t]=I,d},ma=Ae.f,ba=it.set,ka=it.getterFor("Array Iterator"),ya=va(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"),l&&"values"!==xa.name)try{ma(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");va(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=ve("iterator"),Ta=ve("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(Nn,"DOMTokenList");var Ra=ve("iterator"),Ua=!h((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,Na=function(e,t){if(B(t,e))return e;throw La("Incorrect invocation")},Fa=ve("iterator"),Da=function(e){if(null!=e)return Z(e,Fa)||Z(e,"@@iterator")||Ji[Vt(e)]},Wa=TypeError,Ga=function(e,t){var r=arguments.length<2?Da(e):t;if(X(r))return Se(g(r,e));throw Wa(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=ve("iterator"),Za=it.set,eo=it.getterFor("URLSearchParams"),to=it.getterFor("URLSearchParamsIterator"),ro=Object.getOwnPropertyDescriptor,no=function(e){if(!l)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,ho=u.TypeError,lo=u.decodeURIComponent,fo=u.encodeURIComponent,po=z("".charAt),go=z([].join),Io=z([].push),vo=z("".replace),mo=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 lo(e)}catch(t){return e}},Po=function(e){var t=vo(e,xo," "),r=4;try{return lo(t)}catch(e){for(;r;)t=vo(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 vo(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=Da(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 ho("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(mo(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(){Na(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=vr(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 Na(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 No(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 Fo(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?No(Object(r),!0).forEach((function(t){Ii(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):No(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Do=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=Fo({},t.headers),this.parameters=Fo({},t.parameters),!this.parameters.shortCode)throw new Error("Missing required parameter: shortCode");this.fetchOptions=Fo({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 Wo(e){return(Wo="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(Do,"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":Wo(window))&&"object"===Wo(window.document),Ho="object"===("undefined"==typeof process?"undefined":Wo(process))&&"object"===Wo(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=h((function(){function e(){}return!(ns((function(){}),[],e)instanceof e)})),ss=!h((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},hs=ve("isConcatSpreadable"),ls=G>=51||!h((function(){var e=[];return e[hs]=!1,e.concat()[0]!==e})),fs=Sn("concat"),ps=function(e){if(!A(e))return!1;var t=e[hs];return void 0!==t?!!t:mr(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 vs(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 ms(e,t){if(t&&("object"===Wo(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 ms(this,r)}}Ut({target:"Array",proto:!0,arity:1,forced:!ls||!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){vs(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=li(Di.mark((function e(t,r,n,i){var a,o,s,d,c;return Di.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=h((function(){var e=js("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),Ts=Ss||h((function(){return!js("a","y").sticky})),Ms={BROKEN_CARET:Ss||h((function(){var e=js("^r","gy");return e.lastIndex=2,null!=e.exec("str")})),MISSED_STICKY:Ts,UNSUPPORTED_Y:Ss},_s=u.RegExp,As=h((function(){var e=_s(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)})),Rs=u.RegExp,Us=h((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),Ns=RegExp.prototype.exec,Fs=Ns,Ds=z("".charAt),Ws=z("".indexOf),Gs=z("".replace),Hs=z("".slice),Vs=(Es=/b*/g,g(Ns,Os=/a/,"a"),g(Ns,Es,"a"),0!==Os.lastIndex||0!==Es.lastIndex),$s=Ms.BROKEN_CARET,Ys=void 0!==/()??/.exec("")[1];(Vs||Ys||$s||As||Us)&&(Fs=function(e){var t,r,n,i,a,o,s,d=this,c=Bs(d),u=Yt(e),h=c.raw;if(h)return h.lastIndex=d.lastIndex,t=g(Fs,h,u),d.lastIndex=h.lastIndex,t;var l=c.groups,f=$s&&d.sticky,p=g(ai,d),I=d.source,v=0,m=u;if(f&&(p=Gs(p,"y",""),-1===Ws(p,"g")&&(p+="g"),m=Hs(u,d.lastIndex),d.lastIndex>0&&(!d.multiline||d.multiline&&"\n"!==Ds(u,d.lastIndex-1))&&(I="(?: "+I+")",m=" "+m,v++),r=new RegExp("^(?:"+I+")",p)),Ys&&(r=new RegExp("^"+I+"$(?!\\s)",p)),Vs&&(n=d.lastIndex),i=g(Ns,f?r:d,m),f?i?(i.input=Hs(i.input,v),i[0]=Hs(i[0],v),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&&l)for(i.groups=o=rr(null),a=0;a<l.length;a++)o[(s=l[a])[0]]=i[s[1]];return i});var Ks=Fs;Ut({target:"RegExp",proto:!0,forced:/./.exec!==Ks},{exec:Ks});var Js=ve("species"),Qs=RegExp.prototype,Xs=function(e,t,r,n){var i=ve(e),a=!h((function(){var t={};return t[i]=function(){return 7},7!=""[e](t)})),o=a&&!h((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 h=td(u/10);return 0===h?a:h<=s?void 0===n[h-1]?rd(d,1):n[h-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=ve("replace"),hd=Math.max,ld=Math.min,fd=z([].concat),pd=z([].push),gd=z("".indexOf),Id=z("".slice),vd="$0"==="a".replace(/./,"$0"),md=!!/./[ud]&&""===/./[ud]("a","$0");Xs("replace",(function(e,t,r){var n=md?"$":"$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 h=[];;){var l=cd(a,o);if(null===l)break;if(pd(h,l),!c)break;""===Yt(l[0])&&(a.lastIndex=ed(o,gt(a.lastIndex),u))}for(var f,p="",g=0,I=0;I<h.length;I++){for(var v=Yt((l=h[I])[0]),m=hd(ld(ut(l.index),o.length),0),b=[],k=1;k<l.length;k++)pd(b,void 0===(f=l[k])?f:String(f));var y=l.groups;if(d){var x=fd([v],b,m,o);void 0!==y&&pd(x,y);var w=Yt(pn(i,void 0,x))}else w=sd(v,o,m,b,y,i);m>=g&&(p+=Id(o,g,m)+w,g=m+v.length)}return p+Id(o,g)}]}),!!h((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}))||!vd||md);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||h((function(){if(l&&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=m.f;n>i;)for(var s,d=j(arguments[i++]),c=a?wd(Bt(d),a(d)):Bt(d),u=c.length,h=0;u>h;)s=c[h++],l&&!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=ve("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=vr(i,n>2?arguments[2]:void 0));var o,s,d,c,u,h,l=Da(t),f=0;if(!l||this===jd&&qd(l))for(o=It(t),s=r?new this(o):jd(o);o>f;f++)h=a?i(t[f],f):t[f],nr(s,f,h);else for(u=(c=Ga(t,l)).next,s=r?new this:[];!(d=g(u,c)).done;f++)h=a?Pd(c,i,[d.value,f],!0):d.value,nr(s,f,h);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),Nd=z([].join),Fd=z([].push),Dd=z("".replace),Wd=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)?Fd(t,((1023&i)<<10)+(1023&a)+65536):(Fd(t,i),r--)}else Fd(t,i)}return t}(e)).length,a=128,o=0,s=72;for(t=0;t<e.length;t++)(r=e[t])<128&&Fd(n,Bd(r));var d=n.length,c=d;for(d&&Fd(n,"-");c<i;){var u=2147483647;for(t=0;t<e.length;t++)(r=e[t])>=a&&r<u&&(u=r);var h=c+1;if(u-a>Ud((2147483647-o)/h))throw Ad(_d);for(o+=(u-a)*h,a=u,t=0;t<e.length;t++){if((r=e[t])<a&&++o>2147483647)throw Ad(_d);if(r==a){for(var l=o,f=36;;){var p=f<=s?1:f>=s+26?26:f-s;if(l<p)break;var g=l-p,I=36-p;Fd(n,Bd(Hd(p+g%I))),l=Ud(g/I),f+=36}Fd(n,Bd(Hd(l))),s=Vd(o,h,c==d),o=0,c++}}o++,a++}return Nd(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),hc=z([].shift),lc=z("".split),fc=z("".slice),pc=z("".toLowerCase),gc=z([].unshift),Ic=/[a-z]/i,vc=/[\d+-.a-z]/i,mc=/\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={},Nc={},Fc={},Dc={},Wc={},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,h="",l=!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}h+=pc(i),c=Bc;break;case Bc:if(i&&(ac(vc,i)||"+"==i||"-"==i||"."==i))h+=pc(i);else{if(":"!=i){if(t)return"Invalid scheme";h="",c=Lc,u=0;continue}if(t&&(d.isSpecial()!=de(Mc,h)||"file"==h&&(d.includesCredentials()||null!==d.port)||"file"==d.scheme&&!d.host))return;if(d.scheme=h,t)return void(d.isSpecial()&&Mc[d.scheme]==d.port&&(d.port=null));h="","file"==d.scheme?c=Jc:d.isSpecial()&&r&&r.scheme==d.scheme?c=Nc:d.isSpecial()?c=Gc:"/"==n[u+1]?(c=Fc,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:Dc;continue;case Nc:if("/"!=i||"/"!=n[u+1]){c=Dc;continue}c=Hc,u++;break;case Fc:if("/"==i){c=Vc;break}c=eu;continue;case Dc: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=Wc;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 Wc: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(h,u+1))continue;u++;break;case Hc:if("/"!=i&&"\\"!=i){c=Vc;continue}break;case Vc:if("@"==i){l&&(h="%40"+h),l=!0,a=Sd(h);for(var g=0;g<a.length;g++){var I=a[g];if(":"!=I||p){var v=Tc(I,Sc);p?d.password+=v:d.username+=v}else p=!0}h=""}else if(i==bd||"/"==i||"?"==i||"#"==i||"\\"==i&&d.isSpecial()){if(l&&""==h)return"Invalid authority";u-=Sd(h).length+1,h="",c=$c}else h+=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()&&""==h)return"Invalid host";if(t&&""==h&&(d.includesCredentials()||null!==d.port))return;if(o=d.parseHost(h))return o;if(h="",c=Zc,t)return;continue}"["==i?f=!0:"]"==i&&(f=!1),h+=i}else{if(""==h)return"Invalid host";if(o=d.parseHost(h))return o;if(h="",c=Kc,t==Yc)return}break;case Kc:if(!ac(mc,i)){if(i==bd||"/"==i||"?"==i||"#"==i||"\\"==i&&d.isSpecial()||t){if(""!=h){var m=tc(h,10);if(m>65535)return"Invalid port";d.port=d.isSpecial()&&m===Mc[d.scheme]?null:m,h=""}if(t)return;c=Zc;continue}return"Invalid port"}h+=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(h))c=eu;else if(""==h){if(d.host="",t)return;c=Zc}else{if(o=d.parseHost(h))return o;if("localhost"==d.host&&(d.host=""),t)return;h="",c=Zc}continue}h+=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=h))||"%2e."===s||".%2e"===s||"%2e%2e"===s?(d.shortenPath(),"/"==i||"\\"==i&&d.isSpecial()||cc(d.path,"")):Rc(h)?"/"==i||"\\"==i&&d.isSpecial()||cc(d.path,""):("file"==d.scheme&&!d.path.length&&_c(h)&&(d.host&&(d.host=""),h=ic(h,0)+":"),cc(d.path,h)),h="","file"==d.scheme&&(i==bd||"?"==i||"#"==i))for(;d.path.length>1&&""===d.path[0];)hc(d.path);"?"==i?(d.query="",c=ru):"#"==i&&(d.fragment="",c=nu)}else h+=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,h=0,l=function(){return ic(e,h)};if(":"==l()){if(":"!=ic(e,1))return;h+=2,u=++c}for(;l();){if(8==c)return;if(":"!=l()){for(t=r=0;r<4&&ac(xc,l());)t=16*t+tc(l(),16),h++,r++;if("."==l()){if(0==r)return;if(h-=r,c>6)return;for(n=0;l();){if(i=null,n>0){if(!("."==l()&&n<4))return;h++}if(!ac(mc,l()))return;for(;ac(mc,l());){if(a=tc(l(),10),null===i)i=a;else{if(0==i)return;i=10*i+a}if(i>255)return;h++}d[c]=256*d[c]+i,2!=++n&&4!=n||c++}if(4!=n)return;break}if(":"==l()){if(h++,!l())return}else if(l())return;d[c++]=t}else{if(null!==u)return;h++,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=Wd(Dd(Gd(e),Md,"."),".");for(t=0;t<i.length;t++)r=i[t],Fd(n,Rd(Td,r)?"xn--"+$d(r):r);return Nd(n,".")}(e),ac(wc,e))return"Invalid host";if(null===(t=function(e){var t,r,n,i,a,o,s,d=lc(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=Na(this,ou),r=Va(arguments.length,1)>1?arguments[1]:void 0,n=Kd(t,new iu(e,!1,r));l||(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(l&&(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",vr(du,Zd)),cu&&ot(au,"revokeObjectURL",vr(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 ms(this,r)}}gr(au,"URL"),Ut({global:!0,constructor:!0,forced:!Ua,sham:!l},{URL:au});var hu=function(e){vs(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)),lu="commerce-sdk-isomorphic@2.1.0-dev.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 Do(r)}var t,r,n,i,a,o,s,d,c,u,h,l,f,p,g,I,v,m,b,k,y,x,w,z,C,P,O,E,q,j,S,T,M,_,A,R;return gi(e,[{key:"createBasket",value:(R=li(Di.mark((function e(t,r){var n,i,a,o,s,d,c;return Di.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.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 hu("/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"],lu].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 R.apply(this,arguments)})},{key:"transferBasket",value:(A=li(Di.mark((function e(t,r){var n,i,a,o,s,d,c;return Di.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.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 hu("/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"],lu].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 A.apply(this,arguments)})},{key:"mergeBasket",value:(_=li(Di.mark((function e(t,r){var n,i,a,o,s,d,c;return Di.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.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 hu("/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"],lu].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 _.apply(this,arguments)})},{key:"deleteBasket",value:(M=li(Di.mark((function e(t,r){var n,i,a,o,s,d,c;return Di.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}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 hu("/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"],lu].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 M.apply(this,arguments)})},{key:"getBasket",value:(T=li(Di.mark((function e(t,r){var n,i,a,o,s,d,c;return Di.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}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 hu("/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"],lu].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 T.apply(this,arguments)})},{key:"updateBasket",value:(S=li(Di.mark((function e(t,r){var n,i,a,o,s,d,c;return Di.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}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 updateBasket: ".concat(e))})),s=new hu("/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"],lu].join(" ")),e.next=38,qs(s.toString(),{method:"PATCH",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 S.apply(this,arguments)})},{key:"updateAsAgentBasket",value:(j=li(Di.mark((function e(t,r){var n,i,a,o,s,d,c;return Di.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}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 hu("/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"],lu].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 j.apply(this,arguments)})},{key:"updateBillingAddressForBasket",value:(q=li(Di.mark((function e(t,r){var n,i,a,o,s,d,c;return Di.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}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 hu("/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"],lu].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 q.apply(this,arguments)})},{key:"addCouponToBasket",value:(E=li(Di.mark((function e(t,r){var n,i,a,o,s,d,c;return Di.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}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 hu("/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"],lu].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 E.apply(this,arguments)})},{key:"removeCouponFromBasket",value:(O=li(Di.mark((function e(t,r){var n,i,a,o,s,d,c;return Di.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}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 hu("/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"],lu].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 O.apply(this,arguments)})},{key:"updateCustomerForBasket",value:(P=li(Di.mark((function e(t,r){var n,i,a,o,s,d,c;return Di.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}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 hu("/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"],lu].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 P.apply(this,arguments)})},{key:"addGiftCertificateItemToBasket",value:(C=li(Di.mark((function e(t,r){var n,i,a,o,s,d,c;return Di.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}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 hu("/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"],lu].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:"removeGiftCertificateItemFromBasket",value:(z=li(Di.mark((function e(t,r){var n,i,a,o,s,d,c;return Di.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}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 hu("/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"],lu].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 z.apply(this,arguments)})},{key:"updateGiftCertificateItemInBasket",value:(w=li(Di.mark((function e(t,r){var n,i,a,o,s,d,c;return Di.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}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 hu("/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"],lu].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 w.apply(this,arguments)})},{key:"addItemToBasket",value:(x=li(Di.mark((function e(t,r){var n,i,a,o,s,d,c;return Di.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}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 hu("/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"],lu].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 x.apply(this,arguments)})},{key:"removeItemFromBasket",value:(y=li(Di.mark((function e(t,r){var n,i,a,o,s,d,c;return Di.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}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 hu("/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"],lu].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=li(Di.mark((function e(t,r){var n,i,a,o,s,d,c;return Di.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}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 hu("/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"],lu].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=li(Di.mark((function e(t,r){var n,i,a,o,s,d,c;return Di.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}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 hu("/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"],lu].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:(m=li(Di.mark((function e(t,r){var n,i,a,o,s,d,c;return Di.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}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 hu("/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"],lu].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 m.apply(this,arguments)})},{key:"removePaymentInstrumentFromBasket",value:(v=li(Di.mark((function e(t,r){var n,i,a,o,s,d,c;return Di.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}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 hu("/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"],lu].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 v.apply(this,arguments)})},{key:"updatePaymentInstrumentInBasket",value:(I=li(Di.mark((function e(t,r){var n,i,a,o,s,d,c;return Di.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}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 hu("/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"],lu].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=li(Di.mark((function e(t,r){var n,i,a,o,s,d,c;return Di.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}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 hu("/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"],lu].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=li(Di.mark((function e(t,r){var n,i,a,o,s,d,c;return Di.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}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 hu("/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"],lu].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=li(Di.mark((function e(t,r){var n,i,a,o,s,d,c;return Di.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}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 hu("/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"],lu].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:(l=li(Di.mark((function e(t,r){var n,i,a,o,s,d,c;return Di.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}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 hu("/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"],lu].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 l.apply(this,arguments)})},{key:"getPriceBooksForBasket",value:(h=li(Di.mark((function e(t,r){var n,i,a,o,s,d,c;return Di.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}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 hu("/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"],lu].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:"addPriceBooksToBasket",value:(u=li(Di.mark((function e(t,r){var n,i,a,o,s,d,c;return Di.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}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 hu("/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"],lu].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=li(Di.mark((function e(t,r){var n,i,a,o,s,d,c;return Di.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}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 hu("/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"],lu].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=li(Di.mark((function e(t,r){var n,i,a,o,s,d,c;return Di.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}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 hu("/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"],lu].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=li(Di.mark((function e(t,r){var n,i,a,o,s,d,c;return Di.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}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 hu("/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"],lu].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=li(Di.mark((function e(t,r){var n,i,a,o,s,d,c;return Di.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}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 hu("/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"],lu].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=li(Di.mark((function e(t,r){var n,i,a,o,s,d,c;return Di.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}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 hu("/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"],lu].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=li(Di.mark((function e(t,r){var n,i,a,o,s,d,c;return Di.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}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 hu("/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"],lu].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=li(Di.mark((function e(t,r){var n,i,a,o,s,d,c;return Di.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}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 hu("/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"],lu].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=li(Di.mark((function e(t,r){var n,i,a,o,s,d,c;return Di.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}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 hu("/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"],lu].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=li(Di.mark((function e(t,r){var n,i,a,o,s,d,c;return Di.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}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 hu("/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"],lu].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 vu(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,"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","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"],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 mu=function(){function e(t){fi(this,e),Ii(this,"clientConfig",void 0);var r=vu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Do(r)}var t,r,n,i;return gi(e,[{key:"getShopperContext",value:(i=li(Di.mark((function e(t,r){var n,i,a,o,s,d,c;return Di.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}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 hu("/organizations/{organizationId}/shopper-context/{usid}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=vu(vu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],lu].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=li(Di.mark((function e(t,r){var n,i,a,o,s,d,c;return Di.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}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 createShopperContext: ".concat(e))})),s=new hu("/organizations/{organizationId}/shopper-context/{usid}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=vu(vu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],lu].join(" ")),e.next=29,qs(s.toString(),{method:"PUT",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 n.apply(this,arguments)})},{key:"deleteShopperContext",value:(r=li(Di.mark((function e(t,r){var n,i,a,o,s,d,c;return Di.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}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 hu("/organizations/{organizationId}/shopper-context/{usid}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=vu(vu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],lu].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=li(Di.mark((function e(t,r){var n,i,a,o,s,d,c;return Di.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}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 updateShopperContext: ".concat(e))})),s=new hu("/organizations/{organizationId}/shopper-context/{usid}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=vu(vu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],lu].join(" ")),e.next=29,qs(s.toString(),{method:"PATCH",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,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(mu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/shopper/shopper-context/{version}"),Ii(mu,"paramKeys",{getShopperContext:["organizationId","usid","siteId"],getShopperContextRequired:["organizationId","usid"],createShopperContext:["organizationId","usid","siteId"],createShopperContextRequired:["organizationId","usid"],deleteShopperContext:["organizationId","usid","siteId"],deleteShopperContextRequired:["organizationId","usid"],updateShopperContext:["organizationId","usid","siteId"],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 Do(r)}var t,r,n,i,a,o,s,d,c,u,h,l,f,p,g,I,v,m,b,k,y,x,w,z,C,P,O,E,q;return gi(e,[{key:"registerCustomer",value:(q=li(Di.mark((function e(t,r){var n,i,a,o,s,d,c;return Di.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.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 hu("/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"],lu].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=li(Di.mark((function e(t,r){var n,i,a,o,s,d,c;return Di.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.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 hu("/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"],lu].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=li(Di.mark((function e(t,r){var n,i,a,o,s,d,c;return Di.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.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 hu("/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"],lu].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=li(Di.mark((function e(t,r){var n,i,a,o,s,d,c;return Di.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.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 hu("/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"],lu].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=li(Di.mark((function e(t,r){var n,i,a,o,s,d,c;return Di.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.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 hu("/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"],lu].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=li(Di.mark((function e(t,r){var n,i,a,o,s,d,c;return Di.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}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 hu("/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"],lu].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=li(Di.mark((function e(t,r){var n,i,a,o,s,d,c;return Di.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}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 hu("/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"],lu].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=li(Di.mark((function e(t,r){var n,i,a,o,s,d,c;return Di.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}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 hu("/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"],lu].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=li(Di.mark((function e(t,r){var n,i,a,o,s,d,c;return Di.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}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 hu("/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"],lu].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=li(Di.mark((function e(t,r){var n,i,a,o,s,d,c;return Di.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}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 hu("/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"],lu].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=li(Di.mark((function e(t,r){var n,i,a,o,s,d,c;return Di.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}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 hu("/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"],lu].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:(m=li(Di.mark((function e(t,r){var n,i,a,o,s,d,c;return Di.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}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 hu("/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"],lu].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 m.apply(this,arguments)})},{key:"getCustomerOrders",value:(v=li(Di.mark((function e(t,r){var n,i,a,o,s,d,c;return Di.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}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 hu("/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"],lu].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 v.apply(this,arguments)})},{key:"updateCustomerPassword",value:(I=li(Di.mark((function e(t,r){var n,i,a,o,s,d,c;return Di.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}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 hu("/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"],lu].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=li(Di.mark((function e(t,r){var n,i,a,o,s,d,c;return Di.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}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 hu("/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"],lu].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=li(Di.mark((function e(t,r){var n,i,a,o,s,d,c;return Di.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}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 hu("/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"],lu].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=li(Di.mark((function e(t,r){var n,i,a,o,s,d,c;return Di.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}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 hu("/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"],lu].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:(l=li(Di.mark((function e(t,r){var n,i,a,o,s,d,c;return Di.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}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 hu("/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"],lu].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:"createCustomerProductList",value:(h=li(Di.mark((function e(t,r){var n,i,a,o,s,d,c;return Di.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}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 hu("/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"],lu].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 h.apply(this,arguments)})},{key:"deleteCustomerProductList",value:(u=li(Di.mark((function e(t,r){var n,i,a,o,s,d,c;return Di.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}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 hu("/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"],lu].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=li(Di.mark((function e(t,r){var n,i,a,o,s,d,c;return Di.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}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 hu("/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"],lu].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=li(Di.mark((function e(t,r){var n,i,a,o,s,d,c;return Di.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}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 hu("/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"],lu].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=li(Di.mark((function e(t,r){var n,i,a,o,s,d,c;return Di.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}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 hu("/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"],lu].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=li(Di.mark((function e(t,r){var n,i,a,o,s,d,c;return Di.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}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 hu("/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"],lu].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=li(Di.mark((function e(t,r){var n,i,a,o,s,d,c;return Di.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}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 hu("/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"],lu].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=li(Di.mark((function e(t,r){var n,i,a,o,s,d,c;return Di.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}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 hu("/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"],lu].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=li(Di.mark((function e(t,r){var n,i,a,o,s,d,c;return Di.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.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 hu("/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"],lu].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=li(Di.mark((function e(t,r){var n,i,a,o,s,d,c;return Di.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}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 hu("/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"],lu].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=li(Di.mark((function e(t,r){var n,i,a,o,s,d,c;return Di.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}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 hu("/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"],lu].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,"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 Do(r)}var t,r;return gi(e,[{key:"retrieveResults",value:(r=li(Di.mark((function e(t,r){var n,i,a,o,s,d,c;return Di.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}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 hu("/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"],lu].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=li(Di.mark((function e(t,r){var n,i,a,o,s,d,c;return Di.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}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 hu("/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"],lu].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,"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 Do(r)}var t,r;return gi(e,[{key:"getPages",value:(r=li(Di.mark((function e(t,r){var n,i,a,o,s,d,c;return Di.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.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 hu("/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"],lu].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=li(Di.mark((function e(t,r){var n,i,a,o,s,d,c;return Di.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}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 hu("/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"],lu].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,"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 Do(r)}var t;return gi(e,[{key:"getGiftCertificate",value:(t=li(Di.mark((function e(t,r){var n,i,a,o,s,d,c;return Di.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.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 hu("/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"],lu].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,"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 Do(r)}var t,r,n,i,a,o,s,d,c,u,h,l,f,p,g,I,v;return gi(e,[{key:"authenticateCustomer",value:(v=li(Di.mark((function e(t,r){var n,i,a,o,s,d,c;return Di.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){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 hu("/organizations/{organizationId}/oauth2/login",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=Tu(Tu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],lu].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 v.apply(this,arguments)})},{key:"authorizePasswordlessCustomer",value:(I=li(Di.mark((function e(t,r){var n,i,a,o,s,d,c;return Di.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){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 hu("/organizations/{organizationId}/oauth2/passwordless/login",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=Tu(Tu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],lu].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:"logoutCustomer",value:(g=li(Di.mark((function e(t,r){var n,i,a,o,s,d,c;return Di.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.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 hu("/organizations/{organizationId}/oauth2/logout",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"],lu].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 g.apply(this,arguments)})},{key:"authorizeCustomer",value:(p=li(Di.mark((function e(t,r){var n,i,a,o,s,d,c;return Di.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.redirect_uri){e.next=17;break}o.redirect_uri=n.redirect_uri,e.next=22;break;case 17:if(void 0===i.redirect_uri){e.next=21;break}o.redirect_uri=i.redirect_uri,e.next=22;break;case 21:throw new Error("Missing required query parameter: redirect_uri");case 22:if(void 0===n.response_type){e.next=26;break}o.response_type=n.response_type,e.next=31;break;case 26:if(void 0===i.response_type){e.next=30;break}o.response_type=i.response_type,e.next=31;break;case 30:throw new Error("Missing required query parameter: response_type");case 31:if(void 0===n.client_id){e.next=35;break}o.client_id=n.client_id,e.next=40;break;case 35:if(void 0===i.client_id){e.next=39;break}o.client_id=i.client_id,e.next=40;break;case 39:throw new Error("Missing required query parameter: client_id");case 40:if(void 0!==n.scope?o.scope=n.scope:void 0!==i.scope&&(o.scope=i.scope),void 0!==n.state?o.state=n.state:void 0!==i.state&&(o.state=i.state),void 0!==n.usid?o.usid=n.usid:void 0!==i.usid&&(o.usid=i.usid),void 0!==n.hint?o.hint=n.hint:void 0!==i.hint&&(o.hint=i.hint),void 0!==n.channel_id?o.channel_id=n.channel_id:void 0!==i.channel_id&&(o.channel_id=i.channel_id),void 0===n.code_challenge){e.next=49;break}o.code_challenge=n.code_challenge,e.next=54;break;case 49:if(void 0===i.code_challenge){e.next=53;break}o.code_challenge=i.code_challenge,e.next=54;break;case 53:throw new Error("Missing required query parameter: code_challenge");case 54:return void 0!==n.ui_locales?o.ui_locales=n.ui_locales:void 0!==i.ui_locales&&(o.ui_locales=i.ui_locales),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for authorizeCustomer: ".concat(e))})),s=new hu("/organizations/{organizationId}/oauth2/authorize",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"],lu].join(" ")),e.next=61,qs(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 61:if(c=e.sent,!r){e.next=64;break}return e.abrupt("return",c);case 64:case"end":return e.stop()}}),e,this)}))),function(e,t){return p.apply(this,arguments)})},{key:"getAccessToken",value:(f=li(Di.mark((function e(t,r){var n,i,a,o,s,d,c;return Di.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){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 hu("/organizations/{organizationId}/oauth2/token",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=Tu(Tu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],lu].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 f.apply(this,arguments)})},{key:"getSessionBridgeAccessToken",value:(l=li(Di.mark((function e(t,r){var n,i,a,o,s,d,c;return Di.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){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 hu("/organizations/{organizationId}/oauth2/session-bridge/token",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=Tu(Tu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],lu].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:(h=li(Di.mark((function e(t,r){var n,i,a,o,s,d,c;return Di.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){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 hu("/organizations/{organizationId}/oauth2/trusted-system/token",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=Tu(Tu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],lu].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:"getTrustedAgentAuthorizationToken",value:(u=li(Di.mark((function e(t,r){var n,i,a,o,s,d,c;return Di.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.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 hu("/organizations/{organizationId}/oauth2/trusted-agent/authorize",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"],lu].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 u.apply(this,arguments)})},{key:"getTrustedAgentAccessToken",value:(c=li(Di.mark((function e(t,r){var n,i,a,o,s,d,c;return Di.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){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 hu("/organizations/{organizationId}/oauth2/trusted-agent/token",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=Tu(Tu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],lu].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 c.apply(this,arguments)})},{key:"getPasswordResetToken",value:(d=li(Di.mark((function e(t,r){var n,i,a,o,s,d,c;return Di.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){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 hu("/organizations/{organizationId}/oauth2/password/reset",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=Tu(Tu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],lu].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 d.apply(this,arguments)})},{key:"resetPassword",value:(s=li(Di.mark((function e(t,r){var n,i,a,o,s,d,c;return Di.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){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 hu("/organizations/{organizationId}/oauth2/password/action",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=Tu(Tu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],lu].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:"getPasswordLessAccessToken",value:(o=li(Di.mark((function e(t,r){var n,i,a,o,s,d,c;return Di.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){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 hu("/organizations/{organizationId}/oauth2/passwordless/token",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=Tu(Tu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],lu].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 o.apply(this,arguments)})},{key:"revokeToken",value:(a=li(Di.mark((function e(t,r){var n,i,a,o,s,d,c;return Di.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){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 hu("/organizations/{organizationId}/oauth2/revoke",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=Tu(Tu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],lu].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=li(Di.mark((function e(t,r){var n,i,a,o,s,d,c;return Di.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){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 hu("/organizations/{organizationId}/oauth2/introspect",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=Tu(Tu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],lu].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=li(Di.mark((function e(t,r){var n,i,a,o,s,d,c;return Di.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){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 hu("/organizations/{organizationId}/oauth2/userinfo",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"],lu].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=li(Di.mark((function e(t,r){var n,i,a,o,s,d,c;return Di.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){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 hu("/organizations/{organizationId}/oauth2/.well-known/openid-configuration",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"],lu].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=li(Di.mark((function e(t,r){var n,i,a,o,s,d,c;return Di.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){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 hu("/organizations/{organizationId}/oauth2/jwks",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"],lu].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}();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/shopper/auth/{version}"),Ii(Mu,"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","code_challenge"],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 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 Do(r)}var t,r,n,i,a,o,s,d;return gi(e,[{key:"createOrder",value:(d=li(Di.mark((function e(t,r){var n,i,a,o,s,d,c;return Di.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.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 hu("/organizations/{organizationId}/orders",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=Au(Au({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],lu].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=li(Di.mark((function e(t,r){var n,i,a,o,s,d,c;return Di.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}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 hu("/organizations/{organizationId}/orders/{orderNo}",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"],lu].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=li(Di.mark((function e(t,r){var n,i,a,o,s,d,c;return Di.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}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 hu("/organizations/{organizationId}/orders/{orderNo}/lookup",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=Au(Au({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],lu].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=li(Di.mark((function e(t,r){var n,i,a,o,s,d,c;return Di.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}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 hu("/organizations/{organizationId}/orders/{orderNo}/payment-instruments",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=Au(Au({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],lu].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=li(Di.mark((function e(t,r){var n,i,a,o,s,d,c;return Di.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}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 hu("/organizations/{organizationId}/orders/{orderNo}/payment-instruments/{paymentInstrumentId}",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"],lu].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=li(Di.mark((function e(t,r){var n,i,a,o,s,d,c;return Di.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}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 hu("/organizations/{organizationId}/orders/{orderNo}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=Au(Au({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],lu].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=li(Di.mark((function e(t,r){var n,i,a,o,s,d,c;return Di.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}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 hu("/organizations/{organizationId}/orders/{orderNo}/payment-methods",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"],lu].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=li(Di.mark((function e(t,r){var n,i,a,o,s,d,c;return Di.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}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 hu("/organizations/{organizationId}/orders/{orderNo}/taxes",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"],lu].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 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/checkout/shopper-orders/{version}"),Ii(Ru,"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 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 Do(r)}var t,r,n,i;return gi(e,[{key:"getProducts",value:(i=li(Di.mark((function e(t,r){var n,i,a,o,s,d,c;return Di.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.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 hu("/organizations/{organizationId}/products",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"],lu].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=li(Di.mark((function e(t,r){var n,i,a,o,s,d,c;return Di.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}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 hu("/organizations/{organizationId}/products/{id}",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"],lu].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=li(Di.mark((function e(t,r){var n,i,a,o,s,d,c;return Di.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.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 hu("/organizations/{organizationId}/categories",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"],lu].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=li(Di.mark((function e(t,r){var n,i,a,o,s,d,c;return Di.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}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 hu("/organizations/{organizationId}/categories/{id}",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"],lu].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 Nu(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 Fu(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Nu(Object(r),!0).forEach((function(t){Ii(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Nu(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}Ii(Lu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/product/shopper-products/{version}"),Ii(Lu,"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 Du=function(){function e(t){fi(this,e),Ii(this,"clientConfig",void 0);var r=Fu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Do(r)}var t,r;return gi(e,[{key:"getPromotions",value:(r=li(Di.mark((function e(t,r){var n,i,a,o,s,d,c;return Di.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.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 hu("/organizations/{organizationId}/promotions",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=Fu(Fu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],lu].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=li(Di.mark((function e(t,r){var n,i,a,o,s,d,c;return Di.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}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 hu("/organizations/{organizationId}/promotions/campaigns/{campaignId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=Fu(Fu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],lu].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(Du,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/pricing/shopper-promotions/{version}"),Ii(Du,"paramKeys",{getPromotions:["organizationId","siteId","ids","locale"],getPromotionsRequired:["organizationId","siteId","ids"],getPromotionsForCampaign:["organizationId","campaignId","siteId","startDate","endDate","currency"],getPromotionsForCampaignRequired:["organizationId","campaignId","siteId"]});var Wu=TypeError,Gu=function(e,t){if(!delete e[t])throw Wu("Cannot delete property "+J(t)+" of "+J(e))},Hu=L.match(/firefox\/(\d+)/i),Vu=!!Hu&&+Hu[1],$u=/MSIE|Trident/.test(L),Yu=L.match(/AppleWebKit\/(\d+)\./),Ku=!!Yu&&+Yu[1],Ju=[],Qu=z(Ju.sort),Xu=z(Ju.push),Zu=h((function(){Ju.sort(void 0)})),eh=h((function(){Ju.sort(null)})),th=Fn("sort"),rh=!h((function(){if(G)return G<70;if(!(Vu&&Vu>3)){if($u)return!0;if(Ku)return Ku<603;var e,t,r,n,i="";for(e=65;e<76;e++){switch(t=String.fromCharCode(e),e){case 66:case 69:case 70:case 72:r=3;break;case 68:case 71:r=4;break;default:r=2}for(n=0;n<47;n++)Ju.push({k:t+n,v:r})}for(Ju.sort((function(e,t){return t.v-e.v})),n=0;n<Ju.length;n++)t=Ju[n].k.charAt(0),i.charAt(i.length-1)!==t&&(i+=t);return"DGBEFHACIJK"!==i}}));function nh(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 ih(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?nh(Object(r),!0).forEach((function(t){Ii(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):nh(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}Ut({target:"Array",proto:!0,forced:Zu||!eh||!th||!rh},{sort:function(e){void 0!==e&&X(e);var t=oe(this);if(rh)return void 0===e?Qu(t):Qu(t,e);var r,n,i=[],a=It(t);for(n=0;n<a;n++)n in t&&Xu(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;)Gu(t,n++);return t}});var ah=function(){function e(t){fi(this,e),Ii(this,"clientConfig",void 0);var r=ih({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Do(r)}var t,r;return gi(e,[{key:"productSearch",value:(r=li(Di.mark((function e(t,r){var n,i,a,o,s,d,c;return Di.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.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 hu("/organizations/{organizationId}/product-search",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=ih(ih({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],lu].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=li(Di.mark((function e(t,r){var n,i,a,o,s,d,c;return Di.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.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 hu("/organizations/{organizationId}/search-suggestions",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=ih(ih({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],lu].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 oh(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 sh(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?oh(Object(r),!0).forEach((function(t){Ii(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):oh(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}Ii(ah,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/search/shopper-search/{version}/"),Ii(ah,"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 dh=function(){function e(t){fi(this,e),Ii(this,"clientConfig",void 0);var r=sh({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Do(r)}var t;return gi(e,[{key:"getUrlMapping",value:(t=li(Di.mark((function e(t,r){var n,i,a,o,s,d,c;return Di.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.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 hu("/organizations/{organizationId}/url-mapping",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=sh(sh({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],lu].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 ch(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 uh(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ch(Object(r),!0).forEach((function(t){Ii(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ch(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}Ii(dh,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/site/shopper-seo/{version}"),Ii(dh,"paramKeys",{getUrlMapping:["organizationId","urlSegment","siteId","locale"],getUrlMappingRequired:["organizationId","urlSegment","siteId"]});var hh=function(){function e(t){fi(this,e),Ii(this,"clientConfig",void 0);var r=uh({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Do(r)}var t,r;return gi(e,[{key:"searchStores",value:(r=li(Di.mark((function e(t,r){var n,i,a,o,s,d,c;return Di.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.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 hu("/organizations/{organizationId}/store-search",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=uh(uh({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],lu].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=li(Di.mark((function e(t,r){var n,i,a,o,s,d,c;return Di.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.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 hu("/organizations/{organizationId}/stores",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=uh(uh({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],lu].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}();Ii(hh,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/store/shopper-stores/{version}"),Ii(hh,"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 lh=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;lh(o,0)||(n.lastIndex=0);var s=cd(n,i);return lh(n.lastIndex,o)||(n.lastIndex=o),null===s?-1:s.index}]}));var fh=Mr.map,ph=Sn("map");Ut({target:"Array",proto:!0,forced:!ph},{map:function(e){return fh(this,e,arguments.length>1?arguments[1]:void 0)}});var gh=ve("iterator"),Ih=!1;try{var vh=0,mh={next:function(){return{done:!!vh++}},return:function(){Ih=!0}};mh[gh]=function(){return this},Array.from(mh,(function(){throw 2}))}catch(e){}var bh,kh,yh,xh=function(e,t){if(!t&&!Ih)return!1;var r=!1;try{var n={};n[gh]=function(){return{next:function(){return{done:r=!0}}}},e(n)}catch(e){}return r},wh="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView,zh=Ae.f,Ch=it.enforce,Ph=it.get,Oh=u.Int8Array,Eh=Oh&&Oh.prototype,qh=u.Uint8ClampedArray,jh=qh&&qh.prototype,Sh=Oh&&ta(Oh),Th=Eh&&ta(Eh),Mh=Object.prototype,_h=u.TypeError,Ah=ve("toStringTag"),Rh=le("TYPED_ARRAY_TAG"),Uh=wh&&!!ua&&"Opera"!==Vt(u.opera),Bh=!1,Lh={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},Nh={BigInt64Array:8,BigUint64Array:8},Fh=function(e){var t=ta(e);if(A(t)){var r=Ph(t);return r&&de(r,"TypedArrayConstructor")?r.TypedArrayConstructor:Fh(t)}},Dh=function(e){if(!A(e))return!1;var t=Vt(e);return de(Lh,t)||de(Nh,t)};for(bh in Lh)(yh=(kh=u[bh])&&kh.prototype)?Ch(yh).TypedArrayConstructor=kh:Uh=!1;for(bh in Nh)(yh=(kh=u[bh])&&kh.prototype)&&(Ch(yh).TypedArrayConstructor=kh);if((!Uh||!_(Sh)||Sh===Function.prototype)&&(Sh=function(){throw _h("Incorrect invocation")},Uh))for(bh in Lh)u[bh]&&ua(u[bh],Sh);if((!Uh||!Th||Th===Mh)&&(Th=Sh.prototype,Uh))for(bh in Lh)u[bh]&&ua(u[bh].prototype,Th);if(Uh&&ta(jh)!==Th&&ua(jh,Th),l&&!de(Th,Ah))for(bh in Bh=!0,zh(Th,Ah,{get:function(){return A(this)?this[Rh]:void 0}}),Lh)u[bh]&&Re(u[bh],Rh,bh);var Wh={NATIVE_ARRAY_BUFFER_VIEWS:Uh,TYPED_ARRAY_TAG:Bh&&Rh,aTypedArray:function(e){if(Dh(e))return e;throw _h("Target is not a typed array")},aTypedArrayConstructor:function(e){if(_(e)&&(!ua||B(Sh,e)))return e;throw _h(J(e)+" is not a typed array constructor")},exportTypedArrayMethod:function(e,t,r,n){if(l){if(r)for(var i in Lh){var a=u[i];if(a&&de(a.prototype,e))try{delete a.prototype[e]}catch(r){try{a.prototype[e]=t}catch(e){}}}Th[e]&&!r||ot(Th,e,r?t:Uh&&Eh[e]||t,n)}},exportTypedArrayStaticMethod:function(e,t,r){var n,i;if(l){if(ua){if(r)for(n in Lh)if((i=u[n])&&de(i,e))try{delete i[e]}catch(e){}if(Sh[e]&&!r)return;try{return ot(Sh,e,r?t:Uh&&Sh[e]||t)}catch(e){}}for(n in Lh)!(i=u[n])||i[e]&&!r||ot(i,e,t)}},getTypedArrayConstructor:Fh,isView:function(e){if(!A(e))return!1;var t=Vt(e);return"DataView"===t||de(Lh,t)||de(Nh,t)},isTypedArray:Dh,TypedArray:Sh,TypedArrayPrototype:Th},Gh=Wh.NATIVE_ARRAY_BUFFER_VIEWS,Hh=u.ArrayBuffer,Vh=u.Int8Array,$h=!Gh||!h((function(){Vh(1)}))||!h((function(){new Vh(-1)}))||!xh((function(e){new Vh,new Vh(null),new Vh(1.5),new Vh(e)}),!0)||h((function(){return 1!==new Vh(new Hh(2),1,void 0).length})),Yh=RangeError,Kh=function(e){if(void 0===e)return 0;var t=ut(e),r=gt(t);if(t!==r)throw Yh("Wrong length or index");return r},Jh=Array,Qh=Math.abs,Xh=Math.pow,Zh=Math.floor,el=Math.log,tl=Math.LN2,rl=function(e,t,r){var n,i,a,o=Jh(r),s=8*r-t-1,d=(1<<s)-1,c=d>>1,u=23===t?Xh(2,-24)-Xh(2,-77):0,h=e<0||0===e&&1/e<0?1:0,l=0;for((e=Qh(e))!=e||e===1/0?(i=e!=e?1:0,n=d):(n=Zh(el(e)/tl),e*(a=Xh(2,-n))<1&&(n--,a*=2),(e+=n+c>=1?u/a:u*Xh(2,1-c))*a>=2&&(n++,a/=2),n+c>=d?(i=0,n=d):n+c>=1?(i=(e*a-1)*Xh(2,t),n+=c):(i=e*Xh(2,c-1)*Xh(2,t),n=0));t>=8;)o[l++]=255&i,i/=256,t-=8;for(n=n<<t|i,s+=t;s>0;)o[l++]=255&n,n/=256,s-=8;return o[--l]|=128*h,o},nl=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+=Xh(2,t),u-=o}return(c?-1:1)*r*Xh(2,u-t)},il=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},al=zt.f,ol=Ae.f,sl=Ne.PROPER,dl=Ne.CONFIGURABLE,cl=it.get,ul=it.set,hl=u.ArrayBuffer,ll=hl,fl=ll&&ll.prototype,pl=u.DataView,gl=pl&&pl.prototype,Il=Object.prototype,vl=u.Array,ml=u.RangeError,bl=z(il),kl=z([].reverse),yl=rl,xl=nl,wl=function(e){return[255&e]},zl=function(e){return[255&e,e>>8&255]},Cl=function(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]},Pl=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},Ol=function(e){return yl(e,23,4)},El=function(e){return yl(e,52,8)},ql=function(e,t){ol(e.prototype,t,{get:function(){return cl(this)[t]}})},jl=function(e,t,r,n){var i=Kh(r),a=cl(e);if(i+t>a.byteLength)throw ml("Wrong index");var o=cl(a.buffer).bytes,s=i+a.byteOffset,d=or(o,s,s+t);return n?d:kl(d)},Sl=function(e,t,r,n,i,a){var o=Kh(r),s=cl(e);if(o+t>s.byteLength)throw ml("Wrong index");for(var d=cl(s.buffer).bytes,c=o+s.byteOffset,u=n(+i),h=0;h<t;h++)d[c+h]=u[a?h:t-h-1]};if(wh){var Tl=sl&&"ArrayBuffer"!==hl.name;if(h((function(){hl(1)}))&&h((function(){new hl(-1)}))&&!h((function(){return new hl,new hl(1.5),new hl(NaN),Tl&&!dl})))Tl&&dl&&Re(hl,"name","ArrayBuffer");else{(ll=function(e){return Na(this,fl),new hl(Kh(e))}).prototype=fl;for(var Ml,_l=al(hl),Al=0;_l.length>Al;)(Ml=_l[Al++])in ll||Re(ll,Ml,hl[Ml]);fl.constructor=ll}ua&&ta(gl)!==Il&&ua(gl,Il);var Rl=new pl(new ll(2)),Ul=z(gl.setInt8);Rl.setInt8(0,2147483648),Rl.setInt8(1,2147483649),!Rl.getInt8(0)&&Rl.getInt8(1)||Ba(gl,{setInt8:function(e,t){Ul(this,e,t<<24>>24)},setUint8:function(e,t){Ul(this,e,t<<24>>24)}},{unsafe:!0})}else fl=(ll=function(e){Na(this,fl);var t=Kh(e);ul(this,{bytes:bl(vl(t),0),byteLength:t}),l||(this.byteLength=t)}).prototype,gl=(pl=function(e,t,r){Na(this,gl),Na(e,fl);var n=cl(e).byteLength,i=ut(t);if(i<0||i>n)throw ml("Wrong offset");if(i+(r=void 0===r?n-i:gt(r))>n)throw ml("Wrong length");ul(this,{buffer:e,byteLength:r,byteOffset:i}),l||(this.buffer=e,this.byteLength=r,this.byteOffset=i)}).prototype,l&&(ql(ll,"byteLength"),ql(pl,"buffer"),ql(pl,"byteLength"),ql(pl,"byteOffset")),Ba(gl,{getInt8:function(e){return jl(this,1,e)[0]<<24>>24},getUint8:function(e){return jl(this,1,e)[0]},getInt16:function(e){var t=jl(this,2,e,arguments.length>1?arguments[1]:void 0);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=jl(this,2,e,arguments.length>1?arguments[1]:void 0);return t[1]<<8|t[0]},getInt32:function(e){return Pl(jl(this,4,e,arguments.length>1?arguments[1]:void 0))},getUint32:function(e){return Pl(jl(this,4,e,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(e){return xl(jl(this,4,e,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(e){return xl(jl(this,8,e,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(e,t){Sl(this,1,e,wl,t)},setUint8:function(e,t){Sl(this,1,e,wl,t)},setInt16:function(e,t){Sl(this,2,e,zl,t,arguments.length>2?arguments[2]:void 0)},setUint16:function(e,t){Sl(this,2,e,zl,t,arguments.length>2?arguments[2]:void 0)},setInt32:function(e,t){Sl(this,4,e,Cl,t,arguments.length>2?arguments[2]:void 0)},setUint32:function(e,t){Sl(this,4,e,Cl,t,arguments.length>2?arguments[2]:void 0)},setFloat32:function(e,t){Sl(this,4,e,Ol,t,arguments.length>2?arguments[2]:void 0)},setFloat64:function(e,t){Sl(this,8,e,El,t,arguments.length>2?arguments[2]:void 0)}});gr(ll,"ArrayBuffer"),gr(pl,"DataView");var Bl={ArrayBuffer:ll,DataView:pl},Ll=Math.floor,Nl=Number.isInteger||function(e){return!A(e)&&isFinite(e)&&Ll(e)===e},Fl=RangeError,Dl=RangeError,Wl=function(e,t){var r=function(e){var t=ut(e);if(t<0)throw Fl("The argument can't be less than 0");return t}(e);if(r%t)throw Dl("Wrong offset");return r},Gl=Wh.aTypedArrayConstructor,Hl=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,h=void 0!==u,l=Da(d);if(l&&!qd(l))for(o=(a=Ga(d,l)).next,d=[];!(i=g(o,a)).done;)d.push(i.value);for(h&&c>2&&(u=vr(u,arguments[2])),r=It(d),n=new(Gl(s))(r),t=0;r>t;t++)n[t]=h?u(d[t],t):d[t];return n},Vl=ve("species"),$l=function(e){var t=U(e),r=Ae.f;l&&t&&!t[Vl]&&r(t,Vl,{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,h=Bl.ArrayBuffer,f=h.prototype,p=Bl.DataView,I=Wh.NATIVE_ARRAY_BUFFER_VIEWS,v=Wh.TYPED_ARRAY_TAG,m=Wh.TypedArray,k=Wh.TypedArrayPrototype,y=Wh.aTypedArrayConstructor,x=Wh.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&&Nl(+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)};l?(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,l){var f=e.match(/\d+$/)[0]/8,b=e+(l?"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);l&&(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?$h&&(O=s((function(e,t,r,n){return Na(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,Wl(r,f),n):void 0!==r?new P(t,Wl(r,f)):new P(t):x(t)?w(O,t):g(Hl,O,t):new P(Kh(t)),e,O)})),ua&&ua(O,m),r(t(P),(function(e){e in O||Re(O,e,P[e])})),O.prototype=E):(O=s((function(e,t,r,n){Na(e,E);var a,o,s,d=0,u=0;if(A(t)){if(!C(t))return x(t)?w(O,t):g(Hl,O,t);a=t,u=Wl(r,f);var l=t.byteLength;if(void 0===n){if(l%f)throw c("Wrong length");if((o=l-u)<0)throw c("Wrong length")}else if((o=gt(n)*f)+u>l)throw c("Wrong length");s=o/f}else s=Kh(t),a=new h(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,m),E=O.prototype=rr(k)),E.constructor!==O&&Re(E,"constructor",O),a(E).TypedArrayConstructor=O,v&&Re(E,v,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),$l(b)}):e.exports=function(){}}))("Uint8",(function(e){return function(t,r,n){return e(this,t,r,n)}}));var Yl=Math.min,Kl=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=Yl((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]:Gu(r,i),i+=d,a+=d;return r}),Jl=Wh.aTypedArray;(0,Wh.exportTypedArrayMethod)("copyWithin",(function(e,t){return Kl(Jl(this),e,t,arguments.length>2?arguments[2]:void 0)}));var Ql=Mr.every,Xl=Wh.aTypedArray;(0,Wh.exportTypedArrayMethod)("every",(function(e){return Ql(Xl(this),e,arguments.length>1?arguments[1]:void 0)}));var Zl=TypeError,ef=function(e){var t=ke(e,"number");if("number"==typeof t)throw Zl("Can't convert number to bigint");return BigInt(t)},tf=Wh.aTypedArray,rf=Wh.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(il,this,r,t>1?arguments[1]:void 0,t>2?arguments[2]:void 0)}),h((function(){var e=0;return new Int8Array(2).fill({valueOf:function(){return e++}}),1!==e})));var af=ve("species"),of=function(e,t){var r,n=Se(e).constructor;return void 0===n||null==(r=Se(n)[af])?t:rs(r)},sf=Wh.aTypedArrayConstructor,df=Wh.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)},hf=Mr.filter,lf=Wh.aTypedArray;(0,Wh.exportTypedArrayMethod)("filter",(function(e){var t=hf(lf(this),e,arguments.length>1?arguments[1]:void 0);return uf(this,t)}));var ff=Mr.find,pf=Wh.aTypedArray;(0,Wh.exportTypedArrayMethod)("find",(function(e){return ff(pf(this),e,arguments.length>1?arguments[1]:void 0)}));var gf=Mr.findIndex,If=Wh.aTypedArray;(0,Wh.exportTypedArrayMethod)("findIndex",(function(e){return gf(If(this),e,arguments.length>1?arguments[1]:void 0)}));var vf=Mr.forEach,mf=Wh.aTypedArray;(0,Wh.exportTypedArrayMethod)("forEach",(function(e){vf(mf(this),e,arguments.length>1?arguments[1]:void 0)}));var bf=mt.includes,kf=Wh.aTypedArray;(0,Wh.exportTypedArrayMethod)("includes",(function(e){return bf(kf(this),e,arguments.length>1?arguments[1]:void 0)}));var yf=mt.indexOf,xf=Wh.aTypedArray;(0,Wh.exportTypedArrayMethod)("indexOf",(function(e){return yf(xf(this),e,arguments.length>1?arguments[1]:void 0)}));var wf=ve("iterator"),zf=u.Uint8Array,Cf=z(ya.values),Pf=z(ya.keys),Of=z(ya.entries),Ef=Wh.aTypedArray,qf=Wh.exportTypedArrayMethod,jf=zf&&zf.prototype,Sf=!h((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=Wh.aTypedArray,Af=Wh.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,Nf=Fn("lastIndexOf"),Ff=Lf||!Nf?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,Df=Wh.aTypedArray;(0,Wh.exportTypedArrayMethod)("lastIndexOf",(function(e){var t=arguments.length;return pn(Ff,Df(this),t>1?[e,arguments[1]]:[e])}));var Wf=Mr.map,Gf=Wh.aTypedArray;(0,Wh.exportTypedArrayMethod)("map",(function(e){return Wf(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=Wh.aTypedArray;(0,Wh.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=Wh.aTypedArray;(0,Wh.exportTypedArrayMethod)("reduceRight",(function(e){var t=arguments.length;return Jf(Qf(this),e,t,t>1?arguments[1]:void 0)}));var Xf=Wh.aTypedArray,Zf=Wh.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=Wh.aTypedArray,op=Wh.exportTypedArrayMethod,sp=!h((function(){var e=new Uint8ClampedArray(2);return g(ip,e,{length:1,0:3},1),3!==e[1]})),dp=sp&&Wh.NATIVE_ARRAY_BUFFER_VIEWS&&h((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=Wl(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=Wh.aTypedArray;(0,Wh.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}),h((function(){new Int8Array(1).slice()})));var up=Mr.some,hp=Wh.aTypedArray;(0,Wh.exportTypedArrayMethod)("some",(function(e){return up(hp(this),e,arguments.length>1?arguments[1]:void 0)}));var lp=Wh.aTypedArray,fp=Wh.exportTypedArrayMethod,pp=u.Uint16Array,gp=pp&&z(pp.prototype.sort),Ip=!(!gp||h((function(){gp(new pp(2),null)}))&&h((function(){gp(new pp(2),{})}))),vp=!!gp&&!h((function(){if(G)return G<74;if(Vu)return Vu<67;if($u)return!0;if(Ku)return Ku<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),vp?gp(this,e):Qa(lp(this),function(e){return function(t,r){return void 0!==e?+e(t,r)||0:r!=r?-1:t!=t?1:0===t&&0===r?1/t>0&&1/r<0?1:-1:t>r}}(e))}),!vp||Ip);var mp=u.Int8Array,bp=Wh.aTypedArray,kp=Wh.exportTypedArrayMethod,yp=[].toLocaleString,xp=!!mp&&h((function(){yp.call(new mp(1))}));kp("toLocaleString",(function(){return pn(yp,xp?gn(bp(this)):bp(this),gn(arguments))}),h((function(){return[1,2].toLocaleString()!=new mp([1,2]).toLocaleString()}))||!h((function(){mp.prototype.toLocaleString.call([1,2])})));var wp=Wh.exportTypedArrayMethod,zp=u.Uint8Array,Cp=zp&&zp.prototype||{},Pp=[].toString,Op=z([].join);h((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,Np=u.MessageChannel,Fp=u.String,Dp=0,Wp={};try{qp=u.location}catch(e){}var Gp=function(e){if(de(Wp,e)){var t=Wp[e];delete Wp[e],t()}},Hp=function(e){return function(){Gp(e)}},Vp=function(e){Gp(e.data)},$p=function(e){u.postMessage(Fp(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 Wp[++Dp]=function(){pn(t,void 0,r)},jp(Dp),Dp},Rp=function(e){delete Wp[e]},Mp?jp=function(e){Up.nextTick(Hp(e))}:Bp&&Bp.now?jp=function(e){Bp.now(Hp(e))}:Np&&!_p?(Tp=(Sp=new Np).port2,Sp.port1.onmessage=Vp,jp=vr(Tp.postMessage,Tp)):u.addEventListener&&_(u.postMessage)&&!u.importScripts&&qp&&"file:"!==qp.protocol&&!h($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,hg=ag(u,"queueMicrotask"),lg=hg&&hg.value;lg||(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=vr(eg.then,eg),Qp=function(){tg(Yp)}):Mp?Qp=function(){cg.nextTick(Yp)}:(og=vr(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=lg||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,vg=u.Promise,mg="object"==typeof window&&"object"!=typeof Deno;vg&&vg.prototype;var bg,kg,yg,xg=ve("species"),wg=!1,zg=_(u.PromiseRejectionEvent),Cg={CONSTRUCTOR:At("Promise",(function(){var e=He(vg),t=e!==String(vg);if(!t&&66===G)return!0;if(G>=51&&/native code/.test(e))return!1;var r=new vg((function(e){e(1)})),n=function(e){e((function(){}),(function(){}))};return(r.constructor={})[xg]=n,!(wg=r.then((function(){}))instanceof n)||!t&&mg&&!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=vg&&vg.prototype,Ag=vg,Rg=_g,Ug=u.TypeError,Bg=u.document,Lg=u.process,Ng=Og.f,Fg=Ng,Dg=!!(Bg&&Bg.createEvent&&u.dispatchEvent),Wg=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=Wg(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;Dg?((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=Wg(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){Na(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=Ng(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=Ng=function(e){return e===Ag||void 0===e?new kg(e):Fg(e)},_(vg)&&_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),$l("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,h=!(!r||!r.AS_ENTRIES),l=!(!r||!r.IS_RECORD),f=!(!r||!r.IS_ITERATOR),p=!(!r||!r.INTERRUPTED),I=vr(t,u),v=function(e){return n&&Cd(n,"normal",e),new eI(!0,e)},m=function(e){return h?(Se(e),p?I(e[0],e[1],v):I(e[0],e[1])):p?I(e,v):I(e)};if(l)n=e.iterator;else if(f)n=e;else{if(!(i=Da(e)))throw Zg(J(e)+" is not iterable");if(qd(i)){for(a=0,o=It(e);o>a;a++)if((s=m(e[a]))&&B(tI,s))return s;return new eI(!1)}n=Ga(e,i)}for(d=l?e.next:n.next;!(c=g(d,n)).done;){try{s=m(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||!xh((function(e){vg.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=vg&&vg.prototype;if(Ut({target:"Promise",proto:!0,forced:iI,real:!0},{catch:function(e){return this.then(void 0,e)}}),_(vg)){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 hI(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 lI=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=li(Di.mark((function e(t){var r,n,i,a,o,s,d;return Di.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 vI.apply(this,arguments)}function vI(){return(vI=li(Di.mark((function e(t,r,n){var i,a,o,s,d,c,u,h;return Di.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,gI(r);case 2:return a=e.sent,(o=new Mu(t.clientConfig)).clientConfig.fetchOptions=hI(hI({},t.clientConfig.fetchOptions),{},{redirect:Go?"follow":"manual"}),s={parameters:hI(hI({client_id:t.clientConfig.parameters.clientId,channel_id:t.clientConfig.parameters.siteId,code_challenge:a},n.hint&&{hint:n.hint}),{},{organizationId:t.clientConfig.parameters.organizationId,redirect_uri:n.redirectURI,response_type:"code"},n.usid&&{usid:n.usid})},e.next=8,o.authorizeCustomer(s,!0);case 8:if(d=e.sent,c=(null===(i=d.headers)||void 0===i?void 0:i.get("location"))||d.url,u=new URL(c),h=Object.fromEntries(u.searchParams.entries()),!(d.status>=400||h.error)){e.next=14;break}throw new zs(d);case 14:return e.abrupt("return",hI({url:c},fI(c)));case 15:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function mI(){return(mI=li(Di.mark((function e(t,r,n){var i,a;return Di.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i="Basic ".concat(lI("".concat(t.clientConfig.parameters.clientId,":").concat(n.clientSecret))),a={headers:{Authorization:i},body:hI({grant_type:"client_credentials"},r.usid&&{usid:r.usid})},e.abrupt("return",t.getAccessToken(a));case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function bI(){return(bI=li(Di.mark((function e(t,r){var n,i,a;return Di.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=pI(),e.next=3,II(t,n,hI({redirectURI:r.redirectURI,hint:"guest"},r.usid&&{usid:r.usid}));case 3:return i=e.sent,a={client_id:t.clientConfig.parameters.clientId,channel_id:t.clientConfig.parameters.siteId,code:i.code,code_verifier:n,grant_type:"authorization_code_pkce",redirect_uri:r.redirectURI,usid:i.usid},e.abrupt("return",t.getAccessToken({body:a}));case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function kI(){return(kI=li(Di.mark((function e(t,r,n){var i,a,o,s,d,c,u,h,l,f,p,g,I,v;return Di.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 Mu(t.clientConfig)).clientConfig.fetchOptions=hI(hI({},t.clientConfig.fetchOptions),{},{redirect:Go?"follow":"manual"}),d="Basic ".concat(lI("".concat(r.username,":").concat(r.password))),c={headers:{Authorization:d},parameters:{organizationId:t.clientConfig.parameters.organizationId},body:hI({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,h=(null===(i=u.headers)||void 0===i?void 0:i.get("location"))||u.url,l=new URL(h),f=Object.fromEntries(l.searchParams.entries()),!(u.status>=400||f.error)){e.next=16;break}throw new zs(u);case 16:if(p=fI(h),g={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},!r.clientSecret){e.next=22;break}return I="Basic ".concat(lI("".concat(t.clientConfig.parameters.clientId,":").concat(r.clientSecret))),v={headers:{Authorization:I},body:g},e.abrupt("return",t.getAccessToken(v));case 22:return e.abrupt("return",t.getAccessToken({body:g}));case 23:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var yI=Mr.find,xI=!0;"find"in[]&&Array(1).find((function(){xI=!1})),Ut({target:"Array",proto:!0,forced:xI},{find:function(e){return yI(this,e,arguments.length>1?arguments[1]:void 0)}}),Ki("find");function wI(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 zI(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?wI(Object(r),!0).forEach((function(t){Ii(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):wI(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var CI=function(e){var t=!1;return e&&(t=Boolean(Object.keys(e).find((function(e){return"content-type"===e.toLowerCase()})))),t},PI=function(){var e=li(Di.mark((function e(t){var r,n,i,a,o,s,d,c,u,h,l,f;return Di.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=zI(zI({},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=zI(zI({},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)),h=CI(i.headers)||CI(c.headers),l=i,h&&!u||(l=zI(zI({},i),{},{headers:zI(zI({},i.headers),!h&&{"Content-Type":"application/json"}),parameters:zI(zI({},i.parameters),u&&{siteId:a.parameters.siteId})})),f=new hu("/organizations/{organizationId}/{endpointPath}",c.baseUri,{pathParams:d,queryParams:l.parameters,origin:c.proxy}),e.abrupt("return",qs(f.toString(),l,c,o));case 13:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),OI=Object.freeze({__proto__:null,isBrowser:Go,isNode:Ho,globalObject:Vo,hasFetchAvailable:$o,fetch:Yo,stringToBase64:lI,getCodeAndUsidFromUrl:fI,createCodeVerifier:pI,generateCodeChallenge:gI,authorize:II,loginGuestUserPrivate:function(e,t,r){return mI.apply(this,arguments)},loginGuestUser:function(e,t){return bI.apply(this,arguments)},loginRegisteredUserB2C:function(e,t,r){return kI.apply(this,arguments)},refreshAccessToken:function(e,t,r){var n={grant_type:"refresh_token",refresh_token:t.refreshToken,client_id:e.clientConfig.parameters.clientId,channel_id:e.clientConfig.parameters.siteId};if(r&&r.clientSecret){var i={headers:{Authorization:"Basic ".concat(lI("".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:PI,doFetch:qs});e.ClientConfig=Do,e.ShopperBaskets=gu,e.ShopperContexts=mu,e.ShopperCustomers=yu,e.ShopperDiscoverySearch=zu,e.ShopperExperience=Ou,e.ShopperGiftCertificates=ju,e.ShopperLogin=Mu,e.ShopperOrders=Ru,e.ShopperProducts=Lu,e.ShopperPromotions=Du,e.ShopperSearch=ah,e.ShopperSeo=dh,e.ShopperStores=hh,e.TemplateURL=hu,e.helpers=OI,Object.defineProperty(e,"__esModule",{value:!0})}));