envelope/core/static/js/magnet.min.js

2 lines
157 KiB
JavaScript

(()=>{"use strict";const t=function(t,e){return t instanceof DOMPoint?DOMPoint.fromPoint(t):t instanceof DOMRect?new DOMPoint(t.x,t.y):new DOMPoint(t,e)},e=t;function n(e){const{best:n}=e;return t(n.x?.rawDistance??0,n.y?.rawDistance??0)}const a=/[|;,\s]/;function s(t,e){if(null===t)return[];const n=t.split(a);return void 0===e?n:Object.values(e).filter((t=>n.includes(t)))}function o(t,e){const n=Array.isArray(t)?t:[t];return void 0===e?n.join("|"):Object.values(e).filter((t=>n.includes(t))).join("|")}const r=function(t,e){return customElements.get(e)?Promise.reject(new Error(`Already defined <${e}>`)):(customElements.define(e,t),customElements.whenDefined(e))};var i;!function(t){t.topToTop="topToTop",t.topToBottom="topToBottom",t.rightToRight="rightToRight",t.rightToLeft="rightToLeft",t.bottomToTop="bottomToTop",t.bottomToBottom="bottomToBottom",t.leftToRight="leftToRight",t.leftToLeft="leftToLeft",t.xCenterToXCenter="xCenterToXCenter",t.yCenterToYCenter="yCenterToYCenter"}(i||(i={}));const c=[i.rightToRight,i.rightToLeft,i.leftToRight,i.leftToLeft,i.xCenterToXCenter],l=[i.topToTop,i.topToBottom,i.bottomToTop,i.bottomToBottom,i.yCenterToYCenter],u=i;var g;let h;!function(t){t.outer="outer",t.inner="inner",t.center="center",t.extend="extend"}(g||(g={})),function(t){t.inner="inner",t.center="center"}(h||(h={}));const f=g;var d;!function(t){t.disabled="disabled",t.group="group",t.unattractable="unattractable",t.unmovable="unmovable",t.attractDistance="attract-distance",t.alignTo="align-to",t.alignToParent="align-to-parent",t.crossPrevent="cross-prevent",t.offsetUnit="offset-unit"}(d||(d={}));const m=d;var b;!function(t){t.parent="parent"}(b||(b={}));const p=b;var T;!function(t){t.magnetstart="magnetstart",t.magnetmove="magnetmove",t.magnetend="magnetend",t.attract="attract",t.attracted="attracted",t.attractmove="attractmove",t.attractedmove="attractedmove",t.unattract="unattract",t.unattracted="unattracted"}(T||(T={}));const y=T;var D;!function(t){t.pixel="px",t.px="px",t.percentage="%",t["%"]="%"}(D||(D={}));const x=D,{isNaN:v}=globalThis,{abs:P}=Math,A=document.createElement("template"),M={[m.disabled]:!1,[m.group]:null,[m.attractDistance]:10,[m.unattractable]:!1,[m.unmovable]:!1,get[m.alignTo](){return[f.outer,f.center,f.extend]},get[m.alignToParent](){return[]},get[m.crossPrevent](){return[]},[m.offsetUnit]:x.pixel};A.innerHTML="\n <style>\n :host {\n position: relative;\n display: inline-block;\n }\n </style>\n <slot>\n </slot>\n";class w extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),this.shadowRoot.append(A.content.cloneNode(!0))}static get ALIGNMENT(){return{...u}}static get ALIGN_TO(){return{...f}}static get ALIGN_TO_PARENT(){return{...h}}static get CROSS_PREVENT(){return{...p}}static get EVENT(){return{...y}}static getAlignmentsFromAlignTo(t){const e=Array.isArray(t)?t:[t],n=[];return e.includes(f.outer)&&n.push(u.topToBottom,u.rightToLeft,u.bottomToTop,u.leftToRight),e.includes(f.inner)&&n.push(u.topToTop,u.rightToRight,u.bottomToBottom,u.leftToLeft),e.includes(f.center)&&n.push(u.xCenterToXCenter,u.yCenterToYCenter),n}static getMagnetAttractionOffset=n;get disabled(){return null!==this.traceMagnetAttributeValue(m.disabled)}set disabled(t){t?this.setAttribute(m.disabled,""):this.removeAttribute(m.disabled)}get group(){return this.traceMagnetAttributeValue(m.group)}set group(t){null===t||0===t.length?this.removeAttribute(m.group):this.setAttribute(m.group,t)}get parentMagnet(){const t=this.getAttribute(m.group);let e=this.parentElement;for(;e;){if(e instanceof w){const n=e.getAttribute(m.group);if(null===t||null===n||t===n)return e}e=e.parentElement}return null}get unattractable(){return null!==this.traceMagnetAttributeValue(m.unattractable)}set unattractable(t){t?this.setAttribute(m.unattractable,""):this.removeAttribute(m.unattractable)}get unmovable(){return null!==this.traceMagnetAttributeValue(m.unmovable)}set unmovable(t){t?this.setAttribute(m.unmovable,""):this.removeAttribute(m.unmovable)}get attractDistance(){const t=this.traceMagnetAttributeValue(m.attractDistance);return null===t?M[m.attractDistance]:Number(t)}set attractDistance(t){if(null===t)this.removeAttribute(m.attractDistance);else{if(v(t))throw new TypeError(`Invalid attraction distance: ${t}`);if(t<0)throw new RangeError(`Attraction distance should be greater than 0: ${t}`);t!==this.attractDistance&&this.setAttribute(m.attractDistance,`${t}`)}}get alignTos(){const t=this.traceMagnetAttributeValue(m.alignTo);return null===t?M[m.alignTo]:s(t,f)}set alignTos(t){this.setAttribute(m.alignTo,o(Array.isArray(t)?t:s(t,f)))}get alignToParents(){const t=this.traceMagnetAttributeValue(m.alignToParent);return null===t?M[m.alignToParent]:s(t,h)}set alignToParents(t){this.setAttribute(m.alignToParent,o(Array.isArray(t)?t:s(t,h)))}get alignments(){return w.getAlignmentsFromAlignTo(this.alignTos)}get parentAlignments(){return w.getAlignmentsFromAlignTo(this.alignToParents)}get crossPrevents(){const t=this.traceMagnetAttributeValue(m.crossPrevent);return null===t?M[m.crossPrevent]:s(t,p)}set crossPrevents(t){this.setAttribute(m.crossPrevent,o(Array.isArray(t)?t:s(t,p)))}get offsetUnit(){const t=this.traceMagnetAttributeValue(m.offsetUnit);return null===t?M[m.offsetUnit]:t}set offsetUnit(t){if(null===t)this.removeAttribute(m.offsetUnit);else{if(!Object.values(x).includes(t))throw new Error(`Invalid offset unit: ${t}`);t!==this.offsetUnit&&this.setAttribute(m.offsetUnit,t)}}traceMagnetAttributeValue(t){const e=this.getAttribute(t);if(null!==e)return e;const{parentMagnet:n}=this;return n?n.traceMagnetAttributeValue(t):null}}r(w,"magnet-pack");const C=w;function R(t,...e){if(t instanceof Window)return new DOMRect(0,0,t.innerWidth,t.innerHeight);if(t instanceof Document)return document.body.getBoundingClientRect();if(t instanceof Element)return t.getBoundingClientRect();if(E.isPack(t))return DOMRect.fromRect(t.rect);if("object"!=typeof t){const n=t,[a,s,o]=e;return new DOMRect(n,a,s,o)}const{top:n,right:a,bottom:s,left:o,x:r=o,y:i=n,width:c=a-r,height:l=s-i}=t;return new DOMRect(r,i,c,l)}function k(t){return E.isPack(t)?t.rect:t instanceof DOMRect?t:R(t)}const B=R;class J{constructor(t,e=k(t)){const n=J.isPack(t)?t.raw:t;this.raw=n,this.rect=e,Object.freeze(this)}static isPack(t){return t instanceof J}}function O(t){return J.isPack(t)?t:new J(t)}const E=J,L=function(t,e,n){switch(n){default:return 1/0;case u.topToTop:return e.top-t.top;case u.topToBottom:return e.bottom-t.top;case u.rightToRight:return e.right-t.right;case u.rightToLeft:return e.left-t.right;case u.bottomToTop:return e.top-t.bottom;case u.bottomToBottom:return e.bottom-t.bottom;case u.leftToRight:return e.right-t.left;case u.leftToLeft:return e.left-t.left;case u.xCenterToXCenter:return(e.right+e.left-(t.right+t.left))/2;case u.yCenterToYCenter:return(e.top+e.bottom-(t.top+t.bottom))/2}},j=()=>!0,F=()=>!1;function N(t,e){const n=t.right+t.left,a=e.right+e.left;return P(n-a)/2}function X(t,e){const n=t.top+t.bottom,a=e.top+e.bottom;return P(n-a)/2}const Y=function(t,e,n={}){const a=O(t),s=e.map((t=>O(t))),{attractDistance:o=M[m.attractDistance],alignTos:r=M[m.alignTo],alignments:i=C.getAlignmentsFromAlignTo(r),onJudgeDistance:c=j,onJudgeAttraction:l=j,attractionBest:g={}}=n,h={attractDistance:o,alignTos:r,alignments:i,onJudgeDistance:c};return s.reduce(((t,e)=>{const n=it.prototype.attractionTo.call(a,e,h),{best:s,results:r}=n,i=l({source:a,target:e,results:[...r],best:{x:s.x,y:s.y}});if(t.target.push(e),i){const{results:e,best:n}=t;if(e.push(...r),s.x)if(void 0===n.x||s.x.absDistance<n.x.absDistance)n.x=s.x;else if(n.x.absDistance===s.x.absDistance){const t=k(a),e=s.x.target.rect,r=n.x.target.rect,i=X(t,e),c=X(t,r);if(i<c)n.x=s.x;else if(i===c){const e=o/3;if(s.x.rawDistance>e)s.x.alignment===u.leftToLeft&&(n.x=s.x);else if(s.x.rawDistance<-e)s.x.alignment===u.rightToRight&&(n.x=s.x);else if(s.x.alignment===u.xCenterToXCenter){const e=s.x.target.rect,a=n.x.target.rect,o=e.top+e.bottom,r=a.top+a.bottom,i=t.top+t.bottom,c=P(o-i);P(r-i)<c&&(n.x=s.x)}}}if(s.y)if(void 0===n.y||s.y.absDistance<n.y.absDistance)n.y=s.y;else if(n.y.absDistance===s.y.absDistance){const t=k(a),e=s.y.target.rect,r=n.y.target.rect,i=N(t,e),c=N(t,r);if(i<c)n.y=s.y;else if(i===c){const e=o/3;if(s.y.rawDistance<-e)s.y.alignment===u.bottomToBottom&&(n.y=s.y);else if(s.y.rawDistance>e)s.y.alignment===u.topToTop&&(n.y=s.y);else if(s.y.alignment===u.yCenterToYCenter){const e=s.y.target.rect,a=n.y.target.rect,o=e.right+e.left,r=a.right+a.left,i=t.right+t.left,c=P(o-i);P(r-i)<c&&(n.y=s.y)}}}}return t}),{source:a,target:[],results:[],best:{...g}})},V=function(t,e,n={}){const a=O(t),s=O(e),{attractDistance:o=M[m.attractDistance],alignTos:r=M[m.alignTo],alignments:i=it.getAlignmentsFromAlignTo(r),onJudgeDistance:g=j}=n;return i.reduce(((t,e)=>{const n=it.prototype.distanceTo.call(a,s,e);if(g({...n},{attractDistance:o,alignTos:r})){const{results:a,best:s}=t;if(a.push(n),c.includes(e)){if(void 0===s.x||n.absDistance<s.x.absDistance)s.x=n;else if(s.x.absDistance===n.absDistance){const t=o/3;n.rawDistance>t?n.alignment===u.leftToLeft&&(s.x=n):n.rawDistance<-t?n.alignment===u.rightToRight&&(s.x=n):n.alignment===u.xCenterToXCenter&&(s.x=n)}}else if(l.includes(e))if(void 0===s.y||n.absDistance<s.y.absDistance)s.y=n;else if(s.y.absDistance===n.absDistance){const t=o/3;n.rawDistance<-t?n.alignment===u.bottomToBottom&&(s.y=n):n.rawDistance>t?n.alignment===u.topToTop&&(s.y=n):n.alignment===u.yCenterToYCenter&&(s.y=n)}}return t}),{source:a,target:s,results:[],best:{}})},I=function(t){return Boolean(t.best.x??t.best.y)},$=function(){return!0};function U(t,e,n,a){e.forEach((e=>{!function(t,e,n,a){t.addEventListener(e,n,a)}(t,e,n,a)}))}function S(t,e,n,a){e.forEach((e=>{t.removeEventListener(e,n,a)}))}function W(t,e,n){return t.dispatchEvent(new CustomEvent(e,n))}const H=function(t,n){let a=0,s=0;return t.left<n.left?a=n.left-t.left:t.right>n.right&&(a=n.right-t.right),t.top<n.top?s=n.top-t.top:t.bottom>n.bottom&&(s=n.bottom-t.bottom),e(a,s)},z=function(t,a,s={}){const o=t.raw,{ignoreEvent:r=!(o instanceof HTMLElement),alignToParents:i=M[m.alignToParent],crossPrevents:c=M[m.crossPrevent],parentPack:l,lastAttractionBest:u,onJudgeMovement:g=j}=s,h=u?.x,f=u?.y,d=it.getAlignmentsFromAlignTo(i).length>0,b=c.includes(p.parent)&&l,T=k(t),{width:D,height:x}=T,v=k(l??T),P=T,A=b?H(P,v):e(0,0),w=B(P.x+A.x,P.y+A.y,D,x),C=new E(o,w),R=g(C),J=[],O=[],L=[],N=t=>{r||O.forEach((e=>{const n=e.target,a=n.raw,s={source:C,target:n,sourceNextRect:t};W(a,y.unattracted,{bubbles:!0,cancelable:!1,composed:!0,detail:s})}))};if(!R)return h&&O.push(h),f&&O.push(f),N(w),{position:null,attractionBest:null};const X={},{unattractable:I=M[m.unattractable],attractDistance:$=M[m.attractDistance],alignTos:U=M[m.alignTo],alignments:S=it.getAlignmentsFromAlignTo(U),onJudgeDistanceInParent:z=j}=s,_=new E(o,P),G=I?F:s.onJudgeDistance??j;if(d&&l){const{best:t}=V(_,l,{attractDistance:$,alignTos:U,alignments:S,onJudgeDistance:G});X.x=t.x,X.y=t.y}const q=b?t=>z(t,{attractDistance:$,alignTos:U,parent:l,onJudgeDistance:G}):G,K=I?F:s.onJudgeAttraction??j,Q=Y(_,a,{attractDistance:$,alignTos:U,alignments:S,onJudgeDistance:q,onJudgeAttraction:K,attractionBest:X}),Z=Q.best,tt=n(Q),et=B(P.x+tt.x,P.y+tt.y,D,x),nt=b?H(et,v):e(0,0),at=B(et.x+nt.x,et.y+nt.y,D,x);if(!r){const{x:t,y:n}=Z,a=h?.target,s=f?.target,r=t?.target,i=n?.target,c=i!==s;if(r!==a)a&&O.push(h),r&&J.push(t);else if(r){const e=h?.alignment;e!==t.alignment?J.push(t):L.push(t)}if(c)s&&O.push(f),i&&J.push(n);else if(i){const t=f?.alignment;t!==n.alignment?J.push(n):L.push(n)}if(J.length>0){const t={source:C,nextRect:at,attraction:Q};if(!W(o,y.attract,{bubbles:!0,cancelable:!0,composed:!0,detail:t}))return h&&O.push(h),f&&O.push(f),{position:e(P.x+A.x,P.y+A.y),attractionBest:null}}if(O.length>0){const t={source:C,nextRect:at,attraction:Q};W(o,y.unattract,{bubbles:!0,cancelable:!1,composed:!0,detail:t})}if(L.length>0){const t={source:C,nextRect:at,attraction:Q};W(o,y.attractmove,{bubbles:!0,cancelable:!1,composed:!0,detail:t})}}var st;return st=at,r||J.forEach((t=>{const e=t.target,n=e.raw,a={source:C,target:e,sourceNextRect:st,distance:t};W(n,y.attracted,{bubbles:!0,cancelable:!1,composed:!0,detail:a})})),N(at),(t=>{r||L.forEach((e=>{const n=e.target,a=n.raw,s={source:C,target:n,sourceNextRect:t,distance:e};W(a,y.attractedmove,{bubbles:!0,cancelable:!1,composed:!0,detail:s})}))})(at),{position:e(P.x+tt.x+nt.x,P.y+tt.y+nt.y),attractionBest:Z}},_=function(e){const{clientX:n,clientY:a}=e;return t(n,a)},G=["pointerdown"],q=["pointermove"],K=["pointerup"];function Q(t){t.resetMagnetRect(),t.resetParentPack(),t.resetTargetMagnetPacks()}function Z(t,n,a){const{magnetRect:s,targetMagnetPacks:o,judgeMagnetMovement:r}=this,{position:i,attractionBest:c}=z(new E(this,B(s.x+a.x-t.x,s.y+a.y-t.y,s.width,s.height)),o,{unattractable:this.unattractable,attractDistance:this.attractDistance,alignTos:this.alignTos,alignToParents:this.alignToParents,crossPrevents:this.crossPrevents,parentPack:this.parentPack,lastAttractionBest:this.lastAttractionBest,onJudgeDistance:this.judgeMagnetDistance,onJudgeDistanceInParent:this.judgeMagnetDistanceInParent,onJudgeAttraction:this.judgeMagnetAttraction,onJudgeMovement:n=>{if(!r(n))return!1;const s={source:n,targets:o,startPoint:e(t),movePoint:e(a)};return W(this,y.magnetmove,{bubbles:!0,cancelable:!0,composed:!0,detail:s})}});return this.setMagnetOffset((i?.x??s.x)-s.x+n.x,(i?.y??s.y)-s.y+n.y),this.lastAttractionBest=c,a}function tt(t){if(this.disabled||this.unmovable)return;const n=_(t);this.isMoving=!1,Q(this);const{magnetRect:a,targetMagnetPacks:s}=this,o={source:new E(this,a),targets:s,startPoint:e(n)};if(!W(this,y.magnetstart,{bubbles:!0,cancelable:!0,composed:!0,detail:o}))return;let r=n;const i=Z.bind(this,n,this.lastOffset),c=t=>{const e=_(t);r=i(e)},l=new MutationObserver((()=>{i(r)})),u=()=>{this.isMoving=!1,this.style.removeProperty("z-index"),S(document,q,c),S(document,K,u),l.disconnect(),Q(this),W(this,y.magnetend,{bubbles:!0,cancelable:!1,composed:!0})};this.isMoving=!0,this.style.setProperty("z-index",`${Date.now()}`),t.preventDefault(),U(document,q,c),U(document,K,u),l.observe(this,{attributes:!0,attributeFilter:Object.values(m)}),i(r)}function et(t){t.disabled||t.unmovable?function(t){S(t,G,tt)}(t):function(t){U(t,G,tt)}(t)}var nt;!function(t){t.offsetX="--offset-x",t.offsetY="--offset-y"}(nt||(nt={}));const at=nt,st="magnet-block",ot=document.createElement("template");ot.innerHTML=`\n <style>\n :host {\n --x: var(${at.offsetX}, 0);\n --y: var(${at.offsetY}, 0);\n\n position: relative;\n transform: translate(var(--x), var(--y));\n touch-action: none;\n display: inline-block;\n }\n </style>\n <slot>\n </slot>\n`;class rt extends C{rectCache=null;parentPackCache=null;targetMagnetPacksCache=null;isMoving=!1;lastOffset=e(0,0);lastAttractionBest=null;constructor(){super(),this.shadowRoot.append(ot.content.cloneNode(!0)),et(this)}get disabled(){return super.disabled}set disabled(t){super.disabled=t,et(this)}get unmovable(){return super.unmovable}set unmovable(t){super.unmovable=t,et(this)}get magnetRect(){return this.rectCache||(this.rectCache=k(this)),this.rectCache}resetMagnetRect(){this.isMoving||(this.rectCache=null)}get parentPack(){const t=this.parentElement??document.body;return this.parentPackCache||(this.parentPackCache=O(t)),this.parentPackCache}resetParentPack(){this.isMoving||(this.parentPackCache=null)}get targetMagnetPacks(){return this.targetMagnetPacksCache||(this.targetMagnetPacksCache=this.getAttractableMagnets().map((t=>O(t)))),this.targetMagnetPacksCache}resetTargetMagnetPacks(){this.isMoving||(this.targetMagnetPacksCache=null)}getOtherMagnets(){return Array.from(document.querySelectorAll(st)).filter((t=>t!==this))}getAttractableMagnets(){if(this.disabled||this.unattractable)return[];const{group:t}=this,e=null!==t,n=`magnet-block:not([${m.disabled}]):not([${m.unattractable}])`;return Array.from(document.querySelectorAll(n)).filter((n=>!(n===this||this.contains(n)||e&&t!==n.group)))}judgeMagnetDistance(...[t,e={}]){const{attractDistance:n=this.attractDistance,alignTos:a=this.alignTos}=e;return function(t,e={}){const{attractDistance:n=M[m.attractDistance]}=e;if(t.absDistance>n)return!1;const{alignTos:a=M[m.alignTo]}=e;if(a.includes(f.extend))return!0;const{source:{rect:s},target:{rect:o}}=t;switch(t.alignment){default:return!1;case u.topToTop:case u.topToBottom:case u.bottomToTop:case u.bottomToBottom:case u.yCenterToYCenter:return!(s.right+n<o.left||s.left-n>o.right);case u.rightToRight:case u.rightToLeft:case u.leftToRight:case u.leftToLeft:case u.xCenterToXCenter:return!(s.top-n>o.bottom||s.bottom+n<o.top)}}(t,{attractDistance:n,alignTos:a})}judgeMagnetDistanceInParent(...[t,e={}]){const{attractDistance:n=this.attractDistance,alignTos:a=this.alignTos,onJudgeDistance:s=this.judgeMagnetDistance}=e;return function(t,e={}){const{onJudgeDistance:n=j,...a}=e;if(!n(t,a))return!1;const s=k(e.parent??document.body),{alignment:o,rawDistance:r,source:i}=t,{rect:c}=i;switch(o){default:return!0;case"topToTop":case"topToBottom":case"bottomToTop":case"bottomToBottom":case"yCenterToYCenter":return c.top+r>=s.top&&c.bottom+r<=s.bottom;case"rightToRight":case"rightToLeft":case"leftToRight":case"leftToLeft":case"xCenterToXCenter":return c.right+r<=s.right&&c.left+r>=s.left}}(t,{attractDistance:n,alignTos:a,parent:e.parent??this.parentPack,onJudgeDistance:s})}judgeMagnetAttraction=I;judgeMagnetMovement=$;rawDistanceTo(t,e){const n=k(this),a=k(t);return L(n,a,e)}distanceTo(t,e){return function(t,e,n){const a=O(t),s=O(e),o=k(t),r=k(e),i=L(o,r,n);return{source:a,target:s,alignment:n,rawDistance:i,absDistance:P(i)}}(this,t,e)}attractionTo(t,e={}){const{attractDistance:n=this.attractDistance,alignTos:a=this.alignTos,alignments:s,onJudgeDistance:o=this.judgeMagnetDistance}=e;return V(this,t,{attractDistance:n,alignTos:a,alignments:s,onJudgeDistance:o})}attractionToParent(t={}){const{attractDistance:e=this.attractDistance,alignTos:n=this.alignToParents,alignments:a,onJudgeDistance:s=this.judgeMagnetDistance}=t;return V(this,this.parentPack,{attractDistance:e,alignTos:n,alignments:a,onJudgeDistance:s})}multiAttractionsTo(t,e={}){const{attractDistance:n=this.attractDistance,alignTos:a=this.alignTos,alignToParents:s=this.alignToParents,alignments:o,onJudgeDistance:r=this.judgeMagnetDistance,attractionBest:i,onJudgeAttraction:c=this.judgeMagnetAttraction}=e,l=rt.prototype.attractionToParent.call(this,{attractDistance:n,alignTos:s,alignments:o,onJudgeDistance:r,attractionBest:i});return Y(this,t,{attractDistance:n,alignTos:a,alignments:o,onJudgeDistance:r,onJudgeAttraction:c,attractionBest:l?.best})}getMagnetAttractionResultOfPosition(t,n,a){const s=e(t,n),o=(t instanceof DOMPoint?n:a)??{},{width:r,height:i}=this.magnetRect,c=B(s.x,s.y,r,i),l=new E(this,c),{ignoreEvent:u,unattractable:g=this.unattractable,attractDistance:h=this.attractDistance,alignTos:f=this.alignTos,alignments:d,alignToParents:m=this.alignToParents,crossPrevents:b=this.crossPrevents,parentPack:p=this.parentPack,lastAttractionBest:T=this.lastAttractionBest,onJudgeDistance:y=this.judgeMagnetDistance,onJudgeDistanceInParent:D=this.judgeMagnetDistanceInParent,onJudgeAttraction:x=this.judgeMagnetAttraction,onJudgeMovement:v=this.judgeMagnetMovement}=o,P=z(l,this.targetMagnetPacks,{ignoreEvent:u,unattractable:g,attractDistance:h,alignTos:f,alignments:d,alignToParents:m,crossPrevents:b,parentPack:p,lastAttractionBest:T,onJudgeDistance:y,onJudgeDistanceInParent:D,onJudgeAttraction:x,onJudgeMovement:v});return this.resetMagnetRect(),this.resetParentPack(),this.resetTargetMagnetPacks(),P}get lastMagnetOffset(){const{offsetUnit:t,lastOffset:n}=this;switch(t){default:case x.pixel:return e(n);case x.percentage:{const{offsetParent:t}=this,a=B(t??document);return e(n.x/a.width,n.y/a.height)}}}resetMagnetOffset(){this.style.removeProperty(at.offsetX),this.style.removeProperty(at.offsetY),this.lastOffset=e(0,0)}setMagnetOffset(t=this.lastOffset,n){const a=e(t,n),{offsetUnit:s}=this;switch(s){default:case x.pixel:this.style.setProperty(at.offsetX,`${a.x}px`),this.style.setProperty(at.offsetY,`${a.y}px`);break;case x.percentage:{const t=this.offsetParent??document.body,n=globalThis.getComputedStyle(t),{boxSizing:s,width:o,height:r}=n;let i=parseFloat(o),c=parseFloat(r);if("border-box"===s){const{paddingTop:t,paddingRight:e,paddingBottom:a,paddingLeft:s,borderTopWidth:o,borderRightWidth:r,borderBottomWidth:l,borderLeftWidth:u}=n,g=parseFloat(t),h=parseFloat(e),f=parseFloat(a),d=parseFloat(s),m=parseFloat(o),b=parseFloat(r),p=parseFloat(l);i-=h+d+b+parseFloat(u),c-=g+f+m+p}const l=e(a.x/i,a.y/c);this.style.setProperty(at.offsetX,100*l.x+"%"),this.style.setProperty(at.offsetY,100*l.y+"%");break}}this.lastOffset=e(a)}setMagnetPosition(t=e(this.magnetRect),n){const a=e(t,n),{lastOffset:s,magnetRect:o}=this,r=e(o.x-s.x,o.y-s.y);this.setMagnetOffset(a.x-r.x,a.y-r.y),this.resetMagnetRect()}get bestAttraction(){const{lastAttractionBest:t}=this,e=t?.x,n=t?.y,a={};if(e){const{source:t,target:n}=e;a.x={...e,source:new E(t.raw,B(t.rect)),target:new E(n.raw,B(n.rect))}}else a.x=void 0;if(n){const{source:t,target:e}=n;a.y={...n,source:new E(t.raw,B(t.rect)),target:new E(e.raw,B(e.rect))}}else a.y=void 0;return a}}r(rt,st);const it=rt})();
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWFnbmV0Lm1pbi5qcyIsIm1hcHBpbmdzIjoibUJBWU8sTUFBTUEsRUFBMkIsU0FDdENDLEVBQ0FDLEdBRUEsT0FBSUQsYUFBYUUsU0FDUkEsU0FBU0MsVUFBVUgsR0FFeEJBLGFBQWFJLFFBQ1IsSUFBSUYsU0FBU0YsRUFBRUEsRUFBR0EsRUFBRUMsR0FHdEIsSUFBSUMsU0FBU0YsRUFBR0MsSUFhekIsSUNqQk8sU0FBU0ksRUFBb0JDLEdBQ2xDLE1BQU0sS0FBRUMsR0FBU0QsRUFFakIsT0FBT1AsRUFDTFEsRUFBS1AsR0FBR1EsYUFBZSxFQUN2QkQsRUFBS04sR0FBR08sYUFBZSxHQ3hCM0IsTUFBTUMsRUFBVyxVQUtWLFNBQVNDLEVBQ2RDLEVBQ0FDLEdBRUEsR0FBYyxPQUFWRCxFQUNGLE1BQU8sR0FHVCxNQUFNRSxFQUFTRixFQUFNRyxNQUFNTCxHQUUzQixZQUFvQk0sSUFBaEJILEVBQ0tDLEVBR01HLE9BQU9ILE9BQU9ELEdBRzFCSyxRQUFRQyxHQUFVTCxFQUFPTSxTQUFTRCxLQU1oQyxTQUFTRSxFQUNkVCxFQUNBQyxHQUVBLE1BQU1DLEVBQVNRLE1BQU1DLFFBQVFYLEdBQVNBLEVBQVEsQ0FBQ0EsR0FFL0MsWUFBb0JJLElBQWhCSCxFQUNLQy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hY3Rpb247XG5cbiAgICAgICAgcmVzdWx0cy5wdXNoKC4uLmN1cnJlbnRSZXN1bHRzKTtcblxuICAgICAgICBpZiAoY3VycmVudEJlc3QueCkge1xuICAgICAgICAgIGlmIChiZXN0LnggPT09IHVuZGVmaW5lZCB8fCBjdXJyZW50QmVzdC54LmFic0Rpc3RhbmNlIDwgYmVzdC54LmFic0Rpc3RhbmNlXG4gICAgICAgICAgKSB7XG4gICAgICAgICAgICBiZXN0LnggPSBjdXJyZW50QmVzdC54O1xuICAgICAgICAgIH0gZWxzZSBpZiAoYmVzdC54LmFic0Rpc3RhbmNlID09PSBjdXJyZW50QmVzdC54LmFic0Rpc3RhbmNlKSB7XG4gICAgICAgICAgICBjb25zdCBzb3VyY2VSZWN0ID0gZ2V0UmVjdChzb3VyY2VQYWNrKTtcbiAgICAgICAgICAgIGNvbnN0IHRhcmdldFJlY3QgPSBjdXJyZW50QmVzdC54LnRhcmdldC5yZWN0O1xuICAgICAgICAgICAgY29uc3QgbGFzdEJlc3RSZWN0ID0gYmVzdC54LnRhcmdldC5yZWN0O1xuICAgICAgICAgICAgY29uc3QgY3VycmVudERpZmZZID0gZGlzdGFuY2VCZXR3ZWVuWUNlbnRlcnNPZlJlY3RzKHNvdXJjZVJlY3QsIHRhcmdldFJlY3QpO1xuICAgICAgICAgICAgY29uc3QgZGlmZlkgPSBkaXN0YW5jZUJldHdlZW5ZQ2VudGVyc09mUmVjdHMoc291cmNlUmVjdCwgbGFzdEJlc3RSZWN0KTtcblxuICAgICAgICAgICAgaWYgKGN1cnJlbnREaWZmWSA8IGRpZmZZKSB7XG4gICAgICAgICAgICAgIGJlc3QueCA9IGN1cnJlbnRCZXN0Lng7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKGN1cnJlbnREaWZmWSA9PT0gZGlmZlkpIHtcbiAgICAgICAgICAgICAgY29uc3QgZ2FwID0gYXR0cmFjdERpc3RhbmNlIC8gMztcblxuICAgICAgICAgICAgICBpZiAoY3VycmVudEJlc3QueC5yYXdEaXN0YW5jZSA+IGdhcCkge1xuICAgICAgICAgICAgICAgIGlmIChjdXJyZW50QmVzdC54LmFsaWdubWVudCA9PT0gQWxpZ25tZW50LmxlZnRUb0xlZnQpIHtcbiAgICAgICAgICAgICAgICAgIGJlc3QueCA9IGN1cnJlbnRCZXN0Lng7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB9IGVsc2UgaWYgKGN1cnJlbnRCZXN0LngucmF3RGlzdGFuY2UgPCAtZ2FwKSB7XG4gICAgICAgICAgICAgICAgaWYgKGN1cnJlbnRCZXN0LnguYWxpZ25tZW50ID09PSBBbGlnbm1lbnQucmlnaHRUb1JpZ2h0KSB7XG4gICAgICAgICAgICAgICAgICBiZXN0LnggPSBjdXJyZW50QmVzdC54O1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgfSBlbHNlIGlmIChjdXJyZW50QmVzdC54LmFsaWdubWVudCA9PT0gQWxpZ25tZW50LnhDZW50ZXJUb1hDZW50ZXIpIHtcbiAgICAgICAgICAgICAgICBjb25zdCBsYXN0UmVjdCA9IGN1cnJlbnRCZXN0LngudGFyZ2V0LnJlY3Q7XG4gICAgICAgICAgICAgICAgY29uc3QgY3VycmVudFJlY3QgPSBiZXN0LngudGFyZ2V0LnJlY3Q7XG4gICAgICAgICAgICAgICAgY29uc3QgbGFzdFlCYXNlID0gbGFzdFJlY3QudG9wICsgbGFzdFJlY3QuYm90dG9tO1xuICAgICAgICAgICAgICAgIGNvbnN0IGN1cnJlbnRZQmFzZSA9IGN1cnJlbnRSZWN0LnRvcCArIGN1cnJlbnRSZWN0LmJvdHRvbTtcbiAgICAgICAgICAgICAgICBjb25zdCBzb3VyY2VZQmFzZSA9IHNvdXJjZVJlY3QudG9wICsgc291cmNlUmVjdC5ib3R0b207XG4gICAgICAgICAgICAgICAgY29uc3QgbGFzdFlEaXN0YW5jZSA9IGFicyhsYXN0WUJhc2UgLSBzb3VyY2VZQmFzZSk7XG4gICAgICAgICAgICAgICAgY29uc3QgY3VycmVudFlEaXN0YW5jZSA9IGFicyhjdXJyZW50WUJhc2UgLSBzb3VyY2VZQmFzZSk7XG5cbiAgICAgICAgICAgICAgICBpZiAoY3VycmVudFlEaXN0YW5jZSA8IGxhc3RZRGlzdGFuY2UpIHtcbiAgICAgICAgICAgICAgICAgIGJlc3QueCA9IGN1cnJlbnRCZXN0Lng7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgaWYgKGN1cnJlbnRCZXN0LnkpIHtcbiAgICAgICAgICBpZiAoYmVzdC55ID09PSB1bmRlZmluZWQgfHwgY3VycmVudEJlc3QueS5hYnNEaXN0YW5jZSA8IGJlc3QueS5hYnNEaXN0YW5jZVxuICAgICAgICAgICkge1xuICAgICAgICAgICAgYmVzdC55ID0gY3VycmVudEJlc3QueTtcbiAgICAgICAgICB9IGVsc2UgaWYgKGJlc3QueS5hYnNEaXN0YW5jZSA9PT0gY3VycmVudEJlc3QueS5hYnNEaXN0YW5jZSkge1xuICAgICAgICAgICAgY29uc3Qgc291cmNlUmVjdCA9IGdldFJlY3Qoc291cmNlUGFjayk7XG4gICAgICAgICAgICBjb25zdCB0YXJnZXRSZWN0ID0gY3VycmVudEJlc3QueS50YXJnZXQucmVjdDtcbiAgICAgICAgICAgIGNvbnN0IGxhc3RCZXN0UmVjdCA9IGJlc3QueS50YXJnZXQucmVjdDtcbiAgICAgICAgICAgIGNvbnN0IGN1cnJlbnREaWZmWCA9IGRpc3RhbmNlQmV0d2VlblhDZW50ZXJzT2ZSZWN0cyhzb3VyY2VSZWN0LCB0YXJnZXRSZWN0KTtcbiAgICAgICAgICAgIGNvbnN0IGRpZmZYID0gZGlzdGFuY2VCZXR3ZWVuWENlbnRlcnNPZlJlY3RzKHNvdXJjZVJlY3QsIGxhc3RCZXN0UmVjdCk7XG5cbiAgICAgICAgICAgIGlmIChjdXJyZW50RGlmZlggPCBkaWZmWCkge1xuICAgICAgICAgICAgICBiZXN0LnkgPSBjdXJyZW50QmVzdC55O1xuICAgICAgICAgICAgfSBlbHNlIGlmIChjdXJyZW50RGlmZlggPT09IGRpZmZYKSB7XG4gICAgICAgICAgICAgIGNvbnN0IGdhcCA9IGF0dHJhY3REaXN0YW5jZSAvIDM7XG5cbiAgICAgICAgICAgICAgaWYgKGN1cnJlbnRCZXN0LnkucmF3RGlzdGFuY2UgPCAtZ2FwKSB7XG4gICAgICAgICAgICAgICAgaWYgKGN1cnJlbnRCZXN0LnkuYWxpZ25tZW50ID09PSBBbGlnbm1lbnQuYm90dG9tVG9Cb3R0b20pIHtcbiAgICAgICAgICAgICAgICAgIGJlc3QueSA9IGN1cnJlbnRCZXN0Lnk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB9IGVsc2UgaWYgKGN1cnJlbnRCZXN0LnkucmF3RGlzdGFuY2UgPiBnYXApIHtcbiAgICAgICAgICAgICAgICBpZiAoY3VycmVudEJlc3QueS5hbGlnbm1lbnQgPT09IEFsaWdubWVudC50b3BUb1RvcCkge1xuICAgICAgICAgICAgICAgICAgYmVzdC55ID0gY3VycmVudEJlc3QueTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIH0gZWxzZSBpZiAoY3VycmVudEJlc3QueS5hbGlnbm1lbnQgPT09IEFsaWdubWVudC55Q2VudGVyVG9ZQ2VudGVyKSB7XG4gICAgICAgICAgICAgICAgY29uc3QgbGFzdFJlY3QgPSBjdXJyZW50QmVzdC55LnRhcmdldC5yZWN0O1xuICAgICAgICAgICAgICAgIGNvbnN0IGN1cnJlbnRSZWN0ID0gYmVzdC55LnRhcmdldC5yZWN0O1xuICAgICAgICAgICAgICAgIGNvbnN0IGxhc3RYQmFzZSA9IGxhc3RSZWN0LnJpZ2h0ICsgbGFzdFJlY3QubGVmdDtcbiAgICAgICAgICAgICAgICBjb25zdCBjdXJyZW50WEJhc2UgPS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W50KSkge1xuICAgICAgICAgIGlmIChiZXN0LnggPT09IHVuZGVmaW5lZCB8fCBkaXN0YW5jZS5hYnNEaXN0YW5jZSA8IGJlc3QueC5hYnNEaXN0YW5jZSkge1xuICAgICAgICAgICAgYmVzdC54ID0gZGlzdGFuY2U7XG4gICAgICAgICAgfSBlbHNlIGlmIChiZXN0LnguYWJzRGlzdGFuY2UgPT09IGRpc3RhbmNlLmFic0Rpc3RhbmNlKSB7XG4gICAgICAgICAgICBjb25zdCBnYXAgPSBhdHRyYWN0RGlzdGFuY2UgLyAzO1xuXG4gICAgICAgICAgICBpZiAoZGlzdGFuY2UucmF3RGlzdGFuY2UgPiBnYXApIHtcbiAgICAgICAgICAgICAgaWYgKGRpc3RhbmNlLmFsaWdubWVudCA9PT0gQWxpZ25tZW50LmxlZnRUb0xlZnQpIHtcbiAgICAgICAgICAgICAgICBiZXN0LnggPSBkaXN0YW5jZTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIGlmIChkaXN0YW5jZS5yYXdEaXN0YW5jZSA8IC1nYXApIHtcbiAgICAgICAgICAgICAgaWYgKGRpc3RhbmNlLmFsaWdubWVudCA9PT0gQWxpZ25tZW50LnJpZ2h0VG9SaWdodCkge1xuICAgICAgICAgICAgICAgIGJlc3QueCA9IGRpc3RhbmNlO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGVsc2UgaWYgKGRpc3RhbmNlLmFsaWdubWVudCA9PT0gQWxpZ25tZW50LnhDZW50ZXJUb1hDZW50ZXIpIHtcbiAgICAgICAgICAgICAgYmVzdC54ID0gZGlzdGFuY2U7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9IGVsc2UgaWYgKEFsaWdubWVudFlzLmluY2x1ZGVzKGFsaWdubWVudCkpIHtcbiAgICAgICAgICBpZiAoYmVzdC55ID09PSB1bmRlZmluZWQgfHwgZGlzdGFuY2UuYWJzRGlzdGFuY2UgPCBiZXN0LnkuYWJzRGlzdGFuY2UpIHtcbiAgICAgICAgICAgIGJlc3QueSA9IGRpc3RhbmNlO1xuICAgICAgICAgIH0gZWxzZSBpZiAoYmVzdC55LmFic0Rpc3RhbmNlID09PSBkaXN0YW5jZS5hYnNEaXN0YW5jZSkge1xuICAgICAgICAgICAgY29uc3QgZ2FwID0gYXR0cmFjdERpc3RhbmNlIC8gMztcblxuICAgICAgICAgICAgaWYgKGRpc3RhbmNlLnJhd0Rpc3RhbmNlIDwgLWdhcCkge1xuICAgICAgICAgICAgICBpZiAoZGlzdGFuY2UuYWxpZ25tZW50ID09PSBBbGlnbm1lbnQuYm90dG9tVG9Cb3R0b20pIHtcbiAgICAgICAgICAgICAgICBiZXN0LnkgPSBkaXN0YW5jZTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIGlmIChkaXN0YW5jZS5yYXdEaXN0YW5jZSA+IGdhcCkge1xuICAgICAgICAgICAgICBpZiAoZGlzdGFuY2UuYWxpZ25tZW50ID09PSBBbGlnbm1lbnQudG9wVG9Ub3ApIHtcbiAgICAgICAgICAgICAgICBiZXN0LnkgPSBkaXN0YW5jZTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIGlmIChkaXN0YW5jZS5hbGlnbm1lbnQgPT09IEFsaWdubWVudC55Q2VudGVyVG9ZQ2VudGVyKSB7XG4gICAgICAgICAgICAgIGJlc3QueSA9IGRpc3RhbmNlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfVxuXG4gICAgICByZXR1cm4gYXR0cmFjdGlvbjtcbiAgICB9LFxuICAgIHtcbiAgICAgIHNvdXJjZTogc291cmNlUGFjayxcbiAgICAgIHRhcmdldDogdGFyZ2V0UGFjayxcbiAgICAgIHJlc3VsdHM6IFtdLFxuICAgICAgYmVzdDoge30sXG4gICAgfSxcbiAgKTtcblxuICByZXR1cm4gc2luZ2xlQXR0cmFjdGlvbjtcbn1cblxuZXhw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uICAgICAgICAgICAgc291cmNlUmF3UmVjdC54ICsgc291cmNlSW5QYXJlbnRPZmZzZXQueCxcbiAgICAgICAgICAgIHNvdXJjZVJhd1JlY3QueSArIHNvdXJjZUluUGFyZW50T2Zmc2V0LnksXG4gICAgICAgICAgKSxcbiAgICAgICAgICBhdHRyYWN0aW9uQmVzdDogbnVsbCxcbiAgICAgICAgfTtcbiAgICAgIH1cbiAgICB9XG5cbiAgICBpZiAodW5hdHRyYWN0UmVzdWx0cy5sZW5ndGggPiAwKSB7XG4gICAgICBjb25zdCB1bmF0dHJhY3RFdmVudERldGFpbDogVW5hdHRyYWN0RXZlbnREZXRhaWwgPSB7XG4gICAgICAgIHNvdXJjZTogc291cmNlSW5QYXJlbnRQYWNrLFxuICAgICAgICBuZXh0UmVjdDogc291cmNlQXR0cmFjdGlvbkluUGFyZW50UmVjdCxcbiAgICAgICAgYXR0cmFjdGlvbjogc291cmNlQXR0cmFjdGlvbixcbiAgICAgIH07XG5cbiAgICAgIHRyaWdnZXJFdmVudDxVbmF0dHJhY3RFdmVudERldGFpbD4oXG4gICAgICAgIHNvdXJjZVJhdyxcbiAgICAgICAgRXZlbnQudW5hdHRyYWN0LFxuICAgICAgICB7XG4gICAgICAgICAgYnViYmxlczogdHJ1ZSxcbiAgICAgICAgICBjYW5jZWxhYmxlOiBmYWxzZSxcbiAgICAgICAgICBjb21wb3NlZDogdHJ1ZSxcbiAgICAgICAgICBkZXRhaWw6IHVuYXR0cmFjdEV2ZW50RGV0YWlsLFxuICAgICAgICB9LFxuICAgICAgKTtcbiAgICB9XG5cbiAgICBpZiAoYXR0cmFjdG1vdmVSZXN1bHRzLmxlbmd0aCA+IDApIHtcbiAgICAgIGNvbnN0IGF0dHJhY3Rtb3ZlRXZlbnREZXRhaWw6IEF0dHJhY3Rtb3ZlRXZlbnREZXRhaWwgPSB7XG4gICAgICAgIHNvdXJjZTogc291cmNlSW5QYXJlbnRQYWNrLFxuICAgICAgICBuZXh0UmVjdDogc291cmN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