diff --git a/assets/index-CNaM8Iq4.js b/assets/index-BOvE4Tg9.js similarity index 91% rename from assets/index-CNaM8Iq4.js rename to assets/index-BOvE4Tg9.js index 9e224f67..dc451bca 100644 --- a/assets/index-CNaM8Iq4.js +++ b/assets/index-BOvE4Tg9.js @@ -214,13 +214,13 @@ To suppress this warning, you need to explicitly provide the \`palette.${t}Chann `)}function Xe(m,w,T,M){this.failures=w,this.failedKeys=M,this.successCount=T,this.message=Pe(m,w)}function Le(m,w){this.name="BulkError",this.failures=Object.keys(w).map(function(T){return w[T]}),this.failuresByPos=w,this.message=Pe(m,this.failures)}v(Ce).from(Error).extend({toString:function(){return this.name+": "+this.message}}),v(Xe).from(Ce),v(Le).from(Ce);var Ze=Wi.reduce(function(m,w){return m[w]=w+"Error",m},{}),ct=Ce,je=Wi.reduce(function(m,w){var T=w+"Error";function M(N,B){this.name=T,N?typeof N=="string"?(this.message="".concat(N).concat(B?` `+B:""),this.inner=B||null):typeof N=="object"&&(this.message="".concat(N.name," ").concat(N.message),this.inner=N):(this.message=Ue[w]||T,this.inner=null)}return v(M).from(ct),m[w]=M,m},{});je.Syntax=SyntaxError,je.Type=TypeError,je.Range=RangeError;var nt=pe.reduce(function(m,w){return m[w+"Error"]=je[w],m},{}),lt=Wi.reduce(function(m,w){return["Syntax","Type","Range"].indexOf(w)===-1&&(m[w+"Error"]=je[w]),m},{});function Ne(){}function ut(m){return m}function Ke(m,w){return m==null||m===ut?w:function(T){return w(m(T))}}function J(m,w){return function(){m.apply(this,arguments),w.apply(this,arguments)}}function fe(m,w){return m===Ne?w:function(){var T=m.apply(this,arguments);T!==void 0&&(arguments[0]=T);var M=this.onsuccess,N=this.onerror;this.onsuccess=null,this.onerror=null;var B=w.apply(this,arguments);return M&&(this.onsuccess=this.onsuccess?J(M,this.onsuccess):M),N&&(this.onerror=this.onerror?J(N,this.onerror):N),B!==void 0?B:T}}function xe(m,w){return m===Ne?w:function(){m.apply(this,arguments);var T=this.onsuccess,M=this.onerror;this.onsuccess=this.onerror=null,w.apply(this,arguments),T&&(this.onsuccess=this.onsuccess?J(T,this.onsuccess):T),M&&(this.onerror=this.onerror?J(M,this.onerror):M)}}function Ie(m,w){return m===Ne?w:function(T){var M=m.apply(this,arguments);l(T,M);var N=this.onsuccess,B=this.onerror;return this.onsuccess=null,this.onerror=null,T=w.apply(this,arguments),N&&(this.onsuccess=this.onsuccess?J(N,this.onsuccess):N),B&&(this.onerror=this.onerror?J(B,this.onerror):B),M===void 0?T===void 0?void 0:T:l(M,T)}}function z(m,w){return m===Ne?w:function(){return w.apply(this,arguments)!==!1&&m.apply(this,arguments)}}function S(m,w){return m===Ne?w:function(){var T=m.apply(this,arguments);if(T&&typeof T.then=="function"){for(var M=this,N=arguments.length,B=new Array(N);N--;)B[N]=arguments[N];return T.then(function(){return w.apply(M,B)})}return w.apply(this,arguments)}}lt.ModifyError=Xe,lt.DexieError=Ce,lt.BulkError=Le;var I=typeof location<"u"&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);function D(m){I=m}var W={},ee=100,po=typeof Promise>"u"?[]:function(){var m=Promise.resolve();if(typeof crypto>"u"||!crypto.subtle)return[m,c(m),m];var w=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[w,c(w),m]}(),pe=po[0],Wi=po[1],po=po[2],Wi=Wi&&Wi.then,Te=pe&&pe.constructor,Fe=!!po,bt=function(m,w){Nt.push([m,w]),et&&(queueMicrotask(na),et=!1)},rt=!0,et=!0,qe=[],Yt=[],fr=ut,Qe={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:Ne,pgp:!1,env:{},finalize:Ne},Oe=Qe,Nt=[],gr=0,Hr=[];function Ge(m){if(typeof this!="object")throw new TypeError("Promises must be constructed via new");this._listeners=[],this._lib=!1;var w=this._PSD=Oe;if(typeof m!="function"){if(m!==W)throw new TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(this._state===!1&&Xn(this,this._value))}this._state=null,this._value=null,++w.ref,function T(M,N){try{N(function(B){if(M._state===null){if(B===M)throw new TypeError("A promise cannot be resolved with itself.");var G=M._lib&&Ct();B&&typeof B.then=="function"?T(M,function(q,ie){B instanceof Ge?B._then(q,ie):B.then(q,ie)}):(M._state=!0,M._value=B,Mo(M)),G&&xr()}},Xn.bind(null,M))}catch(B){Xn(M,B)}}(this,m)}var Ui={get:function(){var m=Oe,w=re;function T(M,N){var B=this,G=!m.global&&(m!==Oe||w!==re),q=G&&!Je(),ie=new Ge(function(te,ce){pi(B,new fi(Ut(M,m,G,q),Ut(N,m,G,q),te,ce,m))});return this._consoleTask&&(ie._consoleTask=this._consoleTask),ie}return T.prototype=W,T},set:function(m){h(this,"then",m&&m.prototype===W?Ui:{get:function(){return m},set:Ui.set})}};function fi(m,w,T,M,N){this.onFulfilled=typeof m=="function"?m:null,this.onRejected=typeof w=="function"?w:null,this.resolve=T,this.reject=M,this.psd=N}function Xn(m,w){var T,M;Yt.push(w),m._state===null&&(T=m._lib&&Ct(),w=fr(w),m._state=!1,m._value=w,M=m,qe.some(function(N){return N._value===M._value})||qe.push(M),Mo(m),T&&xr())}function Mo(m){var w=m._listeners;m._listeners=[];for(var T=0,M=w.length;T.",pr="String expected.",Jn=[],Tn="__dbnames",Gi="readonly",hi="readwrite";function Vr(m,w){return m?w?function(){return m.apply(this,arguments)&&w.apply(this,arguments)}:m:w}var On={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function mi(m){return typeof m!="string"||/\./.test(m)?function(w){return w}:function(w){return w[m]===void 0&&m in w&&delete(w=F(w))[m],w}}function ms(){throw je.Type()}function jt(m,w){try{var T=kt(m),M=kt(w);if(T!==M)return T==="Array"?1:M==="Array"?-1:T==="binary"?1:M==="binary"?-1:T==="string"?1:M==="string"?-1:T==="Date"?1:M!=="Date"?NaN:-1;switch(T){case"number":case"Date":case"string":return wye+Se&&me(ye+ue)})})}var ve=Do(T)&&T.limit===1/0&&(typeof m!="function"||m===ho)&&{index:T.index,range:T.range};return me(0).then(function(){if(0=ue})).length!==0?(ce.forEach(function(me){de.push(function(){var ve=oe,ye=me._cfg.dbschema;Np(X,ve,se),Np(X,ye,se),oe=X._dbSchema=ye;var Se=hc(ve,ye);Se.add.forEach(function(Ve){mc(se,Ve[0],Ve[1].primKey,Ve[1].indexes)}),Se.change.forEach(function(Ve){if(Ve.recreate)throw new je.Upgrade("Not yet support for changing primary key");var Me=se.objectStore(Ve.name);Ve.add.forEach(function(Rt){return la(Me,Rt)}),Ve.change.forEach(function(Rt){Me.deleteIndex(Rt.name),la(Me,Rt)}),Ve.del.forEach(function(Rt){return Me.deleteIndex(Rt)})});var De=me._cfg.contentUpgrade;if(De&&me._cfg.version>ue){Rr(X,se),ne._memoizedTables={};var He=O(ye);Se.del.forEach(function(Ve){He[Ve]=ve[Ve]}),yi(X,[X.Transaction.prototype]),qr(X,[X.Transaction.prototype],s(He),He),ne.schema=He;var Be,We=Re(De);return We&&Ye(),Se=Ge.follow(function(){var Ve;(Be=De(ne))&&We&&(Ve=Je.bind(null,null),Be.then(Ve,Ve))}),Be&&typeof Be.then=="function"?Ge.resolve(Be):Se.then(function(){return Be})}}),de.push(function(ve){var ye,Se,De=me._cfg.dbschema;ye=De,Se=ve,[].slice.call(Se.db.objectStoreNames).forEach(function(He){return ye[He]==null&&Se.db.deleteObjectStore(He)}),yi(X,[X.Transaction.prototype]),qr(X,[X.Transaction.prototype],X._storeNames,X._dbSchema),ne.schema=X._dbSchema}),de.push(function(ve){X.idbdb.objectStoreNames.contains("$meta")&&(Math.ceil(X.idbdb.version/10)===me._cfg.version?(X.idbdb.deleteObjectStore("$meta"),delete X._dbSchema.$meta,X._storeNames=X._storeNames.filter(function(ye){return ye!=="$meta"})):ve.objectStore("$meta").put(me._cfg.version,"version"))})}),function me(){return de.length?Ge.resolve(de.shift()(ne.idbtrans)).then(me):Ge.resolve()}().then(function(){cd(oe,se)})):Ge.resolve();var X,ue,ne,se,de,oe}).catch(G)):(s(N).forEach(function(ce){mc(T,ce,N[ce].primKey,N[ce].indexes)}),Rr(m,T),void Ge.follow(function(){return m.on.populate.fire(B)}).catch(G));var ie,te})}function aa(m,w){cd(m._dbSchema,w),w.db.version%10!=0||w.objectStoreNames.contains("$meta")||w.db.createObjectStore("$meta").add(Math.ceil(w.db.version/10-1),"version");var T=ys(0,m.idbdb,w);Np(m,m._dbSchema,w);for(var M=0,N=hc(T,m._dbSchema).change;MMath.pow(2,62)?0:oe.oldVersion,X=oe<1,m.idbdb=de.result,B&&aa(m,ce),Ap(m,oe/10,ce,ne))},ne),de.onsuccess=Ht(function(){ce=null;var oe,me,ve,ye,Se,De=m.idbdb=de.result,He=x(De.objectStoreNames);if(0"u"?Ge.resolve():!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise(function(ue){function ne(){return indexedDB.databases().finally(ue)}ie=setInterval(ne,100),ne()}).finally(function(){return clearInterval(ie)}):Promise.resolve()).then(q)]).then(function(){return G(),w.onReadyBeingFired=[],Ge.resolve(ay(function(){return m.on.ready.fire(m.vip)})).then(function ue(){if(0w.limit?ue.length=w.limit:m.length===w.limit&&ue.length=me.limit&&(!me.values||De.req.values)&&rM(De.req.query.range,me.query.range)}),!1,ve,ye];case"count":return Se=ye.find(function(De){return VS(De.req.query.range,me.query.range)}),[Se,!!Se,ve,ye]}}(w,T,"query",B),ce=te[0],X=te[1],ue=te[2],ne=te[3];return ce&&X?ce.obsSet=B.obsSet:(X=M.query(B).then(function(se){var de=se.result;if(ce&&(ce.res=de),G){for(var oe=0,me=de.length;oe{var s=(async()=>{var a=rr(r);a.autoOpen=!1;var l=new A1(i,a),c={[sg]:Wq(n),[Fq]:"++sequence, id",[RE]:"id"};return l.version(1).stores(c),await l.open(),{dexieDb:l,dexieTable:l[sg],dexieAttachmentsTable:l[RE],booleanIndexes:Hq(n)}})();return PE.set(i,o),nm.set(o,0),s});return o}async function Uq(e){var t=await e,r=nm.get(e),n=r-1;n===0?(t.dexieDb.close(),nm.delete(e)):nm.set(e,n)}var N1="__";function Zu(e){var t=e.split(".");if(t.length>1)return t.map(n=>Zu(n)).join(".");if(e.startsWith("|")){var r=e.substring(1);return N1+r}else return e}function OL(e){var t=e.split(".");if(t.length>1)return t.map(n=>OL(n)).join(".");if(e.startsWith(N1)){var r=e.substring(N1.length);return"|"+r}else return e}function Gq(e,t){if(!t)return t;var r=rr(t);return r=D1(r),e.forEach(n=>{var i=Ua(t,n),o=i?"1":"0",s=Zu(n);qO(r,s,o)}),r}function jL(e,t){return t&&(t=rr(t),t=B1(t),e.forEach(r=>{var n=Ua(t,r),i=n==="1";qO(t,r,i)}),t)}function D1(e){if(!e||typeof e=="string"||typeof e=="number"||typeof e=="boolean")return e;if(Array.isArray(e))return e.map(r=>D1(r));if(typeof e=="object"){var t={};return Object.entries(e).forEach(([r,n])=>{typeof n=="object"&&(n=D1(n)),t[Zu(r)]=n}),t}}function B1(e){if(!e||typeof e=="string"||typeof e=="number"||typeof e=="boolean")return e;if(Array.isArray(e))return e.map(r=>B1(r));if(typeof e=="object"){var t={};return Object.entries(e).forEach(([r,n])=>{(typeof n=="object"||Array.isArray(e))&&(n=B1(n)),t[OL(r)]=n}),t}}function Wq(e){var t=[],r=$i(e.primaryKey);t.push([r]),t.push(["_deleted",r]),e.indexes&&e.indexes.forEach(o=>{var s=Qf(o);t.push(s)}),t.push(["_meta.lwt",r]),t.push(["_meta.lwt"]),t=t.map(o=>o.map(s=>Zu(s)));var n=t.map(o=>o.length===1?o[0]:"["+o.join("+")+"]");n=n.filter((o,s,a)=>a.indexOf(o)===s);var i=n.join(", ");return i}async function TE(e,t){var r=await e,n=await r.dexieTable.bulkGet(t);return n.map(i=>jL(r.booleanIndexes,i))}function Sh(e,t){return e+"||"+t}function Hq(e){var t=new Set,r=[];return e.indexes?(e.indexes.forEach(n=>{var i=Qf(n);i.forEach(o=>{if(!t.has(o)){t.add(o);var s=Nu(e,o);s.type==="boolean"&&r.push(o)}})}),r.push("_deleted"),RG(r)):r}function OE(e){return e===fu?-1/0:e}function jE(e,t,r){if(e.includes(t)){var n=r===du||r===!0?"1":"0";return n}else return r}function LL(e,t,r){if(!r){if(typeof window>"u")throw new Error("IDBKeyRange missing");r=window.IDBKeyRange}var n=t.startKeys.map((s,a)=>{var l=t.index[a];return jE(e,l,s)}).map(OE),i=t.endKeys.map((s,a)=>{var l=t.index[a];return jE(e,l,s)}).map(OE),o=r.bound(n,i,!t.inclusiveStart,!t.inclusiveEnd);return o}async function LE(e,t){var r=await e.internals,n=t.query,i=n.skip?n.skip:0,o=n.limit?n.limit:1/0,s=i+o,a=t.queryPlan,l=!1;a.selectorSatisfiedByIndex||(l=iS(e.schema,t.query));var c=LL(r.booleanIndexes,a,r.dexieDb._options.IDBKeyRange),u=a.index,d=[];if(await r.dexieDb.transaction("r",r.dexieTable,async p=>{var h=p.idbtrans,v=h.objectStore(sg),k,b;b="["+u.map(g=>Zu(g)).join("+")+"]",k=v.index(b);var x=k.openCursor(c);await new Promise(g=>{x.onsuccess=function(C){var E=C.target.result;if(E){var j=jL(r.booleanIndexes,E.value);(!l||l(j))&&d.push(j),a.sortSatisfiedByIndex&&d.length===s?g():E.continue()}else g()}})}),!a.sortSatisfiedByIndex){var f=zj(e.schema,t.query);d=d.sort(f)}return d=d.slice(i,s),{documents:d}}async function Vq(e,t){var r=await e.internals,n=t.queryPlan,i=n.index,o=LL(r.booleanIndexes,n,r.dexieDb._options.IDBKeyRange),s=-1;return await r.dexieDb.transaction("r",r.dexieTable,async a=>{var l=a.idbtrans,c=l.objectStore(sg),u,d;d="["+i.map(p=>Zu(p)).join("+")+"]",u=c.index(d);var f=u.count(o);s=await new Promise((p,h)=>{f.onsuccess=function(){p(f.result)},f.onerror=v=>h(v)})}),s}var Kq=fn(),T0=!1,qq=function(){function e(r,n,i,o,s,a,l,c){this.changes$=new Ir,this.instanceId=Kq++,this.storage=r,this.databaseName=n,this.collectionName=i,this.schema=o,this.internals=s,this.options=a,this.settings=l,this.devMode=c,this.primaryPath=$i(this.schema.primaryKey)}var t=e.prototype;return t.bulkWrite=async function(n,i){fl(this),!T0&&(!m0.premium||typeof m0.premium!="string"||await GO(m0.premium)!==XG)&&console.warn(["-------------- RxDB Open Core RxStorage -------------------------------","You are using the free Dexie.js based RxStorage implementation from RxDB https://rxdb.info/rx-storage-dexie.html?console=dexie ","While this is a great option, we want to let you know that there are faster storage solutions available in our premium plugins.","For professional users and production environments, we highly recommend considering these premium options to enhance performance and reliability."," https://rxdb.info/premium?console=dexie ","If you already purchased premium access you can disable this log by calling the setPremiumFlag() function from rxdb-premium/plugins/shared.","---------------------------------------------------------------------"].join(` `)),T0=!0,n.forEach(u=>{if(!u.document._rev||u.previous&&!u.previous._rev)throw it("SNH",{args:{row:u}})});var o=await this.internals,s={error:[]};this.devMode&&(n=n.map(u=>{var d=Ep(u.document);return{previous:u.previous,document:d}}));var a=n.map(u=>u.document[this.primaryPath]),l;if(await o.dexieDb.transaction("rw",o.dexieTable,o.dexieAttachmentsTable,async()=>{var u=new Map,d=await TE(this.internals,a);d.forEach(h=>{var v=h;return v&&u.set(v[this.primaryPath],v),v}),l=AV(this,this.primaryPath,u,n,i),s.error=l.errors;var f=[];l.bulkInsertDocs.forEach(h=>{f.push(h.document)}),l.bulkUpdateDocs.forEach(h=>{f.push(h.document)}),f=f.map(h=>Gq(o.booleanIndexes,h)),f.length>0&&await o.dexieTable.bulkPut(f);var p=[];l.attachmentsAdd.forEach(h=>{p.push({id:Sh(h.documentId,h.attachmentId),data:h.attachmentData.data})}),l.attachmentsUpdate.forEach(h=>{p.push({id:Sh(h.documentId,h.attachmentId),data:h.attachmentData.data})}),await o.dexieAttachmentsTable.bulkPut(p),await o.dexieAttachmentsTable.bulkDelete(l.attachmentsRemove.map(h=>Sh(h.documentId,h.attachmentId)))}),l=St(l),l.eventBulk.events.length>0){var c=St(l.newestRow).document;l.eventBulk.checkpoint={id:c[this.primaryPath],lwt:c._meta.lwt},l.eventBulk.endTime=fn(),this.changes$.next(l.eventBulk)}return s},t.findDocumentsById=async function(n,i){fl(this);var o=await this.internals,s=[];return await o.dexieDb.transaction("r",o.dexieTable,async()=>{var a=await TE(this.internals,n);a.forEach(l=>{l&&(!l._deleted||i)&&s.push(l)})}),s},t.query=function(n){return fl(this),LE(this,n)},t.count=async function(n){if(n.queryPlan.selectorSatisfiedByIndex){var i=await Vq(this,n);return{count:i,mode:"fast"}}else{var o=await LE(this,n);return{count:o.documents.length,mode:"slow"}}},t.changeStream=function(){return fl(this),this.changes$.asObservable()},t.cleanup=async function(n){fl(this);var i=await this.internals;return await i.dexieDb.transaction("rw",i.dexieTable,async()=>{var o=fn()-n,s=await i.dexieTable.where("_meta.lwt").below(o).toArray(),a=[];s.forEach(l=>{l._deleted==="1"&&a.push(l[this.primaryPath])}),await i.dexieTable.bulkDelete(a)}),!0},t.getAttachmentData=async function(n,i,o){fl(this);var s=await this.internals,a=Sh(n,i);return await s.dexieDb.transaction("r",s.dexieAttachmentsTable,async()=>{var l=await s.dexieAttachmentsTable.get(a);if(l)return l.data;throw new Error("attachment missing documentId: "+n+" attachmentId: "+i)})},t.remove=async function(){fl(this);var n=await this.internals;return await n.dexieTable.clear(),this.close()},t.close=function(){return this.closed?this.closed:(this.closed=(async()=>{this.changes$.complete(),await Uq(this.internals)})(),this.closed)},t.conflictResultionTasks=function(){return new Ir},t.resolveConflictResultionTask=async function(n){},e}();async function Yq(e,t,r){var n=zq(t.databaseName,t.collectionName,r,t.schema),i=new qq(e,t.databaseName,t.collectionName,t.schema,n,t.options,r,t.devMode);return await Bq(TL,t,i),Promise.resolve(i)}function fl(e){if(e.closed)throw new Error("RxStorageInstanceDexie is closed "+e.databaseName+"-"+e.collectionName)}var Qq=function(){function e(r){this.name=TL,this.rxdbVersion=YO,this.settings=r}var t=e.prototype;return t.createStorageInstance=function(n){return BV(n),Yq(this,n,this.settings)},e}();function Xq(e={}){var t=new Qq(e);return t}var mS={minimumDeletedTime:1e3*60*60*24*31,minimumCollectionAge:1e3*60,runEach:1e3*60*5,awaitReplicationsInSync:!0,waitForLeadership:!0},IL=new WeakMap,Jq=new WeakMap;function IE(e){return Hs(Jq,e,()=>Dq(e))}function Zq(){var e=RL(this.storage.name,this.token,this.name,this),t=this.destroy.bind(this);this.destroy=function(){return I1(this.token,this),t()};var r=IE(e);return r||(r=IE(e),IL.set(this,r)),this.leaderElector=()=>r,r}function eY(){return this.multiInstance?this.leaderElector().isLeader:!0}function tY(){return this.multiInstance?this.leaderElector().awaitLeadership().then(()=>!0):Dv}function rY(e){var t=IL.get(e);t&&t.die()}var nY=!0,iY={RxDatabase:e=>{e.leaderElector=Zq,e.isLeader=eY,e.waitForLeadership=tY}},gS={name:"leader-election",rxdb:nY,prototypes:iY,hooks:{preDestroyRxDatabase:{after:rY}}},ME=e=>Promise.resolve(e);function AE(e,t){if(e==="_deleted")return t;t=rr(t);var r=!!t._deleted;return t[e]=r,delete t._deleted,t}function O0(e,t,r){return r.map(n=>{var i=rr(n);if(t!=="_deleted"){var o=!!i[t];i._deleted=o,delete i[t]}else i._deleted=!!i._deleted;var s=e.schema.primaryPath;return i[s]=tl(e.schema.jsonSchema,i),i})}function NE(e,t){if(typeof window>"u"||typeof window!="object"||typeof window.addEventListener>"u"||navigator.onLine)return e.promiseWait(t);var r,n=new Promise(i=>{r=()=>{window.removeEventListener("online",r),i()},window.addEventListener("online",r)});return Promise.race([n,e.promiseWait(t)]).then(()=>{window.removeEventListener("online",r)})}var vS=new WeakMap,oY=function(){function e(r,n,i,o,s,a,l,c){this.subs=[],this.subjects={received:new Ir,sent:new Ir,error:new Ir,canceled:new ks(!1),active:new ks(!1)},this.received$=this.subjects.received.asObservable(),this.sent$=this.subjects.sent.asObservable(),this.error$=this.subjects.error.asObservable(),this.canceled$=this.subjects.canceled.asObservable(),this.active$=this.subjects.active.asObservable(),this.onCancel=[],this.callOnStart=void 0,this.remoteEvents$=new Ir,this.replicationIdentifier=r,this.collection=n,this.deletedField=i,this.pull=o,this.push=s,this.live=a,this.retryTime=l,this.autoStart=c,this.metaInfoPromise=(async()=>{var f="rx-replication-meta-"+await n.database.hashFunction([this.collection.name,this.replicationIdentifier].join("-")),p=oK(this.collection.schema.jsonSchema,qj(this.collection.schema.jsonSchema));return{collectionName:f,schema:p}})();var u=Hs(vS,n,()=>[]);u.push(this),this.collection.onDestroy.push(()=>this.cancel()),Object.keys(this.subjects).forEach(f=>{Object.defineProperty(this,f+"$",{get:function(){return this.subjects[f].asObservable()}})});var d=new Promise(f=>{this.callOnStart=f});this.startPromise=d}var t=e.prototype;return t.start=async function(){if(!this.isStopped()){var n=this.pull&&this.pull.modifier?this.pull.modifier:ME,i=this.push&&this.push.modifier?this.push.modifier:ME,o=this.collection.database,s=await this.metaInfoPromise,[a]=await Promise.all([this.collection.database.storage.createStorageInstance({databaseName:o.name,collectionName:s.collectionName,databaseInstanceToken:o.token,multiInstance:o.multiInstance,options:{},schema:s.schema,password:o.password,devMode:wr.isDevMode()}),KV(this.collection,s.collectionName,s.schema)]);this.metaInstance=a,this.internalReplicationState=cK({pushBatchSize:this.push&&this.push.batchSize?this.push.batchSize:100,pullBatchSize:this.pull&&this.pull.batchSize?this.pull.batchSize:100,initialCheckpoint:{upstream:this.push?this.push.initialCheckpoint:void 0,downstream:this.pull?this.pull.initialCheckpoint:void 0},forkInstance:this.collection.storageInstance,metaInstance:this.metaInstance,hashFunction:o.hashFunction,identifier:"rxdbreplication"+this.replicationIdentifier,conflictHandler:this.collection.conflictHandler,replicationHandler:{masterChangeStream$:this.remoteEvents$.asObservable().pipe(Wt(l=>!!this.pull),ls(async l=>{if(l==="RESYNC")return l;var c=rr(l);return c.documents=O0(this.collection,this.deletedField,c.documents),c.documents=await Promise.all(c.documents.map(u=>n(u))),c})),masterChangesSince:async(l,c)=>{if(!this.pull)return{checkpoint:null,documents:[]};for(var u=!1,d={};!u&&!this.isStopped();)try{d=await this.pull.handler(l,c),u=!0}catch(h){var f=it("RC_PULL",{checkpoint:l,errors:Qf(h).map(v=>Fk(v)),direction:"pull"});this.subjects.error.next(f),await NE(this.collection,St(this.retryTime))}if(this.isStopped())return{checkpoint:null,documents:[]};var p=rr(d);return p.documents=O0(this.collection,this.deletedField,p.documents),p.documents=await Promise.all(p.documents.map(h=>n(h))),p},masterWrite:async l=>{if(!this.push)return[];var c=!1;await Vs("preReplicationMasterWrite",{rows:l,collection:this.collection});var u=await Promise.all(l.map(async v=>(v.newDocumentState=await i(v.newDocumentState),v.newDocumentState===null?null:(v.assumedMasterState&&(v.assumedMasterState=await i(v.assumedMasterState)),this.deletedField!=="_deleted"&&(v.newDocumentState=AE(this.deletedField,v.newDocumentState),v.assumedMasterState&&(v.assumedMasterState=AE(this.deletedField,v.assumedMasterState))),v)))),d=u.filter(UO),f=null;for(d.length===0&&(c=!0,f=[]);!c&&!this.isStopped();)try{if(f=await this.push.handler(d),!Array.isArray(f))throw it("RC_PUSH_NO_AR",{pushRows:l,direction:"push",args:{result:f}});c=!0}catch(v){var p=v.rxdb?v:it("RC_PUSH",{pushRows:l,errors:Qf(v).map(k=>Fk(k)),direction:"push"});this.subjects.error.next(p),await NE(this.collection,St(this.retryTime))}if(this.isStopped())return[];await Vs("preReplicationMasterWriteDocumentsHandle",{result:f,collection:this.collection});var h=O0(this.collection,this.deletedField,St(f));return h}}}),this.subs.push(this.internalReplicationState.events.error.subscribe(l=>{this.subjects.error.next(l)}),this.internalReplicationState.events.processed.down.subscribe(l=>this.subjects.received.next(l.document)),this.internalReplicationState.events.processed.up.subscribe(l=>{this.subjects.sent.next(l.newDocumentState)}),Sj([this.internalReplicationState.events.active.down,this.internalReplicationState.events.active.up]).subscribe(([l,c])=>{var u=l||c;this.subjects.active.next(u)})),this.pull&&this.pull.stream$&&this.live&&this.subs.push(this.pull.stream$.subscribe({next:l=>{this.remoteEvents$.next(l)},error:l=>{this.subjects.error.next(l)}})),this.live||(await k0(this.internalReplicationState),await vE(this.internalReplicationState),await this.cancel()),this.callOnStart()}},t.isStopped=function(){return!!this.subjects.canceled.getValue()},t.awaitInitialReplication=async function(){return await this.startPromise,k0(St(this.internalReplicationState))},t.awaitInSync=async function(){await this.startPromise,await k0(St(this.internalReplicationState));for(var n=2;n>0;)n--,await this.collection.database.requestIdlePromise(),await vE(St(this.internalReplicationState));return!0},t.reSync=function(){this.remoteEvents$.next("RESYNC")},t.emitEvent=function(n){this.remoteEvents$.next(n)},t.cancel=async function(){if(this.isStopped())return Jo;var n=this.onCancel.map(i=>WG(i()));return this.internalReplicationState&&await dK(this.internalReplicationState),this.metaInstance&&n.push(St(this.internalReplicationState).checkpointQueue.then(()=>St(this.metaInstance).close())),this.subs.forEach(i=>i.unsubscribe()),this.subjects.canceled.next(!0),this.subjects.active.complete(),this.subjects.canceled.complete(),this.subjects.error.complete(),this.subjects.received.complete(),this.subjects.sent.complete(),Promise.all(n)},t.remove=async function(){await St(this.metaInstance).remove();var n=await this.metaInfoPromise;await this.cancel(),await qV(this.collection,n.collectionName,n.schema)},e}();function sY({replicationIdentifier:e,collection:t,deletedField:r="_deleted",pull:n,push:i,live:o=!0,retryTime:s=1e3*5,waitForLeadership:a=!0,autoStart:l=!0}){if(Ju(gS),!n&&!i)throw it("UT3",{collection:t.name,args:{replicationIdentifier:e}});var c=new oY(e,t,r,n,i,o,s,l);return aY(a,c),c}function aY(e,t){var r=e&&t.collection.database.multiInstance,n=r?t.collection.database.waitForLeadership():Dv;return n.then(()=>{t.isStopped()||t.autoStart&&t.start()})}var j0=Dv;async function lY(e){var t=e.database,r=Object.assign({},mS,t.cleanupPolicy?t.cleanupPolicy:{});await ML(e,r),!e.destroyed&&(await AL(e,r),await cY(e,r))}async function ML(e,t){await e.promiseWait(t.minimumCollectionAge),!e.destroyed&&t.waitForLeadership&&await e.database.waitForLeadership()}async function AL(e,t){for(var r=e.database,n=e.storageInstance,i=!1;!i&&!e.destroyed;){if(t.awaitReplicationsInSync){var o=vS.get(e);o&&await Promise.all(o.map(s=>{if(!s.isStopped())return s.awaitInSync()}))}if(e.destroyed)return;j0=j0.then(async()=>e.destroyed?!0:(await r.requestIdlePromise(),n.cleanup(t.minimumDeletedTime))),i=await j0}await Vs("postCleanup",{collectionName:e.name,databaseName:r.name})}async function cY(e,t){for(;!e.destroyed;){if(await e.promiseWait(t.runEach),e.destroyed)return;await AL(e,t)}}var L0=Dv;async function uY(e){var t=e.collection,r=t.database,n=Object.assign({},mS,r.cleanupPolicy?r.cleanupPolicy:{});await ML(t,n),!t.destroyed&&(await NL(e,n),await dY(e,n))}async function NL(e,t){for(var r=e.collection,n=r.database,i=!1;!i&&!r.destroyed;){if(t.awaitReplicationsInSync){var o=vS.get(r);o&&await Promise.all(o.map(s=>{if(!s.isStopped())return s.awaitInSync()}))}if(r.destroyed)return;L0=L0.then(async()=>r.destroyed?!0:(await n.requestIdlePromise(),e._cleanup())),i=await L0}}async function dY(e,t){for(var r=e.collection;!r.destroyed;){if(await r.promiseWait(t.runEach),r.destroyed)return;await NL(e,t)}}var fY={name:"cleanup",rxdb:!0,prototypes:{RxCollection:e=>{e.cleanup=async function(t){var r=Object.assign({},mS,this.database.cleanupPolicy?this.database.cleanupPolicy:{});typeof t>"u"&&(t=r.minimumDeletedTime);for(var n=!1;!n&&!this.destroyed;)n=await this.storageInstance.cleanup(t);await Vs("postCleanup",{collectionName:this.name,databaseName:this.database.name})}}},hooks:{createRxCollection:{after:e=>{lY(e.collection)}},createRxState:{after:e=>{uY(e.state)}}}},pY=["__proto__","constructor","prototype"];function Vd(e,t){Object.keys(t).forEach(r=>{pY.includes(r)||(typeof e[r]>"u"?e[r]=t[r]:ff(t[r])?Vd(e[r],t[r]):e[r]=t[r])})}function ff(e){return e.toString()==="[object Object]"}var Qv=function(){function e(r,n){if(this.options={},this._conditions={},this._fields={},this._path=n,r){var i=this;r.selector&&i.find(r.selector),r.limit&&i.limit(r.limit),r.skip&&i.skip(r.skip),r.sort&&r.sort.forEach(o=>i.sort(o))}}var t=e.prototype;return t.where=function(n,i){if(!arguments.length)return this;var o=typeof arguments[0];if(o==="string")return this._path=arguments[0],arguments.length===2&&(this._conditions[this._path]=arguments[1]),this;if(o==="object"&&!Array.isArray(arguments[0]))return this.merge(arguments[0]);throw _i("MQ1",{path:arguments[0]})},t.equals=function(n){this._ensurePath("equals");var i=this._path;return this._conditions[i]=n,this},t.eq=function(n){this._ensurePath("eq");var i=this._path;return this._conditions[i]=n,this},t.or=function(n){var i=this._conditions.$or||(this._conditions.$or=[]);return Array.isArray(n)||(n=[n]),i.push.apply(i,n),this},t.nor=function(n){var i=this._conditions.$nor||(this._conditions.$nor=[]);return Array.isArray(n)||(n=[n]),i.push.apply(i,n),this},t.and=function(n){var i=this._conditions.$and||(this._conditions.$and=[]);return Array.isArray(n)||(n=[n]),i.push.apply(i,n),this},t.mod=function(n,i){var o,s;arguments.length===1?(this._ensurePath("mod"),o=arguments[0],s=this._path):arguments.length===2&&!Array.isArray(arguments[1])?(this._ensurePath("mod"),o=arguments.slice(),s=this._path):arguments.length===3?(o=arguments.slice(1),s=arguments[0]):(o=arguments[1],s=arguments[0]);var a=this._conditions[s]||(this._conditions[s]={});return a.$mod=o,this},t.exists=function(n,i){var o,s;arguments.length===0?(this._ensurePath("exists"),o=this._path,s=!0):arguments.length===1?typeof arguments[0]=="boolean"?(this._ensurePath("exists"),o=this._path,s=arguments[0]):(o=arguments[0],s=!0):arguments.length===2&&(o=arguments[0],s=arguments[1]);var a=this._conditions[o]||(this._conditions[o]={});return a.$exists=s,this},t.elemMatch=function(n,i){if(arguments[0]===null)throw _i("MQ2");var o,s,a;if(typeof arguments[0]=="function")this._ensurePath("elemMatch"),s=this._path,o=arguments[0];else if(ff(arguments[0]))this._ensurePath("elemMatch"),s=this._path,a=arguments[0];else if(typeof arguments[1]=="function")s=arguments[0],o=arguments[1];else if(arguments[1]&&ff(arguments[1]))s=arguments[0],a=arguments[1];else throw _i("MQ2");o&&(a=new e,o(a),a=a._conditions);var l=this._conditions[s]||(this._conditions[s]={});return l.$elemMatch=a,this},t.sort=function(n){if(!n)return this;var i,o=typeof n;if(Array.isArray(n)){i=n.length;for(var s=0;sDE(this.options,d,n[d])),this}throw _i("MQ3",{args:arguments})},t.merge=function(n){if(!n)return this;if(!BE(n))throw _i("MQ4",{source:n});return n instanceof e?(n._conditions&&Vd(this._conditions,n._conditions),n._fields&&(this._fields||(this._fields={}),Vd(this._fields,n._fields)),n.options&&(this.options||(this.options={}),Vd(this.options,n.options)),n._distinct&&(this._distinct=n._distinct),this):(Vd(this._conditions,n),this)},t.find=function(n){return BE(n)&&this.merge(n),this},t._ensurePath=function(n){if(!this._path)throw it("MQ5",{method:n})},t.toJSON=function(){var n={selector:this._conditions};return this.options.skip&&(n.skip=this.options.skip),this.options.limit&&(n.limit=this.options.limit),this.options.sort&&(n.sort=hY(this.options.sort)),{query:n,path:this._path}},e}();function hY(e){return Object.entries(e).map(([t,r])=>{var n=r===1?"asc":"desc",i={[t]:n};return i})}var DL=["limit","skip","maxScan","batchSize","comment"];DL.forEach(function(e){Qv.prototype[e]=function(t){return this.options[e]=t,this}});var BL=["gt","gte","lt","lte","ne","in","nin","all","regex","size"];BL.forEach(function(e){Qv.prototype[e]=function(){var t,r;arguments.length===1?(this._ensurePath(e),r=arguments[0],t=this._path):(r=arguments[1],t=arguments[0]);var n=this._conditions[t]===null||typeof this._conditions[t]=="object"?this._conditions[t]:this._conditions[t]={};if(e==="regex"){if(r instanceof RegExp)throw it("QU16",{field:t,query:this._conditions});typeof r=="string"?n["$"+e]=r:(n["$"+e]=r.$regex,r.$options&&(n.$options=r.$options))}else n["$"+e]=r;return this}});function DE(e,t,r){if(Array.isArray(e.sort))throw _i("MQ6",{opts:e,field:t,value:r});if(r&&r.$meta){var n=e.sort||(e.sort={});n[t]={$meta:r.$meta};return}var i=String(r||1).toLowerCase();if(!/^(?:ascending|asc|descending|desc|1|-1)$/.test(i))throw Array.isArray(r)&&(r="["+r+"]"),_i("MQ7",{field:t,value:r});var o=e.sort||(e.sort={}),s=r.toString().replace("asc","1").replace("ascending","1").replace("desc","-1").replace("descending","-1");o[t]=parseInt(s,10)}function mY(e,t,r){if(e.sort=e.sort||[],!Array.isArray(e.sort))throw _i("MQ8",{opts:e,field:t,value:r});e.sort.push([t,r])}function BE(e){return e instanceof Qv||ff(e)}function gY(e,t){return new Qv(e,t)}var $E="queryBuilderPath";function vY(e,t,r){var n=gY(so(e.mangoQuery),e.other[$E]);n[t](r);var i=n.toJSON();return Dc(e.op,i.query,e.collection,{...e.other,[$E]:i.path})}function I0(e,t){e[t]=function(r){if(wr.isDevMode()&&this.op==="findByIds")throw it("QU17",{collection:this.collection.name,query:this.mangoQuery});return vY(this,t,r)}}var yY={name:"query-builder",rxdb:!0,prototypes:{RxQuery(e){["where","equals","eq","or","nor","and","mod","exists","elemMatch","sort"].forEach(t=>{I0(e,t)}),DL.forEach(t=>{I0(e,t)}),BL.forEach(t=>{I0(e,t)})}}},bY=Xj(),wY=function(e){function t(r,n,i){var o;return o=e.call(this,null,n)||this,o.id=r,o.parent=i,o}return Ux(t,e),t}(bY),pf={get isLocal(){return!0},get allAttachments$(){throw it("LD1",{document:this})},get primaryPath(){return"id"},get primary(){return this.id},get $(){var e=this,t=Ws($1,this.parent);return e.parent.$.pipe(Wt(r=>r.documentId===this.primary),Wt(r=>r.isLocal),qt(r=>Cj(r)),Uv(t.docCache.getLatestDocumentData(this.primary)),Zf((r,n)=>r._rev===n._rev),qt(r=>t.docCache.getCachedRxDocument(r)),Yx(zx))},get $$(){var e=this,t=M0(e),r=t.getReactivityFactory();return r.fromObservable(e.$,e.getLatest()._data,t)},get deleted$$(){var e=this,t=M0(e),r=t.getReactivityFactory();return r.fromObservable(e.deleted$,e.getLatest().deleted,t)},getLatest(){var e=Ws($1,this.parent),t=e.docCache.getLatestDocumentData(this.primary);return e.docCache.getCachedRxDocument(t)},get(e){if(e="data."+e,!!this._data){if(typeof e!="string")throw _i("LD2",{objPath:e});var t=Ua(this._data,e);return t=wr.deepFreezeWhenDevMode(t),t}},get$(e){if(e="data."+e,wr.isDevMode()){if(e.includes(".item."))throw it("LD3",{objPath:e});if(e===this.primaryPath)throw it("LD4")}return this.$.pipe(qt(t=>t._data),qt(t=>Ua(t,e)),Zf())},get$$(e){var t=M0(this),r=t.getReactivityFactory();return r.fromObservable(this.get$(e),this.getLatest().get(e),t)},async incrementalModify(e){var t=await hf(this.parent);return t.incrementalWriteQueue.addWrite(this._data,async r=>(r.data=await e(r.data,this),r)).then(r=>t.docCache.getCachedRxDocument(r))},incrementalPatch(e){return this.incrementalModify(t=>(Object.entries(e).forEach(([r,n])=>{t[r]=n}),t))},async _saveData(e){var t=await hf(this.parent),r=this._data;e.id=this.id;var n=[{previous:r,document:e}];return t.storageInstance.bulkWrite(n,"local-document-save-data").then(i=>{if(i.error[0])throw i.error[0];var o=Mi(this.collection.schema.primaryPath,n,i)[0];e=rr(e),e._rev=o._rev})},async remove(){var e=await hf(this.parent),t=rr(this._data);return t._deleted=!0,Kv(e.storageInstance,{previous:this._data,document:t},"local-document-remove").then(r=>e.docCache.getCachedRxDocument(r))}},FE=!1,xY=()=>{if(!FE){FE=!0;var e=qv,t=Object.getOwnPropertyNames(e);t.forEach(n=>{var i=Object.getOwnPropertyDescriptor(pf,n);if(!i){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(pf,n,o)}});var r=n=>()=>{throw it("LD6",{functionName:n})};["populate","update","putAttachment","getAttachment","allAttachments"].forEach(n=>pf[n]=r(n))}};function SY(e,t){xY();var r=new wY(e.id,e,t);return Object.setPrototypeOf(r,pf),r.prototype=pf,r}function M0(e){var t=e.parent;return xK(t)?t:t.database}var ag=new WeakMap,$1=new WeakMap;function zE(e){var t=e.database?e.database:e,r=e.database?e.name:"",n=(async()=>{var i=await $L(t.token,t.storage,t.name,r,t.instanceCreationOptions,t.multiInstance);i=sS(t,i,FL);var o=new Gj("id",t.eventBulks$.pipe(Wt(u=>{var d=!1;return(r===""&&!u.collectionName||r!==""&&u.collectionName===r)&&(d=!0),d&&u.events[0].isLocal}),qt(u=>u.events)),u=>SY(u,e)),s=new Qj(i,"id",()=>{},()=>{}),a=await t.storageToken,l=i.changeStream().subscribe(u=>{for(var d=new Array(u.events.length),f=u.events,p=e.database?e.name:void 0,h=0;hr.storageInstance.close())}async function GE(e,t,r){var n=sc(10),i=await $L(n,e,t,r,{},!1);await i.remove()}function CY(e){return"plugin-local-documents-"+e}var FL=Fv({title:"RxLocalDocument",version:0,primaryKey:"id",type:"object",properties:{id:{type:"string",maxLength:128},data:{type:"object",additionalProperties:!0}},required:["id","data"]});async function WE(e,t){var r=await hf(this),n={id:e,data:t,_deleted:!1,_meta:qu(),_rev:jo(),_attachments:{}};return Kv(r.storageInstance,{document:n},"local-document-insert").then(i=>r.docCache.getCachedRxDocument(i))}function HE(e,t){return this.getLocal(e).then(r=>{if(r)return r.incrementalModify(()=>t);var n=this.insertLocal(e,t);return n})}async function VE(e){var t=await hf(this),r=t.docCache,n=r.getLatestDocumentDataIfExists(e);return n?Promise.resolve(r.getCachedRxDocument(n)):Vv(t.storageInstance,e).then(i=>i?t.docCache.getCachedRxDocument(i):null)}function KE(e){return this.$.pipe(Uv(null),ls(async t=>{if(t)return{changeEvent:t};var r=await this.getLocal(e);return{doc:r}}),ls(async t=>{if(t.changeEvent){var r=t.changeEvent;if(!r.isLocal||r.documentId!==e)return{use:!1};var n=await this.getLocal(e);return{use:!0,doc:n}}else return{use:!0,doc:t.doc}}),Wt(t=>t.use),qt(t=>t.doc))}var _Y={name:"local-documents",rxdb:!0,prototypes:{RxCollection:e=>{e.insertLocal=WE,e.upsertLocal=HE,e.getLocal=VE,e.getLocal$=KE},RxDatabase:e=>{e.insertLocal=WE,e.upsertLocal=HE,e.getLocal=VE,e.getLocal$=KE}},hooks:{createRxDatabase:{before:e=>{e.creator.localDocuments&&zE(e.database)}},createRxCollection:{before:e=>{e.creator.localDocuments&&zE(e.collection)}},preDestroyRxDatabase:{after:e=>UE(e)},postDestroyRxCollection:{after:e=>UE(e)},postRemoveRxDatabase:{after:e=>GE(e.storage,e.databaseName,"")},postRemoveRxCollection:{after:e=>GE(e.storage,e.databaseName,e.collectionName)}},overwritable:{}};async function kY(e,t,r){var n=await e([t,r].join("|"))>await e([r,t].join("|"));return n}function A0(e,t,r){var n=r.id,i=Gr(e.response$.pipe(Wt(o=>o.peer===t),Wt(o=>o.response.id===n),qt(o=>o.response)));return e.send(t,r),i}const EY="modulepreload",RY=function(e){return"/"+e},qE={},PY=function(t,r,n){let i=Promise.resolve();if(r&&r.length>0){document.getElementsByTagName("link");const s=document.querySelector("meta[property=csp-nonce]"),a=(s==null?void 0:s.nonce)||(s==null?void 0:s.getAttribute("nonce"));i=Promise.allSettled(r.map(l=>{if(l=RY(l),l in qE)return;qE[l]=!0;const c=l.endsWith(".css"),u=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${u}`))return;const d=document.createElement("link");if(d.rel=c?"stylesheet":EY,c||(d.as="script"),d.crossOrigin="",d.href=l,a&&d.setAttribute("nonce",a),document.head.appendChild(d),c)return new Promise((f,p)=>{d.addEventListener("load",f),d.addEventListener("error",()=>p(new Error(`Unable to preload CSS for ${l}`)))})}))}function o(s){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=s,window.dispatchEvent(a),!a.defaultPrevented)throw s}return i.then(s=>{for(const a of s||[])a.status==="rejected"&&o(a.reason);return t().catch(o)})};function Ch(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var zL={exports:{}};(function(e,t){(function(r){e.exports=r()})(function(){var r=Math.floor,n=Math.abs,i=Math.pow;return function(){function o(s,a,l){function c(f,p){if(!a[f]){if(!s[f]){var h=typeof Ch=="function"&&Ch;if(!p&&h)return h(f,!0);if(u)return u(f,!0);var v=new Error("Cannot find module '"+f+"'");throw v.code="MODULE_NOT_FOUND",v}var k=a[f]={exports:{}};s[f][0].call(k.exports,function(b){var x=s[f][1][b];return c(x||b)},k,k.exports,o,s,a,l)}return a[f].exports}for(var u=typeof Ch=="function"&&Ch,d=0;d>16,L[A++]=255&E>>8,L[A++]=255&E;return P===2&&(E=v[C.charCodeAt(j)]<<2|v[C.charCodeAt(j+1)]>>4,L[A++]=255&E),P===1&&(E=v[C.charCodeAt(j)]<<10|v[C.charCodeAt(j+1)]<<4|v[C.charCodeAt(j+2)]>>2,L[A++]=255&E>>8,L[A++]=255&E),L}function d(C){return h[63&C>>18]+h[63&C>>12]+h[63&C>>6]+h[63&C]}function f(C,E,j){for(var R,O=[],P=E;PA?A:L+P));return R===1?(E=C[j-1],O.push(h[E>>2]+h[63&E<<4]+"==")):R===2&&(E=(C[j-2]<<8)+C[j-1],O.push(h[E>>10]+h[63&E>>4]+h[63&E<<2]+"=")),O.join("")}a.byteLength=function(C){var E=l(C),j=E[0],R=E[1];return 3*(j+R)/4-R},a.toByteArray=u,a.fromByteArray=p;for(var h=[],v=[],k=typeof Uint8Array>"u"?Array:Uint8Array,b="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",x=0,g=b.length;xS)throw new RangeError('The value "'+S+'" is invalid for option "size"')}function h(S,I,D){return p(S),0>=S||I===void 0?u(S):typeof D=="string"?u(S).fill(I,D):u(S).fill(I)}function v(S){return p(S),u(0>S?0:0|C(S))}function k(S,I){if((typeof I!="string"||I==="")&&(I="utf8"),!d.isEncoding(I))throw new TypeError("Unknown encoding: "+I);var D=0|E(S,I),W=u(D),ee=W.write(S,I);return ee!==D&&(W=W.slice(0,ee)),W}function b(S){for(var I=0>S.length?0:0|C(S.length),D=u(I),W=0;WI||S.byteLength=2147483647)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x7fffffff bytes");return 0|S}function E(S,I){if(d.isBuffer(S))return S.length;if(ArrayBuffer.isView(S)||J(S,ArrayBuffer))return S.byteLength;if(typeof S!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof S);var D=S.length,W=2>>1;case"base64":return ut(S).length;default:if(ee)return W?-1:nt(S).length;I=(""+I).toLowerCase(),ee=!0}}function j(S,I,D){var W=!1;if((I===void 0||0>I)&&(I=0),I>this.length||((D===void 0||D>this.length)&&(D=this.length),0>=D)||(D>>>=0,I>>>=0,D<=I))return"";for(S||(S="utf8");;)switch(S){case"hex":return Re(this,I,D);case"utf8":case"utf-8":return le(this,I,D);case"ascii":return H(this,I,D);case"latin1":case"binary":return ae(this,I,D);case"base64":return Z(this,I,D);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ue(this,I,D);default:if(W)throw new TypeError("Unknown encoding: "+S);S=(S+"").toLowerCase(),W=!0}}function R(S,I,D){var W=S[I];S[I]=S[D],S[D]=W}function O(S,I,D,W,ee){if(S.length===0)return-1;if(typeof D=="string"?(W=D,D=0):2147483647D&&(D=-2147483648),D=+D,fe(D)&&(D=ee?0:S.length-1),0>D&&(D=S.length+D),D>=S.length){if(ee)return-1;D=S.length-1}else if(0>D)if(ee)D=0;else return-1;if(typeof I=="string"&&(I=d.from(I,W)),d.isBuffer(I))return I.length===0?-1:P(S,I,D,W,ee);if(typeof I=="number")return I&=255,typeof Uint8Array.prototype.indexOf=="function"?ee?Uint8Array.prototype.indexOf.call(S,I,D):Uint8Array.prototype.lastIndexOf.call(S,I,D):P(S,[I],D,W,ee);throw new TypeError("val must be string, number or Buffer")}function P(S,I,D,W,ee){function pe(fr,Qe){return Te===1?fr[Qe]:fr.readUInt16BE(Qe*Te)}var Te=1,Fe=S.length,bt=I.length;if(W!==void 0&&(W=(W+"").toLowerCase(),W==="ucs2"||W==="ucs-2"||W==="utf16le"||W==="utf-16le")){if(2>S.length||2>I.length)return-1;Te=2,Fe/=2,bt/=2,D/=2}var rt;if(ee){var et=-1;for(rt=D;rtFe&&(D=Fe-bt),rt=D;0<=rt;rt--){for(var qe=!0,Yt=0;Ytee&&(W=ee)):W=ee;var pe=I.length;W>pe/2&&(W=pe/2);for(var Te,Fe=0;Fepe&&(Te=pe):Fe===2?(bt=S[ee+1],(192&bt)==128&&(qe=(31&pe)<<6|63&bt,127qe||57343qe&&(Te=qe)))}Te===null?(Te=65533,Fe=1):65535>>10),Te=56320|1023&Te),W.push(Te),ee+=Fe}return V(W)}function V(S){var I=S.length;if(I<=4096)return l.apply(String,S);for(var D="",W=0;WI)&&(I=0),(!D||0>D||D>W)&&(D=W);for(var ee="",pe=I;peS)throw new RangeError("offset is not uint");if(S+I>D)throw new RangeError("Trying to access beyond buffer length")}function Pe(S,I,D,W,ee,pe){if(!d.isBuffer(S))throw new TypeError('"buffer" argument must be a Buffer instance');if(I>ee||IS.length)throw new RangeError("Index out of range")}function Xe(S,I,D,W){if(D+W>S.length)throw new RangeError("Index out of range");if(0>D)throw new RangeError("Index out of range")}function Le(S,I,D,W,ee){return I=+I,D>>>=0,ee||Xe(S,I,D,4),Ie.write(S,I,D,W,23,4),D+4}function Ze(S,I,D,W,ee){return I=+I,D>>>=0,ee||Xe(S,I,D,8),Ie.write(S,I,D,W,52,8),D+8}function ct(S){if(S=S.split("=")[0],S=S.trim().replace(z,""),2>S.length)return"";for(;S.length%4!=0;)S+="=";return S}function je(S){return 16>S?"0"+S.toString(16):S.toString(16)}function nt(S,I){I=I||1/0;for(var D,W=S.length,ee=null,pe=[],Te=0;TeD){if(!ee){if(56319D){-1<(I-=3)&&pe.push(239,191,189),ee=D;continue}D=(ee-55296<<10|D-56320)+65536}else ee&&-1<(I-=3)&&pe.push(239,191,189);if(ee=null,128>D){if(0>(I-=1))break;pe.push(D)}else if(2048>D){if(0>(I-=2))break;pe.push(192|D>>6,128|63&D)}else if(65536>D){if(0>(I-=3))break;pe.push(224|D>>12,128|63&D>>6,128|63&D)}else if(1114112>D){if(0>(I-=4))break;pe.push(240|D>>18,128|63&D>>12,128|63&D>>6,128|63&D)}else throw new Error("Invalid code point")}return pe}function lt(S){for(var I=[],D=0;D(I-=2));++Te)D=S.charCodeAt(Te),W=D>>8,ee=D%256,pe.push(ee),pe.push(W);return pe}function ut(S){return xe.toByteArray(ct(S))}function Ke(S,I,D,W){for(var ee=0;ee=I.length||ee>=S.length);++ee)I[ee+D]=S[ee];return ee}function J(S,I){return S instanceof I||S!=null&&S.constructor!=null&&S.constructor.name!=null&&S.constructor.name===I.name}function fe(S){return S!==S}var xe=o("base64-js"),Ie=o("ieee754");a.Buffer=d,a.SlowBuffer=function(S){return+S!=S&&(S=0),d.alloc(+S)},a.INSPECT_MAX_BYTES=50,a.kMaxLength=2147483647,d.TYPED_ARRAY_SUPPORT=function(){try{var S=new Uint8Array(1);return S.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},S.foo()===42}catch{return!1}}(),d.TYPED_ARRAY_SUPPORT||typeof console>"u"||typeof console.error!="function"||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(d.prototype,"parent",{enumerable:!0,get:function(){return d.isBuffer(this)?this.buffer:void 0}}),Object.defineProperty(d.prototype,"offset",{enumerable:!0,get:function(){return d.isBuffer(this)?this.byteOffset:void 0}}),typeof Symbol<"u"&&Symbol.species!=null&&d[Symbol.species]===d&&Object.defineProperty(d,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),d.poolSize=8192,d.from=function(S,I,D){return f(S,I,D)},d.prototype.__proto__=Uint8Array.prototype,d.__proto__=Uint8Array,d.alloc=function(S,I,D){return h(S,I,D)},d.allocUnsafe=function(S){return v(S)},d.allocUnsafeSlow=function(S){return v(S)},d.isBuffer=function(S){return S!=null&&S._isBuffer===!0&&S!==d.prototype},d.compare=function(S,I){if(J(S,Uint8Array)&&(S=d.from(S,S.offset,S.byteLength)),J(I,Uint8Array)&&(I=d.from(I,I.offset,I.byteLength)),!d.isBuffer(S)||!d.isBuffer(I))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(S===I)return 0;for(var D=S.length,W=I.length,ee=0,pe=c(D,W);eeI&&(S+=" ... "),""},d.prototype.compare=function(S,I,D,W,ee){if(J(S,Uint8Array)&&(S=d.from(S,S.offset,S.byteLength)),!d.isBuffer(S))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof S);if(I===void 0&&(I=0),D===void 0&&(D=S?S.length:0),W===void 0&&(W=0),ee===void 0&&(ee=this.length),0>I||D>S.length||0>W||ee>this.length)throw new RangeError("out of range index");if(W>=ee&&I>=D)return 0;if(W>=ee)return-1;if(I>=D)return 1;if(I>>>=0,D>>>=0,W>>>=0,ee>>>=0,this===S)return 0;for(var pe=ee-W,Te=D-I,Fe=c(pe,Te),bt=this.slice(W,ee),rt=S.slice(I,D),et=0;et>>=0,isFinite(D)?(D>>>=0,W===void 0&&(W="utf8")):(W=D,D=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var ee=this.length-I;if((D===void 0||D>ee)&&(D=ee),0D||0>I)||I>this.length)throw new RangeError("Attempt to write outside buffer bounds");W||(W="utf8");for(var pe=!1;;)switch(W){case"hex":return L(this,S,I,D);case"utf8":case"utf-8":return A(this,S,I,D);case"ascii":return $(this,S,I,D);case"latin1":case"binary":return F(this,S,I,D);case"base64":return K(this,S,I,D);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Y(this,S,I,D);default:if(pe)throw new TypeError("Unknown encoding: "+W);W=(""+W).toLowerCase(),pe=!0}},d.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},d.prototype.slice=function(S,I){var D=this.length;S=~~S,I=I===void 0?D:~~I,0>S?(S+=D,0>S&&(S=0)):S>D&&(S=D),0>I?(I+=D,0>I&&(I=0)):I>D&&(I=D),I>>=0,I>>>=0,D||Ce(S,I,this.length);for(var W=this[S],ee=1,pe=0;++pe>>=0,I>>>=0,D||Ce(S,I,this.length);for(var W=this[S+--I],ee=1;0>>=0,I||Ce(S,1,this.length),this[S]},d.prototype.readUInt16LE=function(S,I){return S>>>=0,I||Ce(S,2,this.length),this[S]|this[S+1]<<8},d.prototype.readUInt16BE=function(S,I){return S>>>=0,I||Ce(S,2,this.length),this[S]<<8|this[S+1]},d.prototype.readUInt32LE=function(S,I){return S>>>=0,I||Ce(S,4,this.length),(this[S]|this[S+1]<<8|this[S+2]<<16)+16777216*this[S+3]},d.prototype.readUInt32BE=function(S,I){return S>>>=0,I||Ce(S,4,this.length),16777216*this[S]+(this[S+1]<<16|this[S+2]<<8|this[S+3])},d.prototype.readIntLE=function(S,I,D){S>>>=0,I>>>=0,D||Ce(S,I,this.length);for(var W=this[S],ee=1,pe=0;++pe=ee&&(W-=i(2,8*I)),W},d.prototype.readIntBE=function(S,I,D){S>>>=0,I>>>=0,D||Ce(S,I,this.length);for(var W=I,ee=1,pe=this[S+--W];0=ee&&(pe-=i(2,8*I)),pe},d.prototype.readInt8=function(S,I){return S>>>=0,I||Ce(S,1,this.length),128&this[S]?-1*(255-this[S]+1):this[S]},d.prototype.readInt16LE=function(S,I){S>>>=0,I||Ce(S,2,this.length);var D=this[S]|this[S+1]<<8;return 32768&D?4294901760|D:D},d.prototype.readInt16BE=function(S,I){S>>>=0,I||Ce(S,2,this.length);var D=this[S+1]|this[S]<<8;return 32768&D?4294901760|D:D},d.prototype.readInt32LE=function(S,I){return S>>>=0,I||Ce(S,4,this.length),this[S]|this[S+1]<<8|this[S+2]<<16|this[S+3]<<24},d.prototype.readInt32BE=function(S,I){return S>>>=0,I||Ce(S,4,this.length),this[S]<<24|this[S+1]<<16|this[S+2]<<8|this[S+3]},d.prototype.readFloatLE=function(S,I){return S>>>=0,I||Ce(S,4,this.length),Ie.read(this,S,!0,23,4)},d.prototype.readFloatBE=function(S,I){return S>>>=0,I||Ce(S,4,this.length),Ie.read(this,S,!1,23,4)},d.prototype.readDoubleLE=function(S,I){return S>>>=0,I||Ce(S,8,this.length),Ie.read(this,S,!0,52,8)},d.prototype.readDoubleBE=function(S,I){return S>>>=0,I||Ce(S,8,this.length),Ie.read(this,S,!1,52,8)},d.prototype.writeUIntLE=function(S,I,D,W){if(S=+S,I>>>=0,D>>>=0,!W){var ee=i(2,8*D)-1;Pe(this,S,I,D,ee,0)}var pe=1,Te=0;for(this[I]=255&S;++Te>>=0,D>>>=0,!W){var ee=i(2,8*D)-1;Pe(this,S,I,D,ee,0)}var pe=D-1,Te=1;for(this[I+pe]=255&S;0<=--pe&&(Te*=256);)this[I+pe]=255&S/Te;return I+D},d.prototype.writeUInt8=function(S,I,D){return S=+S,I>>>=0,D||Pe(this,S,I,1,255,0),this[I]=255&S,I+1},d.prototype.writeUInt16LE=function(S,I,D){return S=+S,I>>>=0,D||Pe(this,S,I,2,65535,0),this[I]=255&S,this[I+1]=S>>>8,I+2},d.prototype.writeUInt16BE=function(S,I,D){return S=+S,I>>>=0,D||Pe(this,S,I,2,65535,0),this[I]=S>>>8,this[I+1]=255&S,I+2},d.prototype.writeUInt32LE=function(S,I,D){return S=+S,I>>>=0,D||Pe(this,S,I,4,4294967295,0),this[I+3]=S>>>24,this[I+2]=S>>>16,this[I+1]=S>>>8,this[I]=255&S,I+4},d.prototype.writeUInt32BE=function(S,I,D){return S=+S,I>>>=0,D||Pe(this,S,I,4,4294967295,0),this[I]=S>>>24,this[I+1]=S>>>16,this[I+2]=S>>>8,this[I+3]=255&S,I+4},d.prototype.writeIntLE=function(S,I,D,W){if(S=+S,I>>>=0,!W){var ee=i(2,8*D-1);Pe(this,S,I,D,ee-1,-ee)}var pe=0,Te=1,Fe=0;for(this[I]=255&S;++peS&&Fe===0&&this[I+pe-1]!==0&&(Fe=1),this[I+pe]=255&(S/Te>>0)-Fe;return I+D},d.prototype.writeIntBE=function(S,I,D,W){if(S=+S,I>>>=0,!W){var ee=i(2,8*D-1);Pe(this,S,I,D,ee-1,-ee)}var pe=D-1,Te=1,Fe=0;for(this[I+pe]=255&S;0<=--pe&&(Te*=256);)0>S&&Fe===0&&this[I+pe+1]!==0&&(Fe=1),this[I+pe]=255&(S/Te>>0)-Fe;return I+D},d.prototype.writeInt8=function(S,I,D){return S=+S,I>>>=0,D||Pe(this,S,I,1,127,-128),0>S&&(S=255+S+1),this[I]=255&S,I+1},d.prototype.writeInt16LE=function(S,I,D){return S=+S,I>>>=0,D||Pe(this,S,I,2,32767,-32768),this[I]=255&S,this[I+1]=S>>>8,I+2},d.prototype.writeInt16BE=function(S,I,D){return S=+S,I>>>=0,D||Pe(this,S,I,2,32767,-32768),this[I]=S>>>8,this[I+1]=255&S,I+2},d.prototype.writeInt32LE=function(S,I,D){return S=+S,I>>>=0,D||Pe(this,S,I,4,2147483647,-2147483648),this[I]=255&S,this[I+1]=S>>>8,this[I+2]=S>>>16,this[I+3]=S>>>24,I+4},d.prototype.writeInt32BE=function(S,I,D){return S=+S,I>>>=0,D||Pe(this,S,I,4,2147483647,-2147483648),0>S&&(S=4294967295+S+1),this[I]=S>>>24,this[I+1]=S>>>16,this[I+2]=S>>>8,this[I+3]=255&S,I+4},d.prototype.writeFloatLE=function(S,I,D){return Le(this,S,I,!0,D)},d.prototype.writeFloatBE=function(S,I,D){return Le(this,S,I,!1,D)},d.prototype.writeDoubleLE=function(S,I,D){return Ze(this,S,I,!0,D)},d.prototype.writeDoubleBE=function(S,I,D){return Ze(this,S,I,!1,D)},d.prototype.copy=function(S,I,D,W){if(!d.isBuffer(S))throw new TypeError("argument should be a Buffer");if(D||(D=0),W||W===0||(W=this.length),I>=S.length&&(I=S.length),I||(I=0),0I)throw new RangeError("targetStart out of bounds");if(0>D||D>=this.length)throw new RangeError("Index out of range");if(0>W)throw new RangeError("sourceEnd out of bounds");W>this.length&&(W=this.length),S.length-Iee||W==="latin1")&&(S=ee)}}else typeof S=="number"&&(S&=255);if(0>I||this.length>>=0,D=D===void 0?this.length:D>>>0,S||(S=0);var pe;if(typeof S=="number")for(pe=I;pe{v==="%%"||(p++,v==="%c"&&(h=p))}),d.splice(h,0,f)},a.save=function(d){try{d?a.storage.setItem("debug",d):a.storage.removeItem("debug")}catch{}},a.load=c,a.useColors=function(){return!!(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))||!(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&(typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&31<=parseInt(RegExp.$1,10)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},a.storage=function(){try{return localStorage}catch{}}(),a.destroy=(()=>{let d=!1;return()=>{d||(d=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),a.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],a.log=console.debug||console.log||(()=>{}),s.exports=o("./common")(a);const{formatters:u}=s.exports;u.j=function(d){try{return JSON.stringify(d)}catch(f){return"[UnexpectedJSONParseError]: "+f.message}}}).call(this)}).call(this,o("_process"))},{"./common":5,_process:12}],5:[function(o,s){s.exports=function(a){function l(d){function f(...v){if(!f.enabled)return;const k=f,b=+new Date,x=b-(p||b);k.diff=x,k.prev=p,k.curr=b,p=b,v[0]=l.coerce(v[0]),typeof v[0]!="string"&&v.unshift("%O");let g=0;v[0]=v[0].replace(/%([a-zA-Z%])/g,(E,j)=>{if(E==="%%")return"%";g++;const R=l.formatters[j];if(typeof R=="function"){const O=v[g];E=R.call(k,O),v.splice(g,1),g--}return E}),l.formatArgs.call(k,v),(k.log||l.log).apply(k,v)}let p,h=null;return f.namespace=d,f.useColors=l.useColors(),f.color=l.selectColor(d),f.extend=c,f.destroy=l.destroy,Object.defineProperty(f,"enabled",{enumerable:!0,configurable:!1,get:()=>h===null?l.enabled(d):h,set:v=>{h=v}}),typeof l.init=="function"&&l.init(f),f}function c(d,f){const p=l(this.namespace+(typeof f>"u"?":":f)+d);return p.log=this.log,p}function u(d){return d.toString().substring(2,d.toString().length-2).replace(/\.\*\?$/,"*")}return l.debug=l,l.default=l,l.coerce=function(d){return d instanceof Error?d.stack||d.message:d},l.disable=function(){const d=[...l.names.map(u),...l.skips.map(u).map(f=>"-"+f)].join(",");return l.enable(""),d},l.enable=function(d){l.save(d),l.names=[],l.skips=[];let f;const p=(typeof d=="string"?d:"").split(/[\s,]+/),h=p.length;for(f=0;f{l[d]=a[d]}),l.names=[],l.skips=[],l.formatters={},l.selectColor=function(d){let f=0;for(let p=0;pK&&!Z.warned){Z.warned=!0;var le=new Error("Possible EventEmitter memory leak detected. "+Z.length+" "+(A+" listeners added. Use emitter.setMaxListeners() to increase limit"));le.name="MaxListenersExceededWarning",le.emitter=L,le.type=A,le.count=Z.length,a(le)}return L}function f(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function p(L,A,$){var F={fired:!1,wrapFn:void 0,target:L,type:A,listener:$},K=f.bind(F);return K.listener=$,F.wrapFn=K,K}function h(L,A,$){var F=L._events;if(F===void 0)return[];var K=F[A];return K===void 0?[]:typeof K=="function"?$?[K.listener||K]:[K]:$?x(K):k(K,K.length)}function v(L){var A=this._events;if(A!==void 0){var $=A[L];if(typeof $=="function")return 1;if($!==void 0)return $.length}return 0}function k(L,A){for(var $=Array(A),F=0;FL||O(L))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+L+".");P=L}}),l.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},l.prototype.setMaxListeners=function(L){if(typeof L!="number"||0>L||O(L))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+L+".");return this._maxListeners=L,this},l.prototype.getMaxListeners=function(){return u(this)},l.prototype.emit=function(L){for(var A=[],$=1;$K)return this;K===0?$.shift():b($,K),$.length===1&&(F[L]=$[0]),F.removeListener!==void 0&&this.emit("removeListener",L,Z||A)}return this},l.prototype.off=l.prototype.removeListener,l.prototype.removeAllListeners=function(L){var A,$,F;if($=this._events,$===void 0)return this;if($.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):$[L]!==void 0&&(--this._eventsCount==0?this._events=Object.create(null):delete $[L]),this;if(arguments.length===0){var K,Y=Object.keys($);for(F=0;F"u")return null;var a={RTCPeerConnection:globalThis.RTCPeerConnection||globalThis.mozRTCPeerConnection||globalThis.webkitRTCPeerConnection,RTCSessionDescription:globalThis.RTCSessionDescription||globalThis.mozRTCSessionDescription||globalThis.webkitRTCSessionDescription,RTCIceCandidate:globalThis.RTCIceCandidate||globalThis.mozRTCIceCandidate||globalThis.webkitRTCIceCandidate};return a.RTCPeerConnection?a:null}},{}],9:[function(o,s,a){/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */a.read=function(l,c,u,d,f){var p,h,v=8*f-d-1,k=(1<>1,x=-7,g=u?f-1:0,C=u?-1:1,E=l[c+g];for(g+=C,p=E&(1<<-x)-1,E>>=-x,x+=v;0>=-x,x+=d;0>1,j=f===23?i(2,-24)-i(2,-77):0,R=d?0:p-1,O=d?1:-1,P=0>c||c===0&&0>1/c?1:0;for(c=n(c),isNaN(c)||c===1/0?(v=isNaN(c)?1:0,h=C):(h=r(x(c)/b),1>c*(k=i(2,-h))&&(h--,k*=2),c+=1<=h+E?j/k:j*i(2,1-E),2<=c*k&&(h++,k/=2),h+E>=C?(v=0,h=C):1<=h+E?(v=(c*k-1)*i(2,f),h+=E):(v=c*i(2,E-1)*i(2,f),h=0));8<=f;l[u+R]=255&v,R+=O,v/=256,f-=8);for(h=h<=1.5*h?"s":"")}s.exports=function(f,p){p=p||{};var h=typeof f;if(h=="string"&&0 */let l;s.exports=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window>"u"?a:window):c=>(l||(l=Promise.resolve())).then(c).catch(u=>setTimeout(()=>{throw u},0))}).call(this)}).call(this,typeof _n>"u"?typeof self>"u"?typeof window>"u"?{}:window:self:_n)},{}],14:[function(o,s){(function(a,l){(function(){var c=o("safe-buffer").Buffer,u=l.crypto||l.msCrypto;s.exports=u&&u.getRandomValues?function(d,f){if(d>4294967295)throw new RangeError("requested too many random bytes");var p=c.allocUnsafe(d);if(0"u"?typeof self>"u"?typeof window>"u"?{}:window:self:_n)},{_process:12,"safe-buffer":30}],15:[function(o,s){function a(h,v){h.prototype=Object.create(v.prototype),h.prototype.constructor=h,h.__proto__=v}function l(h,v,k){function b(g,C,E){return typeof v=="string"?v:v(g,C,E)}k||(k=Error);var x=function(g){function C(E,j,R){return g.call(this,b(E,j,R))||this}return a(C,g),C}(k);x.prototype.name=k.name,x.prototype.code=h,p[h]=x}function c(h,v){if(Array.isArray(h)){var k=h.length;return h=h.map(function(b){return b+""}),2h.length)&&(k=h.length),h.substring(k-v.length,k)===v}function f(h,v,k){return typeof k!="number"&&(k=0),!(k+v.length>h.length)&&h.indexOf(v,k)!==-1}var p={};l("ERR_INVALID_OPT_VALUE",function(h,v){return'The value "'+v+'" is invalid for option "'+h+'"'},TypeError),l("ERR_INVALID_ARG_TYPE",function(h,v,k){var b;typeof v=="string"&&u(v,"not ")?(b="must not be",v=v.replace(/^not /,"")):b="must be";var x;if(d(h," argument"))x="The ".concat(h," ").concat(b," ").concat(c(v,"type"));else{var g=f(h,".")?"property":"argument";x='The "'.concat(h,'" ').concat(g," ").concat(b," ").concat(c(v,"type"))}return x+=". Received type ".concat(typeof k),x},TypeError),l("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),l("ERR_METHOD_NOT_IMPLEMENTED",function(h){return"The "+h+" method is not implemented"}),l("ERR_STREAM_PREMATURE_CLOSE","Premature close"),l("ERR_STREAM_DESTROYED",function(h){return"Cannot call "+h+" after a stream was destroyed"}),l("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),l("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),l("ERR_STREAM_WRITE_AFTER_END","write after end"),l("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),l("ERR_UNKNOWN_ENCODING",function(h){return"Unknown encoding: "+h},TypeError),l("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),s.exports.codes=p},{}],16:[function(o,s){(function(a){(function(){function l(b){return this instanceof l?(f.call(this,b),p.call(this,b),this.allowHalfOpen=!0,void(b&&(b.readable===!1&&(this.readable=!1),b.writable===!1&&(this.writable=!1),b.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",c))))):new l(b)}function c(){this._writableState.ended||a.nextTick(u,this)}function u(b){b.end()}var d=Object.keys||function(b){var x=[];for(var g in b)x.push(g);return x};s.exports=l;var f=o("./_stream_readable"),p=o("./_stream_writable");o("inherits")(l,f);for(var h,v=d(p.prototype),k=0;k>>1,z|=z>>>2,z|=z>>>4,z|=z>>>8,z|=z>>>16,z++),z}function x(z,S){return 0>=z||S.length===0&&S.ended?0:S.objectMode?1:z===z?(z>S.highWaterMark&&(S.highWaterMark=b(z)),z<=S.length?z:S.ended?S.length:(S.needReadable=!0,0)):S.flowing&&S.length?S.buffer.head.data.length:S.length}function g(z,S){if(H("onEofChunk"),!S.ended){if(S.decoder){var I=S.decoder.end();I&&I.length&&(S.buffer.push(I),S.length+=S.objectMode?1:I.length)}S.ended=!0,S.sync?C(z):(S.needReadable=!1,!S.emittedReadable&&(S.emittedReadable=!0,E(z)))}}function C(z){var S=z._readableState;H("emitReadable",S.needReadable,S.emittedReadable),S.needReadable=!1,S.emittedReadable||(H("emitReadable",S.flowing),S.emittedReadable=!0,a.nextTick(E,z))}function E(z){var S=z._readableState;H("emitReadable_",S.destroyed,S.length,S.ended),!S.destroyed&&(S.length||S.ended)&&(z.emit("readable"),S.emittedReadable=!1),S.needReadable=!S.flowing&&!S.ended&&S.length<=S.highWaterMark,F(z)}function j(z,S){S.readingMore||(S.readingMore=!0,a.nextTick(R,z,S))}function R(z,S){for(;!S.reading&&!S.ended&&(S.length=S.length?(I=S.decoder?S.buffer.join(""):S.buffer.length===1?S.buffer.first():S.buffer.concat(S.length),S.buffer.clear()):I=S.buffer.consume(z,S.decoder),I}function Y(z){var S=z._readableState;H("endReadable",S.endEmitted),S.endEmitted||(S.ended=!0,a.nextTick(Z,S,z))}function Z(z,S){if(H("endReadableNT",z.endEmitted,z.length),!z.endEmitted&&z.length===0&&(z.endEmitted=!0,S.readable=!1,S.emit("end"),z.autoDestroy)){var I=S._writableState;(!I||I.autoDestroy&&I.finished)&&S.destroy()}}function le(z,S){for(var I=0,D=z.length;I=S.highWaterMark)||S.ended))return H("read: emitReadable",S.length,S.ended),S.length===0&&S.ended?Y(this):C(this),null;if(z=x(z,S),z===0&&S.ended)return S.length===0&&Y(this),null;var D=S.needReadable;H("need readable",D),(S.length===0||S.length-z"u"?typeof self>"u"?typeof window>"u"?{}:window:self:_n)},{"../errors":15,"./_stream_duplex":16,"./internal/streams/async_iterator":21,"./internal/streams/buffer_list":22,"./internal/streams/destroy":23,"./internal/streams/from":25,"./internal/streams/state":27,"./internal/streams/stream":28,_process:12,buffer:3,events:7,inherits:10,"string_decoder/":31,util:2}],19:[function(o,s){function a(b,x){var g=this._transformState;g.transforming=!1;var C=g.writecb;if(C===null)return this.emit("error",new p);g.writechunk=null,g.writecb=null,x!=null&&this.push(x),C(b);var E=this._readableState;E.reading=!1,(E.needReadable||E.length"u"?typeof self>"u"?typeof window>"u"?{}:window:self:_n)},{"../errors":15,"./_stream_duplex":16,"./internal/streams/destroy":23,"./internal/streams/state":27,"./internal/streams/stream":28,_process:12,buffer:3,inherits:10,"util-deprecate":32}],21:[function(o,s){(function(a){(function(){function l(O,P,L){return P in O?Object.defineProperty(O,P,{value:L,enumerable:!0,configurable:!0,writable:!0}):O[P]=L,O}function c(O,P){return{value:O,done:P}}function u(O){var P=O[v];if(P!==null){var L=O[E].read();L!==null&&(O[g]=null,O[v]=null,O[k]=null,P(c(L,!1)))}}function d(O){a.nextTick(u,O)}function f(O,P){return function(L,A){O.then(function(){return P[x]?void L(c(void 0,!0)):void P[C](L,A)},A)}}var p,h=o("./end-of-stream"),v=Symbol("lastResolve"),k=Symbol("lastReject"),b=Symbol("error"),x=Symbol("ended"),g=Symbol("lastPromise"),C=Symbol("handlePromise"),E=Symbol("stream"),j=Object.getPrototypeOf(function(){}),R=Object.setPrototypeOf((p={get stream(){return this[E]},next:function(){var O=this,P=this[b];if(P!==null)return Promise.reject(P);if(this[x])return Promise.resolve(c(void 0,!0));if(this[E].destroyed)return new Promise(function(F,K){a.nextTick(function(){O[b]?K(O[b]):F(c(void 0,!0))})});var L,A=this[g];if(A)L=new Promise(f(A,this));else{var $=this[E].read();if($!==null)return Promise.resolve(c($,!1));L=new Promise(this[C])}return this[g]=L,L}},l(p,Symbol.asyncIterator,function(){return this}),l(p,"return",function(){var O=this;return new Promise(function(P,L){O[E].destroy(null,function(A){return A?void L(A):void P(c(void 0,!0))})})}),p),j);s.exports=function(O){var P,L=Object.create(R,(P={},l(P,E,{value:O,writable:!0}),l(P,v,{value:null,writable:!0}),l(P,k,{value:null,writable:!0}),l(P,b,{value:null,writable:!0}),l(P,x,{value:O._readableState.endEmitted,writable:!0}),l(P,C,{value:function(A,$){var F=L[E].read();F?(L[g]=null,L[v]=null,L[k]=null,A(c(F,!1))):(L[v]=A,L[k]=$)},writable:!0}),P));return L[g]=null,h(O,function(A){if(A&&A.code!=="ERR_STREAM_PREMATURE_CLOSE"){var $=L[k];return $!==null&&(L[g]=null,L[v]=null,L[k]=null,$(A)),void(L[b]=A)}var F=L[v];F!==null&&(L[g]=null,L[v]=null,L[k]=null,F(c(void 0,!0))),L[x]=!0}),O.on("readable",d.bind(null,L)),L}}).call(this)}).call(this,o("_process"))},{"./end-of-stream":24,_process:12}],22:[function(o,s){function a(g,C){var E=Object.keys(g);if(Object.getOwnPropertySymbols){var j=Object.getOwnPropertySymbols(g);C&&(j=j.filter(function(R){return Object.getOwnPropertyDescriptor(g,R).enumerable})),E.push.apply(E,j)}return E}function l(g){for(var C,E=1;E>>0),j=this.head,R=0;j;)p(j.data,E,R),R+=j.data.length,j=j.next;return E}},{key:"consume",value:function(C,E){var j;return CO.length?O.length:C;if(R+=P===O.length?O:O.slice(0,C),C-=P,C===0){P===O.length?(++j,this.head=E.next?E.next:this.tail=null):(this.head=E,E.data=O.slice(P));break}++j}return this.length-=j,R}},{key:"_getBuffer",value:function(C){var E=v.allocUnsafe(C),j=this.head,R=1;for(j.data.copy(E),C-=j.data.length;j=j.next;){var O=j.data,P=C>O.length?O.length:C;if(O.copy(E,E.length-C,0,P),C-=P,C===0){P===O.length?(++R,this.head=j.next?j.next:this.tail=null):(this.head=j,j.data=O.slice(P));break}++R}return this.length-=R,E}},{key:x,value:function(C,E){return b(this,l({},E,{depth:0,customInspect:!1}))}}]),g}()},{buffer:3,util:2}],23:[function(o,s){(function(a){(function(){function l(d,f){u(d,f),c(d)}function c(d){d._writableState&&!d._writableState.emitClose||d._readableState&&!d._readableState.emitClose||d.emit("close")}function u(d,f){d.emit("error",f)}s.exports={destroy:function(d,f){var p=this,h=this._readableState&&this._readableState.destroyed,v=this._writableState&&this._writableState.destroyed;return h||v?(f?f(d):d&&(this._writableState?!this._writableState.errorEmitted&&(this._writableState.errorEmitted=!0,a.nextTick(u,this,d)):a.nextTick(u,this,d)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(d||null,function(k){!f&&k?p._writableState?p._writableState.errorEmitted?a.nextTick(c,p):(p._writableState.errorEmitted=!0,a.nextTick(l,p,k)):a.nextTick(l,p,k):f?(a.nextTick(c,p),f(k)):a.nextTick(c,p)}),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(d,f){var p=d._readableState,h=d._writableState;p&&p.autoDestroy||h&&h.autoDestroy?d.destroy(f):d.emit("error",f)}}}).call(this)}).call(this,o("_process"))},{_process:12}],24:[function(o,s){function a(f){var p=!1;return function(){if(!p){p=!0;for(var h=arguments.length,v=Array(h),k=0;kg.length)throw new k("streams");var j,R=g.map(function(O,P){var L=Pp){var h=f?d:"highWaterMark";throw new l(h,p)}return r(p)}return c.objectMode?16:16384}}},{"../../../errors":15}],28:[function(o,s){s.exports=o("events").EventEmitter},{events:7}],29:[function(o,s,a){a=s.exports=o("./lib/_stream_readable.js"),a.Stream=a,a.Readable=a,a.Writable=o("./lib/_stream_writable.js"),a.Duplex=o("./lib/_stream_duplex.js"),a.Transform=o("./lib/_stream_transform.js"),a.PassThrough=o("./lib/_stream_passthrough.js"),a.finished=o("./lib/internal/streams/end-of-stream.js"),a.pipeline=o("./lib/internal/streams/pipeline.js")},{"./lib/_stream_duplex.js":16,"./lib/_stream_passthrough.js":17,"./lib/_stream_readable.js":18,"./lib/_stream_transform.js":19,"./lib/_stream_writable.js":20,"./lib/internal/streams/end-of-stream.js":24,"./lib/internal/streams/pipeline.js":26}],30:[function(o,s,a){function l(f,p){for(var h in f)p[h]=f[h]}function c(f,p,h){return d(f,p,h)}/*! safe-buffer. MIT License. Feross Aboukhadijeh */var u=o("buffer"),d=u.Buffer;d.from&&d.alloc&&d.allocUnsafe&&d.allocUnsafeSlow?s.exports=u:(l(u,a),a.Buffer=c),c.prototype=Object.create(d.prototype),l(d,c),c.from=function(f,p,h){if(typeof f=="number")throw new TypeError("Argument must not be a number");return d(f,p,h)},c.alloc=function(f,p,h){if(typeof f!="number")throw new TypeError("Argument must be a number");var v=d(f);return p===void 0?v.fill(0):typeof h=="string"?v.fill(p,h):v.fill(p),v},c.allocUnsafe=function(f){if(typeof f!="number")throw new TypeError("Argument must be a number");return d(f)},c.allocUnsafeSlow=function(f){if(typeof f!="number")throw new TypeError("Argument must be a number");return u.SlowBuffer(f)}},{buffer:3}],31:[function(o,s,a){function l(R){if(!R)return"utf8";for(var O;;)switch(R){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return R;default:if(O)return;R=(""+R).toLowerCase(),O=!0}}function c(R){var O=l(R);if(typeof O!="string"&&(E.isEncoding===j||!j(R)))throw new Error("Unknown encoding: "+R);return O||R}function u(R){this.encoding=c(R);var O;switch(this.encoding){case"utf16le":this.text=v,this.end=k,O=4;break;case"utf8":this.fillLast=h,O=4;break;case"base64":this.text=b,this.end=x,O=3;break;default:return this.write=g,void(this.end=C)}this.lastNeed=0,this.lastTotal=0,this.lastChar=E.allocUnsafe(O)}function d(R){return 127>=R?0:R>>5==6?2:R>>4==14?3:R>>3==30?4:R>>6==2?-1:-2}function f(R,O,P){var L=O.length-1;if(L=L)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=R[R.length-2],this.lastChar[1]=R[R.length-1],P.slice(0,-1)}return P}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=R[R.length-1],R.toString("utf16le",O,R.length-1)}function k(R){var O=R&&R.length?this.write(R):"";if(this.lastNeed){var P=this.lastTotal-this.lastNeed;return O+this.lastChar.toString("utf16le",0,P)}return O}function b(R,O){var P=(R.length-O)%3;return P==0?R.toString("base64",O):(this.lastNeed=3-P,this.lastTotal=3,P==1?this.lastChar[0]=R[R.length-1]:(this.lastChar[0]=R[R.length-2],this.lastChar[1]=R[R.length-1]),R.toString("base64",O,R.length-P))}function x(R){var O=R&&R.length?this.write(R):"";return this.lastNeed?O+this.lastChar.toString("base64",0,3-this.lastNeed):O}function g(R){return R.toString(this.encoding)}function C(R){return R&&R.length?this.write(R):""}var E=o("safe-buffer").Buffer,j=E.isEncoding||function(R){switch(R=""+R,R&&R.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};a.StringDecoder=u,u.prototype.write=function(R){if(R.length===0)return"";var O,P;if(this.lastNeed){if(O=this.fillLast(R),O===void 0)return"";P=this.lastNeed,this.lastNeed=0}else P=0;return P"u"?typeof self>"u"?typeof window>"u"?{}:window:self:_n)},{}],"/":[function(o,s){function a(x){return x.replace(/a=ice-options:trickle\s\n/g,"")}function l(x){console.warn(x)}/*! simple-peer. MIT License. Feross Aboukhadijeh */const c=o("debug")("simple-peer"),u=o("get-browser-rtc"),d=o("randombytes"),f=o("readable-stream"),p=o("queue-microtask"),h=o("err-code"),{Buffer:v}=o("buffer"),k=65536;class b extends f.Duplex{constructor(g){if(g=Object.assign({allowHalfOpen:!1},g),super(g),this._id=d(4).toString("hex").slice(0,7),this._debug("new peer %o",g),this.channelName=g.initiator?g.channelName||d(20).toString("hex"):null,this.initiator=g.initiator||!1,this.channelConfig=g.channelConfig||b.channelConfig,this.channelNegotiated=this.channelConfig.negotiated,this.config=Object.assign({},b.config,g.config),this.offerOptions=g.offerOptions||{},this.answerOptions=g.answerOptions||{},this.sdpTransform=g.sdpTransform||(C=>C),this.streams=g.streams||(g.stream?[g.stream]:[]),this.trickle=g.trickle===void 0||g.trickle,this.allowHalfTrickle=g.allowHalfTrickle!==void 0&&g.allowHalfTrickle,this.iceCompleteTimeout=g.iceCompleteTimeout||5e3,this.destroyed=!1,this.destroying=!1,this._connected=!1,this.remoteAddress=void 0,this.remoteFamily=void 0,this.remotePort=void 0,this.localAddress=void 0,this.localFamily=void 0,this.localPort=void 0,this._wrtc=g.wrtc&&typeof g.wrtc=="object"?g.wrtc:u(),!this._wrtc)throw h(typeof window>"u"?new Error("No WebRTC support: Specify `opts.wrtc` option in this environment"):new Error("No WebRTC support: Not a supported browser"),"ERR_WEBRTC_SUPPORT");this._pcReady=!1,this._channelReady=!1,this._iceComplete=!1,this._iceCompleteTimer=null,this._channel=null,this._pendingCandidates=[],this._isNegotiating=!1,this._firstNegotiation=!0,this._batchedNegotiation=!1,this._queuedNegotiation=!1,this._sendersAwaitingStable=[],this._senderMap=new Map,this._closingInterval=null,this._remoteTracks=[],this._remoteStreams=[],this._chunk=null,this._cb=null,this._interval=null;try{this._pc=new this._wrtc.RTCPeerConnection(this.config)}catch(C){return void this.destroy(h(C,"ERR_PC_CONSTRUCTOR"))}this._isReactNativeWebrtc=typeof this._pc._peerConnectionId=="number",this._pc.oniceconnectionstatechange=()=>{this._onIceStateChange()},this._pc.onicegatheringstatechange=()=>{this._onIceStateChange()},this._pc.onconnectionstatechange=()=>{this._onConnectionStateChange()},this._pc.onsignalingstatechange=()=>{this._onSignalingStateChange()},this._pc.onicecandidate=C=>{this._onIceCandidate(C)},typeof this._pc.peerIdentity=="object"&&this._pc.peerIdentity.catch(C=>{this.destroy(h(C,"ERR_PC_PEER_IDENTITY"))}),this.initiator||this.channelNegotiated?this._setupData({channel:this._pc.createDataChannel(this.channelName,this.channelConfig)}):this._pc.ondatachannel=C=>{this._setupData(C)},this.streams&&this.streams.forEach(C=>{this.addStream(C)}),this._pc.ontrack=C=>{this._onTrack(C)},this._debug("initial negotiation"),this._needsNegotiation(),this._onFinishBound=()=>{this._onFinish()},this.once("finish",this._onFinishBound)}get bufferSize(){return this._channel&&this._channel.bufferedAmount||0}get connected(){return this._connected&&this._channel.readyState==="open"}address(){return{port:this.localPort,family:this.localFamily,address:this.localAddress}}signal(g){if(!this.destroying){if(this.destroyed)throw h(new Error("cannot signal after peer is destroyed"),"ERR_DESTROYED");if(typeof g=="string")try{g=JSON.parse(g)}catch{g={}}this._debug("signal()"),g.renegotiate&&this.initiator&&(this._debug("got request to renegotiate"),this._needsNegotiation()),g.transceiverRequest&&this.initiator&&(this._debug("got request for transceiver"),this.addTransceiver(g.transceiverRequest.kind,g.transceiverRequest.init)),g.candidate&&(this._pc.remoteDescription&&this._pc.remoteDescription.type?this._addIceCandidate(g.candidate):this._pendingCandidates.push(g.candidate)),g.sdp&&this._pc.setRemoteDescription(new this._wrtc.RTCSessionDescription(g)).then(()=>{this.destroyed||(this._pendingCandidates.forEach(C=>{this._addIceCandidate(C)}),this._pendingCandidates=[],this._pc.remoteDescription.type==="offer"&&this._createAnswer())}).catch(C=>{this.destroy(h(C,"ERR_SET_REMOTE_DESCRIPTION"))}),g.sdp||g.candidate||g.renegotiate||g.transceiverRequest||this.destroy(h(new Error("signal() called with invalid signal data"),"ERR_SIGNALING"))}}_addIceCandidate(g){const C=new this._wrtc.RTCIceCandidate(g);this._pc.addIceCandidate(C).catch(E=>{!C.address||C.address.endsWith(".local")?l("Ignoring unsupported ICE candidate."):this.destroy(h(E,"ERR_ADD_ICE_CANDIDATE"))})}send(g){if(!this.destroying){if(this.destroyed)throw h(new Error("cannot send after peer is destroyed"),"ERR_DESTROYED");this._channel.send(g)}}addTransceiver(g,C){if(!this.destroying){if(this.destroyed)throw h(new Error("cannot addTransceiver after peer is destroyed"),"ERR_DESTROYED");if(this._debug("addTransceiver()"),this.initiator)try{this._pc.addTransceiver(g,C),this._needsNegotiation()}catch(E){this.destroy(h(E,"ERR_ADD_TRANSCEIVER"))}else this.emit("signal",{type:"transceiverRequest",transceiverRequest:{kind:g,init:C}})}}addStream(g){if(!this.destroying){if(this.destroyed)throw h(new Error("cannot addStream after peer is destroyed"),"ERR_DESTROYED");this._debug("addStream()"),g.getTracks().forEach(C=>{this.addTrack(C,g)})}}addTrack(g,C){if(this.destroying)return;if(this.destroyed)throw h(new Error("cannot addTrack after peer is destroyed"),"ERR_DESTROYED");this._debug("addTrack()");const E=this._senderMap.get(g)||new Map;let j=E.get(C);if(!j)j=this._pc.addTrack(g,C),E.set(C,j),this._senderMap.set(g,E),this._needsNegotiation();else throw j.removed?h(new Error("Track has been removed. You should enable/disable tracks that you want to re-add."),"ERR_SENDER_REMOVED"):h(new Error("Track has already been added to that stream."),"ERR_SENDER_ALREADY_ADDED")}replaceTrack(g,C,E){if(this.destroying)return;if(this.destroyed)throw h(new Error("cannot replaceTrack after peer is destroyed"),"ERR_DESTROYED");this._debug("replaceTrack()");const j=this._senderMap.get(g),R=j?j.get(E):null;if(!R)throw h(new Error("Cannot replace track that was never added."),"ERR_TRACK_NOT_ADDED");C&&this._senderMap.set(C,j),R.replaceTrack==null?this.destroy(h(new Error("replaceTrack is not supported in this browser"),"ERR_UNSUPPORTED_REPLACETRACK")):R.replaceTrack(C)}removeTrack(g,C){if(this.destroying)return;if(this.destroyed)throw h(new Error("cannot removeTrack after peer is destroyed"),"ERR_DESTROYED");this._debug("removeSender()");const E=this._senderMap.get(g),j=E?E.get(C):null;if(!j)throw h(new Error("Cannot remove track that was never added."),"ERR_TRACK_NOT_ADDED");try{j.removed=!0,this._pc.removeTrack(j)}catch(R){R.name==="NS_ERROR_UNEXPECTED"?this._sendersAwaitingStable.push(j):this.destroy(h(R,"ERR_REMOVE_TRACK"))}this._needsNegotiation()}removeStream(g){if(!this.destroying){if(this.destroyed)throw h(new Error("cannot removeStream after peer is destroyed"),"ERR_DESTROYED");this._debug("removeSenders()"),g.getTracks().forEach(C=>{this.removeTrack(C,g)})}}_needsNegotiation(){this._debug("_needsNegotiation"),this._batchedNegotiation||(this._batchedNegotiation=!0,p(()=>{this._batchedNegotiation=!1,this.initiator||!this._firstNegotiation?(this._debug("starting batched negotiation"),this.negotiate()):this._debug("non-initiator initial negotiation request discarded"),this._firstNegotiation=!1}))}negotiate(){if(!this.destroying){if(this.destroyed)throw h(new Error("cannot negotiate after peer is destroyed"),"ERR_DESTROYED");this.initiator?this._isNegotiating?(this._queuedNegotiation=!0,this._debug("already negotiating, queueing")):(this._debug("start negotiation"),setTimeout(()=>{this._createOffer()},0)):this._isNegotiating?(this._queuedNegotiation=!0,this._debug("already negotiating, queueing")):(this._debug("requesting negotiation from initiator"),this.emit("signal",{type:"renegotiate",renegotiate:!0})),this._isNegotiating=!0}}destroy(g){this._destroy(g,()=>{})}_destroy(g,C){this.destroyed||this.destroying||(this.destroying=!0,this._debug("destroying (error: %s)",g&&(g.message||g)),p(()=>{if(this.destroyed=!0,this.destroying=!1,this._debug("destroy (error: %s)",g&&(g.message||g)),this.readable=this.writable=!1,this._readableState.ended||this.push(null),this._writableState.finished||this.end(),this._connected=!1,this._pcReady=!1,this._channelReady=!1,this._remoteTracks=null,this._remoteStreams=null,this._senderMap=null,clearInterval(this._closingInterval),this._closingInterval=null,clearInterval(this._interval),this._interval=null,this._chunk=null,this._cb=null,this._onFinishBound&&this.removeListener("finish",this._onFinishBound),this._onFinishBound=null,this._channel){try{this._channel.close()}catch{}this._channel.onmessage=null,this._channel.onopen=null,this._channel.onclose=null,this._channel.onerror=null}if(this._pc){try{this._pc.close()}catch{}this._pc.oniceconnectionstatechange=null,this._pc.onicegatheringstatechange=null,this._pc.onsignalingstatechange=null,this._pc.onicecandidate=null,this._pc.ontrack=null,this._pc.ondatachannel=null}this._pc=null,this._channel=null,g&&this.emit("error",g),this.emit("close"),C()}))}_setupData(g){if(!g.channel)return this.destroy(h(new Error("Data channel event is missing `channel` property"),"ERR_DATA_CHANNEL"));this._channel=g.channel,this._channel.binaryType="arraybuffer",typeof this._channel.bufferedAmountLowThreshold=="number"&&(this._channel.bufferedAmountLowThreshold=k),this.channelName=this._channel.label,this._channel.onmessage=E=>{this._onChannelMessage(E)},this._channel.onbufferedamountlow=()=>{this._onChannelBufferedAmountLow()},this._channel.onopen=()=>{this._onChannelOpen()},this._channel.onclose=()=>{this._onChannelClose()},this._channel.onerror=E=>{const j=E.error instanceof Error?E.error:new Error(`Datachannel error: ${E.message} ${E.filename}:${E.lineno}:${E.colno}`);this.destroy(h(j,"ERR_DATA_CHANNEL"))};let C=!1;this._closingInterval=setInterval(()=>{this._channel&&this._channel.readyState==="closing"?(C&&this._onChannelClose(),C=!0):C=!1},5e3)}_read(){}_write(g,C,E){if(this.destroyed)return E(h(new Error("cannot write after peer is destroyed"),"ERR_DATA_CHANNEL"));if(this._connected){try{this.send(g)}catch(j){return this.destroy(h(j,"ERR_DATA_CHANNEL"))}this._channel.bufferedAmount>k?(this._debug("start backpressure: bufferedAmount %d",this._channel.bufferedAmount),this._cb=E):E(null)}else this._debug("write before connect"),this._chunk=g,this._cb=E}_onFinish(){if(!this.destroyed){const g=()=>{setTimeout(()=>this.destroy(),1e3)};this._connected?g():this.once("connect",g)}}_startIceCompleteTimeout(){this.destroyed||this._iceCompleteTimer||(this._debug("started iceComplete timeout"),this._iceCompleteTimer=setTimeout(()=>{this._iceComplete||(this._iceComplete=!0,this._debug("iceComplete timeout completed"),this.emit("iceTimeout"),this.emit("_iceComplete"))},this.iceCompleteTimeout))}_createOffer(){this.destroyed||this._pc.createOffer(this.offerOptions).then(g=>{if(this.destroyed)return;this.trickle||this.allowHalfTrickle||(g.sdp=a(g.sdp)),g.sdp=this.sdpTransform(g.sdp);const C=()=>{if(!this.destroyed){const E=this._pc.localDescription||g;this._debug("signal"),this.emit("signal",{type:E.type,sdp:E.sdp})}};this._pc.setLocalDescription(g).then(()=>{this._debug("createOffer success"),this.destroyed||(this.trickle||this._iceComplete?C():this.once("_iceComplete",C))}).catch(E=>{this.destroy(h(E,"ERR_SET_LOCAL_DESCRIPTION"))})}).catch(g=>{this.destroy(h(g,"ERR_CREATE_OFFER"))})}_requestMissingTransceivers(){this._pc.getTransceivers&&this._pc.getTransceivers().forEach(g=>{g.mid||!g.sender.track||g.requested||(g.requested=!0,this.addTransceiver(g.sender.track.kind))})}_createAnswer(){this.destroyed||this._pc.createAnswer(this.answerOptions).then(g=>{if(this.destroyed)return;this.trickle||this.allowHalfTrickle||(g.sdp=a(g.sdp)),g.sdp=this.sdpTransform(g.sdp);const C=()=>{if(!this.destroyed){const E=this._pc.localDescription||g;this._debug("signal"),this.emit("signal",{type:E.type,sdp:E.sdp}),this.initiator||this._requestMissingTransceivers()}};this._pc.setLocalDescription(g).then(()=>{this.destroyed||(this.trickle||this._iceComplete?C():this.once("_iceComplete",C))}).catch(E=>{this.destroy(h(E,"ERR_SET_LOCAL_DESCRIPTION"))})}).catch(g=>{this.destroy(h(g,"ERR_CREATE_ANSWER"))})}_onConnectionStateChange(){this.destroyed||this._pc.connectionState==="failed"&&this.destroy(h(new Error("Connection failed."),"ERR_CONNECTION_FAILURE"))}_onIceStateChange(){if(this.destroyed)return;const g=this._pc.iceConnectionState,C=this._pc.iceGatheringState;this._debug("iceStateChange (connection: %s) (gathering: %s)",g,C),this.emit("iceStateChange",g,C),(g==="connected"||g==="completed")&&(this._pcReady=!0,this._maybeReady()),g==="failed"&&this.destroy(h(new Error("Ice connection failed."),"ERR_ICE_CONNECTION_FAILURE")),g==="closed"&&this.destroy(h(new Error("Ice connection closed."),"ERR_ICE_CONNECTION_CLOSED"))}getStats(g){const C=E=>(Object.prototype.toString.call(E.values)==="[object Array]"&&E.values.forEach(j=>{Object.assign(E,j)}),E);this._pc.getStats.length===0||this._isReactNativeWebrtc?this._pc.getStats().then(E=>{const j=[];E.forEach(R=>{j.push(C(R))}),g(null,j)},E=>g(E)):0{if(this.destroyed)return;const j=[];E.result().forEach(R=>{const O={};R.names().forEach(P=>{O[P]=R.stat(P)}),O.id=R.id,O.type=R.type,O.timestamp=R.timestamp,j.push(C(O))}),g(null,j)},E=>g(E)):g(null,[])}_maybeReady(){if(this._debug("maybeReady pc %s channel %s",this._pcReady,this._channelReady),this._connected||this._connecting||!this._pcReady||!this._channelReady)return;this._connecting=!0;const g=()=>{this.destroyed||this.getStats((C,E)=>{if(this.destroyed)return;C&&(E=[]);const j={},R={},O={};let P=!1;E.forEach(A=>{(A.type==="remotecandidate"||A.type==="remote-candidate")&&(j[A.id]=A),(A.type==="localcandidate"||A.type==="local-candidate")&&(R[A.id]=A),(A.type==="candidatepair"||A.type==="candidate-pair")&&(O[A.id]=A)});const L=A=>{P=!0;let $=R[A.localCandidateId];$&&($.ip||$.address)?(this.localAddress=$.ip||$.address,this.localPort=+$.port):$&&$.ipAddress?(this.localAddress=$.ipAddress,this.localPort=+$.portNumber):typeof A.googLocalAddress=="string"&&($=A.googLocalAddress.split(":"),this.localAddress=$[0],this.localPort=+$[1]),this.localAddress&&(this.localFamily=this.localAddress.includes(":")?"IPv6":"IPv4");let F=j[A.remoteCandidateId];F&&(F.ip||F.address)?(this.remoteAddress=F.ip||F.address,this.remotePort=+F.port):F&&F.ipAddress?(this.remoteAddress=F.ipAddress,this.remotePort=+F.portNumber):typeof A.googRemoteAddress=="string"&&(F=A.googRemoteAddress.split(":"),this.remoteAddress=F[0],this.remotePort=+F[1]),this.remoteAddress&&(this.remoteFamily=this.remoteAddress.includes(":")?"IPv6":"IPv4"),this._debug("connect local: %s:%s remote: %s:%s",this.localAddress,this.localPort,this.remoteAddress,this.remotePort)};if(E.forEach(A=>{A.type==="transport"&&A.selectedCandidatePairId&&L(O[A.selectedCandidatePairId]),(A.type==="googCandidatePair"&&A.googActiveConnection==="true"||(A.type==="candidatepair"||A.type==="candidate-pair")&&A.selected)&&L(A)}),!P&&(!Object.keys(O).length||Object.keys(R).length))return void setTimeout(g,100);if(this._connecting=!1,this._connected=!0,this._chunk){try{this.send(this._chunk)}catch($){return this.destroy(h($,"ERR_DATA_CHANNEL"))}this._chunk=null,this._debug('sent chunk from "write before connect"');const A=this._cb;this._cb=null,A(null)}typeof this._channel.bufferedAmountLowThreshold!="number"&&(this._interval=setInterval(()=>this._onInterval(),150),this._interval.unref&&this._interval.unref()),this._debug("connect"),this.emit("connect")})};g()}_onInterval(){this._cb&&this._channel&&!(this._channel.bufferedAmount>k)&&this._onChannelBufferedAmountLow()}_onSignalingStateChange(){this.destroyed||(this._pc.signalingState==="stable"&&(this._isNegotiating=!1,this._debug("flushing sender queue",this._sendersAwaitingStable),this._sendersAwaitingStable.forEach(g=>{this._pc.removeTrack(g),this._queuedNegotiation=!0}),this._sendersAwaitingStable=[],this._queuedNegotiation?(this._debug("flushing negotiation queue"),this._queuedNegotiation=!1,this._needsNegotiation()):(this._debug("negotiated"),this.emit("negotiated"))),this._debug("signalingStateChange %s",this._pc.signalingState),this.emit("signalingStateChange",this._pc.signalingState))}_onIceCandidate(g){this.destroyed||(g.candidate&&this.trickle?this.emit("signal",{type:"candidate",candidate:{candidate:g.candidate.candidate,sdpMLineIndex:g.candidate.sdpMLineIndex,sdpMid:g.candidate.sdpMid}}):!g.candidate&&!this._iceComplete&&(this._iceComplete=!0,this.emit("_iceComplete")),g.candidate&&this._startIceCompleteTimeout())}_onChannelMessage(g){if(this.destroyed)return;let C=g.data;C instanceof ArrayBuffer&&(C=v.from(C)),this.push(C)}_onChannelBufferedAmountLow(){if(!this.destroyed&&this._cb){this._debug("ending backpressure: bufferedAmount %d",this._channel.bufferedAmount);const g=this._cb;this._cb=null,g(null)}}_onChannelOpen(){this._connected||this.destroyed||(this._debug("on channel open"),this._channelReady=!0,this._maybeReady())}_onChannelClose(){this.destroyed||(this._debug("on channel close"),this.destroy())}_onTrack(g){this.destroyed||g.streams.forEach(C=>{this._debug("on track"),this.emit("track",g.track,C),this._remoteTracks.push({track:g.track,stream:C}),this._remoteStreams.some(E=>E.id===C.id)||(this._remoteStreams.push(C),p(()=>{this._debug("on stream"),this.emit("stream",C)}))})}_debug(){const g=[].slice.call(arguments);g[0]="["+this._id+"] "+g[0],c.apply(null,g)}}b.WEBRTC_SUPPORT=!!u(),b.config={iceServers:[{urls:["stun:stun.l.google.com:19302","stun:global.stun.twilio.com:3478"]}],sdpSemantics:"unified-plan"},b.channelConfig={},s.exports=b},{buffer:3,debug:4,"err-code":6,"get-browser-rtc":8,"queue-microtask":13,randombytes:14,"readable-stream":29}]},{},[])("/")})})(zL);var TY=zL.exports;const OY=Ha(TY);var jY=OY;function N0(e,t){e.send(JSON.stringify(t))}var UL="signaling.rxdb.info",YE="wss://"+UL+"/",QE=!1,LY=1e3*60*2;function IY({signalingServerUrl:e,wrtc:t,config:r,webSocketConstructor:n}){MY(),e=e||YE,n=n||WebSocket,e.includes(UL)&&!QE&&(QE=!0,console.warn(["RxDB Warning: You are using the RxDB WebRTC replication plugin","but you did not specify your own signaling server url.","By default it will use a signaling server provided by RxDB at "+YE,"This server is made for demonstration purposes and tryouts. It is not reliable and might be offline at any time.","In production you must always use your own signaling server instead.","Learn how to run your own server at https://rxdb.info/replication-webrtc.html","Also leave a ⭐ at the RxDB github repo 🙏 https://github.com/pubkey/rxdb 🙏"].join(" ")));var i=async o=>{var s=new Ir,a=new Ir,l=new Ir,c=new Ir,u=new Ir,d=new Map,f=!1,p,h=void 0;v(),(async()=>{for(;await WO(LY/2),!f;)h&&N0(h,{type:"ping"})})();function v(){f||(h=new n(e),h.onclose=()=>v(),h.onopen=()=>{St(h).onmessage=b=>{var x=JSON.parse(b.data);switch(x.type){case"init":p=x.yourPeerId,N0(St(h),{type:"join",room:o.topic});break;case"joined":var g=function(E){var j=!1,R=new jY({initiator:E>p,wrtc:t,config:r,trickle:!0});R.id=sc(10),d.set(E,R),R.on("signal",O=>{N0(St(h),{type:"signal",senderPeerId:p,receiverPeerId:E,room:o.topic,data:O})}),R.on("data",O=>{O=JSON.parse(O.toString()),O.result?c.next({peer:R,response:O}):l.next({peer:R,message:O})}),R.on("error",O=>{u.next(it("RC_WEBRTC_PEER",{error:O})),R.destroy(),j||(j=!0,a.next(R))}),R.on("connect",()=>{s.next(R)}),R.on("close",()=>{j||(j=!0,a.next(R)),g(E)})};x.otherPeerIds.forEach(E=>{E===p||d.has(E)||g(E)});break;case"signal":var C=Ws(d,x.senderPeerId);C.signal(x.data);break}}})}var k={error$:u,connect$:s,disconnect$:a,message$:l,response$:c,async send(b,x){await b.send(JSON.stringify(x))},destroy(){return f=!0,St(h).close(),u.complete(),s.complete(),a.complete(),l.complete(),c.complete(),Ri}};return k};return i}function MY(){if(typeof So>"u"||typeof So.nextTick!="function")throw it("RC7")}async function AY(e){var t=e.collection;Ju(gS),e.pull&&(e.pull.batchSize||(e.pull.batchSize=20)),e.push&&(e.push.batchSize||(e.push.batchSize=20)),t.database.multiInstance&&await t.database.waitForLeadership();var r=0,n=sc(10);function i(){var l=r++;return t.database.token+"|"+n+"|"+l}var o=await t.database.storageToken,s=new NY(t,e,await e.connectionHandlerCreator(e));s.subs.push(s.connectionHandler.error$.subscribe(l=>s.error$.next(l)),s.connectionHandler.disconnect$.subscribe(l=>s.removePeer(l))),s.subs.push(s.connectionHandler.message$.pipe(Wt(l=>l.message.method==="token")).subscribe(l=>{s.connectionHandler.send(l.peer,{id:l.message.id,result:o})}));var a=s.connectionHandler.connect$.pipe(Wt(()=>!s.canceled)).subscribe(async l=>{if(e.isPeerValid){var c=await e.isPeerValid(l);if(!c)return}var u;try{var d=await A0(s.connectionHandler,l,{id:i(),method:"token",params:[]});u=d.result}catch(b){s.error$.next(it("RC_WEBRTC_PEER",{error:b}));return}var f=await kY(t.database.hashFunction,o,u),p;if(f){var h=s.masterReplicationHandler,v=h.masterChangeStream$.subscribe(b=>{var x={id:"masterChangeStream$",result:b};s.connectionHandler.send(l,x)});s.subs.push(v,s.connectionHandler.disconnect$.pipe(Wt(b=>b===l)).subscribe(()=>v.unsubscribe()));var k=s.connectionHandler.message$.pipe(Wt(b=>b.peer===l),Wt(b=>b.message.method!=="token")).subscribe(async b=>{var{peer:x,message:g}=b,C=h[g.method].bind(h),E=await C(...g.params),j={id:g.id,result:E};s.connectionHandler.send(x,j)});s.subs.push(k)}else p=sY({replicationIdentifier:[t.name,e.topic,u].join("||"),collection:t,autoStart:!0,deletedField:"_deleted",live:!0,retryTime:e.retryTime,waitForLeadership:!1,pull:e.pull?Object.assign({},e.pull,{async handler(b){var x=await A0(s.connectionHandler,l,{method:"masterChangesSince",params:[b,St(e.pull).batchSize],id:i()});return x.result},stream$:s.connectionHandler.response$.pipe(Wt(b=>b.response.id==="masterChangeStream$"),qt(b=>b.response.result))}):void 0,push:e.push?Object.assign({},e.push,{async handler(b){var x=await A0(s.connectionHandler,l,{method:"masterWrite",params:[b],id:i()});return x.result}}):void 0});s.addPeer(l,p)});return s.subs.push(a),s}var NY=function(){function e(r,n,i){this.peerStates$=new ks(new Map),this.canceled=!1,this.subs=[],this.error$=new Ir,this.collection=r,this.options=n,this.connectionHandler=i,this.collection.onDestroy.push(()=>this.cancel()),this.masterReplicationHandler=uK(r.storageInstance,r.conflictHandler,r.database.token)}var t=e.prototype;return t.addPeer=function(n,i){var o={peer:n,replicationState:i,subs:[]};this.peerStates$.next(this.peerStates$.getValue().set(n,o)),i&&o.subs.push(i.error$.subscribe(s=>this.error$.next(s)))},t.removePeer=function(n){var i=Ws(this.peerStates$.getValue(),n);this.peerStates$.getValue().delete(n),this.peerStates$.next(this.peerStates$.getValue()),i.subs.forEach(o=>o.unsubscribe()),i.replicationState&&i.replicationState.cancel()},t.awaitFirstPeer=function(){return Gr(this.peerStates$.pipe(Wt(n=>n.size>0)))},t.cancel=async function(){this.canceled||(this.canceled=!0,this.subs.forEach(n=>n.unsubscribe()),Array.from(this.peerStates$.getValue().keys()).forEach(n=>{this.removePeer(n)}),await this.connectionHandler.destroy())},e}();Ju(fY);Ju(yY);Ju(gS);Ju(_Y);function DY(e){return Promise.all(e.character_traits.map(t=>t.split(/[[\]]/)).map(async([t,r])=>{const n=await ar.character_traits.findOne(t.trim()).exec();return Object.assign({},n==null?void 0:n.toMutableJSON(),{parameter:r==null?void 0:r.trim()})}))}const BY={expand:async function(){const e=await ar.getLocal("gbdata_meta"),[t,r]=await Promise.all([this.populate("character_plays").then(i=>i.map(o=>o.toMutableJSON())),DY(this)]);return Object.assign({},this.toMutableJSON(),{character_plays:t,character_traits:r,_inf:this.id==="Pneuma"?0:void 0,statLine:`${this.jog}"/${this.sprint}" | ${this.tac} | ${this.kickdice}/${this.kickdist}" | ${this.def}+ | ${this.arm} | ${this.inf}/${this.infmax} | ${this.reach?2:1}"`,version:e==null?void 0:e.get("version")})}},$Y={title:"Guild Ball model",version:0,primaryKey:"id",type:"object",properties:{id:{type:"string",maxLength:32},name:{type:"string"},captain:{type:"boolean",default:!1},mascot:{type:"boolean",default:!1},veteran:{type:"boolean",default:!1},seasoned:{type:"boolean",default:!1},hp:{type:"integer",minimum:0},recovery:{type:"integer",minimum:0},jog:{type:"integer",minimum:0},sprint:{type:"integer",minimum:0},tac:{type:"integer",minimum:1},kickdice:{type:"integer",minimum:1},kickdist:{type:"integer",minimum:0},def:{type:"integer",minimum:1,maximum:6},arm:{type:"integer",minimum:0},inf:{type:"integer",minimum:0},infmax:{type:"integer",minimum:0},reach:{type:"boolean",default:!1},benched:{type:"string"},dehcneb:{type:"string"},playbook:{type:"array",minItems:2,maxItems:2,items:{type:"array",minItems:7,maxItems:7,items:{type:["string","null"]}}},character_plays:{type:"array",ref:"character_plays",items:{type:"string"}},character_traits:{type:"array",ref:"character_traits",items:{type:"string"}},heroic:{type:"string"},legendary:{type:"string"},types:{type:"string"},base:{type:"integer",enum:[30,40,50]},guild1:{type:"string",maxLength:32},guild2:{type:"string",maxLength:32,default:""},gbcp:{type:"boolean",default:!1}},required:["name","hp","recovery","jog","sprint","tac","kickdice","kickdist","def","arm","inf","infmax","playbook","types","base","guild1"],indexes:["guild1","guild2"]},FY={title:"Guild Ball guild",version:0,primaryKey:"name",type:"object",properties:{name:{type:"string",maxLength:32},minor:{type:"boolean",default:!1},color:{type:"string"},shadow:{type:"string"},darkColor:{type:"string"},roster:{type:"array",items:{type:"string"}}},required:["color","roster"]},zY={title:"Guild Ball character play",version:0,primaryKey:"name",type:"object",properties:{name:{type:"string",maxLength:64},text:{type:"string"},CST:{type:["string","integer"]},RNG:{type:["string","integer"]},SUS:{type:"boolean",default:!1},OPT:{type:"boolean",default:!1}},required:["text","CST","RNG","SUS","OPT"]},UY={title:"Guild Ball character trait",version:0,primaryKey:"name",type:"object",properties:{name:{type:"string",maxLength:64},active:{type:"boolean",default:!1},text:{type:"string"}},required:["text"]},GY={title:"Guild Ball Game State",version:0,primaryKey:"_id",type:"object",properties:{_id:{type:"string",maxLength:128},guild:{type:"string",ref:"guilds"},score:{type:"integer",minimum:0,default:0},momentum:{type:"integer",minimum:0,default:0},roster:{type:"array",items:{type:"object",properties:{name:{type:"string",ref:"models"},health:{type:"integer",minimum:0}},required:["name","health"]}},currentStep:{type:"string",enum:["Guilds","Draft","Game"]},navigateTo:{type:"string",enum:["Guilds","Draft","Game"]}}},ar=await bK({name:"gb_playbook",localDocuments:!0,storage:Xq()});await ar.addCollections({guilds:{schema:FY},models:{schema:$Y,methods:BY},character_plays:{schema:zY},character_traits:{schema:UY},game_state:{schema:GY,localDocuments:!0}});const WY={iceServers:[{urls:["stun:stun.l.google.com:19302","stun:global.stun.twilio.com:3478"]},{urls:["turn:standard.relay.metered.ca:80","turn:standard.relay.metered.ca:80?transport=tcp","turn:standard.relay.metered.ca:443","turns:standard.relay.metered.ca:443?transport=tcp"],username:"25ee3bdfcc273a8e3ae9db71",credential:"XVIpxKTNnMR7XQDK"}]};function yS(e,t){return AY({collection:ar.game_state,connectionHandlerCreator:IY({signalingServerUrl:e,config:WY}),topic:t,pull:{},push:{}}).then(r=>(r.error$.subscribe(n=>{console.log("replication error:"),console.dir(n)}),r.peerStates$.subscribe(n=>{console.log("new peer states:"),console.dir(n)}),r))}const GL=_.createContext({}),HY=e=>{const t=_.useMemo(()=>ar.getLocal$("settings"),[]);return _.useEffect(()=>{if(!t)return;const r=t.subscribe(n=>{if(!n){ar==null||ar.upsertLocal("settings",WL).catch(console.error);return}});return()=>r.unsubscribe()},[t]),y.jsx(GL.Provider,{value:{setting$:t},children:e.children})},di=()=>_.useContext(GL),WL={dataSet:"GB-Playbook-4-6.json",language:"auto",initialScreen:"/game",gameSize:6,networkPlay:!1,uiPreferences:{displayStatLine:!1},cardPreferences:{preferredStyle:"gbcp"},gamePlayRoute:"/game",libraryRoute:"/library"},bS=_.createContext(null),ps=e=>{const t=_.useContext(bS);return y.jsx(Cx,{container:t,children:e.children})},VY=Lt.forwardRef((e,t)=>y.jsx(p3,{position:"static",className:"no-print",children:y.jsxs(v3,{variant:"dense",children:[y.jsx(tr,{ref:t,sx:{display:"flex",flexDirection:"row",width:"100%"}}),y.jsx(Io,{size:"small",color:"inherit",onClick:e.onClick,children:y.jsx(uO,{})})]})})),XE=Lt.forwardRef((e,t)=>{const{href:r,...n}=e;return y.jsx(pT,{ref:t,to:r,...n,role:void 0})}),KY=yv({palette:{mode:"dark",primary:{main:"#3d708f"},secondary:{main:"#ffb300"},background:{default:"#121a22"}},components:{MuiCssBaseline:{styleOverrides:{body:{background:"linear-gradient(120deg, black, #221a22, #5f405f, #221a22, black)"},"@media print":{body:{background:"white"}}}},MuiLink:{defaultProps:{component:XE}},MuiButtonBase:{defaultProps:{LinkComponent:XE}}}}),_h=e=>y.jsx(fB,{to:e.to,style:{textDecoration:"inherit",color:"inherit"},onClick:e.onClick,children:({isActive:t})=>y.jsx(zF,{selected:t,children:e.children})}),qY=()=>{const[e,t]=_.useState(null),[r,n]=_.useState(!1);return y.jsxs(i6,{theme:KY,children:[y.jsx(pU,{}),y.jsxs("div",{className:"App",children:[y.jsx(VY,{ref:i=>t(i),onClick:()=>n(!0)}),y.jsx(YY,{drawer:r,setDrawer:n}),y.jsx(bS.Provider,{value:e,children:y.jsx(Jw,{})})]})]})};function YY(e){const{drawer:t,setDrawer:r}=e,{setting$:n}=di(),[i,o]=_.useState(),[s,a]=_.useState();return _.useEffect(()=>{const l=n==null?void 0:n.pipe(qt(u=>u==null?void 0:u.toJSON().data.gamePlayRoute)).subscribe(u=>o(u)),c=n==null?void 0:n.pipe(qt(u=>u==null?void 0:u.toJSON().data.libraryRoute)).subscribe(u=>a(u));return()=>{l==null||l.unsubscribe(),c==null||c.unsubscribe()}}),y.jsxs(LF,{anchor:"right",open:t,onClose:()=>r(!1),PaperProps:{sx:{width:"275px"}},ModalProps:{keepMounted:!0},children:[y.jsxs(sf,{children:[y.jsxs(vo,{children:[y.jsx("img",{src:new URL("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAJaUlEQVRYR+2YeVjVVRrHP3fj3ssqYCwqoA5iYvloljbYOE8GqOk8hDpZrizqkE5mapmKWGJj82SFKYwLomTpqJTmxthoY5lLZW65IEEsAgKxidcLd4E7zzkoiVzF0uqPmXMf/uD3u+fc7/m+3+973vcoxm2IsnEvhgIaLY0Ufp2P1WxFoVDci1VR/B/gXfL4izDYYGmQIbbZ7l499xQgVsj/6nvqjHWoVWo0ag0NjQ13xeE9A6hUKjBcNVJ2ogQ3nRtGk5HK2iqc9U6/PUClQkmdpY6e3sFM6DOOLj6dMZgMpO1YT/rudHRa3c8O910zqECB1daAi4MTb0cuRWlV8P4H7xPy+xB6PtCTWe/OZt+xT3FxdKaxsfEns3nXAAV7BvNVHunUl1fCXuLFmS+S9E4SQUFBnM86z47PdzB/1QI8XD1+lh7vGKBw5fUP2BD+FC4VzwXAR/36MTv0RSZOnMimjZvo0KEDBQUF7D68h7kp81oAFLPF3DtxeZsABUONtkZMVhPWxgZstkYJVKlU4qByQKvWcsVsoH+nR3gpdCYxsTGsS1tH586dycvLY+ehXcxcNgsnnTPWBosMsUqlQuegw0HtINe+HdBbApRHlQ3Jjk6txd/NDz/3TrjqXTFbLZTVlpFfXUB1XTXmBgsDuzzGrCdmEB0Tzfp16wkICCA/P5+dX+xixdZk+vfsRzsXd8wWM4VlhWQVZFFe/YN0uVqtvqU+7QIUrFkaLHJ3A7v+gcg+Efg6+9gV+KfZB/jgm00EtPMnYej8ZoBdu3bl7JmzoEKydfMQrt/0r3+SnvkeBqMBR52jXY22AiiYszRY0Wt0THssjr5+D1FeWs6GjRs4dPgwZWVl6HQ6evYIJvKpSB4f9DhXrUYOZR8mPDi0VYhN9SY2btrI3r17KSouknMffOBBxo8bx0N9+5JXkiedXlBaiF6nb8VkK4DX9TA/9BV6+N7P8uQVvLpwIVWVVXYZfHLYk6SlpuHt4y3fT4qdxNq0tQQHB7Ny5Uri4uI4d+5cq7mCiKnTprJi+QqKyouISozmitEgw32jJlsAFKG9YrpCbP9ohvUcSuLriSTEJ8jFu/h1IjwiEqeOfpiMRrIPH+Tf+/fLd926dePAgQP4+voSHR1Neno6Hh4e1NXVyb/Q0FDCwsJwdnaWYDMyMmQkxIiOiSFt7Voyj2QyJ3kurs6uLVhsBih2ZLaa8XH25u0Rb3L0yFEGDBggF4kYEs5TS5LI0jgzwNudK/Vmgh017Exdxd8S4qk3mYiIiGD79u1MmDCBDRs2SJcLJtLS0oiKimrB4MWLFxk7diwHDx6UzzMzMxkyZAij458lpygHvVYv9S9GM0CVQsXl+ss83XsUz/YdzfA/DWfPrj0EBvgze1smju3v49KlUiorayi+WIyXWskLTw1l6avzWb78XbmYSCtLly4lOTlZ/h8fH09iYiJWq7UZoACt0WioqKigV69elJaWSh3v37ef1dvXsGzrcjxc3WloaCoymgHKE8Fk4LVhCfzOqSuduvhRVVHJ9JfnED57Pp9/+Q1FpT/gpVLygKcrLiYTaqMRn473MezpEdRU10jN5eTkSJBubm5kZ2fj6ekpk7lg9Powm804ODgwb948lixZgru7O8VFxZwpPMuk1yfj4uTSHOYWGhQhXjb6bYxFVwnsHihDFL/8HwQ+OpBTJ7+lt7cnTqZ6qvMKqLmQg8OVWob+ZSKjZ8/gxIkTzJkzR+5cAOzTpw/Hjx+3ayzBqEjW27ZtY+TIkSiUCnKzc1G5qhjx8ii0Gu21s+oGBsVKFquF5c8kUZ1XRffg7k1hWrKUkD8+gflSCUVnzmP4Pg+9wYCvV3t8vTwJCnucoTOe5/ixYxKgYOuNN96gd+/eEqC93uRmgILdnOwclC4qRs75iQCfi5vK+BHP8PWO3SgrKvHz9cLT3Q1NRQWqgkLcpk2m//ix1JSXk5KSIpmZMmUKrq6uMsTt27dvFWKLxSJ1OHfuXLkZIYOii0WcyjvN5CVTcHX60cktQnwzg6IvC+jalc1Ll6E3XOVyXj6qsjKsF7LRqtX0+2scr+zfy9+TkiTbp06dQqfX0T3oGvvXTCIAXWfSnkmGDB3Cnt17SM5IIWXbSvsmsRdiQb2o4cJCQ1m94FU8KyqpPXwUtwB/VI560msqmB4fj6W+noEDB/LZZ59JoJGRkTLlaLVaaZyb00xJSQljxoxp/r5INyEDQhg192l5TmsdtM3J+rYMih/z8fGRqaBDgD+jnxyGv5MLRoWN/V9+yacij9lsMpxHjh4hMDBQ5q/L1ZdlDs3NzZWABw8ezKBBg2SizsrK4sMPP0SAFGNBwgIWvbaIzfu2sHj967RzbtfiTL41wJ7dZTWzatUqRGJdvHixXUfe36MH69evo3+//qT8ZxXfncvmnWlvUVxczMSoKPbv22d3nkgtCQsTmPHCDE5/d5rn3pwmNyfSXVO12TTaBJiamkpsbCxfHf2KLRmbOXnyJCaTiQ4dOxIeFk70hGiUGiWbjm/moxPbyPniOwY/HE5i3CI0Kg2ffPIJH3/8MVkXshCFg7e3NyEhIYwfNx4vby8OnT5E/OoEDMaraDVN9eGNo02Aq1evJiYmBpvKhhp1KzbOl2ex5ZsMTpd+i16pp+hYIZVVlXTz70bM8GiGDxhml8GCsgLSd73Hji92NhW/ApydnqVNgGtWr2HS5EnM+mgOLjpn/D38UCs11Birya8qpKi2WFbZjlpHeScj7mZsVhv15npZnHZo70uQXxAdvTpKENW11eQWf09OcQ7GeqNMKWLcqqpuE2DqmlRiJ8Xy3JbnKaktQa1UN2tFNOei5BctQKP43HB5pFKqZGoxWUyYzKZm4YtnoqEXRaz4TluNvV2AlbkVBPcKloJNXpHMlLgpTN86k8q6SrRqB2FcKeTrzU+Tmu3fbslm61rDdT3Wgq2btWZXBzeaRLAgGqOkP79FY5WVTv5+ck7G1q2MHDWKqVumy/5D7N5uOH7p6zeVQkmtycD4h8cQ2StCuu/SpUuyjbxQns3CzEWyi7sxBbS0269wPyiYEWGd2G8cTwQNkr9/pvQsqw6lUmGokGnjNwUoxW5rpN5qwkPvLg1RVVclTXDL0DZn1F+BwSatN4latJ2CLY1SIw3Q5i3AL63Bm10kgMr8dMOxcyun3c7Ft51zBy/bvPq4gzWuHZq/UojvGFBryv83b/n/CxJONjR0KMriAAAAAElFTkSuQmCC",import.meta.url).href,style:{borderRadius:5.4},alt:""}),y.jsx(Cs,{style:{textAlign:"center"},children:y.jsx(_t,{variant:"h6",fontFamily:"Comfortaa",children:"GB Playbook"})})]}),y.jsx(Zi,{}),y.jsx(_h,{to:i??"/game",onClick:()=>r(!1),children:y.jsx(Cs,{children:"Game Play"})}),y.jsx(_h,{to:s??"/library",onClick:()=>r(!1),children:y.jsx(Cs,{children:"Library"})}),y.jsx(_h,{to:"/print",onClick:()=>r(!1),children:y.jsx(Cs,{children:"Card Printer"})}),y.jsx(_h,{to:"/settings",onClick:()=>r(!1),children:y.jsx(Cs,{children:"Settings"})}),y.jsx("nav",{style:{display:"flex",flexDirection:"column",marginLeft:"1em"},children:y.jsx(vo,{disablePadding:!0,children:y.jsx(xo,{component:"a",target:"_blank",rel:"noopener noreferrer",href:"https://github.com/cleech/GBPlaybook/blob/pwa/README.md",children:"About"})})})]}),y.jsx(Zi,{}),y.jsxs(sf,{children:[y.jsx(vo,{children:y.jsx(Cs,{children:"Rules Documents:"})}),y.jsxs("nav",{style:{display:"flex",flexDirection:"column",marginLeft:"2em"},children:[y.jsx(vo,{disablePadding:!0,children:y.jsx(xo,{component:"a",target:"_blank",rel:"noopener noreferrer",href:"https://docs.guildball.app/GB-S4-Rulebook-4.1.pdf",children:"Season 4 Core Rulebook"})}),y.jsx(vo,{disablePadding:!0,children:y.jsx(xo,{component:"a",target:"_blank",rel:"noopener noreferrer",href:"https://docs.guildball.app/GB-S4-FAQ-19-12-20.pdf",children:"Season 4 FAQ"})}),y.jsx(vo,{disablePadding:!0,children:y.jsx(xo,{component:"a",target:"_blank",rel:"noopener noreferrer",href:"https://docs.guildball.app/GB-S4-RegionalCup-Rules-200128__1.pdf",children:"Organized Play Rules"})})]})]}),y.jsx(Zi,{}),y.jsxs(sf,{children:[y.jsx(vo,{children:y.jsx(Cs,{children:"Community Links:"})}),y.jsxs("nav",{style:{display:"flex",flexDirection:"column",marginLeft:"2em"},children:[y.jsx(vo,{disablePadding:!0,children:y.jsx(xo,{component:"a",target:"_blank",rel:"noopener noreferrer",href:"https://steamforged.com/pages/guild-ball",children:"Steamforged Games"})}),y.jsx(vo,{disablePadding:!0,children:y.jsx(xo,{component:"a",target:"_blank",rel:"noopener noreferrer",href:"https://discord.gg/fvpFSfm976",children:"Guild Ball Community Project"})}),y.jsx(vo,{disablePadding:!0,children:y.jsx(xo,{component:"a",target:"_blank",rel:"noopener noreferrer",href:"https://www.longshanks.org/systems/guildball/",children:"Longshanks"})})]})]})]})}const QY=Wr(y.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"Add"),XY=Wr([y.jsx("path",{d:"M5 19h14V5H5zM16.5 6c.83 0 1.5.67 1.5 1.5S17.33 9 16.5 9 15 8.33 15 7.5 15.67 6 16.5 6m0 9c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5-1.5-.67-1.5-1.5.67-1.5 1.5-1.5M12 10.5c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5-1.5-.67-1.5-1.5.67-1.5 1.5-1.5M7.5 6C8.33 6 9 6.67 9 7.5S8.33 9 7.5 9 6 8.33 6 7.5 6.67 6 7.5 6m0 9c.83 0 1.5.67 1.5 1.5S8.33 18 7.5 18 6 17.33 6 16.5 6.67 15 7.5 15",opacity:".3"},"0"),y.jsx("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m0 16H5V5h14z"},"1"),y.jsx("circle",{cx:"7.5",cy:"16.5",r:"1.5"},"2"),y.jsx("circle",{cx:"7.5",cy:"7.5",r:"1.5"},"3"),y.jsx("circle",{cx:"12",cy:"12",r:"1.5"},"4"),y.jsx("circle",{cx:"16.5",cy:"16.5",r:"1.5"},"5"),y.jsx("circle",{cx:"16.5",cy:"7.5",r:"1.5"},"6")],"CasinoTwoTone"),HL=Wr([y.jsx("path",{d:"M12 4c-4.41 0-8 3.59-8 8s3.59 8 8 8 8-3.59 8-8-3.59-8-8-8m-2 13-4-4 1.41-1.41L10 14.17l6.59-6.59L18 9z",opacity:".3"},"0"),y.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8m4.59-12.42L10 14.17l-2.59-2.58L6 13l4 4 8-8z"},"1")],"CheckCircleTwoTone"),wS=Wr(y.jsx("path",{d:"M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"}),"Home"),lc=Wr(y.jsx("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"NavigateNext"),JY=Wr(y.jsx("path",{d:"M19 13H5v-2h14z"}),"Remove"),ZY=Wr(y.jsx("path",{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6"}),"Settings"),eQ=Wr(y.jsx("path",{d:"M12 4V1L8 5l4 4V6c3.31 0 6 2.69 6 6 0 1.01-.25 1.97-.7 2.8l1.46 1.46C19.54 15.03 20 13.57 20 12c0-4.42-3.58-8-8-8m0 14c-3.31 0-6-2.69-6-6 0-1.01.25-1.97.7-2.8L5.24 7.74C4.46 8.97 4 10.43 4 12c0 4.42 3.58 8 8 8v3l4-4-4-4z"}),"Sync"),tQ=new Intl.NumberFormat(void 0,{style:"percent",minimumFractionDigits:1,maximumFractionDigits:1});function im(e){return e===0?1:e*im(e-1)}function rQ(e,t,r){if(!e||!t)return[];const n=t,o=1-Math.pow((e-1)/6,r?2:1),s=[...Array(t).keys()].map(l=>l+1).map(l=>im(n)/(im(l)*im(n-l))*Math.pow(o,l)*Math.pow(1-o,n-l));return[...Array(t).keys()].map(l=>s.slice(l).reduce((c,u)=>c+u,0)).map(l=>Math.min(l,.999))}function JE(e){const{value:t,setValue:r,clamp:n}=e;return y.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:y.jsxs(qf,{size:"small",variant:"contained",children:[y.jsx(br,{onClick:i=>{i.stopPropagation(),n(t-1)&&r(t-1)},children:y.jsx(JY,{fontSize:"inherit",sx:{pointerEvents:"none"}})}),y.jsx(br,{disabled:!0,size:"small",children:y.jsx(_t,{variant:"body2",color:"text.primary",children:t})}),y.jsx(br,{onClick:i=>{i.stopPropagation(),n(t+1)&&r(t+1)},children:y.jsx(QY,{fontSize:"inherit",sx:{pointerEvents:"none"}})})]})})}function nQ(){const[e,t]=_.useState(null),r=!!e,[n,i]=_.useState(4),[o,s]=_.useState(4),[a,l]=_.useState(!1);return y.jsxs(y.Fragment,{children:[y.jsx(Io,{size:"small",onClick:c=>{t(e?null:c.currentTarget)},children:y.jsx(XY,{})}),y.jsxs(Nv,{open:r,anchorEl:e,onClose:()=>{t(null)},children:[y.jsx(_t,{variant:"h5",textAlign:"center",children:"Dice Odds"}),y.jsx(Zi,{}),y.jsxs("div",{style:{margin:"1em",display:"grid",gridTemplateColumns:"1fr 1fr",gap:"0.5em"},children:[y.jsx(_t,{children:"Target Number :"}),y.jsx(JE,{value:n,setValue:i,clamp:c=>c>1&&c<7}),y.jsx(_t,{children:"Dice Pool :"}),y.jsx(JE,{value:o,setValue:s,clamp:c=>c>0}),y.jsx(_t,{children:"Reroll :"}),y.jsx(Is,{checked:a,onChange:(c,u)=>{l(u)},sx:{padding:0}})]}),y.jsx(Zi,{}),y.jsxs("div",{style:{margin:"1em",display:"grid",gap:"0em 1em",justifyContent:"center",justifyItems:"center",gridTemplateColumns:"auto auto"},children:[y.jsx(_t,{sx:{textDecoration:"underline"},children:"Hits"}),y.jsx(_t,{sx:{textDecoration:"underline"},children:"Chance"}),rQ(n,o,a).map((c,u)=>y.jsxs(_.Fragment,{children:[y.jsxs("div",{children:[u+1,"+"]}),y.jsx("div",{className:`dice-bin-${Math.floor(c*10)}`,style:{padding:"0 1em",margin:"1px",width:"100%"},children:tQ.format(c)})]},u))]})]})]})}const iQ={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console&&console[e]&&console[e].apply(console,t)}};class lg{constructor(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(t,r)}init(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=r.prefix||"i18next:",this.logger=t||iQ,this.options=r,this.debug=r.debug}log(){for(var t=arguments.length,r=new Array(t),n=0;n{this.observers[n]||(this.observers[n]=new Map);const i=this.observers[n].get(r)||0;this.observers[n].set(r,i+1)}),this}off(t,r){if(this.observers[t]){if(!r){delete this.observers[t];return}this.observers[t].delete(r)}}emit(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i{let[a,l]=s;for(let c=0;c{let[a,l]=s;for(let c=0;c{let e,t;const r=new Promise((n,i)=>{e=n,t=i});return r.resolve=e,r.reject=t,r},ZE=e=>e==null?"":""+e,oQ=(e,t,r)=>{e.forEach(n=>{t[n]&&(r[n]=t[n])})},sQ=/###/g,eR=e=>e&&e.indexOf("###")>-1?e.replace(sQ,"."):e,tR=e=>!e||typeof e=="string",mf=(e,t,r)=>{const n=typeof t!="string"?t:t.split(".");let i=0;for(;i{const{obj:n,k:i}=mf(e,t,Object);if(n!==void 0||t.length===1){n[i]=r;return}let o=t[t.length-1],s=t.slice(0,t.length-1),a=mf(e,s,Object);for(;a.obj===void 0&&s.length;)o=`${s[s.length-1]}.${o}`,s=s.slice(0,s.length-1),a=mf(e,s,Object),a&&a.obj&&typeof a.obj[`${a.k}.${o}`]<"u"&&(a.obj=void 0);a.obj[`${a.k}.${o}`]=r},aQ=(e,t,r,n)=>{const{obj:i,k:o}=mf(e,t,Object);i[o]=i[o]||[],i[o].push(r)},cg=(e,t)=>{const{obj:r,k:n}=mf(e,t);if(r)return r[n]},lQ=(e,t,r)=>{const n=cg(e,r);return n!==void 0?n:cg(t,r)},VL=(e,t,r)=>{for(const n in t)n!=="__proto__"&&n!=="constructor"&&(n in e?typeof e[n]=="string"||e[n]instanceof String||typeof t[n]=="string"||t[n]instanceof String?r&&(e[n]=t[n]):VL(e[n],t[n],r):e[n]=t[n]);return e},Ec=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var cQ={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const uQ=e=>typeof e=="string"?e.replace(/[&<>"'\/]/g,t=>cQ[t]):e;class dQ{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const r=this.regExpMap.get(t);if(r!==void 0)return r;const n=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,n),this.regExpQueue.push(t),n}}const fQ=[" ",",","?","!",";"],pQ=new dQ(20),hQ=(e,t,r)=>{t=t||"",r=r||"";const n=fQ.filter(s=>t.indexOf(s)<0&&r.indexOf(s)<0);if(n.length===0)return!0;const i=pQ.getRegExp(`(${n.map(s=>s==="?"?"\\?":s).join("|")})`);let o=!i.test(e);if(!o){const s=e.indexOf(r);s>0&&!i.test(e.substring(0,s))&&(o=!0)}return o},F1=function(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!e)return;if(e[t])return e[t];const n=t.split(r);let i=e;for(let o=0;o-1&&le&&e.indexOf("_")>0?e.replace("_","-"):e;class nR extends Xv{constructor(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=t||{},this.options=r,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const r=this.options.ns.indexOf(t);r>-1&&this.options.ns.splice(r,1)}getResource(t,r,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const o=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,s=i.ignoreJSONStructure!==void 0?i.ignoreJSONStructure:this.options.ignoreJSONStructure;let a;t.indexOf(".")>-1?a=t.split("."):(a=[t,r],n&&(Array.isArray(n)?a.push(...n):typeof n=="string"&&o?a.push(...n.split(o)):a.push(n)));const l=cg(this.data,a);return!l&&!r&&!n&&t.indexOf(".")>-1&&(t=a[0],r=a[1],n=a.slice(2).join(".")),l||!s||typeof n!="string"?l:F1(this.data&&this.data[t]&&this.data[t][r],n,o)}addResource(t,r,n,i){let o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const s=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator;let a=[t,r];n&&(a=a.concat(s?n.split(s):n)),t.indexOf(".")>-1&&(a=t.split("."),i=r,r=a[1]),this.addNamespaces(r),rR(this.data,a,i),o.silent||this.emit("added",t,r,n,i)}addResources(t,r,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const o in n)(typeof n[o]=="string"||Array.isArray(n[o]))&&this.addResource(t,r,o,n[o],{silent:!0});i.silent||this.emit("added",t,r,n)}addResourceBundle(t,r,n,i,o){let s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},a=[t,r];t.indexOf(".")>-1&&(a=t.split("."),i=n,n=r,r=a[1]),this.addNamespaces(r);let l=cg(this.data,a)||{};s.skipCopy||(n=JSON.parse(JSON.stringify(n))),i?VL(l,n,o):l={...l,...n},rR(this.data,a,l),s.silent||this.emit("added",t,r,n)}removeResourceBundle(t,r){this.hasResourceBundle(t,r)&&delete this.data[t][r],this.removeNamespaces(r),this.emit("removed",t,r)}hasResourceBundle(t,r){return this.getResource(t,r)!==void 0}getResourceBundle(t,r){return r||(r=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(t,r)}:this.getResource(t,r)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const r=this.getDataByLanguage(t);return!!(r&&Object.keys(r)||[]).find(i=>r[i]&&Object.keys(r[i]).length>0)}toJSON(){return this.data}}var KL={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,r,n,i){return e.forEach(o=>{this.processors[o]&&(t=this.processors[o].process(t,r,n,i))}),t}};const iR={};class dg extends Xv{constructor(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),oQ(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=r,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=es.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(t==null)return!1;const n=this.resolve(t,r);return n&&n.res!==void 0}extractFromKey(t,r){let n=r.nsSeparator!==void 0?r.nsSeparator:this.options.nsSeparator;n===void 0&&(n=":");const i=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator;let o=r.ns||this.options.defaultNS||[];const s=n&&t.indexOf(n)>-1,a=!this.options.userDefinedKeySeparator&&!r.keySeparator&&!this.options.userDefinedNsSeparator&&!r.nsSeparator&&!hQ(t,n,i);if(s&&!a){const l=t.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:t,namespaces:o};const c=t.split(n);(n!==i||n===i&&this.options.ns.indexOf(c[0])>-1)&&(o=c.shift()),t=c.join(i)}return typeof o=="string"&&(o=[o]),{key:t,namespaces:o}}translate(t,r,n){if(typeof r!="object"&&this.options.overloadTranslationOptionHandler&&(r=this.options.overloadTranslationOptionHandler(arguments)),typeof r=="object"&&(r={...r}),r||(r={}),t==null)return"";Array.isArray(t)||(t=[String(t)]);const i=r.returnDetails!==void 0?r.returnDetails:this.options.returnDetails,o=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator,{key:s,namespaces:a}=this.extractFromKey(t[t.length-1],r),l=a[a.length-1],c=r.lng||this.language,u=r.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(c&&c.toLowerCase()==="cimode"){if(u){const C=r.nsSeparator||this.options.nsSeparator;return i?{res:`${l}${C}${s}`,usedKey:s,exactUsedKey:s,usedLng:c,usedNS:l,usedParams:this.getUsedParamsDetails(r)}:`${l}${C}${s}`}return i?{res:s,usedKey:s,exactUsedKey:s,usedLng:c,usedNS:l,usedParams:this.getUsedParamsDetails(r)}:s}const d=this.resolve(t,r);let f=d&&d.res;const p=d&&d.usedKey||s,h=d&&d.exactUsedKey||s,v=Object.prototype.toString.apply(f),k=["[object Number]","[object Function]","[object RegExp]"],b=r.joinArrays!==void 0?r.joinArrays:this.options.joinArrays,x=!this.i18nFormat||this.i18nFormat.handleAsObject;if(x&&f&&(typeof f!="string"&&typeof f!="boolean"&&typeof f!="number")&&k.indexOf(v)<0&&!(typeof b=="string"&&Array.isArray(f))){if(!r.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const C=this.options.returnedObjectHandler?this.options.returnedObjectHandler(p,f,{...r,ns:a}):`key '${s} (${this.language})' returned an object instead of string.`;return i?(d.res=C,d.usedParams=this.getUsedParamsDetails(r),d):C}if(o){const C=Array.isArray(f),E=C?[]:{},j=C?h:p;for(const R in f)if(Object.prototype.hasOwnProperty.call(f,R)){const O=`${j}${o}${R}`;E[R]=this.translate(O,{...r,joinArrays:!1,ns:a}),E[R]===O&&(E[R]=f[R])}f=E}}else if(x&&typeof b=="string"&&Array.isArray(f))f=f.join(b),f&&(f=this.extendTranslation(f,t,r,n));else{let C=!1,E=!1;const j=r.count!==void 0&&typeof r.count!="string",R=dg.hasDefaultValue(r),O=j?this.pluralResolver.getSuffix(c,r.count,r):"",P=r.ordinal&&j?this.pluralResolver.getSuffix(c,r.count,{ordinal:!1}):"",L=j&&!r.ordinal&&r.count===0&&this.pluralResolver.shouldUseIntlApi(),A=L&&r[`defaultValue${this.options.pluralSeparator}zero`]||r[`defaultValue${O}`]||r[`defaultValue${P}`]||r.defaultValue;!this.isValidLookup(f)&&R&&(C=!0,f=A),this.isValidLookup(f)||(E=!0,f=s);const F=(r.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&E?void 0:f,K=R&&A!==f&&this.options.updateMissing;if(E||C||K){if(this.logger.log(K?"updateKey":"missingKey",c,l,s,K?A:f),o){const V=this.resolve(s,{...r,keySeparator:!1});V&&V.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let Y=[];const Z=this.languageUtils.getFallbackCodes(this.options.fallbackLng,r.lng||this.language);if(this.options.saveMissingTo==="fallback"&&Z&&Z[0])for(let V=0;V{const Re=R&&ae!==f?ae:F;this.options.missingKeyHandler?this.options.missingKeyHandler(V,l,H,Re,K,r):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(V,l,H,Re,K,r),this.emit("missingKey",V,l,H,f)};this.options.saveMissing&&(this.options.saveMissingPlurals&&j?Y.forEach(V=>{const H=this.pluralResolver.getSuffixes(V,r);L&&r[`defaultValue${this.options.pluralSeparator}zero`]&&H.indexOf(`${this.options.pluralSeparator}zero`)<0&&H.push(`${this.options.pluralSeparator}zero`),H.forEach(ae=>{le([V],s+ae,r[`defaultValue${ae}`]||A)})}):le(Y,s,A))}f=this.extendTranslation(f,t,r,d,n),E&&f===s&&this.options.appendNamespaceToMissingKey&&(f=`${l}:${s}`),(E||C)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?f=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}:${s}`:s,C?f:void 0):f=this.options.parseMissingKeyHandler(f))}return i?(d.res=f,d.usedParams=this.getUsedParamsDetails(r),d):f}extendTranslation(t,r,n,i,o){var s=this;if(this.i18nFormat&&this.i18nFormat.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});const c=typeof t=="string"&&(n&&n.interpolation&&n.interpolation.skipOnVariables!==void 0?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let u;if(c){const f=t.match(this.interpolator.nestingRegexp);u=f&&f.length}let d=n.replace&&typeof n.replace!="string"?n.replace:n;if(this.options.interpolation.defaultVariables&&(d={...this.options.interpolation.defaultVariables,...d}),t=this.interpolator.interpolate(t,d,n.lng||this.language||i.usedLng,n),c){const f=t.match(this.interpolator.nestingRegexp),p=f&&f.length;u1&&arguments[1]!==void 0?arguments[1]:{},n,i,o,s,a;return typeof t=="string"&&(t=[t]),t.forEach(l=>{if(this.isValidLookup(n))return;const c=this.extractFromKey(l,r),u=c.key;i=u;let d=c.namespaces;this.options.fallbackNS&&(d=d.concat(this.options.fallbackNS));const f=r.count!==void 0&&typeof r.count!="string",p=f&&!r.ordinal&&r.count===0&&this.pluralResolver.shouldUseIntlApi(),h=r.context!==void 0&&(typeof r.context=="string"||typeof r.context=="number")&&r.context!=="",v=r.lngs?r.lngs:this.languageUtils.toResolveHierarchy(r.lng||this.language,r.fallbackLng);d.forEach(k=>{this.isValidLookup(n)||(a=k,!iR[`${v[0]}-${k}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(a)&&(iR[`${v[0]}-${k}`]=!0,this.logger.warn(`key "${i}" for languages "${v.join(", ")}" won't get resolved as namespace "${a}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),v.forEach(b=>{if(this.isValidLookup(n))return;s=b;const x=[u];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(x,u,b,k,r);else{let C;f&&(C=this.pluralResolver.getSuffix(b,r.count,r));const E=`${this.options.pluralSeparator}zero`,j=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(f&&(x.push(u+C),r.ordinal&&C.indexOf(j)===0&&x.push(u+C.replace(j,this.options.pluralSeparator)),p&&x.push(u+E)),h){const R=`${u}${this.options.contextSeparator}${r.context}`;x.push(R),f&&(x.push(R+C),r.ordinal&&C.indexOf(j)===0&&x.push(R+C.replace(j,this.options.pluralSeparator)),p&&x.push(R+E))}}let g;for(;g=x.pop();)this.isValidLookup(n)||(o=g,n=this.getResource(b,k,g,r))}))})}),{res:n,usedKey:i,exactUsedKey:o,usedLng:s,usedNS:a}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,r,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(t,r,n,i):this.resourceStore.getResource(t,r,n,i)}getUsedParamsDetails(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const r=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=t.replace&&typeof t.replace!="string";let i=n?t.replace:t;if(n&&typeof t.count<"u"&&(i.count=t.count),this.options.interpolation.defaultVariables&&(i={...this.options.interpolation.defaultVariables,...i}),!n){i={...i};for(const o of r)delete i[o]}return i}static hasDefaultValue(t){const r="defaultValue";for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&r===n.substring(0,r.length)&&t[n]!==void 0)return!0;return!1}}const D0=e=>e.charAt(0).toUpperCase()+e.slice(1);class oR{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=es.create("languageUtils")}getScriptPartFromCode(t){if(t=ug(t),!t||t.indexOf("-")<0)return null;const r=t.split("-");return r.length===2||(r.pop(),r[r.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(r.join("-"))}getLanguagePartFromCode(t){if(t=ug(t),!t||t.indexOf("-")<0)return t;const r=t.split("-");return this.formatLanguageCode(r[0])}formatLanguageCode(t){if(typeof t=="string"&&t.indexOf("-")>-1){const r=["hans","hant","latn","cyrl","cans","mong","arab"];let n=t.split("-");return this.options.lowerCaseLng?n=n.map(i=>i.toLowerCase()):n.length===2?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),r.indexOf(n[1].toLowerCase())>-1&&(n[1]=D0(n[1].toLowerCase()))):n.length===3&&(n[0]=n[0].toLowerCase(),n[1].length===2&&(n[1]=n[1].toUpperCase()),n[0]!=="sgn"&&n[2].length===2&&(n[2]=n[2].toUpperCase()),r.indexOf(n[1].toLowerCase())>-1&&(n[1]=D0(n[1].toLowerCase())),r.indexOf(n[2].toLowerCase())>-1&&(n[2]=D0(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let r;return t.forEach(n=>{if(r)return;const i=this.formatLanguageCode(n);(!this.options.supportedLngs||this.isSupportedCode(i))&&(r=i)}),!r&&this.options.supportedLngs&&t.forEach(n=>{if(r)return;const i=this.getLanguagePartFromCode(n);if(this.isSupportedCode(i))return r=i;r=this.options.supportedLngs.find(o=>{if(o===i)return o;if(!(o.indexOf("-")<0&&i.indexOf("-")<0)&&(o.indexOf("-")>0&&i.indexOf("-")<0&&o.substring(0,o.indexOf("-"))===i||o.indexOf(i)===0&&i.length>1))return o})}),r||(r=this.getFallbackCodes(this.options.fallbackLng)[0]),r}getFallbackCodes(t,r){if(!t)return[];if(typeof t=="function"&&(t=t(r)),typeof t=="string"&&(t=[t]),Array.isArray(t))return t;if(!r)return t.default||[];let n=t[r];return n||(n=t[this.getScriptPartFromCode(r)]),n||(n=t[this.formatLanguageCode(r)]),n||(n=t[this.getLanguagePartFromCode(r)]),n||(n=t.default),n||[]}toResolveHierarchy(t,r){const n=this.getFallbackCodes(r||this.options.fallbackLng||[],t),i=[],o=s=>{s&&(this.isSupportedCode(s)?i.push(s):this.logger.warn(`rejecting language code not found in supportedLngs: ${s}`))};return typeof t=="string"&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&o(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&o(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&o(this.getLanguagePartFromCode(t))):typeof t=="string"&&o(this.formatLanguageCode(t)),n.forEach(s=>{i.indexOf(s)<0&&o(this.formatLanguageCode(s))}),i}}let mQ=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],gQ={1:e=>+(e>1),2:e=>+(e!=1),3:e=>0,4:e=>e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2,5:e=>e==0?0:e==1?1:e==2?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5,6:e=>e==1?0:e>=2&&e<=4?1:2,7:e=>e==1?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2,8:e=>e==1?0:e==2?1:e!=8&&e!=11?2:3,9:e=>+(e>=2),10:e=>e==1?0:e==2?1:e<7?2:e<11?3:4,11:e=>e==1||e==11?0:e==2||e==12?1:e>2&&e<20?2:3,12:e=>+(e%10!=1||e%100==11),13:e=>+(e!==0),14:e=>e==1?0:e==2?1:e==3?2:3,15:e=>e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2,16:e=>e%10==1&&e%100!=11?0:e!==0?1:2,17:e=>e==1||e%10==1&&e%100!=11?0:1,18:e=>e==0?0:e==1?1:2,19:e=>e==1?0:e==0||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3,20:e=>e==1?0:e==0||e%100>0&&e%100<20?1:2,21:e=>e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0,22:e=>e==1?0:e==2?1:(e<0||e>10)&&e%10==0?2:3};const vQ=["v1","v2","v3"],yQ=["v4"],sR={zero:0,one:1,two:2,few:3,many:4,other:5},bQ=()=>{const e={};return mQ.forEach(t=>{t.lngs.forEach(r=>{e[r]={numbers:t.nr,plurals:gQ[t.fc]}})}),e};class wQ{constructor(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=t,this.options=r,this.logger=es.create("pluralResolver"),(!this.options.compatibilityJSON||yQ.includes(this.options.compatibilityJSON))&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=bQ(),this.pluralRulesCache={}}addRule(t,r){this.rules[t]=r}clearCache(){this.pluralRulesCache={}}getRule(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{const n=ug(t==="dev"?"en":t),i=r.ordinal?"ordinal":"cardinal",o=JSON.stringify({cleanedCode:n,type:i});if(o in this.pluralRulesCache)return this.pluralRulesCache[o];const s=new Intl.PluralRules(n,{type:i});return this.pluralRulesCache[o]=s,s}catch{return}return this.rules[t]||this.rules[this.languageUtils.getLanguagePartFromCode(t)]}needsPlural(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const n=this.getRule(t,r);return this.shouldUseIntlApi()?n&&n.resolvedOptions().pluralCategories.length>1:n&&n.numbers.length>1}getPluralFormsOfKey(t,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(t,n).map(i=>`${r}${i}`)}getSuffixes(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const n=this.getRule(t,r);return n?this.shouldUseIntlApi()?n.resolvedOptions().pluralCategories.sort((i,o)=>sR[i]-sR[o]).map(i=>`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${i}`):n.numbers.map(i=>this.getSuffix(t,i,r)):[]}getSuffix(t,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const i=this.getRule(t,n);return i?this.shouldUseIntlApi()?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${i.select(r)}`:this.getSuffixRetroCompatible(i,r):(this.logger.warn(`no plural rule found for: ${t}`),"")}getSuffixRetroCompatible(t,r){const n=t.noAbs?t.plurals(r):t.plurals(Math.abs(r));let i=t.numbers[n];this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1&&(i===2?i="plural":i===1&&(i=""));const o=()=>this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString();return this.options.compatibilityJSON==="v1"?i===1?"":typeof i=="number"?`_plural_${i.toString()}`:o():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1?o():this.options.prepend&&n.toString()?this.options.prepend+n.toString():n.toString()}shouldUseIntlApi(){return!vQ.includes(this.options.compatibilityJSON)}}const aR=function(e,t,r){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,o=lQ(e,t,r);return!o&&i&&typeof r=="string"&&(o=F1(e,r,n),o===void 0&&(o=F1(t,r,n))),o},B0=e=>e.replace(/\$/g,"$$$$");class xQ{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=es.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||(r=>r),this.init(t)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});const{escape:r,escapeValue:n,useRawValueToEscape:i,prefix:o,prefixEscaped:s,suffix:a,suffixEscaped:l,formatSeparator:c,unescapeSuffix:u,unescapePrefix:d,nestingPrefix:f,nestingPrefixEscaped:p,nestingSuffix:h,nestingSuffixEscaped:v,nestingOptionsSeparator:k,maxReplaces:b,alwaysFormat:x}=t.interpolation;this.escape=r!==void 0?r:uQ,this.escapeValue=n!==void 0?n:!0,this.useRawValueToEscape=i!==void 0?i:!1,this.prefix=o?Ec(o):s||"{{",this.suffix=a?Ec(a):l||"}}",this.formatSeparator=c||",",this.unescapePrefix=u?"":d||"-",this.unescapeSuffix=this.unescapePrefix?"":u||"",this.nestingPrefix=f?Ec(f):p||Ec("$t("),this.nestingSuffix=h?Ec(h):v||Ec(")"),this.nestingOptionsSeparator=k||",",this.maxReplaces=b||1e3,this.alwaysFormat=x!==void 0?x:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(r,n)=>r&&r.source===n?(r.lastIndex=0,r):new RegExp(n,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(t,r,n,i){let o,s,a;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=p=>{if(p.indexOf(this.formatSeparator)<0){const b=aR(r,l,p,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(b,void 0,n,{...i,...r,interpolationkey:p}):b}const h=p.split(this.formatSeparator),v=h.shift().trim(),k=h.join(this.formatSeparator).trim();return this.format(aR(r,l,v,this.options.keySeparator,this.options.ignoreJSONStructure),k,n,{...i,...r,interpolationkey:v})};this.resetRegExp();const u=i&&i.missingInterpolationHandler||this.options.missingInterpolationHandler,d=i&&i.interpolation&&i.interpolation.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:p=>B0(p)},{regex:this.regexp,safeValue:p=>this.escapeValue?B0(this.escape(p)):B0(p)}].forEach(p=>{for(a=0;o=p.regex.exec(t);){const h=o[1].trim();if(s=c(h),s===void 0)if(typeof u=="function"){const k=u(t,o,i);s=typeof k=="string"?k:""}else if(i&&Object.prototype.hasOwnProperty.call(i,h))s="";else if(d){s=o[0];continue}else this.logger.warn(`missed to pass in variable ${h} for interpolating ${t}`),s="";else typeof s!="string"&&!this.useRawValueToEscape&&(s=ZE(s));const v=p.safeValue(s);if(t=t.replace(o[0],v),d?(p.regex.lastIndex+=s.length,p.regex.lastIndex-=o[0].length):p.regex.lastIndex=0,a++,a>=this.maxReplaces)break}}),t}nest(t,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i,o,s;const a=(l,c)=>{const u=this.nestingOptionsSeparator;if(l.indexOf(u)<0)return l;const d=l.split(new RegExp(`${u}[ ]*{`));let f=`{${d[1]}`;l=d[0],f=this.interpolate(f,s);const p=f.match(/'/g),h=f.match(/"/g);(p&&p.length%2===0&&!h||h.length%2!==0)&&(f=f.replace(/'/g,'"'));try{s=JSON.parse(f),c&&(s={...c,...s})}catch(v){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,v),`${l}${u}${f}`}return s.defaultValue&&s.defaultValue.indexOf(this.prefix)>-1&&delete s.defaultValue,l};for(;i=this.nestingRegexp.exec(t);){let l=[];s={...n},s=s.replace&&typeof s.replace!="string"?s.replace:s,s.applyPostProcessor=!1,delete s.defaultValue;let c=!1;if(i[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(i[1])){const u=i[1].split(this.formatSeparator).map(d=>d.trim());i[1]=u.shift(),l=u,c=!0}if(o=r(a.call(this,i[1].trim(),s),s),o&&i[0]===t&&typeof o!="string")return o;typeof o!="string"&&(o=ZE(o)),o||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${t}`),o=""),c&&(o=l.reduce((u,d)=>this.format(u,d,n.lng,{...n,interpolationkey:i[1].trim()}),o.trim())),t=t.replace(i[0],o),this.regexp.lastIndex=0}return t}}const SQ=e=>{let t=e.toLowerCase().trim();const r={};if(e.indexOf("(")>-1){const n=e.split("(");t=n[0].toLowerCase().trim();const i=n[1].substring(0,n[1].length-1);t==="currency"&&i.indexOf(":")<0?r.currency||(r.currency=i.trim()):t==="relativetime"&&i.indexOf(":")<0?r.range||(r.range=i.trim()):i.split(";").forEach(s=>{if(s){const[a,...l]=s.split(":"),c=l.join(":").trim().replace(/^'+|'+$/g,""),u=a.trim();r[u]||(r[u]=c),c==="false"&&(r[u]=!1),c==="true"&&(r[u]=!0),isNaN(c)||(r[u]=parseInt(c,10))}})}return{formatName:t,formatOptions:r}},Rc=e=>{const t={};return(r,n,i)=>{let o=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(o={...o,[i.interpolationkey]:void 0});const s=n+JSON.stringify(o);let a=t[s];return a||(a=e(ug(n),i),t[s]=a),a(r)}};class CQ{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=es.create("formatter"),this.options=t,this.formats={number:Rc((r,n)=>{const i=new Intl.NumberFormat(r,{...n});return o=>i.format(o)}),currency:Rc((r,n)=>{const i=new Intl.NumberFormat(r,{...n,style:"currency"});return o=>i.format(o)}),datetime:Rc((r,n)=>{const i=new Intl.DateTimeFormat(r,{...n});return o=>i.format(o)}),relativetime:Rc((r,n)=>{const i=new Intl.RelativeTimeFormat(r,{...n});return o=>i.format(o,n.range||"day")}),list:Rc((r,n)=>{const i=new Intl.ListFormat(r,{...n});return o=>i.format(o)})},this.init(t)}init(t){const n=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}}).interpolation;this.formatSeparator=n.formatSeparator?n.formatSeparator:n.formatSeparator||","}add(t,r){this.formats[t.toLowerCase().trim()]=r}addCached(t,r){this.formats[t.toLowerCase().trim()]=Rc(r)}format(t,r,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const o=r.split(this.formatSeparator);if(o.length>1&&o[0].indexOf("(")>1&&o[0].indexOf(")")<0&&o.find(a=>a.indexOf(")")>-1)){const a=o.findIndex(l=>l.indexOf(")")>-1);o[0]=[o[0],...o.splice(1,a)].join(this.formatSeparator)}return o.reduce((a,l)=>{const{formatName:c,formatOptions:u}=SQ(l);if(this.formats[c]){let d=a;try{const f=i&&i.formatParams&&i.formatParams[i.interpolationkey]||{},p=f.locale||f.lng||i.locale||i.lng||n;d=this.formats[c](a,p,{...u,...i,...f})}catch(f){this.logger.warn(f)}return d}else this.logger.warn(`there was no format function for ${c}`);return a},t)}}const _Q=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class kQ extends Xv{constructor(t,r,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=t,this.store=r,this.services=n,this.languageUtils=n.languageUtils,this.options=i,this.logger=es.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=i.maxParallelReads||10,this.readingCalls=0,this.maxRetries=i.maxRetries>=0?i.maxRetries:5,this.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(n,i.backend,i)}queueLoad(t,r,n,i){const o={},s={},a={},l={};return t.forEach(c=>{let u=!0;r.forEach(d=>{const f=`${c}|${d}`;!n.reload&&this.store.hasResourceBundle(c,d)?this.state[f]=2:this.state[f]<0||(this.state[f]===1?s[f]===void 0&&(s[f]=!0):(this.state[f]=1,u=!1,s[f]===void 0&&(s[f]=!0),o[f]===void 0&&(o[f]=!0),l[d]===void 0&&(l[d]=!0)))}),u||(a[c]=!0)}),(Object.keys(o).length||Object.keys(s).length)&&this.queue.push({pending:s,pendingCount:Object.keys(s).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(o),pending:Object.keys(s),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(l)}}loaded(t,r,n){const i=t.split("|"),o=i[0],s=i[1];r&&this.emit("failedLoading",o,s,r),!r&&n&&this.store.addResourceBundle(o,s,n,void 0,void 0,{skipCopy:!0}),this.state[t]=r?-1:2,r&&n&&(this.state[t]=0);const a={};this.queue.forEach(l=>{aQ(l.loaded,[o],s),_Q(l,t),r&&l.errors.push(r),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(c=>{a[c]||(a[c]={});const u=l.loaded[c];u.length&&u.forEach(d=>{a[c][d]===void 0&&(a[c][d]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(l=>!l.done)}read(t,r,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,s=arguments.length>5?arguments[5]:void 0;if(!t.length)return s(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:r,fcName:n,tried:i,wait:o,callback:s});return}this.readingCalls++;const a=(c,u)=>{if(this.readingCalls--,this.waitingReads.length>0){const d=this.waitingReads.shift();this.read(d.lng,d.ns,d.fcName,d.tried,d.wait,d.callback)}if(c&&u&&i{this.read.call(this,t,r,n,i+1,o*2,s)},o);return}s(c,u)},l=this.backend[n].bind(this.backend);if(l.length===2){try{const c=l(t,r);c&&typeof c.then=="function"?c.then(u=>a(null,u)).catch(a):a(null,c)}catch(c){a(c)}return}return l(t,r,a)}prepareLoading(t,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();typeof t=="string"&&(t=this.languageUtils.toResolveHierarchy(t)),typeof r=="string"&&(r=[r]);const o=this.queueLoad(t,r,n,i);if(!o.toLoad.length)return o.pending.length||i(),null;o.toLoad.forEach(s=>{this.loadOne(s)})}load(t,r,n){this.prepareLoading(t,r,{},n)}reload(t,r,n){this.prepareLoading(t,r,{reload:!0},n)}loadOne(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const n=t.split("|"),i=n[0],o=n[1];this.read(i,o,"read",void 0,void 0,(s,a)=>{s&&this.logger.warn(`${r}loading namespace ${o} for language ${i} failed`,s),!s&&a&&this.logger.log(`${r}loaded namespace ${o} for language ${i}`,a),this.loaded(t,s,a)})}saveMissing(t,r,n,i,o){let s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},a=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(r)){this.logger.warn(`did not save key "${n}" as the namespace "${r}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(n==null||n==="")){if(this.backend&&this.backend.create){const l={...s,isUpdate:o},c=this.backend.create.bind(this.backend);if(c.length<6)try{let u;c.length===5?u=c(t,r,n,i,l):u=c(t,r,n,i),u&&typeof u.then=="function"?u.then(d=>a(null,d)).catch(a):a(null,u)}catch(u){a(u)}else c(t,r,n,i,a,l)}!t||!t[0]||this.store.addResource(t[0],r,n,i)}}}const lR=()=>({debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]=="object"&&(t=e[1]),typeof e[1]=="string"&&(t.defaultValue=e[1]),typeof e[2]=="string"&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const r=e[3]||e[2];Object.keys(r).forEach(n=>{t[n]=r[n]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),cR=e=>(typeof e.ns=="string"&&(e.ns=[e.ns]),typeof e.fallbackLng=="string"&&(e.fallbackLng=[e.fallbackLng]),typeof e.fallbackNS=="string"&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e),kh=()=>{},EQ=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(r=>{typeof e[r]=="function"&&(e[r]=e[r].bind(e))})};class np extends Xv{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;if(super(),this.options=cR(t),this.services={},this.logger=es,this.modules={external:[]},EQ(this),r&&!this.isInitialized&&!t.isClone){if(!this.options.initImmediate)return this.init(t,r),this;setTimeout(()=>{this.init(t,r)},0)}}init(){var t=this;let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof r=="function"&&(n=r,r={}),!r.defaultNS&&r.defaultNS!==!1&&r.ns&&(typeof r.ns=="string"?r.defaultNS=r.ns:r.ns.indexOf("translation")<0&&(r.defaultNS=r.ns[0]));const i=lR();this.options={...i,...this.options,...cR(r)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...i.interpolation,...this.options.interpolation}),r.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=r.keySeparator),r.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=r.nsSeparator);const o=u=>u?typeof u=="function"?new u:u:null;if(!this.options.isClone){this.modules.logger?es.init(o(this.modules.logger),this.options):es.init(null,this.options);let u;this.modules.formatter?u=this.modules.formatter:typeof Intl<"u"&&(u=CQ);const d=new oR(this.options);this.store=new nR(this.options.resources,this.options);const f=this.services;f.logger=es,f.resourceStore=this.store,f.languageUtils=d,f.pluralResolver=new wQ(d,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),u&&(!this.options.interpolation.format||this.options.interpolation.format===i.interpolation.format)&&(f.formatter=o(u),f.formatter.init(f,this.options),this.options.interpolation.format=f.formatter.format.bind(f.formatter)),f.interpolator=new xQ(this.options),f.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},f.backendConnector=new kQ(o(this.modules.backend),f.resourceStore,f,this.options),f.backendConnector.on("*",function(p){for(var h=arguments.length,v=new Array(h>1?h-1:0),k=1;k1?h-1:0),k=1;k{p.init&&p.init(this)})}if(this.format=this.options.interpolation.format,n||(n=kh),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const u=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);u.length>0&&u[0]!=="dev"&&(this.options.lng=u[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(u=>{this[u]=function(){return t.store[u](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(u=>{this[u]=function(){return t.store[u](...arguments),t}});const l=jd(),c=()=>{const u=(d,f)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),l.resolve(f),n(d,f)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return u(null,this.t.bind(this));this.changeLanguage(this.options.lng,u)};return this.options.resources||!this.options.initImmediate?c():setTimeout(c,0),l}loadResources(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:kh;const i=typeof t=="string"?t:this.language;if(typeof t=="function"&&(n=t),!this.options.resources||this.options.partialBundledLanguages){if(i&&i.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return n();const o=[],s=a=>{if(!a||a==="cimode")return;this.services.languageUtils.toResolveHierarchy(a).forEach(c=>{c!=="cimode"&&o.indexOf(c)<0&&o.push(c)})};i?s(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(l=>s(l)),this.options.preload&&this.options.preload.forEach(a=>s(a)),this.services.backendConnector.load(o,this.options.ns,a=>{!a&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),n(a)})}else n(null)}reloadResources(t,r,n){const i=jd();return typeof t=="function"&&(n=t,t=void 0),typeof r=="function"&&(n=r,r=void 0),t||(t=this.languages),r||(r=this.options.ns),n||(n=kh),this.services.backendConnector.reload(t,r,o=>{i.resolve(),n(o)}),i}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&KL.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1))for(let r=0;r-1)&&this.store.hasLanguageSomeTranslations(n)){this.resolvedLanguage=n;break}}}changeLanguage(t,r){var n=this;this.isLanguageChangingTo=t;const i=jd();this.emit("languageChanging",t);const o=l=>{this.language=l,this.languages=this.services.languageUtils.toResolveHierarchy(l),this.resolvedLanguage=void 0,this.setResolvedLanguage(l)},s=(l,c)=>{c?(o(c),this.translator.changeLanguage(c),this.isLanguageChangingTo=void 0,this.emit("languageChanged",c),this.logger.log("languageChanged",c)):this.isLanguageChangingTo=void 0,i.resolve(function(){return n.t(...arguments)}),r&&r(l,function(){return n.t(...arguments)})},a=l=>{!t&&!l&&this.services.languageDetector&&(l=[]);const c=typeof l=="string"?l:this.services.languageUtils.getBestMatchFromCodes(l);c&&(this.language||o(c),this.translator.language||this.translator.changeLanguage(c),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(c)),this.loadResources(c,u=>{s(u,c)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?a(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(t),i}getFixedT(t,r,n){var i=this;const o=function(s,a){let l;if(typeof a!="object"){for(var c=arguments.length,u=new Array(c>2?c-2:0),d=2;d`${l.keyPrefix}${f}${h}`):p=l.keyPrefix?`${l.keyPrefix}${f}${s}`:s,i.t(p,l)};return typeof t=="string"?o.lng=t:o.lngs=t,o.ns=r,o.keyPrefix=n,o}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const n=r.lng||this.resolvedLanguage||this.languages[0],i=this.options?this.options.fallbackLng:!1,o=this.languages[this.languages.length-1];if(n.toLowerCase()==="cimode")return!0;const s=(a,l)=>{const c=this.services.backendConnector.state[`${a}|${l}`];return c===-1||c===0||c===2};if(r.precheck){const a=r.precheck(this,s);if(a!==void 0)return a}return!!(this.hasResourceBundle(n,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||s(n,t)&&(!i||s(o,t)))}loadNamespaces(t,r){const n=jd();return this.options.ns?(typeof t=="string"&&(t=[t]),t.forEach(i=>{this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}),this.loadResources(i=>{n.resolve(),r&&r(i)}),n):(r&&r(),Promise.resolve())}loadLanguages(t,r){const n=jd();typeof t=="string"&&(t=[t]);const i=this.options.preload||[],o=t.filter(s=>i.indexOf(s)<0&&this.services.languageUtils.isSupportedCode(s));return o.length?(this.options.preload=i.concat(o),this.loadResources(s=>{n.resolve(),r&&r(s)}),n):(r&&r(),Promise.resolve())}dir(t){if(t||(t=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!t)return"rtl";const r=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],n=this.services&&this.services.languageUtils||new oR(lR());return r.indexOf(n.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;return new np(t,r)}cloneInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:kh;const n=t.forkResourceStore;n&&delete t.forkResourceStore;const i={...this.options,...t,isClone:!0},o=new np(i);return(t.debug!==void 0||t.prefix!==void 0)&&(o.logger=o.logger.clone(t)),["store","services","language"].forEach(a=>{o[a]=this[a]}),o.services={...this.services},o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},n&&(o.store=new nR(this.store.data,i),o.services.resourceStore=o.store),o.translator=new dg(o.services,i),o.translator.on("*",function(a){for(var l=arguments.length,c=new Array(l>1?l-1:0),u=1;u{console!=null&&console.warn&&(Bl(e[0])&&(e[0]=`react-i18next:: ${e[0]}`),console.warn(...e))},uR={},z1=(...e)=>{Bl(e[0])&&uR[e[0]]||(Bl(e[0])&&(uR[e[0]]=new Date),RQ(...e))},qL=(e,t)=>()=>{if(e.isInitialized)t();else{const r=()=>{setTimeout(()=>{e.off("initialized",r)},0),t()};e.on("initialized",r)}},dR=(e,t,r)=>{e.loadNamespaces(t,qL(e,r))},fR=(e,t,r,n)=>{Bl(r)&&(r=[r]),r.forEach(i=>{e.options.ns.indexOf(i)<0&&e.options.ns.push(i)}),e.loadLanguages(t,qL(e,n))},PQ=(e,t,r={})=>!t.languages||!t.languages.length?(z1("i18n.languages were undefined or empty",t.languages),!0):t.hasLoadedNamespace(e,{lng:r.lng,precheck:(n,i)=>{var o;if(((o=r.bindI18n)==null?void 0:o.indexOf("languageChanging"))>-1&&n.services.backendConnector.backend&&n.isLanguageChangingTo&&!i(n.isLanguageChangingTo,e))return!1}}),Bl=e=>typeof e=="string",TQ=e=>typeof e=="object"&&e!==null,OQ=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,jQ={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},LQ=e=>jQ[e],IQ=e=>e.replace(OQ,LQ);let U1={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:IQ};const MQ=(e={})=>{U1={...U1,...e}},AQ=()=>U1;let YL;const NQ=e=>{YL=e},DQ=()=>YL,BQ={type:"3rdParty",init(e){MQ(e.options.react),NQ(e)}},$Q=_.createContext();class FQ{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(r=>{this.usedNamespaces[r]??=!0})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const zQ=(e,t)=>{const r=_.useRef();return _.useEffect(()=>{r.current=e},[e,t]),r.current},QL=(e,t,r,n)=>e.getFixedT(t,r,n),UQ=(e,t,r,n)=>_.useCallback(QL(e,t,r,n),[e,t,r,n]),GQ=(e,t={})=>{var C,E,j,R;const{i18n:r}=t,{i18n:n,defaultNS:i}=_.useContext($Q)||{},o=r||n||DQ();if(o&&!o.reportNamespaces&&(o.reportNamespaces=new FQ),!o){z1("You will need to pass in an i18next instance by using initReactI18next");const O=(L,A)=>Bl(A)?A:TQ(A)&&Bl(A.defaultValue)?A.defaultValue:Array.isArray(L)?L[L.length-1]:L,P=[O,{},!1];return P.t=O,P.i18n={},P.ready=!1,P}(C=o.options.react)!=null&&C.wait&&z1("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const s={...AQ(),...o.options.react,...t},{useSuspense:a,keyPrefix:l}=s;let c=i||((E=o.options)==null?void 0:E.defaultNS);c=Bl(c)?[c]:c||["translation"],(R=(j=o.reportNamespaces).addUsedNamespaces)==null||R.call(j,c);const u=(o.isInitialized||o.initializedStoreOnce)&&c.every(O=>PQ(O,o,s)),d=UQ(o,t.lng||null,s.nsMode==="fallback"?c:c[0],l),f=()=>d,p=()=>QL(o,t.lng||null,s.nsMode==="fallback"?c:c[0],l),[h,v]=_.useState(f);let k=c.join();t.lng&&(k=`${t.lng}${k}`);const b=zQ(k),x=_.useRef(!0);_.useEffect(()=>{const{bindI18n:O,bindI18nStore:P}=s;x.current=!0,!u&&!a&&(t.lng?fR(o,t.lng,c,()=>{x.current&&v(p)}):dR(o,c,()=>{x.current&&v(p)})),u&&b&&b!==k&&x.current&&v(p);const L=()=>{x.current&&v(p)};return O&&(o==null||o.on(O,L)),P&&(o==null||o.store.on(P,L)),()=>{x.current=!1,o&&(O==null||O.split(" ").forEach(A=>o.off(A,L))),P&&o&&P.split(" ").forEach(A=>o.store.off(A,L))}},[o,k]),_.useEffect(()=>{x.current&&u&&v(f)},[o,l,u]);const g=[h,o,u];if(g.t=h,g.i18n=o,g.ready=u,u||!u&&!a)return g;throw new Promise(O=>{t.lng?fR(o,t.lng,c,()=>O()):dR(o,c,()=>O())})},{slice:WQ,forEach:HQ}=[];function VQ(e){return HQ.call(WQ.call(arguments,1),t=>{if(t)for(const r in t)e[r]===void 0&&(e[r]=t[r])}),e}const pR=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,KQ=(e,t,r)=>{const n=r||{};n.path=n.path||"/";const i=encodeURIComponent(t);let o=`${e}=${i}`;if(n.maxAge>0){const s=n.maxAge-0;if(Number.isNaN(s))throw new Error("maxAge should be a Number");o+=`; Max-Age=${Math.floor(s)}`}if(n.domain){if(!pR.test(n.domain))throw new TypeError("option domain is invalid");o+=`; Domain=${n.domain}`}if(n.path){if(!pR.test(n.path))throw new TypeError("option path is invalid");o+=`; Path=${n.path}`}if(n.expires){if(typeof n.expires.toUTCString!="function")throw new TypeError("option expires is invalid");o+=`; Expires=${n.expires.toUTCString()}`}if(n.httpOnly&&(o+="; HttpOnly"),n.secure&&(o+="; Secure"),n.sameSite)switch(typeof n.sameSite=="string"?n.sameSite.toLowerCase():n.sameSite){case!0:o+="; SameSite=Strict";break;case"lax":o+="; SameSite=Lax";break;case"strict":o+="; SameSite=Strict";break;case"none":o+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return o},hR={create(e,t,r,n){let i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};r&&(i.expires=new Date,i.expires.setTime(i.expires.getTime()+r*60*1e3)),n&&(i.domain=n),document.cookie=KQ(e,encodeURIComponent(t),i)},read(e){const t=`${e}=`,r=document.cookie.split(";");for(let n=0;n-1&&(i=window.location.hash.substring(window.location.hash.indexOf("?")));const s=i.substring(1).split("&");for(let a=0;a0&&s[a].substring(0,l)===t&&(r=s[a].substring(l+1))}}return r}};let Ld=null;const mR=()=>{if(Ld!==null)return Ld;try{Ld=window!=="undefined"&&window.localStorage!==null;const e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch{Ld=!1}return Ld};var QQ={name:"localStorage",lookup(e){let{lookupLocalStorage:t}=e;if(t&&mR())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupLocalStorage:r}=t;r&&mR()&&window.localStorage.setItem(r,e)}};let Id=null;const gR=()=>{if(Id!==null)return Id;try{Id=window!=="undefined"&&window.sessionStorage!==null;const e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch{Id=!1}return Id};var XQ={name:"sessionStorage",lookup(e){let{lookupSessionStorage:t}=e;if(t&&gR())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupSessionStorage:r}=t;r&&gR()&&window.sessionStorage.setItem(r,e)}},JQ={name:"navigator",lookup(e){const t=[];if(typeof navigator<"u"){const{languages:r,userLanguage:n,language:i}=navigator;if(r)for(let o=0;o0?t:void 0}},ZQ={name:"htmlTag",lookup(e){let{htmlTag:t}=e,r;const n=t||(typeof document<"u"?document.documentElement:null);return n&&typeof n.getAttribute=="function"&&(r=n.getAttribute("lang")),r}},eX={name:"path",lookup(e){var i;let{lookupFromPathIndex:t}=e;if(typeof window>"u")return;const r=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(r)?(i=r[typeof t=="number"?t:0])==null?void 0:i.replace("/",""):void 0}},tX={name:"subdomain",lookup(e){var i,o;let{lookupFromSubdomainIndex:t}=e;const r=typeof t=="number"?t+1:1,n=typeof window<"u"&&((o=(i=window.location)==null?void 0:i.hostname)==null?void 0:o.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i));if(n)return n[r]}};function rX(){return{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:e=>e}}class XL{constructor(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(t,r)}init(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=t||{languageUtils:{}},this.options=VQ(r,this.options||{},rX()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=i=>i.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=n,this.addDetector(qQ),this.addDetector(YQ),this.addDetector(QQ),this.addDetector(XQ),this.addDetector(JQ),this.addDetector(ZQ),this.addDetector(eX),this.addDetector(tX)}addDetector(t){return this.detectors[t.name]=t,this}detect(t){t||(t=this.options.order);let r=[];return t.forEach(n=>{if(this.detectors[n]){let i=this.detectors[n].lookup(this.options);i&&typeof i=="string"&&(i=[i]),i&&(r=r.concat(i))}}),r=r.map(n=>this.options.convertDetectedLanguage(n)),this.services.languageUtils.getBestMatchFromCodes?r:r.length>0?r[0]:null}cacheUserLanguage(t,r){r||(r=this.options.caches),r&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(t)>-1||r.forEach(n=>{this.detectors[n]&&this.detectors[n].cacheUserLanguage(t,this.options)}))}}XL.type="languageDetector";gn.use(XL).use(BQ).init({fallbackLng:"en",resources:{en:{translation:{"Guild Ball":"Guild Ball"}},fr:{translation:{"Guild Ball":"Guild Ball"}}},debug:!1,interpolation:{escapeValue:!1}});const JL=_.createContext({manifest:void 0,version:0,gameplans:void 0}),vR="gbdata_meta";let $0=!1;async function nX(e,t,r){if($0){console.error("concurent reloads");return}console.log(`loading ${e}`),$0=!0;try{const n=t.datafiles.find(a=>a.filename===e),i=n==null?void 0:n.sha256,o=n==null?void 0:n.version,s=await ar.getLocal(vR);if(s&&s.get("version")===o&&s.get("filename")===e&&s.get("sha256")===i){console.log("database pre-loaded :)");return}console.log("database re-loading :("),await Promise.all([ar.guilds.find().exec().then(a=>ar.guilds.bulkRemove(a.map(l=>l.name))).then(()=>ar.guilds.bulkInsert(r.Guilds)).then(a=>{if(a.error.length!==0)throw"error loading Guilds"}).catch(console.error),ar.models.find().exec().then(a=>ar.models.bulkRemove(a.map(l=>l.id))).then(()=>ar.models.bulkInsert(r.Models)).then(a=>{if(a.error.length!==0)throw"error loading Models"}).catch(console.error),ar.character_plays.find().exec().then(a=>ar.character_plays.bulkRemove(a.map(l=>l.name))).then(()=>ar.character_plays.bulkInsert(r["Character Plays"])).then(a=>{if(a.error.length!==0)throw"error loading Character Plays"}).catch(console.error),ar.character_traits.find().exec().then(a=>ar.character_traits.bulkRemove(a.map(l=>l.name))).then(()=>ar.character_traits.bulkInsert(r["Character Traits"])).then(a=>{if(a.error.length!==0)throw"error loading Character Traits"}).catch(console.error)]).then(()=>ar.upsertLocal(vR,{version:o,filename:e,sha256:i})).then(()=>console.log("database re-load complete :|")).catch(console.error)}finally{$0=!1}}const iX=({children:e})=>{const[t,r]=_.useState(void 0),[n,i]=_.useState(void 0),[o,s]=_.useState(0),[a,l]=_.useState(),{setting$:c}=di(),[u,d]=_.useState(),[f,p]=_.useState(),[h,v]=_.useState(),[k,b]=_.useState();return _.useEffect(()=>{const x=c==null?void 0:c.subscribe(g=>{const{dataSet:C,language:E,mostRecentErrata:j}=(g==null?void 0:g.toJSON().data)??{};d(C??null),E=="auto"?b(gn.resolvedLanguage??null):b(E??null),p(j??null)});return()=>{x==null||x.unsubscribe()}},[c]),_.useEffect(()=>{if(u===void 0||f===void 0)return;let x=!1;return(async()=>{var P;const C=await oX();if(x)return;r(C);const E=C.datafiles[0].filename;let j;if(u&&f===E)j=u;else{j=E;const L=await(ar==null?void 0:ar.getLocal("settings"));if(x)return;L==null||L.incrementalPatch({dataSet:j,mostRecentErrata:E})}const R=C.datafiles.find(L=>L.filename===j),O=R.version;s(O),k&&((P=R.translations)!=null&&P[k])&&(console.log(`using translated data set (${k})`),j=R.translations[k].filename),v(j)})(),()=>{x=!0}},[u,k,f]),_.useEffect(()=>{if(!h||!t)return;let x=!1;return(async()=>{const C=await yR(h);x||(l(void 0),await nX(h,t,C).then(()=>l(ar)),i(await yR("gameplans.json")))})(),()=>{x=!0}},[o,h,t]),y.jsx(JL.Provider,{value:{version:o,manifest:t,gameplans:n,gbdb:a},children:e})},oX=async()=>await fetch("data/manifest.json",{headers:{"Content-Type":"application/json",Accept:"application/json"}}).then(function(t){return t.json()}),yR=async e=>await fetch(`data/${e}`,{headers:{"Content-Type":"application/json",Accept:"application/json"}}).then(function(r){return r.json()}),Qn=()=>_.useContext(JL);function ra(){const{gbdb:e}=Qn(),[t,r]=_.useState(),[n,i]=_.useState(),o=_.useMemo(()=>e==null?void 0:e.game_state.getLocal$("network"),[e]);return _.useEffect(()=>{if(!o)return;const s=o.subscribe(a=>{a&&!a.deleted?(i(a),r(!0)):(i(void 0),r(!1))});return()=>s.unsubscribe()},[o]),{active:t,netDoc:n}}const ZL=typeof window>"u"?_.useEffect:_.useLayoutEffect;function sX(e,t=!1){const r=t?ZL:_.useEffect,n=_.useRef(e);return r(()=>{n.current=e}),n}const aX=()=>{};function lX(e){_.useEffect(()=>{typeof e=="function"&&e()},[])}const cX={attributes:!0,characterData:!0,childList:!0,subtree:!0};function Jv(e,t=cX){const[r,n]=_.useState(null);return _.useEffect(()=>{if(r){const o=new MutationObserver(e);return o.observe(r,t),()=>{o.disconnect()}}return aX},[r,e,t]),[_.useCallback(o=>{n(o)},[])]}function uX(e){_.useEffect(()=>e,[])}function dX(e,t){const r=_.useRef(!1),n=_.useMemo(()=>typeof t<"u"&&!Array.isArray(t)?[t]:(Array.isArray(t)&&t.length===0&&console.warn("Using [] as the second argument makes useDidUpdate a noop. The second argument should either be `undefined` or an array of length greater than 0."),t),[t]);_.useEffect(()=>{r.current&&e()},n),lX(()=>{r.current=!0}),uX(()=>{r.current=!1})}const eI=globalThis||void 0||self;function fX(e){const t=sX(e);function r(...n){typeof t.current=="function"&&t.current(...n)}return r}function tI(e,t,r,n={},i=!0,o=!1){const s=fX(r);(o?ZL:_.useEffect)(()=>typeof e<"u"&&i?(e.addEventListener(t,s,n),()=>{e.removeEventListener(t,s,n)}):()=>{},[t,n])}function pX(e,t=!0,r=!1){tI(eI.window,"resize",e,{passive:!0},t,r)}function hX(e,t=!0,r=!1){tI(eI.window,"scroll",e,{passive:!0},t,r)}const mX=e=>{const t=e.getBoundingClientRect();return{bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width,x:t.left,y:t.top}},gX=[void 0,null,null],vX=({updateOnScroll:e=!0,updateOnResize:t=!0}={})=>{const[r,n]=_.useState(null),[i,o]=_.useState(null),s=_.useCallback(l=>{o(l)},[]),a=_.useCallback(()=>{window.requestAnimationFrame(()=>{i&&n(mX(i))})},[i]);return _.useLayoutEffect(()=>{a()},[a]),pX(()=>{a()},t,!0),hX(()=>{a()},e,!0),typeof window>"u"?(console.warn("useDimensionsRef: window is undefined."),gX):[s,r,i]},yX="/assets/playbook-symbol-defs-Dz3QsL1K.svg",bX="/assets/gb-symbol-defs-DvUA8_44.svg";function Ai(e){const{icon:t,size:r,style:n,className:i,...o}=e,s={...n||{},...r?{width:r,height:r}:{},...n&&n.height?{fontSize:n.height}:{}};return y.jsx("svg",{className:`gbicon gbicon-${t} ${i||""}`,style:s,...o,children:y.jsx("use",{href:`${bX}#gbicon-${t}`})})}function rI(e){const{icon:t,size:r,style:n}=e,i=t.replace(//g,"P"),o={...r?{width:r,height:r}:{},...n&&n.height?{fontSize:n.height}:{},...e.style||{}};return y.jsx("svg",{className:`pbicon pbicon-${i}`,style:o,...e,children:y.jsx("use",{href:`${yX}#pbicon-${i}`})})}function wX(e){const{gbdb:t}=Qn(),[r,n]=_.useState();return _.useEffect(()=>{if(!t||!e)return;const i=e(t).$.subscribe(o=>{n(o)});return()=>{i.unsubscribe()}},[t,e]),r}function fo(e,t){const{gbdb:r}=Qn(),n=_.useCallback(e,t??[]),[i,o]=_.useState();return _.useEffect(()=>{let s=!1;return r?((async()=>{const l=await n(r);s||o(l)})().catch(console.error),()=>{s=!0}):void 0},[r,n,o]),i}function xX(e,t){return e.reduce((r,n)=>t(r)>=t(n)?r:n)}function SX({width:e,height:t},r,n=0){if(!e||!t)return;const i=(o,s)=>{const a=(e-o*10)/o,l=(t-s*10-5)/s,c=Math.min(a,l),u=(a-c)/2;return{w:a,h:l,size:c,margin:u,wx:o,hx:s}};return xX(Array.from({length:r},(o,s)=>s+1).map(o=>i(o,Math.ceil(r/o)+n)),o=>o.size)}function nI({Controller:e}){const[t,r]=vX(),n=fo(async a=>{var c;if(!r)return;const l=await a.guilds.count().exec();return((c=SX(r,l,1))==null?void 0:c.size)??0},[r])??0,i=_.useMemo(()=>new Set,[]),o=u7(a=>i.add(a),a=>i.delete(a)),s=_.useCallback(a=>{i.forEach(l=>l(a))},[i]);return y.jsxs("div",{ref:t,style:{display:"flex",flexDirection:"column",height:"100%",alignContent:"flex-start",justifyContent:"space-evenly"},children:[y.jsx(CX,{size:n,pickTeam:s}),y.jsx(Zi,{}),y.jsx(e,{size:n,update$:o})]})}const CX=Lt.memo(e=>{const{pickTeam:t,size:r}=e,n=wX(_.useCallback(o=>o.guilds.find(),[]));if(!n)return null;const i=n.map(o=>({key:o.name,name:o.name,icon:o.name}));return y.jsx("div",{style:{display:"flex",flexDirection:"row",flexWrap:"wrap",alignContent:"flex-start",justifyContent:"space-evenly",gap:"10px",padding:"5px",overflow:"clip"},children:i.map((o,s)=>y.jsx(G1,{g:o,pickTeam:t,size:r},s))})});function G1(e){const{g:t,pickTeam:r,size:n}=e;return y.jsxs(br,{variant:"outlined",onClick:()=>r==null?void 0:r(t.key),style:{display:"flex",flexDirection:"column",minWidth:n,minHeight:n,maxWidth:n,maxHeight:n,background:"rgba(100%, 100%, 100%, 5%)"},sx:{"@media (hover: hover)":{"& > div":{transition:"transform .25s"},"&:hover > div":{transform:"scale(1.2)"}}},children:[y.jsx("div",{style:{display:"flex",placeContent:"center",placeItems:"center",fontSize:n*.7,width:"1em",height:"1em",borderRadius:"50%",padding:"0.0625em",background:"content-box linear-gradient(to bottom, #000, #333)"},children:y.jsx(Ai,{icon:t.icon,className:"dark",style:{flexShrink:0,filter:"drop-shadow(0 0 0.03em black)",...t.style||{}}})}),y.jsx(_t,{variant:"caption",style:{color:"whitesmoke",textTransform:"capitalize",textShadow:"1px 1px 1px black, -1px -1px 1px black, 1px -1px 1px black, -1px 1px 1px black, 0 1px 1px black, 1px 0 1px black, 0 -1px 1px black, -1px 0 1px black",zIndex:1},children:t.name})]},t.key)}var iI={exports:{}},oI={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},sI={exports:{}},_X=function(t){return!t||typeof t=="string"?!1:t instanceof Array||Array.isArray(t)||t.length>=0&&(t.splice instanceof Function||Object.getOwnPropertyDescriptor(t,t.length-1)&&t.constructor.name!=="String")},kX=_X,EX=Array.prototype.concat,RX=Array.prototype.slice,bR=sI.exports=function(t){for(var r=[],n=0,i=t.length;n=4&&e[3]!==1&&(t=", "+e[3]),"hwb("+e[0]+", "+e[1]+"%, "+e[2]+"%"+t+")"};Pi.to.keyword=function(e){return lI[e.slice(0,3)]};function Na(e,t,r){return Math.min(Math.max(t,e),r)}function Eh(e){var t=Math.round(e).toString(16).toUpperCase();return t.length<2?"0"+t:t}var TX=iI.exports;const ip=oI,cI={};for(const e of Object.keys(ip))cI[ip[e]]=e;const st={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};var uI=st;for(const e of Object.keys(st)){if(!("channels"in st[e]))throw new Error("missing channels property: "+e);if(!("labels"in st[e]))throw new Error("missing channel labels property: "+e);if(st[e].labels.length!==st[e].channels)throw new Error("channel and label counts mismatch: "+e);const{channels:t,labels:r}=st[e];delete st[e].channels,delete st[e].labels,Object.defineProperty(st[e],"channels",{value:t}),Object.defineProperty(st[e],"labels",{value:r})}st.rgb.hsl=function(e){const t=e[0]/255,r=e[1]/255,n=e[2]/255,i=Math.min(t,r,n),o=Math.max(t,r,n),s=o-i;let a,l;o===i?a=0:t===o?a=(r-n)/s:r===o?a=2+(n-t)/s:n===o&&(a=4+(t-r)/s),a=Math.min(a*60,360),a<0&&(a+=360);const c=(i+o)/2;return o===i?l=0:c<=.5?l=s/(o+i):l=s/(2-o-i),[a,l*100,c*100]};st.rgb.hsv=function(e){let t,r,n,i,o;const s=e[0]/255,a=e[1]/255,l=e[2]/255,c=Math.max(s,a,l),u=c-Math.min(s,a,l),d=function(f){return(c-f)/6/u+1/2};return u===0?(i=0,o=0):(o=u/c,t=d(s),r=d(a),n=d(l),s===c?i=n-r:a===c?i=1/3+t-n:l===c&&(i=2/3+r-t),i<0?i+=1:i>1&&(i-=1)),[i*360,o*100,c*100]};st.rgb.hwb=function(e){const t=e[0],r=e[1];let n=e[2];const i=st.rgb.hsl(e)[0],o=1/255*Math.min(t,Math.min(r,n));return n=1-1/255*Math.max(t,Math.max(r,n)),[i,o*100,n*100]};st.rgb.cmyk=function(e){const t=e[0]/255,r=e[1]/255,n=e[2]/255,i=Math.min(1-t,1-r,1-n),o=(1-t-i)/(1-i)||0,s=(1-r-i)/(1-i)||0,a=(1-n-i)/(1-i)||0;return[o*100,s*100,a*100,i*100]};function OX(e,t){return(e[0]-t[0])**2+(e[1]-t[1])**2+(e[2]-t[2])**2}st.rgb.keyword=function(e){const t=cI[e];if(t)return t;let r=1/0,n;for(const i of Object.keys(ip)){const o=ip[i],s=OX(e,o);s.04045?((t+.055)/1.055)**2.4:t/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92;const i=t*.4124+r*.3576+n*.1805,o=t*.2126+r*.7152+n*.0722,s=t*.0193+r*.1192+n*.9505;return[i*100,o*100,s*100]};st.rgb.lab=function(e){const t=st.rgb.xyz(e);let r=t[0],n=t[1],i=t[2];r/=95.047,n/=100,i/=108.883,r=r>.008856?r**(1/3):7.787*r+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,i=i>.008856?i**(1/3):7.787*i+16/116;const o=116*n-16,s=500*(r-n),a=200*(n-i);return[o,s,a]};st.hsl.rgb=function(e){const t=e[0]/360,r=e[1]/100,n=e[2]/100;let i,o,s;if(r===0)return s=n*255,[s,s,s];n<.5?i=n*(1+r):i=n+r-n*r;const a=2*n-i,l=[0,0,0];for(let c=0;c<3;c++)o=t+1/3*-(c-1),o<0&&o++,o>1&&o--,6*o<1?s=a+(i-a)*6*o:2*o<1?s=i:3*o<2?s=a+(i-a)*(2/3-o)*6:s=a,l[c]=s*255;return l};st.hsl.hsv=function(e){const t=e[0];let r=e[1]/100,n=e[2]/100,i=r;const o=Math.max(n,.01);n*=2,r*=n<=1?n:2-n,i*=o<=1?o:2-o;const s=(n+r)/2,a=n===0?2*i/(o+i):2*r/(n+r);return[t,a*100,s*100]};st.hsv.rgb=function(e){const t=e[0]/60,r=e[1]/100;let n=e[2]/100;const i=Math.floor(t)%6,o=t-Math.floor(t),s=255*n*(1-r),a=255*n*(1-r*o),l=255*n*(1-r*(1-o));switch(n*=255,i){case 0:return[n,l,s];case 1:return[a,n,s];case 2:return[s,n,l];case 3:return[s,a,n];case 4:return[l,s,n];case 5:return[n,s,a]}};st.hsv.hsl=function(e){const t=e[0],r=e[1]/100,n=e[2]/100,i=Math.max(n,.01);let o,s;s=(2-r)*n;const a=(2-r)*i;return o=r*i,o/=a<=1?a:2-a,o=o||0,s/=2,[t,o*100,s*100]};st.hwb.rgb=function(e){const t=e[0]/360;let r=e[1]/100,n=e[2]/100;const i=r+n;let o;i>1&&(r/=i,n/=i);const s=Math.floor(6*t),a=1-n;o=6*t-s,s&1&&(o=1-o);const l=r+o*(a-r);let c,u,d;switch(s){default:case 6:case 0:c=a,u=l,d=r;break;case 1:c=l,u=a,d=r;break;case 2:c=r,u=a,d=l;break;case 3:c=r,u=l,d=a;break;case 4:c=l,u=r,d=a;break;case 5:c=a,u=r,d=l;break}return[c*255,u*255,d*255]};st.cmyk.rgb=function(e){const t=e[0]/100,r=e[1]/100,n=e[2]/100,i=e[3]/100,o=1-Math.min(1,t*(1-i)+i),s=1-Math.min(1,r*(1-i)+i),a=1-Math.min(1,n*(1-i)+i);return[o*255,s*255,a*255]};st.xyz.rgb=function(e){const t=e[0]/100,r=e[1]/100,n=e[2]/100;let i,o,s;return i=t*3.2406+r*-1.5372+n*-.4986,o=t*-.9689+r*1.8758+n*.0415,s=t*.0557+r*-.204+n*1.057,i=i>.0031308?1.055*i**(1/2.4)-.055:i*12.92,o=o>.0031308?1.055*o**(1/2.4)-.055:o*12.92,s=s>.0031308?1.055*s**(1/2.4)-.055:s*12.92,i=Math.min(Math.max(0,i),1),o=Math.min(Math.max(0,o),1),s=Math.min(Math.max(0,s),1),[i*255,o*255,s*255]};st.xyz.lab=function(e){let t=e[0],r=e[1],n=e[2];t/=95.047,r/=100,n/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,n=n>.008856?n**(1/3):7.787*n+16/116;const i=116*r-16,o=500*(t-r),s=200*(r-n);return[i,o,s]};st.lab.xyz=function(e){const t=e[0],r=e[1],n=e[2];let i,o,s;o=(t+16)/116,i=r/500+o,s=o-n/200;const a=o**3,l=i**3,c=s**3;return o=a>.008856?a:(o-16/116)/7.787,i=l>.008856?l:(i-16/116)/7.787,s=c>.008856?c:(s-16/116)/7.787,i*=95.047,o*=100,s*=108.883,[i,o,s]};st.lab.lch=function(e){const t=e[0],r=e[1],n=e[2];let i;i=Math.atan2(n,r)*360/2/Math.PI,i<0&&(i+=360);const s=Math.sqrt(r*r+n*n);return[t,s,i]};st.lch.lab=function(e){const t=e[0],r=e[1],i=e[2]/360*2*Math.PI,o=r*Math.cos(i),s=r*Math.sin(i);return[t,o,s]};st.rgb.ansi16=function(e,t=null){const[r,n,i]=e;let o=t===null?st.rgb.hsv(e)[2]:t;if(o=Math.round(o/50),o===0)return 30;let s=30+(Math.round(i/255)<<2|Math.round(n/255)<<1|Math.round(r/255));return o===2&&(s+=60),s};st.hsv.ansi16=function(e){return st.rgb.ansi16(st.hsv.rgb(e),e[2])};st.rgb.ansi256=function(e){const t=e[0],r=e[1],n=e[2];return t===r&&r===n?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5)};st.ansi16.rgb=function(e){let t=e%10;if(t===0||t===7)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];const r=(~~(e>50)+1)*.5,n=(t&1)*r*255,i=(t>>1&1)*r*255,o=(t>>2&1)*r*255;return[n,i,o]};st.ansi256.rgb=function(e){if(e>=232){const o=(e-232)*10+8;return[o,o,o]}e-=16;let t;const r=Math.floor(e/36)/5*255,n=Math.floor((t=e%36)/6)/5*255,i=t%6/5*255;return[r,n,i]};st.rgb.hex=function(e){const r=(((Math.round(e[0])&255)<<16)+((Math.round(e[1])&255)<<8)+(Math.round(e[2])&255)).toString(16).toUpperCase();return"000000".substring(r.length)+r};st.hex.rgb=function(e){const t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let r=t[0];t[0].length===3&&(r=r.split("").map(a=>a+a).join(""));const n=parseInt(r,16),i=n>>16&255,o=n>>8&255,s=n&255;return[i,o,s]};st.rgb.hcg=function(e){const t=e[0]/255,r=e[1]/255,n=e[2]/255,i=Math.max(Math.max(t,r),n),o=Math.min(Math.min(t,r),n),s=i-o;let a,l;return s<1?a=o/(1-s):a=0,s<=0?l=0:i===t?l=(r-n)/s%6:i===r?l=2+(n-t)/s:l=4+(t-r)/s,l/=6,l%=1,[l*360,s*100,a*100]};st.hsl.hcg=function(e){const t=e[1]/100,r=e[2]/100,n=r<.5?2*t*r:2*t*(1-r);let i=0;return n<1&&(i=(r-.5*n)/(1-n)),[e[0],n*100,i*100]};st.hsv.hcg=function(e){const t=e[1]/100,r=e[2]/100,n=t*r;let i=0;return n<1&&(i=(r-n)/(1-n)),[e[0],n*100,i*100]};st.hcg.rgb=function(e){const t=e[0]/360,r=e[1]/100,n=e[2]/100;if(r===0)return[n*255,n*255,n*255];const i=[0,0,0],o=t%1*6,s=o%1,a=1-s;let l=0;switch(Math.floor(o)){case 0:i[0]=1,i[1]=s,i[2]=0;break;case 1:i[0]=a,i[1]=1,i[2]=0;break;case 2:i[0]=0,i[1]=1,i[2]=s;break;case 3:i[0]=0,i[1]=a,i[2]=1;break;case 4:i[0]=s,i[1]=0,i[2]=1;break;default:i[0]=1,i[1]=0,i[2]=a}return l=(1-r)*n,[(r*i[0]+l)*255,(r*i[1]+l)*255,(r*i[2]+l)*255]};st.hcg.hsv=function(e){const t=e[1]/100,r=e[2]/100,n=t+r*(1-t);let i=0;return n>0&&(i=t/n),[e[0],i*100,n*100]};st.hcg.hsl=function(e){const t=e[1]/100,n=e[2]/100*(1-t)+.5*t;let i=0;return n>0&&n<.5?i=t/(2*n):n>=.5&&n<1&&(i=t/(2*(1-n))),[e[0],i*100,n*100]};st.hcg.hwb=function(e){const t=e[1]/100,r=e[2]/100,n=t+r*(1-t);return[e[0],(n-t)*100,(1-n)*100]};st.hwb.hcg=function(e){const t=e[1]/100,n=1-e[2]/100,i=n-t;let o=0;return i<1&&(o=(n-i)/(1-i)),[e[0],i*100,o*100]};st.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]};st.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]};st.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]};st.gray.hsl=function(e){return[0,0,e[0]]};st.gray.hsv=st.gray.hsl;st.gray.hwb=function(e){return[0,100,e[0]]};st.gray.cmyk=function(e){return[0,0,0,e[0]]};st.gray.lab=function(e){return[e[0],0,0]};st.gray.hex=function(e){const t=Math.round(e[0]/100*255)&255,n=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(n.length)+n};st.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]};const fg=uI;function jX(){const e={},t=Object.keys(fg);for(let r=t.length,n=0;n1&&(r=n),e(r))};return"conversion"in e&&(t.conversion=e.conversion),t}function $X(e){const t=function(...r){const n=r[0];if(n==null)return n;n.length>1&&(r=n);const i=e(r);if(typeof i=="object")for(let o=i.length,s=0;s{Bc[e]={},Object.defineProperty(Bc[e],"channels",{value:W1[e].channels}),Object.defineProperty(Bc[e],"labels",{value:W1[e].labels});const t=NX(e);Object.keys(t).forEach(n=>{const i=t[n];Bc[e][n]=$X(i),Bc[e][n].raw=BX(i)})});var FX=Bc;const $c=TX,ki=FX,dI=["keyword","gray","hex"],H1={};for(const e of Object.keys(ki))H1[[...ki[e].labels].sort().join("")]=e;const pg={};function rn(e,t){if(!(this instanceof rn))return new rn(e,t);if(t&&t in dI&&(t=null),t&&!(t in ki))throw new Error("Unknown model: "+t);let r,n;if(e==null)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(e instanceof rn)this.model=e.model,this.color=[...e.color],this.valpha=e.valpha;else if(typeof e=="string"){const i=$c.get(e);if(i===null)throw new Error("Unable to parse color from string: "+e);this.model=i.model,n=ki[this.model].channels,this.color=i.value.slice(0,n),this.valpha=typeof i.value[n]=="number"?i.value[n]:1}else if(e.length>0){this.model=t||"rgb",n=ki[this.model].channels;const i=Array.prototype.slice.call(e,0,n);this.color=V1(i,n),this.valpha=typeof e[n]=="number"?e[n]:1}else if(typeof e=="number")this.model="rgb",this.color=[e>>16&255,e>>8&255,e&255],this.valpha=1;else{this.valpha=1;const i=Object.keys(e);"alpha"in e&&(i.splice(i.indexOf("alpha"),1),this.valpha=typeof e.alpha=="number"?e.alpha:0);const o=i.sort().join("");if(!(o in H1))throw new Error("Unable to parse color from object: "+JSON.stringify(e));this.model=H1[o];const{labels:s}=ki[this.model],a=[];for(r=0;r(e%360+360)%360),saturationl:Pr("hsl",1,Yr(100)),lightness:Pr("hsl",2,Yr(100)),saturationv:Pr("hsv",1,Yr(100)),value:Pr("hsv",2,Yr(100)),chroma:Pr("hcg",1,Yr(100)),gray:Pr("hcg",2,Yr(100)),white:Pr("hwb",1,Yr(100)),wblack:Pr("hwb",2,Yr(100)),cyan:Pr("cmyk",0,Yr(100)),magenta:Pr("cmyk",1,Yr(100)),yellow:Pr("cmyk",2,Yr(100)),black:Pr("cmyk",3,Yr(100)),x:Pr("xyz",0,Yr(95.047)),y:Pr("xyz",1,Yr(100)),z:Pr("xyz",2,Yr(108.833)),l:Pr("lab",0,Yr(100)),a:Pr("lab",1),b:Pr("lab",2),keyword(e){return e!==void 0?new rn(e):ki[this.model].keyword(this.color)},hex(e){return e!==void 0?new rn(e):$c.to.hex(this.rgb().round().color)},hexa(e){if(e!==void 0)return new rn(e);const t=this.rgb().round().color;let r=Math.round(this.valpha*255).toString(16).toUpperCase();return r.length===1&&(r="0"+r),$c.to.hex(t)+r},rgbNumber(){const e=this.rgb().color;return(e[0]&255)<<16|(e[1]&255)<<8|e[2]&255},luminosity(){const e=this.rgb().color,t=[];for(const[r,n]of e.entries()){const i=n/255;t[r]=i<=.04045?i/12.92:((i+.055)/1.055)**2.4}return .2126*t[0]+.7152*t[1]+.0722*t[2]},contrast(e){const t=this.luminosity(),r=e.luminosity();return t>r?(t+.05)/(r+.05):(r+.05)/(t+.05)},level(e){const t=this.contrast(e);return t>=7?"AAA":t>=4.5?"AA":""},isDark(){const e=this.rgb().color;return(e[0]*2126+e[1]*7152+e[2]*722)/1e4<128},isLight(){return!this.isDark()},negate(){const e=this.rgb();for(let t=0;t<3;t++)e.color[t]=255-e.color[t];return e},lighten(e){const t=this.hsl();return t.color[2]+=t.color[2]*e,t},darken(e){const t=this.hsl();return t.color[2]-=t.color[2]*e,t},saturate(e){const t=this.hsl();return t.color[1]+=t.color[1]*e,t},desaturate(e){const t=this.hsl();return t.color[1]-=t.color[1]*e,t},whiten(e){const t=this.hwb();return t.color[1]+=t.color[1]*e,t},blacken(e){const t=this.hwb();return t.color[2]+=t.color[2]*e,t},grayscale(){const e=this.rgb().color,t=e[0]*.3+e[1]*.59+e[2]*.11;return rn.rgb(t,t,t)},fade(e){return this.alpha(this.valpha-this.valpha*e)},opaquer(e){return this.alpha(this.valpha+this.valpha*e)},rotate(e){const t=this.hsl();let r=t.color[0];return r=(r+e)%360,r=r<0?360+r:r,t.color[0]=r,t},mix(e,t){if(!e||!e.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof e);const r=e.rgb(),n=this.rgb(),i=t===void 0?.5:t,o=2*i-1,s=r.alpha()-n.alpha(),a=((o*s===-1?o:(o+s)/(1+o*s))+1)/2,l=1-a;return rn.rgb(a*r.red()+l*n.red(),a*r.green()+l*n.green(),a*r.blue()+l*n.blue(),r.alpha()*i+n.alpha()*(1-i))}};for(const e of Object.keys(ki)){if(dI.includes(e))continue;const{channels:t}=ki[e];rn.prototype[e]=function(...r){return this.model===e?new rn(this):r.length>0?new rn(r,e):new rn([...GX(ki[this.model][e].raw(this.color)),this.valpha],e)},rn[e]=function(...r){let n=r[0];return typeof n=="number"&&(n=V1(r,t)),new rn(n,e)}}function zX(e,t){return Number(e.toFixed(t))}function UX(e){return function(t){return zX(t,e)}}function Pr(e,t,r){e=Array.isArray(e)?e:[e];for(const n of e)(pg[n]||(pg[n]=[]))[t]=r;return e=e[0],function(n){let i;return n!==void 0?(r&&(n=r(n)),i=this[e](),i.color[t]=n,i):(i=this[e]().color[t],r&&(i=r(i)),i)}}function Yr(e){return function(t){return Math.max(0,Math.min(e,t))}}function GX(e){return Array.isArray(e)?e:[e]}function V1(e,t){for(let r=0;r{const{version:e}=Qn();return y.jsxs(_t,{sx:{position:"absolute",bottom:0,right:0,color:"text.disabled"},children:["[",e,"]"]})},HX=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i;function sp(e){return typeof e=="string"&&HX.test(e)}function hg(e){if(!sp(e))throw TypeError("Invalid UUID");var t,r=new Uint8Array(16);return r[0]=(t=parseInt(e.slice(0,8),16))>>>24,r[1]=t>>>16&255,r[2]=t>>>8&255,r[3]=t&255,r[4]=(t=parseInt(e.slice(9,13),16))>>>8,r[5]=t&255,r[6]=(t=parseInt(e.slice(14,18),16))>>>8,r[7]=t&255,r[8]=(t=parseInt(e.slice(19,23),16))>>>8,r[9]=t&255,r[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,r[11]=t/4294967296&255,r[12]=t>>>24&255,r[13]=t>>>16&255,r[14]=t>>>8&255,r[15]=t&255,r}var ln=[];for(var z0=0;z0<256;++z0)ln.push((z0+256).toString(16).slice(1));function VX(e,t=0){return(ln[e[t+0]]+ln[e[t+1]]+ln[e[t+2]]+ln[e[t+3]]+"-"+ln[e[t+4]]+ln[e[t+5]]+"-"+ln[e[t+6]]+ln[e[t+7]]+"-"+ln[e[t+8]]+ln[e[t+9]]+"-"+ln[e[t+10]]+ln[e[t+11]]+ln[e[t+12]]+ln[e[t+13]]+ln[e[t+14]]+ln[e[t+15]]).toLowerCase()}var Rh,KX=new Uint8Array(16);function qX(){if(!Rh&&(Rh=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Rh))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Rh(KX)}var YX=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);const wR={randomUUID:YX};function fI(e,t,r){if(wR.randomUUID&&!t&&!e)return wR.randomUUID();e=e||{};var n=e.random||(e.rng||qX)();return n[6]=n[6]&15|64,n[8]=n[8]&63|128,VX(n)}const Op="wss://gbplaybook-webrtc-server.onrender.com";let Ts;function xS(e){return e.game_state.find().exec().then(t=>e.game_state.bulkRemove(t.map(r=>r._id))).catch(console.error)}let U0=!1;function Zv(e){return async(...t)=>{if(U0)throw"concurent network change";U0=!0;try{await e(...t)}finally{U0=!1}}}const QX=Zv(async(e,t)=>{try{const r=await sJ();console.log(`# join code is ${r}`),t(r);const{uid:n,oid:i,gid:o}=await lJ();await xS(e),console.log("# starting new network game"),Ts=await yS(Op,o),await e.game_state.insertLocal("network",{uid:n,oid:i,gid:o})}finally{jp()}}),XX=Zv(async(e,t)=>{try{const{uid:r,oid:n,gid:i}=await aJ(t);await xS(e),console.log("# joining a network game"),Ts=await yS(Op,i),await e.game_state.insertLocal("network",{uid:r,oid:n,gid:i})}finally{jp()}}),JX=Zv(async e=>{const t=await e.game_state.getLocal("network"),r=t==null?void 0:t.get("gid");r&&Ts===void 0&&(console.log("# reconnecting to a network game"),Ts=await yS(Op,r))}),ZX=Zv(async e=>{console.log("# leaving a network game"),await(Ts==null?void 0:Ts.cancel().catch(console.error).finally(()=>{Ts=void 0})),await xS(e).catch(console.error),await e.game_state.getLocal("network").then(t=>t==null?void 0:t.remove()).catch(console.error)});function SS({allowNew:e=!1}){const{gbdb:t}=Qn(),[r,n]=_.useState(!1),{active:i}=ra();_.useEffect(()=>{t&&i&&!Ts&&JX(t)},[t,i]);const[o,s]=_.useState("default");if(_.useEffect(()=>{s(i?"success":"default")},[i]),!!t)return y.jsxs(y.Fragment,{children:[y.jsx(Io,{size:"small",color:o,disabled:!e&&!i,onClick:()=>n(!0),children:y.jsx(eQ,{})}),y.jsxs(wU,{open:r,onClose:()=>n(!1),children:[y.jsx(TU,{children:"Network Game Setup"}),y.jsx(EU,{children:y.jsx(oJ,{allowNew:e,close:()=>{n(!1)}})})]})]})}const eJ=e=>{const{setActiveStep:t}=e;return y.jsxs(tr,{sx:{display:"flex",flexDirection:"column",gap:"1em"},children:[y.jsx(br,{variant:"contained",onClick:()=>t("Start"),children:"Start a Game"}),y.jsx(br,{variant:"contained",onClick:()=>t("Join"),children:"Join a Game"})]})},tJ=e=>{const{setActiveStep:t}=e,{gbdb:r}=Qn(),[n,i]=_.useState();return _.useEffect(()=>{r&&QX(r,i).then(()=>{t("Ready")}).catch(o=>{console.error(o),t("New")})},[r,t]),y.jsxs(tr,{sx:{display:"flex",flexDirection:"column",gap:"1em",alignItems:"center"},children:[y.jsx(_t,{children:"Share this join code:"}),y.jsx(_t,{variant:"h3",children:n==null?void 0:n.toString().padStart(4,"0")}),y.jsx(_t,{children:"Waiting for opponent to connect."}),y.jsx(br,{variant:"contained",onClick:()=>{jp(),e.setActiveStep("New")},children:"Cancel"})]})},rJ=e=>{const{setActiveStep:t}=e,{gbdb:r}=Qn(),[n,i]=_.useState(),[o,s]=_.useState(!1);if(r)return y.jsxs(tr,{sx:{display:"flex",flexDirection:"column",gap:"1em"},children:[y.jsx(xG,{sx:{margin:"1em"},label:"game join code",variant:"outlined",disabled:o,inputProps:{pattern:"[0-9]*",inputMode:"numeric"},onChange:a=>i(Number(a.target.value))}),y.jsx(br,{variant:"contained",disabled:!n||o,onClick:()=>{s(!0),XX(r,n??0).then(()=>t("Ready")).then(()=>s(!1)).catch(a=>{console.error(a),t("New")})},children:"Join a Game"}),y.jsx(br,{variant:"contained",onClick:()=>{jp(),s(!1),t("New")},children:"Cancel"})]})},nJ=e=>{const{setActiveStep:t}=e,{gbdb:r}=Qn(),n=Ya(),{setting$:i}=di();if(r)return y.jsxs(p1,{spacing:2,alignItems:"center",children:[y.jsx(_t,{variant:"h6",children:"Connected"}),y.jsxs(p1,{direction:"row",spacing:2,children:[y.jsx(br,{variant:"contained",onClick:()=>ZX(r).then(()=>t("New")).then(()=>i&&Gr(i)).then(o=>o==null?void 0:o.incrementalPatch({gamePlayRoute:void 0})).then(()=>{n("/",{})}).catch(console.error),children:"Leave Game"}),y.jsx(br,{color:"success",variant:"contained",onClick:()=>{var o;(o=e.close)==null||o.call(e)},children:"Continue"})]})]})},iJ=()=>y.jsx(_t,{children:"Network Games must be started from the inital guild selection screen."});function oJ({allowNew:e=!1,close:t}){const{active:r}=ra(),[n,i]=_.useState(e?"New":"Block");return _.useEffect(()=>{r&&i("Ready")},[r]),_.useEffect(()=>()=>{jp()},[]),y.jsxs(tr,{children:[n==="New"&&y.jsx(eJ,{setActiveStep:i}),n==="Start"&&y.jsx(tJ,{setActiveStep:i}),n==="Join"&&y.jsx(rJ,{setActiveStep:i}),n==="Ready"&&y.jsx(nJ,{setActiveStep:i,close:t}),n==="Block"&&y.jsx(iJ,{})]})}let er;function sJ(){return new Promise((e,t)=>{er=new WebSocket(Op),er.onopen=()=>{er==null||er.send(JSON.stringify({type:"handshake-begin"}))},er.onclose=()=>{t("socket closed")},er.onerror=r=>{t(r)},er.onmessage=r=>{const n=JSON.parse(r.data);switch(n.type){case"handshake-response":er&&(er.onmessage=null),e(n.code);break}}})}function aJ(e){return new Promise((t,r)=>{if(!e){r("Invalid Arguments (id undefined)");return}er=new WebSocket(Op),er.onopen=()=>{er==null||er.send(JSON.stringify({type:"handshake-join",code:e}))},er.onclose=()=>{r("socket closed")},er.onerror=n=>{r(n)},er.onmessage=n=>{const i=JSON.parse(n.data);switch(i.type){case"handshake-complete":{const o=i.yourId;if(!sp(o)){r(`invalid uID ${o}`);return}const s=i.otherId;if(!sp(s)){r(`invalid oID ${s}`);return}const a=hg(o),l=hg(s),c=a.map((d,f)=>d^l[f]),u=fI({random:c});t({uid:o,oid:s,gid:u})}break}}})}function lJ(){return new Promise((e,t)=>{if((er==null?void 0:er.readyState)!==1){t("socket closed");return}er.onclose=()=>{t("socket closed")},er.onerror=r=>{t(r)},er.onmessage=r=>{const n=JSON.parse(r.data);switch(n.type){case"handshake-complete":{const i=n.yourId;if(!sp(i)){t(`invalid uID ${i}`);return}const o=n.otherId;if(!sp(o)){t(`invalid oID ${o}`);return}const s=hg(i),a=hg(o),l=s.map((u,d)=>u^a[d]),c=fI({random:l});e({uid:i,oid:o,gid:c})}break}}})}function jp(){er==null||er.close(),er=void 0}function ey(){return pp()}var CS={},cJ=ds;Object.defineProperty(CS,"__esModule",{value:!0});var pI=CS.default=void 0,uJ=cJ(fs()),dJ=y;pI=CS.default=(0,uJ.default)((0,dJ.jsx)("path",{d:"M8 5v14l11-7z"}),"PlayArrow");function fJ(e){switch(e){case"Guilds":return"/game";case"Draft":return"/game/draft";case"Game":return"/game/draft/play"}}function hI(e){const t=Ya(),{gameState1$:r,gameState2$:n}=ey(),{active:i}=ra(),[o,s]=_.useState(),[a,l]=_.useState(),[c,u]=_.useState(!1),{dest:d,onAction:f,...p}=e;return _.useEffect(()=>{const h=r==null?void 0:r.pipe(qt(k=>k==null?void 0:k.navigateTo)).subscribe(k=>s(k)),v=n==null?void 0:n.pipe(qt(k=>k==null?void 0:k.navigateTo)).subscribe(k=>l(k));return()=>{h==null||h.unsubscribe(),v==null||v.unsubscribe()}},[r,n]),_.useEffect(()=>{const h=async()=>{await Gr(r).then(v=>{v==null||v.incrementalPatch({navigateTo:void 0}).catch(console.error)}),i||await Gr(n).then(v=>{v==null||v.incrementalPatch({navigateTo:void 0}).catch(console.error)}),t(fJ(d))};o==d&&a===d&&h()},[r,n,d,o,a,i,t,f]),_.useEffect(()=>{u(a===d)},[d,a]),y.jsx(IU,{className:c?"fabAnimate":void 0,...p,color:"secondary",onClick:()=>{f==null||f(),Gr(r).then(h=>{h==null||h.incrementalPatch({navigateTo:d}).catch(console.error)}),i||Gr(n).then(h=>{h==null||h.incrementalPatch({navigateTo:d}).catch(console.error)})},children:y.jsx(pI,{fontSize:"large",sx:{zIndex:10}})})}function xR({team:e,size:t}){const r=fo(n=>n.guilds.findOne().where({name:e}).exec(),[e]);return r?y.jsxs("div",{style:{position:"absolute",width:"100%",height:"100%",display:"flex",placeContent:"center",placeItems:"center",overflow:"hidden",zIndex:-1,backgroundColor:op(r.shadow??r.darkColor??r.color).darken(.25).desaturate(.25).string()},children:[y.jsx(Ai,{icon:e,fontSize:t,style:{color:"rgba(0, 0, 0, 60%)",flexShrink:0}}),y.jsx(_t,{variant:"caption",style:{position:"absolute",color:"whitesmoke",textShadow:"1px 1px 1px black, -1px -1px 1px black, 1px -1px 1px black, -1px 1px 1px black, 0 1px 1px black, 1px 0 1px black, 0 -1px 1px black, -1px 0 1px black",textTransform:"capitalize"},children:e})]}):null}function pJ(e){const[t,r]=_.useState("P1"),[n,i]=_.useState(),[o,s]=_.useState(),[a,l]=_.useState(!1),c=qn(),{active:u}=ra(),{gameState1$:d,gameState2$:f}=ey(),[p,h]=_.useState();_.useEffect(()=>{i(void 0),r("P1");const x=d==null?void 0:d.subscribe(g=>h(g));return()=>x==null?void 0:x.unsubscribe()},[d]);const[v,k]=_.useState();_.useEffect(()=>{s(void 0),r("P1");const x=f==null?void 0:f.subscribe(g=>k(g));return()=>x==null?void 0:x.unsubscribe()},[f]),_.useEffect(()=>{const x=p==null?void 0:p.get$("guild").subscribe(g=>i(g));return()=>x==null?void 0:x.unsubscribe()},[p]),_.useEffect(()=>{const x=v==null?void 0:v.get$("guild").subscribe(g=>s(g));return()=>x==null?void 0:x.unsubscribe()},[v]);const b=_.useCallback(async x=>{x&&(t==="P1"?(await(p==null?void 0:p.incrementalPatch({guild:x,roster:[]}).catch(console.error)),r(!o&&!u?"P2":"GO")):t==="P2"&&(await(v==null?void 0:v.incrementalPatch({guild:x,roster:[]}).catch(console.error)),r(n?"GO":"P1")))},[t,n,o,p,v,u]);return _.useEffect(()=>{const x=e.update$.subscribe(g=>b(g));return()=>x.unsubscribe()},[e.update$,b]),y.jsxs("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",margin:"5px",gap:"5px"},children:[y.jsx(br,{variant:"outlined",style:{minWidth:e.size,maxWidth:e.size,minHeight:e.size,maxHeight:e.size,fontSize:e.size*.5,...t==="P1"?{borderColor:c.palette.secondary.light,borderRadius:"12px",borderWidth:"4px"}:{borderColor:c.palette.primary.dark,borderRadius:"12px",borderWidth:"4px"}},onClick:()=>r("P1"),children:n?y.jsx(xR,{team:n,size:e.size}):"P1"}),y.jsxs("div",{style:{height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"0.25em"},children:[y.jsx(_t,{variant:"caption",children:"vs"}),y.jsx(hI,{dest:"Draft",disabled:!n||!o,onAction:()=>l(!0),sx:{m:"0 15px"}}),y.jsx(_t,{variant:"caption",children:a?"(waiting)":" "})]}),y.jsx(br,{variant:"outlined",disabled:u,style:{minWidth:e.size,maxWidth:e.size,minHeight:e.size,maxHeight:e.size,fontSize:e.size*.5,...t==="P2"?{borderColor:c.palette.secondary.light,borderRadius:"12px",borderWidth:"4px"}:{borderColor:c.palette.primary.dark,borderRadius:"12px",borderWidth:"4px"}},onClick:()=>r("P2"),children:o?y.jsx(xR,{team:o,size:e.size}):"P2"})]})}function hJ(){return y.jsxs(tr,{sx:{width:"100%",height:"100%",position:"relative"},children:[y.jsx(ps,{children:y.jsxs("div",{style:{display:"flex",flexDirection:"row",width:"100%",justifyContent:"space-between"},children:[y.jsx(Za,{separator:y.jsx(lc,{fontSize:"small"}),children:y.jsx(Io,{size:"small",disabled:!0,children:y.jsx(wS,{sx:{color:"text.secondary"}})})}),y.jsx(SS,{allowNew:!0})]})}),y.jsx(nI,{Controller:pJ}),y.jsx(cc,{})]})}var mg={exports:{}};mg.exports;(function(e,t){var r=200,n="__lodash_hash_undefined__",i=9007199254740991,o="[object Arguments]",s="[object Array]",a="[object Boolean]",l="[object Date]",c="[object Error]",u="[object Function]",d="[object GeneratorFunction]",f="[object Map]",p="[object Number]",h="[object Object]",v="[object Promise]",k="[object RegExp]",b="[object Set]",x="[object String]",g="[object Symbol]",C="[object WeakMap]",E="[object ArrayBuffer]",j="[object DataView]",R="[object Float32Array]",O="[object Float64Array]",P="[object Int8Array]",L="[object Int16Array]",A="[object Int32Array]",$="[object Uint8Array]",F="[object Uint8ClampedArray]",K="[object Uint16Array]",Y="[object Uint32Array]",Z=/[\\^$.*+?()[\]{}|]/g,le=/\w*$/,V=/^\[object .+?Constructor\]$/,H=/^(?:0|[1-9]\d*)$/,ae={};ae[o]=ae[s]=ae[E]=ae[j]=ae[a]=ae[l]=ae[R]=ae[O]=ae[P]=ae[L]=ae[A]=ae[f]=ae[p]=ae[h]=ae[k]=ae[b]=ae[x]=ae[g]=ae[$]=ae[F]=ae[K]=ae[Y]=!0,ae[c]=ae[u]=ae[C]=!1;var Re=typeof _n=="object"&&_n&&_n.Object===Object&&_n,Ue=typeof self=="object"&&self&&self.Object===Object&&self,Ce=Re||Ue||Function("return this")(),Pe=t&&!t.nodeType&&t,Xe=Pe&&!0&&e&&!e.nodeType&&e,Le=Xe&&Xe.exports===Pe;function Ze(U,he){return U.set(he[0],he[1]),U}function ct(U,he){return U.add(he),U}function je(U,he){for(var ke=-1,at=U?U.length:0;++ke-1}function vt(U,he){var ke=this.__data__,at=Vr(ke,U);return at<0?ke.push([U,he]):ke[at][1]=he,this}re.prototype.clear=ge,re.prototype.delete=_e,re.prototype.get=Ye,re.prototype.has=Je,re.prototype.set=vt;function ze(U){var he=-1,ke=U?U.length:0;for(this.clear();++he-1&&U%1==0&&U-1&&U%1==0&&U<=i}function sl(U){var he=typeof U;return!!U&&(he=="object"||he=="function")}function ad(U){return!!U&&typeof U=="object"}function vs(U){return pc(U)?Gi(U):en(U)}function ld(){return[]}function Mp(){return!1}e.exports=$r})(mg,mg.exports);var mJ=mg.exports;const mI=Ha(mJ);var _S={},gJ=ds;Object.defineProperty(_S,"__esModule",{value:!0});var gI=_S.default=void 0,vJ=gJ(fs()),yJ=y;gI=_S.default=(0,vJ.default)((0,yJ.jsx)("path",{d:"M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5m0-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"}),"RadioButtonChecked");var kS={},bJ=ds;Object.defineProperty(kS,"__esModule",{value:!0});var vI=kS.default=void 0,wJ=bJ(fs()),xJ=y;vI=kS.default=(0,wJ.default)((0,xJ.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"}),"RadioButtonUnchecked");const ES=(e,t)=>{const r=Lt.useRef(null);return dX(()=>{var n;e&&((n=r.current)==null||n.animate({backgroundColor:["initial","red","initial"],boxShadow:["0 0 0px 0px transparent","0 0 0.25em 0.25em red","0 0 0.25em 0.25em transparent"]},500))},t),r};function Ys(e,t,r){return e.sort((n,i)=>{const o=r.findIndex(a=>a===n[t]),s=r.findIndex(a=>a===i[t]);return o-s})}function vf(e,t,r,n,i,o){let s=r;return i(t)&&(s+=n?1:-1,s===o?e.forEach(a=>{!a.selected&&i(a)&&(a.disabled+=1)}):s===o-1&&r===o&&e.forEach(a=>{!(a===t||a.selected)&&i(a)&&(a.disabled+=-1)})),s}function yI(e,t,r){e.forEach(n=>{n!==t&&n.name===t.name&&(n.disabled+=r?1:-1),(n.dehcneb===t.name||n.name===t.dehcneb)&&(n.disabled+=r?1:-1)})}function bI(e,t,r,n){if(t.dehcneb){const i=e.find(o=>o.benched&&o.name===t.dehcneb);i&&n(i,r)}}function Ol({model:e,disabled:t=!1,stateDoc:r,updateCounts:n}){const[i,o]=_.useState(e.selected);_.useEffect(()=>{const l=r.get$("roster").pipe(qt(c=>c.map(u=>u.name).includes(e.id))).subscribe(c=>{o(c),c!==e.selected&&!e.benched&&n(e,c)});return()=>l==null?void 0:l.unsubscribe()},[r,e,n]);const s=ES(t,[i]);return y.jsx(Ms,{ref:s,label:e.id,control:y.jsx(Is,{size:"small",checked:i,disabled:e.disabled>0||t,onChange:a=>{const l=a.target.checked;r.incrementalModify(c=>{if(l){const u=c.roster.concat({name:e.id,health:e.hp});c.roster=u}else{const u=c.roster.filter(d=>d.name!=e.id);c.roster=u}return c}).catch(console.error)},icon:y.jsx(vI,{}),checkedIcon:y.jsx(gI,{})})})}const wI=Ee(Sz)(()=>({"& .MuiBadge-badge":{right:"2em",top:"2em"}})),fa={3:{captain:1,mascot:0,squaddies:2},4:{captain:1,mascot:1,squaddies:2},6:{captain:1,mascot:1,squaddies:4}},SR=e=>{const{guild:t,ready:r,unready:n,disabled:i=!1,style:o}=e,{setting$:s}=di(),[a,l]=_.useState(6);_.useEffect(()=>{const x=s==null?void 0:s.pipe(qt(g=>g==null?void 0:g.toJSON().data.gameSize)).subscribe(g=>l(g??6));return()=>x==null?void 0:x.unsubscribe()},[s]);const c=_.useRef({captain:0,mascot:0,squaddieCount:0}),[,u]=_.useState(0),[d,f]=_.useState(!1),p=fo(async x=>{const C=(await x.models.find().where("id").in(t.roster).exec()).map(E=>Object.assign(E.toMutableJSON(),{selected:!1,disabled:E.benched?1:0}));if(Ys(C,"id",t.roster),!i&&t.minor){const E=new Set(e.stateDoc.get("roster").map(j=>JSON.stringify(j)));C.forEach(j=>{(j.captain||j.mascot&&fa[a].mascot>0)&&(E.add(JSON.stringify({name:j.id,health:j.hp})),j.disabled=1)}),e.stateDoc.incrementalModify(j=>(j.roster=Array.from(E).map(R=>JSON.parse(R)),j)).catch(console.error)}return fa[a].mascot===0&&C.forEach(E=>{E.mascot&&(E.disabled=1)}),C},[t,a]),h=_.useCallback((x,g)=>{function C(L,A,$,F){return vf(L,A,$,F,K=>!!K.captain,fa[a].captain)}function E(L,A,$,F){return vf(L,A,$,F,K=>!!K.mascot,fa[a].mascot)}function j(L,A,$,F){return vf(L,A,$,F,K=>!(K.captain||K.mascot),fa[a].squaddies)}if(!p)return;x.selected=g;const R=C(p,x,c.current.captain,g);c.current.captain=R;const O=E(p,x,c.current.mascot,g);c.current.mascot=O;const P=j(p,x,c.current.squaddieCount,g);c.current.squaddieCount=P,yI(p,x,g),bI(p,x,g,(L,A)=>{i||(L.selected=A,e.stateDoc.incrementalModify($=>{if(A){const F=$.roster.concat({name:L.id,health:L.hp});$.roster=F}else{const F=$.roster.filter(K=>K.name!=L.id);$.roster=F}return $}))}),R===fa[a].captain&&O===fa[a].mascot&&P===fa[a].squaddies?f(!0):f(!1),u(L=>L+1)},[e.stateDoc,p,a,i]);if(_.useEffect(()=>{if(d&&p){const x=mI(p.filter(g=>g.selected));r==null||r(x)}else n==null||n()},[d,t,p,r,n]),!p)return null;const v=p.filter(x=>x.captain),k=p.filter(x=>x.mascot&&!x.captain),b=p.filter(x=>!x.captain&&!x.mascot);return y.jsx(wI,{badgeContent:d?y.jsx(HL,{color:"success"}):0,style:{overflow:"visible",...o},children:y.jsxs(LO,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr 1fr",border:"4px solid",borderColor:t.darkColor??t.color,borderRadius:"1em",padding:"1ex",width:"100%",overflow:"visible"},children:[y.jsxs("div",{style:{display:"flex",flexDirection:"column"},children:[y.jsx("span",{children:"Captains :"}),v.map(x=>y.jsx(Ol,{model:x,stateDoc:e.stateDoc,updateCounts:h,disabled:i},x.id)),y.jsx("span",{children:"Mascots :"}),k.map(x=>y.jsx(Ol,{model:x,stateDoc:e.stateDoc,updateCounts:h,disabled:i},x.id))]}),y.jsxs("div",{style:{display:"flex",flexDirection:"column"},children:[y.jsx("span",{children:"Squaddies :"}),b.slice(0,b.length/2).map(x=>y.jsx(Ol,{model:x,stateDoc:e.stateDoc,updateCounts:h,disabled:i},x.id))]}),y.jsxs("div",{style:{display:"flex",flexDirection:"column"},children:[y.jsx("span",{children:" "}),b.slice(b.length/2).map(x=>y.jsx(Ol,{model:x,stateDoc:e.stateDoc,updateCounts:h,disabled:i},x.id))]})]})})},Ph={3:{master:1,apprentice:2},4:{master:2,apprentice:2},6:{master:3,apprentice:3}},CR=e=>{const{guild:t,ready:r,unready:n,disabled:i=!1,style:o}=e,{setting$:s}=di(),[a,l]=_.useState(6);_.useEffect(()=>{const b=s==null?void 0:s.pipe(qt(x=>x==null?void 0:x.toJSON().data.gameSize)).subscribe(x=>l(x??6));return()=>b==null?void 0:b.unsubscribe()},[s]);const c=_.useRef({masterCount:0,apprenticeCount:0}),[,u]=_.useState(0),[d,f]=_.useState(!1),p=fo(async b=>{const g=(await b.models.find().where("id").in(t.roster).exec()).map(C=>Object.assign(C.toMutableJSON(),{selected:!1,disabled:C.benched?1:0}));return Ys(g,"id",t.roster),g},[t]),h=_.useCallback((b,x)=>{function g(R,O,P,L){return vf(R,O,P,L,A=>!!A.captain,Ph[a].master)}function C(R,O,P,L){return vf(R,O,P,L,A=>!A.captain,Ph[a].apprentice)}if(!p)return;b.selected=x;const E=g(p,b,c.current.masterCount,x);c.current.masterCount=E;const j=C(p,b,c.current.apprenticeCount,x);c.current.apprenticeCount=j,yI(p,b,x),bI(p,b,x,(R,O)=>{i||(R.selected=O,e.stateDoc.incrementalModify(P=>{if(O){const L=P.roster.concat({name:R.id,health:R.hp});P.roster=L}else{const L=P.roster.filter(A=>A.name!=R.id);P.roster=L}return P}))}),E===Ph[a].master&&j===Ph[a].apprentice?f(!0):f(!1),u(R=>R+1)},[e.stateDoc,p,a,i]);if(_.useEffect(()=>{if(d&&p){const b=mI(p.filter(x=>x.selected));r==null||r(b)}else n==null||n()},[d,t,p,r,n]),!p)return null;const v=p.filter(b=>b.captain),k=p.filter(b=>!b.captain);return y.jsx(wI,{badgeContent:d?y.jsx(HL,{color:"success"}):0,style:{overflow:"visible",...o},children:y.jsxs(LO,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr 1fr",border:"4px solid",borderColor:t.darkColor??t.color,borderRadius:"1em",padding:"1ex",width:"100%",overflow:"visible"},children:[y.jsxs("div",{style:{display:"flex",flexDirection:"column"},children:[y.jsx("span",{children:"Masters :"}),v.map(b=>y.jsx(Ol,{model:b,stateDoc:e.stateDoc,updateCounts:h,disabled:i},b.id))]}),y.jsxs("div",{style:{display:"flex",flexDirection:"column"},children:[y.jsx("span",{children:"Apprentices :"}),k.slice(0,k.length/2).map(b=>y.jsx(Ol,{model:b,stateDoc:e.stateDoc,updateCounts:h,disabled:i},b.id))]}),y.jsxs("div",{style:{display:"flex",flexDirection:"column"},children:[y.jsx("span",{children:" "}),k.slice(k.length/2).map(b=>y.jsx(Ol,{model:b,stateDoc:e.stateDoc,updateCounts:h,disabled:i},b.id))]})]})})};function SJ(){const{active:e}=ra();return y.jsxs(tr,{className:"DraftScreen",children:[y.jsx(ps,{children:y.jsxs(tr,{sx:{width:"100%",display:"flex",flexDirection:"row",justifyContent:"space-between"},children:[y.jsxs(Za,{separator:y.jsx(lc,{fontSize:"small"}),children:[y.jsx(Io,{color:"inherit",href:"/game",size:"small",disabled:e,children:y.jsx(wS,{})}),y.jsx(_t,{children:"Draft"})]}),y.jsxs("div",{children:[y.jsx(_J,{}),y.jsx(SS,{})]})]})}),y.jsx(CJ,{}),y.jsx(cc,{})]})}function CJ(){const{setting$:e}=di(),t=Ya(),[r,n]=_.useState(),[i,o]=_.useState(),s=_.useCallback(R=>n(R),[]),a=_.useCallback(R=>o(R),[]),l=_.useCallback(()=>n(void 0),[]),c=_.useCallback(()=>o(void 0),[]),[u,d]=_.useState();_.useEffect(()=>{const R=e==null?void 0:e.pipe(qt(O=>O==null?void 0:O.toJSON().data.gameSize)).subscribe(O=>d(O));return()=>R==null?void 0:R.unsubscribe()},[e]);const{active:f}=ra(),{gameState1$:p,gameState2$:h}=ey(),[v,k]=_.useState();_.useEffect(()=>{if(!p)return;let R=!1;return(async()=>{const P=await Gr(p);R||k(P)})(),()=>{R=!0}},[p]);const[b,x]=_.useState();_.useEffect(()=>{if(!h)return;let R=!1;return(async()=>{const P=await Gr(h);R||x(P)})(),()=>{R=!0}},[h]);const[g,C]=fo(async R=>{const O=v==null?void 0:v.guild,P=b==null?void 0:b.guild;if(!O||!P)return;const[L,A]=await Promise.all([R.guilds.findOne().where({name:O}).exec(),R.guilds.findOne().where({name:P}).exec()]);if(!L||!A){t("/game");return}return[L,A]},[v,b,t])??[];if(!g||!C||!v||!b)return null;const E=g.name==="Blacksmiths"?CR:SR,j=C.name==="Blacksmiths"?CR:SR;return y.jsxs(y.Fragment,{children:[y.jsx(E,{guild:g,stateDoc:v,ready:s,unready:l,style:{width:"100%"}},`1-${u}`),y.jsx(hI,{dest:"Game",disabled:!r||!i,onAction:()=>{v.incrementalPatch({score:0,momentum:0,roster:(r==null?void 0:r.map(R=>({name:R.id,health:R.hp})))||[]}).catch(console.error),f||b.incrementalPatch({score:0,momentum:0,roster:(i==null?void 0:i.map(R=>({name:R.id,health:R.hp})))||[]}).catch(console.error)},sx:{m:"10px"}}),y.jsx(j,{guild:C,stateDoc:b,ready:a,unready:c,style:{width:"100%"},disabled:f},`2-${u}`)]})}function _J(){const[e,t]=_.useState(null),r=!!e,n=c=>{t(c.currentTarget)},i=()=>{t(null)},{setting$:o}=di(),[s,a]=_.useState();_.useEffect(()=>{const c=o==null?void 0:o.subscribe(u=>a(u));return()=>c==null?void 0:c.unsubscribe()},[o]);const l=s==null?void 0:s.toJSON().data.gameSize;return y.jsxs(y.Fragment,{children:[y.jsx(Io,{onClick:n,color:"inherit",size:"small",sx:{backgroundColor:"primary.dark"},children:y.jsxs(_t,{children:[l,"v",l]})}),y.jsx(Nv,{anchorEl:e,open:r,onClose:i,onClick:i,children:y.jsxs(BO,{dense:!0,children:[y.jsx(xi,{selected:l===6,onClick:()=>{s==null||s.incrementalPatch({gameSize:6})},children:"6v6"}),y.jsx(xi,{selected:l===4,onClick:()=>{s==null||s.incrementalPatch({gameSize:4})},children:"4v4"}),y.jsx(xi,{selected:l===3,onClick:()=>{s==null||s.incrementalPatch({gameSize:3})},children:"3v3"})]})})]})}var RS={},kJ=ds;Object.defineProperty(RS,"__esModule",{value:!0});var gg=RS.default=void 0,EJ=kJ(fs()),RJ=y;gg=RS.default=(0,EJ.default)((0,RJ.jsx)("path",{d:"M19 13H5v-2h14z"}),"Remove");var PS={},PJ=ds;Object.defineProperty(PS,"__esModule",{value:!0});var vg=PS.default=void 0,TJ=PJ(fs()),OJ=y;vg=PS.default=(0,TJ.default)((0,OJ.jsx)("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"Add");function _R(e){jJ(e)&&e.touches.length<2&&e.preventDefault&&e.cancelable&&e.preventDefault()}function jJ(e){return e&&"touches"in e}function K1({onLongPress:e,onClick:t},{delay:r=500,shouldPreventDefault:n=!0}={}){const[i,o]=_.useState(!1),s=_.useRef(),a=_.useRef(),l=_.useCallback(u=>{u.persist();const d={...u};n&&u.target&&(u.target.addEventListener("touchend",_R,{passive:!1}),a.current=u.target),s.current=setTimeout(()=>{e(d),o(!0)},r)},[e,r,n]),c=_.useCallback((u,d=!0)=>{s.current&&clearTimeout(s.current),d&&!i&&(t==null||t(u)),o(!1),n&&a.current&&a.current.removeEventListener("touchend",_R)},[n,t,i]);return{onMouseDown:u=>l(u),onTouchStart:u=>l(u),onMouseUp:u=>c(u),onMouseLeave:u=>c(u,!1),onTouchEnd:u=>c(u),onTouchMove:u=>c(u)}}function LJ(e){const{disabled:t,object:r,label:n}=e,i=n(r),o=ES(t,[i]);return y.jsx(_t,{ref:o,sx:{width:"100%",textAlign:"center"},children:i})}function xI({object:e,label:t,value:r,setValue:n,disabled:i=!1,longPressClear:o=!1}){const s=K1({onLongPress:()=>{n(e,0)},onClick:a=>{a.stopPropagation();const l=r(e);l>0&&n(e,l-1)}});return y.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:[y.jsx(LJ,{disabled:i,object:e,label:t}),y.jsxs(qf,{size:"small",variant:"contained",disabled:i,children:[y.jsx(br,{...o?s:{},onClick:a=>{if(a.stopPropagation(),!o){const l=r(e);l>0&&n(e,l-1)}},children:y.jsx(gg,{fontSize:"inherit"})}),y.jsx(br,{onClick:a=>{a.stopPropagation();const l=r(e);n(e,l+1)},children:y.jsx(vg,{fontSize:"inherit"})})]})]})}const kR=e=>{const{model:t,disabled:r}=e,n=ES(r,[e.health]);return y.jsx(br,{ref:n,disabled:!0,size:"small",children:y.jsx(_t,{variant:"body2",color:"text.primary",children:`${String(e.health).padStart(2,"0")} / ${String(t.hp).padStart(2,"0")}`})})};function SI({state:e,model:t,disabled:r=!1,stacked:n=!1}){const i=K1({onLongPress:()=>{e.incrementalModify(u=>{const d=u.roster.findIndex(f=>f.name===t.id);return u.roster[d].health=0,u})},onClick:()=>{e.incrementalModify(u=>{const d=u.roster.findIndex(f=>f.name===t.id);return u.roster[d].health>0&&(u.roster[d].health-=1),u})}}),o=K1({onLongPress:()=>{e.incrementalModify(u=>{const d=u.roster.findIndex(f=>f.name===t.id);return u.roster[d].health{e.incrementalModify(u=>{const d=u.roster.findIndex(f=>f.name===t.id);return u.roster[d].healthu.name===t.id),a=_.useMemo(()=>e.get$("roster").pipe(qt(u=>u[s].health)),[e,s]),[l,c]=_.useState(t.hp);return _.useEffect(()=>{const u=a.subscribe(d=>c(d));return()=>u.unsubscribe()},[a]),y.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:n?y.jsxs(y.Fragment,{children:[y.jsx(kR,{health:l,model:t,disabled:r}),y.jsxs(qf,{size:"small",variant:"contained",disabled:r,sx:{"& .MuiButtonGroup-grouped":{minWidth:"1rem"}},children:[y.jsx(br,{...i,onClick:u=>u.stopPropagation(),children:y.jsx(gg,{fontSize:"inherit",sx:{pointerEvents:"none"}})}),y.jsx(br,{...o,onClick:u=>u.stopPropagation(),children:y.jsx(vg,{fontSize:"inherit",sx:{pointerEvents:"none"}})})]})]}):y.jsxs(qf,{size:"small",variant:"contained",disabled:r,children:[y.jsx(br,{...i,onClick:u=>u.stopPropagation(),children:y.jsx(gg,{fontSize:"inherit",sx:{pointerEvents:"none"}})}),y.jsx(kR,{health:l,model:t,disabled:r}),y.jsx(br,{...o,onClick:u=>u.stopPropagation(),children:y.jsx(vg,{fontSize:"inherit",sx:{pointerEvents:"none"}})})]})})}function IJ(e){const t=e.state,[r,n]=_.useState(0);return _.useEffect(()=>{const i=t.get$("score").subscribe(o=>n(o));return()=>i.unsubscribe()},[t]),y.jsx(xI,{object:t,disabled:e.disabled,label:()=>`VP: ${r}`,value:()=>r,setValue:(i,o)=>{i.incrementalModify(s=>(s.score=o,s))}})}function MJ(e){const t=e.state,[r,n]=_.useState(0);return _.useEffect(()=>{const i=t.get$("momentum").subscribe(o=>n(o));return()=>i.unsubscribe()},[t]),y.jsx(xI,{object:t,disabled:e.disabled,longPressClear:!0,label:()=>`MOM: ${r}`,value:()=>r,setValue:(i,o)=>{i.incrementalModify(s=>(s.momentum=o,s))}})}function AJ({teams:e,rosters:t,expanded:r,onClick:n,disabled:i}){const o=qn(),{setting$:s}=di(),[a,l]=_.useState();_.useEffect(()=>{const u=s==null?void 0:s.pipe(qt(d=>d==null?void 0:d.toJSON().data.uiPreferences.displayStatLine)).subscribe(d=>l(d));return()=>u==null?void 0:u.unsubscribe()});const c=e.reduce((u,d,f)=>[...u,u[f]+d.roster.length+1],[0]);return y.jsx(tr,{sx:{flexGrow:0,overflow:"auto"},children:e.map((u,d)=>{const f=c[d]+1;return y.jsxs(g6,{expanded:r===!0,square:!0,sx:{backgroundColor:"transparent"},disableGutters:!0,elevation:0,children:[y.jsx(E6,{sx:{position:"sticky",top:0,zIndex:1,padding:0,borderBottom:`1px solid ${o.palette.divider}`,".MuiAccordionSummary-content":{margin:0}},children:y.jsxs(u1,{onClick:()=>{n(f-1,!r)},sx:{width:"100%",display:"flex",flexDirection:"row"},children:[y.jsx(c9,{sx:{alignItems:"center"},children:y.jsx("div",{style:{fontSize:36,width:"1em",height:"1em",overflow:"visible",display:"flex",alignItems:"center",justifyContent:"center"},children:y.jsx(Ai,{icon:u.guild,style:{color:o.palette.text.secondary,filter:"unset",flexShrink:0}})})}),y.jsx(Cs,{primary:u.guild,secondary:`${t[d].reduce((p,h)=>p+(h._inf??h.inf),0)} INF`}),y.jsxs("div",{style:{display:"flex",flexDirection:"row",gap:"4px"},children:[y.jsx(IJ,{state:u,disabled:i[d]}),y.jsx(MJ,{state:u,disabled:i[d]})]})]})}),y.jsx(w6,{sx:{padding:0},children:y.jsx(sf,{disablePadding:!0,sx:{"li:nth-of-type(odd)":{"&.MuiListItem-root":{backgroundColor:"rgba(100%, 100%, 100%, 5%)"}}},children:t[d].map((p,h)=>y.jsx(vo,{secondaryAction:y.jsx(SI,{state:u,model:p,disabled:i[d]}),onClick:()=>{n(f+h,!1)},children:y.jsx(Cs,{primary:p.id,secondary:a?p.statLine:null})},p.id))},d)})]},d)})})}const Mn=new URL("/assets/GB-S4-Alchemists-20-03-01-CtoJr-2q.jpg",import.meta.url).href,An=new URL("/assets/GB-S4-Blacksmiths-20-03-03-BcPp4ACy.jpg",import.meta.url).href,Nn=new URL("/assets/GB-S4-Brewers-20-03-03-BTowl5yC.jpg",import.meta.url).href,Dn=new URL("/assets/GB-S4-Butchers-19-08-03-B1bjdh3r.jpg",import.meta.url).href,Pc=new URL("/assets/GB-S4-Cooks-19-08-03-Du8Wgf95.jpg",import.meta.url).href,Zn=new URL("/assets/GB-S4-Engineers-20-03-03-CaTM1yPN.jpg",import.meta.url).href,Tc=new URL("/assets/GB-S4-Falconers-20-03-03--r8Ylt5C.jpg",import.meta.url).href,Bn=new URL("/assets/GB-S4-Farmers-19-12-03-D9S_zy2g.jpg",import.meta.url).href,$n=new URL("/assets/GB-S4-Fishermen-19-08-03-HE2w3ci9.jpg",import.meta.url).href,Fn=new URL("/assets/GB-S4-Hunters-19-08-03-C59ee243.jpg",import.meta.url).href,zn=new URL("/assets/GB-S4-Masons-19-08-01-B2F-qHyR.jpg",import.meta.url).href,Oc=new URL("/assets/GB-S4-Miners-20-03-03-Bvr7X2VN.jpg",import.meta.url).href,Sn=new URL("/assets/GB-S4-Morticians-19-08-03-BEjT_hxM.jpg",import.meta.url).href,jc=new URL("/assets/GB-S4-Navigators-20-03-03-DuY0bj8b.jpg",import.meta.url).href,pa=new URL("/assets/Order_back-qsepM33g.jpg",import.meta.url).href,Lc=new URL("/assets/GB-S4-Ratcatchers-19-08-03-vf5l_pcD.jpg",import.meta.url).href,pl=new URL("/assets/GB-S4-Shepherds-20-03-03-CJ-GnLek.jpg",import.meta.url).href,ei=new URL("/assets/GB-S4-Union-20-03-03-ByRX6Zf6.jpg",import.meta.url).href,Ic=new URL("/assets/lamps_back_blank-DaxPd_Oo.jpg",import.meta.url).href,cr=new Map([["Alchemists_back",new URL("/assets/GB-S4-Alchemists-19-02-01-VIy3CwEn.jpg",import.meta.url).href],["Alchemists_front",new URL("/assets/GB-S4-Alchemists-19-02-02-Dar2t4NY.jpg",import.meta.url).href],["Midas_back",Mn],["Midas_front",new URL("/assets/GB-S4-Alchemists-20-03-02-DlAuCMzg.jpg",import.meta.url).href],["Smoke_back",Mn],["Smoke_front",new URL("/assets/GB-S4-Alchemists-20-03-04-RC1YiQbH.jpg",import.meta.url).href],["Soma_back",Mn],["Soma_front",new URL("/assets/GB-S4-Alchemists-20-03-06-CUxY-HyS.jpg",import.meta.url).href],["Pneuma_back",Mn],["Pneuma_front",new URL("/assets/GB-S4-Alchemists-20-03-08-B418Rr1J.jpg",import.meta.url).href],["Flask_back",Mn],["Flask_front",new URL("/assets/GB-S4-Alchemists-20-03-10-DOhnGqkn.jpg",import.meta.url).href],["Naja_back",Mn],["Naja_front",new URL("/assets/GB-S4-Alchemists-20-03-12-BZlwYyu9.jpg",import.meta.url).href],["Calculus_back",Mn],["Calculus_front",new URL("/assets/GB-S4-Alchemists-20-03-14-DH-K3Y_5.jpg",import.meta.url).href],["vCalculus_back",Mn],["vCalculus_front",new URL("/assets/GB-S4-Alchemists-20-03-16-Z1UPpUIk.jpg",import.meta.url).href],["Crucible_back",Mn],["Crucible_front",new URL("/assets/GB-S4-Alchemists-20-03-18-DwfTDp0o.jpg",import.meta.url).href],["Kami_back",Mn],["Kami_front",new URL("/assets/GB-S4-Alchemists-20-03-20-BFV6XWzl.jpg",import.meta.url).href],["Katalyst_back",Mn],["Katalyst_front",new URL("/assets/GB-S4-Alchemists-20-03-22-G1PlavA6.jpg",import.meta.url).href],["vKatalyst_back",Mn],["vKatalyst_front",new URL("/assets/GB-S4-Alchemists-20-03-24-CDYCDkSX.jpg",import.meta.url).href],["Mercury_back",Mn],["Mercury_front",new URL("/assets/GB-S4-Alchemists-20-03-26-C9xO9eF2.jpg",import.meta.url).href],["Venin_back",Mn],["Venin_front",new URL("/assets/GB-S4-Alchemists-20-03-28-4ME06k6U.jpg",import.meta.url).href],["Vitriol_back",Mn],["Vitriol_front",new URL("/assets/GB-S4-Alchemists-20-03-30-DjbTACjD.jpg",import.meta.url).href],["Compound_back",new URL("/assets/GB-S4-Alchemists-20-03-31-BTog_cbt.jpg",import.meta.url).href],["Compound_front",new URL("/assets/GB-S4-Alchemists-20-03-32-Dui0dDSy.jpg",import.meta.url).href],["Blacksmiths_back",new URL("/assets/GB-S4-Blacksmiths-20-03-01-C1aHp8XU.jpg",import.meta.url).href],["Blacksmiths_front",new URL("/assets/GB-S4-Blacksmiths-20-03-02-Buw0Sd4K.jpg",import.meta.url).href],["Anvil_back",An],["Anvil_front",new URL("/assets/GB-S4-Blacksmiths-20-03-04-Iz-ZAoRD.jpg",import.meta.url).href],["Burnish_back",An],["Burnish_front",new URL("/assets/GB-S4-Blacksmiths-20-03-06-CpyRLS4Z.jpg",import.meta.url).href],["Culverin_back",An],["Culverin_front",new URL("/assets/GB-S4-Blacksmiths-20-03-08-Dom1S1qD.jpg",import.meta.url).href],["Farris_back",An],["Farris_front",new URL("/assets/GB-S4-Blacksmiths-20-03-10-BPOmIv4i.jpg",import.meta.url).href],["Ferrite_back",An],["Ferrite_front",new URL("/assets/GB-S4-Blacksmiths-20-03-12-C70-F9-G.jpg",import.meta.url).href],["Furnace_back",An],["Furnace_front",new URL("/assets/GB-S4-Blacksmiths-20-03-14-BYsCG64l.jpg",import.meta.url).href],["Hearth_back",An],["Hearth_front",new URL("/assets/GB-S4-Blacksmiths-20-03-16-BFmp7dwI.jpg",import.meta.url).href],["Alloy_back",An],["Alloy_front",new URL("/assets/GB-S4-Blacksmiths-20-03-18-lzumGd1B.jpg",import.meta.url).href],["Bolt_back",An],["Bolt_front",new URL("/assets/GB-S4-Blacksmiths-20-03-20-DH8KkvFf.jpg",import.meta.url).href],["Cast_back",An],["Cast_front",new URL("/assets/GB-S4-Blacksmiths-20-03-22-CRMXvmQD.jpg",import.meta.url).href],["Cinder_back",An],["Cinder_front",new URL("/assets/GB-S4-Blacksmiths-20-03-24-B0upn8X7.jpg",import.meta.url).href],["vCinder_back",An],["vCinder_front",new URL("/assets/GB-S4-Blacksmiths-20-03-26-BZAHT1q6.jpg",import.meta.url).href],["Cutlass_back",An],["Cutlass_front",new URL("/assets/GB-S4-Blacksmiths-20-03-28-IdVWYe8z.jpg",import.meta.url).href],["Iron_back",An],["Iron_front",new URL("/assets/GB-S4-Blacksmiths-20-03-30-zou6Flgi.jpg",import.meta.url).href],["Sledge_back",An],["Sledge_front",new URL("/assets/GB-S4-Blacksmiths-20-03-32-DJ0MEQk3.jpg",import.meta.url).href],["Brewers_back",new URL("/assets/GB-S4-Brewers-20-03-01-_bnlGcvZ.jpg",import.meta.url).href],["Brewers_front",new URL("/assets/GB-S4-Brewers-20-03-02-Af5aErRU.jpg",import.meta.url).href],["Tapper_back",Nn],["Tapper_front",new URL("/assets/GB-S4-Brewers-20-03-04-CiBahMdS.jpg",import.meta.url).href],["Esters_back",Nn],["Esters_front",new URL("/assets/GB-S4-Brewers-20-03-06-BAckyHQm.jpg",import.meta.url).href],["Corker_back",Nn],["Corker_front",new URL("/assets/GB-S4-Brewers-20-03-08-C1SVs0jC.jpg",import.meta.url).href],["Scum_back",Nn],["Scum_front",new URL("/assets/GB-S4-Brewers-20-03-10-dNR_AKj3.jpg",import.meta.url).href],["Quaff_back",Nn],["Quaff_front",new URL("/assets/GB-S4-Brewers-20-03-12-Bzzw5t7M.jpg",import.meta.url).href],["vDecimate_back",Nn],["vDecimate_front",new URL("/assets/GB-S4-Brewers-20-03-14-DUDxJnnr.jpg",import.meta.url).href],["Flea_back",Nn],["Flea_front",new URL("/assets/GB-S4-Brewers-20-03-16-hLIfeAvT.jpg",import.meta.url).href],["Friday_back",Nn],["Friday_front",new URL("/assets/GB-S4-Brewers-20-03-18-193xjOU7.jpg",import.meta.url).href],["Hooper_back",Nn],["Hooper_front",new URL("/assets/GB-S4-Brewers-20-03-20-ht0AqR_9.jpg",import.meta.url).href],["Mash_back",Nn],["Mash_front",new URL("/assets/GB-S4-Brewers-20-03-22-DB3lWhaZ.jpg",import.meta.url).href],["Pintpot_back",Nn],["Pintpot_front",new URL("/assets/GB-S4-Brewers-20-03-24-BDXctZyF.jpg",import.meta.url).href],["Spigot_back",Nn],["Spigot_front",new URL("/assets/GB-S4-Brewers-20-03-26-CJ3ohfD8.jpg",import.meta.url).href],["vSpigot_back",Nn],["vSpigot_front",new URL("/assets/GB-S4-Brewers-20-03-28-D_Y6ChH0.jpg",import.meta.url).href],["Stave_back",Nn],["Stave_front",new URL("/assets/GB-S4-Brewers-20-03-30-C7ofvQL3.jpg",import.meta.url).href],["Stoker_back",Nn],["Stoker_front",new URL("/assets/GB-S4-Brewers-20-03-32-Cps3196a.jpg",import.meta.url).href],["Lucky_back",new URL("/assets/GB-S4-Brewers-20-03-33-zps3y-hi.jpg",import.meta.url).href],["Lucky_front",new URL("/assets/GB-S4-Brewers-20-03-34-CdaFu_Sd.jpg",import.meta.url).href],["Butchers_back",new URL("/assets/GB-S4-Butchers-19-08-01-CLWIlX8T.jpg",import.meta.url).href],["Butchers_front",new URL("/assets/GB-S4-Butchers-19-08-02-CFlOzX_b.jpg",import.meta.url).href],["Ox_back",Dn],["Ox_front",new URL("/assets/GB-S4-Butchers-19-08-04-CR3Vo0aB.jpg",import.meta.url).href],["Fillet_back",Dn],["Fillet_front",new URL("/assets/GB-S4-Butchers-19-08-06-BpDXV7JC.jpg",import.meta.url).href],["vBoar_back",Dn],["vBoar_front",new URL("/assets/GB-S4-Butchers-19-08-08-BPo-9yTd.jpg",import.meta.url).href],["Princess_back",Dn],["Princess_front",new URL("/assets/GB-S4-Butchers-19-08-10-phxnKqrp.jpg",import.meta.url).href],["Truffles_back",Dn],["Truffles_front",new URL("/assets/GB-S4-Butchers-19-08-12-B2WDg1Js.jpg",import.meta.url).href],["Boar_back",Dn],["Boar_front",new URL("/assets/GB-S4-Butchers-19-08-14-DXWG8I2n.jpg",import.meta.url).href],["Boiler_back",Dn],["Boiler_front",new URL("/assets/GB-S4-Butchers-19-08-16-BjHesLe2.jpg",import.meta.url).href],["Brisket_back",Dn],["Brisket_front",new URL("/assets/GB-S4-Butchers-19-08-18-6v1o2Ifu.jpg",import.meta.url).href],["vBrisket_back",Dn],["vBrisket_front",new URL("/assets/GB-S4-Butchers-19-08-20-BKaya9dR.jpg",import.meta.url).href],["vGutter_back",Dn],["vGutter_front",new URL("/assets/GB-S4-Butchers-19-08-22-D37jjOEk.jpg",import.meta.url).href],["Layne_back",Dn],["Layne_front",new URL("/assets/GB-S4-Butchers-19-08-24-DUuL1aM2.jpg",import.meta.url).href],["Meathook_back",Dn],["Meathook_front",new URL("/assets/GB-S4-Butchers-19-08-26-DOTJBjq_.jpg",import.meta.url).href],["vOx_back",Dn],["vOx_front",new URL("/assets/GB-S4-Butchers-19-08-28-M6NS1cc0.jpg",import.meta.url).href],["Shank_back",Dn],["Shank_front",new URL("/assets/GB-S4-Butchers-19-08-30-CZTx6gLx.jpg",import.meta.url).href],["Tenderiser_back",Dn],["Tenderiser_front",new URL("/assets/GB-S4-Butchers-19-08-32-CDETLFF4.jpg",import.meta.url).href],["Cooks_back",new URL("/assets/GB-S4-Cooks-19-08-01-B_Vd1DVn.jpg",import.meta.url).href],["Cooks_front",new URL("/assets/GB-S4-Cooks-19-08-02-BCRzyOhW.jpg",import.meta.url).href],["Wellington_back",Pc],["Wellington_front",new URL("/assets/GB-S4-Cooks-19-08-04-7QP0IEzl.jpg",import.meta.url).href],["Pepper_back",Pc],["Pepper_front",new URL("/assets/GB-S4-Cooks-19-08-06-D5h9IUWD.jpg",import.meta.url).href],["Cinnamon_back",Pc],["Cinnamon_front",new URL("/assets/GB-S4-Cooks-19-08-08-B27LuxRF.jpg",import.meta.url).href],["Roast_back",Pc],["Roast_front",new URL("/assets/GB-S4-Cooks-19-08-10-BjEFjR2p.jpg",import.meta.url).href],["Spice_back",Pc],["Spice_front",new URL("/assets/GB-S4-Cooks-19-08-12-DfumUS4Q.jpg",import.meta.url).href],["Sugar_back",Pc],["Sugar_front",new URL("/assets/GB-S4-Cooks-19-08-14-2NKQVsMs.jpg",import.meta.url).href],["Engineers_back",new URL("/assets/GB-S4-Engineers-20-03-01-Di9u3X0x.jpg",import.meta.url).href],["Engineers_front",new URL("/assets/GB-S4-Engineers-20-03-02-Cy2lNFLR.jpg",import.meta.url).href],["Ballista_back",Zn],["Ballista_front",new URL("/assets/GB-S4-Engineers-20-03-04-BNwvka_y.jpg",import.meta.url).href],["PinVice_back",Zn],["PinVice_front",new URL("/assets/GB-S4-Engineers-20-03-06-rU0szJ96.jpg",import.meta.url).href],["Rivet_back",Zn],["Rivet_front",new URL("/assets/GB-S4-Engineers-20-03-08-BhZW5K7b.jpg",import.meta.url).href],["Mainspring_back",Zn],["Mainspring_front",new URL("/assets/GB-S4-Engineers-20-03-10-jYeXRRJi.jpg",import.meta.url).href],["Mother_back",Zn],["Mother_front",new URL("/assets/GB-S4-Engineers-20-03-12-5N9um0rG.jpg",import.meta.url).href],["Colossus_back",Zn],["Colossus_front",new URL("/assets/GB-S4-Engineers-20-03-14-B6x6JfxM.jpg",import.meta.url).href],["vHarriet_back",Zn],["vHarriet_front",new URL("/assets/GB-S4-Engineers-20-03-16-Cc9F_94D.jpg",import.meta.url).href],["Hoist_back",Zn],["Hoist_front",new URL("/assets/GB-S4-Engineers-20-03-18-C04RNSHr.jpg",import.meta.url).href],["Locus_back",Zn],["Locus_front",new URL("/assets/GB-S4-Engineers-20-03-20-r4vOyU-R.jpg",import.meta.url).href],["Nomad_back",Zn],["Nomad_front",new URL("/assets/GB-S4-Engineers-20-03-22-DHXCY4Wl.jpg",import.meta.url).href],["Ratchet_back",Zn],["Ratchet_front",new URL("/assets/GB-S4-Engineers-20-03-24-D6hQxrzH.jpg",import.meta.url).href],["Salvo_back",Zn],["Salvo_front",new URL("/assets/GB-S4-Engineers-20-03-26-C5iXMvZr.jpg",import.meta.url).href],["Velocity_back",Zn],["Velocity_front",new URL("/assets/GB-S4-Engineers-20-03-28-7uzZCmXc.jpg",import.meta.url).href],["vVelocity_back",Zn],["vVelocity_front",new URL("/assets/GB-S4-Engineers-20-03-30-bp8c3Uf4.jpg",import.meta.url).href],["Falconers_back",new URL("/assets/GB-S4-Falconers-20-03-01-DAO812Wl.jpg",import.meta.url).href],["Falconers_front",new URL("/assets/GB-S4-Falconers-20-03-02-C_ro4zOy.jpg",import.meta.url).href],["Devana_back",Tc],["Devana_front",new URL("/assets/GB-S4-Falconers-20-03-04-CT6BXXd-.jpg",import.meta.url).href],["Frelsi_back",Tc],["Frelsi_front",new URL("/assets/GB-S4-Falconers-20-03-06-agDql6N2.jpg",import.meta.url).href],["Ikaros_back",Tc],["Ikaros_front",new URL("/assets/GB-S4-Falconers-20-03-08-CyRw5rwh.jpg",import.meta.url).href],["Mataagi_back",Tc],["Mataagi_front",new URL("/assets/GB-S4-Falconers-20-03-10-1hF5DgY6.jpg",import.meta.url).href],["Minerva_back",Tc],["Minerva_front",new URL("/assets/GB-S4-Falconers-20-03-12-CZORpUuZ.jpg",import.meta.url).href],["Rundaas_back",Tc],["Rundaas_front",new URL("/assets/GB-S4-Falconers-20-03-14-D7WFZjKa.jpg",import.meta.url).href],["Farmers_back",new URL("/assets/GB-S4-Farmers-19-12-01-LmV2xFUn.jpg",import.meta.url).href],["Farmers_front",new URL("/assets/GB-S4-Farmers-19-12-02-COLOFnlA.jpg",import.meta.url).href],["Grange_back",Bn],["Grange_front",new URL("/assets/GB-S4-Farmers-19-12-04-D5V7RGAr.jpg",import.meta.url).href],["Thresher_back",Bn],["Thresher_front",new URL("/assets/GB-S4-Farmers-19-12-06-CvC6mrxK.jpg",import.meta.url).href],["Festival_back",Bn],["Festival_front",new URL("/assets/GB-S4-Farmers-19-12-08-Bu2e9Uzp.jpg",import.meta.url).href],["Peck_back",Bn],["Peck_front",new URL("/assets/GB-S4-Farmers-19-12-10-BVRVj083.jpg",import.meta.url).href],["Buckwheat_back",Bn],["Buckwheat_front",new URL("/assets/GB-S4-Farmers-19-12-12-17j3-pGL.jpg",import.meta.url).href],["Amber_back",Bn],["Amber_front",new URL("/assets/GB-S4-Farmers-19-12-14-D9QbUDBe.jpg",import.meta.url).href],["Bushel_back",Bn],["Bushel_front",new URL("/assets/GB-S4-Farmers-19-12-16-Bi5uXUCL.jpg",import.meta.url).href],["Fallow_back",Bn],["Fallow_front",new URL("/assets/GB-S4-Farmers-19-12-18-CYzbOhRU.jpg",import.meta.url).href],["Harrow_back",Bn],["Harrow_front",new URL("/assets/GB-S4-Farmers-19-12-20-CfkO1wFr.jpg",import.meta.url).href],["vHonour_back",Bn],["vHonour_front",new URL("/assets/GB-S4-Farmers-19-12-22-lG9W92aw.jpg",import.meta.url).href],["Jackstraw_back",Bn],["Jackstraw_front",new URL("/assets/GB-S4-Farmers-19-12-24-BWbiceSz.jpg",import.meta.url).href],["Millstone_back",Bn],["Millstone_front",new URL("/assets/GB-S4-Farmers-19-12-26-Cfuo1fZi.jpg",import.meta.url).href],["Ploughman_back",Bn],["Ploughman_front",new URL("/assets/GB-S4-Farmers-19-12-28-C3SMHxWd.jpg",import.meta.url).href],["Tater_back",Bn],["Tater_front",new URL("/assets/GB-S4-Farmers-19-12-30-C3nUj6AE.jpg",import.meta.url).href],["Windle_back",Bn],["Windle_front",new URL("/assets/GB-S4-Farmers-19-12-32-DfwzxWCr.jpg",import.meta.url).href],["Fishermen_back",new URL("/assets/GB-S4-Fishermen-19-08-01-D54clbHu.jpg",import.meta.url).href],["Fishermen_front",new URL("/assets/GB-S4-Fishermen-19-08-02-D_xvByJF.jpg",import.meta.url).href],["Shark_back",$n],["Shark_front",new URL("/assets/GB-S4-Fishermen-19-08-04-BfW77V1Z.jpg",import.meta.url).href],["Corsair_back",$n],["Corsair_front",new URL("/assets/GB-S4-Fishermen-19-08-06-BDyxN849.jpg",import.meta.url).href],["Yukai_back",$n],["Yukai_front",new URL("/assets/GB-S4-Fishermen-19-08-08-omES11k4.jpg",import.meta.url).href],["Salt_back",$n],["Salt_front",new URL("/assets/GB-S4-Fishermen-19-08-10-BEY4i-qQ.jpg",import.meta.url).href],["Tentacles_back",$n],["Tentacles_front",new URL("/assets/GB-S4-Fishermen-19-08-12-Dv7v3MeD.jpg",import.meta.url).href],["Angel_back",$n],["Angel_front",new URL("/assets/GB-S4-Fishermen-19-08-14-DuPQrXbP.jpg",import.meta.url).href],["Greyscales_back",$n],["Greyscales_front",new URL("/assets/GB-S4-Fishermen-19-08-16-DLLLRVAB.jpg",import.meta.url).href],["Hag_back",$n],["Hag_front",new URL("/assets/GB-S4-Fishermen-19-08-18-CaaIkPD9.jpg",import.meta.url).href],["Jac_back",$n],["Jac_front",new URL("/assets/GB-S4-Fishermen-19-08-20-DZM3Jz28.jpg",import.meta.url).href],["Knuckles_back",$n],["Knuckles_front",new URL("/assets/GB-S4-Fishermen-19-08-22-Dici-53D.jpg",import.meta.url).href],["Kraken_back",$n],["Kraken_front",new URL("/assets/GB-S4-Fishermen-19-08-24-DJyMosKX.jpg",import.meta.url).href],["Sakana_back",$n],["Sakana_front",new URL("/assets/GB-S4-Fishermen-19-08-26-DgZQkJwc.jpg",import.meta.url).href],["vSakana_back",$n],["vSakana_front",new URL("/assets/GB-S4-Fishermen-19-08-28-Bq-GSM8T.jpg",import.meta.url).href],["Siren_back",$n],["Siren_front",new URL("/assets/GB-S4-Fishermen-19-08-30-BsuCsQld.jpg",import.meta.url).href],["vSiren_back",$n],["vSiren_front",new URL("/assets/GB-S4-Fishermen-19-08-32-Co1is7SR.jpg",import.meta.url).href],["Hunters_back",new URL("/assets/GB-S4-Hunters-19-08-01-CmDbpORb.jpg",import.meta.url).href],["Hunters_front",new URL("/assets/GB-S4-Hunters-19-08-02-DP64V92U.jpg",import.meta.url).href],["Theron_back",Fn],["Theron_front",new URL("/assets/GB-S4-Hunters-19-08-04-43bh7Xjn.jpg",import.meta.url).href],["Skatha_back",Fn],["Skatha_front",new URL("/assets/GB-S4-Hunters-19-08-06-DvcQNJi9.jpg",import.meta.url).href],["Steeljaw_back",Fn],["Steeljaw_front",new URL("/assets/GB-S4-Hunters-19-08-08-G2iJeyB7.jpg",import.meta.url).href],["Fahad_back",Fn],["Fahad_front",new URL("/assets/GB-S4-Hunters-19-08-10-DXc2S5UR.jpg",import.meta.url).href],["Snow_back",Fn],["Snow_front",new URL("/assets/GB-S4-Hunters-19-08-12-Bi7nnTZE.jpg",import.meta.url).href],["Chaska_back",Fn],["Chaska_front",new URL("/assets/GB-S4-Hunters-19-08-14-COEjmcNE.jpg",import.meta.url).href],["Edge_back",Fn],["Edge_front",new URL("/assets/GB-S4-Hunters-19-08-16-D8BrrZ7W.jpg",import.meta.url).href],["Egret_back",Fn],["Egret_front",new URL("/assets/GB-S4-Hunters-19-08-18-m8dNYpqE.jpg",import.meta.url).href],["Hearne_back",Fn],["Hearne_front",new URL("/assets/GB-S4-Hunters-19-08-20-B0_n3uev.jpg",import.meta.url).href],["vHearne_back",Fn],["vHearne_front",new URL("/assets/GB-S4-Hunters-19-08-22-DnBgH8it.jpg",import.meta.url).href],["Jaecar_back",Fn],["Jaecar_front",new URL("/assets/GB-S4-Hunters-19-08-24-Btt4JIV9.jpg",import.meta.url).href],["vMinx_back",Fn],["vMinx_front",new URL("/assets/GB-S4-Hunters-19-08-26-ChOKS1SV.jpg",import.meta.url).href],["Seenah_back",Fn],["Seenah_front",new URL("/assets/GB-S4-Hunters-19-08-28-HxO921jJ.jpg",import.meta.url).href],["Ulfr_back",Fn],["Ulfr_front",new URL("/assets/GB-S4-Hunters-19-08-30-Dg6ELcLG.jpg",import.meta.url).href],["Zarola_back",Fn],["Zarola_front",new URL("/assets/GB-S4-Hunters-19-08-32-CjwZbZPz.jpg",import.meta.url).href],["Masons_back",new URL("/assets/GB-S4-Masons-19-03-01-CU2vGuj1.jpg",import.meta.url).href],["Masons_front",new URL("/assets/GB-S4-Masons-19-03-02-BT75CHhK.jpg",import.meta.url).href],["Honour_back",zn],["Honour_front",new URL("/assets/GB-S4-Masons-19-08-02-CDe3UOmk.jpg",import.meta.url).href],["Hammer_back",zn],["Hammer_front",new URL("/assets/GB-S4-Masons-19-08-04-KDNoOwoa.jpg",import.meta.url).href],["Corbelli_back",zn],["Corbelli_front",new URL("/assets/GB-S4-Masons-19-08-06-BPou1o3y.jpg",import.meta.url).href],["Marbles_back",zn],["Marbles_front",new URL("/assets/GB-S4-Masons-19-08-08-CxUr3wcQ.jpg",import.meta.url).href],["Wrecker_back",zn],["Wrecker_front",new URL("/assets/GB-S4-Masons-19-08-10-B-NC6pQE.jpg",import.meta.url).href],["Brick_back",zn],["Brick_front",new URL("/assets/GB-S4-Masons-19-08-12-BLKQpjuR.jpg",import.meta.url).href],["Champ_back",zn],["Champ_front",new URL("/assets/GB-S4-Masons-19-08-14-DYH-t6AE.jpg",import.meta.url).href],["Chisel_back",zn],["Chisel_front",new URL("/assets/GB-S4-Masons-19-08-16-D4IFawmu.jpg",import.meta.url).href],["vChisel_back",zn],["vChisel_front",new URL("/assets/GB-S4-Masons-19-08-18-CCBausup.jpg",import.meta.url).href],["Flint_back",zn],["Flint_front",new URL("/assets/GB-S4-Masons-19-08-20-ocIpAO8E.jpg",import.meta.url).href],["Granite_back",zn],["Granite_front",new URL("/assets/GB-S4-Masons-19-08-22-C5KnttI8.jpg",import.meta.url).href],["Harmony_back",zn],["Harmony_front",new URL("/assets/GB-S4-Masons-19-08-24-C_8aIC6i.jpg",import.meta.url).href],["vHarmony_back",zn],["vHarmony_front",new URL("/assets/GB-S4-Masons-19-08-26-DfJ6EfYF.jpg",import.meta.url).href],["Mallet_back",zn],["Mallet_front",new URL("/assets/GB-S4-Masons-19-08-28-B7QBbKlK.jpg",import.meta.url).href],["Tower_back",zn],["Tower_front",new URL("/assets/GB-S4-Masons-19-08-30-6kjit4Y9.jpg",import.meta.url).href],["Miners_back",new URL("/assets/GB-S4-Miners-20-03-01-D4YSyCEa.jpg",import.meta.url).href],["Miners_front",new URL("/assets/GB-S4-Miners-20-03-02-osGRf8x4.jpg",import.meta.url).href],["Shaft_back",Oc],["Shaft_front",new URL("/assets/GB-S4-Miners-20-03-04-BUt1D44u.jpg",import.meta.url).href],["Digger_back",Oc],["Digger_front",new URL("/assets/GB-S4-Miners-20-03-06-CWDJNfx1.jpg",import.meta.url).href],["Fissure_back",Oc],["Fissure_front",new URL("/assets/GB-S4-Miners-20-03-08-Dsrwpy5l.jpg",import.meta.url).href],["Fuse_back",Oc],["Fuse_front",new URL("/assets/GB-S4-Miners-20-03-10-BFt8Saso.jpg",import.meta.url).href],["Mule_back",Oc],["Mule_front",new URL("/assets/GB-S4-Miners-20-03-12-D1QsxSt_.jpg",import.meta.url).href],["Spade_back",Oc],["Spade_front",new URL("/assets/GB-S4-Miners-20-03-14-OmIZrrCX.jpg",import.meta.url).href],["Morticians_back",new URL("/assets/GB-S4-Morticians-19-08-01-DIFD5DK0.jpg",import.meta.url).href],["Morticians_front",new URL("/assets/GB-S4-Morticians-19-08-02-BIp1_EUg.jpg",import.meta.url).href],["Obulus_back",Sn],["Obulus_front",new URL("/assets/GB-S4-Morticians-19-08-04-CehnRTZZ.jpg",import.meta.url).href],["Scalpel_back",Sn],["Scalpel_front",new URL("/assets/GB-S4-Morticians-19-08-06-B-414ifs.jpg",import.meta.url).href],["Mourn_back",Sn],["Mourn_front",new URL("/assets/GB-S4-Morticians-19-08-08--61yL9Bw.jpg",import.meta.url).href],["Dirge_back",Sn],["Dirge_front",new URL("/assets/GB-S4-Morticians-19-08-10-t5GLRNs2.jpg",import.meta.url).href],["Vileswarm_back",Sn],["Vileswarm_front",new URL("/assets/GB-S4-Morticians-19-08-12-mWeeXBnS.jpg",import.meta.url).href],["Bonesaw_back",Sn],["Bonesaw_front",new URL("/assets/GB-S4-Morticians-19-08-14-DYB6-CC7.jpg",import.meta.url).href],["Brainpan_back",Sn],["Brainpan_front",new URL("/assets/GB-S4-Morticians-19-08-16-DWJHVhQR.jpg",import.meta.url).href],["Memory_back",Sn],["Memory_front",new URL("/assets/GB-S4-Morticians-19-08-18-CCUOST9Q.jpg",import.meta.url).href],["Casket_back",Sn],["Casket_front",new URL("/assets/GB-S4-Morticians-19-08-20-C22KtbCr.jpg",import.meta.url).href],["Cosset_back",Sn],["Cosset_front",new URL("/assets/GB-S4-Morticians-19-08-22-urTSkH8v.jpg",import.meta.url).href],["Gaffer_back",Sn],["Gaffer_front",new URL("/assets/gaffer-front-large-box-BhDGw3yv.png",import.meta.url).href],["Ghast_back",Sn],["Ghast_front",new URL("/assets/GB-S4-Morticians-19-08-26-EHTItFK_.jpg",import.meta.url).href],["Graves_back",Sn],["Graves_front",new URL("/assets/GB-S4-Morticians-19-08-28-R_qj57Ah.jpg",import.meta.url).href],["vGraves_back",Sn],["vGraves_front",new URL("/assets/GB-S4-Morticians-19-08-30-D7tgwlEH.jpg",import.meta.url).href],["vHemlocke_back",Sn],["vHemlocke_front",new URL("/assets/GB-S4-Morticians-19-08-32-rWK20dpO.jpg",import.meta.url).href],["Silence_back",Sn],["Silence_front",new URL("/assets/GB-S4-Morticians-19-08-34-Cml7KNHH.jpg",import.meta.url).href],["Navigators_back",new URL("/assets/GB-S4-Navigators-20-03-01-M7N3Qnm9.jpg",import.meta.url).href],["Navigators_front",new URL("/assets/GB-S4-Navigators-20-03-02-C0DvULy4.jpg",import.meta.url).href],["Windfinder_back",jc],["Wander_front",new URL("/assets/GB-S4-Navigators-20-03-04-C54iXdHJ.jpg",import.meta.url).href],["Windfinder_front",new URL("/assets/GB-S4-Navigators-20-03-05-DijPkVU0.jpg",import.meta.url).href],["Wander_back",jc],["Azimuth_front",new URL("/assets/GB-S4-Navigators-20-03-07-k2ifPp8C.jpg",import.meta.url).href],["Azimuth_back",jc],["Ebb_back",jc],["Ebb_front",new URL("/assets/GB-S4-Navigators-20-03-10-kxgvrwFf.jpg",import.meta.url).href],["Fathom_front",new URL("/assets/GB-S4-Navigators-20-03-11-DLBrn3lH.jpg",import.meta.url).href],["Fathom_back",jc],["Horizon_back",jc],["Horizon_front",new URL("/assets/GB-S4-Navigators-20-03-14-4LJM_QAb.jpg",import.meta.url).href],["Order_back",new URL("/assets/GB-S4-Order-19-08-01-asZnKqhR.jpg",import.meta.url).href],["Order_front",new URL("/assets/GB-S4-Order-19-08-02-DxYxwIyf.jpg",import.meta.url).href],["sBrisket_back",pa],["sBrisket_front",new URL("/assets/GB-S4-Order-19-08-04-B1NHIvQH.jpg",import.meta.url).href],["Pride_back",pa],["Pride_front",new URL("/assets/GB-S4-Order-19-08-06-BxCTP18m.jpg",import.meta.url).href],["Benediction_back",pa],["Benediction_front",new URL("/assets/GB-S4-Order-19-08-08-DWLWCNBP.jpg",import.meta.url).href],["vFangtooth_back",pa],["vFangtooth_front",new URL("/assets/GB-S4-Order-19-08-10-CdmsC0k7.jpg",import.meta.url).href],["Grace_back",pa],["Grace_front",new URL("/assets/GB-S4-Order-19-08-12-CUnlpuDI.jpg",import.meta.url).href],["Harry_back",pa],["Harry_front",new URL("/assets/GB-S4-Order-19-08-14-N2zvQdYm.jpg",import.meta.url).href],["Mist_back",pa],["Mist_front",new URL("/assets/GB-S4-Order-19-08-16-BxGIGoGz.jpg",import.meta.url).href],["sSpigot_back",pa],["sSpigot_front",new URL("/assets/GB-S4-Order-19-08-18-gkj8skFt.jpg",import.meta.url).href],["Ratcatchers_back",new URL("/assets/GB-S4-Ratcatchers-19-08-01-CbXHBUJx.jpg",import.meta.url).href],["Ratcatchers_front",new URL("/assets/GB-S4-Ratcatchers-19-08-02-XbBjNmUR.jpg",import.meta.url).href],["Piper_back",Lc],["Piper_front",new URL("/assets/GB-S4-Ratcatchers-19-08-04-BnvzzXPE.jpg",import.meta.url).href],["Squeak_back",Lc],["Squeak_front",new URL("/assets/GB-S4-Ratcatchers-19-08-06-DlqN1o8i.jpg",import.meta.url).href],["Miasma_back",Lc],["Miasma_front",new URL("/assets/GB-S4-Ratcatchers-19-08-08-BwciubOW.jpg",import.meta.url).href],["Pelage_back",Lc],["Pelage_front",new URL("/assets/GB-S4-Ratcatchers-19-08-10-DtQCr3kF.jpg",import.meta.url).href],["Scourge_back",Lc],["Scourge_front",new URL("/assets/GB-S4-Ratcatchers-19-08-12-JUs2Xlho.jpg",import.meta.url).href],["Skulk_back",Lc],["Skulk_front",new URL("/assets/GB-S4-Ratcatchers-19-08-14-D1JyRK5e.jpg",import.meta.url).href],["Shepherds_back",new URL("/assets/GB-S4-Shepherds-20-03-01-BszDyn7n.jpg",import.meta.url).href],["Shepherds_front",new URL("/assets/GB-S4-Shepherds-20-03-02-XqwLekip.jpg",import.meta.url).href],["Herder_back",pl],["Herder_front",new URL("/assets/GB-S4-Shepherds-20-03-04-CpJUbIK5.jpg",import.meta.url).href],["Babe_back",pl],["Babe_front",new URL("/assets/GB-S4-Shepherds-20-03-06-TZPJ1JER.jpg",import.meta.url).href],["Crook_back",pl],["Crook_front",new URL("/assets/GB-S4-Shepherds-20-03-08-fPdEFqsg.jpg",import.meta.url).href],["Hook_back",pl],["Hook_front",new URL("/assets/GB-S4-Shepherds-20-03-10-D8vNNVMa.jpg",import.meta.url).href],["Lamb_back",pl],["Lamb_front",new URL("/assets/GB-S4-Shepherds-20-03-12-Cs6eNdgu.jpg",import.meta.url).href],["Ram_back",pl],["Ram_front",new URL("/assets/GB-S4-Shepherds-20-03-14-EROLPl1k.jpg",import.meta.url).href],["Shearer_back",pl],["Shearer_front",new URL("/assets/GB-S4-Shepherds-20-03-16-CH7z3m46.jpg",import.meta.url).href],["Union_back",new URL("/assets/GB-S4-Union-20-03-01-BYUf_cPI.jpg",import.meta.url).href],["Union_front",new URL("/assets/GB-S4-Union-20-03-02-CAfWuq1n.jpg",import.meta.url).href],["Blackheart_back",ei],["Blackheart_front",new URL("/assets/GB-S4-Union-20-03-04-DESKIKlc.jpg",import.meta.url).href],["vRage_back",ei],["vRage_front",new URL("/assets/GB-S4-Union-20-03-06-TH_Fhhnv.jpg",import.meta.url).href],["vGreede_back",ei],["vGreede_front",new URL("/assets/GB-S4-Union-20-03-08-C9acG5Gy.jpg",import.meta.url).href],["Coin_back",ei],["Coin_front",new URL("/assets/GB-S4-Union-20-03-10-BRZlJPNW.jpg",import.meta.url).href],["Strongbox_back",ei],["Strongbox_front",new URL("/assets/GB-S4-Union-20-03-12--TefmgjH.jpg",import.meta.url).href],["Avarisse_back",ei],["Avarisse_front",new URL("/assets/GB-S4-Union-20-03-14-DoT0cBAC.jpg",import.meta.url).href],["Greede_back",ei],["Greede_front",new URL("/assets/GB-S4-Union-20-03-16-DrDLPTZJ.jpg",import.meta.url).href],["Decimate_back",ei],["Decimate_front",new URL("/assets/GB-S4-Union-20-03-18-bedyXvhB.jpg",import.meta.url).href],["Fangtooth_back",ei],["Fangtooth_front",new URL("/assets/GB-S4-Union-20-03-20-CDcWfDBp.jpg",import.meta.url).href],["Gutter_back",ei],["Gutter_front",new URL("/assets/GB-S4-Union-20-03-22-DFVnunFx.jpg",import.meta.url).href],["Hemlocke_back",ei],["Hemlocke_front",new URL("/assets/GB-S4-Union-20-03-24-DTxA3SGq.jpg",import.meta.url).href],["Minx_back",ei],["Minx_front",new URL("/assets/GB-S4-Union-20-03-26-Bo3pJ595.jpg",import.meta.url).href],["Rage_back",ei],["Rage_front",new URL("/assets/GB-S4-Union-20-03-28-Cix4cgvH.jpg",import.meta.url).href],["Snakeskin_back",ei],["Snakeskin_front",new URL("/assets/GB-S4-Union-20-03-30-DOPQxsMF.jpg",import.meta.url).href],["Lamplighters_front",new URL("/assets/lamp-beta-63HlWaeb.png",import.meta.url).href],["Lamplighters_back",new URL("/assets/lamp-beta-63HlWaeb.png",import.meta.url).href],["Nightlight_gbcp_front",new URL("/assets/nightlight-00-DeG30Qno.jpg",import.meta.url).href],["Nightlight_gbcp_back",new URL("/assets/nightlight-01-B5GmfHdF.jpg",import.meta.url).href],["Soot_gbcp_front",new URL("/assets/soot-00-CjgkmHEF.jpg",import.meta.url).href],["Soot_gbcp_back",new URL("/assets/soot-01-DLvloUPB.jpg",import.meta.url).href],["Beacon_gbcp_front",new URL("/assets/beacon-00-L9zfj4Q8.jpg",import.meta.url).href],["Beacon_gbcp_back",new URL("/assets/beacon-01-vYao7kaT.jpg",import.meta.url).href],["Heat_gbcp_front",new URL("/assets/heat-00-D38QQgsn.jpg",import.meta.url).href],["Heat_gbcp_back",new URL("/assets/heat-01-TaWfEq1e.jpg",import.meta.url).href],["Phosphor_gbcp_front",new URL("/assets/phosphor-00-kYBsDzr4.jpg",import.meta.url).href],["Phosphor_gbcp_back",new URL("/assets/phosphor-01-aCMgs7Xa.jpg",import.meta.url).href],["Wick_gbcp_front",new URL("/assets/wick-00-CEZ6BY1J.jpg",import.meta.url).href],["Wick_gbcp_back",new URL("/assets/wick-01-DtuDStax.jpg",import.meta.url).href],["sBrisket_gbcp_front",new URL("/assets/brisket3-00-TRUFkM-Q.jpg",import.meta.url).href],["sBrisket_gbcp_back",new URL("/assets/brisket3-01-C19fZQ9I.jpg",import.meta.url).href],["Cast_gbcp_front",new URL("/assets/cast-00-CDhbzPRV.jpg",import.meta.url).href],["Cast_gbcp_back",new URL("/assets/cast-01-DOJiR9Ch.jpg",import.meta.url).href],["Crook_gbcp_front",new URL("/assets/crook-00-C4D_gdaM.jpg",import.meta.url).href],["Crook_gbcp_back",new URL("/assets/crook-01-D9bCOT5R.jpg",import.meta.url).href],["Egret_gbcp_front",new URL("/assets/egret-00-BKhmAAwA.jpg",import.meta.url).href],["Egret_gbcp_back",new URL("/assets/egret-01-DCSfZLX7.jpg",import.meta.url).href],["Hook_gbcp_front",new URL("/assets/hook-00-BCtxORP2.jpg",import.meta.url).href],["Hook_gbcp_back",new URL("/assets/hook-01-CFEXTspD.jpg",import.meta.url).href],["Ikaros_gbcp_front",new URL("/assets/ikaros-00-BlK23AQW.jpg",import.meta.url).href],["Ikaros_gbcp_back",new URL("/assets/ikaros-01-CaTWYr3E.jpg",import.meta.url).href],["Lucky_gbcp_front",new URL("/assets/lucky-00--3wf1Q-o.jpg",import.meta.url).href],["Lucky_gbcp_back",new URL("/assets/lucky-01-CeFOEkb7.jpg",import.meta.url).href],["Miasma_gbcp_front",new URL("/assets/miasma-00-gJuVKj0r.jpg",import.meta.url).href],["Miasma_gbcp_back",new URL("/assets/miasma-01-BFpZKg3H.jpg",import.meta.url).href],["Minx_gbcp_front",new URL("/assets/minx-00-DKid1QgM.jpg",import.meta.url).href],["Minx_gbcp_back",new URL("/assets/minx-01-h4AvAe2P.jpg",import.meta.url).href],["Steeljaw_gbcp_front",new URL("/assets/steeljaw-00-DBylP57a.jpg",import.meta.url).href],["Steeljaw_gbcp_back",new URL("/assets/steeljaw-01-DHvdkD3u.jpg",import.meta.url).href],["Tenderiser_gbcp_front",new URL("/assets/tenderiser-00-DJeWjZaC.jpg",import.meta.url).href],["Tenderiser_gbcp_back",new URL("/assets/tenderiser-01-Dn53BCqM.jpg",import.meta.url).href],["Angel_gbcp_front",new URL("/assets/Angel-00-_OcCE1xs.jpg",import.meta.url).href],["Angel_gbcp_back",new URL("/assets/Angel-01-RsyL_b7r.jpg",import.meta.url).href],["Blackheart_gbcp_front",new URL("/assets/Blackheart-00-Barboaw1.jpg",import.meta.url).href],["Blackheart_gbcp_back",new URL("/assets/Blackheart-01-DqXGaAGL.jpg",import.meta.url).href],["Brisket_gbcp_front",new URL("/assets/Brisket-00-fpn5lXhR.jpg",import.meta.url).href],["Brisket_gbcp_back",new URL("/assets/Brisket-01-Cz0yKYaC.jpg",import.meta.url).href],["Flea_gbcp_front",new URL("/assets/Flea-00-PYY29ZDm.jpg",import.meta.url).href],["Flea_gbcp_back",new URL("/assets/Flea-01-B-ceu-Fs.jpg",import.meta.url).href],["Gaffer_gbcp_front",new URL("/assets/Gaffer-00-Chm4XJB6.jpg",import.meta.url).href],["Gaffer_gbcp_back",new URL("/assets/Gaffer-01-DChRbbv3.jpg",import.meta.url).href],["Locus_gbcp_front",new URL("/assets/Locus-00-BlUYiKL3.jpg",import.meta.url).href],["Locus_gbcp_back",new URL("/assets/Locus-01-CgJeSABI.jpg",import.meta.url).href],["Salt_gbcp_front",new URL("/assets/Salt-00-DTipa4Vq.jpg",import.meta.url).href],["Salt_gbcp_back",new URL("/assets/Salt-01-DgX-3wqX.jpg",import.meta.url).href],["Truffles_gbcp_front",new URL("/assets/Truffles-00-BxTIIeQ4.jpg",import.meta.url).href],["Truffles_gbcp_back",new URL("/assets/Truffles-01-1xGyMIOv.jpg",import.meta.url).href],["Ulfr_gbcp_front",new URL("/assets/Ulfr-00-BXhlGxmA.jpg",import.meta.url).href],["Ulfr_gbcp_back",new URL("/assets/Ulfr-01-JQfocVce.jpg",import.meta.url).href],["vGutter_gbcp_front",new URL("/assets/vGutter-00-CpnNh9P4.jpg",import.meta.url).href],["vGutter_gbcp_back",new URL("/assets/vGutter-01-BWHR1234.jpg",import.meta.url).href],["Beacon_front",new URL("/assets/beacon-WzU-Fgwo.jpg",import.meta.url).href],["Beacon_back",Ic],["Heat_front",new URL("/assets/heat-kg0Ne0rh.jpg",import.meta.url).href],["Heat_back",Ic],["Nightlight_front",new URL("/assets/nightlight-BICbD_Qy.jpg",import.meta.url).href],["Nightlight_back",Ic],["Phosphor_front",new URL("/assets/phosphor-CifRCYrC.jpg",import.meta.url).href],["Phosphor_back",Ic],["Soot_front",new URL("/assets/soot-CXEcs2BT.jpg",import.meta.url).href],["Soot_back",Ic],["Wick_front",new URL("/assets/wick-D10XZuyz.jpg",import.meta.url).href],["Wick_back",Ic]]);var NJ=function(e){return e instanceof RegExp},DJ=function(t){var r=/[\\^$.*+?()[\]{}|]/g,n=RegExp(r.source);return t&&n.test(t)?t.replace(r,"\\$&"):t},CI=function(e){return typeof e=="string"},BJ=function(e){var t=[];return e.forEach(function(r){Array.isArray(r)?t=t.concat(r):t.push(r)}),t};function $J(e,t,r){var n=0,i=0;if(e==="")return e;if(!e||!CI(e))throw new TypeError("First argument to react-string-replace#replaceString must be a string");var o=t;NJ(o)||(o=new RegExp("("+DJ(o)+")","gi"));for(var s=e.split(o),a=1,l=s.length;a{let t=Th(e,/\(◉(.*?)\)/g,(r,n)=>y.jsxs(Lt.Fragment,{children:["(◉",y.jsx("span",{style:{fontStyle:"italic"},children:r}),")"]},`i-a-${n}`));return t=Th(t,/\(([^◉].*?)\)/g,(r,n)=>y.jsxs(Lt.Fragment,{children:["(",y.jsx("span",{style:{fontStyle:"italic"},children:r}),")"]},`i-${n}`)),t=Th(t,/{([<>TKDGB]+)}/,(r,n)=>y.jsx(Lt.Fragment,{children:y.jsx("span",{style:{display:"inline-flex",width:"21px",height:"1ex",position:"relative",overflow:"visible"},children:y.jsx("div",{style:{display:"flex",overflow:"visible",width:"21px",height:"21px",backgroundColor:"white",border:"var(--line-width) solid black",borderRadius:"21px",position:"absolute",alignSelf:"center",justifySelf:"center",alignItems:"center",justifyContent:"center"},children:y.jsx(rI,{icon:r.replace(/GB/g,"CP")})})})},`pb-${n}`)),t=Th(t,/\b([A-Z]+)\b/g,(r,n)=>y.jsx("span",{style:{letterSpacing:"-1px"},children:r},`tla-${n}`)),y.jsx(y.Fragment,{children:t})},zJ=e=>{const t=e.model,r=t.id,{setting$:n}=di(),[i,o]=_.useState(),[s,a]=_.useState();_.useEffect(()=>{const f=n==null?void 0:n.subscribe(p=>{o(p==null?void 0:p.toJSON().data.cardPreferences.preferredStyle),a(p==null?void 0:p.toJSON().data.language)});return()=>f==null?void 0:f.unsubscribe()});const[l,c]=fo(f=>Promise.all([f.guilds.findOne().where({name:t.guild1}).exec(),f.guilds.findOne().where({name:t.guild2}).exec()]),[t.guild1,t.guild2])??[];if(!l)return null;const u=i==="gbcp"&&(cr.has(`${r}_gbcp_front`)||cr.has(`${r}_full`)),d=u?cr.get(`${r}_full`)??cr.get(`${r}_gbcp_front`)??cr.get(`${r}_front`):cr.get(`${r}_front`)??cr.get(`${r}_full`)??cr.get(`${r}_gbcp_front`);return y.jsx("div",{className:`card-front ${r} lang-${s} ${u&&"gbcp"} ${e.className}`,style:{"--team-color":l.color,"--gbcp-color":op(l.shadow??l.color).mix(op.rgb(254,246,227),.9).string(),"--guild1-color":l.color,"--guild2-color":c?c.color:void 0,"--mom-color":l.shadow,"--mom-border-color":l.darkColor,backgroundImage:e.noBackground?void 0:`url(${d})`,...e.style},children:y.jsxs("div",{className:`overlay ${u?"gbcp":""}`,children:[y.jsxs("div",{className:"font-top-box",children:[y.jsx(UJ,{model:t,guild:l}),y.jsx(HJ,{model:t})]}),y.jsx(WJ,{model:t,gbcp:u}),y.jsx("div",{className:"character-plays-wrapper",children:y.jsx(KJ,{model:t,gbcp:u})}),y.jsx(GJ,{model:t,health$:e.health$})]})})},UJ=({model:e,guild:t})=>y.jsxs("div",{className:"name-plate",children:[y.jsx("div",{className:"guild-icon",children:y.jsx(Ai,{id:"guild-icon",icon:t.name})}),y.jsxs("div",{className:"name-plate-right",children:[y.jsx("div",{className:"name",children:y.jsx("div",{className:"dropcap",children:e.name.split(/(?=[A-Z])/).map((r,n)=>y.jsx("span",{children:r},n))})}),y.jsxs("div",{className:"reach",children:["Melee Zone ",e.reach?2:1,'"']})]})]}),GJ=({model:e,health$:t})=>{const[r,n]=_.useState(e.hp);return _.useEffect(()=>{const i=t==null?void 0:t.subscribe(o=>n(o));return()=>i==null?void 0:i.unsubscribe()},[t]),y.jsx("div",{className:"health",children:[...Array(e.hp).keys()].map(i=>y.jsx("div",{className:`health-box ${i+1>r?"damaged":""}`,children:i===0&&y.jsx(Ai,{icon:"skull",size:17})||i+1===e.recovery&&y.jsx(Ai,{icon:"bandage",size:22})||i+1===e.hp&&i+1},i))})},WJ=({model:e,gbcp:t=!1})=>{var r;return y.jsx("div",{className:"playbook",children:(r=e.playbook)==null?void 0:r.map((n,i)=>n==null?void 0:n.flatMap((o,s)=>{const[a,l]=o?o.split(";"):[null,null];return y.jsx("div",{className:`playbook-result ${a?"":"spacer"} ${l?"momentus":""}`,style:{"--col":s,display:"flex",flexDirection:t?"row":"column",padding:"0.10em",gap:t?0:"0.05em"},children:a?a.split(",").map((c,u)=>(c=t?c.replace(/^CP$/,"CP-gbcp").replace(/^CP2$/,"CP2-gbcp"):c,y.jsx(rI,{icon:c},u))):null},i*7+s)}))})},HJ=({model:e})=>y.jsxs("div",{className:"statbox",children:[y.jsx("span",{children:"MOV"}),y.jsx("span",{children:"TAC"}),y.jsx("span",{children:"KICK"}),y.jsx("span",{children:"DEF"}),y.jsx("span",{children:"ARM"}),y.jsx("span",{children:"INF"}),y.jsx("span",{children:`${e.jog}"/${e.sprint}"`}),y.jsx("span",{children:e.tac}),y.jsx("span",{children:`${e.kickdice}/${e.kickdist}"`}),y.jsx("span",{children:`${e.def}+`}),y.jsx("span",{children:e.arm}),y.jsx("span",{children:`${e.inf}/${e.infmax}`})]}),ER=({test:e})=>y.jsx(Ai,{icon:e?"checkmark":"ballotX",size:14});function VJ({text:e}){const t=e.split("[",1)[0],r=e.replace(/[^[]*(\[.*\])?/," $1");return y.jsxs("div",{className:"name",children:[y.jsx("span",{children:t}),y.jsx("span",{children:r})]})}const KJ=({model:e,gbcp:t=!1})=>y.jsxs("div",{className:"character-plays",children:[y.jsxs("span",{className:"dropcap",children:[y.jsx("span",{children:"Character "}),y.jsx("span",{children:"Plays"})]}),y.jsx("span",{children:"CST"}),y.jsx("span",{children:"RNG"}),y.jsx("span",{children:"SUS"}),y.jsx("span",{children:"OPT"}),e.character_plays.map(r=>y.jsxs(Lt.Fragment,{children:[y.jsx(VJ,{text:r.name}),y.jsx("span",{children:String(r.CST).split(",").map((n,i)=>y.jsxs("span",{children:[i>0&&"/",{CP:y.jsx(Ai,{icon:t?"ball":"GB",size:18}),CP2:y.jsx(Ai,{icon:t?"trophy":"GBT",size:18})}[n]||y.jsx("span",{children:n})]},i))}),y.jsxs("span",{children:[r.RNG,typeof r.RNG=="number"&&'"']}),y.jsx("span",{children:y.jsx(ER,{test:r.SUS})}),y.jsx("span",{children:y.jsx(ER,{test:r.OPT})}),y.jsx("div",{className:"text",children:ty(r.text)})]},r.name))]}),yg=Lt.memo(zJ),qJ=e=>{const t=e.model,r=t.id,{setting$:n}=di(),[i,o]=_.useState();_.useEffect(()=>{const c=n==null?void 0:n.pipe(qt(u=>u==null?void 0:u.toJSON().data.cardPreferences.preferredStyle)).subscribe(u=>o(u));return()=>c==null?void 0:c.unsubscribe()});const s=fo(c=>c.guilds.findOne().where({name:t.guild1}).exec(),[t.guild1]);if(!s)return null;const a=i==="gbcp"&&(cr.has(`${r}_gbcp_front`)||cr.has(`${r}_full`)),l=a?cr.get(`${r}_full`)??cr.get(`${r}_gbcp_back`)??cr.get(`${r}_back`):cr.get(`${r}_back`)??cr.get(`${r}_full`)??cr.get(`${r}_gbcp_back`);return y.jsx("div",{className:`card-back ${r} ${a&&"gbcp"} ${e.className}`,style:{"--team-color":s.color,"--gbcp-color":op(s.shadow??s.color).mix(op.rgb(254,246,227),.9),"--mom-color":s.shadow,"--mom-border-color":s.darkColor,backgroundImage:e.noBackground?void 0:`url(${l})`,...e.style},children:y.jsxs("div",{className:`overlay ${a?"gbcp":""}`,children:[y.jsxs("div",{className:"container",children:[y.jsxs("div",{className:"name-plate",children:[y.jsx("div",{className:"guild-icon",children:y.jsx(Ai,{id:"guild-icon",icon:s.name})}),y.jsx("div",{className:"name dropcap",children:t.name.split(/(?=[A-Z])/).map((c,u)=>y.jsx("span",{children:c},u))})]}),y.jsx(YJ,{model:t}),y.jsx(QJ,{model:t}),y.jsx(XJ,{model:t})]}),y.jsxs("div",{className:"footer",children:[y.jsx("div",{className:"tags",children:t.types}),y.jsxs("div",{className:"right",children:[y.jsxs("div",{className:"icons",children:[y.jsx(G0,{icon:a?"gbcp":"GB"}),y.jsx("div",{className:"icon wrapper",children:y.jsx("div",{style:{width:"100%",height:"100%",border:"2px solid black",borderRadius:"50%",display:"flex",placeContent:"center",alignItems:"center",fontFamily:"Crimson Text",fontSize:"26px",fontWeight:"800"},children:t.version})}),t.guild2&&y.jsx(G0,{icon:t.guild2}),y.jsx(G0,{icon:t.guild1})]}),y.jsx("div",{className:"base-size",children:`Size ${t.base} mm`})]})]})]})})},G0=({icon:e})=>y.jsx("div",{className:"icon wrapper",children:y.jsx(Ai,{icon:e})});function TS({text:e}){const t=e.split("[",1)[0],r=e.replace(/[^[]*(\[.*\])?/," $1");return y.jsxs("div",{children:[y.jsx("span",{children:t}),y.jsx("span",{children:r})]})}const YJ=({model:e})=>y.jsxs(y.Fragment,{children:[y.jsxs("div",{className:"header dropcap",children:[y.jsx("span",{children:"Character "}),y.jsx("span",{children:"Traits"})]}),e.character_traits.map((t,r)=>y.jsxs(Lt.Fragment,{children:[y.jsxs("div",{className:"character-trait",children:[y.jsx("div",{className:`trait ${t.active&&"active"}`,children:y.jsx(TS,{text:t.name.concat(t.parameter?` [${t.parameter}]`:"")})}),y.jsx("span",{className:"text",children:ty(t.text)})]},`${t.name}-${r}`),y.jsx("div",{style:{flexGrow:1,maxHeight:"1em"}})]},`ct-${r}`))]}),QJ=({model:e})=>{if(!e.heroic)return null;const t=e.heroic.split(` +Use Chrome, Firefox or Internet Explorer 11`)}}).call(this)}).call(this,o("_process"),typeof _n>"u"?typeof self>"u"?typeof window>"u"?{}:window:self:_n)},{_process:12,"safe-buffer":30}],15:[function(o,s){function a(h,v){h.prototype=Object.create(v.prototype),h.prototype.constructor=h,h.__proto__=v}function l(h,v,k){function b(g,C,E){return typeof v=="string"?v:v(g,C,E)}k||(k=Error);var x=function(g){function C(E,j,R){return g.call(this,b(E,j,R))||this}return a(C,g),C}(k);x.prototype.name=k.name,x.prototype.code=h,p[h]=x}function c(h,v){if(Array.isArray(h)){var k=h.length;return h=h.map(function(b){return b+""}),2h.length)&&(k=h.length),h.substring(k-v.length,k)===v}function f(h,v,k){return typeof k!="number"&&(k=0),!(k+v.length>h.length)&&h.indexOf(v,k)!==-1}var p={};l("ERR_INVALID_OPT_VALUE",function(h,v){return'The value "'+v+'" is invalid for option "'+h+'"'},TypeError),l("ERR_INVALID_ARG_TYPE",function(h,v,k){var b;typeof v=="string"&&u(v,"not ")?(b="must not be",v=v.replace(/^not /,"")):b="must be";var x;if(d(h," argument"))x="The ".concat(h," ").concat(b," ").concat(c(v,"type"));else{var g=f(h,".")?"property":"argument";x='The "'.concat(h,'" ').concat(g," ").concat(b," ").concat(c(v,"type"))}return x+=". Received type ".concat(typeof k),x},TypeError),l("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),l("ERR_METHOD_NOT_IMPLEMENTED",function(h){return"The "+h+" method is not implemented"}),l("ERR_STREAM_PREMATURE_CLOSE","Premature close"),l("ERR_STREAM_DESTROYED",function(h){return"Cannot call "+h+" after a stream was destroyed"}),l("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),l("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),l("ERR_STREAM_WRITE_AFTER_END","write after end"),l("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),l("ERR_UNKNOWN_ENCODING",function(h){return"Unknown encoding: "+h},TypeError),l("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),s.exports.codes=p},{}],16:[function(o,s){(function(a){(function(){function l(b){return this instanceof l?(f.call(this,b),p.call(this,b),this.allowHalfOpen=!0,void(b&&(b.readable===!1&&(this.readable=!1),b.writable===!1&&(this.writable=!1),b.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",c))))):new l(b)}function c(){this._writableState.ended||a.nextTick(u,this)}function u(b){b.end()}var d=Object.keys||function(b){var x=[];for(var g in b)x.push(g);return x};s.exports=l;var f=o("./_stream_readable"),p=o("./_stream_writable");o("inherits")(l,f);for(var h,v=d(p.prototype),k=0;k>>1,z|=z>>>2,z|=z>>>4,z|=z>>>8,z|=z>>>16,z++),z}function x(z,S){return 0>=z||S.length===0&&S.ended?0:S.objectMode?1:z===z?(z>S.highWaterMark&&(S.highWaterMark=b(z)),z<=S.length?z:S.ended?S.length:(S.needReadable=!0,0)):S.flowing&&S.length?S.buffer.head.data.length:S.length}function g(z,S){if(H("onEofChunk"),!S.ended){if(S.decoder){var I=S.decoder.end();I&&I.length&&(S.buffer.push(I),S.length+=S.objectMode?1:I.length)}S.ended=!0,S.sync?C(z):(S.needReadable=!1,!S.emittedReadable&&(S.emittedReadable=!0,E(z)))}}function C(z){var S=z._readableState;H("emitReadable",S.needReadable,S.emittedReadable),S.needReadable=!1,S.emittedReadable||(H("emitReadable",S.flowing),S.emittedReadable=!0,a.nextTick(E,z))}function E(z){var S=z._readableState;H("emitReadable_",S.destroyed,S.length,S.ended),!S.destroyed&&(S.length||S.ended)&&(z.emit("readable"),S.emittedReadable=!1),S.needReadable=!S.flowing&&!S.ended&&S.length<=S.highWaterMark,F(z)}function j(z,S){S.readingMore||(S.readingMore=!0,a.nextTick(R,z,S))}function R(z,S){for(;!S.reading&&!S.ended&&(S.length=S.length?(I=S.decoder?S.buffer.join(""):S.buffer.length===1?S.buffer.first():S.buffer.concat(S.length),S.buffer.clear()):I=S.buffer.consume(z,S.decoder),I}function Y(z){var S=z._readableState;H("endReadable",S.endEmitted),S.endEmitted||(S.ended=!0,a.nextTick(Z,S,z))}function Z(z,S){if(H("endReadableNT",z.endEmitted,z.length),!z.endEmitted&&z.length===0&&(z.endEmitted=!0,S.readable=!1,S.emit("end"),z.autoDestroy)){var I=S._writableState;(!I||I.autoDestroy&&I.finished)&&S.destroy()}}function le(z,S){for(var I=0,D=z.length;I=S.highWaterMark)||S.ended))return H("read: emitReadable",S.length,S.ended),S.length===0&&S.ended?Y(this):C(this),null;if(z=x(z,S),z===0&&S.ended)return S.length===0&&Y(this),null;var D=S.needReadable;H("need readable",D),(S.length===0||S.length-z"u"?typeof self>"u"?typeof window>"u"?{}:window:self:_n)},{"../errors":15,"./_stream_duplex":16,"./internal/streams/async_iterator":21,"./internal/streams/buffer_list":22,"./internal/streams/destroy":23,"./internal/streams/from":25,"./internal/streams/state":27,"./internal/streams/stream":28,_process:12,buffer:3,events:7,inherits:10,"string_decoder/":31,util:2}],19:[function(o,s){function a(b,x){var g=this._transformState;g.transforming=!1;var C=g.writecb;if(C===null)return this.emit("error",new p);g.writechunk=null,g.writecb=null,x!=null&&this.push(x),C(b);var E=this._readableState;E.reading=!1,(E.needReadable||E.length"u"?typeof self>"u"?typeof window>"u"?{}:window:self:_n)},{"../errors":15,"./_stream_duplex":16,"./internal/streams/destroy":23,"./internal/streams/state":27,"./internal/streams/stream":28,_process:12,buffer:3,inherits:10,"util-deprecate":32}],21:[function(o,s){(function(a){(function(){function l(O,P,L){return P in O?Object.defineProperty(O,P,{value:L,enumerable:!0,configurable:!0,writable:!0}):O[P]=L,O}function c(O,P){return{value:O,done:P}}function u(O){var P=O[v];if(P!==null){var L=O[E].read();L!==null&&(O[g]=null,O[v]=null,O[k]=null,P(c(L,!1)))}}function d(O){a.nextTick(u,O)}function f(O,P){return function(L,A){O.then(function(){return P[x]?void L(c(void 0,!0)):void P[C](L,A)},A)}}var p,h=o("./end-of-stream"),v=Symbol("lastResolve"),k=Symbol("lastReject"),b=Symbol("error"),x=Symbol("ended"),g=Symbol("lastPromise"),C=Symbol("handlePromise"),E=Symbol("stream"),j=Object.getPrototypeOf(function(){}),R=Object.setPrototypeOf((p={get stream(){return this[E]},next:function(){var O=this,P=this[b];if(P!==null)return Promise.reject(P);if(this[x])return Promise.resolve(c(void 0,!0));if(this[E].destroyed)return new Promise(function(F,K){a.nextTick(function(){O[b]?K(O[b]):F(c(void 0,!0))})});var L,A=this[g];if(A)L=new Promise(f(A,this));else{var $=this[E].read();if($!==null)return Promise.resolve(c($,!1));L=new Promise(this[C])}return this[g]=L,L}},l(p,Symbol.asyncIterator,function(){return this}),l(p,"return",function(){var O=this;return new Promise(function(P,L){O[E].destroy(null,function(A){return A?void L(A):void P(c(void 0,!0))})})}),p),j);s.exports=function(O){var P,L=Object.create(R,(P={},l(P,E,{value:O,writable:!0}),l(P,v,{value:null,writable:!0}),l(P,k,{value:null,writable:!0}),l(P,b,{value:null,writable:!0}),l(P,x,{value:O._readableState.endEmitted,writable:!0}),l(P,C,{value:function(A,$){var F=L[E].read();F?(L[g]=null,L[v]=null,L[k]=null,A(c(F,!1))):(L[v]=A,L[k]=$)},writable:!0}),P));return L[g]=null,h(O,function(A){if(A&&A.code!=="ERR_STREAM_PREMATURE_CLOSE"){var $=L[k];return $!==null&&(L[g]=null,L[v]=null,L[k]=null,$(A)),void(L[b]=A)}var F=L[v];F!==null&&(L[g]=null,L[v]=null,L[k]=null,F(c(void 0,!0))),L[x]=!0}),O.on("readable",d.bind(null,L)),L}}).call(this)}).call(this,o("_process"))},{"./end-of-stream":24,_process:12}],22:[function(o,s){function a(g,C){var E=Object.keys(g);if(Object.getOwnPropertySymbols){var j=Object.getOwnPropertySymbols(g);C&&(j=j.filter(function(R){return Object.getOwnPropertyDescriptor(g,R).enumerable})),E.push.apply(E,j)}return E}function l(g){for(var C,E=1;E>>0),j=this.head,R=0;j;)p(j.data,E,R),R+=j.data.length,j=j.next;return E}},{key:"consume",value:function(C,E){var j;return CO.length?O.length:C;if(R+=P===O.length?O:O.slice(0,C),C-=P,C===0){P===O.length?(++j,this.head=E.next?E.next:this.tail=null):(this.head=E,E.data=O.slice(P));break}++j}return this.length-=j,R}},{key:"_getBuffer",value:function(C){var E=v.allocUnsafe(C),j=this.head,R=1;for(j.data.copy(E),C-=j.data.length;j=j.next;){var O=j.data,P=C>O.length?O.length:C;if(O.copy(E,E.length-C,0,P),C-=P,C===0){P===O.length?(++R,this.head=j.next?j.next:this.tail=null):(this.head=j,j.data=O.slice(P));break}++R}return this.length-=R,E}},{key:x,value:function(C,E){return b(this,l({},E,{depth:0,customInspect:!1}))}}]),g}()},{buffer:3,util:2}],23:[function(o,s){(function(a){(function(){function l(d,f){u(d,f),c(d)}function c(d){d._writableState&&!d._writableState.emitClose||d._readableState&&!d._readableState.emitClose||d.emit("close")}function u(d,f){d.emit("error",f)}s.exports={destroy:function(d,f){var p=this,h=this._readableState&&this._readableState.destroyed,v=this._writableState&&this._writableState.destroyed;return h||v?(f?f(d):d&&(this._writableState?!this._writableState.errorEmitted&&(this._writableState.errorEmitted=!0,a.nextTick(u,this,d)):a.nextTick(u,this,d)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(d||null,function(k){!f&&k?p._writableState?p._writableState.errorEmitted?a.nextTick(c,p):(p._writableState.errorEmitted=!0,a.nextTick(l,p,k)):a.nextTick(l,p,k):f?(a.nextTick(c,p),f(k)):a.nextTick(c,p)}),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(d,f){var p=d._readableState,h=d._writableState;p&&p.autoDestroy||h&&h.autoDestroy?d.destroy(f):d.emit("error",f)}}}).call(this)}).call(this,o("_process"))},{_process:12}],24:[function(o,s){function a(f){var p=!1;return function(){if(!p){p=!0;for(var h=arguments.length,v=Array(h),k=0;kg.length)throw new k("streams");var j,R=g.map(function(O,P){var L=Pp){var h=f?d:"highWaterMark";throw new l(h,p)}return r(p)}return c.objectMode?16:16384}}},{"../../../errors":15}],28:[function(o,s){s.exports=o("events").EventEmitter},{events:7}],29:[function(o,s,a){a=s.exports=o("./lib/_stream_readable.js"),a.Stream=a,a.Readable=a,a.Writable=o("./lib/_stream_writable.js"),a.Duplex=o("./lib/_stream_duplex.js"),a.Transform=o("./lib/_stream_transform.js"),a.PassThrough=o("./lib/_stream_passthrough.js"),a.finished=o("./lib/internal/streams/end-of-stream.js"),a.pipeline=o("./lib/internal/streams/pipeline.js")},{"./lib/_stream_duplex.js":16,"./lib/_stream_passthrough.js":17,"./lib/_stream_readable.js":18,"./lib/_stream_transform.js":19,"./lib/_stream_writable.js":20,"./lib/internal/streams/end-of-stream.js":24,"./lib/internal/streams/pipeline.js":26}],30:[function(o,s,a){function l(f,p){for(var h in f)p[h]=f[h]}function c(f,p,h){return d(f,p,h)}/*! safe-buffer. MIT License. Feross Aboukhadijeh */var u=o("buffer"),d=u.Buffer;d.from&&d.alloc&&d.allocUnsafe&&d.allocUnsafeSlow?s.exports=u:(l(u,a),a.Buffer=c),c.prototype=Object.create(d.prototype),l(d,c),c.from=function(f,p,h){if(typeof f=="number")throw new TypeError("Argument must not be a number");return d(f,p,h)},c.alloc=function(f,p,h){if(typeof f!="number")throw new TypeError("Argument must be a number");var v=d(f);return p===void 0?v.fill(0):typeof h=="string"?v.fill(p,h):v.fill(p),v},c.allocUnsafe=function(f){if(typeof f!="number")throw new TypeError("Argument must be a number");return d(f)},c.allocUnsafeSlow=function(f){if(typeof f!="number")throw new TypeError("Argument must be a number");return u.SlowBuffer(f)}},{buffer:3}],31:[function(o,s,a){function l(R){if(!R)return"utf8";for(var O;;)switch(R){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return R;default:if(O)return;R=(""+R).toLowerCase(),O=!0}}function c(R){var O=l(R);if(typeof O!="string"&&(E.isEncoding===j||!j(R)))throw new Error("Unknown encoding: "+R);return O||R}function u(R){this.encoding=c(R);var O;switch(this.encoding){case"utf16le":this.text=v,this.end=k,O=4;break;case"utf8":this.fillLast=h,O=4;break;case"base64":this.text=b,this.end=x,O=3;break;default:return this.write=g,void(this.end=C)}this.lastNeed=0,this.lastTotal=0,this.lastChar=E.allocUnsafe(O)}function d(R){return 127>=R?0:R>>5==6?2:R>>4==14?3:R>>3==30?4:R>>6==2?-1:-2}function f(R,O,P){var L=O.length-1;if(L=L)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=R[R.length-2],this.lastChar[1]=R[R.length-1],P.slice(0,-1)}return P}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=R[R.length-1],R.toString("utf16le",O,R.length-1)}function k(R){var O=R&&R.length?this.write(R):"";if(this.lastNeed){var P=this.lastTotal-this.lastNeed;return O+this.lastChar.toString("utf16le",0,P)}return O}function b(R,O){var P=(R.length-O)%3;return P==0?R.toString("base64",O):(this.lastNeed=3-P,this.lastTotal=3,P==1?this.lastChar[0]=R[R.length-1]:(this.lastChar[0]=R[R.length-2],this.lastChar[1]=R[R.length-1]),R.toString("base64",O,R.length-P))}function x(R){var O=R&&R.length?this.write(R):"";return this.lastNeed?O+this.lastChar.toString("base64",0,3-this.lastNeed):O}function g(R){return R.toString(this.encoding)}function C(R){return R&&R.length?this.write(R):""}var E=o("safe-buffer").Buffer,j=E.isEncoding||function(R){switch(R=""+R,R&&R.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};a.StringDecoder=u,u.prototype.write=function(R){if(R.length===0)return"";var O,P;if(this.lastNeed){if(O=this.fillLast(R),O===void 0)return"";P=this.lastNeed,this.lastNeed=0}else P=0;return P"u"?typeof self>"u"?typeof window>"u"?{}:window:self:_n)},{}],"/":[function(o,s){function a(x){return x.replace(/a=ice-options:trickle\s\n/g,"")}function l(x){console.warn(x)}/*! simple-peer. MIT License. Feross Aboukhadijeh */const c=o("debug")("simple-peer"),u=o("get-browser-rtc"),d=o("randombytes"),f=o("readable-stream"),p=o("queue-microtask"),h=o("err-code"),{Buffer:v}=o("buffer"),k=65536;class b extends f.Duplex{constructor(g){if(g=Object.assign({allowHalfOpen:!1},g),super(g),this._id=d(4).toString("hex").slice(0,7),this._debug("new peer %o",g),this.channelName=g.initiator?g.channelName||d(20).toString("hex"):null,this.initiator=g.initiator||!1,this.channelConfig=g.channelConfig||b.channelConfig,this.channelNegotiated=this.channelConfig.negotiated,this.config=Object.assign({},b.config,g.config),this.offerOptions=g.offerOptions||{},this.answerOptions=g.answerOptions||{},this.sdpTransform=g.sdpTransform||(C=>C),this.streams=g.streams||(g.stream?[g.stream]:[]),this.trickle=g.trickle===void 0||g.trickle,this.allowHalfTrickle=g.allowHalfTrickle!==void 0&&g.allowHalfTrickle,this.iceCompleteTimeout=g.iceCompleteTimeout||5e3,this.destroyed=!1,this.destroying=!1,this._connected=!1,this.remoteAddress=void 0,this.remoteFamily=void 0,this.remotePort=void 0,this.localAddress=void 0,this.localFamily=void 0,this.localPort=void 0,this._wrtc=g.wrtc&&typeof g.wrtc=="object"?g.wrtc:u(),!this._wrtc)throw h(typeof window>"u"?new Error("No WebRTC support: Specify `opts.wrtc` option in this environment"):new Error("No WebRTC support: Not a supported browser"),"ERR_WEBRTC_SUPPORT");this._pcReady=!1,this._channelReady=!1,this._iceComplete=!1,this._iceCompleteTimer=null,this._channel=null,this._pendingCandidates=[],this._isNegotiating=!1,this._firstNegotiation=!0,this._batchedNegotiation=!1,this._queuedNegotiation=!1,this._sendersAwaitingStable=[],this._senderMap=new Map,this._closingInterval=null,this._remoteTracks=[],this._remoteStreams=[],this._chunk=null,this._cb=null,this._interval=null;try{this._pc=new this._wrtc.RTCPeerConnection(this.config)}catch(C){return void this.destroy(h(C,"ERR_PC_CONSTRUCTOR"))}this._isReactNativeWebrtc=typeof this._pc._peerConnectionId=="number",this._pc.oniceconnectionstatechange=()=>{this._onIceStateChange()},this._pc.onicegatheringstatechange=()=>{this._onIceStateChange()},this._pc.onconnectionstatechange=()=>{this._onConnectionStateChange()},this._pc.onsignalingstatechange=()=>{this._onSignalingStateChange()},this._pc.onicecandidate=C=>{this._onIceCandidate(C)},typeof this._pc.peerIdentity=="object"&&this._pc.peerIdentity.catch(C=>{this.destroy(h(C,"ERR_PC_PEER_IDENTITY"))}),this.initiator||this.channelNegotiated?this._setupData({channel:this._pc.createDataChannel(this.channelName,this.channelConfig)}):this._pc.ondatachannel=C=>{this._setupData(C)},this.streams&&this.streams.forEach(C=>{this.addStream(C)}),this._pc.ontrack=C=>{this._onTrack(C)},this._debug("initial negotiation"),this._needsNegotiation(),this._onFinishBound=()=>{this._onFinish()},this.once("finish",this._onFinishBound)}get bufferSize(){return this._channel&&this._channel.bufferedAmount||0}get connected(){return this._connected&&this._channel.readyState==="open"}address(){return{port:this.localPort,family:this.localFamily,address:this.localAddress}}signal(g){if(!this.destroying){if(this.destroyed)throw h(new Error("cannot signal after peer is destroyed"),"ERR_DESTROYED");if(typeof g=="string")try{g=JSON.parse(g)}catch{g={}}this._debug("signal()"),g.renegotiate&&this.initiator&&(this._debug("got request to renegotiate"),this._needsNegotiation()),g.transceiverRequest&&this.initiator&&(this._debug("got request for transceiver"),this.addTransceiver(g.transceiverRequest.kind,g.transceiverRequest.init)),g.candidate&&(this._pc.remoteDescription&&this._pc.remoteDescription.type?this._addIceCandidate(g.candidate):this._pendingCandidates.push(g.candidate)),g.sdp&&this._pc.setRemoteDescription(new this._wrtc.RTCSessionDescription(g)).then(()=>{this.destroyed||(this._pendingCandidates.forEach(C=>{this._addIceCandidate(C)}),this._pendingCandidates=[],this._pc.remoteDescription.type==="offer"&&this._createAnswer())}).catch(C=>{this.destroy(h(C,"ERR_SET_REMOTE_DESCRIPTION"))}),g.sdp||g.candidate||g.renegotiate||g.transceiverRequest||this.destroy(h(new Error("signal() called with invalid signal data"),"ERR_SIGNALING"))}}_addIceCandidate(g){const C=new this._wrtc.RTCIceCandidate(g);this._pc.addIceCandidate(C).catch(E=>{!C.address||C.address.endsWith(".local")?l("Ignoring unsupported ICE candidate."):this.destroy(h(E,"ERR_ADD_ICE_CANDIDATE"))})}send(g){if(!this.destroying){if(this.destroyed)throw h(new Error("cannot send after peer is destroyed"),"ERR_DESTROYED");this._channel.send(g)}}addTransceiver(g,C){if(!this.destroying){if(this.destroyed)throw h(new Error("cannot addTransceiver after peer is destroyed"),"ERR_DESTROYED");if(this._debug("addTransceiver()"),this.initiator)try{this._pc.addTransceiver(g,C),this._needsNegotiation()}catch(E){this.destroy(h(E,"ERR_ADD_TRANSCEIVER"))}else this.emit("signal",{type:"transceiverRequest",transceiverRequest:{kind:g,init:C}})}}addStream(g){if(!this.destroying){if(this.destroyed)throw h(new Error("cannot addStream after peer is destroyed"),"ERR_DESTROYED");this._debug("addStream()"),g.getTracks().forEach(C=>{this.addTrack(C,g)})}}addTrack(g,C){if(this.destroying)return;if(this.destroyed)throw h(new Error("cannot addTrack after peer is destroyed"),"ERR_DESTROYED");this._debug("addTrack()");const E=this._senderMap.get(g)||new Map;let j=E.get(C);if(!j)j=this._pc.addTrack(g,C),E.set(C,j),this._senderMap.set(g,E),this._needsNegotiation();else throw j.removed?h(new Error("Track has been removed. You should enable/disable tracks that you want to re-add."),"ERR_SENDER_REMOVED"):h(new Error("Track has already been added to that stream."),"ERR_SENDER_ALREADY_ADDED")}replaceTrack(g,C,E){if(this.destroying)return;if(this.destroyed)throw h(new Error("cannot replaceTrack after peer is destroyed"),"ERR_DESTROYED");this._debug("replaceTrack()");const j=this._senderMap.get(g),R=j?j.get(E):null;if(!R)throw h(new Error("Cannot replace track that was never added."),"ERR_TRACK_NOT_ADDED");C&&this._senderMap.set(C,j),R.replaceTrack==null?this.destroy(h(new Error("replaceTrack is not supported in this browser"),"ERR_UNSUPPORTED_REPLACETRACK")):R.replaceTrack(C)}removeTrack(g,C){if(this.destroying)return;if(this.destroyed)throw h(new Error("cannot removeTrack after peer is destroyed"),"ERR_DESTROYED");this._debug("removeSender()");const E=this._senderMap.get(g),j=E?E.get(C):null;if(!j)throw h(new Error("Cannot remove track that was never added."),"ERR_TRACK_NOT_ADDED");try{j.removed=!0,this._pc.removeTrack(j)}catch(R){R.name==="NS_ERROR_UNEXPECTED"?this._sendersAwaitingStable.push(j):this.destroy(h(R,"ERR_REMOVE_TRACK"))}this._needsNegotiation()}removeStream(g){if(!this.destroying){if(this.destroyed)throw h(new Error("cannot removeStream after peer is destroyed"),"ERR_DESTROYED");this._debug("removeSenders()"),g.getTracks().forEach(C=>{this.removeTrack(C,g)})}}_needsNegotiation(){this._debug("_needsNegotiation"),this._batchedNegotiation||(this._batchedNegotiation=!0,p(()=>{this._batchedNegotiation=!1,this.initiator||!this._firstNegotiation?(this._debug("starting batched negotiation"),this.negotiate()):this._debug("non-initiator initial negotiation request discarded"),this._firstNegotiation=!1}))}negotiate(){if(!this.destroying){if(this.destroyed)throw h(new Error("cannot negotiate after peer is destroyed"),"ERR_DESTROYED");this.initiator?this._isNegotiating?(this._queuedNegotiation=!0,this._debug("already negotiating, queueing")):(this._debug("start negotiation"),setTimeout(()=>{this._createOffer()},0)):this._isNegotiating?(this._queuedNegotiation=!0,this._debug("already negotiating, queueing")):(this._debug("requesting negotiation from initiator"),this.emit("signal",{type:"renegotiate",renegotiate:!0})),this._isNegotiating=!0}}destroy(g){this._destroy(g,()=>{})}_destroy(g,C){this.destroyed||this.destroying||(this.destroying=!0,this._debug("destroying (error: %s)",g&&(g.message||g)),p(()=>{if(this.destroyed=!0,this.destroying=!1,this._debug("destroy (error: %s)",g&&(g.message||g)),this.readable=this.writable=!1,this._readableState.ended||this.push(null),this._writableState.finished||this.end(),this._connected=!1,this._pcReady=!1,this._channelReady=!1,this._remoteTracks=null,this._remoteStreams=null,this._senderMap=null,clearInterval(this._closingInterval),this._closingInterval=null,clearInterval(this._interval),this._interval=null,this._chunk=null,this._cb=null,this._onFinishBound&&this.removeListener("finish",this._onFinishBound),this._onFinishBound=null,this._channel){try{this._channel.close()}catch{}this._channel.onmessage=null,this._channel.onopen=null,this._channel.onclose=null,this._channel.onerror=null}if(this._pc){try{this._pc.close()}catch{}this._pc.oniceconnectionstatechange=null,this._pc.onicegatheringstatechange=null,this._pc.onsignalingstatechange=null,this._pc.onicecandidate=null,this._pc.ontrack=null,this._pc.ondatachannel=null}this._pc=null,this._channel=null,g&&this.emit("error",g),this.emit("close"),C()}))}_setupData(g){if(!g.channel)return this.destroy(h(new Error("Data channel event is missing `channel` property"),"ERR_DATA_CHANNEL"));this._channel=g.channel,this._channel.binaryType="arraybuffer",typeof this._channel.bufferedAmountLowThreshold=="number"&&(this._channel.bufferedAmountLowThreshold=k),this.channelName=this._channel.label,this._channel.onmessage=E=>{this._onChannelMessage(E)},this._channel.onbufferedamountlow=()=>{this._onChannelBufferedAmountLow()},this._channel.onopen=()=>{this._onChannelOpen()},this._channel.onclose=()=>{this._onChannelClose()},this._channel.onerror=E=>{const j=E.error instanceof Error?E.error:new Error(`Datachannel error: ${E.message} ${E.filename}:${E.lineno}:${E.colno}`);this.destroy(h(j,"ERR_DATA_CHANNEL"))};let C=!1;this._closingInterval=setInterval(()=>{this._channel&&this._channel.readyState==="closing"?(C&&this._onChannelClose(),C=!0):C=!1},5e3)}_read(){}_write(g,C,E){if(this.destroyed)return E(h(new Error("cannot write after peer is destroyed"),"ERR_DATA_CHANNEL"));if(this._connected){try{this.send(g)}catch(j){return this.destroy(h(j,"ERR_DATA_CHANNEL"))}this._channel.bufferedAmount>k?(this._debug("start backpressure: bufferedAmount %d",this._channel.bufferedAmount),this._cb=E):E(null)}else this._debug("write before connect"),this._chunk=g,this._cb=E}_onFinish(){if(!this.destroyed){const g=()=>{setTimeout(()=>this.destroy(),1e3)};this._connected?g():this.once("connect",g)}}_startIceCompleteTimeout(){this.destroyed||this._iceCompleteTimer||(this._debug("started iceComplete timeout"),this._iceCompleteTimer=setTimeout(()=>{this._iceComplete||(this._iceComplete=!0,this._debug("iceComplete timeout completed"),this.emit("iceTimeout"),this.emit("_iceComplete"))},this.iceCompleteTimeout))}_createOffer(){this.destroyed||this._pc.createOffer(this.offerOptions).then(g=>{if(this.destroyed)return;this.trickle||this.allowHalfTrickle||(g.sdp=a(g.sdp)),g.sdp=this.sdpTransform(g.sdp);const C=()=>{if(!this.destroyed){const E=this._pc.localDescription||g;this._debug("signal"),this.emit("signal",{type:E.type,sdp:E.sdp})}};this._pc.setLocalDescription(g).then(()=>{this._debug("createOffer success"),this.destroyed||(this.trickle||this._iceComplete?C():this.once("_iceComplete",C))}).catch(E=>{this.destroy(h(E,"ERR_SET_LOCAL_DESCRIPTION"))})}).catch(g=>{this.destroy(h(g,"ERR_CREATE_OFFER"))})}_requestMissingTransceivers(){this._pc.getTransceivers&&this._pc.getTransceivers().forEach(g=>{g.mid||!g.sender.track||g.requested||(g.requested=!0,this.addTransceiver(g.sender.track.kind))})}_createAnswer(){this.destroyed||this._pc.createAnswer(this.answerOptions).then(g=>{if(this.destroyed)return;this.trickle||this.allowHalfTrickle||(g.sdp=a(g.sdp)),g.sdp=this.sdpTransform(g.sdp);const C=()=>{if(!this.destroyed){const E=this._pc.localDescription||g;this._debug("signal"),this.emit("signal",{type:E.type,sdp:E.sdp}),this.initiator||this._requestMissingTransceivers()}};this._pc.setLocalDescription(g).then(()=>{this.destroyed||(this.trickle||this._iceComplete?C():this.once("_iceComplete",C))}).catch(E=>{this.destroy(h(E,"ERR_SET_LOCAL_DESCRIPTION"))})}).catch(g=>{this.destroy(h(g,"ERR_CREATE_ANSWER"))})}_onConnectionStateChange(){this.destroyed||this._pc.connectionState==="failed"&&this.destroy(h(new Error("Connection failed."),"ERR_CONNECTION_FAILURE"))}_onIceStateChange(){if(this.destroyed)return;const g=this._pc.iceConnectionState,C=this._pc.iceGatheringState;this._debug("iceStateChange (connection: %s) (gathering: %s)",g,C),this.emit("iceStateChange",g,C),(g==="connected"||g==="completed")&&(this._pcReady=!0,this._maybeReady()),g==="failed"&&this.destroy(h(new Error("Ice connection failed."),"ERR_ICE_CONNECTION_FAILURE")),g==="closed"&&this.destroy(h(new Error("Ice connection closed."),"ERR_ICE_CONNECTION_CLOSED"))}getStats(g){const C=E=>(Object.prototype.toString.call(E.values)==="[object Array]"&&E.values.forEach(j=>{Object.assign(E,j)}),E);this._pc.getStats.length===0||this._isReactNativeWebrtc?this._pc.getStats().then(E=>{const j=[];E.forEach(R=>{j.push(C(R))}),g(null,j)},E=>g(E)):0{if(this.destroyed)return;const j=[];E.result().forEach(R=>{const O={};R.names().forEach(P=>{O[P]=R.stat(P)}),O.id=R.id,O.type=R.type,O.timestamp=R.timestamp,j.push(C(O))}),g(null,j)},E=>g(E)):g(null,[])}_maybeReady(){if(this._debug("maybeReady pc %s channel %s",this._pcReady,this._channelReady),this._connected||this._connecting||!this._pcReady||!this._channelReady)return;this._connecting=!0;const g=()=>{this.destroyed||this.getStats((C,E)=>{if(this.destroyed)return;C&&(E=[]);const j={},R={},O={};let P=!1;E.forEach(A=>{(A.type==="remotecandidate"||A.type==="remote-candidate")&&(j[A.id]=A),(A.type==="localcandidate"||A.type==="local-candidate")&&(R[A.id]=A),(A.type==="candidatepair"||A.type==="candidate-pair")&&(O[A.id]=A)});const L=A=>{P=!0;let $=R[A.localCandidateId];$&&($.ip||$.address)?(this.localAddress=$.ip||$.address,this.localPort=+$.port):$&&$.ipAddress?(this.localAddress=$.ipAddress,this.localPort=+$.portNumber):typeof A.googLocalAddress=="string"&&($=A.googLocalAddress.split(":"),this.localAddress=$[0],this.localPort=+$[1]),this.localAddress&&(this.localFamily=this.localAddress.includes(":")?"IPv6":"IPv4");let F=j[A.remoteCandidateId];F&&(F.ip||F.address)?(this.remoteAddress=F.ip||F.address,this.remotePort=+F.port):F&&F.ipAddress?(this.remoteAddress=F.ipAddress,this.remotePort=+F.portNumber):typeof A.googRemoteAddress=="string"&&(F=A.googRemoteAddress.split(":"),this.remoteAddress=F[0],this.remotePort=+F[1]),this.remoteAddress&&(this.remoteFamily=this.remoteAddress.includes(":")?"IPv6":"IPv4"),this._debug("connect local: %s:%s remote: %s:%s",this.localAddress,this.localPort,this.remoteAddress,this.remotePort)};if(E.forEach(A=>{A.type==="transport"&&A.selectedCandidatePairId&&L(O[A.selectedCandidatePairId]),(A.type==="googCandidatePair"&&A.googActiveConnection==="true"||(A.type==="candidatepair"||A.type==="candidate-pair")&&A.selected)&&L(A)}),!P&&(!Object.keys(O).length||Object.keys(R).length))return void setTimeout(g,100);if(this._connecting=!1,this._connected=!0,this._chunk){try{this.send(this._chunk)}catch($){return this.destroy(h($,"ERR_DATA_CHANNEL"))}this._chunk=null,this._debug('sent chunk from "write before connect"');const A=this._cb;this._cb=null,A(null)}typeof this._channel.bufferedAmountLowThreshold!="number"&&(this._interval=setInterval(()=>this._onInterval(),150),this._interval.unref&&this._interval.unref()),this._debug("connect"),this.emit("connect")})};g()}_onInterval(){this._cb&&this._channel&&!(this._channel.bufferedAmount>k)&&this._onChannelBufferedAmountLow()}_onSignalingStateChange(){this.destroyed||(this._pc.signalingState==="stable"&&(this._isNegotiating=!1,this._debug("flushing sender queue",this._sendersAwaitingStable),this._sendersAwaitingStable.forEach(g=>{this._pc.removeTrack(g),this._queuedNegotiation=!0}),this._sendersAwaitingStable=[],this._queuedNegotiation?(this._debug("flushing negotiation queue"),this._queuedNegotiation=!1,this._needsNegotiation()):(this._debug("negotiated"),this.emit("negotiated"))),this._debug("signalingStateChange %s",this._pc.signalingState),this.emit("signalingStateChange",this._pc.signalingState))}_onIceCandidate(g){this.destroyed||(g.candidate&&this.trickle?this.emit("signal",{type:"candidate",candidate:{candidate:g.candidate.candidate,sdpMLineIndex:g.candidate.sdpMLineIndex,sdpMid:g.candidate.sdpMid}}):!g.candidate&&!this._iceComplete&&(this._iceComplete=!0,this.emit("_iceComplete")),g.candidate&&this._startIceCompleteTimeout())}_onChannelMessage(g){if(this.destroyed)return;let C=g.data;C instanceof ArrayBuffer&&(C=v.from(C)),this.push(C)}_onChannelBufferedAmountLow(){if(!this.destroyed&&this._cb){this._debug("ending backpressure: bufferedAmount %d",this._channel.bufferedAmount);const g=this._cb;this._cb=null,g(null)}}_onChannelOpen(){this._connected||this.destroyed||(this._debug("on channel open"),this._channelReady=!0,this._maybeReady())}_onChannelClose(){this.destroyed||(this._debug("on channel close"),this.destroy())}_onTrack(g){this.destroyed||g.streams.forEach(C=>{this._debug("on track"),this.emit("track",g.track,C),this._remoteTracks.push({track:g.track,stream:C}),this._remoteStreams.some(E=>E.id===C.id)||(this._remoteStreams.push(C),p(()=>{this._debug("on stream"),this.emit("stream",C)}))})}_debug(){const g=[].slice.call(arguments);g[0]="["+this._id+"] "+g[0],c.apply(null,g)}}b.WEBRTC_SUPPORT=!!u(),b.config={iceServers:[{urls:["stun:stun.l.google.com:19302","stun:global.stun.twilio.com:3478"]}],sdpSemantics:"unified-plan"},b.channelConfig={},s.exports=b},{buffer:3,debug:4,"err-code":6,"get-browser-rtc":8,"queue-microtask":13,randombytes:14,"readable-stream":29}]},{},[])("/")})})(zL);var TY=zL.exports;const OY=Ha(TY);var jY=OY;function N0(e,t){e.send(JSON.stringify(t))}var UL="signaling.rxdb.info",YE="wss://"+UL+"/",QE=!1,LY=1e3*60*2;function IY({signalingServerUrl:e,wrtc:t,config:r,webSocketConstructor:n}){MY(),e=e||YE,n=n||WebSocket,e.includes(UL)&&!QE&&(QE=!0,console.warn(["RxDB Warning: You are using the RxDB WebRTC replication plugin","but you did not specify your own signaling server url.","By default it will use a signaling server provided by RxDB at "+YE,"This server is made for demonstration purposes and tryouts. It is not reliable and might be offline at any time.","In production you must always use your own signaling server instead.","Learn how to run your own server at https://rxdb.info/replication-webrtc.html","Also leave a ⭐ at the RxDB github repo 🙏 https://github.com/pubkey/rxdb 🙏"].join(" ")));var i=async o=>{var s=new Ir,a=new Ir,l=new Ir,c=new Ir,u=new Ir,d=new Map,f=!1,p,h=void 0;v(),(async()=>{for(;await WO(LY/2),!f;)h&&N0(h,{type:"ping"})})();function v(){f||(h=new n(e),h.onclose=()=>v(),h.onopen=()=>{St(h).onmessage=b=>{var x=JSON.parse(b.data);switch(x.type){case"init":p=x.yourPeerId,N0(St(h),{type:"join",room:o.topic});break;case"joined":var g=function(E){var j=!1,R=new jY({initiator:E>p,wrtc:t,config:r,trickle:!0});R.id=sc(10),d.set(E,R),R.on("signal",O=>{N0(St(h),{type:"signal",senderPeerId:p,receiverPeerId:E,room:o.topic,data:O})}),R.on("data",O=>{O=JSON.parse(O.toString()),O.result?c.next({peer:R,response:O}):l.next({peer:R,message:O})}),R.on("error",O=>{u.next(it("RC_WEBRTC_PEER",{error:O})),R.destroy(),j||(j=!0,a.next(R))}),R.on("connect",()=>{s.next(R)}),R.on("close",()=>{j||(j=!0,a.next(R)),g(E)})};x.otherPeerIds.forEach(E=>{E===p||d.has(E)||g(E)});break;case"signal":var C=Ws(d,x.senderPeerId);C.signal(x.data);break}}})}var k={error$:u,connect$:s,disconnect$:a,message$:l,response$:c,async send(b,x){await b.send(JSON.stringify(x))},destroy(){return f=!0,St(h).close(),u.complete(),s.complete(),a.complete(),l.complete(),c.complete(),Ri}};return k};return i}function MY(){if(typeof So>"u"||typeof So.nextTick!="function")throw it("RC7")}async function AY(e){var t=e.collection;Ju(gS),e.pull&&(e.pull.batchSize||(e.pull.batchSize=20)),e.push&&(e.push.batchSize||(e.push.batchSize=20)),t.database.multiInstance&&await t.database.waitForLeadership();var r=0,n=sc(10);function i(){var l=r++;return t.database.token+"|"+n+"|"+l}var o=await t.database.storageToken,s=new NY(t,e,await e.connectionHandlerCreator(e));s.subs.push(s.connectionHandler.error$.subscribe(l=>s.error$.next(l)),s.connectionHandler.disconnect$.subscribe(l=>s.removePeer(l))),s.subs.push(s.connectionHandler.message$.pipe(Wt(l=>l.message.method==="token")).subscribe(l=>{s.connectionHandler.send(l.peer,{id:l.message.id,result:o})}));var a=s.connectionHandler.connect$.pipe(Wt(()=>!s.canceled)).subscribe(async l=>{if(e.isPeerValid){var c=await e.isPeerValid(l);if(!c)return}var u;try{var d=await A0(s.connectionHandler,l,{id:i(),method:"token",params:[]});u=d.result}catch(b){s.error$.next(it("RC_WEBRTC_PEER",{error:b}));return}var f=await kY(t.database.hashFunction,o,u),p;if(f){var h=s.masterReplicationHandler,v=h.masterChangeStream$.subscribe(b=>{var x={id:"masterChangeStream$",result:b};s.connectionHandler.send(l,x)});s.subs.push(v,s.connectionHandler.disconnect$.pipe(Wt(b=>b===l)).subscribe(()=>v.unsubscribe()));var k=s.connectionHandler.message$.pipe(Wt(b=>b.peer===l),Wt(b=>b.message.method!=="token")).subscribe(async b=>{var{peer:x,message:g}=b,C=h[g.method].bind(h),E=await C(...g.params),j={id:g.id,result:E};s.connectionHandler.send(x,j)});s.subs.push(k)}else p=sY({replicationIdentifier:[t.name,e.topic,u].join("||"),collection:t,autoStart:!0,deletedField:"_deleted",live:!0,retryTime:e.retryTime,waitForLeadership:!1,pull:e.pull?Object.assign({},e.pull,{async handler(b){var x=await A0(s.connectionHandler,l,{method:"masterChangesSince",params:[b,St(e.pull).batchSize],id:i()});return x.result},stream$:s.connectionHandler.response$.pipe(Wt(b=>b.response.id==="masterChangeStream$"),qt(b=>b.response.result))}):void 0,push:e.push?Object.assign({},e.push,{async handler(b){var x=await A0(s.connectionHandler,l,{method:"masterWrite",params:[b],id:i()});return x.result}}):void 0});s.addPeer(l,p)});return s.subs.push(a),s}var NY=function(){function e(r,n,i){this.peerStates$=new ks(new Map),this.canceled=!1,this.subs=[],this.error$=new Ir,this.collection=r,this.options=n,this.connectionHandler=i,this.collection.onDestroy.push(()=>this.cancel()),this.masterReplicationHandler=uK(r.storageInstance,r.conflictHandler,r.database.token)}var t=e.prototype;return t.addPeer=function(n,i){var o={peer:n,replicationState:i,subs:[]};this.peerStates$.next(this.peerStates$.getValue().set(n,o)),i&&o.subs.push(i.error$.subscribe(s=>this.error$.next(s)))},t.removePeer=function(n){var i=Ws(this.peerStates$.getValue(),n);this.peerStates$.getValue().delete(n),this.peerStates$.next(this.peerStates$.getValue()),i.subs.forEach(o=>o.unsubscribe()),i.replicationState&&i.replicationState.cancel()},t.awaitFirstPeer=function(){return Gr(this.peerStates$.pipe(Wt(n=>n.size>0)))},t.cancel=async function(){this.canceled||(this.canceled=!0,this.subs.forEach(n=>n.unsubscribe()),Array.from(this.peerStates$.getValue().keys()).forEach(n=>{this.removePeer(n)}),await this.connectionHandler.destroy())},e}();Ju(fY);Ju(yY);Ju(gS);Ju(_Y);function DY(e){return Promise.all(e.character_traits.map(t=>t.split(/[[\]]/)).map(async([t,r])=>{const n=await ar.character_traits.findOne(t.trim()).exec();return Object.assign({},n==null?void 0:n.toMutableJSON(),{parameter:r==null?void 0:r.trim()})}))}const BY={expand:async function(){const e=await ar.getLocal("gbdata_meta"),[t,r]=await Promise.all([this.populate("character_plays").then(i=>i.map(o=>o.toMutableJSON())),DY(this)]);return Object.assign({},this.toMutableJSON(),{character_plays:t,character_traits:r,_inf:this.id==="Pneuma"?0:void 0,statLine:`${this.jog}"/${this.sprint}" | ${this.tac} | ${this.kickdice}/${this.kickdist}" | ${this.def}+ | ${this.arm} | ${this.inf}/${this.infmax} | ${this.reach?2:1}"`,version:e==null?void 0:e.get("version")})}},$Y={title:"Guild Ball model",version:0,primaryKey:"id",type:"object",properties:{id:{type:"string",maxLength:32},name:{type:"string"},captain:{type:"boolean",default:!1},mascot:{type:"boolean",default:!1},veteran:{type:"boolean",default:!1},seasoned:{type:"boolean",default:!1},hp:{type:"integer",minimum:0},recovery:{type:"integer",minimum:0},jog:{type:"integer",minimum:0},sprint:{type:"integer",minimum:0},tac:{type:"integer",minimum:1},kickdice:{type:"integer",minimum:1},kickdist:{type:"integer",minimum:0},def:{type:"integer",minimum:1,maximum:6},arm:{type:"integer",minimum:0},inf:{type:"integer",minimum:0},infmax:{type:"integer",minimum:0},reach:{type:"boolean",default:!1},benched:{type:"string"},dehcneb:{type:"string"},playbook:{type:"array",minItems:2,maxItems:2,items:{type:"array",minItems:7,maxItems:7,items:{type:["string","null"]}}},character_plays:{type:"array",ref:"character_plays",items:{type:"string"}},character_traits:{type:"array",ref:"character_traits",items:{type:"string"}},heroic:{type:"string"},legendary:{type:"string"},types:{type:"string"},base:{type:"integer",enum:[30,40,50]},guild1:{type:"string",maxLength:32},guild2:{type:"string",maxLength:32,default:""},gbcp:{type:"boolean",default:!1}},required:["name","hp","recovery","jog","sprint","tac","kickdice","kickdist","def","arm","inf","infmax","playbook","types","base","guild1"],indexes:["guild1","guild2"]},FY={title:"Guild Ball guild",version:0,primaryKey:"name",type:"object",properties:{name:{type:"string",maxLength:32},minor:{type:"boolean",default:!1},color:{type:"string"},shadow:{type:"string"},darkColor:{type:"string"},roster:{type:"array",items:{type:"string"}}},required:["color","roster"]},zY={title:"Guild Ball character play",version:0,primaryKey:"name",type:"object",properties:{name:{type:"string",maxLength:64},text:{type:"string"},CST:{type:["string","integer"]},RNG:{type:["string","integer"]},SUS:{type:"boolean",default:!1},OPT:{type:"boolean",default:!1}},required:["text","CST","RNG","SUS","OPT"]},UY={title:"Guild Ball character trait",version:0,primaryKey:"name",type:"object",properties:{name:{type:"string",maxLength:64},active:{type:"boolean",default:!1},text:{type:"string"}},required:["text"]},GY={title:"Guild Ball Game State",version:0,primaryKey:"_id",type:"object",properties:{_id:{type:"string",maxLength:128},guild:{type:"string",ref:"guilds"},score:{type:"integer",minimum:0,default:0},momentum:{type:"integer",minimum:0,default:0},roster:{type:"array",items:{type:"object",properties:{name:{type:"string",ref:"models"},health:{type:"integer",minimum:0}},required:["name","health"]}},currentStep:{type:"string",enum:["Guilds","Draft","Game"]},navigateTo:{type:"string",enum:["Guilds","Draft","Game"]}}},ar=await bK({name:"gb_playbook",localDocuments:!0,storage:Xq()});await ar.addCollections({guilds:{schema:FY},models:{schema:$Y,methods:BY},character_plays:{schema:zY},character_traits:{schema:UY},game_state:{schema:GY,localDocuments:!0}});const WY={iceServers:[{urls:["stun:stun.l.google.com:19302","stun:global.stun.twilio.com:3478"]},{urls:["turn:standard.relay.metered.ca:80","turn:standard.relay.metered.ca:80?transport=tcp","turn:standard.relay.metered.ca:443","turns:standard.relay.metered.ca:443?transport=tcp"],username:"25ee3bdfcc273a8e3ae9db71",credential:"XVIpxKTNnMR7XQDK"}]};function yS(e,t){return AY({collection:ar.game_state,connectionHandlerCreator:IY({signalingServerUrl:e,config:WY}),topic:t,pull:{},push:{}}).then(r=>(r.error$.subscribe(n=>{console.log("replication error:"),console.dir(n)}),r.peerStates$.subscribe(n=>{console.log("new peer states:"),console.dir(n)}),r))}const GL=_.createContext({}),HY=e=>{const t=_.useMemo(()=>ar.getLocal$("settings"),[]);return _.useEffect(()=>{if(!t)return;const r=t.subscribe(n=>{if(!n){ar==null||ar.upsertLocal("settings",WL).catch(console.error);return}});return()=>r.unsubscribe()},[t]),y.jsx(GL.Provider,{value:{setting$:t},children:e.children})},di=()=>_.useContext(GL),WL={dataSet:"GB-Playbook-4-6.json",language:"auto",initialScreen:"/game",gameSize:6,networkPlay:!1,uiPreferences:{displayStatLine:!1},cardPreferences:{preferredStyle:"gbcp"},gamePlayRoute:"/game",libraryRoute:"/library"},bS=_.createContext(null),ps=e=>{const t=_.useContext(bS);return y.jsx(Cx,{container:t,children:e.children})},VY=Lt.forwardRef((e,t)=>y.jsx(p3,{position:"static",className:"no-print",children:y.jsxs(v3,{variant:"dense",children:[y.jsx(tr,{ref:t,sx:{display:"flex",flexDirection:"row",width:"100%"}}),y.jsx(Io,{size:"small",color:"inherit",onClick:e.onClick,children:y.jsx(uO,{})})]})})),XE=Lt.forwardRef((e,t)=>{const{href:r,...n}=e;return y.jsx(pT,{ref:t,to:r,...n,role:void 0})}),KY=yv({palette:{mode:"dark",primary:{main:"#3d708f"},secondary:{main:"#ffb300"},background:{default:"#121a22"}},components:{MuiCssBaseline:{styleOverrides:{body:{background:"linear-gradient(120deg, black, #221a22, #5f405f, #221a22, black)"},"@media print":{body:{background:"white"}}}},MuiLink:{defaultProps:{component:XE}},MuiButtonBase:{defaultProps:{LinkComponent:XE}}}}),_h=e=>y.jsx(fB,{to:e.to,style:{textDecoration:"inherit",color:"inherit"},onClick:e.onClick,children:({isActive:t})=>y.jsx(zF,{selected:t,children:e.children})}),qY=()=>{const[e,t]=_.useState(null),[r,n]=_.useState(!1);return y.jsxs(i6,{theme:KY,children:[y.jsx(pU,{}),y.jsxs("div",{className:"App",children:[y.jsx(VY,{ref:i=>t(i),onClick:()=>n(!0)}),y.jsx(YY,{drawer:r,setDrawer:n}),y.jsx(bS.Provider,{value:e,children:y.jsx(Jw,{})})]})]})};function YY(e){const{drawer:t,setDrawer:r}=e,{setting$:n}=di(),[i,o]=_.useState(),[s,a]=_.useState();return _.useEffect(()=>{const l=n==null?void 0:n.pipe(qt(u=>u==null?void 0:u.toJSON().data.gamePlayRoute)).subscribe(u=>o(u)),c=n==null?void 0:n.pipe(qt(u=>u==null?void 0:u.toJSON().data.libraryRoute)).subscribe(u=>a(u));return()=>{l==null||l.unsubscribe(),c==null||c.unsubscribe()}}),y.jsxs(LF,{anchor:"right",open:t,onClose:()=>r(!1),PaperProps:{sx:{width:"275px"}},ModalProps:{keepMounted:!0},children:[y.jsxs(sf,{children:[y.jsxs(vo,{children:[y.jsx("img",{src:new URL("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAJaUlEQVRYR+2YeVjVVRrHP3fj3ssqYCwqoA5iYvloljbYOE8GqOk8hDpZrizqkE5mapmKWGJj82SFKYwLomTpqJTmxthoY5lLZW65IEEsAgKxidcLd4E7zzkoiVzF0uqPmXMf/uD3u+fc7/m+3+973vcoxm2IsnEvhgIaLY0Ufp2P1WxFoVDci1VR/B/gXfL4izDYYGmQIbbZ7l499xQgVsj/6nvqjHWoVWo0ag0NjQ13xeE9A6hUKjBcNVJ2ogQ3nRtGk5HK2iqc9U6/PUClQkmdpY6e3sFM6DOOLj6dMZgMpO1YT/rudHRa3c8O910zqECB1daAi4MTb0cuRWlV8P4H7xPy+xB6PtCTWe/OZt+xT3FxdKaxsfEns3nXAAV7BvNVHunUl1fCXuLFmS+S9E4SQUFBnM86z47PdzB/1QI8XD1+lh7vGKBw5fUP2BD+FC4VzwXAR/36MTv0RSZOnMimjZvo0KEDBQUF7D68h7kp81oAFLPF3DtxeZsABUONtkZMVhPWxgZstkYJVKlU4qByQKvWcsVsoH+nR3gpdCYxsTGsS1tH586dycvLY+ehXcxcNgsnnTPWBosMsUqlQuegw0HtINe+HdBbApRHlQ3Jjk6txd/NDz/3TrjqXTFbLZTVlpFfXUB1XTXmBgsDuzzGrCdmEB0Tzfp16wkICCA/P5+dX+xixdZk+vfsRzsXd8wWM4VlhWQVZFFe/YN0uVqtvqU+7QIUrFkaLHJ3A7v+gcg+Efg6+9gV+KfZB/jgm00EtPMnYej8ZoBdu3bl7JmzoEKydfMQrt/0r3+SnvkeBqMBR52jXY22AiiYszRY0Wt0THssjr5+D1FeWs6GjRs4dPgwZWVl6HQ6evYIJvKpSB4f9DhXrUYOZR8mPDi0VYhN9SY2btrI3r17KSouknMffOBBxo8bx0N9+5JXkiedXlBaiF6nb8VkK4DX9TA/9BV6+N7P8uQVvLpwIVWVVXYZfHLYk6SlpuHt4y3fT4qdxNq0tQQHB7Ny5Uri4uI4d+5cq7mCiKnTprJi+QqKyouISozmitEgw32jJlsAFKG9YrpCbP9ohvUcSuLriSTEJ8jFu/h1IjwiEqeOfpiMRrIPH+Tf+/fLd926dePAgQP4+voSHR1Neno6Hh4e1NXVyb/Q0FDCwsJwdnaWYDMyMmQkxIiOiSFt7Voyj2QyJ3kurs6uLVhsBih2ZLaa8XH25u0Rb3L0yFEGDBggF4kYEs5TS5LI0jgzwNudK/Vmgh017Exdxd8S4qk3mYiIiGD79u1MmDCBDRs2SJcLJtLS0oiKimrB4MWLFxk7diwHDx6UzzMzMxkyZAij458lpygHvVYv9S9GM0CVQsXl+ss83XsUz/YdzfA/DWfPrj0EBvgze1smju3v49KlUiorayi+WIyXWskLTw1l6avzWb78XbmYSCtLly4lOTlZ/h8fH09iYiJWq7UZoACt0WioqKigV69elJaWSh3v37ef1dvXsGzrcjxc3WloaCoymgHKE8Fk4LVhCfzOqSuduvhRVVHJ9JfnED57Pp9/+Q1FpT/gpVLygKcrLiYTaqMRn473MezpEdRU10jN5eTkSJBubm5kZ2fj6ekpk7lg9Powm804ODgwb948lixZgru7O8VFxZwpPMuk1yfj4uTSHOYWGhQhXjb6bYxFVwnsHihDFL/8HwQ+OpBTJ7+lt7cnTqZ6qvMKqLmQg8OVWob+ZSKjZ8/gxIkTzJkzR+5cAOzTpw/Hjx+3ayzBqEjW27ZtY+TIkSiUCnKzc1G5qhjx8ii0Gu21s+oGBsVKFquF5c8kUZ1XRffg7k1hWrKUkD8+gflSCUVnzmP4Pg+9wYCvV3t8vTwJCnucoTOe5/ixYxKgYOuNN96gd+/eEqC93uRmgILdnOwclC4qRs75iQCfi5vK+BHP8PWO3SgrKvHz9cLT3Q1NRQWqgkLcpk2m//ix1JSXk5KSIpmZMmUKrq6uMsTt27dvFWKLxSJ1OHfuXLkZIYOii0WcyjvN5CVTcHX60cktQnwzg6IvC+jalc1Ll6E3XOVyXj6qsjKsF7LRqtX0+2scr+zfy9+TkiTbp06dQqfX0T3oGvvXTCIAXWfSnkmGDB3Cnt17SM5IIWXbSvsmsRdiQb2o4cJCQ1m94FU8KyqpPXwUtwB/VI560msqmB4fj6W+noEDB/LZZ59JoJGRkTLlaLVaaZyb00xJSQljxoxp/r5INyEDQhg192l5TmsdtM3J+rYMih/z8fGRqaBDgD+jnxyGv5MLRoWN/V9+yacij9lsMpxHjh4hMDBQ5q/L1ZdlDs3NzZWABw8ezKBBg2SizsrK4sMPP0SAFGNBwgIWvbaIzfu2sHj967RzbtfiTL41wJ7dZTWzatUqRGJdvHixXUfe36MH69evo3+//qT8ZxXfncvmnWlvUVxczMSoKPbv22d3nkgtCQsTmPHCDE5/d5rn3pwmNyfSXVO12TTaBJiamkpsbCxfHf2KLRmbOXnyJCaTiQ4dOxIeFk70hGiUGiWbjm/moxPbyPniOwY/HE5i3CI0Kg2ffPIJH3/8MVkXshCFg7e3NyEhIYwfNx4vby8OnT5E/OoEDMaraDVN9eGNo02Aq1evJiYmBpvKhhp1KzbOl2ex5ZsMTpd+i16pp+hYIZVVlXTz70bM8GiGDxhml8GCsgLSd73Hji92NhW/ApydnqVNgGtWr2HS5EnM+mgOLjpn/D38UCs11Birya8qpKi2WFbZjlpHeScj7mZsVhv15npZnHZo70uQXxAdvTpKENW11eQWf09OcQ7GeqNMKWLcqqpuE2DqmlRiJ8Xy3JbnKaktQa1UN2tFNOei5BctQKP43HB5pFKqZGoxWUyYzKZm4YtnoqEXRaz4TluNvV2AlbkVBPcKloJNXpHMlLgpTN86k8q6SrRqB2FcKeTrzU+Tmu3fbslm61rDdT3Wgq2btWZXBzeaRLAgGqOkP79FY5WVTv5+ck7G1q2MHDWKqVumy/5D7N5uOH7p6zeVQkmtycD4h8cQ2StCuu/SpUuyjbxQns3CzEWyi7sxBbS0269wPyiYEWGd2G8cTwQNkr9/pvQsqw6lUmGokGnjNwUoxW5rpN5qwkPvLg1RVVclTXDL0DZn1F+BwSatN4latJ2CLY1SIw3Q5i3AL63Bm10kgMr8dMOxcyun3c7Ft51zBy/bvPq4gzWuHZq/UojvGFBryv83b/n/CxJONjR0KMriAAAAAElFTkSuQmCC",import.meta.url).href,style:{borderRadius:5.4},alt:""}),y.jsx(Cs,{style:{textAlign:"center"},children:y.jsx(_t,{variant:"h6",fontFamily:"Comfortaa",children:"GB Playbook"})})]}),y.jsx(Zi,{}),y.jsx(_h,{to:i??"/game",onClick:()=>r(!1),children:y.jsx(Cs,{children:"Game Play"})}),y.jsx(_h,{to:s??"/library",onClick:()=>r(!1),children:y.jsx(Cs,{children:"Library"})}),y.jsx(_h,{to:"/print",onClick:()=>r(!1),children:y.jsx(Cs,{children:"Card Printer"})}),y.jsx(_h,{to:"/settings",onClick:()=>r(!1),children:y.jsx(Cs,{children:"Settings"})}),y.jsx("nav",{style:{display:"flex",flexDirection:"column",marginLeft:"1em"},children:y.jsx(vo,{disablePadding:!0,children:y.jsx(xo,{component:"a",target:"_blank",rel:"noopener noreferrer",href:"https://github.com/cleech/GBPlaybook/blob/pwa/README.md",children:"About"})})})]}),y.jsx(Zi,{}),y.jsxs(sf,{children:[y.jsx(vo,{children:y.jsx(Cs,{children:"Rules Documents:"})}),y.jsxs("nav",{style:{display:"flex",flexDirection:"column",marginLeft:"2em"},children:[y.jsx(vo,{disablePadding:!0,children:y.jsx(xo,{component:"a",target:"_blank",rel:"noopener noreferrer",href:"https://docs.guildball.app/GB-S4-Rulebook-4.1.pdf",children:"Season 4 Core Rulebook"})}),y.jsx(vo,{disablePadding:!0,children:y.jsx(xo,{component:"a",target:"_blank",rel:"noopener noreferrer",href:"https://docs.guildball.app/GB-S4-FAQ-19-12-20.pdf",children:"Season 4 FAQ"})}),y.jsx(vo,{disablePadding:!0,children:y.jsx(xo,{component:"a",target:"_blank",rel:"noopener noreferrer",href:"https://docs.guildball.app/GB-S4-RegionalCup-Rules-200128__1.pdf",children:"Organized Play Rules"})})]})]}),y.jsx(Zi,{}),y.jsxs(sf,{children:[y.jsx(vo,{children:y.jsx(Cs,{children:"Community Links:"})}),y.jsxs("nav",{style:{display:"flex",flexDirection:"column",marginLeft:"2em"},children:[y.jsx(vo,{disablePadding:!0,children:y.jsx(xo,{component:"a",target:"_blank",rel:"noopener noreferrer",href:"https://steamforged.com/pages/guild-ball",children:"Steamforged Games"})}),y.jsx(vo,{disablePadding:!0,children:y.jsx(xo,{component:"a",target:"_blank",rel:"noopener noreferrer",href:"https://discord.gg/fvpFSfm976",children:"Guild Ball Community Project"})}),y.jsx(vo,{disablePadding:!0,children:y.jsx(xo,{component:"a",target:"_blank",rel:"noopener noreferrer",href:"https://www.longshanks.org/systems/guildball/",children:"Longshanks"})})]})]})]})}const QY=Wr(y.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"Add"),XY=Wr([y.jsx("path",{d:"M5 19h14V5H5zM16.5 6c.83 0 1.5.67 1.5 1.5S17.33 9 16.5 9 15 8.33 15 7.5 15.67 6 16.5 6m0 9c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5-1.5-.67-1.5-1.5.67-1.5 1.5-1.5M12 10.5c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5-1.5-.67-1.5-1.5.67-1.5 1.5-1.5M7.5 6C8.33 6 9 6.67 9 7.5S8.33 9 7.5 9 6 8.33 6 7.5 6.67 6 7.5 6m0 9c.83 0 1.5.67 1.5 1.5S8.33 18 7.5 18 6 17.33 6 16.5 6.67 15 7.5 15",opacity:".3"},"0"),y.jsx("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m0 16H5V5h14z"},"1"),y.jsx("circle",{cx:"7.5",cy:"16.5",r:"1.5"},"2"),y.jsx("circle",{cx:"7.5",cy:"7.5",r:"1.5"},"3"),y.jsx("circle",{cx:"12",cy:"12",r:"1.5"},"4"),y.jsx("circle",{cx:"16.5",cy:"16.5",r:"1.5"},"5"),y.jsx("circle",{cx:"16.5",cy:"7.5",r:"1.5"},"6")],"CasinoTwoTone"),HL=Wr([y.jsx("path",{d:"M12 4c-4.41 0-8 3.59-8 8s3.59 8 8 8 8-3.59 8-8-3.59-8-8-8m-2 13-4-4 1.41-1.41L10 14.17l6.59-6.59L18 9z",opacity:".3"},"0"),y.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8m4.59-12.42L10 14.17l-2.59-2.58L6 13l4 4 8-8z"},"1")],"CheckCircleTwoTone"),wS=Wr(y.jsx("path",{d:"M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"}),"Home"),lc=Wr(y.jsx("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"NavigateNext"),JY=Wr(y.jsx("path",{d:"M19 13H5v-2h14z"}),"Remove"),ZY=Wr(y.jsx("path",{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6"}),"Settings"),eQ=Wr(y.jsx("path",{d:"M12 4V1L8 5l4 4V6c3.31 0 6 2.69 6 6 0 1.01-.25 1.97-.7 2.8l1.46 1.46C19.54 15.03 20 13.57 20 12c0-4.42-3.58-8-8-8m0 14c-3.31 0-6-2.69-6-6 0-1.01.25-1.97.7-2.8L5.24 7.74C4.46 8.97 4 10.43 4 12c0 4.42 3.58 8 8 8v3l4-4-4-4z"}),"Sync"),tQ=new Intl.NumberFormat(void 0,{style:"percent",minimumFractionDigits:1,maximumFractionDigits:1});function im(e){return e===0?1:e*im(e-1)}function rQ(e,t,r){if(!e||!t)return[];const n=t,o=1-Math.pow((e-1)/6,r?2:1),s=[...Array(t).keys()].map(l=>l+1).map(l=>im(n)/(im(l)*im(n-l))*Math.pow(o,l)*Math.pow(1-o,n-l));return[...Array(t).keys()].map(l=>s.slice(l).reduce((c,u)=>c+u,0)).map(l=>Math.min(l,.999))}function JE(e){const{value:t,setValue:r,clamp:n}=e;return y.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:y.jsxs(qf,{size:"small",variant:"contained",children:[y.jsx(br,{onClick:i=>{i.stopPropagation(),n(t-1)&&r(t-1)},children:y.jsx(JY,{fontSize:"inherit",sx:{pointerEvents:"none"}})}),y.jsx(br,{disabled:!0,size:"small",children:y.jsx(_t,{variant:"body2",color:"text.primary",children:t})}),y.jsx(br,{onClick:i=>{i.stopPropagation(),n(t+1)&&r(t+1)},children:y.jsx(QY,{fontSize:"inherit",sx:{pointerEvents:"none"}})})]})})}function nQ(){const[e,t]=_.useState(null),r=!!e,[n,i]=_.useState(4),[o,s]=_.useState(4),[a,l]=_.useState(!1);return y.jsxs(y.Fragment,{children:[y.jsx(Io,{size:"small",onClick:c=>{t(e?null:c.currentTarget)},children:y.jsx(XY,{})}),y.jsxs(Nv,{open:r,anchorEl:e,onClose:()=>{t(null)},children:[y.jsx(_t,{variant:"h5",textAlign:"center",children:"Dice Odds"}),y.jsx(Zi,{}),y.jsxs("div",{style:{margin:"1em",display:"grid",gridTemplateColumns:"1fr 1fr",gap:"0.5em"},children:[y.jsx(_t,{children:"Target Number :"}),y.jsx(JE,{value:n,setValue:i,clamp:c=>c>1&&c<7}),y.jsx(_t,{children:"Dice Pool :"}),y.jsx(JE,{value:o,setValue:s,clamp:c=>c>0}),y.jsx(_t,{children:"Reroll :"}),y.jsx(Is,{checked:a,onChange:(c,u)=>{l(u)},sx:{padding:0}})]}),y.jsx(Zi,{}),y.jsxs("div",{style:{margin:"1em",display:"grid",gap:"0em 1em",justifyContent:"center",justifyItems:"center",gridTemplateColumns:"auto auto"},children:[y.jsx(_t,{sx:{textDecoration:"underline"},children:"Hits"}),y.jsx(_t,{sx:{textDecoration:"underline"},children:"Chance"}),rQ(n,o,a).map((c,u)=>y.jsxs(_.Fragment,{children:[y.jsxs("div",{children:[u+1,"+"]}),y.jsx("div",{className:`dice-bin-${Math.floor(c*10)}`,style:{padding:"0 1em",margin:"1px",width:"100%"},children:tQ.format(c)})]},u))]})]})]})}const iQ={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console&&console[e]&&console[e].apply(console,t)}};class lg{constructor(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(t,r)}init(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=r.prefix||"i18next:",this.logger=t||iQ,this.options=r,this.debug=r.debug}log(){for(var t=arguments.length,r=new Array(t),n=0;n{this.observers[n]||(this.observers[n]=new Map);const i=this.observers[n].get(r)||0;this.observers[n].set(r,i+1)}),this}off(t,r){if(this.observers[t]){if(!r){delete this.observers[t];return}this.observers[t].delete(r)}}emit(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i{let[a,l]=s;for(let c=0;c{let[a,l]=s;for(let c=0;c{let e,t;const r=new Promise((n,i)=>{e=n,t=i});return r.resolve=e,r.reject=t,r},ZE=e=>e==null?"":""+e,oQ=(e,t,r)=>{e.forEach(n=>{t[n]&&(r[n]=t[n])})},sQ=/###/g,eR=e=>e&&e.indexOf("###")>-1?e.replace(sQ,"."):e,tR=e=>!e||typeof e=="string",mf=(e,t,r)=>{const n=typeof t!="string"?t:t.split(".");let i=0;for(;i{const{obj:n,k:i}=mf(e,t,Object);if(n!==void 0||t.length===1){n[i]=r;return}let o=t[t.length-1],s=t.slice(0,t.length-1),a=mf(e,s,Object);for(;a.obj===void 0&&s.length;)o=`${s[s.length-1]}.${o}`,s=s.slice(0,s.length-1),a=mf(e,s,Object),a&&a.obj&&typeof a.obj[`${a.k}.${o}`]<"u"&&(a.obj=void 0);a.obj[`${a.k}.${o}`]=r},aQ=(e,t,r,n)=>{const{obj:i,k:o}=mf(e,t,Object);i[o]=i[o]||[],i[o].push(r)},cg=(e,t)=>{const{obj:r,k:n}=mf(e,t);if(r)return r[n]},lQ=(e,t,r)=>{const n=cg(e,r);return n!==void 0?n:cg(t,r)},VL=(e,t,r)=>{for(const n in t)n!=="__proto__"&&n!=="constructor"&&(n in e?typeof e[n]=="string"||e[n]instanceof String||typeof t[n]=="string"||t[n]instanceof String?r&&(e[n]=t[n]):VL(e[n],t[n],r):e[n]=t[n]);return e},Ec=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var cQ={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const uQ=e=>typeof e=="string"?e.replace(/[&<>"'\/]/g,t=>cQ[t]):e;class dQ{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const r=this.regExpMap.get(t);if(r!==void 0)return r;const n=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,n),this.regExpQueue.push(t),n}}const fQ=[" ",",","?","!",";"],pQ=new dQ(20),hQ=(e,t,r)=>{t=t||"",r=r||"";const n=fQ.filter(s=>t.indexOf(s)<0&&r.indexOf(s)<0);if(n.length===0)return!0;const i=pQ.getRegExp(`(${n.map(s=>s==="?"?"\\?":s).join("|")})`);let o=!i.test(e);if(!o){const s=e.indexOf(r);s>0&&!i.test(e.substring(0,s))&&(o=!0)}return o},F1=function(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!e)return;if(e[t])return e[t];const n=t.split(r);let i=e;for(let o=0;o-1&&le&&e.indexOf("_")>0?e.replace("_","-"):e;class nR extends Xv{constructor(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=t||{},this.options=r,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const r=this.options.ns.indexOf(t);r>-1&&this.options.ns.splice(r,1)}getResource(t,r,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const o=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,s=i.ignoreJSONStructure!==void 0?i.ignoreJSONStructure:this.options.ignoreJSONStructure;let a;t.indexOf(".")>-1?a=t.split("."):(a=[t,r],n&&(Array.isArray(n)?a.push(...n):typeof n=="string"&&o?a.push(...n.split(o)):a.push(n)));const l=cg(this.data,a);return!l&&!r&&!n&&t.indexOf(".")>-1&&(t=a[0],r=a[1],n=a.slice(2).join(".")),l||!s||typeof n!="string"?l:F1(this.data&&this.data[t]&&this.data[t][r],n,o)}addResource(t,r,n,i){let o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const s=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator;let a=[t,r];n&&(a=a.concat(s?n.split(s):n)),t.indexOf(".")>-1&&(a=t.split("."),i=r,r=a[1]),this.addNamespaces(r),rR(this.data,a,i),o.silent||this.emit("added",t,r,n,i)}addResources(t,r,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const o in n)(typeof n[o]=="string"||Array.isArray(n[o]))&&this.addResource(t,r,o,n[o],{silent:!0});i.silent||this.emit("added",t,r,n)}addResourceBundle(t,r,n,i,o){let s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},a=[t,r];t.indexOf(".")>-1&&(a=t.split("."),i=n,n=r,r=a[1]),this.addNamespaces(r);let l=cg(this.data,a)||{};s.skipCopy||(n=JSON.parse(JSON.stringify(n))),i?VL(l,n,o):l={...l,...n},rR(this.data,a,l),s.silent||this.emit("added",t,r,n)}removeResourceBundle(t,r){this.hasResourceBundle(t,r)&&delete this.data[t][r],this.removeNamespaces(r),this.emit("removed",t,r)}hasResourceBundle(t,r){return this.getResource(t,r)!==void 0}getResourceBundle(t,r){return r||(r=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(t,r)}:this.getResource(t,r)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const r=this.getDataByLanguage(t);return!!(r&&Object.keys(r)||[]).find(i=>r[i]&&Object.keys(r[i]).length>0)}toJSON(){return this.data}}var KL={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,r,n,i){return e.forEach(o=>{this.processors[o]&&(t=this.processors[o].process(t,r,n,i))}),t}};const iR={};class dg extends Xv{constructor(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),oQ(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=r,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=es.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(t==null)return!1;const n=this.resolve(t,r);return n&&n.res!==void 0}extractFromKey(t,r){let n=r.nsSeparator!==void 0?r.nsSeparator:this.options.nsSeparator;n===void 0&&(n=":");const i=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator;let o=r.ns||this.options.defaultNS||[];const s=n&&t.indexOf(n)>-1,a=!this.options.userDefinedKeySeparator&&!r.keySeparator&&!this.options.userDefinedNsSeparator&&!r.nsSeparator&&!hQ(t,n,i);if(s&&!a){const l=t.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:t,namespaces:o};const c=t.split(n);(n!==i||n===i&&this.options.ns.indexOf(c[0])>-1)&&(o=c.shift()),t=c.join(i)}return typeof o=="string"&&(o=[o]),{key:t,namespaces:o}}translate(t,r,n){if(typeof r!="object"&&this.options.overloadTranslationOptionHandler&&(r=this.options.overloadTranslationOptionHandler(arguments)),typeof r=="object"&&(r={...r}),r||(r={}),t==null)return"";Array.isArray(t)||(t=[String(t)]);const i=r.returnDetails!==void 0?r.returnDetails:this.options.returnDetails,o=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator,{key:s,namespaces:a}=this.extractFromKey(t[t.length-1],r),l=a[a.length-1],c=r.lng||this.language,u=r.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(c&&c.toLowerCase()==="cimode"){if(u){const C=r.nsSeparator||this.options.nsSeparator;return i?{res:`${l}${C}${s}`,usedKey:s,exactUsedKey:s,usedLng:c,usedNS:l,usedParams:this.getUsedParamsDetails(r)}:`${l}${C}${s}`}return i?{res:s,usedKey:s,exactUsedKey:s,usedLng:c,usedNS:l,usedParams:this.getUsedParamsDetails(r)}:s}const d=this.resolve(t,r);let f=d&&d.res;const p=d&&d.usedKey||s,h=d&&d.exactUsedKey||s,v=Object.prototype.toString.apply(f),k=["[object Number]","[object Function]","[object RegExp]"],b=r.joinArrays!==void 0?r.joinArrays:this.options.joinArrays,x=!this.i18nFormat||this.i18nFormat.handleAsObject;if(x&&f&&(typeof f!="string"&&typeof f!="boolean"&&typeof f!="number")&&k.indexOf(v)<0&&!(typeof b=="string"&&Array.isArray(f))){if(!r.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const C=this.options.returnedObjectHandler?this.options.returnedObjectHandler(p,f,{...r,ns:a}):`key '${s} (${this.language})' returned an object instead of string.`;return i?(d.res=C,d.usedParams=this.getUsedParamsDetails(r),d):C}if(o){const C=Array.isArray(f),E=C?[]:{},j=C?h:p;for(const R in f)if(Object.prototype.hasOwnProperty.call(f,R)){const O=`${j}${o}${R}`;E[R]=this.translate(O,{...r,joinArrays:!1,ns:a}),E[R]===O&&(E[R]=f[R])}f=E}}else if(x&&typeof b=="string"&&Array.isArray(f))f=f.join(b),f&&(f=this.extendTranslation(f,t,r,n));else{let C=!1,E=!1;const j=r.count!==void 0&&typeof r.count!="string",R=dg.hasDefaultValue(r),O=j?this.pluralResolver.getSuffix(c,r.count,r):"",P=r.ordinal&&j?this.pluralResolver.getSuffix(c,r.count,{ordinal:!1}):"",L=j&&!r.ordinal&&r.count===0&&this.pluralResolver.shouldUseIntlApi(),A=L&&r[`defaultValue${this.options.pluralSeparator}zero`]||r[`defaultValue${O}`]||r[`defaultValue${P}`]||r.defaultValue;!this.isValidLookup(f)&&R&&(C=!0,f=A),this.isValidLookup(f)||(E=!0,f=s);const F=(r.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&E?void 0:f,K=R&&A!==f&&this.options.updateMissing;if(E||C||K){if(this.logger.log(K?"updateKey":"missingKey",c,l,s,K?A:f),o){const V=this.resolve(s,{...r,keySeparator:!1});V&&V.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let Y=[];const Z=this.languageUtils.getFallbackCodes(this.options.fallbackLng,r.lng||this.language);if(this.options.saveMissingTo==="fallback"&&Z&&Z[0])for(let V=0;V{const Re=R&&ae!==f?ae:F;this.options.missingKeyHandler?this.options.missingKeyHandler(V,l,H,Re,K,r):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(V,l,H,Re,K,r),this.emit("missingKey",V,l,H,f)};this.options.saveMissing&&(this.options.saveMissingPlurals&&j?Y.forEach(V=>{const H=this.pluralResolver.getSuffixes(V,r);L&&r[`defaultValue${this.options.pluralSeparator}zero`]&&H.indexOf(`${this.options.pluralSeparator}zero`)<0&&H.push(`${this.options.pluralSeparator}zero`),H.forEach(ae=>{le([V],s+ae,r[`defaultValue${ae}`]||A)})}):le(Y,s,A))}f=this.extendTranslation(f,t,r,d,n),E&&f===s&&this.options.appendNamespaceToMissingKey&&(f=`${l}:${s}`),(E||C)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?f=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}:${s}`:s,C?f:void 0):f=this.options.parseMissingKeyHandler(f))}return i?(d.res=f,d.usedParams=this.getUsedParamsDetails(r),d):f}extendTranslation(t,r,n,i,o){var s=this;if(this.i18nFormat&&this.i18nFormat.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});const c=typeof t=="string"&&(n&&n.interpolation&&n.interpolation.skipOnVariables!==void 0?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let u;if(c){const f=t.match(this.interpolator.nestingRegexp);u=f&&f.length}let d=n.replace&&typeof n.replace!="string"?n.replace:n;if(this.options.interpolation.defaultVariables&&(d={...this.options.interpolation.defaultVariables,...d}),t=this.interpolator.interpolate(t,d,n.lng||this.language||i.usedLng,n),c){const f=t.match(this.interpolator.nestingRegexp),p=f&&f.length;u1&&arguments[1]!==void 0?arguments[1]:{},n,i,o,s,a;return typeof t=="string"&&(t=[t]),t.forEach(l=>{if(this.isValidLookup(n))return;const c=this.extractFromKey(l,r),u=c.key;i=u;let d=c.namespaces;this.options.fallbackNS&&(d=d.concat(this.options.fallbackNS));const f=r.count!==void 0&&typeof r.count!="string",p=f&&!r.ordinal&&r.count===0&&this.pluralResolver.shouldUseIntlApi(),h=r.context!==void 0&&(typeof r.context=="string"||typeof r.context=="number")&&r.context!=="",v=r.lngs?r.lngs:this.languageUtils.toResolveHierarchy(r.lng||this.language,r.fallbackLng);d.forEach(k=>{this.isValidLookup(n)||(a=k,!iR[`${v[0]}-${k}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(a)&&(iR[`${v[0]}-${k}`]=!0,this.logger.warn(`key "${i}" for languages "${v.join(", ")}" won't get resolved as namespace "${a}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),v.forEach(b=>{if(this.isValidLookup(n))return;s=b;const x=[u];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(x,u,b,k,r);else{let C;f&&(C=this.pluralResolver.getSuffix(b,r.count,r));const E=`${this.options.pluralSeparator}zero`,j=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(f&&(x.push(u+C),r.ordinal&&C.indexOf(j)===0&&x.push(u+C.replace(j,this.options.pluralSeparator)),p&&x.push(u+E)),h){const R=`${u}${this.options.contextSeparator}${r.context}`;x.push(R),f&&(x.push(R+C),r.ordinal&&C.indexOf(j)===0&&x.push(R+C.replace(j,this.options.pluralSeparator)),p&&x.push(R+E))}}let g;for(;g=x.pop();)this.isValidLookup(n)||(o=g,n=this.getResource(b,k,g,r))}))})}),{res:n,usedKey:i,exactUsedKey:o,usedLng:s,usedNS:a}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,r,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(t,r,n,i):this.resourceStore.getResource(t,r,n,i)}getUsedParamsDetails(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const r=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=t.replace&&typeof t.replace!="string";let i=n?t.replace:t;if(n&&typeof t.count<"u"&&(i.count=t.count),this.options.interpolation.defaultVariables&&(i={...this.options.interpolation.defaultVariables,...i}),!n){i={...i};for(const o of r)delete i[o]}return i}static hasDefaultValue(t){const r="defaultValue";for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&r===n.substring(0,r.length)&&t[n]!==void 0)return!0;return!1}}const D0=e=>e.charAt(0).toUpperCase()+e.slice(1);class oR{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=es.create("languageUtils")}getScriptPartFromCode(t){if(t=ug(t),!t||t.indexOf("-")<0)return null;const r=t.split("-");return r.length===2||(r.pop(),r[r.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(r.join("-"))}getLanguagePartFromCode(t){if(t=ug(t),!t||t.indexOf("-")<0)return t;const r=t.split("-");return this.formatLanguageCode(r[0])}formatLanguageCode(t){if(typeof t=="string"&&t.indexOf("-")>-1){const r=["hans","hant","latn","cyrl","cans","mong","arab"];let n=t.split("-");return this.options.lowerCaseLng?n=n.map(i=>i.toLowerCase()):n.length===2?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),r.indexOf(n[1].toLowerCase())>-1&&(n[1]=D0(n[1].toLowerCase()))):n.length===3&&(n[0]=n[0].toLowerCase(),n[1].length===2&&(n[1]=n[1].toUpperCase()),n[0]!=="sgn"&&n[2].length===2&&(n[2]=n[2].toUpperCase()),r.indexOf(n[1].toLowerCase())>-1&&(n[1]=D0(n[1].toLowerCase())),r.indexOf(n[2].toLowerCase())>-1&&(n[2]=D0(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let r;return t.forEach(n=>{if(r)return;const i=this.formatLanguageCode(n);(!this.options.supportedLngs||this.isSupportedCode(i))&&(r=i)}),!r&&this.options.supportedLngs&&t.forEach(n=>{if(r)return;const i=this.getLanguagePartFromCode(n);if(this.isSupportedCode(i))return r=i;r=this.options.supportedLngs.find(o=>{if(o===i)return o;if(!(o.indexOf("-")<0&&i.indexOf("-")<0)&&(o.indexOf("-")>0&&i.indexOf("-")<0&&o.substring(0,o.indexOf("-"))===i||o.indexOf(i)===0&&i.length>1))return o})}),r||(r=this.getFallbackCodes(this.options.fallbackLng)[0]),r}getFallbackCodes(t,r){if(!t)return[];if(typeof t=="function"&&(t=t(r)),typeof t=="string"&&(t=[t]),Array.isArray(t))return t;if(!r)return t.default||[];let n=t[r];return n||(n=t[this.getScriptPartFromCode(r)]),n||(n=t[this.formatLanguageCode(r)]),n||(n=t[this.getLanguagePartFromCode(r)]),n||(n=t.default),n||[]}toResolveHierarchy(t,r){const n=this.getFallbackCodes(r||this.options.fallbackLng||[],t),i=[],o=s=>{s&&(this.isSupportedCode(s)?i.push(s):this.logger.warn(`rejecting language code not found in supportedLngs: ${s}`))};return typeof t=="string"&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&o(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&o(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&o(this.getLanguagePartFromCode(t))):typeof t=="string"&&o(this.formatLanguageCode(t)),n.forEach(s=>{i.indexOf(s)<0&&o(this.formatLanguageCode(s))}),i}}let mQ=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],gQ={1:e=>+(e>1),2:e=>+(e!=1),3:e=>0,4:e=>e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2,5:e=>e==0?0:e==1?1:e==2?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5,6:e=>e==1?0:e>=2&&e<=4?1:2,7:e=>e==1?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2,8:e=>e==1?0:e==2?1:e!=8&&e!=11?2:3,9:e=>+(e>=2),10:e=>e==1?0:e==2?1:e<7?2:e<11?3:4,11:e=>e==1||e==11?0:e==2||e==12?1:e>2&&e<20?2:3,12:e=>+(e%10!=1||e%100==11),13:e=>+(e!==0),14:e=>e==1?0:e==2?1:e==3?2:3,15:e=>e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2,16:e=>e%10==1&&e%100!=11?0:e!==0?1:2,17:e=>e==1||e%10==1&&e%100!=11?0:1,18:e=>e==0?0:e==1?1:2,19:e=>e==1?0:e==0||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3,20:e=>e==1?0:e==0||e%100>0&&e%100<20?1:2,21:e=>e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0,22:e=>e==1?0:e==2?1:(e<0||e>10)&&e%10==0?2:3};const vQ=["v1","v2","v3"],yQ=["v4"],sR={zero:0,one:1,two:2,few:3,many:4,other:5},bQ=()=>{const e={};return mQ.forEach(t=>{t.lngs.forEach(r=>{e[r]={numbers:t.nr,plurals:gQ[t.fc]}})}),e};class wQ{constructor(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=t,this.options=r,this.logger=es.create("pluralResolver"),(!this.options.compatibilityJSON||yQ.includes(this.options.compatibilityJSON))&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=bQ(),this.pluralRulesCache={}}addRule(t,r){this.rules[t]=r}clearCache(){this.pluralRulesCache={}}getRule(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{const n=ug(t==="dev"?"en":t),i=r.ordinal?"ordinal":"cardinal",o=JSON.stringify({cleanedCode:n,type:i});if(o in this.pluralRulesCache)return this.pluralRulesCache[o];const s=new Intl.PluralRules(n,{type:i});return this.pluralRulesCache[o]=s,s}catch{return}return this.rules[t]||this.rules[this.languageUtils.getLanguagePartFromCode(t)]}needsPlural(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const n=this.getRule(t,r);return this.shouldUseIntlApi()?n&&n.resolvedOptions().pluralCategories.length>1:n&&n.numbers.length>1}getPluralFormsOfKey(t,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(t,n).map(i=>`${r}${i}`)}getSuffixes(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const n=this.getRule(t,r);return n?this.shouldUseIntlApi()?n.resolvedOptions().pluralCategories.sort((i,o)=>sR[i]-sR[o]).map(i=>`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${i}`):n.numbers.map(i=>this.getSuffix(t,i,r)):[]}getSuffix(t,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const i=this.getRule(t,n);return i?this.shouldUseIntlApi()?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${i.select(r)}`:this.getSuffixRetroCompatible(i,r):(this.logger.warn(`no plural rule found for: ${t}`),"")}getSuffixRetroCompatible(t,r){const n=t.noAbs?t.plurals(r):t.plurals(Math.abs(r));let i=t.numbers[n];this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1&&(i===2?i="plural":i===1&&(i=""));const o=()=>this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString();return this.options.compatibilityJSON==="v1"?i===1?"":typeof i=="number"?`_plural_${i.toString()}`:o():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1?o():this.options.prepend&&n.toString()?this.options.prepend+n.toString():n.toString()}shouldUseIntlApi(){return!vQ.includes(this.options.compatibilityJSON)}}const aR=function(e,t,r){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,o=lQ(e,t,r);return!o&&i&&typeof r=="string"&&(o=F1(e,r,n),o===void 0&&(o=F1(t,r,n))),o},B0=e=>e.replace(/\$/g,"$$$$");class xQ{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=es.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||(r=>r),this.init(t)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});const{escape:r,escapeValue:n,useRawValueToEscape:i,prefix:o,prefixEscaped:s,suffix:a,suffixEscaped:l,formatSeparator:c,unescapeSuffix:u,unescapePrefix:d,nestingPrefix:f,nestingPrefixEscaped:p,nestingSuffix:h,nestingSuffixEscaped:v,nestingOptionsSeparator:k,maxReplaces:b,alwaysFormat:x}=t.interpolation;this.escape=r!==void 0?r:uQ,this.escapeValue=n!==void 0?n:!0,this.useRawValueToEscape=i!==void 0?i:!1,this.prefix=o?Ec(o):s||"{{",this.suffix=a?Ec(a):l||"}}",this.formatSeparator=c||",",this.unescapePrefix=u?"":d||"-",this.unescapeSuffix=this.unescapePrefix?"":u||"",this.nestingPrefix=f?Ec(f):p||Ec("$t("),this.nestingSuffix=h?Ec(h):v||Ec(")"),this.nestingOptionsSeparator=k||",",this.maxReplaces=b||1e3,this.alwaysFormat=x!==void 0?x:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(r,n)=>r&&r.source===n?(r.lastIndex=0,r):new RegExp(n,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(t,r,n,i){let o,s,a;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=p=>{if(p.indexOf(this.formatSeparator)<0){const b=aR(r,l,p,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(b,void 0,n,{...i,...r,interpolationkey:p}):b}const h=p.split(this.formatSeparator),v=h.shift().trim(),k=h.join(this.formatSeparator).trim();return this.format(aR(r,l,v,this.options.keySeparator,this.options.ignoreJSONStructure),k,n,{...i,...r,interpolationkey:v})};this.resetRegExp();const u=i&&i.missingInterpolationHandler||this.options.missingInterpolationHandler,d=i&&i.interpolation&&i.interpolation.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:p=>B0(p)},{regex:this.regexp,safeValue:p=>this.escapeValue?B0(this.escape(p)):B0(p)}].forEach(p=>{for(a=0;o=p.regex.exec(t);){const h=o[1].trim();if(s=c(h),s===void 0)if(typeof u=="function"){const k=u(t,o,i);s=typeof k=="string"?k:""}else if(i&&Object.prototype.hasOwnProperty.call(i,h))s="";else if(d){s=o[0];continue}else this.logger.warn(`missed to pass in variable ${h} for interpolating ${t}`),s="";else typeof s!="string"&&!this.useRawValueToEscape&&(s=ZE(s));const v=p.safeValue(s);if(t=t.replace(o[0],v),d?(p.regex.lastIndex+=s.length,p.regex.lastIndex-=o[0].length):p.regex.lastIndex=0,a++,a>=this.maxReplaces)break}}),t}nest(t,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i,o,s;const a=(l,c)=>{const u=this.nestingOptionsSeparator;if(l.indexOf(u)<0)return l;const d=l.split(new RegExp(`${u}[ ]*{`));let f=`{${d[1]}`;l=d[0],f=this.interpolate(f,s);const p=f.match(/'/g),h=f.match(/"/g);(p&&p.length%2===0&&!h||h.length%2!==0)&&(f=f.replace(/'/g,'"'));try{s=JSON.parse(f),c&&(s={...c,...s})}catch(v){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,v),`${l}${u}${f}`}return s.defaultValue&&s.defaultValue.indexOf(this.prefix)>-1&&delete s.defaultValue,l};for(;i=this.nestingRegexp.exec(t);){let l=[];s={...n},s=s.replace&&typeof s.replace!="string"?s.replace:s,s.applyPostProcessor=!1,delete s.defaultValue;let c=!1;if(i[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(i[1])){const u=i[1].split(this.formatSeparator).map(d=>d.trim());i[1]=u.shift(),l=u,c=!0}if(o=r(a.call(this,i[1].trim(),s),s),o&&i[0]===t&&typeof o!="string")return o;typeof o!="string"&&(o=ZE(o)),o||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${t}`),o=""),c&&(o=l.reduce((u,d)=>this.format(u,d,n.lng,{...n,interpolationkey:i[1].trim()}),o.trim())),t=t.replace(i[0],o),this.regexp.lastIndex=0}return t}}const SQ=e=>{let t=e.toLowerCase().trim();const r={};if(e.indexOf("(")>-1){const n=e.split("(");t=n[0].toLowerCase().trim();const i=n[1].substring(0,n[1].length-1);t==="currency"&&i.indexOf(":")<0?r.currency||(r.currency=i.trim()):t==="relativetime"&&i.indexOf(":")<0?r.range||(r.range=i.trim()):i.split(";").forEach(s=>{if(s){const[a,...l]=s.split(":"),c=l.join(":").trim().replace(/^'+|'+$/g,""),u=a.trim();r[u]||(r[u]=c),c==="false"&&(r[u]=!1),c==="true"&&(r[u]=!0),isNaN(c)||(r[u]=parseInt(c,10))}})}return{formatName:t,formatOptions:r}},Rc=e=>{const t={};return(r,n,i)=>{let o=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(o={...o,[i.interpolationkey]:void 0});const s=n+JSON.stringify(o);let a=t[s];return a||(a=e(ug(n),i),t[s]=a),a(r)}};class CQ{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=es.create("formatter"),this.options=t,this.formats={number:Rc((r,n)=>{const i=new Intl.NumberFormat(r,{...n});return o=>i.format(o)}),currency:Rc((r,n)=>{const i=new Intl.NumberFormat(r,{...n,style:"currency"});return o=>i.format(o)}),datetime:Rc((r,n)=>{const i=new Intl.DateTimeFormat(r,{...n});return o=>i.format(o)}),relativetime:Rc((r,n)=>{const i=new Intl.RelativeTimeFormat(r,{...n});return o=>i.format(o,n.range||"day")}),list:Rc((r,n)=>{const i=new Intl.ListFormat(r,{...n});return o=>i.format(o)})},this.init(t)}init(t){const n=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}}).interpolation;this.formatSeparator=n.formatSeparator?n.formatSeparator:n.formatSeparator||","}add(t,r){this.formats[t.toLowerCase().trim()]=r}addCached(t,r){this.formats[t.toLowerCase().trim()]=Rc(r)}format(t,r,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const o=r.split(this.formatSeparator);if(o.length>1&&o[0].indexOf("(")>1&&o[0].indexOf(")")<0&&o.find(a=>a.indexOf(")")>-1)){const a=o.findIndex(l=>l.indexOf(")")>-1);o[0]=[o[0],...o.splice(1,a)].join(this.formatSeparator)}return o.reduce((a,l)=>{const{formatName:c,formatOptions:u}=SQ(l);if(this.formats[c]){let d=a;try{const f=i&&i.formatParams&&i.formatParams[i.interpolationkey]||{},p=f.locale||f.lng||i.locale||i.lng||n;d=this.formats[c](a,p,{...u,...i,...f})}catch(f){this.logger.warn(f)}return d}else this.logger.warn(`there was no format function for ${c}`);return a},t)}}const _Q=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class kQ extends Xv{constructor(t,r,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=t,this.store=r,this.services=n,this.languageUtils=n.languageUtils,this.options=i,this.logger=es.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=i.maxParallelReads||10,this.readingCalls=0,this.maxRetries=i.maxRetries>=0?i.maxRetries:5,this.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(n,i.backend,i)}queueLoad(t,r,n,i){const o={},s={},a={},l={};return t.forEach(c=>{let u=!0;r.forEach(d=>{const f=`${c}|${d}`;!n.reload&&this.store.hasResourceBundle(c,d)?this.state[f]=2:this.state[f]<0||(this.state[f]===1?s[f]===void 0&&(s[f]=!0):(this.state[f]=1,u=!1,s[f]===void 0&&(s[f]=!0),o[f]===void 0&&(o[f]=!0),l[d]===void 0&&(l[d]=!0)))}),u||(a[c]=!0)}),(Object.keys(o).length||Object.keys(s).length)&&this.queue.push({pending:s,pendingCount:Object.keys(s).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(o),pending:Object.keys(s),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(l)}}loaded(t,r,n){const i=t.split("|"),o=i[0],s=i[1];r&&this.emit("failedLoading",o,s,r),!r&&n&&this.store.addResourceBundle(o,s,n,void 0,void 0,{skipCopy:!0}),this.state[t]=r?-1:2,r&&n&&(this.state[t]=0);const a={};this.queue.forEach(l=>{aQ(l.loaded,[o],s),_Q(l,t),r&&l.errors.push(r),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(c=>{a[c]||(a[c]={});const u=l.loaded[c];u.length&&u.forEach(d=>{a[c][d]===void 0&&(a[c][d]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(l=>!l.done)}read(t,r,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,s=arguments.length>5?arguments[5]:void 0;if(!t.length)return s(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:r,fcName:n,tried:i,wait:o,callback:s});return}this.readingCalls++;const a=(c,u)=>{if(this.readingCalls--,this.waitingReads.length>0){const d=this.waitingReads.shift();this.read(d.lng,d.ns,d.fcName,d.tried,d.wait,d.callback)}if(c&&u&&i{this.read.call(this,t,r,n,i+1,o*2,s)},o);return}s(c,u)},l=this.backend[n].bind(this.backend);if(l.length===2){try{const c=l(t,r);c&&typeof c.then=="function"?c.then(u=>a(null,u)).catch(a):a(null,c)}catch(c){a(c)}return}return l(t,r,a)}prepareLoading(t,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();typeof t=="string"&&(t=this.languageUtils.toResolveHierarchy(t)),typeof r=="string"&&(r=[r]);const o=this.queueLoad(t,r,n,i);if(!o.toLoad.length)return o.pending.length||i(),null;o.toLoad.forEach(s=>{this.loadOne(s)})}load(t,r,n){this.prepareLoading(t,r,{},n)}reload(t,r,n){this.prepareLoading(t,r,{reload:!0},n)}loadOne(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const n=t.split("|"),i=n[0],o=n[1];this.read(i,o,"read",void 0,void 0,(s,a)=>{s&&this.logger.warn(`${r}loading namespace ${o} for language ${i} failed`,s),!s&&a&&this.logger.log(`${r}loaded namespace ${o} for language ${i}`,a),this.loaded(t,s,a)})}saveMissing(t,r,n,i,o){let s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},a=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(r)){this.logger.warn(`did not save key "${n}" as the namespace "${r}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(n==null||n==="")){if(this.backend&&this.backend.create){const l={...s,isUpdate:o},c=this.backend.create.bind(this.backend);if(c.length<6)try{let u;c.length===5?u=c(t,r,n,i,l):u=c(t,r,n,i),u&&typeof u.then=="function"?u.then(d=>a(null,d)).catch(a):a(null,u)}catch(u){a(u)}else c(t,r,n,i,a,l)}!t||!t[0]||this.store.addResource(t[0],r,n,i)}}}const lR=()=>({debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]=="object"&&(t=e[1]),typeof e[1]=="string"&&(t.defaultValue=e[1]),typeof e[2]=="string"&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const r=e[3]||e[2];Object.keys(r).forEach(n=>{t[n]=r[n]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),cR=e=>(typeof e.ns=="string"&&(e.ns=[e.ns]),typeof e.fallbackLng=="string"&&(e.fallbackLng=[e.fallbackLng]),typeof e.fallbackNS=="string"&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e),kh=()=>{},EQ=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(r=>{typeof e[r]=="function"&&(e[r]=e[r].bind(e))})};class np extends Xv{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;if(super(),this.options=cR(t),this.services={},this.logger=es,this.modules={external:[]},EQ(this),r&&!this.isInitialized&&!t.isClone){if(!this.options.initImmediate)return this.init(t,r),this;setTimeout(()=>{this.init(t,r)},0)}}init(){var t=this;let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof r=="function"&&(n=r,r={}),!r.defaultNS&&r.defaultNS!==!1&&r.ns&&(typeof r.ns=="string"?r.defaultNS=r.ns:r.ns.indexOf("translation")<0&&(r.defaultNS=r.ns[0]));const i=lR();this.options={...i,...this.options,...cR(r)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...i.interpolation,...this.options.interpolation}),r.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=r.keySeparator),r.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=r.nsSeparator);const o=u=>u?typeof u=="function"?new u:u:null;if(!this.options.isClone){this.modules.logger?es.init(o(this.modules.logger),this.options):es.init(null,this.options);let u;this.modules.formatter?u=this.modules.formatter:typeof Intl<"u"&&(u=CQ);const d=new oR(this.options);this.store=new nR(this.options.resources,this.options);const f=this.services;f.logger=es,f.resourceStore=this.store,f.languageUtils=d,f.pluralResolver=new wQ(d,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),u&&(!this.options.interpolation.format||this.options.interpolation.format===i.interpolation.format)&&(f.formatter=o(u),f.formatter.init(f,this.options),this.options.interpolation.format=f.formatter.format.bind(f.formatter)),f.interpolator=new xQ(this.options),f.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},f.backendConnector=new kQ(o(this.modules.backend),f.resourceStore,f,this.options),f.backendConnector.on("*",function(p){for(var h=arguments.length,v=new Array(h>1?h-1:0),k=1;k1?h-1:0),k=1;k{p.init&&p.init(this)})}if(this.format=this.options.interpolation.format,n||(n=kh),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const u=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);u.length>0&&u[0]!=="dev"&&(this.options.lng=u[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(u=>{this[u]=function(){return t.store[u](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(u=>{this[u]=function(){return t.store[u](...arguments),t}});const l=jd(),c=()=>{const u=(d,f)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),l.resolve(f),n(d,f)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return u(null,this.t.bind(this));this.changeLanguage(this.options.lng,u)};return this.options.resources||!this.options.initImmediate?c():setTimeout(c,0),l}loadResources(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:kh;const i=typeof t=="string"?t:this.language;if(typeof t=="function"&&(n=t),!this.options.resources||this.options.partialBundledLanguages){if(i&&i.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return n();const o=[],s=a=>{if(!a||a==="cimode")return;this.services.languageUtils.toResolveHierarchy(a).forEach(c=>{c!=="cimode"&&o.indexOf(c)<0&&o.push(c)})};i?s(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(l=>s(l)),this.options.preload&&this.options.preload.forEach(a=>s(a)),this.services.backendConnector.load(o,this.options.ns,a=>{!a&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),n(a)})}else n(null)}reloadResources(t,r,n){const i=jd();return typeof t=="function"&&(n=t,t=void 0),typeof r=="function"&&(n=r,r=void 0),t||(t=this.languages),r||(r=this.options.ns),n||(n=kh),this.services.backendConnector.reload(t,r,o=>{i.resolve(),n(o)}),i}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&KL.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1))for(let r=0;r-1)&&this.store.hasLanguageSomeTranslations(n)){this.resolvedLanguage=n;break}}}changeLanguage(t,r){var n=this;this.isLanguageChangingTo=t;const i=jd();this.emit("languageChanging",t);const o=l=>{this.language=l,this.languages=this.services.languageUtils.toResolveHierarchy(l),this.resolvedLanguage=void 0,this.setResolvedLanguage(l)},s=(l,c)=>{c?(o(c),this.translator.changeLanguage(c),this.isLanguageChangingTo=void 0,this.emit("languageChanged",c),this.logger.log("languageChanged",c)):this.isLanguageChangingTo=void 0,i.resolve(function(){return n.t(...arguments)}),r&&r(l,function(){return n.t(...arguments)})},a=l=>{!t&&!l&&this.services.languageDetector&&(l=[]);const c=typeof l=="string"?l:this.services.languageUtils.getBestMatchFromCodes(l);c&&(this.language||o(c),this.translator.language||this.translator.changeLanguage(c),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(c)),this.loadResources(c,u=>{s(u,c)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?a(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(t),i}getFixedT(t,r,n){var i=this;const o=function(s,a){let l;if(typeof a!="object"){for(var c=arguments.length,u=new Array(c>2?c-2:0),d=2;d`${l.keyPrefix}${f}${h}`):p=l.keyPrefix?`${l.keyPrefix}${f}${s}`:s,i.t(p,l)};return typeof t=="string"?o.lng=t:o.lngs=t,o.ns=r,o.keyPrefix=n,o}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const n=r.lng||this.resolvedLanguage||this.languages[0],i=this.options?this.options.fallbackLng:!1,o=this.languages[this.languages.length-1];if(n.toLowerCase()==="cimode")return!0;const s=(a,l)=>{const c=this.services.backendConnector.state[`${a}|${l}`];return c===-1||c===0||c===2};if(r.precheck){const a=r.precheck(this,s);if(a!==void 0)return a}return!!(this.hasResourceBundle(n,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||s(n,t)&&(!i||s(o,t)))}loadNamespaces(t,r){const n=jd();return this.options.ns?(typeof t=="string"&&(t=[t]),t.forEach(i=>{this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}),this.loadResources(i=>{n.resolve(),r&&r(i)}),n):(r&&r(),Promise.resolve())}loadLanguages(t,r){const n=jd();typeof t=="string"&&(t=[t]);const i=this.options.preload||[],o=t.filter(s=>i.indexOf(s)<0&&this.services.languageUtils.isSupportedCode(s));return o.length?(this.options.preload=i.concat(o),this.loadResources(s=>{n.resolve(),r&&r(s)}),n):(r&&r(),Promise.resolve())}dir(t){if(t||(t=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!t)return"rtl";const r=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],n=this.services&&this.services.languageUtils||new oR(lR());return r.indexOf(n.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;return new np(t,r)}cloneInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:kh;const n=t.forkResourceStore;n&&delete t.forkResourceStore;const i={...this.options,...t,isClone:!0},o=new np(i);return(t.debug!==void 0||t.prefix!==void 0)&&(o.logger=o.logger.clone(t)),["store","services","language"].forEach(a=>{o[a]=this[a]}),o.services={...this.services},o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},n&&(o.store=new nR(this.store.data,i),o.services.resourceStore=o.store),o.translator=new dg(o.services,i),o.translator.on("*",function(a){for(var l=arguments.length,c=new Array(l>1?l-1:0),u=1;u{console!=null&&console.warn&&(Bl(e[0])&&(e[0]=`react-i18next:: ${e[0]}`),console.warn(...e))},uR={},z1=(...e)=>{Bl(e[0])&&uR[e[0]]||(Bl(e[0])&&(uR[e[0]]=new Date),RQ(...e))},qL=(e,t)=>()=>{if(e.isInitialized)t();else{const r=()=>{setTimeout(()=>{e.off("initialized",r)},0),t()};e.on("initialized",r)}},dR=(e,t,r)=>{e.loadNamespaces(t,qL(e,r))},fR=(e,t,r,n)=>{Bl(r)&&(r=[r]),r.forEach(i=>{e.options.ns.indexOf(i)<0&&e.options.ns.push(i)}),e.loadLanguages(t,qL(e,n))},PQ=(e,t,r={})=>!t.languages||!t.languages.length?(z1("i18n.languages were undefined or empty",t.languages),!0):t.hasLoadedNamespace(e,{lng:r.lng,precheck:(n,i)=>{var o;if(((o=r.bindI18n)==null?void 0:o.indexOf("languageChanging"))>-1&&n.services.backendConnector.backend&&n.isLanguageChangingTo&&!i(n.isLanguageChangingTo,e))return!1}}),Bl=e=>typeof e=="string",TQ=e=>typeof e=="object"&&e!==null,OQ=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,jQ={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},LQ=e=>jQ[e],IQ=e=>e.replace(OQ,LQ);let U1={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:IQ};const MQ=(e={})=>{U1={...U1,...e}},AQ=()=>U1;let YL;const NQ=e=>{YL=e},DQ=()=>YL,BQ={type:"3rdParty",init(e){MQ(e.options.react),NQ(e)}},$Q=_.createContext();class FQ{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(r=>{this.usedNamespaces[r]??=!0})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const zQ=(e,t)=>{const r=_.useRef();return _.useEffect(()=>{r.current=e},[e,t]),r.current},QL=(e,t,r,n)=>e.getFixedT(t,r,n),UQ=(e,t,r,n)=>_.useCallback(QL(e,t,r,n),[e,t,r,n]),GQ=(e,t={})=>{var C,E,j,R;const{i18n:r}=t,{i18n:n,defaultNS:i}=_.useContext($Q)||{},o=r||n||DQ();if(o&&!o.reportNamespaces&&(o.reportNamespaces=new FQ),!o){z1("You will need to pass in an i18next instance by using initReactI18next");const O=(L,A)=>Bl(A)?A:TQ(A)&&Bl(A.defaultValue)?A.defaultValue:Array.isArray(L)?L[L.length-1]:L,P=[O,{},!1];return P.t=O,P.i18n={},P.ready=!1,P}(C=o.options.react)!=null&&C.wait&&z1("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const s={...AQ(),...o.options.react,...t},{useSuspense:a,keyPrefix:l}=s;let c=i||((E=o.options)==null?void 0:E.defaultNS);c=Bl(c)?[c]:c||["translation"],(R=(j=o.reportNamespaces).addUsedNamespaces)==null||R.call(j,c);const u=(o.isInitialized||o.initializedStoreOnce)&&c.every(O=>PQ(O,o,s)),d=UQ(o,t.lng||null,s.nsMode==="fallback"?c:c[0],l),f=()=>d,p=()=>QL(o,t.lng||null,s.nsMode==="fallback"?c:c[0],l),[h,v]=_.useState(f);let k=c.join();t.lng&&(k=`${t.lng}${k}`);const b=zQ(k),x=_.useRef(!0);_.useEffect(()=>{const{bindI18n:O,bindI18nStore:P}=s;x.current=!0,!u&&!a&&(t.lng?fR(o,t.lng,c,()=>{x.current&&v(p)}):dR(o,c,()=>{x.current&&v(p)})),u&&b&&b!==k&&x.current&&v(p);const L=()=>{x.current&&v(p)};return O&&(o==null||o.on(O,L)),P&&(o==null||o.store.on(P,L)),()=>{x.current=!1,o&&(O==null||O.split(" ").forEach(A=>o.off(A,L))),P&&o&&P.split(" ").forEach(A=>o.store.off(A,L))}},[o,k]),_.useEffect(()=>{x.current&&u&&v(f)},[o,l,u]);const g=[h,o,u];if(g.t=h,g.i18n=o,g.ready=u,u||!u&&!a)return g;throw new Promise(O=>{t.lng?fR(o,t.lng,c,()=>O()):dR(o,c,()=>O())})},{slice:WQ,forEach:HQ}=[];function VQ(e){return HQ.call(WQ.call(arguments,1),t=>{if(t)for(const r in t)e[r]===void 0&&(e[r]=t[r])}),e}const pR=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,KQ=(e,t,r)=>{const n=r||{};n.path=n.path||"/";const i=encodeURIComponent(t);let o=`${e}=${i}`;if(n.maxAge>0){const s=n.maxAge-0;if(Number.isNaN(s))throw new Error("maxAge should be a Number");o+=`; Max-Age=${Math.floor(s)}`}if(n.domain){if(!pR.test(n.domain))throw new TypeError("option domain is invalid");o+=`; Domain=${n.domain}`}if(n.path){if(!pR.test(n.path))throw new TypeError("option path is invalid");o+=`; Path=${n.path}`}if(n.expires){if(typeof n.expires.toUTCString!="function")throw new TypeError("option expires is invalid");o+=`; Expires=${n.expires.toUTCString()}`}if(n.httpOnly&&(o+="; HttpOnly"),n.secure&&(o+="; Secure"),n.sameSite)switch(typeof n.sameSite=="string"?n.sameSite.toLowerCase():n.sameSite){case!0:o+="; SameSite=Strict";break;case"lax":o+="; SameSite=Lax";break;case"strict":o+="; SameSite=Strict";break;case"none":o+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return o},hR={create(e,t,r,n){let i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};r&&(i.expires=new Date,i.expires.setTime(i.expires.getTime()+r*60*1e3)),n&&(i.domain=n),document.cookie=KQ(e,encodeURIComponent(t),i)},read(e){const t=`${e}=`,r=document.cookie.split(";");for(let n=0;n-1&&(i=window.location.hash.substring(window.location.hash.indexOf("?")));const s=i.substring(1).split("&");for(let a=0;a0&&s[a].substring(0,l)===t&&(r=s[a].substring(l+1))}}return r}};let Ld=null;const mR=()=>{if(Ld!==null)return Ld;try{Ld=window!=="undefined"&&window.localStorage!==null;const e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch{Ld=!1}return Ld};var QQ={name:"localStorage",lookup(e){let{lookupLocalStorage:t}=e;if(t&&mR())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupLocalStorage:r}=t;r&&mR()&&window.localStorage.setItem(r,e)}};let Id=null;const gR=()=>{if(Id!==null)return Id;try{Id=window!=="undefined"&&window.sessionStorage!==null;const e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch{Id=!1}return Id};var XQ={name:"sessionStorage",lookup(e){let{lookupSessionStorage:t}=e;if(t&&gR())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupSessionStorage:r}=t;r&&gR()&&window.sessionStorage.setItem(r,e)}},JQ={name:"navigator",lookup(e){const t=[];if(typeof navigator<"u"){const{languages:r,userLanguage:n,language:i}=navigator;if(r)for(let o=0;o0?t:void 0}},ZQ={name:"htmlTag",lookup(e){let{htmlTag:t}=e,r;const n=t||(typeof document<"u"?document.documentElement:null);return n&&typeof n.getAttribute=="function"&&(r=n.getAttribute("lang")),r}},eX={name:"path",lookup(e){var i;let{lookupFromPathIndex:t}=e;if(typeof window>"u")return;const r=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(r)?(i=r[typeof t=="number"?t:0])==null?void 0:i.replace("/",""):void 0}},tX={name:"subdomain",lookup(e){var i,o;let{lookupFromSubdomainIndex:t}=e;const r=typeof t=="number"?t+1:1,n=typeof window<"u"&&((o=(i=window.location)==null?void 0:i.hostname)==null?void 0:o.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i));if(n)return n[r]}};function rX(){return{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:e=>e}}class XL{constructor(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(t,r)}init(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=t||{languageUtils:{}},this.options=VQ(r,this.options||{},rX()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=i=>i.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=n,this.addDetector(qQ),this.addDetector(YQ),this.addDetector(QQ),this.addDetector(XQ),this.addDetector(JQ),this.addDetector(ZQ),this.addDetector(eX),this.addDetector(tX)}addDetector(t){return this.detectors[t.name]=t,this}detect(t){t||(t=this.options.order);let r=[];return t.forEach(n=>{if(this.detectors[n]){let i=this.detectors[n].lookup(this.options);i&&typeof i=="string"&&(i=[i]),i&&(r=r.concat(i))}}),r=r.map(n=>this.options.convertDetectedLanguage(n)),this.services.languageUtils.getBestMatchFromCodes?r:r.length>0?r[0]:null}cacheUserLanguage(t,r){r||(r=this.options.caches),r&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(t)>-1||r.forEach(n=>{this.detectors[n]&&this.detectors[n].cacheUserLanguage(t,this.options)}))}}XL.type="languageDetector";gn.use(XL).use(BQ).init({fallbackLng:"en",resources:{en:{translation:{"Guild Ball":"Guild Ball"}},fr:{translation:{"Guild Ball":"Guild Ball"}}},debug:!1,interpolation:{escapeValue:!1}});const JL=_.createContext({manifest:void 0,version:0,gameplans:void 0}),vR="gbdata_meta";let $0=!1;async function nX(e,t,r){if($0){console.error("concurent reloads");return}console.log(`loading ${e}`),$0=!0;try{let n,i;const o=t.datafiles.find(a=>a.filename===e);if(o)n=o.sha256,i=o.version;else{console.log("looking for translation entry");for(const a of t.datafiles){const l=Object.values(a.translations).find(c=>c.filename===e);if(l){n=l.sha256,i=a.version;break}}}const s=await ar.getLocal(vR);if(s&&s.get("version")===i&&s.get("filename")===e&&s.get("sha256")===n){console.log("database pre-loaded :)");return}console.log("database re-loading :("),await Promise.all([ar.guilds.find().exec().then(a=>ar.guilds.bulkRemove(a.map(l=>l.name))).then(()=>ar.guilds.bulkInsert(r.Guilds)).then(a=>{if(a.error.length!==0)throw"error loading Guilds"}).catch(console.error),ar.models.find().exec().then(a=>ar.models.bulkRemove(a.map(l=>l.id))).then(()=>ar.models.bulkInsert(r.Models)).then(a=>{if(a.error.length!==0)throw"error loading Models"}).catch(console.error),ar.character_plays.find().exec().then(a=>ar.character_plays.bulkRemove(a.map(l=>l.name))).then(()=>ar.character_plays.bulkInsert(r["Character Plays"])).then(a=>{if(a.error.length!==0)throw"error loading Character Plays"}).catch(console.error),ar.character_traits.find().exec().then(a=>ar.character_traits.bulkRemove(a.map(l=>l.name))).then(()=>ar.character_traits.bulkInsert(r["Character Traits"])).then(a=>{if(a.error.length!==0)throw"error loading Character Traits"}).catch(console.error)]).then(()=>ar.upsertLocal(vR,{version:i,filename:e,sha256:n})).then(()=>console.log("database re-load complete :|")).catch(console.error)}finally{$0=!1}}const iX=({children:e})=>{const[t,r]=_.useState(void 0),[n,i]=_.useState(void 0),[o,s]=_.useState(0),[a,l]=_.useState(),{setting$:c}=di(),[u,d]=_.useState(),[f,p]=_.useState(),[h,v]=_.useState(),[k,b]=_.useState();return _.useEffect(()=>{const x=c==null?void 0:c.subscribe(g=>{const{dataSet:C,language:E,mostRecentErrata:j}=(g==null?void 0:g.toJSON().data)??{};d(C??null),E=="auto"?b(gn.resolvedLanguage??null):b(E??null),p(j??null)});return()=>{x==null||x.unsubscribe()}},[c]),_.useEffect(()=>{if(u===void 0||f===void 0)return;let x=!1;return(async()=>{var P;const C=await oX();if(x)return;r(C);const E=C.datafiles[0].filename;let j;if(u&&f===E)j=u;else{j=E;const L=await(ar==null?void 0:ar.getLocal("settings"));if(x)return;L==null||L.incrementalPatch({dataSet:j,mostRecentErrata:E})}const R=C.datafiles.find(L=>L.filename===j),O=R.version;s(O),k&&((P=R.translations)!=null&&P[k])&&(console.log(`using translated data set (${k})`),j=R.translations[k].filename),v(j)})(),()=>{x=!0}},[u,k,f]),_.useEffect(()=>{if(!h||!t)return;let x=!1;return(async()=>{const C=await yR(h);x||(l(void 0),await nX(h,t,C).then(()=>l(ar)),i(await yR("gameplans.json")))})(),()=>{x=!0}},[o,h,t]),y.jsx(JL.Provider,{value:{version:o,manifest:t,gameplans:n,gbdb:a},children:e})},oX=async()=>await fetch("data/manifest.json",{headers:{"Content-Type":"application/json",Accept:"application/json"}}).then(function(t){return t.json()}),yR=async e=>await fetch(`data/${e}`,{headers:{"Content-Type":"application/json",Accept:"application/json"}}).then(function(r){return r.json()}),Qn=()=>_.useContext(JL);function ra(){const{gbdb:e}=Qn(),[t,r]=_.useState(),[n,i]=_.useState(),o=_.useMemo(()=>e==null?void 0:e.game_state.getLocal$("network"),[e]);return _.useEffect(()=>{if(!o)return;const s=o.subscribe(a=>{a&&!a.deleted?(i(a),r(!0)):(i(void 0),r(!1))});return()=>s.unsubscribe()},[o]),{active:t,netDoc:n}}const ZL=typeof window>"u"?_.useEffect:_.useLayoutEffect;function sX(e,t=!1){const r=t?ZL:_.useEffect,n=_.useRef(e);return r(()=>{n.current=e}),n}const aX=()=>{};function lX(e){_.useEffect(()=>{typeof e=="function"&&e()},[])}const cX={attributes:!0,characterData:!0,childList:!0,subtree:!0};function Jv(e,t=cX){const[r,n]=_.useState(null);return _.useEffect(()=>{if(r){const o=new MutationObserver(e);return o.observe(r,t),()=>{o.disconnect()}}return aX},[r,e,t]),[_.useCallback(o=>{n(o)},[])]}function uX(e){_.useEffect(()=>e,[])}function dX(e,t){const r=_.useRef(!1),n=_.useMemo(()=>typeof t<"u"&&!Array.isArray(t)?[t]:(Array.isArray(t)&&t.length===0&&console.warn("Using [] as the second argument makes useDidUpdate a noop. The second argument should either be `undefined` or an array of length greater than 0."),t),[t]);_.useEffect(()=>{r.current&&e()},n),lX(()=>{r.current=!0}),uX(()=>{r.current=!1})}const eI=globalThis||void 0||self;function fX(e){const t=sX(e);function r(...n){typeof t.current=="function"&&t.current(...n)}return r}function tI(e,t,r,n={},i=!0,o=!1){const s=fX(r);(o?ZL:_.useEffect)(()=>typeof e<"u"&&i?(e.addEventListener(t,s,n),()=>{e.removeEventListener(t,s,n)}):()=>{},[t,n])}function pX(e,t=!0,r=!1){tI(eI.window,"resize",e,{passive:!0},t,r)}function hX(e,t=!0,r=!1){tI(eI.window,"scroll",e,{passive:!0},t,r)}const mX=e=>{const t=e.getBoundingClientRect();return{bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width,x:t.left,y:t.top}},gX=[void 0,null,null],vX=({updateOnScroll:e=!0,updateOnResize:t=!0}={})=>{const[r,n]=_.useState(null),[i,o]=_.useState(null),s=_.useCallback(l=>{o(l)},[]),a=_.useCallback(()=>{window.requestAnimationFrame(()=>{i&&n(mX(i))})},[i]);return _.useLayoutEffect(()=>{a()},[a]),pX(()=>{a()},t,!0),hX(()=>{a()},e,!0),typeof window>"u"?(console.warn("useDimensionsRef: window is undefined."),gX):[s,r,i]},yX="/assets/playbook-symbol-defs-Dz3QsL1K.svg",bX="/assets/gb-symbol-defs-DvUA8_44.svg";function Ai(e){const{icon:t,size:r,style:n,className:i,...o}=e,s={...n||{},...r?{width:r,height:r}:{},...n&&n.height?{fontSize:n.height}:{}};return y.jsx("svg",{className:`gbicon gbicon-${t} ${i||""}`,style:s,...o,children:y.jsx("use",{href:`${bX}#gbicon-${t}`})})}function rI(e){const{icon:t,size:r,style:n}=e,i=t.replace(//g,"P"),o={...r?{width:r,height:r}:{},...n&&n.height?{fontSize:n.height}:{},...e.style||{}};return y.jsx("svg",{className:`pbicon pbicon-${i}`,style:o,...e,children:y.jsx("use",{href:`${yX}#pbicon-${i}`})})}function wX(e){const{gbdb:t}=Qn(),[r,n]=_.useState();return _.useEffect(()=>{if(!t||!e)return;const i=e(t).$.subscribe(o=>{n(o)});return()=>{i.unsubscribe()}},[t,e]),r}function fo(e,t){const{gbdb:r}=Qn(),n=_.useCallback(e,t??[]),[i,o]=_.useState();return _.useEffect(()=>{let s=!1;return r?((async()=>{const l=await n(r);s||o(l)})().catch(console.error),()=>{s=!0}):void 0},[r,n,o]),i}function xX(e,t){return e.reduce((r,n)=>t(r)>=t(n)?r:n)}function SX({width:e,height:t},r,n=0){if(!e||!t)return;const i=(o,s)=>{const a=(e-o*10)/o,l=(t-s*10-5)/s,c=Math.min(a,l),u=(a-c)/2;return{w:a,h:l,size:c,margin:u,wx:o,hx:s}};return xX(Array.from({length:r},(o,s)=>s+1).map(o=>i(o,Math.ceil(r/o)+n)),o=>o.size)}function nI({Controller:e}){const[t,r]=vX(),n=fo(async a=>{var c;if(!r)return;const l=await a.guilds.count().exec();return((c=SX(r,l,1))==null?void 0:c.size)??0},[r])??0,i=_.useMemo(()=>new Set,[]),o=u7(a=>i.add(a),a=>i.delete(a)),s=_.useCallback(a=>{i.forEach(l=>l(a))},[i]);return y.jsxs("div",{ref:t,style:{display:"flex",flexDirection:"column",height:"100%",alignContent:"flex-start",justifyContent:"space-evenly"},children:[y.jsx(CX,{size:n,pickTeam:s}),y.jsx(Zi,{}),y.jsx(e,{size:n,update$:o})]})}const CX=Lt.memo(e=>{const{pickTeam:t,size:r}=e,n=wX(_.useCallback(o=>o.guilds.find(),[]));if(!n)return null;const i=n.map(o=>({key:o.name,name:o.name,icon:o.name}));return y.jsx("div",{style:{display:"flex",flexDirection:"row",flexWrap:"wrap",alignContent:"flex-start",justifyContent:"space-evenly",gap:"10px",padding:"5px",overflow:"clip"},children:i.map((o,s)=>y.jsx(G1,{g:o,pickTeam:t,size:r},s))})});function G1(e){const{g:t,pickTeam:r,size:n}=e;return y.jsxs(br,{variant:"outlined",onClick:()=>r==null?void 0:r(t.key),style:{display:"flex",flexDirection:"column",minWidth:n,minHeight:n,maxWidth:n,maxHeight:n,background:"rgba(100%, 100%, 100%, 5%)"},sx:{"@media (hover: hover)":{"& > div":{transition:"transform .25s"},"&:hover > div":{transform:"scale(1.2)"}}},children:[y.jsx("div",{style:{display:"flex",placeContent:"center",placeItems:"center",fontSize:n*.7,width:"1em",height:"1em",borderRadius:"50%",padding:"0.0625em",background:"content-box linear-gradient(to bottom, #000, #333)"},children:y.jsx(Ai,{icon:t.icon,className:"dark",style:{flexShrink:0,filter:"drop-shadow(0 0 0.03em black)",...t.style||{}}})}),y.jsx(_t,{variant:"caption",style:{color:"whitesmoke",textTransform:"capitalize",textShadow:"1px 1px 1px black, -1px -1px 1px black, 1px -1px 1px black, -1px 1px 1px black, 0 1px 1px black, 1px 0 1px black, 0 -1px 1px black, -1px 0 1px black",zIndex:1},children:t.name})]},t.key)}var iI={exports:{}},oI={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},sI={exports:{}},_X=function(t){return!t||typeof t=="string"?!1:t instanceof Array||Array.isArray(t)||t.length>=0&&(t.splice instanceof Function||Object.getOwnPropertyDescriptor(t,t.length-1)&&t.constructor.name!=="String")},kX=_X,EX=Array.prototype.concat,RX=Array.prototype.slice,bR=sI.exports=function(t){for(var r=[],n=0,i=t.length;n=4&&e[3]!==1&&(t=", "+e[3]),"hwb("+e[0]+", "+e[1]+"%, "+e[2]+"%"+t+")"};Pi.to.keyword=function(e){return lI[e.slice(0,3)]};function Na(e,t,r){return Math.min(Math.max(t,e),r)}function Eh(e){var t=Math.round(e).toString(16).toUpperCase();return t.length<2?"0"+t:t}var TX=iI.exports;const ip=oI,cI={};for(const e of Object.keys(ip))cI[ip[e]]=e;const st={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};var uI=st;for(const e of Object.keys(st)){if(!("channels"in st[e]))throw new Error("missing channels property: "+e);if(!("labels"in st[e]))throw new Error("missing channel labels property: "+e);if(st[e].labels.length!==st[e].channels)throw new Error("channel and label counts mismatch: "+e);const{channels:t,labels:r}=st[e];delete st[e].channels,delete st[e].labels,Object.defineProperty(st[e],"channels",{value:t}),Object.defineProperty(st[e],"labels",{value:r})}st.rgb.hsl=function(e){const t=e[0]/255,r=e[1]/255,n=e[2]/255,i=Math.min(t,r,n),o=Math.max(t,r,n),s=o-i;let a,l;o===i?a=0:t===o?a=(r-n)/s:r===o?a=2+(n-t)/s:n===o&&(a=4+(t-r)/s),a=Math.min(a*60,360),a<0&&(a+=360);const c=(i+o)/2;return o===i?l=0:c<=.5?l=s/(o+i):l=s/(2-o-i),[a,l*100,c*100]};st.rgb.hsv=function(e){let t,r,n,i,o;const s=e[0]/255,a=e[1]/255,l=e[2]/255,c=Math.max(s,a,l),u=c-Math.min(s,a,l),d=function(f){return(c-f)/6/u+1/2};return u===0?(i=0,o=0):(o=u/c,t=d(s),r=d(a),n=d(l),s===c?i=n-r:a===c?i=1/3+t-n:l===c&&(i=2/3+r-t),i<0?i+=1:i>1&&(i-=1)),[i*360,o*100,c*100]};st.rgb.hwb=function(e){const t=e[0],r=e[1];let n=e[2];const i=st.rgb.hsl(e)[0],o=1/255*Math.min(t,Math.min(r,n));return n=1-1/255*Math.max(t,Math.max(r,n)),[i,o*100,n*100]};st.rgb.cmyk=function(e){const t=e[0]/255,r=e[1]/255,n=e[2]/255,i=Math.min(1-t,1-r,1-n),o=(1-t-i)/(1-i)||0,s=(1-r-i)/(1-i)||0,a=(1-n-i)/(1-i)||0;return[o*100,s*100,a*100,i*100]};function OX(e,t){return(e[0]-t[0])**2+(e[1]-t[1])**2+(e[2]-t[2])**2}st.rgb.keyword=function(e){const t=cI[e];if(t)return t;let r=1/0,n;for(const i of Object.keys(ip)){const o=ip[i],s=OX(e,o);s.04045?((t+.055)/1.055)**2.4:t/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92;const i=t*.4124+r*.3576+n*.1805,o=t*.2126+r*.7152+n*.0722,s=t*.0193+r*.1192+n*.9505;return[i*100,o*100,s*100]};st.rgb.lab=function(e){const t=st.rgb.xyz(e);let r=t[0],n=t[1],i=t[2];r/=95.047,n/=100,i/=108.883,r=r>.008856?r**(1/3):7.787*r+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,i=i>.008856?i**(1/3):7.787*i+16/116;const o=116*n-16,s=500*(r-n),a=200*(n-i);return[o,s,a]};st.hsl.rgb=function(e){const t=e[0]/360,r=e[1]/100,n=e[2]/100;let i,o,s;if(r===0)return s=n*255,[s,s,s];n<.5?i=n*(1+r):i=n+r-n*r;const a=2*n-i,l=[0,0,0];for(let c=0;c<3;c++)o=t+1/3*-(c-1),o<0&&o++,o>1&&o--,6*o<1?s=a+(i-a)*6*o:2*o<1?s=i:3*o<2?s=a+(i-a)*(2/3-o)*6:s=a,l[c]=s*255;return l};st.hsl.hsv=function(e){const t=e[0];let r=e[1]/100,n=e[2]/100,i=r;const o=Math.max(n,.01);n*=2,r*=n<=1?n:2-n,i*=o<=1?o:2-o;const s=(n+r)/2,a=n===0?2*i/(o+i):2*r/(n+r);return[t,a*100,s*100]};st.hsv.rgb=function(e){const t=e[0]/60,r=e[1]/100;let n=e[2]/100;const i=Math.floor(t)%6,o=t-Math.floor(t),s=255*n*(1-r),a=255*n*(1-r*o),l=255*n*(1-r*(1-o));switch(n*=255,i){case 0:return[n,l,s];case 1:return[a,n,s];case 2:return[s,n,l];case 3:return[s,a,n];case 4:return[l,s,n];case 5:return[n,s,a]}};st.hsv.hsl=function(e){const t=e[0],r=e[1]/100,n=e[2]/100,i=Math.max(n,.01);let o,s;s=(2-r)*n;const a=(2-r)*i;return o=r*i,o/=a<=1?a:2-a,o=o||0,s/=2,[t,o*100,s*100]};st.hwb.rgb=function(e){const t=e[0]/360;let r=e[1]/100,n=e[2]/100;const i=r+n;let o;i>1&&(r/=i,n/=i);const s=Math.floor(6*t),a=1-n;o=6*t-s,s&1&&(o=1-o);const l=r+o*(a-r);let c,u,d;switch(s){default:case 6:case 0:c=a,u=l,d=r;break;case 1:c=l,u=a,d=r;break;case 2:c=r,u=a,d=l;break;case 3:c=r,u=l,d=a;break;case 4:c=l,u=r,d=a;break;case 5:c=a,u=r,d=l;break}return[c*255,u*255,d*255]};st.cmyk.rgb=function(e){const t=e[0]/100,r=e[1]/100,n=e[2]/100,i=e[3]/100,o=1-Math.min(1,t*(1-i)+i),s=1-Math.min(1,r*(1-i)+i),a=1-Math.min(1,n*(1-i)+i);return[o*255,s*255,a*255]};st.xyz.rgb=function(e){const t=e[0]/100,r=e[1]/100,n=e[2]/100;let i,o,s;return i=t*3.2406+r*-1.5372+n*-.4986,o=t*-.9689+r*1.8758+n*.0415,s=t*.0557+r*-.204+n*1.057,i=i>.0031308?1.055*i**(1/2.4)-.055:i*12.92,o=o>.0031308?1.055*o**(1/2.4)-.055:o*12.92,s=s>.0031308?1.055*s**(1/2.4)-.055:s*12.92,i=Math.min(Math.max(0,i),1),o=Math.min(Math.max(0,o),1),s=Math.min(Math.max(0,s),1),[i*255,o*255,s*255]};st.xyz.lab=function(e){let t=e[0],r=e[1],n=e[2];t/=95.047,r/=100,n/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,n=n>.008856?n**(1/3):7.787*n+16/116;const i=116*r-16,o=500*(t-r),s=200*(r-n);return[i,o,s]};st.lab.xyz=function(e){const t=e[0],r=e[1],n=e[2];let i,o,s;o=(t+16)/116,i=r/500+o,s=o-n/200;const a=o**3,l=i**3,c=s**3;return o=a>.008856?a:(o-16/116)/7.787,i=l>.008856?l:(i-16/116)/7.787,s=c>.008856?c:(s-16/116)/7.787,i*=95.047,o*=100,s*=108.883,[i,o,s]};st.lab.lch=function(e){const t=e[0],r=e[1],n=e[2];let i;i=Math.atan2(n,r)*360/2/Math.PI,i<0&&(i+=360);const s=Math.sqrt(r*r+n*n);return[t,s,i]};st.lch.lab=function(e){const t=e[0],r=e[1],i=e[2]/360*2*Math.PI,o=r*Math.cos(i),s=r*Math.sin(i);return[t,o,s]};st.rgb.ansi16=function(e,t=null){const[r,n,i]=e;let o=t===null?st.rgb.hsv(e)[2]:t;if(o=Math.round(o/50),o===0)return 30;let s=30+(Math.round(i/255)<<2|Math.round(n/255)<<1|Math.round(r/255));return o===2&&(s+=60),s};st.hsv.ansi16=function(e){return st.rgb.ansi16(st.hsv.rgb(e),e[2])};st.rgb.ansi256=function(e){const t=e[0],r=e[1],n=e[2];return t===r&&r===n?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5)};st.ansi16.rgb=function(e){let t=e%10;if(t===0||t===7)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];const r=(~~(e>50)+1)*.5,n=(t&1)*r*255,i=(t>>1&1)*r*255,o=(t>>2&1)*r*255;return[n,i,o]};st.ansi256.rgb=function(e){if(e>=232){const o=(e-232)*10+8;return[o,o,o]}e-=16;let t;const r=Math.floor(e/36)/5*255,n=Math.floor((t=e%36)/6)/5*255,i=t%6/5*255;return[r,n,i]};st.rgb.hex=function(e){const r=(((Math.round(e[0])&255)<<16)+((Math.round(e[1])&255)<<8)+(Math.round(e[2])&255)).toString(16).toUpperCase();return"000000".substring(r.length)+r};st.hex.rgb=function(e){const t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let r=t[0];t[0].length===3&&(r=r.split("").map(a=>a+a).join(""));const n=parseInt(r,16),i=n>>16&255,o=n>>8&255,s=n&255;return[i,o,s]};st.rgb.hcg=function(e){const t=e[0]/255,r=e[1]/255,n=e[2]/255,i=Math.max(Math.max(t,r),n),o=Math.min(Math.min(t,r),n),s=i-o;let a,l;return s<1?a=o/(1-s):a=0,s<=0?l=0:i===t?l=(r-n)/s%6:i===r?l=2+(n-t)/s:l=4+(t-r)/s,l/=6,l%=1,[l*360,s*100,a*100]};st.hsl.hcg=function(e){const t=e[1]/100,r=e[2]/100,n=r<.5?2*t*r:2*t*(1-r);let i=0;return n<1&&(i=(r-.5*n)/(1-n)),[e[0],n*100,i*100]};st.hsv.hcg=function(e){const t=e[1]/100,r=e[2]/100,n=t*r;let i=0;return n<1&&(i=(r-n)/(1-n)),[e[0],n*100,i*100]};st.hcg.rgb=function(e){const t=e[0]/360,r=e[1]/100,n=e[2]/100;if(r===0)return[n*255,n*255,n*255];const i=[0,0,0],o=t%1*6,s=o%1,a=1-s;let l=0;switch(Math.floor(o)){case 0:i[0]=1,i[1]=s,i[2]=0;break;case 1:i[0]=a,i[1]=1,i[2]=0;break;case 2:i[0]=0,i[1]=1,i[2]=s;break;case 3:i[0]=0,i[1]=a,i[2]=1;break;case 4:i[0]=s,i[1]=0,i[2]=1;break;default:i[0]=1,i[1]=0,i[2]=a}return l=(1-r)*n,[(r*i[0]+l)*255,(r*i[1]+l)*255,(r*i[2]+l)*255]};st.hcg.hsv=function(e){const t=e[1]/100,r=e[2]/100,n=t+r*(1-t);let i=0;return n>0&&(i=t/n),[e[0],i*100,n*100]};st.hcg.hsl=function(e){const t=e[1]/100,n=e[2]/100*(1-t)+.5*t;let i=0;return n>0&&n<.5?i=t/(2*n):n>=.5&&n<1&&(i=t/(2*(1-n))),[e[0],i*100,n*100]};st.hcg.hwb=function(e){const t=e[1]/100,r=e[2]/100,n=t+r*(1-t);return[e[0],(n-t)*100,(1-n)*100]};st.hwb.hcg=function(e){const t=e[1]/100,n=1-e[2]/100,i=n-t;let o=0;return i<1&&(o=(n-i)/(1-i)),[e[0],i*100,o*100]};st.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]};st.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]};st.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]};st.gray.hsl=function(e){return[0,0,e[0]]};st.gray.hsv=st.gray.hsl;st.gray.hwb=function(e){return[0,100,e[0]]};st.gray.cmyk=function(e){return[0,0,0,e[0]]};st.gray.lab=function(e){return[e[0],0,0]};st.gray.hex=function(e){const t=Math.round(e[0]/100*255)&255,n=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(n.length)+n};st.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]};const fg=uI;function jX(){const e={},t=Object.keys(fg);for(let r=t.length,n=0;n1&&(r=n),e(r))};return"conversion"in e&&(t.conversion=e.conversion),t}function $X(e){const t=function(...r){const n=r[0];if(n==null)return n;n.length>1&&(r=n);const i=e(r);if(typeof i=="object")for(let o=i.length,s=0;s{Bc[e]={},Object.defineProperty(Bc[e],"channels",{value:W1[e].channels}),Object.defineProperty(Bc[e],"labels",{value:W1[e].labels});const t=NX(e);Object.keys(t).forEach(n=>{const i=t[n];Bc[e][n]=$X(i),Bc[e][n].raw=BX(i)})});var FX=Bc;const $c=TX,ki=FX,dI=["keyword","gray","hex"],H1={};for(const e of Object.keys(ki))H1[[...ki[e].labels].sort().join("")]=e;const pg={};function rn(e,t){if(!(this instanceof rn))return new rn(e,t);if(t&&t in dI&&(t=null),t&&!(t in ki))throw new Error("Unknown model: "+t);let r,n;if(e==null)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(e instanceof rn)this.model=e.model,this.color=[...e.color],this.valpha=e.valpha;else if(typeof e=="string"){const i=$c.get(e);if(i===null)throw new Error("Unable to parse color from string: "+e);this.model=i.model,n=ki[this.model].channels,this.color=i.value.slice(0,n),this.valpha=typeof i.value[n]=="number"?i.value[n]:1}else if(e.length>0){this.model=t||"rgb",n=ki[this.model].channels;const i=Array.prototype.slice.call(e,0,n);this.color=V1(i,n),this.valpha=typeof e[n]=="number"?e[n]:1}else if(typeof e=="number")this.model="rgb",this.color=[e>>16&255,e>>8&255,e&255],this.valpha=1;else{this.valpha=1;const i=Object.keys(e);"alpha"in e&&(i.splice(i.indexOf("alpha"),1),this.valpha=typeof e.alpha=="number"?e.alpha:0);const o=i.sort().join("");if(!(o in H1))throw new Error("Unable to parse color from object: "+JSON.stringify(e));this.model=H1[o];const{labels:s}=ki[this.model],a=[];for(r=0;r(e%360+360)%360),saturationl:Pr("hsl",1,Yr(100)),lightness:Pr("hsl",2,Yr(100)),saturationv:Pr("hsv",1,Yr(100)),value:Pr("hsv",2,Yr(100)),chroma:Pr("hcg",1,Yr(100)),gray:Pr("hcg",2,Yr(100)),white:Pr("hwb",1,Yr(100)),wblack:Pr("hwb",2,Yr(100)),cyan:Pr("cmyk",0,Yr(100)),magenta:Pr("cmyk",1,Yr(100)),yellow:Pr("cmyk",2,Yr(100)),black:Pr("cmyk",3,Yr(100)),x:Pr("xyz",0,Yr(95.047)),y:Pr("xyz",1,Yr(100)),z:Pr("xyz",2,Yr(108.833)),l:Pr("lab",0,Yr(100)),a:Pr("lab",1),b:Pr("lab",2),keyword(e){return e!==void 0?new rn(e):ki[this.model].keyword(this.color)},hex(e){return e!==void 0?new rn(e):$c.to.hex(this.rgb().round().color)},hexa(e){if(e!==void 0)return new rn(e);const t=this.rgb().round().color;let r=Math.round(this.valpha*255).toString(16).toUpperCase();return r.length===1&&(r="0"+r),$c.to.hex(t)+r},rgbNumber(){const e=this.rgb().color;return(e[0]&255)<<16|(e[1]&255)<<8|e[2]&255},luminosity(){const e=this.rgb().color,t=[];for(const[r,n]of e.entries()){const i=n/255;t[r]=i<=.04045?i/12.92:((i+.055)/1.055)**2.4}return .2126*t[0]+.7152*t[1]+.0722*t[2]},contrast(e){const t=this.luminosity(),r=e.luminosity();return t>r?(t+.05)/(r+.05):(r+.05)/(t+.05)},level(e){const t=this.contrast(e);return t>=7?"AAA":t>=4.5?"AA":""},isDark(){const e=this.rgb().color;return(e[0]*2126+e[1]*7152+e[2]*722)/1e4<128},isLight(){return!this.isDark()},negate(){const e=this.rgb();for(let t=0;t<3;t++)e.color[t]=255-e.color[t];return e},lighten(e){const t=this.hsl();return t.color[2]+=t.color[2]*e,t},darken(e){const t=this.hsl();return t.color[2]-=t.color[2]*e,t},saturate(e){const t=this.hsl();return t.color[1]+=t.color[1]*e,t},desaturate(e){const t=this.hsl();return t.color[1]-=t.color[1]*e,t},whiten(e){const t=this.hwb();return t.color[1]+=t.color[1]*e,t},blacken(e){const t=this.hwb();return t.color[2]+=t.color[2]*e,t},grayscale(){const e=this.rgb().color,t=e[0]*.3+e[1]*.59+e[2]*.11;return rn.rgb(t,t,t)},fade(e){return this.alpha(this.valpha-this.valpha*e)},opaquer(e){return this.alpha(this.valpha+this.valpha*e)},rotate(e){const t=this.hsl();let r=t.color[0];return r=(r+e)%360,r=r<0?360+r:r,t.color[0]=r,t},mix(e,t){if(!e||!e.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof e);const r=e.rgb(),n=this.rgb(),i=t===void 0?.5:t,o=2*i-1,s=r.alpha()-n.alpha(),a=((o*s===-1?o:(o+s)/(1+o*s))+1)/2,l=1-a;return rn.rgb(a*r.red()+l*n.red(),a*r.green()+l*n.green(),a*r.blue()+l*n.blue(),r.alpha()*i+n.alpha()*(1-i))}};for(const e of Object.keys(ki)){if(dI.includes(e))continue;const{channels:t}=ki[e];rn.prototype[e]=function(...r){return this.model===e?new rn(this):r.length>0?new rn(r,e):new rn([...GX(ki[this.model][e].raw(this.color)),this.valpha],e)},rn[e]=function(...r){let n=r[0];return typeof n=="number"&&(n=V1(r,t)),new rn(n,e)}}function zX(e,t){return Number(e.toFixed(t))}function UX(e){return function(t){return zX(t,e)}}function Pr(e,t,r){e=Array.isArray(e)?e:[e];for(const n of e)(pg[n]||(pg[n]=[]))[t]=r;return e=e[0],function(n){let i;return n!==void 0?(r&&(n=r(n)),i=this[e](),i.color[t]=n,i):(i=this[e]().color[t],r&&(i=r(i)),i)}}function Yr(e){return function(t){return Math.max(0,Math.min(e,t))}}function GX(e){return Array.isArray(e)?e:[e]}function V1(e,t){for(let r=0;r{const{version:e}=Qn();return y.jsxs(_t,{sx:{position:"absolute",bottom:0,right:0,color:"text.disabled"},children:["[",e,"]"]})},HX=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i;function sp(e){return typeof e=="string"&&HX.test(e)}function hg(e){if(!sp(e))throw TypeError("Invalid UUID");var t,r=new Uint8Array(16);return r[0]=(t=parseInt(e.slice(0,8),16))>>>24,r[1]=t>>>16&255,r[2]=t>>>8&255,r[3]=t&255,r[4]=(t=parseInt(e.slice(9,13),16))>>>8,r[5]=t&255,r[6]=(t=parseInt(e.slice(14,18),16))>>>8,r[7]=t&255,r[8]=(t=parseInt(e.slice(19,23),16))>>>8,r[9]=t&255,r[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,r[11]=t/4294967296&255,r[12]=t>>>24&255,r[13]=t>>>16&255,r[14]=t>>>8&255,r[15]=t&255,r}var ln=[];for(var z0=0;z0<256;++z0)ln.push((z0+256).toString(16).slice(1));function VX(e,t=0){return(ln[e[t+0]]+ln[e[t+1]]+ln[e[t+2]]+ln[e[t+3]]+"-"+ln[e[t+4]]+ln[e[t+5]]+"-"+ln[e[t+6]]+ln[e[t+7]]+"-"+ln[e[t+8]]+ln[e[t+9]]+"-"+ln[e[t+10]]+ln[e[t+11]]+ln[e[t+12]]+ln[e[t+13]]+ln[e[t+14]]+ln[e[t+15]]).toLowerCase()}var Rh,KX=new Uint8Array(16);function qX(){if(!Rh&&(Rh=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Rh))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Rh(KX)}var YX=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);const wR={randomUUID:YX};function fI(e,t,r){if(wR.randomUUID&&!t&&!e)return wR.randomUUID();e=e||{};var n=e.random||(e.rng||qX)();return n[6]=n[6]&15|64,n[8]=n[8]&63|128,VX(n)}const Op="wss://gbplaybook-webrtc-server.onrender.com";let Ts;function xS(e){return e.game_state.find().exec().then(t=>e.game_state.bulkRemove(t.map(r=>r._id))).catch(console.error)}let U0=!1;function Zv(e){return async(...t)=>{if(U0)throw"concurent network change";U0=!0;try{await e(...t)}finally{U0=!1}}}const QX=Zv(async(e,t)=>{try{const r=await sJ();console.log(`# join code is ${r}`),t(r);const{uid:n,oid:i,gid:o}=await lJ();await xS(e),console.log("# starting new network game"),Ts=await yS(Op,o),await e.game_state.insertLocal("network",{uid:n,oid:i,gid:o})}finally{jp()}}),XX=Zv(async(e,t)=>{try{const{uid:r,oid:n,gid:i}=await aJ(t);await xS(e),console.log("# joining a network game"),Ts=await yS(Op,i),await e.game_state.insertLocal("network",{uid:r,oid:n,gid:i})}finally{jp()}}),JX=Zv(async e=>{const t=await e.game_state.getLocal("network"),r=t==null?void 0:t.get("gid");r&&Ts===void 0&&(console.log("# reconnecting to a network game"),Ts=await yS(Op,r))}),ZX=Zv(async e=>{console.log("# leaving a network game"),await(Ts==null?void 0:Ts.cancel().catch(console.error).finally(()=>{Ts=void 0})),await xS(e).catch(console.error),await e.game_state.getLocal("network").then(t=>t==null?void 0:t.remove()).catch(console.error)});function SS({allowNew:e=!1}){const{gbdb:t}=Qn(),[r,n]=_.useState(!1),{active:i}=ra();_.useEffect(()=>{t&&i&&!Ts&&JX(t)},[t,i]);const[o,s]=_.useState("default");if(_.useEffect(()=>{s(i?"success":"default")},[i]),!!t)return y.jsxs(y.Fragment,{children:[y.jsx(Io,{size:"small",color:o,disabled:!e&&!i,onClick:()=>n(!0),children:y.jsx(eQ,{})}),y.jsxs(wU,{open:r,onClose:()=>n(!1),children:[y.jsx(TU,{children:"Network Game Setup"}),y.jsx(EU,{children:y.jsx(oJ,{allowNew:e,close:()=>{n(!1)}})})]})]})}const eJ=e=>{const{setActiveStep:t}=e;return y.jsxs(tr,{sx:{display:"flex",flexDirection:"column",gap:"1em"},children:[y.jsx(br,{variant:"contained",onClick:()=>t("Start"),children:"Start a Game"}),y.jsx(br,{variant:"contained",onClick:()=>t("Join"),children:"Join a Game"})]})},tJ=e=>{const{setActiveStep:t}=e,{gbdb:r}=Qn(),[n,i]=_.useState();return _.useEffect(()=>{r&&QX(r,i).then(()=>{t("Ready")}).catch(o=>{console.error(o),t("New")})},[r,t]),y.jsxs(tr,{sx:{display:"flex",flexDirection:"column",gap:"1em",alignItems:"center"},children:[y.jsx(_t,{children:"Share this join code:"}),y.jsx(_t,{variant:"h3",children:n==null?void 0:n.toString().padStart(4,"0")}),y.jsx(_t,{children:"Waiting for opponent to connect."}),y.jsx(br,{variant:"contained",onClick:()=>{jp(),e.setActiveStep("New")},children:"Cancel"})]})},rJ=e=>{const{setActiveStep:t}=e,{gbdb:r}=Qn(),[n,i]=_.useState(),[o,s]=_.useState(!1);if(r)return y.jsxs(tr,{sx:{display:"flex",flexDirection:"column",gap:"1em"},children:[y.jsx(xG,{sx:{margin:"1em"},label:"game join code",variant:"outlined",disabled:o,inputProps:{pattern:"[0-9]*",inputMode:"numeric"},onChange:a=>i(Number(a.target.value))}),y.jsx(br,{variant:"contained",disabled:!n||o,onClick:()=>{s(!0),XX(r,n??0).then(()=>t("Ready")).then(()=>s(!1)).catch(a=>{console.error(a),t("New")})},children:"Join a Game"}),y.jsx(br,{variant:"contained",onClick:()=>{jp(),s(!1),t("New")},children:"Cancel"})]})},nJ=e=>{const{setActiveStep:t}=e,{gbdb:r}=Qn(),n=Ya(),{setting$:i}=di();if(r)return y.jsxs(p1,{spacing:2,alignItems:"center",children:[y.jsx(_t,{variant:"h6",children:"Connected"}),y.jsxs(p1,{direction:"row",spacing:2,children:[y.jsx(br,{variant:"contained",onClick:()=>ZX(r).then(()=>t("New")).then(()=>i&&Gr(i)).then(o=>o==null?void 0:o.incrementalPatch({gamePlayRoute:void 0})).then(()=>{n("/",{})}).catch(console.error),children:"Leave Game"}),y.jsx(br,{color:"success",variant:"contained",onClick:()=>{var o;(o=e.close)==null||o.call(e)},children:"Continue"})]})]})},iJ=()=>y.jsx(_t,{children:"Network Games must be started from the inital guild selection screen."});function oJ({allowNew:e=!1,close:t}){const{active:r}=ra(),[n,i]=_.useState(e?"New":"Block");return _.useEffect(()=>{r&&i("Ready")},[r]),_.useEffect(()=>()=>{jp()},[]),y.jsxs(tr,{children:[n==="New"&&y.jsx(eJ,{setActiveStep:i}),n==="Start"&&y.jsx(tJ,{setActiveStep:i}),n==="Join"&&y.jsx(rJ,{setActiveStep:i}),n==="Ready"&&y.jsx(nJ,{setActiveStep:i,close:t}),n==="Block"&&y.jsx(iJ,{})]})}let er;function sJ(){return new Promise((e,t)=>{er=new WebSocket(Op),er.onopen=()=>{er==null||er.send(JSON.stringify({type:"handshake-begin"}))},er.onclose=()=>{t("socket closed")},er.onerror=r=>{t(r)},er.onmessage=r=>{const n=JSON.parse(r.data);switch(n.type){case"handshake-response":er&&(er.onmessage=null),e(n.code);break}}})}function aJ(e){return new Promise((t,r)=>{if(!e){r("Invalid Arguments (id undefined)");return}er=new WebSocket(Op),er.onopen=()=>{er==null||er.send(JSON.stringify({type:"handshake-join",code:e}))},er.onclose=()=>{r("socket closed")},er.onerror=n=>{r(n)},er.onmessage=n=>{const i=JSON.parse(n.data);switch(i.type){case"handshake-complete":{const o=i.yourId;if(!sp(o)){r(`invalid uID ${o}`);return}const s=i.otherId;if(!sp(s)){r(`invalid oID ${s}`);return}const a=hg(o),l=hg(s),c=a.map((d,f)=>d^l[f]),u=fI({random:c});t({uid:o,oid:s,gid:u})}break}}})}function lJ(){return new Promise((e,t)=>{if((er==null?void 0:er.readyState)!==1){t("socket closed");return}er.onclose=()=>{t("socket closed")},er.onerror=r=>{t(r)},er.onmessage=r=>{const n=JSON.parse(r.data);switch(n.type){case"handshake-complete":{const i=n.yourId;if(!sp(i)){t(`invalid uID ${i}`);return}const o=n.otherId;if(!sp(o)){t(`invalid oID ${o}`);return}const s=hg(i),a=hg(o),l=s.map((u,d)=>u^a[d]),c=fI({random:l});e({uid:i,oid:o,gid:c})}break}}})}function jp(){er==null||er.close(),er=void 0}function ey(){return pp()}var CS={},cJ=ds;Object.defineProperty(CS,"__esModule",{value:!0});var pI=CS.default=void 0,uJ=cJ(fs()),dJ=y;pI=CS.default=(0,uJ.default)((0,dJ.jsx)("path",{d:"M8 5v14l11-7z"}),"PlayArrow");function fJ(e){switch(e){case"Guilds":return"/game";case"Draft":return"/game/draft";case"Game":return"/game/draft/play"}}function hI(e){const t=Ya(),{gameState1$:r,gameState2$:n}=ey(),{active:i}=ra(),[o,s]=_.useState(),[a,l]=_.useState(),[c,u]=_.useState(!1),{dest:d,onAction:f,...p}=e;return _.useEffect(()=>{const h=r==null?void 0:r.pipe(qt(k=>k==null?void 0:k.navigateTo)).subscribe(k=>s(k)),v=n==null?void 0:n.pipe(qt(k=>k==null?void 0:k.navigateTo)).subscribe(k=>l(k));return()=>{h==null||h.unsubscribe(),v==null||v.unsubscribe()}},[r,n]),_.useEffect(()=>{const h=async()=>{await Gr(r).then(v=>{v==null||v.incrementalPatch({navigateTo:void 0}).catch(console.error)}),i||await Gr(n).then(v=>{v==null||v.incrementalPatch({navigateTo:void 0}).catch(console.error)}),t(fJ(d))};o==d&&a===d&&h()},[r,n,d,o,a,i,t,f]),_.useEffect(()=>{u(a===d)},[d,a]),y.jsx(IU,{className:c?"fabAnimate":void 0,...p,color:"secondary",onClick:()=>{f==null||f(),Gr(r).then(h=>{h==null||h.incrementalPatch({navigateTo:d}).catch(console.error)}),i||Gr(n).then(h=>{h==null||h.incrementalPatch({navigateTo:d}).catch(console.error)})},children:y.jsx(pI,{fontSize:"large",sx:{zIndex:10}})})}function xR({team:e,size:t}){const r=fo(n=>n.guilds.findOne().where({name:e}).exec(),[e]);return r?y.jsxs("div",{style:{position:"absolute",width:"100%",height:"100%",display:"flex",placeContent:"center",placeItems:"center",overflow:"hidden",zIndex:-1,backgroundColor:op(r.shadow??r.darkColor??r.color).darken(.25).desaturate(.25).string()},children:[y.jsx(Ai,{icon:e,fontSize:t,style:{color:"rgba(0, 0, 0, 60%)",flexShrink:0}}),y.jsx(_t,{variant:"caption",style:{position:"absolute",color:"whitesmoke",textShadow:"1px 1px 1px black, -1px -1px 1px black, 1px -1px 1px black, -1px 1px 1px black, 0 1px 1px black, 1px 0 1px black, 0 -1px 1px black, -1px 0 1px black",textTransform:"capitalize"},children:e})]}):null}function pJ(e){const[t,r]=_.useState("P1"),[n,i]=_.useState(),[o,s]=_.useState(),[a,l]=_.useState(!1),c=qn(),{active:u}=ra(),{gameState1$:d,gameState2$:f}=ey(),[p,h]=_.useState();_.useEffect(()=>{i(void 0),r("P1");const x=d==null?void 0:d.subscribe(g=>h(g));return()=>x==null?void 0:x.unsubscribe()},[d]);const[v,k]=_.useState();_.useEffect(()=>{s(void 0),r("P1");const x=f==null?void 0:f.subscribe(g=>k(g));return()=>x==null?void 0:x.unsubscribe()},[f]),_.useEffect(()=>{const x=p==null?void 0:p.get$("guild").subscribe(g=>i(g));return()=>x==null?void 0:x.unsubscribe()},[p]),_.useEffect(()=>{const x=v==null?void 0:v.get$("guild").subscribe(g=>s(g));return()=>x==null?void 0:x.unsubscribe()},[v]);const b=_.useCallback(async x=>{x&&(t==="P1"?(await(p==null?void 0:p.incrementalPatch({guild:x,roster:[]}).catch(console.error)),r(!o&&!u?"P2":"GO")):t==="P2"&&(await(v==null?void 0:v.incrementalPatch({guild:x,roster:[]}).catch(console.error)),r(n?"GO":"P1")))},[t,n,o,p,v,u]);return _.useEffect(()=>{const x=e.update$.subscribe(g=>b(g));return()=>x.unsubscribe()},[e.update$,b]),y.jsxs("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",margin:"5px",gap:"5px"},children:[y.jsx(br,{variant:"outlined",style:{minWidth:e.size,maxWidth:e.size,minHeight:e.size,maxHeight:e.size,fontSize:e.size*.5,...t==="P1"?{borderColor:c.palette.secondary.light,borderRadius:"12px",borderWidth:"4px"}:{borderColor:c.palette.primary.dark,borderRadius:"12px",borderWidth:"4px"}},onClick:()=>r("P1"),children:n?y.jsx(xR,{team:n,size:e.size}):"P1"}),y.jsxs("div",{style:{height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"0.25em"},children:[y.jsx(_t,{variant:"caption",children:"vs"}),y.jsx(hI,{dest:"Draft",disabled:!n||!o,onAction:()=>l(!0),sx:{m:"0 15px"}}),y.jsx(_t,{variant:"caption",children:a?"(waiting)":" "})]}),y.jsx(br,{variant:"outlined",disabled:u,style:{minWidth:e.size,maxWidth:e.size,minHeight:e.size,maxHeight:e.size,fontSize:e.size*.5,...t==="P2"?{borderColor:c.palette.secondary.light,borderRadius:"12px",borderWidth:"4px"}:{borderColor:c.palette.primary.dark,borderRadius:"12px",borderWidth:"4px"}},onClick:()=>r("P2"),children:o?y.jsx(xR,{team:o,size:e.size}):"P2"})]})}function hJ(){return y.jsxs(tr,{sx:{width:"100%",height:"100%",position:"relative"},children:[y.jsx(ps,{children:y.jsxs("div",{style:{display:"flex",flexDirection:"row",width:"100%",justifyContent:"space-between"},children:[y.jsx(Za,{separator:y.jsx(lc,{fontSize:"small"}),children:y.jsx(Io,{size:"small",disabled:!0,children:y.jsx(wS,{sx:{color:"text.secondary"}})})}),y.jsx(SS,{allowNew:!0})]})}),y.jsx(nI,{Controller:pJ}),y.jsx(cc,{})]})}var mg={exports:{}};mg.exports;(function(e,t){var r=200,n="__lodash_hash_undefined__",i=9007199254740991,o="[object Arguments]",s="[object Array]",a="[object Boolean]",l="[object Date]",c="[object Error]",u="[object Function]",d="[object GeneratorFunction]",f="[object Map]",p="[object Number]",h="[object Object]",v="[object Promise]",k="[object RegExp]",b="[object Set]",x="[object String]",g="[object Symbol]",C="[object WeakMap]",E="[object ArrayBuffer]",j="[object DataView]",R="[object Float32Array]",O="[object Float64Array]",P="[object Int8Array]",L="[object Int16Array]",A="[object Int32Array]",$="[object Uint8Array]",F="[object Uint8ClampedArray]",K="[object Uint16Array]",Y="[object Uint32Array]",Z=/[\\^$.*+?()[\]{}|]/g,le=/\w*$/,V=/^\[object .+?Constructor\]$/,H=/^(?:0|[1-9]\d*)$/,ae={};ae[o]=ae[s]=ae[E]=ae[j]=ae[a]=ae[l]=ae[R]=ae[O]=ae[P]=ae[L]=ae[A]=ae[f]=ae[p]=ae[h]=ae[k]=ae[b]=ae[x]=ae[g]=ae[$]=ae[F]=ae[K]=ae[Y]=!0,ae[c]=ae[u]=ae[C]=!1;var Re=typeof _n=="object"&&_n&&_n.Object===Object&&_n,Ue=typeof self=="object"&&self&&self.Object===Object&&self,Ce=Re||Ue||Function("return this")(),Pe=t&&!t.nodeType&&t,Xe=Pe&&!0&&e&&!e.nodeType&&e,Le=Xe&&Xe.exports===Pe;function Ze(U,he){return U.set(he[0],he[1]),U}function ct(U,he){return U.add(he),U}function je(U,he){for(var ke=-1,at=U?U.length:0;++ke-1}function vt(U,he){var ke=this.__data__,at=Vr(ke,U);return at<0?ke.push([U,he]):ke[at][1]=he,this}re.prototype.clear=ge,re.prototype.delete=_e,re.prototype.get=Ye,re.prototype.has=Je,re.prototype.set=vt;function ze(U){var he=-1,ke=U?U.length:0;for(this.clear();++he-1&&U%1==0&&U-1&&U%1==0&&U<=i}function sl(U){var he=typeof U;return!!U&&(he=="object"||he=="function")}function ad(U){return!!U&&typeof U=="object"}function vs(U){return pc(U)?Gi(U):en(U)}function ld(){return[]}function Mp(){return!1}e.exports=$r})(mg,mg.exports);var mJ=mg.exports;const mI=Ha(mJ);var _S={},gJ=ds;Object.defineProperty(_S,"__esModule",{value:!0});var gI=_S.default=void 0,vJ=gJ(fs()),yJ=y;gI=_S.default=(0,vJ.default)((0,yJ.jsx)("path",{d:"M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5m0-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"}),"RadioButtonChecked");var kS={},bJ=ds;Object.defineProperty(kS,"__esModule",{value:!0});var vI=kS.default=void 0,wJ=bJ(fs()),xJ=y;vI=kS.default=(0,wJ.default)((0,xJ.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"}),"RadioButtonUnchecked");const ES=(e,t)=>{const r=Lt.useRef(null);return dX(()=>{var n;e&&((n=r.current)==null||n.animate({backgroundColor:["initial","red","initial"],boxShadow:["0 0 0px 0px transparent","0 0 0.25em 0.25em red","0 0 0.25em 0.25em transparent"]},500))},t),r};function Ys(e,t,r){return e.sort((n,i)=>{const o=r.findIndex(a=>a===n[t]),s=r.findIndex(a=>a===i[t]);return o-s})}function vf(e,t,r,n,i,o){let s=r;return i(t)&&(s+=n?1:-1,s===o?e.forEach(a=>{!a.selected&&i(a)&&(a.disabled+=1)}):s===o-1&&r===o&&e.forEach(a=>{!(a===t||a.selected)&&i(a)&&(a.disabled+=-1)})),s}function yI(e,t,r){e.forEach(n=>{n!==t&&n.name===t.name&&(n.disabled+=r?1:-1),(n.dehcneb===t.name||n.name===t.dehcneb)&&(n.disabled+=r?1:-1)})}function bI(e,t,r,n){if(t.dehcneb){const i=e.find(o=>o.benched&&o.name===t.dehcneb);i&&n(i,r)}}function Ol({model:e,disabled:t=!1,stateDoc:r,updateCounts:n}){const[i,o]=_.useState(e.selected);_.useEffect(()=>{const l=r.get$("roster").pipe(qt(c=>c.map(u=>u.name).includes(e.id))).subscribe(c=>{o(c),c!==e.selected&&!e.benched&&n(e,c)});return()=>l==null?void 0:l.unsubscribe()},[r,e,n]);const s=ES(t,[i]);return y.jsx(Ms,{ref:s,label:e.id,control:y.jsx(Is,{size:"small",checked:i,disabled:e.disabled>0||t,onChange:a=>{const l=a.target.checked;r.incrementalModify(c=>{if(l){const u=c.roster.concat({name:e.id,health:e.hp});c.roster=u}else{const u=c.roster.filter(d=>d.name!=e.id);c.roster=u}return c}).catch(console.error)},icon:y.jsx(vI,{}),checkedIcon:y.jsx(gI,{})})})}const wI=Ee(Sz)(()=>({"& .MuiBadge-badge":{right:"2em",top:"2em"}})),fa={3:{captain:1,mascot:0,squaddies:2},4:{captain:1,mascot:1,squaddies:2},6:{captain:1,mascot:1,squaddies:4}},SR=e=>{const{guild:t,ready:r,unready:n,disabled:i=!1,style:o}=e,{setting$:s}=di(),[a,l]=_.useState(6);_.useEffect(()=>{const x=s==null?void 0:s.pipe(qt(g=>g==null?void 0:g.toJSON().data.gameSize)).subscribe(g=>l(g??6));return()=>x==null?void 0:x.unsubscribe()},[s]);const c=_.useRef({captain:0,mascot:0,squaddieCount:0}),[,u]=_.useState(0),[d,f]=_.useState(!1),p=fo(async x=>{const C=(await x.models.find().where("id").in(t.roster).exec()).map(E=>Object.assign(E.toMutableJSON(),{selected:!1,disabled:E.benched?1:0}));if(Ys(C,"id",t.roster),!i&&t.minor){const E=new Set(e.stateDoc.get("roster").map(j=>JSON.stringify(j)));C.forEach(j=>{(j.captain||j.mascot&&fa[a].mascot>0)&&(E.add(JSON.stringify({name:j.id,health:j.hp})),j.disabled=1)}),e.stateDoc.incrementalModify(j=>(j.roster=Array.from(E).map(R=>JSON.parse(R)),j)).catch(console.error)}return fa[a].mascot===0&&C.forEach(E=>{E.mascot&&(E.disabled=1)}),C},[t,a]),h=_.useCallback((x,g)=>{function C(L,A,$,F){return vf(L,A,$,F,K=>!!K.captain,fa[a].captain)}function E(L,A,$,F){return vf(L,A,$,F,K=>!!K.mascot,fa[a].mascot)}function j(L,A,$,F){return vf(L,A,$,F,K=>!(K.captain||K.mascot),fa[a].squaddies)}if(!p)return;x.selected=g;const R=C(p,x,c.current.captain,g);c.current.captain=R;const O=E(p,x,c.current.mascot,g);c.current.mascot=O;const P=j(p,x,c.current.squaddieCount,g);c.current.squaddieCount=P,yI(p,x,g),bI(p,x,g,(L,A)=>{i||(L.selected=A,e.stateDoc.incrementalModify($=>{if(A){const F=$.roster.concat({name:L.id,health:L.hp});$.roster=F}else{const F=$.roster.filter(K=>K.name!=L.id);$.roster=F}return $}))}),R===fa[a].captain&&O===fa[a].mascot&&P===fa[a].squaddies?f(!0):f(!1),u(L=>L+1)},[e.stateDoc,p,a,i]);if(_.useEffect(()=>{if(d&&p){const x=mI(p.filter(g=>g.selected));r==null||r(x)}else n==null||n()},[d,t,p,r,n]),!p)return null;const v=p.filter(x=>x.captain),k=p.filter(x=>x.mascot&&!x.captain),b=p.filter(x=>!x.captain&&!x.mascot);return y.jsx(wI,{badgeContent:d?y.jsx(HL,{color:"success"}):0,style:{overflow:"visible",...o},children:y.jsxs(LO,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr 1fr",border:"4px solid",borderColor:t.darkColor??t.color,borderRadius:"1em",padding:"1ex",width:"100%",overflow:"visible"},children:[y.jsxs("div",{style:{display:"flex",flexDirection:"column"},children:[y.jsx("span",{children:"Captains :"}),v.map(x=>y.jsx(Ol,{model:x,stateDoc:e.stateDoc,updateCounts:h,disabled:i},x.id)),y.jsx("span",{children:"Mascots :"}),k.map(x=>y.jsx(Ol,{model:x,stateDoc:e.stateDoc,updateCounts:h,disabled:i},x.id))]}),y.jsxs("div",{style:{display:"flex",flexDirection:"column"},children:[y.jsx("span",{children:"Squaddies :"}),b.slice(0,b.length/2).map(x=>y.jsx(Ol,{model:x,stateDoc:e.stateDoc,updateCounts:h,disabled:i},x.id))]}),y.jsxs("div",{style:{display:"flex",flexDirection:"column"},children:[y.jsx("span",{children:" "}),b.slice(b.length/2).map(x=>y.jsx(Ol,{model:x,stateDoc:e.stateDoc,updateCounts:h,disabled:i},x.id))]})]})})},Ph={3:{master:1,apprentice:2},4:{master:2,apprentice:2},6:{master:3,apprentice:3}},CR=e=>{const{guild:t,ready:r,unready:n,disabled:i=!1,style:o}=e,{setting$:s}=di(),[a,l]=_.useState(6);_.useEffect(()=>{const b=s==null?void 0:s.pipe(qt(x=>x==null?void 0:x.toJSON().data.gameSize)).subscribe(x=>l(x??6));return()=>b==null?void 0:b.unsubscribe()},[s]);const c=_.useRef({masterCount:0,apprenticeCount:0}),[,u]=_.useState(0),[d,f]=_.useState(!1),p=fo(async b=>{const g=(await b.models.find().where("id").in(t.roster).exec()).map(C=>Object.assign(C.toMutableJSON(),{selected:!1,disabled:C.benched?1:0}));return Ys(g,"id",t.roster),g},[t]),h=_.useCallback((b,x)=>{function g(R,O,P,L){return vf(R,O,P,L,A=>!!A.captain,Ph[a].master)}function C(R,O,P,L){return vf(R,O,P,L,A=>!A.captain,Ph[a].apprentice)}if(!p)return;b.selected=x;const E=g(p,b,c.current.masterCount,x);c.current.masterCount=E;const j=C(p,b,c.current.apprenticeCount,x);c.current.apprenticeCount=j,yI(p,b,x),bI(p,b,x,(R,O)=>{i||(R.selected=O,e.stateDoc.incrementalModify(P=>{if(O){const L=P.roster.concat({name:R.id,health:R.hp});P.roster=L}else{const L=P.roster.filter(A=>A.name!=R.id);P.roster=L}return P}))}),E===Ph[a].master&&j===Ph[a].apprentice?f(!0):f(!1),u(R=>R+1)},[e.stateDoc,p,a,i]);if(_.useEffect(()=>{if(d&&p){const b=mI(p.filter(x=>x.selected));r==null||r(b)}else n==null||n()},[d,t,p,r,n]),!p)return null;const v=p.filter(b=>b.captain),k=p.filter(b=>!b.captain);return y.jsx(wI,{badgeContent:d?y.jsx(HL,{color:"success"}):0,style:{overflow:"visible",...o},children:y.jsxs(LO,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr 1fr",border:"4px solid",borderColor:t.darkColor??t.color,borderRadius:"1em",padding:"1ex",width:"100%",overflow:"visible"},children:[y.jsxs("div",{style:{display:"flex",flexDirection:"column"},children:[y.jsx("span",{children:"Masters :"}),v.map(b=>y.jsx(Ol,{model:b,stateDoc:e.stateDoc,updateCounts:h,disabled:i},b.id))]}),y.jsxs("div",{style:{display:"flex",flexDirection:"column"},children:[y.jsx("span",{children:"Apprentices :"}),k.slice(0,k.length/2).map(b=>y.jsx(Ol,{model:b,stateDoc:e.stateDoc,updateCounts:h,disabled:i},b.id))]}),y.jsxs("div",{style:{display:"flex",flexDirection:"column"},children:[y.jsx("span",{children:" "}),k.slice(k.length/2).map(b=>y.jsx(Ol,{model:b,stateDoc:e.stateDoc,updateCounts:h,disabled:i},b.id))]})]})})};function SJ(){const{active:e}=ra();return y.jsxs(tr,{className:"DraftScreen",children:[y.jsx(ps,{children:y.jsxs(tr,{sx:{width:"100%",display:"flex",flexDirection:"row",justifyContent:"space-between"},children:[y.jsxs(Za,{separator:y.jsx(lc,{fontSize:"small"}),children:[y.jsx(Io,{color:"inherit",href:"/game",size:"small",disabled:e,children:y.jsx(wS,{})}),y.jsx(_t,{children:"Draft"})]}),y.jsxs("div",{children:[y.jsx(_J,{}),y.jsx(SS,{})]})]})}),y.jsx(CJ,{}),y.jsx(cc,{})]})}function CJ(){const{setting$:e}=di(),t=Ya(),[r,n]=_.useState(),[i,o]=_.useState(),s=_.useCallback(R=>n(R),[]),a=_.useCallback(R=>o(R),[]),l=_.useCallback(()=>n(void 0),[]),c=_.useCallback(()=>o(void 0),[]),[u,d]=_.useState();_.useEffect(()=>{const R=e==null?void 0:e.pipe(qt(O=>O==null?void 0:O.toJSON().data.gameSize)).subscribe(O=>d(O));return()=>R==null?void 0:R.unsubscribe()},[e]);const{active:f}=ra(),{gameState1$:p,gameState2$:h}=ey(),[v,k]=_.useState();_.useEffect(()=>{if(!p)return;let R=!1;return(async()=>{const P=await Gr(p);R||k(P)})(),()=>{R=!0}},[p]);const[b,x]=_.useState();_.useEffect(()=>{if(!h)return;let R=!1;return(async()=>{const P=await Gr(h);R||x(P)})(),()=>{R=!0}},[h]);const[g,C]=fo(async R=>{const O=v==null?void 0:v.guild,P=b==null?void 0:b.guild;if(!O||!P)return;const[L,A]=await Promise.all([R.guilds.findOne().where({name:O}).exec(),R.guilds.findOne().where({name:P}).exec()]);if(!L||!A){t("/game");return}return[L,A]},[v,b,t])??[];if(!g||!C||!v||!b)return null;const E=g.name==="Blacksmiths"?CR:SR,j=C.name==="Blacksmiths"?CR:SR;return y.jsxs(y.Fragment,{children:[y.jsx(E,{guild:g,stateDoc:v,ready:s,unready:l,style:{width:"100%"}},`1-${u}`),y.jsx(hI,{dest:"Game",disabled:!r||!i,onAction:()=>{v.incrementalPatch({score:0,momentum:0,roster:(r==null?void 0:r.map(R=>({name:R.id,health:R.hp})))||[]}).catch(console.error),f||b.incrementalPatch({score:0,momentum:0,roster:(i==null?void 0:i.map(R=>({name:R.id,health:R.hp})))||[]}).catch(console.error)},sx:{m:"10px"}}),y.jsx(j,{guild:C,stateDoc:b,ready:a,unready:c,style:{width:"100%"},disabled:f},`2-${u}`)]})}function _J(){const[e,t]=_.useState(null),r=!!e,n=c=>{t(c.currentTarget)},i=()=>{t(null)},{setting$:o}=di(),[s,a]=_.useState();_.useEffect(()=>{const c=o==null?void 0:o.subscribe(u=>a(u));return()=>c==null?void 0:c.unsubscribe()},[o]);const l=s==null?void 0:s.toJSON().data.gameSize;return y.jsxs(y.Fragment,{children:[y.jsx(Io,{onClick:n,color:"inherit",size:"small",sx:{backgroundColor:"primary.dark"},children:y.jsxs(_t,{children:[l,"v",l]})}),y.jsx(Nv,{anchorEl:e,open:r,onClose:i,onClick:i,children:y.jsxs(BO,{dense:!0,children:[y.jsx(xi,{selected:l===6,onClick:()=>{s==null||s.incrementalPatch({gameSize:6})},children:"6v6"}),y.jsx(xi,{selected:l===4,onClick:()=>{s==null||s.incrementalPatch({gameSize:4})},children:"4v4"}),y.jsx(xi,{selected:l===3,onClick:()=>{s==null||s.incrementalPatch({gameSize:3})},children:"3v3"})]})})]})}var RS={},kJ=ds;Object.defineProperty(RS,"__esModule",{value:!0});var gg=RS.default=void 0,EJ=kJ(fs()),RJ=y;gg=RS.default=(0,EJ.default)((0,RJ.jsx)("path",{d:"M19 13H5v-2h14z"}),"Remove");var PS={},PJ=ds;Object.defineProperty(PS,"__esModule",{value:!0});var vg=PS.default=void 0,TJ=PJ(fs()),OJ=y;vg=PS.default=(0,TJ.default)((0,OJ.jsx)("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"Add");function _R(e){jJ(e)&&e.touches.length<2&&e.preventDefault&&e.cancelable&&e.preventDefault()}function jJ(e){return e&&"touches"in e}function K1({onLongPress:e,onClick:t},{delay:r=500,shouldPreventDefault:n=!0}={}){const[i,o]=_.useState(!1),s=_.useRef(),a=_.useRef(),l=_.useCallback(u=>{u.persist();const d={...u};n&&u.target&&(u.target.addEventListener("touchend",_R,{passive:!1}),a.current=u.target),s.current=setTimeout(()=>{e(d),o(!0)},r)},[e,r,n]),c=_.useCallback((u,d=!0)=>{s.current&&clearTimeout(s.current),d&&!i&&(t==null||t(u)),o(!1),n&&a.current&&a.current.removeEventListener("touchend",_R)},[n,t,i]);return{onMouseDown:u=>l(u),onTouchStart:u=>l(u),onMouseUp:u=>c(u),onMouseLeave:u=>c(u,!1),onTouchEnd:u=>c(u),onTouchMove:u=>c(u)}}function LJ(e){const{disabled:t,object:r,label:n}=e,i=n(r),o=ES(t,[i]);return y.jsx(_t,{ref:o,sx:{width:"100%",textAlign:"center"},children:i})}function xI({object:e,label:t,value:r,setValue:n,disabled:i=!1,longPressClear:o=!1}){const s=K1({onLongPress:()=>{n(e,0)},onClick:a=>{a.stopPropagation();const l=r(e);l>0&&n(e,l-1)}});return y.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:[y.jsx(LJ,{disabled:i,object:e,label:t}),y.jsxs(qf,{size:"small",variant:"contained",disabled:i,children:[y.jsx(br,{...o?s:{},onClick:a=>{if(a.stopPropagation(),!o){const l=r(e);l>0&&n(e,l-1)}},children:y.jsx(gg,{fontSize:"inherit"})}),y.jsx(br,{onClick:a=>{a.stopPropagation();const l=r(e);n(e,l+1)},children:y.jsx(vg,{fontSize:"inherit"})})]})]})}const kR=e=>{const{model:t,disabled:r}=e,n=ES(r,[e.health]);return y.jsx(br,{ref:n,disabled:!0,size:"small",children:y.jsx(_t,{variant:"body2",color:"text.primary",children:`${String(e.health).padStart(2,"0")} / ${String(t.hp).padStart(2,"0")}`})})};function SI({state:e,model:t,disabled:r=!1,stacked:n=!1}){const i=K1({onLongPress:()=>{e.incrementalModify(u=>{const d=u.roster.findIndex(f=>f.name===t.id);return u.roster[d].health=0,u})},onClick:()=>{e.incrementalModify(u=>{const d=u.roster.findIndex(f=>f.name===t.id);return u.roster[d].health>0&&(u.roster[d].health-=1),u})}}),o=K1({onLongPress:()=>{e.incrementalModify(u=>{const d=u.roster.findIndex(f=>f.name===t.id);return u.roster[d].health{e.incrementalModify(u=>{const d=u.roster.findIndex(f=>f.name===t.id);return u.roster[d].healthu.name===t.id),a=_.useMemo(()=>e.get$("roster").pipe(qt(u=>u[s].health)),[e,s]),[l,c]=_.useState(t.hp);return _.useEffect(()=>{const u=a.subscribe(d=>c(d));return()=>u.unsubscribe()},[a]),y.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:n?y.jsxs(y.Fragment,{children:[y.jsx(kR,{health:l,model:t,disabled:r}),y.jsxs(qf,{size:"small",variant:"contained",disabled:r,sx:{"& .MuiButtonGroup-grouped":{minWidth:"1rem"}},children:[y.jsx(br,{...i,onClick:u=>u.stopPropagation(),children:y.jsx(gg,{fontSize:"inherit",sx:{pointerEvents:"none"}})}),y.jsx(br,{...o,onClick:u=>u.stopPropagation(),children:y.jsx(vg,{fontSize:"inherit",sx:{pointerEvents:"none"}})})]})]}):y.jsxs(qf,{size:"small",variant:"contained",disabled:r,children:[y.jsx(br,{...i,onClick:u=>u.stopPropagation(),children:y.jsx(gg,{fontSize:"inherit",sx:{pointerEvents:"none"}})}),y.jsx(kR,{health:l,model:t,disabled:r}),y.jsx(br,{...o,onClick:u=>u.stopPropagation(),children:y.jsx(vg,{fontSize:"inherit",sx:{pointerEvents:"none"}})})]})})}function IJ(e){const t=e.state,[r,n]=_.useState(0);return _.useEffect(()=>{const i=t.get$("score").subscribe(o=>n(o));return()=>i.unsubscribe()},[t]),y.jsx(xI,{object:t,disabled:e.disabled,label:()=>`VP: ${r}`,value:()=>r,setValue:(i,o)=>{i.incrementalModify(s=>(s.score=o,s))}})}function MJ(e){const t=e.state,[r,n]=_.useState(0);return _.useEffect(()=>{const i=t.get$("momentum").subscribe(o=>n(o));return()=>i.unsubscribe()},[t]),y.jsx(xI,{object:t,disabled:e.disabled,longPressClear:!0,label:()=>`MOM: ${r}`,value:()=>r,setValue:(i,o)=>{i.incrementalModify(s=>(s.momentum=o,s))}})}function AJ({teams:e,rosters:t,expanded:r,onClick:n,disabled:i}){const o=qn(),{setting$:s}=di(),[a,l]=_.useState();_.useEffect(()=>{const u=s==null?void 0:s.pipe(qt(d=>d==null?void 0:d.toJSON().data.uiPreferences.displayStatLine)).subscribe(d=>l(d));return()=>u==null?void 0:u.unsubscribe()});const c=e.reduce((u,d,f)=>[...u,u[f]+d.roster.length+1],[0]);return y.jsx(tr,{sx:{flexGrow:0,overflow:"auto"},children:e.map((u,d)=>{const f=c[d]+1;return y.jsxs(g6,{expanded:r===!0,square:!0,sx:{backgroundColor:"transparent"},disableGutters:!0,elevation:0,children:[y.jsx(E6,{sx:{position:"sticky",top:0,zIndex:1,padding:0,borderBottom:`1px solid ${o.palette.divider}`,".MuiAccordionSummary-content":{margin:0}},children:y.jsxs(u1,{onClick:()=>{n(f-1,!r)},sx:{width:"100%",display:"flex",flexDirection:"row"},children:[y.jsx(c9,{sx:{alignItems:"center"},children:y.jsx("div",{style:{fontSize:36,width:"1em",height:"1em",overflow:"visible",display:"flex",alignItems:"center",justifyContent:"center"},children:y.jsx(Ai,{icon:u.guild,style:{color:o.palette.text.secondary,filter:"unset",flexShrink:0}})})}),y.jsx(Cs,{primary:u.guild,secondary:`${t[d].reduce((p,h)=>p+(h._inf??h.inf),0)} INF`}),y.jsxs("div",{style:{display:"flex",flexDirection:"row",gap:"4px"},children:[y.jsx(IJ,{state:u,disabled:i[d]}),y.jsx(MJ,{state:u,disabled:i[d]})]})]})}),y.jsx(w6,{sx:{padding:0},children:y.jsx(sf,{disablePadding:!0,sx:{"li:nth-of-type(odd)":{"&.MuiListItem-root":{backgroundColor:"rgba(100%, 100%, 100%, 5%)"}}},children:t[d].map((p,h)=>y.jsx(vo,{secondaryAction:y.jsx(SI,{state:u,model:p,disabled:i[d]}),onClick:()=>{n(f+h,!1)},children:y.jsx(Cs,{primary:p.id,secondary:a?p.statLine:null})},p.id))},d)})]},d)})})}const Mn=new URL("/assets/GB-S4-Alchemists-20-03-01-CtoJr-2q.jpg",import.meta.url).href,An=new URL("/assets/GB-S4-Blacksmiths-20-03-03-BcPp4ACy.jpg",import.meta.url).href,Nn=new URL("/assets/GB-S4-Brewers-20-03-03-BTowl5yC.jpg",import.meta.url).href,Dn=new URL("/assets/GB-S4-Butchers-19-08-03-B1bjdh3r.jpg",import.meta.url).href,Pc=new URL("/assets/GB-S4-Cooks-19-08-03-Du8Wgf95.jpg",import.meta.url).href,Zn=new URL("/assets/GB-S4-Engineers-20-03-03-CaTM1yPN.jpg",import.meta.url).href,Tc=new URL("/assets/GB-S4-Falconers-20-03-03--r8Ylt5C.jpg",import.meta.url).href,Bn=new URL("/assets/GB-S4-Farmers-19-12-03-D9S_zy2g.jpg",import.meta.url).href,$n=new URL("/assets/GB-S4-Fishermen-19-08-03-HE2w3ci9.jpg",import.meta.url).href,Fn=new URL("/assets/GB-S4-Hunters-19-08-03-C59ee243.jpg",import.meta.url).href,zn=new URL("/assets/GB-S4-Masons-19-08-01-B2F-qHyR.jpg",import.meta.url).href,Oc=new URL("/assets/GB-S4-Miners-20-03-03-Bvr7X2VN.jpg",import.meta.url).href,Sn=new URL("/assets/GB-S4-Morticians-19-08-03-BEjT_hxM.jpg",import.meta.url).href,jc=new URL("/assets/GB-S4-Navigators-20-03-03-DuY0bj8b.jpg",import.meta.url).href,pa=new URL("/assets/Order_back-qsepM33g.jpg",import.meta.url).href,Lc=new URL("/assets/GB-S4-Ratcatchers-19-08-03-vf5l_pcD.jpg",import.meta.url).href,pl=new URL("/assets/GB-S4-Shepherds-20-03-03-CJ-GnLek.jpg",import.meta.url).href,ei=new URL("/assets/GB-S4-Union-20-03-03-ByRX6Zf6.jpg",import.meta.url).href,Ic=new URL("/assets/lamps_back_blank-DaxPd_Oo.jpg",import.meta.url).href,cr=new Map([["Alchemists_back",new URL("/assets/GB-S4-Alchemists-19-02-01-VIy3CwEn.jpg",import.meta.url).href],["Alchemists_front",new URL("/assets/GB-S4-Alchemists-19-02-02-Dar2t4NY.jpg",import.meta.url).href],["Midas_back",Mn],["Midas_front",new URL("/assets/GB-S4-Alchemists-20-03-02-DlAuCMzg.jpg",import.meta.url).href],["Smoke_back",Mn],["Smoke_front",new URL("/assets/GB-S4-Alchemists-20-03-04-RC1YiQbH.jpg",import.meta.url).href],["Soma_back",Mn],["Soma_front",new URL("/assets/GB-S4-Alchemists-20-03-06-CUxY-HyS.jpg",import.meta.url).href],["Pneuma_back",Mn],["Pneuma_front",new URL("/assets/GB-S4-Alchemists-20-03-08-B418Rr1J.jpg",import.meta.url).href],["Flask_back",Mn],["Flask_front",new URL("/assets/GB-S4-Alchemists-20-03-10-DOhnGqkn.jpg",import.meta.url).href],["Naja_back",Mn],["Naja_front",new URL("/assets/GB-S4-Alchemists-20-03-12-BZlwYyu9.jpg",import.meta.url).href],["Calculus_back",Mn],["Calculus_front",new URL("/assets/GB-S4-Alchemists-20-03-14-DH-K3Y_5.jpg",import.meta.url).href],["vCalculus_back",Mn],["vCalculus_front",new URL("/assets/GB-S4-Alchemists-20-03-16-Z1UPpUIk.jpg",import.meta.url).href],["Crucible_back",Mn],["Crucible_front",new URL("/assets/GB-S4-Alchemists-20-03-18-DwfTDp0o.jpg",import.meta.url).href],["Kami_back",Mn],["Kami_front",new URL("/assets/GB-S4-Alchemists-20-03-20-BFV6XWzl.jpg",import.meta.url).href],["Katalyst_back",Mn],["Katalyst_front",new URL("/assets/GB-S4-Alchemists-20-03-22-G1PlavA6.jpg",import.meta.url).href],["vKatalyst_back",Mn],["vKatalyst_front",new URL("/assets/GB-S4-Alchemists-20-03-24-CDYCDkSX.jpg",import.meta.url).href],["Mercury_back",Mn],["Mercury_front",new URL("/assets/GB-S4-Alchemists-20-03-26-C9xO9eF2.jpg",import.meta.url).href],["Venin_back",Mn],["Venin_front",new URL("/assets/GB-S4-Alchemists-20-03-28-4ME06k6U.jpg",import.meta.url).href],["Vitriol_back",Mn],["Vitriol_front",new URL("/assets/GB-S4-Alchemists-20-03-30-DjbTACjD.jpg",import.meta.url).href],["Compound_back",new URL("/assets/GB-S4-Alchemists-20-03-31-BTog_cbt.jpg",import.meta.url).href],["Compound_front",new URL("/assets/GB-S4-Alchemists-20-03-32-Dui0dDSy.jpg",import.meta.url).href],["Blacksmiths_back",new URL("/assets/GB-S4-Blacksmiths-20-03-01-C1aHp8XU.jpg",import.meta.url).href],["Blacksmiths_front",new URL("/assets/GB-S4-Blacksmiths-20-03-02-Buw0Sd4K.jpg",import.meta.url).href],["Anvil_back",An],["Anvil_front",new URL("/assets/GB-S4-Blacksmiths-20-03-04-Iz-ZAoRD.jpg",import.meta.url).href],["Burnish_back",An],["Burnish_front",new URL("/assets/GB-S4-Blacksmiths-20-03-06-CpyRLS4Z.jpg",import.meta.url).href],["Culverin_back",An],["Culverin_front",new URL("/assets/GB-S4-Blacksmiths-20-03-08-Dom1S1qD.jpg",import.meta.url).href],["Farris_back",An],["Farris_front",new URL("/assets/GB-S4-Blacksmiths-20-03-10-BPOmIv4i.jpg",import.meta.url).href],["Ferrite_back",An],["Ferrite_front",new URL("/assets/GB-S4-Blacksmiths-20-03-12-C70-F9-G.jpg",import.meta.url).href],["Furnace_back",An],["Furnace_front",new URL("/assets/GB-S4-Blacksmiths-20-03-14-BYsCG64l.jpg",import.meta.url).href],["Hearth_back",An],["Hearth_front",new URL("/assets/GB-S4-Blacksmiths-20-03-16-BFmp7dwI.jpg",import.meta.url).href],["Alloy_back",An],["Alloy_front",new URL("/assets/GB-S4-Blacksmiths-20-03-18-lzumGd1B.jpg",import.meta.url).href],["Bolt_back",An],["Bolt_front",new URL("/assets/GB-S4-Blacksmiths-20-03-20-DH8KkvFf.jpg",import.meta.url).href],["Cast_back",An],["Cast_front",new URL("/assets/GB-S4-Blacksmiths-20-03-22-CRMXvmQD.jpg",import.meta.url).href],["Cinder_back",An],["Cinder_front",new URL("/assets/GB-S4-Blacksmiths-20-03-24-B0upn8X7.jpg",import.meta.url).href],["vCinder_back",An],["vCinder_front",new URL("/assets/GB-S4-Blacksmiths-20-03-26-BZAHT1q6.jpg",import.meta.url).href],["Cutlass_back",An],["Cutlass_front",new URL("/assets/GB-S4-Blacksmiths-20-03-28-IdVWYe8z.jpg",import.meta.url).href],["Iron_back",An],["Iron_front",new URL("/assets/GB-S4-Blacksmiths-20-03-30-zou6Flgi.jpg",import.meta.url).href],["Sledge_back",An],["Sledge_front",new URL("/assets/GB-S4-Blacksmiths-20-03-32-DJ0MEQk3.jpg",import.meta.url).href],["Brewers_back",new URL("/assets/GB-S4-Brewers-20-03-01-_bnlGcvZ.jpg",import.meta.url).href],["Brewers_front",new URL("/assets/GB-S4-Brewers-20-03-02-Af5aErRU.jpg",import.meta.url).href],["Tapper_back",Nn],["Tapper_front",new URL("/assets/GB-S4-Brewers-20-03-04-CiBahMdS.jpg",import.meta.url).href],["Esters_back",Nn],["Esters_front",new URL("/assets/GB-S4-Brewers-20-03-06-BAckyHQm.jpg",import.meta.url).href],["Corker_back",Nn],["Corker_front",new URL("/assets/GB-S4-Brewers-20-03-08-C1SVs0jC.jpg",import.meta.url).href],["Scum_back",Nn],["Scum_front",new URL("/assets/GB-S4-Brewers-20-03-10-dNR_AKj3.jpg",import.meta.url).href],["Quaff_back",Nn],["Quaff_front",new URL("/assets/GB-S4-Brewers-20-03-12-Bzzw5t7M.jpg",import.meta.url).href],["vDecimate_back",Nn],["vDecimate_front",new URL("/assets/GB-S4-Brewers-20-03-14-DUDxJnnr.jpg",import.meta.url).href],["Flea_back",Nn],["Flea_front",new URL("/assets/GB-S4-Brewers-20-03-16-hLIfeAvT.jpg",import.meta.url).href],["Friday_back",Nn],["Friday_front",new URL("/assets/GB-S4-Brewers-20-03-18-193xjOU7.jpg",import.meta.url).href],["Hooper_back",Nn],["Hooper_front",new URL("/assets/GB-S4-Brewers-20-03-20-ht0AqR_9.jpg",import.meta.url).href],["Mash_back",Nn],["Mash_front",new URL("/assets/GB-S4-Brewers-20-03-22-DB3lWhaZ.jpg",import.meta.url).href],["Pintpot_back",Nn],["Pintpot_front",new URL("/assets/GB-S4-Brewers-20-03-24-BDXctZyF.jpg",import.meta.url).href],["Spigot_back",Nn],["Spigot_front",new URL("/assets/GB-S4-Brewers-20-03-26-CJ3ohfD8.jpg",import.meta.url).href],["vSpigot_back",Nn],["vSpigot_front",new URL("/assets/GB-S4-Brewers-20-03-28-D_Y6ChH0.jpg",import.meta.url).href],["Stave_back",Nn],["Stave_front",new URL("/assets/GB-S4-Brewers-20-03-30-C7ofvQL3.jpg",import.meta.url).href],["Stoker_back",Nn],["Stoker_front",new URL("/assets/GB-S4-Brewers-20-03-32-Cps3196a.jpg",import.meta.url).href],["Lucky_back",new URL("/assets/GB-S4-Brewers-20-03-33-zps3y-hi.jpg",import.meta.url).href],["Lucky_front",new URL("/assets/GB-S4-Brewers-20-03-34-CdaFu_Sd.jpg",import.meta.url).href],["Butchers_back",new URL("/assets/GB-S4-Butchers-19-08-01-CLWIlX8T.jpg",import.meta.url).href],["Butchers_front",new URL("/assets/GB-S4-Butchers-19-08-02-CFlOzX_b.jpg",import.meta.url).href],["Ox_back",Dn],["Ox_front",new URL("/assets/GB-S4-Butchers-19-08-04-CR3Vo0aB.jpg",import.meta.url).href],["Fillet_back",Dn],["Fillet_front",new URL("/assets/GB-S4-Butchers-19-08-06-BpDXV7JC.jpg",import.meta.url).href],["vBoar_back",Dn],["vBoar_front",new URL("/assets/GB-S4-Butchers-19-08-08-BPo-9yTd.jpg",import.meta.url).href],["Princess_back",Dn],["Princess_front",new URL("/assets/GB-S4-Butchers-19-08-10-phxnKqrp.jpg",import.meta.url).href],["Truffles_back",Dn],["Truffles_front",new URL("/assets/GB-S4-Butchers-19-08-12-B2WDg1Js.jpg",import.meta.url).href],["Boar_back",Dn],["Boar_front",new URL("/assets/GB-S4-Butchers-19-08-14-DXWG8I2n.jpg",import.meta.url).href],["Boiler_back",Dn],["Boiler_front",new URL("/assets/GB-S4-Butchers-19-08-16-BjHesLe2.jpg",import.meta.url).href],["Brisket_back",Dn],["Brisket_front",new URL("/assets/GB-S4-Butchers-19-08-18-6v1o2Ifu.jpg",import.meta.url).href],["vBrisket_back",Dn],["vBrisket_front",new URL("/assets/GB-S4-Butchers-19-08-20-BKaya9dR.jpg",import.meta.url).href],["vGutter_back",Dn],["vGutter_front",new URL("/assets/GB-S4-Butchers-19-08-22-D37jjOEk.jpg",import.meta.url).href],["Layne_back",Dn],["Layne_front",new URL("/assets/GB-S4-Butchers-19-08-24-DUuL1aM2.jpg",import.meta.url).href],["Meathook_back",Dn],["Meathook_front",new URL("/assets/GB-S4-Butchers-19-08-26-DOTJBjq_.jpg",import.meta.url).href],["vOx_back",Dn],["vOx_front",new URL("/assets/GB-S4-Butchers-19-08-28-M6NS1cc0.jpg",import.meta.url).href],["Shank_back",Dn],["Shank_front",new URL("/assets/GB-S4-Butchers-19-08-30-CZTx6gLx.jpg",import.meta.url).href],["Tenderiser_back",Dn],["Tenderiser_front",new URL("/assets/GB-S4-Butchers-19-08-32-CDETLFF4.jpg",import.meta.url).href],["Cooks_back",new URL("/assets/GB-S4-Cooks-19-08-01-B_Vd1DVn.jpg",import.meta.url).href],["Cooks_front",new URL("/assets/GB-S4-Cooks-19-08-02-BCRzyOhW.jpg",import.meta.url).href],["Wellington_back",Pc],["Wellington_front",new URL("/assets/GB-S4-Cooks-19-08-04-7QP0IEzl.jpg",import.meta.url).href],["Pepper_back",Pc],["Pepper_front",new URL("/assets/GB-S4-Cooks-19-08-06-D5h9IUWD.jpg",import.meta.url).href],["Cinnamon_back",Pc],["Cinnamon_front",new URL("/assets/GB-S4-Cooks-19-08-08-B27LuxRF.jpg",import.meta.url).href],["Roast_back",Pc],["Roast_front",new URL("/assets/GB-S4-Cooks-19-08-10-BjEFjR2p.jpg",import.meta.url).href],["Spice_back",Pc],["Spice_front",new URL("/assets/GB-S4-Cooks-19-08-12-DfumUS4Q.jpg",import.meta.url).href],["Sugar_back",Pc],["Sugar_front",new URL("/assets/GB-S4-Cooks-19-08-14-2NKQVsMs.jpg",import.meta.url).href],["Engineers_back",new URL("/assets/GB-S4-Engineers-20-03-01-Di9u3X0x.jpg",import.meta.url).href],["Engineers_front",new URL("/assets/GB-S4-Engineers-20-03-02-Cy2lNFLR.jpg",import.meta.url).href],["Ballista_back",Zn],["Ballista_front",new URL("/assets/GB-S4-Engineers-20-03-04-BNwvka_y.jpg",import.meta.url).href],["PinVice_back",Zn],["PinVice_front",new URL("/assets/GB-S4-Engineers-20-03-06-rU0szJ96.jpg",import.meta.url).href],["Rivet_back",Zn],["Rivet_front",new URL("/assets/GB-S4-Engineers-20-03-08-BhZW5K7b.jpg",import.meta.url).href],["Mainspring_back",Zn],["Mainspring_front",new URL("/assets/GB-S4-Engineers-20-03-10-jYeXRRJi.jpg",import.meta.url).href],["Mother_back",Zn],["Mother_front",new URL("/assets/GB-S4-Engineers-20-03-12-5N9um0rG.jpg",import.meta.url).href],["Colossus_back",Zn],["Colossus_front",new URL("/assets/GB-S4-Engineers-20-03-14-B6x6JfxM.jpg",import.meta.url).href],["vHarriet_back",Zn],["vHarriet_front",new URL("/assets/GB-S4-Engineers-20-03-16-Cc9F_94D.jpg",import.meta.url).href],["Hoist_back",Zn],["Hoist_front",new URL("/assets/GB-S4-Engineers-20-03-18-C04RNSHr.jpg",import.meta.url).href],["Locus_back",Zn],["Locus_front",new URL("/assets/GB-S4-Engineers-20-03-20-r4vOyU-R.jpg",import.meta.url).href],["Nomad_back",Zn],["Nomad_front",new URL("/assets/GB-S4-Engineers-20-03-22-DHXCY4Wl.jpg",import.meta.url).href],["Ratchet_back",Zn],["Ratchet_front",new URL("/assets/GB-S4-Engineers-20-03-24-D6hQxrzH.jpg",import.meta.url).href],["Salvo_back",Zn],["Salvo_front",new URL("/assets/GB-S4-Engineers-20-03-26-C5iXMvZr.jpg",import.meta.url).href],["Velocity_back",Zn],["Velocity_front",new URL("/assets/GB-S4-Engineers-20-03-28-7uzZCmXc.jpg",import.meta.url).href],["vVelocity_back",Zn],["vVelocity_front",new URL("/assets/GB-S4-Engineers-20-03-30-bp8c3Uf4.jpg",import.meta.url).href],["Falconers_back",new URL("/assets/GB-S4-Falconers-20-03-01-DAO812Wl.jpg",import.meta.url).href],["Falconers_front",new URL("/assets/GB-S4-Falconers-20-03-02-C_ro4zOy.jpg",import.meta.url).href],["Devana_back",Tc],["Devana_front",new URL("/assets/GB-S4-Falconers-20-03-04-CT6BXXd-.jpg",import.meta.url).href],["Frelsi_back",Tc],["Frelsi_front",new URL("/assets/GB-S4-Falconers-20-03-06-agDql6N2.jpg",import.meta.url).href],["Ikaros_back",Tc],["Ikaros_front",new URL("/assets/GB-S4-Falconers-20-03-08-CyRw5rwh.jpg",import.meta.url).href],["Mataagi_back",Tc],["Mataagi_front",new URL("/assets/GB-S4-Falconers-20-03-10-1hF5DgY6.jpg",import.meta.url).href],["Minerva_back",Tc],["Minerva_front",new URL("/assets/GB-S4-Falconers-20-03-12-CZORpUuZ.jpg",import.meta.url).href],["Rundaas_back",Tc],["Rundaas_front",new URL("/assets/GB-S4-Falconers-20-03-14-D7WFZjKa.jpg",import.meta.url).href],["Farmers_back",new URL("/assets/GB-S4-Farmers-19-12-01-LmV2xFUn.jpg",import.meta.url).href],["Farmers_front",new URL("/assets/GB-S4-Farmers-19-12-02-COLOFnlA.jpg",import.meta.url).href],["Grange_back",Bn],["Grange_front",new URL("/assets/GB-S4-Farmers-19-12-04-D5V7RGAr.jpg",import.meta.url).href],["Thresher_back",Bn],["Thresher_front",new URL("/assets/GB-S4-Farmers-19-12-06-CvC6mrxK.jpg",import.meta.url).href],["Festival_back",Bn],["Festival_front",new URL("/assets/GB-S4-Farmers-19-12-08-Bu2e9Uzp.jpg",import.meta.url).href],["Peck_back",Bn],["Peck_front",new URL("/assets/GB-S4-Farmers-19-12-10-BVRVj083.jpg",import.meta.url).href],["Buckwheat_back",Bn],["Buckwheat_front",new URL("/assets/GB-S4-Farmers-19-12-12-17j3-pGL.jpg",import.meta.url).href],["Amber_back",Bn],["Amber_front",new URL("/assets/GB-S4-Farmers-19-12-14-D9QbUDBe.jpg",import.meta.url).href],["Bushel_back",Bn],["Bushel_front",new URL("/assets/GB-S4-Farmers-19-12-16-Bi5uXUCL.jpg",import.meta.url).href],["Fallow_back",Bn],["Fallow_front",new URL("/assets/GB-S4-Farmers-19-12-18-CYzbOhRU.jpg",import.meta.url).href],["Harrow_back",Bn],["Harrow_front",new URL("/assets/GB-S4-Farmers-19-12-20-CfkO1wFr.jpg",import.meta.url).href],["vHonour_back",Bn],["vHonour_front",new URL("/assets/GB-S4-Farmers-19-12-22-lG9W92aw.jpg",import.meta.url).href],["Jackstraw_back",Bn],["Jackstraw_front",new URL("/assets/GB-S4-Farmers-19-12-24-BWbiceSz.jpg",import.meta.url).href],["Millstone_back",Bn],["Millstone_front",new URL("/assets/GB-S4-Farmers-19-12-26-Cfuo1fZi.jpg",import.meta.url).href],["Ploughman_back",Bn],["Ploughman_front",new URL("/assets/GB-S4-Farmers-19-12-28-C3SMHxWd.jpg",import.meta.url).href],["Tater_back",Bn],["Tater_front",new URL("/assets/GB-S4-Farmers-19-12-30-C3nUj6AE.jpg",import.meta.url).href],["Windle_back",Bn],["Windle_front",new URL("/assets/GB-S4-Farmers-19-12-32-DfwzxWCr.jpg",import.meta.url).href],["Fishermen_back",new URL("/assets/GB-S4-Fishermen-19-08-01-D54clbHu.jpg",import.meta.url).href],["Fishermen_front",new URL("/assets/GB-S4-Fishermen-19-08-02-D_xvByJF.jpg",import.meta.url).href],["Shark_back",$n],["Shark_front",new URL("/assets/GB-S4-Fishermen-19-08-04-BfW77V1Z.jpg",import.meta.url).href],["Corsair_back",$n],["Corsair_front",new URL("/assets/GB-S4-Fishermen-19-08-06-BDyxN849.jpg",import.meta.url).href],["Yukai_back",$n],["Yukai_front",new URL("/assets/GB-S4-Fishermen-19-08-08-omES11k4.jpg",import.meta.url).href],["Salt_back",$n],["Salt_front",new URL("/assets/GB-S4-Fishermen-19-08-10-BEY4i-qQ.jpg",import.meta.url).href],["Tentacles_back",$n],["Tentacles_front",new URL("/assets/GB-S4-Fishermen-19-08-12-Dv7v3MeD.jpg",import.meta.url).href],["Angel_back",$n],["Angel_front",new URL("/assets/GB-S4-Fishermen-19-08-14-DuPQrXbP.jpg",import.meta.url).href],["Greyscales_back",$n],["Greyscales_front",new URL("/assets/GB-S4-Fishermen-19-08-16-DLLLRVAB.jpg",import.meta.url).href],["Hag_back",$n],["Hag_front",new URL("/assets/GB-S4-Fishermen-19-08-18-CaaIkPD9.jpg",import.meta.url).href],["Jac_back",$n],["Jac_front",new URL("/assets/GB-S4-Fishermen-19-08-20-DZM3Jz28.jpg",import.meta.url).href],["Knuckles_back",$n],["Knuckles_front",new URL("/assets/GB-S4-Fishermen-19-08-22-Dici-53D.jpg",import.meta.url).href],["Kraken_back",$n],["Kraken_front",new URL("/assets/GB-S4-Fishermen-19-08-24-DJyMosKX.jpg",import.meta.url).href],["Sakana_back",$n],["Sakana_front",new URL("/assets/GB-S4-Fishermen-19-08-26-DgZQkJwc.jpg",import.meta.url).href],["vSakana_back",$n],["vSakana_front",new URL("/assets/GB-S4-Fishermen-19-08-28-Bq-GSM8T.jpg",import.meta.url).href],["Siren_back",$n],["Siren_front",new URL("/assets/GB-S4-Fishermen-19-08-30-BsuCsQld.jpg",import.meta.url).href],["vSiren_back",$n],["vSiren_front",new URL("/assets/GB-S4-Fishermen-19-08-32-Co1is7SR.jpg",import.meta.url).href],["Hunters_back",new URL("/assets/GB-S4-Hunters-19-08-01-CmDbpORb.jpg",import.meta.url).href],["Hunters_front",new URL("/assets/GB-S4-Hunters-19-08-02-DP64V92U.jpg",import.meta.url).href],["Theron_back",Fn],["Theron_front",new URL("/assets/GB-S4-Hunters-19-08-04-43bh7Xjn.jpg",import.meta.url).href],["Skatha_back",Fn],["Skatha_front",new URL("/assets/GB-S4-Hunters-19-08-06-DvcQNJi9.jpg",import.meta.url).href],["Steeljaw_back",Fn],["Steeljaw_front",new URL("/assets/GB-S4-Hunters-19-08-08-G2iJeyB7.jpg",import.meta.url).href],["Fahad_back",Fn],["Fahad_front",new URL("/assets/GB-S4-Hunters-19-08-10-DXc2S5UR.jpg",import.meta.url).href],["Snow_back",Fn],["Snow_front",new URL("/assets/GB-S4-Hunters-19-08-12-Bi7nnTZE.jpg",import.meta.url).href],["Chaska_back",Fn],["Chaska_front",new URL("/assets/GB-S4-Hunters-19-08-14-COEjmcNE.jpg",import.meta.url).href],["Edge_back",Fn],["Edge_front",new URL("/assets/GB-S4-Hunters-19-08-16-D8BrrZ7W.jpg",import.meta.url).href],["Egret_back",Fn],["Egret_front",new URL("/assets/GB-S4-Hunters-19-08-18-m8dNYpqE.jpg",import.meta.url).href],["Hearne_back",Fn],["Hearne_front",new URL("/assets/GB-S4-Hunters-19-08-20-B0_n3uev.jpg",import.meta.url).href],["vHearne_back",Fn],["vHearne_front",new URL("/assets/GB-S4-Hunters-19-08-22-DnBgH8it.jpg",import.meta.url).href],["Jaecar_back",Fn],["Jaecar_front",new URL("/assets/GB-S4-Hunters-19-08-24-Btt4JIV9.jpg",import.meta.url).href],["vMinx_back",Fn],["vMinx_front",new URL("/assets/GB-S4-Hunters-19-08-26-ChOKS1SV.jpg",import.meta.url).href],["Seenah_back",Fn],["Seenah_front",new URL("/assets/GB-S4-Hunters-19-08-28-HxO921jJ.jpg",import.meta.url).href],["Ulfr_back",Fn],["Ulfr_front",new URL("/assets/GB-S4-Hunters-19-08-30-Dg6ELcLG.jpg",import.meta.url).href],["Zarola_back",Fn],["Zarola_front",new URL("/assets/GB-S4-Hunters-19-08-32-CjwZbZPz.jpg",import.meta.url).href],["Masons_back",new URL("/assets/GB-S4-Masons-19-03-01-CU2vGuj1.jpg",import.meta.url).href],["Masons_front",new URL("/assets/GB-S4-Masons-19-03-02-BT75CHhK.jpg",import.meta.url).href],["Honour_back",zn],["Honour_front",new URL("/assets/GB-S4-Masons-19-08-02-CDe3UOmk.jpg",import.meta.url).href],["Hammer_back",zn],["Hammer_front",new URL("/assets/GB-S4-Masons-19-08-04-KDNoOwoa.jpg",import.meta.url).href],["Corbelli_back",zn],["Corbelli_front",new URL("/assets/GB-S4-Masons-19-08-06-BPou1o3y.jpg",import.meta.url).href],["Marbles_back",zn],["Marbles_front",new URL("/assets/GB-S4-Masons-19-08-08-CxUr3wcQ.jpg",import.meta.url).href],["Wrecker_back",zn],["Wrecker_front",new URL("/assets/GB-S4-Masons-19-08-10-B-NC6pQE.jpg",import.meta.url).href],["Brick_back",zn],["Brick_front",new URL("/assets/GB-S4-Masons-19-08-12-BLKQpjuR.jpg",import.meta.url).href],["Champ_back",zn],["Champ_front",new URL("/assets/GB-S4-Masons-19-08-14-DYH-t6AE.jpg",import.meta.url).href],["Chisel_back",zn],["Chisel_front",new URL("/assets/GB-S4-Masons-19-08-16-D4IFawmu.jpg",import.meta.url).href],["vChisel_back",zn],["vChisel_front",new URL("/assets/GB-S4-Masons-19-08-18-CCBausup.jpg",import.meta.url).href],["Flint_back",zn],["Flint_front",new URL("/assets/GB-S4-Masons-19-08-20-ocIpAO8E.jpg",import.meta.url).href],["Granite_back",zn],["Granite_front",new URL("/assets/GB-S4-Masons-19-08-22-C5KnttI8.jpg",import.meta.url).href],["Harmony_back",zn],["Harmony_front",new URL("/assets/GB-S4-Masons-19-08-24-C_8aIC6i.jpg",import.meta.url).href],["vHarmony_back",zn],["vHarmony_front",new URL("/assets/GB-S4-Masons-19-08-26-DfJ6EfYF.jpg",import.meta.url).href],["Mallet_back",zn],["Mallet_front",new URL("/assets/GB-S4-Masons-19-08-28-B7QBbKlK.jpg",import.meta.url).href],["Tower_back",zn],["Tower_front",new URL("/assets/GB-S4-Masons-19-08-30-6kjit4Y9.jpg",import.meta.url).href],["Miners_back",new URL("/assets/GB-S4-Miners-20-03-01-D4YSyCEa.jpg",import.meta.url).href],["Miners_front",new URL("/assets/GB-S4-Miners-20-03-02-osGRf8x4.jpg",import.meta.url).href],["Shaft_back",Oc],["Shaft_front",new URL("/assets/GB-S4-Miners-20-03-04-BUt1D44u.jpg",import.meta.url).href],["Digger_back",Oc],["Digger_front",new URL("/assets/GB-S4-Miners-20-03-06-CWDJNfx1.jpg",import.meta.url).href],["Fissure_back",Oc],["Fissure_front",new URL("/assets/GB-S4-Miners-20-03-08-Dsrwpy5l.jpg",import.meta.url).href],["Fuse_back",Oc],["Fuse_front",new URL("/assets/GB-S4-Miners-20-03-10-BFt8Saso.jpg",import.meta.url).href],["Mule_back",Oc],["Mule_front",new URL("/assets/GB-S4-Miners-20-03-12-D1QsxSt_.jpg",import.meta.url).href],["Spade_back",Oc],["Spade_front",new URL("/assets/GB-S4-Miners-20-03-14-OmIZrrCX.jpg",import.meta.url).href],["Morticians_back",new URL("/assets/GB-S4-Morticians-19-08-01-DIFD5DK0.jpg",import.meta.url).href],["Morticians_front",new URL("/assets/GB-S4-Morticians-19-08-02-BIp1_EUg.jpg",import.meta.url).href],["Obulus_back",Sn],["Obulus_front",new URL("/assets/GB-S4-Morticians-19-08-04-CehnRTZZ.jpg",import.meta.url).href],["Scalpel_back",Sn],["Scalpel_front",new URL("/assets/GB-S4-Morticians-19-08-06-B-414ifs.jpg",import.meta.url).href],["Mourn_back",Sn],["Mourn_front",new URL("/assets/GB-S4-Morticians-19-08-08--61yL9Bw.jpg",import.meta.url).href],["Dirge_back",Sn],["Dirge_front",new URL("/assets/GB-S4-Morticians-19-08-10-t5GLRNs2.jpg",import.meta.url).href],["Vileswarm_back",Sn],["Vileswarm_front",new URL("/assets/GB-S4-Morticians-19-08-12-mWeeXBnS.jpg",import.meta.url).href],["Bonesaw_back",Sn],["Bonesaw_front",new URL("/assets/GB-S4-Morticians-19-08-14-DYB6-CC7.jpg",import.meta.url).href],["Brainpan_back",Sn],["Brainpan_front",new URL("/assets/GB-S4-Morticians-19-08-16-DWJHVhQR.jpg",import.meta.url).href],["Memory_back",Sn],["Memory_front",new URL("/assets/GB-S4-Morticians-19-08-18-CCUOST9Q.jpg",import.meta.url).href],["Casket_back",Sn],["Casket_front",new URL("/assets/GB-S4-Morticians-19-08-20-C22KtbCr.jpg",import.meta.url).href],["Cosset_back",Sn],["Cosset_front",new URL("/assets/GB-S4-Morticians-19-08-22-urTSkH8v.jpg",import.meta.url).href],["Gaffer_back",Sn],["Gaffer_front",new URL("/assets/gaffer-front-large-box-BhDGw3yv.png",import.meta.url).href],["Ghast_back",Sn],["Ghast_front",new URL("/assets/GB-S4-Morticians-19-08-26-EHTItFK_.jpg",import.meta.url).href],["Graves_back",Sn],["Graves_front",new URL("/assets/GB-S4-Morticians-19-08-28-R_qj57Ah.jpg",import.meta.url).href],["vGraves_back",Sn],["vGraves_front",new URL("/assets/GB-S4-Morticians-19-08-30-D7tgwlEH.jpg",import.meta.url).href],["vHemlocke_back",Sn],["vHemlocke_front",new URL("/assets/GB-S4-Morticians-19-08-32-rWK20dpO.jpg",import.meta.url).href],["Silence_back",Sn],["Silence_front",new URL("/assets/GB-S4-Morticians-19-08-34-Cml7KNHH.jpg",import.meta.url).href],["Navigators_back",new URL("/assets/GB-S4-Navigators-20-03-01-M7N3Qnm9.jpg",import.meta.url).href],["Navigators_front",new URL("/assets/GB-S4-Navigators-20-03-02-C0DvULy4.jpg",import.meta.url).href],["Windfinder_back",jc],["Wander_front",new URL("/assets/GB-S4-Navigators-20-03-04-C54iXdHJ.jpg",import.meta.url).href],["Windfinder_front",new URL("/assets/GB-S4-Navigators-20-03-05-DijPkVU0.jpg",import.meta.url).href],["Wander_back",jc],["Azimuth_front",new URL("/assets/GB-S4-Navigators-20-03-07-k2ifPp8C.jpg",import.meta.url).href],["Azimuth_back",jc],["Ebb_back",jc],["Ebb_front",new URL("/assets/GB-S4-Navigators-20-03-10-kxgvrwFf.jpg",import.meta.url).href],["Fathom_front",new URL("/assets/GB-S4-Navigators-20-03-11-DLBrn3lH.jpg",import.meta.url).href],["Fathom_back",jc],["Horizon_back",jc],["Horizon_front",new URL("/assets/GB-S4-Navigators-20-03-14-4LJM_QAb.jpg",import.meta.url).href],["Order_back",new URL("/assets/GB-S4-Order-19-08-01-asZnKqhR.jpg",import.meta.url).href],["Order_front",new URL("/assets/GB-S4-Order-19-08-02-DxYxwIyf.jpg",import.meta.url).href],["sBrisket_back",pa],["sBrisket_front",new URL("/assets/GB-S4-Order-19-08-04-B1NHIvQH.jpg",import.meta.url).href],["Pride_back",pa],["Pride_front",new URL("/assets/GB-S4-Order-19-08-06-BxCTP18m.jpg",import.meta.url).href],["Benediction_back",pa],["Benediction_front",new URL("/assets/GB-S4-Order-19-08-08-DWLWCNBP.jpg",import.meta.url).href],["vFangtooth_back",pa],["vFangtooth_front",new URL("/assets/GB-S4-Order-19-08-10-CdmsC0k7.jpg",import.meta.url).href],["Grace_back",pa],["Grace_front",new URL("/assets/GB-S4-Order-19-08-12-CUnlpuDI.jpg",import.meta.url).href],["Harry_back",pa],["Harry_front",new URL("/assets/GB-S4-Order-19-08-14-N2zvQdYm.jpg",import.meta.url).href],["Mist_back",pa],["Mist_front",new URL("/assets/GB-S4-Order-19-08-16-BxGIGoGz.jpg",import.meta.url).href],["sSpigot_back",pa],["sSpigot_front",new URL("/assets/GB-S4-Order-19-08-18-gkj8skFt.jpg",import.meta.url).href],["Ratcatchers_back",new URL("/assets/GB-S4-Ratcatchers-19-08-01-CbXHBUJx.jpg",import.meta.url).href],["Ratcatchers_front",new URL("/assets/GB-S4-Ratcatchers-19-08-02-XbBjNmUR.jpg",import.meta.url).href],["Piper_back",Lc],["Piper_front",new URL("/assets/GB-S4-Ratcatchers-19-08-04-BnvzzXPE.jpg",import.meta.url).href],["Squeak_back",Lc],["Squeak_front",new URL("/assets/GB-S4-Ratcatchers-19-08-06-DlqN1o8i.jpg",import.meta.url).href],["Miasma_back",Lc],["Miasma_front",new URL("/assets/GB-S4-Ratcatchers-19-08-08-BwciubOW.jpg",import.meta.url).href],["Pelage_back",Lc],["Pelage_front",new URL("/assets/GB-S4-Ratcatchers-19-08-10-DtQCr3kF.jpg",import.meta.url).href],["Scourge_back",Lc],["Scourge_front",new URL("/assets/GB-S4-Ratcatchers-19-08-12-JUs2Xlho.jpg",import.meta.url).href],["Skulk_back",Lc],["Skulk_front",new URL("/assets/GB-S4-Ratcatchers-19-08-14-D1JyRK5e.jpg",import.meta.url).href],["Shepherds_back",new URL("/assets/GB-S4-Shepherds-20-03-01-BszDyn7n.jpg",import.meta.url).href],["Shepherds_front",new URL("/assets/GB-S4-Shepherds-20-03-02-XqwLekip.jpg",import.meta.url).href],["Herder_back",pl],["Herder_front",new URL("/assets/GB-S4-Shepherds-20-03-04-CpJUbIK5.jpg",import.meta.url).href],["Babe_back",pl],["Babe_front",new URL("/assets/GB-S4-Shepherds-20-03-06-TZPJ1JER.jpg",import.meta.url).href],["Crook_back",pl],["Crook_front",new URL("/assets/GB-S4-Shepherds-20-03-08-fPdEFqsg.jpg",import.meta.url).href],["Hook_back",pl],["Hook_front",new URL("/assets/GB-S4-Shepherds-20-03-10-D8vNNVMa.jpg",import.meta.url).href],["Lamb_back",pl],["Lamb_front",new URL("/assets/GB-S4-Shepherds-20-03-12-Cs6eNdgu.jpg",import.meta.url).href],["Ram_back",pl],["Ram_front",new URL("/assets/GB-S4-Shepherds-20-03-14-EROLPl1k.jpg",import.meta.url).href],["Shearer_back",pl],["Shearer_front",new URL("/assets/GB-S4-Shepherds-20-03-16-CH7z3m46.jpg",import.meta.url).href],["Union_back",new URL("/assets/GB-S4-Union-20-03-01-BYUf_cPI.jpg",import.meta.url).href],["Union_front",new URL("/assets/GB-S4-Union-20-03-02-CAfWuq1n.jpg",import.meta.url).href],["Blackheart_back",ei],["Blackheart_front",new URL("/assets/GB-S4-Union-20-03-04-DESKIKlc.jpg",import.meta.url).href],["vRage_back",ei],["vRage_front",new URL("/assets/GB-S4-Union-20-03-06-TH_Fhhnv.jpg",import.meta.url).href],["vGreede_back",ei],["vGreede_front",new URL("/assets/GB-S4-Union-20-03-08-C9acG5Gy.jpg",import.meta.url).href],["Coin_back",ei],["Coin_front",new URL("/assets/GB-S4-Union-20-03-10-BRZlJPNW.jpg",import.meta.url).href],["Strongbox_back",ei],["Strongbox_front",new URL("/assets/GB-S4-Union-20-03-12--TefmgjH.jpg",import.meta.url).href],["Avarisse_back",ei],["Avarisse_front",new URL("/assets/GB-S4-Union-20-03-14-DoT0cBAC.jpg",import.meta.url).href],["Greede_back",ei],["Greede_front",new URL("/assets/GB-S4-Union-20-03-16-DrDLPTZJ.jpg",import.meta.url).href],["Decimate_back",ei],["Decimate_front",new URL("/assets/GB-S4-Union-20-03-18-bedyXvhB.jpg",import.meta.url).href],["Fangtooth_back",ei],["Fangtooth_front",new URL("/assets/GB-S4-Union-20-03-20-CDcWfDBp.jpg",import.meta.url).href],["Gutter_back",ei],["Gutter_front",new URL("/assets/GB-S4-Union-20-03-22-DFVnunFx.jpg",import.meta.url).href],["Hemlocke_back",ei],["Hemlocke_front",new URL("/assets/GB-S4-Union-20-03-24-DTxA3SGq.jpg",import.meta.url).href],["Minx_back",ei],["Minx_front",new URL("/assets/GB-S4-Union-20-03-26-Bo3pJ595.jpg",import.meta.url).href],["Rage_back",ei],["Rage_front",new URL("/assets/GB-S4-Union-20-03-28-Cix4cgvH.jpg",import.meta.url).href],["Snakeskin_back",ei],["Snakeskin_front",new URL("/assets/GB-S4-Union-20-03-30-DOPQxsMF.jpg",import.meta.url).href],["Lamplighters_front",new URL("/assets/lamp-beta-63HlWaeb.png",import.meta.url).href],["Lamplighters_back",new URL("/assets/lamp-beta-63HlWaeb.png",import.meta.url).href],["Nightlight_gbcp_front",new URL("/assets/nightlight-00-DeG30Qno.jpg",import.meta.url).href],["Nightlight_gbcp_back",new URL("/assets/nightlight-01-B5GmfHdF.jpg",import.meta.url).href],["Soot_gbcp_front",new URL("/assets/soot-00-CjgkmHEF.jpg",import.meta.url).href],["Soot_gbcp_back",new URL("/assets/soot-01-DLvloUPB.jpg",import.meta.url).href],["Beacon_gbcp_front",new URL("/assets/beacon-00-L9zfj4Q8.jpg",import.meta.url).href],["Beacon_gbcp_back",new URL("/assets/beacon-01-vYao7kaT.jpg",import.meta.url).href],["Heat_gbcp_front",new URL("/assets/heat-00-D38QQgsn.jpg",import.meta.url).href],["Heat_gbcp_back",new URL("/assets/heat-01-TaWfEq1e.jpg",import.meta.url).href],["Phosphor_gbcp_front",new URL("/assets/phosphor-00-kYBsDzr4.jpg",import.meta.url).href],["Phosphor_gbcp_back",new URL("/assets/phosphor-01-aCMgs7Xa.jpg",import.meta.url).href],["Wick_gbcp_front",new URL("/assets/wick-00-CEZ6BY1J.jpg",import.meta.url).href],["Wick_gbcp_back",new URL("/assets/wick-01-DtuDStax.jpg",import.meta.url).href],["sBrisket_gbcp_front",new URL("/assets/brisket3-00-TRUFkM-Q.jpg",import.meta.url).href],["sBrisket_gbcp_back",new URL("/assets/brisket3-01-C19fZQ9I.jpg",import.meta.url).href],["Cast_gbcp_front",new URL("/assets/cast-00-CDhbzPRV.jpg",import.meta.url).href],["Cast_gbcp_back",new URL("/assets/cast-01-DOJiR9Ch.jpg",import.meta.url).href],["Crook_gbcp_front",new URL("/assets/crook-00-C4D_gdaM.jpg",import.meta.url).href],["Crook_gbcp_back",new URL("/assets/crook-01-D9bCOT5R.jpg",import.meta.url).href],["Egret_gbcp_front",new URL("/assets/egret-00-BKhmAAwA.jpg",import.meta.url).href],["Egret_gbcp_back",new URL("/assets/egret-01-DCSfZLX7.jpg",import.meta.url).href],["Hook_gbcp_front",new URL("/assets/hook-00-BCtxORP2.jpg",import.meta.url).href],["Hook_gbcp_back",new URL("/assets/hook-01-CFEXTspD.jpg",import.meta.url).href],["Ikaros_gbcp_front",new URL("/assets/ikaros-00-BlK23AQW.jpg",import.meta.url).href],["Ikaros_gbcp_back",new URL("/assets/ikaros-01-CaTWYr3E.jpg",import.meta.url).href],["Lucky_gbcp_front",new URL("/assets/lucky-00--3wf1Q-o.jpg",import.meta.url).href],["Lucky_gbcp_back",new URL("/assets/lucky-01-CeFOEkb7.jpg",import.meta.url).href],["Miasma_gbcp_front",new URL("/assets/miasma-00-gJuVKj0r.jpg",import.meta.url).href],["Miasma_gbcp_back",new URL("/assets/miasma-01-BFpZKg3H.jpg",import.meta.url).href],["Minx_gbcp_front",new URL("/assets/minx-00-DKid1QgM.jpg",import.meta.url).href],["Minx_gbcp_back",new URL("/assets/minx-01-h4AvAe2P.jpg",import.meta.url).href],["Steeljaw_gbcp_front",new URL("/assets/steeljaw-00-DBylP57a.jpg",import.meta.url).href],["Steeljaw_gbcp_back",new URL("/assets/steeljaw-01-DHvdkD3u.jpg",import.meta.url).href],["Tenderiser_gbcp_front",new URL("/assets/tenderiser-00-DJeWjZaC.jpg",import.meta.url).href],["Tenderiser_gbcp_back",new URL("/assets/tenderiser-01-Dn53BCqM.jpg",import.meta.url).href],["Angel_gbcp_front",new URL("/assets/Angel-00-_OcCE1xs.jpg",import.meta.url).href],["Angel_gbcp_back",new URL("/assets/Angel-01-RsyL_b7r.jpg",import.meta.url).href],["Blackheart_gbcp_front",new URL("/assets/Blackheart-00-Barboaw1.jpg",import.meta.url).href],["Blackheart_gbcp_back",new URL("/assets/Blackheart-01-DqXGaAGL.jpg",import.meta.url).href],["Brisket_gbcp_front",new URL("/assets/Brisket-00-fpn5lXhR.jpg",import.meta.url).href],["Brisket_gbcp_back",new URL("/assets/Brisket-01-Cz0yKYaC.jpg",import.meta.url).href],["Flea_gbcp_front",new URL("/assets/Flea-00-PYY29ZDm.jpg",import.meta.url).href],["Flea_gbcp_back",new URL("/assets/Flea-01-B-ceu-Fs.jpg",import.meta.url).href],["Gaffer_gbcp_front",new URL("/assets/Gaffer-00-Chm4XJB6.jpg",import.meta.url).href],["Gaffer_gbcp_back",new URL("/assets/Gaffer-01-DChRbbv3.jpg",import.meta.url).href],["Locus_gbcp_front",new URL("/assets/Locus-00-BlUYiKL3.jpg",import.meta.url).href],["Locus_gbcp_back",new URL("/assets/Locus-01-CgJeSABI.jpg",import.meta.url).href],["Salt_gbcp_front",new URL("/assets/Salt-00-DTipa4Vq.jpg",import.meta.url).href],["Salt_gbcp_back",new URL("/assets/Salt-01-DgX-3wqX.jpg",import.meta.url).href],["Truffles_gbcp_front",new URL("/assets/Truffles-00-BxTIIeQ4.jpg",import.meta.url).href],["Truffles_gbcp_back",new URL("/assets/Truffles-01-1xGyMIOv.jpg",import.meta.url).href],["Ulfr_gbcp_front",new URL("/assets/Ulfr-00-BXhlGxmA.jpg",import.meta.url).href],["Ulfr_gbcp_back",new URL("/assets/Ulfr-01-JQfocVce.jpg",import.meta.url).href],["vGutter_gbcp_front",new URL("/assets/vGutter-00-CpnNh9P4.jpg",import.meta.url).href],["vGutter_gbcp_back",new URL("/assets/vGutter-01-BWHR1234.jpg",import.meta.url).href],["Beacon_front",new URL("/assets/beacon-WzU-Fgwo.jpg",import.meta.url).href],["Beacon_back",Ic],["Heat_front",new URL("/assets/heat-kg0Ne0rh.jpg",import.meta.url).href],["Heat_back",Ic],["Nightlight_front",new URL("/assets/nightlight-BICbD_Qy.jpg",import.meta.url).href],["Nightlight_back",Ic],["Phosphor_front",new URL("/assets/phosphor-CifRCYrC.jpg",import.meta.url).href],["Phosphor_back",Ic],["Soot_front",new URL("/assets/soot-CXEcs2BT.jpg",import.meta.url).href],["Soot_back",Ic],["Wick_front",new URL("/assets/wick-D10XZuyz.jpg",import.meta.url).href],["Wick_back",Ic]]);var NJ=function(e){return e instanceof RegExp},DJ=function(t){var r=/[\\^$.*+?()[\]{}|]/g,n=RegExp(r.source);return t&&n.test(t)?t.replace(r,"\\$&"):t},CI=function(e){return typeof e=="string"},BJ=function(e){var t=[];return e.forEach(function(r){Array.isArray(r)?t=t.concat(r):t.push(r)}),t};function $J(e,t,r){var n=0,i=0;if(e==="")return e;if(!e||!CI(e))throw new TypeError("First argument to react-string-replace#replaceString must be a string");var o=t;NJ(o)||(o=new RegExp("("+DJ(o)+")","gi"));for(var s=e.split(o),a=1,l=s.length;a{let t=Th(e,/\(◉(.*?)\)/g,(r,n)=>y.jsxs(Lt.Fragment,{children:["(◉",y.jsx("span",{style:{fontStyle:"italic"},children:r}),")"]},`i-a-${n}`));return t=Th(t,/\(([^◉].*?)\)/g,(r,n)=>y.jsxs(Lt.Fragment,{children:["(",y.jsx("span",{style:{fontStyle:"italic"},children:r}),")"]},`i-${n}`)),t=Th(t,/{([<>TKDGB]+)}/,(r,n)=>y.jsx(Lt.Fragment,{children:y.jsx("span",{style:{display:"inline-flex",width:"21px",height:"1ex",position:"relative",overflow:"visible"},children:y.jsx("div",{style:{display:"flex",overflow:"visible",width:"21px",height:"21px",backgroundColor:"white",border:"var(--line-width) solid black",borderRadius:"21px",position:"absolute",alignSelf:"center",justifySelf:"center",alignItems:"center",justifyContent:"center"},children:y.jsx(rI,{icon:r.replace(/GB/g,"CP")})})})},`pb-${n}`)),t=Th(t,/\b([A-Z]+)\b/g,(r,n)=>y.jsx("span",{style:{letterSpacing:"-1px"},children:r},`tla-${n}`)),y.jsx(y.Fragment,{children:t})},zJ=e=>{const t=e.model,r=t.id,{setting$:n}=di(),[i,o]=_.useState(),[s,a]=_.useState();_.useEffect(()=>{const f=n==null?void 0:n.subscribe(p=>{o(p==null?void 0:p.toJSON().data.cardPreferences.preferredStyle),a(p==null?void 0:p.toJSON().data.language)});return()=>f==null?void 0:f.unsubscribe()});const[l,c]=fo(f=>Promise.all([f.guilds.findOne().where({name:t.guild1}).exec(),f.guilds.findOne().where({name:t.guild2}).exec()]),[t.guild1,t.guild2])??[];if(!l)return null;const u=i==="gbcp"&&(cr.has(`${r}_gbcp_front`)||cr.has(`${r}_full`)),d=u?cr.get(`${r}_full`)??cr.get(`${r}_gbcp_front`)??cr.get(`${r}_front`):cr.get(`${r}_front`)??cr.get(`${r}_full`)??cr.get(`${r}_gbcp_front`);return y.jsx("div",{className:`card-front ${r} lang-${s} ${u&&"gbcp"} ${e.className}`,style:{"--team-color":l.color,"--gbcp-color":op(l.shadow??l.color).mix(op.rgb(254,246,227),.9).string(),"--guild1-color":l.color,"--guild2-color":c?c.color:void 0,"--mom-color":l.shadow,"--mom-border-color":l.darkColor,backgroundImage:e.noBackground?void 0:`url(${d})`,...e.style},children:y.jsxs("div",{className:`overlay ${u?"gbcp":""}`,children:[y.jsxs("div",{className:"font-top-box",children:[y.jsx(UJ,{model:t,guild:l}),y.jsx(HJ,{model:t})]}),y.jsx(WJ,{model:t,gbcp:u}),y.jsx("div",{className:"character-plays-wrapper",children:y.jsx(KJ,{model:t,gbcp:u})}),y.jsx(GJ,{model:t,health$:e.health$})]})})},UJ=({model:e,guild:t})=>y.jsxs("div",{className:"name-plate",children:[y.jsx("div",{className:"guild-icon",children:y.jsx(Ai,{id:"guild-icon",icon:t.name})}),y.jsxs("div",{className:"name-plate-right",children:[y.jsx("div",{className:"name",children:y.jsx("div",{className:"dropcap",children:e.name.split(/(?=[A-Z])/).map((r,n)=>y.jsx("span",{children:r},n))})}),y.jsxs("div",{className:"reach",children:["Melee Zone ",e.reach?2:1,'"']})]})]}),GJ=({model:e,health$:t})=>{const[r,n]=_.useState(e.hp);return _.useEffect(()=>{const i=t==null?void 0:t.subscribe(o=>n(o));return()=>i==null?void 0:i.unsubscribe()},[t]),y.jsx("div",{className:"health",children:[...Array(e.hp).keys()].map(i=>y.jsx("div",{className:`health-box ${i+1>r?"damaged":""}`,children:i===0&&y.jsx(Ai,{icon:"skull",size:17})||i+1===e.recovery&&y.jsx(Ai,{icon:"bandage",size:22})||i+1===e.hp&&i+1},i))})},WJ=({model:e,gbcp:t=!1})=>{var r;return y.jsx("div",{className:"playbook",children:(r=e.playbook)==null?void 0:r.map((n,i)=>n==null?void 0:n.flatMap((o,s)=>{const[a,l]=o?o.split(";"):[null,null];return y.jsx("div",{className:`playbook-result ${a?"":"spacer"} ${l?"momentus":""}`,style:{"--col":s,display:"flex",flexDirection:t?"row":"column",padding:"0.10em",gap:t?0:"0.05em"},children:a?a.split(",").map((c,u)=>(c=t?c.replace(/^CP$/,"CP-gbcp").replace(/^CP2$/,"CP2-gbcp"):c,y.jsx(rI,{icon:c},u))):null},i*7+s)}))})},HJ=({model:e})=>y.jsxs("div",{className:"statbox",children:[y.jsx("span",{children:"MOV"}),y.jsx("span",{children:"TAC"}),y.jsx("span",{children:"KICK"}),y.jsx("span",{children:"DEF"}),y.jsx("span",{children:"ARM"}),y.jsx("span",{children:"INF"}),y.jsx("span",{children:`${e.jog}"/${e.sprint}"`}),y.jsx("span",{children:e.tac}),y.jsx("span",{children:`${e.kickdice}/${e.kickdist}"`}),y.jsx("span",{children:`${e.def}+`}),y.jsx("span",{children:e.arm}),y.jsx("span",{children:`${e.inf}/${e.infmax}`})]}),ER=({test:e})=>y.jsx(Ai,{icon:e?"checkmark":"ballotX",size:14});function VJ({text:e}){const t=e.split("[",1)[0],r=e.replace(/[^[]*(\[.*\])?/," $1");return y.jsxs("div",{className:"name",children:[y.jsx("span",{children:t}),y.jsx("span",{children:r})]})}const KJ=({model:e,gbcp:t=!1})=>y.jsxs("div",{className:"character-plays",children:[y.jsxs("span",{className:"dropcap",children:[y.jsx("span",{children:"Character "}),y.jsx("span",{children:"Plays"})]}),y.jsx("span",{children:"CST"}),y.jsx("span",{children:"RNG"}),y.jsx("span",{children:"SUS"}),y.jsx("span",{children:"OPT"}),e.character_plays.map(r=>y.jsxs(Lt.Fragment,{children:[y.jsx(VJ,{text:r.name}),y.jsx("span",{children:String(r.CST).split(",").map((n,i)=>y.jsxs("span",{children:[i>0&&"/",{CP:y.jsx(Ai,{icon:t?"ball":"GB",size:18}),CP2:y.jsx(Ai,{icon:t?"trophy":"GBT",size:18})}[n]||y.jsx("span",{children:n})]},i))}),y.jsxs("span",{children:[r.RNG,typeof r.RNG=="number"&&'"']}),y.jsx("span",{children:y.jsx(ER,{test:r.SUS})}),y.jsx("span",{children:y.jsx(ER,{test:r.OPT})}),y.jsx("div",{className:"text",children:ty(r.text)})]},r.name))]}),yg=Lt.memo(zJ),qJ=e=>{const t=e.model,r=t.id,{setting$:n}=di(),[i,o]=_.useState();_.useEffect(()=>{const c=n==null?void 0:n.pipe(qt(u=>u==null?void 0:u.toJSON().data.cardPreferences.preferredStyle)).subscribe(u=>o(u));return()=>c==null?void 0:c.unsubscribe()});const s=fo(c=>c.guilds.findOne().where({name:t.guild1}).exec(),[t.guild1]);if(!s)return null;const a=i==="gbcp"&&(cr.has(`${r}_gbcp_front`)||cr.has(`${r}_full`)),l=a?cr.get(`${r}_full`)??cr.get(`${r}_gbcp_back`)??cr.get(`${r}_back`):cr.get(`${r}_back`)??cr.get(`${r}_full`)??cr.get(`${r}_gbcp_back`);return y.jsx("div",{className:`card-back ${r} ${a&&"gbcp"} ${e.className}`,style:{"--team-color":s.color,"--gbcp-color":op(s.shadow??s.color).mix(op.rgb(254,246,227),.9),"--mom-color":s.shadow,"--mom-border-color":s.darkColor,backgroundImage:e.noBackground?void 0:`url(${l})`,...e.style},children:y.jsxs("div",{className:`overlay ${a?"gbcp":""}`,children:[y.jsxs("div",{className:"container",children:[y.jsxs("div",{className:"name-plate",children:[y.jsx("div",{className:"guild-icon",children:y.jsx(Ai,{id:"guild-icon",icon:s.name})}),y.jsx("div",{className:"name dropcap",children:t.name.split(/(?=[A-Z])/).map((c,u)=>y.jsx("span",{children:c},u))})]}),y.jsx(YJ,{model:t}),y.jsx(QJ,{model:t}),y.jsx(XJ,{model:t})]}),y.jsxs("div",{className:"footer",children:[y.jsx("div",{className:"tags",children:t.types}),y.jsxs("div",{className:"right",children:[y.jsxs("div",{className:"icons",children:[y.jsx(G0,{icon:a?"gbcp":"GB"}),y.jsx("div",{className:"icon wrapper",children:y.jsx("div",{style:{width:"100%",height:"100%",border:"2px solid black",borderRadius:"50%",display:"flex",placeContent:"center",alignItems:"center",fontFamily:"Crimson Text",fontSize:"26px",fontWeight:"800"},children:t.version})}),t.guild2&&y.jsx(G0,{icon:t.guild2}),y.jsx(G0,{icon:t.guild1})]}),y.jsx("div",{className:"base-size",children:`Size ${t.base} mm`})]})]})]})})},G0=({icon:e})=>y.jsx("div",{className:"icon wrapper",children:y.jsx(Ai,{icon:e})});function TS({text:e}){const t=e.split("[",1)[0],r=e.replace(/[^[]*(\[.*\])?/," $1");return y.jsxs("div",{children:[y.jsx("span",{children:t}),y.jsx("span",{children:r})]})}const YJ=({model:e})=>y.jsxs(y.Fragment,{children:[y.jsxs("div",{className:"header dropcap",children:[y.jsx("span",{children:"Character "}),y.jsx("span",{children:"Traits"})]}),e.character_traits.map((t,r)=>y.jsxs(Lt.Fragment,{children:[y.jsxs("div",{className:"character-trait",children:[y.jsx("div",{className:`trait ${t.active&&"active"}`,children:y.jsx(TS,{text:t.name.concat(t.parameter?` [${t.parameter}]`:"")})}),y.jsx("span",{className:"text",children:ty(t.text)})]},`${t.name}-${r}`),y.jsx("div",{style:{flexGrow:1,maxHeight:"1em"}})]},`ct-${r}`))]}),QJ=({model:e})=>{if(!e.heroic)return null;const t=e.heroic.split(` `,1)[0],r=e.heroic.split(` `).slice(1).join(` `);return y.jsxs(y.Fragment,{children:[y.jsxs("div",{className:"header dropcap",children:[y.jsx("span",{children:"Heroic "}),y.jsx("span",{children:"Play"})]}),y.jsxs("div",{className:"heroic",children:[y.jsx(TS,{text:t}),y.jsx("span",{children:ty(r)})]}),y.jsx("div",{style:{flexGrow:1,maxHeight:"1em"}})]})},XJ=({model:e})=>{if(!e.legendary)return null;const t=e.legendary.split(` `,1)[0],r=e.legendary.split(` `).slice(1).join(` -`);return y.jsxs(y.Fragment,{children:[y.jsxs("div",{className:"header dropcap",children:[y.jsx("span",{children:"Legendary "}),y.jsx("span",{children:"Play"})]}),y.jsxs("div",{className:"legendary",children:[y.jsx(TS,{text:t}),y.jsx("span",{children:ty(r)})]}),y.jsx("div",{style:{flexGrow:1,maxHeight:"1em"}})]})},bg=Lt.memo(qJ);function _I({children:e,model:t,health$:r}){const n=_.useRef(null),i=_.useRef(null),[o,s]=_.useState(1);_.useLayoutEffect(()=>(a(),window.addEventListener("resize",a),()=>window.removeEventListener("resize",a)));const a=_.useCallback(()=>{if(!n.current)return;const{width:l,height:c}=n.current.getBoundingClientRect(),u=l/500,d=c/700,f=Math.min(u,d,1);s(f??1)},[]);return y.jsx("div",{ref:n,style:{width:"100%",maxWidth:"500px",height:"100%",maxHeight:"700px",display:"flex",alignItems:"center",justifyContent:"center"},children:y.jsx("div",{ref:i,className:"flip-card",onClick:()=>{var l;(l=i.current)==null||l.classList.toggle("flipped")},children:y.jsxs("div",{className:"flip-card-inner",children:[y.jsxs("div",{className:"flip-card-front",children:[y.jsx(yg,{model:t,health$:r,style:{"--scale":o}}),e]}),y.jsx("div",{className:"flip-card-back",children:y.jsx(bg,{model:t,style:{"--scale":o}})})]})})})}function RR(e){return e!==null&&typeof e=="object"&&"constructor"in e&&e.constructor===Object}function OS(e,t){e===void 0&&(e={}),t===void 0&&(t={}),Object.keys(t).forEach(r=>{typeof e[r]>"u"?e[r]=t[r]:RR(t[r])&&RR(e[r])&&Object.keys(t[r]).length>0&&OS(e[r],t[r])})}const kI={body:{},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector(){return null},querySelectorAll(){return[]},getElementById(){return null},createEvent(){return{initEvent(){}}},createElement(){return{children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName(){return[]}}},createElementNS(){return{}},importNode(){return null},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""}};function ed(){const e=typeof document<"u"?document:{};return OS(e,kI),e}const JJ={document:kI,navigator:{userAgent:""},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""},history:{replaceState(){},pushState(){},go(){},back(){}},CustomEvent:function(){return this},addEventListener(){},removeEventListener(){},getComputedStyle(){return{getPropertyValue(){return""}}},Image(){},Date(){},screen:{},setTimeout(){},clearTimeout(){},matchMedia(){return{}},requestAnimationFrame(e){return typeof setTimeout>"u"?(e(),null):setTimeout(e,0)},cancelAnimationFrame(e){typeof setTimeout>"u"||clearTimeout(e)}};function zi(){const e=typeof window<"u"?window:{};return OS(e,JJ),e}function ZJ(e){return e===void 0&&(e=""),e.trim().split(" ").filter(t=>!!t.trim())}function eZ(e){const t=e;Object.keys(t).forEach(r=>{try{t[r]=null}catch{}try{delete t[r]}catch{}})}function q1(e,t){return t===void 0&&(t=0),setTimeout(e,t)}function wg(){return Date.now()}function tZ(e){const t=zi();let r;return t.getComputedStyle&&(r=t.getComputedStyle(e,null)),!r&&e.currentStyle&&(r=e.currentStyle),r||(r=e.style),r}function rZ(e,t){t===void 0&&(t="x");const r=zi();let n,i,o;const s=tZ(e);return r.WebKitCSSMatrix?(i=s.transform||s.webkitTransform,i.split(",").length>6&&(i=i.split(", ").map(a=>a.replace(",",".")).join(", ")),o=new r.WebKitCSSMatrix(i==="none"?"":i)):(o=s.MozTransform||s.OTransform||s.MsTransform||s.msTransform||s.transform||s.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,"),n=o.toString().split(",")),t==="x"&&(r.WebKitCSSMatrix?i=o.m41:n.length===16?i=parseFloat(n[12]):i=parseFloat(n[4])),t==="y"&&(r.WebKitCSSMatrix?i=o.m42:n.length===16?i=parseFloat(n[13]):i=parseFloat(n[5])),i||0}function Oh(e){return typeof e=="object"&&e!==null&&e.constructor&&Object.prototype.toString.call(e).slice(8,-1)==="Object"}function nZ(e){return typeof window<"u"&&typeof window.HTMLElement<"u"?e instanceof HTMLElement:e&&(e.nodeType===1||e.nodeType===11)}function Si(){const e=Object(arguments.length<=0?void 0:arguments[0]),t=["__proto__","constructor","prototype"];for(let r=1;rt.indexOf(o)<0);for(let o=0,s=i.length;oo?"next":"prev",u=(f,p)=>c==="next"&&f>=p||c==="prev"&&f<=p,d=()=>{a=new Date().getTime(),s===null&&(s=a);const f=Math.max(Math.min((a-s)/l,1),0),p=.5-Math.cos(f*Math.PI)/2;let h=o+p*(r-o);if(u(h,r)&&(h=r),t.wrapperEl.scrollTo({[n]:h}),u(h,r)){t.wrapperEl.style.overflow="hidden",t.wrapperEl.style.scrollSnapType="",setTimeout(()=>{t.wrapperEl.style.overflow="",t.wrapperEl.scrollTo({[n]:h})}),i.cancelAnimationFrame(t.cssModeFrameID);return}t.cssModeFrameID=i.requestAnimationFrame(d)};d()}function Os(e,t){t===void 0&&(t="");const r=[...e.children];return e instanceof HTMLSlotElement&&r.push(...e.assignedElements()),t?r.filter(n=>n.matches(t)):r}function iZ(e,t){const r=t.contains(e);return!r&&t instanceof HTMLSlotElement?[...t.assignedElements()].includes(e):r}function xg(e){try{console.warn(e);return}catch{}}function Y1(e,t){t===void 0&&(t=[]);const r=document.createElement(e);return r.classList.add(...Array.isArray(t)?t:ZJ(t)),r}function oZ(e,t){const r=[];for(;e.previousElementSibling;){const n=e.previousElementSibling;t?n.matches(t)&&r.push(n):r.push(n),e=n}return r}function sZ(e,t){const r=[];for(;e.nextElementSibling;){const n=e.nextElementSibling;t?n.matches(t)&&r.push(n):r.push(n),e=n}return r}function _a(e,t){return zi().getComputedStyle(e,null).getPropertyValue(t)}function PR(e){let t=e,r;if(t){for(r=0;(t=t.previousSibling)!==null;)t.nodeType===1&&(r+=1);return r}}function aZ(e,t){const r=[];let n=e.parentElement;for(;n;)r.push(n),n=n.parentElement;return r}function TR(e,t,r){const n=zi();return e[t==="width"?"offsetWidth":"offsetHeight"]+parseFloat(n.getComputedStyle(e,null).getPropertyValue(t==="width"?"margin-right":"margin-top"))+parseFloat(n.getComputedStyle(e,null).getPropertyValue(t==="width"?"margin-left":"margin-bottom"))}let W0;function lZ(){const e=zi(),t=ed();return{smoothScroll:t.documentElement&&t.documentElement.style&&"scrollBehavior"in t.documentElement.style,touch:!!("ontouchstart"in e||e.DocumentTouch&&t instanceof e.DocumentTouch)}}function RI(){return W0||(W0=lZ()),W0}let H0;function cZ(e){let{userAgent:t}=e===void 0?{}:e;const r=RI(),n=zi(),i=n.navigator.platform,o=t||n.navigator.userAgent,s={ios:!1,android:!1},a=n.screen.width,l=n.screen.height,c=o.match(/(Android);?[\s\/]+([\d.]+)?/);let u=o.match(/(iPad).*OS\s([\d_]+)/);const d=o.match(/(iPod)(.*OS\s([\d_]+))?/),f=!u&&o.match(/(iPhone\sOS|iOS)\s([\d_]+)/),p=i==="Win32";let h=i==="MacIntel";const v=["1024x1366","1366x1024","834x1194","1194x834","834x1112","1112x834","768x1024","1024x768","820x1180","1180x820","810x1080","1080x810"];return!u&&h&&r.touch&&v.indexOf(`${a}x${l}`)>=0&&(u=o.match(/(Version)\/([\d.]+)/),u||(u=[0,1,"13_0_0"]),h=!1),c&&!p&&(s.os="android",s.android=!0),(u||f||d)&&(s.os="ios",s.ios=!0),s}function PI(e){return e===void 0&&(e={}),H0||(H0=cZ(e)),H0}let V0;function uZ(){const e=zi(),t=PI();let r=!1;function n(){const a=e.navigator.userAgent.toLowerCase();return a.indexOf("safari")>=0&&a.indexOf("chrome")<0&&a.indexOf("android")<0}if(n()){const a=String(e.navigator.userAgent);if(a.includes("Version/")){const[l,c]=a.split("Version/")[1].split(" ")[0].split(".").map(u=>Number(u));r=l<16||l===16&&c<2}}const i=/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(e.navigator.userAgent),o=n(),s=o||i&&t.ios;return{isSafari:r||o,needPerspectiveFix:r,need3dFix:s,isWebView:i}}function dZ(){return V0||(V0=uZ()),V0}function fZ(e){let{swiper:t,on:r,emit:n}=e;const i=zi();let o=null,s=null;const a=()=>{!t||t.destroyed||!t.initialized||(n("beforeResize"),n("resize"))},l=()=>{!t||t.destroyed||!t.initialized||(o=new ResizeObserver(d=>{s=i.requestAnimationFrame(()=>{const{width:f,height:p}=t;let h=f,v=p;d.forEach(k=>{let{contentBoxSize:b,contentRect:x,target:g}=k;g&&g!==t.el||(h=x?x.width:(b[0]||b).inlineSize,v=x?x.height:(b[0]||b).blockSize)}),(h!==f||v!==p)&&a()})}),o.observe(t.el))},c=()=>{s&&i.cancelAnimationFrame(s),o&&o.unobserve&&t.el&&(o.unobserve(t.el),o=null)},u=()=>{!t||t.destroyed||!t.initialized||n("orientationchange")};r("init",()=>{if(t.params.resizeObserver&&typeof i.ResizeObserver<"u"){l();return}i.addEventListener("resize",a),i.addEventListener("orientationchange",u)}),r("destroy",()=>{c(),i.removeEventListener("resize",a),i.removeEventListener("orientationchange",u)})}function pZ(e){let{swiper:t,extendParams:r,on:n,emit:i}=e;const o=[],s=zi(),a=function(u,d){d===void 0&&(d={});const f=s.MutationObserver||s.WebkitMutationObserver,p=new f(h=>{if(t.__preventObserver__)return;if(h.length===1){i("observerUpdate",h[0]);return}const v=function(){i("observerUpdate",h[0])};s.requestAnimationFrame?s.requestAnimationFrame(v):s.setTimeout(v,0)});p.observe(u,{attributes:typeof d.attributes>"u"?!0:d.attributes,childList:t.isElement||(typeof d.childList>"u"?!0:d).childList,characterData:typeof d.characterData>"u"?!0:d.characterData}),o.push(p)},l=()=>{if(t.params.observer){if(t.params.observeParents){const u=aZ(t.hostEl);for(let d=0;d{o.forEach(u=>{u.disconnect()}),o.splice(0,o.length)};r({observer:!1,observeParents:!1,observeSlideChildren:!1}),n("init",l),n("destroy",c)}var hZ={on(e,t,r){const n=this;if(!n.eventsListeners||n.destroyed||typeof t!="function")return n;const i=r?"unshift":"push";return e.split(" ").forEach(o=>{n.eventsListeners[o]||(n.eventsListeners[o]=[]),n.eventsListeners[o][i](t)}),n},once(e,t,r){const n=this;if(!n.eventsListeners||n.destroyed||typeof t!="function")return n;function i(){n.off(e,i),i.__emitterProxy&&delete i.__emitterProxy;for(var o=arguments.length,s=new Array(o),a=0;a=0&&t.eventsAnyListeners.splice(r,1),t},off(e,t){const r=this;return!r.eventsListeners||r.destroyed||!r.eventsListeners||e.split(" ").forEach(n=>{typeof t>"u"?r.eventsListeners[n]=[]:r.eventsListeners[n]&&r.eventsListeners[n].forEach((i,o)=>{(i===t||i.__emitterProxy&&i.__emitterProxy===t)&&r.eventsListeners[n].splice(o,1)})}),r},emit(){const e=this;if(!e.eventsListeners||e.destroyed||!e.eventsListeners)return e;let t,r,n;for(var i=arguments.length,o=new Array(i),s=0;s{e.eventsAnyListeners&&e.eventsAnyListeners.length&&e.eventsAnyListeners.forEach(c=>{c.apply(n,[l,...r])}),e.eventsListeners&&e.eventsListeners[l]&&e.eventsListeners[l].forEach(c=>{c.apply(n,r)})}),e}};function mZ(){const e=this;let t,r;const n=e.el;typeof e.params.width<"u"&&e.params.width!==null?t=e.params.width:t=n.clientWidth,typeof e.params.height<"u"&&e.params.height!==null?r=e.params.height:r=n.clientHeight,!(t===0&&e.isHorizontal()||r===0&&e.isVertical())&&(t=t-parseInt(_a(n,"padding-left")||0,10)-parseInt(_a(n,"padding-right")||0,10),r=r-parseInt(_a(n,"padding-top")||0,10)-parseInt(_a(n,"padding-bottom")||0,10),Number.isNaN(t)&&(t=0),Number.isNaN(r)&&(r=0),Object.assign(e,{width:t,height:r,size:e.isHorizontal()?t:r}))}function gZ(){const e=this;function t(L,A){return parseFloat(L.getPropertyValue(e.getDirectionLabel(A))||0)}const r=e.params,{wrapperEl:n,slidesEl:i,size:o,rtlTranslate:s,wrongRTL:a}=e,l=e.virtual&&r.virtual.enabled,c=l?e.virtual.slides.length:e.slides.length,u=Os(i,`.${e.params.slideClass}, swiper-slide`),d=l?e.virtual.slides.length:u.length;let f=[];const p=[],h=[];let v=r.slidesOffsetBefore;typeof v=="function"&&(v=r.slidesOffsetBefore.call(e));let k=r.slidesOffsetAfter;typeof k=="function"&&(k=r.slidesOffsetAfter.call(e));const b=e.snapGrid.length,x=e.slidesGrid.length;let g=r.spaceBetween,C=-v,E=0,j=0;if(typeof o>"u")return;typeof g=="string"&&g.indexOf("%")>=0?g=parseFloat(g.replace("%",""))/100*o:typeof g=="string"&&(g=parseFloat(g)),e.virtualSize=-g,u.forEach(L=>{s?L.style.marginLeft="":L.style.marginRight="",L.style.marginBottom="",L.style.marginTop=""}),r.centeredSlides&&r.cssMode&&(jh(n,"--swiper-centered-offset-before",""),jh(n,"--swiper-centered-offset-after",""));const R=r.grid&&r.grid.rows>1&&e.grid;R?e.grid.initSlides(u):e.grid&&e.grid.unsetSlides();let O;const P=r.slidesPerView==="auto"&&r.breakpoints&&Object.keys(r.breakpoints).filter(L=>typeof r.breakpoints[L].slidesPerView<"u").length>0;for(let L=0;L1&&f.push(e.virtualSize-o)}if(l&&r.loop){const L=h[0]+g;if(r.slidesPerGroup>1){const A=Math.ceil((e.virtual.slidesBefore+e.virtual.slidesAfter)/r.slidesPerGroup),$=L*r.slidesPerGroup;for(let F=0;F!r.cssMode||r.loop?!0:$!==u.length-1).forEach(A=>{A.style[L]=`${g}px`})}if(r.centeredSlides&&r.centeredSlidesBounds){let L=0;h.forEach($=>{L+=$+(g||0)}),L-=g;const A=L>o?L-o:0;f=f.map($=>$<=0?-v:$>A?A+k:$)}if(r.centerInsufficientSlides){let L=0;h.forEach($=>{L+=$+(g||0)}),L-=g;const A=(r.slidesOffsetBefore||0)+(r.slidesOffsetAfter||0);if(L+A{f[K]=F-$}),p.forEach((F,K)=>{p[K]=F+$})}}if(Object.assign(e,{slides:u,snapGrid:f,slidesGrid:p,slidesSizesGrid:h}),r.centeredSlides&&r.cssMode&&!r.centeredSlidesBounds){jh(n,"--swiper-centered-offset-before",`${-f[0]}px`),jh(n,"--swiper-centered-offset-after",`${e.size/2-h[h.length-1]/2}px`);const L=-e.snapGrid[0],A=-e.slidesGrid[0];e.snapGrid=e.snapGrid.map($=>$+L),e.slidesGrid=e.slidesGrid.map($=>$+A)}if(d!==c&&e.emit("slidesLengthChange"),f.length!==b&&(e.params.watchOverflow&&e.checkOverflow(),e.emit("snapGridLengthChange")),p.length!==x&&e.emit("slidesGridLengthChange"),r.watchSlidesProgress&&e.updateSlidesOffset(),e.emit("slidesUpdated"),!l&&!r.cssMode&&(r.effect==="slide"||r.effect==="fade")){const L=`${r.containerModifierClass}backface-hidden`,A=e.el.classList.contains(L);d<=r.maxBackfaceHiddenSlides?A||e.el.classList.add(L):A&&e.el.classList.remove(L)}}function vZ(e){const t=this,r=[],n=t.virtual&&t.params.virtual.enabled;let i=0,o;typeof e=="number"?t.setTransition(e):e===!0&&t.setTransition(t.params.speed);const s=a=>n?t.slides[t.getSlideIndexByData(a)]:t.slides[a];if(t.params.slidesPerView!=="auto"&&t.params.slidesPerView>1)if(t.params.centeredSlides)(t.visibleSlides||[]).forEach(a=>{r.push(a)});else for(o=0;ot.slides.length&&!n)break;r.push(s(a))}else r.push(s(t.activeIndex));for(o=0;oi?a:i}(i||i===0)&&(t.wrapperEl.style.height=`${i}px`)}function yZ(){const e=this,t=e.slides,r=e.isElement?e.isHorizontal()?e.wrapperEl.offsetLeft:e.wrapperEl.offsetTop:0;for(let n=0;n{t&&!e.classList.contains(r)?e.classList.add(r):!t&&e.classList.contains(r)&&e.classList.remove(r)};function bZ(e){e===void 0&&(e=this&&this.translate||0);const t=this,r=t.params,{slides:n,rtlTranslate:i,snapGrid:o}=t;if(n.length===0)return;typeof n[0].swiperSlideOffset>"u"&&t.updateSlidesOffset();let s=-e;i&&(s=e),t.visibleSlidesIndexes=[],t.visibleSlides=[];let a=r.spaceBetween;typeof a=="string"&&a.indexOf("%")>=0?a=parseFloat(a.replace("%",""))/100*t.size:typeof a=="string"&&(a=parseFloat(a));for(let l=0;l=0&&p<=t.size-t.slidesSizesGrid[l],k=p>=0&&p1&&h<=t.size||p<=0&&h>=t.size;k&&(t.visibleSlides.push(c),t.visibleSlidesIndexes.push(l)),OR(c,k,r.slideVisibleClass),OR(c,v,r.slideFullyVisibleClass),c.progress=i?-d:d,c.originalProgress=i?-f:f}}function wZ(e){const t=this;if(typeof e>"u"){const u=t.rtlTranslate?-1:1;e=t&&t.translate&&t.translate*u||0}const r=t.params,n=t.maxTranslate()-t.minTranslate();let{progress:i,isBeginning:o,isEnd:s,progressLoop:a}=t;const l=o,c=s;if(n===0)i=0,o=!0,s=!0;else{i=(e-t.minTranslate())/n;const u=Math.abs(e-t.minTranslate())<1,d=Math.abs(e-t.maxTranslate())<1;o=u||i<=0,s=d||i>=1,u&&(i=0),d&&(i=1)}if(r.loop){const u=t.getSlideIndexByData(0),d=t.getSlideIndexByData(t.slides.length-1),f=t.slidesGrid[u],p=t.slidesGrid[d],h=t.slidesGrid[t.slidesGrid.length-1],v=Math.abs(e);v>=f?a=(v-f)/h:a=(v+h-p)/h,a>1&&(a-=1)}Object.assign(t,{progress:i,progressLoop:a,isBeginning:o,isEnd:s}),(r.watchSlidesProgress||r.centeredSlides&&r.autoHeight)&&t.updateSlidesProgress(e),o&&!l&&t.emit("reachBeginning toEdge"),s&&!c&&t.emit("reachEnd toEdge"),(l&&!o||c&&!s)&&t.emit("fromEdge"),t.emit("progress",i)}const K0=(e,t,r)=>{t&&!e.classList.contains(r)?e.classList.add(r):!t&&e.classList.contains(r)&&e.classList.remove(r)};function xZ(){const e=this,{slides:t,params:r,slidesEl:n,activeIndex:i}=e,o=e.virtual&&r.virtual.enabled,s=e.grid&&r.grid&&r.grid.rows>1,a=d=>Os(n,`.${r.slideClass}${d}, swiper-slide${d}`)[0];let l,c,u;if(o)if(r.loop){let d=i-e.virtual.slidesBefore;d<0&&(d=e.virtual.slides.length+d),d>=e.virtual.slides.length&&(d-=e.virtual.slides.length),l=a(`[data-swiper-slide-index="${d}"]`)}else l=a(`[data-swiper-slide-index="${i}"]`);else s?(l=t.filter(d=>d.column===i)[0],u=t.filter(d=>d.column===i+1)[0],c=t.filter(d=>d.column===i-1)[0]):l=t[i];l&&(s||(u=sZ(l,`.${r.slideClass}, swiper-slide`)[0],r.loop&&!u&&(u=t[0]),c=oZ(l,`.${r.slideClass}, swiper-slide`)[0],r.loop&&!c===0&&(c=t[t.length-1]))),t.forEach(d=>{K0(d,d===l,r.slideActiveClass),K0(d,d===u,r.slideNextClass),K0(d,d===c,r.slidePrevClass)}),e.emitSlidesClasses()}const om=(e,t)=>{if(!e||e.destroyed||!e.params)return;const r=()=>e.isElement?"swiper-slide":`.${e.params.slideClass}`,n=t.closest(r());if(n){let i=n.querySelector(`.${e.params.lazyPreloaderClass}`);!i&&e.isElement&&(n.shadowRoot?i=n.shadowRoot.querySelector(`.${e.params.lazyPreloaderClass}`):requestAnimationFrame(()=>{n.shadowRoot&&(i=n.shadowRoot.querySelector(`.${e.params.lazyPreloaderClass}`),i&&i.remove())})),i&&i.remove()}},q0=(e,t)=>{if(!e.slides[t])return;const r=e.slides[t].querySelector('[loading="lazy"]');r&&r.removeAttribute("loading")},Q1=e=>{if(!e||e.destroyed||!e.params)return;let t=e.params.lazyPreloadPrevNext;const r=e.slides.length;if(!r||!t||t<0)return;t=Math.min(t,r);const n=e.params.slidesPerView==="auto"?e.slidesPerViewDynamic():Math.ceil(e.params.slidesPerView),i=e.activeIndex;if(e.params.grid&&e.params.grid.rows>1){const s=i,a=[s-t];a.push(...Array.from({length:t}).map((l,c)=>s+n+c)),e.slides.forEach((l,c)=>{a.includes(l.column)&&q0(e,c)});return}const o=i+n-1;if(e.params.rewind||e.params.loop)for(let s=i-t;s<=o+t;s+=1){const a=(s%r+r)%r;(ao)&&q0(e,a)}else for(let s=Math.max(i-t,0);s<=Math.min(o+t,r-1);s+=1)s!==i&&(s>o||s=t[o]&&n=t[o]&&n=t[o]&&(i=o);return r.normalizeSlideIndex&&(i<0||typeof i>"u")&&(i=0),i}function CZ(e){const t=this,r=t.rtlTranslate?t.translate:-t.translate,{snapGrid:n,params:i,activeIndex:o,realIndex:s,snapIndex:a}=t;let l=e,c;const u=p=>{let h=p-t.virtual.slidesBefore;return h<0&&(h=t.virtual.slides.length+h),h>=t.virtual.slides.length&&(h-=t.virtual.slides.length),h};if(typeof l>"u"&&(l=SZ(t)),n.indexOf(r)>=0)c=n.indexOf(r);else{const p=Math.min(i.slidesPerGroupSkip,l);c=p+Math.floor((l-p)/i.slidesPerGroup)}if(c>=n.length&&(c=n.length-1),l===o&&!t.params.loop){c!==a&&(t.snapIndex=c,t.emit("snapIndexChange"));return}if(l===o&&t.params.loop&&t.virtual&&t.params.virtual.enabled){t.realIndex=u(l);return}const d=t.grid&&i.grid&&i.grid.rows>1;let f;if(t.virtual&&i.virtual.enabled&&i.loop)f=u(l);else if(d){const p=t.slides.filter(v=>v.column===l)[0];let h=parseInt(p.getAttribute("data-swiper-slide-index"),10);Number.isNaN(h)&&(h=Math.max(t.slides.indexOf(p),0)),f=Math.floor(h/i.grid.rows)}else if(t.slides[l]){const p=t.slides[l].getAttribute("data-swiper-slide-index");p?f=parseInt(p,10):f=l}else f=l;Object.assign(t,{previousSnapIndex:a,snapIndex:c,previousRealIndex:s,realIndex:f,previousIndex:o,activeIndex:l}),t.initialized&&Q1(t),t.emit("activeIndexChange"),t.emit("snapIndexChange"),(t.initialized||t.params.runCallbacksOnInit)&&(s!==f&&t.emit("realIndexChange"),t.emit("slideChange"))}function _Z(e,t){const r=this,n=r.params;let i=e.closest(`.${n.slideClass}, swiper-slide`);!i&&r.isElement&&t&&t.length>1&&t.includes(e)&&[...t.slice(t.indexOf(e)+1,t.length)].forEach(a=>{!i&&a.matches&&a.matches(`.${n.slideClass}, swiper-slide`)&&(i=a)});let o=!1,s;if(i){for(let a=0;al?u=l:n&&es?a="next":o"u"&&(t=o.params.speed);const v=Math.min(o.params.slidesPerGroupSkip,s);let k=v+Math.floor((s-v)/o.params.slidesPerGroup);k>=l.length&&(k=l.length-1);const b=-l[k];if(a.normalizeSlideIndex)for(let E=0;E=R&&j=R&&j=R&&(s=E)}if(o.initialized&&s!==d&&(!o.allowSlideNext&&(f?b>o.translate&&b>o.minTranslate():bo.translate&&b>o.maxTranslate()&&(d||0)!==s))return!1;s!==(u||0)&&r&&o.emit("beforeSlideChangeStart"),o.updateProgress(b);let x;s>d?x="next":s0?(o._cssModeVirtualInitialSet=!0,requestAnimationFrame(()=>{p[E?"scrollLeft":"scrollTop"]=j})):p[E?"scrollLeft":"scrollTop"]=j,g&&requestAnimationFrame(()=>{o.wrapperEl.style.scrollSnapType="",o._immediateVirtual=!1});else{if(!o.support.smoothScroll)return EI({swiper:o,targetPosition:j,side:E?"left":"top"}),!0;p.scrollTo({[E?"left":"top"]:j,behavior:"smooth"})}return!0}return o.setTransition(t),o.setTranslate(b),o.updateActiveIndex(s),o.updateSlidesClasses(),o.emit("beforeTransitionStart",t,n),o.transitionStart(r,x),t===0?o.transitionEnd(r,x):o.animating||(o.animating=!0,o.onSlideToWrapperTransitionEnd||(o.onSlideToWrapperTransitionEnd=function(j){!o||o.destroyed||j.target===this&&(o.wrapperEl.removeEventListener("transitionend",o.onSlideToWrapperTransitionEnd),o.onSlideToWrapperTransitionEnd=null,delete o.onSlideToWrapperTransitionEnd,o.transitionEnd(r,x))}),o.wrapperEl.addEventListener("transitionend",o.onSlideToWrapperTransitionEnd)),!0}function DZ(e,t,r,n){e===void 0&&(e=0),r===void 0&&(r=!0),typeof e=="string"&&(e=parseInt(e,10));const i=this;if(i.destroyed)return;typeof t>"u"&&(t=i.params.speed);const o=i.grid&&i.params.grid&&i.params.grid.rows>1;let s=e;if(i.params.loop)if(i.virtual&&i.params.virtual.enabled)s=s+i.virtual.slidesBefore;else{let a;if(o){const f=s*i.params.grid.rows;a=i.slides.filter(p=>p.getAttribute("data-swiper-slide-index")*1===f)[0].column}else a=i.getSlideIndexByData(s);const l=o?Math.ceil(i.slides.length/i.params.grid.rows):i.slides.length,{centeredSlides:c}=i.params;let u=i.params.slidesPerView;u==="auto"?u=i.slidesPerViewDynamic():(u=Math.ceil(parseFloat(i.params.slidesPerView,10)),c&&u%2===0&&(u=u+1));let d=l-ap.getAttribute("data-swiper-slide-index")*1===f)[0].column}else s=i.getSlideIndexByData(s)}return requestAnimationFrame(()=>{i.slideTo(s,t,r,n)}),i}function BZ(e,t,r){t===void 0&&(t=!0);const n=this,{enabled:i,params:o,animating:s}=n;if(!i||n.destroyed)return n;typeof e>"u"&&(e=n.params.speed);let a=o.slidesPerGroup;o.slidesPerView==="auto"&&o.slidesPerGroup===1&&o.slidesPerGroupAuto&&(a=Math.max(n.slidesPerViewDynamic("current",!0),1));const l=n.activeIndex{n.slideTo(n.activeIndex+l,e,t,r)}),!0}return o.rewind&&n.isEnd?n.slideTo(0,e,t,r):n.slideTo(n.activeIndex+l,e,t,r)}function $Z(e,t,r){t===void 0&&(t=!0);const n=this,{params:i,snapGrid:o,slidesGrid:s,rtlTranslate:a,enabled:l,animating:c}=n;if(!l||n.destroyed)return n;typeof e>"u"&&(e=n.params.speed);const u=n.virtual&&i.virtual.enabled;if(i.loop){if(c&&!u&&i.loopPreventsSliding)return!1;n.loopFix({direction:"prev"}),n._clientLeft=n.wrapperEl.clientLeft}const d=a?n.translate:-n.translate;function f(b){return b<0?-Math.floor(Math.abs(b)):Math.floor(b)}const p=f(d),h=o.map(b=>f(b));let v=o[h.indexOf(p)-1];if(typeof v>"u"&&i.cssMode){let b;o.forEach((x,g)=>{p>=x&&(b=g)}),typeof b<"u"&&(v=o[b>0?b-1:b])}let k=0;if(typeof v<"u"&&(k=s.indexOf(v),k<0&&(k=n.activeIndex-1),i.slidesPerView==="auto"&&i.slidesPerGroup===1&&i.slidesPerGroupAuto&&(k=k-n.slidesPerViewDynamic("previous",!0)+1,k=Math.max(k,0))),i.rewind&&n.isBeginning){const b=n.params.virtual&&n.params.virtual.enabled&&n.virtual?n.virtual.slides.length-1:n.slides.length-1;return n.slideTo(b,e,t,r)}else if(i.loop&&n.activeIndex===0&&i.cssMode)return requestAnimationFrame(()=>{n.slideTo(k,e,t,r)}),!0;return n.slideTo(k,e,t,r)}function FZ(e,t,r){t===void 0&&(t=!0);const n=this;if(!n.destroyed)return typeof e>"u"&&(e=n.params.speed),n.slideTo(n.activeIndex,e,t,r)}function zZ(e,t,r,n){t===void 0&&(t=!0),n===void 0&&(n=.5);const i=this;if(i.destroyed)return;typeof e>"u"&&(e=i.params.speed);let o=i.activeIndex;const s=Math.min(i.params.slidesPerGroupSkip,o),a=s+Math.floor((o-s)/i.params.slidesPerGroup),l=i.rtlTranslate?i.translate:-i.translate;if(l>=i.snapGrid[a]){const c=i.snapGrid[a],u=i.snapGrid[a+1];l-c>(u-c)*n&&(o+=i.params.slidesPerGroup)}else{const c=i.snapGrid[a-1],u=i.snapGrid[a];l-c<=(u-c)*n&&(o-=i.params.slidesPerGroup)}return o=Math.max(o,0),o=Math.min(o,i.slidesGrid.length-1),i.slideTo(o,e,t,r)}function UZ(){const e=this;if(e.destroyed)return;const{params:t,slidesEl:r}=e,n=t.slidesPerView==="auto"?e.slidesPerViewDynamic():t.slidesPerView;let i=e.clickedIndex,o;const s=e.isElement?"swiper-slide":`.${t.slideClass}`;if(t.loop){if(e.animating)return;o=parseInt(e.clickedSlide.getAttribute("data-swiper-slide-index"),10),t.centeredSlides?ie.slides.length-e.loopedSlides+n/2?(e.loopFix(),i=e.getSlideIndex(Os(r,`${s}[data-swiper-slide-index="${o}"]`)[0]),q1(()=>{e.slideTo(i)})):e.slideTo(i):i>e.slides.length-n?(e.loopFix(),i=e.getSlideIndex(Os(r,`${s}[data-swiper-slide-index="${o}"]`)[0]),q1(()=>{e.slideTo(i)})):e.slideTo(i)}else e.slideTo(i)}var GZ={slideTo:NZ,slideToLoop:DZ,slideNext:BZ,slidePrev:$Z,slideReset:FZ,slideToClosest:zZ,slideToClickedSlide:UZ};function WZ(e){const t=this,{params:r,slidesEl:n}=t;if(!r.loop||t.virtual&&t.params.virtual.enabled)return;const i=()=>{Os(n,`.${r.slideClass}, swiper-slide`).forEach((d,f)=>{d.setAttribute("data-swiper-slide-index",f)})},o=t.grid&&r.grid&&r.grid.rows>1,s=r.slidesPerGroup*(o?r.grid.rows:1),a=t.slides.length%s!==0,l=o&&t.slides.length%r.grid.rows!==0,c=u=>{for(let d=0;d1;c.length"u"?o=l.getSlideIndex(c.filter(F=>F.classList.contains(p.slideActiveClass))[0]):E=o;const j=n==="next"||!n,R=n==="prev"||!n;let O=0,P=0;const L=x?Math.ceil(c.length/p.grid.rows):c.length,$=(x?c[o].column:o)+(h&&typeof i>"u"?-v/2+.5:0);if($=0;Z-=1)c[Z].column===Y&&g.push(Z)}else g.push(L-K-1)}}else if($+v>L-b){P=Math.max($-(L-b*2),k);for(let F=0;F{Y.column===K&&C.push(Z)}):C.push(K)}}if(l.__preventObserver__=!0,requestAnimationFrame(()=>{l.__preventObserver__=!1}),R&&g.forEach(F=>{c[F].swiperLoopMoveDOM=!0,f.prepend(c[F]),c[F].swiperLoopMoveDOM=!1}),j&&C.forEach(F=>{c[F].swiperLoopMoveDOM=!0,f.append(c[F]),c[F].swiperLoopMoveDOM=!1}),l.recalcSlides(),p.slidesPerView==="auto"?l.updateSlides():x&&(g.length>0&&R||C.length>0&&j)&&l.slides.forEach((F,K)=>{l.grid.updateSlide(K,F,l.slides)}),p.watchSlidesProgress&&l.updateSlidesOffset(),r){if(g.length>0&&R){if(typeof t>"u"){const F=l.slidesGrid[E],Y=l.slidesGrid[E+O]-F;a?l.setTranslate(l.translate-Y):(l.slideTo(E+Math.ceil(O),0,!1,!0),i&&(l.touchEventsData.startTranslate=l.touchEventsData.startTranslate-Y,l.touchEventsData.currentTranslate=l.touchEventsData.currentTranslate-Y))}else if(i){const F=x?g.length/p.grid.rows:g.length;l.slideTo(l.activeIndex+F,0,!1,!0),l.touchEventsData.currentTranslate=l.translate}}else if(C.length>0&&j)if(typeof t>"u"){const F=l.slidesGrid[E],Y=l.slidesGrid[E-P]-F;a?l.setTranslate(l.translate-Y):(l.slideTo(E-P,0,!1,!0),i&&(l.touchEventsData.startTranslate=l.touchEventsData.startTranslate-Y,l.touchEventsData.currentTranslate=l.touchEventsData.currentTranslate-Y))}else{const F=x?C.length/p.grid.rows:C.length;l.slideTo(l.activeIndex-F,0,!1,!0)}}if(l.allowSlidePrev=u,l.allowSlideNext=d,l.controller&&l.controller.control&&!s){const F={slideRealIndex:t,direction:n,setTranslate:i,activeSlideIndex:o,byController:!0};Array.isArray(l.controller.control)?l.controller.control.forEach(K=>{!K.destroyed&&K.params.loop&&K.loopFix({...F,slideTo:K.params.slidesPerView===p.slidesPerView?r:!1})}):l.controller.control instanceof l.constructor&&l.controller.control.params.loop&&l.controller.control.loopFix({...F,slideTo:l.controller.control.params.slidesPerView===p.slidesPerView?r:!1})}l.emit("loopFix")}function VZ(){const e=this,{params:t,slidesEl:r}=e;if(!t.loop||e.virtual&&e.params.virtual.enabled)return;e.recalcSlides();const n=[];e.slides.forEach(i=>{const o=typeof i.swiperSlideIndex>"u"?i.getAttribute("data-swiper-slide-index")*1:i.swiperSlideIndex;n[o]=i}),e.slides.forEach(i=>{i.removeAttribute("data-swiper-slide-index")}),n.forEach(i=>{r.append(i)}),e.recalcSlides(),e.slideTo(e.realIndex,0)}var KZ={loopCreate:WZ,loopFix:HZ,loopDestroy:VZ};function qZ(e){const t=this;if(!t.params.simulateTouch||t.params.watchOverflow&&t.isLocked||t.params.cssMode)return;const r=t.params.touchEventsTarget==="container"?t.el:t.wrapperEl;t.isElement&&(t.__preventObserver__=!0),r.style.cursor="move",r.style.cursor=e?"grabbing":"grab",t.isElement&&requestAnimationFrame(()=>{t.__preventObserver__=!1})}function YZ(){const e=this;e.params.watchOverflow&&e.isLocked||e.params.cssMode||(e.isElement&&(e.__preventObserver__=!0),e[e.params.touchEventsTarget==="container"?"el":"wrapperEl"].style.cursor="",e.isElement&&requestAnimationFrame(()=>{e.__preventObserver__=!1}))}var QZ={setGrabCursor:qZ,unsetGrabCursor:YZ};function XZ(e,t){t===void 0&&(t=this);function r(n){if(!n||n===ed()||n===zi())return null;n.assignedSlot&&(n=n.assignedSlot);const i=n.closest(e);return!i&&!n.getRootNode?null:i||r(n.getRootNode().host)}return r(t)}function jR(e,t,r){const n=zi(),{params:i}=e,o=i.edgeSwipeDetection,s=i.edgeSwipeThreshold;return o&&(r<=s||r>=n.innerWidth-s)?o==="prevent"?(t.preventDefault(),!0):!1:!0}function JZ(e){const t=this,r=ed();let n=e;n.originalEvent&&(n=n.originalEvent);const i=t.touchEventsData;if(n.type==="pointerdown"){if(i.pointerId!==null&&i.pointerId!==n.pointerId)return;i.pointerId=n.pointerId}else n.type==="touchstart"&&n.targetTouches.length===1&&(i.touchId=n.targetTouches[0].identifier);if(n.type==="touchstart"){jR(t,n,n.targetTouches[0].pageX);return}const{params:o,touches:s,enabled:a}=t;if(!a||!o.simulateTouch&&n.pointerType==="mouse"||t.animating&&o.preventInteractionOnTransition)return;!t.animating&&o.cssMode&&o.loop&&t.loopFix();let l=n.target;if(o.touchEventsTarget==="wrapper"&&!iZ(l,t.wrapperEl)||"which"in n&&n.which===3||"button"in n&&n.button>0||i.isTouched&&i.isMoved)return;const c=!!o.noSwipingClass&&o.noSwipingClass!=="",u=n.composedPath?n.composedPath():n.path;c&&n.target&&n.target.shadowRoot&&u&&(l=u[0]);const d=o.noSwipingSelector?o.noSwipingSelector:`.${o.noSwipingClass}`,f=!!(n.target&&n.target.shadowRoot);if(o.noSwiping&&(f?XZ(d,l):l.closest(d))){t.allowClick=!0;return}if(o.swipeHandler&&!l.closest(o.swipeHandler))return;s.currentX=n.pageX,s.currentY=n.pageY;const p=s.currentX,h=s.currentY;if(!jR(t,n,p))return;Object.assign(i,{isTouched:!0,isMoved:!1,allowTouchCallbacks:!0,isScrolling:void 0,startMoving:void 0}),s.startX=p,s.startY=h,i.touchStartTime=wg(),t.allowClick=!0,t.updateSize(),t.swipeDirection=void 0,o.threshold>0&&(i.allowThresholdMove=!1);let v=!0;l.matches(i.focusableElements)&&(v=!1,l.nodeName==="SELECT"&&(i.isTouched=!1)),r.activeElement&&r.activeElement.matches(i.focusableElements)&&r.activeElement!==l&&r.activeElement.blur();const k=v&&t.allowTouchMove&&o.touchStartPreventDefault;(o.touchStartForcePreventDefault||k)&&!l.isContentEditable&&n.preventDefault(),o.freeMode&&o.freeMode.enabled&&t.freeMode&&t.animating&&!o.cssMode&&t.freeMode.onTouchStart(),t.emit("touchStart",n)}function ZZ(e){const t=ed(),r=this,n=r.touchEventsData,{params:i,touches:o,rtlTranslate:s,enabled:a}=r;if(!a||!i.simulateTouch&&e.pointerType==="mouse")return;let l=e;if(l.originalEvent&&(l=l.originalEvent),l.type==="pointermove"&&(n.touchId!==null||l.pointerId!==n.pointerId))return;let c;if(l.type==="touchmove"){if(c=[...l.changedTouches].filter(j=>j.identifier===n.touchId)[0],!c||c.identifier!==n.touchId)return}else c=l;if(!n.isTouched){n.startMoving&&n.isScrolling&&r.emit("touchMoveOpposite",l);return}const u=c.pageX,d=c.pageY;if(l.preventedByNestedSwiper){o.startX=u,o.startY=d;return}if(!r.allowTouchMove){l.target.matches(n.focusableElements)||(r.allowClick=!1),n.isTouched&&(Object.assign(o,{startX:u,startY:d,currentX:u,currentY:d}),n.touchStartTime=wg());return}if(i.touchReleaseOnEdges&&!i.loop){if(r.isVertical()){if(do.startY&&r.translate>=r.minTranslate()){n.isTouched=!1,n.isMoved=!1;return}}else if(uo.startX&&r.translate>=r.minTranslate())return}if(t.activeElement&&l.target===t.activeElement&&l.target.matches(n.focusableElements)){n.isMoved=!0,r.allowClick=!1;return}n.allowTouchCallbacks&&r.emit("touchMove",l),o.previousX=o.currentX,o.previousY=o.currentY,o.currentX=u,o.currentY=d;const f=o.currentX-o.startX,p=o.currentY-o.startY;if(r.params.threshold&&Math.sqrt(f**2+p**2)"u"){let j;r.isHorizontal()&&o.currentY===o.startY||r.isVertical()&&o.currentX===o.startX?n.isScrolling=!1:f*f+p*p>=25&&(j=Math.atan2(Math.abs(p),Math.abs(f))*180/Math.PI,n.isScrolling=r.isHorizontal()?j>i.touchAngle:90-j>i.touchAngle)}if(n.isScrolling&&r.emit("touchMoveOpposite",l),typeof n.startMoving>"u"&&(o.currentX!==o.startX||o.currentY!==o.startY)&&(n.startMoving=!0),n.isScrolling||l.type==="touchmove"&&n.preventTouchMoveFromPointerMove){n.isTouched=!1;return}if(!n.startMoving)return;r.allowClick=!1,!i.cssMode&&l.cancelable&&l.preventDefault(),i.touchMoveStopPropagation&&!i.nested&&l.stopPropagation();let h=r.isHorizontal()?f:p,v=r.isHorizontal()?o.currentX-o.previousX:o.currentY-o.previousY;i.oneWayMovement&&(h=Math.abs(h)*(s?1:-1),v=Math.abs(v)*(s?1:-1)),o.diff=h,h*=i.touchRatio,s&&(h=-h,v=-v);const k=r.touchesDirection;r.swipeDirection=h>0?"prev":"next",r.touchesDirection=v>0?"prev":"next";const b=r.params.loop&&!i.cssMode,x=r.touchesDirection==="next"&&r.allowSlideNext||r.touchesDirection==="prev"&&r.allowSlidePrev;if(!n.isMoved){if(b&&x&&r.loopFix({direction:r.swipeDirection}),n.startTranslate=r.getTranslate(),r.setTransition(0),r.animating){const j=new window.CustomEvent("transitionend",{bubbles:!0,cancelable:!0,detail:{bySwiperTouchMove:!0}});r.wrapperEl.dispatchEvent(j)}n.allowMomentumBounce=!1,i.grabCursor&&(r.allowSlideNext===!0||r.allowSlidePrev===!0)&&r.setGrabCursor(!0),r.emit("sliderFirstMove",l)}let g;if(new Date().getTime(),n.isMoved&&n.allowThresholdMove&&k!==r.touchesDirection&&b&&x&&Math.abs(h)>=1){Object.assign(o,{startX:u,startY:d,currentX:u,currentY:d,startTranslate:n.currentTranslate}),n.loopSwapReset=!0,n.startTranslate=n.currentTranslate;return}r.emit("sliderMove",l),n.isMoved=!0,n.currentTranslate=h+n.startTranslate;let C=!0,E=i.resistanceRatio;if(i.touchReleaseOnEdges&&(E=0),h>0?(b&&x&&!g&&n.allowThresholdMove&&n.currentTranslate>(i.centeredSlides?r.minTranslate()-r.slidesSizesGrid[r.activeIndex+1]-(i.slidesPerView!=="auto"&&r.slides.length-i.slidesPerView>=2?r.slidesSizesGrid[r.activeIndex+1]+r.params.spaceBetween:0)-r.params.spaceBetween:r.minTranslate())&&r.loopFix({direction:"prev",setTranslate:!0,activeSlideIndex:0}),n.currentTranslate>r.minTranslate()&&(C=!1,i.resistance&&(n.currentTranslate=r.minTranslate()-1+(-r.minTranslate()+n.startTranslate+h)**E))):h<0&&(b&&x&&!g&&n.allowThresholdMove&&n.currentTranslate<(i.centeredSlides?r.maxTranslate()+r.slidesSizesGrid[r.slidesSizesGrid.length-1]+r.params.spaceBetween+(i.slidesPerView!=="auto"&&r.slides.length-i.slidesPerView>=2?r.slidesSizesGrid[r.slidesSizesGrid.length-1]+r.params.spaceBetween:0):r.maxTranslate())&&r.loopFix({direction:"next",setTranslate:!0,activeSlideIndex:r.slides.length-(i.slidesPerView==="auto"?r.slidesPerViewDynamic():Math.ceil(parseFloat(i.slidesPerView,10)))}),n.currentTranslaten.startTranslate&&(n.currentTranslate=n.startTranslate),!r.allowSlidePrev&&!r.allowSlideNext&&(n.currentTranslate=n.startTranslate),i.threshold>0)if(Math.abs(h)>i.threshold||n.allowThresholdMove){if(!n.allowThresholdMove){n.allowThresholdMove=!0,o.startX=o.currentX,o.startY=o.currentY,n.currentTranslate=n.startTranslate,o.diff=r.isHorizontal()?o.currentX-o.startX:o.currentY-o.startY;return}}else{n.currentTranslate=n.startTranslate;return}!i.followFinger||i.cssMode||((i.freeMode&&i.freeMode.enabled&&r.freeMode||i.watchSlidesProgress)&&(r.updateActiveIndex(),r.updateSlidesClasses()),i.freeMode&&i.freeMode.enabled&&r.freeMode&&r.freeMode.onTouchMove(),r.updateProgress(n.currentTranslate),r.setTranslate(n.currentTranslate))}function eee(e){const t=this,r=t.touchEventsData;let n=e;n.originalEvent&&(n=n.originalEvent);let i;if(n.type==="touchend"||n.type==="touchcancel"){if(i=[...n.changedTouches].filter(E=>E.identifier===r.touchId)[0],!i||i.identifier!==r.touchId)return}else{if(r.touchId!==null||n.pointerId!==r.pointerId)return;i=n}if(["pointercancel","pointerout","pointerleave","contextmenu"].includes(n.type)&&!(["pointercancel","contextmenu"].includes(n.type)&&(t.browser.isSafari||t.browser.isWebView)))return;r.pointerId=null,r.touchId=null;const{params:s,touches:a,rtlTranslate:l,slidesGrid:c,enabled:u}=t;if(!u||!s.simulateTouch&&n.pointerType==="mouse")return;if(r.allowTouchCallbacks&&t.emit("touchEnd",n),r.allowTouchCallbacks=!1,!r.isTouched){r.isMoved&&s.grabCursor&&t.setGrabCursor(!1),r.isMoved=!1,r.startMoving=!1;return}s.grabCursor&&r.isMoved&&r.isTouched&&(t.allowSlideNext===!0||t.allowSlidePrev===!0)&&t.setGrabCursor(!1);const d=wg(),f=d-r.touchStartTime;if(t.allowClick){const E=n.path||n.composedPath&&n.composedPath();t.updateClickedSlide(E&&E[0]||n.target,E),t.emit("tap click",n),f<300&&d-r.lastClickTime<300&&t.emit("doubleTap doubleClick",n)}if(r.lastClickTime=wg(),q1(()=>{t.destroyed||(t.allowClick=!0)}),!r.isTouched||!r.isMoved||!t.swipeDirection||a.diff===0&&!r.loopSwapReset||r.currentTranslate===r.startTranslate&&!r.loopSwapReset){r.isTouched=!1,r.isMoved=!1,r.startMoving=!1;return}r.isTouched=!1,r.isMoved=!1,r.startMoving=!1;let p;if(s.followFinger?p=l?t.translate:-t.translate:p=-r.currentTranslate,s.cssMode)return;if(s.freeMode&&s.freeMode.enabled){t.freeMode.onTouchEnd({currentPos:p});return}const h=p>=-t.maxTranslate()&&!t.params.loop;let v=0,k=t.slidesSizesGrid[0];for(let E=0;E=c[E]&&p=c[E])&&(v=E,k=c[c.length-1]-c[c.length-2])}let b=null,x=null;s.rewind&&(t.isBeginning?x=s.virtual&&s.virtual.enabled&&t.virtual?t.virtual.slides.length-1:t.slides.length-1:t.isEnd&&(b=0));const g=(p-c[v])/k,C=vs.longSwipesMs){if(!s.longSwipes){t.slideTo(t.activeIndex);return}t.swipeDirection==="next"&&(g>=s.longSwipesRatio?t.slideTo(s.rewind&&t.isEnd?b:v+C):t.slideTo(v)),t.swipeDirection==="prev"&&(g>1-s.longSwipesRatio?t.slideTo(v+C):x!==null&&g<0&&Math.abs(g)>s.longSwipesRatio?t.slideTo(x):t.slideTo(v))}else{if(!s.shortSwipes){t.slideTo(t.activeIndex);return}t.navigation&&(n.target===t.navigation.nextEl||n.target===t.navigation.prevEl)?n.target===t.navigation.nextEl?t.slideTo(v+C):t.slideTo(v):(t.swipeDirection==="next"&&t.slideTo(b!==null?b:v+C),t.swipeDirection==="prev"&&t.slideTo(x!==null?x:v))}}function LR(){const e=this,{params:t,el:r}=e;if(r&&r.offsetWidth===0)return;t.breakpoints&&e.setBreakpoint();const{allowSlideNext:n,allowSlidePrev:i,snapGrid:o}=e,s=e.virtual&&e.params.virtual.enabled;e.allowSlideNext=!0,e.allowSlidePrev=!0,e.updateSize(),e.updateSlides(),e.updateSlidesClasses();const a=s&&t.loop;(t.slidesPerView==="auto"||t.slidesPerView>1)&&e.isEnd&&!e.isBeginning&&!e.params.centeredSlides&&!a?e.slideTo(e.slides.length-1,0,!1,!0):e.params.loop&&!s?e.slideToLoop(e.realIndex,0,!1,!0):e.slideTo(e.activeIndex,0,!1,!0),e.autoplay&&e.autoplay.running&&e.autoplay.paused&&(clearTimeout(e.autoplay.resizeTimeout),e.autoplay.resizeTimeout=setTimeout(()=>{e.autoplay&&e.autoplay.running&&e.autoplay.paused&&e.autoplay.resume()},500)),e.allowSlidePrev=i,e.allowSlideNext=n,e.params.watchOverflow&&o!==e.snapGrid&&e.checkOverflow()}function tee(e){const t=this;t.enabled&&(t.allowClick||(t.params.preventClicks&&e.preventDefault(),t.params.preventClicksPropagation&&t.animating&&(e.stopPropagation(),e.stopImmediatePropagation())))}function ree(){const e=this,{wrapperEl:t,rtlTranslate:r,enabled:n}=e;if(!n)return;e.previousTranslate=e.translate,e.isHorizontal()?e.translate=-t.scrollLeft:e.translate=-t.scrollTop,e.translate===0&&(e.translate=0),e.updateActiveIndex(),e.updateSlidesClasses();let i;const o=e.maxTranslate()-e.minTranslate();o===0?i=0:i=(e.translate-e.minTranslate())/o,i!==e.progress&&e.updateProgress(r?-e.translate:e.translate),e.emit("setTranslate",e.translate,!1)}function nee(e){const t=this;om(t,e.target),!(t.params.cssMode||t.params.slidesPerView!=="auto"&&!t.params.autoHeight)&&t.update()}function iee(){const e=this;e.documentTouchHandlerProceeded||(e.documentTouchHandlerProceeded=!0,e.params.touchReleaseOnEdges&&(e.el.style.touchAction="auto"))}const OI=(e,t)=>{const r=ed(),{params:n,el:i,wrapperEl:o,device:s}=e,a=!!n.nested,l=t==="on"?"addEventListener":"removeEventListener",c=t;!i||typeof i=="string"||(r[l]("touchstart",e.onDocumentTouchStart,{passive:!1,capture:a}),i[l]("touchstart",e.onTouchStart,{passive:!1}),i[l]("pointerdown",e.onTouchStart,{passive:!1}),r[l]("touchmove",e.onTouchMove,{passive:!1,capture:a}),r[l]("pointermove",e.onTouchMove,{passive:!1,capture:a}),r[l]("touchend",e.onTouchEnd,{passive:!0}),r[l]("pointerup",e.onTouchEnd,{passive:!0}),r[l]("pointercancel",e.onTouchEnd,{passive:!0}),r[l]("touchcancel",e.onTouchEnd,{passive:!0}),r[l]("pointerout",e.onTouchEnd,{passive:!0}),r[l]("pointerleave",e.onTouchEnd,{passive:!0}),r[l]("contextmenu",e.onTouchEnd,{passive:!0}),(n.preventClicks||n.preventClicksPropagation)&&i[l]("click",e.onClick,!0),n.cssMode&&o[l]("scroll",e.onScroll),n.updateOnWindowResize?e[c](s.ios||s.android?"resize orientationchange observerUpdate":"resize observerUpdate",LR,!0):e[c]("observerUpdate",LR,!0),i[l]("load",e.onLoad,{capture:!0}))};function oee(){const e=this,{params:t}=e;e.onTouchStart=JZ.bind(e),e.onTouchMove=ZZ.bind(e),e.onTouchEnd=eee.bind(e),e.onDocumentTouchStart=iee.bind(e),t.cssMode&&(e.onScroll=ree.bind(e)),e.onClick=tee.bind(e),e.onLoad=nee.bind(e),OI(e,"on")}function see(){OI(this,"off")}var aee={attachEvents:oee,detachEvents:see};const IR=(e,t)=>e.grid&&t.grid&&t.grid.rows>1;function lee(){const e=this,{realIndex:t,initialized:r,params:n,el:i}=e,o=n.breakpoints;if(!o||o&&Object.keys(o).length===0)return;const s=e.getBreakpoint(o,e.params.breakpointsBase,e.el);if(!s||e.currentBreakpoint===s)return;const l=(s in o?o[s]:void 0)||e.originalParams,c=IR(e,n),u=IR(e,l),d=e.params.grabCursor,f=l.grabCursor,p=n.enabled;c&&!u?(i.classList.remove(`${n.containerModifierClass}grid`,`${n.containerModifierClass}grid-column`),e.emitContainerClasses()):!c&&u&&(i.classList.add(`${n.containerModifierClass}grid`),(l.grid.fill&&l.grid.fill==="column"||!l.grid.fill&&n.grid.fill==="column")&&i.classList.add(`${n.containerModifierClass}grid-column`),e.emitContainerClasses()),d&&!f?e.unsetGrabCursor():!d&&f&&e.setGrabCursor(),["navigation","pagination","scrollbar"].forEach(g=>{if(typeof l[g]>"u")return;const C=n[g]&&n[g].enabled,E=l[g]&&l[g].enabled;C&&!E&&e[g].disable(),!C&&E&&e[g].enable()});const h=l.direction&&l.direction!==n.direction,v=n.loop&&(l.slidesPerView!==n.slidesPerView||h),k=n.loop;h&&r&&e.changeDirection(),Si(e.params,l);const b=e.params.enabled,x=e.params.loop;Object.assign(e,{allowTouchMove:e.params.allowTouchMove,allowSlideNext:e.params.allowSlideNext,allowSlidePrev:e.params.allowSlidePrev}),p&&!b?e.disable():!p&&b&&e.enable(),e.currentBreakpoint=s,e.emit("_beforeBreakpoint",l),r&&(v?(e.loopDestroy(),e.loopCreate(t),e.updateSlides()):!k&&x?(e.loopCreate(t),e.updateSlides()):k&&!x&&e.loopDestroy()),e.emit("breakpoint",l)}function cee(e,t,r){if(t===void 0&&(t="window"),!e||t==="container"&&!r)return;let n=!1;const i=zi(),o=t==="window"?i.innerHeight:r.clientHeight,s=Object.keys(e).map(a=>{if(typeof a=="string"&&a.indexOf("@")===0){const l=parseFloat(a.substr(1));return{value:o*l,point:a}}return{value:a,point:a}});s.sort((a,l)=>parseInt(a.value,10)-parseInt(l.value,10));for(let a=0;a{typeof n=="object"?Object.keys(n).forEach(i=>{n[i]&&r.push(t+i)}):typeof n=="string"&&r.push(t+n)}),r}function fee(){const e=this,{classNames:t,params:r,rtl:n,el:i,device:o}=e,s=dee(["initialized",r.direction,{"free-mode":e.params.freeMode&&r.freeMode.enabled},{autoheight:r.autoHeight},{rtl:n},{grid:r.grid&&r.grid.rows>1},{"grid-column":r.grid&&r.grid.rows>1&&r.grid.fill==="column"},{android:o.android},{ios:o.ios},{"css-mode":r.cssMode},{centered:r.cssMode&&r.centeredSlides},{"watch-progress":r.watchSlidesProgress}],r.containerModifierClass);t.push(...s),i.classList.add(...t),e.emitContainerClasses()}function pee(){const e=this,{el:t,classNames:r}=e;!t||typeof t=="string"||(t.classList.remove(...r),e.emitContainerClasses())}var hee={addClasses:fee,removeClasses:pee};function mee(){const e=this,{isLocked:t,params:r}=e,{slidesOffsetBefore:n}=r;if(n){const i=e.slides.length-1,o=e.slidesGrid[i]+e.slidesSizesGrid[i]+n*2;e.isLocked=e.size>o}else e.isLocked=e.snapGrid.length===1;r.allowSlideNext===!0&&(e.allowSlideNext=!e.isLocked),r.allowSlidePrev===!0&&(e.allowSlidePrev=!e.isLocked),t&&t!==e.isLocked&&(e.isEnd=!1),t!==e.isLocked&&e.emit(e.isLocked?"lock":"unlock")}var gee={checkOverflow:mee},X1={init:!0,direction:"horizontal",oneWayMovement:!1,swiperElementNodeName:"SWIPER-CONTAINER",touchEventsTarget:"wrapper",initialSlide:0,speed:300,cssMode:!1,updateOnWindowResize:!0,resizeObserver:!0,nested:!1,createElements:!1,eventsPrefix:"swiper",enabled:!0,focusableElements:"input, select, option, textarea, button, video, label",width:null,height:null,preventInteractionOnTransition:!1,userAgent:null,url:null,edgeSwipeDetection:!1,edgeSwipeThreshold:20,autoHeight:!1,setWrapperSize:!1,virtualTranslate:!1,effect:"slide",breakpoints:void 0,breakpointsBase:"window",spaceBetween:0,slidesPerView:1,slidesPerGroup:1,slidesPerGroupSkip:0,slidesPerGroupAuto:!1,centeredSlides:!1,centeredSlidesBounds:!1,slidesOffsetBefore:0,slidesOffsetAfter:0,normalizeSlideIndex:!0,centerInsufficientSlides:!1,watchOverflow:!0,roundLengths:!1,touchRatio:1,touchAngle:45,simulateTouch:!0,shortSwipes:!0,longSwipes:!0,longSwipesRatio:.5,longSwipesMs:300,followFinger:!0,allowTouchMove:!0,threshold:5,touchMoveStopPropagation:!1,touchStartPreventDefault:!0,touchStartForcePreventDefault:!1,touchReleaseOnEdges:!1,uniqueNavElements:!0,resistance:!0,resistanceRatio:.85,watchSlidesProgress:!1,grabCursor:!1,preventClicks:!0,preventClicksPropagation:!0,slideToClickedSlide:!1,loop:!1,loopAddBlankSlides:!0,loopAdditionalSlides:0,loopPreventsSliding:!0,rewind:!1,allowSlidePrev:!0,allowSlideNext:!0,swipeHandler:null,noSwiping:!0,noSwipingClass:"swiper-no-swiping",noSwipingSelector:null,passiveListeners:!0,maxBackfaceHiddenSlides:10,containerModifierClass:"swiper-",slideClass:"swiper-slide",slideBlankClass:"swiper-slide-blank",slideActiveClass:"swiper-slide-active",slideVisibleClass:"swiper-slide-visible",slideFullyVisibleClass:"swiper-slide-fully-visible",slideNextClass:"swiper-slide-next",slidePrevClass:"swiper-slide-prev",wrapperClass:"swiper-wrapper",lazyPreloaderClass:"swiper-lazy-preloader",lazyPreloadPrevNext:0,runCallbacksOnInit:!0,_emitClasses:!1};function vee(e,t){return function(n){n===void 0&&(n={});const i=Object.keys(n)[0],o=n[i];if(typeof o!="object"||o===null){Si(t,n);return}if(e[i]===!0&&(e[i]={enabled:!0}),i==="navigation"&&e[i]&&e[i].enabled&&!e[i].prevEl&&!e[i].nextEl&&(e[i].auto=!0),["pagination","scrollbar"].indexOf(i)>=0&&e[i]&&e[i].enabled&&!e[i].el&&(e[i].auto=!0),!(i in e&&"enabled"in o)){Si(t,n);return}typeof e[i]=="object"&&!("enabled"in e[i])&&(e[i].enabled=!0),e[i]||(e[i]={enabled:!1}),Si(t,n)}}const Y0={eventsEmitter:hZ,update:kZ,translate:jZ,transition:AZ,slide:GZ,loop:KZ,grabCursor:QZ,events:aee,breakpoints:uee,checkOverflow:gee,classes:hee},Q0={};let jS=class xs{constructor(){let t,r;for(var n=arguments.length,i=new Array(n),o=0;o1){const u=[];return s.querySelectorAll(r.el).forEach(d=>{const f=Si({},r,{el:d});u.push(new xs(f))}),u}const a=this;a.__swiper__=!0,a.support=RI(),a.device=PI({userAgent:r.userAgent}),a.browser=dZ(),a.eventsListeners={},a.eventsAnyListeners=[],a.modules=[...a.__modules__],r.modules&&Array.isArray(r.modules)&&a.modules.push(...r.modules);const l={};a.modules.forEach(u=>{u({params:r,swiper:a,extendParams:vee(r,l),on:a.on.bind(a),once:a.once.bind(a),off:a.off.bind(a),emit:a.emit.bind(a)})});const c=Si({},X1,l);return a.params=Si({},c,Q0,r),a.originalParams=Si({},a.params),a.passedParams=Si({},r),a.params&&a.params.on&&Object.keys(a.params.on).forEach(u=>{a.on(u,a.params.on[u])}),a.params&&a.params.onAny&&a.onAny(a.params.onAny),Object.assign(a,{enabled:a.params.enabled,el:t,classNames:[],slides:[],slidesGrid:[],snapGrid:[],slidesSizesGrid:[],isHorizontal(){return a.params.direction==="horizontal"},isVertical(){return a.params.direction==="vertical"},activeIndex:0,realIndex:0,isBeginning:!0,isEnd:!1,translate:0,previousTranslate:0,progress:0,velocity:0,animating:!1,cssOverflowAdjustment(){return Math.trunc(this.translate/2**23)*2**23},allowSlideNext:a.params.allowSlideNext,allowSlidePrev:a.params.allowSlidePrev,touchEventsData:{isTouched:void 0,isMoved:void 0,allowTouchCallbacks:void 0,touchStartTime:void 0,isScrolling:void 0,currentTranslate:void 0,startTranslate:void 0,allowThresholdMove:void 0,focusableElements:a.params.focusableElements,lastClickTime:0,clickTimeout:void 0,velocities:[],allowMomentumBounce:void 0,startMoving:void 0,pointerId:null,touchId:null},allowClick:!0,allowTouchMove:a.params.allowTouchMove,touches:{startX:0,startY:0,currentX:0,currentY:0,diff:0},imagesToLoad:[],imagesLoaded:0}),a.emit("_swiper"),a.params.init&&a.init(),a}getDirectionLabel(t){return this.isHorizontal()?t:{width:"height","margin-top":"margin-left","margin-bottom ":"margin-right","margin-left":"margin-top","margin-right":"margin-bottom","padding-left":"padding-top","padding-right":"padding-bottom",marginRight:"marginBottom"}[t]}getSlideIndex(t){const{slidesEl:r,params:n}=this,i=Os(r,`.${n.slideClass}, swiper-slide`),o=PR(i[0]);return PR(t)-o}getSlideIndexByData(t){return this.getSlideIndex(this.slides.filter(r=>r.getAttribute("data-swiper-slide-index")*1===t)[0])}recalcSlides(){const t=this,{slidesEl:r,params:n}=t;t.slides=Os(r,`.${n.slideClass}, swiper-slide`)}enable(){const t=this;t.enabled||(t.enabled=!0,t.params.grabCursor&&t.setGrabCursor(),t.emit("enable"))}disable(){const t=this;t.enabled&&(t.enabled=!1,t.params.grabCursor&&t.unsetGrabCursor(),t.emit("disable"))}setProgress(t,r){const n=this;t=Math.min(Math.max(t,0),1);const i=n.minTranslate(),s=(n.maxTranslate()-i)*t+i;n.translateTo(s,typeof r>"u"?0:r),n.updateActiveIndex(),n.updateSlidesClasses()}emitContainerClasses(){const t=this;if(!t.params._emitClasses||!t.el)return;const r=t.el.className.split(" ").filter(n=>n.indexOf("swiper")===0||n.indexOf(t.params.containerModifierClass)===0);t.emit("_containerClasses",r.join(" "))}getSlideClasses(t){const r=this;return r.destroyed?"":t.className.split(" ").filter(n=>n.indexOf("swiper-slide")===0||n.indexOf(r.params.slideClass)===0).join(" ")}emitSlidesClasses(){const t=this;if(!t.params._emitClasses||!t.el)return;const r=[];t.slides.forEach(n=>{const i=t.getSlideClasses(n);r.push({slideEl:n,classNames:i}),t.emit("_slideClass",n,i)}),t.emit("_slideClasses",r)}slidesPerViewDynamic(t,r){t===void 0&&(t="current"),r===void 0&&(r=!1);const n=this,{params:i,slides:o,slidesGrid:s,slidesSizesGrid:a,size:l,activeIndex:c}=n;let u=1;if(typeof i.slidesPerView=="number")return i.slidesPerView;if(i.centeredSlides){let d=o[c]?Math.ceil(o[c].swiperSlideSize):0,f;for(let p=c+1;pl&&(f=!0));for(let p=c-1;p>=0;p-=1)o[p]&&!f&&(d+=o[p].swiperSlideSize,u+=1,d>l&&(f=!0))}else if(t==="current")for(let d=c+1;d=0;d-=1)s[c]-s[d]{s.complete&&om(t,s)}),t.updateSize(),t.updateSlides(),t.updateProgress(),t.updateSlidesClasses();function i(){const s=t.rtlTranslate?t.translate*-1:t.translate,a=Math.min(Math.max(s,t.maxTranslate()),t.minTranslate());t.setTranslate(a),t.updateActiveIndex(),t.updateSlidesClasses()}let o;if(n.freeMode&&n.freeMode.enabled&&!n.cssMode)i(),n.autoHeight&&t.updateAutoHeight();else{if((n.slidesPerView==="auto"||n.slidesPerView>1)&&t.isEnd&&!n.centeredSlides){const s=t.virtual&&n.virtual.enabled?t.virtual.slides:t.slides;o=t.slideTo(s.length-1,0,!1,!0)}else o=t.slideTo(t.activeIndex,0,!1,!0);o||i()}n.watchOverflow&&r!==t.snapGrid&&t.checkOverflow(),t.emit("update")}changeDirection(t,r){r===void 0&&(r=!0);const n=this,i=n.params.direction;return t||(t=i==="horizontal"?"vertical":"horizontal"),t===i||t!=="horizontal"&&t!=="vertical"||(n.el.classList.remove(`${n.params.containerModifierClass}${i}`),n.el.classList.add(`${n.params.containerModifierClass}${t}`),n.emitContainerClasses(),n.params.direction=t,n.slides.forEach(o=>{t==="vertical"?o.style.width="":o.style.height=""}),n.emit("changeDirection"),r&&n.update()),n}changeLanguageDirection(t){const r=this;r.rtl&&t==="rtl"||!r.rtl&&t==="ltr"||(r.rtl=t==="rtl",r.rtlTranslate=r.params.direction==="horizontal"&&r.rtl,r.rtl?(r.el.classList.add(`${r.params.containerModifierClass}rtl`),r.el.dir="rtl"):(r.el.classList.remove(`${r.params.containerModifierClass}rtl`),r.el.dir="ltr"),r.update())}mount(t){const r=this;if(r.mounted)return!0;let n=t||r.params.el;if(typeof n=="string"&&(n=document.querySelector(n)),!n)return!1;n.swiper=r,n.parentNode&&n.parentNode.host&&n.parentNode.host.nodeName===r.params.swiperElementNodeName.toUpperCase()&&(r.isElement=!0);const i=()=>`.${(r.params.wrapperClass||"").trim().split(" ").join(".")}`;let s=n&&n.shadowRoot&&n.shadowRoot.querySelector?n.shadowRoot.querySelector(i()):Os(n,i())[0];return!s&&r.params.createElements&&(s=Y1("div",r.params.wrapperClass),n.append(s),Os(n,`.${r.params.slideClass}`).forEach(a=>{s.append(a)})),Object.assign(r,{el:n,wrapperEl:s,slidesEl:r.isElement&&!n.parentNode.host.slideSlots?n.parentNode.host:s,hostEl:r.isElement?n.parentNode.host:n,mounted:!0,rtl:n.dir.toLowerCase()==="rtl"||_a(n,"direction")==="rtl",rtlTranslate:r.params.direction==="horizontal"&&(n.dir.toLowerCase()==="rtl"||_a(n,"direction")==="rtl"),wrongRTL:_a(s,"display")==="-webkit-box"}),!0}init(t){const r=this;if(r.initialized||r.mount(t)===!1)return r;r.emit("beforeInit"),r.params.breakpoints&&r.setBreakpoint(),r.addClasses(),r.updateSize(),r.updateSlides(),r.params.watchOverflow&&r.checkOverflow(),r.params.grabCursor&&r.enabled&&r.setGrabCursor(),r.params.loop&&r.virtual&&r.params.virtual.enabled?r.slideTo(r.params.initialSlide+r.virtual.slidesBefore,0,r.params.runCallbacksOnInit,!1,!0):r.slideTo(r.params.initialSlide,0,r.params.runCallbacksOnInit,!1,!0),r.params.loop&&r.loopCreate(),r.attachEvents();const i=[...r.el.querySelectorAll('[loading="lazy"]')];return r.isElement&&i.push(...r.hostEl.querySelectorAll('[loading="lazy"]')),i.forEach(o=>{o.complete?om(r,o):o.addEventListener("load",s=>{om(r,s.target)})}),Q1(r),r.initialized=!0,Q1(r),r.emit("init"),r.emit("afterInit"),r}destroy(t,r){t===void 0&&(t=!0),r===void 0&&(r=!0);const n=this,{params:i,el:o,wrapperEl:s,slides:a}=n;return typeof n.params>"u"||n.destroyed||(n.emit("beforeDestroy"),n.initialized=!1,n.detachEvents(),i.loop&&n.loopDestroy(),r&&(n.removeClasses(),o&&typeof o!="string"&&o.removeAttribute("style"),s&&s.removeAttribute("style"),a&&a.length&&a.forEach(l=>{l.classList.remove(i.slideVisibleClass,i.slideFullyVisibleClass,i.slideActiveClass,i.slideNextClass,i.slidePrevClass),l.removeAttribute("style"),l.removeAttribute("data-swiper-slide-index")})),n.emit("destroy"),Object.keys(n.eventsListeners).forEach(l=>{n.off(l)}),t!==!1&&(n.el&&typeof n.el!="string"&&(n.el.swiper=null),eZ(n)),n.destroyed=!0),null}static extendDefaults(t){Si(Q0,t)}static get extendedDefaults(){return Q0}static get defaults(){return X1}static installModule(t){xs.prototype.__modules__||(xs.prototype.__modules__=[]);const r=xs.prototype.__modules__;typeof t=="function"&&r.indexOf(t)<0&&r.push(t)}static use(t){return Array.isArray(t)?(t.forEach(r=>xs.installModule(r)),xs):(xs.installModule(t),xs)}};Object.keys(Y0).forEach(e=>{Object.keys(Y0[e]).forEach(t=>{jS.prototype[t]=Y0[e][t]})});jS.use([fZ,pZ]);const jI=["eventsPrefix","injectStyles","injectStylesUrls","modules","init","_direction","oneWayMovement","swiperElementNodeName","touchEventsTarget","initialSlide","_speed","cssMode","updateOnWindowResize","resizeObserver","nested","focusableElements","_enabled","_width","_height","preventInteractionOnTransition","userAgent","url","_edgeSwipeDetection","_edgeSwipeThreshold","_freeMode","_autoHeight","setWrapperSize","virtualTranslate","_effect","breakpoints","breakpointsBase","_spaceBetween","_slidesPerView","maxBackfaceHiddenSlides","_grid","_slidesPerGroup","_slidesPerGroupSkip","_slidesPerGroupAuto","_centeredSlides","_centeredSlidesBounds","_slidesOffsetBefore","_slidesOffsetAfter","normalizeSlideIndex","_centerInsufficientSlides","_watchOverflow","roundLengths","touchRatio","touchAngle","simulateTouch","_shortSwipes","_longSwipes","longSwipesRatio","longSwipesMs","_followFinger","allowTouchMove","_threshold","touchMoveStopPropagation","touchStartPreventDefault","touchStartForcePreventDefault","touchReleaseOnEdges","uniqueNavElements","_resistance","_resistanceRatio","_watchSlidesProgress","_grabCursor","preventClicks","preventClicksPropagation","_slideToClickedSlide","_loop","loopAdditionalSlides","loopAddBlankSlides","loopPreventsSliding","_rewind","_allowSlidePrev","_allowSlideNext","_swipeHandler","_noSwiping","noSwipingClass","noSwipingSelector","passiveListeners","containerModifierClass","slideClass","slideActiveClass","slideVisibleClass","slideFullyVisibleClass","slideNextClass","slidePrevClass","slideBlankClass","wrapperClass","lazyPreloaderClass","lazyPreloadPrevNext","runCallbacksOnInit","observer","observeParents","observeSlideChildren","a11y","_autoplay","_controller","coverflowEffect","cubeEffect","fadeEffect","flipEffect","creativeEffect","cardsEffect","hashNavigation","history","keyboard","mousewheel","_navigation","_pagination","parallax","_scrollbar","_thumbs","virtual","zoom","control"];function tc(e){return typeof e=="object"&&e!==null&&e.constructor&&Object.prototype.toString.call(e).slice(8,-1)==="Object"&&!e.__swiper__}function hu(e,t){const r=["__proto__","constructor","prototype"];Object.keys(t).filter(n=>r.indexOf(n)<0).forEach(n=>{typeof e[n]>"u"?e[n]=t[n]:tc(t[n])&&tc(e[n])&&Object.keys(t[n]).length>0?t[n].__swiper__?e[n]=t[n]:hu(e[n],t[n]):e[n]=t[n]})}function LI(e){return e===void 0&&(e={}),e.navigation&&typeof e.navigation.nextEl>"u"&&typeof e.navigation.prevEl>"u"}function II(e){return e===void 0&&(e={}),e.pagination&&typeof e.pagination.el>"u"}function MI(e){return e===void 0&&(e={}),e.scrollbar&&typeof e.scrollbar.el>"u"}function AI(e){e===void 0&&(e="");const t=e.split(" ").map(n=>n.trim()).filter(n=>!!n),r=[];return t.forEach(n=>{r.indexOf(n)<0&&r.push(n)}),r.join(" ")}function yee(e){return e===void 0&&(e=""),e?e.includes("swiper-wrapper")?e:`swiper-wrapper ${e}`:"swiper-wrapper"}function bee(e){let{swiper:t,slides:r,passedParams:n,changedParams:i,nextEl:o,prevEl:s,scrollbarEl:a,paginationEl:l}=e;const c=i.filter(P=>P!=="children"&&P!=="direction"&&P!=="wrapperClass"),{params:u,pagination:d,navigation:f,scrollbar:p,virtual:h,thumbs:v}=t;let k,b,x,g,C,E,j,R;i.includes("thumbs")&&n.thumbs&&n.thumbs.swiper&&u.thumbs&&!u.thumbs.swiper&&(k=!0),i.includes("controller")&&n.controller&&n.controller.control&&u.controller&&!u.controller.control&&(b=!0),i.includes("pagination")&&n.pagination&&(n.pagination.el||l)&&(u.pagination||u.pagination===!1)&&d&&!d.el&&(x=!0),i.includes("scrollbar")&&n.scrollbar&&(n.scrollbar.el||a)&&(u.scrollbar||u.scrollbar===!1)&&p&&!p.el&&(g=!0),i.includes("navigation")&&n.navigation&&(n.navigation.prevEl||s)&&(n.navigation.nextEl||o)&&(u.navigation||u.navigation===!1)&&f&&!f.prevEl&&!f.nextEl&&(C=!0);const O=P=>{t[P]&&(t[P].destroy(),P==="navigation"?(t.isElement&&(t[P].prevEl.remove(),t[P].nextEl.remove()),u[P].prevEl=void 0,u[P].nextEl=void 0,t[P].prevEl=void 0,t[P].nextEl=void 0):(t.isElement&&t[P].el.remove(),u[P].el=void 0,t[P].el=void 0))};i.includes("loop")&&t.isElement&&(u.loop&&!n.loop?E=!0:!u.loop&&n.loop?j=!0:R=!0),c.forEach(P=>{if(tc(u[P])&&tc(n[P]))Object.assign(u[P],n[P]),(P==="navigation"||P==="pagination"||P==="scrollbar")&&"enabled"in n[P]&&!n[P].enabled&&O(P);else{const L=n[P];(L===!0||L===!1)&&(P==="navigation"||P==="pagination"||P==="scrollbar")?L===!1&&O(P):u[P]=n[P]}}),c.includes("controller")&&!b&&t.controller&&t.controller.control&&u.controller&&u.controller.control&&(t.controller.control=u.controller.control),i.includes("children")&&r&&h&&u.virtual.enabled?(h.slides=r,h.update(!0)):i.includes("virtual")&&h&&u.virtual.enabled&&(r&&(h.slides=r),h.update(!0)),i.includes("children")&&r&&u.loop&&(R=!0),k&&v.init()&&v.update(!0),b&&(t.controller.control=u.controller.control),x&&(t.isElement&&(!l||typeof l=="string")&&(l=document.createElement("div"),l.classList.add("swiper-pagination"),l.part.add("pagination"),t.el.appendChild(l)),l&&(u.pagination.el=l),d.init(),d.render(),d.update()),g&&(t.isElement&&(!a||typeof a=="string")&&(a=document.createElement("div"),a.classList.add("swiper-scrollbar"),a.part.add("scrollbar"),t.el.appendChild(a)),a&&(u.scrollbar.el=a),p.init(),p.updateSize(),p.setTranslate()),C&&(t.isElement&&((!o||typeof o=="string")&&(o=document.createElement("div"),o.classList.add("swiper-button-next"),o.innerHTML=t.hostEl.constructor.nextButtonSvg,o.part.add("button-next"),t.el.appendChild(o)),(!s||typeof s=="string")&&(s=document.createElement("div"),s.classList.add("swiper-button-prev"),s.innerHTML=t.hostEl.constructor.prevButtonSvg,s.part.add("button-prev"),t.el.appendChild(s))),o&&(u.navigation.nextEl=o),s&&(u.navigation.prevEl=s),f.init(),f.update()),i.includes("allowSlideNext")&&(t.allowSlideNext=n.allowSlideNext),i.includes("allowSlidePrev")&&(t.allowSlidePrev=n.allowSlidePrev),i.includes("direction")&&t.changeDirection(n.direction,!1),(E||R)&&t.loopDestroy(),(j||R)&&t.loopCreate(),t.update()}function wee(e,t){e===void 0&&(e={}),t===void 0&&(t=!0);const r={on:{}},n={},i={};hu(r,X1),r._emitClasses=!0,r.init=!1;const o={},s=jI.map(l=>l.replace(/_/,"")),a=Object.assign({},e);return Object.keys(a).forEach(l=>{typeof e[l]>"u"||(s.indexOf(l)>=0?tc(e[l])?(r[l]={},i[l]={},hu(r[l],e[l]),hu(i[l],e[l])):(r[l]=e[l],i[l]=e[l]):l.search(/on[A-Z]/)===0&&typeof e[l]=="function"?t?n[`${l[2].toLowerCase()}${l.substr(3)}`]=e[l]:r.on[`${l[2].toLowerCase()}${l.substr(3)}`]=e[l]:o[l]=e[l])}),["navigation","pagination","scrollbar"].forEach(l=>{r[l]===!0&&(r[l]={}),r[l]===!1&&delete r[l]}),{params:r,passedParams:i,rest:o,events:n}}function xee(e,t){let{el:r,nextEl:n,prevEl:i,paginationEl:o,scrollbarEl:s,swiper:a}=e;LI(t)&&n&&i&&(a.params.navigation.nextEl=n,a.originalParams.navigation.nextEl=n,a.params.navigation.prevEl=i,a.originalParams.navigation.prevEl=i),II(t)&&o&&(a.params.pagination.el=o,a.originalParams.pagination.el=o),MI(t)&&s&&(a.params.scrollbar.el=s,a.originalParams.scrollbar.el=s),a.init(r)}function See(e,t,r,n,i){const o=[];if(!t)return o;const s=l=>{o.indexOf(l)<0&&o.push(l)};if(r&&n){const l=n.map(i),c=r.map(i);l.join("")!==c.join("")&&s("children"),n.length!==r.length&&s("children")}return jI.filter(l=>l[0]==="_").map(l=>l.replace(/_/,"")).forEach(l=>{if(l in e&&l in t)if(tc(e[l])&&tc(t[l])){const c=Object.keys(e[l]),u=Object.keys(t[l]);c.length!==u.length?s(l):(c.forEach(d=>{e[l][d]!==t[l][d]&&s(l)}),u.forEach(d=>{e[l][d]!==t[l][d]&&s(l)}))}else e[l]!==t[l]&&s(l)}),o}const Cee=e=>{!e||e.destroyed||!e.params.virtual||e.params.virtual&&!e.params.virtual.enabled||(e.updateSlides(),e.updateProgress(),e.updateSlidesClasses(),e.parallax&&e.params.parallax&&e.params.parallax.enabled&&e.parallax.setTranslate())};function Sg(){return Sg=Object.assign?Object.assign.bind():function(e){for(var t=1;t{NI(r)?t.push(r):r.props&&r.props.children&&DI(r.props.children).forEach(n=>t.push(n))}),t}function _ee(e){const t=[],r={"container-start":[],"container-end":[],"wrapper-start":[],"wrapper-end":[]};return Lt.Children.toArray(e).forEach(n=>{if(NI(n))t.push(n);else if(n.props&&n.props.slot&&r[n.props.slot])r[n.props.slot].push(n);else if(n.props&&n.props.children){const i=DI(n.props.children);i.length>0?i.forEach(o=>t.push(o)):r["container-end"].push(n)}else r["container-end"].push(n)}),{slides:t,slots:r}}function kee(e,t,r){if(!r)return null;const n=u=>{let d=u;return u<0?d=t.length+u:d>=t.length&&(d=d-t.length),d},i=e.isHorizontal()?{[e.rtlTranslate?"right":"left"]:`${r.offset}px`}:{top:`${r.offset}px`},{from:o,to:s}=r,a=e.params.loop?-t.length:0,l=e.params.loop?t.length*2:t.length,c=[];for(let u=a;u=o&&u<=s&&c.push(t[n(u)]);return c.map((u,d)=>Lt.cloneElement(u,{swiper:e,style:i,key:u.props.virtualIndex||u.key||`slide-${d}`}))}function yf(e,t){return typeof window>"u"?_.useEffect(e,t):_.useLayoutEffect(e,t)}const MR=_.createContext(null),Eee=_.createContext(null),Lp=_.forwardRef(function(e,t){let{className:r,tag:n="div",wrapperTag:i="div",children:o,onSwiper:s,...a}=e===void 0?{}:e,l=!1;const[c,u]=_.useState("swiper"),[d,f]=_.useState(null),[p,h]=_.useState(!1),v=_.useRef(!1),k=_.useRef(null),b=_.useRef(null),x=_.useRef(null),g=_.useRef(null),C=_.useRef(null),E=_.useRef(null),j=_.useRef(null),R=_.useRef(null),{params:O,passedParams:P,rest:L,events:A}=wee(a),{slides:$,slots:F}=_ee(o),K=()=>{h(!p)};Object.assign(O.on,{_containerClasses(H,ae){u(ae)}});const Y=()=>{Object.assign(O.on,A),l=!0;const H={...O};if(delete H.wrapperClass,b.current=new jS(H),b.current.virtual&&b.current.params.virtual.enabled){b.current.virtual.slides=$;const ae={cache:!1,slides:$,renderExternal:f,renderExternalUpdate:!1};hu(b.current.params.virtual,ae),hu(b.current.originalParams.virtual,ae)}};k.current||Y(),b.current&&b.current.on("_beforeBreakpoint",K);const Z=()=>{l||!A||!b.current||Object.keys(A).forEach(H=>{b.current.on(H,A[H])})},le=()=>{!A||!b.current||Object.keys(A).forEach(H=>{b.current.off(H,A[H])})};_.useEffect(()=>()=>{b.current&&b.current.off("_beforeBreakpoint",K)}),_.useEffect(()=>{!v.current&&b.current&&(b.current.emitSlidesClasses(),v.current=!0)}),yf(()=>{if(t&&(t.current=k.current),!!k.current)return b.current.destroyed&&Y(),xee({el:k.current,nextEl:C.current,prevEl:E.current,paginationEl:j.current,scrollbarEl:R.current,swiper:b.current},O),s&&!b.current.destroyed&&s(b.current),()=>{b.current&&!b.current.destroyed&&b.current.destroy(!0,!1)}},[]),yf(()=>{Z();const H=See(P,x.current,$,g.current,ae=>ae.key);return x.current=P,g.current=$,H.length&&b.current&&!b.current.destroyed&&bee({swiper:b.current,slides:$,passedParams:P,changedParams:H,nextEl:C.current,prevEl:E.current,scrollbarEl:R.current,paginationEl:j.current}),()=>{le()}}),yf(()=>{Cee(b.current)},[d]);function V(){return O.virtual?kee(b.current,$,d):$.map((H,ae)=>Lt.cloneElement(H,{swiper:b.current,swiperSlideIndex:ae}))}return Lt.createElement(n,Sg({ref:k,className:AI(`${c}${r?` ${r}`:""}`)},L),Lt.createElement(Eee.Provider,{value:b.current},F["container-start"],Lt.createElement(i,{className:yee(O.wrapperClass)},F["wrapper-start"],V(),F["wrapper-end"]),LI(O)&&Lt.createElement(Lt.Fragment,null,Lt.createElement("div",{ref:E,className:"swiper-button-prev"}),Lt.createElement("div",{ref:C,className:"swiper-button-next"})),MI(O)&&Lt.createElement("div",{ref:R,className:"swiper-scrollbar"}),II(O)&&Lt.createElement("div",{ref:j,className:"swiper-pagination"}),F["container-end"]))});Lp.displayName="Swiper";const Uu=_.forwardRef(function(e,t){let{tag:r="div",children:n,className:i="",swiper:o,zoom:s,lazy:a,virtualIndex:l,swiperSlideIndex:c,...u}=e===void 0?{}:e;const d=_.useRef(null),[f,p]=_.useState("swiper-slide"),[h,v]=_.useState(!1);function k(C,E,j){E===d.current&&p(j)}yf(()=>{if(typeof c<"u"&&(d.current.swiperSlideIndex=c),t&&(t.current=d.current),!(!d.current||!o)){if(o.destroyed){f!=="swiper-slide"&&p("swiper-slide");return}return o.on("_slideClass",k),()=>{o&&o.off("_slideClass",k)}}}),yf(()=>{o&&d.current&&!o.destroyed&&p(o.getSlideClasses(d.current))},[o]);const b={isActive:f.indexOf("swiper-slide-active")>=0,isVisible:f.indexOf("swiper-slide-visible")>=0,isPrev:f.indexOf("swiper-slide-prev")>=0,isNext:f.indexOf("swiper-slide-next")>=0},x=()=>typeof n=="function"?n(b):n,g=()=>{v(!0)};return Lt.createElement(r,Sg({ref:d,className:AI(`${f}${i?` ${i}`:""}`),"data-swiper-slide-index":l,onLoad:g},u),s&&Lt.createElement(MR.Provider,{value:b},Lt.createElement("div",{className:"swiper-zoom-container","data-swiper-zoom":typeof s=="number"?s:void 0},x(),a&&!h&&Lt.createElement("div",{className:"swiper-lazy-preloader"}))),!s&&Lt.createElement(MR.Provider,{value:b},x(),a&&!h&&Lt.createElement("div",{className:"swiper-lazy-preloader"})))});Uu.displayName="SwiperSlide";const Ree=({guild:e})=>{const t=_.useRef(null),[r,n]=_.useState(1);_.useLayoutEffect(()=>(i(),window.addEventListener("resize",i),()=>window.removeEventListener("resize",i)));const i=_.useCallback(()=>{if(!t.current)return;const{width:o,height:s}=t.current.getBoundingClientRect(),a=o/1e3,l=s/700,c=Math.min(a,l,1);n(c??1)},[]);return y.jsx("div",{ref:t,style:{width:"100%",maxWidth:"1000px",height:"100%",maxHeight:"700px",display:"flex",alignItems:"center",justifyContent:"center"},children:y.jsxs("div",{style:{width:`${1e3*r}px`,height:`${700*r}px`,display:"flex",flexDirection:"row"},children:[y.jsx("div",{className:"card-front",style:{backgroundImage:`url(${cr.get(`${e}_front`)})`,"--scale":r,borderTopRightRadius:0,borderBottomRightRadius:0}}),y.jsx("div",{className:"card-back",style:{backgroundImage:`url(${cr.get(`${e}_back`)})`,"--scale":r,borderTopLeftRadius:0,borderBottomLeftRadius:0}})]})})};function BI({guild:e}){const t=_.useRef(null),r=_.useRef(null),[n,i]=_.useState(1);_.useLayoutEffect(()=>(o(),window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)));const o=_.useCallback(()=>{if(!t.current)return;const{width:s,height:a}=t.current.getBoundingClientRect(),l=s/500,c=a/700,u=Math.min(l,c,1);i(u??1)},[]);return y.jsx("div",{ref:t,style:{width:"100%",maxWidth:"500px",height:"100%",maxHeight:"700px",display:"flex",alignItems:"center",justifyContent:"center"},children:y.jsx("div",{ref:r,className:"flip-card",onClick:()=>{var s;(s=r.current)==null||s.classList.toggle("flipped")},children:y.jsxs("div",{className:"flip-card-inner",children:[y.jsx("div",{className:"flip-card-front",children:y.jsx("div",{className:"card-front",style:{backgroundImage:`url(${cr.get(`${e}_front`)})`,"--scale":n}})}),y.jsx("div",{className:"flip-card-back",children:y.jsx("div",{className:"card-back",style:{backgroundImage:`url(${cr.get(`${e}_back`)})`,"--scale":n}})})]})})})}function Pee(){const[e,t]=_.useState(!1),[r,n]=_.useState(!1),i=UD(_.useCallback(s=>s.nextLocation.pathname.startsWith("/game")?(t(!0),!0):!1,[t]));_.useEffect(()=>{n(!0)},[r,n]);const{active:o}=ra();return y.jsxs(tr,{style:{width:"100%",height:"100%",display:"flex",flexDirection:"row"},children:[y.jsx(ps,{children:y.jsxs(tr,{sx:{width:"100%",display:"flex",flexDirection:"row",justifyContent:"space-between"},children:[y.jsxs(Za,{separator:y.jsx(lc,{fontSize:"small"}),children:[y.jsx(Io,{color:"inherit",href:"/game",size:"small",disabled:o,children:y.jsx(wS,{})}),o?y.jsx(_t,{children:"Draft"}):y.jsx(xo,{underline:"hover",color:"inherit",href:"/game/draft",children:"Draft"}),y.jsx(_t,{children:"Play"})]}),y.jsx(SS,{})]})}),y.jsx(Tee,{}),y.jsx(nG,{open:e,onClose:()=>t(!1),autoHideDuration:5e3,children:y.jsx(D6,{severity:"warning",action:y.jsx(br,{size:"small",onClick:i.proceed,children:"Exit Game"}),children:"Making changes to the team selections will reset the game state."})})]})}function Tee(){const e=qn(),t=hx(e.breakpoints.up("sm")),{active:r}=ra(),{gameState1$:n,gameState2$:i}=ey(),[o,s]=_.useState();_.useEffect(()=>{if(!n)return;let d=!1;return(async()=>{const p=await Gr(n);d||s(p)})(),()=>{d=!0}},[n]);const[a,l]=_.useState();_.useEffect(()=>{if(!i)return;let d=!1;return(async()=>{const p=await Gr(i);d||l(p)})(),()=>{d=!0}},[i]);const[c,u]=fo(async d=>{if(!o||!a)return;const f=await d.models.find().where("id").in(o.roster.map(k=>k.name)).exec(),p=await Promise.all(f.map(k=>k.expand()));Ys(p,"id",o.roster.map(k=>k.name));const h=await d.models.find().where("id").in(a.roster.map(k=>k.name)).exec(),v=await Promise.all(h.map(k=>k.expand()));return Ys(v,"id",a.roster.map(k=>k.name)),[p,v]},[o,a])??[];return!o||!a||!c||!u?null:t?y.jsxs(y.Fragment,{children:[y.jsx(X0,{teams:[o],rosters:[c],disabled:[!1]}),y.jsx(Zi,{orientation:"vertical"}),y.jsx(X0,{teams:[a],rosters:[u],disabled:[!!r]})]}):y.jsx(X0,{teams:[o,a],rosters:[c,u],disabled:[!1,!!r]})}const X0=({teams:e,rosters:t,disabled:r})=>{const n=qn(),i=hx(n.breakpoints.up("sm")),o=_.useRef(null),[s,a]=_.useState(!1),[l,c]=_.useState(0),[u,d]=_.useState(!0),[f,p]=_.useState(500),[h,v]=_.useState(700),[k,b]=_.useState(700);_.useLayoutEffect(()=>(x(),window.addEventListener("resize",x),()=>window.removeEventListener("resize",x)));const x=_.useCallback(()=>{var j,R;const g=((j=o.current)==null?void 0:j.getBoundingClientRect().width)??0,C=((R=o.current)==null?void 0:R.getBoundingClientRect().height)??0,E=i?56:112;p(Math.min(g-12,(C-E)*5/7-12)),v(Math.min(C-E-12,g*7/5-12)),b(C-E)},[i]);return y.jsxs("div",{ref:o,style:{width:"100%",display:"flex",flexDirection:"column"},children:[y.jsx(AJ,{disabled:r,teams:e,rosters:t,expanded:u,onClick:(g,C)=>{c(g),d(C),a(!C)}}),y.jsx("div",{style:{position:"relative",overflow:"hidden",flexGrow:1},children:y.jsx(wv,{disablePortal:!0,sx:{zIndex:1100},open:s,onClose:()=>{a(!1),d(!0)},componentsProps:{root:{style:{position:"absolute",display:"flex",alignItems:"center",justifyContent:"center"}},backdrop:{style:{position:"absolute"}}},children:y.jsx(Lp,{initialSlide:l,direction:"vertical",centeredSlides:!0,spaceBetween:(k-Math.min(h,500))/2,onInit:g=>{g.el.style.width=`${Math.min(f,500)}px`,g.el.style.height=`${Math.min(h,700)}px`},style:{overflow:"visible"},children:e.map((g,C)=>[()=>y.jsx(BI,{guild:g.guild}),t[C].map((E,j)=>()=>y.jsx(_I,{model:E,health$:g.get$("roster").pipe(qt(R=>R[j].health)),children:y.jsx(Oee,{model:E,state:e[C],disabled:r[C]})}))]).flat(2).map((g,C)=>y.jsx(Uu,{children:y.jsx("div",{style:{height:"100%",display:"flex",flexDirection:"column",justifyContent:"center"},children:g==null?void 0:g()})},C))})})})]})};function Oee({state:e,model:t,disabled:r=!1}){return y.jsx(us,{elevation:2,sx:{position:"absolute",right:0,bottom:0},children:y.jsx(SI,{state:e,model:t,disabled:r,stacked:!0})})}function jee(){const e=Zs(),{setting$:t}=di(),[r,n]=_.useState(null);_.useEffect(()=>{t&&Gr(t).then(p=>p==null?void 0:p.incrementalPatch({gamePlayRoute:`${e.pathname}${e.search}`})).catch(console.error)},[e,t]);const{gbdb:i}=Qn(),{active:o,netDoc:s}=ra(),a=o?s==null?void 0:s.get("uid"):"Player1",l=o?s==null?void 0:s.get("oid"):"Player2",[c,u]=_.useState();_.useEffect(()=>{const p=i==null?void 0:i.game_state.findOne(a).$;if(u(p),!p)return;let h=!1;return(async()=>{if(h)return;await Gr(p)===null&&await(i==null?void 0:i.game_state.upsert({_id:a,roster:[]}))})().catch(console.error),()=>{h=!0}},[i,a]);const[d,f]=_.useState();return _.useEffect(()=>{const p=i==null?void 0:i.game_state.findOne(l).$;if(f(p),!p)return;let h=!1;return(async()=>{if(h)return;await Gr(p)===null&&!o&&await(i==null?void 0:i.game_state.upsert({_id:l,roster:[]}))})().catch(console.error),()=>{h=!0}},[i,l,o]),y.jsxs("main",{style:{width:"100%",height:"100%",overflow:"auto",display:"flex"},children:[y.jsxs(ps,{children:[y.jsx(tr,{ref:p=>n(p),sx:{width:"100%",display:"flex",flexDirection:"row"}}),y.jsx(nQ,{})]}),y.jsx(bS.Provider,{value:r,children:y.jsx(Jw,{context:{gameState1$:c,gameState2$:d}})})]})}function Lee({model:e}){const{setting$:t}=di(),r=_.useRef(null),[n,i]=_.useState(1),[o,s]=_.useState();_.useEffect(()=>{const d=t==null?void 0:t.pipe(qt(f=>f==null?void 0:f.toJSON().data.cardPreferences.preferredStyle)).subscribe(f=>s(f));return()=>d==null?void 0:d.unsubscribe()},[t]),_.useLayoutEffect(()=>(a(),window.addEventListener("resize",a),()=>window.removeEventListener("resize",a)));const a=_.useCallback(()=>{if(!r.current)return;const{width:d,height:f}=r.current.getBoundingClientRect(),p=d/1e3,h=f/700,v=Math.min(p,h,1);i(v??1)},[]),l=e.id,u=o==="gbcp"&&(cr.has(`${l}_gbcp_front`)||cr.has(`${l}_full`))?cr.get(`${l}_full`)??void 0:void 0;return y.jsx("div",{ref:r,style:{width:"100%",maxWidth:"1000px",height:"100%",maxHeight:"700px",display:"flex",alignItems:"center",justifyContent:"center"},children:y.jsxs("div",{style:{width:`${1e3*n}px`,height:`${700*n}px`,display:"flex",flexDirection:"row",...u?{backgroundImage:`url(${u})`,backgroundSize:"100%",backgroundRepeat:"no-repeat",backgroundPosition:"center center",borderRadius:`${25*n}px`}:{}},children:[y.jsx(yg,{model:e,noBackground:!!u,style:{"--scale":n,borderTopRightRadius:0,borderBottomRightRadius:0}}),y.jsx(bg,{model:e,noBackground:!!u,style:{"--scale":n,borderTopLeftRadius:0,borderBottomLeftRadius:0}})]})})}const Iee="/assets/GB-S4-Reference-1-Cx3eC7d4.png",Mee="/assets/GB-S4-Reference-2-CJ4YgyH9.png",Aee="/assets/GB-S4-Reference-3-BTbZpB51.png",Nee="/assets/GB-S4-Reference-4-CpP58Tap.png",Dee="/assets/GB-S4-Reference-5-Be8xjsp1.png",Bee=new URL("/assets/GB-S4-Gameplans-2019-Dp99TQ1B.png",import.meta.url).href,$I=e=>{const t=e.gameplan,r=new Intl.NumberFormat("en-US",{signDisplay:"always"});return y.jsx("div",{className:`card-front ${e.bleed?"bleed":null}`,style:{width:"100%",height:"100%",backgroundImage:`url(${Bee})`,...e.style},children:y.jsxs("div",{className:"overlay",children:[y.jsx("div",{style:{height:"255px",flexShrink:0}}),y.jsxs("div",{style:{height:"100%",display:"flex",flexDirection:"column",alignItems:"center",fontFamily:"Crimson Text",letterSpacing:"-1px"},children:[y.jsx("div",{style:{fontFamily:"IM Fell Great Primer SC",fontSize:"33.33pt",display:"flex",flexDirection:"column",alignItems:"center",lineHeight:"0.8em",margin:"0.25em 0"},children:t.title.split(/\n/).map((n,i)=>y.jsx("span",{children:n.split(/(?=[A-Z])/).map((o,s)=>y.jsx("span",{className:new RegExp("^\\p{Lu}","u").test(o)?"dropcap":"",children:y.jsx("span",{children:o},`p${i}s${s}c`)},`p${i}s${s}`))},`l${i}`))}),y.jsxs("div",{style:{fontSize:"20pt",margin:"0 1em",whiteSpace:"pre-wrap",display:"flex",flexDirection:"column",alignItems:"center"},children:[t.text,y.jsx("p",{style:{fontStyle:"italic",margin:"0.5em 0"},children:t.detail})]}),y.jsx("div",{style:{fontSize:"35pt",position:"absolute",bottom:40,left:40,width:"80px",height:"80px",borderRadius:"40px",boxSizing:"border-box",display:"flex",alignItems:"center",justifyContent:"center"},children:r.format(t.initiative)}),y.jsx("div",{style:{fontSize:"35pt",position:"absolute",bottom:40,right:40,width:"80px",height:"80px",borderRadius:"40px",boxSizing:"border-box",display:"flex",alignItems:"center",justifyContent:"center"},children:r.format(t.influence)}),y.jsx("div",{style:{fontFamily:"serif",fontSize:"10pt",position:"absolute",bottom:"2em",letterSpacing:0,wordSpacing:0},children:"™ & © Steamforged Games LTD 2019"})]})]})})},FI=e=>{const t=_.useRef(null),[r,n]=_.useState(1);_.useLayoutEffect(()=>(i(),window.addEventListener("resize",i),()=>window.removeEventListener("resize",i)));const i=_.useCallback(()=>{if(!t.current)return;const{width:o,height:s}=t.current.getBoundingClientRect(),a=o/500,l=s/700,c=Math.min(a,l,1);n(c??1)},[]);return y.jsx("div",{ref:t,style:{width:"100%",maxWidth:"500px",height:"100%",maxHeight:"700px",padding:0,margin:0},children:y.jsx("div",{style:{width:`${500*r}px`,height:`${700*r}px`,display:"flex","--scale":r},children:e.children})})},$ee=e=>y.jsx(FI,{children:y.jsx($I,{...e})}),zI=e=>{const t=new URL(Object.assign({"../assets/cards/Reference/GB-S4-Reference-1.png":Iee,"../assets/cards/Reference/GB-S4-Reference-2.png":Mee,"../assets/cards/Reference/GB-S4-Reference-3.png":Aee,"../assets/cards/Reference/GB-S4-Reference-4.png":Nee,"../assets/cards/Reference/GB-S4-Reference-5.png":Dee})[`../assets/cards/Reference/GB-S4-Reference-${e.index}.png`],import.meta.url).href;return y.jsx("div",{className:`card-front ${e.bleed?"bleed":null}`,style:{width:"100%",height:"100%",backgroundImage:`url(${t})`,...e.style}})},Fee=e=>y.jsx(FI,{children:y.jsx(zI,{...e})});function zee(){const e=Zs(),{setting$:t}=di(),[r]=mB(),n=_.useRef(r.get("m"));return _.useEffect(()=>{if(t)return Gr(t).then(i=>i==null?void 0:i.incrementalPatch({libraryRoute:`${e.pathname}?m=${n.current}`})).catch(console.error),()=>{Gr(t).then(i=>i==null?void 0:i.incrementalPatch({libraryRoute:`${e.pathname}?m=${n.current}`})).catch(console.error)}},[e,t]),y.jsx("main",{style:{display:"flex",flexDirection:"column-reverse",width:"100%",height:"100%"},children:y.jsx(_.Suspense,{fallback:y.jsx("p",{children:"Loading ..."}),children:y.jsx(Jw,{context:{slideRef:n}})})})}function Uee(){const{slideRef:e}=pp();return e.current=0,y.jsxs(y.Fragment,{children:[y.jsx(ps,{children:y.jsx(Za,{separator:y.jsx(lc,{fontSize:"small"}),children:y.jsx(_t,{children:"Library"})})}),y.jsx(nI,{Controller:Gee}),y.jsx(cc,{})]})}function Gee(e){const t=Ya();return _.useEffect(()=>{const r=e.update$.subscribe(n=>t(n));return()=>r.unsubscribe()},[t,e.update$]),y.jsxs("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-evenly",margin:"5px"},children:[y.jsx(G1,{g:{key:"gameplans",name:"gameplans",icon:"GB",style:{color:"#f8f7f4"}},pickTeam:()=>t("gameplans"),size:e.size}),y.jsx(G1,{g:{key:"refcards",name:"Rules",icon:"GB",style:{color:"#f8f7f4"}},pickTeam:()=>t("refcards"),size:e.size})]})}function Wee(){const{guild:e}=LD(),t=qn(),r=hx(t.breakpoints.up("sm")),n=_.useRef(null),[i,o]=_.useState(r?1e3:500),[s,a]=_.useState(700),l=_.useCallback(()=>{var b,x;const v=((b=n.current)==null?void 0:b.getBoundingClientRect().width)??0,k=((x=n.current)==null?void 0:x.getBoundingClientRect().height)??0;o(Math.min(v,k*(r?10:5)/7)-12),a(Math.min(k,v*7/5)-12)},[r]);_.useLayoutEffect(()=>(l(),window.addEventListener("resize",l),()=>window.removeEventListener("resize",l)));const[c,u]=_.useState(null),d=Ya(),{slideRef:f}=pp(),[p,h]=fo(async v=>{const[k,b]=await Promise.all([v.guilds.findOne().where({name:e}).exec(),v.models.find().or([{guild1:e},{guild2:e}]).exec()]);if(!k||!b.length){d("/library");return}Ys(b,"id",k.roster);const x=await Promise.all(b.map(g=>g.expand()));return[k,x]},[e,d])??[];return!p||!h?null:y.jsxs(y.Fragment,{children:[y.jsx(ps,{children:y.jsxs(Za,{separator:y.jsx(lc,{fontSize:"small"}),children:[y.jsx(xo,{underline:"hover",color:"inherit",href:"/library",children:"Library"}),y.jsx(_t,{children:p.name})]})}),y.jsx(Kee,{guild:p,swiper:c}),y.jsxs(tr,{ref:n,sx:{height:"100%",position:"relative",display:"flex",alignItems:"center"},children:[y.jsxs(Lp,{onSwiper:u,initialSlide:f.current,onSlideChange:v=>{f.current=v.activeIndex},slidesPerView:"auto",centeredSlides:!0,spaceBetween:.25*96,style:{height:s},children:[y.jsx(Uu,{style:{width:i,display:"flex",alignItems:"center",justifyContent:"center"},children:y.jsx("div",{style:{height:s,width:i,display:"flex",alignItems:"center",justifyContent:"center"},children:r?y.jsx(Ree,{guild:p.name}):y.jsx(BI,{guild:p.name})})},p.name),h.map(v=>y.jsx(Uu,{style:{width:i,display:"flex",alignItems:"center",justifyContent:"center"},children:y.jsx("div",{style:{height:s,width:i,display:"flex",alignItems:"center",justifyContent:"center"},children:r?y.jsx(Lee,{model:v}):y.jsx(_I,{model:v})})},v.id))]}),y.jsx(cc,{})]})]})}function Hee(){const t=_.useRef(null),[r,n]=_.useState(500),[i,o]=_.useState(700),s=_.useCallback(()=>{var p,h;const d=((p=t.current)==null?void 0:p.getBoundingClientRect().width)??0,f=((h=t.current)==null?void 0:h.getBoundingClientRect().height)??0;n(Math.min(d,f*5/7)-12),o(Math.min(f,d*7/5)-12)},[!1]);_.useLayoutEffect(()=>(s(),window.addEventListener("resize",s),()=>window.removeEventListener("resize",s)));const[a,l]=_.useState(null),{slideRef:c}=pp(),{gameplans:u}=Qn();return u?y.jsxs(y.Fragment,{children:[y.jsx(ps,{children:y.jsxs(Za,{separator:y.jsx(lc,{fontSize:"small"}),children:[y.jsx(xo,{underline:"hover",color:"inherit",href:"/library",children:"Library"}),y.jsx(_t,{children:"Gameplan Cards"})]})}),y.jsx(qee,{swiper:a}),y.jsxs(tr,{ref:t,sx:{height:"100%",position:"relative",display:"flex",alignItems:"center"},children:[y.jsx(Lp,{onSwiper:l,initialSlide:c.current,onSlideChange:d=>{c.current=d.activeIndex},slidesPerView:"auto",centeredSlides:!0,spaceBetween:.25*96,style:{height:i},children:u.map((d,f)=>y.jsx(Uu,{style:{width:r,display:"flex",alignItems:"center",justifyContent:"center"},children:y.jsx("div",{style:{height:i,width:r,display:"flex",alignItems:"center",justifyContent:"center"},children:y.jsx($ee,{gameplan:d})})},`gameplan-${f}`))}),y.jsx(cc,{})]})]}):null}function Vee(){const t=_.useRef(null),[r,n]=_.useState(500),[i,o]=_.useState(700),s=_.useCallback(()=>{var f,p;const u=((f=t.current)==null?void 0:f.getBoundingClientRect().width)??0,d=((p=t.current)==null?void 0:p.getBoundingClientRect().height)??0;n(Math.min(u,d*5/7)-12),o(Math.min(d,u*7/5)-12)},[!1]);_.useLayoutEffect(()=>(s(),window.addEventListener("resize",s),()=>window.removeEventListener("resize",s)));const[a,l]=_.useState(null),{slideRef:c}=pp();return y.jsxs(y.Fragment,{children:[y.jsx(ps,{children:y.jsxs(Za,{separator:y.jsx(lc,{fontSize:"small"}),children:[y.jsx(xo,{underline:"hover",color:"inherit",href:"/library",children:"Library"}),y.jsx(_t,{children:"Rules Reference Cards"})]})}),y.jsx(Yee,{swiper:a}),y.jsxs(tr,{ref:t,sx:{height:"100%",position:"relative",display:"flex",alignItems:"center"},children:[y.jsx(Lp,{onSwiper:l,initialSlide:c.current,onSlideChange:u=>{c.current=u.activeIndex},slidesPerView:"auto",centeredSlides:!0,spaceBetween:.25*96,style:{height:i},children:[...Array(5).keys()].map(u=>u+1).map(u=>y.jsx(Uu,{style:{width:r,display:"flex",alignItems:"center",justifyContent:"center"},children:y.jsx("div",{style:{height:i,width:r,display:"flex",alignItems:"center",justifyContent:"center"},children:y.jsx(Fee,{index:u})})},`ref-${u}`))}),y.jsx(cc,{})]})]})}function Kee(e){const{guild:t,swiper:r}=e,n=t.roster;return y.jsxs("div",{style:{display:"flex",flexDirection:"row"},children:[y.jsx("div",{style:{flex:"1 1"}}),y.jsxs(tr,{sx:{display:"flex",flex:"1 1 500px",flexWrap:"wrap",justifyContent:"center",gap:"5px"},children:[y.jsx(Io,{sx:{padding:0},onClick:()=>{r==null||r.slideTo(0)},children:y.jsx("span",{children:y.jsx("div",{style:{width:"32px",height:"32px",backgroundColor:"black",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",overflow:"visible"},children:y.jsx(Ai,{icon:t.name,className:"dark",fontSize:"32px",style:{flexShrink:0}})})})}),n.map((i,o)=>y.jsx(Mx,{color:"primary",label:i,onClick:()=>{r==null||r.slideTo(o+1)}},o))]}),y.jsx("div",{style:{flex:"1 1"}})]})}function qee(e){const{gameplans:t}=Qn(),{swiper:r}=e;return t?y.jsxs("div",{style:{display:"flex",flexDirection:"row"},children:[y.jsx("div",{style:{flex:"1 1"}}),y.jsx(tr,{sx:{display:"flex",flex:"1 1 500px",flexWrap:"wrap",justifyContent:"center",gap:"5px"},children:t.map((n,i)=>y.jsx(Mx,{color:"primary",label:n.title,onClick:()=>{r==null||r.slideTo(i)}},i))}),y.jsx("div",{style:{flex:"1 1"}})]}):null}function Yee(e){const{gameplans:t}=Qn(),{swiper:r}=e;return t?y.jsxs("div",{style:{display:"flex",flexDirection:"row"},children:[y.jsx("div",{style:{flex:"1 1"}}),y.jsx(tr,{sx:{display:"flex",flex:"1 1 500px",flexWrap:"wrap",justifyContent:"center",gap:"5px"},children:["Playbook Results","Turn Sequence","Conditions","Spending Momentum","Actions"].map((n,i)=>y.jsx(Mx,{color:"primary",label:n,onClick:()=>{r==null||r.slideTo(i)}},i))}),y.jsx("div",{style:{flex:"1 1"}})]}):null}const Qee={aa:{name:"Afar",nativeName:"Afaraf"},ab:{name:"Abkhaz",nativeName:"аҧсуа бызшәа"},ae:{name:"Avestan",nativeName:"avesta"},af:{name:"Afrikaans",nativeName:"Afrikaans"},ak:{name:"Akan",nativeName:"Akan"},am:{name:"Amharic",nativeName:"አማርኛ"},an:{name:"Aragonese",nativeName:"aragonés"},ar:{name:"Arabic",nativeName:"العربية"},as:{name:"Assamese",nativeName:"অসমীয়া"},av:{name:"Avaric",nativeName:"авар мацӀ"},ay:{name:"Aymara",nativeName:"aymar aru"},az:{name:"Azerbaijani",nativeName:"azərbaycan dili"},ba:{name:"Bashkir",nativeName:"башҡорт теле"},be:{name:"Belarusian",nativeName:"беларуская мова"},bg:{name:"Bulgarian",nativeName:"български език"},bi:{name:"Bislama",nativeName:"Bislama"},bm:{name:"Bambara",nativeName:"bamanankan"},bn:{name:"Bengali",nativeName:"বাংলা"},bo:{name:"Tibetan",nativeName:"བོད་ཡིག"},br:{name:"Breton",nativeName:"brezhoneg"},bs:{name:"Bosnian",nativeName:"bosanski jezik"},ca:{name:"Catalan",nativeName:"Català"},ce:{name:"Chechen",nativeName:"нохчийн мотт"},ch:{name:"Chamorro",nativeName:"Chamoru"},co:{name:"Corsican",nativeName:"corsu"},cr:{name:"Cree",nativeName:"ᓀᐦᐃᔭᐍᐏᐣ"},cs:{name:"Czech",nativeName:"čeština"},cu:{name:"Old Church Slavonic",nativeName:"ѩзыкъ словѣньскъ"},cv:{name:"Chuvash",nativeName:"чӑваш чӗлхи"},cy:{name:"Welsh",nativeName:"Cymraeg"},da:{name:"Danish",nativeName:"Dansk"},de:{name:"German",nativeName:"Deutsch"},dv:{name:"Divehi",nativeName:"ދިވެހި"},dz:{name:"Dzongkha",nativeName:"རྫོང་ཁ"},ee:{name:"Ewe",nativeName:"Eʋegbe"},el:{name:"Greek",nativeName:"Ελληνικά"},en:{name:"English",nativeName:"English"},eo:{name:"Esperanto",nativeName:"Esperanto"},es:{name:"Spanish",nativeName:"Español"},et:{name:"Estonian",nativeName:"eesti"},eu:{name:"Basque",nativeName:"euskara"},fa:{name:"Persian",nativeName:"فارسی"},ff:{name:"Fula",nativeName:"Fulfulde"},fi:{name:"Finnish",nativeName:"suomi"},fj:{name:"Fijian",nativeName:"vosa Vakaviti"},fo:{name:"Faroese",nativeName:"Føroyskt"},fr:{name:"French",nativeName:"Français"},fy:{name:"Western Frisian",nativeName:"Frysk"},ga:{name:"Irish",nativeName:"Gaeilge"},gd:{name:"Scottish Gaelic",nativeName:"Gàidhlig"},gl:{name:"Galician",nativeName:"galego"},gn:{name:"Guaraní",nativeName:"Avañe'ẽ"},gu:{name:"Gujarati",nativeName:"ગુજરાતી"},gv:{name:"Manx",nativeName:"Gaelg"},ha:{name:"Hausa",nativeName:"هَوُسَ"},he:{name:"Hebrew",nativeName:"עברית"},hi:{name:"Hindi",nativeName:"हिन्दी"},ho:{name:"Hiri Motu",nativeName:"Hiri Motu"},hr:{name:"Croatian",nativeName:"Hrvatski"},ht:{name:"Haitian",nativeName:"Kreyòl ayisyen"},hu:{name:"Hungarian",nativeName:"magyar"},hy:{name:"Armenian",nativeName:"Հայերեն"},hz:{name:"Herero",nativeName:"Otjiherero"},ia:{name:"Interlingua",nativeName:"Interlingua"},id:{name:"Indonesian",nativeName:"Bahasa Indonesia"},ie:{name:"Interlingue",nativeName:"Interlingue"},ig:{name:"Igbo",nativeName:"Asụsụ Igbo"},ii:{name:"Nuosu",nativeName:"ꆈꌠ꒿ Nuosuhxop"},ik:{name:"Inupiaq",nativeName:"Iñupiaq"},io:{name:"Ido",nativeName:"Ido"},is:{name:"Icelandic",nativeName:"Íslenska"},it:{name:"Italian",nativeName:"Italiano"},iu:{name:"Inuktitut",nativeName:"ᐃᓄᒃᑎᑐᑦ"},ja:{name:"Japanese",nativeName:"日本語"},jv:{name:"Javanese",nativeName:"basa Jawa"},ka:{name:"Georgian",nativeName:"ქართული"},kg:{name:"Kongo",nativeName:"Kikongo"},ki:{name:"Kikuyu",nativeName:"Gĩkũyũ"},kj:{name:"Kwanyama",nativeName:"Kuanyama"},kk:{name:"Kazakh",nativeName:"қазақ тілі"},kl:{name:"Kalaallisut",nativeName:"kalaallisut"},km:{name:"Khmer",nativeName:"ខេមរភាសា"},kn:{name:"Kannada",nativeName:"ಕನ್ನಡ"},ko:{name:"Korean",nativeName:"한국어"},kr:{name:"Kanuri",nativeName:"Kanuri"},ks:{name:"Kashmiri",nativeName:"कश्मीरी"},ku:{name:"Kurdish",nativeName:"Kurdî"},kv:{name:"Komi",nativeName:"коми кыв"},kw:{name:"Cornish",nativeName:"Kernewek"},ky:{name:"Kyrgyz",nativeName:"Кыргызча"},la:{name:"Latin",nativeName:"latine"},lb:{name:"Luxembourgish",nativeName:"Lëtzebuergesch"},lg:{name:"Ganda",nativeName:"Luganda"},li:{name:"Limburgish",nativeName:"Limburgs"},ln:{name:"Lingala",nativeName:"Lingála"},lo:{name:"Lao",nativeName:"ພາສາລາວ"},lt:{name:"Lithuanian",nativeName:"lietuvių kalba"},lu:{name:"Luba-Katanga",nativeName:"Kiluba"},lv:{name:"Latvian",nativeName:"latviešu valoda"},mg:{name:"Malagasy",nativeName:"fiteny malagasy"},mh:{name:"Marshallese",nativeName:"Kajin M̧ajeļ"},mi:{name:"Māori",nativeName:"te reo Māori"},mk:{name:"Macedonian",nativeName:"македонски јазик"},ml:{name:"Malayalam",nativeName:"മലയാളം"},mn:{name:"Mongolian",nativeName:"Монгол хэл"},mr:{name:"Marathi",nativeName:"मराठी"},ms:{name:"Malay",nativeName:"Bahasa Melayu"},mt:{name:"Maltese",nativeName:"Malti"},my:{name:"Burmese",nativeName:"ဗမာစာ"},na:{name:"Nauru",nativeName:"Dorerin Naoero"},nb:{name:"Norwegian Bokmål",nativeName:"Norsk bokmål"},nd:{name:"Northern Ndebele",nativeName:"isiNdebele"},ne:{name:"Nepali",nativeName:"नेपाली"},ng:{name:"Ndonga",nativeName:"Owambo"},nl:{name:"Dutch",nativeName:"Nederlands"},nn:{name:"Norwegian Nynorsk",nativeName:"Norsk nynorsk"},no:{name:"Norwegian",nativeName:"Norsk"},nr:{name:"Southern Ndebele",nativeName:"isiNdebele"},nv:{name:"Navajo",nativeName:"Diné bizaad"},ny:{name:"Chichewa",nativeName:"chiCheŵa"},oc:{name:"Occitan",nativeName:"occitan"},oj:{name:"Ojibwe",nativeName:"ᐊᓂᔑᓈᐯᒧᐎᓐ"},om:{name:"Oromo",nativeName:"Afaan Oromoo"},or:{name:"Oriya",nativeName:"ଓଡ଼ିଆ"},os:{name:"Ossetian",nativeName:"ирон æвзаг"},pa:{name:"Panjabi",nativeName:"ਪੰਜਾਬੀ"},pi:{name:"Pāli",nativeName:"पाऴि"},pl:{name:"Polish",nativeName:"Polski"},ps:{name:"Pashto",nativeName:"پښتو"},pt:{name:"Portuguese",nativeName:"Português"},qu:{name:"Quechua",nativeName:"Runa Simi"},rm:{name:"Romansh",nativeName:"rumantsch grischun"},rn:{name:"Kirundi",nativeName:"Ikirundi"},ro:{name:"Romanian",nativeName:"Română"},ru:{name:"Russian",nativeName:"Русский"},rw:{name:"Kinyarwanda",nativeName:"Ikinyarwanda"},sa:{name:"Sanskrit",nativeName:"संस्कृतम्"},sc:{name:"Sardinian",nativeName:"sardu"},sd:{name:"Sindhi",nativeName:"सिन्धी"},se:{name:"Northern Sami",nativeName:"Davvisámegiella"},sg:{name:"Sango",nativeName:"yângâ tî sängö"},si:{name:"Sinhala",nativeName:"සිංහල"},sk:{name:"Slovak",nativeName:"slovenčina"},sl:{name:"Slovenian",nativeName:"slovenščina"},sm:{name:"Samoan",nativeName:"gagana fa'a Samoa"},sn:{name:"Shona",nativeName:"chiShona"},so:{name:"Somali",nativeName:"Soomaaliga"},sq:{name:"Albanian",nativeName:"Shqip"},sr:{name:"Serbian",nativeName:"српски језик"},ss:{name:"Swati",nativeName:"SiSwati"},st:{name:"Southern Sotho",nativeName:"Sesotho"},su:{name:"Sundanese",nativeName:"Basa Sunda"},sv:{name:"Swedish",nativeName:"Svenska"},sw:{name:"Swahili",nativeName:"Kiswahili"},ta:{name:"Tamil",nativeName:"தமிழ்"},te:{name:"Telugu",nativeName:"తెలుగు"},tg:{name:"Tajik",nativeName:"тоҷикӣ"},th:{name:"Thai",nativeName:"ไทย"},ti:{name:"Tigrinya",nativeName:"ትግርኛ"},tk:{name:"Turkmen",nativeName:"Türkmençe"},tl:{name:"Tagalog",nativeName:"Wikang Tagalog"},tn:{name:"Tswana",nativeName:"Setswana"},to:{name:"Tonga",nativeName:"faka Tonga"},tr:{name:"Turkish",nativeName:"Türkçe"},ts:{name:"Tsonga",nativeName:"Xitsonga"},tt:{name:"Tatar",nativeName:"татар теле"},tw:{name:"Twi",nativeName:"Twi"},ty:{name:"Tahitian",nativeName:"Reo Tahiti"},ug:{name:"Uyghur",nativeName:"ئۇيغۇرچە‎"},uk:{name:"Ukrainian",nativeName:"Українська"},ur:{name:"Urdu",nativeName:"اردو"},uz:{name:"Uzbek",nativeName:"Ўзбек"},ve:{name:"Venda",nativeName:"Tshivenḓa"},vi:{name:"Vietnamese",nativeName:"Tiếng Việt"},vo:{name:"Volapük",nativeName:"Volapük"},wa:{name:"Walloon",nativeName:"walon"},wo:{name:"Wolof",nativeName:"Wollof"},xh:{name:"Xhosa",nativeName:"isiXhosa"},yi:{name:"Yiddish",nativeName:"ייִדיש"},yo:{name:"Yoruba",nativeName:"Yorùbá"},za:{name:"Zhuang",nativeName:"Saɯ cueŋƅ"},zh:{name:"Chinese",nativeName:"中文"},zu:{name:"Zulu",nativeName:"isiZulu"}};var Xee=Qee;const bf=Xee,UI={},Cg={},GI=[],WI=[],HI=[];for(const e in bf){const{name:t,nativeName:r}=bf[e];UI[e]=Cg[t.toLowerCase()]=Cg[r.toLowerCase()]={code:e,name:t,nativeName:r},GI.push(e),WI.push(t),HI.push(r)}var Jee=class sm{static getLanguages(t=[]){return t.map(r=>sm.validate(r)?Object.assign({},UI[r]):{code:r,name:"",nativeName:""})}static getName(t){return sm.validate(t)?bf[t].name:""}static getAllNames(){return WI.slice()}static getNativeName(t){return sm.validate(t)?bf[t].nativeName:""}static getAllNativeNames(){return HI.slice()}static getCode(t){return t=t.toLowerCase(),Cg.hasOwnProperty(t)?Cg[t].code:""}static getAllCodes(){return GI.slice()}static validate(t){return bf.hasOwnProperty(t)}};const AR=Ha(Jee),Zee=()=>{var s;const{manifest:e}=Qn(),{setting$:t}=di(),{i18n:r}=GQ(),n=r.resolvedLanguage,[i,o]=_.useState();if(_.useEffect(()=>{const a=t==null?void 0:t.subscribe(l=>o(l));return()=>a==null?void 0:a.unsubscribe()},[t]),!(!e||!i))return y.jsxs(tr,{component:"main",sx:{p:"1rem"},children:[y.jsx(ps,{children:y.jsx(Za,{children:y.jsx(_t,{children:"Settings"})})}),y.jsxs(_t,{variant:"h6",children:["GB Playbook ","2.1.0"]}),y.jsxs(_t,{variant:"caption",children:["(","2024-09-18T15:58:36.737Z",")"]}),y.jsx(Zi,{sx:{my:2}}),y.jsx(_t,{children:"Season and Errata Version:"}),y.jsx(wl,{children:y.jsx(Rl,{value:i.toJSON().data.dataSet,onChange:a=>{i==null||i.incrementalPatch({dataSet:a.target.value})},children:e==null?void 0:e.datafiles.map((a,l)=>y.jsx(xi,{value:a.filename,children:`[${a.version}] ${a.description}`},l))})}),y.jsx("p",{}),y.jsx(_t,{children:"Language Preference"}),y.jsx(_t,{variant:"subtitle2",children:"(available languages vary by Season and Errata setting)"}),y.jsx(wl,{children:y.jsxs(Rl,{value:i.toJSON().data.language??"auto",onChange:a=>{i==null||i.incrementalPatch({language:a.target.value})},children:[y.jsx(xi,{value:"auto",children:`Automatic Detection (${AR.getNativeName(n??"en")})`},"auto"),["en"].concat(Object.keys(((s=e.datafiles.find(a=>a.filename===i.toJSON().data.dataSet))==null?void 0:s.translations)??{})).map((a,l)=>y.jsx(xi,{value:a,children:`${AR.getNativeName(a)}`},l))]})}),y.jsx(Zi,{sx:{my:2}}),y.jsx(_t,{children:"UI Options:"}),y.jsx(_t,{children:"Initial Screen:"}),y.jsx(wl,{children:y.jsxs(Rl,{value:i==null?void 0:i.toJSON().data.initialScreen,onChange:a=>{i==null||i.incrementalPatch({initialScreen:a.target.value})},children:[y.jsx(xi,{value:"/game",children:"Game Play"}),y.jsx(xi,{value:"/library",children:"Card Library"})]})}),y.jsx("p",{}),y.jsx(wl,{children:y.jsx(Ms,{control:y.jsx(gG,{size:"small",checked:i==null?void 0:i.toJSON().data.uiPreferences.displayStatLine,onChange:a=>{i==null||i.incrementalPatch({uiPreferences:{displayStatLine:a.target.checked}})}}),label:"Stat Line in Game Roster List"})}),y.jsx("p",{}),y.jsx(_t,{children:"Prefered Card Layout:"}),y.jsx(_t,{variant:"subtitle2",children:"(Only applies to updated cards, where both styles are available)"}),y.jsx(wl,{children:y.jsxs(Rl,{value:i==null?void 0:i.toJSON().data.cardPreferences.preferredStyle,onChange:a=>{i==null||i.incrementalPatch({cardPreferences:{preferredStyle:a.target.value}})},children:[y.jsx(xi,{value:"sfg",children:"Steamforged"}),y.jsx(xi,{value:"gbcp",children:"Community"})]})})]})};var LS={},ete=ds;Object.defineProperty(LS,"__esModule",{value:!0});var VI=LS.default=void 0,tte=ete(fs()),rte=y;VI=LS.default=(0,tte.default)((0,rte.jsx)("path",{d:"M19 8H5c-1.66 0-3 1.34-3 3v6h4v4h12v-4h4v-6c0-1.66-1.34-3-3-3m-3 11H8v-5h8zm3-7c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1m-1-9H6v4h12z"}),"Print");var IS={},nte=ds;Object.defineProperty(IS,"__esModule",{value:!0});var KI=IS.default=void 0,ite=nte(fs()),ote=y;KI=IS.default=(0,ite.default)((0,ote.jsx)("path",{d:"m18 7-1.41-1.41-6.34 6.34 1.41 1.41zm4.24-1.41L11.66 16.17 7.48 12l-1.41 1.41L11.66 19l12-12zM.41 13.41 6 19l1.41-1.41L1.83 12z"}),"DoneAll");var MS={},ste=ds;Object.defineProperty(MS,"__esModule",{value:!0});var qI=MS.default=void 0,ate=ste(fs()),lte=y;qI=MS.default=(0,ate.default)((0,lte.jsx)("path",{d:"m1.79 12 5.58 5.59L5.96 19 .37 13.41zm.45-7.78L12.9 14.89l-1.28 1.28L7.44 12l-1.41 1.41L11.62 19l2.69-2.69 4.89 4.89 1.41-1.41L3.65 2.81zm14.9 9.27L23.62 7 22.2 5.59l-6.48 6.48zM17.96 7l-1.41-1.41-3.65 3.66 1.41 1.41z"}),"RemoveDone");var AS={},cte=ds;Object.defineProperty(AS,"__esModule",{value:!0});var YI=AS.default=void 0,ute=cte(fs()),dte=y;YI=AS.default=(0,ute.default)((0,dte.jsx)("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Clear");const fte=e=>{const[t,r]=_.useState(null),n=!!t,i=h=>{r(h.currentTarget)},o=()=>{r(null)},[s,a]=_.useState(!0),{doubleCard:l,setDouble:c,withBleed:u,setBleed:d,noFun:f,setNoFun:p}=e;return _.useEffect(()=>{const h=l?u?"5.24in 3.74in":"5in 3.5in":u?"2.74in 3.74in":"2.5in 3.5in",v=document.createElement("style");return s||(v.innerHTML=` +`);return y.jsxs(y.Fragment,{children:[y.jsxs("div",{className:"header dropcap",children:[y.jsx("span",{children:"Legendary "}),y.jsx("span",{children:"Play"})]}),y.jsxs("div",{className:"legendary",children:[y.jsx(TS,{text:t}),y.jsx("span",{children:ty(r)})]}),y.jsx("div",{style:{flexGrow:1,maxHeight:"1em"}})]})},bg=Lt.memo(qJ);function _I({children:e,model:t,health$:r}){const n=_.useRef(null),i=_.useRef(null),[o,s]=_.useState(1);_.useLayoutEffect(()=>(a(),window.addEventListener("resize",a),()=>window.removeEventListener("resize",a)));const a=_.useCallback(()=>{if(!n.current)return;const{width:l,height:c}=n.current.getBoundingClientRect(),u=l/500,d=c/700,f=Math.min(u,d,1);s(f??1)},[]);return y.jsx("div",{ref:n,style:{width:"100%",maxWidth:"500px",height:"100%",maxHeight:"700px",display:"flex",alignItems:"center",justifyContent:"center"},children:y.jsx("div",{ref:i,className:"flip-card",onClick:()=>{var l;(l=i.current)==null||l.classList.toggle("flipped")},children:y.jsxs("div",{className:"flip-card-inner",children:[y.jsxs("div",{className:"flip-card-front",children:[y.jsx(yg,{model:t,health$:r,style:{"--scale":o}}),e]}),y.jsx("div",{className:"flip-card-back",children:y.jsx(bg,{model:t,style:{"--scale":o}})})]})})})}function RR(e){return e!==null&&typeof e=="object"&&"constructor"in e&&e.constructor===Object}function OS(e,t){e===void 0&&(e={}),t===void 0&&(t={}),Object.keys(t).forEach(r=>{typeof e[r]>"u"?e[r]=t[r]:RR(t[r])&&RR(e[r])&&Object.keys(t[r]).length>0&&OS(e[r],t[r])})}const kI={body:{},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector(){return null},querySelectorAll(){return[]},getElementById(){return null},createEvent(){return{initEvent(){}}},createElement(){return{children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName(){return[]}}},createElementNS(){return{}},importNode(){return null},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""}};function ed(){const e=typeof document<"u"?document:{};return OS(e,kI),e}const JJ={document:kI,navigator:{userAgent:""},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""},history:{replaceState(){},pushState(){},go(){},back(){}},CustomEvent:function(){return this},addEventListener(){},removeEventListener(){},getComputedStyle(){return{getPropertyValue(){return""}}},Image(){},Date(){},screen:{},setTimeout(){},clearTimeout(){},matchMedia(){return{}},requestAnimationFrame(e){return typeof setTimeout>"u"?(e(),null):setTimeout(e,0)},cancelAnimationFrame(e){typeof setTimeout>"u"||clearTimeout(e)}};function zi(){const e=typeof window<"u"?window:{};return OS(e,JJ),e}function ZJ(e){return e===void 0&&(e=""),e.trim().split(" ").filter(t=>!!t.trim())}function eZ(e){const t=e;Object.keys(t).forEach(r=>{try{t[r]=null}catch{}try{delete t[r]}catch{}})}function q1(e,t){return t===void 0&&(t=0),setTimeout(e,t)}function wg(){return Date.now()}function tZ(e){const t=zi();let r;return t.getComputedStyle&&(r=t.getComputedStyle(e,null)),!r&&e.currentStyle&&(r=e.currentStyle),r||(r=e.style),r}function rZ(e,t){t===void 0&&(t="x");const r=zi();let n,i,o;const s=tZ(e);return r.WebKitCSSMatrix?(i=s.transform||s.webkitTransform,i.split(",").length>6&&(i=i.split(", ").map(a=>a.replace(",",".")).join(", ")),o=new r.WebKitCSSMatrix(i==="none"?"":i)):(o=s.MozTransform||s.OTransform||s.MsTransform||s.msTransform||s.transform||s.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,"),n=o.toString().split(",")),t==="x"&&(r.WebKitCSSMatrix?i=o.m41:n.length===16?i=parseFloat(n[12]):i=parseFloat(n[4])),t==="y"&&(r.WebKitCSSMatrix?i=o.m42:n.length===16?i=parseFloat(n[13]):i=parseFloat(n[5])),i||0}function Oh(e){return typeof e=="object"&&e!==null&&e.constructor&&Object.prototype.toString.call(e).slice(8,-1)==="Object"}function nZ(e){return typeof window<"u"&&typeof window.HTMLElement<"u"?e instanceof HTMLElement:e&&(e.nodeType===1||e.nodeType===11)}function Si(){const e=Object(arguments.length<=0?void 0:arguments[0]),t=["__proto__","constructor","prototype"];for(let r=1;rt.indexOf(o)<0);for(let o=0,s=i.length;oo?"next":"prev",u=(f,p)=>c==="next"&&f>=p||c==="prev"&&f<=p,d=()=>{a=new Date().getTime(),s===null&&(s=a);const f=Math.max(Math.min((a-s)/l,1),0),p=.5-Math.cos(f*Math.PI)/2;let h=o+p*(r-o);if(u(h,r)&&(h=r),t.wrapperEl.scrollTo({[n]:h}),u(h,r)){t.wrapperEl.style.overflow="hidden",t.wrapperEl.style.scrollSnapType="",setTimeout(()=>{t.wrapperEl.style.overflow="",t.wrapperEl.scrollTo({[n]:h})}),i.cancelAnimationFrame(t.cssModeFrameID);return}t.cssModeFrameID=i.requestAnimationFrame(d)};d()}function Os(e,t){t===void 0&&(t="");const r=[...e.children];return e instanceof HTMLSlotElement&&r.push(...e.assignedElements()),t?r.filter(n=>n.matches(t)):r}function iZ(e,t){const r=t.contains(e);return!r&&t instanceof HTMLSlotElement?[...t.assignedElements()].includes(e):r}function xg(e){try{console.warn(e);return}catch{}}function Y1(e,t){t===void 0&&(t=[]);const r=document.createElement(e);return r.classList.add(...Array.isArray(t)?t:ZJ(t)),r}function oZ(e,t){const r=[];for(;e.previousElementSibling;){const n=e.previousElementSibling;t?n.matches(t)&&r.push(n):r.push(n),e=n}return r}function sZ(e,t){const r=[];for(;e.nextElementSibling;){const n=e.nextElementSibling;t?n.matches(t)&&r.push(n):r.push(n),e=n}return r}function _a(e,t){return zi().getComputedStyle(e,null).getPropertyValue(t)}function PR(e){let t=e,r;if(t){for(r=0;(t=t.previousSibling)!==null;)t.nodeType===1&&(r+=1);return r}}function aZ(e,t){const r=[];let n=e.parentElement;for(;n;)r.push(n),n=n.parentElement;return r}function TR(e,t,r){const n=zi();return e[t==="width"?"offsetWidth":"offsetHeight"]+parseFloat(n.getComputedStyle(e,null).getPropertyValue(t==="width"?"margin-right":"margin-top"))+parseFloat(n.getComputedStyle(e,null).getPropertyValue(t==="width"?"margin-left":"margin-bottom"))}let W0;function lZ(){const e=zi(),t=ed();return{smoothScroll:t.documentElement&&t.documentElement.style&&"scrollBehavior"in t.documentElement.style,touch:!!("ontouchstart"in e||e.DocumentTouch&&t instanceof e.DocumentTouch)}}function RI(){return W0||(W0=lZ()),W0}let H0;function cZ(e){let{userAgent:t}=e===void 0?{}:e;const r=RI(),n=zi(),i=n.navigator.platform,o=t||n.navigator.userAgent,s={ios:!1,android:!1},a=n.screen.width,l=n.screen.height,c=o.match(/(Android);?[\s\/]+([\d.]+)?/);let u=o.match(/(iPad).*OS\s([\d_]+)/);const d=o.match(/(iPod)(.*OS\s([\d_]+))?/),f=!u&&o.match(/(iPhone\sOS|iOS)\s([\d_]+)/),p=i==="Win32";let h=i==="MacIntel";const v=["1024x1366","1366x1024","834x1194","1194x834","834x1112","1112x834","768x1024","1024x768","820x1180","1180x820","810x1080","1080x810"];return!u&&h&&r.touch&&v.indexOf(`${a}x${l}`)>=0&&(u=o.match(/(Version)\/([\d.]+)/),u||(u=[0,1,"13_0_0"]),h=!1),c&&!p&&(s.os="android",s.android=!0),(u||f||d)&&(s.os="ios",s.ios=!0),s}function PI(e){return e===void 0&&(e={}),H0||(H0=cZ(e)),H0}let V0;function uZ(){const e=zi(),t=PI();let r=!1;function n(){const a=e.navigator.userAgent.toLowerCase();return a.indexOf("safari")>=0&&a.indexOf("chrome")<0&&a.indexOf("android")<0}if(n()){const a=String(e.navigator.userAgent);if(a.includes("Version/")){const[l,c]=a.split("Version/")[1].split(" ")[0].split(".").map(u=>Number(u));r=l<16||l===16&&c<2}}const i=/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(e.navigator.userAgent),o=n(),s=o||i&&t.ios;return{isSafari:r||o,needPerspectiveFix:r,need3dFix:s,isWebView:i}}function dZ(){return V0||(V0=uZ()),V0}function fZ(e){let{swiper:t,on:r,emit:n}=e;const i=zi();let o=null,s=null;const a=()=>{!t||t.destroyed||!t.initialized||(n("beforeResize"),n("resize"))},l=()=>{!t||t.destroyed||!t.initialized||(o=new ResizeObserver(d=>{s=i.requestAnimationFrame(()=>{const{width:f,height:p}=t;let h=f,v=p;d.forEach(k=>{let{contentBoxSize:b,contentRect:x,target:g}=k;g&&g!==t.el||(h=x?x.width:(b[0]||b).inlineSize,v=x?x.height:(b[0]||b).blockSize)}),(h!==f||v!==p)&&a()})}),o.observe(t.el))},c=()=>{s&&i.cancelAnimationFrame(s),o&&o.unobserve&&t.el&&(o.unobserve(t.el),o=null)},u=()=>{!t||t.destroyed||!t.initialized||n("orientationchange")};r("init",()=>{if(t.params.resizeObserver&&typeof i.ResizeObserver<"u"){l();return}i.addEventListener("resize",a),i.addEventListener("orientationchange",u)}),r("destroy",()=>{c(),i.removeEventListener("resize",a),i.removeEventListener("orientationchange",u)})}function pZ(e){let{swiper:t,extendParams:r,on:n,emit:i}=e;const o=[],s=zi(),a=function(u,d){d===void 0&&(d={});const f=s.MutationObserver||s.WebkitMutationObserver,p=new f(h=>{if(t.__preventObserver__)return;if(h.length===1){i("observerUpdate",h[0]);return}const v=function(){i("observerUpdate",h[0])};s.requestAnimationFrame?s.requestAnimationFrame(v):s.setTimeout(v,0)});p.observe(u,{attributes:typeof d.attributes>"u"?!0:d.attributes,childList:t.isElement||(typeof d.childList>"u"?!0:d).childList,characterData:typeof d.characterData>"u"?!0:d.characterData}),o.push(p)},l=()=>{if(t.params.observer){if(t.params.observeParents){const u=aZ(t.hostEl);for(let d=0;d{o.forEach(u=>{u.disconnect()}),o.splice(0,o.length)};r({observer:!1,observeParents:!1,observeSlideChildren:!1}),n("init",l),n("destroy",c)}var hZ={on(e,t,r){const n=this;if(!n.eventsListeners||n.destroyed||typeof t!="function")return n;const i=r?"unshift":"push";return e.split(" ").forEach(o=>{n.eventsListeners[o]||(n.eventsListeners[o]=[]),n.eventsListeners[o][i](t)}),n},once(e,t,r){const n=this;if(!n.eventsListeners||n.destroyed||typeof t!="function")return n;function i(){n.off(e,i),i.__emitterProxy&&delete i.__emitterProxy;for(var o=arguments.length,s=new Array(o),a=0;a=0&&t.eventsAnyListeners.splice(r,1),t},off(e,t){const r=this;return!r.eventsListeners||r.destroyed||!r.eventsListeners||e.split(" ").forEach(n=>{typeof t>"u"?r.eventsListeners[n]=[]:r.eventsListeners[n]&&r.eventsListeners[n].forEach((i,o)=>{(i===t||i.__emitterProxy&&i.__emitterProxy===t)&&r.eventsListeners[n].splice(o,1)})}),r},emit(){const e=this;if(!e.eventsListeners||e.destroyed||!e.eventsListeners)return e;let t,r,n;for(var i=arguments.length,o=new Array(i),s=0;s{e.eventsAnyListeners&&e.eventsAnyListeners.length&&e.eventsAnyListeners.forEach(c=>{c.apply(n,[l,...r])}),e.eventsListeners&&e.eventsListeners[l]&&e.eventsListeners[l].forEach(c=>{c.apply(n,r)})}),e}};function mZ(){const e=this;let t,r;const n=e.el;typeof e.params.width<"u"&&e.params.width!==null?t=e.params.width:t=n.clientWidth,typeof e.params.height<"u"&&e.params.height!==null?r=e.params.height:r=n.clientHeight,!(t===0&&e.isHorizontal()||r===0&&e.isVertical())&&(t=t-parseInt(_a(n,"padding-left")||0,10)-parseInt(_a(n,"padding-right")||0,10),r=r-parseInt(_a(n,"padding-top")||0,10)-parseInt(_a(n,"padding-bottom")||0,10),Number.isNaN(t)&&(t=0),Number.isNaN(r)&&(r=0),Object.assign(e,{width:t,height:r,size:e.isHorizontal()?t:r}))}function gZ(){const e=this;function t(L,A){return parseFloat(L.getPropertyValue(e.getDirectionLabel(A))||0)}const r=e.params,{wrapperEl:n,slidesEl:i,size:o,rtlTranslate:s,wrongRTL:a}=e,l=e.virtual&&r.virtual.enabled,c=l?e.virtual.slides.length:e.slides.length,u=Os(i,`.${e.params.slideClass}, swiper-slide`),d=l?e.virtual.slides.length:u.length;let f=[];const p=[],h=[];let v=r.slidesOffsetBefore;typeof v=="function"&&(v=r.slidesOffsetBefore.call(e));let k=r.slidesOffsetAfter;typeof k=="function"&&(k=r.slidesOffsetAfter.call(e));const b=e.snapGrid.length,x=e.slidesGrid.length;let g=r.spaceBetween,C=-v,E=0,j=0;if(typeof o>"u")return;typeof g=="string"&&g.indexOf("%")>=0?g=parseFloat(g.replace("%",""))/100*o:typeof g=="string"&&(g=parseFloat(g)),e.virtualSize=-g,u.forEach(L=>{s?L.style.marginLeft="":L.style.marginRight="",L.style.marginBottom="",L.style.marginTop=""}),r.centeredSlides&&r.cssMode&&(jh(n,"--swiper-centered-offset-before",""),jh(n,"--swiper-centered-offset-after",""));const R=r.grid&&r.grid.rows>1&&e.grid;R?e.grid.initSlides(u):e.grid&&e.grid.unsetSlides();let O;const P=r.slidesPerView==="auto"&&r.breakpoints&&Object.keys(r.breakpoints).filter(L=>typeof r.breakpoints[L].slidesPerView<"u").length>0;for(let L=0;L1&&f.push(e.virtualSize-o)}if(l&&r.loop){const L=h[0]+g;if(r.slidesPerGroup>1){const A=Math.ceil((e.virtual.slidesBefore+e.virtual.slidesAfter)/r.slidesPerGroup),$=L*r.slidesPerGroup;for(let F=0;F!r.cssMode||r.loop?!0:$!==u.length-1).forEach(A=>{A.style[L]=`${g}px`})}if(r.centeredSlides&&r.centeredSlidesBounds){let L=0;h.forEach($=>{L+=$+(g||0)}),L-=g;const A=L>o?L-o:0;f=f.map($=>$<=0?-v:$>A?A+k:$)}if(r.centerInsufficientSlides){let L=0;h.forEach($=>{L+=$+(g||0)}),L-=g;const A=(r.slidesOffsetBefore||0)+(r.slidesOffsetAfter||0);if(L+A{f[K]=F-$}),p.forEach((F,K)=>{p[K]=F+$})}}if(Object.assign(e,{slides:u,snapGrid:f,slidesGrid:p,slidesSizesGrid:h}),r.centeredSlides&&r.cssMode&&!r.centeredSlidesBounds){jh(n,"--swiper-centered-offset-before",`${-f[0]}px`),jh(n,"--swiper-centered-offset-after",`${e.size/2-h[h.length-1]/2}px`);const L=-e.snapGrid[0],A=-e.slidesGrid[0];e.snapGrid=e.snapGrid.map($=>$+L),e.slidesGrid=e.slidesGrid.map($=>$+A)}if(d!==c&&e.emit("slidesLengthChange"),f.length!==b&&(e.params.watchOverflow&&e.checkOverflow(),e.emit("snapGridLengthChange")),p.length!==x&&e.emit("slidesGridLengthChange"),r.watchSlidesProgress&&e.updateSlidesOffset(),e.emit("slidesUpdated"),!l&&!r.cssMode&&(r.effect==="slide"||r.effect==="fade")){const L=`${r.containerModifierClass}backface-hidden`,A=e.el.classList.contains(L);d<=r.maxBackfaceHiddenSlides?A||e.el.classList.add(L):A&&e.el.classList.remove(L)}}function vZ(e){const t=this,r=[],n=t.virtual&&t.params.virtual.enabled;let i=0,o;typeof e=="number"?t.setTransition(e):e===!0&&t.setTransition(t.params.speed);const s=a=>n?t.slides[t.getSlideIndexByData(a)]:t.slides[a];if(t.params.slidesPerView!=="auto"&&t.params.slidesPerView>1)if(t.params.centeredSlides)(t.visibleSlides||[]).forEach(a=>{r.push(a)});else for(o=0;ot.slides.length&&!n)break;r.push(s(a))}else r.push(s(t.activeIndex));for(o=0;oi?a:i}(i||i===0)&&(t.wrapperEl.style.height=`${i}px`)}function yZ(){const e=this,t=e.slides,r=e.isElement?e.isHorizontal()?e.wrapperEl.offsetLeft:e.wrapperEl.offsetTop:0;for(let n=0;n{t&&!e.classList.contains(r)?e.classList.add(r):!t&&e.classList.contains(r)&&e.classList.remove(r)};function bZ(e){e===void 0&&(e=this&&this.translate||0);const t=this,r=t.params,{slides:n,rtlTranslate:i,snapGrid:o}=t;if(n.length===0)return;typeof n[0].swiperSlideOffset>"u"&&t.updateSlidesOffset();let s=-e;i&&(s=e),t.visibleSlidesIndexes=[],t.visibleSlides=[];let a=r.spaceBetween;typeof a=="string"&&a.indexOf("%")>=0?a=parseFloat(a.replace("%",""))/100*t.size:typeof a=="string"&&(a=parseFloat(a));for(let l=0;l=0&&p<=t.size-t.slidesSizesGrid[l],k=p>=0&&p1&&h<=t.size||p<=0&&h>=t.size;k&&(t.visibleSlides.push(c),t.visibleSlidesIndexes.push(l)),OR(c,k,r.slideVisibleClass),OR(c,v,r.slideFullyVisibleClass),c.progress=i?-d:d,c.originalProgress=i?-f:f}}function wZ(e){const t=this;if(typeof e>"u"){const u=t.rtlTranslate?-1:1;e=t&&t.translate&&t.translate*u||0}const r=t.params,n=t.maxTranslate()-t.minTranslate();let{progress:i,isBeginning:o,isEnd:s,progressLoop:a}=t;const l=o,c=s;if(n===0)i=0,o=!0,s=!0;else{i=(e-t.minTranslate())/n;const u=Math.abs(e-t.minTranslate())<1,d=Math.abs(e-t.maxTranslate())<1;o=u||i<=0,s=d||i>=1,u&&(i=0),d&&(i=1)}if(r.loop){const u=t.getSlideIndexByData(0),d=t.getSlideIndexByData(t.slides.length-1),f=t.slidesGrid[u],p=t.slidesGrid[d],h=t.slidesGrid[t.slidesGrid.length-1],v=Math.abs(e);v>=f?a=(v-f)/h:a=(v+h-p)/h,a>1&&(a-=1)}Object.assign(t,{progress:i,progressLoop:a,isBeginning:o,isEnd:s}),(r.watchSlidesProgress||r.centeredSlides&&r.autoHeight)&&t.updateSlidesProgress(e),o&&!l&&t.emit("reachBeginning toEdge"),s&&!c&&t.emit("reachEnd toEdge"),(l&&!o||c&&!s)&&t.emit("fromEdge"),t.emit("progress",i)}const K0=(e,t,r)=>{t&&!e.classList.contains(r)?e.classList.add(r):!t&&e.classList.contains(r)&&e.classList.remove(r)};function xZ(){const e=this,{slides:t,params:r,slidesEl:n,activeIndex:i}=e,o=e.virtual&&r.virtual.enabled,s=e.grid&&r.grid&&r.grid.rows>1,a=d=>Os(n,`.${r.slideClass}${d}, swiper-slide${d}`)[0];let l,c,u;if(o)if(r.loop){let d=i-e.virtual.slidesBefore;d<0&&(d=e.virtual.slides.length+d),d>=e.virtual.slides.length&&(d-=e.virtual.slides.length),l=a(`[data-swiper-slide-index="${d}"]`)}else l=a(`[data-swiper-slide-index="${i}"]`);else s?(l=t.filter(d=>d.column===i)[0],u=t.filter(d=>d.column===i+1)[0],c=t.filter(d=>d.column===i-1)[0]):l=t[i];l&&(s||(u=sZ(l,`.${r.slideClass}, swiper-slide`)[0],r.loop&&!u&&(u=t[0]),c=oZ(l,`.${r.slideClass}, swiper-slide`)[0],r.loop&&!c===0&&(c=t[t.length-1]))),t.forEach(d=>{K0(d,d===l,r.slideActiveClass),K0(d,d===u,r.slideNextClass),K0(d,d===c,r.slidePrevClass)}),e.emitSlidesClasses()}const om=(e,t)=>{if(!e||e.destroyed||!e.params)return;const r=()=>e.isElement?"swiper-slide":`.${e.params.slideClass}`,n=t.closest(r());if(n){let i=n.querySelector(`.${e.params.lazyPreloaderClass}`);!i&&e.isElement&&(n.shadowRoot?i=n.shadowRoot.querySelector(`.${e.params.lazyPreloaderClass}`):requestAnimationFrame(()=>{n.shadowRoot&&(i=n.shadowRoot.querySelector(`.${e.params.lazyPreloaderClass}`),i&&i.remove())})),i&&i.remove()}},q0=(e,t)=>{if(!e.slides[t])return;const r=e.slides[t].querySelector('[loading="lazy"]');r&&r.removeAttribute("loading")},Q1=e=>{if(!e||e.destroyed||!e.params)return;let t=e.params.lazyPreloadPrevNext;const r=e.slides.length;if(!r||!t||t<0)return;t=Math.min(t,r);const n=e.params.slidesPerView==="auto"?e.slidesPerViewDynamic():Math.ceil(e.params.slidesPerView),i=e.activeIndex;if(e.params.grid&&e.params.grid.rows>1){const s=i,a=[s-t];a.push(...Array.from({length:t}).map((l,c)=>s+n+c)),e.slides.forEach((l,c)=>{a.includes(l.column)&&q0(e,c)});return}const o=i+n-1;if(e.params.rewind||e.params.loop)for(let s=i-t;s<=o+t;s+=1){const a=(s%r+r)%r;(ao)&&q0(e,a)}else for(let s=Math.max(i-t,0);s<=Math.min(o+t,r-1);s+=1)s!==i&&(s>o||s=t[o]&&n=t[o]&&n=t[o]&&(i=o);return r.normalizeSlideIndex&&(i<0||typeof i>"u")&&(i=0),i}function CZ(e){const t=this,r=t.rtlTranslate?t.translate:-t.translate,{snapGrid:n,params:i,activeIndex:o,realIndex:s,snapIndex:a}=t;let l=e,c;const u=p=>{let h=p-t.virtual.slidesBefore;return h<0&&(h=t.virtual.slides.length+h),h>=t.virtual.slides.length&&(h-=t.virtual.slides.length),h};if(typeof l>"u"&&(l=SZ(t)),n.indexOf(r)>=0)c=n.indexOf(r);else{const p=Math.min(i.slidesPerGroupSkip,l);c=p+Math.floor((l-p)/i.slidesPerGroup)}if(c>=n.length&&(c=n.length-1),l===o&&!t.params.loop){c!==a&&(t.snapIndex=c,t.emit("snapIndexChange"));return}if(l===o&&t.params.loop&&t.virtual&&t.params.virtual.enabled){t.realIndex=u(l);return}const d=t.grid&&i.grid&&i.grid.rows>1;let f;if(t.virtual&&i.virtual.enabled&&i.loop)f=u(l);else if(d){const p=t.slides.filter(v=>v.column===l)[0];let h=parseInt(p.getAttribute("data-swiper-slide-index"),10);Number.isNaN(h)&&(h=Math.max(t.slides.indexOf(p),0)),f=Math.floor(h/i.grid.rows)}else if(t.slides[l]){const p=t.slides[l].getAttribute("data-swiper-slide-index");p?f=parseInt(p,10):f=l}else f=l;Object.assign(t,{previousSnapIndex:a,snapIndex:c,previousRealIndex:s,realIndex:f,previousIndex:o,activeIndex:l}),t.initialized&&Q1(t),t.emit("activeIndexChange"),t.emit("snapIndexChange"),(t.initialized||t.params.runCallbacksOnInit)&&(s!==f&&t.emit("realIndexChange"),t.emit("slideChange"))}function _Z(e,t){const r=this,n=r.params;let i=e.closest(`.${n.slideClass}, swiper-slide`);!i&&r.isElement&&t&&t.length>1&&t.includes(e)&&[...t.slice(t.indexOf(e)+1,t.length)].forEach(a=>{!i&&a.matches&&a.matches(`.${n.slideClass}, swiper-slide`)&&(i=a)});let o=!1,s;if(i){for(let a=0;al?u=l:n&&es?a="next":o"u"&&(t=o.params.speed);const v=Math.min(o.params.slidesPerGroupSkip,s);let k=v+Math.floor((s-v)/o.params.slidesPerGroup);k>=l.length&&(k=l.length-1);const b=-l[k];if(a.normalizeSlideIndex)for(let E=0;E=R&&j=R&&j=R&&(s=E)}if(o.initialized&&s!==d&&(!o.allowSlideNext&&(f?b>o.translate&&b>o.minTranslate():bo.translate&&b>o.maxTranslate()&&(d||0)!==s))return!1;s!==(u||0)&&r&&o.emit("beforeSlideChangeStart"),o.updateProgress(b);let x;s>d?x="next":s0?(o._cssModeVirtualInitialSet=!0,requestAnimationFrame(()=>{p[E?"scrollLeft":"scrollTop"]=j})):p[E?"scrollLeft":"scrollTop"]=j,g&&requestAnimationFrame(()=>{o.wrapperEl.style.scrollSnapType="",o._immediateVirtual=!1});else{if(!o.support.smoothScroll)return EI({swiper:o,targetPosition:j,side:E?"left":"top"}),!0;p.scrollTo({[E?"left":"top"]:j,behavior:"smooth"})}return!0}return o.setTransition(t),o.setTranslate(b),o.updateActiveIndex(s),o.updateSlidesClasses(),o.emit("beforeTransitionStart",t,n),o.transitionStart(r,x),t===0?o.transitionEnd(r,x):o.animating||(o.animating=!0,o.onSlideToWrapperTransitionEnd||(o.onSlideToWrapperTransitionEnd=function(j){!o||o.destroyed||j.target===this&&(o.wrapperEl.removeEventListener("transitionend",o.onSlideToWrapperTransitionEnd),o.onSlideToWrapperTransitionEnd=null,delete o.onSlideToWrapperTransitionEnd,o.transitionEnd(r,x))}),o.wrapperEl.addEventListener("transitionend",o.onSlideToWrapperTransitionEnd)),!0}function DZ(e,t,r,n){e===void 0&&(e=0),r===void 0&&(r=!0),typeof e=="string"&&(e=parseInt(e,10));const i=this;if(i.destroyed)return;typeof t>"u"&&(t=i.params.speed);const o=i.grid&&i.params.grid&&i.params.grid.rows>1;let s=e;if(i.params.loop)if(i.virtual&&i.params.virtual.enabled)s=s+i.virtual.slidesBefore;else{let a;if(o){const f=s*i.params.grid.rows;a=i.slides.filter(p=>p.getAttribute("data-swiper-slide-index")*1===f)[0].column}else a=i.getSlideIndexByData(s);const l=o?Math.ceil(i.slides.length/i.params.grid.rows):i.slides.length,{centeredSlides:c}=i.params;let u=i.params.slidesPerView;u==="auto"?u=i.slidesPerViewDynamic():(u=Math.ceil(parseFloat(i.params.slidesPerView,10)),c&&u%2===0&&(u=u+1));let d=l-ap.getAttribute("data-swiper-slide-index")*1===f)[0].column}else s=i.getSlideIndexByData(s)}return requestAnimationFrame(()=>{i.slideTo(s,t,r,n)}),i}function BZ(e,t,r){t===void 0&&(t=!0);const n=this,{enabled:i,params:o,animating:s}=n;if(!i||n.destroyed)return n;typeof e>"u"&&(e=n.params.speed);let a=o.slidesPerGroup;o.slidesPerView==="auto"&&o.slidesPerGroup===1&&o.slidesPerGroupAuto&&(a=Math.max(n.slidesPerViewDynamic("current",!0),1));const l=n.activeIndex{n.slideTo(n.activeIndex+l,e,t,r)}),!0}return o.rewind&&n.isEnd?n.slideTo(0,e,t,r):n.slideTo(n.activeIndex+l,e,t,r)}function $Z(e,t,r){t===void 0&&(t=!0);const n=this,{params:i,snapGrid:o,slidesGrid:s,rtlTranslate:a,enabled:l,animating:c}=n;if(!l||n.destroyed)return n;typeof e>"u"&&(e=n.params.speed);const u=n.virtual&&i.virtual.enabled;if(i.loop){if(c&&!u&&i.loopPreventsSliding)return!1;n.loopFix({direction:"prev"}),n._clientLeft=n.wrapperEl.clientLeft}const d=a?n.translate:-n.translate;function f(b){return b<0?-Math.floor(Math.abs(b)):Math.floor(b)}const p=f(d),h=o.map(b=>f(b));let v=o[h.indexOf(p)-1];if(typeof v>"u"&&i.cssMode){let b;o.forEach((x,g)=>{p>=x&&(b=g)}),typeof b<"u"&&(v=o[b>0?b-1:b])}let k=0;if(typeof v<"u"&&(k=s.indexOf(v),k<0&&(k=n.activeIndex-1),i.slidesPerView==="auto"&&i.slidesPerGroup===1&&i.slidesPerGroupAuto&&(k=k-n.slidesPerViewDynamic("previous",!0)+1,k=Math.max(k,0))),i.rewind&&n.isBeginning){const b=n.params.virtual&&n.params.virtual.enabled&&n.virtual?n.virtual.slides.length-1:n.slides.length-1;return n.slideTo(b,e,t,r)}else if(i.loop&&n.activeIndex===0&&i.cssMode)return requestAnimationFrame(()=>{n.slideTo(k,e,t,r)}),!0;return n.slideTo(k,e,t,r)}function FZ(e,t,r){t===void 0&&(t=!0);const n=this;if(!n.destroyed)return typeof e>"u"&&(e=n.params.speed),n.slideTo(n.activeIndex,e,t,r)}function zZ(e,t,r,n){t===void 0&&(t=!0),n===void 0&&(n=.5);const i=this;if(i.destroyed)return;typeof e>"u"&&(e=i.params.speed);let o=i.activeIndex;const s=Math.min(i.params.slidesPerGroupSkip,o),a=s+Math.floor((o-s)/i.params.slidesPerGroup),l=i.rtlTranslate?i.translate:-i.translate;if(l>=i.snapGrid[a]){const c=i.snapGrid[a],u=i.snapGrid[a+1];l-c>(u-c)*n&&(o+=i.params.slidesPerGroup)}else{const c=i.snapGrid[a-1],u=i.snapGrid[a];l-c<=(u-c)*n&&(o-=i.params.slidesPerGroup)}return o=Math.max(o,0),o=Math.min(o,i.slidesGrid.length-1),i.slideTo(o,e,t,r)}function UZ(){const e=this;if(e.destroyed)return;const{params:t,slidesEl:r}=e,n=t.slidesPerView==="auto"?e.slidesPerViewDynamic():t.slidesPerView;let i=e.clickedIndex,o;const s=e.isElement?"swiper-slide":`.${t.slideClass}`;if(t.loop){if(e.animating)return;o=parseInt(e.clickedSlide.getAttribute("data-swiper-slide-index"),10),t.centeredSlides?ie.slides.length-e.loopedSlides+n/2?(e.loopFix(),i=e.getSlideIndex(Os(r,`${s}[data-swiper-slide-index="${o}"]`)[0]),q1(()=>{e.slideTo(i)})):e.slideTo(i):i>e.slides.length-n?(e.loopFix(),i=e.getSlideIndex(Os(r,`${s}[data-swiper-slide-index="${o}"]`)[0]),q1(()=>{e.slideTo(i)})):e.slideTo(i)}else e.slideTo(i)}var GZ={slideTo:NZ,slideToLoop:DZ,slideNext:BZ,slidePrev:$Z,slideReset:FZ,slideToClosest:zZ,slideToClickedSlide:UZ};function WZ(e){const t=this,{params:r,slidesEl:n}=t;if(!r.loop||t.virtual&&t.params.virtual.enabled)return;const i=()=>{Os(n,`.${r.slideClass}, swiper-slide`).forEach((d,f)=>{d.setAttribute("data-swiper-slide-index",f)})},o=t.grid&&r.grid&&r.grid.rows>1,s=r.slidesPerGroup*(o?r.grid.rows:1),a=t.slides.length%s!==0,l=o&&t.slides.length%r.grid.rows!==0,c=u=>{for(let d=0;d1;c.length"u"?o=l.getSlideIndex(c.filter(F=>F.classList.contains(p.slideActiveClass))[0]):E=o;const j=n==="next"||!n,R=n==="prev"||!n;let O=0,P=0;const L=x?Math.ceil(c.length/p.grid.rows):c.length,$=(x?c[o].column:o)+(h&&typeof i>"u"?-v/2+.5:0);if($=0;Z-=1)c[Z].column===Y&&g.push(Z)}else g.push(L-K-1)}}else if($+v>L-b){P=Math.max($-(L-b*2),k);for(let F=0;F{Y.column===K&&C.push(Z)}):C.push(K)}}if(l.__preventObserver__=!0,requestAnimationFrame(()=>{l.__preventObserver__=!1}),R&&g.forEach(F=>{c[F].swiperLoopMoveDOM=!0,f.prepend(c[F]),c[F].swiperLoopMoveDOM=!1}),j&&C.forEach(F=>{c[F].swiperLoopMoveDOM=!0,f.append(c[F]),c[F].swiperLoopMoveDOM=!1}),l.recalcSlides(),p.slidesPerView==="auto"?l.updateSlides():x&&(g.length>0&&R||C.length>0&&j)&&l.slides.forEach((F,K)=>{l.grid.updateSlide(K,F,l.slides)}),p.watchSlidesProgress&&l.updateSlidesOffset(),r){if(g.length>0&&R){if(typeof t>"u"){const F=l.slidesGrid[E],Y=l.slidesGrid[E+O]-F;a?l.setTranslate(l.translate-Y):(l.slideTo(E+Math.ceil(O),0,!1,!0),i&&(l.touchEventsData.startTranslate=l.touchEventsData.startTranslate-Y,l.touchEventsData.currentTranslate=l.touchEventsData.currentTranslate-Y))}else if(i){const F=x?g.length/p.grid.rows:g.length;l.slideTo(l.activeIndex+F,0,!1,!0),l.touchEventsData.currentTranslate=l.translate}}else if(C.length>0&&j)if(typeof t>"u"){const F=l.slidesGrid[E],Y=l.slidesGrid[E-P]-F;a?l.setTranslate(l.translate-Y):(l.slideTo(E-P,0,!1,!0),i&&(l.touchEventsData.startTranslate=l.touchEventsData.startTranslate-Y,l.touchEventsData.currentTranslate=l.touchEventsData.currentTranslate-Y))}else{const F=x?C.length/p.grid.rows:C.length;l.slideTo(l.activeIndex-F,0,!1,!0)}}if(l.allowSlidePrev=u,l.allowSlideNext=d,l.controller&&l.controller.control&&!s){const F={slideRealIndex:t,direction:n,setTranslate:i,activeSlideIndex:o,byController:!0};Array.isArray(l.controller.control)?l.controller.control.forEach(K=>{!K.destroyed&&K.params.loop&&K.loopFix({...F,slideTo:K.params.slidesPerView===p.slidesPerView?r:!1})}):l.controller.control instanceof l.constructor&&l.controller.control.params.loop&&l.controller.control.loopFix({...F,slideTo:l.controller.control.params.slidesPerView===p.slidesPerView?r:!1})}l.emit("loopFix")}function VZ(){const e=this,{params:t,slidesEl:r}=e;if(!t.loop||e.virtual&&e.params.virtual.enabled)return;e.recalcSlides();const n=[];e.slides.forEach(i=>{const o=typeof i.swiperSlideIndex>"u"?i.getAttribute("data-swiper-slide-index")*1:i.swiperSlideIndex;n[o]=i}),e.slides.forEach(i=>{i.removeAttribute("data-swiper-slide-index")}),n.forEach(i=>{r.append(i)}),e.recalcSlides(),e.slideTo(e.realIndex,0)}var KZ={loopCreate:WZ,loopFix:HZ,loopDestroy:VZ};function qZ(e){const t=this;if(!t.params.simulateTouch||t.params.watchOverflow&&t.isLocked||t.params.cssMode)return;const r=t.params.touchEventsTarget==="container"?t.el:t.wrapperEl;t.isElement&&(t.__preventObserver__=!0),r.style.cursor="move",r.style.cursor=e?"grabbing":"grab",t.isElement&&requestAnimationFrame(()=>{t.__preventObserver__=!1})}function YZ(){const e=this;e.params.watchOverflow&&e.isLocked||e.params.cssMode||(e.isElement&&(e.__preventObserver__=!0),e[e.params.touchEventsTarget==="container"?"el":"wrapperEl"].style.cursor="",e.isElement&&requestAnimationFrame(()=>{e.__preventObserver__=!1}))}var QZ={setGrabCursor:qZ,unsetGrabCursor:YZ};function XZ(e,t){t===void 0&&(t=this);function r(n){if(!n||n===ed()||n===zi())return null;n.assignedSlot&&(n=n.assignedSlot);const i=n.closest(e);return!i&&!n.getRootNode?null:i||r(n.getRootNode().host)}return r(t)}function jR(e,t,r){const n=zi(),{params:i}=e,o=i.edgeSwipeDetection,s=i.edgeSwipeThreshold;return o&&(r<=s||r>=n.innerWidth-s)?o==="prevent"?(t.preventDefault(),!0):!1:!0}function JZ(e){const t=this,r=ed();let n=e;n.originalEvent&&(n=n.originalEvent);const i=t.touchEventsData;if(n.type==="pointerdown"){if(i.pointerId!==null&&i.pointerId!==n.pointerId)return;i.pointerId=n.pointerId}else n.type==="touchstart"&&n.targetTouches.length===1&&(i.touchId=n.targetTouches[0].identifier);if(n.type==="touchstart"){jR(t,n,n.targetTouches[0].pageX);return}const{params:o,touches:s,enabled:a}=t;if(!a||!o.simulateTouch&&n.pointerType==="mouse"||t.animating&&o.preventInteractionOnTransition)return;!t.animating&&o.cssMode&&o.loop&&t.loopFix();let l=n.target;if(o.touchEventsTarget==="wrapper"&&!iZ(l,t.wrapperEl)||"which"in n&&n.which===3||"button"in n&&n.button>0||i.isTouched&&i.isMoved)return;const c=!!o.noSwipingClass&&o.noSwipingClass!=="",u=n.composedPath?n.composedPath():n.path;c&&n.target&&n.target.shadowRoot&&u&&(l=u[0]);const d=o.noSwipingSelector?o.noSwipingSelector:`.${o.noSwipingClass}`,f=!!(n.target&&n.target.shadowRoot);if(o.noSwiping&&(f?XZ(d,l):l.closest(d))){t.allowClick=!0;return}if(o.swipeHandler&&!l.closest(o.swipeHandler))return;s.currentX=n.pageX,s.currentY=n.pageY;const p=s.currentX,h=s.currentY;if(!jR(t,n,p))return;Object.assign(i,{isTouched:!0,isMoved:!1,allowTouchCallbacks:!0,isScrolling:void 0,startMoving:void 0}),s.startX=p,s.startY=h,i.touchStartTime=wg(),t.allowClick=!0,t.updateSize(),t.swipeDirection=void 0,o.threshold>0&&(i.allowThresholdMove=!1);let v=!0;l.matches(i.focusableElements)&&(v=!1,l.nodeName==="SELECT"&&(i.isTouched=!1)),r.activeElement&&r.activeElement.matches(i.focusableElements)&&r.activeElement!==l&&r.activeElement.blur();const k=v&&t.allowTouchMove&&o.touchStartPreventDefault;(o.touchStartForcePreventDefault||k)&&!l.isContentEditable&&n.preventDefault(),o.freeMode&&o.freeMode.enabled&&t.freeMode&&t.animating&&!o.cssMode&&t.freeMode.onTouchStart(),t.emit("touchStart",n)}function ZZ(e){const t=ed(),r=this,n=r.touchEventsData,{params:i,touches:o,rtlTranslate:s,enabled:a}=r;if(!a||!i.simulateTouch&&e.pointerType==="mouse")return;let l=e;if(l.originalEvent&&(l=l.originalEvent),l.type==="pointermove"&&(n.touchId!==null||l.pointerId!==n.pointerId))return;let c;if(l.type==="touchmove"){if(c=[...l.changedTouches].filter(j=>j.identifier===n.touchId)[0],!c||c.identifier!==n.touchId)return}else c=l;if(!n.isTouched){n.startMoving&&n.isScrolling&&r.emit("touchMoveOpposite",l);return}const u=c.pageX,d=c.pageY;if(l.preventedByNestedSwiper){o.startX=u,o.startY=d;return}if(!r.allowTouchMove){l.target.matches(n.focusableElements)||(r.allowClick=!1),n.isTouched&&(Object.assign(o,{startX:u,startY:d,currentX:u,currentY:d}),n.touchStartTime=wg());return}if(i.touchReleaseOnEdges&&!i.loop){if(r.isVertical()){if(do.startY&&r.translate>=r.minTranslate()){n.isTouched=!1,n.isMoved=!1;return}}else if(uo.startX&&r.translate>=r.minTranslate())return}if(t.activeElement&&l.target===t.activeElement&&l.target.matches(n.focusableElements)){n.isMoved=!0,r.allowClick=!1;return}n.allowTouchCallbacks&&r.emit("touchMove",l),o.previousX=o.currentX,o.previousY=o.currentY,o.currentX=u,o.currentY=d;const f=o.currentX-o.startX,p=o.currentY-o.startY;if(r.params.threshold&&Math.sqrt(f**2+p**2)"u"){let j;r.isHorizontal()&&o.currentY===o.startY||r.isVertical()&&o.currentX===o.startX?n.isScrolling=!1:f*f+p*p>=25&&(j=Math.atan2(Math.abs(p),Math.abs(f))*180/Math.PI,n.isScrolling=r.isHorizontal()?j>i.touchAngle:90-j>i.touchAngle)}if(n.isScrolling&&r.emit("touchMoveOpposite",l),typeof n.startMoving>"u"&&(o.currentX!==o.startX||o.currentY!==o.startY)&&(n.startMoving=!0),n.isScrolling||l.type==="touchmove"&&n.preventTouchMoveFromPointerMove){n.isTouched=!1;return}if(!n.startMoving)return;r.allowClick=!1,!i.cssMode&&l.cancelable&&l.preventDefault(),i.touchMoveStopPropagation&&!i.nested&&l.stopPropagation();let h=r.isHorizontal()?f:p,v=r.isHorizontal()?o.currentX-o.previousX:o.currentY-o.previousY;i.oneWayMovement&&(h=Math.abs(h)*(s?1:-1),v=Math.abs(v)*(s?1:-1)),o.diff=h,h*=i.touchRatio,s&&(h=-h,v=-v);const k=r.touchesDirection;r.swipeDirection=h>0?"prev":"next",r.touchesDirection=v>0?"prev":"next";const b=r.params.loop&&!i.cssMode,x=r.touchesDirection==="next"&&r.allowSlideNext||r.touchesDirection==="prev"&&r.allowSlidePrev;if(!n.isMoved){if(b&&x&&r.loopFix({direction:r.swipeDirection}),n.startTranslate=r.getTranslate(),r.setTransition(0),r.animating){const j=new window.CustomEvent("transitionend",{bubbles:!0,cancelable:!0,detail:{bySwiperTouchMove:!0}});r.wrapperEl.dispatchEvent(j)}n.allowMomentumBounce=!1,i.grabCursor&&(r.allowSlideNext===!0||r.allowSlidePrev===!0)&&r.setGrabCursor(!0),r.emit("sliderFirstMove",l)}let g;if(new Date().getTime(),n.isMoved&&n.allowThresholdMove&&k!==r.touchesDirection&&b&&x&&Math.abs(h)>=1){Object.assign(o,{startX:u,startY:d,currentX:u,currentY:d,startTranslate:n.currentTranslate}),n.loopSwapReset=!0,n.startTranslate=n.currentTranslate;return}r.emit("sliderMove",l),n.isMoved=!0,n.currentTranslate=h+n.startTranslate;let C=!0,E=i.resistanceRatio;if(i.touchReleaseOnEdges&&(E=0),h>0?(b&&x&&!g&&n.allowThresholdMove&&n.currentTranslate>(i.centeredSlides?r.minTranslate()-r.slidesSizesGrid[r.activeIndex+1]-(i.slidesPerView!=="auto"&&r.slides.length-i.slidesPerView>=2?r.slidesSizesGrid[r.activeIndex+1]+r.params.spaceBetween:0)-r.params.spaceBetween:r.minTranslate())&&r.loopFix({direction:"prev",setTranslate:!0,activeSlideIndex:0}),n.currentTranslate>r.minTranslate()&&(C=!1,i.resistance&&(n.currentTranslate=r.minTranslate()-1+(-r.minTranslate()+n.startTranslate+h)**E))):h<0&&(b&&x&&!g&&n.allowThresholdMove&&n.currentTranslate<(i.centeredSlides?r.maxTranslate()+r.slidesSizesGrid[r.slidesSizesGrid.length-1]+r.params.spaceBetween+(i.slidesPerView!=="auto"&&r.slides.length-i.slidesPerView>=2?r.slidesSizesGrid[r.slidesSizesGrid.length-1]+r.params.spaceBetween:0):r.maxTranslate())&&r.loopFix({direction:"next",setTranslate:!0,activeSlideIndex:r.slides.length-(i.slidesPerView==="auto"?r.slidesPerViewDynamic():Math.ceil(parseFloat(i.slidesPerView,10)))}),n.currentTranslaten.startTranslate&&(n.currentTranslate=n.startTranslate),!r.allowSlidePrev&&!r.allowSlideNext&&(n.currentTranslate=n.startTranslate),i.threshold>0)if(Math.abs(h)>i.threshold||n.allowThresholdMove){if(!n.allowThresholdMove){n.allowThresholdMove=!0,o.startX=o.currentX,o.startY=o.currentY,n.currentTranslate=n.startTranslate,o.diff=r.isHorizontal()?o.currentX-o.startX:o.currentY-o.startY;return}}else{n.currentTranslate=n.startTranslate;return}!i.followFinger||i.cssMode||((i.freeMode&&i.freeMode.enabled&&r.freeMode||i.watchSlidesProgress)&&(r.updateActiveIndex(),r.updateSlidesClasses()),i.freeMode&&i.freeMode.enabled&&r.freeMode&&r.freeMode.onTouchMove(),r.updateProgress(n.currentTranslate),r.setTranslate(n.currentTranslate))}function eee(e){const t=this,r=t.touchEventsData;let n=e;n.originalEvent&&(n=n.originalEvent);let i;if(n.type==="touchend"||n.type==="touchcancel"){if(i=[...n.changedTouches].filter(E=>E.identifier===r.touchId)[0],!i||i.identifier!==r.touchId)return}else{if(r.touchId!==null||n.pointerId!==r.pointerId)return;i=n}if(["pointercancel","pointerout","pointerleave","contextmenu"].includes(n.type)&&!(["pointercancel","contextmenu"].includes(n.type)&&(t.browser.isSafari||t.browser.isWebView)))return;r.pointerId=null,r.touchId=null;const{params:s,touches:a,rtlTranslate:l,slidesGrid:c,enabled:u}=t;if(!u||!s.simulateTouch&&n.pointerType==="mouse")return;if(r.allowTouchCallbacks&&t.emit("touchEnd",n),r.allowTouchCallbacks=!1,!r.isTouched){r.isMoved&&s.grabCursor&&t.setGrabCursor(!1),r.isMoved=!1,r.startMoving=!1;return}s.grabCursor&&r.isMoved&&r.isTouched&&(t.allowSlideNext===!0||t.allowSlidePrev===!0)&&t.setGrabCursor(!1);const d=wg(),f=d-r.touchStartTime;if(t.allowClick){const E=n.path||n.composedPath&&n.composedPath();t.updateClickedSlide(E&&E[0]||n.target,E),t.emit("tap click",n),f<300&&d-r.lastClickTime<300&&t.emit("doubleTap doubleClick",n)}if(r.lastClickTime=wg(),q1(()=>{t.destroyed||(t.allowClick=!0)}),!r.isTouched||!r.isMoved||!t.swipeDirection||a.diff===0&&!r.loopSwapReset||r.currentTranslate===r.startTranslate&&!r.loopSwapReset){r.isTouched=!1,r.isMoved=!1,r.startMoving=!1;return}r.isTouched=!1,r.isMoved=!1,r.startMoving=!1;let p;if(s.followFinger?p=l?t.translate:-t.translate:p=-r.currentTranslate,s.cssMode)return;if(s.freeMode&&s.freeMode.enabled){t.freeMode.onTouchEnd({currentPos:p});return}const h=p>=-t.maxTranslate()&&!t.params.loop;let v=0,k=t.slidesSizesGrid[0];for(let E=0;E=c[E]&&p=c[E])&&(v=E,k=c[c.length-1]-c[c.length-2])}let b=null,x=null;s.rewind&&(t.isBeginning?x=s.virtual&&s.virtual.enabled&&t.virtual?t.virtual.slides.length-1:t.slides.length-1:t.isEnd&&(b=0));const g=(p-c[v])/k,C=vs.longSwipesMs){if(!s.longSwipes){t.slideTo(t.activeIndex);return}t.swipeDirection==="next"&&(g>=s.longSwipesRatio?t.slideTo(s.rewind&&t.isEnd?b:v+C):t.slideTo(v)),t.swipeDirection==="prev"&&(g>1-s.longSwipesRatio?t.slideTo(v+C):x!==null&&g<0&&Math.abs(g)>s.longSwipesRatio?t.slideTo(x):t.slideTo(v))}else{if(!s.shortSwipes){t.slideTo(t.activeIndex);return}t.navigation&&(n.target===t.navigation.nextEl||n.target===t.navigation.prevEl)?n.target===t.navigation.nextEl?t.slideTo(v+C):t.slideTo(v):(t.swipeDirection==="next"&&t.slideTo(b!==null?b:v+C),t.swipeDirection==="prev"&&t.slideTo(x!==null?x:v))}}function LR(){const e=this,{params:t,el:r}=e;if(r&&r.offsetWidth===0)return;t.breakpoints&&e.setBreakpoint();const{allowSlideNext:n,allowSlidePrev:i,snapGrid:o}=e,s=e.virtual&&e.params.virtual.enabled;e.allowSlideNext=!0,e.allowSlidePrev=!0,e.updateSize(),e.updateSlides(),e.updateSlidesClasses();const a=s&&t.loop;(t.slidesPerView==="auto"||t.slidesPerView>1)&&e.isEnd&&!e.isBeginning&&!e.params.centeredSlides&&!a?e.slideTo(e.slides.length-1,0,!1,!0):e.params.loop&&!s?e.slideToLoop(e.realIndex,0,!1,!0):e.slideTo(e.activeIndex,0,!1,!0),e.autoplay&&e.autoplay.running&&e.autoplay.paused&&(clearTimeout(e.autoplay.resizeTimeout),e.autoplay.resizeTimeout=setTimeout(()=>{e.autoplay&&e.autoplay.running&&e.autoplay.paused&&e.autoplay.resume()},500)),e.allowSlidePrev=i,e.allowSlideNext=n,e.params.watchOverflow&&o!==e.snapGrid&&e.checkOverflow()}function tee(e){const t=this;t.enabled&&(t.allowClick||(t.params.preventClicks&&e.preventDefault(),t.params.preventClicksPropagation&&t.animating&&(e.stopPropagation(),e.stopImmediatePropagation())))}function ree(){const e=this,{wrapperEl:t,rtlTranslate:r,enabled:n}=e;if(!n)return;e.previousTranslate=e.translate,e.isHorizontal()?e.translate=-t.scrollLeft:e.translate=-t.scrollTop,e.translate===0&&(e.translate=0),e.updateActiveIndex(),e.updateSlidesClasses();let i;const o=e.maxTranslate()-e.minTranslate();o===0?i=0:i=(e.translate-e.minTranslate())/o,i!==e.progress&&e.updateProgress(r?-e.translate:e.translate),e.emit("setTranslate",e.translate,!1)}function nee(e){const t=this;om(t,e.target),!(t.params.cssMode||t.params.slidesPerView!=="auto"&&!t.params.autoHeight)&&t.update()}function iee(){const e=this;e.documentTouchHandlerProceeded||(e.documentTouchHandlerProceeded=!0,e.params.touchReleaseOnEdges&&(e.el.style.touchAction="auto"))}const OI=(e,t)=>{const r=ed(),{params:n,el:i,wrapperEl:o,device:s}=e,a=!!n.nested,l=t==="on"?"addEventListener":"removeEventListener",c=t;!i||typeof i=="string"||(r[l]("touchstart",e.onDocumentTouchStart,{passive:!1,capture:a}),i[l]("touchstart",e.onTouchStart,{passive:!1}),i[l]("pointerdown",e.onTouchStart,{passive:!1}),r[l]("touchmove",e.onTouchMove,{passive:!1,capture:a}),r[l]("pointermove",e.onTouchMove,{passive:!1,capture:a}),r[l]("touchend",e.onTouchEnd,{passive:!0}),r[l]("pointerup",e.onTouchEnd,{passive:!0}),r[l]("pointercancel",e.onTouchEnd,{passive:!0}),r[l]("touchcancel",e.onTouchEnd,{passive:!0}),r[l]("pointerout",e.onTouchEnd,{passive:!0}),r[l]("pointerleave",e.onTouchEnd,{passive:!0}),r[l]("contextmenu",e.onTouchEnd,{passive:!0}),(n.preventClicks||n.preventClicksPropagation)&&i[l]("click",e.onClick,!0),n.cssMode&&o[l]("scroll",e.onScroll),n.updateOnWindowResize?e[c](s.ios||s.android?"resize orientationchange observerUpdate":"resize observerUpdate",LR,!0):e[c]("observerUpdate",LR,!0),i[l]("load",e.onLoad,{capture:!0}))};function oee(){const e=this,{params:t}=e;e.onTouchStart=JZ.bind(e),e.onTouchMove=ZZ.bind(e),e.onTouchEnd=eee.bind(e),e.onDocumentTouchStart=iee.bind(e),t.cssMode&&(e.onScroll=ree.bind(e)),e.onClick=tee.bind(e),e.onLoad=nee.bind(e),OI(e,"on")}function see(){OI(this,"off")}var aee={attachEvents:oee,detachEvents:see};const IR=(e,t)=>e.grid&&t.grid&&t.grid.rows>1;function lee(){const e=this,{realIndex:t,initialized:r,params:n,el:i}=e,o=n.breakpoints;if(!o||o&&Object.keys(o).length===0)return;const s=e.getBreakpoint(o,e.params.breakpointsBase,e.el);if(!s||e.currentBreakpoint===s)return;const l=(s in o?o[s]:void 0)||e.originalParams,c=IR(e,n),u=IR(e,l),d=e.params.grabCursor,f=l.grabCursor,p=n.enabled;c&&!u?(i.classList.remove(`${n.containerModifierClass}grid`,`${n.containerModifierClass}grid-column`),e.emitContainerClasses()):!c&&u&&(i.classList.add(`${n.containerModifierClass}grid`),(l.grid.fill&&l.grid.fill==="column"||!l.grid.fill&&n.grid.fill==="column")&&i.classList.add(`${n.containerModifierClass}grid-column`),e.emitContainerClasses()),d&&!f?e.unsetGrabCursor():!d&&f&&e.setGrabCursor(),["navigation","pagination","scrollbar"].forEach(g=>{if(typeof l[g]>"u")return;const C=n[g]&&n[g].enabled,E=l[g]&&l[g].enabled;C&&!E&&e[g].disable(),!C&&E&&e[g].enable()});const h=l.direction&&l.direction!==n.direction,v=n.loop&&(l.slidesPerView!==n.slidesPerView||h),k=n.loop;h&&r&&e.changeDirection(),Si(e.params,l);const b=e.params.enabled,x=e.params.loop;Object.assign(e,{allowTouchMove:e.params.allowTouchMove,allowSlideNext:e.params.allowSlideNext,allowSlidePrev:e.params.allowSlidePrev}),p&&!b?e.disable():!p&&b&&e.enable(),e.currentBreakpoint=s,e.emit("_beforeBreakpoint",l),r&&(v?(e.loopDestroy(),e.loopCreate(t),e.updateSlides()):!k&&x?(e.loopCreate(t),e.updateSlides()):k&&!x&&e.loopDestroy()),e.emit("breakpoint",l)}function cee(e,t,r){if(t===void 0&&(t="window"),!e||t==="container"&&!r)return;let n=!1;const i=zi(),o=t==="window"?i.innerHeight:r.clientHeight,s=Object.keys(e).map(a=>{if(typeof a=="string"&&a.indexOf("@")===0){const l=parseFloat(a.substr(1));return{value:o*l,point:a}}return{value:a,point:a}});s.sort((a,l)=>parseInt(a.value,10)-parseInt(l.value,10));for(let a=0;a{typeof n=="object"?Object.keys(n).forEach(i=>{n[i]&&r.push(t+i)}):typeof n=="string"&&r.push(t+n)}),r}function fee(){const e=this,{classNames:t,params:r,rtl:n,el:i,device:o}=e,s=dee(["initialized",r.direction,{"free-mode":e.params.freeMode&&r.freeMode.enabled},{autoheight:r.autoHeight},{rtl:n},{grid:r.grid&&r.grid.rows>1},{"grid-column":r.grid&&r.grid.rows>1&&r.grid.fill==="column"},{android:o.android},{ios:o.ios},{"css-mode":r.cssMode},{centered:r.cssMode&&r.centeredSlides},{"watch-progress":r.watchSlidesProgress}],r.containerModifierClass);t.push(...s),i.classList.add(...t),e.emitContainerClasses()}function pee(){const e=this,{el:t,classNames:r}=e;!t||typeof t=="string"||(t.classList.remove(...r),e.emitContainerClasses())}var hee={addClasses:fee,removeClasses:pee};function mee(){const e=this,{isLocked:t,params:r}=e,{slidesOffsetBefore:n}=r;if(n){const i=e.slides.length-1,o=e.slidesGrid[i]+e.slidesSizesGrid[i]+n*2;e.isLocked=e.size>o}else e.isLocked=e.snapGrid.length===1;r.allowSlideNext===!0&&(e.allowSlideNext=!e.isLocked),r.allowSlidePrev===!0&&(e.allowSlidePrev=!e.isLocked),t&&t!==e.isLocked&&(e.isEnd=!1),t!==e.isLocked&&e.emit(e.isLocked?"lock":"unlock")}var gee={checkOverflow:mee},X1={init:!0,direction:"horizontal",oneWayMovement:!1,swiperElementNodeName:"SWIPER-CONTAINER",touchEventsTarget:"wrapper",initialSlide:0,speed:300,cssMode:!1,updateOnWindowResize:!0,resizeObserver:!0,nested:!1,createElements:!1,eventsPrefix:"swiper",enabled:!0,focusableElements:"input, select, option, textarea, button, video, label",width:null,height:null,preventInteractionOnTransition:!1,userAgent:null,url:null,edgeSwipeDetection:!1,edgeSwipeThreshold:20,autoHeight:!1,setWrapperSize:!1,virtualTranslate:!1,effect:"slide",breakpoints:void 0,breakpointsBase:"window",spaceBetween:0,slidesPerView:1,slidesPerGroup:1,slidesPerGroupSkip:0,slidesPerGroupAuto:!1,centeredSlides:!1,centeredSlidesBounds:!1,slidesOffsetBefore:0,slidesOffsetAfter:0,normalizeSlideIndex:!0,centerInsufficientSlides:!1,watchOverflow:!0,roundLengths:!1,touchRatio:1,touchAngle:45,simulateTouch:!0,shortSwipes:!0,longSwipes:!0,longSwipesRatio:.5,longSwipesMs:300,followFinger:!0,allowTouchMove:!0,threshold:5,touchMoveStopPropagation:!1,touchStartPreventDefault:!0,touchStartForcePreventDefault:!1,touchReleaseOnEdges:!1,uniqueNavElements:!0,resistance:!0,resistanceRatio:.85,watchSlidesProgress:!1,grabCursor:!1,preventClicks:!0,preventClicksPropagation:!0,slideToClickedSlide:!1,loop:!1,loopAddBlankSlides:!0,loopAdditionalSlides:0,loopPreventsSliding:!0,rewind:!1,allowSlidePrev:!0,allowSlideNext:!0,swipeHandler:null,noSwiping:!0,noSwipingClass:"swiper-no-swiping",noSwipingSelector:null,passiveListeners:!0,maxBackfaceHiddenSlides:10,containerModifierClass:"swiper-",slideClass:"swiper-slide",slideBlankClass:"swiper-slide-blank",slideActiveClass:"swiper-slide-active",slideVisibleClass:"swiper-slide-visible",slideFullyVisibleClass:"swiper-slide-fully-visible",slideNextClass:"swiper-slide-next",slidePrevClass:"swiper-slide-prev",wrapperClass:"swiper-wrapper",lazyPreloaderClass:"swiper-lazy-preloader",lazyPreloadPrevNext:0,runCallbacksOnInit:!0,_emitClasses:!1};function vee(e,t){return function(n){n===void 0&&(n={});const i=Object.keys(n)[0],o=n[i];if(typeof o!="object"||o===null){Si(t,n);return}if(e[i]===!0&&(e[i]={enabled:!0}),i==="navigation"&&e[i]&&e[i].enabled&&!e[i].prevEl&&!e[i].nextEl&&(e[i].auto=!0),["pagination","scrollbar"].indexOf(i)>=0&&e[i]&&e[i].enabled&&!e[i].el&&(e[i].auto=!0),!(i in e&&"enabled"in o)){Si(t,n);return}typeof e[i]=="object"&&!("enabled"in e[i])&&(e[i].enabled=!0),e[i]||(e[i]={enabled:!1}),Si(t,n)}}const Y0={eventsEmitter:hZ,update:kZ,translate:jZ,transition:AZ,slide:GZ,loop:KZ,grabCursor:QZ,events:aee,breakpoints:uee,checkOverflow:gee,classes:hee},Q0={};let jS=class xs{constructor(){let t,r;for(var n=arguments.length,i=new Array(n),o=0;o1){const u=[];return s.querySelectorAll(r.el).forEach(d=>{const f=Si({},r,{el:d});u.push(new xs(f))}),u}const a=this;a.__swiper__=!0,a.support=RI(),a.device=PI({userAgent:r.userAgent}),a.browser=dZ(),a.eventsListeners={},a.eventsAnyListeners=[],a.modules=[...a.__modules__],r.modules&&Array.isArray(r.modules)&&a.modules.push(...r.modules);const l={};a.modules.forEach(u=>{u({params:r,swiper:a,extendParams:vee(r,l),on:a.on.bind(a),once:a.once.bind(a),off:a.off.bind(a),emit:a.emit.bind(a)})});const c=Si({},X1,l);return a.params=Si({},c,Q0,r),a.originalParams=Si({},a.params),a.passedParams=Si({},r),a.params&&a.params.on&&Object.keys(a.params.on).forEach(u=>{a.on(u,a.params.on[u])}),a.params&&a.params.onAny&&a.onAny(a.params.onAny),Object.assign(a,{enabled:a.params.enabled,el:t,classNames:[],slides:[],slidesGrid:[],snapGrid:[],slidesSizesGrid:[],isHorizontal(){return a.params.direction==="horizontal"},isVertical(){return a.params.direction==="vertical"},activeIndex:0,realIndex:0,isBeginning:!0,isEnd:!1,translate:0,previousTranslate:0,progress:0,velocity:0,animating:!1,cssOverflowAdjustment(){return Math.trunc(this.translate/2**23)*2**23},allowSlideNext:a.params.allowSlideNext,allowSlidePrev:a.params.allowSlidePrev,touchEventsData:{isTouched:void 0,isMoved:void 0,allowTouchCallbacks:void 0,touchStartTime:void 0,isScrolling:void 0,currentTranslate:void 0,startTranslate:void 0,allowThresholdMove:void 0,focusableElements:a.params.focusableElements,lastClickTime:0,clickTimeout:void 0,velocities:[],allowMomentumBounce:void 0,startMoving:void 0,pointerId:null,touchId:null},allowClick:!0,allowTouchMove:a.params.allowTouchMove,touches:{startX:0,startY:0,currentX:0,currentY:0,diff:0},imagesToLoad:[],imagesLoaded:0}),a.emit("_swiper"),a.params.init&&a.init(),a}getDirectionLabel(t){return this.isHorizontal()?t:{width:"height","margin-top":"margin-left","margin-bottom ":"margin-right","margin-left":"margin-top","margin-right":"margin-bottom","padding-left":"padding-top","padding-right":"padding-bottom",marginRight:"marginBottom"}[t]}getSlideIndex(t){const{slidesEl:r,params:n}=this,i=Os(r,`.${n.slideClass}, swiper-slide`),o=PR(i[0]);return PR(t)-o}getSlideIndexByData(t){return this.getSlideIndex(this.slides.filter(r=>r.getAttribute("data-swiper-slide-index")*1===t)[0])}recalcSlides(){const t=this,{slidesEl:r,params:n}=t;t.slides=Os(r,`.${n.slideClass}, swiper-slide`)}enable(){const t=this;t.enabled||(t.enabled=!0,t.params.grabCursor&&t.setGrabCursor(),t.emit("enable"))}disable(){const t=this;t.enabled&&(t.enabled=!1,t.params.grabCursor&&t.unsetGrabCursor(),t.emit("disable"))}setProgress(t,r){const n=this;t=Math.min(Math.max(t,0),1);const i=n.minTranslate(),s=(n.maxTranslate()-i)*t+i;n.translateTo(s,typeof r>"u"?0:r),n.updateActiveIndex(),n.updateSlidesClasses()}emitContainerClasses(){const t=this;if(!t.params._emitClasses||!t.el)return;const r=t.el.className.split(" ").filter(n=>n.indexOf("swiper")===0||n.indexOf(t.params.containerModifierClass)===0);t.emit("_containerClasses",r.join(" "))}getSlideClasses(t){const r=this;return r.destroyed?"":t.className.split(" ").filter(n=>n.indexOf("swiper-slide")===0||n.indexOf(r.params.slideClass)===0).join(" ")}emitSlidesClasses(){const t=this;if(!t.params._emitClasses||!t.el)return;const r=[];t.slides.forEach(n=>{const i=t.getSlideClasses(n);r.push({slideEl:n,classNames:i}),t.emit("_slideClass",n,i)}),t.emit("_slideClasses",r)}slidesPerViewDynamic(t,r){t===void 0&&(t="current"),r===void 0&&(r=!1);const n=this,{params:i,slides:o,slidesGrid:s,slidesSizesGrid:a,size:l,activeIndex:c}=n;let u=1;if(typeof i.slidesPerView=="number")return i.slidesPerView;if(i.centeredSlides){let d=o[c]?Math.ceil(o[c].swiperSlideSize):0,f;for(let p=c+1;pl&&(f=!0));for(let p=c-1;p>=0;p-=1)o[p]&&!f&&(d+=o[p].swiperSlideSize,u+=1,d>l&&(f=!0))}else if(t==="current")for(let d=c+1;d=0;d-=1)s[c]-s[d]{s.complete&&om(t,s)}),t.updateSize(),t.updateSlides(),t.updateProgress(),t.updateSlidesClasses();function i(){const s=t.rtlTranslate?t.translate*-1:t.translate,a=Math.min(Math.max(s,t.maxTranslate()),t.minTranslate());t.setTranslate(a),t.updateActiveIndex(),t.updateSlidesClasses()}let o;if(n.freeMode&&n.freeMode.enabled&&!n.cssMode)i(),n.autoHeight&&t.updateAutoHeight();else{if((n.slidesPerView==="auto"||n.slidesPerView>1)&&t.isEnd&&!n.centeredSlides){const s=t.virtual&&n.virtual.enabled?t.virtual.slides:t.slides;o=t.slideTo(s.length-1,0,!1,!0)}else o=t.slideTo(t.activeIndex,0,!1,!0);o||i()}n.watchOverflow&&r!==t.snapGrid&&t.checkOverflow(),t.emit("update")}changeDirection(t,r){r===void 0&&(r=!0);const n=this,i=n.params.direction;return t||(t=i==="horizontal"?"vertical":"horizontal"),t===i||t!=="horizontal"&&t!=="vertical"||(n.el.classList.remove(`${n.params.containerModifierClass}${i}`),n.el.classList.add(`${n.params.containerModifierClass}${t}`),n.emitContainerClasses(),n.params.direction=t,n.slides.forEach(o=>{t==="vertical"?o.style.width="":o.style.height=""}),n.emit("changeDirection"),r&&n.update()),n}changeLanguageDirection(t){const r=this;r.rtl&&t==="rtl"||!r.rtl&&t==="ltr"||(r.rtl=t==="rtl",r.rtlTranslate=r.params.direction==="horizontal"&&r.rtl,r.rtl?(r.el.classList.add(`${r.params.containerModifierClass}rtl`),r.el.dir="rtl"):(r.el.classList.remove(`${r.params.containerModifierClass}rtl`),r.el.dir="ltr"),r.update())}mount(t){const r=this;if(r.mounted)return!0;let n=t||r.params.el;if(typeof n=="string"&&(n=document.querySelector(n)),!n)return!1;n.swiper=r,n.parentNode&&n.parentNode.host&&n.parentNode.host.nodeName===r.params.swiperElementNodeName.toUpperCase()&&(r.isElement=!0);const i=()=>`.${(r.params.wrapperClass||"").trim().split(" ").join(".")}`;let s=n&&n.shadowRoot&&n.shadowRoot.querySelector?n.shadowRoot.querySelector(i()):Os(n,i())[0];return!s&&r.params.createElements&&(s=Y1("div",r.params.wrapperClass),n.append(s),Os(n,`.${r.params.slideClass}`).forEach(a=>{s.append(a)})),Object.assign(r,{el:n,wrapperEl:s,slidesEl:r.isElement&&!n.parentNode.host.slideSlots?n.parentNode.host:s,hostEl:r.isElement?n.parentNode.host:n,mounted:!0,rtl:n.dir.toLowerCase()==="rtl"||_a(n,"direction")==="rtl",rtlTranslate:r.params.direction==="horizontal"&&(n.dir.toLowerCase()==="rtl"||_a(n,"direction")==="rtl"),wrongRTL:_a(s,"display")==="-webkit-box"}),!0}init(t){const r=this;if(r.initialized||r.mount(t)===!1)return r;r.emit("beforeInit"),r.params.breakpoints&&r.setBreakpoint(),r.addClasses(),r.updateSize(),r.updateSlides(),r.params.watchOverflow&&r.checkOverflow(),r.params.grabCursor&&r.enabled&&r.setGrabCursor(),r.params.loop&&r.virtual&&r.params.virtual.enabled?r.slideTo(r.params.initialSlide+r.virtual.slidesBefore,0,r.params.runCallbacksOnInit,!1,!0):r.slideTo(r.params.initialSlide,0,r.params.runCallbacksOnInit,!1,!0),r.params.loop&&r.loopCreate(),r.attachEvents();const i=[...r.el.querySelectorAll('[loading="lazy"]')];return r.isElement&&i.push(...r.hostEl.querySelectorAll('[loading="lazy"]')),i.forEach(o=>{o.complete?om(r,o):o.addEventListener("load",s=>{om(r,s.target)})}),Q1(r),r.initialized=!0,Q1(r),r.emit("init"),r.emit("afterInit"),r}destroy(t,r){t===void 0&&(t=!0),r===void 0&&(r=!0);const n=this,{params:i,el:o,wrapperEl:s,slides:a}=n;return typeof n.params>"u"||n.destroyed||(n.emit("beforeDestroy"),n.initialized=!1,n.detachEvents(),i.loop&&n.loopDestroy(),r&&(n.removeClasses(),o&&typeof o!="string"&&o.removeAttribute("style"),s&&s.removeAttribute("style"),a&&a.length&&a.forEach(l=>{l.classList.remove(i.slideVisibleClass,i.slideFullyVisibleClass,i.slideActiveClass,i.slideNextClass,i.slidePrevClass),l.removeAttribute("style"),l.removeAttribute("data-swiper-slide-index")})),n.emit("destroy"),Object.keys(n.eventsListeners).forEach(l=>{n.off(l)}),t!==!1&&(n.el&&typeof n.el!="string"&&(n.el.swiper=null),eZ(n)),n.destroyed=!0),null}static extendDefaults(t){Si(Q0,t)}static get extendedDefaults(){return Q0}static get defaults(){return X1}static installModule(t){xs.prototype.__modules__||(xs.prototype.__modules__=[]);const r=xs.prototype.__modules__;typeof t=="function"&&r.indexOf(t)<0&&r.push(t)}static use(t){return Array.isArray(t)?(t.forEach(r=>xs.installModule(r)),xs):(xs.installModule(t),xs)}};Object.keys(Y0).forEach(e=>{Object.keys(Y0[e]).forEach(t=>{jS.prototype[t]=Y0[e][t]})});jS.use([fZ,pZ]);const jI=["eventsPrefix","injectStyles","injectStylesUrls","modules","init","_direction","oneWayMovement","swiperElementNodeName","touchEventsTarget","initialSlide","_speed","cssMode","updateOnWindowResize","resizeObserver","nested","focusableElements","_enabled","_width","_height","preventInteractionOnTransition","userAgent","url","_edgeSwipeDetection","_edgeSwipeThreshold","_freeMode","_autoHeight","setWrapperSize","virtualTranslate","_effect","breakpoints","breakpointsBase","_spaceBetween","_slidesPerView","maxBackfaceHiddenSlides","_grid","_slidesPerGroup","_slidesPerGroupSkip","_slidesPerGroupAuto","_centeredSlides","_centeredSlidesBounds","_slidesOffsetBefore","_slidesOffsetAfter","normalizeSlideIndex","_centerInsufficientSlides","_watchOverflow","roundLengths","touchRatio","touchAngle","simulateTouch","_shortSwipes","_longSwipes","longSwipesRatio","longSwipesMs","_followFinger","allowTouchMove","_threshold","touchMoveStopPropagation","touchStartPreventDefault","touchStartForcePreventDefault","touchReleaseOnEdges","uniqueNavElements","_resistance","_resistanceRatio","_watchSlidesProgress","_grabCursor","preventClicks","preventClicksPropagation","_slideToClickedSlide","_loop","loopAdditionalSlides","loopAddBlankSlides","loopPreventsSliding","_rewind","_allowSlidePrev","_allowSlideNext","_swipeHandler","_noSwiping","noSwipingClass","noSwipingSelector","passiveListeners","containerModifierClass","slideClass","slideActiveClass","slideVisibleClass","slideFullyVisibleClass","slideNextClass","slidePrevClass","slideBlankClass","wrapperClass","lazyPreloaderClass","lazyPreloadPrevNext","runCallbacksOnInit","observer","observeParents","observeSlideChildren","a11y","_autoplay","_controller","coverflowEffect","cubeEffect","fadeEffect","flipEffect","creativeEffect","cardsEffect","hashNavigation","history","keyboard","mousewheel","_navigation","_pagination","parallax","_scrollbar","_thumbs","virtual","zoom","control"];function tc(e){return typeof e=="object"&&e!==null&&e.constructor&&Object.prototype.toString.call(e).slice(8,-1)==="Object"&&!e.__swiper__}function hu(e,t){const r=["__proto__","constructor","prototype"];Object.keys(t).filter(n=>r.indexOf(n)<0).forEach(n=>{typeof e[n]>"u"?e[n]=t[n]:tc(t[n])&&tc(e[n])&&Object.keys(t[n]).length>0?t[n].__swiper__?e[n]=t[n]:hu(e[n],t[n]):e[n]=t[n]})}function LI(e){return e===void 0&&(e={}),e.navigation&&typeof e.navigation.nextEl>"u"&&typeof e.navigation.prevEl>"u"}function II(e){return e===void 0&&(e={}),e.pagination&&typeof e.pagination.el>"u"}function MI(e){return e===void 0&&(e={}),e.scrollbar&&typeof e.scrollbar.el>"u"}function AI(e){e===void 0&&(e="");const t=e.split(" ").map(n=>n.trim()).filter(n=>!!n),r=[];return t.forEach(n=>{r.indexOf(n)<0&&r.push(n)}),r.join(" ")}function yee(e){return e===void 0&&(e=""),e?e.includes("swiper-wrapper")?e:`swiper-wrapper ${e}`:"swiper-wrapper"}function bee(e){let{swiper:t,slides:r,passedParams:n,changedParams:i,nextEl:o,prevEl:s,scrollbarEl:a,paginationEl:l}=e;const c=i.filter(P=>P!=="children"&&P!=="direction"&&P!=="wrapperClass"),{params:u,pagination:d,navigation:f,scrollbar:p,virtual:h,thumbs:v}=t;let k,b,x,g,C,E,j,R;i.includes("thumbs")&&n.thumbs&&n.thumbs.swiper&&u.thumbs&&!u.thumbs.swiper&&(k=!0),i.includes("controller")&&n.controller&&n.controller.control&&u.controller&&!u.controller.control&&(b=!0),i.includes("pagination")&&n.pagination&&(n.pagination.el||l)&&(u.pagination||u.pagination===!1)&&d&&!d.el&&(x=!0),i.includes("scrollbar")&&n.scrollbar&&(n.scrollbar.el||a)&&(u.scrollbar||u.scrollbar===!1)&&p&&!p.el&&(g=!0),i.includes("navigation")&&n.navigation&&(n.navigation.prevEl||s)&&(n.navigation.nextEl||o)&&(u.navigation||u.navigation===!1)&&f&&!f.prevEl&&!f.nextEl&&(C=!0);const O=P=>{t[P]&&(t[P].destroy(),P==="navigation"?(t.isElement&&(t[P].prevEl.remove(),t[P].nextEl.remove()),u[P].prevEl=void 0,u[P].nextEl=void 0,t[P].prevEl=void 0,t[P].nextEl=void 0):(t.isElement&&t[P].el.remove(),u[P].el=void 0,t[P].el=void 0))};i.includes("loop")&&t.isElement&&(u.loop&&!n.loop?E=!0:!u.loop&&n.loop?j=!0:R=!0),c.forEach(P=>{if(tc(u[P])&&tc(n[P]))Object.assign(u[P],n[P]),(P==="navigation"||P==="pagination"||P==="scrollbar")&&"enabled"in n[P]&&!n[P].enabled&&O(P);else{const L=n[P];(L===!0||L===!1)&&(P==="navigation"||P==="pagination"||P==="scrollbar")?L===!1&&O(P):u[P]=n[P]}}),c.includes("controller")&&!b&&t.controller&&t.controller.control&&u.controller&&u.controller.control&&(t.controller.control=u.controller.control),i.includes("children")&&r&&h&&u.virtual.enabled?(h.slides=r,h.update(!0)):i.includes("virtual")&&h&&u.virtual.enabled&&(r&&(h.slides=r),h.update(!0)),i.includes("children")&&r&&u.loop&&(R=!0),k&&v.init()&&v.update(!0),b&&(t.controller.control=u.controller.control),x&&(t.isElement&&(!l||typeof l=="string")&&(l=document.createElement("div"),l.classList.add("swiper-pagination"),l.part.add("pagination"),t.el.appendChild(l)),l&&(u.pagination.el=l),d.init(),d.render(),d.update()),g&&(t.isElement&&(!a||typeof a=="string")&&(a=document.createElement("div"),a.classList.add("swiper-scrollbar"),a.part.add("scrollbar"),t.el.appendChild(a)),a&&(u.scrollbar.el=a),p.init(),p.updateSize(),p.setTranslate()),C&&(t.isElement&&((!o||typeof o=="string")&&(o=document.createElement("div"),o.classList.add("swiper-button-next"),o.innerHTML=t.hostEl.constructor.nextButtonSvg,o.part.add("button-next"),t.el.appendChild(o)),(!s||typeof s=="string")&&(s=document.createElement("div"),s.classList.add("swiper-button-prev"),s.innerHTML=t.hostEl.constructor.prevButtonSvg,s.part.add("button-prev"),t.el.appendChild(s))),o&&(u.navigation.nextEl=o),s&&(u.navigation.prevEl=s),f.init(),f.update()),i.includes("allowSlideNext")&&(t.allowSlideNext=n.allowSlideNext),i.includes("allowSlidePrev")&&(t.allowSlidePrev=n.allowSlidePrev),i.includes("direction")&&t.changeDirection(n.direction,!1),(E||R)&&t.loopDestroy(),(j||R)&&t.loopCreate(),t.update()}function wee(e,t){e===void 0&&(e={}),t===void 0&&(t=!0);const r={on:{}},n={},i={};hu(r,X1),r._emitClasses=!0,r.init=!1;const o={},s=jI.map(l=>l.replace(/_/,"")),a=Object.assign({},e);return Object.keys(a).forEach(l=>{typeof e[l]>"u"||(s.indexOf(l)>=0?tc(e[l])?(r[l]={},i[l]={},hu(r[l],e[l]),hu(i[l],e[l])):(r[l]=e[l],i[l]=e[l]):l.search(/on[A-Z]/)===0&&typeof e[l]=="function"?t?n[`${l[2].toLowerCase()}${l.substr(3)}`]=e[l]:r.on[`${l[2].toLowerCase()}${l.substr(3)}`]=e[l]:o[l]=e[l])}),["navigation","pagination","scrollbar"].forEach(l=>{r[l]===!0&&(r[l]={}),r[l]===!1&&delete r[l]}),{params:r,passedParams:i,rest:o,events:n}}function xee(e,t){let{el:r,nextEl:n,prevEl:i,paginationEl:o,scrollbarEl:s,swiper:a}=e;LI(t)&&n&&i&&(a.params.navigation.nextEl=n,a.originalParams.navigation.nextEl=n,a.params.navigation.prevEl=i,a.originalParams.navigation.prevEl=i),II(t)&&o&&(a.params.pagination.el=o,a.originalParams.pagination.el=o),MI(t)&&s&&(a.params.scrollbar.el=s,a.originalParams.scrollbar.el=s),a.init(r)}function See(e,t,r,n,i){const o=[];if(!t)return o;const s=l=>{o.indexOf(l)<0&&o.push(l)};if(r&&n){const l=n.map(i),c=r.map(i);l.join("")!==c.join("")&&s("children"),n.length!==r.length&&s("children")}return jI.filter(l=>l[0]==="_").map(l=>l.replace(/_/,"")).forEach(l=>{if(l in e&&l in t)if(tc(e[l])&&tc(t[l])){const c=Object.keys(e[l]),u=Object.keys(t[l]);c.length!==u.length?s(l):(c.forEach(d=>{e[l][d]!==t[l][d]&&s(l)}),u.forEach(d=>{e[l][d]!==t[l][d]&&s(l)}))}else e[l]!==t[l]&&s(l)}),o}const Cee=e=>{!e||e.destroyed||!e.params.virtual||e.params.virtual&&!e.params.virtual.enabled||(e.updateSlides(),e.updateProgress(),e.updateSlidesClasses(),e.parallax&&e.params.parallax&&e.params.parallax.enabled&&e.parallax.setTranslate())};function Sg(){return Sg=Object.assign?Object.assign.bind():function(e){for(var t=1;t{NI(r)?t.push(r):r.props&&r.props.children&&DI(r.props.children).forEach(n=>t.push(n))}),t}function _ee(e){const t=[],r={"container-start":[],"container-end":[],"wrapper-start":[],"wrapper-end":[]};return Lt.Children.toArray(e).forEach(n=>{if(NI(n))t.push(n);else if(n.props&&n.props.slot&&r[n.props.slot])r[n.props.slot].push(n);else if(n.props&&n.props.children){const i=DI(n.props.children);i.length>0?i.forEach(o=>t.push(o)):r["container-end"].push(n)}else r["container-end"].push(n)}),{slides:t,slots:r}}function kee(e,t,r){if(!r)return null;const n=u=>{let d=u;return u<0?d=t.length+u:d>=t.length&&(d=d-t.length),d},i=e.isHorizontal()?{[e.rtlTranslate?"right":"left"]:`${r.offset}px`}:{top:`${r.offset}px`},{from:o,to:s}=r,a=e.params.loop?-t.length:0,l=e.params.loop?t.length*2:t.length,c=[];for(let u=a;u=o&&u<=s&&c.push(t[n(u)]);return c.map((u,d)=>Lt.cloneElement(u,{swiper:e,style:i,key:u.props.virtualIndex||u.key||`slide-${d}`}))}function yf(e,t){return typeof window>"u"?_.useEffect(e,t):_.useLayoutEffect(e,t)}const MR=_.createContext(null),Eee=_.createContext(null),Lp=_.forwardRef(function(e,t){let{className:r,tag:n="div",wrapperTag:i="div",children:o,onSwiper:s,...a}=e===void 0?{}:e,l=!1;const[c,u]=_.useState("swiper"),[d,f]=_.useState(null),[p,h]=_.useState(!1),v=_.useRef(!1),k=_.useRef(null),b=_.useRef(null),x=_.useRef(null),g=_.useRef(null),C=_.useRef(null),E=_.useRef(null),j=_.useRef(null),R=_.useRef(null),{params:O,passedParams:P,rest:L,events:A}=wee(a),{slides:$,slots:F}=_ee(o),K=()=>{h(!p)};Object.assign(O.on,{_containerClasses(H,ae){u(ae)}});const Y=()=>{Object.assign(O.on,A),l=!0;const H={...O};if(delete H.wrapperClass,b.current=new jS(H),b.current.virtual&&b.current.params.virtual.enabled){b.current.virtual.slides=$;const ae={cache:!1,slides:$,renderExternal:f,renderExternalUpdate:!1};hu(b.current.params.virtual,ae),hu(b.current.originalParams.virtual,ae)}};k.current||Y(),b.current&&b.current.on("_beforeBreakpoint",K);const Z=()=>{l||!A||!b.current||Object.keys(A).forEach(H=>{b.current.on(H,A[H])})},le=()=>{!A||!b.current||Object.keys(A).forEach(H=>{b.current.off(H,A[H])})};_.useEffect(()=>()=>{b.current&&b.current.off("_beforeBreakpoint",K)}),_.useEffect(()=>{!v.current&&b.current&&(b.current.emitSlidesClasses(),v.current=!0)}),yf(()=>{if(t&&(t.current=k.current),!!k.current)return b.current.destroyed&&Y(),xee({el:k.current,nextEl:C.current,prevEl:E.current,paginationEl:j.current,scrollbarEl:R.current,swiper:b.current},O),s&&!b.current.destroyed&&s(b.current),()=>{b.current&&!b.current.destroyed&&b.current.destroy(!0,!1)}},[]),yf(()=>{Z();const H=See(P,x.current,$,g.current,ae=>ae.key);return x.current=P,g.current=$,H.length&&b.current&&!b.current.destroyed&&bee({swiper:b.current,slides:$,passedParams:P,changedParams:H,nextEl:C.current,prevEl:E.current,scrollbarEl:R.current,paginationEl:j.current}),()=>{le()}}),yf(()=>{Cee(b.current)},[d]);function V(){return O.virtual?kee(b.current,$,d):$.map((H,ae)=>Lt.cloneElement(H,{swiper:b.current,swiperSlideIndex:ae}))}return Lt.createElement(n,Sg({ref:k,className:AI(`${c}${r?` ${r}`:""}`)},L),Lt.createElement(Eee.Provider,{value:b.current},F["container-start"],Lt.createElement(i,{className:yee(O.wrapperClass)},F["wrapper-start"],V(),F["wrapper-end"]),LI(O)&&Lt.createElement(Lt.Fragment,null,Lt.createElement("div",{ref:E,className:"swiper-button-prev"}),Lt.createElement("div",{ref:C,className:"swiper-button-next"})),MI(O)&&Lt.createElement("div",{ref:R,className:"swiper-scrollbar"}),II(O)&&Lt.createElement("div",{ref:j,className:"swiper-pagination"}),F["container-end"]))});Lp.displayName="Swiper";const Uu=_.forwardRef(function(e,t){let{tag:r="div",children:n,className:i="",swiper:o,zoom:s,lazy:a,virtualIndex:l,swiperSlideIndex:c,...u}=e===void 0?{}:e;const d=_.useRef(null),[f,p]=_.useState("swiper-slide"),[h,v]=_.useState(!1);function k(C,E,j){E===d.current&&p(j)}yf(()=>{if(typeof c<"u"&&(d.current.swiperSlideIndex=c),t&&(t.current=d.current),!(!d.current||!o)){if(o.destroyed){f!=="swiper-slide"&&p("swiper-slide");return}return o.on("_slideClass",k),()=>{o&&o.off("_slideClass",k)}}}),yf(()=>{o&&d.current&&!o.destroyed&&p(o.getSlideClasses(d.current))},[o]);const b={isActive:f.indexOf("swiper-slide-active")>=0,isVisible:f.indexOf("swiper-slide-visible")>=0,isPrev:f.indexOf("swiper-slide-prev")>=0,isNext:f.indexOf("swiper-slide-next")>=0},x=()=>typeof n=="function"?n(b):n,g=()=>{v(!0)};return Lt.createElement(r,Sg({ref:d,className:AI(`${f}${i?` ${i}`:""}`),"data-swiper-slide-index":l,onLoad:g},u),s&&Lt.createElement(MR.Provider,{value:b},Lt.createElement("div",{className:"swiper-zoom-container","data-swiper-zoom":typeof s=="number"?s:void 0},x(),a&&!h&&Lt.createElement("div",{className:"swiper-lazy-preloader"}))),!s&&Lt.createElement(MR.Provider,{value:b},x(),a&&!h&&Lt.createElement("div",{className:"swiper-lazy-preloader"})))});Uu.displayName="SwiperSlide";const Ree=({guild:e})=>{const t=_.useRef(null),[r,n]=_.useState(1);_.useLayoutEffect(()=>(i(),window.addEventListener("resize",i),()=>window.removeEventListener("resize",i)));const i=_.useCallback(()=>{if(!t.current)return;const{width:o,height:s}=t.current.getBoundingClientRect(),a=o/1e3,l=s/700,c=Math.min(a,l,1);n(c??1)},[]);return y.jsx("div",{ref:t,style:{width:"100%",maxWidth:"1000px",height:"100%",maxHeight:"700px",display:"flex",alignItems:"center",justifyContent:"center"},children:y.jsxs("div",{style:{width:`${1e3*r}px`,height:`${700*r}px`,display:"flex",flexDirection:"row"},children:[y.jsx("div",{className:"card-front",style:{backgroundImage:`url(${cr.get(`${e}_front`)})`,"--scale":r,borderTopRightRadius:0,borderBottomRightRadius:0}}),y.jsx("div",{className:"card-back",style:{backgroundImage:`url(${cr.get(`${e}_back`)})`,"--scale":r,borderTopLeftRadius:0,borderBottomLeftRadius:0}})]})})};function BI({guild:e}){const t=_.useRef(null),r=_.useRef(null),[n,i]=_.useState(1);_.useLayoutEffect(()=>(o(),window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)));const o=_.useCallback(()=>{if(!t.current)return;const{width:s,height:a}=t.current.getBoundingClientRect(),l=s/500,c=a/700,u=Math.min(l,c,1);i(u??1)},[]);return y.jsx("div",{ref:t,style:{width:"100%",maxWidth:"500px",height:"100%",maxHeight:"700px",display:"flex",alignItems:"center",justifyContent:"center"},children:y.jsx("div",{ref:r,className:"flip-card",onClick:()=>{var s;(s=r.current)==null||s.classList.toggle("flipped")},children:y.jsxs("div",{className:"flip-card-inner",children:[y.jsx("div",{className:"flip-card-front",children:y.jsx("div",{className:"card-front",style:{backgroundImage:`url(${cr.get(`${e}_front`)})`,"--scale":n}})}),y.jsx("div",{className:"flip-card-back",children:y.jsx("div",{className:"card-back",style:{backgroundImage:`url(${cr.get(`${e}_back`)})`,"--scale":n}})})]})})})}function Pee(){const[e,t]=_.useState(!1),[r,n]=_.useState(!1),i=UD(_.useCallback(s=>s.nextLocation.pathname.startsWith("/game")?(t(!0),!0):!1,[t]));_.useEffect(()=>{n(!0)},[r,n]);const{active:o}=ra();return y.jsxs(tr,{style:{width:"100%",height:"100%",display:"flex",flexDirection:"row"},children:[y.jsx(ps,{children:y.jsxs(tr,{sx:{width:"100%",display:"flex",flexDirection:"row",justifyContent:"space-between"},children:[y.jsxs(Za,{separator:y.jsx(lc,{fontSize:"small"}),children:[y.jsx(Io,{color:"inherit",href:"/game",size:"small",disabled:o,children:y.jsx(wS,{})}),o?y.jsx(_t,{children:"Draft"}):y.jsx(xo,{underline:"hover",color:"inherit",href:"/game/draft",children:"Draft"}),y.jsx(_t,{children:"Play"})]}),y.jsx(SS,{})]})}),y.jsx(Tee,{}),y.jsx(nG,{open:e,onClose:()=>t(!1),autoHideDuration:5e3,children:y.jsx(D6,{severity:"warning",action:y.jsx(br,{size:"small",onClick:i.proceed,children:"Exit Game"}),children:"Making changes to the team selections will reset the game state."})})]})}function Tee(){const e=qn(),t=hx(e.breakpoints.up("sm")),{active:r}=ra(),{gameState1$:n,gameState2$:i}=ey(),[o,s]=_.useState();_.useEffect(()=>{if(!n)return;let d=!1;return(async()=>{const p=await Gr(n);d||s(p)})(),()=>{d=!0}},[n]);const[a,l]=_.useState();_.useEffect(()=>{if(!i)return;let d=!1;return(async()=>{const p=await Gr(i);d||l(p)})(),()=>{d=!0}},[i]);const[c,u]=fo(async d=>{if(!o||!a)return;const f=await d.models.find().where("id").in(o.roster.map(k=>k.name)).exec(),p=await Promise.all(f.map(k=>k.expand()));Ys(p,"id",o.roster.map(k=>k.name));const h=await d.models.find().where("id").in(a.roster.map(k=>k.name)).exec(),v=await Promise.all(h.map(k=>k.expand()));return Ys(v,"id",a.roster.map(k=>k.name)),[p,v]},[o,a])??[];return!o||!a||!c||!u?null:t?y.jsxs(y.Fragment,{children:[y.jsx(X0,{teams:[o],rosters:[c],disabled:[!1]}),y.jsx(Zi,{orientation:"vertical"}),y.jsx(X0,{teams:[a],rosters:[u],disabled:[!!r]})]}):y.jsx(X0,{teams:[o,a],rosters:[c,u],disabled:[!1,!!r]})}const X0=({teams:e,rosters:t,disabled:r})=>{const n=qn(),i=hx(n.breakpoints.up("sm")),o=_.useRef(null),[s,a]=_.useState(!1),[l,c]=_.useState(0),[u,d]=_.useState(!0),[f,p]=_.useState(500),[h,v]=_.useState(700),[k,b]=_.useState(700);_.useLayoutEffect(()=>(x(),window.addEventListener("resize",x),()=>window.removeEventListener("resize",x)));const x=_.useCallback(()=>{var j,R;const g=((j=o.current)==null?void 0:j.getBoundingClientRect().width)??0,C=((R=o.current)==null?void 0:R.getBoundingClientRect().height)??0,E=i?56:112;p(Math.min(g-12,(C-E)*5/7-12)),v(Math.min(C-E-12,g*7/5-12)),b(C-E)},[i]);return y.jsxs("div",{ref:o,style:{width:"100%",display:"flex",flexDirection:"column"},children:[y.jsx(AJ,{disabled:r,teams:e,rosters:t,expanded:u,onClick:(g,C)=>{c(g),d(C),a(!C)}}),y.jsx("div",{style:{position:"relative",overflow:"hidden",flexGrow:1},children:y.jsx(wv,{disablePortal:!0,sx:{zIndex:1100},open:s,onClose:()=>{a(!1),d(!0)},componentsProps:{root:{style:{position:"absolute",display:"flex",alignItems:"center",justifyContent:"center"}},backdrop:{style:{position:"absolute"}}},children:y.jsx(Lp,{initialSlide:l,direction:"vertical",centeredSlides:!0,spaceBetween:(k-Math.min(h,500))/2,onInit:g=>{g.el.style.width=`${Math.min(f,500)}px`,g.el.style.height=`${Math.min(h,700)}px`},style:{overflow:"visible"},children:e.map((g,C)=>[()=>y.jsx(BI,{guild:g.guild}),t[C].map((E,j)=>()=>y.jsx(_I,{model:E,health$:g.get$("roster").pipe(qt(R=>R[j].health)),children:y.jsx(Oee,{model:E,state:e[C],disabled:r[C]})}))]).flat(2).map((g,C)=>y.jsx(Uu,{children:y.jsx("div",{style:{height:"100%",display:"flex",flexDirection:"column",justifyContent:"center"},children:g==null?void 0:g()})},C))})})})]})};function Oee({state:e,model:t,disabled:r=!1}){return y.jsx(us,{elevation:2,sx:{position:"absolute",right:0,bottom:0},children:y.jsx(SI,{state:e,model:t,disabled:r,stacked:!0})})}function jee(){const e=Zs(),{setting$:t}=di(),[r,n]=_.useState(null);_.useEffect(()=>{t&&Gr(t).then(p=>p==null?void 0:p.incrementalPatch({gamePlayRoute:`${e.pathname}${e.search}`})).catch(console.error)},[e,t]);const{gbdb:i}=Qn(),{active:o,netDoc:s}=ra(),a=o?s==null?void 0:s.get("uid"):"Player1",l=o?s==null?void 0:s.get("oid"):"Player2",[c,u]=_.useState();_.useEffect(()=>{const p=i==null?void 0:i.game_state.findOne(a).$;if(u(p),!p)return;let h=!1;return(async()=>{if(h)return;await Gr(p)===null&&await(i==null?void 0:i.game_state.upsert({_id:a,roster:[]}))})().catch(console.error),()=>{h=!0}},[i,a]);const[d,f]=_.useState();return _.useEffect(()=>{const p=i==null?void 0:i.game_state.findOne(l).$;if(f(p),!p)return;let h=!1;return(async()=>{if(h)return;await Gr(p)===null&&!o&&await(i==null?void 0:i.game_state.upsert({_id:l,roster:[]}))})().catch(console.error),()=>{h=!0}},[i,l,o]),y.jsxs("main",{style:{width:"100%",height:"100%",overflow:"auto",display:"flex"},children:[y.jsxs(ps,{children:[y.jsx(tr,{ref:p=>n(p),sx:{width:"100%",display:"flex",flexDirection:"row"}}),y.jsx(nQ,{})]}),y.jsx(bS.Provider,{value:r,children:y.jsx(Jw,{context:{gameState1$:c,gameState2$:d}})})]})}function Lee({model:e}){const{setting$:t}=di(),r=_.useRef(null),[n,i]=_.useState(1),[o,s]=_.useState();_.useEffect(()=>{const d=t==null?void 0:t.pipe(qt(f=>f==null?void 0:f.toJSON().data.cardPreferences.preferredStyle)).subscribe(f=>s(f));return()=>d==null?void 0:d.unsubscribe()},[t]),_.useLayoutEffect(()=>(a(),window.addEventListener("resize",a),()=>window.removeEventListener("resize",a)));const a=_.useCallback(()=>{if(!r.current)return;const{width:d,height:f}=r.current.getBoundingClientRect(),p=d/1e3,h=f/700,v=Math.min(p,h,1);i(v??1)},[]),l=e.id,u=o==="gbcp"&&(cr.has(`${l}_gbcp_front`)||cr.has(`${l}_full`))?cr.get(`${l}_full`)??void 0:void 0;return y.jsx("div",{ref:r,style:{width:"100%",maxWidth:"1000px",height:"100%",maxHeight:"700px",display:"flex",alignItems:"center",justifyContent:"center"},children:y.jsxs("div",{style:{width:`${1e3*n}px`,height:`${700*n}px`,display:"flex",flexDirection:"row",...u?{backgroundImage:`url(${u})`,backgroundSize:"100%",backgroundRepeat:"no-repeat",backgroundPosition:"center center",borderRadius:`${25*n}px`}:{}},children:[y.jsx(yg,{model:e,noBackground:!!u,style:{"--scale":n,borderTopRightRadius:0,borderBottomRightRadius:0}}),y.jsx(bg,{model:e,noBackground:!!u,style:{"--scale":n,borderTopLeftRadius:0,borderBottomLeftRadius:0}})]})})}const Iee="/assets/GB-S4-Reference-1-Cx3eC7d4.png",Mee="/assets/GB-S4-Reference-2-CJ4YgyH9.png",Aee="/assets/GB-S4-Reference-3-BTbZpB51.png",Nee="/assets/GB-S4-Reference-4-CpP58Tap.png",Dee="/assets/GB-S4-Reference-5-Be8xjsp1.png",Bee=new URL("/assets/GB-S4-Gameplans-2019-Dp99TQ1B.png",import.meta.url).href,$I=e=>{const t=e.gameplan,r=new Intl.NumberFormat("en-US",{signDisplay:"always"});return y.jsx("div",{className:`card-front ${e.bleed?"bleed":null}`,style:{width:"100%",height:"100%",backgroundImage:`url(${Bee})`,...e.style},children:y.jsxs("div",{className:"overlay",children:[y.jsx("div",{style:{height:"255px",flexShrink:0}}),y.jsxs("div",{style:{height:"100%",display:"flex",flexDirection:"column",alignItems:"center",fontFamily:"Crimson Text",letterSpacing:"-1px"},children:[y.jsx("div",{style:{fontFamily:"IM Fell Great Primer SC",fontSize:"33.33pt",display:"flex",flexDirection:"column",alignItems:"center",lineHeight:"0.8em",margin:"0.25em 0"},children:t.title.split(/\n/).map((n,i)=>y.jsx("span",{children:n.split(/(?=[A-Z])/).map((o,s)=>y.jsx("span",{className:new RegExp("^\\p{Lu}","u").test(o)?"dropcap":"",children:y.jsx("span",{children:o},`p${i}s${s}c`)},`p${i}s${s}`))},`l${i}`))}),y.jsxs("div",{style:{fontSize:"20pt",margin:"0 1em",whiteSpace:"pre-wrap",display:"flex",flexDirection:"column",alignItems:"center"},children:[t.text,y.jsx("p",{style:{fontStyle:"italic",margin:"0.5em 0"},children:t.detail})]}),y.jsx("div",{style:{fontSize:"35pt",position:"absolute",bottom:40,left:40,width:"80px",height:"80px",borderRadius:"40px",boxSizing:"border-box",display:"flex",alignItems:"center",justifyContent:"center"},children:r.format(t.initiative)}),y.jsx("div",{style:{fontSize:"35pt",position:"absolute",bottom:40,right:40,width:"80px",height:"80px",borderRadius:"40px",boxSizing:"border-box",display:"flex",alignItems:"center",justifyContent:"center"},children:r.format(t.influence)}),y.jsx("div",{style:{fontFamily:"serif",fontSize:"10pt",position:"absolute",bottom:"2em",letterSpacing:0,wordSpacing:0},children:"™ & © Steamforged Games LTD 2019"})]})]})})},FI=e=>{const t=_.useRef(null),[r,n]=_.useState(1);_.useLayoutEffect(()=>(i(),window.addEventListener("resize",i),()=>window.removeEventListener("resize",i)));const i=_.useCallback(()=>{if(!t.current)return;const{width:o,height:s}=t.current.getBoundingClientRect(),a=o/500,l=s/700,c=Math.min(a,l,1);n(c??1)},[]);return y.jsx("div",{ref:t,style:{width:"100%",maxWidth:"500px",height:"100%",maxHeight:"700px",padding:0,margin:0},children:y.jsx("div",{style:{width:`${500*r}px`,height:`${700*r}px`,display:"flex","--scale":r},children:e.children})})},$ee=e=>y.jsx(FI,{children:y.jsx($I,{...e})}),zI=e=>{const t=new URL(Object.assign({"../assets/cards/Reference/GB-S4-Reference-1.png":Iee,"../assets/cards/Reference/GB-S4-Reference-2.png":Mee,"../assets/cards/Reference/GB-S4-Reference-3.png":Aee,"../assets/cards/Reference/GB-S4-Reference-4.png":Nee,"../assets/cards/Reference/GB-S4-Reference-5.png":Dee})[`../assets/cards/Reference/GB-S4-Reference-${e.index}.png`],import.meta.url).href;return y.jsx("div",{className:`card-front ${e.bleed?"bleed":null}`,style:{width:"100%",height:"100%",backgroundImage:`url(${t})`,...e.style}})},Fee=e=>y.jsx(FI,{children:y.jsx(zI,{...e})});function zee(){const e=Zs(),{setting$:t}=di(),[r]=mB(),n=_.useRef(r.get("m"));return _.useEffect(()=>{if(t)return Gr(t).then(i=>i==null?void 0:i.incrementalPatch({libraryRoute:`${e.pathname}?m=${n.current}`})).catch(console.error),()=>{Gr(t).then(i=>i==null?void 0:i.incrementalPatch({libraryRoute:`${e.pathname}?m=${n.current}`})).catch(console.error)}},[e,t]),y.jsx("main",{style:{display:"flex",flexDirection:"column-reverse",width:"100%",height:"100%"},children:y.jsx(_.Suspense,{fallback:y.jsx("p",{children:"Loading ..."}),children:y.jsx(Jw,{context:{slideRef:n}})})})}function Uee(){const{slideRef:e}=pp();return e.current=0,y.jsxs(y.Fragment,{children:[y.jsx(ps,{children:y.jsx(Za,{separator:y.jsx(lc,{fontSize:"small"}),children:y.jsx(_t,{children:"Library"})})}),y.jsx(nI,{Controller:Gee}),y.jsx(cc,{})]})}function Gee(e){const t=Ya();return _.useEffect(()=>{const r=e.update$.subscribe(n=>t(n));return()=>r.unsubscribe()},[t,e.update$]),y.jsxs("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-evenly",margin:"5px"},children:[y.jsx(G1,{g:{key:"gameplans",name:"gameplans",icon:"GB",style:{color:"#f8f7f4"}},pickTeam:()=>t("gameplans"),size:e.size}),y.jsx(G1,{g:{key:"refcards",name:"Rules",icon:"GB",style:{color:"#f8f7f4"}},pickTeam:()=>t("refcards"),size:e.size})]})}function Wee(){const{guild:e}=LD(),t=qn(),r=hx(t.breakpoints.up("sm")),n=_.useRef(null),[i,o]=_.useState(r?1e3:500),[s,a]=_.useState(700),l=_.useCallback(()=>{var b,x;const v=((b=n.current)==null?void 0:b.getBoundingClientRect().width)??0,k=((x=n.current)==null?void 0:x.getBoundingClientRect().height)??0;o(Math.min(v,k*(r?10:5)/7)-12),a(Math.min(k,v*7/5)-12)},[r]);_.useLayoutEffect(()=>(l(),window.addEventListener("resize",l),()=>window.removeEventListener("resize",l)));const[c,u]=_.useState(null),d=Ya(),{slideRef:f}=pp(),[p,h]=fo(async v=>{const[k,b]=await Promise.all([v.guilds.findOne().where({name:e}).exec(),v.models.find().or([{guild1:e},{guild2:e}]).exec()]);if(!k||!b.length){d("/library");return}Ys(b,"id",k.roster);const x=await Promise.all(b.map(g=>g.expand()));return[k,x]},[e,d])??[];return!p||!h?null:y.jsxs(y.Fragment,{children:[y.jsx(ps,{children:y.jsxs(Za,{separator:y.jsx(lc,{fontSize:"small"}),children:[y.jsx(xo,{underline:"hover",color:"inherit",href:"/library",children:"Library"}),y.jsx(_t,{children:p.name})]})}),y.jsx(Kee,{guild:p,swiper:c}),y.jsxs(tr,{ref:n,sx:{height:"100%",position:"relative",display:"flex",alignItems:"center"},children:[y.jsxs(Lp,{onSwiper:u,initialSlide:f.current,onSlideChange:v=>{f.current=v.activeIndex},slidesPerView:"auto",centeredSlides:!0,spaceBetween:.25*96,style:{height:s},children:[y.jsx(Uu,{style:{width:i,display:"flex",alignItems:"center",justifyContent:"center"},children:y.jsx("div",{style:{height:s,width:i,display:"flex",alignItems:"center",justifyContent:"center"},children:r?y.jsx(Ree,{guild:p.name}):y.jsx(BI,{guild:p.name})})},p.name),h.map(v=>y.jsx(Uu,{style:{width:i,display:"flex",alignItems:"center",justifyContent:"center"},children:y.jsx("div",{style:{height:s,width:i,display:"flex",alignItems:"center",justifyContent:"center"},children:r?y.jsx(Lee,{model:v}):y.jsx(_I,{model:v})})},v.id))]}),y.jsx(cc,{})]})]})}function Hee(){const t=_.useRef(null),[r,n]=_.useState(500),[i,o]=_.useState(700),s=_.useCallback(()=>{var p,h;const d=((p=t.current)==null?void 0:p.getBoundingClientRect().width)??0,f=((h=t.current)==null?void 0:h.getBoundingClientRect().height)??0;n(Math.min(d,f*5/7)-12),o(Math.min(f,d*7/5)-12)},[!1]);_.useLayoutEffect(()=>(s(),window.addEventListener("resize",s),()=>window.removeEventListener("resize",s)));const[a,l]=_.useState(null),{slideRef:c}=pp(),{gameplans:u}=Qn();return u?y.jsxs(y.Fragment,{children:[y.jsx(ps,{children:y.jsxs(Za,{separator:y.jsx(lc,{fontSize:"small"}),children:[y.jsx(xo,{underline:"hover",color:"inherit",href:"/library",children:"Library"}),y.jsx(_t,{children:"Gameplan Cards"})]})}),y.jsx(qee,{swiper:a}),y.jsxs(tr,{ref:t,sx:{height:"100%",position:"relative",display:"flex",alignItems:"center"},children:[y.jsx(Lp,{onSwiper:l,initialSlide:c.current,onSlideChange:d=>{c.current=d.activeIndex},slidesPerView:"auto",centeredSlides:!0,spaceBetween:.25*96,style:{height:i},children:u.map((d,f)=>y.jsx(Uu,{style:{width:r,display:"flex",alignItems:"center",justifyContent:"center"},children:y.jsx("div",{style:{height:i,width:r,display:"flex",alignItems:"center",justifyContent:"center"},children:y.jsx($ee,{gameplan:d})})},`gameplan-${f}`))}),y.jsx(cc,{})]})]}):null}function Vee(){const t=_.useRef(null),[r,n]=_.useState(500),[i,o]=_.useState(700),s=_.useCallback(()=>{var f,p;const u=((f=t.current)==null?void 0:f.getBoundingClientRect().width)??0,d=((p=t.current)==null?void 0:p.getBoundingClientRect().height)??0;n(Math.min(u,d*5/7)-12),o(Math.min(d,u*7/5)-12)},[!1]);_.useLayoutEffect(()=>(s(),window.addEventListener("resize",s),()=>window.removeEventListener("resize",s)));const[a,l]=_.useState(null),{slideRef:c}=pp();return y.jsxs(y.Fragment,{children:[y.jsx(ps,{children:y.jsxs(Za,{separator:y.jsx(lc,{fontSize:"small"}),children:[y.jsx(xo,{underline:"hover",color:"inherit",href:"/library",children:"Library"}),y.jsx(_t,{children:"Rules Reference Cards"})]})}),y.jsx(Yee,{swiper:a}),y.jsxs(tr,{ref:t,sx:{height:"100%",position:"relative",display:"flex",alignItems:"center"},children:[y.jsx(Lp,{onSwiper:l,initialSlide:c.current,onSlideChange:u=>{c.current=u.activeIndex},slidesPerView:"auto",centeredSlides:!0,spaceBetween:.25*96,style:{height:i},children:[...Array(5).keys()].map(u=>u+1).map(u=>y.jsx(Uu,{style:{width:r,display:"flex",alignItems:"center",justifyContent:"center"},children:y.jsx("div",{style:{height:i,width:r,display:"flex",alignItems:"center",justifyContent:"center"},children:y.jsx(Fee,{index:u})})},`ref-${u}`))}),y.jsx(cc,{})]})]})}function Kee(e){const{guild:t,swiper:r}=e,n=t.roster;return y.jsxs("div",{style:{display:"flex",flexDirection:"row"},children:[y.jsx("div",{style:{flex:"1 1"}}),y.jsxs(tr,{sx:{display:"flex",flex:"1 1 500px",flexWrap:"wrap",justifyContent:"center",gap:"5px"},children:[y.jsx(Io,{sx:{padding:0},onClick:()=>{r==null||r.slideTo(0)},children:y.jsx("span",{children:y.jsx("div",{style:{width:"32px",height:"32px",backgroundColor:"black",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",overflow:"visible"},children:y.jsx(Ai,{icon:t.name,className:"dark",fontSize:"32px",style:{flexShrink:0}})})})}),n.map((i,o)=>y.jsx(Mx,{color:"primary",label:i,onClick:()=>{r==null||r.slideTo(o+1)}},o))]}),y.jsx("div",{style:{flex:"1 1"}})]})}function qee(e){const{gameplans:t}=Qn(),{swiper:r}=e;return t?y.jsxs("div",{style:{display:"flex",flexDirection:"row"},children:[y.jsx("div",{style:{flex:"1 1"}}),y.jsx(tr,{sx:{display:"flex",flex:"1 1 500px",flexWrap:"wrap",justifyContent:"center",gap:"5px"},children:t.map((n,i)=>y.jsx(Mx,{color:"primary",label:n.title,onClick:()=>{r==null||r.slideTo(i)}},i))}),y.jsx("div",{style:{flex:"1 1"}})]}):null}function Yee(e){const{gameplans:t}=Qn(),{swiper:r}=e;return t?y.jsxs("div",{style:{display:"flex",flexDirection:"row"},children:[y.jsx("div",{style:{flex:"1 1"}}),y.jsx(tr,{sx:{display:"flex",flex:"1 1 500px",flexWrap:"wrap",justifyContent:"center",gap:"5px"},children:["Playbook Results","Turn Sequence","Conditions","Spending Momentum","Actions"].map((n,i)=>y.jsx(Mx,{color:"primary",label:n,onClick:()=>{r==null||r.slideTo(i)}},i))}),y.jsx("div",{style:{flex:"1 1"}})]}):null}const Qee={aa:{name:"Afar",nativeName:"Afaraf"},ab:{name:"Abkhaz",nativeName:"аҧсуа бызшәа"},ae:{name:"Avestan",nativeName:"avesta"},af:{name:"Afrikaans",nativeName:"Afrikaans"},ak:{name:"Akan",nativeName:"Akan"},am:{name:"Amharic",nativeName:"አማርኛ"},an:{name:"Aragonese",nativeName:"aragonés"},ar:{name:"Arabic",nativeName:"العربية"},as:{name:"Assamese",nativeName:"অসমীয়া"},av:{name:"Avaric",nativeName:"авар мацӀ"},ay:{name:"Aymara",nativeName:"aymar aru"},az:{name:"Azerbaijani",nativeName:"azərbaycan dili"},ba:{name:"Bashkir",nativeName:"башҡорт теле"},be:{name:"Belarusian",nativeName:"беларуская мова"},bg:{name:"Bulgarian",nativeName:"български език"},bi:{name:"Bislama",nativeName:"Bislama"},bm:{name:"Bambara",nativeName:"bamanankan"},bn:{name:"Bengali",nativeName:"বাংলা"},bo:{name:"Tibetan",nativeName:"བོད་ཡིག"},br:{name:"Breton",nativeName:"brezhoneg"},bs:{name:"Bosnian",nativeName:"bosanski jezik"},ca:{name:"Catalan",nativeName:"Català"},ce:{name:"Chechen",nativeName:"нохчийн мотт"},ch:{name:"Chamorro",nativeName:"Chamoru"},co:{name:"Corsican",nativeName:"corsu"},cr:{name:"Cree",nativeName:"ᓀᐦᐃᔭᐍᐏᐣ"},cs:{name:"Czech",nativeName:"čeština"},cu:{name:"Old Church Slavonic",nativeName:"ѩзыкъ словѣньскъ"},cv:{name:"Chuvash",nativeName:"чӑваш чӗлхи"},cy:{name:"Welsh",nativeName:"Cymraeg"},da:{name:"Danish",nativeName:"Dansk"},de:{name:"German",nativeName:"Deutsch"},dv:{name:"Divehi",nativeName:"ދިވެހި"},dz:{name:"Dzongkha",nativeName:"རྫོང་ཁ"},ee:{name:"Ewe",nativeName:"Eʋegbe"},el:{name:"Greek",nativeName:"Ελληνικά"},en:{name:"English",nativeName:"English"},eo:{name:"Esperanto",nativeName:"Esperanto"},es:{name:"Spanish",nativeName:"Español"},et:{name:"Estonian",nativeName:"eesti"},eu:{name:"Basque",nativeName:"euskara"},fa:{name:"Persian",nativeName:"فارسی"},ff:{name:"Fula",nativeName:"Fulfulde"},fi:{name:"Finnish",nativeName:"suomi"},fj:{name:"Fijian",nativeName:"vosa Vakaviti"},fo:{name:"Faroese",nativeName:"Føroyskt"},fr:{name:"French",nativeName:"Français"},fy:{name:"Western Frisian",nativeName:"Frysk"},ga:{name:"Irish",nativeName:"Gaeilge"},gd:{name:"Scottish Gaelic",nativeName:"Gàidhlig"},gl:{name:"Galician",nativeName:"galego"},gn:{name:"Guaraní",nativeName:"Avañe'ẽ"},gu:{name:"Gujarati",nativeName:"ગુજરાતી"},gv:{name:"Manx",nativeName:"Gaelg"},ha:{name:"Hausa",nativeName:"هَوُسَ"},he:{name:"Hebrew",nativeName:"עברית"},hi:{name:"Hindi",nativeName:"हिन्दी"},ho:{name:"Hiri Motu",nativeName:"Hiri Motu"},hr:{name:"Croatian",nativeName:"Hrvatski"},ht:{name:"Haitian",nativeName:"Kreyòl ayisyen"},hu:{name:"Hungarian",nativeName:"magyar"},hy:{name:"Armenian",nativeName:"Հայերեն"},hz:{name:"Herero",nativeName:"Otjiherero"},ia:{name:"Interlingua",nativeName:"Interlingua"},id:{name:"Indonesian",nativeName:"Bahasa Indonesia"},ie:{name:"Interlingue",nativeName:"Interlingue"},ig:{name:"Igbo",nativeName:"Asụsụ Igbo"},ii:{name:"Nuosu",nativeName:"ꆈꌠ꒿ Nuosuhxop"},ik:{name:"Inupiaq",nativeName:"Iñupiaq"},io:{name:"Ido",nativeName:"Ido"},is:{name:"Icelandic",nativeName:"Íslenska"},it:{name:"Italian",nativeName:"Italiano"},iu:{name:"Inuktitut",nativeName:"ᐃᓄᒃᑎᑐᑦ"},ja:{name:"Japanese",nativeName:"日本語"},jv:{name:"Javanese",nativeName:"basa Jawa"},ka:{name:"Georgian",nativeName:"ქართული"},kg:{name:"Kongo",nativeName:"Kikongo"},ki:{name:"Kikuyu",nativeName:"Gĩkũyũ"},kj:{name:"Kwanyama",nativeName:"Kuanyama"},kk:{name:"Kazakh",nativeName:"қазақ тілі"},kl:{name:"Kalaallisut",nativeName:"kalaallisut"},km:{name:"Khmer",nativeName:"ខេមរភាសា"},kn:{name:"Kannada",nativeName:"ಕನ್ನಡ"},ko:{name:"Korean",nativeName:"한국어"},kr:{name:"Kanuri",nativeName:"Kanuri"},ks:{name:"Kashmiri",nativeName:"कश्मीरी"},ku:{name:"Kurdish",nativeName:"Kurdî"},kv:{name:"Komi",nativeName:"коми кыв"},kw:{name:"Cornish",nativeName:"Kernewek"},ky:{name:"Kyrgyz",nativeName:"Кыргызча"},la:{name:"Latin",nativeName:"latine"},lb:{name:"Luxembourgish",nativeName:"Lëtzebuergesch"},lg:{name:"Ganda",nativeName:"Luganda"},li:{name:"Limburgish",nativeName:"Limburgs"},ln:{name:"Lingala",nativeName:"Lingála"},lo:{name:"Lao",nativeName:"ພາສາລາວ"},lt:{name:"Lithuanian",nativeName:"lietuvių kalba"},lu:{name:"Luba-Katanga",nativeName:"Kiluba"},lv:{name:"Latvian",nativeName:"latviešu valoda"},mg:{name:"Malagasy",nativeName:"fiteny malagasy"},mh:{name:"Marshallese",nativeName:"Kajin M̧ajeļ"},mi:{name:"Māori",nativeName:"te reo Māori"},mk:{name:"Macedonian",nativeName:"македонски јазик"},ml:{name:"Malayalam",nativeName:"മലയാളം"},mn:{name:"Mongolian",nativeName:"Монгол хэл"},mr:{name:"Marathi",nativeName:"मराठी"},ms:{name:"Malay",nativeName:"Bahasa Melayu"},mt:{name:"Maltese",nativeName:"Malti"},my:{name:"Burmese",nativeName:"ဗမာစာ"},na:{name:"Nauru",nativeName:"Dorerin Naoero"},nb:{name:"Norwegian Bokmål",nativeName:"Norsk bokmål"},nd:{name:"Northern Ndebele",nativeName:"isiNdebele"},ne:{name:"Nepali",nativeName:"नेपाली"},ng:{name:"Ndonga",nativeName:"Owambo"},nl:{name:"Dutch",nativeName:"Nederlands"},nn:{name:"Norwegian Nynorsk",nativeName:"Norsk nynorsk"},no:{name:"Norwegian",nativeName:"Norsk"},nr:{name:"Southern Ndebele",nativeName:"isiNdebele"},nv:{name:"Navajo",nativeName:"Diné bizaad"},ny:{name:"Chichewa",nativeName:"chiCheŵa"},oc:{name:"Occitan",nativeName:"occitan"},oj:{name:"Ojibwe",nativeName:"ᐊᓂᔑᓈᐯᒧᐎᓐ"},om:{name:"Oromo",nativeName:"Afaan Oromoo"},or:{name:"Oriya",nativeName:"ଓଡ଼ିଆ"},os:{name:"Ossetian",nativeName:"ирон æвзаг"},pa:{name:"Panjabi",nativeName:"ਪੰਜਾਬੀ"},pi:{name:"Pāli",nativeName:"पाऴि"},pl:{name:"Polish",nativeName:"Polski"},ps:{name:"Pashto",nativeName:"پښتو"},pt:{name:"Portuguese",nativeName:"Português"},qu:{name:"Quechua",nativeName:"Runa Simi"},rm:{name:"Romansh",nativeName:"rumantsch grischun"},rn:{name:"Kirundi",nativeName:"Ikirundi"},ro:{name:"Romanian",nativeName:"Română"},ru:{name:"Russian",nativeName:"Русский"},rw:{name:"Kinyarwanda",nativeName:"Ikinyarwanda"},sa:{name:"Sanskrit",nativeName:"संस्कृतम्"},sc:{name:"Sardinian",nativeName:"sardu"},sd:{name:"Sindhi",nativeName:"सिन्धी"},se:{name:"Northern Sami",nativeName:"Davvisámegiella"},sg:{name:"Sango",nativeName:"yângâ tî sängö"},si:{name:"Sinhala",nativeName:"සිංහල"},sk:{name:"Slovak",nativeName:"slovenčina"},sl:{name:"Slovenian",nativeName:"slovenščina"},sm:{name:"Samoan",nativeName:"gagana fa'a Samoa"},sn:{name:"Shona",nativeName:"chiShona"},so:{name:"Somali",nativeName:"Soomaaliga"},sq:{name:"Albanian",nativeName:"Shqip"},sr:{name:"Serbian",nativeName:"српски језик"},ss:{name:"Swati",nativeName:"SiSwati"},st:{name:"Southern Sotho",nativeName:"Sesotho"},su:{name:"Sundanese",nativeName:"Basa Sunda"},sv:{name:"Swedish",nativeName:"Svenska"},sw:{name:"Swahili",nativeName:"Kiswahili"},ta:{name:"Tamil",nativeName:"தமிழ்"},te:{name:"Telugu",nativeName:"తెలుగు"},tg:{name:"Tajik",nativeName:"тоҷикӣ"},th:{name:"Thai",nativeName:"ไทย"},ti:{name:"Tigrinya",nativeName:"ትግርኛ"},tk:{name:"Turkmen",nativeName:"Türkmençe"},tl:{name:"Tagalog",nativeName:"Wikang Tagalog"},tn:{name:"Tswana",nativeName:"Setswana"},to:{name:"Tonga",nativeName:"faka Tonga"},tr:{name:"Turkish",nativeName:"Türkçe"},ts:{name:"Tsonga",nativeName:"Xitsonga"},tt:{name:"Tatar",nativeName:"татар теле"},tw:{name:"Twi",nativeName:"Twi"},ty:{name:"Tahitian",nativeName:"Reo Tahiti"},ug:{name:"Uyghur",nativeName:"ئۇيغۇرچە‎"},uk:{name:"Ukrainian",nativeName:"Українська"},ur:{name:"Urdu",nativeName:"اردو"},uz:{name:"Uzbek",nativeName:"Ўзбек"},ve:{name:"Venda",nativeName:"Tshivenḓa"},vi:{name:"Vietnamese",nativeName:"Tiếng Việt"},vo:{name:"Volapük",nativeName:"Volapük"},wa:{name:"Walloon",nativeName:"walon"},wo:{name:"Wolof",nativeName:"Wollof"},xh:{name:"Xhosa",nativeName:"isiXhosa"},yi:{name:"Yiddish",nativeName:"ייִדיש"},yo:{name:"Yoruba",nativeName:"Yorùbá"},za:{name:"Zhuang",nativeName:"Saɯ cueŋƅ"},zh:{name:"Chinese",nativeName:"中文"},zu:{name:"Zulu",nativeName:"isiZulu"}};var Xee=Qee;const bf=Xee,UI={},Cg={},GI=[],WI=[],HI=[];for(const e in bf){const{name:t,nativeName:r}=bf[e];UI[e]=Cg[t.toLowerCase()]=Cg[r.toLowerCase()]={code:e,name:t,nativeName:r},GI.push(e),WI.push(t),HI.push(r)}var Jee=class sm{static getLanguages(t=[]){return t.map(r=>sm.validate(r)?Object.assign({},UI[r]):{code:r,name:"",nativeName:""})}static getName(t){return sm.validate(t)?bf[t].name:""}static getAllNames(){return WI.slice()}static getNativeName(t){return sm.validate(t)?bf[t].nativeName:""}static getAllNativeNames(){return HI.slice()}static getCode(t){return t=t.toLowerCase(),Cg.hasOwnProperty(t)?Cg[t].code:""}static getAllCodes(){return GI.slice()}static validate(t){return bf.hasOwnProperty(t)}};const AR=Ha(Jee),Zee=()=>{var s;const{manifest:e}=Qn(),{setting$:t}=di(),{i18n:r}=GQ(),n=r.resolvedLanguage,[i,o]=_.useState();if(_.useEffect(()=>{const a=t==null?void 0:t.subscribe(l=>o(l));return()=>a==null?void 0:a.unsubscribe()},[t]),!(!e||!i))return y.jsxs(tr,{component:"main",sx:{p:"1rem"},children:[y.jsx(ps,{children:y.jsx(Za,{children:y.jsx(_t,{children:"Settings"})})}),y.jsxs(_t,{variant:"h6",children:["GB Playbook ","2.1.0"]}),y.jsxs(_t,{variant:"caption",children:["(","2024-09-18T16:46:24.940Z",")"]}),y.jsx(Zi,{sx:{my:2}}),y.jsx(_t,{children:"Season and Errata Version:"}),y.jsx(wl,{children:y.jsx(Rl,{value:i.toJSON().data.dataSet,onChange:a=>{i==null||i.incrementalPatch({dataSet:a.target.value})},children:e==null?void 0:e.datafiles.map((a,l)=>y.jsx(xi,{value:a.filename,children:`[${a.version}] ${a.description}`},l))})}),y.jsx("p",{}),y.jsx(_t,{children:"Language Preference"}),y.jsx(_t,{variant:"subtitle2",children:"(available languages vary by Season and Errata setting)"}),y.jsx(wl,{children:y.jsxs(Rl,{value:i.toJSON().data.language??"auto",onChange:a=>{i==null||i.incrementalPatch({language:a.target.value})},children:[y.jsx(xi,{value:"auto",children:`Automatic Detection (${AR.getNativeName(n??"en")})`},"auto"),["en"].concat(Object.keys(((s=e.datafiles.find(a=>a.filename===i.toJSON().data.dataSet))==null?void 0:s.translations)??{})).map((a,l)=>y.jsx(xi,{value:a,children:`${AR.getNativeName(a)}`},l))]})}),y.jsx(Zi,{sx:{my:2}}),y.jsx(_t,{children:"UI Options:"}),y.jsx(_t,{children:"Initial Screen:"}),y.jsx(wl,{children:y.jsxs(Rl,{value:i==null?void 0:i.toJSON().data.initialScreen,onChange:a=>{i==null||i.incrementalPatch({initialScreen:a.target.value})},children:[y.jsx(xi,{value:"/game",children:"Game Play"}),y.jsx(xi,{value:"/library",children:"Card Library"})]})}),y.jsx("p",{}),y.jsx(wl,{children:y.jsx(Ms,{control:y.jsx(gG,{size:"small",checked:i==null?void 0:i.toJSON().data.uiPreferences.displayStatLine,onChange:a=>{i==null||i.incrementalPatch({uiPreferences:{displayStatLine:a.target.checked}})}}),label:"Stat Line in Game Roster List"})}),y.jsx("p",{}),y.jsx(_t,{children:"Prefered Card Layout:"}),y.jsx(_t,{variant:"subtitle2",children:"(Only applies to updated cards, where both styles are available)"}),y.jsx(wl,{children:y.jsxs(Rl,{value:i==null?void 0:i.toJSON().data.cardPreferences.preferredStyle,onChange:a=>{i==null||i.incrementalPatch({cardPreferences:{preferredStyle:a.target.value}})},children:[y.jsx(xi,{value:"sfg",children:"Steamforged"}),y.jsx(xi,{value:"gbcp",children:"Community"})]})})]})};var LS={},ete=ds;Object.defineProperty(LS,"__esModule",{value:!0});var VI=LS.default=void 0,tte=ete(fs()),rte=y;VI=LS.default=(0,tte.default)((0,rte.jsx)("path",{d:"M19 8H5c-1.66 0-3 1.34-3 3v6h4v4h12v-4h4v-6c0-1.66-1.34-3-3-3m-3 11H8v-5h8zm3-7c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1m-1-9H6v4h12z"}),"Print");var IS={},nte=ds;Object.defineProperty(IS,"__esModule",{value:!0});var KI=IS.default=void 0,ite=nte(fs()),ote=y;KI=IS.default=(0,ite.default)((0,ote.jsx)("path",{d:"m18 7-1.41-1.41-6.34 6.34 1.41 1.41zm4.24-1.41L11.66 16.17 7.48 12l-1.41 1.41L11.66 19l12-12zM.41 13.41 6 19l1.41-1.41L1.83 12z"}),"DoneAll");var MS={},ste=ds;Object.defineProperty(MS,"__esModule",{value:!0});var qI=MS.default=void 0,ate=ste(fs()),lte=y;qI=MS.default=(0,ate.default)((0,lte.jsx)("path",{d:"m1.79 12 5.58 5.59L5.96 19 .37 13.41zm.45-7.78L12.9 14.89l-1.28 1.28L7.44 12l-1.41 1.41L11.62 19l2.69-2.69 4.89 4.89 1.41-1.41L3.65 2.81zm14.9 9.27L23.62 7 22.2 5.59l-6.48 6.48zM17.96 7l-1.41-1.41-3.65 3.66 1.41 1.41z"}),"RemoveDone");var AS={},cte=ds;Object.defineProperty(AS,"__esModule",{value:!0});var YI=AS.default=void 0,ute=cte(fs()),dte=y;YI=AS.default=(0,ute.default)((0,dte.jsx)("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Clear");const fte=e=>{const[t,r]=_.useState(null),n=!!t,i=h=>{r(h.currentTarget)},o=()=>{r(null)},[s,a]=_.useState(!0),{doubleCard:l,setDouble:c,withBleed:u,setBleed:d,noFun:f,setNoFun:p}=e;return _.useEffect(()=>{const h=l?u?"5.24in 3.74in":"5in 3.5in":u?"2.74in 3.74in":"2.5in 3.5in",v=document.createElement("style");return s||(v.innerHTML=` @media print { @page { size: ${h}; diff --git a/index.html b/index.html index 631e0413..fb3fa48f 100644 --- a/index.html +++ b/index.html @@ -13,7 +13,7 @@ - + diff --git a/sw.js b/sw.js index 88b81131..57788c0a 100644 --- a/sw.js +++ b/sw.js @@ -1 +1 @@ -if(!self.define){let s,e={};const l=(l,r)=>(l=new URL(l+".js",r).href,e[l]||new Promise((e=>{if("document"in self){const s=document.createElement("script");s.src=l,s.onload=e,document.head.appendChild(s)}else s=l,importScripts(l),e()})).then((()=>{let s=e[l];if(!s)throw new Error(`Module ${l} didn’t register its module`);return s})));self.define=(r,n)=>{const i=s||("document"in self?document.currentScript.src:"")||location.href;if(e[i])return;let u={};const a=s=>l(s,i),o={module:{uri:i},exports:u,require:a};e[i]=Promise.all(r.map((s=>o[s]||a(s)))).then((s=>(n(...s),u)))}}define(["./workbox-f5523f08"],(function(s){"use strict";self.skipWaiting(),s.clientsClaim(),s.precacheAndRoute([{url:"apple-touch-icon-180x180.png",revision:"c6ade8d120b32268facbde0e632c86d4"},{url:"assets/Angel-00-_OcCE1xs.jpg",revision:null},{url:"assets/Angel-01-RsyL_b7r.jpg",revision:null},{url:"assets/beacon-00-L9zfj4Q8.jpg",revision:null},{url:"assets/beacon-01-vYao7kaT.jpg",revision:null},{url:"assets/beacon-WzU-Fgwo.jpg",revision:null},{url:"assets/Blackheart-00-Barboaw1.jpg",revision:null},{url:"assets/Blackheart-01-DqXGaAGL.jpg",revision:null},{url:"assets/Brisket-00-fpn5lXhR.jpg",revision:null},{url:"assets/Brisket-01-Cz0yKYaC.jpg",revision:null},{url:"assets/brisket3-00-TRUFkM-Q.jpg",revision:null},{url:"assets/brisket3-01-C19fZQ9I.jpg",revision:null},{url:"assets/cast-00-CDhbzPRV.jpg",revision:null},{url:"assets/cast-01-DOJiR9Ch.jpg",revision:null},{url:"assets/compound-DlF-jmUs.svg",revision:null},{url:"assets/crook-00-C4D_gdaM.jpg",revision:null},{url:"assets/crook-01-D9bCOT5R.jpg",revision:null},{url:"assets/egret-00-BKhmAAwA.jpg",revision:null},{url:"assets/egret-01-DCSfZLX7.jpg",revision:null},{url:"assets/Flea-00-PYY29ZDm.jpg",revision:null},{url:"assets/Flea-01-B-ceu-Fs.jpg",revision:null},{url:"assets/Gaffer-00-Chm4XJB6.jpg",revision:null},{url:"assets/Gaffer-01-DChRbbv3.jpg",revision:null},{url:"assets/gaffer-front-large-box-BhDGw3yv.png",revision:null},{url:"assets/GB-S4-Alchemists-19-02-01-VIy3CwEn.jpg",revision:null},{url:"assets/GB-S4-Alchemists-19-02-02-Dar2t4NY.jpg",revision:null},{url:"assets/GB-S4-Alchemists-20-03-01-CtoJr-2q.jpg",revision:null},{url:"assets/GB-S4-Alchemists-20-03-02-DlAuCMzg.jpg",revision:null},{url:"assets/GB-S4-Alchemists-20-03-04-RC1YiQbH.jpg",revision:null},{url:"assets/GB-S4-Alchemists-20-03-06-CUxY-HyS.jpg",revision:null},{url:"assets/GB-S4-Alchemists-20-03-08-B418Rr1J.jpg",revision:null},{url:"assets/GB-S4-Alchemists-20-03-10-DOhnGqkn.jpg",revision:null},{url:"assets/GB-S4-Alchemists-20-03-12-BZlwYyu9.jpg",revision:null},{url:"assets/GB-S4-Alchemists-20-03-14-DH-K3Y_5.jpg",revision:null},{url:"assets/GB-S4-Alchemists-20-03-16-Z1UPpUIk.jpg",revision:null},{url:"assets/GB-S4-Alchemists-20-03-18-DwfTDp0o.jpg",revision:null},{url:"assets/GB-S4-Alchemists-20-03-20-BFV6XWzl.jpg",revision:null},{url:"assets/GB-S4-Alchemists-20-03-22-G1PlavA6.jpg",revision:null},{url:"assets/GB-S4-Alchemists-20-03-24-CDYCDkSX.jpg",revision:null},{url:"assets/GB-S4-Alchemists-20-03-26-C9xO9eF2.jpg",revision:null},{url:"assets/GB-S4-Alchemists-20-03-28-4ME06k6U.jpg",revision:null},{url:"assets/GB-S4-Alchemists-20-03-30-DjbTACjD.jpg",revision:null},{url:"assets/GB-S4-Alchemists-20-03-31-BTog_cbt.jpg",revision:null},{url:"assets/GB-S4-Alchemists-20-03-32-Dui0dDSy.jpg",revision:null},{url:"assets/GB-S4-Blacksmiths-20-03-01-C1aHp8XU.jpg",revision:null},{url:"assets/GB-S4-Blacksmiths-20-03-02-Buw0Sd4K.jpg",revision:null},{url:"assets/GB-S4-Blacksmiths-20-03-03-BcPp4ACy.jpg",revision:null},{url:"assets/GB-S4-Blacksmiths-20-03-04-Iz-ZAoRD.jpg",revision:null},{url:"assets/GB-S4-Blacksmiths-20-03-06-CpyRLS4Z.jpg",revision:null},{url:"assets/GB-S4-Blacksmiths-20-03-08-Dom1S1qD.jpg",revision:null},{url:"assets/GB-S4-Blacksmiths-20-03-10-BPOmIv4i.jpg",revision:null},{url:"assets/GB-S4-Blacksmiths-20-03-12-C70-F9-G.jpg",revision:null},{url:"assets/GB-S4-Blacksmiths-20-03-14-BYsCG64l.jpg",revision:null},{url:"assets/GB-S4-Blacksmiths-20-03-16-BFmp7dwI.jpg",revision:null},{url:"assets/GB-S4-Blacksmiths-20-03-18-lzumGd1B.jpg",revision:null},{url:"assets/GB-S4-Blacksmiths-20-03-20-DH8KkvFf.jpg",revision:null},{url:"assets/GB-S4-Blacksmiths-20-03-22-CRMXvmQD.jpg",revision:null},{url:"assets/GB-S4-Blacksmiths-20-03-24-B0upn8X7.jpg",revision:null},{url:"assets/GB-S4-Blacksmiths-20-03-26-BZAHT1q6.jpg",revision:null},{url:"assets/GB-S4-Blacksmiths-20-03-28-IdVWYe8z.jpg",revision:null},{url:"assets/GB-S4-Blacksmiths-20-03-30-zou6Flgi.jpg",revision:null},{url:"assets/GB-S4-Blacksmiths-20-03-32-DJ0MEQk3.jpg",revision:null},{url:"assets/GB-S4-Brewers-20-03-01-_bnlGcvZ.jpg",revision:null},{url:"assets/GB-S4-Brewers-20-03-02-Af5aErRU.jpg",revision:null},{url:"assets/GB-S4-Brewers-20-03-03-BTowl5yC.jpg",revision:null},{url:"assets/GB-S4-Brewers-20-03-04-CiBahMdS.jpg",revision:null},{url:"assets/GB-S4-Brewers-20-03-06-BAckyHQm.jpg",revision:null},{url:"assets/GB-S4-Brewers-20-03-08-C1SVs0jC.jpg",revision:null},{url:"assets/GB-S4-Brewers-20-03-10-dNR_AKj3.jpg",revision:null},{url:"assets/GB-S4-Brewers-20-03-12-Bzzw5t7M.jpg",revision:null},{url:"assets/GB-S4-Brewers-20-03-14-DUDxJnnr.jpg",revision:null},{url:"assets/GB-S4-Brewers-20-03-16-hLIfeAvT.jpg",revision:null},{url:"assets/GB-S4-Brewers-20-03-18-193xjOU7.jpg",revision:null},{url:"assets/GB-S4-Brewers-20-03-20-ht0AqR_9.jpg",revision:null},{url:"assets/GB-S4-Brewers-20-03-22-DB3lWhaZ.jpg",revision:null},{url:"assets/GB-S4-Brewers-20-03-24-BDXctZyF.jpg",revision:null},{url:"assets/GB-S4-Brewers-20-03-26-CJ3ohfD8.jpg",revision:null},{url:"assets/GB-S4-Brewers-20-03-28-D_Y6ChH0.jpg",revision:null},{url:"assets/GB-S4-Brewers-20-03-30-C7ofvQL3.jpg",revision:null},{url:"assets/GB-S4-Brewers-20-03-32-Cps3196a.jpg",revision:null},{url:"assets/GB-S4-Brewers-20-03-33-zps3y-hi.jpg",revision:null},{url:"assets/GB-S4-Brewers-20-03-34-CdaFu_Sd.jpg",revision:null},{url:"assets/GB-S4-Butchers-19-08-01-CLWIlX8T.jpg",revision:null},{url:"assets/GB-S4-Butchers-19-08-02-CFlOzX_b.jpg",revision:null},{url:"assets/GB-S4-Butchers-19-08-03-B1bjdh3r.jpg",revision:null},{url:"assets/GB-S4-Butchers-19-08-04-CR3Vo0aB.jpg",revision:null},{url:"assets/GB-S4-Butchers-19-08-06-BpDXV7JC.jpg",revision:null},{url:"assets/GB-S4-Butchers-19-08-08-BPo-9yTd.jpg",revision:null},{url:"assets/GB-S4-Butchers-19-08-10-phxnKqrp.jpg",revision:null},{url:"assets/GB-S4-Butchers-19-08-12-B2WDg1Js.jpg",revision:null},{url:"assets/GB-S4-Butchers-19-08-14-DXWG8I2n.jpg",revision:null},{url:"assets/GB-S4-Butchers-19-08-16-BjHesLe2.jpg",revision:null},{url:"assets/GB-S4-Butchers-19-08-18-6v1o2Ifu.jpg",revision:null},{url:"assets/GB-S4-Butchers-19-08-20-BKaya9dR.jpg",revision:null},{url:"assets/GB-S4-Butchers-19-08-22-D37jjOEk.jpg",revision:null},{url:"assets/GB-S4-Butchers-19-08-24-DUuL1aM2.jpg",revision:null},{url:"assets/GB-S4-Butchers-19-08-26-DOTJBjq_.jpg",revision:null},{url:"assets/GB-S4-Butchers-19-08-28-M6NS1cc0.jpg",revision:null},{url:"assets/GB-S4-Butchers-19-08-30-CZTx6gLx.jpg",revision:null},{url:"assets/GB-S4-Butchers-19-08-32-CDETLFF4.jpg",revision:null},{url:"assets/GB-S4-Cooks-19-08-01-B_Vd1DVn.jpg",revision:null},{url:"assets/GB-S4-Cooks-19-08-02-BCRzyOhW.jpg",revision:null},{url:"assets/GB-S4-Cooks-19-08-03-Du8Wgf95.jpg",revision:null},{url:"assets/GB-S4-Cooks-19-08-04-7QP0IEzl.jpg",revision:null},{url:"assets/GB-S4-Cooks-19-08-06-D5h9IUWD.jpg",revision:null},{url:"assets/GB-S4-Cooks-19-08-08-B27LuxRF.jpg",revision:null},{url:"assets/GB-S4-Cooks-19-08-10-BjEFjR2p.jpg",revision:null},{url:"assets/GB-S4-Cooks-19-08-12-DfumUS4Q.jpg",revision:null},{url:"assets/GB-S4-Cooks-19-08-14-2NKQVsMs.jpg",revision:null},{url:"assets/GB-S4-Engineers-20-03-01-Di9u3X0x.jpg",revision:null},{url:"assets/GB-S4-Engineers-20-03-02-Cy2lNFLR.jpg",revision:null},{url:"assets/GB-S4-Engineers-20-03-03-CaTM1yPN.jpg",revision:null},{url:"assets/GB-S4-Engineers-20-03-04-BNwvka_y.jpg",revision:null},{url:"assets/GB-S4-Engineers-20-03-06-rU0szJ96.jpg",revision:null},{url:"assets/GB-S4-Engineers-20-03-08-BhZW5K7b.jpg",revision:null},{url:"assets/GB-S4-Engineers-20-03-10-jYeXRRJi.jpg",revision:null},{url:"assets/GB-S4-Engineers-20-03-12-5N9um0rG.jpg",revision:null},{url:"assets/GB-S4-Engineers-20-03-14-B6x6JfxM.jpg",revision:null},{url:"assets/GB-S4-Engineers-20-03-16-Cc9F_94D.jpg",revision:null},{url:"assets/GB-S4-Engineers-20-03-18-C04RNSHr.jpg",revision:null},{url:"assets/GB-S4-Engineers-20-03-20-r4vOyU-R.jpg",revision:null},{url:"assets/GB-S4-Engineers-20-03-22-DHXCY4Wl.jpg",revision:null},{url:"assets/GB-S4-Engineers-20-03-24-D6hQxrzH.jpg",revision:null},{url:"assets/GB-S4-Engineers-20-03-26-C5iXMvZr.jpg",revision:null},{url:"assets/GB-S4-Engineers-20-03-28-7uzZCmXc.jpg",revision:null},{url:"assets/GB-S4-Engineers-20-03-30-bp8c3Uf4.jpg",revision:null},{url:"assets/GB-S4-Falconers-20-03-01-DAO812Wl.jpg",revision:null},{url:"assets/GB-S4-Falconers-20-03-02-C_ro4zOy.jpg",revision:null},{url:"assets/GB-S4-Falconers-20-03-03--r8Ylt5C.jpg",revision:null},{url:"assets/GB-S4-Falconers-20-03-04-CT6BXXd-.jpg",revision:null},{url:"assets/GB-S4-Falconers-20-03-06-agDql6N2.jpg",revision:null},{url:"assets/GB-S4-Falconers-20-03-08-CyRw5rwh.jpg",revision:null},{url:"assets/GB-S4-Falconers-20-03-10-1hF5DgY6.jpg",revision:null},{url:"assets/GB-S4-Falconers-20-03-12-CZORpUuZ.jpg",revision:null},{url:"assets/GB-S4-Falconers-20-03-14-D7WFZjKa.jpg",revision:null},{url:"assets/GB-S4-Farmers-19-12-01-LmV2xFUn.jpg",revision:null},{url:"assets/GB-S4-Farmers-19-12-02-COLOFnlA.jpg",revision:null},{url:"assets/GB-S4-Farmers-19-12-03-D9S_zy2g.jpg",revision:null},{url:"assets/GB-S4-Farmers-19-12-04-D5V7RGAr.jpg",revision:null},{url:"assets/GB-S4-Farmers-19-12-06-CvC6mrxK.jpg",revision:null},{url:"assets/GB-S4-Farmers-19-12-08-Bu2e9Uzp.jpg",revision:null},{url:"assets/GB-S4-Farmers-19-12-10-BVRVj083.jpg",revision:null},{url:"assets/GB-S4-Farmers-19-12-12-17j3-pGL.jpg",revision:null},{url:"assets/GB-S4-Farmers-19-12-14-D9QbUDBe.jpg",revision:null},{url:"assets/GB-S4-Farmers-19-12-16-Bi5uXUCL.jpg",revision:null},{url:"assets/GB-S4-Farmers-19-12-18-CYzbOhRU.jpg",revision:null},{url:"assets/GB-S4-Farmers-19-12-20-CfkO1wFr.jpg",revision:null},{url:"assets/GB-S4-Farmers-19-12-22-lG9W92aw.jpg",revision:null},{url:"assets/GB-S4-Farmers-19-12-24-BWbiceSz.jpg",revision:null},{url:"assets/GB-S4-Farmers-19-12-26-Cfuo1fZi.jpg",revision:null},{url:"assets/GB-S4-Farmers-19-12-28-C3SMHxWd.jpg",revision:null},{url:"assets/GB-S4-Farmers-19-12-30-C3nUj6AE.jpg",revision:null},{url:"assets/GB-S4-Farmers-19-12-32-DfwzxWCr.jpg",revision:null},{url:"assets/GB-S4-Fishermen-19-08-01-D54clbHu.jpg",revision:null},{url:"assets/GB-S4-Fishermen-19-08-02-D_xvByJF.jpg",revision:null},{url:"assets/GB-S4-Fishermen-19-08-03-HE2w3ci9.jpg",revision:null},{url:"assets/GB-S4-Fishermen-19-08-04-BfW77V1Z.jpg",revision:null},{url:"assets/GB-S4-Fishermen-19-08-06-BDyxN849.jpg",revision:null},{url:"assets/GB-S4-Fishermen-19-08-08-omES11k4.jpg",revision:null},{url:"assets/GB-S4-Fishermen-19-08-10-BEY4i-qQ.jpg",revision:null},{url:"assets/GB-S4-Fishermen-19-08-12-Dv7v3MeD.jpg",revision:null},{url:"assets/GB-S4-Fishermen-19-08-14-DuPQrXbP.jpg",revision:null},{url:"assets/GB-S4-Fishermen-19-08-16-DLLLRVAB.jpg",revision:null},{url:"assets/GB-S4-Fishermen-19-08-18-CaaIkPD9.jpg",revision:null},{url:"assets/GB-S4-Fishermen-19-08-20-DZM3Jz28.jpg",revision:null},{url:"assets/GB-S4-Fishermen-19-08-22-Dici-53D.jpg",revision:null},{url:"assets/GB-S4-Fishermen-19-08-24-DJyMosKX.jpg",revision:null},{url:"assets/GB-S4-Fishermen-19-08-26-DgZQkJwc.jpg",revision:null},{url:"assets/GB-S4-Fishermen-19-08-28-Bq-GSM8T.jpg",revision:null},{url:"assets/GB-S4-Fishermen-19-08-30-BsuCsQld.jpg",revision:null},{url:"assets/GB-S4-Fishermen-19-08-32-Co1is7SR.jpg",revision:null},{url:"assets/GB-S4-Gameplans-2019-Dp99TQ1B.png",revision:null},{url:"assets/GB-S4-Hunters-19-08-01-CmDbpORb.jpg",revision:null},{url:"assets/GB-S4-Hunters-19-08-02-DP64V92U.jpg",revision:null},{url:"assets/GB-S4-Hunters-19-08-03-C59ee243.jpg",revision:null},{url:"assets/GB-S4-Hunters-19-08-04-43bh7Xjn.jpg",revision:null},{url:"assets/GB-S4-Hunters-19-08-06-DvcQNJi9.jpg",revision:null},{url:"assets/GB-S4-Hunters-19-08-08-G2iJeyB7.jpg",revision:null},{url:"assets/GB-S4-Hunters-19-08-10-DXc2S5UR.jpg",revision:null},{url:"assets/GB-S4-Hunters-19-08-12-Bi7nnTZE.jpg",revision:null},{url:"assets/GB-S4-Hunters-19-08-14-COEjmcNE.jpg",revision:null},{url:"assets/GB-S4-Hunters-19-08-16-D8BrrZ7W.jpg",revision:null},{url:"assets/GB-S4-Hunters-19-08-18-m8dNYpqE.jpg",revision:null},{url:"assets/GB-S4-Hunters-19-08-20-B0_n3uev.jpg",revision:null},{url:"assets/GB-S4-Hunters-19-08-22-DnBgH8it.jpg",revision:null},{url:"assets/GB-S4-Hunters-19-08-24-Btt4JIV9.jpg",revision:null},{url:"assets/GB-S4-Hunters-19-08-26-ChOKS1SV.jpg",revision:null},{url:"assets/GB-S4-Hunters-19-08-28-HxO921jJ.jpg",revision:null},{url:"assets/GB-S4-Hunters-19-08-30-Dg6ELcLG.jpg",revision:null},{url:"assets/GB-S4-Hunters-19-08-32-CjwZbZPz.jpg",revision:null},{url:"assets/GB-S4-Masons-19-03-01-CU2vGuj1.jpg",revision:null},{url:"assets/GB-S4-Masons-19-03-02-BT75CHhK.jpg",revision:null},{url:"assets/GB-S4-Masons-19-08-01-B2F-qHyR.jpg",revision:null},{url:"assets/GB-S4-Masons-19-08-02-CDe3UOmk.jpg",revision:null},{url:"assets/GB-S4-Masons-19-08-04-KDNoOwoa.jpg",revision:null},{url:"assets/GB-S4-Masons-19-08-06-BPou1o3y.jpg",revision:null},{url:"assets/GB-S4-Masons-19-08-08-CxUr3wcQ.jpg",revision:null},{url:"assets/GB-S4-Masons-19-08-10-B-NC6pQE.jpg",revision:null},{url:"assets/GB-S4-Masons-19-08-12-BLKQpjuR.jpg",revision:null},{url:"assets/GB-S4-Masons-19-08-14-DYH-t6AE.jpg",revision:null},{url:"assets/GB-S4-Masons-19-08-16-D4IFawmu.jpg",revision:null},{url:"assets/GB-S4-Masons-19-08-18-CCBausup.jpg",revision:null},{url:"assets/GB-S4-Masons-19-08-20-ocIpAO8E.jpg",revision:null},{url:"assets/GB-S4-Masons-19-08-22-C5KnttI8.jpg",revision:null},{url:"assets/GB-S4-Masons-19-08-24-C_8aIC6i.jpg",revision:null},{url:"assets/GB-S4-Masons-19-08-26-DfJ6EfYF.jpg",revision:null},{url:"assets/GB-S4-Masons-19-08-28-B7QBbKlK.jpg",revision:null},{url:"assets/GB-S4-Masons-19-08-30-6kjit4Y9.jpg",revision:null},{url:"assets/GB-S4-Miners-20-03-01-D4YSyCEa.jpg",revision:null},{url:"assets/GB-S4-Miners-20-03-02-osGRf8x4.jpg",revision:null},{url:"assets/GB-S4-Miners-20-03-03-Bvr7X2VN.jpg",revision:null},{url:"assets/GB-S4-Miners-20-03-04-BUt1D44u.jpg",revision:null},{url:"assets/GB-S4-Miners-20-03-06-CWDJNfx1.jpg",revision:null},{url:"assets/GB-S4-Miners-20-03-08-Dsrwpy5l.jpg",revision:null},{url:"assets/GB-S4-Miners-20-03-10-BFt8Saso.jpg",revision:null},{url:"assets/GB-S4-Miners-20-03-12-D1QsxSt_.jpg",revision:null},{url:"assets/GB-S4-Miners-20-03-14-OmIZrrCX.jpg",revision:null},{url:"assets/GB-S4-Morticians-19-08-01-DIFD5DK0.jpg",revision:null},{url:"assets/GB-S4-Morticians-19-08-02-BIp1_EUg.jpg",revision:null},{url:"assets/GB-S4-Morticians-19-08-03-BEjT_hxM.jpg",revision:null},{url:"assets/GB-S4-Morticians-19-08-04-CehnRTZZ.jpg",revision:null},{url:"assets/GB-S4-Morticians-19-08-06-B-414ifs.jpg",revision:null},{url:"assets/GB-S4-Morticians-19-08-08--61yL9Bw.jpg",revision:null},{url:"assets/GB-S4-Morticians-19-08-10-t5GLRNs2.jpg",revision:null},{url:"assets/GB-S4-Morticians-19-08-12-mWeeXBnS.jpg",revision:null},{url:"assets/GB-S4-Morticians-19-08-14-DYB6-CC7.jpg",revision:null},{url:"assets/GB-S4-Morticians-19-08-16-DWJHVhQR.jpg",revision:null},{url:"assets/GB-S4-Morticians-19-08-18-CCUOST9Q.jpg",revision:null},{url:"assets/GB-S4-Morticians-19-08-20-C22KtbCr.jpg",revision:null},{url:"assets/GB-S4-Morticians-19-08-22-urTSkH8v.jpg",revision:null},{url:"assets/GB-S4-Morticians-19-08-26-EHTItFK_.jpg",revision:null},{url:"assets/GB-S4-Morticians-19-08-28-R_qj57Ah.jpg",revision:null},{url:"assets/GB-S4-Morticians-19-08-30-D7tgwlEH.jpg",revision:null},{url:"assets/GB-S4-Morticians-19-08-32-rWK20dpO.jpg",revision:null},{url:"assets/GB-S4-Morticians-19-08-34-Cml7KNHH.jpg",revision:null},{url:"assets/GB-S4-Navigators-20-03-01-M7N3Qnm9.jpg",revision:null},{url:"assets/GB-S4-Navigators-20-03-02-C0DvULy4.jpg",revision:null},{url:"assets/GB-S4-Navigators-20-03-03-DuY0bj8b.jpg",revision:null},{url:"assets/GB-S4-Navigators-20-03-04-C54iXdHJ.jpg",revision:null},{url:"assets/GB-S4-Navigators-20-03-05-DijPkVU0.jpg",revision:null},{url:"assets/GB-S4-Navigators-20-03-07-k2ifPp8C.jpg",revision:null},{url:"assets/GB-S4-Navigators-20-03-10-kxgvrwFf.jpg",revision:null},{url:"assets/GB-S4-Navigators-20-03-11-DLBrn3lH.jpg",revision:null},{url:"assets/GB-S4-Navigators-20-03-14-4LJM_QAb.jpg",revision:null},{url:"assets/GB-S4-Order-19-08-01-asZnKqhR.jpg",revision:null},{url:"assets/GB-S4-Order-19-08-02-DxYxwIyf.jpg",revision:null},{url:"assets/GB-S4-Order-19-08-04-B1NHIvQH.jpg",revision:null},{url:"assets/GB-S4-Order-19-08-06-BxCTP18m.jpg",revision:null},{url:"assets/GB-S4-Order-19-08-08-DWLWCNBP.jpg",revision:null},{url:"assets/GB-S4-Order-19-08-10-CdmsC0k7.jpg",revision:null},{url:"assets/GB-S4-Order-19-08-12-CUnlpuDI.jpg",revision:null},{url:"assets/GB-S4-Order-19-08-14-N2zvQdYm.jpg",revision:null},{url:"assets/GB-S4-Order-19-08-16-BxGIGoGz.jpg",revision:null},{url:"assets/GB-S4-Order-19-08-18-gkj8skFt.jpg",revision:null},{url:"assets/GB-S4-Ratcatchers-19-08-01-CbXHBUJx.jpg",revision:null},{url:"assets/GB-S4-Ratcatchers-19-08-02-XbBjNmUR.jpg",revision:null},{url:"assets/GB-S4-Ratcatchers-19-08-03-vf5l_pcD.jpg",revision:null},{url:"assets/GB-S4-Ratcatchers-19-08-04-BnvzzXPE.jpg",revision:null},{url:"assets/GB-S4-Ratcatchers-19-08-06-DlqN1o8i.jpg",revision:null},{url:"assets/GB-S4-Ratcatchers-19-08-08-BwciubOW.jpg",revision:null},{url:"assets/GB-S4-Ratcatchers-19-08-10-DtQCr3kF.jpg",revision:null},{url:"assets/GB-S4-Ratcatchers-19-08-12-JUs2Xlho.jpg",revision:null},{url:"assets/GB-S4-Ratcatchers-19-08-14-D1JyRK5e.jpg",revision:null},{url:"assets/GB-S4-Reference-1-Cx3eC7d4.png",revision:null},{url:"assets/GB-S4-Reference-2-CJ4YgyH9.png",revision:null},{url:"assets/GB-S4-Reference-3-BTbZpB51.png",revision:null},{url:"assets/GB-S4-Reference-4-CpP58Tap.png",revision:null},{url:"assets/GB-S4-Reference-5-Be8xjsp1.png",revision:null},{url:"assets/GB-S4-Shepherds-20-03-01-BszDyn7n.jpg",revision:null},{url:"assets/GB-S4-Shepherds-20-03-02-XqwLekip.jpg",revision:null},{url:"assets/GB-S4-Shepherds-20-03-03-CJ-GnLek.jpg",revision:null},{url:"assets/GB-S4-Shepherds-20-03-04-CpJUbIK5.jpg",revision:null},{url:"assets/GB-S4-Shepherds-20-03-06-TZPJ1JER.jpg",revision:null},{url:"assets/GB-S4-Shepherds-20-03-08-fPdEFqsg.jpg",revision:null},{url:"assets/GB-S4-Shepherds-20-03-10-D8vNNVMa.jpg",revision:null},{url:"assets/GB-S4-Shepherds-20-03-12-Cs6eNdgu.jpg",revision:null},{url:"assets/GB-S4-Shepherds-20-03-14-EROLPl1k.jpg",revision:null},{url:"assets/GB-S4-Shepherds-20-03-16-CH7z3m46.jpg",revision:null},{url:"assets/GB-S4-Union-20-03-01-BYUf_cPI.jpg",revision:null},{url:"assets/GB-S4-Union-20-03-02-CAfWuq1n.jpg",revision:null},{url:"assets/GB-S4-Union-20-03-03-ByRX6Zf6.jpg",revision:null},{url:"assets/GB-S4-Union-20-03-04-DESKIKlc.jpg",revision:null},{url:"assets/GB-S4-Union-20-03-06-TH_Fhhnv.jpg",revision:null},{url:"assets/GB-S4-Union-20-03-08-C9acG5Gy.jpg",revision:null},{url:"assets/GB-S4-Union-20-03-10-BRZlJPNW.jpg",revision:null},{url:"assets/GB-S4-Union-20-03-12--TefmgjH.jpg",revision:null},{url:"assets/GB-S4-Union-20-03-14-DoT0cBAC.jpg",revision:null},{url:"assets/GB-S4-Union-20-03-16-DrDLPTZJ.jpg",revision:null},{url:"assets/GB-S4-Union-20-03-18-bedyXvhB.jpg",revision:null},{url:"assets/GB-S4-Union-20-03-20-CDcWfDBp.jpg",revision:null},{url:"assets/GB-S4-Union-20-03-22-DFVnunFx.jpg",revision:null},{url:"assets/GB-S4-Union-20-03-24-DTxA3SGq.jpg",revision:null},{url:"assets/GB-S4-Union-20-03-26-Bo3pJ595.jpg",revision:null},{url:"assets/GB-S4-Union-20-03-28-Cix4cgvH.jpg",revision:null},{url:"assets/GB-S4-Union-20-03-30-DOPQxsMF.jpg",revision:null},{url:"assets/gb-symbol-defs-DvUA8_44.svg",revision:null},{url:"assets/heat-00-D38QQgsn.jpg",revision:null},{url:"assets/heat-01-TaWfEq1e.jpg",revision:null},{url:"assets/heat-kg0Ne0rh.jpg",revision:null},{url:"assets/hook-00-BCtxORP2.jpg",revision:null},{url:"assets/hook-01-CFEXTspD.jpg",revision:null},{url:"assets/ikaros-00-BlK23AQW.jpg",revision:null},{url:"assets/ikaros-01-CaTWYr3E.jpg",revision:null},{url:"assets/index-BOX54cO5.css",revision:null},{url:"assets/index-CNaM8Iq4.js",revision:null},{url:"assets/lamp-beta-63HlWaeb.png",revision:null},{url:"assets/lamps_back_blank-DaxPd_Oo.jpg",revision:null},{url:"assets/Locus-00-BlUYiKL3.jpg",revision:null},{url:"assets/Locus-01-CgJeSABI.jpg",revision:null},{url:"assets/lucky-00--3wf1Q-o.jpg",revision:null},{url:"assets/lucky-01-CeFOEkb7.jpg",revision:null},{url:"assets/lucky-n3AjGPzo.svg",revision:null},{url:"assets/miasma-00-gJuVKj0r.jpg",revision:null},{url:"assets/miasma-01-BFpZKg3H.jpg",revision:null},{url:"assets/minx-00-DKid1QgM.jpg",revision:null},{url:"assets/minx-01-h4AvAe2P.jpg",revision:null},{url:"assets/nightlight-00-DeG30Qno.jpg",revision:null},{url:"assets/nightlight-01-B5GmfHdF.jpg",revision:null},{url:"assets/nightlight-BICbD_Qy.jpg",revision:null},{url:"assets/Order_back-qsepM33g.jpg",revision:null},{url:"assets/phosphor-00-kYBsDzr4.jpg",revision:null},{url:"assets/phosphor-01-aCMgs7Xa.jpg",revision:null},{url:"assets/phosphor-CifRCYrC.jpg",revision:null},{url:"assets/playbook-symbol-defs-Dz3QsL1K.svg",revision:null},{url:"assets/Salt-00-DTipa4Vq.jpg",revision:null},{url:"assets/Salt-01-DgX-3wqX.jpg",revision:null},{url:"assets/soot-00-CjgkmHEF.jpg",revision:null},{url:"assets/soot-01-DLvloUPB.jpg",revision:null},{url:"assets/soot-CXEcs2BT.jpg",revision:null},{url:"assets/steeljaw-00-DBylP57a.jpg",revision:null},{url:"assets/steeljaw-01-DHvdkD3u.jpg",revision:null},{url:"assets/tenderiser-00-DJeWjZaC.jpg",revision:null},{url:"assets/tenderiser-01-Dn53BCqM.jpg",revision:null},{url:"assets/Truffles-00-BxTIIeQ4.jpg",revision:null},{url:"assets/Truffles-01-1xGyMIOv.jpg",revision:null},{url:"assets/Ulfr-00-BXhlGxmA.jpg",revision:null},{url:"assets/Ulfr-01-JQfocVce.jpg",revision:null},{url:"assets/vGutter-00-CpnNh9P4.jpg",revision:null},{url:"assets/vGutter-01-BWHR1234.jpg",revision:null},{url:"assets/wick-00-CEZ6BY1J.jpg",revision:null},{url:"assets/wick-01-DtuDStax.jpg",revision:null},{url:"assets/wick-D10XZuyz.jpg",revision:null},{url:"assets/workbox-window.prod.es5-D5gOYdM7.js",revision:null},{url:"CNAME",revision:"6b62f425122a80ff0107c2b9938f87b7"},{url:"data/gameplans.json",revision:"84197a88c0201e0335c7e8015c953c77"},{url:"data/GB-Playbook-4-3.json",revision:"92b689cb87b03ad4b17a13d4c8149687"},{url:"data/GB-Playbook-4-4.json",revision:"5385d14b70c849f475758648abddbe36"},{url:"data/GB-Playbook-4-5.json",revision:"ebf4b91061ca5728eb53d8f9d41f8edc"},{url:"data/GB-Playbook-4-6.fr.json",revision:"195267162ee602eb1185e49d15c99885"},{url:"data/GB-Playbook-4-6.json",revision:"f609abebce605d01f9308eeb83641f29"},{url:"data/manifest.json",revision:"88559fb832d4b6821f1baaa74bbf3a5c"},{url:"favicon.ico",revision:"4a2fe2fdcaa08f161283444598a8f468"},{url:"favicon.svg",revision:"6114c7937db75b09f50b3d31b2bd85d6"},{url:"index.html",revision:"eb69ac87b55ff622b55e0f3e8ef257a9"},{url:"manifest.webmanifest",revision:"a9121016eaef4c6c02585821c2e74f1a"},{url:"maskable-icon-512x512.png",revision:"6ef31a886aa1b0f4561ddc92364e8bd1"},{url:"privacy.html",revision:"4eaf071255466ce08853754be78169ba"},{url:"pwa-192x192.png",revision:"6d64c647cd785e004c0be60bb1779d89"},{url:"pwa-512x512.png",revision:"d64c4db6a1dcdf625df901c1341ea41c"},{url:"pwa-64x64.png",revision:"ecb00646e770b9aa3e91cfb9909387c3"},{url:"robots.txt",revision:"fa1ded1ed7c11438a9b0385b1e112850"},{url:"CNAME",revision:"6b62f425122a80ff0107c2b9938f87b7"},{url:"apple-touch-icon-180x180.png",revision:"c6ade8d120b32268facbde0e632c86d4"},{url:"favicon.ico",revision:"4a2fe2fdcaa08f161283444598a8f468"},{url:"favicon.svg",revision:"6114c7937db75b09f50b3d31b2bd85d6"},{url:"maskable-icon-512x512.png",revision:"6ef31a886aa1b0f4561ddc92364e8bd1"},{url:"privacy.html",revision:"4eaf071255466ce08853754be78169ba"},{url:"pwa-192x192.png",revision:"6d64c647cd785e004c0be60bb1779d89"},{url:"pwa-512x512.png",revision:"d64c4db6a1dcdf625df901c1341ea41c"},{url:"pwa-64x64.png",revision:"ecb00646e770b9aa3e91cfb9909387c3"},{url:"robots.txt",revision:"fa1ded1ed7c11438a9b0385b1e112850"},{url:"data/GB-Playbook-4-3.json",revision:"92b689cb87b03ad4b17a13d4c8149687"},{url:"data/GB-Playbook-4-4.json",revision:"5385d14b70c849f475758648abddbe36"},{url:"data/GB-Playbook-4-5.json",revision:"ebf4b91061ca5728eb53d8f9d41f8edc"},{url:"data/GB-Playbook-4-6.fr.json",revision:"195267162ee602eb1185e49d15c99885"},{url:"data/GB-Playbook-4-6.json",revision:"f609abebce605d01f9308eeb83641f29"},{url:"data/gameplans.json",revision:"84197a88c0201e0335c7e8015c953c77"},{url:"data/manifest.json",revision:"88559fb832d4b6821f1baaa74bbf3a5c"},{url:"manifest.webmanifest",revision:"a9121016eaef4c6c02585821c2e74f1a"}],{}),s.cleanupOutdatedCaches(),s.registerRoute(new s.NavigationRoute(s.createHandlerBoundToURL("index.html"))),s.registerRoute(/^https:\/\/docs\.guildball\.app\/.*/i,new s.CacheFirst({cacheName:"guildball-docs",plugins:[new s.ExpirationPlugin({maxEntries:20,maxAgeSeconds:31536e3}),new s.CacheableResponsePlugin({statuses:[0,200]})]}),"GET"),s.registerRoute(/^https:\/\/fonts\.googleapis\.com\/.*/i,new s.CacheFirst({cacheName:"google-fonts-cache",plugins:[new s.ExpirationPlugin({maxEntries:20,maxAgeSeconds:31536e3}),new s.CacheableResponsePlugin({statuses:[0,200]})]}),"GET"),s.registerRoute(/^https:\/\/fonts\.gstatic\.com\/.*/i,new s.CacheFirst({cacheName:"gstatic-fonts-cache",plugins:[new s.ExpirationPlugin({maxEntries:20,maxAgeSeconds:31536e3}),new s.CacheableResponsePlugin({statuses:[0,200]})]}),"GET")})); +if(!self.define){let s,e={};const l=(l,r)=>(l=new URL(l+".js",r).href,e[l]||new Promise((e=>{if("document"in self){const s=document.createElement("script");s.src=l,s.onload=e,document.head.appendChild(s)}else s=l,importScripts(l),e()})).then((()=>{let s=e[l];if(!s)throw new Error(`Module ${l} didn’t register its module`);return s})));self.define=(r,n)=>{const i=s||("document"in self?document.currentScript.src:"")||location.href;if(e[i])return;let u={};const a=s=>l(s,i),o={module:{uri:i},exports:u,require:a};e[i]=Promise.all(r.map((s=>o[s]||a(s)))).then((s=>(n(...s),u)))}}define(["./workbox-f5523f08"],(function(s){"use strict";self.skipWaiting(),s.clientsClaim(),s.precacheAndRoute([{url:"apple-touch-icon-180x180.png",revision:"c6ade8d120b32268facbde0e632c86d4"},{url:"assets/Angel-00-_OcCE1xs.jpg",revision:null},{url:"assets/Angel-01-RsyL_b7r.jpg",revision:null},{url:"assets/beacon-00-L9zfj4Q8.jpg",revision:null},{url:"assets/beacon-01-vYao7kaT.jpg",revision:null},{url:"assets/beacon-WzU-Fgwo.jpg",revision:null},{url:"assets/Blackheart-00-Barboaw1.jpg",revision:null},{url:"assets/Blackheart-01-DqXGaAGL.jpg",revision:null},{url:"assets/Brisket-00-fpn5lXhR.jpg",revision:null},{url:"assets/Brisket-01-Cz0yKYaC.jpg",revision:null},{url:"assets/brisket3-00-TRUFkM-Q.jpg",revision:null},{url:"assets/brisket3-01-C19fZQ9I.jpg",revision:null},{url:"assets/cast-00-CDhbzPRV.jpg",revision:null},{url:"assets/cast-01-DOJiR9Ch.jpg",revision:null},{url:"assets/compound-DlF-jmUs.svg",revision:null},{url:"assets/crook-00-C4D_gdaM.jpg",revision:null},{url:"assets/crook-01-D9bCOT5R.jpg",revision:null},{url:"assets/egret-00-BKhmAAwA.jpg",revision:null},{url:"assets/egret-01-DCSfZLX7.jpg",revision:null},{url:"assets/Flea-00-PYY29ZDm.jpg",revision:null},{url:"assets/Flea-01-B-ceu-Fs.jpg",revision:null},{url:"assets/Gaffer-00-Chm4XJB6.jpg",revision:null},{url:"assets/Gaffer-01-DChRbbv3.jpg",revision:null},{url:"assets/gaffer-front-large-box-BhDGw3yv.png",revision:null},{url:"assets/GB-S4-Alchemists-19-02-01-VIy3CwEn.jpg",revision:null},{url:"assets/GB-S4-Alchemists-19-02-02-Dar2t4NY.jpg",revision:null},{url:"assets/GB-S4-Alchemists-20-03-01-CtoJr-2q.jpg",revision:null},{url:"assets/GB-S4-Alchemists-20-03-02-DlAuCMzg.jpg",revision:null},{url:"assets/GB-S4-Alchemists-20-03-04-RC1YiQbH.jpg",revision:null},{url:"assets/GB-S4-Alchemists-20-03-06-CUxY-HyS.jpg",revision:null},{url:"assets/GB-S4-Alchemists-20-03-08-B418Rr1J.jpg",revision:null},{url:"assets/GB-S4-Alchemists-20-03-10-DOhnGqkn.jpg",revision:null},{url:"assets/GB-S4-Alchemists-20-03-12-BZlwYyu9.jpg",revision:null},{url:"assets/GB-S4-Alchemists-20-03-14-DH-K3Y_5.jpg",revision:null},{url:"assets/GB-S4-Alchemists-20-03-16-Z1UPpUIk.jpg",revision:null},{url:"assets/GB-S4-Alchemists-20-03-18-DwfTDp0o.jpg",revision:null},{url:"assets/GB-S4-Alchemists-20-03-20-BFV6XWzl.jpg",revision:null},{url:"assets/GB-S4-Alchemists-20-03-22-G1PlavA6.jpg",revision:null},{url:"assets/GB-S4-Alchemists-20-03-24-CDYCDkSX.jpg",revision:null},{url:"assets/GB-S4-Alchemists-20-03-26-C9xO9eF2.jpg",revision:null},{url:"assets/GB-S4-Alchemists-20-03-28-4ME06k6U.jpg",revision:null},{url:"assets/GB-S4-Alchemists-20-03-30-DjbTACjD.jpg",revision:null},{url:"assets/GB-S4-Alchemists-20-03-31-BTog_cbt.jpg",revision:null},{url:"assets/GB-S4-Alchemists-20-03-32-Dui0dDSy.jpg",revision:null},{url:"assets/GB-S4-Blacksmiths-20-03-01-C1aHp8XU.jpg",revision:null},{url:"assets/GB-S4-Blacksmiths-20-03-02-Buw0Sd4K.jpg",revision:null},{url:"assets/GB-S4-Blacksmiths-20-03-03-BcPp4ACy.jpg",revision:null},{url:"assets/GB-S4-Blacksmiths-20-03-04-Iz-ZAoRD.jpg",revision:null},{url:"assets/GB-S4-Blacksmiths-20-03-06-CpyRLS4Z.jpg",revision:null},{url:"assets/GB-S4-Blacksmiths-20-03-08-Dom1S1qD.jpg",revision:null},{url:"assets/GB-S4-Blacksmiths-20-03-10-BPOmIv4i.jpg",revision:null},{url:"assets/GB-S4-Blacksmiths-20-03-12-C70-F9-G.jpg",revision:null},{url:"assets/GB-S4-Blacksmiths-20-03-14-BYsCG64l.jpg",revision:null},{url:"assets/GB-S4-Blacksmiths-20-03-16-BFmp7dwI.jpg",revision:null},{url:"assets/GB-S4-Blacksmiths-20-03-18-lzumGd1B.jpg",revision:null},{url:"assets/GB-S4-Blacksmiths-20-03-20-DH8KkvFf.jpg",revision:null},{url:"assets/GB-S4-Blacksmiths-20-03-22-CRMXvmQD.jpg",revision:null},{url:"assets/GB-S4-Blacksmiths-20-03-24-B0upn8X7.jpg",revision:null},{url:"assets/GB-S4-Blacksmiths-20-03-26-BZAHT1q6.jpg",revision:null},{url:"assets/GB-S4-Blacksmiths-20-03-28-IdVWYe8z.jpg",revision:null},{url:"assets/GB-S4-Blacksmiths-20-03-30-zou6Flgi.jpg",revision:null},{url:"assets/GB-S4-Blacksmiths-20-03-32-DJ0MEQk3.jpg",revision:null},{url:"assets/GB-S4-Brewers-20-03-01-_bnlGcvZ.jpg",revision:null},{url:"assets/GB-S4-Brewers-20-03-02-Af5aErRU.jpg",revision:null},{url:"assets/GB-S4-Brewers-20-03-03-BTowl5yC.jpg",revision:null},{url:"assets/GB-S4-Brewers-20-03-04-CiBahMdS.jpg",revision:null},{url:"assets/GB-S4-Brewers-20-03-06-BAckyHQm.jpg",revision:null},{url:"assets/GB-S4-Brewers-20-03-08-C1SVs0jC.jpg",revision:null},{url:"assets/GB-S4-Brewers-20-03-10-dNR_AKj3.jpg",revision:null},{url:"assets/GB-S4-Brewers-20-03-12-Bzzw5t7M.jpg",revision:null},{url:"assets/GB-S4-Brewers-20-03-14-DUDxJnnr.jpg",revision:null},{url:"assets/GB-S4-Brewers-20-03-16-hLIfeAvT.jpg",revision:null},{url:"assets/GB-S4-Brewers-20-03-18-193xjOU7.jpg",revision:null},{url:"assets/GB-S4-Brewers-20-03-20-ht0AqR_9.jpg",revision:null},{url:"assets/GB-S4-Brewers-20-03-22-DB3lWhaZ.jpg",revision:null},{url:"assets/GB-S4-Brewers-20-03-24-BDXctZyF.jpg",revision:null},{url:"assets/GB-S4-Brewers-20-03-26-CJ3ohfD8.jpg",revision:null},{url:"assets/GB-S4-Brewers-20-03-28-D_Y6ChH0.jpg",revision:null},{url:"assets/GB-S4-Brewers-20-03-30-C7ofvQL3.jpg",revision:null},{url:"assets/GB-S4-Brewers-20-03-32-Cps3196a.jpg",revision:null},{url:"assets/GB-S4-Brewers-20-03-33-zps3y-hi.jpg",revision:null},{url:"assets/GB-S4-Brewers-20-03-34-CdaFu_Sd.jpg",revision:null},{url:"assets/GB-S4-Butchers-19-08-01-CLWIlX8T.jpg",revision:null},{url:"assets/GB-S4-Butchers-19-08-02-CFlOzX_b.jpg",revision:null},{url:"assets/GB-S4-Butchers-19-08-03-B1bjdh3r.jpg",revision:null},{url:"assets/GB-S4-Butchers-19-08-04-CR3Vo0aB.jpg",revision:null},{url:"assets/GB-S4-Butchers-19-08-06-BpDXV7JC.jpg",revision:null},{url:"assets/GB-S4-Butchers-19-08-08-BPo-9yTd.jpg",revision:null},{url:"assets/GB-S4-Butchers-19-08-10-phxnKqrp.jpg",revision:null},{url:"assets/GB-S4-Butchers-19-08-12-B2WDg1Js.jpg",revision:null},{url:"assets/GB-S4-Butchers-19-08-14-DXWG8I2n.jpg",revision:null},{url:"assets/GB-S4-Butchers-19-08-16-BjHesLe2.jpg",revision:null},{url:"assets/GB-S4-Butchers-19-08-18-6v1o2Ifu.jpg",revision:null},{url:"assets/GB-S4-Butchers-19-08-20-BKaya9dR.jpg",revision:null},{url:"assets/GB-S4-Butchers-19-08-22-D37jjOEk.jpg",revision:null},{url:"assets/GB-S4-Butchers-19-08-24-DUuL1aM2.jpg",revision:null},{url:"assets/GB-S4-Butchers-19-08-26-DOTJBjq_.jpg",revision:null},{url:"assets/GB-S4-Butchers-19-08-28-M6NS1cc0.jpg",revision:null},{url:"assets/GB-S4-Butchers-19-08-30-CZTx6gLx.jpg",revision:null},{url:"assets/GB-S4-Butchers-19-08-32-CDETLFF4.jpg",revision:null},{url:"assets/GB-S4-Cooks-19-08-01-B_Vd1DVn.jpg",revision:null},{url:"assets/GB-S4-Cooks-19-08-02-BCRzyOhW.jpg",revision:null},{url:"assets/GB-S4-Cooks-19-08-03-Du8Wgf95.jpg",revision:null},{url:"assets/GB-S4-Cooks-19-08-04-7QP0IEzl.jpg",revision:null},{url:"assets/GB-S4-Cooks-19-08-06-D5h9IUWD.jpg",revision:null},{url:"assets/GB-S4-Cooks-19-08-08-B27LuxRF.jpg",revision:null},{url:"assets/GB-S4-Cooks-19-08-10-BjEFjR2p.jpg",revision:null},{url:"assets/GB-S4-Cooks-19-08-12-DfumUS4Q.jpg",revision:null},{url:"assets/GB-S4-Cooks-19-08-14-2NKQVsMs.jpg",revision:null},{url:"assets/GB-S4-Engineers-20-03-01-Di9u3X0x.jpg",revision:null},{url:"assets/GB-S4-Engineers-20-03-02-Cy2lNFLR.jpg",revision:null},{url:"assets/GB-S4-Engineers-20-03-03-CaTM1yPN.jpg",revision:null},{url:"assets/GB-S4-Engineers-20-03-04-BNwvka_y.jpg",revision:null},{url:"assets/GB-S4-Engineers-20-03-06-rU0szJ96.jpg",revision:null},{url:"assets/GB-S4-Engineers-20-03-08-BhZW5K7b.jpg",revision:null},{url:"assets/GB-S4-Engineers-20-03-10-jYeXRRJi.jpg",revision:null},{url:"assets/GB-S4-Engineers-20-03-12-5N9um0rG.jpg",revision:null},{url:"assets/GB-S4-Engineers-20-03-14-B6x6JfxM.jpg",revision:null},{url:"assets/GB-S4-Engineers-20-03-16-Cc9F_94D.jpg",revision:null},{url:"assets/GB-S4-Engineers-20-03-18-C04RNSHr.jpg",revision:null},{url:"assets/GB-S4-Engineers-20-03-20-r4vOyU-R.jpg",revision:null},{url:"assets/GB-S4-Engineers-20-03-22-DHXCY4Wl.jpg",revision:null},{url:"assets/GB-S4-Engineers-20-03-24-D6hQxrzH.jpg",revision:null},{url:"assets/GB-S4-Engineers-20-03-26-C5iXMvZr.jpg",revision:null},{url:"assets/GB-S4-Engineers-20-03-28-7uzZCmXc.jpg",revision:null},{url:"assets/GB-S4-Engineers-20-03-30-bp8c3Uf4.jpg",revision:null},{url:"assets/GB-S4-Falconers-20-03-01-DAO812Wl.jpg",revision:null},{url:"assets/GB-S4-Falconers-20-03-02-C_ro4zOy.jpg",revision:null},{url:"assets/GB-S4-Falconers-20-03-03--r8Ylt5C.jpg",revision:null},{url:"assets/GB-S4-Falconers-20-03-04-CT6BXXd-.jpg",revision:null},{url:"assets/GB-S4-Falconers-20-03-06-agDql6N2.jpg",revision:null},{url:"assets/GB-S4-Falconers-20-03-08-CyRw5rwh.jpg",revision:null},{url:"assets/GB-S4-Falconers-20-03-10-1hF5DgY6.jpg",revision:null},{url:"assets/GB-S4-Falconers-20-03-12-CZORpUuZ.jpg",revision:null},{url:"assets/GB-S4-Falconers-20-03-14-D7WFZjKa.jpg",revision:null},{url:"assets/GB-S4-Farmers-19-12-01-LmV2xFUn.jpg",revision:null},{url:"assets/GB-S4-Farmers-19-12-02-COLOFnlA.jpg",revision:null},{url:"assets/GB-S4-Farmers-19-12-03-D9S_zy2g.jpg",revision:null},{url:"assets/GB-S4-Farmers-19-12-04-D5V7RGAr.jpg",revision:null},{url:"assets/GB-S4-Farmers-19-12-06-CvC6mrxK.jpg",revision:null},{url:"assets/GB-S4-Farmers-19-12-08-Bu2e9Uzp.jpg",revision:null},{url:"assets/GB-S4-Farmers-19-12-10-BVRVj083.jpg",revision:null},{url:"assets/GB-S4-Farmers-19-12-12-17j3-pGL.jpg",revision:null},{url:"assets/GB-S4-Farmers-19-12-14-D9QbUDBe.jpg",revision:null},{url:"assets/GB-S4-Farmers-19-12-16-Bi5uXUCL.jpg",revision:null},{url:"assets/GB-S4-Farmers-19-12-18-CYzbOhRU.jpg",revision:null},{url:"assets/GB-S4-Farmers-19-12-20-CfkO1wFr.jpg",revision:null},{url:"assets/GB-S4-Farmers-19-12-22-lG9W92aw.jpg",revision:null},{url:"assets/GB-S4-Farmers-19-12-24-BWbiceSz.jpg",revision:null},{url:"assets/GB-S4-Farmers-19-12-26-Cfuo1fZi.jpg",revision:null},{url:"assets/GB-S4-Farmers-19-12-28-C3SMHxWd.jpg",revision:null},{url:"assets/GB-S4-Farmers-19-12-30-C3nUj6AE.jpg",revision:null},{url:"assets/GB-S4-Farmers-19-12-32-DfwzxWCr.jpg",revision:null},{url:"assets/GB-S4-Fishermen-19-08-01-D54clbHu.jpg",revision:null},{url:"assets/GB-S4-Fishermen-19-08-02-D_xvByJF.jpg",revision:null},{url:"assets/GB-S4-Fishermen-19-08-03-HE2w3ci9.jpg",revision:null},{url:"assets/GB-S4-Fishermen-19-08-04-BfW77V1Z.jpg",revision:null},{url:"assets/GB-S4-Fishermen-19-08-06-BDyxN849.jpg",revision:null},{url:"assets/GB-S4-Fishermen-19-08-08-omES11k4.jpg",revision:null},{url:"assets/GB-S4-Fishermen-19-08-10-BEY4i-qQ.jpg",revision:null},{url:"assets/GB-S4-Fishermen-19-08-12-Dv7v3MeD.jpg",revision:null},{url:"assets/GB-S4-Fishermen-19-08-14-DuPQrXbP.jpg",revision:null},{url:"assets/GB-S4-Fishermen-19-08-16-DLLLRVAB.jpg",revision:null},{url:"assets/GB-S4-Fishermen-19-08-18-CaaIkPD9.jpg",revision:null},{url:"assets/GB-S4-Fishermen-19-08-20-DZM3Jz28.jpg",revision:null},{url:"assets/GB-S4-Fishermen-19-08-22-Dici-53D.jpg",revision:null},{url:"assets/GB-S4-Fishermen-19-08-24-DJyMosKX.jpg",revision:null},{url:"assets/GB-S4-Fishermen-19-08-26-DgZQkJwc.jpg",revision:null},{url:"assets/GB-S4-Fishermen-19-08-28-Bq-GSM8T.jpg",revision:null},{url:"assets/GB-S4-Fishermen-19-08-30-BsuCsQld.jpg",revision:null},{url:"assets/GB-S4-Fishermen-19-08-32-Co1is7SR.jpg",revision:null},{url:"assets/GB-S4-Gameplans-2019-Dp99TQ1B.png",revision:null},{url:"assets/GB-S4-Hunters-19-08-01-CmDbpORb.jpg",revision:null},{url:"assets/GB-S4-Hunters-19-08-02-DP64V92U.jpg",revision:null},{url:"assets/GB-S4-Hunters-19-08-03-C59ee243.jpg",revision:null},{url:"assets/GB-S4-Hunters-19-08-04-43bh7Xjn.jpg",revision:null},{url:"assets/GB-S4-Hunters-19-08-06-DvcQNJi9.jpg",revision:null},{url:"assets/GB-S4-Hunters-19-08-08-G2iJeyB7.jpg",revision:null},{url:"assets/GB-S4-Hunters-19-08-10-DXc2S5UR.jpg",revision:null},{url:"assets/GB-S4-Hunters-19-08-12-Bi7nnTZE.jpg",revision:null},{url:"assets/GB-S4-Hunters-19-08-14-COEjmcNE.jpg",revision:null},{url:"assets/GB-S4-Hunters-19-08-16-D8BrrZ7W.jpg",revision:null},{url:"assets/GB-S4-Hunters-19-08-18-m8dNYpqE.jpg",revision:null},{url:"assets/GB-S4-Hunters-19-08-20-B0_n3uev.jpg",revision:null},{url:"assets/GB-S4-Hunters-19-08-22-DnBgH8it.jpg",revision:null},{url:"assets/GB-S4-Hunters-19-08-24-Btt4JIV9.jpg",revision:null},{url:"assets/GB-S4-Hunters-19-08-26-ChOKS1SV.jpg",revision:null},{url:"assets/GB-S4-Hunters-19-08-28-HxO921jJ.jpg",revision:null},{url:"assets/GB-S4-Hunters-19-08-30-Dg6ELcLG.jpg",revision:null},{url:"assets/GB-S4-Hunters-19-08-32-CjwZbZPz.jpg",revision:null},{url:"assets/GB-S4-Masons-19-03-01-CU2vGuj1.jpg",revision:null},{url:"assets/GB-S4-Masons-19-03-02-BT75CHhK.jpg",revision:null},{url:"assets/GB-S4-Masons-19-08-01-B2F-qHyR.jpg",revision:null},{url:"assets/GB-S4-Masons-19-08-02-CDe3UOmk.jpg",revision:null},{url:"assets/GB-S4-Masons-19-08-04-KDNoOwoa.jpg",revision:null},{url:"assets/GB-S4-Masons-19-08-06-BPou1o3y.jpg",revision:null},{url:"assets/GB-S4-Masons-19-08-08-CxUr3wcQ.jpg",revision:null},{url:"assets/GB-S4-Masons-19-08-10-B-NC6pQE.jpg",revision:null},{url:"assets/GB-S4-Masons-19-08-12-BLKQpjuR.jpg",revision:null},{url:"assets/GB-S4-Masons-19-08-14-DYH-t6AE.jpg",revision:null},{url:"assets/GB-S4-Masons-19-08-16-D4IFawmu.jpg",revision:null},{url:"assets/GB-S4-Masons-19-08-18-CCBausup.jpg",revision:null},{url:"assets/GB-S4-Masons-19-08-20-ocIpAO8E.jpg",revision:null},{url:"assets/GB-S4-Masons-19-08-22-C5KnttI8.jpg",revision:null},{url:"assets/GB-S4-Masons-19-08-24-C_8aIC6i.jpg",revision:null},{url:"assets/GB-S4-Masons-19-08-26-DfJ6EfYF.jpg",revision:null},{url:"assets/GB-S4-Masons-19-08-28-B7QBbKlK.jpg",revision:null},{url:"assets/GB-S4-Masons-19-08-30-6kjit4Y9.jpg",revision:null},{url:"assets/GB-S4-Miners-20-03-01-D4YSyCEa.jpg",revision:null},{url:"assets/GB-S4-Miners-20-03-02-osGRf8x4.jpg",revision:null},{url:"assets/GB-S4-Miners-20-03-03-Bvr7X2VN.jpg",revision:null},{url:"assets/GB-S4-Miners-20-03-04-BUt1D44u.jpg",revision:null},{url:"assets/GB-S4-Miners-20-03-06-CWDJNfx1.jpg",revision:null},{url:"assets/GB-S4-Miners-20-03-08-Dsrwpy5l.jpg",revision:null},{url:"assets/GB-S4-Miners-20-03-10-BFt8Saso.jpg",revision:null},{url:"assets/GB-S4-Miners-20-03-12-D1QsxSt_.jpg",revision:null},{url:"assets/GB-S4-Miners-20-03-14-OmIZrrCX.jpg",revision:null},{url:"assets/GB-S4-Morticians-19-08-01-DIFD5DK0.jpg",revision:null},{url:"assets/GB-S4-Morticians-19-08-02-BIp1_EUg.jpg",revision:null},{url:"assets/GB-S4-Morticians-19-08-03-BEjT_hxM.jpg",revision:null},{url:"assets/GB-S4-Morticians-19-08-04-CehnRTZZ.jpg",revision:null},{url:"assets/GB-S4-Morticians-19-08-06-B-414ifs.jpg",revision:null},{url:"assets/GB-S4-Morticians-19-08-08--61yL9Bw.jpg",revision:null},{url:"assets/GB-S4-Morticians-19-08-10-t5GLRNs2.jpg",revision:null},{url:"assets/GB-S4-Morticians-19-08-12-mWeeXBnS.jpg",revision:null},{url:"assets/GB-S4-Morticians-19-08-14-DYB6-CC7.jpg",revision:null},{url:"assets/GB-S4-Morticians-19-08-16-DWJHVhQR.jpg",revision:null},{url:"assets/GB-S4-Morticians-19-08-18-CCUOST9Q.jpg",revision:null},{url:"assets/GB-S4-Morticians-19-08-20-C22KtbCr.jpg",revision:null},{url:"assets/GB-S4-Morticians-19-08-22-urTSkH8v.jpg",revision:null},{url:"assets/GB-S4-Morticians-19-08-26-EHTItFK_.jpg",revision:null},{url:"assets/GB-S4-Morticians-19-08-28-R_qj57Ah.jpg",revision:null},{url:"assets/GB-S4-Morticians-19-08-30-D7tgwlEH.jpg",revision:null},{url:"assets/GB-S4-Morticians-19-08-32-rWK20dpO.jpg",revision:null},{url:"assets/GB-S4-Morticians-19-08-34-Cml7KNHH.jpg",revision:null},{url:"assets/GB-S4-Navigators-20-03-01-M7N3Qnm9.jpg",revision:null},{url:"assets/GB-S4-Navigators-20-03-02-C0DvULy4.jpg",revision:null},{url:"assets/GB-S4-Navigators-20-03-03-DuY0bj8b.jpg",revision:null},{url:"assets/GB-S4-Navigators-20-03-04-C54iXdHJ.jpg",revision:null},{url:"assets/GB-S4-Navigators-20-03-05-DijPkVU0.jpg",revision:null},{url:"assets/GB-S4-Navigators-20-03-07-k2ifPp8C.jpg",revision:null},{url:"assets/GB-S4-Navigators-20-03-10-kxgvrwFf.jpg",revision:null},{url:"assets/GB-S4-Navigators-20-03-11-DLBrn3lH.jpg",revision:null},{url:"assets/GB-S4-Navigators-20-03-14-4LJM_QAb.jpg",revision:null},{url:"assets/GB-S4-Order-19-08-01-asZnKqhR.jpg",revision:null},{url:"assets/GB-S4-Order-19-08-02-DxYxwIyf.jpg",revision:null},{url:"assets/GB-S4-Order-19-08-04-B1NHIvQH.jpg",revision:null},{url:"assets/GB-S4-Order-19-08-06-BxCTP18m.jpg",revision:null},{url:"assets/GB-S4-Order-19-08-08-DWLWCNBP.jpg",revision:null},{url:"assets/GB-S4-Order-19-08-10-CdmsC0k7.jpg",revision:null},{url:"assets/GB-S4-Order-19-08-12-CUnlpuDI.jpg",revision:null},{url:"assets/GB-S4-Order-19-08-14-N2zvQdYm.jpg",revision:null},{url:"assets/GB-S4-Order-19-08-16-BxGIGoGz.jpg",revision:null},{url:"assets/GB-S4-Order-19-08-18-gkj8skFt.jpg",revision:null},{url:"assets/GB-S4-Ratcatchers-19-08-01-CbXHBUJx.jpg",revision:null},{url:"assets/GB-S4-Ratcatchers-19-08-02-XbBjNmUR.jpg",revision:null},{url:"assets/GB-S4-Ratcatchers-19-08-03-vf5l_pcD.jpg",revision:null},{url:"assets/GB-S4-Ratcatchers-19-08-04-BnvzzXPE.jpg",revision:null},{url:"assets/GB-S4-Ratcatchers-19-08-06-DlqN1o8i.jpg",revision:null},{url:"assets/GB-S4-Ratcatchers-19-08-08-BwciubOW.jpg",revision:null},{url:"assets/GB-S4-Ratcatchers-19-08-10-DtQCr3kF.jpg",revision:null},{url:"assets/GB-S4-Ratcatchers-19-08-12-JUs2Xlho.jpg",revision:null},{url:"assets/GB-S4-Ratcatchers-19-08-14-D1JyRK5e.jpg",revision:null},{url:"assets/GB-S4-Reference-1-Cx3eC7d4.png",revision:null},{url:"assets/GB-S4-Reference-2-CJ4YgyH9.png",revision:null},{url:"assets/GB-S4-Reference-3-BTbZpB51.png",revision:null},{url:"assets/GB-S4-Reference-4-CpP58Tap.png",revision:null},{url:"assets/GB-S4-Reference-5-Be8xjsp1.png",revision:null},{url:"assets/GB-S4-Shepherds-20-03-01-BszDyn7n.jpg",revision:null},{url:"assets/GB-S4-Shepherds-20-03-02-XqwLekip.jpg",revision:null},{url:"assets/GB-S4-Shepherds-20-03-03-CJ-GnLek.jpg",revision:null},{url:"assets/GB-S4-Shepherds-20-03-04-CpJUbIK5.jpg",revision:null},{url:"assets/GB-S4-Shepherds-20-03-06-TZPJ1JER.jpg",revision:null},{url:"assets/GB-S4-Shepherds-20-03-08-fPdEFqsg.jpg",revision:null},{url:"assets/GB-S4-Shepherds-20-03-10-D8vNNVMa.jpg",revision:null},{url:"assets/GB-S4-Shepherds-20-03-12-Cs6eNdgu.jpg",revision:null},{url:"assets/GB-S4-Shepherds-20-03-14-EROLPl1k.jpg",revision:null},{url:"assets/GB-S4-Shepherds-20-03-16-CH7z3m46.jpg",revision:null},{url:"assets/GB-S4-Union-20-03-01-BYUf_cPI.jpg",revision:null},{url:"assets/GB-S4-Union-20-03-02-CAfWuq1n.jpg",revision:null},{url:"assets/GB-S4-Union-20-03-03-ByRX6Zf6.jpg",revision:null},{url:"assets/GB-S4-Union-20-03-04-DESKIKlc.jpg",revision:null},{url:"assets/GB-S4-Union-20-03-06-TH_Fhhnv.jpg",revision:null},{url:"assets/GB-S4-Union-20-03-08-C9acG5Gy.jpg",revision:null},{url:"assets/GB-S4-Union-20-03-10-BRZlJPNW.jpg",revision:null},{url:"assets/GB-S4-Union-20-03-12--TefmgjH.jpg",revision:null},{url:"assets/GB-S4-Union-20-03-14-DoT0cBAC.jpg",revision:null},{url:"assets/GB-S4-Union-20-03-16-DrDLPTZJ.jpg",revision:null},{url:"assets/GB-S4-Union-20-03-18-bedyXvhB.jpg",revision:null},{url:"assets/GB-S4-Union-20-03-20-CDcWfDBp.jpg",revision:null},{url:"assets/GB-S4-Union-20-03-22-DFVnunFx.jpg",revision:null},{url:"assets/GB-S4-Union-20-03-24-DTxA3SGq.jpg",revision:null},{url:"assets/GB-S4-Union-20-03-26-Bo3pJ595.jpg",revision:null},{url:"assets/GB-S4-Union-20-03-28-Cix4cgvH.jpg",revision:null},{url:"assets/GB-S4-Union-20-03-30-DOPQxsMF.jpg",revision:null},{url:"assets/gb-symbol-defs-DvUA8_44.svg",revision:null},{url:"assets/heat-00-D38QQgsn.jpg",revision:null},{url:"assets/heat-01-TaWfEq1e.jpg",revision:null},{url:"assets/heat-kg0Ne0rh.jpg",revision:null},{url:"assets/hook-00-BCtxORP2.jpg",revision:null},{url:"assets/hook-01-CFEXTspD.jpg",revision:null},{url:"assets/ikaros-00-BlK23AQW.jpg",revision:null},{url:"assets/ikaros-01-CaTWYr3E.jpg",revision:null},{url:"assets/index-BOvE4Tg9.js",revision:null},{url:"assets/index-BOX54cO5.css",revision:null},{url:"assets/lamp-beta-63HlWaeb.png",revision:null},{url:"assets/lamps_back_blank-DaxPd_Oo.jpg",revision:null},{url:"assets/Locus-00-BlUYiKL3.jpg",revision:null},{url:"assets/Locus-01-CgJeSABI.jpg",revision:null},{url:"assets/lucky-00--3wf1Q-o.jpg",revision:null},{url:"assets/lucky-01-CeFOEkb7.jpg",revision:null},{url:"assets/lucky-n3AjGPzo.svg",revision:null},{url:"assets/miasma-00-gJuVKj0r.jpg",revision:null},{url:"assets/miasma-01-BFpZKg3H.jpg",revision:null},{url:"assets/minx-00-DKid1QgM.jpg",revision:null},{url:"assets/minx-01-h4AvAe2P.jpg",revision:null},{url:"assets/nightlight-00-DeG30Qno.jpg",revision:null},{url:"assets/nightlight-01-B5GmfHdF.jpg",revision:null},{url:"assets/nightlight-BICbD_Qy.jpg",revision:null},{url:"assets/Order_back-qsepM33g.jpg",revision:null},{url:"assets/phosphor-00-kYBsDzr4.jpg",revision:null},{url:"assets/phosphor-01-aCMgs7Xa.jpg",revision:null},{url:"assets/phosphor-CifRCYrC.jpg",revision:null},{url:"assets/playbook-symbol-defs-Dz3QsL1K.svg",revision:null},{url:"assets/Salt-00-DTipa4Vq.jpg",revision:null},{url:"assets/Salt-01-DgX-3wqX.jpg",revision:null},{url:"assets/soot-00-CjgkmHEF.jpg",revision:null},{url:"assets/soot-01-DLvloUPB.jpg",revision:null},{url:"assets/soot-CXEcs2BT.jpg",revision:null},{url:"assets/steeljaw-00-DBylP57a.jpg",revision:null},{url:"assets/steeljaw-01-DHvdkD3u.jpg",revision:null},{url:"assets/tenderiser-00-DJeWjZaC.jpg",revision:null},{url:"assets/tenderiser-01-Dn53BCqM.jpg",revision:null},{url:"assets/Truffles-00-BxTIIeQ4.jpg",revision:null},{url:"assets/Truffles-01-1xGyMIOv.jpg",revision:null},{url:"assets/Ulfr-00-BXhlGxmA.jpg",revision:null},{url:"assets/Ulfr-01-JQfocVce.jpg",revision:null},{url:"assets/vGutter-00-CpnNh9P4.jpg",revision:null},{url:"assets/vGutter-01-BWHR1234.jpg",revision:null},{url:"assets/wick-00-CEZ6BY1J.jpg",revision:null},{url:"assets/wick-01-DtuDStax.jpg",revision:null},{url:"assets/wick-D10XZuyz.jpg",revision:null},{url:"assets/workbox-window.prod.es5-D5gOYdM7.js",revision:null},{url:"CNAME",revision:"6b62f425122a80ff0107c2b9938f87b7"},{url:"data/gameplans.json",revision:"84197a88c0201e0335c7e8015c953c77"},{url:"data/GB-Playbook-4-3.json",revision:"92b689cb87b03ad4b17a13d4c8149687"},{url:"data/GB-Playbook-4-4.json",revision:"5385d14b70c849f475758648abddbe36"},{url:"data/GB-Playbook-4-5.json",revision:"ebf4b91061ca5728eb53d8f9d41f8edc"},{url:"data/GB-Playbook-4-6.fr.json",revision:"195267162ee602eb1185e49d15c99885"},{url:"data/GB-Playbook-4-6.json",revision:"f609abebce605d01f9308eeb83641f29"},{url:"data/manifest.json",revision:"88559fb832d4b6821f1baaa74bbf3a5c"},{url:"favicon.ico",revision:"4a2fe2fdcaa08f161283444598a8f468"},{url:"favicon.svg",revision:"6114c7937db75b09f50b3d31b2bd85d6"},{url:"index.html",revision:"935e0e8ff9b02153cc3ee6f33c2e698d"},{url:"manifest.webmanifest",revision:"a9121016eaef4c6c02585821c2e74f1a"},{url:"maskable-icon-512x512.png",revision:"6ef31a886aa1b0f4561ddc92364e8bd1"},{url:"privacy.html",revision:"4eaf071255466ce08853754be78169ba"},{url:"pwa-192x192.png",revision:"6d64c647cd785e004c0be60bb1779d89"},{url:"pwa-512x512.png",revision:"d64c4db6a1dcdf625df901c1341ea41c"},{url:"pwa-64x64.png",revision:"ecb00646e770b9aa3e91cfb9909387c3"},{url:"robots.txt",revision:"fa1ded1ed7c11438a9b0385b1e112850"},{url:"CNAME",revision:"6b62f425122a80ff0107c2b9938f87b7"},{url:"apple-touch-icon-180x180.png",revision:"c6ade8d120b32268facbde0e632c86d4"},{url:"favicon.ico",revision:"4a2fe2fdcaa08f161283444598a8f468"},{url:"favicon.svg",revision:"6114c7937db75b09f50b3d31b2bd85d6"},{url:"maskable-icon-512x512.png",revision:"6ef31a886aa1b0f4561ddc92364e8bd1"},{url:"privacy.html",revision:"4eaf071255466ce08853754be78169ba"},{url:"pwa-192x192.png",revision:"6d64c647cd785e004c0be60bb1779d89"},{url:"pwa-512x512.png",revision:"d64c4db6a1dcdf625df901c1341ea41c"},{url:"pwa-64x64.png",revision:"ecb00646e770b9aa3e91cfb9909387c3"},{url:"robots.txt",revision:"fa1ded1ed7c11438a9b0385b1e112850"},{url:"data/GB-Playbook-4-3.json",revision:"92b689cb87b03ad4b17a13d4c8149687"},{url:"data/GB-Playbook-4-4.json",revision:"5385d14b70c849f475758648abddbe36"},{url:"data/GB-Playbook-4-5.json",revision:"ebf4b91061ca5728eb53d8f9d41f8edc"},{url:"data/GB-Playbook-4-6.fr.json",revision:"195267162ee602eb1185e49d15c99885"},{url:"data/GB-Playbook-4-6.json",revision:"f609abebce605d01f9308eeb83641f29"},{url:"data/gameplans.json",revision:"84197a88c0201e0335c7e8015c953c77"},{url:"data/manifest.json",revision:"88559fb832d4b6821f1baaa74bbf3a5c"},{url:"manifest.webmanifest",revision:"a9121016eaef4c6c02585821c2e74f1a"}],{}),s.cleanupOutdatedCaches(),s.registerRoute(new s.NavigationRoute(s.createHandlerBoundToURL("index.html"))),s.registerRoute(/^https:\/\/docs\.guildball\.app\/.*/i,new s.CacheFirst({cacheName:"guildball-docs",plugins:[new s.ExpirationPlugin({maxEntries:20,maxAgeSeconds:31536e3}),new s.CacheableResponsePlugin({statuses:[0,200]})]}),"GET"),s.registerRoute(/^https:\/\/fonts\.googleapis\.com\/.*/i,new s.CacheFirst({cacheName:"google-fonts-cache",plugins:[new s.ExpirationPlugin({maxEntries:20,maxAgeSeconds:31536e3}),new s.CacheableResponsePlugin({statuses:[0,200]})]}),"GET"),s.registerRoute(/^https:\/\/fonts\.gstatic\.com\/.*/i,new s.CacheFirst({cacheName:"gstatic-fonts-cache",plugins:[new s.ExpirationPlugin({maxEntries:20,maxAgeSeconds:31536e3}),new s.CacheableResponsePlugin({statuses:[0,200]})]}),"GET")}));