@arc-publishing/sdk-sales
Version:
JS Sales SDK for working with Arc Subs Sales API
1 lines • 132 kB
JavaScript
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Sales=t():e.Sales=t()}("undefined"!=typeof ArcSDK?ArcSDK:this,(function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="/sdk-sales/",r(r.s=33)}([function(e,t,r){"use strict";r.r(t),r.d(t,"__extends",(function(){return i})),r.d(t,"__assign",(function(){return o})),r.d(t,"__rest",(function(){return a})),r.d(t,"__decorate",(function(){return s})),r.d(t,"__param",(function(){return u})),r.d(t,"__esDecorate",(function(){return c})),r.d(t,"__runInitializers",(function(){return l})),r.d(t,"__propKey",(function(){return d})),r.d(t,"__setFunctionName",(function(){return f})),r.d(t,"__metadata",(function(){return _})),r.d(t,"__awaiter",(function(){return p})),r.d(t,"__generator",(function(){return h})),r.d(t,"__createBinding",(function(){return g})),r.d(t,"__exportStar",(function(){return v})),r.d(t,"__values",(function(){return y})),r.d(t,"__read",(function(){return b})),r.d(t,"__spread",(function(){return m})),r.d(t,"__spreadArrays",(function(){return w})),r.d(t,"__spreadArray",(function(){return S})),r.d(t,"__await",(function(){return I})),r.d(t,"__asyncGenerator",(function(){return O})),r.d(t,"__asyncDelegator",(function(){return E})),r.d(t,"__asyncValues",(function(){return D})),r.d(t,"__makeTemplateObject",(function(){return P})),r.d(t,"__importStar",(function(){return A})),r.d(t,"__importDefault",(function(){return k})),r.d(t,"__classPrivateFieldGet",(function(){return R})),r.d(t,"__classPrivateFieldSet",(function(){return j})),r.d(t,"__classPrivateFieldIn",(function(){return G})),r.d(t,"__addDisposableResource",(function(){return M})),r.d(t,"__disposeResources",(function(){return L}));var n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)};function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var o=function(){return(o=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function a(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r}function s(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a}function u(e,t){return function(r,n){t(r,n,e)}}function c(e,t,r,n,i,o){function a(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var s,u=n.kind,c="getter"===u?"get":"setter"===u?"set":"value",l=!t&&e?n.static?e:e.prototype:null,d=t||(l?Object.getOwnPropertyDescriptor(l,n.name):{}),f=!1,_=r.length-1;_>=0;_--){var p={};for(var h in n)p[h]="access"===h?{}:n[h];for(var h in n.access)p.access[h]=n.access[h];p.addInitializer=function(e){if(f)throw new TypeError("Cannot add initializers after decoration has completed");o.push(a(e||null))};var g=(0,r[_])("accessor"===u?{get:d.get,set:d.set}:d[c],p);if("accessor"===u){if(void 0===g)continue;if(null===g||"object"!=typeof g)throw new TypeError("Object expected");(s=a(g.get))&&(d.get=s),(s=a(g.set))&&(d.set=s),(s=a(g.init))&&i.unshift(s)}else(s=a(g))&&("field"===u?i.unshift(s):d[c]=s)}l&&Object.defineProperty(l,n.name,d),f=!0}function l(e,t,r){for(var n=arguments.length>2,i=0;i<t.length;i++)r=n?t[i].call(e,r):t[i].call(e);return n?r:void 0}function d(e){return"symbol"==typeof e?e:"".concat(e)}function f(e,t,r){return"symbol"==typeof t&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:r?"".concat(r," ",t):t})}function _(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function p(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))}function h(e,t){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(s){return function(u){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,s[0]&&(a=0)),a;)try{if(r=1,n&&(i=2&s[0]?n.return:s[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,s[1])).done)return i;switch(n=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,n=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],n=0}finally{r=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,u])}}}var g=Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]};function v(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||g(t,e,r)}function y(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function b(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a}function m(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(b(arguments[t]));return e}function w(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var n=Array(e),i=0;for(t=0;t<r;t++)for(var o=arguments[t],a=0,s=o.length;a<s;a++,i++)n[i]=o[a];return n}function S(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;i<o;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))}function I(e){return this instanceof I?(this.v=e,this):new I(e)}function O(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,i=r.apply(e,t||[]),o=[];return n={},a("next"),a("throw"),a("return"),n[Symbol.asyncIterator]=function(){return this},n;function a(e){i[e]&&(n[e]=function(t){return new Promise((function(r,n){o.push([e,t,r,n])>1||s(e,t)}))})}function s(e,t){try{(r=i[e](t)).value instanceof I?Promise.resolve(r.value.v).then(u,c):l(o[0][2],r)}catch(e){l(o[0][3],e)}var r}function u(e){s("next",e)}function c(e){s("throw",e)}function l(e,t){e(t),o.shift(),o.length&&s(o[0][0],o[0][1])}}function E(e){var t,r;return t={},n("next"),n("throw",(function(e){throw e})),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,i){t[n]=e[n]?function(t){return(r=!r)?{value:I(e[n](t)),done:!1}:i?i(t):t}:i}}function D(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=y(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise((function(n,i){(function(e,t,r,n){Promise.resolve(n).then((function(t){e({value:t,done:r})}),t)})(n,i,(t=e[r](t)).done,t.value)}))}}}function P(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var T=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function A(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&g(t,e,r);return T(t,e),t}function k(e){return e&&e.__esModule?e:{default:e}}function R(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)}function j(e,t,r,n,i){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?i.call(e,r):i?i.value=r:t.set(e,r),r}function G(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}function M(e,t,r){if(null!=t){if("object"!=typeof t&&"function"!=typeof t)throw new TypeError("Object expected.");var n;if(r){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");n=t[Symbol.asyncDispose]}if(void 0===n){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");n=t[Symbol.dispose]}if("function"!=typeof n)throw new TypeError("Object not disposable.");e.stack.push({value:t,dispose:n,async:r})}else r&&e.stack.push({async:!0});return t}var N="function"==typeof SuppressedError?SuppressedError:function(e,t,r){var n=new Error(r);return n.name="SuppressedError",n.error=e,n.suppressed=t,n};function L(e){function t(t){e.error=e.hasError?new N(t,e.error,"An error was suppressed during disposal."):t,e.hasError=!0}return function r(){for(;e.stack.length;){var n=e.stack.pop();try{var i=n.dispose&&n.dispose.call(n.value);if(n.async)return Promise.resolve(i).then(r,(function(e){return t(e),r()}))}catch(e){t(e)}}if(e.hasError)throw e.error}()}t.default={__extends:i,__assign:o,__rest:a,__decorate:s,__param:u,__metadata:_,__awaiter:p,__generator:h,__createBinding:g,__exportStar:v,__values:y,__read:b,__spread:m,__spreadArrays:w,__spreadArray:S,__await:I,__asyncGenerator:O,__asyncDelegator:E,__asyncValues:D,__makeTemplateObject:P,__importStar:A,__importDefault:k,__classPrivateFieldGet:R,__classPrivateFieldSet:j,__classPrivateFieldIn:G,__addDisposableResource:M,__disposeResources:L}},function(e,t,r){"use strict";r.r(t),r.d(t,"__extends",(function(){return i})),r.d(t,"__assign",(function(){return o})),r.d(t,"__rest",(function(){return a})),r.d(t,"__decorate",(function(){return s})),r.d(t,"__param",(function(){return u})),r.d(t,"__esDecorate",(function(){return c})),r.d(t,"__runInitializers",(function(){return l})),r.d(t,"__propKey",(function(){return d})),r.d(t,"__setFunctionName",(function(){return f})),r.d(t,"__metadata",(function(){return _})),r.d(t,"__awaiter",(function(){return p})),r.d(t,"__generator",(function(){return h})),r.d(t,"__createBinding",(function(){return g})),r.d(t,"__exportStar",(function(){return v})),r.d(t,"__values",(function(){return y})),r.d(t,"__read",(function(){return b})),r.d(t,"__spread",(function(){return m})),r.d(t,"__spreadArrays",(function(){return w})),r.d(t,"__spreadArray",(function(){return S})),r.d(t,"__await",(function(){return I})),r.d(t,"__asyncGenerator",(function(){return O})),r.d(t,"__asyncDelegator",(function(){return E})),r.d(t,"__asyncValues",(function(){return D})),r.d(t,"__makeTemplateObject",(function(){return P})),r.d(t,"__importStar",(function(){return k})),r.d(t,"__importDefault",(function(){return R})),r.d(t,"__classPrivateFieldGet",(function(){return j})),r.d(t,"__classPrivateFieldSet",(function(){return G})),r.d(t,"__classPrivateFieldIn",(function(){return M})),r.d(t,"__addDisposableResource",(function(){return N})),r.d(t,"__disposeResources",(function(){return x})),r.d(t,"__rewriteRelativeImportExtension",(function(){return C}));var n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)};function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var o=function(){return(o=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function a(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r}function s(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a}function u(e,t){return function(r,n){t(r,n,e)}}function c(e,t,r,n,i,o){function a(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var s,u=n.kind,c="getter"===u?"get":"setter"===u?"set":"value",l=!t&&e?n.static?e:e.prototype:null,d=t||(l?Object.getOwnPropertyDescriptor(l,n.name):{}),f=!1,_=r.length-1;_>=0;_--){var p={};for(var h in n)p[h]="access"===h?{}:n[h];for(var h in n.access)p.access[h]=n.access[h];p.addInitializer=function(e){if(f)throw new TypeError("Cannot add initializers after decoration has completed");o.push(a(e||null))};var g=(0,r[_])("accessor"===u?{get:d.get,set:d.set}:d[c],p);if("accessor"===u){if(void 0===g)continue;if(null===g||"object"!=typeof g)throw new TypeError("Object expected");(s=a(g.get))&&(d.get=s),(s=a(g.set))&&(d.set=s),(s=a(g.init))&&i.unshift(s)}else(s=a(g))&&("field"===u?i.unshift(s):d[c]=s)}l&&Object.defineProperty(l,n.name,d),f=!0}function l(e,t,r){for(var n=arguments.length>2,i=0;i<t.length;i++)r=n?t[i].call(e,r):t[i].call(e);return n?r:void 0}function d(e){return"symbol"==typeof e?e:"".concat(e)}function f(e,t,r){return"symbol"==typeof t&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:r?"".concat(r," ",t):t})}function _(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function p(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))}function h(e,t){var r,n,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(u){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(r=1,n&&(i=2&s[0]?n.return:s[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,s[1])).done)return i;switch(n=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,n=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!(i=o.trys,(i=i.length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],n=0}finally{r=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,u])}}}var g=Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]};function v(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||g(t,e,r)}function y(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function b(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a}function m(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(b(arguments[t]));return e}function w(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var n=Array(e),i=0;for(t=0;t<r;t++)for(var o=arguments[t],a=0,s=o.length;a<s;a++,i++)n[i]=o[a];return n}function S(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;i<o;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))}function I(e){return this instanceof I?(this.v=e,this):new I(e)}function O(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,i=r.apply(e,t||[]),o=[];return n=Object.create(("function"==typeof AsyncIterator?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",(function(e){return function(t){return Promise.resolve(t).then(e,c)}})),n[Symbol.asyncIterator]=function(){return this},n;function a(e,t){i[e]&&(n[e]=function(t){return new Promise((function(r,n){o.push([e,t,r,n])>1||s(e,t)}))},t&&(n[e]=t(n[e])))}function s(e,t){try{(r=i[e](t)).value instanceof I?Promise.resolve(r.value.v).then(u,c):l(o[0][2],r)}catch(e){l(o[0][3],e)}var r}function u(e){s("next",e)}function c(e){s("throw",e)}function l(e,t){e(t),o.shift(),o.length&&s(o[0][0],o[0][1])}}function E(e){var t,r;return t={},n("next"),n("throw",(function(e){throw e})),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,i){t[n]=e[n]?function(t){return(r=!r)?{value:I(e[n](t)),done:!1}:i?i(t):t}:i}}function D(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=y(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise((function(n,i){(function(e,t,r,n){Promise.resolve(n).then((function(t){e({value:t,done:r})}),t)})(n,i,(t=e[r](t)).done,t.value)}))}}}function P(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var T=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},A=function(e){return(A=Object.getOwnPropertyNames||function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[t.length]=r);return t})(e)};function k(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r=A(e),n=0;n<r.length;n++)"default"!==r[n]&&g(t,e,r[n]);return T(t,e),t}function R(e){return e&&e.__esModule?e:{default:e}}function j(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)}function G(e,t,r,n,i){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?i.call(e,r):i?i.value=r:t.set(e,r),r}function M(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}function N(e,t,r){if(null!=t){if("object"!=typeof t&&"function"!=typeof t)throw new TypeError("Object expected.");var n,i;if(r){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");n=t[Symbol.asyncDispose]}if(void 0===n){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");n=t[Symbol.dispose],r&&(i=n)}if("function"!=typeof n)throw new TypeError("Object not disposable.");i&&(n=function(){try{i.call(this)}catch(e){return Promise.reject(e)}}),e.stack.push({value:t,dispose:n,async:r})}else r&&e.stack.push({async:!0});return t}var L="function"==typeof SuppressedError?SuppressedError:function(e,t,r){var n=new Error(r);return n.name="SuppressedError",n.error=e,n.suppressed=t,n};function x(e){function t(t){e.error=e.hasError?new L(t,e.error,"An error was suppressed during disposal."):t,e.hasError=!0}var r,n=0;return function i(){for(;r=e.stack.pop();)try{if(!r.async&&1===n)return n=0,e.stack.push(r),Promise.resolve().then(i);if(r.dispose){var o=r.dispose.call(r.value);if(r.async)return n|=2,Promise.resolve(o).then(i,(function(e){return t(e),i()}))}else n|=1}catch(e){t(e)}if(1===n)return e.hasError?Promise.reject(e.error):Promise.resolve();if(e.hasError)throw e.error}()}function C(e,t){return"string"==typeof e&&/^\.\.?\//.test(e)?e.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,(function(e,r,n,i,o){return r?t?".jsx":".js":!n||i&&o?n+i+"."+o.toLowerCase()+"js":e})):e}t.default={__extends:i,__assign:o,__rest:a,__decorate:s,__param:u,__esDecorate:c,__runInitializers:l,__propKey:d,__setFunctionName:f,__metadata:_,__awaiter:p,__generator:h,__createBinding:g,__exportStar:v,__values:y,__read:b,__spread:m,__spreadArrays:w,__spreadArray:S,__await:I,__asyncGenerator:O,__asyncDelegator:E,__asyncValues:D,__makeTemplateObject:P,__importStar:k,__importDefault:R,__classPrivateFieldGet:j,__classPrivateFieldSet:G,__classPrivateFieldIn:M,__addDisposableResource:N,__disposeResources:x,__rewriteRelativeImportExtension:C}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),i=r(4),o=r(37),a=n.__importStar(r(39)),s=n.__importDefault(r(26)),u=n.__importDefault(r(41)),c=n.__importDefault(r(42)),l=r(43),d=n.__importDefault(r(44)),f=n.__importDefault(r(45)),_=n.__importDefault(r(28)),p=n.__importDefault(r(29)),h=n.__importDefault(r(46)),g=n.__importDefault(r(47)),v=n.__importDefault(r(49)),y=r(50),b=n.__importDefault(r(51)),m=n.__importDefault(r(52)),w=n.__importDefault(r(53)),S=n.__importDefault(r(54)),I=n.__importDefault(r(55)),O=n.__importDefault(r(56)),E=r(24),D=n.__importStar(r(57)),P=r(58),T=n.__importDefault(r(59)),A=n.__importDefault(r(60)),k=n.__importDefault(r(61)),R=n.__importDefault(r(63)),j=n.__importStar(r(21)),G=n.__importDefault(r(65)),M=n.__importDefault(r(66)),N=n.__importDefault(r(67)),L=n.__importDefault(r(68)),x=n.__importDefault(r(69)),C=n.__importDefault(r(70)),U=n.__importDefault(r(71)),K=n.__importStar(r(18)),F=n.__importDefault(r(72)),z=n.__importDefault(r(73)),Y=n.__importDefault(r(74)),B=n.__importDefault(r(31)),J=n.__importDefault(r(75)),H=n.__importDefault(r(76)),W=n.__importDefault(r(23)),q=function(){function e(){}return Object.defineProperty(e,"userIdentity",{get:function(){return!this._userIdentity&&this._userIdentityStorage&&(this._userIdentity=JSON.parse(this._userIdentityStorage.getItem(i.IDENTITY_STORAGE_KEY)||"{}")),this._userIdentity},set:function(e){(0,o.shouldStorageChange)(this._userIdentityStorage,this._isSession,i.IDENTITY_STORAGE_KEY)&&(this._userIdentityStorage instanceof W.default&&this._userIdentityStorage.removeItem(i.IDENTITY_STORAGE_KEY),this._userIdentityStorage=(0,o.initStorage)(this._baseDomain,this._isSession)),e.uuid||e.accessToken||e.refreshToken||e.impersonator||this._userIdentityStorage.removeItem(i.IDENTITY_STORAGE_KEY),this._userIdentityStorage.setItem(i.IDENTITY_STORAGE_KEY,JSON.stringify(e)),this._userIdentity=e},enumerable:!1,configurable:!0}),Object.defineProperty(e,"userProfile",{get:function(){return this._userProfile||(this._userProfile=JSON.parse(this._selectedStorage.getItem(i.PROFILE_STORAGE_KEY)||null)),this._userProfile},set:function(e){var t,r;null===e&&this._selectedStorage.removeItem(i.PROFILE_STORAGE_KEY),(0,o.shouldStorageChange)(this._selectedStorage,this._isSession,i.PROFILE_STORAGE_KEY)&&(this._selectedStorage instanceof W.default&&this._selectedStorage.removeItem(i.PROFILE_STORAGE_KEY),this._selectedStorage=(0,o.initStorage)(this._baseDomain,this._isSession,null===(t=this._profileStorageOpt)||void 0===t?void 0:t.storageExp)),(null===(r=this._profileStorageOpt)||void 0===r?void 0:r.ignoreProfile)?this._selectedStorage.removeItem(i.PROFILE_STORAGE_KEY):this._selectedStorage.setItem(i.PROFILE_STORAGE_KEY,JSON.stringify(e)),this._userProfile=e},enumerable:!1,configurable:!0}),Object.defineProperty(e,"userSegments",{get:function(){return this._userSegments||(this._userSegments=JSON.parse(this._selectedStorage.getItem(i.USER_SEGMENTS_STORAGE_KEY)||null)),this._userSegments},set:function(e){this._selectedStorage.setItem(i.USER_SEGMENTS_STORAGE_KEY,JSON.stringify(e)),this._userSegments=e},enumerable:!1,configurable:!0}),Object.defineProperty(e,"configOptions",{get:function(){return this._configOptions},enumerable:!1,configurable:!0}),Object.defineProperty(e,"userSettings",{get:function(){return this._userSettings||this._userSettings||(this._userSettings=JSON.parse(this._selectedStorage.getItem(i.USER_SETTINGS_STORAGE_KEY)||null)),this._userSettings},set:function(e){null===e&&this._selectedStorage.removeItem(i.USER_SETTINGS_STORAGE_KEY),this._selectedStorage.setItem(i.USER_SETTINGS_STORAGE_KEY,JSON.stringify(e))},enumerable:!1,configurable:!0}),Object.defineProperty(e,"baseDomain",{set:function(e){this._userIdentityStorage=(0,o.initStorage)(e),this._baseDomain=e},enumerable:!1,configurable:!0}),Object.defineProperty(e,"ampReaderId",{get:function(){return this._ampReaderId||(this._ampReaderId=JSON.parse(this._selectedStorage.getItem(i.AMP_ID_STORAGE_KEY)||null)),this._ampReaderId},set:function(e){null==e?this._selectedStorage.removeItem(i.AMP_ID_STORAGE_KEY):e&&this._selectedStorage.setItem(i.AMP_ID_STORAGE_KEY,JSON.stringify(e))},enumerable:!1,configurable:!0}),Object.defineProperty(e,"profileStorageOpt",{get:function(){return this._profileStorageOpt},set:function(e){e&&(this._profileStorageOpt=e)},enumerable:!1,configurable:!0}),e._version=r(77).version,e._userIdentityStorage=(0,o.initStorage)(),e._selectedStorage=(0,o.initStorage)(),e.apiOrigin="",e._baseDomain="",e._google={useCustomButton:!1},e._useCustomFBButton=!1,e.options=f.default,e.login=a.default,e.isLoggedIn=a.isLoggedIn,e.extendSession=l.extendSession,e.clearSession=d.default,e.heartbeat=l.heartbeat,e.logout=s.default,e.getUserSettings=P.getUserSettings,e.getUserProfile=h.default,e.getUserSegments=g.default,e.updateUserProfile=v.default,e.uploadAvatar=y.uploadAvatar,e.deleteAvatar=y.deleteAvatar,e.signUp=b.default,e.updatePassword=m.default,e.requestResetPassword=w.default,e.resetPassword=S.default,e.requestDeleteAccount=D.default,e.approveDeleteAccount=D.approveDeleteAccount,e.declineDeleteAccount=D.declineDeleteAccount,e.getConfig=E.getConfig,e.initFacebookLogin=R.default,e.facebookSignOn=U.default,e.initGoogleLogin=j.default,e.initGoogleAuthSDK=j.initGoogleAuthSDK,e.initGoogleAuth=j.initGoogleAuth,e.initiateOIDC=M.default,e.signInWithOIDC=N.default,e.signInWithOIDCPKCE=L.default,e.loginWithArcIdentityAsOIDCProvider=x.default,e.unlinkOIDC=C.default,e.googleSignOn=K.default,e.signInWithGoogle=F.default,e.initAppleSignOn=G.default,e.appleSignOn=z.default,e.requestMagicLink=u.default,e.redeemMagicLink=c.default,e.requestVerifyEmail=I.default,e.verifyEmail=O.default,e.listGdprReports=A.default,e.getGdprReport=k.default,e.getThirdPartyTokens=T.default,e.unlinkSocialIdentity=Y.default,e.requestOTALink=_.default,e.redeemOTALink=p.default,e.getSwgAccessToken=B.default,e.checkSwgLogin=J.default,e.relinkGoogleAccount=H.default,e.signOnSwgUser=K.signOnSwgUser,e}();t.default=q},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),i=n.__importDefault(r(35)),o=r(32),a=n.__importDefault(r(78)),s=n.__importDefault(r(79)),u=n.__importDefault(r(80)),c=n.__importDefault(r(81)),l=n.__importDefault(r(82)),d=n.__importDefault(r(83)),f=n.__importDefault(r(84)),_=n.__importDefault(r(85)),p=n.__importDefault(r(86)),h=n.__importDefault(r(87)),g=n.__importDefault(r(88)),v=n.__importDefault(r(89)),y=n.__importDefault(r(90)),b=n.__importDefault(r(91)),m=n.__importDefault(r(92)),w=n.__importDefault(r(93)),S=n.__importDefault(r(94)),I=n.__importDefault(r(96)),O=n.__importDefault(r(97)),E=n.__importDefault(r(16)),D=r(98),P=n.__importDefault(r(99)),T=n.__importDefault(r(100)),A=n.__importDefault(r(101)),k=n.__importDefault(r(102)),R=n.__importDefault(r(103)),j=n.__importDefault(r(104)),G=n.__importDefault(r(105)),M=n.__importDefault(r(106)),N=n.__importDefault(r(107)),L=n.__importDefault(r(108)),x=n.__importDefault(r(109)),C=n.__importDefault(r(110)),U=n.__importDefault(r(111)),K=n.__importDefault(r(22)),F=function(){function e(){}return Object.defineProperty(e,"subscriptions",{get:function(){return this._subscriptions},set:function(e){this._subscriptions=e},enumerable:!1,configurable:!0}),Object.defineProperty(e,"sharedSubscriptions",{get:function(){return this._sharedSubscriptions},set:function(e){this._sharedSubscriptions=e},enumerable:!1,configurable:!0}),Object.defineProperty(e,"orders",{get:function(){return this._orders},set:function(e){this._orders=e},enumerable:!1,configurable:!0}),Object.defineProperty(e,"cart",{get:function(){return this._cart},set:function(e){this._cart=e},enumerable:!1,configurable:!0}),Object.defineProperty(e,"currentOrder",{get:function(){return this._currentOrder},set:function(e){this._currentOrder=e},enumerable:!1,configurable:!0}),Object.defineProperty(e,"paymentOptions",{get:function(){return this._paymentOptions},enumerable:!1,configurable:!0}),Object.defineProperty(e,"addresses",{get:function(){return this._addresses},set:function(e){this._addresses=e},enumerable:!1,configurable:!0}),Object.defineProperty(e,"configOptions",{get:function(){return this._configOptions},enumerable:!1,configurable:!0}),e.apiOrigin="",e._subscriptions=[],e._sharedSubscriptions=[],e._orders=[],e._addresses=[],e._paymentOptions=[],e._version=r(112).version,e.options=i.default,e.getConfig=o.getConfig,e.cancelSubscription=a.default,e.rescueSubscription=h.default,e.getAllActiveSubscriptions=s.default,e.getAllSubscriptions=u.default,e.getSubscriptionDetails=c.default,e.getSubscriptionSharingDetails=l.default,e.stopSharing=d.default,e.shareSubscription=f.default,e.redeemAssociateInvitation=_.default,e.redeemEnterpriseSubscription=p.default,e.setGiftRecipient=v.default,e.redeemGiftSubscription=y.default,e.getOrderDetails=b.default,e.getOrderHistory=m.default,e.getCart=w.default,e.addItemToCart=S.default,e.removeItemFromCart=I.default,e.clearCart=O.default,e.createOrder=D.createOrder,e.createNewOrder=D.createNewOrder,e.getPaymentOptions=P.default,e.getAddresses=T.default,e.initializePayment=A.default,e.finalizePayment=k.default,e.finalizePaymentPayU=R.default,e.finalizePayment3ds=j.default,e.initializePaymentUpdate=G.default,e.finalizePaymentUpdate=M.default,e.finalizePaymentUpdate3ds=N.default,e.updateBillingAddress=g.default,e.onSwgPurchase=C.default,e.checkSwgSubscriptionToken=U.default,e.enforceRecaptcha=E.default,e.initializeSubscriptionChange=L.default,e.finalizeSubscriptionChange=x.default,e}();t.default=F,"undefined"!=typeof window&&/localhost/.test(location.href)&&(window.Identity=K.default),"undefined"!=typeof window&&window.addEventListener("ArcSDK.logout",(function(){F.subscriptions=[],F.sharedSubscriptions=[],F.orders=[],F.addresses=[],F.currentOrder={},F.cart={}}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.USER_SEGMENTS_STORAGE_KEY=t.logPrefix=t.headers=t.AMP_ID_STORAGE_KEY=t.USER_SETTINGS_STORAGE_KEY=t.PROFILE_STORAGE_KEY_EXPIRED_TIME=t.PROFILE_STORAGE_KEY=t.IDENTITY_STORAGE_KEY=void 0,t.IDENTITY_STORAGE_KEY="ArcId.USER_INFO",t.PROFILE_STORAGE_KEY="ArcId.USER_PROFILE",t.PROFILE_STORAGE_KEY_EXPIRED_TIME="ArcId.USER_PROFILE_EXPIRED_TIME",t.USER_SETTINGS_STORAGE_KEY="ArcId.USER_SETTINGS",t.AMP_ID_STORAGE_KEY="ArcId.AMP_READER_ID",t.headers={"Content-Type":"application/json"},t.logPrefix="[Arc Identity SDK]",t.USER_SEGMENTS_STORAGE_KEY="ArcId.USER_SEGMENTS"},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.logPrefix=t.headers=void 0,t.headers={"Content-Type":"application/json"},t.logPrefix="[Arc Sales SDK]"},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0);t.default=function(e){return n.__awaiter(this,void 0,void 0,(function(){var t;return n.__generator(this,(function(r){switch(r.label){case 0:return[4,e.text()];case 1:t=r.sent();try{return[2,JSON.parse(t)]}catch(r){return 2==(e.status/100|0)?[2,Promise.resolve({message:t})]:[2,Promise.resolve({code:e.status,message:t,httpStatus:e.status,error:!0})]}return[2]}}))}))}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0);t.default=function(e){return n.__awaiter(this,void 0,void 0,(function(){var t;return n.__generator(this,(function(r){switch(r.label){case 0:return[4,e.clone().text()];case 1:t=r.sent();try{return[2,JSON.parse(t)]}catch(r){return 2==(e.status/100|0)?[2,Promise.resolve({message:t})]:[2,Promise.resolve({code:e.status,message:t,httpStatus:e.status,error:!0})]}return[2]}}))}))}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.cleanPayload=t.getOptions=t.mergeOrders=t.updateOrder=t.mergeSharedSubscriptions=t.updateSharedSubscriptions=t.mergeSubscriptions=t.updateSubscription=t.getSubscription=void 0;var n=r(1),i=n.__importDefault(r(3));function o(e,t){var r=e.find((function(e){return e.subscriptionID===t.subscriptionID})),i=e.filter((function(e){return e.subscriptionID!==t.subscriptionID})),o=n.__assign(n.__assign({},r),t);return n.__spreadArray(n.__spreadArray([],n.__read(i),!1),[o],!1)}function a(e,t){var r=e.find((function(e){return e.subscriptionID===t.subscriptionID})),i=e.filter((function(e){return e.subscriptionID!==t.subscriptionID})),o=n.__assign(n.__assign({},r),t);return n.__spreadArray(n.__spreadArray([],n.__read(i),!1),[o],!1)}function s(e,t){var r=e.find((function(e){return e.orderNumber===t.orderNumber})),i=e.filter((function(e){return e.orderNumber!==t.orderNumber})),o=n.__assign(n.__assign({},r),t);return n.__spreadArray(n.__spreadArray([],n.__read(i),!1),[o],!1)}t.getSubscription=function(e){return i.default.subscriptions.find((function(t){return t.subscriptionID===e}))},t.updateSubscription=o,t.mergeSubscriptions=function(e,t){return t.reduce((function(e,t){return o(e,t)}),e)},t.updateSharedSubscriptions=a,t.mergeSharedSubscriptions=function(e,t){return t.reduce((function(e,t){return a(e,t)}),e)},t.updateOrder=s,t.mergeOrders=function(e,t){return t.reduce((function(e,t){return s(e,t)}),e)},t.getOptions=function(e){return void 0===e&&(e={}),n.__awaiter(this,void 0,void 0,(function(){var t,r;return n.__generator(this,(function(o){switch(o.label){case 0:return[4,i.default._Identity.isLoggedIn()];case 1:return t=o.sent(),r=n.__assign(n.__assign({},e),{headers:t?n.__assign(n.__assign({},e.headers),{Authorization:i.default._Identity.userIdentity.accessToken}):n.__assign({},e.headers)}),t||(r=n.__assign(n.__assign({},r),{credentials:"include"})),[2,r]}}))}))},t.cleanPayload=function(e){var t={};return Object.keys(e).forEach((function(r){t[r]=e[r]||void 0})),t}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isAPIErrorResponse=void 0,t.isAPIErrorResponse=function(e){return void 0!==e.code&&void 0!==e.message}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isGiftRecipientResponse=t.isAddress=t.isSubscriptionDetail=t.isSubscriptionSummary=t.isSubscription=t.isSharingDetails=t.isSubscriptionIDResponse=t.isReedemCodeResponse=void 0,t.isReedemCodeResponse=function(e){return void 0!==e.redeemCode},t.isSubscriptionIDResponse=function(e){return!!e.subscriptionID||0===e.subscriptionID},t.isSharingDetails=function(e){return Array.isArray(e.sharedSubscriptions)},t.isSubscription=function(e){return!!(null==e?void 0:e.subscriptionID)||0===(null==e?void 0:e.subscriptionID)},t.isSubscriptionSummary=function(e){return!!(null==e?void 0:e.subscriptionID)&&!(null==e?void 0:e.events)&&!(null==e?void 0:e.clientID)},t.isSubscriptionDetail=function(e){return!!(null==e?void 0:e.subscriptionID)&&!!(null==e?void 0:e.events)},t.isAddress=function(e){return!!e.country},t.isGiftRecipientResponse=function(e){return!!e.subscriptionID&&void 0!==e.redeemCode}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isInitializedPayment=t.isCart=t.isPaginatedOrders=t.isOrderResponse=void 0,t.isOrderResponse=function(e){return!!e.orderNumber},t.isPaginatedOrders=function(e){return void 0!==e.start&&Array.isArray(e.orders)},t.isCart=function(e){return!!e.items},t.isInitializedPayment=function(e){return!!e.orderNumber}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ONGOING_FETCHES=void 0;var n=r(5);t.ONGOING_FETCHES=new Set,t.default=function(e,r,i){return void 0===r&&(r={}),t.ONGOING_FETCHES[i]?Promise.reject("".concat(n.logPrefix," ").concat(i," cannot be called until the previous to ").concat(i," completes")):(t.ONGOING_FETCHES[i]=!0,fetch(e,r).finally((function(){t.ONGOING_FETCHES[i]=!1})))}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isUserIdentity=t.isUpdatePasswordSuccessResponse=void 0,t.isUpdatePasswordSuccessResponse=function(e){return void 0!==e.userName},t.isUserIdentity=function(e){return void 0!==e.uuid}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isFacebookLoginResponse=t.isGoogleCredentialResponse=t.isLegacyGoogleSetting=void 0,t.isLegacyGoogleSetting=function(e){return void 0!==e.auth2},t.isGoogleCredentialResponse=function(e){return void 0!==e.credential},t.isFacebookLoginResponse=function(e){return void 0!==e.status}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isAPIErrorResponse=void 0,t.isAPIErrorResponse=function(e){return void 0!==e.code&&void 0!==e.message}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),i=r(32),o=n.__importDefault(r(3));t.default=function(e){return n.__awaiter(this,void 0,void 0,(function(){var t;return n.__generator(this,(function(r){switch(r.label){case 0:return[4,o.default.getConfig()];case 1:if(t=r.sent(),(0,i.isConfigOptions)(t)&&t.checkoutRecaptchaEnabled&&!e)throw{code:"130001",message:"Captcha token invalid"};return[2,!0]}}))}))}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RecaptchaMethod=void 0;var n,i=r(0),o=i.__importDefault(r(2)),a=r(24);!function(e){e.SIGN_IN="SIGN_IN",e.SIGN_UP="SIGN_UP",e.MAGIC_LINK="MAGIC_LINK",e.RESET_PASSWORD="RESET_PASSWORD"}(n||(t.RecaptchaMethod=n={})),t.default=function(e,t){return i.__awaiter(this,void 0,void 0,(function(){var r;return i.__generator(this,(function(i){switch(i.label){case 0:return[4,o.default.getConfig()];case 1:if(r=i.sent(),(0,a.isConfigOptions)(r)&&(e===n.MAGIC_LINK&&r.magicLinkRecaptcha||e===n.SIGN_IN&&r.signinRecaptcha||e===n.SIGN_UP&&r.signupRecaptcha||e===n.RESET_PASSWORD&&r.resetPasswordRecaptcha)&&!t)throw{code:"130001",message:"Captcha token invalid"};return[2,!0]}}))}))}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.signOnSwgUser=t.googleSignOn=t.deprecationMessage=void 0;var n=r(0),i=r(19),o=r(14),a=r(21),s=n.__importDefault(r(2));t.deprecationMessage="Legacy Google Sign In will be deprecated on Dec 31, 2022. Use the new Arc Identity & Sign In With Google SDKs.";t.googleSignOn=function(e){return n.__awaiter(void 0,void 0,void 0,(function(){var r,i,c,l;return n.__generator(this,(function(n){switch(n.label){case 0:if(console.error(t.deprecationMessage),e)return[2,u(e)];n.label=1;case 1:return n.trys.push([1,7,,8]),(0,o.isLegacyGoogleSetting)(s.default._google)?s.default._google.authInstance?[3,3]:[4,(0,a.getGoogleAuthInstance)()]:[3,5];case 2:n.sent(),n.label=3;case 3:return(r=s.default._google.authInstance)&&r.isSignedIn.get()?[2,u(r.currentUser.get())]:[4,null===(l=s.default._google.authInstance)||void 0===l?void 0:l.signIn({prompt:"select_account"})];case 4:return i=n.sent(),[2,u(i)];case 5:throw c=new Error("[Arc Identity SDK] - This method will only work with the legacy Google Sign In. Discontinue use of this method."),console.error(c),c;case 6:return[3,8];case 7:throw n.sent();case 8:return[2]}}))}))};t.signOnSwgUser=function(e){var r=e.idToken,u=e.swgSubscriptionTokenResponse;return n.__awaiter(void 0,void 0,void 0,(function(){var e,c,l,d,f;return n.__generator(this,(function(n){switch(n.label){case 0:return console.error(t.deprecationMessage),r?[2,(0,i.socialLogin)("google",{credentials:r})]:[3,1];case 1:return u?(s.default.userIdentity={uuid:u.profileId,accessToken:u.accessToken,refreshToken:u.refreshToken},[2,s.default.heartbeat()]):[3,2];case 2:return[4,(0,a.getGoogleAuthInstance)()];case 3:if(n.sent(),(0,o.isLegacyGoogleSetting)(s.default._google)){if(null===(d=s.default._google.authInstance)||void 0===d?void 0:d.isSignedIn.get())return e=null===(f=s.default._google.authInstance)||void 0===f?void 0:f.currentUser.get(),c=e.getAuthResponse().id_token,[2,(0,i.socialLogin)("google",{credentials:c})];throw new Error("[Arc Identity SDK] - No google user logged in.")}throw l=new Error("[Arc Identity SDK] - This method will only work with the legacy Google Sign In. Discontinue use of this method."),console.error(l),l;case 4:return[2]}}))}))};var u=function(e){console.error(t.deprecationMessage);var r=e.getAuthResponse().id_token;if((0,o.isLegacyGoogleSetting)(s.default._google))return(0,i.socialLogin)("google",{credentials:r}).then((function(e){if((0,o.isLegacyGoogleSetting)(s.default._google))return s.default._google.onSuccess&&s.default._google.onSuccess(),e;throw new Error("[Arc Identity SDK] - This method will only work with the legacy Google Sign In. Discontinue use of this method.")})).catch((function(e){throw(0,o.isLegacyGoogleSetting)(s.default._google)?(s.default._google.onFailure&&s.default._google.onFailure(),e):new Error("[Arc Identity SDK] - This method will only work with the legacy Google Sign In. Discontinue use of this method.")}));throw new Error("[Arc Identity SDK] - This method will only work with the legacy Google Sign In. Discontinue use of this method.")};t.default=t.googleSignOn},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.socialLogin=void 0;var n=r(0),i=n.__importDefault(r(2)),o=r(13),a=r(4),s=n.__importDefault(r(7));t.socialLogin=function(e,t){return n.__awaiter(this,void 0,void 0,(function(){var r;return n.__generator(this,(function(u){switch(u.label){case 0:return r=n.__assign({},a.headers),i.default.userIdentity&&i.default.userIdentity.accessToken&&i.default.userIdentity.refreshToken?[4,i.default.heartbeat()]:[3,2];case 1:u.sent(),r.Authorization="Bearer ".concat(i.default.userIdentity.accessToken),u.label=2;case 2:return[2,fetch("".concat(i.default.apiOrigin,"/identity/public/v1/auth/login"),{method:"POST",headers:r,body:JSON.stringify(n.__assign(n.__assign({},t),{userName:"",grantType:e}))}).then(s.default).then((function(t){if((0,o.isUserIdentity)(t))return localStorage.removeItem(a.PROFILE_STORAGE_KEY_EXPIRED_TIME),i.default.userIdentity=t,window.postMessage({type:"ARC_LOGIN_SUCCESS",grantType:e},"*"),t;throw t}))]}}))}))}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isSignUpResponse=t.isUserProfile=void 0,t.isUserProfile=function(e){return void 0!==e.uuid},t.isSignUpResponse=function(e){return void 0!==e.uuid}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.initGoogleLogin=t.initGoogleAuthSDK=t.initGoogleAuth=t.getGoogleAuthInstance=t.loadGoogleAuthSDK=t.GOOGLE_SDK_URL=void 0;var n=r(0),i=r(18),o=r(14),a=n.__importDefault(r(2)),s=r(18);t.GOOGLE_SDK_URL="https://apis.google.com/js/platform.js";t.loadGoogleAuthSDK=function(e){return console.error(s.deprecationMessage),new Promise((function(r,i){return n.__awaiter(void 0,void 0,void 0,(function(){var s,u;return n.__generator(this,(function(c){switch(c.label){case 0:return document.querySelector('[src="'.concat(t.GOOGLE_SDK_URL,'"]'))?[3,1]:((s=document.createElement("script")).onload=function(){var t=this;window.gapi.load("auth2",(function(){return n.__awaiter(t,void 0,void 0,(function(){var t,s,u,c;return n.__generator(this,(function(l){switch(l.label){case 0:if(a.default._google=n.__assign(n.__assign({},a.default._google),{auth2:null!==(u=null===(s=window.gapi)||void 0===s?void 0:s.auth2)&&void 0!==u?u:(0,o.isLegacyGoogleSetting)(a.default._google)&&(null===(c=a.default._google)||void 0===c?void 0:c.auth2)}),!e)return[3,4];l.label=1;case 1:return l.trys.push([1,3,,4]),[4,e()];case 2:return l.sent(),[3,4];case 3:return t=l.sent(),[2,i(t)];case 4:return[2,r()]}}))}))}))},s.onerror=function(){i("[Arc Identity SDK] - Error loading Google SDK")},s.async=!0,s.src=t.GOOGLE_SDK_URL,document.head.appendChild(s),[3,7]);case 1:return window.gapi?window.gapi.auth2?[3,2]:(window.gapi.load("auth2",(function(){return n.__awaiter(void 0,void 0,void 0,(function(){var t;return n.__generator(this,(function(n){switch(n.label){case 0:if(!e)return[3,4];n.label=1;case 1:return n.trys.push([1,3,,4]),[4,e()];case 2:return n.sent(),[3,4];case 3:return t=n.sent(),[2,i(t)];case 4:return[2,r()]}}))}))})),[3,7]):[2,i("[Arc Identity SDK] - Error loading Google SDK")];case 2:if(!e)return[3,6];c.label=3;case 3:return c.trys.push([3,5,,6]),[4,e()];case 4:return c.sent(),[3,6];case 5:return u=c.sent(),[2,i(u)];case 6:return[2,r()];case 7:return[2]}}))}))}))};t.getGoogleAuthInstance=function(){return console.error(s.deprecationMessage),new Promise((function(e,r){return n.__awaiter(void 0,void 0,void 0,(function(){var i;return n.__generator(this,(function(n){switch(n.label){case 0:return(0,o.isLegacyGoogleSetting)(a.default._google)?a.default._google.authInstance?(e(),[3,5]):[3,1]:[3,6];case 1:return a.default._google.auth2?(a.default._google.authInstance=a.default._google.auth2.getAuthInstance(),e(),[3,5]):[3,2];case 2:return n.trys.push([2,4,,5]),[4,(0,t.initGoogleAuthSDK)(a.default._google.clientId)];case 3:return n.sent(),e(),[3,5];case 4:return i=n.sent(),console.error("Error getting Google Auth instance."),r(i),[3,5];case 5:return[3,7];case 6:r("This method should only be used with the legacy Google Sign In. Migrate to the new Sign In With Google"),n.label=7;case 7:return[2]}}))}))}))};t.initGoogleAuth=function(e){return n.__awaiter(void 0,void 0,void 0,(function(){var t,r,i,u,c,l,d,f,_,p,h,g,v,y;return n.__generator(this,(function(b){switch(b.label){case 0:if(console.error(s.deprecationMessage),a.default._google=n.__assign(n.__assign({},a.default._google),{auth2:null!==(u=null===(i=window.gapi)||void 0===i?void 0:i.auth2)&&void 0!==u?u:(0,o.isLegacyGoogleSetting)(a.default._google)&&(null===(c=a.default._google)||void 0===c?void 0:c.auth2),clientId:null!=e?e:(0,o.isLegacyGoogleSetting)(a.default._google)?null===(l=a.default._google)||void 0===l?void 0:l.clientId:void 0}),!(null===(d=a.default._google)||void 0===d?void 0:d.auth2))throw new Error("[Arc Identity SDK] - Error loading Google SDK");return(null===(f=a.default._google)||void 0===f?void 0:f.clientId)||a.default.configOptions&&(!a.default.configOptions||a.default.configOptions.googleClientId)?[3,2]:[4,a.default.getConfig()];case 1:b.sent(),b.label=2;case 2:if(a.default._google.clientId=null!==(p=null===(_=a.default._google)||void 0===_?void 0: