hortimagic 1.1.3 → 1.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/hortimagic.iife.js +79 -109
- package/dist/hortimagic.js +81 -111
- package/dist/hortimagic.txt +81 -111
- package/dist/hortimagic.user.js +81 -111
- package/dist/index.d.ts +57 -40
- package/package.json +2 -2
- package/src/apps/log-app.ts +18 -33
- package/src/components/hm-icon.ts +3 -2
- package/src/components/hm-input.ts +26 -8
- package/src/components/hm-select.ts +88 -144
- package/src/components/hm-swipe-cell.ts +2 -6
- package/src/components/hm-switch.ts +2 -1
package/dist/hortimagic.iife.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var hortimagic=function(t){"use strict";async function e(t){return new Promise(e=>setTimeout(e,t))}function o(t){return t=(t=(t=(t=(t=(t=t.replace("&","&")).replace("<","<")).replace(">",">")).replace('"',""")).replace("'","'")).replace("\\","\")}function i(t){return t=(t=(t=(t=(t=(t=t.replace("<","<")).replace(">",">")).replace(""",'"')).replace("'","'")).replace("\","\\")).replace("&","&")}function n(){return window.myself?window.myself:null}function s(){return window.uid?window.uid:null}function r(){return window.inputcolorhex?window.inputcolorhex:null}const l=Object.freeze(Object.defineProperty({__proto__:null,addStyle:function(t){let e=document.createElement("style");e.innerText=t,document.body.append(e)},changeRoom:function(t){(t=String(t))&&window.Objs.mapHolder?.function?.roomchanger(t)},compressCSS:function(t){return t=(t=(t=(t=(t=t.replace(/\s{2,}/g," ")).replace(/\/\*[\s\S]*?\*\//g,"")).replace(/\s*([{};:,])\s*/g,"$1")).replace(/;\s*}/g,"}")).trim()},compressHTML:function(t){return t=(t=(t=(t=t.replace(/>\s+</g,"><")).replace(/\s{2,}/g," ")).replace(/<!--[\s\S]*?-->/g,"")).trim()},generatePrivateMessageBubble:function(t,e,i){window.privatechatfunc&&window.privatechatfunc([Math.floor(Date.now()/1e3).toString(10),s(),o(n()),o(window.avatar2&&window.avatarconv?window.avatarconv(window.avatar2):null),o(e),o(r()),"",o(r()),"","",i,t,"","","","",""].join(">"))},getAllOnlineUserInfo:function(){let t=window.Objs.mapHolder.Assets.userJson;return t?Object.keys(t).map(e=>{let o=t[e];return{name:o[2],uid:o[8],color:o[3],avatar:o[0],roomId:o[4],personalizedSignature:o[6]}}):null},getOnlineUserInfoById:function(t){t=String(t);let e=window.Objs.mapHolder?.function?.findUserByUid?.(t);return e?{name:e[2],uid:t,color:e[3],avatar:e[0],roomId:e[4],personalizedSignature:e[6]}:null},getRoomId:function(){return window.roomn?window.roomn:null},getRoomInfoById:function(t){let e=window.Objs.mapHolder?.Assets?.roomJson?.[t];if(e){let t=e[5].split("&&").map(t=>t.split(" & ")),o=i(t[0][0]),n=o.indexOf(" ");return{name:e[1],color:e[2],roomPath:e[0].split("_"),description:o.slice(n+1),roomImage:o.slice(0,n),currentUserNum:"number"==typeof e[7]?e[7]:"hidden",ownerName:t[1][0],member:t[4].map(t=>({name:i(t.slice(1)),auth:"0"==t[0]?"member":"1"==t[0]?"admin":"unknow"}))}}return null},getUserInputColor:r,getUserName:n,getUserUid:s,htmlSpecialCharsDecode:i,htmlSpecialCharsEscape:o,sleep:e,switchRoom:function(t){window.Objs.mapHolder?.function?.roomchanger&&window.Objs.mapHolder.function.roomchanger(t)}},Symbol.toStringTag,{value:"Module"}));class a{constructor(){this.timeStamp="",this.headPortrait="",this.name="",this.message="",this.color="",this.gender="",this.uid="",this.designation="",this.messageUid=""}}class c{constructor(){this.timeStamp="",this.headPortrait="",this.name="",this.message="",this.color="",this.gender="",this.uid="",this.messageUid=""}}class h{constructor(){this.messageName="",this.uid="",this.data=""}}class d{constructor(){this.username="",this.avatar="",this.message="",this.color="",this.gender="",this.timeStamp="",this.uid=""}}class p{constructor(){this.privateUID="",this.uid="",this.messageUid="",this.dataUid=""}}class u{constructor(){this.userMessageList=[]}}class g{constructor(){this.result="",this.stockPrice=NaN,this.totalStock=NaN,this.holdingAmount=NaN,this.totalEquity=NaN,this.balance=NaN}}class m{constructor(){this.message=""}}const f=Object.freeze(Object.defineProperty({__proto__:null,Danmu:d,Hidden:h,Private:c,Public:a,Stock:g,System:u,Unkonw:m,Withdrawn:p},Symbol.toStringTag,{value:"Module"}));let v=[];function b(t){return t instanceof a?"public":t instanceof c?"private":t instanceof h?"hidden":t instanceof d?"danmu":t instanceof p?"withdrawn":t instanceof u?"system":t instanceof g?"stock":"unknown"}function y(t){let e=new a,o=t.split(">");return e.timeStamp=o[0],e.headPortrait=o[1],e.name=o[2],e.message=o[3],e.color=o[5],e.gender=o[6],e.uid=o[8],e.designation=o[9],e.messageUid=o[10],e}function w(t){let e=new c,o=t.split(">");return e.timeStamp=o[0].slice(1),e.uid=o[1],e.name=o[2],e.headPortrait=o[3],e.message=o[4],e.color=o[5],e.gender=o[8],e.messageUid=o[10],e}function x(t){let e=new d,o=t.split(">");return e.username=o[0],e.message=o[1],e.color=o[2],e.gender=o[4],e.avatar=o[5],e.timeStamp=o[6],e.uid=o[7],e}function $(t){if(v=[],/^"[^"].*/gs.test(t)){let e=t.slice(1).split("<");for(let t=e.length-1;t>=0;t--)v.push(y(e[t]))}else if(/^"".*/gs.test(t)){let e=t.slice(1).split("<");for(let t=e.length-1;t>=0;t--)v.push(w(e[t]))}else if(/^=.*/gs.test(t)){let e=t.slice(1).split("<");for(let t=e.length-1;t>=0;t--)v.push(x(e[t]))}else/^[/]<.*>[0-9|a-z]{13}:.*/gs.test(t)?v.push(function(t){let e,o=new h;return e=t.match(/(?<=^[/]<).*(?=>[0-9|a-z]{13}:.*)/gs),o.messageName=null==e?"":e[0],e=t.match(/(?<=^[/]<.*>)[0-9|a-z]{13}(?=:.*)/gs),o.uid=null==e?"":e[0],e=t.match(/(?<=^[/]<.*>[0-9|a-z]{13}:).*/gs),o.data=null==e?"":e[0],o}(t)):/^v0.*/gs.test(t)?v.push(function(t){let e=new p;return"#"==t[2]?(e.privateUID="",e.uid=t.slice(3,16),e.messageUid=t.slice(17,29),e.dataUid=t.slice(3,29)):(e.privateUID=t.slice(3,16),e.uid=t.slice(17,30),e.messageUid=t.slice(31),e.dataUid=t.slice(17)),e}(t)):/^%\*".*/gs.test(t)?v.push(function(t){let e=new u;return e.userMessageList=t.split("<"),e}(t)):/^>.*/gs.test(t)?v.push(function(t){let e=new g;if(e.result=t[2],"*"==e.result)return e;if(">"==e.result)return e.holdingAmount=parseInt(t.slice(2)),e;if("<"==e.result)return e.balance=parseInt(t.slice(2)),e;{let o=t.split('"');if(5==o.length)return e.stockPrice=parseFloat(o[2]),e.totalStock=parseInt(o[0].slice(1)),e.holdingAmount=parseInt(o[3]),e.totalEquity=parseFloat(o[1]),e.balance=parseFloat(o[4]),e;if(4==o.length)return e.stockPrice=parseFloat(o[1])/parseInt(o[0].slice(1)),e.totalStock=parseInt(o[0].slice(1)),e.holdingAmount=parseInt(o[2]),e.totalEquity=parseFloat(o[1]),e.balance=parseFloat(o[3]),e}return e}(t)):v.push(function(t){let e=new m;return e.message=t,e}(t))}const _=Object.freeze(Object.defineProperty({__proto__:null,decodeMessage:$,judegMessageClass:b,get messageObjList(){return v}},Symbol.toStringTag,{value:"Module"}));class S{constructor(){this.events={}}on(t,e){this.events[t]||(this.events[t]=[]),this.events[t].push(e)}off(t,e){this.events[t]&&(e?this.events[t]=this.events[t].filter(t=>t!==e):delete this.events[t])}once(t,e){const o=(...i)=>{e(...i),this.off(t,o)};this.on(t,o)}emit(t,...e){const o=this.events[t];return!(!o||0===o.length)&&([...o].forEach(t=>t(...e)),!0)}}const k=Symbol(),A=Object.getPrototypeOf,C=new WeakMap,O=t=>(t=>t&&(C.has(t)?C.get(t):A(t)===Object.prototype||A(t)===Array.prototype))(t)&&t[k]||null,E=(t,e=!0)=>{C.set(t,e)},M={},z=t=>"object"==typeof t&&null!==t,H=(t,e)=>{const o=L.get(t);if((null==o?void 0:o[0])===e)return o[1];const i=Array.isArray(t)?[]:Object.create(Object.getPrototypeOf(t));return E(i,!0),L.set(t,[e,i]),Reflect.ownKeys(t).forEach(e=>{if(Object.getOwnPropertyDescriptor(i,e))return;const o=Reflect.get(t,e),{enumerable:n}=Reflect.getOwnPropertyDescriptor(t,e),s={value:o,enumerable:n,configurable:!0};if(P.has(o))E(o,!1);else if(T.has(o)){const[t,e]=T.get(o);s.value=H(t,e())}Object.defineProperty(i,e,s)}),Object.preventExtensions(i)},T=new WeakMap,P=new WeakSet,L=new WeakMap,j=[1],B=new WeakMap;let I=Object.is,D=(t,e)=>new Proxy(t,e),N=t=>z(t)&&!P.has(t)&&(Array.isArray(t)||!(Symbol.iterator in t))&&!(t instanceof WeakMap)&&!(t instanceof WeakSet)&&!(t instanceof Error)&&!(t instanceof Number)&&!(t instanceof Date)&&!(t instanceof String)&&!(t instanceof RegExp)&&!(t instanceof ArrayBuffer)&&!(t instanceof Promise),U=H,F=(t,e,o,i)=>({deleteProperty(t,e){const n=Reflect.get(t,e);o(e);const s=Reflect.deleteProperty(t,e);return s&&i(["delete",[e],n]),s},set(n,s,r,l){const a=!t()&&Reflect.has(n,s),c=Reflect.get(n,s,l);if(a&&(I(c,r)||B.has(r)&&I(c,B.get(r))))return!0;o(s),z(r)&&(r=O(r)||r);const h=!T.has(r)&&N(r)?R(r):r;return e(s,h),Reflect.set(n,s,h,l),i(["set",[s],r,c]),!0}});function R(t={}){if(!z(t))throw new Error("object required");const e=B.get(t);if(e)return e;let o=j[0];const i=new Set,n=(t,e=++j[0])=>{o!==e&&(s=o=e,i.forEach(o=>o(t,e)))};let s=o;const r=t=>(e,o)=>{const i=[...e];i[1]=[t,...i[1]],n(i,o)},l=new Map;let a=!0;const c=F(()=>a,(t,e)=>{const o=!P.has(e)&&T.get(e);if(o){if("production"!==(M?"production":void 0)&&l.has(t))throw new Error("prop listener already exists");if(i.size){const e=o[2](r(t));l.set(t,[o,e])}else l.set(t,[o])}},t=>{var e;const o=l.get(t);o&&(l.delete(t),null==(e=o[1])||e.call(o))},n),h=D(t,c);B.set(t,h);const d=[t,(t=j[0])=>(s!==t&&(s=t,l.forEach(([e])=>{const i=e[1](t);i>o&&(o=i)})),o),t=>{i.add(t),1===i.size&&l.forEach(([t,e],o)=>{if("production"!==(M?"production":void 0)&&e)throw new Error("remove already exists");const i=t[2](r(o));l.set(o,[t,i])});return()=>{i.delete(t),0===i.size&&l.forEach(([t,e],o)=>{e&&(e(),l.set(o,[t]))})}}];return T.set(h,d),Reflect.ownKeys(t).forEach(e=>{const o=Object.getOwnPropertyDescriptor(t,e);"value"in o&&o.writable&&(h[e]=t[e])}),a=!1,h}function V(t,e,o){const i=T.get(t);let n;"production"===(M?"production":void 0)||i||console.warn("Please use proxy object");const s=[],r=i[2];let l=!1;const a=r(t=>{s.push(t),o?e(s.splice(0)):n||(n=Promise.resolve().then(()=>{n=void 0,l&&e(s.splice(0))}))});return l=!0,()=>{l=!1,a()}}const q="store",W="HortimagicStore",G={proxy:R,subscribe:V,snapshot:function(t){const e=T.get(t);"production"===(M?"production":void 0)||e||console.warn("Please use proxy object");const[o,i]=e;return U(o,i())}},X=R({autoSave:!1,logFlag:{log:!1,info:!0,debug:!0,warn:!0,error:!0},messageLogFlag:{send:!1,decode:!1,emit:!0,receive:!1},logListLength:20,scriptList:[]});function J(){localStorage.setItem(W,JSON.stringify(X)),tt.debug(q,"保存至本地存储")}function Z(){let t=localStorage.getItem(W);if(null!=t){const e=JSON.parse(t);e.autoSave?X.autoSave=1==e.autoSave:X.autoSave=!1,e.logFlag?X.logFlag=e.logFlag:isNaN(e.logLevel)&&(X.logFlag=e.logLevel),e.messageLogFlag&&(X.messageLogFlag=e.messageLogFlag),e.scriptList&&(X.scriptList=e.scriptList),e.logListLength&&(X.logListLength=e.logListLength)}else X.logFlag.log=!0,X.logFlag.info=!0,X.logFlag.debug=!0,X.logFlag.warn=!0,X.logFlag.error=!0,X.autoSave=!0,X.logListLength=20,X.messageLogFlag.decode=!1,X.messageLogFlag.emit=!0,X.messageLogFlag.send=!1,X.messageLogFlag.receive=!1,X.scriptList=[],tt.debug(q,"没有读取到配置,使用默认配置"),J();tt.debug(q,"从本地存储加载")}function Y(){Z(),V(X,()=>{X.autoSave&&J()})}const K=Object.freeze(Object.defineProperty({__proto__:null,HortimagicStore:X,initStore:Y,loadStore:Z,reactive:G,saveStore:J},Symbol.toStringTag,{value:"Module"})),Q=new S,tt={log(t,...e){X.logFlag.log&&(Q.emit("log",t,...e),console.log(t,...e))},debug(t,...e){X.logFlag.debug&&(Q.emit("log",t,...e),console.debug(t,...e))},info(t,...e){X.logFlag.info&&(Q.emit("log",t,...e),console.info(t,...e))},warn(t,...e){X.logFlag.warn&&(Q.emit("log",t,...e),console.warn(t,...e))},error(t,...e){X.logFlag.error&&(Q.emit("log",t,...e),console.error(t,...e))}},et=Object.freeze(Object.defineProperty({__proto__:null,logEmitter:Q,logger:tt},Symbol.toStringTag,{value:"Module"})),ot="socket-tools",it=new S;async function nt(){tt.debug(ot,"代理网络");for(let o=0;o<30;o++)try{if(tt.debug(ot,"等待网络连接",o),null==window.socket.__onmessage&&null!=window.socket._onmessage&&null!=window.socket.send){tt.debug(ot,"网络连接成功");break}await e(500);continue}catch(t){tt.error(ot,t)}null==window.socket.__onmessage&&null!=window.socket._onmessage&&null!=window.socket.send?(st.originalSend=window.socket.send,window.socket.send=st.send,st.originalOnmessage=window.socket._onmessage,window.socket._onmessage=st.onmessage):tt.error("连接失败")}const st={beforeSend:async function(t){return t},originalSend:function(t){return t},afterSend:function(t){return t},send:async function(t){X.messageLogFlag.send&&tt.debug(ot,"发送",{message:t});let e=await st.beforeSend(t);try{null!=e&&(st.originalSend(e),st.afterSend(e))}catch(o){tt.error(ot,o)}},beforeOnmessage:async function(t){return X.messageLogFlag.decode&&tt.debug(ot,"解码",{message:t}),$(t),t},originalOnmessage:function(t){return t},afterOnmessage:async function(t){for(let e of v)X.messageLogFlag.emit&&tt.debug(ot,`触发${b(e)}消息`,{message:t,messageObj:e}),it.emit(b(e),e);return t},onmessage:async function(t){X.messageLogFlag.receive&&tt.debug(ot,"接收",{message:t});let e=await st.beforeOnmessage(t);try{null!=e&&(st.originalOnmessage(e),st.afterOnmessage(e))}catch(o){tt.error("捕获到错误",o)}},initSocket:nt},rt=Object.freeze(Object.defineProperty({__proto__:null,initSocket:nt,messageEmitter:it,socketTools:st},Symbol.toStringTag,{value:"Module"}));function lt(t,e){return"cut"===t?`{0${JSON.stringify({m:t,mc:e,i:Math.random().toString().slice(2,12)})}`:JSON.stringify({m:t,mc:e,i:Math.random().toString().slice(2,12)})}const at=Object.freeze(Object.defineProperty({__proto__:null,danmu:function(t,e,o="0"){return`~{"t":"${t}","c":"${e}","v":${o}}`},hidden:function(t,e,o){return`/<${t}>${e}:${o}`},like:function(t,e=""){return`+*${t}${e}`},musicCard:function(t,e,o,i,n,s){return lt(`m__4=${t}>${e}>${o}>${i}>${n}>${s}`,n)},privateChat:function(t,e,o){return JSON.stringify({g:t,m:e,mc:o,i:Math.random().toString().slice(2,12)})},publicChat:lt,stockRequest:function(t){return null==t?">#":t>0?`>$${Math.round(Math.abs(t))}`:t<0?`>@${Math.round(Math.abs(t))}`:">#"},videoCard:function(t,e,o,i,n,s,r){return lt(`m__4*${t}>${e}>${o}>${i}>${n}>${s}>${r}`,n)},withdrawn:function(t,e=""){return""==e?`v0#${t}`:`v0*${e}#${t}`}},Symbol.toStringTag,{value:"Module"})),ct="elements-hooks";let ht={movePanelHolder:document.querySelector("#movePanelHolder"),functionHolder:document.querySelector("#functionHolder"),functionButtonGroupList:[...document.querySelectorAll(".functionButton.functionButtonGroup")],msgholderBox:document.querySelector("#msgholder .fullBox.msgholderBox"),homeHolderMsgBox:document.querySelector("#homeHolder .homeHolderMsgContentBox .homeHolderMsgBox.fullBox"),sessionHolderPmTaskBoxItems:[...document.querySelectorAll(".sessionHolderPmTaskBoxItem.whoisTouch2")],moveinputDisplay:document.querySelector("#moveinputDisplay"),moveinput:document.getElementById("moveinput"),moveinputSendBtnFunc:document.querySelector("#moveinputDisplay #moveinputSendBtnFunc"),moveinputSendBtnSend:document.querySelector("#moveinputDisplay #moveinputSendBtnSend")};function dt(){ht.movePanelHolder=document.querySelector("#movePanelHolder"),ht.functionHolder=document.querySelector("#functionHolder"),ht.functionButtonGroupList=[...document.querySelectorAll(".functionButton.functionButtonGroup")],ht.msgholderBox=document.querySelector("#msgholder .fullBox .fullBox.msgholderBox"),ht.homeHolderMsgBox=document.querySelector("#homeHolder .homeHolderMsgContentBox .homeHolderMsgBox.fullBox"),ht.sessionHolderPmTaskBoxItems=[...document.querySelectorAll(".sessionHolderPmTaskBoxItem.whoisTouch2")],ht.moveinputDisplay=document.querySelector("#moveinputDisplay"),ht.moveinput=document.getElementById("moveinput"),ht.moveinputSendBtnFunc=document.querySelector("#moveinputDisplay #moveinputSendBtnFunc"),ht.moveinputSendBtnSend=document.querySelector("#moveinputDisplay #moveinputSendBtnSend")}let pt={elementHooks:{moveinput:{oninputBefore:()=>!0,oninputAfter:()=>!0,onblurBefore:()=>!0,onblurAfter:()=>!0,onfocusBefore:()=>!0,onfocusAfter:()=>!0}},functionHooks:{processer:{onBefore:(t,e,o,i)=>!0,onAfter:(t,e,o,i)=>!0}},replaceMoveinput:()=>{try{let t=ht.moveinput.oninput;ht.moveinput.oninput=function(){1==pt.elementHooks.moveinput.oninputBefore()&&(t?.call(ht.moveinput),pt.elementHooks.moveinput.oninputAfter())}}catch(t){tt.error(ct,t)}try{let t=ht.moveinput.oninput;ht.moveinput.onblur=function(){1==pt.elementHooks.moveinput.onblurBefore()&&(t?.call(ht.moveinput),pt.elementHooks.moveinput.onblurAfter())}}catch(t){tt.error(ct,t)}try{let t=ht.moveinput.oninput;ht.moveinput.onfocus=function(){1==pt.elementHooks.moveinput.onfocusBefore()&&(t?.call(ht.moveinput),pt.elementHooks.moveinput.onfocusAfter())}}catch(t){tt.error(ct,t)}},replaceButtonProcesser:()=>{try{let t=buttonProcesser;buttonProcesser=(e,o,i,n)=>{1==pt.functionHooks.processer.onBefore(e,o,i,n)&&(t(e,o,i,n),pt.functionHooks.processer.onAfter(e,o,i,n))}}catch(t){tt.error(ct,t)}}};function ut(){pt.replaceMoveinput(),pt.replaceButtonProcesser()}const gt=Object.freeze(Object.defineProperty({__proto__:null,Hooks:pt,elements:ht,initHooks:ut,refreshAll:dt},Symbol.toStringTag,{value:"Module"})),mt="script-tools",ft=[];class vt{constructor(t,e,o=!0){this.name=t,this.url=e,this.enable=o}}function bt(t){return tt.debug(mt,`添加${t.name},${t.url}`),xt(t.url)>=0||$t(t.name)>=0?(tt.warn(mt,`脚本${t.name}${t.url}已经存在`),!1):(X.scriptList.push(t),!0)}function yt(t){tt.debug(mt,`更新脚本${t.name}${t.url}`);for(let e=0;e<X.scriptList.length;e++){if(X.scriptList[e].name===t.name)return X.scriptList[e]=t,!0;if(X.scriptList[e].url===t.url)return X.scriptList[e]=t,!0}return!1}function wt(t){tt.debug(mt,`删除${t.name},${t.url}`);let e=$t(t.name);return e>=0?(X.scriptList.splice(e,1),!0):(e=xt(t.url),e>=0&&(X.scriptList.splice(e,1),!0))}function xt(t){for(let e=0;e<X.scriptList.length;e++)if(X.scriptList[e].url==t)return e;return-1}function $t(t){for(let e=0;e<X.scriptList.length;e++)if(X.scriptList[e].name==t)return e;return-1}function _t(t){if(ft.includes(t.url))return tt.warn(mt,`脚本${t.name}${t.url}已经注入`),!1;{const e=document.createElement("script");return e.src=t.url,document.body.appendChild(e),ft.push(t.url),tt.debug(mt,`注入${t.name}`),!0}}function St(){X.scriptList.forEach(t=>{t.enable&&!ft.includes(t.url)&&_t(t)})}const kt=Object.freeze(Object.defineProperty({__proto__:null,Script:vt,addScriptToList:bt,clearScriptList:function(){X.scriptList=[]},findScriptByName:$t,findScriptByUrl:xt,ingecteScript:_t,ingecteScriptList:St,ingectedUrlList:ft,removeScriptFromList:wt,updateScriptInList:yt},Symbol.toStringTag,{value:"Module"})),At=Object.freeze(Object.defineProperty({__proto__:null,Emitter:S,Message:f,decoder:_,elements_hooks:gt,encoder:at,log_tools:et,script_tools:kt,socket_tools:rt,store:K,tools:l},Symbol.toStringTag,{value:"Module"})),Ct=globalThis,Ot=Ct.ShadowRoot&&(void 0===Ct.ShadyCSS||Ct.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Et=Symbol(),Mt=new WeakMap;let zt=class{constructor(t,e,o){if(this._$cssResult$=!0,o!==Et)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(Ot&&void 0===t){const o=void 0!==e&&1===e.length;o&&(t=Mt.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),o&&Mt.set(e,t))}return t}toString(){return this.cssText}};const Ht=(t,...e)=>{const o=1===t.length?t[0]:e.reduce((e,o,i)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(o)+t[i+1],t[0]);return new zt(o,t,Et)},Tt=Ot?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const o of t.cssRules)e+=o.cssText;return(t=>new zt("string"==typeof t?t:t+"",void 0,Et))(e)})(t):t,{is:Pt,defineProperty:Lt,getOwnPropertyDescriptor:jt,getOwnPropertyNames:Bt,getOwnPropertySymbols:It,getPrototypeOf:Dt}=Object,Nt=globalThis,Ut=Nt.trustedTypes,Ft=Ut?Ut.emptyScript:"",Rt=Nt.reactiveElementPolyfillSupport,Vt=(t,e)=>t,qt={toAttribute(t,e){switch(e){case Boolean:t=t?Ft:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let o=t;switch(e){case Boolean:o=null!==t;break;case Number:o=null===t?null:Number(t);break;case Object:case Array:try{o=JSON.parse(t)}catch(i){o=null}}return o}},Wt=(t,e)=>!Pt(t,e),Gt={attribute:!0,type:String,converter:qt,reflect:!1,useDefault:!1,hasChanged:Wt};Symbol.metadata??=Symbol("metadata"),Nt.litPropertyMetadata??=new WeakMap;let Xt=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=Gt){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){const o=Symbol(),i=this.getPropertyDescriptor(t,o,e);void 0!==i&&Lt(this.prototype,t,i)}}static getPropertyDescriptor(t,e,o){const{get:i,set:n}=jt(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get:i,set(e){const s=i?.call(this);n?.call(this,e),this.requestUpdate(t,s,o)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??Gt}static _$Ei(){if(this.hasOwnProperty(Vt("elementProperties")))return;const t=Dt(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(Vt("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Vt("properties"))){const t=this.properties,e=[...Bt(t),...It(t)];for(const o of e)this.createProperty(o,t[o])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,o]of e)this.elementProperties.set(t,o)}this._$Eh=new Map;for(const[e,o]of this.elementProperties){const t=this._$Eu(e,o);void 0!==t&&this._$Eh.set(t,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const o=new Set(t.flat(1/0).reverse());for(const t of o)e.unshift(Tt(t))}else void 0!==t&&e.push(Tt(t));return e}static _$Eu(t,e){const o=e.attribute;return!1===o?void 0:"string"==typeof o?o:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this))}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const o of e.keys())this.hasOwnProperty(o)&&(t.set(o,this[o]),delete this[o]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((t,e)=>{if(Ot)t.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(const o of e){const e=document.createElement("style"),i=Ct.litNonce;void 0!==i&&e.setAttribute("nonce",i),e.textContent=o.cssText,t.appendChild(e)}})(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(t=>t.hostConnected?.())}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.())}attributeChangedCallback(t,e,o){this._$AK(t,o)}_$ET(t,e){const o=this.constructor.elementProperties.get(t),i=this.constructor._$Eu(t,o);if(void 0!==i&&!0===o.reflect){const n=(void 0!==o.converter?.toAttribute?o.converter:qt).toAttribute(e,o.type);this._$Em=t,null==n?this.removeAttribute(i):this.setAttribute(i,n),this._$Em=null}}_$AK(t,e){const o=this.constructor,i=o._$Eh.get(t);if(void 0!==i&&this._$Em!==i){const t=o.getPropertyOptions(i),n="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:qt;this._$Em=i;const s=n.fromAttribute(e,t.type);this[i]=s??this._$Ej?.get(i)??s,this._$Em=null}}requestUpdate(t,e,o){if(void 0!==t){const i=this.constructor,n=this[t];if(o??=i.getPropertyOptions(t),!((o.hasChanged??Wt)(n,e)||o.useDefault&&o.reflect&&n===this._$Ej?.get(t)&&!this.hasAttribute(i._$Eu(t,o))))return;this.C(t,e,o)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(t,e,{useDefault:o,reflect:i,wrapped:n},s){o&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,s??e??this[t]),!0!==n||void 0!==s)||(this._$AL.has(t)||(this.hasUpdated||o||(e=void 0),this._$AL.set(t,e)),!0===i&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,o]of t){const{wrapped:t}=o,i=this[e];!0!==t||this._$AL.has(e)||void 0===i||this.C(e,void 0,o,i)}}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach(t=>t.hostUpdate?.()),this.update(e)):this._$EM()}catch(o){throw t=!1,this._$EM(),o}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach(t=>t.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach(t=>this._$ET(t,this[t])),this._$EM()}updated(t){}firstUpdated(t){}};Xt.elementStyles=[],Xt.shadowRootOptions={mode:"open"},Xt[Vt("elementProperties")]=new Map,Xt[Vt("finalized")]=new Map,Rt?.({ReactiveElement:Xt}),(Nt.reactiveElementVersions??=[]).push("2.1.1");const Jt=globalThis,Zt=Jt.trustedTypes,Yt=Zt?Zt.createPolicy("lit-html",{createHTML:t=>t}):void 0,Kt="$lit$",Qt=`lit$${Math.random().toFixed(9).slice(2)}$`,te="?"+Qt,ee=`<${te}>`,oe=document,ie=()=>oe.createComment(""),ne=t=>null===t||"object"!=typeof t&&"function"!=typeof t,se=Array.isArray,re="[ \t\n\f\r]",le=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,ae=/-->/g,ce=/>/g,he=RegExp(`>|${re}(?:([^\\s"'>=/]+)(${re}*=${re}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),de=/'/g,pe=/"/g,ue=/^(?:script|style|textarea|title)$/i,ge=(ye=1,(t,...e)=>({_$litType$:ye,strings:t,values:e})),me=Symbol.for("lit-noChange"),fe=Symbol.for("lit-nothing"),ve=new WeakMap,be=oe.createTreeWalker(oe,129);var ye;function we(t,e){if(!se(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==Yt?Yt.createHTML(e):e}class xe{constructor({strings:t,_$litType$:e},o){let i;this.parts=[];let n=0,s=0;const r=t.length-1,l=this.parts,[a,c]=((t,e)=>{const o=t.length-1,i=[];let n,s=2===e?"<svg>":3===e?"<math>":"",r=le;for(let l=0;l<o;l++){const e=t[l];let o,a,c=-1,h=0;for(;h<e.length&&(r.lastIndex=h,a=r.exec(e),null!==a);)h=r.lastIndex,r===le?"!--"===a[1]?r=ae:void 0!==a[1]?r=ce:void 0!==a[2]?(ue.test(a[2])&&(n=RegExp("</"+a[2],"g")),r=he):void 0!==a[3]&&(r=he):r===he?">"===a[0]?(r=n??le,c=-1):void 0===a[1]?c=-2:(c=r.lastIndex-a[2].length,o=a[1],r=void 0===a[3]?he:'"'===a[3]?pe:de):r===pe||r===de?r=he:r===ae||r===ce?r=le:(r=he,n=void 0);const d=r===he&&t[l+1].startsWith("/>")?" ":"";s+=r===le?e+ee:c>=0?(i.push(o),e.slice(0,c)+Kt+e.slice(c)+Qt+d):e+Qt+(-2===c?l:d)}return[we(t,s+(t[o]||"<?>")+(2===e?"</svg>":3===e?"</math>":"")),i]})(t,e);if(this.el=xe.createElement(a,o),be.currentNode=this.el.content,2===e||3===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(i=be.nextNode())&&l.length<r;){if(1===i.nodeType){if(i.hasAttributes())for(const t of i.getAttributeNames())if(t.endsWith(Kt)){const e=c[s++],o=i.getAttribute(t).split(Qt),r=/([.?@])?(.*)/.exec(e);l.push({type:1,index:n,name:r[2],strings:o,ctor:"."===r[1]?Ae:"?"===r[1]?Ce:"@"===r[1]?Oe:ke}),i.removeAttribute(t)}else t.startsWith(Qt)&&(l.push({type:6,index:n}),i.removeAttribute(t));if(ue.test(i.tagName)){const t=i.textContent.split(Qt),e=t.length-1;if(e>0){i.textContent=Zt?Zt.emptyScript:"";for(let o=0;o<e;o++)i.append(t[o],ie()),be.nextNode(),l.push({type:2,index:++n});i.append(t[e],ie())}}}else if(8===i.nodeType)if(i.data===te)l.push({type:2,index:n});else{let t=-1;for(;-1!==(t=i.data.indexOf(Qt,t+1));)l.push({type:7,index:n}),t+=Qt.length-1}n++}}static createElement(t,e){const o=oe.createElement("template");return o.innerHTML=t,o}}function $e(t,e,o=t,i){if(e===me)return e;let n=void 0!==i?o._$Co?.[i]:o._$Cl;const s=ne(e)?void 0:e._$litDirective$;return n?.constructor!==s&&(n?._$AO?.(!1),void 0===s?n=void 0:(n=new s(t),n._$AT(t,o,i)),void 0!==i?(o._$Co??=[])[i]=n:o._$Cl=n),void 0!==n&&(e=$e(t,n._$AS(t,e.values),n,i)),e}class _e{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:o}=this._$AD,i=(t?.creationScope??oe).importNode(e,!0);be.currentNode=i;let n=be.nextNode(),s=0,r=0,l=o[0];for(;void 0!==l;){if(s===l.index){let e;2===l.type?e=new Se(n,n.nextSibling,this,t):1===l.type?e=new l.ctor(n,l.name,l.strings,this,t):6===l.type&&(e=new Ee(n,this,t)),this._$AV.push(e),l=o[++r]}s!==l?.index&&(n=be.nextNode(),s++)}return be.currentNode=oe,i}p(t){let e=0;for(const o of this._$AV)void 0!==o&&(void 0!==o.strings?(o._$AI(t,o,e),e+=o.strings.length-2):o._$AI(t[e])),e++}}class Se{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,o,i){this.type=2,this._$AH=fe,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=o,this.options=i,this._$Cv=i?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t?.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=$e(this,t,e),ne(t)?t===fe||null==t||""===t?(this._$AH!==fe&&this._$AR(),this._$AH=fe):t!==this._$AH&&t!==me&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>se(t)||"function"==typeof t?.[Symbol.iterator])(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==fe&&ne(this._$AH)?this._$AA.nextSibling.data=t:this.T(oe.createTextNode(t)),this._$AH=t}$(t){const{values:e,_$litType$:o}=t,i="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=xe.createElement(we(o.h,o.h[0]),this.options)),o);if(this._$AH?._$AD===i)this._$AH.p(e);else{const t=new _e(i,this),o=t.u(this.options);t.p(e),this.T(o),this._$AH=t}}_$AC(t){let e=ve.get(t.strings);return void 0===e&&ve.set(t.strings,e=new xe(t)),e}k(t){se(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let o,i=0;for(const n of t)i===e.length?e.push(o=new Se(this.O(ie()),this.O(ie()),this,this.options)):o=e[i],o._$AI(n),i++;i<e.length&&(this._$AR(o&&o._$AB.nextSibling,i),e.length=i)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class ke{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,o,i,n){this.type=1,this._$AH=fe,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=n,o.length>2||""!==o[0]||""!==o[1]?(this._$AH=Array(o.length-1).fill(new String),this.strings=o):this._$AH=fe}_$AI(t,e=this,o,i){const n=this.strings;let s=!1;if(void 0===n)t=$e(this,t,e,0),s=!ne(t)||t!==this._$AH&&t!==me,s&&(this._$AH=t);else{const i=t;let r,l;for(t=n[0],r=0;r<n.length-1;r++)l=$e(this,i[o+r],e,r),l===me&&(l=this._$AH[r]),s||=!ne(l)||l!==this._$AH[r],l===fe?t=fe:t!==fe&&(t+=(l??"")+n[r+1]),this._$AH[r]=l}s&&!i&&this.j(t)}j(t){t===fe?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class Ae extends ke{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===fe?void 0:t}}class Ce extends ke{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==fe)}}class Oe extends ke{constructor(t,e,o,i,n){super(t,e,o,i,n),this.type=5}_$AI(t,e=this){if((t=$e(this,t,e,0)??fe)===me)return;const o=this._$AH,i=t===fe&&o!==fe||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,n=t!==fe&&(o===fe||i);i&&this.element.removeEventListener(this.name,this,o),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class Ee{constructor(t,e,o){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=o}get _$AU(){return this._$AM._$AU}_$AI(t){$e(this,t)}}const Me=Jt.litHtmlPolyfillSupport;Me?.(xe,Se),(Jt.litHtmlVersions??=[]).push("3.3.1");const ze=globalThis;let He=class extends Xt{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((t,e,o)=>{const i=o?.renderBefore??e;let n=i._$litPart$;if(void 0===n){const t=o?.renderBefore??null;i._$litPart$=n=new Se(e.insertBefore(ie(),t),t,void 0,o??{})}return n._$AI(t),n})(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return me}};He._$litElement$=!0,He.finalized=!0,ze.litElementHydrateSupport?.({LitElement:He});const Te=ze.litElementPolyfillSupport;Te?.({LitElement:He}),(ze.litElementVersions??=[]).push("4.2.1");const Pe=t=>(e,o)=>{void 0!==o?o.addInitializer(()=>{customElements.define(t,e)}):customElements.define(t,e)},Le={attribute:!0,type:String,converter:qt,reflect:!1,hasChanged:Wt},je=(t=Le,e,o)=>{const{kind:i,metadata:n}=o;let s=globalThis.litPropertyMetadata.get(n);if(void 0===s&&globalThis.litPropertyMetadata.set(n,s=new Map),"setter"===i&&((t=Object.create(t)).wrapped=!0),s.set(o.name,t),"accessor"===i){const{name:i}=o;return{set(o){const n=e.get.call(this);e.set.call(this,o),this.requestUpdate(i,n,t)},init(e){return void 0!==e&&this.C(i,void 0,t,e),e}}}if("setter"===i){const{name:i}=o;return function(o){const n=this[i];e.call(this,o),this.requestUpdate(i,n,t)}}throw Error("Unsupported decorator location: "+i)};function Be(t){return(e,o)=>"object"==typeof o?je(t,e,o):((t,e,o)=>{const i=e.hasOwnProperty(o);return e.constructor.createProperty(o,t),i?Object.getOwnPropertyDescriptor(e,o):void 0})(t,e,o)}function Ie(t,e){return(e,o,i)=>((t,e,o)=>(o.configurable=!0,o.enumerable=!0,Reflect.decorate&&"object"!=typeof e&&Object.defineProperty(t,e,o),o))(e,o,{get(){return(e=>e.renderRoot?.querySelector(t)??null)(this)}})}var De=Object.defineProperty,Ne=Object.getOwnPropertyDescriptor,Ue=(t,e,o,i)=>{for(var n,s=i>1?void 0:i?Ne(e,o):e,r=t.length-1;r>=0;r--)(n=t[r])&&(s=(i?n(e,o,s):n(s))||s);return i&&s&&De(e,o,s),s};let Fe=[],Re=99999,Ve=class extends He{constructor(){super(),this.width=320,this.height=490,this.headerBackgroundColor="rgba(66,134,182,0.9)",this.headerColor="rgb(255,255,255)",this.bodyBackgroundColor="rgba(255,255,255,0.7)",this.bodyColor="rgba(23, 23, 23, 0.9)",this.footerBackgroundColor="rgba(255,255,255,0.7)",this.buttonBackground="rgba(255,255,255,0.9)",this.buttonColor="rgba(66,134,182,0.9)",this.titleContent="面板",this.leftButtonText="",this.rightButtonText="",this.isDisplay=!1,this.zIndex=Re,this.icon="magic-wand",this.leftIcon="magic-wand",this.rightIcon="magic-wand",this.left=(window.innerWidth-this.width)/2,this.top=(window.innerHeight-(this.height+80))/2,this.dragging=!1,Fe.push(this),this.zIndex=++Re}hideMovePanel(){this.isDisplay=!1,this.dispatchEvent(new CustomEvent("close",{detail:{isDisplay:this.isDisplay,message:"关闭事件"},bubbles:!0,composed:!0}))}showMovePanel(){this.isDisplay=!0,this.dispatchEvent(new CustomEvent("show",{detail:{isDisplay:this.isDisplay},bubbles:!0,composed:!0}))}toogleDisplay(){this.isDisplay?this.hideMovePanel():this.showMovePanel()}mouseDragging(t){let e=this.left,o=this.top,i=t.clientX-e,n=t.clientY-o;0==this.dragging&&(this.dragging=!0),document.onmousemove=t=>{this.dragging&&(this.left=t.clientX-i,this.top=t.clientY-n)},document.onmouseup=()=>{this.dragging&&(this.dragging=!1),document.onmousemove=null}}touchDragging(t){let e=this.left,o=this.top,i=t.touches[0].clientX-e,n=t.touches[0].clientY-o;0==this.dragging&&(this.dragging=!0),document.ontouchmove=t=>{this.dragging&&(this.left=t.touches[0].clientX-i,this.top=t.touches[0].clientY-n)},document.ontouchend=()=>{this.dragging&&(this.dragging=!1),document.onmousemove=null}}putTop(){let t=!1;if(Fe.includes(this)){for(let t=0;t<Fe.length;t++)Fe[t].zIndex>this.zIndex&&(Fe[t].zIndex=Fe[t].zIndex-1);this.zIndex=Re,t=!0}else tt.warn("MovePanel","置顶失败,窗口不在列表中"),t=!1;return t}putTopToggel(){this.zIndex!=Re?(this.putTop(),this.showMovePanel()):this.toogleDisplay()}render(){return ge`
|
|
1
|
+
var hortimagic=function(t){"use strict";async function e(t){return new Promise(e=>setTimeout(e,t))}function i(t){return t=(t=(t=(t=(t=(t=t.replace("&","&")).replace("<","<")).replace(">",">")).replace('"',""")).replace("'","'")).replace("\\","\")}function o(t){return t=(t=(t=(t=(t=(t=t.replace("<","<")).replace(">",">")).replace(""",'"')).replace("'","'")).replace("\","\\")).replace("&","&")}function n(){return window.myself?window.myself:null}function s(){return window.uid?window.uid:null}function r(){return window.inputcolorhex?window.inputcolorhex:null}const l=Object.freeze(Object.defineProperty({__proto__:null,addStyle:function(t){let e=document.createElement("style");e.innerText=t,document.body.append(e)},changeRoom:function(t){(t=String(t))&&window.Objs.mapHolder?.function?.roomchanger(t)},compressCSS:function(t){return t=(t=(t=(t=(t=t.replace(/\s{2,}/g," ")).replace(/\/\*[\s\S]*?\*\//g,"")).replace(/\s*([{};:,])\s*/g,"$1")).replace(/;\s*}/g,"}")).trim()},compressHTML:function(t){return t=(t=(t=(t=t.replace(/>\s+</g,"><")).replace(/\s{2,}/g," ")).replace(/<!--[\s\S]*?-->/g,"")).trim()},generatePrivateMessageBubble:function(t,e,o){window.privatechatfunc&&window.privatechatfunc([Math.floor(Date.now()/1e3).toString(10),s(),i(n()),i(window.avatar2&&window.avatarconv?window.avatarconv(window.avatar2):null),i(e),i(r()),"",i(r()),"","",o,t,"","","","",""].join(">"))},getAllOnlineUserInfo:function(){let t=window.Objs.mapHolder.Assets.userJson;return t?Object.keys(t).map(e=>{let i=t[e];return{name:i[2],uid:i[8],color:i[3],avatar:i[0],roomId:i[4],personalizedSignature:i[6]}}):null},getOnlineUserInfoById:function(t){t=String(t);let e=window.Objs.mapHolder?.function?.findUserByUid?.(t);return e?{name:e[2],uid:t,color:e[3],avatar:e[0],roomId:e[4],personalizedSignature:e[6]}:null},getRoomId:function(){return window.roomn?window.roomn:null},getRoomInfoById:function(t){let e=window.Objs.mapHolder?.Assets?.roomJson?.[t];if(e){let t=e[5].split("&&").map(t=>t.split(" & ")),i=o(t[0][0]),n=i.indexOf(" ");return{name:e[1],color:e[2],roomPath:e[0].split("_"),description:i.slice(n+1),roomImage:i.slice(0,n),currentUserNum:"number"==typeof e[7]?e[7]:"hidden",ownerName:t[1][0],member:t[4].map(t=>({name:o(t.slice(1)),auth:"0"==t[0]?"member":"1"==t[0]?"admin":"unknow"}))}}return null},getUserInputColor:r,getUserName:n,getUserUid:s,htmlSpecialCharsDecode:o,htmlSpecialCharsEscape:i,sleep:e,switchRoom:function(t){window.Objs.mapHolder?.function?.roomchanger&&window.Objs.mapHolder.function.roomchanger(t)}},Symbol.toStringTag,{value:"Module"}));class a{constructor(){this.timeStamp="",this.headPortrait="",this.name="",this.message="",this.color="",this.gender="",this.uid="",this.designation="",this.messageUid=""}}class c{constructor(){this.timeStamp="",this.headPortrait="",this.name="",this.message="",this.color="",this.gender="",this.uid="",this.messageUid=""}}class h{constructor(){this.messageName="",this.uid="",this.data=""}}class d{constructor(){this.username="",this.avatar="",this.message="",this.color="",this.gender="",this.timeStamp="",this.uid=""}}class p{constructor(){this.privateUID="",this.uid="",this.messageUid="",this.dataUid=""}}class u{constructor(){this.userMessageList=[]}}class g{constructor(){this.result="",this.stockPrice=NaN,this.totalStock=NaN,this.holdingAmount=NaN,this.totalEquity=NaN,this.balance=NaN}}class m{constructor(){this.message=""}}const f=Object.freeze(Object.defineProperty({__proto__:null,Danmu:d,Hidden:h,Private:c,Public:a,Stock:g,System:u,Unkonw:m,Withdrawn:p},Symbol.toStringTag,{value:"Module"}));let v=[];function b(t){return t instanceof a?"public":t instanceof c?"private":t instanceof h?"hidden":t instanceof d?"danmu":t instanceof p?"withdrawn":t instanceof u?"system":t instanceof g?"stock":"unknown"}function y(t){let e=new a,i=t.split(">");return e.timeStamp=i[0],e.headPortrait=i[1],e.name=i[2],e.message=i[3],e.color=i[5],e.gender=i[6],e.uid=i[8],e.designation=i[9],e.messageUid=i[10],e}function w(t){let e=new c,i=t.split(">");return e.timeStamp=i[0].slice(1),e.uid=i[1],e.name=i[2],e.headPortrait=i[3],e.message=i[4],e.color=i[5],e.gender=i[8],e.messageUid=i[10],e}function x(t){let e=new d,i=t.split(">");return e.username=i[0],e.message=i[1],e.color=i[2],e.gender=i[4],e.avatar=i[5],e.timeStamp=i[6],e.uid=i[7],e}function $(t){if(v=[],/^"[^"].*/gs.test(t)){let e=t.slice(1).split("<");for(let t=e.length-1;t>=0;t--)v.push(y(e[t]))}else if(/^"".*/gs.test(t)){let e=t.slice(1).split("<");for(let t=e.length-1;t>=0;t--)v.push(w(e[t]))}else if(/^=.*/gs.test(t)){let e=t.slice(1).split("<");for(let t=e.length-1;t>=0;t--)v.push(x(e[t]))}else/^[/]<.*>[0-9|a-z]{13}:.*/gs.test(t)?v.push(function(t){let e,i=new h;return e=t.match(/(?<=^[/]<).*(?=>[0-9|a-z]{13}:.*)/gs),i.messageName=null==e?"":e[0],e=t.match(/(?<=^[/]<.*>)[0-9|a-z]{13}(?=:.*)/gs),i.uid=null==e?"":e[0],e=t.match(/(?<=^[/]<.*>[0-9|a-z]{13}:).*/gs),i.data=null==e?"":e[0],i}(t)):/^v0.*/gs.test(t)?v.push(function(t){let e=new p;return"#"==t[2]?(e.privateUID="",e.uid=t.slice(3,16),e.messageUid=t.slice(17,29),e.dataUid=t.slice(3,29)):(e.privateUID=t.slice(3,16),e.uid=t.slice(17,30),e.messageUid=t.slice(31),e.dataUid=t.slice(17)),e}(t)):/^%\*".*/gs.test(t)?v.push(function(t){let e=new u;return e.userMessageList=t.split("<"),e}(t)):/^>.*/gs.test(t)?v.push(function(t){let e=new g;if(e.result=t[2],"*"==e.result)return e;if(">"==e.result)return e.holdingAmount=parseInt(t.slice(2)),e;if("<"==e.result)return e.balance=parseInt(t.slice(2)),e;{let i=t.split('"');if(5==i.length)return e.stockPrice=parseFloat(i[2]),e.totalStock=parseInt(i[0].slice(1)),e.holdingAmount=parseInt(i[3]),e.totalEquity=parseFloat(i[1]),e.balance=parseFloat(i[4]),e;if(4==i.length)return e.stockPrice=parseFloat(i[1])/parseInt(i[0].slice(1)),e.totalStock=parseInt(i[0].slice(1)),e.holdingAmount=parseInt(i[2]),e.totalEquity=parseFloat(i[1]),e.balance=parseFloat(i[3]),e}return e}(t)):v.push(function(t){let e=new m;return e.message=t,e}(t))}const _=Object.freeze(Object.defineProperty({__proto__:null,decodeMessage:$,judegMessageClass:b,get messageObjList(){return v}},Symbol.toStringTag,{value:"Module"}));class S{constructor(){this.events={}}on(t,e){this.events[t]||(this.events[t]=[]),this.events[t].push(e)}off(t,e){this.events[t]&&(e?this.events[t]=this.events[t].filter(t=>t!==e):delete this.events[t])}once(t,e){const i=(...o)=>{e(...o),this.off(t,i)};this.on(t,i)}emit(t,...e){const i=this.events[t];return!(!i||0===i.length)&&([...i].forEach(t=>t(...e)),!0)}}const k=Symbol(),A=Object.getPrototypeOf,C=new WeakMap,E=t=>(t=>t&&(C.has(t)?C.get(t):A(t)===Object.prototype||A(t)===Array.prototype))(t)&&t[k]||null,O=(t,e=!0)=>{C.set(t,e)},M={},z=t=>"object"==typeof t&&null!==t,H=(t,e)=>{const i=j.get(t);if((null==i?void 0:i[0])===e)return i[1];const o=Array.isArray(t)?[]:Object.create(Object.getPrototypeOf(t));return O(o,!0),j.set(t,[e,o]),Reflect.ownKeys(t).forEach(e=>{if(Object.getOwnPropertyDescriptor(o,e))return;const i=Reflect.get(t,e),{enumerable:n}=Reflect.getOwnPropertyDescriptor(t,e),s={value:i,enumerable:n,configurable:!0};if(P.has(i))O(i,!1);else if(T.has(i)){const[t,e]=T.get(i);s.value=H(t,e())}Object.defineProperty(o,e,s)}),Object.preventExtensions(o)},T=new WeakMap,P=new WeakSet,j=new WeakMap,L=[1],B=new WeakMap;let I=Object.is,D=(t,e)=>new Proxy(t,e),N=t=>z(t)&&!P.has(t)&&(Array.isArray(t)||!(Symbol.iterator in t))&&!(t instanceof WeakMap)&&!(t instanceof WeakSet)&&!(t instanceof Error)&&!(t instanceof Number)&&!(t instanceof Date)&&!(t instanceof String)&&!(t instanceof RegExp)&&!(t instanceof ArrayBuffer)&&!(t instanceof Promise),U=H,V=(t,e,i,o)=>({deleteProperty(t,e){const n=Reflect.get(t,e);i(e);const s=Reflect.deleteProperty(t,e);return s&&o(["delete",[e],n]),s},set(n,s,r,l){const a=!t()&&Reflect.has(n,s),c=Reflect.get(n,s,l);if(a&&(I(c,r)||B.has(r)&&I(c,B.get(r))))return!0;i(s),z(r)&&(r=E(r)||r);const h=!T.has(r)&&N(r)?F(r):r;return e(s,h),Reflect.set(n,s,h,l),o(["set",[s],r,c]),!0}});function F(t={}){if(!z(t))throw new Error("object required");const e=B.get(t);if(e)return e;let i=L[0];const o=new Set,n=(t,e=++L[0])=>{i!==e&&(s=i=e,o.forEach(i=>i(t,e)))};let s=i;const r=t=>(e,i)=>{const o=[...e];o[1]=[t,...o[1]],n(o,i)},l=new Map;let a=!0;const c=V(()=>a,(t,e)=>{const i=!P.has(e)&&T.get(e);if(i){if("production"!==(M?"production":void 0)&&l.has(t))throw new Error("prop listener already exists");if(o.size){const e=i[2](r(t));l.set(t,[i,e])}else l.set(t,[i])}},t=>{var e;const i=l.get(t);i&&(l.delete(t),null==(e=i[1])||e.call(i))},n),h=D(t,c);B.set(t,h);const d=[t,(t=L[0])=>(s!==t&&(s=t,l.forEach(([e])=>{const o=e[1](t);o>i&&(i=o)})),i),t=>{o.add(t),1===o.size&&l.forEach(([t,e],i)=>{if("production"!==(M?"production":void 0)&&e)throw new Error("remove already exists");const o=t[2](r(i));l.set(i,[t,o])});return()=>{o.delete(t),0===o.size&&l.forEach(([t,e],i)=>{e&&(e(),l.set(i,[t]))})}}];return T.set(h,d),Reflect.ownKeys(t).forEach(e=>{const i=Object.getOwnPropertyDescriptor(t,e);"value"in i&&i.writable&&(h[e]=t[e])}),a=!1,h}function R(t,e,i){const o=T.get(t);let n;"production"===(M?"production":void 0)||o||console.warn("Please use proxy object");const s=[],r=o[2];let l=!1;const a=r(t=>{s.push(t),i?e(s.splice(0)):n||(n=Promise.resolve().then(()=>{n=void 0,l&&e(s.splice(0))}))});return l=!0,()=>{l=!1,a()}}const q="store",W="HortimagicStore",G={proxy:F,subscribe:R,snapshot:function(t){const e=T.get(t);"production"===(M?"production":void 0)||e||console.warn("Please use proxy object");const[i,o]=e;return U(i,o())}},X=F({autoSave:!1,logFlag:{log:!1,info:!0,debug:!0,warn:!0,error:!0},messageLogFlag:{send:!1,decode:!1,emit:!0,receive:!1},logListLength:20,scriptList:[]});function J(){localStorage.setItem(W,JSON.stringify(X)),tt.debug(q,"保存至本地存储")}function Z(){let t=localStorage.getItem(W);if(null!=t){const e=JSON.parse(t);e.autoSave?X.autoSave=1==e.autoSave:X.autoSave=!1,e.logFlag?X.logFlag=e.logFlag:isNaN(e.logLevel)&&(X.logFlag=e.logLevel),e.messageLogFlag&&(X.messageLogFlag=e.messageLogFlag),e.scriptList&&(X.scriptList=e.scriptList),e.logListLength&&(X.logListLength=e.logListLength)}else X.logFlag.log=!0,X.logFlag.info=!0,X.logFlag.debug=!0,X.logFlag.warn=!0,X.logFlag.error=!0,X.autoSave=!0,X.logListLength=20,X.messageLogFlag.decode=!1,X.messageLogFlag.emit=!0,X.messageLogFlag.send=!1,X.messageLogFlag.receive=!1,X.scriptList=[],tt.debug(q,"没有读取到配置,使用默认配置"),J();tt.debug(q,"从本地存储加载")}function K(){Z(),R(X,()=>{X.autoSave&&J()})}const Y=Object.freeze(Object.defineProperty({__proto__:null,HortimagicStore:X,initStore:K,loadStore:Z,reactive:G,saveStore:J},Symbol.toStringTag,{value:"Module"})),Q=new S,tt={log(t,...e){X.logFlag.log&&(Q.emit("log",t,...e),console.log(t,...e))},debug(t,...e){X.logFlag.debug&&(Q.emit("log",t,...e),console.debug(t,...e))},info(t,...e){X.logFlag.info&&(Q.emit("log",t,...e),console.info(t,...e))},warn(t,...e){X.logFlag.warn&&(Q.emit("log",t,...e),console.warn(t,...e))},error(t,...e){X.logFlag.error&&(Q.emit("log",t,...e),console.error(t,...e))}},et=Object.freeze(Object.defineProperty({__proto__:null,logEmitter:Q,logger:tt},Symbol.toStringTag,{value:"Module"})),it="socket-tools",ot=new S;async function nt(){tt.debug(it,"代理网络");for(let i=0;i<30;i++)try{if(tt.debug(it,"等待网络连接",i),null==window.socket.__onmessage&&null!=window.socket._onmessage&&null!=window.socket.send){tt.debug(it,"网络连接成功");break}await e(500);continue}catch(t){tt.error(it,t)}null==window.socket.__onmessage&&null!=window.socket._onmessage&&null!=window.socket.send?(st.originalSend=window.socket.send,window.socket.send=st.send,st.originalOnmessage=window.socket._onmessage,window.socket._onmessage=st.onmessage):tt.error("连接失败")}const st={beforeSend:async function(t){return t},originalSend:function(t){return t},afterSend:function(t){return t},send:async function(t){X.messageLogFlag.send&&tt.debug(it,"发送",{message:t});let e=await st.beforeSend(t);try{null!=e&&(st.originalSend(e),st.afterSend(e))}catch(i){tt.error(it,i)}},beforeOnmessage:async function(t){return X.messageLogFlag.decode&&tt.debug(it,"解码",{message:t}),$(t),t},originalOnmessage:function(t){return t},afterOnmessage:async function(t){for(let e of v)X.messageLogFlag.emit&&tt.debug(it,`触发${b(e)}消息`,{message:t,messageObj:e}),ot.emit(b(e),e);return t},onmessage:async function(t){X.messageLogFlag.receive&&tt.debug(it,"接收",{message:t});let e=await st.beforeOnmessage(t);try{null!=e&&(st.originalOnmessage(e),st.afterOnmessage(e))}catch(i){tt.error("捕获到错误",i)}},initSocket:nt},rt=Object.freeze(Object.defineProperty({__proto__:null,initSocket:nt,messageEmitter:ot,socketTools:st},Symbol.toStringTag,{value:"Module"}));function lt(t,e){return"cut"===t?`{0${JSON.stringify({m:t,mc:e,i:Math.random().toString().slice(2,12)})}`:JSON.stringify({m:t,mc:e,i:Math.random().toString().slice(2,12)})}const at=Object.freeze(Object.defineProperty({__proto__:null,danmu:function(t,e,i="0"){return`~{"t":"${t}","c":"${e}","v":${i}}`},hidden:function(t,e,i){return`/<${t}>${e}:${i}`},like:function(t,e=""){return`+*${t}${e}`},musicCard:function(t,e,i,o,n,s){return lt(`m__4=${t}>${e}>${i}>${o}>${n}>${s}`,n)},privateChat:function(t,e,i){return JSON.stringify({g:t,m:e,mc:i,i:Math.random().toString().slice(2,12)})},publicChat:lt,stockRequest:function(t){return null==t?">#":t>0?`>$${Math.round(Math.abs(t))}`:t<0?`>@${Math.round(Math.abs(t))}`:">#"},videoCard:function(t,e,i,o,n,s,r){return lt(`m__4*${t}>${e}>${i}>${o}>${n}>${s}>${r}`,n)},withdrawn:function(t,e=""){return""==e?`v0#${t}`:`v0*${e}#${t}`}},Symbol.toStringTag,{value:"Module"})),ct="elements-hooks";let ht={movePanelHolder:document.querySelector("#movePanelHolder"),functionHolder:document.querySelector("#functionHolder"),functionButtonGroupList:[...document.querySelectorAll(".functionButton.functionButtonGroup")],msgholderBox:document.querySelector("#msgholder .fullBox.msgholderBox"),homeHolderMsgBox:document.querySelector("#homeHolder .homeHolderMsgContentBox .homeHolderMsgBox.fullBox"),sessionHolderPmTaskBoxItems:[...document.querySelectorAll(".sessionHolderPmTaskBoxItem.whoisTouch2")],moveinputDisplay:document.querySelector("#moveinputDisplay"),moveinput:document.getElementById("moveinput"),moveinputSendBtnFunc:document.querySelector("#moveinputDisplay #moveinputSendBtnFunc"),moveinputSendBtnSend:document.querySelector("#moveinputDisplay #moveinputSendBtnSend")};function dt(){ht.movePanelHolder=document.querySelector("#movePanelHolder"),ht.functionHolder=document.querySelector("#functionHolder"),ht.functionButtonGroupList=[...document.querySelectorAll(".functionButton.functionButtonGroup")],ht.msgholderBox=document.querySelector("#msgholder .fullBox .fullBox.msgholderBox"),ht.homeHolderMsgBox=document.querySelector("#homeHolder .homeHolderMsgContentBox .homeHolderMsgBox.fullBox"),ht.sessionHolderPmTaskBoxItems=[...document.querySelectorAll(".sessionHolderPmTaskBoxItem.whoisTouch2")],ht.moveinputDisplay=document.querySelector("#moveinputDisplay"),ht.moveinput=document.getElementById("moveinput"),ht.moveinputSendBtnFunc=document.querySelector("#moveinputDisplay #moveinputSendBtnFunc"),ht.moveinputSendBtnSend=document.querySelector("#moveinputDisplay #moveinputSendBtnSend")}let pt={elementHooks:{moveinput:{oninputBefore:()=>!0,oninputAfter:()=>!0,onblurBefore:()=>!0,onblurAfter:()=>!0,onfocusBefore:()=>!0,onfocusAfter:()=>!0}},functionHooks:{processer:{onBefore:(t,e,i,o)=>!0,onAfter:(t,e,i,o)=>!0}},replaceMoveinput:()=>{try{let t=ht.moveinput.oninput;ht.moveinput.oninput=function(){1==pt.elementHooks.moveinput.oninputBefore()&&(t?.call(ht.moveinput),pt.elementHooks.moveinput.oninputAfter())}}catch(t){tt.error(ct,t)}try{let t=ht.moveinput.oninput;ht.moveinput.onblur=function(){1==pt.elementHooks.moveinput.onblurBefore()&&(t?.call(ht.moveinput),pt.elementHooks.moveinput.onblurAfter())}}catch(t){tt.error(ct,t)}try{let t=ht.moveinput.oninput;ht.moveinput.onfocus=function(){1==pt.elementHooks.moveinput.onfocusBefore()&&(t?.call(ht.moveinput),pt.elementHooks.moveinput.onfocusAfter())}}catch(t){tt.error(ct,t)}},replaceButtonProcesser:()=>{try{let t=buttonProcesser;buttonProcesser=(e,i,o,n)=>{1==pt.functionHooks.processer.onBefore(e,i,o,n)&&(t(e,i,o,n),pt.functionHooks.processer.onAfter(e,i,o,n))}}catch(t){tt.error(ct,t)}}};function ut(){pt.replaceMoveinput(),pt.replaceButtonProcesser()}const gt=Object.freeze(Object.defineProperty({__proto__:null,Hooks:pt,elements:ht,initHooks:ut,refreshAll:dt},Symbol.toStringTag,{value:"Module"})),mt="script-tools",ft=[];class vt{constructor(t,e,i=!0){this.name=t,this.url=e,this.enable=i}}function bt(t){return tt.debug(mt,`添加${t.name},${t.url}`),xt(t.url)>=0||$t(t.name)>=0?(tt.warn(mt,`脚本${t.name}${t.url}已经存在`),!1):(X.scriptList.push(t),!0)}function yt(t){tt.debug(mt,`更新脚本${t.name}${t.url}`);for(let e=0;e<X.scriptList.length;e++){if(X.scriptList[e].name===t.name)return X.scriptList[e]=t,!0;if(X.scriptList[e].url===t.url)return X.scriptList[e]=t,!0}return!1}function wt(t){tt.debug(mt,`删除${t.name},${t.url}`);let e=$t(t.name);return e>=0?(X.scriptList.splice(e,1),!0):(e=xt(t.url),e>=0&&(X.scriptList.splice(e,1),!0))}function xt(t){for(let e=0;e<X.scriptList.length;e++)if(X.scriptList[e].url==t)return e;return-1}function $t(t){for(let e=0;e<X.scriptList.length;e++)if(X.scriptList[e].name==t)return e;return-1}function _t(t){if(ft.includes(t.url))return tt.warn(mt,`脚本${t.name}${t.url}已经注入`),!1;{const e=document.createElement("script");return e.src=t.url,document.body.appendChild(e),ft.push(t.url),tt.debug(mt,`注入${t.name}`),!0}}function St(){X.scriptList.forEach(t=>{t.enable&&!ft.includes(t.url)&&_t(t)})}const kt=Object.freeze(Object.defineProperty({__proto__:null,Script:vt,addScriptToList:bt,clearScriptList:function(){X.scriptList=[]},findScriptByName:$t,findScriptByUrl:xt,ingecteScript:_t,ingecteScriptList:St,ingectedUrlList:ft,removeScriptFromList:wt,updateScriptInList:yt},Symbol.toStringTag,{value:"Module"})),At=Object.freeze(Object.defineProperty({__proto__:null,Emitter:S,Message:f,decoder:_,elements_hooks:gt,encoder:at,log_tools:et,script_tools:kt,socket_tools:rt,store:Y,tools:l},Symbol.toStringTag,{value:"Module"})),Ct=globalThis,Et=Ct.ShadowRoot&&(void 0===Ct.ShadyCSS||Ct.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Ot=Symbol(),Mt=new WeakMap;let zt=class{constructor(t,e,i){if(this._$cssResult$=!0,i!==Ot)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(Et&&void 0===t){const i=void 0!==e&&1===e.length;i&&(t=Mt.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&Mt.set(e,t))}return t}toString(){return this.cssText}};const Ht=(t,...e)=>{const i=1===t.length?t[0]:e.reduce((e,i,o)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+t[o+1],t[0]);return new zt(i,t,Ot)},Tt=Et?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return(t=>new zt("string"==typeof t?t:t+"",void 0,Ot))(e)})(t):t,{is:Pt,defineProperty:jt,getOwnPropertyDescriptor:Lt,getOwnPropertyNames:Bt,getOwnPropertySymbols:It,getPrototypeOf:Dt}=Object,Nt=globalThis,Ut=Nt.trustedTypes,Vt=Ut?Ut.emptyScript:"",Ft=Nt.reactiveElementPolyfillSupport,Rt=(t,e)=>t,qt={toAttribute(t,e){switch(e){case Boolean:t=t?Vt:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(o){i=null}}return i}},Wt=(t,e)=>!Pt(t,e),Gt={attribute:!0,type:String,converter:qt,reflect:!1,useDefault:!1,hasChanged:Wt};Symbol.metadata??=Symbol("metadata"),Nt.litPropertyMetadata??=new WeakMap;let Xt=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=Gt){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){const i=Symbol(),o=this.getPropertyDescriptor(t,i,e);void 0!==o&&jt(this.prototype,t,o)}}static getPropertyDescriptor(t,e,i){const{get:o,set:n}=Lt(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get:o,set(e){const s=o?.call(this);n?.call(this,e),this.requestUpdate(t,s,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??Gt}static _$Ei(){if(this.hasOwnProperty(Rt("elementProperties")))return;const t=Dt(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(Rt("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Rt("properties"))){const t=this.properties,e=[...Bt(t),...It(t)];for(const i of e)this.createProperty(i,t[i])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,i]of e)this.elementProperties.set(t,i)}this._$Eh=new Map;for(const[e,i]of this.elementProperties){const t=this._$Eu(e,i);void 0!==t&&this._$Eh.set(t,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const t of i)e.unshift(Tt(t))}else void 0!==t&&e.push(Tt(t));return e}static _$Eu(t,e){const i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this))}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const i of e.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((t,e)=>{if(Et)t.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(const i of e){const e=document.createElement("style"),o=Ct.litNonce;void 0!==o&&e.setAttribute("nonce",o),e.textContent=i.cssText,t.appendChild(e)}})(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(t=>t.hostConnected?.())}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.())}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$ET(t,e){const i=this.constructor.elementProperties.get(t),o=this.constructor._$Eu(t,i);if(void 0!==o&&!0===i.reflect){const n=(void 0!==i.converter?.toAttribute?i.converter:qt).toAttribute(e,i.type);this._$Em=t,null==n?this.removeAttribute(o):this.setAttribute(o,n),this._$Em=null}}_$AK(t,e){const i=this.constructor,o=i._$Eh.get(t);if(void 0!==o&&this._$Em!==o){const t=i.getPropertyOptions(o),n="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:qt;this._$Em=o;const s=n.fromAttribute(e,t.type);this[o]=s??this._$Ej?.get(o)??s,this._$Em=null}}requestUpdate(t,e,i){if(void 0!==t){const o=this.constructor,n=this[t];if(i??=o.getPropertyOptions(t),!((i.hasChanged??Wt)(n,e)||i.useDefault&&i.reflect&&n===this._$Ej?.get(t)&&!this.hasAttribute(o._$Eu(t,i))))return;this.C(t,e,i)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(t,e,{useDefault:i,reflect:o,wrapped:n},s){i&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,s??e??this[t]),!0!==n||void 0!==s)||(this._$AL.has(t)||(this.hasUpdated||i||(e=void 0),this._$AL.set(t,e)),!0===o&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,i]of t){const{wrapped:t}=i,o=this[e];!0!==t||this._$AL.has(e)||void 0===o||this.C(e,void 0,i,o)}}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach(t=>t.hostUpdate?.()),this.update(e)):this._$EM()}catch(i){throw t=!1,this._$EM(),i}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach(t=>t.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach(t=>this._$ET(t,this[t])),this._$EM()}updated(t){}firstUpdated(t){}};Xt.elementStyles=[],Xt.shadowRootOptions={mode:"open"},Xt[Rt("elementProperties")]=new Map,Xt[Rt("finalized")]=new Map,Ft?.({ReactiveElement:Xt}),(Nt.reactiveElementVersions??=[]).push("2.1.1");const Jt=globalThis,Zt=Jt.trustedTypes,Kt=Zt?Zt.createPolicy("lit-html",{createHTML:t=>t}):void 0,Yt="$lit$",Qt=`lit$${Math.random().toFixed(9).slice(2)}$`,te="?"+Qt,ee=`<${te}>`,ie=document,oe=()=>ie.createComment(""),ne=t=>null===t||"object"!=typeof t&&"function"!=typeof t,se=Array.isArray,re="[ \t\n\f\r]",le=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,ae=/-->/g,ce=/>/g,he=RegExp(`>|${re}(?:([^\\s"'>=/]+)(${re}*=${re}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),de=/'/g,pe=/"/g,ue=/^(?:script|style|textarea|title)$/i,ge=(ye=1,(t,...e)=>({_$litType$:ye,strings:t,values:e})),me=Symbol.for("lit-noChange"),fe=Symbol.for("lit-nothing"),ve=new WeakMap,be=ie.createTreeWalker(ie,129);var ye;function we(t,e){if(!se(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==Kt?Kt.createHTML(e):e}class xe{constructor({strings:t,_$litType$:e},i){let o;this.parts=[];let n=0,s=0;const r=t.length-1,l=this.parts,[a,c]=((t,e)=>{const i=t.length-1,o=[];let n,s=2===e?"<svg>":3===e?"<math>":"",r=le;for(let l=0;l<i;l++){const e=t[l];let i,a,c=-1,h=0;for(;h<e.length&&(r.lastIndex=h,a=r.exec(e),null!==a);)h=r.lastIndex,r===le?"!--"===a[1]?r=ae:void 0!==a[1]?r=ce:void 0!==a[2]?(ue.test(a[2])&&(n=RegExp("</"+a[2],"g")),r=he):void 0!==a[3]&&(r=he):r===he?">"===a[0]?(r=n??le,c=-1):void 0===a[1]?c=-2:(c=r.lastIndex-a[2].length,i=a[1],r=void 0===a[3]?he:'"'===a[3]?pe:de):r===pe||r===de?r=he:r===ae||r===ce?r=le:(r=he,n=void 0);const d=r===he&&t[l+1].startsWith("/>")?" ":"";s+=r===le?e+ee:c>=0?(o.push(i),e.slice(0,c)+Yt+e.slice(c)+Qt+d):e+Qt+(-2===c?l:d)}return[we(t,s+(t[i]||"<?>")+(2===e?"</svg>":3===e?"</math>":"")),o]})(t,e);if(this.el=xe.createElement(a,i),be.currentNode=this.el.content,2===e||3===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(o=be.nextNode())&&l.length<r;){if(1===o.nodeType){if(o.hasAttributes())for(const t of o.getAttributeNames())if(t.endsWith(Yt)){const e=c[s++],i=o.getAttribute(t).split(Qt),r=/([.?@])?(.*)/.exec(e);l.push({type:1,index:n,name:r[2],strings:i,ctor:"."===r[1]?Ae:"?"===r[1]?Ce:"@"===r[1]?Ee:ke}),o.removeAttribute(t)}else t.startsWith(Qt)&&(l.push({type:6,index:n}),o.removeAttribute(t));if(ue.test(o.tagName)){const t=o.textContent.split(Qt),e=t.length-1;if(e>0){o.textContent=Zt?Zt.emptyScript:"";for(let i=0;i<e;i++)o.append(t[i],oe()),be.nextNode(),l.push({type:2,index:++n});o.append(t[e],oe())}}}else if(8===o.nodeType)if(o.data===te)l.push({type:2,index:n});else{let t=-1;for(;-1!==(t=o.data.indexOf(Qt,t+1));)l.push({type:7,index:n}),t+=Qt.length-1}n++}}static createElement(t,e){const i=ie.createElement("template");return i.innerHTML=t,i}}function $e(t,e,i=t,o){if(e===me)return e;let n=void 0!==o?i._$Co?.[o]:i._$Cl;const s=ne(e)?void 0:e._$litDirective$;return n?.constructor!==s&&(n?._$AO?.(!1),void 0===s?n=void 0:(n=new s(t),n._$AT(t,i,o)),void 0!==o?(i._$Co??=[])[o]=n:i._$Cl=n),void 0!==n&&(e=$e(t,n._$AS(t,e.values),n,o)),e}class _e{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:i}=this._$AD,o=(t?.creationScope??ie).importNode(e,!0);be.currentNode=o;let n=be.nextNode(),s=0,r=0,l=i[0];for(;void 0!==l;){if(s===l.index){let e;2===l.type?e=new Se(n,n.nextSibling,this,t):1===l.type?e=new l.ctor(n,l.name,l.strings,this,t):6===l.type&&(e=new Oe(n,this,t)),this._$AV.push(e),l=i[++r]}s!==l?.index&&(n=be.nextNode(),s++)}return be.currentNode=ie,o}p(t){let e=0;for(const i of this._$AV)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class Se{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,i,o){this.type=2,this._$AH=fe,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=o,this._$Cv=o?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t?.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=$e(this,t,e),ne(t)?t===fe||null==t||""===t?(this._$AH!==fe&&this._$AR(),this._$AH=fe):t!==this._$AH&&t!==me&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>se(t)||"function"==typeof t?.[Symbol.iterator])(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==fe&&ne(this._$AH)?this._$AA.nextSibling.data=t:this.T(ie.createTextNode(t)),this._$AH=t}$(t){const{values:e,_$litType$:i}=t,o="number"==typeof i?this._$AC(t):(void 0===i.el&&(i.el=xe.createElement(we(i.h,i.h[0]),this.options)),i);if(this._$AH?._$AD===o)this._$AH.p(e);else{const t=new _e(o,this),i=t.u(this.options);t.p(e),this.T(i),this._$AH=t}}_$AC(t){let e=ve.get(t.strings);return void 0===e&&ve.set(t.strings,e=new xe(t)),e}k(t){se(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,o=0;for(const n of t)o===e.length?e.push(i=new Se(this.O(oe()),this.O(oe()),this,this.options)):i=e[o],i._$AI(n),o++;o<e.length&&(this._$AR(i&&i._$AB.nextSibling,o),e.length=o)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class ke{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,i,o,n){this.type=1,this._$AH=fe,this._$AN=void 0,this.element=t,this.name=e,this._$AM=o,this.options=n,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=fe}_$AI(t,e=this,i,o){const n=this.strings;let s=!1;if(void 0===n)t=$e(this,t,e,0),s=!ne(t)||t!==this._$AH&&t!==me,s&&(this._$AH=t);else{const o=t;let r,l;for(t=n[0],r=0;r<n.length-1;r++)l=$e(this,o[i+r],e,r),l===me&&(l=this._$AH[r]),s||=!ne(l)||l!==this._$AH[r],l===fe?t=fe:t!==fe&&(t+=(l??"")+n[r+1]),this._$AH[r]=l}s&&!o&&this.j(t)}j(t){t===fe?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class Ae extends ke{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===fe?void 0:t}}class Ce extends ke{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==fe)}}class Ee extends ke{constructor(t,e,i,o,n){super(t,e,i,o,n),this.type=5}_$AI(t,e=this){if((t=$e(this,t,e,0)??fe)===me)return;const i=this._$AH,o=t===fe&&i!==fe||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,n=t!==fe&&(i===fe||o);o&&this.element.removeEventListener(this.name,this,i),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class Oe{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){$e(this,t)}}const Me=Jt.litHtmlPolyfillSupport;Me?.(xe,Se),(Jt.litHtmlVersions??=[]).push("3.3.1");const ze=globalThis;let He=class extends Xt{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((t,e,i)=>{const o=i?.renderBefore??e;let n=o._$litPart$;if(void 0===n){const t=i?.renderBefore??null;o._$litPart$=n=new Se(e.insertBefore(oe(),t),t,void 0,i??{})}return n._$AI(t),n})(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return me}};He._$litElement$=!0,He.finalized=!0,ze.litElementHydrateSupport?.({LitElement:He});const Te=ze.litElementPolyfillSupport;Te?.({LitElement:He}),(ze.litElementVersions??=[]).push("4.2.1");const Pe=t=>(e,i)=>{void 0!==i?i.addInitializer(()=>{customElements.define(t,e)}):customElements.define(t,e)},je={attribute:!0,type:String,converter:qt,reflect:!1,hasChanged:Wt},Le=(t=je,e,i)=>{const{kind:o,metadata:n}=i;let s=globalThis.litPropertyMetadata.get(n);if(void 0===s&&globalThis.litPropertyMetadata.set(n,s=new Map),"setter"===o&&((t=Object.create(t)).wrapped=!0),s.set(i.name,t),"accessor"===o){const{name:o}=i;return{set(i){const n=e.get.call(this);e.set.call(this,i),this.requestUpdate(o,n,t)},init(e){return void 0!==e&&this.C(o,void 0,t,e),e}}}if("setter"===o){const{name:o}=i;return function(i){const n=this[o];e.call(this,i),this.requestUpdate(o,n,t)}}throw Error("Unsupported decorator location: "+o)};function Be(t){return(e,i)=>"object"==typeof i?Le(t,e,i):((t,e,i)=>{const o=e.hasOwnProperty(i);return e.constructor.createProperty(i,t),o?Object.getOwnPropertyDescriptor(e,i):void 0})(t,e,i)}function Ie(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Reflect.decorate&&"object"!=typeof e&&Object.defineProperty(t,e,i),i))(e,i,{get(){return(e=>e.renderRoot?.querySelector(t)??null)(this)}})}var De=Object.defineProperty,Ne=Object.getOwnPropertyDescriptor,Ue=(t,e,i,o)=>{for(var n,s=o>1?void 0:o?Ne(e,i):e,r=t.length-1;r>=0;r--)(n=t[r])&&(s=(o?n(e,i,s):n(s))||s);return o&&s&&De(e,i,s),s};let Ve=[],Fe=99999,Re=class extends He{constructor(){super(),this.width=320,this.height=490,this.headerBackgroundColor="rgba(66,134,182,0.9)",this.headerColor="rgb(255,255,255)",this.bodyBackgroundColor="rgba(255,255,255,0.7)",this.bodyColor="rgba(23, 23, 23, 0.9)",this.footerBackgroundColor="rgba(255,255,255,0.7)",this.buttonBackground="rgba(255,255,255,0.9)",this.buttonColor="rgba(66,134,182,0.9)",this.titleContent="面板",this.leftButtonText="",this.rightButtonText="",this.isDisplay=!1,this.zIndex=Fe,this.icon="magic-wand",this.leftIcon="magic-wand",this.rightIcon="magic-wand",this.left=(window.innerWidth-this.width)/2,this.top=(window.innerHeight-(this.height+80))/2,this.dragging=!1,Ve.push(this),this.zIndex=++Fe}hideMovePanel(){this.isDisplay=!1,this.dispatchEvent(new CustomEvent("close",{detail:{isDisplay:this.isDisplay,message:"关闭事件"},bubbles:!0,composed:!0}))}showMovePanel(){this.isDisplay=!0,this.dispatchEvent(new CustomEvent("show",{detail:{isDisplay:this.isDisplay},bubbles:!0,composed:!0}))}toogleDisplay(){this.isDisplay?this.hideMovePanel():this.showMovePanel()}mouseDragging(t){let e=this.left,i=this.top,o=t.clientX-e,n=t.clientY-i;0==this.dragging&&(this.dragging=!0),document.onmousemove=t=>{this.dragging&&(this.left=t.clientX-o,this.top=t.clientY-n)},document.onmouseup=()=>{this.dragging&&(this.dragging=!1),document.onmousemove=null}}touchDragging(t){let e=this.left,i=this.top,o=t.touches[0].clientX-e,n=t.touches[0].clientY-i;0==this.dragging&&(this.dragging=!0),document.ontouchmove=t=>{this.dragging&&(this.left=t.touches[0].clientX-o,this.top=t.touches[0].clientY-n)},document.ontouchend=()=>{this.dragging&&(this.dragging=!1),document.onmousemove=null}}putTop(){let t=!1;if(Ve.includes(this)){for(let t=0;t<Ve.length;t++)Ve[t].zIndex>this.zIndex&&(Ve[t].zIndex=Ve[t].zIndex-1);this.zIndex=Fe,t=!0}else tt.warn("MovePanel","置顶失败,窗口不在列表中"),t=!1;return t}putTopToggel(){this.zIndex!=Fe?(this.putTop(),this.showMovePanel()):this.toogleDisplay()}render(){return ge`
|
|
2
2
|
<div
|
|
3
3
|
class="panel"
|
|
4
4
|
style="
|
|
@@ -62,7 +62,7 @@ var hortimagic=function(t){"use strict";async function e(t){return new Promise(e
|
|
|
62
62
|
</div>
|
|
63
63
|
</div>
|
|
64
64
|
|
|
65
|
-
`}_handleClose(){this.hideMovePanel()}handleLeftButtonClick(){this.dispatchEvent(new CustomEvent("left-button-click",{detail:{message:"左侧按钮被点击"},bubbles:!0,composed:!0}))}handleRightButtonClick(){this.dispatchEvent(new CustomEvent("right-button-click",{detail:{message:"右侧按钮被点击"},bubbles:!0,composed:!0}))}};
|
|
65
|
+
`}_handleClose(){this.hideMovePanel()}handleLeftButtonClick(){this.dispatchEvent(new CustomEvent("left-button-click",{detail:{message:"左侧按钮被点击"},bubbles:!0,composed:!0}))}handleRightButtonClick(){this.dispatchEvent(new CustomEvent("right-button-click",{detail:{message:"右侧按钮被点击"},bubbles:!0,composed:!0}))}};Re.styles=Ht`
|
|
66
66
|
.panel {
|
|
67
67
|
position: absolute;
|
|
68
68
|
display: block;
|
|
@@ -139,14 +139,14 @@ var hortimagic=function(t){"use strict";async function e(t){return new Promise(e
|
|
|
139
139
|
.footer-button:active {
|
|
140
140
|
transform: scale(0.98);
|
|
141
141
|
}
|
|
142
|
-
`,Ue([Be({type:Number})],Ve.prototype,"width",2),Ue([Be({type:Number})],Ve.prototype,"height",2),Ue([Be({type:String,attribute:"header-background-color"})],Ve.prototype,"headerBackgroundColor",2),Ue([Be({type:String,attribute:"header-color"})],Ve.prototype,"headerColor",2),Ue([Be({type:String,attribute:"body-background-color"})],Ve.prototype,"bodyBackgroundColor",2),Ue([Be({type:String,attribute:"body-color"})],Ve.prototype,"bodyColor",2),Ue([Be({type:String,attribute:"footer-background-color"})],Ve.prototype,"footerBackgroundColor",2),Ue([Be({type:String,attribute:"button-background-color"})],Ve.prototype,"buttonBackground",2),Ue([Be({type:String,attribute:"button-color"})],Ve.prototype,"buttonColor",2),Ue([Be({type:String})],Ve.prototype,"titleContent",2),Ue([Be({type:String,attribute:"left-button-text"})],Ve.prototype,"leftButtonText",2),Ue([Be({type:String,attribute:"right-button-text"})],Ve.prototype,"rightButtonText",2),Ue([Be({type:Boolean,attribute:"is-display"})],Ve.prototype,"isDisplay",2),Ue([Be({type:Number})],Ve.prototype,"zIndex",2),Ue([Be({type:String})],Ve.prototype,"icon",2),Ue([Be({type:String,attribute:"left-icon"})],Ve.prototype,"leftIcon",2),Ue([Be({type:String,attribute:"right-icon"})],Ve.prototype,"rightIcon",2),Ue([Be({type:Number})],Ve.prototype,"left",2),Ue([Be({type:Number})],Ve.prototype,"top",2),Ve=Ue([Pe("hm-move-panel")],Ve);const qe=Object.freeze(Object.defineProperty({__proto__:null,get HmMovePanel(){return Ve},movePanelItemList:Fe,get movePanelItemMaxZindex(){return Re}},Symbol.toStringTag,{value:"Module"})),We=2,Ge=t=>(...e)=>({_$litDirective$:t,values:e});class Xe{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,o){this._$Ct=t,this._$AM=e,this._$Ci=o}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}let Je=class extends Xe{constructor(t){if(super(t),this.it=fe,t.type!==We)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===fe||null==t)return this._t=void 0,this.it=t;if(t===me)return t;if("string"!=typeof t)throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this._t;this.it=t;const e=[t];return e.raw=e,this._t={_$litType$:this.constructor.resultType,strings:e,values:[]}}};Je.directiveName="unsafeHTML",Je.resultType=1;class Ze extends Je{}Ze.directiveName="unsafeSVG",Ze.resultType=2;const Ye=Ge(Ze);var Ke=Object.defineProperty,Qe=Object.getOwnPropertyDescriptor,to=(t,e,o,i)=>{for(var n,s=i>1?void 0:i?Qe(e,o):e,r=t.length-1;r>=0;r--)(n=t[r])&&(s=(i?n(e,o,s):n(s))||s);return i&&s&&Ke(e,o,s),s};const eo=new Map([["magic-wand",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14 14"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="m12.64 1.87l-.84 2.48a.41.41 0 0 0 0 .37l1.57 2.1a.4.4 0 0 1-.33.64h-2.62a.43.43 0 0 0-.33.17l-1.46 2.1a.4.4 0 0 1-.71-.11l-.78-2.5a.38.38 0 0 0-.26-.26l-2.5-.78a.4.4 0 0 1-.11-.71l2.14-1.51a.43.43 0 0 0 .17-.33V.91a.4.4 0 0 1 .6-.33l2.1 1.57a.41.41 0 0 0 .37.05l2.48-.84a.4.4 0 0 1 .51.51m-5.6 5.09L.5 13.5" stroke-width="1"/></svg>'],["close",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="currentColor" d="M6.4 19L5 17.6l5.6-5.6L5 6.4L6.4 5l5.6 5.6L17.6 5L19 6.4L13.4 12l5.6 5.6l-1.4 1.4l-5.6-5.6z"/></svg>'],["open",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="currentColor" d="M4 21q-.425 0-.712-.288T3 20v-6q0-.425.288-.712T4 13t.713.288T5 14v3.6L17.6 5H14q-.425 0-.712-.288T13 4t.288-.712T14 3h6q.425 0 .713.288T21 4v6q0 .425-.288.713T20 11t-.712-.288T19 10V6.4L6.4 19H10q.425 0 .713.288T11 20t-.288.713T10 21z"/></svg>'],["led-on",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="currentColor" d="M11 0v4h2V0zm7.3 2.29l-3.06 3l1.4 1.42l3.06-3zm-12.59 0L4.29 3.71l3 3l1.42-1.42zM12 6a4 4 0 0 0-4 4v6H6v2h3v5h2v-5h2v5h2v-5h3v-2h-2v-6a4 4 0 0 0-4-4M2 9v2h4V9zm16 0v2h4V9z"/></svg>'],["led-off",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="currentColor" d="M12 6a4 4 0 0 0-4 4v6H6v2h3v5h2v-5h2v5h2v-5h3v-2h-2v-6a4 4 0 0 0-4-4"/></svg>'],["arrow-up",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="currentColor" d="M16.21 16H7.79a1.76 1.76 0 0 1-1.59-1a2.1 2.1 0 0 1 .26-2.21l4.21-5.1a1.76 1.76 0 0 1 2.66 0l4.21 5.1A2.1 2.1 0 0 1 17.8 15a1.76 1.76 0 0 1-1.59 1"/></svg>'],["arrow-down",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="currentColor" d="M12 17a1.72 1.72 0 0 1-1.33-.64l-4.21-5.1a2.1 2.1 0 0 1-.26-2.21A1.76 1.76 0 0 1 7.79 8h8.42a1.76 1.76 0 0 1 1.59 1.05a2.1 2.1 0 0 1-.26 2.21l-4.21 5.1A1.72 1.72 0 0 1 12 17"/></svg>'],["template",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48"><defs><mask id="SVGZZ153dkC"><path fill="#4d4d4d" stroke="#fff" stroke-linejoin="round" stroke-width="4" d="M23 4H4v22h19zm21 30H4v9h40zm0-30H31v8h13zm0 14H31v8h13z"/></mask></defs><path fill="currentColor" d="M0 0h48v48H0z" mask="url(#SVGZZ153dkC)"/></svg>'],["js",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill="currentColor" d="M10.77 7.3h.002c1.045.393 2.479.93 2.479 2.45a2.5 2.5 0 0 1-.224 1.02a2.5 2.5 0 0 1-1.515 1.364a2.5 2.5 0 0 1-1.035.115a2 2 0 0 1-.214.012a2.5 2.5 0 0 1-1.673-.65a2.52 2.52 0 0 1-.838-1.859c0-.202.078-.39.22-.532a.77.77 0 0 1 1.06 0a.74.74 0 0 1 .221.53c0 .952 1.041 1 1.25 1s1.25-.048 1.25-1c0-.413-.447-.648-1.514-1.048h-.003C9.19 8.307 7.753 7.77 7.753 6.25q.005-.537.224-1.02a2.5 2.5 0 0 1 .614-.842a2.5 2.5 0 0 1 .9-.52a3.5 3.5 0 0 1 2.023 0a2.52 2.52 0 0 1 1.738 2.381c0 .201-.078.39-.22.531a.77.77 0 0 1-1.061 0a.74.74 0 0 1-.22-.53c0-.952-1.041-1-1.25-1s-1.25.048-1.25 1c0 .413.447.648 1.514 1.048zM5.751 4.5c0-.2.078-.388.22-.53a.77.77 0 0 1 1.06 0c.142.141.22.33.22.53v5a2.75 2.75 0 0 1-4.695 1.945A2.73 2.73 0 0 1 1.75 9.5V9c0-.2.078-.388.22-.53a.77.77 0 0 1 1.061 0c.142.141.22.33.22.53v.5c0 .33.134.652.366.884c.465.465 1.303.465 1.768 0c.232-.233.366-.555.366-.884z"/></svg>'],["filter",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="currentColor" d="M3 4c2.01 2.59 7 9 7 9v7h4v-7s4.98-6.41 7-9z"/></svg>'],["filter-off",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="currentColor" d="M3.004 1.59L3 1.586L1.586 3l4.928 4.928L10 12.818V21h4v-5.585l7 7l1.41-1.41L3 1.595zm12.266 9.446L21 3H7.234z"/></svg>'],["eye",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="currentColor" d="M16 11v2h-1v1h-1v1h-1v1h-2v-1h-1v-1H9v-1H8v-2h2v-1h1V8h2v1h1v1h1v1z"/><path fill="currentColor" d="M22 11V9h-1V8h-1V7h-1V6h-2V5H7v1H5v1H4v1H3v1H2v2H1v2h1v2h1v1h1v1h1v1h2v1h10v-1h2v-1h1v-1h1v-1h1v-2h1v-2zm-4 2h-1v2h-1v1h-1v1h-2v1h-2v-1H9v-1H8v-1H7v-2H6v-2h1V9h1V8h1V7h2V6h2v1h2v1h1v1h1v2h1z"/></svg>'],["eye-off",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="currentColor" d="M2 13H1v-2h1V9h1V8h1V7h1V6h2V5h8v1h-1v1h-1V6h-2v1H9v1H8v1H7v2H6v2h1v1H6v1H5v1H3v-1H2z"/><path fill="currentColor" d="M8 11h1v1H8zm3-3h1v1h-1zm-2 9H8v1H7v1H6v1H5v1H4v1H3v-1H2v-1h1v-1h1v-1h1v-1h1v-1h1v-1h1v-1h1v-1h1v-1h1v-1h1v-1h1V9h1V8h1V7h1V6h1V5h1V4h1V3h1V2h1v1h1v1h-1v1h-1v1h-1v1h-1v1h-1v1h-1v1h-1v1h-1v1h-1v1h-1v1h-1v1h-1v1H9zm3-2h1v1h-1zm1-1h1v1h-1zm2-2h1v1h-1zm-1 1h1v1h-1z"/><path fill="currentColor" d="M23 11v2h-1v2h-1v1h-1v1h-1v1h-2v1H9v-1h1v-1h1v1h2v-1h2v-1h1v-1h1v-2h1v-2h-1v-1h1V9h1V8h2v1h1v2z"/></svg>'],["config",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48"><g fill="none" stroke="currentColor" stroke-linejoin="round" stroke-width="4"><path d="m24 4l-6 6h-8v8l-6 6l6 6v8h8l6 6l6-6h8v-8l6-6l-6-6v-8h-8z"/><path d="M24 30a6 6 0 1 0 0-12a6 6 0 0 0 0 12Z"/></g></svg>'],["log",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill="currentColor" fill-rule="evenodd" d="M3.5 2.5v11h9v-11zM3 1a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h10a1 1 0 0 0 1-1V2a1 1 0 0 0-1-1zm5 10a.75.75 0 0 1 .75-.75h1.75a.75.75 0 0 1 0 1.5H8.75A.75.75 0 0 1 8 11m-2 1a1 1 0 1 0 0-2a1 1 0 0 0 0 2m2-4a.75.75 0 0 1 .75-.75h1.75a.75.75 0 0 1 0 1.5H8.75A.75.75 0 0 1 8 8M6 9a1 1 0 1 0 0-2a1 1 0 0 0 0 2m2-4a.75.75 0 0 1 .75-.75h1.75a.75.75 0 0 1 0 1.5H8.75A.75.75 0 0 1 8 5M6 6a1 1 0 1 0 0-2a1 1 0 0 0 0 2" clip-rule="evenodd"/></svg>'],["edit",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path fill="currentColor" fill-opacity="0" stroke-dasharray="44" stroke-dashoffset="44" d="M7 17v-4l10 -10l4 4l-10 10h-4"><animate fill="freeze" attributeName="stroke-dashoffset" begin="0.3s" dur="0.5s" to="0"/><animate fill="freeze" attributeName="fill-opacity" begin="1s" dur="0.15s" to="0.3"/></path><g fill="none"><path stroke-dasharray="20" d="M3 21h18"><animate fill="freeze" attributeName="stroke-dashoffset" dur="0.3s" values="20;0"/></path><path stroke-dasharray="8" stroke-dashoffset="8" d="M14 6l4 4"><animate fill="freeze" attributeName="stroke-dashoffset" begin="0.8s" dur="0.2s" to="0"/></path></g></g></svg>'],["run",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill="currentColor" d="M4.506 3.503L12.501 8l-8 4.5zm-.004-1.505C3.718 1.998 3 2.626 3 3.5v9c0 .874.718 1.502 1.502 1.502c.245 0 .496-.061.733-.195l8-4.5c1.019-.573 1.019-2.041 0-2.615l-8-4.499a1.5 1.5 0 0 0-.733-.195"/></svg>'],["delete",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="currentColor" d="M7 4a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v2h4a1 1 0 1 1 0 2h-1.069l-.867 12.142A2 2 0 0 1 17.069 22H6.93a2 2 0 0 1-1.995-1.858L4.07 8H3a1 1 0 0 1 0-2h4zm2 2h6V4H9zM6.074 8l.857 12H17.07l.857-12zM10 10a1 1 0 0 1 1 1v6a1 1 0 1 1-2 0v-6a1 1 0 0 1 1-1m4 0a1 1 0 0 1 1 1v6a1 1 0 1 1-2 0v-6a1 1 0 0 1 1-1"/></svg>'],["video",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M3 15.75v-7.5a2 2 0 0 1 2-2h8.5a2 2 0 0 1 2 2v7.5a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2m17.168-8.759l-4 3.563a.5.5 0 0 0-.168.373v1.778a.5.5 0 0 0 .168.373l4 3.563a.5.5 0 0 0 .832-.374V7.365a.5.5 0 0 0-.832-.374"/></svg>'],["play-video",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path fill="currentColor" d="M85.527 80.647a4.97 4.97 0 0 0 4.973-4.974V24.327a4.97 4.97 0 0 0-4.973-4.974H14.474A4.97 4.97 0 0 0 9.5 24.327v51.346a4.97 4.97 0 0 0 4.974 4.974zm-4.974-9.948H19.446V29.301h61.107z"/><path fill="currentColor" d="m64.819 50.288l-11.98 6.913l-11.974 6.917V36.462l11.974 6.918z"/></svg>'],["game",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M7.96 13.33h32.08a3.455 3.455 0 0 1 3.46 3.448v14.429a3.455 3.455 0 0 1-3.446 3.464H7.96A3.455 3.455 0 0 1 4.5 31.22V16.793a3.455 3.455 0 0 1 3.446-3.464z" stroke-width="1"/><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M13.25 16.938v5.401H8.11v3.385h5.14v5.338h3.577v-5.338h5.334V22.34h-5.334v-5.4zm19.513 9.68a2.58 2.58 0 0 1-2.582 2.583h0a2.58 2.58 0 0 1-2.58-2.583a2.582 2.582 0 1 1 5.162-.001zm7.076-5.235a2.58 2.58 0 0 1-2.58 2.584h0a2.58 2.58 0 0 1-2.583-2.583v0A2.58 2.58 0 0 1 37.26 18.8h0a2.58 2.58 0 0 1 2.581 2.583" stroke-width="1"/></svg>'],["save",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M64 48c-8.726 0-16 7.274-16 16v384c0 8.726 7.274 16 16 16h215v-16H64V64h63.375v97.53c0 3.924 3.443 7.095 7.72 7.095h169.81c4.277 0 7.72-3.17 7.72-7.094V64h69.22c.428.318.8.548 1.467 1.094c2.05 1.675 4.962 4.264 8.375 7.406c6.827 6.283 15.65 14.837 24.313 23.5s17.217 17.486 23.5 24.313c3.142 3.413 5.73 6.324 7.406 8.374c.546.668.776 1.04 1.094 1.47V330.25l16 16V128c0-2.68-.657-3.402-1.03-4.156a15 15 0 0 0-1.095-1.844c-.74-1.1-1.575-2.19-2.594-3.438c-2.036-2.492-4.768-5.55-8.03-9.093c-6.524-7.09-15.155-16-23.938-24.782s-17.692-17.414-24.78-23.938c-3.545-3.262-6.6-5.994-9.094-8.03c-1.247-1.02-2.337-1.855-3.438-2.595c-.55-.37-1.09-.72-1.844-1.094c-.754-.373-1.477-1.03-4.156-1.03zm87.72 16h48.56c4.277 0 7.72 4.425 7.72 9.938v70.124c0 5.513-3.443 9.938-7.72 9.938h-48.56c-4.277 0-7.72-4.425-7.72-9.938V73.938c0-5.512 3.443-9.937 7.72-9.937zM114 212c-4.432 0-8 3.568-8 8v184c0 4.432 3.568 8 8 8h165v-28h-76.72l15.345-15.375l128-128L352 234.28l6.375 6.345L406 288.25V220c0-4.432-3.568-8-8-8zm238 47.75L245.75 366H297v128h110V366h51.25zM448 384v64h-23v16h23c8.726 0 16-7.274 16-16v-64z"/></svg>'],["load",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M64 48c-8.726 0-16 7.274-16 16v384c0 8.726 7.274 16 16 16h236.25l-16-16H64V64h63.375v97.53c0 3.924 3.443 7.095 7.72 7.095h169.81c4.277 0 7.72-3.17 7.72-7.094V64h69.22c.428.318.8.548 1.467 1.094c2.05 1.675 4.962 4.264 8.375 7.406c6.827 6.283 15.65 14.837 24.313 23.5s17.217 17.486 23.5 24.313c3.142 3.413 5.73 6.324 7.406 8.374c.546.668.776 1.04 1.094 1.47V366h16V128c0-2.68-.657-3.402-1.03-4.156a15 15 0 0 0-1.095-1.844c-.74-1.1-1.575-2.19-2.594-3.438c-2.036-2.492-4.768-5.55-8.03-9.093c-6.524-7.09-15.155-16-23.938-24.782s-17.692-17.414-24.78-23.938c-3.545-3.262-6.6-5.994-9.094-8.03c-1.247-1.02-2.337-1.855-3.438-2.595c-.55-.37-1.09-.72-1.844-1.094c-.754-.373-1.477-1.03-4.156-1.03zm87.72 16h48.56c4.277 0 7.72 4.425 7.72 9.938v70.124c0 5.513-3.443 9.938-7.72 9.938h-48.56c-4.277 0-7.72-4.425-7.72-9.938V73.938c0-5.512 3.443-9.937 7.72-9.937zM114 212c-4.432 0-8 3.568-8 8v184c0 4.432 3.568 8 8 8h134.25l-30.625-30.625L202.28 366H279V238h127v-18c0-4.432-3.568-8-8-8zm183 44v128h-51.25L352 490.25L458.25 384H407V256zm167 147.75l-16 16V448h-28.25l-16 16H448c8.726 0 16-7.274 16-16z"/></svg>'],["refresh",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="currentColor" d="M17.65 6.35A7.96 7.96 0 0 0 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08A5.99 5.99 0 0 1 12 18c-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4z"/></svg>'],["post-add",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="currentColor" d="M5 21q-.825 0-1.412-.587T3 19V5q0-.825.588-1.412T5 3h9v2H5v14h14v-9h2v9q0 .825-.587 1.413T19 21zm3-4v-2h8v2zm0-3v-2h8v2zm0-3V9h8v2zm9-2V7h-2V5h2V3h2v2h2v2h-2v2z"/></svg>']]);function oo(t){return eo.get(t)||'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14 14"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="m12.64 1.87l-.84 2.48a.41.41 0 0 0 0 .37l1.57 2.1a.4.4 0 0 1-.33.64h-2.62a.43.43 0 0 0-.33.17l-1.46 2.1a.4.4 0 0 1-.71-.11l-.78-2.5a.38.38 0 0 0-.26-.26l-2.5-.78a.4.4 0 0 1-.11-.71l2.14-1.51a.43.43 0 0 0 .17-.33V.91a.4.4 0 0 1 .6-.33l2.1 1.57a.41.41 0 0 0 .37.05l2.48-.84a.4.4 0 0 1 .51.51m-5.6 5.09L.5 13.5" stroke-width="1"/></svg>'}let io=class extends He{constructor(){super(...arguments),this.icon="magic-wand",this.size="16px"}handelClick(){this.dispatchEvent(new CustomEvent("hm-icon-click"))}render(){return ge`
|
|
142
|
+
`,Ue([Be({type:Number})],Re.prototype,"width",2),Ue([Be({type:Number})],Re.prototype,"height",2),Ue([Be({type:String,attribute:"header-background-color"})],Re.prototype,"headerBackgroundColor",2),Ue([Be({type:String,attribute:"header-color"})],Re.prototype,"headerColor",2),Ue([Be({type:String,attribute:"body-background-color"})],Re.prototype,"bodyBackgroundColor",2),Ue([Be({type:String,attribute:"body-color"})],Re.prototype,"bodyColor",2),Ue([Be({type:String,attribute:"footer-background-color"})],Re.prototype,"footerBackgroundColor",2),Ue([Be({type:String,attribute:"button-background-color"})],Re.prototype,"buttonBackground",2),Ue([Be({type:String,attribute:"button-color"})],Re.prototype,"buttonColor",2),Ue([Be({type:String})],Re.prototype,"titleContent",2),Ue([Be({type:String,attribute:"left-button-text"})],Re.prototype,"leftButtonText",2),Ue([Be({type:String,attribute:"right-button-text"})],Re.prototype,"rightButtonText",2),Ue([Be({type:Boolean,attribute:"is-display"})],Re.prototype,"isDisplay",2),Ue([Be({type:Number})],Re.prototype,"zIndex",2),Ue([Be({type:String})],Re.prototype,"icon",2),Ue([Be({type:String,attribute:"left-icon"})],Re.prototype,"leftIcon",2),Ue([Be({type:String,attribute:"right-icon"})],Re.prototype,"rightIcon",2),Ue([Be({type:Number})],Re.prototype,"left",2),Ue([Be({type:Number})],Re.prototype,"top",2),Re=Ue([Pe("hm-move-panel")],Re);const qe=Object.freeze(Object.defineProperty({__proto__:null,get HmMovePanel(){return Re},movePanelItemList:Ve,get movePanelItemMaxZindex(){return Fe}},Symbol.toStringTag,{value:"Module"})),We=2,Ge=t=>(...e)=>({_$litDirective$:t,values:e});class Xe{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}let Je=class extends Xe{constructor(t){if(super(t),this.it=fe,t.type!==We)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===fe||null==t)return this._t=void 0,this.it=t;if(t===me)return t;if("string"!=typeof t)throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this._t;this.it=t;const e=[t];return e.raw=e,this._t={_$litType$:this.constructor.resultType,strings:e,values:[]}}};Je.directiveName="unsafeHTML",Je.resultType=1;class Ze extends Je{}Ze.directiveName="unsafeSVG",Ze.resultType=2;const Ke=Ge(Ze);var Ye=Object.defineProperty,Qe=Object.getOwnPropertyDescriptor,ti=(t,e,i,o)=>{for(var n,s=o>1?void 0:o?Qe(e,i):e,r=t.length-1;r>=0;r--)(n=t[r])&&(s=(o?n(e,i,s):n(s))||s);return o&&s&&Ye(e,i,s),s};const ei=new Map([["magic-wand",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14 14"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="m12.64 1.87l-.84 2.48a.41.41 0 0 0 0 .37l1.57 2.1a.4.4 0 0 1-.33.64h-2.62a.43.43 0 0 0-.33.17l-1.46 2.1a.4.4 0 0 1-.71-.11l-.78-2.5a.38.38 0 0 0-.26-.26l-2.5-.78a.4.4 0 0 1-.11-.71l2.14-1.51a.43.43 0 0 0 .17-.33V.91a.4.4 0 0 1 .6-.33l2.1 1.57a.41.41 0 0 0 .37.05l2.48-.84a.4.4 0 0 1 .51.51m-5.6 5.09L.5 13.5" stroke-width="1"/></svg>'],["close",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="currentColor" d="M6.4 19L5 17.6l5.6-5.6L5 6.4L6.4 5l5.6 5.6L17.6 5L19 6.4L13.4 12l5.6 5.6l-1.4 1.4l-5.6-5.6z"/></svg>'],["open",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="currentColor" d="M4 21q-.425 0-.712-.288T3 20v-6q0-.425.288-.712T4 13t.713.288T5 14v3.6L17.6 5H14q-.425 0-.712-.288T13 4t.288-.712T14 3h6q.425 0 .713.288T21 4v6q0 .425-.288.713T20 11t-.712-.288T19 10V6.4L6.4 19H10q.425 0 .713.288T11 20t-.288.713T10 21z"/></svg>'],["led-on",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="currentColor" d="M11 0v4h2V0zm7.3 2.29l-3.06 3l1.4 1.42l3.06-3zm-12.59 0L4.29 3.71l3 3l1.42-1.42zM12 6a4 4 0 0 0-4 4v6H6v2h3v5h2v-5h2v5h2v-5h3v-2h-2v-6a4 4 0 0 0-4-4M2 9v2h4V9zm16 0v2h4V9z"/></svg>'],["led-off",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="currentColor" d="M12 6a4 4 0 0 0-4 4v6H6v2h3v5h2v-5h2v5h2v-5h3v-2h-2v-6a4 4 0 0 0-4-4"/></svg>'],["arrow-up",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="currentColor" d="M16.21 16H7.79a1.76 1.76 0 0 1-1.59-1a2.1 2.1 0 0 1 .26-2.21l4.21-5.1a1.76 1.76 0 0 1 2.66 0l4.21 5.1A2.1 2.1 0 0 1 17.8 15a1.76 1.76 0 0 1-1.59 1"/></svg>'],["arrow-down",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="currentColor" d="M12 17a1.72 1.72 0 0 1-1.33-.64l-4.21-5.1a2.1 2.1 0 0 1-.26-2.21A1.76 1.76 0 0 1 7.79 8h8.42a1.76 1.76 0 0 1 1.59 1.05a2.1 2.1 0 0 1-.26 2.21l-4.21 5.1A1.72 1.72 0 0 1 12 17"/></svg>'],["template",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48"><defs><mask id="SVGZZ153dkC"><path fill="#4d4d4d" stroke="#fff" stroke-linejoin="round" stroke-width="4" d="M23 4H4v22h19zm21 30H4v9h40zm0-30H31v8h13zm0 14H31v8h13z"/></mask></defs><path fill="currentColor" d="M0 0h48v48H0z" mask="url(#SVGZZ153dkC)"/></svg>'],["js",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill="currentColor" d="M10.77 7.3h.002c1.045.393 2.479.93 2.479 2.45a2.5 2.5 0 0 1-.224 1.02a2.5 2.5 0 0 1-1.515 1.364a2.5 2.5 0 0 1-1.035.115a2 2 0 0 1-.214.012a2.5 2.5 0 0 1-1.673-.65a2.52 2.52 0 0 1-.838-1.859c0-.202.078-.39.22-.532a.77.77 0 0 1 1.06 0a.74.74 0 0 1 .221.53c0 .952 1.041 1 1.25 1s1.25-.048 1.25-1c0-.413-.447-.648-1.514-1.048h-.003C9.19 8.307 7.753 7.77 7.753 6.25q.005-.537.224-1.02a2.5 2.5 0 0 1 .614-.842a2.5 2.5 0 0 1 .9-.52a3.5 3.5 0 0 1 2.023 0a2.52 2.52 0 0 1 1.738 2.381c0 .201-.078.39-.22.531a.77.77 0 0 1-1.061 0a.74.74 0 0 1-.22-.53c0-.952-1.041-1-1.25-1s-1.25.048-1.25 1c0 .413.447.648 1.514 1.048zM5.751 4.5c0-.2.078-.388.22-.53a.77.77 0 0 1 1.06 0c.142.141.22.33.22.53v5a2.75 2.75 0 0 1-4.695 1.945A2.73 2.73 0 0 1 1.75 9.5V9c0-.2.078-.388.22-.53a.77.77 0 0 1 1.061 0c.142.141.22.33.22.53v.5c0 .33.134.652.366.884c.465.465 1.303.465 1.768 0c.232-.233.366-.555.366-.884z"/></svg>'],["filter",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="currentColor" d="M3 4c2.01 2.59 7 9 7 9v7h4v-7s4.98-6.41 7-9z"/></svg>'],["filter-off",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="currentColor" d="M3.004 1.59L3 1.586L1.586 3l4.928 4.928L10 12.818V21h4v-5.585l7 7l1.41-1.41L3 1.595zm12.266 9.446L21 3H7.234z"/></svg>'],["eye",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="currentColor" d="M16 11v2h-1v1h-1v1h-1v1h-2v-1h-1v-1H9v-1H8v-2h2v-1h1V8h2v1h1v1h1v1z"/><path fill="currentColor" d="M22 11V9h-1V8h-1V7h-1V6h-2V5H7v1H5v1H4v1H3v1H2v2H1v2h1v2h1v1h1v1h1v1h2v1h10v-1h2v-1h1v-1h1v-1h1v-2h1v-2zm-4 2h-1v2h-1v1h-1v1h-2v1h-2v-1H9v-1H8v-1H7v-2H6v-2h1V9h1V8h1V7h2V6h2v1h2v1h1v1h1v2h1z"/></svg>'],["eye-off",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="currentColor" d="M2 13H1v-2h1V9h1V8h1V7h1V6h2V5h8v1h-1v1h-1V6h-2v1H9v1H8v1H7v2H6v2h1v1H6v1H5v1H3v-1H2z"/><path fill="currentColor" d="M8 11h1v1H8zm3-3h1v1h-1zm-2 9H8v1H7v1H6v1H5v1H4v1H3v-1H2v-1h1v-1h1v-1h1v-1h1v-1h1v-1h1v-1h1v-1h1v-1h1v-1h1v-1h1V9h1V8h1V7h1V6h1V5h1V4h1V3h1V2h1v1h1v1h-1v1h-1v1h-1v1h-1v1h-1v1h-1v1h-1v1h-1v1h-1v1h-1v1h-1v1h-1v1H9zm3-2h1v1h-1zm1-1h1v1h-1zm2-2h1v1h-1zm-1 1h1v1h-1z"/><path fill="currentColor" d="M23 11v2h-1v2h-1v1h-1v1h-1v1h-2v1H9v-1h1v-1h1v1h2v-1h2v-1h1v-1h1v-2h1v-2h-1v-1h1V9h1V8h2v1h1v2z"/></svg>'],["config",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48"><g fill="none" stroke="currentColor" stroke-linejoin="round" stroke-width="4"><path d="m24 4l-6 6h-8v8l-6 6l6 6v8h8l6 6l6-6h8v-8l6-6l-6-6v-8h-8z"/><path d="M24 30a6 6 0 1 0 0-12a6 6 0 0 0 0 12Z"/></g></svg>'],["log",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill="currentColor" fill-rule="evenodd" d="M3.5 2.5v11h9v-11zM3 1a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h10a1 1 0 0 0 1-1V2a1 1 0 0 0-1-1zm5 10a.75.75 0 0 1 .75-.75h1.75a.75.75 0 0 1 0 1.5H8.75A.75.75 0 0 1 8 11m-2 1a1 1 0 1 0 0-2a1 1 0 0 0 0 2m2-4a.75.75 0 0 1 .75-.75h1.75a.75.75 0 0 1 0 1.5H8.75A.75.75 0 0 1 8 8M6 9a1 1 0 1 0 0-2a1 1 0 0 0 0 2m2-4a.75.75 0 0 1 .75-.75h1.75a.75.75 0 0 1 0 1.5H8.75A.75.75 0 0 1 8 5M6 6a1 1 0 1 0 0-2a1 1 0 0 0 0 2" clip-rule="evenodd"/></svg>'],["edit",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path fill="currentColor" fill-opacity="0" stroke-dasharray="44" stroke-dashoffset="44" d="M7 17v-4l10 -10l4 4l-10 10h-4"><animate fill="freeze" attributeName="stroke-dashoffset" begin="0.3s" dur="0.5s" to="0"/><animate fill="freeze" attributeName="fill-opacity" begin="1s" dur="0.15s" to="0.3"/></path><g fill="none"><path stroke-dasharray="20" d="M3 21h18"><animate fill="freeze" attributeName="stroke-dashoffset" dur="0.3s" values="20;0"/></path><path stroke-dasharray="8" stroke-dashoffset="8" d="M14 6l4 4"><animate fill="freeze" attributeName="stroke-dashoffset" begin="0.8s" dur="0.2s" to="0"/></path></g></g></svg>'],["run",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill="currentColor" d="M4.506 3.503L12.501 8l-8 4.5zm-.004-1.505C3.718 1.998 3 2.626 3 3.5v9c0 .874.718 1.502 1.502 1.502c.245 0 .496-.061.733-.195l8-4.5c1.019-.573 1.019-2.041 0-2.615l-8-4.499a1.5 1.5 0 0 0-.733-.195"/></svg>'],["delete",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="currentColor" d="M7 4a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v2h4a1 1 0 1 1 0 2h-1.069l-.867 12.142A2 2 0 0 1 17.069 22H6.93a2 2 0 0 1-1.995-1.858L4.07 8H3a1 1 0 0 1 0-2h4zm2 2h6V4H9zM6.074 8l.857 12H17.07l.857-12zM10 10a1 1 0 0 1 1 1v6a1 1 0 1 1-2 0v-6a1 1 0 0 1 1-1m4 0a1 1 0 0 1 1 1v6a1 1 0 1 1-2 0v-6a1 1 0 0 1 1-1"/></svg>'],["media",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 2048 2048"><path fill="currentColor" d="M2048 670v898q0 51-22 92t-59 70t-82 46t-93 16q-47 0-93-16t-82-45t-58-71t-23-92q0-51 22-92t59-71t82-45t93-16q66 0 128 31V834l-640 160v702q0 51-22 92t-59 70t-82 46t-93 16q-47 0-93-16t-82-45t-58-71t-23-92q0-51 22-92t59-71t82-45t93-16q66 0 128 31V894zM1024 1792q20 0 42-6t42-18t31-30t13-42q0-24-12-42t-32-30t-41-18t-43-6q-20 0-42 6t-42 18t-31 30t-13 42q0 24 12 42t32 30t41 18t43 6m768-128q20 0 42-6t42-18t31-30t13-42q0-24-12-42t-32-30t-41-18t-43-6q-20 0-42 6t-42 18t-31 30t-13 42q0 24 12 42t32 30t41 18t43 6M384 640H256V512h128zM256 768h128v128H256zm896-256h128v128h-128zm-128 768H0V128h1536v512l-128 32V256h-128v128h-128V256H384v128H256V256H128v896h128v-128h128v128h640z"/></svg>'],["video",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M3 15.75v-7.5a2 2 0 0 1 2-2h8.5a2 2 0 0 1 2 2v7.5a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2m17.168-8.759l-4 3.563a.5.5 0 0 0-.168.373v1.778a.5.5 0 0 0 .168.373l4 3.563a.5.5 0 0 0 .832-.374V7.365a.5.5 0 0 0-.832-.374"/></svg>'],["play-video",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path fill="currentColor" d="M85.527 80.647a4.97 4.97 0 0 0 4.973-4.974V24.327a4.97 4.97 0 0 0-4.973-4.974H14.474A4.97 4.97 0 0 0 9.5 24.327v51.346a4.97 4.97 0 0 0 4.974 4.974zm-4.974-9.948H19.446V29.301h61.107z"/><path fill="currentColor" d="m64.819 50.288l-11.98 6.913l-11.974 6.917V36.462l11.974 6.918z"/></svg>'],["game",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M7.96 13.33h32.08a3.455 3.455 0 0 1 3.46 3.448v14.429a3.455 3.455 0 0 1-3.446 3.464H7.96A3.455 3.455 0 0 1 4.5 31.22V16.793a3.455 3.455 0 0 1 3.446-3.464z" stroke-width="1"/><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M13.25 16.938v5.401H8.11v3.385h5.14v5.338h3.577v-5.338h5.334V22.34h-5.334v-5.4zm19.513 9.68a2.58 2.58 0 0 1-2.582 2.583h0a2.58 2.58 0 0 1-2.58-2.583a2.582 2.582 0 1 1 5.162-.001zm7.076-5.235a2.58 2.58 0 0 1-2.58 2.584h0a2.58 2.58 0 0 1-2.583-2.583v0A2.58 2.58 0 0 1 37.26 18.8h0a2.58 2.58 0 0 1 2.581 2.583" stroke-width="1"/></svg>'],["save",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M64 48c-8.726 0-16 7.274-16 16v384c0 8.726 7.274 16 16 16h215v-16H64V64h63.375v97.53c0 3.924 3.443 7.095 7.72 7.095h169.81c4.277 0 7.72-3.17 7.72-7.094V64h69.22c.428.318.8.548 1.467 1.094c2.05 1.675 4.962 4.264 8.375 7.406c6.827 6.283 15.65 14.837 24.313 23.5s17.217 17.486 23.5 24.313c3.142 3.413 5.73 6.324 7.406 8.374c.546.668.776 1.04 1.094 1.47V330.25l16 16V128c0-2.68-.657-3.402-1.03-4.156a15 15 0 0 0-1.095-1.844c-.74-1.1-1.575-2.19-2.594-3.438c-2.036-2.492-4.768-5.55-8.03-9.093c-6.524-7.09-15.155-16-23.938-24.782s-17.692-17.414-24.78-23.938c-3.545-3.262-6.6-5.994-9.094-8.03c-1.247-1.02-2.337-1.855-3.438-2.595c-.55-.37-1.09-.72-1.844-1.094c-.754-.373-1.477-1.03-4.156-1.03zm87.72 16h48.56c4.277 0 7.72 4.425 7.72 9.938v70.124c0 5.513-3.443 9.938-7.72 9.938h-48.56c-4.277 0-7.72-4.425-7.72-9.938V73.938c0-5.512 3.443-9.937 7.72-9.937zM114 212c-4.432 0-8 3.568-8 8v184c0 4.432 3.568 8 8 8h165v-28h-76.72l15.345-15.375l128-128L352 234.28l6.375 6.345L406 288.25V220c0-4.432-3.568-8-8-8zm238 47.75L245.75 366H297v128h110V366h51.25zM448 384v64h-23v16h23c8.726 0 16-7.274 16-16v-64z"/></svg>'],["load",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M64 48c-8.726 0-16 7.274-16 16v384c0 8.726 7.274 16 16 16h236.25l-16-16H64V64h63.375v97.53c0 3.924 3.443 7.095 7.72 7.095h169.81c4.277 0 7.72-3.17 7.72-7.094V64h69.22c.428.318.8.548 1.467 1.094c2.05 1.675 4.962 4.264 8.375 7.406c6.827 6.283 15.65 14.837 24.313 23.5s17.217 17.486 23.5 24.313c3.142 3.413 5.73 6.324 7.406 8.374c.546.668.776 1.04 1.094 1.47V366h16V128c0-2.68-.657-3.402-1.03-4.156a15 15 0 0 0-1.095-1.844c-.74-1.1-1.575-2.19-2.594-3.438c-2.036-2.492-4.768-5.55-8.03-9.093c-6.524-7.09-15.155-16-23.938-24.782s-17.692-17.414-24.78-23.938c-3.545-3.262-6.6-5.994-9.094-8.03c-1.247-1.02-2.337-1.855-3.438-2.595c-.55-.37-1.09-.72-1.844-1.094c-.754-.373-1.477-1.03-4.156-1.03zm87.72 16h48.56c4.277 0 7.72 4.425 7.72 9.938v70.124c0 5.513-3.443 9.938-7.72 9.938h-48.56c-4.277 0-7.72-4.425-7.72-9.938V73.938c0-5.512 3.443-9.937 7.72-9.937zM114 212c-4.432 0-8 3.568-8 8v184c0 4.432 3.568 8 8 8h134.25l-30.625-30.625L202.28 366H279V238h127v-18c0-4.432-3.568-8-8-8zm183 44v128h-51.25L352 490.25L458.25 384H407V256zm167 147.75l-16 16V448h-28.25l-16 16H448c8.726 0 16-7.274 16-16z"/></svg>'],["refresh",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="currentColor" d="M17.65 6.35A7.96 7.96 0 0 0 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08A5.99 5.99 0 0 1 12 18c-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4z"/></svg>'],["post-add",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="currentColor" d="M5 21q-.825 0-1.412-.587T3 19V5q0-.825.588-1.412T5 3h9v2H5v14h14v-9h2v9q0 .825-.587 1.413T19 21zm3-4v-2h8v2zm0-3v-2h8v2zm0-3V9h8v2zm9-2V7h-2V5h2V3h2v2h2v2h-2v2z"/></svg>']]);function ii(t){return ei.get(t)||'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14 14"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="m12.64 1.87l-.84 2.48a.41.41 0 0 0 0 .37l1.57 2.1a.4.4 0 0 1-.33.64h-2.62a.43.43 0 0 0-.33.17l-1.46 2.1a.4.4 0 0 1-.71-.11l-.78-2.5a.38.38 0 0 0-.26-.26l-2.5-.78a.4.4 0 0 1-.11-.71l2.14-1.51a.43.43 0 0 0 .17-.33V.91a.4.4 0 0 1 .6-.33l2.1 1.57a.41.41 0 0 0 .37.05l2.48-.84a.4.4 0 0 1 .51.51m-5.6 5.09L.5 13.5" stroke-width="1"/></svg>'}let oi=class extends He{constructor(){super(...arguments),this.icon="magic-wand",this.size="16px"}handelClick(){this.dispatchEvent(new CustomEvent("hm-icon-click"))}render(){return ge`
|
|
143
143
|
<div class="icon"
|
|
144
144
|
style="width:${this.size}; height:${this.size};"
|
|
145
145
|
@click="${this.handelClick}"
|
|
146
146
|
>
|
|
147
|
-
${
|
|
147
|
+
${Ke(ii(this.icon))}
|
|
148
148
|
</div>
|
|
149
|
-
`}};
|
|
149
|
+
`}};oi.styles=Ht`
|
|
150
150
|
:host {
|
|
151
151
|
display: inline-block;
|
|
152
152
|
}
|
|
@@ -162,7 +162,7 @@ style="width:${this.size}; height:${this.size};"
|
|
|
162
162
|
width: 100%;
|
|
163
163
|
height: 100%;
|
|
164
164
|
}
|
|
165
|
-
`,
|
|
165
|
+
`,ti([Be({type:String})],oi.prototype,"icon",2),ti([Be({type:String})],oi.prototype,"size",2),oi=ti([Pe("hm-icon")],oi);const ni=Object.freeze(Object.defineProperty({__proto__:null,get HmIcon(){return oi},getIcon:ii,iconMap:ei,registerIcon:function(t,e){ei.set(t,e)}},Symbol.toStringTag,{value:"Module"}));var si=Object.defineProperty,ri=Object.getOwnPropertyDescriptor,li=(t,e,i,o)=>{for(var n,s=o>1?void 0:o?ri(e,i):e,r=t.length-1;r>=0;r--)(n=t[r])&&(s=(o?n(e,i,s):n(s))||s);return o&&s&&si(e,i,s),s};let ai=class extends He{constructor(){super(...arguments),this.icon="magic-wand",this.content="HortiMagicMenu",this.flag=!1,this.isMenuItem=!1}handleClick(){this.isMenuItem||(this.flag=!this.flag),this.dispatchEvent(new CustomEvent("hm-menu-click"))}render(){return ge`
|
|
166
166
|
<div
|
|
167
167
|
class="menu ${this.isMenuItem?"is-menu-item":"not-menu-item"}"
|
|
168
168
|
style="display:${this.isMenuItem&&!this.flag?"none":"flex"}"
|
|
@@ -186,7 +186,7 @@ style="width:${this.size}; height:${this.size};"
|
|
|
186
186
|
|
|
187
187
|
|
|
188
188
|
|
|
189
|
-
`}};
|
|
189
|
+
`}};ai.styles=Ht`
|
|
190
190
|
:host {
|
|
191
191
|
color: rgb(33,33,33);
|
|
192
192
|
height: 56px;
|
|
@@ -227,7 +227,7 @@ style="width:${this.size}; height:${this.size};"
|
|
|
227
227
|
.not-menu-item {
|
|
228
228
|
background:rgb(255,255,255);
|
|
229
229
|
}
|
|
230
|
-
`,
|
|
230
|
+
`,li([Be({type:String})],ai.prototype,"icon",2),li([Be({type:String})],ai.prototype,"content",2),li([Be({type:Boolean})],ai.prototype,"flag",2),li([Be({type:Boolean})],ai.prototype,"isMenuItem",2),ai=li([Pe("hm-menu")],ai);const ci=Object.freeze(Object.defineProperty({__proto__:null,get HmMenu(){return ai}},Symbol.toStringTag,{value:"Module"}));var hi=Object.defineProperty,di=Object.getOwnPropertyDescriptor,pi=(t,e,i,o)=>{for(var n,s=o>1?void 0:o?di(e,i):e,r=t.length-1;r>=0;r--)(n=t[r])&&(s=(o?n(e,i,s):n(s))||s);return o&&s&&hi(e,i,s),s};let ui=class extends He{constructor(){super(...arguments),this.leftIcon="magic-wand",this.title="HortiMagic",this.content="Hello iirose!",this.rightIcon="",this.displayTime=999999,this.color="rgb(33,33,33)",this.backgroundColor="rgba(255,255,255,0.9)"}firstUpdated(){this.displayTime>0&&setTimeout(()=>{this.startLeaveAnimation()},this.displayTime)}startLeaveAnimation(){this.setAttribute("leaving",""),setTimeout(()=>{this.remove()},300)}render(){return ge`
|
|
231
231
|
<div
|
|
232
232
|
class="hm-notification"
|
|
233
233
|
style="${this.color?`border-color: ${this.color};`:""}
|
|
@@ -250,7 +250,7 @@ style="width:${this.size}; height:${this.size};"
|
|
|
250
250
|
</div>
|
|
251
251
|
`:""}
|
|
252
252
|
</div>
|
|
253
|
-
`}};
|
|
253
|
+
`}};ui.styles=Ht`
|
|
254
254
|
:host{
|
|
255
255
|
display: block;
|
|
256
256
|
width: auto;
|
|
@@ -313,7 +313,7 @@ style="width:${this.size}; height:${this.size};"
|
|
|
313
313
|
width: 44px;
|
|
314
314
|
height: 44px;
|
|
315
315
|
}
|
|
316
|
-
`,
|
|
316
|
+
`,pi([Be()],ui.prototype,"leftIcon",2),pi([Be()],ui.prototype,"title",2),pi([Be()],ui.prototype,"content",2),pi([Be()],ui.prototype,"rightIcon",2),pi([Be()],ui.prototype,"displayTime",2),pi([Be()],ui.prototype,"color",2),pi([Be()],ui.prototype,"backgroundColor",2),ui=pi([Pe("hm-notification")],ui);const gi=Object.freeze(Object.defineProperty({__proto__:null,get HmNotification(){return ui}},Symbol.toStringTag,{value:"Module"}));var mi=Object.defineProperty,fi=Object.getOwnPropertyDescriptor,vi=(t,e,i,o)=>{for(var n,s=o>1?void 0:o?fi(e,i):e,r=t.length-1;r>=0;r--)(n=t[r])&&(s=(o?n(e,i,s):n(s))||s);return o&&s&&mi(e,i,s),s};let bi=class extends He{constructor(){super(...arguments),this.icon="",this.content="",this.fontSize="14px",this.color="",this.background="",this.width="",this.height="",this.enable=!0,this.loading=!1}render(){const t=`\n ${this.color?`color: ${this.color};`:""}\n ${this.background?`background: ${this.background};`:""}\n ${this.width?`width: ${this.width};`:""}\n ${this.height?`height: ${this.height};`:""}\n ${this.fontSize?`font-size: ${this.fontSize};`:"14px"}\n `;return ge`
|
|
317
317
|
<button
|
|
318
318
|
class="button"
|
|
319
319
|
style="${t}"
|
|
@@ -332,7 +332,7 @@ style="width:${this.size}; height:${this.size};"
|
|
|
332
332
|
<slot>${this.content}</slot>
|
|
333
333
|
</span>
|
|
334
334
|
</button>
|
|
335
|
-
`}_handleClick(t){this.enable&&!this.loading?this.dispatchEvent(new CustomEvent("hm-button-click")):t.stopPropagation()}};
|
|
335
|
+
`}_handleClick(t){this.enable&&!this.loading?this.dispatchEvent(new CustomEvent("hm-button-click")):t.stopPropagation()}};bi.styles=Ht`
|
|
336
336
|
:host {
|
|
337
337
|
display: inline-block;
|
|
338
338
|
}
|
|
@@ -387,7 +387,7 @@ style="width:${this.size}; height:${this.size};"
|
|
|
387
387
|
display: flex;
|
|
388
388
|
align-items: center;
|
|
389
389
|
}
|
|
390
|
-
`,
|
|
390
|
+
`,vi([Be({type:String})],bi.prototype,"icon",2),vi([Be({type:String})],bi.prototype,"content",2),vi([Be({type:String})],bi.prototype,"fontSize",2),vi([Be({type:String})],bi.prototype,"color",2),vi([Be({type:String})],bi.prototype,"background",2),vi([Be({type:String})],bi.prototype,"width",2),vi([Be({type:String})],bi.prototype,"height",2),vi([Be({type:Boolean})],bi.prototype,"enable",2),vi([Be({type:Boolean})],bi.prototype,"loading",2),bi=vi([Pe("hm-button")],bi);const yi=Object.freeze(Object.defineProperty({__proto__:null,get HmButton(){return bi}},Symbol.toStringTag,{value:"Module"}));var wi=Object.defineProperty,xi=Object.getOwnPropertyDescriptor,$i=(t,e,i,o)=>{for(var n,s=o>1?void 0:o?xi(e,i):e,r=t.length-1;r>=0;r--)(n=t[r])&&(s=(o?n(e,i,s):n(s))||s);return o&&s&&wi(e,i,s),s};let _i=class extends He{constructor(){super(...arguments),this.titleName="标题",this.description="",this.content="",this.titleClickCallback=()=>{},this.contentClickCallback=()=>{}}render(){return ge`
|
|
391
391
|
<div class="cell" part="cell">
|
|
392
392
|
<div
|
|
393
393
|
class="left-section"
|
|
@@ -410,7 +410,7 @@ style="width:${this.size}; height:${this.size};"
|
|
|
410
410
|
</div>
|
|
411
411
|
</div>
|
|
412
412
|
|
|
413
|
-
`}};
|
|
413
|
+
`}};_i.styles=Ht`
|
|
414
414
|
:host {
|
|
415
415
|
display: block;
|
|
416
416
|
width: 100%;
|
|
@@ -496,82 +496,67 @@ style="width:${this.size}; height:${this.size};"
|
|
|
496
496
|
/* 可选:添加文字阴影增强视觉效果 */
|
|
497
497
|
text-shadow: var(--hm-cell-hover-text-shadow, 0 0 5px rgba(24, 144, 255, 0.2));
|
|
498
498
|
}
|
|
499
|
-
|
|
499
|
+
`,$i([Be({attribute:"title-name"})],_i.prototype,"titleName",2),$i([Be()],_i.prototype,"description",2),$i([Be()],_i.prototype,"content",2),$i([Be()],_i.prototype,"titleClickCallback",2),$i([Be()],_i.prototype,"contentClickCallback",2),_i=$i([Pe("hm-cell")],_i);const Si=Object.freeze(Object.defineProperty({__proto__:null,get HmCell(){return _i}},Symbol.toStringTag,{value:"Module"})),ki=(t,e)=>{const i=t._$AN;if(void 0===i)return!1;for(const o of i)o._$AO?.(e,!1),ki(o,e);return!0},Ai=t=>{let e,i;do{if(void 0===(e=t._$AM))break;i=e._$AN,i.delete(t),t=e}while(0===i?.size)},Ci=t=>{for(let e;e=t._$AM;t=e){let i=e._$AN;if(void 0===i)e._$AN=i=new Set;else if(i.has(t))break;i.add(t),Mi(e)}};function Ei(t){void 0!==this._$AN?(Ai(this),this._$AM=t,Ci(this)):this._$AM=t}function Oi(t,e=!1,i=0){const o=this._$AH,n=this._$AN;if(void 0!==n&&0!==n.size)if(e)if(Array.isArray(o))for(let s=i;s<o.length;s++)ki(o[s],!1),Ai(o[s]);else null!=o&&(ki(o,!1),Ai(o));else ki(this,t)}const Mi=t=>{t.type==We&&(t._$AP??=Oi,t._$AQ??=Ei)};class zi extends Xe{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,i){super._$AT(t,e,i),Ci(this),this.isConnected=t._$AU}_$AO(t,e=!0){t!==this.isConnected&&(this.isConnected=t,t?this.reconnected?.():this.disconnected?.()),e&&(ki(this,t),Ai(this))}setValue(t){if(void 0===this._$Ct.strings)this._$Ct._$AI(t,this);else{const e=[...this._$Ct._$AH];e[this._$Ci]=t,this._$Ct._$AI(e,this,0)}}disconnected(){}reconnected(){}}class Hi{}const Ti=new WeakMap,Pi=Ge(class extends zi{render(t){return fe}update(t,[e]){const i=e!==this.G;return i&&void 0!==this.G&&this.rt(void 0),(i||this.lt!==this.ct)&&(this.G=e,this.ht=t.options?.host,this.rt(this.ct=t.element)),fe}rt(t){if(this.isConnected||(t=void 0),"function"==typeof this.G){const e=this.ht??globalThis;let i=Ti.get(e);void 0===i&&(i=new WeakMap,Ti.set(e,i)),void 0!==i.get(this.G)&&this.G.call(this.ht,void 0),i.set(this.G,t),void 0!==t&&this.G.call(this.ht,t)}else this.G.value=t}get lt(){return"function"==typeof this.G?Ti.get(this.ht??globalThis)?.get(this.G):this.G?.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});var ji=Object.defineProperty,Li=Object.getOwnPropertyDescriptor,Bi=(t,e,i,o)=>{for(var n,s=o>1?void 0:o?Li(e,i):e,r=t.length-1;r>=0;r--)(n=t[r])&&(s=(o?n(e,i,s):n(s))||s);return o&&s&&ji(e,i,s),s};let Ii=class extends He{constructor(){super(...arguments),this.index=0,this.value=0,this.labelList=[{name:"选项0",value:0},{name:"选项1",value:1},{name:"选项2",value:2}],this.disabled=!1,this._selectRef=new Hi}connectedCallback(){super.connectedCallback(),this.index=this.index<this.labelList.length?this.index:0,this.index<this.labelList.length&&(this.value=this.labelList[this.index].value)}render(){return ge`
|
|
500
500
|
<div class="select-wrapper">
|
|
501
501
|
<select
|
|
502
|
-
${
|
|
502
|
+
${Pi(this._selectRef)}
|
|
503
|
+
.value="${this.index}"
|
|
503
504
|
?disabled="${this.disabled}"
|
|
504
505
|
@change="${this._handleChange}"
|
|
505
506
|
>
|
|
506
|
-
${this.labelList.map((
|
|
507
|
-
<option
|
|
508
|
-
value="${e}"
|
|
509
|
-
?selected="${o===this.index}"
|
|
510
|
-
>
|
|
511
|
-
${t}
|
|
512
|
-
</option>
|
|
507
|
+
${this.labelList.map((t,e)=>ge`
|
|
508
|
+
<option .value="${e}">${t.name}</option>
|
|
513
509
|
`)}
|
|
514
510
|
</select>
|
|
515
|
-
<
|
|
511
|
+
<div class="select-arrow"></div>
|
|
516
512
|
</div>
|
|
517
|
-
`}_handleChange(t){const e=t.target,
|
|
513
|
+
`}_handleChange(t){const e=t.target,i=parseInt(e.value);i!==this.index&&i>=0&&i<this.labelList.length&&(this.index=i,this.value=this.labelList[i].value,this.dispatchEvent(new CustomEvent("hm-select-change",{detail:{index:this.index,value:this.value,name:this.labelList[this.index].name},bubbles:!0,composed:!0})))}};Ii.styles=Ht`
|
|
518
514
|
:host {
|
|
519
515
|
display: inline-block;
|
|
520
|
-
|
|
521
|
-
font-size: 14px;
|
|
516
|
+
position: relative;
|
|
522
517
|
}
|
|
523
|
-
|
|
518
|
+
|
|
524
519
|
.select-wrapper {
|
|
525
|
-
position: relative;
|
|
526
520
|
display: inline-block;
|
|
521
|
+
position: relative;
|
|
527
522
|
}
|
|
528
|
-
|
|
523
|
+
|
|
529
524
|
select {
|
|
530
|
-
|
|
531
|
-
padding: 8px 12px;
|
|
525
|
+
padding: 8px 30px 8px 12px;
|
|
532
526
|
border: 1px solid #ccc;
|
|
533
527
|
border-radius: 4px;
|
|
534
528
|
background-color: #fff;
|
|
535
|
-
font-size:
|
|
529
|
+
font-size: 14px;
|
|
536
530
|
cursor: pointer;
|
|
537
|
-
box-sizing: border-box;
|
|
538
531
|
appearance: none;
|
|
539
|
-
|
|
532
|
+
min-width: 120px;
|
|
533
|
+
outline: none;
|
|
540
534
|
}
|
|
541
|
-
|
|
535
|
+
|
|
542
536
|
select:focus {
|
|
543
|
-
outline: none;
|
|
544
537
|
border-color: #007cba;
|
|
545
538
|
box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.3);
|
|
546
539
|
}
|
|
547
|
-
|
|
540
|
+
|
|
548
541
|
select:disabled {
|
|
549
542
|
background-color: #f5f5f5;
|
|
550
|
-
color: #999;
|
|
551
543
|
cursor: not-allowed;
|
|
544
|
+
opacity: 0.6;
|
|
552
545
|
}
|
|
553
|
-
|
|
554
|
-
.select-
|
|
546
|
+
|
|
547
|
+
.select-arrow {
|
|
555
548
|
position: absolute;
|
|
556
|
-
right:
|
|
549
|
+
right: 10px;
|
|
557
550
|
top: 50%;
|
|
558
551
|
transform: translateY(-50%);
|
|
559
552
|
pointer-events: none;
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
.select-wrapper::after {
|
|
564
|
-
content: '';
|
|
565
|
-
position: absolute;
|
|
566
|
-
right: 10px;
|
|
567
|
-
top: 50%;
|
|
568
|
-
transform: translateY(-50%) rotate(0deg);
|
|
553
|
+
width: 0;
|
|
554
|
+
height: 0;
|
|
569
555
|
border-left: 5px solid transparent;
|
|
570
556
|
border-right: 5px solid transparent;
|
|
571
|
-
border-top: 5px solid #
|
|
572
|
-
pointer-events: none;
|
|
557
|
+
border-top: 5px solid #999;
|
|
573
558
|
}
|
|
574
|
-
`,
|
|
559
|
+
`,Bi([Be({type:Number,reflect:!0})],Ii.prototype,"index",2),Bi([Be({reflect:!0})],Ii.prototype,"value",2),Bi([Be({attribute:"label-list"})],Ii.prototype,"labelList",2),Bi([Be({type:Boolean})],Ii.prototype,"disabled",2),Ii=Bi([Pe("hm-select")],Ii);const Di=Object.freeze(Object.defineProperty({__proto__:null,get HmSelect(){return Ii}},Symbol.toStringTag,{value:"Module"}));var Ni=Object.defineProperty,Ui=Object.getOwnPropertyDescriptor,Vi=(t,e,i,o)=>{for(var n,s=o>1?void 0:o?Ui(e,i):e,r=t.length-1;r>=0;r--)(n=t[r])&&(s=(o?n(e,i,s):n(s))||s);return o&&s&&Ni(e,i,s),s};let Fi=class extends He{constructor(){super(...arguments),this._isDragging=!1,this._startX=0,this._currentTranslate=0,this._prevTranslate=0,this._animationId=0,this._velocity=0,this._lastX=0,this._lastTime=0,this._isOpen=!1,this.rightButtonName="右侧按钮",this.rightButtonCallback=function(){},this.leftActionsWidth=0,this.rightActionsWidth=0,this.onDragStart=t=>{this.startDrag(t.clientX),this.sliderElement.style.cursor="grabbing",this.sliderElement.style.transition="none"},this.onTouchStart=t=>{this.startDrag(t.touches[0].clientX),this.sliderElement.style.transition="none"},this.startDrag=t=>{this._isDragging=!0,this._startX=t,this._lastX=t,this._lastTime=Date.now(),this._isOpen=Math.abs(this._prevTranslate)>10,this.calculateActionWidths()},this.onDragMove=t=>{this._isDragging&&(t.preventDefault(),t.stopPropagation(),this.handleMove(t.clientX))},this.onTouchMove=t=>{this._isDragging&&(t.preventDefault(),t.stopPropagation(),this.handleMove(t.touches[0].clientX))},this.onDragEnd=()=>{this.finishDrag(),this.sliderElement.style.cursor="grab"},this.onTouchEnd=()=>{this.finishDrag()}}firstUpdated(){this.calculateActionWidths(),this.addEventListeners()}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListeners()}calculateActionWidths(){this.leftActionsWidth=this.leftActions?this.leftActions.offsetWidth:0,this.rightActionsWidth=this.rightActions?this.rightActions.offsetWidth:0}addEventListeners(){this.sliderElement.addEventListener("mousedown",this.onDragStart),this.sliderElement.addEventListener("touchstart",this.onTouchStart,{passive:!1}),document.addEventListener("mousemove",this.onDragMove),document.addEventListener("touchmove",this.onTouchMove,{passive:!1}),document.addEventListener("mouseup",this.onDragEnd),document.addEventListener("touchend",this.onTouchEnd)}removeEventListeners(){this.sliderElement.removeEventListener("mousedown",this.onDragStart),this.sliderElement.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("mousemove",this.onDragMove),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("mouseup",this.onDragEnd),document.removeEventListener("touchend",this.onTouchEnd)}handleMove(t){const e=Date.now(),i=e-this._lastTime;i>0&&(this._velocity=(t-this._lastX)/i,this._lastX=t,this._lastTime=e);const o=t-this._startX;let n=this._prevTranslate+o;if(n>this.leftActionsWidth){const t=n-this.leftActionsWidth;n=this.leftActionsWidth+this.easeOut(t,30)}else if(n<-this.rightActionsWidth){const t=n+this.rightActionsWidth;n=-this.rightActionsWidth+this.easeOut(t,30)}this._currentTranslate=n,this.updateSliderPosition()}easeOut(t,e){return.2*t}finishDrag(){this._isDragging=!1,this.sliderElement.style.transition="transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94)";let t=0;if(t=this._currentTranslate>5||this._currentTranslate>0&&this._velocity>.1?this.leftActionsWidth:this._currentTranslate<-5||this._currentTranslate<0&&this._velocity<-.1?-this.rightActionsWidth:0,this._isOpen){const e=5;t=this._prevTranslate>0&&this._currentTranslate<this._prevTranslate-e||this._prevTranslate<0&&this._currentTranslate>this._prevTranslate+e?0:this._prevTranslate}this._currentTranslate=t,this._prevTranslate=t,this.updateSliderPosition(),this._velocity=0}updateSliderPosition(){this._animationId&&cancelAnimationFrame(this._animationId),this._animationId=requestAnimationFrame(()=>{if(this.sliderElement.style.transform=`translateX(${this._currentTranslate}px)`,this._currentTranslate>0){const t=Math.min(this._currentTranslate/this.leftActionsWidth,1);this.leftActions.style.transform=`translateX(${100*t-100}%)`,this.rightActions.style.transform="translateX(100%)"}else if(this._currentTranslate<0){const t=Math.min(-this._currentTranslate/this.rightActionsWidth,1);this.rightActions.style.transform=`translateX(${100-100*t}%)`,this.leftActions.style.transform="translateX(-100%)"}else this.leftActions.style.transform="translateX(-100%)",this.rightActions.style.transform="translateX(100%)"})}render(){return ge`
|
|
575
560
|
<div class="swipe-container">
|
|
576
561
|
<div class="actions left-actions">
|
|
577
562
|
<slot name="left-actions"> </slot>
|
|
@@ -587,7 +572,7 @@ style="width:${this.size}; height:${this.size};"
|
|
|
587
572
|
</slot>
|
|
588
573
|
</div>
|
|
589
574
|
</div>
|
|
590
|
-
`}};
|
|
575
|
+
`}};Fi.styles=Ht`
|
|
591
576
|
:host {
|
|
592
577
|
display: block;
|
|
593
578
|
overflow: hidden;
|
|
@@ -708,7 +693,7 @@ style="width:${this.size}; height:${this.size};"
|
|
|
708
693
|
.contentslot{
|
|
709
694
|
width: 100%;
|
|
710
695
|
}
|
|
711
|
-
`,
|
|
696
|
+
`,Vi([Be()],Fi.prototype,"_isDragging",2),Vi([Be()],Fi.prototype,"_startX",2),Vi([Be()],Fi.prototype,"_currentTranslate",2),Vi([Be()],Fi.prototype,"_prevTranslate",2),Vi([Be()],Fi.prototype,"_animationId",2),Vi([Be()],Fi.prototype,"_velocity",2),Vi([Be()],Fi.prototype,"_lastX",2),Vi([Be()],Fi.prototype,"_lastTime",2),Vi([Be()],Fi.prototype,"_isOpen",2),Vi([Be()],Fi.prototype,"rightButtonName",2),Vi([Be()],Fi.prototype,"rightButtonCallback",2),Vi([Ie(".slider")],Fi.prototype,"sliderElement",2),Vi([Ie(".content")],Fi.prototype,"contentElement",2),Vi([Ie(".left-actions")],Fi.prototype,"leftActions",2),Vi([Ie(".right-actions")],Fi.prototype,"rightActions",2),Fi=Vi([Pe("hm-swipe-cell")],Fi);const Ri=Object.freeze(Object.defineProperty({__proto__:null,get HmSwipeCell(){return Fi}},Symbol.toStringTag,{value:"Module"}));var qi=Object.defineProperty,Wi=Object.getOwnPropertyDescriptor,Gi=(t,e,i,o)=>{for(var n,s=o>1?void 0:o?Wi(e,i):e,r=t.length-1;r>=0;r--)(n=t[r])&&(s=(o?n(e,i,s):n(s))||s);return o&&s&&qi(e,i,s),s};let Xi=class extends He{constructor(){super(...arguments),this.checked=!1,this.disabled=!1,this.loading=!1,this.color="#1890ff",this.openContent="",this.closeContent="",this.openIcon="",this.closeIcon=""}change(){this.disabled||this.loading||(this.checked=!this.checked,this.dispatchEvent(new CustomEvent("hm-switch-change",{detail:{checked:this.checked},bubbles:!0,composed:!0})))}render(){return ge`
|
|
712
697
|
<div
|
|
713
698
|
class="switch ${this.disabled?"disabled":""} ${this.loading?"loading":""} ${this.checked?"checked":""}"
|
|
714
699
|
@click="${this.change}"
|
|
@@ -718,7 +703,7 @@ style="width:${this.size}; height:${this.size};"
|
|
|
718
703
|
${this.checked?this.openIcon?ge`<hm-icon icon="${this.openIcon}" size="14px"></hm-icon>`:this.openContent?ge`<span>${this.openContent}</span>`:"":this.closeIcon?ge`<hm-icon icon="${this.closeIcon}" size="14px"></hm-icon>`:this.closeContent?ge`<span>${this.closeContent}</span>`:""}
|
|
719
704
|
</div>
|
|
720
705
|
</div>
|
|
721
|
-
`}};
|
|
706
|
+
`}};Xi.styles=Ht`
|
|
722
707
|
.switch {
|
|
723
708
|
position: relative;
|
|
724
709
|
display: inline-block;
|
|
@@ -799,7 +784,7 @@ style="width:${this.size}; height:${this.size};"
|
|
|
799
784
|
align-items: center;
|
|
800
785
|
justify-content: center;
|
|
801
786
|
}
|
|
802
|
-
`,
|
|
787
|
+
`,Gi([Be({type:Boolean})],Xi.prototype,"checked",2),Gi([Be({type:Boolean})],Xi.prototype,"disabled",2),Gi([Be({type:Boolean})],Xi.prototype,"loading",2),Gi([Be({type:String})],Xi.prototype,"color",2),Gi([Be({type:String,attribute:"open-content"})],Xi.prototype,"openContent",2),Gi([Be({type:String,attribute:"close-content"})],Xi.prototype,"closeContent",2),Gi([Be({type:String,attribute:"open-icon"})],Xi.prototype,"openIcon",2),Gi([Be({type:String,attribute:"close-icon"})],Xi.prototype,"closeIcon",2),Xi=Gi([Pe("hm-switch")],Xi);const Ji=Object.freeze(Object.defineProperty({__proto__:null,get HmSwitch(){return Xi}},Symbol.toStringTag,{value:"Module"}));var Zi=Object.defineProperty,Ki=Object.getOwnPropertyDescriptor,Yi=(t,e,i,o)=>{for(var n,s=o>1?void 0:o?Ki(e,i):e,r=t.length-1;r>=0;r--)(n=t[r])&&(s=(o?n(e,i,s):n(s))||s);return o&&s&&Zi(e,i,s),s};let Qi=class extends He{constructor(){super(...arguments),this.maxHeight="500px",this.items=[],this.titleContent="标题内容",this.expanded=!1}togglePanel(){this.expanded=!this.expanded}render(){return ge`
|
|
803
788
|
<div class="accordion-container" style="max-height: ${this.maxHeight}">
|
|
804
789
|
<div class="accordion-header" @click=${this.togglePanel}>
|
|
805
790
|
<slot name="header">${this.titleContent}</slot>
|
|
@@ -818,7 +803,7 @@ style="width:${this.size}; height:${this.size};"
|
|
|
818
803
|
</slot>
|
|
819
804
|
</div>
|
|
820
805
|
</div>
|
|
821
|
-
`}};
|
|
806
|
+
`}};Qi.styles=Ht`
|
|
822
807
|
:host {
|
|
823
808
|
display: block;
|
|
824
809
|
width: 100%;
|
|
@@ -892,14 +877,14 @@ style="width:${this.size}; height:${this.size};"
|
|
|
892
877
|
.accordion-item:hover {
|
|
893
878
|
background-color: #f8f9fa;
|
|
894
879
|
}
|
|
895
|
-
`,
|
|
880
|
+
`,Yi([Be({type:String,attribute:"max-height"})],Qi.prototype,"maxHeight",2),Yi([Be({type:Array})],Qi.prototype,"items",2),Yi([Be({type:String,attribute:"title-content"})],Qi.prototype,"titleContent",2),Yi([Be({type:Boolean})],Qi.prototype,"expanded",2),Qi=Yi([Pe("hm-accordion")],Qi);const to=Object.freeze(Object.defineProperty({__proto__:null,get HmAccordion(){return Qi}},Symbol.toStringTag,{value:"Module"}));var eo=Object.defineProperty,io=Object.getOwnPropertyDescriptor,oo=(t,e,i,o)=>{for(var n,s=o>1?void 0:o?io(e,i):e,r=t.length-1;r>=0;r--)(n=t[r])&&(s=(o?n(e,i,s):n(s))||s);return o&&s&&eo(e,i,s),s};let no=class extends He{constructor(){super(...arguments),this.type="text",this.icon="",this.label="输入框",this.placeholder="",this.disabled=!1,this.readonly=!1,this.value=""}_handleKeyDown(t){t.stopPropagation()}_handleInput(t){const e=t.target;this.value=e.value,this.requestUpdate("value",this.value),this.dispatchEvent(new CustomEvent("hm-input-change",{detail:{value:this.value},bubbles:!0,composed:!0}))}render(){return ge`
|
|
896
881
|
<div class="input-container">
|
|
897
882
|
<span class="label">${this.label}</span>
|
|
898
883
|
${this.icon?ge`<hm-icon icon="${this.icon}" class="icon"></hm-icon>`:""}
|
|
899
884
|
<input
|
|
900
885
|
type="${this.type}"
|
|
901
|
-
value="${this.value}"
|
|
902
|
-
?disabled="${
|
|
886
|
+
.value="${this.value}"
|
|
887
|
+
?disabled="${this.disabled}"
|
|
903
888
|
?readonly="${this.readonly}"
|
|
904
889
|
placeholder="${this.placeholder}"
|
|
905
890
|
style="padding-left: ${this.icon?"24px":"8px"};"
|
|
@@ -909,7 +894,7 @@ style="width:${this.size}; height:${this.size};"
|
|
|
909
894
|
<slot name="right">
|
|
910
895
|
</slot>
|
|
911
896
|
</div>
|
|
912
|
-
`}};
|
|
897
|
+
`}};no.styles=Ht`
|
|
913
898
|
:host {
|
|
914
899
|
display: block;
|
|
915
900
|
}
|
|
@@ -944,7 +929,7 @@ style="width:${this.size}; height:${this.size};"
|
|
|
944
929
|
width: 16px;
|
|
945
930
|
height: 16px;
|
|
946
931
|
}
|
|
947
|
-
`,
|
|
932
|
+
`,oo([Be({type:String})],no.prototype,"type",2),oo([Be({type:String})],no.prototype,"icon",2),oo([Be({type:String})],no.prototype,"label",2),oo([Be({type:String})],no.prototype,"placeholder",2),oo([Be({type:Boolean,reflect:!0})],no.prototype,"disabled",2),oo([Be({type:Boolean,reflect:!0})],no.prototype,"readonly",2),oo([Be({type:String,reflect:!0})],no.prototype,"value",2),no=oo([Pe("hm-input")],no);const so=Object.freeze(Object.defineProperty({__proto__:null,get HmInput(){return no}},Symbol.toStringTag,{value:"Module"}));var ro=Object.defineProperty,lo=Object.getOwnPropertyDescriptor,ao=(t,e,i,o)=>{for(var n,s=o>1?void 0:o?lo(e,i):e,r=t.length-1;r>=0;r--)(n=t[r])&&(s=(o?n(e,i,s):n(s))||s);return o&&s&&ro(e,i,s),s};let co=class extends He{constructor(){super(...arguments),this.isOpen=!1,this.dialog=this}open(){this.isOpen=!0,this.dispatchEvent(new CustomEvent("hm-dialog-open"))}close(){this.isOpen=!1,this.dispatchEvent(new CustomEvent("hm-dialog-close"))}confirm(){this.close(),this.dispatchEvent(new CustomEvent("hm-dialog-confirm"))}cancel(){this.close(),this.dispatchEvent(new CustomEvent("hm-dialog-cancel"))}updated(t){t.has("isOpen")&&(this.isOpen?this.style.display="block":this.style.display="none")}render(){return ge`
|
|
948
933
|
<div class="overlay"
|
|
949
934
|
@click="${this.close}"
|
|
950
935
|
></div>
|
|
@@ -957,7 +942,7 @@ style="width:${this.size}; height:${this.size};"
|
|
|
957
942
|
</slot>
|
|
958
943
|
</div>
|
|
959
944
|
</div>
|
|
960
|
-
`}};
|
|
945
|
+
`}};co.styles=Ht`
|
|
961
946
|
:host {
|
|
962
947
|
display: none;
|
|
963
948
|
position: fixed;
|
|
@@ -1002,7 +987,7 @@ style="width:${this.size}; height:${this.size};"
|
|
|
1002
987
|
hm-button {
|
|
1003
988
|
min-width: 80px;
|
|
1004
989
|
}
|
|
1005
|
-
`,
|
|
990
|
+
`,ao([Be({type:Boolean,attribute:"isopen"})],co.prototype,"isOpen",2),co=ao([Pe("hm-dialog")],co);const ho=Object.freeze(Object.defineProperty({__proto__:null,get HmDialog(){return co}},Symbol.toStringTag,{value:"Module"})),po=Object.freeze(Object.defineProperty({__proto__:null,hm_accordion:to,hm_button:yi,hm_cell:Si,hm_dialog:ho,hm_icon:ni,hm_input:so,hm_menu:ci,hm_move_panel:qe,hm_notification:gi,hm_select:Di,hm_swipe_cell:Ri,hm_switch:Ji},Symbol.toStringTag,{value:"Module"}));let uo=document.createElement("div");function go(){uo.id="hmMenuHolder";let t=document.querySelector("#functionHolderImg");console.debug(t),console.debug(uo),null!==t&&t.parentElement.insertAdjacentElement("afterend",uo)}const mo=Object.freeze(Object.defineProperty({__proto__:null,initMenuHolder:go,menuHolder:uo},Symbol.toStringTag,{value:"Module"}));let fo=document.createElement("div");function vo(){fo.id="hmMovePanelHolder",fo.style.zIndex="999999",document.body.append(fo)}const bo=Object.freeze(Object.defineProperty({__proto__:null,initMovePanelHolder:vo,movePanelHolder:fo},Symbol.toStringTag,{value:"Module"}));let yo=document.createElement("div");function wo(){yo.id="hmNotificationHolder",yo.style.zIndex="999999",document.body.append(yo)}const xo=Object.freeze(Object.defineProperty({__proto__:null,initNotificationHolder:wo,notificationHolder:yo},Symbol.toStringTag,{value:"Module"}));let $o=document.createElement("div");function _o(){$o.id="hmDialogHolder",$o.style.zIndex="999999",document.body.append($o)}const So=Object.freeze(Object.defineProperty({__proto__:null,dialogHolder:$o,initDialogHolder:_o},Symbol.toStringTag,{value:"Module"}));var ko=Object.defineProperty,Ao=(t,e,i,o)=>{for(var n,s=void 0,r=t.length-1;r>=0;r--)(n=t[r])&&(s=n(e,i,s)||s);return s&&ko(e,i,s),s};class Co extends He{constructor(){super(...arguments),this.dialogOpen=!1,this.message="请做出选择",this.closeCallback=null,this.cancelCallback=null,this.confirmCallback=null}handelClick(){this.dispatchEvent(new CustomEvent("hmclick"))}static{this.styles=Ht`
|
|
1006
991
|
`}render(){return ge`
|
|
1007
992
|
<hm-dialog
|
|
1008
993
|
?isopen="${this.dialogOpen}"
|
|
@@ -1012,10 +997,10 @@ style="width:${this.size}; height:${this.size};"
|
|
|
1012
997
|
>
|
|
1013
998
|
<p>${this.message}</p>
|
|
1014
999
|
</hm-dialog>
|
|
1015
|
-
`}}
|
|
1000
|
+
`}}Ao([Be({type:Boolean})],Co.prototype,"dialogOpen"),Ao([Be({type:String})],Co.prototype,"message"),Ao([Be({type:Function})],Co.prototype,"closeCallback"),Ao([Be({type:Function})],Co.prototype,"cancelCallback"),Ao([Be({type:Function})],Co.prototype,"confirmCallback");const Eo=document.createElement("hm-dialog-app");async function Oo(){customElements.define("hm-dialog-app",Co),Eo.dialogOpen=!1,Eo.message="请做出选择",Eo.closeCallback=null,Eo.cancelCallback=null,Eo.confirmCallback=null,$o.append(Eo)}const Mo=Object.freeze(Object.defineProperty({__proto__:null,HmDialogApp:Co,dialogApp:Eo,initDialogApp:Oo},Symbol.toStringTag,{value:"Module"})),zo={success(t,e,i=3e3){let o=document.createElement("hm-notification");o.title=t,o.content=e,o.displayTime=i,o.backgroundColor="rgba(57, 231, 34, 0.7)",o.color="rgb(255,255,255)",yo.append(o)},warning(t,e,i=3e3){let o=document.createElement("hm-notification");o.title=t,o.content=e,o.displayTime=i,o.backgroundColor="rgba(255,193,7,0.7)",o.color="rgb(255,255,255)",yo.append(o)},error(t,e,i=3e3){let o=document.createElement("hm-notification");o.title=t,o.content=e,o.displayTime=i,o.backgroundColor="rgba(255,0,0,0.7)",o.color="rgb(255,255,255)",yo.append(o)},normal(t,e,i=3e3){let o=document.createElement("hm-notification");o.title=t,o.content=e,o.displayTime=i,o.backgroundColor="rgba(33,33,33,0.7)",o.color="rgb(255,255,255)",yo.append(o)}};function Ho(t,e,i,o){Eo.message=t,Eo.confirmCallback=e||null,Eo.cancelCallback=i||null,Eo.closeCallback=o||null,Eo.dialogOpen=!0,console.debug("弹窗已打开",Eo)}const To=Object.freeze(Object.defineProperty({__proto__:null,confirm:Ho,notice:zo},Symbol.toStringTag,{value:"Module"}));var Po=Object.defineProperty,jo=(t,e,i,o)=>{for(var n,s=void 0,r=t.length-1;r>=0;r--)(n=t[r])&&(s=n(e,i,s)||s);return s&&Po(e,i,s),s};const Lo="hm-script-app";class Bo extends He{constructor(){super(),this.scriptName="",this.scriptUrl="",this.scriptEnable=!0,this.scriptIngected=!1,this.dialogOpen=!1,this.isUpdate=!1,this.storeSnap=G.snapshot(X),G.subscribe(X,()=>{this.storeSnap=G.snapshot(X),this.requestUpdate()})}render(){return ge`
|
|
1016
1001
|
<hm-dialog ?isopen="${this.dialogOpen}"
|
|
1017
1002
|
@hm-dialog-close="${()=>{this.dialogOpen=!1}}"
|
|
1018
|
-
@hm-dialog-confirm="${()=>{if(""==this.scriptName.trim()||""==this.scriptUrl.trim())return void
|
|
1003
|
+
@hm-dialog-confirm="${()=>{if(""==this.scriptName.trim()||""==this.scriptUrl.trim())return void zo.error(Lo,"请填写完整的脚本信息");this.scriptEnable=!0,this.scriptIngected=!1;let t=new vt(this.scriptName,this.scriptUrl,this.scriptEnable),e=!1;e=this.isUpdate?yt(t):bt(t),e?zo.success(Lo,"脚本添加成功"):zo.error(Lo,"脚本添加失败"),this.isUpdate=!1,this.dialogOpen=!1,this.storeSnap=G.snapshot(X)}}"
|
|
1019
1004
|
>
|
|
1020
1005
|
<h2>修改或添加脚本</h2>
|
|
1021
1006
|
<hm-input
|
|
@@ -1042,14 +1027,14 @@ style="width:${this.size}; height:${this.size};"
|
|
|
1042
1027
|
<div slot="left-actions">
|
|
1043
1028
|
<hm-button
|
|
1044
1029
|
icon="delete"
|
|
1045
|
-
@hm-button-click="${()=>{wt(t)?
|
|
1030
|
+
@hm-button-click="${()=>{wt(t)?zo.success(Lo,"脚本删除成功"):zo.error(Lo,"脚本已经不在脚本列表中"),this.storeSnap=G.snapshot(X)}}"
|
|
1046
1031
|
>删除</hm-button
|
|
1047
1032
|
>
|
|
1048
1033
|
</div>
|
|
1049
1034
|
<hm-cell title-name="${t.name}" descripthion="${t.url}">
|
|
1050
1035
|
<hm-switch
|
|
1051
1036
|
?checked="${t.enable}"
|
|
1052
|
-
@hm-switch-change="${e=>{yt(new vt(t.name,t.url,e.detail.checked))?
|
|
1037
|
+
@hm-switch-change="${e=>{yt(new vt(t.name,t.url,e.detail.checked))?zo.success(Lo,"脚本修改成功"):zo.error(Lo,"脚本修改失败")}}"
|
|
1053
1038
|
></hm-switch>
|
|
1054
1039
|
</hm-cell>
|
|
1055
1040
|
<div slot="right-actions">
|
|
@@ -1061,7 +1046,7 @@ style="width:${this.size}; height:${this.size};"
|
|
|
1061
1046
|
<hm-button
|
|
1062
1047
|
icon="run"
|
|
1063
1048
|
?enable="${!ft.includes(t.url)}"
|
|
1064
|
-
@hm-button-click="${()=>{_t(t)?
|
|
1049
|
+
@hm-button-click="${()=>{_t(t)?zo.success(Lo,"脚本运行成功"):zo.error(Lo,"脚本运行失败,脚本已经在运行了")}}"
|
|
1065
1050
|
>运行</hm-button
|
|
1066
1051
|
>
|
|
1067
1052
|
</div>
|
|
@@ -1086,7 +1071,7 @@ style="width:${this.size}; height:${this.size};"
|
|
|
1086
1071
|
保存
|
|
1087
1072
|
</hm-button>
|
|
1088
1073
|
</div>
|
|
1089
|
-
</hm-accordion>`}}
|
|
1074
|
+
</hm-accordion>`}}jo([Be({type:String})],Bo.prototype,"scriptName"),jo([Be({type:String})],Bo.prototype,"scriptUrl"),jo([Be({type:Boolean})],Bo.prototype,"scriptEnable"),jo([Be({type:Boolean})],Bo.prototype,"scriptIngected"),jo([Be({type:Boolean})],Bo.prototype,"dialogOpen");const Io={name:"hortimagic",private:!1,version:"1.1.5",changelog:"新增气泡组件",author:"Narlen",description:"园艺魔法,花园插件",keywords:["iirose","plugins","hortimagic"],repository:{type:"git",url:"https://github.com/NarlenHua/hortimagic.git"},license:"MIT",type:"module",scripts:{dev:"vite",build:"tsc && vite build",preview:"vite preview"},dependencies:{lit:"^3.3.1",terser:"^5.44.0",valtio:"^2.2.0","vite-plugin-dts":"^4.5.4"},devDependencies:{"@types/node":"^24.9.1",typescript:"~5.9.3",vite:"^7.1.7"},main:"dist/Horticraft.life.js",module:"dist/HortiCraft.es.js",typings:"dist/index.d.ts",types:"dist/index.d.ts",files:["dist","scripts","src","types"]};class Do extends He{constructor(){super(...arguments),this.storeSnap=G.snapshot(X)}static{this.styles=Ht`
|
|
1090
1075
|
.config-item {
|
|
1091
1076
|
margin: 10px 0;
|
|
1092
1077
|
}
|
|
@@ -1185,7 +1170,7 @@ style="width:${this.size}; height:${this.size};"
|
|
|
1185
1170
|
@hm-input-change="${t=>{const e=parseInt(t.detail.value)||100;X.logListLength=e,tt.debug("log list length changed:",e)}}"
|
|
1186
1171
|
></hm-input>
|
|
1187
1172
|
</div>
|
|
1188
|
-
`}}var
|
|
1173
|
+
`}}var No=Object.defineProperty;class Uo extends He{constructor(){super(),this.logList=[],this.foldState=new Map,X.logListLength<1&&(X.logListLength=50),Q.on("log",(t,...e)=>{let i="log";if(e.length>0){const t=e[0];"string"==typeof t&&(t.startsWith("[DEBUG]")?i="debug":t.startsWith("[INFO]")?i="info":t.startsWith("[WARN]")?i="warn":t.startsWith("[ERROR]")&&(i="error"))}const o=[...e];o.length>0&&"string"==typeof o[0]&&["[DEBUG]","[INFO]","[WARN]","[ERROR]"].some(t=>o[0].startsWith(t))&&o.shift();const n={timestamp:new Date,level:i,tag:t,message:o};for(;this.logList.length>=X.logListLength;)this.logList.shift();this.logList.push(n),this.requestUpdate()})}static{this.styles=Ht`
|
|
1189
1174
|
.log-container {
|
|
1190
1175
|
height: 400px;
|
|
1191
1176
|
overflow-y: auto;
|
|
@@ -1242,53 +1227,38 @@ style="width:${this.size}; height:${this.size};"
|
|
|
1242
1227
|
margin-top: 4px;
|
|
1243
1228
|
max-height: 60px; /* 限制高度,触发折叠 */
|
|
1244
1229
|
overflow: hidden;
|
|
1245
|
-
cursor:
|
|
1230
|
+
cursor: text; /* 改变光标形状以表示可选择 */
|
|
1246
1231
|
position: relative;
|
|
1247
1232
|
display: block; /* 确保每条消息独占一行 */
|
|
1248
1233
|
// 强制显示滚动条
|
|
1249
|
-
scrollbar-width:
|
|
1250
|
-
-ms-overflow-style:
|
|
1251
|
-
overflow-y: scroll; /* 强制显示垂直滚动条 */
|
|
1234
|
+
scrollbar-width: none; /* Firefox - 隐藏滚动条 */
|
|
1235
|
+
-ms-overflow-style: none; /* IE and Edge - 隐藏滚动条 */
|
|
1252
1236
|
font-size: 14px; /* 调整消息字体大小 */
|
|
1253
1237
|
line-height: 1.5; /* 调整行高 */
|
|
1254
1238
|
background-color: #fff; /* 设置背景色 */
|
|
1255
1239
|
padding: 5px; /* 添加内边距 */
|
|
1256
1240
|
border-radius: 4px; /* 圆角 */
|
|
1241
|
+
white-space: nowrap; /* 防止文本换行 */
|
|
1242
|
+
text-overflow: ellipsis; /* 显示省略号 */
|
|
1243
|
+
user-select: text; /* 允许文本选择 */
|
|
1244
|
+
-webkit-user-select: text; /* Safari兼容 */
|
|
1245
|
+
-moz-user-select: text; /* Firefox兼容 */
|
|
1246
|
+
-ms-user-select: text; /* IE/Edge兼容 */
|
|
1257
1247
|
}
|
|
1258
1248
|
|
|
1259
|
-
.message
|
|
1260
|
-
|
|
1261
|
-
color: #999;
|
|
1262
|
-
position: absolute;
|
|
1263
|
-
bottom: 0;
|
|
1264
|
-
right: 0;
|
|
1265
|
-
background: linear-gradient(to right, transparent, #f5f5f5 70%);
|
|
1249
|
+
.message::-webkit-scrollbar { /* 隐藏Webkit浏览器的滚动条 */
|
|
1250
|
+
display: none;
|
|
1266
1251
|
}
|
|
1267
1252
|
|
|
1268
1253
|
.message.expanded {
|
|
1269
1254
|
max-height: none;
|
|
1270
|
-
overflow:
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
background-color: #eaeaea; /* 设置控制区域背景色 */
|
|
1278
|
-
border-bottom: 1px solid #ddd; /* 添加下边框 */
|
|
1279
|
-
}
|
|
1280
|
-
|
|
1281
|
-
.clear-btn {
|
|
1282
|
-
background: #ff3333;
|
|
1283
|
-
color: white;
|
|
1284
|
-
border: none;
|
|
1285
|
-
padding: 5px 10px;
|
|
1286
|
-
cursor: pointer;
|
|
1287
|
-
border-radius: 3px;
|
|
1288
|
-
}
|
|
1289
|
-
|
|
1290
|
-
.clear-btn:hover {
|
|
1291
|
-
background: #cc0000;
|
|
1255
|
+
overflow-y: auto;
|
|
1256
|
+
overflow-x: hidden;
|
|
1257
|
+
white-space: normal; /* 展开时允许正常换行 */
|
|
1258
|
+
user-select: text; /* 允许文本选择 */
|
|
1259
|
+
-webkit-user-select: text; /* Safari兼容 */
|
|
1260
|
+
-moz-user-select: text; /* Firefox兼容 */
|
|
1261
|
+
-ms-user-select: text; /* IE/Edge兼容 */
|
|
1292
1262
|
}
|
|
1293
1263
|
`}render(){return ge`
|
|
1294
1264
|
<div class="controls">
|
|
@@ -1296,7 +1266,7 @@ style="width:${this.size}; height:${this.size};"
|
|
|
1296
1266
|
<span>共 ${this.logList.length} 条日志</span>
|
|
1297
1267
|
</div>
|
|
1298
1268
|
<div class="log-container">
|
|
1299
|
-
${this.logList.map(t=>{const e=`${t.timestamp.getTime()}-${t.tag}-${t.level}`,
|
|
1269
|
+
${this.logList.map(t=>{const e=`${t.timestamp.getTime()}-${t.tag}-${t.level}`,i=this.foldState.get(e)??!1,o=t.message.map(t=>"object"==typeof t?JSON.stringify(t):String(t)).join(" "),n=o.length>100;return ge`
|
|
1300
1270
|
<div class="log-entry">
|
|
1301
1271
|
<div class="log-header">
|
|
1302
1272
|
<span class="timestamp">${this.formatTime(t.timestamp)}</span>
|
|
@@ -1304,12 +1274,12 @@ style="width:${this.size}; height:${this.size};"
|
|
|
1304
1274
|
<span class="tag">${t.tag}</span>
|
|
1305
1275
|
</div>
|
|
1306
1276
|
<div
|
|
1307
|
-
class="message ${
|
|
1277
|
+
class="message ${i||!n?"expanded":"collapsed"}"
|
|
1308
1278
|
@click="${()=>this.toggleFold(e)}"
|
|
1309
1279
|
>
|
|
1310
|
-
${
|
|
1280
|
+
${i||!n?o:o.substring(0,100)}
|
|
1311
1281
|
</div>
|
|
1312
1282
|
</div>
|
|
1313
1283
|
`})}
|
|
1314
1284
|
</div>
|
|
1315
|
-
`}formatTime(t){return`${String(t.getHours()).padStart(2,"0")}:${String(t.getMinutes()).padStart(2,"0")}:${String(t.getSeconds()).padStart(2,"0")}.${String(t.getMilliseconds()).padStart(3,"0")}`}clearLogs(){this.logList=[],this.requestUpdate()}toggleFold(t){const e=this.foldState.get(t)??!1;this.foldState.set(t,!e),this.requestUpdate()}}async function
|
|
1285
|
+
`}formatTime(t){return`${String(t.getHours()).padStart(2,"0")}:${String(t.getMinutes()).padStart(2,"0")}:${String(t.getSeconds()).padStart(2,"0")}.${String(t.getMilliseconds()).padStart(3,"0")}`}clearLogs(){this.logList=[],this.requestUpdate()}toggleFold(t){const e=this.foldState.get(t)??!1;this.foldState.set(t,!e),this.requestUpdate()}}async function Vo(){try{K(),wo(),_o(),await Oo(),go(),vo(),zo.normal(Io.name,"注入网络钩子函数"),await nt(),zo.normal(Io.name,"注入钩子函数"),dt(),ut(),zo.normal(Io.name,"注入脚本"),St(),zo.normal(Io.name,"生成菜单");let t=document.createElement("hm-menu");t.content="HortiMagic",t.isMenuItem=!1;let e=function(){customElements.define("hm-config-app",Do);let t=document.createElement("hm-move-panel");t.titleContent="设置",t.icon="config",t.leftButtonText="读取",t.leftIcon="load",t.addEventListener("left-button-click",function(){Z()}),t.rightButtonText="保存",t.rightIcon="save",t.addEventListener("right-button-click",function(){J()}),fo.appendChild(t),t.innerHTML="\n <hm-config-app></hm-config-app>\n ";let e=document.createElement("hm-menu");return e.content="设置",e.isMenuItem=!0,e.icon="config",e.addEventListener("hm-menu-click",function(){t.putTopToggel()}),e}(),i=function(){customElements.define("hm-log-app",Uo);let t=document.createElement("hm-move-panel");t.titleContent="日志",t.icon="log",t.width=400,fo.appendChild(t),t.innerHTML="<hm-log-app></hm-log-app>";let e=document.createElement("hm-menu");return e.content="日志",e.isMenuItem=!0,e.icon="log",e.addEventListener("hm-menu-click",function(){t.putTopToggel()}),e}(),o=function(){customElements.define("hm-script-app",Bo);let t=document.createElement("hm-move-panel");t.titleContent="脚本管理",t.icon="js",t.leftButtonText="读取",t.leftIcon="load",t.addEventListener("left-button-click",function(){Z()}),t.rightButtonText="保存",t.rightIcon="save",t.addEventListener("right-button-click",function(){J()}),fo.appendChild(t),t.innerHTML="<hm-script-app> </hm-script-app>\n ";let e=document.createElement("hm-menu");return e.content="脚本管理",e.isMenuItem=!0,e.icon="js",e.addEventListener("hm-menu-click",function(){t.putTopToggel()}),e}();t.addEventListener("hm-menu-click",function(){e.flag=t.flag,i.flag=t.flag,o.flag=t.flag}),uo.append(t,e,i,o),zo.success(Io.name,`${Io.version} 已加载`)}catch(t){console.error(t)}}((t,e,i)=>{for(var o,n=void 0,s=t.length-1;s>=0;s--)(o=t[s])&&(n=o(e,i,n)||n);n&&No(e,i,n)})([Be({type:Array})],Uo.prototype,"logList");const Fo=Object.freeze(Object.defineProperty({__proto__:null,init:Vo},Symbol.toStringTag,{value:"Module"})),Ro=Object.freeze(Object.defineProperty({__proto__:null,dialog_app:Mo,main_app:Fo},Symbol.toStringTag,{value:"Module"})),qo=Object.freeze(Object.defineProperty({__proto__:null,dialog:So,menu:mo,move_panel:bo,notification:xo},Symbol.toStringTag,{value:"Module"})),Wo={name:Io.name,version:Io.version,changelog:Io.changelog,description:Io.description,author:Io.author,license:Io.license,repository:Io.repository,buildTime:(new Date).toISOString(),ingected:!1};return async function(){await Vo(),Wo.ingected=!0}(),t.apps=Ro,t.components=po,t.confirm=Ho,t.core=At,t.easy_tools=To,t.holders=qo,t.information=Wo,t.logger=tt,t.notice=zo,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),t}({});
|