@shopify/app-bridge-react 3.7.2 → 3.7.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +6 -4
- package/umd/index.js +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shopify/app-bridge-react",
|
|
3
|
-
"version": "3.7.
|
|
3
|
+
"version": "3.7.3",
|
|
4
4
|
"types": "index.d.ts",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"unpkg": "umd/index.js",
|
|
@@ -33,19 +33,21 @@
|
|
|
33
33
|
"build:tsc": "NODE_ENV=production tsc",
|
|
34
34
|
"build:umd": "NODE_ENV=production webpack -p",
|
|
35
35
|
"check": "tsc",
|
|
36
|
-
"clean": "
|
|
36
|
+
"clean": "yarn clean:tsc && yarn clean:umd",
|
|
37
|
+
"clean:tsc": "NODE_ENV=production tsc --build --clean",
|
|
38
|
+
"clean:umd": "rm -rf ./umd",
|
|
37
39
|
"pack": "yarn pack",
|
|
38
40
|
"size": "size-limit"
|
|
39
41
|
},
|
|
40
42
|
"sideEffects": false,
|
|
41
43
|
"size-limit": [
|
|
42
44
|
{
|
|
43
|
-
"limit": "
|
|
45
|
+
"limit": "36 KB",
|
|
44
46
|
"path": "index.js"
|
|
45
47
|
}
|
|
46
48
|
],
|
|
47
49
|
"dependencies": {
|
|
48
|
-
"@shopify/app-bridge": "^3.7.
|
|
50
|
+
"@shopify/app-bridge": "^3.7.3"
|
|
49
51
|
},
|
|
50
52
|
"devDependencies": {
|
|
51
53
|
"@shopify/react-testing": "^4.1.1",
|
package/umd/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("app-bridge-react",[],e):"object"==typeof exports?exports["app-bridge-react"]=e():t["app-bridge-react"]=e()}(window,(function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=56)}([function(t,e,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.NonSnakeCaseGroup=e.findMatchInEnum=e.forEachInEnum=e.getMergedProps=e.updateActionFromPayload=e.isValidOptionalString=e.isValidOptionalNumber=e.getEventNameSpace=e.getVersion=e.actionWrapper=void 0;var i=n(25),u=o(n(66)),a=n(1),c=n(67);function s(){return c.version}function p(t,e){var n=u.default(t,e);return n||Object.assign(t,e)}e.actionWrapper=function(t){return r(r({},t),{version:s(),clientInterface:{name:c.name,version:s()}})},e.getVersion=s,e.getEventNameSpace=function(t,n,r){if(n.startsWith(""+i.PREFIX+i.SEPARATOR))return n;var o=function(t){if(e.NonSnakeCaseGroup.includes(t))return t.toUpperCase();return(n=t,n.replace(/([A-Z])/g,(function(t,e,n){return(0===n?"":"_")+t[0].toLowerCase()}))).toUpperCase();var n}(t);if(r){var u=r.subgroups,a=r.type;u&&u.length>0&&(o+=o.length>0?i.SEPARATOR:"",u.forEach((function(t,e){o+=""+t.toUpperCase()+(e<u.length-1?i.SEPARATOR:"")}))),a!==t&&a&&(o+=""+(o.length>0?i.SEPARATOR:"")+a.toUpperCase())}return o&&(o+=""+(o.length>0?i.SEPARATOR:"")+n.toUpperCase()),""+i.PREFIX+i.SEPARATOR+o},e.isValidOptionalNumber=function(t){return null==t||"number"==typeof t},e.isValidOptionalString=function(t){return null==t||"string"==typeof t},e.updateActionFromPayload=function(t,e){return t.id===e.id&&(Object.assign(t,p(t,e)),!0)},e.getMergedProps=p,e.forEachInEnum=function(t,e){Object.keys(t).forEach((function(n){e(t[n])}))},e.findMatchInEnum=function(t,e){var n=Object.keys(t).find((function(n){return e===t[n]}));return n?t[n]:void 0},e.NonSnakeCaseGroup=[a.Group.AuthCode,a.Group.Button,a.Group.ButtonGroup,a.Group.Cart,a.Group.Error,a.Group.Features,a.Group.Fullscreen,a.Group.Link,a.Group.Loading,a.Group.Menu,a.Group.Modal,a.Group.Navigation,a.Group.Pos,a.Group.Print,a.Group.ResourcePicker,a.Group.Scanner,a.Group.SessionToken,a.Group.Share,a.Group.TitleBar,a.Group.Toast,a.Group.unstable_Picker]},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ComponentType=e.Group=void 0,function(t){t.AuthCode="AuthCode",t.Button="Button",t.ButtonGroup="ButtonGroup",t.Cart="Cart",t.Client="Client",t.ContextualSaveBar="ContextualSaveBar",t.Error="Error",t.Features="Features",t.FeedbackModal="FeedbackModal",t.Fullscreen="Fullscreen",t.LeaveConfirmation="LeaveConfirmation",t.Link="Link",t.Loading="Loading",t.Menu="Menu",t.Modal="Modal",t.Navigation="Navigation",t.Performance="Performance",t.Pos="Pos",t.Print="Print",t.ResourcePicker="Resource_Picker",t.unstable_Picker="unstable_Picker",t.Scanner="Scanner",t.SessionToken="SessionToken",t.Share="Share",t.TitleBar="TitleBar",t.Toast="Toast",t.MarketingExternalActivityTopBar="MarketingExternalActivityTopBar",t.WebVitals="WebVitals"}(e.Group||(e.Group={})),function(t){t.Button="Button",t.ButtonGroup="ButtonGroup"}(e.ComponentType||(e.ComponentType={}))},function(t,e,n){"use strict";t.exports=n(57)},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},u=this&&this.__spreadArray||function(t,e){for(var n=0,r=e.length,o=t.length;n<r;n++,o++)t[o]=e[n];return t},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.ActionSetWithChildren=e.ActionSet=void 0;var c=n(9),s=n(18),p=n(7),l=n(1),f=a(n(26)),d=n(0),h=function(){function t(t,e,n,r){var o=this;this.app=t,this.type=e,this.group=n,this.subgroups=[],this.subscriptions=[],t||p.throwError(p.Action.INVALID_ACTION,"Missing required `app`"),this.id=r||f.default(),this.defaultGroup=n;var i=this.set;this.set=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return o.app.hooks?(t=o.app.hooks).run.apply(t,u([c.LifecycleHook.UpdateAction,i,o],e)):i.apply(o,e)}}return t.prototype.set=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e]},Object.defineProperty(t.prototype,"component",{get:function(){return{id:this.id,subgroups:this.subgroups,type:this.type}},enumerable:!1,configurable:!0}),t.prototype.updateSubscription=function(t,e,n){var r,o=t.eventType,i=t.callback,u=t.component;return(r=this.subscriptions.findIndex((function(e){return e===t})))>=0?this.subscriptions[r].unsubscribe():r=void 0,this.group=e,this.subgroups=n,Object.assign(u,{subgroups:this.subgroups}),this.subscribe(o,i,u,r)},t.prototype.error=function(t){var e=this,n=[];return d.forEachInEnum(p.Action,(function(r){n.push(e.subscriptions.length),e.subscribe(r,t)})),function(){n.map((function(t){return e.subscriptions[t]})).forEach((function(t){s.removeFromCollection(e.subscriptions,t,(function(t){t.unsubscribe()}))}))}},t.prototype.subscribe=function(t,e,n,r){var o,u=this,a=n||this.component,c=t.toUpperCase(),s="number"==typeof r?e:e.bind(this);o=p.isErrorEventName(t)?d.getEventNameSpace(l.Group.Error,t,i(i({},a),{type:""})):d.getEventNameSpace(this.group,t,a);var f=this.app.subscribe(o,s,n?n.id:this.id),h={eventType:c,unsubscribe:f,callback:s,component:a,updateSubscribe:function(t,e){return u.updateSubscription(h,t,e)}};return"number"==typeof r&&r>=0&&r<this.subscriptions.length?this.subscriptions[r]=h:this.subscriptions.push(h),f},t.prototype.unsubscribe=function(t){return void 0===t&&(t=!1),v(this.subscriptions,this.defaultGroup,t),this},t}();e.ActionSet=h;var y=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.children=[],e}return o(e,t),e.prototype.unsubscribe=function(t,n){return void 0===t&&(t=!0),void 0===n&&(n=!1),v(this.subscriptions,this.defaultGroup,n),this.children.forEach((function(n){n instanceof e?n.unsubscribe(t,!t):n.unsubscribe(!t)})),this},e.prototype.getChild=function(t){var e=this.children.findIndex((function(e){return e.id===t}));return e>=0?this.children[e]:void 0},e.prototype.getChildIndex=function(t){return this.children.findIndex((function(e){return e.id===t}))},e.prototype.getChildSubscriptions=function(t,e){return this.subscriptions.filter((function(n){return n.component.id===t&&(!e||e===n.eventType)}))},e.prototype.addChild=function(t,n,r){var o=this,i=t.subscriptions;return this.getChild(t.id)||this.children.push(t),!i||n===t.group&&r===t.subgroups||(i.forEach((function(t){(0,t.updateSubscribe)(n,r)})),Object.assign(t,{group:n,subgroups:r}),t instanceof e&&t.children.forEach((function(t){return o.addChild(t,n,r)}))),this},e.prototype.removeChild=function(t){var e=this;return s.removeFromCollection(this.children,this.getChild(t),(function(){e.subscriptions.filter((function(e){return e.component.id===t})).forEach((function(t){s.removeFromCollection(e.subscriptions,t,(function(t){t.unsubscribe()}))}))})),this},e.prototype.subscribeToChild=function(t,e,n){var r=this,o=n.bind(this);if(e instanceof Array)return e.forEach((function(e){return r.subscribeToChild(t,e,n)})),this;if("string"!=typeof e)return this;var i=e.toUpperCase(),u=this.getChildSubscriptions(t.id,i);if(u.length>0)u.forEach((function(e){return e.updateSubscribe(r.group,t.subgroups)}));else{var a={id:t.id,subgroups:t.subgroups,type:t.type};this.subscribe(i,o,a)}return this},e.prototype.getUpdatedChildActions=function(t,e){if(0!==t.length){for(var n=t.filter((function(t,e,n){return e===n.indexOf(t)})),r=n.map((function(t){return t.id})),o=e.filter((function(t){return r.indexOf(t.id)<0}));o.length>0;){if(!(i=o.pop()))break;this.removeChild(i.id)}return n}for(;e.length>0;){var i;if(!(i=e.pop()))break;this.removeChild(i.id)}},e}(h);function v(t,e,n){void 0===n&&(n=!1),t.forEach((function(t){n?(0,t.updateSubscribe)(e,[]):(0,t.unsubscribe)()})),n||(t.length=0)}e.ActionSetWithChildren=y},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.useAppBridge=void 0;var r=n(2),o=n(5);e.useAppBridge=function(){var t=r.useContext(o.AppBridgeContext);if(!t)throw new Error("No AppBridge context provided. Your component must be wrapped in the <Provider> component from App Bridge React.");return t}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AppBridgeContext=void 0;var r=n(2);e.AppBridgeContext=r.createContext(null)},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.Button=e.isValidButtonProps=e.update=e.clickButton=e.Style=e.Icon=e.Action=void 0;var u,a=n(0),c=n(3),s=n(1);function p(t,e,n){var r=e.id,o=a.getEventNameSpace(t,u.CLICK,e),i={id:r,payload:n};return a.actionWrapper({type:o,group:t,payload:i})}function l(t,e,n){var r=e.id,o=n.label,c=a.getEventNameSpace(t,u.UPDATE,e),s=i(i({},n),{id:r,label:o});return a.actionWrapper({type:c,group:t,payload:s})}!function(t){t.CLICK="CLICK",t.UPDATE="UPDATE"}(u=e.Action||(e.Action={})),function(t){t.Print="print"}(e.Icon||(e.Icon={})),function(t){t.Danger="danger"}(e.Style||(e.Style={})),e.clickButton=p,e.update=l,e.isValidButtonProps=function(t){return"string"==typeof t.id&&"string"==typeof t.label};var f=function(t){function e(e,n){var r=t.call(this,e,s.ComponentType.Button,s.Group.Button)||this;return r.disabled=!1,r.loading=!1,r.plain=!1,r.set(n,!1),r}return o(e,t),Object.defineProperty(e.prototype,"options",{get:function(){return{disabled:this.disabled,icon:this.icon,label:this.label,style:this.style,loading:this.loading,plain:this.plain}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"payload",{get:function(){return i(i({},this.options),{id:this.id})},enumerable:!1,configurable:!0}),e.prototype.set=function(t,e){void 0===e&&(e=!0);var n=a.getMergedProps(this.options,t),r=n.label,o=n.disabled,i=n.icon,c=n.style,s=n.loading,p=n.plain;return this.label=r,this.disabled=Boolean(o),this.icon=i,this.style=c,this.loading=Boolean(s),this.plain=Boolean(p),e&&this.dispatch(u.UPDATE),this},e.prototype.dispatch=function(t,e){switch(t){case u.CLICK:this.app.dispatch(p(this.group,this.component,e));break;case u.UPDATE:var n=l(this.group,this.component,this.payload);this.app.dispatch(n)}return this},e}(c.ActionSet);e.Button=f,e.create=function(t,e){return new f(t,e)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.throwError=e.fromAction=e.AppBridgeError=e.invalidOriginAction=e.isErrorEventName=e.permissionAction=e.networkAction=e.persistenceAction=e.unsupportedOperationAction=e.unexpectedAction=e.invalidAction=e.invalidActionType=e.invalidPayload=e.Message=e.AppActionType=e.Action=void 0;var r,o=n(0),i=n(1);function u(t,e,n){var r=e.payload;return o.actionWrapper({type:t,group:i.Group.Error,payload:{action:e,message:n,type:t,id:r&&r.id?r.id:void 0}})}!function(t){t.INVALID_ACTION="APP::ERROR::INVALID_ACTION",t.INVALID_ACTION_TYPE="APP::ERROR::INVALID_ACTION_TYPE",t.INVALID_PAYLOAD="APP::ERROR::INVALID_PAYLOAD",t.INVALID_OPTIONS="APP::ERROR::INVALID_OPTIONS",t.UNEXPECTED_ACTION="APP::ERROR::UNEXPECTED_ACTION",t.PERSISTENCE="APP::ERROR::PERSISTENCE",t.UNSUPPORTED_OPERATION="APP::ERROR::UNSUPPORTED_OPERATION",t.NETWORK="APP::ERROR::NETWORK",t.PERMISSION="APP::ERROR::PERMISSION",t.FAILED_AUTHENTICATION="APP::ERROR::FAILED_AUTHENTICATION",t.INVALID_ORIGIN="APP::ERROR::INVALID_ORIGIN"}(r=e.Action||(e.Action={})),function(t){t.INVALID_CONFIG="APP::ERROR::INVALID_CONFIG",t.MISSING_CONFIG="APP::APP_ERROR::MISSING_CONFIG",t.MISSING_APP_BRIDGE_MIDDLEWARE="APP::APP_ERROR::MISSING_APP_BRIDGE_MIDDLEWARE",t.WINDOW_UNDEFINED="APP::APP_ERROR::WINDOW_UNDEFINED",t.REDUX_REINSTANTIATED="APP::APP_ERROR::REDUX_REINSTANTIATED",t.MISSING_LOCAL_ORIGIN="APP::APP_ERROR::MISSING_LOCAL_ORIGIN",t.MISSING_HOST_PROVIDER="APP::APP_ERROR::MISSING_HOST_PROVIDER",t.MISSING_ROUTER_CONTEXT="APP::APP_ERROR::MISSING_ROUTER_CONTEXT",t.MISSING_HISTORY_BLOCK="APP::APP_ERROR::MISSING_HISTORY_BLOCK"}(e.AppActionType||(e.AppActionType={})),function(t){t.MISSING_PAYLOAD="Missing payload",t.INVALID_PAYLOAD_ID="Id in payload is missing or invalid"}(e.Message||(e.Message={})),e.invalidPayload=function(t,e){return u(r.INVALID_PAYLOAD,t,e||"The action's payload is missing required properties or has invalid properties")},e.invalidActionType=function(t,e){return o.actionWrapper({group:i.Group.Error,payload:{action:t,message:e||"The action type is invalid or unsupported",type:r.INVALID_ACTION_TYPE},type:r.INVALID_ACTION_TYPE})},e.invalidAction=function(t,e){return o.actionWrapper({group:i.Group.Error,payload:{action:t,message:e||"The action's has missing/invalid values for `group`, `type` or `version`",type:r.INVALID_ACTION},type:r.INVALID_ACTION})},e.unexpectedAction=function(t,e){return o.actionWrapper({group:i.Group.Error,payload:{action:t,message:e||"Action cannot be called at this time",type:r.UNEXPECTED_ACTION},type:r.UNEXPECTED_ACTION})},e.unsupportedOperationAction=function(t,e){return u(r.UNSUPPORTED_OPERATION,t,e||"The action type is unsupported")},e.persistenceAction=function(t,e){return u(r.PERSISTENCE,t,e||"Action cannot be persisted on server")},e.networkAction=function(t,e){return u(r.NETWORK,t,e||"Network error")},e.permissionAction=function(t,e){return u(r.PERMISSION,t,e||"Action is not permitted")},e.isErrorEventName=function(t){return"string"==typeof o.findMatchInEnum(r,t)},e.invalidOriginAction=function(t){return o.actionWrapper({group:i.Group.Error,payload:{message:t,type:r.INVALID_ORIGIN},type:r.INVALID_ORIGIN})};var a=function(t){this.name="AppBridgeError",this.message=t,"function"==typeof Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error(this.message).stack};function c(t,e,n){var r=new a(t?e+": "+t:e);return r.action=n,r.type=e,r}e.AppBridgeError=a,a.prototype=Object.create(Error.prototype),e.fromAction=c,e.throwError=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n,r,o=t[0];throw"string"==typeof t[1]?n=t[1]:(r=t[1],n=t[2]||""),c(n,o,r)}},function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),o=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&r(e,t,n);return o(e,t),e},u=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),e.WebVitals=e.unstable_Picker=e.Performance=e.Pos=e.AppLink=e.ChannelMenu=e.NavigationMenu=e.Share=e.ContextualSaveBar=e.MarketingExternalActivityTopBar=e.TitleBar=e.SessionToken=e.ResourcePicker=e.Redirect=e.Print=e.ModalContent=e.Modal=e.Loading=e.LeaveConfirmation=e.History=e.Toast=e.Fullscreen=e.FeedbackModal=e.Features=e.Flash=e.Error=e.Client=e.Cart=e.Scanner=e.ButtonGroup=e.Button=e.AuthCode=e.isAppBridgeAction=void 0;var a=i(n(30));e.AuthCode=a;var c=i(n(6));e.Button=c;var s=i(n(10));e.ButtonGroup=s;var p=i(n(71));e.Cart=p;var l=i(n(31));e.Client=l;var f=i(n(7));e.Error=f;var d=i(n(72));e.Flash=d;var h=i(n(32));e.Features=h;var y=i(n(75));e.FeedbackModal=y;var v=i(n(76));e.Fullscreen=v;var b=i(n(77));e.LeaveConfirmation=b;var _=i(n(78));e.Loading=_;var A=i(n(11));e.Modal=A;var P=i(n(79));e.ModalContent=P;var O=i(n(80));e.History=O;var g=i(n(16));e.Redirect=g;var E=i(n(33));e.Print=E;var m=i(n(34));e.ResourcePicker=m;var T=i(n(81));e.Scanner=T;var S=i(n(29));e.SessionToken=S;var C=i(n(35));e.TitleBar=C;var I=i(n(15));e.Toast=I;var R=i(n(36));e.ContextualSaveBar=R;var w=i(n(83));e.Share=w;var M=i(n(37));e.NavigationMenu=M;var j=i(n(84));e.ChannelMenu=j;var N=i(n(17));e.AppLink=N;var D=i(n(85));e.Pos=D;var L=i(n(86));e.MarketingExternalActivityTopBar=L;var U=i(n(87));e.Performance=U;var B=i(n(38));e.unstable_Picker=B;var x=i(n(39));e.WebVitals=x;var k=n(27);Object.defineProperty(e,"isAppBridgeAction",{enumerable:!0,get:function(){return k.isAppBridgeAction}}),u(n(1),e)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LifecycleHook=e.MessageType=e.PermissionType=e.isV1Config=void 0,e.isV1Config=function(t){return!t.host},function(t){t.Dispatch="Dispatch",t.Subscribe="Subscribe"}(e.PermissionType||(e.PermissionType={})),function(t){t.GetState="getState",t.Dispatch="dispatch",t.Subscribe="subscribe",t.Unsubscribe="unsubscribe"}(e.MessageType||(e.MessageType={})),function(t){t.UpdateAction="UpdateAction",t.DispatchAction="DispatchAction"}(e.LifecycleHook||(e.LifecycleHook={}))},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.ButtonGroup=e.isGroupedButtonPayload=e.isGroupedButton=e.update=e.Action=void 0;var u,a=n(12),c=n(0),s=n(3),p=n(1);function l(t,e,n){return function(t,e,n,r,o){var u=e.id,a=r.label,s=c.getEventNameSpace(t,n,e),p=i(i({},r),{id:u,label:a,payload:o});return c.actionWrapper({type:s,group:t,payload:p})}(t,e,u.UPDATE,n)}!function(t){t.UPDATE="UPDATE"}(u=e.Action||(e.Action={})),e.update=l,e.isGroupedButton=function(t){var e=t;return e.buttons&&e.buttons.length>0&&void 0!==e.label},e.isGroupedButtonPayload=function(t){var e=t;return Array.isArray(e.buttons)&&"string"==typeof e.id&&"string"==typeof e.label};var f=function(t){function e(e,n){var r=t.call(this,e,p.ComponentType.ButtonGroup,p.Group.ButtonGroup)||this;return r.disabled=!1,r.plain=!1,r.buttonsOptions=[],r.buttons=[],r.set(n,!1),r}return o(e,t),Object.defineProperty(e.prototype,"options",{get:function(){return{buttons:this.buttonsOptions,disabled:this.disabled,label:this.label,plain:this.plain}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"payload",{get:function(){return i(i({},this.options),{buttons:this.buttons,id:this.id})},enumerable:!1,configurable:!0}),e.prototype.set=function(t,e){void 0===e&&(e=!0);var n=c.getMergedProps(this.options,t),r=n.label,o=n.disabled,i=n.buttons,a=n.plain;return this.label=r,this.disabled=Boolean(o),this.buttons=this.getButtons(i),this.plain=Boolean(a),e&&this.dispatch(u.UPDATE),this},e.prototype.dispatch=function(t){switch(t){case u.UPDATE:var e=l(this.group,this.component,this.payload);this.app.dispatch(e)}return this},e.prototype.updateButtons=function(t){if(this.buttons&&0!==this.buttons.length){for(var e,n=0,r=this.buttons;n<r.length;n++){var o=r[n];if(e=c.updateActionFromPayload(o,t))break}e&&this.dispatch(u.UPDATE)}},e.prototype.getSingleButton=function(t){return a.getSingleButton(this,t,this.subgroups,this.updateButtons)},e.prototype.getButtons=function(t){var e=this,n=[];return t?(t.forEach((function(t){var r=a.getSingleButton(e,t,e.subgroups,e.updateButtons);n.push(r)})),this.buttonsOptions=t,n):[]},e}(s.ActionSetWithChildren);e.ButtonGroup=f,e.create=function(t,e){return new f(t,e)}},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.ModalIframe=e.ModalMessage=e.Modal=e.isMessageModal=e.isIframeModal=e.data=e.update=e.clickFooterButton=e.updateModalSize=e.closeModal=e.openModal=e.Size=e.Action=void 0;var u,a,c=n(12),s=n(0),p=n(3),l=n(1),f=n(6);!function(t){t.OPEN="APP::MODAL::OPEN",t.CLOSE="APP::MODAL::CLOSE",t.UPDATE="APP::MODAL::UPDATE",t.UPDATE_CONTENT="APP::MODAL::CONTENT::UPDATE",t.FOOTER_BUTTON_CLICK="APP::MODAL::FOOTER::BUTTON::CLICK",t.FOOTER_BUTTON_UPDATE="APP::MODAL::FOOTER::BUTTON::UPDATE",t.UPDATE_SIZE="APP::MODAL::UPDATE_SIZE",t.DATA="APP::MODAL::DATA"}(u=e.Action||(e.Action={})),function(t){t.Small="small",t.Medium="medium",t.Large="large",t.Full="full",t.Auto="auto"}(a=e.Size||(e.Size={}));var d={group:l.Group.Modal,subgroups:["Footer"],type:l.ComponentType.Button};function h(t){return s.actionWrapper({group:l.Group.Modal,payload:t,type:u.OPEN})}function y(t){return s.actionWrapper({group:l.Group.Modal,payload:t,type:u.CLOSE})}function v(t){return s.actionWrapper({payload:t,group:l.Group.Modal,type:u.UPDATE})}function b(t){return s.actionWrapper({payload:t,group:l.Group.Modal,type:u.DATA})}function _(t){return"string"==typeof t.url||"string"==typeof t.path}e.openModal=h,e.closeModal=y,e.updateModalSize=function(t){return s.actionWrapper({group:l.Group.Modal,payload:t,type:u.UPDATE_SIZE})},e.clickFooterButton=function(t,e){var n=i({id:t},d);return f.clickButton(l.Group.Modal,n,e)},e.update=v,e.data=b,e.isIframeModal=_,e.isMessageModal=function(t){return"string"==typeof t.message};var A=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.size=a.Small,e}return o(e,t),Object.defineProperty(e.prototype,"footer",{get:function(){if(this.footerPrimary||this.footerSecondary)return{buttons:{primary:this.footerPrimary,secondary:this.footerSecondary}}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"footerOptions",{get:function(){if(this.footerPrimaryOptions||this.footerSecondaryOptions)return{buttons:{primary:this.footerPrimaryOptions,secondary:this.footerSecondaryOptions}}},enumerable:!1,configurable:!0}),e.prototype.close=function(){this.app.dispatch(y({id:this.id}))},e.prototype.setFooterPrimaryButton=function(t,e){var n=this,r=d.subgroups;this.footerPrimaryOptions=this.getChildButton(t,this.footerPrimaryOptions),this.footerPrimary=this.footerPrimaryOptions?c.getSingleButton(this,this.footerPrimaryOptions,r,(function(t){n.updatePrimaryFooterButton(t,e)})):void 0},e.prototype.setFooterSecondaryButtons=function(t,e){var n=this,r=d.subgroups,o=t||[],i=this.footerOptions&&this.footerOptions.buttons.secondary||[];this.footerSecondaryOptions=this.getUpdatedChildActions(o,i),this.footerSecondary=this.footerSecondaryOptions?this.footerSecondaryOptions.map((function(t){return c.getSingleButton(n,t,r,(function(t){n.updateSecondaryFooterButton(t,e)}))})):void 0},e.prototype.getChildButton=function(t,e){var n=t?[t]:[],r=e?[e]:[],o=this.getUpdatedChildActions(n,r);return o?o[0]:void 0},e.prototype.updatePrimaryFooterButton=function(t,e){this.footer&&this.footer.buttons.primary&&s.updateActionFromPayload(this.footer.buttons.primary,t)&&e()},e.prototype.updateSecondaryFooterButton=function(t,e){if(this.footer&&this.footer.buttons&&this.footer.buttons.secondary){for(var n,r=0,o=this.footer.buttons.secondary;r<o.length;r++){var i=o[r];if(n=s.updateActionFromPayload(i,t))break}n&&e()}},e}(p.ActionSetWithChildren);e.Modal=A;var P=function(t){function e(e,n){var r=t.call(this,e,l.Group.Modal,l.Group.Modal)||this;return r.set(n,!1),r}return o(e,t),Object.defineProperty(e.prototype,"payload",{get:function(){return i(i({},this.options),{footer:this.footer,id:this.id})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"options",{get:function(){return{footer:this.footerOptions,message:this.message,size:this.size,title:this.title}},enumerable:!1,configurable:!0}),e.prototype.set=function(t,e){var n=this;void 0===e&&(e=!0);var r=s.getMergedProps(this.options,t),o=r.title,i=r.footer,a=r.message,c=r.size;return this.title=o,this.message=a,this.size=c,this.setFooterPrimaryButton(i?i.buttons.primary:void 0,(function(){n.dispatch(u.UPDATE)})),this.setFooterSecondaryButtons(i?i.buttons.secondary:void 0,(function(){n.dispatch(u.UPDATE)})),e&&this.dispatch(u.UPDATE),this},e.prototype.dispatch=function(t){switch(t){case u.OPEN:this.app.dispatch(h(this.payload));break;case u.CLOSE:this.close();break;case u.UPDATE:this.app.dispatch(v(this.payload))}return this},e}(A);e.ModalMessage=P;var O=function(t){function e(e,n){var r=t.call(this,e,l.Group.Modal,l.Group.Modal)||this;return r.set(n,!1),r}return o(e,t),Object.defineProperty(e.prototype,"payload",{get:function(){return i(i({},this.options),{footer:this.footer,id:this.id})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"options",{get:function(){return{footer:this.footerOptions,path:this.path,size:this.size,title:this.title,url:this.url,loading:this.loading}},enumerable:!1,configurable:!0}),e.prototype.set=function(t,e){var n=this;void 0===e&&(e=!0);var r=s.getMergedProps(this.options,t),o=r.title,i=r.footer,a=r.path,c=r.url,p=r.size,l=r.loading;return this.title=o,this.url=c,this.path=a,this.size=p,this.loading=l,this.setFooterPrimaryButton(i?i.buttons.primary:void 0,(function(){n.dispatch(u.UPDATE)})),this.setFooterSecondaryButtons(i?i.buttons.secondary:void 0,(function(){n.dispatch(u.UPDATE)})),e&&this.dispatch(u.UPDATE),this},e.prototype.dispatch=function(t,e){switch(t){case u.OPEN:this.app.dispatch(h(this.payload));break;case u.CLOSE:this.close();break;case u.UPDATE:this.app.dispatch(v(this.payload));break;case u.DATA:this.app.dispatch(b(e||{}))}return this},e}(A);e.ModalIframe=O;e.create=function(t,e){return _(e)?new O(t,e):new P(t,e)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getSingleButton=void 0;var r=n(6);e.getSingleButton=function(t,e,n,o){return t.addChild(e,t.group,n),t.subscribeToChild(e,r.Action.UPDATE,o),e.payload}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createTransportListener=e.fromWindow=e.fromFrame=e.Context=void 0;var r=n(7),o=n(27),i=n(9),u=n(18),a=n(14);!function(t){t.Modal="Modal",t.Main="Main"}(e.Context||(e.Context={})),e.fromFrame=function(t,e,n){var i=[],c=t.host,s=t.window;if(!c)throw r.fromAction("App frame is undefined",r.AppActionType.WINDOW_UNDEFINED);return a.isUnframed&&window.MobileWebView&&Object.assign(window.MobileWebView,{postMessageToIframe:function(t,e){null==s||s.postMessage(t,e),function(t){return null!==t&&"object"==typeof t&&!Array.isArray(t)&&"dispatch"===t.type&&"object"==typeof t.payload}(t)&&c.postMessage(JSON.stringify(t.payload),location.origin)},updateIframeUrl:function(n){var r=window.location,o=(t.window||{}).location;try{new URL(n).origin===e&&o?o.replace(n):r.href=n}catch(t){}}}),c.addEventListener("message",(function(t){if(t.source!==c&&o.isAppMessage(t))if(t.origin===e)if(a.isUnframed&&window.MobileWebView){p=JSON.stringify({id:"unframed://fromClient",origin:e,data:t.data});window.MobileWebView.postMessage(p)}else for(var n=0,u=i;n<u.length;n++){(0,u[n])(t)}else{var p,l="Message origin '"+t.origin+"' does not match app origin '"+e+"'.",f={type:"dispatch",payload:p=r.invalidOriginAction(l)};null==s||s.postMessage(f,t.origin)}})),{context:n,localOrigin:e,frameWindow:s,hostFrame:c,dispatch:function(t){null==s||s.postMessage(t,e)},subscribe:function(t){return u.addAndRemoveFromCollection(i,t)}}},e.fromWindow=function(t,e){var n=[];return void 0!==typeof window&&window.addEventListener("message",(function(e){if((window!==t||a.isUnframed)&&e.source===t&&(o.isAppBridgeAction(e.data.payload)||o.isAppMessage(e)))for(var r=0,i=n;r<i.length;r++){(0,i[r])(e)}})),{localOrigin:e,hostFrame:t,dispatch:function(n){var r;if(null===(r=n.source)||void 0===r?void 0:r.host)if(a.isUnframed&&window&&window.MobileWebView){var o=JSON.stringify({id:"unframed://fromClient",origin:e,data:n});window.MobileWebView.postMessage(o)}else{var i=new URL("https://"+n.source.host).origin;t.postMessage(n,i)}},subscribe:function(t){return u.addAndRemoveFromCollection(n,t)}}},e.createTransportListener=function(){var t=[],e={};return{createSubscribeHandler:function(n){return function(){if(arguments.length<2)return u.addAndRemoveFromCollection(t,{callback:arguments[0]});var r=Array.from(arguments),o=r[0],a=r[1],c=r[2],s={callback:a,id:c},p={type:o,id:c};return Object.prototype.hasOwnProperty.call(e,o)||(e[o]=[]),n&&n(i.MessageType.Subscribe,p),u.addAndRemoveFromCollection(e[o],s,(function(){n&&n(i.MessageType.Unsubscribe,p)}))}},handleMessage:function(e){t.forEach((function(t){return t.callback(e)}))},handleActionDispatch:function(t){var n=t.type,r=t.payload,o=!1;if(Object.prototype.hasOwnProperty.call(e,n))for(var i=0,u=e[n];i<u.length;i++){var a=u[i],c=a.id,s=a.callback;!(r&&r.id===c)&&c||(s(r),o=!0)}return o}}}},function(t,e,n){"use strict";(function(t){var n,r;Object.defineProperty(e,"__esModule",{value:!0}),e.isUnframed=e.isDevelopmentClient=e.isProduction=e.isDevelopment=e.isClient=e.isServer=void 0,e.isServer="undefined"==typeof window,e.isClient=!e.isServer,e.isDevelopment=void 0!==t&&t.env&&!1,e.isProduction=!e.isDevelopment,e.isDevelopmentClient=e.isDevelopment&&e.isClient,e.isUnframed=e.isClient&&(null===(r=null===(n=window.navigator)||void 0===n?void 0:n.userAgent)||void 0===r?void 0:r.indexOf("Unframed"))>0}).call(this,n(68))},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.Toast=e.primaryAction=e.clear=e.show=e.Action=void 0;var u,a=n(0),c=n(3),s=n(1);function p(t){return a.actionWrapper({group:s.Group.Toast,payload:t,type:u.SHOW})}function l(t){return a.actionWrapper({payload:t,group:s.Group.Toast,type:u.CLEAR})}function f(t){return a.actionWrapper({payload:t,group:s.Group.Toast,type:u.ACTION})}!function(t){t.SHOW="APP::TOAST::SHOW",t.CLEAR="APP::TOAST::CLEAR",t.ACTION="APP::TOAST::ACTION"}(u=e.Action||(e.Action={})),e.show=p,e.clear=l,e.primaryAction=f;var d=function(t){function e(e,n){var r=t.call(this,e,s.Group.Toast,s.Group.Toast)||this;return r.message="",r.duration=5e3,r.set(n),r}return o(e,t),Object.defineProperty(e.prototype,"options",{get:function(){var t;return{duration:this.duration,isError:this.isError,message:this.message,action:(null===(t=this.action)||void 0===t?void 0:t.content)?{content:this.action.content}:void 0}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"payload",{get:function(){return i({id:this.id},this.options)},enumerable:!1,configurable:!0}),e.prototype.set=function(t){var e=a.getMergedProps(this.options,t),n=e.message,r=e.duration,o=e.isError,i=e.action;return this.message=n,this.duration=r,this.isError=o,this.action=(null==i?void 0:i.content)?{content:i.content||""}:void 0,this},e.prototype.dispatch=function(t){switch(t){case u.SHOW:var e=p(this.payload);this.app.dispatch(e);break;case u.CLEAR:this.app.dispatch(l({id:this.id}));break;case u.ACTION:this.app.dispatch(f({id:this.id}))}return this},e}(c.ActionSet);e.Toast=d,e.create=function(t,e){return new d(t,e)}},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.Redirect=e.isAdminSection=e.isRemotePayload=e.isAdminSectionPayload=e.isAdminPathPayload=e.isAppPayload=e.getRelativePath=e.normalizeUrl=e.getPathWithSearchAndHash=e.toDestination=e.toApp=e.toRemote=e.toAdminSection=e.toAdminPath=e.isProductVariantCreateResourcePayload=e.isProductVariantResourcePayload=e.isCreateResourcePayload=e.isResourcePayload=e.ResourceType=e.Action=void 0;var u,a=n(0),c=n(3),s=n(1);function p(t){return!0===t.create}function l(t){var e=t;return void 0!==e.id&&void 0!==e.variant}function f(t){return a.actionWrapper({payload:t,group:s.Group.Navigation,type:u.ADMIN_PATH})}function d(t){return a.actionWrapper({payload:t,group:s.Group.Navigation,type:u.ADMIN_SECTION})}function h(t){return a.actionWrapper({payload:t,group:s.Group.Navigation,type:u.REMOTE})}function y(t){return a.actionWrapper({payload:t,group:s.Group.Navigation,type:u.APP})}function v(t,e,n){switch(t){case u.APP:var r=A(e)?e:{path:e};return y(i({id:n},r));case u.ADMIN_PATH:var o=P(e)?e:{path:e};return f(i({id:n},o));case u.ADMIN_SECTION:var a=O(e)?e:{section:e};return d(i({id:n},a));case u.REMOTE:var c=g(e)?e:{url:e};return h(i({id:n},c))}}function b(t){return""+t.pathname+(t.search||"")+(t.hash||"")}function _(t){if("string"==typeof t)return t.startsWith("/")?t:b(new URL(t));var e=t.search instanceof URLSearchParams?t.search.toString():t.search;return b(i(i({},t),{search:e}))}function A(t){return"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"path")}function P(t){return"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"path")}function O(t){return"object"==typeof t&&"object"==typeof t.section&&Object.prototype.hasOwnProperty.call(t.section,"name")}function g(t){return"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"url")}!function(t){t.ADMIN_SECTION="APP::NAVIGATION::REDIRECT::ADMIN::SECTION",t.ADMIN_PATH="APP::NAVIGATION::REDIRECT::ADMIN::PATH",t.REMOTE="APP::NAVIGATION::REDIRECT::REMOTE",t.APP="APP::NAVIGATION::REDIRECT::APP"}(u=e.Action||(e.Action={})),function(t){t.Product="products",t.Collection="collections",t.Order="orders",t.Customer="customers",t.Discount="discounts"}(e.ResourceType||(e.ResourceType={})),e.isResourcePayload=function(t){return"string"==typeof t.id},e.isCreateResourcePayload=p,e.isProductVariantResourcePayload=l,e.isProductVariantCreateResourcePayload=function(t){return!!l(t)&&p(t.variant)},e.toAdminPath=f,e.toAdminSection=d,e.toRemote=h,e.toApp=y,e.toDestination=v,e.getPathWithSearchAndHash=b,e.normalizeUrl=function(t){return t instanceof URL?t.toString():"string"==typeof t?t:_(t)},e.getRelativePath=_,e.isAppPayload=A,e.isAdminPathPayload=P,e.isAdminSectionPayload=O,e.isRemotePayload=g,e.isAdminSection=function(t){return"object"==typeof t&&"string"==typeof(null==t?void 0:t.name)};var E=function(t){function e(e){return t.call(this,e,"Redirect",s.Group.Navigation)||this}return o(e,t),Object.defineProperty(e.prototype,"payload",{get:function(){return{id:this.id}},enumerable:!1,configurable:!0}),e.prototype.dispatch=function(t,e){var n=v(t,e,this.payload.id);return this.app.dispatch(n),this},e}(c.ActionSet);e.Redirect=E,e.create=function(t){return new E(t)}},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.AppLink=e.update=e.Action=void 0;var u,a=n(0),c=n(3),s=n(1),p=n(16);function l(t,e,n){var r=e.id,o=n.label,c=n.destination,s=i(i({},n),{id:r,label:o,destination:c});return a.actionWrapper({group:t,type:a.getEventNameSpace(t,u.UPDATE,e),payload:s})}!function(t){t.UPDATE="UPDATE"}(u=e.Action||(e.Action={})),e.update=l;var f=function(t){function e(e,n){var r=t.call(this,e,s.Group.Link,s.Group.Link)||this;return r.label="",r.destination="",r.set(n,!1),r}return o(e,t),Object.defineProperty(e.prototype,"options",{get:function(){return{label:this.label,destination:this.destination,redirectType:p.Action.APP}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"payload",{get:function(){var t=this.options,e=t.label,n=t.destination,r=t.redirectType,o=n;return{id:this.id,label:e,destination:{path:o},redirectType:r}},enumerable:!1,configurable:!0}),e.prototype.set=function(t,e){void 0===e&&(e=!0);var n=a.getMergedProps(this.options,t),r=n.label,o=n.destination;return this.label=r,this.destination=o,e&&this.dispatch(u.UPDATE),this},e.prototype.dispatch=function(t){switch(t){case u.UPDATE:var e=l(this.group,this.component,this.payload);this.app.dispatch(e)}return this},e}(c.ActionSet);e.AppLink=f,e.create=function(t,e){return new f(t,e)}},function(t,e,n){"use strict";function r(t,e,n){var r=t.findIndex((function(t){return t===e}));return r>=0&&(t.splice(r,1),n&&n(e),!0)}Object.defineProperty(e,"__esModule",{value:!0}),e.removeFromCollection=e.addAndRemoveFromCollection=void 0,e.addAndRemoveFromCollection=function(t,e,n){return t.push(e),function(){return r(t,e,n)}},e.removeFromCollection=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isShopifyPing=e.isShopifyPOS=e.isShopifyMobile=e.isShopifyEmbedded=e.isMobile=void 0;var r=n(14);function o(){return"undefined"!=typeof navigator&&navigator.userAgent.indexOf("Shopify Mobile")>=0}function i(){return"undefined"!=typeof navigator&&navigator.userAgent.indexOf("Shopify POS")>=0}function u(){return"undefined"!=typeof navigator&&navigator.userAgent.indexOf("Shopify Ping")>=0}e.isMobile=function(){return o()||i()||u()},e.isShopifyEmbedded=function(){return r.isClient&&window.top!==window.self||r.isUnframed},e.isShopifyMobile=o,e.isShopifyPOS=i,e.isShopifyPing=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Action=void 0,function(t){t.UPDATE="APP::FEATURES::UPDATE",t.REQUEST="APP::FEATURES::REQUEST",t.REQUEST_UPDATE="APP::FEATURES::REQUEST::UPDATE"}(e.Action||(e.Action={}))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.handleRouteChange=void 0;var r=n(8);e.handleRouteChange=function(t,e){return t.subscribe(r.Redirect.Action.APP,(function(t){var n=t.path;e.replace(n)}))}},function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function u(t){try{c(r.next(t))}catch(t){i(t)}}function a(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(u,a)}c((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;u;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return u.label++,{value:i[1],done:!1};case 5:u.label++,r=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!(o=u.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){u=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){u.label=i[1];break}if(6===i[0]&&u.label<o[1]){u.label=o[1],o=i;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(i);break}o[2]&&u.ops.pop(),u.trys.pop();continue}i=e.call(t,u)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.updateHistory=void 0;var i=n(13),u=n(8),a=n(119),c=["hmac","locale","protocol","session","shop","timestamp","host"];e.updateHistory=function(t,e){return r(this,void 0,void 0,(function(){var n,r,s,p,l,f,d,h,y;return o(this,(function(o){switch(o.label){case 0:return n=a.getSelfWindow(),r=a.getTopWindow(),s=n===r,[4,t.getState("context").then((function(t){return t===i.Context.Main}))];case 1:return p=o.sent(),s||!p?[2]:(l=function(t){var e=a.getOrigin();if("string"==typeof t)return new URL(t,e);var n=t.pathname,r=t.search,o=t.hash;return new URL(""+n+r+o,e)}(e),c.forEach((function(t){return l.searchParams.delete(t)})),f=l.pathname,d=l.search,h=l.hash,y=""+f+d+h,u.History.create(t).dispatch(u.History.Action.REPLACE,y),[2])}}))}))}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.useToast=e.useNavigationHistory=e.useNavigate=e.useLocale=e.useFeatureRequest=e.useFeaturesAvailable=e.useContextualSaveBar=e.useAuthenticatedFetch=e.useAppBridgeState=void 0;var r=n(24);Object.defineProperty(e,"useAppBridgeState",{enumerable:!0,get:function(){return r.useAppBridgeState}});var o=n(62);Object.defineProperty(e,"useAuthenticatedFetch",{enumerable:!0,get:function(){return o.useAuthenticatedFetch}});var i=n(92);Object.defineProperty(e,"useContextualSaveBar",{enumerable:!0,get:function(){return i.useContextualSaveBar}});var u=n(41);Object.defineProperty(e,"useFeaturesAvailable",{enumerable:!0,get:function(){return u.useFeaturesAvailable}});var a=n(95);Object.defineProperty(e,"useFeatureRequest",{enumerable:!0,get:function(){return a.useFeatureRequest}});var c=n(97);Object.defineProperty(e,"useLocale",{enumerable:!0,get:function(){return c.useLocale}});var s=n(99);Object.defineProperty(e,"useNavigate",{enumerable:!0,get:function(){return s.useNavigate}});var p=n(42);Object.defineProperty(e,"useNavigationHistory",{enumerable:!0,get:function(){return p.useNavigationHistory}});var l=n(102);Object.defineProperty(e,"useToast",{enumerable:!0,get:function(){return l.useToast}})},function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),o=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),o(n(61),e)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SEPARATOR=e.PREFIX=void 0,e.PREFIX="APP",e.SEPARATOR="::"},function(t,e,n){"use strict";function r(t){return Array.from(t).map((function(t){return("00"+t.toString(16)).slice(-2)})).join("")}function o(t){if("function"==typeof Uint8Array&&"object"==typeof window&&window.crypto){var e=new Uint8Array(t),n=window.crypto.getRandomValues(e);if(n)return n}return Array.from(new Array(t),(function(){return 255*Math.random()|0}))}function i(){var t=o(1),e=o(2);return t[0]&=191,e[0]&=79,[r(o(4)),"-",r(o(2)),"-",r(e),"-",r(t),r(o(1)),"-",r(o(6))].join("")}Object.defineProperty(e,"__esModule",{value:!0}),e.generateUuid=void 0,e.generateUuid=i,e.default=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isAppMessage=e.isPermitted=e.getPermissionKey=e.isFromApp=e.isPerformanceOrWebVitalsAction=e.isAppBridgeAction=void 0;var r=n(9),o=n(25),i=n(0);function u(t){return t.replace(new RegExp("^"+o.PREFIX+o.SEPARATOR+"\\w+"+o.SEPARATOR),"")}e.isAppBridgeAction=function(t){return t instanceof Object&&Object.prototype.hasOwnProperty.call(t,"type")&&t.type.toString().startsWith(o.PREFIX)},e.isPerformanceOrWebVitalsAction=function(t){return t.type.match(/^APP::(PERFORMANCE|WEB_VITALS)::/)},e.isFromApp=function(t){return"object"==typeof t&&"object"==typeof t.source&&"string"==typeof t.source.apiKey},e.getPermissionKey=u,e.isPermitted=function(t,e,n){var r=e.group,o=e.type;if(!r||!Object.prototype.hasOwnProperty.call(t,r))return!1;var i=t[r];if(!i)return!1;var a=u(o);return!!i[a]&&!0===i[a][n]},e.isAppMessage=function(t){if("object"!=typeof t||!t.data||"object"!=typeof t.data)return!1;var e=t.data;return Object.prototype.hasOwnProperty.call(e,"type")&&void 0!==i.findMatchInEnum(r.MessageType,e.type)}},function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),o=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&r(e,t,n);return o(e,t),e},u=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function u(t){try{c(r.next(t))}catch(t){i(t)}}function a(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(u,a)}c((r=r.apply(t,e||[])).next())}))},a=this&&this.__generator||function(t,e){var n,r,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;u;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return u.label++,{value:i[1],done:!1};case 5:u.label++,r=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!(o=u.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){u=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){u.label=i[1];break}if(6===i[0]&&u.label<o[1]){u.label=o[1],o=i;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(i);break}o[2]&&u.ops.pop(),u.trys.pop();continue}i=e.call(t,u)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.getSessionToken=void 0;var c=i(n(29)),s=n(7);e.getSessionToken=function(t){return u(this,void 0,void 0,(function(){return a(this,(function(e){return[2,new Promise((function(e,n){var r=t.subscribe(c.Action.RESPOND,(function(t){var o=t.sessionToken;o?e(o):n(s.fromAction("Failed to retrieve a session token",s.Action.FAILED_AUTHENTICATION)),r()}));t.dispatch(c.request())}))]}))}))}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.respond=e.request=e.Action=void 0;var r,o=n(0),i=n(1);!function(t){t.REQUEST="APP::SESSION_TOKEN::REQUEST",t.RESPOND="APP::SESSION_TOKEN::RESPOND"}(r=e.Action||(e.Action={})),e.request=function(){return o.actionWrapper({group:i.Group.SessionToken,type:r.REQUEST})},e.respond=function(t){return o.actionWrapper({payload:t,group:i.Group.SessionToken,type:r.RESPOND})}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.respond=e.request=e.Action=void 0;var r,o=n(0),i=n(1);!function(t){t.REQUEST="APP::AUTH_CODE::REQUEST",t.RESPOND="APP::AUTH_CODE::RESPOND"}(r=e.Action||(e.Action={})),e.request=function(t){return o.actionWrapper({group:i.Group.AuthCode,type:r.REQUEST,payload:{id:t}})},e.respond=function(t){return o.actionWrapper({payload:t,group:i.Group.AuthCode,type:r.RESPOND})}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.initialize=e.Action=void 0;var r,o=n(1),i=n(0);!function(t){t.INITIALIZE="APP::CLIENT::INITIALIZE"}(r=e.Action||(e.Action={})),e.initialize=function(){return i.actionWrapper({group:o.Group.Client,type:r.INITIALIZE})}},function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),o=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),o(n(74),e),o(n(20),e)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.app=e.Action=void 0;var r,o=n(0),i=n(1);!function(t){t.APP="APP::PRINT::APP"}(r=e.Action||(e.Action={})),e.app=function(){return o.actionWrapper({group:i.Group.Print,type:r.APP})}},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.ResourcePicker=e.update=e.close=e.cancel=e.open=e.select=e.ActionVerb=e.ResourceType=e.ProductStatus=e.ProductVariantInventoryManagement=e.ProductVariantInventoryPolicy=e.WeightUnit=e.FulfillmentServiceType=e.CollectionSortOrder=e.Action=void 0;var u,a,c,s=n(0),p=n(3),l=n(1);function f(t){return s.actionWrapper({payload:t,group:l.Group.ResourcePicker,type:u.SELECT})}function d(t){return s.actionWrapper({payload:t,group:l.Group.ResourcePicker,type:u.OPEN})}function h(t){return s.actionWrapper({payload:t,group:l.Group.ResourcePicker,type:u.CANCEL})}function y(t){return s.actionWrapper({payload:t,group:l.Group.ResourcePicker,type:u.UPDATE})}!function(t){t.OPEN="APP::RESOURCE_PICKER::OPEN",t.SELECT="APP::RESOURCE_PICKER::SELECT",t.CLOSE="APP::RESOURCE_PICKER::CLOSE",t.UPDATE="APP::RESOURCE_PICKER::UPDATE",t.CANCEL="APP::RESOURCE_PICKER::CANCEL"}(u=e.Action||(e.Action={})),function(t){t.Manual="MANUAL",t.BestSelling="BEST_SELLING",t.AlphaAsc="ALPHA_ASC",t.AlphaDesc="ALPHA_DESC",t.PriceDesc="PRICE_DESC",t.PriceAsc="PRICE_ASC",t.CreatedDesc="CREATED_DESC",t.Created="CREATED"}(e.CollectionSortOrder||(e.CollectionSortOrder={})),function(t){t.GiftCard="GIFT_CARD",t.Manual="MANUAL",t.ThirdParty="THIRD_PARTY"}(e.FulfillmentServiceType||(e.FulfillmentServiceType={})),function(t){t.Kilograms="KILOGRAMS",t.Grams="GRAMS",t.Pounds="POUNDS",t.Ounces="OUNCES"}(e.WeightUnit||(e.WeightUnit={})),function(t){t.Deny="DENY",t.Continue="CONTINUE"}(e.ProductVariantInventoryPolicy||(e.ProductVariantInventoryPolicy={})),function(t){t.Shopify="SHOPIFY",t.NotManaged="NOT_MANAGED",t.FulfillmentService="FULFILLMENT_SERVICE"}(e.ProductVariantInventoryManagement||(e.ProductVariantInventoryManagement={})),function(t){t.Active="ACTIVE",t.Archived="ARCHIVED",t.Draft="DRAFT"}(e.ProductStatus||(e.ProductStatus={})),function(t){t.Product="product",t.ProductVariant="variant",t.Collection="collection"}(a=e.ResourceType||(e.ResourceType={})),function(t){t.Add="add",t.Select="select"}(c=e.ActionVerb||(e.ActionVerb={})),e.select=f,e.open=d,e.cancel=h,e.close=function(t){return s.actionWrapper({payload:t,group:l.Group.ResourcePicker,type:u.CANCEL})},e.update=y;var v=function(t){function e(e,n,r){var o=t.call(this,e,l.Group.ResourcePicker,l.Group.ResourcePicker)||this;return o.initialSelectionIds=[],o.selection=[],o.resourceType=r,o.set(n,!1),o}return o(e,t),Object.defineProperty(e.prototype,"payload",{get:function(){return i(i({},this.options),{id:this.id,resourceType:this.resourceType})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"options",{get:function(){var t={initialQuery:this.initialQuery,selectMultiple:this.selectMultiple,initialSelectionIds:this.initialSelectionIds,showHidden:this.showHidden,actionVerb:this.actionVerb};return this.resourceType===a.Product?i(i({},t),{showVariants:this.showVariants,showDraft:this.showDraft,showArchived:this.showArchived,showDraftBadge:this.showDraftBadge,showArchivedBadge:this.showArchivedBadge}):t},enumerable:!1,configurable:!0}),e.prototype.set=function(t,e){void 0===e&&(e=!0);var n=s.getMergedProps(this.options,t),r=n.initialQuery,o=n.initialSelectionIds,i=void 0===o?[]:o,u=n.showHidden,a=void 0===u||u,p=n.showVariants,l=void 0===p||p,f=n.showDraft,d=void 0===f||f,h=n.showArchived,y=void 0===h||h,v=n.showDraftBadge,b=void 0!==v&&v,_=n.showArchivedBadge,A=void 0!==_&&_,P=n.selectMultiple,O=void 0===P||P,g=n.actionVerb,E=void 0===g?c.Add:g;return this.initialQuery=r,this.initialSelectionIds=i,this.showHidden=a,this.showVariants=l,this.showDraft=d,this.showArchived=y,this.showDraftBadge=b,this.showArchivedBadge=A,this.selectMultiple=O,this.actionVerb=E,e&&this.update(),this},e.prototype.dispatch=function(t,e){return t===u.OPEN?this.open():t===u.UPDATE?this.update():t===u.CLOSE||t===u.CANCEL?this.cancel():t===u.SELECT&&(this.selection=e,this.app.dispatch(f({id:this.id,selection:this.selection}))),this},e.prototype.update=function(){this.app.dispatch(y(this.payload))},e.prototype.open=function(){this.app.dispatch(d(this.payload))},e.prototype.cancel=function(){this.app.dispatch(h({id:this.id}))},e.prototype.close=function(){this.cancel()},e}(p.ActionSet);e.ResourcePicker=v;e.create=function(t,e){var n=e.resourceType,r=e.options;return new v(t,void 0===r?{}:r,n)}},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.TitleBar=e.update=e.clickBreadcrumb=e.clickActionButton=e.Action=void 0;var u,a=n(3),c=n(6),s=n(10),p=n(82),l=n(12),f=n(0),d=n(1);!function(t){t.UPDATE="APP::TITLEBAR::UPDATE",t.BUTTON_CLICK="APP::TITLEBAR::BUTTONS::BUTTON::CLICK",t.BUTTON_UPDATE="APP::TITLEBAR::BUTTONS::BUTTON::UPDATE",t.BUTTON_GROUP_UPDATE="APP::TITLEBAR::BUTTONS::BUTTONGROUP::UPDATE",t.BREADCRUMBS_CLICK="APP::TITLEBAR::BREADCRUMBS::BUTTON::CLICK",t.BREADCRUMBS_UPDATE="APP::TITLEBAR::BREADCRUMBS::BUTTON::UPDATE"}(u=e.Action||(e.Action={}));var h={group:d.Group.TitleBar,subgroups:["Buttons"]},y={group:d.Group.TitleBar,subgroups:["Breadcrumbs"],type:d.ComponentType.Button};function v(t){return f.actionWrapper({payload:t,group:d.Group.TitleBar,type:u.UPDATE})}e.clickActionButton=function(t,e){var n=d.ComponentType.Button,r=i({id:t,type:n},h);return c.clickButton(d.Group.TitleBar,r,e)},e.clickBreadcrumb=function(t,e){var n=i({id:t},y);return c.clickButton(d.Group.TitleBar,n,e)},e.update=v;var b=function(t){function e(e,n){var r=t.call(this,e,d.Group.TitleBar,d.Group.TitleBar)||this;return n.title||n.breadcrumbs||n.buttons?(r.set(n),r):r}return o(e,t),Object.defineProperty(e.prototype,"buttons",{get:function(){if(this.primary||this.secondary)return{primary:this.primary,secondary:this.secondary}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"buttonsOptions",{get:function(){if(this.primaryOptions||this.secondaryOptions)return{primary:this.primaryOptions,secondary:this.secondaryOptions}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"options",{get:function(){return{breadcrumbs:this.breadcrumbsOption,buttons:this.buttonsOptions,title:this.title}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"payload",{get:function(){return i(i({},this.options),{breadcrumbs:this.breadcrumb,buttons:this.buttons,id:this.id})},enumerable:!1,configurable:!0}),e.prototype.set=function(t,e){void 0===e&&(e=!0);var n=f.getMergedProps(this.options,t),r=n.title,o=n.buttons,i=n.breadcrumbs;return this.title=r,this.setBreadcrumbs(i),this.setPrimaryButton(o?o.primary:void 0),this.setSecondaryButton(o?o.secondary:void 0),e&&this.dispatch(u.UPDATE),this},e.prototype.dispatch=function(t){switch(t){case u.UPDATE:this.app.dispatch(v(this.payload))}return this},e.prototype.getButton=function(t,e,n){return t instanceof s.ButtonGroup?p.getGroupedButton(this,t,e,n):l.getSingleButton(this,t,e,n)},e.prototype.updatePrimaryButton=function(t){this.primary&&f.updateActionFromPayload(this.primary,t)&&this.dispatch(u.UPDATE)},e.prototype.updateSecondaryButtons=function(t){if(this.secondary){var e=this.secondary.find((function(e){return e.id===t.id}));if(e){(s.isGroupedButtonPayload(t),f.updateActionFromPayload(e,t))&&this.dispatch(u.UPDATE)}}},e.prototype.updateBreadcrumbButton=function(t){this.breadcrumb&&f.updateActionFromPayload(this.breadcrumb,t)&&this.dispatch(u.UPDATE)},e.prototype.setPrimaryButton=function(t){this.primaryOptions=this.getChildButton(t,this.primaryOptions),this.primary=this.primaryOptions?this.getButton(this.primaryOptions,h.subgroups,this.updatePrimaryButton):void 0},e.prototype.setSecondaryButton=function(t){var e=this,n=t||[],r=this.secondaryOptions||[];this.secondaryOptions=this.getUpdatedChildActions(n,r),this.secondary=this.secondaryOptions?this.secondaryOptions.map((function(t){return e.getButton(t,h.subgroups,e.updateSecondaryButtons)})):void 0},e.prototype.setBreadcrumbs=function(t){this.breadcrumbsOption=this.getChildButton(t,this.breadcrumbsOption),this.breadcrumb=this.breadcrumbsOption?this.getButton(this.breadcrumbsOption,y.subgroups,this.updateBreadcrumbButton):void 0},e.prototype.getChildButton=function(t,e){var n=t?[t]:[],r=e?[e]:[],o=this.getUpdatedChildActions(n,r);return o?o[0]:void 0},e}(a.ActionSetWithChildren);e.TitleBar=b,e.create=function(t,e){return new b(t,e)}},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.ContextualSaveBar=e.update=e.discard=e.save=e.hide=e.show=e.Action=void 0;var u,a=n(0),c=n(3),s=n(1);function p(t,e){return a.actionWrapper({group:s.Group.ContextualSaveBar,type:t,payload:e})}!function(t){t.DISCARD="APP::CONTEXTUAL_SAVE_BAR::DISCARD",t.SAVE="APP::CONTEXTUAL_SAVE_BAR::SAVE",t.SHOW="APP::CONTEXTUAL_SAVE_BAR::SHOW",t.HIDE="APP::CONTEXTUAL_SAVE_BAR::HIDE",t.UPDATE="APP::CONTEXTUAL_SAVE_BAR::UPDATE"}(u=e.Action||(e.Action={})),e.show=function(t){return p(u.SHOW,t)},e.hide=function(t){return p(u.HIDE,t)},e.save=function(t){return p(u.SAVE,t)},e.discard=function(t){return p(u.DISCARD,t)},e.update=function(t){return p(u.UPDATE,t)};var l=function(t){function e(e,n){void 0===n&&(n={});var r=t.call(this,e,s.Group.ContextualSaveBar,s.Group.ContextualSaveBar)||this;return r.options=n,r.set(n,!1),r}return o(e,t),Object.defineProperty(e.prototype,"payload",{get:function(){return i({id:this.id},this.options)},enumerable:!1,configurable:!0}),e.prototype.set=function(t,e){void 0===e&&(e=!0);var n=a.getMergedProps(this.options,t);return this.options=n,e&&this.dispatch(u.UPDATE),this},e.prototype.dispatch=function(t){return this.app.dispatch(p(t,this.payload)),this},e}(c.ActionSet);e.ContextualSaveBar=l,e.create=function(t,e){return new l(t,e)}},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.NavigationMenu=e.update=e.Action=void 0;var u,a=n(17),c=n(0),s=n(3),p=n(1),l=["Navigation_Menu"];function f(t){return c.actionWrapper({payload:t,group:p.Group.Menu,type:u.UPDATE})}!function(t){t.UPDATE="APP::MENU::NAVIGATION_MENU::UPDATE",t.LINK_UPDATE="APP::MENU::NAVIGATION_MENU::LINK::UPDATE"}(u=e.Action||(e.Action={})),e.update=f;var d=function(t){function e(e,n){var r=t.call(this,e,"Navigation_Menu",p.Group.Menu)||this;return r.items=[],r.set(n),r}return o(e,t),Object.defineProperty(e.prototype,"options",{get:function(){return{items:this.itemsOptions,active:this.activeOptions}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"payload",{get:function(){return i(i({},this.options),{active:this.active,items:this.items,id:this.id})},enumerable:!1,configurable:!0}),e.prototype.set=function(t,e){void 0===e&&(e=!0);var n=c.getMergedProps(this.options,t),r=n.items,o=n.active;return this.setItems(r),this.activeOptions=o,this.active=o&&o.id,e&&this.dispatch(u.UPDATE),this},e.prototype.dispatch=function(t){switch(t){case u.UPDATE:this.app.dispatch(f(this.payload))}return this},e.prototype.updateItem=function(t){if(this.items){var e=this.items.find((function(e){return e.id===t.id}));e&&c.updateActionFromPayload(e,t)&&this.dispatch(u.UPDATE)}},e.prototype.setItems=function(t){var e=this,n=t||[],r=this.itemsOptions||[];this.itemsOptions=this.getUpdatedChildActions(n,r),this.items=this.itemsOptions?this.itemsOptions.map((function(t){return e.addChild(t,e.group,l),e.subscribeToChild(t,a.Action.UPDATE,e.updateItem),t.payload})):[]},e}(s.ActionSetWithChildren);e.NavigationMenu=d,e.create=function(t,e){return new d(t,e)}},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.unstable_Picker=e.loadMore=e.search=e.update=e.cancel=e.open=e.select=e.ALL_RESOURCE_VERTICAL_ALIGNMENT=e.ALL_MEDIA_KINDS=e.ALL_BADGE_STATUSES=e.ALL_BADGE_PROGRESSES=e.Action=void 0;var u,a=n(0),c=n(3),s=n(1);function p(t){return a.actionWrapper({payload:t,group:s.Group.unstable_Picker,type:u.SELECT})}function l(t){return a.actionWrapper({payload:t,group:s.Group.unstable_Picker,type:u.OPEN})}function f(t){return a.actionWrapper({payload:t,group:s.Group.unstable_Picker,type:u.CANCEL})}function d(t){return a.actionWrapper({payload:t,group:s.Group.unstable_Picker,type:u.UPDATE})}function h(t){return a.actionWrapper({payload:t,group:s.Group.unstable_Picker,type:u.SEARCH})}function y(t){return a.actionWrapper({payload:t,group:s.Group.unstable_Picker,type:u.LOAD_MORE})}!function(t){t.OPEN="APP::PICKER::OPEN",t.SELECT="APP::PICKER::SELECT",t.UPDATE="APP::PICKER::UPDATE",t.CANCEL="APP::PICKER::CANCEL",t.SEARCH="APP::PICKER::SEARCH",t.LOAD_MORE="APP::PICKER::LOAD_MORE"}(u=e.Action||(e.Action={})),e.ALL_BADGE_PROGRESSES=["incomplete","partiallyComplete","complete"],e.ALL_BADGE_STATUSES=["success","info","attention","critical","warning","new"],e.ALL_MEDIA_KINDS=["Avatar","Thumbnail"],e.ALL_RESOURCE_VERTICAL_ALIGNMENT=["leading","trailing","center"],e.select=p,e.open=l,e.cancel=f,e.update=d,e.search=h,e.loadMore=y;var v=function(t){function e(e,n){var r=t.call(this,e,s.Group.unstable_Picker,s.Group.unstable_Picker)||this;return r.items=[],r.selectedItems=[],r.set(n,!1),r}return o(e,t),Object.defineProperty(e.prototype,"payload",{get:function(){return i(i({},this.options),{id:this.id})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"options",{get:function(){return{items:this.items,maxSelectable:this.maxSelectable,selectedItems:this.selectedItems,title:this.title,loading:this.loading,searchQuery:this.searchQuery,searchQueryPlaceholder:this.searchQueryPlaceholder,primaryActionLabel:this.primaryActionLabel,secondaryActionLabel:this.secondaryActionLabel,emptySearchLabel:this.emptySearchLabel,canLoadMore:this.canLoadMore,loadingMore:this.loadingMore,verticalAlignment:this.verticalAlignment}},enumerable:!1,configurable:!0}),e.prototype.set=function(t,e){void 0===e&&(e=!0);var n=a.getMergedProps(this.options,t),r=n.selectedItems,o=void 0===r?[]:r,i=n.maxSelectable,u=void 0===i?0:i,c=n.items,s=void 0===c?[]:c,p=n.loading,l=void 0!==p&&p,f=n.title,d=n.searchQuery,h=n.searchQueryPlaceholder,y=n.primaryActionLabel,v=n.secondaryActionLabel,b=n.emptySearchLabel,_=n.canLoadMore,A=void 0!==_&&_,P=n.loadingMore,O=void 0!==P&&P,g=n.verticalAlignment;return this.title=f,this.items=s,this.selectedItems=o,this.maxSelectable=u,this.loading=l,this.searchQuery=d,this.searchQueryPlaceholder=h,this.primaryActionLabel=y,this.secondaryActionLabel=v,this.emptySearchLabel=b,this.canLoadMore=A,this.loadingMore=O,this.verticalAlignment=g,e&&this.update(),this},e.prototype.dispatch=function(t,e){return t===u.OPEN?this.open():t===u.UPDATE?this.update():t===u.CANCEL?this.cancel():t===u.SELECT?(this.selectedItems=(null==e?void 0:e.selectedItems)||[],this.app.dispatch(p({id:this.id,selectedItems:this.selectedItems}))):t===u.SEARCH?(this.searchQuery=(null==e?void 0:e.searchQuery)||"",this.app.dispatch(h({id:this.id,searchQuery:this.searchQuery}))):t===u.LOAD_MORE&&this.loadMore(),this},e.prototype.update=function(){this.app.dispatch(d(this.payload))},e.prototype.open=function(){this.app.dispatch(l(this.payload))},e.prototype.cancel=function(){this.app.dispatch(f({id:this.id}))},e.prototype.loadMore=function(){this.app.dispatch(y(this.payload))},e}(c.ActionSet);e.unstable_Picker=v;e.create=function(t,e){return new v(t,e)}},function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),o=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),o(n(88),e)},function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),o=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&r(e,t,n);return o(e,t),e},u=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function u(t){try{c(r.next(t))}catch(t){i(t)}}function a(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(u,a)}c((r=r.apply(t,e||[])).next())}))},a=this&&this.__generator||function(t,e){var n,r,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;u;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return u.label++,{value:i[1],done:!1};case 5:u.label++,r=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!(o=u.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){u=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){u.label=i[1];break}if(6===i[0]&&u.label<o[1]){u.label=o[1],o=i;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(i);break}o[2]&&u.ops.pop(),u.trys.pop();continue}i=e.call(t,u)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}},c=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.getAuthorizationCodePayload=void 0;var s=i(n(30)),p=n(7),l=c(n(26));e.getAuthorizationCodePayload=function(t){return u(this,void 0,void 0,(function(){return a(this,(function(e){return[2,new Promise((function(e,n){var r=l.default(),o=t.subscribe(s.Action.RESPOND,(function(t){switch(null==t?void 0:t.status){case"needsExchange":e(t);break;default:n(p.fromAction("Failed to retrieve an authorization code",p.Action.FAILED_AUTHENTICATION))}o()}),r);t.dispatch(s.request(r))}))]}))}))}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.useFeaturesAvailable=void 0;var r=n(94);Object.defineProperty(e,"useFeaturesAvailable",{enumerable:!0,get:function(){return r.useFeaturesAvailable}})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.useNavigationHistory=void 0;var r=n(101);Object.defineProperty(e,"useNavigationHistory",{enumerable:!0,get:function(){return r.useNavigationHistory}})},function(t,e,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},o=this&&this.__rest||function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};Object.defineProperty(e,"__esModule",{value:!0});var i=n(2),u=n(11),a=n(44),c=n(4);function s(t,e,n){var o=e.title,i=e.size,c=e.message,s=e.src,p=e.primaryAction,l=e.secondaryActions,f=e.loading,d=null==i?void 0:u.Size[i],h={};return null!=s&&(s.match("^https?://")?h.url=s:h.path=s),r(r({title:o,message:c,size:d},h),{footer:{buttons:a.transformActions(t,{primaryAction:p,secondaryActions:l})},loading:n?void 0:f})}e.default=function(t){var e=c.useAppBridge(),n=i.useRef(null),r=i.useRef({open:!1}),a=t.open,p=i.useRef(!1),l=i.useMemo((function(){t.primaryAction,t.secondaryActions;var n=o(t,["primaryAction","secondaryActions"]);return u.create(e,s(e,n))}),[e]);return i.useEffect((function(){if(!p.current){var o,i=r.current.open,c=i!==a;if(a){var f=s(e,t,i),d=!c;"string"==typeof(o=f).url||o.path,l.set(f,d)}return c&&(a?(l.dispatch(u.Action.OPEN),n.current=document.activeElement):(l.dispatch(u.Action.CLOSE),null!=n.current&&document.contains(n.current)&&(n.current.focus(),n.current=null))),null!=t.onClose&&l.subscribe(u.Action.CLOSE,t.onClose),r.current=t,function(){l.unsubscribe()}}r.current=t}),[t,a]),i.useEffect((function(){return function(){r.current.open&&l.dispatch(u.Action.CLOSE)}}),[l]),null}},function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),o=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&r(e,t,n);return o(e,t),e},u=this&&this.__spreadArray||function(t,e){for(var n=0,r=e.length,o=t.length;n<r;n++,o++)t[o]=e[n];return t};Object.defineProperty(e,"__esModule",{value:!0}),e.transformActions=e.generateRedirect=void 0;var a=i(n(6)),c=i(n(10)),s=i(n(16));function p(t,e,n,r){if(void 0===n&&(n="APP"),null!=e){var o=s.create(t),i=!0===r?{url:e,newContext:!0}:e;return function(){o.dispatch(function(t,e){if(!0===e)return s.Action.REMOTE;return s.Action[t]}(n,r),i)}}}function l(t,e){var n=!0===e.destructive?a.Style.Danger:void 0,r=a.create(t,{label:e.content||"",disabled:e.disabled,loading:e.loading,plain:e.plain,style:n});e.onAction&&r.subscribe(a.Action.CLICK,e.onAction);var o=p(t,e.url,e.target,e.external);return null!=o&&r.subscribe(a.Action.CLICK,o),r}e.generateRedirect=p,e.transformActions=function(t,e){var n=e.primaryAction,r=e.secondaryActions,o=e.actionGroups;return{primary:function(t,e){if(null==e)return;return l(t,e)}(t,n),secondary:u(u([],function(t,e){void 0===e&&(e=[]);return u([],e.map((function(e){return l(t,e)})))}(t,r)),function(t,e){void 0===e&&(e=[]);return u([],e.map((function(e){var n=e.actions.map((function(e){return l(t,e)}));return c.create(t,{label:e.title,plain:e.plain,buttons:n})})))}(t,o))}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(2),o=n(17),i=n(37),u=n(4);function a(t,e){return t.destination.replace(/\/$/,"")===e.pathname.replace(/\/$/,"")}e.default=function(t){var e=t.navigationLinks,n=t.matcher,c=void 0===n?a:n,s=u.useAppBridge(),p=r.useState(),l=p[0],f=p[1];r.useEffect((function(){var t=e.map((function(t){return o.create(s,t)}));f(t)}),[s,JSON.stringify(e)]);var d=r.useMemo((function(){var t=(l||[]).findIndex((function(t){return c(t,location)}));if(t>=0)return null==l?void 0:l[t]}),[s,location.pathname,c,l,location.pathname]);return r.useEffect((function(){l&&i.create(s,{items:l,active:d})}),[l,d]),null}},function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),o=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&r(e,t,n);return o(e,t),e};Object.defineProperty(e,"__esModule",{value:!0}),e.setClientInterfaceHook=void 0;var u=i(n(2)),a=i(n(111)),c=n(5),s=n(50),p=n(51),l=n(121);function f(t){var e=t.history,n=t.location;return s.useClientRouting(e),p.useRoutePropagation(n),null}e.setClientInterfaceHook=function(t){return function(e){return e.clientInterface={name:"@shopify/app-bridge-react",version:l.version},t(e)}},e.default=function(t){var n=t.config,r=t.router,o=t.children,i=u.useMemo((function(){return a.default(n)}),[]);u.useEffect((function(){(null==i?void 0:i.hooks)&&i.hooks.set(a.LifecycleHook.DispatchAction,e.setClientInterfaceHook)}),[i]);var s=(null==r?void 0:r.history)&&(null==r?void 0:r.location)?u.default.createElement(f,{history:r.history,location:r.location}):null;return u.default.createElement(c.AppBridgeContext.Provider,{value:i},s,o)}},function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),o=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0});var i=n(48);o(n(9),e),o(n(48),e),e.default=i.createClientApp},function(t,e,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},o=this&&this.__spreadArray||function(t,e){for(var n=0,r=e.length,o=t.length;n<r;n++,o++)t[o]=e[n];return t},i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.createApp=e.createAppWrapper=e.createClientApp=e.WINDOW_UNDEFINED_MESSAGE=void 0;var u=n(0),a=n(33),c=n(7),s=n(13),p=n(113),l=n(14),f=n(31),d=n(39),h=n(114),y=n(49),v=n(9),b=i(n(115));e.WINDOW_UNDEFINED_MESSAGE="window is not defined. Running an app outside a browser is not supported";function _(t,n,r){if(void 0===r&&(r=[]),!t)throw c.fromAction(e.WINDOW_UNDEFINED_MESSAGE,c.AppActionType.WINDOW_UNDEFINED);var o=y.getLocation(),i=n||o&&o.origin;if(!i)throw c.fromAction("local origin cannot be blank",c.AppActionType.MISSING_LOCAL_ORIGIN);var u=s.fromWindow(t,i);return e.createClientApp(u,r)}function A(t){var e=y.getWindow();return e&&e.top?_(e.top)(t):p.serverAppBridge}e.createClientApp=function(t,e){void 0===e&&(e=[]);var n=[],i=s.createTransportListener();return t.subscribe((function(t){var e=t.data,r=e.type,o=e.payload;switch(r){case"getState":n.splice(0).forEach((function(t){return t(o)}));break;case"dispatch":if(i.handleMessage(o),i.handleActionDispatch(o))return;var a=u.findMatchInEnum(c.Action,o.type);a&&c.throwError(a,o)}})),function(s){var _=function(t){var e;if(!t.host)throw c.fromAction("host must be provided",c.AppActionType.INVALID_CONFIG);if(!t.apiKey)throw c.fromAction("apiKey must be provided",c.AppActionType.INVALID_CONFIG);try{var n=atob(null===(e=t.host)||void 0===e?void 0:e.replace(/_/g,"/").replace(/-/g,"+"));return r(r({},t),{host:n})}catch(t){throw c.fromAction("not a valid host, please use the value provided by Shopify",c.AppActionType.INVALID_CONFIG)}}(s);if(function(t,e){var n=e.apiKey,r=e.host,o=e.forceRedirect,i=void 0===o?!l.isDevelopmentClient:o,u=y.getLocation();if(l.isUnframed||!u||!n||!r||!i||!y.shouldRedirect(t))return!1;var a="https://"+r+"/apps/"+n+u.pathname+(u.search||"");return y.redirect(a),!0}(t.hostFrame,_))return p.mockAppBridge;var A=function(t,e){return function(n,r){t.dispatch({payload:r,source:e,type:n})}}(t,_),P=i.createSubscribeHandler(A);function O(t){return A(v.MessageType.Dispatch,t),t}A(v.MessageType.Unsubscribe);for(var g=new URL("https://"+_.host).origin,E=new b.default,m={hostOrigin:g,localOrigin:t.localOrigin,hooks:E,dispatch:function(t){return m.hooks?m.hooks.run(v.LifecycleHook.DispatchAction,O,m,t):O(t)},featuresAvailable:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t[0],r=Array.isArray(n)?o([],n):t;return m.getState("features").then((function(t){return r.length?r.reduce((function(e,n){return Object.keys(t).includes(n)&&(e[n]=t[n]),e}),{}):t}))},getState:function(t){return t&&"string"!=typeof t?Promise.resolve(void 0):new Promise((function(t){n.push(t),A(v.MessageType.GetState)})).then((function(e){var n=e;if(t)for(var r=0,o=t.split(".");r<o.length;r++){var i=o[r];if(null==n||"object"!=typeof n||Array.isArray(n)||!Object.keys(n).includes(i))return;n=n[i]}return n}))},subscribe:P,error:function(t,e){var n=[];return u.forEachInEnum(c.Action,(function(r){n.push(P(r,t,e))})),function(){n.forEach((function(t){return t()}))}}},T=0,S=e;T<S.length;T++){(0,S[T])(E,m)}return function(t){t.subscribe(a.Action.APP,h.handleAppPrint),t.dispatch(f.initialize());try{d.initializeWebVitals(t)}catch(t){}}(m),m}},e.createAppWrapper=_,e.createApp=A,e.default=A},function(t,e,n){"use strict";function r(){return o()?window.location:void 0}function o(){return"undefined"!=typeof window}Object.defineProperty(e,"__esModule",{value:!0}),e.getWindow=e.getLocation=e.redirect=e.shouldRedirect=void 0,e.shouldRedirect=function(t){return t===window},e.redirect=function(t){var e=r();e&&e.assign(t)},e.getLocation=r,e.getWindow=function(){return o()?window:void 0}},function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.History=e.useClientRouting=e.ClientRouter=void 0;var o=n(116);Object.defineProperty(e,"ClientRouter",{enumerable:!0,get:function(){return r(o).default}});var i=n(117);Object.defineProperty(e,"useClientRouting",{enumerable:!0,get:function(){return r(i).default}});var u=n(21);Object.defineProperty(e,"History",{enumerable:!0,get:function(){return u.History}})},function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.LocationOrHref=e.useRoutePropagation=e.RoutePropagator=void 0;var o=n(118);Object.defineProperty(e,"RoutePropagator",{enumerable:!0,get:function(){return r(o).default}});var i=n(120);Object.defineProperty(e,"useRoutePropagation",{enumerable:!0,get:function(){return r(i).default}});var u=n(22);Object.defineProperty(e,"LocationOrHref",{enumerable:!0,get:function(){return u.LocationOrHref}})},function(t,e,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},o=this&&this.__rest||function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};Object.defineProperty(e,"__esModule",{value:!0}),e.ResourceType=e.ActionVerb=void 0;var i=n(2),u=n(34);Object.defineProperty(e,"ActionVerb",{enumerable:!0,get:function(){return u.ActionVerb}}),Object.defineProperty(e,"ResourceType",{enumerable:!0,get:function(){return u.ResourceType}});var a=n(4);e.default=function(t){var e=t.open,n=t.resourceType,c=t.onSelection,s=t.onCancel,p=t.allowMultiple,l=t.selectMultiple,f=o(t,["open","resourceType","onSelection","onCancel","allowMultiple","selectMultiple"]),d=i.useMemo((function(){return r(r({},f),{selectMultiple:null!=l?l:p})}),[p,f,l]),h=a.useAppBridge(),y=i.useRef(!1);i.useEffect((function(){return function(){y.current=!0}}),[]);var v=i.useRef(!1),b=i.useRef(d),_=i.useMemo((function(){return u.create(h,{resourceType:u.ResourceType[n],options:b.current})}),[h,n]);i.useEffect((function(){return v.current=!1,function(){v.current&&y.current&&_.dispatch(u.Action.CANCEL)}}),[_]);var A=i.useRef(null),P=i.useCallback((function(){document.activeElement instanceof HTMLElement&&(A.current=document.activeElement)}),[]),O=i.useCallback((function(){var t=A.current;A.current=null,t&&document.contains(t)&&t.focus()}),[]);return i.useEffect((function(){e!==v.current&&(v.current=e,e?(_.dispatch(u.Action.OPEN),P()):(_.dispatch(u.Action.CLOSE),O()))}),[_,e,P,O]),i.useEffect((function(){if(c)return _.subscribe(u.Action.SELECT,(function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return v.current=!1,O(),c.apply(void 0,t)}))}),[_,c,O]),i.useEffect((function(){if(s)return _.subscribe(u.Action.CANCEL,(function(){return v.current=!1,O(),s()}))}),[_,s,O]),i.useEffect((function(){JSON.stringify(d)!==JSON.stringify(b.current)&&(b.current=d,_.set(d))}),[_,d]),null}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(2),o=n(6),i=n(35),u=n(10),a=n(44),c=n(4);function s(t,e,n){var r=n||o.create(t,{label:e.content||""});return p(e,r),r}function p(t,e){if(t&&e){var n=a.generateRedirect(e.app,t.url,t.target,t.external);n&&e.subscribe(o.Action.CLICK,n,e),(null==t?void 0:t.onAction)&&e.subscribe(o.Action.CLICK,t.onAction,e)}}e.default=function(t){var e=c.useAppBridge(),n=r.useRef(),o=r.useMemo((function(){return i.create(e,{})}),[e]);return r.useEffect((function(){var r,i=JSON.stringify(n.current)!==JSON.stringify(t);if(n.current=t,i)o.set(function(t,e){var n=e.actionGroups,r=e.breadcrumbs,o=e.primaryAction,i=e.secondaryActions,u=e.title,c=Array.isArray(r)?r[r.length-1]:r;return{title:u,buttons:a.transformActions(t,{primaryAction:o,secondaryActions:i,actionGroups:n}),breadcrumbs:c?s(t,c):void 0}}(e,t));else{var c=t.primaryAction,l=t.secondaryActions,f=t.actionGroups,d=t.breadcrumbs;p(Array.isArray(d)?d[d.length-1]:d,o.options.breadcrumbs),p(c,null===(r=o.options.buttons)||void 0===r?void 0:r.primary),function(t,e){var n,r,o=(null===(r=null===(n=t.options.buttons)||void 0===n?void 0:n.secondary)||void 0===r?void 0:r.filter((function(t){return!u.isGroupedButton(t)})))||[];null==o||o.forEach((function(t,n){return p(null==e?void 0:e[n],t)}))}(o,l),function(t,e){var n,r,o=(null===(r=null===(n=t.options.buttons)||void 0===n?void 0:n.secondary)||void 0===r?void 0:r.filter(u.isGroupedButton))||[];null==o||o.forEach((function(t,n){var r=null==e?void 0:e[n];r&&t.options.buttons.forEach((function(t,e){return p(r.actions[e],t)}))}))}(o,f)}return function(){o.unsubscribe()}}),[o,t]),null}},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.DEFAULT_TOAST_DURATION=void 0;var u=i(n(2)),a=n(8),c=n(5);e.DEFAULT_TOAST_DURATION=5e3;var s=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return o(n,t),n.prototype.componentDidMount=function(){var t=this.context,n=this.props,r=n.error,o=n.content,i=n.duration,u=void 0===i?e.DEFAULT_TOAST_DURATION:i,c=n.onDismiss,s=n.action;this.toast=a.Toast.create(t,{message:o,duration:u,isError:r,action:(null==s?void 0:s.content)?{content:null==s?void 0:s.content}:void 0}),(null==s?void 0:s.onAction)&&this.toast.subscribe(a.Toast.Action.ACTION,null==s?void 0:s.onAction),this.toast.subscribe(a.Toast.Action.CLEAR,c),this.toast.dispatch(a.Toast.Action.SHOW)},n.prototype.componentWillUnmount=function(){this.toast.unsubscribe()},n.prototype.render=function(){return null},n.contextType=c.AppBridgeContext,n}(u.default.PureComponent);e.default=s},function(t,e,n){"use strict";var r=this&&this.__rest||function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};Object.defineProperty(e,"__esModule",{value:!0});var o=n(2),i=n(38),u=n(4);e.default=function(t){var e=t.open,n=t.onCancel,a=t.onSelect,c=t.onSearch,s=t.onLoadMore,p=r(t,["open","onCancel","onSelect","onSearch","onLoadMore"]),l=u.useAppBridge(),f=o.useRef(!1);o.useEffect((function(){return function(){f.current=!0}}),[]);var d=o.useRef(!1),h=o.useRef(p),y=o.useMemo((function(){return i.create(l,h.current)}),[l]);return o.useEffect((function(){return d.current=!1,function(){d.current&&f.current&&y.dispatch(i.Action.CANCEL)}}),[y]),o.useEffect((function(){e!==d.current&&(d.current=e,e?y.dispatch(i.Action.OPEN):y.dispatch(i.Action.CANCEL))}),[y,e]),o.useEffect((function(){if(a)return y.subscribe(i.Action.SELECT,(function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return d.current=!1,a.apply(void 0,t)}))}),[y,a]),o.useEffect((function(){if(n)return y.subscribe(i.Action.CANCEL,(function(){return d.current=!1,n()}))}),[y,n]),o.useEffect((function(){if(c)return y.subscribe(i.Action.SEARCH,c)}),[y,c]),o.useEffect((function(){if(s)return y.subscribe(i.Action.LOAD_MORE,s)}),[y,s]),o.useEffect((function(){JSON.stringify(p)!==JSON.stringify(h.current)&&(h.current=p,y.set(p,d.current))}),[y,p]),null}},function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),o=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),e.useAppBridge=e.Context=void 0;var i=n(5);Object.defineProperty(e,"Context",{enumerable:!0,get:function(){return i.AppBridgeContext}});var u=n(4);Object.defineProperty(e,"useAppBridge",{enumerable:!0,get:function(){return u.useAppBridge}}),o(n(58),e),o(n(23),e)},function(t,e,n){"use strict";
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("app-bridge-react",[],e):"object"==typeof exports?exports["app-bridge-react"]=e():t["app-bridge-react"]=e()}(window,(function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=82)}([function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.updateActionFromPayload=e.isValidOptionalString=e.isValidOptionalNumber=e.forEachInEnum=e.getMergedProps=e.findMatchInEnum=e.getEventNameSpace=e.NonSnakeCaseGroup=e.actionWrapper=void 0;var o=r(n(92)),i=n(32),u=n(1);function a(t,e){var n=o.default(t,e);return n||Object.assign(t,e)}e.actionWrapper=function(t){return t},e.NonSnakeCaseGroup=[u.Group.AuthCode,u.Group.Button,u.Group.ButtonGroup,u.Group.Cart,u.Group.Error,u.Group.Features,u.Group.Fullscreen,u.Group.Link,u.Group.Loading,u.Group.Menu,u.Group.Modal,u.Group.Navigation,u.Group.Pos,u.Group.Print,u.Group.ResourcePicker,u.Group.Scanner,u.Group.SessionToken,u.Group.Share,u.Group.TitleBar,u.Group.Toast,u.Group.unstable_Picker],e.getEventNameSpace=function(t,n,r){if(n.startsWith(""+i.PREFIX+i.SEPARATOR))return n;var o=function(t){return e.NonSnakeCaseGroup.includes(t)?t.toUpperCase():(n=t,n.replace(/([A-Z])/g,(function(t,e,n){return(0===n?"":"_")+t[0].toLowerCase()}))).toUpperCase();var n}(t);if(r){var u=r.subgroups,a=r.type;u&&u.length>0&&(o+=o.length>0?i.SEPARATOR:"",u.forEach((function(t,e){o+=""+t.toUpperCase()+(e<u.length-1?i.SEPARATOR:"")}))),a!==t&&a&&(o+=""+(o.length>0?i.SEPARATOR:"")+a.toUpperCase())}return o&&(o+=""+(o.length>0?i.SEPARATOR:"")+n.toUpperCase()),""+i.PREFIX+i.SEPARATOR+o},e.findMatchInEnum=function(t,e){var n=Object.keys(t).find((function(n){return e===t[n]}));return n?t[n]:void 0},e.getMergedProps=a,e.forEachInEnum=function(t,e){Object.keys(t).forEach((function(n){e(t[n])}))},e.isValidOptionalNumber=function(t){return null==t||"number"==typeof t},e.isValidOptionalString=function(t){return null==t||"string"==typeof t},e.updateActionFromPayload=function(t,e){return t.id===e.id&&(Object.assign(t,a(t,e)),!0)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ComponentType=e.Group=void 0,function(t){t.AuthCode="AuthCode",t.Button="Button",t.ButtonGroup="ButtonGroup",t.Cart="Cart",t.Client="Client",t.ContextualSaveBar="ContextualSaveBar",t.Error="Error",t.Features="Features",t.FeedbackModal="FeedbackModal",t.Fullscreen="Fullscreen",t.LeaveConfirmation="LeaveConfirmation",t.Link="Link",t.Loading="Loading",t.Menu="Menu",t.Modal="Modal",t.Navigation="Navigation",t.Performance="Performance",t.Pos="Pos",t.Print="Print",t.ResourcePicker="Resource_Picker",t.unstable_Picker="unstable_Picker",t.Scanner="Scanner",t.SessionToken="SessionToken",t.Share="Share",t.TitleBar="TitleBar",t.Toast="Toast",t.MarketingExternalActivityTopBar="MarketingExternalActivityTopBar",t.WebVitals="WebVitals"}(e.Group||(e.Group={})),function(t){t.Button="Button",t.ButtonGroup="ButtonGroup"}(e.ComponentType||(e.ComponentType={}))},function(t,e,n){"use strict";t.exports=n(83)},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},u=this&&this.__spreadArray||function(t,e){for(var n=0,r=e.length,o=t.length;n<r;n++,o++)t[o]=e[n];return t},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.unsubscribeActions=e.ActionSetWithChildren=e.ActionSet=void 0;var c=n(10),s=n(20),p=n(11),l=n(1),f=a(n(33)),d=n(0),h=function(){function t(t,e,n,r){var o=this;this.app=t,this.type=e,this.group=n,this.subgroups=[],this.subscriptions=[],t||p.throwError(p.Action.INVALID_ACTION,"Missing required `app`"),this.id=r||f.default(),this.defaultGroup=n;var i=this.set;this.set=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return o.app.hooks?(t=o.app.hooks).run.apply(t,u([c.LifecycleHook.UpdateAction,i,o],e)):i.apply(o,e)}}return t.prototype.set=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e]},Object.defineProperty(t.prototype,"component",{get:function(){return{id:this.id,subgroups:this.subgroups,type:this.type}},enumerable:!1,configurable:!0}),t.prototype.updateSubscription=function(t,e,n){var r,o=t.eventType,i=t.callback,u=t.component;return(r=this.subscriptions.findIndex((function(e){return e===t})))>=0?this.subscriptions[r].unsubscribe():r=void 0,this.group=e,this.subgroups=n,Object.assign(u,{subgroups:this.subgroups}),this.subscribe(o,i,u,r)},t.prototype.error=function(t){var e=this,n=[];return d.forEachInEnum(p.Action,(function(r){n.push(e.subscriptions.length),e.subscribe(r,t)})),function(){n.map((function(t){return e.subscriptions[t]})).forEach((function(t){s.removeFromCollection(e.subscriptions,t,(function(t){t.unsubscribe()}))}))}},t.prototype.subscribe=function(t,e,n,r){var o,u=this,a=n||this.component,c=t.toUpperCase(),s="number"==typeof r?e:e.bind(this);o=p.isErrorEventName(t)?d.getEventNameSpace(l.Group.Error,t,i(i({},a),{type:""})):d.getEventNameSpace(this.group,t,a);var f=this.app.subscribe(o,s,n?n.id:this.id),h={eventType:c,unsubscribe:f,callback:s,component:a,updateSubscribe:function(t,e){return u.updateSubscription(h,t,e)}};return"number"==typeof r&&r>=0&&r<this.subscriptions.length?this.subscriptions[r]=h:this.subscriptions.push(h),f},t.prototype.unsubscribe=function(t){return void 0===t&&(t=!1),b(this.subscriptions,this.defaultGroup,t),this},t}();e.ActionSet=h;var y=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.children=[],e}return o(e,t),e.prototype.unsubscribe=function(t,n){return void 0===t&&(t=!0),void 0===n&&(n=!1),b(this.subscriptions,this.defaultGroup,n),this.children.forEach((function(n){n instanceof e?n.unsubscribe(t,!t):n.unsubscribe(!t)})),this},e.prototype.getChild=function(t){var e=this.children.findIndex((function(e){return e.id===t}));return e>=0?this.children[e]:void 0},e.prototype.getChildIndex=function(t){return this.children.findIndex((function(e){return e.id===t}))},e.prototype.getChildSubscriptions=function(t,e){return this.subscriptions.filter((function(n){return n.component.id===t&&(!e||e===n.eventType)}))},e.prototype.addChild=function(t,n,r){var o=this,i=t.subscriptions;return this.getChild(t.id)||this.children.push(t),!i||n===t.group&&r===t.subgroups||(i.forEach((function(t){(0,t.updateSubscribe)(n,r)})),Object.assign(t,{group:n,subgroups:r}),t instanceof e&&t.children.forEach((function(t){return o.addChild(t,n,r)}))),this},e.prototype.removeChild=function(t){var e=this;return s.removeFromCollection(this.children,this.getChild(t),(function(){e.subscriptions.filter((function(e){return e.component.id===t})).forEach((function(t){s.removeFromCollection(e.subscriptions,t,(function(t){t.unsubscribe()}))}))})),this},e.prototype.subscribeToChild=function(t,e,n){var r=this,o=n.bind(this);if(e instanceof Array)return e.forEach((function(e){return r.subscribeToChild(t,e,n)})),this;if("string"!=typeof e)return this;var i=e.toUpperCase(),u=this.getChildSubscriptions(t.id,i);if(u.length>0)u.forEach((function(e){return e.updateSubscribe(r.group,t.subgroups)}));else{var a={id:t.id,subgroups:t.subgroups,type:t.type};this.subscribe(i,o,a)}return this},e.prototype.getUpdatedChildActions=function(t,e){if(0!==t.length){for(var n=t.filter((function(t,e,n){return e===n.indexOf(t)})),r=n.map((function(t){return t.id})),o=e.filter((function(t){return r.indexOf(t.id)<0}));o.length>0;){if(!(i=o.pop()))break;this.removeChild(i.id)}return n}for(;e.length>0;){var i;if(!(i=e.pop()))break;this.removeChild(i.id)}},e}(h);function b(t,e,n){void 0===n&&(n=!1),t.forEach((function(t){n?(0,t.updateSubscribe)(e,[]):(0,t.unsubscribe)()})),n||(t.length=0)}e.ActionSetWithChildren=y,e.unsubscribeActions=b},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.useAppBridge=void 0;var r=n(2),o=n(5);e.useAppBridge=function(){var t=r.useContext(o.AppBridgeContext);if(!t)throw new Error("No AppBridge context provided. Your component must be wrapped in the <Provider> component from App Bridge React.");return t}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AppBridgeContext=void 0;var r=n(2);e.AppBridgeContext=r.createContext(null)},function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),o=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&r(e,t,n);return o(e,t),e},u=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),e.WebVitals=e.unstable_Picker=e.Performance=e.Pos=e.AppLink=e.ChannelMenu=e.NavigationMenu=e.Share=e.ContextualSaveBar=e.MarketingExternalActivityTopBar=e.TitleBar=e.SessionToken=e.ResourcePicker=e.Redirect=e.Print=e.ModalContent=e.Modal=e.Loading=e.LeaveConfirmation=e.History=e.Toast=e.Fullscreen=e.FeedbackModal=e.Features=e.Flash=e.Error=e.Client=e.Cart=e.Scanner=e.ButtonGroup=e.Button=e.AuthCode=e.isAppBridgeAction=void 0;var a=i(n(37));e.AuthCode=a;var c=i(n(14));e.Button=c;var s=i(n(24));e.ButtonGroup=s;var p=i(n(98));e.Cart=p;var l=i(n(39));e.Client=l;var f=i(n(16));e.Error=f;var d=i(n(101));e.Flash=d;var h=i(n(40));e.Features=h;var y=i(n(105));e.FeedbackModal=y;var b=i(n(107));e.Fullscreen=b;var v=i(n(108));e.LeaveConfirmation=v;var P=i(n(109));e.Loading=P;var A=i(n(18));e.Modal=A;var O=i(n(110));e.ModalContent=O;var _=i(n(111));e.History=_;var g=i(n(26));e.Redirect=g;var m=i(n(49));e.Print=m;var E=i(n(50));e.ResourcePicker=E;var T=i(n(113));e.Scanner=T;var S=i(n(115));e.SessionToken=S;var j=i(n(52));e.TitleBar=j;var C=i(n(54));e.Toast=C;var M=i(n(55));e.ContextualSaveBar=M;var I=i(n(118));e.Share=I;var R=i(n(57));e.NavigationMenu=R;var w=i(n(119));e.ChannelMenu=w;var N=i(n(60));e.AppLink=N;var L=i(n(120));e.Pos=L;var D=i(n(121));e.MarketingExternalActivityTopBar=D;var B=i(n(125));e.Performance=B;var U=i(n(62));e.unstable_Picker=U;var k=i(n(64));e.WebVitals=k;var G=n(130);Object.defineProperty(e,"isAppBridgeAction",{enumerable:!0,get:function(){return G.isAppBridgeAction}}),u(n(8),e)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getPackageName=e.getVersion=e.getMergedProps=e.updateActionFromPayload=e.isValidOptionalString=e.isValidOptionalNumber=e.NonSnakeCaseGroup=e.getEventNameSpace=e.forEachInEnum=e.findMatchInEnum=e.actionWrapper=void 0;var r=n(0);Object.defineProperty(e,"actionWrapper",{enumerable:!0,get:function(){return r.actionWrapper}}),Object.defineProperty(e,"findMatchInEnum",{enumerable:!0,get:function(){return r.findMatchInEnum}}),Object.defineProperty(e,"forEachInEnum",{enumerable:!0,get:function(){return r.forEachInEnum}}),Object.defineProperty(e,"getEventNameSpace",{enumerable:!0,get:function(){return r.getEventNameSpace}}),Object.defineProperty(e,"NonSnakeCaseGroup",{enumerable:!0,get:function(){return r.NonSnakeCaseGroup}}),Object.defineProperty(e,"isValidOptionalNumber",{enumerable:!0,get:function(){return r.isValidOptionalNumber}}),Object.defineProperty(e,"isValidOptionalString",{enumerable:!0,get:function(){return r.isValidOptionalString}}),Object.defineProperty(e,"updateActionFromPayload",{enumerable:!0,get:function(){return r.updateActionFromPayload}}),Object.defineProperty(e,"getMergedProps",{enumerable:!0,get:function(){return r.getMergedProps}});var o=n(97);e.getVersion=function(){return o.version},e.getPackageName=function(){return o.name}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ComponentType=e.Group=void 0;var r=n(1);Object.defineProperty(e,"Group",{enumerable:!0,get:function(){return r.Group}}),Object.defineProperty(e,"ComponentType",{enumerable:!0,get:function(){return r.ComponentType}})},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.Button=e.update=e.clickButton=e.Style=e.Icon=e.Action=void 0;var u,a=n(0),c=n(3),s=n(1);function p(t,e,n){var r=e.id,o=a.getEventNameSpace(t,u.CLICK,e),i={id:r,payload:n};return a.actionWrapper({type:o,group:t,payload:i})}function l(t,e,n){var r=e.id,o=n.label,c=a.getEventNameSpace(t,u.UPDATE,e),s=i(i({},n),{id:r,label:o});return a.actionWrapper({type:c,group:t,payload:s})}!function(t){t.CLICK="CLICK",t.UPDATE="UPDATE"}(u=e.Action||(e.Action={})),function(t){t.Print="print"}(e.Icon||(e.Icon={})),function(t){t.Danger="danger"}(e.Style||(e.Style={})),e.clickButton=p,e.update=l;var f=function(t){function e(e,n){var r=t.call(this,e,s.ComponentType.Button,s.Group.Button)||this;return r.disabled=!1,r.loading=!1,r.plain=!1,r.set(n,!1),r}return o(e,t),Object.defineProperty(e.prototype,"options",{get:function(){return{disabled:this.disabled,icon:this.icon,label:this.label,style:this.style,loading:this.loading,plain:this.plain}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"payload",{get:function(){return i(i({},this.options),{id:this.id})},enumerable:!1,configurable:!0}),e.prototype.set=function(t,e){void 0===e&&(e=!0);var n=a.getMergedProps(this.options,t),r=n.label,o=n.disabled,i=n.icon,c=n.style,s=n.loading,p=n.plain;return this.label=r,this.disabled=Boolean(o),this.icon=i,this.style=c,this.loading=Boolean(s),this.plain=Boolean(p),e&&this.dispatch(u.UPDATE),this},e.prototype.dispatch=function(t,e){switch(t){case u.CLICK:this.app.dispatch(p(this.group,this.component,e));break;case u.UPDATE:var n=l(this.group,this.component,this.payload);this.app.dispatch(n)}return this},e}(c.ActionSet);e.Button=f},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LifecycleHook=e.PermissionType=e.MessageType=void 0,function(t){t.GetState="getState",t.Dispatch="dispatch",t.Subscribe="subscribe",t.Unsubscribe="unsubscribe"}(e.MessageType||(e.MessageType={})),function(t){t.Dispatch="Dispatch",t.Subscribe="Subscribe"}(e.PermissionType||(e.PermissionType={})),function(t){t.UpdateAction="UpdateAction",t.DispatchAction="DispatchAction"}(e.LifecycleHook||(e.LifecycleHook={}))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.permissionAction=e.isErrorEventName=e.throwError=e.invalidOriginAction=e.fromAction=e.AppBridgeError=e.AppActionType=e.Action=void 0;var r,o=n(1),i=n(0);!function(t){t.INVALID_ACTION="APP::ERROR::INVALID_ACTION",t.INVALID_ACTION_TYPE="APP::ERROR::INVALID_ACTION_TYPE",t.INVALID_PAYLOAD="APP::ERROR::INVALID_PAYLOAD",t.INVALID_OPTIONS="APP::ERROR::INVALID_OPTIONS",t.UNEXPECTED_ACTION="APP::ERROR::UNEXPECTED_ACTION",t.PERSISTENCE="APP::ERROR::PERSISTENCE",t.UNSUPPORTED_OPERATION="APP::ERROR::UNSUPPORTED_OPERATION",t.NETWORK="APP::ERROR::NETWORK",t.PERMISSION="APP::ERROR::PERMISSION",t.FAILED_AUTHENTICATION="APP::ERROR::FAILED_AUTHENTICATION",t.INVALID_ORIGIN="APP::ERROR::INVALID_ORIGIN"}(r=e.Action||(e.Action={})),function(t){t.INVALID_CONFIG="APP::ERROR::INVALID_CONFIG",t.MISSING_CONFIG="APP::APP_ERROR::MISSING_CONFIG",t.MISSING_APP_BRIDGE_MIDDLEWARE="APP::APP_ERROR::MISSING_APP_BRIDGE_MIDDLEWARE",t.WINDOW_UNDEFINED="APP::APP_ERROR::WINDOW_UNDEFINED",t.REDUX_REINSTANTIATED="APP::APP_ERROR::REDUX_REINSTANTIATED",t.MISSING_LOCAL_ORIGIN="APP::APP_ERROR::MISSING_LOCAL_ORIGIN",t.MISSING_HOST_PROVIDER="APP::APP_ERROR::MISSING_HOST_PROVIDER",t.MISSING_ROUTER_CONTEXT="APP::APP_ERROR::MISSING_ROUTER_CONTEXT",t.MISSING_HISTORY_BLOCK="APP::APP_ERROR::MISSING_HISTORY_BLOCK"}(e.AppActionType||(e.AppActionType={}));var u=function(t){this.name="AppBridgeError",this.message=t,"function"==typeof Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error(this.message).stack};function a(t,e,n){var r=new u(t?e+": "+t:e);return r.action=n,r.type=e,r}e.AppBridgeError=u,u.prototype=Object.create(Error.prototype),e.fromAction=a,e.invalidOriginAction=function(t){return i.actionWrapper({group:o.Group.Error,payload:{message:t,type:r.INVALID_ORIGIN},type:r.INVALID_ORIGIN})},e.throwError=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n,r,o=t[0];throw"string"==typeof t[1]?n=t[1]:(r=t[1],n=t[2]||""),a(n,o,r)},e.isErrorEventName=function(t){return"string"==typeof i.findMatchInEnum(r,t)},e.permissionAction=function(t,e){return function(t,e,n){var r=e.payload;return i.actionWrapper({type:t,group:o.Group.Error,payload:{action:e,message:n,type:t,id:r&&r.id?r.id:void 0}})}(r.PERMISSION,t,e||"Action is not permitted")}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getSingleButton=void 0;var r=n(9);e.getSingleButton=function(t,e,n,o){return t.addChild(e,t.group,n),t.subscribeToChild(e,r.Action.UPDATE,o),e.payload}},function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),o=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),o(n(93),e)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.isValidButtonProps=e.Button=e.update=e.Style=e.Icon=e.clickButton=e.Action=void 0;var r=n(9);Object.defineProperty(e,"Button",{enumerable:!0,get:function(){return r.Button}});var o=n(9);Object.defineProperty(e,"Action",{enumerable:!0,get:function(){return o.Action}}),Object.defineProperty(e,"clickButton",{enumerable:!0,get:function(){return o.clickButton}}),Object.defineProperty(e,"Icon",{enumerable:!0,get:function(){return o.Icon}}),Object.defineProperty(e,"Style",{enumerable:!0,get:function(){return o.Style}}),Object.defineProperty(e,"update",{enumerable:!0,get:function(){return o.update}}),e.isValidButtonProps=function(t){return"string"==typeof t.id&&"string"==typeof t.label},e.create=function(t,e){return new r.Button(t,e)}},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.ButtonGroup=e.isGroupedButtonPayload=e.isGroupedButton=e.update=e.Action=void 0;var u,a=n(12),c=n(0),s=n(3),p=n(1);function l(t,e,n){return function(t,e,n,r,o){var u=e.id,a=r.label,s=c.getEventNameSpace(t,n,e),p=i(i({},r),{id:u,label:a,payload:o});return c.actionWrapper({type:s,group:t,payload:p})}(t,e,u.UPDATE,n)}!function(t){t.UPDATE="UPDATE"}(u=e.Action||(e.Action={})),e.update=l,e.isGroupedButton=function(t){var e=t;return e.buttons&&e.buttons.length>0&&void 0!==e.label},e.isGroupedButtonPayload=function(t){var e=t;return Array.isArray(e.buttons)&&"string"==typeof e.id&&"string"==typeof e.label};var f=function(t){function e(e,n){var r=t.call(this,e,p.ComponentType.ButtonGroup,p.Group.ButtonGroup)||this;return r.disabled=!1,r.plain=!1,r.buttonsOptions=[],r.buttons=[],r.set(n,!1),r}return o(e,t),Object.defineProperty(e.prototype,"options",{get:function(){return{buttons:this.buttonsOptions,disabled:this.disabled,label:this.label,plain:this.plain}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"payload",{get:function(){return i(i({},this.options),{buttons:this.buttons,id:this.id})},enumerable:!1,configurable:!0}),e.prototype.set=function(t,e){void 0===e&&(e=!0);var n=c.getMergedProps(this.options,t),r=n.label,o=n.disabled,i=n.buttons,a=n.plain;return this.label=r,this.disabled=Boolean(o),this.buttons=this.getButtons(i),this.plain=Boolean(a),e&&this.dispatch(u.UPDATE),this},e.prototype.dispatch=function(t){switch(t){case u.UPDATE:var e=l(this.group,this.component,this.payload);this.app.dispatch(e)}return this},e.prototype.updateButtons=function(t){if(this.buttons&&0!==this.buttons.length){for(var e,n=0,r=this.buttons;n<r.length;n++){var o=r[n];if(e=c.updateActionFromPayload(o,t))break}e&&this.dispatch(u.UPDATE)}},e.prototype.getSingleButton=function(t){return a.getSingleButton(this,t,this.subgroups,this.updateButtons)},e.prototype.getButtons=function(t){var e=this,n=[];return t?(t.forEach((function(t){var r=a.getSingleButton(e,t,e.subgroups,e.updateButtons);n.push(r)})),this.buttonsOptions=t,n):[]},e}(s.ActionSetWithChildren);e.ButtonGroup=f,e.create=function(t,e){return new f(t,e)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.networkAction=e.persistenceAction=e.unsupportedOperationAction=e.unexpectedAction=e.invalidAction=e.invalidActionType=e.invalidPayload=e.Message=e.fromAction=e.Action=e.permissionAction=e.isErrorEventName=e.throwError=e.invalidOriginAction=e.AppBridgeError=e.AppActionType=void 0;var r=n(11);Object.defineProperty(e,"Action",{enumerable:!0,get:function(){return r.Action}}),Object.defineProperty(e,"fromAction",{enumerable:!0,get:function(){return r.fromAction}});var o=n(7),i=n(8),u=n(11);function a(t,e,n){var r=e.payload;return o.actionWrapper({type:t,group:i.Group.Error,payload:{action:e,message:n,type:t,id:r&&r.id?r.id:void 0}})}Object.defineProperty(e,"AppActionType",{enumerable:!0,get:function(){return u.AppActionType}}),Object.defineProperty(e,"AppBridgeError",{enumerable:!0,get:function(){return u.AppBridgeError}}),Object.defineProperty(e,"invalidOriginAction",{enumerable:!0,get:function(){return u.invalidOriginAction}}),Object.defineProperty(e,"throwError",{enumerable:!0,get:function(){return u.throwError}}),Object.defineProperty(e,"isErrorEventName",{enumerable:!0,get:function(){return u.isErrorEventName}}),Object.defineProperty(e,"permissionAction",{enumerable:!0,get:function(){return u.permissionAction}}),function(t){t.MISSING_PAYLOAD="Missing payload",t.INVALID_PAYLOAD_ID="Id in payload is missing or invalid"}(e.Message||(e.Message={})),e.invalidPayload=function(t,e){return a(r.Action.INVALID_PAYLOAD,t,e||"The action's payload is missing required properties or has invalid properties")},e.invalidActionType=function(t,e){return o.actionWrapper({group:i.Group.Error,payload:{action:t,message:e||"The action type is invalid or unsupported",type:r.Action.INVALID_ACTION_TYPE},type:r.Action.INVALID_ACTION_TYPE})},e.invalidAction=function(t,e){return o.actionWrapper({group:i.Group.Error,payload:{action:t,message:e||"The action's has missing/invalid values for `group`, `type` or `version`",type:r.Action.INVALID_ACTION},type:r.Action.INVALID_ACTION})},e.unexpectedAction=function(t,e){return o.actionWrapper({group:i.Group.Error,payload:{action:t,message:e||"Action cannot be called at this time",type:r.Action.UNEXPECTED_ACTION},type:r.Action.UNEXPECTED_ACTION})},e.unsupportedOperationAction=function(t,e){return a(r.Action.UNSUPPORTED_OPERATION,t,e||"The action type is unsupported")},e.persistenceAction=function(t,e){return a(r.Action.PERSISTENCE,t,e||"Action cannot be persisted on server")},e.networkAction=function(t,e){return a(r.Action.NETWORK,t,e||"Network error")}},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.AppLink=e.update=e.Action=void 0;var u,a=n(0),c=n(3),s=n(1),p=n(27);function l(t,e,n){var r=e.id,o=n.label,c=n.destination,s=i(i({},n),{id:r,label:o,destination:c});return a.actionWrapper({group:t,type:a.getEventNameSpace(t,u.UPDATE,e),payload:s})}!function(t){t.UPDATE="UPDATE"}(u=e.Action||(e.Action={})),e.update=l;var f=function(t){function e(e,n){var r=t.call(this,e,s.Group.Link,s.Group.Link)||this;return r.label="",r.destination="",r.set(n,!1),r}return o(e,t),Object.defineProperty(e.prototype,"options",{get:function(){return{label:this.label,destination:this.destination,redirectType:p.Action.APP}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"payload",{get:function(){var t=this.options,e=t.label,n=t.destination,r=t.redirectType,o=n;return{id:this.id,label:e,destination:{path:o},redirectType:r}},enumerable:!1,configurable:!0}),e.prototype.set=function(t,e){void 0===e&&(e=!0);var n=a.getMergedProps(this.options,t),r=n.label,o=n.destination;return this.label=r,this.destination=o,e&&this.dispatch(u.UPDATE),this},e.prototype.dispatch=function(t){switch(t){case u.UPDATE:var e=l(this.group,this.component,this.payload);this.app.dispatch(e)}return this},e}(c.ActionSet);e.AppLink=f},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.Modal=e.isMessageModal=e.data=e.update=e.clickFooterButton=e.updateModalSize=e.closeModal=e.openModal=e.Size=e.Action=e.isIframeModal=e.ModalMessage=e.ModalIframe=void 0;var r=n(19);Object.defineProperty(e,"ModalIframe",{enumerable:!0,get:function(){return r.ModalIframe}}),Object.defineProperty(e,"ModalMessage",{enumerable:!0,get:function(){return r.ModalMessage}}),Object.defineProperty(e,"isIframeModal",{enumerable:!0,get:function(){return r.isIframeModal}});var o=n(19);Object.defineProperty(e,"Action",{enumerable:!0,get:function(){return o.Action}}),Object.defineProperty(e,"Size",{enumerable:!0,get:function(){return o.Size}}),Object.defineProperty(e,"openModal",{enumerable:!0,get:function(){return o.openModal}}),Object.defineProperty(e,"closeModal",{enumerable:!0,get:function(){return o.closeModal}}),Object.defineProperty(e,"updateModalSize",{enumerable:!0,get:function(){return o.updateModalSize}}),Object.defineProperty(e,"clickFooterButton",{enumerable:!0,get:function(){return o.clickFooterButton}}),Object.defineProperty(e,"update",{enumerable:!0,get:function(){return o.update}}),Object.defineProperty(e,"data",{enumerable:!0,get:function(){return o.data}}),Object.defineProperty(e,"isMessageModal",{enumerable:!0,get:function(){return o.isMessageModal}}),Object.defineProperty(e,"Modal",{enumerable:!0,get:function(){return o.Modal}});e.create=function(t,e){return r.isIframeModal(e)?new r.ModalIframe(t,e):new r.ModalMessage(t,e)}},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.ModalIframe=e.ModalMessage=e.Modal=e.isMessageModal=e.isIframeModal=e.data=e.update=e.clickFooterButton=e.updateModalSize=e.closeModal=e.openModal=e.Size=e.Action=void 0;var u,a,c=n(12),s=n(0),p=n(3),l=n(1),f=n(9);!function(t){t.OPEN="APP::MODAL::OPEN",t.CLOSE="APP::MODAL::CLOSE",t.UPDATE="APP::MODAL::UPDATE",t.UPDATE_CONTENT="APP::MODAL::CONTENT::UPDATE",t.FOOTER_BUTTON_CLICK="APP::MODAL::FOOTER::BUTTON::CLICK",t.FOOTER_BUTTON_UPDATE="APP::MODAL::FOOTER::BUTTON::UPDATE",t.UPDATE_SIZE="APP::MODAL::UPDATE_SIZE",t.DATA="APP::MODAL::DATA"}(u=e.Action||(e.Action={})),function(t){t.Small="small",t.Medium="medium",t.Large="large",t.Full="full",t.Auto="auto"}(a=e.Size||(e.Size={}));var d={group:l.Group.Modal,subgroups:["Footer"],type:l.ComponentType.Button};function h(t){return s.actionWrapper({group:l.Group.Modal,payload:t,type:u.OPEN})}function y(t){return s.actionWrapper({group:l.Group.Modal,payload:t,type:u.CLOSE})}function b(t){return s.actionWrapper({payload:t,group:l.Group.Modal,type:u.UPDATE})}function v(t){return s.actionWrapper({payload:t,group:l.Group.Modal,type:u.DATA})}e.openModal=h,e.closeModal=y,e.updateModalSize=function(t){return s.actionWrapper({group:l.Group.Modal,payload:t,type:u.UPDATE_SIZE})},e.clickFooterButton=function(t,e){var n=i({id:t},d);return f.clickButton(l.Group.Modal,n,e)},e.update=b,e.data=v,e.isIframeModal=function(t){return"string"==typeof t.url||"string"==typeof t.path},e.isMessageModal=function(t){return"string"==typeof t.message};var P=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.size=a.Small,e}return o(e,t),Object.defineProperty(e.prototype,"footer",{get:function(){if(this.footerPrimary||this.footerSecondary)return{buttons:{primary:this.footerPrimary,secondary:this.footerSecondary}}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"footerOptions",{get:function(){if(this.footerPrimaryOptions||this.footerSecondaryOptions)return{buttons:{primary:this.footerPrimaryOptions,secondary:this.footerSecondaryOptions}}},enumerable:!1,configurable:!0}),e.prototype.close=function(){this.app.dispatch(y({id:this.id}))},e.prototype.setFooterPrimaryButton=function(t,e){var n=this,r=d.subgroups;this.footerPrimaryOptions=this.getChildButton(t,this.footerPrimaryOptions),this.footerPrimary=this.footerPrimaryOptions?c.getSingleButton(this,this.footerPrimaryOptions,r,(function(t){n.updatePrimaryFooterButton(t,e)})):void 0},e.prototype.setFooterSecondaryButtons=function(t,e){var n=this,r=d.subgroups,o=t||[],i=this.footerOptions&&this.footerOptions.buttons.secondary||[];this.footerSecondaryOptions=this.getUpdatedChildActions(o,i),this.footerSecondary=this.footerSecondaryOptions?this.footerSecondaryOptions.map((function(t){return c.getSingleButton(n,t,r,(function(t){n.updateSecondaryFooterButton(t,e)}))})):void 0},e.prototype.getChildButton=function(t,e){var n=t?[t]:[],r=e?[e]:[],o=this.getUpdatedChildActions(n,r);return o?o[0]:void 0},e.prototype.updatePrimaryFooterButton=function(t,e){this.footer&&this.footer.buttons.primary&&s.updateActionFromPayload(this.footer.buttons.primary,t)&&e()},e.prototype.updateSecondaryFooterButton=function(t,e){if(this.footer&&this.footer.buttons&&this.footer.buttons.secondary){for(var n,r=0,o=this.footer.buttons.secondary;r<o.length;r++){var i=o[r];if(n=s.updateActionFromPayload(i,t))break}n&&e()}},e}(p.ActionSetWithChildren);e.Modal=P;var A=function(t){function e(e,n){var r=t.call(this,e,l.Group.Modal,l.Group.Modal)||this;return r.set(n,!1),r}return o(e,t),Object.defineProperty(e.prototype,"payload",{get:function(){return i(i({},this.options),{footer:this.footer,id:this.id})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"options",{get:function(){return{footer:this.footerOptions,message:this.message,size:this.size,title:this.title}},enumerable:!1,configurable:!0}),e.prototype.set=function(t,e){var n=this;void 0===e&&(e=!0);var r=s.getMergedProps(this.options,t),o=r.title,i=r.footer,a=r.message,c=r.size;return this.title=o,this.message=a,this.size=c,this.setFooterPrimaryButton(i?i.buttons.primary:void 0,(function(){n.dispatch(u.UPDATE)})),this.setFooterSecondaryButtons(i?i.buttons.secondary:void 0,(function(){n.dispatch(u.UPDATE)})),e&&this.dispatch(u.UPDATE),this},e.prototype.dispatch=function(t){switch(t){case u.OPEN:this.app.dispatch(h(this.payload));break;case u.CLOSE:this.close();break;case u.UPDATE:this.app.dispatch(b(this.payload))}return this},e}(P);e.ModalMessage=A;var O=function(t){function e(e,n){var r=t.call(this,e,l.Group.Modal,l.Group.Modal)||this;return r.set(n,!1),r}return o(e,t),Object.defineProperty(e.prototype,"payload",{get:function(){return i(i({},this.options),{footer:this.footer,id:this.id})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"options",{get:function(){return{footer:this.footerOptions,path:this.path,size:this.size,title:this.title,url:this.url,loading:this.loading}},enumerable:!1,configurable:!0}),e.prototype.set=function(t,e){var n=this;void 0===e&&(e=!0);var r=s.getMergedProps(this.options,t),o=r.title,i=r.footer,a=r.path,c=r.url,p=r.size,l=r.loading;return this.title=o,this.url=c,this.path=a,this.size=p,this.loading=l,this.setFooterPrimaryButton(i?i.buttons.primary:void 0,(function(){n.dispatch(u.UPDATE)})),this.setFooterSecondaryButtons(i?i.buttons.secondary:void 0,(function(){n.dispatch(u.UPDATE)})),e&&this.dispatch(u.UPDATE),this},e.prototype.dispatch=function(t,e){switch(t){case u.OPEN:this.app.dispatch(h(this.payload));break;case u.CLOSE:this.close();break;case u.UPDATE:this.app.dispatch(b(this.payload));break;case u.DATA:this.app.dispatch(v(e||{}))}return this},e}(P);e.ModalIframe=O},function(t,e,n){"use strict";function r(t,e,n){var r=t.findIndex((function(t){return t===e}));return r>=0&&(t.splice(r,1),n&&n(e),!0)}Object.defineProperty(e,"__esModule",{value:!0}),e.removeFromCollection=e.addAndRemoveFromCollection=void 0,e.addAndRemoveFromCollection=function(t,e,n){return t.push(e),function(){return r(t,e,n)}},e.removeFromCollection=r},function(t,e,n){"use strict";var r,o;Object.defineProperty(e,"__esModule",{value:!0}),e.isUnframed=e.isClient=e.isServer=void 0,e.isServer="undefined"==typeof window,e.isClient=!e.isServer,e.isUnframed=e.isClient&&(null===(o=null===(r=window.navigator)||void 0===r?void 0:r.userAgent)||void 0===o?void 0:o.indexOf("Unframed"))>0},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isShopifyPing=e.isShopifyPOS=e.isShopifyMobile=e.isShopifyEmbedded=e.isMobile=void 0;var r=n(23);function o(){return"undefined"!=typeof navigator&&navigator.userAgent.indexOf("Shopify Mobile")>=0}function i(){return"undefined"!=typeof navigator&&navigator.userAgent.indexOf("Shopify POS")>=0}function u(){return"undefined"!=typeof navigator&&navigator.userAgent.indexOf("Shopify Ping")>=0}e.isMobile=function(){return o()||i()||u()},e.isShopifyEmbedded=function(){return r.isClient&&window.top!==window.self||r.isUnframed},e.isShopifyMobile=o,e.isShopifyPOS=i,e.isShopifyPing=u},function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.isDevelopmentClient=e.isProduction=e.isDevelopment=e.isUnframed=e.isServer=e.isClient=void 0;var r=n(21),o=n(21);Object.defineProperty(e,"isClient",{enumerable:!0,get:function(){return o.isClient}}),Object.defineProperty(e,"isServer",{enumerable:!0,get:function(){return o.isServer}}),Object.defineProperty(e,"isUnframed",{enumerable:!0,get:function(){return o.isUnframed}}),e.isDevelopment=void 0!==t&&t.env&&!1,e.isProduction=!e.isDevelopment,e.isDevelopmentClient=e.isDevelopment&&r.isClient}).call(this,n(94))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.ButtonGroup=e.isGroupedButtonPayload=e.isGroupedButton=e.update=e.Action=void 0;var r=n(15);Object.defineProperty(e,"ButtonGroup",{enumerable:!0,get:function(){return r.ButtonGroup}});var o=n(15);Object.defineProperty(e,"Action",{enumerable:!0,get:function(){return o.Action}}),Object.defineProperty(e,"update",{enumerable:!0,get:function(){return o.update}}),Object.defineProperty(e,"isGroupedButton",{enumerable:!0,get:function(){return o.isGroupedButton}}),Object.defineProperty(e,"isGroupedButtonPayload",{enumerable:!0,get:function(){return o.isGroupedButtonPayload}}),e.create=function(t,e){return new r.ButtonGroup(t,e)}},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.Toast=e.primaryAction=e.clear=e.show=e.Action=void 0;var u,a=n(0),c=n(3),s=n(1);function p(t){return a.actionWrapper({group:s.Group.Toast,payload:t,type:u.SHOW})}function l(t){return a.actionWrapper({payload:t,group:s.Group.Toast,type:u.CLEAR})}function f(t){return a.actionWrapper({payload:t,group:s.Group.Toast,type:u.ACTION})}!function(t){t.SHOW="APP::TOAST::SHOW",t.CLEAR="APP::TOAST::CLEAR",t.ACTION="APP::TOAST::ACTION"}(u=e.Action||(e.Action={})),e.show=p,e.clear=l,e.primaryAction=f;var d=function(t){function e(e,n){var r=t.call(this,e,s.Group.Toast,s.Group.Toast)||this;return r.message="",r.duration=5e3,r.set(n),r}return o(e,t),Object.defineProperty(e.prototype,"options",{get:function(){var t;return{duration:this.duration,isError:this.isError,message:this.message,action:(null===(t=this.action)||void 0===t?void 0:t.content)?{content:this.action.content}:void 0}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"payload",{get:function(){return i({id:this.id},this.options)},enumerable:!1,configurable:!0}),e.prototype.set=function(t){var e=a.getMergedProps(this.options,t),n=e.message,r=e.duration,o=e.isError,i=e.action;return this.message=n,this.duration=r,this.isError=o,this.action=(null==i?void 0:i.content)?{content:i.content||""}:void 0,this},e.prototype.dispatch=function(t){switch(t){case u.SHOW:var e=p(this.payload);this.app.dispatch(e);break;case u.CLEAR:this.app.dispatch(l({id:this.id}));break;case u.ACTION:this.app.dispatch(f({id:this.id}))}return this},e}(c.ActionSet);e.Toast=d},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.isProductVariantCreateResourcePayload=e.isProductVariantResourcePayload=e.isCreateResourcePayload=e.isAdminSection=e.isRemotePayload=e.isAdminSectionPayload=e.isAdminPathPayload=e.isAppPayload=e.getRelativePath=e.normalizeUrl=e.getPathWithSearchAndHash=e.toDestination=e.toApp=e.toRemote=e.toAdminSection=e.toAdminPath=e.isResourcePayload=e.ResourceType=e.Action=e.Redirect=void 0;var r=n(27);Object.defineProperty(e,"Redirect",{enumerable:!0,get:function(){return r.Redirect}}),Object.defineProperty(e,"isCreateResourcePayload",{enumerable:!0,get:function(){return r.isCreateResourcePayload}}),Object.defineProperty(e,"isProductVariantResourcePayload",{enumerable:!0,get:function(){return r.isProductVariantResourcePayload}});var o=n(27);Object.defineProperty(e,"Action",{enumerable:!0,get:function(){return o.Action}}),Object.defineProperty(e,"ResourceType",{enumerable:!0,get:function(){return o.ResourceType}}),Object.defineProperty(e,"isResourcePayload",{enumerable:!0,get:function(){return o.isResourcePayload}}),Object.defineProperty(e,"toAdminPath",{enumerable:!0,get:function(){return o.toAdminPath}}),Object.defineProperty(e,"toAdminSection",{enumerable:!0,get:function(){return o.toAdminSection}}),Object.defineProperty(e,"toRemote",{enumerable:!0,get:function(){return o.toRemote}}),Object.defineProperty(e,"toApp",{enumerable:!0,get:function(){return o.toApp}}),Object.defineProperty(e,"toDestination",{enumerable:!0,get:function(){return o.toDestination}}),Object.defineProperty(e,"getPathWithSearchAndHash",{enumerable:!0,get:function(){return o.getPathWithSearchAndHash}}),Object.defineProperty(e,"normalizeUrl",{enumerable:!0,get:function(){return o.normalizeUrl}}),Object.defineProperty(e,"getRelativePath",{enumerable:!0,get:function(){return o.getRelativePath}}),Object.defineProperty(e,"isAppPayload",{enumerable:!0,get:function(){return o.isAppPayload}}),Object.defineProperty(e,"isAdminPathPayload",{enumerable:!0,get:function(){return o.isAdminPathPayload}}),Object.defineProperty(e,"isAdminSectionPayload",{enumerable:!0,get:function(){return o.isAdminSectionPayload}}),Object.defineProperty(e,"isRemotePayload",{enumerable:!0,get:function(){return o.isRemotePayload}}),Object.defineProperty(e,"isAdminSection",{enumerable:!0,get:function(){return o.isAdminSection}}),e.isProductVariantCreateResourcePayload=function(t){return!!r.isProductVariantResourcePayload(t)&&r.isCreateResourcePayload(t.variant)},e.create=function(t){return new r.Redirect(t)}},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.Redirect=e.isProductVariantResourcePayload=e.isCreateResourcePayload=e.isAdminSection=e.isRemotePayload=e.isAdminSectionPayload=e.isAdminPathPayload=e.isAppPayload=e.getRelativePath=e.normalizeUrl=e.getPathWithSearchAndHash=e.toDestination=e.toApp=e.toRemote=e.toAdminSection=e.toAdminPath=e.isResourcePayload=e.ResourceType=e.Action=void 0;var u,a=n(0),c=n(3),s=n(1);function p(t){return a.actionWrapper({payload:t,group:s.Group.Navigation,type:u.ADMIN_PATH})}function l(t){return a.actionWrapper({payload:t,group:s.Group.Navigation,type:u.ADMIN_SECTION})}function f(t){return a.actionWrapper({payload:t,group:s.Group.Navigation,type:u.REMOTE})}function d(t){return a.actionWrapper({payload:t,group:s.Group.Navigation,type:u.APP})}function h(t,e,n){switch(t){case u.APP:var r=v(e)?e:{path:e};return d(i({id:n},r));case u.ADMIN_PATH:var o=P(e)?e:{path:e};return p(i({id:n},o));case u.ADMIN_SECTION:var a=A(e)?e:{section:e};return l(i({id:n},a));case u.REMOTE:var c=O(e)?e:{url:e};return f(i({id:n},c))}}function y(t){return""+t.pathname+(t.search||"")+(t.hash||"")}function b(t){if("string"==typeof t)return t.startsWith("/")?t:y(new URL(t));var e=t.search instanceof URLSearchParams?t.search.toString():t.search;return y(i(i({},t),{search:e}))}function v(t){return"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"path")}function P(t){return"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"path")}function A(t){return"object"==typeof t&&"object"==typeof t.section&&Object.prototype.hasOwnProperty.call(t.section,"name")}function O(t){return"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"url")}!function(t){t.ADMIN_SECTION="APP::NAVIGATION::REDIRECT::ADMIN::SECTION",t.ADMIN_PATH="APP::NAVIGATION::REDIRECT::ADMIN::PATH",t.REMOTE="APP::NAVIGATION::REDIRECT::REMOTE",t.APP="APP::NAVIGATION::REDIRECT::APP"}(u=e.Action||(e.Action={})),function(t){t.Product="products",t.Collection="collections",t.Order="orders",t.Customer="customers",t.Discount="discounts"}(e.ResourceType||(e.ResourceType={})),e.isResourcePayload=function(t){return"string"==typeof t.id},e.toAdminPath=p,e.toAdminSection=l,e.toRemote=f,e.toApp=d,e.toDestination=h,e.getPathWithSearchAndHash=y,e.normalizeUrl=function(t){return t instanceof URL?t.toString():"string"==typeof t?t:b(t)},e.getRelativePath=b,e.isAppPayload=v,e.isAdminPathPayload=P,e.isAdminSectionPayload=A,e.isRemotePayload=O,e.isAdminSection=function(t){return"object"==typeof t&&"string"==typeof(null==t?void 0:t.name)},e.isCreateResourcePayload=function(t){return!0===t.create},e.isProductVariantResourcePayload=function(t){var e=t;return void 0!==e.id&&void 0!==e.variant};var _=function(t){function e(e){return t.call(this,e,"Redirect",s.Group.Navigation)||this}return o(e,t),Object.defineProperty(e.prototype,"payload",{get:function(){return{id:this.id}},enumerable:!1,configurable:!0}),e.prototype.dispatch=function(t,e){var n=h(t,e,this.payload.id);return this.app.dispatch(n),this},e}(c.ActionSet);e.Redirect=_},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.handleRouteChange=void 0;var r=n(6);e.handleRouteChange=function(t,e){return t.subscribe(r.Redirect.Action.APP,(function(t){var n=t.path;e.replace(n)}))}},function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function u(t){try{c(r.next(t))}catch(t){i(t)}}function a(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(u,a)}c((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;u;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return u.label++,{value:i[1],done:!1};case 5:u.label++,r=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!(o=u.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){u=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){u.label=i[1];break}if(6===i[0]&&u.label<o[1]){u.label=o[1],o=i;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(i);break}o[2]&&u.ops.pop(),u.trys.pop();continue}i=e.call(t,u)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.updateHistory=void 0;var i=n(13),u=n(6),a=n(162),c=["hmac","locale","protocol","session","shop","timestamp","host"];e.updateHistory=function(t,e){return r(this,void 0,void 0,(function(){var n,r,s,p,l,f,d,h,y;return o(this,(function(o){switch(o.label){case 0:return n=a.getSelfWindow(),r=a.getTopWindow(),s=n===r,[4,t.getState("context").then((function(t){return t===i.Context.Main}))];case 1:return p=o.sent(),s||!p?[2]:(l=function(t){var e=a.getOrigin();if("string"==typeof t)return new URL(t,e);var n=t.pathname,r=t.search,o=t.hash;return new URL(""+n+r+o,e)}(e),c.forEach((function(t){return l.searchParams.delete(t)})),f=l.pathname,d=l.search,h=l.hash,y=""+f+d+h,u.History.create(t).dispatch(u.History.Action.REPLACE,y),[2])}}))}))}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.useToast=e.useNavigationHistory=e.useNavigate=e.useLocale=e.useFeatureRequest=e.useFeaturesAvailable=e.useContextualSaveBar=e.useAuthenticatedFetch=e.useAppBridgeState=void 0;var r=n(31);Object.defineProperty(e,"useAppBridgeState",{enumerable:!0,get:function(){return r.useAppBridgeState}});var o=n(88);Object.defineProperty(e,"useAuthenticatedFetch",{enumerable:!0,get:function(){return o.useAuthenticatedFetch}});var i=n(134);Object.defineProperty(e,"useContextualSaveBar",{enumerable:!0,get:function(){return i.useContextualSaveBar}});var u=n(66);Object.defineProperty(e,"useFeaturesAvailable",{enumerable:!0,get:function(){return u.useFeaturesAvailable}});var a=n(137);Object.defineProperty(e,"useFeatureRequest",{enumerable:!0,get:function(){return a.useFeatureRequest}});var c=n(139);Object.defineProperty(e,"useLocale",{enumerable:!0,get:function(){return c.useLocale}});var s=n(141);Object.defineProperty(e,"useNavigate",{enumerable:!0,get:function(){return s.useNavigate}});var p=n(67);Object.defineProperty(e,"useNavigationHistory",{enumerable:!0,get:function(){return p.useNavigationHistory}});var l=n(144);Object.defineProperty(e,"useToast",{enumerable:!0,get:function(){return l.useToast}})},function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),o=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),o(n(87),e)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SEPARATOR=e.PREFIX=void 0,e.PREFIX="APP",e.SEPARATOR="::"},function(t,e,n){"use strict";function r(t){return Array.from(t).map((function(t){return("00"+t.toString(16)).slice(-2)})).join("")}function o(t){if("function"==typeof Uint8Array&&"object"==typeof window&&window.crypto){var e=new Uint8Array(t),n=window.crypto.getRandomValues(e);if(n)return n}return Array.from(new Array(t),(function(){return 255*Math.random()|0}))}function i(){var t=o(1),e=o(2);return t[0]&=191,e[0]&=79,[r(o(4)),"-",r(o(2)),"-",r(e),"-",r(t),r(o(1)),"-",r(o(6))].join("")}Object.defineProperty(e,"__esModule",{value:!0}),e.generateUuid=void 0,e.generateUuid=i,e.default=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isPermitted=e.getPermissionKey=e.isPerformanceOrWebVitalsAction=e.isAppMessage=e.isAppBridgeAction=void 0;var r=n(10),o=n(32),i=n(0);function u(t){return t.replace(new RegExp("^"+o.PREFIX+o.SEPARATOR+"\\w+"+o.SEPARATOR),"")}e.isAppBridgeAction=function(t){return t instanceof Object&&Object.prototype.hasOwnProperty.call(t,"type")&&t.type.toString().startsWith(o.PREFIX)},e.isAppMessage=function(t){if("object"!=typeof t||!t.data||"object"!=typeof t.data)return!1;var e=t.data;return Object.prototype.hasOwnProperty.call(e,"type")&&void 0!==i.findMatchInEnum(r.MessageType,e.type)},e.isPerformanceOrWebVitalsAction=function(t){return t.type.match(/^APP::(PERFORMANCE|WEB_VITALS)::/)},e.getPermissionKey=u,e.isPermitted=function(t,e,n){var r=e.group,o=e.type;if(!r||!Object.prototype.hasOwnProperty.call(t,r))return!1;var i=t[r];if(!i)return!1;var a=u(o);return!!i[a]&&!0===i[a][n]}},function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),o=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&r(e,t,n);return o(e,t),e},u=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function u(t){try{c(r.next(t))}catch(t){i(t)}}function a(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(u,a)}c((r=r.apply(t,e||[])).next())}))},a=this&&this.__generator||function(t,e){var n,r,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;u;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return u.label++,{value:i[1],done:!1};case 5:u.label++,r=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!(o=u.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){u=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){u.label=i[1];break}if(6===i[0]&&u.label<o[1]){u.label=o[1],o=i;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(i);break}o[2]&&u.ops.pop(),u.trys.pop();continue}i=e.call(t,u)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.getSessionToken=void 0;var c=n(11),s=i(n(36));e.getSessionToken=function(t){return u(this,void 0,void 0,(function(){return a(this,(function(e){return[2,new Promise((function(e,n){var r=t.subscribe(s.Action.RESPOND,(function(t){var o=t.sessionToken;o?e(o):n(c.fromAction("Failed to retrieve a session token",c.Action.FAILED_AUTHENTICATION)),r()}));t.dispatch(s.request())}))]}))}))}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.respond=e.request=e.Action=void 0;var r,o=n(0),i=n(1);!function(t){t.REQUEST="APP::SESSION_TOKEN::REQUEST",t.RESPOND="APP::SESSION_TOKEN::RESPOND"}(r=e.Action||(e.Action={})),e.request=function(){return o.actionWrapper({group:i.Group.SessionToken,type:r.REQUEST})},e.respond=function(t){return o.actionWrapper({payload:t,group:i.Group.SessionToken,type:r.RESPOND})}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.request=e.Action=e.respond=void 0;var r=n(38);Object.defineProperty(e,"Action",{enumerable:!0,get:function(){return r.Action}});var o=n(7),i=n(8),u=n(38);Object.defineProperty(e,"respond",{enumerable:!0,get:function(){return u.respond}}),e.request=function(t){return o.actionWrapper({group:i.Group.AuthCode,type:r.Action.REQUEST,payload:{id:t}})}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.respond=e.Action=void 0;var r,o=n(0),i=n(1);!function(t){t.REQUEST="APP::AUTH_CODE::REQUEST",t.RESPOND="APP::AUTH_CODE::RESPOND"}(r=e.Action||(e.Action={})),e.respond=function(t){return o.actionWrapper({payload:t,group:i.Group.AuthCode,type:r.RESPOND})}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.initialize=e.Action=void 0;var r=n(100);Object.defineProperty(e,"Action",{enumerable:!0,get:function(){return r.Action}});var o=n(8),i=n(7);e.initialize=function(){return i.actionWrapper({group:o.Group.Client,type:r.Action.INITIALIZE})}},function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),o=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),o(n(103),e),o(n(43),e)},function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),o=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),o(n(104),e),o(n(42),e)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Action=void 0,function(t){t.UPDATE="APP::FEATURES::UPDATE",t.REQUEST="APP::FEATURES::REQUEST",t.REQUEST_UPDATE="APP::FEATURES::REQUEST::UPDATE"}(e.Action||(e.Action={}))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Action=void 0;var r=n(41);Object.defineProperty(e,"Action",{enumerable:!0,get:function(){return r.Action}})},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.Fullscreen=e.exit=e.enter=e.Action=void 0;var i,u=n(0),a=n(3),c=n(1);!function(t){t.ENTER="APP::FULLSCREEN::ENTER",t.EXIT="APP::FULLSCREEN::EXIT"}(i=e.Action||(e.Action={})),e.enter=function(){return u.actionWrapper({group:c.Group.Fullscreen,type:i.ENTER})},e.exit=function(){return u.actionWrapper({group:c.Group.Fullscreen,type:i.EXIT})};var s=function(t){function e(e){return t.call(this,e,c.Group.Fullscreen,c.Group.Fullscreen)||this}return o(e,t),Object.defineProperty(e.prototype,"payload",{get:function(){return{id:this.id}},enumerable:!1,configurable:!0}),e.prototype.dispatch=function(t){return this.app.dispatch(u.actionWrapper({group:this.group,type:t,payload:this.payload})),this},e}(a.ActionSet);e.Fullscreen=s},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.LeaveConfirmation=e.confirm=e.disable=e.enable=e.Action=void 0;var u,a=n(0),c=n(3),s=n(1);function p(t){return void 0===t&&(t={}),a.actionWrapper({group:s.Group.LeaveConfirmation,payload:t,type:u.ENABLE})}function l(t){return void 0===t&&(t={}),a.actionWrapper({group:s.Group.LeaveConfirmation,payload:t,type:u.DISABLE})}function f(t){return void 0===t&&(t={}),a.actionWrapper({group:s.Group.LeaveConfirmation,payload:t,type:u.CONFIRM})}!function(t){t.ENABLE="APP::LEAVE_CONFIRMATION::ENABLE",t.DISABLE="APP::LEAVE_CONFIRMATION::DISABLE",t.CONFIRM="APP::LEAVE_CONFIRMATION::CONFIRM"}(u=e.Action||(e.Action={})),e.enable=p,e.disable=l,e.confirm=f;var d=function(t){function e(e,n){void 0===n&&(n={});var r=t.call(this,e,s.Group.LeaveConfirmation,s.Group.LeaveConfirmation)||this;return r.options=n,r.set(n),r}return o(e,t),Object.defineProperty(e.prototype,"payload",{get:function(){return i({id:this.id},this.options)},enumerable:!1,configurable:!0}),e.prototype.set=function(t){return this.options=a.getMergedProps(this.options,t),this},e.prototype.dispatch=function(t){switch(t){case u.ENABLE:var e=p(this.payload);this.app.dispatch(e);break;case u.DISABLE:var n=l(this.payload);this.app.dispatch(n);break;case u.CONFIRM:var r=f(this.payload);this.app.dispatch(r)}return this},e}(c.ActionSet);e.LeaveConfirmation=d},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.Loading=e.stop=e.start=e.Action=void 0;var i,u=n(0),a=n(3),c=n(1);function s(t){return u.actionWrapper({payload:t,group:c.Group.Loading,type:i.START})}function p(t){return u.actionWrapper({payload:t,group:c.Group.Loading,type:i.STOP})}!function(t){t.START="APP::LOADING::START",t.STOP="APP::LOADING::STOP"}(i=e.Action||(e.Action={})),e.start=s,e.stop=p;var l=function(t){function e(e){return t.call(this,e,c.Group.Loading,c.Group.Loading)||this}return o(e,t),Object.defineProperty(e.prototype,"payload",{get:function(){return{id:this.id}},enumerable:!1,configurable:!0}),e.prototype.dispatch=function(t){switch(t){case i.START:this.app.dispatch(s(this.payload));break;case i.STOP:this.app.dispatch(p(this.payload))}return this},e}(a.ActionSet);e.Loading=l},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},u=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function u(t){try{c(r.next(t))}catch(t){i(t)}}function a(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(u,a)}c((r=r.apply(t,e||[])).next())}))},a=this&&this.__generator||function(t,e){var n,r,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;u;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return u.label++,{value:i[1],done:!1};case 5:u.label++,r=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!(o=u.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){u=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){u.label=i[1];break}if(6===i[0]&&u.label<o[1]){u.label=o[1],o=i;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(i);break}o[2]&&u.ops.pop(),u.trys.pop();continue}i=e.call(t,u)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.ModalContent=e.Action=void 0;var c,s=n(0),p=n(3),l=n(1),f=n(19);!function(t){t.LOADING="LOADING",t.LOADED="LOADED"}(c=e.Action||(e.Action={}));var d=function(t){function e(e,n){return t.call(this,e,l.Group.Modal,l.Group.Modal,n?n.id:void 0)||this}return o(e,t),e.prototype.loaded=function(){this.dispatch(c.LOADED)},e.prototype.loading=function(){this.dispatch(c.LOADING)},e.prototype.dispatch=function(t){switch(t){case c.LOADED:this.dispatchModalAction(f.Action.UPDATE_CONTENT,{loading:!1});break;case c.LOADING:this.dispatchModalAction(f.Action.UPDATE_CONTENT,{loading:!0})}return this},e.prototype.dispatchModalAction=function(t,e){return u(this,void 0,void 0,(function(){var n;return a(this,(function(r){return n=s.actionWrapper({type:t,group:l.Group.Modal,payload:i({},e)}),this.app.dispatch(n),[2]}))}))},e}(p.ActionSet);e.ModalContent=d},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.History=e.replace=e.push=e.Action=void 0;var u,a=n(0),c=n(3),s=n(1);function p(t){return a.actionWrapper({payload:t,group:s.Group.Navigation,type:u.PUSH})}function l(t){return a.actionWrapper({payload:t,group:s.Group.Navigation,type:u.REPLACE})}!function(t){t.PUSH="APP::NAVIGATION::HISTORY::PUSH",t.REPLACE="APP::NAVIGATION::HISTORY::REPLACE"}(u=e.Action||(e.Action={})),e.push=p,e.replace=l;var f=function(t){function e(e){return t.call(this,e,"History",s.Group.Navigation)||this}return o(e,t),Object.defineProperty(e.prototype,"payload",{get:function(){return{id:this.id}},enumerable:!1,configurable:!0}),e.prototype.dispatch=function(t,e){var n=i(i({},this.payload),{path:e});switch(t){case u.PUSH:this.app.dispatch(p(n));break;case u.REPLACE:this.app.dispatch(l(n))}return this},e}(c.ActionSet);e.History=f},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.app=e.Action=void 0;var r=n(112);Object.defineProperty(e,"Action",{enumerable:!0,get:function(){return r.Action}}),Object.defineProperty(e,"app",{enumerable:!0,get:function(){return r.app}})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.ResourcePicker=e.WeightUnit=e.update=e.select=e.ResourceType=e.ProductVariantInventoryPolicy=e.ProductVariantInventoryManagement=e.ProductStatus=e.open=e.FulfillmentServiceType=e.CollectionSortOrder=e.close=e.cancel=e.ActionVerb=e.Action=void 0;var r=n(51);Object.defineProperty(e,"ResourcePicker",{enumerable:!0,get:function(){return r.ResourcePicker}});var o=n(51);Object.defineProperty(e,"Action",{enumerable:!0,get:function(){return o.Action}}),Object.defineProperty(e,"ActionVerb",{enumerable:!0,get:function(){return o.ActionVerb}}),Object.defineProperty(e,"cancel",{enumerable:!0,get:function(){return o.cancel}}),Object.defineProperty(e,"close",{enumerable:!0,get:function(){return o.close}}),Object.defineProperty(e,"CollectionSortOrder",{enumerable:!0,get:function(){return o.CollectionSortOrder}}),Object.defineProperty(e,"FulfillmentServiceType",{enumerable:!0,get:function(){return o.FulfillmentServiceType}}),Object.defineProperty(e,"open",{enumerable:!0,get:function(){return o.open}}),Object.defineProperty(e,"ProductStatus",{enumerable:!0,get:function(){return o.ProductStatus}}),Object.defineProperty(e,"ProductVariantInventoryManagement",{enumerable:!0,get:function(){return o.ProductVariantInventoryManagement}}),Object.defineProperty(e,"ProductVariantInventoryPolicy",{enumerable:!0,get:function(){return o.ProductVariantInventoryPolicy}}),Object.defineProperty(e,"ResourceType",{enumerable:!0,get:function(){return o.ResourceType}}),Object.defineProperty(e,"select",{enumerable:!0,get:function(){return o.select}}),Object.defineProperty(e,"update",{enumerable:!0,get:function(){return o.update}}),Object.defineProperty(e,"WeightUnit",{enumerable:!0,get:function(){return o.WeightUnit}});e.create=function(t,e){var n=e.resourceType,o=e.options,i=void 0===o?{}:o;return new r.ResourcePicker(t,i,n)}},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.ResourcePicker=e.update=e.close=e.cancel=e.open=e.select=e.ActionVerb=e.ResourceType=e.ProductStatus=e.ProductVariantInventoryManagement=e.ProductVariantInventoryPolicy=e.WeightUnit=e.FulfillmentServiceType=e.CollectionSortOrder=e.Action=void 0;var u,a,c,s=n(0),p=n(3),l=n(1);function f(t){return s.actionWrapper({payload:t,group:l.Group.ResourcePicker,type:u.SELECT})}function d(t){return s.actionWrapper({payload:t,group:l.Group.ResourcePicker,type:u.OPEN})}function h(t){return s.actionWrapper({payload:t,group:l.Group.ResourcePicker,type:u.CANCEL})}function y(t){return s.actionWrapper({payload:t,group:l.Group.ResourcePicker,type:u.UPDATE})}!function(t){t.OPEN="APP::RESOURCE_PICKER::OPEN",t.SELECT="APP::RESOURCE_PICKER::SELECT",t.CLOSE="APP::RESOURCE_PICKER::CLOSE",t.UPDATE="APP::RESOURCE_PICKER::UPDATE",t.CANCEL="APP::RESOURCE_PICKER::CANCEL"}(u=e.Action||(e.Action={})),function(t){t.Manual="MANUAL",t.BestSelling="BEST_SELLING",t.AlphaAsc="ALPHA_ASC",t.AlphaDesc="ALPHA_DESC",t.PriceDesc="PRICE_DESC",t.PriceAsc="PRICE_ASC",t.CreatedDesc="CREATED_DESC",t.Created="CREATED"}(e.CollectionSortOrder||(e.CollectionSortOrder={})),function(t){t.GiftCard="GIFT_CARD",t.Manual="MANUAL",t.ThirdParty="THIRD_PARTY"}(e.FulfillmentServiceType||(e.FulfillmentServiceType={})),function(t){t.Kilograms="KILOGRAMS",t.Grams="GRAMS",t.Pounds="POUNDS",t.Ounces="OUNCES"}(e.WeightUnit||(e.WeightUnit={})),function(t){t.Deny="DENY",t.Continue="CONTINUE"}(e.ProductVariantInventoryPolicy||(e.ProductVariantInventoryPolicy={})),function(t){t.Shopify="SHOPIFY",t.NotManaged="NOT_MANAGED",t.FulfillmentService="FULFILLMENT_SERVICE"}(e.ProductVariantInventoryManagement||(e.ProductVariantInventoryManagement={})),function(t){t.Active="ACTIVE",t.Archived="ARCHIVED",t.Draft="DRAFT"}(e.ProductStatus||(e.ProductStatus={})),function(t){t.Product="product",t.ProductVariant="variant",t.Collection="collection"}(a=e.ResourceType||(e.ResourceType={})),function(t){t.Add="add",t.Select="select"}(c=e.ActionVerb||(e.ActionVerb={})),e.select=f,e.open=d,e.cancel=h,e.close=function(t){return s.actionWrapper({payload:t,group:l.Group.ResourcePicker,type:u.CANCEL})},e.update=y;var b=function(t){function e(e,n,r){var o=t.call(this,e,l.Group.ResourcePicker,l.Group.ResourcePicker)||this;return o.initialSelectionIds=[],o.selection=[],o.resourceType=r,o.set(n,!1),o}return o(e,t),Object.defineProperty(e.prototype,"payload",{get:function(){return i(i({},this.options),{id:this.id,resourceType:this.resourceType})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"options",{get:function(){var t={initialQuery:this.initialQuery,selectMultiple:this.selectMultiple,initialSelectionIds:this.initialSelectionIds,showHidden:this.showHidden,actionVerb:this.actionVerb};return this.resourceType===a.Product?i(i({},t),{showVariants:this.showVariants,showDraft:this.showDraft,showArchived:this.showArchived,showDraftBadge:this.showDraftBadge,showArchivedBadge:this.showArchivedBadge}):t},enumerable:!1,configurable:!0}),e.prototype.set=function(t,e){void 0===e&&(e=!0);var n=s.getMergedProps(this.options,t),r=n.initialQuery,o=n.initialSelectionIds,i=void 0===o?[]:o,u=n.showHidden,a=void 0===u||u,p=n.showVariants,l=void 0===p||p,f=n.showDraft,d=void 0===f||f,h=n.showArchived,y=void 0===h||h,b=n.showDraftBadge,v=void 0!==b&&b,P=n.showArchivedBadge,A=void 0!==P&&P,O=n.selectMultiple,_=void 0===O||O,g=n.actionVerb,m=void 0===g?c.Add:g;return this.initialQuery=r,this.initialSelectionIds=i,this.showHidden=a,this.showVariants=l,this.showDraft=d,this.showArchived=y,this.showDraftBadge=v,this.showArchivedBadge=A,this.selectMultiple=_,this.actionVerb=m,e&&this.update(),this},e.prototype.dispatch=function(t,e){return t===u.OPEN?this.open():t===u.UPDATE?this.update():t===u.CLOSE||t===u.CANCEL?this.cancel():t===u.SELECT&&(this.selection=e,this.app.dispatch(f({id:this.id,selection:this.selection}))),this},e.prototype.update=function(){this.app.dispatch(y(this.payload))},e.prototype.open=function(){this.app.dispatch(d(this.payload))},e.prototype.cancel=function(){this.app.dispatch(h({id:this.id}))},e.prototype.close=function(){this.cancel()},e}(p.ActionSet);e.ResourcePicker=b},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.TitleBar=e.update=e.clickBreadcrumb=e.clickActionButton=e.Action=void 0;var r=n(53);Object.defineProperty(e,"TitleBar",{enumerable:!0,get:function(){return r.TitleBar}});var o=n(53);Object.defineProperty(e,"Action",{enumerable:!0,get:function(){return o.Action}}),Object.defineProperty(e,"clickActionButton",{enumerable:!0,get:function(){return o.clickActionButton}}),Object.defineProperty(e,"clickBreadcrumb",{enumerable:!0,get:function(){return o.clickBreadcrumb}}),Object.defineProperty(e,"update",{enumerable:!0,get:function(){return o.update}}),e.create=function(t,e){return new r.TitleBar(t,e)}},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.TitleBar=e.update=e.clickBreadcrumb=e.clickActionButton=e.Action=void 0;var u,a=n(3),c=n(9),s=n(15),p=n(116),l=n(12),f=n(0),d=n(1);!function(t){t.UPDATE="APP::TITLEBAR::UPDATE",t.BUTTON_CLICK="APP::TITLEBAR::BUTTONS::BUTTON::CLICK",t.BUTTON_UPDATE="APP::TITLEBAR::BUTTONS::BUTTON::UPDATE",t.BUTTON_GROUP_UPDATE="APP::TITLEBAR::BUTTONS::BUTTONGROUP::UPDATE",t.BREADCRUMBS_CLICK="APP::TITLEBAR::BREADCRUMBS::BUTTON::CLICK",t.BREADCRUMBS_UPDATE="APP::TITLEBAR::BREADCRUMBS::BUTTON::UPDATE"}(u=e.Action||(e.Action={}));var h={group:d.Group.TitleBar,subgroups:["Buttons"]},y={group:d.Group.TitleBar,subgroups:["Breadcrumbs"],type:d.ComponentType.Button};function b(t){return f.actionWrapper({payload:t,group:d.Group.TitleBar,type:u.UPDATE})}e.clickActionButton=function(t,e){var n=d.ComponentType.Button,r=i({id:t,type:n},h);return c.clickButton(d.Group.TitleBar,r,e)},e.clickBreadcrumb=function(t,e){var n=i({id:t},y);return c.clickButton(d.Group.TitleBar,n,e)},e.update=b;var v=function(t){function e(e,n){var r=t.call(this,e,d.Group.TitleBar,d.Group.TitleBar)||this;return n.title||n.breadcrumbs||n.buttons?(r.set(n),r):r}return o(e,t),Object.defineProperty(e.prototype,"buttons",{get:function(){if(this.primary||this.secondary)return{primary:this.primary,secondary:this.secondary}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"buttonsOptions",{get:function(){if(this.primaryOptions||this.secondaryOptions)return{primary:this.primaryOptions,secondary:this.secondaryOptions}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"options",{get:function(){return{breadcrumbs:this.breadcrumbsOption,buttons:this.buttonsOptions,title:this.title}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"payload",{get:function(){return i(i({},this.options),{breadcrumbs:this.breadcrumb,buttons:this.buttons,id:this.id})},enumerable:!1,configurable:!0}),e.prototype.set=function(t,e){void 0===e&&(e=!0);var n=f.getMergedProps(this.options,t),r=n.title,o=n.buttons,i=n.breadcrumbs;return this.title=r,this.setBreadcrumbs(i),this.setPrimaryButton(o?o.primary:void 0),this.setSecondaryButton(o?o.secondary:void 0),e&&this.dispatch(u.UPDATE),this},e.prototype.dispatch=function(t){switch(t){case u.UPDATE:this.app.dispatch(b(this.payload))}return this},e.prototype.getButton=function(t,e,n){return t instanceof s.ButtonGroup?p.getGroupedButton(this,t,e,n):l.getSingleButton(this,t,e,n)},e.prototype.updatePrimaryButton=function(t){this.primary&&f.updateActionFromPayload(this.primary,t)&&this.dispatch(u.UPDATE)},e.prototype.updateSecondaryButtons=function(t){if(this.secondary){var e=this.secondary.find((function(e){return e.id===t.id}));if(e){(s.isGroupedButtonPayload(t),f.updateActionFromPayload(e,t))&&this.dispatch(u.UPDATE)}}},e.prototype.updateBreadcrumbButton=function(t){this.breadcrumb&&f.updateActionFromPayload(this.breadcrumb,t)&&this.dispatch(u.UPDATE)},e.prototype.setPrimaryButton=function(t){this.primaryOptions=this.getChildButton(t,this.primaryOptions),this.primary=this.primaryOptions?this.getButton(this.primaryOptions,h.subgroups,this.updatePrimaryButton):void 0},e.prototype.setSecondaryButton=function(t){var e=this,n=t||[],r=this.secondaryOptions||[];this.secondaryOptions=this.getUpdatedChildActions(n,r),this.secondary=this.secondaryOptions?this.secondaryOptions.map((function(t){return e.getButton(t,h.subgroups,e.updateSecondaryButtons)})):void 0},e.prototype.setBreadcrumbs=function(t){this.breadcrumbsOption=this.getChildButton(t,this.breadcrumbsOption),this.breadcrumb=this.breadcrumbsOption?this.getButton(this.breadcrumbsOption,y.subgroups,this.updateBreadcrumbButton):void 0},e.prototype.getChildButton=function(t,e){var n=t?[t]:[],r=e?[e]:[],o=this.getUpdatedChildActions(n,r);return o?o[0]:void 0},e}(a.ActionSetWithChildren);e.TitleBar=v},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.Toast=e.primaryAction=e.clear=e.show=e.Action=void 0;var r=n(25);Object.defineProperty(e,"Toast",{enumerable:!0,get:function(){return r.Toast}});var o=n(25);Object.defineProperty(e,"Action",{enumerable:!0,get:function(){return o.Action}}),Object.defineProperty(e,"show",{enumerable:!0,get:function(){return o.show}}),Object.defineProperty(e,"clear",{enumerable:!0,get:function(){return o.clear}}),Object.defineProperty(e,"primaryAction",{enumerable:!0,get:function(){return o.primaryAction}}),e.create=function(t,e){return new r.Toast(t,e)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.ContextualSaveBar=e.update=e.discard=e.save=e.hide=e.show=e.Action=void 0;var r=n(117);Object.defineProperty(e,"Action",{enumerable:!0,get:function(){return r.Action}}),Object.defineProperty(e,"show",{enumerable:!0,get:function(){return r.show}}),Object.defineProperty(e,"hide",{enumerable:!0,get:function(){return r.hide}}),Object.defineProperty(e,"save",{enumerable:!0,get:function(){return r.save}}),Object.defineProperty(e,"discard",{enumerable:!0,get:function(){return r.discard}}),Object.defineProperty(e,"update",{enumerable:!0,get:function(){return r.update}}),Object.defineProperty(e,"ContextualSaveBar",{enumerable:!0,get:function(){return r.ContextualSaveBar}}),e.create=function(t,e){return new r.ContextualSaveBar(t,e)}},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.close=e.show=e.Share=e.Action=void 0;var u,a=n(1),c=n(0),s=n(3);!function(t){t.SHOW="APP::SHARE::SHOW",t.CLOSE="APP::SHARE::CLOSE"}(u=e.Action||(e.Action={}));var p=function(t){function e(e){return t.call(this,e,a.Group.Share,a.Group.Share)||this}return o(e,t),e.prototype.dispatch=function(t,e){switch(t){case u.SHOW:this.dispatchShareAction(u.SHOW,e);break;case u.CLOSE:this.dispatchShareAction(u.CLOSE,e);break;default:throw new Error("Action: "+t+" not supported")}return this},e.prototype.dispatchShareAction=function(t,e){this.app.dispatch(c.actionWrapper({type:t,group:a.Group.Share,payload:i({id:this.id},e)}))},e}(s.ActionSet);e.Share=p,e.show=function(){return c.actionWrapper({group:a.Group.Share,type:u.SHOW})},e.close=function(t){return c.actionWrapper({group:a.Group.Share,type:u.CLOSE,payload:t})}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.NavigationMenu=e.update=e.Action=void 0;var r=n(58);Object.defineProperty(e,"NavigationMenu",{enumerable:!0,get:function(){return r.NavigationMenu}});var o=n(58);Object.defineProperty(e,"Action",{enumerable:!0,get:function(){return o.Action}}),Object.defineProperty(e,"update",{enumerable:!0,get:function(){return o.update}}),e.create=function(t,e){return new r.NavigationMenu(t,e)}},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.NavigationMenu=e.update=e.Action=void 0;var u,a=n(17),c=n(0),s=n(3),p=n(1),l=["Navigation_Menu"];function f(t){return c.actionWrapper({payload:t,group:p.Group.Menu,type:u.UPDATE})}!function(t){t.UPDATE="APP::MENU::NAVIGATION_MENU::UPDATE",t.LINK_UPDATE="APP::MENU::NAVIGATION_MENU::LINK::UPDATE"}(u=e.Action||(e.Action={})),e.update=f;var d=function(t){function e(e,n){var r=t.call(this,e,"Navigation_Menu",p.Group.Menu)||this;return r.items=[],r.set(n),r}return o(e,t),Object.defineProperty(e.prototype,"options",{get:function(){return{items:this.itemsOptions,active:this.activeOptions}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"payload",{get:function(){return i(i({},this.options),{active:this.active,items:this.items,id:this.id})},enumerable:!1,configurable:!0}),e.prototype.set=function(t,e){void 0===e&&(e=!0);var n=c.getMergedProps(this.options,t),r=n.items,o=n.active;return this.setItems(r),this.activeOptions=o,this.active=o&&o.id,e&&this.dispatch(u.UPDATE),this},e.prototype.dispatch=function(t){switch(t){case u.UPDATE:this.app.dispatch(f(this.payload))}return this},e.prototype.updateItem=function(t){if(this.items){var e=this.items.find((function(e){return e.id===t.id}));e&&c.updateActionFromPayload(e,t)&&this.dispatch(u.UPDATE)}},e.prototype.setItems=function(t){var e=this,n=t||[],r=this.itemsOptions||[];this.itemsOptions=this.getUpdatedChildActions(n,r),this.items=this.itemsOptions?this.itemsOptions.map((function(t){return e.addChild(t,e.group,l),e.subscribeToChild(t,a.Action.UPDATE,e.updateItem),t.payload})):[]},e}(s.ActionSetWithChildren);e.NavigationMenu=d},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.ChannelMenu=e.update=e.Action=void 0;var u,a=n(17),c=n(0),s=n(3),p=n(1),l=["Channel_Menu"];function f(t){return c.actionWrapper({payload:t,group:p.Group.Menu,type:u.UPDATE})}!function(t){t.UPDATE="APP::MENU::CHANNEL_MENU::UPDATE",t.LINK_UPDATE="APP::MENU::CHANNEL_MENU::LINK::UPDATE"}(u=e.Action||(e.Action={})),e.update=f;var d=function(t){function e(e,n){var r=t.call(this,e,"Channel_Menu",p.Group.Menu)||this;return r.items=[],r.set(n),r}return o(e,t),Object.defineProperty(e.prototype,"options",{get:function(){return{items:this.itemsOptions,active:this.activeOptions}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"payload",{get:function(){return i(i({},this.options),{active:this.active,items:this.items,id:this.id})},enumerable:!1,configurable:!0}),e.prototype.set=function(t,e){void 0===e&&(e=!0);var n=c.getMergedProps(this.options,t),r=n.items,o=n.active;return this.setItems(r),this.activeOptions=o,this.active=o&&o.id,e&&this.dispatch(u.UPDATE),this},e.prototype.dispatch=function(t){switch(t){case u.UPDATE:this.app.dispatch(f(this.payload))}return this},e.prototype.updateItem=function(t){if(this.items){var e=this.items.find((function(e){return e.id===t.id}));e&&c.updateActionFromPayload(e,t)&&this.dispatch(u.UPDATE)}},e.prototype.setItems=function(t){var e=this,n=t||[],r=this.itemsOptions||[];this.itemsOptions=this.getUpdatedChildActions(n,r),this.items=this.itemsOptions?this.itemsOptions.map((function(t){return e.addChild(t,e.group,l),e.subscribeToChild(t,a.Action.UPDATE,e.updateItem),t.payload})):[]},e}(s.ActionSetWithChildren);e.ChannelMenu=d},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.AppLink=e.update=e.Action=void 0;var r=n(17);Object.defineProperty(e,"AppLink",{enumerable:!0,get:function(){return r.AppLink}});var o=n(17);Object.defineProperty(e,"Action",{enumerable:!0,get:function(){return o.Action}}),Object.defineProperty(e,"update",{enumerable:!0,get:function(){return o.update}}),e.create=function(t,e){return new r.AppLink(t,e)}},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.Pos=e.close=e.Action=void 0;var i,u=n(0),a=n(3),c=n(1);function s(){return u.actionWrapper({group:c.Group.Pos,type:i.CLOSE})}!function(t){t.CLOSE="APP::POS::CLOSE",t.LOCATION_UPDATE="APP::POS::LOCATION::UPDATE",t.USER_UPDATE="APP::POS::USER::UPDATE",t.DEVICE_UPDATE="APP::POS::DEVICE::UPDATE"}(i=e.Action||(e.Action={})),e.close=s;var p=function(t){function e(e){return t.call(this,e,c.Group.Pos,c.Group.Pos)||this}return o(e,t),e.prototype.dispatch=function(t){switch(t){case i.CLOSE:this.app.dispatch(s())}return this},e}(a.ActionSet);e.Pos=p},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.unstable_Picker=e.update=e.select=e.search=e.open=e.loadMore=e.cancel=e.ALL_RESOURCE_VERTICAL_ALIGNMENT=e.ALL_MEDIA_KINDS=e.ALL_BADGE_STATUSES=e.ALL_BADGE_PROGRESSES=e.Action=void 0;var r=n(63);Object.defineProperty(e,"unstable_Picker",{enumerable:!0,get:function(){return r.unstable_Picker}});var o=n(63);Object.defineProperty(e,"Action",{enumerable:!0,get:function(){return o.Action}}),Object.defineProperty(e,"ALL_BADGE_PROGRESSES",{enumerable:!0,get:function(){return o.ALL_BADGE_PROGRESSES}}),Object.defineProperty(e,"ALL_BADGE_STATUSES",{enumerable:!0,get:function(){return o.ALL_BADGE_STATUSES}}),Object.defineProperty(e,"ALL_MEDIA_KINDS",{enumerable:!0,get:function(){return o.ALL_MEDIA_KINDS}}),Object.defineProperty(e,"ALL_RESOURCE_VERTICAL_ALIGNMENT",{enumerable:!0,get:function(){return o.ALL_RESOURCE_VERTICAL_ALIGNMENT}}),Object.defineProperty(e,"cancel",{enumerable:!0,get:function(){return o.cancel}}),Object.defineProperty(e,"loadMore",{enumerable:!0,get:function(){return o.loadMore}}),Object.defineProperty(e,"open",{enumerable:!0,get:function(){return o.open}}),Object.defineProperty(e,"search",{enumerable:!0,get:function(){return o.search}}),Object.defineProperty(e,"select",{enumerable:!0,get:function(){return o.select}}),Object.defineProperty(e,"update",{enumerable:!0,get:function(){return o.update}});e.create=function(t,e){return new r.unstable_Picker(t,e)}},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.unstable_Picker=e.loadMore=e.search=e.update=e.cancel=e.open=e.select=e.ALL_RESOURCE_VERTICAL_ALIGNMENT=e.ALL_MEDIA_KINDS=e.ALL_BADGE_STATUSES=e.ALL_BADGE_PROGRESSES=e.Action=void 0;var u,a=n(0),c=n(3),s=n(1);function p(t){return a.actionWrapper({payload:t,group:s.Group.unstable_Picker,type:u.SELECT})}function l(t){return a.actionWrapper({payload:t,group:s.Group.unstable_Picker,type:u.OPEN})}function f(t){return a.actionWrapper({payload:t,group:s.Group.unstable_Picker,type:u.CANCEL})}function d(t){return a.actionWrapper({payload:t,group:s.Group.unstable_Picker,type:u.UPDATE})}function h(t){return a.actionWrapper({payload:t,group:s.Group.unstable_Picker,type:u.SEARCH})}function y(t){return a.actionWrapper({payload:t,group:s.Group.unstable_Picker,type:u.LOAD_MORE})}!function(t){t.OPEN="APP::PICKER::OPEN",t.SELECT="APP::PICKER::SELECT",t.UPDATE="APP::PICKER::UPDATE",t.CANCEL="APP::PICKER::CANCEL",t.SEARCH="APP::PICKER::SEARCH",t.LOAD_MORE="APP::PICKER::LOAD_MORE"}(u=e.Action||(e.Action={})),e.ALL_BADGE_PROGRESSES=["incomplete","partiallyComplete","complete"],e.ALL_BADGE_STATUSES=["success","info","attention","critical","warning","new"],e.ALL_MEDIA_KINDS=["Avatar","Thumbnail"],e.ALL_RESOURCE_VERTICAL_ALIGNMENT=["leading","trailing","center"],e.select=p,e.open=l,e.cancel=f,e.update=d,e.search=h,e.loadMore=y;var b=function(t){function e(e,n){var r=t.call(this,e,s.Group.unstable_Picker,s.Group.unstable_Picker)||this;return r.items=[],r.selectedItems=[],r.set(n,!1),r}return o(e,t),Object.defineProperty(e.prototype,"payload",{get:function(){return i(i({},this.options),{id:this.id})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"options",{get:function(){return{items:this.items,maxSelectable:this.maxSelectable,selectedItems:this.selectedItems,title:this.title,loading:this.loading,searchQuery:this.searchQuery,searchQueryPlaceholder:this.searchQueryPlaceholder,primaryActionLabel:this.primaryActionLabel,secondaryActionLabel:this.secondaryActionLabel,emptySearchLabel:this.emptySearchLabel,canLoadMore:this.canLoadMore,loadingMore:this.loadingMore,verticalAlignment:this.verticalAlignment}},enumerable:!1,configurable:!0}),e.prototype.set=function(t,e){void 0===e&&(e=!0);var n=a.getMergedProps(this.options,t),r=n.selectedItems,o=void 0===r?[]:r,i=n.maxSelectable,u=void 0===i?0:i,c=n.items,s=void 0===c?[]:c,p=n.loading,l=void 0!==p&&p,f=n.title,d=n.searchQuery,h=n.searchQueryPlaceholder,y=n.primaryActionLabel,b=n.secondaryActionLabel,v=n.emptySearchLabel,P=n.canLoadMore,A=void 0!==P&&P,O=n.loadingMore,_=void 0!==O&&O,g=n.verticalAlignment;return this.title=f,this.items=s,this.selectedItems=o,this.maxSelectable=u,this.loading=l,this.searchQuery=d,this.searchQueryPlaceholder=h,this.primaryActionLabel=y,this.secondaryActionLabel=b,this.emptySearchLabel=v,this.canLoadMore=A,this.loadingMore=_,this.verticalAlignment=g,e&&this.update(),this},e.prototype.dispatch=function(t,e){return t===u.OPEN?this.open():t===u.UPDATE?this.update():t===u.CANCEL?this.cancel():t===u.SELECT?(this.selectedItems=(null==e?void 0:e.selectedItems)||[],this.app.dispatch(p({id:this.id,selectedItems:this.selectedItems}))):t===u.SEARCH?(this.searchQuery=(null==e?void 0:e.searchQuery)||"",this.app.dispatch(h({id:this.id,searchQuery:this.searchQuery}))):t===u.LOAD_MORE&&this.loadMore(),this},e.prototype.update=function(){this.app.dispatch(d(this.payload))},e.prototype.open=function(){this.app.dispatch(l(this.payload))},e.prototype.cancel=function(){this.app.dispatch(f({id:this.id}))},e.prototype.loadMore=function(){this.app.dispatch(y(this.payload))},e}(c.ActionSet);e.unstable_Picker=b},function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),o=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),o(n(127),e)},function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),o=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&r(e,t,n);return o(e,t),e},u=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function u(t){try{c(r.next(t))}catch(t){i(t)}}function a(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(u,a)}c((r=r.apply(t,e||[])).next())}))},a=this&&this.__generator||function(t,e){var n,r,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;u;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return u.label++,{value:i[1],done:!1};case 5:u.label++,r=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!(o=u.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){u=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){u.label=i[1];break}if(6===i[0]&&u.label<o[1]){u.label=o[1],o=i;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(i);break}o[2]&&u.ops.pop(),u.trys.pop();continue}i=e.call(t,u)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}},c=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.getAuthorizationCodePayload=void 0;var s=i(n(37)),p=n(16),l=c(n(132));e.getAuthorizationCodePayload=function(t){return u(this,void 0,void 0,(function(){return a(this,(function(e){return[2,new Promise((function(e,n){var r=l.default(),o=t.subscribe(s.Action.RESPOND,(function(t){switch(null==t?void 0:t.status){case"needsExchange":e(t);break;default:n(p.fromAction("Failed to retrieve an authorization code",p.Action.FAILED_AUTHENTICATION))}o()}),r);t.dispatch(s.request(r))}))]}))}))}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.useFeaturesAvailable=void 0;var r=n(136);Object.defineProperty(e,"useFeaturesAvailable",{enumerable:!0,get:function(){return r.useFeaturesAvailable}})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.useNavigationHistory=void 0;var r=n(143);Object.defineProperty(e,"useNavigationHistory",{enumerable:!0,get:function(){return r.useNavigationHistory}})},function(t,e,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},o=this&&this.__rest||function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};Object.defineProperty(e,"__esModule",{value:!0});var i=n(2),u=n(18),a=n(69),c=n(4);function s(t,e,n){var o=e.title,i=e.size,c=e.message,s=e.src,p=e.primaryAction,l=e.secondaryActions,f=e.loading,d=null==i?void 0:u.Size[i],h={};return null!=s&&(s.match("^https?://")?h.url=s:h.path=s),r(r({title:o,message:c,size:d},h),{footer:{buttons:a.transformActions(t,{primaryAction:p,secondaryActions:l})},loading:n?void 0:f})}e.default=function(t){var e=c.useAppBridge(),n=i.useRef(null),r=i.useRef({open:!1}),a=t.open,p=i.useRef(!1),l=i.useMemo((function(){t.primaryAction,t.secondaryActions;var n=o(t,["primaryAction","secondaryActions"]);return u.create(e,s(e,n))}),[e]);return i.useEffect((function(){if(!p.current){var o,i=r.current.open,c=i!==a;if(a){var f=s(e,t,i),d=!c;"string"==typeof(o=f).url||o.path,l.set(f,d)}return c&&(a?(l.dispatch(u.Action.OPEN),n.current=document.activeElement):(l.dispatch(u.Action.CLOSE),null!=n.current&&document.contains(n.current)&&(n.current.focus(),n.current=null))),null!=t.onClose&&l.subscribe(u.Action.CLOSE,t.onClose),r.current=t,function(){l.unsubscribe()}}r.current=t}),[t,a]),i.useEffect((function(){return function(){r.current.open&&l.dispatch(u.Action.CLOSE)}}),[l]),null}},function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),o=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&r(e,t,n);return o(e,t),e},u=this&&this.__spreadArray||function(t,e){for(var n=0,r=e.length,o=t.length;n<r;n++,o++)t[o]=e[n];return t};Object.defineProperty(e,"__esModule",{value:!0}),e.transformActions=e.generateRedirect=void 0;var a=i(n(14)),c=i(n(24)),s=i(n(26));function p(t,e,n,r){if(void 0===n&&(n="APP"),null!=e){var o=s.create(t),i=!0===r?{url:e,newContext:!0}:e;return function(){o.dispatch(function(t,e){if(!0===e)return s.Action.REMOTE;return s.Action[t]}(n,r),i)}}}function l(t,e){var n=!0===e.destructive?a.Style.Danger:void 0,r=a.create(t,{label:e.content||"",disabled:e.disabled,loading:e.loading,plain:e.plain,style:n});e.onAction&&r.subscribe(a.Action.CLICK,e.onAction);var o=p(t,e.url,e.target,e.external);return null!=o&&r.subscribe(a.Action.CLICK,o),r}e.generateRedirect=p,e.transformActions=function(t,e){var n=e.primaryAction,r=e.secondaryActions,o=e.actionGroups;return{primary:function(t,e){if(null==e)return;return l(t,e)}(t,n),secondary:u(u([],function(t,e){void 0===e&&(e=[]);return u([],e.map((function(e){return l(t,e)})))}(t,r)),function(t,e){void 0===e&&(e=[]);return u([],e.map((function(e){var n=e.actions.map((function(e){return l(t,e)}));return c.create(t,{label:e.title,plain:e.plain,buttons:n})})))}(t,o))}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(2),o=n(60),i=n(57),u=n(4);function a(t,e){return t.destination.replace(/\/$/,"")===e.pathname.replace(/\/$/,"")}e.default=function(t){var e=t.navigationLinks,n=t.matcher,c=void 0===n?a:n,s=u.useAppBridge(),p=r.useState(),l=p[0],f=p[1];r.useEffect((function(){var t=e.map((function(t){return o.create(s,t)}));f(t)}),[s,JSON.stringify(e)]);var d=r.useMemo((function(){var t=(l||[]).findIndex((function(t){return c(t,location)}));if(t>=0)return null==l?void 0:l[t]}),[s,location.pathname,c,l,location.pathname]);return r.useEffect((function(){l&&i.create(s,{items:l,active:d})}),[l,d]),null}},function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),o=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&r(e,t,n);return o(e,t),e};Object.defineProperty(e,"__esModule",{value:!0}),e.setClientInterfaceHook=void 0;var u=i(n(2)),a=i(n(153)),c=n(5),s=n(76),p=n(77),l=n(164);function f(t){var e=t.history,n=t.location;return s.useClientRouting(e),p.useRoutePropagation(n),null}e.setClientInterfaceHook=function(t){return function(e){return e.clientInterface={name:"@shopify/app-bridge-react",version:l.version},t(e)}},e.default=function(t){var n=t.config,r=t.router,o=t.children,i=u.useMemo((function(){return a.default(n)}),[]);u.useEffect((function(){(null==i?void 0:i.hooks)&&i.hooks.set(a.LifecycleHook.DispatchAction,e.setClientInterfaceHook)}),[i]);var s=(null==r?void 0:r.history)&&(null==r?void 0:r.location)?u.default.createElement(f,{history:r.history,location:r.location}):null;return u.default.createElement(c.AppBridgeContext.Provider,{value:i},s,o)}},function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),o=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0});var i=n(73);o(n(75),e),o(n(73),e),e.default=i.createClientApp},function(t,e,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},o=this&&this.__spreadArray||function(t,e){for(var n=0,r=e.length,o=t.length;n<r;n++,o++)t[o]=e[n];return t},i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.createApp=e.createAppWrapper=e.createClientApp=e.WINDOW_UNDEFINED_MESSAGE=void 0;var u=n(7),a=n(49),c=n(16),s=n(13),p=n(155),l=n(23),f=n(39),d=n(64),h=n(156),y=n(74),b=n(75),v=i(n(157));e.WINDOW_UNDEFINED_MESSAGE="window is not defined. Running an app outside a browser is not supported";var P=function(t){return function(e){return t(r(r({},e),{version:u.getVersion(),clientInterface:{name:u.getPackageName(),version:u.getVersion()}}))}},A=function(t){t.set(b.LifecycleHook.DispatchAction,P)};function O(t,n,r){if(void 0===r&&(r=[]),!t)throw c.fromAction(e.WINDOW_UNDEFINED_MESSAGE,c.AppActionType.WINDOW_UNDEFINED);var i=y.getLocation(),u=n||i&&i.origin;if(!u)throw c.fromAction("local origin cannot be blank",c.AppActionType.MISSING_LOCAL_ORIGIN);var a=s.fromWindow(t,u);return e.createClientApp(a,o([A],r))}function _(t){var e=y.getWindow();return e&&e.top?O(e.top)(t):p.serverAppBridge}e.createClientApp=function(t,e){void 0===e&&(e=[]);var n=[],i=s.createTransportListener();return t.subscribe((function(t){var e=t.data,r=e.type,o=e.payload;switch(r){case"getState":n.splice(0).forEach((function(t){return t(o)}));break;case"dispatch":if(i.handleMessage(o),i.handleActionDispatch(o))return;var a=u.findMatchInEnum(c.Action,o.type);a&&c.throwError(a,o)}})),function(s){var P=function(t){var e;if(!t.host)throw c.fromAction("host must be provided",c.AppActionType.INVALID_CONFIG);if(!t.apiKey)throw c.fromAction("apiKey must be provided",c.AppActionType.INVALID_CONFIG);try{var n=atob(null===(e=t.host)||void 0===e?void 0:e.replace(/_/g,"/").replace(/-/g,"+"));return r(r({},t),{host:n})}catch(t){throw c.fromAction("not a valid host, please use the value provided by Shopify",c.AppActionType.INVALID_CONFIG)}}(s);if(function(t,e){var n=e.apiKey,r=e.host,o=e.forceRedirect,i=void 0===o?!l.isDevelopmentClient:o,u=y.getLocation();if(l.isUnframed||!u||!n||!r||!i||!y.shouldRedirect(t))return!1;var a="https://"+r+"/apps/"+n+u.pathname+(u.search||"");return y.redirect(a),!0}(t.hostFrame,P))return p.mockAppBridge;var A=function(t,e){return function(n,r){t.dispatch({payload:r,source:e,type:n})}}(t,P),O=i.createSubscribeHandler(A);function _(t){return A(b.MessageType.Dispatch,t),t}A(b.MessageType.Unsubscribe);for(var g=new URL("https://"+P.host).origin,m=new v.default,E={hostOrigin:g,localOrigin:t.localOrigin,hooks:m,dispatch:function(t){return E.hooks?E.hooks.run(b.LifecycleHook.DispatchAction,_,E,t):_(t)},featuresAvailable:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t[0],r=Array.isArray(n)?o([],n):t;return E.getState("features").then((function(t){return r.length?r.reduce((function(e,n){return Object.keys(t).includes(n)&&(e[n]=t[n]),e}),{}):t}))},getState:function(t){return t&&"string"!=typeof t?Promise.resolve(void 0):new Promise((function(t){n.push(t),A(b.MessageType.GetState)})).then((function(e){var n=e;if(t)for(var r=0,o=t.split(".");r<o.length;r++){var i=o[r];if(null==n||"object"!=typeof n||Array.isArray(n)||!Object.keys(n).includes(i))return;n=n[i]}return n}))},subscribe:O,error:function(t,e){var n=[];return u.forEachInEnum(c.Action,(function(r){n.push(O(r,t,e))})),function(){n.forEach((function(t){return t()}))}}},T=0,S=e;T<S.length;T++){(0,S[T])(m,E)}return function(t){t.subscribe(a.Action.APP,h.handleAppPrint),t.dispatch(f.initialize());try{d.initializeWebVitals(t)}catch(t){}}(E),E}},e.createAppWrapper=O,e.createApp=_,e.default=_},function(t,e,n){"use strict";function r(){return o()?window.location:void 0}function o(){return"undefined"!=typeof window}Object.defineProperty(e,"__esModule",{value:!0}),e.getWindow=e.getLocation=e.redirect=e.shouldRedirect=void 0,e.shouldRedirect=function(t){return t===window},e.redirect=function(t){var e=r();e&&e.assign(t)},e.getLocation=r,e.getWindow=function(){return o()?window:void 0}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isV1Config=e.MessageType=e.LifecycleHook=e.PermissionType=void 0;var r=n(10);Object.defineProperty(e,"MessageType",{enumerable:!0,get:function(){return r.MessageType}});var o=n(10);Object.defineProperty(e,"PermissionType",{enumerable:!0,get:function(){return o.PermissionType}}),Object.defineProperty(e,"LifecycleHook",{enumerable:!0,get:function(){return o.LifecycleHook}}),e.isV1Config=function(t){return!t.host}},function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.History=e.useClientRouting=e.ClientRouter=void 0;var o=n(159);Object.defineProperty(e,"ClientRouter",{enumerable:!0,get:function(){return r(o).default}});var i=n(160);Object.defineProperty(e,"useClientRouting",{enumerable:!0,get:function(){return r(i).default}});var u=n(28);Object.defineProperty(e,"History",{enumerable:!0,get:function(){return u.History}})},function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.LocationOrHref=e.useRoutePropagation=e.RoutePropagator=void 0;var o=n(161);Object.defineProperty(e,"RoutePropagator",{enumerable:!0,get:function(){return r(o).default}});var i=n(163);Object.defineProperty(e,"useRoutePropagation",{enumerable:!0,get:function(){return r(i).default}});var u=n(29);Object.defineProperty(e,"LocationOrHref",{enumerable:!0,get:function(){return u.LocationOrHref}})},function(t,e,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},o=this&&this.__rest||function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};Object.defineProperty(e,"__esModule",{value:!0}),e.ResourceType=e.ActionVerb=void 0;var i=n(2),u=n(50);Object.defineProperty(e,"ActionVerb",{enumerable:!0,get:function(){return u.ActionVerb}}),Object.defineProperty(e,"ResourceType",{enumerable:!0,get:function(){return u.ResourceType}});var a=n(4);e.default=function(t){var e=t.open,n=t.resourceType,c=t.onSelection,s=t.onCancel,p=t.allowMultiple,l=t.selectMultiple,f=o(t,["open","resourceType","onSelection","onCancel","allowMultiple","selectMultiple"]),d=i.useMemo((function(){return r(r({},f),{selectMultiple:null!=l?l:p})}),[p,f,l]),h=a.useAppBridge(),y=i.useRef(!1);i.useEffect((function(){return function(){y.current=!0}}),[]);var b=i.useRef(!1),v=i.useRef(d),P=i.useMemo((function(){return u.create(h,{resourceType:u.ResourceType[n],options:v.current})}),[h,n]);i.useEffect((function(){return b.current=!1,function(){b.current&&y.current&&P.dispatch(u.Action.CANCEL)}}),[P]);var A=i.useRef(null),O=i.useCallback((function(){document.activeElement instanceof HTMLElement&&(A.current=document.activeElement)}),[]),_=i.useCallback((function(){var t=A.current;A.current=null,t&&document.contains(t)&&t.focus()}),[]);return i.useEffect((function(){e!==b.current&&(b.current=e,e?(P.dispatch(u.Action.OPEN),O()):(P.dispatch(u.Action.CLOSE),_()))}),[P,e,O,_]),i.useEffect((function(){if(c)return P.subscribe(u.Action.SELECT,(function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return b.current=!1,_(),c.apply(void 0,t)}))}),[P,c,_]),i.useEffect((function(){if(s)return P.subscribe(u.Action.CANCEL,(function(){return b.current=!1,_(),s()}))}),[P,s,_]),i.useEffect((function(){JSON.stringify(d)!==JSON.stringify(v.current)&&(v.current=d,P.set(d))}),[P,d]),null}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(2),o=n(14),i=n(52),u=n(24),a=n(69),c=n(4);function s(t,e,n){var r=n||o.create(t,{label:e.content||""});return p(e,r),r}function p(t,e){if(t&&e){var n=a.generateRedirect(e.app,t.url,t.target,t.external);n&&e.subscribe(o.Action.CLICK,n,e),(null==t?void 0:t.onAction)&&e.subscribe(o.Action.CLICK,t.onAction,e)}}e.default=function(t){var e=c.useAppBridge(),n=r.useRef(),o=r.useMemo((function(){return i.create(e,{})}),[e]);return r.useEffect((function(){var r,i=JSON.stringify(n.current)!==JSON.stringify(t);if(n.current=t,i)o.set(function(t,e){var n=e.actionGroups,r=e.breadcrumbs,o=e.primaryAction,i=e.secondaryActions,u=e.title,c=Array.isArray(r)?r[r.length-1]:r;return{title:u,buttons:a.transformActions(t,{primaryAction:o,secondaryActions:i,actionGroups:n}),breadcrumbs:c?s(t,c):void 0}}(e,t));else{var c=t.primaryAction,l=t.secondaryActions,f=t.actionGroups,d=t.breadcrumbs;p(Array.isArray(d)?d[d.length-1]:d,o.options.breadcrumbs),p(c,null===(r=o.options.buttons)||void 0===r?void 0:r.primary),function(t,e){var n,r,o=(null===(r=null===(n=t.options.buttons)||void 0===n?void 0:n.secondary)||void 0===r?void 0:r.filter((function(t){return!u.isGroupedButton(t)})))||[];null==o||o.forEach((function(t,n){return p(null==e?void 0:e[n],t)}))}(o,l),function(t,e){var n,r,o=(null===(r=null===(n=t.options.buttons)||void 0===n?void 0:n.secondary)||void 0===r?void 0:r.filter(u.isGroupedButton))||[];null==o||o.forEach((function(t,n){var r=null==e?void 0:e[n];r&&t.options.buttons.forEach((function(t,e){return p(r.actions[e],t)}))}))}(o,f)}return function(){o.unsubscribe()}}),[o,t]),null}},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.DEFAULT_TOAST_DURATION=void 0;var u=i(n(2)),a=n(6),c=n(5);e.DEFAULT_TOAST_DURATION=5e3;var s=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return o(n,t),n.prototype.componentDidMount=function(){var t=this.context,n=this.props,r=n.error,o=n.content,i=n.duration,u=void 0===i?e.DEFAULT_TOAST_DURATION:i,c=n.onDismiss,s=n.action;this.toast=a.Toast.create(t,{message:o,duration:u,isError:r,action:(null==s?void 0:s.content)?{content:null==s?void 0:s.content}:void 0}),(null==s?void 0:s.onAction)&&this.toast.subscribe(a.Toast.Action.ACTION,null==s?void 0:s.onAction),this.toast.subscribe(a.Toast.Action.CLEAR,c),this.toast.dispatch(a.Toast.Action.SHOW)},n.prototype.componentWillUnmount=function(){this.toast.unsubscribe()},n.prototype.render=function(){return null},n.contextType=c.AppBridgeContext,n}(u.default.PureComponent);e.default=s},function(t,e,n){"use strict";var r=this&&this.__rest||function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};Object.defineProperty(e,"__esModule",{value:!0});var o=n(2),i=n(62),u=n(4);e.default=function(t){var e=t.open,n=t.onCancel,a=t.onSelect,c=t.onSearch,s=t.onLoadMore,p=r(t,["open","onCancel","onSelect","onSearch","onLoadMore"]),l=u.useAppBridge(),f=o.useRef(!1);o.useEffect((function(){return function(){f.current=!0}}),[]);var d=o.useRef(!1),h=o.useRef(p),y=o.useMemo((function(){return i.create(l,h.current)}),[l]);return o.useEffect((function(){return d.current=!1,function(){d.current&&f.current&&y.dispatch(i.Action.CANCEL)}}),[y]),o.useEffect((function(){e!==d.current&&(d.current=e,e?y.dispatch(i.Action.OPEN):y.dispatch(i.Action.CANCEL))}),[y,e]),o.useEffect((function(){if(a)return y.subscribe(i.Action.SELECT,(function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return d.current=!1,a.apply(void 0,t)}))}),[y,a]),o.useEffect((function(){if(n)return y.subscribe(i.Action.CANCEL,(function(){return d.current=!1,n()}))}),[y,n]),o.useEffect((function(){if(c)return y.subscribe(i.Action.SEARCH,c)}),[y,c]),o.useEffect((function(){if(s)return y.subscribe(i.Action.LOAD_MORE,s)}),[y,s]),o.useEffect((function(){JSON.stringify(p)!==JSON.stringify(h.current)&&(h.current=p,y.set(p,d.current))}),[y,p]),null}},function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),o=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),e.useAppBridge=e.Context=void 0;var i=n(5);Object.defineProperty(e,"Context",{enumerable:!0,get:function(){return i.AppBridgeContext}});var u=n(4);Object.defineProperty(e,"useAppBridge",{enumerable:!0,get:function(){return u.useAppBridge}}),o(n(84),e),o(n(30),e)},function(t,e,n){"use strict";
|
|
2
2
|
/**
|
|
3
3
|
* @license React
|
|
4
4
|
* react.production.min.js
|
|
@@ -7,4 +7,4 @@
|
|
|
7
7
|
*
|
|
8
8
|
* This source code is licensed under the MIT license found in the
|
|
9
9
|
* LICENSE file in the root directory of this source tree.
|
|
10
|
-
*/var r=Symbol.for("react.element"),o=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),u=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),c=Symbol.for("react.provider"),s=Symbol.for("react.context"),p=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),h=Symbol.iterator;var y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},v=Object.assign,b={};function _(t,e,n){this.props=t,this.context=e,this.refs=b,this.updater=n||y}function A(){}function P(t,e,n){this.props=t,this.context=e,this.refs=b,this.updater=n||y}_.prototype.isReactComponent={},_.prototype.setState=function(t,e){if("object"!=typeof t&&"function"!=typeof t&&null!=t)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,t,e,"setState")},_.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")},A.prototype=_.prototype;var O=P.prototype=new A;O.constructor=P,v(O,_.prototype),O.isPureReactComponent=!0;var g=Array.isArray,E=Object.prototype.hasOwnProperty,m={current:null},T={key:!0,ref:!0,__self:!0,__source:!0};function S(t,e,n){var o,i={},u=null,a=null;if(null!=e)for(o in void 0!==e.ref&&(a=e.ref),void 0!==e.key&&(u=""+e.key),e)E.call(e,o)&&!T.hasOwnProperty(o)&&(i[o]=e[o]);var c=arguments.length-2;if(1===c)i.children=n;else if(1<c){for(var s=Array(c),p=0;p<c;p++)s[p]=arguments[p+2];i.children=s}if(t&&t.defaultProps)for(o in c=t.defaultProps)void 0===i[o]&&(i[o]=c[o]);return{$$typeof:r,type:t,key:u,ref:a,props:i,_owner:m.current}}function C(t){return"object"==typeof t&&null!==t&&t.$$typeof===r}var I=/\/+/g;function R(t,e){return"object"==typeof t&&null!==t&&null!=t.key?function(t){var e={"=":"=0",":":"=2"};return"$"+t.replace(/[=:]/g,(function(t){return e[t]}))}(""+t.key):e.toString(36)}function w(t,e,n,i,u){var a=typeof t;"undefined"!==a&&"boolean"!==a||(t=null);var c=!1;if(null===t)c=!0;else switch(a){case"string":case"number":c=!0;break;case"object":switch(t.$$typeof){case r:case o:c=!0}}if(c)return u=u(c=t),t=""===i?"."+R(c,0):i,g(u)?(n="",null!=t&&(n=t.replace(I,"$&/")+"/"),w(u,e,n,"",(function(t){return t}))):null!=u&&(C(u)&&(u=function(t,e){return{$$typeof:r,type:t.type,key:e,ref:t.ref,props:t.props,_owner:t._owner}}(u,n+(!u.key||c&&c.key===u.key?"":(""+u.key).replace(I,"$&/")+"/")+t)),e.push(u)),1;if(c=0,i=""===i?".":i+":",g(t))for(var s=0;s<t.length;s++){var p=i+R(a=t[s],s);c+=w(a,e,n,p,u)}else if("function"==typeof(p=function(t){return null===t||"object"!=typeof t?null:"function"==typeof(t=h&&t[h]||t["@@iterator"])?t:null}(t)))for(t=p.call(t),s=0;!(a=t.next()).done;)c+=w(a=a.value,e,n,p=i+R(a,s++),u);else if("object"===a)throw e=String(t),Error("Objects are not valid as a React child (found: "+("[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e)+"). If you meant to render a collection of children, use an array instead.");return c}function M(t,e,n){if(null==t)return t;var r=[],o=0;return w(t,r,"","",(function(t){return e.call(n,t,o++)})),r}function j(t){if(-1===t._status){var e=t._result;(e=e()).then((function(e){0!==t._status&&-1!==t._status||(t._status=1,t._result=e)}),(function(e){0!==t._status&&-1!==t._status||(t._status=2,t._result=e)})),-1===t._status&&(t._status=0,t._result=e)}if(1===t._status)return t._result.default;throw t._result}var N={current:null},D={transition:null},L={ReactCurrentDispatcher:N,ReactCurrentBatchConfig:D,ReactCurrentOwner:m};e.Children={map:M,forEach:function(t,e,n){M(t,(function(){e.apply(this,arguments)}),n)},count:function(t){var e=0;return M(t,(function(){e++})),e},toArray:function(t){return M(t,(function(t){return t}))||[]},only:function(t){if(!C(t))throw Error("React.Children.only expected to receive a single React element child.");return t}},e.Component=_,e.Fragment=i,e.Profiler=a,e.PureComponent=P,e.StrictMode=u,e.Suspense=l,e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=L,e.cloneElement=function(t,e,n){if(null==t)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+t+".");var o=v({},t.props),i=t.key,u=t.ref,a=t._owner;if(null!=e){if(void 0!==e.ref&&(u=e.ref,a=m.current),void 0!==e.key&&(i=""+e.key),t.type&&t.type.defaultProps)var c=t.type.defaultProps;for(s in e)E.call(e,s)&&!T.hasOwnProperty(s)&&(o[s]=void 0===e[s]&&void 0!==c?c[s]:e[s])}var s=arguments.length-2;if(1===s)o.children=n;else if(1<s){c=Array(s);for(var p=0;p<s;p++)c[p]=arguments[p+2];o.children=c}return{$$typeof:r,type:t.type,key:i,ref:u,props:o,_owner:a}},e.createContext=function(t){return(t={$$typeof:s,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:c,_context:t},t.Consumer=t},e.createElement=S,e.createFactory=function(t){var e=S.bind(null,t);return e.type=t,e},e.createRef=function(){return{current:null}},e.forwardRef=function(t){return{$$typeof:p,render:t}},e.isValidElement=C,e.lazy=function(t){return{$$typeof:d,_payload:{_status:-1,_result:t},_init:j}},e.memo=function(t,e){return{$$typeof:f,type:t,compare:void 0===e?null:e}},e.startTransition=function(t){var e=D.transition;D.transition={};try{t()}finally{D.transition=e}},e.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")},e.useCallback=function(t,e){return N.current.useCallback(t,e)},e.useContext=function(t){return N.current.useContext(t)},e.useDebugValue=function(){},e.useDeferredValue=function(t){return N.current.useDeferredValue(t)},e.useEffect=function(t,e){return N.current.useEffect(t,e)},e.useId=function(){return N.current.useId()},e.useImperativeHandle=function(t,e,n){return N.current.useImperativeHandle(t,e,n)},e.useInsertionEffect=function(t,e){return N.current.useInsertionEffect(t,e)},e.useLayoutEffect=function(t,e){return N.current.useLayoutEffect(t,e)},e.useMemo=function(t,e){return N.current.useMemo(t,e)},e.useReducer=function(t,e,n){return N.current.useReducer(t,e,n)},e.useRef=function(t){return N.current.useRef(t)},e.useState=function(t){return N.current.useState(t)},e.useSyncExternalStore=function(t,e,n){return N.current.useSyncExternalStore(t,e,n)},e.useTransition=function(){return N.current.useTransition()},e.version="18.2.0"},function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),o=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||r(e,t,n)},i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.unstable_Picker=e.ToastProps=e.Toast=e.TitleBar=e.ResourcePickerProps=e.ResourcePicker=e.ProviderProps=e.Provider=e.NavigationMenuProps=e.NavigationMenu=e.ModalContent=e.ModalProps=e.Modal=e.Loading=e.ContextualSaveBarProps=e.ContextualSaveBar=void 0;var u=n(59);Object.defineProperty(e,"ContextualSaveBar",{enumerable:!0,get:function(){return i(u).default}}),Object.defineProperty(e,"ContextualSaveBarProps",{enumerable:!0,get:function(){return u.Props}});var a=n(104);Object.defineProperty(e,"Loading",{enumerable:!0,get:function(){return i(a).default}});var c=n(106);Object.defineProperty(e,"Modal",{enumerable:!0,get:function(){return i(c).default}}),Object.defineProperty(e,"ModalProps",{enumerable:!0,get:function(){return c.Props}}),Object.defineProperty(e,"ModalContent",{enumerable:!0,get:function(){return c.ModalContent}});var s=n(109);Object.defineProperty(e,"NavigationMenu",{enumerable:!0,get:function(){return i(s).default}}),Object.defineProperty(e,"NavigationMenuProps",{enumerable:!0,get:function(){return s.Props}});var p=n(110);Object.defineProperty(e,"Provider",{enumerable:!0,get:function(){return i(p).default}}),Object.defineProperty(e,"ProviderProps",{enumerable:!0,get:function(){return p.Props}});var l=n(122);Object.defineProperty(e,"ResourcePicker",{enumerable:!0,get:function(){return i(l).default}}),Object.defineProperty(e,"ResourcePickerProps",{enumerable:!0,get:function(){return l.Props}});var f=n(123);Object.defineProperty(e,"TitleBar",{enumerable:!0,get:function(){return i(f).default}});var d=n(124);Object.defineProperty(e,"Toast",{enumerable:!0,get:function(){return i(d).default}}),Object.defineProperty(e,"ToastProps",{enumerable:!0,get:function(){return d.Props}});var h=n(125);Object.defineProperty(e,"unstable_Picker",{enumerable:!0,get:function(){return i(h).default}}),o(n(51),e),o(n(50),e)},function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),o=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&r(e,t,n);return o(e,t),e};Object.defineProperty(e,"__esModule",{value:!0}),e.Props=void 0;var u=i(n(60));Object.defineProperty(e,"Props",{enumerable:!0,get:function(){return u.Props}}),e.default=u.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(2),o=n(23);e.default=function(t){var e=t.discardAction,n=void 0===e?{}:e,i=t.saveAction,u=void 0===i?{}:i,a=t.fullWidth,c=t.leaveConfirmationDisable,s=t.visible,p=o.useContextualSaveBar(),l=p.show,f=p.hide,d=p.saveAction.setOptions,h=p.discardAction.setOptions;return r.useEffect((function(){d(u)}),[u]),r.useEffect((function(){h(n)}),[n]),r.useEffect((function(){s?l({fullWidth:a,leaveConfirmationDisable:c}):f()}),[a,c,s]),null}},function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function u(t){try{c(r.next(t))}catch(t){i(t)}}function a(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(u,a)}c((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;u;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return u.label++,{value:i[1],done:!1};case 5:u.label++,r=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!(o=u.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){u=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){u.label=i[1];break}if(6===i[0]&&u.label<o[1]){u.label=o[1],o=i;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(i);break}o[2]&&u.ops.pop(),u.trys.pop();continue}i=e.call(t,u)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.useAppBridgeState=void 0;var i=n(2),u=n(4);e.useAppBridgeState=function(t){var e=u.useAppBridge(),n=i.useState(),a=n[0],c=n[1],s=i.useRef(!1),p=i.useCallback((function(){return r(void 0,void 0,void 0,(function(){var n,r;return o(this,(function(o){switch(o.label){case 0:return t?[4,e.getState(t)]:[3,2];case 1:return r=o.sent(),[3,4];case 2:return[4,e.getState()];case 3:r=o.sent(),o.label=4;case 4:return n=r,s.current?[2]:(c((function(t){return JSON.stringify(n)===JSON.stringify(t)?t:n})),[2])}}))}))}),[e,t]);return i.useEffect((function(){return p(),e.subscribe((function(){p()}))}),[e,p]),i.useEffect((function(){return function(){s.current=!0}}),[e]),a}},function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),o=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),o(n(63),e)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.useAuthenticatedFetch=void 0;var r=n(2),o=n(64),i=n(4);e.useAuthenticatedFetch=function(t){void 0===t&&(t=void 0);var e=i.useAppBridge();return r.useMemo((function(){return o.authenticatedFetch(e,t)}),[e,t])}},function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),o=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),o(n(65),e),o(n(19),e),o(n(69),e),o(n(90),e)},function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function u(t){try{c(r.next(t))}catch(t){i(t)}}function a(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(u,a)}c((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;u;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return u.label++,{value:i[1],done:!1};case 5:u.label++,r=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!(o=u.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){u=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){u.label=i[1];break}if(6===i[0]&&u.label<o[1]){u.label=o[1],o=i;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(i);break}o[2]&&u.ops.pop(),u.trys.pop();continue}i=e.call(t,u)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.createMutationObserver=e.setupModalAutoSizing=void 0;var i=n(11),u=n(13),a=n(19),c="app-bridge-utils-modal-auto-size",s=function(){if("undefined"==typeof document)return null;var t=document.createElement("style");return t.type="text/css",t.innerHTML="."+c+" { overflow: hidden; height: auto; min-height: auto; }",t}();function p(t,e){if("undefined"!=typeof document){var n,r=-1,o=new MutationObserver((function(){n&&window.clearTimeout(n);n=window.setTimeout(u,16)}));return o.observe(document,{attributes:!0,attributeOldValue:!1,characterData:!0,characterDataOldValue:!1,childList:!0,subtree:!0}),u(),o}function u(){var n=document.body.scrollHeight;n!==r&&(r=n,t.dispatch(i.updateModalSize({id:e,height:String(n)})))}}e.setupModalAutoSizing=function(t){return r(this,void 0,void 0,(function(){function e(){r&&(r(),r=void 0)}function n(n){var o=n.context,i=n.modal.id;return a.isMobile()||o!==u.Context.Modal?(e(),e):(r||(r=function(t,e){if(!s)return function(){};var n=document.getElementsByTagName("head")[0],r=document.body.classList;n.appendChild(s),r.add(c);var o=p(t,e);return function(){r.remove(c),n.contains(s)&&n.removeChild(s),o&&o.disconnect()}}(t,i)),e)}var r;return o(this,(function(r){switch(r.label){case 0:return[4,t.getState().then(n)];case 1:return r.sent(),[2,e]}}))}))},e.createMutationObserver=p},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function t(e,n){if(null==n)return n;if(void 0===e||!Object.prototype.isPrototypeOf.call(Object.getPrototypeOf(e),n)||"Object"!==n.constructor.name&&"Array"!==n.constructor.name)return n;var r={};return Object.keys(n).forEach((function(o){Object.prototype.hasOwnProperty.call(e,o)?"object"!=typeof e[o]||Array.isArray(e[o])?r[o]=n[o]:r[o]=t(e[o],n[o]):r[o]=n[o]})),Object.keys(e).forEach((function(t){Object.prototype.hasOwnProperty.call(n,t)||(r[t]=e[t])})),Object.setPrototypeOf(r,Object.getPrototypeOf(e)),r}},function(t){t.exports=JSON.parse('{"name":"@shopify/app-bridge","version":"3.7.2","types":"index.d.ts","main":"index.js","unpkg":"umd/index.js","jsdelivr":"umd/index.js","files":["/actions/","/client/","/umd/","/utilities/","/util/","/validate/","/development.d.ts","/development.js","/index.d.ts","/index.js","/MessageTransport.d.ts","/MessageTransport.js","/production.d.ts","/production.js"],"private":false,"publishConfig":{"access":"public","@shopify:registry":"https://registry.npmjs.org"},"repository":"git@github.com:Shopify/app-bridge.git","homepage":"https://shopify.dev/tools/app-bridge","author":"Shopify Inc.","license":"MIT","scripts":{"build":"yarn build:tsc && yarn build:npm && yarn build:umd","build:tsc":"NODE_ENV=production tsc","build:umd":"NODE_ENV=production webpack -p","build:npm":"shx cp -r ./npm/index.js ./index.js","check":"tsc","clean":"cat package.json | node -pe \\"JSON.parse(require(\'fs\').readFileSync(\'/dev/stdin\').toString()).files.map(f => \'./\'+f).join(\' \')\\" | xargs rm -rf","pack":"yarn pack","size":"size-limit"},"sideEffects":false,"size-limit":[{"limit":"10 KB","path":"production.js"}],"dependencies":{"base64url":"^3.0.1","web-vitals":"^3.0.1"},"devDependencies":{"@types/node":"^10.12.5","shx":"^0.3.3"}}')},function(t,e){var n,r,o=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function u(){throw new Error("clearTimeout has not been defined")}function a(t){if(n===setTimeout)return setTimeout(t,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(t){n=i}try{r="function"==typeof clearTimeout?clearTimeout:u}catch(t){r=u}}();var c,s=[],p=!1,l=-1;function f(){p&&c&&(p=!1,c.length?s=c.concat(s):l=-1,s.length&&d())}function d(){if(!p){var t=a(f);p=!0;for(var e=s.length;e;){for(c=s,s=[];++l<e;)c&&c[l].run();l=-1,e=s.length}c=null,p=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===u||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function h(t,e){this.fun=t,this.array=e}function y(){}o.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];s.push(new h(t,e)),1!==s.length||p||a(d)},h.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=y,o.addListener=y,o.once=y,o.off=y,o.removeListener=y,o.removeAllListeners=y,o.emit=y,o.prependListener=y,o.prependOnceListener=y,o.listeners=function(t){return[]},o.binding=function(t){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(t){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),o=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),o(n(28),e),o(n(70),e)},function(t,e,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},o=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function u(t){try{c(r.next(t))}catch(t){i(t)}}function a(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(u,a)}c((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;u;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return u.label++,{value:i[1],done:!1};case 5:u.label++,r=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!(o=u.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){u=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){u.label=i[1];break}if(6===i[0]&&u.label<o[1]){u.label=o[1],o=i;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(i);break}o[2]&&u.ops.pop(),u.trys.pop();continue}i=e.call(t,u)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.authenticatedFetch=void 0;var u=n(8),a=n(28);e.authenticatedFetch=function(t,e){var n=this;return void 0===e&&(e=void 0),function(c,s){return void 0===s&&(s={}),o(n,void 0,void 0,(function(){var n,o,p,l,f,d,h,y;return i(this,(function(i){switch(i.label){case 0:return[4,a.getSessionToken(t)];case 1:return n=i.sent(),(o=new Headers(s.headers)).append("Authorization","Bearer "+n),o.append("X-Requested-With","XMLHttpRequest"),p={},o.forEach((function(t,e){p[e]=t})),l="object"==typeof e?e:void 0,[4,("function"==typeof e?e:null!==(y=null==l?void 0:l.fetchOperation)&&void 0!==y?y:fetch)(c,r(r({},s),{headers:p}))];case 2:return f=i.sent(),l&&(d=l.reauthorizeUrl,h=l.requestFailureReauthorizeUrlHeader,f.headers.forEach((function(e,n){if(h.toLowerCase()===n.toLowerCase()){var r=new URL(d||e,location.href).href,o=u.Redirect.create(t);r?o.dispatch(u.Redirect.Action.REMOTE,r):console.warn("Couldn't find a fallback auth path to redirect to.")}}))),[2,f]}}))}))}}},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.Cart=e.setLineItemProperties=e.removeLineItemDiscount=e.setLineItemDiscount=e.removeLineItem=e.updateLineItem=e.addLineItem=e.removeProperties=e.setProperties=e.setDiscount=e.updateCustomerAddress=e.addCustomerAddress=e.setCustomer=e.update=e.fetch=e.Action=void 0;var u,a=n(0),c=n(3),s=n(1);function p(t,e){return void 0===e&&(e={}),a.actionWrapper({group:s.Group.Cart,type:t,payload:e})}!function(t){t.FETCH="APP::CART::FETCH",t.UPDATE="APP::CART::UPDATE",t.SET_CUSTOMER="APP::CART::SET_CUSTOMER",t.REMOVE_CUSTOMER="APP::CART::REMOVE_CUSTOMER",t.ADD_CUSTOMER_ADDRESS="APP::CART::ADD_CUSTOMER_ADDRESS",t.UPDATE_CUSTOMER_ADDRESS="APP::CART::UPDATE_CUSTOMER_ADDRESS",t.SET_DISCOUNT="APP::CART::SET_DISCOUNT",t.REMOVE_DISCOUNT="APP::CART::REMOVE_DISCOUNT",t.SET_PROPERTIES="APP::CART::SET_PROPERTIES",t.REMOVE_PROPERTIES="APP::CART::REMOVE_PROPERTIES",t.CLEAR="APP::CART::CLEAR",t.ADD_LINE_ITEM="APP::CART::ADD_LINE_ITEM",t.UPDATE_LINE_ITEM="APP::CART::UPDATE_LINE_ITEM",t.REMOVE_LINE_ITEM="APP::CART::REMOVE_LINE_ITEM",t.SET_LINE_ITEM_DISCOUNT="APP::CART::SET_LINE_ITEM_DISCOUNT",t.REMOVE_LINE_ITEM_DISCOUNT="APP::CART::REMOVE_LINE_ITEM_DISCOUNT",t.SET_LINE_ITEM_PROPERTIES="APP::CART::SET_LINE_ITEM_PROPERTIES",t.REMOVE_LINE_ITEM_PROPERTIES="APP::CART::REMOVE_LINE_ITEM_PROPERTIES"}(u=e.Action||(e.Action={})),e.fetch=function(){return p(u.FETCH)},e.update=function(t){return p(u.UPDATE,t)},e.setCustomer=function(t){return p(u.SET_CUSTOMER,t)},e.addCustomerAddress=function(t){return p(u.ADD_CUSTOMER_ADDRESS,t)},e.updateCustomerAddress=function(t){return p(u.UPDATE_CUSTOMER_ADDRESS,t)},e.setDiscount=function(t){return p(u.SET_DISCOUNT,t)},e.setProperties=function(t){return p(u.SET_PROPERTIES,t)},e.removeProperties=function(t){return p(u.REMOVE_PROPERTIES,t)},e.addLineItem=function(t){return p(u.ADD_LINE_ITEM,t)},e.updateLineItem=function(t){return p(u.UPDATE_LINE_ITEM,t)},e.removeLineItem=function(t){return p(u.REMOVE_LINE_ITEM,t)},e.setLineItemDiscount=function(t){return p(u.SET_LINE_ITEM_DISCOUNT,t)},e.removeLineItemDiscount=function(t){return p(u.REMOVE_LINE_ITEM_DISCOUNT,t)},e.setLineItemProperties=function(t){return p(u.SET_LINE_ITEM_PROPERTIES,t)};var l=function(t){function e(e,n){return t.call(this,e,s.Group.Cart,s.Group.Cart,n?n.id:void 0)||this}return o(e,t),e.prototype.dispatch=function(t,e){switch(t){case u.FETCH:this.dispatchCartAction(u.FETCH);break;case u.UPDATE:this.dispatchCartAction(u.UPDATE,e);break;case u.SET_CUSTOMER:this.dispatchCartAction(u.SET_CUSTOMER,e);break;case u.REMOVE_CUSTOMER:this.dispatchCartAction(u.REMOVE_CUSTOMER,e);break;case u.ADD_CUSTOMER_ADDRESS:this.dispatchCartAction(u.ADD_CUSTOMER_ADDRESS,e);break;case u.UPDATE_CUSTOMER_ADDRESS:this.dispatchCartAction(u.UPDATE_CUSTOMER_ADDRESS,e);break;case u.SET_DISCOUNT:this.dispatchCartAction(u.SET_DISCOUNT,e);break;case u.REMOVE_DISCOUNT:this.dispatchCartAction(u.REMOVE_DISCOUNT,e);break;case u.SET_PROPERTIES:this.dispatchCartAction(u.SET_PROPERTIES,e);break;case u.REMOVE_PROPERTIES:this.dispatchCartAction(u.REMOVE_PROPERTIES,e);break;case u.CLEAR:this.dispatchCartAction(u.CLEAR,e);break;case u.ADD_LINE_ITEM:this.dispatchCartAction(u.ADD_LINE_ITEM,e);break;case u.UPDATE_LINE_ITEM:this.dispatchCartAction(u.UPDATE_LINE_ITEM,e);break;case u.REMOVE_LINE_ITEM:this.dispatchCartAction(u.REMOVE_LINE_ITEM,e);break;case u.SET_LINE_ITEM_DISCOUNT:this.dispatchCartAction(u.SET_LINE_ITEM_DISCOUNT,e);break;case u.REMOVE_LINE_ITEM_DISCOUNT:this.dispatchCartAction(u.REMOVE_LINE_ITEM_DISCOUNT,e);break;case u.SET_LINE_ITEM_PROPERTIES:this.dispatchCartAction(u.SET_LINE_ITEM_PROPERTIES,e);break;case u.REMOVE_LINE_ITEM_PROPERTIES:this.dispatchCartAction(u.REMOVE_LINE_ITEM_PROPERTIES,e)}return this},e.prototype.dispatchCartAction=function(t,e){this.app.dispatch(p(t,i(i({},e),{id:this.id})))},e}(c.ActionSet);e.Cart=l,e.create=function(t,e){return new l(t,e)}},function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),o=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),o(n(73),e)},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.Flash=e.show=e.clear=void 0;var i=n(15),u=n(15);Object.defineProperty(e,"clear",{enumerable:!0,get:function(){return u.clear}}),Object.defineProperty(e,"show",{enumerable:!0,get:function(){return u.show}});var a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e}(i.Toast);e.Flash=a,e.create=function(t,e){return new a(t,e)}},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.Features=void 0;var u=n(0),a=n(3),c=n(1),s=n(20),p=function(t){function e(e,n){return t.call(this,e,c.Group.Features,c.Group.Features,n?n.id:void 0)||this}return o(e,t),e.prototype.dispatch=function(t,e){switch(t){case s.Action.REQUEST:this.dispatchFeaturesAction(s.Action.REQUEST,e)}return this},e.prototype.dispatchFeaturesAction=function(t,e){this.app.dispatch(u.actionWrapper({group:c.Group.Features,type:t,payload:i(i({},e||{}),{id:this.id})}))},e}(a.ActionSet);e.Features=p,e.create=function(t,e){return new p(t,e)}},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.FeedbackModal=e.close=e.open=e.Action=void 0;var u,a=n(0),c=n(3),s=n(1);function p(t){return a.actionWrapper({group:s.Group.FeedbackModal,payload:t,type:u.OPEN})}function l(t){return a.actionWrapper({group:s.Group.FeedbackModal,payload:t,type:u.CLOSE})}!function(t){t.OPEN="APP::FEEDBACK_MODAL::OPEN",t.CLOSE="APP::FEEDBACK_MODAL::CLOSE"}(u=e.Action||(e.Action={})),e.open=p,e.close=l;var f=function(t){function e(e,n){var r=t.call(this,e,s.Group.FeedbackModal,s.Group.FeedbackModal)||this;return r.options=n,r.set(n),r}return o(e,t),Object.defineProperty(e.prototype,"payload",{get:function(){return i({id:this.id},this.options)},enumerable:!1,configurable:!0}),e.prototype.set=function(t){return this.options=a.getMergedProps(this.options,t),this},e.prototype.dispatch=function(t){switch(t){case u.OPEN:var e=p(this.payload);this.app.dispatch(e);break;case u.CLOSE:var n=l(this.payload);this.app.dispatch(n)}return this},e}(c.ActionSet);e.FeedbackModal=f,e.create=function(t,e){return new f(t,e)}},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.Fullscreen=e.exit=e.enter=e.Action=void 0;var i,u=n(0),a=n(3),c=n(1);!function(t){t.ENTER="APP::FULLSCREEN::ENTER",t.EXIT="APP::FULLSCREEN::EXIT"}(i=e.Action||(e.Action={})),e.enter=function(){return u.actionWrapper({group:c.Group.Fullscreen,type:i.ENTER})},e.exit=function(){return u.actionWrapper({group:c.Group.Fullscreen,type:i.EXIT})};var s=function(t){function e(e){return t.call(this,e,c.Group.Fullscreen,c.Group.Fullscreen)||this}return o(e,t),Object.defineProperty(e.prototype,"payload",{get:function(){return{id:this.id}},enumerable:!1,configurable:!0}),e.prototype.dispatch=function(t){return this.app.dispatch(u.actionWrapper({group:this.group,type:t,payload:this.payload})),this},e}(a.ActionSet);e.Fullscreen=s,e.create=function(t){return new s(t)}},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.LeaveConfirmation=e.confirm=e.disable=e.enable=e.Action=void 0;var u,a=n(0),c=n(3),s=n(1);function p(t){return void 0===t&&(t={}),a.actionWrapper({group:s.Group.LeaveConfirmation,payload:t,type:u.ENABLE})}function l(t){return void 0===t&&(t={}),a.actionWrapper({group:s.Group.LeaveConfirmation,payload:t,type:u.DISABLE})}function f(t){return void 0===t&&(t={}),a.actionWrapper({group:s.Group.LeaveConfirmation,payload:t,type:u.CONFIRM})}!function(t){t.ENABLE="APP::LEAVE_CONFIRMATION::ENABLE",t.DISABLE="APP::LEAVE_CONFIRMATION::DISABLE",t.CONFIRM="APP::LEAVE_CONFIRMATION::CONFIRM"}(u=e.Action||(e.Action={})),e.enable=p,e.disable=l,e.confirm=f;var d=function(t){function e(e,n){void 0===n&&(n={});var r=t.call(this,e,s.Group.LeaveConfirmation,s.Group.LeaveConfirmation)||this;return r.options=n,r.set(n),r}return o(e,t),Object.defineProperty(e.prototype,"payload",{get:function(){return i({id:this.id},this.options)},enumerable:!1,configurable:!0}),e.prototype.set=function(t){return this.options=a.getMergedProps(this.options,t),this},e.prototype.dispatch=function(t){switch(t){case u.ENABLE:var e=p(this.payload);this.app.dispatch(e);break;case u.DISABLE:var n=l(this.payload);this.app.dispatch(n);break;case u.CONFIRM:var r=f(this.payload);this.app.dispatch(r)}return this},e}(c.ActionSet);e.LeaveConfirmation=d,e.create=function(t,e){return void 0===e&&(e={}),new d(t,e)}},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.Loading=e.stop=e.start=e.Action=void 0;var i,u=n(0),a=n(3),c=n(1);function s(t){return u.actionWrapper({payload:t,group:c.Group.Loading,type:i.START})}function p(t){return u.actionWrapper({payload:t,group:c.Group.Loading,type:i.STOP})}!function(t){t.START="APP::LOADING::START",t.STOP="APP::LOADING::STOP"}(i=e.Action||(e.Action={})),e.start=s,e.stop=p;var l=function(t){function e(e){return t.call(this,e,c.Group.Loading,c.Group.Loading)||this}return o(e,t),Object.defineProperty(e.prototype,"payload",{get:function(){return{id:this.id}},enumerable:!1,configurable:!0}),e.prototype.dispatch=function(t){switch(t){case i.START:this.app.dispatch(s(this.payload));break;case i.STOP:this.app.dispatch(p(this.payload))}return this},e}(a.ActionSet);e.Loading=l,e.create=function(t){return new l(t)}},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},u=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function u(t){try{c(r.next(t))}catch(t){i(t)}}function a(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(u,a)}c((r=r.apply(t,e||[])).next())}))},a=this&&this.__generator||function(t,e){var n,r,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;u;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return u.label++,{value:i[1],done:!1};case 5:u.label++,r=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!(o=u.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){u=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){u.label=i[1];break}if(6===i[0]&&u.label<o[1]){u.label=o[1],o=i;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(i);break}o[2]&&u.ops.pop(),u.trys.pop();continue}i=e.call(t,u)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.ModalContent=e.Action=void 0;var c,s=n(0),p=n(3),l=n(1),f=n(11);!function(t){t.LOADING="LOADING",t.LOADED="LOADED"}(c=e.Action||(e.Action={}));var d=function(t){function e(e,n){return t.call(this,e,l.Group.Modal,l.Group.Modal,n?n.id:void 0)||this}return o(e,t),e.prototype.loaded=function(){this.dispatch(c.LOADED)},e.prototype.loading=function(){this.dispatch(c.LOADING)},e.prototype.dispatch=function(t){switch(t){case c.LOADED:this.dispatchModalAction(f.Action.UPDATE_CONTENT,{loading:!1});break;case c.LOADING:this.dispatchModalAction(f.Action.UPDATE_CONTENT,{loading:!0})}return this},e.prototype.dispatchModalAction=function(t,e){return u(this,void 0,void 0,(function(){var n;return a(this,(function(r){return n=s.actionWrapper({type:t,group:l.Group.Modal,payload:i({},e)}),this.app.dispatch(n),[2]}))}))},e}(p.ActionSet);e.ModalContent=d,e.create=function(t,e){return new d(t,e)}},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.History=e.replace=e.push=e.Action=void 0;var u,a=n(0),c=n(3),s=n(1);function p(t){return a.actionWrapper({payload:t,group:s.Group.Navigation,type:u.PUSH})}function l(t){return a.actionWrapper({payload:t,group:s.Group.Navigation,type:u.REPLACE})}!function(t){t.PUSH="APP::NAVIGATION::HISTORY::PUSH",t.REPLACE="APP::NAVIGATION::HISTORY::REPLACE"}(u=e.Action||(e.Action={})),e.push=p,e.replace=l;var f=function(t){function e(e){return t.call(this,e,"History",s.Group.Navigation)||this}return o(e,t),Object.defineProperty(e.prototype,"payload",{get:function(){return{id:this.id}},enumerable:!1,configurable:!0}),e.prototype.dispatch=function(t,e){var n=i(i({},this.payload),{path:e});switch(t){case u.PUSH:this.app.dispatch(p(n));break;case u.REPLACE:this.app.dispatch(l(n))}return this},e}(c.ActionSet);e.History=f,e.create=function(t){return new f(t)}},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.capture=e.openCamera=e.create=e.Scanner=e.Action=void 0;var i,u=n(0),a=n(3),c=n(1);!function(t){t.OPEN_CAMERA="APP::SCANNER::OPEN::CAMERA",t.CAPTURE="APP::SCANNER::CAPTURE"}(i=e.Action||(e.Action={}));var s=function(t){function e(e,n){return t.call(this,e,c.Group.Scanner,c.Group.Scanner,n?n.id:void 0)||this}return o(e,t),e.prototype.dispatch=function(t){switch(t){case i.OPEN_CAMERA:this.dispatchScannerAction(i.OPEN_CAMERA)}return this},e.prototype.dispatchScannerAction=function(t){this.app.dispatch(u.actionWrapper({type:t,group:c.Group.Scanner,payload:{id:this.id}}))},e}(a.ActionSet);e.Scanner=s,e.create=function(t,e){return new s(t,e)},e.openCamera=function(){return u.actionWrapper({group:c.Group.Scanner,type:i.OPEN_CAMERA})},e.capture=function(t){return u.actionWrapper({group:c.Group.Scanner,type:i.CAPTURE,payload:t})}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getGroupedButton=void 0;var r=n(10);e.getGroupedButton=function(t,e,n,o){t.addChild(e,t.group,n);var i=e.id,u=e.label,a=e.disabled,c=e.buttons,s=e.plain;return t.subscribeToChild(e,r.Action.UPDATE,o),{id:i,label:u,buttons:c,disabled:a,plain:s}}},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.close=e.show=e.create=e.Share=e.Action=void 0;var u,a=n(1),c=n(0),s=n(3);!function(t){t.SHOW="APP::SHARE::SHOW",t.CLOSE="APP::SHARE::CLOSE"}(u=e.Action||(e.Action={}));var p=function(t){function e(e){return t.call(this,e,a.Group.Share,a.Group.Share)||this}return o(e,t),e.prototype.dispatch=function(t,e){switch(t){case u.SHOW:this.dispatchShareAction(u.SHOW,e);break;case u.CLOSE:this.dispatchShareAction(u.CLOSE,e);break;default:throw new Error("Action: "+t+" not supported")}return this},e.prototype.dispatchShareAction=function(t,e){this.app.dispatch(c.actionWrapper({type:t,group:a.Group.Share,payload:i({id:this.id},e)}))},e}(s.ActionSet);e.Share=p,e.create=function(t){return new p(t)},e.show=function(){return c.actionWrapper({group:a.Group.Share,type:u.SHOW})},e.close=function(t){return c.actionWrapper({group:a.Group.Share,type:u.CLOSE,payload:t})}},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.ChannelMenu=e.update=e.Action=void 0;var u,a=n(17),c=n(0),s=n(3),p=n(1),l=["Channel_Menu"];function f(t){return c.actionWrapper({payload:t,group:p.Group.Menu,type:u.UPDATE})}!function(t){t.UPDATE="APP::MENU::CHANNEL_MENU::UPDATE",t.LINK_UPDATE="APP::MENU::CHANNEL_MENU::LINK::UPDATE"}(u=e.Action||(e.Action={})),e.update=f;var d=function(t){function e(e,n){var r=t.call(this,e,"Channel_Menu",p.Group.Menu)||this;return r.items=[],r.set(n),r}return o(e,t),Object.defineProperty(e.prototype,"options",{get:function(){return{items:this.itemsOptions,active:this.activeOptions}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"payload",{get:function(){return i(i({},this.options),{active:this.active,items:this.items,id:this.id})},enumerable:!1,configurable:!0}),e.prototype.set=function(t,e){void 0===e&&(e=!0);var n=c.getMergedProps(this.options,t),r=n.items,o=n.active;return this.setItems(r),this.activeOptions=o,this.active=o&&o.id,e&&this.dispatch(u.UPDATE),this},e.prototype.dispatch=function(t){switch(t){case u.UPDATE:this.app.dispatch(f(this.payload))}return this},e.prototype.updateItem=function(t){if(this.items){var e=this.items.find((function(e){return e.id===t.id}));e&&c.updateActionFromPayload(e,t)&&this.dispatch(u.UPDATE)}},e.prototype.setItems=function(t){var e=this,n=t||[],r=this.itemsOptions||[];this.itemsOptions=this.getUpdatedChildActions(n,r),this.items=this.itemsOptions?this.itemsOptions.map((function(t){return e.addChild(t,e.group,l),e.subscribeToChild(t,a.Action.UPDATE,e.updateItem),t.payload})):[]},e}(s.ActionSetWithChildren);e.ChannelMenu=d,e.create=function(t,e){return new d(t,e)}},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.Pos=e.close=e.Action=void 0;var i,u=n(0),a=n(3),c=n(1);function s(){return u.actionWrapper({group:c.Group.Pos,type:i.CLOSE})}!function(t){t.CLOSE="APP::POS::CLOSE",t.LOCATION_UPDATE="APP::POS::LOCATION::UPDATE",t.USER_UPDATE="APP::POS::USER::UPDATE",t.DEVICE_UPDATE="APP::POS::DEVICE::UPDATE"}(i=e.Action||(e.Action={})),e.close=s;var p=function(t){function e(e){return t.call(this,e,c.Group.Pos,c.Group.Pos)||this}return o(e,t),e.prototype.dispatch=function(t){switch(t){case i.CLOSE:this.app.dispatch(s())}return this},e}(a.ActionSet);e.Pos=p,e.create=function(t){return new p(t)}},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.MarketingExternalActivityTopBar=e.update=e.clickActionButton=e.MarketingActivityStatusBadgeType=e.Action=void 0;var u,a=n(6),c=n(12),s=n(0),p=n(3),l=n(1);!function(t){t.UPDATE="APP::MARKETING_EXTERNAL_ACTIVITY_TOP_BAR::UPDATE",t.BUTTON_CLICK="APP::MARKETING_EXTERNAL_ACTIVITY_TOP_BAR::BUTTONS::BUTTON::CLICK",t.BUTTON_UPDATE="APP::MARKETING_EXTERNAL_ACTIVITY_TOP_BAR::BUTTONS::BUTTON::UPDATE"}(u=e.Action||(e.Action={})),function(t){t.Default="DEFAULT",t.Success="SUCCESS",t.Attention="ATTENTION",t.Warning="WARNING",t.Info="INFO"}(e.MarketingActivityStatusBadgeType||(e.MarketingActivityStatusBadgeType={}));var f={group:l.Group.MarketingExternalActivityTopBar,subgroups:["Buttons"]};function d(t){return s.actionWrapper({payload:t,group:l.Group.MarketingExternalActivityTopBar,type:u.UPDATE})}e.clickActionButton=function(t,e){var n=l.ComponentType.Button,r=i({id:t,type:n},f);return a.clickButton(l.Group.MarketingExternalActivityTopBar,r,e)},e.update=d;var h=function(t){function e(e,n){var r=t.call(this,e,l.Group.MarketingExternalActivityTopBar,l.Group.MarketingExternalActivityTopBar)||this;return r.set(n),r}return o(e,t),Object.defineProperty(e.prototype,"buttons",{get:function(){if(this.primary||this.secondary)return{primary:this.primary,secondary:this.secondary}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"buttonsOptions",{get:function(){if(this.primaryOptions||this.secondaryOptions)return{primary:this.primaryOptions,secondary:this.secondaryOptions}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"options",{get:function(){return{title:this.title,status:this.status,saving:this.saving,saved:this.saved,buttons:this.buttonsOptions}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"payload",{get:function(){return i(i({},this.options),{buttons:this.buttons,id:this.id})},enumerable:!1,configurable:!0}),e.prototype.set=function(t,e){void 0===e&&(e=!0);var n=s.getMergedProps(this.options,t),r=n.title,o=n.buttons,i=n.saved,a=n.saving,c=n.status;return this.title=r,this.saving=a,this.saved=i,this.status=c,this.setPrimaryButton(o?o.primary:void 0),this.setSecondaryButtons(o?o.secondary:void 0),e&&this.dispatch(u.UPDATE),this},e.prototype.dispatch=function(t){switch(t){case u.UPDATE:this.app.dispatch(d(this.payload))}return this},e.prototype.getButton=function(t,e,n){return c.getSingleButton(this,t,e,n)},e.prototype.updatePrimaryButton=function(t){this.primary&&s.updateActionFromPayload(this.primary,t)&&this.dispatch(u.UPDATE)},e.prototype.updateSecondaryButtons=function(t){if(this.secondary){var e=this.secondary.find((function(e){return e.id===t.id}));if(e)s.updateActionFromPayload(e,t)&&this.dispatch(u.UPDATE)}},e.prototype.setPrimaryButton=function(t){this.primaryOptions=this.getChildButton(t,this.primaryOptions),this.primary=this.primaryOptions?this.getButton(this.primaryOptions,f.subgroups,this.updatePrimaryButton):void 0},e.prototype.setSecondaryButtons=function(t){var e=this,n=t||[],r=this.secondaryOptions||[];this.secondaryOptions=this.getUpdatedChildActions(n,r),this.secondary=this.secondaryOptions?this.secondaryOptions.map((function(t){return e.getButton(t,f.subgroups,e.updateSecondaryButtons)})):void 0},e.prototype.updateSaving=function(t){this.saving=t,this.dispatch(u.UPDATE)},e.prototype.updateSaved=function(t){this.saved=t,this.dispatch(u.UPDATE)},e.prototype.updateStatus=function(t){this.status=t,this.dispatch(u.UPDATE)},e.prototype.getChildButton=function(t,e){var n=t?[t]:[],r=e?[e]:[],o=this.getUpdatedChildActions(n,r);return o?o[0]:void 0},e}(p.ActionSetWithChildren);e.MarketingExternalActivityTopBar=h,e.create=function(t,e){return new h(t,e)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.fullPageLoad=e.skeletonPageLoad=e.Action=void 0;var r,o=n(1),i=n(0);!function(t){t.SKELETON_PAGE_LOAD="APP::PERFORMANCE::SKELETON_PAGE_LOAD",t.FULL_PAGE_LOAD="APP::PERFORMANCE::FULL_PAGE_LOAD"}(r=e.Action||(e.Action={})),e.skeletonPageLoad=function(){return i.actionWrapper({group:o.Group.Performance,type:r.SKELETON_PAGE_LOAD})},e.fullPageLoad=function(){return i.actionWrapper({group:o.Group.Performance,type:r.FULL_PAGE_LOAD})}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.initializeWebVitals=e.interactionToNextPaint=e.timeToFirstByte=e.firstContentfulPaint=e.cumulativeLayoutShift=e.firstInputDelay=e.largestContentfulPaint=e.Action=void 0;var r,o=n(89),i=n(14),u=n(1),a=n(0),c=n(19);function s(t){return a.actionWrapper({group:u.Group.WebVitals,type:r.LARGEST_CONTENTFUL_PAINT,payload:t})}function p(t){return a.actionWrapper({group:u.Group.WebVitals,type:r.FIRST_INPUT_DELAY,payload:t})}function l(t){return a.actionWrapper({group:u.Group.WebVitals,type:r.CUMULATIVE_LAYOUT_SHIFT,payload:t})}function f(t){return a.actionWrapper({group:u.Group.WebVitals,type:r.FIRST_CONTENTFUL_PAINT,payload:t})}function d(t){return a.actionWrapper({group:u.Group.WebVitals,type:r.TIME_TO_FIRST_BYTE,payload:t})}function h(t){return a.actionWrapper({group:u.Group.WebVitals,type:r.INTERACTION_TO_NEXT_PAINT,payload:t})}!function(t){t.LARGEST_CONTENTFUL_PAINT="APP::WEB_VITALS::LARGEST_CONTENTFUL_PAINT",t.FIRST_INPUT_DELAY="APP::WEB_VITALS::FIRST_INPUT_DELAY",t.CUMULATIVE_LAYOUT_SHIFT="APP::WEB_VITALS::CUMULATIVE_LAYOUT_SHIFT",t.FIRST_CONTENTFUL_PAINT="APP::WEB_VITALS::FIRST_CONTENTFUL_PAINT",t.TIME_TO_FIRST_BYTE="APP::WEB_VITALS::TIME_TO_FIRST_BYTE",t.INTERACTION_TO_NEXT_PAINT="APP::WEB_VITALS::INTERACTION_TO_NEXT_PAINT"}(r=e.Action||(e.Action={})),e.largestContentfulPaint=s,e.firstInputDelay=p,e.cumulativeLayoutShift=l,e.firstContentfulPaint=f,e.timeToFirstByte=d,e.interactionToNextPaint=h,e.initializeWebVitals=function(t){function e(e){return function(n){var r=n.id,o=n.name,i=n.value,u=e({id:r,metricName:o,value:i});t.dispatch(u)}}var n=window;i.isServer||i.isClient&&n.__is_web_vitals_initialized__||c.isMobile()||(n.__is_web_vitals_initialized__=!0,o.onLCP(e(s)),o.onFID(e(p)),o.onCLS(e(l)),o.onFCP(e(f)),o.onTTFB(e(d)),o.onINP(e(h)))}},function(t,e,n){"use strict";n.r(e),n.d(e,"getCLS",(function(){return S})),n.d(e,"getFCP",(function(){return T})),n.d(e,"getFID",(function(){return N})),n.d(e,"getINP",(function(){return K})),n.d(e,"getLCP",(function(){return X})),n.d(e,"getTTFB",(function(){return Y})),n.d(e,"onCLS",(function(){return S})),n.d(e,"onFCP",(function(){return T})),n.d(e,"onFID",(function(){return N})),n.d(e,"onINP",(function(){return K})),n.d(e,"onLCP",(function(){return X})),n.d(e,"onTTFB",(function(){return Y}));var r,o,i,u,a,c=-1,s=function(t){addEventListener("pageshow",(function(e){e.persisted&&(c=e.timeStamp,t(e))}),!0)},p=function(){return window.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]},l=function(){var t=p();return t&&t.activationStart||0},f=function(t,e){var n=p(),r="navigate";return c>=0?r="back-forward-cache":n&&(r=document.prerendering||l()>0?"prerender":document.wasDiscarded?"restore":n.type.replace(/_/g,"-")),{name:t,value:void 0===e?-1:e,rating:"good",delta:0,entries:[],id:"v3-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:r}},d=function(t,e,n){try{if(PerformanceObserver.supportedEntryTypes.includes(t)){var r=new PerformanceObserver((function(t){Promise.resolve().then((function(){e(t.getEntries())}))}));return r.observe(Object.assign({type:t,buffered:!0},n||{})),r}}catch(t){}},h=function(t,e,n,r){var o,i;return function(u){e.value>=0&&(u||r)&&((i=e.value-(o||0))||void 0===o)&&(o=e.value,e.delta=i,e.rating=function(t,e){return t>e[1]?"poor":t>e[0]?"needs-improvement":"good"}(e.value,n),t(e))}},y=function(t){requestAnimationFrame((function(){return requestAnimationFrame((function(){return t()}))}))},v=function(t){var e=function(e){"pagehide"!==e.type&&"hidden"!==document.visibilityState||t(e)};addEventListener("visibilitychange",e,!0),addEventListener("pagehide",e,!0)},b=function(t){var e=!1;return function(n){e||(t(n),e=!0)}},_=-1,A=function(){return"hidden"!==document.visibilityState||document.prerendering?1/0:0},P=function(t){"hidden"===document.visibilityState&&_>-1&&(_="visibilitychange"===t.type?t.timeStamp:0,g())},O=function(){addEventListener("visibilitychange",P,!0),addEventListener("prerenderingchange",P,!0)},g=function(){removeEventListener("visibilitychange",P,!0),removeEventListener("prerenderingchange",P,!0)},E=function(){return _<0&&(_=A(),O(),s((function(){setTimeout((function(){_=A(),O()}),0)}))),{get firstHiddenTime(){return _}}},m=function(t){document.prerendering?addEventListener("prerenderingchange",(function(){return t()}),!0):t()},T=function(t,e){e=e||{},m((function(){var n,r=[1800,3e3],o=E(),i=f("FCP"),u=d("paint",(function(t){t.forEach((function(t){"first-contentful-paint"===t.name&&(u.disconnect(),t.startTime<o.firstHiddenTime&&(i.value=Math.max(t.startTime-l(),0),i.entries.push(t),n(!0)))}))}));u&&(n=h(t,i,r,e.reportAllChanges),s((function(o){i=f("FCP"),n=h(t,i,r,e.reportAllChanges),y((function(){i.value=performance.now()-o.timeStamp,n(!0)}))})))}))},S=function(t,e){e=e||{},T(b((function(){var n,r=[.1,.25],o=f("CLS",0),i=0,u=[],a=function(t){t.forEach((function(t){if(!t.hadRecentInput){var e=u[0],n=u[u.length-1];i&&t.startTime-n.startTime<1e3&&t.startTime-e.startTime<5e3?(i+=t.value,u.push(t)):(i=t.value,u=[t])}})),i>o.value&&(o.value=i,o.entries=u,n())},c=d("layout-shift",a);c&&(n=h(t,o,r,e.reportAllChanges),v((function(){a(c.takeRecords()),n(!0)})),s((function(){i=0,o=f("CLS",0),n=h(t,o,r,e.reportAllChanges),y((function(){return n()}))})),setTimeout(n,0))})))},C={passive:!0,capture:!0},I=new Date,R=function(t,e){r||(r=e,o=t,i=new Date,j(removeEventListener),w())},w=function(){if(o>=0&&o<i-I){var t={entryType:"first-input",name:r.type,target:r.target,cancelable:r.cancelable,startTime:r.timeStamp,processingStart:r.timeStamp+o};u.forEach((function(e){e(t)})),u=[]}},M=function(t){if(t.cancelable){var e=(t.timeStamp>1e12?new Date:performance.now())-t.timeStamp;"pointerdown"==t.type?function(t,e){var n=function(){R(t,e),o()},r=function(){o()},o=function(){removeEventListener("pointerup",n,C),removeEventListener("pointercancel",r,C)};addEventListener("pointerup",n,C),addEventListener("pointercancel",r,C)}(e,t):R(e,t)}},j=function(t){["mousedown","keydown","touchstart","pointerdown"].forEach((function(e){return t(e,M,C)}))},N=function(t,e){e=e||{},m((function(){var n,i=[100,300],a=E(),c=f("FID"),p=function(t){t.startTime<a.firstHiddenTime&&(c.value=t.processingStart-t.startTime,c.entries.push(t),n(!0))},l=function(t){t.forEach(p)},y=d("first-input",l);n=h(t,c,i,e.reportAllChanges),y&&v(b((function(){l(y.takeRecords()),y.disconnect()}))),y&&s((function(){var a;c=f("FID"),n=h(t,c,i,e.reportAllChanges),u=[],o=-1,r=null,j(addEventListener),a=p,u.push(a),w()}))}))},D=0,L=1/0,U=0,B=function(t){t.forEach((function(t){t.interactionId&&(L=Math.min(L,t.interactionId),U=Math.max(U,t.interactionId),D=U?(U-L)/7+1:0)}))},x=function(){return a?D:performance.interactionCount||0},k=function(){"interactionCount"in performance||a||(a=d("event",B,{type:"event",buffered:!0,durationThreshold:0}))},G=0,F=function(){return x()-G},W=[],V={},H=function(t){var e=W[W.length-1],n=V[t.interactionId];if(n||W.length<10||t.duration>e.latency){if(n)n.entries.push(t),n.latency=Math.max(n.latency,t.duration);else{var r={id:t.interactionId,latency:t.duration,entries:[t]};V[r.id]=r,W.push(r)}W.sort((function(t,e){return e.latency-t.latency})),W.splice(10).forEach((function(t){delete V[t.id]}))}},K=function(t,e){e=e||{},m((function(){var n=[200,500];k();var r,o=f("INP"),i=function(t){t.forEach((function(t){t.interactionId&&H(t),"first-input"===t.entryType&&!W.some((function(e){return e.entries.some((function(e){return t.duration===e.duration&&t.startTime===e.startTime}))}))&&H(t)}));var e,n=(e=Math.min(W.length-1,Math.floor(F()/50)),W[e]);n&&n.latency!==o.value&&(o.value=n.latency,o.entries=n.entries,r())},u=d("event",i,{durationThreshold:e.durationThreshold||40});r=h(t,o,n,e.reportAllChanges),u&&(u.observe({type:"first-input",buffered:!0}),v((function(){i(u.takeRecords()),o.value<0&&F()>0&&(o.value=0,o.entries=[]),r(!0)})),s((function(){W=[],G=x(),o=f("INP"),r=h(t,o,n,e.reportAllChanges)})))}))},z={},X=function(t,e){e=e||{},m((function(){var n,r=[2500,4e3],o=E(),i=f("LCP"),u=function(t){var e=t[t.length-1];if(e){var r=Math.max(e.startTime-l(),0);r<o.firstHiddenTime&&(i.value=r,i.entries=[e],n())}},a=d("largest-contentful-paint",u);if(a){n=h(t,i,r,e.reportAllChanges);var c=b((function(){z[i.id]||(u(a.takeRecords()),a.disconnect(),z[i.id]=!0,n(!0))}));["keydown","click"].forEach((function(t){addEventListener(t,c,!0)})),v(c),s((function(o){i=f("LCP"),n=h(t,i,r,e.reportAllChanges),y((function(){i.value=performance.now()-o.timeStamp,z[i.id]=!0,n(!0)}))}))}}))},Y=function(t,e){e=e||{};var n=[800,1800],r=f("TTFB"),o=h(t,r,n,e.reportAllChanges);!function t(e){document.prerendering?m((function(){return t(e)})):"complete"!==document.readyState?addEventListener("load",(function(){return t(e)}),!0):setTimeout(e,0)}((function(){var i=p();if(i){var u=i.responseStart;if(u<=0||u>performance.now())return;r.value=Math.max(u-l(),0),r.entries=[i],o(!0),s((function(){r=f("TTFB",0),(o=h(t,r,n,e.reportAllChanges))(!0)}))}}))}},function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),o=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),o(n(40),e),o(n(91),e)},function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function u(t){try{c(r.next(t))}catch(t){i(t)}}function a(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(u,a)}c((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;u;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return u.label++,{value:i[1],done:!1};case 5:u.label++,r=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!(o=u.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){u=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){u.label=i[1];break}if(6===i[0]&&u.label<o[1]){u.label=o[1],o=i;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(i);break}o[2]&&u.ops.pop(),u.trys.pop();continue}i=e.call(t,u)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.userAuthorizedFetch=void 0;var i=n(40);function u(t){var e=t.headers.get("X-Shopify-API-Request-Failure-Unauthorized");return!!e&&"true"===e.toLowerCase()}e.userAuthorizedFetch=function(t){var e=this,n=t.app,a=t.callbackUri,c=void 0===a?"auth/shopify/callback":a,s=t.isAuthorizationCodeRequired,p=void 0===s?u:s,l=t.fetchOperation;return function(t,u){return r(e,void 0,void 0,(function(){var e,r,a,s,f,d,h;return o(this,(function(o){switch(o.label){case 0:return[4,l(t,u)];case 1:return e=o.sent(),p(e)?[4,i.getAuthorizationCodePayload(n)]:[2,e];case 2:return r=o.sent(),a=r.code,s=r.hmac,f=r.shop,d=r.timestamp,h=encodeURI("https://"+window.location.hostname+"/"+c+"?code="+a+"&hmac="+s+"&shop="+f+"×tamp="+d),[4,l(h,{})];case 3:if(!o.sent().ok)throw new Error("Failed to authorize request.");return[2,l(t,u)]}}))}))}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.useContextualSaveBar=void 0;var r=n(93);Object.defineProperty(e,"useContextualSaveBar",{enumerable:!0,get:function(){return r.useContextualSaveBar}})},function(t,e,n){"use strict";var r=this&&this.__rest||function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};Object.defineProperty(e,"__esModule",{value:!0}),e.useContextualSaveBar=void 0;var o=n(2),i=n(36),u=n(4);e.useContextualSaveBar=function(){var t=u.useAppBridge(),e=o.useRef(!1),n=o.useState(),a=n[0],c=n[1],s=o.useState(),p=s[0],l=s[1],f=o.useMemo((function(){return i.create(t)}),[t]),d=o.useCallback((function(t){t&&f.set(t,!1),f.dispatch(i.Action.SHOW),e.current=!0}),[f]),h=o.useCallback((function(){f.dispatch(i.Action.HIDE),e.current=!1}),[f]),y=o.useMemo((function(){return{setOptions:function(t){var n=t.onAction,o=r(t,["onAction"]),i=JSON.stringify(f.options.saveAction)!==JSON.stringify(o)&&e.current;c((function(){return n})),f.set({saveAction:o},i)}}}),[f]),v=o.useMemo((function(){return{setOptions:function(t){var n=t.onAction,o=r(t,["onAction"]),i=JSON.stringify(f.options.discardAction)!==JSON.stringify(o)&&e.current;l((function(){return n})),f.set({discardAction:o},i)}}}),[f]);return o.useEffect((function(){return function(){e.current&&h()}}),[]),o.useEffect((function(){return f.subscribe(i.Action.DISCARD,(function(){null==p||p()}))}),[f,p]),o.useEffect((function(){return f.subscribe(i.Action.SAVE,(function(){null==a||a()}))}),[f,a]),{show:d,hide:h,saveAction:y,discardAction:v}}},function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function u(t){try{c(r.next(t))}catch(t){i(t)}}function a(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(u,a)}c((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;u;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return u.label++,{value:i[1],done:!1};case 5:u.label++,r=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!(o=u.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){u=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){u.label=i[1];break}if(6===i[0]&&u.label<o[1]){u.label=o[1],o=i;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(i);break}o[2]&&u.ops.pop(),u.trys.pop();continue}i=e.call(t,u)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.useFeaturesAvailable=void 0;var i=n(2),u=n(20),a=n(4);e.useFeaturesAvailable=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var c=a.useAppBridge(),s=i.useState(),p=s[0],l=s[1],f=i.useRef([]),d=i.useCallback((function(){var e=!1;return r(t,void 0,void 0,(function(){var t;return o(this,(function(n){switch(n.label){case 0:return[4,c.featuresAvailable.apply(c,f.current)];case 1:return t=n.sent(),e||l((function(e){return JSON.stringify(e)===JSON.stringify(t)?e:t})),[2]}}))})),function(){e=!0}}),[c]);return i.useEffect((function(){return f.current=e,d()}),[JSON.stringify(e)]),i.useEffect((function(){var t,e=c.subscribe(u.Action.UPDATE,(function(){t=d()}));return function(){e(),null==t||t()}}),[c,d]),p}},function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),o=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),o(n(96),e)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.useFeatureRequest=void 0;var r=n(2),o=n(32),i=n(4),u=n(41);e.useFeatureRequest=function(t,e){var n=i.useAppBridge(),a=u.useFeaturesAvailable(),c=r.useState(),s=c[0],p=c[1],l=r.useCallback((function(n){var r=null==n?void 0:n[t];if(e&&(null==r?void 0:r[e])){var o=null==r?void 0:r[e];p((function(t){return JSON.stringify(o)!==JSON.stringify(t)?o:t}))}else p((function(t){return JSON.stringify(r)!==JSON.stringify(t)?r:t}))}),[t,e]);return r.useEffect((function(){o.create(n).dispatch(o.Action.REQUEST,{feature:t,action:e})}),[n,t,e]),r.useEffect((function(){l(a)}),[a,l]),s}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.useLocale=void 0;var r=n(98);Object.defineProperty(e,"useLocale",{enumerable:!0,get:function(){return r.useLocale}})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.useLocale=void 0;var r=n(24);e.useLocale=function(){return r.useAppBridgeState("staffMember.locale")}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.useNavigate=void 0;var r=n(100);Object.defineProperty(e,"useNavigate",{enumerable:!0,get:function(){return r.useNavigate}})},function(t,e,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.useNavigate=void 0;var o=n(2),i=n(16),u=n(4),a=n(42);e.useNavigate=function(){var t=u.useAppBridge(),e=a.useNavigationHistory(),n=o.useMemo((function(){return i.create(t)}),[t]),c=o.useCallback((function(r,o){var u=i.normalizeUrl(r),a=u.startsWith(t.localOrigin),c=u.startsWith(t.hostOrigin),s=u.startsWith("/");if(a||c||s){var p=i.getRelativePath(u);return c||"new"===(null==o?void 0:o.target)||"host"===(null==o?void 0:o.target)?void n.dispatch(i.Action.ADMIN_PATH,{path:p.replace(/^\/admin/,""),newContext:"new"===(null==o?void 0:o.target)}):"self"!==(null==o?void 0:o.target)&&(null==o?void 0:o.target)||!(null==o?void 0:o.replace)?void n.dispatch(i.Action.APP,p):void e.replace({pathname:p})}n.dispatch(i.Action.REMOTE,{url:u,newContext:"new"===(null==o?void 0:o.target)})}),[n,e]);return o.useCallback((function(t,e){if(i.isAdminSection(t)){var o=r(r({},t),{name:i.ResourceType[t.name]});n.dispatch(i.Action.ADMIN_SECTION,{section:o,newContext:"new"===(null==e?void 0:e.target)})}else c(t,e)}),[c,n])}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.useNavigationHistory=void 0;var r=n(2),o=n(8),i=n(4);e.useNavigationHistory=function(){var t=i.useAppBridge();return r.useMemo((function(){var e=o.History.create(t);return{push:function(t){e.dispatch(o.History.Action.PUSH,t.pathname)},replace:function(t){e.dispatch(o.History.Action.REPLACE,t.pathname)}}}),[])}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.useToast=void 0;var r=n(103);Object.defineProperty(e,"useToast",{enumerable:!0,get:function(){return r.useToast}})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.useToast=e.DEFAULT_TOAST_DURATION=void 0;var r=n(2),o=n(15),i=n(4);e.DEFAULT_TOAST_DURATION=5e3,e.useToast=function(){var t=i.useAppBridge(),n=r.useRef([]),u=r.useCallback((function(r,i){var u=o.create(t,{message:r,isError:null==i?void 0:i.isError,duration:(null==i?void 0:i.duration)||e.DEFAULT_TOAST_DURATION,action:null==i?void 0:i.action});u.dispatch(o.Action.SHOW),n.current.push(u),u.subscribe(o.Action.CLEAR,(function(){var t;null===(t=null==i?void 0:i.onDismiss)||void 0===t||t.call(i),n.current.splice(n.current.indexOf(u),1),u.unsubscribe()})),u.subscribe(o.Action.ACTION,(function(){var t,e;null===(e=null===(t=null==i?void 0:i.action)||void 0===t?void 0:t.onAction)||void 0===e||e.call(t)}))}),[t]);return r.useEffect((function(){return function(){n.current.forEach((function(t){return null==t?void 0:t.unsubscribe()}))}}),[]),{show:u}}},function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var o=r(n(105));e.default=o.default},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var u=i(n(2)),a=n(8),c=n(5),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.componentDidMount=function(){var t=this.context;this.loading=a.Loading.create(t),null!=this.loading&&this.loading.dispatch(a.Loading.Action.START)},e.prototype.componentWillUnmount=function(){null!=this.loading&&this.loading.dispatch(a.Loading.Action.STOP)},e.prototype.render=function(){return null},e.contextType=c.AppBridgeContext,e}(u.default.Component);e.default=s},function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Props=e.ModalContent=void 0;var o=r(n(43)),i=n(107);Object.defineProperty(e,"ModalContent",{enumerable:!0,get:function(){return r(i).default}});var u=n(43);Object.defineProperty(e,"Props",{enumerable:!0,get:function(){return u.Props}}),e.default=o.default},function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var o=r(n(108));e.default=o.default},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var u=i(n(2)),a=n(8),c=n(5),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.componentDidMount=function(){var t=this.context;this.modalContent=a.ModalContent.create(t),this.syncLoadingStatus()},e.prototype.componentDidUpdate=function(){this.syncLoadingStatus()},e.prototype.syncLoadingStatus=function(){this.modalContent&&(this.props.loading?this.modalContent.loading():this.modalContent.loaded())},e.prototype.render=function(){return null},e.contextType=c.AppBridgeContext,e}(u.default.Component);e.default=s},function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Props=void 0;var o=r(n(45)),i=n(45);Object.defineProperty(e,"Props",{enumerable:!0,get:function(){return i.Props}}),e.default=o.default},function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Props=void 0;var o=r(n(46)),i=n(46);Object.defineProperty(e,"Props",{enumerable:!0,get:function(){return i.Props}}),e.default=o.default},function(t,e,n){t.exports=n(112)},function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),o=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=n(47);Object.defineProperty(e,"default",{enumerable:!0,get:function(){return i.createApp}}),o(n(13),e),o(n(47),e)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.mockAppBridge=e.serverAppBridge=void 0;var r=n(7),o=function(){},i=new Promise((function(){}));e.serverAppBridge={dispatch:function(){return{}},error:function(){return o},featuresAvailable:function(){return Promise.reject(r.fromAction("Feature detection is only available on the client side.",r.AppActionType.WINDOW_UNDEFINED))},getState:function(){return Promise.reject(r.fromAction("State is only available on the client side.",r.AppActionType.WINDOW_UNDEFINED))},localOrigin:"",hostOrigin:"",subscribe:function(){return o}},e.mockAppBridge={dispatch:function(){return{}},error:function(){return o},featuresAvailable:function(){return i},getState:function(){return i},localOrigin:"",hostOrigin:"",subscribe:function(){return o}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.handleAppPrint=void 0;var r=n(49);function o(){var t;null===(t=r.getWindow())||void 0===t||t.print()}function i(){var t=function(){var t=r.getWindow();if(t&&t.document&&t.document.body){var e=t.document.createElement("input");return e.style.display="none",t.document.body.appendChild(e),e}}();t&&(t.select(),o(),t.remove())}e.handleAppPrint=function(){navigator.userAgent.indexOf("iOS")>=0?i():o()}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(18),o=function(){function t(){this.map={}}return t.prototype.set=function(t,e){Object.prototype.hasOwnProperty.call(this.map,t)||(this.map[t]=[]);var n={handler:e,remove:function(){}},o=r.addAndRemoveFromCollection(this.map[t],n);return n={handler:e,remove:o},o},t.prototype.get=function(t){var e=this.map[t];return e?e.map((function(t){return t.handler})):void 0},t.prototype.run=function(t,e,n){for(var r=[],o=3;o<arguments.length;o++)r[o-3]=arguments[o];var i=0,u=this.get(t)||[];function a(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var o=u[i++];return o?o(a).apply(n,t):e.apply(n,t)}return a.apply(n,r)},t}();e.default=o},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var u=i(n(2)),a=n(5),c=n(21),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.componentDidMount=function(){var t=this.props.history;this.unsubscribe=c.handleRouteChange(this.context,t)},e.prototype.componentWillUnmount=function(){this.unsubscribe&&this.unsubscribe()},e.prototype.render=function(){return null},e.contextType=a.AppBridgeContext,e}(u.default.Component);e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(2),o=n(4),i=n(21);e.default=function(t){var e=o.useAppBridge();r.useEffect((function(){return i.handleRouteChange(e,t)}),[e,t])}},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var u=i(n(2)),a=n(5),c=n(22),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.componentDidMount=function(){var t=this.props.location;c.updateHistory(this.context,t)},e.prototype.componentDidUpdate=function(t){var e=t.location,n=this.props.location;n!==e&&c.updateHistory(this.context,n)},e.prototype.render=function(){return null},e.contextType=a.AppBridgeContext,e}(u.default.Component);e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getOrigin=e.getTopWindow=e.getSelfWindow=void 0,e.getSelfWindow=function(){return window.self},e.getTopWindow=function(){return window.top},e.getOrigin=function(){return location.origin}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(2),o=n(4),i=n(22);e.default=function(t){var e=o.useAppBridge();r.useEffect((function(){i.updateHistory(e,t)}),[e,t])}},function(t){t.exports=JSON.parse('{"name":"@shopify/app-bridge-react","version":"3.7.2","types":"index.d.ts","main":"index.js","unpkg":"umd/index.js","jsdelivr":"umd/index.js","files":["/components/","/umd/","/hooks/","/utilities/","/context.d.ts","/context.js","/index.d.ts","/index.js","/types.d.ts","/types.js","/useAppBridge.d.ts","/useAppBridge.js"],"private":false,"publishConfig":{"access":"public","@shopify:registry":"https://registry.npmjs.org"},"repository":"git@github.com:Shopify/app-bridge.git","homepage":"https://shopify.dev/tools/app-bridge/react-components","author":"Shopify Inc.","license":"MIT","scripts":{"build":"yarn build:tsc && yarn build:umd","build:tsc":"NODE_ENV=production tsc","build:umd":"NODE_ENV=production webpack -p","check":"tsc","clean":"cat package.json | node -pe \\"JSON.parse(require(\'fs\').readFileSync(\'/dev/stdin\').toString()).files.map(f => \'./\'+f).join(\' \')\\" | xargs rm -rf","pack":"yarn pack","size":"size-limit"},"sideEffects":false,"size-limit":[{"limit":"32 KB","path":"index.js"}],"dependencies":{"@shopify/app-bridge":"^3.7.2"},"devDependencies":{"@shopify/react-testing":"^4.1.1","@types/react":"^18.0.2","react-dom":"^18.2.0"},"peerDependencies":{"react":"^16.0.0 || ^17.0.0 || ^18.0.0"}}')},function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Props=void 0;var o=r(n(52)),i=n(52);Object.defineProperty(e,"Props",{enumerable:!0,get:function(){return i.Props}}),e.default=o.default},function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Props=void 0;var o=r(n(53)),i=n(53);Object.defineProperty(e,"Props",{enumerable:!0,get:function(){return i.Props}}),e.default=o.default},function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Props=void 0;var o=r(n(54)),i=n(54);Object.defineProperty(e,"Props",{enumerable:!0,get:function(){return i.Props}}),e.default=o.default},function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Props=void 0;var o=r(n(55)),i=n(55);Object.defineProperty(e,"Props",{enumerable:!0,get:function(){return i.Props}}),e.default=o.default}])}));
|
|
10
|
+
*/var r=Symbol.for("react.element"),o=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),u=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),c=Symbol.for("react.provider"),s=Symbol.for("react.context"),p=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),h=Symbol.iterator;var y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},b=Object.assign,v={};function P(t,e,n){this.props=t,this.context=e,this.refs=v,this.updater=n||y}function A(){}function O(t,e,n){this.props=t,this.context=e,this.refs=v,this.updater=n||y}P.prototype.isReactComponent={},P.prototype.setState=function(t,e){if("object"!=typeof t&&"function"!=typeof t&&null!=t)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,t,e,"setState")},P.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")},A.prototype=P.prototype;var _=O.prototype=new A;_.constructor=O,b(_,P.prototype),_.isPureReactComponent=!0;var g=Array.isArray,m=Object.prototype.hasOwnProperty,E={current:null},T={key:!0,ref:!0,__self:!0,__source:!0};function S(t,e,n){var o,i={},u=null,a=null;if(null!=e)for(o in void 0!==e.ref&&(a=e.ref),void 0!==e.key&&(u=""+e.key),e)m.call(e,o)&&!T.hasOwnProperty(o)&&(i[o]=e[o]);var c=arguments.length-2;if(1===c)i.children=n;else if(1<c){for(var s=Array(c),p=0;p<c;p++)s[p]=arguments[p+2];i.children=s}if(t&&t.defaultProps)for(o in c=t.defaultProps)void 0===i[o]&&(i[o]=c[o]);return{$$typeof:r,type:t,key:u,ref:a,props:i,_owner:E.current}}function j(t){return"object"==typeof t&&null!==t&&t.$$typeof===r}var C=/\/+/g;function M(t,e){return"object"==typeof t&&null!==t&&null!=t.key?function(t){var e={"=":"=0",":":"=2"};return"$"+t.replace(/[=:]/g,(function(t){return e[t]}))}(""+t.key):e.toString(36)}function I(t,e,n,i,u){var a=typeof t;"undefined"!==a&&"boolean"!==a||(t=null);var c=!1;if(null===t)c=!0;else switch(a){case"string":case"number":c=!0;break;case"object":switch(t.$$typeof){case r:case o:c=!0}}if(c)return u=u(c=t),t=""===i?"."+M(c,0):i,g(u)?(n="",null!=t&&(n=t.replace(C,"$&/")+"/"),I(u,e,n,"",(function(t){return t}))):null!=u&&(j(u)&&(u=function(t,e){return{$$typeof:r,type:t.type,key:e,ref:t.ref,props:t.props,_owner:t._owner}}(u,n+(!u.key||c&&c.key===u.key?"":(""+u.key).replace(C,"$&/")+"/")+t)),e.push(u)),1;if(c=0,i=""===i?".":i+":",g(t))for(var s=0;s<t.length;s++){var p=i+M(a=t[s],s);c+=I(a,e,n,p,u)}else if("function"==typeof(p=function(t){return null===t||"object"!=typeof t?null:"function"==typeof(t=h&&t[h]||t["@@iterator"])?t:null}(t)))for(t=p.call(t),s=0;!(a=t.next()).done;)c+=I(a=a.value,e,n,p=i+M(a,s++),u);else if("object"===a)throw e=String(t),Error("Objects are not valid as a React child (found: "+("[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e)+"). If you meant to render a collection of children, use an array instead.");return c}function R(t,e,n){if(null==t)return t;var r=[],o=0;return I(t,r,"","",(function(t){return e.call(n,t,o++)})),r}function w(t){if(-1===t._status){var e=t._result;(e=e()).then((function(e){0!==t._status&&-1!==t._status||(t._status=1,t._result=e)}),(function(e){0!==t._status&&-1!==t._status||(t._status=2,t._result=e)})),-1===t._status&&(t._status=0,t._result=e)}if(1===t._status)return t._result.default;throw t._result}var N={current:null},L={transition:null},D={ReactCurrentDispatcher:N,ReactCurrentBatchConfig:L,ReactCurrentOwner:E};e.Children={map:R,forEach:function(t,e,n){R(t,(function(){e.apply(this,arguments)}),n)},count:function(t){var e=0;return R(t,(function(){e++})),e},toArray:function(t){return R(t,(function(t){return t}))||[]},only:function(t){if(!j(t))throw Error("React.Children.only expected to receive a single React element child.");return t}},e.Component=P,e.Fragment=i,e.Profiler=a,e.PureComponent=O,e.StrictMode=u,e.Suspense=l,e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=D,e.cloneElement=function(t,e,n){if(null==t)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+t+".");var o=b({},t.props),i=t.key,u=t.ref,a=t._owner;if(null!=e){if(void 0!==e.ref&&(u=e.ref,a=E.current),void 0!==e.key&&(i=""+e.key),t.type&&t.type.defaultProps)var c=t.type.defaultProps;for(s in e)m.call(e,s)&&!T.hasOwnProperty(s)&&(o[s]=void 0===e[s]&&void 0!==c?c[s]:e[s])}var s=arguments.length-2;if(1===s)o.children=n;else if(1<s){c=Array(s);for(var p=0;p<s;p++)c[p]=arguments[p+2];o.children=c}return{$$typeof:r,type:t.type,key:i,ref:u,props:o,_owner:a}},e.createContext=function(t){return(t={$$typeof:s,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:c,_context:t},t.Consumer=t},e.createElement=S,e.createFactory=function(t){var e=S.bind(null,t);return e.type=t,e},e.createRef=function(){return{current:null}},e.forwardRef=function(t){return{$$typeof:p,render:t}},e.isValidElement=j,e.lazy=function(t){return{$$typeof:d,_payload:{_status:-1,_result:t},_init:w}},e.memo=function(t,e){return{$$typeof:f,type:t,compare:void 0===e?null:e}},e.startTransition=function(t){var e=L.transition;L.transition={};try{t()}finally{L.transition=e}},e.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")},e.useCallback=function(t,e){return N.current.useCallback(t,e)},e.useContext=function(t){return N.current.useContext(t)},e.useDebugValue=function(){},e.useDeferredValue=function(t){return N.current.useDeferredValue(t)},e.useEffect=function(t,e){return N.current.useEffect(t,e)},e.useId=function(){return N.current.useId()},e.useImperativeHandle=function(t,e,n){return N.current.useImperativeHandle(t,e,n)},e.useInsertionEffect=function(t,e){return N.current.useInsertionEffect(t,e)},e.useLayoutEffect=function(t,e){return N.current.useLayoutEffect(t,e)},e.useMemo=function(t,e){return N.current.useMemo(t,e)},e.useReducer=function(t,e,n){return N.current.useReducer(t,e,n)},e.useRef=function(t){return N.current.useRef(t)},e.useState=function(t){return N.current.useState(t)},e.useSyncExternalStore=function(t,e,n){return N.current.useSyncExternalStore(t,e,n)},e.useTransition=function(){return N.current.useTransition()},e.version="18.2.0"},function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),o=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||r(e,t,n)},i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.unstable_Picker=e.ToastProps=e.Toast=e.TitleBar=e.ResourcePickerProps=e.ResourcePicker=e.ProviderProps=e.Provider=e.NavigationMenuProps=e.NavigationMenu=e.ModalContent=e.ModalProps=e.Modal=e.Loading=e.ContextualSaveBarProps=e.ContextualSaveBar=void 0;var u=n(85);Object.defineProperty(e,"ContextualSaveBar",{enumerable:!0,get:function(){return i(u).default}}),Object.defineProperty(e,"ContextualSaveBarProps",{enumerable:!0,get:function(){return u.Props}});var a=n(146);Object.defineProperty(e,"Loading",{enumerable:!0,get:function(){return i(a).default}});var c=n(148);Object.defineProperty(e,"Modal",{enumerable:!0,get:function(){return i(c).default}}),Object.defineProperty(e,"ModalProps",{enumerable:!0,get:function(){return c.Props}}),Object.defineProperty(e,"ModalContent",{enumerable:!0,get:function(){return c.ModalContent}});var s=n(151);Object.defineProperty(e,"NavigationMenu",{enumerable:!0,get:function(){return i(s).default}}),Object.defineProperty(e,"NavigationMenuProps",{enumerable:!0,get:function(){return s.Props}});var p=n(152);Object.defineProperty(e,"Provider",{enumerable:!0,get:function(){return i(p).default}}),Object.defineProperty(e,"ProviderProps",{enumerable:!0,get:function(){return p.Props}});var l=n(165);Object.defineProperty(e,"ResourcePicker",{enumerable:!0,get:function(){return i(l).default}}),Object.defineProperty(e,"ResourcePickerProps",{enumerable:!0,get:function(){return l.Props}});var f=n(166);Object.defineProperty(e,"TitleBar",{enumerable:!0,get:function(){return i(f).default}});var d=n(167);Object.defineProperty(e,"Toast",{enumerable:!0,get:function(){return i(d).default}}),Object.defineProperty(e,"ToastProps",{enumerable:!0,get:function(){return d.Props}});var h=n(168);Object.defineProperty(e,"unstable_Picker",{enumerable:!0,get:function(){return i(h).default}}),o(n(77),e),o(n(76),e)},function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),o=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&r(e,t,n);return o(e,t),e};Object.defineProperty(e,"__esModule",{value:!0}),e.Props=void 0;var u=i(n(86));Object.defineProperty(e,"Props",{enumerable:!0,get:function(){return u.Props}}),e.default=u.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(2),o=n(30);e.default=function(t){var e=t.discardAction,n=void 0===e?{}:e,i=t.saveAction,u=void 0===i?{}:i,a=t.fullWidth,c=t.leaveConfirmationDisable,s=t.visible,p=o.useContextualSaveBar(),l=p.show,f=p.hide,d=p.saveAction.setOptions,h=p.discardAction.setOptions;return r.useEffect((function(){d(u)}),[u]),r.useEffect((function(){h(n)}),[n]),r.useEffect((function(){s?l({fullWidth:a,leaveConfirmationDisable:c}):f()}),[a,c,s]),null}},function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function u(t){try{c(r.next(t))}catch(t){i(t)}}function a(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(u,a)}c((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;u;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return u.label++,{value:i[1],done:!1};case 5:u.label++,r=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!(o=u.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){u=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){u.label=i[1];break}if(6===i[0]&&u.label<o[1]){u.label=o[1],o=i;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(i);break}o[2]&&u.ops.pop(),u.trys.pop();continue}i=e.call(t,u)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.useAppBridgeState=void 0;var i=n(2),u=n(4);e.useAppBridgeState=function(t){var e=u.useAppBridge(),n=i.useState(),a=n[0],c=n[1],s=i.useRef(!1),p=i.useCallback((function(){return r(void 0,void 0,void 0,(function(){var n,r;return o(this,(function(o){switch(o.label){case 0:return t?[4,e.getState(t)]:[3,2];case 1:return r=o.sent(),[3,4];case 2:return[4,e.getState()];case 3:r=o.sent(),o.label=4;case 4:return n=r,s.current?[2]:(c((function(t){return JSON.stringify(n)===JSON.stringify(t)?t:n})),[2])}}))}))}),[e,t]);return i.useEffect((function(){return p(),e.subscribe((function(){p()}))}),[e,p]),i.useEffect((function(){return function(){s.current=!0}}),[e]),a}},function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),o=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),o(n(89),e)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.useAuthenticatedFetch=void 0;var r=n(2),o=n(90),i=n(4);e.useAuthenticatedFetch=function(t){void 0===t&&(t=void 0);var e=i.useAppBridge();return r.useMemo((function(){return o.authenticatedFetch(e,t)}),[e,t])}},function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),o=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),o(n(91),e),o(n(22),e),o(n(95),e),o(n(131),e)},function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function u(t){try{c(r.next(t))}catch(t){i(t)}}function a(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(u,a)}c((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;u;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return u.label++,{value:i[1],done:!1};case 5:u.label++,r=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!(o=u.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){u=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){u.label=i[1];break}if(6===i[0]&&u.label<o[1]){u.label=o[1],o=i;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(i);break}o[2]&&u.ops.pop(),u.trys.pop();continue}i=e.call(t,u)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.createMutationObserver=e.setupModalAutoSizing=void 0;var i=n(18),u=n(13),a=n(22),c="app-bridge-utils-modal-auto-size",s=function(){if("undefined"==typeof document)return null;var t=document.createElement("style");return t.type="text/css",t.innerHTML="."+c+" { overflow: hidden; height: auto; min-height: auto; }",t}();function p(t,e){if("undefined"!=typeof document){var n,r=-1,o=new MutationObserver((function(){n&&window.clearTimeout(n);n=window.setTimeout(u,16)}));return o.observe(document,{attributes:!0,attributeOldValue:!1,characterData:!0,characterDataOldValue:!1,childList:!0,subtree:!0}),u(),o}function u(){var n=document.body.scrollHeight;n!==r&&(r=n,t.dispatch(i.updateModalSize({id:e,height:String(n)})))}}e.setupModalAutoSizing=function(t){return r(this,void 0,void 0,(function(){function e(){r&&(r(),r=void 0)}function n(n){var o=n.context,i=n.modal.id;return a.isMobile()||o!==u.Context.Modal?(e(),e):(r||(r=function(t,e){if(!s)return function(){};var n=document.getElementsByTagName("head")[0],r=document.body.classList;n.appendChild(s),r.add(c);var o=p(t,e);return function(){r.remove(c),n.contains(s)&&n.removeChild(s),o&&o.disconnect()}}(t,i)),e)}var r;return o(this,(function(r){switch(r.label){case 0:return[4,t.getState().then(n)];case 1:return r.sent(),[2,e]}}))}))},e.createMutationObserver=p},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function t(e,n){if(null==n)return n;if(void 0===e||!Object.prototype.isPrototypeOf.call(Object.getPrototypeOf(e),n)||"Object"!==n.constructor.name&&"Array"!==n.constructor.name)return n;var r={};return Object.keys(n).forEach((function(o){Object.prototype.hasOwnProperty.call(e,o)?"object"!=typeof e[o]||Array.isArray(e[o])?r[o]=n[o]:r[o]=t(e[o],n[o]):r[o]=n[o]})),Object.keys(e).forEach((function(t){Object.prototype.hasOwnProperty.call(n,t)||(r[t]=e[t])})),Object.setPrototypeOf(r,Object.getPrototypeOf(e)),r}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createTransportListener=e.fromWindow=e.fromFrame=e.Context=void 0;var r=n(11),o=n(34),i=n(10),u=n(20),a=n(21);!function(t){t.Modal="Modal",t.Main="Main"}(e.Context||(e.Context={})),e.fromFrame=function(t,e,n){var i=[],c=t.host,s=t.window;if(!c)throw r.fromAction("App frame is undefined",r.AppActionType.WINDOW_UNDEFINED);return a.isUnframed&&window.MobileWebView&&Object.assign(window.MobileWebView,{postMessageToIframe:function(t,e){null==s||s.postMessage(t,e),function(t){return null!==t&&"object"==typeof t&&!Array.isArray(t)&&"dispatch"===t.type&&"object"==typeof t.payload}(t)&&c.postMessage(JSON.stringify(t.payload),location.origin)},updateIframeUrl:function(n){var r=window.location,o=(t.window||{}).location;try{new URL(n).origin===e&&o?o.replace(n):r.href=n}catch(t){}}}),c.addEventListener("message",(function(t){if(t.source!==c&&o.isAppMessage(t))if(t.origin===e)if(a.isUnframed&&window.MobileWebView){p=JSON.stringify({id:"unframed://fromClient",origin:e,data:t.data});window.MobileWebView.postMessage(p)}else for(var n=0,u=i;n<u.length;n++){(0,u[n])(t)}else{var p,l="Message origin '"+t.origin+"' does not match app origin '"+e+"'.",f={type:"dispatch",payload:p=r.invalidOriginAction(l)};null==s||s.postMessage(f,t.origin)}})),{context:n,localOrigin:e,frameWindow:s,hostFrame:c,dispatch:function(t){null==s||s.postMessage(t,e)},subscribe:function(t){return u.addAndRemoveFromCollection(i,t)}}},e.fromWindow=function(t,e){var n=[];return void 0!==typeof window&&window.addEventListener("message",(function(e){if((window!==t||a.isUnframed)&&e.source===t&&(o.isAppBridgeAction(e.data.payload)||o.isAppMessage(e)))for(var r=0,i=n;r<i.length;r++){(0,i[r])(e)}})),{localOrigin:e,hostFrame:t,dispatch:function(n){var r;if(null===(r=n.source)||void 0===r?void 0:r.host)if(a.isUnframed&&window&&window.MobileWebView){var o=JSON.stringify({id:"unframed://fromClient",origin:e,data:n});window.MobileWebView.postMessage(o)}else{var i=new URL("https://"+n.source.host).origin;t.postMessage(n,i)}},subscribe:function(t){return u.addAndRemoveFromCollection(n,t)}}},e.createTransportListener=function(){var t=[],e={};return{createSubscribeHandler:function(n){return function(){if(arguments.length<2)return u.addAndRemoveFromCollection(t,{callback:arguments[0]});var r=Array.from(arguments),o=r[0],a=r[1],c=r[2],s={callback:a,id:c},p={type:o,id:c};return Object.prototype.hasOwnProperty.call(e,o)||(e[o]=[]),n&&n(i.MessageType.Subscribe,p),u.addAndRemoveFromCollection(e[o],s,(function(){n&&n(i.MessageType.Unsubscribe,p)}))}},handleMessage:function(e){t.forEach((function(t){return t.callback(e)}))},handleActionDispatch:function(t){var n=t.type,r=t.payload,o=!1;if(Object.prototype.hasOwnProperty.call(e,n))for(var i=0,u=e[n];i<u.length;i++){var a=u[i],c=a.id,s=a.callback;!(r&&r.id===c)&&c||(s(r),o=!0)}return o}}}},function(t,e){var n,r,o=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function u(){throw new Error("clearTimeout has not been defined")}function a(t){if(n===setTimeout)return setTimeout(t,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(t){n=i}try{r="function"==typeof clearTimeout?clearTimeout:u}catch(t){r=u}}();var c,s=[],p=!1,l=-1;function f(){p&&c&&(p=!1,c.length?s=c.concat(s):l=-1,s.length&&d())}function d(){if(!p){var t=a(f);p=!0;for(var e=s.length;e;){for(c=s,s=[];++l<e;)c&&c[l].run();l=-1,e=s.length}c=null,p=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===u||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function h(t,e){this.fun=t,this.array=e}function y(){}o.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];s.push(new h(t,e)),1!==s.length||p||a(d)},h.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=y,o.addListener=y,o.once=y,o.off=y,o.removeListener=y,o.removeAllListeners=y,o.emit=y,o.prependListener=y,o.prependOnceListener=y,o.listeners=function(t){return[]},o.binding=function(t){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(t){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),o=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),o(n(35),e),o(n(96),e)},function(t,e,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},o=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function u(t){try{c(r.next(t))}catch(t){i(t)}}function a(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(u,a)}c((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;u;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return u.label++,{value:i[1],done:!1};case 5:u.label++,r=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!(o=u.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){u=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){u.label=i[1];break}if(6===i[0]&&u.label<o[1]){u.label=o[1],o=i;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(i);break}o[2]&&u.ops.pop(),u.trys.pop();continue}i=e.call(t,u)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.authenticatedFetch=void 0;var u=n(6),a=n(35);e.authenticatedFetch=function(t,e){var n=this;return void 0===e&&(e=void 0),function(c,s){return void 0===s&&(s={}),o(n,void 0,void 0,(function(){var n,o,p,l,f,d,h,y;return i(this,(function(i){switch(i.label){case 0:return[4,a.getSessionToken(t)];case 1:return n=i.sent(),(o=new Headers(s.headers)).append("Authorization","Bearer "+n),o.append("X-Requested-With","XMLHttpRequest"),p={},o.forEach((function(t,e){p[e]=t})),l="object"==typeof e?e:void 0,[4,("function"==typeof e?e:null!==(y=null==l?void 0:l.fetchOperation)&&void 0!==y?y:fetch)(c,r(r({},s),{headers:p}))];case 2:return f=i.sent(),l&&(d=l.reauthorizeUrl,h=l.requestFailureReauthorizeUrlHeader,f.headers.forEach((function(e,n){if(h.toLowerCase()===n.toLowerCase()){var r=new URL(d||e,location.href).href,o=u.Redirect.create(t);r?o.dispatch(u.Redirect.Action.REMOTE,r):console.warn("Couldn't find a fallback auth path to redirect to.")}}))),[2,f]}}))}))}}},function(t){t.exports=JSON.parse('{"name":"@shopify/app-bridge","version":"3.7.3","types":"index.d.ts","main":"index.js","unpkg":"umd/index.js","jsdelivr":"umd/index.js","files":["/actions/","/client/","/umd/","/utilities/","/util/","/validate/","/development.d.ts","/development.js","/index.d.ts","/index.js","/MessageTransport.d.ts","/MessageTransport.js","/production.d.ts","/production.js"],"private":false,"publishConfig":{"access":"public","@shopify:registry":"https://registry.npmjs.org"},"repository":"git@github.com:Shopify/app-bridge.git","homepage":"https://shopify.dev/tools/app-bridge","author":"Shopify Inc.","license":"MIT","scripts":{"build":"yarn build:tsc && yarn build:npm && yarn build:umd","build:tsc":"NODE_ENV=production tsc","build:umd":"NODE_ENV=production webpack -p","build:npm":"shx cp -r ./npm/index.js ./index.js","check":"tsc","clean":"yarn clean:tsc && yarn clean:npm && yarn clean:umd","clean:tsc":"NODE_ENV=production tsc --build --clean","clean:umd":"rm -rf ./umd","clean:npm":"rm -rf ./index.js","pack":"yarn pack","size":"size-limit"},"sideEffects":false,"size-limit":[{"limit":"10.5 KB","path":"production.js"}],"dependencies":{"@shopify/app-bridge-core":"^1.0.0","base64url":"^3.0.1","web-vitals":"^3.0.1"},"devDependencies":{"@types/node":"^10.12.5","shx":"^0.3.3"}}')},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.setLineItemProperties=e.removeLineItemDiscount=e.setLineItemDiscount=e.removeLineItem=e.updateLineItem=e.addLineItem=e.removeProperties=e.setProperties=e.setDiscount=e.updateCustomerAddress=e.addCustomerAddress=e.setCustomer=e.update=e.fetch=e.Cart=e.Action=void 0;var r=n(99);Object.defineProperty(e,"Action",{enumerable:!0,get:function(){return r.Action}}),Object.defineProperty(e,"Cart",{enumerable:!0,get:function(){return r.Cart}}),Object.defineProperty(e,"fetch",{enumerable:!0,get:function(){return r.fetch}}),Object.defineProperty(e,"update",{enumerable:!0,get:function(){return r.update}}),Object.defineProperty(e,"setCustomer",{enumerable:!0,get:function(){return r.setCustomer}}),Object.defineProperty(e,"addCustomerAddress",{enumerable:!0,get:function(){return r.addCustomerAddress}}),Object.defineProperty(e,"updateCustomerAddress",{enumerable:!0,get:function(){return r.updateCustomerAddress}}),Object.defineProperty(e,"setDiscount",{enumerable:!0,get:function(){return r.setDiscount}}),Object.defineProperty(e,"setProperties",{enumerable:!0,get:function(){return r.setProperties}}),Object.defineProperty(e,"removeProperties",{enumerable:!0,get:function(){return r.removeProperties}}),Object.defineProperty(e,"addLineItem",{enumerable:!0,get:function(){return r.addLineItem}}),Object.defineProperty(e,"updateLineItem",{enumerable:!0,get:function(){return r.updateLineItem}}),Object.defineProperty(e,"removeLineItem",{enumerable:!0,get:function(){return r.removeLineItem}}),Object.defineProperty(e,"setLineItemDiscount",{enumerable:!0,get:function(){return r.setLineItemDiscount}}),Object.defineProperty(e,"removeLineItemDiscount",{enumerable:!0,get:function(){return r.removeLineItemDiscount}}),Object.defineProperty(e,"setLineItemProperties",{enumerable:!0,get:function(){return r.setLineItemProperties}}),e.create=function(t,e){return new r.Cart(t,e)}},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.Cart=e.setLineItemProperties=e.removeLineItemDiscount=e.setLineItemDiscount=e.removeLineItem=e.updateLineItem=e.addLineItem=e.removeProperties=e.setProperties=e.setDiscount=e.updateCustomerAddress=e.addCustomerAddress=e.setCustomer=e.update=e.fetch=e.Action=void 0;var u,a=n(0),c=n(3),s=n(1);function p(t,e){return void 0===e&&(e={}),a.actionWrapper({group:s.Group.Cart,type:t,payload:e})}!function(t){t.FETCH="APP::CART::FETCH",t.UPDATE="APP::CART::UPDATE",t.SET_CUSTOMER="APP::CART::SET_CUSTOMER",t.REMOVE_CUSTOMER="APP::CART::REMOVE_CUSTOMER",t.ADD_CUSTOMER_ADDRESS="APP::CART::ADD_CUSTOMER_ADDRESS",t.UPDATE_CUSTOMER_ADDRESS="APP::CART::UPDATE_CUSTOMER_ADDRESS",t.SET_DISCOUNT="APP::CART::SET_DISCOUNT",t.REMOVE_DISCOUNT="APP::CART::REMOVE_DISCOUNT",t.SET_PROPERTIES="APP::CART::SET_PROPERTIES",t.REMOVE_PROPERTIES="APP::CART::REMOVE_PROPERTIES",t.CLEAR="APP::CART::CLEAR",t.ADD_LINE_ITEM="APP::CART::ADD_LINE_ITEM",t.UPDATE_LINE_ITEM="APP::CART::UPDATE_LINE_ITEM",t.REMOVE_LINE_ITEM="APP::CART::REMOVE_LINE_ITEM",t.SET_LINE_ITEM_DISCOUNT="APP::CART::SET_LINE_ITEM_DISCOUNT",t.REMOVE_LINE_ITEM_DISCOUNT="APP::CART::REMOVE_LINE_ITEM_DISCOUNT",t.SET_LINE_ITEM_PROPERTIES="APP::CART::SET_LINE_ITEM_PROPERTIES",t.REMOVE_LINE_ITEM_PROPERTIES="APP::CART::REMOVE_LINE_ITEM_PROPERTIES"}(u=e.Action||(e.Action={})),e.fetch=function(){return p(u.FETCH)},e.update=function(t){return p(u.UPDATE,t)},e.setCustomer=function(t){return p(u.SET_CUSTOMER,t)},e.addCustomerAddress=function(t){return p(u.ADD_CUSTOMER_ADDRESS,t)},e.updateCustomerAddress=function(t){return p(u.UPDATE_CUSTOMER_ADDRESS,t)},e.setDiscount=function(t){return p(u.SET_DISCOUNT,t)},e.setProperties=function(t){return p(u.SET_PROPERTIES,t)},e.removeProperties=function(t){return p(u.REMOVE_PROPERTIES,t)},e.addLineItem=function(t){return p(u.ADD_LINE_ITEM,t)},e.updateLineItem=function(t){return p(u.UPDATE_LINE_ITEM,t)},e.removeLineItem=function(t){return p(u.REMOVE_LINE_ITEM,t)},e.setLineItemDiscount=function(t){return p(u.SET_LINE_ITEM_DISCOUNT,t)},e.removeLineItemDiscount=function(t){return p(u.REMOVE_LINE_ITEM_DISCOUNT,t)},e.setLineItemProperties=function(t){return p(u.SET_LINE_ITEM_PROPERTIES,t)};var l=function(t){function e(e,n){return t.call(this,e,s.Group.Cart,s.Group.Cart,n?n.id:void 0)||this}return o(e,t),e.prototype.dispatch=function(t,e){switch(t){case u.FETCH:this.dispatchCartAction(u.FETCH);break;case u.UPDATE:this.dispatchCartAction(u.UPDATE,e);break;case u.SET_CUSTOMER:this.dispatchCartAction(u.SET_CUSTOMER,e);break;case u.REMOVE_CUSTOMER:this.dispatchCartAction(u.REMOVE_CUSTOMER,e);break;case u.ADD_CUSTOMER_ADDRESS:this.dispatchCartAction(u.ADD_CUSTOMER_ADDRESS,e);break;case u.UPDATE_CUSTOMER_ADDRESS:this.dispatchCartAction(u.UPDATE_CUSTOMER_ADDRESS,e);break;case u.SET_DISCOUNT:this.dispatchCartAction(u.SET_DISCOUNT,e);break;case u.REMOVE_DISCOUNT:this.dispatchCartAction(u.REMOVE_DISCOUNT,e);break;case u.SET_PROPERTIES:this.dispatchCartAction(u.SET_PROPERTIES,e);break;case u.REMOVE_PROPERTIES:this.dispatchCartAction(u.REMOVE_PROPERTIES,e);break;case u.CLEAR:this.dispatchCartAction(u.CLEAR,e);break;case u.ADD_LINE_ITEM:this.dispatchCartAction(u.ADD_LINE_ITEM,e);break;case u.UPDATE_LINE_ITEM:this.dispatchCartAction(u.UPDATE_LINE_ITEM,e);break;case u.REMOVE_LINE_ITEM:this.dispatchCartAction(u.REMOVE_LINE_ITEM,e);break;case u.SET_LINE_ITEM_DISCOUNT:this.dispatchCartAction(u.SET_LINE_ITEM_DISCOUNT,e);break;case u.REMOVE_LINE_ITEM_DISCOUNT:this.dispatchCartAction(u.REMOVE_LINE_ITEM_DISCOUNT,e);break;case u.SET_LINE_ITEM_PROPERTIES:this.dispatchCartAction(u.SET_LINE_ITEM_PROPERTIES,e);break;case u.REMOVE_LINE_ITEM_PROPERTIES:this.dispatchCartAction(u.REMOVE_LINE_ITEM_PROPERTIES,e)}return this},e.prototype.dispatchCartAction=function(t,e){this.app.dispatch(p(t,i(i({},e),{id:this.id})))},e}(c.ActionSet);e.Cart=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Action=void 0,function(t){t.INITIALIZE="APP::CLIENT::INITIALIZE"}(e.Action||(e.Action={}))},function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),o=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),o(n(102),e)},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.Flash=e.show=e.clear=void 0;var i=n(25);Object.defineProperty(e,"clear",{enumerable:!0,get:function(){return i.clear}}),Object.defineProperty(e,"show",{enumerable:!0,get:function(){return i.show}});var u=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e}(i.Toast);e.Flash=u,e.create=function(t,e){return new u(t,e)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.Features=void 0;var r=n(41);Object.defineProperty(e,"Features",{enumerable:!0,get:function(){return r.Features}}),e.create=function(t,e){return new r.Features(t,e)}},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.Features=void 0;var u=n(0),a=n(3),c=n(1),s=n(42),p=function(t){function e(e,n){return t.call(this,e,c.Group.Features,c.Group.Features,n?n.id:void 0)||this}return o(e,t),e.prototype.dispatch=function(t,e){switch(t){case s.Action.REQUEST:this.dispatchFeaturesAction(s.Action.REQUEST,e)}return this},e.prototype.dispatchFeaturesAction=function(t,e){this.app.dispatch(u.actionWrapper({group:c.Group.Features,type:t,payload:i(i({},e||{}),{id:this.id})}))},e}(a.ActionSet);e.Features=p},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.FeedbackModal=e.close=e.open=e.Action=void 0;var r=n(106);Object.defineProperty(e,"Action",{enumerable:!0,get:function(){return r.Action}}),Object.defineProperty(e,"open",{enumerable:!0,get:function(){return r.open}}),Object.defineProperty(e,"close",{enumerable:!0,get:function(){return r.close}}),Object.defineProperty(e,"FeedbackModal",{enumerable:!0,get:function(){return r.FeedbackModal}}),Object.defineProperty(e,"create",{enumerable:!0,get:function(){return r.create}})},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.FeedbackModal=e.close=e.open=e.Action=void 0;var u,a=n(0),c=n(3),s=n(1);function p(t){return a.actionWrapper({group:s.Group.FeedbackModal,payload:t,type:u.OPEN})}function l(t){return a.actionWrapper({group:s.Group.FeedbackModal,payload:t,type:u.CLOSE})}!function(t){t.OPEN="APP::FEEDBACK_MODAL::OPEN",t.CLOSE="APP::FEEDBACK_MODAL::CLOSE"}(u=e.Action||(e.Action={})),e.open=p,e.close=l;var f=function(t){function e(e,n){var r=t.call(this,e,s.Group.FeedbackModal,s.Group.FeedbackModal)||this;return r.options=n,r.set(n),r}return o(e,t),Object.defineProperty(e.prototype,"payload",{get:function(){return i({id:this.id},this.options)},enumerable:!1,configurable:!0}),e.prototype.set=function(t){return this.options=a.getMergedProps(this.options,t),this},e.prototype.dispatch=function(t){switch(t){case u.OPEN:var e=p(this.payload);this.app.dispatch(e);break;case u.CLOSE:var n=l(this.payload);this.app.dispatch(n)}return this},e}(c.ActionSet);e.FeedbackModal=f,e.create=function(t,e){return new f(t,e)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.Action=e.Fullscreen=e.exit=e.enter=void 0;var r=n(44);Object.defineProperty(e,"Fullscreen",{enumerable:!0,get:function(){return r.Fullscreen}}),Object.defineProperty(e,"Action",{enumerable:!0,get:function(){return r.Action}});var o=n(44);Object.defineProperty(e,"enter",{enumerable:!0,get:function(){return o.enter}}),Object.defineProperty(e,"exit",{enumerable:!0,get:function(){return o.exit}}),e.create=function(t){return new r.Fullscreen(t)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.LeaveConfirmation=e.confirm=e.disable=e.enable=e.Action=void 0;var r=n(45);Object.defineProperty(e,"LeaveConfirmation",{enumerable:!0,get:function(){return r.LeaveConfirmation}});var o=n(45);Object.defineProperty(e,"Action",{enumerable:!0,get:function(){return o.Action}}),Object.defineProperty(e,"enable",{enumerable:!0,get:function(){return o.enable}}),Object.defineProperty(e,"disable",{enumerable:!0,get:function(){return o.disable}}),Object.defineProperty(e,"confirm",{enumerable:!0,get:function(){return o.confirm}}),e.create=function(t,e){return void 0===e&&(e={}),new r.LeaveConfirmation(t,e)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.stop=e.start=e.Action=e.Loading=void 0;var r=n(46);Object.defineProperty(e,"Loading",{enumerable:!0,get:function(){return r.Loading}});var o=n(46);Object.defineProperty(e,"Action",{enumerable:!0,get:function(){return o.Action}}),Object.defineProperty(e,"start",{enumerable:!0,get:function(){return o.start}}),Object.defineProperty(e,"stop",{enumerable:!0,get:function(){return o.stop}}),e.create=function(t){return new r.Loading(t)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.ModalContent=e.Action=void 0;var r=n(47);Object.defineProperty(e,"ModalContent",{enumerable:!0,get:function(){return r.ModalContent}});var o=n(47);Object.defineProperty(e,"Action",{enumerable:!0,get:function(){return o.Action}}),e.create=function(t,e){return new r.ModalContent(t,e)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.replace=e.push=e.Action=e.History=void 0;var r=n(48);Object.defineProperty(e,"History",{enumerable:!0,get:function(){return r.History}});var o=n(48);Object.defineProperty(e,"Action",{enumerable:!0,get:function(){return o.Action}}),Object.defineProperty(e,"push",{enumerable:!0,get:function(){return o.push}}),Object.defineProperty(e,"replace",{enumerable:!0,get:function(){return o.replace}}),e.create=function(t){return new r.History(t)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.app=e.Action=void 0;var r,o=n(0),i=n(1);!function(t){t.APP="APP::PRINT::APP"}(r=e.Action||(e.Action={})),e.app=function(){return o.actionWrapper({group:i.Group.Print,type:r.APP})}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.capture=e.openCamera=e.Scanner=e.Action=void 0;var r=n(114);Object.defineProperty(e,"Action",{enumerable:!0,get:function(){return r.Action}}),Object.defineProperty(e,"Scanner",{enumerable:!0,get:function(){return r.Scanner}}),Object.defineProperty(e,"openCamera",{enumerable:!0,get:function(){return r.openCamera}}),Object.defineProperty(e,"capture",{enumerable:!0,get:function(){return r.capture}}),e.create=function(t,e){return new r.Scanner(t,e)}},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.capture=e.openCamera=e.Scanner=e.Action=void 0;var i,u=n(0),a=n(3),c=n(1);!function(t){t.OPEN_CAMERA="APP::SCANNER::OPEN::CAMERA",t.CAPTURE="APP::SCANNER::CAPTURE"}(i=e.Action||(e.Action={}));var s=function(t){function e(e,n){return t.call(this,e,c.Group.Scanner,c.Group.Scanner,n?n.id:void 0)||this}return o(e,t),e.prototype.dispatch=function(t){switch(t){case i.OPEN_CAMERA:this.dispatchScannerAction(i.OPEN_CAMERA)}return this},e.prototype.dispatchScannerAction=function(t){this.app.dispatch(u.actionWrapper({type:t,group:c.Group.Scanner,payload:{id:this.id}}))},e}(a.ActionSet);e.Scanner=s,e.openCamera=function(){return u.actionWrapper({group:c.Group.Scanner,type:i.OPEN_CAMERA})},e.capture=function(t){return u.actionWrapper({group:c.Group.Scanner,type:i.CAPTURE,payload:t})}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.respond=e.request=e.Action=void 0;var r=n(36);Object.defineProperty(e,"Action",{enumerable:!0,get:function(){return r.Action}}),Object.defineProperty(e,"request",{enumerable:!0,get:function(){return r.request}}),Object.defineProperty(e,"respond",{enumerable:!0,get:function(){return r.respond}})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getGroupedButton=void 0;var r=n(15);e.getGroupedButton=function(t,e,n,o){t.addChild(e,t.group,n);var i=e.id,u=e.label,a=e.disabled,c=e.buttons,s=e.plain;return t.subscribeToChild(e,r.Action.UPDATE,o),{id:i,label:u,buttons:c,disabled:a,plain:s}}},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.ContextualSaveBar=e.update=e.discard=e.save=e.hide=e.show=e.Action=void 0;var u,a=n(0),c=n(3),s=n(1);function p(t,e){return a.actionWrapper({group:s.Group.ContextualSaveBar,type:t,payload:e})}!function(t){t.DISCARD="APP::CONTEXTUAL_SAVE_BAR::DISCARD",t.SAVE="APP::CONTEXTUAL_SAVE_BAR::SAVE",t.SHOW="APP::CONTEXTUAL_SAVE_BAR::SHOW",t.HIDE="APP::CONTEXTUAL_SAVE_BAR::HIDE",t.UPDATE="APP::CONTEXTUAL_SAVE_BAR::UPDATE"}(u=e.Action||(e.Action={})),e.show=function(t){return p(u.SHOW,t)},e.hide=function(t){return p(u.HIDE,t)},e.save=function(t){return p(u.SAVE,t)},e.discard=function(t){return p(u.DISCARD,t)},e.update=function(t){return p(u.UPDATE,t)};var l=function(t){function e(e,n){void 0===n&&(n={});var r=t.call(this,e,s.Group.ContextualSaveBar,s.Group.ContextualSaveBar)||this;return r.options=n,r.set(n,!1),r}return o(e,t),Object.defineProperty(e.prototype,"payload",{get:function(){return i({id:this.id},this.options)},enumerable:!1,configurable:!0}),e.prototype.set=function(t,e){void 0===e&&(e=!0);var n=a.getMergedProps(this.options,t);return this.options=n,e&&this.dispatch(u.UPDATE),this},e.prototype.dispatch=function(t){return this.app.dispatch(p(t,this.payload)),this},e}(c.ActionSet);e.ContextualSaveBar=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.Share=e.close=e.show=e.Action=void 0;var r=n(56);Object.defineProperty(e,"Share",{enumerable:!0,get:function(){return r.Share}});var o=n(56);Object.defineProperty(e,"Action",{enumerable:!0,get:function(){return o.Action}}),Object.defineProperty(e,"show",{enumerable:!0,get:function(){return o.show}}),Object.defineProperty(e,"close",{enumerable:!0,get:function(){return o.close}}),e.create=function(t){return new r.Share(t)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.ChannelMenu=e.update=e.Action=void 0;var r=n(59);Object.defineProperty(e,"ChannelMenu",{enumerable:!0,get:function(){return r.ChannelMenu}});var o=n(59);Object.defineProperty(e,"Action",{enumerable:!0,get:function(){return o.Action}}),Object.defineProperty(e,"update",{enumerable:!0,get:function(){return o.update}}),e.create=function(t,e){return new r.ChannelMenu(t,e)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.Pos=e.close=e.Action=void 0;var r=n(61);Object.defineProperty(e,"Pos",{enumerable:!0,get:function(){return r.Pos}});var o=n(61);Object.defineProperty(e,"Action",{enumerable:!0,get:function(){return o.Action}}),Object.defineProperty(e,"close",{enumerable:!0,get:function(){return o.close}}),e.create=function(t){return new r.Pos(t)}},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.MarketingExternalActivityTopBar=e.update=e.clickActionButton=e.MarketingActivityStatusBadgeType=e.Action=void 0;var u=n(122);Object.defineProperty(e,"Action",{enumerable:!0,get:function(){return u.Action}});var a=n(14),c=n(123),s=n(7),p=n(124),l=n(8);!function(t){t.Default="DEFAULT",t.Success="SUCCESS",t.Attention="ATTENTION",t.Warning="WARNING",t.Info="INFO"}(e.MarketingActivityStatusBadgeType||(e.MarketingActivityStatusBadgeType={}));var f={group:l.Group.MarketingExternalActivityTopBar,subgroups:["Buttons"]};function d(t){return s.actionWrapper({payload:t,group:l.Group.MarketingExternalActivityTopBar,type:u.Action.UPDATE})}e.clickActionButton=function(t,e){var n=l.ComponentType.Button,r=i({id:t,type:n},f);return a.clickButton(l.Group.MarketingExternalActivityTopBar,r,e)},e.update=d;var h=function(t){function e(e,n){var r=t.call(this,e,l.Group.MarketingExternalActivityTopBar,l.Group.MarketingExternalActivityTopBar)||this;return r.set(n),r}return o(e,t),Object.defineProperty(e.prototype,"buttons",{get:function(){if(this.primary||this.secondary)return{primary:this.primary,secondary:this.secondary}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"buttonsOptions",{get:function(){if(this.primaryOptions||this.secondaryOptions)return{primary:this.primaryOptions,secondary:this.secondaryOptions}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"options",{get:function(){return{title:this.title,status:this.status,saving:this.saving,saved:this.saved,buttons:this.buttonsOptions}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"payload",{get:function(){return i(i({},this.options),{buttons:this.buttons,id:this.id})},enumerable:!1,configurable:!0}),e.prototype.set=function(t,e){void 0===e&&(e=!0);var n=s.getMergedProps(this.options,t),r=n.title,o=n.buttons,i=n.saved,a=n.saving,c=n.status;return this.title=r,this.saving=a,this.saved=i,this.status=c,this.setPrimaryButton(o?o.primary:void 0),this.setSecondaryButtons(o?o.secondary:void 0),e&&this.dispatch(u.Action.UPDATE),this},e.prototype.dispatch=function(t){switch(t){case u.Action.UPDATE:this.app.dispatch(d(this.payload))}return this},e.prototype.getButton=function(t,e,n){return c.getSingleButton(this,t,e,n)},e.prototype.updatePrimaryButton=function(t){this.primary&&s.updateActionFromPayload(this.primary,t)&&this.dispatch(u.Action.UPDATE)},e.prototype.updateSecondaryButtons=function(t){if(this.secondary){var e=this.secondary.find((function(e){return e.id===t.id}));if(e)s.updateActionFromPayload(e,t)&&this.dispatch(u.Action.UPDATE)}},e.prototype.setPrimaryButton=function(t){this.primaryOptions=this.getChildButton(t,this.primaryOptions),this.primary=this.primaryOptions?this.getButton(this.primaryOptions,f.subgroups,this.updatePrimaryButton):void 0},e.prototype.setSecondaryButtons=function(t){var e=this,n=t||[],r=this.secondaryOptions||[];this.secondaryOptions=this.getUpdatedChildActions(n,r),this.secondary=this.secondaryOptions?this.secondaryOptions.map((function(t){return e.getButton(t,f.subgroups,e.updateSecondaryButtons)})):void 0},e.prototype.updateSaving=function(t){this.saving=t,this.dispatch(u.Action.UPDATE)},e.prototype.updateSaved=function(t){this.saved=t,this.dispatch(u.Action.UPDATE)},e.prototype.updateStatus=function(t){this.status=t,this.dispatch(u.Action.UPDATE)},e.prototype.getChildButton=function(t,e){var n=t?[t]:[],r=e?[e]:[],o=this.getUpdatedChildActions(n,r);return o?o[0]:void 0},e}(p.ActionSetWithChildren);e.MarketingExternalActivityTopBar=h,e.create=function(t,e){return new h(t,e)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Action=void 0,function(t){t.UPDATE="APP::MARKETING_EXTERNAL_ACTIVITY_TOP_BAR::UPDATE",t.BUTTON_CLICK="APP::MARKETING_EXTERNAL_ACTIVITY_TOP_BAR::BUTTONS::BUTTON::CLICK",t.BUTTON_UPDATE="APP::MARKETING_EXTERNAL_ACTIVITY_TOP_BAR::BUTTONS::BUTTON::UPDATE"}(e.Action||(e.Action={}))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getSingleButton=void 0;var r=n(12);Object.defineProperty(e,"getSingleButton",{enumerable:!0,get:function(){return r.getSingleButton}})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.unsubscribeActions=e.ActionSetWithChildren=e.ActionSet=void 0;var r=n(3);Object.defineProperty(e,"ActionSet",{enumerable:!0,get:function(){return r.ActionSet}}),Object.defineProperty(e,"ActionSetWithChildren",{enumerable:!0,get:function(){return r.ActionSetWithChildren}}),Object.defineProperty(e,"unsubscribeActions",{enumerable:!0,get:function(){return r.unsubscribeActions}})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.fullPageLoad=e.skeletonPageLoad=e.Action=void 0;var r=n(126);Object.defineProperty(e,"Action",{enumerable:!0,get:function(){return r.Action}}),Object.defineProperty(e,"skeletonPageLoad",{enumerable:!0,get:function(){return r.skeletonPageLoad}}),Object.defineProperty(e,"fullPageLoad",{enumerable:!0,get:function(){return r.fullPageLoad}})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.fullPageLoad=e.skeletonPageLoad=e.Action=void 0;var r,o=n(1),i=n(0);!function(t){t.SKELETON_PAGE_LOAD="APP::PERFORMANCE::SKELETON_PAGE_LOAD",t.FULL_PAGE_LOAD="APP::PERFORMANCE::FULL_PAGE_LOAD"}(r=e.Action||(e.Action={})),e.skeletonPageLoad=function(){return i.actionWrapper({group:o.Group.Performance,type:r.SKELETON_PAGE_LOAD})},e.fullPageLoad=function(){return i.actionWrapper({group:o.Group.Performance,type:r.FULL_PAGE_LOAD})}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.initializeWebVitals=e.interactionToNextPaint=e.timeToFirstByte=e.firstContentfulPaint=e.cumulativeLayoutShift=e.firstInputDelay=e.largestContentfulPaint=e.Action=void 0;var r=n(128),o=n(129);Object.defineProperty(e,"Action",{enumerable:!0,get:function(){return o.Action}});var i=n(23),u=n(8),a=n(7),c=n(22);function s(t){return a.actionWrapper({group:u.Group.WebVitals,type:o.Action.LARGEST_CONTENTFUL_PAINT,payload:t})}function p(t){return a.actionWrapper({group:u.Group.WebVitals,type:o.Action.FIRST_INPUT_DELAY,payload:t})}function l(t){return a.actionWrapper({group:u.Group.WebVitals,type:o.Action.CUMULATIVE_LAYOUT_SHIFT,payload:t})}function f(t){return a.actionWrapper({group:u.Group.WebVitals,type:o.Action.FIRST_CONTENTFUL_PAINT,payload:t})}function d(t){return a.actionWrapper({group:u.Group.WebVitals,type:o.Action.TIME_TO_FIRST_BYTE,payload:t})}function h(t){return a.actionWrapper({group:u.Group.WebVitals,type:o.Action.INTERACTION_TO_NEXT_PAINT,payload:t})}e.largestContentfulPaint=s,e.firstInputDelay=p,e.cumulativeLayoutShift=l,e.firstContentfulPaint=f,e.timeToFirstByte=d,e.interactionToNextPaint=h,e.initializeWebVitals=function(t){function e(e){return function(n){var r=n.id,o=n.name,i=n.value,u=e({id:r,metricName:o,value:i});t.dispatch(u)}}var n=window;i.isServer||i.isClient&&n.__is_web_vitals_initialized__||c.isMobile()||(n.__is_web_vitals_initialized__=!0,r.onLCP(e(s)),r.onFID(e(p)),r.onCLS(e(l)),r.onFCP(e(f)),r.onTTFB(e(d)),r.onINP(e(h)))}},function(t,e,n){"use strict";n.r(e),n.d(e,"getCLS",(function(){return S})),n.d(e,"getFCP",(function(){return T})),n.d(e,"getFID",(function(){return N})),n.d(e,"getINP",(function(){return K})),n.d(e,"getLCP",(function(){return X})),n.d(e,"getTTFB",(function(){return Y})),n.d(e,"onCLS",(function(){return S})),n.d(e,"onFCP",(function(){return T})),n.d(e,"onFID",(function(){return N})),n.d(e,"onINP",(function(){return K})),n.d(e,"onLCP",(function(){return X})),n.d(e,"onTTFB",(function(){return Y}));var r,o,i,u,a,c=-1,s=function(t){addEventListener("pageshow",(function(e){e.persisted&&(c=e.timeStamp,t(e))}),!0)},p=function(){return window.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]},l=function(){var t=p();return t&&t.activationStart||0},f=function(t,e){var n=p(),r="navigate";return c>=0?r="back-forward-cache":n&&(r=document.prerendering||l()>0?"prerender":document.wasDiscarded?"restore":n.type.replace(/_/g,"-")),{name:t,value:void 0===e?-1:e,rating:"good",delta:0,entries:[],id:"v3-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:r}},d=function(t,e,n){try{if(PerformanceObserver.supportedEntryTypes.includes(t)){var r=new PerformanceObserver((function(t){Promise.resolve().then((function(){e(t.getEntries())}))}));return r.observe(Object.assign({type:t,buffered:!0},n||{})),r}}catch(t){}},h=function(t,e,n,r){var o,i;return function(u){e.value>=0&&(u||r)&&((i=e.value-(o||0))||void 0===o)&&(o=e.value,e.delta=i,e.rating=function(t,e){return t>e[1]?"poor":t>e[0]?"needs-improvement":"good"}(e.value,n),t(e))}},y=function(t){requestAnimationFrame((function(){return requestAnimationFrame((function(){return t()}))}))},b=function(t){var e=function(e){"pagehide"!==e.type&&"hidden"!==document.visibilityState||t(e)};addEventListener("visibilitychange",e,!0),addEventListener("pagehide",e,!0)},v=function(t){var e=!1;return function(n){e||(t(n),e=!0)}},P=-1,A=function(){return"hidden"!==document.visibilityState||document.prerendering?1/0:0},O=function(t){"hidden"===document.visibilityState&&P>-1&&(P="visibilitychange"===t.type?t.timeStamp:0,g())},_=function(){addEventListener("visibilitychange",O,!0),addEventListener("prerenderingchange",O,!0)},g=function(){removeEventListener("visibilitychange",O,!0),removeEventListener("prerenderingchange",O,!0)},m=function(){return P<0&&(P=A(),_(),s((function(){setTimeout((function(){P=A(),_()}),0)}))),{get firstHiddenTime(){return P}}},E=function(t){document.prerendering?addEventListener("prerenderingchange",(function(){return t()}),!0):t()},T=function(t,e){e=e||{},E((function(){var n,r=[1800,3e3],o=m(),i=f("FCP"),u=d("paint",(function(t){t.forEach((function(t){"first-contentful-paint"===t.name&&(u.disconnect(),t.startTime<o.firstHiddenTime&&(i.value=Math.max(t.startTime-l(),0),i.entries.push(t),n(!0)))}))}));u&&(n=h(t,i,r,e.reportAllChanges),s((function(o){i=f("FCP"),n=h(t,i,r,e.reportAllChanges),y((function(){i.value=performance.now()-o.timeStamp,n(!0)}))})))}))},S=function(t,e){e=e||{},T(v((function(){var n,r=[.1,.25],o=f("CLS",0),i=0,u=[],a=function(t){t.forEach((function(t){if(!t.hadRecentInput){var e=u[0],n=u[u.length-1];i&&t.startTime-n.startTime<1e3&&t.startTime-e.startTime<5e3?(i+=t.value,u.push(t)):(i=t.value,u=[t])}})),i>o.value&&(o.value=i,o.entries=u,n())},c=d("layout-shift",a);c&&(n=h(t,o,r,e.reportAllChanges),b((function(){a(c.takeRecords()),n(!0)})),s((function(){i=0,o=f("CLS",0),n=h(t,o,r,e.reportAllChanges),y((function(){return n()}))})),setTimeout(n,0))})))},j={passive:!0,capture:!0},C=new Date,M=function(t,e){r||(r=e,o=t,i=new Date,w(removeEventListener),I())},I=function(){if(o>=0&&o<i-C){var t={entryType:"first-input",name:r.type,target:r.target,cancelable:r.cancelable,startTime:r.timeStamp,processingStart:r.timeStamp+o};u.forEach((function(e){e(t)})),u=[]}},R=function(t){if(t.cancelable){var e=(t.timeStamp>1e12?new Date:performance.now())-t.timeStamp;"pointerdown"==t.type?function(t,e){var n=function(){M(t,e),o()},r=function(){o()},o=function(){removeEventListener("pointerup",n,j),removeEventListener("pointercancel",r,j)};addEventListener("pointerup",n,j),addEventListener("pointercancel",r,j)}(e,t):M(e,t)}},w=function(t){["mousedown","keydown","touchstart","pointerdown"].forEach((function(e){return t(e,R,j)}))},N=function(t,e){e=e||{},E((function(){var n,i=[100,300],a=m(),c=f("FID"),p=function(t){t.startTime<a.firstHiddenTime&&(c.value=t.processingStart-t.startTime,c.entries.push(t),n(!0))},l=function(t){t.forEach(p)},y=d("first-input",l);n=h(t,c,i,e.reportAllChanges),y&&b(v((function(){l(y.takeRecords()),y.disconnect()}))),y&&s((function(){var a;c=f("FID"),n=h(t,c,i,e.reportAllChanges),u=[],o=-1,r=null,w(addEventListener),a=p,u.push(a),I()}))}))},L=0,D=1/0,B=0,U=function(t){t.forEach((function(t){t.interactionId&&(D=Math.min(D,t.interactionId),B=Math.max(B,t.interactionId),L=B?(B-D)/7+1:0)}))},k=function(){return a?L:performance.interactionCount||0},G=function(){"interactionCount"in performance||a||(a=d("event",U,{type:"event",buffered:!0,durationThreshold:0}))},x=0,F=function(){return k()-x},W=[],V={},H=function(t){var e=W[W.length-1],n=V[t.interactionId];if(n||W.length<10||t.duration>e.latency){if(n)n.entries.push(t),n.latency=Math.max(n.latency,t.duration);else{var r={id:t.interactionId,latency:t.duration,entries:[t]};V[r.id]=r,W.push(r)}W.sort((function(t,e){return e.latency-t.latency})),W.splice(10).forEach((function(t){delete V[t.id]}))}},K=function(t,e){e=e||{},E((function(){var n=[200,500];G();var r,o=f("INP"),i=function(t){t.forEach((function(t){t.interactionId&&H(t),"first-input"===t.entryType&&!W.some((function(e){return e.entries.some((function(e){return t.duration===e.duration&&t.startTime===e.startTime}))}))&&H(t)}));var e,n=(e=Math.min(W.length-1,Math.floor(F()/50)),W[e]);n&&n.latency!==o.value&&(o.value=n.latency,o.entries=n.entries,r())},u=d("event",i,{durationThreshold:e.durationThreshold||40});r=h(t,o,n,e.reportAllChanges),u&&(u.observe({type:"first-input",buffered:!0}),b((function(){i(u.takeRecords()),o.value<0&&F()>0&&(o.value=0,o.entries=[]),r(!0)})),s((function(){W=[],x=k(),o=f("INP"),r=h(t,o,n,e.reportAllChanges)})))}))},z={},X=function(t,e){e=e||{},E((function(){var n,r=[2500,4e3],o=m(),i=f("LCP"),u=function(t){var e=t[t.length-1];if(e){var r=Math.max(e.startTime-l(),0);r<o.firstHiddenTime&&(i.value=r,i.entries=[e],n())}},a=d("largest-contentful-paint",u);if(a){n=h(t,i,r,e.reportAllChanges);var c=v((function(){z[i.id]||(u(a.takeRecords()),a.disconnect(),z[i.id]=!0,n(!0))}));["keydown","click"].forEach((function(t){addEventListener(t,c,!0)})),b(c),s((function(o){i=f("LCP"),n=h(t,i,r,e.reportAllChanges),y((function(){i.value=performance.now()-o.timeStamp,z[i.id]=!0,n(!0)}))}))}}))},Y=function(t,e){e=e||{};var n=[800,1800],r=f("TTFB"),o=h(t,r,n,e.reportAllChanges);!function t(e){document.prerendering?E((function(){return t(e)})):"complete"!==document.readyState?addEventListener("load",(function(){return t(e)}),!0):setTimeout(e,0)}((function(){var i=p();if(i){var u=i.responseStart;if(u<=0||u>performance.now())return;r.value=Math.max(u-l(),0),r.entries=[i],o(!0),s((function(){r=f("TTFB",0),(o=h(t,r,n,e.reportAllChanges))(!0)}))}}))}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Action=void 0,function(t){t.LARGEST_CONTENTFUL_PAINT="APP::WEB_VITALS::LARGEST_CONTENTFUL_PAINT",t.FIRST_INPUT_DELAY="APP::WEB_VITALS::FIRST_INPUT_DELAY",t.CUMULATIVE_LAYOUT_SHIFT="APP::WEB_VITALS::CUMULATIVE_LAYOUT_SHIFT",t.FIRST_CONTENTFUL_PAINT="APP::WEB_VITALS::FIRST_CONTENTFUL_PAINT",t.TIME_TO_FIRST_BYTE="APP::WEB_VITALS::TIME_TO_FIRST_BYTE",t.INTERACTION_TO_NEXT_PAINT="APP::WEB_VITALS::INTERACTION_TO_NEXT_PAINT"}(e.Action||(e.Action={}))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isFromApp=e.isPerformanceOrWebVitalsAction=e.getPermissionKey=e.isPermitted=e.isAppMessage=e.isAppBridgeAction=void 0;var r=n(34);Object.defineProperty(e,"isAppBridgeAction",{enumerable:!0,get:function(){return r.isAppBridgeAction}}),Object.defineProperty(e,"isAppMessage",{enumerable:!0,get:function(){return r.isAppMessage}}),Object.defineProperty(e,"isPermitted",{enumerable:!0,get:function(){return r.isPermitted}}),Object.defineProperty(e,"getPermissionKey",{enumerable:!0,get:function(){return r.getPermissionKey}}),Object.defineProperty(e,"isPerformanceOrWebVitalsAction",{enumerable:!0,get:function(){return r.isPerformanceOrWebVitalsAction}}),e.isFromApp=function(t){return"object"==typeof t&&"object"==typeof t.source&&"string"==typeof t.source.apiKey}},function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),o=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),o(n(65),e),o(n(133),e)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.generateUuid=void 0;var r=n(33);Object.defineProperty(e,"generateUuid",{enumerable:!0,get:function(){return r.generateUuid}}),e.default=r.generateUuid},function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function u(t){try{c(r.next(t))}catch(t){i(t)}}function a(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(u,a)}c((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;u;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return u.label++,{value:i[1],done:!1};case 5:u.label++,r=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!(o=u.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){u=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){u.label=i[1];break}if(6===i[0]&&u.label<o[1]){u.label=o[1],o=i;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(i);break}o[2]&&u.ops.pop(),u.trys.pop();continue}i=e.call(t,u)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.userAuthorizedFetch=void 0;var i=n(65);function u(t){var e=t.headers.get("X-Shopify-API-Request-Failure-Unauthorized");return!!e&&"true"===e.toLowerCase()}e.userAuthorizedFetch=function(t){var e=this,n=t.app,a=t.callbackUri,c=void 0===a?"auth/shopify/callback":a,s=t.isAuthorizationCodeRequired,p=void 0===s?u:s,l=t.fetchOperation;return function(t,u){return r(e,void 0,void 0,(function(){var e,r,a,s,f,d,h;return o(this,(function(o){switch(o.label){case 0:return[4,l(t,u)];case 1:return e=o.sent(),p(e)?[4,i.getAuthorizationCodePayload(n)]:[2,e];case 2:return r=o.sent(),a=r.code,s=r.hmac,f=r.shop,d=r.timestamp,h=encodeURI("https://"+window.location.hostname+"/"+c+"?code="+a+"&hmac="+s+"&shop="+f+"×tamp="+d),[4,l(h,{})];case 3:if(!o.sent().ok)throw new Error("Failed to authorize request.");return[2,l(t,u)]}}))}))}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.useContextualSaveBar=void 0;var r=n(135);Object.defineProperty(e,"useContextualSaveBar",{enumerable:!0,get:function(){return r.useContextualSaveBar}})},function(t,e,n){"use strict";var r=this&&this.__rest||function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};Object.defineProperty(e,"__esModule",{value:!0}),e.useContextualSaveBar=void 0;var o=n(2),i=n(55),u=n(4);e.useContextualSaveBar=function(){var t=u.useAppBridge(),e=o.useRef(!1),n=o.useState(),a=n[0],c=n[1],s=o.useState(),p=s[0],l=s[1],f=o.useMemo((function(){return i.create(t)}),[t]),d=o.useCallback((function(t){t&&f.set(t,!1),f.dispatch(i.Action.SHOW),e.current=!0}),[f]),h=o.useCallback((function(){f.dispatch(i.Action.HIDE),e.current=!1}),[f]),y=o.useMemo((function(){return{setOptions:function(t){var n=t.onAction,o=r(t,["onAction"]),i=JSON.stringify(f.options.saveAction)!==JSON.stringify(o)&&e.current;c((function(){return n})),f.set({saveAction:o},i)}}}),[f]),b=o.useMemo((function(){return{setOptions:function(t){var n=t.onAction,o=r(t,["onAction"]),i=JSON.stringify(f.options.discardAction)!==JSON.stringify(o)&&e.current;l((function(){return n})),f.set({discardAction:o},i)}}}),[f]);return o.useEffect((function(){return function(){e.current&&h()}}),[]),o.useEffect((function(){return f.subscribe(i.Action.DISCARD,(function(){null==p||p()}))}),[f,p]),o.useEffect((function(){return f.subscribe(i.Action.SAVE,(function(){null==a||a()}))}),[f,a]),{show:d,hide:h,saveAction:y,discardAction:b}}},function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function u(t){try{c(r.next(t))}catch(t){i(t)}}function a(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(u,a)}c((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;u;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return u.label++,{value:i[1],done:!1};case 5:u.label++,r=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!(o=u.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){u=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){u.label=i[1];break}if(6===i[0]&&u.label<o[1]){u.label=o[1],o=i;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(i);break}o[2]&&u.ops.pop(),u.trys.pop();continue}i=e.call(t,u)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.useFeaturesAvailable=void 0;var i=n(2),u=n(43),a=n(4);e.useFeaturesAvailable=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var c=a.useAppBridge(),s=i.useState(),p=s[0],l=s[1],f=i.useRef([]),d=i.useCallback((function(){var e=!1;return r(t,void 0,void 0,(function(){var t;return o(this,(function(n){switch(n.label){case 0:return[4,c.featuresAvailable.apply(c,f.current)];case 1:return t=n.sent(),e||l((function(e){return JSON.stringify(e)===JSON.stringify(t)?e:t})),[2]}}))})),function(){e=!0}}),[c]);return i.useEffect((function(){return f.current=e,d()}),[JSON.stringify(e)]),i.useEffect((function(){var t,e=c.subscribe(u.Action.UPDATE,(function(){t=d()}));return function(){e(),null==t||t()}}),[c,d]),p}},function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),o=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),o(n(138),e)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.useFeatureRequest=void 0;var r=n(2),o=n(40),i=n(4),u=n(66);e.useFeatureRequest=function(t,e){var n=i.useAppBridge(),a=u.useFeaturesAvailable(),c=r.useState(),s=c[0],p=c[1],l=r.useCallback((function(n){var r=null==n?void 0:n[t];if(e&&(null==r?void 0:r[e])){var o=null==r?void 0:r[e];p((function(t){return JSON.stringify(o)!==JSON.stringify(t)?o:t}))}else p((function(t){return JSON.stringify(r)!==JSON.stringify(t)?r:t}))}),[t,e]);return r.useEffect((function(){o.create(n).dispatch(o.Action.REQUEST,{feature:t,action:e})}),[n,t,e]),r.useEffect((function(){l(a)}),[a,l]),s}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.useLocale=void 0;var r=n(140);Object.defineProperty(e,"useLocale",{enumerable:!0,get:function(){return r.useLocale}})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.useLocale=void 0;var r=n(31);e.useLocale=function(){return r.useAppBridgeState("staffMember.locale")}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.useNavigate=void 0;var r=n(142);Object.defineProperty(e,"useNavigate",{enumerable:!0,get:function(){return r.useNavigate}})},function(t,e,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.useNavigate=void 0;var o=n(2),i=n(26),u=n(4),a=n(67);e.useNavigate=function(){var t=u.useAppBridge(),e=a.useNavigationHistory(),n=o.useMemo((function(){return i.create(t)}),[t]),c=o.useCallback((function(r,o){var u=i.normalizeUrl(r),a=u.startsWith(t.localOrigin),c=u.startsWith(t.hostOrigin),s=u.startsWith("/");if(a||c||s){var p=i.getRelativePath(u);return c||"new"===(null==o?void 0:o.target)||"host"===(null==o?void 0:o.target)?void n.dispatch(i.Action.ADMIN_PATH,{path:p.replace(/^\/admin/,""),newContext:"new"===(null==o?void 0:o.target)}):"self"!==(null==o?void 0:o.target)&&(null==o?void 0:o.target)||!(null==o?void 0:o.replace)?void n.dispatch(i.Action.APP,p):void e.replace({pathname:p})}n.dispatch(i.Action.REMOTE,{url:u,newContext:"new"===(null==o?void 0:o.target)})}),[n,e]);return o.useCallback((function(t,e){if(i.isAdminSection(t)){var o=r(r({},t),{name:i.ResourceType[t.name]});n.dispatch(i.Action.ADMIN_SECTION,{section:o,newContext:"new"===(null==e?void 0:e.target)})}else c(t,e)}),[c,n])}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.useNavigationHistory=void 0;var r=n(2),o=n(6),i=n(4);e.useNavigationHistory=function(){var t=i.useAppBridge();return r.useMemo((function(){var e=o.History.create(t);return{push:function(t){e.dispatch(o.History.Action.PUSH,t.pathname)},replace:function(t){e.dispatch(o.History.Action.REPLACE,t.pathname)}}}),[])}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.useToast=void 0;var r=n(145);Object.defineProperty(e,"useToast",{enumerable:!0,get:function(){return r.useToast}})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.useToast=e.DEFAULT_TOAST_DURATION=void 0;var r=n(2),o=n(54),i=n(4);e.DEFAULT_TOAST_DURATION=5e3,e.useToast=function(){var t=i.useAppBridge(),n=r.useRef([]),u=r.useCallback((function(r,i){var u=o.create(t,{message:r,isError:null==i?void 0:i.isError,duration:(null==i?void 0:i.duration)||e.DEFAULT_TOAST_DURATION,action:null==i?void 0:i.action});u.dispatch(o.Action.SHOW),n.current.push(u),u.subscribe(o.Action.CLEAR,(function(){var t;null===(t=null==i?void 0:i.onDismiss)||void 0===t||t.call(i),n.current.splice(n.current.indexOf(u),1),u.unsubscribe()})),u.subscribe(o.Action.ACTION,(function(){var t,e;null===(e=null===(t=null==i?void 0:i.action)||void 0===t?void 0:t.onAction)||void 0===e||e.call(t)}))}),[t]);return r.useEffect((function(){return function(){n.current.forEach((function(t){return null==t?void 0:t.unsubscribe()}))}}),[]),{show:u}}},function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var o=r(n(147));e.default=o.default},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var u=i(n(2)),a=n(6),c=n(5),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.componentDidMount=function(){var t=this.context;this.loading=a.Loading.create(t),null!=this.loading&&this.loading.dispatch(a.Loading.Action.START)},e.prototype.componentWillUnmount=function(){null!=this.loading&&this.loading.dispatch(a.Loading.Action.STOP)},e.prototype.render=function(){return null},e.contextType=c.AppBridgeContext,e}(u.default.Component);e.default=s},function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Props=e.ModalContent=void 0;var o=r(n(68)),i=n(149);Object.defineProperty(e,"ModalContent",{enumerable:!0,get:function(){return r(i).default}});var u=n(68);Object.defineProperty(e,"Props",{enumerable:!0,get:function(){return u.Props}}),e.default=o.default},function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var o=r(n(150));e.default=o.default},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var u=i(n(2)),a=n(6),c=n(5),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.componentDidMount=function(){var t=this.context;this.modalContent=a.ModalContent.create(t),this.syncLoadingStatus()},e.prototype.componentDidUpdate=function(){this.syncLoadingStatus()},e.prototype.syncLoadingStatus=function(){this.modalContent&&(this.props.loading?this.modalContent.loading():this.modalContent.loaded())},e.prototype.render=function(){return null},e.contextType=c.AppBridgeContext,e}(u.default.Component);e.default=s},function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Props=void 0;var o=r(n(70)),i=n(70);Object.defineProperty(e,"Props",{enumerable:!0,get:function(){return i.Props}}),e.default=o.default},function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Props=void 0;var o=r(n(71)),i=n(71);Object.defineProperty(e,"Props",{enumerable:!0,get:function(){return i.Props}}),e.default=o.default},function(t,e,n){t.exports=n(154)},function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),o=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=n(72);Object.defineProperty(e,"default",{enumerable:!0,get:function(){return i.createApp}}),o(n(13),e),o(n(72),e)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.mockAppBridge=e.serverAppBridge=void 0;var r=n(16),o=function(){},i=new Promise((function(){}));e.serverAppBridge={dispatch:function(){return{}},error:function(){return o},featuresAvailable:function(){return Promise.reject(r.fromAction("Feature detection is only available on the client side.",r.AppActionType.WINDOW_UNDEFINED))},getState:function(){return Promise.reject(r.fromAction("State is only available on the client side.",r.AppActionType.WINDOW_UNDEFINED))},localOrigin:"",hostOrigin:"",subscribe:function(){return o}},e.mockAppBridge={dispatch:function(){return{}},error:function(){return o},featuresAvailable:function(){return i},getState:function(){return i},localOrigin:"",hostOrigin:"",subscribe:function(){return o}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.handleAppPrint=void 0;var r=n(74);function o(){var t;null===(t=r.getWindow())||void 0===t||t.print()}function i(){var t=function(){var t=r.getWindow();if(t&&t.document&&t.document.body){var e=t.document.createElement("input");return e.style.display="none",t.document.body.appendChild(e),e}}();t&&(t.select(),o(),t.remove())}e.handleAppPrint=function(){navigator.userAgent.indexOf("iOS")>=0?i():o()}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(158),o=function(){function t(){this.map={}}return t.prototype.set=function(t,e){Object.prototype.hasOwnProperty.call(this.map,t)||(this.map[t]=[]);var n={handler:e,remove:function(){}},o=r.addAndRemoveFromCollection(this.map[t],n);return n={handler:e,remove:o},o},t.prototype.get=function(t){var e=this.map[t];return e?e.map((function(t){return t.handler})):void 0},t.prototype.run=function(t,e,n){for(var r=[],o=3;o<arguments.length;o++)r[o-3]=arguments[o];var i=0,u=this.get(t)||[];function a(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var o=u[i++];return o?o(a).apply(n,t):e.apply(n,t)}return a.apply(n,r)},t}();e.default=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.removeFromCollection=e.addAndRemoveFromCollection=void 0;var r=n(20);Object.defineProperty(e,"addAndRemoveFromCollection",{enumerable:!0,get:function(){return r.addAndRemoveFromCollection}}),Object.defineProperty(e,"removeFromCollection",{enumerable:!0,get:function(){return r.removeFromCollection}})},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var u=i(n(2)),a=n(5),c=n(28),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.componentDidMount=function(){var t=this.props.history;this.unsubscribe=c.handleRouteChange(this.context,t)},e.prototype.componentWillUnmount=function(){this.unsubscribe&&this.unsubscribe()},e.prototype.render=function(){return null},e.contextType=a.AppBridgeContext,e}(u.default.Component);e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(2),o=n(4),i=n(28);e.default=function(t){var e=o.useAppBridge();r.useEffect((function(){return i.handleRouteChange(e,t)}),[e,t])}},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var u=i(n(2)),a=n(5),c=n(29),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.componentDidMount=function(){var t=this.props.location;c.updateHistory(this.context,t)},e.prototype.componentDidUpdate=function(t){var e=t.location,n=this.props.location;n!==e&&c.updateHistory(this.context,n)},e.prototype.render=function(){return null},e.contextType=a.AppBridgeContext,e}(u.default.Component);e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getOrigin=e.getTopWindow=e.getSelfWindow=void 0,e.getSelfWindow=function(){return window.self},e.getTopWindow=function(){return window.top},e.getOrigin=function(){return location.origin}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(2),o=n(4),i=n(29);e.default=function(t){var e=o.useAppBridge();r.useEffect((function(){i.updateHistory(e,t)}),[e,t])}},function(t){t.exports=JSON.parse('{"name":"@shopify/app-bridge-react","version":"3.7.3","types":"index.d.ts","main":"index.js","unpkg":"umd/index.js","jsdelivr":"umd/index.js","files":["/components/","/umd/","/hooks/","/utilities/","/context.d.ts","/context.js","/index.d.ts","/index.js","/types.d.ts","/types.js","/useAppBridge.d.ts","/useAppBridge.js"],"private":false,"publishConfig":{"access":"public","@shopify:registry":"https://registry.npmjs.org"},"repository":"git@github.com:Shopify/app-bridge.git","homepage":"https://shopify.dev/tools/app-bridge/react-components","author":"Shopify Inc.","license":"MIT","scripts":{"build":"yarn build:tsc && yarn build:umd","build:tsc":"NODE_ENV=production tsc","build:umd":"NODE_ENV=production webpack -p","check":"tsc","clean":"yarn clean:tsc && yarn clean:umd","clean:tsc":"NODE_ENV=production tsc --build --clean","clean:umd":"rm -rf ./umd","pack":"yarn pack","size":"size-limit"},"sideEffects":false,"size-limit":[{"limit":"36 KB","path":"index.js"}],"dependencies":{"@shopify/app-bridge":"^3.7.3"},"devDependencies":{"@shopify/react-testing":"^4.1.1","@types/react":"^18.0.2","react-dom":"^18.2.0"},"peerDependencies":{"react":"^16.0.0 || ^17.0.0 || ^18.0.0"}}')},function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Props=void 0;var o=r(n(78)),i=n(78);Object.defineProperty(e,"Props",{enumerable:!0,get:function(){return i.Props}}),e.default=o.default},function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Props=void 0;var o=r(n(79)),i=n(79);Object.defineProperty(e,"Props",{enumerable:!0,get:function(){return i.Props}}),e.default=o.default},function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Props=void 0;var o=r(n(80)),i=n(80);Object.defineProperty(e,"Props",{enumerable:!0,get:function(){return i.Props}}),e.default=o.default},function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Props=void 0;var o=r(n(81)),i=n(81);Object.defineProperty(e,"Props",{enumerable:!0,get:function(){return i.Props}}),e.default=o.default}])}));
|