1import{_ as O,S as $,M as q,E as K,t as Q}from"./D8f3P8Zk.js";import{r as d,o as U,c as j,i as T,e as S,f as p,a4 as F,g as E,Q as J,q as tt,d as et}from"./Pf7buPU6.js";import"./BcyFyP42.js";const r=44,c=8,ot=5,nt=260,it={__name:"VoixEditorShortcut",setup(at){const V=$(),b=q(),v=K("voix-editor-shortcut-position"),o=d({x:v.value?.x??12,y:v.value?.y??12}),u=d(!1),f=d(!1),_=d(0);let s=null,a=null,g=0,k=0,y=0,P=0,i=!1,x=0,m=0;const B=et(()=>b.query["voix-sync"]!==void 0);function M(t){Q(`/voix/studio?editing=${t}`,{open:{target:"_self"}})}function D(){return typeof window<"u"&&window.matchMedia?.("(prefers-reduced-motion: reduce)").matches===!0}function H(){const t=V.currentPage?.path;if(t){if(D()){M(t);return}s&&clearTimeout(s),_.value++,f.value=!0,s=setTimeout(M,nt,t)}}function R(){const t=i;i=!1,!t&&H()}function L(t,e,n){return Math.max(e,Math.min(n,t))}function h(t,e){const n=Math.max(c,window.innerWidth-r-c),l=Math.max(c,window.innerHeight-r-c);return{x:L(t,c,n),y:L(e,c,l)}}function X(t){t.button===0&&(a=t.pointerId,g=t.clientX,k=t.clientY,y=o.value.x,P=o.value.y,i=!1,t.currentTarget.setPointerCapture(t.pointerId))}function Y(t){if(a!==t.pointerId)return;const e=t.clientX-g,n=t.clientY-k;!i&&Math.hypot(e,n)<ot||(i=!0,u.value=!0,o.value=h(y+e,P+n))}function z(t){if(a!==t.pointerId)return;const e=t.currentTarget;e.hasPointerCapture(t.pointerId)&&e.releasePointerCapture(t.pointerId),a=null,i&&(v.value={x:o.value.x,y:o.value.y},u.value=!1)}function A(t){a===t.pointerId&&(a=null,i=!1,u.value=!1)}function w(){const t=window.innerWidth,e=window.innerHeight;if(x>0&&m>0){const{x:n,y:l}=o.value,N=n,C=x-n-r,W=l,I=m-l-r,Z=C<N?t-C-r:n,G=I<W?e-I-r:l;o.value=h(Z,G)}else o.value=h(o.value.x,o.value.y);x=t,m=e}return U(()=>{window.addEventListener("resize",w),w()}),j(()=>{window.removeEventListener("resize",w),s&&clearTimeout(s)}),(t,e)=>B.value?E("",!0):(T(),S("button",{key:0,class:tt(["voix-chip",{"voix-chip--dragging":u.value,"voix-chip--striking":f.value}]),style:J({left:`${o.value.x}px`,top:`${o.value.y}px`}),"aria-label":"Open Voix editor (drag to reposition)",onClick:R,onPointerdown:X,onPointermove:Y,onPointerup:z,onPointercancel:A},[e[1]||(e[1]=p("svg",{class:"voix-chip__mark voix-mark",viewBox:"3 3 48 85",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},[p("path",{class:"voix-mark__bottom",d:"M47.58,30.273c0,0 -9.469,2.017 -8.68,-5.523l3.42,-18.063c-0,-0 0.525,-2.017 -1.579,-2.806c-0,0 -1.929,-0.701 -3.069,1.14c-1.14,1.841 -19.991,37.703 -19.991,37.703c0,-0 -0.964,2.718 0.789,3.946c0,-0 0.877,1.051 2.718,0.613l4.823,-1.14c0,0 2.893,-0.789 4.734,1.578c0,0 1.491,1.141 0.965,4.297l-6.05,22.533c0,0 -0.701,1.842 1.403,2.806c-0,0 1.403,0.438 2.718,-1.228l20.956,-41.121c0,-0 1.052,-1.929 -0.614,-3.771c0,0 -1.315,-1.051 -2.367,-0.964l-0.176,0Z"}),p("path",{class:"voix-mark__middle",d:"M37.585,9.668l-3.42,18.062c-0.526,2.982 1.754,5.7 4.822,5.612l3.858,-0c2.456,-0.176 4.121,2.367 2.982,4.559l-20.956,41.122c-1.227,2.368 -4.823,0.964 -4.121,-1.579l6.05,-22.532c0.965,-3.508 -2.192,-6.664 -5.699,-5.875l-4.823,1.14c-2.63,0.614 -4.734,-2.192 -3.507,-4.56l19.991,-37.702c1.316,-2.543 5.174,-1.14 4.647,1.666l0.176,-0l-0,0.087Z"}),p("path",{class:"voix-mark__stroke",fill:"none","stroke-width":"0.88","stroke-linejoin":"miter",d:"M38.549,36.498c-0,0 -9.47,2.017 -8.68,-5.524l3.419,-18.062c0,-0 0.526,-2.017 -1.578,-2.806c-0,0 -1.929,-0.701 -3.069,1.14c-1.14,1.841 -19.991,37.702 -19.991,37.702c-0,0 -0.964,2.719 0.789,3.947c0,-0 0.877,1.051 2.718,0.613l4.823,-1.14c-0,0 2.893,-0.789 4.734,1.578c0,0 1.491,1.141 0.965,4.297l-6.05,22.534c-0,-0 -0.701,1.841 1.402,2.805c0,0 1.404,0.439 2.719,-1.227l20.956,-41.122c-0,-0 1.051,-1.929 -0.614,-3.771c-0,0 -1.315,-1.051 -2.368,-0.964l-0.175,0Z"})],-1)),f.value?(T(),S("span",{key:_.value,class:"voix-crack","aria-hidden":"true"},[...e[0]||(e[0]=[F('<svg viewBox="0 0 120 120" xmlns="http://www.w3.org/2000/svg" data-v-9531cf23><circle class="voix-crack__ring" cx="60" cy="60" r="24" data-v-9531cf23></circle><path class="voix-crack__bolt" d="M76 44 L88 34 L82 30 L96 16" data-v-9531cf23></path><path class="voix-crack__bolt" d="M76 76 L86 86 L80 92 L96 104" data-v-9531cf23></path><path class="voix-crack__bolt" d="M44 76 L32 86 L38 92 L22 104" data-v-9531cf23></path><path class="voix-crack__bolt" d="M44 44 L32 34 L38 28 L22 16" data-v-9531cf23></path></svg>',1)])])):E("",!0)],38))}},lt=O(it,[["__scopeId","data-v-9531cf23"]]);export{lt as default};
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.