commerce-sdk-isomorphic 1.1.2 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +80 -3
- package/README.md +82 -65
- package/lib/index.cjs.d.ts +10168 -0
- package/lib/index.cjs.js +1 -1
- package/lib/index.esm.d.ts +10168 -0
- package/lib/index.esm.js +1 -1
- package/package.json +76 -59
package/lib/index.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("cross-fetch")):"function"==typeof define&&define.amd?define(["exports","cross-fetch"],t):t((e=e||self).CommerceSdk={},e.crossFetch)}(this,(function(e,t){"use strict";var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function n(e,t,r){return e(r={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&r.path)}},r.exports),r.exports}var i=function(e){return e&&e.Math==Math&&e},o=i("object"==typeof globalThis&&globalThis)||i("object"==typeof window&&window)||i("object"==typeof self&&self)||i("object"==typeof r&&r)||Function("return this")(),a=function(e){try{return!!e()}catch(e){return!0}},s=!a((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),u=function(e){return"object"==typeof e?null!==e:"function"==typeof e},d=o.document,c=u(d)&&u(d.createElement),l=function(e){return c?d.createElement(e):{}},f=!s&&!a((function(){return 7!=Object.defineProperty(l("div"),"a",{get:function(){return 7}}).a})),h=function(e){if(!u(e))throw TypeError(String(e)+" is not an object");return e},p=function(e,t){if(!u(e))return e;var r,n;if(t&&"function"==typeof(r=e.toString)&&!u(n=r.call(e)))return n;if("function"==typeof(r=e.valueOf)&&!u(n=r.call(e)))return n;if(!t&&"function"==typeof(r=e.toString)&&!u(n=r.call(e)))return n;throw TypeError("Can't convert object to primitive value")},g=Object.defineProperty,m={f:s?g:function(e,t,r){if(h(e),t=p(t,!0),h(r),f)try{return g(e,t,r)}catch(e){}if("get"in r||"set"in r)throw TypeError("Accessors not supported");return"value"in r&&(e[t]=r.value),e}},I=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},v=s?function(e,t,r){return m.f(e,t,I(1,r))}:function(e,t,r){return e[t]=r,e},y=function(e,t){try{v(o,e,t)}catch(r){o[e]=t}return t},b=o["__core-js_shared__"]||y("__core-js_shared__",{}),C=n((function(e){(e.exports=function(e,t){return b[e]||(b[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.6.5",mode:"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})})),k={}.hasOwnProperty,w=function(e,t){return k.call(e,t)},z=0,x=Math.random(),R=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++z+x).toString(36)},P=!!Object.getOwnPropertySymbols&&!a((function(){return!String(Symbol())})),S=P&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,q=C("wks"),O=o.Symbol,E=S?O:O&&O.withoutSetter||R,U=function(e){return w(q,e)||(P&&w(O,e)?q[e]=O[e]:q[e]=E("Symbol."+e)),q[e]},j={};j[U("toStringTag")]="z";var T="[object z]"===String(j),L=Function.toString;"function"!=typeof b.inspectSource&&(b.inspectSource=function(e){return L.call(e)});var A,B,N,_=b.inspectSource,G=o.WeakMap,F="function"==typeof G&&/native code/.test(_(G)),D=C("keys"),M=function(e){return D[e]||(D[e]=R(e))},$={},H=o.WeakMap;if(F){var V=new H,Y=V.get,K=V.has,W=V.set;A=function(e,t){return W.call(V,e,t),t},B=function(e){return Y.call(V,e)||{}},N=function(e){return K.call(V,e)}}else{var X=M("state");$[X]=!0,A=function(e,t){return v(e,X,t),t},B=function(e){return w(e,X)?e[X]:{}},N=function(e){return w(e,X)}}var J={set:A,get:B,has:N,enforce:function(e){return N(e)?B(e):A(e,{})},getterFor:function(e){return function(t){var r;if(!u(t)||(r=B(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return r}}},Q=n((function(e){var t=J.get,r=J.enforce,n=String(String).split("String");(e.exports=function(e,t,i,a){var s=!!a&&!!a.unsafe,u=!!a&&!!a.enumerable,d=!!a&&!!a.noTargetGet;"function"==typeof i&&("string"!=typeof t||w(i,"name")||v(i,"name",t),r(i).source=n.join("string"==typeof t?t:"")),e!==o?(s?!d&&e[t]&&(u=!0):delete e[t],u?e[t]=i:v(e,t,i)):u?e[t]=i:y(t,i)})(Function.prototype,"toString",(function(){return"function"==typeof this&&t(this).source||_(this)}))})),Z={}.toString,ee=function(e){return Z.call(e).slice(8,-1)},te=U("toStringTag"),re="Arguments"==ee(function(){return arguments}()),ne=T?ee: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=Object(e),te))?r:re?ee(t):"Object"==(n=ee(t))&&"function"==typeof t.callee?"Arguments":n},ie=T?{}.toString:function(){return"[object "+ne(this)+"]"};T||Q(Object.prototype,"toString",ie,{unsafe:!0});var oe=function(){var e=h(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t},ae=RegExp.prototype,se=ae.toString,ue=a((function(){return"/a/b"!=se.call({source:"a",flags:"b"})})),de="toString"!=se.name;(ue||de)&&Q(RegExp.prototype,"toString",(function(){var e=h(this),t=String(e.source),r=e.flags;return"/"+t+"/"+String(void 0===r&&e instanceof RegExp&&!("flags"in ae)?oe.call(e):r)}),{unsafe:!0});n((function(e){var t=function(e){var t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},i=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var i=t&&t.prototype instanceof l?t:l,o=Object.create(i.prototype),a=new w(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return x()}for(r.method=i,r.arg=o;;){var a=r.delegate;if(a){var s=b(a,r);if(s){if(s===c)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 u=d(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===c)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}(e,r,a),o}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=u;var c={};function l(){}function f(){}function h(){}var p={};p[i]=function(){return this};var g=Object.getPrototypeOf,m=g&&g(g(z([])));m&&m!==t&&r.call(m,i)&&(p=m);var I=h.prototype=l.prototype=Object.create(p);function v(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function y(e,t){var n;this._invoke=function(i,o){function a(){return new t((function(n,a){!function n(i,o,a,s){var u=d(e[i],e,o);if("throw"!==u.type){var c=u.arg,l=c.value;return l&&"object"==typeof l&&r.call(l,"__await")?t.resolve(l.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(l).then((function(e){c.value=e,a(c)}),(function(e){return n("throw",e,a,s)}))}s(u.arg)}(i,o,n,a)}))}return n=n?n.then(a,a):a()}}function b(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,b(e,t),"throw"===t.method))return c;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var n=d(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,c;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,c):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,c)}function C(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 k(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function w(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function z(e){if(e){var t=e[i];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:x}}function x(){return{value:void 0,done:!0}}return f.prototype=I.constructor=h,h.constructor=f,f.displayName=s(h,a,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,s(e,a,"GeneratorFunction")),e.prototype=Object.create(I),e},e.awrap=function(e){return{__await:e}},v(y.prototype),y.prototype[o]=function(){return this},e.AsyncIterator=y,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var a=new y(u(t,r,n,i),o);return e.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},v(I),s(I,a,"Generator"),I[i]=function(){return this},I.toString=function(){return"[object Generator]"},e.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}},e.values=z,w.prototype={constructor:w,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(k),!e)for(var t in this)"t"===t.charAt(0)&&r.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 n(r,n){return a.type="throw",a.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var s=r.call(o,"catchLoc"),u=r.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,c):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),c},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),k(r),c}},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;k(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:z(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),c}},e}(e.exports);try{regeneratorRuntime=t}catch(e){Function("r","regeneratorRuntime = r")(t)}}));function ce(e){return(ce="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)}function le(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function fe(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){le(o,n,i,a,s,"next",e)}function s(e){le(o,n,i,a,s,"throw",e)}a(void 0)}))}}function he(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function pe(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 ge(e,t,r){return t&&pe(e.prototype,t),r&&pe(e,r),e}function me(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ie(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 ve(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ie(Object(r),!0).forEach((function(t){me(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ie(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function ye(e){return(ye=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function be(e,t){return(be=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ce(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function ke(e,t,r){return(ke=Ce()?Reflect.construct:function(e,t,r){var n=[null];n.push.apply(n,t);var i=new(Function.bind.apply(e,n));return r&&be(i,r.prototype),i}).apply(null,arguments)}function we(e){var t="function"==typeof Map?new Map:void 0;return(we=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 ke(e,arguments,ye(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),be(n,e)})(e)}function ze(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}var xe={}.propertyIsEnumerable,Re=Object.getOwnPropertyDescriptor,Pe={f:Re&&!xe.call({1:2},1)?function(e){var t=Re(this,e);return!!t&&t.enumerable}:xe},Se="".split,qe=a((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==ee(e)?Se.call(e,""):Object(e)}:Object,Oe=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e},Ee=function(e){return qe(Oe(e))},Ue=Object.getOwnPropertyDescriptor,je={f:s?Ue:function(e,t){if(e=Ee(e),t=p(t,!0),f)try{return Ue(e,t)}catch(e){}if(w(e,t))return I(!Pe.f.call(e,t),e[t])}},Te=o,Le=function(e){return"function"==typeof e?e:void 0},Ae=function(e,t){return arguments.length<2?Le(Te[e])||Le(o[e]):Te[e]&&Te[e][t]||o[e]&&o[e][t]},Be=Math.ceil,Ne=Math.floor,_e=function(e){return isNaN(e=+e)?0:(e>0?Ne:Be)(e)},Ge=Math.min,Fe=function(e){return e>0?Ge(_e(e),9007199254740991):0},De=Math.max,Me=Math.min,$e=function(e){return function(t,r,n){var i,o=Ee(t),a=Fe(o.length),s=function(e,t){var r=_e(e);return r<0?De(r+t,0):Me(r,t)}(n,a);if(e&&r!=r){for(;a>s;)if((i=o[s++])!=i)return!0}else for(;a>s;s++)if((e||s in o)&&o[s]===r)return e||s||0;return!e&&-1}},He={includes:$e(!0),indexOf:$e(!1)}.indexOf,Ve=function(e,t){var r,n=Ee(e),i=0,o=[];for(r in n)!w($,r)&&w(n,r)&&o.push(r);for(;t.length>i;)w(n,r=t[i++])&&(~He(o,r)||o.push(r));return o},Ye=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Ke=Ye.concat("length","prototype"),We={f:Object.getOwnPropertyNames||function(e){return Ve(e,Ke)}},Xe={f:Object.getOwnPropertySymbols},Je=Ae("Reflect","ownKeys")||function(e){var t=We.f(h(e)),r=Xe.f;return r?t.concat(r(e)):t},Qe=function(e,t){for(var r=Je(t),n=m.f,i=je.f,o=0;o<r.length;o++){var a=r[o];w(e,a)||n(e,a,i(t,a))}},Ze=/#|\.prototype\./,et=function(e,t){var r=rt[tt(e)];return r==it||r!=nt&&("function"==typeof t?a(t):!!t)},tt=et.normalize=function(e){return String(e).replace(Ze,".").toLowerCase()},rt=et.data={},nt=et.NATIVE="N",it=et.POLYFILL="P",ot=et,at=je.f,st=function(e,t){var r,n,i,a,s,u=e.target,d=e.global,c=e.stat;if(r=d?o:c?o[u]||y(u,{}):(o[u]||{}).prototype)for(n in t){if(a=t[n],i=e.noTargetGet?(s=at(r,n))&&s.value:r[n],!ot(d?n:u+(c?".":"#")+n,e.forced)&&void 0!==i){if(typeof a==typeof i)continue;Qe(a,i)}(e.sham||i&&i.sham)&&v(a,"sham",!0),Q(r,n,a,e)}},ut=function(e){return Object(Oe(e))},dt=!a((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),ct=M("IE_PROTO"),lt=Object.prototype,ft=dt?Object.getPrototypeOf:function(e){return e=ut(e),w(e,ct)?e[ct]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?lt:null},ht=a((function(){ft(1)}));st({target:"Object",stat:!0,forced:ht,sham:!dt},{getPrototypeOf:function(e){return ft(ut(e))}});var pt=function e(){var t=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e.defaults;return he(t,e),me(t,"baseUri",void 0),me(t,"proxy",void 0),me(t,"headers",void 0),me(t,"parameters",void 0),me(t,"fetchOptions",void 0),me(t,"transformRequest",void 0),t.headers=ve({},r.headers),t.parameters=ve({},r.parameters),t.fetchOptions=ve({},r.fetchOptions),t.transformRequest=r.transformRequest||e.defaults.transformRequest,r.baseUri&&(t.baseUri=r.baseUri),void(r.proxy&&(t.proxy=r.proxy))};me(pt,"defaults",{transformRequest:function(e,t){if(null==e||"object"!==ce(e))return e;var r=Object.getPrototypeOf(e);return Array.isArray(e)||r===Object.prototype||null===r?(t["Content-Type"]="application/json",JSON.stringify(e)):e}});var gt,mt,It=Array.isArray||function(e){return"Array"==ee(e)},vt=function(e,t,r){var n=p(t);n in e?m.f(e,n,I(0,r)):e[n]=r},yt=U("species"),bt=function(e,t){var r;return It(e)&&("function"!=typeof(r=e.constructor)||r!==Array&&!It(r.prototype)?u(r)&&null===(r=r[yt])&&(r=void 0):r=void 0),new(void 0===r?Array:r)(0===t?0:t)},Ct=Ae("navigator","userAgent")||"",kt=o.process,wt=kt&&kt.versions,zt=wt&&wt.v8;zt?mt=(gt=zt.split("."))[0]+gt[1]:Ct&&(!(gt=Ct.match(/Edge\/(\d+)/))||gt[1]>=74)&&(gt=Ct.match(/Chrome\/(\d+)/))&&(mt=gt[1]);var xt=mt&&+mt,Rt=U("species"),Pt=U("isConcatSpreadable"),St=xt>=51||!a((function(){var e=[];return e[Pt]=!1,e.concat()[0]!==e})),qt=function(e){return xt>=51||!a((function(){var t=[];return(t.constructor={})[Rt]=function(){return{foo:1}},1!==t[e](Boolean).foo}))}("concat"),Ot=function(e){if(!u(e))return!1;var t=e[Pt];return void 0!==t?!!t:It(e)};st({target:"Array",proto:!0,forced:!St||!qt},{concat:function(e){var t,r,n,i,o,a=ut(this),s=bt(a,0),u=0;for(t=-1,n=arguments.length;t<n;t++)if(Ot(o=-1===t?a:arguments[t])){if(u+(i=Fe(o.length))>9007199254740991)throw TypeError("Maximum allowed index exceeded");for(r=0;r<i;r++,u++)r in o&&vt(s,u,o[r])}else{if(u>=9007199254740991)throw TypeError("Maximum allowed index exceeded");vt(s,u++,o)}return s.length=u,s}});var Et=function(e,t,r){if(function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function")}(e),void 0===t)return e;switch(r){case 0:return function(){return e.call(t)};case 1:return function(r){return e.call(t,r)};case 2:return function(r,n){return e.call(t,r,n)};case 3:return function(r,n,i){return e.call(t,r,n,i)}}return function(){return e.apply(t,arguments)}},Ut=[].push,jt=function(e){var t=1==e,r=2==e,n=3==e,i=4==e,o=6==e,a=5==e||o;return function(s,u,d,c){for(var l,f,h=ut(s),p=qe(h),g=Et(u,d,3),m=Fe(p.length),I=0,v=c||bt,y=t?v(s,m):r?v(s,0):void 0;m>I;I++)if((a||I in p)&&(f=g(l=p[I],I,h),e))if(t)y[I]=f;else if(f)switch(e){case 3:return!0;case 5:return l;case 6:return I;case 2:Ut.call(y,l)}else if(i)return!1;return o?-1:n||i?i:y}},Tt={forEach:jt(0),map:jt(1),filter:jt(2),some:jt(3),every:jt(4),find:jt(5),findIndex:jt(6)},Lt=Object.defineProperty,At={},Bt=function(e){throw e},Nt=Tt.forEach,_t=function(e,t){var r=[][e];return!!r&&a((function(){r.call(null,t||function(){throw 1},1)}))}("forEach"),Gt=function(e,t){if(w(At,e))return At[e];t||(t={});var r=[][e],n=!!w(t,"ACCESSORS")&&t.ACCESSORS,i=w(t,0)?t[0]:Bt,o=w(t,1)?t[1]:void 0;return At[e]=!!r&&!a((function(){if(n&&!s)return!0;var e={length:-1};n?Lt(e,1,{enumerable:!0,get:Bt}):e[1]=1,r.call(e,i,o)}))}("forEach"),Ft=_t&&Gt?[].forEach:function(e){return Nt(this,e,arguments.length>1?arguments[1]:void 0)};st({target:"Array",proto:!0,forced:[].forEach!=Ft},{forEach:Ft});var Dt,Mt=Object.keys||function(e){return Ve(e,Ye)},$t=s?Object.defineProperties:function(e,t){h(e);for(var r,n=Mt(t),i=n.length,o=0;i>o;)m.f(e,r=n[o++],t[r]);return e},Ht=Ae("document","documentElement"),Vt=M("IE_PROTO"),Yt=function(){},Kt=function(e){return"<script>"+e+"<\/script>"},Wt=function(){try{Dt=document.domain&&new ActiveXObject("htmlfile")}catch(e){}var e,t;Wt=Dt?function(e){e.write(Kt("")),e.close();var t=e.parentWindow.Object;return e=null,t}(Dt):((t=l("iframe")).style.display="none",Ht.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(Kt("document.F=Object")),e.close(),e.F);for(var r=Ye.length;r--;)delete Wt.prototype[Ye[r]];return Wt()};$[Vt]=!0;var Xt=Object.create||function(e,t){var r;return null!==e?(Yt.prototype=h(e),r=new Yt,Yt.prototype=null,r[Vt]=e):r=Wt(),void 0===t?r:$t(r,t)},Jt=U("unscopables"),Qt=Array.prototype;null==Qt[Jt]&&m.f(Qt,Jt,{configurable:!0,value:Xt(null)});var Zt,er,tr,rr=function(e){Qt[Jt][e]=!0},nr={},ir=U("iterator"),or=!1;[].keys&&("next"in(tr=[].keys())?(er=ft(ft(tr)))!==Object.prototype&&(Zt=er):or=!0),null==Zt&&(Zt={}),w(Zt,ir)||v(Zt,ir,(function(){return this}));var ar={IteratorPrototype:Zt,BUGGY_SAFARI_ITERATORS:or},sr=m.f,ur=U("toStringTag"),dr=function(e,t,r){e&&!w(e=r?e:e.prototype,ur)&&sr(e,ur,{configurable:!0,value:t})},cr=ar.IteratorPrototype,lr=function(){return this},fr=function(e,t,r){var n=t+" Iterator";return e.prototype=Xt(cr,{next:I(1,r)}),dr(e,n,!1),nr[n]=lr,e},hr=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,r={};try{(e=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(r,[]),t=r instanceof Array}catch(e){}return function(r,n){return h(r),function(e){if(!u(e)&&null!==e)throw TypeError("Can't set "+String(e)+" as a prototype")}(n),t?e.call(r,n):r.__proto__=n,r}}():void 0),pr=ar.IteratorPrototype,gr=ar.BUGGY_SAFARI_ITERATORS,mr=U("iterator"),Ir=function(){return this},vr=function(e,t,r,n,i,o,a){fr(r,t,n);var s,u,d,c=function(e){if(e===i&&g)return g;if(!gr&&e in h)return h[e];switch(e){case"keys":case"values":case"entries":return function(){return new r(this,e)}}return function(){return new r(this)}},l=t+" Iterator",f=!1,h=e.prototype,p=h[mr]||h["@@iterator"]||i&&h[i],g=!gr&&p||c(i),m="Array"==t&&h.entries||p;if(m&&(s=ft(m.call(new e)),pr!==Object.prototype&&s.next&&(ft(s)!==pr&&(hr?hr(s,pr):"function"!=typeof s[mr]&&v(s,mr,Ir)),dr(s,l,!0))),"values"==i&&p&&"values"!==p.name&&(f=!0,g=function(){return p.call(this)}),h[mr]!==g&&v(h,mr,g),nr[t]=g,i)if(u={values:c("values"),keys:o?g:c("keys"),entries:c("entries")},a)for(d in u)(gr||f||!(d in h))&&Q(h,d,u[d]);else st({target:t,proto:!0,forced:gr||f},u);return u},yr=J.set,br=J.getterFor("Array Iterator"),Cr=vr(Array,"Array",(function(e,t){yr(this,{type:"Array Iterator",target:Ee(e),index:0,kind:t})}),(function(){var e=br(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");nr.Arguments=nr.Array,rr("keys"),rr("values"),rr("entries");var kr=a((function(){Mt(1)}));function wr(e,t){return RegExp(e,t)}st({target:"Object",stat:!0,forced:kr},{keys:function(e){return Mt(ut(e))}});var zr,xr,Rr={UNSUPPORTED_Y:a((function(){var e=wr("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),BROKEN_CARET:a((function(){var e=wr("^r","gy");return e.lastIndex=2,null!=e.exec("str")}))},Pr=RegExp.prototype.exec,Sr=String.prototype.replace,qr=Pr,Or=(zr=/a/,xr=/b*/g,Pr.call(zr,"a"),Pr.call(xr,"a"),0!==zr.lastIndex||0!==xr.lastIndex),Er=Rr.UNSUPPORTED_Y||Rr.BROKEN_CARET,Ur=void 0!==/()??/.exec("")[1];(Or||Ur||Er)&&(qr=function(e){var t,r,n,i,o=this,a=Er&&o.sticky,s=oe.call(o),u=o.source,d=0,c=e;return a&&(-1===(s=s.replace("y","")).indexOf("g")&&(s+="g"),c=String(e).slice(o.lastIndex),o.lastIndex>0&&(!o.multiline||o.multiline&&"\n"!==e[o.lastIndex-1])&&(u="(?: "+u+")",c=" "+c,d++),r=new RegExp("^(?:"+u+")",s)),Ur&&(r=new RegExp("^"+u+"$(?!\\s)",s)),Or&&(t=o.lastIndex),n=Pr.call(a?r:o,c),a?n?(n.input=n.input.slice(d),n[0]=n[0].slice(d),n.index=o.lastIndex,o.lastIndex+=n[0].length):o.lastIndex=0:Or&&n&&(o.lastIndex=o.global?n.index+n[0].length:t),Ur&&n&&n.length>1&&Sr.call(n[0],r,(function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(n[i]=void 0)})),n});var jr=qr;st({target:"RegExp",proto:!0,forced:/./.exec!==jr},{exec:jr});var Tr=function(e){return function(t,r){var n,i,o=String(Oe(t)),a=_e(r),s=o.length;return a<0||a>=s?e?"":void 0:(n=o.charCodeAt(a))<55296||n>56319||a+1===s||(i=o.charCodeAt(a+1))<56320||i>57343?e?o.charAt(a):n:e?o.slice(a,a+2):i-56320+(n-55296<<10)+65536}},Lr={codeAt:Tr(!1),charAt:Tr(!0)},Ar=Lr.charAt,Br=J.set,Nr=J.getterFor("String Iterator");vr(String,"String",(function(e){Br(this,{type:"String Iterator",string:String(e),index:0})}),(function(){var e,t=Nr(this),r=t.string,n=t.index;return n>=r.length?{value:void 0,done:!0}:(e=Ar(r,n),t.index+=e.length,{value:e,done:!1})}));var _r=U("species"),Gr=!a((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")})),Fr="$0"==="a".replace(/./,"$0"),Dr=U("replace"),Mr=!!/./[Dr]&&""===/./[Dr]("a","$0"),$r=!a((function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var r="ab".split(e);return 2!==r.length||"a"!==r[0]||"b"!==r[1]})),Hr=Lr.charAt,Vr=function(e,t,r){return t+(r?Hr(e,t).length:1)},Yr=function(e,t){var r=e.exec;if("function"==typeof r){var n=r.call(e,t);if("object"!=typeof n)throw TypeError("RegExp exec method returned something other than an Object or null");return n}if("RegExp"!==ee(e))throw TypeError("RegExp#exec called on incompatible receiver");return jr.call(e,t)},Kr=Math.max,Wr=Math.min,Xr=Math.floor,Jr=/\$([$&'`]|\d\d?|<[^>]*>)/g,Qr=/\$([$&'`]|\d\d?)/g;!function(e,t,r,n){var i=U(e),o=!a((function(){var t={};return t[i]=function(){return 7},7!=""[e](t)})),s=o&&!a((function(){var t=!1,r=/a/;return"split"===e&&((r={}).constructor={},r.constructor[_r]=function(){return r},r.flags="",r[i]=/./[i]),r.exec=function(){return t=!0,null},r[i](""),!t}));if(!o||!s||"replace"===e&&(!Gr||!Fr||Mr)||"split"===e&&!$r){var u=/./[i],d=r(i,""[e],(function(e,t,r,n,i){return t.exec===jr?o&&!i?{done:!0,value:u.call(t,r,n)}:{done:!0,value:e.call(r,t,n)}:{done:!1}}),{REPLACE_KEEPS_$0:Fr,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:Mr}),c=d[0],l=d[1];Q(String.prototype,e,c),Q(RegExp.prototype,i,2==t?function(e,t){return l.call(e,this,t)}:function(e){return l.call(e,this)})}n&&v(RegExp.prototype[i],"sham",!0)}("replace",2,(function(e,t,r,n){var i=n.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,o=n.REPLACE_KEEPS_$0,a=i?"$":"$0";return[function(r,n){var i=Oe(this),o=null==r?void 0:r[e];return void 0!==o?o.call(r,i,n):t.call(String(i),r,n)},function(e,n){if(!i&&o||"string"==typeof n&&-1===n.indexOf(a)){var u=r(t,e,this,n);if(u.done)return u.value}var d=h(e),c=String(this),l="function"==typeof n;l||(n=String(n));var f=d.global;if(f){var p=d.unicode;d.lastIndex=0}for(var g=[];;){var m=Yr(d,c);if(null===m)break;if(g.push(m),!f)break;""===String(m[0])&&(d.lastIndex=Vr(c,Fe(d.lastIndex),p))}for(var I,v="",y=0,b=0;b<g.length;b++){m=g[b];for(var C=String(m[0]),k=Kr(Wr(_e(m.index),c.length),0),w=[],z=1;z<m.length;z++)w.push(void 0===(I=m[z])?I:String(I));var x=m.groups;if(l){var R=[C].concat(w,k,c);void 0!==x&&R.push(x);var P=String(n.apply(void 0,R))}else P=s(C,c,k,w,x,n);k>=y&&(v+=c.slice(y,k)+P,y=k+C.length)}return v+c.slice(y)}];function s(e,r,n,i,o,a){var s=n+e.length,u=i.length,d=Qr;return void 0!==o&&(o=ut(o),d=Jr),t.call(a,d,(function(t,a){var d;switch(a.charAt(0)){case"$":return"$";case"&":return e;case"`":return r.slice(0,n);case"'":return r.slice(s);case"<":d=o[a.slice(1,-1)];break;default:var c=+a;if(0===c)return t;if(c>u){var l=Xr(c/10);return 0===l?t:l<=u?void 0===i[l-1]?a.charAt(1):i[l-1]+a.charAt(1):t}d=i[c-1]}return void 0===d?"":d}))}}));var Zr={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};for(var en in Zr){var tn=o[en],rn=tn&&tn.prototype;if(rn&&rn.forEach!==Ft)try{v(rn,"forEach",Ft)}catch(e){rn.forEach=Ft}}var nn=U("iterator"),on=U("toStringTag"),an=Cr.values;for(var sn in Zr){var un=o[sn],dn=un&&un.prototype;if(dn){if(dn[nn]!==an)try{v(dn,nn,an)}catch(e){dn[nn]=an}if(dn[on]||v(dn,on,sn),Zr[sn])for(var cn in Cr)if(dn[cn]!==Cr[cn])try{v(dn,cn,Cr[cn])}catch(e){dn[cn]=Cr[cn]}}}var ln=U("iterator"),fn=!a((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[ln]||"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})),hn=function(e,t,r){if(!(e instanceof t))throw TypeError("Incorrect "+(r?r+" ":"")+"invocation");return e},pn=Object.assign,gn=Object.defineProperty,mn=!pn||a((function(){if(s&&1!==pn({b:1},pn(gn({},"a",{enumerable:!0,get:function(){gn(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!=pn({},e)[r]||"abcdefghijklmnopqrst"!=Mt(pn({},t)).join("")}))?function(e,t){for(var r=ut(e),n=arguments.length,i=1,o=Xe.f,a=Pe.f;n>i;)for(var u,d=qe(arguments[i++]),c=o?Mt(d).concat(o(d)):Mt(d),l=c.length,f=0;l>f;)u=c[f++],s&&!a.call(d,u)||(r[u]=d[u]);return r}:pn,In=function(e,t,r,n){try{return n?t(h(r)[0],r[1]):t(r)}catch(t){var i=e.return;throw void 0!==i&&h(i.call(e)),t}},vn=U("iterator"),yn=Array.prototype,bn=function(e){return void 0!==e&&(nr.Array===e||yn[vn]===e)},Cn=U("iterator"),kn=function(e){if(null!=e)return e[Cn]||e["@@iterator"]||nr[ne(e)]},wn=function(e){var t,r,n,i,o,a,s=ut(e),u="function"==typeof this?this:Array,d=arguments.length,c=d>1?arguments[1]:void 0,l=void 0!==c,f=kn(s),h=0;if(l&&(c=Et(c,d>2?arguments[2]:void 0,2)),null==f||u==Array&&bn(f))for(r=new u(t=Fe(s.length));t>h;h++)a=l?c(s[h],h):s[h],vt(r,h,a);else for(o=(i=f.call(s)).next,r=new u;!(n=o.call(i)).done;h++)a=l?In(i,c,[n.value,h],!0):n.value,vt(r,h,a);return r.length=h,r},zn=/[^\0-\u007E]/,xn=/[.\u3002\uFF0E\uFF61]/g,Rn="Overflow: input needs wider integers to process",Pn=Math.floor,Sn=String.fromCharCode,qn=function(e){return e+22+75*(e<26)},On=function(e,t,r){var n=0;for(e=r?Pn(e/700):e>>1,e+=Pn(e/t);e>455;n+=36)e=Pn(e/35);return Pn(n+36*e/(e+38))},En=function(e){var t,r,n=[],i=(e=function(e){for(var t=[],r=0,n=e.length;r<n;){var i=e.charCodeAt(r++);if(i>=55296&&i<=56319&&r<n){var o=e.charCodeAt(r++);56320==(64512&o)?t.push(((1023&i)<<10)+(1023&o)+65536):(t.push(i),r--)}else t.push(i)}return t}(e)).length,o=128,a=0,s=72;for(t=0;t<e.length;t++)(r=e[t])<128&&n.push(Sn(r));var u=n.length,d=u;for(u&&n.push("-");d<i;){var c=2147483647;for(t=0;t<e.length;t++)(r=e[t])>=o&&r<c&&(c=r);var l=d+1;if(c-o>Pn((2147483647-a)/l))throw RangeError(Rn);for(a+=(c-o)*l,o=c,t=0;t<e.length;t++){if((r=e[t])<o&&++a>2147483647)throw RangeError(Rn);if(r==o){for(var f=a,h=36;;h+=36){var p=h<=s?1:h>=s+26?26:h-s;if(f<p)break;var g=f-p,m=36-p;n.push(Sn(qn(p+g%m))),f=Pn(g/m)}n.push(Sn(qn(f))),s=On(a,l,d==u),a=0,++d}}++a,++o}return n.join("")},Un=function(e){var t=kn(e);if("function"!=typeof t)throw TypeError(String(e)+" is not iterable");return h(t.call(e))},jn=Ae("fetch"),Tn=Ae("Headers"),Ln=U("iterator"),An=J.set,Bn=J.getterFor("URLSearchParams"),Nn=J.getterFor("URLSearchParamsIterator"),_n=/\+/g,Gn=Array(4),Fn=function(e){return Gn[e-1]||(Gn[e-1]=RegExp("((?:%[\\da-f]{2}){"+e+"})","gi"))},Dn=function(e){try{return decodeURIComponent(e)}catch(t){return e}},Mn=function(e){var t=e.replace(_n," "),r=4;try{return decodeURIComponent(t)}catch(e){for(;r;)t=t.replace(Fn(r--),Dn);return t}},$n=/[!'()~]|%20/g,Hn={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},Vn=function(e){return Hn[e]},Yn=function(e){return encodeURIComponent(e).replace($n,Vn)},Kn=function(e,t){if(t)for(var r,n,i=t.split("&"),o=0;o<i.length;)(r=i[o++]).length&&(n=r.split("="),e.push({key:Mn(n.shift()),value:Mn(n.join("="))}))},Wn=function(e){this.entries.length=0,Kn(this.entries,e)},Xn=function(e,t){if(e<t)throw TypeError("Not enough arguments")},Jn=fr((function(e,t){An(this,{type:"URLSearchParamsIterator",iterator:Un(Bn(e).entries),kind:t})}),"Iterator",(function(){var e=Nn(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})),Qn=function(){hn(this,Qn,"URLSearchParams");var e,t,r,n,i,o,a,s,d,c=arguments.length>0?arguments[0]:void 0,l=this,f=[];if(An(l,{type:"URLSearchParams",entries:f,updateURL:function(){},updateSearchParams:Wn}),void 0!==c)if(u(c))if("function"==typeof(e=kn(c)))for(r=(t=e.call(c)).next;!(n=r.call(t)).done;){if((a=(o=(i=Un(h(n.value))).next).call(i)).done||(s=o.call(i)).done||!o.call(i).done)throw TypeError("Expected sequence with length 2");f.push({key:a.value+"",value:s.value+""})}else for(d in c)w(c,d)&&f.push({key:d,value:c[d]+""});else Kn(f,"string"==typeof c?"?"===c.charAt(0)?c.slice(1):c:c+"")},Zn=Qn.prototype;!function(e,t,r){for(var n in t)Q(e,n,t[n],r)}(Zn,{append:function(e,t){Xn(arguments.length,2);var r=Bn(this);r.entries.push({key:e+"",value:t+""}),r.updateURL()},delete:function(e){Xn(arguments.length,1);for(var t=Bn(this),r=t.entries,n=e+"",i=0;i<r.length;)r[i].key===n?r.splice(i,1):i++;t.updateURL()},get:function(e){Xn(arguments.length,1);for(var t=Bn(this).entries,r=e+"",n=0;n<t.length;n++)if(t[n].key===r)return t[n].value;return null},getAll:function(e){Xn(arguments.length,1);for(var t=Bn(this).entries,r=e+"",n=[],i=0;i<t.length;i++)t[i].key===r&&n.push(t[i].value);return n},has:function(e){Xn(arguments.length,1);for(var t=Bn(this).entries,r=e+"",n=0;n<t.length;)if(t[n++].key===r)return!0;return!1},set:function(e,t){Xn(arguments.length,1);for(var r,n=Bn(this),i=n.entries,o=!1,a=e+"",s=t+"",u=0;u<i.length;u++)(r=i[u]).key===a&&(o?i.splice(u--,1):(o=!0,r.value=s));o||i.push({key:a,value:s}),n.updateURL()},sort:function(){var e,t,r,n=Bn(this),i=n.entries,o=i.slice();for(i.length=0,r=0;r<o.length;r++){for(e=o[r],t=0;t<r;t++)if(i[t].key>e.key){i.splice(t,0,e);break}t===r&&i.push(e)}n.updateURL()},forEach:function(e){for(var t,r=Bn(this).entries,n=Et(e,arguments.length>1?arguments[1]:void 0,3),i=0;i<r.length;)n((t=r[i++]).value,t.key,this)},keys:function(){return new Jn(this,"keys")},values:function(){return new Jn(this,"values")},entries:function(){return new Jn(this,"entries")}},{enumerable:!0}),Q(Zn,Ln,Zn.entries),Q(Zn,"toString",(function(){for(var e,t=Bn(this).entries,r=[],n=0;n<t.length;)e=t[n++],r.push(Yn(e.key)+"="+Yn(e.value));return r.join("&")}),{enumerable:!0}),dr(Qn,"URLSearchParams"),st({global:!0,forced:!fn},{URLSearchParams:Qn}),fn||"function"!=typeof jn||"function"!=typeof Tn||st({global:!0,enumerable:!0,forced:!0},{fetch:function(e){var t,r,n,i=[e];return arguments.length>1&&(u(t=arguments[1])&&(r=t.body,"URLSearchParams"===ne(r)&&((n=t.headers?new Tn(t.headers):new Tn).has("content-type")||n.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"),t=Xt(t,{body:I(0,String(r)),headers:I(0,n)}))),i.push(t)),jn.apply(this,i)}});var ei,ti={URLSearchParams:Qn,getState:Bn},ri=Lr.codeAt,ni=o.URL,ii=ti.URLSearchParams,oi=ti.getState,ai=J.set,si=J.getterFor("URL"),ui=Math.floor,di=Math.pow,ci=/[A-Za-z]/,li=/[\d+-.A-Za-z]/,fi=/\d/,hi=/^(0x|0X)/,pi=/^[0-7]+$/,gi=/^\d+$/,mi=/^[\dA-Fa-f]+$/,Ii=/[\u0000\u0009\u000A\u000D #%/:?@[\\]]/,vi=/[\u0000\u0009\u000A\u000D #/:?@[\\]]/,yi=/^[\u0000-\u001F ]+|[\u0000-\u001F ]+$/g,bi=/[\u0009\u000A\u000D]/g,Ci=function(e,t){var r,n,i;if("["==t.charAt(0)){if("]"!=t.charAt(t.length-1))return"Invalid host";if(!(r=wi(t.slice(1,-1))))return"Invalid host";e.host=r}else if(Ei(e)){if(t=function(e){var t,r,n=[],i=e.toLowerCase().replace(xn,".").split(".");for(t=0;t<i.length;t++)r=i[t],n.push(zn.test(r)?"xn--"+En(r):r);return n.join(".")}(t),Ii.test(t))return"Invalid host";if(null===(r=ki(t)))return"Invalid host";e.host=r}else{if(vi.test(t))return"Invalid host";for(r="",n=wn(t),i=0;i<n.length;i++)r+=qi(n[i],xi);e.host=r}},ki=function(e){var t,r,n,i,o,a,s,u=e.split(".");if(u.length&&""==u[u.length-1]&&u.pop(),(t=u.length)>4)return e;for(r=[],n=0;n<t;n++){if(""==(i=u[n]))return e;if(o=10,i.length>1&&"0"==i.charAt(0)&&(o=hi.test(i)?16:8,i=i.slice(8==o?1:2)),""===i)a=0;else{if(!(10==o?gi:8==o?pi:mi).test(i))return e;a=parseInt(i,o)}r.push(a)}for(n=0;n<t;n++)if(a=r[n],n==t-1){if(a>=di(256,5-t))return null}else if(a>255)return null;for(s=r.pop(),n=0;n<r.length;n++)s+=r[n]*di(256,3-n);return s},wi=function(e){var t,r,n,i,o,a,s,u=[0,0,0,0,0,0,0,0],d=0,c=null,l=0,f=function(){return e.charAt(l)};if(":"==f()){if(":"!=e.charAt(1))return;l+=2,c=++d}for(;f();){if(8==d)return;if(":"!=f()){for(t=r=0;r<4&&mi.test(f());)t=16*t+parseInt(f(),16),l++,r++;if("."==f()){if(0==r)return;if(l-=r,d>6)return;for(n=0;f();){if(i=null,n>0){if(!("."==f()&&n<4))return;l++}if(!fi.test(f()))return;for(;fi.test(f());){if(o=parseInt(f(),10),null===i)i=o;else{if(0==i)return;i=10*i+o}if(i>255)return;l++}u[d]=256*u[d]+i,2!=++n&&4!=n||d++}if(4!=n)return;break}if(":"==f()){if(l++,!f())return}else if(f())return;u[d++]=t}else{if(null!==c)return;l++,c=++d}}if(null!==c)for(a=d-c,d=7;0!=d&&a>0;)s=u[d],u[d--]=u[c+a-1],u[c+--a]=s;else if(8!=d)return;return u},zi=function(e){var t,r,n,i;if("number"==typeof e){for(t=[],r=0;r<4;r++)t.unshift(e%256),e=ui(e/256);return t.join(".")}if("object"==typeof e){for(t="",n=function(e){for(var t=null,r=1,n=null,i=0,o=0;o<8;o++)0!==e[o]?(i>r&&(t=n,r=i),n=null,i=0):(null===n&&(n=o),++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+=e[r].toString(16),r<7&&(t+=":")));return"["+t+"]"}return e},xi={},Ri=mn({},xi,{" ":1,'"':1,"<":1,">":1,"`":1}),Pi=mn({},Ri,{"#":1,"?":1,"{":1,"}":1}),Si=mn({},Pi,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),qi=function(e,t){var r=ri(e,0);return r>32&&r<127&&!w(t,e)?e:encodeURIComponent(e)},Oi={ftp:21,file:null,http:80,https:443,ws:80,wss:443},Ei=function(e){return w(Oi,e.scheme)},Ui=function(e){return""!=e.username||""!=e.password},ji=function(e){return!e.host||e.cannotBeABaseURL||"file"==e.scheme},Ti=function(e,t){var r;return 2==e.length&&ci.test(e.charAt(0))&&(":"==(r=e.charAt(1))||!t&&"|"==r)},Li=function(e){var t;return e.length>1&&Ti(e.slice(0,2))&&(2==e.length||"/"===(t=e.charAt(2))||"\\"===t||"?"===t||"#"===t)},Ai=function(e){var t=e.path,r=t.length;!r||"file"==e.scheme&&1==r&&Ti(t[0],!0)||t.pop()},Bi=function(e){return"."===e||"%2e"===e.toLowerCase()},Ni={},_i={},Gi={},Fi={},Di={},Mi={},$i={},Hi={},Vi={},Yi={},Ki={},Wi={},Xi={},Ji={},Qi={},Zi={},eo={},to={},ro={},no={},io={},oo=function(e,t,r,n){var i,o,a,s,u,d=r||Ni,c=0,l="",f=!1,h=!1,p=!1;for(r||(e.scheme="",e.username="",e.password="",e.host=null,e.port=null,e.path=[],e.query=null,e.fragment=null,e.cannotBeABaseURL=!1,t=t.replace(yi,"")),t=t.replace(bi,""),i=wn(t);c<=i.length;){switch(o=i[c],d){case Ni:if(!o||!ci.test(o)){if(r)return"Invalid scheme";d=Gi;continue}l+=o.toLowerCase(),d=_i;break;case _i:if(o&&(li.test(o)||"+"==o||"-"==o||"."==o))l+=o.toLowerCase();else{if(":"!=o){if(r)return"Invalid scheme";l="",d=Gi,c=0;continue}if(r&&(Ei(e)!=w(Oi,l)||"file"==l&&(Ui(e)||null!==e.port)||"file"==e.scheme&&!e.host))return;if(e.scheme=l,r)return void(Ei(e)&&Oi[e.scheme]==e.port&&(e.port=null));l="","file"==e.scheme?d=Ji:Ei(e)&&n&&n.scheme==e.scheme?d=Fi:Ei(e)?d=Hi:"/"==i[c+1]?(d=Di,c++):(e.cannotBeABaseURL=!0,e.path.push(""),d=ro)}break;case Gi:if(!n||n.cannotBeABaseURL&&"#"!=o)return"Invalid scheme";if(n.cannotBeABaseURL&&"#"==o){e.scheme=n.scheme,e.path=n.path.slice(),e.query=n.query,e.fragment="",e.cannotBeABaseURL=!0,d=io;break}d="file"==n.scheme?Ji:Mi;continue;case Fi:if("/"!=o||"/"!=i[c+1]){d=Mi;continue}d=Vi,c++;break;case Di:if("/"==o){d=Yi;break}d=to;continue;case Mi:if(e.scheme=n.scheme,o==ei)e.username=n.username,e.password=n.password,e.host=n.host,e.port=n.port,e.path=n.path.slice(),e.query=n.query;else if("/"==o||"\\"==o&&Ei(e))d=$i;else if("?"==o)e.username=n.username,e.password=n.password,e.host=n.host,e.port=n.port,e.path=n.path.slice(),e.query="",d=no;else{if("#"!=o){e.username=n.username,e.password=n.password,e.host=n.host,e.port=n.port,e.path=n.path.slice(),e.path.pop(),d=to;continue}e.username=n.username,e.password=n.password,e.host=n.host,e.port=n.port,e.path=n.path.slice(),e.query=n.query,e.fragment="",d=io}break;case $i:if(!Ei(e)||"/"!=o&&"\\"!=o){if("/"!=o){e.username=n.username,e.password=n.password,e.host=n.host,e.port=n.port,d=to;continue}d=Yi}else d=Vi;break;case Hi:if(d=Vi,"/"!=o||"/"!=l.charAt(c+1))continue;c++;break;case Vi:if("/"!=o&&"\\"!=o){d=Yi;continue}break;case Yi:if("@"==o){f&&(l="%40"+l),f=!0,a=wn(l);for(var g=0;g<a.length;g++){var m=a[g];if(":"!=m||p){var I=qi(m,Si);p?e.password+=I:e.username+=I}else p=!0}l=""}else if(o==ei||"/"==o||"?"==o||"#"==o||"\\"==o&&Ei(e)){if(f&&""==l)return"Invalid authority";c-=wn(l).length+1,l="",d=Ki}else l+=o;break;case Ki:case Wi:if(r&&"file"==e.scheme){d=Zi;continue}if(":"!=o||h){if(o==ei||"/"==o||"?"==o||"#"==o||"\\"==o&&Ei(e)){if(Ei(e)&&""==l)return"Invalid host";if(r&&""==l&&(Ui(e)||null!==e.port))return;if(s=Ci(e,l))return s;if(l="",d=eo,r)return;continue}"["==o?h=!0:"]"==o&&(h=!1),l+=o}else{if(""==l)return"Invalid host";if(s=Ci(e,l))return s;if(l="",d=Xi,r==Wi)return}break;case Xi:if(!fi.test(o)){if(o==ei||"/"==o||"?"==o||"#"==o||"\\"==o&&Ei(e)||r){if(""!=l){var v=parseInt(l,10);if(v>65535)return"Invalid port";e.port=Ei(e)&&v===Oi[e.scheme]?null:v,l=""}if(r)return;d=eo;continue}return"Invalid port"}l+=o;break;case Ji:if(e.scheme="file","/"==o||"\\"==o)d=Qi;else{if(!n||"file"!=n.scheme){d=to;continue}if(o==ei)e.host=n.host,e.path=n.path.slice(),e.query=n.query;else if("?"==o)e.host=n.host,e.path=n.path.slice(),e.query="",d=no;else{if("#"!=o){Li(i.slice(c).join(""))||(e.host=n.host,e.path=n.path.slice(),Ai(e)),d=to;continue}e.host=n.host,e.path=n.path.slice(),e.query=n.query,e.fragment="",d=io}}break;case Qi:if("/"==o||"\\"==o){d=Zi;break}n&&"file"==n.scheme&&!Li(i.slice(c).join(""))&&(Ti(n.path[0],!0)?e.path.push(n.path[0]):e.host=n.host),d=to;continue;case Zi:if(o==ei||"/"==o||"\\"==o||"?"==o||"#"==o){if(!r&&Ti(l))d=to;else if(""==l){if(e.host="",r)return;d=eo}else{if(s=Ci(e,l))return s;if("localhost"==e.host&&(e.host=""),r)return;l="",d=eo}continue}l+=o;break;case eo:if(Ei(e)){if(d=to,"/"!=o&&"\\"!=o)continue}else if(r||"?"!=o)if(r||"#"!=o){if(o!=ei&&(d=to,"/"!=o))continue}else e.fragment="",d=io;else e.query="",d=no;break;case to:if(o==ei||"/"==o||"\\"==o&&Ei(e)||!r&&("?"==o||"#"==o)){if(".."===(u=(u=l).toLowerCase())||"%2e."===u||".%2e"===u||"%2e%2e"===u?(Ai(e),"/"==o||"\\"==o&&Ei(e)||e.path.push("")):Bi(l)?"/"==o||"\\"==o&&Ei(e)||e.path.push(""):("file"==e.scheme&&!e.path.length&&Ti(l)&&(e.host&&(e.host=""),l=l.charAt(0)+":"),e.path.push(l)),l="","file"==e.scheme&&(o==ei||"?"==o||"#"==o))for(;e.path.length>1&&""===e.path[0];)e.path.shift();"?"==o?(e.query="",d=no):"#"==o&&(e.fragment="",d=io)}else l+=qi(o,Pi);break;case ro:"?"==o?(e.query="",d=no):"#"==o?(e.fragment="",d=io):o!=ei&&(e.path[0]+=qi(o,xi));break;case no:r||"#"!=o?o!=ei&&("'"==o&&Ei(e)?e.query+="%27":e.query+="#"==o?"%23":qi(o,xi)):(e.fragment="",d=io);break;case io:o!=ei&&(e.fragment+=qi(o,Ri))}c++}},ao=function(e){var t,r,n=hn(this,ao,"URL"),i=arguments.length>1?arguments[1]:void 0,o=String(e),a=ai(n,{type:"URL"});if(void 0!==i)if(i instanceof ao)t=si(i);else if(r=oo(t={},String(i)))throw TypeError(r);if(r=oo(a,o,null,t))throw TypeError(r);var u=a.searchParams=new ii,d=oi(u);d.updateSearchParams(a.query),d.updateURL=function(){a.query=String(u)||null},s||(n.href=uo.call(n),n.origin=co.call(n),n.protocol=lo.call(n),n.username=fo.call(n),n.password=ho.call(n),n.host=po.call(n),n.hostname=go.call(n),n.port=mo.call(n),n.pathname=Io.call(n),n.search=vo.call(n),n.searchParams=yo.call(n),n.hash=bo.call(n))},so=ao.prototype,uo=function(){var e=si(this),t=e.scheme,r=e.username,n=e.password,i=e.host,o=e.port,a=e.path,s=e.query,u=e.fragment,d=t+":";return null!==i?(d+="//",Ui(e)&&(d+=r+(n?":"+n:"")+"@"),d+=zi(i),null!==o&&(d+=":"+o)):"file"==t&&(d+="//"),d+=e.cannotBeABaseURL?a[0]:a.length?"/"+a.join("/"):"",null!==s&&(d+="?"+s),null!==u&&(d+="#"+u),d},co=function(){var e=si(this),t=e.scheme,r=e.port;if("blob"==t)try{return new URL(t.path[0]).origin}catch(e){return"null"}return"file"!=t&&Ei(e)?t+"://"+zi(e.host)+(null!==r?":"+r:""):"null"},lo=function(){return si(this).scheme+":"},fo=function(){return si(this).username},ho=function(){return si(this).password},po=function(){var e=si(this),t=e.host,r=e.port;return null===t?"":null===r?zi(t):zi(t)+":"+r},go=function(){var e=si(this).host;return null===e?"":zi(e)},mo=function(){var e=si(this).port;return null===e?"":String(e)},Io=function(){var e=si(this),t=e.path;return e.cannotBeABaseURL?t[0]:t.length?"/"+t.join("/"):""},vo=function(){var e=si(this).query;return e?"?"+e:""},yo=function(){return si(this).searchParams},bo=function(){var e=si(this).fragment;return e?"#"+e:""},Co=function(e,t){return{get:e,set:t,configurable:!0,enumerable:!0}};if(s&&$t(so,{href:Co(uo,(function(e){var t=si(this),r=String(e),n=oo(t,r);if(n)throw TypeError(n);oi(t.searchParams).updateSearchParams(t.query)})),origin:Co(co),protocol:Co(lo,(function(e){var t=si(this);oo(t,String(e)+":",Ni)})),username:Co(fo,(function(e){var t=si(this),r=wn(String(e));if(!ji(t)){t.username="";for(var n=0;n<r.length;n++)t.username+=qi(r[n],Si)}})),password:Co(ho,(function(e){var t=si(this),r=wn(String(e));if(!ji(t)){t.password="";for(var n=0;n<r.length;n++)t.password+=qi(r[n],Si)}})),host:Co(po,(function(e){var t=si(this);t.cannotBeABaseURL||oo(t,String(e),Ki)})),hostname:Co(go,(function(e){var t=si(this);t.cannotBeABaseURL||oo(t,String(e),Wi)})),port:Co(mo,(function(e){var t=si(this);ji(t)||(""==(e=String(e))?t.port=null:oo(t,e,Xi))})),pathname:Co(Io,(function(e){var t=si(this);t.cannotBeABaseURL||(t.path=[],oo(t,e+"",eo))})),search:Co(vo,(function(e){var t=si(this);""==(e=String(e))?t.query=null:("?"==e.charAt(0)&&(e=e.slice(1)),t.query="",oo(t,e,no)),oi(t.searchParams).updateSearchParams(t.query)})),searchParams:Co(yo),hash:Co(bo,(function(e){var t=si(this);""!=(e=String(e))?("#"==e.charAt(0)&&(e=e.slice(1)),t.fragment="",oo(t,e,io)):t.fragment=null}))}),Q(so,"toJSON",(function(){return uo.call(this)}),{enumerable:!0}),Q(so,"toString",(function(){return uo.call(this)}),{enumerable:!0}),ni){var ko=ni.createObjectURL,wo=ni.revokeObjectURL;ko&&Q(ao,"createObjectURL",(function(e){return ko.apply(ni,arguments)})),wo&&Q(ao,"revokeObjectURL",(function(e){return wo.apply(ni,arguments)}))}dr(ao,"URL"),st({global:!0,forced:!fn,sham:!s},{URL:ao});var zo=function(e){!function(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}}),t&&be(e,t)}(i,e);var t,r,n=(t=i,r=Ce(),function(){var e,n=ye(t);if(r){var i=ye(this).constructor;e=Reflect.construct(n,arguments,i)}else e=n.apply(this,arguments);return ze(this,e)});function i(e,t,r){var o;return he(this,i),(o=n.call(this,i.renderTemplateUri("".concat(t,"/").concat(e).replace(/\/\/+/g,"/"),null==r?void 0:r.pathParams))).addQueryParams(null==r?void 0:r.queryParams),(null==r?void 0:r.origin)&&o.replaceOrigin(null==r?void 0:r.origin),o}return ge(i,[{key:"replaceOrigin",value:function(e){var t=new URL(e);this.protocol=t.protocol,this.host=t.host,this.pathname="".concat(t.pathname,"/").concat(this.pathname).replace(/\/\/+/g,"/")}},{key:"addQueryParams",value:function(e){var t=this;e&&Object.keys(e).forEach((function(r){var n=e[r];if(Array.isArray(n))for(var i=0;i<n.length;i+=1)t.searchParams.append(r,String(n[i]));else t.searchParams.append(r,String(n))}))}}],[{key:"renderTemplateUri",value:function(e,t){return t?e.replace(/\{([^\}]+)\}/g,(function(e,r){return String(t[r])})):e}}]),i}(we(URL)),xo=function(){function e(t){he(this,e),me(this,"clientConfig",void 0),this.clientConfig=new pt(ve({baseUri:(this instanceof e?this.constructor:void 0).defaultBaseUri},t))}var r,n,i,o,a,s,u,d,c,l,f,h,p,g,m,I,v,y,b,C,k,w,z,x,R,P,S,q;return ge(e,[{key:"createBasket",value:(q=fe(regeneratorRuntime.mark((function e(r,n){var i,o,a,s,u,d,c,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=(null==r?void 0:r.parameters)||{},o=this.clientConfig.parameters||{},a=ve({version:"v1"},o),void 0!==i.organizationId&&(a.organizationId=i.organizationId),delete(s=ve({siteId:o.siteId},i)).organizationId,void 0===s.siteId&&void 0!==o.siteId&&(s.siteId=o.siteId),u=new zo("/organizations/{organizationId}/baskets",this.clientConfig.baseUri,{pathParams:a,queryParams:s,origin:this.clientConfig.proxy}),d=ve(ve({},this.clientConfig.headers),null==r?void 0:r.headers),c=new t.Request(u.toString(),ve(ve({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"POST"})),e.next=12,t.fetch(c);case 12:if(l=e.sent,!n){e.next=17;break}return e.abrupt("return",l);case 17:return e.abrupt("return",l.json());case 18:case"end":return e.stop()}}),e,this)}))),function(e,t){return q.apply(this,arguments)})},{key:"deleteBasket",value:(S=fe(regeneratorRuntime.mark((function e(r,n){var i,o,a,s,u,d,c,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=(null==r?void 0:r.parameters)||{},o=this.clientConfig.parameters||{},a=ve({version:"v1"},o),void 0!==i.organizationId&&(a.organizationId=i.organizationId),void 0!==i.basketId&&(a.basketId=i.basketId),delete(s=ve({siteId:o.siteId},i)).organizationId,delete s.basketId,void 0===s.siteId&&void 0!==o.siteId&&(s.siteId=o.siteId),u=new zo("/organizations/{organizationId}/baskets/{basketId}",this.clientConfig.baseUri,{pathParams:a,queryParams:s,origin:this.clientConfig.proxy}),d=ve(ve({},this.clientConfig.headers),null==r?void 0:r.headers),c=new t.Request(u.toString(),ve(ve({},this.clientConfig.fetchOptions),{},{headers:d,method:"DELETE"})),e.next=14,t.fetch(c);case 14:if(l=e.sent,!n){e.next=19;break}return e.abrupt("return",l);case 19:return e.abrupt("return",l.json());case 20:case"end":return e.stop()}}),e,this)}))),function(e,t){return S.apply(this,arguments)})},{key:"getBasket",value:(P=fe(regeneratorRuntime.mark((function e(r,n){var i,o,a,s,u,d,c,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=(null==r?void 0:r.parameters)||{},o=this.clientConfig.parameters||{},a=ve({version:"v1"},o),void 0!==i.organizationId&&(a.organizationId=i.organizationId),void 0!==i.basketId&&(a.basketId=i.basketId),delete(s=ve({siteId:o.siteId},i)).organizationId,delete s.basketId,void 0===s.siteId&&void 0!==o.siteId&&(s.siteId=o.siteId),u=new zo("/organizations/{organizationId}/baskets/{basketId}",this.clientConfig.baseUri,{pathParams:a,queryParams:s,origin:this.clientConfig.proxy}),d=ve(ve({},this.clientConfig.headers),null==r?void 0:r.headers),c=new t.Request(u.toString(),ve(ve({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=14,t.fetch(c);case 14:if(l=e.sent,!n){e.next=19;break}return e.abrupt("return",l);case 19:return e.abrupt("return",l.json());case 20:case"end":return e.stop()}}),e,this)}))),function(e,t){return P.apply(this,arguments)})},{key:"updateBasket",value:(R=fe(regeneratorRuntime.mark((function e(r,n){var i,o,a,s,u,d,c,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=(null==r?void 0:r.parameters)||{},o=this.clientConfig.parameters||{},a=ve({version:"v1"},o),void 0!==i.organizationId&&(a.organizationId=i.organizationId),void 0!==i.basketId&&(a.basketId=i.basketId),delete(s=ve({siteId:o.siteId},i)).organizationId,delete s.basketId,void 0===s.siteId&&void 0!==o.siteId&&(s.siteId=o.siteId),u=new zo("/organizations/{organizationId}/baskets/{basketId}",this.clientConfig.baseUri,{pathParams:a,queryParams:s,origin:this.clientConfig.proxy}),d=ve(ve({},this.clientConfig.headers),null==r?void 0:r.headers),c=new t.Request(u.toString(),ve(ve({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"PATCH"})),e.next=14,t.fetch(c);case 14:if(l=e.sent,!n){e.next=19;break}return e.abrupt("return",l);case 19:return e.abrupt("return",l.json());case 20:case"end":return e.stop()}}),e,this)}))),function(e,t){return R.apply(this,arguments)})},{key:"updateBillingAddressForBasket",value:(x=fe(regeneratorRuntime.mark((function e(r,n){var i,o,a,s,u,d,c,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=(null==r?void 0:r.parameters)||{},o=this.clientConfig.parameters||{},a=ve({version:"v1"},o),void 0!==i.organizationId&&(a.organizationId=i.organizationId),void 0!==i.basketId&&(a.basketId=i.basketId),delete(s=ve({siteId:o.siteId},i)).organizationId,delete s.basketId,void 0===s.siteId&&void 0!==o.siteId&&(s.siteId=o.siteId),u=new zo("/organizations/{organizationId}/baskets/{basketId}/billing-address",this.clientConfig.baseUri,{pathParams:a,queryParams:s,origin:this.clientConfig.proxy}),d=ve(ve({},this.clientConfig.headers),null==r?void 0:r.headers),c=new t.Request(u.toString(),ve(ve({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"PUT"})),e.next=14,t.fetch(c);case 14:if(l=e.sent,!n){e.next=19;break}return e.abrupt("return",l);case 19:return e.abrupt("return",l.json());case 20:case"end":return e.stop()}}),e,this)}))),function(e,t){return x.apply(this,arguments)})},{key:"addCouponToBasket",value:(z=fe(regeneratorRuntime.mark((function e(r,n){var i,o,a,s,u,d,c,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=(null==r?void 0:r.parameters)||{},o=this.clientConfig.parameters||{},a=ve({version:"v1"},o),void 0!==i.organizationId&&(a.organizationId=i.organizationId),void 0!==i.basketId&&(a.basketId=i.basketId),delete(s=ve({siteId:o.siteId},i)).organizationId,delete s.basketId,void 0===s.siteId&&void 0!==o.siteId&&(s.siteId=o.siteId),u=new zo("/organizations/{organizationId}/baskets/{basketId}/coupons",this.clientConfig.baseUri,{pathParams:a,queryParams:s,origin:this.clientConfig.proxy}),d=ve(ve({},this.clientConfig.headers),null==r?void 0:r.headers),c=new t.Request(u.toString(),ve(ve({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"POST"})),e.next=14,t.fetch(c);case 14:if(l=e.sent,!n){e.next=19;break}return e.abrupt("return",l);case 19:return e.abrupt("return",l.json());case 20:case"end":return e.stop()}}),e,this)}))),function(e,t){return z.apply(this,arguments)})},{key:"removeCouponFromBasket",value:(w=fe(regeneratorRuntime.mark((function e(r,n){var i,o,a,s,u,d,c,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=(null==r?void 0:r.parameters)||{},o=this.clientConfig.parameters||{},a=ve({version:"v1"},o),void 0!==i.organizationId&&(a.organizationId=i.organizationId),void 0!==i.basketId&&(a.basketId=i.basketId),void 0!==i.couponItemId&&(a.couponItemId=i.couponItemId),delete(s=ve({siteId:o.siteId},i)).organizationId,delete s.basketId,delete s.couponItemId,void 0===s.siteId&&void 0!==o.siteId&&(s.siteId=o.siteId),u=new zo("/organizations/{organizationId}/baskets/{basketId}/coupons/{couponItemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:s,origin:this.clientConfig.proxy}),d=ve(ve({},this.clientConfig.headers),null==r?void 0:r.headers),c=new t.Request(u.toString(),ve(ve({},this.clientConfig.fetchOptions),{},{headers:d,method:"DELETE"})),e.next=16,t.fetch(c);case 16:if(l=e.sent,!n){e.next=21;break}return e.abrupt("return",l);case 21:return e.abrupt("return",l.json());case 22:case"end":return e.stop()}}),e,this)}))),function(e,t){return w.apply(this,arguments)})},{key:"updateCustomerForBasket",value:(k=fe(regeneratorRuntime.mark((function e(r,n){var i,o,a,s,u,d,c,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=(null==r?void 0:r.parameters)||{},o=this.clientConfig.parameters||{},a=ve({version:"v1"},o),void 0!==i.organizationId&&(a.organizationId=i.organizationId),void 0!==i.basketId&&(a.basketId=i.basketId),delete(s=ve({siteId:o.siteId},i)).organizationId,delete s.basketId,void 0===s.siteId&&void 0!==o.siteId&&(s.siteId=o.siteId),u=new zo("/organizations/{organizationId}/baskets/{basketId}/customer",this.clientConfig.baseUri,{pathParams:a,queryParams:s,origin:this.clientConfig.proxy}),d=ve(ve({},this.clientConfig.headers),null==r?void 0:r.headers),c=new t.Request(u.toString(),ve(ve({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"PUT"})),e.next=14,t.fetch(c);case 14:if(l=e.sent,!n){e.next=19;break}return e.abrupt("return",l);case 19:return e.abrupt("return",l.json());case 20:case"end":return e.stop()}}),e,this)}))),function(e,t){return k.apply(this,arguments)})},{key:"addGiftCertificateItemToBasket",value:(C=fe(regeneratorRuntime.mark((function e(r,n){var i,o,a,s,u,d,c,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=(null==r?void 0:r.parameters)||{},o=this.clientConfig.parameters||{},a=ve({version:"v1"},o),void 0!==i.organizationId&&(a.organizationId=i.organizationId),void 0!==i.basketId&&(a.basketId=i.basketId),delete(s=ve({siteId:o.siteId},i)).organizationId,delete s.basketId,void 0===s.siteId&&void 0!==o.siteId&&(s.siteId=o.siteId),u=new zo("/organizations/{organizationId}/baskets/{basketId}/gift-certificate-items",this.clientConfig.baseUri,{pathParams:a,queryParams:s,origin:this.clientConfig.proxy}),d=ve(ve({},this.clientConfig.headers),null==r?void 0:r.headers),c=new t.Request(u.toString(),ve(ve({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"POST"})),e.next=14,t.fetch(c);case 14:if(l=e.sent,!n){e.next=19;break}return e.abrupt("return",l);case 19:return e.abrupt("return",l.json());case 20:case"end":return e.stop()}}),e,this)}))),function(e,t){return C.apply(this,arguments)})},{key:"removeGiftCertificateItemFromBasket",value:(b=fe(regeneratorRuntime.mark((function e(r,n){var i,o,a,s,u,d,c,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=(null==r?void 0:r.parameters)||{},o=this.clientConfig.parameters||{},a=ve({version:"v1"},o),void 0!==i.organizationId&&(a.organizationId=i.organizationId),void 0!==i.basketId&&(a.basketId=i.basketId),void 0!==i.giftCertificateItemId&&(a.giftCertificateItemId=i.giftCertificateItemId),delete(s=ve({siteId:o.siteId},i)).organizationId,delete s.basketId,delete s.giftCertificateItemId,void 0===s.siteId&&void 0!==o.siteId&&(s.siteId=o.siteId),u=new zo("/organizations/{organizationId}/baskets/{basketId}/gift-certificate-items/{giftCertificateItemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:s,origin:this.clientConfig.proxy}),d=ve(ve({},this.clientConfig.headers),null==r?void 0:r.headers),c=new t.Request(u.toString(),ve(ve({},this.clientConfig.fetchOptions),{},{headers:d,method:"DELETE"})),e.next=16,t.fetch(c);case 16:if(l=e.sent,!n){e.next=21;break}return e.abrupt("return",l);case 21:return e.abrupt("return",l.json());case 22:case"end":return e.stop()}}),e,this)}))),function(e,t){return b.apply(this,arguments)})},{key:"updateGiftCertificateItemInBasket",value:(y=fe(regeneratorRuntime.mark((function e(r,n){var i,o,a,s,u,d,c,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=(null==r?void 0:r.parameters)||{},o=this.clientConfig.parameters||{},a=ve({version:"v1"},o),void 0!==i.organizationId&&(a.organizationId=i.organizationId),void 0!==i.basketId&&(a.basketId=i.basketId),void 0!==i.giftCertificateItemId&&(a.giftCertificateItemId=i.giftCertificateItemId),delete(s=ve({siteId:o.siteId},i)).organizationId,delete s.basketId,delete s.giftCertificateItemId,void 0===s.siteId&&void 0!==o.siteId&&(s.siteId=o.siteId),u=new zo("/organizations/{organizationId}/baskets/{basketId}/gift-certificate-items/{giftCertificateItemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:s,origin:this.clientConfig.proxy}),d=ve(ve({},this.clientConfig.headers),null==r?void 0:r.headers),c=new t.Request(u.toString(),ve(ve({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"PATCH"})),e.next=16,t.fetch(c);case 16:if(l=e.sent,!n){e.next=21;break}return e.abrupt("return",l);case 21:return e.abrupt("return",l.json());case 22:case"end":return e.stop()}}),e,this)}))),function(e,t){return y.apply(this,arguments)})},{key:"addItemToBasket",value:(v=fe(regeneratorRuntime.mark((function e(r,n){var i,o,a,s,u,d,c,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=(null==r?void 0:r.parameters)||{},o=this.clientConfig.parameters||{},a=ve({version:"v1"},o),void 0!==i.organizationId&&(a.organizationId=i.organizationId),void 0!==i.basketId&&(a.basketId=i.basketId),delete(s=ve({siteId:o.siteId},i)).organizationId,delete s.basketId,void 0===s.siteId&&void 0!==o.siteId&&(s.siteId=o.siteId),u=new zo("/organizations/{organizationId}/baskets/{basketId}/items",this.clientConfig.baseUri,{pathParams:a,queryParams:s,origin:this.clientConfig.proxy}),d=ve(ve({},this.clientConfig.headers),null==r?void 0:r.headers),c=new t.Request(u.toString(),ve(ve({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"POST"})),e.next=14,t.fetch(c);case 14:if(l=e.sent,!n){e.next=19;break}return e.abrupt("return",l);case 19:return e.abrupt("return",l.json());case 20:case"end":return e.stop()}}),e,this)}))),function(e,t){return v.apply(this,arguments)})},{key:"removeItemFromBasket",value:(I=fe(regeneratorRuntime.mark((function e(r,n){var i,o,a,s,u,d,c,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=(null==r?void 0:r.parameters)||{},o=this.clientConfig.parameters||{},a=ve({version:"v1"},o),void 0!==i.organizationId&&(a.organizationId=i.organizationId),void 0!==i.basketId&&(a.basketId=i.basketId),void 0!==i.itemId&&(a.itemId=i.itemId),delete(s=ve({siteId:o.siteId},i)).organizationId,delete s.basketId,delete s.itemId,void 0===s.siteId&&void 0!==o.siteId&&(s.siteId=o.siteId),u=new zo("/organizations/{organizationId}/baskets/{basketId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:s,origin:this.clientConfig.proxy}),d=ve(ve({},this.clientConfig.headers),null==r?void 0:r.headers),c=new t.Request(u.toString(),ve(ve({},this.clientConfig.fetchOptions),{},{headers:d,method:"DELETE"})),e.next=16,t.fetch(c);case 16:if(l=e.sent,!n){e.next=21;break}return e.abrupt("return",l);case 21:return e.abrupt("return",l.json());case 22:case"end":return e.stop()}}),e,this)}))),function(e,t){return I.apply(this,arguments)})},{key:"updateItemInBasket",value:(m=fe(regeneratorRuntime.mark((function e(r,n){var i,o,a,s,u,d,c,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=(null==r?void 0:r.parameters)||{},o=this.clientConfig.parameters||{},a=ve({version:"v1"},o),void 0!==i.organizationId&&(a.organizationId=i.organizationId),void 0!==i.basketId&&(a.basketId=i.basketId),void 0!==i.itemId&&(a.itemId=i.itemId),delete(s=ve({siteId:o.siteId},i)).organizationId,delete s.basketId,delete s.itemId,void 0===s.siteId&&void 0!==o.siteId&&(s.siteId=o.siteId),u=new zo("/organizations/{organizationId}/baskets/{basketId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:s,origin:this.clientConfig.proxy}),d=ve(ve({},this.clientConfig.headers),null==r?void 0:r.headers),c=new t.Request(u.toString(),ve(ve({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"PATCH"})),e.next=16,t.fetch(c);case 16:if(l=e.sent,!n){e.next=21;break}return e.abrupt("return",l);case 21:return e.abrupt("return",l.json());case 22:case"end":return e.stop()}}),e,this)}))),function(e,t){return m.apply(this,arguments)})},{key:"addTaxesForBasketItem",value:(g=fe(regeneratorRuntime.mark((function e(r,n){var i,o,a,s,u,d,c,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=(null==r?void 0:r.parameters)||{},o=this.clientConfig.parameters||{},a=ve({version:"v1"},o),void 0!==i.organizationId&&(a.organizationId=i.organizationId),void 0!==i.basketId&&(a.basketId=i.basketId),void 0!==i.itemId&&(a.itemId=i.itemId),delete(s=ve({siteId:o.siteId},i)).organizationId,delete s.basketId,delete s.itemId,void 0===s.siteId&&void 0!==o.siteId&&(s.siteId=o.siteId),u=new zo("/organizations/{organizationId}/baskets/{basketId}/items/{itemId}/taxes",this.clientConfig.baseUri,{pathParams:a,queryParams:s,origin:this.clientConfig.proxy}),d=ve(ve({},this.clientConfig.headers),null==r?void 0:r.headers),c=new t.Request(u.toString(),ve(ve({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"PUT"})),e.next=16,t.fetch(c);case 16:if(l=e.sent,!n){e.next=21;break}return e.abrupt("return",l);case 21:return e.abrupt("return",l.json());case 22:case"end":return e.stop()}}),e,this)}))),function(e,t){return g.apply(this,arguments)})},{key:"addPaymentInstrumentToBasket",value:(p=fe(regeneratorRuntime.mark((function e(r,n){var i,o,a,s,u,d,c,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=(null==r?void 0:r.parameters)||{},o=this.clientConfig.parameters||{},a=ve({version:"v1"},o),void 0!==i.organizationId&&(a.organizationId=i.organizationId),void 0!==i.basketId&&(a.basketId=i.basketId),delete(s=ve({siteId:o.siteId},i)).organizationId,delete s.basketId,void 0===s.siteId&&void 0!==o.siteId&&(s.siteId=o.siteId),u=new zo("/organizations/{organizationId}/baskets/{basketId}/payment-instruments",this.clientConfig.baseUri,{pathParams:a,queryParams:s,origin:this.clientConfig.proxy}),d=ve(ve({},this.clientConfig.headers),null==r?void 0:r.headers),c=new t.Request(u.toString(),ve(ve({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"POST"})),e.next=14,t.fetch(c);case 14:if(l=e.sent,!n){e.next=19;break}return e.abrupt("return",l);case 19:return e.abrupt("return",l.json());case 20:case"end":return e.stop()}}),e,this)}))),function(e,t){return p.apply(this,arguments)})},{key:"removePaymentInstrumentFromBasket",value:(h=fe(regeneratorRuntime.mark((function e(r,n){var i,o,a,s,u,d,c,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=(null==r?void 0:r.parameters)||{},o=this.clientConfig.parameters||{},a=ve({version:"v1"},o),void 0!==i.organizationId&&(a.organizationId=i.organizationId),void 0!==i.basketId&&(a.basketId=i.basketId),void 0!==i.paymentInstrumentId&&(a.paymentInstrumentId=i.paymentInstrumentId),delete(s=ve({siteId:o.siteId},i)).organizationId,delete s.basketId,delete s.paymentInstrumentId,void 0===s.siteId&&void 0!==o.siteId&&(s.siteId=o.siteId),u=new zo("/organizations/{organizationId}/baskets/{basketId}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:s,origin:this.clientConfig.proxy}),d=ve(ve({},this.clientConfig.headers),null==r?void 0:r.headers),c=new t.Request(u.toString(),ve(ve({},this.clientConfig.fetchOptions),{},{headers:d,method:"DELETE"})),e.next=16,t.fetch(c);case 16:if(l=e.sent,!n){e.next=21;break}return e.abrupt("return",l);case 21:return e.abrupt("return",l.json());case 22:case"end":return e.stop()}}),e,this)}))),function(e,t){return h.apply(this,arguments)})},{key:"getPaymentMethodsForBasket",value:(f=fe(regeneratorRuntime.mark((function e(r,n){var i,o,a,s,u,d,c,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=(null==r?void 0:r.parameters)||{},o=this.clientConfig.parameters||{},a=ve({version:"v1"},o),void 0!==i.organizationId&&(a.organizationId=i.organizationId),void 0!==i.basketId&&(a.basketId=i.basketId),delete(s=ve({siteId:o.siteId},i)).organizationId,delete s.basketId,void 0===s.siteId&&void 0!==o.siteId&&(s.siteId=o.siteId),u=new zo("/organizations/{organizationId}/baskets/{basketId}/payment-methods",this.clientConfig.baseUri,{pathParams:a,queryParams:s,origin:this.clientConfig.proxy}),d=ve(ve({},this.clientConfig.headers),null==r?void 0:r.headers),c=new t.Request(u.toString(),ve(ve({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=14,t.fetch(c);case 14:if(l=e.sent,!n){e.next=19;break}return e.abrupt("return",l);case 19:return e.abrupt("return",l.json());case 20:case"end":return e.stop()}}),e,this)}))),function(e,t){return f.apply(this,arguments)})},{key:"getPriceBooksForBasket",value:(l=fe(regeneratorRuntime.mark((function e(r,n){var i,o,a,s,u,d,c,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=(null==r?void 0:r.parameters)||{},o=this.clientConfig.parameters||{},a=ve({version:"v1"},o),void 0!==i.organizationId&&(a.organizationId=i.organizationId),void 0!==i.basketId&&(a.basketId=i.basketId),delete(s=ve({siteId:o.siteId},i)).organizationId,delete s.basketId,void 0===s.siteId&&void 0!==o.siteId&&(s.siteId=o.siteId),u=new zo("/organizations/{organizationId}/baskets/{basketId}/price-books",this.clientConfig.baseUri,{pathParams:a,queryParams:s,origin:this.clientConfig.proxy}),d=ve(ve({},this.clientConfig.headers),null==r?void 0:r.headers),c=new t.Request(u.toString(),ve(ve({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=14,t.fetch(c);case 14:if(l=e.sent,!n){e.next=19;break}return e.abrupt("return",l);case 19:return e.abrupt("return",l.json());case 20:case"end":return e.stop()}}),e,this)}))),function(e,t){return l.apply(this,arguments)})},{key:"addPriceBooksToBasket",value:(c=fe(regeneratorRuntime.mark((function e(r,n){var i,o,a,s,u,d,c,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=(null==r?void 0:r.parameters)||{},o=this.clientConfig.parameters||{},a=ve({version:"v1"},o),void 0!==i.organizationId&&(a.organizationId=i.organizationId),void 0!==i.basketId&&(a.basketId=i.basketId),delete(s=ve({siteId:o.siteId},i)).organizationId,delete s.basketId,void 0===s.siteId&&void 0!==o.siteId&&(s.siteId=o.siteId),u=new zo("/organizations/{organizationId}/baskets/{basketId}/price-books",this.clientConfig.baseUri,{pathParams:a,queryParams:s,origin:this.clientConfig.proxy}),d=ve(ve({},this.clientConfig.headers),null==r?void 0:r.headers),c=new t.Request(u.toString(),ve(ve({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"PUT"})),e.next=14,t.fetch(c);case 14:if(l=e.sent,!n){e.next=19;break}return e.abrupt("return",l);case 19:return e.abrupt("return",l.json());case 20:case"end":return e.stop()}}),e,this)}))),function(e,t){return c.apply(this,arguments)})},{key:"createShipmentForBasket",value:(d=fe(regeneratorRuntime.mark((function e(r,n){var i,o,a,s,u,d,c,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=(null==r?void 0:r.parameters)||{},o=this.clientConfig.parameters||{},a=ve({version:"v1"},o),void 0!==i.organizationId&&(a.organizationId=i.organizationId),void 0!==i.basketId&&(a.basketId=i.basketId),delete(s=ve({siteId:o.siteId},i)).organizationId,delete s.basketId,void 0===s.siteId&&void 0!==o.siteId&&(s.siteId=o.siteId),u=new zo("/organizations/{organizationId}/baskets/{basketId}/shipments",this.clientConfig.baseUri,{pathParams:a,queryParams:s,origin:this.clientConfig.proxy}),d=ve(ve({},this.clientConfig.headers),null==r?void 0:r.headers),c=new t.Request(u.toString(),ve(ve({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"POST"})),e.next=14,t.fetch(c);case 14:if(l=e.sent,!n){e.next=19;break}return e.abrupt("return",l);case 19:return e.abrupt("return",l.json());case 20:case"end":return e.stop()}}),e,this)}))),function(e,t){return d.apply(this,arguments)})},{key:"removeShipmentFromBasket",value:(u=fe(regeneratorRuntime.mark((function e(r,n){var i,o,a,s,u,d,c,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=(null==r?void 0:r.parameters)||{},o=this.clientConfig.parameters||{},a=ve({version:"v1"},o),void 0!==i.organizationId&&(a.organizationId=i.organizationId),void 0!==i.basketId&&(a.basketId=i.basketId),void 0!==i.shipmentId&&(a.shipmentId=i.shipmentId),delete(s=ve({siteId:o.siteId},i)).organizationId,delete s.basketId,delete s.shipmentId,void 0===s.siteId&&void 0!==o.siteId&&(s.siteId=o.siteId),u=new zo("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:s,origin:this.clientConfig.proxy}),d=ve(ve({},this.clientConfig.headers),null==r?void 0:r.headers),c=new t.Request(u.toString(),ve(ve({},this.clientConfig.fetchOptions),{},{headers:d,method:"DELETE"})),e.next=16,t.fetch(c);case 16:if(l=e.sent,!n){e.next=21;break}return e.abrupt("return",l);case 21:return e.abrupt("return",l.json());case 22:case"end":return e.stop()}}),e,this)}))),function(e,t){return u.apply(this,arguments)})},{key:"updateShipmentForBasket",value:(s=fe(regeneratorRuntime.mark((function e(r,n){var i,o,a,s,u,d,c,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=(null==r?void 0:r.parameters)||{},o=this.clientConfig.parameters||{},a=ve({version:"v1"},o),void 0!==i.organizationId&&(a.organizationId=i.organizationId),void 0!==i.basketId&&(a.basketId=i.basketId),void 0!==i.shipmentId&&(a.shipmentId=i.shipmentId),delete(s=ve({siteId:o.siteId},i)).organizationId,delete s.basketId,delete s.shipmentId,void 0===s.siteId&&void 0!==o.siteId&&(s.siteId=o.siteId),u=new zo("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:s,origin:this.clientConfig.proxy}),d=ve(ve({},this.clientConfig.headers),null==r?void 0:r.headers),c=new t.Request(u.toString(),ve(ve({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"PATCH"})),e.next=16,t.fetch(c);case 16:if(l=e.sent,!n){e.next=21;break}return e.abrupt("return",l);case 21:return e.abrupt("return",l.json());case 22:case"end":return e.stop()}}),e,this)}))),function(e,t){return s.apply(this,arguments)})},{key:"updateShippingAddressForShipment",value:(a=fe(regeneratorRuntime.mark((function e(r,n){var i,o,a,s,u,d,c,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=(null==r?void 0:r.parameters)||{},o=this.clientConfig.parameters||{},a=ve({version:"v1"},o),void 0!==i.organizationId&&(a.organizationId=i.organizationId),void 0!==i.basketId&&(a.basketId=i.basketId),void 0!==i.shipmentId&&(a.shipmentId=i.shipmentId),delete(s=ve({siteId:o.siteId},i)).organizationId,delete s.basketId,delete s.shipmentId,void 0===s.siteId&&void 0!==o.siteId&&(s.siteId=o.siteId),u=new zo("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}/shipping-address",this.clientConfig.baseUri,{pathParams:a,queryParams:s,origin:this.clientConfig.proxy}),d=ve(ve({},this.clientConfig.headers),null==r?void 0:r.headers),c=new t.Request(u.toString(),ve(ve({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"PUT"})),e.next=16,t.fetch(c);case 16:if(l=e.sent,!n){e.next=21;break}return e.abrupt("return",l);case 21:return e.abrupt("return",l.json());case 22:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"updateShippingMethodForShipment",value:(o=fe(regeneratorRuntime.mark((function e(r,n){var i,o,a,s,u,d,c,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=(null==r?void 0:r.parameters)||{},o=this.clientConfig.parameters||{},a=ve({version:"v1"},o),void 0!==i.organizationId&&(a.organizationId=i.organizationId),void 0!==i.basketId&&(a.basketId=i.basketId),void 0!==i.shipmentId&&(a.shipmentId=i.shipmentId),delete(s=ve({siteId:o.siteId},i)).organizationId,delete s.basketId,delete s.shipmentId,void 0===s.siteId&&void 0!==o.siteId&&(s.siteId=o.siteId),u=new zo("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}/shipping-method",this.clientConfig.baseUri,{pathParams:a,queryParams:s,origin:this.clientConfig.proxy}),d=ve(ve({},this.clientConfig.headers),null==r?void 0:r.headers),c=new t.Request(u.toString(),ve(ve({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"PUT"})),e.next=16,t.fetch(c);case 16:if(l=e.sent,!n){e.next=21;break}return e.abrupt("return",l);case 21:return e.abrupt("return",l.json());case 22:case"end":return e.stop()}}),e,this)}))),function(e,t){return o.apply(this,arguments)})},{key:"getShippingMethodsForShipment",value:(i=fe(regeneratorRuntime.mark((function e(r,n){var i,o,a,s,u,d,c,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=(null==r?void 0:r.parameters)||{},o=this.clientConfig.parameters||{},a=ve({version:"v1"},o),void 0!==i.organizationId&&(a.organizationId=i.organizationId),void 0!==i.basketId&&(a.basketId=i.basketId),void 0!==i.shipmentId&&(a.shipmentId=i.shipmentId),delete(s=ve({siteId:o.siteId},i)).organizationId,delete s.basketId,delete s.shipmentId,void 0===s.siteId&&void 0!==o.siteId&&(s.siteId=o.siteId),u=new zo("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}/shipping-methods",this.clientConfig.baseUri,{pathParams:a,queryParams:s,origin:this.clientConfig.proxy}),d=ve(ve({},this.clientConfig.headers),null==r?void 0:r.headers),c=new t.Request(u.toString(),ve(ve({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=16,t.fetch(c);case 16:if(l=e.sent,!n){e.next=21;break}return e.abrupt("return",l);case 21:return e.abrupt("return",l.json());case 22:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"getTaxesFromBasket",value:(n=fe(regeneratorRuntime.mark((function e(r,n){var i,o,a,s,u,d,c,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=(null==r?void 0:r.parameters)||{},o=this.clientConfig.parameters||{},a=ve({version:"v1"},o),void 0!==i.organizationId&&(a.organizationId=i.organizationId),void 0!==i.basketId&&(a.basketId=i.basketId),delete(s=ve({siteId:o.siteId},i)).organizationId,delete s.basketId,void 0===s.siteId&&void 0!==o.siteId&&(s.siteId=o.siteId),u=new zo("/organizations/{organizationId}/baskets/{basketId}/taxes",this.clientConfig.baseUri,{pathParams:a,queryParams:s,origin:this.clientConfig.proxy}),d=ve(ve({},this.clientConfig.headers),null==r?void 0:r.headers),c=new t.Request(u.toString(),ve(ve({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=14,t.fetch(c);case 14:if(l=e.sent,!n){e.next=19;break}return e.abrupt("return",l);case 19:return e.abrupt("return",l.json());case 20:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"addTaxesForBasket",value:(r=fe(regeneratorRuntime.mark((function e(r,n){var i,o,a,s,u,d,c,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=(null==r?void 0:r.parameters)||{},o=this.clientConfig.parameters||{},a=ve({version:"v1"},o),void 0!==i.organizationId&&(a.organizationId=i.organizationId),void 0!==i.basketId&&(a.basketId=i.basketId),delete(s=ve({siteId:o.siteId},i)).organizationId,delete s.basketId,void 0===s.siteId&&void 0!==o.siteId&&(s.siteId=o.siteId),u=new zo("/organizations/{organizationId}/baskets/{basketId}/taxes",this.clientConfig.baseUri,{pathParams:a,queryParams:s,origin:this.clientConfig.proxy}),d=ve(ve({},this.clientConfig.headers),null==r?void 0:r.headers),c=new t.Request(u.toString(),ve(ve({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"PUT"})),e.next=14,t.fetch(c);case 14:if(l=e.sent,!n){e.next=19;break}return e.abrupt("return",l);case 19:return e.abrupt("return",l.json());case 20:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})}]),e}();me(xo,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/checkout/shopper-baskets/{version}");var Ro=function(){function e(t){he(this,e),me(this,"clientConfig",void 0),this.clientConfig=new pt(ve({baseUri:(this instanceof e?this.constructor:void 0).defaultBaseUri},t))}var r,n,i,o,a,s,u,d,c,l,f,h,p,g,m,I,v,y,b,C,k,w,z,x,R,P,S,q,O,E;return ge(e,[{key:"registerCustomer",value:(E=fe(regeneratorRuntime.mark((function e(r,n){var i,o,a,s,u,d,c,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=(null==r?void 0:r.parameters)||{},o=this.clientConfig.parameters||{},a=ve({version:"v1"},o),void 0!==i.organizationId&&(a.organizationId=i.organizationId),delete(s=ve({siteId:o.siteId},i)).organizationId,void 0===s.siteId&&void 0!==o.siteId&&(s.siteId=o.siteId),u=new zo("/organizations/{organizationId}/customers",this.clientConfig.baseUri,{pathParams:a,queryParams:s,origin:this.clientConfig.proxy}),d=ve(ve({},this.clientConfig.headers),null==r?void 0:r.headers),c=new t.Request(u.toString(),ve(ve({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"POST"})),e.next=12,t.fetch(c);case 12:if(l=e.sent,!n){e.next=17;break}return e.abrupt("return",l);case 17:return e.abrupt("return",l.json());case 18:case"end":return e.stop()}}),e,this)}))),function(e,t){return E.apply(this,arguments)})},{key:"invalidateCustomerAuth",value:(O=fe(regeneratorRuntime.mark((function e(r,n){var i,o,a,s,u,d,c,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=(null==r?void 0:r.parameters)||{},o=this.clientConfig.parameters||{},a=ve({version:"v1"},o),void 0!==i.organizationId&&(a.organizationId=i.organizationId),delete(s=ve({siteId:o.siteId},i)).organizationId,void 0===s.siteId&&void 0!==o.siteId&&(s.siteId=o.siteId),u=new zo("/organizations/{organizationId}/customers/actions/logout",this.clientConfig.baseUri,{pathParams:a,queryParams:s,origin:this.clientConfig.proxy}),d=ve(ve({},this.clientConfig.headers),null==r?void 0:r.headers),c=new t.Request(u.toString(),ve(ve({},this.clientConfig.fetchOptions),{},{headers:d,method:"DELETE"})),e.next=12,t.fetch(c);case 12:if(l=e.sent,!n){e.next=17;break}return e.abrupt("return",l);case 17:return e.abrupt("return",l.json());case 18:case"end":return e.stop()}}),e,this)}))),function(e,t){return O.apply(this,arguments)})},{key:"authorizeCustomer",value:(q=fe(regeneratorRuntime.mark((function e(r,n){var i,o,a,s,u,d,c,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=(null==r?void 0:r.parameters)||{},o=this.clientConfig.parameters||{},a=ve({version:"v1"},o),void 0!==i.organizationId&&(a.organizationId=i.organizationId),delete(s=ve({siteId:o.siteId},i)).organizationId,void 0===s.clientId&&void 0!==o.clientId&&(s.clientId=o.clientId),void 0===s.siteId&&void 0!==o.siteId&&(s.siteId=o.siteId),u=new zo("/organizations/{organizationId}/customers/actions/login",this.clientConfig.baseUri,{pathParams:a,queryParams:s,origin:this.clientConfig.proxy}),d=ve(ve({},this.clientConfig.headers),null==r?void 0:r.headers),c=new t.Request(u.toString(),ve(ve({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"POST"})),e.next=13,t.fetch(c);case 13:if(l=e.sent,!n){e.next=18;break}return e.abrupt("return",l);case 18:return e.abrupt("return",l.json());case 19:case"end":return e.stop()}}),e,this)}))),function(e,t){return q.apply(this,arguments)})},{key:"authorizeTrustedSystem",value:(S=fe(regeneratorRuntime.mark((function e(r,n){var i,o,a,s,u,d,c,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=(null==r?void 0:r.parameters)||{},o=this.clientConfig.parameters||{},a=ve({version:"v1"},o),void 0!==i.organizationId&&(a.organizationId=i.organizationId),delete(s=ve({siteId:o.siteId},i)).organizationId,void 0===s.siteId&&void 0!==o.siteId&&(s.siteId=o.siteId),u=new zo("/organizations/{organizationId}/customers/trusted-system/actions/login",this.clientConfig.baseUri,{pathParams:a,queryParams:s,origin:this.clientConfig.proxy}),d=ve(ve({},this.clientConfig.headers),null==r?void 0:r.headers),c=new t.Request(u.toString(),ve(ve({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"POST"})),e.next=12,t.fetch(c);case 12:if(l=e.sent,!n){e.next=17;break}return e.abrupt("return",l);case 17:return e.abrupt("return",l.json());case 18:case"end":return e.stop()}}),e,this)}))),function(e,t){return S.apply(this,arguments)})},{key:"resetPassword",value:(P=fe(regeneratorRuntime.mark((function e(r,n){var i,o,a,s,u,d,c,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=(null==r?void 0:r.parameters)||{},o=this.clientConfig.parameters||{},a=ve({version:"v1"},o),void 0!==i.organizationId&&(a.organizationId=i.organizationId),delete(s=ve({siteId:o.siteId},i)).organizationId,void 0===s.siteId&&void 0!==o.siteId&&(s.siteId=o.siteId),u=new zo("/organizations/{organizationId}/customers/password/actions/reset",this.clientConfig.baseUri,{pathParams:a,queryParams:s,origin:this.clientConfig.proxy}),d=ve(ve({},this.clientConfig.headers),null==r?void 0:r.headers),c=new t.Request(u.toString(),ve(ve({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"POST"})),e.next=12,t.fetch(c);case 12:if(l=e.sent,!n){e.next=17;break}return e.abrupt("return",l);case 17:return e.abrupt("return",l.json());case 18:case"end":return e.stop()}}),e,this)}))),function(e,t){return P.apply(this,arguments)})},{key:"getResetPasswordToken",value:(R=fe(regeneratorRuntime.mark((function e(r,n){var i,o,a,s,u,d,c,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=(null==r?void 0:r.parameters)||{},o=this.clientConfig.parameters||{},a=ve({version:"v1"},o),void 0!==i.organizationId&&(a.organizationId=i.organizationId),delete(s=ve({siteId:o.siteId},i)).organizationId,void 0===s.siteId&&void 0!==o.siteId&&(s.siteId=o.siteId),u=new zo("/organizations/{organizationId}/customers/password/actions/create-reset-token",this.clientConfig.baseUri,{pathParams:a,queryParams:s,origin:this.clientConfig.proxy}),d=ve(ve({},this.clientConfig.headers),null==r?void 0:r.headers),c=new t.Request(u.toString(),ve(ve({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"POST"})),e.next=12,t.fetch(c);case 12:if(l=e.sent,!n){e.next=17;break}return e.abrupt("return",l);case 17:return e.abrupt("return",l.json());case 18:case"end":return e.stop()}}),e,this)}))),function(e,t){return R.apply(this,arguments)})},{key:"getCustomer",value:(x=fe(regeneratorRuntime.mark((function e(r,n){var i,o,a,s,u,d,c,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=(null==r?void 0:r.parameters)||{},o=this.clientConfig.parameters||{},a=ve({version:"v1"},o),void 0!==i.organizationId&&(a.organizationId=i.organizationId),void 0!==i.customerId&&(a.customerId=i.customerId),delete(s=ve({siteId:o.siteId},i)).organizationId,delete s.customerId,void 0===s.siteId&&void 0!==o.siteId&&(s.siteId=o.siteId),u=new zo("/organizations/{organizationId}/customers/{customerId}",this.clientConfig.baseUri,{pathParams:a,queryParams:s,origin:this.clientConfig.proxy}),d=ve(ve({},this.clientConfig.headers),null==r?void 0:r.headers),c=new t.Request(u.toString(),ve(ve({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=14,t.fetch(c);case 14:if(l=e.sent,!n){e.next=19;break}return e.abrupt("return",l);case 19:return e.abrupt("return",l.json());case 20:case"end":return e.stop()}}),e,this)}))),function(e,t){return x.apply(this,arguments)})},{key:"updateCustomer",value:(z=fe(regeneratorRuntime.mark((function e(r,n){var i,o,a,s,u,d,c,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=(null==r?void 0:r.parameters)||{},o=this.clientConfig.parameters||{},a=ve({version:"v1"},o),void 0!==i.organizationId&&(a.organizationId=i.organizationId),void 0!==i.customerId&&(a.customerId=i.customerId),delete(s=ve({siteId:o.siteId},i)).organizationId,delete s.customerId,void 0===s.siteId&&void 0!==o.siteId&&(s.siteId=o.siteId),u=new zo("/organizations/{organizationId}/customers/{customerId}",this.clientConfig.baseUri,{pathParams:a,queryParams:s,origin:this.clientConfig.proxy}),d=ve(ve({},this.clientConfig.headers),null==r?void 0:r.headers),c=new t.Request(u.toString(),ve(ve({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"PATCH"})),e.next=14,t.fetch(c);case 14:if(l=e.sent,!n){e.next=19;break}return e.abrupt("return",l);case 19:return e.abrupt("return",l.json());case 20:case"end":return e.stop()}}),e,this)}))),function(e,t){return z.apply(this,arguments)})},{key:"createCustomerAddress",value:(w=fe(regeneratorRuntime.mark((function e(r,n){var i,o,a,s,u,d,c,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=(null==r?void 0:r.parameters)||{},o=this.clientConfig.parameters||{},a=ve({version:"v1"},o),void 0!==i.organizationId&&(a.organizationId=i.organizationId),void 0!==i.customerId&&(a.customerId=i.customerId),delete(s=ve({siteId:o.siteId},i)).organizationId,delete s.customerId,void 0===s.siteId&&void 0!==o.siteId&&(s.siteId=o.siteId),u=new zo("/organizations/{organizationId}/customers/{customerId}/addresses",this.clientConfig.baseUri,{pathParams:a,queryParams:s,origin:this.clientConfig.proxy}),d=ve(ve({},this.clientConfig.headers),null==r?void 0:r.headers),c=new t.Request(u.toString(),ve(ve({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"POST"})),e.next=14,t.fetch(c);case 14:if(l=e.sent,!n){e.next=19;break}return e.abrupt("return",l);case 19:return e.abrupt("return",l.json());case 20:case"end":return e.stop()}}),e,this)}))),function(e,t){return w.apply(this,arguments)})},{key:"getCustomerAddress",value:(k=fe(regeneratorRuntime.mark((function e(r,n){var i,o,a,s,u,d,c,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=(null==r?void 0:r.parameters)||{},o=this.clientConfig.parameters||{},a=ve({version:"v1"},o),void 0!==i.organizationId&&(a.organizationId=i.organizationId),void 0!==i.customerId&&(a.customerId=i.customerId),void 0!==i.addressName&&(a.addressName=i.addressName),delete(s=ve({siteId:o.siteId},i)).organizationId,delete s.customerId,delete s.addressName,void 0===s.siteId&&void 0!==o.siteId&&(s.siteId=o.siteId),u=new zo("/organizations/{organizationId}/customers/{customerId}/addresses/{addressName}",this.clientConfig.baseUri,{pathParams:a,queryParams:s,origin:this.clientConfig.proxy}),d=ve(ve({},this.clientConfig.headers),null==r?void 0:r.headers),c=new t.Request(u.toString(),ve(ve({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=16,t.fetch(c);case 16:if(l=e.sent,!n){e.next=21;break}return e.abrupt("return",l);case 21:return e.abrupt("return",l.json());case 22:case"end":return e.stop()}}),e,this)}))),function(e,t){return k.apply(this,arguments)})},{key:"removeCustomerAddress",value:(C=fe(regeneratorRuntime.mark((function e(r,n){var i,o,a,s,u,d,c,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=(null==r?void 0:r.parameters)||{},o=this.clientConfig.parameters||{},a=ve({version:"v1"},o),void 0!==i.organizationId&&(a.organizationId=i.organizationId),void 0!==i.customerId&&(a.customerId=i.customerId),void 0!==i.addressName&&(a.addressName=i.addressName),delete(s=ve({siteId:o.siteId},i)).organizationId,delete s.customerId,delete s.addressName,void 0===s.siteId&&void 0!==o.siteId&&(s.siteId=o.siteId),u=new zo("/organizations/{organizationId}/customers/{customerId}/addresses/{addressName}",this.clientConfig.baseUri,{pathParams:a,queryParams:s,origin:this.clientConfig.proxy}),d=ve(ve({},this.clientConfig.headers),null==r?void 0:r.headers),c=new t.Request(u.toString(),ve(ve({},this.clientConfig.fetchOptions),{},{headers:d,method:"DELETE"})),e.next=16,t.fetch(c);case 16:if(l=e.sent,!n){e.next=21;break}return e.abrupt("return",l);case 21:return e.abrupt("return",l.json());case 22:case"end":return e.stop()}}),e,this)}))),function(e,t){return C.apply(this,arguments)})},{key:"updateCustomerAddress",value:(b=fe(regeneratorRuntime.mark((function e(r,n){var i,o,a,s,u,d,c,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=(null==r?void 0:r.parameters)||{},o=this.clientConfig.parameters||{},a=ve({version:"v1"},o),void 0!==i.organizationId&&(a.organizationId=i.organizationId),void 0!==i.customerId&&(a.customerId=i.customerId),void 0!==i.addressName&&(a.addressName=i.addressName),delete(s=ve({siteId:o.siteId},i)).organizationId,delete s.customerId,delete s.addressName,void 0===s.siteId&&void 0!==o.siteId&&(s.siteId=o.siteId),u=new zo("/organizations/{organizationId}/customers/{customerId}/addresses/{addressName}",this.clientConfig.baseUri,{pathParams:a,queryParams:s,origin:this.clientConfig.proxy}),d=ve(ve({},this.clientConfig.headers),null==r?void 0:r.headers),c=new t.Request(u.toString(),ve(ve({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"PATCH"})),e.next=16,t.fetch(c);case 16:if(l=e.sent,!n){e.next=21;break}return e.abrupt("return",l);case 21:return e.abrupt("return",l.json());case 22:case"end":return e.stop()}}),e,this)}))),function(e,t){return b.apply(this,arguments)})},{key:"getCustomerBaskets",value:(y=fe(regeneratorRuntime.mark((function e(r,n){var i,o,a,s,u,d,c,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=(null==r?void 0:r.parameters)||{},o=this.clientConfig.parameters||{},a=ve({version:"v1"},o),void 0!==i.organizationId&&(a.organizationId=i.organizationId),void 0!==i.customerId&&(a.customerId=i.customerId),delete(s=ve({siteId:o.siteId},i)).organizationId,delete s.customerId,void 0===s.siteId&&void 0!==o.siteId&&(s.siteId=o.siteId),u=new zo("/organizations/{organizationId}/customers/{customerId}/baskets",this.clientConfig.baseUri,{pathParams:a,queryParams:s,origin:this.clientConfig.proxy}),d=ve(ve({},this.clientConfig.headers),null==r?void 0:r.headers),c=new t.Request(u.toString(),ve(ve({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=14,t.fetch(c);case 14:if(l=e.sent,!n){e.next=19;break}return e.abrupt("return",l);case 19:return e.abrupt("return",l.json());case 20:case"end":return e.stop()}}),e,this)}))),function(e,t){return y.apply(this,arguments)})},{key:"getCustomerOrders",value:(v=fe(regeneratorRuntime.mark((function e(r,n){var i,o,a,s,u,d,c,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=(null==r?void 0:r.parameters)||{},o=this.clientConfig.parameters||{},a=ve({version:"v1"},o),void 0!==i.organizationId&&(a.organizationId=i.organizationId),void 0!==i.customerId&&(a.customerId=i.customerId),delete(s=ve({siteId:o.siteId},i)).organizationId,delete s.customerId,void 0===s.siteId&&void 0!==o.siteId&&(s.siteId=o.siteId),u=new zo("/organizations/{organizationId}/customers/{customerId}/orders",this.clientConfig.baseUri,{pathParams:a,queryParams:s,origin:this.clientConfig.proxy}),d=ve(ve({},this.clientConfig.headers),null==r?void 0:r.headers),c=new t.Request(u.toString(),ve(ve({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=14,t.fetch(c);case 14:if(l=e.sent,!n){e.next=19;break}return e.abrupt("return",l);case 19:return e.abrupt("return",l.json());case 20:case"end":return e.stop()}}),e,this)}))),function(e,t){return v.apply(this,arguments)})},{key:"updateCustomerPassword",value:(I=fe(regeneratorRuntime.mark((function e(r,n){var i,o,a,s,u,d,c,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=(null==r?void 0:r.parameters)||{},o=this.clientConfig.parameters||{},a=ve({version:"v1"},o),void 0!==i.organizationId&&(a.organizationId=i.organizationId),void 0!==i.customerId&&(a.customerId=i.customerId),delete(s=ve({siteId:o.siteId},i)).organizationId,delete s.customerId,void 0===s.siteId&&void 0!==o.siteId&&(s.siteId=o.siteId),u=new zo("/organizations/{organizationId}/customers/{customerId}/password",this.clientConfig.baseUri,{pathParams:a,queryParams:s,origin:this.clientConfig.proxy}),d=ve(ve({},this.clientConfig.headers),null==r?void 0:r.headers),c=new t.Request(u.toString(),ve(ve({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"PUT"})),e.next=14,t.fetch(c);case 14:if(l=e.sent,!n){e.next=19;break}return e.abrupt("return",l);case 19:return e.abrupt("return",l.json());case 20:case"end":return e.stop()}}),e,this)}))),function(e,t){return I.apply(this,arguments)})},{key:"createCustomerPaymentInstrument",value:(m=fe(regeneratorRuntime.mark((function e(r,n){var i,o,a,s,u,d,c,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=(null==r?void 0:r.parameters)||{},o=this.clientConfig.parameters||{},a=ve({version:"v1"},o),void 0!==i.organizationId&&(a.organizationId=i.organizationId),void 0!==i.customerId&&(a.customerId=i.customerId),delete(s=ve({siteId:o.siteId},i)).organizationId,delete s.customerId,void 0===s.siteId&&void 0!==o.siteId&&(s.siteId=o.siteId),u=new zo("/organizations/{organizationId}/customers/{customerId}/payment-instruments",this.clientConfig.baseUri,{pathParams:a,queryParams:s,origin:this.clientConfig.proxy}),d=ve(ve({},this.clientConfig.headers),null==r?void 0:r.headers),c=new t.Request(u.toString(),ve(ve({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"POST"})),e.next=14,t.fetch(c);case 14:if(l=e.sent,!n){e.next=19;break}return e.abrupt("return",l);case 19:return e.abrupt("return",l.json());case 20:case"end":return e.stop()}}),e,this)}))),function(e,t){return m.apply(this,arguments)})},{key:"deleteCustomerPaymentInstrument",value:(g=fe(regeneratorRuntime.mark((function e(r,n){var i,o,a,s,u,d,c,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=(null==r?void 0:r.parameters)||{},o=this.clientConfig.parameters||{},a=ve({version:"v1"},o),void 0!==i.organizationId&&(a.organizationId=i.organizationId),void 0!==i.customerId&&(a.customerId=i.customerId),void 0!==i.paymentInstrumentId&&(a.paymentInstrumentId=i.paymentInstrumentId),delete(s=ve({siteId:o.siteId},i)).organizationId,delete s.customerId,delete s.paymentInstrumentId,void 0===s.siteId&&void 0!==o.siteId&&(s.siteId=o.siteId),u=new zo("/organizations/{organizationId}/customers/{customerId}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:s,origin:this.clientConfig.proxy}),d=ve(ve({},this.clientConfig.headers),null==r?void 0:r.headers),c=new t.Request(u.toString(),ve(ve({},this.clientConfig.fetchOptions),{},{headers:d,method:"DELETE"})),e.next=16,t.fetch(c);case 16:if(l=e.sent,!n){e.next=21;break}return e.abrupt("return",l);case 21:return e.abrupt("return",l.json());case 22:case"end":return e.stop()}}),e,this)}))),function(e,t){return g.apply(this,arguments)})},{key:"getCustomerPaymentInstrument",value:(p=fe(regeneratorRuntime.mark((function e(r,n){var i,o,a,s,u,d,c,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=(null==r?void 0:r.parameters)||{},o=this.clientConfig.parameters||{},a=ve({version:"v1"},o),void 0!==i.organizationId&&(a.organizationId=i.organizationId),void 0!==i.customerId&&(a.customerId=i.customerId),void 0!==i.paymentInstrumentId&&(a.paymentInstrumentId=i.paymentInstrumentId),delete(s=ve({siteId:o.siteId},i)).organizationId,delete s.customerId,delete s.paymentInstrumentId,void 0===s.siteId&&void 0!==o.siteId&&(s.siteId=o.siteId),u=new zo("/organizations/{organizationId}/customers/{customerId}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:s,origin:this.clientConfig.proxy}),d=ve(ve({},this.clientConfig.headers),null==r?void 0:r.headers),c=new t.Request(u.toString(),ve(ve({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=16,t.fetch(c);case 16:if(l=e.sent,!n){e.next=21;break}return e.abrupt("return",l);case 21:return e.abrupt("return",l.json());case 22:case"end":return e.stop()}}),e,this)}))),function(e,t){return p.apply(this,arguments)})},{key:"getCustomerProductLists",value:(h=fe(regeneratorRuntime.mark((function e(r,n){var i,o,a,s,u,d,c,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=(null==r?void 0:r.parameters)||{},o=this.clientConfig.parameters||{},a=ve({version:"v1"},o),void 0!==i.organizationId&&(a.organizationId=i.organizationId),void 0!==i.customerId&&(a.customerId=i.customerId),delete(s=ve({siteId:o.siteId},i)).organizationId,delete s.customerId,void 0===s.siteId&&void 0!==o.siteId&&(s.siteId=o.siteId),u=new zo("/organizations/{organizationId}/customers/{customerId}/product-lists",this.clientConfig.baseUri,{pathParams:a,queryParams:s,origin:this.clientConfig.proxy}),d=ve(ve({},this.clientConfig.headers),null==r?void 0:r.headers),c=new t.Request(u.toString(),ve(ve({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=14,t.fetch(c);case 14:if(l=e.sent,!n){e.next=19;break}return e.abrupt("return",l);case 19:return e.abrupt("return",l.json());case 20:case"end":return e.stop()}}),e,this)}))),function(e,t){return h.apply(this,arguments)})},{key:"createCustomerProductList",value:(f=fe(regeneratorRuntime.mark((function e(r,n){var i,o,a,s,u,d,c,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=(null==r?void 0:r.parameters)||{},o=this.clientConfig.parameters||{},a=ve({version:"v1"},o),void 0!==i.organizationId&&(a.organizationId=i.organizationId),void 0!==i.customerId&&(a.customerId=i.customerId),delete(s=ve({siteId:o.siteId},i)).organizationId,delete s.customerId,void 0===s.siteId&&void 0!==o.siteId&&(s.siteId=o.siteId),u=new zo("/organizations/{organizationId}/customers/{customerId}/product-lists",this.clientConfig.baseUri,{pathParams:a,queryParams:s,origin:this.clientConfig.proxy}),d=ve(ve({},this.clientConfig.headers),null==r?void 0:r.headers),c=new t.Request(u.toString(),ve(ve({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"POST"})),e.next=14,t.fetch(c);case 14:if(l=e.sent,!n){e.next=19;break}return e.abrupt("return",l);case 19:return e.abrupt("return",l.json());case 20:case"end":return e.stop()}}),e,this)}))),function(e,t){return f.apply(this,arguments)})},{key:"deleteCustomerProductList",value:(l=fe(regeneratorRuntime.mark((function e(r,n){var i,o,a,s,u,d,c,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=(null==r?void 0:r.parameters)||{},o=this.clientConfig.parameters||{},a=ve({version:"v1"},o),void 0!==i.organizationId&&(a.organizationId=i.organizationId),void 0!==i.customerId&&(a.customerId=i.customerId),void 0!==i.listId&&(a.listId=i.listId),delete(s=ve({siteId:o.siteId},i)).organizationId,delete s.customerId,delete s.listId,void 0===s.siteId&&void 0!==o.siteId&&(s.siteId=o.siteId),u=new zo("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}",this.clientConfig.baseUri,{pathParams:a,queryParams:s,origin:this.clientConfig.proxy}),d=ve(ve({},this.clientConfig.headers),null==r?void 0:r.headers),c=new t.Request(u.toString(),ve(ve({},this.clientConfig.fetchOptions),{},{headers:d,method:"DELETE"})),e.next=16,t.fetch(c);case 16:if(l=e.sent,!n){e.next=21;break}return e.abrupt("return",l);case 21:return e.abrupt("return",l.json());case 22:case"end":return e.stop()}}),e,this)}))),function(e,t){return l.apply(this,arguments)})},{key:"getCustomerProductList",value:(c=fe(regeneratorRuntime.mark((function e(r,n){var i,o,a,s,u,d,c,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=(null==r?void 0:r.parameters)||{},o=this.clientConfig.parameters||{},a=ve({version:"v1"},o),void 0!==i.organizationId&&(a.organizationId=i.organizationId),void 0!==i.customerId&&(a.customerId=i.customerId),void 0!==i.listId&&(a.listId=i.listId),delete(s=ve({siteId:o.siteId},i)).organizationId,delete s.customerId,delete s.listId,void 0===s.siteId&&void 0!==o.siteId&&(s.siteId=o.siteId),u=new zo("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}",this.clientConfig.baseUri,{pathParams:a,queryParams:s,origin:this.clientConfig.proxy}),d=ve(ve({},this.clientConfig.headers),null==r?void 0:r.headers),c=new t.Request(u.toString(),ve(ve({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=16,t.fetch(c);case 16:if(l=e.sent,!n){e.next=21;break}return e.abrupt("return",l);case 21:return e.abrupt("return",l.json());case 22:case"end":return e.stop()}}),e,this)}))),function(e,t){return c.apply(this,arguments)})},{key:"updateCustomerProductList",value:(d=fe(regeneratorRuntime.mark((function e(r,n){var i,o,a,s,u,d,c,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=(null==r?void 0:r.parameters)||{},o=this.clientConfig.parameters||{},a=ve({version:"v1"},o),void 0!==i.organizationId&&(a.organizationId=i.organizationId),void 0!==i.customerId&&(a.customerId=i.customerId),void 0!==i.listId&&(a.listId=i.listId),delete(s=ve({siteId:o.siteId},i)).organizationId,delete s.customerId,delete s.listId,void 0===s.siteId&&void 0!==o.siteId&&(s.siteId=o.siteId),u=new zo("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}",this.clientConfig.baseUri,{pathParams:a,queryParams:s,origin:this.clientConfig.proxy}),d=ve(ve({},this.clientConfig.headers),null==r?void 0:r.headers),c=new t.Request(u.toString(),ve(ve({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"PATCH"})),e.next=16,t.fetch(c);case 16:if(l=e.sent,!n){e.next=21;break}return e.abrupt("return",l);case 21:return e.abrupt("return",l.json());case 22:case"end":return e.stop()}}),e,this)}))),function(e,t){return d.apply(this,arguments)})},{key:"createCustomerProductListItem",value:(u=fe(regeneratorRuntime.mark((function e(r,n){var i,o,a,s,u,d,c,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=(null==r?void 0:r.parameters)||{},o=this.clientConfig.parameters||{},a=ve({version:"v1"},o),void 0!==i.organizationId&&(a.organizationId=i.organizationId),void 0!==i.customerId&&(a.customerId=i.customerId),void 0!==i.listId&&(a.listId=i.listId),delete(s=ve({siteId:o.siteId},i)).organizationId,delete s.customerId,delete s.listId,void 0===s.siteId&&void 0!==o.siteId&&(s.siteId=o.siteId),u=new zo("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}/items",this.clientConfig.baseUri,{pathParams:a,queryParams:s,origin:this.clientConfig.proxy}),d=ve(ve({},this.clientConfig.headers),null==r?void 0:r.headers),c=new t.Request(u.toString(),ve(ve({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"POST"})),e.next=16,t.fetch(c);case 16:if(l=e.sent,!n){e.next=21;break}return e.abrupt("return",l);case 21:return e.abrupt("return",l.json());case 22:case"end":return e.stop()}}),e,this)}))),function(e,t){return u.apply(this,arguments)})},{key:"deleteCustomerProductListItem",value:(s=fe(regeneratorRuntime.mark((function e(r,n){var i,o,a,s,u,d,c,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=(null==r?void 0:r.parameters)||{},o=this.clientConfig.parameters||{},a=ve({version:"v1"},o),void 0!==i.organizationId&&(a.organizationId=i.organizationId),void 0!==i.customerId&&(a.customerId=i.customerId),void 0!==i.listId&&(a.listId=i.listId),void 0!==i.itemId&&(a.itemId=i.itemId),delete(s=ve({siteId:o.siteId},i)).organizationId,delete s.customerId,delete s.listId,delete s.itemId,void 0===s.siteId&&void 0!==o.siteId&&(s.siteId=o.siteId),u=new zo("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:s,origin:this.clientConfig.proxy}),d=ve(ve({},this.clientConfig.headers),null==r?void 0:r.headers),c=new t.Request(u.toString(),ve(ve({},this.clientConfig.fetchOptions),{},{headers:d,method:"DELETE"})),e.next=18,t.fetch(c);case 18:if(l=e.sent,!n){e.next=23;break}return e.abrupt("return",l);case 23:return e.abrupt("return",l.json());case 24:case"end":return e.stop()}}),e,this)}))),function(e,t){return s.apply(this,arguments)})},{key:"getCustomerProductListItem",value:(a=fe(regeneratorRuntime.mark((function e(r,n){var i,o,a,s,u,d,c,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=(null==r?void 0:r.parameters)||{},o=this.clientConfig.parameters||{},a=ve({version:"v1"},o),void 0!==i.organizationId&&(a.organizationId=i.organizationId),void 0!==i.customerId&&(a.customerId=i.customerId),void 0!==i.listId&&(a.listId=i.listId),void 0!==i.itemId&&(a.itemId=i.itemId),delete(s=ve({siteId:o.siteId},i)).organizationId,delete s.customerId,delete s.listId,delete s.itemId,void 0===s.siteId&&void 0!==o.siteId&&(s.siteId=o.siteId),u=new zo("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:s,origin:this.clientConfig.proxy}),d=ve(ve({},this.clientConfig.headers),null==r?void 0:r.headers),c=new t.Request(u.toString(),ve(ve({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=18,t.fetch(c);case 18:if(l=e.sent,!n){e.next=23;break}return e.abrupt("return",l);case 23:return e.abrupt("return",l.json());case 24:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"updateCustomerProductListItem",value:(o=fe(regeneratorRuntime.mark((function e(r,n){var i,o,a,s,u,d,c,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=(null==r?void 0:r.parameters)||{},o=this.clientConfig.parameters||{},a=ve({version:"v1"},o),void 0!==i.organizationId&&(a.organizationId=i.organizationId),void 0!==i.customerId&&(a.customerId=i.customerId),void 0!==i.listId&&(a.listId=i.listId),void 0!==i.itemId&&(a.itemId=i.itemId),delete(s=ve({siteId:o.siteId},i)).organizationId,delete s.customerId,delete s.listId,delete s.itemId,void 0===s.siteId&&void 0!==o.siteId&&(s.siteId=o.siteId),u=new zo("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:s,origin:this.clientConfig.proxy}),d=ve(ve({},this.clientConfig.headers),null==r?void 0:r.headers),c=new t.Request(u.toString(),ve(ve({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"PATCH"})),e.next=18,t.fetch(c);case 18:if(l=e.sent,!n){e.next=23;break}return e.abrupt("return",l);case 23:return e.abrupt("return",l.json());case 24:case"end":return e.stop()}}),e,this)}))),function(e,t){return o.apply(this,arguments)})},{key:"getPublicProductListsBySearchTerm",value:(i=fe(regeneratorRuntime.mark((function e(r,n){var i,o,a,s,u,d,c,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=(null==r?void 0:r.parameters)||{},o=this.clientConfig.parameters||{},a=ve({version:"v1"},o),void 0!==i.organizationId&&(a.organizationId=i.organizationId),delete(s=ve({siteId:o.siteId},i)).organizationId,void 0===s.siteId&&void 0!==o.siteId&&(s.siteId=o.siteId),u=new zo("/organizations/{organizationId}/product-lists",this.clientConfig.baseUri,{pathParams:a,queryParams:s,origin:this.clientConfig.proxy}),d=ve(ve({},this.clientConfig.headers),null==r?void 0:r.headers),c=new t.Request(u.toString(),ve(ve({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=12,t.fetch(c);case 12:if(l=e.sent,!n){e.next=17;break}return e.abrupt("return",l);case 17:return e.abrupt("return",l.json());case 18:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"getPublicProductList",value:(n=fe(regeneratorRuntime.mark((function e(r,n){var i,o,a,s,u,d,c,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=(null==r?void 0:r.parameters)||{},o=this.clientConfig.parameters||{},a=ve({version:"v1"},o),void 0!==i.organizationId&&(a.organizationId=i.organizationId),void 0!==i.listId&&(a.listId=i.listId),delete(s=ve({siteId:o.siteId},i)).organizationId,delete s.listId,void 0===s.siteId&&void 0!==o.siteId&&(s.siteId=o.siteId),u=new zo("/organizations/{organizationId}/product-lists/{listId}",this.clientConfig.baseUri,{pathParams:a,queryParams:s,origin:this.clientConfig.proxy}),d=ve(ve({},this.clientConfig.headers),null==r?void 0:r.headers),c=new t.Request(u.toString(),ve(ve({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=14,t.fetch(c);case 14:if(l=e.sent,!n){e.next=19;break}return e.abrupt("return",l);case 19:return e.abrupt("return",l.json());case 20:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"getProductListItem",value:(r=fe(regeneratorRuntime.mark((function e(r,n){var i,o,a,s,u,d,c,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=(null==r?void 0:r.parameters)||{},o=this.clientConfig.parameters||{},a=ve({version:"v1"},o),void 0!==i.organizationId&&(a.organizationId=i.organizationId),void 0!==i.listId&&(a.listId=i.listId),void 0!==i.itemId&&(a.itemId=i.itemId),delete(s=ve({siteId:o.siteId},i)).organizationId,delete s.listId,delete s.itemId,void 0===s.siteId&&void 0!==o.siteId&&(s.siteId=o.siteId),u=new zo("/organizations/{organizationId}/product-lists/{listId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:s,origin:this.clientConfig.proxy}),d=ve(ve({},this.clientConfig.headers),null==r?void 0:r.headers),c=new t.Request(u.toString(),ve(ve({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=16,t.fetch(c);case 16:if(l=e.sent,!n){e.next=21;break}return e.abrupt("return",l);case 21:return e.abrupt("return",l.json());case 22:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})}]),e}();me(Ro,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/customer/shopper-customers/{version}");var Po=function(){function e(t){he(this,e),me(this,"clientConfig",void 0),this.clientConfig=new pt(ve({baseUri:(this instanceof e?this.constructor:void 0).defaultBaseUri},t))}var r;return ge(e,[{key:"getGiftCertificate",value:(r=fe(regeneratorRuntime.mark((function e(r,n){var i,o,a,s,u,d,c,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=(null==r?void 0:r.parameters)||{},o=this.clientConfig.parameters||{},a=ve({version:"v1"},o),void 0!==i.organizationId&&(a.organizationId=i.organizationId),delete(s=ve({siteId:o.siteId},i)).organizationId,void 0===s.siteId&&void 0!==o.siteId&&(s.siteId=o.siteId),u=new zo("/organizations/{organizationId}/gift-certificate",this.clientConfig.baseUri,{pathParams:a,queryParams:s,origin:this.clientConfig.proxy}),d=ve(ve({},this.clientConfig.headers),null==r?void 0:r.headers),c=new t.Request(u.toString(),ve(ve({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"POST"})),e.next=12,t.fetch(c);case 12:if(l=e.sent,!n){e.next=17;break}return e.abrupt("return",l);case 17:return e.abrupt("return",l.json());case 18:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})}]),e}();me(Po,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/pricing/shopper-gift-certificates/{version}");var So=function(){function e(t){he(this,e),me(this,"clientConfig",void 0),this.clientConfig=new pt(ve({baseUri:(this instanceof e?this.constructor:void 0).defaultBaseUri},t))}var r,n,i,o,a,s,u,d,c;return ge(e,[{key:"authenticateCustomer",value:(c=fe(regeneratorRuntime.mark((function e(r,n){var i,o,a,s,u,d,c,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=(null==r?void 0:r.parameters)||{},o=this.clientConfig.parameters||{},a=ve({version:"v1"},o),void 0!==i.organizationId&&(a.organizationId=i.organizationId),delete(s=ve({siteId:o.siteId},i)).organizationId,u=new zo("/organizations/{organizationId}/oauth2/login",this.clientConfig.baseUri,{pathParams:a,queryParams:s,origin:this.clientConfig.proxy}),d=ve(ve({},this.clientConfig.headers),null==r?void 0:r.headers),c=new t.Request(u.toString(),ve(ve({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"POST"})),e.next=11,t.fetch(c);case 11:if(l=e.sent,!n){e.next=16;break}return e.abrupt("return",l);case 16:return e.abrupt("return",l.json());case 17:case"end":return e.stop()}}),e,this)}))),function(e,t){return c.apply(this,arguments)})},{key:"logoutCustomer",value:(d=fe(regeneratorRuntime.mark((function e(r,n){var i,o,a,s,u,d,c,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=(null==r?void 0:r.parameters)||{},o=this.clientConfig.parameters||{},a=ve({version:"v1"},o),void 0!==i.organizationId&&(a.organizationId=i.organizationId),delete(s=ve({siteId:o.siteId},i)).organizationId,u=new zo("/organizations/{organizationId}/oauth2/logout",this.clientConfig.baseUri,{pathParams:a,queryParams:s,origin:this.clientConfig.proxy}),d=ve(ve({},this.clientConfig.headers),null==r?void 0:r.headers),c=new t.Request(u.toString(),ve(ve({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=11,t.fetch(c);case 11:if(l=e.sent,!n){e.next=16;break}return e.abrupt("return",l);case 16:return e.abrupt("return",l.json());case 17:case"end":return e.stop()}}),e,this)}))),function(e,t){return d.apply(this,arguments)})},{key:"authorizeCustomer",value:(u=fe(regeneratorRuntime.mark((function e(r,n){var i,o,a,s,u,d,c,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=(null==r?void 0:r.parameters)||{},o=this.clientConfig.parameters||{},a=ve({version:"v1"},o),void 0!==i.organizationId&&(a.organizationId=i.organizationId),delete(s=ve({siteId:o.siteId},i)).organizationId,u=new zo("/organizations/{organizationId}/oauth2/authorize",this.clientConfig.baseUri,{pathParams:a,queryParams:s,origin:this.clientConfig.proxy}),d=ve(ve({},this.clientConfig.headers),null==r?void 0:r.headers),c=new t.Request(u.toString(),ve(ve({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=11,t.fetch(c);case 11:if(l=e.sent,!n){e.next=16;break}return e.abrupt("return",l);case 16:return e.abrupt("return",l.json());case 17:case"end":return e.stop()}}),e,this)}))),function(e,t){return u.apply(this,arguments)})},{key:"getAccessToken",value:(s=fe(regeneratorRuntime.mark((function e(r,n){var i,o,a,s,u,d,c,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=(null==r?void 0:r.parameters)||{},o=this.clientConfig.parameters||{},a=ve({version:"v1"},o),void 0!==i.organizationId&&(a.organizationId=i.organizationId),delete(s=ve({siteId:o.siteId},i)).organizationId,u=new zo("/organizations/{organizationId}/oauth2/token",this.clientConfig.baseUri,{pathParams:a,queryParams:s,origin:this.clientConfig.proxy}),d=ve(ve({},this.clientConfig.headers),null==r?void 0:r.headers),c=new t.Request(u.toString(),ve(ve({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"POST"})),e.next=11,t.fetch(c);case 11:if(l=e.sent,!n){e.next=16;break}return e.abrupt("return",l);case 16:return e.abrupt("return",l.json());case 17:case"end":return e.stop()}}),e,this)}))),function(e,t){return s.apply(this,arguments)})},{key:"revokeToken",value:(a=fe(regeneratorRuntime.mark((function e(r,n){var i,o,a,s,u,d,c,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=(null==r?void 0:r.parameters)||{},o=this.clientConfig.parameters||{},a=ve({version:"v1"},o),void 0!==i.organizationId&&(a.organizationId=i.organizationId),delete(s=ve({siteId:o.siteId},i)).organizationId,u=new zo("/organizations/{organizationId}/oauth2/revoke",this.clientConfig.baseUri,{pathParams:a,queryParams:s,origin:this.clientConfig.proxy}),d=ve(ve({},this.clientConfig.headers),null==r?void 0:r.headers),c=new t.Request(u.toString(),ve(ve({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"POST"})),e.next=11,t.fetch(c);case 11:if(l=e.sent,!n){e.next=16;break}return e.abrupt("return",l);case 16:return e.abrupt("return",l.json());case 17:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"introspectToken",value:(o=fe(regeneratorRuntime.mark((function e(r,n){var i,o,a,s,u,d,c,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=(null==r?void 0:r.parameters)||{},o=this.clientConfig.parameters||{},a=ve({version:"v1"},o),void 0!==i.organizationId&&(a.organizationId=i.organizationId),delete(s=ve({siteId:o.siteId},i)).organizationId,u=new zo("/organizations/{organizationId}/oauth2/introspect",this.clientConfig.baseUri,{pathParams:a,queryParams:s,origin:this.clientConfig.proxy}),d=ve(ve({},this.clientConfig.headers),null==r?void 0:r.headers),c=new t.Request(u.toString(),ve(ve({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"POST"})),e.next=11,t.fetch(c);case 11:if(l=e.sent,!n){e.next=16;break}return e.abrupt("return",l);case 16:return e.abrupt("return",l.json());case 17:case"end":return e.stop()}}),e,this)}))),function(e,t){return o.apply(this,arguments)})},{key:"getUserInfo",value:(i=fe(regeneratorRuntime.mark((function e(r,n){var i,o,a,s,u,d,c,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=(null==r?void 0:r.parameters)||{},o=this.clientConfig.parameters||{},a=ve({version:"v1"},o),void 0!==i.organizationId&&(a.organizationId=i.organizationId),delete(s=ve({siteId:o.siteId},i)).organizationId,u=new zo("/organizations/{organizationId}/oauth2/userinfo",this.clientConfig.baseUri,{pathParams:a,queryParams:s,origin:this.clientConfig.proxy}),d=ve(ve({},this.clientConfig.headers),null==r?void 0:r.headers),c=new t.Request(u.toString(),ve(ve({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=11,t.fetch(c);case 11:if(l=e.sent,!n){e.next=16;break}return e.abrupt("return",l);case 16:return e.abrupt("return",l.json());case 17:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"getWellknownOpenidConfiguration",value:(n=fe(regeneratorRuntime.mark((function e(r,n){var i,o,a,s,u,d,c,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=(null==r?void 0:r.parameters)||{},o=this.clientConfig.parameters||{},a=ve({version:"v1"},o),void 0!==i.organizationId&&(a.organizationId=i.organizationId),delete(s=ve({siteId:o.siteId},i)).organizationId,u=new zo("/organizations/{organizationId}/oauth2/.well-known/openid-configuration",this.clientConfig.baseUri,{pathParams:a,queryParams:s,origin:this.clientConfig.proxy}),d=ve(ve({},this.clientConfig.headers),null==r?void 0:r.headers),c=new t.Request(u.toString(),ve(ve({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=11,t.fetch(c);case 11:if(l=e.sent,!n){e.next=16;break}return e.abrupt("return",l);case 16:return e.abrupt("return",l.json());case 17:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"getJwksUri",value:(r=fe(regeneratorRuntime.mark((function e(r,n){var i,o,a,s,u,d,c,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=(null==r?void 0:r.parameters)||{},o=this.clientConfig.parameters||{},a=ve({version:"v1"},o),void 0!==i.organizationId&&(a.organizationId=i.organizationId),delete(s=ve({siteId:o.siteId},i)).organizationId,u=new zo("/organizations/{organizationId}/oauth2/jwks",this.clientConfig.baseUri,{pathParams:a,queryParams:s,origin:this.clientConfig.proxy}),d=ve(ve({},this.clientConfig.headers),null==r?void 0:r.headers),c=new t.Request(u.toString(),ve(ve({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=11,t.fetch(c);case 11:if(l=e.sent,!n){e.next=16;break}return e.abrupt("return",l);case 16:return e.abrupt("return",l.json());case 17:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})}]),e}();me(So,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/shopper/auth/{version}");var qo=function(){function e(t){he(this,e),me(this,"clientConfig",void 0),this.clientConfig=new pt(ve({baseUri:(this instanceof e?this.constructor:void 0).defaultBaseUri},t))}var r,n,i,o,a,s,u;return ge(e,[{key:"createOrder",value:(u=fe(regeneratorRuntime.mark((function e(r,n){var i,o,a,s,u,d,c,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=(null==r?void 0:r.parameters)||{},o=this.clientConfig.parameters||{},a=ve({version:"v1"},o),void 0!==i.organizationId&&(a.organizationId=i.organizationId),delete(s=ve({siteId:o.siteId},i)).organizationId,void 0===s.siteId&&void 0!==o.siteId&&(s.siteId=o.siteId),u=new zo("/organizations/{organizationId}/orders",this.clientConfig.baseUri,{pathParams:a,queryParams:s,origin:this.clientConfig.proxy}),d=ve(ve({},this.clientConfig.headers),null==r?void 0:r.headers),c=new t.Request(u.toString(),ve(ve({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"POST"})),e.next=12,t.fetch(c);case 12:if(l=e.sent,!n){e.next=17;break}return e.abrupt("return",l);case 17:return e.abrupt("return",l.json());case 18:case"end":return e.stop()}}),e,this)}))),function(e,t){return u.apply(this,arguments)})},{key:"getOrder",value:(s=fe(regeneratorRuntime.mark((function e(r,n){var i,o,a,s,u,d,c,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=(null==r?void 0:r.parameters)||{},o=this.clientConfig.parameters||{},a=ve({version:"v1"},o),void 0!==i.organizationId&&(a.organizationId=i.organizationId),void 0!==i.orderNo&&(a.orderNo=i.orderNo),delete(s=ve({siteId:o.siteId},i)).organizationId,delete s.orderNo,void 0===s.siteId&&void 0!==o.siteId&&(s.siteId=o.siteId),u=new zo("/organizations/{organizationId}/orders/{orderNo}",this.clientConfig.baseUri,{pathParams:a,queryParams:s,origin:this.clientConfig.proxy}),d=ve(ve({},this.clientConfig.headers),null==r?void 0:r.headers),c=new t.Request(u.toString(),ve(ve({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=14,t.fetch(c);case 14:if(l=e.sent,!n){e.next=19;break}return e.abrupt("return",l);case 19:return e.abrupt("return",l.json());case 20:case"end":return e.stop()}}),e,this)}))),function(e,t){return s.apply(this,arguments)})},{key:"createPaymentInstrumentForOrder",value:(a=fe(regeneratorRuntime.mark((function e(r,n){var i,o,a,s,u,d,c,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=(null==r?void 0:r.parameters)||{},o=this.clientConfig.parameters||{},a=ve({version:"v1"},o),void 0!==i.organizationId&&(a.organizationId=i.organizationId),void 0!==i.orderNo&&(a.orderNo=i.orderNo),delete(s=ve({siteId:o.siteId},i)).organizationId,delete s.orderNo,void 0===s.siteId&&void 0!==o.siteId&&(s.siteId=o.siteId),u=new zo("/organizations/{organizationId}/orders/{orderNo}/payment-instruments",this.clientConfig.baseUri,{pathParams:a,queryParams:s,origin:this.clientConfig.proxy}),d=ve(ve({},this.clientConfig.headers),null==r?void 0:r.headers),c=new t.Request(u.toString(),ve(ve({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"POST"})),e.next=14,t.fetch(c);case 14:if(l=e.sent,!n){e.next=19;break}return e.abrupt("return",l);case 19:return e.abrupt("return",l.json());case 20:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"removePaymentInstrumentFromOrder",value:(o=fe(regeneratorRuntime.mark((function e(r,n){var i,o,a,s,u,d,c,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=(null==r?void 0:r.parameters)||{},o=this.clientConfig.parameters||{},a=ve({version:"v1"},o),void 0!==i.organizationId&&(a.organizationId=i.organizationId),void 0!==i.orderNo&&(a.orderNo=i.orderNo),void 0!==i.paymentInstrumentId&&(a.paymentInstrumentId=i.paymentInstrumentId),delete(s=ve({siteId:o.siteId},i)).organizationId,delete s.orderNo,delete s.paymentInstrumentId,void 0===s.siteId&&void 0!==o.siteId&&(s.siteId=o.siteId),u=new zo("/organizations/{organizationId}/orders/{orderNo}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:s,origin:this.clientConfig.proxy}),d=ve(ve({},this.clientConfig.headers),null==r?void 0:r.headers),c=new t.Request(u.toString(),ve(ve({},this.clientConfig.fetchOptions),{},{headers:d,method:"DELETE"})),e.next=16,t.fetch(c);case 16:if(l=e.sent,!n){e.next=21;break}return e.abrupt("return",l);case 21:return e.abrupt("return",l.json());case 22:case"end":return e.stop()}}),e,this)}))),function(e,t){return o.apply(this,arguments)})},{key:"updatePaymentInstrumentForOrder",value:(i=fe(regeneratorRuntime.mark((function e(r,n){var i,o,a,s,u,d,c,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=(null==r?void 0:r.parameters)||{},o=this.clientConfig.parameters||{},a=ve({version:"v1"},o),void 0!==i.organizationId&&(a.organizationId=i.organizationId),void 0!==i.orderNo&&(a.orderNo=i.orderNo),void 0!==i.paymentInstrumentId&&(a.paymentInstrumentId=i.paymentInstrumentId),delete(s=ve({siteId:o.siteId},i)).organizationId,delete s.orderNo,delete s.paymentInstrumentId,void 0===s.siteId&&void 0!==o.siteId&&(s.siteId=o.siteId),u=new zo("/organizations/{organizationId}/orders/{orderNo}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:s,origin:this.clientConfig.proxy}),d=ve(ve({},this.clientConfig.headers),null==r?void 0:r.headers),c=new t.Request(u.toString(),ve(ve({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"PATCH"})),e.next=16,t.fetch(c);case 16:if(l=e.sent,!n){e.next=21;break}return e.abrupt("return",l);case 21:return e.abrupt("return",l.json());case 22:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"getPaymentMethodsForOrder",value:(n=fe(regeneratorRuntime.mark((function e(r,n){var i,o,a,s,u,d,c,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=(null==r?void 0:r.parameters)||{},o=this.clientConfig.parameters||{},a=ve({version:"v1"},o),void 0!==i.organizationId&&(a.organizationId=i.organizationId),void 0!==i.orderNo&&(a.orderNo=i.orderNo),delete(s=ve({siteId:o.siteId},i)).organizationId,delete s.orderNo,void 0===s.siteId&&void 0!==o.siteId&&(s.siteId=o.siteId),u=new zo("/organizations/{organizationId}/orders/{orderNo}/payment-methods",this.clientConfig.baseUri,{pathParams:a,queryParams:s,origin:this.clientConfig.proxy}),d=ve(ve({},this.clientConfig.headers),null==r?void 0:r.headers),c=new t.Request(u.toString(),ve(ve({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=14,t.fetch(c);case 14:if(l=e.sent,!n){e.next=19;break}return e.abrupt("return",l);case 19:return e.abrupt("return",l.json());case 20:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"getTaxesFromOrder",value:(r=fe(regeneratorRuntime.mark((function e(r,n){var i,o,a,s,u,d,c,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=(null==r?void 0:r.parameters)||{},o=this.clientConfig.parameters||{},a=ve({version:"v1"},o),void 0!==i.organizationId&&(a.organizationId=i.organizationId),void 0!==i.orderNo&&(a.orderNo=i.orderNo),delete(s=ve({siteId:o.siteId},i)).organizationId,delete s.orderNo,void 0===s.siteId&&void 0!==o.siteId&&(s.siteId=o.siteId),u=new zo("/organizations/{organizationId}/orders/{orderNo}/taxes",this.clientConfig.baseUri,{pathParams:a,queryParams:s,origin:this.clientConfig.proxy}),d=ve(ve({},this.clientConfig.headers),null==r?void 0:r.headers),c=new t.Request(u.toString(),ve(ve({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=14,t.fetch(c);case 14:if(l=e.sent,!n){e.next=19;break}return e.abrupt("return",l);case 19:return e.abrupt("return",l.json());case 20:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})}]),e}();me(qo,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/checkout/shopper-orders/{version}");var Oo=function(){function e(t){he(this,e),me(this,"clientConfig",void 0),this.clientConfig=new pt(ve({baseUri:(this instanceof e?this.constructor:void 0).defaultBaseUri},t))}var r,n,i,o;return ge(e,[{key:"getProducts",value:(o=fe(regeneratorRuntime.mark((function e(r,n){var i,o,a,s,u,d,c,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=(null==r?void 0:r.parameters)||{},o=this.clientConfig.parameters||{},a=ve({version:"v1"},o),void 0!==i.organizationId&&(a.organizationId=i.organizationId),delete(s=ve({siteId:o.siteId},i)).organizationId,void 0===s.siteId&&void 0!==o.siteId&&(s.siteId=o.siteId),u=new zo("/organizations/{organizationId}/products",this.clientConfig.baseUri,{pathParams:a,queryParams:s,origin:this.clientConfig.proxy}),d=ve(ve({},this.clientConfig.headers),null==r?void 0:r.headers),c=new t.Request(u.toString(),ve(ve({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=12,t.fetch(c);case 12:if(l=e.sent,!n){e.next=17;break}return e.abrupt("return",l);case 17:return e.abrupt("return",l.json());case 18:case"end":return e.stop()}}),e,this)}))),function(e,t){return o.apply(this,arguments)})},{key:"getProduct",value:(i=fe(regeneratorRuntime.mark((function e(r,n){var i,o,a,s,u,d,c,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=(null==r?void 0:r.parameters)||{},o=this.clientConfig.parameters||{},a=ve({version:"v1"},o),void 0!==i.organizationId&&(a.organizationId=i.organizationId),void 0!==i.id&&(a.id=i.id),delete(s=ve({siteId:o.siteId},i)).organizationId,delete s.id,void 0===s.siteId&&void 0!==o.siteId&&(s.siteId=o.siteId),u=new zo("/organizations/{organizationId}/products/{id}",this.clientConfig.baseUri,{pathParams:a,queryParams:s,origin:this.clientConfig.proxy}),d=ve(ve({},this.clientConfig.headers),null==r?void 0:r.headers),c=new t.Request(u.toString(),ve(ve({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=14,t.fetch(c);case 14:if(l=e.sent,!n){e.next=19;break}return e.abrupt("return",l);case 19:return e.abrupt("return",l.json());case 20:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"getCategories",value:(n=fe(regeneratorRuntime.mark((function e(r,n){var i,o,a,s,u,d,c,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=(null==r?void 0:r.parameters)||{},o=this.clientConfig.parameters||{},a=ve({version:"v1"},o),void 0!==i.organizationId&&(a.organizationId=i.organizationId),delete(s=ve({siteId:o.siteId},i)).organizationId,void 0===s.siteId&&void 0!==o.siteId&&(s.siteId=o.siteId),u=new zo("/organizations/{organizationId}/categories",this.clientConfig.baseUri,{pathParams:a,queryParams:s,origin:this.clientConfig.proxy}),d=ve(ve({},this.clientConfig.headers),null==r?void 0:r.headers),c=new t.Request(u.toString(),ve(ve({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=12,t.fetch(c);case 12:if(l=e.sent,!n){e.next=17;break}return e.abrupt("return",l);case 17:return e.abrupt("return",l.json());case 18:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"getCategory",value:(r=fe(regeneratorRuntime.mark((function e(r,n){var i,o,a,s,u,d,c,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=(null==r?void 0:r.parameters)||{},o=this.clientConfig.parameters||{},a=ve({version:"v1"},o),void 0!==i.organizationId&&(a.organizationId=i.organizationId),void 0!==i.id&&(a.id=i.id),delete(s=ve({siteId:o.siteId},i)).organizationId,delete s.id,void 0===s.siteId&&void 0!==o.siteId&&(s.siteId=o.siteId),u=new zo("/organizations/{organizationId}/categories/{id}",this.clientConfig.baseUri,{pathParams:a,queryParams:s,origin:this.clientConfig.proxy}),d=ve(ve({},this.clientConfig.headers),null==r?void 0:r.headers),c=new t.Request(u.toString(),ve(ve({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=14,t.fetch(c);case 14:if(l=e.sent,!n){e.next=19;break}return e.abrupt("return",l);case 19:return e.abrupt("return",l.json());case 20:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})}]),e}();me(Oo,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/product/shopper-products/{version}");var Eo=function(){function e(t){he(this,e),me(this,"clientConfig",void 0),this.clientConfig=new pt(ve({baseUri:(this instanceof e?this.constructor:void 0).defaultBaseUri},t))}var r,n;return ge(e,[{key:"getPromotions",value:(n=fe(regeneratorRuntime.mark((function e(r,n){var i,o,a,s,u,d,c,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=(null==r?void 0:r.parameters)||{},o=this.clientConfig.parameters||{},a=ve({version:"v1"},o),void 0!==i.organizationId&&(a.organizationId=i.organizationId),delete(s=ve({siteId:o.siteId},i)).organizationId,void 0===s.siteId&&void 0!==o.siteId&&(s.siteId=o.siteId),u=new zo("/organizations/{organizationId}/promotions",this.clientConfig.baseUri,{pathParams:a,queryParams:s,origin:this.clientConfig.proxy}),d=ve(ve({},this.clientConfig.headers),null==r?void 0:r.headers),c=new t.Request(u.toString(),ve(ve({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=12,t.fetch(c);case 12:if(l=e.sent,!n){e.next=17;break}return e.abrupt("return",l);case 17:return e.abrupt("return",l.json());case 18:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"getPromotionsForCampaign",value:(r=fe(regeneratorRuntime.mark((function e(r,n){var i,o,a,s,u,d,c,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=(null==r?void 0:r.parameters)||{},o=this.clientConfig.parameters||{},a=ve({version:"v1"},o),void 0!==i.organizationId&&(a.organizationId=i.organizationId),void 0!==i.campaignId&&(a.campaignId=i.campaignId),delete(s=ve({siteId:o.siteId},i)).organizationId,delete s.campaignId,void 0===s.siteId&&void 0!==o.siteId&&(s.siteId=o.siteId),u=new zo("/organizations/{organizationId}/promotions/campaigns/{campaignId}",this.clientConfig.baseUri,{pathParams:a,queryParams:s,origin:this.clientConfig.proxy}),d=ve(ve({},this.clientConfig.headers),null==r?void 0:r.headers),c=new t.Request(u.toString(),ve(ve({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=14,t.fetch(c);case 14:if(l=e.sent,!n){e.next=19;break}return e.abrupt("return",l);case 19:return e.abrupt("return",l.json());case 20:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})}]),e}();me(Eo,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/pricing/shopper-promotions/{version}");var Uo=function(){function e(t){he(this,e),me(this,"clientConfig",void 0),this.clientConfig=new pt(ve({baseUri:(this instanceof e?this.constructor:void 0).defaultBaseUri},t))}var r,n;return ge(e,[{key:"productSearch",value:(n=fe(regeneratorRuntime.mark((function e(r,n){var i,o,a,s,u,d,c,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=(null==r?void 0:r.parameters)||{},o=this.clientConfig.parameters||{},a=ve({version:"v1"},o),void 0!==i.organizationId&&(a.organizationId=i.organizationId),delete(s=ve({siteId:o.siteId},i)).organizationId,void 0===s.siteId&&void 0!==o.siteId&&(s.siteId=o.siteId),u=new zo("/organizations/{organizationId}/product-search",this.clientConfig.baseUri,{pathParams:a,queryParams:s,origin:this.clientConfig.proxy}),d=ve(ve({},this.clientConfig.headers),null==r?void 0:r.headers),c=new t.Request(u.toString(),ve(ve({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=12,t.fetch(c);case 12:if(l=e.sent,!n){e.next=17;break}return e.abrupt("return",l);case 17:return e.abrupt("return",l.json());case 18:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"getSearchSuggestions",value:(r=fe(regeneratorRuntime.mark((function e(r,n){var i,o,a,s,u,d,c,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=(null==r?void 0:r.parameters)||{},o=this.clientConfig.parameters||{},a=ve({version:"v1"},o),void 0!==i.organizationId&&(a.organizationId=i.organizationId),delete(s=ve({siteId:o.siteId},i)).organizationId,void 0===s.siteId&&void 0!==o.siteId&&(s.siteId=o.siteId),u=new zo("/organizations/{organizationId}/search-suggestions",this.clientConfig.baseUri,{pathParams:a,queryParams:s,origin:this.clientConfig.proxy}),d=ve(ve({},this.clientConfig.headers),null==r?void 0:r.headers),c=new t.Request(u.toString(),ve(ve({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=12,t.fetch(c);case 12:if(l=e.sent,!n){e.next=17;break}return e.abrupt("return",l);case 17:return e.abrupt("return",l.json());case 18:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})}]),e}();me(Uo,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/search/shopper-search/{version}/"),e.ClientConfig=pt,e.ShopperBaskets=xo,e.ShopperCustomers=Ro,e.ShopperGiftCertificates=Po,e.ShopperLogin=So,e.ShopperOrders=qo,e.ShopperProducts=Oo,e.ShopperPromotions=Eo,e.ShopperSearch=Uo,e.TemplateURL=zo,Object.defineProperty(e,"__esModule",{value:!0})}));
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("cross-fetch"),require("nanoid")):"function"==typeof define&&define.amd?define(["exports","cross-fetch","nanoid"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).CommerceSdk={},e.crossFetch,e.nanoid)}(this,(function(e,t,r){"use strict";var n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function i(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 a,o,s=function(e){return e&&e.Math==Math&&e},c=s("object"==typeof globalThis&&globalThis)||s("object"==typeof window&&window)||s("object"==typeof self&&self)||s("object"==typeof n&&n)||function(){return this}()||Function("return this")(),d=function(e){try{return!!e()}catch(e){return!0}},u=!d((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),f=!d((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),h=Function.prototype.call,p=f?h.bind(h):function(){return h.apply(h,arguments)},l={}.propertyIsEnumerable,g=Object.getOwnPropertyDescriptor,b={f:g&&!l.call({1:2},1)?function(e){var t=g(this,e);return!!t&&t.enumerable}:l},v=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},I=Function.prototype,x=I.bind,m=I.call,k=f&&x.bind(m,m),w=f?function(e){return e&&k(e)}:function(e){return e&&function(){return m.apply(e,arguments)}},y=w({}.toString),C=w("".slice),z=function(e){return C(y(e),8,-1)},E=c.Object,O=w("".split),q=d((function(){return!E("z").propertyIsEnumerable(0)}))?function(e){return"String"==z(e)?O(e,""):E(e)}:E,P=c.TypeError,S=function(e){if(null==e)throw P("Can't call method on "+e);return e},T=function(e){return q(S(e))},R=function(e){return"function"==typeof e},j=function(e){return"object"==typeof e?null!==e:R(e)},M=function(e){return R(e)?e:void 0},U=function(e,t){return arguments.length<2?M(c[e]):c[e]&&c[e][t]},A=w({}.isPrototypeOf),B=U("navigator","userAgent")||"",N=c.process,_=c.Deno,L=N&&N.versions||_&&_.version,D=L&&L.v8;D&&(o=(a=D.split("."))[0]>0&&a[0]<4?1:+(a[0]+a[1])),!o&&B&&(!(a=B.match(/Edge\/(\d+)/))||a[1]>=74)&&(a=B.match(/Chrome\/(\d+)/))&&(o=+a[1]);var J=o,F=!!Object.getOwnPropertySymbols&&!d((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&J&&J<41})),G=F&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,H=c.Object,Y=G?function(e){return"symbol"==typeof e}:function(e){var t=U("Symbol");return R(t)&&A(t.prototype,H(e))},V=c.String,W=function(e){try{return V(e)}catch(e){return"Object"}},$=c.TypeError,K=function(e){if(R(e))return e;throw $(W(e)+" is not a function")},Q=function(e,t){var r=e[t];return null==r?void 0:K(r)},X=c.TypeError,Z=Object.defineProperty,ee=function(e,t){try{Z(c,e,{value:t,configurable:!0,writable:!0})}catch(r){c[e]=t}return t},te=c["__core-js_shared__"]||ee("__core-js_shared__",{}),re=i((function(e){(e.exports=function(e,t){return te[e]||(te[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.20.3",mode:"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.20.3/LICENSE",source:"https://github.com/zloirock/core-js"})})),ne=c.Object,ie=function(e){return ne(S(e))},ae=w({}.hasOwnProperty),oe=Object.hasOwn||function(e,t){return ae(ie(e),t)},se=0,ce=Math.random(),de=w(1..toString),ue=function(e){return"Symbol("+(void 0===e?"":e)+")_"+de(++se+ce,36)},fe=re("wks"),he=c.Symbol,pe=he&&he.for,le=G?he:he&&he.withoutSetter||ue,ge=function(e){if(!oe(fe,e)||!F&&"string"!=typeof fe[e]){var t="Symbol."+e;F&&oe(he,e)?fe[e]=he[e]:fe[e]=G&&pe?pe(t):le(t)}return fe[e]},be=c.TypeError,ve=ge("toPrimitive"),Ie=function(e,t){if(!j(e)||Y(e))return e;var r,n=Q(e,ve);if(n){if(void 0===t&&(t="default"),r=p(n,e,t),!j(r)||Y(r))return r;throw be("Can't convert object to primitive value")}return void 0===t&&(t="number"),function(e,t){var r,n;if("string"===t&&R(r=e.toString)&&!j(n=p(r,e)))return n;if(R(r=e.valueOf)&&!j(n=p(r,e)))return n;if("string"!==t&&R(r=e.toString)&&!j(n=p(r,e)))return n;throw X("Can't convert object to primitive value")}(e,t)},xe=function(e){var t=Ie(e,"string");return Y(t)?t:t+""},me=c.document,ke=j(me)&&j(me.createElement),we=function(e){return ke?me.createElement(e):{}},ye=!u&&!d((function(){return 7!=Object.defineProperty(we("div"),"a",{get:function(){return 7}}).a})),Ce=Object.getOwnPropertyDescriptor,ze={f:u?Ce:function(e,t){if(e=T(e),t=xe(t),ye)try{return Ce(e,t)}catch(e){}if(oe(e,t))return v(!p(b.f,e,t),e[t])}},Ee=u&&d((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),Oe=c.String,qe=c.TypeError,Pe=function(e){if(j(e))return e;throw qe(Oe(e)+" is not an object")},Se=c.TypeError,Te=Object.defineProperty,Re=Object.getOwnPropertyDescriptor,je={f:u?Ee?function(e,t,r){if(Pe(e),t=xe(t),Pe(r),"function"==typeof e&&"prototype"===t&&"value"in r&&"writable"in r&&!r.writable){var n=Re(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 Te(e,t,r)}:Te:function(e,t,r){if(Pe(e),t=xe(t),Pe(r),ye)try{return Te(e,t,r)}catch(e){}if("get"in r||"set"in r)throw Se("Accessors not supported");return"value"in r&&(e[t]=r.value),e}},Me=u?function(e,t,r){return je.f(e,t,v(1,r))}:function(e,t,r){return e[t]=r,e},Ue=w(Function.toString);R(te.inspectSource)||(te.inspectSource=function(e){return Ue(e)});var Ae,Be,Ne,_e=te.inspectSource,Le=c.WeakMap,De=R(Le)&&/native code/.test(_e(Le)),Je=re("keys"),Fe=function(e){return Je[e]||(Je[e]=ue(e))},Ge={},He=c.TypeError,Ye=c.WeakMap;if(De||te.state){var Ve=te.state||(te.state=new Ye),We=w(Ve.get),$e=w(Ve.has),Ke=w(Ve.set);Ae=function(e,t){if($e(Ve,e))throw new He("Object already initialized");return t.facade=e,Ke(Ve,e,t),t},Be=function(e){return We(Ve,e)||{}},Ne=function(e){return $e(Ve,e)}}else{var Qe=Fe("state");Ge[Qe]=!0,Ae=function(e,t){if(oe(e,Qe))throw new He("Object already initialized");return t.facade=e,Me(e,Qe,t),t},Be=function(e){return oe(e,Qe)?e[Qe]:{}},Ne=function(e){return oe(e,Qe)}}var Xe={set:Ae,get:Be,has:Ne,enforce:function(e){return Ne(e)?Be(e):Ae(e,{})},getterFor:function(e){return function(t){var r;if(!j(t)||(r=Be(t)).type!==e)throw He("Incompatible receiver, "+e+" required");return r}}},Ze=Function.prototype,et=u&&Object.getOwnPropertyDescriptor,tt=oe(Ze,"name"),rt={EXISTS:tt,PROPER:tt&&"something"===function(){}.name,CONFIGURABLE:tt&&(!u||u&&et(Ze,"name").configurable)},nt=i((function(e){var t=rt.CONFIGURABLE,r=Xe.get,n=Xe.enforce,i=String(String).split("String");(e.exports=function(e,r,a,o){var s,d=!!o&&!!o.unsafe,u=!!o&&!!o.enumerable,f=!!o&&!!o.noTargetGet,h=o&&void 0!==o.name?o.name:r;R(a)&&("Symbol("===String(h).slice(0,7)&&(h="["+String(h).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!oe(a,"name")||t&&a.name!==h)&&Me(a,"name",h),(s=n(a)).source||(s.source=i.join("string"==typeof h?h:""))),e!==c?(d?!f&&e[r]&&(u=!0):delete e[r],u?e[r]=a:Me(e,r,a)):u?e[r]=a:ee(r,a)})(Function.prototype,"toString",(function(){return R(this)&&r(this).source||_e(this)}))})),it=Math.ceil,at=Math.floor,ot=function(e){var t=+e;return t!=t||0===t?0:(t>0?at:it)(t)},st=Math.max,ct=Math.min,dt=function(e,t){var r=ot(e);return r<0?st(r+t,0):ct(r,t)},ut=Math.min,ft=function(e){return e>0?ut(ot(e),9007199254740991):0},ht=function(e){return ft(e.length)},pt=function(e){return function(t,r,n){var i,a=T(t),o=ht(a),s=dt(n,o);if(e&&r!=r){for(;o>s;)if((i=a[s++])!=i)return!0}else for(;o>s;s++)if((e||s in a)&&a[s]===r)return e||s||0;return!e&&-1}},lt={includes:pt(!0),indexOf:pt(!1)},gt=lt.indexOf,bt=w([].push),vt=function(e,t){var r,n=T(e),i=0,a=[];for(r in n)!oe(Ge,r)&&oe(n,r)&&bt(a,r);for(;t.length>i;)oe(n,r=t[i++])&&(~gt(a,r)||bt(a,r));return a},It=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],xt=It.concat("length","prototype"),mt={f:Object.getOwnPropertyNames||function(e){return vt(e,xt)}},kt={f:Object.getOwnPropertySymbols},wt=w([].concat),yt=U("Reflect","ownKeys")||function(e){var t=mt.f(Pe(e)),r=kt.f;return r?wt(t,r(e)):t},Ct=function(e,t,r){for(var n=yt(t),i=je.f,a=ze.f,o=0;o<n.length;o++){var s=n[o];oe(e,s)||r&&oe(r,s)||i(e,s,a(t,s))}},zt=/#|\.prototype\./,Et=function(e,t){var r=qt[Ot(e)];return r==St||r!=Pt&&(R(t)?d(t):!!t)},Ot=Et.normalize=function(e){return String(e).replace(zt,".").toLowerCase()},qt=Et.data={},Pt=Et.NATIVE="N",St=Et.POLYFILL="P",Tt=Et,Rt=ze.f,jt=function(e,t){var r,n,i,a,o,s=e.target,d=e.global,u=e.stat;if(r=d?c:u?c[s]||ee(s,{}):(c[s]||{}).prototype)for(n in t){if(a=t[n],i=e.noTargetGet?(o=Rt(r,n))&&o.value:r[n],!Tt(d?n:s+(u?".":"#")+n,e.forced)&&void 0!==i){if(typeof a==typeof i)continue;Ct(a,i)}(e.sham||i&&i.sham)&&Me(a,"sham",!0),nt(r,n,a,e)}},Mt=Object.keys||function(e){return vt(e,It)},Ut=d((function(){Mt(1)}));jt({target:"Object",stat:!0,forced:Ut},{keys:function(e){return Mt(ie(e))}});var At=Function.prototype,Bt=At.apply,Nt=At.call,_t="object"==typeof Reflect&&Reflect.apply||(f?Nt.bind(Bt):function(){return Nt.apply(Bt,arguments)}),Lt=Array.isArray||function(e){return"Array"==z(e)},Dt={};Dt[ge("toStringTag")]="z";var Jt,Ft="[object z]"===String(Dt),Gt=ge("toStringTag"),Ht=c.Object,Yt="Arguments"==z(function(){return arguments}()),Vt=Ft?z: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=Ht(e),Gt))?r:Yt?z(t):"Object"==(n=z(t))&&R(t.callee)?"Arguments":n},Wt=c.String,$t=function(e){if("Symbol"===Vt(e))throw TypeError("Cannot convert a Symbol value to a string");return Wt(e)},Kt={f:u&&!Ee?Object.defineProperties:function(e,t){Pe(e);for(var r,n=T(t),i=Mt(t),a=i.length,o=0;a>o;)je.f(e,r=i[o++],n[r]);return e}},Qt=U("document","documentElement"),Xt=Fe("IE_PROTO"),Zt=function(){},er=function(e){return"<script>"+e+"<\/script>"},tr=function(e){e.write(er("")),e.close();var t=e.parentWindow.Object;return e=null,t},rr=function(){try{Jt=new ActiveXObject("htmlfile")}catch(e){}var e,t;rr="undefined"!=typeof document?document.domain&&Jt?tr(Jt):((t=we("iframe")).style.display="none",Qt.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(er("document.F=Object")),e.close(),e.F):tr(Jt);for(var r=It.length;r--;)delete rr.prototype[It[r]];return rr()};Ge[Xt]=!0;var nr=Object.create||function(e,t){var r;return null!==e?(Zt.prototype=Pe(e),r=new Zt,Zt.prototype=null,r[Xt]=e):r=rr(),void 0===t?r:Kt.f(r,t)},ir=function(e,t,r){var n=xe(t);n in e?je.f(e,n,v(0,r)):e[n]=r},ar=c.Array,or=Math.max,sr=function(e,t,r){for(var n=ht(e),i=dt(t,n),a=dt(void 0===r?n:r,n),o=ar(or(a-i,0)),s=0;i<a;i++,s++)ir(o,s,e[i]);return o.length=s,o},cr=mt.f,dr="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],ur={f:function(e){return dr&&"Window"==z(e)?function(e){try{return cr(e)}catch(e){return sr(dr)}}(e):cr(T(e))}},fr=w([].slice),hr={f:ge},pr=c,lr=je.f,gr=je.f,br=ge("toStringTag"),vr=function(e,t,r){e&&!r&&(e=e.prototype),e&&!oe(e,br)&&gr(e,br,{configurable:!0,value:t})},Ir=w(w.bind),xr=function(e,t){return K(e),void 0===t?e:f?Ir(e,t):function(){return e.apply(t,arguments)}},mr=function(){},kr=[],wr=U("Reflect","construct"),yr=/^\s*(?:class|function)\b/,Cr=w(yr.exec),zr=!yr.exec(mr),Er=function(e){if(!R(e))return!1;try{return wr(mr,kr,e),!0}catch(e){return!1}},Or=function(e){if(!R(e))return!1;switch(Vt(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return zr||!!Cr(yr,_e(e))}catch(e){return!0}};Or.sham=!0;var qr=!wr||d((function(){var e;return Er(Er.call)||!Er(Object)||!Er((function(){e=!0}))||e}))?Or:Er,Pr=ge("species"),Sr=c.Array,Tr=function(e,t){return new(function(e){var t;return Lt(e)&&(t=e.constructor,(qr(t)&&(t===Sr||Lt(t.prototype))||j(t)&&null===(t=t[Pr]))&&(t=void 0)),void 0===t?Sr:t}(e))(0===t?0:t)},Rr=w([].push),jr=function(e){var t=1==e,r=2==e,n=3==e,i=4==e,a=6==e,o=7==e,s=5==e||a;return function(c,d,u,f){for(var h,p,l=ie(c),g=q(l),b=xr(d,u),v=ht(g),I=0,x=f||Tr,m=t?x(c,v):r||o?x(c,0):void 0;v>I;I++)if((s||I in g)&&(p=b(h=g[I],I,l),e))if(t)m[I]=p;else if(p)switch(e){case 3:return!0;case 5:return h;case 6:return I;case 2:Rr(m,h)}else switch(e){case 4:return!1;case 7:Rr(m,h)}return a?-1:n||i?i:m}},Mr={forEach:jr(0),map:jr(1),filter:jr(2),some:jr(3),every:jr(4),find:jr(5),findIndex:jr(6),filterReject:jr(7)},Ur=Mr.forEach,Ar=Fe("hidden"),Br=ge("toPrimitive"),Nr=Xe.set,_r=Xe.getterFor("Symbol"),Lr=Object.prototype,Dr=c.Symbol,Jr=Dr&&Dr.prototype,Fr=c.TypeError,Gr=c.QObject,Hr=U("JSON","stringify"),Yr=ze.f,Vr=je.f,Wr=ur.f,$r=b.f,Kr=w([].push),Qr=re("symbols"),Xr=re("op-symbols"),Zr=re("string-to-symbol-registry"),en=re("symbol-to-string-registry"),tn=re("wks"),rn=!Gr||!Gr.prototype||!Gr.prototype.findChild,nn=u&&d((function(){return 7!=nr(Vr({},"a",{get:function(){return Vr(this,"a",{value:7}).a}})).a}))?function(e,t,r){var n=Yr(Lr,t);n&&delete Lr[t],Vr(e,t,r),n&&e!==Lr&&Vr(Lr,t,n)}:Vr,an=function(e,t){var r=Qr[e]=nr(Jr);return Nr(r,{type:"Symbol",tag:e,description:t}),u||(r.description=t),r},on=function(e,t,r){e===Lr&&on(Xr,t,r),Pe(e);var n=xe(t);return Pe(r),oe(Qr,n)?(r.enumerable?(oe(e,Ar)&&e[Ar][n]&&(e[Ar][n]=!1),r=nr(r,{enumerable:v(0,!1)})):(oe(e,Ar)||Vr(e,Ar,v(1,{})),e[Ar][n]=!0),nn(e,n,r)):Vr(e,n,r)},sn=function(e,t){Pe(e);var r=T(t),n=Mt(r).concat(fn(r));return Ur(n,(function(t){u&&!p(cn,r,t)||on(e,t,r[t])})),e},cn=function(e){var t=xe(e),r=p($r,this,t);return!(this===Lr&&oe(Qr,t)&&!oe(Xr,t))&&(!(r||!oe(this,t)||!oe(Qr,t)||oe(this,Ar)&&this[Ar][t])||r)},dn=function(e,t){var r=T(e),n=xe(t);if(r!==Lr||!oe(Qr,n)||oe(Xr,n)){var i=Yr(r,n);return!i||!oe(Qr,n)||oe(r,Ar)&&r[Ar][n]||(i.enumerable=!0),i}},un=function(e){var t=Wr(T(e)),r=[];return Ur(t,(function(e){oe(Qr,e)||oe(Ge,e)||Kr(r,e)})),r},fn=function(e){var t=e===Lr,r=Wr(t?Xr:T(e)),n=[];return Ur(r,(function(e){!oe(Qr,e)||t&&!oe(Lr,e)||Kr(n,Qr[e])})),n};if(F||(Jr=(Dr=function(){if(A(Jr,this))throw Fr("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?$t(arguments[0]):void 0,t=ue(e),r=function(e){this===Lr&&p(r,Xr,e),oe(this,Ar)&&oe(this[Ar],t)&&(this[Ar][t]=!1),nn(this,t,v(1,e))};return u&&rn&&nn(Lr,t,{configurable:!0,set:r}),an(t,e)}).prototype,nt(Jr,"toString",(function(){return _r(this).tag})),nt(Dr,"withoutSetter",(function(e){return an(ue(e),e)})),b.f=cn,je.f=on,Kt.f=sn,ze.f=dn,mt.f=ur.f=un,kt.f=fn,hr.f=function(e){return an(ge(e),e)},u&&(Vr(Jr,"description",{configurable:!0,get:function(){return _r(this).description}}),nt(Lr,"propertyIsEnumerable",cn,{unsafe:!0}))),jt({global:!0,wrap:!0,forced:!F,sham:!F},{Symbol:Dr}),Ur(Mt(tn),(function(e){!function(e){var t=pr.Symbol||(pr.Symbol={});oe(t,e)||lr(t,e,{value:hr.f(e)})}(e)})),jt({target:"Symbol",stat:!0,forced:!F},{for:function(e){var t=$t(e);if(oe(Zr,t))return Zr[t];var r=Dr(t);return Zr[t]=r,en[r]=t,r},keyFor:function(e){if(!Y(e))throw Fr(e+" is not a symbol");if(oe(en,e))return en[e]},useSetter:function(){rn=!0},useSimple:function(){rn=!1}}),jt({target:"Object",stat:!0,forced:!F,sham:!u},{create:function(e,t){return void 0===t?nr(e):sn(nr(e),t)},defineProperty:on,defineProperties:sn,getOwnPropertyDescriptor:dn}),jt({target:"Object",stat:!0,forced:!F},{getOwnPropertyNames:un,getOwnPropertySymbols:fn}),jt({target:"Object",stat:!0,forced:d((function(){kt.f(1)}))},{getOwnPropertySymbols:function(e){return kt.f(ie(e))}}),Hr){var hn=!F||d((function(){var e=Dr();return"[null]"!=Hr([e])||"{}"!=Hr({a:e})||"{}"!=Hr(Object(e))}));jt({target:"JSON",stat:!0,forced:hn},{stringify:function(e,t,r){var n=fr(arguments),i=t;if((j(t)||void 0!==e)&&!Y(e))return Lt(t)||(t=function(e,t){if(R(i)&&(t=p(i,this,e,t)),!Y(t))return t}),n[1]=t,_t(Hr,null,n)}})}if(!Jr[Br]){var pn=Jr.valueOf;nt(Jr,Br,(function(e){return p(pn,this)}))}vr(Dr,"Symbol"),Ge[Ar]=!0;var ln=ge("species"),gn=function(e){return J>=51||!d((function(){var t=[];return(t.constructor={})[ln]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},bn=Mr.filter,vn=gn("filter");jt({target:"Array",proto:!0,forced:!vn},{filter:function(e){return bn(this,e,arguments.length>1?arguments[1]:void 0)}});var In=Ft?{}.toString:function(){return"[object "+Vt(this)+"]"};Ft||nt(Object.prototype,"toString",In,{unsafe:!0});var xn=ze.f,mn=d((function(){xn(1)}));jt({target:"Object",stat:!0,forced:!u||mn,sham:!u},{getOwnPropertyDescriptor:function(e,t){return xn(T(e),t)}});var kn={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},wn=we("span").classList,yn=wn&&wn.constructor&&wn.constructor.prototype,Cn=yn===Object.prototype?void 0:yn,zn=function(e,t){var r=[][e];return!!r&&d((function(){r.call(null,t||function(){throw 1},1)}))},En=Mr.forEach,On=zn("forEach")?[].forEach:function(e){return En(this,e,arguments.length>1?arguments[1]:void 0)},qn=function(e){if(e&&e.forEach!==On)try{Me(e,"forEach",On)}catch(t){e.forEach=On}};for(var Pn in kn)kn[Pn]&&qn(c[Pn]&&c[Pn].prototype);qn(Cn),jt({target:"Object",stat:!0,sham:!u},{getOwnPropertyDescriptors:function(e){for(var t,r,n=T(e),i=ze.f,a=yt(n),o={},s=0;a.length>s;)void 0!==(r=i(n,t=a[s++]))&&ir(o,t,r);return o}});var Sn=Kt.f;jt({target:"Object",stat:!0,forced:Object.defineProperties!==Sn,sham:!u},{defineProperties:Sn});var Tn=je.f;jt({target:"Object",stat:!0,forced:Object.defineProperty!==Tn,sham:!u},{defineProperty:Tn});var Rn=w([].join),jn=q!=Object,Mn=zn("join",",");jt({target:"Array",proto:!0,forced:jn||!Mn},{join:function(e){return Rn(T(this),void 0===e?",":e)}});var Un=function(){var e=Pe(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t},An=rt.PROPER,Bn=RegExp.prototype,Nn=Bn.toString,_n=w(Un),Ln=d((function(){return"/a/b"!=Nn.call({source:"a",flags:"b"})})),Dn=An&&"toString"!=Nn.name;function Jn(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 Fn(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var a=e.apply(t,r);function o(e){Jn(a,n,i,o,s,"next",e)}function s(e){Jn(a,n,i,o,s,"throw",e)}o(void 0)}))}}function Gn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Hn(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 Yn(e,t,r){return t&&Hn(e.prototype,t),r&&Hn(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Vn(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}(Ln||Dn)&&nt(RegExp.prototype,"toString",(function(){var e=Pe(this),t=$t(e.source),r=e.flags;return"/"+t+"/"+$t(void 0===r&&A(Bn,e)&&!("flags"in Bn)?_n(e):r)}),{unsafe:!0});var Wn=Object.prototype,$n=Wn.hasOwnProperty,Kn="function"==typeof Symbol?Symbol:{},Qn=Kn.iterator||"@@iterator",Xn=Kn.asyncIterator||"@@asyncIterator",Zn=Kn.toStringTag||"@@toStringTag";function ei(e,t,r,n){var i=t&&t.prototype instanceof ni?t:ni,a=Object.create(i.prototype),o=new bi(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 Ii()}for(r.method=i,r.arg=a;;){var o=r.delegate;if(o){var s=pi(o,r);if(s){if(s===ri)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=ti(e,t,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===ri)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 ti(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}var ri={};function ni(){}function ii(){}function ai(){}var oi={};oi[Qn]=function(){return this};var si=Object.getPrototypeOf,ci=si&&si(si(vi([])));ci&&ci!==Wn&&$n.call(ci,Qn)&&(oi=ci);var di=ai.prototype=ni.prototype=Object.create(oi);function ui(e){["next","throw","return"].forEach((function(t){e[t]=function(e){return this._invoke(t,e)}}))}function fi(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===ii||"GeneratorFunction"===(t.displayName||t.name))}function hi(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=ti(e[n],e,i);if("throw"!==s.type){var c=s.arg,d=c.value;return d&&"object"==typeof d&&$n.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 pi(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,pi(e,t),"throw"===t.method))return ri;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return ri}var n=ti(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,ri;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,ri):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,ri)}function li(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 gi(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function bi(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(li,this),this.reset(!0)}function vi(e){if(e){var t=e[Qn];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($n.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:Ii}}function Ii(){return{value:void 0,done:!0}}ii.prototype=di.constructor=ai,ai.constructor=ii,ai[Zn]=ii.displayName="GeneratorFunction",ui(hi.prototype),hi.prototype[Xn]=function(){return this},ui(di),di[Zn]="Generator",di[Qn]=function(){return this},di.toString=function(){return"[object Generator]"},bi.prototype={constructor:bi,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(gi),!e)for(var t in this)"t"===t.charAt(0)&&$n.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=$n.call(i,"catchLoc"),s=$n.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&&$n.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,ri):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),ri},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),gi(r),ri}},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;gi(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:vi(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),ri}};var xi={wrap:ei,isGeneratorFunction:fi,AsyncIterator:hi,mark:function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,ai):(e.__proto__=ai,Zn in e||(e[Zn]="GeneratorFunction")),e.prototype=Object.create(di),e},awrap:function(e){return{__await:e}},async:function(e,t,r,n,i){void 0===i&&(i=Promise);var a=new hi(ei(e,t,r,n),i);return fi(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:vi},mi=ge("unscopables"),ki=Array.prototype;null==ki[mi]&&je.f(ki,mi,{configurable:!0,value:nr(null)});var wi,yi,Ci,zi=function(e){ki[mi][e]=!0},Ei={},Oi=!d((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),qi=Fe("IE_PROTO"),Pi=c.Object,Si=Pi.prototype,Ti=Oi?Pi.getPrototypeOf:function(e){var t=ie(e);if(oe(t,qi))return t[qi];var r=t.constructor;return R(r)&&t instanceof r?r.prototype:t instanceof Pi?Si:null},Ri=ge("iterator"),ji=!1;[].keys&&("next"in(Ci=[].keys())?(yi=Ti(Ti(Ci)))!==Object.prototype&&(wi=yi):ji=!0),(null==wi||d((function(){var e={};return wi[Ri].call(e)!==e})))&&(wi={}),R(wi[Ri])||nt(wi,Ri,(function(){return this}));var Mi={IteratorPrototype:wi,BUGGY_SAFARI_ITERATORS:ji},Ui=Mi.IteratorPrototype,Ai=function(){return this},Bi=function(e,t,r,n){var i=t+" Iterator";return e.prototype=nr(Ui,{next:v(+!n,r)}),vr(e,i,!1),Ei[i]=Ai,e},Ni=c.String,_i=c.TypeError,Li=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,r={};try{(e=w(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(r,[]),t=r instanceof Array}catch(e){}return function(r,n){return Pe(r),function(e){if("object"==typeof e||R(e))return e;throw _i("Can't set "+Ni(e)+" as a prototype")}(n),t?e(r,n):r.__proto__=n,r}}():void 0),Di=rt.PROPER,Ji=rt.CONFIGURABLE,Fi=Mi.IteratorPrototype,Gi=Mi.BUGGY_SAFARI_ITERATORS,Hi=ge("iterator"),Yi=function(){return this},Vi=function(e,t,r,n,i,a,o){Bi(r,t,n);var s,c,d,u=function(e){if(e===i&&b)return b;if(!Gi&&e in l)return l[e];switch(e){case"keys":case"values":case"entries":return function(){return new r(this,e)}}return function(){return new r(this)}},f=t+" Iterator",h=!1,l=e.prototype,g=l[Hi]||l["@@iterator"]||i&&l[i],b=!Gi&&g||u(i),v="Array"==t&&l.entries||g;if(v&&(s=Ti(v.call(new e)))!==Object.prototype&&s.next&&(Ti(s)!==Fi&&(Li?Li(s,Fi):R(s[Hi])||nt(s,Hi,Yi)),vr(s,f,!0)),Di&&"values"==i&&g&&"values"!==g.name&&(Ji?Me(l,"name","values"):(h=!0,b=function(){return p(g,this)})),i)if(c={values:u("values"),keys:a?b:u("keys"),entries:u("entries")},o)for(d in c)(Gi||h||!(d in l))&&nt(l,d,c[d]);else jt({target:t,proto:!0,forced:Gi||h},c);return l[Hi]!==b&&nt(l,Hi,b,{name:i}),Ei[t]=b,c},Wi=je.f,$i=Xe.set,Ki=Xe.getterFor("Array Iterator"),Qi=Vi(Array,"Array",(function(e,t){$i(this,{type:"Array Iterator",target:T(e),index:0,kind:t})}),(function(){var e=Ki(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"),Xi=Ei.Arguments=Ei.Array;if(zi("keys"),zi("values"),zi("entries"),u&&"values"!==Xi.name)try{Wi(Xi,"name",{value:"values"})}catch(e){}var Zi=w("".charAt),ea=w("".charCodeAt),ta=w("".slice),ra=function(e){return function(t,r){var n,i,a=$t(S(t)),o=ot(r),s=a.length;return o<0||o>=s?e?"":void 0:(n=ea(a,o))<55296||n>56319||o+1===s||(i=ea(a,o+1))<56320||i>57343?e?Zi(a,o):n:e?ta(a,o,o+2):i-56320+(n-55296<<10)+65536}},na={codeAt:ra(!1),charAt:ra(!0)},ia=na.charAt,aa=Xe.set,oa=Xe.getterFor("String Iterator");Vi(String,"String",(function(e){aa(this,{type:"String Iterator",string:$t(e),index:0})}),(function(){var e,t=oa(this),r=t.string,n=t.index;return n>=r.length?{value:void 0,done:!0}:(e=ia(r,n),t.index+=e.length,{value:e,done:!1})}));var sa=ge("iterator"),ca=ge("toStringTag"),da=Qi.values,ua=function(e,t){if(e){if(e[sa]!==da)try{Me(e,sa,da)}catch(t){e[sa]=da}if(e[ca]||Me(e,ca,t),kn[t])for(var r in Qi)if(e[r]!==Qi[r])try{Me(e,r,Qi[r])}catch(t){e[r]=Qi[r]}}};for(var fa in kn)ua(c[fa]&&c[fa].prototype,fa);ua(Cn,"DOMTokenList");var ha=ge("iterator"),pa=!d((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[ha]||"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})),la=function(e,t,r){for(var n in t)nt(e,n,t[n],r);return e},ga=c.TypeError,ba=function(e,t){if(A(t,e))return e;throw ga("Incorrect invocation")},va=ge("iterator"),Ia=function(e){if(null!=e)return Q(e,va)||Q(e,"@@iterator")||Ei[Vt(e)]},xa=c.TypeError,ma=function(e,t){var r=arguments.length<2?Ia(e):t;if(K(r))return Pe(p(r,e));throw xa(W(e)+" is not iterable")},ka=c.TypeError,wa=function(e,t){if(e<t)throw ka("Not enough arguments");return e},ya=Math.floor,Ca=function(e,t){var r=e.length,n=ya(r/2);return r<8?za(e,t):Ea(e,Ca(sr(e,0,n),t),Ca(sr(e,n),t),t)},za=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},Ea=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},Oa=Ca,qa=ge("iterator"),Pa=Xe.set,Sa=Xe.getterFor("URLSearchParams"),Ta=Xe.getterFor("URLSearchParamsIterator"),Ra=U("fetch"),ja=U("Request"),Ma=U("Headers"),Ua=ja&&ja.prototype,Aa=Ma&&Ma.prototype,Ba=c.RegExp,Na=c.TypeError,_a=c.decodeURIComponent,La=c.encodeURIComponent,Da=w("".charAt),Ja=w([].join),Fa=w([].push),Ga=w("".replace),Ha=w([].shift),Ya=w([].splice),Va=w("".split),Wa=w("".slice),$a=/\+/g,Ka=Array(4),Qa=function(e){return Ka[e-1]||(Ka[e-1]=Ba("((?:%[\\da-f]{2}){"+e+"})","gi"))},Xa=function(e){try{return _a(e)}catch(t){return e}},Za=function(e){var t=Ga(e,$a," "),r=4;try{return _a(t)}catch(e){for(;r;)t=Ga(t,Qa(r--),Xa);return t}},eo=/[!'()~]|%20/g,to={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},ro=function(e){return to[e]},no=function(e){return Ga(La(e),eo,ro)},io=Bi((function(e,t){Pa(this,{type:"URLSearchParamsIterator",iterator:ma(Sa(e).entries),kind:t})}),"Iterator",(function(){var e=Ta(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),ao=function(e){this.entries=[],this.url=null,void 0!==e&&(j(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===Da(e,0)?Wa(e,1):e:$t(e)))};ao.prototype={type:"URLSearchParams",bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,r,n,i,a,o,s,c=Ia(e);if(c)for(r=(t=ma(e,c)).next;!(n=p(r,t)).done;){if(a=(i=ma(Pe(n.value))).next,(o=p(a,i)).done||(s=p(a,i)).done||!p(a,i).done)throw Na("Expected sequence with length 2");Fa(this.entries,{key:$t(o.value),value:$t(s.value)})}else for(var d in e)oe(e,d)&&Fa(this.entries,{key:d,value:$t(e[d])})},parseQuery:function(e){if(e)for(var t,r,n=Va(e,"&"),i=0;i<n.length;)(t=n[i++]).length&&(r=Va(t,"="),Fa(this.entries,{key:Za(Ha(r)),value:Za(Ja(r,"="))}))},serialize:function(){for(var e,t=this.entries,r=[],n=0;n<t.length;)e=t[n++],Fa(r,no(e.key)+"="+no(e.value));return Ja(r,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var oo=function(){ba(this,so);var e=arguments.length>0?arguments[0]:void 0;Pa(this,new ao(e))},so=oo.prototype;if(la(so,{append:function(e,t){wa(arguments.length,2);var r=Sa(this);Fa(r.entries,{key:$t(e),value:$t(t)}),r.updateURL()},delete:function(e){wa(arguments.length,1);for(var t=Sa(this),r=t.entries,n=$t(e),i=0;i<r.length;)r[i].key===n?Ya(r,i,1):i++;t.updateURL()},get:function(e){wa(arguments.length,1);for(var t=Sa(this).entries,r=$t(e),n=0;n<t.length;n++)if(t[n].key===r)return t[n].value;return null},getAll:function(e){wa(arguments.length,1);for(var t=Sa(this).entries,r=$t(e),n=[],i=0;i<t.length;i++)t[i].key===r&&Fa(n,t[i].value);return n},has:function(e){wa(arguments.length,1);for(var t=Sa(this).entries,r=$t(e),n=0;n<t.length;)if(t[n++].key===r)return!0;return!1},set:function(e,t){wa(arguments.length,1);for(var r,n=Sa(this),i=n.entries,a=!1,o=$t(e),s=$t(t),c=0;c<i.length;c++)(r=i[c]).key===o&&(a?Ya(i,c--,1):(a=!0,r.value=s));a||Fa(i,{key:o,value:s}),n.updateURL()},sort:function(){var e=Sa(this);Oa(e.entries,(function(e,t){return e.key>t.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,r=Sa(this).entries,n=xr(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 io(this,"keys")},values:function(){return new io(this,"values")},entries:function(){return new io(this,"entries")}},{enumerable:!0}),nt(so,qa,so.entries,{name:"entries"}),nt(so,"toString",(function(){return Sa(this).serialize()}),{enumerable:!0}),vr(oo,"URLSearchParams"),jt({global:!0,forced:!pa},{URLSearchParams:oo}),!pa&&R(Ma)){var co=w(Aa.has),uo=w(Aa.set),fo=function(e){if(j(e)){var t,r=e.body;if("URLSearchParams"===Vt(r))return t=e.headers?new Ma(e.headers):new Ma,co(t,"content-type")||uo(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),nr(e,{body:v(0,$t(r)),headers:v(0,t)})}return e};if(R(Ra)&&jt({global:!0,enumerable:!0,forced:!0},{fetch:function(e){return Ra(e,arguments.length>1?fo(arguments[1]):{})}}),R(ja)){var ho=function(e){return ba(this,Ua),new ja(e,arguments.length>1?fo(arguments[1]):{})};Ua.constructor=ho,ho.prototype=Ua,jt({global:!0,forced:!0},{Request:ho})}}var po={URLSearchParams:oo,getState:Sa};function lo(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 go(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?lo(Object(r),!0).forEach((function(t){Vn(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):lo(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var bo=Yn((function e(t){if(Gn(this,e),Vn(this,"baseUri",void 0),Vn(this,"proxy",void 0),Vn(this,"headers",void 0),Vn(this,"parameters",void 0),Vn(this,"fetchOptions",void 0),Vn(this,"transformRequest",void 0),Vn(this,"throwOnBadResponse",void 0),this.headers=go({},t.headers),this.parameters=go({},t.parameters),!this.parameters.shortCode)throw new Error("Missing required parameter: shortCode");this.fetchOptions=go({},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}));Vn(bo,"defaults",{transformRequest:function(e,t){switch(t["Content-Type"]){case"application/json":return JSON.stringify(e);case"application/x-www-form-urlencoded":return new URLSearchParams(e);default:return e}}});var vo=c.Function,Io=w([].concat),xo=w([].join),mo={},ko=function(e,t,r){if(!oe(mo,t)){for(var n=[],i=0;i<t;i++)n[i]="a["+i+"]";mo[t]=vo("C,a","return new C("+xo(n,",")+")")}return mo[t](e,r)},wo=f?vo.bind:function(e){var t=K(this),r=t.prototype,n=fr(arguments,1),i=function(){var r=Io(n,fr(arguments));return this instanceof i?ko(t,r.length,r):t.apply(e,r)};return j(r)&&(i.prototype=r),i},yo=c.TypeError,Co=function(e){if(qr(e))return e;throw yo(W(e)+" is not a constructor")},zo=U("Reflect","construct"),Eo=Object.prototype,Oo=[].push,qo=d((function(){function e(){}return!(zo((function(){}),[],e)instanceof e)})),Po=!d((function(){zo((function(){}))})),So=qo||Po;jt({target:"Reflect",stat:!0,forced:So,sham:So},{construct:function(e,t){Co(e),Pe(t);var r=arguments.length<3?e:Co(arguments[2]);if(Po&&!qo)return zo(e,t,r);if(e==r){switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3])}var n=[null];return _t(Oo,n,t),new(_t(wo,e,n))}var i=r.prototype,a=nr(j(i)?i:Eo),o=_t(e,a,t);return j(o)?o:a}});var To,Ro,jo=c.RegExp,Mo=d((function(){var e=jo("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),Uo=Mo||d((function(){return!jo("a","y").sticky})),Ao={BROKEN_CARET:Mo||d((function(){var e=jo("^r","gy");return e.lastIndex=2,null!=e.exec("str")})),MISSED_STICKY:Uo,UNSUPPORTED_Y:Mo},Bo=c.RegExp,No=d((function(){var e=Bo(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)})),_o=c.RegExp,Lo=d((function(){var e=_o("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")})),Do=Xe.get,Jo=re("native-string-replace",String.prototype.replace),Fo=RegExp.prototype.exec,Go=Fo,Ho=w("".charAt),Yo=w("".indexOf),Vo=w("".replace),Wo=w("".slice),$o=(Ro=/b*/g,p(Fo,To=/a/,"a"),p(Fo,Ro,"a"),0!==To.lastIndex||0!==Ro.lastIndex),Ko=Ao.BROKEN_CARET,Qo=void 0!==/()??/.exec("")[1];($o||Qo||Ko||No||Lo)&&(Go=function(e){var t,r,n,i,a,o,s,c=this,d=Do(c),u=$t(e),f=d.raw;if(f)return f.lastIndex=c.lastIndex,t=p(Go,f,u),c.lastIndex=f.lastIndex,t;var h=d.groups,l=Ko&&c.sticky,g=p(Un,c),b=c.source,v=0,I=u;if(l&&(g=Vo(g,"y",""),-1===Yo(g,"g")&&(g+="g"),I=Wo(u,c.lastIndex),c.lastIndex>0&&(!c.multiline||c.multiline&&"\n"!==Ho(u,c.lastIndex-1))&&(b="(?: "+b+")",I=" "+I,v++),r=new RegExp("^(?:"+b+")",g)),Qo&&(r=new RegExp("^"+b+"$(?!\\s)",g)),$o&&(n=c.lastIndex),i=p(Fo,l?r:c,I),l?i?(i.input=Wo(i.input,v),i[0]=Wo(i[0],v),i.index=c.lastIndex,c.lastIndex+=i[0].length):c.lastIndex=0:$o&&i&&(c.lastIndex=c.global?i.index+i[0].length:n),Qo&&i&&i.length>1&&p(Jo,i[0],r,(function(){for(a=1;a<arguments.length-2;a++)void 0===arguments[a]&&(i[a]=void 0)})),i&&h)for(i.groups=o=nr(null),a=0;a<h.length;a++)o[(s=h[a])[0]]=i[s[1]];return i});var Xo=Go;jt({target:"RegExp",proto:!0,forced:/./.exec!==Xo},{exec:Xo});var Zo=ge("species"),es=RegExp.prototype,ts=function(e,t,r,n){var i=ge(e),a=!d((function(){var t={};return t[i]=function(){return 7},7!=""[e](t)})),o=a&&!d((function(){var t=!1,r=/a/;return"split"===e&&((r={}).constructor={},r.constructor[Zo]=function(){return r},r.flags="",r[i]=/./[i]),r.exec=function(){return t=!0,null},r[i](""),!t}));if(!a||!o||r){var s=w(/./[i]),c=t(i,""[e],(function(e,t,r,n,i){var o=w(e),c=t.exec;return c===Xo||c===es.exec?a&&!i?{done:!0,value:s(t,r,n)}:{done:!0,value:o(r,t,n)}:{done:!1}}));nt(String.prototype,e,c[0]),nt(es,i,c[1])}n&&Me(es[i],"sham",!0)},rs=na.charAt,ns=function(e,t,r){return t+(r?rs(e,t).length:1)},is=Math.floor,as=w("".charAt),os=w("".replace),ss=w("".slice),cs=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,ds=/\$([$&'`]|\d{1,2})/g,us=function(e,t,r,n,i,a){var o=r+e.length,s=n.length,c=ds;return void 0!==i&&(i=ie(i),c=cs),os(a,c,(function(a,c){var d;switch(as(c,0)){case"$":return"$";case"&":return e;case"`":return ss(t,0,r);case"'":return ss(t,o);case"<":d=i[ss(c,1,-1)];break;default:var u=+c;if(0===u)return a;if(u>s){var f=is(u/10);return 0===f?a:f<=s?void 0===n[f-1]?as(c,1):n[f-1]+as(c,1):a}d=n[u-1]}return void 0===d?"":d}))},fs=c.TypeError,hs=function(e,t){var r=e.exec;if(R(r)){var n=p(r,e,t);return null!==n&&Pe(n),n}if("RegExp"===z(e))return p(Xo,e,t);throw fs("RegExp#exec called on incompatible receiver")},ps=ge("replace"),ls=Math.max,gs=Math.min,bs=w([].concat),vs=w([].push),Is=w("".indexOf),xs=w("".slice),ms="$0"==="a".replace(/./,"$0"),ks=!!/./[ps]&&""===/./[ps]("a","$0");ts("replace",(function(e,t,r){var n=ks?"$":"$0";return[function(e,r){var n=S(this),i=null==e?void 0:Q(e,ps);return i?p(i,e,n,r):p(t,$t(n),e,r)},function(e,i){var a=Pe(this),o=$t(e);if("string"==typeof i&&-1===Is(i,n)&&-1===Is(i,"$<")){var s=r(t,a,o,i);if(s.done)return s.value}var c=R(i);c||(i=$t(i));var d=a.global;if(d){var u=a.unicode;a.lastIndex=0}for(var f=[];;){var h=hs(a,o);if(null===h)break;if(vs(f,h),!d)break;""===$t(h[0])&&(a.lastIndex=ns(o,ft(a.lastIndex),u))}for(var p,l="",g=0,b=0;b<f.length;b++){for(var v=$t((h=f[b])[0]),I=ls(gs(ot(h.index),o.length),0),x=[],m=1;m<h.length;m++)vs(x,void 0===(p=h[m])?p:String(p));var k=h.groups;if(c){var w=bs([v],x,I,o);void 0!==k&&vs(w,k);var y=$t(_t(i,void 0,w))}else y=us(v,o,I,x,k,i);I>=g&&(l+=xs(o,g,I)+y,g=I+v.length)}return l+xs(o,g)}]}),!!d((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}))||!ms||ks);var ws=ge("isConcatSpreadable"),ys=c.TypeError,Cs=J>=51||!d((function(){var e=[];return e[ws]=!1,e.concat()[0]!==e})),zs=gn("concat"),Es=function(e){if(!j(e))return!1;var t=e[ws];return void 0!==t?!!t:Lt(e)};jt({target:"Array",proto:!0,forced:!Cs||!zs},{concat:function(e){var t,r,n,i,a,o=ie(this),s=Tr(o,0),c=0;for(t=-1,n=arguments.length;t<n;t++)if(Es(a=-1===t?o:arguments[t])){if(c+(i=ht(a))>9007199254740991)throw ys("Maximum allowed index exceeded");for(r=0;r<i;r++,c++)r in a&&ir(s,c,a[r])}else{if(c>=9007199254740991)throw ys("Maximum allowed index exceeded");ir(s,c++,a)}return s.length=c,s}});var Os,qs=Object.assign,Ps=Object.defineProperty,Ss=w([].concat),Ts=!qs||d((function(){if(u&&1!==qs({b:1},qs(Ps({},"a",{enumerable:!0,get:function(){Ps(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!=qs({},e)[r]||"abcdefghijklmnopqrst"!=Mt(qs({},t)).join("")}))?function(e,t){for(var r=ie(e),n=arguments.length,i=1,a=kt.f,o=b.f;n>i;)for(var s,c=q(arguments[i++]),d=a?Ss(Mt(c),a(c)):Mt(c),f=d.length,h=0;f>h;)s=d[h++],u&&!p(o,c,s)||(r[s]=c[s]);return r}:qs,Rs=function(e,t,r){var n,i;Pe(e);try{if(!(n=Q(e,"return"))){if("throw"===t)throw r;return r}n=p(n,e)}catch(e){i=!0,n=e}if("throw"===t)throw r;if(i)throw n;return Pe(n),r},js=function(e,t,r,n){try{return n?t(Pe(r)[0],r[1]):t(r)}catch(t){Rs(e,"throw",t)}},Ms=ge("iterator"),Us=Array.prototype,As=function(e){return void 0!==e&&(Ei.Array===e||Us[Ms]===e)},Bs=c.Array,Ns=function(e){var t=ie(e),r=qr(this),n=arguments.length,i=n>1?arguments[1]:void 0,a=void 0!==i;a&&(i=xr(i,n>2?arguments[2]:void 0));var o,s,c,d,u,f,h=Ia(t),l=0;if(!h||this==Bs&&As(h))for(o=ht(t),s=r?new this(o):Bs(o);o>l;l++)f=a?i(t[l],l):t[l],ir(s,l,f);else for(u=(d=ma(t,h)).next,s=r?new this:[];!(c=p(u,d)).done;l++)f=a?js(d,i,[c.value,l],!0):c.value,ir(s,l,f);return s.length=l,s},_s=/[^\0-\u007E]/,Ls=/[.\u3002\uFF0E\uFF61]/g,Ds="Overflow: input needs wider integers to process",Js=c.RangeError,Fs=w(Ls.exec),Gs=Math.floor,Hs=String.fromCharCode,Ys=w("".charCodeAt),Vs=w([].join),Ws=w([].push),$s=w("".replace),Ks=w("".split),Qs=w("".toLowerCase),Xs=function(e){return e+22+75*(e<26)},Zs=function(e,t,r){var n=0;for(e=r?Gs(e/700):e>>1,e+=Gs(e/t);e>455;)e=Gs(e/35),n+=36;return Gs(n+36*e/(e+38))},ec=function(e){var t,r,n=[],i=(e=function(e){for(var t=[],r=0,n=e.length;r<n;){var i=Ys(e,r++);if(i>=55296&&i<=56319&&r<n){var a=Ys(e,r++);56320==(64512&a)?Ws(t,((1023&i)<<10)+(1023&a)+65536):(Ws(t,i),r--)}else Ws(t,i)}return t}(e)).length,a=128,o=0,s=72;for(t=0;t<e.length;t++)(r=e[t])<128&&Ws(n,Hs(r));var c=n.length,d=c;for(c&&Ws(n,"-");d<i;){var u=2147483647;for(t=0;t<e.length;t++)(r=e[t])>=a&&r<u&&(u=r);var f=d+1;if(u-a>Gs((2147483647-o)/f))throw Js(Ds);for(o+=(u-a)*f,a=u,t=0;t<e.length;t++){if((r=e[t])<a&&++o>2147483647)throw Js(Ds);if(r==a){for(var h=o,p=36;;){var l=p<=s?1:p>=s+26?26:p-s;if(h<l)break;var g=h-l,b=36-l;Ws(n,Hs(Xs(l+g%b))),h=Gs(g/b),p+=36}Ws(n,Hs(Xs(h))),s=Zs(o,f,d==c),o=0,d++}}o++,a++}return Vs(n,"")},tc=Kt.f,rc=na.codeAt,nc=Xe.set,ic=Xe.getterFor("URL"),ac=po.URLSearchParams,oc=po.getState,sc=c.URL,cc=c.TypeError,dc=c.parseInt,uc=Math.floor,fc=Math.pow,hc=w("".charAt),pc=w(/./.exec),lc=w([].join),gc=w(1..toString),bc=w([].pop),vc=w([].push),Ic=w("".replace),xc=w([].shift),mc=w("".split),kc=w("".slice),wc=w("".toLowerCase),yc=w([].unshift),Cc=/[a-z]/i,zc=/[\d+-.a-z]/i,Ec=/\d/,Oc=/^0x/i,qc=/^[0-7]+$/,Pc=/^\d+$/,Sc=/^[\da-f]+$/i,Tc=/[\0\t\n\r #%/:<>?@[\\\]^|]/,Rc=/[\0\t\n\r #/:<>?@[\\\]^|]/,jc=/^[\u0000-\u0020]+|[\u0000-\u0020]+$/g,Mc=/[\t\n\r]/g,Uc=function(e){var t,r,n,i;if("number"==typeof e){for(t=[],r=0;r<4;r++)yc(t,e%256),e=uc(e/256);return lc(t,".")}if("object"==typeof e){for(t="",n=function(e){for(var t=null,r=1,n=null,i=0,a=0;a<8;a++)0!==e[a]?(i>r&&(t=n,r=i),n=null,i=0):(null===n&&(n=a),++i);return i>r&&(t=n,r=i),t}(e),r=0;r<8;r++)i&&0===e[r]||(i&&(i=!1),n===r?(t+=r?":":"::",i=!0):(t+=gc(e[r],16),r<7&&(t+=":")));return"["+t+"]"}return e},Ac={},Bc=Ts({},Ac,{" ":1,'"':1,"<":1,">":1,"`":1}),Nc=Ts({},Bc,{"#":1,"?":1,"{":1,"}":1}),_c=Ts({},Nc,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),Lc=function(e,t){var r=rc(e,0);return r>32&&r<127&&!oe(t,e)?e:encodeURIComponent(e)},Dc={ftp:21,file:null,http:80,https:443,ws:80,wss:443},Jc=function(e,t){var r;return 2==e.length&&pc(Cc,hc(e,0))&&(":"==(r=hc(e,1))||!t&&"|"==r)},Fc=function(e){var t;return e.length>1&&Jc(kc(e,0,2))&&(2==e.length||"/"===(t=hc(e,2))||"\\"===t||"?"===t||"#"===t)},Gc=function(e){return"."===e||"%2e"===wc(e)},Hc={},Yc={},Vc={},Wc={},$c={},Kc={},Qc={},Xc={},Zc={},ed={},td={},rd={},nd={},id={},ad={},od={},sd={},cd={},dd={},ud={},fd={},hd=function(e,t,r){var n,i,a,o=$t(e);if(t){if(i=this.parse(o))throw cc(i);this.searchParams=null}else{if(void 0!==r&&(n=new hd(r,!0)),i=this.parse(o,null,n))throw cc(i);(a=oc(new ac)).bindURL(this),this.searchParams=a}};hd.prototype={type:"URL",parse:function(e,t,r){var n,i,a,o,s,c=this,d=t||Hc,u=0,f="",h=!1,p=!1,l=!1;for(e=$t(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=Ic(e,jc,"")),e=Ic(e,Mc,""),n=Ns(e);u<=n.length;){switch(i=n[u],d){case Hc:if(!i||!pc(Cc,i)){if(t)return"Invalid scheme";d=Vc;continue}f+=wc(i),d=Yc;break;case Yc:if(i&&(pc(zc,i)||"+"==i||"-"==i||"."==i))f+=wc(i);else{if(":"!=i){if(t)return"Invalid scheme";f="",d=Vc,u=0;continue}if(t&&(c.isSpecial()!=oe(Dc,f)||"file"==f&&(c.includesCredentials()||null!==c.port)||"file"==c.scheme&&!c.host))return;if(c.scheme=f,t)return void(c.isSpecial()&&Dc[c.scheme]==c.port&&(c.port=null));f="","file"==c.scheme?d=id:c.isSpecial()&&r&&r.scheme==c.scheme?d=Wc:c.isSpecial()?d=Xc:"/"==n[u+1]?(d=$c,u++):(c.cannotBeABaseURL=!0,vc(c.path,""),d=dd)}break;case Vc:if(!r||r.cannotBeABaseURL&&"#"!=i)return"Invalid scheme";if(r.cannotBeABaseURL&&"#"==i){c.scheme=r.scheme,c.path=sr(r.path),c.query=r.query,c.fragment="",c.cannotBeABaseURL=!0,d=fd;break}d="file"==r.scheme?id:Kc;continue;case Wc:if("/"!=i||"/"!=n[u+1]){d=Kc;continue}d=Zc,u++;break;case $c:if("/"==i){d=ed;break}d=cd;continue;case Kc:if(c.scheme=r.scheme,i==Os)c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=sr(r.path),c.query=r.query;else if("/"==i||"\\"==i&&c.isSpecial())d=Qc;else if("?"==i)c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=sr(r.path),c.query="",d=ud;else{if("#"!=i){c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=sr(r.path),c.path.length--,d=cd;continue}c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=sr(r.path),c.query=r.query,c.fragment="",d=fd}break;case Qc:if(!c.isSpecial()||"/"!=i&&"\\"!=i){if("/"!=i){c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,d=cd;continue}d=ed}else d=Zc;break;case Xc:if(d=Zc,"/"!=i||"/"!=hc(f,u+1))continue;u++;break;case Zc:if("/"!=i&&"\\"!=i){d=ed;continue}break;case ed:if("@"==i){h&&(f="%40"+f),h=!0,a=Ns(f);for(var g=0;g<a.length;g++){var b=a[g];if(":"!=b||l){var v=Lc(b,_c);l?c.password+=v:c.username+=v}else l=!0}f=""}else if(i==Os||"/"==i||"?"==i||"#"==i||"\\"==i&&c.isSpecial()){if(h&&""==f)return"Invalid authority";u-=Ns(f).length+1,f="",d=td}else f+=i;break;case td:case rd:if(t&&"file"==c.scheme){d=od;continue}if(":"!=i||p){if(i==Os||"/"==i||"?"==i||"#"==i||"\\"==i&&c.isSpecial()){if(c.isSpecial()&&""==f)return"Invalid host";if(t&&""==f&&(c.includesCredentials()||null!==c.port))return;if(o=c.parseHost(f))return o;if(f="",d=sd,t)return;continue}"["==i?p=!0:"]"==i&&(p=!1),f+=i}else{if(""==f)return"Invalid host";if(o=c.parseHost(f))return o;if(f="",d=nd,t==rd)return}break;case nd:if(!pc(Ec,i)){if(i==Os||"/"==i||"?"==i||"#"==i||"\\"==i&&c.isSpecial()||t){if(""!=f){var I=dc(f,10);if(I>65535)return"Invalid port";c.port=c.isSpecial()&&I===Dc[c.scheme]?null:I,f=""}if(t)return;d=sd;continue}return"Invalid port"}f+=i;break;case id:if(c.scheme="file","/"==i||"\\"==i)d=ad;else{if(!r||"file"!=r.scheme){d=cd;continue}if(i==Os)c.host=r.host,c.path=sr(r.path),c.query=r.query;else if("?"==i)c.host=r.host,c.path=sr(r.path),c.query="",d=ud;else{if("#"!=i){Fc(lc(sr(n,u),""))||(c.host=r.host,c.path=sr(r.path),c.shortenPath()),d=cd;continue}c.host=r.host,c.path=sr(r.path),c.query=r.query,c.fragment="",d=fd}}break;case ad:if("/"==i||"\\"==i){d=od;break}r&&"file"==r.scheme&&!Fc(lc(sr(n,u),""))&&(Jc(r.path[0],!0)?vc(c.path,r.path[0]):c.host=r.host),d=cd;continue;case od:if(i==Os||"/"==i||"\\"==i||"?"==i||"#"==i){if(!t&&Jc(f))d=cd;else if(""==f){if(c.host="",t)return;d=sd}else{if(o=c.parseHost(f))return o;if("localhost"==c.host&&(c.host=""),t)return;f="",d=sd}continue}f+=i;break;case sd:if(c.isSpecial()){if(d=cd,"/"!=i&&"\\"!=i)continue}else if(t||"?"!=i)if(t||"#"!=i){if(i!=Os&&(d=cd,"/"!=i))continue}else c.fragment="",d=fd;else c.query="",d=ud;break;case cd:if(i==Os||"/"==i||"\\"==i&&c.isSpecial()||!t&&("?"==i||"#"==i)){if(".."===(s=wc(s=f))||"%2e."===s||".%2e"===s||"%2e%2e"===s?(c.shortenPath(),"/"==i||"\\"==i&&c.isSpecial()||vc(c.path,"")):Gc(f)?"/"==i||"\\"==i&&c.isSpecial()||vc(c.path,""):("file"==c.scheme&&!c.path.length&&Jc(f)&&(c.host&&(c.host=""),f=hc(f,0)+":"),vc(c.path,f)),f="","file"==c.scheme&&(i==Os||"?"==i||"#"==i))for(;c.path.length>1&&""===c.path[0];)xc(c.path);"?"==i?(c.query="",d=ud):"#"==i&&(c.fragment="",d=fd)}else f+=Lc(i,Nc);break;case dd:"?"==i?(c.query="",d=ud):"#"==i?(c.fragment="",d=fd):i!=Os&&(c.path[0]+=Lc(i,Ac));break;case ud:t||"#"!=i?i!=Os&&("'"==i&&c.isSpecial()?c.query+="%27":c.query+="#"==i?"%23":Lc(i,Ac)):(c.fragment="",d=fd);break;case fd:i!=Os&&(c.fragment+=Lc(i,Bc))}u++}},parseHost:function(e){var t,r,n;if("["==hc(e,0)){if("]"!=hc(e,e.length-1))return"Invalid host";if(!(t=function(e){var t,r,n,i,a,o,s,c=[0,0,0,0,0,0,0,0],d=0,u=null,f=0,h=function(){return hc(e,f)};if(":"==h()){if(":"!=hc(e,1))return;f+=2,u=++d}for(;h();){if(8==d)return;if(":"!=h()){for(t=r=0;r<4&&pc(Sc,h());)t=16*t+dc(h(),16),f++,r++;if("."==h()){if(0==r)return;if(f-=r,d>6)return;for(n=0;h();){if(i=null,n>0){if(!("."==h()&&n<4))return;f++}if(!pc(Ec,h()))return;for(;pc(Ec,h());){if(a=dc(h(),10),null===i)i=a;else{if(0==i)return;i=10*i+a}if(i>255)return;f++}c[d]=256*c[d]+i,2!=++n&&4!=n||d++}if(4!=n)return;break}if(":"==h()){if(f++,!h())return}else if(h())return;c[d++]=t}else{if(null!==u)return;f++,u=++d}}if(null!==u)for(o=d-u,d=7;0!=d&&o>0;)s=c[d],c[d--]=c[u+o-1],c[u+--o]=s;else if(8!=d)return;return c}(kc(e,1,-1))))return"Invalid host";this.host=t}else if(this.isSpecial()){if(e=function(e){var t,r,n=[],i=Ks($s(Qs(e),Ls,"."),".");for(t=0;t<i.length;t++)r=i[t],Ws(n,Fs(_s,r)?"xn--"+ec(r):r);return Vs(n,".")}(e),pc(Tc,e))return"Invalid host";if(null===(t=function(e){var t,r,n,i,a,o,s,c=mc(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"==hc(i,0)&&(a=pc(Oc,i)?16:8,i=kc(i,8==a?1:2)),""===i)o=0;else{if(!pc(10==a?Pc:8==a?qc:Sc,i))return e;o=dc(i,a)}vc(r,o)}for(n=0;n<t;n++)if(o=r[n],n==t-1){if(o>=fc(256,5-t))return null}else if(o>255)return null;for(s=bc(r),n=0;n<r.length;n++)s+=r[n]*fc(256,3-n);return s}(e)))return"Invalid host";this.host=t}else{if(pc(Rc,e))return"Invalid host";for(t="",r=Ns(e),n=0;n<r.length;n++)t+=Lc(r[n],Ac);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"==this.scheme},includesCredentials:function(){return""!=this.username||""!=this.password},isSpecial:function(){return oe(Dc,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"==this.scheme&&1==t&&Jc(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+=Uc(i),null!==a&&(d+=":"+a)):"file"==t&&(d+="//"),d+=e.cannotBeABaseURL?o[0]:o.length?"/"+lc(o,"/"):"",null!==s&&(d+="?"+s),null!==c&&(d+="#"+c),d},setHref:function(e){var t=this.parse(e);if(t)throw cc(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if("blob"==e)try{return new pd(e.path[0]).origin}catch(e){return"null"}return"file"!=e&&this.isSpecial()?e+"://"+Uc(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse($t(e)+":",Hc)},getUsername:function(){return this.username},setUsername:function(e){var t=Ns($t(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var r=0;r<t.length;r++)this.username+=Lc(t[r],_c)}},getPassword:function(){return this.password},setPassword:function(e){var t=Ns($t(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var r=0;r<t.length;r++)this.password+=Lc(t[r],_c)}},getHost:function(){var e=this.host,t=this.port;return null===e?"":null===t?Uc(e):Uc(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,td)},getHostname:function(){var e=this.host;return null===e?"":Uc(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,rd)},getPort:function(){var e=this.port;return null===e?"":$t(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(""==(e=$t(e))?this.port=null:this.parse(e,nd))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+lc(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,sd))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){""==(e=$t(e))?this.query=null:("?"==hc(e,0)&&(e=kc(e,1)),this.query="",this.parse(e,ud)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){""!=(e=$t(e))?("#"==hc(e,0)&&(e=kc(e,1)),this.fragment="",this.parse(e,fd)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var pd=function(e){var t=ba(this,ld),r=arguments.length>1?arguments[1]:void 0,n=nc(t,new hd(e,!1,r));u||(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())},ld=pd.prototype,gd=function(e,t){return{get:function(){return ic(this)[e]()},set:t&&function(e){return ic(this)[t](e)},configurable:!0,enumerable:!0}};if(u&&tc(ld,{href:gd("serialize","setHref"),origin:gd("getOrigin"),protocol:gd("getProtocol","setProtocol"),username:gd("getUsername","setUsername"),password:gd("getPassword","setPassword"),host:gd("getHost","setHost"),hostname:gd("getHostname","setHostname"),port:gd("getPort","setPort"),pathname:gd("getPathname","setPathname"),search:gd("getSearch","setSearch"),searchParams:gd("getSearchParams"),hash:gd("getHash","setHash")}),nt(ld,"toJSON",(function(){return ic(this).serialize()}),{enumerable:!0}),nt(ld,"toString",(function(){return ic(this).serialize()}),{enumerable:!0}),sc){var bd=sc.createObjectURL,vd=sc.revokeObjectURL;bd&&nt(pd,"createObjectURL",xr(bd,sc)),vd&&nt(pd,"revokeObjectURL",xr(vd,sc))}function Id(e,t){return(Id=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function xd(e){return(xd="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)}function md(e,t){if(t&&("object"===xd(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function kd(e){return(kd=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function wd(){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 yd(e,t,r){return(yd=wd()?Reflect.construct:function(e,t,r){var n=[null];n.push.apply(n,t);var i=new(Function.bind.apply(e,n));return r&&Id(i,r.prototype),i}).apply(null,arguments)}function Cd(e){var t="function"==typeof Map?new Map:void 0;return(Cd=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 yd(e,arguments,kd(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),Id(n,e)})(e)}function zd(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=kd(e);if(t){var i=kd(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return md(this,r)}}vr(pd,"URL"),jt({global:!0,forced:!pa,sham:!u},{URL:pd});var Ed=function(e){!function(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&&Id(e,t)}(r,e);var t=zd(r);function r(e,n,i){var a;return Gn(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 Yn(r,[{key:"replaceOrigin",value:function(e){var t=new URL(e);this.protocol=t.protocol,this.host=t.host,this.pathname="".concat(t.pathname,"/").concat(this.pathname).replace(/\/\/+/g,"/")}},{key:"addQueryParams",value:function(e){var t=this;e&&Object.keys(e).forEach((function(r){var n=e[r];if(Array.isArray(n))for(var i=0;i<n.length;i+=1)t.searchParams.append(r,String(n[i]));else t.searchParams.append(r,String(n))}))}}],[{key:"renderTemplateUri",value:function(e,t){return t?e.replace(/\{([^\}]+)\}/g,(function(e,r){return String(t[r])})):e}}]),r}(Cd(URL)),Od="commerce-sdk-isomorphic@1.5.0";function qd(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 Pd(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?qd(Object(r),!0).forEach((function(t){Vn(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):qd(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Sd=function(){function e(t){Gn(this,e),Vn(this,"clientConfig",void 0);var r=Pd({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new bo(r)}var r,n,i,a,o,s,c,d,u,f,h,p,l,g,b,v,I,x,m,k,w,y,C,z,E,O,q,P,S,T,R;return Yn(e,[{key:"createBasket",value:(R=Fn(xi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return xi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(s={},void 0!==i.taxMode?s.taxMode=i.taxMode:void 0!==a.taxMode&&(s.taxMode=a.taxMode),void 0===i.siteId){e.next=18;break}s.siteId=i.siteId,e.next=23;break;case 18:if(void 0===a.siteId){e.next=22;break}s.siteId=a.siteId,e.next=23;break;case 22:throw new Error("Missing required query parameter: siteId");case 23:return void 0!==i.locale?s.locale=i.locale:void 0!==a.locale&&(s.locale=a.locale),c=new Ed("/organizations/{organizationId}/baskets",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),(d=Pd(Pd({"Content-Type":"application/json"},this.clientConfig.headers),null==r?void 0:r.headers))["user-agent"]=[d["user-agent"],Od].join(" "),u=new t.Request(c.toString(),Pd(Pd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"POST"})),e.next=30,t.fetch(u);case 30:if(f=e.sent,!n){e.next=35;break}return e.abrupt("return",f);case 35:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=39;break}throw new Error("Error "+f.status+": "+f.statusText);case 39:return e.next=41,f.text();case 41:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 43:case"end":return e.stop()}}),e,this)}))),function(e,t){return R.apply(this,arguments)})},{key:"transferBasket",value:(T=Fn(xi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return xi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(s={},void 0!==i.overrideExisting?s.overrideExisting=i.overrideExisting:void 0!==a.overrideExisting&&(s.overrideExisting=a.overrideExisting),void 0===i.siteId){e.next=18;break}s.siteId=i.siteId,e.next=23;break;case 18:if(void 0===a.siteId){e.next=22;break}s.siteId=a.siteId,e.next=23;break;case 22:throw new Error("Missing required query parameter: siteId");case 23:return c=new Ed("/organizations/{organizationId}/baskets/actions/transfer",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),(d=Pd(Pd({},this.clientConfig.headers),null==r?void 0:r.headers))["user-agent"]=[d["user-agent"],Od].join(" "),u=new t.Request(c.toString(),Pd(Pd({},this.clientConfig.fetchOptions),{},{headers:d,method:"POST"})),e.next=29,t.fetch(u);case 29:if(f=e.sent,!n){e.next=34;break}return e.abrupt("return",f);case 34:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=38;break}throw new Error("Error "+f.status+": "+f.statusText);case 38:return e.next=40,f.text();case 40:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 42:case"end":return e.stop()}}),e,this)}))),function(e,t){return T.apply(this,arguments)})},{key:"mergeBasket",value:(S=Fn(xi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return xi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(s={},void 0!==i.createDestinationBasket?s.createDestinationBasket=i.createDestinationBasket:void 0!==a.createDestinationBasket&&(s.createDestinationBasket=a.createDestinationBasket),void 0!==i.productItemMergeMode?s.productItemMergeMode=i.productItemMergeMode:void 0!==a.productItemMergeMode&&(s.productItemMergeMode=a.productItemMergeMode),void 0===i.siteId){e.next=19;break}s.siteId=i.siteId,e.next=24;break;case 19:if(void 0===a.siteId){e.next=23;break}s.siteId=a.siteId,e.next=24;break;case 23:throw new Error("Missing required query parameter: siteId");case 24:return c=new Ed("/organizations/{organizationId}/baskets/actions/merge",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),(d=Pd(Pd({},this.clientConfig.headers),null==r?void 0:r.headers))["user-agent"]=[d["user-agent"],Od].join(" "),u=new t.Request(c.toString(),Pd(Pd({},this.clientConfig.fetchOptions),{},{headers:d,method:"POST"})),e.next=30,t.fetch(u);case 30:if(f=e.sent,!n){e.next=35;break}return e.abrupt("return",f);case 35:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=39;break}throw new Error("Error "+f.status+": "+f.statusText);case 39:return e.next=41,f.text();case 41:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 43:case"end":return e.stop()}}),e,this)}))),function(e,t){return S.apply(this,arguments)})},{key:"deleteBasket",value:(P=Fn(xi.mark((function e(r,n){var i,a,o,s,c,d,u,f;return xi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.basketId){e.next=16;break}o.basketId=i.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}o.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(s={},void 0===i.siteId){e.next=26;break}s.siteId=i.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}s.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return c=new Ed("/organizations/{organizationId}/baskets/{basketId}",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),(d=Pd(Pd({},this.clientConfig.headers),null==r?void 0:r.headers))["user-agent"]=[d["user-agent"],Od].join(" "),u=new t.Request(c.toString(),Pd(Pd({},this.clientConfig.fetchOptions),{},{headers:d,method:"DELETE"})),e.next=37,t.fetch(u);case 37:if(f=e.sent,!n){e.next=42;break}return e.abrupt("return",f);case 42:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=44;break}throw new Error("Error "+f.status+": "+f.statusText);case 44:case"end":return e.stop()}}),e,this)}))),function(e,t){return P.apply(this,arguments)})},{key:"getBasket",value:(q=Fn(xi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return xi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.basketId){e.next=16;break}o.basketId=i.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}o.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(s={},void 0===i.siteId){e.next=26;break}s.siteId=i.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}s.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==i.locale?s.locale=i.locale:void 0!==a.locale&&(s.locale=a.locale),c=new Ed("/organizations/{organizationId}/baskets/{basketId}",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),(d=Pd(Pd({},this.clientConfig.headers),null==r?void 0:r.headers))["user-agent"]=[d["user-agent"],Od].join(" "),u=new t.Request(c.toString(),Pd(Pd({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=38,t.fetch(u);case 38:if(f=e.sent,!n){e.next=43;break}return e.abrupt("return",f);case 43:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=47;break}throw new Error("Error "+f.status+": "+f.statusText);case 47:return e.next=49,f.text();case 49:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return q.apply(this,arguments)})},{key:"updateBasket",value:(O=Fn(xi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return xi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.basketId){e.next=16;break}o.basketId=i.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}o.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(s={},void 0===i.siteId){e.next=26;break}s.siteId=i.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}s.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==i.locale?s.locale=i.locale:void 0!==a.locale&&(s.locale=a.locale),c=new Ed("/organizations/{organizationId}/baskets/{basketId}",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),(d=Pd(Pd({"Content-Type":"application/json"},this.clientConfig.headers),null==r?void 0:r.headers))["user-agent"]=[d["user-agent"],Od].join(" "),u=new t.Request(c.toString(),Pd(Pd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"PATCH"})),e.next=38,t.fetch(u);case 38:if(f=e.sent,!n){e.next=43;break}return e.abrupt("return",f);case 43:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=47;break}throw new Error("Error "+f.status+": "+f.statusText);case 47:return e.next=49,f.text();case 49:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return O.apply(this,arguments)})},{key:"updateBillingAddressForBasket",value:(E=Fn(xi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return xi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.basketId){e.next=16;break}o.basketId=i.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}o.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(s={},void 0!==i.useAsShipping?s.useAsShipping=i.useAsShipping:void 0!==a.useAsShipping&&(s.useAsShipping=a.useAsShipping),void 0!==i.removeExternalTax?s.removeExternalTax=i.removeExternalTax:void 0!==a.removeExternalTax&&(s.removeExternalTax=a.removeExternalTax),void 0===i.siteId){e.next=28;break}s.siteId=i.siteId,e.next=33;break;case 28:if(void 0===a.siteId){e.next=32;break}s.siteId=a.siteId,e.next=33;break;case 32:throw new Error("Missing required query parameter: siteId");case 33:return void 0!==i.locale?s.locale=i.locale:void 0!==a.locale&&(s.locale=a.locale),c=new Ed("/organizations/{organizationId}/baskets/{basketId}/billing-address",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),(d=Pd(Pd({"Content-Type":"application/json"},this.clientConfig.headers),null==r?void 0:r.headers))["user-agent"]=[d["user-agent"],Od].join(" "),u=new t.Request(c.toString(),Pd(Pd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"PUT"})),e.next=40,t.fetch(u);case 40:if(f=e.sent,!n){e.next=45;break}return e.abrupt("return",f);case 45:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=49;break}throw new Error("Error "+f.status+": "+f.statusText);case 49:return e.next=51,f.text();case 51:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 53:case"end":return e.stop()}}),e,this)}))),function(e,t){return E.apply(this,arguments)})},{key:"addCouponToBasket",value:(z=Fn(xi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return xi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.basketId){e.next=16;break}o.basketId=i.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}o.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(s={},void 0===i.siteId){e.next=26;break}s.siteId=i.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}s.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==i.locale?s.locale=i.locale:void 0!==a.locale&&(s.locale=a.locale),c=new Ed("/organizations/{organizationId}/baskets/{basketId}/coupons",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),(d=Pd(Pd({"Content-Type":"application/json"},this.clientConfig.headers),null==r?void 0:r.headers))["user-agent"]=[d["user-agent"],Od].join(" "),u=new t.Request(c.toString(),Pd(Pd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"POST"})),e.next=38,t.fetch(u);case 38:if(f=e.sent,!n){e.next=43;break}return e.abrupt("return",f);case 43:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=47;break}throw new Error("Error "+f.status+": "+f.statusText);case 47:return e.next=49,f.text();case 49:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return z.apply(this,arguments)})},{key:"removeCouponFromBasket",value:(C=Fn(xi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return xi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.basketId){e.next=16;break}o.basketId=i.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}o.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===i.couponItemId){e.next=25;break}o.couponItemId=i.couponItemId,e.next=30;break;case 25:if(void 0===a.couponItemId){e.next=29;break}o.couponItemId=a.couponItemId,e.next=30;break;case 29:throw new Error("Missing required path parameter: couponItemId");case 30:if(s={},void 0===i.siteId){e.next=35;break}s.siteId=i.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}s.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return c=new Ed("/organizations/{organizationId}/baskets/{basketId}/coupons/{couponItemId}",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),(d=Pd(Pd({},this.clientConfig.headers),null==r?void 0:r.headers))["user-agent"]=[d["user-agent"],Od].join(" "),u=new t.Request(c.toString(),Pd(Pd({},this.clientConfig.fetchOptions),{},{headers:d,method:"DELETE"})),e.next=46,t.fetch(u);case 46:if(f=e.sent,!n){e.next=51;break}return e.abrupt("return",f);case 51:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=55;break}throw new Error("Error "+f.status+": "+f.statusText);case 55:return e.next=57,f.text();case 57:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 59:case"end":return e.stop()}}),e,this)}))),function(e,t){return C.apply(this,arguments)})},{key:"updateCustomerForBasket",value:(y=Fn(xi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return xi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.basketId){e.next=16;break}o.basketId=i.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}o.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(s={},void 0===i.siteId){e.next=26;break}s.siteId=i.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}s.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==i.locale?s.locale=i.locale:void 0!==a.locale&&(s.locale=a.locale),c=new Ed("/organizations/{organizationId}/baskets/{basketId}/customer",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),(d=Pd(Pd({"Content-Type":"application/json"},this.clientConfig.headers),null==r?void 0:r.headers))["user-agent"]=[d["user-agent"],Od].join(" "),u=new t.Request(c.toString(),Pd(Pd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"PUT"})),e.next=38,t.fetch(u);case 38:if(f=e.sent,!n){e.next=43;break}return e.abrupt("return",f);case 43:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=47;break}throw new Error("Error "+f.status+": "+f.statusText);case 47:return e.next=49,f.text();case 49:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return y.apply(this,arguments)})},{key:"addGiftCertificateItemToBasket",value:(w=Fn(xi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return xi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.basketId){e.next=16;break}o.basketId=i.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}o.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(s={},void 0===i.siteId){e.next=26;break}s.siteId=i.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}s.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==i.locale?s.locale=i.locale:void 0!==a.locale&&(s.locale=a.locale),c=new Ed("/organizations/{organizationId}/baskets/{basketId}/gift-certificate-items",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),(d=Pd(Pd({"Content-Type":"application/json"},this.clientConfig.headers),null==r?void 0:r.headers))["user-agent"]=[d["user-agent"],Od].join(" "),u=new t.Request(c.toString(),Pd(Pd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"POST"})),e.next=38,t.fetch(u);case 38:if(f=e.sent,!n){e.next=43;break}return e.abrupt("return",f);case 43:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=47;break}throw new Error("Error "+f.status+": "+f.statusText);case 47:return e.next=49,f.text();case 49:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return w.apply(this,arguments)})},{key:"removeGiftCertificateItemFromBasket",value:(k=Fn(xi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return xi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.basketId){e.next=16;break}o.basketId=i.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}o.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===i.giftCertificateItemId){e.next=25;break}o.giftCertificateItemId=i.giftCertificateItemId,e.next=30;break;case 25:if(void 0===a.giftCertificateItemId){e.next=29;break}o.giftCertificateItemId=a.giftCertificateItemId,e.next=30;break;case 29:throw new Error("Missing required path parameter: giftCertificateItemId");case 30:if(s={},void 0===i.siteId){e.next=35;break}s.siteId=i.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}s.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return c=new Ed("/organizations/{organizationId}/baskets/{basketId}/gift-certificate-items/{giftCertificateItemId}",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),(d=Pd(Pd({},this.clientConfig.headers),null==r?void 0:r.headers))["user-agent"]=[d["user-agent"],Od].join(" "),u=new t.Request(c.toString(),Pd(Pd({},this.clientConfig.fetchOptions),{},{headers:d,method:"DELETE"})),e.next=46,t.fetch(u);case 46:if(f=e.sent,!n){e.next=51;break}return e.abrupt("return",f);case 51:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=55;break}throw new Error("Error "+f.status+": "+f.statusText);case 55:return e.next=57,f.text();case 57:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 59:case"end":return e.stop()}}),e,this)}))),function(e,t){return k.apply(this,arguments)})},{key:"updateGiftCertificateItemInBasket",value:(m=Fn(xi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return xi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.basketId){e.next=16;break}o.basketId=i.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}o.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===i.giftCertificateItemId){e.next=25;break}o.giftCertificateItemId=i.giftCertificateItemId,e.next=30;break;case 25:if(void 0===a.giftCertificateItemId){e.next=29;break}o.giftCertificateItemId=a.giftCertificateItemId,e.next=30;break;case 29:throw new Error("Missing required path parameter: giftCertificateItemId");case 30:if(s={},void 0===i.siteId){e.next=35;break}s.siteId=i.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}s.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==i.locale?s.locale=i.locale:void 0!==a.locale&&(s.locale=a.locale),c=new Ed("/organizations/{organizationId}/baskets/{basketId}/gift-certificate-items/{giftCertificateItemId}",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),(d=Pd(Pd({"Content-Type":"application/json"},this.clientConfig.headers),null==r?void 0:r.headers))["user-agent"]=[d["user-agent"],Od].join(" "),u=new t.Request(c.toString(),Pd(Pd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"PATCH"})),e.next=47,t.fetch(u);case 47:if(f=e.sent,!n){e.next=52;break}return e.abrupt("return",f);case 52:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=56;break}throw new Error("Error "+f.status+": "+f.statusText);case 56:return e.next=58,f.text();case 58:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 60:case"end":return e.stop()}}),e,this)}))),function(e,t){return m.apply(this,arguments)})},{key:"addItemToBasket",value:(x=Fn(xi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return xi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.basketId){e.next=16;break}o.basketId=i.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}o.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(s={},void 0===i.siteId){e.next=26;break}s.siteId=i.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}s.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==i.locale?s.locale=i.locale:void 0!==a.locale&&(s.locale=a.locale),c=new Ed("/organizations/{organizationId}/baskets/{basketId}/items",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),(d=Pd(Pd({"Content-Type":"application/json"},this.clientConfig.headers),null==r?void 0:r.headers))["user-agent"]=[d["user-agent"],Od].join(" "),u=new t.Request(c.toString(),Pd(Pd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"POST"})),e.next=38,t.fetch(u);case 38:if(f=e.sent,!n){e.next=43;break}return e.abrupt("return",f);case 43:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=47;break}throw new Error("Error "+f.status+": "+f.statusText);case 47:return e.next=49,f.text();case 49:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return x.apply(this,arguments)})},{key:"removeItemFromBasket",value:(I=Fn(xi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return xi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.basketId){e.next=16;break}o.basketId=i.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}o.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===i.itemId){e.next=25;break}o.itemId=i.itemId,e.next=30;break;case 25:if(void 0===a.itemId){e.next=29;break}o.itemId=a.itemId,e.next=30;break;case 29:throw new Error("Missing required path parameter: itemId");case 30:if(s={},void 0===i.siteId){e.next=35;break}s.siteId=i.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}s.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return c=new Ed("/organizations/{organizationId}/baskets/{basketId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),(d=Pd(Pd({},this.clientConfig.headers),null==r?void 0:r.headers))["user-agent"]=[d["user-agent"],Od].join(" "),u=new t.Request(c.toString(),Pd(Pd({},this.clientConfig.fetchOptions),{},{headers:d,method:"DELETE"})),e.next=46,t.fetch(u);case 46:if(f=e.sent,!n){e.next=51;break}return e.abrupt("return",f);case 51:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=55;break}throw new Error("Error "+f.status+": "+f.statusText);case 55:return e.next=57,f.text();case 57:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 59:case"end":return e.stop()}}),e,this)}))),function(e,t){return I.apply(this,arguments)})},{key:"updateItemInBasket",value:(v=Fn(xi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return xi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.basketId){e.next=16;break}o.basketId=i.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}o.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===i.itemId){e.next=25;break}o.itemId=i.itemId,e.next=30;break;case 25:if(void 0===a.itemId){e.next=29;break}o.itemId=a.itemId,e.next=30;break;case 29:throw new Error("Missing required path parameter: itemId");case 30:if(s={},void 0!==i.removeExternalTax?s.removeExternalTax=i.removeExternalTax:void 0!==a.removeExternalTax&&(s.removeExternalTax=a.removeExternalTax),void 0===i.siteId){e.next=36;break}s.siteId=i.siteId,e.next=41;break;case 36:if(void 0===a.siteId){e.next=40;break}s.siteId=a.siteId,e.next=41;break;case 40:throw new Error("Missing required query parameter: siteId");case 41:return void 0!==i.locale?s.locale=i.locale:void 0!==a.locale&&(s.locale=a.locale),c=new Ed("/organizations/{organizationId}/baskets/{basketId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),(d=Pd(Pd({"Content-Type":"application/json"},this.clientConfig.headers),null==r?void 0:r.headers))["user-agent"]=[d["user-agent"],Od].join(" "),u=new t.Request(c.toString(),Pd(Pd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"PATCH"})),e.next=48,t.fetch(u);case 48:if(f=e.sent,!n){e.next=53;break}return e.abrupt("return",f);case 53:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=57;break}throw new Error("Error "+f.status+": "+f.statusText);case 57:return e.next=59,f.text();case 59:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 61:case"end":return e.stop()}}),e,this)}))),function(e,t){return v.apply(this,arguments)})},{key:"addTaxesForBasketItem",value:(b=Fn(xi.mark((function e(r,n){var i,a,o,s,c,d,u,f;return xi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.basketId){e.next=16;break}o.basketId=i.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}o.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===i.itemId){e.next=25;break}o.itemId=i.itemId,e.next=30;break;case 25:if(void 0===a.itemId){e.next=29;break}o.itemId=a.itemId,e.next=30;break;case 29:throw new Error("Missing required path parameter: itemId");case 30:if(s={},void 0===i.siteId){e.next=35;break}s.siteId=i.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}s.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return c=new Ed("/organizations/{organizationId}/baskets/{basketId}/items/{itemId}/taxes",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),(d=Pd(Pd({"Content-Type":"application/json"},this.clientConfig.headers),null==r?void 0:r.headers))["user-agent"]=[d["user-agent"],Od].join(" "),u=new t.Request(c.toString(),Pd(Pd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"PUT"})),e.next=46,t.fetch(u);case 46:if(f=e.sent,!n){e.next=51;break}return e.abrupt("return",f);case 51:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=53;break}throw new Error("Error "+f.status+": "+f.statusText);case 53:case"end":return e.stop()}}),e,this)}))),function(e,t){return b.apply(this,arguments)})},{key:"addPaymentInstrumentToBasket",value:(g=Fn(xi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return xi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.basketId){e.next=16;break}o.basketId=i.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}o.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(s={},void 0===i.siteId){e.next=26;break}s.siteId=i.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}s.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==i.locale?s.locale=i.locale:void 0!==a.locale&&(s.locale=a.locale),c=new Ed("/organizations/{organizationId}/baskets/{basketId}/payment-instruments",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),(d=Pd(Pd({"Content-Type":"application/json"},this.clientConfig.headers),null==r?void 0:r.headers))["user-agent"]=[d["user-agent"],Od].join(" "),u=new t.Request(c.toString(),Pd(Pd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"POST"})),e.next=38,t.fetch(u);case 38:if(f=e.sent,!n){e.next=43;break}return e.abrupt("return",f);case 43:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=47;break}throw new Error("Error "+f.status+": "+f.statusText);case 47:return e.next=49,f.text();case 49:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return g.apply(this,arguments)})},{key:"removePaymentInstrumentFromBasket",value:(l=Fn(xi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return xi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.basketId){e.next=16;break}o.basketId=i.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}o.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===i.paymentInstrumentId){e.next=25;break}o.paymentInstrumentId=i.paymentInstrumentId,e.next=30;break;case 25:if(void 0===a.paymentInstrumentId){e.next=29;break}o.paymentInstrumentId=a.paymentInstrumentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: paymentInstrumentId");case 30:if(s={},void 0===i.siteId){e.next=35;break}s.siteId=i.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}s.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return c=new Ed("/organizations/{organizationId}/baskets/{basketId}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),(d=Pd(Pd({},this.clientConfig.headers),null==r?void 0:r.headers))["user-agent"]=[d["user-agent"],Od].join(" "),u=new t.Request(c.toString(),Pd(Pd({},this.clientConfig.fetchOptions),{},{headers:d,method:"DELETE"})),e.next=46,t.fetch(u);case 46:if(f=e.sent,!n){e.next=51;break}return e.abrupt("return",f);case 51:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=55;break}throw new Error("Error "+f.status+": "+f.statusText);case 55:return e.next=57,f.text();case 57:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 59:case"end":return e.stop()}}),e,this)}))),function(e,t){return l.apply(this,arguments)})},{key:"updatePaymentInstrumentInBasket",value:(p=Fn(xi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return xi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.basketId){e.next=16;break}o.basketId=i.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}o.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===i.paymentInstrumentId){e.next=25;break}o.paymentInstrumentId=i.paymentInstrumentId,e.next=30;break;case 25:if(void 0===a.paymentInstrumentId){e.next=29;break}o.paymentInstrumentId=a.paymentInstrumentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: paymentInstrumentId");case 30:if(s={},void 0!==i.removeExternalTax?s.removeExternalTax=i.removeExternalTax:void 0!==a.removeExternalTax&&(s.removeExternalTax=a.removeExternalTax),void 0===i.siteId){e.next=36;break}s.siteId=i.siteId,e.next=41;break;case 36:if(void 0===a.siteId){e.next=40;break}s.siteId=a.siteId,e.next=41;break;case 40:throw new Error("Missing required query parameter: siteId");case 41:return void 0!==i.locale?s.locale=i.locale:void 0!==a.locale&&(s.locale=a.locale),c=new Ed("/organizations/{organizationId}/baskets/{basketId}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),(d=Pd(Pd({"Content-Type":"application/json"},this.clientConfig.headers),null==r?void 0:r.headers))["user-agent"]=[d["user-agent"],Od].join(" "),u=new t.Request(c.toString(),Pd(Pd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"PATCH"})),e.next=48,t.fetch(u);case 48:if(f=e.sent,!n){e.next=53;break}return e.abrupt("return",f);case 53:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=57;break}throw new Error("Error "+f.status+": "+f.statusText);case 57:return e.next=59,f.text();case 59:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 61:case"end":return e.stop()}}),e,this)}))),function(e,t){return p.apply(this,arguments)})},{key:"getPaymentMethodsForBasket",value:(h=Fn(xi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return xi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.basketId){e.next=16;break}o.basketId=i.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}o.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(s={},void 0===i.siteId){e.next=26;break}s.siteId=i.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}s.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==i.locale?s.locale=i.locale:void 0!==a.locale&&(s.locale=a.locale),c=new Ed("/organizations/{organizationId}/baskets/{basketId}/payment-methods",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),(d=Pd(Pd({},this.clientConfig.headers),null==r?void 0:r.headers))["user-agent"]=[d["user-agent"],Od].join(" "),u=new t.Request(c.toString(),Pd(Pd({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=38,t.fetch(u);case 38:if(f=e.sent,!n){e.next=43;break}return e.abrupt("return",f);case 43:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=47;break}throw new Error("Error "+f.status+": "+f.statusText);case 47:return e.next=49,f.text();case 49:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return h.apply(this,arguments)})},{key:"getPriceBooksForBasket",value:(f=Fn(xi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return xi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.basketId){e.next=16;break}o.basketId=i.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}o.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(s={},void 0===i.siteId){e.next=26;break}s.siteId=i.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}s.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return c=new Ed("/organizations/{organizationId}/baskets/{basketId}/price-books",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),(d=Pd(Pd({},this.clientConfig.headers),null==r?void 0:r.headers))["user-agent"]=[d["user-agent"],Od].join(" "),u=new t.Request(c.toString(),Pd(Pd({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=37,t.fetch(u);case 37:if(f=e.sent,!n){e.next=42;break}return e.abrupt("return",f);case 42:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=46;break}throw new Error("Error "+f.status+": "+f.statusText);case 46:return e.next=48,f.text();case 48:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 50:case"end":return e.stop()}}),e,this)}))),function(e,t){return f.apply(this,arguments)})},{key:"addPriceBooksToBasket",value:(u=Fn(xi.mark((function e(r,n){var i,a,o,s,c,d,u,f;return xi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.basketId){e.next=16;break}o.basketId=i.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}o.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(s={},void 0===i.siteId){e.next=26;break}s.siteId=i.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}s.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return c=new Ed("/organizations/{organizationId}/baskets/{basketId}/price-books",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),(d=Pd(Pd({"Content-Type":"application/json"},this.clientConfig.headers),null==r?void 0:r.headers))["user-agent"]=[d["user-agent"],Od].join(" "),u=new t.Request(c.toString(),Pd(Pd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"PUT"})),e.next=37,t.fetch(u);case 37:if(f=e.sent,!n){e.next=42;break}return e.abrupt("return",f);case 42:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=44;break}throw new Error("Error "+f.status+": "+f.statusText);case 44:case"end":return e.stop()}}),e,this)}))),function(e,t){return u.apply(this,arguments)})},{key:"createShipmentForBasket",value:(d=Fn(xi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return xi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.basketId){e.next=16;break}o.basketId=i.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}o.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(s={},void 0===i.siteId){e.next=26;break}s.siteId=i.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}s.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==i.locale?s.locale=i.locale:void 0!==a.locale&&(s.locale=a.locale),c=new Ed("/organizations/{organizationId}/baskets/{basketId}/shipments",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),(d=Pd(Pd({"Content-Type":"application/json"},this.clientConfig.headers),null==r?void 0:r.headers))["user-agent"]=[d["user-agent"],Od].join(" "),u=new t.Request(c.toString(),Pd(Pd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"POST"})),e.next=38,t.fetch(u);case 38:if(f=e.sent,!n){e.next=43;break}return e.abrupt("return",f);case 43:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=47;break}throw new Error("Error "+f.status+": "+f.statusText);case 47:return e.next=49,f.text();case 49:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return d.apply(this,arguments)})},{key:"removeShipmentFromBasket",value:(c=Fn(xi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return xi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.basketId){e.next=16;break}o.basketId=i.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}o.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===i.shipmentId){e.next=25;break}o.shipmentId=i.shipmentId,e.next=30;break;case 25:if(void 0===a.shipmentId){e.next=29;break}o.shipmentId=a.shipmentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: shipmentId");case 30:if(s={},void 0===i.siteId){e.next=35;break}s.siteId=i.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}s.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return c=new Ed("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),(d=Pd(Pd({},this.clientConfig.headers),null==r?void 0:r.headers))["user-agent"]=[d["user-agent"],Od].join(" "),u=new t.Request(c.toString(),Pd(Pd({},this.clientConfig.fetchOptions),{},{headers:d,method:"DELETE"})),e.next=46,t.fetch(u);case 46:if(f=e.sent,!n){e.next=51;break}return e.abrupt("return",f);case 51:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=55;break}throw new Error("Error "+f.status+": "+f.statusText);case 55:return e.next=57,f.text();case 57:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 59:case"end":return e.stop()}}),e,this)}))),function(e,t){return c.apply(this,arguments)})},{key:"updateShipmentForBasket",value:(s=Fn(xi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return xi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.basketId){e.next=16;break}o.basketId=i.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}o.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===i.shipmentId){e.next=25;break}o.shipmentId=i.shipmentId,e.next=30;break;case 25:if(void 0===a.shipmentId){e.next=29;break}o.shipmentId=a.shipmentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: shipmentId");case 30:if(s={},void 0===i.siteId){e.next=35;break}s.siteId=i.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}s.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==i.locale?s.locale=i.locale:void 0!==a.locale&&(s.locale=a.locale),c=new Ed("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),(d=Pd(Pd({"Content-Type":"application/json"},this.clientConfig.headers),null==r?void 0:r.headers))["user-agent"]=[d["user-agent"],Od].join(" "),u=new t.Request(c.toString(),Pd(Pd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"PATCH"})),e.next=47,t.fetch(u);case 47:if(f=e.sent,!n){e.next=52;break}return e.abrupt("return",f);case 52:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=56;break}throw new Error("Error "+f.status+": "+f.statusText);case 56:return e.next=58,f.text();case 58:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 60:case"end":return e.stop()}}),e,this)}))),function(e,t){return s.apply(this,arguments)})},{key:"updateShippingAddressForShipment",value:(o=Fn(xi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return xi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.basketId){e.next=16;break}o.basketId=i.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}o.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===i.shipmentId){e.next=25;break}o.shipmentId=i.shipmentId,e.next=30;break;case 25:if(void 0===a.shipmentId){e.next=29;break}o.shipmentId=a.shipmentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: shipmentId");case 30:if(s={},void 0!==i.useAsBilling?s.useAsBilling=i.useAsBilling:void 0!==a.useAsBilling&&(s.useAsBilling=a.useAsBilling),void 0!==i.removeExternalTax?s.removeExternalTax=i.removeExternalTax:void 0!==a.removeExternalTax&&(s.removeExternalTax=a.removeExternalTax),void 0===i.siteId){e.next=37;break}s.siteId=i.siteId,e.next=42;break;case 37:if(void 0===a.siteId){e.next=41;break}s.siteId=a.siteId,e.next=42;break;case 41:throw new Error("Missing required query parameter: siteId");case 42:return void 0!==i.locale?s.locale=i.locale:void 0!==a.locale&&(s.locale=a.locale),c=new Ed("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}/shipping-address",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),(d=Pd(Pd({"Content-Type":"application/json"},this.clientConfig.headers),null==r?void 0:r.headers))["user-agent"]=[d["user-agent"],Od].join(" "),u=new t.Request(c.toString(),Pd(Pd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"PUT"})),e.next=49,t.fetch(u);case 49:if(f=e.sent,!n){e.next=54;break}return e.abrupt("return",f);case 54:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=58;break}throw new Error("Error "+f.status+": "+f.statusText);case 58:return e.next=60,f.text();case 60:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 62:case"end":return e.stop()}}),e,this)}))),function(e,t){return o.apply(this,arguments)})},{key:"updateShippingMethodForShipment",value:(a=Fn(xi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return xi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.basketId){e.next=16;break}o.basketId=i.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}o.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===i.shipmentId){e.next=25;break}o.shipmentId=i.shipmentId,e.next=30;break;case 25:if(void 0===a.shipmentId){e.next=29;break}o.shipmentId=a.shipmentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: shipmentId");case 30:if(s={},void 0===i.siteId){e.next=35;break}s.siteId=i.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}s.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==i.locale?s.locale=i.locale:void 0!==a.locale&&(s.locale=a.locale),c=new Ed("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}/shipping-method",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),(d=Pd(Pd({"Content-Type":"application/json"},this.clientConfig.headers),null==r?void 0:r.headers))["user-agent"]=[d["user-agent"],Od].join(" "),u=new t.Request(c.toString(),Pd(Pd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"PUT"})),e.next=47,t.fetch(u);case 47:if(f=e.sent,!n){e.next=52;break}return e.abrupt("return",f);case 52:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=56;break}throw new Error("Error "+f.status+": "+f.statusText);case 56:return e.next=58,f.text();case 58:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 60:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"getShippingMethodsForShipment",value:(i=Fn(xi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return xi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.basketId){e.next=16;break}o.basketId=i.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}o.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===i.shipmentId){e.next=25;break}o.shipmentId=i.shipmentId,e.next=30;break;case 25:if(void 0===a.shipmentId){e.next=29;break}o.shipmentId=a.shipmentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: shipmentId");case 30:if(s={},void 0===i.siteId){e.next=35;break}s.siteId=i.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}s.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==i.locale?s.locale=i.locale:void 0!==a.locale&&(s.locale=a.locale),c=new Ed("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}/shipping-methods",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),(d=Pd(Pd({},this.clientConfig.headers),null==r?void 0:r.headers))["user-agent"]=[d["user-agent"],Od].join(" "),u=new t.Request(c.toString(),Pd(Pd({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=47,t.fetch(u);case 47:if(f=e.sent,!n){e.next=52;break}return e.abrupt("return",f);case 52:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=56;break}throw new Error("Error "+f.status+": "+f.statusText);case 56:return e.next=58,f.text();case 58:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 60:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"getTaxesFromBasket",value:(n=Fn(xi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return xi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.basketId){e.next=16;break}o.basketId=i.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}o.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(s={},void 0===i.siteId){e.next=26;break}s.siteId=i.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}s.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return c=new Ed("/organizations/{organizationId}/baskets/{basketId}/taxes",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),(d=Pd(Pd({},this.clientConfig.headers),null==r?void 0:r.headers))["user-agent"]=[d["user-agent"],Od].join(" "),u=new t.Request(c.toString(),Pd(Pd({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=37,t.fetch(u);case 37:if(f=e.sent,!n){e.next=42;break}return e.abrupt("return",f);case 42:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=46;break}throw new Error("Error "+f.status+": "+f.statusText);case 46:return e.next=48,f.text();case 48:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 50:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"addTaxesForBasket",value:(r=Fn(xi.mark((function e(r,n){var i,a,o,s,c,d,u,f;return xi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.basketId){e.next=16;break}o.basketId=i.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}o.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(s={},void 0===i.siteId){e.next=26;break}s.siteId=i.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}s.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return c=new Ed("/organizations/{organizationId}/baskets/{basketId}/taxes",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),(d=Pd(Pd({"Content-Type":"application/json"},this.clientConfig.headers),null==r?void 0:r.headers))["user-agent"]=[d["user-agent"],Od].join(" "),u=new t.Request(c.toString(),Pd(Pd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"PUT"})),e.next=37,t.fetch(u);case 37:if(f=e.sent,!n){e.next=42;break}return e.abrupt("return",f);case 42:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=44;break}throw new Error("Error "+f.status+": "+f.statusText);case 44:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})}]),e}();function Td(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 Rd(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Td(Object(r),!0).forEach((function(t){Vn(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Td(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}Vn(Sd,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/checkout/shopper-baskets/{version}");var jd=function(){function e(t){Gn(this,e),Vn(this,"clientConfig",void 0);var r=Rd({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new bo(r)}var r,n,i,a;return Yn(e,[{key:"getShopperContext",value:(a=Fn(xi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return xi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.usid){e.next=16;break}o.usid=i.usid,e.next=21;break;case 16:if(void 0===a.usid){e.next=20;break}o.usid=a.usid,e.next=21;break;case 20:throw new Error("Missing required path parameter: usid");case 21:return s={},c=new Ed("/organizations/{organizationId}/shopper-context/{usid}",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),(d=Rd(Rd({},this.clientConfig.headers),null==r?void 0:r.headers))["user-agent"]=[d["user-agent"],Od].join(" "),u=new t.Request(c.toString(),Rd(Rd({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=28,t.fetch(u);case 28:if(f=e.sent,!n){e.next=33;break}return e.abrupt("return",f);case 33:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=37;break}throw new Error("Error "+f.status+": "+f.statusText);case 37:return e.next=39,f.text();case 39:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 41:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"createShopperContext",value:(i=Fn(xi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return xi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.usid){e.next=16;break}o.usid=i.usid,e.next=21;break;case 16:if(void 0===a.usid){e.next=20;break}o.usid=a.usid,e.next=21;break;case 20:throw new Error("Missing required path parameter: usid");case 21:return s={},c=new Ed("/organizations/{organizationId}/shopper-context/{usid}",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),(d=Rd(Rd({"Content-Type":"application/json"},this.clientConfig.headers),null==r?void 0:r.headers))["user-agent"]=[d["user-agent"],Od].join(" "),u=new t.Request(c.toString(),Rd(Rd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"PUT"})),e.next=28,t.fetch(u);case 28:if(f=e.sent,!n){e.next=33;break}return e.abrupt("return",f);case 33:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=37;break}throw new Error("Error "+f.status+": "+f.statusText);case 37:return e.next=39,f.text();case 39:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 41:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"deleteShopperContext",value:(n=Fn(xi.mark((function e(r,n){var i,a,o,s,c,d,u,f;return xi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.usid){e.next=16;break}o.usid=i.usid,e.next=21;break;case 16:if(void 0===a.usid){e.next=20;break}o.usid=a.usid,e.next=21;break;case 20:throw new Error("Missing required path parameter: usid");case 21:return s={},c=new Ed("/organizations/{organizationId}/shopper-context/{usid}",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),(d=Rd(Rd({},this.clientConfig.headers),null==r?void 0:r.headers))["user-agent"]=[d["user-agent"],Od].join(" "),u=new t.Request(c.toString(),Rd(Rd({},this.clientConfig.fetchOptions),{},{headers:d,method:"DELETE"})),e.next=28,t.fetch(u);case 28:if(f=e.sent,!n){e.next=33;break}return e.abrupt("return",f);case 33:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=35;break}throw new Error("Error "+f.status+": "+f.statusText);case 35:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"updateShopperContext",value:(r=Fn(xi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return xi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.usid){e.next=16;break}o.usid=i.usid,e.next=21;break;case 16:if(void 0===a.usid){e.next=20;break}o.usid=a.usid,e.next=21;break;case 20:throw new Error("Missing required path parameter: usid");case 21:return s={},c=new Ed("/organizations/{organizationId}/shopper-context/{usid}",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),(d=Rd(Rd({"Content-Type":"application/json"},this.clientConfig.headers),null==r?void 0:r.headers))["user-agent"]=[d["user-agent"],Od].join(" "),u=new t.Request(c.toString(),Rd(Rd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"PATCH"})),e.next=28,t.fetch(u);case 28:if(f=e.sent,!n){e.next=33;break}return e.abrupt("return",f);case 33:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=37;break}throw new Error("Error "+f.status+": "+f.statusText);case 37:return e.next=39,f.text();case 39:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 41:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})}]),e}();function Md(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 Ud(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Md(Object(r),!0).forEach((function(t){Vn(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Md(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}Vn(jd,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/shopper/shopper-context/{version}");var Ad=function(){function e(t){Gn(this,e),Vn(this,"clientConfig",void 0);var r=Ud({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new bo(r)}var r,n,i,a,o,s,c,d,u,f,h,p,l,g,b,v,I,x,m,k,w,y,C,z,E,O,q,P,S,T,R,j;return Yn(e,[{key:"registerCustomer",value:(j=Fn(xi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return xi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(s={},void 0===i.siteId){e.next=17;break}s.siteId=i.siteId,e.next=22;break;case 17:if(void 0===a.siteId){e.next=21;break}s.siteId=a.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return c=new Ed("/organizations/{organizationId}/customers",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),(d=Ud(Ud({"Content-Type":"application/json"},this.clientConfig.headers),null==r?void 0:r.headers))["user-agent"]=[d["user-agent"],Od].join(" "),u=new t.Request(c.toString(),Ud(Ud({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"POST"})),e.next=28,t.fetch(u);case 28:if(f=e.sent,!n){e.next=33;break}return e.abrupt("return",f);case 33:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=37;break}throw new Error("Error "+f.status+": "+f.statusText);case 37:return e.next=39,f.text();case 39:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 41:case"end":return e.stop()}}),e,this)}))),function(e,t){return j.apply(this,arguments)})},{key:"invalidateCustomerAuth",value:(R=Fn(xi.mark((function e(r,n){var i,a,o,s,c,d,u,f;return xi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(s={},void 0===i.siteId){e.next=17;break}s.siteId=i.siteId,e.next=22;break;case 17:if(void 0===a.siteId){e.next=21;break}s.siteId=a.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return c=new Ed("/organizations/{organizationId}/customers/actions/logout",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),(d=Ud(Ud({},this.clientConfig.headers),null==r?void 0:r.headers))["user-agent"]=[d["user-agent"],Od].join(" "),u=new t.Request(c.toString(),Ud(Ud({},this.clientConfig.fetchOptions),{},{headers:d,method:"DELETE"})),e.next=28,t.fetch(u);case 28:if(f=e.sent,!n){e.next=33;break}return e.abrupt("return",f);case 33:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=35;break}throw new Error("Error "+f.status+": "+f.statusText);case 35:case"end":return e.stop()}}),e,this)}))),function(e,t){return R.apply(this,arguments)})},{key:"authorizeCustomer",value:(T=Fn(xi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return xi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(s={},void 0===i.clientId){e.next=17;break}s.clientId=i.clientId,e.next=22;break;case 17:if(void 0===a.clientId){e.next=21;break}s.clientId=a.clientId,e.next=22;break;case 21:throw new Error("Missing required query parameter: clientId");case 22:if(void 0===i.siteId){e.next=26;break}s.siteId=i.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}s.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return c=new Ed("/organizations/{organizationId}/customers/actions/login",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),(d=Ud(Ud({"Content-Type":"application/json"},this.clientConfig.headers),null==r?void 0:r.headers))["user-agent"]=[d["user-agent"],Od].join(" "),u=new t.Request(c.toString(),Ud(Ud({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"POST"})),e.next=37,t.fetch(u);case 37:if(f=e.sent,!n){e.next=42;break}return e.abrupt("return",f);case 42:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=46;break}throw new Error("Error "+f.status+": "+f.statusText);case 46:return e.next=48,f.text();case 48:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 50:case"end":return e.stop()}}),e,this)}))),function(e,t){return T.apply(this,arguments)})},{key:"authorizeTrustedSystem",value:(S=Fn(xi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return xi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(s={},void 0===i.siteId){e.next=17;break}s.siteId=i.siteId,e.next=22;break;case 17:if(void 0===a.siteId){e.next=21;break}s.siteId=a.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return c=new Ed("/organizations/{organizationId}/customers/trusted-system/actions/login",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),(d=Ud(Ud({"Content-Type":"application/json"},this.clientConfig.headers),null==r?void 0:r.headers))["user-agent"]=[d["user-agent"],Od].join(" "),u=new t.Request(c.toString(),Ud(Ud({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"POST"})),e.next=28,t.fetch(u);case 28:if(f=e.sent,!n){e.next=33;break}return e.abrupt("return",f);case 33:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=37;break}throw new Error("Error "+f.status+": "+f.statusText);case 37:return e.next=39,f.text();case 39:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 41:case"end":return e.stop()}}),e,this)}))),function(e,t){return S.apply(this,arguments)})},{key:"resetPassword",value:(P=Fn(xi.mark((function e(r,n){var i,a,o,s,c,d,u,f;return xi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(s={},void 0===i.siteId){e.next=17;break}s.siteId=i.siteId,e.next=22;break;case 17:if(void 0===a.siteId){e.next=21;break}s.siteId=a.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return c=new Ed("/organizations/{organizationId}/customers/password/actions/reset",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),(d=Ud(Ud({"Content-Type":"application/json"},this.clientConfig.headers),null==r?void 0:r.headers))["user-agent"]=[d["user-agent"],Od].join(" "),u=new t.Request(c.toString(),Ud(Ud({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"POST"})),e.next=28,t.fetch(u);case 28:if(f=e.sent,!n){e.next=33;break}return e.abrupt("return",f);case 33:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=35;break}throw new Error("Error "+f.status+": "+f.statusText);case 35:case"end":return e.stop()}}),e,this)}))),function(e,t){return P.apply(this,arguments)})},{key:"getResetPasswordToken",value:(q=Fn(xi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return xi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(s={},void 0===i.siteId){e.next=17;break}s.siteId=i.siteId,e.next=22;break;case 17:if(void 0===a.siteId){e.next=21;break}s.siteId=a.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return c=new Ed("/organizations/{organizationId}/customers/password/actions/create-reset-token",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),(d=Ud(Ud({"Content-Type":"application/json"},this.clientConfig.headers),null==r?void 0:r.headers))["user-agent"]=[d["user-agent"],Od].join(" "),u=new t.Request(c.toString(),Ud(Ud({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"POST"})),e.next=28,t.fetch(u);case 28:if(f=e.sent,!n){e.next=33;break}return e.abrupt("return",f);case 33:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=37;break}throw new Error("Error "+f.status+": "+f.statusText);case 37:return e.next=39,f.text();case 39:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 41:case"end":return e.stop()}}),e,this)}))),function(e,t){return q.apply(this,arguments)})},{key:"registerExternalProfile",value:(O=Fn(xi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return xi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(s={},void 0===i.siteId){e.next=17;break}s.siteId=i.siteId,e.next=22;break;case 17:if(void 0===a.siteId){e.next=21;break}s.siteId=a.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return c=new Ed("/organizations/{organizationId}/customers/external-profile",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),(d=Ud(Ud({"Content-Type":"application/json"},this.clientConfig.headers),null==r?void 0:r.headers))["user-agent"]=[d["user-agent"],Od].join(" "),u=new t.Request(c.toString(),Ud(Ud({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"POST"})),e.next=28,t.fetch(u);case 28:if(f=e.sent,!n){e.next=33;break}return e.abrupt("return",f);case 33:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=37;break}throw new Error("Error "+f.status+": "+f.statusText);case 37:return e.next=39,f.text();case 39:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 41:case"end":return e.stop()}}),e,this)}))),function(e,t){return O.apply(this,arguments)})},{key:"getExternalProfile",value:(E=Fn(xi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return xi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(s={},void 0===i.externalId){e.next=17;break}s.externalId=i.externalId,e.next=22;break;case 17:if(void 0===a.externalId){e.next=21;break}s.externalId=a.externalId,e.next=22;break;case 21:throw new Error("Missing required query parameter: externalId");case 22:if(void 0===i.authenticationProviderId){e.next=26;break}s.authenticationProviderId=i.authenticationProviderId,e.next=31;break;case 26:if(void 0===a.authenticationProviderId){e.next=30;break}s.authenticationProviderId=a.authenticationProviderId,e.next=31;break;case 30:throw new Error("Missing required query parameter: authenticationProviderId");case 31:if(void 0===i.siteId){e.next=35;break}s.siteId=i.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}s.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return c=new Ed("/organizations/{organizationId}/customers/external-profile",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),(d=Ud(Ud({},this.clientConfig.headers),null==r?void 0:r.headers))["user-agent"]=[d["user-agent"],Od].join(" "),u=new t.Request(c.toString(),Ud(Ud({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=46,t.fetch(u);case 46:if(f=e.sent,!n){e.next=51;break}return e.abrupt("return",f);case 51:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=55;break}throw new Error("Error "+f.status+": "+f.statusText);case 55:return e.next=57,f.text();case 57:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 59:case"end":return e.stop()}}),e,this)}))),function(e,t){return E.apply(this,arguments)})},{key:"getCustomer",value:(z=Fn(xi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return xi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.customerId){e.next=16;break}o.customerId=i.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}o.customerId=a.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(s={},void 0===i.siteId){e.next=26;break}s.siteId=i.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}s.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return c=new Ed("/organizations/{organizationId}/customers/{customerId}",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),(d=Ud(Ud({},this.clientConfig.headers),null==r?void 0:r.headers))["user-agent"]=[d["user-agent"],Od].join(" "),u=new t.Request(c.toString(),Ud(Ud({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=37,t.fetch(u);case 37:if(f=e.sent,!n){e.next=42;break}return e.abrupt("return",f);case 42:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=46;break}throw new Error("Error "+f.status+": "+f.statusText);case 46:return e.next=48,f.text();case 48:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 50:case"end":return e.stop()}}),e,this)}))),function(e,t){return z.apply(this,arguments)})},{key:"updateCustomer",value:(C=Fn(xi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return xi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.customerId){e.next=16;break}o.customerId=i.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}o.customerId=a.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(s={},void 0===i.siteId){e.next=26;break}s.siteId=i.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}s.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return c=new Ed("/organizations/{organizationId}/customers/{customerId}",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),(d=Ud(Ud({"Content-Type":"application/json"},this.clientConfig.headers),null==r?void 0:r.headers))["user-agent"]=[d["user-agent"],Od].join(" "),u=new t.Request(c.toString(),Ud(Ud({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"PATCH"})),e.next=37,t.fetch(u);case 37:if(f=e.sent,!n){e.next=42;break}return e.abrupt("return",f);case 42:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=46;break}throw new Error("Error "+f.status+": "+f.statusText);case 46:return e.next=48,f.text();case 48:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 50:case"end":return e.stop()}}),e,this)}))),function(e,t){return C.apply(this,arguments)})},{key:"createCustomerAddress",value:(y=Fn(xi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return xi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.customerId){e.next=16;break}o.customerId=i.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}o.customerId=a.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(s={},void 0===i.siteId){e.next=26;break}s.siteId=i.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}s.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return c=new Ed("/organizations/{organizationId}/customers/{customerId}/addresses",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),(d=Ud(Ud({"Content-Type":"application/json"},this.clientConfig.headers),null==r?void 0:r.headers))["user-agent"]=[d["user-agent"],Od].join(" "),u=new t.Request(c.toString(),Ud(Ud({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"POST"})),e.next=37,t.fetch(u);case 37:if(f=e.sent,!n){e.next=42;break}return e.abrupt("return",f);case 42:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=46;break}throw new Error("Error "+f.status+": "+f.statusText);case 46:return e.next=48,f.text();case 48:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 50:case"end":return e.stop()}}),e,this)}))),function(e,t){return y.apply(this,arguments)})},{key:"getCustomerAddress",value:(w=Fn(xi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return xi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.customerId){e.next=16;break}o.customerId=i.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}o.customerId=a.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===i.addressName){e.next=25;break}o.addressName=i.addressName,e.next=30;break;case 25:if(void 0===a.addressName){e.next=29;break}o.addressName=a.addressName,e.next=30;break;case 29:throw new Error("Missing required path parameter: addressName");case 30:if(s={},void 0===i.siteId){e.next=35;break}s.siteId=i.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}s.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return c=new Ed("/organizations/{organizationId}/customers/{customerId}/addresses/{addressName}",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),(d=Ud(Ud({},this.clientConfig.headers),null==r?void 0:r.headers))["user-agent"]=[d["user-agent"],Od].join(" "),u=new t.Request(c.toString(),Ud(Ud({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=46,t.fetch(u);case 46:if(f=e.sent,!n){e.next=51;break}return e.abrupt("return",f);case 51:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=55;break}throw new Error("Error "+f.status+": "+f.statusText);case 55:return e.next=57,f.text();case 57:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 59:case"end":return e.stop()}}),e,this)}))),function(e,t){return w.apply(this,arguments)})},{key:"removeCustomerAddress",value:(k=Fn(xi.mark((function e(r,n){var i,a,o,s,c,d,u,f;return xi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.customerId){e.next=16;break}o.customerId=i.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}o.customerId=a.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===i.addressName){e.next=25;break}o.addressName=i.addressName,e.next=30;break;case 25:if(void 0===a.addressName){e.next=29;break}o.addressName=a.addressName,e.next=30;break;case 29:throw new Error("Missing required path parameter: addressName");case 30:if(s={},void 0===i.siteId){e.next=35;break}s.siteId=i.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}s.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return c=new Ed("/organizations/{organizationId}/customers/{customerId}/addresses/{addressName}",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),(d=Ud(Ud({},this.clientConfig.headers),null==r?void 0:r.headers))["user-agent"]=[d["user-agent"],Od].join(" "),u=new t.Request(c.toString(),Ud(Ud({},this.clientConfig.fetchOptions),{},{headers:d,method:"DELETE"})),e.next=46,t.fetch(u);case 46:if(f=e.sent,!n){e.next=51;break}return e.abrupt("return",f);case 51:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=53;break}throw new Error("Error "+f.status+": "+f.statusText);case 53:case"end":return e.stop()}}),e,this)}))),function(e,t){return k.apply(this,arguments)})},{key:"updateCustomerAddress",value:(m=Fn(xi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return xi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.customerId){e.next=16;break}o.customerId=i.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}o.customerId=a.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===i.addressName){e.next=25;break}o.addressName=i.addressName,e.next=30;break;case 25:if(void 0===a.addressName){e.next=29;break}o.addressName=a.addressName,e.next=30;break;case 29:throw new Error("Missing required path parameter: addressName");case 30:if(s={},void 0===i.siteId){e.next=35;break}s.siteId=i.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}s.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return c=new Ed("/organizations/{organizationId}/customers/{customerId}/addresses/{addressName}",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),(d=Ud(Ud({"Content-Type":"application/json"},this.clientConfig.headers),null==r?void 0:r.headers))["user-agent"]=[d["user-agent"],Od].join(" "),u=new t.Request(c.toString(),Ud(Ud({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"PATCH"})),e.next=46,t.fetch(u);case 46:if(f=e.sent,!n){e.next=51;break}return e.abrupt("return",f);case 51:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=55;break}throw new Error("Error "+f.status+": "+f.statusText);case 55:return e.next=57,f.text();case 57:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 59:case"end":return e.stop()}}),e,this)}))),function(e,t){return m.apply(this,arguments)})},{key:"getCustomerBaskets",value:(x=Fn(xi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return xi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.customerId){e.next=16;break}o.customerId=i.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}o.customerId=a.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(s={},void 0===i.siteId){e.next=26;break}s.siteId=i.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}s.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return c=new Ed("/organizations/{organizationId}/customers/{customerId}/baskets",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),(d=Ud(Ud({},this.clientConfig.headers),null==r?void 0:r.headers))["user-agent"]=[d["user-agent"],Od].join(" "),u=new t.Request(c.toString(),Ud(Ud({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=37,t.fetch(u);case 37:if(f=e.sent,!n){e.next=42;break}return e.abrupt("return",f);case 42:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=46;break}throw new Error("Error "+f.status+": "+f.statusText);case 46:return e.next=48,f.text();case 48:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 50:case"end":return e.stop()}}),e,this)}))),function(e,t){return x.apply(this,arguments)})},{key:"getCustomerOrders",value:(I=Fn(xi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return xi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.customerId){e.next=16;break}o.customerId=i.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}o.customerId=a.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(s={},void 0!==i.crossSites?s.crossSites=i.crossSites:void 0!==a.crossSites&&(s.crossSites=a.crossSites),void 0!==i.from?s.from=i.from:void 0!==a.from&&(s.from=a.from),void 0!==i.until?s.until=i.until:void 0!==a.until&&(s.until=a.until),void 0!==i.status?s.status=i.status:void 0!==a.status&&(s.status=a.status),void 0===i.siteId){e.next=30;break}s.siteId=i.siteId,e.next=35;break;case 30:if(void 0===a.siteId){e.next=34;break}s.siteId=a.siteId,e.next=35;break;case 34:throw new Error("Missing required query parameter: siteId");case 35:return void 0!==i.offset?s.offset=i.offset:void 0!==a.offset&&(s.offset=a.offset),void 0!==i.limit?s.limit=i.limit:void 0!==a.limit&&(s.limit=a.limit),c=new Ed("/organizations/{organizationId}/customers/{customerId}/orders",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),(d=Ud(Ud({},this.clientConfig.headers),null==r?void 0:r.headers))["user-agent"]=[d["user-agent"],Od].join(" "),u=new t.Request(c.toString(),Ud(Ud({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=43,t.fetch(u);case 43:if(f=e.sent,!n){e.next=48;break}return e.abrupt("return",f);case 48:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=52;break}throw new Error("Error "+f.status+": "+f.statusText);case 52:return e.next=54,f.text();case 54:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 56:case"end":return e.stop()}}),e,this)}))),function(e,t){return I.apply(this,arguments)})},{key:"updateCustomerPassword",value:(v=Fn(xi.mark((function e(r,n){var i,a,o,s,c,d,u,f;return xi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.customerId){e.next=16;break}o.customerId=i.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}o.customerId=a.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(s={},void 0===i.siteId){e.next=26;break}s.siteId=i.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}s.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return c=new Ed("/organizations/{organizationId}/customers/{customerId}/password",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),(d=Ud(Ud({"Content-Type":"application/json"},this.clientConfig.headers),null==r?void 0:r.headers))["user-agent"]=[d["user-agent"],Od].join(" "),u=new t.Request(c.toString(),Ud(Ud({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"PUT"})),e.next=37,t.fetch(u);case 37:if(f=e.sent,!n){e.next=42;break}return e.abrupt("return",f);case 42:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=44;break}throw new Error("Error "+f.status+": "+f.statusText);case 44:case"end":return e.stop()}}),e,this)}))),function(e,t){return v.apply(this,arguments)})},{key:"createCustomerPaymentInstrument",value:(b=Fn(xi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return xi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.customerId){e.next=16;break}o.customerId=i.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}o.customerId=a.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(s={},void 0===i.siteId){e.next=26;break}s.siteId=i.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}s.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return c=new Ed("/organizations/{organizationId}/customers/{customerId}/payment-instruments",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),(d=Ud(Ud({"Content-Type":"application/json"},this.clientConfig.headers),null==r?void 0:r.headers))["user-agent"]=[d["user-agent"],Od].join(" "),u=new t.Request(c.toString(),Ud(Ud({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"POST"})),e.next=37,t.fetch(u);case 37:if(f=e.sent,!n){e.next=42;break}return e.abrupt("return",f);case 42:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=46;break}throw new Error("Error "+f.status+": "+f.statusText);case 46:return e.next=48,f.text();case 48:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 50:case"end":return e.stop()}}),e,this)}))),function(e,t){return b.apply(this,arguments)})},{key:"deleteCustomerPaymentInstrument",value:(g=Fn(xi.mark((function e(r,n){var i,a,o,s,c,d,u,f;return xi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.customerId){e.next=16;break}o.customerId=i.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}o.customerId=a.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===i.paymentInstrumentId){e.next=25;break}o.paymentInstrumentId=i.paymentInstrumentId,e.next=30;break;case 25:if(void 0===a.paymentInstrumentId){e.next=29;break}o.paymentInstrumentId=a.paymentInstrumentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: paymentInstrumentId");case 30:if(s={},void 0===i.siteId){e.next=35;break}s.siteId=i.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}s.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return c=new Ed("/organizations/{organizationId}/customers/{customerId}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),(d=Ud(Ud({},this.clientConfig.headers),null==r?void 0:r.headers))["user-agent"]=[d["user-agent"],Od].join(" "),u=new t.Request(c.toString(),Ud(Ud({},this.clientConfig.fetchOptions),{},{headers:d,method:"DELETE"})),e.next=46,t.fetch(u);case 46:if(f=e.sent,!n){e.next=51;break}return e.abrupt("return",f);case 51:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=53;break}throw new Error("Error "+f.status+": "+f.statusText);case 53:case"end":return e.stop()}}),e,this)}))),function(e,t){return g.apply(this,arguments)})},{key:"getCustomerPaymentInstrument",value:(l=Fn(xi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return xi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.customerId){e.next=16;break}o.customerId=i.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}o.customerId=a.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===i.paymentInstrumentId){e.next=25;break}o.paymentInstrumentId=i.paymentInstrumentId,e.next=30;break;case 25:if(void 0===a.paymentInstrumentId){e.next=29;break}o.paymentInstrumentId=a.paymentInstrumentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: paymentInstrumentId");case 30:if(s={},void 0===i.siteId){e.next=35;break}s.siteId=i.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}s.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return c=new Ed("/organizations/{organizationId}/customers/{customerId}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),(d=Ud(Ud({},this.clientConfig.headers),null==r?void 0:r.headers))["user-agent"]=[d["user-agent"],Od].join(" "),u=new t.Request(c.toString(),Ud(Ud({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=46,t.fetch(u);case 46:if(f=e.sent,!n){e.next=51;break}return e.abrupt("return",f);case 51:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=55;break}throw new Error("Error "+f.status+": "+f.statusText);case 55:return e.next=57,f.text();case 57:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 59:case"end":return e.stop()}}),e,this)}))),function(e,t){return l.apply(this,arguments)})},{key:"getCustomerProductLists",value:(p=Fn(xi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return xi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.customerId){e.next=16;break}o.customerId=i.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}o.customerId=a.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(s={},void 0===i.siteId){e.next=26;break}s.siteId=i.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}s.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return c=new Ed("/organizations/{organizationId}/customers/{customerId}/product-lists",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),(d=Ud(Ud({},this.clientConfig.headers),null==r?void 0:r.headers))["user-agent"]=[d["user-agent"],Od].join(" "),u=new t.Request(c.toString(),Ud(Ud({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=37,t.fetch(u);case 37:if(f=e.sent,!n){e.next=42;break}return e.abrupt("return",f);case 42:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=46;break}throw new Error("Error "+f.status+": "+f.statusText);case 46:return e.next=48,f.text();case 48:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 50:case"end":return e.stop()}}),e,this)}))),function(e,t){return p.apply(this,arguments)})},{key:"createCustomerProductList",value:(h=Fn(xi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return xi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.customerId){e.next=16;break}o.customerId=i.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}o.customerId=a.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(s={},void 0===i.siteId){e.next=26;break}s.siteId=i.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}s.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return c=new Ed("/organizations/{organizationId}/customers/{customerId}/product-lists",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),(d=Ud(Ud({"Content-Type":"application/json"},this.clientConfig.headers),null==r?void 0:r.headers))["user-agent"]=[d["user-agent"],Od].join(" "),u=new t.Request(c.toString(),Ud(Ud({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"POST"})),e.next=37,t.fetch(u);case 37:if(f=e.sent,!n){e.next=42;break}return e.abrupt("return",f);case 42:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=46;break}throw new Error("Error "+f.status+": "+f.statusText);case 46:return e.next=48,f.text();case 48:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 50:case"end":return e.stop()}}),e,this)}))),function(e,t){return h.apply(this,arguments)})},{key:"deleteCustomerProductList",value:(f=Fn(xi.mark((function e(r,n){var i,a,o,s,c,d,u,f;return xi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.customerId){e.next=16;break}o.customerId=i.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}o.customerId=a.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===i.listId){e.next=25;break}o.listId=i.listId,e.next=30;break;case 25:if(void 0===a.listId){e.next=29;break}o.listId=a.listId,e.next=30;break;case 29:throw new Error("Missing required path parameter: listId");case 30:if(s={},void 0===i.siteId){e.next=35;break}s.siteId=i.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}s.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return c=new Ed("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),(d=Ud(Ud({},this.clientConfig.headers),null==r?void 0:r.headers))["user-agent"]=[d["user-agent"],Od].join(" "),u=new t.Request(c.toString(),Ud(Ud({},this.clientConfig.fetchOptions),{},{headers:d,method:"DELETE"})),e.next=46,t.fetch(u);case 46:if(f=e.sent,!n){e.next=51;break}return e.abrupt("return",f);case 51:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=53;break}throw new Error("Error "+f.status+": "+f.statusText);case 53:case"end":return e.stop()}}),e,this)}))),function(e,t){return f.apply(this,arguments)})},{key:"getCustomerProductList",value:(u=Fn(xi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return xi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.customerId){e.next=16;break}o.customerId=i.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}o.customerId=a.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===i.listId){e.next=25;break}o.listId=i.listId,e.next=30;break;case 25:if(void 0===a.listId){e.next=29;break}o.listId=a.listId,e.next=30;break;case 29:throw new Error("Missing required path parameter: listId");case 30:if(s={},void 0===i.siteId){e.next=35;break}s.siteId=i.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}s.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return c=new Ed("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),(d=Ud(Ud({},this.clientConfig.headers),null==r?void 0:r.headers))["user-agent"]=[d["user-agent"],Od].join(" "),u=new t.Request(c.toString(),Ud(Ud({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=46,t.fetch(u);case 46:if(f=e.sent,!n){e.next=51;break}return e.abrupt("return",f);case 51:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=55;break}throw new Error("Error "+f.status+": "+f.statusText);case 55:return e.next=57,f.text();case 57:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 59:case"end":return e.stop()}}),e,this)}))),function(e,t){return u.apply(this,arguments)})},{key:"updateCustomerProductList",value:(d=Fn(xi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return xi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.customerId){e.next=16;break}o.customerId=i.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}o.customerId=a.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===i.listId){e.next=25;break}o.listId=i.listId,e.next=30;break;case 25:if(void 0===a.listId){e.next=29;break}o.listId=a.listId,e.next=30;break;case 29:throw new Error("Missing required path parameter: listId");case 30:if(s={},void 0===i.siteId){e.next=35;break}s.siteId=i.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}s.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return c=new Ed("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),(d=Ud(Ud({"Content-Type":"application/json"},this.clientConfig.headers),null==r?void 0:r.headers))["user-agent"]=[d["user-agent"],Od].join(" "),u=new t.Request(c.toString(),Ud(Ud({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"PATCH"})),e.next=46,t.fetch(u);case 46:if(f=e.sent,!n){e.next=51;break}return e.abrupt("return",f);case 51:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=55;break}throw new Error("Error "+f.status+": "+f.statusText);case 55:return e.next=57,f.text();case 57:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 59:case"end":return e.stop()}}),e,this)}))),function(e,t){return d.apply(this,arguments)})},{key:"createCustomerProductListItem",value:(c=Fn(xi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return xi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.customerId){e.next=16;break}o.customerId=i.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}o.customerId=a.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===i.listId){e.next=25;break}o.listId=i.listId,e.next=30;break;case 25:if(void 0===a.listId){e.next=29;break}o.listId=a.listId,e.next=30;break;case 29:throw new Error("Missing required path parameter: listId");case 30:if(s={},void 0===i.siteId){e.next=35;break}s.siteId=i.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}s.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return c=new Ed("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}/items",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),(d=Ud(Ud({"Content-Type":"application/json"},this.clientConfig.headers),null==r?void 0:r.headers))["user-agent"]=[d["user-agent"],Od].join(" "),u=new t.Request(c.toString(),Ud(Ud({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"POST"})),e.next=46,t.fetch(u);case 46:if(f=e.sent,!n){e.next=51;break}return e.abrupt("return",f);case 51:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=55;break}throw new Error("Error "+f.status+": "+f.statusText);case 55:return e.next=57,f.text();case 57:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 59:case"end":return e.stop()}}),e,this)}))),function(e,t){return c.apply(this,arguments)})},{key:"deleteCustomerProductListItem",value:(s=Fn(xi.mark((function e(r,n){var i,a,o,s,c,d,u,f;return xi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.customerId){e.next=16;break}o.customerId=i.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}o.customerId=a.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===i.listId){e.next=25;break}o.listId=i.listId,e.next=30;break;case 25:if(void 0===a.listId){e.next=29;break}o.listId=a.listId,e.next=30;break;case 29:throw new Error("Missing required path parameter: listId");case 30:if(void 0===i.itemId){e.next=34;break}o.itemId=i.itemId,e.next=39;break;case 34:if(void 0===a.itemId){e.next=38;break}o.itemId=a.itemId,e.next=39;break;case 38:throw new Error("Missing required path parameter: itemId");case 39:if(s={},void 0===i.siteId){e.next=44;break}s.siteId=i.siteId,e.next=49;break;case 44:if(void 0===a.siteId){e.next=48;break}s.siteId=a.siteId,e.next=49;break;case 48:throw new Error("Missing required query parameter: siteId");case 49:return c=new Ed("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),(d=Ud(Ud({},this.clientConfig.headers),null==r?void 0:r.headers))["user-agent"]=[d["user-agent"],Od].join(" "),u=new t.Request(c.toString(),Ud(Ud({},this.clientConfig.fetchOptions),{},{headers:d,method:"DELETE"})),e.next=55,t.fetch(u);case 55:if(f=e.sent,!n){e.next=60;break}return e.abrupt("return",f);case 60:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=62;break}throw new Error("Error "+f.status+": "+f.statusText);case 62:case"end":return e.stop()}}),e,this)}))),function(e,t){return s.apply(this,arguments)})},{key:"getCustomerProductListItem",value:(o=Fn(xi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return xi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.customerId){e.next=16;break}o.customerId=i.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}o.customerId=a.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===i.listId){e.next=25;break}o.listId=i.listId,e.next=30;break;case 25:if(void 0===a.listId){e.next=29;break}o.listId=a.listId,e.next=30;break;case 29:throw new Error("Missing required path parameter: listId");case 30:if(void 0===i.itemId){e.next=34;break}o.itemId=i.itemId,e.next=39;break;case 34:if(void 0===a.itemId){e.next=38;break}o.itemId=a.itemId,e.next=39;break;case 38:throw new Error("Missing required path parameter: itemId");case 39:if(s={},void 0===i.siteId){e.next=44;break}s.siteId=i.siteId,e.next=49;break;case 44:if(void 0===a.siteId){e.next=48;break}s.siteId=a.siteId,e.next=49;break;case 48:throw new Error("Missing required query parameter: siteId");case 49:return c=new Ed("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),(d=Ud(Ud({},this.clientConfig.headers),null==r?void 0:r.headers))["user-agent"]=[d["user-agent"],Od].join(" "),u=new t.Request(c.toString(),Ud(Ud({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=55,t.fetch(u);case 55:if(f=e.sent,!n){e.next=60;break}return e.abrupt("return",f);case 60:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=64;break}throw new Error("Error "+f.status+": "+f.statusText);case 64:return e.next=66,f.text();case 66:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 68:case"end":return e.stop()}}),e,this)}))),function(e,t){return o.apply(this,arguments)})},{key:"updateCustomerProductListItem",value:(a=Fn(xi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return xi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.customerId){e.next=16;break}o.customerId=i.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}o.customerId=a.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===i.listId){e.next=25;break}o.listId=i.listId,e.next=30;break;case 25:if(void 0===a.listId){e.next=29;break}o.listId=a.listId,e.next=30;break;case 29:throw new Error("Missing required path parameter: listId");case 30:if(void 0===i.itemId){e.next=34;break}o.itemId=i.itemId,e.next=39;break;case 34:if(void 0===a.itemId){e.next=38;break}o.itemId=a.itemId,e.next=39;break;case 38:throw new Error("Missing required path parameter: itemId");case 39:if(s={},void 0===i.siteId){e.next=44;break}s.siteId=i.siteId,e.next=49;break;case 44:if(void 0===a.siteId){e.next=48;break}s.siteId=a.siteId,e.next=49;break;case 48:throw new Error("Missing required query parameter: siteId");case 49:return c=new Ed("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),(d=Ud(Ud({"Content-Type":"application/json"},this.clientConfig.headers),null==r?void 0:r.headers))["user-agent"]=[d["user-agent"],Od].join(" "),u=new t.Request(c.toString(),Ud(Ud({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"PATCH"})),e.next=55,t.fetch(u);case 55:if(f=e.sent,!n){e.next=60;break}return e.abrupt("return",f);case 60:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=64;break}throw new Error("Error "+f.status+": "+f.statusText);case 64:return e.next=66,f.text();case 66:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 68:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"getPublicProductListsBySearchTerm",value:(i=Fn(xi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return xi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(s={},void 0!==i.email?s.email=i.email:void 0!==a.email&&(s.email=a.email),void 0!==i.firstName?s.firstName=i.firstName:void 0!==a.firstName&&(s.firstName=a.firstName),void 0!==i.lastName?s.lastName=i.lastName:void 0!==a.lastName&&(s.lastName=a.lastName),void 0===i.siteId){e.next=20;break}s.siteId=i.siteId,e.next=25;break;case 20:if(void 0===a.siteId){e.next=24;break}s.siteId=a.siteId,e.next=25;break;case 24:throw new Error("Missing required query parameter: siteId");case 25:return c=new Ed("/organizations/{organizationId}/product-lists",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),(d=Ud(Ud({},this.clientConfig.headers),null==r?void 0:r.headers))["user-agent"]=[d["user-agent"],Od].join(" "),u=new t.Request(c.toString(),Ud(Ud({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=31,t.fetch(u);case 31:if(f=e.sent,!n){e.next=36;break}return e.abrupt("return",f);case 36:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=40;break}throw new Error("Error "+f.status+": "+f.statusText);case 40:return e.next=42,f.text();case 42:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 44:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"getPublicProductList",value:(n=Fn(xi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return xi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.listId){e.next=16;break}o.listId=i.listId,e.next=21;break;case 16:if(void 0===a.listId){e.next=20;break}o.listId=a.listId,e.next=21;break;case 20:throw new Error("Missing required path parameter: listId");case 21:if(s={},void 0===i.siteId){e.next=26;break}s.siteId=i.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}s.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return c=new Ed("/organizations/{organizationId}/product-lists/{listId}",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),(d=Ud(Ud({},this.clientConfig.headers),null==r?void 0:r.headers))["user-agent"]=[d["user-agent"],Od].join(" "),u=new t.Request(c.toString(),Ud(Ud({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=37,t.fetch(u);case 37:if(f=e.sent,!n){e.next=42;break}return e.abrupt("return",f);case 42:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=46;break}throw new Error("Error "+f.status+": "+f.statusText);case 46:return e.next=48,f.text();case 48:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 50:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"getProductListItem",value:(r=Fn(xi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return xi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.listId){e.next=16;break}o.listId=i.listId,e.next=21;break;case 16:if(void 0===a.listId){e.next=20;break}o.listId=a.listId,e.next=21;break;case 20:throw new Error("Missing required path parameter: listId");case 21:if(void 0===i.itemId){e.next=25;break}o.itemId=i.itemId,e.next=30;break;case 25:if(void 0===a.itemId){e.next=29;break}o.itemId=a.itemId,e.next=30;break;case 29:throw new Error("Missing required path parameter: itemId");case 30:if(s={},void 0===i.siteId){e.next=35;break}s.siteId=i.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}s.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return c=new Ed("/organizations/{organizationId}/product-lists/{listId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),(d=Ud(Ud({},this.clientConfig.headers),null==r?void 0:r.headers))["user-agent"]=[d["user-agent"],Od].join(" "),u=new t.Request(c.toString(),Ud(Ud({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=46,t.fetch(u);case 46:if(f=e.sent,!n){e.next=51;break}return e.abrupt("return",f);case 51:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=55;break}throw new Error("Error "+f.status+": "+f.statusText);case 55:return e.next=57,f.text();case 57:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 59:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})}]),e}();function Bd(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 Nd(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Bd(Object(r),!0).forEach((function(t){Vn(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Bd(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}Vn(Ad,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/customer/shopper-customers/{version}");var _d=function(){function e(t){Gn(this,e),Vn(this,"clientConfig",void 0);var r=Nd({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new bo(r)}var r,n;return Yn(e,[{key:"retrieveResults",value:(n=Fn(xi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return xi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.channelId){e.next=16;break}o.channelId=i.channelId,e.next=21;break;case 16:if(void 0===a.channelId){e.next=20;break}o.channelId=a.channelId,e.next=21;break;case 20:throw new Error("Missing required path parameter: channelId");case 21:if(s={},void 0===i.locale){e.next=26;break}s.locale=i.locale,e.next=31;break;case 26:if(void 0===a.locale){e.next=30;break}s.locale=a.locale,e.next=31;break;case 30:throw new Error("Missing required query parameter: locale");case 31:return void 0!==i.offset?s.offset=i.offset:void 0!==a.offset&&(s.offset=a.offset),void 0!==i.limit?s.limit=i.limit:void 0!==a.limit&&(s.limit=a.limit),c=new Ed("/organizations/{organizationId}/channels/{channelId}/results",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),(d=Nd(Nd({"Content-Type":"application/json"},this.clientConfig.headers),null==r?void 0:r.headers))["user-agent"]=[d["user-agent"],Od].join(" "),u=new t.Request(c.toString(),Nd(Nd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"POST"})),e.next=39,t.fetch(u);case 39:if(f=e.sent,!n){e.next=44;break}return e.abrupt("return",f);case 44:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=48;break}throw new Error("Error "+f.status+": "+f.statusText);case 48:return e.next=50,f.text();case 50:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 52:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"getSuggestions",value:(r=Fn(xi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return xi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.channelId){e.next=16;break}o.channelId=i.channelId,e.next=21;break;case 16:if(void 0===a.channelId){e.next=20;break}o.channelId=a.channelId,e.next=21;break;case 20:throw new Error("Missing required path parameter: channelId");case 21:if(s={},void 0===i.suggestionTypes){e.next=26;break}s.suggestionTypes=i.suggestionTypes,e.next=31;break;case 26:if(void 0===a.suggestionTypes){e.next=30;break}s.suggestionTypes=a.suggestionTypes,e.next=31;break;case 30:throw new Error("Missing required query parameter: suggestionTypes");case 31:if(void 0!==i.searchText?s.searchText=i.searchText:void 0!==a.searchText&&(s.searchText=a.searchText),void 0===i.locale){e.next=36;break}s.locale=i.locale,e.next=41;break;case 36:if(void 0===a.locale){e.next=40;break}s.locale=a.locale,e.next=41;break;case 40:throw new Error("Missing required query parameter: locale");case 41:return c=new Ed("/organizations/{organizationId}/channels/{channelId}/suggestions",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),(d=Nd(Nd({},this.clientConfig.headers),null==r?void 0:r.headers))["user-agent"]=[d["user-agent"],Od].join(" "),u=new t.Request(c.toString(),Nd(Nd({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=47,t.fetch(u);case 47:if(f=e.sent,!n){e.next=52;break}return e.abrupt("return",f);case 52:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=56;break}throw new Error("Error "+f.status+": "+f.statusText);case 56:return e.next=58,f.text();case 58:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 60:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})}]),e}();function Ld(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 Dd(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ld(Object(r),!0).forEach((function(t){Vn(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ld(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}Vn(_d,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/discovery/query/{version}");var Jd=function(){function e(t){Gn(this,e),Vn(this,"clientConfig",void 0);var r=Dd({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new bo(r)}var r;return Yn(e,[{key:"getGiftCertificate",value:(r=Fn(xi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return xi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(s={},void 0===i.siteId){e.next=17;break}s.siteId=i.siteId,e.next=22;break;case 17:if(void 0===a.siteId){e.next=21;break}s.siteId=a.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return c=new Ed("/organizations/{organizationId}/gift-certificate",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),(d=Dd(Dd({"Content-Type":"application/json"},this.clientConfig.headers),null==r?void 0:r.headers))["user-agent"]=[d["user-agent"],Od].join(" "),u=new t.Request(c.toString(),Dd(Dd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"POST"})),e.next=28,t.fetch(u);case 28:if(f=e.sent,!n){e.next=33;break}return e.abrupt("return",f);case 33:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=37;break}throw new Error("Error "+f.status+": "+f.statusText);case 37:return e.next=39,f.text();case 39:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 41:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})}]),e}();function Fd(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 Gd(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Fd(Object(r),!0).forEach((function(t){Vn(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Fd(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}Vn(Jd,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/pricing/shopper-gift-certificates/{version}");var Hd=function(){function e(t){Gn(this,e),Vn(this,"clientConfig",void 0);var r=Gd({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new bo(r)}var r,n,i,a,o,s,c,d,u,f,h,p,l;return Yn(e,[{key:"retrieveCredQualityUserInfo",value:(l=Fn(xi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return xi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(s={},void 0===i.username){e.next=17;break}s.username=i.username,e.next=22;break;case 17:if(void 0===a.username){e.next=21;break}s.username=a.username,e.next=22;break;case 21:throw new Error("Missing required query parameter: username");case 22:return c=new Ed("/organizations/{organizationId}/cred-qual/user",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),(d=Gd(Gd({},this.clientConfig.headers),null==r?void 0:r.headers))["user-agent"]=[d["user-agent"],Od].join(" "),u=new t.Request(c.toString(),Gd(Gd({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=28,t.fetch(u);case 28:if(f=e.sent,!n){e.next=33;break}return e.abrupt("return",f);case 33:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=37;break}throw new Error("Error "+f.status+": "+f.statusText);case 37:return e.next=39,f.text();case 39:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 41:case"end":return e.stop()}}),e,this)}))),function(e,t){return l.apply(this,arguments)})},{key:"authenticateCustomer",value:(p=Fn(xi.mark((function e(r,n){var i,a,o,s,c,d,u,f;return xi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return s={},c=new Ed("/organizations/{organizationId}/oauth2/login",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),(d=Gd(Gd({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==r?void 0:r.headers))["user-agent"]=[d["user-agent"],Od].join(" "),u=new t.Request(c.toString(),Gd(Gd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"POST"})),e.next=19,t.fetch(u);case 19:if(f=e.sent,!n){e.next=24;break}return e.abrupt("return",f);case 24:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=26;break}throw new Error("Error "+f.status+": "+f.statusText);case 26:case"end":return e.stop()}}),e,this)}))),function(e,t){return p.apply(this,arguments)})},{key:"authorizePasswordlessCustomer",value:(h=Fn(xi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return xi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return s={},c=new Ed("/organizations/{organizationId}/oauth2/passwordless/login",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),(d=Gd(Gd({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==r?void 0:r.headers))["user-agent"]=[d["user-agent"],Od].join(" "),u=new t.Request(c.toString(),Gd(Gd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"POST"})),e.next=19,t.fetch(u);case 19:if(f=e.sent,!n){e.next=24;break}return e.abrupt("return",f);case 24:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=28;break}throw new Error("Error "+f.status+": "+f.statusText);case 28:return e.next=30,f.text();case 30:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 32:case"end":return e.stop()}}),e,this)}))),function(e,t){return h.apply(this,arguments)})},{key:"logoutCustomer",value:(f=Fn(xi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return xi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(s={},void 0===i.client_id){e.next=17;break}s.client_id=i.client_id,e.next=22;break;case 17:if(void 0===a.client_id){e.next=21;break}s.client_id=a.client_id,e.next=22;break;case 21:throw new Error("Missing required query parameter: client_id");case 22:if(void 0===i.refresh_token){e.next=26;break}s.refresh_token=i.refresh_token,e.next=31;break;case 26:if(void 0===a.refresh_token){e.next=30;break}s.refresh_token=a.refresh_token,e.next=31;break;case 30:throw new Error("Missing required query parameter: refresh_token");case 31:return void 0!==i.channel_id?s.channel_id=i.channel_id:void 0!==a.channel_id&&(s.channel_id=a.channel_id),c=new Ed("/organizations/{organizationId}/oauth2/logout",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),(d=Gd(Gd({},this.clientConfig.headers),null==r?void 0:r.headers))["user-agent"]=[d["user-agent"],Od].join(" "),u=new t.Request(c.toString(),Gd(Gd({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=38,t.fetch(u);case 38:if(f=e.sent,!n){e.next=43;break}return e.abrupt("return",f);case 43:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=47;break}throw new Error("Error "+f.status+": "+f.statusText);case 47:return e.next=49,f.text();case 49:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return f.apply(this,arguments)})},{key:"authorizeCustomer",value:(u=Fn(xi.mark((function e(r,n){var i,a,o,s,c,d,u,f;return xi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(s={},void 0===i.redirect_uri){e.next=17;break}s.redirect_uri=i.redirect_uri,e.next=22;break;case 17:if(void 0===a.redirect_uri){e.next=21;break}s.redirect_uri=a.redirect_uri,e.next=22;break;case 21:throw new Error("Missing required query parameter: redirect_uri");case 22:if(void 0===i.response_type){e.next=26;break}s.response_type=i.response_type,e.next=31;break;case 26:if(void 0===a.response_type){e.next=30;break}s.response_type=a.response_type,e.next=31;break;case 30:throw new Error("Missing required query parameter: response_type");case 31:if(void 0===i.client_id){e.next=35;break}s.client_id=i.client_id,e.next=40;break;case 35:if(void 0===a.client_id){e.next=39;break}s.client_id=a.client_id,e.next=40;break;case 39:throw new Error("Missing required query parameter: client_id");case 40:if(void 0!==i.scope?s.scope=i.scope:void 0!==a.scope&&(s.scope=a.scope),void 0!==i.state?s.state=i.state:void 0!==a.state&&(s.state=a.state),void 0!==i.usid?s.usid=i.usid:void 0!==a.usid&&(s.usid=a.usid),void 0!==i.hint?s.hint=i.hint:void 0!==a.hint&&(s.hint=a.hint),void 0!==i.channel_id?s.channel_id=i.channel_id:void 0!==a.channel_id&&(s.channel_id=a.channel_id),void 0===i.code_challenge){e.next=49;break}s.code_challenge=i.code_challenge,e.next=54;break;case 49:if(void 0===a.code_challenge){e.next=53;break}s.code_challenge=a.code_challenge,e.next=54;break;case 53:throw new Error("Missing required query parameter: code_challenge");case 54:return c=new Ed("/organizations/{organizationId}/oauth2/authorize",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),(d=Gd(Gd({},this.clientConfig.headers),null==r?void 0:r.headers))["user-agent"]=[d["user-agent"],Od].join(" "),u=new t.Request(c.toString(),Gd(Gd({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=60,t.fetch(u);case 60:if(f=e.sent,!n){e.next=65;break}return e.abrupt("return",f);case 65:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=67;break}throw new Error("Error "+f.status+": "+f.statusText);case 67:case"end":return e.stop()}}),e,this)}))),function(e,t){return u.apply(this,arguments)})},{key:"getAccessToken",value:(d=Fn(xi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return xi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return s={},c=new Ed("/organizations/{organizationId}/oauth2/token",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),(d=Gd(Gd({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==r?void 0:r.headers))["user-agent"]=[d["user-agent"],Od].join(" "),u=new t.Request(c.toString(),Gd(Gd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"POST"})),e.next=19,t.fetch(u);case 19:if(f=e.sent,!n){e.next=24;break}return e.abrupt("return",f);case 24:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=28;break}throw new Error("Error "+f.status+": "+f.statusText);case 28:return e.next=30,f.text();case 30:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 32:case"end":return e.stop()}}),e,this)}))),function(e,t){return d.apply(this,arguments)})},{key:"getTrustedSystemAccessToken",value:(c=Fn(xi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return xi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return s={},c=new Ed("/organizations/{organizationId}/oauth2/trusted-system/token",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),(d=Gd(Gd({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==r?void 0:r.headers))["user-agent"]=[d["user-agent"],Od].join(" "),u=new t.Request(c.toString(),Gd(Gd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"POST"})),e.next=19,t.fetch(u);case 19:if(f=e.sent,!n){e.next=24;break}return e.abrupt("return",f);case 24:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=28;break}throw new Error("Error "+f.status+": "+f.statusText);case 28:return e.next=30,f.text();case 30:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 32:case"end":return e.stop()}}),e,this)}))),function(e,t){return c.apply(this,arguments)})},{key:"getPasswordLessAccessToken",value:(s=Fn(xi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return xi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return s={},c=new Ed("/organizations/{organizationId}/oauth2/passwordless/token",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),(d=Gd(Gd({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==r?void 0:r.headers))["user-agent"]=[d["user-agent"],Od].join(" "),u=new t.Request(c.toString(),Gd(Gd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"POST"})),e.next=19,t.fetch(u);case 19:if(f=e.sent,!n){e.next=24;break}return e.abrupt("return",f);case 24:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=28;break}throw new Error("Error "+f.status+": "+f.statusText);case 28:return e.next=30,f.text();case 30:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 32:case"end":return e.stop()}}),e,this)}))),function(e,t){return s.apply(this,arguments)})},{key:"revokeToken",value:(o=Fn(xi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return xi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return s={},c=new Ed("/organizations/{organizationId}/oauth2/revoke",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),(d=Gd(Gd({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==r?void 0:r.headers))["user-agent"]=[d["user-agent"],Od].join(" "),u=new t.Request(c.toString(),Gd(Gd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"POST"})),e.next=19,t.fetch(u);case 19:if(f=e.sent,!n){e.next=24;break}return e.abrupt("return",f);case 24:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=28;break}throw new Error("Error "+f.status+": "+f.statusText);case 28:return e.next=30,f.text();case 30:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 32:case"end":return e.stop()}}),e,this)}))),function(e,t){return o.apply(this,arguments)})},{key:"introspectToken",value:(a=Fn(xi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return xi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return s={},c=new Ed("/organizations/{organizationId}/oauth2/introspect",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),(d=Gd(Gd({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==r?void 0:r.headers))["user-agent"]=[d["user-agent"],Od].join(" "),u=new t.Request(c.toString(),Gd(Gd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"POST"})),e.next=19,t.fetch(u);case 19:if(f=e.sent,!n){e.next=24;break}return e.abrupt("return",f);case 24:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=28;break}throw new Error("Error "+f.status+": "+f.statusText);case 28:return e.next=30,f.text();case 30:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 32:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"getUserInfo",value:(i=Fn(xi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return xi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return s={},void 0!==i.channel_id?s.channel_id=i.channel_id:void 0!==a.channel_id&&(s.channel_id=a.channel_id),c=new Ed("/organizations/{organizationId}/oauth2/userinfo",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),(d=Gd(Gd({},this.clientConfig.headers),null==r?void 0:r.headers))["user-agent"]=[d["user-agent"],Od].join(" "),u=new t.Request(c.toString(),Gd(Gd({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=20,t.fetch(u);case 20:if(f=e.sent,!n){e.next=25;break}return e.abrupt("return",f);case 25:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=29;break}throw new Error("Error "+f.status+": "+f.statusText);case 29:return e.next=31,f.text();case 31:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 33:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"getWellknownOpenidConfiguration",value:(n=Fn(xi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return xi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return s={},c=new Ed("/organizations/{organizationId}/oauth2/.well-known/openid-configuration",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),(d=Gd(Gd({},this.clientConfig.headers),null==r?void 0:r.headers))["user-agent"]=[d["user-agent"],Od].join(" "),u=new t.Request(c.toString(),Gd(Gd({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=19,t.fetch(u);case 19:if(f=e.sent,!n){e.next=24;break}return e.abrupt("return",f);case 24:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=28;break}throw new Error("Error "+f.status+": "+f.statusText);case 28:return e.next=30,f.text();case 30:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 32:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"getJwksUri",value:(r=Fn(xi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return xi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return s={},c=new Ed("/organizations/{organizationId}/oauth2/jwks",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),(d=Gd(Gd({},this.clientConfig.headers),null==r?void 0:r.headers))["user-agent"]=[d["user-agent"],Od].join(" "),u=new t.Request(c.toString(),Gd(Gd({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=19,t.fetch(u);case 19:if(f=e.sent,!n){e.next=24;break}return e.abrupt("return",f);case 24:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=28;break}throw new Error("Error "+f.status+": "+f.statusText);case 28:return e.next=30,f.text();case 30:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 32:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})}]),e}();function Yd(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 Vd(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Yd(Object(r),!0).forEach((function(t){Vn(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Yd(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}Vn(Hd,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/shopper/auth/{version}");var Wd=function(){function e(t){Gn(this,e),Vn(this,"clientConfig",void 0);var r=Vd({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new bo(r)}var r,n,i,a,o,s,c;return Yn(e,[{key:"createOrder",value:(c=Fn(xi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return xi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(s={},void 0===i.siteId){e.next=17;break}s.siteId=i.siteId,e.next=22;break;case 17:if(void 0===a.siteId){e.next=21;break}s.siteId=a.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return void 0!==i.locale?s.locale=i.locale:void 0!==a.locale&&(s.locale=a.locale),c=new Ed("/organizations/{organizationId}/orders",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),(d=Vd(Vd({"Content-Type":"application/json"},this.clientConfig.headers),null==r?void 0:r.headers))["user-agent"]=[d["user-agent"],Od].join(" "),u=new t.Request(c.toString(),Vd(Vd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"POST"})),e.next=29,t.fetch(u);case 29:if(f=e.sent,!n){e.next=34;break}return e.abrupt("return",f);case 34:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=38;break}throw new Error("Error "+f.status+": "+f.statusText);case 38:return e.next=40,f.text();case 40:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 42:case"end":return e.stop()}}),e,this)}))),function(e,t){return c.apply(this,arguments)})},{key:"getOrder",value:(s=Fn(xi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return xi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.orderNo){e.next=16;break}o.orderNo=i.orderNo,e.next=21;break;case 16:if(void 0===a.orderNo){e.next=20;break}o.orderNo=a.orderNo,e.next=21;break;case 20:throw new Error("Missing required path parameter: orderNo");case 21:if(s={},void 0===i.siteId){e.next=26;break}s.siteId=i.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}s.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==i.locale?s.locale=i.locale:void 0!==a.locale&&(s.locale=a.locale),c=new Ed("/organizations/{organizationId}/orders/{orderNo}",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),(d=Vd(Vd({},this.clientConfig.headers),null==r?void 0:r.headers))["user-agent"]=[d["user-agent"],Od].join(" "),u=new t.Request(c.toString(),Vd(Vd({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=38,t.fetch(u);case 38:if(f=e.sent,!n){e.next=43;break}return e.abrupt("return",f);case 43:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=47;break}throw new Error("Error "+f.status+": "+f.statusText);case 47:return e.next=49,f.text();case 49:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return s.apply(this,arguments)})},{key:"createPaymentInstrumentForOrder",value:(o=Fn(xi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return xi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.orderNo){e.next=16;break}o.orderNo=i.orderNo,e.next=21;break;case 16:if(void 0===a.orderNo){e.next=20;break}o.orderNo=a.orderNo,e.next=21;break;case 20:throw new Error("Missing required path parameter: orderNo");case 21:if(s={},void 0===i.siteId){e.next=26;break}s.siteId=i.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}s.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==i.locale?s.locale=i.locale:void 0!==a.locale&&(s.locale=a.locale),c=new Ed("/organizations/{organizationId}/orders/{orderNo}/payment-instruments",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),(d=Vd(Vd({"Content-Type":"application/json"},this.clientConfig.headers),null==r?void 0:r.headers))["user-agent"]=[d["user-agent"],Od].join(" "),u=new t.Request(c.toString(),Vd(Vd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"POST"})),e.next=38,t.fetch(u);case 38:if(f=e.sent,!n){e.next=43;break}return e.abrupt("return",f);case 43:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=47;break}throw new Error("Error "+f.status+": "+f.statusText);case 47:return e.next=49,f.text();case 49:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return o.apply(this,arguments)})},{key:"removePaymentInstrumentFromOrder",value:(a=Fn(xi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return xi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.orderNo){e.next=16;break}o.orderNo=i.orderNo,e.next=21;break;case 16:if(void 0===a.orderNo){e.next=20;break}o.orderNo=a.orderNo,e.next=21;break;case 20:throw new Error("Missing required path parameter: orderNo");case 21:if(void 0===i.paymentInstrumentId){e.next=25;break}o.paymentInstrumentId=i.paymentInstrumentId,e.next=30;break;case 25:if(void 0===a.paymentInstrumentId){e.next=29;break}o.paymentInstrumentId=a.paymentInstrumentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: paymentInstrumentId");case 30:if(s={},void 0===i.siteId){e.next=35;break}s.siteId=i.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}s.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==i.locale?s.locale=i.locale:void 0!==a.locale&&(s.locale=a.locale),c=new Ed("/organizations/{organizationId}/orders/{orderNo}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),(d=Vd(Vd({},this.clientConfig.headers),null==r?void 0:r.headers))["user-agent"]=[d["user-agent"],Od].join(" "),u=new t.Request(c.toString(),Vd(Vd({},this.clientConfig.fetchOptions),{},{headers:d,method:"DELETE"})),e.next=47,t.fetch(u);case 47:if(f=e.sent,!n){e.next=52;break}return e.abrupt("return",f);case 52:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=56;break}throw new Error("Error "+f.status+": "+f.statusText);case 56:return e.next=58,f.text();case 58:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 60:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"updatePaymentInstrumentForOrder",value:(i=Fn(xi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return xi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.orderNo){e.next=16;break}o.orderNo=i.orderNo,e.next=21;break;case 16:if(void 0===a.orderNo){e.next=20;break}o.orderNo=a.orderNo,e.next=21;break;case 20:throw new Error("Missing required path parameter: orderNo");case 21:if(void 0===i.paymentInstrumentId){e.next=25;break}o.paymentInstrumentId=i.paymentInstrumentId,e.next=30;break;case 25:if(void 0===a.paymentInstrumentId){e.next=29;break}o.paymentInstrumentId=a.paymentInstrumentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: paymentInstrumentId");case 30:if(s={},void 0===i.siteId){e.next=35;break}s.siteId=i.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}s.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==i.locale?s.locale=i.locale:void 0!==a.locale&&(s.locale=a.locale),c=new Ed("/organizations/{organizationId}/orders/{orderNo}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),(d=Vd(Vd({"Content-Type":"application/json"},this.clientConfig.headers),null==r?void 0:r.headers))["user-agent"]=[d["user-agent"],Od].join(" "),u=new t.Request(c.toString(),Vd(Vd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"PATCH"})),e.next=47,t.fetch(u);case 47:if(f=e.sent,!n){e.next=52;break}return e.abrupt("return",f);case 52:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=56;break}throw new Error("Error "+f.status+": "+f.statusText);case 56:return e.next=58,f.text();case 58:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 60:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"getPaymentMethodsForOrder",value:(n=Fn(xi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return xi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.orderNo){e.next=16;break}o.orderNo=i.orderNo,e.next=21;break;case 16:if(void 0===a.orderNo){e.next=20;break}o.orderNo=a.orderNo,e.next=21;break;case 20:throw new Error("Missing required path parameter: orderNo");case 21:if(s={},void 0===i.siteId){e.next=26;break}s.siteId=i.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}s.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==i.locale?s.locale=i.locale:void 0!==a.locale&&(s.locale=a.locale),c=new Ed("/organizations/{organizationId}/orders/{orderNo}/payment-methods",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),(d=Vd(Vd({},this.clientConfig.headers),null==r?void 0:r.headers))["user-agent"]=[d["user-agent"],Od].join(" "),u=new t.Request(c.toString(),Vd(Vd({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=38,t.fetch(u);case 38:if(f=e.sent,!n){e.next=43;break}return e.abrupt("return",f);case 43:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=47;break}throw new Error("Error "+f.status+": "+f.statusText);case 47:return e.next=49,f.text();case 49:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"getTaxesFromOrder",value:(r=Fn(xi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return xi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.orderNo){e.next=16;break}o.orderNo=i.orderNo,e.next=21;break;case 16:if(void 0===a.orderNo){e.next=20;break}o.orderNo=a.orderNo,e.next=21;break;case 20:throw new Error("Missing required path parameter: orderNo");case 21:if(s={},void 0===i.siteId){e.next=26;break}s.siteId=i.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}s.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return c=new Ed("/organizations/{organizationId}/orders/{orderNo}/taxes",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),(d=Vd(Vd({},this.clientConfig.headers),null==r?void 0:r.headers))["user-agent"]=[d["user-agent"],Od].join(" "),u=new t.Request(c.toString(),Vd(Vd({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=37,t.fetch(u);case 37:if(f=e.sent,!n){e.next=42;break}return e.abrupt("return",f);case 42:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=46;break}throw new Error("Error "+f.status+": "+f.statusText);case 46:return e.next=48,f.text();case 48:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 50:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})}]),e}();function $d(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 Kd(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?$d(Object(r),!0).forEach((function(t){Vn(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$d(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}Vn(Wd,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/checkout/shopper-orders/{version}");var Qd=function(){function e(t){Gn(this,e),Vn(this,"clientConfig",void 0);var r=Kd({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new bo(r)}var r,n,i,a;return Yn(e,[{key:"getProducts",value:(a=Fn(xi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return xi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(s={},void 0===i.ids){e.next=17;break}s.ids=i.ids,e.next=22;break;case 17:if(void 0===a.ids){e.next=21;break}s.ids=a.ids,e.next=22;break;case 21:throw new Error("Missing required query parameter: ids");case 22:if(void 0!==i.inventoryIds?s.inventoryIds=i.inventoryIds:void 0!==a.inventoryIds&&(s.inventoryIds=a.inventoryIds),void 0!==i.currency?s.currency=i.currency:void 0!==a.currency&&(s.currency=a.currency),void 0!==i.locale?s.locale=i.locale:void 0!==a.locale&&(s.locale=a.locale),void 0!==i.allImages?s.allImages=i.allImages:void 0!==a.allImages&&(s.allImages=a.allImages),void 0!==i.perPricebook?s.perPricebook=i.perPricebook:void 0!==a.perPricebook&&(s.perPricebook=a.perPricebook),void 0===i.siteId){e.next=31;break}s.siteId=i.siteId,e.next=36;break;case 31:if(void 0===a.siteId){e.next=35;break}s.siteId=a.siteId,e.next=36;break;case 35:throw new Error("Missing required query parameter: siteId");case 36:return c=new Ed("/organizations/{organizationId}/products",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),(d=Kd(Kd({},this.clientConfig.headers),null==r?void 0:r.headers))["user-agent"]=[d["user-agent"],Od].join(" "),u=new t.Request(c.toString(),Kd(Kd({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=42,t.fetch(u);case 42:if(f=e.sent,!n){e.next=47;break}return e.abrupt("return",f);case 47:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=51;break}throw new Error("Error "+f.status+": "+f.statusText);case 51:return e.next=53,f.text();case 53:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 55:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"getProduct",value:(i=Fn(xi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return xi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.id){e.next=16;break}o.id=i.id,e.next=21;break;case 16:if(void 0===a.id){e.next=20;break}o.id=a.id,e.next=21;break;case 20:throw new Error("Missing required path parameter: id");case 21:if(s={},void 0!==i.inventoryIds?s.inventoryIds=i.inventoryIds:void 0!==a.inventoryIds&&(s.inventoryIds=a.inventoryIds),void 0!==i.currency?s.currency=i.currency:void 0!==a.currency&&(s.currency=a.currency),void 0!==i.locale?s.locale=i.locale:void 0!==a.locale&&(s.locale=a.locale),void 0!==i.allImages?s.allImages=i.allImages:void 0!==a.allImages&&(s.allImages=a.allImages),void 0!==i.perPricebook?s.perPricebook=i.perPricebook:void 0!==a.perPricebook&&(s.perPricebook=a.perPricebook),void 0===i.siteId){e.next=31;break}s.siteId=i.siteId,e.next=36;break;case 31:if(void 0===a.siteId){e.next=35;break}s.siteId=a.siteId,e.next=36;break;case 35:throw new Error("Missing required query parameter: siteId");case 36:return c=new Ed("/organizations/{organizationId}/products/{id}",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),(d=Kd(Kd({},this.clientConfig.headers),null==r?void 0:r.headers))["user-agent"]=[d["user-agent"],Od].join(" "),u=new t.Request(c.toString(),Kd(Kd({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=42,t.fetch(u);case 42:if(f=e.sent,!n){e.next=47;break}return e.abrupt("return",f);case 47:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=51;break}throw new Error("Error "+f.status+": "+f.statusText);case 51:return e.next=53,f.text();case 53:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 55:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"getCategories",value:(n=Fn(xi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return xi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(s={},void 0===i.ids){e.next=17;break}s.ids=i.ids,e.next=22;break;case 17:if(void 0===a.ids){e.next=21;break}s.ids=a.ids,e.next=22;break;case 21:throw new Error("Missing required query parameter: ids");case 22:if(void 0!==i.levels?s.levels=i.levels:void 0!==a.levels&&(s.levels=a.levels),void 0!==i.locale?s.locale=i.locale:void 0!==a.locale&&(s.locale=a.locale),void 0===i.siteId){e.next=28;break}s.siteId=i.siteId,e.next=33;break;case 28:if(void 0===a.siteId){e.next=32;break}s.siteId=a.siteId,e.next=33;break;case 32:throw new Error("Missing required query parameter: siteId");case 33:return c=new Ed("/organizations/{organizationId}/categories",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),(d=Kd(Kd({},this.clientConfig.headers),null==r?void 0:r.headers))["user-agent"]=[d["user-agent"],Od].join(" "),u=new t.Request(c.toString(),Kd(Kd({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=39,t.fetch(u);case 39:if(f=e.sent,!n){e.next=44;break}return e.abrupt("return",f);case 44:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=48;break}throw new Error("Error "+f.status+": "+f.statusText);case 48:return e.next=50,f.text();case 50:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 52:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"getCategory",value:(r=Fn(xi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return xi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.id){e.next=16;break}o.id=i.id,e.next=21;break;case 16:if(void 0===a.id){e.next=20;break}o.id=a.id,e.next=21;break;case 20:throw new Error("Missing required path parameter: id");case 21:if(s={},void 0!==i.levels?s.levels=i.levels:void 0!==a.levels&&(s.levels=a.levels),void 0!==i.locale?s.locale=i.locale:void 0!==a.locale&&(s.locale=a.locale),void 0===i.siteId){e.next=28;break}s.siteId=i.siteId,e.next=33;break;case 28:if(void 0===a.siteId){e.next=32;break}s.siteId=a.siteId,e.next=33;break;case 32:throw new Error("Missing required query parameter: siteId");case 33:return c=new Ed("/organizations/{organizationId}/categories/{id}",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),(d=Kd(Kd({},this.clientConfig.headers),null==r?void 0:r.headers))["user-agent"]=[d["user-agent"],Od].join(" "),u=new t.Request(c.toString(),Kd(Kd({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=39,t.fetch(u);case 39:if(f=e.sent,!n){e.next=44;break}return e.abrupt("return",f);case 44:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=48;break}throw new Error("Error "+f.status+": "+f.statusText);case 48:return e.next=50,f.text();case 50:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 52:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})}]),e}();function Xd(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 Zd(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Xd(Object(r),!0).forEach((function(t){Vn(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Xd(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}Vn(Qd,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/product/shopper-products/{version}");var eu=function(){function e(t){Gn(this,e),Vn(this,"clientConfig",void 0);var r=Zd({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new bo(r)}var r,n;return Yn(e,[{key:"getPromotions",value:(n=Fn(xi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return xi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(s={},void 0===i.siteId){e.next=17;break}s.siteId=i.siteId,e.next=22;break;case 17:if(void 0===a.siteId){e.next=21;break}s.siteId=a.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:if(void 0===i.ids){e.next=26;break}s.ids=i.ids,e.next=31;break;case 26:if(void 0===a.ids){e.next=30;break}s.ids=a.ids,e.next=31;break;case 30:throw new Error("Missing required query parameter: ids");case 31:return void 0!==i.locale?s.locale=i.locale:void 0!==a.locale&&(s.locale=a.locale),c=new Ed("/organizations/{organizationId}/promotions",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),(d=Zd(Zd({},this.clientConfig.headers),null==r?void 0:r.headers))["user-agent"]=[d["user-agent"],Od].join(" "),u=new t.Request(c.toString(),Zd(Zd({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=38,t.fetch(u);case 38:if(f=e.sent,!n){e.next=43;break}return e.abrupt("return",f);case 43:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=47;break}throw new Error("Error "+f.status+": "+f.statusText);case 47:return e.next=49,f.text();case 49:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"getPromotionsForCampaign",value:(r=Fn(xi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return xi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.campaignId){e.next=16;break}o.campaignId=i.campaignId,e.next=21;break;case 16:if(void 0===a.campaignId){e.next=20;break}o.campaignId=a.campaignId,e.next=21;break;case 20:throw new Error("Missing required path parameter: campaignId");case 21:if(s={},void 0===i.siteId){e.next=26;break}s.siteId=i.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}s.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==i.startDate?s.startDate=i.startDate:void 0!==a.startDate&&(s.startDate=a.startDate),void 0!==i.endDate?s.endDate=i.endDate:void 0!==a.endDate&&(s.endDate=a.endDate),void 0!==i.currency?s.currency=i.currency:void 0!==a.currency&&(s.currency=a.currency),c=new Ed("/organizations/{organizationId}/promotions/campaigns/{campaignId}",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),(d=Zd(Zd({},this.clientConfig.headers),null==r?void 0:r.headers))["user-agent"]=[d["user-agent"],Od].join(" "),u=new t.Request(c.toString(),Zd(Zd({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=40,t.fetch(u);case 40:if(f=e.sent,!n){e.next=45;break}return e.abrupt("return",f);case 45:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=49;break}throw new Error("Error "+f.status+": "+f.statusText);case 49:return e.next=51,f.text();case 51:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 53:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})}]),e}();Vn(eu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/pricing/shopper-promotions/{version}");var tu=B.match(/firefox\/(\d+)/i),ru=!!tu&&+tu[1],nu=/MSIE|Trident/.test(B),iu=B.match(/AppleWebKit\/(\d+)\./),au=!!iu&&+iu[1],ou=[],su=w(ou.sort),cu=w(ou.push),du=d((function(){ou.sort(void 0)})),uu=d((function(){ou.sort(null)})),fu=zn("sort"),hu=!d((function(){if(J)return J<70;if(!(ru&&ru>3)){if(nu)return!0;if(au)return au<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++)ou.push({k:t+n,v:r})}for(ou.sort((function(e,t){return t.v-e.v})),n=0;n<ou.length;n++)t=ou[n].k.charAt(0),i.charAt(i.length-1)!==t&&(i+=t);return"DGBEFHACIJK"!==i}}));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 lu(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){Vn(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}jt({target:"Array",proto:!0,forced:du||!uu||!fu||!hu},{sort:function(e){void 0!==e&&K(e);var t=ie(this);if(hu)return void 0===e?su(t):su(t,e);var r,n,i=[],a=ht(t);for(n=0;n<a;n++)n in t&&cu(i,t[n]);for(Oa(i,function(e){return function(t,r){return void 0===r?-1:void 0===t?1:void 0!==e?+e(t,r)||0:$t(t)>$t(r)?1:-1}}(e)),r=i.length,n=0;n<r;)t[n]=i[n++];for(;n<a;)delete t[n++];return t}});var gu=function(){function e(t){Gn(this,e),Vn(this,"clientConfig",void 0);var r=lu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new bo(r)}var r,n;return Yn(e,[{key:"productSearch",value:(n=Fn(xi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return xi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(s={},void 0===i.siteId){e.next=17;break}s.siteId=i.siteId,e.next=22;break;case 17:if(void 0===a.siteId){e.next=21;break}s.siteId=a.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return void 0!==i.q?s.q=i.q:void 0!==a.q&&(s.q=a.q),void 0!==i.refine?s.refine=i.refine:void 0!==a.refine&&(s.refine=a.refine),void 0!==i.sort?s.sort=i.sort:void 0!==a.sort&&(s.sort=a.sort),void 0!==i.currency?s.currency=i.currency:void 0!==a.currency&&(s.currency=a.currency),void 0!==i.locale?s.locale=i.locale:void 0!==a.locale&&(s.locale=a.locale),void 0!==i.offset?s.offset=i.offset:void 0!==a.offset&&(s.offset=a.offset),void 0!==i.limit?s.limit=i.limit:void 0!==a.limit&&(s.limit=a.limit),c=new Ed("/organizations/{organizationId}/product-search",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),(d=lu(lu({},this.clientConfig.headers),null==r?void 0:r.headers))["user-agent"]=[d["user-agent"],Od].join(" "),u=new t.Request(c.toString(),lu(lu({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=35,t.fetch(u);case 35:if(f=e.sent,!n){e.next=40;break}return e.abrupt("return",f);case 40:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=44;break}throw new Error("Error "+f.status+": "+f.statusText);case 44:return e.next=46,f.text();case 46:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 48:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"getSearchSuggestions",value:(r=Fn(xi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return xi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(s={},void 0===i.siteId){e.next=17;break}s.siteId=i.siteId,e.next=22;break;case 17:if(void 0===a.siteId){e.next=21;break}s.siteId=a.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:if(void 0===i.q){e.next=26;break}s.q=i.q,e.next=31;break;case 26:if(void 0===a.q){e.next=30;break}s.q=a.q,e.next=31;break;case 30:throw new Error("Missing required query parameter: q");case 31:return void 0!==i.limit?s.limit=i.limit:void 0!==a.limit&&(s.limit=a.limit),void 0!==i.currency?s.currency=i.currency:void 0!==a.currency&&(s.currency=a.currency),void 0!==i.locale?s.locale=i.locale:void 0!==a.locale&&(s.locale=a.locale),c=new Ed("/organizations/{organizationId}/search-suggestions",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),(d=lu(lu({},this.clientConfig.headers),null==r?void 0:r.headers))["user-agent"]=[d["user-agent"],Od].join(" "),u=new t.Request(c.toString(),lu(lu({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=40,t.fetch(u);case 40:if(f=e.sent,!n){e.next=45;break}return e.abrupt("return",f);case 45:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=49;break}throw new Error("Error "+f.status+": "+f.statusText);case 49:return e.next=51,f.text();case 51:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 53:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})}]),e}();Vn(gu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/search/shopper-search/{version}/");var bu=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t};ts("search",(function(e,t,r){return[function(t){var r=S(this),n=null==t?void 0:Q(t,e);return n?p(n,t,r):new RegExp(t)[e]($t(r))},function(e){var n=Pe(this),i=$t(e),a=r(t,n,i);if(a.done)return a.value;var o=n.lastIndex;bu(o,0)||(n.lastIndex=0);var s=hs(n,i);return bu(n.lastIndex,o)||(n.lastIndex=o),null===s?-1:s.index}]}));var vu=ge("iterator"),Iu=!1;try{var xu=0,mu={next:function(){return{done:!!xu++}},return:function(){Iu=!0}};mu[vu]=function(){return this},Array.from(mu,(function(){throw 2}))}catch(e){}var ku,wu,yu,Cu=function(e,t){if(!t&&!Iu)return!1;var r=!1;try{var n={};n[vu]=function(){return{next:function(){return{done:r=!0}}}},e(n)}catch(e){}return r},zu="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView,Eu=je.f,Ou=c.Int8Array,qu=Ou&&Ou.prototype,Pu=c.Uint8ClampedArray,Su=Pu&&Pu.prototype,Tu=Ou&&Ti(Ou),Ru=qu&&Ti(qu),ju=Object.prototype,Mu=c.TypeError,Uu=ge("toStringTag"),Au=ue("TYPED_ARRAY_TAG"),Bu=ue("TYPED_ARRAY_CONSTRUCTOR"),Nu=zu&&!!Li&&"Opera"!==Vt(c.opera),_u=!1,Lu={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},Du={BigInt64Array:8,BigUint64Array:8},Ju=function(e){if(!j(e))return!1;var t=Vt(e);return oe(Lu,t)||oe(Du,t)};for(ku in Lu)(yu=(wu=c[ku])&&wu.prototype)?Me(yu,Bu,wu):Nu=!1;for(ku in Du)(yu=(wu=c[ku])&&wu.prototype)&&Me(yu,Bu,wu);if((!Nu||!R(Tu)||Tu===Function.prototype)&&(Tu=function(){throw Mu("Incorrect invocation")},Nu))for(ku in Lu)c[ku]&&Li(c[ku],Tu);if((!Nu||!Ru||Ru===ju)&&(Ru=Tu.prototype,Nu))for(ku in Lu)c[ku]&&Li(c[ku].prototype,Ru);if(Nu&&Ti(Su)!==Ru&&Li(Su,Ru),u&&!oe(Ru,Uu))for(ku in _u=!0,Eu(Ru,Uu,{get:function(){return j(this)?this[Au]:void 0}}),Lu)c[ku]&&Me(c[ku],Au,ku);var Fu={NATIVE_ARRAY_BUFFER_VIEWS:Nu,TYPED_ARRAY_CONSTRUCTOR:Bu,TYPED_ARRAY_TAG:_u&&Au,aTypedArray:function(e){if(Ju(e))return e;throw Mu("Target is not a typed array")},aTypedArrayConstructor:function(e){if(R(e)&&(!Li||A(Tu,e)))return e;throw Mu(W(e)+" is not a typed array constructor")},exportTypedArrayMethod:function(e,t,r,n){if(u){if(r)for(var i in Lu){var a=c[i];if(a&&oe(a.prototype,e))try{delete a.prototype[e]}catch(r){try{a.prototype[e]=t}catch(e){}}}Ru[e]&&!r||nt(Ru,e,r?t:Nu&&qu[e]||t,n)}},exportTypedArrayStaticMethod:function(e,t,r){var n,i;if(u){if(Li){if(r)for(n in Lu)if((i=c[n])&&oe(i,e))try{delete i[e]}catch(e){}if(Tu[e]&&!r)return;try{return nt(Tu,e,r?t:Nu&&Tu[e]||t)}catch(e){}}for(n in Lu)!(i=c[n])||i[e]&&!r||nt(i,e,t)}},isView:function(e){if(!j(e))return!1;var t=Vt(e);return"DataView"===t||oe(Lu,t)||oe(Du,t)},isTypedArray:Ju,TypedArray:Tu,TypedArrayPrototype:Ru},Gu=Fu.NATIVE_ARRAY_BUFFER_VIEWS,Hu=c.ArrayBuffer,Yu=c.Int8Array,Vu=!Gu||!d((function(){Yu(1)}))||!d((function(){new Yu(-1)}))||!Cu((function(e){new Yu,new Yu(null),new Yu(1.5),new Yu(e)}),!0)||d((function(){return 1!==new Yu(new Hu(2),1,void 0).length})),Wu=c.RangeError,$u=function(e){if(void 0===e)return 0;var t=ot(e),r=ft(t);if(t!==r)throw Wu("Wrong length or index");return r},Ku=c.Array,Qu=Math.abs,Xu=Math.pow,Zu=Math.floor,ef=Math.log,tf=Math.LN2,rf=function(e,t,r){var n,i,a,o=Ku(r),s=8*r-t-1,c=(1<<s)-1,d=c>>1,u=23===t?Xu(2,-24)-Xu(2,-77):0,f=e<0||0===e&&1/e<0?1:0,h=0;for((e=Qu(e))!=e||e===1/0?(i=e!=e?1:0,n=c):(n=Zu(ef(e)/tf),e*(a=Xu(2,-n))<1&&(n--,a*=2),(e+=n+d>=1?u/a:u*Xu(2,1-d))*a>=2&&(n++,a/=2),n+d>=c?(i=0,n=c):n+d>=1?(i=(e*a-1)*Xu(2,t),n+=d):(i=e*Xu(2,d-1)*Xu(2,t),n=0));t>=8;)o[h++]=255&i,i/=256,t-=8;for(n=n<<t|i,s+=t;s>0;)o[h++]=255&n,n/=256,s-=8;return o[--h]|=128*f,o},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+=Xu(2,t),u-=o}return(d?-1:1)*r*Xu(2,u-t)},af=function(e){for(var t=ie(this),r=ht(t),n=arguments.length,i=dt(n>1?arguments[1]:void 0,r),a=n>2?arguments[2]:void 0,o=void 0===a?r:dt(a,r);o>i;)t[i++]=e;return t},of=mt.f,sf=je.f,cf=rt.PROPER,df=rt.CONFIGURABLE,uf=Xe.get,ff=Xe.set,hf=c.ArrayBuffer,pf=hf,lf=pf&&pf.prototype,gf=c.DataView,bf=gf&&gf.prototype,vf=Object.prototype,If=c.Array,xf=c.RangeError,mf=w(af),kf=w([].reverse),wf=rf,yf=nf,Cf=function(e){return[255&e]},zf=function(e){return[255&e,e>>8&255]},Ef=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]},qf=function(e){return wf(e,23,4)},Pf=function(e){return wf(e,52,8)},Sf=function(e,t){sf(e.prototype,t,{get:function(){return uf(this)[t]}})},Tf=function(e,t,r,n){var i=$u(r),a=uf(e);if(i+t>a.byteLength)throw xf("Wrong index");var o=uf(a.buffer).bytes,s=i+a.byteOffset,c=sr(o,s,s+t);return n?c:kf(c)},Rf=function(e,t,r,n,i,a){var o=$u(r),s=uf(e);if(o+t>s.byteLength)throw xf("Wrong index");for(var c=uf(s.buffer).bytes,d=o+s.byteOffset,u=n(+i),f=0;f<t;f++)c[d+f]=u[a?f:t-f-1]};if(zu){var jf=cf&&"ArrayBuffer"!==hf.name;if(d((function(){hf(1)}))&&d((function(){new hf(-1)}))&&!d((function(){return new hf,new hf(1.5),new hf(NaN),jf&&!df})))jf&&df&&Me(hf,"name","ArrayBuffer");else{(pf=function(e){return ba(this,lf),new hf($u(e))}).prototype=lf;for(var Mf,Uf=of(hf),Af=0;Uf.length>Af;)(Mf=Uf[Af++])in pf||Me(pf,Mf,hf[Mf]);lf.constructor=pf}Li&&Ti(bf)!==vf&&Li(bf,vf);var Bf=new gf(new pf(2)),Nf=w(bf.setInt8);Bf.setInt8(0,2147483648),Bf.setInt8(1,2147483649),!Bf.getInt8(0)&&Bf.getInt8(1)||la(bf,{setInt8:function(e,t){Nf(this,e,t<<24>>24)},setUint8:function(e,t){Nf(this,e,t<<24>>24)}},{unsafe:!0})}else lf=(pf=function(e){ba(this,lf);var t=$u(e);ff(this,{bytes:mf(If(t),0),byteLength:t}),u||(this.byteLength=t)}).prototype,bf=(gf=function(e,t,r){ba(this,bf),ba(e,lf);var n=uf(e).byteLength,i=ot(t);if(i<0||i>n)throw xf("Wrong offset");if(i+(r=void 0===r?n-i:ft(r))>n)throw xf("Wrong length");ff(this,{buffer:e,byteLength:r,byteOffset:i}),u||(this.buffer=e,this.byteLength=r,this.byteOffset=i)}).prototype,u&&(Sf(pf,"byteLength"),Sf(gf,"buffer"),Sf(gf,"byteLength"),Sf(gf,"byteOffset")),la(bf,{getInt8:function(e){return Tf(this,1,e)[0]<<24>>24},getUint8:function(e){return Tf(this,1,e)[0]},getInt16:function(e){var t=Tf(this,2,e,arguments.length>1?arguments[1]:void 0);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=Tf(this,2,e,arguments.length>1?arguments[1]:void 0);return t[1]<<8|t[0]},getInt32:function(e){return Of(Tf(this,4,e,arguments.length>1?arguments[1]:void 0))},getUint32:function(e){return Of(Tf(this,4,e,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(e){return yf(Tf(this,4,e,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(e){return yf(Tf(this,8,e,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(e,t){Rf(this,1,e,Cf,t)},setUint8:function(e,t){Rf(this,1,e,Cf,t)},setInt16:function(e,t){Rf(this,2,e,zf,t,arguments.length>2?arguments[2]:void 0)},setUint16:function(e,t){Rf(this,2,e,zf,t,arguments.length>2?arguments[2]:void 0)},setInt32:function(e,t){Rf(this,4,e,Ef,t,arguments.length>2?arguments[2]:void 0)},setUint32:function(e,t){Rf(this,4,e,Ef,t,arguments.length>2?arguments[2]:void 0)},setFloat32:function(e,t){Rf(this,4,e,qf,t,arguments.length>2?arguments[2]:void 0)},setFloat64:function(e,t){Rf(this,8,e,Pf,t,arguments.length>2?arguments[2]:void 0)}});vr(pf,"ArrayBuffer"),vr(gf,"DataView");var _f={ArrayBuffer:pf,DataView:gf},Lf=Math.floor,Df=Number.isInteger||function(e){return!j(e)&&isFinite(e)&&Lf(e)===e},Jf=c.RangeError,Ff=c.RangeError,Gf=function(e,t){var r=function(e){var t=ot(e);if(t<0)throw Jf("The argument can't be less than 0");return t}(e);if(r%t)throw Ff("Wrong offset");return r},Hf=Fu.aTypedArrayConstructor,Yf=function(e){var t,r,n,i,a,o,s=Co(this),c=ie(e),d=arguments.length,u=d>1?arguments[1]:void 0,f=void 0!==u,h=Ia(c);if(h&&!As(h))for(o=(a=ma(c,h)).next,c=[];!(i=p(o,a)).done;)c.push(i.value);for(f&&d>2&&(u=xr(u,arguments[2])),r=ht(c),n=new(Hf(s))(r),t=0;r>t;t++)n[t]=f?u(c[t],t):c[t];return n},Vf=ge("species"),Wf=function(e){var t=U(e),r=je.f;u&&t&&!t[Vf]&&r(t,Vf,{configurable:!0,get:function(){return this}})};i((function(e){var t=mt.f,r=Mr.forEach,n=Xe.get,i=Xe.set,a=je.f,o=ze.f,s=Math.round,d=c.RangeError,f=_f.ArrayBuffer,h=f.prototype,l=_f.DataView,g=Fu.NATIVE_ARRAY_BUFFER_VIEWS,b=Fu.TYPED_ARRAY_CONSTRUCTOR,I=Fu.TYPED_ARRAY_TAG,x=Fu.TypedArray,m=Fu.TypedArrayPrototype,k=Fu.aTypedArrayConstructor,w=Fu.isTypedArray,y=function(e,t){k(e);for(var r=0,n=t.length,i=new e(n);n>r;)i[r]=t[r++];return i},C=function(e,t){a(e,t,{get:function(){return n(this)[t]}})},z=function(e){var t;return A(h,e)||"ArrayBuffer"==(t=Vt(e))||"SharedArrayBuffer"==t},E=function(e,t){return w(e)&&!Y(t)&&t in e&&Df(+t)&&t>=0},O=function(e,t){return t=xe(t),E(e,t)?v(2,e[t]):o(e,t)},q=function(e,t,r){return t=xe(t),!(E(e,t)&&j(r)&&oe(r,"value"))||oe(r,"get")||oe(r,"set")||r.configurable||oe(r,"writable")&&!r.writable||oe(r,"enumerable")&&!r.enumerable?a(e,t,r):(e[t]=r.value,e)};u?(g||(ze.f=O,je.f=q,C(m,"buffer"),C(m,"byteOffset"),C(m,"byteLength"),C(m,"length")),jt({target:"Object",stat:!0,forced:!g},{getOwnPropertyDescriptor:O,defineProperty:q}),e.exports=function(e,o,u){var h=e.match(/\d+$/)[0]/8,v=e+(u?"Clamped":"")+"Array",k="get"+e,C="set"+e,E=c[v],O=E,q=O&&O.prototype,P={},S=function(e,t){a(e,t,{get:function(){return function(e,t){var r=n(e);return r.view[k](t*h+r.byteOffset,!0)}(this,t)},set:function(e){return function(e,t,r){var i=n(e);u&&(r=(r=s(r))<0?0:r>255?255:255&r),i.view[C](t*h+i.byteOffset,r,!0)}(this,t,e)},enumerable:!0})};g?Vu&&(O=o((function(e,t,r,n){return ba(e,q),function(e,t,r){var n,i;return Li&&R(n=t.constructor)&&n!==r&&j(i=n.prototype)&&i!==r.prototype&&Li(e,i),e}(j(t)?z(t)?void 0!==n?new E(t,Gf(r,h),n):void 0!==r?new E(t,Gf(r,h)):new E(t):w(t)?y(O,t):p(Yf,O,t):new E($u(t)),e,O)})),Li&&Li(O,x),r(t(E),(function(e){e in O||Me(O,e,E[e])})),O.prototype=q):(O=o((function(e,t,r,n){ba(e,q);var a,o,s,c=0,u=0;if(j(t)){if(!z(t))return w(t)?y(O,t):p(Yf,O,t);a=t,u=Gf(r,h);var g=t.byteLength;if(void 0===n){if(g%h)throw d("Wrong length");if((o=g-u)<0)throw d("Wrong length")}else if((o=ft(n)*h)+u>g)throw d("Wrong length");s=o/h}else s=$u(t),a=new f(o=s*h);for(i(e,{buffer:a,byteOffset:u,byteLength:o,length:s,view:new l(a)});c<s;)S(e,c++)})),Li&&Li(O,x),q=O.prototype=nr(m)),q.constructor!==O&&Me(q,"constructor",O),Me(q,b,O),I&&Me(q,I,v),P[v]=O,jt({global:!0,forced:O!=E,sham:!g},P),"BYTES_PER_ELEMENT"in O||Me(O,"BYTES_PER_ELEMENT",h),"BYTES_PER_ELEMENT"in q||Me(q,"BYTES_PER_ELEMENT",h),Wf(v)}):e.exports=function(){}}))("Uint8",(function(e){return function(t,r,n){return e(this,t,r,n)}}));var $f=Math.min,Kf=w([].copyWithin||function(e,t){var r=ie(this),n=ht(r),i=dt(e,n),a=dt(t,n),o=arguments.length>2?arguments[2]:void 0,s=$f((void 0===o?n:dt(o,n))-a,n-i),c=1;for(a<i&&i<a+s&&(c=-1,a+=s-1,i+=s-1);s-- >0;)a in r?r[i]=r[a]:delete r[i],i+=c,a+=c;return r}),Qf=Fu.aTypedArray;(0,Fu.exportTypedArrayMethod)("copyWithin",(function(e,t){return Kf(Qf(this),e,t,arguments.length>2?arguments[2]:void 0)}));var Xf=Mr.every,Zf=Fu.aTypedArray;(0,Fu.exportTypedArrayMethod)("every",(function(e){return Xf(Zf(this),e,arguments.length>1?arguments[1]:void 0)}));var eh=Fu.aTypedArray;(0,Fu.exportTypedArrayMethod)("fill",(function(e){var t=arguments.length;return p(af,eh(this),e,t>1?arguments[1]:void 0,t>2?arguments[2]:void 0)}));var th=ge("species"),rh=function(e,t){var r,n=Pe(e).constructor;return void 0===n||null==(r=Pe(n)[th])?t:Co(r)},nh=Fu.TYPED_ARRAY_CONSTRUCTOR,ih=Fu.aTypedArrayConstructor,ah=function(e){return ih(rh(e,e[nh]))},oh=function(e,t){return function(e,t){for(var r=0,n=ht(t),i=new e(n);n>r;)i[r]=t[r++];return i}(ah(e),t)},sh=Mr.filter,ch=Fu.aTypedArray;(0,Fu.exportTypedArrayMethod)("filter",(function(e){var t=sh(ch(this),e,arguments.length>1?arguments[1]:void 0);return oh(this,t)}));var dh=Mr.find,uh=Fu.aTypedArray;(0,Fu.exportTypedArrayMethod)("find",(function(e){return dh(uh(this),e,arguments.length>1?arguments[1]:void 0)}));var fh=Mr.findIndex,hh=Fu.aTypedArray;(0,Fu.exportTypedArrayMethod)("findIndex",(function(e){return fh(hh(this),e,arguments.length>1?arguments[1]:void 0)}));var ph=Mr.forEach,lh=Fu.aTypedArray;(0,Fu.exportTypedArrayMethod)("forEach",(function(e){ph(lh(this),e,arguments.length>1?arguments[1]:void 0)}));var gh=lt.includes,bh=Fu.aTypedArray;(0,Fu.exportTypedArrayMethod)("includes",(function(e){return gh(bh(this),e,arguments.length>1?arguments[1]:void 0)}));var vh=lt.indexOf,Ih=Fu.aTypedArray;(0,Fu.exportTypedArrayMethod)("indexOf",(function(e){return vh(Ih(this),e,arguments.length>1?arguments[1]:void 0)}));var xh=ge("iterator"),mh=c.Uint8Array,kh=w(Qi.values),wh=w(Qi.keys),yh=w(Qi.entries),Ch=Fu.aTypedArray,zh=Fu.exportTypedArrayMethod,Eh=mh&&mh.prototype,Oh=!d((function(){Eh[xh].call([1])})),qh=!!Eh&&Eh.values&&Eh[xh]===Eh.values&&"values"===Eh.values.name,Ph=function(){return kh(Ch(this))};zh("entries",(function(){return yh(Ch(this))}),Oh),zh("keys",(function(){return wh(Ch(this))}),Oh),zh("values",Ph,Oh||!qh,{name:"values"}),zh(xh,Ph,Oh||!qh,{name:"values"});var Sh=Fu.aTypedArray,Th=Fu.exportTypedArrayMethod,Rh=w([].join);Th("join",(function(e){return Rh(Sh(this),e)}));var jh=Math.min,Mh=[].lastIndexOf,Uh=!!Mh&&1/[1].lastIndexOf(1,-0)<0,Ah=zn("lastIndexOf"),Bh=Uh||!Ah?function(e){if(Uh)return _t(Mh,this,arguments)||0;var t=T(this),r=ht(t),n=r-1;for(arguments.length>1&&(n=jh(n,ot(arguments[1]))),n<0&&(n=r+n);n>=0;n--)if(n in t&&t[n]===e)return n||0;return-1}:Mh,Nh=Fu.aTypedArray;(0,Fu.exportTypedArrayMethod)("lastIndexOf",(function(e){var t=arguments.length;return _t(Bh,Nh(this),t>1?[e,arguments[1]]:[e])}));var _h=Mr.map,Lh=Fu.aTypedArray;(0,Fu.exportTypedArrayMethod)("map",(function(e){return _h(Lh(this),e,arguments.length>1?arguments[1]:void 0,(function(e,t){return new(ah(e))(t)}))}));var Dh=c.TypeError,Jh=function(e){return function(t,r,n,i){K(r);var a=ie(t),o=q(a),s=ht(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 Dh("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}},Fh={left:Jh(!1),right:Jh(!0)},Gh=Fh.left,Hh=Fu.aTypedArray;(0,Fu.exportTypedArrayMethod)("reduce",(function(e){var t=arguments.length;return Gh(Hh(this),e,t,t>1?arguments[1]:void 0)}));var Yh=Fh.right,Vh=Fu.aTypedArray;(0,Fu.exportTypedArrayMethod)("reduceRight",(function(e){var t=arguments.length;return Yh(Vh(this),e,t,t>1?arguments[1]:void 0)}));var Wh=Fu.aTypedArray,$h=Fu.exportTypedArrayMethod,Kh=Math.floor;$h("reverse",(function(){for(var e,t=Wh(this).length,r=Kh(t/2),n=0;n<r;)e=this[n],this[n++]=this[--t],this[t]=e;return this}));var Qh=c.RangeError,Xh=c.Int8Array,Zh=Xh&&Xh.prototype,ep=Zh&&Zh.set,tp=Fu.aTypedArray,rp=Fu.exportTypedArrayMethod,np=!d((function(){var e=new Uint8ClampedArray(2);return p(ep,e,{length:1,0:3},1),3!==e[1]})),ip=np&&Fu.NATIVE_ARRAY_BUFFER_VIEWS&&d((function(){var e=new Xh(2);return e.set(1),e.set("2",1),0!==e[0]||2!==e[1]}));rp("set",(function(e){tp(this);var t=Gf(arguments.length>1?arguments[1]:void 0,1),r=ie(e);if(np)return p(ep,this,r,t);var n=this.length,i=ht(r),a=0;if(i+t>n)throw Qh("Wrong length");for(;a<i;)this[t+a]=r[a++]}),!np||ip);var ap=Fu.aTypedArray;(0,Fu.exportTypedArrayMethod)("slice",(function(e,t){for(var r=fr(ap(this),e,t),n=ah(this),i=0,a=r.length,o=new n(a);a>i;)o[i]=r[i++];return o}),d((function(){new Int8Array(1).slice()})));var op=Mr.some,sp=Fu.aTypedArray;(0,Fu.exportTypedArrayMethod)("some",(function(e){return op(sp(this),e,arguments.length>1?arguments[1]:void 0)}));var cp=c.Array,dp=Fu.aTypedArray,up=Fu.exportTypedArrayMethod,fp=c.Uint16Array,hp=fp&&w(fp.prototype.sort),pp=!(!hp||d((function(){hp(new fp(2),null)}))&&d((function(){hp(new fp(2),{})}))),lp=!!hp&&!d((function(){if(J)return J<74;if(ru)return ru<67;if(nu)return!0;if(au)return au<602;var e,t,r=new fp(516),n=cp(516);for(e=0;e<516;e++)t=e%4,r[e]=515-e,n[e]=e-2*t+3;for(hp(r,(function(e,t){return(e/4|0)-(t/4|0)})),e=0;e<516;e++)if(r[e]!==n[e])return!0}));up("sort",(function(e){return void 0!==e&&K(e),lp?hp(this,e):Oa(dp(this),function(e){return function(t,r){return void 0!==e?+e(t,r)||0:r!=r?-1:t!=t?1:0===t&&0===r?1/t>0&&1/r<0?1:-1:t>r}}(e))}),!lp||pp);var gp=Fu.aTypedArray;(0,Fu.exportTypedArrayMethod)("subarray",(function(e,t){var r=gp(this),n=r.length,i=dt(e,n);return new(ah(r))(r.buffer,r.byteOffset+i*r.BYTES_PER_ELEMENT,ft((void 0===t?n:dt(t,n))-i))}));var bp=c.Int8Array,vp=Fu.aTypedArray,Ip=Fu.exportTypedArrayMethod,xp=[].toLocaleString,mp=!!bp&&d((function(){xp.call(new bp(1))}));Ip("toLocaleString",(function(){return _t(xp,mp?fr(vp(this)):vp(this),fr(arguments))}),d((function(){return[1,2].toLocaleString()!=new bp([1,2]).toLocaleString()}))||!d((function(){bp.prototype.toLocaleString.call([1,2])})));var kp=Fu.exportTypedArrayMethod,wp=c.Uint8Array,yp=wp&&wp.prototype||{},Cp=[].toString,zp=w([].join);d((function(){Cp.call({})}))&&(Cp=function(){return zp(this)});var Ep=yp.toString!=Cp;kp("toString",Cp,Ep);var Op,qp,Pp,Sp,Tp=c.Promise,Rp=c.TypeError,jp=function(e,t){this.stopped=e,this.result=t},Mp=jp.prototype,Up=function(e,t,r){var n,i,a,o,s,c,d,u=r&&r.that,f=!(!r||!r.AS_ENTRIES),h=!(!r||!r.IS_ITERATOR),l=!(!r||!r.INTERRUPTED),g=xr(t,u),b=function(e){return n&&Rs(n,"normal",e),new jp(!0,e)},v=function(e){return f?(Pe(e),l?g(e[0],e[1],b):g(e[0],e[1])):l?g(e,b):g(e)};if(h)n=e;else{if(!(i=Ia(e)))throw Rp(W(e)+" is not iterable");if(As(i)){for(a=0,o=ht(e);o>a;a++)if((s=v(e[a]))&&A(Mp,s))return s;return new jp(!1)}n=ma(e,i)}for(c=n.next;!(d=p(c,n)).done;){try{s=v(d.value)}catch(e){Rs(n,"throw",e)}if("object"==typeof s&&s&&A(Mp,s))return s}return new jp(!1)},Ap=/(?:ipad|iphone|ipod).*applewebkit/i.test(B),Bp="process"==z(c.process),Np=c.setImmediate,_p=c.clearImmediate,Lp=c.process,Dp=c.Dispatch,Jp=c.Function,Fp=c.MessageChannel,Gp=c.String,Hp=0,Yp={};try{Op=c.location}catch(e){}var Vp=function(e){if(oe(Yp,e)){var t=Yp[e];delete Yp[e],t()}},Wp=function(e){return function(){Vp(e)}},$p=function(e){Vp(e.data)},Kp=function(e){c.postMessage(Gp(e),Op.protocol+"//"+Op.host)};Np&&_p||(Np=function(e){var t=fr(arguments,1);return Yp[++Hp]=function(){_t(R(e)?e:Jp(e),void 0,t)},qp(Hp),Hp},_p=function(e){delete Yp[e]},Bp?qp=function(e){Lp.nextTick(Wp(e))}:Dp&&Dp.now?qp=function(e){Dp.now(Wp(e))}:Fp&&!Ap?(Sp=(Pp=new Fp).port2,Pp.port1.onmessage=$p,qp=xr(Sp.postMessage,Sp)):c.addEventListener&&R(c.postMessage)&&!c.importScripts&&Op&&"file:"!==Op.protocol&&!d(Kp)?(qp=Kp,c.addEventListener("message",$p,!1)):qp="onreadystatechange"in we("script")?function(e){Qt.appendChild(we("script")).onreadystatechange=function(){Qt.removeChild(this),Vp(e)}}:function(e){setTimeout(Wp(e),0)});var Qp,Xp,Zp,el,tl,rl,nl,il,al={set:Np,clear:_p},ol=/ipad|iphone|ipod/i.test(B)&&void 0!==c.Pebble,sl=/web0s(?!.*chrome)/i.test(B),cl=ze.f,dl=al.set,ul=c.MutationObserver||c.WebKitMutationObserver,fl=c.document,hl=c.process,pl=c.Promise,ll=cl(c,"queueMicrotask"),gl=ll&&ll.value;gl||(Qp=function(){var e,t;for(Bp&&(e=hl.domain)&&e.exit();Xp;){t=Xp.fn,Xp=Xp.next;try{t()}catch(e){throw Xp?el():Zp=void 0,e}}Zp=void 0,e&&e.enter()},Ap||Bp||sl||!ul||!fl?!ol&&pl&&pl.resolve?((nl=pl.resolve(void 0)).constructor=pl,il=xr(nl.then,nl),el=function(){il(Qp)}):Bp?el=function(){hl.nextTick(Qp)}:(dl=xr(dl,c),el=function(){dl(Qp)}):(tl=!0,rl=fl.createTextNode(""),new ul(Qp).observe(rl,{characterData:!0}),el=function(){rl.data=tl=!tl}));var bl=gl||function(e){var t={fn:e,next:void 0};Zp&&(Zp.next=t),Xp||(Xp=t,el()),Zp=t},vl=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=K(t),this.reject=K(r)},Il={f:function(e){return new vl(e)}},xl=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},ml=function(){this.head=null,this.tail=null};ml.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 kl,wl,yl,Cl,zl=ml,El="object"==typeof window,Ol=al.set,ql=ge("species"),Pl="Promise",Sl=Xe.getterFor(Pl),Tl=Xe.set,Rl=Xe.getterFor(Pl),jl=Tp&&Tp.prototype,Ml=Tp,Ul=jl,Al=c.TypeError,Bl=c.document,Nl=c.process,_l=Il.f,Ll=_l,Dl=!!(Bl&&Bl.createEvent&&c.dispatchEvent),Jl=R(c.PromiseRejectionEvent),Fl=!1,Gl=Tt(Pl,(function(){var e=_e(Ml),t=e!==String(Ml);if(!t&&66===J)return!0;if(J>=51&&/native code/.test(e))return!1;var r=new Ml((function(e){e(1)})),n=function(e){e((function(){}),(function(){}))};return(r.constructor={})[ql]=n,!(Fl=r.then((function(){}))instanceof n)||!t&&El&&!Jl})),Hl=Gl||!Cu((function(e){Ml.all(e).catch((function(){}))})),Yl=function(e){var t;return!(!j(e)||!R(t=e.then))&&t},Vl=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&&Xl(t),t.rejection=1),!0===s?r=a:(u&&u.enter(),r=s(a),u&&(u.exit(),i=!0)),r===e.promise?d(Al("Promise-chain cycle")):(n=Yl(r))?p(n,r,c,d):c(r)):d(a)}catch(e){u&&!i&&u.exit(),d(e)}},Wl=function(e,t){e.notified||(e.notified=!0,bl((function(){for(var r,n=e.reactions;r=n.get();)Vl(r,e);e.notified=!1,t&&!e.rejection&&Kl(e)})))},$l=function(e,t,r){var n,i;Dl?((n=Bl.createEvent("Event")).promise=t,n.reason=r,n.initEvent(e,!1,!0),c.dispatchEvent(n)):n={promise:t,reason:r},!Jl&&(i=c["on"+e])?i(n):"unhandledrejection"===e&&function(e,t){var r=c.console;r&&r.error&&(1==arguments.length?r.error(e):r.error(e,t))}("Unhandled promise rejection",r)},Kl=function(e){p(Ol,c,(function(){var t,r=e.facade,n=e.value;if(Ql(e)&&(t=xl((function(){Bp?Nl.emit("unhandledRejection",n,r):$l("unhandledrejection",r,n)})),e.rejection=Bp||Ql(e)?2:1,t.error))throw t.value}))},Ql=function(e){return 1!==e.rejection&&!e.parent},Xl=function(e){p(Ol,c,(function(){var t=e.facade;Bp?Nl.emit("rejectionHandled",t):$l("rejectionhandled",t,e.value)}))},Zl=function(e,t,r){return function(n){e(t,n,r)}},eg=function(e,t,r){e.done||(e.done=!0,r&&(e=r),e.value=t,e.state=2,Wl(e,!0))},tg=function(e,t,r){if(!e.done){e.done=!0,r&&(e=r);try{if(e.facade===t)throw Al("Promise can't be resolved itself");var n=Yl(t);n?bl((function(){var r={done:!1};try{p(n,t,Zl(tg,r,e),Zl(eg,r,e))}catch(t){eg(r,t,e)}})):(e.value=t,e.state=1,Wl(e,!1))}catch(t){eg({done:!1},t,e)}}};if(Gl&&(Ul=(Ml=function(e){ba(this,Ul),K(e),p(kl,this);var t=Sl(this);try{e(Zl(tg,t),Zl(eg,t))}catch(e){eg(t,e)}}).prototype,(kl=function(e){Tl(this,{type:Pl,done:!1,notified:!1,parent:!1,reactions:new zl,rejection:!1,state:0,value:void 0})}).prototype=la(Ul,{then:function(e,t){var r=Rl(this),n=_l(rh(this,Ml));return r.parent=!0,n.ok=!R(e)||e,n.fail=R(t)&&t,n.domain=Bp?Nl.domain:void 0,0==r.state?r.reactions.add(n):bl((function(){Vl(n,r)})),n.promise},catch:function(e){return this.then(void 0,e)}}),wl=function(){var e=new kl,t=Sl(e);this.promise=e,this.resolve=Zl(tg,t),this.reject=Zl(eg,t)},Il.f=_l=function(e){return e===Ml||e===yl?new wl(e):Ll(e)},R(Tp)&&jl!==Object.prototype)){Cl=jl.then,Fl||(nt(jl,"then",(function(e,t){var r=this;return new Ml((function(e,t){p(Cl,r,e,t)})).then(e,t)}),{unsafe:!0}),nt(jl,"catch",Ul.catch,{unsafe:!0}));try{delete jl.constructor}catch(e){}Li&&Li(jl,Ul)}function rg(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function ng(e){return function(e){if(Array.isArray(e))return rg(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 rg(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)?rg(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 ig(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 ag(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ig(Object(r),!0).forEach((function(t){Vn(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ig(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}jt({global:!0,wrap:!0,forced:Gl},{Promise:Ml}),vr(Ml,Pl,!1),Wf(Pl),yl=U(Pl),jt({target:Pl,stat:!0,forced:Gl},{reject:function(e){var t=_l(this);return p(t.reject,void 0,e),t.promise}}),jt({target:Pl,stat:!0,forced:Gl},{resolve:function(e){return function(e,t){if(Pe(e),j(t)&&t.constructor===e)return t;var r=Il.f(e);return(0,r.resolve)(t),r.promise}(this,e)}}),jt({target:Pl,stat:!0,forced:Hl},{all:function(e){var t=this,r=_l(t),n=r.resolve,i=r.reject,a=xl((function(){var r=K(t.resolve),a=[],o=0,s=1;Up(e,(function(e){var c=o++,d=!1;s++,p(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},race:function(e){var t=this,r=_l(t),n=r.reject,i=xl((function(){var i=K(t.resolve);Up(e,(function(e){p(i,t,e).then(r.resolve,n)}))}));return i.error&&n(i.value),r.promise}});var og="undefined"!=typeof window,sg=og?btoa:function(e){return Buffer.from(e).toString("base64")},cg=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}},dg=function(){return r.nanoid(128)},ug=function(){var e=Fn(xi.mark((function e(t){var r,n,i,a,o,s,c;return xi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=function(e){return e.replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")},n="",!og||!window.crypto){e.next=12;break}return i=new TextEncoder,a=i.encode(t),e.next=7,window.crypto.subtle.digest("SHA-256",a);case 7:o=e.sent,s=btoa(String.fromCharCode.apply(String,ng(new Uint8Array(o)))),n=r(s),e.next=16;break;case 12:return e.next=14,import("crypto");case 14:c=e.sent,n=r(c.default.createHash("sha256").update(t).digest("base64"));case 16:if(0!==n.length){e.next=18;break}throw new Error("Problem generating code challenge");case 18:return e.abrupt("return",n);case 19:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();function fg(e,t,r){return hg.apply(this,arguments)}function hg(){return(hg=Fn(xi.mark((function e(t,r,n){var i,a,o,s,c,d;return xi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ug(r);case 2:return a=e.sent,o=ag(ag({},t.clientConfig.fetchOptions),!og&&{redirect:"manual"}),s={parameters:ag(ag({client_id:t.clientConfig.parameters.clientId,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}),fetchOptions:o},e.next=7,t.authorizeCustomer(s,!0);case 7:if(c=e.sent,d=c.url||(null===(i=c.headers)||void 0===i?void 0:i.get("location"))){e.next=11;break}throw new Error("Authorization failed");case 11:return e.abrupt("return",ag({url:d},cg(d)));case 12:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function pg(){return(pg=Fn(xi.mark((function e(t,r){var n,i,a;return xi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=dg(),e.next=3,fg(t,n,ag({redirectURI:r.redirectURI,hint:"guest"},r.usid&&{usid:r.usid}));case 3:return i=e.sent,a={client_id:t.clientConfig.parameters.clientId,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 lg(){return(lg=Fn(xi.mark((function e(t,r,n){var i,a,o,s,c,d,u;return xi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=dg(),e.next=3,ug(i);case 3:return a=e.sent,o="Basic ".concat(sg("".concat(r.username,":").concat(r.password))),s={headers:{Authorization:o},parameters:{organizationId:t.clientConfig.parameters.organizationId},body:ag({redirect_uri:n.redirectURI,client_id:t.clientConfig.parameters.clientId,code_challenge:a,channel_id:t.clientConfig.parameters.siteId},n.usid&&{usid:n.usid})},e.next=8,t.authenticateCustomer(s,!0);case 8:return c=e.sent,d=cg(c.url),u={client_id:t.clientConfig.parameters.clientId,code:d.code,code_verifier:i,grant_type:"authorization_code_pkce",organizationId:t.clientConfig.parameters.organizationId,redirect_uri:n.redirectURI,usid:d.usid},e.abrupt("return",t.getAccessToken({body:u}));case 12:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var gg=Object.freeze({__proto__:null,onClient:og,stringToBase64:sg,getCodeAndUsidFromUrl:cg,createCodeVerifier:dg,generateCodeChallenge:ug,authorize:fg,loginGuestUser:function(e,t){return pg.apply(this,arguments)},loginRegisteredUserB2C:function(e,t,r){return lg.apply(this,arguments)},refreshAccessToken:function(e,t){var r={grant_type:"refresh_token",refresh_token:t.refreshToken,client_id:e.clientConfig.parameters.clientId};return e.getAccessToken({body:r})},logout:function(e,t){return e.logoutCustomer({parameters:{refresh_token:t.refreshToken,client_id:e.clientConfig.parameters.clientId,channel_id:e.clientConfig.parameters.siteId}})}});e.ClientConfig=bo,e.ShopperBaskets=Sd,e.ShopperContexts=jd,e.ShopperCustomers=Ad,e.ShopperDiscoverySearch=_d,e.ShopperGiftCertificates=Jd,e.ShopperLogin=Hd,e.ShopperOrders=Wd,e.ShopperProducts=Qd,e.ShopperPromotions=eu,e.ShopperSearch=gu,e.TemplateURL=Ed,e.helpers=gg,Object.defineProperty(e,"__esModule",{value:!0})}));
|