PageSourceSearch

https://www.xconda.ai/_nuxt/GhmFAPo_.js

js xconda.ai collected 2026-10-05 14:56:50 UTC 7,762 bytes, 1 lines download raw bytes

1import{J as fe,a2 as pe,K as he,an as ge,O as we,N as xe,r as v,o as O,c as ye,i as _e,S as W,a as T,G as i,H as d,D as Ae,t as g,C as s,a1 as S,a5 as be,E as N,y as Me,aq as Ce,x as Y,a4 as Ie,ae as ke,b as I,aw as Se,as as Pe,A as Te,n as Ne,_ as Be}from"#entry";import{u as Ee,T as De}from"./5nYfxCvg.js";import{T as Le}from"./Cq54pEI-.js";import{B as Ge}from"./BJZlwWaz.js";import{N as $e}from"./DuPs3Fd8.js";import{G as Re}from"./BXLB-F7p.js";import{E as Ue,a as z}from"./CrFoN066.js";import{u as Fe}from"./BOaHvrgt.js";import{u as Ve}from"./9v-N5e3b.js";import"./DH3R62Yr.js";import"./FaDr1iyu.js";import"./BCHaitK1.js";import"./BC9Pa7jE.js";const Xe={class:"flex items-start justify-start max-w-full overflow-x-hidden"},je={class:"w-[524px] max-w-[524px] min-w-[524px] pt-[20px] pe-[10px] min-h-screen-100 max-h-screen-100 overflow-y-auto no-scrollbar"},qe={class:"tool-desc"},He=["inert"],Oe={class:"step-hints flex gap-[20px] mb-[12px]"},We={class:"flex items-center gap-[10px] mt-[14px] flex-wrap"},Ye={class:"rigt-detl grow relative min-h-screen-nav max-h-screen-nav overflow-y-auto no-scrollbar"},ze={key:0,class:"rslt-wrap w-full relative"},Je={class:"w-full flex flex-col gap-y-[20px]"},Ke={class:"btn-area w-full flex-dflt justify-end mt-9"},Ze=fe({__name:"spin-angle",setup(Qe){const B=Ee(),{t:E}=pe(),F=Le["spin-angle"];he({title:F});const{post:J}=Fe(),{hasEnghCrdtClnt:K,loadInitList:Z,dnldZip:Q,deltAll:ee,calcCrdtCost:te}=ge(),{showToast:D}=we(),ne=xe(),w=v(null),P=v(null),_=v(!1),f=v(!1);let x=0;O(()=>{x++});const p=v(null),h=v(null),r=v(null),y=v(!1),o=v(null),m=v([]),{subscribePendings:V}=Ve(),ae=ye(()=>!f.value&&_.value&&!!p.value&&!!h.value);_e(async()=>{document.documentElement.classList.add("overflow-y-hidden"),await L()});async function L(){m.value=[];const e=await Z(Ue.SPIN_ANGLE,{includePending:!0});e&&e.code===W.Success&&(m.value=e.rslt,V(m))}async function le(){const e=m.value?.filter(n=>n.mdiaUrl).map(n=>n.mdiaId);e&&e.length>0?await Q(e,"spin-angle"):D("No downloadable images yet")}function se(){const e=m.value.map(n=>n.mdiaId);e&&e.length>0&&ee(e,async()=>{await L()})}O(()=>{document.documentElement.classList.remove("overflow-y-hidden")});function X(e,n,t){const a=15*$(),l=t.x-n.x,u=t.y-n.y,c=Math.atan2(u,l);e.beginPath(),e.moveTo(n.x,n.y),e.lineTo(t.x,t.y),e.lineTo(t.x-a*Math.cos(c-Math.PI/6),t.y-a*Math.sin(c-Math.PI/6)),e.moveTo(t.x,t.y),e.lineTo(t.x-a*Math.cos(c+Math.PI/6),t.y-a*Math.sin(c+Math.PI/6)),e.stroke()}function k(e,n){const t=w.value,a=t?.getContext("2d"),l=P.value;if(!t||!a||!l)return;a.clearRect(0,0,t.width,t.height),a.drawImage(l,0,0,t.width,t.height);const u=p.value,c=h.value;a.strokeStyle="#ef4444",a.lineWidth=3*$(),a.fillStyle="rgba(239, 68, 68, 0.2)",u&&(a.beginPath(),a.arc(u.cx,u.cy,u.radius,0,2*Math.PI),a.stroke(),a.fill()),c&&X(a,c.from,c.to)}function G(e){const n=w.value,t=n.getBoundingClientRect(),a=n.width/t.width,l=n.height/t.height;return{x:(e.clientX-t.left)*a,y:(e.clientY-t.top)*l}}function $(){const e=w.value;if(!e)return 1;const n=e.getBoundingClientRect();return n.width>0?e.width/n.width:1}function oe(e){if(f.value)return;const n=++x;f.value=!0;const t=new FileReader;t.onerror=()=>{n===x&&(f.value=!1)},t.onload=a=>{if(n!==x)return;const l=new Image;l.onerror=()=>{n===x&&(f.value=!1)},l.onload=()=>{n===x&&(f.value=!1,p.value=null,h.value=null,r.value=null,P.value=l,_.value=!0,Se(()=>{const u=w.value;if(!u)return;const c=2048;let A=l.width,b=l.height;if(A>c||b>c){const H=Math.min(c/A,c/b);A=Math.round(A*H),b=Math.round(b*H)}u.width=A,u.height=b;const R=484,U=500;let M=A,C=b;M>R&&(C=Math.round(C*R/M),M=R),C>U&&(M=Math.round(M*U/C),C=U),u.style.width=`${M}px`,u.style.height=`${C}px`,k()}))},l.src=a.target?.result},t.readAsDataURL(e)}function j(e){r.value=r.value===e?null:e}function ie(){p.value=null,h.value=null,r.value=null,k()}function q(){x++,f.value=!1,_.value=!1,P.value=null,p.value=null,h.value=null,r.value=null,y.value=!1,o.value=null}function re(e){!r.value||!_.value||(y.value=!0,o.value=G(e))}function ce(e){if(!y.value||!o.value||!r.value)return;const n=G(e);k();const a=w.value.getContext("2d");
1if(a.strokeStyle="#f87171",a.lineWidth=3*$(),a.fillStyle="rgba(248, 113, 113, 0.3)",r.value==="circle"){const l=Math.sqrt((n.x-o.value.x)**2+(n.y-o.value.y)**2);a.beginPath(),a.arc(o.value.x,o.value.y,l,0,2*Math.PI),a.stroke(),a.fill()}else r.value==="arrow"&&X(a,o.value,n)}function ue(e){if(!y.value||!o.value||!r.value)return;const n=G(e);if(r.value==="circle"){const t=Math.sqrt((n.x-o.value.x)**2+(n.y-o.value.y)**2);t>5&&(p.value={cx:o.value.x,cy:o.value.y,radius:t})}else r.value==="arrow"&&Math.sqrt((n.x-o.value.x)**2+(n.y-o.value.y)**2)>10&&(h.value={from:o.value,to:n});y.value=!1,o.value=null,k()}function de(){y.value&&(y.value=!1,o.value=null,k())}async function me(){B.value||K(Pe.IMAGE,z.spinAngleCrdt,1)&&ne.confirm(E("cnfmAlrt.willGenImg"),async()=>{if(B.value)return;const n=w.value.toDataURL("image/jpeg",.9).split(",")[1];try{const t=await J(Te.GNRT_IMG_SPIN_ANGLE,{srcBase64:n,mimeType:"image/jpeg"});if(t.code===W.Success&&t.rslt){const{docId:a}=t.rslt;m.value.unshift({mdiaId:a,stat:Ne.Starting,mdiaUrl:null,rgstAt:Date.now()}),V(m)}else D(E("cnfmAlrt.gnrtErr"))}catch(t){console.error("[SPIN-ANGLE][E]",t),D(E("cnfmAlrt.gnrtErr"))}})}async function ve(){await L()}return(e,n)=>{const t=be,a=Ce;return I(),T("section",Xe,[i("div",je,[i("h1",null,g(s(F)),1),i("p",qe,g(e.$t("cnfmAlrt.spinAngleDesc")),1),d(De,{class:"mt-[30px]",label:e.$t("cnfmAlrt.spinAngleUpld"),"preview-url":s(_)?s(P)?.src:null,accept:"image/*",busy:s(f),onFile:oe,onClear:q},null,8,["label","preview-url","busy"]),s(_)?(I(),T("div",{key:0,inert:s(f),class:"canvas-area mt-[20px]"},[i("div",Oe,[i("div",{class:S(["step-badge",s(p)?"step-done":"step-todo"])},[d(t,{name:s(p)?"lucide:check-circle-2":"lucide:circle-dashed",class:"w-[14px] h-[14px]"},null,8,["name"]),i("span",null,g(e.$t("cnfmAlrt.spinAngleCircle")),1)],2),i("div",{class:S(["step-badge",s(h)?"step-done":"step-todo"])},[d(t,{name:s(h)?"lucide:check-circle-2":"lucide:circle-dashed",class:"w-[14px] h-[14px]"},null,8,["name"]),i("span",null,g(e.$t("cnfmAlrt.spinAngleArrow")),1)],2)]),i("canvas",{ref_key:"canvasRef",ref:w,class:S(["canvas-el rounded-lg",s(r)?"cursor-crosshair":"cursor-default"]),onMousedown:re,onMousemove:ce,onMouseup:ue,onMouseleave:de},null,34),i("div",We,[i("button",{class:S(["tool-btn",s(r)==="circle"&&"tool-btn-actv"]),onClick:n[0]||(n[0]=l=>j("circle"))},[d(t,{name:"radix-icons:circle",class:"w-[15px] h-[15px]"}),N(" "+g(e.$t("cnfmAlrt.spinAngleBtnCircle")),1)],2),i("button",{class:S(["tool-btn",s(r)==="arrow"&&"tool-btn-actv"]),onClick:n[1]||(n[1]=l=>j("arrow"))},[d(t,{name:"lucide:move-right",class:"w-[15px] h-[15px]"}),N(" "+g(e.$t("cnfmAlrt.spinAngleBtnArrow")),1)],2),i("button",{class:"tool-btn",onClick:ie},[d(t,{name:"tabler:trash-x",class:"w-[15px] h-[15px]"}),N(" "+g(e.$t("cnfmAlrt.spinAngleBtnClear")),1)]),i("button",{class:"tool-btn ml-auto",onClick:q},[d(t,{name:"lucide:image-plus",class:"w-[15px] h-[15px]"}),N(" "+g(e.$t("cnfmAlrt.spinAngleBtnNewImg")),1)])])],8,He)):Ae("",!0),d(Ge,{"gtm-gnrt":"",class:"mt-[40px]",dsab:s(B)||!s(ae),"crdt-cost":s(te)(s(z).spinAngleCrdt,1),onOnSbmt:me},null,8,["dsab","crdt-cost"])]),i("div",Ye,[d(a,null,{default:Me(()=>[s(m)&&s(m).length>0?(I(),T("div",ze,[i("div",Je,[(I(!0),T(Ie,null,ke(s(m),l=>(I(),Y(Re,{key:l.mdiaId,item:l,"tool-name":"spin-angle",onOnChng:ve},null,8,["item"]))),128))]),i("div",Ke,[d(t,{name:"material-symbols:download-rounded",class:"w-[23px] h-[23px]",onClick:le}),d(t,{name:"tabler:trash-x",class:"ml-[20px] w-[20px] h-[20px]",onClick:se})])])):(I(),Y($e,{key:1,clas:"pos-abs-center"}))]),_:1})])])}}}),vt=Be(Ze,[["__scopeId","data-v-b1748230"]]);export{vt 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.