1(self["webpackChunksanyue_imghub"]=self["webpackChunksanyue_imghub"]||[]).push([[403],{200:function(e,t,o){"use strict";o(5331)},213:function(e,t,o){"use strict";o(5331),o(9104)},333:function(e,t,o){"use strict";o(5331),o(6711)},670:function(e,t,o){"use strict";o(5331),o(9648),o(9104),o(5970)},694:function(e,t,o){"use strict";o(5331)},797:function(e,t,o){"use strict";o.d(t,{A:function(){return a}});o(4114),o(4979);var s=o(5507),l=o(1219),i=o(6915);async function a(e,t={}){const o=s.A.getters.credentials||btoa("unset:unset");t.headers={...t.headers,Authorization:`Basic ${o}`},t.credentials="include";const a=await fetch(e,t);return 401===a.status&&(l.nk.error("认è¯ç¶æé误ï¼è¯·éæ°ç»å½"),i.A.push("/adminLogin")),a}},1393:function(e,t,o){o(6573),o(8100),o(7936),o(9577),o(1549),o(9797),o(9631),o(5623),o(4979),o(4603),o(7566),o(8721),function(t,o){e.exports=o()}(0,function(){return function(e){var t={};function o(s){if(t[s])return t[s].exports;var l=t[s]={i:s,l:!1,exports:{}};return e[s].call(l.exports,l,l.exports,o),l.l=!0,l.exports}return o.m=e,o.c=t,o.d=function(e,t,s){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:s})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var s=Object.create(null);if(o.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var l in e)o.d(s,l,function(t){return e[t]}.bind(null,l));return s},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=0)}([function(e,t,o){"use strict";var s;function l(e){return["image/png","image/jpeg","image/gif"].some(t=>t===e)}o.r(t),o.d(t,"canvastoDataURL",function(){return a}),o.d(t,"canvastoFile",function(){return n}),o.d(t,"dataURLtoFile",function(){return d}),o.d(t,"dataURLtoImage",function(){return c}),o.d(t,"downloadFile",function(){return u}),o.d(t,"filetoDataURL",function(){return p}),o.d(t,"imagetoCanvas",function(){return m}),o.d(t,"urltoBlob",function(){return f}),o.d(t,"urltoImage",function(){return g}),o.d(t,"compress",function(){return b}),o.d(t,"compressAccurately",function(){return C}),o.d(t,"EImageType",function(){return s}),function(e){e.PNG="image/png",e.JPEG="image/jpeg",e.GIF="image/gif"}(s||(s={}));var i=function(e,t,o,s){return new(o||(o=Promise))(function(l,i){function a(e){try{r(s.next(e))}catch(e){i(e)}}function n(e){try{r(s.throw(e))}catch(e){i(e)}}function r(e){var t;e.done?l(e.value):(t=e.value,t instanceof o?t:new o(function(e){e(t)})).then(a,n)}r((s=s.apply(e,t||[])).next())})};function a(e,t=.92,o=s.JPEG){return i(this,void 0,void 0,function*(){return l(o)||(o=s.JPEG),e.toDataURL(o,t)})}function n(e,t=.92,o=s.JPEG){return new Promise(s=>e.toBlob(e=>s(e),o,t))}var r=function(e,t,o,s){return new(o||(o=Promise))(function(l,i){function a(e){try{r(s.next(e))}catch(e){i(e)}}function n(e){try{r(s.throw(e))}catch(e){i(e)}}function r(e){var t;e.done?l(e.value):(t=e.value,t instanceof o?t:new o(function(e){e(t)})).then(a,n)}r((s=s.apply(e,t||[])).next())})};function d(e,t){return r(this,void 0,void 0,function*(){const o=e.split(",");let s=o[0].match(/:(.*?);/)[1];const i=atob(o[1]);let a=i.length;const n=new Uint8Array(a);for(;a--;)n[a]=i.charCodeAt(a);return l(t)&&(s=t),new Blob([n],{type:s})})}function c(e){return new Promise((t,o)=>{const s=new Image;s.onload=()=>t(s),s.onerror=()=>o(new Error("dataURLtoImage(): dataURL is illegal")),s.src=e})}function u(e,t){const o=document.createElement("a");o.href=window.URL.createObjectURL(e),o.download=t||Date.now().toString(36),document.body.appendChild(o);const s=document.createEvent("MouseEvents");s.initEvent("click",!1,!1),o.dispatchEvent(s),document.body.removeChild(o)}function p(e){return new Promise(t=>{const o=new FileReader;o.onloadend=e=>t(e.target.result),o.readAsDataURL(e)})}var h=function(e,t,o,s){return new(o||(o=Promise))(function(l,i){function a(e){try{r(s.next(e))}catch(e){i(e)}}function n(e){try{r(s.throw(e))}catch(e){i(e)}}function r(e){var t;e.done?l(e.value):(t=e.value,t instanceof o?t:new o(function(e){e(t)})).then(a,n)}r((s=s.apply(e,t||[])).next())})};function m(e,t={}){return h(this,void 0,void 0,function*(){const o=Object.assign({},t),s=document.createElement("canvas"),l=s.getContext("2d");let i,a;for(const e in o)Object.prototype.hasOwnProperty.call(o,e)&&(o[e]=Number(o[e]));if(o.scale){const t=o.scale>0&&o.scale<10?o.scale:1;a=e.width*t,i=e.height*t}else a=o.width||o.height*e.width/e.height||e.width,i=o.height||o.width*e.height/e.width||e.height;switch([5,6,7,8].some(e=>e===o.orientation)?(s.height=a,s.width=i):(s.height=i,s.width=a),o.orientation){case 3:l.rotate(180*Math.PI/180),l.drawImage(e,-s.width,-s.height,s.width,s.height);break;case 6:l.rotate(90*Math.PI/180),l.drawImage(e,0,-s.width,s.height,s.width);break;case 8:l.rotate(270*Math.PI/180),l.drawImage(e,-s.height,0,s.height,s.width);break;case 2:l.translate(s.width,0),l.scale(-1,1),l.drawImage(e,0,0,s.width,s.height);break;case 4:l.translate(s.width,0),l.scale(-1,1),l.rotate(180*Math.PI/180),l.drawImage(e,-s.width,-s.height,s.width,s.height);break;case 5:l.translate(s.width,0),l.scale(-1,1),l.rotate(90*Math.PI/180),l.drawImage(e,0,-s.width,s.height,s.width);break;case 7:l.translate(s.width,0),l.scale(-1,1),l.rotate(270*Math.PI/180),l.drawImage(e,-s.height,0,s.height,s.width);break;default:l.drawImage(e,0,0,s.width,s.height)}return s})}function f(e){return fetch(e).then(e=>e.blob())}function g(e){return new Promise((t,o)=>{const s=new Image;s.onload=()=>t(s),s.onerror=()=>o(new Error("urltoImage(): Image failed to load, please check the image URL")),s.src=e})}var y=function(e,t,o,s){return new(o||(o=Promise))(function(l,i){function a(e){try{r(s.next(e))}catch(e){i(e)}}function n(e){try{r(s.throw(e))}catch(e){i(e)}}function r(e){var t;e.done?l(e.value):(t=e.value,t instanceof o?t:new o(function(e){e(t)})).then(a,n)}r((s=s.apply(e,t||[])).next())})};function b(e,t={}){return y(this,void 0,void 0,function*(){if(!(e instanceof Blob))throw new Error("compress(): First arg must be a Blob object or a File object.");if("object"!=typeof t&&(t=Object.assign({quality:t})),t.quality=Number(t.quality),Number.isNaN(t.quality))return e;const o=yield p(e);let i=o.split(",")[0].match(/:(.*?);/)[1],n=s.JPEG;l(t.type)&&(n=t.type,i=t.type);const r=yield c(o),u=yield m(r,Object.assign({},t)),h=yield a(u,t.quality,n),f=yield d(h,i);return f.size>e.size?e:f})}function C(e,t={}){return y(this,void 0,void 0,function*(){if(!(e instanceof Blob))throw new Error("compressAccurately(): First arg must be a Blob object or a File object.");if("object"!=typeof t&&(t=Object.assign({size:t})),t.size=Number(t.size),Number.isNaN(t.size))return e;if(1024*t.size>e.size)return e;t.accuracy=Number(t.accuracy),(!t.accuracy||t.accuracy<.8||t.accuracy>.99)&&(t.accuracy=.95);const o=t.size*(2-t.accuracy)*1024,i=1024*t.size,n=t.size*t.accuracy*1024,r=yield p(e);let u=r.split(",")[0].match(/:(.*?);/)[1],h=s.JPEG;l(t.type)&&(h=t.type,u=t.type);const f=yield c(r),g=yield m(f,Object.assign({},t));let y,b=.5;const C=[null,null];for(let e=1;e<=7;e++){y=yield a(g,b,h);const t=.75*y.length;if(7===e){(o<t||n>t)&&(y=[y,...C].filter(e=>e).sort((e,t)=>
1Math.abs(.75*e.length-i)-Math.abs(.75*t.length-i))[0]);break}if(o<t)C[1]=y,b-=Math.pow(.5,e+1);else{if(!(n>t))break;C[0]=y,b+=Math.pow(.5,e+1)}}const k=yield d(y,u);return k.size>e.size?e:k})}}])})},2224:function(e,t,o){"use strict";o.d(t,{A:function(){return T}});var s=o(9114),l=(o(5331),o(694),o(9385)),i=(o(7952),o(650)),a=(o(9104),o(1802)),n=(o(3378),o(47)),r=(o(9648),o(6768)),d=o(5130),c=o(4232);const u={class:"directory-tree-picker"},p={class:"tree-container"},h={key:0,class:"error-state"},m={class:"error-text"},f={class:"node-label"},g={class:"tree-container"},y={key:0,class:"error-state"},b={class:"error-text"},C={class:"node-label"};function k(e,t,o,k,v,w){const F=(0,r.g2)("font-awesome-icon"),L=n.S2,U=a.qk,T=i.Vc,S=l.pw,$=s.A;return(0,r.uX)(),(0,r.CE)("div",u,[w.isDesktop?((0,r.uX)(),(0,r.Wv)(T,{key:0,visible:v.popoverVisible,"onUpdate:visible":t[1]||(t[1]=e=>v.popoverVisible=e),placement:"bottom-start",width:320,trigger:"click","popper-class":"directory-tree-popover","show-arrow":!0,"hide-after":0,"show-after":50,transition:"el-zoom-in-top"},{reference:(0,r.k6)(()=>[(0,r.Lk)("span",{class:"popover-trigger-wrapper",onClick:t[0]||(t[0]=(0,d.D$)(()=>{},["stop"]))},[(0,r.RG)(e.$slots,"trigger",{},void 0,!0)])]),default:(0,r.k6)(()=>[(0,r.bo)(((0,r.uX)(),(0,r.CE)("div",p,[v.error?((0,r.uX)(),(0,r.CE)("div",h,[(0,r.bF)(F,{icon:"exclamation-circle",class:"error-icon"}),(0,r.Lk)("span",m,(0,c.v_)(v.error),1),(0,r.bF)(L,{type:"primary",size:"small",onClick:w.fetchDirectoryTree},{default:(0,r.k6)(()=>[...t[4]||(t[4]=[(0,r.eW)(" éè¯ ",-1)])]),_:1},8,["onClick"])])):((0,r.uX)(),(0,r.Wv)(U,{key:1,ref:"treeRef",data:v.treeData,props:v.treeProps,"node-key":"path","default-expand-all":!1,"expand-on-click-node":!1,"highlight-current":!0,"current-node-key":o.currentDirectory,class:"directory-tree",onNodeClick:w.handleNodeClick},{default:(0,r.k6)(({node:e,data:t})=>[(0,r.Lk)("span",{class:(0,c.C4)(["tree-node",{"is-current":t.path===o.currentDirectory}])},[(0,r.bF)(F,{icon:e.expanded?"folder-open":"folder",class:"folder-icon"},null,8,["icon"]),(0,r.Lk)("span",f,(0,c.v_)(t.name),1)],2)]),_:1},8,["data","props","current-node-key","onNodeClick"]))])),[[$,v.loading]])]),_:3},8,["visible"])):((0,r.uX)(),(0,r.CE)(r.FK,{key:1},[(0,r.Lk)("span",{class:"drawer-trigger-wrapper",onClick:t[2]||(t[2]=(...e)=>w.openDrawer&&w.openDrawer(...e))},[(0,r.RG)(e.$slots,"trigger",{},void 0,!0)]),(0,r.bF)(S,{modelValue:v.drawerVisible,"onUpdate:modelValue":t[3]||(t[3]=e=>v.drawerVisible=e),direction:"btt",size:"60%","show-close":!0,"with-header":!0,"z-index":3e3,title:"éæ©ç®å½",class:"directory-tree-drawer"},{default:(0,r.k6)(()=>[(0,r.bo)(((0,r.uX)(),(0,r.CE)("div",g,[v.error?((0,r.uX)(),(0,r.CE)("div",y,[(0,r.bF)(F,{icon:"exclamation-circle",class:"error-icon"}),(0,r.Lk)("span",b,(0,c.v_)(v.error),1),(0,r.bF)(L,{type:"primary",size:"small",onClick:w.fetchDirectoryTree},{default:(0,r.k6)(()=>[...t[5]||(t[5]=[(0,r.eW)(" éè¯ ",-1)])]),_:1},8,["onClick"])])):((0,r.uX)(),(0,r.Wv)(U,{key:1,ref:"treeRefMobile",data:v.treeData,props:v.treeProps,"node-key":"path","default-expand-all":!1,"expand-on-click-node":!1,"highlight-current":!0,"current-node-key":o.currentDirectory,class:"directory-tree mobile-tree",onNodeClick:w.handleNodeClick},{default:(0,r.k6)(({node:e,data:t})=>[(0,r.Lk)("span",{class:(0,c.C4)(["tree-node",{"is-current":t.path===o.currentDirectory}])},[(0,r.bF)(F,{icon:e.expanded?"folder-open":"folder",class:"folder-icon"},null,8,["icon"]),(0,r.Lk)("span",C,(0,c.v_)(t.name),1)],2)]),_:1},8,["data","props","current-node-key","onNodeClick"]))])),[[$,v.loading]])]),_:1},8,["modelValue"])],64))])}var v=o(457),w=o(797),F={name:"DirectoryTreePicker",props:{currentDirectory:{type:String,default:""},source:{type:String,default:"upload",validator:e=>["upload","admin"].includes(e)}},data(){return{popoverVisible:!1,drawerVisible:!1,treeData:[],loading:!1,error:"",treeProps:{children:"children",label:"name"},windowWidth:window.innerWidth}},computed:{isDesktop(){return this.windowWidth>=769}},watch:{popoverVisible(e){e?this.fetchDirectoryTree():setTimeout(()=>{if(!this.popoverVisible&&this.$refs.treeRef){const e=this.$refs.treeRef.store;
1for(const t in e.nodesMap)e.nodesMap[t].expanded=!1}},200)},drawerVisible(e){e?this.fetchDirectoryTree():setTimeout(()=>{if(!this.drawerVisible&&this.$refs.treeRefMobile){const e=this.$refs.treeRefMobile.store;for(const t in e.nodesMap)e.nodesMap[t].expanded=!1}},300)},currentDirectory(e){this.$nextTick(()=>{this.$refs.treeRef&&e&&this.$refs.treeRef.setCurrentKey(e),this.$refs.treeRefMobile&&e&&this.$refs.treeRefMobile.setCurrentKey(e)})}},mounted(){window.addEventListener("resize",this.handleResize)},beforeUnmount(){window.removeEventListener("resize",this.handleResize)},methods:{handleResize(){this.windowWidth=window.innerWidth},openDrawer(){this.drawerVisible=!0},async fetchDirectoryTree(){this.loading=!0,this.error="";try{let e;if("admin"===this.source){const t=await(0,w.A)("/api/directoryTree",{method:"GET"});if(!t.ok)return void(401===t.status?this.error="认è¯å¤±è´¥ï¼è¯·éæ°ç»å½":this.error="æå¡å¨é误ï¼è¯·ç¨åéè¯");e=await t.json()}else{const t=await v.A.get("/api/directoryTree",{withAuthCode:!0});e=t.data}e.tree?this.treeData=[e.tree]:this.treeData=[]}catch(e){console.error("Failed to fetch directory tree:",e),401===e.response?.status?this.error="认è¯å¤±è´¥ï¼è¯·éæ°ç»å½":this.error="å è½½ç®å½æ 失败ï¼è¯·æ£æ¥ç½ç»è¿æ¥"}finally{this.loading=!1}},handleNodeClick(e){let t=e.path;t&&!t.startsWith("/")?t="/"+t:t||(t="/"),this.$emit("select",t),this.popoverVisible=!1,this.drawerVisible=!1}}},L=o(1241);const U=(0,L.A)(F,[["render",k],["__scopeId","data-v-296c1702"]]);var T=U},2388:function(e,t,o){"use strict";function s(e,{strict:t=!0}={}){if(!e||""===e.trim())return{valid:!0};if("/"===e)return{valid:!0};if(!e.startsWith("/"))return{valid:!1,error:'ç®æ ç®å½å¿
须以 "/" å¼å¤´'};if(/(?:^|\/)\.\.(\/|$)/.test(e)||e.includes(".."))return{valid:!1,error:'ç®æ ç®å½ä¸è½å
å«è·¯å¾ç©¿è¶å符 ".."'};const o=t?/\/\.(\/|$)/:/\/\.\//;if(o.test(e))return{valid:!1,error:'ç®æ ç®å½ä¸è½å
å«åç¬ç "." è·¯å¾æ®µ'};if(e.includes("//"))return{valid:!1,error:"ç®æ ç®å½ä¸è½å
å«è¿ç»çææ "};const s=/[\\:\*\?"'<>\| \(\)\[\]\{\}#%\^`~;@&=\+\$,]/;return s.test(e)?{valid:!1,error:"ç®æ ç®å½å
å«éæ³å符ï¼è¯·ä½¿ç¨åæ³çè·¯å¾æ ¼å¼"}:{valid:!0}}o.d(t,{G:function(){return s}})},2893:function(e,t,o){"use strict";o(5331)},3378:function(e,t,o){"use strict";o(5331),o(8736),o(9899)},3597:function(e,t,o){"use strict";o(5331)},4263:function(e,t,o){"use strict";o.r(t),o.d(t,{default:function(){return no}});var s=o(8507),l=(o(5331),o(213),o(47)),i=(o(9648),o(6768)),a=o(4232);const n={class:"history-header"},r={class:"header-left"},d={class:"record-count"},c={class:"header-right"},u={class:"timeline-header"},p={class:"date-label"},h={key:0,class:"grid-view"},m={class:"grid-preview"},f=["src"],g=["src"],y={key:2,class:"file-icon-wrapper"},b={class:"grid-overlay"},C={class:"grid-actions"},k={class:"grid-info"},v=["title"],w={class:"upload-time"},F={key:1,class:"list-view"},L={class:"list-preview"},U=["src"],T=["src"],S={key:2,class:"file-icon-wrapper-small"},$={class:"list-info"},M=["title"],_=["title"],x={class:"list-meta"},R={class:"upload-time"},E={class:"list-actions"},A={key:0,class:"load-more-container"},D={key:0,class:"loading-indicator"},I={key:1,class:"load-more-hint"},N={key:1,class:"no-more-hint"},P={key:1,class:"empty-state"};function W(e,t,o,W,V,z){const B=(0,i.g2)("font-awesome-icon"),H=l.S2,X=s.R7;return(0,i.uX)(),(0,i.CE)("div",{class:(0,a.C4)(["history-container",{active:o.show}])},[(0,i.Lk)("div",n,[(0,i.Lk)("div",r,[t[4]||(t[4]=(0,i.Lk)("h2",null,"åå²è®°å½",-1)),(0,i.Lk)("span",d,"å
± "+(0,a.v_)(V.totalCount)+" æ¡",1)]),(0,i.Lk)("div",c,[(0,i.bF)(X,{content:"忢è§å¾",placement:"bottom"},{default:(0,i.k6)(()=>[(0,i.bF)(H,{circle:"",onClick:z.toggleViewMode},{default:(0,i.k6)(()=>[(0,i.bF)(B,{icon:"grid"===V.viewMode?"list":"th-large"},null,8,["icon"])]),_:1},8,["onClick"])]),_:1}),(0,i.bF)(X,{content:"æ¸
空记å½",placement:"bottom"},{default:(0,i.k6)(()=>[(0,i.bF)(H,{circle:"",type:"danger",onClick:z.clearHistory},{default:(0,i.k6)(()=>[(0,i.bF)(B,{icon:"trash-alt"})]),_:1},8,["onClick"])]),_:1}),(0,i.bF)(H,{circle:"",onClick:t[0]||(t[0]=t=>e.$emit("close"))},{default:(0,i.k6)(()=>[(0,i.bF)(B,{icon:"times"})]),_:1})])]),V.historyList.length>0?((0,i.uX)(),(0,i.CE)("div",{key:0,class:"history-content",ref:"historyContent",onScroll:t[3]||(t[3]=(...e)=>z.handleScroll&&z.handleScroll(...e))},[((0,i.uX)(!0),(0,i.CE)(i.FK,null,(0,i.pI)(z.groupedHistory,e=>((0,i.uX)(),(0,i.CE)("div",{key:e.date,class:"history-group"},[(0,i.Lk)("div",u,[t[5]||(t[5]=(0,i.Lk)("div",{class:"timeline-dot"},null,-1)),(0,i.Lk)("span",p,(0,a.v_)(e.date),1)]),"grid"===V.viewMode?((0,i.uX)(),(0,i.CE)("div",h,[((0,i.uX)(!0),(0,i.CE)(i.FK,null,(0,i.pI)(e.items,e=>((0,i.uX)(),(0,i.CE)("div",{key:e.time,class:"grid-item"},[(0,i.Lk)("div",m,[z.isImage(e.name)?((0,i.uX)(),(0,i.CE)("img",{key:0,src:e.url,loading:"lazy",onError:t[1]||(t[1]=(...e)=>z.handleImageError&&z.handleImageError(...e))},null,40,f)):z.isVideo(e.name)?((0,i.uX)(),(0,i.CE)("video",{key:1,src:e.url,muted:""},null,8,g)):((0,i.uX)(),(0,i.CE)("div",y,[(0,i.bF)(B,{icon:"file",class:"file-icon"})])),(0,i.Lk)("div",b,[(0,i.Lk)("div",C,[(0,i.bF)(H,{circle:"",size:"default",type:"primary",onClick:t=>z.copyLink(e.url)},{default:(0,i.k6)(()=>[(0,i.bF)(B,{icon:"copy"})]),_:1},8,["onClick"]),(0,i.bF)(H,{circle:"",size:"default",class:"action-btn-view",onClick:t=>z.openLink(e.url)},{default:(0,i.k6)(()=>[(0,i.bF)(B,{icon:"external-link-alt"})]),_:1},8,["onClick"]),(0,i.bF)(H,{circle:"",size:"default",type:"danger",onClick:t=>z.deleteItem(e)},{default:(0,i.k6)(()=>[(0,i.bF)(B,{icon:"trash-alt"})]),_:1},8,["onClick"])])])]),(0,i.Lk)("div",k,[(0,i.Lk)("div",{class:"file-name",title:e.name},(0,a.v_)(e.name),9,v),(0,i.Lk)("div",w,(0,a.v_)(z.formatTime(e.time)),1)])]))),128))])):((0,i.uX)(),(0,i.CE)("div",F,[((0,i.uX)(!0),(0,i.CE)(i.FK,null,(0,i.pI)(e.items,e=>((0,i.uX)(),(0,i.CE)("div",{key:e.time,class:"list-item"},[(0,i.Lk)("div",L,[z.isImage(e.name)?((0,i.uX)(),(0,i.CE)("img",{key:0,src:e.url,loading:"lazy",onError:t[2]||(t[2]=(...e)=>z.handleImageError&&z.handleImageError(...e))},null,40,U)):z.isVideo(e.name)?((0,i.uX)(),(0,i.CE)("video",{key:1,src:e.url,muted:""},null,8,T)):((0,i.uX)(),(0,i.CE)("div",S,[(0,i.bF)(B,{icon:"file"})]))]),(0,i.Lk)("div",$,[(0,i.Lk)("div",{class:"file-name",title:e.name},(0,a.v_)(e.name),9,M),(0,i.Lk)("div",{class:"file-url",title:e.url},(0,a.v_)(e.url),9,_)]),(0,i.Lk)("div",x,[(0,i.Lk)("div",R,(0,a.v_)(z.formatTime(e.time)),1)]),(0,i.Lk)("div",E,[(0,i.bF)(H,{circle:"",size:"small",type:"primary",onClick:t=>z.copyLink(e.url)},{default:(0,i.k6)(()=>[(0,i.bF)(B,{icon:"copy"})]),_:1},8,["onClick"]),(0,i.bF)(H,{circle:"",size:"small",class:"action-btn-view",onClick:t=>z.openLink(e.url)},{default:(0,i.k6)(()=>[(0,i.bF)(B,{icon:"external-link-alt"})]),_:1},8,["onClick"]),(0,i.bF)(H,{circle:"",size:"small",type:"danger",onClick:t=>z.deleteItem(e)},{default:(0,i.k6)(()=>[(0,i.bF)(B,{icon:"trash-alt"})]),_:1},8,["onClick"])])]))),128))]))]))),128)),z.hasMore?((0,i.uX)(),(0,i.CE)("div",A,[V.loadingMore?((0,i.uX)(),(0,i.CE)("div",D,[(0,i.bF)(B,{icon:"spinner",spin:""}),t[6]||(t[6]=(0,i.Lk)("span",null,"å è½½ä¸...",-1))])):((0,i.uX)(),(0,i.CE)("div",I,"䏿å è½½æ´å¤"))])):V.historyList.length>0?((0,i.uX)(),(0,i.CE)("div",N,"æ²¡ææ´å¤è®°å½äº")):(0,i.Q3)("",!0)],544)):((0,i.uX)(),(0,i.CE)("div",P,[(0,i.bF)(B,{icon:"history",class:"empty-icon"}
1),t[7]||(t[7]=(0,i.Lk)("p",null,"ææ ä¸ä¼ è®°å½",-1))]))],2)}o(4114),o(8111),o(2489),o(7588),o(1701),o(3110),o(8335);var V={name:"UploadHistory",props:{show:{type:Boolean,default:!1}},data(){return{historyList:[],allHistory:[],viewMode:"grid",pageSize:30,currentPage:0,loadingMore:!1,totalCount:0}},watch:{show(e){e&&this.resetAndLoad()}},computed:{hasMore(){return this.historyList.length<this.totalCount},groupedHistory(){const e={};return this.historyList.forEach(t=>{const o=new Date(t.time),s=`${o.getFullYear()}-${String(o.getMonth()+1).padStart(2,"0")}-${String(o.getDate()).padStart(2,"0")}`;e[s]||(e[s]=[]),e[s].push(t)}),Object.keys(e).sort((e,t)=>new Date(t)-new Date(e)).map(t=>({date:t,items:e[t]}))}},mounted(){const e=localStorage.getItem("historyViewMode");e&&(this.viewMode=e)},methods:{resetAndLoad(){this.historyList=[],this.currentPage=0,this.loadAllHistory(),this.loadMore()},loadAllHistory(){try{const e=JSON.parse(localStorage.getItem("uploadHistory")||"[]");this.allHistory=e.sort((e,t)=>t.time-e.time),this.totalCount=this.allHistory.length}catch(e){console.error("Failed to load history",e),this.allHistory=[],this.totalCount=0}},loadMore(){!this.loadingMore&&this.hasMore&&(this.loadingMore=!0,setTimeout(()=>{const e=this.currentPage*this.pageSize,t=e+this.pageSize,o=this.allHistory.slice(e,t);this.historyList=[...this.historyList,...o],this.currentPage++,this.loadingMore=!1},50))},handleScroll(e){const t=e.target,o=t.scrollTop,s=t.scrollHeight,l=t.clientHeight;s-o-l<100&&this.loadMore()},toggleViewMode(){this.viewMode="grid"===this.viewMode?"list":"grid",localStorage.setItem("historyViewMode",this.viewMode)},clearHistory(){this.$confirm("ç¡®å®è¦æ¸
空ææä¸ä¼ è®°å½åï¼","æç¤º",{confirmButtonText:"ç¡®å®",cancelButtonText:"åæ¶",type:"warning"}).then(()=>{this.historyList=[],this.allHistory=[],this.totalCount=0,this.currentPage=0,localStorage.removeItem("uploadHistory"),this.$message.success("è®°å½å·²æ¸
空")}).catch(()=>{})},deleteItem(e){this.$confirm("ç¡®å®è¦å é¤è¿æ¡è®°å½åï¼","æç¤º",{confirmButtonText:"ç¡®å®",cancelButtonText:"åæ¶",type:"warning"}).then(()=>{this.historyList=this.historyList.filter(t=>t.time!==e.time),this.allHistory=this.allHistory.filter(t=>t.time!==e.time),this.totalCount=this.allHistory.length;try{localStorage.setItem("uploadHistory",JSON.stringify(this.allHistory)),this.$message.success("è®°å½å·²å é¤")}catch(t){console.error("Failed to update history",t)}}).catch(()=>{})},isImage(e){const t=["jpg","jpeg","png","gif","bmp","webp","svg","tiff","ico","avif","heic","jfif","pjpeg","pjp"],o=e?e.split(".").pop().toLowerCase():"";return t.includes(o)},isVideo(e){const t=["mp4","webm","ogg","mkv"],o=e?e.split(".").pop().toLowerCase():"";return t.includes(o)},formatTime(e){const t=new Date(e),o=t.getFullYear(),s=String(t.getMonth()+1).padStart(2,"0"),l=String(t.getDate()).padStart(2,"0"),i=String(t.getHours()).padStart(2,"0"),a=String(t.getMinutes()).padStart(2,"0"),n=String(t.getSeconds()).padStart(2,"0");return`${o}-${s}-${l} ${i}:${a}:${n}`},copyLink(e){navigator.clipboard.writeText(e).then(()=>{this.$message.success("龿¥å·²å¤å¶")}).catch(()=>{this.$message.error("å¤å¶å¤±è´¥")})},openLink(e){window.open(e,"_blank")},handleImageError(e){e.target.src=o(6682)}}},z=o(1241);const B=(0,z.A)(V,[["render",W],["__scopeId","data-v-05a2ac54"]]);var H=B,X=o(6975),Q=o(9267),j=(o(5616),o(1418)),O=(o(333),o(4757)),q=o(5558),G=(o(8075),o(9623)),K=(o(6711),o(6018)),J=(o(6808),o(200),o(6810));o(4396),o(4885);const Y={class:"dialog-section"},Z={class:"section-content"},ee={class:"setting-item"},te={key:0,class:"setting-item"},oe={class:"setting-label"},se={class:"setting-item"},le={class:"setting-item"},ie={class:"setting-label"},ae={class:"dialog-section"},ne={class:"section-content"},re={class:"dialog-section"},de={class:"section-header"},ce={class:"section-content"},ue={class:"setting-item"},pe={class:"setting-label"},he={class:"setting-item"},me={key:0,class:"setting-item slider-item"},fe={class:"setting-label"},ge={class:"slider-wrapper"},ye={class:"slider-input-wrapper"},be={key:1,class:"setting-item slider-item"},Ce={class:"setting-label"},ke={class:"slider-wrapper"},ve={class:"slider-input-wrapper"},we={key:0,class:"dialog-section"},Fe={class:"section-header"},Le={class:"section-content"},Ue={class:"setting-item"},Te={class:"dialog-action"};function Se(e,t,o,a,n,r){const d=(0,i.g2)("font-awesome-icon"),c=J.ll,u=J.MQ,p=s.R7,h=K.P9,m=K.AV,f=G.WK,g=q.qi,y=O.B8,b=j.lq,C=l.S2,k=Q.kZ;return(0,i.uX)(),(0,i.Wv)(k,{title:"ä¸ä¼ 设置",modelValue:r.visible,"onUpdate:modelValue":t[12]||(t[12]=e=>r.visible=e),width:r.dialogWidth,"show-close":!1,class:"settings-dialog"},{default:(0,i.k6)(()=>[(0,i.Lk)("div",Y,[t[22]||(t[22]=(0,i.Lk)("div",{class:"section-header"},[(0,i.Lk)("span",{class:"section-title"},"ä¸ä¼ æ¸ é")],-1)),(0,i.Lk)("div",Z,[(0,i.Lk)("div",ee,[t[18]||(t[18]=(0,i.Lk)("span",{class:"setting-label"},"æ¸ éç±»å",-1)),(0,i.bF)(u,{"model-value":o.uploadChannel,"onUpdate:modelValue":t[0]||(t[0]=t=>e.$emit("update:uploadChannel",t)),class:"radio-card-group compact"},{default:(0,i.k6)(()=>[(0,i.bF)(c,{label:"telegram",class:"radio-card"},{default:(0,i.k6)(()=>[(0,i.bF)(d,{icon:"paper-plane",class:"channel-icon"}),t[13]||(t[13]=(0,i.Lk)("span",null,"TG",-1))]),_:1}),(0,i.bF)(c,{label:"cfr2",class:"radio-card"},{default:(0,i.k6)(()=>[(0,i.bF)(d,{icon:"cloud",class:"channel-icon"}),t[14]||(t[14]=(0,i.Lk)("span",null,"R2",-1))]),_:1}),(0,i.bF)(c,{label:"s3",class:"radio-card"},{default:(0,i.k6)(()=>[(0,i.bF)(d,{icon:"database",class:"channel-icon"}),t[15]||(t[15]=(0,i.Lk)("span",null,"S3",-1))]),_:1}),(0,i.bF)(c,{label:"discord",class:"radio-card"},{default:(0,i.k6)(()=>[(0,i.bF)(d,{icon:"comments",class:"channel-icon"}),t[16]||(t[16]=(0,i.Lk)("span",null,"DC",-1))]),_:1}),(0,i.bF)(c,{label:"huggingface",class:"radio-card"},{default:(0,i.k6)(()=>[(0,i.bF)(d,{icon:"robot",class:"channel-icon"}),t[17]||(t[17]=(0,i.Lk)("span",null,"HF",-1))]),_:1})]),_:1},8,["model-value"])]),o.currentChannelList.length>1?((0,i.uX)(),(0,i.CE)("div",te,[(0,i.Lk)("span",oe,[t[19]||(t[19]=(0,i.eW)(" æ¸ éåç§° ",-1)),(0,i.bF)(p,{content:"éæ©å
·ä½çæ¸ éåç§°ï¼ä¸éæ©å使ç¨è´è½½åè¡¡æé»è®¤æ¸ é",placement:"top"},{default:(0,i.k6)(()=>[(0,i.bF)(d,{icon:"question-circle",class:"inline-help-icon"})]),_:1})]),(0,i.bF)(m,{"model-value":o.channelName,"onUpdate:modelValue":t[1]||(t[1]=t=>e.$emit("update:channelName",t)),placeholder:"èªå¨éæ©",clearable:"",class:"setting-input"},{default:(0,i.k6)(()=>[((0,i.uX)(!0),(0,i.CE)(i.FK,null,(0,i.pI)(o.currentChannelList,e=>((0,i.uX)(),(0,i.Wv)(h,{key:e.name,label:e.name,value:e.name},null,8,["label","value"]))),128))]),_:1},8,["model-value"])])):(0,i.Q3)("",!0),(0,i.Lk)("div",se,[t[20]||(t[20]=(0,i.Lk)("span",{class:"setting-label"},"ä¸ä¼ ç®å½",-1)),(0,i.bF)(f,{"model-value":o.uploadFolder,"onUpdate:modelValue":r.handleUploadFolderInput,placeholder:"请è¾å
¥ä¸ä¼ ç®å½è·¯å¾",class:"setting-input"},null,8,["model-value","onUpdate:modelValue"])]),(0,i.Lk)("div",le,[(0,i.Lk)("span",ie,[t[21]||(t[21]=(0,i.eW)(" èªå¨åæ¢ ",-1)),(0,i.bF)(p,{content:"对äºéååä¸ä¼ æä»¶ï¼ä¸ä¼ 失败èªå¨åæ¢å°å
¶ä»æ¸ éä¸ä¼ ",placement:"top"},{default:(0,i.k6)(()=>[(0,i.bF)(d,{icon:"question-circle",class:"inline-help-icon"})]),_:1})]),(0,i.bF)(g,{"model-value":o.autoRetry,"onUpdate:modelValue":t[2]||(t[2]=t=>e.$emit("update:autoRetry",t))},null,8,["model-value"])])])]),(0,i.Lk)("div",ae,[t[27]||(t[27]=(0,i.Lk)("div",{class:"section-header"},[(0,i.Lk)("span",{class:"section-title"},"æä»¶å½åæ¹å¼")],-1)),(0,i.Lk)("div",ne,[(0,i.bF)(u,{"model-value":o.uploadNameType,"onUpdate:modelValue":t[3]||(t[3]=t=>e.$emit("update:uploadNameType",t)),class:"radio-card-group grid-2x2"},{default:(0,i.k6)(()=>[(0,i.bF)(c,{label:"default",class:"radio-card"},{default:(0,i.k6)(()=>[(0,i.bF)(d,{icon:"cog",class:"radio-icon"}),t[23]||(t[23]=(0,i.Lk)("span",null,"é»è®¤",-1))]),_:1}),(0,i.bF)(c,{label:"index",class:"radio-card"},{default:(0,i.k6)(()=>[(0,i.bF)(d,{icon:"hashtag",class:"radio-icon"}),t[24]||(t[24]=(0,i.Lk)("span",null,"ä»
åç¼",-1))]),_:1}),(0,i.bF)(c,{label:"origin",class:"radio-card"},{default:(0,i.k6)(()=>[(0,i.bF)(d,{icon:"file-signature",class:"radio-icon"}),t[25]||(t[25]=(0,i.Lk)("span",null,"ä»
åå",-1))]),_:1}),(0,i.bF)(c,{label:"short",class:"radio-card"},{default:(0,i.k6)(()=>[(0,i.bF)(d,{icon:"compress-alt",class:"radio-icon"}),t[26]||(t[26]=(0,i.Lk)("span",null,"ç龿¥",-1))]),_:1})]),_:1},8,["model-value"])])]),(0,i.Lk)("div",re,[(0,i.Lk)("div",de,[t[28]||(t[28]=(0,i.Lk)("span",{class:"section-title"},"æä»¶é¢å¤ç",-1)),(0,i.bF)(p,{content:"ä¸ä¼ å卿¬å°è¿è¡æ ¼å¼è½¬æ¢åå缩ï¼ä»
对å¾çæä»¶çæ",placement:"top"},{default:(0,i.k6)(()=>[(0,i.bF)(d,{icon:"question-circle",class:"section-help-icon"})]),_:1})]),(0,i.Lk)("div",ce,[(0,i.Lk)("div",ue,[(0,i.Lk)("span",pe,[t[29]||(t[29]=(0,i.eW)(" 转æ¢ä¸ºWebP ",-1)),(0,i.bF)(p,{content:"ä¸ä¼ åå°å¾ç转æ¢ä¸ºWebPæ ¼å¼ï¼å¯ææåå°æä»¶ä½ç§¯ã转æ¢å¤±è´¥æ¶ä¿æåæ ¼å¼ä¸ä¼ ",placement:"top"},{default:(0,i.k6)(()=>[(0,i.bF)(d,{icon:"question-circle",class:"inline-help-icon"})]),_:1})]),(0,i.bF)(g,{"model-value":o.convertToWebp,"onUpdate:modelValue":t[4]||(t[4]=t=>e.$emit("update:convertToWebp",t))},null,8,["model-value"])]),(0,i.Lk)("div",he,[t[30]||(t[30]=(0,i.Lk)("span",{class:"setting-label"},"æä»¶å缩",-1)),(0,i.bF)(g,{"model-value":o.customerCompress,"onUpdate:modelValue":t[5]||(t[5]=t=>e.$emit("update:customerCompress",t))},null,8,["model-value"])]),o.customerCompress?((0,i.uX)(),(0,i.CE)("div",me,[(0,i.Lk)("span",fe,[t[31]||(t[31]=(0,i.eW)(" å缩éå¼ ",-1)),(0,i.bF)(p,{content:"设置
1å¾ç大å°éå¼ï¼è¶
è¿æ¤å¼å°èªå¨å缩ï¼åä½MB",placement:"top"},{default:(0,i.k6)(()=>[(0,i.bF)(d,{icon:"question-circle",class:"inline-help-icon"})]),_:1})]),(0,i.Lk)("div",ge,[(0,i.bF)(y,{"model-value":o.compressBar,"onUpdate:modelValue":t[6]||(t[6]=t=>e.$emit("update:compressBar",t)),min:1,max:20,"format-tooltip":e=>`${e} MB`},null,8,["model-value","format-tooltip"]),(0,i.Lk)("div",ye,[(0,i.bF)(b,{"model-value":o.compressBar,"onUpdate:modelValue":t[7]||(t[7]=t=>e.$emit("update:compressBar",t)),min:1,max:20,step:1,"value-on-clear":1,class:"slider-input","controls-position":"right"},null,8,["model-value"]),t[32]||(t[32]=(0,i.Lk)("span",{class:"slider-unit"},"MB",-1))])])])):(0,i.Q3)("",!0),o.customerCompress?((0,i.uX)(),(0,i.CE)("div",be,[(0,i.Lk)("span",Ce,[t[33]||(t[33]=(0,i.eW)(" ææå¤§å° ",-1)),(0,i.bF)(p,{content:"设置å缩åå¾ç大尿æå¼ï¼åä½MB",placement:"top"},{default:(0,i.k6)(()=>[(0,i.bF)(d,{icon:"question-circle",class:"inline-help-icon"})]),_:1})]),(0,i.Lk)("div",ke,[(0,i.bF)(y,{"model-value":o.compressQuality,"onUpdate:modelValue":t[8]||(t[8]=t=>e.$emit("update:compressQuality",t)),min:.5,max:o.compressBar,step:.1,"format-tooltip":e=>`${e} MB`},null,8,["model-value","max","format-tooltip"]),(0,i.Lk)("div",ve,[(0,i.bF)(b,{"model-value":o.compressQuality,"onUpdate:modelValue":t[9]||(t[9]=t=>e.$emit("update:compressQuality",t)),min:.5,max:o.compressBar,step:.1,precision:1,"value-on-clear":.5,class:"slider-input","controls-position":"right"},null,8,["model-value","max"]),t[34]||(t[34]=(0,i.Lk)("span",{class:"slider-unit"},"MB",-1))])])])):(0,i.Q3)("",!0)])]),"telegram"===o.uploadChannel?((0,i.uX)(),(0,i.CE)("div",we,[(0,i.Lk)("div",Fe,[t[35]||(t[35]=(0,i.Lk)("span",{class:"section-title"},"æå¡ç«¯å缩",-1)),(0,i.bF)(p,{content:"1. å¨ Telegram 端è¿è¡å缩ï¼ä»
对ä¸ä¼ æ¸ é为 Telegram çå¾çæä»¶çæ <br> 2. è¥å¾ç大å°ï¼æ¬å°å缩å大å°ï¼å¤§äº10MBï¼æ¬è®¾ç½®èªå¨å¤±æ <br> 3. è¥ä¸ä¼ å辨çè¿å¤§ãéæèæ¯çå¾çï¼å»ºè®®å
³éæå¡ç«¯å缩ï¼å¦åå¯è½åºç°æªç¥é®é¢",placement:"top","raw-content":""},{default:(0,i.k6)(()=>[(0,i.bF)(d,{icon:"question-circle",class:"section-help-icon"})]),_:1})]),(0,i.Lk)("div",Le,[(0,i.Lk)("div",Ue,[t[36]||(t[36]=(0,i.Lk)("span",{class:"setting-label"},"å¼å¯å缩",-1)),(0,i.bF)(g,{"model-value":o.serverCompress,"onUpdate:modelValue":t[10]||(t[10]=t=>e.$emit("update:serverCompress",t))},null,8,["model-value"])])])])):(0,i.Q3)("",!0),(0,i.Lk)("div",Te,[(0,i.bF)(C,{type:"primary",onClick:t[11]||(t[11]=e=>r.visible=!1),class:"confirm-btn"},{default:(0,i.k6)(()=>[...t[37]||(t[37]=[(0,i.eW)("ç¡®å®",-1)])]),_:1})])]),_:1},8,["modelValue","width"])}var $e={name:"UploadSettingsDialog",methods:{handleUploadFolderInput(e){e&&!e.startsWith("/")&&(e="/"+e),this.$emit("update:uploadFolder",e)}},props:{modelValue:{type:Boolean,default:!1},uploadChannel:{type:String,default:"telegram"},channelName:{type:String,default:""},currentChannelList:{type:Array,default:()=>[]},uploadFolder:{type:String,default:""},autoRetry:{type:Boolean,default:!0},uploadNameType:{type:String,default:"default"},convertToWebp:{type:Boolean,default:!1},customerCompress:{type:Boolean,default:!0},compressBar:{type:Number,default:5},compressQuality:{type:Number,default:4},serverCompress:{type:Boolean,default:!0}},emits:["update:modelValue","update:uploadChannel","update:channelName","update:uploadFolder","update:autoRetry","update:uploadNameType","update:convertToWebp","update:customerCompress","update:compressBar","update:compressQuality","update:serverCompress"],computed:{visible:{get(){return this.modelValue},set(e){this.$emit("update:modelValue",e)}},dialogWidth(){return window.innerWidth>768?"50%":"90%"}}};const Me=(0,z.A)($e,[["render",Se]]);var _e=Me,xe=o(8559),Re=(o(5970),o(813)),Ee=(o(4896),o(9655)),Ae=(o(2893),o(4253));o(9899);const De={class:"upload-list-item"},Ie=["href"],Ne={key:0,style:{width:"10vw","border-radius":"12px"},autoplay:"",muted:"",playsinline:"",loop:""},Pe=["src"],We=["src"],Ve={key:2,style:{width:"10vw","border-radius":"12px"}}
1,ze={class:"upload-list-item-content"},Be={class:"upload-list-item-name-wrapper"},He={key:0,class:"upload-list-item-url"},Xe={class:"upload-list-item-url-row"},Qe={class:"upload-list-item-url-row"},je={key:1,class:"upload-list-item-progress"},Oe={class:"upload-list-item-action"};function qe(e,t,o,s,l,n){const r=(0,i.g2)("font-awesome-icon"),d=Ae.$g,c=G.WK,u=Ee.ve,p=(0,i.g2)("Link"),h=Re.tk,m=(0,i.g2)("Delete");return(0,i.uX)(),(0,i.CE)("div",De,[(0,i.Lk)("a",{href:o.file.url,target:"_blank",class:"upload-list-item-preview"},[n.isVideo(o.file.name)?((0,i.uX)(),(0,i.CE)("video",Ne,[(0,i.Lk)("source",{src:o.file.url,type:"video/mp4"},null,8,Pe),t[7]||(t[7]=(0,i.eW)(" Your browser does not support the video tag. ",-1))])):n.isImage(o.file.name)?((0,i.uX)(),(0,i.CE)("img",{key:1,style:{width:"10vw","border-radius":"12px"},src:o.file.url,onError:t[0]||(t[0]=t=>e.$emit("preview-error",o.file))},null,40,We)):((0,i.uX)(),(0,i.CE)("div",Ve,[(0,i.bF)(r,{icon:"file",class:"file-icon"})]))],8,Ie),(0,i.Lk)("div",ze,[(0,i.Lk)("div",Be,[(0,i.bF)(d,{class:"upload-list-item-name",truncated:""},{default:(0,i.k6)(()=>[(0,i.eW)((0,a.v_)(n.truncateFilename(o.file.name)),1)]),_:1})]),"done"===o.file.status?((0,i.uX)(),(0,i.CE)("div",He,[(0,i.Lk)("div",Xe,[(0,i.bF)(c,{modelValue:o.file.finalURL,"onUpdate:modelValue":t[1]||(t[1]=e=>o.file.finalURL=e),readonly:"",onClick:n.selectAllText,size:n.urlSize},{prepend:(0,i.k6)(()=>[...t[8]||(t[8]=[(0,i.eW)("URL",-1)])]),_:1},8,["modelValue","onClick","size"]),(0,i.bF)(c,{modelValue:o.file.mdURL,"onUpdate:modelValue":t[2]||(t[2]=e=>o.file.mdURL=e),readonly:"",onClick:n.selectAllText,size:n.urlSize},{prepend:(0,i.k6)(()=>[...t[9]||(t[9]=[(0,i.eW)("MarkDown",-1)])]),_:1},8,["modelValue","onClick","size"])]),(0,i.Lk)("div",Qe,[(0,i.bF)(c,{modelValue:o.file.htmlURL,"onUpdate:modelValue":t[3]||(t[3]=e=>o.file.htmlURL=e),readonly:"",onClick:n.selectAllText,size:n.urlSize},{prepend:(0,i.k6)(()=>[...t[10]||(t[10]=[(0,i.eW)("HTML",-1)])]),_:1},8,["modelValue","onClick","size"]),(0,i.bF)(c,{modelValue:o.file.ubbURL,"onUpdate:modelValue":t[4]||(t[4]=e=>o.file.ubbURL=e),readonly:"",onClick:n.selectAllText,size:n.urlSize},{prepend:(0,i.k6)(()=>[...t[11]||(t[11]=[(0,i.eW)("BBCode",-1)])]),_:1},8,["modelValue","onClick","size"])])])):((0,i.uX)(),(0,i.CE)("div",je,[(0,i.bF)(u,{percentage:o.file.progreess,status:o.file.status,"show-text":!1},null,8,["percentage","status"])]))]),(0,i.Lk)("div",Oe,[(0,i.Lk)("button",{class:"modern-file-action-btn modern-file-action-btn-primary",onClick:t[5]||(t[5]=t=>e.$emit("copy",o.file))},[(0,i.bF)(h,null,{default:(0,i.k6)(()=>[(0,i.bF)(p)]),_:1})]),(0,i.Lk)("button",{class:"modern-file-action-btn modern-file-action-btn-danger",onClick:t[6]||(t[6]=t=>e.$emit("remove",o.file))},[(0,i.bF)(h,null,{default:(0,i.k6)(()=>[(0,i.bF)(m)]),_:1})])])])}var Ge=o(7477);const Ke=["jpg","jpeg","png","gif","bmp","webp","svg","tiff","ico","avif","heic","jfif","pjpeg","pjp","raw","cr2","nef","dng","eps","ai","emf","wmf"],Je=["mp4","webm","ogg","mkv"];var Ye={name:"UploadFileItem",components:{Link:Ge.Link,Delete:Ge.Delete},props:{file:{type:Object,required:!0}},emits:["copy","remove","preview-error"],computed:{urlSize(){return window.innerWidth<768?"small":"default"}},methods:{isImage(e){const t=e.split(".").pop().toLowerCase();return Ke.includes(t)},isVideo(e){const t=e.split(".").pop().toLowerCase();return Je.includes(t)},truncateFilename(e,t=20){if(!e||e.length<=t)return e;const o=e.lastIndexOf(".");let s,l;o>0?(s=e.substring(0,o),l=e.substring(o)):(s=e,l="");const i=l.length+4,a=t-i-3;return a<=0?e.substring(0,t-3)+"...":s.substring(0,a)+"..."+s.slice(-4)+l},selectAllText(e){navigator.clipboard.writeText(e.target.value).then(()=>{this.$message({type:"success",message:"å¤å¶æå"})}).catch(()=>{this.$message({type:"error",message:"å¤å¶å¤±è´¥"})})}}};const Ze=(0,z.A)(Ye,[["render",qe],["__scopeId","data-v-85bdebae"]]);var et=Ze,tt=o(2086),ot=(o(670),o(8830),o(3597),o(683)),st=(o(5385),o(7358));const lt={class:"upload-form"},it={class:"upload-card-glow",ref:"uploadCardGlow"},at={key:0,class:"upload-card"},nt={class:"paste-card-actions"}
1,rt={class:"upload-list-dashboard-action"},dt={class:"modern-action-group"},ct={class:"modern-dropdown-item-content"},ut={class:"modern-action-btn modern-action-btn-danger"};function pt(e,t,n,r,d,c){const u=(0,i.g2)("CameraFilled"),p=Re.tk,h=st.j5,m=G.WK,f=l.S2,g=J.Zh,y=J.MQ,b=ot.Ik,C=(0,i.g2)("List"),k=(0,i.g2)("Checked"),v=(0,i.g2)("Failed"),w=Ae.$g,F=(0,i.g2)("font-awesome-icon"),L=s.R7,U=q.qi,T=tt.c6,S=tt.Iy,$=tt.dW,M=et,_=xe.kA;return(0,i.uX)(),(0,i.CE)("div",lt,[(0,i.Lk)("div",{class:"upload-card-wrapper",onMousemove:t[0]||(t[0]=(...e)=>c.handleUploadCardMouseMove&&c.handleUploadCardMouseMove(...e)),onMouseleave:t[1]||(t[1]=(...e)=>c.handleUploadCardMouseLeave&&c.handleUploadCardMouseLeave(...e))},[(0,i.Lk)("div",it,null,512),"default"===n.uploadMethod?((0,i.uX)(),(0,i.Wv)(h,{key:0,class:(0,a.C4)(["upload-card",{"is-uploading":d.uploading,"upload-card-busy":d.fileList.length}]),drag:"",multiple:"","http-request":c.uploadFile,onSuccess:c.handleSuccess,"on-error":c.handleError,"before-upload":c.beforeUpload,"on-progress":c.handleProgress,"file-list":d.fileList,"show-file-list":!1},{default:(0,i.k6)(()=>[(0,i.bF)(p,{class:(0,a.C4)(["el-icon--upload",{"upload-list-busy":d.fileList.length}])},{default:(0,i.k6)(()=>[(0,i.bF)(u)]),_:1},8,["class"]),(0,i.Lk)("div",{class:(0,a.C4)(["el-upload__text",{"upload-list-busy":d.fileList.length}])},[...t[8]||(t[8]=[(0,i.Lk)("em",null,"ææ½",-1),(0,i.eW)(),(0,i.Lk)("em",null,"ç¹å»",-1),(0,i.eW)(" æ ",-1),(0,i.Lk)("em",null,"Ctrl + V",-1),(0,i.eW)(" ç²è´´ä¸ä¼ ",-1)])],2)]),_:1},8,["class","http-request","onSuccess","on-error","before-upload","on-progress","file-list"])):(0,i.Q3)("",!0)],32),"paste"===n.uploadMethod?((0,i.uX)(),(0,i.CE)("div",at,[(0,i.bF)(b,{class:(0,a.C4)(["paste-card",{"is-uploading":d.uploading,"upload-card-busy":d.fileList.length}])},{default:(0,i.k6)(()=>[(0,i.bF)(m,{modelValue:d.pastedUrls,"onUpdate:modelValue":t[2]||(t[2]=e=>d.pastedUrls=e),class:"upload-card-textarea",placeholder:"ç²è´´å¤é¾ä¸ä¼ ï¼å¤ä¸ªå¤é¾ç¨æ¢è¡åé",type:"textarea",rows:d.fileList.length?4:14},null,8,["modelValue","rows"]),(0,i.Lk)("div",nt,[(0,i.bF)(f,{class:"paste-card-upload-button",type:"primary",size:c.pasteCardMethodButtonSize,onClick:c.handleUploadPasteUrls},{default:(0,i.k6)(()=>[...t[9]||(t[9]=[(0,i.eW)(" ä¸ ä¼ ",-1)])]),_:1},8,["size","onClick"]),(0,i.bF)(y,{modelValue:d.pasteUploadMethod,"onUpdate:modelValue":t[3]||(t[3]=e=>d.pasteUploadMethod=e),class:"paste-card-method-group",size:c.pasteCardMethodButtonSize},{default:(0,i.k6)(()=>[(0,i.bF)(g,{label:"save"},{default:(0,i.k6)(()=>[...t[10]||(t[10]=[(0,i.eW)("转å",-1)])]),_:1}),(0,i.bF)(g,{label:"external"},{default:(0,i.k6)(()=>[...t[11]||(t[11]=[(0,i.eW)("å¤é¾",-1)])]),_:1})]),_:1},8,["modelValue","size"])])]),_:1},8,["class"])])):(0,i.Q3)("",!0),(0,i.bF)(b,{class:(0,a.C4)(["upload-list-card",{"upload-list-busy":d.fileList.length,"is-uploading":d.uploading}])},{default:(0,i.k6)(()=>[(0,i.Lk)("div",{class:(0,a.C4)(["upload-list-container",{"upload-list-busy":d.fileList.length}])},[(0,i.bF)(_,{onScroll:c.handleScroll,ref:"scrollContainer"},{default:(0,i.k6)(()=>[(0,i.Lk)("div",{class:(0,a.C4)(["upload-list-dashboard",{"list-scrolled":d.listScrolled}])},[(0,i.bF)(w,{class:"upload-list-dashboard-title"},{default:(0,i.k6)(()=>[(0,i.bF)(p,null,{default:(0,i.k6)(()=>[(0,i.bF)(C)]),_:1}),(0,i.eW)((0,a.v_)(c.uploadingCount+c.waitingCount)+" ",1),(0,i.bF)(p,null,{default:(0,i.k6)(()=>[(0,i.bF)(k)]),_:1}),(0,i.eW)((0,a.v_)(c.uploadSuccessCount)+" ",1),(0,i.bF)(p,null,{default:(0,i.k6)(()=>[(0,i.bF)(v)]),_:1}),(0,i.eW)((0,a.v_)(c.uploadErrorCount),1)]),_:1}),(0,i.Lk)("div",rt,[(0,i.Lk)("div",dt,[(0,i.bF)(L,{disabled:c.disableTooltip,content:"æ´ä½å¤å¶",placement:"top"},{default:(0,i.k6)(()=>[(0,i.Lk)("button",{class:"modern-action-btn",onClick:t[4]||(t[4]=(...e)=>c.copyAll&&c.copyAll(...e))},[(0,i.bF)(F,{icon:"copy"})])]),_:1},8,["disabled"]),(0,i.bF)(L,{disabled:c.disableTooltip,content:"失败éè¯",placement:"top"},{default:(0,i.k6)(()=>[(0,i.bF)($,null,{dropdown:(0,i.k6)(()=>[(0,i.bF)(S,{class:"modern-dropdown-menu"},{default:(0,i.k6)(()=>[(0,i.bF)(T,null,{default:(0,i.k6)(()=>[(0,i.Lk)("div",ct,[t[12]||(t[12]=(0,i.Lk)("span",null,"èªå¨éè¯",-1)),(0,i.bF)(U,{modelValue:d.autoReUpload,"onUpdate:modelValue":t[6]||(t[6]=e=>d.autoReUpload=e),onChange:c.handleAutoRetryChange,size:"small"},null,8,["modelValue","onChange"])])]),_:1})]),_:1})]),default:(0,i.k6)(()=>[(0,i.Lk)("button",{class:"modern-action-btn",onClick:t[5]||(t[5]=(...e)=>c.retryError&&c.retryError(...e))},[(0,i.bF)(F,{icon:"redo"})])]),_:1})]),_:1},8,["disabled"]),(0,i.bF)(L,{disabled:c.disableTooltip,content:"æ¸
空å表",placement:"top"},{default:(0,i.k6)(()=>[(0,i.bF)($,null,{dropdown:(0,i.k6)(()=>[(0,i.bF)(S,{class:"modern-dropdown-menu"},{default:(0,i.k6)(()=>[(0,i.bF)(T,{onClick:c.clearFileList},{default:(0,i.k6)(()=>[...t[13]||(t[13]=[(0,i.eW)("æ¸
空å
¨é¨",-1)])]),_:1},8,["onClick"]),(0,i.bF)(T,{onClick:c.clearSuccessList},{default:(0,i.k6)(()=>[...t[14]||(t[14]=[(0,i.eW)("æ¸
空已ä¸ä¼ ",-1)])]),_:1},8,["onClick"])]),_:1})]),default:(0,i.k6)(()=>[(0,i.Lk)("button",ut,[(0,i.bF)(F,{icon:"trash-alt"})])]),_:1})]),_:1},8,["disabled"])])])],2),((0,i.uX)(!0),(0,i.CE)(i.FK,null,(0,i.pI)(d.fileList.slice().reverse(),e=>((0,i.uX)(),(0,i.Wv)(M,{key:e.name,file:e,onCopy:c.handleCopy,onRemove:c.handleRemove,onPreviewError:t[7]||(t[7]=e=>e.url=o(6682))},null,8,["file","onCopy","onRemove"]))),128))]),_:1},8,["onScroll"])],2)]),_:1},8,["class"])])}
1o(6573),o(8100),o(7936),o(116),o(8237),o(9577),o(1549),o(9797),o(9631),o(5623),o(4979),o(4603),o(7566),o(8721);var ht=o(457),mt=o(6334),ft=o(8401);function gt(e,t,o){const s=o+e;return{finalURL:s,mdURL:``,htmlURL:`<img src="${s}" alt="${t}" width=100% />`,ubbURL:`[img]${s}[/img]`}}function yt(e,t){const o={url:e.finalURL,md:e.mdURL,html:e.htmlURL,ubb:e.ubbURL};return o[t]||e.finalURL}function bt(e,t){e.forEach(e=>{if("external"===e.uploadChannel)return;const o=gt(e.srcID,e.name,t);Object.assign(e,o)})}const Ct=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),kt=(e,t)=>e>>>t|e<<32-t;function vt(e,t){const o=new Uint32Array(64);for(let u=0;u<16;u++)o[u]=e[4*u]<<24|e[4*u+1]<<16|e[4*u+2]<<8|e[4*u+3];for(let u=16;u<64;u++){const e=kt(o[u-15],7)^kt(o[u-15],18)^o[u-15]>>>3,t=kt(o[u-2],17)^kt(o[u-2],19)^o[u-2]>>>10;o[u]=o[u-16]+e+o[u-7]+t>>>0}let[s,l,i,a,n,r,d,c]=t;for(let u=0;u<64;u++){const e=kt(n,6)^kt(n,11)^kt(n,25),t=n&r^~n&d,p=c+e+t+Ct[u]+o[u]>>>0,h=kt(s,2)^kt(s,13)^kt(s,22),m=s&l^s&i^l&i,f=h+m>>>0;c=d,d=r,r=n,n=a+p>>>0,a=i,i=l,l=s,s=p+f>>>0}t[0]=t[0]+s>>>0,t[1]=t[1]+l>>>0,t[2]=t[2]+i>>>0,t[3]=t[3]+a>>>0,t[4]=t[4]+n>>>0,t[5]=t[5]+r>>>0,t[6]=t[6]+d>>>0,t[7]=t[7]+c>>>0}function wt(){let e=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),t=new Uint8Array(64),o=0,s=0;return{update(l){s+=l.length;let i=0;if(o>0){const s=64-o,a=Math.min(s,l.length);t.set(l.subarray(0,a),o),o+=a,i=a,64===o&&(vt(t,e),o=0)}while(i+64<=l.length)vt(l.subarray(i,i+64),e),i+=64;i<l.length&&(t.set(l.subarray(i),0),o=l.length-i)},digest(){const l=8*s;t[o++]=128,o>56&&(t.fill(0,o,64),vt(t,e),o=0),t.fill(0,o,56);const i=new DataView(t.buffer);i.setUint32(56,Math.floor(l/4294967296),!1),i.setUint32(60,l>>>0,!1),vt(t,e);let a="";for(let t=0;t<8;t++)a+=e[t].toString(16).padStart(8,"0");return a}}}async function Ft(e){const t=wt(),o=4194304;let s=0;while(s<e.size){const l=e.slice(s,Math.min(s+o,e.size)),i=await l.arrayBuffer();t.update(new Uint8Array(i)),s+=o,s%20971520<o&&console.log(`SHA256 progress: ${Math.min(100,Math.round(s/e.size*100))}%`)}return t.digest()}var Lt={name:"UploadForm",components:{UploadFileItem:et},props:{selectedUrlForm:{type:String,default:"url",required:!1},customerCompress:{type:Boolean,default:!0,required:!1},compressQuality:{type:Number,default:4,required:!1},compressBar:{type:Number,default:5,required:!1},serverCompress:{type:Boolean,default:!0,required:!1},uploadChannel:{type:String,default:"telegram",required:!1},channelName:{type:String,default:"",required:!1},uploadNameType:{type:String,default:"default",required:!1},useCustomUrl:{type:String,default:"false",required:!1},customUrlPrefix:{type:String,default:"",required:!1},autoRetry:{type:Boolean,default:!0,required:!1},urlPrefix:{type:String,default:"",required:!1},uploadMethod:{type:String,default:"default",required:!1},uploadFolder:{type:String,default:"",required:!1},convertToWebp:{type:Boolean,default:!1,required:!1}},data(){return{fileList:[],uploading:!1,maxUploading:6,exceptionList:[],listScrolled:!1,fileListLength:0,uploadCount:0,pastedUrls:"",pasteUploadMethod:"save",autoReUpload:!0,maxRetryCount:10,retryTimer:null,retryDelay:12e3,uploadQueue:[],activeUploads:0,maxConcurrentUploads:6,abortControllers:new Map}},watch:{fileList:{handler(){this.fileList.length>this.fileListLength&&this.$nextTick(()=>{setTimeout(()=>{this.$refs.scrollContainer&&this.$refs.scrollContainer.setScrollTop(0)},100)}),this.fileListLength=this.fileList.length},deep:!0},useCustomUrl:{handler(){bt(this.fileList,this.rootUrl)},immediate:!0},customUrlPrefix:{handler(){"true"===this.useCustomUrl&&bt(this.fileList,this.rootUrl)},immediate:!0},autoReUpload(e){this.$store.commit("setStoreAutoReUpload",e)}},computed:{...(0,ft.L8)(["storeAutoReUpload"]),uploadSuccessCount(){return this.fileList.filter(e=>"done"===e.status||"success"===e.status).length},uploadErrorCount(){return this.fileList.filter(e=>"exception"===e.status).length},uploadingCount(){return this.fileList.filter(e=>"uploading"===e.status).length},waitingCount(){return this.uploadQueue.length},urlSize(){return window.innerWidth<768?"small":"default"},disableTooltip(){return window.innerWidth<768},rootUrl(){return"true"===this.useCustomUrl?this.customUrlPrefix:this.urlPrefix||`${window.location.protocol}//${window.location.host}/file/`},pasteCardMethodButtonSize(){return this.fileList.length||window.innerWidth<768?"small":"medium"}},mounted(){document.addEventListener("paste",this.handlePaste),this.autoReUpload=this.storeAutoReUpload},beforeUnmount(){document.removeEventListener("paste",this.handlePaste),this.uploadQueue=[],this.fileList=[],this.activeUploads=0}
1,methods:{truncateFilename(e,t=20){if(!e||e.length<=t)return e;const o=e.lastIndexOf(".");let s,l;o>0?(s=e.substring(0,o),l=e.substring(o)):(s=e,l="");const i=l.length+4,a=t-i-3;return a<=0?e.substring(0,t-3)+"...":s.substring(0,a)+"..."+s.slice(-4)+l},uploadFile(e){if(!this.fileList.find(t=>t.uid===e.file.uid))return;if(this.activeUploads>=this.maxConcurrentUploads){this.uploadQueue.push(e);const t=this.fileList.find(t=>t.uid===e.file.uid);return void(t&&(t.status="waiting"))}this.activeUploads++;const t=this.fileList.find(t=>t.uid===e.file.uid);t&&(t.status="uploading");const o=this.fileList.find(t=>t.uid===e.file.uid),s=o?.uploadChannel||this.uploadChannel;if("external"===s)return void this.uploadSingleFile(e);if("huggingface"===s){const t=20971520;return void(e.file.size>=t?this.uploadToHuggingFaceDirect(e):this.uploadSingleFile(e))}if("discord"===s){const t=9437184;return void(e.file.size>t?this.uploadFileInChunks(e):this.uploadSingleFile(e))}const l=20971520;e.file.size>l?this.uploadFileInChunks(e):this.uploadSingleFile(e)},processUploadQueue(){if(0===this.uploadQueue.length||this.activeUploads>=this.maxConcurrentUploads)return;const e=this.uploadQueue.shift();e&&this.fileList.find(t=>t.uid===e.file.uid)?this.uploadFile(e):this.processUploadQueue()},onUploadComplete(){this.activeUploads=Math.max(0,this.activeUploads-1),this.processUploadQueue(),0===this.activeUploads&&0===this.uploadQueue.length&&(this.uploading=!1)},async uploadSingleFile(e){const t=this.fileList.find(t=>t.uid===e.file.uid);if(!t)return;const o=t.serverCompress,s=t.uploadChannel||this.uploadChannel,l=this.autoRetry&&"external"!==s,i="external"===s?"default":this.uploadNameType,a=new AbortController;this.abortControllers.set(e.file.uid,a);const n=new FormData;if(n.append("file",e.file),"external"===s&&n.append("url",e.file.url),"huggingface"===s)try{console.log("Computing SHA256 for HuggingFace upload...");const t=await Ft(e.file);n.append("sha256",t),console.log("SHA256 computed:",t)}catch(r){console.error("Failed to compute SHA256:",r)}(0,ht.A)({url:"/upload?serverCompress="+o+"&uploadChannel="+s+(this.channelName?"&channelName="+encodeURIComponent(this.channelName):"")+"&uploadNameType="+i+"&autoRetry="+l+"&uploadFolder="+encodeURIComponent(this.uploadFolder),method:"post",data:n,withAuthCode:!0,signal:a.signal,onUploadProgress:t=>{const o=Math.round(t.loaded/t.total*100);e.onProgress({percent:o,file:e.file})}}).then(t=>{e.onSuccess(t,e.file)}).catch(t=>{"CanceledError"!==t.name&&"ERR_CANCELED"!==t.code?t.response&&401!==t.response.status?(this.exceptionList.push(e),e.onError(t,e.file)):t.response||(this.exceptionList.push(e),e.onError(t,e.file)):console.log("ä¸ä¼ 已忶:",e.file.name)}).finally(()=>{this.abortControllers.delete(e.file.uid),this.onUploadComplete()})},async uploadFileInChunks(e){const t=this.fileList.find(t=>t.uid===e.file.uid);if(!t)return;const o=t.uploadChannel||this.uploadChannel,s=new AbortController;this.abortControllers.set(e.file.uid,s);const l="discord"===o?9437184:16777216,i=e.file.size,a=Math.ceil(i/l),n=t.serverCompress,r=this.autoRetry&&"external"!==o,d="external"===o?"default":this.uploadNameType;let c=null;if("huggingface"===o)try{console.log("Computing SHA256 for HuggingFace chunked upload..."),c=await Ft(e.file),console.log("SHA256 computed:",c)}catch(u){console.error("Failed to compute SHA256:",u)}try{const t=new FormData;t.append("originalFileName",e.file.name),t.append("originalFileType",e.file.type),t.append("totalChunks",a.toString());const p=await(0,ht.A)({url:"/upload?serverCompress="+n+"&uploadChannel="+o+(this.channelName?"&channelName="+encodeURIComponent(this.channelName):"")+"&uploadNameType="+d+"&autoRetry="+r+"&uploadFolder="+encodeURIComponent(this.uploadFolder)+"&initChunked=true",method:"post",data:t,withAuthCode:!0});if(!p.data.success)throw new Error("åå§åååä¸ä¼ 失败: "+p.data.message);const h=p.data.uploadId;console.log("ååä¸ä¼ åå§åæåï¼uploadId:",h);const m=this.fileList.find(t=>t.uid===e.file.uid);m&&(m.totalChunks=a,m.uploadId=h);const f=3,g=new Array(a).fill(0);let y=0,b=!1,C="",k=!1;const v=async t=>{if(b||k)return;const c=t*l,p=Math.min(c+l,i),m=e.file.slice(c,p),f=new FormData;f.append("file",m,`${e.file.name}.part${t.toString().padStart(3,"0")}`),f.append("chunkIndex",t.toString()),f.append("totalChunks",a.toString()),f.append("uploadId",h),f.append("originalFileName",e.file.name),f.append("originalFileType",e.file.type);let y=0;const v=3;while(y<v){if(b||k)return;try{return void await(0,ht.A)({url:"/upload?serverCompress="+n+"&uploadChannel="+o+(this.channelName?"&channelName="+encodeURIComponent(this.channelName):"")+"&uploadNameType="+d+"&autoRetry="+r+"&uploadFolder="+encodeURIComponent(this.uploadFolder)+"&chunked=true",method:"post",data:f,withAuthCode:!0,signal:s.signal,onUploadProgress:o=>{if(b||k)return;const s=Math.round(o.loaded/o.total*100);g[t]=s;const l=Math.round(g.reduce((e,t)=>
1e+t,0)/a);e.onProgress({percent:l,file:e.file})}})}catch(u){if("CanceledError"===u.name||"ERR_CANCELED"===u.code)return k=!0,void console.log("ååä¸ä¼ 已忶:",e.file.name);if(y++,console.warn(`åå ${t+1}/${a} ä¸ä¼ 失败 (éè¯ ${y}/${v}):`,u),y>=v)throw b=!0,C=`åå ${t+1}/${a} ä¸ä¼ 失败: ${u.message}`,new Error(C);await new Promise(e=>setTimeout(e,2e3*y))}}},w=[];for(let e=0;e<f;e++)w.push((async()=>{while(y<a&&!b&&!k){const t=y++;try{await v(t)}catch(e){k||(b=!0,C=e.message);break}}})());if(await Promise.all(w),k)return void console.log("ååä¸ä¼ 已忶ï¼è·³è¿åå¹¶æ¥éª¤");if(b)throw new Error(C||"ä¸ä¼ è¿ç¨ä¸åçé误");this.$message({type:"info",message:"ååä¸ä¼ å®æï¼æ£å¨åå¹¶æä»¶ï¼è¯·èå¿çå¾
...",duration:0});const F=new FormData;F.append("uploadId",h),F.append("totalChunks",a.toString()),F.append("originalFileName",e.file.name),F.append("originalFileType",e.file.type),c&&F.append("sha256",c);const L=await(0,ht.A)({url:"/upload?serverCompress="+n+"&uploadChannel="+o+(this.channelName?"&channelName="+encodeURIComponent(this.channelName):"")+"&uploadNameType="+d+"&autoRetry="+r+"&uploadFolder="+encodeURIComponent(this.uploadFolder)+"&chunked=true&merge=true",method:"post",data:F,withAuthCode:!0});this.$message.closeAll(),e.onSuccess(L,e.file)}catch(u){if("CanceledError"===u.name||"ERR_CANCELED"===u.code)return void console.log("ååä¸ä¼ 已忶:",e.file.name);console.error("ååä¸ä¼ 失败:",u);const t=this.fileList.find(t=>t.uid===e.file.uid);t&&t.uploadId&&this.cleanupUploadResources(t.uploadId,t.totalChunks).then(()=>{console.log(`å·²æ¸
çååä¸ä¼ 失败çèµæº: ${t.uploadId}`)}).catch(e=>{console.warn("æ¸
çååä¸ä¼ å¤±è´¥èµæºæ¶åºé:",e)}),u.response&&401!==u.response.status?(this.exceptionList.push(e),e.onError(u,e.file)):u.response||(this.exceptionList.push(e),e.onError(u,e.file))}finally{this.abortControllers.delete(e.file.uid),this.onUploadComplete()}},handleRemove(e){this.abortControllers.has(e.uid)&&(this.abortControllers.get(e.uid).abort(),this.abortControllers.delete(e.uid)),this.uploadQueue=this.uploadQueue.filter(t=>t.file.uid!==e.uid),this.fileList=this.fileList.filter(t=>t.uid!==e.uid),this.$message({type:"info",message:this.truncateFilename(e.name)+"å·²å é¤"})},async cleanupUploadResources(e,t=0){try{await(0,ht.A)({url:`/upload?cleanup=true&uploadId=${e}&totalChunks=${t}`,method:"get",withAuthCode:!0,timeout:5e3}),console.log(`æ¸
çä¸ä¼ èµæºæå: ${e}`)}catch(o){console.warn("æ¸
çä¸ä¼ èµæºå¤±è´¥:",o)}},handleSuccess(e,t){const o=this.fileList.find(e=>e.uid===t.uid);if(o)try{const s=o.uploadChannel||this.uploadChannel;if("external"!==s){const s=e.data[0].src.replace("/file/","");o.url=`${window.location.protocol}//${window.location.host}/file/`+s;const l=gt(s,t.name,this.rootUrl);Object.assign(o,l),o.srcID=s}o.progreess=100,o.status="success",this.saveToHistory(o),this.$message({type:"success",message:this.truncateFilename(t.name)+"ä¸ä¼ æå"}),setTimeout(()=>{const e=this.fileList.find(e=>e.uid===t.uid);e&&(e.status="done")},1e3)}catch(s){this.$message.error(this.truncateFilename(t.name)+"ä¸ä¼ 失败"),o.status="exception"}},saveToHistory(e){try{const t=JSON.parse(localStorage.getItem("uploadHistory")||"[]"),o={name:e.name,url:e.finalURL,time:Date.now(),type:e.name.split(".").pop().toLowerCase()};t.push(o),localStorage.setItem("uploadHistory",JSON.stringify(t))}catch(t){console.error("Failed to save history",t)}},handleError(e,t){const o=this.fileList.find(e=>e.uid===t.uid);o&&(this.$message.error(this.truncateFilename(t.name)+"ä¸ä¼ 失败"),o.status="exception",this.autoReUpload&&this.scheduleAutoRetry())},handleCopy(e){const t=this.fileList.find(t=>t.uid===e.uid).status;"done"===t||"success"===t?(navigator.clipboard.writeText(yt(e,this.selectedUrlForm)),this.$message({type:"success",message:"å¤å¶æå"})):this.$message({type:"warning",message:"æä»¶æªä¸ä¼ æåï¼æ æ³å¤å¶é¾æ¥"})},beforeUpload(e){return new Promise(async(t,o)=>{let s=e;const l=this.convertToWebp&&e.type.includes("image")&&!e.type.includes("webp")&&!e.type.includes("gif")&&!e.type.includes("svg");if(l)try{const t=await this.convertImageToWebp(e);t&&(s=t,console.log(`WebPè½¬æ¢æå: ${e.name} -> ${t.name}, 大å°: ${(e.size/1024).toFixed(1)}KB -> ${(t.size/1024).toFixed(1)}KB`))}catch(r){console.warn("WebP转æ¢å¤±è´¥ï¼ä½¿ç¨åæä»¶:",r)}const i=s.type.includes("image")&&this.customerCompress&&s.size/1024/1024>this.compressBar,a=s.size/1024/1024<=1024||"telegram"!==this.uploadChannel,n=(e,o)=>{const s=URL.createObjectURL(e);this.fileList.push({uid:e.uid,name:e.name,url:s,finalURL:"",mdURL:"",htmlURL:"",ubbURL:"",srcID:"",status:"uploading",progreess:0,serverCompress:o,retryCount:0}),t(e)};if(i)mt.compressAccurately(s,1024*this.compressQuality).then(t=>{t.size/1024/1024>1024&&"telegram"===this.uploadChannel&&(this.$message.error(s.name+"å缩åæä»¶è¿å¤§ï¼æ æ³ä¸ä¼ !"),o("æä»¶è¿å¤§")),this.uploading=!0;const l=new File([t],s.name,{type:t.type});l.uid=e.uid;const i=this.uploadCount++,a=this.serverCompress&&l.size/1024/1024<10&&"telegram"===this.uploadChannel;0===i?n(l,a):setTimeout(()=>{n(l,a),this.uploadCount--},300*i)}).catch(e=>{this.$message.error(s.name+"åç¼©å¤±è´¥ï¼æ æ³ä¸ä¼ !"),o(e)});else if(a){this.uploading=!0;const e=this.uploadCount++,t="telegram"===this.uploadChannel&&this.serverCompress&&(!s.t
1ype.includes("image")||s.size/1024/1024<10);0===e?n(s,t):setTimeout(()=>{n(s,t),this.uploadCount--},300*e)}else this.$message.error(s.name+"æä»¶è¿å¤§ï¼æ æ³ä¸ä¼ !"),o("æä»¶è¿å¤§")})},handleProgress(e){const t=this.fileList.find(t=>t.uid===e.file.uid);t&&(t.progreess=e.percent)},copyAll(){const e=this.fileList.filter(e=>"done"===e.status||"success"===e.status).map(e=>yt(e,this.selectedUrlForm)).join("\n");navigator.clipboard.writeText(e),this.$message({type:"success",message:"æ´ä½å¤å¶æå"})},clearFileList(){this.fileList.length>0?(this.abortControllers.forEach((e,t)=>{e.abort()}),this.abortControllers.clear(),this.uploadQueue=[],this.fileList=[],this.$message({type:"success",message:"æä»¶å表已æ¸
空"})):this.$message({type:"info",message:"æä»¶å表为空"})},clearSuccessList(){this.uploadSuccessCount>0?(this.fileList=this.fileList.filter(e=>"done"!==e.status&&"success"!==e.status),this.$message({type:"success",message:"æåä¸ä¼ æä»¶å·²æ¸
空"})):this.$message({type:"info",message:"æåä¸ä¼ æä»¶ä¸ºç©º"})},handlePaste(e){if("INPUT"===e.target.tagName||"TEXTAREA"===e.target.tagName)return;const t=e.clipboardData.items;t.length>0&&this.uploadFromUrl(t)},handleUploadPasteUrls(){const e=this.pastedUrls.split("\n"),t=e.map(e=>e.trim()).filter(e=>""!==e).filter(e=>/^(https?:\/\/[^\s$.?#].[^\s]*)$/.test(e));if("save"===this.pasteUploadMethod)this.uploadFromUrl(t.map(e=>({kind:"string",getAsString:t=>{t(e)}})));else if("external"===this.pasteUploadMethod)for(let o=0;o<t.length;o++){const e=t[o],s=e.split("/").pop(),l=``,i=`<img src="${e}" alt="${s}" width=100% />`,a=`[img]${e}[/img]`,n=new File([],e.split("/").pop(),{type:"text/plain"});n.uid=Date.now()+o,n.url=e,this.fileList.push({uid:n.uid,name:n.name,url:e,finalURL:e,mdURL:l,htmlURL:i,ubbURL:a,srcID:e,status:"uploading",progreess:0,serverCompress:!1,uploadChannel:"external",retryCount:0}),this.uploadFile({file:n,onProgress:e=>this.handleProgress(e),onSuccess:(e,t)=>this.handleSuccess(e,t),onError:(e,t)=>this.handleError(e,t)})}},uploadFromUrl(e){for(let t=0;t<e.length;t++)if("file"===e[t].kind){const o=e[t].getAsFile();o.uid=Date.now()+t;const s=this.beforeUpload(o);s instanceof Promise&&s.then(e=>{e instanceof File&&this.uploadFile({file:e,onProgress:e=>this.handleProgress(e),onSuccess:(e,t)=>this.handleSuccess(e,t),onError:(e,t)=>this.handleError(e,t)})}).catch(e=>{console.log(e)})}else"string"===e[t].kind&&e[t].getAsString(e=>{const o=/^(https?:\/\/[^\s$.?#].[^\s]*)$/;let s="";o.test(e)&&ht.A.post("/api/fetchRes",{url:e},{responseType:"blob",withAuthCode:!0}).then(o=>{o.headers["content-type"];if(200!=o.status)throw new Error("URLå°å请æ±å¤±è´¥");{const i=o.headers["content-disposition"];if(i){const e=/filename[^;=\n]*=((['"]).*?\2|[^;\n]*)/,t=/filename\*\s*=\s*UTF-8''([^;\n]*)/;let o=e.exec(i);if(null!=o&&o[1]){s=o[1].replace(/['"]/g,"");try{s=decodeURIComponent(s)}catch(l){s=""}}""===s&&(o=t.exec(i),null!=o&&o[1]&&(s=decodeURIComponent(o[1])))}if(""===s){const t=new URL(e);s=t.pathname.split("/").pop()}if(""===s){const o=new URL(e);let l=o.pathname.split(".").pop();(!l||""===l||l.length>10)&&(l="bin"),s="PastedFile"+Date.now()+t+"."+l}const a=o.data,n=new File([a],s,{type:a.type});n.uid=Date.now()+t;const r=this.beforeUpload(n);r instanceof Promise&&r.then(e=>{e instanceof File&&this.uploadFile({file:e,onProgress:e=>this.handleProgress(e),onSuccess:(e,t)=>this.handleSuccess(e,t),onError:(e,t)=>this.handleError(e,t)})}).catch(e=>{console.log(e)})}}).catch(e=>{this.$message({type:"warning",message:"ç²è´´æ¿ä¸çURLå°å请æ±å¤±è´¥"})})})},handleScroll(e){this.listScrolled=e.scrollTop>0&&this.fileList.length>0},retryError(){this.exceptionList.length>0?(this.retryFailedFiles(this.exceptionList),this.exceptionList=[]):this.$message({type:"info",message:"æ ä¸ä¼ 失败æä»¶"})},handleAutoRetryChange(e){this.$message({type:e?"success":"info",message:e?"èªå¨éè¯å·²å¼å¯":"èªå¨éè¯å·²å
³é"}),e&&this.exceptionList.length>0&&this.scheduleAutoRetry()},retryFailedFiles(e){e.forEach(e=>{const t=e.retryCount||0;t<this.maxRetryCount?(e.retryCount=t+1,this.uploadFile({file:e.file,onProgress:e=>this.handleProgress(e),onSuccess:(e,t)=>this.handleSuccess(e,t),onError:(e,t)=>
1this.handleError(e,t)})):this.$message({type:"warning",message:`${e.name} å·²è¾¾å°æå¤§éè¯æ¬¡æ°(${this.maxRetryCount})ï¼åæ¢éè¯`})})},scheduleAutoRetry(){this.retryTimer&&clearTimeout(this.retryTimer),this.retryTimer=setTimeout(()=>{if(this.autoReUpload&&this.exceptionList.length>0){const e=[...this.exceptionList];this.exceptionList=[],this.retryFailedFiles(e)}},this.retryDelay)},async uploadToHuggingFaceDirect(e){const t=this.fileList.find(t=>t.uid===e.file.uid);if(!t)return;const o=new AbortController;this.abortControllers.set(e.file.uid,o);try{console.log("=== HuggingFace Direct Upload ==="),console.log("File:",e.file.name,"Size:",e.file.size),e.onProgress({percent:5,file:e.file}),console.log("Computing SHA256...");const t=await Ft(e.file);if(console.log("SHA256:",t),o.signal.aborted)return void console.log("HuggingFace ä¸ä¼ 已忶:",e.file.name);const s=new Uint8Array(await e.file.slice(0,512).arrayBuffer()),l=btoa(String.fromCharCode(...s));e.onProgress({percent:10,file:e.file}),console.log("Getting LFS upload URL...");const i=await(0,ht.A)({url:"/upload/huggingface/getUploadUrl",method:"post",data:{fileSize:e.file.size,fileName:e.file.name,fileType:e.file.type,sha256:t,fileSample:l,channelName:this.channelName,uploadNameType:this.uploadNameType,uploadFolder:this.uploadFolder},withAuthCode:!0,signal:o.signal});if(!i.data.success)throw new Error(i.data.error||"Failed to get upload URL");const a=i.data;if(console.log("Upload info:",a),a.alreadyExists)console.log("File already exists in LFS, skipping upload"),e.onProgress({percent:90,file:e.file});else if(a.needsLfs&&a.uploadAction){const{href:t,header:s}=a.uploadAction;if(s?.chunk_size)await this.uploadToHuggingFaceMultipart(e,a,o);else{console.log("Uploading to S3 (basic)...");const l=await fetch(t,{method:"PUT",headers:s||{},body:e.file,signal:o.signal});if(!l.ok){const e=await l.text();throw new Error(`S3 upload failed: ${l.status} - ${e}`)}console.log("S3 upload complete")}}if(o.signal.aborted)return void console.log("HuggingFace ä¸ä¼ 已忶:",e.file.name);e.onProgress({percent:95,file:e.file}),console.log("Committing file...");const n=await(0,ht.A)({url:"/upload/huggingface/commitUpload",method:"post",data:{fullId:a.fullId,filePath:a.filePath,sha256:t,fileSize:e.file.size,fileName:e.file.name,fileType:e.file.type,channelName:a.channelName},withAuthCode:!0,signal:o.signal});if(!n.data.success)throw new Error(n.data.error||"Failed to commit file");console.log("Upload complete:",n.data);const r={data:[{src:n.data.src}]};e.onSuccess(r,e.file)}catch(s){if("CanceledError"===s.name||"ERR_CANCELED"===s.code||"AbortError"===s.name)return void console.log("HuggingFace ä¸ä¼ 已忶:",e.file.name);console.error("HuggingFace direct upload error:",s),this.exceptionList.push(e),e.onError(s,e.file)}finally{this.abortControllers.delete(e.file.uid),this.onUploadComplete()}},async uploadToHuggingFaceMultipart(e,t,o){const{uploadAction:s}=t,{href:l,header:i}=s,a=parseInt(i.chunk_size),n=Object.keys(i).filter(e=>/^[0-9]+$/.test(e));console.log(`Multipart upload: ${n.length} parts, chunk size: ${a}`);const r=[],d=n.length;for(const u of n){if(o&&o.signal.aborted)throw console.log("HuggingFace åçä¸ä¼ 已忶"),new DOMException("Upload cancelled","AbortError");const t=parseInt(u)-1,s=t*a,l=Math.min(s+a,e.file.size),n=e.file.slice(s,l);console.log(`Uploading part ${u}/${d}`);const c=await fetch(i[u],{method:"PUT",body:n,signal:o?o.signal:void 0});if(!c.ok)throw new Error(`Failed to upload part ${u}: ${c.status}`);const p=c.headers.get("ETag");if(!p)throw new Error(`No ETag for part ${u}`);r.push({partNumber:parseInt(u),etag:p});const h=10+Math.round(parseInt(u)/d*80);e.onProgress({percent:h,file:e.file})}if(o&&o.signal.aborted)throw console.log("HuggingFace åçä¸ä¼ 已忶"),new DOMException("Upload cancelled","AbortError");console.log("Completing multipart upload...");const c=await fetch(l,{method:"POST",headers:{Accept:"application/vnd.git-lfs+json","Content-Type":"application/vnd.git-lfs+json"},body:JSON.stringify({oid:t.oid,parts:r}),signal:o?o.signal:void 0});if(!c.ok){const e=await c.text();throw new Error(`Multipart complete failed: ${c.status} - ${e}`)}console.log("Multipart upload complete")},async convertImageToWebp(e){return new Promise((t,o)=>{if(e.type.includes("gif")||e.type.includes("svg")||e.type.includes("webp"))return void t(null);const s=new Image,l=document.createElement("canvas"),i=l.getContext("2d");s.onload=()=>{l.width=s.width,l.height=s.height,i.drawImage(s,0,0),l.toBlob(l=>{if(l){const o=e.name,s=o.lastIndexOf("."),i=s>0?o.substring(0,s)+".webp":o+".webp",a=new File([l],i,{type:"image/webp"});a.uid=e.uid,t(a)}else o(new Error("WebP 转æ¢å¤±è´¥"));URL.revokeObjectURL(s.src)},"image/webp",.92)},s.onerror=()=>{URL.revokeObjectURL(s.src),o(new Error("å¾çå 载失败"))},s.src=URL.createObjectURL(e)})},handleUploadCardMouseMove(e){const t=this.$refs.uploadCardGlow;if(!t)return;const o=e.currentTarget.getBoundingClientRect(),s=e.clientX-o.left,l=e.clientY-o.top;t.style.opacity="1",t.style.left=s+"px",t.style.top=l+"px"},handleUploadCardMouseLeave(){const e=this.$refs.uploadCardGlow;e&&(e.style.opacity="0")}},beforeDestroy(){this.retryTimer&&clearTimeout(this.retryTimer)}};const Ut=(0,z.A)(Lt,[["render",pt],["__scopeId","data-v-a12d47f4"]]);var Tt=Ut,St=o(732),$t=o(2224),Mt=o(2359);o(9104);function _t(e,t,o,s,l,a){const n=Mt.s9;return(0,i.uX)(),(0,i.Wv)(n,{ref:"autocompleteRef",modelValue:a.inputValue,"onUpdate:modelValue":t[0]||(t[0]=e=>a.inputValue=e),class:"directory-suggestion-input","popper-class":l.showSuggestions?"directory-suggestion-popper":"directory-suggestion-popper-hidden","hide-loading":!0,placeholder:o.placeholder,"value-key":"value","fetch-suggestions":a.querySuggestions,"trigger-on-focus":!0,debounce:0,"fit-input-width":!1,placement:"bottom",onFocus:a.handleFocus,onBlur:a.handleBlur,onSelect:a.handleSelect},null,8,["modelValue","popper-class","placeholder","fetch-suggestions","onFocus","onBlur","onSelect"])}var xt={name:"DirectorySuggestionInput",props:{modelValue:{type:String,default:""},placeholder:{type:String,default:"ä¸ä¼ ç®å½"}},emits:["update:modelValue","focus","blur","select"],data(){return{directoryTreeRoot:null,directoryTreeLoaded:!1,directoryTreeLoading:!1,directoryChildrenMap:{},focusTime:null,showSuggestions:!1,isFocused:!1}},computed:{inputValue:{get(){return this.modelValue},set(e){this.$emit("update:modelValue",e)}}},methods:{handleFocus(){this.isFocused=!0,this.focusTime=Date.now(),this.showSuggestions=!1,setTimeout(()=>{this.isFocused&&(this.showSuggestions=!0)},500),this.ensureDirectoryTreeLoaded(),this.$emit("focus")},handleBlur(){this.isFocused=!1,this.showSuggestions=!1,this.$emit("blur")},handleSelect(e){const t=e?.value||"";this.$emit("select",t);const o=this.normalizeDirectoryPath(t),s=this.directoryChildrenMap[o];s&&s.length>0&&setTimeout(()=>{const e=this.$refs.autocompleteRef?.inputRef?.input;e&&(e.focus(),e.dispatchEvent(new Event("input")),this.showSuggestions=!0)},50)},normalizeDirectoryPath(e){if(!e)return"/";let t=e;return t.startsWith("/")||(t="/"+t),"/"===t||t.endsWith("/")||(t+="/"),t},buildDirectoryChildrenMap(e){const t={},o=e=>{const s=this.normalizeDirectoryPath(e.path),l=Array.isArray(e.children)?e.children:[];t[s]=l.map(e=>({name:e.name,path:this.normalizeDirectoryPath(e.path)})),l.forEach(o)};o(e),this.directoryChildrenMap=t},async ensureDirectoryTreeLoaded(){if(!this.directoryTreeLoaded&&!this.directoryTreeLoading){this.directoryTreeLoading=!0;try{const e=await ht.A.get("/api/directoryTree",{withAuthCode:!0}),t=e?.data?.tree;t&&(this.directoryTreeRoot=t,this.buildDirectoryChildrenMap(t),this.directoryTreeLoaded=!0)}catch(e){console.error("Failed to load directory tree for autocomplete:",e)}finally{this.directoryTreeLoading=!1}}},parseDirectoryQuery(e){const t=e&&e.startsWith("/")?e:`/${e||""}`,o=t.slice(1),s=o.split("/"),l=s[s.length-1]||"",i=s.slice(0,-1).filter(
1Boolean),a=i.length>0?`/${i.join("/")}/`:"/";return{segmentInput:l,parentPath:a}},getDirectorySuggestions(e){const{segmentInput:t,parentPath:o}=this.parseDirectoryQuery(e),s=this.directoryChildrenMap[o]||[];if(!t)return s.slice(0,10).map(e=>({value:e.path}));const l=t.toLowerCase(),i=s.filter(e=>e.name.toLowerCase().startsWith(l)).map(e=>({value:e.path}));return i.slice(0,10)},async querySuggestions(e,t){await this.ensureDirectoryTreeLoaded();let o=0;if(this.focusTime){const e=Date.now()-this.focusTime;e<500&&(o=500-e)}o>0?setTimeout(()=>{t(this.getDirectorySuggestions(e))},o):t(this.getDirectorySuggestions(e))}}};const Rt=(0,z.A)(xt,[["render",_t],["__scopeId","data-v-380a271e"]]);var Et=Rt,At=o(4453);const Dt={class:"container"},It={class:"upload-home"},Nt={href:"https://cfbed.sanyue.de/qa/",target:"_blank",class:"info-container"},Pt={class:"toolbar-manage"},Wt={class:"toolbar"},Vt={class:"header"},zt={class:"title"},Bt={class:"main-title",href:"https://github.com/MarSeventh/CloudFlare-ImgBed",target:"_blank"},Ht={class:"dialog-section"},Xt={class:"section-content"},Qt={class:"dialog-section"},jt={class:"section-header"},Ot={class:"section-content"},qt={class:"setting-item"},Gt={key:0,class:"setting-item"},Kt={class:"dialog-action"},Jt=["innerHTML"],Yt={class:"dialog-footer"};function Zt(e,t,o,n,r,d){const c=At.A,u=(0,i.g2)("font-awesome-icon"),p=s.R7,h=Et,m=G.WK,f=l.S2,g=$t.A,y=tt.c6,b=tt.Iy,C=tt.dW,k=St.A,v=Tt,w=J.ll,F=J.MQ,L=q.qi,U=Q.kZ,T=_e,S=X.A,$=H;return(0,i.uX)(),(0,i.CE)("div",Dt,[(0,i.Lk)("div",It,[(0,i.bF)(c,{class:"toggle-dark-button desktop-only"}),(0,i.bF)(p,{content:"æ¥çææ¡£",placement:"bottom",disabled:d.disableTooltip},{default:(0,i.k6)(()=>[(0,i.Lk)("a",Nt,[(0,i.bF)(u,{icon:"book",class:"info-icon",size:"lg"})])]),_:1},8,["disabled"]),(0,i.Lk)("div",{class:(0,a.C4)(["upload-folder-container",{"no-announcement":!d.announcementAvailable}])},[(0,i.Lk)("div",{class:(0,a.C4)(["upload-folder",{active:r.isFolderInputActive}])},[d.showDirectorySuggestions?((0,i.uX)(),(0,i.Wv)(h,{key:0,modelValue:r.uploadFolder,"onUpdate:modelValue":t[0]||(t[0]=e=>r.uploadFolder=e),class:"inner-folder-input",placeholder:"ä¸ä¼ ç®å½",onFocus:d.handleFolderInputFocus,onBlur:d.handleFolderInputBlur,onSelect:d.handleDirectorySelect},null,8,["modelValue","onFocus","onBlur","onSelect"])):((0,i.uX)(),(0,i.Wv)(m,{key:1,class:"inner-folder-input",modelValue:r.uploadFolder,"onUpdate:modelValue":t[1]||(t[1]=e=>r.uploadFolder=e),placeholder:"ä¸ä¼ ç®å½",onFocus:d.handleFolderInputFocus,onBlur:d.handleFolderInputBlur},null,8,["modelValue","onFocus","onBlur"]))],2),d.showDirectorySuggestions?((0,i.uX)(),(0,i.Wv)(g,{key:0,"current-directory":r.uploadFolder,source:"upload",onSelect:d.handleDirectorySelect},{trigger:(0,i.k6)(()=>[(0,i.bF)(f,{class:"directory-tree-trigger"},{default:(0,i.k6)(()=>[(0,i.bF)(u,{icon:"folder-tree"})]),_:1})]),_:1},8,["current-directory","onSelect"])):(0,i.Q3)("",!0)],2),(0,i.bF)(p,{content:"忢ä¸ä¼ æ¹å¼",placement:"bottom",disabled:d.disableTooltip},{default:(0,i.k6)(()=>[(0,i.bF)(f,{class:"upload-method-button desktop-only",onClick:d.handleChangeUploadMethod},{default:(0,i.k6)(()=>["default"===r.uploadMethod?((0,i.uX)(),(0,i.Wv)(u,{key:0,icon:"folder-open",class:"upload-method-icon",size:"lg"})):"paste"===r.uploadMethod?((0,i.uX)(),(0,i.Wv)(u,{key:1,icon:"paste",class:"upload-method-icon",size:"lg"})):(0,i.Q3)("",!0)]),_:1},8,["onClick"])]),_:1},8,["disabled"]),(0,i.bF)(p,{content:"ä¸ä¼ è®°å½",placement:"bottom",disabled:d.disableTooltip},{default:(0,i.k6)(()=>[(0,i.bF)(f,{class:"history-button desktop-only",onClick:t[2]||(t[2]=e=>r.showHistory=!0)},{default:(0,i.k6)(()=>[(0,i.bF)(u,{icon:"history",class:"history-icon",size:"lg"})]),_:1})]),_:1},8,["disabled"]),d.announcementAvailable?((0,i.uX)(),(0,i.Wv)(p,{key:0,content:"æ¥çå
¬å",placement:"bottom",disabled:d.disableTooltip},{default:(0,i.k6)(()=>[(0,i.bF)(f,{class:"announcement-button desktop-only",onClick:d.handleShowAnnouncement},{default:(0,i.k6)(()=>[(0,i.bF)(u,{icon:"bullhorn",class:"announcement-icon",size:"lg"})]),_:1},8,["onClick"])]),_:1},8,["disabled"])):(0,i.Q3)("",!0),(0,i.bF)(C,{class:"mobile-more-dropdown mobile-only",trigger:"click",onCommand:d.handleMobileMenuCommand},{dropdown:(0,i.k6)(()=>[(0,i.bF)(b,null,{default:(0,i.k6)(()=>[(0,i.bF)(y,{command:"toggleTheme"},{default:(0,i.k6)(()=>[(0,i.bF)(u,{icon:d.getThemeIcon(),style:{"margin-right":"8px"}},null,8,["icon"]),(0,i.eW)(" "+(0,a.v_)(d.getThemeText()),1)]),_:1}),(0,i.bF)(y,{command:"toggleUploadMethod"},{default:(0,i.k6)(()=>[(0,i.bF)(u,{icon:"default"===r.uploadMethod?"paste":"folder-open",style:{"margin-right":"8px"}},null,8,["icon"]),(0,i.eW)(" "+(0,a.v_)("default"===r.uploadMethod?"ç²è´´ä¸ä¼ ":"æä»¶ä¸ä¼ "),1)]),_:1}),(0,i.bF)(y,{command:"showHistory"},{default:(0,i.k6)(()=>[(0,i.bF)(u,{icon:"history",style:{"margin-right":"8px"}}),t[22]||(t[22]=(0,i.eW)(" ä¸ä¼ è®°å½ ",-1))]),_:1}),(0,i.bF)(y,{command:"showAnnouncement",disabled:!d.announcementAvailable},{default:(0,i.k6)(()=>[(0,i.bF)(u,{icon:"bullhorn",style:{"margin-right":"8px"}}),t[23]||(t[23]=(0,i.eW)(" æ¥çå
¬å ",-1))]),_:1},8,["disabled"])]),_:1})]),default:(0,i.k6)(()=>[(0,i.bF)(f,{class:"mobile-more-button"},{default:(0,i.k6)(()=>[(0,i.bF)(u,{icon:"ellipsis-v",size:"lg"})]),_:1})]),_:1},8,["onCommand"]),(0,i.Lk)("div",Pt,[(0,i.bF)(f,{class:(0,a.C4)(["toolbar-manage-button",{active:r.isToolBarOpen}]),size:"large",onClick:d.handleOpenToolbar,circle:""},{default:(0,i.k6)(()=>[r.isToolBarOpen?((0,i.uX)(),(0,i.Wv)(u,{key:1,icon:"times",class:"manage-icon",size:"lg"})):((0,i.uX)(),(0,i.Wv)(u,{key:0,icon:"bars",class:"manage-icon",size:"lg"}))]),_:1},8,["class","onClick"])]),(0,i.Lk)("div",Wt,[(0,i.bF)(p,{disabled:d.disableTooltip,content:"ä¸ä¼ 设置",placement:"top"},{default:(0,i.k6)(()=>[(0,i.bF)(f,{class:(0,a.C4)(["toolbar-button compress-button",{active:r.isToolBarOpen}]),size:"large",onClick:d.openCompressDialog,circle:""},{default:(0,i.k6)(()=>[(0,i.bF)(u,{icon:"cloud-upload",class:"compress-icon",size:"lg"})]),_:1},8,["class","onClick"])]),_:1},8,["disabled"]),(0,i.bF)(p,{disabled:d.disableTooltip,content:"龿¥æ ¼å¼",placement:"left"},{default:(0,i.k6)(()=>[(0,i.bF)(f,{class:(0,a.C4)(["toolbar-button link-button",{active:r.isToolBarOpen}]),size:"large",onClick:d.openUrlDialog,circle:""},{default:(0,i.k6)(()=>[(0,i.bF)(u,{icon:"link",class:"link-icon",size:"lg"})]),_:1},8,["class","onClick"])]),_:1},8,["disabled"]),(0,i.bF)(p,{disabled:d.disableTooltip,content:"ç³»ç»ç®¡ç",placement:"left"},{default:(0,i.k6)(()=>[(0,i.bF)(f,{class:(0,a.C4)(["toolbar-button config-button",{active:r.isToolBarOpen}]),size:"large",onClick:d.handleManage,circle:""},{default:(0,i.k6)(()=>[(0,i.bF)(u,{icon:"cog",class:"config-icon",size:"lg"})]),_:1},8,["class","onClick"])]),_:1},8,["disabled"]),(0,i.bF)(p,{disabled:d.disableTooltip,content:"éåºç»å½",placement:"left"},{default:(0,i.k6)(()=>[(0,i.bF)(f,{class:(0,a.C4)(["toolbar-button sign-out-button",{active:r.isToolBarOpen}
1]),size:"large",onClick:d.handleLogout,circle:""},{default:(0,i.k6)(()=>[(0,i.bF)(u,{icon:"sign-out-alt",class:"sign-out-icon",size:"lg"})]),_:1},8,["class","onClick"])]),_:1},8,["disabled"])]),(0,i.bF)(k,{useConfigLink:!0}),(0,i.Lk)("div",Vt,[(0,i.Lk)("h1",zt,[(0,i.Lk)("a",Bt,(0,a.v_)(d.ownerName),1),t[24]||(t[24]=(0,i.eW)(" ImgHub",-1))])]),(0,i.bF)(v,{selectedUrlForm:r.selectedUrlForm,customerCompress:r.customerCompress,compressQuality:r.compressQuality,compressBar:r.compressBar,serverCompress:r.serverCompress,uploadChannel:r.uploadChannel,channelName:r.channelName,uploadNameType:r.uploadNameType,useCustomUrl:r.useCustomUrl,customUrlPrefix:r.customUrlPrefix,autoRetry:r.autoRetry,urlPrefix:d.urlPrefix,uploadMethod:r.uploadMethod,uploadFolder:r.uploadFolder,convertToWebp:r.convertToWebp,class:"upload"},null,8,["selectedUrlForm","customerCompress","compressQuality","compressBar","serverCompress","uploadChannel","channelName","uploadNameType","useCustomUrl","customUrlPrefix","autoRetry","urlPrefix","uploadMethod","uploadFolder","convertToWebp"]),(0,i.bF)(U,{title:"龿¥æ ¼å¼è®¾ç½®",modelValue:r.showUrlDialog,"onUpdate:modelValue":t[7]||(t[7]=e=>r.showUrlDialog=e),width:d.dialogWidth,"show-close":!1,class:"settings-dialog"},{default:(0,i.k6)(()=>[(0,i.Lk)("div",Ht,[t[29]||(t[29]=(0,i.Lk)("div",{class:"section-header"},[(0,i.Lk)("span",{class:"section-title"},"é»è®¤å¤å¶é¾æ¥")],-1)),(0,i.Lk)("div",Xt,[(0,i.bF)(F,{modelValue:r.selectedUrlForm,"onUpdate:modelValue":t[3]||(t[3]=e=>r.selectedUrlForm=e),onChange:d.changeUrlForm,class:"radio-card-group grid-2x2"},{default:(0,i.k6)(()=>[(0,i.bF)(w,{value:"url",class:"radio-card"},{default:(0,i.k6)(()=>[(0,i.bF)(u,{icon:"link",class:"radio-icon"}),t[25]||(t[25]=(0,i.Lk)("span",null,"åå§é¾æ¥",-1))]),_:1}),(0,i.bF)(w,{value:"md",class:"radio-card"},{default:(0,i.k6)(()=>[(0,i.bF)(u,{icon:"code",class:"radio-icon"}),t[26]||(t[26]=(0,i.Lk)("span",null,"MarkDown",-1))]),_:1}),(0,i.bF)(w,{value:"html",class:"radio-card"},{default:(0,i.k6)(()=>[(0,i.bF)(u,{icon:"code-branch",class:"radio-icon"}),t[27]||(t[27]=(0,i.Lk)("span",null,"HTML",-1))]),_:1}),(0,i.bF)(w,{value:"ubb",class:"radio-card"},{default:(0,i.k6)(()=>[(0,i.bF)(u,{icon:"quote-right",class:"radio-icon"}),t[28]||(t[28]=(0,i.Lk)("span",null,"BBCode",-1))]),_:1})]),_:1},8,["modelValue","onChange"])])]),(0,i.Lk)("div",Qt,[(0,i.Lk)("div",jt,[t[30]||(t[30]=(0,i.Lk)("span",{class:"section-title"},"èªå®ä¹é¾æ¥",-1)),(0,i.bF)(p,{content:"é»è®¤é¾æ¥ä¸ºhttps://your.domain/file/xxx.jpg <br> 妿å¯ç¨èªå®ä¹é¾æ¥æ ¼å¼ï¼åªä¿çxxx.jpgé¨åï¼å
¶ä»é¨å请èªè¡è¾å
¥",placement:"top","raw-content":""},{default:(0,i.k6)(()=>[(0,i.bF)(u,{icon:"question-circle",class:"section-help-icon"})]),_:1})]),(0,i.Lk)("div",Ot,[(0,i.Lk)("div",qt,[t[31]||(t[31]=(0,i.Lk)("span",{class:"setting-label"},"å¯ç¨èªå®ä¹",-1)),(0,i.bF)(L,{modelValue:r.useCustomUrl,"onUpdate:modelValue":t[4]||(t[4]=e=>r.useCustomUrl=e),"active-value":"true","inactive-value":"false"},null,8,["modelValue"])]),"true"===r.useCustomUrl?((0,i.uX)(),(0,i.CE)("div",Gt,[t[32]||(t[32]=(0,i.Lk)("span",{class:"setting-label"},"èªå®ä¹åç¼",-1)),(0,i.bF)(m,{modelValue:r.customUrlPrefix,"onUpdate:modelValue":t[5]||(t[5]=e=>r.customUrlPrefix=e),placeholder:"请è¾å
¥èªå®ä¹é¾æ¥åç¼",class:"setting-input"},null,8,["modelValue"])])):(0,i.Q3)("",!0)])]),(0,i.Lk)("div",Kt,[(0,i.bF)(f,{type:"primary",onClick:t[6]||(t[6]=e=>r.showUrlDialog=!1),class:"confirm-btn"},{default:(0,i.k6)(()=>[...t[33]||(t[33]=[(0,i.eW)("ç¡®å®",-1)])]),_:1})])]),_:1},8,["modelValue","width"]),(0,i.bF)(T,{modelValue:r.showCompressDialog,"onUpdate:modelValue":t[8]||(t[8]=e=>r.showCompressDialog=e),uploadChannel:r.uploadChannel,"onUpdate:uploadChannel":t[9]||(t[9]=e=>r.uploadChannel=e),channelName:r.channelName,"onUpdate:channelName":t[10]||(t[10]=e=>r.channelName=e),currentChannelList:d.currentChannelList,uploadFolder:r.uploadFolder,"onUpdate:uploadFolder":t[11]||(t[11]=e=>r.uploadFolder=e),autoRetry:r.autoRetry,"onUpdate:autoRetry":t[12]||(t[12]=e=>r.autoRetry=e),uploadNameType:r.uploadNameType,"onUpdate:uploadNameType":t[13]||(t[13]=e=>r.uploadNameType=e),convertToWebp:r.convertToWebp,"onUpdate:convertToWebp":t[14]||(t[14]=e=>r.convertToWebp=e),customerCompress:r.customerCompress,"onUpdate:customerCompress":t[15]||(t[15]=e=>r.customerCompress=e),compressBar:r.compressBar,"onUpdate:compressBar":t[16]||(t[16]=e=>r.compressBar=e),compressQuality:r.compressQuality,"onUpdate:compressQuality":t[17]||(t[17]=e=>r.compressQuality=e),serverCompress:r.serverCompress,"onUpdate:serverCompress":t[18]||(t[18]=e=>r.serverCompress=e)},null,8,["modelValue","uploadChannel","channelName","currentChannelList","uploadFolder","autoRetry","uploadNameType","convertToWebp","customerCompress","compressBar","compressQuality","serverCompress"])]),(0,i.bF)(S,{class:"footer"}),(0,i.bF)(U,{title:"å
¬å",modelValue:r.showAnnouncementDialog,"onUpdate:modelValue":t[20]||(t[20]=e=>r.showAnnouncementDialog=e),width:d.dialogWidth,"show-close":!1,"close-on-click-modal":!1,"close-on-press-escape":!1,center:""},{footer:(0,i.k6)(()=>[(0,i.Lk)("span",Yt,[(0,i.bF)(f,{type:"primary",onClick:t[19]||(t[19]=e=>r.showAnnouncementDialog=!1)},{default:(0,i.k6)(()=>[...t[34]||(t[34]=[(0,i.eW)("æå·²ç¥æï¼",-1)])]),_:1})])]),default:(0,i.k6)(()=>[(0,i.Lk)("div",{innerHTML:r.announcementContent},null,8,Jt)]),_:1}
1,8,["modelValue","width"]),(0,i.bF)($,{show:r.showHistory,onClose:t[21]||(t[21]=e=>r.showHistory=!1)},null,8,["show"])])}o(3579);var eo=o(8903),to=o(144),oo=o(4570),so=o.n(oo),lo=o(2388),io={name:"UploadHome",mixins:[eo.A],data(){return{selectedUrlForm:(0,to.KR)(""),showUrlDialog:!1,showCompressDialog:!1,customerCompress:!0,compressQuality:4,compressBar:5,convertToWebp:!1,serverCompress:!0,uploadChannel:"",channelName:"",availableChannels:{},uploadNameType:"",customUrlPrefix:"",useCustomUrl:"false",autoRetry:!0,useDefaultWallPaper:!1,isToolBarOpen:!1,uploadMethod:"default",uploadFolder:"",isFolderInputActive:!1,showAnnouncementDialog:!1,announcementContent:"",showHistory:!1,themeMode:"auto"}},watch:{customerCompress(e){this.updateCompressConfig("customerCompress",e)},compressQuality(e){this.updateCompressConfig("compressQuality",e)},compressBar(e){null===e||void 0===e||e<1?this.compressBar=1:(this.compressQuality>e&&(this.compressQuality=e),this.updateCompressConfig("compressBar",e))},serverCompress(e){this.updateCompressConfig("serverCompress",e)},convertToWebp(e){this.updateCompressConfig("convertToWebp",e)},uploadChannel(e){this.updateStoreUploadChannel(e);const t=this.availableChannels[e]||[],o=this.storeChannelName;o&&t.some(e=>e.name===o)?this.channelName=o:this.channelName=""},channelName(e){this.$store.commit("setStoreChannelName",e||"")},uploadNameType(e){this.updateStoreUploadNameType(e)},customUrlPrefix(e){this.$store.commit("setCustomUrlSettings",{key:"customUrlPrefix",value:e})},useCustomUrl(e){this.$store.commit("setCustomUrlSettings",{key:"useCustomUrl",value:e})},autoRetry(e){this.$store.commit("setStoreAutoRetry",e)},uploadFolder(e){if(this.validateUploadFolder(e,!1)){const t=(0,lo.G)(e,{strict:!0});t.valid&&this.$store.commit("setStoreUploadFolder",e)}else this.$nextTick(()=>{this.uploadFolder=this.storeUploadFolder})}},computed:{...(0,ft.L8)(["userConfig","uploadCopyUrlForm","compressConfig","storeUploadChannel","storeChannelName","storeUploadNameType","customUrlSettings","storeAutoRetry","storeUploadMethod","storeUploadFolder"]),ownerName(){return this.userConfig?.ownerName||"Sanyue"},dialogWidth(){return window.innerWidth>768?"50%":"90%"},disableTooltip(){return window.innerWidth<768},urlPrefix(){return this.userConfig?.urlPrefix||`${window.location.protocol}//${window.location.host}/file/`},announcementAvailable(){return!!this.userConfig?.announcement},showDirectorySuggestions(){return this.userConfig?.showDirectorySuggestions??!1},currentChannelList(){return this.availableChannels[this.uploadChannel]||[]}}
1,mounted(){this.initializeBackground("uploadBkImg",".container",!1,!0),this.selectedUrlForm=this.uploadCopyUrlForm||"url",this.customerCompress=this.compressConfig.customerCompress??this.parseBoolean(this.userConfig?.defaultCustomerCompress,!0),this.compressQuality=this.compressConfig.compressQuality??this.parseNumber(this.userConfig?.defaultCompressQuality,4),this.compressBar=this.compressConfig.compressBar??this.parseNumber(this.userConfig?.defaultCompressBar,5),this.serverCompress=this.compressConfig.serverCompress??!0,this.convertToWebp=this.compressConfig.convertToWebp??this.parseBoolean(this.userConfig?.defaultConvertToWebp,!1),this.uploadChannel=this.storeUploadChannel||this.userConfig?.defaultUploadChannel||"telegram",this.autoRetry=this.storeAutoRetry,this.uploadNameType=this.storeUploadNameType||this.userConfig?.defaultUploadNameType||"default",this.customUrlPrefix=this.customUrlSettings.customUrlPrefix,this.useCustomUrl=this.customUrlSettings.useCustomUrl,this.uploadMethod=this.storeUploadMethod,this.fetchAvailableChannels(),this.uploadFolder=this.storeUploadFolder||this.userConfig?.defaultUploadFolder||"";const e=this.$store.getters.cusDarkMode,t=this.$store.getters.useDarkMode;this.themeMode=e?t?"dark":"light":"auto";const o=localStorage.getItem("visitedUploadHome"),s=this.userConfig?.announcement;!o&&s&&(this.announcementContent=s,this.showAnnouncementDialog=!0,localStorage.setItem("visitedUploadHome","true"))},components:{UploadForm:Tt,Footer:X.A,ToggleDark:At.A,Logo:St.A,UploadHistory:H,UploadSettingsDialog:_e,DirectoryTreePicker:$t.A,DirectorySuggestionInput:Et},methods:{async fetchAvailableChannels(){try{const e=await ht.A.get("/api/channels",{withAuthCode:!0});if(e.data){this.availableChannels=e.data;const t=this.storeChannelName,o=this.userConfig?.defaultChannelName,s=this.availableChannels[this.uploadChannel]||[];t&&s.some(e=>e.name===t)?this.channelName=t:""!==t&&null!==t&&void 0!==t||""!==t&&o&&s.some(e=>e.name===o)&&(this.channelName=o)}}catch(e){console.error("Failed to fetch available channels:",e)}},validateUploadFolder(e,t=!0){e&&!e.startsWith("/")&&(e="/"+e,this.uploadFolder=e);const o=(0,lo.G)(e,{strict:t});if(!o.valid){const e=o.error.replace("ç®æ ç®å½","ä¸ä¼ ç®å½");return this.$message.error(e),!1}return!0},handleFolderInputFocus(){this.isFolderInputActive=!0},handleFolderInputBlur(){this.isFolderInputActive=!1,this.uploadFolder&&!this.uploadFolder.startsWith("/")&&(this.uploadFolder="/"+this.uploadFolder),this.validateUploadFolder(this.uploadFolder,!0)||this.$nextTick(()=>{this.uploadFolder=this.storeUploadFolder})},handleManage(){this.$router.push("/dashboard")},parseBoolean(e,t){return void 0===e||null===e?t:"boolean"===typeof e?e:"string"===typeof e?"true"===e:t},parseNumber(e,t){if(void 0===e||null===e)return t;const o=parseFloat(e);return isNaN(o)?t:o},openUrlDialog(){this.showUrlDialog=!0},handleLogout(){so().remove("authCode"),this.$router.push("/login"),this.$message.success("å·²éåºç»å½")},changeUrlForm(){this.$store.commit("setUploadCopyUrlForm",this.selectedUrlForm)},openCompressDialog(){this.showCompressDialog=!0},updateCompressConfig(e,t){this.$store.commit("setCompressConfig",{key:e,value:t})},updateStoreUploadChannel(e){this.$store.commit("setStoreUploadChannel",e)},updateStoreUploadNameType(e){this.$store.commit("setStoreUploadNameType",e)},handleOpenToolbar(){this.isToolBarOpen=!this.isToolBarOpen,setTimeout(()=>{const e=document.querySelectorAll(".toolbar-button");e.forEach(e=>{e.style.pointerEvents=this.isToolBarOpen?"auto":"none"})},300)},handleChangeUploadMethod(){this.uploadMethod="default"===this.uploadMethod?"paste":"default",this.$store.commit("setUploadMethod",this.uploadMethod)},handleMobileMenuCommand(e){"toggleTheme"===e?"auto"===this.themeMode?(this.themeMode="light",this.$store.commit("setCusDarkMode",!0),this.$store.commit("setUseDarkMode",!1)):"light"===this.themeMode?(this.themeMode="dark",this.$store.commit("setCusDarkMode",!0),this.$store.commit("setUseDarkMode",!0)):(this.themeMode="auto",this.$store.commit("setCusDarkMode",!1)):"toggleUploadMethod"===e?this.handleChangeUploadMethod():"showHistory"===e?this.showHistory=!0:"showAnnouncement"===e&&this.handleShowAnnouncement()},getThemeIcon(){return"auto"===this.themeMode?"sun":"light"===this.themeMode?"moon":"adjust"},getThemeText(){return"auto"===this.themeMode?"æµ è²æ¨¡å¼":"light"===this.themeMode?"æ·±è²æ¨¡å¼":"èªå¨æ¨¡å¼"},handleShowAnnouncement(){const e=this.userConfig?.announcement;e?(this.announcementContent=e,this.showAnnouncementDialog=!0):this.$message.info("ææ å ¬å")},handleDirectorySelect(e){this.uploadFolder=e,this.validateUploadFolder(e,!0)&&this.$store.commit("setStoreUploadFolder",e)}}};const ao=(0,z.A)(io,[["render",Zt],["__scopeId","data-v-1db22ef8"]]);var no=ao},4396:function(e,t,o){"use strict";o(5331),o(4885)},4885:function(e,t,o){"use strict";o(5331)},5385:function(e,t,o){"use strict";o(5331)},5616:function(e,t,o){"use strict";o(5331),o(7197)},5970:function(e,t,o){"use strict";o(5331)},6334:function(e,t,o){e.exports=o(1393)},6682:function(e,t,o){"use strict";e.exports=o.p+"img/404.8ed11fb3.png"},6808:function(e,t,o){"use strict";o(5331),o(8785),o(200),o(5970),o(9104)},7952:function(e,t,o){"use strict";o(5331),o(7197)},8075:function(e,t,o){"use strict";o(5331)},8736:function(e,t,o){"use strict";o(5331)},8785:function(e,t,o){"use strict";o(5331)},8830:function(e,t,o){"use strict";o(5331)},9104:function(e,t,o){"use strict";o(5331)},9899:function(e,t,o){"use strict";o(5331)}}]); 2//# sourceMappingURL=403.5d691f8f.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.