2 lines
26 KiB
JavaScript
2 lines
26 KiB
JavaScript
import{n as i,U as c,m as l,b as u,M as y,K as b}from"./index-DDNMzpZj.js";import{M as m,B as v}from"./BoxSummon-B3nklIl7.js";import{o as d,g as _}from"./mixins-CpCP8hE3.js";import{S as f}from"./StarsLine-CReD_mDq.js";import{_ as k}from"./icon_pring-bV6Un94l.js";import{S as g}from"./StatInput-BU1s-zba.js";import{R as p}from"./raids-h8ynLJMQ.js";import{D as w}from"./Dropdown-Cks-nQIq.js";import{C as x}from"./Checkbox-Dc2UYqO9.js";const $={props:{object:{type:Object,required:!0}},methods:{getSkillImage(e){return this.object.skills!==void 0&&this.object.skills[e]!==null?"/img/class_skills/"+this.object.skills[e].skillid+".png":"/img/class_skills/null.png"}},computed:{...l({party_mode:e=>e.party_builder.party_mode}),getPortraitImage(){return c.isEmpty(this.object.nameen)?this.party_mode!==this.$MODE.Edit?"/img/empty_chara_ro.jpg":"/img/empty_chara.jpg":"/img/class/"+this.object.nameen.replace(/\s/g,"_")+".jpg"}}};var j=function(){var t=this,s=t._self._c;return s("div",{staticClass:"flex flex-col",staticStyle:{"min-width":"78px","max-width":"78px"}},[s("a",{staticClass:"text-xs text-primary rounded-t h-5 px-1 text-center truncate",attrs:{target:"_blank",href:"https://gbf.wiki/"+t.object.nameen,title:t.object.nameen}},[t._v(t._s(t.object.nameen))]),s("img",{class:t.party_mode===t.$MODE.Edit?"cursor-pointer":"",staticStyle:{"min-height":"142px","max-height":"142px"},attrs:{src:t.getPortraitImage},on:{click:function(a){return t.$emit("click-portrait")}}}),s("div",{staticClass:"flex flex-row flex-wrap"},t._l(t.object.skills,function(a,r){return s("span",{key:r,staticClass:"w-1/2 tooltip-parent"},[s("img",{staticClass:"w-full",class:t.party_mode!==t.$MODE.ReadOnly?"cursor-pointer":"",attrs:{src:t.getSkillImage(r)},on:{click:function(o){return t.$emit("click-skill",r)}}}),a?s("span",{staticClass:"tooltip"},[t._v(t._s(a.nameen))]):t._e()])}),0)])},C=[],E=i($,j,C,!1,null,null);const O=E.exports,M={components:{BoxClass:O,Modal:m},data(){return{show_modal_class:!1,show_modal_skill:!1,selected_skill_index:0}},methods:{showModalClass(){switch(this.party_mode){case this.$MODE.Action:break;case this.$MODE.Edit:this.show_modal_class=!0;break;case this.$MODE.ReadOnly:break}},clickSkill(e){switch(this.party_mode){case this.$MODE.Action:this.getObject.skills[e]!==null&&this.$store.commit("addActionMCSkill",e);break;case this.$MODE.Edit:(this.getObject.skills[e]===null||!this.getObject.skills[e].fixed)&&(this.selected_skill_index=e,this.show_modal_skill=!0);break;case this.$MODE.ReadOnly:break}},changeObject(e){c.isEmpty(e)?this.$store.commit("setClasse",{}):this.axios.get("/party/classes/"+e).then(t=>this.$store.commit("setClasse",t.data)).catch(t=>this.$store.dispatch("addAxiosErrorMessage",t))},changeSkill(e){c.isEmpty(e)?this.$store.commit("setClasseSkill",{slot:this.selected_skill_index,data:null}):this.axios.get("/party/skills/"+e).then(t=>this.$store.commit("setClasseSkill",{slot:this.selected_skill_index,data:t.data})).catch(t=>this.$store.dispatch("addAxiosErrorMessage",t))}},computed:{...l({party_mode:e=>e.party_builder.party_mode}),getObject(){return this.$store.state.party_builder.classe},getCategoriesClass(){return[{name:"Name",isColumn:!0,isFilter:!1,key:"n"},{name:"Row",isColumn:!0,isFilter:!0,key:"row"}]},getCategoriesSkill(){return[{name:"Name",isColumn:!0,isFilter:!1,key:"n"}]}}};var S=function(){var t=this,s=t._self._c;return s("div",{staticClass:"flex flex-row flex-wrap"},[s("box-class",{attrs:{object:t.getObject},on:{"click-portrait":t.showModalClass,"click-skill":t.clickSkill}}),t.party_mode!==t.$MODE.ReadOnly?s("modal",{attrs:{route:"/party/classes",categories:t.getCategoriesClass},on:{"item-selected":t.changeObject},model:{value:t.show_modal_class,callback:function(a){t.show_modal_class=a},expression:"show_modal_class"}}):t._e(),t.party_mode!==t.$MODE.ReadOnly?s("modal",{attrs:{route:"/party/skills",routeParameters:"family="+t.getObject.family,categories:t.getCategoriesSkill},on:{"item-selected":t.changeSkill},model:{value:t.show_modal_skill,callback:function(a){t.show_modal_skill=a},expression:"show_modal_skill"}}):t._e()],1)},R=[],D=i(M,S,R,!1,null,null);const Jt=D.exports,L={components:{StarsLine:f},mixins:[d],props:{object:{type:Object,required:!0},showRing:{type:Boolean,default:!1}},computed:{...l({party_mode:e=>e.party_builder.party_mode}),getPRingClasses(){let e=this.object.haspring?"":"grayscale-80 opacity-70";return this.party_mode!==this.$MODE.ReadOnly&&(e+=" cursor-pointer"),e},getImage(){return this.objectIsEmpty?this.party_mode!==this.$MODE.Edit?"/img/empty_chara_ro.jpg":"/img/empty_chara.jpg":"/img/unit/"+this.object.characterid+"000.jpg"}}};var I=function(){var t=this,s=t._self._c;return s("span",{staticClass:"relative"},[s("img",{staticClass:"w-full",class:t.party_mode===t.$MODE.Edit?"cursor-pointer":"",staticStyle:{"min-height":"142px","max-height":"142px"},attrs:{draggable:!t.objectIsEmpty,src:t.getImage},on:{click:function(a){return t.$emit("click-portrait")},dragstart:function(a){return t.$emit("drag-portrait",a)},dragover:function(a){a.preventDefault()},drop:function(a){return a.preventDefault(),t.$emit("drop-portrait",a)}}}),t.objectIsEmpty?t._e():s("stars-line",{staticClass:"absolute top-0 bg-black/50",attrs:{base:t.object.starsbase,extra:t.object.starsmax,current:t.object.stars,max:5,transcendance:!0,readOnly:t.party_mode===t.$MODE.ReadOnly},on:{"update:current":function(a){return t.$emit("stars-changed",t.object,a)}}}),!t.objectIsEmpty&&t.showRing?s("img",{staticClass:"absolute bottom-0 right-0",class:t.getPRingClasses,attrs:{src:k,title:"Perpetuity Ring"},on:{click:function(a){return t.$emit("click-pring")}}}):t._e()],1)},P=[],A=i(L,I,P,!1,null,null);const N=A.exports,F={mixins:[d],props:{object:Object},methods:{getSkillImage(e){return"/img/chara_skills/"+this.object.characterid+"_"+e+".png"}},computed:{...l({party_mode:e=>e.party_builder.party_mode}),getSkills(){return this.object.skills.flatMap(e=>this.object.level>=e.obtain?[e]:[])}}};var B=function(){var t=this,s=t._self._c;return t.objectIsEmpty?t._e():s("div",{staticClass:"flex flex-row flex-wrap",staticStyle:{"min-height":"78px","max-height":"78px"}},t._l(t.getSkills,function(a){return s("span",{key:a.index,staticClass:"w-1/2 tooltip-parent"},[s("img",{staticClass:"w-full",class:t.party_mode===t.$MODE.Action?"cursor-pointer":"",attrs:{src:t.getSkillImage(a.index)},on:{click:function(r){return t.$emit("click-skill",a.index)}}}),s("span",{staticClass:"tooltip"},[t._v(t._s(a.name))])])}),0)},T=[],W=i(F,B,T,!1,null,null);const K=W.exports,q={components:{Portrait:N,Skills:K,StatInput:g},mixins:[d,_],props:{object:{type:Object,required:!0},showLevel:{type:Boolean,required:!0},showRing:{type:Boolean,default:!1}},methods:{drop(e){const t=e.dataTransfer.getData("character");t.length>0&&this.$emit("swap",JSON.parse(t))},clickPRing(){this.party_mode!==this.$MODE.ReadOnly&&(this.object.haspring=!this.object.haspring)},starsChanged(e,t){this.$set(e,"stars",t),(!this.showLevel||e.level>this.getLevel)&&this.$set(e,"level",this.getLevel)}},computed:{...l({party_mode:e=>e.party_builder.party_mode}),getLevel(){return u.getCharacterLevel(this.object)}}};var G=function(){var t=this,s=t._self._c;return s("div",{staticClass:"flex flex-col",staticStyle:{"min-width":"78px","max-width":"78px"}},[t.objectIsEmpty?s("span",{staticClass:"text-xs h-5"}):s("a",{staticClass:"text-xs text-primary h-5 px-1 text-center truncate",attrs:{target:"_blank",href:"https://gbf.wiki/"+t.object.nameen,title:t.getName}},[t._v(t._s(t.getName))]),s("portrait",{attrs:{object:t.object,showRing:t.showRing},on:{"drag-portrait":function(a){return t.$emit("drag-portrait",a)},"drop-portrait":t.drop,"click-portrait":function(a){return t.$emit("click-portrait")},"click-pring":t.clickPRing,"stars-changed":t.starsChanged}}),!t.objectIsEmpty&&t.showLevel?s("div",{staticClass:"flex flex-row flex-nowrap justify-around text-xs"},[s("stat-input",{attrs:{shortName:"lvl",longName:"Character level",prop:t.object.level,length:3},on:{"update:prop":function(a){return t.$set(t.object,"level",a)}}}),s("stat-input",{attrs:{shortName:"+",longName:"Plus bonuses",prop:t.object.pluses,length:3},on:{"update:prop":function(a){return t.$set(t.object,"pluses",a)}}})],1):t._e(),s("skills",{attrs:{object:t.object},on:{"click-skill":function(a){return t.$emit("click-skill",a)}}})],1)},U=[],Z=i(q,G,U,!1,null,null);const H=Z.exports,J=[{name:"Name",isColumn:!0,isFilter:!1,key:"n"},{name:"Rarity",isColumn:!1,isFilter:!0,key:"ri"},{name:"Element",isColumn:!0,isFilter:!0,key:"e"},{name:"Type",isColumn:!0,isFilter:!0,key:"t"},{name:"Race",isColumn:!0,isFilter:!0,key:"ra"},{name:"Weapon",isColumn:!0,isFilter:!0,key:"w"}],V={components:{BoxCharacter:H,Modal:m},props:{showLevel:{type:Boolean,default:!1},showRing:{type:Boolean,default:!1}},data(){return{show_modal:!1,selected_box_index:0}},methods:{drag(e,t){e.dataTransfer.setData("character",JSON.stringify(t))},showModal(e){switch(this.party_mode){case this.$MODE.Action:break;case this.$MODE.Edit:this.selected_box_index=e,this.show_modal=!0;break;case this.$MODE.ReadOnly:break}},changeObject(e){const t=this.selected_box_index;c.isEmpty(e)?this.$store.commit("setCharacter",{index:t,data:{}}):this.axios.get("/party/characters/"+e).then(s=>this.$store.commit("setCharacter",{index:t,data:s.data})).catch(s=>this.$store.dispatch("addAxiosErrorMessage",s))},clickSkill(e,t){switch(this.party_mode){case this.$MODE.Action:this.objects[e].skills[t]!==void 0&&this.$store.commit("addActionCharacterSkill",{slot:e,index:t});break;case this.$MODE.Edit:break;case this.$MODE.ReadOnly:break}},swap(e,t){if(this.party_mode===this.$MODE.ReadOnly)return;let s=this.objects[e];this.$store.commit("setCharacter",{index:e,data:this.objects[t]}),this.$store.commit("setCharacter",{index:t,data:s})}},computed:{...l({objects:e=>e.party_builder.characters,party_mode:e=>e.party_builder.party_mode}),getCategories(){return J}}};var z=function(){var t=this,s=t._self._c;return s("div",{staticClass:"flex flex-row flex-wrap group-characters"},[t._l(t.objects,function(a,r){return s("box-character",{key:r,attrs:{object:a,showLevel:t.showLevel,showRing:t.showRing},on:{"click-portrait":function(o){return t.showModal(r)},"click-skill":function(o){return t.clickSkill(r,o)},"drag-portrait":function(o){return t.drag(o,r)},swap:function(o){return t.swap(o,r)}}})}),t.party_mode!==t.$MODE.ReadOnly?s("modal",{attrs:{route:"/party/characters",categories:t.getCategories},on:{"item-selected":t.changeObject},model:{value:t.show_modal,callback:function(a){t.show_modal=a},expression:"show_modal"}}):t._e()],2)},Y=[],Q=i(V,z,Y,!1,null,"d996016a");const Vt=Q.exports,X=[{name:"Name",isColumn:!0,isFilter:!1,key:"n"},{name:"Rarity",isColumn:!0,isFilter:!0,key:"ri"},{name:"Element",isColumn:!0,isFilter:!0,key:"e"}],tt={components:{BoxSummon:v,Modal:m},props:{showLevel:{type:Boolean,default:!1}},data(){return{show_modal:!1,selected_box_index:0}},methods:{drag(e,t){e.dataTransfer.setData("summon",JSON.stringify(t))},showModal(e){switch(this.party_mode){case this.$MODE.Action:this.$store.commit("addActionSummon",e);break;case this.$MODE.Edit:this.selected_box_index=e,this.show_modal=!0;break;case this.$MODE.ReadOnly:break}},changeObject(e){const t=this.selected_box_index;c.isEmpty(e)?this.$store.commit("setSummon",{index:t,data:{}}):this.axios.get("/party/summons/"+e).then(s=>this.$store.commit("setSummon",{index:t,data:s.data})).catch(s=>this.$store.dispatch("addAxiosErrorMessage",s))},swap(e,t){if(this.party_mode===this.$MODE.ReadOnly)return;let s=this.objects[e];this.$store.commit("setSummon",{index:e,data:this.objects[t]}),this.$store.commit("setSummon",{index:t,data:s})}},computed:{...l({objects:e=>e.party_builder.summons,party_mode:e=>e.party_builder.party_mode}),getStats(){return this.$store.getters.getSummonsStats},getCategories(){return X},getIndexes(){return[[1,2],[3,4]]}}};var et=function(){var t=this,s=t._self._c;return s("div",{staticClass:"flex flex-row flex-wrap gap-x-2"},[s("span",{staticClass:"flex flex-col"},[s("span",{staticClass:"bg-secondary rounded-lg text-center mb-1"},[t._v("Main")]),s("box-summon",{attrs:{object:t.objects[0],showLevel:t.showLevel},on:{"click-portrait":function(a){return t.showModal(0)},"drag-portrait":function(a){return t.drag(a,0)},swap:function(a){return t.swap(a,0)}}})],1),s("span",{staticClass:"flex flex-col flex-wrap"},[s("div",{staticClass:"flex flex-row justify-around mb-1"},[s("span",[t._v("Atk "+t._s(t.getStats.atk))]),s("span",[t._v("HP "+t._s(t.getStats.hp))])]),t._l(t.getIndexes,function(a,r){return s("div",{key:r,staticClass:"flex flex-row flex-wrap"},t._l(a,function(o){return s("span",{key:o,class:r===1?"mt-1":""},[s("box-summon",{attrs:{object:t.objects[o],showLevel:t.showLevel},on:{"click-portrait":function(n){return t.showModal(o)},"drag-portrait":function(n){return t.drag(n,o)},swap:function(n){return t.swap(n,o)}}})],1)}),0)})],2),s("span",{staticClass:"flex flex-col"},[s("span",{staticClass:"bg-secondary rounded-lg text-center mb-1"},[t._v("Friend")]),s("box-summon",{attrs:{object:t.objects[5],showLevel:t.showLevel},on:{"click-portrait":function(a){return t.showModal(5)},"drag-portrait":function(a){return t.drag(a,5)},swap:function(a){return t.swap(a,5)}}})],1),s("span",{staticClass:"flex flex-col bg-secondary rounded-lg gap-y-1"},[s("span",{staticClass:"rounded-lg text-center"},[t._v("Sub Aura")]),s("box-summon",{attrs:{object:t.objects[6],showLevel:t.showLevel},on:{"click-portrait":function(a){return t.showModal(6)},"drag-portrait":function(a){return t.drag(a,6)},swap:function(a){return t.swap(a,6)}}}),s("box-summon",{attrs:{object:t.objects[7],showLevel:t.showLevel},on:{"click-portrait":function(a){return t.showModal(7)},"drag-portrait":function(a){return t.drag(a,7)},swap:function(a){return t.swap(a,7)}}})],1),t.party_mode!==t.$MODE.ReadOnly?s("modal",{attrs:{route:"/party/summons",categories:t.getCategories},on:{"item-selected":t.changeObject},model:{value:t.show_modal,callback:function(a){t.show_modal=a},expression:"show_modal"}}):t._e()],1)},st=[],at=i(tt,et,st,!1,null,null);const zt=at.exports,rt={components:{StarsLine:f},mixins:[d],props:{object:{type:Object,required:!0},isArcarum:{type:Boolean,default:!1}},computed:{...l({party_mode:e=>e.party_builder.party_mode}),getImage(){return this.objectIsEmpty?this.party_mode!==this.$MODE.Edit?"/img/empty_weapon_ro.jpg":this.isArcarum?"/img/empty_weapon_arcarum.jpg":"/img/empty_weapon.jpg":"/img/weapon/"+this.object.weaponid+"00.jpg"}}};var ot=function(){var t=this,s=t._self._c;return s("span",{staticClass:"relative"},[s("img",{staticClass:"w-full",class:t.party_mode===t.$MODE.Edit?"cursor-pointer":"",staticStyle:{"max-height":"60px"},attrs:{draggable:!t.objectIsEmpty,src:t.getImage},on:{click:function(a){return t.$emit("click-portrait")},dragstart:function(a){return t.$emit("drag-portrait",a)},dragover:function(a){a.preventDefault()},drop:function(a){return a.preventDefault(),t.$emit("drop-portrait",a)}}}),t.objectIsEmpty?t._e():s("stars-line",{staticClass:"absolute bottom-0 right-0 w-3/4 bg-black/50",attrs:{base:t.object.starsbase,extra:t.object.starsmax,current:t.object.stars,max:5,readOnly:t.party_mode===t.$MODE.ReadOnly},on:{"update:current":function(a){return t.$emit("stars-changed",t.object,a)}}})],1)},it=[],nt=i(rt,ot,it,!1,null,null);const lt=nt.exports,ct={model:{prop:"show",event:"close"},components:{Modal:y},props:{show:{type:Boolean,required:!0},keyId:{type:Number,required:!0}},methods:{selectItem(e){this.$emit("key-selected",e),this.close()},close(){this.$emit("close",!1)}},computed:{getData(){return b.data[this.keyId]}}};var dt=function(){var t=this,s=t._self._c;return s("modal",{attrs:{show:t.show},on:{close:function(a){return t.close()}},scopedSlots:t._u([{key:"header",fn:function(){return[s("h1",[t._v("Select a skill key")])]},proxy:!0}])},[s("table",{staticClass:"table"},[s("thead",[s("tr",[s("th",[t._v("Name")]),s("th",[t._v("Key")])])]),s("tbody",[s("tr",{on:{click:function(a){return t.selectItem(null)}}},[s("td",[t._v("-")]),s("td",[t._v("Remove current key")])]),t._l(t.getData,function(a,r){return s("tr",{key:r,on:{click:function(o){return t.selectItem(a)}}},[s("td",[t._v(t._s(a.name))]),s("td",[t._v(t._s(a.desc))])])})],2)])])},mt=[],ut=i(ct,dt,mt,!1,null,null);const pt=ut.exports,ht={components:{ModalKeys:pt},mixins:[d],props:{object:Object,skills:Array},data(){return{show_modal_keys:!1,modal_skill_index:0,modal_key_id:0}},methods:{showKeyModal(e,t){t!==null&&this.party_mode!==this.$MODE.ReadOnly&&(this.modal_skill_index=e,this.modal_key_id=t,this.show_modal_keys=!0)},selectKey(e){this.$set(this.object.keys,this.modal_skill_index,e)}},computed:{...l({party_mode:e=>e.party_builder.party_mode})}};var _t=function(){var t=this,s=t._self._c;return t.objectIsEmpty?t._e():s("div",{staticClass:"flex flex-row flex-nowrap justify-around"},[t._l(t.skills,function(a,r){return s("span",{key:r,staticClass:"tooltip-parent"},[s("img",{class:a.keyid!==null&&t.party_mode!==t.$MODE.ReadOnly?"cursor-pointer":"",staticStyle:{width:"30px",height:"30px"},attrs:{src:"/img/weapon_skills/"+a.icon},on:{click:function(o){return t.showKeyModal(r,a.keyid)}}}),s("span",{staticClass:"tooltip"},[t._v(" "+t._s(a.name)+" "),a.boost?s("span",[t._v("("+t._s(a.boost)+")")]):t._e(),s("br"),a.data!==null?s("p",t._l(a.data,function(o,n){return s("span",{key:n,staticClass:"font-mono text-xs"},[s("span",{staticClass:"capitalize"},[t._v(t._s(o.aura_type))]),t._v(" "+t._s(o.stat)+" "+t._s((o.value*100).toFixed(2))+"%"),s("br")])}),0):t._e()])])}),t.party_mode!==t.$MODE.ReadOnly?s("modal-keys",{attrs:{keyId:t.modal_key_id},on:{"key-selected":t.selectKey},model:{value:t.show_modal_keys,callback:function(a){t.show_modal_keys=a},expression:"show_modal_keys"}}):t._e()],2)},ft=[],gt=i(ht,_t,ft,!1,null,null);const yt=gt.exports,bt={components:{Portrait:lt,Skills:yt,StatInput:g},mixins:[d,_],props:{object:{type:Object,required:!0},skills:{type:Array,required:!0},showLevel:{type:Boolean,default:!1},isArcarum:{type:Boolean,default:!1}},methods:{drop(e){const t=e.dataTransfer.getData("weapon");t.length>0&&this.$emit("swap",JSON.parse(t))},starsChanged(e,t){this.$set(e,"stars",t),(!this.showLevel||e.level>this.getLevel)&&this.$set(e,"level",this.getLevel),(!this.showLevel||e.sklevel>this.getSkillLevel)&&this.$set(e,"sklevel",this.getSkillLevel)},getWeaponSkillValue(e,t,s){let a=t[1];if(s==="stamina")return this.getPercentHP<25?0:e<=15?(Math.pow(this.getPercentHP/(a-e),2.9)+2.1)/100:(Math.pow(this.getPercentHP/(a-(15+.4*(e-15))),2.9)+2.1)/100;if(e===20&&t.hasOwnProperty(20)?a=t[20]:(e>1&&t.hasOwnProperty(10)&&(a+=(t[10]-t[1])/9*Math.min(e-1,9)),e>10&&t.hasOwnProperty(15)&&(a+=(t[15]-t[10])/5*Math.min(e-10,5)),e>15&&t.hasOwnProperty(20)&&(a+=(t[20]-t[15])/5*Math.min(e-15,5))),s==="enmity"){const r=1-this.getPercentHP/100;return a/100*((1+2*r)*r)}return a/100}},computed:{getPercentHP(){return this.$store.state.party_builder.percent_HP},getLevel(){return u.getWeaponLevel(this.object)},getSkillLevel(){return u.getWeaponSkillLevel(this.object)},getSkills(){if(this.object.skills===void 0)return[];let e=this.object.skills.flatMap((t,s)=>{let a=[];for(let r of t){if(r.level>this.object.level)break;if(this.object.keys[s]!==null){a=this.object.keys[s];break}else a=r}return a});e.forEach(t=>{if(t.data)for(let s of t.data)this.$set(s,"value",this.getWeaponSkillValue(this.object.sklevel,s.percent,s.stat))});for(let t=0;t<e.length;t++)this.$set(this.skills,t,e[t]);return e}}};var vt=function(){var t=this,s=t._self._c;return s("div",{staticClass:"flex flex-col",staticStyle:{"max-width":"105px"}},[t.objectIsEmpty?s("span",{staticClass:"text-xs h-5"}):s("a",{staticClass:"text-xs text-primary h-5 px-1 text-center truncate",attrs:{target:"_blank",href:"https://gbf.wiki/"+t.object.nameen,title:t.getName}},[t._v(t._s(t.getName))]),s("portrait",{attrs:{object:t.object,isArcarum:t.isArcarum},on:{"click-portrait":function(a){return t.$emit("click-portrait")},"drag-portrait":function(a){return t.$emit("drag-portrait",a)},"drop-portrait":t.drop,"stars-changed":t.starsChanged}}),!t.objectIsEmpty&&t.showLevel?s("div",{staticClass:"flex flex-row flex-nowrap justify-around text-xs"},[s("stat-input",{attrs:{shortName:"lvl",longName:"Weapon level",prop:t.object.level,length:3},on:{"update:prop":function(a){return t.$set(t.object,"level",a)}}}),s("stat-input",{attrs:{shortName:"sl",longName:"Skill level",prop:t.object.sklevel,length:2},on:{"update:prop":function(a){return t.$set(t.object,"sklevel",a)}}}),s("stat-input",{attrs:{shortName:"+",longName:"Plus bonuses",prop:t.object.pluses,length:3},on:{"update:prop":function(a){return t.$set(t.object,"pluses",a)}}})],1):t._e(),s("skills",{attrs:{object:t.object,skills:t.getSkills}})],1)},kt=[],wt=i(bt,vt,kt,!1,null,null);const xt=wt.exports,$t=[{name:"Name",isColumn:!0,isFilter:!1,key:"n"},{name:"Rarity",isColumn:!1,isFilter:!1,key:"ri"},{name:"Element",isColumn:!0,isFilter:!0,key:"e"},{name:"Weapon",isColumn:!0,isFilter:!0,key:"w"}],jt=[[1,2,3],[4,5,6],[7,8,9]],Ct={components:{BoxWeapon:xt,Modal:m},props:{showLevel:{type:Boolean,default:!1},showArcarum:{type:Boolean,default:!1}},data(){return{show_modal:!1,selected_box_index:0}},methods:{drag(e,t){e.dataTransfer.setData("weapon",JSON.stringify(t))},showModal(e){switch(this.party_mode){case this.$MODE.Action:break;case this.$MODE.Edit:this.selected_box_index=e,this.show_modal=!0;break;case this.$MODE.ReadOnly:break}},changeObject(e){const t=this.selected_box_index;c.isEmpty(e)?this.$store.commit("setWeapon",{index:t,data:{}}):this.axios.get("/party/weapons/"+e).then(s=>this.$store.commit("setWeapon",{index:t,data:s.data})).catch(s=>this.$store.dispatch("addAxiosErrorMessage",s))},swap(e,t){if(this.party_mode===this.$MODE.ReadOnly)return;let s=this.objects[e];this.$store.commit("setWeapon",{index:e,data:this.objects[t]}),this.$store.commit("setWeapon",{index:t,data:s})}},computed:{...l({objects:e=>e.party_builder.weapons,skills:e=>e.party_builder.weapons_skills,party_mode:e=>e.party_builder.party_mode}),getCategories(){return $t},getIndexes(){return jt}}};var Et=function(){var t=this,s=t._self._c;return s("div",{staticClass:"flex flex-row flex-wrap"},[s("box-weapon",{attrs:{object:t.objects[0],skills:t.skills[0],showLevel:t.showLevel},on:{"click-portrait":function(a){return t.showModal(0)},"drag-portrait":function(a){return t.drag(a,0)},swap:function(a){return t.swap(a,0)}}}),s("div",{staticClass:"flex flex-col flex-wrap gap-y-1"},[t._l(t.getIndexes,function(a,r){return s("div",{key:r,staticClass:"flex flex-row px-2"},t._l(a,function(o){return s("span",{key:o},[s("box-weapon",{attrs:{object:t.objects[o],skills:t.skills[o],showLevel:t.showLevel},on:{"click-portrait":function(n){return t.showModal(o)},"drag-portrait":function(n){return t.drag(n,o)},swap:function(n){return t.swap(n,o)}}})],1)}),0)}),t.showArcarum?s("div",{staticClass:"flex flex-row shrink bg-secondary rounded px-2 pb-1"},t._l([10,11,12],function(a){return s("span",{key:a},[s("box-weapon",{attrs:{object:t.objects[a],skills:t.skills[a],showLevel:t.showLevel,isArcarum:!0},on:{"click-portrait":function(r){return t.showModal(a)},"drag-portrait":function(r){return t.drag(r,a)},swap:function(r){return t.swap(r,a)}}})],1)}),0):t._e()],2),t.party_mode!==t.$MODE.ReadOnly?s("modal",{attrs:{route:"/party/weapons",categories:t.getCategories},on:{"item-selected":t.changeObject},model:{value:t.show_modal,callback:function(a){t.show_modal=a},expression:"show_modal"}}):t._e()],1)},Ot=[],Mt=i(Ct,Et,Ot,!1,null,null);const Yt=Mt.exports;function h(e){return Object.values(e).flatMap(t=>{const s=Object.entries(t.raids).flatMap(a=>a[1].namejp?{id:a[0].split("/")[0],name:a[1].name}:[]);return s.length>0?{name:t.name,content:s}:[]})}const St=[{name:"Miscellaneous",content:[{name:"Uncategorized",id:null,private:!0},{name:"Campaign-Exclusive Quest",id:50}]},{name:"Unite and Fight",content:[{name:"Extreme+",id:101},{name:"NM 90",id:102},{name:"NM 95",id:103},{name:"NM 100",id:104},{name:"NM 150",id:105},{name:"NM 200",id:106}]},{name:"Pride of the Ascendant",content:[{name:"Echidna",id:121},{name:"Gilbert",id:122},{name:"Golden Knight",id:123},{name:"Nalhe Great Wall",id:124},{name:"Violet Knight",id:125},{name:"White Knight",id:126},{name:"Cherub",id:127},{name:"Zwei",id:128},{name:"Kikuri",id:129},{name:"Maxwell",id:130}]},{name:"Co-op",content:[{name:"Ex 5-3: Throes of Wings",id:151},{name:"Ex 5-4: Throes of Calamity",id:152},{name:"Ex 6-1: Throes of Dark Steel",id:153},{name:"Ex 6-2: Throes of Death",id:154}]},{name:"Replicard Sandbox",content:[{name:"Zone Eletio",id:201},{name:"Zone Faym",id:202},{name:"Zone Goliath",id:203},{name:"Zone Harbinger",id:204},{name:"Zone Invidia",id:205},{name:"Zone Joculator",id:206},{name:"Zone Kalendae",id:207},{name:"Zone Liber",id:208},{name:"Zone Mundus",id:209}]},...h(p.CAT_STANDARD),...h(p.CAT_IMPOSSIBLE)],Rt={components:{Dropdown:w},props:{value:{type:Number},all:{required:!1,type:Boolean,default:!1},showPrivateCategories:{required:!1,type:Boolean,default:!0},disabled:{type:Boolean,default:!1}},methods:{filterContent(e){return this.showPrivateCategories?e:e.filter(t=>t.private!==!0)},changeValue(e){this.$emit("change",e),e.target.value===""?this.$emit("input",null):this.$emit("input",e.target.value)}},computed:{content(){return St}}};var Dt=function(){var t=this,s=t._self._c;return s("dropdown",{staticClass:"w-52",attrs:{value:t.value,disabled:t.disabled},on:{change:t.changeValue}},[t.all?s("option",{domProps:{value:-1}},[t._v("--- All Content ---")]):t._e(),t._l(t.content,function(a,r){return s("optgroup",{key:r,attrs:{label:a.name}},t._l(t.filterContent(a.content),function(o){return s("option",{key:o.id,domProps:{value:o.id}},[t._v(" "+t._s(o.name)+" ")])}),0)})],2)},Lt=[],It=i(Rt,Dt,Lt,!1,null,null);const Qt=It.exports,Pt={components:{Checkbox:x},props:{teamId:{type:Number}},methods:{clickLike(e){e?this.axios.get("/party/like/"+this.teamId).then(t=>{this.$store.dispatch("addMessage",{message:"You liked this party"}),this.liked=e}).catch(t=>this.$store.dispatch("addAxiosErrorMessage",t)):this.axios.get("/party/unlike/"+this.teamId).then(t=>{this.$store.dispatch("addMessage",{message:"You stopped liking this party"}),this.liked=e}).catch(t=>this.$store.dispatch("addAxiosErrorMessage",t))}},computed:{...l({team_owner:e=>e.party_builder.team_owner}),liked:{get(){return this.$store.state.party_builder.liked},set(e){this.$store.commit("setLiked",e)}},isUserLogged(){return this.$store.getters.getUserId!==null},isMyParty(){return this.team_owner===this.$store.getters.getUserId}}};var At=function(){var t=this,s=t._self._c;return s("checkbox",{directives:[{name:"show",rawName:"v-show",value:t.team_owner&&!t.isMyParty,expression:"team_owner && ! isMyParty"}],attrs:{value:t.liked,disabled:t.team_owner&&!t.isUserLogged,title:t.isUserLogged?"":"Log in to like this team",off:["far","circle"],on:["far","face-grin-wide"],iconSize:"text-3xl"},on:{input:t.clickLike}},[t._v(" "+t._s(t.liked?"Liked":"Like this team")+" ")])},Nt=[],Ft=i(Pt,At,Nt,!1,null,null);const Xt=Ft.exports;export{Qt as C,Yt as G,Xt as L,zt as a,Vt as b,Jt as c,St as d};
|