claude-web/node_modules/vue-grid-layout-v3/dist/vue-grid-layout-v3.cjs

13 lines
104 KiB
JavaScript
Raw Normal View History

2026-02-23 02:23:38 +00:00
/**
* vue-grid-layout-v3 3.1.2
* coffeebi <merfais.bwq@163.com>
* https://github.com/merfais/vue-grid-layout-v3
*/
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});require('./index.css');const y=require("vue"),q={init:ei,document:null,DocumentFragment:null,SVGElement:null,SVGSVGElement:null,SVGElementInstance:null,Element:null,HTMLElement:null,Event:null,Touch:null,PointerEvent:null};function _t(){}function ei(e){const t=e;q.document=t.document,q.DocumentFragment=t.DocumentFragment||_t,q.SVGElement=t.SVGElement||_t,q.SVGSVGElement=t.SVGSVGElement||_t,q.SVGElementInstance=t.SVGElementInstance||_t,q.Element=t.Element||_t,q.HTMLElement=t.HTMLElement||q.Element,q.Event=t.Event,q.Touch=t.Touch||_t,q.PointerEvent=t.PointerEvent||t.MSPointerEvent}var an=e=>!!(e&&e.Window)&&e instanceof e.Window;let cn,ht;function ln(e){cn=e;const t=e.document.createTextNode("");t.ownerDocument!==e.document&&typeof e.wrap=="function"&&e.wrap(t)===t&&(e=e.wrap(e)),ht=e}typeof window<"u"&&window&&ln(window);function zt(e){return an(e)?e:(e.ownerDocument||e).defaultView||ht.window}const ni=e=>e===ht||an(e),ii=e=>ne(e)&&e.nodeType===11,ne=e=>!!e&&typeof e=="object",un=e=>typeof e=="function",ri=e=>typeof e=="number",oi=e=>typeof e=="boolean",si=e=>typeof e=="string",ai=e=>{if(!e||typeof e!="object")return!1;const t=zt(e)||ht;return/object|function/.test(typeof Element)?e instanceof Element||e instanceof t.Element:e.nodeType===1&&typeof e.nodeName=="string"},ci=e=>ne(e)&&!!e.constructor&&/function Object\b/.test(e.constructor.toString()),li=e=>ne(e)&&typeof e.length<"u"&&un(e.splice);var p={window:ni,docFrag:ii,object:ne,func:un,number:ri,bool:oi,string:si,element:ai,plainObject:ci,array:li};const G={init:ui,supportsTouch:null,supportsPointerEvent:null,isIOS7:null,isIOS:null,isIe9:null,isOperaMobile:null,prefixedMatchesSelector:null,pEventTypes:null,wheelEvent:null};function ui(e){const t=q.Element,n=e.navigator||{};G.supportsTouch="ontouchstart"in e||p.func(e.DocumentTouch)&&q.document instanceof e.DocumentTouch,G.supportsPointerEvent=n.pointerEnabled!==!1&&!!q.PointerEvent,G.isIOS=/iP(hone|od|ad)/.test(n.platform),G.isIOS7=/iP(hone|od|ad)/.test(n.platform)&&/OS 7[^\d]/.test(n.appVersion),G.isIe9=/MSIE 9/.test(n.userAgent),G.isOperaMobile=n.appName==="Opera"&&G.supportsTouch&&/Presto/.test(n.userAgent),G.prefixedMatchesSelector="matches"in t.prototype?"matches":"webkitMatchesSelector"in t.prototype?"webkitMatchesSelector":"mozMatchesSelector"in t.prototype?"mozMatchesSelector":"oMatchesSelector"in t.prototype?"oMatchesSelector":"msMatchesSelector",G.pEventTypes=G.supportsPointerEvent?q.PointerEvent===e.MSPointerEvent?{up:"MSPointerUp",down:"MSPointerDown",over:"mouseover",out:"mouseout",move:"MSPointerMove",cancel:"MSPointerCancel"}:{up:"pointerup",down:"pointerdown",over:"pointerover",out:"pointerout",move:"pointermove",cancel:"pointercancel"}:null,G.wheelEvent=q.document&&"onmousewheel"in q.document?"mousewheel":"wheel"}const fn=(e,t)=>{for(const n of t)e.push(n);return e},dn=e=>fn([],e),ie=(e,t)=>{for(let n=0;n<e.length;n++)if(t(e[n],n,e))return n;return-1},Vt=(e,t)=>e[ie(e,t)];function Ot(e){const t={};for(const n in e){const i=e[n];p.plainObject(i)?t[n]=Ot(i):p.array(i)?t[n]=dn(i):t[n]=i}return t}function T(e,t){for(const i in t)e[i]=t[i];return e}let Ae=0,at,xt;function fi(e){if(at=e.requestAnimationFrame,xt=e.cancelAnimationFrame,!at){const t=["ms","moz","webkit","o"];for(const n of t)at=e[`${n}RequestAnimationFrame`],xt=e[`${n}CancelAnimationFrame`]||e[`${n}CancelRequestAnimationFrame`]}at=at&&at.bind(e),xt=xt&&xt.bind(e),at||(at=t=>{const n=Date.now(),i=Math.max(0,16-(n-Ae)),o=e.setTimeout(()=>{t(n+i)},i);return Ae=n+i,o},xt=t=>clearTimeout(t))}var Pt={request:e=>at(e),cancel:e=>xt(e),init:fi};function St(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:o=>!0,i=arguments.length>3?arguments[3]:void 0;if(i=i||{},p.string(e)&&e.search(" ")!==-1&&(e=$e(e)),p.array(e))return e.forEach(o=>St(o,t,n,i)),i;if(p.object(e)&&(t=e,e=""),p.func(t)&&n(e))i[e]=i[e]||[],i[e].push(t);else if(p.array(t))for(const o of t)St(e,o,n,i);else if(p.object(t))for(const o in t){const s=$e(o).map(a=>`${e}$
`},{name:Bt.boxSizing,perform(e){const{element:t}=e;return e.prepared.name==="resize"&&t instanceof q.HTMLElement&&!Rn(t,"boxSizing",/border-box/)},text:'Consider adding CSS "box-sizing: border-box" to this resizable element',getInfo(e){let{element:t}=e;return[t,be.boxSizing]}},{name:Bt.noListeners,perform(e){var t;const n=e.prepared.name;return!(((t=e.interactable)==null?void 0:t.events.types[`${n}move`])||[]).length},getInfo(e){return[e.prepared.name,e.interactable]},text:"There are no listeners set for this action"}];function Rn(e,t,n){const i=e.style[t]||ht.getComputedStyle(e)[t];return n.test((i||"").toString())}function fo(e,t,n){let i=e;for(;p.element(i);){if(Rn(i,t,n))return!0;i=pt(i)}return!1}const ho="dev-tools",po={id:ho,install:uo,listeners:{"interactions:action-start":(e,t)=>{let{interaction:n}=e;for(const i of Ve){const o=n.interactable&&n.interactable.options;!(o&&o.devTools&&o.devTools.ignore[i.name])&&i.perform(n)&&t.logger.warn(ye+i.text,...i.getInfo(n))}}},checks:Ve,CheckName:Bt,links:be,prefix:ye};lt.use(po);function go(e){let t=0,n;for(let i=0,o=e.length;i<o;i++)n=e[i].y+e[i].h,n>t&&(t=n);return t}function wt(e){return(e||[]).map(t=>({...t}))}function An(e,t){return!(e===t||e.x+e.w<=t.x||e.x>=t.x+t.w||e.y+e.h<=t.y||e.y>=t.y+t.h)}function Ht(e,t,n){const i=Hn(e),o=Ln(e),s=Array(e.length);for(let a=0,l=o.length;a<l;a++){let c=o[a];c.static||(c=mo(i,c,t,n),i.push(c)),s[e.indexOf(c)]=c,delete c.moved}return s}function mo(e,t,n,i){if(n)for(;t.y>0&&!Nt(e,t);)t.y--;else if(i){const s=i[t.i].y;for(;t.y>s&&!Nt(e,t);)t.y--}let o;for(;o=Nt(e,t);)t.y=o.y+o.h;return t}function vo(e,t){const n=Hn(e);for(let i=0,o=e.length;i<o;i++){const s=e[i];if(s.x+s.w>t.cols&&(s.x=t.cols-s.w),s.x<0&&(s.x=0,s.w=t.cols),!s.static)n.push(s);else for(;Nt(n,s);)s.y++}return e}function Ke(e,t){for(let n=0,i=e.length;n<i;n++)if(e[n].i===t)return e[n]}function Nt(e,t){for(let n=0,i=e.length;n<i;n++)if(An(e[n],t))return e[n]}function $n(e,t){return e.filter(n=>An(n,t))}function Hn(e){return e.filter(t=>t.static)}function xe(e,t,n,i,o,s){if(t.static)return e;const a=t.x,l=t.y,c=i&&t.y>i;typeof n=="number"&&(t.x=n),typeof i=="number"&&(t.y=i),t.moved=!0;let r=Ln(e);c&&(r=r.reverse());const f=$n(r,t);if(s&&f.length)return t.x=a,t.y=l,t.moved=!1,e;for(let d=0,m=f.length;d<m;d++){const g=f[d];g.moved||t.y>g.y&&t.y-g.y>g.h/4||(g.static?e=Je(e,g,t,o):e=Je(e,t,g,o))}return e}function Je(e,t,n,i){if(i){const s={x:n.x,y:n.y,w:n.w,h:n.h,i:"-1"};if(s.y=Math.max(t.y-n.h,0),!Nt(e,s))return xe(e,n,void 0,s.y,!1)}return xe(e,n,void 0,n.y+1,!1)}function yo(e,t,n,i){const o=`translate3d(${t}px,${e}px, 0)`;return{transform:o,WebkitTransform:o,MozTransform:o,msTransform:o,OTransform:o,width:`${n}px`,height:`${i}px`,position:"absolute"}}function bo(e,t,n,i){const o=`translate3d(${t*-1}px,${e}px, 0)`;return{transform:o,WebkitTransform:o,MozTransform:o,msTransform:o,OTransform:o,width:`${n}px`,height:`${i}px`,position:"absolute"}}function xo(e,t,n,i){return{top:`${e}px`,left:`${t}px`,width:`${n}px`,height:`${i}px`,position:"absolute"}}function wo(e,t,n,i){return{top:`${e}px`,right:`${t}px`,width:`${n}px`,height:`${i}px`,position:"absolute"}}function Ln(e){return[].concat(e).sort((t,n)=>t.y===n.y&&t.x===n.x?0:t.y>n.y||t.y===n.y&&t.x>n.x?1:-1)}function So(e,t){t=t||"Layout";const n=["x","y","w","h"],i=[];if(!Array.isArray(e))throw new Error(`${t} must be an array!`);for(let o=0,s=e.length;o<s;o++){const a=e[o];for(let l=0;l<n.length;l++)if(typeof a[n[l]]!="number")throw new Error(`VueGridLayout: ${t}[${o}].${n[l]} must be a number!`);if(a.i===void 0||a.i===null)throw new Error(`VueGridLayout: ${t}[${o}].i cannot be null!`);if(typeof a.i!="number"&&typeof a.i!="string")throw new Error(`VueGridLayout: ${t}[${o}].i must be a string or number!`);if(i.indexOf(a.i)>=0)throw new Error(`VueGridLayout: ${t}[${o}].i must be unique!`);if(i.push(a.i),a.static!==void 0&&typeof a.static!="boolean")throw new Error(`VueGridLayout: ${t}[${o}].static must be a boolean!`)}}function Ze(e){return Eo(e)}function Eo(e){const t=e.target.offsetParent||document.body,n=e.offsetParent===
`;L+="."+S+" > div::-webkit-scrollbar { "+r(["display: none"])+` }
`,L+="."+j+" { "+r(["-webkit-animation-duration: 0.1s","animation-duration: 0.1s","-webkit-animation-name: "+D,"animation-name: "+D])+` }
`,L+="@-webkit-keyframes "+D+` { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }
`,L+="@keyframes "+D+" { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }",b(L)}}function m(v){v.className+=" "+l+"_animation_active"}function g(v,u,S){if(v.addEventListener)v.addEventListener(u,S);else if(v.attachEvent)v.attachEvent("on"+u,S);else return t.error("[scroll] Don't know how to add event listeners.")}function x(v,u,S){if(v.removeEventListener)v.removeEventListener(u,S);else if(v.detachEvent)v.detachEvent("on"+u,S);else return t.error("[scroll] Don't know how to remove event listeners.")}function _(v){return i(v).container.childNodes[0].childNodes[0].childNodes[0]}function A(v){return i(v).container.childNodes[0].childNodes[0].childNodes[1]}function $(v,u){var S=i(v).listeners;if(!S.push)throw new Error("Cannot add listener to an element that is not detectable.");i(v).listeners.push(u)}function E(v,u,S){S||(S=u,u=v,v=null),v=v||{};function b(){if(v.debug){var w=Array.prototype.slice.call(arguments);if(w.unshift(o.get(u),"Scroll: "),t.log.apply)t.log.apply(null,w);else for(var H=0;H<w.length;H++)t.log(w[H])}}function D(w){function H(B){var J=B.getRootNode&&B.getRootNode().contains(B);return B===B.ownerDocument.body||B.ownerDocument.body.contains(B)||J}return!H(w)||window.getComputedStyle(w)===null}function j(w){var H=i(w).container.childNodes[0],B=window.getComputedStyle(H);return!B.width||B.width.indexOf("px")===-1}function L(){var w=window.getComputedStyle(u),H={};return H.position=w.position,H.width=u.offsetWidth,H.height=u.offsetHeight,H.top=w.top,H.right=w.right,H.bottom=w.bottom,H.left=w.left,H.widthCSS=w.width,H.heightCSS=w.height,H}function O(){var w=L();i(u).startSize={width:w.width,height:w.height},b("Element start size",i(u).startSize)}function M(){i(u).listeners=[]}function k(){if(b("storeStyle invoked."),!i(u)){b("Aborting because element has been uninstalled");return}var w=L();i(u).style=w}function W(w,H,B){i(w).lastWidth=H,i(w).lastHeight=B}function Y(w){return _(w).childNodes[0]}function K(){return 2*s.width+1}function Dt(){return 2*s.height+1}function mt(w){return w+10+K()}function vt(w){return w+10+Dt()}function Q(w){return w*2+K()}function ae(w){return w*2+Dt()}function h(w,H,B){var J=_(w),et=A(w),nt=mt(H),it=vt(B),Z=Q(H),F=ae(B);J.scrollLeft=nt,J.scrollTop=it,et.scrollLeft=Z,et.scrollTop=F}function R(){var w=i(u).container;if(!w){w=document.createElement("div"),w.className=l,w.style.cssText=r(["visibility: hidden","display: inline","width: 0px","height: 0px","z-index: -1","overflow: hidden","margin: 0","padding: 0"]),i(u).container=w,m(w),u.appendChild(w);var H=function(){i(u).onRendered&&i(u).onRendered()};g(w,"animationstart",H),i(u).onAnimationStart=H}return w}function N(){function w(){var V=i(u).style;if(V.position==="static"){u.style.setProperty("position","relative",v.important?"important":"");var st=function(Ct,bt,Zn,qt){function Qn(ti){return ti.replace(/[^-\d\.]/g,"")}var ce=Zn[qt];ce!=="auto"&&Qn(ce)!=="0"&&(Ct.warn("An element that is positioned static has style."+qt+"="+ce+" which is ignored due to the static positioning. The element will need to be positioned relative, so the style."+qt+" will be set to 0. Element: ",bt),bt.style[qt]=0)};st(t,u,V,"top"),st(t,u,V,"right"),st(t,u,V,"bottom"),st(t,u,V,"left")}}function H(V,st,Ct,bt){return V=V?V+"px":"0",st=st?st+"px":"0",Ct=Ct?Ct+"px":"0",bt=bt?bt+"px":"0",["left: "+V,"top: "+st,"right: "+bt,"bottom: "+Ct]}if(b("Injecting elements"),!i(u)){b("Aborting because element has been uninstalled");return}w();var B=i(u).container;B||(B=R());var J=s.width,et=s.height,nt=r(["position: absolute","flex: none","overflow: hidden","z-index: -1","visibility: hidden","width: 100%","height: 100%","left: 0px","top: 0px"]),it=r(["position: absolute","flex: none","overflow: hidden","z-index: -1","visibility: hidden"].concat(H(-(1+J),-(1+et),-et,-J))),Z=r(["position: absolute","flex: none","overflow: scroll","z-index: -1","visibility: hidden","width: 100%","height: 100%"]),F=r(["position: absolute","flex: none","overflow: scroll","z-index: -1","visibility: hidden","width: 100%","height: 100%"]),tt=r(["position: absolute","left: 0","top: 0