PageSourceSearch

https://cdn.pacdora.com/_pacui/assets/usePreviewZoom-BnG7kYBRDK.js

js pacdora.com collected 2026-10-03 22:12:46 UTC 4,123 bytes, 1 lines download raw bytes

1import{Nt as e,an as t,ft as n,jt as r}from"./vue-DR-_0DQxXA.js";function i(i,a,o={}){let s=t(1),c=t(0),l=t(0),u=t(0),d=t(1),f=t(!1),p=t(!1),m=t(0),h=0,g=0,_=null;function v(){if(!_){let e=i.value;e&&(_=e.getBoundingClientRect())}return _}function y(){_=null}let b=n(()=>`translate3d(${c.value}px, ${l.value}px, 0) scale3d(${s.value}, ${s.value}, 1) rotate(${u.value}deg)`),x=n(()=>f.value&&s.value>d.value*1+.001),S=n(()=>s.value<d.value*20-.001),C=n(()=>{let e=i.value,t=(e==null?void 0:e.clientHeight)||0;return{top:o.paddingTop??t*.1,bottom:o.paddingBottom??96,left:o.paddingLeft??64,right:o.paddingRight??64}});function w(){let e=i.value,t=a.value;if(!e||!t)return;let n=e.clientWidth,r=e.clientHeight,o=C.value,s=n-o.left-o.right,c=r-o.top-o.bottom,l=t.naturalWidth||t.width,u=t.naturalHeight||t.height;if(!(!l||!u||s<=0||c<=0))return d.value=Math.min(s/l,c/u),d.value}function T(){y();let e=w();if(e==null)return;let t=i.value;if(!t)return;let n=t.clientHeight,r=C.value,a=(r.top+(n-r.bottom))/2,o=n/2;p.value=!0,s.value=e,c.value=0,l.value=a-o,u.value=0,f.value=!1,requestAnimationFrame(()=>{p.value=!1,requestAnimationFrame(()=>{l.value+=.01,requestAnimationFrame(()=>{l.value-=.01})})})}function E(){if(!S.value)return;
1let e=d.value*20,t=s.value,n=Math.min(t*1.5,e);f.value=!0;let r=n/t,i=k(n,c.value*r,l.value*r,t);V(n,i.x,i.y)}function D(){if(!x.value)return;let e=d.value*1,t=s.value,n=Math.max(t/1.5,e),r=n/t,i=k(n,c.value*r,l.value*r,t);V(n,i.x,i.y)}function O(){let e=i.value;if(!e)return{x:0,y:0};let t=e.clientHeight,n=C.value;return{x:0,y:(n.top+(t-n.bottom))/2-t/2}}function k(e,t,n,r){if(e>=r)return{x:t,y:n};let i=d.value,a=i*1.2;if(e>=a)return{x:t,y:n};let o=O();if(e<=i)return o;let s=(e-i)/(a-i);return{x:o.x+(t-o.x)*s,y:o.y+(n-o.y)*s}}function A(){u.value-=90}function j(){u.value+=90}function M(e){h=e.clientX,g=e.clientY}function N(e){if(e&&!S.value||!e&&!x.value||!i.value)return;let t=d.value*1,n=d.value*20,r=1.25,a=s.value,o=e?Math.min(a*r,n):Math.max(a/r,t),u=o/a,p=v();if(!p)return;let m=h-p.left-p.width/2,_=g-p.top-p.height/2,y=k(o,m-(m-c.value)*u,_-(_-l.value)*u,a);s.value=o,c.value=y.x,l.value=y.y,f.value||(f.value=!0)}function P(e){e.preventDefault();let t=e.deltaY<0;if(t&&!S.value||!t&&!x.value)return;let n=v();if(!n)return;let r=e.clientX-n.left-n.width/2,i=e.clientY-n.top-n.height/2,a=d.value*1,o=d.value*20,u=s.value,p=Math.max(-50,Math.min(50,e.deltaY)),m=Math.exp(-p*.004),h=Math.max(a,Math.min(o,u*m)),g=h/u,_=k(h,r-(r-c.value)*g,i-(i-l.value)*g,u);s.value=h,c.value=_.x,l.value=_.y,f.value||(f.value=!0)}let F=!1,I=t(!1),L=0,R=0,z=0,B=0;function V(e,t,n){s.value=e,c.value=t,l.value=n}function H(e=s.value,t=c.value,n=l.value){let r=i.value,o=a.value;if(!r||!o)return{x:0,y:0};let d=r.clientWidth,f=r.clientHeight,p=o.naturalWidth||o.width,m=o.naturalHeight||o.height,h=(u.value%360+360)%360,g=h===90||h===270,_=(g?m:p)*e,v=(g?p:m)*e,y=t,b=n;if(_>d){let e=_/2-d/2,t=d/2-_/2;y=Math.max(t,Math.min(e,y))}else y=0;if(v>f){let e=v/2-f/2,t=f/2-v/2;b=Math.max(t,Math.min(e,b))}else{let e=f,t=C.value;b=(t.top+(e-t.bottom))/2-e/2}return{x:y,y:b}}function U(e){if(e.button!==0)return;p.value=!0,F=!0,I.value=!0,L=e.clientX,R=e.clientY,z=c.value,B=l.value,m.value=0;let t=e=>{if(!F)return;let t=e.clientX-L,n=e.clientY-R;m.value=Math.sqrt(t*t+n*n),c.value=z+t,l.value=B+n},n=()=>{F=!1,I.value=!1,p.value=!1,window.removeEventListener(`pointermove`,t),window.removeEventListener(`pointerup`,n);let e=H();V(s.value,e.x,e.y),setTimeout(()=>{m.value=0},50)};window.addEventListener(`pointermove`,t),window.addEventListener(`pointerup`,n)}function W(){y(),T()}function G(){y()}return e(()=>{window.addEventListener(`resize`,W),window.addEventListener(`scroll`,G,!0),window.addEventListener(`mousemove`,M)}),r(()=>{window.removeEventListener(`resize`,W),window.removeEventListener(`scroll`,G,!0),window.removeEventListener(`mousemove`,M)}),{scale:s,offsetX:c,offsetY:l,rotation:u,transformStyle:b,skipTransition:p,isDragging:I,lastDragDistance:m,canZoomOut:x,canZoomIn:S,zoomIn:E,zoomOut:D,rotateLeft:A,rotateRight:j,resetView:T,onWheel:P,onPointerDown:U,zoomAtCursor:N}}export{i as t};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.