2 lines
32 KiB
JavaScript
2 lines
32 KiB
JavaScript
import{n as F,M as E,U as P,L as I,m as R}from"./index-DDNMzpZj.js";import{a as L,D as $}from"./DataFilter-CJCQVhjM.js";import{p as O}from"./collection-tracker-03Pk0lTl.js";import{C as M}from"./Checkbox-Dc2UYqO9.js";import{S as U}from"./StatInput-BU1s-zba.js";import{S as V}from"./StarsLine-CReD_mDq.js";import{_ as D}from"./icon_pring-bV6Un94l.js";import"./mixins-CpCP8hE3.js";var b={},N;function B(){if(N)return b;N=1,b.byteLength=c,b.toByteArray=f,b.fromByteArray=k;for(var n=[],e=[],s=typeof Uint8Array<"u"?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=0,r=a.length;t<r;++t)n[t]=a[t],e[a.charCodeAt(t)]=t;e[45]=62,e[95]=63;function l(i){var h=i.length;if(h%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var m=i.indexOf("=");m===-1&&(m=h);var w=m===h?0:4-m%4;return[m,w]}function c(i){var h=l(i),m=h[0],w=h[1];return(m+w)*3/4-w}function o(i,h,m){return(h+m)*3/4-m}function f(i){var h,m=l(i),w=m[0],p=m[1],_=new s(o(i,w,p)),g=0,x=p>0?w-4:w,v;for(v=0;v<x;v+=4)h=e[i.charCodeAt(v)]<<18|e[i.charCodeAt(v+1)]<<12|e[i.charCodeAt(v+2)]<<6|e[i.charCodeAt(v+3)],_[g++]=h>>16&255,_[g++]=h>>8&255,_[g++]=h&255;return p===2&&(h=e[i.charCodeAt(v)]<<2|e[i.charCodeAt(v+1)]>>4,_[g++]=h&255),p===1&&(h=e[i.charCodeAt(v)]<<10|e[i.charCodeAt(v+1)]<<4|e[i.charCodeAt(v+2)]>>2,_[g++]=h>>8&255,_[g++]=h&255),_}function y(i){return n[i>>18&63]+n[i>>12&63]+n[i>>6&63]+n[i&63]}function d(i,h,m){for(var w,p=[],_=h;_<m;_+=3)w=(i[_]<<16&16711680)+(i[_+1]<<8&65280)+(i[_+2]&255),p.push(y(w));return p.join("")}function k(i){for(var h,m=i.length,w=m%3,p=[],_=16383,g=0,x=m-w;g<x;g+=_)p.push(d(i,g,g+_>x?x:g+_));return w===1?(h=i[m-1],p.push(n[h>>2]+n[h<<4&63]+"==")):w===2&&(h=(i[m-2]<<8)+i[m-1],p.push(n[h>>10]+n[h>>4&63]+n[h<<2&63]+"=")),p.join("")}return b}B();const G={model:{prop:"show",event:"close"},components:{Modal:E},props:{show:{type:Boolean,required:!0}},data(){return{url:""}},methods:{getURL(){this.$emit("import",this.url),this.$emit("close",!1)}},watch:{show(){if(this.show===!0){let n=this;this.$nextTick().then(()=>{n.url="",n.$refs.url.focus()})}}}};var W=function(){var e=this,s=e._self._c;return s("modal",{attrs:{show:e.show},on:{close:function(a){return e.$emit("close",!1)}},scopedSlots:e._u([{key:"header",fn:function(){return[s("h2",[e._v("Please copy your gbf.wiki collection URL below")])]},proxy:!0}])},[s("form",{staticClass:"m-1",on:{submit:function(a){return a.preventDefault(),e.getURL()}}},[s("div",{staticClass:"mb-2"},[s("label",{attrs:{for:"url"}},[e._v("URL")]),s("input",{directives:[{name:"model",rawName:"v-model",value:e.url,expression:"url"}],ref:"url",staticClass:"input w-full",attrs:{id:"url",type:"text",placeholder:"URL",required:"",autofocus:""},domProps:{value:e.url},on:{input:function(a){a.target.composing||(e.url=a.target.value)}}})]),s("input",{staticClass:"btn btn-blue pt-2",attrs:{type:"submit",value:"Import"}})])])},j=[],T=F(G,W,j,!1,null,null);const q=T.exports,u=new P.LocalStorageMgt("CollectionTracker"),S=[{name:"Name",isColumn:!0,isFilter:!1,hasAll:!0,key:"n"},{name:"Rarity",isColumn:!1,isFilter:!0,hasAll:!0,key:"ri"},{name:"Element",isColumn:!0,isFilter:!0,hasAll:!0,key:"e"},{name:"Type",isColumn:!0,isFilter:!0,hasAll:!0,key:"t"},{name:"Race",isColumn:!0,isFilter:!0,hasAll:!0,key:"ra"},{name:"Weapon",isColumn:!0,isFilter:!0,hasAll:!0,key:"w"},{name:"Owned",isColumn:!1,isFilter:!0,hasAll:!1,key:"owned"},{name:"Ringed",isColumn:!1,isFilter:!0,hasAll:!1,key:"ring"}];function H(){return Object.fromEntries(S.map(n=>[n.key,P.copy($[n.key])]))}function A(){return Object.fromEntries(S.map(n=>$[n.key].data?[n.key,$[n.key].data.map(e=>0)]:[n.key,[]]))}const C=()=>({chara_show:{null:!0,10:!0,20:!0,500:!0,600:!0,1e3:!0,1010:!0,1020:!0,1030:!0,1040:!0,1050:!0,1500:!0,1600:!0},summon_show:{null:!0,20:!0,500:!0,600:!0,1e3:!0,1020:!0,1030:!0,1600:!0},data_model:H(),data_count:[A(),A()],modification:!1,showNames:!0,showStars:!0,showAwakening:!1,showRings:!0,showCharacters:!0,showSummons:!0,showStats:!1,show_modal_url:!1,clipboard_text:"",loading:!0,editRings:!1}),K={components:{Checkbox:M,StatInput:U,DataFilter:L,ModalUrl:q,StarsLine:V},mixins:[O],head:{title:"Granblue.Party - Collection Tracker",desc:"Track the characters and summons you unlocked, and share your collection with your friends",image:"https://www.granblue.party/img/card_collection.jpg",keywords:"collection, tracker, characters, summons, share"},data(){return C()},methods:{getName(n){return this.isLangEnglish?n.n:n.nj},setShowCharacters(){this.showCharacters=!this.showCharacters,u.setValue("showCharacters",this)},setShowSummons(){this.showSummons=!this.showSummons,u.setValue("showSummons",this)},selectChara(n){this.isOwnCollection&&(this.editRings?n.ring=!n.ring:(n.owned=!n.owned,n.owned?(this.chara_count.sum++,this.chara_count[n.d]++):(this.chara_count.sum--,this.chara_count[n.d]--)),this.modification=!0)},selectSummon(n){if(this.isOwnCollection){if(this.editRings)return;n.owned=!n.owned,n.owned?(this.summon_count.sum++,this.summon_count[n.d]++):(this.summon_count.sum--,this.summon_count[n.d]--),this.modification=!0}},starsModified(){this.isOwnCollection&&(this.modification=!0)},saveCollection(){if(this.isOwnCollection){const n={c:[],s:[]};this.characters.forEach(e=>{e.forEach(s=>{s.owned!=null&&n.c.push([s.id,s.sc,s.owned,s.aw,s.ring])})}),this.summons.forEach(e=>{e.forEach(s=>{s.owned!=null&&n.s.push([s.id,s.sc,s.owned])})}),this.axios.post("/tracker/save",n).then(e=>this.$store.dispatch("addMessage",{message:"Collection saved successfully"})).catch(e=>this.$store.dispatch("addAxiosErrorMessage",e))}},openInWiki(){let n={c:["","",""],s:["","",""]},e={c:[{},{},{}],s:[{},{},{}]};this.characters.flat().forEach(a=>{if(a.owned===!0){const t=a.id.toString(),r=t.slice(2,3)+t.slice(4);if(r.length===4){const l=a.ri,c=parseInt(r.slice(1),10);e.c[l][c]=parseInt(Math.min(a.sc,6),10)+1}}}),this.summons.flat().forEach(a=>{if(a.owned===!0){const t=a.id.toString(),r=t.slice(2,3)+t.slice(4);if(r.length===4){const l=a.ri,c=parseInt(r.slice(1),10);e.s[l][c]=parseInt(a.sc,10)+1}}}),["c","s"].forEach(a=>{[0,1,2].forEach(t=>{let r=0;const l=e[a][t];for(let d in l)r=Math.max(r,d);const o=(Math.floor(r/8)+1)*3;let f=new Uint8Array(o);for(let d=0;d<=Math.floor(r/8);d++){let k=0;for(let i=0;i<8;i++){let h=l[d*8+i];h==null&&(h=0),k|=h<<i*3}f[d*3]=k>>0&255,f[d*3+1]=k>>8&255,f[d*3+2]=k>>16&255}const y=base64js.fromByteArray(f);y!="AAAA"&&(n[a][t]+=y)})});const s="https://gbf.wiki/Collection_Tracker#o3."+n.c[2]+"."+n.c[1]+"."+n.c[0]+"."+n.s[2]+"."+n.s[1]+"."+n.s[0];window.open(s)},shareCollection(){const n=window.location.href+"/"+this.$store.getters.getUserId;this.clipboard_text=n;let e=this;this.$nextTick().then(()=>{document.getElementById("clipboardInput").select(),document.execCommand("copy"),e.clipboard_text="",e.$store.dispatch("addMessage",{message:"URL copied to clipboard"})})},loadCollection(){let n="";return this.isOwnCollection?n=this.$store.getters.getUserId:n=this.$route.params.collection_id,this.$store.dispatch("collection/fetchCollection",n)},loadWikiCollection(n){let e=new Map,s=n.split("#");s.length==1?s=s[0]:s=s[1];let a=s.split(".");for(let r=1;r<=7;r++)typeof a[r]!="string"&&(a[r]="");const t={302e4:a[3],303e4:a[2],304e4:a[1],202e4:a[6],203e4:a[5],204e4:a[4]};if(a[1].length+a[2].length+a[3].length+a[4].length+a[5].length+a[6].length<1){this.$store.dispatch("addMessage",{title:"Error",message:"Invalid wiki collection URL"});return}for(let[r,l]of Object.entries(t)){if(l.length<1)continue;let c=base64js.toByteArray(l),o=c.length/3;for(let f=0;f<o;f++){let y=0;y|=c[f*3]<<0,y|=c[f*3+1]<<8,y|=c[f*3+2]<<16;for(let d=0;d<8;d++){let k=(y>>d*3&7)-1;if(k<0)continue;let i=parseInt(r,10)+(f*8+d);e.set(i,k)}}}this.characters.flat().forEach(r=>{const l=e.get(r.id);l!==void 0?(r.owned=!0,r.sc=l):r.owned===!0&&(r.owned=!1)}),this.summons.flat().forEach(r=>{const l=e.get(r.id);l!==void 0?(r.owned=!0,r.sc=l):r.owned===!0&&(r.owned=!1)}),this.modification=!0}},computed:{...R("collection",["characters","chara_count","chara_total","summons","summon_count","summon_total"]),MAX_AWAKENING(){return 9},getFilters(){return S.filter(n=>n.isFilter)},filtersActive(){return Object.values(this.chara_show).some(n=>!n)||Object.values(this.summon_show).some(n=>!n)},isOwnCollection(){return this.$route.params.collection_id===void 0},isLangEnglish(){return this.$store.getters.getLang===I.EN},getCharacters(){if(this.characters){const n=A(),e=this.characters.map(s=>s.filter(a=>{if(!this.chara_show.hasOwnProperty(a.d))return console.log("Unknown Character category "+a.d+". Please report this error to the administrator."),!0;if(!this.chara_show[a.d])return!1;const t=this.getFilters.every(r=>this.data_model[r.key].show(a[r.key]));return t&&this.showCharacters&&this.getFilters.forEach(r=>{this.data_model[r.key].add(a[r.key],n[r.key])}),t}));return this.$set(this.data_count,0,n),e}return[[],[],[],[],[],[],[]]},getSummons(){if(this.summons){const n=A(),e=this.summons.map(s=>s.filter(a=>{const t=this.getFilters.every(r=>a[r.key]===void 0?!0:this.summon_show.hasOwnProperty(a.d)?this.summon_show[a.d]?this.data_model[r.key].show(a[r.key]):!1:(console.log("Unknown Summon category "+a.d+". Please report this error to the administrator."),!0));return t&&this.showSummons&&this.getFilters.forEach(r=>{a[r.key]!==void 0&&this.data_model[r.key].add(a[r.key],n[r.key])}),t}));return this.$set(this.data_count,1,n),e}return[[],[],[],[],[],[],[]]},getUnits(){return[this.getCharacters,this.getSummons]}},serverPrefetch(){return this.loadCollection()},async mounted(){u.getValue(this,"showNames"),u.getValue(this,"showStars"),u.getValue(this,"showAwakening"),u.getValue(this,"showRings"),u.getValue(this,"showCharacters"),u.getValue(this,"showSummons");const n=u.fetchValue("chara_show");if(n!==void 0)for(const[s,a]of Object.entries(n))this.chara_show.hasOwnProperty(s)&&(this.chara_show[s]=a);const e=u.fetchValue("summon_show");if(e!==void 0)for(const[s,a]of Object.entries(e))this.summon_show.hasOwnProperty(s)&&(this.summon_show[s]=a);[0,1].forEach(s=>{const a=u.fetchValue("owned-"+s);a!==void 0&&this.$set(this.data_model.owned.data[s],"checked",a);const t=u.fetchValue("ring-"+s);t!==void 0&&this.$set(this.data_model.ring.data[s],"checked",t)}),await this.loadCollection().then(s=>this.loading=!1)},watch:{"$store.getters.getUserId"(n){n===null?this.$router.push({name:"collection401"}).catch(()=>{}):(Object.assign(this.$data,C()),this.loadCollection().then(e=>this.loading=!1))},$route(n,e){Object.assign(this.$data,C()),this.loadCollection().then(s=>this.loading=!1)},chara_show:{handler(){u.setValue("chara_show",this)},deep:!0},summon_show:{handler(){u.setValue("summon_show",this)},deep:!0},"data_model.owned.data":{handler(){u.setNamedValue("owned-0",this.data_model.owned.data[0].checked),u.setNamedValue("owned-1",this.data_model.owned.data[1].checked)},deep:!0},"data_model.ring.data":{handler(){u.setNamedValue("ring-0",this.data_model.ring.data[0].checked),u.setNamedValue("ring-1",this.data_model.ring.data[1].checked)},deep:!0},showNames(){u.setValue("showNames",this)},showStars(){u.setValue("showStars",this)},showAwakening(){u.setValue("showAwakening",this)},showRings(){u.setValue("showRings",this)}}};var X=function(){var e=this,s=e._self._c;return s("div",[e.isOwnCollection?s("div",{staticClass:"flex flex-row flex-wrap gap-2 items-center mb-4"},[s("button",{staticClass:"btn btn-blue",on:{click:function(a){e.show_modal_url=!0}}},[s("fa-icon",{staticClass:"text-xl",attrs:{icon:["fas","folder-open"]}}),e._v(" Load Wiki collection ")],1),s("button",{staticClass:"btn btn-blue",on:{click:function(a){return e.openInWiki()}}},[s("fa-icon",{staticClass:"text-xl",attrs:{icon:["fas","external-link-alt"]}}),e._v(" Open in Wiki ")],1),s("button",{staticClass:"btn btn-blue",on:{click:function(a){return e.shareCollection()}}},[s("fa-icon",{staticClass:"text-xl",attrs:{icon:["fas","share-alt"]}}),e._v(" Share ")],1),s("button",{staticClass:"btn btn-blue",attrs:{disabled:!e.modification},on:{click:function(a){return e.saveCollection()}}},[s("fa-icon",{staticClass:"text-xl",attrs:{icon:["fas","save"]}}),e._v(" Save changes ")],1),s("button",{staticClass:"btn",class:e.editRings?"btn-red":"btn-blue",on:{click:function(a){e.editRings=!e.editRings}}},[s("fa-icon",{staticClass:"text-xl",attrs:{icon:["fas","ring"]}}),e._v(" Edit rings ")],1)]):e._e(),s("div",{staticClass:"flex flex-row flex-wrap items-center gap-2 mb-4"},[e._l(e.getFilters,function(a){return s("data-filter",{key:a.name,attrs:{category:a.name,count:e.data_count[0][a.key].map((t,r)=>t+e.data_count[1][a.key][r]),data:e.data_model[a.key].data,hasAll:a.hasAll}})}),s("div",{staticClass:"flex flex-row flex-wrap items-center btn-group"},[s("span",{staticClass:"mr-2"},[e._v("Show")]),s("button",{staticClass:"btn btn-sm",class:e.showCharacters?"btn-blue":"btn-white",on:{click:function(a){return e.setShowCharacters()}}},[e._v("Characters")]),s("button",{staticClass:"btn btn-sm",class:e.showSummons?"btn-blue":"btn-white",on:{click:function(a){return e.setShowSummons()}}},[e._v("Summons")])]),s("checkbox",{model:{value:e.showNames,callback:function(a){e.showNames=a},expression:"showNames"}},[e._v("Show names")]),s("checkbox",{model:{value:e.showStars,callback:function(a){e.showStars=a},expression:"showStars"}},[e._v("Show stars")]),s("checkbox",{model:{value:e.showAwakening,callback:function(a){e.showAwakening=a},expression:"showAwakening"}},[e._v("Show awakening")]),s("checkbox",{model:{value:e.showRings,callback:function(a){e.showRings=a},expression:"showRings"}},[e._v("Show rings")])],2),s("div",{staticClass:"flex flex-col items-start mb-8"},[s("a",{staticClass:"btn-blue rounded-t font-bold hover:text-primary cursor-pointer p-2",class:e.showStats?"":"rounded-b",attrs:{title:"Click to toggle..."},on:{click:function(a){e.showStats=!e.showStats}}},[e._v(" Collection statistics "+e._s(e.filtersActive?"(filters active)":"")+" "),e.showStats?s("fa-icon",{staticClass:"ml-2",attrs:{icon:["fas","angle-down"]}}):s("fa-icon",{staticClass:"ml-2",attrs:{icon:["fas","angle-right"]}})],1),e.showStats?s("div",{staticClass:"flex flex-row flex-wrap p-2 bg-secondary"},[s("div",{staticClass:"flex flex-col mx-4"},[s("span",{staticClass:"mb-2"},[e._v("Characters "),s("span",{staticClass:"tag text-inverse bg-inverse"},[e._v(e._s(e.chara_count.sum)+"/"+e._s(e.chara_total.sum))])]),s("ul",{staticClass:"list-disc ml-4"},[s("li",{staticClass:"mb-2"},[e._v("Gacha "),s("ul",[s("li",[s("label",[s("input",{directives:[{name:"model",rawName:"v-model",value:e.chara_show[1e3],expression:"chara_show[1000]"}],attrs:{type:"checkbox"},domProps:{checked:Array.isArray(e.chara_show[1e3])?e._i(e.chara_show[1e3],null)>-1:e.chara_show[1e3]},on:{change:function(a){var t=e.chara_show[1e3],r=a.target,l=!!r.checked;if(Array.isArray(t)){var c=null,o=e._i(t,c);r.checked?o<0&&e.$set(e.chara_show,1e3,t.concat([c])):o>-1&&e.$set(e.chara_show,1e3,t.slice(0,o).concat(t.slice(o+1)))}else e.$set(e.chara_show,1e3,l)}}}),e._v(" Premium Draw")]),s("span",{staticClass:"tag bg-primary"},[e._v(e._s(e.chara_count[1e3])+"/"+e._s(e.chara_total[1e3]))])]),s("li",[s("label",[s("input",{directives:[{name:"model",rawName:"v-model",value:e.chara_show[500],expression:"chara_show[500]"}],attrs:{type:"checkbox"},domProps:{checked:Array.isArray(e.chara_show[500])?e._i(e.chara_show[500],null)>-1:e.chara_show[500]},on:{change:function(a){var t=e.chara_show[500],r=a.target,l=!!r.checked;if(Array.isArray(t)){var c=null,o=e._i(t,c);r.checked?o<0&&e.$set(e.chara_show,500,t.concat([c])):o>-1&&e.$set(e.chara_show,500,t.slice(0,o).concat(t.slice(o+1)))}else e.$set(e.chara_show,500,l)}}}),e._v(" Classic Draw")]),s("span",{staticClass:"tag bg-primary"},[e._v(e._s(e.chara_count[500])+"/"+e._s(e.chara_total[500]))])]),s("li",[s("label",[s("input",{directives:[{name:"model",rawName:"v-model",value:e.chara_show[600],expression:"chara_show[600]"}],attrs:{type:"checkbox"},domProps:{checked:Array.isArray(e.chara_show[600])?e._i(e.chara_show[600],null)>-1:e.chara_show[600]},on:{change:function(a){var t=e.chara_show[600],r=a.target,l=!!r.checked;if(Array.isArray(t)){var c=null,o=e._i(t,c);r.checked?o<0&&e.$set(e.chara_show,600,t.concat([c])):o>-1&&e.$set(e.chara_show,600,t.slice(0,o).concat(t.slice(o+1)))}else e.$set(e.chara_show,600,l)}}}),e._v(" Classic Draw II")]),s("span",{staticClass:"tag bg-primary"},[e._v(e._s(e.chara_count[600])+"/"+e._s(e.chara_total[600]))])]),s("li",[s("label",[s("input",{directives:[{name:"model",rawName:"v-model",value:e.chara_show[1010],expression:"chara_show[1010]"}],attrs:{type:"checkbox"},domProps:{checked:Array.isArray(e.chara_show[1010])?e._i(e.chara_show[1010],null)>-1:e.chara_show[1010]},on:{change:function(a){var t=e.chara_show[1010],r=a.target,l=!!r.checked;if(Array.isArray(t)){var c=null,o=e._i(t,c);r.checked?o<0&&e.$set(e.chara_show,1010,t.concat([c])):o>-1&&e.$set(e.chara_show,1010,t.slice(0,o).concat(t.slice(o+1)))}else e.$set(e.chara_show,1010,l)}}}),e._v(" Valentine")]),s("span",{staticClass:"tag bg-primary"},[e._v(e._s(e.chara_count[1010])+"/"+e._s(e.chara_total[1010]))])]),s("li",[s("label",[s("input",{directives:[{name:"model",rawName:"v-model",value:e.chara_show[1020],expression:"chara_show[1020]"}],attrs:{type:"checkbox"},domProps:{checked:Array.isArray(e.chara_show[1020])?e._i(e.chara_show[1020],null)>-1:e.chara_show[1020]},on:{change:function(a){var t=e.chara_show[1020],r=a.target,l=!!r.checked;if(Array.isArray(t)){var c=null,o=e._i(t,c);r.checked?o<0&&e.$set(e.chara_show,1020,t.concat([c])):o>-1&&e.$set(e.chara_show,1020,t.slice(0,o).concat(t.slice(o+1)))}else e.$set(e.chara_show,1020,l)}}}),e._v(" Holiday")]),s("span",{staticClass:"tag bg-primary"},[e._v(e._s(e.chara_count[1020])+"/"+e._s(e.chara_total[1020]))])]),s("li",[s("label",[s("input",{directives:[{name:"model",rawName:"v-model",value:e.chara_show[1030],expression:"chara_show[1030]"}],attrs:{type:"checkbox"},domProps:{checked:Array.isArray(e.chara_show[1030])?e._i(e.chara_show[1030],null)>-1:e.chara_show[1030]},on:{change:function(a){var t=e.chara_show[1030],r=a.target,l=!!r.checked;if(Array.isArray(t)){var c=null,o=e._i(t,c);r.checked?o<0&&e.$set(e.chara_show,1030,t.concat([c])):o>-1&&e.$set(e.chara_show,1030,t.slice(0,o).concat(t.slice(o+1)))}else e.$set(e.chara_show,1030,l)}}}),e._v(" Summer")]),s("span",{staticClass:"tag bg-primary"},[e._v(e._s(e.chara_count[1030])+"/"+e._s(e.chara_total[1030]))])]),s("li",[s("label",[s("input",{directives:[{name:"model",rawName:"v-model",value:e.chara_show[1040],expression:"chara_show[1040]"}],attrs:{type:"checkbox"},domProps:{checked:Array.isArray(e.chara_show[1040])?e._i(e.chara_show[1040],null)>-1:e.chara_show[1040]},on:{change:function(a){var t=e.chara_show[1040],r=a.target,l=!!r.checked;if(Array.isArray(t)){var c=null,o=e._i(t,c);r.checked?o<0&&e.$set(e.chara_show,1040,t.concat([c])):o>-1&&e.$set(e.chara_show,1040,t.slice(0,o).concat(t.slice(o+1)))}else e.$set(e.chara_show,1040,l)}}}),e._v(" Halloween")]),s("span",{staticClass:"tag bg-primary"},[e._v(e._s(e.chara_count[1040])+"/"+e._s(e.chara_total[1040]))])]),s("li",[s("label",[s("input",{directives:[{name:"model",rawName:"v-model",value:e.chara_show[1050],expression:"chara_show[1050]"}],attrs:{type:"checkbox"},domProps:{checked:Array.isArray(e.chara_show[1050])?e._i(e.chara_show[1050],null)>-1:e.chara_show[1050]},on:{change:function(a){var t=e.chara_show[1050],r=a.target,l=!!r.checked;if(Array.isArray(t)){var c=null,o=e._i(t,c);r.checked?o<0&&e.$set(e.chara_show,1050,t.concat([c])):o>-1&&e.$set(e.chara_show,1050,t.slice(0,o).concat(t.slice(o+1)))}else e.$set(e.chara_show,1050,l)}}}),e._v(" Zodiac")]),s("span",{staticClass:"tag bg-primary"},[e._v(e._s(e.chara_count[1050])+"/"+e._s(e.chara_total[1050]))])]),s("li",[s("label",[s("input",{directives:[{name:"model",rawName:"v-model",value:e.chara_show[1500],expression:"chara_show[1500]"}],attrs:{type:"checkbox"},domProps:{checked:Array.isArray(e.chara_show[1500])?e._i(e.chara_show[1500],null)>-1:e.chara_show[1500]},on:{change:function(a){var t=e.chara_show[1500],r=a.target,l=!!r.checked;if(Array.isArray(t)){var c=null,o=e._i(t,c);r.checked?o<0&&e.$set(e.chara_show,1500,t.concat([c])):o>-1&&e.$set(e.chara_show,1500,t.slice(0,o).concat(t.slice(o+1)))}else e.$set(e.chara_show,1500,l)}}}),e._v(" Flash Gala")]),s("span",{staticClass:"tag bg-primary"},[e._v(e._s(e.chara_count[1500])+"/"+e._s(e.chara_total[1500]))])]),s("li",[s("label",[s("input",{directives:[{name:"model",rawName:"v-model",value:e.chara_show[1600],expression:"chara_show[1600]"}],attrs:{type:"checkbox"},domProps:{checked:Array.isArray(e.chara_show[1600])?e._i(e.chara_show[1600],null)>-1:e.chara_show[1600]},on:{change:function(a){var t=e.chara_show[1600],r=a.target,l=!!r.checked;if(Array.isArray(t)){var c=null,o=e._i(t,c);r.checked?o<0&&e.$set(e.chara_show,1600,t.concat([c])):o>-1&&e.$set(e.chara_show,1600,t.slice(0,o).concat(t.slice(o+1)))}else e.$set(e.chara_show,1600,l)}}}),e._v(" Premium Gala")]),s("span",{staticClass:"tag bg-primary"},[e._v(e._s(e.chara_count[1600])+"/"+e._s(e.chara_total[1600]))])])])]),s("li",{staticClass:"mb-2"},[e._v("Non-gacha "),s("ul",[s("li",[s("label",[s("input",{directives:[{name:"model",rawName:"v-model",value:e.chara_show[10],expression:"chara_show[10]"}],attrs:{type:"checkbox"},domProps:{checked:Array.isArray(e.chara_show[10])?e._i(e.chara_show[10],null)>-1:e.chara_show[10]},on:{change:function(a){var t=e.chara_show[10],r=a.target,l=!!r.checked;if(Array.isArray(t)){var c=null,o=e._i(t,c);r.checked?o<0&&e.$set(e.chara_show,10,t.concat([c])):o>-1&&e.$set(e.chara_show,10,t.slice(0,o).concat(t.slice(o+1)))}else e.$set(e.chara_show,10,l)}}}),e._v(" Eternals")]),s("span",{staticClass:"tag bg-primary"},[e._v(e._s(e.chara_count[10])+"/"+e._s(e.chara_total[10]))])]),s("li",[s("label",[s("input",{directives:[{name:"model",rawName:"v-model",value:e.chara_show[20],expression:"chara_show[20]"}],attrs:{type:"checkbox"},domProps:{checked:Array.isArray(e.chara_show[20])?e._i(e.chara_show[20],null)>-1:e.chara_show[20]},on:{change:function(a){var t=e.chara_show[20],r=a.target,l=!!r.checked;if(Array.isArray(t)){var c=null,o=e._i(t,c);r.checked?o<0&&e.$set(e.chara_show,20,t.concat([c])):o>-1&&e.$set(e.chara_show,20,t.slice(0,o).concat(t.slice(o+1)))}else e.$set(e.chara_show,20,l)}}}),e._v(" Evokers")]),s("span",{staticClass:"tag bg-primary"},[e._v(e._s(e.chara_count[20])+"/"+e._s(e.chara_total[20]))])]),s("li",[s("label",[s("input",{directives:[{name:"model",rawName:"v-model",value:e.chara_show[null],expression:"chara_show[null]"}],attrs:{type:"checkbox"},domProps:{checked:Array.isArray(e.chara_show[null])?e._i(e.chara_show[null],null)>-1:e.chara_show[null]},on:{change:function(a){var t=e.chara_show[null],r=a.target,l=!!r.checked;if(Array.isArray(t)){var c=null,o=e._i(t,c);r.checked?o<0&&e.$set(e.chara_show,null,t.concat([c])):o>-1&&e.$set(e.chara_show,null,t.slice(0,o).concat(t.slice(o+1)))}else e.$set(e.chara_show,null,l)}}}),e._v(" Others")]),s("span",{staticClass:"tag bg-primary"},[e._v(e._s(e.chara_count[null])+"/"+e._s(e.chara_total[null]))])])])])])]),s("div",{staticClass:"flex flex-col mx-4"},[s("span",{staticClass:"mb-2"},[e._v("Summons "),s("span",{staticClass:"tag text-inverse bg-inverse"},[e._v(e._s(e.summon_count.sum)+"/"+e._s(e.summon_total.sum))])]),s("ul",{staticClass:"list-disc ml-4"},[s("li",{staticClass:"mb-2"},[e._v("Gacha "),s("ul",[s("li",[s("label",[s("input",{directives:[{name:"model",rawName:"v-model",value:e.summon_show[1e3],expression:"summon_show[1000]"}],attrs:{type:"checkbox"},domProps:{checked:Array.isArray(e.summon_show[1e3])?e._i(e.summon_show[1e3],null)>-1:e.summon_show[1e3]},on:{change:function(a){var t=e.summon_show[1e3],r=a.target,l=!!r.checked;if(Array.isArray(t)){var c=null,o=e._i(t,c);r.checked?o<0&&e.$set(e.summon_show,1e3,t.concat([c])):o>-1&&e.$set(e.summon_show,1e3,t.slice(0,o).concat(t.slice(o+1)))}else e.$set(e.summon_show,1e3,l)}}}),e._v(" Premium Draw")]),s("span",{staticClass:"tag bg-primary"},[e._v(e._s(e.summon_count[1e3])+"/"+e._s(e.summon_total[1e3]))])]),s("li",[s("label",[s("input",{directives:[{name:"model",rawName:"v-model",value:e.summon_show[500],expression:"summon_show[500]"}],attrs:{type:"checkbox"},domProps:{checked:Array.isArray(e.summon_show[500])?e._i(e.summon_show[500],null)>-1:e.summon_show[500]},on:{change:function(a){var t=e.summon_show[500],r=a.target,l=!!r.checked;if(Array.isArray(t)){var c=null,o=e._i(t,c);r.checked?o<0&&e.$set(e.summon_show,500,t.concat([c])):o>-1&&e.$set(e.summon_show,500,t.slice(0,o).concat(t.slice(o+1)))}else e.$set(e.summon_show,500,l)}}}),e._v(" Classic Draw")]),s("span",{staticClass:"tag bg-primary"},[e._v(e._s(e.summon_count[500])+"/"+e._s(e.summon_total[500]))])]),s("li",[s("label",[s("input",{directives:[{name:"model",rawName:"v-model",value:e.summon_show[600],expression:"summon_show[600]"}],attrs:{type:"checkbox"},domProps:{checked:Array.isArray(e.summon_show[600])?e._i(e.summon_show[600],null)>-1:e.summon_show[600]},on:{change:function(a){var t=e.summon_show[600],r=a.target,l=!!r.checked;if(Array.isArray(t)){var c=null,o=e._i(t,c);r.checked?o<0&&e.$set(e.summon_show,600,t.concat([c])):o>-1&&e.$set(e.summon_show,600,t.slice(0,o).concat(t.slice(o+1)))}else e.$set(e.summon_show,600,l)}}}),e._v(" Classic Draw II")]),s("span",{staticClass:"tag bg-primary"},[e._v(e._s(e.summon_count[600])+"/"+e._s(e.summon_total[600]))])]),s("li",[s("label",[s("input",{directives:[{name:"model",rawName:"v-model",value:e.summon_show[1020],expression:"summon_show[1020]"}],attrs:{type:"checkbox"},domProps:{checked:Array.isArray(e.summon_show[1020])?e._i(e.summon_show[1020],null)>-1:e.summon_show[1020]},on:{change:function(a){var t=e.summon_show[1020],r=a.target,l=!!r.checked;if(Array.isArray(t)){var c=null,o=e._i(t,c);r.checked?o<0&&e.$set(e.summon_show,1020,t.concat([c])):o>-1&&e.$set(e.summon_show,1020,t.slice(0,o).concat(t.slice(o+1)))}else e.$set(e.summon_show,1020,l)}}}),e._v(" Holiday")]),s("span",{staticClass:"tag bg-primary"},[e._v(e._s(e.summon_count[1020])+"/"+e._s(e.summon_total[1020]))])]),s("li",[s("label",[s("input",{directives:[{name:"model",rawName:"v-model",value:e.summon_show[1030],expression:"summon_show[1030]"}],attrs:{type:"checkbox"},domProps:{checked:Array.isArray(e.summon_show[1030])?e._i(e.summon_show[1030],null)>-1:e.summon_show[1030]},on:{change:function(a){var t=e.summon_show[1030],r=a.target,l=!!r.checked;if(Array.isArray(t)){var c=null,o=e._i(t,c);r.checked?o<0&&e.$set(e.summon_show,1030,t.concat([c])):o>-1&&e.$set(e.summon_show,1030,t.slice(0,o).concat(t.slice(o+1)))}else e.$set(e.summon_show,1030,l)}}}),e._v(" Summer")]),s("span",{staticClass:"tag bg-primary"},[e._v(e._s(e.summon_count[1030])+"/"+e._s(e.summon_total[1030]))])]),s("li",[s("label",[s("input",{directives:[{name:"model",rawName:"v-model",value:e.summon_show[1600],expression:"summon_show[1600]"}],attrs:{type:"checkbox"},domProps:{checked:Array.isArray(e.summon_show[1600])?e._i(e.summon_show[1600],null)>-1:e.summon_show[1600]},on:{change:function(a){var t=e.summon_show[1600],r=a.target,l=!!r.checked;if(Array.isArray(t)){var c=null,o=e._i(t,c);r.checked?o<0&&e.$set(e.summon_show,1600,t.concat([c])):o>-1&&e.$set(e.summon_show,1600,t.slice(0,o).concat(t.slice(o+1)))}else e.$set(e.summon_show,1600,l)}}}),e._v(" Non-ticketable")]),s("span",{staticClass:"tag bg-primary"},[e._v(e._s(e.summon_count[1600])+"/"+e._s(e.summon_total[1600]))])])])]),s("li",{staticClass:"mb-2"},[e._v("Non-gacha "),s("ul",[s("li",[s("label",[s("input",{directives:[{name:"model",rawName:"v-model",value:e.summon_show[20],expression:"summon_show[20]"}],attrs:{type:"checkbox"},domProps:{checked:Array.isArray(e.summon_show[20])?e._i(e.summon_show[20],null)>-1:e.summon_show[20]},on:{change:function(a){var t=e.summon_show[20],r=a.target,l=!!r.checked;if(Array.isArray(t)){var c=null,o=e._i(t,c);r.checked?o<0&&e.$set(e.summon_show,20,t.concat([c])):o>-1&&e.$set(e.summon_show,20,t.slice(0,o).concat(t.slice(o+1)))}else e.$set(e.summon_show,20,l)}}}),e._v(" Arcarum")]),s("span",{staticClass:"tag bg-primary"},[e._v(e._s(e.summon_count[20])+"/"+e._s(e.summon_total[20]))])]),s("li",[s("label",[s("input",{directives:[{name:"model",rawName:"v-model",value:e.summon_show[null],expression:"summon_show[null]"}],attrs:{type:"checkbox"},domProps:{checked:Array.isArray(e.summon_show[null])?e._i(e.summon_show[null],null)>-1:e.summon_show[null]},on:{change:function(a){var t=e.summon_show[null],r=a.target,l=!!r.checked;if(Array.isArray(t)){var c=null,o=e._i(t,c);r.checked?o<0&&e.$set(e.summon_show,null,t.concat([c])):o>-1&&e.$set(e.summon_show,null,t.slice(0,o).concat(t.slice(o+1)))}else e.$set(e.summon_show,null,l)}}}),e._v(" Others")]),s("span",{staticClass:"tag bg-primary"},[e._v(e._s(e.summon_count[null])+"/"+e._s(e.summon_total[null]))])])])])])])]):e._e()]),e.editRings?s("div",{staticClass:"sticky top-0 bg-tertiary shadow-md z-10 mb-4 flex flex-row justify-between items-center"},[s("span"),s("h2",[s("fa-icon",{staticClass:"text-xl text-red-400",attrs:{icon:["fas","ring"]}}),e._v(" Editing Purity rings "),s("fa-icon",{staticClass:"text-xl text-red-400",attrs:{icon:["fas","ring"]}})],1),s("button",{staticClass:"btn btn-red",on:{click:function(a){e.editRings=!1}}},[e._v(" Stop editing ")])]):e._e(),e.loading===!0?s("div",[e._v(" Loading... ")]):s("div",e._l(7,function(a){return s("div",{key:a,class:e.getUnits[0][a-1].length>0||e.getUnits[1][a-1].length>0?"mb-4":""},[e.showCharacters?s("div",{staticClass:"flex flex-row flex-wrap"},e._l(e.getUnits[0][a-1],function(t){return s("span",{key:t.id,staticClass:"flex flex-col",staticStyle:{width:"105px"}},[e.showNames?s("a",{staticClass:"text-xs text-primary h-5 px-1 text-center truncate",attrs:{target:"_blank",href:"https://gbf.wiki/"+t.n,title:e.getName(t)}},[e._v(e._s(e.getName(t)))]):e._e(),s("span",{staticClass:"relative"},[s("img",{class:t.owned?"":"grayscale-80",staticStyle:{height:"60px"},attrs:{title:e.getName(t),src:"/img/unit_small/"+t.id+"000.jpg"},on:{click:function(r){return e.selectChara(t)}}}),e.showRings&&t.ring?s("img",{staticClass:"absolute bottom-0 right-0 pointer-events-none",attrs:{src:D,title:"Perpetuity Ring"}}):e._e()]),e.showStars?s("span",{staticStyle:{"min-height":"21px"},on:{click:function(r){return e.starsModified()}}},[t.owned?s("stars-line",{attrs:{base:t.sb,extra:t.sm,current:t.sc,max:5,readOnly:!e.isOwnCollection,transcendance:!0},on:{"update:current":function(r){return e.$set(t,"sc",r)}}}):e._e()],1):e._e(),e.showAwakening&&t.owned?s("span",{staticClass:"text-sm pb-2 pl-1",on:{click:function(r){return e.starsModified()}}},[s("stat-input",{class:t.aw==e.MAX_AWAKENING?"text-link-primary":"",attrs:{shortName:"Awake",longName:"Awakening",prop:t.aw,length:1,max:e.MAX_AWAKENING},on:{"update:prop":function(r){return e.$set(t,"aw",r)}}}),t.aw<e.MAX_AWAKENING?s("fa-icon",{staticClass:"ml-1 cursor-pointer",attrs:{icon:["fas","check"],title:"Maximize awakening"},on:{click:function(r){t.aw=e.MAX_AWAKENING}}}):e._e()],1):e._e()])}),0):e._e(),e.showSummons?s("div",{staticClass:"flex flex-row flex-wrap"},e._l(e.getUnits[1][a-1],function(t){return s("span",{key:t.id,staticClass:"flex flex-col",staticStyle:{width:"105px"}},[e.showNames?s("a",{staticClass:"text-xs text-primary h-5 px-1 text-center truncate",attrs:{target:"_blank",href:"https://gbf.wiki/"+t.n,title:e.getName(t)}},[e._v(e._s(e.getName(t)))]):e._e(),s("img",{class:t.owned?"":"grayscale-80",staticStyle:{height:"60px"},attrs:{title:e.getName(t),src:"/img/unit_small/"+t.id+"000.jpg"},on:{click:function(r){return e.selectSummon(t)}}}),e.showStars?s("span",{staticStyle:{"min-height":"21px"},on:{click:function(r){return e.starsModified()}}},[t.owned?s("stars-line",{attrs:{base:t.sb,extra:t.sm,current:t.sc,max:5,readOnly:!e.isOwnCollection,transcendance:!0},on:{"update:current":function(r){return e.$set(t,"sc",r)}}}):e._e()],1):e._e()])}),0):e._e()])}),0),s("input",{directives:[{name:"show",rawName:"v-show",value:e.clipboard_text.length>0,expression:"clipboard_text.length > 0"}],attrs:{id:"clipboardInput",readonly:"",type:"text"},domProps:{value:e.clipboard_text}}),s("modal-url",{on:{import:e.loadWikiCollection},model:{value:e.show_modal_url,callback:function(a){e.show_modal_url=a},expression:"show_modal_url"}})],1)},z=[],J=F(K,X,z,!1,null,null);const oe=J.exports;export{oe as default};
|