diff --git a/javascript/index.js b/javascript/index.js index cfaeb21..fec92c4 100644 --- a/javascript/index.js +++ b/javascript/index.js @@ -13,7 +13,7 @@ Promise.resolve().then(async () => {
MFrGXJqNrOUPCPqPrQ|]@`+`2h1lBlZnXp*r;rWrkz9{4{B}x-#c-#y-$;-$l-$y-%Q-%n-(i-(x-)i-/!-3*-5B-9V",wan:"#=$0&o.]0F4@5X5b6*628u9p -+b-+(-(_-(.-&h-#%{@wGuWs}s|rJrDlaWTV}V+NAMvKfIgGKFX9a7c,7&]&+%~",bie:"-/A-/;fGe2`#M'M!$!#I",pao:"-/>-+i-'^~o|2w=hA]$[P?.4J4H3d06.M'^%A!S",geng:"-/7-&A{TzHlrh=ZIOlK4IX=X2p&M",shua:"-//-%j",cuo:"-.y-.p-*5wukWkSh!ZKY&WuV4(o$j$'",kei:"-.woU",la:"-.v-%3-$n~L|8[RXFXEWnUEU2R`MOI6DT:T0['o$A",pou:"-.l-'_-&[{]twtO]+]&Z+YGJS/<",tuan:"-.I~!}~}K}HyPy&f7`>[}XIVmGLE;;.:m8t2[,F%v%p",zuan:"-.)XOTt",keng:"-,x-([|t|kvIZCXlVgBF/C",gao:"-,Z-(I-(>wRlpWjNHGxGwGdG>E~E3Dm,)!y!t",lang:"-,V-&J-$~{Jy[r{llgiSeOIOHO;KRHHG4Cp=[3Y,z*%(s",weng:"-,@-#oyxv{kfU!Pd9o'N'&",tao:"-+m-)E-'+-%DwPwMw*r}i/fl`j[oYBWXL,JkGtE?><=) ${C} MFrGXJqNrOUPCPqPrQ|]@`+`2h1lBlZnXp*r;rWrkz9{4{B}x-#c-#y-$;-$l-$y-%Q-%n-(i-(x-)i-/!-3*-5B-9V",wan:"#=$0&o.]0F4@5X5b6*628u9p -+b-+(-(_-(.-&h-#%{@wGuWs}s|rJrDlaWTV}V+NAMvKfIgGKFX9a7c,7&]&+%~",bie:"-/A-/;fGe2`#M'M!$!#I",pao:"-/>-+i-'^~o|2w=hA]$[P?.4J4H3d06.M'^%A!S",geng:"-/7-&A{TzHlrh=ZIOlK4IX=X2p&M",shua:"-//-%j",cuo:"-.y-.p-*5wukWkSh!ZKY&WuV4(o$j$'",kei:"-.woU",la:"-.v-%3-$n~L|8[RXFXEWnUEU2R`MOI6DT:T0['o$A",pou:"-.l-'_-&[{]twtO]+]&Z+YGJS/<",tuan:"-.I~!}~}K}HyPy&f7`>[}XIVmGLE;;.:m8t2[,F%v%p",zuan:"-.)XOTt",keng:"-,x-([|t|kvIZCXlVgBF/C",gao:"-,Z-(I-(>wRlpWjNHGxGwGdG>E~E3Dm,)!y!t",lang:"-,V-&J-$~{Jy[r{llgiSeOIOHO;KRHHG4Cp=[3Y,z*%(s",weng:"-,@-#oyxv{kfU!Pd9o'N'&",tao:"-+m-)E-'+-%DwPwMw*r}i/fl`j[oYBWXL,JkGtE?><=) ${C}ZYZZ]U_6_9d9fYj6j~lWm)mep)rQrbrctvwkxc{y|U}6~?~C~`~m-!Z-*'-+R-/j-0j-3i-4/-4@-5,-5f-6j-6s-7)-9G-9W-9X",tuo:"%U%V&z0L2J4v?{@$F_H6MUTbT~Y'Yc^QdHdQnVq+r`x1{{|;|<-&d-(.-(z-({-)1-)J-)K-*:-*e-*p-+$-+3-.b-/%-/[-0b-3O-4,-6_-8}-9$-9?",zhe:"#'%+%E'P2f2|
}I-*S-+S-0~-2b-5X-8{",cou:"@ThJiK",chuang:"'_,H,L,q{+{E",piao:"$+).1D7a:;
lMi@i$fDf@b1`Y_4XyW6TMMzJ$I:GOD{=#
{let t=0,n=1;for(let a=e.length;a--;)t+=n*da.indexOf(e.charAt(a)),n*=91;return t},Wt=(e,t)=>{let n,a,s,i,w;for(n in e)if(e.hasOwnProperty(n))for(a=e[n].match(ga),s=0;s
');continue}const Y=J[C];O||(O=Y.includes("("));const le=["tag"];O&&le.push("has-parentheses"),Y.length<32&&le.push("short-tag"),j.push(`${Y}`),O&&(O=!Y.includes(")"))}return j.join(a.showCommaInInfoPanel?",":" ")}$e("load",o=>{const r=o.target;r.className==="ant-image-preview-img"&&(T.value=`${r.naturalWidth} x ${r.naturalHeight}`)},{capture:!0});const ze=ee(()=>{const o=[{name:x("fileSize"),val:n.file.size}];return T.value&&o.push({name:x("resolution"),val:T.value}),o}),d=()=>{const o="Negative prompt:",r=I.value.includes(o)?I.value.split(o)[0]:W.value[0]??"";pe(Ve(r.trim()))},_=()=>document.body.requestFullscreen(),q=o=>{pe(typeof o=="object"?JSON.stringify(o,null,4):o)},D=o=>{o.key.startsWith("Arrow")?(o.stopPropagation(),o.preventDefault(),document.dispatchEvent(new KeyboardEvent("keydown",o))):o.key==="Escape"&&document.fullscreenElement&&document.exitFullscreen()};$e("dblclick",o=>{var r;((r=o.target)==null?void 0:r.className)==="ant-image-preview-img"&&Oe()});const he=ee(()=>F.value||m.value.expanded),_e=ke(Qe+"contextShowFullPath",!1),Pe=ee(()=>_e.value?n.file.fullpath:n.file.name),xe=ke(Qe+"tagA2ZClassify",!1),Ut=ee(()=>{var J;const o=(J=a.conf)==null?void 0:J.all_custom_tags.map(j=>{var C,Y;return{char:((C=j.display_name)==null?void 0:C[0])||((Y=j.name)==null?void 0:Y[0]),...j}}).reduce((j,O)=>{var Y;let C="#";if(/[a-z]/i.test(O.char))C=O.char.toUpperCase();else if(/[\u4e00-\u9fa5]/.test(O.char))try{C=((Y=/^\[?(\w)/.exec(va(O.char)+""))==null?void 0:Y[1])??"#"}catch(le){console.log("err",le)}return C=C.toUpperCase(),j[C]||(j[C]=[]),j[C].push(O),j},{});return Object.entries(o??{}).sort((j,O)=>j[0].charCodeAt(0)-O[0].charCodeAt(0))}),De=()=>{Oe(),t("contextMenuClick",{key:"tiktokView"},n.file,n.idx)},je=ie(!1),qt=async()=>{var o,r;if(!L.value.prompt){Q.warning(x("aiAnalyzeTagsNoPrompt"));return}if(!((r=(o=a.conf)==null?void 0:o.all_custom_tags)!=null&&r.length)){Q.warning(x("aiAnalyzeTagsNoCustomTags"));return}je.value=!0;try{const J=L.value.prompt,O=`You are a professional AI assistant responsible for analyzing Stable Diffusion prompts and categorizing them into appropriate tags.
+*/let jt=19968,ca=(40896-jt)/2,et="",Ee=",",da=(()=>{let e=[];for(let t=33;t<127;t++)t!=34&&t!=92&&t!=45&&e.push(String.fromCharCode(t));return e.join(et)})(),rt={a:{yi:"!]#R$!$q(3(p)[*2*g+6+d.C.q0[0w1L2<717l8B8E9?:8;V;[;e;{<)<+.>4??@~A`BbC:CGC^CiDMDjDkF!H/H;JaL?M.M2MoNCN|OgO|P$P)PBPyQ~R%R.S.T;TZYZZ]U_6_9d9fYj6j~lWm)mep)rQrbrctvwkxc{y|U}6~?~C~`~m-!Z-*'-+R-/j-0j-3i-4/-4@-5,-5f-6j-6s-7)-9G-9W-9X",tuo:"%U%V&z0L2J4v?{@$F_H6MUTbT~Y'Yc^QdHdQnVq+r`x1{{|;|<-&d-(.-(z-({-)1-)J-)K-*:-*e-*p-+$-+3-.b-/%-/[-0b-3O-4,-6_-8}-9$-9?",zhe:"#'%+%E'P2f2|
}I-*S-+S-0~-2b-5X-8{",cou:"@ThJiK",chuang:"'_,H,L,q{+{E",piao:"$+).1D7a:;
lMi@i$fDf@b1`Y_4XyW6TMMzJ$I:GOD{=#
{let t=0,n=1;for(let a=e.length;a--;)t+=n*da.indexOf(e.charAt(a)),n*=91;return t},Wt=(e,t)=>{let n,a,s,i,w;for(n in e)if(e.hasOwnProperty(n))for(a=e[n].match(ga),s=0;s
');continue}const Y=X[C];O||(O=Y.includes("("));const le=["tag"];O&&le.push("has-parentheses"),Y.length<32&&le.push("short-tag"),j.push(`${Y}`),O&&(O=!Y.includes(")"))}return j.join(a.showCommaInInfoPanel?",":" ")}$e("load",o=>{const r=o.target;r.className==="ant-image-preview-img"&&(T.value=`${r.naturalWidth} x ${r.naturalHeight}`)},{capture:!0});const ze=ee(()=>{const o=[{name:x("fileSize"),val:n.file.size}];return T.value&&o.push({name:x("resolution"),val:T.value}),o}),d=()=>{const o="Negative prompt:",r=I.value.includes(o)?I.value.split(o)[0]:W.value[0]??"";pe(Ve(r.trim()))},_=()=>document.body.requestFullscreen(),q=o=>{pe(typeof o=="object"?JSON.stringify(o,null,4):o)},P=o=>{o.key.startsWith("Arrow")?(o.stopPropagation(),o.preventDefault(),document.dispatchEvent(new KeyboardEvent("keydown",o))):o.key==="Escape"&&document.fullscreenElement&&document.exitFullscreen()};$e("dblclick",o=>{var r;((r=o.target)==null?void 0:r.className)==="ant-image-preview-img"&&Oe()});const he=ee(()=>F.value||m.value.expanded),_e=ke(Qe+"contextShowFullPath",!1),De=ee(()=>_e.value?n.file.fullpath:n.file.name),xe=ke(Qe+"tagA2ZClassify",!1),Ut=ee(()=>{var X;const o=(X=a.conf)==null?void 0:X.all_custom_tags.map(j=>{var C,Y;return{char:((C=j.display_name)==null?void 0:C[0])||((Y=j.name)==null?void 0:Y[0]),...j}}).reduce((j,O)=>{var Y;let C="#";if(/[a-z]/i.test(O.char))C=O.char.toUpperCase();else if(/[\u4e00-\u9fa5]/.test(O.char))try{C=((Y=/^\[?(\w)/.exec(va(O.char)+""))==null?void 0:Y[1])??"#"}catch(le){console.log("err",le)}return C=C.toUpperCase(),j[C]||(j[C]=[]),j[C].push(O),j},{});return Object.entries(o??{}).sort((j,O)=>j[0].charCodeAt(0)-O[0].charCodeAt(0))}),Pe=()=>{Oe(),t("contextMenuClick",{key:"tiktokView"},n.file,n.idx)},je=ie(!1),qt=async()=>{var o,r;if(!L.value.prompt){Q.warning(x("aiAnalyzeTagsNoPrompt"));return}if(!((r=(o=a.conf)==null?void 0:o.all_custom_tags)!=null&&r.length)){Q.warning(x("aiAnalyzeTagsNoCustomTags"));return}je.value=!0;try{const X=L.value.prompt,O=`You are a professional AI assistant responsible for analyzing Stable Diffusion prompts and categorizing them into appropriate tags.
Your task is:
1. Analyze the given prompt
@@ -15,4 +15,4 @@ Your task is:
Available tags: ${a.conf.all_custom_tags.map(N=>N.name).join(", ")}
-Please return only tag names, do not include any other content.`,Y=(await vn({messages:[{role:"system",content:O},{role:"user",content:`Please analyze this prompt and return matching tags: ${J}`}],temperature:.3,max_tokens:200})).choices[0].message.content.trim();if(!Y){Q.info(x("aiAnalyzeTagsNoMatchedTags"));return}const le=Y.split(",").map(N=>N.trim()).filter(N=>N),Ce=a.conf.all_custom_tags.filter(N=>le.some(me=>N.name.toLowerCase()===me.toLowerCase()||N.name.toLowerCase().includes(me.toLowerCase())||me.toLowerCase().includes(N.name.toLowerCase()))),Me=new Set(w.value.map(N=>N.id)),fe=Ce.filter(N=>!Me.has(N.id));if(fe.length===0){Ce.length>0?Q.info(x("aiAnalyzeTagsAllTagsAlreadyAdded")):Q.info(x("aiAnalyzeTagsNoValidTags"));return}for(const N of fe)t("contextMenuClick",{key:`toggle-tag-${N.id}`},n.file,n.idx);Q.success(x("aiAnalyzeTagsSuccess",[fe.length.toString(),fe.map(N=>N.name).join(", ")]))}catch(J){console.error("AI分析标签失败:",J),Q.error(x("aiAnalyzeTagsFailed"))}finally{je.value=!1}};return(o,r)=>{var ct,dt,gt;const J=Fn,j=ve,O=yn,C=$n,Y=wn,le=_n,Ce=ve,Me=An,fe=En,N=bn,me=kn,Vt=On;return h(),z("div",{ref_key:"el",ref:i,class:qe(["full-screen-menu",{"unset-size":!c(m).expanded,lr:c(F),"always-on":c($),"mouse-in":H.value}]),onWheelCapture:r[13]||(r[13]=yt(()=>{},["stop"])),onKeydownCapture:D},[c(F)?(h(),z("div",ya)):X("",!0),k("div",$a,[k("div",wa,[c(F)?X("",!0):(h(),z("div",{key:0,ref_key:"dragHandle",ref:E,class:"icon",style:{cursor:"grab"},title:c(x)("dragToMovePanel")},[u(c(Hn))],8,_a)),c(F)?X("",!0):(h(),z("div",{key:1,class:"icon",style:{cursor:"pointer"},onClick:r[0]||(r[0]=g=>c(m).expanded=!c(m).expanded),title:c(x)("clickToToggleMaximizeMinimize")},[he.value?(h(),se(c(fn),{key:0})):(h(),se(c(mn),{key:1}))],8,ba)),k("div",{style:{display:"flex","flex-direction":"column","align-items":"center",cursor:"grab"},class:"icon",title:c(x)("fullscreenview"),onClick:_},[k("img",{src:c(aa),style:{width:"21px",height:"21px","padding-bottom":"2px"},alt:""},null,8,Oa)],8,ka),u(J,{"get-popup-container":G},{overlay:b(()=>[u(Tn,{file:o.file,idx:o.idx,"selected-tag":w.value,onContextMenuClick:r[1]||(r[1]=(g,B,oe)=>t("contextMenuClick",g,B,oe))},null,8,["file","idx","selected-tag"])]),default:b(()=>[c(m).expanded?X("",!0):(h(),z("div",za,[u(c(vt))]))]),_:1}),he.value?(h(),z("div",xa)):X("",!0),he.value?(h(),z("div",Ca,[u(J,{trigger:["hover"],"get-popup-container":G},{overlay:b(()=>[u(le,{onClick:r[2]||(r[2]=g=>t("contextMenuClick",g,o.file,o.idx))},{default:b(()=>{var g;return[((g=c(a).conf)==null?void 0:g.launch_mode)!=="server"?(h(),z(R,{key:0},[u(O,{key:"send2txt2img"},{default:b(()=>[M(v(o.$t("sendToTxt2img")),1)]),_:1}),u(O,{key:"send2img2img"},{default:b(()=>[M(v(o.$t("sendToImg2img")),1)]),_:1}),u(O,{key:"send2inpaint"},{default:b(()=>[M(v(o.$t("sendToInpaint")),1)]),_:1}),u(O,{key:"send2extras"},{default:b(()=>[M(v(o.$t("sendToExtraFeatures")),1)]),_:1}),u(C,{key:"sendToThirdPartyExtension",title:o.$t("sendToThirdPartyExtension")},{default:b(()=>[u(O,{key:"send2controlnet-txt2img"},{default:b(()=>[M("ControlNet - "+v(o.$t("t2i")),1)]),_:1}),u(O,{key:"send2controlnet-img2img"},{default:b(()=>[M("ControlNet - "+v(o.$t("i2i")),1)]),_:1}),u(O,{key:"send2outpaint"},{default:b(()=>[M("openOutpaint")]),_:1})]),_:1},8,["title"])],64)):X("",!0),u(O,{key:"send2BatchDownload"},{default:b(()=>[M(v(o.$t("sendToBatchDownload")),1)]),_:1}),u(C,{key:"copy2target",title:o.$t("copyTo")},{default:b(()=>[(h(!0),z(R,null,ue(c(a).quickMovePaths,B=>(h(),se(O,{key:`copy-to-${B.dir}`},{default:b(()=>[M(v(B.zh),1)]),_:2},1024))),128))]),_:1},8,["title"]),u(C,{key:"move2target",title:o.$t("moveTo")},{default:b(()=>[(h(!0),z(R,null,ue(c(a).quickMovePaths,B=>(h(),se(O,{key:`move-to-${B.dir}`},{default:b(()=>[M(v(B.zh),1)]),_:2},1024))),128))]),_:1},8,["title"]),u(Y),u(O,{key:"deleteFiles"},{default:b(()=>[M(v(o.$t("deleteSelected")),1)]),_:1}),u(O,{key:"previewInNewWindow"},{default:b(()=>[M(v(o.$t("previewInNewWindow")),1)]),_:1}),u(O,{key:"copyPreviewUrl"},{default:b(()=>[M(v(o.$t("copySourceFilePreviewLink")),1)]),_:1}),u(O,{key:"copyFilePath"},{default:b(()=>[M(v(o.$t("copyFilePath")),1)]),_:1}),u(Y),u(O,{key:"tiktokView",onClick:De},{default:b(()=>[M(v(o.$t("tiktokView")),1)]),_:1})]}),_:1})]),default:b(()=>[u(j,null,{default:b(()=>[M(v(c(x)("openContextMenu")),1)]),_:1})]),_:1}),u(Ce,{onClick:r[3]||(r[3]=g=>t("contextMenuClick",{key:"download"},n.file,n.idx))},{default:b(()=>[M(v(o.$t("download")),1)]),_:1}),I.value?(h(),se(j,{key:0,onClick:r[4]||(r[4]=g=>c(pe)(I.value))},{default:b(()=>[M(v(o.$t("copyPrompt")),1)]),_:1})):X("",!0),I.value?(h(),se(j,{key:1,onClick:d},{default:b(()=>[M(v(o.$t("copyPositivePrompt")),1)]),_:1})):X("",!0),I.value&&((dt=(ct=c(a).conf)==null?void 0:ct.all_custom_tags)!=null&&dt.length)?(h(),se(j,{key:2,onClick:qt,type:"primary",loading:je.value},{default:b(()=>[M(v(o.$t("aiAnalyzeTags")),1)]),_:1},8,["loading"])):X("",!0),u(j,{onClick:De,onTouchstart:yt(De,["prevent"]),type:"default"},{default:b(()=>[M(v(o.$t("tiktokView")),1)]),_:1},8,["onTouchstart"])])):X("",!0)]),he.value?(h(),z("div",Ma,[k("div",Ta,[k("span",La,[k("span",Sa,v(o.$t("fileName")),1),k("span",{class:"value",title:Pe.value,onDblclick:r[5]||(r[5]=g=>c(pe)(Pe.value))},v(Pe.value),41,Ea),k("span",{style:{margin:"0 8px",cursor:"pointer"},title:"Click to expand full path",onClick:r[6]||(r[6]=g=>_e.value=!c(_e))},[u(c(vt))])]),(h(!0),z(R,null,ue(ze.value,g=>(h(),z("span",{class:"info-tag",key:g.name},[k("span",Aa,v(g.name),1),k("span",{class:"value",title:g.val,onDblclick:B=>c(pe)(g.val)},v(g.val),41,Fa)]))),128))]),(gt=c(a).conf)!=null&>.all_custom_tags?(h(),z("div",Ia,[k("div",{class:"sort-tag-switch",onClick:r[7]||(r[7]=g=>xe.value=!c(xe))},[c(xe)?(h(),se(c(jn),{key:1})):(h(),se(c(na),{key:0}))]),k("div",{class:"tag",onClick:r[8]||(r[8]=(...g)=>c(Ge)&&c(Ge)(...g)),style:Ue({"--tag-color":"var(--zp-luminous)"})},"+ "+v(o.$t("add")),5),c(xe)?(h(!0),z(R,{key:0},ue(Ut.value,([g,B])=>(h(),z("div",{key:g,class:"tag-alpha-item"},[k("h4",Pa,v(g)+" : ",1),k("div",null,[(h(!0),z(R,null,ue(B,oe=>(h(),z("div",{class:qe(["tag",{selected:w.value.some(pt=>pt.id===oe.id)}]),onClick:pt=>t("contextMenuClick",{key:`toggle-tag-${oe.id}`},o.file,o.idx),key:oe.id,style:Ue({"--tag-color":c(s).getColor(oe)})},v(oe.name),15,Da))),128))])]))),128)):(h(!0),z(R,{key:1},ue(c(a).conf.all_custom_tags,g=>(h(),z("div",{class:qe(["tag",{selected:w.value.some(B=>B.id===g.id)}]),onClick:B=>t("contextMenuClick",{key:`toggle-tag-${g.id}`},o.file,o.idx),key:g.id,style:Ue({"--tag-color":c(s).getColor(g)})},v(g.name),15,ja))),128))])):X("",!0),k("div",Wa,[k("div",Ua,[M(v(o.$t("experimentalLRLayout"))+": ",1),u(Me,{checked:c(F),"onUpdate:checked":r[9]||(r[9]=g=>Le(F)?F.value=g:null),size:"small"},null,8,["checked"])]),c(F)?(h(),z(R,{key:0},[k("div",qa,[M(v(o.$t("width"))+": ",1),u(fe,{value:c(y),"onUpdate:value":r[10]||(r[10]=g=>Le(y)?y.value=g:null),style:{width:"64px"},step:16,min:128,max:1024},null,8,["value"])]),u(N,{title:o.$t("alwaysOnTooltipInfo")},{default:b(()=>[k("div",Va,[M(v(o.$t("alwaysOn"))+": ",1),u(Me,{checked:c($),"onUpdate:checked":r[11]||(r[11]=g=>Le($)?$.value=g:null),size:"small"},null,8,["checked"])])]),_:1},8,["title"])],64)):X("",!0)]),u(Vt,{activeKey:c(p),"onUpdate:activeKey":r[12]||(r[12]=g=>Le(p)?p.value=g:null)},{default:b(()=>[u(me,{key:"structedData",tab:o.$t("structuredData")},{default:b(()=>[k("div",null,[L.value.prompt?(h(),z(R,{key:0},[Na,Ba,k("code",{innerHTML:ne(L.value.prompt??"")},null,8,Xa)],64)):X("",!0),L.value.negativePrompt?(h(),z(R,{key:1},[Ha,Ja,k("code",{innerHTML:ne(L.value.negativePrompt??"")},null,8,Ya)],64)):X("",!0)]),Object.keys(P.value).length?(h(),z(R,{key:0},[Za,Ga,k("table",null,[(h(!0),z(R,null,ue(P.value,(g,B)=>(h(),z("tr",{key:B,class:"gen-info-frag"},[k("td",Ka,v(B),1),typeof g=="object"?(h(),z("td",{key:0,style:{cursor:"pointer"},onDblclick:oe=>q(g)},[k("code",null,v(g),1)],40,Qa)):(h(),z("td",{key:1,style:{cursor:"pointer"},onDblclick:oe=>q(c(Ve)(g))},v(c(Ve)(g)),41,Ra))]))),128))])],64)):X("",!0),S.value&&Object.keys(S.value).length?(h(),z(R,{key:1},[eo,to,k("table",no,[(h(!0),z(R,null,ue(S.value,(g,B)=>(h(),z("tr",{key:B,class:"gen-info-frag"},[k("td",ao,v(B),1),k("td",{style:{cursor:"pointer"},onDblclick:oe=>q(g)},[k("code",lo,v(typeof g=="string"?g:JSON.stringify(g,null,2)),1)],40,oo)]))),128))])],64)):X("",!0)]),_:1},8,["tab"]),u(me,{key:"sourceText",tab:o.$t("sourceText")},{default:b(()=>[k("code",null,v(I.value),1)]),_:1},8,["tab"])]),_:1},8,["activeKey"])])):X("",!0)]),c(m).expanded&&!c(F)?(h(),z("div",{key:1,class:"mouse-sensor",ref_key:"resizeHandle",ref:f,title:c(x)("dragToResizePanel")},[u(c(Vn))],8,so)):X("",!0)],34)}}});const zo=Dt(io,[["__scopeId","data-v-c7e0b9b7"]]),uo={key:0,class:"float-panel"},ro={key:0,class:"select-actions"},co={key:1},go=Pt({__name:"MultiSelectKeep",props:{show:{type:Boolean}},emits:["selectAll","reverseSelect","clearAllSelected"],setup(e,{emit:t}){const n=nt(),a=()=>{t("clearAllSelected"),n.keepMultiSelect=!1},s=()=>{n.keepMultiSelect=!0};return(i,w)=>{const T=ve;return i.show?(h(),z("div",uo,[c(n).keepMultiSelect?(h(),z("div",ro,[u(T,{size:"small",onClick:w[0]||(w[0]=A=>t("selectAll"))},{default:b(()=>[M(v(i.$t("select-all")),1)]),_:1}),u(T,{size:"small",onClick:w[1]||(w[1]=A=>t("reverseSelect"))},{default:b(()=>[M(v(i.$t("rerverse-select")),1)]),_:1}),u(T,{size:"small",onClick:w[2]||(w[2]=A=>t("clearAllSelected"))},{default:b(()=>[M(v(i.$t("clear-all-selected")),1)]),_:1}),u(T,{size:"small",onClick:a},{default:b(()=>[M(v(i.$t("exit")),1)]),_:1})])):(h(),z("div",co,[u(T,{size:"small",type:"primary",onClick:s},{default:b(()=>[M(v(i.$t("keep-multi-selected")),1)]),_:1})]))])):X("",!0)}}});const xo=Dt(go,[["__scopeId","data-v-b6f9a67c"]]);export{wo as L,xo as M,_o as R,ko as a,Oo as b,bo as c,zo as f,sa as o,$e as u};
+Please return only tag names, do not include any other content.`,Y=(await vn({messages:[{role:"system",content:O},{role:"user",content:`Please analyze this prompt and return matching tags: ${X}`}],temperature:.3,max_tokens:200})).choices[0].message.content.trim();if(!Y){Q.info(x("aiAnalyzeTagsNoMatchedTags"));return}const le=Y.split(",").map(N=>N.trim()).filter(N=>N),Ce=a.conf.all_custom_tags.filter(N=>le.some(me=>N.name.toLowerCase()===me.toLowerCase()||N.name.toLowerCase().includes(me.toLowerCase())||me.toLowerCase().includes(N.name.toLowerCase()))),Me=new Set(w.value.map(N=>N.id)),fe=Ce.filter(N=>!Me.has(N.id));if(fe.length===0){Ce.length>0?Q.info(x("aiAnalyzeTagsAllTagsAlreadyAdded")):Q.info(x("aiAnalyzeTagsNoValidTags"));return}for(const N of fe)t("contextMenuClick",{key:`toggle-tag-${N.id}`},n.file,n.idx);Q.success(x("aiAnalyzeTagsSuccess",[fe.length.toString(),fe.map(N=>N.name).join(", ")]))}catch(X){console.error("AI分析标签失败:",X),Q.error(x("aiAnalyzeTagsFailed"))}finally{je.value=!1}};return(o,r)=>{var ct,dt,gt;const X=Fn,j=ve,O=yn,C=$n,Y=wn,le=_n,Ce=ve,Me=An,fe=En,N=bn,me=kn,Vt=On;return h(),z("div",{ref_key:"el",ref:i,class:qe(["full-screen-menu",{"unset-size":!c(m).expanded,lr:c(F),"always-on":c($),"mouse-in":J.value}]),onWheelCapture:r[13]||(r[13]=yt(()=>{},["stop"])),onKeydownCapture:P},[c(F)?(h(),z("div",ya)):H("",!0),k("div",$a,[k("div",wa,[c(F)?H("",!0):(h(),z("div",{key:0,ref_key:"dragHandle",ref:E,class:"icon",style:{cursor:"grab"},title:c(x)("dragToMovePanel")},[u(c(Jn))],8,_a)),c(F)?H("",!0):(h(),z("div",{key:1,class:"icon",style:{cursor:"pointer"},onClick:r[0]||(r[0]=g=>c(m).expanded=!c(m).expanded),title:c(x)("clickToToggleMaximizeMinimize")},[he.value?(h(),se(c(fn),{key:0})):(h(),se(c(mn),{key:1}))],8,ba)),k("div",{style:{display:"flex","flex-direction":"column","align-items":"center",cursor:"grab"},class:"icon",title:c(x)("fullscreenview"),onClick:_},[k("img",{src:c(aa),style:{width:"21px",height:"21px","padding-bottom":"2px"},alt:""},null,8,Oa)],8,ka),u(X,{"get-popup-container":G},{overlay:b(()=>[u(Tn,{file:o.file,idx:o.idx,"selected-tag":w.value,onContextMenuClick:r[1]||(r[1]=(g,B,oe)=>t("contextMenuClick",g,B,oe))},null,8,["file","idx","selected-tag"])]),default:b(()=>[c(m).expanded?H("",!0):(h(),z("div",za,[u(c(vt))]))]),_:1}),he.value?(h(),z("div",xa)):H("",!0),he.value?(h(),z("div",Ca,[u(X,{trigger:["hover"],"get-popup-container":G},{overlay:b(()=>[u(le,{onClick:r[2]||(r[2]=g=>t("contextMenuClick",g,o.file,o.idx))},{default:b(()=>{var g;return[((g=c(a).conf)==null?void 0:g.launch_mode)!=="server"?(h(),z(R,{key:0},[u(O,{key:"send2txt2img"},{default:b(()=>[M(v(o.$t("sendToTxt2img")),1)]),_:1}),u(O,{key:"send2img2img"},{default:b(()=>[M(v(o.$t("sendToImg2img")),1)]),_:1}),u(O,{key:"send2inpaint"},{default:b(()=>[M(v(o.$t("sendToInpaint")),1)]),_:1}),u(O,{key:"send2extras"},{default:b(()=>[M(v(o.$t("sendToExtraFeatures")),1)]),_:1}),u(C,{key:"sendToThirdPartyExtension",title:o.$t("sendToThirdPartyExtension")},{default:b(()=>[u(O,{key:"send2controlnet-txt2img"},{default:b(()=>[M("ControlNet - "+v(o.$t("t2i")),1)]),_:1}),u(O,{key:"send2controlnet-img2img"},{default:b(()=>[M("ControlNet - "+v(o.$t("i2i")),1)]),_:1}),u(O,{key:"send2outpaint"},{default:b(()=>[M("openOutpaint")]),_:1})]),_:1},8,["title"])],64)):H("",!0),u(O,{key:"send2BatchDownload"},{default:b(()=>[M(v(o.$t("sendToBatchDownload")),1)]),_:1}),u(C,{key:"copy2target",title:o.$t("copyTo")},{default:b(()=>[(h(!0),z(R,null,ue(c(a).quickMovePaths,B=>(h(),se(O,{key:`copy-to-${B.dir}`},{default:b(()=>[M(v(B.zh),1)]),_:2},1024))),128))]),_:1},8,["title"]),u(C,{key:"move2target",title:o.$t("moveTo")},{default:b(()=>[(h(!0),z(R,null,ue(c(a).quickMovePaths,B=>(h(),se(O,{key:`move-to-${B.dir}`},{default:b(()=>[M(v(B.zh),1)]),_:2},1024))),128))]),_:1},8,["title"]),u(Y),u(O,{key:"deleteFiles"},{default:b(()=>[M(v(o.$t("deleteSelected")),1)]),_:1}),u(O,{key:"previewInNewWindow"},{default:b(()=>[M(v(o.$t("previewInNewWindow")),1)]),_:1}),u(O,{key:"copyPreviewUrl"},{default:b(()=>[M(v(o.$t("copySourceFilePreviewLink")),1)]),_:1}),u(O,{key:"copyFilePath"},{default:b(()=>[M(v(o.$t("copyFilePath")),1)]),_:1}),u(Y),u(O,{key:"tiktokView",onClick:Pe},{default:b(()=>[M(v(o.$t("tiktokView")),1)]),_:1})]}),_:1})]),default:b(()=>[u(j,null,{default:b(()=>[M(v(c(x)("openContextMenu")),1)]),_:1})]),_:1}),u(Ce,{onClick:r[3]||(r[3]=g=>t("contextMenuClick",{key:"download"},n.file,n.idx))},{default:b(()=>[M(v(o.$t("download")),1)]),_:1}),I.value?(h(),se(j,{key:0,onClick:r[4]||(r[4]=g=>c(pe)(I.value))},{default:b(()=>[M(v(o.$t("copyPrompt")),1)]),_:1})):H("",!0),I.value?(h(),se(j,{key:1,onClick:d},{default:b(()=>[M(v(o.$t("copyPositivePrompt")),1)]),_:1})):H("",!0),I.value&&((dt=(ct=c(a).conf)==null?void 0:ct.all_custom_tags)!=null&&dt.length)?(h(),se(j,{key:2,onClick:qt,type:"primary",loading:je.value},{default:b(()=>[M(v(o.$t("aiAnalyzeTags")),1)]),_:1},8,["loading"])):H("",!0),u(j,{onClick:Pe,onTouchstart:yt(Pe,["prevent"]),type:"default"},{default:b(()=>[M(v(o.$t("tiktokView")),1)]),_:1},8,["onTouchstart"])])):H("",!0)]),he.value?(h(),z("div",Ma,[k("div",Ta,[k("span",La,[k("span",Sa,v(o.$t("fileName")),1),k("span",{class:"value",title:De.value,onDblclick:r[5]||(r[5]=g=>c(pe)(De.value))},v(De.value),41,Ea),k("span",{style:{margin:"0 8px",cursor:"pointer"},title:"Click to expand full path",onClick:r[6]||(r[6]=g=>_e.value=!c(_e))},[u(c(vt))])]),(h(!0),z(R,null,ue(ze.value,g=>(h(),z("span",{class:"info-tag",key:g.name},[k("span",Aa,v(g.name),1),k("span",{class:"value",title:g.val,onDblclick:B=>c(pe)(g.val)},v(g.val),41,Fa)]))),128))]),(gt=c(a).conf)!=null&>.all_custom_tags?(h(),z("div",Ia,[k("div",{class:"sort-tag-switch",onClick:r[7]||(r[7]=g=>xe.value=!c(xe))},[c(xe)?(h(),se(c(jn),{key:1})):(h(),se(c(na),{key:0}))]),k("div",{class:"tag",onClick:r[8]||(r[8]=(...g)=>c(Ge)&&c(Ge)(...g)),style:Ue({"--tag-color":"var(--zp-luminous)"})},"+ "+v(o.$t("add")),5),c(xe)?(h(!0),z(R,{key:0},ue(Ut.value,([g,B])=>(h(),z("div",{key:g,class:"tag-alpha-item"},[k("h4",Da,v(g)+" : ",1),k("div",null,[(h(!0),z(R,null,ue(B,oe=>(h(),z("div",{class:qe(["tag",{selected:w.value.some(pt=>pt.id===oe.id)}]),onClick:pt=>t("contextMenuClick",{key:`toggle-tag-${oe.id}`},o.file,o.idx),key:oe.id,style:Ue({"--tag-color":c(s).getColor(oe)})},v(oe.name),15,Pa))),128))])]))),128)):(h(!0),z(R,{key:1},ue(c(a).conf.all_custom_tags,g=>(h(),z("div",{class:qe(["tag",{selected:w.value.some(B=>B.id===g.id)}]),onClick:B=>t("contextMenuClick",{key:`toggle-tag-${g.id}`},o.file,o.idx),key:g.id,style:Ue({"--tag-color":c(s).getColor(g)})},v(g.name),15,ja))),128))])):H("",!0),k("div",Wa,[k("div",Ua,[M(v(o.$t("experimentalLRLayout"))+": ",1),u(Me,{checked:c(F),"onUpdate:checked":r[9]||(r[9]=g=>Le(F)?F.value=g:null),size:"small"},null,8,["checked"])]),c(F)?(h(),z(R,{key:0},[k("div",qa,[M(v(o.$t("width"))+": ",1),u(fe,{value:c(y),"onUpdate:value":r[10]||(r[10]=g=>Le(y)?y.value=g:null),style:{width:"64px"},step:16,min:128,max:1024},null,8,["value"])]),u(N,{title:o.$t("alwaysOnTooltipInfo")},{default:b(()=>[k("div",Va,[M(v(o.$t("alwaysOn"))+": ",1),u(Me,{checked:c($),"onUpdate:checked":r[11]||(r[11]=g=>Le($)?$.value=g:null),size:"small"},null,8,["checked"])])]),_:1},8,["title"])],64)):H("",!0)]),u(Vt,{activeKey:c(p),"onUpdate:activeKey":r[12]||(r[12]=g=>Le(p)?p.value=g:null)},{default:b(()=>[u(me,{key:"structedData",tab:o.$t("structuredData")},{default:b(()=>[k("div",null,[L.value.prompt?(h(),z(R,{key:0},[Na,Ba,k("code",{innerHTML:ne(L.value.prompt??"")},null,8,Ha)],64)):H("",!0),L.value.negativePrompt?(h(),z(R,{key:1},[Ja,Xa,k("code",{innerHTML:ne(L.value.negativePrompt??"")},null,8,Ya)],64)):H("",!0)]),Object.keys(D.value).length?(h(),z(R,{key:0},[Za,Ga,k("table",null,[(h(!0),z(R,null,ue(D.value,(g,B)=>(h(),z("tr",{key:B,class:"gen-info-frag"},[k("td",Ka,v(B),1),typeof g=="object"?(h(),z("td",{key:0,style:{cursor:"pointer"},onDblclick:oe=>q(g)},[k("code",null,v(g),1)],40,Qa)):(h(),z("td",{key:1,style:{cursor:"pointer"},onDblclick:oe=>q(c(Ve)(g))},v(c(Ve)(g)),41,Ra))]))),128))])],64)):H("",!0),S.value&&Object.keys(S.value).length?(h(),z(R,{key:1},[eo,to,k("table",no,[(h(!0),z(R,null,ue(S.value,(g,B)=>(h(),z("tr",{key:B,class:"gen-info-frag"},[k("td",ao,v(B),1),k("td",{style:{cursor:"pointer"},onDblclick:oe=>q(g)},[k("code",lo,v(typeof g=="string"?g:JSON.stringify(g,null,2)),1)],40,oo)]))),128))])],64)):H("",!0)]),_:1},8,["tab"]),u(me,{key:"sourceText",tab:o.$t("sourceText")},{default:b(()=>[k("code",null,v(I.value),1)]),_:1},8,["tab"])]),_:1},8,["activeKey"])])):H("",!0)]),c(m).expanded&&!c(F)?(h(),z("div",{key:1,class:"mouse-sensor",ref_key:"resizeHandle",ref:f,title:c(x)("dragToResizePanel")},[u(c(Vn))],8,so)):H("",!0)],34)}}});const zo=Pt(io,[["__scopeId","data-v-c7e0b9b7"]]),uo={key:0,class:"float-panel"},ro={key:0,class:"select-actions"},co={key:1},go=Dt({__name:"MultiSelectKeep",props:{show:{type:Boolean}},emits:["selectAll","reverseSelect","clearAllSelected"],setup(e,{emit:t}){const n=nt(),a=()=>{t("clearAllSelected"),n.keepMultiSelect=!1},s=()=>{n.keepMultiSelect=!0};return(i,w)=>{const T=ve;return i.show?(h(),z("div",uo,[c(n).keepMultiSelect?(h(),z("div",ro,[u(T,{size:"small",onClick:w[0]||(w[0]=A=>t("selectAll"))},{default:b(()=>[M(v(i.$t("select-all")),1)]),_:1}),u(T,{size:"small",onClick:w[1]||(w[1]=A=>t("reverseSelect"))},{default:b(()=>[M(v(i.$t("rerverse-select")),1)]),_:1}),u(T,{size:"small",onClick:w[2]||(w[2]=A=>t("clearAllSelected"))},{default:b(()=>[M(v(i.$t("clear-all-selected")),1)]),_:1}),u(T,{size:"small",onClick:a},{default:b(()=>[M(v(i.$t("exit")),1)]),_:1})])):(h(),z("div",co,[u(T,{size:"small",type:"primary",onClick:s},{default:b(()=>[M(v(i.$t("keep-multi-selected")),1)]),_:1})]))])):H("",!0)}}});const xo=Pt(go,[["__scopeId","data-v-b6f9a67c"]]);export{wo as L,xo as M,_o as R,ko as a,Oo as b,bo as c,zo as f,sa as o,$e as u};
diff --git a/vue/dist/assets/SubstrSearch-e9faa41c.js b/vue/dist/assets/SubstrSearch-549f6935.js
similarity index 93%
rename from vue/dist/assets/SubstrSearch-e9faa41c.js
rename to vue/dist/assets/SubstrSearch-549f6935.js
index 8ae263d..3381453 100644
--- a/vue/dist/assets/SubstrSearch-e9faa41c.js
+++ b/vue/dist/assets/SubstrSearch-549f6935.js
@@ -1 +1 @@
-import{c as a,A as Fe,d as Ue,c9 as Be,r as w,o as Ee,cd as te,m as He,C as Pe,az as Ge,z as Ke,B as Le,E as ae,ce as je,a1 as qe,U as f,V as U,a3 as t,a4 as e,W as d,X as o,Y as i,a2 as y,$ as k,a5 as B,cp as Ne,ag as O,a6 as le,L as Je,af as We,Z as Qe,T as se,aj as Xe,cq as Ye,ah as Ze,ak as ne,ci as et,ai as tt,aP as at,aQ as lt,cr as st,ck as nt,a0 as it}from"./index-d6594e8e.js";import{S as ot}from"./index-4be8cdd9.js";/* empty css */import"./index-154b94da.js";import"./index-68461333.js";import{c as rt,d as dt,F as ut}from"./FileItem-2eb00024.js";import{M as ct,o as pt,L as ft,R as vt,f as mt}from"./MultiSelectKeep-ba3817a4.js";import{c as gt,u as _t}from"./hook-a2b05396.js";import{f as M,H as ie,_ as ht,a as yt}from"./searchHistory-07858f1f.js";import"./numInput.vue_vue_type_style_index_0_scoped_bd954eda_lang-c8c8013d.js";/* empty css */import"./index-cb6a3d31.js";import"./_isIterateeCall-bfd79848.js";import"./index-30b8f89a.js";import"./index-9b184148.js";import"./shortcut-0468cdd7.js";import"./Checkbox-59427a1c.js";import"./index-e620c28b.js";import"./useGenInfoDiff-f63a5430.js";var kt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M952 474H829.8C812.5 327.6 696.4 211.5 550 194.2V72c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v122.2C327.6 211.5 211.5 327.6 194.2 474H72c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h122.2C211.5 696.4 327.6 812.5 474 829.8V952c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V829.8C696.4 812.5 812.5 696.4 829.8 550H952c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8zM512 756c-134.8 0-244-109.2-244-244s109.2-244 244-244 244 109.2 244 244-109.2 244-244 244z"}},{tag:"path",attrs:{d:"M512 392c-32.1 0-62.1 12.4-84.8 35.2-22.7 22.7-35.2 52.7-35.2 84.8s12.5 62.1 35.2 84.8C449.9 619.4 480 632 512 632s62.1-12.5 84.8-35.2C619.4 574.1 632 544 632 512s-12.5-62.1-35.2-84.8A118.57 118.57 0 00512 392z"}}]},name:"aim",theme:"outlined"};const wt=kt;function oe(u){for(var c=1;c=100?"success":c||"normal"}),f=function(){var v=t.showInfo,h=t.format,d=t.type,p=t.percent,g=t.title,y=Ic(t);if(!v)return null;var m,_=h||(a==null?void 0:a.format)||function(b){return"".concat(b,"%")},S=d==="line";return h||a!=null&&a.format||u.value!=="exception"&&u.value!=="success"?m=_(Ui(p),Ui(y)):u.value==="exception"?m=S?_t(VR,null,null):_t(GR,null,null):u.value==="success"&&(m=S?_t(FR,null,null):_t(HR,null,null)),_t("span",{class:"".concat(i.value,"-text"),title:g===void 0&&typeof m=="string"?m:void 0},[m])};return function(){var c=t.type,v=t.steps,h=t.strokeColor,d=t.title,p=f(),g;c==="line"?g=v?_t(AE,Me(Me({},t),{},{strokeColor:typeof h=="string"?h:void 0,prefixCls:i.value,steps:v}),{default:function(){return[p]}}):_t(gE,Me(Me({},t),{},{prefixCls:i.value}),{default:function(){return[p]}}):(c==="circle"||c==="dashboard")&&(g=_t(TE,Me(Me({},t),{},{prefixCls:i.value}),{default:function(){return[p]}}));var y=Me(Me({},s.value),{},pr({},"".concat(i.value,"-status-").concat(u.value),!0));return _t("div",{class:y,title:d},[g])}}}),DE=BA(ME);var LE={small:8,middle:16,large:24},IE=function(){return{prefixCls:String,size:{type:[String,Number,Array]},direction:zl.oneOf(Jl("horizontal","vertical")).def("horizontal"),align:zl.oneOf(Jl("start","end","center","baseline")),wrap:{type:Boolean,default:void 0}}};function PE(r){return typeof r=="string"?LE[r]:r||0}var kE=Kn({compatConfig:{MODE:3},name:"ASpace",props:IE(),slots:["split"],setup:function(t,e){var a=e.slots,n=NA("space",t),i=n.prefixCls,o=n.space,s=n.direction,l=lE(),u=zt(function(){var g,y,m;return(g=(y=t.size)!==null&&y!==void 0?y:(m=o.value)===null||m===void 0?void 0:m.size)!==null&&g!==void 0?g:"small"}),f=$t(),c=$t();fs(u,function(){var g=(Array.isArray(u.value)?u.value:[u.value,u.value]).map(function(m){return PE(m)}),y=OA(g,2);f.value=y[0],c.value=y[1]},{immediate:!0});var v=zt(function(){return t.align===void 0&&t.direction==="horizontal"?"center":t.align}),h=zt(function(){var g;return WR(i.value,"".concat(i.value,"-").concat(t.direction),(g={},pr(g,"".concat(i.value,"-rtl"),s.value==="rtl"),pr(g,"".concat(i.value,"-align-").concat(v.value),v.value),g))}),d=zt(function(){return s.value==="rtl"?"marginLeft":"marginRight"}),p=zt(function(){var g={};return l.value&&(g.columnGap="".concat(f.value,"px"),g.rowGap="".concat(c.value,"px")),Me(Me({},g),t.wrap&&{flexWrap:"wrap",marginBottom:"".concat(-c.value,"px")})});return function(){var g,y,m=t.wrap,_=t.direction,S=_===void 0?"horizontal":_,b=(g=a.default)===null||g===void 0?void 0:g.call(a),x=$R(b),w=x.length;if(w===0)return null;var T=(y=a.split)===null||y===void 0?void 0:y.call(a),C="".concat(i.value,"-item"),M=f.value,D=w-1;return _t("div",{class:h.value,style:p.value},[x.map(function(I,L){var k=b.indexOf(I),R={};return l.value||(S==="vertical"?L1&&a&&a.length>1){var i=Q_(a)/Q_(n);!isFinite(i)&&(i=1),t.pinchScale=i;var o=gO(a);return t.pinchX=o[0],t.pinchY=o[1],{type:"pinch",target:r[0].target,event:t}}}}};function Oe(){return[1,0,0,1,0,0]}function Hv(r){return r[0]=1,r[1]=0,r[2]=0,r[3]=1,r[4]=0,r[5]=0,r}function Wv(r,t){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=t[3],r[4]=t[4],r[5]=t[5],r}function Aa(r,t,e){var a=t[0]*e[0]+t[2]*e[1],n=t[1]*e[0]+t[3]*e[1],i=t[0]*e[2]+t[2]*e[3],o=t[1]*e[2]+t[3]*e[3],s=t[0]*e[4]+t[2]*e[5]+t[4],l=t[1]*e[4]+t[3]*e[5]+t[5];return r[0]=a,r[1]=n,r[2]=i,r[3]=o,r[4]=s,r[5]=l,r}function Pa(r,t,e){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=t[3],r[4]=t[4]+e[0],r[5]=t[5]+e[1],r}function jn(r,t,e,a){a===void 0&&(a=[0,0]);var n=t[0],i=t[2],o=t[4],s=t[1],l=t[3],u=t[5],f=Math.sin(e),c=Math.cos(e);return r[0]=n*c+s*f,r[1]=-n*f+s*c,r[2]=i*c+l*f,r[3]=-i*f+c*l,r[4]=c*(o-a[0])+f*(u-a[1])+a[0],r[5]=c*(u-a[1])-f*(o-a[0])+a[1],r}function bm(r,t,e){var a=e[0],n=e[1];return r[0]=t[0]*a,r[1]=t[1]*n,r[2]=t[2]*a,r[3]=t[3]*n,r[4]=t[4]*a,r[5]=t[5]*n,r}function Qr(r,t){var e=t[0],a=t[2],n=t[4],i=t[1],o=t[3],s=t[5],l=e*o-i*a;return l?(l=1/l,r[0]=o*l,r[1]=-i*l,r[2]=-a*l,r[3]=e*l,r[4]=(a*s-o*n)*l,r[5]=(i*n-e*s)*l,r):null}function yO(r){var t=Oe();return Wv(t,r),t}var mO=function(){function r(t,e){this.x=t||0,this.y=e||0}return r.prototype.copy=function(t){return this.x=t.x,this.y=t.y,this},r.prototype.clone=function(){return new r(this.x,this.y)},r.prototype.set=function(t,e){return this.x=t,this.y=e,this},r.prototype.equal=function(t){return t.x===this.x&&t.y===this.y},r.prototype.add=function(t){return this.x+=t.x,this.y+=t.y,this},r.prototype.scale=function(t){this.x*=t,this.y*=t},r.prototype.scaleAndAdd=function(t,e){this.x+=t.x*e,this.y+=t.y*e},r.prototype.sub=function(t){return this.x-=t.x,this.y-=t.y,this},r.prototype.dot=function(t){return this.x*t.x+this.y*t.y},r.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},r.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},r.prototype.normalize=function(){var t=this.len();return this.x/=t,this.y/=t,this},r.prototype.distance=function(t){var e=this.x-t.x,a=this.y-t.y;return Math.sqrt(e*e+a*a)},r.prototype.distanceSquare=function(t){var e=this.x-t.x,a=this.y-t.y;return e*e+a*a},r.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},r.prototype.transform=function(t){if(t){var e=this.x,a=this.y;return this.x=t[0]*e+t[2]*a+t[4],this.y=t[1]*e+t[3]*a+t[5],this}},r.prototype.toArray=function(t){return t[0]=this.x,t[1]=this.y,t},r.prototype.fromArray=function(t){this.x=t[0],this.y=t[1]},r.set=function(t,e,a){t.x=e,t.y=a},r.copy=function(t,e){t.x=e.x,t.y=e.y},r.len=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},r.lenSquare=function(t){return t.x*t.x+t.y*t.y},r.dot=function(t,e){return t.x*e.x+t.y*e.y},r.add=function(t,e,a){t.x=e.x+a.x,t.y=e.y+a.y},r.sub=function(t,e,a){t.x=e.x-a.x,t.y=e.y-a.y},r.scale=function(t,e,a){t.x=e.x*a,t.y=e.y*a},r.scaleAndAdd=function(t,e,a,n){t.x=e.x+a.x*n,t.y=e.y+a.y*n},r.lerp=function(t,e,a,n){var i=1-n;t.x=i*e.x+n*a.x,t.y=i*e.y+n*a.y},r}();const ct=mO;var zi=Math.min,as=Math.max,vg=Math.abs,t1=["x","y"],_O=["width","height"],ei=new ct,ri=new ct,ai=new ct,ni=new ct,dr=iM(),Cl=dr.minTv,hg=dr.maxTv,Gl=[0,0],wm=function(){function r(t,e,a,n){r.set(this,t,e,a,n)}return r.set=function(t,e,a,n,i){return n<0&&(e=e+n,n=-n),i<0&&(a=a+i,i=-i),t.x=e,t.y=a,t.width=n,t.height=i,t},r.prototype.union=function(t){var e=zi(t.x,this.x),a=zi(t.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=as(t.x+t.width,this.x+this.width)-e:this.width=t.width,isFinite(this.y)&&isFinite(this.height)?this.height=as(t.y+t.height,this.y+this.height)-a:this.height=t.height,this.x=e,this.y=a},r.prototype.applyTransform=function(t){r.applyTransform(this,this,t)},r.prototype.calculateTransform=function(t){var e=this,a=t.width/e.width,n=t.height/e.height,i=Oe();return Pa(i,i,[-e.x,-e.y]),bm(i,i,[a,n]),Pa(i,i,[t.x,t.y]),i},r.prototype.intersect=function(t,e,a){return r.intersect(this,t,e,a)},r.intersect=function(t,e,a,n){a&&ct.set(a,0,0);var i=n&&n.outIntersectRect||null,o=n&&n.clamp;if(i&&(i.x=i.y=i.width=i.height=NaN),!t||!e)return!1;t instanceof r||(t=r.set(SO,t.x,t.y,t.width,t.height)),e instanceof r||(e=r.set(xO,e.x,e.y,e.width,e.height));var s=!!a;dr.reset(n,s);var l=dr.touchThreshold,u=t.x+l,f=t.x+t.width-l,c=t.y+l,v=t.y+t.height-l,h=e.x+l,d=e.x+e.width-l,p=e.y+l,g=e.y+e.height-l;if(u>f||c>v||h>d||p>g)return!1;var y=!(f0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=n,l+=n}else{for(s=n+1;ls&&(l=s);var u=o;o=n-l,l=n-u}for(o++;os&&(l=s);var u=o;o=n-l,l=n-u}else{for(s=a-n;l=0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=n,l+=n}for(o++;oe);f++);f=v(f-1,s-2)}d=o[f+1],h=o[f]}if(h&&d){this._lastFr=f,this._lastFrP=e;var g=d.percent-h.percent,y=g===0?1:v((e-h.percent)/g,1);d.easingFunc&&(y=d.easingFunc(y));var m=a?this._additiveValue:u?qs:t[l];if((Qu(i)||u)&&!m&&(m=this._additiveValue=[]),this.discrete)t[l]=y<1?h.rawValue:d.rawValue;else if(Qu(i))i===hc?Nh(m,h[n],d[n],y):jO(m,h[n],d[n],y);else if(d1(i)){var _=h[n],S=d[n],b=i===bg;t[l]={type:b?"linear":"radial",x:Ha(_.x,S.x,y),y:Ha(_.y,S.y,y),colorStops:Y(_.colorStops,function(w,T){var C=S.colorStops[T];return{offset:Ha(w.offset,C.offset,y),color:vc(Nh([],w.color,C.color,y))}}),global:S.global},b?(t[l].x2=Ha(_.x2,S.x2,y),t[l].y2=Ha(_.y2,S.y2,y)):t[l].r=Ha(_.r,S.r,y)}else if(u)Nh(m,h[n],d[n],y),a||(t[l]=vc(m));else{var x=Ha(h[n],d[n],y);a?this._additiveValue=x:t[l]=x}a&&this._addToTarget(t)}}},r.prototype._addToTarget=function(t){var e=this.valType,a=this.propName,n=this._additiveValue;e===Ju?t[a]=t[a]+n:e===Ml?(lr(t[a],qs),ju(qs,qs,n,1),t[a]=vc(qs)):e===hc?ju(t[a],t[a],n,1):e===AM&&v1(t[a],t[a],n,1)},r}(),Am=function(){function r(t,e,a,n){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=t,this._loop=e,e&&n){ym("Can' use additive animation on looped animation.");return}this._additiveAnimators=n,this._allowDiscrete=a}return r.prototype.getMaxTime=function(){return this._maxTime},r.prototype.getDelay=function(){return this._delay},r.prototype.getLoop=function(){return this._loop},r.prototype.getTarget=function(){return this._target},r.prototype.changeTarget=function(t){this._target=t},r.prototype.when=function(t,e,a){return this.whenWithKeys(t,e,It(e),a)},r.prototype.whenWithKeys=function(t,e,a,n){for(var i=this._tracks,o=0;o