var z2=Object.defineProperty,H2=Object.defineProperties;var W2=Object.getOwnPropertyDescriptors;var _s=Object.getOwnPropertySymbols;var bp=Object.prototype.hasOwnProperty,wp=Object.prototype.propertyIsEnumerable;var yp=(t,e,n)=>e in t?z2(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,zi=(t,e)=>{for(var n in e||(e={}))bp.call(e,n)&&yp(t,n,e[n]);if(_s)for(var n of _s(e))wp.call(e,n)&&yp(t,n,e[n]);return t},Ap=(t,e)=>H2(t,W2(e));var Op=(t,e)=>{var n={};for(var r in t)bp.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&_s)for(var r of _s(t))e.indexOf(r)<0&&wp.call(t,r)&&(n[r]=t[r]);return n};import{N as Pe,O as Tl,P as k2,S as oe,i as le,s as fe,e as D,c as F,a as j,d as w,g as R,J as pn,K as gn,L as _n,q as K,o as G,I as vn,C as me,k as Q,m as ee,Q as Vn,R as ke,M,T as Ms,n as Rn,p as Ln,z as Ee,U as Zn,V as Y2,W as xs,X as ca,r as Wo,Y as Gv,G as ha,Z as tt,_ as V2,b as E,$ as Jr,a0 as Tp,l as gt,a1 as Mn,a2 as xn,f as kn,E as De,w as W,x as V,y as k,B as Y,t as re,h as ie,a3 as Xr,a4 as ko,a5 as Yo,a6 as Qr,j as _t,a7 as Ye,a8 as cn,a9 as Wt,aa as ea,ab as Qn,ac as Xe,A as xe,ad as Rs,F as Z2,ae as ei,af as ta,ag as X2}from"../chunks/index-ef7ebca2.js";import{r as J2,d as Q2,w as eO}from"../chunks/index-c417fbcb.js";function tO(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Sp(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),n.push.apply(n,r)}return n}function Cp(t){for(var e=1;e1?this.getKeyIndex=this._getKeyIndexForMany:this.getKeyIndex=this._getKeyIndexForSingle,this.canTransformKey=typeof e.transformKey=="function",this.shouldCloneArguments=this.canTransformKey||n,this.shouldUpdateOnAdd=typeof e.onCacheAdd=="function",this.shouldUpdateOnChange=typeof e.onCacheChange=="function",this.shouldUpdateOnHit=typeof e.onCacheHit=="function"}return Object.defineProperty(t.prototype,"size",{get:function(){return this.keys.length},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"snapshot",{get:function(){return{keys:As(this.keys),size:this.size,values:As(this.values)}},enumerable:!0,configurable:!0}),t.prototype._getKeyIndexFromMatchingKey=function(e){var n=this.options,r=n.isMatchingKey,a=n.maxSize,s=this.keys,o=s.length;if(!o)return-1;if(r(s[0],e))return 0;if(a>1){for(var l=1;l1){for(var c=0;c1){for(var o=0;o=c&&(a.length=s.length=c)},t.prototype.updateAsyncCache=function(e){var n=this,r=this.options,a=r.onCacheChange,s=r.onCacheHit,o=this.keys[0],l=this.values[0];this.values[0]=l.then(function(c){return n.shouldUpdateOnHit&&s(n,n.options,e),n.shouldUpdateOnChange&&a(n,n.options,e),c},function(c){var h=n.getKeyIndex(o);throw h!==-1&&(n.keys.splice(h,1),n.values.splice(h,1)),c})},t}();function Hv(t,e){if(e===void 0&&(e={}),uO(t))return Hv(t.fn,Ep(t.options,e));if(typeof t!="function")throw new TypeError("You must pass a function to `memoize`.");var n=e.isEqual,r=n===void 0?oO:n,a=e.isMatchingKey,s=e.isPromise,o=s===void 0?!1:s,l=e.maxSize,c=l===void 0?1:l,h=e.onCacheAdd,p=e.onCacheChange,_=e.onCacheHit,v=e.transformKey,m=Ep({isEqual:r,isMatchingKey:a,isPromise:o,maxSize:c,onCacheAdd:h,onCacheChange:p,onCacheHit:_,transformKey:v},sO(e)),b=new lO(m),T=b.keys,I=b.values,S=b.canTransformKey,L=b.shouldCloneArguments,Z=b.shouldUpdateOnAdd,ne=b.shouldUpdateOnChange,B=b.shouldUpdateOnHit,ue=function H(){var se=L?As(arguments):arguments;S&&(se=v(se));var X=T.length?b.getKeyIndex(se):-1;if(X!==-1)B&&_(b,m,H),X&&(b.orderByLru(T[X],I[X],X),ne&&p(b,m,H));else{var $e=t.apply(this,arguments),ce=L?se:As(arguments);b.orderByLru(ce,$e,T.length),o&&b.updateAsyncCache(H),Z&&h(b,m,H),ne&&p(b,m,H)}return I[0]};return ue.cache=b,ue.fn=t,ue.isMemoized=!0,ue.options=m,ue}var fO=typeof WeakSet=="function",Ip=Object.keys;function Ls(t,e){return t===e||t!==t&&e!==e}function Pp(t){return t.constructor===Object||t.constructor==null}function Mp(t){return!!t&&typeof t.then=="function"}function xp(t){return!!(t&&t.$$typeof)}function cO(){var t=[];return{add:function(e){t.push(e)},has:function(e){return t.indexOf(e)!==-1}}}var hO=function(t){return t?function(){return new WeakSet}:cO}(fO);function Wv(t){return function(n){var r=t||n;return function(s,o,l){l===void 0&&(l=hO());var c=!!s&&typeof s=="object",h=!!o&&typeof o=="object";if(c||h){var p=c&&l.has(s),_=h&&l.has(o);if(p||_)return p&&_;c&&l.add(s),h&&l.add(o)}return r(s,o,l)}}}function pO(t,e,n,r){var a=t.length;if(e.length!==a)return!1;for(;a-- >0;)if(!n(t[a],e[a],r))return!1;return!0}function gO(t,e,n,r){var a=t.size===e.size;return a&&t.size&&t.forEach(function(s,o){a&&(a=!1,e.forEach(function(l,c){!a&&n(o,c,r)&&(a=n(s,l,r))}))}),a}var _O="_owner",vO=Function.prototype.bind.call(Function.prototype.call,Object.prototype.hasOwnProperty);function Rp(t,e,n,r){var a=Ip(t),s=a.length;if(Ip(e).length!==s)return!1;if(s)for(var o=void 0;s-- >0;){if(o=a[s],o===_O){var l=xp(t),c=xp(e);if((l||c)&&l!==c)return!1}if(!vO(e,o)||!n(t[o],e[o],r))return!1}return!0}function dO(t,e){return t.source===e.source&&t.global===e.global&&t.ignoreCase===e.ignoreCase&&t.multiline===e.multiline&&t.unicode===e.unicode&&t.sticky===e.sticky&&t.lastIndex===e.lastIndex}function $O(t,e,n,r){var a=t.size===e.size;return a&&t.size&&t.forEach(function(s){a&&(a=!1,e.forEach(function(o){a||(a=n(s,o,r))}))}),a}var mO=typeof Map=="function",yO=typeof Set=="function";function Ds(t){var e=typeof t=="function"?t(n):n;function n(r,a,s){if(r===a)return!0;if(r&&a&&typeof r=="object"&&typeof a=="object"){if(Pp(r)&&Pp(a))return Rp(r,a,e,s);var o=Array.isArray(r),l=Array.isArray(a);return o||l?o===l&&pO(r,a,e,s):(o=r instanceof Date,l=a instanceof Date,o||l?o===l&&Ls(r.getTime(),a.getTime()):(o=r instanceof RegExp,l=a instanceof RegExp,o||l?o===l&&dO(r,a):Mp(r)||Mp(a)?r===a:mO&&(o=r instanceof Map,l=a instanceof Map,o||l)?o===l&&gO(r,a,e,s):yO&&(o=r instanceof Set,l=a instanceof Set,o||l)?o===l&&$O(r,a,e,s):Rp(r,a,e,s)))}return r!==r&&a!==a}return n}var bO=Ds(),wO=Ds(function(){return Ls});Ds(Wv());Ds(Wv(Ls));function Xn(){return Xn=Object.assign||function(t){for(var e=1;e=0)&&(n[a]=t[a]);return n}var Wr={isDeepEqual:!1,isPromise:!1,isReact:!1,isSerialized:!1,isShallowEqual:!1,matchesArg:void 0,matchesKey:void 0,maxAge:void 0,maxArgs:void 0,maxSize:1,onExpire:void 0,profileName:void 0,serializer:void 0,updateCacheForKey:void 0,transformArgs:void 0,updateExpire:!1};function Ji(){for(var t=arguments.length,e=new Array(t),n=0;nI&&(h.keys.length=I,h.values.length=I),h.keys.unshift(b),h.values.unshift(l),p.isPromise&&h.updateAsyncCache(s),_&&_(h,p,s),v&&v(h,p,s)}else{var S=h.keys[T];h.values[T]=l,T>0&&h.orderByLru(S,l,T),p.isPromise&&h.updateAsyncCache(s),typeof v=="function"&&v(h,p,s)}},s.values=function(){return s.cacheSnapshot.values}}function DO(t,e){var n=e.expirations,r=e.options,a=e.originalFunction,s=t.options;Object.defineProperties(t,{_microMemoizeOptions:{configurable:!0,get:function(){return s}},cacheSnapshot:{configurable:!0,get:function(){var c=t.cache;return{keys:c.keys.slice(0),size:c.size,values:c.values.slice(0)}}},expirations:{configurable:!0,get:function(){return n}},expirationsSnapshot:{configurable:!0,get:function(){return n.slice(0)}},isMoized:{configurable:!0,get:function(){return!0}},options:{configurable:!0,get:function(){return r}},originalFunction:{configurable:!0,get:function(){return a}}});var o=t;Pl(a,o)}function FO(t,e){return LO(t,e),DO(t,e),t}var NO=typeof Symbol=="function"&&Symbol.for?Symbol.for("react.element"):60103;function BO(t,e,n){var r=t(Xn({maxArgs:2,isShallowEqual:!0},n,{isReact:!1}));e.displayName||(e.displayName=e.name||"Component");function a(s,o,l){this.props=s,this.context=o,this.updater=l,this.MoizedComponent=r(e)}return a.prototype.isReactComponent={},a.prototype.render=function(){return{$$typeof:NO,type:this.MoizedComponent,props:this.props,ref:null,key:null,_owner:null}},Pl(e,a,["contextType","contextTypes"]),a.displayName="Moized("+(e.displayName||e.name||"Component")+")",Yv(a,e.name,n.profileName),a}function jO(t){return function(e){if(t>=e.length)return e;if(t===0)return[];if(t===1)return[e[0]];if(t===2)return[e[0],e[1]];if(t===3)return[e[0],e[1],e[2]];for(var n=[],r=0;r=0?r.maxAge:Wr.maxAge,maxArgs:typeof r.maxArgs=="number"&&r.maxArgs>=0?r.maxArgs:Wr.maxArgs,maxSize:typeof r.maxSize=="number"&&r.maxSize>=0?r.maxSize:Wr.maxSize,profileName:r.profileName||MO(e)}),l=[];o.matchesArg,o.isDeepEqual;var c=o.isPromise;o.isReact,o.isSerialized,o.isShallowEqual,o.matchesKey,o.maxAge,o.maxArgs;var h=o.maxSize,p=o.onCacheAdd,_=o.onCacheChange,v=o.onCacheHit;o.onExpire,o.profileName,o.serializer;var m=o.updateCacheForKey;o.transformArgs,o.updateExpire;var b=AO(o,VO),T=HO(o),I=WO(o),S=CO(l,o,T,I),L=xO(o),Z=kO(o),ne=Xn({},b,{isEqual:T,isMatchingKey:I,isPromise:c,maxSize:h,onCacheAdd:Lo(Ji(p,S.onCacheAdd,L.onCacheAdd)),onCacheChange:Lo(_),onCacheHit:Lo(Ji(v,S.onCacheHit,L.onCacheHit)),transformKey:Z}),B=Hv(e,ne),ue=FO(B,{expirations:l,options:o,originalFunction:e});return m&&(ue=YO(ue)),Yv(ue,e.name,r.profileName),ue};_e.clearStats=Zv;_e.collectStats=EO;_e.compose=function(){return Sl.apply(void 0,arguments)||_e};_e.deep=_e({isDeepEqual:!0});_e.getStats=Il;_e.infinite=_e({maxSize:1/0});_e.isCollectingStats=function(){return Rt.isCollectingStats};_e.isMoized=function(e){return typeof e=="function"&&!!e.isMoized};_e.matchesArg=function(t){return _e({matchesArg:t})};_e.matchesKey=function(t){return _e({matchesKey:t})};function ZO(t,e){if(e===!0)return _e({maxAge:t,updateExpire:e});if(typeof e=="object"){var n=e.onExpire,r=e.updateExpire;return _e({maxAge:t,onExpire:n,updateExpire:r})}return _e(typeof e=="function"?{maxAge:t,onExpire:e,updateExpire:!0}:{maxAge:t})}_e.maxAge=ZO;_e.maxArgs=function(t){return _e({maxArgs:t})};_e.maxSize=function(t){return _e({maxSize:t})};_e.profile=function(t){return _e({profileName:t})};_e.promise=_e({isPromise:!0,updateExpire:!0});_e.react=_e({isReact:!0});_e.serialize=_e({isSerialized:!0});_e.serializeWith=function(t){return _e({isSerialized:!0,serializer:t})};_e.shallow=_e({isShallowEqual:!0});_e.transformArgs=function(t){return _e({transformArgs:t})};_e.updateCacheForKey=function(t){return _e({updateCacheForKey:t})};Object.defineProperty(_e,"default",{configurable:!1,enumerable:!1,value:_e,writable:!1});function XO(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Np(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),n.push.apply(n,r)}return n}function Bp(t){for(var e=1;e0){if(++e>=BT)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function KT(t){return function(){return t}}var GT=function(){try{var t=wr(Object,"defineProperty");return t({},"",{}),t}catch{}}(),Os=GT,zT=Os?function(t,e){return Os(t,"toString",{configurable:!0,enumerable:!1,value:KT(e),writable:!0})}:Rl,HT=zT,WT=qT(HT),kT=WT;function YT(t,e,n,r){for(var a=t.length,s=n+(r?1:-1);r?s--:++s-1}var QT=9007199254740991,eS=/^(?:0|[1-9]\d*)$/;function Dl(t,e){var n=typeof t;return e=e==null?QT:e,!!e&&(n=="number"||n!="symbol"&&eS.test(t))&&t>-1&&t%1==0&&t-1&&t%1==0&&t<=sS}function ti(t){return t!=null&&Fl(t.length)&&!Ll(t)}function uS(t,e,n){if(!er(n))return!1;var r=typeof e;return(r=="number"?ti(n)&&Dl(e,n.length):r=="string"&&e in n)?pa(n[e],t):!1}function oS(t){return td(function(e,n){var r=-1,a=n.length,s=a>1?n[a-1]:void 0,o=a>2?n[2]:void 0;for(s=t.length>3&&typeof s=="function"?(a--,s):void 0,o&&uS(n[0],n[1],o)&&(s=a<3?void 0:s,a=1),e=Object(e);++r-1}function OC(t,e){var n=this.__data__,r=Ns(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}function Fn(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e0&&n(l)?e>1?hd(l,e-1,n,r,a):cd(a,l):r||(a[a.length]=l)}return a}var KC=ud(Object.getPrototypeOf,Object),pd=KC,GC="[object Object]",zC=Function.prototype,HC=Object.prototype,gd=zC.toString,WC=HC.hasOwnProperty,kC=gd.call(Object);function YC(t){if(!Jn(t)||yr(t)!=GC)return!1;var e=pd(t);if(e===null)return!0;var n=WC.call(e,"constructor")&&e.constructor;return typeof n=="function"&&n instanceof n&&gd.call(n)==kC}function VC(){this.__data__=new Fn,this.size=0}function ZC(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}function XC(t){return this.__data__.get(t)}function JC(t){return this.__data__.has(t)}var QC=200;function eE(t,e){var n=this.__data__;if(n instanceof Fn){var r=n.__data__;if(!ia||r.lengthl))return!1;var h=s.get(t),p=s.get(e);if(h&&p)return h==e&&p==t;var _=-1,v=!0,m=n&EE?new aa:void 0;for(s.set(t,e),s.set(e,t);++_=yI&&(s=vd,o=!1,e=new aa(e));e:for(;++a-1&&t%1==0&&t-1&&t%1==0&&t<=SP}var Yl=CP,EP=ri,IP=Yl,PP=tr,MP="[object Arguments]",xP="[object Array]",RP="[object Boolean]",LP="[object Date]",DP="[object Error]",FP="[object Function]",NP="[object Map]",BP="[object Number]",jP="[object Object]",UP="[object RegExp]",qP="[object Set]",KP="[object String]",GP="[object WeakMap]",zP="[object ArrayBuffer]",HP="[object DataView]",WP="[object Float32Array]",kP="[object Float64Array]",YP="[object Int8Array]",VP="[object Int16Array]",ZP="[object Int32Array]",XP="[object Uint8Array]",JP="[object Uint8ClampedArray]",QP="[object Uint16Array]",e3="[object Uint32Array]",ze={};ze[WP]=ze[kP]=ze[YP]=ze[VP]=ze[ZP]=ze[XP]=ze[JP]=ze[QP]=ze[e3]=!0;ze[MP]=ze[xP]=ze[zP]=ze[RP]=ze[HP]=ze[LP]=ze[DP]=ze[FP]=ze[NP]=ze[BP]=ze[jP]=ze[UP]=ze[qP]=ze[KP]=ze[GP]=!1;function t3(t){return PP(t)&&IP(t.length)&&!!ze[EP(t)]}var n3=t3;function r3(t){return function(e){return t(e)}}var Vl=r3,ua={exports:{}};(function(t,e){var n=Td,r=e&&!e.nodeType&&e,a=r&&!0&&t&&!t.nodeType&&t,s=a&&a.exports===r,o=s&&n.process,l=function(){try{var c=a&&a.require&&a.require("util").types;return c||o&&o.binding&&o.binding("util")}catch{}}();t.exports=l})(ua,ua.exports);var i3=n3,a3=Vl,mg=ua.exports,yg=mg&&mg.isTypedArray,s3=yg?a3(yg):i3,Md=s3,u3=fP,o3=Wl,l3=Dt,f3=sa.exports,c3=kl,h3=Md,p3=Object.prototype,g3=p3.hasOwnProperty;function _3(t,e){var n=l3(t),r=!n&&o3(t),a=!n&&!r&&f3(t),s=!n&&!r&&!a&&h3(t),o=n||r||a||s,l=o?u3(t.length,String):[],c=l.length;for(var h in t)(e||g3.call(t,h))&&!(o&&(h=="length"||a&&(h=="offset"||h=="parent")||s&&(h=="buffer"||h=="byteLength"||h=="byteOffset")||c3(h,c)))&&l.push(h);return l}var xd=_3,v3=Object.prototype;function d3(t){var e=t&&t.constructor,n=typeof e=="function"&&e.prototype||v3;return t===n}var Zl=d3,$3=Cd,m3=$3(Object.keys,Object),y3=m3,b3=Zl,w3=y3,A3=Object.prototype,O3=A3.hasOwnProperty;function T3(t){if(!b3(t))return w3(t);var e=[];for(var n in Object(t))O3.call(t,n)&&n!="constructor"&&e.push(n);return e}var S3=T3;function C3(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var Ar=C3,E3=ri,I3=Ar,P3="[object AsyncFunction]",M3="[object Function]",x3="[object GeneratorFunction]",R3="[object Proxy]";function L3(t){if(!I3(t))return!1;var e=E3(t);return e==M3||e==x3||e==P3||e==R3}var Rd=L3,D3=Rd,F3=Yl;function N3(t){return t!=null&&F3(t.length)&&!D3(t)}var Us=N3,B3=xd,j3=S3,U3=Us;function q3(t){return U3(t)?B3(t):j3(t)}var ga=q3,K3=oP,G3=ga;function z3(t,e){return t&&K3(t,e,G3)}var Ld=z3,H3=Us;function W3(t,e){return function(n,r){if(n==null)return n;if(!H3(n))return t(n,r);for(var a=n.length,s=e?a:-1,o=Object(n);(e?s--:++s-1}var _M=gM,vM=qs;function dM(t,e){var n=this.__data__,r=vM(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}var $M=dM,mM=tM,yM=lM,bM=hM,wM=_M,AM=$M;function ii(t){var e=-1,n=t==null?0:t.length;for(this.clear();++el))return!1;var h=s.get(t),p=s.get(e);if(h&&p)return h==e&&p==t;var _=-1,v=!0,m=n&Dx?new Mx:void 0;for(s.set(t,e),s.set(e,t);++_a?0:a+e),n=n>a?a:n,n<0&&(n+=a),a=e>n?0:n-e>>>0,e>>>=0;for(var s=Array(a);++r0&&n(l)?e>1?r$(l,e-1,n,r,a):EN(a,l):r||(a[a.length]=l)}return a}var PN=r$,MN=PN;function xN(t){var e=t==null?0:t.length;return e?MN(t,1):[]}var RN=xN;function LN(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}var DN=LN,FN=DN,r_=Math.max;function NN(t,e,n){return e=r_(e===void 0?t.length-1:e,0),function(){for(var r=arguments,a=-1,s=r_(r.length-e,0),o=Array(s);++a0){if(++e>=HN)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}var VN=YN,ZN=zN,XN=VN,JN=XN(ZN),QN=JN,eB=RN,tB=BN,nB=QN;function rB(t){return nB(tB(t,void 0,eB),t+"")}var iB=rB,aB=Ws,sB=sN,uB=yN,oB=li,lB=va,fB=AN,cB=iB,hB=hf,pB=1,gB=2,_B=4,vB=cB(function(t,e){var n={};if(t==null)return n;var r=!1;e=aB(e,function(s){return s=oB(s,t),r||(r=s.length>1),s}),lB(t,hB(t),n),r&&(n=sB(n,pB|gB|_B,fB));for(var a=e.length;a--;)uB(n,e[a]);return n}),dB=vB;function $B(t){return t}function i$(t){var e=t;return function(){return e}}function a$(t){return Array.isArray(t)?t:Vd((""+t).split("."),function(e){return!e})}var Ne="@@updeep/placeholder";function Ys(t,e){var n=t.length;for(n>e&&(n=e);t[n-1]===Ne;)n-=1;return n}function on(t){return function e(n){var r=[].slice.call(arguments,1),a=r[0],s=r[1],o=Ys(arguments);return o>=1?t(n,a,s):e}}function sn(t){return function e(n,r){var a=[].slice.call(arguments,2),s=a[0],o=a[1],l=Ys(arguments,2);if(r===Ne||s===Ne||o===Ne)throw new Error("Can only use placeholder on first argument of this function.");return l>=2?n===Ne?on(function(c,h,p){return t(c,r,h,p)}):t(n,r,s,o):l===1?on(function(c,h,p){return t(n,c,h,p)}):e}}function Yi(t){return function e(n,r,a){var s=[].slice.call(arguments,3),o=s[0],l=s[1],c=Ys(arguments,3);if(a===Ne||o===Ne||l===Ne)throw new Error("Can only use placeholder on first or second argument of this function.");return c>=3?n===Ne?r===Ne?sn(function(h,p,_,v){return t(h,p,a,_,v)}):on(function(h,p,_){return t(h,r,a,p,_)}):r===Ne?on(function(h,p,_){return t(n,h,a,p,_)}):t(n,r,a,o,l):c===2?n===Ne?sn(function(h,p,_,v){return t(h,r,p,_,v)}):on(function(h,p,_){return t(n,r,h,p,_)}):c===1?sn(function(h,p,_,v){return t(n,h,p,_,v)}):e}}function mB(t){return function e(n,r,a,s){var o=[].slice.call(arguments,4),l=o[0],c=o[1],h=Ys(arguments,4);if(s===Ne||l===Ne||c===Ne)throw new Error("Can only use placeholder on first, second or third argument of this function.");return h>=4?n===Ne?r===Ne?a===Ne?Yi(function(p,_,v,m,b){return t(p,_,v,s,m,b)}):sn(function(p,_,v,m){return t(p,_,a,s,v,m)}):a===Ne?sn(function(p,_,v,m){return t(p,r,_,s,v,m)}):on(function(p,_,v){return t(p,r,a,s,_,v)}):r===Ne?a===Ne?sn(function(p,_,v,m){return t(n,p,_,s,v,m)}):on(function(p,_,v){return t(n,p,a,s,_,v)}):a===Ne?on(function(p,_,v){return t(n,r,p,s,_,v)}):t(n,r,a,s,l,c):h===3?n===Ne?r===Ne?Yi(function(p,_,v,m,b){return t(p,_,a,v,m,b)}):sn(function(p,_,v,m){return t(p,r,a,_,v,m)}):r===Ne?sn(function(p,_,v,m){return t(n,p,a,_,v,m)}):on(function(p,_,v){return t(n,r,a,p,_,v)}):h===2?n===Ne?Yi(function(p,_,v,m,b){return t(p,r,_,v,m,b)}):sn(function(p,_,v,m){return t(n,r,p,_,v,m)}):h===1?Yi(function(p,_,v,m,b){return t(n,p,_,v,m,b)}):e}}function da(t,e){return e===void 0&&(e=t.length),[t,on,sn,Yi,mB][e](t)}var yB=da(function(t,e,n){for(var r=a$(t),a=n,s=0;s0)throw new Error("can't have subduxes on a dux which state is not an object");if(Object.keys(e).length===1&&e["*"])return t;const n=Dn(e,({initial:r},a)=>a==="*"?[]:r);return ct(t,n)}function RB(t={},e={}){const n=Object.assign({},t);return Object.values(e).forEach(({actions:r})=>{!r||Object.entries(r).forEach(([a,s])=>{if(n[a]){if(n[a]===s)return;throw new Error(`trying to merge two different actions ${a}`)}n[a]=s})}),n}function LB(t,e={},n={}){const r=Od(n,({selectors:s},o)=>s?o==="*"?{}:Dn(s,l=>c=>l(c[o])):{});let a={};for(const s in e)a[s]=o=>(...l)=>{const c=e[s](o)(...l);return nl(()=>c,Dn(n["*"].selectors,p=>()=>p(c)))};return nl({},...r,t,a)}function a_(t,e,n){let r=function(...a){const s={type:t};return e?s.payload=e(...a):a[0]!==void 0&&(s.payload=a[0]),s};if(n){const a=r;r=(...s)=>n(a(...s),s)}return r.type=t,r}function DB(t,e,n={},r=void 0){const a=Object.keys(n).length>0?Dn(n,({upreducer:o})=>o):null,s=o=>l=>{if(!(o!=null&&o.type))throw new Error("upreducer called with a bad action");let c=l!=null?l:t;if(a)if(n["*"])c=ct.updateIn("*",n["*"].upreducer(o),c);else{const p=Dn(a,_=>_(o));c=ct(p,c)}const h=e[o.type]||e["+"];return h?h(o.payload,o)(c):c};return r?r(s):s}const FB=(t,e)=>n=>r=>a=>t!=="*"&&a.type!==t?r(a):e(n)(r)(a),NB=(t,e)=>n=>{const r=()=>Kl(n.getState(),t);return e(Object.assign(Object.assign({},n),{getState:r}))};function fl(t,e,n){const r=()=>t.getState(),a=s=>t.dispatch(s);return Object.assign(r,Dn(n,s=>(...o)=>{let l=s(t.getState());return typeof l=="function"?l(...o):l})),Object.assign(a,Dn(e,s=>(...o)=>t.dispatch(s(...o)))),Object.assign(Object.assign({},t),{getState:r,dispatch:a,actions:e,selectors:n})}const f$=(t,e,n)=>{let r=t,a="*";return Array.isArray(t)&&(a=t[0],r=t[1],r=FB(a,r)),s=>r(fl(s,e,n))},BB=t=>e=>n=>t.reduceRight((r,a)=>a(e)(r),n);function jB(t=[],e={},n={},r={},a=void 0,s=void 0){let o=Od(r,({middleware:h},p)=>p!=="*"&&h?NB(p,h):void 0).filter(h=>h),c=[...t.map(h=>f$(h,e,n)),...o];return a&&(c=a(c,s)),BB(c)}var st=globalThis&&globalThis.__classPrivateFieldSet||function(t,e,n,r,a){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!a)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!a:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?a.call(t,n):a?a.value=n:e.set(t,n),n},Se=globalThis&&globalThis.__classPrivateFieldGet||function(t,e,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(t):r?r.value:e.get(t)},ys,Mt,vr,kr,dr,Yr,Yn,Vr,Vi,bs,Zi,cl,hl,pl,gl,_l;class ot{constructor(e){var n,r,a,s,o;if(ys.set(this,{}),Mt.set(this,{}),vr.set(this,{}),kr.set(this,{}),dr.set(this,{}),Yr.set(this,[]),Yn.set(this,[]),Vr.set(this,void 0),Vi.set(this,void 0),bs.set(this,void 0),Zi.set(this,void 0),cl.set(this,_e(xB)),hl.set(this,_e(RB)),pl.set(this,_e(LB)),gl.set(this,_e(DB)),_l.set(this,_e(jB)),st(this,ys,(n=e.initial)!==null&&n!==void 0?n:{},"f"),st(this,Mt,(r=e.subduxes)!==null&&r!==void 0?r:{},"f"),e.subduxes&&st(this,Mt,Dn(e.subduxes,l=>l instanceof ot?l:new ot(l)),"f"),e.actions)for(const[l,c]of Object.entries(e.actions))if(typeof c=="function"&&c.type)Se(this,vr,"f")[l]=c;else{const h=Array.isArray(c)?c:[c];Se(this,vr,"f")[l]=a_(l,...h)}st(this,kr,(a=e.selectors)!==null&&a!==void 0?a:{},"f"),st(this,Vr,e.mappedSelectors,"f"),st(this,dr,(s=e.mutations)!==null&&s!==void 0?s:{},"f"),Object.keys(Se(this,dr,"f")).filter(l=>l!=="+").filter(l=>!this.actions.hasOwnProperty(l)).forEach(l=>{throw new Error(`action '${l}' is not defined`)}),e.effects&&st(this,Yr,Object.entries(e.effects),"f"),st(this,Yn,(o=e.reactions)!==null&&o!==void 0?o:[],"f"),st(this,Vi,e.mappedReaction,"f"),st(this,bs,e.upreducerWrapper,"f"),st(this,Zi,e.middlewareWrapper,"f")}setMappedSelector(e,n){st(this,Vr,Object.assign(Object.assign({},Se(this,Vr,"f")),{[e]:n}),"f")}get middleware(){return Se(this,_l,"f").call(this,Se(this,Yr,"f"),this.actions,this.selectors,Se(this,Mt,"f"),Se(this,Zi,"f"),this)}setMiddlewareWrapper(e){st(this,Zi,e,"f")}get initial(){return Se(this,cl,"f").call(this,Se(this,ys,"f"),Se(this,Mt,"f"))}get actions(){return Se(this,hl,"f").call(this,Se(this,vr,"f"),Se(this,Mt,"f"))}get selectors(){return Se(this,pl,"f").call(this,Se(this,kr,"f"),Se(this,Vr,"f"),Se(this,Mt,"f"))}get subduxes(){return Se(this,Mt,"f")}get upreducer(){return Se(this,gl,"f").call(this,this.initial,Se(this,dr,"f"),Se(this,Mt,"f"),Se(this,bs,"f"))}get reducer(){return(e,n)=>this.upreducer(n)(e)}addSubscription(e){st(this,Yn,[...Se(this,Yn,"f"),e],"f")}addReaction(e){st(this,Yn,[...Se(this,Yn,"f"),e],"f")}setAction(e,n){const r=a_(e,n);return st(this,vr,Object.assign(Object.assign({},Se(this,vr,"f")),{[e]:r}),"f"),r}setSelector(e,n){return st(this,kr,Object.assign(Object.assign({},Se(this,kr,"f")),{[e]:n}),"f"),n}setMutation(e,n){return typeof e=="function"&&(e=e.type),st(this,dr,Object.assign(Object.assign({},Se(this,dr,"f")),{[e]:n}),"f"),n}addEffect(e,n){return st(this,Yr,[...Se(this,Yr,"f"),[e,n]],"f"),n}augmentMiddlewareApi(e){return fl(e,this.actions,this.selectors)}splatSubscriber(e,n,r){const a={};return()=>(s,o,l)=>{const c=Object.keys(a),h=gg(Object.keys(s),c);for(const _ of h){let v=Object.assign(Object.assign({},e),{getState:()=>e.getState()[_]});a[_]=[],typeof r=="function"&&(v=Object.assign(Object.assign({},v),r(v,_)));const{unsub:m,subscriber:b,subscriberRaw:T}=n.subscribeAll(v);a[_].push({unsub:m,subscriber:b,subscriberRaw:T}),b()}const p=gg(c,Object.keys(s));for(const _ of p){for(const v of a[_])v.subscriber(),v.unsub();delete a[_]}}}subscribeTo(e,n,r=[]){const a=fl(Object.assign(Object.assign({},e),{subscribe:p=>this.subscribeTo(e,()=>p)}),this.actions,this.selectors),s=n(a,...r);let o;const l=()=>{const p=e.getState();if(p===o)return;let _=o;o=p,s(p,_,h)};let c=e.subscribe(l);const h=typeof c=="function"?c:c.unsub;return{unsub:h,subscriber:l,subscriberRaw:s}}subscribeAll(e){let n=Se(this,Yn,"f").map(r=>this.subscribeTo(e,r));for(const r in Se(this,Mt,"f"))if(r!=="*"){const a=Object.assign(Object.assign({},e),{getState:()=>Kl(e.getState(),r)});n.push(Se(this,Mt,"f")[r].subscribeAll(a))}return Se(this,Vi,"f")&&n.push(this.subscribeTo(e,this.splatSubscriber(e,Se(this,Mt,"f")["*"],Se(this,Vi,"f")))),{unsub:()=>n.forEach(({unsub:r})=>r()),subscriber:()=>n.forEach(({subscriber:r})=>r()),subscriberRaw:(...r)=>n.forEach(({subscriberRaw:a})=>a(...r))}}createStore(e,n){const r=(n!=null?n:eT)(this.middleware),a=Xv(this.reducer,e!=null?e:this.initial,r);a.actions=this.actions,a.selectors=this.selectors,nl(a.getState,Dn(this.selectors,s=>(...o)=>{let l=s(a.getState());return typeof l=="function"?l(...o):l}));for(const s in this.actions)a.dispatch[s]=(...o)=>a.dispatch(this.actions[s](...o));return this.subscribeAll(a),a}effectToMiddleware(e){return f$(e,this.actions,this.selectors)}}ys=new WeakMap,Mt=new WeakMap,vr=new WeakMap,kr=new WeakMap,dr=new WeakMap,Yr=new WeakMap,Yn=new WeakMap,Vr=new WeakMap,Vi=new WeakMap,bs=new WeakMap,Zi=new WeakMap,cl=new WeakMap,hl=new WeakMap,pl=new WeakMap,gl=new WeakMap,_l=new WeakMap;function UB(t,e){for(var n=-1,r=t==null?0:t.length,a=0,s=[];++n-1&&t%1==0&&t-1&&t%1==0&&t<=Ij}var vf=Pj,Mj=pi,xj=vf,Rj=nr,Lj="[object Arguments]",Dj="[object Array]",Fj="[object Boolean]",Nj="[object Date]",Bj="[object Error]",jj="[object Function]",Uj="[object Map]",qj="[object Number]",Kj="[object Object]",Gj="[object RegExp]",zj="[object Set]",Hj="[object String]",Wj="[object WeakMap]",kj="[object ArrayBuffer]",Yj="[object DataView]",Vj="[object Float32Array]",Zj="[object Float64Array]",Xj="[object Int8Array]",Jj="[object Int16Array]",Qj="[object Int32Array]",eU="[object Uint8Array]",tU="[object Uint8ClampedArray]",nU="[object Uint16Array]",rU="[object Uint32Array]",He={};He[Vj]=He[Zj]=He[Xj]=He[Jj]=He[Qj]=He[eU]=He[tU]=He[nU]=He[rU]=!0;He[Lj]=He[Dj]=He[kj]=He[Fj]=He[Yj]=He[Nj]=He[Bj]=He[jj]=He[Uj]=He[qj]=He[Kj]=He[Gj]=He[zj]=He[Hj]=He[Wj]=!1;function iU(t){return Rj(t)&&xj(t.length)&&!!He[Mj(t)]}var aU=iU;function sU(t){return function(e){return t(e)}}var df=sU,la={exports:{}};(function(t,e){var n=h$,r=e&&!e.nodeType&&e,a=r&&!0&&t&&!t.nodeType&&t,s=a&&a.exports===r,o=s&&n.process,l=function(){try{var c=a&&a.require&&a.require("util").types;return c||o&&o.binding&&o.binding("util")}catch{}}();t.exports=l})(la,la.exports);var uU=aU,oU=df,f_=la.exports,c_=f_&&f_.isTypedArray,lU=c_?oU(c_):uU,_$=lU,fU=kB,cU=gf,hU=Ft,pU=oa.exports,gU=_f,_U=_$,vU=Object.prototype,dU=vU.hasOwnProperty;function $U(t,e){var n=hU(t),r=!n&&cU(t),a=!n&&!r&&pU(t),s=!n&&!r&&!a&&_U(t),o=n||r||a||s,l=o?fU(t.length,String):[],c=l.length;for(var h in t)(e||dU.call(t,h))&&!(o&&(h=="length"||a&&(h=="offset"||h=="parent")||s&&(h=="buffer"||h=="byteLength"||h=="byteOffset")||gU(h,c)))&&l.push(h);return l}var v$=$U,mU=Object.prototype;function yU(t){var e=t&&t.constructor,n=typeof e=="function"&&e.prototype||mU;return t===n}var $f=yU;function bU(t,e){return function(n){return t(e(n))}}var d$=bU,wU=d$,AU=wU(Object.keys,Object),OU=AU,TU=$f,SU=OU,CU=Object.prototype,EU=CU.hasOwnProperty;function IU(t){if(!TU(t))return SU(t);var e=[];for(var n in Object(t))EU.call(t,n)&&n!="constructor"&&e.push(n);return e}var PU=IU;function MU(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var Sr=MU,xU=pi,RU=Sr,LU="[object AsyncFunction]",DU="[object Function]",FU="[object GeneratorFunction]",NU="[object Proxy]";function BU(t){if(!RU(t))return!1;var e=xU(t);return e==DU||e==FU||e==LU||e==NU}var $$=BU,jU=$$,UU=vf;function qU(t){return t!=null&&UU(t.length)&&!jU(t)}var Vs=qU,KU=v$,GU=PU,zU=Vs;function HU(t){return zU(t)?KU(t):GU(t)}var $a=HU,WU=HB,kU=$a;function YU(t,e){return t&&WU(t,e,kU)}var m$=YU,VU=Vs;function ZU(t,e){return function(n,r){if(n==null)return n;if(!VU(n))return t(n,r);for(var a=n.length,s=e?a:-1,o=Object(n);(e?s--:++s-1}var mq=$q,yq=Zs;function bq(t,e){var n=this.__data__,r=yq(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}var wq=bq,Aq=aq,Oq=pq,Tq=vq,Sq=mq,Cq=wq;function gi(t){var e=-1,n=t==null?0:t.length;for(this.clear();++el))return!1;var h=s.get(t),p=s.get(e);if(h&&p)return h==e&&p==t;var _=-1,v=!0,m=n&jK?new DK:void 0;for(s.set(t,e),s.set(e,t);++_a?0:a+e),n=n>a?a:n,n<0&&(n+=a),a=e>n?0:n-e>>>0,e>>>=0;for(var s=Array(a);++r0&&n(l)?e>1?z$(l,e-1,n,r,a):GV(a,l):r||(a[a.length]=l)}return a}var HV=z$,WV=HV;function kV(t){var e=t==null?0:t.length;return e?WV(t,1):[]}var YV=kV;function VV(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}var ZV=VV,XV=ZV,Y_=Math.max;function JV(t,e,n){return e=Y_(e===void 0?t.length-1:e,0),function(){for(var r=arguments,a=-1,s=Y_(r.length-e,0),o=Array(s);++a0){if(++e>=sZ)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}var fZ=lZ,cZ=aZ,hZ=fZ,pZ=hZ(cZ),gZ=pZ,_Z=YV,vZ=QV,dZ=gZ;function $Z(t){return dZ(vZ(t,void 0,_Z),t+"")}var mZ=$Z,yZ=tu,bZ=bV,wZ=DV,AZ=mi,OZ=ya,TZ=BV,SZ=mZ,CZ=Lf,EZ=1,IZ=2,PZ=4,MZ=SZ(function(t,e){var n={};if(t==null)return n;var r=!1;e=yZ(e,function(s){return s=AZ(s,t),r||(r=s.length>1),s}),OZ(t,CZ(t),n),r&&(n=bZ(n,EZ|IZ|PZ,TZ));for(var a=e.length;a--;)wZ(n,e[a]);return n}),xZ=MZ;function RZ(t){return t}function H$(t){var e=t;return function(){return e}}function W$(t){return Array.isArray(t)?t:L$((""+t).split("."),function(e){return!e})}var Be="@@updeep/placeholder";function ru(t,e){var n=t.length;for(n>e&&(n=e);t[n-1]===Be;)n-=1;return n}function ln(t){return function e(n){var r=[].slice.call(arguments,1),a=r[0],s=r[1],o=ru(arguments);return o>=1?t(n,a,s):e}}function un(t){return function e(n,r){var a=[].slice.call(arguments,2),s=a[0],o=a[1],l=ru(arguments,2);if(r===Be||s===Be||o===Be)throw new Error("Can only use placeholder on first argument of this function.");return l>=2?n===Be?ln(function(c,h,p){return t(c,r,h,p)}):t(n,r,s,o):l===1?ln(function(c,h,p){return t(n,c,h,p)}):e}}function Xi(t){return function e(n,r,a){var s=[].slice.call(arguments,3),o=s[0],l=s[1],c=ru(arguments,3);if(a===Be||o===Be||l===Be)throw new Error("Can only use placeholder on first or second argument of this function.");return c>=3?n===Be?r===Be?un(function(h,p,_,v){return t(h,p,a,_,v)}):ln(function(h,p,_){return t(h,r,a,p,_)}):r===Be?ln(function(h,p,_){return t(n,h,a,p,_)}):t(n,r,a,o,l):c===2?n===Be?un(function(h,p,_,v){return t(h,r,p,_,v)}):ln(function(h,p,_){return t(n,r,h,p,_)}):c===1?un(function(h,p,_,v){return t(n,h,p,_,v)}):e}}function LZ(t){return function e(n,r,a,s){var o=[].slice.call(arguments,4),l=o[0],c=o[1],h=ru(arguments,4);if(s===Be||l===Be||c===Be)throw new Error("Can only use placeholder on first, second or third argument of this function.");return h>=4?n===Be?r===Be?a===Be?Xi(function(p,_,v,m,b){return t(p,_,v,s,m,b)}):un(function(p,_,v,m){return t(p,_,a,s,v,m)}):a===Be?un(function(p,_,v,m){return t(p,r,_,s,v,m)}):ln(function(p,_,v){return t(p,r,a,s,_,v)}):r===Be?a===Be?un(function(p,_,v,m){return t(n,p,_,s,v,m)}):ln(function(p,_,v){return t(n,p,a,s,_,v)}):a===Be?ln(function(p,_,v){return t(n,r,p,s,_,v)}):t(n,r,a,s,l,c):h===3?n===Be?r===Be?Xi(function(p,_,v,m,b){return t(p,_,a,v,m,b)}):un(function(p,_,v,m){return t(p,r,a,_,v,m)}):r===Be?un(function(p,_,v,m){return t(n,p,a,_,v,m)}):ln(function(p,_,v){return t(n,r,a,p,_,v)}):h===2?n===Be?Xi(function(p,_,v,m,b){return t(p,r,_,v,m,b)}):un(function(p,_,v,m){return t(n,r,p,_,v,m)}):h===1?Xi(function(p,_,v,m,b){return t(n,p,_,v,m,b)}):e}}function ba(t,e){return e===void 0&&(e=t.length),[t,ln,un,Xi,LZ][e](t)}var DZ=ba(function(t,e,n){for(var r=W$(t),a=n,s=0;s-1){var h=n[c];return c>0&&(n.splice(c,1),n.unshift(h)),h.value}return Is}function a(l,c){r(l)===Is&&(n.unshift({key:l,value:c}),n.length>t&&n.pop())}function s(){return n}function o(){n=[]}return{get:r,put:a,getEntries:s,clear:o}}var VZ=function(e,n){return e===n};function ZZ(t){return function(n,r){if(n===null||r===null||n.length!==r.length)return!1;for(var a=n.length,s=0;s1?e-1:0),r=1;rCe(t));Nf.setMutation("setDriveReqs",t=>Ce({reqs:t}));const eX=t=>Ff([e=>e.reqs.mass,e=>e.propulsion.drive.rating,e=>e.propulsion.drive.advanced],(e,n,r)=>t.dispatch.setDriveReqs(tX(e,n,r)));function tX(t,e,n=!1){const r=Math.ceil(e*.05*t),a=r*(n?3:2);return{mass:r,cost:a}}const Bf=new ot({subduxes:{reqs:rr},initial:{type:"none"},actions:{setFtl:null,setFtlReqs:null}});Bf.setMutation("setFtl",t=>Ce({type:t}));Bf.setMutation("setFtlReqs",t=>Ce({reqs:t}));function nX(t,e){if(t==="none")return{cost:0,mass:0};const n=Math.ceil(e/10);return{mass:n,cost:n*(t==="advanced"?3:2)}}const rX=t=>Ff([e=>e.propulsion.ftl.type,e=>e.reqs.mass],(e,n)=>t.dispatch.setFtlReqs(nX(e,n))),iX=new ot({subduxes:{drive:Nf,ftl:Bf}});var Al={exports:{}};/** * @license * Lodash * Copyright OpenJS Foundation and other contributors * Released under MIT license * Based on Underscore.js 1.8.3 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors */(function(t,e){(function(){var n,r="4.17.21",a=200,s="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",o="Expected a function",l="Invalid `variable` option passed into `_.template`",c="__lodash_hash_undefined__",h=500,p="__lodash_placeholder__",_=1,v=2,m=4,b=1,T=2,I=1,S=2,L=4,Z=8,ne=16,B=32,ue=64,H=128,se=256,X=512,$e=30,ce="...",Re=800,Je=16,rt=1,Nt=2,yn=3,At=1/0,Yt=9007199254740991,wa=17976931348623157e292,ir=0/0,tn=4294967295,n1=tn-1,r1=tn>>>1,i1=[["ary",H],["bind",I],["bindKey",S],["curry",Z],["curryRight",ne],["flip",X],["partial",B],["partialRight",ue],["rearg",se]],Pr="[object Arguments]",Aa="[object Array]",a1="[object AsyncFunction]",wi="[object Boolean]",Ai="[object Date]",s1="[object DOMException]",Oa="[object Error]",Ta="[object Function]",Gf="[object GeneratorFunction]",Vt="[object Map]",Oi="[object Number]",u1="[object Null]",bn="[object Object]",zf="[object Promise]",o1="[object Proxy]",Ti="[object RegExp]",Zt="[object Set]",Si="[object String]",Sa="[object Symbol]",l1="[object Undefined]",Ci="[object WeakMap]",f1="[object WeakSet]",Ei="[object ArrayBuffer]",Mr="[object DataView]",fu="[object Float32Array]",cu="[object Float64Array]",hu="[object Int8Array]",pu="[object Int16Array]",gu="[object Int32Array]",_u="[object Uint8Array]",vu="[object Uint8ClampedArray]",du="[object Uint16Array]",$u="[object Uint32Array]",c1=/\b__p \+= '';/g,h1=/\b(__p \+=) '' \+/g,p1=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Hf=/&(?:amp|lt|gt|quot|#39);/g,Wf=/[&<>"']/g,g1=RegExp(Hf.source),_1=RegExp(Wf.source),v1=/<%-([\s\S]+?)%>/g,d1=/<%([\s\S]+?)%>/g,kf=/<%=([\s\S]+?)%>/g,$1=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,m1=/^\w*$/,y1=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,mu=/[\\^$.*+?()[\]{}|]/g,b1=RegExp(mu.source),yu=/^\s+/,w1=/\s/,A1=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,O1=/\{\n\/\* \[wrapped with (.+)\] \*/,T1=/,? & /,S1=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,C1=/[()=,{}\[\]\/\s]/,E1=/\\(\\)?/g,I1=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Yf=/\w*$/,P1=/^[-+]0x[0-9a-f]+$/i,M1=/^0b[01]+$/i,x1=/^\[object .+?Constructor\]$/,R1=/^0o[0-7]+$/i,L1=/^(?:0|[1-9]\d*)$/,D1=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ca=/($^)/,F1=/['\n\r\u2028\u2029\\]/g,Ea="\\ud800-\\udfff",N1="\\u0300-\\u036f",B1="\\ufe20-\\ufe2f",j1="\\u20d0-\\u20ff",Vf=N1+B1+j1,Zf="\\u2700-\\u27bf",Xf="a-z\\xdf-\\xf6\\xf8-\\xff",U1="\\xac\\xb1\\xd7\\xf7",q1="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",K1="\\u2000-\\u206f",G1=" \\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",Jf="A-Z\\xc0-\\xd6\\xd8-\\xde",Qf="\\ufe0e\\ufe0f",ec=U1+q1+K1+G1,bu="['\u2019]",z1="["+Ea+"]",tc="["+ec+"]",Ia="["+Vf+"]",nc="\\d+",H1="["+Zf+"]",rc="["+Xf+"]",ic="[^"+Ea+ec+nc+Zf+Xf+Jf+"]",wu="\\ud83c[\\udffb-\\udfff]",W1="(?:"+Ia+"|"+wu+")",ac="[^"+Ea+"]",Au="(?:\\ud83c[\\udde6-\\uddff]){2}",Ou="[\\ud800-\\udbff][\\udc00-\\udfff]",xr="["+Jf+"]",sc="\\u200d",uc="(?:"+rc+"|"+ic+")",k1="(?:"+xr+"|"+ic+")",oc="(?:"+bu+"(?:d|ll|m|re|s|t|ve))?",lc="(?:"+bu+"(?:D|LL|M|RE|S|T|VE))?",fc=W1+"?",cc="["+Qf+"]?",Y1="(?:"+sc+"(?:"+[ac,Au,Ou].join("|")+")"+cc+fc+")*",V1="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Z1="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",hc=cc+fc+Y1,X1="(?:"+[H1,Au,Ou].join("|")+")"+hc,J1="(?:"+[ac+Ia+"?",Ia,Au,Ou,z1].join("|")+")",Q1=RegExp(bu,"g"),em=RegExp(Ia,"g"),Tu=RegExp(wu+"(?="+wu+")|"+J1+hc,"g"),tm=RegExp([xr+"?"+rc+"+"+oc+"(?="+[tc,xr,"$"].join("|")+")",k1+"+"+lc+"(?="+[tc,xr+uc,"$"].join("|")+")",xr+"?"+uc+"+"+oc,xr+"+"+lc,Z1,V1,nc,X1].join("|"),"g"),nm=RegExp("["+sc+Ea+Vf+Qf+"]"),rm=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,im=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],am=-1,Ke={};Ke[fu]=Ke[cu]=Ke[hu]=Ke[pu]=Ke[gu]=Ke[_u]=Ke[vu]=Ke[du]=Ke[$u]=!0,Ke[Pr]=Ke[Aa]=Ke[Ei]=Ke[wi]=Ke[Mr]=Ke[Ai]=Ke[Oa]=Ke[Ta]=Ke[Vt]=Ke[Oi]=Ke[bn]=Ke[Ti]=Ke[Zt]=Ke[Si]=Ke[Ci]=!1;var je={};je[Pr]=je[Aa]=je[Ei]=je[Mr]=je[wi]=je[Ai]=je[fu]=je[cu]=je[hu]=je[pu]=je[gu]=je[Vt]=je[Oi]=je[bn]=je[Ti]=je[Zt]=je[Si]=je[Sa]=je[_u]=je[vu]=je[du]=je[$u]=!0,je[Oa]=je[Ta]=je[Ci]=!1;var sm={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},um={"&":"&","<":"<",">":">",'"':""","'":"'"},om={"&":"&","<":"<",">":">",""":'"',"'":"'"},lm={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},fm=parseFloat,cm=parseInt,pc=typeof xt=="object"&&xt&&xt.Object===Object&&xt,hm=typeof self=="object"&&self&&self.Object===Object&&self,lt=pc||hm||Function("return this")(),Su=e&&!e.nodeType&&e,ar=Su&&!0&&t&&!t.nodeType&&t,gc=ar&&ar.exports===Su,Cu=gc&&pc.process,Bt=function(){try{var C=ar&&ar.require&&ar.require("util").types;return C||Cu&&Cu.binding&&Cu.binding("util")}catch{}}(),_c=Bt&&Bt.isArrayBuffer,vc=Bt&&Bt.isDate,dc=Bt&&Bt.isMap,$c=Bt&&Bt.isRegExp,mc=Bt&&Bt.isSet,yc=Bt&&Bt.isTypedArray;function Ot(C,N,x){switch(x.length){case 0:return C.call(N);case 1:return C.call(N,x[0]);case 2:return C.call(N,x[0],x[1]);case 3:return C.call(N,x[0],x[1],x[2])}return C.apply(N,x)}function pm(C,N,x,te){for(var ve=-1,Ie=C==null?0:C.length;++ve-1}function Eu(C,N,x){for(var te=-1,ve=C==null?0:C.length;++te-1;);return x}function Ec(C,N){for(var x=C.length;x--&&Rr(N,C[x],0)>-1;);return x}function wm(C,N){for(var x=C.length,te=0;x--;)C[x]===N&&++te;return te}var Am=xu(sm),Om=xu(um);function Tm(C){return"\\"+lm[C]}function Sm(C,N){return C==null?n:C[N]}function Lr(C){return nm.test(C)}function Cm(C){return rm.test(C)}function Em(C){for(var N,x=[];!(N=C.next()).done;)x.push(N.value);return x}function Fu(C){var N=-1,x=Array(C.size);return C.forEach(function(te,ve){x[++N]=[ve,te]}),x}function Ic(C,N){return function(x){return C(N(x))}}function Un(C,N){for(var x=-1,te=C.length,ve=0,Ie=[];++x-1}function _y(i,u){var f=this.__data__,g=ka(f,i);return g<0?(++this.size,f.push([i,u])):f[g][1]=u,this}wn.prototype.clear=cy,wn.prototype.delete=hy,wn.prototype.get=py,wn.prototype.has=gy,wn.prototype.set=_y;function An(i){var u=-1,f=i==null?0:i.length;for(this.clear();++u=u?i:u)),i}function Kt(i,u,f,g,d,y){var A,O=u&_,P=u&v,U=u&m;if(f&&(A=d?f(i,g,d,y):f(i)),A!==n)return A;if(!Ve(i))return i;var q=de(i);if(q){if(A=m0(i),!O)return mt(i,A)}else{var z=pt(i),J=z==Ta||z==Gf;if(Wn(i))return ch(i,O);if(z==bn||z==Pr||J&&!d){if(A=P||J?{}:Ph(i),!O)return P?o0(i,My(A,i)):u0(i,qc(A,i))}else{if(!je[z])return d?i:{};A=y0(i,z,O)}}y||(y=new Jt);var ae=y.get(i);if(ae)return ae;y.set(i,A),ap(i)?i.forEach(function(ge){A.add(Kt(ge,u,f,ge,i,y))}):rp(i)&&i.forEach(function(ge,Ae){A.set(Ae,Kt(ge,u,f,Ae,i,y))});var pe=U?P?oo:uo:P?bt:ut,be=q?n:pe(i);return jt(be||i,function(ge,Ae){be&&(Ae=ge,ge=i[Ae]),Di(A,Ae,Kt(ge,u,f,Ae,i,y))}),A}function xy(i){var u=ut(i);return function(f){return Kc(f,i,u)}}function Kc(i,u,f){var g=f.length;if(i==null)return!g;for(i=Fe(i);g--;){var d=f[g],y=u[d],A=i[d];if(A===n&&!(d in i)||!y(A))return!1}return!0}function Gc(i,u,f){if(typeof i!="function")throw new Ut(o);return Ki(function(){i.apply(n,f)},u)}function Fi(i,u,f,g){var d=-1,y=Pa,A=!0,O=i.length,P=[],U=u.length;if(!O)return P;f&&(u=We(u,Tt(f))),g?(y=Eu,A=!1):u.length>=a&&(y=Ii,A=!1,u=new or(u));e:for(;++dd?0:d+f),g=g===n||g>d?d:ye(g),g<0&&(g+=d),g=f>g?0:up(g);f0&&f(O)?u>1?ft(O,u-1,f,g,d):jn(d,O):g||(d[d.length]=O)}return d}var Gu=dh(),Wc=dh(!0);function nn(i,u){return i&&Gu(i,u,ut)}function zu(i,u){return i&&Wc(i,u,ut)}function Va(i,u){return Bn(u,function(f){return En(i[f])})}function fr(i,u){u=zn(u,i);for(var f=0,g=u.length;i!=null&&fu}function Dy(i,u){return i!=null&&Le.call(i,u)}function Fy(i,u){return i!=null&&u in Fe(i)}function Ny(i,u,f){return i>=ht(u,f)&&i=120&&q.length>=120)?new or(A&&q):n}q=i[0];var z=-1,J=O[0];e:for(;++z-1;)O!==i&&Ua.call(O,P,1),Ua.call(i,P,1);return i}function rh(i,u){for(var f=i?u.length:0,g=f-1;f--;){var d=u[f];if(f==g||d!==y){var y=d;Cn(d)?Ua.call(i,d,1):eo(i,d)}}return i}function Xu(i,u){return i+Ga(Nc()*(u-i+1))}function Zy(i,u,f,g){for(var d=-1,y=at(Ka((u-i)/(f||1)),0),A=x(y);y--;)A[g?y:++d]=i,i+=f;return A}function Ju(i,u){var f="";if(!i||u<1||u>Yt)return f;do u%2&&(f+=i),u=Ga(u/2),u&&(i+=i);while(u);return f}function we(i,u){return _o(Rh(i,u,wt),i+"")}function Xy(i){return Uc(Hr(i))}function Jy(i,u){var f=Hr(i);return ss(f,lr(u,0,f.length))}function ji(i,u,f,g){if(!Ve(i))return i;u=zn(u,i);for(var d=-1,y=u.length,A=y-1,O=i;O!=null&&++dd?0:d+u),f=f>d?d:f,f<0&&(f+=d),d=u>f?0:f-u>>>0,u>>>=0;for(var y=x(d);++g>>1,A=i[y];A!==null&&!Ct(A)&&(f?A<=u:A=a){var U=u?null:h0(i);if(U)return xa(U);A=!1,d=Ii,P=new or}else P=u?[]:O;e:for(;++g=g?i:Gt(i,u,f)}var fh=Gm||function(i){return lt.clearTimeout(i)};function ch(i,u){if(u)return i.slice();var f=i.length,g=xc?xc(f):new i.constructor(f);return i.copy(g),g}function io(i){var u=new i.constructor(i.byteLength);return new Ba(u).set(new Ba(i)),u}function r0(i,u){var f=u?io(i.buffer):i.buffer;return new i.constructor(f,i.byteOffset,i.byteLength)}function i0(i){var u=new i.constructor(i.source,Yf.exec(i));return u.lastIndex=i.lastIndex,u}function a0(i){return Li?Fe(Li.call(i)):{}}function hh(i,u){var f=u?io(i.buffer):i.buffer;return new i.constructor(f,i.byteOffset,i.length)}function ph(i,u){if(i!==u){var f=i!==n,g=i===null,d=i===i,y=Ct(i),A=u!==n,O=u===null,P=u===u,U=Ct(u);if(!O&&!U&&!y&&i>u||y&&A&&P&&!O&&!U||g&&A&&P||!f&&P||!d)return 1;if(!g&&!y&&!U&&i=O)return P;var U=f[g];return P*(U=="desc"?-1:1)}}return i.index-u.index}function gh(i,u,f,g){for(var d=-1,y=i.length,A=f.length,O=-1,P=u.length,U=at(y-A,0),q=x(P+U),z=!g;++O1?f[d-1]:n,A=d>2?f[2]:n;for(y=i.length>3&&typeof y=="function"?(d--,y):n,A&&dt(f[0],f[1],A)&&(y=d<3?n:y,d=1),u=Fe(u);++g-1?d[y?u[A]:A]:n}}function yh(i){return Sn(function(u){var f=u.length,g=f,d=qt.prototype.thru;for(i&&u.reverse();g--;){var y=u[g];if(typeof y!="function")throw new Ut(o);if(d&&!A&&is(y)=="wrapper")var A=new qt([],!0)}for(g=A?g:f;++g1&&Te.reverse(),q&&PO))return!1;var U=y.get(i),q=y.get(u);if(U&&q)return U==u&&q==i;var z=-1,J=!0,ae=f&T?new or:n;for(y.set(i,u),y.set(u,i);++z1?"& ":"")+u[g],u=u.join(f>2?", ":" "),i.replace(A1,`{ /* [wrapped with `+u+`] */ `)}function w0(i){return de(i)||pr(i)||!!(Dc&&i&&i[Dc])}function Cn(i,u){var f=typeof i;return u=u==null?Yt:u,!!u&&(f=="number"||f!="symbol"&&L1.test(i))&&i>-1&&i%1==0&&i0){if(++u>=Re)return arguments[0]}else u=0;return i.apply(n,arguments)}}function ss(i,u){var f=-1,g=i.length,d=g-1;for(u=u===n?g:u;++f1?i[u-1]:n;return f=typeof f=="function"?(i.pop(),f):n,Hh(i,f)});function Wh(i){var u=$(i);return u.__chain__=!0,u}function Rb(i,u){return u(i),i}function us(i,u){return u(i)}var Lb=Sn(function(i){var u=i.length,f=u?i[0]:0,g=this.__wrapped__,d=function(y){return Ku(y,i)};return u>1||this.__actions__.length||!(g instanceof Oe)||!Cn(f)?this.thru(d):(g=g.slice(f,+f+(u?1:0)),g.__actions__.push({func:us,args:[d],thisArg:n}),new qt(g,this.__chain__).thru(function(y){return u&&!y.length&&y.push(n),y}))});function Db(){return Wh(this)}function Fb(){return new qt(this.value(),this.__chain__)}function Nb(){this.__values__===n&&(this.__values__=sp(this.value()));var i=this.__index__>=this.__values__.length,u=i?n:this.__values__[this.__index__++];return{done:i,value:u}}function Bb(){return this}function jb(i){for(var u,f=this;f instanceof Wa;){var g=jh(f);g.__index__=0,g.__values__=n,u?d.__wrapped__=g:u=g;var d=g;f=f.__wrapped__}return d.__wrapped__=i,u}function Ub(){var i=this.__wrapped__;if(i instanceof Oe){var u=i;return this.__actions__.length&&(u=new Oe(this)),u=u.reverse(),u.__actions__.push({func:us,args:[vo],thisArg:n}),new qt(u,this.__chain__)}return this.thru(vo)}function qb(){return oh(this.__wrapped__,this.__actions__)}var Kb=Qa(function(i,u,f){Le.call(i,f)?++i[f]:On(i,f,1)});function Gb(i,u,f){var g=de(i)?bc:Ry;return f&&dt(i,u,f)&&(u=n),g(i,he(u,3))}function zb(i,u){var f=de(i)?Bn:Hc;return f(i,he(u,3))}var Hb=mh(Uh),Wb=mh(qh);function kb(i,u){return ft(os(i,u),1)}function Yb(i,u){return ft(os(i,u),At)}function Vb(i,u,f){return f=f===n?1:ye(f),ft(os(i,u),f)}function kh(i,u){var f=de(i)?jt:Kn;return f(i,he(u,3))}function Yh(i,u){var f=de(i)?gm:zc;return f(i,he(u,3))}var Zb=Qa(function(i,u,f){Le.call(i,f)?i[f].push(u):On(i,f,[u])});function Xb(i,u,f,g){i=yt(i)?i:Hr(i),f=f&&!g?ye(f):0;var d=i.length;return f<0&&(f=at(d+f,0)),ps(i)?f<=d&&i.indexOf(u,f)>-1:!!d&&Rr(i,u,f)>-1}var Jb=we(function(i,u,f){var g=-1,d=typeof u=="function",y=yt(i)?x(i.length):[];return Kn(i,function(A){y[++g]=d?Ot(u,A,f):Ni(A,u,f)}),y}),Qb=Qa(function(i,u,f){On(i,f,u)});function os(i,u){var f=de(i)?We:Xc;return f(i,he(u,3))}function ew(i,u,f,g){return i==null?[]:(de(u)||(u=u==null?[]:[u]),f=g?n:f,de(f)||(f=f==null?[]:[f]),th(i,u,f))}var tw=Qa(function(i,u,f){i[f?0:1].push(u)},function(){return[[],[]]});function nw(i,u,f){var g=de(i)?Iu:Tc,d=arguments.length<3;return g(i,he(u,4),f,d,Kn)}function rw(i,u,f){var g=de(i)?_m:Tc,d=arguments.length<3;return g(i,he(u,4),f,d,zc)}function iw(i,u){var f=de(i)?Bn:Hc;return f(i,cs(he(u,3)))}function aw(i){var u=de(i)?Uc:Xy;return u(i)}function sw(i,u,f){(f?dt(i,u,f):u===n)?u=1:u=ye(u);var g=de(i)?Ey:Jy;return g(i,u)}function uw(i){var u=de(i)?Iy:e0;return u(i)}function ow(i){if(i==null)return 0;if(yt(i))return ps(i)?Dr(i):i.length;var u=pt(i);return u==Vt||u==Zt?i.size:Yu(i).length}function lw(i,u,f){var g=de(i)?Pu:t0;return f&&dt(i,u,f)&&(u=n),g(i,he(u,3))}var fw=we(function(i,u){if(i==null)return[];var f=u.length;return f>1&&dt(i,u[0],u[1])?u=[]:f>2&&dt(u[0],u[1],u[2])&&(u=[u[0]]),th(i,ft(u,1),[])}),ls=zm||function(){return lt.Date.now()};function cw(i,u){if(typeof u!="function")throw new Ut(o);return i=ye(i),function(){if(--i<1)return u.apply(this,arguments)}}function Vh(i,u,f){return u=f?n:u,u=i&&u==null?i.length:u,Tn(i,H,n,n,n,n,u)}function Zh(i,u){var f;if(typeof u!="function")throw new Ut(o);return i=ye(i),function(){return--i>0&&(f=u.apply(this,arguments)),i<=1&&(u=n),f}}var mo=we(function(i,u,f){var g=I;if(f.length){var d=Un(f,Gr(mo));g|=B}return Tn(i,g,u,f,d)}),Xh=we(function(i,u,f){var g=I|S;if(f.length){var d=Un(f,Gr(Xh));g|=B}return Tn(u,g,i,f,d)});function Jh(i,u,f){u=f?n:u;var g=Tn(i,Z,n,n,n,n,n,u);return g.placeholder=Jh.placeholder,g}function Qh(i,u,f){u=f?n:u;var g=Tn(i,ne,n,n,n,n,n,u);return g.placeholder=Qh.placeholder,g}function ep(i,u,f){var g,d,y,A,O,P,U=0,q=!1,z=!1,J=!0;if(typeof i!="function")throw new Ut(o);u=Ht(u)||0,Ve(f)&&(q=!!f.leading,z="maxWait"in f,y=z?at(Ht(f.maxWait)||0,u):y,J="trailing"in f?!!f.trailing:J);function ae(et){var en=g,Pn=d;return g=d=n,U=et,A=i.apply(Pn,en),A}function pe(et){return U=et,O=Ki(Ae,u),q?ae(et):A}function be(et){var en=et-P,Pn=et-U,mp=u-en;return z?ht(mp,y-Pn):mp}function ge(et){var en=et-P,Pn=et-U;return P===n||en>=u||en<0||z&&Pn>=y}function Ae(){var et=ls();if(ge(et))return Te(et);O=Ki(Ae,be(et))}function Te(et){return O=n,J&&g?ae(et):(g=d=n,A)}function Et(){O!==n&&fh(O),U=0,g=P=d=O=n}function $t(){return O===n?A:Te(ls())}function It(){var et=ls(),en=ge(et);if(g=arguments,d=this,P=et,en){if(O===n)return pe(P);if(z)return fh(O),O=Ki(Ae,u),ae(P)}return O===n&&(O=Ki(Ae,u)),A}return It.cancel=Et,It.flush=$t,It}var hw=we(function(i,u){return Gc(i,1,u)}),pw=we(function(i,u,f){return Gc(i,Ht(u)||0,f)});function gw(i){return Tn(i,X)}function fs(i,u){if(typeof i!="function"||u!=null&&typeof u!="function")throw new Ut(o);var f=function(){var g=arguments,d=u?u.apply(this,g):g[0],y=f.cache;if(y.has(d))return y.get(d);var A=i.apply(this,g);return f.cache=y.set(d,A)||y,A};return f.cache=new(fs.Cache||An),f}fs.Cache=An;function cs(i){if(typeof i!="function")throw new Ut(o);return function(){var u=arguments;switch(u.length){case 0:return!i.call(this);case 1:return!i.call(this,u[0]);case 2:return!i.call(this,u[0],u[1]);case 3:return!i.call(this,u[0],u[1],u[2])}return!i.apply(this,u)}}function _w(i){return Zh(2,i)}var vw=n0(function(i,u){u=u.length==1&&de(u[0])?We(u[0],Tt(he())):We(ft(u,1),Tt(he()));var f=u.length;return we(function(g){for(var d=-1,y=ht(g.length,f);++d=u}),pr=Yc(function(){return arguments}())?Yc:function(i){return Ze(i)&&Le.call(i,"callee")&&!Lc.call(i,"callee")},de=x.isArray,Mw=_c?Tt(_c):jy;function yt(i){return i!=null&&hs(i.length)&&!En(i)}function Qe(i){return Ze(i)&&yt(i)}function xw(i){return i===!0||i===!1||Ze(i)&&vt(i)==wi}var Wn=Wm||Mo,Rw=vc?Tt(vc):Uy;function Lw(i){return Ze(i)&&i.nodeType===1&&!Gi(i)}function Dw(i){if(i==null)return!0;if(yt(i)&&(de(i)||typeof i=="string"||typeof i.splice=="function"||Wn(i)||zr(i)||pr(i)))return!i.length;var u=pt(i);if(u==Vt||u==Zt)return!i.size;if(qi(i))return!Yu(i).length;for(var f in i)if(Le.call(i,f))return!1;return!0}function Fw(i,u){return Bi(i,u)}function Nw(i,u,f){f=typeof f=="function"?f:n;var g=f?f(i,u):n;return g===n?Bi(i,u,n,f):!!g}function bo(i){if(!Ze(i))return!1;var u=vt(i);return u==Oa||u==s1||typeof i.message=="string"&&typeof i.name=="string"&&!Gi(i)}function Bw(i){return typeof i=="number"&&Fc(i)}function En(i){if(!Ve(i))return!1;var u=vt(i);return u==Ta||u==Gf||u==a1||u==o1}function np(i){return typeof i=="number"&&i==ye(i)}function hs(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=Yt}function Ve(i){var u=typeof i;return i!=null&&(u=="object"||u=="function")}function Ze(i){return i!=null&&typeof i=="object"}var rp=dc?Tt(dc):Ky;function jw(i,u){return i===u||ku(i,u,fo(u))}function Uw(i,u,f){return f=typeof f=="function"?f:n,ku(i,u,fo(u),f)}function qw(i){return ip(i)&&i!=+i}function Kw(i){if(T0(i))throw new ve(s);return Vc(i)}function Gw(i){return i===null}function zw(i){return i==null}function ip(i){return typeof i=="number"||Ze(i)&&vt(i)==Oi}function Gi(i){if(!Ze(i)||vt(i)!=bn)return!1;var u=ja(i);if(u===null)return!0;var f=Le.call(u,"constructor")&&u.constructor;return typeof f=="function"&&f instanceof f&&Da.call(f)==Um}var wo=$c?Tt($c):Gy;function Hw(i){return np(i)&&i>=-Yt&&i<=Yt}var ap=mc?Tt(mc):zy;function ps(i){return typeof i=="string"||!de(i)&&Ze(i)&&vt(i)==Si}function Ct(i){return typeof i=="symbol"||Ze(i)&&vt(i)==Sa}var zr=yc?Tt(yc):Hy;function Ww(i){return i===n}function kw(i){return Ze(i)&&pt(i)==Ci}function Yw(i){return Ze(i)&&vt(i)==f1}var Vw=rs(Vu),Zw=rs(function(i,u){return i<=u});function sp(i){if(!i)return[];if(yt(i))return ps(i)?Xt(i):mt(i);if(Pi&&i[Pi])return Em(i[Pi]());var u=pt(i),f=u==Vt?Fu:u==Zt?xa:Hr;return f(i)}function In(i){if(!i)return i===0?i:0;if(i=Ht(i),i===At||i===-At){var u=i<0?-1:1;return u*wa}return i===i?i:0}function ye(i){var u=In(i),f=u%1;return u===u?f?u-f:u:0}function up(i){return i?lr(ye(i),0,tn):0}function Ht(i){if(typeof i=="number")return i;if(Ct(i))return ir;if(Ve(i)){var u=typeof i.valueOf=="function"?i.valueOf():i;i=Ve(u)?u+"":u}if(typeof i!="string")return i===0?i:+i;i=Sc(i);var f=M1.test(i);return f||R1.test(i)?cm(i.slice(2),f?2:8):P1.test(i)?ir:+i}function op(i){return rn(i,bt(i))}function Xw(i){return i?lr(ye(i),-Yt,Yt):i===0?i:0}function Me(i){return i==null?"":St(i)}var Jw=qr(function(i,u){if(qi(u)||yt(u)){rn(u,ut(u),i);return}for(var f in u)Le.call(u,f)&&Di(i,f,u[f])}),lp=qr(function(i,u){rn(u,bt(u),i)}),gs=qr(function(i,u,f,g){rn(u,bt(u),i,g)}),Qw=qr(function(i,u,f,g){rn(u,ut(u),i,g)}),eA=Sn(Ku);function tA(i,u){var f=Ur(i);return u==null?f:qc(f,u)}var nA=we(function(i,u){i=Fe(i);var f=-1,g=u.length,d=g>2?u[2]:n;for(d&&dt(u[0],u[1],d)&&(g=1);++f1),y}),rn(i,oo(i),f),g&&(f=Kt(f,_|v|m,p0));for(var d=u.length;d--;)eo(f,u[d]);return f});function yA(i,u){return cp(i,cs(he(u)))}var bA=Sn(function(i,u){return i==null?{}:Yy(i,u)});function cp(i,u){if(i==null)return{};var f=We(oo(i),function(g){return[g]});return u=he(u),nh(i,f,function(g,d){return u(g,d[0])})}function wA(i,u,f){u=zn(u,i);var g=-1,d=u.length;for(d||(d=1,i=n);++gu){var g=i;i=u,u=g}if(f||i%1||u%1){var d=Nc();return ht(i+d*(u-i+fm("1e-"+((d+"").length-1))),u)}return Xu(i,u)}var RA=Kr(function(i,u,f){return u=u.toLowerCase(),i+(f?gp(u):u)});function gp(i){return To(Me(i).toLowerCase())}function _p(i){return i=Me(i),i&&i.replace(D1,Am).replace(em,"")}function LA(i,u,f){i=Me(i),u=St(u);var g=i.length;f=f===n?g:lr(ye(f),0,g);var d=f;return f-=u.length,f>=0&&i.slice(f,d)==u}function DA(i){return i=Me(i),i&&_1.test(i)?i.replace(Wf,Om):i}function FA(i){return i=Me(i),i&&b1.test(i)?i.replace(mu,"\\$&"):i}var NA=Kr(function(i,u,f){return i+(f?"-":"")+u.toLowerCase()}),BA=Kr(function(i,u,f){return i+(f?" ":"")+u.toLowerCase()}),jA=$h("toLowerCase");function UA(i,u,f){i=Me(i),u=ye(u);var g=u?Dr(i):0;if(!u||g>=u)return i;var d=(u-g)/2;return ns(Ga(d),f)+i+ns(Ka(d),f)}function qA(i,u,f){i=Me(i),u=ye(u);var g=u?Dr(i):0;return u&&g>>0,f?(i=Me(i),i&&(typeof u=="string"||u!=null&&!wo(u))&&(u=St(u),!u&&Lr(i))?Hn(Xt(i),0,f):i.split(u,f)):[]}var YA=Kr(function(i,u,f){return i+(f?" ":"")+To(u)});function VA(i,u,f){return i=Me(i),f=f==null?0:lr(ye(f),0,i.length),u=St(u),i.slice(f,f+u.length)==u}function ZA(i,u,f){var g=$.templateSettings;f&&dt(i,u,f)&&(u=n),i=Me(i),u=gs({},u,g,Th);var d=gs({},u.imports,g.imports,Th),y=ut(d),A=Du(d,y),O,P,U=0,q=u.interpolate||Ca,z="__p += '",J=Nu((u.escape||Ca).source+"|"+q.source+"|"+(q===kf?I1:Ca).source+"|"+(u.evaluate||Ca).source+"|$","g"),ae="//# sourceURL="+(Le.call(u,"sourceURL")?(u.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++am+"]")+` `;i.replace(J,function(ge,Ae,Te,Et,$t,It){return Te||(Te=Et),z+=i.slice(U,It).replace(F1,Tm),Ae&&(O=!0,z+=`' + __e(`+Ae+`) + '`),$t&&(P=!0,z+=`'; `+$t+`; __p += '`),Te&&(z+=`' + ((__t = (`+Te+`)) == null ? '' : __t) + '`),U=It+ge.length,ge}),z+=`'; `;var pe=Le.call(u,"variable")&&u.variable;if(!pe)z=`with (obj) { `+z+` } `;else if(C1.test(pe))throw new ve(l);z=(P?z.replace(c1,""):z).replace(h1,"$1").replace(p1,"$1;"),z="function("+(pe||"obj")+`) { `+(pe?"":`obj || (obj = {}); `)+"var __t, __p = ''"+(O?", __e = _.escape":"")+(P?`, __j = Array.prototype.join; function print() { __p += __j.call(arguments, '') } `:`; `)+z+`return __p }`;var be=dp(function(){return Ie(y,ae+"return "+z).apply(n,A)});if(be.source=z,bo(be))throw be;return be}function XA(i){return Me(i).toLowerCase()}function JA(i){return Me(i).toUpperCase()}function QA(i,u,f){if(i=Me(i),i&&(f||u===n))return Sc(i);if(!i||!(u=St(u)))return i;var g=Xt(i),d=Xt(u),y=Cc(g,d),A=Ec(g,d)+1;return Hn(g,y,A).join("")}function e2(i,u,f){if(i=Me(i),i&&(f||u===n))return i.slice(0,Pc(i)+1);if(!i||!(u=St(u)))return i;var g=Xt(i),d=Ec(g,Xt(u))+1;return Hn(g,0,d).join("")}function t2(i,u,f){if(i=Me(i),i&&(f||u===n))return i.replace(yu,"");if(!i||!(u=St(u)))return i;var g=Xt(i),d=Cc(g,Xt(u));return Hn(g,d).join("")}function n2(i,u){var f=$e,g=ce;if(Ve(u)){var d="separator"in u?u.separator:d;f="length"in u?ye(u.length):f,g="omission"in u?St(u.omission):g}i=Me(i);var y=i.length;if(Lr(i)){var A=Xt(i);y=A.length}if(f>=y)return i;var O=f-Dr(g);if(O<1)return g;var P=A?Hn(A,0,O).join(""):i.slice(0,O);if(d===n)return P+g;if(A&&(O+=P.length-O),wo(d)){if(i.slice(O).search(d)){var U,q=P;for(d.global||(d=Nu(d.source,Me(Yf.exec(d))+"g")),d.lastIndex=0;U=d.exec(q);)var z=U.index;P=P.slice(0,z===n?O:z)}}else if(i.indexOf(St(d),O)!=O){var J=P.lastIndexOf(d);J>-1&&(P=P.slice(0,J))}return P+g}function r2(i){return i=Me(i),i&&g1.test(i)?i.replace(Hf,xm):i}var i2=Kr(function(i,u,f){return i+(f?" ":"")+u.toUpperCase()}),To=$h("toUpperCase");function vp(i,u,f){return i=Me(i),u=f?n:u,u===n?Cm(i)?Dm(i):$m(i):i.match(u)||[]}var dp=we(function(i,u){try{return Ot(i,n,u)}catch(f){return bo(f)?f:new ve(f)}}),a2=Sn(function(i,u){return jt(u,function(f){f=an(f),On(i,f,mo(i[f],i))}),i});function s2(i){var u=i==null?0:i.length,f=he();return i=u?We(i,function(g){if(typeof g[1]!="function")throw new Ut(o);return[f(g[0]),g[1]]}):[],we(function(g){for(var d=-1;++dYt)return[];var f=tn,g=ht(i,tn);u=he(u),i-=tn;for(var d=Lu(g,u);++f0||u<0)?new Oe(f):(i<0?f=f.takeRight(-i):i&&(f=f.drop(i)),u!==n&&(u=ye(u),f=u<0?f.dropRight(-u):f.take(u-i)),f)},Oe.prototype.takeRightWhile=function(i){return this.reverse().takeWhile(i).reverse()},Oe.prototype.toArray=function(){return this.take(tn)},nn(Oe.prototype,function(i,u){var f=/^(?:filter|find|map|reject)|While$/.test(u),g=/^(?:head|last)$/.test(u),d=$[g?"take"+(u=="last"?"Right":""):u],y=g||/^find/.test(u);!d||($.prototype[u]=function(){var A=this.__wrapped__,O=g?[1]:arguments,P=A instanceof Oe,U=O[0],q=P||de(A),z=function(Ae){var Te=d.apply($,jn([Ae],O));return g&&J?Te[0]:Te};q&&f&&typeof U=="function"&&U.length!=1&&(P=q=!1);var J=this.__chain__,ae=!!this.__actions__.length,pe=y&&!J,be=P&&!ae;if(!y&&q){A=be?A:new Oe(this);var ge=i.apply(A,O);return ge.__actions__.push({func:us,args:[z],thisArg:n}),new qt(ge,J)}return pe&&be?i.apply(this,O):(ge=this.thru(z),pe?g?ge.value()[0]:ge.value():ge)})}),jt(["pop","push","shift","sort","splice","unshift"],function(i){var u=Ra[i],f=/^(?:push|sort|unshift)$/.test(i)?"tap":"thru",g=/^(?:pop|shift)$/.test(i);$.prototype[i]=function(){var d=arguments;if(g&&!this.__chain__){var y=this.value();return u.apply(de(y)?y:[],d)}return this[f](function(A){return u.apply(de(A)?A:[],d)})}}),nn(Oe.prototype,function(i,u){var f=$[u];if(f){var g=f.name+"";Le.call(jr,g)||(jr[g]=[]),jr[g].push({name:u,func:f})}}),jr[es(n,S).name]=[{name:"wrapper",func:n}],Oe.prototype.clone=ry,Oe.prototype.reverse=iy,Oe.prototype.value=ay,$.prototype.at=Lb,$.prototype.chain=Db,$.prototype.commit=Fb,$.prototype.next=Nb,$.prototype.plant=jb,$.prototype.reverse=Ub,$.prototype.toJSON=$.prototype.valueOf=$.prototype.value=qb,$.prototype.first=$.prototype.head,Pi&&($.prototype[Pi]=Bb),$},Fr=Fm();ar?((ar.exports=Fr)._=Fr,Su._=Fr):lt._=Fr}).call(xt)})(Al,Al.exports);var aX=Al.exports;const iu=new ot({subduxes:{reqs:rr},initial:{bays:0,squadrons:[]},actions:{setCarrierBays:null,setSquadronType:null}});iu.setMutation("setCarrierBays",t=>Ce({bays:t,reqs:oX(t),squadrons:uX(t)}));iu.setMutation("setSquadronType",({type:t,id:e})=>n=>Ce.updateIn(["squadrons",e-1],{type:t,reqs:sX(t)},n));const Ps=[{type:"standard",cost:3},{type:"fast",cost:4},{type:"heavy",cost:5},{type:"interceptor",cost:3},{type:"attack",cost:4},{type:"long range",cost:4},{type:"torpedo",cost:6}];function sX(t){var e;return{mass:6,cost:6*((e=Ps.find(n=>n.type===t))==null?void 0:e.cost)}}const uX=t=>e=>(e.length>t&&(e=e.slice(0,t)),e.length({type:Ps[0].type,reqs:{cost:6*Ps[0].cost,mass:6}}))]),e);function oX(t){return{mass:9*t,cost:18*t}}const au=new ot({actions:{setShipType:null,setShipClass:null,setCarrierBays:iu.actions.setCarrierBays},initial:{shipType:"",shipClass:"",isCarrier:!1,mass:10}});au.setMutation("setShipType",t=>Ce({shipType:t}));au.setMutation("setShipClass",t=>Ce({shipClass:t}));au.setMutation("setCarrierBays",t=>Ce({isCarrier:t>0}));const jf=new ot({subduxes:{reqs:rr},initial:{rating:0,min:0,max:0},actions:{setShipMass:null,setHull:null}});jf.setMutation("setHull",t=>Ce({rating:t,reqs:{mass:t,cost:2*t}}));jf.setMutation("setShipMass",t=>e=>{let{rating:n}=e;n>t&&(n=t);const r=Math.ceil(t/10);return nCe(t));Uf.setMutation("setScreensReqs",t=>Ce({reqs:t}));const lX=t=>Ff(e=>e.reqs.mass,e=>e.structure.screens.standard,e=>e.structure.screens.advanced,(...e)=>t.dispatch.setScreensReqs(fX(...e)));function fX(t,e,n){const r=e*Math.max(3,Math.ceil(.05*t)),a=n*Math.max(4,Math.ceil(.075*t));return{mass:r+a,cost:3*r+4*a}}const X$=new ot({subduxes:{reqs:rr},initial:{space:0},actions:{setCargo:null}});X$.setMutation("setCargo",t=>Ce({space:t,reqs:{mass:t}}));const qf=new ot({subduxes:{reqs:rr},initial:{layers:[]},actions:{setArmorLayers:null,setArmorRating:null}});qf.setMutation("setArmorRating",({layer:t,rating:e})=>n=>{let r=[...n.layers].map((a,s)=>s===t-1?e:a);return{layers:r,reqs:J$(r)}});qf.setMutation("setArmorLayers",t=>e=>{let n=[...e.layers];for(tr+a,0),n=2*t.map((r,a)=>r*(a+1)).reduce((r,a)=>r+a,0);return{mass:e,cost:n}}const Q$=new ot({subduxes:{reqs:rr},initial:{type:"none"},actions:{setStreamlining:null}});Q$.setMutation("setStreamlining",({shipMass:t,type:e})=>Ce({type:e,reqs:cX({shipMass:t,type:e})}));function cX({shipMass:t,type:e}){const n=Math.ceil(t*(e==="none"?0:e==="partial"?5:10)/100);return{mass:n,cost:2*n}}const hX=new ot({subduxes:{hull:jf,screens:Uf,cargo:X$,streamlining:Q$,armor:qf}}),fa=[{name:"beam",type:"beam",reqs:pX,initial:{weaponClass:1}},{name:"submunition pack",type:"submunition",reqs:{mass:1,cost:3},initial:{arc:"F"}},{name:"point defence system",type:"pds",reqs:{mass:1,cost:3},initial:{}},{name:"scattergun",type:"scattergun",reqs:{mass:1,cost:4},initial:{}},{name:"needle weapon",type:"needle",reqs:{mass:2,cost:6},initial:{arc:"F"}}],su=new ot({initial:[],actions:{addWeapon:null,removeWeapon:null,setWeapon:null}});su.setMutation("setWeapon",n=>{var r=n,{id:t}=r,e=Op(r,["id"]);return a=>(console.log(t,e,a),a=Ce.map(Ce.if(s=>s.id===t,s=>Ap(zi({id:t},e),{reqs:e1(e)})),a),console.log(a),a)});su.setMutation("removeWeapon",t=>e=>[...e.filter(n=>n.id!==t)]);su.setMutation("addWeapon",t=>e=>{const n=fa.find(r=>r.type===t).initial;return[...e,zi({id:e.length===0?1:e[e.length-1]+1,type:t,reqs:e1(zi({type:t},n))},n)]});function e1(t){const{reqs:e}=fa.find(n=>n.type===t.type)||{};return e?typeof e=="function"?e(t):e:{}}const Z_=t=>t.length!==4?!1:!t.some(e=>e.length===1);function pX({weaponClass:t,arcs:e}){console.log({weaponClass:t,arcs:e});let n;return t===1&&(n=1),t===2&&(n=2+(e.length>3?1:0)),t==3&&(n=4,Z_(e)?n+=2:n+=e.length-1),t==4&&(n=8,Z_(e)?n+=4:n+=2*(e.length-1)),{mass:n,cost:3*n}}const X_={cost:0,mass:0},Kf=new ot({subduxes:{weapons:su},initial:{firecons:{stations:0,reqs:X_},adfc:{rating:0,reqs:X_}},actions:{setADFC:null,setFirecons:null}});Kf.setMutation("setFirecons",t=>Ce({firecons:{stations:t,reqs:{cost:4*t,mass:t}}}));Kf.setMutation("setADFC",t=>Ce({adfc:{rating:t,reqs:{cost:8*t,mass:2*t}}}));const Ir=new ot({subduxes:{identification:au,propulsion:iX,structure:hX,carrier:iu,weaponry:Kf},initial:{reqs:{cost:0,mass:10,usedMass:0}},actions:{setShipReqs:null}});Ir.setMutation("setShipMass",t=>Ce({reqs:{mass:t}}));Ir.setMutation("setShipReqs",t=>Ce({reqs:t}));Ir.addReaction(eX);Ir.addReaction(rX);Ir.addReaction(lX);Ir.addReaction(t=>e=>{let n=0,r=0,a=Object.values(e);for(;a.length>0;){const s=a.shift();typeof s=="object"&&(s.reqs&&(n+=s.reqs.cost,r+=s.reqs.mass),a.push(...Object.values(s)))}t.dispatch.setShipReqs({cost:n,usedMass:r})});let t1=zv;t1=window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__;var gX=()=>{const t=Ir.createStore(void 0,r=>t1(rO(r)));let e;const n=J2(t.getState(),r=>{t.subscribe(()=>{e!==t.getState()&&(e=t.getState(),r(e))})});return{dispatch:t.dispatch,state:n,shipMass:Q2(n,r=>r.reqs.mass)}};function uu(){const t=k2();return e=>{const n=Object.keys(t.$$.callbacks),r=[];return n.forEach(a=>r.push(Pe(e,a,s=>Tl(t,s)))),{destroy:()=>{r.forEach(a=>a())}}}}const _X=t=>({}),J_=t=>({}),vX=t=>({}),Q_=t=>({});function ev(t){let e,n;const r=t[4].header,a=vn(r,t,t[3],Q_);return{c(){e=D("header"),a&&a.c()},l(s){e=F(s,"HEADER",{});var o=j(e);a&&a.l(o),o.forEach(w)},m(s,o){R(s,e,o),a&&a.m(e,null),n=!0},p(s,o){a&&a.p&&(!n||o&8)&&pn(a,r,s,s[3],n?_n(r,s[3],o,vX):gn(s[3]),Q_)},i(s){n||(K(a,s),n=!0)},o(s){G(a,s),n=!1},d(s){s&&w(e),a&&a.d(s)}}}function tv(t){let e,n;const r=t[4].footer,a=vn(r,t,t[3],J_);return{c(){e=D("footer"),a&&a.c()},l(s){e=F(s,"FOOTER",{});var o=j(e);a&&a.l(o),o.forEach(w)},m(s,o){R(s,e,o),a&&a.m(e,null),n=!0},p(s,o){a&&a.p&&(!n||o&8)&&pn(a,r,s,s[3],n?_n(r,s[3],o,_X):gn(s[3]),J_)},i(s){n||(K(a,s),n=!0)},o(s){G(a,s),n=!1},d(s){s&&w(e),a&&a.d(s)}}}function dX(t){let e,n,r,a,s,o,l=t[2].header&&ev(t);const c=t[4].default,h=vn(c,t,t[3],null);let p=t[2].footer&&tv(t),_=[t[1]],v={};for(let m=0;m<_.length;m+=1)v=me(v,_[m]);return{c(){e=D("div"),l&&l.c(),n=Q(),h&&h.c(),r=Q(),p&&p.c(),this.h()},l(m){e=F(m,"DIV",{});var b=j(e);l&&l.l(b),n=ee(b),h&&h.l(b),r=ee(b),p&&p.l(b),b.forEach(w),this.h()},h(){Vn(e,v),ke(e,"card",1)},m(m,b){R(m,e,b),l&&l.m(e,null),M(e,n),h&&h.m(e,null),M(e,r),p&&p.m(e,null),a=!0,s||(o=Ms(t[0].call(null,e)),s=!0)},p(m,[b]){m[2].header?l?(l.p(m,b),b&4&&K(l,1)):(l=ev(m),l.c(),K(l,1),l.m(e,n)):l&&(Rn(),G(l,1,1,()=>{l=null}),Ln()),h&&h.p&&(!a||b&8)&&pn(h,c,m,m[3],a?_n(c,m[3],b,null):gn(m[3]),null),m[2].footer?p?(p.p(m,b),b&4&&K(p,1)):(p=tv(m),p.c(),K(p,1),p.m(e,null)):p&&(Rn(),G(p,1,1,()=>{p=null}),Ln()),Vn(e,v=Ee(_,[b&2&&m[1]])),ke(e,"card",1)},i(m){a||(K(l),K(h,m),K(p),a=!0)},o(m){G(l),G(h,m),G(p),a=!1},d(m){m&&w(e),l&&l.d(),h&&h.d(m),p&&p.d(),s=!1,o()}}}function $X(t,e,n){const r=[];let a=Zn(e,r),{$$slots:s={},$$scope:o}=e;const l=Y2(s),c=uu();return t.$$set=h=>{e=me(me({},e),xs(h)),n(1,a=Zn(e,r)),"$$scope"in h&&n(3,o=h.$$scope)},[c,a,l,o,s]}class mX extends oe{constructor(e){super();le(this,e,$X,dX,fe,{})}}function yX(t){let e,n,r,a;const s=t[7].default,o=vn(s,t,t[6],null);let l=[t[3]],c={};for(let h=0;hn(5,s=m));let v=0;return Wo("tabs:getid",()=>v++),Wo("tabs:active",_),t.$$set=m=>{e=me(me({},e),xs(m)),n(3,a=Zn(e,r)),"active"in m&&n(4,c=m.active),"full"in m&&n(0,h=m.full),"$$scope"in m&&n(6,l=m.$$scope)},t.$$.update=()=>{t.$$.dirty&32&&n(4,c=s)},[h,p,_,a,c,s,l,o]}class wX extends oe{constructor(e){super();le(this,e,bX,yX,fe,{active:4,full:0})}}function AX(t){let e,n,r,a;const s=t[8].default,o=vn(s,t,t[7],null);let l=[t[5]],c={};for(let h=0;hn(6,o=b));const v=tt("tabs:getid")(),m=()=>_.set(h===!1?v:h);return t.$$set=b=>{e=me(me({},e),xs(b)),n(5,s=Zn(e,a)),"tabid"in b&&n(0,h=b.tabid),"$$scope"in b&&n(7,c=b.$$scope)},t.$$.update=()=>{t.$$.dirty&65&&n(1,r=o===h||o===v)},[h,r,p,_,v,s,o,c,l,m]}class Ho extends oe{constructor(e){super();le(this,e,OX,AX,fe,{tabid:0})}}function nv(t,{delay:e=0,duration:n=400,easing:r=V2}={}){const a=+getComputedStyle(t).opacity;return{delay:e,duration:n,easing:r,css:s=>`opacity: ${s*a}`}}function rv(t){let e,n,r,a,s,o,l,c,h;const p=t[4].default,_=vn(p,t,t[3],null);let v=[t[2]],m={};for(let b=0;b{o||(o=Tp(e,nv,{duration:200},!0)),o.run(1)}),l=!0)},o(b){G(_,b),o||(o=Tp(e,nv,{duration:200},!1)),o.run(0),l=!1},d(b){b&&w(e),_&&_.d(b),b&&o&&o.end(),c=!1,ha(h)}}}function TX(t){let e,n,r=t[0]&&rv(t);return{c(){r&&r.c(),e=gt()},l(a){r&&r.l(a),e=gt()},m(a,s){r&&r.m(a,s),R(a,e,s),n=!0},p(a,[s]){a[0]?r?(r.p(a,s),s&1&&K(r,1)):(r=rv(a),r.c(),K(r,1),r.m(e.parentNode,e)):r&&(Rn(),G(r,1,1,()=>{r=null}),Ln())},i(a){n||(K(r),n=!0)},o(a){G(r),n=!1},d(a){r&&r.d(a),a&&w(e)}}}function SX(t,e,n){const r=["open"];let a=Zn(e,r),{$$slots:s={},$$scope:o}=e,{open:l=!1}=e;const c=uu(),h=p=>n(0,l=!1);return t.$$set=p=>{e=me(me({},e),xs(p)),n(2,a=Zn(e,r)),"open"in p&&n(0,l=p.open),"$$scope"in p&&n(3,o=p.$$scope)},[l,c,a,o,s,h]}class CX extends oe{constructor(e){super();le(this,e,SX,TX,fe,{open:0})}}function EX(t){let e,n,r,a,s;return{c(){e=D("a"),n=Mn("svg"),r=Mn("path"),a=Mn("path"),s=Mn("path"),this.h()},l(o){e=F(o,"A",{href:!0,class:!0,"aria-label":!0});var l=j(e);n=xn(l,"svg",{width:!0,height:!0,viewBox:!0,style:!0,"aria-hidden":!0});var c=j(n);r=xn(c,"path",{d:!0}),j(r).forEach(w),a=xn(c,"path",{d:!0,fill:!0,style:!0,class:!0}),j(a).forEach(w),s=xn(c,"path",{d:!0,fill:!0,class:!0}),j(s).forEach(w),c.forEach(w),l.forEach(w),this.h()},h(){E(r,"d","M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"),E(a,"d","M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2"),E(a,"fill","currentColor"),kn(a,"transform-origin","130px 106px"),E(a,"class","octo-arm"),E(s,"d","M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z"),E(s,"fill","currentColor"),E(s,"class","octo-body"),E(n,"width","80"),E(n,"height","80"),E(n,"viewBox","0 0 250 250"),kn(n,"fill","#151513"),kn(n,"color","#fff"),kn(n,"position","absolute"),kn(n,"top","0"),kn(n,"border","0"),kn(n,"right","0"),E(n,"aria-hidden","true"),E(e,"href",IX),E(e,"class","github-corner"),E(e,"aria-label","View source on GitHub")},m(o,l){R(o,e,l),M(e,n),M(n,r),M(n,a),M(n,s)},p:De,i:De,o:De,d(o){o&&w(e)}}}const IX="https://github.com/aotds/aotds-docks";class PX extends oe{constructor(e){super();le(this,e,null,EX,fe,{})}}function MX(t){let e,n,r,a,s,o,l,c,h,p,_,v,m,b,T,I,S,L,Z,ne,B,ue;return{c(){e=D("p"),n=re(`This app is a ship builder for the game `),r=D("a"),a=re("Full Thrust"),s=re(` .`),o=Q(),l=D("p"),c=re(`The contruction rules are following the `),h=D("a"),p=re("Cross Dimensions rules"),_=re(` as closely as possible.`),v=Q(),m=D("p"),b=re(`The app is mostly developed for Firefox. I also check as much as I can that I don't mess things too badly on Chrome. For the other browsers... caveat emptor.`),T=Q(),I=D("p"),S=re(`Written by `),L=D("a"),Z=re("Yanick Champoux"),ne=re(` . Code available on `),B=D("a"),ue=re("Github"),this.h()},l(H){e=F(H,"P",{class:!0});var se=j(e);n=ie(se,`This app is a ship builder for the game `),r=F(se,"A",{href:!0});var X=j(r);a=ie(X,"Full Thrust"),X.forEach(w),s=ie(se,` .`),se.forEach(w),o=ee(H),l=F(H,"P",{class:!0});var $e=j(l);c=ie($e,`The contruction rules are following the `),h=F($e,"A",{href:!0});var ce=j(h);p=ie(ce,"Cross Dimensions rules"),ce.forEach(w),_=ie($e,` as closely as possible.`),$e.forEach(w),v=ee(H),m=F(H,"P",{class:!0});var Re=j(m);b=ie(Re,`The app is mostly developed for Firefox. I also check as much as I can that I don't mess things too badly on Chrome. For the other browsers... caveat emptor.`),Re.forEach(w),T=ee(H),I=F(H,"P",{class:!0});var Je=j(I);S=ie(Je,`Written by `),L=F(Je,"A",{href:!0});var rt=j(L);Z=ie(rt,"Yanick Champoux"),rt.forEach(w),ne=ie(Je,` . Code available on `),B=F(Je,"A",{href:!0});var Nt=j(B);ue=ie(Nt,"Github"),Nt.forEach(w),Je.forEach(w),this.h()},h(){E(r,"href","https://shop.groundzerogames.co.uk/rules.html"),E(e,"class","svelte-1mk8yef"),E(h,"href","http://members.ozemail.com.au/~laranzu/fullthrust/rules/"),E(l,"class","svelte-1mk8yef"),E(m,"class","svelte-1mk8yef"),E(L,"href","https://twitter.com/yenzie"),E(B,"href","https://github.com/aotds/aotds-shipyard"),E(I,"class","svelte-1mk8yef")},m(H,se){R(H,e,se),M(e,n),M(e,r),M(r,a),M(e,s),R(H,o,se),R(H,l,se),M(l,c),M(l,h),M(h,p),M(l,_),R(H,v,se),R(H,m,se),M(m,b),R(H,T,se),R(H,I,se),M(I,S),M(I,L),M(L,Z),M(I,ne),M(I,B),M(B,ue)},d(H){H&&w(e),H&&w(o),H&&w(l),H&&w(v),H&&w(m),H&&w(T),H&&w(I)}}}function xX(t){let e,n;return{c(){e=D("h2"),n=re("Welcome to the docks"),this.h()},l(r){e=F(r,"H2",{slot:!0,class:!0});var a=j(e);n=ie(a,"Welcome to the docks"),a.forEach(w),this.h()},h(){E(e,"slot","header"),E(e,"class","svelte-1mk8yef")},m(r,a){R(r,e,a),M(e,n)},d(r){r&&w(e)}}}function RX(t){let e;return{c(){e=D("div"),this.h()},l(n){e=F(n,"DIV",{slot:!0}),j(e).forEach(w),this.h()},h(){E(e,"slot","footer")},m(n,r){R(n,e,r)},d(n){n&&w(e)}}}function LX(t){let e,n;return e=new mX({props:{$$slots:{footer:[RX],header:[xX],default:[MX]},$$scope:{ctx:t}}}),{c(){W(e.$$.fragment)},l(r){V(e.$$.fragment,r)},m(r,a){k(e,r,a),n=!0},p(r,[a]){const s={};a&1&&(s.$$scope={dirty:a,ctx:r}),e.$set(s)},i(r){n||(K(e.$$.fragment,r),n=!0)},o(r){G(e.$$.fragment,r),n=!1},d(r){Y(e,r)}}}class DX extends oe{constructor(e){super();le(this,e,null,LX,fe,{})}}function FX(t){let e;return{c(){e=re("editor")},l(n){e=ie(n,"editor")},m(n,r){R(n,e,r)},d(n){n&&w(e)}}}function NX(t){let e;return{c(){e=re("json view")},l(n){e=ie(n,"json view")},m(n,r){R(n,e,r)},d(n){n&&w(e)}}}function BX(t){let e;return{c(){e=re("print view")},l(n){e=ie(n,"print view")},m(n,r){R(n,e,r)},d(n){n&&w(e)}}}function jX(t){let e,n,r,a,s,o;return e=new Ho({props:{tabid:"editor",$$slots:{default:[FX]},$$scope:{ctx:t}}}),r=new Ho({props:{tabid:"json",$$slots:{default:[NX]},$$scope:{ctx:t}}}),s=new Ho({props:{tabid:"print",$$slots:{default:[BX]},$$scope:{ctx:t}}}),{c(){W(e.$$.fragment),n=Q(),W(r.$$.fragment),a=Q(),W(s.$$.fragment)},l(l){V(e.$$.fragment,l),n=ee(l),V(r.$$.fragment,l),a=ee(l),V(s.$$.fragment,l)},m(l,c){k(e,l,c),R(l,n,c),k(r,l,c),R(l,a,c),k(s,l,c),o=!0},p(l,c){const h={};c&64&&(h.$$scope={dirty:c,ctx:l}),e.$set(h);const p={};c&64&&(p.$$scope={dirty:c,ctx:l}),r.$set(p);const _={};c&64&&(_.$$scope={dirty:c,ctx:l}),s.$set(_)},i(l){o||(K(e.$$.fragment,l),K(r.$$.fragment,l),K(s.$$.fragment,l),o=!0)},o(l){G(e.$$.fragment,l),G(r.$$.fragment,l),G(s.$$.fragment,l),o=!1},d(l){Y(e,l),l&&w(n),Y(r,l),l&&w(a),Y(s,l)}}}function UX(t){let e,n;return e=new DX({}),{c(){W(e.$$.fragment)},l(r){V(e.$$.fragment,r)},m(r,a){k(e,r,a),n=!0},i(r){n||(K(e.$$.fragment,r),n=!0)},o(r){G(e.$$.fragment,r),n=!1},d(r){Y(e,r)}}}function qX(t){let e,n,r,a,s,o,l,c,h,p,_,v,m,b,T,I,S,L,Z,ne,B,ue;function H(ce){t[3](ce)}let se={$$slots:{default:[jX]},$$scope:{ctx:t}};t[0]!==void 0&&(se.active=t[0]),T=new wX({props:se}),Xr.push(()=>ko(T,"active",H));function X(ce){t[4](ce)}let $e={$$slots:{default:[UX]},$$scope:{ctx:t}};return t[1]!==void 0&&($e.open=t[1]),L=new CX({props:$e}),Xr.push(()=>ko(L,"open",X)),{c(){e=D("header"),n=D("h1"),r=re("The Docks"),a=Q(),s=D("h2"),o=re("a "),l=D("a"),c=re("Full Thrust"),h=re(" ship builder"),p=Q(),_=D("a"),v=re("about the app"),m=Q(),b=D("div"),W(T.$$.fragment),S=Q(),W(L.$$.fragment),this.h()},l(ce){e=F(ce,"HEADER",{class:!0});var Re=j(e);n=F(Re,"H1",{class:!0});var Je=j(n);r=ie(Je,"The Docks"),Je.forEach(w),a=ee(Re),s=F(Re,"H2",{class:!0});var rt=j(s);o=ie(rt,"a "),l=F(rt,"A",{href:!0});var Nt=j(l);c=ie(Nt,"Full Thrust"),Nt.forEach(w),h=ie(rt," ship builder"),rt.forEach(w),p=ee(Re),_=F(Re,"A",{class:!0});var yn=j(_);v=ie(yn,"about the app"),yn.forEach(w),Re.forEach(w),m=ee(ce),b=F(ce,"DIV",{class:!0});var At=j(b);V(T.$$.fragment,At),At.forEach(w),S=ee(ce),V(L.$$.fragment,ce),this.h()},h(){E(n,"class","svelte-uwt8cz"),E(l,"href","https://shop.groundzerogames.co.uk/rules.html"),E(s,"class","svelte-uwt8cz"),E(_,"class","svelte-uwt8cz"),E(e,"class","svelte-uwt8cz"),E(b,"class","svelte-uwt8cz")},m(ce,Re){R(ce,e,Re),M(e,n),M(n,r),M(e,a),M(e,s),M(s,o),M(s,l),M(l,c),M(s,h),M(e,p),M(e,_),M(_,v),R(ce,m,Re),R(ce,b,Re),k(T,b,null),R(ce,S,Re),k(L,ce,Re),ne=!0,B||(ue=Pe(_,"click",Gv(t[2])),B=!0)},p(ce,[Re]){const Je={};Re&64&&(Je.$$scope={dirty:Re,ctx:ce}),!I&&Re&1&&(I=!0,Je.active=ce[0],Yo(()=>I=!1)),T.$set(Je);const rt={};Re&64&&(rt.$$scope={dirty:Re,ctx:ce}),!Z&&Re&2&&(Z=!0,rt.open=ce[1],Yo(()=>Z=!1)),L.$set(rt)},i(ce){ne||(K(T.$$.fragment,ce),K(L.$$.fragment,ce),ne=!0)},o(ce){G(T.$$.fragment,ce),G(L.$$.fragment,ce),ne=!1},d(ce){ce&&w(e),ce&&w(m),ce&&w(b),Y(T),ce&&w(S),Y(L,ce),B=!1,ue()}}}function KX(t,e,n){let r=!1,a="editor";const s=Qr(),o=()=>n(1,r=!0);function l(h){a=h,n(0,a)}function c(h){r=h,n(1,r)}return t.$$.update=()=>{t.$$.dirty&1&&s("changeTab",a)},[a,r,o,l,c]}class GX extends oe{constructor(e){super();le(this,e,KX,qX,fe,{})}}function iv(t){let e,n;return{c(){e=D("label"),n=re(t[1]),this.h()},l(r){e=F(r,"LABEL",{class:!0});var a=j(e);n=ie(a,t[1]),a.forEach(w),this.h()},h(){E(e,"class","svelte-i3mp3j")},m(r,a){R(r,e,a),M(e,n)},p(r,a){a&2&&_t(n,r[1])},d(r){r&&w(e)}}}function zX(t){let e,n,r;return{c(){e=D("input"),this.h()},l(a){e=F(a,"INPUT",{type:!0,placeholder:!0}),this.h()},h(){E(e,"type","text"),E(e,"placeholder",t[2])},m(a,s){R(a,e,s),Ye(e,t[0]),n||(r=[Pe(e,"input",t[6]),Pe(e,"change",t[5])],n=!0)},p(a,s){s&4&&E(e,"placeholder",a[2]),s&1&&e.value!==a[0]&&Ye(e,a[0])},d(a){a&&w(e),n=!1,ha(r)}}}function HX(t){let e,n,r,a=t[1]&&iv(t);const s=t[4].default,o=vn(s,t,t[3],null),l=o||zX(t);return{c(){e=D("div"),a&&a.c(),n=Q(),l&&l.c(),this.h()},l(c){e=F(c,"DIV",{class:!0});var h=j(e);a&&a.l(h),n=ee(h),l&&l.l(h),h.forEach(w),this.h()},h(){E(e,"class","svelte-i3mp3j")},m(c,h){R(c,e,h),a&&a.m(e,null),M(e,n),l&&l.m(e,null),r=!0},p(c,[h]){c[1]?a?a.p(c,h):(a=iv(c),a.c(),a.m(e,n)):a&&(a.d(1),a=null),o?o.p&&(!r||h&8)&&pn(o,s,c,c[3],r?_n(s,c[3],h,null):gn(c[3]),null):l&&l.p&&(!r||h&5)&&l.p(c,r?h:-1)},i(c){r||(K(l,c),r=!0)},o(c){G(l,c),r=!1},d(c){c&&w(e),a&&a.d(),l&&l.d(c)}}}function WX(t,e,n){let{$$slots:r={},$$scope:a}=e,{label:s=""}=e,{value:o=""}=e,{placeholder:l}=e;function c(p){Tl.call(this,t,p)}function h(){o=this.value,n(0,o)}return t.$$set=p=>{"label"in p&&n(1,s=p.label),"value"in p&&n(0,o=p.value),"placeholder"in p&&n(2,l=p.placeholder),"$$scope"in p&&n(3,a=p.$$scope)},[o,s,l,a,r,c,h]}class nt extends oe{constructor(e){super();le(this,e,WX,HX,fe,{label:1,value:0,placeholder:2})}}const kX=[{name:"Scout",mass:[0,10],abbrev:"SC"},{name:"Courier",mass:[4,10],abbrev:"SC"},{name:"Corvette",mass:[8,16],abbrev:"CT"},{name:"Frigate",mass:[14,28],abbrev:"FF"},{name:"Destroyer",mass:[24,36],abbrev:"DD"},{name:"Heavy Destroyer",mass:[30,40],abbrev:"DH"},{name:"Light Cruiser",mass:[40,60],abbrev:"CL"},{name:"Patrol",mass:[50,70],abbrev:"CE"},{name:"Escort Cruiser",mass:[50,70],abbrev:"CE"},{name:"Heavy Cruiser",mass:[60,90],abbrev:"CA"},{name:"Battlecruiser",mass:[80,110],abbrev:"BC"},{name:"Battleship",mass:[100,140],abbrev:"BB"},{name:"Heavy Battleship",mass:[120,160],abbrev:"BDN"},{name:"Dreadnought",mass:[140,180],abbrev:"DN"},{name:"Superdreadnought",mass:[160,300],abbrev:"SDN"},{name:"Escort Carrier",mass:[0,140],abbrev:"CVE",carrier:!0},{name:"Light Carrier",mass:[120,180],abbrev:"CVL",carrier:!0},{name:"Heavy Carrier",mass:[160,300],abbrev:"CVH",carrier:!0},{name:"Attack Carrier",mass:[150,300],abbrev:"CVA",carrier:!0}];function YX(t=0,e=!1){return kX.filter(n=>e==!!n.carrier).filter(n=>n.mass[0]<=t).filter(n=>n.mass[1]>=t)}function av(t,e,n){const r=t.slice();return r[8]=e[n],r}function sv(t,e){let n,r=e[8]+"",a,s;return{key:t,first:null,c(){n=D("option"),a=re(r),this.h()},l(o){n=F(o,"OPTION",{});var l=j(n);a=ie(l,r),l.forEach(w),this.h()},h(){n.__value=s=e[8],n.value=n.__value,this.first=n},m(o,l){R(o,n,l),M(n,a)},p(o,l){e=o,l&4&&r!==(r=e[8]+"")&&_t(a,r),l&4&&s!==(s=e[8])&&(n.__value=s,n.value=n.__value)},d(o){o&&w(n)}}}function VX(t){let e,n=[],r=new Map,a,s,o=t[2];const l=c=>c[8];for(let c=0;ct[6].call(e))},m(c,h){R(c,e,h);for(let p=0;pko(n,"value",l)),s=new nt({props:{label:"ship type",$$slots:{default:[VX]},$$scope:{ctx:t}}}),{c(){e=D("div"),W(n.$$.fragment),a=Q(),W(s.$$.fragment),this.h()},l(h){e=F(h,"DIV",{class:!0});var p=j(e);V(n.$$.fragment,p),a=ee(p),V(s.$$.fragment,p),p.forEach(w),this.h()},h(){E(e,"class","svelte-fc2507")},m(h,p){R(h,e,p),k(n,e,null),M(e,a),k(s,e,null),o=!0},p(h,[p]){const _={};!r&&p&1&&(r=!0,_.value=h[0],Yo(()=>r=!1)),n.$set(_);const v={};p&2054&&(v.$$scope={dirty:p,ctx:h}),s.$set(v)},i(h){o||(K(n.$$.fragment,h),K(s.$$.fragment,h),o=!0)},o(h){G(n.$$.fragment,h),G(s.$$.fragment,h),o=!1},d(h){h&&w(e),Y(n),Y(s)}}}function XX(t,e,n){let r,{shipClass:a=""}=e,{shipType:s=""}=e,{mass:o=10}=e,{isCarrier:l=!1}=e;const c=tt("ship");function h(_){a=_,n(0,a)}function p(){s=ea(this),n(1,s),n(2,r),n(3,o),n(4,l),n(2,r),n(3,o),n(4,l)}return t.$$set=_=>{"shipClass"in _&&n(0,a=_.shipClass),"shipType"in _&&n(1,s=_.shipType),"mass"in _&&n(3,o=_.mass),"isCarrier"in _&&n(4,l=_.isCarrier)},t.$$.update=()=>{t.$$.dirty&24&&n(2,r=YX(o,l).map(({name:_})=>_)),t.$$.dirty&6&&r.length>0&&!r.includes(s)&&n(1,s=r[0]),t.$$.dirty&2&&c.dispatch.setShipType(s),t.$$.dirty&1&&c.dispatch.setShipClass(a)},[a,s,r,o,l,h,p]}class JX extends oe{constructor(e){super();le(this,e,XX,ZX,fe,{shipClass:0,shipType:1,mass:3,isCarrier:4})}}function QX(t){let e,n=-t[2]+"",r;return{c(){e=re("excessive mass: "),r=re(n)},l(a){e=ie(a,"excessive mass: "),r=ie(a,n)},m(a,s){R(a,e,s),R(a,r,s)},p(a,s){s&4&&n!==(n=-a[2]+"")&&_t(r,n)},d(a){a&&w(e),a&&w(r)}}}function eJ(t){let e,n;return{c(){e=re("mass unused: "),n=re(t[2])},l(r){e=ie(r,"mass unused: "),n=ie(r,t[2])},m(r,a){R(r,e,a),R(r,n,a)},p(r,a){a&4&&_t(n,r[2])},d(r){r&&w(e),r&&w(n)}}}function tJ(t){let e,n,r,a,s,o,l;function c(_,v){return _[3]?eJ:QX}let h=c(t),p=h(t);return{c(){e=D("input"),n=Q(),r=D("span"),a=Q(),s=D("div"),p.c(),this.h()},l(_){e=F(_,"INPUT",{class:!0,type:!0,min:!0,max:!0}),n=ee(_),r=F(_,"SPAN",{class:!0}),j(r).forEach(w),a=ee(_),s=F(_,"DIV",{class:!0});var v=j(s);p.l(v),v.forEach(w),this.h()},h(){E(e,"class","short svelte-1eeo9z6"),E(e,"type","number"),E(e,"min","10"),E(e,"max","300"),E(r,"class","mass_symbol svelte-1eeo9z6"),E(s,"class","note svelte-1eeo9z6"),ke(s,"warning",!t[3])},m(_,v){R(_,e,v),Ye(e,t[0]),R(_,n,v),R(_,r,v),R(_,a,v),R(_,s,v),p.m(s,null),o||(l=Pe(e,"input",t[6]),o=!0)},p(_,v){v&1&&Xe(e.value)!==_[0]&&Ye(e,_[0]),h===(h=c(_))&&p?p.p(_,v):(p.d(1),p=h(_),p&&(p.c(),p.m(s,null))),v&8&&ke(s,"warning",!_[3])},d(_){_&&w(e),_&&w(n),_&&w(r),_&&w(a),_&&w(s),p.d(),o=!1,l()}}}function nJ(t){let e,n;return{c(){e=D("span"),n=re(t[1]),this.h()},l(r){e=F(r,"SPAN",{class:!0});var a=j(e);n=ie(a,t[1]),a.forEach(w),this.h()},h(){E(e,"class","cost svelte-1eeo9z6")},m(r,a){R(r,e,a),M(e,n)},p(r,a){a&2&&_t(n,r[1])},d(r){r&&w(e)}}}function rJ(t){let e,n,r,a,s,o;return n=new nt({props:{label:"ship tonnage",$$slots:{default:[tJ]},$$scope:{ctx:t}}}),s=new nt({props:{label:"cost",$$slots:{default:[nJ]},$$scope:{ctx:t}}}),{c(){e=D("div"),W(n.$$.fragment),r=Q(),a=D("div"),W(s.$$.fragment),this.h()},l(l){e=F(l,"DIV",{class:!0});var c=j(e);V(n.$$.fragment,c),c.forEach(w),r=ee(l),a=F(l,"DIV",{class:!0});var h=j(a);V(s.$$.fragment,h),h.forEach(w),this.h()},h(){E(e,"class","mass svelte-1eeo9z6"),E(a,"class","cost svelte-1eeo9z6")},m(l,c){R(l,e,c),k(n,e,null),R(l,r,c),R(l,a,c),k(s,a,null),o=!0},p(l,[c]){const h={};c&141&&(h.$$scope={dirty:c,ctx:l}),n.$set(h);const p={};c&130&&(p.$$scope={dirty:c,ctx:l}),s.$set(p)},i(l){o||(K(n.$$.fragment,l),K(s.$$.fragment,l),o=!0)},o(l){G(n.$$.fragment,l),G(s.$$.fragment,l),o=!1},d(l){l&&w(e),Y(n),l&&w(r),l&&w(a),Y(s)}}}function iJ(t,e,n){let r,a,{ship:s=tt("ship")}=e,{mass:o=10}=e,{cost:l=10}=e,{usedMass:c=5}=e;function h(){o=Xe(this.value),n(0,o)}return t.$$set=p=>{"ship"in p&&n(4,s=p.ship),"mass"in p&&n(0,o=p.mass),"cost"in p&&n(1,l=p.cost),"usedMass"in p&&n(5,c=p.usedMass)},t.$$.update=()=>{t.$$.dirty&33&&n(2,r=o-c),t.$$.dirty&4&&n(3,a=r>=0),t.$$.dirty&17&&s.dispatch.setShipMass(o)},[o,l,r,a,s,c,h]}class aJ extends oe{constructor(e){super();le(this,e,iJ,rJ,fe,{ship:4,mass:0,cost:1,usedMass:5})}}function sJ(t){let e,n,r,a,s,o,l;const c=t[2].default,h=vn(c,t,t[1],null);return{c(){e=D("div"),n=D("h2"),r=re(t[0]),a=Q(),s=D("hr"),o=Q(),h&&h.c(),this.h()},l(p){e=F(p,"DIV",{class:!0});var _=j(e);n=F(_,"H2",{class:!0});var v=j(n);r=ie(v,t[0]),v.forEach(w),a=ee(_),s=F(_,"HR",{class:!0}),_.forEach(w),o=ee(p),h&&h.l(p),this.h()},h(){E(n,"class","svelte-1p2uzx8"),E(s,"class","svelte-1p2uzx8"),E(e,"class","svelte-1p2uzx8")},m(p,_){R(p,e,_),M(e,n),M(n,r),M(e,a),M(e,s),R(p,o,_),h&&h.m(p,_),l=!0},p(p,[_]){(!l||_&1)&&_t(r,p[0]),h&&h.p&&(!l||_&2)&&pn(h,c,p,p[1],l?_n(c,p[1],_,null):gn(p[1]),null)},i(p){l||(K(h,p),l=!0)},o(p){G(h,p),l=!1},d(p){p&&w(e),p&&w(o),h&&h.d(p)}}}function uJ(t,e,n){let{$$slots:r={},$$scope:a}=e,{label:s}=e;return t.$$set=o=>{"label"in o&&n(0,s=o.label),"$$scope"in o&&n(1,a=o.$$scope)},[s,a,r]}class ou extends oe{constructor(e){super();le(this,e,uJ,sJ,fe,{label:0})}}function oJ(t){let e,n,r,a,s,o,l,c,h,p;const _=t[5].default,v=vn(_,t,t[4],null);return{c(){e=D("div"),n=D("div"),v&&v.c(),r=Q(),a=D("div"),s=D("div"),o=re(t[0]),l=Q(),c=D("div"),h=re(t[1]),this.h()},l(m){e=F(m,"DIV",{class:!0});var b=j(e);n=F(b,"DIV",{class:!0});var T=j(n);v&&v.l(T),T.forEach(w),r=ee(b),a=F(b,"DIV",{class:!0});var I=j(a);s=F(I,"DIV",{class:!0});var S=j(s);o=ie(S,t[0]),S.forEach(w),l=ee(I),c=F(I,"DIV",{class:!0});var L=j(c);h=ie(L,t[1]),L.forEach(w),I.forEach(w),b.forEach(w),this.h()},h(){E(n,"class","svelte-13y13iv"),E(s,"class","mass svelte-13y13iv"),E(c,"class","cost svelte-13y13iv"),E(a,"class","reqs svelte-13y13iv"),E(e,"class","ship-item svelte-13y13iv")},m(m,b){R(m,e,b),M(e,n),v&&v.m(n,null),M(e,r),M(e,a),M(a,s),M(s,o),t[6](s),M(a,l),M(a,c),M(c,h),t[7](c),p=!0},p(m,[b]){v&&v.p&&(!p||b&16)&&pn(v,_,m,m[4],p?_n(_,m[4],b,null):gn(m[4]),null),(!p||b&1)&&_t(o,m[0]),(!p||b&2)&&_t(h,m[1])},i(m){p||(K(v,m),p=!0)},o(m){G(v,m),p=!1},d(m){m&&w(e),v&&v.d(m),t[6](null),t[7](null)}}}function lJ(t,e,n){let{$$slots:r={},$$scope:a}=e,{mass:s}=e,{cost:o}=e,l,c;const h=async v=>{!v||(v.classList.remove("updated"),v.offsetWidth,v.classList.add("updated"))};function p(v){Xr[v?"unshift":"push"](()=>{l=v,n(2,l)})}function _(v){Xr[v?"unshift":"push"](()=>{c=v,n(3,c)})}return t.$$set=v=>{"mass"in v&&n(0,s=v.mass),"cost"in v&&n(1,o=v.cost),"$$scope"in v&&n(4,a=v.$$scope)},t.$$.update=()=>{t.$$.dirty&5&&h(l),t.$$.dirty&10&&h(c)},[s,o,l,c,a,r,p,_]}class kt extends oe{constructor(e){super();le(this,e,lJ,oJ,fe,{mass:0,cost:1})}}function fJ(t){let e,n,r;return{c(){e=D("input"),this.h()},l(a){e=F(a,"INPUT",{class:!0,type:!0,min:!0,max:!0,step:!0}),this.h()},h(){E(e,"class","short svelte-1saxaj4"),E(e,"type","number"),E(e,"min","0"),E(e,"max","20"),E(e,"step","1")},m(a,s){R(a,e,s),Ye(e,t[1]),n||(r=Pe(e,"input",t[3]),n=!0)},p(a,s){s&2&&Xe(e.value)!==a[1]&&Ye(e,a[1])},d(a){a&&w(e),n=!1,r()}}}function cJ(t){let e,n,r,a,s,o,l,c,h;return n=new nt({props:{label:"thrust rating",$$slots:{default:[fJ]},$$scope:{ctx:t}}}),{c(){e=D("div"),W(n.$$.fragment),r=Q(),a=D("label"),s=D("input"),o=re(" advanced"),this.h()},l(p){e=F(p,"DIV",{class:!0});var _=j(e);V(n.$$.fragment,_),r=ee(_),a=F(_,"LABEL",{class:!0});var v=j(a);s=F(v,"INPUT",{type:!0}),o=ie(v," advanced"),v.forEach(w),_.forEach(w),this.h()},h(){E(s,"type","checkbox"),E(a,"class","svelte-1saxaj4"),E(e,"class","svelte-1saxaj4")},m(p,_){R(p,e,_),k(n,e,null),M(e,r),M(e,a),M(a,s),s.checked=t[0],M(a,o),l=!0,c||(h=Pe(s,"change",t[4]),c=!0)},p(p,_){const v={};_&66&&(v.$$scope={dirty:_,ctx:p}),n.$set(v),_&1&&(s.checked=p[0])},i(p){l||(K(n.$$.fragment,p),l=!0)},o(p){G(n.$$.fragment,p),l=!1},d(p){p&&w(e),Y(n),c=!1,h()}}}function hJ(t){let e,n;const r=[t[2]];let a={$$slots:{default:[cJ]},$$scope:{ctx:t}};for(let s=0;s{"reqs"in h&&n(2,r=h.reqs),"advanced"in h&&n(0,a=h.advanced),"rating"in h&&n(1,s=h.rating)},t.$$.update=()=>{t.$$.dirty&3&&o.dispatch.setDrive({rating:s,advanced:a})},[a,s,r,l,c]}class gJ extends oe{constructor(e){super();le(this,e,pJ,hJ,fe,{reqs:2,advanced:0,rating:1})}}function uv(t,e,n){const r=t.slice();return r[6]=e[n],r}function ov(t,e){let n,r,a,s=e[6]+"",o,l,c,h;return{key:t,first:null,c(){n=D("label"),r=D("input"),a=Q(),o=re(s),l=Q(),this.h()},l(p){n=F(p,"LABEL",{class:!0});var _=j(n);r=F(_,"INPUT",{type:!0}),a=ee(_),o=ie(_,s),l=ee(_),_.forEach(w),this.h()},h(){E(r,"type","radio"),r.__value=e[6],r.value=r.__value,e[4][0].push(r),E(n,"class","svelte-9i3z5u"),this.first=n},m(p,_){R(p,n,_),M(n,r),r.checked=r.__value===e[0],M(n,a),M(n,o),M(n,l),c||(h=Pe(r,"change",e[3]),c=!0)},p(p,_){e=p,_&1&&(r.checked=r.__value===e[0])},d(p){p&&w(n),e[4][0].splice(e[4][0].indexOf(r),1),c=!1,h()}}}function _J(t){let e=[],n=new Map,r,a=t[2];const s=o=>o[6];for(let o=0;o{"reqs"in h&&n(1,a=h.reqs),"type"in h&&n(0,s=h.type)},t.$$.update=()=>{t.$$.dirty&1&&o.dispatch.setFtl(s)},[s,a,r,c,l]}class mJ extends oe{constructor(e){super();le(this,e,$J,dJ,fe,{reqs:1,type:0})}}function yJ(t){let e,n,r,a;const s=[t[0].drive];let o={};for(let h=0;h{"propulsion"in a&&n(0,r=a.propulsion)},[r]}class AJ extends oe{constructor(e){super();le(this,e,wJ,bJ,fe,{propulsion:0})}}function OJ(t){let e,n,r;return{c(){e=D("input"),this.h()},l(a){e=F(a,"INPUT",{class:!0,type:!0,min:!0,max:!0}),this.h()},h(){E(e,"class","short svelte-ytqr7l"),E(e,"type","number"),E(e,"min",t[2]),E(e,"max",t[3])},m(a,s){R(a,e,s),Ye(e,t[0]),n||(r=Pe(e,"input",t[4]),n=!0)},p(a,s){s&4&&E(e,"min",a[2]),s&8&&E(e,"max",a[3]),s&1&&Xe(e.value)!==a[0]&&Ye(e,a[0])},d(a){a&&w(e),n=!1,r()}}}function TJ(t){let e,n;return e=new nt({props:{label:"hull",$$slots:{default:[OJ]},$$scope:{ctx:t}}}),{c(){W(e.$$.fragment)},l(r){V(e.$$.fragment,r)},m(r,a){k(e,r,a),n=!0},p(r,a){const s={};a&77&&(s.$$scope={dirty:a,ctx:r}),e.$set(s)},i(r){n||(K(e.$$.fragment,r),n=!0)},o(r){G(e.$$.fragment,r),n=!1},d(r){Y(e,r)}}}function SJ(t){let e,n;const r=[t[1]];let a={$$slots:{default:[TJ]},$$scope:{ctx:t}};for(let s=0;s{"rating"in h&&n(0,r=h.rating),"reqs"in h&&n(1,a=h.reqs),"min"in h&&n(2,s=h.min),"max"in h&&n(3,o=h.max)},t.$$.update=()=>{t.$$.dirty&1&&l.dispatch.setHull(r)},[r,a,s,o,c]}class EJ extends oe{constructor(e){super();le(this,e,CJ,SJ,fe,{rating:0,reqs:1,min:2,max:3})}}function IJ(t){let e,n,r;return{c(){e=D("input"),this.h()},l(a){e=F(a,"INPUT",{class:!0,type:!0,min:!0}),this.h()},h(){E(e,"class","short svelte-1wwwskr"),E(e,"type","number"),E(e,"min","0")},m(a,s){R(a,e,s),Ye(e,t[0]),n||(r=Pe(e,"input",t[3]),n=!0)},p(a,s){s&1&&Xe(e.value)!==a[0]&&Ye(e,a[0])},d(a){a&&w(e),n=!1,r()}}}function PJ(t){let e,n,r;return{c(){e=D("input"),this.h()},l(a){e=F(a,"INPUT",{class:!0,type:!0,min:!0}),this.h()},h(){E(e,"class","short svelte-1wwwskr"),E(e,"type","number"),E(e,"min","0")},m(a,s){R(a,e,s),Ye(e,t[1]),n||(r=Pe(e,"input",t[4]),n=!0)},p(a,s){s&2&&Xe(e.value)!==a[1]&&Ye(e,a[1])},d(a){a&&w(e),n=!1,r()}}}function MJ(t){let e,n,r,a,s;return n=new nt({props:{label:"screens",$$slots:{default:[IJ]},$$scope:{ctx:t}}}),a=new nt({props:{label:"advanced screens",$$slots:{default:[PJ]},$$scope:{ctx:t}}}),{c(){e=D("div"),W(n.$$.fragment),r=Q(),W(a.$$.fragment),this.h()},l(o){e=F(o,"DIV",{class:!0});var l=j(e);V(n.$$.fragment,l),r=ee(l),V(a.$$.fragment,l),l.forEach(w),this.h()},h(){E(e,"class","svelte-1wwwskr")},m(o,l){R(o,e,l),k(n,e,null),M(e,r),k(a,e,null),s=!0},p(o,l){const c={};l&65&&(c.$$scope={dirty:l,ctx:o}),n.$set(c);const h={};l&66&&(h.$$scope={dirty:l,ctx:o}),a.$set(h)},i(o){s||(K(n.$$.fragment,o),K(a.$$.fragment,o),s=!0)},o(o){G(n.$$.fragment,o),G(a.$$.fragment,o),s=!1},d(o){o&&w(e),Y(n),Y(a)}}}function xJ(t){let e,n;const r=[t[2]];let a={$$slots:{default:[MJ]},$$scope:{ctx:t}};for(let s=0;s{"reqs"in h&&n(2,r=h.reqs),"standard"in h&&n(0,a=h.standard),"advanced"in h&&n(1,s=h.advanced)},t.$$.update=()=>{t.$$.dirty&3&&o.dispatch.setScreens({standard:a,advanced:s})},[a,s,r,l,c]}class LJ extends oe{constructor(e){super();le(this,e,RJ,xJ,fe,{reqs:2,standard:0,advanced:1})}}function DJ(t){let e,n,r;return{c(){e=D("input"),this.h()},l(a){e=F(a,"INPUT",{class:!0,type:!0,min:!0}),this.h()},h(){E(e,"class","short svelte-ytqr7l"),E(e,"type","number"),E(e,"min","0")},m(a,s){R(a,e,s),Ye(e,t[0]),n||(r=Pe(e,"input",t[3]),n=!0)},p(a,s){s&1&&Xe(e.value)!==a[0]&&Ye(e,a[0])},d(a){a&&w(e),n=!1,r()}}}function FJ(t){let e,n;return e=new nt({props:{label:"cargo",$$slots:{default:[DJ]},$$scope:{ctx:t}}}),{c(){W(e.$$.fragment)},l(r){V(e.$$.fragment,r)},m(r,a){k(e,r,a),n=!0},p(r,a){const s={};a&17&&(s.$$scope={dirty:a,ctx:r}),e.$set(s)},i(r){n||(K(e.$$.fragment,r),n=!0)},o(r){G(e.$$.fragment,r),n=!1},d(r){Y(e,r)}}}function NJ(t){let e,n;const r=[t[1]];let a={$$slots:{default:[FJ]},$$scope:{ctx:t}};for(let s=0;s{"ship"in l&&n(2,r=l.ship),"space"in l&&n(0,a=l.space),"reqs"in l&&n(1,s=l.reqs)},t.$$.update=()=>{t.$$.dirty&5&&r.dispatch.setCargo(a)},[a,s,r,o]}class jJ extends oe{constructor(e){super();le(this,e,BJ,NJ,fe,{ship:2,space:0,reqs:1})}}function UJ(t){let e,n,r;return{c(){e=D("input"),this.h()},l(a){e=F(a,"INPUT",{class:!0,type:!0,min:!0}),this.h()},h(){E(e,"class","short svelte-ytqr7l"),E(e,"type","number"),E(e,"min","0")},m(a,s){R(a,e,s),Ye(e,t[0]),n||(r=Pe(e,"input",t[2]),n=!0)},p(a,s){s&1&&Xe(e.value)!==a[0]&&Ye(e,a[0])},d(a){a&&w(e),n=!1,r()}}}function qJ(t){let e,n;return e=new nt({props:{label:`layer ${t[1]}`,$$slots:{default:[UJ]},$$scope:{ctx:t}}}),{c(){W(e.$$.fragment)},l(r){V(e.$$.fragment,r)},m(r,a){k(e,r,a),n=!0},p(r,[a]){const s={};a&2&&(s.label=`layer ${r[1]}`),a&17&&(s.$$scope={dirty:a,ctx:r}),e.$set(s)},i(r){n||(K(e.$$.fragment,r),n=!0)},o(r){G(e.$$.fragment,r),n=!1},d(r){Y(e,r)}}}function KJ(t,e,n){let{layer:r=1}=e,{rating:a=0}=e;const s=tt("ship");function o(){a=Xe(this.value),n(0,a)}return t.$$set=l=>{"layer"in l&&n(1,r=l.layer),"rating"in l&&n(0,a=l.rating)},t.$$.update=()=>{t.$$.dirty&3&&s.dispatch.setArmorRating({layer:r,rating:a})},[a,r,o]}class GJ extends oe{constructor(e){super();le(this,e,KJ,qJ,fe,{layer:1,rating:0})}}function lv(t,e,n){const r=t.slice();return r[5]=e[n],r[7]=n,r}function zJ(t){let e,n,r;return{c(){e=D("input"),this.h()},l(a){e=F(a,"INPUT",{class:!0,type:!0,min:!0}),this.h()},h(){E(e,"class","short svelte-n2prux"),E(e,"type","number"),E(e,"min","0")},m(a,s){R(a,e,s),Ye(e,t[2]),n||(r=Pe(e,"input",t[3]),n=!0)},p(a,s){s&4&&Xe(e.value)!==a[2]&&Ye(e,a[2])},d(a){a&&w(e),n=!1,r()}}}function fv(t,e){let n,r,a;return r=new GJ({props:{rating:e[5],layer:e[7]+1}}),{key:t,first:null,c(){n=gt(),W(r.$$.fragment),this.h()},l(s){n=gt(),V(r.$$.fragment,s),this.h()},h(){this.first=n},m(s,o){R(s,n,o),k(r,s,o),a=!0},p(s,o){e=s;const l={};o&1&&(l.rating=e[5]),o&1&&(l.layer=e[7]+1),r.$set(l)},i(s){a||(K(r.$$.fragment,s),a=!0)},o(s){G(r.$$.fragment,s),a=!1},d(s){s&&w(n),Y(r,s)}}}function HJ(t){let e,n,r,a,s,o=[],l=new Map,c;r=new nt({props:{label:"armour layers",$$slots:{default:[zJ]},$$scope:{ctx:t}}});let h=t[0];const p=_=>_[7];for(let _=0;_{"layers"in c&&n(0,r=c.layers),"reqs"in c&&n(1,a=c.reqs)},t.$$.update=()=>{t.$$.dirty&4&&o.setArmorLayers(s)},[r,a,s,l]}class YJ extends oe{constructor(e){super();le(this,e,kJ,WJ,fe,{layers:0,reqs:1})}}function VJ(t){let e,n,r,a,s,o,l,c,h,p,_,v,m,b;return{c(){e=D("div"),n=D("label"),r=D("input"),a=re(` none`),s=Q(),o=D("label"),l=D("input"),c=re(` partial`),h=Q(),p=D("label"),_=D("input"),v=re(` full`),this.h()},l(T){e=F(T,"DIV",{class:!0});var I=j(e);n=F(I,"LABEL",{class:!0});var S=j(n);r=F(S,"INPUT",{type:!0}),a=ie(S,` none`),S.forEach(w),s=ee(I),o=F(I,"LABEL",{class:!0});var L=j(o);l=F(L,"INPUT",{type:!0}),c=ie(L,` partial`),L.forEach(w),h=ee(I),p=F(I,"LABEL",{class:!0});var Z=j(p);_=F(Z,"INPUT",{type:!0}),v=ie(Z,` full`),Z.forEach(w),I.forEach(w),this.h()},h(){E(r,"type","radio"),r.__value="none",r.value=r.__value,t[6][0].push(r),E(n,"class","svelte-x5copc"),E(l,"type","radio"),l.__value="partial",l.value=l.__value,t[6][0].push(l),E(o,"class","svelte-x5copc"),E(_,"type","radio"),_.__value="full",_.value=_.__value,t[6][0].push(_),E(p,"class","svelte-x5copc"),E(e,"class","svelte-x5copc")},m(T,I){R(T,e,I),M(e,n),M(n,r),r.checked=r.__value===t[0],M(n,a),M(e,s),M(e,o),M(o,l),l.checked=l.__value===t[0],M(o,c),M(e,h),M(e,p),M(p,_),_.checked=_.__value===t[0],M(p,v),m||(b=[Pe(r,"change",t[5]),Pe(l,"change",t[7]),Pe(_,"change",t[8])],m=!0)},p(T,I){I&1&&(r.checked=r.__value===T[0]),I&1&&(l.checked=l.__value===T[0]),I&1&&(_.checked=_.__value===T[0])},d(T){T&&w(e),t[6][0].splice(t[6][0].indexOf(r),1),t[6][0].splice(t[6][0].indexOf(l),1),t[6][0].splice(t[6][0].indexOf(_),1),m=!1,ha(b)}}}function ZJ(t){let e,n;return e=new nt({props:{label:"streamlining",$$slots:{default:[VJ]},$$scope:{ctx:t}}}),{c(){W(e.$$.fragment)},l(r){V(e.$$.fragment,r)},m(r,a){k(e,r,a),n=!0},p(r,a){const s={};a&513&&(s.$$scope={dirty:a,ctx:r}),e.$set(s)},i(r){n||(K(e.$$.fragment,r),n=!0)},o(r){G(e.$$.fragment,r),n=!1},d(r){Y(e,r)}}}function XJ(t){let e,n;const r=[t[1]];let a={$$slots:{default:[ZJ]},$$scope:{ctx:t}};for(let s=0;s(a(),a=Z2(_,I=>n(4,r=I)),_);t.$$.on_destroy.push(()=>a());let{type:o="none"}=e,{reqs:l={}}=e,{dispatch:c,shipMass:h}=tt("ship"),{dispatch:p=c,shipMass:_=h}=e;s();const v=[[]];function m(){o=this.__value,n(0,o)}function b(){o=this.__value,n(0,o)}function T(){o=this.__value,n(0,o)}return t.$$set=I=>{"type"in I&&n(0,o=I.type),"reqs"in I&&n(1,l=I.reqs),"dispatch"in I&&n(3,p=I.dispatch),"shipMass"in I&&s(n(2,_=I.shipMass))},t.$$.update=()=>{t.$$.dirty&25&&p.setStreamlining({type:o,shipMass:r})},[o,l,_,p,r,m,v,b,T]}class QJ extends oe{constructor(e){super();le(this,e,JJ,XJ,fe,{type:0,reqs:1,dispatch:3,shipMass:2})}}function eQ(t){let e,n,r,a,s,o,l,c,h,p;const _=[t[0]];let v={};for(let B=0;B<_.length;B+=1)v=me(v,_[B]);e=new EJ({props:v});const m=[t[1]];let b={};for(let B=0;B{"hull"in c&&n(0,r=c.hull),"screens"in c&&n(1,a=c.screens),"cargo"in c&&n(2,s=c.cargo),"streamlining"in c&&n(3,o=c.streamlining),"armor"in c&&n(4,l=c.armor)},[r,a,s,o,l]}class rQ extends oe{constructor(e){super();le(this,e,nQ,tQ,fe,{hull:0,screens:1,cargo:2,streamlining:3,armor:4})}}function cv(t,e,n){const r=t.slice();return r[0]=e[n],r}function hv(t,e){let n,r=e[0]+"",a,s;return{key:t,first:null,c(){n=D("option"),a=re(r),this.h()},l(o){n=F(o,"OPTION",{});var l=j(n);a=ie(l,r),l.forEach(w),this.h()},h(){n.__value=s=e[0],n.value=n.__value,this.first=n},m(o,l){R(o,n,l),M(n,a)},p(o,l){e=o},d(o){o&&w(n)}}}function iQ(t){let e,n=[],r=new Map,a,s,o=t[3];const l=c=>c[0];for(let c=0;ct[5].call(e))},m(c,h){R(c,e,h);for(let p=0;pp);let{id:a=1}=e,{type:s=r[0].type}=e,{reqs:o={}}=e,{dispatch:l}=tt("ship"),{dispatch:c=l}=e;function h(){s=ea(this),n(0,s),n(3,r)}return t.$$set=p=>{"id"in p&&n(1,a=p.id),"type"in p&&n(0,s=p.type),"reqs"in p&&n(2,o=p.reqs),"dispatch"in p&&n(4,c=p.dispatch)},t.$$.update=()=>{t.$$.dirty&1&&console.log(s),t.$$.dirty&19&&c.setSquadronType({type:s,id:a})},[s,a,o,r,c,h]}class oQ extends oe{constructor(e){super();le(this,e,uQ,sQ,fe,{id:1,type:0,reqs:2,dispatch:4})}}function pv(t,e,n){const r=t.slice();return r[5]=e[n],r[7]=n,r}function lQ(t){let e,n,r;return{c(){e=D("input"),this.h()},l(a){e=F(a,"INPUT",{class:!0,type:!0,min:!0}),this.h()},h(){E(e,"class","short svelte-oj0ytd"),E(e,"type","number"),E(e,"min","0")},m(a,s){R(a,e,s),Ye(e,t[0]),n||(r=Pe(e,"input",t[3]),n=!0)},p(a,s){s&1&&Xe(e.value)!==a[0]&&Ye(e,a[0])},d(a){a&&w(e),n=!1,r()}}}function fQ(t){let e,n;return e=new nt({props:{label:"bays",$$slots:{default:[lQ]},$$scope:{ctx:t}}}),{c(){W(e.$$.fragment)},l(r){V(e.$$.fragment,r)},m(r,a){k(e,r,a),n=!0},p(r,a){const s={};a&257&&(s.$$scope={dirty:a,ctx:r}),e.$set(s)},i(r){n||(K(e.$$.fragment,r),n=!0)},o(r){G(e.$$.fragment,r),n=!1},d(r){Y(e,r)}}}function gv(t,e){let n,r,a;const s=[e[5],{id:e[7]+1}];let o={};for(let l=0;l_[7];for(let _=0;_{"bays"in c&&n(0,r=c.bays),"reqs"in c&&n(1,a=c.reqs),"squadrons"in c&&n(2,s=c.squadrons)},t.$$.update=()=>{t.$$.dirty&1&&o.setCarrierBays(r)},[r,a,s,l]}class gQ extends oe{constructor(e){super();le(this,e,pQ,hQ,fe,{bays:0,reqs:1,squadrons:2})}}function _Q(t){let e,n,r;return{c(){e=D("input"),this.h()},l(a){e=F(a,"INPUT",{type:!0,class:!0}),this.h()},h(){E(e,"type","number"),E(e,"class","short")},m(a,s){R(a,e,s),Ye(e,t[0]),n||(r=Pe(e,"input",t[2]),n=!0)},p(a,s){s&1&&Xe(e.value)!==a[0]&&Ye(e,a[0])},d(a){a&&w(e),n=!1,r()}}}function vQ(t){let e,n;return e=new nt({props:{label:"firecons",$$slots:{default:[_Q]},$$scope:{ctx:t}}}),{c(){W(e.$$.fragment)},l(r){V(e.$$.fragment,r)},m(r,a){k(e,r,a),n=!0},p(r,a){const s={};a&17&&(s.$$scope={dirty:a,ctx:r}),e.$set(s)},i(r){n||(K(e.$$.fragment,r),n=!0)},o(r){G(e.$$.fragment,r),n=!1},d(r){Y(e,r)}}}function dQ(t){let e,n;const r=[t[1]];let a={$$slots:{default:[vQ]},$$scope:{ctx:t}};for(let s=0;s{"stations"in l&&n(0,r=l.stations),"reqs"in l&&n(1,a=l.reqs)},t.$$.update=()=>{t.$$.dirty&1&&s.setFirecons(r)},[r,a,o]}class mQ extends oe{constructor(e){super();le(this,e,$Q,dQ,fe,{stations:0,reqs:1})}}function yQ(t){let e,n,r;return{c(){e=D("input"),this.h()},l(a){e=F(a,"INPUT",{type:!0,class:!0}),this.h()},h(){E(e,"type","number"),E(e,"class","short")},m(a,s){R(a,e,s),Ye(e,t[0]),n||(r=Pe(e,"input",t[2]),n=!0)},p(a,s){s&1&&Xe(e.value)!==a[0]&&Ye(e,a[0])},d(a){a&&w(e),n=!1,r()}}}function bQ(t){let e,n;return e=new nt({props:{label:"ADFC",$$slots:{default:[yQ]},$$scope:{ctx:t}}}),{c(){W(e.$$.fragment)},l(r){V(e.$$.fragment,r)},m(r,a){k(e,r,a),n=!0},p(r,a){const s={};a&17&&(s.$$scope={dirty:a,ctx:r}),e.$set(s)},i(r){n||(K(e.$$.fragment,r),n=!0)},o(r){G(e.$$.fragment,r),n=!1},d(r){Y(e,r)}}}function wQ(t){let e,n;const r=[t[1]];let a={$$slots:{default:[bQ]},$$scope:{ctx:t}};for(let s=0;s{"rating"in l&&n(0,r=l.rating),"reqs"in l&&n(1,a=l.reqs)},t.$$.update=()=>{t.$$.dirty&1&&s.setADFC(r)},[r,a,o]}class OQ extends oe{constructor(e){super();le(this,e,AQ,wQ,fe,{rating:0,reqs:1})}}function _v(t,e,n){const r=t.slice();return r[4]=e[n],r}function vv(t,e){let n,r=e[4].name+"",a,s;return{key:t,first:null,c(){n=D("option"),a=re(r),this.h()},l(o){n=F(o,"OPTION",{});var l=j(n);a=ie(l,r),l.forEach(w),this.h()},h(){n.__value=s=e[4].type,n.value=n.__value,this.first=n},m(o,l){R(o,n,l),M(n,a)},p(o,l){e=o},d(o){o&&w(n)}}}function TQ(t){let e,n=[],r=new Map,a,s,o,l,c,h=fa;const p=_=>_[4].type;for(let _=0;_t[3].call(e)),E(s,"class","button small primary")},m(_,v){R(_,e,v);for(let m=0;mr.dispatch.addWeapon(a);function o(){a=ea(this),n(0,a)}return t.$$set=l=>{"ship"in l&&n(2,r=l.ship)},[a,s,r,o]}class EQ extends oe{constructor(e){super();le(this,e,CQ,SQ,fe,{ship:2})}}function IQ(t){let e,n,r,a;return{c(){e=Mn("g"),n=Mn("path"),this.h()},l(s){e=xn(s,"g",{transform:!0});var o=j(e);n=xn(o,"path",{d:!0,class:!0}),j(n).forEach(w),o.forEach(w),this.h()},h(){E(n,"d",t[1]),E(n,"class","svelte-jxsibt"),ke(n,"active",t[0]),E(e,"transform",t[2])},m(s,o){R(s,e,o),M(e,n),r||(a=Pe(n,"click",t[7]),r=!0)},p(s,[o]){o&2&&E(n,"d",s[1]),o&1&&ke(n,"active",s[0]),o&4&&E(e,"transform",s[2])},i:De,o:De,d(s){s&&w(e),r=!1,a()}}}function PQ(t,e,n){let{arc:r}=e,{radius:a}=e,{active:s=!1}=e;const o={F:0,FS:300,AS:240,A:180,AP:120,FP:60};let l,c,h,p;function _(v){Tl.call(this,t,v)}return t.$$set=v=>{"arc"in v&&n(3,r=v.arc),"radius"in v&&n(4,a=v.radius),"active"in v&&n(0,s=v.active)},t.$$.update=()=>{t.$$.dirty&16&&n(5,l=Math.round(a*(1-Math.sin(60/180*Math.PI)))),t.$$.dirty&16&&n(6,c=Math.round(a*Math.cos(60/180*Math.PI))),t.$$.dirty&112&&n(1,h=`M ${a},${a} L ${a-c},${l} A ${a},${a} 0 0 1 ${a+c},${l} Z`),t.$$.dirty&24&&n(2,p=`rotate(${o[r]},${a},${a})`)},[s,h,p,r,a,l,c,_]}class MQ extends oe{constructor(e){super();le(this,e,PQ,IQ,fe,{arc:3,radius:4,active:0})}}function dv(t,e,n){const r=t.slice();return r[8]=e[n],r}function $v(t,e){let n,r,a;function s(){return e[6](e[8])}return r=new MQ({props:{arc:e[8],radius:e[1]/2,active:e[0].includes(e[8])}}),r.$on("click",s),{key:t,first:null,c(){n=gt(),W(r.$$.fragment),this.h()},l(o){n=gt(),V(r.$$.fragment,o),this.h()},h(){this.first=n},m(o,l){R(o,n,l),k(r,o,l),a=!0},p(o,l){e=o;const c={};l&2&&(c.radius=e[1]/2),l&1&&(c.active=e[0].includes(e[8])),r.$set(c)},i(o){a||(K(r.$$.fragment,o),a=!0)},o(o){G(r.$$.fragment,o),a=!1},d(o){o&&w(n),Y(r,o)}}}function xQ(t){let e,n=[],r=new Map,a,s,o,l,c,h=t[2];const p=m=>m[8];for(let m=0;mc("click_arc",_),p=_=>h(_);return t.$$set=_=>{"selected"in _&&n(0,o=_.selected),"size"in _&&n(1,l=_.size),"$$scope"in _&&n(4,a=_.$$scope)},[o,l,s,h,a,r,p]}class lu extends oe{constructor(e){super();le(this,e,RQ,xQ,fe,{selected:0,size:1})}}function mv(t,e,n){const r=t.slice();return r[2]=e[n],r}function LQ(t){let e,n,r,a,s,o,l,c,h,p,_;return{c(){e=D("select"),n=D("option"),r=re("1"),a=D("option"),s=re("2"),o=D("option"),l=re("3"),c=D("option"),h=re("4"),this.h()},l(v){e=F(v,"SELECT",{});var m=j(e);n=F(m,"OPTION",{});var b=j(n);r=ie(b,"1"),b.forEach(w),a=F(m,"OPTION",{});var T=j(a);s=ie(T,"2"),T.forEach(w),o=F(m,"OPTION",{});var I=j(o);l=ie(I,"3"),I.forEach(w),c=F(m,"OPTION",{});var S=j(c);h=ie(S,"4"),S.forEach(w),m.forEach(w),this.h()},h(){n.__value=1,n.value=n.__value,a.__value=2,a.value=a.__value,o.__value=3,o.value=o.__value,c.__value=4,c.value=c.__value,t[0]===void 0&&Jr(()=>t[6].call(e))},m(v,m){R(v,e,m),M(e,n),M(n,r),M(e,a),M(a,s),M(e,o),M(o,l),M(e,c),M(c,h),cn(e,t[0]),p||(_=Pe(e,"change",t[6]),p=!0)},p(v,m){m&1&&cn(e,v[0])},d(v){v&&w(e),p=!1,_()}}}function yv(t,e){let n,r=e[2]+"",a,s;return{key:t,first:null,c(){n=D("option"),a=re(r),this.h()},l(o){n=F(o,"OPTION",{});var l=j(n);a=ie(l,r),l.forEach(w),this.h()},h(){n.__value=s=e[2],n.value=n.__value,this.first=n},m(o,l){R(o,n,l),M(n,a)},p(o,l){e=o,l&1&&r!==(r=e[2]+"")&&_t(a,r),l&1&&s!==(s=e[2])&&(n.__value=s,n.value=n.__value)},d(o){o&&w(n)}}}function DQ(t){let e,n=[],r=new Map,a,s,o=t[3][t[0]]||[];const l=c=>c[2];for(let c=0;ct[7].call(e))},m(c,h){R(c,e,h);for(let p=0;pS===T);I===-1&&(I=0),n(1,o=Array.from({length:c}).map((S,L)=>a[(I+L)%a.length])),n(5,r=o.join(","))}const _=Qr();function v(){s=ea(this),n(0,s)}function m(){c=ea(this),n(2,c),n(3,l),n(0,s),n(3,l),n(0,s)}const b=({detail:T})=>p(T);return t.$$set=T=>{"weaponClass"in T&&n(0,s=T.weaponClass),"arcs"in T&&n(1,o=T.arcs)},t.$$.update=()=>{t.$$.dirty&2&&n(5,r=o.join(",")),t.$$.dirty&5&&(l[s].includes(c)||(n(2,c=l[s][0]),console.log({nbrArcs:c,label:"in if"}))),t.$$.dirty&6&&o.length!==c&&p(o[0]),t.$$.dirty&2&&console.log("it changed!",o),t.$$.dirty&32&&console.log("it changed!",r),t.$$.dirty&33&&_("change",{weaponClass:s,arcs:r.split(",")})},[s,o,c,l,p,r,v,m,b]}class BQ extends oe{constructor(e){super();le(this,e,NQ,FQ,fe,{weaponClass:0,arcs:1})}}function jQ(t){let e,n,r,a,s;return a=new lu({props:{selected:[t[0]]}}),a.$on("click_arc",t[2]),{c(){e=D("label"),n=re("submunition pack"),r=Q(),W(a.$$.fragment)},l(o){e=F(o,"LABEL",{});var l=j(e);n=ie(l,"submunition pack"),l.forEach(w),r=ee(o),V(a.$$.fragment,o)},m(o,l){R(o,e,l),M(e,n),R(o,r,l),k(a,o,l),s=!0},p(o,[l]){const c={};l&1&&(c.selected=[o[0]]),a.$set(c)},i(o){s||(K(a.$$.fragment,o),s=!0)},o(o){G(a.$$.fragment,o),s=!1},d(o){o&&w(e),o&&w(r),Y(a,o)}}}function UQ(t,e,n){let{arc:r="F"}=e;const a=Qr(),s=l=>{a("change",{arc:l})},o=({detail:l})=>s(l);return t.$$set=l=>{"arc"in l&&n(0,r=l.arc)},[r,s,o]}class qQ extends oe{constructor(e){super();le(this,e,UQ,jQ,fe,{arc:0})}}function KQ(t){let e,n;return{c(){e=D("label"),n=re("point defence system")},l(r){e=F(r,"LABEL",{});var a=j(e);n=ie(a,"point defence system"),a.forEach(w)},m(r,a){R(r,e,a),M(e,n)},p:De,i:De,o:De,d(r){r&&w(e)}}}class GQ extends oe{constructor(e){super();le(this,e,null,KQ,fe,{})}}function zQ(t){let e,n;return{c(){e=D("label"),n=re("scattergun")},l(r){e=F(r,"LABEL",{});var a=j(e);n=ie(a,"scattergun"),a.forEach(w)},m(r,a){R(r,e,a),M(e,n)},p:De,i:De,o:De,d(r){r&&w(e)}}}class HQ extends oe{constructor(e){super();le(this,e,null,zQ,fe,{})}}function WQ(t){let e,n,r,a,s;return a=new lu({props:{selected:[t[0]]}}),a.$on("click_arc",t[2]),{c(){e=D("label"),n=re("needle weapon"),r=Q(),W(a.$$.fragment)},l(o){e=F(o,"LABEL",{});var l=j(e);n=ie(l,"needle weapon"),l.forEach(w),r=ee(o),V(a.$$.fragment,o)},m(o,l){R(o,e,l),M(e,n),R(o,r,l),k(a,o,l),s=!0},p(o,[l]){const c={};l&1&&(c.selected=[o[0]]),a.$set(c)},i(o){s||(K(a.$$.fragment,o),s=!0)},o(o){G(a.$$.fragment,o),s=!1},d(o){o&&w(e),o&&w(r),Y(a,o)}}}function kQ(t,e,n){let{arc:r="F"}=e;const a=Qr(),s=l=>{a("change",{arc:l})},o=({detail:l})=>s(l);return t.$$set=l=>{"arc"in l&&n(0,r=l.arc)},[r,s,o]}class YQ extends oe{constructor(e){super();le(this,e,kQ,WQ,fe,{arc:0})}}function VQ(t){let e,n,r,a,s,o,l,c;const h=[t[0]];var p=t[3][t[1]];function _(v){let m={};for(let b=0;b{Y(T,1)}),Ln()}p?(s=new p(_()),s.$on("change",v[5]),W(s.$$.fragment),K(s.$$.fragment,1),k(s,e,null)):s=null}else p&&s.$set(b)},i(v){o||(s&&K(s.$$.fragment,v),o=!0)},o(v){s&&G(s.$$.fragment,v),o=!1},d(v){v&&w(e),s&&Y(s),l=!1,c()}}}function ZQ(t){let e,n;const r=[t[2]];let a={$$slots:{default:[VQ]},$$scope:{ctx:t}};for(let s=0;sc.dispatch.removeWeapon(l),p=({detail:_})=>{console.log({id:l,type:a}),c.dispatch.setWeapon(zi({id:l,type:a},_))};return t.$$set=_=>{"weapon"in _&&n(0,o=_.weapon),"id"in _&&n(6,l=_.id)},t.$$.update=()=>{t.$$.dirty&1&&n(2,r=o.reqs),t.$$.dirty&1&&n(1,a=o.type)},[o,a,r,s,h,p,l]}class JQ extends oe{constructor(e){super();le(this,e,XQ,ZQ,fe,{weapon:0,id:6})}}function bv(t,e,n){const r=t.slice();return r[3]=e[n],r}function wv(t,e){let n,r,a;return r=new JQ({props:{weapon:e[3],id:e[3].id}}),{key:t,first:null,c(){n=gt(),W(r.$$.fragment),this.h()},l(s){n=gt(),V(r.$$.fragment,s),this.h()},h(){this.first=n},m(s,o){R(s,n,o),k(r,s,o),a=!0},p(s,o){e=s;const l={};o&4&&(l.weapon=e[3]),o&4&&(l.id=e[3].id),r.$set(l)},i(s){a||(K(r.$$.fragment,s),a=!0)},o(s){G(r.$$.fragment,s),a=!1},d(s){s&&w(n),Y(r,s)}}}function QQ(t){let e,n,r,a,s,o,l=[],c=new Map,h,p;const _=[t[0]];let v={};for(let S=0;S<_.length;S+=1)v=me(v,_[S]);e=new mQ({props:v});const m=[t[1]];let b={};for(let S=0;SS[3].id;for(let S=0;S{"firecons"in o&&n(0,r=o.firecons),"adfc"in o&&n(1,a=o.adfc),"weapons"in o&&n(2,s=o.weapons)},[r,a,s]}class nee extends oe{constructor(e){super();le(this,e,tee,eee,fe,{firecons:0,adfc:1,weapons:2})}}function ree(t){let e,n,r,a,s,o,l,c,h,p,_,v,m,b;const T=[t[0].identification];let I={};for(let X=0;Xn(0,r=s)),[r,a]}class aee extends oe{constructor(e){super();le(this,e,iee,ree,fe,{})}}function see(t){let e,n,r,a,s,o,l,c,h,p,_;return{c(){e=D("div"),n=D("button"),r=re("save"),a=Q(),s=D("pre"),o=D("code"),l=re(t[0]),c=Q(),h=D("a"),this.h()},l(v){e=F(v,"DIV",{class:!0});var m=j(e);n=F(m,"BUTTON",{class:!0});var b=j(n);r=ie(b,"save"),b.forEach(w),a=ee(m),s=F(m,"PRE",{class:!0});var T=j(s);o=F(T,"CODE",{});var I=j(o);l=ie(I,t[0]),I.forEach(w),T.forEach(w),m.forEach(w),c=ee(v),h=F(v,"A",{href:!0,download:!0}),j(h).forEach(w),this.h()},h(){E(n,"class","button primary svelte-1f6rwrs"),E(s,"class","svelte-1f6rwrs"),E(e,"class","svelte-1f6rwrs"),E(h,"href",t[3]),E(h,"download",t[2]),kn(h,"display","none",!1)},m(v,m){R(v,e,m),M(e,n),M(n,r),M(e,a),M(e,s),M(s,o),M(o,l),R(v,c,m),R(v,h,m),t[8](h),p||(_=Pe(n,"click",t[5]),p=!0)},p(v,[m]){m&1&&_t(l,v[0]),m&8&&E(h,"href",v[3]),m&4&&E(h,"download",v[2])},i:De,o:De,d(v){v&&w(e),v&&w(c),v&&w(h),t[8](null),p=!1,_()}}}function uee(t,e,n){let r,a,s,{ship:o={}}=e,l;const{state:c}=tt("ship");ca(t,c,v=>n(7,s=v)),Qr();let h;function p(){h==null||h.click()}function _(v){Xr[v?"unshift":"push"](()=>{h=v,n(1,h)})}return t.$$set=v=>{"ship"in v&&n(6,o=v.ship)},t.$$.update=()=>{var v,m;t.$$.dirty&64&&n(0,l=JSON.stringify(o,null,2)),t.$$.dirty&128&&n(0,l=JSON.stringify(s,null,2)),t.$$.dirty&1&&n(3,r="data:text/plain;charset=utf-8,"+encodeURIComponent(l)),t.$$.dirty&128&&n(2,a=((m=(v=s==null?void 0:s.identification)==null?void 0:v.shipClass)!=null?m:"ship")+".json")},[l,h,a,r,c,p,o,s,_]}class oee extends oe{constructor(e){super();le(this,e,uee,see,fe,{ship:6})}}function lee(t){let e,n;return{c(){e=D("div"),n=re(t[0]),this.h()},l(r){e=F(r,"DIV",{class:!0});var a=j(e);n=ie(a,t[0]),a.forEach(w),this.h()},h(){E(e,"class","svelte-uinb9")},m(r,a){R(r,e,a),M(e,n)},p(r,[a]){a&1&&_t(n,r[0])},i:De,o:De,d(r){r&&w(e)}}}function fee(t,e,n){let{cost:r=0}=e;return t.$$set=a=>{"cost"in a&&n(0,r=a.cost)},[r]}class cee extends oe{constructor(e){super();le(this,e,fee,lee,fe,{cost:0})}}function hee(t){let e,n;return{c(){e=D("div"),n=re(t[0]),this.h()},l(r){e=F(r,"DIV",{class:!0});var a=j(e);n=ie(a,t[0]),a.forEach(w),this.h()},h(){E(e,"class","svelte-ylboiy")},m(r,a){R(r,e,a),M(e,n)},p(r,[a]){a&1&&_t(n,r[0])},i:De,o:De,d(r){r&&w(e)}}}function pee(t,e,n){let{mass:r=0}=e;return t.$$set=a=>{"mass"in a&&n(0,r=a.mass)},[r]}class gee extends oe{constructor(e){super();le(this,e,pee,hee,fe,{mass:0})}}function Av(t){let e,n;return{c(){e=re(t[0]),n=re("-class,")},l(r){e=ie(r,t[0]),n=ie(r,"-class,")},m(r,a){R(r,e,a),R(r,n,a)},p(r,a){a&1&&_t(e,r[0])},d(r){r&&w(e),r&&w(n)}}}function _ee(t){let e,n,r,a,s,o,l,c,h,p,_,v,m,b,T=t[0]&&Av(t);return _=new cee({props:{cost:t[2]}}),m=new gee({props:{mass:t[3]}}),{c(){e=D("h1"),n=re("ship name: "),r=D("div"),a=Q(),s=D("div"),o=D("h2"),T&&T.c(),l=Q(),c=re(t[1]),h=Q(),p=D("div"),W(_.$$.fragment),v=re(` \xA0 `),W(m.$$.fragment),this.h()},l(I){e=F(I,"H1",{class:!0});var S=j(e);n=ie(S,"ship name: "),r=F(S,"DIV",{class:!0}),j(r).forEach(w),S.forEach(w),a=ee(I),s=F(I,"DIV",{class:!0});var L=j(s);o=F(L,"H2",{class:!0});var Z=j(o);T&&T.l(Z),l=ee(Z),c=ie(Z,t[1]),Z.forEach(w),h=ee(L),p=F(L,"DIV",{class:!0});var ne=j(p);V(_.$$.fragment,ne),v=ie(ne,` \xA0 `),V(m.$$.fragment,ne),ne.forEach(w),L.forEach(w),this.h()},h(){E(r,"class","fill svelte-1v8962g"),E(e,"class","svelte-1v8962g"),E(o,"class","svelte-1v8962g"),E(p,"class","reqs svelte-1v8962g"),E(s,"class","details svelte-1v8962g")},m(I,S){R(I,e,S),M(e,n),M(e,r),R(I,a,S),R(I,s,S),M(s,o),T&&T.m(o,null),M(o,l),M(o,c),M(s,h),M(s,p),k(_,p,null),M(p,v),k(m,p,null),b=!0},p(I,[S]){I[0]?T?T.p(I,S):(T=Av(I),T.c(),T.m(o,l)):T&&(T.d(1),T=null),(!b||S&2)&&_t(c,I[1]);const L={};S&4&&(L.cost=I[2]),_.$set(L);const Z={};S&8&&(Z.mass=I[3]),m.$set(Z)},i(I){b||(K(_.$$.fragment,I),K(m.$$.fragment,I),b=!0)},o(I){G(_.$$.fragment,I),G(m.$$.fragment,I),b=!1},d(I){I&&w(e),I&&w(a),I&&w(s),T&&T.d(),Y(_),Y(m)}}}function vee(t,e,n){let{shipClass:r}=e,{shipType:a}=e,{cost:s=0}=e,{mass:o=0}=e;return t.$$set=l=>{"shipClass"in l&&n(0,r=l.shipClass),"shipType"in l&&n(1,a=l.shipType),"cost"in l&&n(2,s=l.cost),"mass"in l&&n(3,o=l.mass)},[r,a,s,o]}class dee extends oe{constructor(e){super();le(this,e,vee,_ee,fe,{shipClass:0,shipType:1,cost:2,mass:3})}}function Ov(t){let e,n;return{c(){e=D("img"),this.h()},l(r){e=F(r,"IMG",{class:!0,src:!0,alt:!0}),this.h()},h(){E(e,"class","ftl svelte-shcd13"),ei(e.src,n="icons/ftl-drive.svg")||E(e,"src",n),E(e,"alt","ftl drive")},m(r,a){R(r,e,a)},d(r){r&&w(e)}}}function Tv(t){let e,n;return{c(){e=D("div"),n=re(t[1]),this.h()},l(r){e=F(r,"DIV",{class:!0});var a=j(e);n=ie(a,t[1]),a.forEach(w),this.h()},h(){E(e,"class","thrust svelte-shcd13")},m(r,a){R(r,e,a),M(e,n)},p(r,a){a&2&&_t(n,r[1])},d(r){r&&w(e)}}}function $ee(t){let e,n,r,a,s,o=t[0]!=="none"&&Ov(),l=t[1]>0&&Tv(t);return{c(){e=D("div"),o&&o.c(),n=Q(),l&&l.c(),r=Q(),a=D("img"),this.h()},l(c){e=F(c,"DIV",{class:!0});var h=j(e);o&&o.l(h),n=ee(h),l&&l.l(h),r=ee(h),a=F(h,"IMG",{class:!0,src:!0,alt:!0}),h.forEach(w),this.h()},h(){E(a,"class","internal svelte-shcd13"),ei(a.src,s="icons/internal-systems.svg")||E(a,"src",s),E(a,"alt","internal systems"),E(e,"class","main_systems svelte-shcd13")},m(c,h){R(c,e,h),o&&o.m(e,null),M(e,n),l&&l.m(e,null),M(e,r),M(e,a)},p(c,[h]){c[0]!=="none"?o||(o=Ov(),o.c(),o.m(e,n)):o&&(o.d(1),o=null),c[1]>0?l?l.p(c,h):(l=Tv(c),l.c(),l.m(e,r)):l&&(l.d(1),l=null)},i:De,o:De,d(c){c&&w(e),o&&o.d(),l&&l.d()}}}function mee(t,e,n){let{ftl:r="none"}=e,{engine:a=0}=e;return t.$$set=s=>{"ftl"in s&&n(0,r=s.ftl),"engine"in s&&n(1,a=s.engine)},[r,a]}class yee extends oe{constructor(e){super();le(this,e,mee,$ee,fe,{ftl:0,engine:1})}}function Sv(t,e,n){const r=t.slice();return r[7]=e[n],r[9]=n,r}function Cv(t,e,n){const r=t.slice();return r[10]=e[n],r[12]=n,r}function Ev(t){let e,n;return{c(){e=D("img"),this.h()},l(r){e=F(r,"IMG",{src:!0,alt:!0,class:!0}),this.h()},h(){ei(e.src,n="icons/crew-star.svg")||E(e,"src",n),E(e,"alt","crew loss threshold"),E(e,"class","svelte-1uhhjap")},m(r,a){R(r,e,a)},d(r){r&&w(e)}}}function Iv(t,e){let n,r=e[10]&&Ev();return{key:t,first:null,c(){n=D("div"),r&&r.c(),this.h()},l(a){n=F(a,"DIV",{class:!0});var s=j(n);r&&r.l(s),s.forEach(w),this.h()},h(){E(n,"class","cell svelte-1uhhjap"),this.first=n},m(a,s){R(a,n,s),r&&r.m(n,null)},p(a,s){e=a,e[10]?r||(r=Ev(),r.c(),r.m(n,null)):r&&(r.d(1),r=null)},d(a){a&&w(n),r&&r.d()}}}function Pv(t,e){let n,r=[],a=new Map,s,o=e[7];const l=c=>c[12];for(let c=0;co[9];for(let o=0;o{"shipMass"in p&&n(1,r=p.shipMass),"rating"in p&&n(2,a=p.rating),"advanced"in p&&n(3,s=p.advanced)},t.$$.update=()=>{t.$$.dirty&8&&n(4,o=s?3:4),t.$$.dirty&4&&n(5,l=Array(a).fill(!1)),t.$$.dirty&2&&n(6,c=Math.ceil(r/20)),t.$$.dirty&96&&n(5,l=Ol(l,c).map(p=>(p[p.length-1]=!0,p)).flat()),t.$$.dirty&48&&n(0,h=Ol(l,o))},[h,r,a,s,o,l,c]}class Aee extends oe{constructor(e){super();le(this,e,wee,bee,fe,{shipMass:1,rating:2,advanced:3})}}function Mv(t,e,n){const r=t.slice();return r[1]=e[n],r[3]=n,r}function xv(t,e,n){const r=t.slice();return r[4]=e[n],r}function Rv(t){let e;return{c(){e=D("div"),this.h()},l(n){e=F(n,"DIV",{class:!0}),j(e).forEach(w),this.h()},h(){E(e,"class","cell svelte-86wmvt")},m(n,r){R(n,e,r)},d(n){n&&w(e)}}}function Lv(t,e){let n,r,a=Array.from({length:e[1]}),s=[];for(let o=0;oo[3];for(let o=0;o{"armor"in a&&n(0,r=a.armor)},[r]}class See extends oe{constructor(e){super();le(this,e,Tee,Oee,fe,{armor:0})}}function Cee(t){let e,n,r,a,s;return n=new See({props:{armour:t[0].armour}}),a=new Aee({props:{rating:t[0].hull.rating,advanced:t[0].hull.advanced,ship_mass:t[1]}}),{c(){e=D("div"),W(n.$$.fragment),r=Q(),W(a.$$.fragment)},l(o){e=F(o,"DIV",{});var l=j(e);V(n.$$.fragment,l),r=ee(l),V(a.$$.fragment,l),l.forEach(w)},m(o,l){R(o,e,l),k(n,e,null),M(e,r),k(a,e,null),s=!0},p(o,[l]){const c={};l&1&&(c.armour=o[0].armour),n.$set(c);const h={};l&1&&(h.rating=o[0].hull.rating),l&1&&(h.advanced=o[0].hull.advanced),l&2&&(h.ship_mass=o[1]),a.$set(h)},i(o){s||(K(n.$$.fragment,o),K(a.$$.fragment,o),s=!0)},o(o){G(n.$$.fragment,o),G(a.$$.fragment,o),s=!1},d(o){o&&w(e),Y(n),Y(a)}}}function Eee(t,e,n){let{structure:r={}}=e,{ship_mass:a=0}=e;return t.$$set=s=>{"structure"in s&&n(0,r=s.structure),"ship_mass"in s&&n(1,a=s.ship_mass)},[r,a]}class Iee extends oe{constructor(e){super();le(this,e,Eee,Cee,fe,{structure:0,ship_mass:1})}}function Pee(t){let e,n;return{c(){e=Mn("text"),n=re(t[0]),this.h()},l(r){e=xn(r,"text",{x:!0,y:!0,class:!0});var a=j(e);n=ie(a,t[0]),a.forEach(w),this.h()},h(){E(e,"x","50%"),E(e,"y","50%"),E(e,"class","svelte-1u8rlr5")},m(r,a){R(r,e,a),M(e,n)},p(r,a){a&1&&_t(n,r[0])},d(r){r&&w(e)}}}function Mee(t){let e,n,r;return n=new lu({props:{selected:t[1],size:"40",$$slots:{default:[Pee]},$$scope:{ctx:t}}}),{c(){e=D("div"),W(n.$$.fragment),this.h()},l(a){e=F(a,"DIV",{class:!0});var s=j(e);V(n.$$.fragment,s),s.forEach(w),this.h()},h(){E(e,"class","svelte-1u8rlr5")},m(a,s){R(a,e,s),k(n,e,null),r=!0},p(a,[s]){const o={};s&2&&(o.selected=a[1]),s&5&&(o.$$scope={dirty:s,ctx:a}),n.$set(o)},i(a){r||(K(n.$$.fragment,a),r=!0)},o(a){G(n.$$.fragment,a),r=!1},d(a){a&&w(e),Y(n)}}}function xee(t,e,n){let{weaponClass:r=1}=e,{arcs:a=[]}=e;return t.$$set=s=>{"weaponClass"in s&&n(0,r=s.weaponClass),"arcs"in s&&n(1,a=s.arcs)},[r,a]}class Ree extends oe{constructor(e){super();le(this,e,xee,Mee,fe,{weaponClass:0,arcs:1})}}function Dv(t,e,n){const r=t.slice();return r[2]=e[n],r}function Fv(t){let e,n;const r=[t[2]];let a={};for(let s=0;sG(s[l],1,1,()=>{s[l]=null});return{c(){e=D("div"),n=D("div");for(let l=0;l{"weapons"in s&&n(1,r=s.weapons)},t.$$.update=()=>{t.$$.dirty&2&&n(0,a=r.filter(({type:s})=>s==="beam"))},[a,r]}class Fee extends oe{constructor(e){super();le(this,e,Dee,Lee,fe,{weapons:1})}}function Zr(t,e){return e===void 0&&(e=t,t=0),Array.from({length:1+e-t}).map((n,r)=>r+t)}function Nv(t,e,n){const r=t.slice();return r[1]=e[n],r}function Bv(t){let e,n;return{c(){e=D("img"),this.h()},l(r){e=F(r,"IMG",{class:!0,src:!0,alt:!0}),this.h()},h(){E(e,"class","firecon svelte-d2fjdl"),ei(e.src,n="icons/firecon.svg")||E(e,"src",n),E(e,"alt","firecon")},m(r,a){R(r,e,a)},d(r){r&&w(e)}}}function Nee(t){let e,n=Zr(1,t[0]),r=[];for(let a=0;a{"firecons"in a&&n(0,r=a.firecons)},[r]}class jee extends oe{constructor(e){super();le(this,e,Bee,Nee,fe,{firecons:0})}}function jv(t,e,n){const r=t.slice();return r[2]=e[n],r}function Uv(t,e,n){const r=t.slice();return r[2]=e[n],r}function qv(t){let e,n;return{c(){e=D("img"),this.h()},l(r){e=F(r,"IMG",{src:!0,alt:!0,class:!0}),this.h()},h(){ei(e.src,n="icons/screen.svg")||E(e,"src",n),E(e,"alt","screen"),E(e,"class","svelte-kh7po5")},m(r,a){R(r,e,a)},d(r){r&&w(e)}}}function Kv(t){let e,n;return{c(){e=D("img"),this.h()},l(r){e=F(r,"IMG",{src:!0,alt:!0,class:!0}),this.h()},h(){ei(e.src,n="icons/screen-advanced.svg")||E(e,"src",n),E(e,"alt","advanced screen"),E(e,"class","svelte-kh7po5")},m(r,a){R(r,e,a)},d(r){r&&w(e)}}}function Uee(t){let e,n,r=Zr(1,t[0]),a=[];for(let l=0;l{"standard"in s&&n(0,r=s.standard),"advanced"in s&&n(1,a=s.advanced)},[r,a]}class Kee extends oe{constructor(e){super();le(this,e,qee,Uee,fe,{standard:0,advanced:1})}}function Gee(t){let e,n,r,a,s;n=new jee({props:{firecons:t[0]}});const o=[t[1]];let l={};for(let c=0;c{"firecons"in s&&n(0,r=s.firecons),"screens"in s&&n(1,a=s.screens)},[r,a]}class Hee extends oe{constructor(e){super();le(this,e,zee,Gee,fe,{firecons:0,screens:1})}}function Wee(t){var I,S,L,Z,ne,B,ue;let e,n,r,a,s,o,l,c,h,p,_,v,m,b,T;return n=new dee({props:{shipClass:t[0].identification.shipClass,shipType:t[0].identification.shipType,cost:(I=t[0].reqs)==null?void 0:I.cost,mass:(S=t[0].reqs)==null?void 0:S.mass}}),s=new Iee({props:{structure:t[0].structure,shipMass:t[0].identification.mass}}),l=new Hee({props:{firecons:t[0].weaponry.firecons.nbr,screens:t[0].structure.screens}}),h=new Fee({props:{weapons:t[0].weaponry.weapons}}),_=new yee({props:{ftl:(Z=(L=t[0])==null?void 0:L.propulsion)==null?void 0:Z.ftl,engine:(ue=(B=(ne=t[0])==null?void 0:ne.propulsion)==null?void 0:B.drive)==null?void 0:ue.rating}}),{c(){e=D("div"),W(n.$$.fragment),r=Q(),a=D("div"),W(s.$$.fragment),o=Q(),W(l.$$.fragment),c=Q(),W(h.$$.fragment),p=Q(),W(_.$$.fragment),v=Q(),m=D("div"),b=re("Printing this page will only prints the ship sheet."),this.h()},l(H){e=F(H,"DIV",{class:!0});var se=j(e);V(n.$$.fragment,se),r=ee(se),a=F(se,"DIV",{class:!0});var X=j(a);V(s.$$.fragment,X),o=ee(X),V(l.$$.fragment,X),X.forEach(w),c=ee(se),V(h.$$.fragment,se),p=ee(se),V(_.$$.fragment,se),se.forEach(w),v=ee(H),m=F(H,"DIV",{class:!0});var $e=j(m);b=ie($e,"Printing this page will only prints the ship sheet."),$e.forEach(w),this.h()},h(){E(a,"class","section-2 svelte-184q87j"),E(e,"class","print-output svelte-184q87j"),E(m,"class","notice svelte-184q87j")},m(H,se){R(H,e,se),k(n,e,null),M(e,r),M(e,a),k(s,a,null),M(a,o),k(l,a,null),M(e,c),k(h,e,null),M(e,p),k(_,e,null),R(H,v,se),R(H,m,se),M(m,b),T=!0},p(H,[se]){var rt,Nt,yn,At,Yt,wa,ir;const X={};se&1&&(X.shipClass=H[0].identification.shipClass),se&1&&(X.shipType=H[0].identification.shipType),se&1&&(X.cost=(rt=H[0].reqs)==null?void 0:rt.cost),se&1&&(X.mass=(Nt=H[0].reqs)==null?void 0:Nt.mass),n.$set(X);const $e={};se&1&&($e.structure=H[0].structure),se&1&&($e.shipMass=H[0].identification.mass),s.$set($e);const ce={};se&1&&(ce.firecons=H[0].weaponry.firecons.nbr),se&1&&(ce.screens=H[0].structure.screens),l.$set(ce);const Re={};se&1&&(Re.weapons=H[0].weaponry.weapons),h.$set(Re);const Je={};se&1&&(Je.ftl=(At=(yn=H[0])==null?void 0:yn.propulsion)==null?void 0:At.ftl),se&1&&(Je.engine=(ir=(wa=(Yt=H[0])==null?void 0:Yt.propulsion)==null?void 0:wa.drive)==null?void 0:ir.rating),_.$set(Je)},i(H){T||(K(n.$$.fragment,H),K(s.$$.fragment,H),K(l.$$.fragment,H),K(h.$$.fragment,H),K(_.$$.fragment,H),T=!0)},o(H){G(n.$$.fragment,H),G(s.$$.fragment,H),G(l.$$.fragment,H),G(h.$$.fragment,H),G(_.$$.fragment,H),T=!1},d(H){H&&w(e),Y(n),Y(s),Y(l),Y(h),Y(_),H&&w(v),H&&w(m)}}}function kee(t,e,n){let{ship:r={}}=e;return t.$$set=a=>{"ship"in a&&n(0,r=a.ship)},[r]}class Yee extends oe{constructor(e){super();le(this,e,kee,Wee,fe,{ship:0})}}function Vee(t){let e,n,r,a,s,o,l,c,h,p,_,v,m,b,T,I;return a=new PX({}),o=new GX({}),o.$on("changeTab",t[3]),h=new aee({}),v=new oee({}),T=new Yee({props:{ship:t[1]}}),{c(){e=D("meta"),n=Q(),r=D("main"),W(a.$$.fragment),s=Q(),W(o.$$.fragment),l=Q(),c=D("div"),W(h.$$.fragment),p=Q(),_=D("div"),W(v.$$.fragment),m=Q(),b=D("div"),W(T.$$.fragment),this.h()},l(S){const L=X2('[data-svelte="svelte-wq1q9u"]',document.head);e=F(L,"META",{name:!0,content:!0}),L.forEach(w),n=ee(S),r=F(S,"MAIN",{class:!0});var Z=j(r);V(a.$$.fragment,Z),s=ee(Z),V(o.$$.fragment,Z),l=ee(Z),c=F(Z,"DIV",{class:!0});var ne=j(c);V(h.$$.fragment,ne),ne.forEach(w),p=ee(Z),_=F(Z,"DIV",{class:!0});var B=j(_);V(v.$$.fragment,B),B.forEach(w),m=ee(Z),b=F(Z,"DIV",{class:!0});var ue=j(b);V(T.$$.fragment,ue),ue.forEach(w),Z.forEach(w),this.h()},h(){E(e,"name","viewport"),E(e,"content","width=960"),E(c,"class","svelte-khn038"),ke(c,"hide",t[0]!=="editor"),E(_,"class","svelte-khn038"),ke(_,"hide",t[0]!=="json"),E(b,"class","svelte-khn038"),ke(b,"hide",t[0]!=="print"),E(r,"class","svelte-khn038")},m(S,L){M(document.head,e),R(S,n,L),R(S,r,L),k(a,r,null),M(r,s),k(o,r,null),M(r,l),M(r,c),k(h,c,null),M(r,p),M(r,_),k(v,_,null),M(r,m),M(r,b),k(T,b,null),I=!0},p(S,[L]){L&1&&ke(c,"hide",S[0]!=="editor"),L&1&&ke(_,"hide",S[0]!=="json");const Z={};L&2&&(Z.ship=S[1]),T.$set(Z),L&1&&ke(b,"hide",S[0]!=="print")},i(S){I||(K(a.$$.fragment,S),K(o.$$.fragment,S),K(h.$$.fragment,S),K(v.$$.fragment,S),K(T.$$.fragment,S),I=!0)},o(S){G(a.$$.fragment,S),G(o.$$.fragment,S),G(h.$$.fragment,S),G(v.$$.fragment,S),G(T.$$.fragment,S),I=!1},d(S){w(e),S&&w(n),S&&w(r),Y(a),Y(o),Y(h),Y(v),Y(T)}}}function Zee(t,e,n){let r,a="editor";const{state:s}=tt("ship");ca(t,s,l=>n(1,r=l));const o=({detail:l})=>n(0,a=l);return t.$$.update=()=>{t.$$.dirty&1&&console.log(a)},[a,r,s,o]}class Xee extends oe{constructor(e){super();le(this,e,Zee,Vee,fe,{})}}function Jee(t){let e,n;return e=new Xee({}),{c(){W(e.$$.fragment)},l(r){V(e.$$.fragment,r)},m(r,a){k(e,r,a),n=!0},p:De,i(r){n||(K(e.$$.fragment,r),n=!0)},o(r){G(e.$$.fragment,r),n=!1},d(r){Y(e,r)}}}function Qee(t){return Wo("ship",gX()),[]}class rte extends oe{constructor(e){super();le(this,e,Qee,Jee,fe,{})}}export{rte as default};