@ikas/storefront 2.0.0-alpha.10 → 2.0.0-alpha.11

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.
@@ -1 +1 @@
1
- import e from'../ext/decode-uri-component/index.js';export{default}from"../node_modules/decode-uri-component/index.js";
1
+ import e from'../ext/strict-uri-encode/index.js';export{default}from"../node_modules/strict-uri-encode/index.js";
@@ -1 +1 @@
1
- import e from'../ext/strict-uri-encode/index.js';export{default}from"../node_modules/strict-uri-encode/index.js";
1
+ import e from'../ext/decode-uri-component/index.js';export{default}from"../node_modules/decode-uri-component/index.js";
package/build/ikas.js CHANGED
@@ -13,4 +13,4 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
13
13
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
14
14
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
15
15
  PERFORMANCE OF THIS SOFTWARE.
16
- ***************************************************************************** */var n=function(){return n=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},n.apply(this,arguments)};function r(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{u(r.next(e))}catch(e){i(e)}}function a(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))}function o(e,t){var n,r,o,i,s={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(;s;)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 s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],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])}}}var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function s(e){var t={exports:{}};return e(t,t.exports),t.exports}var a=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,u=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,c="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",l="[\\ud800-\\udfff]",p="["+c+"]",d="[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]",f="\\d+",h="[\\u2700-\\u27bf]",v="[a-z\\xdf-\\xf6\\xf8-\\xff]",_="[^\\ud800-\\udfff"+c+f+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",g="\\ud83c[\\udffb-\\udfff]",m="[^\\ud800-\\udfff]",b="(?:\\ud83c[\\udde6-\\uddff]){2}",y="[\\ud800-\\udbff][\\udc00-\\udfff]",O="[A-Z\\xc0-\\xd6\\xd8-\\xde]",E="(?:"+v+"|"+_+")",N="(?:"+O+"|"+_+")",w="(?:"+d+"|"+g+")"+"?",A="[\\ufe0e\\ufe0f]?"+w+("(?:\\u200d(?:"+[m,b,y].join("|")+")[\\ufe0e\\ufe0f]?"+w+")*"),S="(?:"+[h,b,y].join("|")+")"+A,T="(?:"+[m+d+"?",d,b,y,l].join("|")+")",C=RegExp("['’]","g"),x=RegExp(d,"g"),D=RegExp(g+"(?="+g+")|"+T+A,"g"),I=RegExp([O+"?"+v+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[p,O,"$"].join("|")+")",N+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[p,O+E,"$"].join("|")+")",O+"?"+E+"+(?:['’](?:d|ll|m|re|s|t|ve))?",O+"+(?:['’](?:D|LL|M|RE|S|T|VE))?",f,S].join("|"),"g"),R=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0\\ufe0e\\ufe0f]"),j=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,L="object"==typeof i&&i&&i.Object===Object&&i,P="object"==typeof self&&self&&self.Object===Object&&self,k=L||P||Function("return this")();var V,U=(V={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"ss"},function(e){return null==V?void 0:V[e]});function B(e){return R.test(e)}function F(e){return B(e)?function(e){return e.match(D)||[]}(e):function(e){return e.split("")}(e)}var G=Object.prototype.toString,M=k.Symbol,q=M?M.prototype:void 0,K=q?q.toString:void 0;function z(e){if("string"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==G.call(e)}(e))return K?K.call(e):"";var t=e+"";return"0"==t&&1/e==-Infinity?"-0":t}function X(e,t,n){var r=e.length;return n=void 0===n?r:n,!t&&n>=r?e:function(e,t,n){var r=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var i=Array(o);++r<o;)i[r]=e[r+t];return i}(e,t,n)}function H(e){return null==e?"":z(e)}var W,Y=(W=function(e,t,n){return t=t.toLowerCase(),e+(n?$(H(t).toLowerCase()):t)},function(e){return function(e,t,n,r){var o=-1,i=e?e.length:0;for(r&&i&&(n=e[++o]);++o<i;)n=t(n,e[o],o,e);return n}(function(e,t,n){return e=H(e),void 0===(t=n?void 0:t)?function(e){return j.test(e)}(e)?function(e){return e.match(I)||[]}(e):function(e){return e.match(a)||[]}(e):e.match(t)||[]}(function(e){return(e=H(e))&&e.replace(u,U).replace(x,"")}(e).replace(C,"")),W,"")});var J,$=(J="toUpperCase",function(e){var t=B(e=H(e))?F(e):void 0,n=t?t[0]:e.charAt(0),r=t?X(t,1).join(""):e.slice(1);return n[J]()+r});var Z,Q=(Z=Y)&&"object"==typeof Z&&"default"in Z?Z.default:Z;function ee(e){return Array.isArray(e)?e:void 0===e?[]:function(e){return function(e){return"object"==typeof e&&null!==e}(e)&&"number"==typeof e.length}(e)||e instanceof Set?Array.from(e):[e]}function te(e){return Array.isArray(e)?e:void 0===e?[]:function(e){return function(e){return"object"==typeof e&&null!==e}(e)&&"number"==typeof e.length}(e)?Array.prototype.slice.call(e):[e]}function ne(e,t){const n=[],r=te(arguments);return r.splice(0,2),te(e).forEach(((e,o)=>{let i=[];r.forEach((t=>{"function"==typeof t?i=i.concat(t(e)):i.push(t)})),t(e)&&n.push({index:o,replaceWithValue:i})})),n.reverse().forEach((t=>{const n=[t.index,1].concat(t.replaceWithValue);e.splice.apply(e,n)})),e}const re={short:/^-([^\d-])$/,long:/^--(\S+)/,combinedShort:/^-[^\d-]{2,}$/,optEquals:/^(--\S+?)=(.*)/};class oe extends Array{load(e){if(this.clear(),e&&e!==process.argv)e=ee(e);else{e=process.argv.slice(0);const t=process.execArgv.some(le)?1:2;e.splice(0,t)}e.forEach((e=>this.push(String(e))))}clear(){this.length=0}expandOptionEqualsNotation(){if(this.some((e=>re.optEquals.test(e)))){const e=[];this.forEach((t=>{const n=t.match(re.optEquals);n?e.push(n[1],n[2]):e.push(t)})),this.clear(),this.load(e)}}expandGetoptNotation(){this.hasCombinedShortOptions()&&ne(this,re.combinedShort,ie)}hasCombinedShortOptions(){return this.some((e=>re.combinedShort.test(e)))}static from(e){const t=new this;return t.load(e),t}}function ie(e){return(e=e.slice(1)).split("").map((e=>"-"+e))}function se(e){return re.optEquals.test(e)}function ae(e){return(re.short.test(e)||re.long.test(e))&&!re.optEquals.test(e)}function ue(e){return re.short.test(e)?e.match(re.short)[1]:function(e){return re.long.test(e)&&!se(e)}(e)?e.match(re.long)[1]:se(e)?e.match(re.optEquals)[1].replace(/^--/,""):null}function ce(e){return!(ae(e)||re.combinedShort.test(e)||re.optEquals.test(e))}function le(e){return["--eval","-e"].indexOf(e)>-1||e.startsWith("--eval=")}function pe(e){return"object"==typeof e&&null!==e}function de(e){return void 0!==e}function fe(e){return"function"==typeof e}var he={isNumber:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},isString:function(e){return"string"==typeof e},isBoolean:function(e){return"boolean"==typeof e},isPlainObject:function(e){return null!==e&&"object"==typeof e&&e.constructor===Object},isArrayLike:function(e){return pe(e)&&"number"==typeof e.length},isObject:pe,isDefined:de,isFunction:fe,isClass:function(e){return!!fe(e)&&/^class /.test(Function.prototype.toString.call(e))},isPrimitive:function(e){if(null===e)return!0;switch(typeof e){case"string":case"number":case"symbol":case"undefined":case"boolean":return!0;default:return!1}},isPromise:function(e){if(e){const t=de(Promise)&&e instanceof Promise,n=e.then&&"function"==typeof e.then;return!(!t&&!n)}return!1},isIterable:function(e){return!(null===e||!de(e))&&("function"==typeof e[Symbol.iterator]||"function"==typeof e[Symbol.asyncIterator])}};class ve{constructor(e){this.name=e.name,this.type=e.type||String,this.alias=e.alias,this.multiple=e.multiple,this.lazyMultiple=e.lazyMultiple,this.defaultOption=e.defaultOption,this.defaultValue=e.defaultValue,this.group=e.group;for(const t in e)this[t]||(this[t]=e[t])}isBoolean(){return this.type===Boolean||he.isFunction(this.type)&&"Boolean"===this.type.name}isMultiple(){return this.multiple||this.lazyMultiple}static create(e){return new this(e)}}class _e extends Array{validate(e){this.some((e=>!e.name))&&ge("INVALID_DEFINITIONS","Invalid option definitions: the `name` property is required on each definition");let t;this.some((e=>e.type&&"function"!=typeof e.type))&&ge("INVALID_DEFINITIONS","Invalid option definitions: the `type` property must be a setter fuction (default: `Boolean`)");this.some((e=>(t=e,he.isDefined(e.alias)&&he.isNumber(e.alias))))&&ge("INVALID_DEFINITIONS","Invalid option definition: to avoid ambiguity an alias cannot be numeric [--"+t.name+" alias is -"+t.alias+"]");this.some((e=>(t=e,he.isDefined(e.alias)&&1!==e.alias.length)))&&ge("INVALID_DEFINITIONS","Invalid option definition: an alias must be a single character");this.some((e=>(t=e,"-"===e.alias)))&&ge("INVALID_DEFINITIONS",'Invalid option definition: an alias cannot be "-"');be(this.map((t=>e?t.name.toLowerCase():t.name)))&&ge("INVALID_DEFINITIONS","Two or more option definitions have the same name");be(this.map((t=>e&&he.isDefined(t.alias)?t.alias.toLowerCase():t.alias)))&&ge("INVALID_DEFINITIONS","Two or more option definitions have the same alias");be(this.map((e=>e.defaultOption)))&&ge("INVALID_DEFINITIONS","Only one option definition can be the defaultOption");this.some((e=>(t=e,e.isBoolean()&&e.defaultOption)))&&ge("INVALID_DEFINITIONS",`A boolean option ["${t.name}"] can not also be the defaultOption.`)}get(e,t){if(ae(e)){if(re.short.test(e)){const n=ue(e);if(t){const e=n.toLowerCase();return this.find((t=>he.isDefined(t.alias)&&t.alias.toLowerCase()===e))}return this.find((e=>e.alias===n))}{const n=ue(e);if(t){const e=n.toLowerCase();return this.find((t=>t.name.toLowerCase()===e))}return this.find((e=>e.name===n))}}return this.find((t=>t.name===e))}getDefault(){return this.find((e=>!0===e.defaultOption))}isGrouped(){return this.some((e=>e.group))}whereGrouped(){return this.filter(me)}whereNotGrouped(){return this.filter((e=>!me(e)))}whereDefaultValueSet(){return this.filter((e=>he.isDefined(e.defaultValue)))}static from(e,t){if(e instanceof this)return e;const n=super.from(ee(e),(e=>ve.create(e)));return n.validate(t),n}}function ge(e,t){const n=new Error(t);throw n.name=e,n}function me(e){return ee(e.group).some((e=>e))}function be(e){const t={};for(let n=0;n<e.length;n++){const r=e[n];if(t[r])return!0;he.isDefined(r)&&(t[r]=!0)}}class ye{constructor(e,t){this.options=Object.assign({},t),this.definitions=_e.from(e,this.options.caseInsensitive),this.argv=oe.from(this.options.argv),this.argv.hasCombinedShortOptions()&&ne(this.argv,re.combinedShort.test.bind(re.combinedShort),(e=>(e=e.slice(1)).split("").map((t=>({origArg:`-${e}`,arg:"-"+t})))))}*[Symbol.iterator](){const e=this.definitions;let t,n,r,o,i,s=!1,a=!1;for(let u of this.argv){if(he.isPlainObject(u)&&(i=u.origArg,u=u.arg),a&&this.options.stopAtFirstUnknown){yield{event:"unknown_value",arg:u,name:"_unknown",value:void 0};continue}if(ae(u))t=e.get(u,this.options.caseInsensitive),n=void 0,t?(n=!!t.isBoolean()||null,o="set"):o="unknown_option";else if(se(u)){const r=u.match(re.optEquals);t=e.get(r[1],this.options.caseInsensitive),t?t.isBoolean()?(yield{event:"unknown_value",arg:u,name:"_unknown",value:n,def:t},o="set",n=!0):(o="set",n=r[2]):o="unknown_option"}else ce(u)&&(t?(n=u,o="set"):(t=this.definitions.getDefault(),t&&!s?(n=u,o="set"):(o="unknown_value",t=void 0)));r=t?t.name:"_unknown";const c={event:o,arg:u,name:r,value:n,def:t};i&&(c.subArg=u,c.arg=i),yield c,"_unknown"===r&&(a=!0),t&&t.defaultOption&&!t.isMultiple()&&"set"===o&&(s=!0),t&&t.isBoolean()&&(t=void 0),t&&!t.multiple&&he.isDefined(n)&&null!==n&&(t=void 0),n=void 0,o=void 0,r=void 0,i=void 0}}}const Oe=new WeakMap;class Ee{constructor(e){this.definition=new ve(e),this.state=null,this.resetToDefault()}get(){return Oe.get(this)}set(e){this._set(e,"set")}_set(e,t){const n=this.definition;if(n.isMultiple()){if(null!=e){const r=this.get();"default"===this.state&&(r.length=0),r.push(n.type(e)),this.state=t}}else{if(!n.isMultiple()&&"set"===this.state){const t=new Error(`Singular option already set [${this.definition.name}=${this.get()}]`);throw t.name="ALREADY_SET",t.value=e,t.optionName=n.name,t}null==e?Oe.set(this,e):(Oe.set(this,n.type(e)),this.state=t)}}resetToDefault(){he.isDefined(this.definition.defaultValue)?this.definition.isMultiple()?Oe.set(this,ee(this.definition.defaultValue).slice()):Oe.set(this,this.definition.defaultValue):this.definition.isMultiple()?Oe.set(this,[]):Oe.set(this,null),this.state="default"}static create(e){return(e=new ve(e)).isBoolean()?Ne.create(e):new this(e)}}class Ne extends Ee{set(e){super.set(!0)}static create(e){return new this(e)}}class we extends Map{constructor(e){super(),this.definitions=_e.from(e),this.set("_unknown",Ee.create({name:"_unknown",multiple:!0}));for(const e of this.definitions.whereDefaultValueSet())this.set(e.name,Ee.create(e))}toObject(e){e=e||{};const t={};for(const n of this){const r=e.camelCase&&"_unknown"!==n[0]?Q(n[0]):n[0],o=n[1];("_unknown"!==r||o.get().length)&&(t[r]=o.get())}return e.skipUnknown&&delete t._unknown,t}}class Ae extends we{toObject(e){const t=super.toObject({skipUnknown:e.skipUnknown}),n=super.toObject(e),r=n._unknown;delete n._unknown;const o={_all:n};return r&&r.length&&(o._unknown=r),this.definitions.whereGrouped().forEach((n=>{const r=e.camelCase?Q(n.name):n.name,i=t[n.name];for(const e of ee(n.group))o[e]=o[e]||{},he.isDefined(i)&&(o[e][r]=i)})),this.definitions.whereNotGrouped().forEach((n=>{const r=e.camelCase?Q(n.name):n.name,i=t[n.name];he.isDefined(i)&&(o._none||(o._none={}),o._none[r]=i)})),o}}var Se=function(e,t){(t=t||{}).stopAtFirstUnknown&&(t.partial=!0),e=_e.from(e,t.caseInsensitive);const n=new ye(e,{argv:t.argv,stopAtFirstUnknown:t.stopAtFirstUnknown,caseInsensitive:t.caseInsensitive}),r=new(e.isGrouped()?Ae:we)(e);for(const e of n){const n=e.subArg||e.arg;if(!t.partial){if("unknown_value"===e.event){const e=new Error(`Unknown value: ${n}`);throw e.name="UNKNOWN_VALUE",e.value=n,e}if("unknown_option"===e.event){const e=new Error(`Unknown option: ${n}`);throw e.name="UNKNOWN_OPTION",e.optionName=n,e}}let o;r.has(e.name)?o=r.get(e.name):(o=Ee.create(e.def),r.set(e.name,o)),"_unknown"===e.name?o.set(n):o.set(e.value)}return r.toObject({skipUnknown:!t.partial,camelCase:t.camelCase})};function Te(n,i){return r(this,void 0,void 0,(function(){return o(this,(function(r){try{return t.readdirSync(n).forEach((function(r){(null==i?void 0:i.includes(r))||t.unlinkSync(e.join(n,r))})),[2,!0]}catch(e){return[2,!1]}return[2]}))}))}function Ce(n,i,s){var a;return r(this,void 0,void 0,(function(){var r,u,c;return o(this,(function(o){try{return r=n,u=function(e){var t=e.split("/");return t.length>1?{dirParts:t.slice(0,t.length-1),filePart:t[t.length-1]}:{filePart:e}}(i),(null===(a=u.dirParts)||void 0===a?void 0:a.length)&&(r=e.join.apply(e,function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],s=0,a=i.length;s<a;s++,o++)r[o]=i[s];return r}([r],u.dirParts))),t.existsSync(r)||t.mkdirSync(r,{recursive:!0}),c=e.join(r,u.filePart),t.writeFileSync(c,s),[2,!0]}catch(e){return console.error(e),[2,!1]}return[2]}))}))}var xe=[{content:'import { IkasLocalThemeAPI } from "@ikas/storefront-utils";\n\nexport default IkasLocalThemeAPI.GetComponentDirs.getComponentDirs;\nexport const config = IkasLocalThemeAPI.GetComponentDirs.config;\n',fileName:"getComponentDirs.ts"},{content:'import { IkasLocalThemeAPI } from "@ikas/storefront-utils";\n\nexport default IkasLocalThemeAPI.GetTheme.getTheme;\nexport const config = IkasLocalThemeAPI.GetTheme.config;\n',fileName:"getTheme.ts"},{content:'import { IkasLocalThemeAPI } from "@ikas/storefront-utils";\n\nexport default IkasLocalThemeAPI.UpdateTheme.updateTheme;\nexport const config = IkasLocalThemeAPI.UpdateTheme.config;\n',fileName:"updateTheme.ts"},{content:'import { IkasLocalThemeAPI } from "@ikas/storefront-utils";\n\nexport default IkasLocalThemeAPI.UploadTheme.uploadTheme;\nexport const config = IkasLocalThemeAPI.UploadTheme.config;\n',fileName:"uploadTheme.ts"}],De=function(){function t(){}return t.generate=function(){return r(this,void 0,void 0,(function(){var n,r,i,s,a;return o(this,(function(o){switch(o.label){case 0:return[4,Te(e.join(process.cwd(),"src","pages","api"))];case 1:o.sent(),n=!0,r=0,i=xe,o.label=2;case 2:return r<i.length?(s=i[r],(a=n)?[4,t.generateAPI(s)]:[3,4]):[3,6];case 3:a=o.sent(),o.label=4;case 4:n=a,o.label=5;case 5:return r++,[3,2];case 6:return[2,n]}}))}))},t.generateAPI=function(t){return Ce(e.join(process.cwd(),"src","pages","api"),t.fileName,t.content)},t}(),Ie="object"==typeof i&&i&&i.Object===Object&&i,Re="object"==typeof self&&self&&self.Object===Object&&self,je=Ie||Re||Function("return this")(),Le=je.Symbol,Pe=Object.prototype,ke=Pe.hasOwnProperty,Ve=Pe.toString,Ue=Le?Le.toStringTag:void 0;var Be=function(e){var t=ke.call(e,Ue),n=e[Ue];try{e[Ue]=void 0;var r=!0}catch(e){}var o=Ve.call(e);return r&&(t?e[Ue]=n:delete e[Ue]),o},Fe=Object.prototype.toString;var Ge=function(e){return Fe.call(e)},Me=Le?Le.toStringTag:void 0;var qe=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Me&&Me in Object(e)?Be(e):Ge(e)};var Ke=function(e){return null!=e&&"object"==typeof e};var ze=function(e){return Ke(e)&&"[object Arguments]"==qe(e)},Xe=Object.prototype;Xe.hasOwnProperty,Xe.propertyIsEnumerable;ze(function(){return arguments}());var He=function(){return!1};s((function(e,t){var n=t&&!t.nodeType&&t,r=n&&e&&!e.nodeType&&e,o=r&&r.exports===n?je.Buffer:void 0,i=(o?o.isBuffer:void 0)||He;e.exports=i}));var We=s((function(e,t){var n=t&&!t.nodeType&&t,r=n&&e&&!e.nodeType&&e,o=r&&r.exports===n&&Ie.process,i=function(){try{var e=r&&r.require&&r.require("util").types;return e||o&&o.binding&&o.binding("util")}catch(e){}}();e.exports=i}));We&&We.isTypedArray;var Ye=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)};var Je=function(e){if(!Ye(e))return!1;var t=qe(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t};var $e,Ze=je["__core-js_shared__"],Qe=($e=/[^.]+$/.exec(Ze&&Ze.keys&&Ze.keys.IE_PROTO||""))?"Symbol(src)_1."+$e:"";var et=function(e){return!!Qe&&Qe in e},tt=Function.prototype.toString;var nt=function(e){if(null!=e){try{return tt.call(e)}catch(e){}try{return e+""}catch(e){}}return""},rt=/^\[object .+?Constructor\]$/,ot=Function.prototype,it=Object.prototype,st=ot.toString,at=it.hasOwnProperty,ut=RegExp("^"+st.call(at).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var ct=function(e){return!(!Ye(e)||et(e))&&(Je(e)?ut:rt).test(nt(e))};var lt=function(e,t){return null==e?void 0:e[t]};var pt=function(e,t){var n=lt(e,t);return ct(n)?n:void 0},dt=pt(Object,"create");var ft=function(){this.__data__=dt?dt(null):{},this.size=0};var ht=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},vt=Object.prototype.hasOwnProperty;var _t=function(e){var t=this.__data__;if(dt){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return vt.call(t,e)?t[e]:void 0},gt=Object.prototype.hasOwnProperty;var mt=function(e){var t=this.__data__;return dt?void 0!==t[e]:gt.call(t,e)};var bt=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=dt&&void 0===t?"__lodash_hash_undefined__":t,this};function yt(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}yt.prototype.clear=ft,yt.prototype.delete=ht,yt.prototype.get=_t,yt.prototype.has=mt,yt.prototype.set=bt;var Ot=yt;var Et=function(){this.__data__=[],this.size=0};var Nt=function(e,t){return e===t||e!=e&&t!=t};var wt=function(e,t){for(var n=e.length;n--;)if(Nt(e[n][0],t))return n;return-1},At=Array.prototype.splice;var St=function(e){var t=this.__data__,n=wt(t,e);return!(n<0)&&(n==t.length-1?t.pop():At.call(t,n,1),--this.size,!0)};var Tt=function(e){var t=this.__data__,n=wt(t,e);return n<0?void 0:t[n][1]};var Ct=function(e){return wt(this.__data__,e)>-1};var xt=function(e,t){var n=this.__data__,r=wt(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};function Dt(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Dt.prototype.clear=Et,Dt.prototype.delete=St,Dt.prototype.get=Tt,Dt.prototype.has=Ct,Dt.prototype.set=xt;var It=Dt,Rt=pt(je,"Map");var jt=function(){this.size=0,this.__data__={hash:new Ot,map:new(Rt||It),string:new Ot}};var Lt=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e};var Pt=function(e,t){var n=e.__data__;return Lt(t)?n["string"==typeof t?"string":"hash"]:n.map};var kt=function(e){var t=Pt(this,e).delete(e);return this.size-=t?1:0,t};var Vt=function(e){return Pt(this,e).get(e)};var Ut=function(e){return Pt(this,e).has(e)};var Bt=function(e,t){var n=Pt(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};function Ft(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Ft.prototype.clear=jt,Ft.prototype.delete=kt,Ft.prototype.get=Vt,Ft.prototype.has=Ut,Ft.prototype.set=Bt;var Gt=Ft;function Mt(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var s=e.apply(this,r);return n.cache=i.set(o,s)||i,s};return n.cache=new(Mt.Cache||Gt),n}Mt.Cache=Gt;var qt=Mt;var Kt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,zt=/\\(\\)?/g;(function(e){var t=qt(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache})((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(Kt,(function(e,n,r,o){t.push(r?o.replace(zt,"$1"):n||e)})),t}));var Xt=Le?Le.prototype:void 0;Xt&&Xt.toString;var Ht={next:"12.0.4",react:"17.0.2","react-dom":"17.0.2",mobx:"^6.1.3","mobx-react-lite":"^3.1.5","next-transpile-modules":"^9.0.0","@ikas/storefront-utils":"^2.0.0-alpha.1"},Wt={"@types/node":"^14.14.6","@types/react":"^16.9.55","@typescript-eslint/eslint-plugin":"^2.10.0","@typescript-eslint/parser":"^2.10.0",eslint:"^6.6.0","eslint-config-react-app":"^5.2.1","eslint-loader":"3.0.3","eslint-plugin-flowtype":"4.6.0","eslint-plugin-import":"2.20.1","eslint-plugin-jsx-a11y":"6.2.3","eslint-plugin-react":"7.19.0","eslint-plugin-react-hooks":"^1.6.1",sass:"^1.43.4",typescript:"^4.5.2"},Yt={upgradeDependencies:"yarn upgrade @ikas/storefront @ikas/storefront-utils",dev:"next dev -p 3333",build:"next build",start:"next start",generate:"ikas --generate","prettier:all":"npx prettier@^2.1 './**/src/**/*.(ts|tsx|css|scss)' --write"},Jt=function(){function i(){}return i.generate=function(e){return r(this,void 0,void 0,(function(){var t,n,r;return o(this,(function(o){switch(o.label){case 0:return[4,i.generateTsConfig()];case 1:return(r=o.sent())?[4,i.generateNextConfig()]:[3,3];case 2:r=o.sent(),o.label=3;case 3:return(n=r)?[4,i.generatePackageJson()]:[3,5];case 4:n=o.sent(),o.label=5;case 5:return(t=n)?[4,i.generateEnv(e)]:[3,7];case 6:t=o.sent(),o.label=7;case 7:return[2,t]}}))}))},i.generateTsConfig=function(){return Ce(process.cwd(),"tsconfig.json",'{\n "compilerOptions": {\n "target": "esnext",\n "lib": [\n "dom",\n "dom.iterable",\n "esnext"\n ],\n "allowJs": true,\n "skipLibCheck": true,\n "strict": true,\n "forceConsistentCasingInFileNames": true,\n "experimentalDecorators": true,\n "noEmit": true,\n "esModuleInterop": true,\n "module": "esnext",\n "moduleResolution": "node",\n "resolveJsonModule": true,\n "isolatedModules": true,\n "jsx": "preserve",\n "baseUrl": ".",\n "useUnknownInCatchVariables": false,\n "incremental": true\n },\n "typeRoots": [\n "./node_modules/@types"\n ],\n "include": [\n "next-env.d.ts",\n "**/*.ts",\n "**/*.tsx",\n "**/typings/global.d.ts",\n ],\n "exclude": [\n "node_modules",\n "./src/pages/api",\n ]\n}')},i.generateNextConfig=function(){return Ce(process.cwd(),"next.config.js",'const withTM = require("next-transpile-modules")(["@ikas/storefront"]);\n\nconst config = {\n i18n: {\n defaultLocale: "en",\n locales: ["en"],\n localeDetection: false,\n },\n basePath: process.env.NEXTJS_BASE_PATH || "",\n\n images: {\n deviceSizes: [\n 180,\n 360,\n 540,\n 720,\n 900,\n 1080,\n 1296,\n 1512,\n 1728,\n 1950,\n 2560,\n 3840,\n ],\n },\n\n webpack: (config, { buildId, dev, isServer, defaultLoaders, webpack }) => {\n if (!isServer) {\n config.resolve.fallback.fs = false;\n }\n return config;\n },\n};\n\nmodule.exports = withTM(config);')},i.generatePackageJson=function(){return r(this,void 0,void 0,(function(){var r,i,s,a,u;return o(this,(function(o){switch(o.label){case 0:return o.trys.push([0,3,,4]),r=e.join(process.cwd(),"package.json"),(i=t.readFileSync(r)).length?(s=JSON.parse(i.toString()),(a=function(e){var t="dev"===e?Wt:Ht,r="dev"===e?"devDependencies":"dependencies";s[r]&&"object"==typeof s[r]?s[r]=n(n({},s[r]),t):s[r]=t;var o,i=(o=s[r],Object.keys(o).sort().reduce((function(e,t){return e[t]=o[t],e}),{}));s[r]=i})("dev"),a("normal"),s.scripts&&"object"==typeof s.scripts?s.scripts=n(n({},s.scripts),Yt):s.scripts=Yt,[4,Ce(r,"",JSON.stringify(s,null,2))]):[3,2];case 1:return[2,o.sent()];case 2:return[3,4];case 3:return u=o.sent(),console.error(u),[2,!1];case 4:return[2]}}))}))},i.generateEnv=function(e){var t="dev"===e?"NEXT_PUBLIC_ENV=local\nNEXT_PUBLIC_BASE_URL=https://api.myikas.dev\nNEXT_PUBLIC_IMG_HOST=cdn.myikas.dev\nNEXT_PUBLIC_IMG_BASE_URL=https://cdn.myikas.dev/\nNEXT_PUBLIC_UPLOAD_GQL_URL=https://api.myikas.dev/api/admin/graphql\nNEXT_PUBLIC_GQL_URL=https://api.myikas.dev/api/sf/graphql\n":"NEXT_PUBLIC_ENV=local\nNEXT_PUBLIC_BASE_URL=https://api.myikas.com\nNEXT_PUBLIC_IMG_HOST=cdn.myikas.com\nNEXT_PUBLIC_IMG_BASE_URL=https://cdn.myikas.com/\nNEXT_PUBLIC_UPLOAD_GQL_URL=https://api.myikas.com/api/admin/graphql\nNEXT_PUBLIC_GQL_URL=https://api.myikas.com/api/sf/graphql\n";return Ce(process.cwd(),".env",t)},i}(),$t="production"!==process.env.NODE_ENV?{0:"Invalid value for configuration 'enforceActions', expected 'never', 'always' or 'observed'",1:function(e,t){return"Cannot apply '"+e+"' to '"+t.toString()+"': Field not found."},5:"'keys()' can only be used on observable objects, arrays, sets and maps",6:"'values()' can only be used on observable objects, arrays, sets and maps",7:"'entries()' can only be used on observable objects, arrays and maps",8:"'set()' can only be used on observable objects, arrays and maps",9:"'remove()' can only be used on observable objects, arrays and maps",10:"'has()' can only be used on observable objects, arrays and maps",11:"'get()' can only be used on observable objects, arrays and maps",12:"Invalid annotation",13:"Dynamic observable objects cannot be frozen",14:"Intercept handlers should return nothing or a change object",15:"Observable arrays cannot be frozen",16:"Modification exception: the internal structure of an observable array was changed.",17:function(e,t){return"[mobx.array] Index out of bounds, "+e+" is larger than "+t},18:"mobx.map requires Map polyfill for the current browser. Check babel-polyfill or core-js/es6/map.js",19:function(e){return"Cannot initialize from classes that inherit from Map: "+e.constructor.name},20:function(e){return"Cannot initialize map from "+e},21:function(e){return"Cannot convert to map from '"+e+"'"},22:"mobx.set requires Set polyfill for the current browser. Check babel-polyfill or core-js/es6/set.js",23:"It is not possible to get index atoms from arrays",24:function(e){return"Cannot obtain administration from "+e},25:function(e,t){return"the entry '"+e+"' does not exist in the observable map '"+t+"'"},26:"please specify a property",27:function(e,t){return"no observable property '"+e.toString()+"' found on the observable object '"+t+"'"},28:function(e){return"Cannot obtain atom from "+e},29:"Expecting some object",30:"invalid action stack. did you forget to finish an action?",31:"missing option for computed: get",32:function(e,t){return"Cycle detected in computation "+e+": "+t},33:function(e){return"The setter of computed value '"+e+"' is trying to update itself. Did you intend to update an _observable_ value, instead of the computed property?"},34:function(e){return"[ComputedValue '"+e+"'] It is not possible to assign a new value to a computed value."},35:"There are multiple, different versions of MobX active. Make sure MobX is loaded only once or use `configure({ isolateGlobalState: true })`",36:"isolateGlobalState should be called before MobX is running any reactions",37:function(e){return"[mobx] `observableArray."+e+"()` mutates the array in-place, which is not allowed inside a derivation. Use `array.slice()."+e+"()` instead"}}:{};function Zt(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if("production"!==process.env.NODE_ENV){var o="string"==typeof e?e:$t[e];throw"function"==typeof o&&(o=o.apply(null,n)),new Error("[MobX] "+o)}throw new Error("number"==typeof e?"[MobX] minified error nr: "+e+(n.length?" "+n.map(String).join(","):"")+". Find the full error at: https://github.com/mobxjs/mobx/blob/main/packages/mobx/src/errors.ts":"[MobX] "+e)}var Qt={};function en(){return"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:Qt}var tn=Object.assign,nn=Object.getOwnPropertyDescriptor,rn=Object.defineProperty,on=Object.prototype,sn=[];Object.freeze(sn);var an={};Object.freeze(an);var un="undefined"!=typeof Proxy,cn=Object.toString();function ln(){un||Zt("production"!==process.env.NODE_ENV?"`Proxy` objects are not available in the current environment. Please configure MobX to enable a fallback implementation.`":"Proxy not available")}function pn(e){"production"!==process.env.NODE_ENV&&to.verifyProxies&&Zt("MobX is currently configured to be able to run in ES5 mode, but in ES5 MobX won't be able to "+e)}function dn(){return++to.mobxGuid}function fn(e){var t=!1;return function(){if(!t)return t=!0,e.apply(this,arguments)}}var hn=function(){};function vn(e){return"function"==typeof e}function _n(e){switch(typeof e){case"string":case"symbol":case"number":return!0}return!1}function gn(e){return null!==e&&"object"==typeof e}function mn(e){var t;if(!gn(e))return!1;var n=Object.getPrototypeOf(e);return null==n||(null==(t=n.constructor)?void 0:t.toString())===cn}function bn(e,t,n){rn(e,t,{enumerable:!1,writable:!0,configurable:!0,value:n})}function yn(e,t,n){rn(e,t,{enumerable:!1,writable:!1,configurable:!0,value:n})}function On(e,t){var n="isMobX"+e;return t.prototype[n]=!0,function(e){return gn(e)&&!0===e[n]}}function En(e){return e instanceof Map}function Nn(e){return e instanceof Set}var wn=void 0!==Object.getOwnPropertySymbols;var An="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:wn?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames;function Sn(e){return"string"==typeof e?e:"symbol"==typeof e?e.toString():new String(e).toString()}function Tn(e){return null===e?null:"object"==typeof e?""+e:e}function Cn(e,t){return on.hasOwnProperty.call(e,t)}var xn=Object.getOwnPropertyDescriptors||function(e){var t={};return An(e).forEach((function(n){t[n]=nn(e,n)})),t};function Dn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function In(e,t,n){return t&&Dn(e.prototype,t),n&&Dn(e,n),e}function Rn(){return Rn=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Rn.apply(this,arguments)}function jn(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function Ln(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Pn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function kn(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Pn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Pn(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}var Vn=Symbol("mobx-stored-annotations");function Un(e){return Object.assign((function(t,n){Bn(t,n,e)}),e)}function Bn(e,t,n){(Cn(e,Vn)||bn(e,Vn,Rn({},e[Vn])),"production"!==process.env.NODE_ENV&&Hn(n)&&!Cn(e[Vn],t))&&Zt("'"+(e.constructor.name+".prototype."+t.toString())+"' is decorated with 'override', but no such decorated member was found on prototype.");!function(e,t,n){if("production"!==process.env.NODE_ENV&&!Hn(t)&&Cn(e[Vn],n)){var r=e.constructor.name+".prototype."+n.toString(),o=e[Vn][n].annotationType_;Zt("Cannot apply '@"+t.annotationType_+"' to '"+r+"':\nThe field is already decorated with '@"+o+"'.\nRe-decorating fields is not allowed.\nUse '@override' decorator for methods overriden by subclass.")}}(e,n,t),Hn(n)||(e[Vn][t]=Rn({},n,{isDecorator_:!0}))}var Fn=Symbol("mobx administration"),Gn=function(){function e(e){void 0===e&&(e="Atom@"+dn()),this.name_=void 0,this.isPendingUnobservation_=!1,this.isBeingObserved_=!1,this.observers_=new Set,this.diffValue_=0,this.lastAccessedBy_=0,this.lowestObserverState_=Vr.NOT_TRACKING_,this.onBOL=void 0,this.onBUOL=void 0,this.name_=e}var t=e.prototype;return t.onBO=function(){this.onBOL&&this.onBOL.forEach((function(e){return e()}))},t.onBUO=function(){this.onBUOL&&this.onBUOL.forEach((function(e){return e()}))},t.reportObserved=function(){return ao(this)},t.reportChanged=function(){io(),uo(this),so()},t.toString=function(){return this.name_},e}(),Mn=On("Atom",Gn);function qn(e,t,n){void 0===t&&(t=hn),void 0===n&&(n=hn);var r,o=new Gn(e);return t!==hn&&Ro("onBO",o,t,r),n!==hn&&Io(o,n),o}var Kn={identity:function(e,t){return e===t},structural:function(e,t){return qi(e,t)},default:function(e,t){return Object.is(e,t)},shallow:function(e,t){return qi(e,t,1)}};function zn(e,t,n){return Mo(e)?e:Array.isArray(e)?Er.array(e,{name:n}):mn(e)?Er.object(e,void 0,{name:n}):En(e)?Er.map(e,{name:n}):Nn(e)?Er.set(e,{name:n}):e}function Xn(e){return e}function Hn(e){return"override"===e.annotationType_}function Wn(e,t){return{annotationType_:e,options_:t,make_:Yn,extend_:Jn}}function Yn(e,t){for(var n,r,o=!1,i=e.target_,s=null!=(n=null==(r=this.options_)?void 0:r.bound)&&n;i&&i!==on;){var a=nn(i,t);if(a){if(i===e.target_||s){var u=$n(e,this,t,a);if(!e.defineProperty_(t,u))return;if(o=!0,s)break}if(i!==e.target_){if(xo(a.value)){o=!0;break}var c=$n(e,this,t,a,!1);rn(i,t,c),o=!0}}i=Object.getPrototypeOf(i)}o?xi(e,this,t):this.isDecorator_||Zt(1,this.annotationType_,e.name_+"."+t.toString())}function Jn(e,t,n,r){var o=$n(e,this,t,n);return e.defineProperty_(t,o,r)}function $n(e,t,n,r,o){var i,s,a,u,c;void 0===o&&(o=to.safeDescriptors),function(e,t,n,r){var o=t.annotationType_,i=r.value;"production"===process.env.NODE_ENV||vn(i)||Zt("Cannot apply '"+o+"' to '"+e.name_+"."+n.toString()+"':\n'"+o+"' can only be used on properties with a function value.")}(e,t,n,r);var l,p=r.value;(null==(i=t.options_)?void 0:i.bound)&&(p=p.bind(null!=(l=e.proxy_)?l:e.target_));return{value:Ir(null!=(s=null==(a=t.options_)?void 0:a.name)?s:n.toString(),p,null!=(u=null==(c=t.options_)?void 0:c.autoAction)&&u),configurable:!o||e.isPlainObject_,enumerable:!1,writable:!o}}function Zn(e,t){return{annotationType_:e,options_:t,make_:Qn,extend_:er}}function Qn(e,t){for(var n=!1,r=e.target_;r&&r!==on;){var o=nn(r,t);if(o){if(r!==e.target_){if(Fo(o.value)){n=!0;break}var i=tr(e,this,t,o,!1);rn(r,t,i)}else{var s=tr(e,this,t,o);if(!e.defineProperty_(t,s))return}n=!0}r=Object.getPrototypeOf(r)}n?xi(e,this,t):this.isDecorator_||Zt(1,this.annotationType_,e.name_+"."+t.toString())}function er(e,t,n,r){var o=tr(e,this,t,n);return e.defineProperty_(t,o,r)}function tr(e,t,n,r,o){return void 0===o&&(o=to.safeDescriptors),function(e,t,n,r){var o=t.annotationType_,i=r.value;"production"===process.env.NODE_ENV||vn(i)||Zt("Cannot apply '"+o+"' to '"+e.name_+"."+n.toString()+"':\n'"+o+"' can only be used on properties with a generator function value.")}(e,t,n,r),{value:Uo(r.value),configurable:!o||e.isPlainObject_,enumerable:!1,writable:!o}}function nr(e,t){return{annotationType_:e,options_:t,make_:rr,extend_:or}}function rr(e,t){for(var n=e.target_;n&&n!==on;){var r=nn(n,t);if(r){if(ir(e,this,t,r),!e.defineComputedProperty_(t,Rn({},this.options_,{get:r.get,set:r.set})))return;return void xi(e,this,t)}n=Object.getPrototypeOf(n)}this.isDecorator_||Zt(1,this.annotationType_,e.name_+"."+t.toString())}function or(e,t,n,r){return ir(e,this,t,n),e.defineComputedProperty_(t,Rn({},this.options_,{get:n.get,set:n.set}),r)}function ir(e,t,n,r){var o=t.annotationType_,i=r.get;"production"===process.env.NODE_ENV||i||Zt("Cannot apply '"+o+"' to '"+e.name_+"."+n.toString()+"':\n'"+o+"' can only be used on getter(+setter) properties.")}function sr(e,t){return{annotationType_:e,options_:t,make_:ar,extend_:ur}}function ar(e,t){for(var n=e.target_;n&&n!==on;){var r=nn(n,t);if(r){var o,i;if(cr(e,this,t,r),!e.defineObservableProperty_(t,r.value,null!=(o=null==(i=this.options_)?void 0:i.enhancer)?o:zn))return;return void xi(e,this,t)}n=Object.getPrototypeOf(n)}this.isDecorator_||Zt(1,this.annotationType_,e.name_+"."+t.toString())}function ur(e,t,n,r){var o,i;return cr(e,this,t,n),e.defineObservableProperty_(t,n.value,null!=(o=null==(i=this.options_)?void 0:i.enhancer)?o:zn,r)}function cr(e,t,n,r){var o=t.annotationType_;"production"===process.env.NODE_ENV||"value"in r||Zt("Cannot apply '"+o+"' to '"+e.name_+"."+n.toString()+"':\n'"+o+"' cannot be used on getter/setter properties")}var lr={deep:!0,name:void 0,defaultDecorator:void 0,proxy:!0};function pr(e){return e||lr}Object.freeze(lr);var dr=sr("observable"),fr=sr("observable.ref",{enhancer:Xn}),hr=sr("observable.shallow",{enhancer:function(e,t,n){return null==e||Ci(e)||di(e)||mi(e)||Oi(e)?e:Array.isArray(e)?Er.array(e,{name:n,deep:!1}):mn(e)?Er.object(e,void 0,{name:n,deep:!1}):En(e)?Er.map(e,{name:n,deep:!1}):Nn(e)?Er.set(e,{name:n,deep:!1}):void("production"!==process.env.NODE_ENV&&Zt("The shallow modifier / decorator can only used in combination with arrays, objects, maps and sets"))}}),vr=sr("observable.struct",{enhancer:function(e,t){return"production"!==process.env.NODE_ENV&&Mo(e)&&Zt("observable.struct should not be used with observable values"),qi(e,t)?t:e}}),_r=Un(dr);function gr(e){return!0===e.deep?zn:!1===e.deep?Xn:(t=e.defaultDecorator)&&null!=(n=null==(r=t.options_)?void 0:r.enhancer)?n:zn;var t,n,r}function mr(e,t,n){if(!_n(t))return Mo(e)?e:mn(e)?Er.object(e,t,n):Array.isArray(e)?Er.array(e,t):En(e)?Er.map(e,t):Nn(e)?Er.set(e,t):"object"==typeof e&&null!==e?e:Er.box(e);Bn(e,t,dr)}Object.assign(mr,_r);var br,yr,Or={box:function(e,t){var n=pr(t);return new kr(e,gr(n),n.name,!0,n.equals)},array:function(e,t){var n=pr(t);return(!1===to.useProxies||!1===n.proxy?Ui:ri)(e,gr(n),n.name)},map:function(e,t){var n=pr(t);return new gi(e,gr(n),n.name)},set:function(e,t){var n=pr(t);return new yi(e,gr(n),n.name)},object:function(e,t,n){return jo(!1===to.useProxies||!1===(null==n?void 0:n.proxy)?Ai({},n):function(e,t){var n,r;return ln(),e=Ai(e,t),null!=(r=(n=e[Fn]).proxy_)?r:n.proxy_=new Proxy(e,Xo)}({},n),e,t)},ref:Un(fr),shallow:Un(hr),deep:_r,struct:Un(vr)},Er=tn(mr,Or),Nr=nr("computed"),wr=nr("computed.struct",{equals:Kn.structural}),Ar=function(e,t){if(_n(t))return Bn(e,t,Nr);if(mn(e))return Un(nr("computed",e));"production"!==process.env.NODE_ENV&&(vn(e)||Zt("First argument to `computed` should be an expression."),vn(t)&&Zt("A setter as second argument is no longer supported, use `{ set: fn }` option instead"));var n=mn(t)?t:{};return n.get=e,n.name=n.name||e.name||"",new Br(n)};Object.assign(Ar,Nr),Ar.struct=Un(wr);var Sr,Tr=0,Cr=1,xr=null!=(br=null==(yr=nn((function(){}),"name"))?void 0:yr.configurable)&&br,Dr={value:"action",configurable:!0,writable:!1,enumerable:!1};function Ir(e,t,n,r){function o(){return Rr(e,n,t,r||this,arguments)}return void 0===n&&(n=!1),"production"!==process.env.NODE_ENV&&(vn(t)||Zt("`action` can only be invoked on functions"),"string"==typeof e&&e||Zt("actions should have valid names, got: '"+e+"'")),o.isMobxAction=!0,xr&&(Dr.value=e,Object.defineProperty(o,"name",Dr)),o}function Rr(e,t,n,r,o){var i=function(e,t,n,r){var o="production"!==process.env.NODE_ENV&&_o()&&!!e,i=0;if("production"!==process.env.NODE_ENV&&o){i=Date.now();var s=r?Array.from(r):sn;mo({type:Oo,name:e,object:n,arguments:s})}var a=to.trackingDerivation,u=!t||!a;io();var c=to.allowStateChanges;u&&(Wr(),c=jr(!0));var l=Jr(!0),p={runAsAction_:u,prevDerivation_:a,prevAllowStateChanges_:c,prevAllowStateReads_:l,notifySpy_:o,startTime_:i,actionId_:Cr++,parentActionId_:Tr};return Tr=p.actionId_,p}(e,t,r,o);try{return n.apply(r,o)}catch(e){throw i.error_=e,e}finally{!function(e){Tr!==e.actionId_&&Zt(30);Tr=e.parentActionId_,void 0!==e.error_&&(to.suppressReactionErrors=!0);Lr(e.prevAllowStateChanges_),$r(e.prevAllowStateReads_),so(),e.runAsAction_&&Yr(e.prevDerivation_);"production"!==process.env.NODE_ENV&&e.notifySpy_&&yo({time:Date.now()-e.startTime_});to.suppressReactionErrors=!1}(i)}}function jr(e){var t=to.allowStateChanges;return to.allowStateChanges=e,t}function Lr(e){to.allowStateChanges=e}Sr=Symbol.toPrimitive;var Pr,kr=function(e){function t(t,n,r,o,i){var s;return void 0===r&&(r="ObservableValue@"+dn()),void 0===o&&(o=!0),void 0===i&&(i=Kn.default),(s=e.call(this,r)||this).enhancer=void 0,s.name_=void 0,s.equals=void 0,s.hasUnreportedChange_=!1,s.interceptors_=void 0,s.changeListeners_=void 0,s.value_=void 0,s.dehancer=void 0,s.enhancer=n,s.name_=r,s.equals=i,s.value_=n(t,void 0,r),"production"!==process.env.NODE_ENV&&o&&_o()&&go({type:"create",object:Ln(s),observableKind:"value",debugObjectName:s.name_,newValue:""+s.value_}),s}jn(t,e);var n=t.prototype;return n.dehanceValue=function(e){return void 0!==this.dehancer?this.dehancer(e):e},n.set=function(e){var t=this.value_;if((e=this.prepareNewValue_(e))!==to.UNCHANGED){var n=_o();"production"!==process.env.NODE_ENV&&n&&mo({type:ei,object:this,observableKind:"value",debugObjectName:this.name_,newValue:e,oldValue:t}),this.setNewValue_(e),"production"!==process.env.NODE_ENV&&n&&yo()}},n.prepareNewValue_=function(e){if(Kr(this),Ho(this)){var t=Yo(this,{object:this,type:ei,newValue:e});if(!t)return to.UNCHANGED;e=t.newValue}return e=this.enhancer(e,this.value_,this.name_),this.equals(this.value_,e)?to.UNCHANGED:e},n.setNewValue_=function(e){var t=this.value_;this.value_=e,this.reportChanged(),Jo(this)&&Zo(this,{type:ei,object:this,newValue:e,oldValue:t})},n.get=function(){return this.reportObserved(),this.dehanceValue(this.value_)},n.intercept_=function(e){return Wo(this,e)},n.observe_=function(e,t){return t&&e({observableKind:"value",debugObjectName:this.name_,object:this,type:ei,newValue:this.value_,oldValue:void 0}),$o(this,e)},n.raw=function(){return this.value_},n.toJSON=function(){return this.get()},n.toString=function(){return this.name_+"["+this.value_+"]"},n.valueOf=function(){return Tn(this.get())},n[Sr]=function(){return this.valueOf()},t}(Gn);Pr=Symbol.toPrimitive;var Vr,Ur,Br=function(){function e(e){this.dependenciesState_=Vr.NOT_TRACKING_,this.observing_=[],this.newObserving_=null,this.isBeingObserved_=!1,this.isPendingUnobservation_=!1,this.observers_=new Set,this.diffValue_=0,this.runId_=0,this.lastAccessedBy_=0,this.lowestObserverState_=Vr.UP_TO_DATE_,this.unboundDepsCount_=0,this.mapid_="#"+dn(),this.value_=new Gr(null),this.name_=void 0,this.triggeredBy_=void 0,this.isComputing_=!1,this.isRunningSetter_=!1,this.derivation=void 0,this.setter_=void 0,this.isTracing_=Ur.NONE,this.scope_=void 0,this.equals_=void 0,this.requiresReaction_=void 0,this.keepAlive_=void 0,this.onBOL=void 0,this.onBUOL=void 0,e.get||Zt(31),this.derivation=e.get,this.name_=e.name||"ComputedValue@"+dn(),e.set&&(this.setter_=Ir(this.name_+"-setter",e.set)),this.equals_=e.equals||(e.compareStructural||e.struct?Kn.structural:Kn.default),this.scope_=e.context,this.requiresReaction_=!!e.requiresReaction,this.keepAlive_=!!e.keepAlive}var t=e.prototype;return t.onBecomeStale_=function(){!function(e){if(e.lowestObserverState_!==Vr.UP_TO_DATE_)return;e.lowestObserverState_=Vr.POSSIBLY_STALE_,e.observers_.forEach((function(t){t.dependenciesState_===Vr.UP_TO_DATE_&&(t.dependenciesState_=Vr.POSSIBLY_STALE_,"production"!==process.env.NODE_ENV&&t.isTracing_!==Ur.NONE&&co(t,e),t.onBecomeStale_())}))}(this)},t.onBO=function(){this.onBOL&&this.onBOL.forEach((function(e){return e()}))},t.onBUO=function(){this.onBUOL&&this.onBUOL.forEach((function(e){return e()}))},t.get=function(){if(this.isComputing_&&Zt(32,this.name_,this.derivation),0!==to.inBatch||0!==this.observers_.size||this.keepAlive_){if(ao(this),qr(this)){var e=to.trackingContext;this.keepAlive_&&!e&&(to.trackingContext=this),this.trackAndCompute()&&function(e){if(e.lowestObserverState_===Vr.STALE_)return;e.lowestObserverState_=Vr.STALE_,e.observers_.forEach((function(t){t.dependenciesState_===Vr.POSSIBLY_STALE_?t.dependenciesState_=Vr.STALE_:t.dependenciesState_===Vr.UP_TO_DATE_&&(e.lowestObserverState_=Vr.UP_TO_DATE_)}))}(this),to.trackingContext=e}}else qr(this)&&(this.warnAboutUntrackedRead_(),io(),this.value_=this.computeValue_(!1),so());var t=this.value_;if(Mr(t))throw t.cause;return t},t.set=function(e){if(this.setter_){this.isRunningSetter_&&Zt(33,this.name_),this.isRunningSetter_=!0;try{this.setter_.call(this.scope_,e)}finally{this.isRunningSetter_=!1}}else Zt(34,this.name_)},t.trackAndCompute=function(){var e=this.value_,t=this.dependenciesState_===Vr.NOT_TRACKING_,n=this.computeValue_(!0);"production"!==process.env.NODE_ENV&&_o()&&go({observableKind:"computed",debugObjectName:this.name_,object:this.scope_,type:"update",oldValue:this.value_,newValue:n});var r=t||Mr(e)||Mr(n)||!this.equals_(e,n);return r&&(this.value_=n),r},t.computeValue_=function(e){this.isComputing_=!0;var t,n=jr(!1);if(e)t=zr(this,this.derivation,this.scope_);else if(!0===to.disableErrorBoundaries)t=this.derivation.call(this.scope_);else try{t=this.derivation.call(this.scope_)}catch(e){t=new Gr(e)}return Lr(n),this.isComputing_=!1,t},t.suspend_=function(){this.keepAlive_||(Xr(this),this.value_=void 0)},t.observe_=function(e,t){var n=this,r=!0,o=void 0;return function(e,t){void 0===t&&(t=an);"production"!==process.env.NODE_ENV&&(vn(e)||Zt("Autorun expects a function as first argument"),xo(e)&&Zt("Autorun does not accept actions since actions are untrackable"));var n,r=t&&t.name||e.name||"Autorun@"+dn();if(t.scheduler||t.delay){var o=function(e){return e.scheduler?e.scheduler:e.delay?function(t){return setTimeout(t,e.delay)}:Do}(t),i=!1;n=new po(r,(function(){i||(i=!0,o((function(){i=!1,n.isDisposed_||n.track(s)})))}),t.onError,t.requiresObservable)}else n=new po(r,(function(){this.track(s)}),t.onError,t.requiresObservable);function s(){e(n)}return n.schedule_(),n.getDisposer_()}((function(){var i=n.get();if(!r||t){var s=Wr();e({observableKind:"computed",debugObjectName:n.name_,type:ei,object:n,newValue:i,oldValue:o}),Yr(s)}r=!1,o=i}))},t.warnAboutUntrackedRead_=function(){"production"!==process.env.NODE_ENV&&(!0===this.requiresReaction_&&Zt("[mobx] Computed value "+this.name_+" is read outside a reactive context"),this.isTracing_!==Ur.NONE&&console.log("[mobx.trace] '"+this.name_+"' is being read outside a reactive context. Doing a full recompute"),to.computedRequiresReaction&&console.warn("[mobx] Computed value "+this.name_+" is being read outside a reactive context. Doing a full recompute"))},t.toString=function(){return this.name_+"["+this.derivation.toString()+"]"},t.valueOf=function(){return Tn(this.get())},t[Pr]=function(){return this.valueOf()},e}(),Fr=On("ComputedValue",Br);!function(e){e[e.NOT_TRACKING_=-1]="NOT_TRACKING_",e[e.UP_TO_DATE_=0]="UP_TO_DATE_",e[e.POSSIBLY_STALE_=1]="POSSIBLY_STALE_",e[e.STALE_=2]="STALE_"}(Vr||(Vr={})),function(e){e[e.NONE=0]="NONE",e[e.LOG=1]="LOG",e[e.BREAK=2]="BREAK"}(Ur||(Ur={}));var Gr=function(e){this.cause=void 0,this.cause=e};function Mr(e){return e instanceof Gr}function qr(e){switch(e.dependenciesState_){case Vr.UP_TO_DATE_:return!1;case Vr.NOT_TRACKING_:case Vr.STALE_:return!0;case Vr.POSSIBLY_STALE_:for(var t=Jr(!0),n=Wr(),r=e.observing_,o=r.length,i=0;i<o;i++){var s=r[i];if(Fr(s)){if(to.disableErrorBoundaries)s.get();else try{s.get()}catch(e){return Yr(n),$r(t),!0}if(e.dependenciesState_===Vr.STALE_)return Yr(n),$r(t),!0}}return Zr(e),Yr(n),$r(t),!1}}function Kr(e){if("production"!==process.env.NODE_ENV){var t=e.observers_.size>0;to.allowStateChanges||!t&&"always"!==to.enforceActions||console.warn("[MobX] "+(to.enforceActions?"Since strict-mode is enabled, changing (observed) observable values without using an action is not allowed. Tried to modify: ":"Side effects like changing state are not allowed at this point. Are you trying to modify state from, for example, a computed value or the render function of a React component? You can wrap side effects in 'runInAction' (or decorate functions with 'action') if needed. Tried to modify: ")+e.name_)}}function zr(e,t,n){var r=Jr(!0);Zr(e),e.newObserving_=new Array(e.observing_.length+100),e.unboundDepsCount_=0,e.runId_=++to.runId;var o,i=to.trackingDerivation;if(to.trackingDerivation=e,to.inBatch++,!0===to.disableErrorBoundaries)o=t.call(n);else try{o=t.call(n)}catch(e){o=new Gr(e)}return to.inBatch--,to.trackingDerivation=i,function(e){for(var t=e.observing_,n=e.observing_=e.newObserving_,r=Vr.UP_TO_DATE_,o=0,i=e.unboundDepsCount_,s=0;s<i;s++){var a=n[s];0===a.diffValue_&&(a.diffValue_=1,o!==s&&(n[o]=a),o++),a.dependenciesState_>r&&(r=a.dependenciesState_)}n.length=o,e.newObserving_=null,i=t.length;for(;i--;){var u=t[i];0===u.diffValue_&&ro(u,e),u.diffValue_=0}for(;o--;){var c=n[o];1===c.diffValue_&&(c.diffValue_=0,no(c,e))}r!==Vr.UP_TO_DATE_&&(e.dependenciesState_=r,e.onBecomeStale_())}(e),function(e){if("production"===process.env.NODE_ENV)return;if(0!==e.observing_.length)return;(to.reactionRequiresObservable||e.requiresObservable_)&&console.warn("[mobx] Derivation "+e.name_+" is created/updated without reading any observable value")}(e),$r(r),o}function Xr(e){var t=e.observing_;e.observing_=[];for(var n=t.length;n--;)ro(t[n],e);e.dependenciesState_=Vr.NOT_TRACKING_}function Hr(e){var t=Wr();try{return e()}finally{Yr(t)}}function Wr(){var e=to.trackingDerivation;return to.trackingDerivation=null,e}function Yr(e){to.trackingDerivation=e}function Jr(e){var t=to.allowStateReads;return to.allowStateReads=e,t}function $r(e){to.allowStateReads=e}function Zr(e){if(e.dependenciesState_!==Vr.UP_TO_DATE_){e.dependenciesState_=Vr.UP_TO_DATE_;for(var t=e.observing_,n=t.length;n--;)t[n].lowestObserverState_=Vr.UP_TO_DATE_}}var Qr=function(){this.version=6,this.UNCHANGED={},this.trackingDerivation=null,this.trackingContext=null,this.runId=0,this.mobxGuid=0,this.inBatch=0,this.pendingUnobservations=[],this.pendingReactions=[],this.isRunningReactions=!1,this.allowStateChanges=!1,this.allowStateReads=!0,this.enforceActions=!0,this.spyListeners=[],this.globalReactionErrorHandlers=[],this.computedRequiresReaction=!1,this.reactionRequiresObservable=!1,this.observableRequiresReaction=!1,this.disableErrorBoundaries=!1,this.suppressReactionErrors=!1,this.useProxies=!0,this.verifyProxies=!1,this.safeDescriptors=!0},eo=!0,to=function(){var e=en();return e.__mobxInstanceCount>0&&!e.__mobxGlobals&&(eo=!1),e.__mobxGlobals&&e.__mobxGlobals.version!==(new Qr).version&&(eo=!1),eo?e.__mobxGlobals?(e.__mobxInstanceCount+=1,e.__mobxGlobals.UNCHANGED||(e.__mobxGlobals.UNCHANGED={}),e.__mobxGlobals):(e.__mobxInstanceCount=1,e.__mobxGlobals=new Qr):(setTimeout((function(){Zt(35)}),1),new Qr)}();function no(e,t){e.observers_.add(t),e.lowestObserverState_>t.dependenciesState_&&(e.lowestObserverState_=t.dependenciesState_)}function ro(e,t){e.observers_.delete(t),0===e.observers_.size&&oo(e)}function oo(e){!1===e.isPendingUnobservation_&&(e.isPendingUnobservation_=!0,to.pendingUnobservations.push(e))}function io(){to.inBatch++}function so(){if(0==--to.inBatch){fo();for(var e=to.pendingUnobservations,t=0;t<e.length;t++){var n=e[t];n.isPendingUnobservation_=!1,0===n.observers_.size&&(n.isBeingObserved_&&(n.isBeingObserved_=!1,n.onBUO()),n instanceof Br&&n.suspend_())}to.pendingUnobservations=[]}}function ao(e){!function(e){"production"!==process.env.NODE_ENV&&!to.allowStateReads&&to.observableRequiresReaction&&console.warn("[mobx] Observable "+e.name_+" being read outside a reactive context")}(e);var t=to.trackingDerivation;return null!==t?(t.runId_!==e.lastAccessedBy_&&(e.lastAccessedBy_=t.runId_,t.newObserving_[t.unboundDepsCount_++]=e,!e.isBeingObserved_&&to.trackingContext&&(e.isBeingObserved_=!0,e.onBO())),!0):(0===e.observers_.size&&to.inBatch>0&&oo(e),!1)}function uo(e){e.lowestObserverState_!==Vr.STALE_&&(e.lowestObserverState_=Vr.STALE_,e.observers_.forEach((function(t){t.dependenciesState_===Vr.UP_TO_DATE_&&("production"!==process.env.NODE_ENV&&t.isTracing_!==Ur.NONE&&co(t,e),t.onBecomeStale_()),t.dependenciesState_=Vr.STALE_})))}function co(e,t){if(console.log("[mobx.trace] '"+e.name_+"' is invalidated due to a change in: '"+t.name_+"'"),e.isTracing_===Ur.BREAK){var n=[];lo(Lo(Bi(e,r)),n,1),new Function("debugger;\n/*\nTracing '"+e.name_+"'\n\nYou are entering this break point because derivation '"+e.name_+"' is being traced and '"+t.name_+"' is now forcing it to update.\nJust follow the stacktrace you should now see in the devtools to see precisely what piece of your code is causing this update\nThe stackframe you are looking for is at least ~6-8 stack-frames up.\n\n"+(e instanceof Br?e.derivation.toString().replace(/[*]\//g,"/"):"")+"\n\nThe dependencies for this derivation are:\n\n"+n.join("\n")+"\n*/\n ")()}var r}function lo(e,t,n){t.length>=1e3?t.push("(and many more)"):(t.push(""+new Array(n).join("\t")+e.name),e.dependencies&&e.dependencies.forEach((function(e){return lo(e,t,n+1)})))}var po=function(){function e(e,t,n,r){void 0===e&&(e="Reaction@"+dn()),void 0===r&&(r=!1),this.name_=void 0,this.onInvalidate_=void 0,this.errorHandler_=void 0,this.requiresObservable_=void 0,this.observing_=[],this.newObserving_=[],this.dependenciesState_=Vr.NOT_TRACKING_,this.diffValue_=0,this.runId_=0,this.unboundDepsCount_=0,this.mapid_="#"+dn(),this.isDisposed_=!1,this.isScheduled_=!1,this.isTrackPending_=!1,this.isRunning_=!1,this.isTracing_=Ur.NONE,this.name_=e,this.onInvalidate_=t,this.errorHandler_=n,this.requiresObservable_=r}var t=e.prototype;return t.onBecomeStale_=function(){this.schedule_()},t.schedule_=function(){this.isScheduled_||(this.isScheduled_=!0,to.pendingReactions.push(this),fo())},t.isScheduled=function(){return this.isScheduled_},t.runReaction_=function(){if(!this.isDisposed_){io(),this.isScheduled_=!1;var e=to.trackingContext;if(to.trackingContext=this,qr(this)){this.isTrackPending_=!0;try{this.onInvalidate_(),"production"!==process.env.NODE_ENV&&this.isTrackPending_&&_o()&&go({name:this.name_,type:"scheduled-reaction"})}catch(e){this.reportExceptionInDerivation_(e)}}to.trackingContext=e,so()}},t.track=function(e){if(!this.isDisposed_){io();var t,n=_o();"production"!==process.env.NODE_ENV&&n&&(t=Date.now(),mo({name:this.name_,type:"reaction"})),this.isRunning_=!0;var r=to.trackingContext;to.trackingContext=this;var o=zr(this,e,void 0);to.trackingContext=r,this.isRunning_=!1,this.isTrackPending_=!1,this.isDisposed_&&Xr(this),Mr(o)&&this.reportExceptionInDerivation_(o.cause),"production"!==process.env.NODE_ENV&&n&&yo({time:Date.now()-t}),so()}},t.reportExceptionInDerivation_=function(e){var t=this;if(this.errorHandler_)this.errorHandler_(e,this);else{if(to.disableErrorBoundaries)throw e;var n="production"!==process.env.NODE_ENV?"[mobx] Encountered an uncaught exception that was thrown by a reaction or observer component, in: '"+this+"'":"[mobx] uncaught error in '"+this+"'";to.suppressReactionErrors?"production"!==process.env.NODE_ENV&&console.warn("[mobx] (error in reaction '"+this.name_+"' suppressed, fix error of causing action below)"):console.error(n,e),"production"!==process.env.NODE_ENV&&_o()&&go({type:"error",name:this.name_,message:n,error:""+e}),to.globalReactionErrorHandlers.forEach((function(n){return n(e,t)}))}},t.dispose=function(){this.isDisposed_||(this.isDisposed_=!0,this.isRunning_||(io(),Xr(this),so()))},t.getDisposer_=function(){var e=this.dispose.bind(this);return e[Fn]=this,e},t.toString=function(){return"Reaction["+this.name_+"]"},t.trace=function(e){void 0===e&&(e=!1),function(){"production"===process.env.NODE_ENV&&Zt("trace() is not available in production builds");for(var e=!1,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];"boolean"==typeof n[n.length-1]&&(e=n.pop());var o=qo(n);if(!o)return Zt("'trace(break?)' can only be used inside a tracked computed value or a Reaction. Consider passing in the computed value or reaction explicitly");o.isTracing_===Ur.NONE&&console.log("[mobx.trace] '"+o.name_+"' tracing enabled");o.isTracing_=e?Ur.BREAK:Ur.LOG}(this,e)},e}();function fo(){to.inBatch>0||to.isRunningReactions||ho()}function ho(){to.isRunningReactions=!0;for(var e=to.pendingReactions,t=0;e.length>0;){100==++t&&(console.error("production"!==process.env.NODE_ENV?"Reaction doesn't converge to a stable state after 100 iterations. Probably there is a cycle in the reactive function: "+e[0]:"[mobx] cycle in reaction: "+e[0]),e.splice(0));for(var n=e.splice(0),r=0,o=n.length;r<o;r++)n[r].runReaction_()}to.isRunningReactions=!1}var vo=On("Reaction",po);function _o(){return"production"!==process.env.NODE_ENV&&!!to.spyListeners.length}function go(e){if("production"!==process.env.NODE_ENV&&to.spyListeners.length)for(var t=to.spyListeners,n=0,r=t.length;n<r;n++)t[n](e)}function mo(e){"production"!==process.env.NODE_ENV&&go(Rn({},e,{spyReportStart:!0}))}var bo={type:"report-end",spyReportEnd:!0};function yo(e){"production"!==process.env.NODE_ENV&&go(e?Rn({},e,{type:"report-end",spyReportEnd:!0}):bo)}var Oo="action",Eo=Wn(Oo),No=Wn("action.bound",{bound:!0}),wo=Wn("autoAction",{autoAction:!0}),Ao=Wn("autoAction.bound",{autoAction:!0,bound:!0});function So(e){return function(t,n){return vn(t)?Ir(t.name||"<unnamed action>",t,e):vn(n)?Ir(t,n,e):_n(n)?Bn(t,n,e?wo:Eo):_n(t)?Un(Wn(e?"autoAction":Oo,{name:t,autoAction:e})):void("production"!==process.env.NODE_ENV&&Zt("Invalid arguments for `action`"))}}var To=So(!1);Object.assign(To,Eo);var Co=So(!0);function xo(e){return vn(e)&&!0===e.isMobxAction}Object.assign(Co,wo),To.bound=Un(No),Co.bound=Un(Ao);var Do=function(e){return e()};function Io(e,t,n){return Ro("onBUO",e,t,n)}function Ro(e,t,n,r){var o="function"==typeof r?Bi(t,n):Bi(t),i=vn(r)?r:n,s=e+"L";return o[s]?o[s].add(i):o[s]=new Set([i]),function(){var e=o[s];e&&(e.delete(i),0===e.size&&delete o[s])}}function jo(e,t,n,r){"production"!==process.env.NODE_ENV&&(arguments.length>4&&Zt("'extendObservable' expected 2-4 arguments"),"object"!=typeof e&&Zt("'extendObservable' expects an object as first argument"),mi(e)&&Zt("'extendObservable' should not be used on maps, use map.merge instead"),mn(t)||Zt("'extendObservabe' only accepts plain objects as second argument"),(Mo(t)||Mo(n))&&Zt("Extending an object with another observable (object) is not supported"));var o=xn(t),i=Ai(e,r)[Fn];io();try{An(o).forEach((function(e){i.extend_(e,o[e],!n||(!(e in n)||n[e]))}))}finally{so()}return e}function Lo(e){var t,n={name:e.name_};return e.observing_&&e.observing_.length>0&&(n.dependencies=(t=e.observing_,Array.from(new Set(t))).map(Lo)),n}var Po=0;function ko(){this.message="FLOW_CANCELLED"}ko.prototype=Object.create(Error.prototype);var Vo=Zn("flow"),Uo=Object.assign((function(e,t){if(_n(t))return Bn(e,t,Vo);"production"!==process.env.NODE_ENV&&1!==arguments.length&&Zt("Flow expects single argument with generator function");var n=e,r=n.name||"<unnamed flow>",o=function(){var e,t=this,o=arguments,i=++Po,s=To(r+" - runid: "+i+" - init",n).apply(t,o),a=void 0,u=new Promise((function(t,n){var o=0;function u(e){var t;a=void 0;try{t=To(r+" - runid: "+i+" - yield "+o++,s.next).call(s,e)}catch(e){return n(e)}l(t)}function c(e){var t;a=void 0;try{t=To(r+" - runid: "+i+" - yield "+o++,s.throw).call(s,e)}catch(e){return n(e)}l(t)}function l(e){if(!vn(null==e?void 0:e.then))return e.done?t(e.value):(a=Promise.resolve(e.value)).then(u,c);e.then(l,n)}e=n,u(void 0)}));return u.cancel=To(r+" - runid: "+i+" - cancel",(function(){try{a&&Bo(a);var t=s.return(void 0),n=Promise.resolve(t.value);n.then(hn,hn),Bo(n),e(new ko)}catch(t){e(t)}})),u};return o.isMobXFlow=!0,o}),Vo);function Bo(e){vn(e.cancel)&&e.cancel()}function Fo(e){return!0===(null==e?void 0:e.isMobXFlow)}function Go(e,t){return!!e&&(void 0!==t?"production"!==process.env.NODE_ENV&&(mi(e)||di(e))?Zt("isObservable(object, propertyName) is not supported for arrays and maps. Use map.has or array.length instead."):!!Ci(e)&&e[Fn].values_.has(t):Ci(e)||!!e[Fn]||Mn(e)||vo(e)||Fr(e))}function Mo(e){return"production"!==process.env.NODE_ENV&&1!==arguments.length&&Zt("isObservable expects only 1 argument. Use isObservableProp to inspect the observability of a property"),Go(e)}function qo(e){switch(e.length){case 0:return to.trackingDerivation;case 1:return Bi(e[0]);case 2:return Bi(e[0],e[1])}}function Ko(e,t){void 0===t&&(t=void 0),io();try{return e.apply(t)}finally{so()}}function zo(e){return e[Fn]}var Xo={has:function(e,t){return"production"!==process.env.NODE_ENV&&to.trackingDerivation&&pn("detect new properties using the 'in' operator. Use 'has' from 'mobx' instead."),zo(e).has_(t)},get:function(e,t){return zo(e).get_(t)},set:function(e,t,n){var r;return!!_n(t)&&("production"===process.env.NODE_ENV||zo(e).values_.has(t)||pn("add a new observable property through direct assignment. Use 'set' from 'mobx' instead."),null==(r=zo(e).set_(t,n,!0))||r)},deleteProperty:function(e,t){var n;return"production"!==process.env.NODE_ENV&&pn("delete properties from an observable object. Use 'remove' from 'mobx' instead."),!!_n(t)&&(null==(n=zo(e).delete_(t,!0))||n)},defineProperty:function(e,t,n){var r;return"production"!==process.env.NODE_ENV&&pn("define property on an observable object. Use 'defineProperty' from 'mobx' instead."),null==(r=zo(e).defineProperty_(t,n))||r},ownKeys:function(e){return"production"!==process.env.NODE_ENV&&to.trackingDerivation&&pn("iterate keys to detect added / removed properties. Use `keys` from 'mobx' instead."),zo(e).ownKeys_()},preventExtensions:function(e){Zt(13)}};function Ho(e){return void 0!==e.interceptors_&&e.interceptors_.length>0}function Wo(e,t){var n=e.interceptors_||(e.interceptors_=[]);return n.push(t),fn((function(){var e=n.indexOf(t);-1!==e&&n.splice(e,1)}))}function Yo(e,t){var n=Wr();try{for(var r=[].concat(e.interceptors_||[]),o=0,i=r.length;o<i&&((t=r[o](t))&&!t.type&&Zt(14),t);o++);return t}finally{Yr(n)}}function Jo(e){return void 0!==e.changeListeners_&&e.changeListeners_.length>0}function $o(e,t){var n=e.changeListeners_||(e.changeListeners_=[]);return n.push(t),fn((function(){var e=n.indexOf(t);-1!==e&&n.splice(e,1)}))}function Zo(e,t){var n=Wr(),r=e.changeListeners_;if(r){for(var o=0,i=(r=r.slice()).length;o<i;o++)r[o](t);Yr(n)}}function Qo(e,t,n){if("production"!==process.env.NODE_ENV&&(mn(e)||mn(Object.getPrototypeOf(e))||Zt("'makeAutoObservable' can only be used for classes that don't have a superclass"),Ci(e)&&Zt("makeAutoObservable can only be used on objects not already made observable")),mn(e))return jo(e,e,t,n);var r=Ai(e,n)[Fn];io();try{if(e[Ei])for(var o in e[Ei])r.make_(o,e[Ei][o]);else for(var i,s=((i={})[Fn]=1,i[Ei]=1,i.constructor=1,i),a=function(e){s[e]||(s[e]=1,r.make_(e,!t||(!(e in t)||t[e])))},u=e;u&&u!==on;)An(u).forEach(a),u=Object.getPrototypeOf(u)}finally{so()}return e}var ei="update",ti={get:function(e,t){var n=e[Fn];return t===Fn?n:"length"===t?n.getArrayLength_():"string"!=typeof t||isNaN(t)?Cn(oi,t)?oi[t]:e[t]:n.get_(parseInt(t))},set:function(e,t,n){var r=e[Fn];return"length"===t&&r.setArrayLength_(n),"symbol"==typeof t||isNaN(t)?e[t]=n:r.set_(parseInt(t),n),!0},preventExtensions:function(){Zt(15)}},ni=function(){function e(e,t,n,r){this.owned_=void 0,this.legacyMode_=void 0,this.atom_=void 0,this.values_=[],this.interceptors_=void 0,this.changeListeners_=void 0,this.enhancer_=void 0,this.dehancer=void 0,this.proxy_=void 0,this.lastKnownLength_=0,this.owned_=n,this.legacyMode_=r,this.atom_=new Gn(e||"ObservableArray@"+dn()),this.enhancer_=function(n,r){return t(n,r,e+"[..]")}}var t=e.prototype;return t.dehanceValue_=function(e){return void 0!==this.dehancer?this.dehancer(e):e},t.dehanceValues_=function(e){return void 0!==this.dehancer&&e.length>0?e.map(this.dehancer):e},t.intercept_=function(e){return Wo(this,e)},t.observe_=function(e,t){return void 0===t&&(t=!1),t&&e({observableKind:"array",object:this.proxy_,debugObjectName:this.atom_.name_,type:"splice",index:0,added:this.values_.slice(),addedCount:this.values_.length,removed:[],removedCount:0}),$o(this,e)},t.getArrayLength_=function(){return this.atom_.reportObserved(),this.values_.length},t.setArrayLength_=function(e){("number"!=typeof e||e<0)&&Zt("Out of range: "+e);var t=this.values_.length;if(e!==t)if(e>t){for(var n=new Array(e-t),r=0;r<e-t;r++)n[r]=void 0;this.spliceWithArray_(t,0,n)}else this.spliceWithArray_(e,t-e)},t.updateArrayLength_=function(e,t){e!==this.lastKnownLength_&&Zt(16),this.lastKnownLength_+=t,this.legacyMode_&&t>0&&Vi(e+t+1)},t.spliceWithArray_=function(e,t,n){var r=this;Kr(this.atom_);var o=this.values_.length;if(void 0===e?e=0:e>o?e=o:e<0&&(e=Math.max(0,o+e)),t=1===arguments.length?o-e:null==t?0:Math.max(0,Math.min(t,o-e)),void 0===n&&(n=sn),Ho(this)){var i=Yo(this,{object:this.proxy_,type:"splice",index:e,removedCount:t,added:n});if(!i)return sn;t=i.removedCount,n=i.added}if(n=0===n.length?n:n.map((function(e){return r.enhancer_(e,void 0)})),this.legacyMode_||"production"!==process.env.NODE_ENV){var s=n.length-t;this.updateArrayLength_(o,s)}var a=this.spliceItemsIntoValues_(e,t,n);return 0===t&&0===n.length||this.notifyArraySplice_(e,n,a),this.dehanceValues_(a)},t.spliceItemsIntoValues_=function(e,t,n){var r;if(n.length<1e4)return(r=this.values_).splice.apply(r,[e,t].concat(n));var o=this.values_.slice(e,e+t),i=this.values_.slice(e+t);this.values_.length=e+n.length-t;for(var s=0;s<n.length;s++)this.values_[e+s]=n[s];for(var a=0;a<i.length;a++)this.values_[e+n.length+a]=i[a];return o},t.notifyArrayChildUpdate_=function(e,t,n){var r=!this.owned_&&_o(),o=Jo(this),i=o||r?{observableKind:"array",object:this.proxy_,type:ei,debugObjectName:this.atom_.name_,index:e,newValue:t,oldValue:n}:null;"production"!==process.env.NODE_ENV&&r&&mo(i),this.atom_.reportChanged(),o&&Zo(this,i),"production"!==process.env.NODE_ENV&&r&&yo()},t.notifyArraySplice_=function(e,t,n){var r=!this.owned_&&_o(),o=Jo(this),i=o||r?{observableKind:"array",object:this.proxy_,debugObjectName:this.atom_.name_,type:"splice",index:e,removed:n,added:t,removedCount:n.length,addedCount:t.length}:null;"production"!==process.env.NODE_ENV&&r&&mo(i),this.atom_.reportChanged(),o&&Zo(this,i),"production"!==process.env.NODE_ENV&&r&&yo()},t.get_=function(e){if(e<this.values_.length)return this.atom_.reportObserved(),this.dehanceValue_(this.values_[e]);console.warn("production"!==process.env.NODE_ENV?"[mobx] Out of bounds read: "+e:"[mobx.array] Attempt to read an array index ("+e+") that is out of bounds ("+this.values_.length+"). Please check length first. Out of bound indices will not be tracked by MobX")},t.set_=function(e,t){var n=this.values_;if(e<n.length){Kr(this.atom_);var r=n[e];if(Ho(this)){var o=Yo(this,{type:ei,object:this.proxy_,index:e,newValue:t});if(!o)return;t=o.newValue}(t=this.enhancer_(t,r))!==r&&(n[e]=t,this.notifyArrayChildUpdate_(e,t,r))}else e===n.length?this.spliceWithArray_(e,0,[t]):Zt(17,e,n.length)},e}();function ri(e,t,n,r){void 0===n&&(n="ObservableArray@"+dn()),void 0===r&&(r=!1),ln();var o=new ni(n,t,r,!1);yn(o.values_,Fn,o);var i=new Proxy(o.values_,ti);if(o.proxy_=i,e&&e.length){var s=jr(!0);o.spliceWithArray_(0,0,e),Lr(s)}return i}var oi={clear:function(){return this.splice(0)},replace:function(e){var t=this[Fn];return t.spliceWithArray_(0,t.values_.length,e)},toJSON:function(){return this.slice()},splice:function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];var i=this[Fn];switch(arguments.length){case 0:return[];case 1:return i.spliceWithArray_(e);case 2:return i.spliceWithArray_(e,t)}return i.spliceWithArray_(e,t,r)},spliceWithArray:function(e,t,n){return this[Fn].spliceWithArray_(e,t,n)},push:function(){for(var e=this[Fn],t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e.spliceWithArray_(e.values_.length,0,n),e.values_.length},pop:function(){return this.splice(Math.max(this[Fn].values_.length-1,0),1)[0]},shift:function(){return this.splice(0,1)[0]},unshift:function(){for(var e=this[Fn],t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e.spliceWithArray_(0,0,n),e.values_.length},reverse:function(){return to.trackingDerivation&&Zt(37,"reverse"),this.replace(this.slice().reverse()),this},sort:function(){to.trackingDerivation&&Zt(37,"sort");var e=this.slice();return e.sort.apply(e,arguments),this.replace(e),this},remove:function(e){var t=this[Fn],n=t.dehanceValues_(t.values_).indexOf(e);return n>-1&&(this.splice(n,1),!0)}};function ii(e,t){"function"==typeof Array.prototype[e]&&(oi[e]=t(e))}function si(e){return function(){var t=this[Fn];t.atom_.reportObserved();var n=t.dehanceValues_(t.values_);return n[e].apply(n,arguments)}}function ai(e){return function(t,n){var r=this,o=this[Fn];return o.atom_.reportObserved(),o.dehanceValues_(o.values_)[e]((function(e,o){return t.call(n,e,o,r)}))}}function ui(e){return function(){var t=this,n=this[Fn];n.atom_.reportObserved();var r=n.dehanceValues_(n.values_),o=arguments[0];return arguments[0]=function(e,n,r){return o(e,n,r,t)},r[e].apply(r,arguments)}}ii("concat",si),ii("flat",si),ii("includes",si),ii("indexOf",si),ii("join",si),ii("lastIndexOf",si),ii("slice",si),ii("toString",si),ii("toLocaleString",si),ii("every",ai),ii("filter",ai),ii("find",ai),ii("findIndex",ai),ii("flatMap",ai),ii("forEach",ai),ii("map",ai),ii("some",ai),ii("reduce",ui),ii("reduceRight",ui);var ci,li,pi=On("ObservableArrayAdministration",ni);function di(e){return gn(e)&&pi(e[Fn])}var fi={},hi="add";ci=Symbol.iterator,li=Symbol.toStringTag;var vi,_i,gi=function(){function e(e,t,n){void 0===t&&(t=zn),void 0===n&&(n="ObservableMap@"+dn()),this.enhancer_=void 0,this.name_=void 0,this[Fn]=fi,this.data_=void 0,this.hasMap_=void 0,this.keysAtom_=void 0,this.interceptors_=void 0,this.changeListeners_=void 0,this.dehancer=void 0,this.enhancer_=t,this.name_=n,vn(Map)||Zt(18),this.keysAtom_=qn(this.name_+".keys()"),this.data_=new Map,this.hasMap_=new Map,this.merge(e)}var t=e.prototype;return t.has_=function(e){return this.data_.has(e)},t.has=function(e){var t=this;if(!to.trackingDerivation)return this.has_(e);var n=this.hasMap_.get(e);if(!n){var r=n=new kr(this.has_(e),Xn,this.name_+"."+Sn(e)+"?",!1);this.hasMap_.set(e,r),Io(r,(function(){return t.hasMap_.delete(e)}))}return n.get()},t.set=function(e,t){var n=this.has_(e);if(Ho(this)){var r=Yo(this,{type:n?ei:hi,object:this,newValue:t,name:e});if(!r)return this;t=r.newValue}return n?this.updateValue_(e,t):this.addValue_(e,t),this},t.delete=function(e){var t=this;if((Kr(this.keysAtom_),Ho(this))&&!Yo(this,{type:"delete",object:this,name:e}))return!1;if(this.has_(e)){var n=_o(),r=Jo(this),o=r||n?{observableKind:"map",debugObjectName:this.name_,type:"delete",object:this,oldValue:this.data_.get(e).value_,name:e}:null;return"production"!==process.env.NODE_ENV&&n&&mo(o),Ko((function(){t.keysAtom_.reportChanged(),t.updateHasMapEntry_(e,!1),t.data_.get(e).setNewValue_(void 0),t.data_.delete(e)})),r&&Zo(this,o),"production"!==process.env.NODE_ENV&&n&&yo(),!0}return!1},t.updateHasMapEntry_=function(e,t){var n=this.hasMap_.get(e);n&&n.setNewValue_(t)},t.updateValue_=function(e,t){var n=this.data_.get(e);if((t=n.prepareNewValue_(t))!==to.UNCHANGED){var r=_o(),o=Jo(this),i=o||r?{observableKind:"map",debugObjectName:this.name_,type:ei,object:this,oldValue:n.value_,name:e,newValue:t}:null;"production"!==process.env.NODE_ENV&&r&&mo(i),n.setNewValue_(t),o&&Zo(this,i),"production"!==process.env.NODE_ENV&&r&&yo()}},t.addValue_=function(e,t){var n=this;Kr(this.keysAtom_),Ko((function(){var r=new kr(t,n.enhancer_,n.name_+"."+Sn(e),!1);n.data_.set(e,r),t=r.value_,n.updateHasMapEntry_(e,!0),n.keysAtom_.reportChanged()}));var r=_o(),o=Jo(this),i=o||r?{observableKind:"map",debugObjectName:this.name_,type:hi,object:this,name:e,newValue:t}:null;"production"!==process.env.NODE_ENV&&r&&mo(i),o&&Zo(this,i),"production"!==process.env.NODE_ENV&&r&&yo()},t.get=function(e){return this.has(e)?this.dehanceValue_(this.data_.get(e).get()):this.dehanceValue_(void 0)},t.dehanceValue_=function(e){return void 0!==this.dehancer?this.dehancer(e):e},t.keys=function(){return this.keysAtom_.reportObserved(),this.data_.keys()},t.values=function(){var e=this,t=this.keys();return Xi({next:function(){var n=t.next(),r=n.done,o=n.value;return{done:r,value:r?void 0:e.get(o)}}})},t.entries=function(){var e=this,t=this.keys();return Xi({next:function(){var n=t.next(),r=n.done,o=n.value;return{done:r,value:r?void 0:[o,e.get(o)]}}})},t[ci]=function(){return this.entries()},t.forEach=function(e,t){for(var n,r=kn(this);!(n=r()).done;){var o=n.value,i=o[0],s=o[1];e.call(t,s,i,this)}},t.merge=function(e){var t=this;return mi(e)&&(e=new Map(e)),Ko((function(){mn(e)?function(e){var t=Object.keys(e);if(!wn)return t;var n=Object.getOwnPropertySymbols(e);return n.length?[].concat(t,n.filter((function(t){return on.propertyIsEnumerable.call(e,t)}))):t}(e).forEach((function(n){return t.set(n,e[n])})):Array.isArray(e)?e.forEach((function(e){var n=e[0],r=e[1];return t.set(n,r)})):En(e)?(e.constructor!==Map&&Zt(19,e),e.forEach((function(e,n){return t.set(n,e)}))):null!=e&&Zt(20,e)})),this},t.clear=function(){var e=this;Ko((function(){Hr((function(){for(var t,n=kn(e.keys());!(t=n()).done;){var r=t.value;e.delete(r)}}))}))},t.replace=function(e){var t=this;return Ko((function(){for(var n,r=function(e){if(En(e)||mi(e))return e;if(Array.isArray(e))return new Map(e);if(mn(e)){var t=new Map;for(var n in e)t.set(n,e[n]);return t}return Zt(21,e)}(e),o=new Map,i=!1,s=kn(t.data_.keys());!(n=s()).done;){var a=n.value;if(!r.has(a))if(t.delete(a))i=!0;else{var u=t.data_.get(a);o.set(a,u)}}for(var c,l=kn(r.entries());!(c=l()).done;){var p=c.value,d=p[0],f=p[1],h=t.data_.has(d);if(t.set(d,f),t.data_.has(d)){var v=t.data_.get(d);o.set(d,v),h||(i=!0)}}if(!i)if(t.data_.size!==o.size)t.keysAtom_.reportChanged();else for(var _=t.data_.keys(),g=o.keys(),m=_.next(),b=g.next();!m.done;){if(m.value!==b.value){t.keysAtom_.reportChanged();break}m=_.next(),b=g.next()}t.data_=o})),this},t.toString=function(){return"[object ObservableMap]"},t.toJSON=function(){return Array.from(this)},t.observe_=function(e,t){return"production"!==process.env.NODE_ENV&&!0===t&&Zt("`observe` doesn't support fireImmediately=true in combination with maps."),$o(this,e)},t.intercept_=function(e){return Wo(this,e)},In(e,[{key:"size",get:function(){return this.keysAtom_.reportObserved(),this.data_.size}},{key:li,get:function(){return"Map"}}]),e}(),mi=On("ObservableMap",gi);var bi={};vi=Symbol.iterator,_i=Symbol.toStringTag;var yi=function(){function e(e,t,n){void 0===t&&(t=zn),void 0===n&&(n="ObservableSet@"+dn()),this.name_=void 0,this[Fn]=bi,this.data_=new Set,this.atom_=void 0,this.changeListeners_=void 0,this.interceptors_=void 0,this.dehancer=void 0,this.enhancer_=void 0,this.name_=n,vn(Set)||Zt(22),this.atom_=qn(this.name_),this.enhancer_=function(e,r){return t(e,r,n)},e&&this.replace(e)}var t=e.prototype;return t.dehanceValue_=function(e){return void 0!==this.dehancer?this.dehancer(e):e},t.clear=function(){var e=this;Ko((function(){Hr((function(){for(var t,n=kn(e.data_.values());!(t=n()).done;){var r=t.value;e.delete(r)}}))}))},t.forEach=function(e,t){for(var n,r=kn(this);!(n=r()).done;){var o=n.value;e.call(t,o,o,this)}},t.add=function(e){var t=this;if((Kr(this.atom_),Ho(this))&&!Yo(this,{type:hi,object:this,newValue:e}))return this;if(!this.has(e)){Ko((function(){t.data_.add(t.enhancer_(e,void 0)),t.atom_.reportChanged()}));var n="production"!==process.env.NODE_ENV&&_o(),r=Jo(this),o=r||n?{observableKind:"set",debugObjectName:this.name_,type:hi,object:this,newValue:e}:null;n&&"production"!==process.env.NODE_ENV&&mo(o),r&&Zo(this,o),n&&"production"!==process.env.NODE_ENV&&yo()}return this},t.delete=function(e){var t=this;if(Ho(this)&&!Yo(this,{type:"delete",object:this,oldValue:e}))return!1;if(this.has(e)){var n="production"!==process.env.NODE_ENV&&_o(),r=Jo(this),o=r||n?{observableKind:"set",debugObjectName:this.name_,type:"delete",object:this,oldValue:e}:null;return n&&"production"!==process.env.NODE_ENV&&mo(o),Ko((function(){t.atom_.reportChanged(),t.data_.delete(e)})),r&&Zo(this,o),n&&"production"!==process.env.NODE_ENV&&yo(),!0}return!1},t.has=function(e){return this.atom_.reportObserved(),this.data_.has(this.dehanceValue_(e))},t.entries=function(){var e=0,t=Array.from(this.keys()),n=Array.from(this.values());return Xi({next:function(){var r=e;return e+=1,r<n.length?{value:[t[r],n[r]],done:!1}:{done:!0}}})},t.keys=function(){return this.values()},t.values=function(){this.atom_.reportObserved();var e=this,t=0,n=Array.from(this.data_.values());return Xi({next:function(){return t<n.length?{value:e.dehanceValue_(n[t++]),done:!1}:{done:!0}}})},t.replace=function(e){var t=this;return Oi(e)&&(e=new Set(e)),Ko((function(){Array.isArray(e)||Nn(e)?(t.clear(),e.forEach((function(e){return t.add(e)}))):null!=e&&Zt("Cannot initialize set from "+e)})),this},t.observe_=function(e,t){return"production"!==process.env.NODE_ENV&&!0===t&&Zt("`observe` doesn't support fireImmediately=true in combination with sets."),$o(this,e)},t.intercept_=function(e){return Wo(this,e)},t.toJSON=function(){return Array.from(this)},t.toString=function(){return"[object ObservableSet]"},t[vi]=function(){return this.values()},In(e,[{key:"size",get:function(){return this.atom_.reportObserved(),this.data_.size}},{key:_i,get:function(){return"Set"}}]),e}(),Oi=On("ObservableSet",yi),Ei=Symbol("mobx-inferred-annotations"),Ni=Object.create(null),wi=function(){function e(e,t,n,r,o){void 0===t&&(t=new Map),void 0===r&&(r=Er),void 0===o&&(o=!1),this.target_=void 0,this.values_=void 0,this.name_=void 0,this.defaultAnnotation_=void 0,this.autoBind_=void 0,this.keysAtom_=void 0,this.changeListeners_=void 0,this.interceptors_=void 0,this.proxy_=void 0,this.isPlainObject_=void 0,this.appliedAnnotations_=void 0,this.pendingKeys_=void 0,this.target_=e,this.values_=t,this.name_=n,this.defaultAnnotation_=r,this.autoBind_=o,this.keysAtom_=new Gn(n+".keys"),this.isPlainObject_=mn(this.target_),"production"===process.env.NODE_ENV||Yi(this.defaultAnnotation_)||Zt("defaultAnnotation must be valid annotation"),"production"!==process.env.NODE_ENV&&"boolean"!=typeof this.autoBind_&&Zt("autoBind must be boolean"),"production"!==process.env.NODE_ENV&&(this.appliedAnnotations_={})}var t=e.prototype;return t.getObservablePropValue_=function(e){return this.values_.get(e).get()},t.setObservablePropValue_=function(e,t){var n=this.values_.get(e);if(n instanceof Br)return n.set(t),!0;if(Ho(this)){var r=Yo(this,{type:ei,object:this.proxy_||this.target_,name:e,newValue:t});if(!r)return null;t=r.newValue}if((t=n.prepareNewValue_(t))!==to.UNCHANGED){var o=Jo(this),i="production"!==process.env.NODE_ENV&&_o(),s=o||i?{type:ei,observableKind:"object",debugObjectName:this.name_,object:this.proxy_||this.target_,oldValue:n.value_,name:e,newValue:t}:null;"production"!==process.env.NODE_ENV&&i&&mo(s),n.setNewValue_(t),o&&Zo(this,s),"production"!==process.env.NODE_ENV&&i&&yo()}return!0},t.get_=function(e){return to.trackingDerivation&&!Cn(this.target_,e)&&this.has_(e),this.target_[e]},t.set_=function(e,t,n){return void 0===n&&(n=!1),Cn(this.target_,e)?this.values_.has(e)?this.setObservablePropValue_(e,t):n?Reflect.set(this.target_,e,t):(this.target_[e]=t,!0):this.extend_(e,{value:t,enumerable:!0,writable:!0,configurable:!0},this.defaultAnnotation_,n)},t.has_=function(e){if(!to.trackingDerivation)return e in this.target_;this.pendingKeys_||(this.pendingKeys_=new Map);var t=this.pendingKeys_.get(e);return t||(t=new kr(e in this.target_,Xn,this.name_+"."+Sn(e)+"?",!1),this.pendingKeys_.set(e,t)),t.get()},t.make_=function(e,t){!0===t&&(t=this.inferAnnotation_(e)),!1!==t&&(Di(this,t,e),t.make_(this,e))},t.extend_=function(e,t,n,r){if(void 0===r&&(r=!1),!0===n&&(n=Wi(t,this.defaultAnnotation_,this.autoBind_)),!1===n)return this.defineProperty_(e,t,r);Di(this,n,e);var o=n.extend_(this,e,t,r);return o&&xi(this,n,e),o},t.inferAnnotation_=function(e){var t,n=null==(t=this.target_[Ei])?void 0:t[e];if(n)return n;for(var r=this.target_;r&&r!==on;){var o=nn(r,e);if(o){n=Wi(o,this.defaultAnnotation_,this.autoBind_);break}r=Object.getPrototypeOf(r)}if(void 0===n&&Zt(1,"true",e),!this.isPlainObject_){var i=Object.getPrototypeOf(this.target_);Cn(i,Ei)||bn(i,Ei,{}),i[Ei][e]=n}return n},t.defineProperty_=function(e,t,n){void 0===n&&(n=!1);try{io();var r=this.delete_(e);if(!r)return r;if(Ho(this)){var o=Yo(this,{object:this.proxy_||this.target_,name:e,type:hi,newValue:t.value});if(!o)return null;var i=o.newValue;t.value!==i&&(t=Rn({},t,{value:i}))}if(n){if(!Reflect.defineProperty(this.target_,e,t))return!1}else rn(this.target_,e,t);this.notifyPropertyAddition_(e,t.value)}finally{so()}return!0},t.defineObservableProperty_=function(e,t,n,r){void 0===r&&(r=!1);try{io();var o=this.delete_(e);if(!o)return o;if(Ho(this)){var i=Yo(this,{object:this.proxy_||this.target_,name:e,type:hi,newValue:t});if(!i)return null;t=i.newValue}var s=Ti(e),a={configurable:!to.safeDescriptors||this.isPlainObject_,enumerable:!0,get:s.get,set:s.set};if(r){if(!Reflect.defineProperty(this.target_,e,a))return!1}else rn(this.target_,e,a);var u=new kr(t,n,this.name_+"."+Sn(e),!1);this.values_.set(e,u),this.notifyPropertyAddition_(e,u.value_)}finally{so()}return!0},t.defineComputedProperty_=function(e,t,n){void 0===n&&(n=!1);try{io();var r=this.delete_(e);if(!r)return r;if(Ho(this))if(!Yo(this,{object:this.proxy_||this.target_,name:e,type:hi,newValue:void 0}))return null;t.name||(t.name=this.name_+"."+Sn(e)),t.context=this.proxy_||this.target_;var o=Ti(e),i={configurable:!to.safeDescriptors||this.isPlainObject_,enumerable:!1,get:o.get,set:o.set};if(n){if(!Reflect.defineProperty(this.target_,e,i))return!1}else rn(this.target_,e,i);this.values_.set(e,new Br(t)),this.notifyPropertyAddition_(e,void 0)}finally{so()}return!0},t.delete_=function(e,t){if(void 0===t&&(t=!1),!Cn(this.target_,e))return!0;if(Ho(this)&&!Yo(this,{object:this.proxy_||this.target_,name:e,type:"remove"}))return null;try{var n,r;io();var o,i=Jo(this),s="production"!==process.env.NODE_ENV&&_o(),a=this.values_.get(e),u=void 0;if(!a&&(i||s))u=null==(o=nn(this.target_,e))?void 0:o.value;if(t){if(!Reflect.deleteProperty(this.target_,e))return!1}else delete this.target_[e];if("production"!==process.env.NODE_ENV&&delete this.appliedAnnotations_[e],a&&(this.values_.delete(e),a instanceof kr&&(u=a.value_),uo(a)),this.keysAtom_.reportChanged(),null==(n=this.pendingKeys_)||null==(r=n.get(e))||r.set(e in this.target_),i||s){var c={type:"remove",observableKind:"object",object:this.proxy_||this.target_,debugObjectName:this.name_,oldValue:u,name:e};"production"!==process.env.NODE_ENV&&s&&mo(c),i&&Zo(this,c),"production"!==process.env.NODE_ENV&&s&&yo()}}finally{so()}return!0},t.observe_=function(e,t){return"production"!==process.env.NODE_ENV&&!0===t&&Zt("`observe` doesn't support the fire immediately property for observable objects."),$o(this,e)},t.intercept_=function(e){return Wo(this,e)},t.notifyPropertyAddition_=function(e,t){var n,r,o=Jo(this),i="production"!==process.env.NODE_ENV&&_o();if(o||i){var s=o||i?{type:hi,observableKind:"object",debugObjectName:this.name_,object:this.proxy_||this.target_,name:e,newValue:t}:null;"production"!==process.env.NODE_ENV&&i&&mo(s),o&&Zo(this,s),"production"!==process.env.NODE_ENV&&i&&yo()}null==(n=this.pendingKeys_)||null==(r=n.get(e))||r.set(!0),this.keysAtom_.reportChanged()},t.ownKeys_=function(){return this.keysAtom_.reportObserved(),An(this.target_)},t.keys_=function(){return this.keysAtom_.reportObserved(),Object.keys(this.target_)},e}();function Ai(e,t){var n;if("production"!==process.env.NODE_ENV&&t&&Ci(e)&&Zt("Options can't be provided for already observable objects."),Cn(e,Fn))return e;"production"===process.env.NODE_ENV||Object.isExtensible(e)||Zt("Cannot make the designated object observable; it is not extensible");var r=null!=(n=null==t?void 0:t.name)?n:(mn(e)?"ObservableObject":e.constructor.name)+"@"+dn(),o=new wi(e,new Map,Sn(r),function(e){return e?!0===e.deep?dr:!1===e.deep?fr:e.defaultDecorator:void 0}(t),null==t?void 0:t.autoBind);return bn(e,Fn,o),e}var Si=On("ObservableObjectAdministration",wi);function Ti(e){return Ni[e]||(Ni[e]={get:function(){return this[Fn].getObservablePropValue_(e)},set:function(t){return this[Fn].setObservablePropValue_(e,t)}})}function Ci(e){return!!gn(e)&&Si(e[Fn])}function xi(e,t,n){"production"!==process.env.NODE_ENV&&(e.appliedAnnotations_[n]=t),t.isDecorator_&&delete e.target_[Vn][n]}function Di(e,t,n){if("production"===process.env.NODE_ENV||Yi(t)||Zt("Cannot annotate '"+e.name_+"."+n.toString()+"': Invalid annotation."),"production"!==process.env.NODE_ENV&&!Hn(t)&&Cn(e.appliedAnnotations_,n)){var r=e.name_+"."+n.toString(),o=e.appliedAnnotations_[n].annotationType_;Zt("Cannot apply '"+t.annotationType_+"' to '"+r+"':\nThe field is already annotated with '"+o+"'.\nRe-annotating fields is not allowed.\nUse 'override' annotation for methods overriden by subclass.")}}var Ii,Ri,ji=0,Li=function(){};Ii=Li,Ri=Array.prototype,Object.setPrototypeOf?Object.setPrototypeOf(Ii.prototype,Ri):void 0!==Ii.prototype.__proto__?Ii.prototype.__proto__=Ri:Ii.prototype=Ri;var Pi=function(e){function t(t,n,r,o){var i;void 0===r&&(r="ObservableArray@"+dn()),void 0===o&&(o=!1),i=e.call(this)||this;var s=new ni(r,n,o,!0);if(s.proxy_=Ln(i),yn(Ln(i),Fn,s),t&&t.length){var a=jr(!0);i.spliceWithArray(0,0,t),Lr(a)}return i}jn(t,e);var n=t.prototype;return n.concat=function(){this[Fn].atom_.reportObserved();for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Array.prototype.concat.apply(this.slice(),t.map((function(e){return di(e)?e.slice():e})))},n[Symbol.iterator]=function(){var e=this,t=0;return Xi({next:function(){return t<e.length?{value:e[t++],done:!1}:{done:!0,value:void 0}}})},In(t,[{key:"length",get:function(){return this[Fn].getArrayLength_()},set:function(e){this[Fn].setArrayLength_(e)}},{key:Symbol.toStringTag,get:function(){return"Array"}}]),t}(Li);function ki(e){rn(Pi.prototype,""+e,function(e){return{enumerable:!1,configurable:!0,get:function(){return this[Fn].get_(e)},set:function(t){this[Fn].set_(e,t)}}}(e))}function Vi(e){if(e>ji){for(var t=ji;t<e+100;t++)ki(t);ji=e}}function Ui(e,t,n){return new Pi(e,t,n)}function Bi(e,t){if("object"==typeof e&&null!==e){if(di(e))return void 0!==t&&Zt(23),e[Fn].atom_;if(Oi(e))return e[Fn];if(mi(e)){if(void 0===t)return e.keysAtom_;var n=e.data_.get(t)||e.hasMap_.get(t);return n||Zt(25,t,Gi(e)),n}if(Ci(e)){if(!t)return Zt(26);var r=e[Fn].values_.get(t);return r||Zt(27,t,Gi(e)),r}if(Mn(e)||Fr(e)||vo(e))return e}else if(vn(e)&&vo(e[Fn]))return e[Fn];Zt(28)}function Fi(e,t){return e||Zt(29),void 0!==t?Fi(Bi(e,t)):Mn(e)||Fr(e)||vo(e)||mi(e)||Oi(e)?e:e[Fn]?e[Fn]:void Zt(24,e)}function Gi(e,t){return(void 0!==t?Bi(e,t):Ci(e)||mi(e)||Oi(e)?Fi(e):Bi(e)).name_}Object.entries(oi).forEach((function(e){var t=e[0],n=e[1];"concat"!==t&&bn(Pi.prototype,t,n)})),Vi(1e3);var Mi=on.toString;function qi(e,t,n){return void 0===n&&(n=-1),Ki(e,t,n)}function Ki(e,t,n,r,o){if(e===t)return 0!==e||1/e==1/t;if(null==e||null==t)return!1;if(e!=e)return t!=t;var i=typeof e;if(!vn(i)&&"object"!==i&&"object"!=typeof t)return!1;var s=Mi.call(e);if(s!==Mi.call(t))return!1;switch(s){case"[object RegExp]":case"[object String]":return""+e==""+t;case"[object Number]":return+e!=+e?+t!=+t:0==+e?1/+e==1/t:+e==+t;case"[object Date]":case"[object Boolean]":return+e==+t;case"[object Symbol]":return"undefined"!=typeof Symbol&&Symbol.valueOf.call(e)===Symbol.valueOf.call(t);case"[object Map]":case"[object Set]":n>=0&&n++}e=zi(e),t=zi(t);var a="[object Array]"===s;if(!a){if("object"!=typeof e||"object"!=typeof t)return!1;var u=e.constructor,c=t.constructor;if(u!==c&&!(vn(u)&&u instanceof u&&vn(c)&&c instanceof c)&&"constructor"in e&&"constructor"in t)return!1}if(0===n)return!1;n<0&&(n=-1),o=o||[];for(var l=(r=r||[]).length;l--;)if(r[l]===e)return o[l]===t;if(r.push(e),o.push(t),a){if((l=e.length)!==t.length)return!1;for(;l--;)if(!Ki(e[l],t[l],n-1,r,o))return!1}else{var p,d=Object.keys(e);if(l=d.length,Object.keys(t).length!==l)return!1;for(;l--;)if(!Cn(t,p=d[l])||!Ki(e[p],t[p],n-1,r,o))return!1}return r.pop(),o.pop(),!0}function zi(e){return di(e)?e.slice():En(e)||mi(e)||Nn(e)||Oi(e)?Array.from(e.entries()):e}function Xi(e){return e[Symbol.iterator]=Hi,e}function Hi(){return this}function Wi(e,t,n){return e.get?Ar:!e.set&&(vn(e.value)?(r=e.value,!(o=null==r?void 0:r.constructor)||"GeneratorFunction"!==o.name&&"GeneratorFunction"!==o.displayName?!xo(e.value)&&(n?Co.bound:Co):!Fo(e.value)&&Uo):t);var r,o}function Yi(e){return e instanceof Object&&"string"==typeof e.annotationType_&&vn(e.make_)&&vn(e.extend_)}["Symbol","Map","Set","Symbol"].forEach((function(e){void 0===en()[e]&&Zt("MobX requires global '"+e+"' to be available or polyfilled")})),"object"==typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:function(e){return"production"===process.env.NODE_ENV?(console.warn("[mobx.spy] Is a no-op in production builds"),function(){}):(to.spyListeners.push(e),fn((function(){to.spyListeners=to.spyListeners.filter((function(t){return t!==e}))})))},extras:{getDebugName:Gi},$mobx:Fn});var Ji,$i=function(e){this.id=e.id||Date.now()+"",this.name=e.name||"",this.displayName=e.displayName||"",this.type=e.type||Ji.TEXT,this.isRequired=e.isRequired||!1,this.customDataId=e.customDataId||null,this.attributeTypes=e.attributeTypes||null,Qo(this)};!function(e){e.TEXT="TEXT",e.RICH_TEXT="RICH_TEXT",e.BOOLEAN="BOOLEAN",e.IMAGE="IMAGE",e.IMAGE_LIST="IMAGE_LIST",e.LINK="LINK",e.LIST_OF_LINK="LIST_OF_LINK",e.PRODUCT_DETAIL="PRODUCT_DETAIL",e.PRODUCT_LIST="PRODUCT_LIST",e.PRODUCT_ATTRIBUTE="PRODUCT_ATTRIBUTE",e.PRODUCT_ATTRIBUTE_LIST="PRODUCT_ATTRIBUTE_LIST",e.BRAND="BRAND",e.BRAND_LIST="BRAND_LIST",e.CATEGORY="CATEGORY",e.CATEGORY_LIST="CATEGORY_LIST",e.COLOR="COLOR",e.CUSTOM="CUSTOM",e.COMPONENT="COMPONENT",e.COMPONENT_LIST="COMPONENT_LIST",e.BLOG="BLOG",e.BLOG_LIST="BLOG_LIST",e.BLOG_CATEGORY="BLOG_CATEGORY",e.BLOG_CATEGORY_LIST="BLOG_CATEGORY_LIST",e.RAFFLE="RAFFLE",e.RAFFLE_LIST="RAFFLE_LIST",e.OBJECT="OBJECT",e.STATIC_LIST="STATIC_LIST",e.DYNAMIC_LIST="DYNAMIC_LIST",e.ENUM="ENUM"}(Ji||(Ji={}));var Zi,Qi,es=function(e){this.id=e.id||"",this.dir=e.dir||"",this.displayName=e.displayName||"",this.props=e.props?e.props.map((function(e){return new $i(e)})):[],this.isHeader=e.isHeader||!1,this.isFooter=e.isFooter||!1,Qo(this)},ts=function(){function e(t){var r,o=this;void 0===t&&(t={}),this.customDataId=null,this.id=t.id||"",this.name=t.name||null,this.type=t.type||Ji.TEXT,this.isRequired=void 0===t.isRequired||t.isRequired,this.key=t.key||null,this.parent=t.parent||null,this.itemCount=t.itemCount||null,this.attributeTypes=t.attributeTypes||null,this.enumOptions=(null===(r=t.enumOptions)||void 0===r?void 0:r.map((function(e){return new ns(e)})))||null,this.customDataId=t.customDataId||null,this.isRoot=t.isRoot||!1,this.nestedData=t.nestedData?t.nestedData.map((function(t){return new e(n(n({},t),{parent:o}))})):null,this.type!==Ji.STATIC_LIST||this.itemCount||(this.itemCount=1),Qo(this)}return e.prototype.toJSON=function(){var e=n({},this);return delete e.parent,e},e}(),ns=function(e){void 0===e&&(e={}),this.id=e.id||"",this.displayName=e.displayName||"",this.value=e.value||"",Qo(this)},rs=function(e){this.id=e.id||"",this.componentId=e.componentId||"",this.propValues=e.propValues||{},Qo(this)},os=function(e){this.id=e.id||Date.now()+"",this.name=e.name||null,this.type=e.type||Zi.INDEX,this.slug=e.slug||null,this.pageTitle=e.pageTitle||null,this.description=e.description||null,this.components=e.components?e.components.map((function(e){return new rs(e)})):[],this.specifications=e.specifications?e.specifications.map((function(e){return new is(e)})):null,Qo(this)},is=function(e){this.id=e.id||"",this.components=e.components?e.components.map((function(e){return new rs(e)})):[],Qo(this)};!function(e){e.INDEX="INDEX",e.CATEGORY="CATEGORY",e.BRAND="BRAND",e.PRODUCT="PRODUCT",e.CUSTOM="CUSTOM",e.ACCOUNT="ACCOUNT",e.ADDRESSES="ADDRESSES",e.ORDERS="ORDERS",e.ORDER_DETAIL="ORDER_DETAIL",e.LOGIN="LOGIN",e.REGISTER="REGISTER",e.FORGOT_PASSWORD="FORGOT_PASSWORD",e.RECOVER_PASSWORD="RECOVER_PASSWORD",e.CART="CART",e.FAVORITE_PRODUCTS="FAVORITE_PRODUCTS",e.SEARCH="SEARCH",e.NOT_FOUND="NOT_FOUND",e.BLOG="BLOG",e.BLOG_INDEX="BLOG_INDEX",e.BLOG_CATEGORY="BLOG_CATEGORY",e.CHECKOUT="CHECKOUT",e.RAFFLE="RAFFLE",e.RAFFLE_DETAIL="RAFFLE_DETAIL",e.RAFFLE_ACCOUNT="RAFFLE_ACCOUNT"}(Zi||(Zi={}));var ss=new Uint8Array(16);function as(){if(!Qi&&!(Qi="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Qi(ss)}var us=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function cs(e){return"string"==typeof e&&us.test(e)}for(var ls=[],ps=0;ps<256;++ps)ls.push((ps+256).toString(16).substr(1));function ds(e,t,n){var r=(e=e||{}).random||(e.rng||as)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var o=0;o<16;++o)t[n+o]=r[o];return t}return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(ls[e[t+0]]+ls[e[t+1]]+ls[e[t+2]]+ls[e[t+3]]+"-"+ls[e[t+4]]+ls[e[t+5]]+"-"+ls[e[t+6]]+ls[e[t+7]]+"-"+ls[e[t+8]]+ls[e[t+9]]+"-"+ls[e[t+10]]+ls[e[t+11]]+ls[e[t+12]]+ls[e[t+13]]+ls[e[t+14]]+ls[e[t+15]]).toLowerCase();if(!cs(n))throw TypeError("Stringified UUID is invalid");return n}(r)}var fs,hs=function(e){this.id=e.id||ds(),this.displayName=e.displayName||"",this.key=e.key||"",this.color=e.color||"",Qo(this)},vs=function(e){this.id=(null==e?void 0:e.id)||null,Qo(this)},_s=function(e){var t;void 0===e&&(e={}),this.colors=e.colors?e.colors.map((function(e){return new hs(e)})):[],this.favicon=(null===(t=e.favicon)||void 0===t?void 0:t.id)?e.favicon:new vs,this.stockPreference=e.stockPreference||fs.SHOW_ALL,Qo(this)};!function(e){e.HIDE_OUT_OF_STOCK="HIDE_OUT_OF_STOCK",e.SHOW_ALL="SHOW_ALL",e.SHOW_OUT_OF_STOCK_AT_END="SHOW_OUT_OF_STOCK_AT_END"}(fs||(fs={}));var gs,ms,bs=function(){function e(e){var t;void 0===e&&(e={}),this.name=e.name||"",this.components=e.components?e.components.map((function(e){return new es(e)})):[],this.pages=e.pages?e.pages.map((function(e){return new os(e)})):[],this.settings=e.settings?new _s(e.settings):new _s,this.customData=e.customData?null===(t=e.customData)||void 0===t?void 0:t.map((function(e){return new ts(e)})):[],this.createCheckoutData(),Qo(this)}return Object.defineProperty(e.prototype,"headerComponent",{get:function(){return this.components.find((function(e){return e.isHeader}))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"footerComponent",{get:function(){return this.components.find((function(e){return e.isFooter}))},enumerable:!1,configurable:!0}),e.prototype.createCheckoutData=function(){var e=this.components.find((function(e){return"checkout"===e.id})),t=this.pages.find((function(e){return"checkout"===e.id}));e||(e=new es({id:"checkout",dir:"",displayName:"",props:[new $i({name:"buttonBgColor",isRequired:!1,type:Ji.COLOR}),new $i({name:"buttonTextColor",isRequired:!1,type:Ji.COLOR}),new $i({name:"buttonDisabledBgColor",isRequired:!1,type:Ji.COLOR}),new $i({name:"buttonDisabledTextColor",isRequired:!1,type:Ji.COLOR}),new $i({name:"primaryTextColor",isRequired:!1,type:Ji.COLOR}),new $i({name:"secondaryTextColor",isRequired:!1,type:Ji.COLOR}),new $i({name:"primaryBgColor",isRequired:!1,type:Ji.COLOR}),new $i({name:"secondaryBgColor",isRequired:!1,type:Ji.COLOR}),new $i({name:"borderColor",isRequired:!1,type:Ji.COLOR}),new $i({name:"cardBgColor",isRequired:!1,type:Ji.COLOR}),new $i({name:"errorColor",isRequired:!1,type:Ji.COLOR}),new $i({name:"errorLightColor",isRequired:!1,type:Ji.COLOR}),new $i({name:"warningColor",isRequired:!1,type:Ji.COLOR}),new $i({name:"warningLightColor",isRequired:!1,type:Ji.COLOR}),new $i({name:"successColor",isRequired:!1,type:Ji.COLOR}),new $i({name:"successLightColor",isRequired:!1,type:Ji.COLOR})]}),this.components.push(e)),t||this.pages.push(new os({id:"checkout",type:Zi.CHECKOUT,components:[new rs({componentId:e.id,propValues:{buttonBgColor:ys,buttonTextColor:Os,buttonDisabledBgColor:Es,buttonDisabledTextColor:Ns,primaryTextColor:ws,secondaryTextColor:As,primaryBgColor:Ss,secondaryBgColor:Ts,borderColor:Cs,cardBgColor:xs,errorColor:Ds,errorLightColor:Is,warningColor:Rs,warningLightColor:js,successColor:Ls,successLightColor:Ps}})]}))},e}(),ys="#272727",Os="#FFFFFF",Es="#F7F7F9",Ns="#8A8B94",ws="#272727",As="#8A8B94",Ss="#FFFFFF",Ts="#F7F7F9",Cs="#E5E4E9",xs="#F7F7F9",Ds="#FB4E4E",Is="#FCF3F4",Rs="#FFBC1F",js="#FFFAEE",Ls="#2DCA73",Ps="#F6FFED",ks=function(){function n(){}return n.generate=function(t){return Ce(e.join(process.cwd(),"src","theme.json"),"",JSON.stringify(t,null,2))},n.generateInitialThemeJsonFile=function(){var e=new bs;return e.pages.push(new os({type:Zi.INDEX})),n.generate(e)},n.getTheme=function(){return r(this,void 0,void 0,(function(){var n,r;return o(this,(function(o){try{return n=e.join(process.cwd(),"src","theme.json"),[2,(r=t.readFileSync(n)).length?JSON.parse(r.toString()):null]}catch(e){console.error(e)}return[2]}))}))},n}(),Vs=function(){function t(){}return t.generate=function(n){return r(this,void 0,void 0,(function(){var r;return o(this,(function(o){switch(o.label){case 0:return[4,Te(e.join(process.cwd(),"src","components","__generated__"))];case 1:return o.sent(),[4,t.generateAllComponentImportsFile(n)];case 2:return(r=o.sent())?[4,t.generateAllComponentImportsFileForEditor(n)]:[3,4];case 3:r=o.sent(),o.label=4;case 4:return[2,r]}}))}))},t.generateAllComponentImportsFileForEditor=function(t){return r(this,void 0,void 0,(function(){var n,r,i;return o(this,(function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),n='import dynamic from "next/dynamic";\r\n',n+='import { IkasEditorComponentLoader } from "@ikas/storefront";\r\n',n+="\r\n",n+="const loader = { loading: () => <IkasEditorComponentLoader /> };\r\n",n+="\r\n",(r=t.components.filter((function(e){return"checkout"!==e.id}))).filter((function(e){return"checkout"!==e.id})).forEach((function(e,t){n+="const Component"+t+' = dynamic(() => import("../'+e.dir+'"), loader);\r\n'})),n+="\r\n",n+="\nconst Components = {\n "+r.map((function(e,t){return'"'+e.id+'": Component'+t}))+"\n};\n",n+="\r\n",n+="export default Components;",[4,Ce(e.join(process.cwd(),"src","components","__generated__"),"editor.tsx",n)];case 1:return[2,o.sent()];case 2:return i=o.sent(),console.error(i),[2,!1];case 3:return[2]}}))}))},t.generateAllComponentImportsFile=function(t){return r(this,void 0,void 0,(function(){var n,r,i;return o(this,(function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),n="",(r=t.components.filter((function(e){return"checkout"!==e.id}))).filter((function(e){return"checkout"!==e.id})).forEach((function(e,t){n+="import Component"+t+' from "../'+e.dir+'";\r\n'})),n+="\r\n",n+="\nconst Components = {\n "+r.map((function(e,t){return'"'+e.id+'": Component'+t}))+"\n};\n",n+="\r\n",n+="export default Components;",[4,Ce(e.join(process.cwd(),"src","components","__generated__"),"index.tsx",n)];case 1:return[2,o.sent()];case 2:return i=o.sent(),console.error(i),[2,!1];case 3:return[2]}}))}))},t}(),Us=[{path:"[slug]/index.tsx",pageComponentName:"SlugPage",pageTypes:[Zi.PRODUCT,Zi.CATEGORY,Zi.BRAND],isDynamicSSG:!0},{path:"account/orders/[id].tsx",pageComponentName:"OrderDetailPage",pageTypes:[Zi.ORDER_DETAIL],isSSR:!0},{path:"account/orders/index.tsx",pageComponentName:"OrdersPage",pageTypes:[Zi.ORDERS]},{path:"account/addresses.tsx",pageComponentName:"AddressesPage",pageTypes:[Zi.ADDRESSES]},{path:"account/favorite-products.tsx",pageComponentName:"FavoriteProductsPage",pageTypes:[Zi.FAVORITE_PRODUCTS]},{path:"account/forgot-password.tsx",pageComponentName:"ForgotPasswordPage",pageTypes:[Zi.FORGOT_PASSWORD]},{path:"account/index.tsx",pageComponentName:"AccountPage",pageTypes:[Zi.ACCOUNT]},{path:"account/login.tsx",pageComponentName:"LoginPage",pageTypes:[Zi.LOGIN]},{path:"account/raffles.tsx",pageComponentName:"AccountRafflesPage",pageTypes:[Zi.RAFFLE_ACCOUNT]},{path:"account/recover-password.tsx",pageComponentName:"RecoverPasswordPage",pageTypes:[Zi.RECOVER_PASSWORD]},{path:"account/register.tsx",pageComponentName:"RegisterPage",pageTypes:[Zi.REGISTER]},{path:"blog/[slug].tsx",pageComponentName:"BlogSlugPage",pageTypes:[Zi.BLOG,Zi.BLOG_CATEGORY],isDynamicSSG:!0},{path:"blog/index.tsx",pageComponentName:"BlogPage",pageTypes:[Zi.BLOG_INDEX]},{path:"pages/[slug].tsx",pageComponentName:"CustomPage",pageTypes:[Zi.CUSTOM],isDynamicSSG:!0},{path:"raffle/[slug].tsx",pageComponentName:"RafflePage",pageTypes:[Zi.RAFFLE_DETAIL],isDynamicSSG:!0},{path:"raffle/index.tsx",pageComponentName:"RafflesPage",pageTypes:[Zi.RAFFLE]},{path:"404.tsx",pageComponentName:"NotFoundPage",pageTypes:[Zi.NOT_FOUND]},{path:"cart.tsx",pageComponentName:"CartPage",pageTypes:[Zi.CART]},{path:"index.tsx",pageComponentName:"IndexPage",pageTypes:[Zi.INDEX]},{path:"search.tsx",pageComponentName:"SearchPage",pageTypes:[Zi.SEARCH]},{path:"checkout.tsx",pageComponentName:"CheckoutPage",pageTypes:[],isCheckout:!0},{path:"editor.tsx",pageComponentName:"EditorPage",pageTypes:[],isEditor:!0}],Bs=function(){function t(){}return t.generate=function(){return r(this,void 0,void 0,(function(){var n,r,i,s,a,u,c,l,p,d,f;return o(this,(function(o){switch(o.label){case 0:return[4,Te(e.join(process.cwd(),"src","pages"),["_app.tsx","_document.tsx","api"])];case 1:o.sent(),n=!0,r=0,i=Us,o.label=2;case 2:return r<i.length?(s=i[r],(a=n)?[4,t.generatePageWithInfo(s)]:[3,4]):[3,6];case 3:a=o.sent(),o.label=4;case 4:n=a,o.label=5;case 5:return r++,[3,2];case 6:return u=Us.find((function(e){return e.isCheckout})),c=Us.find((function(e){return e.isEditor})),u?[4,t.generatePageWithInfo(u)]:[3,8];case 7:return p=o.sent(),[3,9];case 8:p=!1,o.label=9;case 9:return l=p,c?[4,t.generatePageWithInfo(c)]:[3,11];case 10:return f=o.sent(),[3,12];case 11:f=!1,o.label=12;case 12:return d=f,[2,n&&l&&d]}}))}))},t.generatePageWithInfo=function(t){return r(this,void 0,void 0,(function(){var n,r,i,s,a,u;return o(this,(function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),n="",t.isCheckout?n='import { CheckoutPage } from "@ikas/storefront";\n\nexport default CheckoutPage.default;\nexport const getStaticProps = CheckoutPage.getStaticProps;\n':t.isEditor?n='import { EditorPage } from "@ikas/storefront";\nimport Components from "../components/__generated__/editor";\n\nconst PageComponent = EditorPage.default;\n\nconst Page = (props: any) => {\n return <PageComponent components={Components} {...props} />;\n};\n\nexport default Page;\nexport const getStaticProps = EditorPage.getStaticProps;\n':(r="import { "+t.pageComponentName+' } from "@ikas/storefront";\r\n','import Components from "src/components/__generated__/index";\r\n',i="\nconst PageComponent = "+t.pageComponentName+".default;\n\nconst Page = (props: any) => {\n return <PageComponent components={Components} {...props} />;\n};\n\nexport default Page;\r\n",s=t.isDynamicSSG?"export const getStaticPaths = "+t.pageComponentName+".getStaticPaths;\r\n":"",a=t.isSSR?"export const getServerSideProps = "+t.pageComponentName+".getServerSideProps;\r\n":"export const getStaticProps = "+t.pageComponentName+".getStaticProps;\r\n",n=r+'import Components from "src/components/__generated__/index";\r\n'+i+s+a),[4,Ce(e.join(process.cwd(),"src","pages"),t.path,n)];case 1:return[2,o.sent()];case 2:return u=o.sent(),console.error(u),[2,!1];case 3:return[2]}}))}))},t.generatePageWithType=function(e){return r(this,void 0,void 0,(function(){var n;return o(this,(function(r){switch(r.label){case 0:return(n=Us.find((function(t){return t.pageTypes.includes(e)})))?[4,t.generatePageWithInfo(n)]:[3,2];case 1:return[2,r.sent()];case 2:return[2,!1]}}))}))},t}(),Fs=function(){function n(){}return n.generate=function(){return r(this,void 0,void 0,(function(){return o(this,(function(n){switch(n.label){case 0:return t.existsSync(e.join(process.cwd(),"src","store","index.ts"))?[3,2]:[4,Ce(e.join(process.cwd(),"src","store"),"index.ts",'import { IkasBaseStore } from "@ikas/storefront";\n\nexport default class Store extends IkasBaseStore {\n // Add your own stores here if needed\n // ex: yourStore: YourStore;\n\n constructor() {\n super();\n\n // Init your own stores here\n // ex: this.yourStore = new YourStore();\n }\n}\n')];case 1:return[2,n.sent()];case 2:return[2,!0]}}))}))},n}();gs=[{name:"generate",alias:"g",type:Boolean},{name:"dev",alias:"d",type:Boolean}],(ms=Se(gs)).generate&&(function(e){return r(this,void 0,void 0,(function(){var t,n,r,i,s,a;return o(this,(function(o){switch(o.label){case 0:return[4,ks.getTheme()];case 1:return(t=o.sent())?[3,3]:[4,ks.generateInitialThemeJsonFile()];case 2:o.sent(),o.label=3;case 3:return[4,ks.getTheme()];case 4:return t=o.sent(),[4,ks.generate(t)];case 5:return(a=o.sent())?[4,Vs.generate(t)]:[3,7];case 6:a=o.sent(),o.label=7;case 7:return(s=a)?[4,Bs.generate()]:[3,9];case 8:s=o.sent(),o.label=9;case 9:return(i=s)?[4,De.generate()]:[3,11];case 10:i=o.sent(),o.label=11;case 11:return(r=i)?[4,Fs.generate()]:[3,13];case 12:r=o.sent(),o.label=13;case 13:return(n=r)?[4,Jt.generate(e)]:[3,15];case 14:n=o.sent(),o.label=15;case 15:return[2,n]}}))}))}(ms.dev?"dev":"prod")?console.log("Project files generated successfully!"):console.log("Project files generate failed!"));
16
+ ***************************************************************************** */var n=function(){return n=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},n.apply(this,arguments)};function r(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{u(r.next(e))}catch(e){i(e)}}function a(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))}function o(e,t){var n,r,o,i,s={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(;s;)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 s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],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])}}}var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function s(e){var t={exports:{}};return e(t,t.exports),t.exports}var a=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,u=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,c="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",l="[\\ud800-\\udfff]",p="["+c+"]",d="[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]",f="\\d+",h="[\\u2700-\\u27bf]",v="[a-z\\xdf-\\xf6\\xf8-\\xff]",_="[^\\ud800-\\udfff"+c+f+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",g="\\ud83c[\\udffb-\\udfff]",m="[^\\ud800-\\udfff]",b="(?:\\ud83c[\\udde6-\\uddff]){2}",y="[\\ud800-\\udbff][\\udc00-\\udfff]",O="[A-Z\\xc0-\\xd6\\xd8-\\xde]",E="(?:"+v+"|"+_+")",N="(?:"+O+"|"+_+")",w="(?:"+d+"|"+g+")"+"?",A="[\\ufe0e\\ufe0f]?"+w+("(?:\\u200d(?:"+[m,b,y].join("|")+")[\\ufe0e\\ufe0f]?"+w+")*"),S="(?:"+[h,b,y].join("|")+")"+A,T="(?:"+[m+d+"?",d,b,y,l].join("|")+")",C=RegExp("['’]","g"),x=RegExp(d,"g"),D=RegExp(g+"(?="+g+")|"+T+A,"g"),I=RegExp([O+"?"+v+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[p,O,"$"].join("|")+")",N+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[p,O+E,"$"].join("|")+")",O+"?"+E+"+(?:['’](?:d|ll|m|re|s|t|ve))?",O+"+(?:['’](?:D|LL|M|RE|S|T|VE))?",f,S].join("|"),"g"),R=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0\\ufe0e\\ufe0f]"),j=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,L="object"==typeof i&&i&&i.Object===Object&&i,P="object"==typeof self&&self&&self.Object===Object&&self,k=L||P||Function("return this")();var V,U=(V={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"ss"},function(e){return null==V?void 0:V[e]});function B(e){return R.test(e)}function F(e){return B(e)?function(e){return e.match(D)||[]}(e):function(e){return e.split("")}(e)}var G=Object.prototype.toString,M=k.Symbol,q=M?M.prototype:void 0,K=q?q.toString:void 0;function z(e){if("string"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==G.call(e)}(e))return K?K.call(e):"";var t=e+"";return"0"==t&&1/e==-Infinity?"-0":t}function X(e,t,n){var r=e.length;return n=void 0===n?r:n,!t&&n>=r?e:function(e,t,n){var r=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var i=Array(o);++r<o;)i[r]=e[r+t];return i}(e,t,n)}function H(e){return null==e?"":z(e)}var W,Y=(W=function(e,t,n){return t=t.toLowerCase(),e+(n?$(H(t).toLowerCase()):t)},function(e){return function(e,t,n,r){var o=-1,i=e?e.length:0;for(r&&i&&(n=e[++o]);++o<i;)n=t(n,e[o],o,e);return n}(function(e,t,n){return e=H(e),void 0===(t=n?void 0:t)?function(e){return j.test(e)}(e)?function(e){return e.match(I)||[]}(e):function(e){return e.match(a)||[]}(e):e.match(t)||[]}(function(e){return(e=H(e))&&e.replace(u,U).replace(x,"")}(e).replace(C,"")),W,"")});var J,$=(J="toUpperCase",function(e){var t=B(e=H(e))?F(e):void 0,n=t?t[0]:e.charAt(0),r=t?X(t,1).join(""):e.slice(1);return n[J]()+r});var Z,Q=(Z=Y)&&"object"==typeof Z&&"default"in Z?Z.default:Z;function ee(e){return Array.isArray(e)?e:void 0===e?[]:function(e){return function(e){return"object"==typeof e&&null!==e}(e)&&"number"==typeof e.length}(e)||e instanceof Set?Array.from(e):[e]}function te(e){return Array.isArray(e)?e:void 0===e?[]:function(e){return function(e){return"object"==typeof e&&null!==e}(e)&&"number"==typeof e.length}(e)?Array.prototype.slice.call(e):[e]}function ne(e,t){const n=[],r=te(arguments);return r.splice(0,2),te(e).forEach(((e,o)=>{let i=[];r.forEach((t=>{"function"==typeof t?i=i.concat(t(e)):i.push(t)})),t(e)&&n.push({index:o,replaceWithValue:i})})),n.reverse().forEach((t=>{const n=[t.index,1].concat(t.replaceWithValue);e.splice.apply(e,n)})),e}const re={short:/^-([^\d-])$/,long:/^--(\S+)/,combinedShort:/^-[^\d-]{2,}$/,optEquals:/^(--\S+?)=(.*)/};class oe extends Array{load(e){if(this.clear(),e&&e!==process.argv)e=ee(e);else{e=process.argv.slice(0);const t=process.execArgv.some(le)?1:2;e.splice(0,t)}e.forEach((e=>this.push(String(e))))}clear(){this.length=0}expandOptionEqualsNotation(){if(this.some((e=>re.optEquals.test(e)))){const e=[];this.forEach((t=>{const n=t.match(re.optEquals);n?e.push(n[1],n[2]):e.push(t)})),this.clear(),this.load(e)}}expandGetoptNotation(){this.hasCombinedShortOptions()&&ne(this,re.combinedShort,ie)}hasCombinedShortOptions(){return this.some((e=>re.combinedShort.test(e)))}static from(e){const t=new this;return t.load(e),t}}function ie(e){return(e=e.slice(1)).split("").map((e=>"-"+e))}function se(e){return re.optEquals.test(e)}function ae(e){return(re.short.test(e)||re.long.test(e))&&!re.optEquals.test(e)}function ue(e){return re.short.test(e)?e.match(re.short)[1]:function(e){return re.long.test(e)&&!se(e)}(e)?e.match(re.long)[1]:se(e)?e.match(re.optEquals)[1].replace(/^--/,""):null}function ce(e){return!(ae(e)||re.combinedShort.test(e)||re.optEquals.test(e))}function le(e){return["--eval","-e"].indexOf(e)>-1||e.startsWith("--eval=")}function pe(e){return"object"==typeof e&&null!==e}function de(e){return void 0!==e}function fe(e){return"function"==typeof e}var he={isNumber:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},isString:function(e){return"string"==typeof e},isBoolean:function(e){return"boolean"==typeof e},isPlainObject:function(e){return null!==e&&"object"==typeof e&&e.constructor===Object},isArrayLike:function(e){return pe(e)&&"number"==typeof e.length},isObject:pe,isDefined:de,isFunction:fe,isClass:function(e){return!!fe(e)&&/^class /.test(Function.prototype.toString.call(e))},isPrimitive:function(e){if(null===e)return!0;switch(typeof e){case"string":case"number":case"symbol":case"undefined":case"boolean":return!0;default:return!1}},isPromise:function(e){if(e){const t=de(Promise)&&e instanceof Promise,n=e.then&&"function"==typeof e.then;return!(!t&&!n)}return!1},isIterable:function(e){return!(null===e||!de(e))&&("function"==typeof e[Symbol.iterator]||"function"==typeof e[Symbol.asyncIterator])}};class ve{constructor(e){this.name=e.name,this.type=e.type||String,this.alias=e.alias,this.multiple=e.multiple,this.lazyMultiple=e.lazyMultiple,this.defaultOption=e.defaultOption,this.defaultValue=e.defaultValue,this.group=e.group;for(const t in e)this[t]||(this[t]=e[t])}isBoolean(){return this.type===Boolean||he.isFunction(this.type)&&"Boolean"===this.type.name}isMultiple(){return this.multiple||this.lazyMultiple}static create(e){return new this(e)}}class _e extends Array{validate(e){this.some((e=>!e.name))&&ge("INVALID_DEFINITIONS","Invalid option definitions: the `name` property is required on each definition");let t;this.some((e=>e.type&&"function"!=typeof e.type))&&ge("INVALID_DEFINITIONS","Invalid option definitions: the `type` property must be a setter fuction (default: `Boolean`)");this.some((e=>(t=e,he.isDefined(e.alias)&&he.isNumber(e.alias))))&&ge("INVALID_DEFINITIONS","Invalid option definition: to avoid ambiguity an alias cannot be numeric [--"+t.name+" alias is -"+t.alias+"]");this.some((e=>(t=e,he.isDefined(e.alias)&&1!==e.alias.length)))&&ge("INVALID_DEFINITIONS","Invalid option definition: an alias must be a single character");this.some((e=>(t=e,"-"===e.alias)))&&ge("INVALID_DEFINITIONS",'Invalid option definition: an alias cannot be "-"');be(this.map((t=>e?t.name.toLowerCase():t.name)))&&ge("INVALID_DEFINITIONS","Two or more option definitions have the same name");be(this.map((t=>e&&he.isDefined(t.alias)?t.alias.toLowerCase():t.alias)))&&ge("INVALID_DEFINITIONS","Two or more option definitions have the same alias");be(this.map((e=>e.defaultOption)))&&ge("INVALID_DEFINITIONS","Only one option definition can be the defaultOption");this.some((e=>(t=e,e.isBoolean()&&e.defaultOption)))&&ge("INVALID_DEFINITIONS",`A boolean option ["${t.name}"] can not also be the defaultOption.`)}get(e,t){if(ae(e)){if(re.short.test(e)){const n=ue(e);if(t){const e=n.toLowerCase();return this.find((t=>he.isDefined(t.alias)&&t.alias.toLowerCase()===e))}return this.find((e=>e.alias===n))}{const n=ue(e);if(t){const e=n.toLowerCase();return this.find((t=>t.name.toLowerCase()===e))}return this.find((e=>e.name===n))}}return this.find((t=>t.name===e))}getDefault(){return this.find((e=>!0===e.defaultOption))}isGrouped(){return this.some((e=>e.group))}whereGrouped(){return this.filter(me)}whereNotGrouped(){return this.filter((e=>!me(e)))}whereDefaultValueSet(){return this.filter((e=>he.isDefined(e.defaultValue)))}static from(e,t){if(e instanceof this)return e;const n=super.from(ee(e),(e=>ve.create(e)));return n.validate(t),n}}function ge(e,t){const n=new Error(t);throw n.name=e,n}function me(e){return ee(e.group).some((e=>e))}function be(e){const t={};for(let n=0;n<e.length;n++){const r=e[n];if(t[r])return!0;he.isDefined(r)&&(t[r]=!0)}}class ye{constructor(e,t){this.options=Object.assign({},t),this.definitions=_e.from(e,this.options.caseInsensitive),this.argv=oe.from(this.options.argv),this.argv.hasCombinedShortOptions()&&ne(this.argv,re.combinedShort.test.bind(re.combinedShort),(e=>(e=e.slice(1)).split("").map((t=>({origArg:`-${e}`,arg:"-"+t})))))}*[Symbol.iterator](){const e=this.definitions;let t,n,r,o,i,s=!1,a=!1;for(let u of this.argv){if(he.isPlainObject(u)&&(i=u.origArg,u=u.arg),a&&this.options.stopAtFirstUnknown){yield{event:"unknown_value",arg:u,name:"_unknown",value:void 0};continue}if(ae(u))t=e.get(u,this.options.caseInsensitive),n=void 0,t?(n=!!t.isBoolean()||null,o="set"):o="unknown_option";else if(se(u)){const r=u.match(re.optEquals);t=e.get(r[1],this.options.caseInsensitive),t?t.isBoolean()?(yield{event:"unknown_value",arg:u,name:"_unknown",value:n,def:t},o="set",n=!0):(o="set",n=r[2]):o="unknown_option"}else ce(u)&&(t?(n=u,o="set"):(t=this.definitions.getDefault(),t&&!s?(n=u,o="set"):(o="unknown_value",t=void 0)));r=t?t.name:"_unknown";const c={event:o,arg:u,name:r,value:n,def:t};i&&(c.subArg=u,c.arg=i),yield c,"_unknown"===r&&(a=!0),t&&t.defaultOption&&!t.isMultiple()&&"set"===o&&(s=!0),t&&t.isBoolean()&&(t=void 0),t&&!t.multiple&&he.isDefined(n)&&null!==n&&(t=void 0),n=void 0,o=void 0,r=void 0,i=void 0}}}const Oe=new WeakMap;class Ee{constructor(e){this.definition=new ve(e),this.state=null,this.resetToDefault()}get(){return Oe.get(this)}set(e){this._set(e,"set")}_set(e,t){const n=this.definition;if(n.isMultiple()){if(null!=e){const r=this.get();"default"===this.state&&(r.length=0),r.push(n.type(e)),this.state=t}}else{if(!n.isMultiple()&&"set"===this.state){const t=new Error(`Singular option already set [${this.definition.name}=${this.get()}]`);throw t.name="ALREADY_SET",t.value=e,t.optionName=n.name,t}null==e?Oe.set(this,e):(Oe.set(this,n.type(e)),this.state=t)}}resetToDefault(){he.isDefined(this.definition.defaultValue)?this.definition.isMultiple()?Oe.set(this,ee(this.definition.defaultValue).slice()):Oe.set(this,this.definition.defaultValue):this.definition.isMultiple()?Oe.set(this,[]):Oe.set(this,null),this.state="default"}static create(e){return(e=new ve(e)).isBoolean()?Ne.create(e):new this(e)}}class Ne extends Ee{set(e){super.set(!0)}static create(e){return new this(e)}}class we extends Map{constructor(e){super(),this.definitions=_e.from(e),this.set("_unknown",Ee.create({name:"_unknown",multiple:!0}));for(const e of this.definitions.whereDefaultValueSet())this.set(e.name,Ee.create(e))}toObject(e){e=e||{};const t={};for(const n of this){const r=e.camelCase&&"_unknown"!==n[0]?Q(n[0]):n[0],o=n[1];("_unknown"!==r||o.get().length)&&(t[r]=o.get())}return e.skipUnknown&&delete t._unknown,t}}class Ae extends we{toObject(e){const t=super.toObject({skipUnknown:e.skipUnknown}),n=super.toObject(e),r=n._unknown;delete n._unknown;const o={_all:n};return r&&r.length&&(o._unknown=r),this.definitions.whereGrouped().forEach((n=>{const r=e.camelCase?Q(n.name):n.name,i=t[n.name];for(const e of ee(n.group))o[e]=o[e]||{},he.isDefined(i)&&(o[e][r]=i)})),this.definitions.whereNotGrouped().forEach((n=>{const r=e.camelCase?Q(n.name):n.name,i=t[n.name];he.isDefined(i)&&(o._none||(o._none={}),o._none[r]=i)})),o}}var Se=function(e,t){(t=t||{}).stopAtFirstUnknown&&(t.partial=!0),e=_e.from(e,t.caseInsensitive);const n=new ye(e,{argv:t.argv,stopAtFirstUnknown:t.stopAtFirstUnknown,caseInsensitive:t.caseInsensitive}),r=new(e.isGrouped()?Ae:we)(e);for(const e of n){const n=e.subArg||e.arg;if(!t.partial){if("unknown_value"===e.event){const e=new Error(`Unknown value: ${n}`);throw e.name="UNKNOWN_VALUE",e.value=n,e}if("unknown_option"===e.event){const e=new Error(`Unknown option: ${n}`);throw e.name="UNKNOWN_OPTION",e.optionName=n,e}}let o;r.has(e.name)?o=r.get(e.name):(o=Ee.create(e.def),r.set(e.name,o)),"_unknown"===e.name?o.set(n):o.set(e.value)}return r.toObject({skipUnknown:!t.partial,camelCase:t.camelCase})};function Te(n,i){return r(this,void 0,void 0,(function(){return o(this,(function(r){try{return t.readdirSync(n).forEach((function(r){(null==i?void 0:i.includes(r))||t.unlinkSync(e.join(n,r))})),[2,!0]}catch(e){return[2,!1]}return[2]}))}))}function Ce(n,i,s){var a;return r(this,void 0,void 0,(function(){var r,u,c;return o(this,(function(o){try{return r=n,u=function(e){var t=e.split("/");return t.length>1?{dirParts:t.slice(0,t.length-1),filePart:t[t.length-1]}:{filePart:e}}(i),(null===(a=u.dirParts)||void 0===a?void 0:a.length)&&(r=e.join.apply(e,function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],s=0,a=i.length;s<a;s++,o++)r[o]=i[s];return r}([r],u.dirParts))),t.existsSync(r)||t.mkdirSync(r,{recursive:!0}),c=e.join(r,u.filePart),t.writeFileSync(c,s),[2,!0]}catch(e){return console.error(e),[2,!1]}return[2]}))}))}var xe=[{content:'import { IkasLocalThemeAPI } from "@ikas/storefront-utils";\n\nexport default IkasLocalThemeAPI.GetComponentDirs.getComponentDirs;\nexport const config = IkasLocalThemeAPI.GetComponentDirs.config;\n',fileName:"getComponentDirs.ts"},{content:'import { IkasLocalThemeAPI } from "@ikas/storefront-utils";\n\nexport default IkasLocalThemeAPI.GetTheme.getTheme;\nexport const config = IkasLocalThemeAPI.GetTheme.config;\n',fileName:"getTheme.ts"},{content:'import { IkasLocalThemeAPI } from "@ikas/storefront-utils";\n\nexport default IkasLocalThemeAPI.UpdateTheme.updateTheme;\nexport const config = IkasLocalThemeAPI.UpdateTheme.config;\n',fileName:"updateTheme.ts"},{content:'import { IkasLocalThemeAPI } from "@ikas/storefront-utils";\n\nexport default IkasLocalThemeAPI.UploadTheme.uploadTheme;\nexport const config = IkasLocalThemeAPI.UploadTheme.config;\n',fileName:"uploadTheme.ts"}],De=function(){function t(){}return t.generate=function(){return r(this,void 0,void 0,(function(){var n,r,i,s,a;return o(this,(function(o){switch(o.label){case 0:return[4,Te(e.join(process.cwd(),"src","pages","api"))];case 1:o.sent(),n=!0,r=0,i=xe,o.label=2;case 2:return r<i.length?(s=i[r],(a=n)?[4,t.generateAPI(s)]:[3,4]):[3,6];case 3:a=o.sent(),o.label=4;case 4:n=a,o.label=5;case 5:return r++,[3,2];case 6:return[2,n]}}))}))},t.generateAPI=function(t){return Ce(e.join(process.cwd(),"src","pages","api"),t.fileName,t.content)},t}(),Ie="object"==typeof i&&i&&i.Object===Object&&i,Re="object"==typeof self&&self&&self.Object===Object&&self,je=Ie||Re||Function("return this")(),Le=je.Symbol,Pe=Object.prototype,ke=Pe.hasOwnProperty,Ve=Pe.toString,Ue=Le?Le.toStringTag:void 0;var Be=function(e){var t=ke.call(e,Ue),n=e[Ue];try{e[Ue]=void 0;var r=!0}catch(e){}var o=Ve.call(e);return r&&(t?e[Ue]=n:delete e[Ue]),o},Fe=Object.prototype.toString;var Ge=function(e){return Fe.call(e)},Me=Le?Le.toStringTag:void 0;var qe=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Me&&Me in Object(e)?Be(e):Ge(e)};var Ke=function(e){return null!=e&&"object"==typeof e};var ze=function(e){return Ke(e)&&"[object Arguments]"==qe(e)},Xe=Object.prototype;Xe.hasOwnProperty,Xe.propertyIsEnumerable;ze(function(){return arguments}());var He=function(){return!1};s((function(e,t){var n=t&&!t.nodeType&&t,r=n&&e&&!e.nodeType&&e,o=r&&r.exports===n?je.Buffer:void 0,i=(o?o.isBuffer:void 0)||He;e.exports=i}));var We=s((function(e,t){var n=t&&!t.nodeType&&t,r=n&&e&&!e.nodeType&&e,o=r&&r.exports===n&&Ie.process,i=function(){try{var e=r&&r.require&&r.require("util").types;return e||o&&o.binding&&o.binding("util")}catch(e){}}();e.exports=i}));We&&We.isTypedArray;var Ye=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)};var Je=function(e){if(!Ye(e))return!1;var t=qe(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t};var $e,Ze=je["__core-js_shared__"],Qe=($e=/[^.]+$/.exec(Ze&&Ze.keys&&Ze.keys.IE_PROTO||""))?"Symbol(src)_1."+$e:"";var et=function(e){return!!Qe&&Qe in e},tt=Function.prototype.toString;var nt=function(e){if(null!=e){try{return tt.call(e)}catch(e){}try{return e+""}catch(e){}}return""},rt=/^\[object .+?Constructor\]$/,ot=Function.prototype,it=Object.prototype,st=ot.toString,at=it.hasOwnProperty,ut=RegExp("^"+st.call(at).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var ct=function(e){return!(!Ye(e)||et(e))&&(Je(e)?ut:rt).test(nt(e))};var lt=function(e,t){return null==e?void 0:e[t]};var pt=function(e,t){var n=lt(e,t);return ct(n)?n:void 0},dt=pt(Object,"create");var ft=function(){this.__data__=dt?dt(null):{},this.size=0};var ht=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},vt=Object.prototype.hasOwnProperty;var _t=function(e){var t=this.__data__;if(dt){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return vt.call(t,e)?t[e]:void 0},gt=Object.prototype.hasOwnProperty;var mt=function(e){var t=this.__data__;return dt?void 0!==t[e]:gt.call(t,e)};var bt=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=dt&&void 0===t?"__lodash_hash_undefined__":t,this};function yt(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}yt.prototype.clear=ft,yt.prototype.delete=ht,yt.prototype.get=_t,yt.prototype.has=mt,yt.prototype.set=bt;var Ot=yt;var Et=function(){this.__data__=[],this.size=0};var Nt=function(e,t){return e===t||e!=e&&t!=t};var wt=function(e,t){for(var n=e.length;n--;)if(Nt(e[n][0],t))return n;return-1},At=Array.prototype.splice;var St=function(e){var t=this.__data__,n=wt(t,e);return!(n<0)&&(n==t.length-1?t.pop():At.call(t,n,1),--this.size,!0)};var Tt=function(e){var t=this.__data__,n=wt(t,e);return n<0?void 0:t[n][1]};var Ct=function(e){return wt(this.__data__,e)>-1};var xt=function(e,t){var n=this.__data__,r=wt(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};function Dt(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Dt.prototype.clear=Et,Dt.prototype.delete=St,Dt.prototype.get=Tt,Dt.prototype.has=Ct,Dt.prototype.set=xt;var It=Dt,Rt=pt(je,"Map");var jt=function(){this.size=0,this.__data__={hash:new Ot,map:new(Rt||It),string:new Ot}};var Lt=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e};var Pt=function(e,t){var n=e.__data__;return Lt(t)?n["string"==typeof t?"string":"hash"]:n.map};var kt=function(e){var t=Pt(this,e).delete(e);return this.size-=t?1:0,t};var Vt=function(e){return Pt(this,e).get(e)};var Ut=function(e){return Pt(this,e).has(e)};var Bt=function(e,t){var n=Pt(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};function Ft(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Ft.prototype.clear=jt,Ft.prototype.delete=kt,Ft.prototype.get=Vt,Ft.prototype.has=Ut,Ft.prototype.set=Bt;var Gt=Ft;function Mt(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var s=e.apply(this,r);return n.cache=i.set(o,s)||i,s};return n.cache=new(Mt.Cache||Gt),n}Mt.Cache=Gt;var qt=Mt;var Kt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,zt=/\\(\\)?/g;(function(e){var t=qt(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache})((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(Kt,(function(e,n,r,o){t.push(r?o.replace(zt,"$1"):n||e)})),t}));var Xt=Le?Le.prototype:void 0;Xt&&Xt.toString;var Ht={next:"12.0.7",react:"17.0.2","react-dom":"17.0.2",mobx:"^6.1.3","mobx-react-lite":"^3.1.5","next-transpile-modules":"^9.0.0","@ikas/storefront-utils":"^2.0.0-alpha.1"},Wt={"@types/node":"^14.14.6","@types/react":"^16.9.55","@typescript-eslint/eslint-plugin":"^2.10.0","@typescript-eslint/parser":"^2.10.0",eslint:"^6.6.0","eslint-config-react-app":"^5.2.1","eslint-loader":"3.0.3","eslint-plugin-flowtype":"4.6.0","eslint-plugin-import":"2.20.1","eslint-plugin-jsx-a11y":"6.2.3","eslint-plugin-react":"7.19.0","eslint-plugin-react-hooks":"^1.6.1",sass:"^1.43.4",typescript:"^4.5.2"},Yt={upgradeDependencies:"yarn upgrade @ikas/storefront @ikas/storefront-utils",dev:"next dev -p 3333",build:"next build",start:"next start",generate:"ikas --generate","prettier:all":"npx prettier@^2.1 './**/src/**/*.(ts|tsx|css|scss)' --write"},Jt=function(){function i(){}return i.generate=function(e){return r(this,void 0,void 0,(function(){var t,n,r;return o(this,(function(o){switch(o.label){case 0:return[4,i.generateTsConfig()];case 1:return(r=o.sent())?[4,i.generateNextConfig()]:[3,3];case 2:r=o.sent(),o.label=3;case 3:return(n=r)?[4,i.generatePackageJson()]:[3,5];case 4:n=o.sent(),o.label=5;case 5:return(t=n)?[4,i.generateEnv(e)]:[3,7];case 6:t=o.sent(),o.label=7;case 7:return[2,t]}}))}))},i.generateTsConfig=function(){return Ce(process.cwd(),"tsconfig.json",'{\n "compilerOptions": {\n "target": "esnext",\n "lib": [\n "dom",\n "dom.iterable",\n "esnext"\n ],\n "allowJs": true,\n "skipLibCheck": true,\n "strict": true,\n "forceConsistentCasingInFileNames": true,\n "experimentalDecorators": true,\n "noEmit": true,\n "esModuleInterop": true,\n "module": "esnext",\n "moduleResolution": "node",\n "resolveJsonModule": true,\n "isolatedModules": true,\n "jsx": "preserve",\n "baseUrl": ".",\n "useUnknownInCatchVariables": false,\n "incremental": true\n },\n "typeRoots": [\n "./node_modules/@types"\n ],\n "include": [\n "next-env.d.ts",\n "**/*.ts",\n "**/*.tsx",\n "**/typings/global.d.ts",\n ],\n "exclude": [\n "node_modules",\n "./src/pages/api",\n ]\n}')},i.generateNextConfig=function(){return Ce(process.cwd(),"next.config.js",'const withTM = require("next-transpile-modules")(["@ikas/storefront"]);\n\nconst config = {\n i18n: {\n defaultLocale: "en",\n locales: ["en"],\n localeDetection: false,\n },\n basePath: process.env.NEXTJS_BASE_PATH || "",\n\n images: {\n deviceSizes: [\n 180,\n 360,\n 540,\n 720,\n 900,\n 1080,\n 1296,\n 1512,\n 1728,\n 1950,\n 2560,\n 3840,\n ],\n },\n\n webpack: (config, { buildId, dev, isServer, defaultLoaders, webpack }) => {\n if (!isServer) {\n config.resolve.fallback.fs = false;\n }\n return config;\n },\n};\n\nmodule.exports = withTM(config);')},i.generatePackageJson=function(){return r(this,void 0,void 0,(function(){var r,i,s,a,u;return o(this,(function(o){switch(o.label){case 0:return o.trys.push([0,3,,4]),r=e.join(process.cwd(),"package.json"),(i=t.readFileSync(r)).length?(s=JSON.parse(i.toString()),(a=function(e){var t="dev"===e?Wt:Ht,r="dev"===e?"devDependencies":"dependencies";s[r]&&"object"==typeof s[r]?s[r]=n(n({},s[r]),t):s[r]=t;var o,i=(o=s[r],Object.keys(o).sort().reduce((function(e,t){return e[t]=o[t],e}),{}));s[r]=i})("dev"),a("normal"),s.scripts&&"object"==typeof s.scripts?s.scripts=n(n({},s.scripts),Yt):s.scripts=Yt,[4,Ce(r,"",JSON.stringify(s,null,2))]):[3,2];case 1:return[2,o.sent()];case 2:return[3,4];case 3:return u=o.sent(),console.error(u),[2,!1];case 4:return[2]}}))}))},i.generateEnv=function(e){var t="dev"===e?"NEXT_PUBLIC_ENV=local\nNEXT_PUBLIC_BASE_URL=https://api.myikas.dev\nNEXT_PUBLIC_IMG_HOST=cdn.myikas.dev\nNEXT_PUBLIC_IMG_BASE_URL=https://cdn.myikas.dev/\nNEXT_PUBLIC_UPLOAD_GQL_URL=https://api.myikas.dev/api/admin/graphql\nNEXT_PUBLIC_GQL_URL=https://api.myikas.dev/api/sf/graphql\n":"NEXT_PUBLIC_ENV=local\nNEXT_PUBLIC_BASE_URL=https://api.myikas.com\nNEXT_PUBLIC_IMG_HOST=cdn.myikas.com\nNEXT_PUBLIC_IMG_BASE_URL=https://cdn.myikas.com/\nNEXT_PUBLIC_UPLOAD_GQL_URL=https://api.myikas.com/api/admin/graphql\nNEXT_PUBLIC_GQL_URL=https://api.myikas.com/api/sf/graphql\n";return Ce(process.cwd(),".env",t)},i}(),$t="production"!==process.env.NODE_ENV?{0:"Invalid value for configuration 'enforceActions', expected 'never', 'always' or 'observed'",1:function(e,t){return"Cannot apply '"+e+"' to '"+t.toString()+"': Field not found."},5:"'keys()' can only be used on observable objects, arrays, sets and maps",6:"'values()' can only be used on observable objects, arrays, sets and maps",7:"'entries()' can only be used on observable objects, arrays and maps",8:"'set()' can only be used on observable objects, arrays and maps",9:"'remove()' can only be used on observable objects, arrays and maps",10:"'has()' can only be used on observable objects, arrays and maps",11:"'get()' can only be used on observable objects, arrays and maps",12:"Invalid annotation",13:"Dynamic observable objects cannot be frozen",14:"Intercept handlers should return nothing or a change object",15:"Observable arrays cannot be frozen",16:"Modification exception: the internal structure of an observable array was changed.",17:function(e,t){return"[mobx.array] Index out of bounds, "+e+" is larger than "+t},18:"mobx.map requires Map polyfill for the current browser. Check babel-polyfill or core-js/es6/map.js",19:function(e){return"Cannot initialize from classes that inherit from Map: "+e.constructor.name},20:function(e){return"Cannot initialize map from "+e},21:function(e){return"Cannot convert to map from '"+e+"'"},22:"mobx.set requires Set polyfill for the current browser. Check babel-polyfill or core-js/es6/set.js",23:"It is not possible to get index atoms from arrays",24:function(e){return"Cannot obtain administration from "+e},25:function(e,t){return"the entry '"+e+"' does not exist in the observable map '"+t+"'"},26:"please specify a property",27:function(e,t){return"no observable property '"+e.toString()+"' found on the observable object '"+t+"'"},28:function(e){return"Cannot obtain atom from "+e},29:"Expecting some object",30:"invalid action stack. did you forget to finish an action?",31:"missing option for computed: get",32:function(e,t){return"Cycle detected in computation "+e+": "+t},33:function(e){return"The setter of computed value '"+e+"' is trying to update itself. Did you intend to update an _observable_ value, instead of the computed property?"},34:function(e){return"[ComputedValue '"+e+"'] It is not possible to assign a new value to a computed value."},35:"There are multiple, different versions of MobX active. Make sure MobX is loaded only once or use `configure({ isolateGlobalState: true })`",36:"isolateGlobalState should be called before MobX is running any reactions",37:function(e){return"[mobx] `observableArray."+e+"()` mutates the array in-place, which is not allowed inside a derivation. Use `array.slice()."+e+"()` instead"}}:{};function Zt(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if("production"!==process.env.NODE_ENV){var o="string"==typeof e?e:$t[e];throw"function"==typeof o&&(o=o.apply(null,n)),new Error("[MobX] "+o)}throw new Error("number"==typeof e?"[MobX] minified error nr: "+e+(n.length?" "+n.map(String).join(","):"")+". Find the full error at: https://github.com/mobxjs/mobx/blob/main/packages/mobx/src/errors.ts":"[MobX] "+e)}var Qt={};function en(){return"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:Qt}var tn=Object.assign,nn=Object.getOwnPropertyDescriptor,rn=Object.defineProperty,on=Object.prototype,sn=[];Object.freeze(sn);var an={};Object.freeze(an);var un="undefined"!=typeof Proxy,cn=Object.toString();function ln(){un||Zt("production"!==process.env.NODE_ENV?"`Proxy` objects are not available in the current environment. Please configure MobX to enable a fallback implementation.`":"Proxy not available")}function pn(e){"production"!==process.env.NODE_ENV&&to.verifyProxies&&Zt("MobX is currently configured to be able to run in ES5 mode, but in ES5 MobX won't be able to "+e)}function dn(){return++to.mobxGuid}function fn(e){var t=!1;return function(){if(!t)return t=!0,e.apply(this,arguments)}}var hn=function(){};function vn(e){return"function"==typeof e}function _n(e){switch(typeof e){case"string":case"symbol":case"number":return!0}return!1}function gn(e){return null!==e&&"object"==typeof e}function mn(e){var t;if(!gn(e))return!1;var n=Object.getPrototypeOf(e);return null==n||(null==(t=n.constructor)?void 0:t.toString())===cn}function bn(e,t,n){rn(e,t,{enumerable:!1,writable:!0,configurable:!0,value:n})}function yn(e,t,n){rn(e,t,{enumerable:!1,writable:!1,configurable:!0,value:n})}function On(e,t){var n="isMobX"+e;return t.prototype[n]=!0,function(e){return gn(e)&&!0===e[n]}}function En(e){return e instanceof Map}function Nn(e){return e instanceof Set}var wn=void 0!==Object.getOwnPropertySymbols;var An="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:wn?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames;function Sn(e){return"string"==typeof e?e:"symbol"==typeof e?e.toString():new String(e).toString()}function Tn(e){return null===e?null:"object"==typeof e?""+e:e}function Cn(e,t){return on.hasOwnProperty.call(e,t)}var xn=Object.getOwnPropertyDescriptors||function(e){var t={};return An(e).forEach((function(n){t[n]=nn(e,n)})),t};function Dn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function In(e,t,n){return t&&Dn(e.prototype,t),n&&Dn(e,n),e}function Rn(){return Rn=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Rn.apply(this,arguments)}function jn(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function Ln(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Pn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function kn(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Pn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Pn(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}var Vn=Symbol("mobx-stored-annotations");function Un(e){return Object.assign((function(t,n){Bn(t,n,e)}),e)}function Bn(e,t,n){(Cn(e,Vn)||bn(e,Vn,Rn({},e[Vn])),"production"!==process.env.NODE_ENV&&Hn(n)&&!Cn(e[Vn],t))&&Zt("'"+(e.constructor.name+".prototype."+t.toString())+"' is decorated with 'override', but no such decorated member was found on prototype.");!function(e,t,n){if("production"!==process.env.NODE_ENV&&!Hn(t)&&Cn(e[Vn],n)){var r=e.constructor.name+".prototype."+n.toString(),o=e[Vn][n].annotationType_;Zt("Cannot apply '@"+t.annotationType_+"' to '"+r+"':\nThe field is already decorated with '@"+o+"'.\nRe-decorating fields is not allowed.\nUse '@override' decorator for methods overriden by subclass.")}}(e,n,t),Hn(n)||(e[Vn][t]=Rn({},n,{isDecorator_:!0}))}var Fn=Symbol("mobx administration"),Gn=function(){function e(e){void 0===e&&(e="Atom@"+dn()),this.name_=void 0,this.isPendingUnobservation_=!1,this.isBeingObserved_=!1,this.observers_=new Set,this.diffValue_=0,this.lastAccessedBy_=0,this.lowestObserverState_=Vr.NOT_TRACKING_,this.onBOL=void 0,this.onBUOL=void 0,this.name_=e}var t=e.prototype;return t.onBO=function(){this.onBOL&&this.onBOL.forEach((function(e){return e()}))},t.onBUO=function(){this.onBUOL&&this.onBUOL.forEach((function(e){return e()}))},t.reportObserved=function(){return ao(this)},t.reportChanged=function(){io(),uo(this),so()},t.toString=function(){return this.name_},e}(),Mn=On("Atom",Gn);function qn(e,t,n){void 0===t&&(t=hn),void 0===n&&(n=hn);var r,o=new Gn(e);return t!==hn&&Ro("onBO",o,t,r),n!==hn&&Io(o,n),o}var Kn={identity:function(e,t){return e===t},structural:function(e,t){return qi(e,t)},default:function(e,t){return Object.is(e,t)},shallow:function(e,t){return qi(e,t,1)}};function zn(e,t,n){return Mo(e)?e:Array.isArray(e)?Er.array(e,{name:n}):mn(e)?Er.object(e,void 0,{name:n}):En(e)?Er.map(e,{name:n}):Nn(e)?Er.set(e,{name:n}):e}function Xn(e){return e}function Hn(e){return"override"===e.annotationType_}function Wn(e,t){return{annotationType_:e,options_:t,make_:Yn,extend_:Jn}}function Yn(e,t){for(var n,r,o=!1,i=e.target_,s=null!=(n=null==(r=this.options_)?void 0:r.bound)&&n;i&&i!==on;){var a=nn(i,t);if(a){if(i===e.target_||s){var u=$n(e,this,t,a);if(!e.defineProperty_(t,u))return;if(o=!0,s)break}if(i!==e.target_){if(xo(a.value)){o=!0;break}var c=$n(e,this,t,a,!1);rn(i,t,c),o=!0}}i=Object.getPrototypeOf(i)}o?xi(e,this,t):this.isDecorator_||Zt(1,this.annotationType_,e.name_+"."+t.toString())}function Jn(e,t,n,r){var o=$n(e,this,t,n);return e.defineProperty_(t,o,r)}function $n(e,t,n,r,o){var i,s,a,u,c;void 0===o&&(o=to.safeDescriptors),function(e,t,n,r){var o=t.annotationType_,i=r.value;"production"===process.env.NODE_ENV||vn(i)||Zt("Cannot apply '"+o+"' to '"+e.name_+"."+n.toString()+"':\n'"+o+"' can only be used on properties with a function value.")}(e,t,n,r);var l,p=r.value;(null==(i=t.options_)?void 0:i.bound)&&(p=p.bind(null!=(l=e.proxy_)?l:e.target_));return{value:Ir(null!=(s=null==(a=t.options_)?void 0:a.name)?s:n.toString(),p,null!=(u=null==(c=t.options_)?void 0:c.autoAction)&&u),configurable:!o||e.isPlainObject_,enumerable:!1,writable:!o}}function Zn(e,t){return{annotationType_:e,options_:t,make_:Qn,extend_:er}}function Qn(e,t){for(var n=!1,r=e.target_;r&&r!==on;){var o=nn(r,t);if(o){if(r!==e.target_){if(Fo(o.value)){n=!0;break}var i=tr(e,this,t,o,!1);rn(r,t,i)}else{var s=tr(e,this,t,o);if(!e.defineProperty_(t,s))return}n=!0}r=Object.getPrototypeOf(r)}n?xi(e,this,t):this.isDecorator_||Zt(1,this.annotationType_,e.name_+"."+t.toString())}function er(e,t,n,r){var o=tr(e,this,t,n);return e.defineProperty_(t,o,r)}function tr(e,t,n,r,o){return void 0===o&&(o=to.safeDescriptors),function(e,t,n,r){var o=t.annotationType_,i=r.value;"production"===process.env.NODE_ENV||vn(i)||Zt("Cannot apply '"+o+"' to '"+e.name_+"."+n.toString()+"':\n'"+o+"' can only be used on properties with a generator function value.")}(e,t,n,r),{value:Uo(r.value),configurable:!o||e.isPlainObject_,enumerable:!1,writable:!o}}function nr(e,t){return{annotationType_:e,options_:t,make_:rr,extend_:or}}function rr(e,t){for(var n=e.target_;n&&n!==on;){var r=nn(n,t);if(r){if(ir(e,this,t,r),!e.defineComputedProperty_(t,Rn({},this.options_,{get:r.get,set:r.set})))return;return void xi(e,this,t)}n=Object.getPrototypeOf(n)}this.isDecorator_||Zt(1,this.annotationType_,e.name_+"."+t.toString())}function or(e,t,n,r){return ir(e,this,t,n),e.defineComputedProperty_(t,Rn({},this.options_,{get:n.get,set:n.set}),r)}function ir(e,t,n,r){var o=t.annotationType_,i=r.get;"production"===process.env.NODE_ENV||i||Zt("Cannot apply '"+o+"' to '"+e.name_+"."+n.toString()+"':\n'"+o+"' can only be used on getter(+setter) properties.")}function sr(e,t){return{annotationType_:e,options_:t,make_:ar,extend_:ur}}function ar(e,t){for(var n=e.target_;n&&n!==on;){var r=nn(n,t);if(r){var o,i;if(cr(e,this,t,r),!e.defineObservableProperty_(t,r.value,null!=(o=null==(i=this.options_)?void 0:i.enhancer)?o:zn))return;return void xi(e,this,t)}n=Object.getPrototypeOf(n)}this.isDecorator_||Zt(1,this.annotationType_,e.name_+"."+t.toString())}function ur(e,t,n,r){var o,i;return cr(e,this,t,n),e.defineObservableProperty_(t,n.value,null!=(o=null==(i=this.options_)?void 0:i.enhancer)?o:zn,r)}function cr(e,t,n,r){var o=t.annotationType_;"production"===process.env.NODE_ENV||"value"in r||Zt("Cannot apply '"+o+"' to '"+e.name_+"."+n.toString()+"':\n'"+o+"' cannot be used on getter/setter properties")}var lr={deep:!0,name:void 0,defaultDecorator:void 0,proxy:!0};function pr(e){return e||lr}Object.freeze(lr);var dr=sr("observable"),fr=sr("observable.ref",{enhancer:Xn}),hr=sr("observable.shallow",{enhancer:function(e,t,n){return null==e||Ci(e)||di(e)||mi(e)||Oi(e)?e:Array.isArray(e)?Er.array(e,{name:n,deep:!1}):mn(e)?Er.object(e,void 0,{name:n,deep:!1}):En(e)?Er.map(e,{name:n,deep:!1}):Nn(e)?Er.set(e,{name:n,deep:!1}):void("production"!==process.env.NODE_ENV&&Zt("The shallow modifier / decorator can only used in combination with arrays, objects, maps and sets"))}}),vr=sr("observable.struct",{enhancer:function(e,t){return"production"!==process.env.NODE_ENV&&Mo(e)&&Zt("observable.struct should not be used with observable values"),qi(e,t)?t:e}}),_r=Un(dr);function gr(e){return!0===e.deep?zn:!1===e.deep?Xn:(t=e.defaultDecorator)&&null!=(n=null==(r=t.options_)?void 0:r.enhancer)?n:zn;var t,n,r}function mr(e,t,n){if(!_n(t))return Mo(e)?e:mn(e)?Er.object(e,t,n):Array.isArray(e)?Er.array(e,t):En(e)?Er.map(e,t):Nn(e)?Er.set(e,t):"object"==typeof e&&null!==e?e:Er.box(e);Bn(e,t,dr)}Object.assign(mr,_r);var br,yr,Or={box:function(e,t){var n=pr(t);return new kr(e,gr(n),n.name,!0,n.equals)},array:function(e,t){var n=pr(t);return(!1===to.useProxies||!1===n.proxy?Ui:ri)(e,gr(n),n.name)},map:function(e,t){var n=pr(t);return new gi(e,gr(n),n.name)},set:function(e,t){var n=pr(t);return new yi(e,gr(n),n.name)},object:function(e,t,n){return jo(!1===to.useProxies||!1===(null==n?void 0:n.proxy)?Ai({},n):function(e,t){var n,r;return ln(),e=Ai(e,t),null!=(r=(n=e[Fn]).proxy_)?r:n.proxy_=new Proxy(e,Xo)}({},n),e,t)},ref:Un(fr),shallow:Un(hr),deep:_r,struct:Un(vr)},Er=tn(mr,Or),Nr=nr("computed"),wr=nr("computed.struct",{equals:Kn.structural}),Ar=function(e,t){if(_n(t))return Bn(e,t,Nr);if(mn(e))return Un(nr("computed",e));"production"!==process.env.NODE_ENV&&(vn(e)||Zt("First argument to `computed` should be an expression."),vn(t)&&Zt("A setter as second argument is no longer supported, use `{ set: fn }` option instead"));var n=mn(t)?t:{};return n.get=e,n.name=n.name||e.name||"",new Br(n)};Object.assign(Ar,Nr),Ar.struct=Un(wr);var Sr,Tr=0,Cr=1,xr=null!=(br=null==(yr=nn((function(){}),"name"))?void 0:yr.configurable)&&br,Dr={value:"action",configurable:!0,writable:!1,enumerable:!1};function Ir(e,t,n,r){function o(){return Rr(e,n,t,r||this,arguments)}return void 0===n&&(n=!1),"production"!==process.env.NODE_ENV&&(vn(t)||Zt("`action` can only be invoked on functions"),"string"==typeof e&&e||Zt("actions should have valid names, got: '"+e+"'")),o.isMobxAction=!0,xr&&(Dr.value=e,Object.defineProperty(o,"name",Dr)),o}function Rr(e,t,n,r,o){var i=function(e,t,n,r){var o="production"!==process.env.NODE_ENV&&_o()&&!!e,i=0;if("production"!==process.env.NODE_ENV&&o){i=Date.now();var s=r?Array.from(r):sn;mo({type:Oo,name:e,object:n,arguments:s})}var a=to.trackingDerivation,u=!t||!a;io();var c=to.allowStateChanges;u&&(Wr(),c=jr(!0));var l=Jr(!0),p={runAsAction_:u,prevDerivation_:a,prevAllowStateChanges_:c,prevAllowStateReads_:l,notifySpy_:o,startTime_:i,actionId_:Cr++,parentActionId_:Tr};return Tr=p.actionId_,p}(e,t,r,o);try{return n.apply(r,o)}catch(e){throw i.error_=e,e}finally{!function(e){Tr!==e.actionId_&&Zt(30);Tr=e.parentActionId_,void 0!==e.error_&&(to.suppressReactionErrors=!0);Lr(e.prevAllowStateChanges_),$r(e.prevAllowStateReads_),so(),e.runAsAction_&&Yr(e.prevDerivation_);"production"!==process.env.NODE_ENV&&e.notifySpy_&&yo({time:Date.now()-e.startTime_});to.suppressReactionErrors=!1}(i)}}function jr(e){var t=to.allowStateChanges;return to.allowStateChanges=e,t}function Lr(e){to.allowStateChanges=e}Sr=Symbol.toPrimitive;var Pr,kr=function(e){function t(t,n,r,o,i){var s;return void 0===r&&(r="ObservableValue@"+dn()),void 0===o&&(o=!0),void 0===i&&(i=Kn.default),(s=e.call(this,r)||this).enhancer=void 0,s.name_=void 0,s.equals=void 0,s.hasUnreportedChange_=!1,s.interceptors_=void 0,s.changeListeners_=void 0,s.value_=void 0,s.dehancer=void 0,s.enhancer=n,s.name_=r,s.equals=i,s.value_=n(t,void 0,r),"production"!==process.env.NODE_ENV&&o&&_o()&&go({type:"create",object:Ln(s),observableKind:"value",debugObjectName:s.name_,newValue:""+s.value_}),s}jn(t,e);var n=t.prototype;return n.dehanceValue=function(e){return void 0!==this.dehancer?this.dehancer(e):e},n.set=function(e){var t=this.value_;if((e=this.prepareNewValue_(e))!==to.UNCHANGED){var n=_o();"production"!==process.env.NODE_ENV&&n&&mo({type:ei,object:this,observableKind:"value",debugObjectName:this.name_,newValue:e,oldValue:t}),this.setNewValue_(e),"production"!==process.env.NODE_ENV&&n&&yo()}},n.prepareNewValue_=function(e){if(Kr(this),Ho(this)){var t=Yo(this,{object:this,type:ei,newValue:e});if(!t)return to.UNCHANGED;e=t.newValue}return e=this.enhancer(e,this.value_,this.name_),this.equals(this.value_,e)?to.UNCHANGED:e},n.setNewValue_=function(e){var t=this.value_;this.value_=e,this.reportChanged(),Jo(this)&&Zo(this,{type:ei,object:this,newValue:e,oldValue:t})},n.get=function(){return this.reportObserved(),this.dehanceValue(this.value_)},n.intercept_=function(e){return Wo(this,e)},n.observe_=function(e,t){return t&&e({observableKind:"value",debugObjectName:this.name_,object:this,type:ei,newValue:this.value_,oldValue:void 0}),$o(this,e)},n.raw=function(){return this.value_},n.toJSON=function(){return this.get()},n.toString=function(){return this.name_+"["+this.value_+"]"},n.valueOf=function(){return Tn(this.get())},n[Sr]=function(){return this.valueOf()},t}(Gn);Pr=Symbol.toPrimitive;var Vr,Ur,Br=function(){function e(e){this.dependenciesState_=Vr.NOT_TRACKING_,this.observing_=[],this.newObserving_=null,this.isBeingObserved_=!1,this.isPendingUnobservation_=!1,this.observers_=new Set,this.diffValue_=0,this.runId_=0,this.lastAccessedBy_=0,this.lowestObserverState_=Vr.UP_TO_DATE_,this.unboundDepsCount_=0,this.mapid_="#"+dn(),this.value_=new Gr(null),this.name_=void 0,this.triggeredBy_=void 0,this.isComputing_=!1,this.isRunningSetter_=!1,this.derivation=void 0,this.setter_=void 0,this.isTracing_=Ur.NONE,this.scope_=void 0,this.equals_=void 0,this.requiresReaction_=void 0,this.keepAlive_=void 0,this.onBOL=void 0,this.onBUOL=void 0,e.get||Zt(31),this.derivation=e.get,this.name_=e.name||"ComputedValue@"+dn(),e.set&&(this.setter_=Ir(this.name_+"-setter",e.set)),this.equals_=e.equals||(e.compareStructural||e.struct?Kn.structural:Kn.default),this.scope_=e.context,this.requiresReaction_=!!e.requiresReaction,this.keepAlive_=!!e.keepAlive}var t=e.prototype;return t.onBecomeStale_=function(){!function(e){if(e.lowestObserverState_!==Vr.UP_TO_DATE_)return;e.lowestObserverState_=Vr.POSSIBLY_STALE_,e.observers_.forEach((function(t){t.dependenciesState_===Vr.UP_TO_DATE_&&(t.dependenciesState_=Vr.POSSIBLY_STALE_,"production"!==process.env.NODE_ENV&&t.isTracing_!==Ur.NONE&&co(t,e),t.onBecomeStale_())}))}(this)},t.onBO=function(){this.onBOL&&this.onBOL.forEach((function(e){return e()}))},t.onBUO=function(){this.onBUOL&&this.onBUOL.forEach((function(e){return e()}))},t.get=function(){if(this.isComputing_&&Zt(32,this.name_,this.derivation),0!==to.inBatch||0!==this.observers_.size||this.keepAlive_){if(ao(this),qr(this)){var e=to.trackingContext;this.keepAlive_&&!e&&(to.trackingContext=this),this.trackAndCompute()&&function(e){if(e.lowestObserverState_===Vr.STALE_)return;e.lowestObserverState_=Vr.STALE_,e.observers_.forEach((function(t){t.dependenciesState_===Vr.POSSIBLY_STALE_?t.dependenciesState_=Vr.STALE_:t.dependenciesState_===Vr.UP_TO_DATE_&&(e.lowestObserverState_=Vr.UP_TO_DATE_)}))}(this),to.trackingContext=e}}else qr(this)&&(this.warnAboutUntrackedRead_(),io(),this.value_=this.computeValue_(!1),so());var t=this.value_;if(Mr(t))throw t.cause;return t},t.set=function(e){if(this.setter_){this.isRunningSetter_&&Zt(33,this.name_),this.isRunningSetter_=!0;try{this.setter_.call(this.scope_,e)}finally{this.isRunningSetter_=!1}}else Zt(34,this.name_)},t.trackAndCompute=function(){var e=this.value_,t=this.dependenciesState_===Vr.NOT_TRACKING_,n=this.computeValue_(!0);"production"!==process.env.NODE_ENV&&_o()&&go({observableKind:"computed",debugObjectName:this.name_,object:this.scope_,type:"update",oldValue:this.value_,newValue:n});var r=t||Mr(e)||Mr(n)||!this.equals_(e,n);return r&&(this.value_=n),r},t.computeValue_=function(e){this.isComputing_=!0;var t,n=jr(!1);if(e)t=zr(this,this.derivation,this.scope_);else if(!0===to.disableErrorBoundaries)t=this.derivation.call(this.scope_);else try{t=this.derivation.call(this.scope_)}catch(e){t=new Gr(e)}return Lr(n),this.isComputing_=!1,t},t.suspend_=function(){this.keepAlive_||(Xr(this),this.value_=void 0)},t.observe_=function(e,t){var n=this,r=!0,o=void 0;return function(e,t){void 0===t&&(t=an);"production"!==process.env.NODE_ENV&&(vn(e)||Zt("Autorun expects a function as first argument"),xo(e)&&Zt("Autorun does not accept actions since actions are untrackable"));var n,r=t&&t.name||e.name||"Autorun@"+dn();if(t.scheduler||t.delay){var o=function(e){return e.scheduler?e.scheduler:e.delay?function(t){return setTimeout(t,e.delay)}:Do}(t),i=!1;n=new po(r,(function(){i||(i=!0,o((function(){i=!1,n.isDisposed_||n.track(s)})))}),t.onError,t.requiresObservable)}else n=new po(r,(function(){this.track(s)}),t.onError,t.requiresObservable);function s(){e(n)}return n.schedule_(),n.getDisposer_()}((function(){var i=n.get();if(!r||t){var s=Wr();e({observableKind:"computed",debugObjectName:n.name_,type:ei,object:n,newValue:i,oldValue:o}),Yr(s)}r=!1,o=i}))},t.warnAboutUntrackedRead_=function(){"production"!==process.env.NODE_ENV&&(!0===this.requiresReaction_&&Zt("[mobx] Computed value "+this.name_+" is read outside a reactive context"),this.isTracing_!==Ur.NONE&&console.log("[mobx.trace] '"+this.name_+"' is being read outside a reactive context. Doing a full recompute"),to.computedRequiresReaction&&console.warn("[mobx] Computed value "+this.name_+" is being read outside a reactive context. Doing a full recompute"))},t.toString=function(){return this.name_+"["+this.derivation.toString()+"]"},t.valueOf=function(){return Tn(this.get())},t[Pr]=function(){return this.valueOf()},e}(),Fr=On("ComputedValue",Br);!function(e){e[e.NOT_TRACKING_=-1]="NOT_TRACKING_",e[e.UP_TO_DATE_=0]="UP_TO_DATE_",e[e.POSSIBLY_STALE_=1]="POSSIBLY_STALE_",e[e.STALE_=2]="STALE_"}(Vr||(Vr={})),function(e){e[e.NONE=0]="NONE",e[e.LOG=1]="LOG",e[e.BREAK=2]="BREAK"}(Ur||(Ur={}));var Gr=function(e){this.cause=void 0,this.cause=e};function Mr(e){return e instanceof Gr}function qr(e){switch(e.dependenciesState_){case Vr.UP_TO_DATE_:return!1;case Vr.NOT_TRACKING_:case Vr.STALE_:return!0;case Vr.POSSIBLY_STALE_:for(var t=Jr(!0),n=Wr(),r=e.observing_,o=r.length,i=0;i<o;i++){var s=r[i];if(Fr(s)){if(to.disableErrorBoundaries)s.get();else try{s.get()}catch(e){return Yr(n),$r(t),!0}if(e.dependenciesState_===Vr.STALE_)return Yr(n),$r(t),!0}}return Zr(e),Yr(n),$r(t),!1}}function Kr(e){if("production"!==process.env.NODE_ENV){var t=e.observers_.size>0;to.allowStateChanges||!t&&"always"!==to.enforceActions||console.warn("[MobX] "+(to.enforceActions?"Since strict-mode is enabled, changing (observed) observable values without using an action is not allowed. Tried to modify: ":"Side effects like changing state are not allowed at this point. Are you trying to modify state from, for example, a computed value or the render function of a React component? You can wrap side effects in 'runInAction' (or decorate functions with 'action') if needed. Tried to modify: ")+e.name_)}}function zr(e,t,n){var r=Jr(!0);Zr(e),e.newObserving_=new Array(e.observing_.length+100),e.unboundDepsCount_=0,e.runId_=++to.runId;var o,i=to.trackingDerivation;if(to.trackingDerivation=e,to.inBatch++,!0===to.disableErrorBoundaries)o=t.call(n);else try{o=t.call(n)}catch(e){o=new Gr(e)}return to.inBatch--,to.trackingDerivation=i,function(e){for(var t=e.observing_,n=e.observing_=e.newObserving_,r=Vr.UP_TO_DATE_,o=0,i=e.unboundDepsCount_,s=0;s<i;s++){var a=n[s];0===a.diffValue_&&(a.diffValue_=1,o!==s&&(n[o]=a),o++),a.dependenciesState_>r&&(r=a.dependenciesState_)}n.length=o,e.newObserving_=null,i=t.length;for(;i--;){var u=t[i];0===u.diffValue_&&ro(u,e),u.diffValue_=0}for(;o--;){var c=n[o];1===c.diffValue_&&(c.diffValue_=0,no(c,e))}r!==Vr.UP_TO_DATE_&&(e.dependenciesState_=r,e.onBecomeStale_())}(e),function(e){if("production"===process.env.NODE_ENV)return;if(0!==e.observing_.length)return;(to.reactionRequiresObservable||e.requiresObservable_)&&console.warn("[mobx] Derivation "+e.name_+" is created/updated without reading any observable value")}(e),$r(r),o}function Xr(e){var t=e.observing_;e.observing_=[];for(var n=t.length;n--;)ro(t[n],e);e.dependenciesState_=Vr.NOT_TRACKING_}function Hr(e){var t=Wr();try{return e()}finally{Yr(t)}}function Wr(){var e=to.trackingDerivation;return to.trackingDerivation=null,e}function Yr(e){to.trackingDerivation=e}function Jr(e){var t=to.allowStateReads;return to.allowStateReads=e,t}function $r(e){to.allowStateReads=e}function Zr(e){if(e.dependenciesState_!==Vr.UP_TO_DATE_){e.dependenciesState_=Vr.UP_TO_DATE_;for(var t=e.observing_,n=t.length;n--;)t[n].lowestObserverState_=Vr.UP_TO_DATE_}}var Qr=function(){this.version=6,this.UNCHANGED={},this.trackingDerivation=null,this.trackingContext=null,this.runId=0,this.mobxGuid=0,this.inBatch=0,this.pendingUnobservations=[],this.pendingReactions=[],this.isRunningReactions=!1,this.allowStateChanges=!1,this.allowStateReads=!0,this.enforceActions=!0,this.spyListeners=[],this.globalReactionErrorHandlers=[],this.computedRequiresReaction=!1,this.reactionRequiresObservable=!1,this.observableRequiresReaction=!1,this.disableErrorBoundaries=!1,this.suppressReactionErrors=!1,this.useProxies=!0,this.verifyProxies=!1,this.safeDescriptors=!0},eo=!0,to=function(){var e=en();return e.__mobxInstanceCount>0&&!e.__mobxGlobals&&(eo=!1),e.__mobxGlobals&&e.__mobxGlobals.version!==(new Qr).version&&(eo=!1),eo?e.__mobxGlobals?(e.__mobxInstanceCount+=1,e.__mobxGlobals.UNCHANGED||(e.__mobxGlobals.UNCHANGED={}),e.__mobxGlobals):(e.__mobxInstanceCount=1,e.__mobxGlobals=new Qr):(setTimeout((function(){Zt(35)}),1),new Qr)}();function no(e,t){e.observers_.add(t),e.lowestObserverState_>t.dependenciesState_&&(e.lowestObserverState_=t.dependenciesState_)}function ro(e,t){e.observers_.delete(t),0===e.observers_.size&&oo(e)}function oo(e){!1===e.isPendingUnobservation_&&(e.isPendingUnobservation_=!0,to.pendingUnobservations.push(e))}function io(){to.inBatch++}function so(){if(0==--to.inBatch){fo();for(var e=to.pendingUnobservations,t=0;t<e.length;t++){var n=e[t];n.isPendingUnobservation_=!1,0===n.observers_.size&&(n.isBeingObserved_&&(n.isBeingObserved_=!1,n.onBUO()),n instanceof Br&&n.suspend_())}to.pendingUnobservations=[]}}function ao(e){!function(e){"production"!==process.env.NODE_ENV&&!to.allowStateReads&&to.observableRequiresReaction&&console.warn("[mobx] Observable "+e.name_+" being read outside a reactive context")}(e);var t=to.trackingDerivation;return null!==t?(t.runId_!==e.lastAccessedBy_&&(e.lastAccessedBy_=t.runId_,t.newObserving_[t.unboundDepsCount_++]=e,!e.isBeingObserved_&&to.trackingContext&&(e.isBeingObserved_=!0,e.onBO())),!0):(0===e.observers_.size&&to.inBatch>0&&oo(e),!1)}function uo(e){e.lowestObserverState_!==Vr.STALE_&&(e.lowestObserverState_=Vr.STALE_,e.observers_.forEach((function(t){t.dependenciesState_===Vr.UP_TO_DATE_&&("production"!==process.env.NODE_ENV&&t.isTracing_!==Ur.NONE&&co(t,e),t.onBecomeStale_()),t.dependenciesState_=Vr.STALE_})))}function co(e,t){if(console.log("[mobx.trace] '"+e.name_+"' is invalidated due to a change in: '"+t.name_+"'"),e.isTracing_===Ur.BREAK){var n=[];lo(Lo(Bi(e,r)),n,1),new Function("debugger;\n/*\nTracing '"+e.name_+"'\n\nYou are entering this break point because derivation '"+e.name_+"' is being traced and '"+t.name_+"' is now forcing it to update.\nJust follow the stacktrace you should now see in the devtools to see precisely what piece of your code is causing this update\nThe stackframe you are looking for is at least ~6-8 stack-frames up.\n\n"+(e instanceof Br?e.derivation.toString().replace(/[*]\//g,"/"):"")+"\n\nThe dependencies for this derivation are:\n\n"+n.join("\n")+"\n*/\n ")()}var r}function lo(e,t,n){t.length>=1e3?t.push("(and many more)"):(t.push(""+new Array(n).join("\t")+e.name),e.dependencies&&e.dependencies.forEach((function(e){return lo(e,t,n+1)})))}var po=function(){function e(e,t,n,r){void 0===e&&(e="Reaction@"+dn()),void 0===r&&(r=!1),this.name_=void 0,this.onInvalidate_=void 0,this.errorHandler_=void 0,this.requiresObservable_=void 0,this.observing_=[],this.newObserving_=[],this.dependenciesState_=Vr.NOT_TRACKING_,this.diffValue_=0,this.runId_=0,this.unboundDepsCount_=0,this.mapid_="#"+dn(),this.isDisposed_=!1,this.isScheduled_=!1,this.isTrackPending_=!1,this.isRunning_=!1,this.isTracing_=Ur.NONE,this.name_=e,this.onInvalidate_=t,this.errorHandler_=n,this.requiresObservable_=r}var t=e.prototype;return t.onBecomeStale_=function(){this.schedule_()},t.schedule_=function(){this.isScheduled_||(this.isScheduled_=!0,to.pendingReactions.push(this),fo())},t.isScheduled=function(){return this.isScheduled_},t.runReaction_=function(){if(!this.isDisposed_){io(),this.isScheduled_=!1;var e=to.trackingContext;if(to.trackingContext=this,qr(this)){this.isTrackPending_=!0;try{this.onInvalidate_(),"production"!==process.env.NODE_ENV&&this.isTrackPending_&&_o()&&go({name:this.name_,type:"scheduled-reaction"})}catch(e){this.reportExceptionInDerivation_(e)}}to.trackingContext=e,so()}},t.track=function(e){if(!this.isDisposed_){io();var t,n=_o();"production"!==process.env.NODE_ENV&&n&&(t=Date.now(),mo({name:this.name_,type:"reaction"})),this.isRunning_=!0;var r=to.trackingContext;to.trackingContext=this;var o=zr(this,e,void 0);to.trackingContext=r,this.isRunning_=!1,this.isTrackPending_=!1,this.isDisposed_&&Xr(this),Mr(o)&&this.reportExceptionInDerivation_(o.cause),"production"!==process.env.NODE_ENV&&n&&yo({time:Date.now()-t}),so()}},t.reportExceptionInDerivation_=function(e){var t=this;if(this.errorHandler_)this.errorHandler_(e,this);else{if(to.disableErrorBoundaries)throw e;var n="production"!==process.env.NODE_ENV?"[mobx] Encountered an uncaught exception that was thrown by a reaction or observer component, in: '"+this+"'":"[mobx] uncaught error in '"+this+"'";to.suppressReactionErrors?"production"!==process.env.NODE_ENV&&console.warn("[mobx] (error in reaction '"+this.name_+"' suppressed, fix error of causing action below)"):console.error(n,e),"production"!==process.env.NODE_ENV&&_o()&&go({type:"error",name:this.name_,message:n,error:""+e}),to.globalReactionErrorHandlers.forEach((function(n){return n(e,t)}))}},t.dispose=function(){this.isDisposed_||(this.isDisposed_=!0,this.isRunning_||(io(),Xr(this),so()))},t.getDisposer_=function(){var e=this.dispose.bind(this);return e[Fn]=this,e},t.toString=function(){return"Reaction["+this.name_+"]"},t.trace=function(e){void 0===e&&(e=!1),function(){"production"===process.env.NODE_ENV&&Zt("trace() is not available in production builds");for(var e=!1,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];"boolean"==typeof n[n.length-1]&&(e=n.pop());var o=qo(n);if(!o)return Zt("'trace(break?)' can only be used inside a tracked computed value or a Reaction. Consider passing in the computed value or reaction explicitly");o.isTracing_===Ur.NONE&&console.log("[mobx.trace] '"+o.name_+"' tracing enabled");o.isTracing_=e?Ur.BREAK:Ur.LOG}(this,e)},e}();function fo(){to.inBatch>0||to.isRunningReactions||ho()}function ho(){to.isRunningReactions=!0;for(var e=to.pendingReactions,t=0;e.length>0;){100==++t&&(console.error("production"!==process.env.NODE_ENV?"Reaction doesn't converge to a stable state after 100 iterations. Probably there is a cycle in the reactive function: "+e[0]:"[mobx] cycle in reaction: "+e[0]),e.splice(0));for(var n=e.splice(0),r=0,o=n.length;r<o;r++)n[r].runReaction_()}to.isRunningReactions=!1}var vo=On("Reaction",po);function _o(){return"production"!==process.env.NODE_ENV&&!!to.spyListeners.length}function go(e){if("production"!==process.env.NODE_ENV&&to.spyListeners.length)for(var t=to.spyListeners,n=0,r=t.length;n<r;n++)t[n](e)}function mo(e){"production"!==process.env.NODE_ENV&&go(Rn({},e,{spyReportStart:!0}))}var bo={type:"report-end",spyReportEnd:!0};function yo(e){"production"!==process.env.NODE_ENV&&go(e?Rn({},e,{type:"report-end",spyReportEnd:!0}):bo)}var Oo="action",Eo=Wn(Oo),No=Wn("action.bound",{bound:!0}),wo=Wn("autoAction",{autoAction:!0}),Ao=Wn("autoAction.bound",{autoAction:!0,bound:!0});function So(e){return function(t,n){return vn(t)?Ir(t.name||"<unnamed action>",t,e):vn(n)?Ir(t,n,e):_n(n)?Bn(t,n,e?wo:Eo):_n(t)?Un(Wn(e?"autoAction":Oo,{name:t,autoAction:e})):void("production"!==process.env.NODE_ENV&&Zt("Invalid arguments for `action`"))}}var To=So(!1);Object.assign(To,Eo);var Co=So(!0);function xo(e){return vn(e)&&!0===e.isMobxAction}Object.assign(Co,wo),To.bound=Un(No),Co.bound=Un(Ao);var Do=function(e){return e()};function Io(e,t,n){return Ro("onBUO",e,t,n)}function Ro(e,t,n,r){var o="function"==typeof r?Bi(t,n):Bi(t),i=vn(r)?r:n,s=e+"L";return o[s]?o[s].add(i):o[s]=new Set([i]),function(){var e=o[s];e&&(e.delete(i),0===e.size&&delete o[s])}}function jo(e,t,n,r){"production"!==process.env.NODE_ENV&&(arguments.length>4&&Zt("'extendObservable' expected 2-4 arguments"),"object"!=typeof e&&Zt("'extendObservable' expects an object as first argument"),mi(e)&&Zt("'extendObservable' should not be used on maps, use map.merge instead"),mn(t)||Zt("'extendObservabe' only accepts plain objects as second argument"),(Mo(t)||Mo(n))&&Zt("Extending an object with another observable (object) is not supported"));var o=xn(t),i=Ai(e,r)[Fn];io();try{An(o).forEach((function(e){i.extend_(e,o[e],!n||(!(e in n)||n[e]))}))}finally{so()}return e}function Lo(e){var t,n={name:e.name_};return e.observing_&&e.observing_.length>0&&(n.dependencies=(t=e.observing_,Array.from(new Set(t))).map(Lo)),n}var Po=0;function ko(){this.message="FLOW_CANCELLED"}ko.prototype=Object.create(Error.prototype);var Vo=Zn("flow"),Uo=Object.assign((function(e,t){if(_n(t))return Bn(e,t,Vo);"production"!==process.env.NODE_ENV&&1!==arguments.length&&Zt("Flow expects single argument with generator function");var n=e,r=n.name||"<unnamed flow>",o=function(){var e,t=this,o=arguments,i=++Po,s=To(r+" - runid: "+i+" - init",n).apply(t,o),a=void 0,u=new Promise((function(t,n){var o=0;function u(e){var t;a=void 0;try{t=To(r+" - runid: "+i+" - yield "+o++,s.next).call(s,e)}catch(e){return n(e)}l(t)}function c(e){var t;a=void 0;try{t=To(r+" - runid: "+i+" - yield "+o++,s.throw).call(s,e)}catch(e){return n(e)}l(t)}function l(e){if(!vn(null==e?void 0:e.then))return e.done?t(e.value):(a=Promise.resolve(e.value)).then(u,c);e.then(l,n)}e=n,u(void 0)}));return u.cancel=To(r+" - runid: "+i+" - cancel",(function(){try{a&&Bo(a);var t=s.return(void 0),n=Promise.resolve(t.value);n.then(hn,hn),Bo(n),e(new ko)}catch(t){e(t)}})),u};return o.isMobXFlow=!0,o}),Vo);function Bo(e){vn(e.cancel)&&e.cancel()}function Fo(e){return!0===(null==e?void 0:e.isMobXFlow)}function Go(e,t){return!!e&&(void 0!==t?"production"!==process.env.NODE_ENV&&(mi(e)||di(e))?Zt("isObservable(object, propertyName) is not supported for arrays and maps. Use map.has or array.length instead."):!!Ci(e)&&e[Fn].values_.has(t):Ci(e)||!!e[Fn]||Mn(e)||vo(e)||Fr(e))}function Mo(e){return"production"!==process.env.NODE_ENV&&1!==arguments.length&&Zt("isObservable expects only 1 argument. Use isObservableProp to inspect the observability of a property"),Go(e)}function qo(e){switch(e.length){case 0:return to.trackingDerivation;case 1:return Bi(e[0]);case 2:return Bi(e[0],e[1])}}function Ko(e,t){void 0===t&&(t=void 0),io();try{return e.apply(t)}finally{so()}}function zo(e){return e[Fn]}var Xo={has:function(e,t){return"production"!==process.env.NODE_ENV&&to.trackingDerivation&&pn("detect new properties using the 'in' operator. Use 'has' from 'mobx' instead."),zo(e).has_(t)},get:function(e,t){return zo(e).get_(t)},set:function(e,t,n){var r;return!!_n(t)&&("production"===process.env.NODE_ENV||zo(e).values_.has(t)||pn("add a new observable property through direct assignment. Use 'set' from 'mobx' instead."),null==(r=zo(e).set_(t,n,!0))||r)},deleteProperty:function(e,t){var n;return"production"!==process.env.NODE_ENV&&pn("delete properties from an observable object. Use 'remove' from 'mobx' instead."),!!_n(t)&&(null==(n=zo(e).delete_(t,!0))||n)},defineProperty:function(e,t,n){var r;return"production"!==process.env.NODE_ENV&&pn("define property on an observable object. Use 'defineProperty' from 'mobx' instead."),null==(r=zo(e).defineProperty_(t,n))||r},ownKeys:function(e){return"production"!==process.env.NODE_ENV&&to.trackingDerivation&&pn("iterate keys to detect added / removed properties. Use `keys` from 'mobx' instead."),zo(e).ownKeys_()},preventExtensions:function(e){Zt(13)}};function Ho(e){return void 0!==e.interceptors_&&e.interceptors_.length>0}function Wo(e,t){var n=e.interceptors_||(e.interceptors_=[]);return n.push(t),fn((function(){var e=n.indexOf(t);-1!==e&&n.splice(e,1)}))}function Yo(e,t){var n=Wr();try{for(var r=[].concat(e.interceptors_||[]),o=0,i=r.length;o<i&&((t=r[o](t))&&!t.type&&Zt(14),t);o++);return t}finally{Yr(n)}}function Jo(e){return void 0!==e.changeListeners_&&e.changeListeners_.length>0}function $o(e,t){var n=e.changeListeners_||(e.changeListeners_=[]);return n.push(t),fn((function(){var e=n.indexOf(t);-1!==e&&n.splice(e,1)}))}function Zo(e,t){var n=Wr(),r=e.changeListeners_;if(r){for(var o=0,i=(r=r.slice()).length;o<i;o++)r[o](t);Yr(n)}}function Qo(e,t,n){if("production"!==process.env.NODE_ENV&&(mn(e)||mn(Object.getPrototypeOf(e))||Zt("'makeAutoObservable' can only be used for classes that don't have a superclass"),Ci(e)&&Zt("makeAutoObservable can only be used on objects not already made observable")),mn(e))return jo(e,e,t,n);var r=Ai(e,n)[Fn];io();try{if(e[Ei])for(var o in e[Ei])r.make_(o,e[Ei][o]);else for(var i,s=((i={})[Fn]=1,i[Ei]=1,i.constructor=1,i),a=function(e){s[e]||(s[e]=1,r.make_(e,!t||(!(e in t)||t[e])))},u=e;u&&u!==on;)An(u).forEach(a),u=Object.getPrototypeOf(u)}finally{so()}return e}var ei="update",ti={get:function(e,t){var n=e[Fn];return t===Fn?n:"length"===t?n.getArrayLength_():"string"!=typeof t||isNaN(t)?Cn(oi,t)?oi[t]:e[t]:n.get_(parseInt(t))},set:function(e,t,n){var r=e[Fn];return"length"===t&&r.setArrayLength_(n),"symbol"==typeof t||isNaN(t)?e[t]=n:r.set_(parseInt(t),n),!0},preventExtensions:function(){Zt(15)}},ni=function(){function e(e,t,n,r){this.owned_=void 0,this.legacyMode_=void 0,this.atom_=void 0,this.values_=[],this.interceptors_=void 0,this.changeListeners_=void 0,this.enhancer_=void 0,this.dehancer=void 0,this.proxy_=void 0,this.lastKnownLength_=0,this.owned_=n,this.legacyMode_=r,this.atom_=new Gn(e||"ObservableArray@"+dn()),this.enhancer_=function(n,r){return t(n,r,e+"[..]")}}var t=e.prototype;return t.dehanceValue_=function(e){return void 0!==this.dehancer?this.dehancer(e):e},t.dehanceValues_=function(e){return void 0!==this.dehancer&&e.length>0?e.map(this.dehancer):e},t.intercept_=function(e){return Wo(this,e)},t.observe_=function(e,t){return void 0===t&&(t=!1),t&&e({observableKind:"array",object:this.proxy_,debugObjectName:this.atom_.name_,type:"splice",index:0,added:this.values_.slice(),addedCount:this.values_.length,removed:[],removedCount:0}),$o(this,e)},t.getArrayLength_=function(){return this.atom_.reportObserved(),this.values_.length},t.setArrayLength_=function(e){("number"!=typeof e||e<0)&&Zt("Out of range: "+e);var t=this.values_.length;if(e!==t)if(e>t){for(var n=new Array(e-t),r=0;r<e-t;r++)n[r]=void 0;this.spliceWithArray_(t,0,n)}else this.spliceWithArray_(e,t-e)},t.updateArrayLength_=function(e,t){e!==this.lastKnownLength_&&Zt(16),this.lastKnownLength_+=t,this.legacyMode_&&t>0&&Vi(e+t+1)},t.spliceWithArray_=function(e,t,n){var r=this;Kr(this.atom_);var o=this.values_.length;if(void 0===e?e=0:e>o?e=o:e<0&&(e=Math.max(0,o+e)),t=1===arguments.length?o-e:null==t?0:Math.max(0,Math.min(t,o-e)),void 0===n&&(n=sn),Ho(this)){var i=Yo(this,{object:this.proxy_,type:"splice",index:e,removedCount:t,added:n});if(!i)return sn;t=i.removedCount,n=i.added}if(n=0===n.length?n:n.map((function(e){return r.enhancer_(e,void 0)})),this.legacyMode_||"production"!==process.env.NODE_ENV){var s=n.length-t;this.updateArrayLength_(o,s)}var a=this.spliceItemsIntoValues_(e,t,n);return 0===t&&0===n.length||this.notifyArraySplice_(e,n,a),this.dehanceValues_(a)},t.spliceItemsIntoValues_=function(e,t,n){var r;if(n.length<1e4)return(r=this.values_).splice.apply(r,[e,t].concat(n));var o=this.values_.slice(e,e+t),i=this.values_.slice(e+t);this.values_.length=e+n.length-t;for(var s=0;s<n.length;s++)this.values_[e+s]=n[s];for(var a=0;a<i.length;a++)this.values_[e+n.length+a]=i[a];return o},t.notifyArrayChildUpdate_=function(e,t,n){var r=!this.owned_&&_o(),o=Jo(this),i=o||r?{observableKind:"array",object:this.proxy_,type:ei,debugObjectName:this.atom_.name_,index:e,newValue:t,oldValue:n}:null;"production"!==process.env.NODE_ENV&&r&&mo(i),this.atom_.reportChanged(),o&&Zo(this,i),"production"!==process.env.NODE_ENV&&r&&yo()},t.notifyArraySplice_=function(e,t,n){var r=!this.owned_&&_o(),o=Jo(this),i=o||r?{observableKind:"array",object:this.proxy_,debugObjectName:this.atom_.name_,type:"splice",index:e,removed:n,added:t,removedCount:n.length,addedCount:t.length}:null;"production"!==process.env.NODE_ENV&&r&&mo(i),this.atom_.reportChanged(),o&&Zo(this,i),"production"!==process.env.NODE_ENV&&r&&yo()},t.get_=function(e){if(e<this.values_.length)return this.atom_.reportObserved(),this.dehanceValue_(this.values_[e]);console.warn("production"!==process.env.NODE_ENV?"[mobx] Out of bounds read: "+e:"[mobx.array] Attempt to read an array index ("+e+") that is out of bounds ("+this.values_.length+"). Please check length first. Out of bound indices will not be tracked by MobX")},t.set_=function(e,t){var n=this.values_;if(e<n.length){Kr(this.atom_);var r=n[e];if(Ho(this)){var o=Yo(this,{type:ei,object:this.proxy_,index:e,newValue:t});if(!o)return;t=o.newValue}(t=this.enhancer_(t,r))!==r&&(n[e]=t,this.notifyArrayChildUpdate_(e,t,r))}else e===n.length?this.spliceWithArray_(e,0,[t]):Zt(17,e,n.length)},e}();function ri(e,t,n,r){void 0===n&&(n="ObservableArray@"+dn()),void 0===r&&(r=!1),ln();var o=new ni(n,t,r,!1);yn(o.values_,Fn,o);var i=new Proxy(o.values_,ti);if(o.proxy_=i,e&&e.length){var s=jr(!0);o.spliceWithArray_(0,0,e),Lr(s)}return i}var oi={clear:function(){return this.splice(0)},replace:function(e){var t=this[Fn];return t.spliceWithArray_(0,t.values_.length,e)},toJSON:function(){return this.slice()},splice:function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];var i=this[Fn];switch(arguments.length){case 0:return[];case 1:return i.spliceWithArray_(e);case 2:return i.spliceWithArray_(e,t)}return i.spliceWithArray_(e,t,r)},spliceWithArray:function(e,t,n){return this[Fn].spliceWithArray_(e,t,n)},push:function(){for(var e=this[Fn],t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e.spliceWithArray_(e.values_.length,0,n),e.values_.length},pop:function(){return this.splice(Math.max(this[Fn].values_.length-1,0),1)[0]},shift:function(){return this.splice(0,1)[0]},unshift:function(){for(var e=this[Fn],t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e.spliceWithArray_(0,0,n),e.values_.length},reverse:function(){return to.trackingDerivation&&Zt(37,"reverse"),this.replace(this.slice().reverse()),this},sort:function(){to.trackingDerivation&&Zt(37,"sort");var e=this.slice();return e.sort.apply(e,arguments),this.replace(e),this},remove:function(e){var t=this[Fn],n=t.dehanceValues_(t.values_).indexOf(e);return n>-1&&(this.splice(n,1),!0)}};function ii(e,t){"function"==typeof Array.prototype[e]&&(oi[e]=t(e))}function si(e){return function(){var t=this[Fn];t.atom_.reportObserved();var n=t.dehanceValues_(t.values_);return n[e].apply(n,arguments)}}function ai(e){return function(t,n){var r=this,o=this[Fn];return o.atom_.reportObserved(),o.dehanceValues_(o.values_)[e]((function(e,o){return t.call(n,e,o,r)}))}}function ui(e){return function(){var t=this,n=this[Fn];n.atom_.reportObserved();var r=n.dehanceValues_(n.values_),o=arguments[0];return arguments[0]=function(e,n,r){return o(e,n,r,t)},r[e].apply(r,arguments)}}ii("concat",si),ii("flat",si),ii("includes",si),ii("indexOf",si),ii("join",si),ii("lastIndexOf",si),ii("slice",si),ii("toString",si),ii("toLocaleString",si),ii("every",ai),ii("filter",ai),ii("find",ai),ii("findIndex",ai),ii("flatMap",ai),ii("forEach",ai),ii("map",ai),ii("some",ai),ii("reduce",ui),ii("reduceRight",ui);var ci,li,pi=On("ObservableArrayAdministration",ni);function di(e){return gn(e)&&pi(e[Fn])}var fi={},hi="add";ci=Symbol.iterator,li=Symbol.toStringTag;var vi,_i,gi=function(){function e(e,t,n){void 0===t&&(t=zn),void 0===n&&(n="ObservableMap@"+dn()),this.enhancer_=void 0,this.name_=void 0,this[Fn]=fi,this.data_=void 0,this.hasMap_=void 0,this.keysAtom_=void 0,this.interceptors_=void 0,this.changeListeners_=void 0,this.dehancer=void 0,this.enhancer_=t,this.name_=n,vn(Map)||Zt(18),this.keysAtom_=qn(this.name_+".keys()"),this.data_=new Map,this.hasMap_=new Map,this.merge(e)}var t=e.prototype;return t.has_=function(e){return this.data_.has(e)},t.has=function(e){var t=this;if(!to.trackingDerivation)return this.has_(e);var n=this.hasMap_.get(e);if(!n){var r=n=new kr(this.has_(e),Xn,this.name_+"."+Sn(e)+"?",!1);this.hasMap_.set(e,r),Io(r,(function(){return t.hasMap_.delete(e)}))}return n.get()},t.set=function(e,t){var n=this.has_(e);if(Ho(this)){var r=Yo(this,{type:n?ei:hi,object:this,newValue:t,name:e});if(!r)return this;t=r.newValue}return n?this.updateValue_(e,t):this.addValue_(e,t),this},t.delete=function(e){var t=this;if((Kr(this.keysAtom_),Ho(this))&&!Yo(this,{type:"delete",object:this,name:e}))return!1;if(this.has_(e)){var n=_o(),r=Jo(this),o=r||n?{observableKind:"map",debugObjectName:this.name_,type:"delete",object:this,oldValue:this.data_.get(e).value_,name:e}:null;return"production"!==process.env.NODE_ENV&&n&&mo(o),Ko((function(){t.keysAtom_.reportChanged(),t.updateHasMapEntry_(e,!1),t.data_.get(e).setNewValue_(void 0),t.data_.delete(e)})),r&&Zo(this,o),"production"!==process.env.NODE_ENV&&n&&yo(),!0}return!1},t.updateHasMapEntry_=function(e,t){var n=this.hasMap_.get(e);n&&n.setNewValue_(t)},t.updateValue_=function(e,t){var n=this.data_.get(e);if((t=n.prepareNewValue_(t))!==to.UNCHANGED){var r=_o(),o=Jo(this),i=o||r?{observableKind:"map",debugObjectName:this.name_,type:ei,object:this,oldValue:n.value_,name:e,newValue:t}:null;"production"!==process.env.NODE_ENV&&r&&mo(i),n.setNewValue_(t),o&&Zo(this,i),"production"!==process.env.NODE_ENV&&r&&yo()}},t.addValue_=function(e,t){var n=this;Kr(this.keysAtom_),Ko((function(){var r=new kr(t,n.enhancer_,n.name_+"."+Sn(e),!1);n.data_.set(e,r),t=r.value_,n.updateHasMapEntry_(e,!0),n.keysAtom_.reportChanged()}));var r=_o(),o=Jo(this),i=o||r?{observableKind:"map",debugObjectName:this.name_,type:hi,object:this,name:e,newValue:t}:null;"production"!==process.env.NODE_ENV&&r&&mo(i),o&&Zo(this,i),"production"!==process.env.NODE_ENV&&r&&yo()},t.get=function(e){return this.has(e)?this.dehanceValue_(this.data_.get(e).get()):this.dehanceValue_(void 0)},t.dehanceValue_=function(e){return void 0!==this.dehancer?this.dehancer(e):e},t.keys=function(){return this.keysAtom_.reportObserved(),this.data_.keys()},t.values=function(){var e=this,t=this.keys();return Xi({next:function(){var n=t.next(),r=n.done,o=n.value;return{done:r,value:r?void 0:e.get(o)}}})},t.entries=function(){var e=this,t=this.keys();return Xi({next:function(){var n=t.next(),r=n.done,o=n.value;return{done:r,value:r?void 0:[o,e.get(o)]}}})},t[ci]=function(){return this.entries()},t.forEach=function(e,t){for(var n,r=kn(this);!(n=r()).done;){var o=n.value,i=o[0],s=o[1];e.call(t,s,i,this)}},t.merge=function(e){var t=this;return mi(e)&&(e=new Map(e)),Ko((function(){mn(e)?function(e){var t=Object.keys(e);if(!wn)return t;var n=Object.getOwnPropertySymbols(e);return n.length?[].concat(t,n.filter((function(t){return on.propertyIsEnumerable.call(e,t)}))):t}(e).forEach((function(n){return t.set(n,e[n])})):Array.isArray(e)?e.forEach((function(e){var n=e[0],r=e[1];return t.set(n,r)})):En(e)?(e.constructor!==Map&&Zt(19,e),e.forEach((function(e,n){return t.set(n,e)}))):null!=e&&Zt(20,e)})),this},t.clear=function(){var e=this;Ko((function(){Hr((function(){for(var t,n=kn(e.keys());!(t=n()).done;){var r=t.value;e.delete(r)}}))}))},t.replace=function(e){var t=this;return Ko((function(){for(var n,r=function(e){if(En(e)||mi(e))return e;if(Array.isArray(e))return new Map(e);if(mn(e)){var t=new Map;for(var n in e)t.set(n,e[n]);return t}return Zt(21,e)}(e),o=new Map,i=!1,s=kn(t.data_.keys());!(n=s()).done;){var a=n.value;if(!r.has(a))if(t.delete(a))i=!0;else{var u=t.data_.get(a);o.set(a,u)}}for(var c,l=kn(r.entries());!(c=l()).done;){var p=c.value,d=p[0],f=p[1],h=t.data_.has(d);if(t.set(d,f),t.data_.has(d)){var v=t.data_.get(d);o.set(d,v),h||(i=!0)}}if(!i)if(t.data_.size!==o.size)t.keysAtom_.reportChanged();else for(var _=t.data_.keys(),g=o.keys(),m=_.next(),b=g.next();!m.done;){if(m.value!==b.value){t.keysAtom_.reportChanged();break}m=_.next(),b=g.next()}t.data_=o})),this},t.toString=function(){return"[object ObservableMap]"},t.toJSON=function(){return Array.from(this)},t.observe_=function(e,t){return"production"!==process.env.NODE_ENV&&!0===t&&Zt("`observe` doesn't support fireImmediately=true in combination with maps."),$o(this,e)},t.intercept_=function(e){return Wo(this,e)},In(e,[{key:"size",get:function(){return this.keysAtom_.reportObserved(),this.data_.size}},{key:li,get:function(){return"Map"}}]),e}(),mi=On("ObservableMap",gi);var bi={};vi=Symbol.iterator,_i=Symbol.toStringTag;var yi=function(){function e(e,t,n){void 0===t&&(t=zn),void 0===n&&(n="ObservableSet@"+dn()),this.name_=void 0,this[Fn]=bi,this.data_=new Set,this.atom_=void 0,this.changeListeners_=void 0,this.interceptors_=void 0,this.dehancer=void 0,this.enhancer_=void 0,this.name_=n,vn(Set)||Zt(22),this.atom_=qn(this.name_),this.enhancer_=function(e,r){return t(e,r,n)},e&&this.replace(e)}var t=e.prototype;return t.dehanceValue_=function(e){return void 0!==this.dehancer?this.dehancer(e):e},t.clear=function(){var e=this;Ko((function(){Hr((function(){for(var t,n=kn(e.data_.values());!(t=n()).done;){var r=t.value;e.delete(r)}}))}))},t.forEach=function(e,t){for(var n,r=kn(this);!(n=r()).done;){var o=n.value;e.call(t,o,o,this)}},t.add=function(e){var t=this;if((Kr(this.atom_),Ho(this))&&!Yo(this,{type:hi,object:this,newValue:e}))return this;if(!this.has(e)){Ko((function(){t.data_.add(t.enhancer_(e,void 0)),t.atom_.reportChanged()}));var n="production"!==process.env.NODE_ENV&&_o(),r=Jo(this),o=r||n?{observableKind:"set",debugObjectName:this.name_,type:hi,object:this,newValue:e}:null;n&&"production"!==process.env.NODE_ENV&&mo(o),r&&Zo(this,o),n&&"production"!==process.env.NODE_ENV&&yo()}return this},t.delete=function(e){var t=this;if(Ho(this)&&!Yo(this,{type:"delete",object:this,oldValue:e}))return!1;if(this.has(e)){var n="production"!==process.env.NODE_ENV&&_o(),r=Jo(this),o=r||n?{observableKind:"set",debugObjectName:this.name_,type:"delete",object:this,oldValue:e}:null;return n&&"production"!==process.env.NODE_ENV&&mo(o),Ko((function(){t.atom_.reportChanged(),t.data_.delete(e)})),r&&Zo(this,o),n&&"production"!==process.env.NODE_ENV&&yo(),!0}return!1},t.has=function(e){return this.atom_.reportObserved(),this.data_.has(this.dehanceValue_(e))},t.entries=function(){var e=0,t=Array.from(this.keys()),n=Array.from(this.values());return Xi({next:function(){var r=e;return e+=1,r<n.length?{value:[t[r],n[r]],done:!1}:{done:!0}}})},t.keys=function(){return this.values()},t.values=function(){this.atom_.reportObserved();var e=this,t=0,n=Array.from(this.data_.values());return Xi({next:function(){return t<n.length?{value:e.dehanceValue_(n[t++]),done:!1}:{done:!0}}})},t.replace=function(e){var t=this;return Oi(e)&&(e=new Set(e)),Ko((function(){Array.isArray(e)||Nn(e)?(t.clear(),e.forEach((function(e){return t.add(e)}))):null!=e&&Zt("Cannot initialize set from "+e)})),this},t.observe_=function(e,t){return"production"!==process.env.NODE_ENV&&!0===t&&Zt("`observe` doesn't support fireImmediately=true in combination with sets."),$o(this,e)},t.intercept_=function(e){return Wo(this,e)},t.toJSON=function(){return Array.from(this)},t.toString=function(){return"[object ObservableSet]"},t[vi]=function(){return this.values()},In(e,[{key:"size",get:function(){return this.atom_.reportObserved(),this.data_.size}},{key:_i,get:function(){return"Set"}}]),e}(),Oi=On("ObservableSet",yi),Ei=Symbol("mobx-inferred-annotations"),Ni=Object.create(null),wi=function(){function e(e,t,n,r,o){void 0===t&&(t=new Map),void 0===r&&(r=Er),void 0===o&&(o=!1),this.target_=void 0,this.values_=void 0,this.name_=void 0,this.defaultAnnotation_=void 0,this.autoBind_=void 0,this.keysAtom_=void 0,this.changeListeners_=void 0,this.interceptors_=void 0,this.proxy_=void 0,this.isPlainObject_=void 0,this.appliedAnnotations_=void 0,this.pendingKeys_=void 0,this.target_=e,this.values_=t,this.name_=n,this.defaultAnnotation_=r,this.autoBind_=o,this.keysAtom_=new Gn(n+".keys"),this.isPlainObject_=mn(this.target_),"production"===process.env.NODE_ENV||Yi(this.defaultAnnotation_)||Zt("defaultAnnotation must be valid annotation"),"production"!==process.env.NODE_ENV&&"boolean"!=typeof this.autoBind_&&Zt("autoBind must be boolean"),"production"!==process.env.NODE_ENV&&(this.appliedAnnotations_={})}var t=e.prototype;return t.getObservablePropValue_=function(e){return this.values_.get(e).get()},t.setObservablePropValue_=function(e,t){var n=this.values_.get(e);if(n instanceof Br)return n.set(t),!0;if(Ho(this)){var r=Yo(this,{type:ei,object:this.proxy_||this.target_,name:e,newValue:t});if(!r)return null;t=r.newValue}if((t=n.prepareNewValue_(t))!==to.UNCHANGED){var o=Jo(this),i="production"!==process.env.NODE_ENV&&_o(),s=o||i?{type:ei,observableKind:"object",debugObjectName:this.name_,object:this.proxy_||this.target_,oldValue:n.value_,name:e,newValue:t}:null;"production"!==process.env.NODE_ENV&&i&&mo(s),n.setNewValue_(t),o&&Zo(this,s),"production"!==process.env.NODE_ENV&&i&&yo()}return!0},t.get_=function(e){return to.trackingDerivation&&!Cn(this.target_,e)&&this.has_(e),this.target_[e]},t.set_=function(e,t,n){return void 0===n&&(n=!1),Cn(this.target_,e)?this.values_.has(e)?this.setObservablePropValue_(e,t):n?Reflect.set(this.target_,e,t):(this.target_[e]=t,!0):this.extend_(e,{value:t,enumerable:!0,writable:!0,configurable:!0},this.defaultAnnotation_,n)},t.has_=function(e){if(!to.trackingDerivation)return e in this.target_;this.pendingKeys_||(this.pendingKeys_=new Map);var t=this.pendingKeys_.get(e);return t||(t=new kr(e in this.target_,Xn,this.name_+"."+Sn(e)+"?",!1),this.pendingKeys_.set(e,t)),t.get()},t.make_=function(e,t){!0===t&&(t=this.inferAnnotation_(e)),!1!==t&&(Di(this,t,e),t.make_(this,e))},t.extend_=function(e,t,n,r){if(void 0===r&&(r=!1),!0===n&&(n=Wi(t,this.defaultAnnotation_,this.autoBind_)),!1===n)return this.defineProperty_(e,t,r);Di(this,n,e);var o=n.extend_(this,e,t,r);return o&&xi(this,n,e),o},t.inferAnnotation_=function(e){var t,n=null==(t=this.target_[Ei])?void 0:t[e];if(n)return n;for(var r=this.target_;r&&r!==on;){var o=nn(r,e);if(o){n=Wi(o,this.defaultAnnotation_,this.autoBind_);break}r=Object.getPrototypeOf(r)}if(void 0===n&&Zt(1,"true",e),!this.isPlainObject_){var i=Object.getPrototypeOf(this.target_);Cn(i,Ei)||bn(i,Ei,{}),i[Ei][e]=n}return n},t.defineProperty_=function(e,t,n){void 0===n&&(n=!1);try{io();var r=this.delete_(e);if(!r)return r;if(Ho(this)){var o=Yo(this,{object:this.proxy_||this.target_,name:e,type:hi,newValue:t.value});if(!o)return null;var i=o.newValue;t.value!==i&&(t=Rn({},t,{value:i}))}if(n){if(!Reflect.defineProperty(this.target_,e,t))return!1}else rn(this.target_,e,t);this.notifyPropertyAddition_(e,t.value)}finally{so()}return!0},t.defineObservableProperty_=function(e,t,n,r){void 0===r&&(r=!1);try{io();var o=this.delete_(e);if(!o)return o;if(Ho(this)){var i=Yo(this,{object:this.proxy_||this.target_,name:e,type:hi,newValue:t});if(!i)return null;t=i.newValue}var s=Ti(e),a={configurable:!to.safeDescriptors||this.isPlainObject_,enumerable:!0,get:s.get,set:s.set};if(r){if(!Reflect.defineProperty(this.target_,e,a))return!1}else rn(this.target_,e,a);var u=new kr(t,n,this.name_+"."+Sn(e),!1);this.values_.set(e,u),this.notifyPropertyAddition_(e,u.value_)}finally{so()}return!0},t.defineComputedProperty_=function(e,t,n){void 0===n&&(n=!1);try{io();var r=this.delete_(e);if(!r)return r;if(Ho(this))if(!Yo(this,{object:this.proxy_||this.target_,name:e,type:hi,newValue:void 0}))return null;t.name||(t.name=this.name_+"."+Sn(e)),t.context=this.proxy_||this.target_;var o=Ti(e),i={configurable:!to.safeDescriptors||this.isPlainObject_,enumerable:!1,get:o.get,set:o.set};if(n){if(!Reflect.defineProperty(this.target_,e,i))return!1}else rn(this.target_,e,i);this.values_.set(e,new Br(t)),this.notifyPropertyAddition_(e,void 0)}finally{so()}return!0},t.delete_=function(e,t){if(void 0===t&&(t=!1),!Cn(this.target_,e))return!0;if(Ho(this)&&!Yo(this,{object:this.proxy_||this.target_,name:e,type:"remove"}))return null;try{var n,r;io();var o,i=Jo(this),s="production"!==process.env.NODE_ENV&&_o(),a=this.values_.get(e),u=void 0;if(!a&&(i||s))u=null==(o=nn(this.target_,e))?void 0:o.value;if(t){if(!Reflect.deleteProperty(this.target_,e))return!1}else delete this.target_[e];if("production"!==process.env.NODE_ENV&&delete this.appliedAnnotations_[e],a&&(this.values_.delete(e),a instanceof kr&&(u=a.value_),uo(a)),this.keysAtom_.reportChanged(),null==(n=this.pendingKeys_)||null==(r=n.get(e))||r.set(e in this.target_),i||s){var c={type:"remove",observableKind:"object",object:this.proxy_||this.target_,debugObjectName:this.name_,oldValue:u,name:e};"production"!==process.env.NODE_ENV&&s&&mo(c),i&&Zo(this,c),"production"!==process.env.NODE_ENV&&s&&yo()}}finally{so()}return!0},t.observe_=function(e,t){return"production"!==process.env.NODE_ENV&&!0===t&&Zt("`observe` doesn't support the fire immediately property for observable objects."),$o(this,e)},t.intercept_=function(e){return Wo(this,e)},t.notifyPropertyAddition_=function(e,t){var n,r,o=Jo(this),i="production"!==process.env.NODE_ENV&&_o();if(o||i){var s=o||i?{type:hi,observableKind:"object",debugObjectName:this.name_,object:this.proxy_||this.target_,name:e,newValue:t}:null;"production"!==process.env.NODE_ENV&&i&&mo(s),o&&Zo(this,s),"production"!==process.env.NODE_ENV&&i&&yo()}null==(n=this.pendingKeys_)||null==(r=n.get(e))||r.set(!0),this.keysAtom_.reportChanged()},t.ownKeys_=function(){return this.keysAtom_.reportObserved(),An(this.target_)},t.keys_=function(){return this.keysAtom_.reportObserved(),Object.keys(this.target_)},e}();function Ai(e,t){var n;if("production"!==process.env.NODE_ENV&&t&&Ci(e)&&Zt("Options can't be provided for already observable objects."),Cn(e,Fn))return e;"production"===process.env.NODE_ENV||Object.isExtensible(e)||Zt("Cannot make the designated object observable; it is not extensible");var r=null!=(n=null==t?void 0:t.name)?n:(mn(e)?"ObservableObject":e.constructor.name)+"@"+dn(),o=new wi(e,new Map,Sn(r),function(e){return e?!0===e.deep?dr:!1===e.deep?fr:e.defaultDecorator:void 0}(t),null==t?void 0:t.autoBind);return bn(e,Fn,o),e}var Si=On("ObservableObjectAdministration",wi);function Ti(e){return Ni[e]||(Ni[e]={get:function(){return this[Fn].getObservablePropValue_(e)},set:function(t){return this[Fn].setObservablePropValue_(e,t)}})}function Ci(e){return!!gn(e)&&Si(e[Fn])}function xi(e,t,n){"production"!==process.env.NODE_ENV&&(e.appliedAnnotations_[n]=t),t.isDecorator_&&delete e.target_[Vn][n]}function Di(e,t,n){if("production"===process.env.NODE_ENV||Yi(t)||Zt("Cannot annotate '"+e.name_+"."+n.toString()+"': Invalid annotation."),"production"!==process.env.NODE_ENV&&!Hn(t)&&Cn(e.appliedAnnotations_,n)){var r=e.name_+"."+n.toString(),o=e.appliedAnnotations_[n].annotationType_;Zt("Cannot apply '"+t.annotationType_+"' to '"+r+"':\nThe field is already annotated with '"+o+"'.\nRe-annotating fields is not allowed.\nUse 'override' annotation for methods overriden by subclass.")}}var Ii,Ri,ji=0,Li=function(){};Ii=Li,Ri=Array.prototype,Object.setPrototypeOf?Object.setPrototypeOf(Ii.prototype,Ri):void 0!==Ii.prototype.__proto__?Ii.prototype.__proto__=Ri:Ii.prototype=Ri;var Pi=function(e){function t(t,n,r,o){var i;void 0===r&&(r="ObservableArray@"+dn()),void 0===o&&(o=!1),i=e.call(this)||this;var s=new ni(r,n,o,!0);if(s.proxy_=Ln(i),yn(Ln(i),Fn,s),t&&t.length){var a=jr(!0);i.spliceWithArray(0,0,t),Lr(a)}return i}jn(t,e);var n=t.prototype;return n.concat=function(){this[Fn].atom_.reportObserved();for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Array.prototype.concat.apply(this.slice(),t.map((function(e){return di(e)?e.slice():e})))},n[Symbol.iterator]=function(){var e=this,t=0;return Xi({next:function(){return t<e.length?{value:e[t++],done:!1}:{done:!0,value:void 0}}})},In(t,[{key:"length",get:function(){return this[Fn].getArrayLength_()},set:function(e){this[Fn].setArrayLength_(e)}},{key:Symbol.toStringTag,get:function(){return"Array"}}]),t}(Li);function ki(e){rn(Pi.prototype,""+e,function(e){return{enumerable:!1,configurable:!0,get:function(){return this[Fn].get_(e)},set:function(t){this[Fn].set_(e,t)}}}(e))}function Vi(e){if(e>ji){for(var t=ji;t<e+100;t++)ki(t);ji=e}}function Ui(e,t,n){return new Pi(e,t,n)}function Bi(e,t){if("object"==typeof e&&null!==e){if(di(e))return void 0!==t&&Zt(23),e[Fn].atom_;if(Oi(e))return e[Fn];if(mi(e)){if(void 0===t)return e.keysAtom_;var n=e.data_.get(t)||e.hasMap_.get(t);return n||Zt(25,t,Gi(e)),n}if(Ci(e)){if(!t)return Zt(26);var r=e[Fn].values_.get(t);return r||Zt(27,t,Gi(e)),r}if(Mn(e)||Fr(e)||vo(e))return e}else if(vn(e)&&vo(e[Fn]))return e[Fn];Zt(28)}function Fi(e,t){return e||Zt(29),void 0!==t?Fi(Bi(e,t)):Mn(e)||Fr(e)||vo(e)||mi(e)||Oi(e)?e:e[Fn]?e[Fn]:void Zt(24,e)}function Gi(e,t){return(void 0!==t?Bi(e,t):Ci(e)||mi(e)||Oi(e)?Fi(e):Bi(e)).name_}Object.entries(oi).forEach((function(e){var t=e[0],n=e[1];"concat"!==t&&bn(Pi.prototype,t,n)})),Vi(1e3);var Mi=on.toString;function qi(e,t,n){return void 0===n&&(n=-1),Ki(e,t,n)}function Ki(e,t,n,r,o){if(e===t)return 0!==e||1/e==1/t;if(null==e||null==t)return!1;if(e!=e)return t!=t;var i=typeof e;if(!vn(i)&&"object"!==i&&"object"!=typeof t)return!1;var s=Mi.call(e);if(s!==Mi.call(t))return!1;switch(s){case"[object RegExp]":case"[object String]":return""+e==""+t;case"[object Number]":return+e!=+e?+t!=+t:0==+e?1/+e==1/t:+e==+t;case"[object Date]":case"[object Boolean]":return+e==+t;case"[object Symbol]":return"undefined"!=typeof Symbol&&Symbol.valueOf.call(e)===Symbol.valueOf.call(t);case"[object Map]":case"[object Set]":n>=0&&n++}e=zi(e),t=zi(t);var a="[object Array]"===s;if(!a){if("object"!=typeof e||"object"!=typeof t)return!1;var u=e.constructor,c=t.constructor;if(u!==c&&!(vn(u)&&u instanceof u&&vn(c)&&c instanceof c)&&"constructor"in e&&"constructor"in t)return!1}if(0===n)return!1;n<0&&(n=-1),o=o||[];for(var l=(r=r||[]).length;l--;)if(r[l]===e)return o[l]===t;if(r.push(e),o.push(t),a){if((l=e.length)!==t.length)return!1;for(;l--;)if(!Ki(e[l],t[l],n-1,r,o))return!1}else{var p,d=Object.keys(e);if(l=d.length,Object.keys(t).length!==l)return!1;for(;l--;)if(!Cn(t,p=d[l])||!Ki(e[p],t[p],n-1,r,o))return!1}return r.pop(),o.pop(),!0}function zi(e){return di(e)?e.slice():En(e)||mi(e)||Nn(e)||Oi(e)?Array.from(e.entries()):e}function Xi(e){return e[Symbol.iterator]=Hi,e}function Hi(){return this}function Wi(e,t,n){return e.get?Ar:!e.set&&(vn(e.value)?(r=e.value,!(o=null==r?void 0:r.constructor)||"GeneratorFunction"!==o.name&&"GeneratorFunction"!==o.displayName?!xo(e.value)&&(n?Co.bound:Co):!Fo(e.value)&&Uo):t);var r,o}function Yi(e){return e instanceof Object&&"string"==typeof e.annotationType_&&vn(e.make_)&&vn(e.extend_)}["Symbol","Map","Set","Symbol"].forEach((function(e){void 0===en()[e]&&Zt("MobX requires global '"+e+"' to be available or polyfilled")})),"object"==typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:function(e){return"production"===process.env.NODE_ENV?(console.warn("[mobx.spy] Is a no-op in production builds"),function(){}):(to.spyListeners.push(e),fn((function(){to.spyListeners=to.spyListeners.filter((function(t){return t!==e}))})))},extras:{getDebugName:Gi},$mobx:Fn});var Ji,$i=function(e){this.id=e.id||Date.now()+"",this.name=e.name||"",this.displayName=e.displayName||"",this.type=e.type||Ji.TEXT,this.isRequired=e.isRequired||!1,this.customDataId=e.customDataId||null,this.attributeTypes=e.attributeTypes||null,Qo(this)};!function(e){e.TEXT="TEXT",e.RICH_TEXT="RICH_TEXT",e.BOOLEAN="BOOLEAN",e.IMAGE="IMAGE",e.IMAGE_LIST="IMAGE_LIST",e.LINK="LINK",e.LIST_OF_LINK="LIST_OF_LINK",e.PRODUCT_DETAIL="PRODUCT_DETAIL",e.PRODUCT_LIST="PRODUCT_LIST",e.PRODUCT_ATTRIBUTE="PRODUCT_ATTRIBUTE",e.PRODUCT_ATTRIBUTE_LIST="PRODUCT_ATTRIBUTE_LIST",e.BRAND="BRAND",e.BRAND_LIST="BRAND_LIST",e.CATEGORY="CATEGORY",e.CATEGORY_LIST="CATEGORY_LIST",e.COLOR="COLOR",e.CUSTOM="CUSTOM",e.COMPONENT="COMPONENT",e.COMPONENT_LIST="COMPONENT_LIST",e.BLOG="BLOG",e.BLOG_LIST="BLOG_LIST",e.BLOG_CATEGORY="BLOG_CATEGORY",e.BLOG_CATEGORY_LIST="BLOG_CATEGORY_LIST",e.RAFFLE="RAFFLE",e.RAFFLE_LIST="RAFFLE_LIST",e.OBJECT="OBJECT",e.STATIC_LIST="STATIC_LIST",e.DYNAMIC_LIST="DYNAMIC_LIST",e.ENUM="ENUM"}(Ji||(Ji={}));var Zi,Qi,es=function(e){this.id=e.id||"",this.dir=e.dir||"",this.displayName=e.displayName||"",this.props=e.props?e.props.map((function(e){return new $i(e)})):[],this.isHeader=e.isHeader||!1,this.isFooter=e.isFooter||!1,Qo(this)},ts=function(){function e(t){var r,o=this;void 0===t&&(t={}),this.customDataId=null,this.id=t.id||"",this.name=t.name||null,this.type=t.type||Ji.TEXT,this.isRequired=void 0===t.isRequired||t.isRequired,this.key=t.key||null,this.parent=t.parent||null,this.itemCount=t.itemCount||null,this.attributeTypes=t.attributeTypes||null,this.enumOptions=(null===(r=t.enumOptions)||void 0===r?void 0:r.map((function(e){return new ns(e)})))||null,this.customDataId=t.customDataId||null,this.isRoot=t.isRoot||!1,this.nestedData=t.nestedData?t.nestedData.map((function(t){return new e(n(n({},t),{parent:o}))})):null,this.type!==Ji.STATIC_LIST||this.itemCount||(this.itemCount=1),Qo(this)}return e.prototype.toJSON=function(){var e=n({},this);return delete e.parent,e},e}(),ns=function(e){void 0===e&&(e={}),this.id=e.id||"",this.displayName=e.displayName||"",this.value=e.value||"",Qo(this)},rs=function(e){this.id=e.id||"",this.componentId=e.componentId||"",this.propValues=e.propValues||{},Qo(this)},os=function(e){this.id=e.id||Date.now()+"",this.name=e.name||null,this.type=e.type||Zi.INDEX,this.slug=e.slug||null,this.pageTitle=e.pageTitle||null,this.description=e.description||null,this.components=e.components?e.components.map((function(e){return new rs(e)})):[],this.specifications=e.specifications?e.specifications.map((function(e){return new is(e)})):null,Qo(this)},is=function(e){this.id=e.id||"",this.components=e.components?e.components.map((function(e){return new rs(e)})):[],Qo(this)};!function(e){e.INDEX="INDEX",e.CATEGORY="CATEGORY",e.BRAND="BRAND",e.PRODUCT="PRODUCT",e.CUSTOM="CUSTOM",e.ACCOUNT="ACCOUNT",e.ADDRESSES="ADDRESSES",e.ORDERS="ORDERS",e.ORDER_DETAIL="ORDER_DETAIL",e.LOGIN="LOGIN",e.REGISTER="REGISTER",e.FORGOT_PASSWORD="FORGOT_PASSWORD",e.RECOVER_PASSWORD="RECOVER_PASSWORD",e.CART="CART",e.FAVORITE_PRODUCTS="FAVORITE_PRODUCTS",e.SEARCH="SEARCH",e.NOT_FOUND="NOT_FOUND",e.BLOG="BLOG",e.BLOG_INDEX="BLOG_INDEX",e.BLOG_CATEGORY="BLOG_CATEGORY",e.CHECKOUT="CHECKOUT",e.RAFFLE="RAFFLE",e.RAFFLE_DETAIL="RAFFLE_DETAIL",e.RAFFLE_ACCOUNT="RAFFLE_ACCOUNT"}(Zi||(Zi={}));var ss=new Uint8Array(16);function as(){if(!Qi&&!(Qi="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Qi(ss)}var us=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function cs(e){return"string"==typeof e&&us.test(e)}for(var ls=[],ps=0;ps<256;++ps)ls.push((ps+256).toString(16).substr(1));function ds(e,t,n){var r=(e=e||{}).random||(e.rng||as)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var o=0;o<16;++o)t[n+o]=r[o];return t}return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(ls[e[t+0]]+ls[e[t+1]]+ls[e[t+2]]+ls[e[t+3]]+"-"+ls[e[t+4]]+ls[e[t+5]]+"-"+ls[e[t+6]]+ls[e[t+7]]+"-"+ls[e[t+8]]+ls[e[t+9]]+"-"+ls[e[t+10]]+ls[e[t+11]]+ls[e[t+12]]+ls[e[t+13]]+ls[e[t+14]]+ls[e[t+15]]).toLowerCase();if(!cs(n))throw TypeError("Stringified UUID is invalid");return n}(r)}var fs,hs=function(e){this.id=e.id||ds(),this.displayName=e.displayName||"",this.key=e.key||"",this.color=e.color||"",Qo(this)},vs=function(e){this.id=(null==e?void 0:e.id)||null,Qo(this)},_s=function(e){var t;void 0===e&&(e={}),this.colors=e.colors?e.colors.map((function(e){return new hs(e)})):[],this.favicon=(null===(t=e.favicon)||void 0===t?void 0:t.id)?e.favicon:new vs,this.stockPreference=e.stockPreference||fs.SHOW_ALL,Qo(this)};!function(e){e.HIDE_OUT_OF_STOCK="HIDE_OUT_OF_STOCK",e.SHOW_ALL="SHOW_ALL",e.SHOW_OUT_OF_STOCK_AT_END="SHOW_OUT_OF_STOCK_AT_END"}(fs||(fs={}));var gs,ms,bs=function(){function e(e){var t;void 0===e&&(e={}),this.name=e.name||"",this.components=e.components?e.components.map((function(e){return new es(e)})):[],this.pages=e.pages?e.pages.map((function(e){return new os(e)})):[],this.settings=e.settings?new _s(e.settings):new _s,this.customData=e.customData?null===(t=e.customData)||void 0===t?void 0:t.map((function(e){return new ts(e)})):[],this.createCheckoutData(),Qo(this)}return Object.defineProperty(e.prototype,"headerComponent",{get:function(){return this.components.find((function(e){return e.isHeader}))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"footerComponent",{get:function(){return this.components.find((function(e){return e.isFooter}))},enumerable:!1,configurable:!0}),e.prototype.createCheckoutData=function(){var e=this.components.find((function(e){return"checkout"===e.id})),t=this.pages.find((function(e){return"checkout"===e.id}));e||(e=new es({id:"checkout",dir:"",displayName:"",props:[new $i({name:"buttonBgColor",isRequired:!1,type:Ji.COLOR}),new $i({name:"buttonTextColor",isRequired:!1,type:Ji.COLOR}),new $i({name:"buttonDisabledBgColor",isRequired:!1,type:Ji.COLOR}),new $i({name:"buttonDisabledTextColor",isRequired:!1,type:Ji.COLOR}),new $i({name:"primaryTextColor",isRequired:!1,type:Ji.COLOR}),new $i({name:"secondaryTextColor",isRequired:!1,type:Ji.COLOR}),new $i({name:"primaryBgColor",isRequired:!1,type:Ji.COLOR}),new $i({name:"secondaryBgColor",isRequired:!1,type:Ji.COLOR}),new $i({name:"borderColor",isRequired:!1,type:Ji.COLOR}),new $i({name:"cardBgColor",isRequired:!1,type:Ji.COLOR}),new $i({name:"errorColor",isRequired:!1,type:Ji.COLOR}),new $i({name:"errorLightColor",isRequired:!1,type:Ji.COLOR}),new $i({name:"warningColor",isRequired:!1,type:Ji.COLOR}),new $i({name:"warningLightColor",isRequired:!1,type:Ji.COLOR}),new $i({name:"successColor",isRequired:!1,type:Ji.COLOR}),new $i({name:"successLightColor",isRequired:!1,type:Ji.COLOR})]}),this.components.push(e)),t||this.pages.push(new os({id:"checkout",type:Zi.CHECKOUT,components:[new rs({componentId:e.id,propValues:{buttonBgColor:ys,buttonTextColor:Os,buttonDisabledBgColor:Es,buttonDisabledTextColor:Ns,primaryTextColor:ws,secondaryTextColor:As,primaryBgColor:Ss,secondaryBgColor:Ts,borderColor:Cs,cardBgColor:xs,errorColor:Ds,errorLightColor:Is,warningColor:Rs,warningLightColor:js,successColor:Ls,successLightColor:Ps}})]}))},e}(),ys="#272727",Os="#FFFFFF",Es="#F7F7F9",Ns="#8A8B94",ws="#272727",As="#8A8B94",Ss="#FFFFFF",Ts="#F7F7F9",Cs="#E5E4E9",xs="#F7F7F9",Ds="#FB4E4E",Is="#FCF3F4",Rs="#FFBC1F",js="#FFFAEE",Ls="#2DCA73",Ps="#F6FFED",ks=function(){function n(){}return n.generate=function(t){return Ce(e.join(process.cwd(),"src","theme.json"),"",JSON.stringify(t,null,2))},n.generateInitialThemeJsonFile=function(){var e=new bs;return e.pages.push(new os({type:Zi.INDEX})),n.generate(e)},n.getTheme=function(){return r(this,void 0,void 0,(function(){var n,r;return o(this,(function(o){try{return n=e.join(process.cwd(),"src","theme.json"),[2,(r=t.readFileSync(n)).length?JSON.parse(r.toString()):null]}catch(e){console.error(e)}return[2]}))}))},n}(),Vs=function(){function t(){}return t.generate=function(n){return r(this,void 0,void 0,(function(){var r;return o(this,(function(o){switch(o.label){case 0:return[4,Te(e.join(process.cwd(),"src","components","__generated__"))];case 1:return o.sent(),[4,t.generateAllComponentImportsFile(n)];case 2:return(r=o.sent())?[4,t.generateAllComponentImportsFileForEditor(n)]:[3,4];case 3:r=o.sent(),o.label=4;case 4:return[2,r]}}))}))},t.generateAllComponentImportsFileForEditor=function(t){return r(this,void 0,void 0,(function(){var n,r,i;return o(this,(function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),n='import dynamic from "next/dynamic";\r\n',n+='import { IkasEditorComponentLoader } from "@ikas/storefront";\r\n',n+="\r\n",n+="\r\n",(r=t.components.filter((function(e){return"checkout"!==e.id}))).filter((function(e){return"checkout"!==e.id})).forEach((function(e,t){n+="const Component"+t+' = dynamic(() => import("../'+e.dir+'"), { loading: () => <IkasEditorComponentLoader /> });\r\n'})),n+="\r\n",n+="\nconst Components = {\n "+r.map((function(e,t){return'"'+e.id+'": Component'+t}))+"\n};\n",n+="\r\n",n+="export default Components;",[4,Ce(e.join(process.cwd(),"src","components","__generated__"),"editor.tsx",n)];case 1:return[2,o.sent()];case 2:return i=o.sent(),console.error(i),[2,!1];case 3:return[2]}}))}))},t.generateAllComponentImportsFile=function(t){return r(this,void 0,void 0,(function(){var n,r,i;return o(this,(function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),n="",(r=t.components.filter((function(e){return"checkout"!==e.id}))).filter((function(e){return"checkout"!==e.id})).forEach((function(e,t){n+="import Component"+t+' from "../'+e.dir+'";\r\n'})),n+="\r\n",n+="\nconst Components = {\n "+r.map((function(e,t){return'"'+e.id+'": Component'+t}))+"\n};\n",n+="\r\n",n+="export default Components;",[4,Ce(e.join(process.cwd(),"src","components","__generated__"),"index.tsx",n)];case 1:return[2,o.sent()];case 2:return i=o.sent(),console.error(i),[2,!1];case 3:return[2]}}))}))},t}(),Us=[{path:"[slug]/index.tsx",pageComponentName:"SlugPage",pageTypes:[Zi.PRODUCT,Zi.CATEGORY,Zi.BRAND],isDynamicSSG:!0},{path:"account/orders/[id].tsx",pageComponentName:"OrderDetailPage",pageTypes:[Zi.ORDER_DETAIL],isSSR:!0},{path:"account/orders/index.tsx",pageComponentName:"OrdersPage",pageTypes:[Zi.ORDERS]},{path:"account/addresses.tsx",pageComponentName:"AddressesPage",pageTypes:[Zi.ADDRESSES]},{path:"account/favorite-products.tsx",pageComponentName:"FavoriteProductsPage",pageTypes:[Zi.FAVORITE_PRODUCTS]},{path:"account/forgot-password.tsx",pageComponentName:"ForgotPasswordPage",pageTypes:[Zi.FORGOT_PASSWORD]},{path:"account/index.tsx",pageComponentName:"AccountPage",pageTypes:[Zi.ACCOUNT]},{path:"account/login.tsx",pageComponentName:"LoginPage",pageTypes:[Zi.LOGIN]},{path:"account/raffles.tsx",pageComponentName:"AccountRafflesPage",pageTypes:[Zi.RAFFLE_ACCOUNT]},{path:"account/recover-password.tsx",pageComponentName:"RecoverPasswordPage",pageTypes:[Zi.RECOVER_PASSWORD]},{path:"account/register.tsx",pageComponentName:"RegisterPage",pageTypes:[Zi.REGISTER]},{path:"blog/[slug].tsx",pageComponentName:"BlogSlugPage",pageTypes:[Zi.BLOG,Zi.BLOG_CATEGORY],isDynamicSSG:!0},{path:"blog/index.tsx",pageComponentName:"BlogPage",pageTypes:[Zi.BLOG_INDEX]},{path:"pages/[slug].tsx",pageComponentName:"CustomPage",pageTypes:[Zi.CUSTOM],isDynamicSSG:!0},{path:"raffle/[slug].tsx",pageComponentName:"RafflePage",pageTypes:[Zi.RAFFLE_DETAIL],isDynamicSSG:!0},{path:"raffle/index.tsx",pageComponentName:"RafflesPage",pageTypes:[Zi.RAFFLE]},{path:"404.tsx",pageComponentName:"NotFoundPage",pageTypes:[Zi.NOT_FOUND]},{path:"cart.tsx",pageComponentName:"CartPage",pageTypes:[Zi.CART]},{path:"index.tsx",pageComponentName:"IndexPage",pageTypes:[Zi.INDEX]},{path:"search.tsx",pageComponentName:"SearchPage",pageTypes:[Zi.SEARCH]},{path:"checkout.tsx",pageComponentName:"CheckoutPage",pageTypes:[],isCheckout:!0},{path:"editor.tsx",pageComponentName:"EditorPage",pageTypes:[],isEditor:!0}],Bs=function(){function t(){}return t.generate=function(){return r(this,void 0,void 0,(function(){var n,r,i,s,a,u,c,l,p,d,f;return o(this,(function(o){switch(o.label){case 0:return[4,Te(e.join(process.cwd(),"src","pages"),["_app.tsx","_document.tsx","api"])];case 1:o.sent(),n=!0,r=0,i=Us,o.label=2;case 2:return r<i.length?(s=i[r],(a=n)?[4,t.generatePageWithInfo(s)]:[3,4]):[3,6];case 3:a=o.sent(),o.label=4;case 4:n=a,o.label=5;case 5:return r++,[3,2];case 6:return u=Us.find((function(e){return e.isCheckout})),c=Us.find((function(e){return e.isEditor})),u?[4,t.generatePageWithInfo(u)]:[3,8];case 7:return p=o.sent(),[3,9];case 8:p=!1,o.label=9;case 9:return l=p,c?[4,t.generatePageWithInfo(c)]:[3,11];case 10:return f=o.sent(),[3,12];case 11:f=!1,o.label=12;case 12:return d=f,[2,n&&l&&d]}}))}))},t.generatePageWithInfo=function(t){return r(this,void 0,void 0,(function(){var n,r,i,s,a,u;return o(this,(function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),n="",t.isCheckout?n='import { CheckoutPage } from "@ikas/storefront";\n\nexport default CheckoutPage.default;\nexport const getStaticProps = CheckoutPage.getStaticProps;\n':t.isEditor?n='import { EditorPage } from "@ikas/storefront";\nimport Components from "../components/__generated__/editor";\n\nconst PageComponent = EditorPage.default;\n\nconst Page = (props: any) => {\n return <PageComponent components={Components} {...props} />;\n};\n\nexport default Page;\nexport const getStaticProps = EditorPage.getStaticProps;\n':(r="import { "+t.pageComponentName+' } from "@ikas/storefront";\r\n','import Components from "src/components/__generated__/index";\r\n',i="\nconst PageComponent = "+t.pageComponentName+".default;\n\nconst Page = (props: any) => {\n return <PageComponent components={Components} {...props} />;\n};\n\nexport default Page;\r\n",s=t.isDynamicSSG?"export const getStaticPaths = "+t.pageComponentName+".getStaticPaths;\r\n":"",a=t.isSSR?"export const getServerSideProps = "+t.pageComponentName+".getServerSideProps;\r\n":"export const getStaticProps = "+t.pageComponentName+".getStaticProps;\r\n",n=r+'import Components from "src/components/__generated__/index";\r\n'+i+s+a),[4,Ce(e.join(process.cwd(),"src","pages"),t.path,n)];case 1:return[2,o.sent()];case 2:return u=o.sent(),console.error(u),[2,!1];case 3:return[2]}}))}))},t.generatePageWithType=function(e){return r(this,void 0,void 0,(function(){var n;return o(this,(function(r){switch(r.label){case 0:return(n=Us.find((function(t){return t.pageTypes.includes(e)})))?[4,t.generatePageWithInfo(n)]:[3,2];case 1:return[2,r.sent()];case 2:return[2,!1]}}))}))},t}(),Fs=function(){function n(){}return n.generate=function(){return r(this,void 0,void 0,(function(){return o(this,(function(n){switch(n.label){case 0:return t.existsSync(e.join(process.cwd(),"src","store","index.ts"))?[3,2]:[4,Ce(e.join(process.cwd(),"src","store"),"index.ts",'import { IkasBaseStore } from "@ikas/storefront";\n\nexport default class Store extends IkasBaseStore {\n // Add your own stores here if needed\n // ex: yourStore: YourStore;\n\n constructor() {\n super();\n\n // Init your own stores here\n // ex: this.yourStore = new YourStore();\n }\n}\n')];case 1:return[2,n.sent()];case 2:return[2,!0]}}))}))},n}();gs=[{name:"generate",alias:"g",type:Boolean},{name:"dev",alias:"d",type:Boolean}],(ms=Se(gs)).generate&&(function(e){return r(this,void 0,void 0,(function(){var t,n,r,i,s,a;return o(this,(function(o){switch(o.label){case 0:return[4,ks.getTheme()];case 1:return(t=o.sent())?[3,3]:[4,ks.generateInitialThemeJsonFile()];case 2:o.sent(),o.label=3;case 3:return[4,ks.getTheme()];case 4:return t=o.sent(),[4,ks.generate(t)];case 5:return(a=o.sent())?[4,Vs.generate(t)]:[3,7];case 6:a=o.sent(),o.label=7;case 7:return(s=a)?[4,Bs.generate()]:[3,9];case 8:s=o.sent(),o.label=9;case 9:return(i=s)?[4,De.generate()]:[3,11];case 10:i=o.sent(),o.label=11;case 11:return(r=i)?[4,Fs.generate()]:[3,13];case 12:r=o.sent(),o.label=13;case 13:return(n=r)?[4,Jt.generate(e)]:[3,15];case 14:n=o.sent(),o.label=15;case 15:return[2,n]}}))}))}(ms.dev?"dev":"prod")?console.log("Project files generated successfully!"):console.log("Project files generate failed!"));
@@ -1 +1 @@
1
- import{__awaiter as n,__generator as t}from'../../../ext/tslib/tslib.es6.js';import r from"path";import{deleteDirContent as e,createFile as o}from"../../../utils/fs.js";var s=function(){function s(){}return s.generate=function(o){return n(this,void 0,void 0,(function(){var n;return t(this,(function(t){switch(t.label){case 0:return[4,e(r.join(process.cwd(),"src","components","__generated__"))];case 1:return t.sent(),[4,s.generateAllComponentImportsFile(o)];case 2:return(n=t.sent())?[4,s.generateAllComponentImportsFileForEditor(o)]:[3,4];case 3:n=t.sent(),t.label=4;case 4:return[2,n]}}))}))},s.generateAllComponentImportsFileForEditor=function(e){return n(this,void 0,void 0,(function(){var n,s,i,c;return t(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),n='import dynamic from "next/dynamic";\r\n',n+='import { IkasEditorComponentLoader } from "@ikas/storefront";\r\n',n+="\r\n",n+="const loader = { loading: () => <IkasEditorComponentLoader /> };\r\n",n+="\r\n",(s=e.components.filter((function(n){return"checkout"!==n.id}))).filter((function(n){return"checkout"!==n.id})).forEach((function(t,r){n+="const Component"+r+' = dynamic(() => import("../'+t.dir+'"), loader);\r\n'})),n+="\r\n",n+="\nconst Components = {\n "+s.map((function(n,t){return'"'+n.id+'": Component'+t}))+"\n};\n",n+="\r\n",n+="export default Components;",i=r.join(process.cwd(),"src","components","__generated__"),[4,o(i,"editor.tsx",n)];case 1:return[2,t.sent()];case 2:return c=t.sent(),console.error(c),[2,!1];case 3:return[2]}}))}))},s.generateAllComponentImportsFile=function(e){return n(this,void 0,void 0,(function(){var n,s,i,c;return t(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),n="",(s=e.components.filter((function(n){return"checkout"!==n.id}))).filter((function(n){return"checkout"!==n.id})).forEach((function(t,r){n+="import Component"+r+' from "../'+t.dir+'";\r\n'})),n+="\r\n",n+="\nconst Components = {\n "+s.map((function(n,t){return'"'+n.id+'": Component'+t}))+"\n};\n",n+="\r\n",n+="export default Components;",i=r.join(process.cwd(),"src","components","__generated__"),[4,o(i,"index.tsx",n)];case 1:return[2,t.sent()];case 2:return c=t.sent(),console.error(c),[2,!1];case 3:return[2]}}))}))},s}();export{s as ComponentImportsGenerator};
1
+ import{__awaiter as n,__generator as t}from'../../../ext/tslib/tslib.es6.js';import e from"path";import{deleteDirContent as r,createFile as o}from"../../../utils/fs.js";var i=function(){function i(){}return i.generate=function(o){return n(this,void 0,void 0,(function(){var n;return t(this,(function(t){switch(t.label){case 0:return[4,r(e.join(process.cwd(),"src","components","__generated__"))];case 1:return t.sent(),[4,i.generateAllComponentImportsFile(o)];case 2:return(n=t.sent())?[4,i.generateAllComponentImportsFileForEditor(o)]:[3,4];case 3:n=t.sent(),t.label=4;case 4:return[2,n]}}))}))},i.generateAllComponentImportsFileForEditor=function(r){return n(this,void 0,void 0,(function(){var n,i,s,c;return t(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),n='import dynamic from "next/dynamic";\r\n',n+='import { IkasEditorComponentLoader } from "@ikas/storefront";\r\n',n+="\r\n",n+="\r\n",(i=r.components.filter((function(n){return"checkout"!==n.id}))).filter((function(n){return"checkout"!==n.id})).forEach((function(t,e){n+="const Component"+e+' = dynamic(() => import("../'+t.dir+'"), { loading: () => <IkasEditorComponentLoader /> });\r\n'})),n+="\r\n",n+="\nconst Components = {\n "+i.map((function(n,t){return'"'+n.id+'": Component'+t}))+"\n};\n",n+="\r\n",n+="export default Components;",s=e.join(process.cwd(),"src","components","__generated__"),[4,o(s,"editor.tsx",n)];case 1:return[2,t.sent()];case 2:return c=t.sent(),console.error(c),[2,!1];case 3:return[2]}}))}))},i.generateAllComponentImportsFile=function(r){return n(this,void 0,void 0,(function(){var n,i,s,c;return t(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),n="",(i=r.components.filter((function(n){return"checkout"!==n.id}))).filter((function(n){return"checkout"!==n.id})).forEach((function(t,e){n+="import Component"+e+' from "../'+t.dir+'";\r\n'})),n+="\r\n",n+="\nconst Components = {\n "+i.map((function(n,t){return'"'+n.id+'": Component'+t}))+"\n};\n",n+="\r\n",n+="export default Components;",s=e.join(process.cwd(),"src","components","__generated__"),[4,o(s,"index.tsx",n)];case 1:return[2,t.sent()];case 2:return c=t.sent(),console.error(c),[2,!1];case 3:return[2]}}))}))},i}();export{i as ComponentImportsGenerator};
@@ -1 +1 @@
1
- var n={next:"12.0.4",react:"17.0.2","react-dom":"17.0.2",mobx:"^6.1.3","mobx-react-lite":"^3.1.5","next-transpile-modules":"^9.0.0","@ikas/storefront-utils":"^2.0.0-alpha.1"},e={"@types/node":"^14.14.6","@types/react":"^16.9.55","@typescript-eslint/eslint-plugin":"^2.10.0","@typescript-eslint/parser":"^2.10.0",eslint:"^6.6.0","eslint-config-react-app":"^5.2.1","eslint-loader":"3.0.3","eslint-plugin-flowtype":"4.6.0","eslint-plugin-import":"2.20.1","eslint-plugin-jsx-a11y":"6.2.3","eslint-plugin-react":"7.19.0","eslint-plugin-react-hooks":"^1.6.1",sass:"^1.43.4",typescript:"^4.5.2"},t={upgradeDependencies:"yarn upgrade @ikas/storefront @ikas/storefront-utils",dev:"next dev -p 3333",build:"next build",start:"next start",generate:"ikas --generate","prettier:all":"npx prettier@^2.1 './**/src/**/*.(ts|tsx|css|scss)' --write"},s='{\n "compilerOptions": {\n "target": "esnext",\n "lib": [\n "dom",\n "dom.iterable",\n "esnext"\n ],\n "allowJs": true,\n "skipLibCheck": true,\n "strict": true,\n "forceConsistentCasingInFileNames": true,\n "experimentalDecorators": true,\n "noEmit": true,\n "esModuleInterop": true,\n "module": "esnext",\n "moduleResolution": "node",\n "resolveJsonModule": true,\n "isolatedModules": true,\n "jsx": "preserve",\n "baseUrl": ".",\n "useUnknownInCatchVariables": false,\n "incremental": true\n },\n "typeRoots": [\n "./node_modules/@types"\n ],\n "include": [\n "next-env.d.ts",\n "**/*.ts",\n "**/*.tsx",\n "**/typings/global.d.ts",\n ],\n "exclude": [\n "node_modules",\n "./src/pages/api",\n ]\n}',i='const withTM = require("next-transpile-modules")(["@ikas/storefront"]);\n\nconst config = {\n i18n: {\n defaultLocale: "en",\n locales: ["en"],\n localeDetection: false,\n },\n basePath: process.env.NEXTJS_BASE_PATH || "",\n\n images: {\n deviceSizes: [\n 180,\n 360,\n 540,\n 720,\n 900,\n 1080,\n 1296,\n 1512,\n 1728,\n 1950,\n 2560,\n 3840,\n ],\n },\n\n webpack: (config, { buildId, dev, isServer, defaultLoaders, webpack }) => {\n if (!isServer) {\n config.resolve.fallback.fs = false;\n }\n return config;\n },\n};\n\nmodule.exports = withTM(config);',a="NEXT_PUBLIC_ENV=local\nNEXT_PUBLIC_BASE_URL=https://api.myikas.dev\nNEXT_PUBLIC_IMG_HOST=cdn.myikas.dev\nNEXT_PUBLIC_IMG_BASE_URL=https://cdn.myikas.dev/\nNEXT_PUBLIC_UPLOAD_GQL_URL=https://api.myikas.dev/api/admin/graphql\nNEXT_PUBLIC_GQL_URL=https://api.myikas.dev/api/sf/graphql\n",r="NEXT_PUBLIC_ENV=local\nNEXT_PUBLIC_BASE_URL=https://api.myikas.com\nNEXT_PUBLIC_IMG_HOST=cdn.myikas.com\nNEXT_PUBLIC_IMG_BASE_URL=https://cdn.myikas.com/\nNEXT_PUBLIC_UPLOAD_GQL_URL=https://api.myikas.com/api/admin/graphql\nNEXT_PUBLIC_GQL_URL=https://api.myikas.com/api/sf/graphql\n";export{n as DEPENDENCIES,e as DEV_DEPENDENCIES,a as DEV_ENV,i as NEXT_CONFIG,r as PROD_ENV,t as SCRIPTS,s as TS_CONFIG};
1
+ var n={next:"12.0.7",react:"17.0.2","react-dom":"17.0.2",mobx:"^6.1.3","mobx-react-lite":"^3.1.5","next-transpile-modules":"^9.0.0","@ikas/storefront-utils":"^2.0.0-alpha.1"},e={"@types/node":"^14.14.6","@types/react":"^16.9.55","@typescript-eslint/eslint-plugin":"^2.10.0","@typescript-eslint/parser":"^2.10.0",eslint:"^6.6.0","eslint-config-react-app":"^5.2.1","eslint-loader":"3.0.3","eslint-plugin-flowtype":"4.6.0","eslint-plugin-import":"2.20.1","eslint-plugin-jsx-a11y":"6.2.3","eslint-plugin-react":"7.19.0","eslint-plugin-react-hooks":"^1.6.1",sass:"^1.43.4",typescript:"^4.5.2"},t={upgradeDependencies:"yarn upgrade @ikas/storefront @ikas/storefront-utils",dev:"next dev -p 3333",build:"next build",start:"next start",generate:"ikas --generate","prettier:all":"npx prettier@^2.1 './**/src/**/*.(ts|tsx|css|scss)' --write"},s='{\n "compilerOptions": {\n "target": "esnext",\n "lib": [\n "dom",\n "dom.iterable",\n "esnext"\n ],\n "allowJs": true,\n "skipLibCheck": true,\n "strict": true,\n "forceConsistentCasingInFileNames": true,\n "experimentalDecorators": true,\n "noEmit": true,\n "esModuleInterop": true,\n "module": "esnext",\n "moduleResolution": "node",\n "resolveJsonModule": true,\n "isolatedModules": true,\n "jsx": "preserve",\n "baseUrl": ".",\n "useUnknownInCatchVariables": false,\n "incremental": true\n },\n "typeRoots": [\n "./node_modules/@types"\n ],\n "include": [\n "next-env.d.ts",\n "**/*.ts",\n "**/*.tsx",\n "**/typings/global.d.ts",\n ],\n "exclude": [\n "node_modules",\n "./src/pages/api",\n ]\n}',i='const withTM = require("next-transpile-modules")(["@ikas/storefront"]);\n\nconst config = {\n i18n: {\n defaultLocale: "en",\n locales: ["en"],\n localeDetection: false,\n },\n basePath: process.env.NEXTJS_BASE_PATH || "",\n\n images: {\n deviceSizes: [\n 180,\n 360,\n 540,\n 720,\n 900,\n 1080,\n 1296,\n 1512,\n 1728,\n 1950,\n 2560,\n 3840,\n ],\n },\n\n webpack: (config, { buildId, dev, isServer, defaultLoaders, webpack }) => {\n if (!isServer) {\n config.resolve.fallback.fs = false;\n }\n return config;\n },\n};\n\nmodule.exports = withTM(config);',a="NEXT_PUBLIC_ENV=local\nNEXT_PUBLIC_BASE_URL=https://api.myikas.dev\nNEXT_PUBLIC_IMG_HOST=cdn.myikas.dev\nNEXT_PUBLIC_IMG_BASE_URL=https://cdn.myikas.dev/\nNEXT_PUBLIC_UPLOAD_GQL_URL=https://api.myikas.dev/api/admin/graphql\nNEXT_PUBLIC_GQL_URL=https://api.myikas.dev/api/sf/graphql\n",r="NEXT_PUBLIC_ENV=local\nNEXT_PUBLIC_BASE_URL=https://api.myikas.com\nNEXT_PUBLIC_IMG_HOST=cdn.myikas.com\nNEXT_PUBLIC_IMG_BASE_URL=https://cdn.myikas.com/\nNEXT_PUBLIC_UPLOAD_GQL_URL=https://api.myikas.com/api/admin/graphql\nNEXT_PUBLIC_GQL_URL=https://api.myikas.com/api/sf/graphql\n";export{n as DEPENDENCIES,e as DEV_DEPENDENCIES,a as DEV_ENV,i as NEXT_CONFIG,r as PROD_ENV,t as SCRIPTS,s as TS_CONFIG};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ikas/storefront",
3
- "version": "2.0.0-alpha.10",
3
+ "version": "2.0.0-alpha.11",
4
4
  "main": "./build/index.js",
5
5
  "module": "./build/index.js",
6
6
  "author": "Umut Ozan Yıldırım",
@@ -23,7 +23,7 @@
23
23
  "peerDependencies": {
24
24
  "mobx": "^6.1.3",
25
25
  "mobx-react-lite": "^3.1.5",
26
- "next": "12.0.4",
26
+ "next": "12.0.7",
27
27
  "react": "17.0.2",
28
28
  "react-dom": "17.0.2"
29
29
  },
@@ -74,7 +74,7 @@
74
74
  "jest": "^26.4.2",
75
75
  "mobx": "^6.1.3",
76
76
  "mobx-react-lite": "^3.1.5",
77
- "next": "11.1.2",
77
+ "next": "12.0.7",
78
78
  "postcss": "^8.4.4",
79
79
  "prettier": "^2.2.1",
80
80
  "react": "17.0.2",