function getREQS(){var t=location.search;if(-1!=t.indexOf("?")){var e=t.substr(1);REQS=e.split("&")}}function _gSet(t,e){Object.defineProperty(window,t,{value:e,writable:!1,enumerable:!0,configurable:!1})}function _hSet(t,e){Object.defineProperty(HTMLElement.prototype,t,{value:e,writable:!1,enumerable:!0,configurable:!1})}window._VIXJSVER=5,window.REQS=[],getREQS();for(var i=3;i<9;i++)_gSet("_C"+i,String.fromCharCode(i));_gSet("_RSOB",new ResizeObserver((t=>{for(let e of t){const{width:t,height:n}=e.contentRect;e.target._resizeFun&&e.target._resizeFun(t,n)}})));var vixConst={playIcon:`url(data:image/svg+xml,${encodeURIComponent('')})`,svgTxt:`url(data:image/svg+xml,${encodeURIComponent('')})`,headHelper:`url(data:image/svg+xml,${encodeURIComponent('')})`};window.vixBus={map:{},on(t,e){(this.map[t]=this.map[t]||[]).push(e)},send(t,e){(this.map[t]||[]).forEach((t=>t(e)))}},Array.prototype.shuffle=function(){for(var t,e,n=this,i=n.length;i;)e=Math.floor(Math.random()*i--),t=n[i],n[i]=n[e],n[e]=t;return n},$conLog=function(t,e){var n=document.body.son("div",{position:"absolute",width:"100%",height:"100%",textAlign:"center",backgroundColor:"rgba(0,0,0,0.5)",zIndex:3e6,display:"flex",alignItems:"center",justifyContent:"center",textAlign:"justify",left:0,top:0,opacity:0,transition:"opacity 0.7s ease"});n.tab=n.son("table",{width:"300px",margin:"auto",maxHeight:"800px",borderRadius:"5px 5px 5px 5px",backgroundColor:"rgba(255,255,255,1)"}),n.tab.insertRow(-1).insertCell().css({textAlign:"center",minHeight:"62px",height:"62px",borderBottom:"1px solid #f1f1f1"},{innerHTML:t,colSpan:2});var i=n.tab.insertRow(-1),o=i.insertCell(),r=i.insertCell();o.css({textAlign:"center",height:"42px",borderRight:"1px solid #f1f1f1"},{innerHTML:"取消",onclick:function(){_backRun()}}),r.css({textAlign:"center",height:"42px",color:"#1989fa"},{innerHTML:"确认",onclick:function(){e&&e(),_backRun()}}),n.close=function(){document.body.removeChild(n)},n.tab.onclick=function(){event.stopPropagation()},n.tab.Fly({SS:0}),n.tab.Fly({SS:1,d:800}),setTimeout((function(){n.style.opacity=1}),5),_backKey((function(){n.close()}))};class MOM{constructor(t,e={},n){this.targets=new Set,this.observer=new MutationObserver(n);this.config={attributes:!0,childList:!0,subtree:!1,attributeOldValue:!0,...e};const i=Array.isArray(t)?t:[t];this.add(...i)}add(...t){t.forEach((t=>{this.targets.has(t)||(this.targets.add(t),this.observer.observe(t,this.config))}))}removeTarget(t){this.targets.has(t)&&(this.targets.delete(t),this.observer.unobserve(t))}disconnect(){this.observer.disconnect(),this.targets.clear()}}window.thattsvg=svgToDataUri(''),window.thatfsvg=svgToDataUri('');class PeriodicRequester{constructor(t,e,n,i){this.url=t,this.interval=e,this.action=n,this.ection=i,this.currentController=null,this.timer=null}start(){if(null!==this.timer)return;const t=()=>{this.currentController&&this.currentController.abort(),this.currentController=new AbortController;const t=this.currentController.signal;fetch(this.url,{signal:t}).then((t=>{if(!t.ok)throw new Error("Network response was not ok");return t.json()})).then((t=>{this.action(t)})).catch((t=>{"AbortError"===t.name?console.log("Request was aborted"):this.ection(t)}))};t(),this.timer=setInterval(t,this.interval)}stop(){null!==this.timer&&(clearInterval(this.timer),this.timer=null),this.currentController&&this.currentController.abort()}}class touchPad{constructor(t,e,n=100){this.element=t,this.startX=0,this.startY=0,this.accumulatedDx=0,this.accumulatedDy=0,this.isDragging=!1,this.externalMoveBy=e,this.element.addEventListener("touchstart",this.onTouchStart.bind(this)),this.element.addEventListener("touchmove",this.onTouchMove.bind(this)),this.element.addEventListener("touchend",this.onTouchEnd.bind(this)),this.element.addEventListener("mousedown",this.onMouseDown.bind(this)),document.addEventListener("mousemove",this.onMouseMove.bind(this)),document.addEventListener("mouseup",this.onMouseUp.bind(this)),this.element.addEventListener("wheel",this.onWheel.bind(this)),this.throttledMoveBy=this.throttle(this._moveBy.bind(this),n)}onTouchStart(t){const e=t.touches[0];this.startX=e.clientX,this.startY=e.clientY}onTouchMove(t){t.preventDefault();const e=t.touches[0],n=e.clientX-this.startX,i=4*(e.clientY-this.startY);this.startX=e.clientX,this.startY=e.clientY,this.accumulatedDx+=n,this.accumulatedDy+=i,this.throttledMoveBy()}onTouchEnd(t){this.accumulatedDx=0,this.accumulatedDy=0,console.log("Touch ended, reset accumulated dx/dy")}onMouseDown(t){this.startX=t.clientX,this.startY=t.clientY,this.isDragging=!0}onMouseMove(t){if(!this.isDragging)return;const e=t.clientX-this.startX,n=t.clientY-this.startY;this.startX=t.clientX,this.startY=t.clientY,this.accumulatedDx+=e,this.accumulatedDy+=n,this.throttledMoveBy()}onMouseUp(t){this.isDragging&&(this.accumulatedDx=0,this.accumulatedDy=0,this.isDragging=!1,console.log("Mouse drag ended, reset accumulated dx/dy"))}onWheel(t){const e=t.deltaX,n=.25*t.deltaY;this.accumulatedDx+=e,this.accumulatedDy+=n,this.throttledMoveBy()}_moveBy(){this.externalMoveBy(this.accumulatedDx,this.accumulatedDy),this.accumulatedDx=0,this.accumulatedDy=0}throttle(t,e){let n=0;return function(...i){const o=Date.now();o-n>=e&&(t(...i),n=o)}}}class SplitterPane{constructor(t,e){this.container=t,this.layout=e,this.splitter=t.son("div",{left:t.offsetWidth/2-10,top:t.offsetHeight/2-10,width:20,height:20,position:"absolute",backgroundColor:"rgba(20, 20, 20, 0.3)",borderRadius:"20px",cursor:"move",zIndex:10}),this.panes=[],this.isDragging=!1,this.startX=0,this.startY=0,this.resizex=null,this.initialize(),t.addEventListener("click",(e=>{if(e.ctrlKey){const n=t.getBoundingClientRect();this.splitter.css({left:e.clientX-n.left-10,top:e.clientY-n.top-10}),this.updatePanes()}}))}initialize(){let t=0;switch(this.layout){case"S4P":t=4;break;case"S3T":case"S3U":case"S81":case"S18":t=3;break;default:return void console.error("Unknown layout type")}for(let e=0;e{t.preventDefault(),this.isDragging=!0,this.splitter.style.cursor="move",this.startX=t.clientX,this.startY=t.clientY})),document.addEventListener("mousemove",(t=>{if(!this.isDragging)return;t.preventDefault();const e=this.container.getBoundingClientRect();let n=this.splitter.offsetLeft+t.clientX-this.startX,i=this.splitter.offsetTop+t.clientY-this.startY;n=Math.max(0,Math.min(n,e.width-this.splitter.offsetWidth)),i=Math.max(0,Math.min(i,e.height-this.splitter.offsetHeight)),this.splitter.style.left=`${n}px`,this.splitter.style.top=`${i}px`,this.updatePanes(),this.startX=t.clientX,this.startY=t.clientY})),document.addEventListener("mouseup",(()=>{this.isDragging&&(this.isDragging=!1,this.splitter.style.cursor="move")}))}initSplitterPosition(){this.updatePanes()}updatePanes(){const t=this.container.getBoundingClientRect(),e=this.splitter.getBoundingClientRect();switch(this.layout){case"S4P":this.updatePanesS4P(t,e);break;case"S3T":this.updatePanesS3T(t,e);break;case"S3U":this.updatePanesS3U(t,e);break;case"S81":this.updatePanesS81(t,e);break;case"S18":this.updatePanesS18(t,e);break;default:console.error("Unknown layout type")}this.resizex&&this.resizex()}updatePanesS4P(t,e){this.panes[0].css({top:0,left:0,width:e.left-t.left+10,height:e.top-t.top+10}),this.panes[1].css({top:0,left:e.right-t.left-10,width:t.right-e.right+10,height:e.top-t.top+10}),this.panes[2].css({top:e.bottom-t.top-10,left:e.right-t.left-10,width:t.right-e.right+10,height:t.bottom-e.bottom+10}),this.panes[3].css({top:e.bottom-t.top-10,left:0,width:e.left-t.left+10,height:t.bottom-e.bottom+10})}updatePanesS3T(t,e){this.panes[0].css({top:0,left:0,width:t.width,height:e.top-t.top+10}),this.panes[1].css({top:e.top-t.top+10,left:0,width:e.left-t.left+10,height:t.bottom-e.top-10}),this.panes[2].css({top:e.top-t.top+10,left:e.right-t.left-10,width:t.right-e.right+10,height:t.bottom-e.top-10})}updatePanesS3U(t,e){this.panes[0].css({top:0,left:0,width:e.left-t.left+10,height:e.top-t.top+10}),this.panes[1].css({top:0,left:e.right-t.left-10,width:t.right-e.right+10,height:e.top-t.top+10}),this.panes[2].css({top:e.top-t.top+10,left:0,width:t.width,height:t.bottom-e.top-10})}updatePanesS81(t,e){this.panes[0].css({top:0,left:0,width:e.left-t.left+10,height:e.top-t.top+10}),this.panes[1].css({top:e.top-t.top+10,left:0,width:e.left-t.left+10,height:t.bottom-e.top-10}),this.panes[2].css({top:0,left:e.right-t.left-10,width:t.right-e.right+10,height:t.bottom-t.top})}updatePanesS18(t,e){this.panes[0].css({top:0,left:0,width:e.left-t.left+10,height:t.bottom-t.top}),this.panes[1].css({top:0,left:e.right-t.left-10,width:t.right-e.right+10,height:e.top-t.top+10}),this.panes[2].css({top:e.bottom-t.top-10,left:e.right-t.left-10,width:t.right-e.right+10,height:t.bottom-e.bottom+10})}}var w20796=!1;function $ilog(t,e){var n=e||3e3;w20796||(w20796=document.body.son("table",{position:"absolute",maxWidth:"60%",opacity:1,top:5,fontSize:16,right:"10%",zIndex:3e4})),w20796.show();var i=w20796.insertRow(-1);u=i.insertCell(),u.css({border:"1px solid #e1f3d8",backgroundColor:n>0?"#f0f9eb":"#F00",borderRadius:"8px",color:"#67C23A",fontWeight:"bold",padding:10}),u.innerText=t,n>0?setTimeout((function(){$cle(i),0==w20796.rows.length&&w20796.hide()}),n):u.onclick=function(){$cle(this.parentElement),0==w20796.rows.length&&w20796.hide()}}$clog=$ilog;var w20797=!1;function $elog(t,e){var n=e||3e3;w20797||(w20797=document.body.son("table",{position:"absolute",maxWidth:"60%",opacity:1,top:5,fontSize:16,right:"10%",zIndex:3e4})),w20797.show();var i=w20797.insertRow(-1);u=i.insertCell(),u.css({border:"1px solid #e1f3d8",backgroundColor:n>0?"#fef0f0":"#F00",borderRadius:"8px",color:"#F56C6C",fontWeight:"bold",padding:10}),u.innerText=t,n>0?setTimeout((function(){$cle(i),0==w20797.rows.length&&w20797.hide()}),n):u.onclick=function(){$cle(this.parentElement),0==w20797.rows.length&&w20797.hide()}}function videoCanvasPan(t,e,n={}){n=OPlus({autoplay:!1,loop:!1,controls:!1,muted:!0,poster:"",buttonOpacity:.5},n),t.clc();let i=t.son("div",{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden",background:"none"}).son("div",{background:"#fff",border:"0px solid #000",boxSizing:"border-box"});const o=t.son("video",{position:"absolute",left:0,top:0,width:10,height:10,opacity:.01,pointerEvents:"none"});o.src=e,o.setAttribute("playsinline","playsinline"),o.setAttribute("webkit-playsinline","webkit-playsinline"),o.setAttribute("muted","muted"),o.muted=!0,n.autoplay&&o.setAttribute("autoplay","autoplay"),n.loop&&o.setAttribute("loop","loop"),n.poster&&(o.poster=n.poster);const r=t.son("canvas",{position:"absolute",left:0,top:0,zIndex:10});let s={scale:1,offsetX:0,offsetY:0,dragging:!1,lastX:0,lastY:0,boxW:0,boxH:0,rotate:!1,scale0:1};function a(t,e){return t>=e?"x":"y"}function l(){const e=t.clientWidth,n=t.clientHeight,l=o.videoWidth,c=o.videoHeight;if(!l||!c)return;const d=a(e,n)!==a(l,c);let h=d?c:l,u=d?l:c,p=Math.min(e/h,n/u),f=h*p,g=u*p;i.css({width:f+"px",height:g+"px"});let L=i.getBoundingClientRect(),v=t.getBoundingClientRect(),b=L.left-v.left,m=L.top-v.top;r.width=i.offsetWidth,r.height=i.offsetHeight,r.style.left=b+"px",r.style.top=m+"px",s.boxW=h,s.boxH=u,s.rotate=d,s.scale0=p,s.scale=1,s.offsetX=0,s.offsetY=0}function c(){s.scale=1,s.offsetX=0,s.offsetY=0}function d(t,e){if(!s.rotate)return{x:t,y:e};let n=r.width/2,i=r.height/2;return{x:n-(e-i),y:i+(t-n)}}r.onwheel=t=>{t.preventDefault();let e=r.getBoundingClientRect(),n=t.clientX-e.left,i=t.clientY-e.top,{x:o,y:a}=d(n,i),l=s.scale,c=t.deltaY<0?1.1:.9,h=Math.max(.1,Math.min(10,l*c));console.log("[zoom]",{px:n,py:i,mx:o,my:a,before:{scale:l,offsetX:s.offsetX,offsetY:s.offsetY}}),s.offsetX=o-(o-s.offsetX)*(l/h),s.offsetY=a-(a-s.offsetY)*(l/h),s.scale=h,console.log("[zoom result]",{after:{scale:h,offsetX:s.offsetX,offsetY:s.offsetY}})};r.onmousedown=t=>{let e=r.getBoundingClientRect(),n=t.clientX-e.left,i=t.clientY-e.top,{x:o,y:a}=d(n,i);s.dragging=!0,s.lastX=o,s.lastY=a,console.log("[mousedown]",{px:n,py:i,x:o,y:a,offsetX:s.offsetX,offsetY:s.offsetY})},window.addEventListener("mousemove",(t=>{if(s.dragging){let e=r.getBoundingClientRect(),n=t.clientX-e.left,i=t.clientY-e.top,{x:o,y:a}=d(n,i);s.offsetX+=o-s.lastX,s.offsetY+=a-s.lastY,s.lastX=o,s.lastY=a,console.log("[drag]",{px:n,py:i,x:o,y:a,offsetX:s.offsetX,offsetY:s.offsetY})}})),window.addEventListener("mouseup",(t=>{s.dragging=!1}));let h=0,u=1,p={x:0,y:0},f={x:0,y:0};r.ontouchstart=function(t){if(1===t.touches.length){let e=t.touches[0],n=r.getBoundingClientRect(),i=e.clientX-n.left,o=e.clientY-n.top,{x:a,y:l}=d(i,o);s.dragging=!0,s.lastX=a,s.lastY=l,console.log("[touchstart]",{tx:i,ty:o,x:a,y:l,offsetX:s.offsetX,offsetY:s.offsetY})}else if(2===t.touches.length){s.dragging=!1;const e=t.touches[0],n=t.touches[1];let i=r.getBoundingClientRect(),o=e.clientX-i.left,a=e.clientY-i.top,l=n.clientX-i.left,c=n.clientY-i.top,g=d(o,a),L=d(l,c);h=Math.hypot(L.x-g.x,L.y-g.y),u=s.scale,p={x:(g.x+L.x)/2,y:(g.y+L.y)/2},f={x:s.offsetX,y:s.offsetY},console.log("[pinchstart]",{x1:o,y1:a,x2:l,y2:c,p1:g,p2:L,pinchStartMid:p,pinchStartScale:u,pinchStartOffset:f})}},r.ontouchmove=function(t){if(1===t.touches.length&&s.dragging){let e=t.touches[0],n=r.getBoundingClientRect(),i=e.clientX-n.left,o=e.clientY-n.top,{x:a,y:l}=d(i,o);s.offsetX+=a-s.lastX,s.offsetY+=l-s.lastY,s.lastX=a,s.lastY=l,console.log("[touchdrag]",{tx:i,ty:o,x:a,y:l,offsetX:s.offsetX,offsetY:s.offsetY})}else if(2===t.touches.length){const e=t.touches[0],n=t.touches[1];let i=r.getBoundingClientRect(),o=e.clientX-i.left,a=e.clientY-i.top,l=n.clientX-i.left,c=n.clientY-i.top,g=d(o,a),L=d(l,c);const v=Math.hypot(L.x-g.x,L.y-g.y);let b=u,m=Math.max(.1,Math.min(10,b*(v/h))),y=p,x={x:(g.x+L.x)/2,y:(g.y+L.y)/2},w=f;s.scale=m,s.offsetX=x.x-(y.x-w.x)*(b/m),s.offsetY=x.y-(y.y-w.y)*(b/m),console.log("[pinchmove]",{x1:o,y1:a,x2:l,y2:c,p1:g,p2:L,mid:x,mid0:y,offset0:w,S0:b,S1:m,offsetX:s.offsetX,offsetY:s.offsetY}),t.preventDefault()}},r.ontouchend=function(t){s.dragging=!1},r.ontouchcancel=function(t){s.dragging=!1},r.ondblclick=function(t){c()};let g=t.son("div",{position:"absolute",right:"24px",bottom:"24px",width:"54px",height:"54px",borderRadius:"50%",background:"#1ec01e",opacity:n.buttonOpacity,cursor:"pointer",zIndex:30,userSelect:"none",boxShadow:"0 2px 8px rgba(0,0,0,0.2)",transition:"background 0.2s, opacity 0.2s"});function L(){g.style.background=o.paused?"#1ec01e":"#e52b24",g.title=o.paused?"播放":"暂停"}if(o.addEventListener("play",L),o.addEventListener("pause",L),g.onclick=function(t){t.stopPropagation(),o.paused?(o.muted=!1,o.removeAttribute("muted"),o.volume=1,o.currentTime+=.01,o.play().catch((()=>{}))):o.pause()},L(),o.addEventListener("loadedmetadata",l),o.addEventListener("loadeddata",l),window.addEventListener("resize",l),window.ResizeObserver){new ResizeObserver(l).observe(t)}return setTimeout(l,80),requestAnimationFrame((function t(){const e=r.getContext("2d");if(e.clearRect(0,0,r.width,r.height),!o.videoWidth||!o.videoHeight)return requestAnimationFrame(t);let n=s.boxW/s.scale,i=s.boxH/s.scale,a=-s.offsetX/s.scale,l=-s.offsetY/s.scale;e.save(),s.rotate?(e.translate(r.width/2,r.height/2),e.rotate(Math.PI/2),e.translate(-r.height/2,-r.width/2),e.drawImage(o,a,l,i,n,0,0,r.height,r.width)):e.drawImage(o,a,l,n,i,0,0,r.width,r.height),e.restore(),requestAnimationFrame(t)})),{video:o,canvas:r,fitbox:i,state:s,unmute:function(){o.muted=!1,o.removeAttribute("muted"),o.volume=1,o.currentTime+=.01,o.play().catch((()=>{}))},fitOrg:c}}function videoPan(t,e,n={}){n=Object.assign({autoplay:!1,loop:!1,controls:!0,muted:!1,poster:""},n),t.clc();let i=t.son("div",{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden",background:"none"}).son("div",{background:"#fff",border:"4px solid #000",boxSizing:"border-box"});const o=t.son("video",{position:"absolute",left:0,top:0,background:"none"});o.src=e,o.setAttribute("playsinline","playsinline");for(let t in n)n[t]?o.setAttribute(t,n[t]):o.removeAttribute(t);function r(t,e){return t>=e?"x":"y"}function s(){const e=t.clientWidth,n=t.clientHeight,s=o.videoWidth,a=o.videoHeight;if(!s||!a)return;const l=r(e,n)!==r(s,a);let c=l?a:s,d=l?s:a,h=Math.min(e/c,n/d),u=c*h,p=d*h;i.css({width:u+"px",height:p+"px"});let f=i.getBoundingClientRect(),g=t.getBoundingClientRect(),L=f.left-g.left+i.offsetWidth/2,v=f.top-g.top+i.offsetHeight/2,b=l?i.offsetHeight:i.offsetWidth,m=l?i.offsetWidth:i.offsetHeight;o.style.width=b+"px",o.style.height=m+"px",o.style.left=L+"px",o.style.top=v+"px",o.style.transformOrigin="center center",o.style.transform=l?"translate(-50%,-50%) rotate(90deg)":"translate(-50%,-50%)"}return n.poster&&(o.poster=n.poster),o.addEventListener("loadedmetadata",s),o.addEventListener("loadeddata",s),window.addEventListener("resize",s),setTimeout(s,50),o}function DateDiff(t,e){var n,i,o;return n=t.split("-"),i=new Date(n[1]+"-"+n[2]+"-"+n[0]),n=e.split("-"),o=new Date(n[1]+"-"+n[2]+"-"+n[0]),parseInt(Math.abs(i-o)/1e3/60/60/24)}function GetDateDiff(t,e){var n=new Date(Date.parse(t.replace(/-/g,"/"))).getTime(),i=new Date(Date.parse(e.replace(/-/g,"/"))).getTime();return Math.abs(n-i)/864e5}function getNowFormatDate(){var t=new Date,e=t.getMonth()+1,n=t.getDate();return e>=1&&e<=9&&(e="0"+e),n>=0&&n<=9&&(n="0"+n),t.getFullYear()+"-"+e+"-"+n+" "+t.getHours()+":"+t.getMinutes()+":"+t.getSeconds()}function calculateTimeDifference(t){const e=new Date(t),n=new Date-e;let i=Math.floor(n/864e5);const o=Math.floor(n%864e5/36e5),r=Math.floor(n%36e5/6e4),s=Math.floor(n%6e4/1e3);i=i||"";return`${i} ${o.toString().padStart(2,"0")}:${r.toString().padStart(2,"0")}:${s.toString().padStart(2,"0")}`}function formatNumber(t,e,n){var i;return!isNaN(parseFloat(t))&&isFinite(t)?(t=Number(t),(i=(t=(void 0!==e?t.toFixed(e):t).toString()).split("."))[0]=i[0].toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1"+(n||",")),i.join(".")):NaN}function checkItems(t,e){var n=t.split(","),i=[];return n.forEach((function(t){i.push({type:"checkbox",name:t,label:t}),t==e&&i.push({type:"newcolumn"})})),i}function getLenPx(t,e){return t.replace(/[^\x00-\xff]/gi,"aa").length*e/2}function myStrParse(t){const e=t.match(/([^{()\[\]]*)(\(([^()]+)\))?(\{([^{}]+)\})?(\[([^\[\]]+)\])?/);let[n,i,o,r,s,a,l,c]=e;i=i.trim();let d=!1;return"^"===i.charAt(0)&&(d=!0,i=i.substring(1)),{str:i.trim(),c:r?r.trim():null,vs:a?a.trim():null,v:c?c.trim():null,d:d}}function generateUniqueString(){let t=Date.now().toString(36),e=Math.random().toString(36).substring(2,8);return t.slice(-4)+e.slice(0,4)}Date.prototype.fmt=function(t){null!=t&&""!=t||(t="y-m-d");var e=this.getFullYear(),n=this.getMonth()+1,i=this.getDate(),o=t.replace(/y+/gi,e);return o=(o=o.replace(/m+/gi,(n<10?"0":"")+n)).replace(/d+/gi,(i<10?"0":"")+i)},Date.prototype.Format=function(t){var e={"M+":this.getMonth()+1,"d+":this.getDate(),"h+":this.getHours(),"m+":this.getMinutes(),"s+":this.getSeconds(),"q+":Math.floor((this.getMonth()+3)/3),S:this.getMilliseconds()};for(var n in/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(this.getFullYear()+"").substr(4-RegExp.$1.length))),e)new RegExp("("+n+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?e[n]:("00"+e[n]).substr((""+e[n]).length)));return t},String.prototype.right=function(t){var e=this.length-t;return e<0&&(e=0),this.substring(this.length-t,this.length)},_C4=String.fromCharCode(4),_C3=String.fromCharCode(3),_C5=String.fromCharCode(5),_a_="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",String.prototype.xor=function(t){for(var e="",n=0;n127||94==this.charCodeAt(e)?t+=2:t++;return t},String.prototype.format=function(){var t=arguments;return this.replace(/\{(\d+)\}/g,(function(e,n){return t[n]}))},String.prototype.$=function(){var t=this.replaceAll(_C3,"\r");return t=this.replaceAll(_C4,"\n"),unescape(t)},String.prototype._=function(){var t=this.replaceAll("\n","");return t=(t=(t=(t=t.replaceAll(":",":")).replaceAll("\r","")).replaceAll(",",",")).replaceAll(" ","")},ustring=function(t){var e=String.fromCharCode(4);r=t[0];for(var n=1;n{"function"!=typeof this[t]&&(r[t]=this[t])}));const s={};i.forEach((n=>{if("function"==typeof this[n]){const i=Object.getOwnPropertyNames(HTMLElement.prototype).includes(n);!t&&(e.has(n)||i||n.startsWith("on"))||(s[n]=this[n])}}));return{tag:`${this.tagName.toLowerCase()}${this.id?`#${this.id}`:""}${this.className?`.${this.className.trim().split(/\s+/).join(".")}`:""}`,props:r,methods:s}},HTMLElement.prototype.$css=function(t,e){var n,i;for(n in t)t.hasOwnProperty(n)&&null!==(i=pfx(n))&&(this.style[i]=t[n]);if(e)for(var o in e)o.startsWith("___")?this.setAttribute(o.substring(3),e[o]):this[o]=e[o];return this.init&&this.init(),this.iPos&&this.Fly(this.iPos),this},HTMLElement.prototype.css=function(t,e){var n,i;for(n in t)t.hasOwnProperty(n)&&null!==(i=pfx(n))&&(this.style[i]=t[n]);if(e)for(var o in e)o.startsWith("___")?this.setAttribute(o.substring(3),e[o]):this[o]=e[o];return this.iPos&&this.Fly(this.iPos),this},HTMLElement.prototype.addBackImg=function(t,e,n,i){var o=this;let r=t+", "+getComputedStyle(o).backgroundImage,s=e+", "+getComputedStyle(o).backgroundPosition,a=n+", "+getComputedStyle(o).backgroundSize;return o.style.backgroundImage=r,o.style.backgroundPosition=s,o.style.backgroundSize=a,o},HTMLElement.prototype.removeBackImg=function(t){var e=this;let n=getComputedStyle(e).backgroundImage.split(", "),i=getComputedStyle(e).backgroundPosition.split(", "),o=getComputedStyle(e).backgroundSize.split(", "),r=n.findIndex((e=>e.includes(t)));return-1!==r&&(n.splice(r,1),i.splice(r,1),o.splice(r,1)),e.style.backgroundImage=n.join(", "),e.style.backgroundPosition=i.join(", "),e.style.backgroundSize=o.join(", "),e},HTMLElement.prototype.scrollbarWidth=function(){return this.offsetWidth-this.clientWidth},HTMLElement.prototype.rED=function(t,e,n,i=!1){function o(){event.stopPropagation()}this.oncontextmenu=function(){return!1},this.onmousedown=function(){2==event.button&&(this._bgc=this.style.backgroundColor,this._c=this.style.color,this._btxt=this.innerText,this.innerText==this.ph&&(this.innerText=""),this.contentEditable=!0,this.style.backgroundColor="#FFA",this.style.color="#000",this.addEventListener("mouseup",o,!1),this.addEventListener("mousedown",o,!1),this.addEventListener("click",o,!1),i||this.addEventListener("keydown",(function(t){"Enter"===t.key&&(t.preventDefault(),this.blur())}),!1),t&&t(this),this.onblur=function(){this.contentEditable=!1,this.style.backgroundColor=this._bgc,this.style.color=this._c,e&&e(this),this.removeEventListener("mouseup",o),this.removeEventListener("mousedown",o),this.removeEventListener("click",o),i||this.removeEventListener("keydown",o)})},this.addEventListener("paste",(function(t){n?n(event):function(t){var e=t||window.event;e.preventDefault();var n=(e.originalEvent||e).clipboardData.getData("text/plain")||prompt("在这里输入文本");document.execCommand("insertText",!1,n)}(t)}))},_hSet("DF",(function(t){var e=this;function n(n){var i=n.name.split(".").pop().toLowerCase(),o=new FileReader;switch(i){case"svg":case"txt":case"html":o.readAsText(n);break;case"png":case"mp3":case"jpg":case"mp4":case"gif":case"pdf":case"wav":case"docx":case"xlsx":case"webp":o.readAsDataURL(n)}o.onload=function(){t.call(e,this.result,i,"f",n)}}document.body.ondragover=function(t){t.preventDefault()},document.body.ondrop=function(t){t.preventDefault()},e.ondragover=function(t){t.preventDefault()},e.ondrop=function(i){i.preventDefault();var o=i.dataTransfer.files;if(o.length>0)for(var r=0;rt.preventDefault(),document.body.ondrop=t=>t.preventDefault(),t.ondragenter=function(e){e.preventDefault(),t.css({outline:"2px dashed #3af",backgroundColor:"rgba(0,150,255,0.05)"})},t.ondragleave=function(e){e.preventDefault(),t.css({outline:"",backgroundColor:""})},t.ondragover=function(t){t.preventDefault()},t.ondrop=function(n){n.preventDefault(),t.css({outline:"",backgroundColor:""});const i=n.dataTransfer,o=i.files;if(o&&o.length>0)for(let t=0;t=0&&e.left>=0&&e.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&e.right<=(window.innerWidth||document.documentElement.clientWidth)},HTMLElement.prototype.LRSwipe=function(t,e,n){var i,o,r=e||100;this.__gesture=!1;var s=this;this.onmousedown=function(t){s.__gesture=!0,i=t.clientX,o=t.clientY},this.onmouseup=function(e){s.__gesture=!1,i=e.clientX-i,o=e.clientY-o,t&&Math.abs(i)>=r?t.call(s,i):Math.abs(o)>=r&&n&&n.call(s,o)},this.ontouchstart=function(t){s.__gesture=!0,i=t.touches[0].clientX,o=t.touches[0].clientY},this.ontouchend=function(e){s.__gesture=!1,i=e.changedTouches[0].clientX-i,o=e.changedTouches[0].clientY-o,t&&Math.abs(i)>=r?t.call(s,i):Math.abs(o)>=r&&n&&n.call(s,o)}},HTMLElement.prototype.toJpg=function(t,e){const n=this,i=document.createElement("canvas"),o=i.getContext("2d");i.width=n.offsetWidth,i.height=n.offsetHeight,o.fillStyle="white",o.fillRect(0,0,i.width,i.height);const r=n.cloneNode(!0).outerHTML,s=`\n \n \n ${r}\n \n `,a=new Image;a.onload=()=>{o.drawImage(a,0,0,i.width,i.height);const n=i.toDataURL("image/jpeg",t);e&&e(n)},a.onerror=()=>{console.error("Failed to load image")},a.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(s)},HTMLElement.prototype.p2j=function(t,e){const n=Object.getOwnPropertyNames(this),i={};for(const t of n)i[t]=this[t];return i},HTMLElement.prototype.hasPointerEventsNone=function(){for(var t=this;t&&t!==document;){if("none"===window.getComputedStyle(t).pointerEvents)return!0;t=t.parentNode}return!1},HTMLElement.prototype._ltrb=function(){const t=this,e=t.offsetParent;if(!e)return null;const n=e.offsetWidth,i=e.offsetHeight,o=t.offsetLeft,r=t.offsetTop,s=n-o-t.offsetWidth,a=i-r-t.offsetHeight,l=t.offsetHeight,c=t.offsetWidth;return this.LTRB={w:c,h:l,l:o,t:r,r:s,b:a},{w:c,h:l,l:o,t:r,r:s,b:a}};var index20635=2021;function T(){return(new Date).getTime()}function _TT(){return parseInt(T()/6e4-23869797)}function $floor(t){return Math.floor(Math.random()*t)}function isEmptyObj(t){return 0===Object.keys(t).length&&t.constructor===Object}function Oplus(...t){const e={};for(const n of t)n&&"object"==typeof n&&Object.assign(e,n);return e}function getVs(keys){const keyArr=keys.split(",");for(let i=0;i{var i=document.createElement("script");i.type="module",i.src=t,i.onload=e,i.onerror=n,document.head.appendChild(i)}))}function loadjsmod(t,e,n){var i=document.createElement("script");i.type="module",i.src=t,i.onload=function(){"function"==typeof e&&e()},i.onerror=function(t){"function"==typeof n&&n(t)},document.head.appendChild(i)}function loadLink(t){const e=document.createElement("link");e.rel="manifest",e.href=t,document.head.appendChild(e)}function loadJLink(t){const e=new Blob([t],{type:"application/json"}),n=URL.createObjectURL(e),i=document.createElement("link");i.rel="manifest",i.href=n,document.head.appendChild(i)}function ex_0(t){if(t.startsWith("(")&&t.endsWith(")")){let e=0,n=!0;for(let i=1;i{if("object"==typeof n&&null!==n){if(e.has(n))return;e.add(n)}return n instanceof HTMLElement?void 0:n}));return JSON.parse(n)}function _TTS(t,e=0,n="zh-CN"){function i(){var i=window.speechSynthesis.getVoices(),o=new SpeechSynthesisUtterance(t);i.length>0&&e>=0&&e{i(),window.speechSynthesis.onvoiceschanged=null}:i()}function mySVGTXT(t,e=20,n="#a00",i="transparent",o=.7){const r=((t,e,n,i)=>{let o=0,r=0;for(const e of t)e.match(/[\u4e00-\u9fa5]/)?r++:o++;return{width:o*e*n+r*e*i,height:e}})(t,e,.6,1);return`\n \n ${t}\n \n `}function extractMethods(t){const e={};for(const n in t)if("function"==typeof t[n]){const i=t[n].toString().match(/\(([^)]*)\)/),o=i?i[1].split(",").map((t=>t.trim())):[];e[n]=o}return e}function calcAge(t){const e=new Date,n=new Date(t);let i=e.getFullYear()-n.getFullYear();const o=e.getMonth()-n.getMonth(),r=e.getDate()-n.getDate();return(o<0||0===o&&r<0)&&i--,i}function setVerticalRange(t){const e=t.parentElement,n=e.clientWidth,i=e.clientHeight;t.style.width=`${i}px`,t.style.height=`${n}px`,t.style.transform="rotate(-90deg)",t.style.transformOrigin="center center",t.style.display="block",t.style.margin="0 auto"}function generateRoomNo(){return`${Date.now().toString(36).substring(6)}${Math.random().toString(36).substr(2,6)+"_"+wx.user.id}`}function filePost(t,e,n,i,o){const r=new XMLHttpRequest;r.open("POST",e+encodeURI(t.name),!0),r.upload.onprogress=function(t){if(t.lengthComputable){const e=t.loaded/t.total*100;n(e)}},r.onload=function(){200===this.status?i():o(this.statusText)},r.onerror=function(){$clog("XHR错误:",r.statusText),o(r.statusText)};const s=new FileReader;s.readAsArrayBuffer(t),s.onload=()=>{r.send(s.result)},s.onerror=t=>{$clog("文件读错误:",t),o(t)}}function throttle(t,e){let n;return function(){const i=arguments,o=this;n||(t.apply(o,i),n=!0,setTimeout((()=>n=!1),e))}}function debounce0(t,e){let n;return function(){const i=this,o=arguments;clearTimeout(n),n=setTimeout((()=>{t.apply(i,o)}),e)}}function isInViewport(t,e){var n=t.offsetTop-e.offsetTop,i=n-e.scrollTop,o=e.scrollTop+e.clientHeight-4-n;return i<0?1:o<0?-1:0}function image2array(t,e,n){return new Promise(((i,o)=>{const r=new Image;r.crossOrigin="Anonymous",r.src=t,r.onload=()=>{const t=document.createElement("canvas"),o=t.getContext("2d"),s=r.width,a=r.height,l=s/n,c=a/e;t.width=l,t.height=c;const d=[];for(let i=0;i{o(t)}}))}async function camList(){try{return(await navigator.mediaDevices.enumerateDevices()).filter((t=>"videoinput"===t.kind))}catch(t){return console.error("枚举摄像头时发生错误:",t),[]}}function Monaco(t,e){return new Promise(((n,i)=>{const o=Object.assign({},{containerId:"",value:'// Some initial code\nconsole.log("Hello, world!")',language:"javascript",theme:"vs-dark",lineNumbersMinChars:4,lineDecorationsWidth:0},e);if(null===document.getElementById("monaco-loader-script")){var r=document.createElement("script");r.id="monaco-loader-script",r.src="/monaco-editor/vs/loader.js",r.onload=function(){window.require.config({paths:{vs:"/monaco-editor/vs"}}),window.require(["vs/editor/editor.main"],(function(){const e=monaco.editor.create(t,{value:o.value,language:o.language,theme:o.theme,lineNumbersMinChars:o.lineNumbersMinChars});n(e)}))},r.onerror=i,document.head.appendChild(r)}else window.require(["vs/editor/editor.main"],(function(){const e=monaco.editor.create(t,{value:o.value,language:o.language,theme:o.theme,lineNumbersMinChars:o.lineNumbersMinChars});n(e)}))}))}function uploadFile(t,e,n,i,o){const r=new XMLHttpRequest;r.open("POST",e,!0),r.upload.onprogress=function(t){if(t.lengthComputable){const e=t.loaded/t.total*100;o&&o(e)}},r.onload=function(){200===r.status?n&&n(r.responseText):i&&i(r.status,r.statusText)},r.onerror=function(){i&&i(r.status,r.statusText)};const s=new FileReader;s.readAsArrayBuffer(t),s.onload=()=>{r.send(s.result)},s.onerror=function(t){i&&i(0,t.toString())}}function scaleSvg(t,e){const n=t.width.baseVal.value/e,i=t.height.baseVal.value/e;t.setAttribute("viewBox",`0 0 ${n} ${i}`)}function pieIt(t,e="#F00",n){t.css({},{}),t.myHTML(' '.replace("#F00",e));var i=t.children[0];if(i.setAttribute("preserveAspectRatio","none"),i.setAttribute("width",t.offsetWidth),i.setAttribute("height",t.offsetHeight),t.___v=0,n){var o=n/100*502.4;t._ev.pie.setAttribute("stroke-dasharray",`${o}, 502.4`),t.___v=n}Object.defineProperty(t,"v",{get:function(){return this.___v},set:function(e){this.___v=e;var n=2*Math.PI*65,i=n*(e/100);t._ev.pie.setAttribute("stroke-dasharray",`${i}, ${n}`)}})}function fixSvgViewBox(t){let e=t.match(/width=["'](\d+)(px)?["']/),n=t.match(/height=["'](\d+)(px)?["']/),i=t.includes("viewBox=");if(e&&n&&!i){const i=e[1],o=n[1];t=t.replace(/]*?)>/,``)}return t}function bImg(t){const e=t.replace(/\n|\r|\s/g,"");return`url('data:image/svg+xml,${encodeURIComponent(e)}')`}function svgURL(t){return`url('data:image/svg+xml,${encodeURIComponent(t)}')`}function svgToDataUri(t){return`url('data:image/svg+xml;utf8,${encodeURIComponent(t)}')`}function svgData(t){return`data:image/svg+xml,${encodeURIComponent(t)}`}function getFileExt(t){const e=t.lastIndexOf(".");return-1===e||0===e||t.includes(",")?"":t.slice(e+1)}function OPEval(t,e){for(let n in t)t.hasOwnProperty(n)&&e(n,t[n])}function gColor(t,e){return`hsl(${137.508*t%360}, ${80+t%2*10}%, ${40+t%2*20}%,${e||1})`}function hslT1oRgb(t,e,n){const i=e*Math.min(n,1-n),o=(e,o=(e+t/30)%12)=>n-i*Math.max(Math.min(o-3,9-o,1),-1);return[255*o(0),255*o(8),255*o(4)]}function rgbT1oHex(t,e,n){return"#"+[t,e,n].map((t=>{const e=Math.round(t).toString(16);return 1===e.length?"0"+e:e})).join("")}function getDistinct_Color(t){const e=43*t%360,n=.8+t%2*.1,i=.4+t%2*.2,[o,r,s]=hslT1oRgb(e,n,i);return rgbT1oHex(o,r,s)}function deepRemove(t){if(t){var e=t.cloneNode(!1);t.parentNode.replaceChild(e,t);for(var n=e.firstChild;n;)deepRemove(n),n=n.nextSibling;e.parentNode.removeChild(e)}}function deepClear(t){if(t)for(var e=t.firstChild;e;){var n=e.nextSibling;deepRemove(e),e=n}}function etb(t,e={},n,i,o){return t.son("table",Oplus({width:"100%",height:"100%",borderCollapse:"collapse",tableLayout:"fixed",borderSpacing:0,cellPadding:0,cellSpacing:0},e),{cellPadding:0,cellSpacing:0,ccss:o||{padding:5},init:function(){for(var t=0;t');return e=e.replace(/\[mpf(\d+)\]/g," ")}function xClick(t,e,n,i){let o=null,r=null,s=null;let a=0,l=0;function c(e){e.preventDefault(),s=Date.now(),l=0,r=setTimeout((()=>{r=null,i(t)}),500)}function d(){clearTimeout(r),clearTimeout(o),l=0}t.addEventListener("mousedown",c),t.addEventListener("mouseup",(function(i){clearTimeout(r),o?(clearTimeout(o),n(t)):o=setTimeout((()=>{e(t),o=null}),300)})),t.addEventListener("mouseleave",d),t.addEventListener("touchstart",c),t.addEventListener("touchend",(function(i){clearTimeout(r);const c=Date.now();l++,1===l?o=setTimeout((()=>{1===l&&c-s<500&&e(t),o=null,l=0}),300):2===l&&(clearTimeout(o),c-a<=300&&n(t),l=0),a=c})),t.addEventListener("touchcancel",d)}if(HTMLElement.prototype.mPop=function(t,e,n){index20635+=5;var i=this.son("div",{zIndex:index20635,display:"none",position:"fixed",overflowY:"auto",maxHeight:"100%",backgroundColor:"#fff"},{openFun:function(){},closeFun:function(){}}),o={b:{css:{left:0,bottom:0,width:"100%",height:"30%"},openP:{y:0},closeP:{y:"100%"}},l:{css:{left:0,top:0,width:"30%",height:"100%"},openP:{x:0},closeP:{x:"-100%"}},r:{css:{right:0,top:0,width:"30%",height:"100%"},openP:{x:0},closeP:{x:"100%"}},t:{css:{left:0,top:0,width:"100%",height:"30%"},openP:{y:0},closeP:{y:"-100%"}}};if(o[t]){var r=o[t];i.css(OPlus(r.css,e),{_openP:r.openP,_closeP:r.closeP}),i.Fly(r.closeP)}var s=this.son("div",{width:"100%",height:"100%",position:"fixed",top:0,left:0,zIndex:index20635-3,display:"none",opacity:0,transition:"opacity 0.6s ease",backgroundColor:"rgba(0, 0, 0, 0.5)"},{onclick:function(){_backRun()}});return i.open=function(){s.css({display:""}),s.onclick=function(){_backRun()},this.css({display:""}),this.openFun(),setTimeout((()=>{s.style.opacity=1,this.Fly(this._openP,600)}),5);try{_backKey((()=>{this.myclose()}))}catch(t){}},i.myclose=function(){this.Fly(this._closeP,600),s.css({opacity:0}),s.onclick=null,this.closeFun(),setTimeout((()=>{this.style.display="none",s.style.display="none"}),800)},i.close=function(){_backRun()},i},HTMLElement.prototype.IMGLabel=function(t,e,n,i,o){return this.son("div",OPlus({width:"100%",position:"relative"},n),{init:function(){this.son("img:pp",OPlus({position:"absolute"},i),{po:this,src:e,onload:function(){this.po.style.height=this.po.offsetWidth*this.naturalHeight/this.naturalWidth}}),this.son("div",Oplus({padding:"2px 6px 2px 6px",backgroundColor:"rgb(00,00,00,0.5)",position:"absolute",bottom:2,right:2,borderRadius:"3px",color:"#ccC",fontSize:12,textShadow:"1px 1px 3px #000,-1px -1px 3px #fff"},o),{innerText:t})}})},HTMLElement.prototype.doClick=function(){var t=new MouseEvent("click",{bubbles:!0,cancelable:!0,view:window});this.dispatchEvent(t)},HTMLElement.prototype.tStyle=function(){return window.getComputedStyle(this)},HTMLElement.prototype.addListener=function(t,e){return this.addEventListener(t,e),this},HTMLElement.prototype.addEvent=function(t,e){return this.addEventListener(t,e),this},HTMLElement.prototype.typeWriter=function(t,e,n){let i=0;const o=()=>{i{o.innerText=r,--r<0&&(clearInterval(s),"function"==typeof i?i(o):o.style.backgroundColor="#A00")}),e)},HTMLElement.prototype.setLonPre=function(t=800){var e,n=!1;this.preventClick20798=!1;var i=()=>{n=!1,this.preventClick20798=!1,e=setTimeout((()=>{n=!0,this.preventClick20798=!0;try{this.onLonPre()}catch(t){}}),t)},o=t=>{clearTimeout(e),n&&t.preventDefault()},r=()=>{clearTimeout(e)};this.addEventListener("mousedown",i),this.addEventListener("mouseup",o),this.addEventListener("mouseleave",r),this.addEventListener("touchstart",i),this.addEventListener("touchend",o),this.addEventListener("touchleave",r);var s=this.onclick;this.onclick=t=>{this.preventClick20798?(t.preventDefault(),this.preventClick20798=!1):s&&s.call(this,t)}},HTMLElement.prototype.LRFontSize=function(){let t=0,e=parseFloat(window.getComputedStyle(this).fontSize)||16,n=!1;this.addEventListener("touchstart",(e=>{t=e.touches[0].clientX})),this.addEventListener("touchmove",(n=>{let i=n.touches[0].clientX,o=i-t;Math.abs(o)>30&&(o>0?e+=2:e=Math.max(6,e-2),this.style.fontSize=`${e}px`,t=i)})),this.addEventListener("wheel",(t=>{t.altKey&&(t.preventDefault(),t.deltaY<0?e+=2:e=Math.max(6,e-2),this.style.fontSize=`${e}px`)})),this.addEventListener("mousedown",(e=>{e.altKey&&(n=!0,t=e.clientX)})),document.addEventListener("mousemove",(i=>{if(!n||!i.altKey)return;let o=i.clientX,r=o-t;Math.abs(r)>30&&(r>0?e+=2:e=Math.max(6,e-2),this.style.fontSize=`${e}px`,t=o)})),document.addEventListener("mouseup",(()=>{n=!1}))},HTMLElement.prototype.setTip=function(t,e={}){this.title&&(this.title=""),this._tipBox||(this._tipBox=document.body.son("div:vix-tip-box",Oplus({position:"absolute",display:"none",whiteSpace:"nowrap",padding:"4px 8px",fontSize:"12px",background:"#333",opacity:.7,color:"#fff",borderRadius:"4px",zIndex:9999,pointerEvents:"none"},e.style),{_owner:this}));const n=this._tipBox,i=e.position||"top",o=()=>{const e=this.getBoundingClientRect(),o=window.scrollX||document.documentElement.scrollLeft,r=window.scrollY||document.documentElement.scrollTop;let s=e.left+o,a=e.top+r;switch(i){case"top":a-=30,s+=e.width/2-30;break;case"bottom":a+=e.height+5,s+=e.width/2-30;break;case"left":s-=80,a+=e.height/2-10;break;case"right":s+=e.width+10,a+=e.height/2-10}n.innerText=t,Object.assign(n.style,{left:s+"px",top:a+"px",display:"block"})},r=()=>{n.style.opacity=0,setTimeout((()=>{n.style.display="none"}),200)};return this._tipBound||(this._tipBound=!0,this.addEventListener("mouseenter",o),this.addEventListener("mouseleave",r)),this},HTMLElement.prototype.myFlay=function(t,e={},n={},i=16){function o(t){let[e,n,i,o]=t.split(":");return n=n||1,i=void 0!==i&&""!==i?i:1,o=void 0!==o&&""!==o?o:"0%",{name:e,grow:n,shrink:i,basis:o}}function r(t){if(!(t=t.replace(/[\s\r\n]+/g,"")))return[];const e=[],n=[];let i=0;for(;it.includes("*")?t.split("*").filter((t=>t)).map((t=>o(t))):t&&o(t)))}function s(t,e,o={}){return t.forEach((t=>{if(Array.isArray(t)){const n=document.createElement("div");n.classList.add("flexCont","flexRow"),n.style.gap=i+"px",e.appendChild(n),s(t,n,o)}else if(t){const i=document.createElement("div");i.classList.add("flexItem"),i.setAttribute("data-name",t.name),i.style.flex=`${t.grow} ${t.shrink} ${t.basis}`,n&&"object"==typeof n&&Object.assign(i.style,n),e.appendChild(i),o[t.name]=i}})),o}this.innerHTML="",this.classList.add("flexCont","flexCol"),this.style.gap=i+"px",e&&"object"==typeof e&&Object.assign(this.style,e),this.$={};const a=r(t);return Object.assign(this.$,s(a,this,this.$)),this.myFlayAdd=function(t){const e=r(t),n=document.createDocumentFragment();return Object.assign(this.$,s(e,n,this.$)),this.appendChild(n),this},this},HTMLElement.prototype.shadow=function(t="",e="",n){this.shadowRoot=this.shadowRoot||this.attachShadow({mode:"open"}),this.shadowRoot.innerHTML=`${t}`;const i={},o={};return this.shadowRoot.querySelectorAll("[id]").forEach((t=>{const e=t.id;i[e]=t,Object.defineProperty(o,e,{get:()=>t.value??t.innerText??"",set(e){"value"in t?t.value=e:t.innerText=e}})})),this._=i,this.$=o,"function"==typeof n&&n.call(this,this.shadowRoot),this},HTMLTableElement.prototype.addRow=function(t,e,n){var i=this.insertRow(t||-1);return i.$css(e,n),i},HTMLTableRowElement.prototype.addCell=function(t,e,n){var i=this.insertCell(t);return i.$css(e,n),i},HTMLTableElement.prototype.addArr=function(t,e,n,i){var o=this.insertRow(e||-1);return t.forEach((function(t){o.addCell(-1,{},{innerHTML:t})})),o},HTMLTableElement.prototype.addRowByStr=function(t,e,n){var i="string"==typeof t?t.split(","):t,o=this.addRow(-1,{},{ppt:n}),r={};return i.forEach((function(t){var i=t.split("^");if(i.length>2){var s=i[2].substring(0,1);s="-"==s?"0":"+"==s?"100%":"center",r={backgroundImage:`url(/svcn/${Math.abs(i[2])})`,backgroundSize:"18px auto",backgroundPosition:`${s} center`}}else r={};o.addCell(-1,Oplus({padding:3,border:"1px solid #eee",width:i[1]||null},r,e),{ppt:n,innerText:i[0]})})),o},HTMLTableElement.prototype.rEval=function(t){Array.from(this.rows).forEach((function(e,n){t(e,n)}))},HTMLTableElement.prototype.cEval=function(t,e){var n=this.querySelectorAll(`tr td:nth-child(${t+1})`);Array.from(n).forEach((function(t,n){e(t,n)}))},HTMLTableRowElement.prototype.addText=function(t,e){let n=this;return t.forEach((function(t,i){n.addCell(-1,Oplus({border:"1px solid #ddd",padding:5},e&&e[i]),{innerText:t})})),n},HTMLTableElement.prototype.addJsonArray=function(t,e,n){if(!Array.isArray(t)||0===t.length)return this;const i=Object.keys(t[0]),o=Oplus({background:"#EEE",border:"1px solid #aaa",padding:5,wordBreak:"break-all"},e||{}),r=Oplus({border:"1px solid #aaa",padding:5,wordBreak:"break-all"},n||{}),s=this.addRow(-1,{},{});return i.forEach((t=>{s.addCell(-1,o,{innerText:t})})),t.forEach((t=>{const e=this.addRow(-1,{},{});i.forEach((n=>{e.addCell(-1,r,{innerText:void 0!==t[n]?t[n]:""})}))})),this},HTMLSelectElement.prototype.opts=function(t,e){var n=this,i=e||",";t.split(i).forEach((function(t){var e=t.split(":");1==e.length&&(e[1]=e[0]),n.add(new Option(e[1],e[0]))}))},HTMLSelectElement.prototype.optArr=function(t,e){var n=this;t.forEach((function(t){n.add(new Option(t,t))}))},HTMLSelectElement.prototype.opto=function(t){var e=this;t.forEach((function(t){e.add(new Option(t.name,t.id))}))},HTMLSelectElement.prototype.setOpt=function(t,e){let n;this.options.length;for(var i=this;i.options.length>0;)i.options.remove(0);if("string"==typeof t)n=t.split(e||",");else{if(!Array.isArray(t))return;n=t}for(var o=0;o0&&"\n"!==i[e-1];)e--;for(;nt.text())).then((t=>{const e=t.split(/\r?\n/),n=[];let o=[];for(const t of e)if(""===t.trim()){if(o.length>=3){const t=o[1],[e,i]=t.split("--\x3e").map((t=>s(t.trim()))),r=o.slice(2).join("\n");n.push({start:e,end:i,text:r})}o=[]}else o.push(t);i.ontimeupdate=()=>{const t=i.currentTime,e=n.find((e=>t>=e.start&&t<=e.end));r.innerText=e?e.text:""}})),i},C4=String.fromCharCode(4),OPlus=Oplus,window.loadJS=function(t){return new Promise(((e,n)=>{loadjs(t,(()=>e()))}))},function(){var t=new Set;window.loadjs=function(e,n){var i=e.split(";").map((t=>t.trim())).filter((t=>t)),o=0;!function e(){o>=i.length?n&&n():function(e,n){if(t.has(e))return console.log("Script already loaded:",e),void(n&&n());var i=document.createElement("script");i.type="text/javascript",i.charset="UTF-8",i.src=e,i.onload=function(){t.add(e),console.log("Script loaded:",e),n&&n()},i.onerror=function(){console.error("Failed to load script:",e),n&&n()},document.head.appendChild(i)}(i[o],(function(){o++,e()}))}()}}(),function(){var t=new Set;window.loadcss=function(e,n){var i=e.split(";").map((t=>t.trim())).filter((t=>t)),o=0;!function e(){o>=i.length?n&&n():function(e,n){if(t.has(e))return console.log("CSS already loaded:",e),void(n&&n());var i=document.createElement("link");i.rel="stylesheet",i.type="text/css",i.href=e,i.onload=function(){t.add(e),console.log("CSS loaded:",e),n&&n()},i.onerror=function(){console.error("Failed to load CSS:",e),n&&n()},document.head.appendChild(i)}(i[o],(function(){o++,e()}))}()}}(),$dlog=function(t){console.log("-----------"+t);for(var e=1;e-1&&i.splice(o,1),i.unshift(e),i.length>n&&(i=i.slice(0,n)),localStorage.setItem(t,JSON.stringify(i)),console.log(JSON.stringify(i))}},myWin=function(t,e){window.sonWin=window.open("javascript:;",t),window.sonWin.C4||window.open(e,t)},function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).filesize=e()}(this,(function(){"use strict";var t=/^(b|B)$/,e={iec:{bits:["bit","Kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],bytes:["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"]},jedec:{bits:["bit","Kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],bytes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"]}},n={iec:["","kibi","mebi","gibi","tebi","pebi","exbi","zebi","yobi"],jedec:["","kilo","mega","giga","tera","peta","exa","zetta","yotta"]},i={floor:Math.floor,ceil:Math.ceil};function o(o){var r,s,a,l,c,d,h,u,p,f,g,L,v,b,m,y,x,w,D,_,k,C=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},E=[],S=0;if(isNaN(o))throw new TypeError("Invalid number");if(a=!0===C.bits,m=!0===C.unix,L=!0===C.pad,s=C.base||10,v=void 0!==C.round?C.round:m?1:2,h=void 0!==C.locale?C.locale:"",u=C.localeOptions||{},y=void 0!==C.separator?C.separator:"",x=void 0!==C.spacer?C.spacer:m?"":" ",D=C.symbols||{},w=2===s?C.standard||"iec":"jedec",g=C.output||"string",c=!0===C.fullform,d=C.fullforms instanceof Array?C.fullforms:[],r=void 0!==C.exponent?C.exponent:-1,_=i[C.roundingMethod]||Math.round,p=(f=Number(o))<0,l=s>2?1e3:1024,k=!1===isNaN(C.precision)?parseInt(C.precision,10):0,p&&(f=-f),(-1===r||isNaN(r))&&(r=Math.floor(Math.log(f)/Math.log(l)))<0&&(r=0),r>8&&(k>0&&(k+=8-r),r=8),"exponent"===g)return r;if(0===f)E[0]=0,b=E[1]=m?"":e[w][a?"bits":"bytes"][r];else{S=f/(2===s?Math.pow(2,10*r):Math.pow(1e3,r)),a&&(S*=8)>=l&&r<8&&(S/=l,r++);var T=Math.pow(10,r>0?v:0);E[0]=_(S*T)/T,E[0]===l&&r<8&&void 0===C.exponent&&(E[0]=1,r++),b=E[1]=10===s&&1===r?a?"kbit":"kB":e[w][a?"bits":"bytes"][r],m&&(E[1]=E[1].charAt(0),t.test(E[1])&&(E[0]=Math.floor(E[0]),E[1]=""))}if(p&&(E[0]=-E[0]),k>0&&(E[0]=E[0].toPrecision(k)),E[1]=D[E[1]]||E[1],!0===h?E[0]=E[0].toLocaleString():h.length>0?E[0]=E[0].toLocaleString(h,u):y.length>0&&(E[0]=E[0].toString().replace(".",y)),L&&!1===Number.isInteger(E[0])&&v>0){var M=y||".",R=E[0].toString().split(M),F=R[1]||"",z=F.length,I=v-z;E[0]="".concat(R[0]).concat(M).concat(F.padEnd(z+I,"0"))}return c&&(E[1]=d[r]?d[r]:n[w][r]+(a?"bit":"byte")+(1===E[0]?"":"s")),"array"===g?E:"object"===g?{value:E[0],symbol:E[1],exponent:r,unit:b}:E.join(x)}return o.partial=function(t){return function(e){return o(e,t)}},o})),window.$cle=deepRemove,window.$clc=deepClear,!self.mv7112){var s=hget("/svcn/nptcss",[]);loadStyle(s),s=hget("/svcn/nptjs"),loadScript(s),self.mv7112=!0}var w20598=!1,pMp4=function(t){var e=getAbsoluteUrl(t);w20598?w20598.style.display="":((w20598=document.body.son("div",{width:"100%",height:"100%",backgroundColor:"#F00",position:"absolute",left:0,top:0,zIndex:15e3})).innerHTML=' ',w20598.vp=videojs("v20598",{})),w20598.vp.src({type:"video/mp4",src:e}),w20598.close=function(){w20598.vp.pause(),w20598.style.display="none"},_backKey((function(){w20598.close()}))};function v_cmp4(t){event.stopPropagation(),event.preventDefault(),pMp4("/svcn/gzh_cmp4i?"+t.getAttribute("ssrc"))}var w20600=!1,showImg=function(t,e){var n=getAbsoluteUrl(t);try{wx.previewImage({current:n,urls:[n]})}catch(s){try{WeixinJSBridge.invoke("imagePreview",{current:n,urls:[n]})}catch(n){var i=e||{maxWidth:"100%",margin:"auto"};if(o)o.style.display="flex";else var o=document.body.son("div",{width:"100%",height:"100%",left:0,top:0,overflow:"hidden",position:"absolute",zIndex:99999,display:"flex",alignItems:"center",backgroundColor:"#000"}),r=o.son("img",i,{onload:function(){_pOff()}});r.src=t,o.onclick=function(){_backFun.pop()()},o.close=function(){o.style.display="none"},_backKey((function(){o.close()}))}}},a20600=!1,tm20729;function getAbsoluteUrl(t){return a20600||(a20600=document.createElement("A")),a20600.href=t,t=a20600.href}function v_cimg(t){event.stopPropagation(),event.preventDefault(),showImg("/svcn/v_cimg?"+t.getAttribute("ssrc"))}function copyTextToClipboard(t){const e=document.createElement("textarea");e.value=t,e.style.position="fixed",e.style.opacity="0",document.body.appendChild(e),e.select();try{document.execCommand("copy"),console.log("Text successfully copied to clipboard")}catch(t){console.error("Failed to copy text: ",t)}document.body.removeChild(e)}function strKV(t,e){for(var n=t.split(","),i=e.split(","),o={},r=0;r{let o=new Image;o.crossOrigin="Anonymous",o.onload=()=>{const t=o.width,i=o.height,r=document.createElement("canvas"),s=r.getContext("2d"),a=(t,e,n,i)=>(r.width=n,r.height=i,s.clearRect(0,0,n,i),s.drawImage(o,t,e,n,i,0,0,n,i),r.toDataURL());n({tl:a(0,0,e,e),tr:a(t-e,0,e,e),bl:a(0,i-e,e,e),br:a(t-e,i-e,e,e),t:a(e,0,8,e),b:a(e,i-e,8,e),l:a(0,e,e,8),r:a(t-e,e,e,8),c:a(e,e,8,8)})},o.onerror=i,o.src=t}))}function clipBackground(t,e){var n="url(_l) left / 40px calc(100% - 80px) no-repeat,\nurl(_r) right center / 40px calc(100% - 80px) no-repeat,\nurl(_tl) left top / 40px 41px no-repeat,\nurl(_tr) right top / 40px 41px no-repeat,\nurl(_bl) left bottom / 40px 40px no-repeat,\nurl(_br) right bottom / 40px 40px no-repeat,\nurl(_c) center / calc(100% - 80px) calc(100% - 80px) no-repeat,\nurl(_b) center bottom / calc(100% - 80px) 40px no-repeat,\nurl(_t) 40px 0 / calc( 100% - 80px ) 41px no-repeat";if(e){var i=e,o=e+1,r=2*e;n.replace(/40px/g,i+"px").replace(/41px/g,o+"px").replace(/80px/g,r+"px")}return OPEval(t,(function(t,e){n=n.replace("_"+t,e)})),n}function jsonA2table(t,e){var n=e;n.clc();var i=n.son("table",{borderCollapse:"collapse",fontSize:14}),o=n.htr=i.addRow(-1,{backgroundColor:"#DDD"});OPEval(t[0],(function(t,e){o.addCell(-1,{minWidth:40,border:"1px solid #888",textAlign:"center",padding:3},{className:".pvgridtd",fdname:t,al:"c",contentEditable:!0,innerText:t,onclick:function(){if(!event.ctrlKey)return;switch(this.style.textAlign){case"center":this.style.textAlign="left",this.al="l";break;case"left":this.style.textAlign="right",this.al="r";break;default:this.style.textAlign="center",this.al="c"}}})})),t.forEach((function(t){var e=i.addRow(-1,{});OPEval(t,(function(t,n){e.addCell(-1,{minWidth:40,border:"1px solid #888",padding:5},{innerText:n||"",className:".pvgridtd"})}))}))}function json2table(t,e){e.clc();var n=e.son("table",{borderCollapse:"collapse",fontSize:14});OPEval(t,(function(t,e){var i=n.addRow();i.addCell(-1,{padding:5,backgroundColor:"#EEE",border:"1px solid #ddd"},{innerText:t}),i.addCell(-1,{padding:5,border:"1px solid #ddd"},{innerText:e})}))}function pasteIt(t,e,n,i){let o=null;function r(t,e,n,i){const o=new Image;o.onload=function(){const t=document.createElement("canvas"),r=t.getContext("2d");if(t.width=o.width,t.height=o.height,r.drawImage(o,0,0),n){const t=r.getImageData(0,0,o.width,o.height),e=t.data,n=e[0],i=e[1],s=e[2];for(let t=0;t 智创辰禾 智创辰禾 ',_pSVG=i.firstElementChild}return window.w20028_svg.style.display="block",t?(_pSVG.r("10").textContent=t,_pSVG.r("11").textContent=t):(_pSVG.r("10").textContent="智创辰禾",_pSVG.r("11").textContent="智创辰禾"),[_pSVG.r("10"),_pSVG.r("11")]}function _pOff(){window.w20028_svg&&(window.w20028_svg.style.display="none"),window.w308&&(window.w308.style.display="none")}function changeFavicon(t){var e=document.querySelector("link[rel~='icon']");e||((e=document.createElement("link")).rel="icon",document.getElementsByTagName("head")[0].appendChild(e)),e.href=t}function regTest(t,e){return"string"==typeof t&&(t=new RegExp(t.replace(/([.*+?^=!:${}()|\[\]\/\\])/g,"\\$1"))),t.test(e)}function iconimg(t,e){t.$css({paddingLeft:18,width:t.offsetWidth+8}),t.addBackImg(`url(/svcn/${e})`,"2px center","20px 20px")}function fairyOn(){return"undefined"==typeof _fairy_&&(_fairy_=document.body.son("div",{left:0,bottom:"20%",height:80,width:80,backgroundColor:"rgb(00,200,0,0.1)",position:"absolute",borderRadius:"80px",zIndex:4e4},{onclick:function(){document.elementsFromPoint(this.offsetLeft,this.offsetTop).forEach((function(t){t.getAttribute("_vixid")&&$clog(t.getAttribute("_vixid"))}))},ontouchstart:function(){drag=!0;var t=event.touches[0];_x=this.offsetLeft-t.clientX,_y=this.offsetTop-t.clientY;try{clearTimeout(tm20729)}catch(t){}tm20729=setTimeout((function(){$clog("asd")}),2e3)},ontouchmove:function(){if(event.preventDefault(),drag){try{clearTimeout(tm20729)}catch(t){}var t=event.touches[0],e=_y+t.clientY;e>0&&e0&&n{n&&n(i)},i.onmessage=t=>{try{e(t.data)}catch(t){console.warn("[mySSE] 处理数据出错",t)}},i.onerror=t=>{console.warn("⚠️ [mySSE] 连接异常,浏览器将尝试重连")},i}function appTitle(t,e,n,i,o){_backFun.length>6&&$clog("太深了,注意回退,不要兜圈!");var r,s=t;s.css(i||{},{innerHTML:"
",onclick:function(){if(event.ctrlKey){if(window==top)return void window.opener.focus();top.tabbar&&top.tabbar.newSDKTab(e.fip)}else event.altKey||(event.shiftKey?alert(_backFun.length):e.titleClick&&e.titleClick())}}),e.setTitle=function(t){s.r("0001").innerHTML=t},e.setTitle(n),e.ttr=s.r("000"),e.help,e.vedios&&e.vedios.forEach((function(t){var n=e.ttr.insertCell(-1);n.style.width=36,n.innerHTML=''})),e.chat&&(e.chat=e.ttr.addCell(-1,{width:e.ttr.offsetHeight,textAlign:"center"},{innerText:"?",onclick:function(){$clog("asdasd")}})),e.lPanel=function(t,e,n){var i=n?n<0?_H_+n:n:0,o=this.cont.son("div",{position:"absolute",backgroundColor:"#FFF",width:_W_-(t||100),height:"100%",borderRight:"2px solid #EEE",bottom:i,zIndex:100,opacity:.95});return o.fly({x:-o.offsetWidth}),o.bt=o.son("div",{position:"absolute",width:45,height:39,boxShadow:"1px 0px 3px #000",lineHeight:"40px",textAlign:"center",right:-45,bottom:0,borderRadius:"0px 5px 5px 0px",userSelect:"none",backgroundColor:"#ddd"}),o.bt.innerText=e||"?",o.bt.onclick=function(){o.fly({x:0==o.pos.x?-o.offsetWidth:0},"200ms")},o.close=function(){o.fly({x:-o.offsetWidth},"200ms")},o},e.popFun=function(t,n,i,o,s,a){return r&&(r.clc(),r.o=null,r=null),r=popPan(e.cont,{boxSizing:"border-box",backgroundColor:"#FFF",opacity:.4},{SS:0,x:window.innerWidth},{x:-window.innerWidth}),setTimeout((function(){r.o=getFun(t)(r,n,i,o,s,a),r.open()}),99),r},e.lPan=function(t){return this.cont.son("div:pp",{backgroundColor:"rgb(80,80,180,0.2)",width:"100vw",position:"absolute",left:"-100vw",top:0,zIndex:500,overflow:"visible"},{stat:!1,open:function(){this.Fly({x:"100vw",d:500}),this.stat=!0},close:function(){this.stat=!1,this.Fly({x:0,d:500})},toggle:function(){this.stat?this.close():this.open()},init:function(){this.Fly({x:0});this.bt=this.son("div",{left:0,top:0,zIndex:9,width:"calc(100vw + 32px )",height:32,backgroundColor:"rgb(255,255,255,0.01)",position:"absolute",borderRadius:"5px",backgroundImage:svgURL(''),backgroundPosition:"right",backgroundSize:"auto 100%"},{onclick:function(){event.stopPropagation(),this.p.toggle()},p:this})}})},e.rPan=function(t,e){return this.cont.son("div",{backgroundColor:"rgb(80,80,180,0.2)",width:t||"100vw",position:"absolute",left:"100vw",top:0,zIndex:500,overflow:"visible",height:"100vh"},{stat:!1,open:function(){this.Fly({x:-this.offsetWidth,d:500}),this.stat=!0},close:function(){this.stat=!1,this.Fly({x:0,d:500})},toggle:function(){this.stat?this.close():this.open()},init:function(){this.Fly({x:0});this.bt=this.son("div",{left:-32,top:0,zIndex:9,width:"calc(100vw + 32px )",height:32,backgroundColor:"rgb(255,255,255,0.01)",position:"absolute",borderRadius:"5px",backgroundImage:svgURL(''),backgroundPosition:"left",backgroundSize:"auto 100%"},{onclick:function(){event.stopPropagation(),this.p.toggle()},p:this})}})}}function myNCol(t,e,n,i,o){var r=n||"transparent",s=i||0,a={};if(!t)t=document.body;var l=t;a.b=l;e=e||6;a.n=e,a.baseSize=function(){a._w=parseInt(1*l.offsetWidth),a._h=parseInt(1*l.offsetHeight),a._z=a._w/2/Math.tan(Math.PI/e),a.p0=l.p0=o||{SS:1,z:-a._z,rX:0,rY:-90}},a.baseSize(),l.css({webkitPerspective:1e3,transformStyle:"preserve-3d",perspectiveOrigin:"50% 50%",backfaceVisibility:"hidden",boxSizing:"border-box"});var c=["#f88","#8f8","#88f","#ff8","#a44","#4a4","#44a","#aa4","#a44","#a4a","#0000ff","#ffff00","#ff0000","#00ff00","#0000ff","#ffff00","#880000","#008800","#000088"],d=l.son("div",{position:"absolute",width:0,height:0,transformStyle:"preserve-3d",left:a._w/2,top:a._h/2,boxSizing:"border-box"});a.p0=d.p0=o||{SS:1,z:-a._z,rX:0,rY:-90},d.fly(d.p0);function h(){var t=parseInt((a.stage.pos.rY+90)%360/a.scale);t<0&&(t+=a.n),a.ai=t}a.stage=d,d.u=a,a.scale=360/e,a.ai=0,a.stage.turn=function(t){a.stage.Fly({rY:a.stage.pos.rY+360/e,d:t||500})},a.turn1=function(t,n){a.stage.fly({rY:a.stage.pos.rY+t*(360/e),d:n||500}),h()},a.turn3=function(t,e){var n=(t-a.ai)%a.n;n+=n<0?a.n:0;var i=(a.ai-t)%a.n,o=n<(i+=i<0?a.n:0)?n:-i;console.log([n,i,o]),a.stage.turn(o),a.ai>-1&&(a.face[a.ai].style.zIndex=0),a.face[t].style.zIndex=1,h()},a.turn2=function(t,n){console.log("---"+a.ai),h(),a.stage.fly({rY:360/e*t-90},n||"500ms"),a.ai>-1&&(a.face[a.ai].style.zIndex=0),a.face[t].style.zIndex=1,h(),console.log("==="+a.ai)},a.face=[],a.cssi=function(t){return{width:a._w,height:a._h,position:"absolute",left:-a._w/2,top:-a._h/2,zIndex:-1,boxSizing:"border-box",backgroundColor:c[t]}},a.posi=function(t){return{SS:1,y:0,x:Math.cos(360/a.n*t*Math.PI/180)*a._z,z:Math.sin(360/a.n*t*Math.PI/180)*a._z,rY:90-360/a.n*t}};var u="
".replace("_bc_",r);u=u.replace("_bw_",s),d.faceOne=function(t){var e=d.son("div",a.cssi(t),{innerHTML:u});return e.d=e.r("00000"),e.ps0=a.posi(t),e.fly(e.ps0),e.d};for(var p=0;p1?(a=etb(e),void l.forEach((function(e){t(a.addRow(-1).addCell(-1,s,{_ex_:0}),e,++o)}))):(l=ex_n(i,1)).length>1?(a=etb(e).addRow(-1),void l.forEach((function(e){t(a.addCell(-1,s,{_ex_:1}),e,++o)}))):(l=ex_n(i,2)).length>1?(""!=l[1]&&(e._ex_?e.style.width=l[1]:e.style.height=l[1]),void t(e,l[0],++o)):(r[l[0]]={c:e,ex:e._ex_,lv:o,mask:e.son("div",{position:"absolute",width:"100%",height:"100%",left:0,top:0,border:"1px solid #000",zIndex:2,boxSizing:"border-box",overflow:"hidden"},{e:this})},void(n&&e.css({backgroundColor:gColor(cs20670++,.6),backgroundRepeat:"no-repeat",backgroundSize:"100% 155",backgroundImage:`url(/svcn/svg_text?${l[0]})`})))}(t,e),o&&t.children[0].css(o),t.$=r,t}function J2T(cont,json,kc,kv,edit,onInput,onBlur){var nn=[];function arrValue(t,e){var n=t.son("table:eetb",{fontSize:12}),i=n.addRow(-1,{backgroundColor:"#DDD"});OPEval(e[0],(function(t,e){i.addCell(-1,OPlus({border:"1px solid #aaa",padding:5},kc,{textAlign:"center"}),{innerText:t})})),e.forEach((function(t,e){i=n.addRow(-1,{}),nn.push(e),OPEval(t,(function(t,e){var n=i.addCell(-1,{});nn.push(t),cellVal(n,e,t),nn.pop()})),nn.pop()}))}function exp(){for(var t="json",e=[].concat(nn);e.length>0;){var n=e.shift();isNaN(n)?t+="."+n:t+="["+n+"]"}return t}function cellVal(c,v,k){if(Array.isArray(v))arrValue(c,v);else if("object"==typeof v&&null!==v)jsonTable(c,v);else{c.exp=exp(),c.title=c.exp;let oldValue=v;c.css(OPlus({border:"1px solid #aaa",padding:5},kv),{innerText:v,contentEditable:edit?"true":"false"}),edit&&(c.oninput=function(){let t=this.innerText.trim();"function"==typeof onInput&&onInput(k,t,oldValue,this)},c.onkeydown=function(t){"Enter"===t.key&&(t.preventDefault(),this.blur())},c.onblur=function(){let newValue=this.innerText.trim();if("function"==typeof onBlur){const shouldUpdate=onBlur(k,newValue,oldValue,this);shouldUpdate?(eval(this.exp+"=`"+newValue+"`"),oldValue=newValue):this.innerText=oldValue}})}}function jsonTable(t,e){const n=t.son("table:eetb",{border:"0px solid #eee",fontSize:12,cellPadding:0,cellSpacing:0},{cellPadding:0,cellSpacing:0});for(const t in e)if(e.hasOwnProperty(t)){nn.push(t);const i=n.addRow(-1,{});i.addCell(-1,OPlus({backgroundColor:"#DDD",padding:5,border:"1px solid #aaa",width:50},kc),{innerText:t});cellVal(i.addCell(-1,{}),e[t],t),nn.pop()}}jsonTable(cont,json)}function jsonEd(container,jsonData,keyConfig,valueConfig,editable){function JsonEditor(){this.container=container,this.data=jsonData,this.keyConfig=Oplus({border:"1px solid #aaa",padding:5,minWidth:40,backgroundColor:"#EEE"},keyConfig),this.valueConfig=Oplus({border:"1px solid #aaa",padding:5},valueConfig),this.editable=editable,this.init()}return JsonEditor.prototype.init=function(){this.renderJsonTable(this.container,this.data)},JsonEditor.prototype.renderJsonTable=function(t,e){const n=t.son("table:eetb",{border:"0px solid #eee",fontSize:12,cellPadding:0,cellSpacing:0},{cellPadding:0,cellSpacing:0});for(const t in e){const i=n.addRow(-1),o=(i.addCell(-1,this.keyConfig,{innerText:t}),i.addCell(-1,this.valueCell));this.renderCellValue(o,e[t],t)}},JsonEditor.prototype.renderCellValue=function(cell,value,key){Array.isArray(value)||"object"==typeof value&&null!==value?this.renderJsonTable(cell,value):(cell.innerText=value,this.editable&&(cell.contentEditable="true",cell.oninput=e=>{eval(`this.data['${key}'] = '${e.target.innerText}'`),this.onInput(`['${key}']`,e.target.innerText)},cell.onpaste=t=>{t.preventDefault();const e=t.clipboardData.getData("text/plain");document.execCommand("insertText",!1,e)},cell.onkeydown=t=>{"Enter"===t.key&&(t.shiftKey?(document.execCommand("insertHTML",!1,"

"),t.preventDefault()):t.preventDefault())}),Object.assign(cell.style,this.valueConfig,{border:"1px solid #aaa",padding:"5px"}))},JsonEditor.prototype.onInput=function(t,e){},new JsonEditor}function myList0(t){function e(t){var e="";return t.split("\n").forEach((function(t){e+="

"+t+"

"})),e}return t.son("div:ydiv",{fontSize:16,border:"1px solid #FFF"},{}).son("table:eetb",{tableLayout:"fixed"},{addText(t,n,i){return this.addRow().addCell(-1,OPlus({padding:10,textIndent:"1cm",textAlign:"justify"},n),{innerHTML:i?e(t):t})},addHTML:function(t,e){return this.addRow().addCell(-1,OPlus({padding:10},e),{innerHTML:t})},addImg:function(t,e){return this.addRow().addCell(-1).son("img",OPlus({width:"100%"},e),{src:t})},addCode:function(t){return this.addRow().addCell(-1,{padding:10}).son("div",{width:"100%",overflowX:"scroll"}).son("pre",{width:"auto",whiteSpace:"pre"},{innerText:t})},addTitle:function(t,e){return this.addRow().addCell(-1,OPlus({backgroundColor:"#EEE",fongSize:20,padding:8},e),{innerText:t})},addVideo:function(t,e,n,i){var o=this.addRow().addCell().son("video",OPlus({width:"100%",height:"auto"},i),{src:t,controls:!0,onloadedmetadata:function(){this.currentTime=e||0,o.style.height+=50},onclick:function(){this.play()},poter:n||!1});return o.addEventListener("play",(function(){aVideo&&aVideo!==this&&aVideo.pause(),aVideo=this})),o},addRNote:function(t,e){return this.addRow().addCell(-1,OPlus({fontSize:12,fontStyle:"italic",textAlign:"right",padding:4,backgroundColor:"#eee",borderBottom:"1px solid #aaa",color:"#008"},e),{innerText:t})},"add赞助商":function(t,e){var n=this.addRow().addCell();return n.myFrm("logo:120*info"),n.$.logo.son("img",{width:"100%",height:"auto"},{src:t}),n.$.info.css({fontSize:18,padding:8},{innerText:e}),n},addUsermVideo(t,e){var n=this.addRow().addCell().son("div",{position:"relative"});n.son("img",{width:"100%",height:"auto"},{src:e||`/svcn/gzh_cimgTi?${t}&jtxh`,ssrc:isNaN(t)?t:`/svcn/gzh_cmp4i?${t}&jtxh`,onclick:function(){pMp4(this.ssrc)}}),n.son("div",{width:60,height:60,right:10,bottom:10,position:"absolute",backgroundImage:"url(/svcn/20753)",backgroundRepeat:"no-repeat",backgroundPosition:"center center",backgroundSize:"100% 100%",pointerEvents:"none"})},addIMGLabel(t,e){return this.addRow().addCell().IMGLabel(t,e)},addBiliButton(t,e){var n=this.offsetWidth-60;return this.addRow().addCell(-1,{textAlign:"left"},{innerHTML:"".replace("__BVID__",t).replace("__CAP__",e).replace("__WIDTH__",n)})},addApps:function(t,e){var n=t;Array.isArray(t)&&(n=t.join(","));var i=this.addRow().addCell(-1,{border:"1px solid #AA0",padding:10});myGetS(20756,[n],(function(t){t.forEach((function(t){i.son("div",{width:60,height:80,float:"left",boxShadow:"0px 0px 4px #F00",backgroundImage:`url(/svcn/${t.icon})`,backgroundRepeat:"no-repeat",backgroundPosition:"center 5px",backgroundSize:"60% auto",margin:10,borderRadius:"8px",position:"relative"},{_id:t.id,onclick:function(){_r.popFun(this._id)},init:function(){this.lb=this.son("span",{position:"absolute",bottom:2,padding:2,width:"100%",textAlign:"center",fontSize:12},{innerText:t.cmdname})}})}))}),!0)},load:function(t){id}})}HTMLElement.prototype.myLout=function(t,e,n,i){return myLayout(this,t,e,n,i)},HTMLElement.prototype.svgForm=function(t){var e=this;e.clc(),e.$={},e._={};var n=this.css({border:"1px solid #F00",display:"flex",justifyContent:"center"}).son("div",{flexShrink:0,position:"relative"},{innerHTML:t,init:function(){e.pan=this,$clog(this.offsetLeft)}}).children[0];console.log(e.pan),console.log(n);var i=!1,o=!1;console.log(n);var r={_:{},__:{}};function s(t,n,i){var o=n.split(":"),r=o[0],s=t.getBBox();switch(o[1]){case"text":case"password":case"number":case"date":case"time":case"email":case"search":case"color":console.log(i.pan),i._[r]=i.pan.son("input",{position:"absolute",left:s.x+2,top:s.y+1,width:s.width,height:s.height,backgroundColor:"#FFF",border:"1px solid #888",opacity:"path"==t.previousElementSibling.tagName?0:1},{type:o[1]}),Object.defineProperty(i.$,r,{configurable:!0,get:()=>e._[r].value,set(t){i._[r].value=t}}),o[2]&&(i._[r].placeholder=o[2]);break;case"select":i._[r]=i.pan.son("select",{position:"absolute",left:s.x+2,top:s.y+1,width:s.width,height:s.height,backgroundColor:"#FFF",border:"1px solid #888",opacity:"path"==t.previousElementSibling.tagName?0:.9},{}),Object.defineProperty(i.$,r,{configurable:!0,get:()=>i._[r].value,set(t){i._[r].value=t}}),o[2]&&i._[r].opts(o[2]);break;case"button":i._[r]=i.pan.son("button",{position:"absolute",left:s.x+2,top:s.y+1,width:s.width,height:s.height},{innerText:o[2]||o[0],onclick:function(){i["_"+r]&&i["_"+r](this)}});break;case"check":i._[r]=i.pan.son("div",{position:"absolute",left:s.x+2,top:s.y+1,width:s.width,height:s.height,backgroundColor:"#Fff",border:"1px solid rgb(0,0,0,0.1)",borderRadius:"4px",opacity:"path"==t.previousElementSibling.tagName?0:.9},{}).son("input",{position:"absolute",left:5,top:5,width:20,height:20},{type:"checkbox"}),Object.defineProperty(i.$,r,{configurable:!0,get:()=>i._[r].checked,set(t){i._[r].checked=t}});break;case"range":i._[r]=i.pan.son("div",{position:"absolute",left:s.x+2,top:s.y+1,width:s.width,padding:3,height:s.height,backgroundColor:"#FFF",border:"1px solid rgb(0,0,0,0.1)",borderRadius:"4px",opacity:"path"==t.previousElementSibling.tagName?0:.9},{}).son("input:pp",{},{type:"range"}),Object.defineProperty(i.$,r,{configurable:!0,get:()=>i._[r].checked,set(t){i._[r].checked=t}});break;case"textarea":i._[r]=i.pan.son("textarea",{position:"absolute",left:s.x+2,top:s.y+1,width:s.width,height:s.height,backgroundColor:"#FFF",border:"1px solid #888",opacity:"path"==t.previousElementSibling.tagName?0:1,padding:10},{}),Object.defineProperty(i.$,r,{configurable:!0,get:()=>i._[r].value,set(t){i._[r].value=t}}),o[2]&&(i._[r].placeholder=o[2]);break;case"rg":var a=i.pan.son("div:ediv",{position:"absolute",left:s.x+2,top:s.y+1,width:s.width,height:s.height,backgroundColor:"#FFF",border:"1px solid rgb(0,0,0,0.1)",borderRadius:"4px",opacity:"path"==t.previousElementSibling.tagName?0:1},{});i._[r]=new myRGroup(a,o[2]),Object.defineProperty(i.$,r,{configurable:!0,get:()=>i._[r].value,set(t){i._[r].value=t}});break;case"cg":a=i.pan.son("div:ediv",{position:"absolute",left:s.x+2,top:s.y+1,width:s.width,height:s.height,backgroundColor:"#FFF",border:"1px solid rgb(0,0,0,0.1)",borderRadius:"4px",opacity:"path"==t.previousElementSibling.tagName?0:1},{});i._[r]=new myCGroup(a,o[2]),Object.defineProperty(i.$,r,{configurable:!0,get:()=>i._[r].value,set(t){i._[r].value=t}})}t.textContent=""}!function t(a){!function(t,r,a){switch(t.tagName){case"text":i&&(o+=t.textContent,t.style.visibility="hidden");break;case"rect":i&&(console.log(o),s(i,o,e)),i=!1,"#654321"==t.getAttribute("fill")?(r.背板=t,r.背板.setAttribute("fill-opacity",0),cc=r.背板.getAttribute("width"),n.setAttribute("width",cc),r.z=t.getBBox()):"#123456"==t.getAttribute("fill")&&(i=t,t.style.visibility="hidden",o="")}}(a,r);for(var l=0;l{o.drawImage(s,0,0,i.width,i.height);const n=i.toDataURL("image/jpeg",t);e&&e(n)},s.onerror=()=>{console.error("Failed to load image")},s.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(''+r+"")};class myFileInput{constructor(t,e="上传文件",n={},i="*/*"){this.container=t,this.cap=e,this.acceptedTypes=i,this.createFileInput(),this.createCustomButton()}createFileInput(){this.fileInput=document.createElement("input"),this.fileInput.type="file",this.fileInput.style.display="none",this.fileInput.accept=this.acceptedTypes,this.container.appendChild(this.fileInput),this.fileInput.addEventListener("change",(t=>{this.onFiles(t.target.files)}))}setAcceptedTypes(t){this.fileInput.accept=t}createCustomButton(){this.button=this.son("button",{},{innerText:cap,onclick:function(){this.fileInput.click()}})}onFiles(t){console.log(t)}}function popPan(t,e,n,i,o){var r=o||"500ms",s=document.body.son("div",{position:"absolute",left:0,top:0,width:"100%",height:"100%"},{owner:t,ipos:i||{x:Math.max(_r.cont.offsetWidth,_r.cont.offsetHeight)},opos:n||{SS:.7},open:function(t,e,n){var i=t;e&&(this.owner=e),n&&(this.ipos=n,this.fly(n));var o=this;this.owner.style.zIndex=0;try{this.owner.fly(this.opos,r)}catch(t){console.log("----")}_backKey((function(){s.close()})),setTimeout((function(){o.fly({o:1,x:0,y:0,z:0,SS:1,rX:0,rY:0,rZ:0},r),o.first(),s.style.zIndex=20,i&&i(s),s.openFun(s)}),100)},close:function(){var t=this;try{this.closeFun.forEach((function(e){e(t)}))}catch(t){}this.fly(this.ipos,r),this.style.zIndex=0,this.owner.fly({SS:1,x:0,y:0,z:0,rX:0,rY:0,rZ:0,o:1},r),this.owner.style.zIndex=20},ini:[],closeFun:[],first:function(){for(;this.ini.length>0;)this.ini.pop()()},setOwner:function(t){this.owner=t}});return s._3D(),t.o=s,e&&s.css(e),s.fly(i||{x:-_WH_,y:0}),s.openFun=function(){},s}function VIXTree1(t,e,n,i,o,r){var s={};if(s._p=t,t._o=s,r){new ResizeObserver((e=>{r.style.paddingRight=t.scrollbarWidth()})).observe(t)}var a=s;s.c0=OPlus({backgroundColor:"transparent",border:"0px solid #ddd",userSelect:"none"},e),s.ca=OPlus({backgroundColor:"rgb(230,130,80,0.4)",border:"0px solid #d00",userSelect:"text"},n),s.aRow=!1,s.loadco=i;var l=s.b=baseTable(t);s.nodes={},s.rootct=0,s.aNode=0,s._aid=!1,s.ct=1,s.addNode=function(t,n){var i=this.nodes[t.pid];i?(i._cs=i._cs+1||1,t._lv=i._lv+1,t.p=i.o):(t._lv=0,this.rootct++);var o=i?i.o.rt:l;if(!n)n=function(e,n,i){e.innerText=t.id+":"+t.name};var r={};t._cs=0;return r.cont=o.addRow(-1,{},{}).addCell(-1,e,{innerHTML:"
"}),r.cont.addEventListener("dblclick",(e=>{e.stopPropagation(),s._aRec=this._dt,s.onDBClick(t.id,t)})),r.mt=r.cont.r("0000"),r.mt._dt=t,r.mt.ds=t,r.mt._id=t.id,r.lt=r.cont.r("0010"),r.lt._id=t.id,r.lt.css({backgroundColor:"#F0FAFF"}),r.lt.onclick=function(){s.closeNode(this._id)},r.rt=r.cont.r("00110"),n(r.mt,r.lt,r.rt,this),r.mt.onclick=function(){s.aNode=this._id,s.aRow=this,s._aId=this._id,s._aRec=this._dt;var t="";try{t=event.srcElement.getAttribute("_cind")}catch(t){}s.__selectRow(this._id,this,event.srcElement,t)},t.o=r,r.x=t,this.nodes[t.id]=t,r},s.clearAll=function(e){$delE(s.b),s.ct=1,s.nodes={},s.aNode=0,s._aId=!1,s.activeRow=!1,l=s.b=baseTable(t),e&&e()};var c=s;return o?(s.oo="url(/svcn/"+o[0]+")",s.cc="url(/svcn/"+o[1]+")",s.dd="url(/svcn/"+o[2]+")"):(c.cc=svgURL(' '),c.dd=svgURL(' \x3c!-- Created with SVG-edit - https://github.com/SVG-Edit/svgedit--\x3e Layer 1 '),c.oo=svgURL(' ')),s.onDBClick=function(t,e){},s.deleteNode=function(t){},s.descendantsEval=function(t,e){const n=this.nodes[t];if(!n||!n.o||!n.o.rt)return;const i=n.o.rt.rows;for(const t of i){const n=t.cells[0].r("0000"),i=n?n._id:null;if(i){const t=this.nodes[i];t&&(e(t),this.descendantsEval(i,e))}}},s.desEval=s.descendantsEval,s.closeNode=function(t){this.nodes[t].o.lt.r("p").style.display="none",this.nodes[t].o.mt.r("0000").style.backgroundImage=this.cc},s.openNode=function(t){this.nodes[t].o.lt.r("p").style.display="",this.nodes[t].o.mt.r("0000").style.backgroundImage=this.oo},s.ocNode=function(t){var e=this.nodes[t].o.lt.r("p").style.display;return this.nodes[t].o.lt.r("p").style.display=""==e?"none":"",this.nodes[t].o.lt.r("p").style.display},s.setTNode=function(t,e,n,i){var o=this;t.css({backgroundImage:o.dd,backgroundRepeat:"no-repeat",backgroundSize:"20px 20px",backgroundPosition:"2px 5px"}),e.p&&(e.p.mt.r("0000").style.backgroundImage=n?o.oo:o.cc,e.p.mt.r("0000").__id=e.p.x.id,e.p.mt.r("0000").onclick=function(){var t=i.ocNode(this.__id);this.style.backgroundImage=""==t?o.oo:o.cc})},a.gridIni=function(t){var e="",n="",i={};return t.split(";").forEach((function(t,o){var r=t.split(",");r.length<4||(e+="__"+r[1]+"__",n+=''+r[0]+"",i[r[1]]={id:o+1,name:r[1],label:r[0]})})),e+="",n+="",this.cols=i,this.hTem=" "+n+"
",this.rTem=" "+e+"
",[e,n,i]},s.onNodeClick=function(t,e,n){},s.__selectRow=function(t,e,n,i){if(!e)try{n=(e=a.nodes[t].o.mt).r("0001")}catch(t){console.log("12751:__selectRow:"+t.toString())}if(s._aId=t,s._aRec=e._dt,a.cols&&a.cols[i]&&"function"==typeof a.cols[i].onclick0)try{a.cols[i].onclick0(t,e,n,i)}catch(t){$clog("__SELECTTREE:Error occurred while calling onclick0:")}if(s.activeRow){s.nodes[s.activeRow].o.mt.css(a.c0);try{s.nodes[s.activeRow].o.mt.r("000")}catch(t){}}s.activeRow=t,s.nodes[t].o.mt.css(a.ca);try{a.onNodeClick(t,e._dt,n,i)}catch(t){}},a.onRowSelect=function(t,e,n,i,o){},a.selectRow=function(t){for(var e=s.nodes[t].pid;s.nodes[e];)s.openNode(e),e=s.nodes[e].pid;s.__selectRow(t)},a.cellx=function(t,e){return this.nodes[t].o.mt.r("000"+this.cols[e].id)},s.loadSVC=function(t,e,n,i){this.clearAll();var o=this;i&&loadStyle(i),myGetS(t,e,(function(t){t.forEach((function(t){o.addNode(t,(function(e,i,r,s){e.innerHTML=d2f(t,n),e.css(o.c0),e.r("0000").style.backgroundImage="url(/svcn/10558)",i.r("p").style.display=o.loadco?"":"none",t.p&&(t.p.mt.r("0000").style.backgroundImage=o.loadoc?"url(/svcn/2549)":"url(/svcn/2548)",t.p.mt.r("0000").__id=t.p.x.id,t.p.mt.r("0000").onclick=function(){var t=s.ocNode(this.__id);this.style.backgroundImage=""==t?"URL(/svcn/2549)":"url(/svcn/2548)"})}))}))}),!0)},s}function hslToRgb(t,e,n){const i=e*Math.min(n,1-n),o=(e,o=(e+t/30)%12)=>n-i*Math.max(Math.min(o-3,9-o,1),-1);return[255*o(0),255*o(8),255*o(4)]}function rgbToHex(t,e,n){return"#"+[t,e,n].map((t=>{const e=Math.round(t).toString(16);return 1===e.length?"0"+e:e})).join("")}function getDistinctColor(t){const e=43*t%360,n=.8+t%2*.1,i=.4+t%2*.2,[o,r,s]=hslToRgb(e,n,i);return rgbToHex(o,r,s)}HTMLElement.prototype.myFBar=function(t,e){let n={};n.s=function(t,e,n){var o=r._cont.son("select",Oplus(i,{backgroundColor:"#FFE",paddingLeft:e[2]?"18px":"0px",paddingRight:"8px"},n),{});r._ev[e[0]]={o:o,_id:e[0],$:r._ev,get v(){return this.o.value},set v(t){this.o.value=t},dis:function(){this.o.disabled=!0},ena:function(){this.o.disabled=!1},setOpt:function(t){o.setOpt(t)}},t.vs&&o.setOpt(t.vs,"|"),t.v&&(o.value=t.v),o.disabled=t.d},n.i=function(t,e,n){var o=r._cont.son("input",Oplus(i,{backgroundColor:"#FFE",paddingLeft:e[2]?"18px":"2px",paddingRight:"2px"},n),{type:"text",disabled:t.d});r._ev[e[0]]={o:o,_id:e[0],$:r._ev,get v(){return this.o.value},set v(t){this.o.value=t},dis:function(){this.o.disabled=!0},ena:function(){this.o.disabled=!1}},o.$=r._ev,t.vs&&(o.placeholder=t.vs),t.v&&(o.value=t.v)},n.f=function(t,e,n){var o=r._cont.son("input",Oplus(i,{padding:2,paddingRight:"2px"},n),{type:"file",disabled:t.d});r._ev[e[0]]={o:o,_id:e[0],$:r._ev,get v(){return this.o.value},set v(t){this.o.value=t},dis:function(){this.o.disabled=!0},ena:function(){this.o.disabled=!1}},o.$=r._ev,t.vs&&(o.accept=t.vs),t.v&&(o.value=t.v)},n.n=function(t,e,n){var o=r._cont.son("input",Oplus(i,{backgroundColor:"#FFE",paddingLeft:e[2]?"18px":"0px",paddingRight:"8px",textAlign:"right"},n),{type:"number",step:.01,disabled:t.d});r._ev[e[0]]={o:o,_id:e[0],$:r._ev,get v(){return this.o.value},set v(t){this.o.value=t},dis:function(){this.o.disabled=!0},ena:function(){this.o.disabled=!1}},t.vs&&(o.placeholder=t.vs),t.v&&(o.value=t.v)},n._=function(t,e,n){var o=r._cont.son("div",Oplus(i,n,{backgroundColor:"transparent",borderWidth:0}),{});r._ev[e[0]]=o,o.$=r._ev[e[0]]},n.r=function(t,e,n){var o=r._cont.son("form",Oplus(i,{backgroundColor:"#ffe",paddingLeft:e[2]?"18px":"0px",paddingRight:"2px"},n),{items:{},disabled:!1,disable:function(t){OPEval(this.items,(function(e,n){n.disabled=t})),this.disabled=t}}),s=r._ev[e[0]]={o:o,_id:e[0],$:r._ev,get v(){return o.value},set v(t){o.items[t].checked=!0,o.value=t,this.onchange(t)},dis:function(){this.o.disable(!0)},ena:function(){this.o.disable(!1)},onchange:function(t){$clog(t)}};t.vs?(t.vs.split("|").forEach((function(n){let i=o.son("input",{},{type:"radio",value:n,checked:n==t.v,name:e[0],_g:o,onclick:function(){this._g.value=this.value,s.onchange(this.value)}});i._();o.son("label",{},{innerText:n,for:i,_cx:i,_g:o,onclick:function(){this._g.disabled||(this._cx.checked=!0,this._g.value=this._cx.value,s.onchange(this._g.value))}});o.items[n]=i})),t.v&&(o.value=t.v),o.disable(t.d)):$clog("radio缺少选项!")},n.d=function(t,e,n){var o=r._cont.son("input",Oplus(i,{backgroundColor:"#FFE",paddingLeft:e[2]?"18px":"2px",paddingRight:"2px"},n),{type:"date",disabled:t.d});r._ev[e[0]]={o:o,_id:e[0],$:r._ev,get v(){return this.o.value},set v(t){this.o.value=t},dis:function(){this.o.disabled=!0},ena:function(){this.o.disabled=!1}},t.v&&(o.value=t.v)},n.t=function(t,e,n){var o=r._cont.son("input",Oplus(i,{backgroundColor:"#FFE",paddingLeft:e[2]?"18px":"2px",paddingRight:"2px"},n),{type:"time",disabled:t.d});r._ev[e[0]]={o:o,_id:e[0],$:r._ev,get v(){return this.o.value},set v(t){this.o.value=t},dis:function(){this.o.disabled=!0},ena:function(){this.o.disabled=!1}},t.v&&(o.value=t.v.replace(/\^/g,":"))},n.dt=function(t,e,n){var o=r._cont.son("input",Oplus(i,{backgroundColor:"#FFE",paddingLeft:e[2]?"18px":"2px",paddingRight:"2px"},n),{type:"datetime-local",disabled:t.d});r._ev[e[0]]={o:o,_id:e[0],$:r._ev,get v(){return this.o.value},set v(t){this.o.value=t},dis:function(){this.o.disabled=!0},ena:function(){this.o.disabled=!1}},t.v&&(o.value=t.v.replace(/^/g,":"))},n.R=function(t,e,n){var o=r._cont.son("input",Oplus(i,{backgroundColor:"#FFE",paddingLeft:e[2]?"18px":"2px",paddingRight:"2px",height:"30%",borderWidth:0,backgroundColor:"linear-gradient(to right, #ccc 0, #ccc calc(100%/10), #fff calc(100%/10), #fff)",height:"4px",borderRadius:" 2px"},n),{type:"range",disabled:t.d,oninput:function(){$clog(this.value)}});if(r._ev[e[0]]={o:o,_id:e[0],$:r._ev,get v(){return this.o.value},set v(t){this.o.value=t},dis:function(){this.o.disabled=!0},ena:function(){this.o.disabled=!1}},t.vs){let e=t.vs.split("|");e[0]&&(o.min=e[0]),e[1]&&(o.max=e[1]),e[2]&&(o.step=e[2])}t.v&&(o.value=t.v)},n.l=function(t,e,n){var o=r._cont.son("div",Oplus(i,{backgroundColor:"transparent",paddingLeft:e[2]?"18px":"2px",paddingRight:"2px",borderWidth:0},n),{});t.v?(o.innerText=t.v,r._ev[t.v]=o):r._ev[e[0]]=o},n.c=function(t,e,n){var o=r._cont.son("div",Oplus(i,{backgroundColor:"transparent",paddingLeft:e[2]?"18px":"0px",paddingRight:"4px",opacity:1},n),{});let s=o.son("input",{},{type:"checkbox",disabled:t.d}),a=o.son("label",{},{innerText:e[0],for:s});s._lb=a,o._chx=s,s._000_(),r._ev[e[0]]={o:s,d:o,_id:e[0],$:r._ev,get v(){return this.o.checked},set v(t){var e;this.o.checked="string"==typeof(e=t)?"0"!==e&&""!==e&&"false"!==e:"number"==typeof e?0!==e:Boolean(e),this.onchange()},dis:function(){this.o.disabled=!0,this.d.css({opacity:.5})},ena:function(){this.o.disabled=!1,this.d.css({opacity:1})},onchange:function(){$clog("change")}},s.onchange=function(){r._ev[e[0]].onchange()},o.onclick=function(){this.style.opacity<1||(this._chx.checked=!this._chx.checked,r._ev[e[0]].onchange())},t.v&&(s.checked=t.v)},n.L=function(t,e,n){var o=r._cont.son("div",Oplus(i,{backgroundColor:"rgb(255,255,255,0.2",paddingLeft:e[2]?"18px":"2px",paddingRight:"2px",borderWidth:0,borderRadius:"2px",textShadow:"0px 0px 3px #fff"},n),{disabled:t.d});r._ev[e[0]]={vl:t.v||"",o:o,_id:e[0],$:r._ev,get v(){return this.vl},set v(t){this.vl=t,this.o.innerText=t}},t.v&&(r._ev[e[0]].v=t.v)},n.cl=function(t,e,n){var o=r._cont.son("input",Oplus(i,{backgroundColor:"#FFE",paddingLeft:e[2]?"18px":"2px",paddingRight:"2px"},n),{type:"color",disabled:t.d});r._ev[e[0]]={o:o,_id:e[0],$:r._ev,get v(){return this.o.value},set v(t){this.o.value=t},dis:function(){this.o.disabled=!0},ena:function(){this.o.disabled=!1}},t.v&&(o.value=t.v.replace(/\^/g,":"))};var i={display:"flex",alignItems:"center",border:"1px solid #888",borderRadius:"5px",minWidth:16,fontSize:11,flexGrow:0,width:"auto",userSelect:"none",justifyContent:"center",height:"100%",float:"left",boxSizing:"border-box",padding:5,margin:"0px 2px 0px 2px"};let o=[{backgroundPosition:"center center"},{backgroundPosition:"50% 2px",paddingTop:18},{backgroundPosition:"right 1px center",paddingRight:20},{backgroundPosition:"center bottom 1px",paddingBottom:16},{backgroundPosition:"left 2px center",paddingLeft:20}];this.clc(),r=this;var r=this;return this._ev=this._ev||{},this._cont=this.son("div",Oplus({width:"100%",height:"100%",backgroundColor:"#DDD",boxSizing:"border-box",padding:2,position:"relative",left:0,top:0,display:"flex",alignItems:"center",justifyContent:"center"},e||{})),t.split(",").forEach((function(t,e){""!=t&&("_"==t&&(t="d"+e+"(_):z"),function(t,e){var i=t.split(":"),s=myStrParse(i[0]);i[0]=s.str,""==i[0]&&(i[0]="d"+e,s.c="l");var a=i[2]?Oplus(o[i[2]],{backgroundImage:"url(/svcn/"+(i[3]||18889)+")",backgroundRepeat:"no-repeat",backgroundSize:"16px 16px"}):{};0==i[2]&&(a=Oplus(a,{fontSize:1,color:"transparent"})),a=Oplus(a,{flexGrow:"z"==i[1]?999:0,width:i[1]?"z"==i[1]?"auto":i[1]:"auto"});let l=Oplus({display:"flex",alignItems:"center",border:"1px solid #888",borderRadius:"5px",minWidth:16,fontSize:11,userSelect:"none",justifyContent:"center",height:"100%",boxSizing:"border-box"},a);s.c in n?n[s.c](s,i,a):r._ev[i[0]]=r._cont.son("button",l,{innerText:i[0],disabled:s.d,_id:i[0],$:r._ev,dis:function(){this.disabled=!0},ena:function(){this.disabled=!1},Dis:function(){return this.disabled}})}(t,e))})),this.$=this._ev,this},HTMLElement.prototype.Fly=function(t,e){let n=this;n.pos0||(n.pos0={x:0,y:0,z:0,rX:0,rY:0,rZ:0,sX:1,sY:1,sZ:1,org:"50% 50%",o:1,d:"0"}),n.pos||(n.pos={x:0,y:0,z:0,rX:0,rY:0,rZ:0,sX:1,sY:1,sZ:1,org:"50% 50%"});var i=Oplus(n.pos,t,e?{d:e}:{});isNaN(i.x)||(i.x=i.x+"px"),isNaN(i.y)||(i.y=i.y+"px"),isNaN(i.z)||(i.z=i.z+"px");try{"SS"in t&&(i.sX=i.sY=i.sZ=t.SS)}catch(n){}var o=`translate3d(${i.x}, ${i.y}, ${i.z}) \n rotateX(${i.rX}deg) rotateY(${i.rY}deg) rotateZ(${i.rZ}deg) \n scale3d(${i.sX}, ${i.sY}, ${i.sZ})`;window.requestAnimationFrame((()=>{n.pos=i,t&&"org"in t&&(n.style.transformOrigin=t.org),i.d&&(n.style.transitionDuration=isNaN(i.d)?i.d:i.d+"ms"),n.style.transform=o,t&&"o"in t&&(n.style.opacity=t.o)}))},HTMLElement.prototype.Fly1=function(t,e){let n=this;n.pos0||(n.pos0={x:0,y:0,z:0,rX:0,rY:0,rZ:0,sX:1,sY:1,sZ:1,org:"50% 50%",o:1,d:"0"}),n.pos||(n.pos={x:0,y:0,z:0,rX:0,rY:0,rZ:0,sX:1,sY:1,sZ:1,org:"50% 50%"});var i=Oplus(n.pos,t,e?{d:e}:{});isNaN(i.x)||(i.x=i.x+"px"),isNaN(i.y)||(i.y=i.y+"px"),isNaN(i.z)||(i.z=i.z+"px");try{"SS"in t&&(i.sX=i.sY=i.sZ=t.SS)}catch(n){}var o=`translate3d(${i.x},${i.y},${i.z}) \n rotateX(${i.rX}deg) rotateY(${i.rY}deg) rotateZ(${i.rZ}deg) \n scale3d(${i.sX},${i.sY},${i.sZ})`;n.pos=i,t&&"org"in t&&(n.style.webkitTransformOrigin=n.style.mozTransformOrigin=n.style.msTransformOrigin=t.org),i.d&&(n.style.webkitTransitionDuration=n.style.mozTransitionDuration=n.style.msTransitionDuration=isNaN(i.d)?i.d:i.d+"ms"),n.style.webkitTransform=n.style.mozTransform=n.style.msTransform=o,t&&"o"in t&&(n.style.opacity=t.o)},HTMLElement.prototype.fly=HTMLElement.prototype.Fly,HTMLElement.prototype.nFly=function(t){var e=this;this.ontransitionend=function(){var t=e.posArray.shift();t&&e.Fly(t)},this.posArray=t,this.ontransitionend()},HTMLElement.prototype.FlyP=function(t={}){const e=this,{x:n=0,y:i=0,z:o=0,rx:r=0,ry:s=0,rz:a=0,sx:l=1,sy:c=1,sz:d=1,opa:h=1,dur:u=.6,ease:p="ease",delay:f=0}=t;return e.style.transition=`transform ${u}s ${p} ${f}s,opacity ${u}s ${p} ${f}s`,e.style.transform=`translate3d(${n}px,${i}px,${o}px) rotateX(${r}deg) rotateY(${s}deg) rotateZ(${a}deg) scale3d(${l},${c},${d})`,e.style.opacity=h,new Promise((t=>{if(0===u+f)return void requestAnimationFrame((()=>t(e)));const n=i=>{i.target!==e||"transform"!==i.propertyName&&"opacity"!==i.propertyName||(e.removeEventListener("transitionend",n),t(e))};e.addEventListener("transitionend",n)}))},HTMLElement.prototype.mySPan=function(t){var e=Oplus({bw:"66px 30px 60px 30px",cap:"标签",start:32,lWidth:40,lHeight:32,mColor:"rgb(255,0,0,0.21)",btcss:{}},t);this.lps||(this.lps=[]);var n=this.son("div:pan",{zIndex:100},{stat:0,init:function(){const t=this;this.bt=this.son("div",Oplus({position:"absolute",right:-e.lWidth,top:e.start,userSelect:"none",textAlign:"center",clipPath:e.clipPath,fontSize:12,width:e.lWidth,height:e.lHeight,boxSizing:"border-box"},e.btcss),{innerText:e.cap,init:function(){this._000_()},onclick:function(){t.stat?t.close():t.open()}}),this.m=this.son("div:panN",{borderWidth:e.bw,borderStyle:"solid",borderColor:e.mColor},{onclick:function(){try{_backRun()}catch(t){}}}),this.c=this.m.son("div:pp",{boxShadow:"0px 0px 8px #000",backgroundColor:"#FFF"},{init:function(){this._000_()}}),this.Fly({x:"-100%"})},onclick:function(){this.myclose()},open:function(t){if(!this.stat){var e=this;this.stat=1,this.style.zIndex=101,this.Fly({x:0},500),this.openFun();try{t||_backKey((function(){e.myclose()}))}catch(t){}}},myclose:function(){this.stat=0,this.style.zIndex=100,this.closeFun(),this.fly({x:"-100%",org:"0 0"},500)},close:function(){try{_backRun()}catch(t){}},openFun:function(){},closeFun:function(){}});return this.lps.push(n),n};var cs19140=0,bw19140=6;function convertToCalc(t){if(t.includes(".")){const[e,n]=t.split(".");return`calc(100vw * ${n} / ${e})`}return t}function mFR19140INI(){window.myFrm19140=document.body.son("div",{position:"absolute",zIndex:400,width:"auto",fontSize:12,left:0,top:0,padding:3,visibility:"hidden",backgroundColor:"#F00",border:"1px solid #000",borderRadius:"4px",boxSizing:"border-box"})}function _w_19140(t,e){return window.myFrm19140||mFR19140INI(),myFrm19140.innerText=t,myFrm19140.offsetWidth+24+(e||0)+"px"}function myDoc(t,e){var n=t.son("div:ediv",e||{backgroundColor:"#FFF"});return n.标题=function(t,e,n){return this.son(`H${e||3}`,{padding:5,margin:"0px",backgroundColor:"#ddd"},{innerHTML:t,ch:n})},n.add=function(t,e){return this.son("div",e||{display:"inblock"},{innerHTML:t})},n.pv0=function(t,e){var n=this.son("div",e||{display:"inblock"},{});t.split("---").forEach((function(t){n.son("p:pv0",{},{innerHTML:t})}))},n.html=function(t,e){this.son("pre",e||{display:"inblock"},{innerText:t})},n.code=function(t,e){this.son("div",{overflow:"scroll"}).son("pre",{width:"auto",whiteSpace:"nowrap"},{innerHTML:t})},n.url=function(t,e,n){return this.son("a",{},{innerText:t,href:e})},n}function CMEditor(t,e,n){var i={};i.rid=e||19404,i.fdn=n||"text";var o=(t||document.body).son("div:eediv",{position:"relative",left:0,top:0});i.fip=19404,i.title="CMEditor",i.cont=o;var r=(h=o).son("div",{position:"absolute",top:60,left:2,width:24,height:24,backgroundColor:"rgb(255,200,0,1)",borderRadius:"12px",zIndex:1120,display:"none"},{ena:function(){this.style.display=""},dis:function(){this.style.display="none"},title:"sa2ve "+i.rid+":"+i.fdn,onclick:function(){myPostS(19450,[i.fdn,i.rid],encodeURI(d.getValue()),(function(t){d.okx()}))}}),s=h.son("div",{position:"absolute",bottom:40,left:2,width:24,height:24,backgroundColor:"rgb(100,255,100,1)",borderRadius:"12px",zIndex:120,display:"none"},{ena:function(){this.style.display=""},dis:function(){this.style.display="none"},title:"load "+i.rid+":"+i.fdn,onclick:function(){myGetS(19451,[i.fdn,i.rid],(function(t){d.setValue(t[0][i.fdn]),d.okx()}),!0)}}),a=(r=h.son("div",{position:"absolute",top:60,left:2,width:24,height:24,backgroundColor:"rgb(255,200,0,1)",borderRadius:"12px",zIndex:1120,display:"none"},{ena:function(){this.style.display=""},dis:function(){this.style.display="none"},title:"sa2ve "+i.rid+":"+i.fdn,onclick:function(){myPostS(19450,[i.fdn,i.rid],encodeURI(d.getValue()),(function(t){d.okx()}))}}),s=h.son("div",{position:"absolute",bottom:40,left:2,width:24,height:24,backgroundColor:"rgb(100,255,100,1)",borderRadius:"12px",zIndex:120,display:"none"},{ena:function(){this.style.display=""},dis:function(){this.style.display="none"},title:"load "+i.rid+":"+i.fdn,onclick:function(){myGetS(19451,[i.fdn,i.rid],(function(t){d.setValue(t[0][i.fdn]),d.okx()}),!0)}}),(c=o.son("div:eediv",{position:"absolute",left:0,top:0})).son("textArea:pp"));(d=i.editor=CodeMirror.fromTextArea(a,{lineNumbers:!0,mode:"javascript"}))._c_ont=c,d.resize=function(){this.setSize(this._c_ont.offsetWidth,this._c_ont.offsetHeight)},d.resize(),d.on("change",(function(){c.r("15").css({backgroundColor:"#f88"}),r.ena(),s.ena()}));var l=c.r("1").css({backgroundColor:"#FFE",position:"relative"});d.okx=function(){c.r("15").css({backgroundColor:"#fff"}),r.dis(),s.dis()},c.r("1520").css({backgroundColor:"#EEE",color:"#FF0"}),c.r("1520").onclick=function(){d.resize()};l.son("div",{position:"absolute",top:0,left:0,width:"auto",height:"auto",padding:"2 0 2 0",color:"#22c",zIndex:10,display:"",textShadow:"1px 1px 1px #aaa",writingMode:"vertical-rl"},{innerText:i.fdn,title:"resize",onclick:function(){d.resize()}}),l.son("div",{position:"absolute",top:0,left:0,width:"auto",height:"auto",padding:"2 0 2 0",color:"#22c",zIndex:10,display:"",textShadow:"1px 1px 1px #aaa",writingMode:"vertical-rl"},{innerText:i.fdn,title:"resize",onclick:function(){d.resize()}});var c,d,h=o;a=(c=o.son("div:eediv",{position:"absolute",left:0,top:0})).son("textArea:pp");(d=i.editor=CodeMirror.fromTextArea(a,{lineNumbers:!0,mode:"javascript"}))._c_ont=c,d.resize=function(){this.setSize(this._c_ont.offsetWidth,this._c_ont.offsetHeight)},d.resize(),d.on("change",(function(){c.r("15").css({backgroundColor:"#f88"}),r.ena(),s.ena()}));l=c.r("1").css({backgroundColor:"#FFE",position:"relative"});return d.okx=function(){c.r("15").css({backgroundColor:"#fff"}),r.dis(),s.dis()},c.r("1520").css({backgroundColor:"#EEE",color:"#FF0"}),c.r("1520").onclick=function(){d.resize()},s.onclick(),i}function myTabBar(t,e,n,i,o){var r=new Object;return r.a4=n||"#aaa",r.a8=i||"#ccc",r.ae=o||"#eee",r.rp=t||document.body,r.tabs={},r.a=!1,r.rp.innerHTML="
",r.rt=r.rp.r("0"),r.hr=r.rp.r("0000000"),r.bd=r.rp.r("00100"),r.a=!1,r.bd.parentElement.style.borderTopColor=r.ae,r.tabClick=function(t,e,n){},r.hidePage=function(t,e){var n=this.tabs[t];n?(n.b.style.display=e?"none":"",n.style.display=e?"none":""):console.log("notab:"+t)},r.onchange=function(t,e){},r.addCell=function(t,e,n,i,o){if(this.tabs[t])return this.selectTab(t),this.tabs[t];var s=r.hr.insertCell(r.hr.cells.length-1);s.innerText=e,s._id=t,s.css({backgroundColor:r.a8,width:n||"auto",minWidth:35,textAlign:"center",padding:"3px 8px 3px 8px",userSelect:"none",borderRadius:"6px 6px 0px 0px",boxShadow:"0px 0px 3px #337"}),r.a&&r.a.fly({x:1e3,SS:0});var a=r.bd.son("div",{width:"100%",height:"100%",overflow:"auto",position:"absolute",display:"block",backgroundColor:"#FFF"});return a.b=s,s.c=a,a._id=t,s.onclick=function(){let t=!1;r.a&&(t=r.a,r.a.fly({x:1e3,SS:0}),r.a.b.css({backgroundColor:r.a8})),this.c.fly({x:0,SS:1}),this.css({backgroundColor:r.ae}),r.a=this.c,this.c.onSelect&&this.c.onSelect(this.c);var e=this;r.tabClick(e._id,e,e.c),r.onchange(this.c)},i?(r.a&&r.a.b.css({backgroundColor:r.a8}),s.css({backgroundColor:r.ae}),r.a=a):(a.fly({x:1e3,SS:0}),r.a&&r.a.fly({x:0,SS:1})),r.tabs[t]=a,a},r.addTab=r.addCell,r.selectTab=function(t,e){var n=this.tabs[t],i=!1;this.a&&(i=this.a,this.a.fly({x:1e3,SS:0},"0s"),this.a.b.css({backgroundColor:this.a8})),n.fly({x:0,SS:1},"0s"),n.b.css({backgroundColor:r.ae}),r.a=n,r.onchange(this.a,i),e&&e(n,i)},r.delCell=function(t){var e=this.tabs[t];e?($cle(e.b),$cle(e),delete this.tabs[t]):console.log("notab:"+t)},r.hideHeader=function(){this.rt.r("00").style.height=0,this.rt.r("000").style.display="none"},r.showHeader=function(){this.rt.r("00").style.height=32,this.rt.r("000").style.display=""},r}function codeEditor(t,e){var n={};n.rid=e||19537;var i=(t||document.body).son("div:eediv",{});if(n.fip=19416,n.title="codeEditor",n.cont=i,i.myFrm("t:32+body",!0),console.log(typeof window.CodeMirror),!window.CodeMirror){var o=myGetSA(19431,[]);$clog("codemirror.css:"+o.length),loadStyle(o);o=myGetSA(19435,[]);$clog("codemirror.js:"+o.length),loadScript(o)}var r=n.topBar=i._fv.t.son("div:pp",{overflowX:"scroll"}).myFBar("[id],id(L):50,[cmdname],cmdname(i):120,[cmdtype],cmdtype(s){|mdjas|djs|msqlcmd|treeHtml|text|js|djs|djar|sqlcmd|dbpost|mypost|fun},[caption],caption(i):80,[connid],connid(i):80,load");r._ev.id.o.css({color:"#F00"},{innerText:n.rid}),r._ev.load.onclick=function(){},r.load=function(){myGetS(19456,[n.rid],(function(t){var e=t[0];for(var n in e)try{r._ev[n].v=e[n]}catch(t){console.log("==============="+t)}}),!0)},r.load();var s=n.body=i._fv.body.son("div:eediv",{border:"0px solid #DEF",boxSizing:"border-box",position:"relative",backgroundColor:"#DEF"},{init:function(){this.myHTML("
"),this.resizeA=[]},setSize:function(t){var e=t.offsetLeft+5,n=t.offsetTop+8;this._ev.t.style.height=n,this._ev.tl.style.width=e,this._ev.bl.style.width=e,this.resizeA.forEach((function(t){t()}))}}),a=s.son("div",{position:"absolute",left:"calc(50% - 10px)",top:"calc(50% - 10px)",width:20,height:20,borderRadius:"20px",backgroundColor:"RGB(255,0,0,0.3)",boxShadow:"0px 0px 3px #000",zIndex:200});s.onclick=function(){if(event.ctrlKey){var t=s.getBoundingClientRect();a.style.left=event.clientX-t.x-10,a.style.top=event.clientY-t.y-10,s.setSize(a)}},a.draggable=!0,a.ondragstart=function(t){this._x=event.offsetX,this._y=event.offsetY,this._X=this.offsetLeft,this._Y=this.offsetTop},a.ondragend=function(t){this.style.left=event.offsetX+this._X-12,this.style.top=event.offsetY+this._Y-12;s.setSize(a)};let l="tl,tr,bl,br".split(","),c="remark,text,sql,fmt".split(",");return s.editors={},c.forEach((function(t,e){var i=s._ev[l[e]].son("div:pp",{backgroundColor:"#FFF"});s.editors[t]=function(t,e,n){var i={};i.rid=e||19404,i.fdn=n||"text";var o=(t||document.body).son("div:eediv",{position:"relative",left:0,top:0});return i.fip=19404,i.title="CMEditor",i.cont=o,loadLed.onclick(),i}(i,n.rid,t),s.resizeA.push((function(){s.editors[t].editor.resize()}))})),n}function myAcc(t,e){var n=new Object;return n.o={},n.bClick={},n.rp=t||document.body,n.a=!1,n.hdcss=OPlus({borderTop:"1px solid #ccc",borderBottom:"1px solid #444",verticalAlign:"middle",backgroundColor:"#468",color:"#ff0",paddingLeft:10,display:"block",userSelect:"none",lineHeight:"30px"},e),n.p=n.rp.son("Table",{width:"100%",overflow:"hidden",height:"100%",borderCollapse:"collapse",border:"0px solid #000"}),n.p.cellPadding=0,n.p.cellSpacing=0,n.Ccells={},n.cells={},n.aCell=!1,n.openItem=function(t){this.cells[t].click()},n.addCell=function(t,e,i,o,r,s){var a=this.p.addRow(-1).addCell(-1,{position:"relative",color:"#A03",textShadow:"\n -1px -1px 1px #ddd,\n 1px 1px 2px #666",padding:4,backgroundColor:"#ccc",borderBottom:"1px solid #888",fontWeight:"bold",cursor:"default",userSelect:"none"},{__id:t,__capt:e}),l={width:"100%",height:"100%",overflow:"hidden",position:"relative"};if(o)for(var c in o)l[c]=o[c];a.innerText=e,a.css(this.hdcss),a.parentElement.css({height:30});var d=this.p.insertRow(-1).addCell(-1,{},{__id:t,__capt:e});d.css({overflow:"hidden"});var h=d.son("div:pp",{overflowY:"auto"}).son("div:ediv",{overflow:"visible"},{__id:t,__capt:e});return a.rc=d,a.dx=h,this.cells[t]=a,this.Ccells[e]=a,h.cCell=a,a.onclick=function(){n.a&&(n.a.rc.parentElement.style.display="none",n.a.dx.onclose&&n.a.dx.onclose(n.a,this)),this.rc.parentElement.style.display="table-row",this.dx.onopen&&this.dx.onopen(this.dx),n.a=this},h.onopen=r||!1,h.onclose=s||!1,i?(n.a&&(n.a.rc.parentElement.style.display="none"),n.a=a,d.parentElement.css({display:"table-row"}),h.ofun&&h.ofun()):d.parentElement.css({display:"none"}),h},n}function myDoc(t,e){var n=t.son("div",Oplus({position:"relative",overflow:"scroll",width:"100%",height:"100%"},e));return n._3D(),loadStyle(".mydocA{ color:#00a; cursor:pointer; //background-color:#ccc; padding:3px 6px 3px 6px; border-radius:4px;}.mydocA:hover{background-color:rgb(180,180,180,0.3)}.mydocC{color:#a00;background-color:rgb(255,255,180,0.3)}.mydoci{height:24;vertical-align: middle}"),n.okExp=[{e:RegExp(/\[B(.*?)\]/,"ig"),f:function(t){var e=t.substring(2,t.length-1).split(":");return 1==e.length&&(e[1]=e[0]),""}},{e:RegExp(/\[A(.*?)\]/,"ig"),f:function(t){var e=t.substring(2,t.length-1).split(":");return 1==e.length&&(e[1]=e[0]),""+e[1]+""}},{e:RegExp(/\[C(.*?)\]/,"ig"),f:function(t){var e=t.substring(2,t.length-1).split(":");return 1==e.length&&(e[1]=e[0]),""+e[1]+""}},{e:RegExp(/\[i(.*?)\]/,"ig"),f:function(t){var e=t.substring(2,t.length-1).split(":");return 1==e.length&&(e[1]=e[0]),""}}],n.ok=function(t){var e=t;return n.okExp.forEach((function(t){var n=t.e,i=t.f;e=e.replace(n,i)})),e},n.H=function(t,e){return n.son("h"+e||3,{padding:5,marginBlock:"0px",display:"block"},{innerText:t})},n.p0=function(t,e){var n=this.son("div",e||{});return t.split(">>>").forEach((function(t){n.son("p:pv0",{},{innerHTML:t})})),n},n.t=function(t,e){var i=this.son("div:pv0",e||{});return i.myHTML(n.ok(t)),i},n.code=function(t,e){return this.son("pre",OPlus({whiteSpace:"pre"},e),{innerText:t})},n.$=n._ev,n}function myGrid(t,e,n){if(!n)n={};var i={hr:Oplus({height:24},n.hr),hc:Oplus({height:24,fontSize:12},n.hc),gc:Oplus({fontSize:12},n.gc),gr:Oplus({height:30},n.gr)},o=t.son("table:etb",{tableLayout:"fixed"},{cellPadding:0});t._o=o,o._p=t,o.ds={},o.stru=[],o.rs={},o.HTD=o.addRow(-1,{}).addCell(-1,Oplus({backgroundColor:"rgb(220,220,220,0.5)",position:"relative"},i.hr),{init:function(){o.hdcell=this,o.hh=this.son("div:pp",{position:"absolute",backgroundColor:"rgb(80,80,80,0.1)"})}}).son("table:etb",{tableLayout:"fixed"},{cellPadding:0,init:function(){o.HTB=this}}).addRow(-1,{},{}),o.GTD=o.addRow().addCell(-1,{border:"0px solid #f00"},{}).son("div:ydiv",{overflowY:"scroll"},{init:function(){o.TBC=this}}).son("table:eetb",{},{init:function(){o.GTB=this}}),e.split(";").forEach((function(t){var e=t.split(",");if(!(e.length<4)){var n={id:e[0],lable:e[1],w:e[2],a:e[3],t:e[4]||"t",e:e[5]||"0"};n._v=-1==n.w?"none":"",o.stru.push(n),o.HTD.addCell(-1,Oplus({width:"_"==e[2]?null:e[2],textAlign:"center",display:n._v,border:"1px solid #aaa",borderWidth:"0px 1px 0px 1px"},i.hc),{className:"pvgridtd",innerText:e[1]})}}));return new ResizeObserver((t=>{o.hdcell.style.paddingRight=o.TBC.scrollbarWidth()})).observe(o.TBC),o.setData=function(t,e){this.ds=t;const n={l:"left",c:"center",r:"right"};t.forEach((function(t){var r=o.GTD.addRow(-1,Oplus({},i.gr),{});o.rs[t.id]=r,r.ds=r._dt=t,t.o=r,o.stru.forEach((function(e){var s=r.addCell(-1,Oplus({width:e.w,textAlign:n[e.a],border:"1px solid #ddd",display:e._v},i.gc),{className:"pvgridtd",innerText:t[e.id],fdName:e.id,rId:t.id});"E"==e.t&&s.rED(o.edB,o.edA,o.edP),"C"==e.t&&(s.innerText="",s.css({backgroundIamge:1==t[e.id]?thattsvg:thatfsvg}))})),e&&e(r,t)}))},o.clear=function(){o.GTD.clc(),o.ds={}},o.aRow=!1,o.GTD.onclick=function(){var t=event.srcElement;t.parentElement;if("TD"==t.tagName)if(t._fdClick)t._fdClick(t,r.parentElement);else{var e=o.aRow;o.aRow&&(o.aRow.style.backgroundColor=o.aRowBackcolor),o.aRow=t.parentElement,o.aRowBackcolor=o.aRow.style.backgroundColor,o.aRow.style.backgroundColor="rgb(255,255,30,0.6)",o.trClick&&o.trClick(o.aRow,t,e,o.stru[t.cellIndex])}},o.GTD.addEventListener("dblclick",(function(){var t=event.srcElement;t.parentElement;o.trDBClick&&o.trDBClick(o.aRow,t,o.stru[t.cellIndex])})),o.selectRow=function(t){this.rs[t]?(this.rs[t].cells[0].click(),this.rs[t].inView()||this.rs[t].scrollIntoView()):$clog("no---")},o.setTdClick=function(t,e){console.log(this.stru)},o.edB=function(){},o.edA=function(){},o.edP=function(){},o.colVisible=function(t,e){o.cEval(t,(function(t){t.style.display=e?"":"none"}))},o.cellx=function(t,e){return this.rs[t].cells[this.stru.findIndex((t=>t.id===e))]},o}function myContextMenu(t,e,n){var i=document.body.son("div",Oplus({position:"absolute",zIndex:3e3,boxShadow:"0px 0px 4px #000",padding:5,visibility:"hidden",borderRadius:"5px",minWidth:10,minHeight:10,color:"#FFa",fontSize:12,backgroundColor:"rgb(255,250,250,0.8)",textAlign:"left",opacity:.8,boxSizing:"border-box",cursor:"pointer"},t),{init:function(){let t=this;function e(e){t.contains(e.target)||t.hide()}function n(e){"Escape"===e.key&&t.hide()}this._registerAutoClose=()=>{document.addEventListener("mousedown",e),document.addEventListener("keydown",n)},this._unregisterAutoClose=()=>{document.removeEventListener("mousedown",e),document.removeEventListener("keydown",n)},this._registerAutoClose()},hide:function(){this.style.visibility="hidden"},applyTo:function(t,e){t.addEventListener(e||"contextmenu",(function(t){t.preventDefault(),t.stopPropagation(),i.offsetWidth+t.clientX>window.innerWidth?i.style.left=(t.clientX-i.offsetWidth+3>0?t.clientX-i.offsetWidth+8:8)+"px":i.style.left=t.clientX-8+"px",i.offsetHeight+t.clientY>window.innerHeight?i.style.top=(t.clientY-i.offsetHeight+3>0?t.clientY-i.offsetHeight+8:8)+"px":i.style.top=t.clientY-8+"px";var e=i.beforPop(i);i.event=t,i.o=this,e&&(i.style.visibility="visible")}))},show:function(t){$clog("----------------------sss")},beforPop:n||function(){return $clog("请定义beforePop"),!0},onclick:function(){event.stopPropagation()}});return e&&i.applyTo(e),i}function myButtonPop(t,e,n,i,o){t.$css({position:"relative",overflow:"visible",backgroundImage:svgURL(''),backgroundPosition:"right top",backgroundSize:"8px 8px"},{onmouseenter:function(){o||this.click()}});var r=t.pop=t.son("div",Oplus({position:"absolute",width:e,height:n,zIndex:200,boxSizing:"border-box",borderRadius:"4px",boxShadow:"0px 0px 5px #000",bottom:t.offsetHeight,left:0,backgroundColor:"rgb(200,255,255,0.6)",border:"0px solid #F00"},i),{stat:0,ow:t,owbg:t.style.backgroundColor,init:function(){var e=this;this._000_();var n=this.getBoundingClientRect();t.getBoundingClientRect();this.popx=0,this.popy=0,n.right>window.innerWidth&&(this.popx=-(n.right-window.innerWidth+10)),n.left<0&&(this.popx=10-n.left),n.top<100&&(this.style.bottom=null,this.style.top=t.offsetHeight-5,this.popy=0),this.Fly({SS:0,x:0,y:0,o:"0",org:"0% 50%"}),document.addEventListener("click",(function(n){t.disabled||(n.srcElement==e.ow?e.revert():1==e.stat&&e.close())}))},onclose:!1,onopen:!1,open:function(t){this.stat=1,this.ow.css({color:"#FF8",backgroundColor:"#488"}),this.Fly({SS:1,o:1,x:this.popx,y:this.popy,d:200,org:"0 100%"}),this.onopen&&this.onopen()},close:function(){this.stat=0,this.ow.css({color:"#000",backgroundColor:this.owbg}),this.Fly({SS:0,o:0,x:0,y:0,d:200,org:"0 100%"}),this.onclose&&this.onclose()},revert:function(){0==this.stat?this.open():this.close()}});return o||r.addEventListener("mouseleave",(function(){this.close()})),r}function myChechGroup(t,e,n,i){t.svg=i||'\n---\n',t.svg=t.svg.split("---"),t.svg[0]='url("data:image/svg+xml,'+encodeURIComponent(t.svg[0])+'")',t.svg[1]='url("data:image/svg+xml,'+encodeURIComponent(t.svg[1])+'")',t.fColor=["#888","#000"],t.css({display:"flex",flexWrap:"wrap",alignContent:"flex-start",fontSize:12,padding:5},{});var o={};return t.ini=function(e){this.clc(),o={},"",e.split(",").forEach((function(e){o[e]=t.son("div",{backgroundPosition:"5 center",fontSize:12,backgroundSize:"auto 60%",userSelect:"none",backgroundImage:t.svg[0],color:t.fColor[0],display:"flex",padding:"5 5 5 24",width:"auto",borderRadius:"5px",border:"0px solid rgb(0,0,0,0.05)"},{checked:0,innerText:e,onclick:function(){this.checked=this.checked?0:1,this.style.backgroundImage=t.svg[this.checked],this.style.color=t.fColor[this.checked],t.onchange(t.getVal())},setv:function(e){this.checked=e,this.style.backgroundImage=t.svg[this.checked],this.style.color=t.fColor[this.checked]}})}))},e&&t.ini(e),t.setVal=function(t){OPEval(o,(function(t,e){o[t].setv(0)})),t&&t.split(",").forEach((function(t){o[t].setv(1)}))},n&&t.setVal(n),t.getVal=function(){var t=[];return OPEval(o,(function(e,n){n.checked&&t.push(e)})),t.join(",")},t.onchange=function(t){},t}function myRadioGroup(t,e,n,i){t.svg=i||'\n---\n',t.svg=t.svg.split("---"),t.svg[0]='url("data:image/svg+xml,'+encodeURIComponent(t.svg[0])+'")',t.svg[1]='url("data:image/svg+xml,'+encodeURIComponent(t.svg[1])+'")',t.fColor=["#888","#000"],t.css({display:"flex",flexWrap:"wrap",alignContent:"flex-start",fontSize:12,padding:5},{});var o={},r="";return t.ini=function(e){this.clc(),o={},r="",e.split(",").forEach((function(e){o[e]=t.son("div",{backgroundPosition:"5 center",fontSize:12,backgroundSize:"auto 60%",userSelect:"none",backgroundImage:t.svg[0],color:t.fColor[0],display:"flex",padding:"5 5 5 24",width:"auto",borderRadius:"5px",border:"0px solid rgb(0,0,0,0.05)"},{checked:0,innerText:e,onclick:function(){if(""!=r&&r!=this.innerText)try{o[r].setv(0)}catch(t){}this.checked=this.checked?0:1,this.style.backgroundImage=t.svg[this.checked],this.style.color=t.fColor[this.checked],r=this.checked?this.innerText:"",t.onchange(t.getVal())},setv:function(e){this.checked=e,r=1==e?this.inerText:"",this.style.backgroundImage=t.svg[this.checked],this.style.color=t.fColor[this.checked]}})}))},e&&t.ini(e),t.setVal=function(t){""!=r&&o[r].setv(0),""!=t&&o[t].setv(1)},n&&t.setVal(n),t.getVal=function(){return r},t.onchange=function(t){$clog(t)},t}function popCMenu(t,e){var n=e||window.event;t.offsetWidth+n.clientX>window.innerWidth?t.style.left=(n.clientX-t.offsetWidth+5>0?n.clientX-t.offsetWidth+5:5)+"px":t.style.left=n.clientX-5+"px",t.offsetHeight+n.clientY>window.innerHeight?t.style.top=(n.clientY-t.offsetHeight+5>0?n.clientY-t.offsetHeight+5:5)+"px":t.style.top=n.clientY-5+"px",t.style.visibility="visible"}window.myFrm19140=!1,window.addEventListener("load",(function(){mFR19140INI()})),window.captionLen=_w_19140,HTMLElement.prototype.myFrm=function(t,e,n,i,o){let r=this,s=n||this,a=e||0;var l=!1;function c(t){if(t.startsWith("(")&&t.endsWith(")")){let e=0,n=!0;for(let i=1;i-1&&0===o?(n.push(i.trim()),i=""):i+=t;return i&&n.push(i.trim()),n}s._fv||(s._fv={},s.__={},s.$={},s.aOb=function(t,e){"function"==typeof e&&(s.$[t]||(s.$[t]=[]),s.$[t].push(e))},s.rOb=function(t,e){const n=s.$[t];if(n){const t=n.indexOf(e);t>-1&&n.splice(t,1)}}),s==this&&(s.$=s._fv,s.vixEs=r._fv);var h,u=d(t,0);if(u.length>1)return h=etb(r),u.forEach((function(t){h.addRow(-1).addCell(-1).myFrm(t,0,s,i)})),r;if((u=d(t,1)).length>1)return h=etb(r).addRow(-1),void u.forEach((function(t){h.addCell(-1,{boxSizing:"border-box"}).myFrm(t,1,s,i)}));var p,f;if((u=d(t,2)).length>1){if(""!=u[1]&&(r._size=!0,0==a?r.style.height=convertToCalc(u[1]):1==a?r.style.width=u[1]:console.log("不知道会不会出现")),u[2]){if("F"==u[2]&&r.css({backgroundColor:"#CCC",borderBottom:"1px solid #aaa"}),"g"==u[2]&&r.css({backgroundColor:"#FAFAFA"}),"f"==u[2]&&r.css({backgroundColor:"rgb(222,222,222,0.4)"}),("t"==u[2]||"b"==u[2])&&0==a){r.parentElement.parentElement.parentElement.addRow(r.parentElement.rowIndex+("b"==u[2]?1:0),{height:bw19140,backgroundColor:"#aaa",cursor:"row-resize"}).addCell(-1,{boxSizing:"border-box"},{ondragstart:function(){l=this.rObj.children[0].style.display,this.rObj.children[0]&&(this.rObj.children[0].style.display="none")},ondragend:function(){this.rObj.style.height=this.rObj.offsetHeight+event.offsetY*this._rr,this.rObj.children[0]&&(this.rObj.children[0].style.display=l),s.afterResize&&s.afterResize()},draggable:!0,rObj:r,_rr:"t"==u[2]?-1:1})}if(("l"==u[2]||"r"==u[2])&&1==a)r.parentElement.addCell(r.cellIndex+("r"==u[2]?1:0),{width:bw19140,backgroundColor:"#aaa",cursor:"col-resize",boxSizing:"border-box"},{draggable:!0,ondragstart:function(){l=this.rObj.children[0].style.display,this.rObj.children[0]&&(this.rObj.children[0].style.display="none")},ondragend:function(){this.rObj.style.width=this.rObj.offsetWidth+event.offsetX*this._rr,this.rObj.children[0]&&(this.rObj.children[0].style.display=l),s.afterResize&&s.afterResize()},rObj:r,_rr:"l"==u[2]?-1:1})}r.myFrm(u[0],0,s,i)}else{r.css(i?{backgroundColor:gColor(cs19140++,.6),backgroundRepeat:"no-repeat",backgroundSize:"100% 155",backgroundImage:`url(/svcn/svg_text?${t})`}:{},{});var g=t,L=r;if("_"==t[0])g=t.substring(1),r._size||(r.style.width=_w_19140(g,-10)),L=r.$css({boxSizing:"border-box",padding:3,borderColor:"transparent",cursor:"pointer",textAlign:"center",verticalAlign:"center",fontSize:12},{innerText:g,_id:g});else if("="==t[0])g=t.substring(1),r._size||(r.style.width=_w_19140(g-14)),r.css({boxSizing:"border-box"}),L=r.son("div:btdiv",{minHeight:26},{innerText:""}),Object.defineProperty(s._fv,g,{configurable:!0,get:()=>L.innerText,set(t){L.innerText=t}}),s._fv["___"+g]=L,s.__[g]=L,g=!1;else if("@"==t[0])g=t.substring(1),r.css({boxSizing:"border-box",fontSize:12}),L=r,Object.defineProperty(s._fv,g,{configurable:!0,get:()=>L.innerText,set(t){L.innerText;L.innerText=t}}),s._fv["___"+g]=L,g=!1;else if("^"==t[0]){r.css({boxSizing:"border-box",minHeight:28,padding:3});var v=(g=t.substring(1)).split("_");g=v[0];var b=v[0];if(!r._size)if(1==v.length){r.style.width=_w_19140(g);var m={}}else if(2==v.length){r.style.width=_w_19140(g,12);m={paddingLeft:20,backgroundImage:`url(/svcn/${v[1]})`,backgroundSize:"20px 20px",backgroundPosition:"5px center",border:"1px solid #AAA",borderRadius:"3px"}}else{m={paddingLeft:20,backgroundImage:`url(/svcn/${v[1]})`,backgroundSize:"16px 16px",backgroundPosition:"center",border:"1px solid #AAA",borderRadius:"3px"};b="",r.title=v[0],r.style.width=v[2]||40}L=r.son("button:pp",Oplus({width:"100%",textAlign:"center",fontSize:12},m),{innerText:b,title:g,onclick:function(){s._fv["_"+g]&&s._fv["_"+g](this)}})}else if("?"==t[0]){r.css({boxSizing:"border-box",padding:3});var y=(g=t.substring(1)).split("_"),x="text";g=y[0],2==y.length&&(x=y[1],g=y[0]),L=r.son("input:pp",{border:"1px solid rgb(0,0,0,0.4)",borderRadius:"4px",padding:5,fontSize:12},{type:x,placeholder:g,__idO:g,onchange:function(){s._fv["_"+this.__idO]&&s._fv["_"+this.__idO](this.value)}}),Object.defineProperty(s._fv,g,{configurable:!0,get:()=>L.value,set(t){var e=L.value;L.value=t,L&&L.onchange&&e!=t&&(L.onchange&&L.onchange(),s._fv["_"+this.__idO]&&s._fv["_"+this.__idO](t))}}),s._fv["___"+g]=L,s.__[g]=L,L._id=g,L._frm=s,g=!1}else if("F"==t[0]||"<"==t[0])g=t.substring(1),r._size||(r.style.width=_w_19140(g,-10)),(L=r.son("input:pp",{padding:5,display:"none"},{type:"file",_id:g,onchange:function(){s._fv["_"+this._id]&&s._fv["_"+this._id](event.target.files)}})).bt=r.son("button:pp",{fontSize:12,textAlign:"center"},{innerText:g,_id:g,onclick:function(){s._fv["_b"+this._id]&&s._fv["_b"+this._id](this)}}),r.css({boxSizing:"border-box",padding:3,color:"#00a",fontSize:12,textAlign:"center"},{onclick:function(){L.click()}}),s._fv["___"+g]=L,s._fv[g]=r,s.__[g]=L,g=!1;else if("%"==t[0])r.css({boxSizing:"border-box",padding:3,position:"relative"}),g=t.substring(1),(L=r.son("input:pp",{position:"absolute",top:0,left:0},{_id:g,type:"range",oninput:function(){s._fv[this._id]=this.value}})).vl=r.son("div",{position:"absolute",width:"100%",height:"100%",opacity:.8,left:0,bottom:0,textShadow:"\n -1px -1px 0 #000,\n 1px -1px 0 #000,\n -1px 1px 0 #000,\n 1px 1px 0 #000\n ",color:"#FAA",textAlign:"left",zIndex:2,pointerEvents:"none",display:"flex",alignItems:"center",justifyContent:"center",fontFamily:"monospace",userSelect:"none",fontSize:16},{}),p=0,f=g,Object.defineProperty(s._fv,g,{configurable:!0,get:()=>p,set(t){p=t,L.value=t,L.vl.innerText=t,s._fv["_"+f]&&s._fv["_"+f](t)}}),s._fv[g]=L.value,s._fv["___"+g]=L,s.__[g]=L,L._id=g,L._frm=s,g=!1;else if("#"==t[0])r.css({boxSizing:"border-box",padding:3,border:"0px solid rgb(0,0,0,0.4)",borderRadius:"4px"}),g=t.substring(1),L=r.son("textarea:pp",{padding:5,overflow:"auto",fontSize:12},{placeholder:g}),Object.defineProperty(s._fv,g,{configurable:!0,get:()=>L.value,set(t){L.value=t}}),s._fv["___"+g]=L,s.__[g]=L,g=!1;else if("!"==t[0]||"["==t[0])r.css({boxSizing:"border-box",padding:3}),g=t.substring(1),L=myChechGroup(r.son("div:pp",{backgroundColor:"#FFF",border:"1px solid #eee"})),Object.defineProperty(s._fv,g,{configurable:!0,get:()=>L.getVal(),set(t){L.setVal(t)}}),s._fv["___"+g]=L,s.__[g]=L,L._id=g,L._frm=s,g=!1;else if("。"==t[0]||"]"==t[0])r.css({boxSizing:"border-box",padding:3}),g=t.substring(1),L=myRadioGroup(r.son("div:pp",{backgroundColor:"#FFF",border:"1px solid #eee"})),Object.defineProperty(s._fv,g,{configurable:!0,get:()=>L.getVal(),set(t){L.setVal(t)}}),s._fv["___"+g]=L,s.__[g]=L,L._id=g,L._frm=s,g=!1;else if(t[0]==String.fromCharCode(36))r.css({boxSizing:"border-box",padding:3}),g=t.substring(1),L=r.son("select:pp",{padding:3,borderRadius:"4px",border:"1px solid rgb(0,0,0,0.4)"},{_oon:g,onchange:function(){var t="_"+this._oon,e=this.value,n=this.options[this.selectedIndex].text;s._fv[t]&&s._fv[t](e,n)}}),Object.defineProperty(s._fv,g,{configurable:!0,get:()=>L.value,set(t){L.value=t}}),s._fv["___"+g]=L,s.__[g]=L,L._id=g,L._frm=s,g=!1;else if("!"==t[0]){var w=(g=t.substring(1)).split("_");g=w[0];var D=w.length>1?w[1]:g;i="";r._size||(r.style.width=_w_19140(D,12));let e=r.son("div",{boxSizing:"border-box",padding:3,display:"flex",alignItems:"center",justifyContent:"start"});if(L=e.son("input",{fontSize:12},{type:"checkbox"}),w.length<2)e.son("label",{userSelect:"none",fontSize:12,verticalAlign:"middle"},{textContent:D,for:L,onclick:function(){L.click()}});Object.defineProperty(s._fv,g,{configurable:!0,get:()=>L.checked,set(t){L.checked=t}}),s._fv["___"+g]=L,s.__[g]=L,L._id=g,L._frm=s,g=!1}else if("&"==t[0]){w=(g=t.substring(1)).split("_");g=w[0];D=w.length>1?w[1]:g,i="";let e=r.son("div",{boxSizing:"border-box",padding:3,display:"flex",alignItems:"center",justifyContent:"start"});L=e.son("input",{fontSize:12},{type:"checkbox"}),Object.defineProperty(s._fv,g,{configurable:!0,get:()=>L.checked,set(t){L.checked=t}}),s._fv["___"+g]=L,s.__[g]=L,L._id=g,L._frm=s,g=!1}else if("."==t[0])g=t.substring(1),L=r.son("div:ydiv",{},{}),s._fv[g]=L,g=!1;else if(">"==t[0]){w=(g=t.substring(1)).split("_");g=w[0];D=w.length>1?w[1]:g,i="";r._size||(r.style.width=_w_19140(D,12)),L=r.son("div"+i,{textAlign:"left",paddingLeft:28,backgroundImage:thatfsvg,backgroundRepeat:"no-repeat",backgroundPosition:"4px center",backgroundSize:"24px 24px",fontSize:12},{_id:g,innerText:D,onclick:function(){s._fv[this._id]=!s._fv[this._id]}}),function(){var t=!1,e=g;Object.defineProperty(s._fv,g,{configurable:!0,get:()=>t,set(n){t=n,L.style.backgroundImage=n?thattsvg:thatfsvg,s._fv["_"+e]&&s._fv["_"+e](n)}})}(),s._fv[g]=!1,g=!1}else"~"==t[0]?(g=t.substring(1),r.css({boxSizing:"border-box",padding:3}),r._size||(r.style.width=_w_19140(g)),L=r.son("div:pp",{border:"1px inset #888",backgroundColor:"#eee",color:"#000",boxSizing:"border-box",fontSize:12,cursor:"pointer",borderRadius:"2px",display:"inline-flex",textAlign:"center",alignItems:"center",justifyContent:"center",cursor:"pointer",userSelect:"none"},{_dis:!1,innerText:g}),Object.defineProperty(L,"disabled",{get:function(){return this._dis},set:function(t){this._dis=t,this._dis?(this.$css({color:"#AAA",border:"1px solid #AAA"}),this.clickH=this.onclick,this.onclick=function(){event.stopPropagation(),event.preventDefault()}):(this.$css({color:"#000",border:"1px solid #000"}),this.onclick=function(){})}})):(g=t,r.$css({fontSize:12},{}));g&&(s._fv[g]=L)}return r},HTMLElement.prototype.vixFrame=HTMLElement.prototype.myFrm,vixTabPage=myTabBar,myStage=function(t,e){var n=t.son("div:pp",Oplus({position:"relative",overflow:"hidden"},e));return n._3D(),n.walls={},n.oneWall=function(t,e,n){return this.walls[t]=this.son("div:pp",Oplus({backgroundColor:"#f00",position:"absolute",top:0,left:0,zIndex:10,overflow:"hidden"},n),{posOrg:e,init:function(){this.Fly(e)},open:function(t){this.Fly({x:0,y:0,x:0,rX:0,rY:0,rZ:0,sX:1,sY:1,sZ:1},T||500)},close:function(t){this.Fly(this.posOrg,t||500)}})},n},HTMLElement.prototype.myDoc=function(t){return myDoc(this,t)},HTMLElement.prototype.myKV=function(t,e,n,i,o){var r=t.split(",");this.style.verticalAlign="top";var s=this._tb=this.son("table:eetb"),a=this;function l(t){32==t.keyCode&&t.preventDefault()}return a._kv=a.$={},r.forEach((function(t){var e=t.split(":");1==e.length&&(e[1]=t);var r=s.addRow(-1,o||{});a.$[e[1]]=r.addCell(-1,Oplus({backgroundColor:"#ddd",padding:8,width:"30%",textAlign:"right",border:"1px solid #aaa"},n),{innerText:e[0]}),a.$[e[1]].o=r.addCell(-1,Oplus({backgroundColor:"#FFE",padding:8,textAlign:"left",border:"1px solid #aaa"},i),{contentEditable:!0,onkeypress:l})})),Object.defineProperty(a,"$",{set:t=>{for(var e in t)this._kv[e].o.innerText=t[e]},get:()=>{var t={};for(var e in this._kv)t[e]=this._kv[e].o.innerText;return t}}),e&&(a.$=e),a},HTMLElement.prototype.myHTML=function(t){this.innerHTML=t,this._ev={};var e=this;return this.chsEval((function(t){if(t.id)if("_"==t.id.substr(0,1)&&0==t.children.length){switch(t.tagName+(t.type||"")){case"TD":case"SPAN":e._ev[t.id]={vl:t.innerText,o:t,get v(){return this.vl},set v(t){this.vl=t,this.o.innerText=t}};break;case"INPUTcheckbox":case"INPUTradio":e._ev[t.id]={vl:t.value,o:t,get v(){return this.o.checked},set v(t){this.vl=t,this.o.checked=t}};break;case"INPUTtext":case"INPUTradio":case"INPUTrange":case"INPUTradio":case"TEXTAREAtextarea":e._ev[t.id]={vl:t.value,o:t,get v(){return this.o.value},set v(t){this.vl=t,this.o.value=t}}}}else e._ev[t.id]=t})),this.$=this._ev,this},HTMLElement.prototype.$HTML=function(t){this.innerHTML=t,this._ev={},this._eo={},this._em={},this._ch={},this._deb=800;var e,n=this;return this.chsEval=function(t){this.querySelectorAll("*").forEach(t)},this.chsEval((function(t){if(t.id)if(t._id=t.id,t.id.startsWith("_")){let e=(t.tagName+(t.type||"")).toLowerCase();switch(e){case"td":case"span":Object.defineProperty(n._ev,t.id,{get:function(){return t.innerText},set:function(e){t.innerText=e},enumerable:!0}),n._eo[t.id]=t;break;case"inputcheckbox":case"inputradio":Object.defineProperty(n._ev,t.id,{get:function(){return t.checked},set:function(e){t.checked=e},enumerable:!0}),n._eo[t.id]=t;break;case"inputtext":case"inputnumber":case"inputdate":case"inputsearch":case"inputurl":case"input":case"inputrange":case"textareatextarea":case"selectselect-one":Object.defineProperty(n._ev,t.id,{get:function(){return t.value},set:function(e){t.value=e},enumerable:!0}),n._eo[t.id]=t;break;default:console.log("未处理类型:"+e),$clog("$HTML:"+e)}t.removeAttribute("id")}else t.id.startsWith("-")?(n._em[t.id.substring(1)]=t,t.removeAttribute("id")):n._em[t.id]=t})),this.$=this._ev,Object.defineProperty(this,"jv",{get:function(){let t={};return Object.keys(this._ev).forEach((e=>{let n=Object.getOwnPropertyDescriptor(this._ev,e);n&&n.get&&(t[e]=n.get.call(this._ev))})),t},set:function(t){Object.keys(t).forEach((e=>{let n=Object.getOwnPropertyDescriptor(this._ev,e);n&&n.set?n.set.call(this._ev,t[e]):this._ev[e]=t[e]}))}}),this.addEventListener("input",(function(t){clearTimeout(e),e=setTimeout((function(){const e=t.target;if(e._id&&n._ch[e._id]){let t=Object.getOwnPropertyDescriptor(n._ev,e._id);if(t&&t.get){let i=t.get.call(n._ev);n._ch[e._id](i,e)}}}),n._deb)})),this.addEventListener("click",(function(t){const e=t.target;e._id&&n._ch[e._id+"_click"]&&n._ch[e._id+"_click"](e)})),this};class SVGMover{constructor(t,e="red",n=0,i=1e3,o=0){this.parent=t,this.color=e,this.dir=n,this.duration=i,this.svg=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.svg.style.width="100%",this.svg.style.height="100%",this.parent.appendChild(this.svg),this._setupTemplateCircle(),o>0&&setInterval((()=>{this.flow()}),o)}_setupTemplateCircle(){const t=(Math.min(this.parent.clientWidth,this.parent.clientHeight)-4)/2;switch(this.templateCircle=document.createElementNS("http://www.w3.org/2000/svg","circle"),this.templateCircle.setAttribute("r",t),this.templateCircle.setAttribute("fill",this.color),this.templateAnimate=document.createElementNS("http://www.w3.org/2000/svg","animate"),this.templateAnimate.setAttribute("attributeName","cy"),this.templateAnimate.setAttribute("dur",`${this.duration}ms`),this.templateAnimate.setAttribute("fill","freeze"),this.dir){case 0:this.templateCircle.setAttribute("cx","50%"),this.templateCircle.setAttribute("cy",`-${t}`),this.templateAnimate.setAttribute("from",`-${t}`),this.templateAnimate.setAttribute("to",`${this.parent.clientHeight+t}`);break;case 1:this.templateCircle.setAttribute("cx","50%"),this.templateCircle.setAttribute("cy",`${this.parent.clientHeight+t}`),this.templateAnimate.setAttribute("from",`${this.parent.clientHeight+t}`),this.templateAnimate.setAttribute("to",`-${t}`);break;case 2:this.templateCircle.setAttribute("cy","50%"),this.templateCircle.setAttribute("cx",`-${t}`),this.templateAnimate.setAttribute("attributeName","cx"),this.templateAnimate.setAttribute("from",`-${t}`),this.templateAnimate.setAttribute("to",`${this.parent.clientWidth+t}`);break;case 3:this.templateCircle.setAttribute("cy","50%"),this.templateCircle.setAttribute("cx",`${this.parent.clientWidth+t}`),this.templateAnimate.setAttribute("attributeName","cx"),this.templateAnimate.setAttribute("from",`${this.parent.clientWidth+t}`),this.templateAnimate.setAttribute("to",`-${t}`)}}flow(){const t=this.templateCircle.cloneNode(!0),e=this.templateAnimate.cloneNode(!0);e.addEventListener("endEvent",(()=>{t.remove()})),t.appendChild(e),this.svg.appendChild(t),e.beginElement()}}function debounce(t,e,n){let i;return function(...o){const r=this;"function"==typeof e&&e.apply(r,o);clearTimeout(i),i=setTimeout((()=>{clearTimeout(i),"function"==typeof n&&n.apply(r,o)}),t)}}function popBox(t,e,n,i){return document.body.son("div",{position:"absolute",visibility:"hidden",zIndex:n||3e3,backgroundColor:"rgb(200,200,200,0)",boxSizing:"border-box"},{pini:i,popup:function(t,e,n){this.e=t;var i=t.getBoundingClientRect();this.style.visibility="visible",this.style.width=i.width+20,this.style.height=i.height+20,this.css({left:i.x-10,top:i.y-10,visibility:"visible",width:i.width+20,height:i.height+20}),this._ev.m.css({width:i.width,height:i.height}),document.body.offsetWidth-i.right>this.b.offsetWidth?(this.b.style.right=null,this.b.style.left=i.width-10,this._ev.l.style.width=20,this._ev.r.style.width=1):(this.b.style.left=null,this.b.style.right=i.width-10,this._ev.l.style.width=1,this._ev.r.style.width=20),i.y
"),this.c=this._ev.c,this.b=this._ev.bb,this.b.css({width:t||320,height:e||240})}})}function VIXList1(t,n,i,o){var r,s={};r=t||document.body,s.p=r,r.css({overflow:"auto",padding:0}),s.l=r.son("div",{width:"100%",overflow:"auto",height:"100%",border:"0px solid #cde",boxSizing:"border-box",margin:0}),o&&s.l.css(o),s.cols={},s.fid=10918;var a=baseTable(s.l);return s.div=a,s.data=[],a.data={},s.rData=a.data,a.activeRow=!1,s._aId=a.activeRow,s.rows={},s.css0=n||{borderLeft:"1px solid #eee",borderTop:"1px solid #eee",borderRight:"1px solid #eee",userSelect:"none",boxSizing:"border-box",borderBottom:"1px solid #eee"},s.cssa=i||{borderLeft:"1px solid #eee",borderTop:"1px solid #eee",borderRight:"1px solid #eee",userSelect:"text",borderBottom:"1px solid #F00"},s.loadData=function(t,e,n,i){s._aId=!1,myGetS(t,e||[],(function(t){s.data=t,t.forEach((function(t){a.addOne(t,n)})),i&&i(s.data)}),!0)},s.addOne=a.addOne=function(t,e,n){var i={};return(i=a.data[t.id]?this.rows[t.id]:a.addRow(n||-1,{},{_id:t.id,_data:t,onclick:function(){var t="";try{t=event.srcElement.getAttribute("_cind")}catch(t){}s._aId=this._id,s._aData=this._data,s._aCell=this,a.__selectRow(this._id,this,event.srcElement,t,this._data)}}).addCell(-1,s.css0,{_vixType:"LIST1TD"}))||console.log("id不唯一引起10919"),i._list=s,t.c=i,s.rows[t.id]=i,t._e=i,e?e(t,i):i.innerText=t.id,a.data[t.id]={d:t,o:i},i},s.clearAll=function(){a.clc(),a.activeRow=!1,s._aId=!1,a.data={},s.rows={},s.data=[]},s.__selectRow=a.__selectRow=function(t,n,i,o){if(!n)i=(n=a.data[t].o).r("0000");if(s.cols[o]&&s.cols[o].onclick0&&s.cols[o].onclick0(t,n,i,o),a.activeRow==t)try{s.onRowSelect(t,n,i,o)}catch(t){}else{if(a.activeRow){a.data[a.activeRow].o.css(s.css0);try{for(var r=a.data[a.activeRow].o.r("000"),l=0;l__"+r[1]+"__",n+=''+r[0]+"",i[r[1]]={id:o,name:r[1],label:r[0]})})),e+="",n+="",this.cols=i,this.hTem=" "+n+"
",this.rTem=" "+e+"
",[e,n,i]},s.cellx=function(t,e){return s.rows[t].r("000"+s.cols[e].id)},s.rEval=function(t){for(var e in s.rows)t(e,s.rows[e],s.rows[e].parentElement._data)},s}class myCGroup{constructor(t,e="AAA|0,BBB|b,CCC,DDD|d",n={}){this.container=t,this.itemDelimiter=n.itemDelimiter||",",this.valueDelimiter=n.valueDelimiter||"|",this.items={},this.itemFloat=n.float||"left",this.readonly=n.readonly||!1,this.selectedItems=new Set,this.options=n,this.fsvg=svgURL(''),this.tsvg=svgURL(''),this.parseItems(e),this.renderItems()}parseItems(t){this.items={},t.split(this.itemDelimiter).forEach((t=>{const[e,n=e]=t.split(this.valueDelimiter).map((t=>t.trim()));this.items[n]={label:e,value:n}}))}renderItems(){this.container.innerHTML="",Object.values(this.items).forEach((t=>{const e=this.selectedItems.has(t.value);this.container.son("div",{cursor:"pointer",padding:"5px 5px 5px 25px",margin:"5px",borderRadius:"5px",float:this.itemFloat,border:"1px solid #DDD",backgroundImage:e?this.tsvg:this.fsvg,backgroundRepeat:"no-repeat",backgroundPosition:"left center",backgroundSize:"20px 20px",backgroundColor:e?"rgb(0, 255, 0, 0.2)":""},{innerText:t.label,onclick:()=>this.toggleItem(t.value)})}))}toggleItem(t){this.readonly||(this.selectedItems.has(t)?this.selectedItems.delete(t):this.selectedItems.add(t),this.renderItems(),this.onInput(),this.onItemInput(t,this.selectedItems.has(t)))}onInput(){console.log("Selected items:",this.value)}onItemInput(t,e){console.log("Item selected:",t+":"+e)}get value(){return Array.from(this.selectedItems).join(this.itemDelimiter)}set value(t){const e=t.split(this.itemDelimiter).filter((t=>void 0!==this.items[t]));this.selectedItems=new Set(e),this.renderItems()}setItems(t){this.parseItems(t),this.selectedItems.clear(),this.renderItems()}}class myRGroup{constructor(t,e="AAA|0,BBB|1,CCC|2",n={}){this.container=t,this.itemDelimiter=n.itemDelimiter||",",this.valueDelimiter=n.valueDelimiter||"|",this.items={},this.itemFloat=n.float||"left",this.readonly=n.readonly||!1,this.selectedItem=null,this.options=n,this.fsvg=svgURL(''),this.tsvg=svgURL(''),this.parseItems(e),this.renderItems()}parseItems(t){(Array.isArray(t)?t:t.split(this.itemDelimiter)).forEach((t=>{const[e,n=e]=t.split(this.valueDelimiter).map((t=>t.trim()));this.items[n]={label:e,value:n}}))}renderItems(){this.container.innerHTML="",Object.values(this.items).forEach((t=>{const e=this.selectedItem===t.value;this.container.son("div",{cursor:"pointer",padding:"5px 5px 5px 25px",float:this.itemFloat,margin:"5px",borderRadius:"5px",backgroundImage:this.fsvg,backgroundRepeat:"no-repeat",backgroundPosition:"left center",backgroundSize:"20px 20px",backgroundImage:e?this.tsvg:this.fsvg},{innerText:t.label,onclick:()=>{this.selectItem(t.value)}})}))}selectItem(t){this.readonly||(this.selectedItem=t,this.updateItems(),this.onItemInput(t,this.selectedItem===t),this.onInput())}updateItems(){Array.from(this.container.children).forEach((t=>{let e=null;for(let n in this.items)if(this.items[n].label===t.innerText){e=this.items[n].value;break}t.style.backgroundImage=this.selectedItem===e?this.tsvg:this.fsvg}))}onInput(){console.log("Selected item:",this.value)}onItemInput(t,e){console.log("Item selected:",t+":"+e)}get value(){return this.selectedItem}set value(t){if(!Object.keys(this.items).includes(t))throw new Error(`myRGroup--\x3eValue "${t}" is not a valid item.`);this.selectedItem=t,this.updateItems(),this.onInput()}updateItemsInput(t){this.parseItems(t),this.renderItems()}}class vColorPicker{constructor(t,e,n={v:!1}){this.container=t,this.colors=e.split(","),this.canvas=document.createElement("canvas"),this.orientation=n.v,this.canvas.width=this.container.clientWidth,this.canvas.height=this.container.clientHeight,this.container.appendChild(this.canvas),this.ctx=this.canvas.getContext("2d"),this.drawGradient(),this.setupEvents(),this.isTracking=!1}drawGradient(){let t;t=this.orientation?this.ctx.createLinearGradient(0,0,0,this.canvas.height):this.ctx.createLinearGradient(0,0,this.canvas.width,0),this.colors.forEach(((e,n)=>{t.addColorStop(n/(this.colors.length-1),e)})),this.ctx.fillStyle=t,this.ctx.fillRect(0,0,this.canvas.width,this.canvas.height)}setupEvents(){this.canvas.addEventListener("mousedown",this.startTracking.bind(this)),this.canvas.addEventListener("mousemove",this.trackColor.bind(this)),this.canvas.addEventListener("mouseup",this.stopTracking.bind(this)),this.canvas.addEventListener("mouseleave",this.stopTracking.bind(this)),this.canvas.addEventListener("touchstart",this.startTracking.bind(this)),this.canvas.addEventListener("touchmove",this.trackColor.bind(this)),this.canvas.addEventListener("touchend",this.stopTracking.bind(this)),this.canvas.addEventListener("touchcancel",this.stopTracking.bind(this))}startTracking(t){this.isTracking=!0,this.trackColor(t)}stopTracking(t){this.isTracking=!1}rgbToHex(t,e,n){return"#"+[t,e,n].map((t=>{const e=t.toString(16);return 1===e.length?"0"+e:e})).join("")}trackColor(t){if(!this.isTracking)return;let e,n;if(t.preventDefault(),t.type.startsWith("touch")){if(0===t.touches.length)return void(this.isInsideCanvas=!1);e=t.touches[0].clientX,n=t.touches[0].clientY}else e=t.clientX,n=t.clientY;let i=this.canvas.getBoundingClientRect(),o=e-i.left,r=n-i.top;if(this.isInsideCanvas=o>=0&&r>=0&&o<=i.width&&r<=i.height,this.isInsideCanvas){let t=this.ctx.getImageData(o,r,1,1).data,e=`rgb(${t[0]}, ${t[1]}, ${t[2]})`,n=this.rgbToHex(t[0],t[1],t[2]);this.onColor&&this.onColor(e,n)}}onColor(t){console.log("Selected Color:",t)}} class CanvasDrawer { constructor(targetElement, color = '#000', width = 1, opacity = 0.6) { const rect = targetElement.getBoundingClientRect(); // 主画布 this.canvas = document.createElement('canvas'); this.canvas.width = rect.width; this.canvas.height = rect.height; this.canvas.style.position = 'absolute'; this.canvas.style.left = `${targetElement.offsetLeft}px`; this.canvas.style.top = `${targetElement.offsetTop}px`; this.canvas.style.zIndex = 50; targetElement.parentNode.appendChild(this.canvas); this.ctx = this.canvas.getContext('2d'); // 附画布 this.overlayCanvas = document.createElement('canvas'); this.overlayCanvas.width = rect.width; this.overlayCanvas.height = rect.height; this.overlayCanvas.style.position = 'absolute'; this.overlayCanvas.style.left = `${targetElement.offsetLeft}px`; this.overlayCanvas.style.top = `${targetElement.offsetTop}px`; this.overlayCanvas.style.zIndex = 51; targetElement.parentNode.appendChild(this.overlayCanvas); this.overlayCtx = this.overlayCanvas.getContext('2d'); // 绘制属性 this.color = color; this.width = width; this.opacity = opacity; this.painting = false; this.activeTool = null; this.startX = 0; this.startY = 0; // 历史栈 this.undoStack = []; this.redoStack = []; // 保存初始状态 this.saveState(); this.initCanvasEvents(); } initCanvasEvents() { this.overlayCanvas.addEventListener('mousedown', (e) => this.startPosition(e)); this.overlayCanvas.addEventListener('mouseup', (e) => this.endPosition(e)); this.overlayCanvas.addEventListener('mousemove', (e) => this.mouseMove(e)); this.overlayCanvas.addEventListener('touchstart', (e) => this.startPosition(e)); this.overlayCanvas.addEventListener('touchend', (e) => this.endPosition(e)); this.overlayCanvas.addEventListener('touchmove', (e) => { e.preventDefault(); this.mouseMove(e); }); } setOpacity(opacity) { this.opacity = opacity; } getOpacity() { return this.opacity; } setFillColor(fillColor) { this.fillColor = fillColor; } // 保存当前状态到undoStack saveState() { this.undoStack.push(this.canvas.toDataURL()); this.redoStack = []; } // 恢复特定状态 restoreState(dataURL) { const img = new Image(); img.src = dataURL; img.onload = () => { this.ctx.clearRect(0, 0, this.canvas.width, this.canvas.height); this.ctx.drawImage(img, 0, 0, this.canvas.width, this.canvas.height); }; } undo() { if (this.undoStack.length > 1) { // 确保至少有一个状态在栈中 // 将当前状态推入 redoStack this.redoStack.push(this.undoStack.pop()); // 恢复到上一个状态 const previousState = this.undoStack[this.undoStack.length - 1]; this.restoreState(previousState); } } redo() { if (this.redoStack.length > 0) { // 将当前状态推入 undoStack this.undoStack.push(this.redoStack.pop()); // 恢复 redoStack 中的状态 const nextState = this.undoStack[this.undoStack.length - 1]; this.restoreState(nextState); } } startPosition(e) { this.painting = true; const pos = this.getXY(e); this.startX = pos.x; this.startY = pos.y; // 清除附画布,准备新的绘制 this.overlayCtx.clearRect(0, 0, this.overlayCanvas.width, this.overlayCanvas.height); this.overlayCtx.globalAlpha = this.opacity; this.overlayCtx.lineWidth = this.width; this.overlayCtx.strokeStyle = this.color; this.overlayCtx.fillStyle = this.fillColor; if (this.activeTool === 'solidPen' || this.activeTool === 'brush') { this.overlayCtx.beginPath(); this.overlayCtx.moveTo(this.startX, this.startY); } } endPosition(e) { if (!this.painting) return; this.painting = false; // 将附画布内容合并到主画布 this.ctx.drawImage(this.overlayCanvas, 0, 0); // 保存主画布状态到历史栈 this.saveState(); // 清除附画布内容 this.overlayCtx.clearRect(0, 0, this.overlayCanvas.width, this.overlayCanvas.height); } mouseMove(e) { if (!this.painting) return; const pos = this.getXY(e); this.overlayCtx.clearRect(0, 0, this.overlayCanvas.width, this.overlayCanvas.height); if (this.activeTool === 'solidPen' || this.activeTool === 'brush') { this.draw(this.overlayCtx, pos.x, pos.y); } else if (this.activeTool === 'line') { this.drawLine(this.overlayCtx, this.startX, this.startY, pos.x, pos.y); } else if (this.activeTool === 'rect') { this.drawRect(this.overlayCtx, this.startX, this.startY, pos.x - this.startX, pos.y - this.startY); } else if (this.activeTool === 'ellipse') { this.drawEllipse(this.overlayCtx, this.startX, this.startY, pos.x, pos.y); } } draw(ctx, x, y) { // 设置通用绘制属性 ctx.globalAlpha = this.opacity; ctx.lineCap = 'round'; ctx.strokeStyle = this.color; // 根据不同工具类型设置特定属性 if (this.activeTool === 'solidPen') { ctx.lineWidth = this.width; ctx.shadowBlur = 0; // 无阴影 ctx.shadowColor = ''; // 无阴影颜色 } else if (this.activeTool === 'brush') { ctx.lineWidth = this.width * 3; // 更宽的线条 ctx.shadowBlur = 10; // 模糊阴影效果 ctx.shadowColor = this.color; // 阴影颜色与笔刷颜色一致 } // 执行绘制 ctx.lineTo(x, y); ctx.stroke(); } /* draw(ctx, x, y) { ctx.lineTo(x, y); ctx.stroke(); } */ drawLine(ctx, x1, y1, x2, y2) { ctx.beginPath(); ctx.moveTo(x1, y1); ctx.lineTo(x2, y2); ctx.stroke(); } drawRect(ctx, x, y, width, height) { ctx.beginPath(); ctx.rect(x, y, width, height); ctx.stroke(); if (this.fillColor) { ctx.fill(); } } drawEllipse(ctx, x1, y1, x2, y2) { const radiusX = Math.abs(x2 - x1) / 2; const radiusY = Math.abs(y2 - y1) / 2; const centerX = (x1 + x2) / 2; const centerY = (y1 + y2) / 2; ctx.beginPath(); ctx.ellipse(centerX, centerY, radiusX, radiusY, 0, 0, 2 * Math.PI); ctx.stroke(); if (this.fillColor) { ctx.fill(); } } setTool(tool) { this.activeTool = tool; } setColor(color) { this.color = color; } setWidth(width) { this.width = width; } clearCanvas() { this.saveState(); this.ctx.clearRect(0, 0, this.canvas.width, this.canvas.height); } saveDrawing() { const dataURL = this.canvas.toDataURL('image/png'); const link = document.createElement('a'); link.href = dataURL; link.download = 'drawing.png'; link.click(); } getXY(e) { const rect = this.canvas.getBoundingClientRect(); if (e.touches && e.touches.length > 0) { return { x: e.touches[0].clientX - rect.left, y: e.touches[0].clientY - rect.top }; } else { return { x: e.clientX - rect.left, y: e.clientY - rect.top }; } } } /*===========
3071:CanvasDrawer
===================*/ HTMLElement.prototype.dsvgForm=function(svgCode,ecss){ var that=this; that.clc(); that.$={}; that._={}; ecss=OPlus({ //backgroundColor:'#transparent', //border:'1px solid rgb(0,0,0,0.1)', borderRadius:'4px', padding:4, fontSize:12, },ecss) Object.defineProperty(that, 'J', { get() { // 获取对象的所有属性名,包括不可枚举的属性 let obj = {}; let keys = Object.getOwnPropertyNames(that.$); //console.log(keys) keys.forEach(key => { // 使用getter获取属性值 obj[key] = that.$[key]; }); return obj; }, set(jsonString) { try { let data = JSON.parse(jsonString); for (let key in data) { if (Object.prototype.hasOwnProperty.call(data, key)) { that.$[key] = data[key]; } } } catch (e) { console.error('Invalid JSON string:', e); } }, configurable: true }); var svg=this.css({ //border:'0px solid #f00', display:'flex', justifyContent: 'center', }).son('div',{ flexShrink: 0, position:'relative', },{ innerHTML:svgCode, init:function(){ that.pan=this; } }).children[0]; var aShape=false; var aText=false; var rootG=true; function ssun(o){ var t=o; while (t.children[0]) t=t.children[0]; console.log(t) return t; } function scanSvg(o,r,cont){ //console.log(o.tagName) switch(o.tagName){ case 'text': break; case 'g': break; case 'path': //if(o.style.animation) {} var cc=robj(o,'pp').children.length; //console.log(); for(var i=1;i40) svg.setAttribute('height',cc); //console.log(cont.背板); } else if(o.getAttribute("fill")=='#123456') { //console.log(o) o.setAttribute('fill-opacity',0); tran(o,robj(o,'pp1000000'),cont) } else { //console.log(o.r('pp1000000').innerText) var ot=o.r('pp1000000'); if(ot&& ot.innerText&&ot.innerText.startsWith('^')){ ot.innerText=ot.innerText.substring(1); tran(o,ot,cont,'rect') } }; break; default: break; } }; function recurse(n) { scanSvg(n, false,that); for (var i = 0; i < n.childNodes.length; i++) { recurse(n.childNodes.item(i)); } }; //console.log(svg); var results = {_:{},__:{}}; recurse(svg); /* if(aShape) { tran(aShape,aText,that); }; */ function tran(o,ot,cont,sour){ var ttt=ot.innerText.split(':'); var pname=ttt[0]; var p=o.getBBox(); var dx=0;//cont.pan.offsetLeft+2; var dy=0; switch(ttt[1]){ case 'text': case 'password': case 'number': case 'date': case 'time': case 'email': case 'search': case 'color': case 'file': //console.log(cont.pan) cont._[pname]=cont.pan.son('input',OPlus({ position:'absolute', left:p.x+dx, top:p.y+dy, fontSize:12, width:p.width, height:p.height, //backgroundColor:'#FFF', border:"1px solid rgb(0,0,0,0.1)" },ecss),{ type:ttt[1], }); Object.defineProperty(cont.$, pname, { configurable: true, get() { return that._[pname].value; }, set(value) { cont._[pname].value=value; }, }); if(ttt[2]) cont._[pname].placeholder=ttt[2] break case 'select': cont._[pname]=cont.pan.son('select',Oplus({ position:'absolute', left:p.x+dx,//+cont.z.x, top:p.y+dy, width:p.width, height:p.height, fontSize:12, border:'1px solid rgb(0,0,0,0.1)', //borderRadius:'4px', backgroundColor:'#FFF', //opacity:o.previousElementSibling.tagName=='path'?0:0.9, },ecss),{ //type:'text', }) ; Object.defineProperty(cont.$, pname, { configurable: true, get() { return cont._[pname].value; }, set(value) { cont._[pname].value=value; }, }); if(ttt[2]) { //$clog(ttt[2]) cont._[pname].opts(ttt[2]); } break case 'mselect': cont._[pname]=cont.pan.son('button',Oplus({ position:'absolute', left:p.x+dx,//+cont.z.x, top:p.y+dy, width:p.width, textAlign:'left', height:p.height-3, fontSize:12, whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis', display:'inline-block', },ecss),{ invalue:[] //type:'text', }) ; Object.defineProperty(cont.$, pname, { configurable: true, get() { return cont._[pname].invalue; }, set(invalue,value) { cont._[pname].invalue=invalue; cont._[pname].value=value; }, }); /*if(ttt[2]) { //$clog(ttt[2]) cont._[pname].opts(ttt[2]); }*/ break case 'checkbox': case 'radio': //o.setAttribute('fill','transparent'); //o.previousElementSibling.setAttribute('fill','transparent'); cont._[pname]=cont.pan.son('div',{ position:'absolute', left:p.x+dx, top:p.y+dy, fontSize:12, width:p.width, height:p.height, backgroundColor:'#FFF', padding:4, },{}).son('input',{ width:20, height:20, },{ type:ttt[1], }) ; Object.defineProperty(cont.$, pname, { configurable: true, get() { return cont._[pname].checked; }, set(value) { cont._[pname].checked=value; }, }); break; case 'range': //o.setAttribute('fill','transparent'); //o.previousElementSibling.setAttribute('fill','transparent'); cont._[pname]=cont.pan.son('div',{ position:'absolute', left:p.x+dx,//+cont.z.x+1, top:p.y+dy, width:p.width, //padding:'5px 20px 5px 10px', //display:'flex', //alignItems: 'center', height:p.height, border:'1px solid rgb(0,0,0,0.1)', //borderRadius:'4px', backgroundColor:'#FFF', //opacity:o.previousElementSibling.tagName=='path'?0:0.9, },{}).son('input',{ border:'0px solid #0a0', height:15, width:p.width-25, backgroundColor:"#FFF", //margin:'auto 10px 0px 10px', left:10, borderRadius:'0px', position:'absolute', bottom:'5px', },{ type:'range', min:ttt[2]||0, max:ttt[3]||100, step:ttt[4]||1, }) Object.defineProperty(cont.$, pname, { configurable: true, get() { return cont._[pname].value; }, set(value) { cont._[pname].value=value; }, }); break; case 'textarea': cont._[pname]=cont.pan.son('textarea',Oplus({ position:'absolute', left:p.x+dx,//+cont.z.x+1, top:p.y+dy, width:p.width, height:p.height, },ecss),{ }); Object.defineProperty(cont.$, pname, { configurable: true, get() { return cont._[pname].value; }, set(value) { cont._[pname].value=value; }, }); if(ttt[2]) cont._[pname].placeholder=ttt[2] break case 'rg': var c=cont.pan.son('div:eediv',{ position:'absolute', left:p.x+dx,//+cont.z.x+1, top:p.y+dy, width:p.width, height:p.height, backgroundColor:'#FFF', border:'1px solid rgb(0,0,0,0.1)', borderRadius:'4px', //opacity:o.previousElementSibling.tagName=='path'?0:1, },{ }); cont._[pname]=new myRGroup(c,ttt[2]) Object.defineProperty(cont.$, pname, { configurable: true, get() { return cont._[pname].value; }, set(value) { cont._[pname].value=value; }, }); //if(ttt[2]) cont._[pname].placeholder=ttt[2] break case 'cg': var c=cont.pan.son('div:ediv',{ position:'absolute', left:p.x+dx,//+cont.z.x+1, top:p.y+dy, width:p.width, height:p.height, backgroundColor:'#FFF', //backgroundColor:'transparent', border:'1px solid rgb(0,0,0,0.1)', borderRadius:'4px', //opacity:o.previousElementSibling.tagName=='path'?0:1, },{ }); cont._[pname]=new myCGroup(c,ttt[2]) Object.defineProperty(cont.$, pname, { configurable: true, get() { return cont._[pname].value; }, set(value) { cont._[pname].value=value; }, }); //if(ttt[2]) cont._[pname].placeholder=ttt[2] break case 'img': var c=cont.pan.son('div',{ position:'absolute', left:p.x+dx-1,//+cont.z.x+1, top:p.y, width:p.width, height:p.height, backgroundColor:'tranaparent', border:'1px solid rgb(0,0,0,0.1)', borderRadius:'4px', //opacity:o.previousElementSibling.tagName=='path'?0:1, },{ onclick:function(){ if(cont['_'+pname]) { cont['_'+pname](this); } //$clog('缺少定义:_'+pname) } }); cont._[pname]=c.son('img:pp',{},{}) Object.defineProperty(cont.$, pname, { configurable: true, get() { return cont._[pname].src; }, set(value) { cont._[pname].src=value; }, }); //if(ttt[2]) cont._[pname].placeholder=ttt[2] break case 'B': var pathData=o.getAttribute('d'); /*cont._[pname]=*/cont.pan.son('div:hmask',{ position:'absolute', left:p.x+dx,//+cont.z.x+1, top:p.y, width:p.width, height:p.height, //backgroundColor:'rgb(255,0,200,0)', //border:'0px solid rgb(0,0,0,0.1)', borderRadius:'4px', //opacity:o.previousElementSibling.tagName=='path'?0:1, //clipPath:`path('${pathData}')`, //transform:`translate(${p.x}px,${p.y}px)`, },{ onclick:function(){ if(cont['_'+pname]) { cont['_'+pname](this); } else $clog('缺少定义:_'+pname) } }); //cont._[pname]=c.son('img:pp',{},{}) /* Object.defineProperty(cont.$, pname, { configurable: true, get() { return cont._[pname].vvv||1; }, set(value) { cont._[pname].vvv=value; }, }); */ //if(ttt[2]) cont._[pname].placeholder=ttt[2] break case 'button': cont._[pname]=cont.pan.son('button',{ position:'absolute', left:p.x+dx, top:p.y, width:p.width, height:p.height, fontSize:12, },{ innerText:ttt[2]||ttt[0], onclick:function(){ if(cont['_'+pname]) { cont['_'+pname](this); } else $clog('缺少定义:_'+pname) } }); break; case '_': //o.setAttribute('fill','transparent'); //o.previousElementSibling.setAttribute('fill','transparent'); cont._[pname]=cont.pan.son('div',{ position:'absolute', left:p.x+dx,//+cont.z.x+1, top:p.y, width:p.width, fontSize:ttt[2]||12, color:'#F00', height:p.height, backgroundColor:'transparent', //border:'1px solid rgb(0,0,0,0.1)', borderRadius:'4px', display:'flex', justifyContent: 'center', textAlign:'center', alignItems:'center', },{ innerText:'' }) Object.defineProperty(cont.$, pname, { configurable: true, get() { return cont._[pname].innerText; }, set(value) { cont._[pname].innerText=value; }, }); break; case '=': cont._[pname]=ot; console.log(ot); cont._[pname].innerText=ttt[2]||ttt[0] Object.defineProperty(cont.$, pname, { configurable: true, get() { return cont._[pname].innerText; }, set(value) { cont._[pname].innerText=value; }, }); break; defaule: break; } ot.innerText=''; //o.style.display='none'; if(o.getAttribute("fill")=='#123456') o.setAttribute("fill",'transparent') if(ttt[1]!='='){ //o.style.display='none'; } else { //o.style.backgroundColor='transparent'; //o.setAttribute('fill','transparent'); } }; function adjustPathData(pathData, dx, dy) { var commands = pathData.match(/[a-z][^a-z]*/ig); var adjustedCommands = commands.map(command => { var type = command[0]; var values = command.slice(1).trim().split(/[\s,]+/).map(parseFloat); for (var i = 0; i < values.length; i += 2) { values[i] += dx; if (values[i + 1] !== undefined) { values[i + 1] += dy; } } return type + values.join(' '); }); return adjustedCommands.join(' '); } } /*===========
8979:DRAWSVG
===================*/ HTMLElement.prototype.svgForm=function(svgCode,opt){ var that=this; that.clc(); that.$={}; that._={}; that.opt=OPlus({ },opt) Object.defineProperty(that, 'J', { get() { // 获取对象的所有属性名,包括不可枚举的属性 let obj = {}; let keys = Object.getOwnPropertyNames(that.$); //console.log(keys) keys.forEach(key => { // 使用getter获取属性值 obj[key] = that.$[key]; }); return obj; }, set(jsonString) { try { let data = JSON.parse(jsonString); for (let key in data) { if (Object.prototype.hasOwnProperty.call(data, key)) { that.$[key] = data[key]; } } } catch (e) { console.error('Invalid JSON string:', e); } }, configurable: true }); var svg=this.css({ //border:'0px solid #f00', display:'flex', justifyContent: 'center', }).son('div',{ flexShrink: 0, position:'relative', //border:'0px solid rgb(0,0,0,0.05)', //boxShadow:'inset 0px 0px 2px #888', //padding:0, //width:20,height:40 },{ innerHTML:svgCode, init:function(){ that.pan=this; this.setAttribute('dropbg',true) //$clog(this.offsetLeft); } }).children[0]; var aShape=false; var aText=false; var rootG=true; function scanSvg(o,r,cont){ //console.log(o); switch(o.tagName){ case 'text': //console.log(o.textContent) if(aShape){ aText+=o.textContent o.textContent='' //o.style.display='none' o.style.visibility='hidden' } break; case 'rect': if(aShape) { //console.log(aText) tran(aShape,aText,that); }; aShape=false; if(o.getAttribute("fill")=='#654321') { cont.背板=o; cont.背板.setAttribute('fill-opacity',0); var cc=cont.背板.getAttribute('width'); svg.setAttribute('width',cc); cc=cont.背板.getAttribute('height'); if (cc>40) svg.setAttribute('height',cc); //console.log(svg); //r.z=o.getBBox(); } else if(o.getAttribute("fill")=='#123456') { aShape=o; o.style.visibility='hidden' aText=''; }; break; case 'path': if(aShape) { //console.log(aText) tran(aShape,aText,that); }; aShape=false; if(o.getAttribute("fill")=='#654321') { cont.背板=o; cont.背板.setAttribute('fill-opacity',0); cc=cont.背板.getAttribute('width'); svg.setAttribute('width',cc); //r.z=o.getBBox(); } else if(o.getAttribute("fill")=='#123456') { aShape=o; o.style.visibility='hidden' aText=''; }; break; case 'g': if(rootG){rootG=false;o.setAttribute('transform','')}; if(aShape) { //console.log(aText) tran(aShape,aText,that); }; aShape=false; if(o.getAttribute("fill")=='#654321') { cont.背板=o; cont.背板.setAttribute('fill-opacity',0); cc=cont.背板.getAttribute('width'); svg.setAttribute('width',cc); //r.z=o.getBBox(); } else if(o.getAttribute("fill")=='#123456') { aShape=o; o.style.visibility='hidden' aText=''; }; break; default: break; } }; function recurse(n) { scanSvg(n, false,that); for (var i = 0; i < n.childNodes.length; i++) { recurse(n.childNodes.item(i)); } }; //console.log(svg); var results = {_:{},__:{}}; recurse(svg); if(aShape) { tran(aShape,aText,that); }; function tran(o,t,cont){ var ttt=t.split(':'); var pname=ttt[0]; var p=o.getBBox(); //console.log(p); var dx=0;//cont.pan.offsetLeft+2; //$clog([cont.z.x,cont.zz.x]) switch(ttt[1]){ case 'text': case 'password': case 'number': case 'date': case 'time': case 'email': case 'search': case 'color': //console.log(cont.pan) cont._[pname]=cont.pan.son('input',{ position:'absolute', left:p.x+dx, top:p.y, fontSize:12, width:p.width, height:p.height, backgroundColor:'#FFF', border:'1px solid rgb(0,0,0,0.1)', borderRadius:'4px', opacity:o.previousElementSibling.tagName=='path'?0:1, },{ type:ttt[1], }); Object.defineProperty(cont.$, pname, { configurable: true, get() { return that._[pname].value; }, set(value) { cont._[pname].value=value; }, }); if(ttt[2]) cont._[pname].placeholder=ttt[2] break case 'select': cont._[pname]=cont.pan.son('select',{ position:'absolute', left:p.x+dx,//+cont.z.x, top:p.y+1, width:p.width, height:p.height, fontSize:12, backgroundColor:'#FFF', border:'1px solid rgb(0,0,0,0.1)', borderRadius:'4px', opacity:o.previousElementSibling.tagName=='path'?0:0.9, },{ //type:'text', }) ; Object.defineProperty(cont.$, pname, { configurable: true, get() { return cont._[pname].value; }, set(value) { cont._[pname].value=value; }, }); if(ttt[2]) { //$clog(ttt[2]) cont._[pname].opts(ttt[2]); } break case 'check': //o.setAttribute('fill','transparent'); //o.previousElementSibling.setAttribute('fill','transparent'); cont._[pname]=cont.pan.son('div',{ position:'absolute', left:p.x+dx,//+cont.z.x+1, top:p.y+1, display:'flex', alignItems: 'center', width:p.width, height:p.height, backgroundColor:'#Fff', border:'1px solid rgb(0,0,0,0.1)', borderRadius:'4px', opacity:o.previousElementSibling.tagName=='path'?0:0.9, },{}).son('input',{ //position:'absolute', //left:5, //top:5, width:20, height:20, },{ type:'checkbox', }) Object.defineProperty(cont.$, pname, { configurable: true, get() { return cont._[pname].checked; }, set(value) { cont._[pname].checked=value; }, }); break; case 'range': //o.setAttribute('fill','transparent'); //o.previousElementSibling.setAttribute('fill','transparent'); cont._[pname]=cont.pan.son('div',{ position:'absolute', left:p.x+dx,//+cont.z.x+1, top:p.y+1, width:p.width, //padding:'5px 20px 5px 10px', //display:'flex', //alignItems: 'center', height:p.height, backgroundColor:'#FFF', border:'1px solid rgb(0,0,0,0.1)', borderRadius:'4px', opacity:o.previousElementSibling.tagName=='path'?0:0.9, },{}).son('input',{ border:'0px solid #0a0', height:15, width:p.width-25, //backgroundColor:"#ddd", //margin:'auto 10px 0px 10px', left:10, borderRadius:'0px', position:'absolute', bottom:'5px' },{ type:'range', min:ttt[2]||0, max:ttt[3]||100, step:ttt[4]||1, }) Object.defineProperty(cont.$, pname, { configurable: true, get() { return cont._[pname].value; }, set(value) { cont._[pname].value=value; }, }); break; case 'textarea': cont._[pname]=cont.pan.son('textarea',{ position:'absolute', left:p.x+dx,//+cont.z.x+1, top:p.y+1, width:p.width, height:p.height, backgroundColor:'#FFF', border:'1px solid rgb(0,0,0,0.1)', borderRadius:'4px', opacity:o.previousElementSibling.tagName=='path'?0:1, padding:5, fontSize:12, },{ }); Object.defineProperty(cont.$, pname, { configurable: true, get() { return cont._[pname].value; }, set(value) { cont._[pname].value=value; }, }); if(ttt[2]) cont._[pname].placeholder=ttt[2] break case 'rg': var c=cont.pan.son('div:eediv',{ position:'absolute', left:p.x+dx,//+cont.z.x+1, top:p.y+1, width:p.width, height:p.height, backgroundColor:'#FFF', border:'1px solid rgb(0,0,0,0.1)', borderRadius:'4px', opacity:o.previousElementSibling.tagName=='path'?0:1, },{ }); cont._[pname]=new myRGroup(c,ttt[2]) Object.defineProperty(cont.$, pname, { configurable: true, get() { return cont._[pname].value; }, set(value) { cont._[pname].value=value; }, }); //if(ttt[2]) cont._[pname].placeholder=ttt[2] break case 'cg': var c=cont.pan.son('div:ediv',{ position:'absolute', left:p.x+dx,//+cont.z.x+1, top:p.y+1, width:p.width, height:p.height, backgroundColor:'#FFF', border:'1px solid rgb(0,0,0,0.1)', borderRadius:'4px', opacity:o.previousElementSibling.tagName=='path'?0:1, },{ }); cont._[pname]=new myCGroup(c,ttt[2]) Object.defineProperty(cont.$, pname, { configurable: true, get() { return cont._[pname].value; }, set(value) { cont._[pname].value=value; }, }); //if(ttt[2]) cont._[pname].placeholder=ttt[2] break case 'img': var c=cont.pan.son('div',{ position:'absolute', left:p.x+dx-1,//+cont.z.x+1, top:p.y, width:p.width, height:p.height, backgroundColor:'tranaparent', border:'1px solid rgb(0,0,0,0.1)', borderRadius:'4px', opacity:o.previousElementSibling.tagName=='path'?0:1, },{ onclick:function(){ if(cont['_'+pname]) { cont['_'+pname](this); } //$clog('缺少定义:_'+pname) } }); cont._[pname]=c.son('img:pp',{},{}) Object.defineProperty(cont.$, pname, { configurable: true, get() { return cont._[pname].src; }, set(value) { cont._[pname].src=value; }, }); //if(ttt[2]) cont._[pname].placeholder=ttt[2] break case 'B': var pathData=o.getAttribute('d'); cont._[pname]=cont.pan.son('div:hmask',{ position:'absolute', left:p.x+dx-1,//+cont.z.x+1, top:p.y, width:p.width, height:p.height, //backgroundColor:'rgb(255,0,200,0)', border:'0px solid rgb(0,0,0,0.1)', borderRadius:'4px', //opacity:o.previousElementSibling.tagName=='path'?0:1, //clipPath:`path('${pathData}')`, //transform:`translate(${p.x}px,${p.y}px)`, },{ onclick:function(){ if(cont['_'+pname]) { cont['_'+pname](this); } else $clog('缺少定义:_'+pname) } }); //cont._[pname]=c.son('img:pp',{},{}) Object.defineProperty(cont.$, pname, { configurable: true, get() { return cont._[pname].src; }, set(value) { cont._[pname].src=value; }, }); //if(ttt[2]) cont._[pname].placeholder=ttt[2] break case 'button': cont._[pname]=cont.pan.son('button',{ position:'absolute', left:p.x+dx,//+cont.z.x+1, top:p.y+1, width:p.width, //padding:3, height:p.height, border:'1px solid rgb(0,0,0,0.1)', borderRadius:'4px', //opacity:o.previousElementSibling.tagName=='path'?0:0.9, },{ innerText:ttt[2]||ttt[0], onclick:function(){ if(cont['_'+pname]) { cont['_'+pname](this); } else $clog('缺少定义:_'+pname) } }); break; case '_': //o.setAttribute('fill','transparent'); //o.previousElementSibling.setAttribute('fill','transparent'); cont._[pname]=cont.pan.son('div',{ position:'absolute', left:p.x+dx,//+cont.z.x+1, top:p.y, //display:'flex', //alignItems: 'center', width:p.width, fontSize:ttt[2]||12, color:'#F00', height:p.height, backgroundColor:'transparent', //border:'1px solid rgb(0,0,0,0.1)', borderRadius:'4px', display:'flex', justifyContent: 'center', textAlign:'center', alignItems:'center', },{ innerText:'' }) Object.defineProperty(cont.$, pname, { configurable: true, get() { return cont._[pname].innerText; }, set(value) { cont._[pname].innerText=value; }, }); break; case '=': //o.setAttribute('fill','transparent'); //o.previousElementSibling.setAttribute('fill','transparent'); cont._[pname]=cont.pan.son('div:hmask',{ position:'absolute', left:p.x+dx,//+cont.z.x+1, top:p.y, display:'flex', alignItems: 'center', width:p.width, height:p.height, backgroundColor:'#F00', border:'1px solid rgb(0,0,0,0.1)', borderRadius:'4px', //opacity:o.previousElementSibling.tagName=='path'?0:0.9, },{}) Object.defineProperty(cont.$, pname, { configurable: true, get() { return cont._[pname].innerText; }, set(value) { cont._[pname].innerText=value; }, }); break; defaule: break; } o.textContent=''; }; function adjustPathData(pathData, dx, dy) { var commands = pathData.match(/[a-z][^a-z]*/ig); var adjustedCommands = commands.map(command => { var type = command[0]; var values = command.slice(1).trim().split(/[\s,]+/).map(parseFloat); for (var i = 0; i < values.length; i += 2) { values[i] += dx; if (values[i + 1] !== undefined) { values[i + 1] += dy; } } return type + values.join(' '); }); return adjustedCommands.join(' '); } } /*===========
8748:HTMLSVG
===================*/ function myList0(p){ function Text2P(t){ var r=""; t.split('\n').forEach(function(e){ r+='

'+e+'

'; }); return r; }; var imgsrcStack=[];//单线程顺序加载 var action=false; function act(){ if(action) return; action=true; if(imgsrcStack.length==0) {action=false;return}; var c=imgsrcStack.shift(); c[0].src=c[1]; c[0].onload=function(){ $clog("串行加载"); action=false; setTimeout(act,200) //act(); }; }; var observer; //懒加载 observer = new IntersectionObserver((entries, observer) => { entries.forEach(entry => { if (entry.isIntersecting) { //console.log(entry.target._src) const imgElement = entry.target; const src = imgElement._src; // 从 dataset.src 获取图片路径 $clog('惰性加载'); imgElement.src = src; // 设置图片 src,开始加载 observer.unobserve(imgElement); // 加载后取消观察该图片 } }); }); var r=p.son('div:ydiv',{ fontSize:16, border:'0px solid #FFF', },{}).son('table:eetb',{ //border:'3px solid #F00', tableLayout:'fixed' },{ addText(t,c,p2){ return this.addRow().addCell(-1,OPlus({ padding:10, textIndent:'1cm', textAlign:'justify', },c),{ innerHTML:p2?Text2P(t):t }) }, addMD(t,c){ return this.addRow().addCell(-1,OPlus({ padding:10, textIndent:'1cm', textAlign:'justify', },c),{ innerHTML:marked.parse(_tmd_(t)) }) }, addHTML:function(t,c){ return this.addRow().addCell(-1,OPlus({padding:10,},c),{ innerHTML:t }) }, addImg:function(src,c,t){ var cc=this.addRow().addCell(-1); cc.imgx=cc.son('img',OPlus({ width:'100%', minHeight:80, },c),{ src:src, title:t||'img', }); //imgsrcStack.push([imgx,src]); //act(); return cc; }, addOBImg:function(src,c,t){ var cx=this.addRow().addCell(-1); var imgx=cx.son('img',OPlus({ width:'100%' },c),{ _src:src, title:t //dataset:{src:src} }); observer.observe(imgx); return cx; }, addSTImg:function(src,c){ var imgx=this.addRow().addCell(-1).son('img',OPlus({ width:'100%' },c),{ //src:t title:t, }); imgsrcStack.push([imgx,src]); act(); return c; }, addCode:function(t){ return this.addRow().addCell(-1,{ padding:10, }).son('div',{ width:'100%', overflowX:'scroll', }).son('pre',{ width:'auto', //overflowX:'auto', whiteSpace:'pre', },{ innerText:t, }) }, addTitle:function(t,c){ return this.addRow().addCell(-1,OPlus({ backgroundColor:'#EEE', fongSize:20, padding:8, },c),{ innerText:t }) }, addVideo:function(src,f,poster,c){ var v=this.addRow().addCell().son('video',OPlus({ width:'100%',height:'auto' },c),{ src:src, controls:true, //preload:"metadata", //autoplay:true, onloadedmetadata:function(){ this.currentTime=f||0; v.style.height+=50 }, onclick:function(){ this.play(); }, poter:poster||false, }); v.addEventListener('play',function(){ //this.title&&$clog(this.title); if(aVideo&&aVideo!==this) aVideo.pause(); aVideo=this; }) //setVideoPlayWhenCenter(v); return v }, addRNote:function(t,c){ return this.addRow().addCell(-1,OPlus({ //backgroundColor:'#EEE', fontSize:12, fontStyle: 'italic', textAlign:'right', padding:4, backgroundColor:"#eee", borderBottom:'1px solid #aaa', color:'#008' },c),{ innerText:t }) }, add赞助商:function(logo,info){ var v=this.addRow().addCell(); v.myFrm('logo:120*info'); v.$.logo.son('img',{ width:'100%', height:'auto' },{ src:logo }); v.$.info.css({ //backgroundColor:'#F00', fontSize:18, padding:8 },{ innerText:info }) return v }, addUsermVideo(id,u){ var v=this.addRow().addCell().son('div',{position:'relative'}); v.son('img',{ width:'100%', height:'auto', //maskImage:'url(/svcn/1636)', //maskSize:'50px 50px', },{ src:u||`/svcn/gzh_cimgTi?${id}&jtxh`, ssrc:isNaN(id)?id:`/svcn/gzh_cmp4i?${id}&jtxh`, onclick:function(){ pMp4(this.ssrc) } }); v.son('div',{ width:60,height:60,right:10,bottom:10, position:'absolute', backgroundImage:'url(/svcn/8510)', backgroundRepeat:'no-repeat', backgroundPosition:'center center', backgroundSize:'100% 100%', pointerEvents: 'none', //zIndex:10, //opacity:0.5, //boxShadow:'0px 0px 5px #FFF', //backgroundColor:'#F00', }); //('/svcn/1636'); }, addIMGLabel(l,url){ var v=this.addRow().addCell(); return v.IMGLabel(l,url); }, addBiliButton(bvid,cap){ var w=this.offsetWidth-60; var v=this.addRow().addCell(-1,{ textAlign:'left' },{ innerHTML:`` .replace('__BVID__',bvid) .replace('__CAP__',cap) .replace('__WIDTH__',w) }); return v }, addMarq(t,speed,c){ var p=this.addRow().addCell(-1); var createMarquee = function(parent, text,speed,c) { var son = parent.css(OPlus({ whiteSpace: 'nowrap', overflow: 'hidden', display: 'inline-block', position: 'relative', width:'auto' },c),{ innerText: text }); let position = parent.offsetWidth; function animateMarquee() { position -= speed; if (position < -son.offsetWidth) { position = parent.offsetWidth; } son.style.left = `${position}px`; requestAnimationFrame(animateMarquee); } son.style.left = `${position}px`; animateMarquee(); return son; } return createMarquee(p,t,speed,c||{}); }, addApps:function(a,reload){ console.log(a) var apps=a; //if (Array.isArray(a)) { // apps=a.join(','); //}; var that=this; var ds=that.addRow().addCell(-1,{padding:10}); myGetS(2464,[apps],function(x){ x.forEach(function(e){ var dd=ds.son('div',{ width:60,height:80, float:'left', boxShadow:'0px 0px 4px #F00', backgroundImage:`url(/svcn/${e.icon})`, backgroundRepeat:'no-repeat', backgroundPosition:'center 5px', backgroundSize:'60% auto', margin:10, borderRadius:'8px', position:'relative', },{ _id:e.id, //innerText:e.cmdname, reload:reload, onclick:function(){ $clog(this._id) if(this.reload){ ___myFuns.funs[this._id]=false } _r.popFun(this._id) }, init:function(){ this.lb=this.son('span',{ position:'absolute', bottom:2, padding:2, width:'100%',textAlign:'center', fontSize:12, },{ innerText:e.cmdname, }) }, }) }) },true) }, addApp:function(a,b,onclick,reload){ var app=a; //if (Array.isArray(a)) { // apps=a.join(','); //}; var that=this; var ds=that.addRow().addCell(-1,{padding:10}); myGetS(8508,[app],function(x){ b.forEach(function(e){ var dd=ds.son('div',{ width:60,height:80, float:'left', boxShadow:'0px 0px 4px #F00', backgroundImage:`url(/svcn/${x[0].icon})`, backgroundRepeat:'no-repeat', backgroundPosition:'center 5px', backgroundSize:'60% auto', margin:10, borderRadius:'8px', position:'relative', },{ _id:x[0].id, _d:e, //innerText:e.cmdname, reload:reload, onclick:function(){ if(this.reload){ ___myFuns.funs[this._id]=false } //_r.popFun(this._id,e.par) onclick(this) }, init:function(){ this.lb=this.son('span',{ position:'absolute', bottom:2, padding:2, width:'100%',textAlign:'center', fontSize:12, },{ innerText:x[0].cmdname+'-'+e.name, }) }, }) }); },true) }, loadApps:function(a,b,tclick,reload){ var apps=a; if (Array.isArray(a)) { apps=a.join(','); }; var that=this; var ds=that.addRow().addCell(-1,{padding:10}); myGetS(9150,[apps],function(x){ x.forEach(function(e){ var dd=ds.son('div',{ width:60,height:80, float:'left', boxShadow:'0px 0px 4px #F00', backgroundImage:`url(/svcn/${e.icon})`, backgroundRepeat:'no-repeat', backgroundPosition:'center 5px', backgroundSize:'60% auto', margin:10, borderRadius:'8px', position:'relative', },{ _id:e.id, _d:b, //innerText:e.cmdname, reload:reload, onclick:function(){ if(this.reload){ ___myFuns.funs[this._id]=false } tclick(this); // _r.popFun(this._id) }, init:function(){ this.lb=this.son('span',{ position:'absolute', bottom:2, padding:2, width:'100%',textAlign:'center', fontSize:12, },{ innerText:e.cmdname, }) }, }) }) },true) }, load:function(idx){ }, clear:function(){ r.clc(); }, }); return r } /*===========
8449:myList0
===================*/