1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7271],{17715:function(e,t,a){a.d(t,{T:function(){return i}});var r=a(57437),n=a(38706);function i(e){let{titulo:t,cuerpo:a,detalle:i,onVerPlanes:o,onCerrar:l}=e,s=(0,n.T)("viewer");return(0,r.jsx)("div",{onClick:l,style:{position:"fixed",inset:0,zIndex:1e4,background:"rgba(0,0,0,0.72)",backdropFilter:"blur(4px)",display:"flex",alignItems:"center",justifyContent:"center",padding:20},children:(0,r.jsxs)("div",{onClick:e=>e.stopPropagation(),style:{maxWidth:460,width:"100%",borderRadius:18,padding:"26px 24px",background:"linear-gradient(145deg, rgba(22,22,22,0.98) 0%, rgba(13,13,13,0.99) 100%)",border:"1px solid rgba(255,255,255,0.08)",boxShadow:"0 24px 60px rgba(0,0,0,0.6)"},children:[(0,r.jsx)("h2",{style:{fontSize:17,fontWeight:700,color:"#fff",margin:0,lineHeight:1.35},children:t}),(0,r.jsx)("p",{style:{fontSize:13.5,color:"rgba(255,255,255,0.62)",marginTop:10,lineHeight:1.6},children:a}),i&&(0,r.jsx)("p",{style:{fontSize:12.5,color:"#a3e635",marginTop:12,padding:"8px 12px",borderRadius:10,background:"rgba(163,230,53,0.08)",border:"1px solid rgba(163,230,53,0.18)"},children:i}),(0,r.jsxs)("div",{style:{display:"flex",gap:10,marginTop:20},children:[(0,r.jsx)("button",{onClick:o,style:{flex:1,padding:"11px 16px",borderRadius:11,border:"none",background:"#a3e635",color:"#000",fontSize:13.5,fontWeight:700,cursor:"pointer"},children:s("aviso_plan_ver")}),(0,r.jsx)("button",{onClick:l,style:{padding:"11px 16px",borderRadius:11,cursor:"pointer",border:"1px solid rgba(255,255,255,0.1)",background:"transparent",color:"rgba(255,255,255,0.6)",fontSize:13.5,fontWeight:600},children:s("aviso_plan_ahora_no")})]})]})})}},7271:function(e,t,a){a.r(t),a.d(t,{default:function(){return C}});var r=a(57437),n=a(2265),i=a(63925),o=a(54887),l=a(38706),s=a(69234),c=a(29827),d=a(55363),u=a(4907);let x=e=>e.startsWith("temp-"),h={mediciones:[],flechas:[],notas:[]},p=e=>Array.isArray(e)?e:[],m=/^rx\d{1,2}$/;function g(e){return e?e.mediciones.length+e.flechas.length+e.notas.length:0}function f(e){return Object.values(e).reduce((e,t)=>e+g(t),0)}var b=a(98467);async function v(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1600,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:.9,r=await new Promise(t=>{let a=new window.Image;a.onload=()=>t(a),a.onerror=()=>t(null),a.src=e});if(!r||!r.naturalWidth||!r.naturalHeight)return e;let n=Math.max(r.naturalWidth,r.naturalHeight);if(n<=t)return e;let i=t/n,o=document.createElement("canvas");o.width=Math.round(r.naturalWidth*i),o.height=Math.round(r.naturalHeight*i);let l=o.getContext("2d");if(!l)return e;l.imageSmoothingEnabled=!0,l.imageSmoothingQuality="high",l.drawImage(r,0,0,o.width,o.height);try{return o.toDataURL("image/jpeg",a)}catch(t){return e}}var j=a(30166),y=a(17715);let w=(0,j.default)(()=>Promise.all([a.e(1259),a.e(9666),a.e(6646),a.e(6938)]).then(a.bind(a,16646)),{loadableGenerated:{webpack:()=>[16646]},ssr:!1}),_=(0,j.default)(()=>a.e(4189).then(a.bind(a,64189)).then(e=>e.CefalometriaVista),{loadableGenerated:{webpack:()=>[64189]},ssr:!1}),k=(0,j.default)(()=>a.e(2306).then(a.bind(a,2306)).then(e=>e.AnalysisView),{loadableGenerated:{webpack:()=>[2306]},ssr:!1}),N=(0,j.default)(()=>a.e(8005).then(a.bind(a,58005)).then(e=>e.MeasurementOverlay),{loadableGenerated:{webpack:()=>[58005]},ssr:!1});function C(e){var t,a,j;let{imageUrl:C,imageUrls:S,imageLabels:M,examId:L,examName:E,patientName:R,birthDate:W,subtype:z,clinicName:A,logoUrl:I,onBack:P,panoStateInicial:T,plan:D}=e,B=(0,l.T)("viewer"),H=(0,s.bU)(),F=(0,n.useRef)(null),U=(0,n.useRef)(null),O=S&&S.length>0?S:[C],V=O.length>
11,[q,Y]=(0,n.useState)(0),[X,G]=(0,n.useState)([]),[Z,J]=(0,n.useState)([]),[$,K]=(0,n.useState)(0);(0,n.useEffect)(()=>{let e=!1;return G(Array(O.length).fill(null)),J(Array(O.length).fill(!1)),K(O.length),O.forEach((t,a)=>{fetch(t).then(e=>{if(!e.ok)throw Error("fetch failed");return e.blob()}).then(t=>{if(e)return;let r=URL.createObjectURL(t);G(e=>{let t=[...e];return t[a]=r,t}),K(e=>e-1)}).catch(()=>{e||(J(e=>{let t=[...e];return t[a]=!0,t}),K(e=>e-1))})}),()=>{e=!0}},[C,null==S?void 0:S.join(",")]),(0,n.useEffect)(()=>{let e=!0;return X.forEach((t,a)=>{if(!t)return;let r=new window.Image;r.onload=()=>{e&&r.naturalWidth&&r.naturalHeight&&tf(e=>{var t,n;return(null===(t=e[a])||void 0===t?void 0:t.ancho)===r.naturalWidth&&(null===(n=e[a])||void 0===n?void 0:n.alto)===r.naturalHeight?e:{...e,[a]:{ancho:r.naturalWidth,alto:r.naturalHeight}}})},r.src=t}),()=>{e=!1}},[X]);let Q=(0,n.useRef)([]);Q.current=X,(0,n.useEffect)(()=>()=>{Q.current.forEach(e=>{e&&URL.revokeObjectURL(e)})},[]);let ee=["medir","flecha","nota"],[et,ea]=(0,n.useState)("puntero"),er=(0,n.useRef)(null),[en,ei]=(0,n.useState)(100),[eo,el]=(0,n.use
1State)(100),[es,ec]=(0,n.useState)(100),[ed,eu]=(0,n.useState)(!1),[ex,eh]=(0,n.useState)({x:0,y:0}),[ep,em]=(0,n.useState)(!1),[eg,ef]=(0,n.useState)({x:0,y:0}),[eb,ev]=(0,n.useState)(!1),[ej,ey]=(0,n.useState)(!1),ew="bitewing"===z||"periapical_total"===z,[e_,ek]=(0,n.useState)(()=>ew&&O.length>1),[eN,eC]=(0,n.useState)(!1),eS=V&&O.length>=2,eM="teleradiografia"===z,eL="teleradiografia"===z?B("rx_subtipo_tele"):"panoramica"===z?B("rx_subtipo_pano"):"periapical"===z?B("rx_subtipo_periapical"):"periapical_total"===z?B("rx_subtipo_periapicalTotal"):"bitewing"===z?B("rx_subtipo_bitewing"):B("rx_subtipo_otra"),[eE,eR]=(0,n.useState)(!1),eW="free"===D,[ez,eA]=(0,n.useState)(!1),[eI,eP]=(0,n.useState)(null),[eT,eD]=(0,n.useState)(null),[eB,eH]=(0,n.useState)({}),eF=(0,n.useRef)(null),eU=(0,n.useRef)("rx".concat(Math.random().toString(36).slice(2,10))),[eO,eV]=(0,n.useState)(!1),[eq,eY]=(0,n.useState)(!1),[eX,eG]=(0,n.useState)(!1),[eZ,eJ]=(0,n.useState)(0),e$=(0,n.useRef)(!1),eK=(0,n.useRef)(null),eQ=(0,c.RB)(q),e0=function(e){let[t,a]=(0,n.useState)([]),[r,i]=(0,n.useState)(!1);(0,n.useEffect)(()=>{if(!e){a([]);return}let t=!0;return i(!0),fetch("/api/exams/".concat(e,"/analysis")).then(e=>e.ok?e.json():null).then(e=>{t&&(null==e?void 0:e.scenes)&&a(e.scenes.map(e=>{var t,a,r,n,i;return{id:String(e.id),imageDataUrl:String(null!==(t=e.imageUrl)&&void 0!==t?t:""),comment:String(null!==(a=e.comment)&&void 0!==a?a:""),sourceView:String(null!==(r=e.sourceView)&&void 0!==r?r:""),timestamp:new Date(String(null!==(n=e.createdAt)&&void 0!==n?n:"")).getTime()||Date.now(),origin:"plate"===e.origin||"ortodoncia"===e.origin?e.origin:"analysis",estado:null!==(i=e.estado)&&void 0!==i?i:void 0,audioUrl:e.audioUrl||void 0}}))}).catch(()=>{}).finally(()=>{t&&i(!1)}),()=>{t=!1}},[e]);let o=(0,n.useCallback)(async(t,r,n,i)=>{let o="temp-".concat(Date.now(),"-").concat(Math.random().toString(36).slice(2,8));if(a(e=>[{id:o,imageDataUrl:t,comment:r,sourceView:n,timestamp:Date.now(),origin:"analysis",estado:i},...e]),!e)return o;let l=()=>a(e=>e.filter(e=>e.id!==o));try{var s;let c=await fetch("/api/exams/".concat(e,"/analysis"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({imageBase64:t,comment:r,sourceView:n,estado:i})});if(!c.ok)return l(),null;let{scene:d}=await c.json(),u=String(null!==(s=null==d?void 0:d.id)&&void 0!==s?s:o);return a(e=>e.map(e=>e.id===o?{...e,id:u}:e)),u}catch(e){return l(),null}},[e]),l=(0,n.useCallback)(async t=>{if(a(e=>e.filter(e=>e.id!==t)),!(!e||x(t)))try{await fetch("/api/exams/".concat(e,"/analysis"),{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({sceneId:t})})}catch(e){}},[e]),s=(0,n.useCallback)(async(t,r)=>{if(a(e=>e.map(e=>e.id===t?{...e,comment:r}:e)),!(!e||x(t)))try{await fetch("/api/exams/".concat(e,"/analysis"),{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({sceneId:t,comment:r})})}catch(e){}},[e]),c=(0,n.useCallback)(async t=>{let r=[];if(a(e=>{let a=new Map(e.map(e=>[e.id,e])),n=t.map(e=>a.get(e)).filter(Boolean);for(let a of e)t.includes(a.id)||n.push(a);return r=n.filter(e=>!x(e.id)).map(e=>e.id),n}),e)try{await fetch("/api/exams/".concat(e,"/analysis"),{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({orden:r})})}catch(e){}},[e]),d=t.filter(e=>!e.origin||"analysis"===e.origin);return{escenas:t,visibles:d,cargando:r,agregar:o,borrar:l,renombrar:s,reordenar:c}}
1(L),[e1,e2]=(0,n.useState)(!1),[e5,e3]=(0,n.useState)(!1),e4=(0,n.useRef)(null),e6=(0,c.hq)(W);(0,n.useEffect)(()=>{if(!e5)return;let e=e=>{var t;(null===(t=e4.current)||void 0===t?void 0:t.contains(e.target))||e3(!1)},t=e=>{"Escape"===e.key&&e3(!1)};return document.addEventListener("mousedown",e),document.addEventListener("keydown",t),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("keydown",t)}},[e5]);let[e8,e7]=(0,n.useState)(!1),[e9,te]=(0,n.useState)(null),[tt,ta]=(0,n.useState)(null),tr=!!L&&!eO&&!tt,[tn,ti]=(0,n.useState)({}),[to,tl]=(0,n.useState)(null),[ts,tc]=(0,n.useState)(""),[td,tu]=(0,n.useState)(!1),tx=(0,n.useRef)(0),[th,tp]=(0,n.useState)(null),tm=(0,n.useRef)(null),[tg,tf]=(0,n.useState)({}),tb=null!==(t=tg[q])&&void 0!==t?t:null;ee.includes(et);let tv=null!==(j=tn[eQ])&&void 0!==j?j:h,tj=tv.mmPorPixel,ty=(0,n.useCallback)(e=>{eO||ti(t=>{var a;return{...t,[eQ]:e(null!==(a=t[eQ])&&void 0!==a?a:h)}})},[eQ,eO]),tw=e=>"".concat(e,"_").concat(Date.now(),"_").concat(tx.current++);(0,n.useEffect)(()=>{window.matchMedia("(min-width: 768px)").matches&&ey(!0)},[]),(0,n.useEffect)(()=>{let e=!1;return(async()=>{let t=null!=T?T:null;if(!t&&L)try{var a,r;let e=await fetch("/api/exams/".concat(L,"/pano-state"));e.ok&&(t=null!==(r=null===(a=await e.json())||void 0===a?void 0:a.state)&&void 0!==r?r:null)}catch(e){}if(e)return;eF.current=(0,d.j)(t);let n=(0,d.B)(t,"1"),i=(0,c.D6)(null==n?void 0:n.cefalometria);(0,c.Vh)(i)&&eH(e=>({...i,...e}));let o=function(e){if(!e||"object"!=typeof e)return{};let t={};for(let[a,r]of Object.entries(e)){if(!m.test(a)||!r||"object"!=typeof r)continue;let e="number"==typeof r.mmPorPixel&&r.mmPorPixel>0?r.mmPorPixel:void 0;t[a]={mediciones:p(r.mediciones),flechas:p(r.flechas),notas:p(r.notas),...void 0===e?{}:{mmPorPixel:e}}}return t}(null==n?void 0:n.anotacionesRx);f(o)>0&&ti(e=>({...o,...e})),e$.current=!0})(),()=>{e=!0}},[L,T]);let t_=(0,n.useRef)(!1);(0,c.Vh)(eB)&&(t_.current=!0),f(tn)>0&&(t_.current=!0);let tk=(0,n.useRef)(null),tN=(0,n.useCallback)(e=>{let t=tk.current;if(t&&L)try{fetch("/api/exams/".concat(L,"/pano-state"),{method:"PUT",headers:{"Content-Type":"application/json"},body:t,keepalive:e}).then(e=>{e.ok&&tk.current===t&&(tk.current=null)}).catch(()=>{})}catch(e){}},[L]);(0,n.useEffect)(()=>{let e=()=>tN(!0);return window.addEventListener("pagehide",e),()=>{window.removeEventListener("pagehide",e),tN(!1)}},[tN]),(0,n.useEffect)(()=>{if(!L||!e$.current||eO||!t_.current||tt)return;let e=JSON.stringify({toma:1,state:{v:2,cefalometria:(0,c.Vh)(eB)?eB:void 0,anotacionesRx:f(tn)>0?tn:void 0},basadoEn:eF.current,escritor:eU.current});tk.current=e;let t=setTimeout(()=>{fetch("/api/exams/".concat(L,"/pano-state"),{method:"PUT",headers:{"Content-Type":"application/json"},body:e,keepalive:!0}).then(async t=>{if(409===t.status){eV(!0);return}if(403===t.status){eG(!0);return}if(!t.ok){eY(!0);return}tk.current===e&&(tk.current=null),eY(!1);let a=await t.json().catch(()=>null);"string"==typeof(null==a?void 0:a.updatedAt)&&(eF.current=a.updatedAt)}).catch(()=>{eY(!0)})},1200);return()=>clearTimeout(t)},[eB,tn,L,eO,tt,eZ]),(0,n.useEffect)(()=>{let e=()=>{let e=U.current,t=tm.current;if(!e||!t||!e.naturalWidth||!e.naturalHeight){tp(null);return}let a=e.getBoundingClientRect(),r=t.getBoundingClientRect(),n=Math.min(a.width/e.naturalWidth,a.height/e.naturalHeight),i=e.naturalWidth*n,o=e.naturalHeight*n,l={left:a.left-r.left+(a.width-i)/2,top:a.top-r.top+(a.height-o)/2,width:i,height:o};tp(e=>e&&.5>Math.abs(e.left-l.left)&&.5>Math.abs(e.top-l.top)&&.5>Math.abs(e.width-l.width)&&.5>Math.abs(e.height-l.height)?e:l)};e();let t=U.current;null==t||t.addEventListener("load",e);let a="undefined"!=typeof ResizeObserver?new ResizeObserver(e):null;return a&&tm.current&&a.observe(tm.current),window.addEventListener("resize",e),()=>{null==t||t.removeEventListener("load",e),null==a||a.disconnect(),window.removeEventListener("resize",e)}},[en,ex,X,q,e_,e1,eN]);let tC=()=>{ei(100),el(100),ec(100),eu(!1),eh({x:0,y:0})},tS=e=>{Y(e),eh({x:0,y:0}),ei(100)},tM=()=>tS(q>0?q-1:O.length-1),tL=()=>tS(q<O.length-1?q+1:0);(0,n.useEffect)(()=>
1{if(!V)return;let e=e=>{let t=e.target;(!t||"INPUT"!==t.tagName&&"TEXTAREA"!==t.tagName&&!t.isContentEditable)&&(eE||e1||("ArrowLeft"===e.key&&tM(),"ArrowRight"===e.key&&tL()))};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[q,V,eE,e1]);let tE="brightness(".concat(eo,"%) contrast(").concat(es,"%) ").concat(ed?"invert(1)":""),tR=(0,n.useCallback)(e=>{e.preventDefault(),ei(t=>Math.min(400,Math.max(25,t+(e.deltaY>0?-10:10))))},[]),tW=e=>{if(!ee.includes(et)){if("brillo"===et||"zoom"===et){er.current={x:e.clientX,y:e.clientY,brillo:eo,contraste:es,zoom:en};return}("mano"===et||en>100)&&(em(!0),ef({x:e.clientX-ex.x,y:e.clientY-ex.y}))}},tz=e=>{let t=er.current;if(t){if("brillo"===et){let a=e.clientX-t.x,r=e.clientY-t.y;ec(Math.round(Math.min(200,Math.max(0,t.contraste+.4*a)))),el(Math.round(Math.min(200,Math.max(0,t.brillo-.4*r))))}else ei(Math.round(Math.min(400,Math.max(25,t.zoom-(e.clientY-t.y)*.6))));return}ep&&eh({x:e.clientX-eg.x,y:e.clientY-eg.y})},tA=()=>{er.current=null,em(!1)},tI=(0,i.u)({onMouseDown:tW,onMouseMove:tz,onMouseUp:tA}),tP=(0,n.useRef)(null);!function(e,t){let a=(0,n.useRef)(t);a.current=t,(0,n.useEffect)(()=>{let t=new Map,r=null,n=(t,a)=>{let r=e.current;if(!r)return!1;let n=r.getBoundingClientRect();return t>=n.left&&t<=n.right&&a>=n.top&&a<=n.bottom},i=e=>"touch"===e.pointerType||"pen"===e.pointerType,o=(e,t)=>Math.hypot(e.x-t.x,e.y-t.y)||1,l=(e,t)=>
1({x:(e.x+t.x)/2,y:(e.y+t.y)/2}),s=e=>{if(i(e)&&!a.current.desactivado&&n(e.clientX,e.clientY)&&(t.set(e.pointerId,{x:e.clientX,y:e.clientY}),2===t.size)){let[n,i]=Array.from(t.values());r={d:o(n,i),m:l(n,i)},a.current.alEmpezar(),e.preventDefault()}},c=e=>{if(!i(e)||!t.has(e.pointerId)||(t.set(e.pointerId,{x:e.clientX,y:e.clientY}),2!==t.size||!r))return;let[n,s]=Array.from(t.values()),c=l(n,s);a.current.alCambiar(o(n,s)/r.d,c.x-r.m.x,c.y-r.m.y,c),e.preventDefault()},d=e=>{if(!i(e))return;let n=t.has(e.pointerId);if(t.delete(e.pointerId),n&&r&&t.size<2){var o,l;r=null,null===(o=(l=a.current).alTerminar)||void 0===o||o.call(l)}},u={capture:!0,passive:!1};return document.addEventListener("pointerdown",s,u),document.addEventListener("pointermove",c,u),document.addEventListener("pointerup",d,u),document.addEventListener("pointercancel",d,u),()=>{document.removeEventListener("pointerdown",s,u),document.removeEventListener("pointermove",c,u),document.removeEventListener("pointerup",d,u),document.removeEventListener("pointercancel",d,u)}},[e])}(tm,{alEmpezar:()=>{tA(),tP.current={zoom:en,pan:ex}},alCambiar:(e,t,a)=>{let r=tP.current;r&&(ei(Math.round(Math.min(400,Math.max(25,r.zoom*e)))),eh({x:r.pan.x+t,y:r.pan.y+a}))},alTerminar:()=>{tP.current=null}});let tT=ee.includes(et)?"crosshair":"brillo"===et?"crosshair":"zoom"===et?"ns-resize":"mano"===et||en>100?ep?"grabbing":"grab":"default",tD=100!==en||100!==eo||100!==es||ed||0!==ex.x||0!==ex.y;(0,n.useEffect)(()=>{let e=()=>ev(!!document.fullscreenElement);return document.addEventListener("fullscreenchange",e),()=>document.removeEventListener("fullscreenchange",e)},[]),(0,n.useEffect)(()=>{if(!eI){eD(null);return}let e=()=>{eD("".concat(Math.round(eI.offsetWidth),"x").concat(Math.round(eI.offsetHeight)))};e();let t=new ResizeObserver(e);return t.observe(eI),()=>t.disconnect()},[eI]);let tB=async()=>{let e=X[q]||O[q],t=(0,c.aw)(eB[eQ])>0?await (0,u.z)(e,eK.current):null,a=document.createElement("a");a.href=null!=t?t:e,a.download=E?"".concat(E,"-").concat(q+1,".").concat(t?"png":"jpg"):"radiografia.".concat(t?"png":"jpg"),document.body.appendChild(a),a.click(),document.body.removeChild(a)},tH=async e=>{let t="".concat(B("cef_titulo")," \xb7 ").concat(e.nombreDelAnalisis);te(null);let a=await v(e.imagen);await e0.agregar(a,t,"cefalometria",(0,b.bu)(eQ,e.estado))||te(B("rx_analisis_fallo"))},tF=async()=>{let e=X[q]||O[q];if(e&&!e8){e7(!0);try{let t=await new Promise(t=>{let a=new window.Image;a.onload=()=>t(a),a.onerror=()=>t(null),a.src=e});if(!t||!t.naturalWidth)return;let a=document.createElement("canvas");a.width=t.naturalWidth,a.height=t.naturalHeight;let r=a.getContext("2d");if(!r)return;r.filter=tE,r.drawImage(t,0,0);let n=(null==M?void 0:M[q])||E||B("radiograph_defaultName");if(te(null),!await e0.agregar(await v(a.toDataURL("image/jpeg",.92)),n,"radiografia")){te(B("rx_analisis_fallo"));return}e2(!0)}finally{e7(!1)}}},tU=e=>{var t;let a=e0.visibles.find(t=>t.id===e),r=(0,b.fZ)(null==a?void 0:a.estado);if(!a||!r)return;let n=/^rx(\d+)$/.exec(r.fuente);if(n){let e=Number(n[1]);e!==q&&e<O.length&&tS(e)}ta({id:e,nombre:a.comment,fuente:r.fuente,antes:null!==(t=eB[r.fuente])&&void 0!==t?t:null}),eH(e=>({...e,[r.fuente]:r.trazado})),e2(!1),eR(!0)},tO=()=>{eR(!1),tt&&(eH(e=>{let t={...e};return tt.antes?t[tt.fuente]=tt.antes:delete t[tt.fuente],t}),ta(null))},tV=(e,t,a)=>{if((null==to?void 0:to.paso)==="trazar"){tl({paso:"escribir",pixeles:a}),tc("");return}ty(r=>({...r,mediciones:[...r.mediciones,{id:tw("m"),csIndex:q,start:e,end:t,distanceMm:a,labelOffset:{x:0,y:0}}]})),ea("puntero")},tq=(e,t,a)=>{ty(r=>({...r,flechas:[...r.flechas,{id:tw("f"),csIndex:q,start:e,end:t,labelOffset:{x:0,y:0},color:a}]}))},tY=(e,t)=>{t.trim()&&ty(a=>({...a,notas:[...a.notas,{id:tw("n"),csIndex:q,point:e,text:t,labelOffset:{x:0,y:0}}]}))},tX=(e,t)=>{ty(a=>({...a,mediciones:a.mediciones.map(a=>a.id===e?t(a):a)}))},tG=(e,t)=>{ty(a=>({...a,flechas:a.flechas.map(a=>a.id===e?t(a):a)}))},tZ=(e,t)=>{ty(a=>({...a,notas:a.notas.map(a=>a.id===e?t(a):a)}))},tJ=!!tb&&(!!L||g(tv)>0),t$=function(e){var t;let a=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return(0,r.jsx)(N,{imageWidth:tb.ancho,imageHeight:tb.alto,pixelSpacingMm:1,unidad:tj?"mm":B("rx_unidad_px"),measurements:(t=tv.mediciones,tj?t.map(e=>({...e,distanceMm:e.distanceMm*tj})):t),onAddMeasurement:tV,onDeleteMeasurement:e=>ty(t=>({...t,mediciones:t.mediciones.filter(t=>t.id!==e)})),onUpdateLabelOffset:(e,t)=>tX(e,e=>({...e,labelOffset:t}
1)),onUpdateEndpoints:(e,t,a,r)=>tX(e,e=>({...e,start:t,end:a,distanceMm:r})),isActive:"medir"===et,arrows:tv.flechas,isArrowActive:"flecha"===et,onAddArrow:tq,onDeleteArrow:e=>ty(t=>({...t,flechas:t.flechas.filter(t=>t.id!==e)})),onUpdateArrowPoints:(e,t,a)=>tG(e,e=>({...e,start:t,end:a})),onUpdateArrowColor:(e,t)=>tG(e,e=>({...e,color:t})),notes:tv.notas,isNoteActive:"nota"===et,onAddNote:tY,onDeleteNote:e=>ty(t=>({...t,notas:t.notas.filter(t=>t.id!==e)})),onUpdateNoteText:(e,t)=>tZ(e,e=>({...e,text:t})),onUpdateNote:(e,t)=>tZ(e,e=>({...e,...t})),isPointerActive:"puntero"===et&&!a},"".concat(eQ,":").concat(e))},tK=()=>{var e,t;if((null==to?void 0:to.paso)!=="escribir")return;let a=(e=to.pixeles,t=Number(ts.replace(",",".")),!Number.isFinite(e)||e<=0||!Number.isFinite(t)||t<=0?null:t/e);null!==a&&(ty(e=>({...e,mmPorPixel:a})),tl(null),tc(""),ea("medir"))},tQ=()=>{tl({paso:"trazar"}),tc(""),ea("medir")},t0=e=>{if("medir"===e&&!tj&&!td){tl({paso:"preguntar"});return}tl(null),ea(e)},t1=X[q],t2=Z[q];return t1||t2||!($>0)?t2&&!t1?(0,r.jsxs)("div",{className:"flex flex-col items-center justify-center h-screen bg-black text-white gap-4",children:[(0,r.jsx)("p",{className:"text-neutral-400 text-sm",children:B("radiograph_error")}),P&&(0,r.jsx)("button",{onClick:P,className:"text-[#a3e635] text-sm hover:underline",children:B("radiograph_back")})]}):(0,r.jsxs)("div",{ref:F,className:"flex flex-col h-screen bg-black text-white select-none",style:{paddingTop:"env(safe-area-inset-top)",paddingBottom:"env(safe-area-inset-bottom)"},children:[(0,r.jsxs)("div",{className:"px-2.5 md:px-[18px]",style:{display:"flex",alignItems:"center",justifyContent:"space-between",height:"56px",minHeight:"56px",gap:"8px",background:"linear-gradient(180deg, rgba(14,14,14,1) 0%, rgba(8,8,8,1) 100%)",borderBottom:"1px solid rgba(255,255,255,0.04)",boxShadow:"0 1px 8px rgba(0,0,0,0.4)",position:"relative",zIndex:200,flexShrink:0},children:[(0,r.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"9px",flex:"0 0 auto",minWidth:0},children:[P&&(0,r.jsx)("button",{onClick:P,title:B("radiograph_back"),style:{display:"flex",alignItems:"center",justifyContent:"center",width:"32px",height:"32px",borderRadius:"8px",background:"rgba(255,255,255,0.04)",border:"1px solid rgba(255,255,255,0.06)",cursor:"pointer",transition:"all 0.2s ease",marginRight:"4px",flexShrink:0},onMouseEnter:e=>{e.currentTarget.style.background="rgba(163,230,53,0.1)",e.currentTarget.style.borderColor="rgba(163,230,53,0.2)"},onMouseLeave:e=>{e.currentTarget.style.background="rgba(255,255,255,0.04)",e.currentTarget.style.borderColor="rgba(255,255,255,0.06)"},children:(0,r.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"rgba(255,255,255,0.5)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,r.jsx)("polyline",{points:"15 18 9 12 15 6"})})}),I&&(0,r.jsx)("img",{src:I,alt:A||"CBCTHub",style:{height:"26px",maxWidth:"110px",objectFit:"contain",borderRadius:"5px"}}),A&&(0,r.jsx)("span",{className:"hidden md:inline truncate",style:{fontSize:"14px",fontWeight:600,color:"#fff",letterSpacing:"-0.2px",maxWidth:"220px"},title:A,children:A})]}),(0,r.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"10px",flexShrink:0,minWidth:0},children:[(0,r.jsxs)("div",{className:"hidden md:flex",style:{alignItems:"center",gap:"7px",padding:"0 4px",fontSize:"13px",fontWeight:700,whiteSpace:"nowrap",color:"rgba(255,255,255,0.92)"},children:[(0,r.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"#a3e635",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:{flexShrink:0},children:[(0,r.jsx)("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2"}),(0,r.jsx)("path",{d:"M3 15l5-5 4 4 3-3 6 6"})]}),eL]}),(0,r.jsx)("div",{className:"hidden md:block",style:{width:"1px",height:"20px",background:"rgba(255,255,255,0.10)",flexShrink:0}}),(L||eM)&&(0,r.jsxs)("div",{style:{display:"flex",gap:"2px",padding:"3px",background:"rgba(255,255,255,0.03)",border:"1px solid rgba(255,255,255,0.06)",borderRadius:"12px",flexShrink:0},children:[L&&(0,r.jsxs)("button",{onClick:()=>eC(e=>!e),title:B("radiograph_report"),style:{padding:"8px 12px",borderRadius:"9px",border:"none",fontSize:"13px",fontWeight:600,cursor:"pointer",transition:"all 0.2s ease",background:eN?"rgba(163,230,53,0.13)":"transparent",color:eN?"#a3e635":"rgba(255,255,255,0.45)",boxShadow:"none",display:"flex",alignItems:"center",gap:"5px"},children:[(0,r.jsxs)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,r.jsx)("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),(0,r.jsx)("polyline",{points:"14 2 14 8 20 8"})]}),(0,r.jsx)("span",{className:"hidden md:inline",children:B("radiograph_report")})]}),eM&&(!!L||(0,c.Fl)(eB)>0)&&(0,r.jsxs)("button",{onClick:()=>
1{if(ea("puntero"),eW){eA(!0);return}eE?tO():eR(!0)},title:B("cef_titulo"),style:{padding:"8px 12px",borderRadius:"9px",border:"none",fontSize:"13px",fontWeight:600,cursor:"pointer",transition:"all 0.2s ease",background:eE?"rgba(163,230,53,0.13)":"transparent",color:eE||(0,c.aw)(eB[eQ])>0?"#a3e635":"rgba(255,255,255,0.45)",boxShadow:"none",display:"flex",alignItems:"center",gap:"5px"},children:[(0,r.jsx)("svg",{width:"13",height:"16",viewBox:"-4 -3 86 102",fill:"none",stroke:"currentColor",strokeWidth:"6",strokeLinecap:"round",strokeLinejoin:"round",children:(0,r.jsx)("path",{d:"M 18 94 L 18 77 C 17 66 5 56 2 40 C -2 18 12 3 33 3 C 53 3 66 16 66 34 L 66 41 C 66 46 70 50 73 54 C 75.666664 58 74.666664 60.666664 70 62 L 66 63 C 65 67 68 69 65 71 C 64 73 66 77 62 80 C 58 84 48 82 44 85 L 41 94"})}),(0,r.jsx)("span",{className:"hidden md:inline",children:B("cef_titulo")})]})]}),L&&(0,r.jsxs)("div",{ref:e4,style:{display:"flex",padding:"3px",marginLeft:"4px",background:"rgba(255,255,255,0.03)",border:"1px solid rgba(255,255,255,0.06)",borderRadius:"12px",flexShrink:0,position:"relative"},children:[(0,r.jsxs)("button",{onClick:()=>{if(e1){e2(!1);return}e3(e=>!e)},title:B("rx_analisis"),style:{padding:"8px 12px",borderRadius:"9px",border:"none",fontSize:"13px",fontWeight:600,cursor:"pointer",transition:"all 0.2s ease",background:e1?"rgba(163,230,53,0.13)":"transparent",color:e1?"#a3e635":"rgba(255,255,255,0.45)",boxShadow:"none",display:"flex",alignItems:"center",gap:"5px"},children:[(0,r.jsxs)("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,r.jsx)("path",{d:"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"}),(0,r.jsx)("circle",{cx:"12",cy:"12",r:"3"})]}),(0,r.jsx)("span",{className:"hidden md:inline",children:B("rx_analisis")}),e0.visibles.length>0&&(0,r.jsx)("span",{style:{display:"inline-flex",alignItems:"center",justifyContent:"center",minWidth:"19px",height:"19px",borderRadius:"50%",fontSize:"10px",fontWeight:800,padding:"0 4px",color:"#000",background:e1?"rgba(0,0,0,0.2)":"#a3e635"},children:e0.visibles.length})]}),e5&&(0,r.jsxs)("div",{role:"menu",style:{position:"absolute",top:"calc(100% + 6px)",right:0,zIndex:60,width:"min(320px, calc(100vw - 24px))",maxHeight:"60vh",overflowY:"auto",background:"#0e0e0e",border:"1px solid rgba(255,255,255,0.12)",borderRadius:"12px",boxShadow:"0 18px 44px rgba(0,0,0,0.6)",padding:"5px"},children:[0===e0.visibles.length?(0,r.jsx)("p",{style:{margin:0,padding:"14px 12px",fontSize:"12px",lineHeight:1.5,color:"rgba(255,255,255,0.5)"},children:B("rx_analisis_vacio")}):e0.visibles.map((e,t)=>{let a=null!==(0,b.fZ)(e.estado);return(0,r.jsxs)("button",{role:"menuitem",onClick:()=>{e3(!1),a?tU(e.id):e2(!0)},style:{width:"100%",display:"flex",alignItems:"center",gap:"10px",padding:"7px",border:"none",background:"transparent",borderRadius:"9px",cursor:"pointer",textAlign:"left"},children:[(0,r.jsx)("img",{src:e.imageDataUrl,alt:"",draggable:!1,style:{width:"52px",height:"40px",objectFit:"cover",flexShrink:0,borderRadius:"6px",background:"#000",border:"1px solid rgba(255,255,255,0.08)"}}),(0,r.jsxs)("span",{style:{flex:1,minWidth:0},children:[(0,r.jsx)("span",{style:{display:"block",fontSize:"12.5px",fontWeight:600,color:"#fff",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.comment}),(0,r.jsxs)("span",{style:{display:"block",fontSize:"10.5px",color:"rgba(255,255,255,0.4)",marginTop:"2px"},children:["#".concat(t+1),a?" \xb7 ".concat(B("rx_analisis_volver")):""]})]}),(0,r.jsx)("span",{"aria-hidden":"true",style:{color:a?"#a3e635":"rgba(255,255,255,0.3)",fontSize:"13px",flexShrink:0},children:a?"âµ":"âº"})]},e.id)}),(0,r.jsxs)("button",{role:"menuitem",onClick:()=>{e3(!1),e2(!0)},style:{width:"100%",display:"flex",alignItems:"center",justifyContent:"space-between",gap:"8px",padding:"9px 10px",marginTop:"4px",border:"none",borderTop:"1px solid rgba(255,255,255,0.08)",background:"transparent",cursor:"pointer",fontSize:"12px",fontWeight:600,color:"rgba(255,255,255,0.62)"},children:[B("rx_analisis_verTodo"),(0,r.jsx)("span",{"aria-hidden":"true",children:"â"})]})]})]})]}),(0,r.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"6px",flex:"0 0 auto",minWidth:0},children:[eS&&(0,r.jsx)("button",{onClick:()=>ek(e=>!e),className:"hidden md:flex",title:e_?B("radiograph_individual"):B("radiograph_viewAll"),style:{alignItems:"center",justifyContent:"center",width:"32px",height:"32px",borderRadius:"8px",background:e_?"rgba(163,230,53,0.12)":"rgba(255,255,255,0.04)",border:"1px solid ".concat(e_?"rgba(163,230,53,0.2)":"rgba(255,255,255,0.06)"),color:e_?"#a3e635":"rgba(255,255,255,0.5)",cursor:"pointer",transition:"all 0.2s ease"},children:(0,r.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",children:[(0,r.jsx)("rect",{x:"3",y:"3",width:"7",height:"7"}),(0,r.jsx)("rect",{x:"14",y:"3",width:"7",height:"7"}),(0,r.jsx)("rect",{x:"3",y:"14",width:"7",height:"7"}),(0,r.jsx)("rect",{x:"14",y:"14",width:"7",height:"7"})]})}),(0,r.jsx)("button",{onClick:()=>{F.current&&(document.fullscreenElement?(document.exitFullscreen(),ev(!1)):(F.current.requestFullscreen(),ev(!0)))},className:"hidden md:flex",title:eb?B("radiograph_exitFullscreen"):B("radiograph_fullscreen"),style:{alignItems:"center",justifyContent:"center",width:"32px",height:"32px",borderRadius:"8px",background:"rgba(255,255,255,0.04)",border:"1px solid rgba(255,255,255,0.06)",color:"rgba(255,255,255,0.5)",cursor:"pointer",transition:"all 0.2s ease"},children:(0,r.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",children:eb?(0,r.jsx)("path",{d:"M8 3v3a2 2 0 01-2 2H3m18 0h-3a2 2 0 01-2-2V3m0 18v-3a2 2 0 012-2h3M3 16h3a2 2 0 012 2v3"}):(0,r.jsx)("path",{d:"M8 3H5a2 2 0 00-2 2v3m18 0V5a2 2 0 00-2-2h-3m0 18h3a2 2 0 002-2v-3M3 16v3a2 2 0 002 2h3"})})}),(0,r.jsx)("button",{onClick:()=>{tB()},className:"hidden md:flex",title:B("radiograph_download"),style:{alignItems:"center",justifyContent:"center",width:"32px",height:"32px",borderRadius:"8px",background:"rgba(255,255,255,0.04)",border:"1px solid rgba(255,255,255,0.06)",color:"rgba(255,255,255,0.5)",cursor:"pointer",transition:"all 0.2s ease"},children:(0,r.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",children:[(0,r.jsx)("path",{d:"M21 15v4a2 2 0 01-2 2H5a2 2 0 01-2-2v-4"}),(0,r.jsx)("polyline",{points:"7 10 12 15 17 10"}),(0,r.jsx)("line",{x1:"12",y1:"15",x2:"12",y2:"3"})]})}),(0,r.jsx)("button",{onClick:()=>ey(e=>!e),className:"md:hidden transition rounded-lg w-10 h-10 flex items-center justify-center ".concat(ej?"bg-[#a3e635]/15 text-[#a3e635]":"text-neutral-400 hover:text-white hover:bg-white/5"),style:{border:"1px solid rgba(255,255,255,0.06)"},title:B("radiograph_tools"),children:(0,r.jsxs)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,r.jsx)("circle",{cx:"12",cy:"12",r:"9"}),(0,r.jsx)("path",{d:"M12 3 A9 9 0 0 1 12 21 Z",fill:"currentColor",stroke:"none"})]})}),R&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{style:{width:"1px",height:"26px",background:"rgba(255,255,255,0.08)",margin:"0 2px"}}),(0,r.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"7px",padding:"4px 6px 4px 8px",minWidth:0},children:[(0,r.jsxs)("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"rgba(163,230,53,0.5)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:{flexShrink:0},children:[(0,r.jsx)("path",{d:"M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"}),(0,r.jsx)("circle",{cx:"12",cy:"7",r:"4"})]}),(0,r.jsxs)("span",{className:"truncate",style:{fontSize:"13px",fontWeight:600,color:"#fff",lineHeight:1.2,maxWidth:"260px",textAlign:"right"},title:R,children:[R,null!==e6&&(0,r.jsx)("span",{style:{color:"rgba(255,255,255,0.45)",fontWeight:500},children:" (".concat(e6," ").concat(B("cef_anios"),")")})]})]})]}
1),!R&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"hidden md:block",style:{width:"1px",height:"26px",background:"rgba(255,255,255,0.08)",margin:"0 2px"}}),(0,r.jsx)("span",{className:"hidden md:block truncate",style:{fontSize:"13px",fontWeight:600,color:"#fff",maxWidth:"220px",paddingLeft:"4px"},title:E||void 0,children:E||B("radiograph_defaultName")})]})]})]}),(eO||eX||eq||e9)&&(0,r.jsxs)("div",{className:"flex items-center gap-3 px-4 py-2.5 shrink-0 text-[12px]",style:{background:"rgba(180,35,43,0.12)",borderBottom:"1px solid rgba(248,113,113,0.28)",color:"#fca5a5"},role:"alert",children:[(0,r.jsxs)("svg",{className:"w-4 h-4 shrink-0",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,r.jsx)("path",{d:"M10.29 3.86 1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"}),(0,r.jsx)("line",{x1:"12",y1:"9",x2:"12",y2:"13"}),(0,r.jsx)("line",{x1:"12",y1:"17",x2:"12.01",y2:"17"})]}),(0,r.jsx)("span",{className:"leading-snug",children:eO?B("rx_conflicto"):eX?B("rx_sinPermiso"):eq?B("rx_sinGuardar"):e9}),eO?(0,r.jsx)("button",{onClick:()=>window.location.reload(),className:"ml-auto shrink-0 px-2.5 py-1 rounded-lg text-white/90 hover:text-white transition",style:{border:"1px solid rgba(255,255,255,0.18)"},children:B("rx_recargar")}):eX?null:eq?(0,r.jsx)("button",{onClick:()=>{eY(!1),eJ(e=>e+1)},className:"ml-auto shrink-0 px-2.5 py-1 rounded-lg text-white/90 hover:text-white transition",style:{border:"1px solid rgba(255,255,255,0.18)"},children:B("rx_reintentar")}):(0,r.jsx)("button",{onClick:()=>te(null),className:"ml-auto shrink-0 px-2.5 py-1 rounded-lg text-white/90 hover:text-white transition",style:{border:"1px solid rgba(255,255,255,0.18)"},children:B("rx_cerrar_aviso")})]}),ej&&(0,r.jsxs)("div",{className:"md:hidden flex flex-col gap-3 px-3.5 py-3 shrink-0",style:{background:"linear-gradient(180deg, rgba(12,12,12,0.98) 0%, rgba(7,7,7,0.98) 100%)",borderBottom:"1px solid #141414"},children:[(0,r.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,r.jsxs)("div",{className:"flex justify-between items-baseline",children:[(0,r.jsx)("span",{className:"text-[10px] text-neutral-500 uppercase tracking-wider font-semibold",children:"Zoom"}),(0,r.jsxs)("span",{className:"text-[12px] text-[#a3e635] font-bold tabular-nums",children:[en,"%"]})]}),(0,r.jsx)("input",{type:"range",min:25,max:400,value:en,onChange:e=>ei(+e.target.value),className:"w-full h-1.5 accent-[#a3e635] bg-neutral-800 rounded-full appearance-none cursor-pointer"})]}),(0,r.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,r.jsxs)("div",{className:"flex justify-between items-baseline",children:[(0,r.jsx)("span",{className:"text-[10px] text-neutral-500 uppercase tracking-wider font-semibold",children:B("radiograph_brightness")}),(0,r.jsxs)("span",{className:"text-[12px] text-[#a3e635] font-bold tabular-nums",children:[eo,"%"]})]}),(0,r.jsx)("input",{type:"range",min:0,max:200,value:eo,onChange:e=>el(+e.target.value),className:"w-full h-1.5 accent-[#a3e635] bg-neutral-800 rounded-full appearance-none cursor-pointer"})]}),(0,r.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,r.jsxs)("div",{className:"flex justify-between items-baseline",children:[(0,r.jsx)("span",{className:"text-[10px] text-neutral-500 uppercase tracking-wider font-semibold",children:B("radiograph_contrast")}),(0,r.jsxs)("span",{className:"text-[12px] text-[#a3e635] font-bold tabular-nums",children:[es,"%"]})]}),(0,r.jsx)("input",{type:"range",min:0,max:200,value:es,onChange:e=>ec(+e.target.value),className:"w-full h-1.5 accent-[#a3e635] bg-neutral-800 rounded-full appearance-none cursor-pointer"})]}),(0,r.jsxs)("div",{className:"flex items-center gap-2 pt-1",children:[(0,r.jsx)("button",{onClick:()=>eu(e=>!e),className:"flex-1 text-[11px] py-2 rounded-lg transition font-medium ".concat(ed?"bg-[#a3e635]/20 text-[#a3e635]":"text-neutral-400 bg-white/5 hover:bg-white/10"),children:B("radiograph_invert")}),(0,r.jsx)("button",{onClick:tC,className:"flex-1 text-[11px] py-2 rounded-lg transition font-medium text-neutral-400 bg-white/5 hover:bg-white/10",children:"Reset"}),(0,r.jsx)("button",{onClick:()=>{tB()},className:"w-10 h-9 rounded-lg text-neutral-400 bg-white/5 hover:bg-white/10 transition flex items-center justify-center",title:B("radiograph_download"),children:(0,r.jsxs)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:"2",strokeLinecap:"round",children:[(0,r.jsx)("path",{d:"M21 15v4a2 2 0 01-2 2H5a2 2 0 01-2-2v-4"}),(0,r.jsx)("polyline",{points:"7 10 12 15 17 10"}),(0,r.jsx)("line",{x1:"12",y1:"15",x2:"12",y2:"3"})]})})]})]}),V&&!e_&&(0,r.jsxs)("div",{className:"md:hidden flex items-center justify-between px-3 py-1.5 shrink-0",style:{background:"rgba(10,10,10,0.95)",borderBottom:"1px solid rgba(255,255,255,0.04)"},children:[(0,r.jsx)("button",{onClick:tM,className:"text-neutral-400 hover:text-white w-9 h-9 rounded-lg flex items-center justify-center bg-white/5","aria-label":B("radiograph_prev"),children:(0,r.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:"2",strokeLinecap:"round",children:(0,r.jsx)("polyline",{points:"15 18 9 12 15 6"})})}),(0,r.jsxs)("span",{className:"text-[11px] text-neutral-400",children:[q+1,"/",O.length,(null==M?void 0:M[q])&&(0,r.jsxs)("span",{className:"text-neutral-600 ml-1.5",children:["\xb7 ",M[q]]})]}),eS?(0,r.jsx)("button",{onClick:()=>ek(e=>!e),className:"text-neutral-400 hover:text-white w-9 h-9 rounded-lg flex items-center justify-center bg-white/5","aria-label":B("radiograph_viewAll"),children:(0,r.jsxs)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:"2",strokeLinecap:"round",children:[(0,r.jsx)("rect",{x:"3",y:"3",width:"7",height:"7"}),(0,r.jsx)("rect",{x:"14",y:"3",width:"7",height:"7"}),(0,r.jsx)("rect",{x:"3",y:"14",width:"7",height:"7"}),(0,r.jsx)("rect",{x:"14",y:"14",width:"7",height:"7"})]})}):(0,r.jsx)("div",{className:"w-9"}),(0,r.jsx)("button",{onClick:tL,className:"text-neutral-400 hover:text-white w-9 h-9 rounded-lg flex items-center justify-center bg-white/5","aria-label":B("radiograph_next"),children:(0,r.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:"2",strokeLinecap:"round",children:(0,r.jsx)("polyline",{points:"9 18 15 12 9 6"})})})]}),(0,r.jsxs)("div",{className:"flex-1 flex overflow-hidden min-h-0",children:[!e_&&!e1&&(0,r.jsxs)("div",{className:"hidden md:flex flex-col items-center gap-1 py-2 px-1.5 shrink-0",style:{background:"rgba(8,8,8,0.95)",borderRight:"1px solid rgba(255,255,255,0.04)"},children:[[{id:"puntero",titulo:B("rx_tool_pointer"),icono:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("path",{d:"M3 3l7.07 16.97 2.51-7.39 7.39-2.51L3 3z"}),(0,r.jsx)("path",{d:"M13 13l6 6"})]})},{id:"brillo",titulo:"".concat(B("rx_tool_window")," â ").concat(B("rx_tool_window_hint")),icono:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("circle",{cx:"12",cy:"12",r:"4"}),(0,r.jsx)("path",{d:"M12 2v2"}),(0,r.jsx)("path",{d:"M12 20v2"}),(0,r.jsx)("path",{d:"m4.93 4.93 1.41 1.41"}),(0,r.jsx)("path",{d:"m17.66 17.66 1.41 1.41"}),(0,r.jsx)("path",{d:"M2 12h2"}),(0,r.jsx)("path",{d:"M20 12h2"}),(0,r.jsx)("path",{d:"m6.34 17.66-1.41 1.41"}),(0,r.jsx)("path",{d:"m19.07 4.93-1.41 1.41"})]})},{id:"zoom",titulo:"".concat(B("rx_tool_zoom")," â ").concat(B("rx_tool_zoom_hint")),icono:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("circle",{cx:"11",cy:"11",r:"8"}),(0,r.jsx)("path",{d:"m21 21-4.35-4.35"}),(0,r.jsx)("path",{d:"M11 8v6"}),(0,r.jsx)("path",{d:"M8 11h6"})]})},{id:"mano",titulo:B("rx_tool_pan"),icono:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("path",{d:"M18 11V6a2 2 0 0 0-2-2a2 2 0 0 0-2 2v0"}),(0,r.jsx)("path",{d:"M14 10V4a2 2 0 0 0-2-2a2 2 0 0 0-2 2v2"}),(0,r.jsx)("path",{d:"M10 10.5V6a2 2 0 0 0-2-2a2 2 0 0 0-2 2v8"}),(0,r.jsx)("path",{d:"M18 8a2 2 0 1 1 4 0v6a8 8 0 0 1-8 8h-2c-2.8 0-4.5-.86-5.99-2.34l-3.6-3.6a2 2 0 0 1 2.83-2.82L7 13"})]})}].map(e=>(0,r.jsx)("button",{onClick:()=>
1ea(e.id),"aria-pressed":et===e.id,title:e.titulo,className:"w-10 h-10 rounded-lg flex items-center justify-center transition ".concat(et===e.id?"bg-[#a3e635]/15 text-[#a3e635]":"text-neutral-500 hover:text-white hover:bg-white/5"),children:(0,r.jsx)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:e.icono})},e.id)),(0,r.jsx)("div",{className:"w-6 h-px bg-neutral-800 my-1"}),L&&[{id:"medir",titulo:B("rx_tool_measure"),color:"#a3e635",icono:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("path",{d:"M21.3 15.3a2.4 2.4 0 0 1 0 3.4l-2.6 2.6a2.4 2.4 0 0 1-3.4 0L2.7 8.7a2.41 2.41 0 0 1 0-3.4l2.6-2.6a2.41 2.41 0 0 1 3.4 0Z"}),(0,r.jsx)("path",{d:"m14.5 12.5 2-2"}),(0,r.jsx)("path",{d:"m11.5 9.5 2-2"}),(0,r.jsx)("path",{d:"m8.5 6.5 2-2"}),(0,r.jsx)("path",{d:"m17.5 15.5 2-2"})]})},{id:"flecha",titulo:B("rx_tool_arrow"),color:"#ff9500",icono:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("line",{x1:"5",y1:"12",x2:"19",y2:"12"}),(0,r.jsx)("polyline",{points:"12 5 19 12 12 19"})]})},{id:"nota",titulo:B("rx_tool_note"),color:"#00d4ff",icono:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),(0,r.jsx)("polyline",{points:"14 2 14 8 20 8"}),(0,r.jsx)("line",{x1:"16",y1:"13",x2:"8",y2:"13"}),(0,r.jsx)("line",{x1:"16",y1:"17",x2:"8",y2:"17"}),(0,r.jsx)("line",{x1:"10",y1:"9",x2:"8",y2:"9"})]})}].map(e=>{let t=et===e.id;return(0,r.jsx)("button",{onClick:()=>t0(e.id),"aria-pressed":t,title:e.titulo,className:"w-10 h-10 rounded-lg flex items-center justify-center transition",style:{background:t?"".concat(e.color,"1f"):"transparent",color:t?e.color:"rgba(255,255,255,0.35)",boxShadow:t?"0 0 12px ".concat(e.color,"14"):"none",cursor:"pointer"},children:(0,r.jsx)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:e.icono})},e.id)}),L&&(0,r.jsx)("div",{className:"w-6 h-px bg-neutral-800 my-1"}),(0,r.jsx)("button",{onClick:()=>eu(e=>!e),"aria-pressed":ed,title:B("radiograph_invert"),className:"w-10 h-10 rounded-lg flex items-center justify-center transition ".concat(ed?"bg-[#a3e635]/15 text-[#a3e635]":"text-neutral-500 hover:text-white hover:bg-white/5"),children:(0,r.jsxs)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,r.jsx)("circle",{cx:"12",cy:"12",r:"9"}),(0,r.jsx)("path",{d:"M12 3v18"}),(0,r.jsx)("path",{d:"M12 3 A9 9 0 0 0 12 21 Z",fill:"currentColor",stroke:"none"})]})}),(0,r.jsx)("button",{onClick:tC,disabled:!tD,title:B("rx_reset"),className:"w-10 h-10 rounded-lg flex items-center justify-center transition ".concat(tD?"text-neutral-500 hover:text-white hover:bg-white/5":"text-neutral-800 cursor-default"),children:(0,r.jsxs)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,r.jsx)("path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"}),(0,r.jsx)("path",{d:"M3 3v5h5"})]})}),L&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"w-6 h-px bg-neutral-800 my-1"}),(0,r.jsx)("button",{onClick:()=>{tF()},disabled:e8,title:B("rx_analisis_captura"),className:"w-10 h-10 rounded-lg flex items-center justify-center transition ".concat(e8?"text-neutral-800 cursor-default":"text-neutral-500 hover:text-[#a3e635] hover:bg-[#a3e635]/10"),children:(0,r.jsxs)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,r.jsx)("rect",{x:"3",y:"4",width:"18",height:"14",rx:"2"}),(0,r.jsx)("path",{d:"M12 8v6M9 11h6"})]})})]})]}),V&&!e_&&!e1&&!eE&&(0,r.jsx)("div",{className:"hidden md:block w-20 shrink-0 overflow-y-auto py-2 px-1.5 space-y-1.5",style:{background:"rgba(8,8,8,0.95)",borderRight:"1px solid rgba(255,255,255,0.04)"},children:O.map((e,t)=>(0,r.jsxs)("button",{onClick:()=>tS(t),className:"w-full rounded-lg overflow-hidden transition-all ".concat(t===q?"ring-2 ring-[#a3e635] ring-offset-1 ring-offset-black":"opacity-50 hover:opacity-80"),children:[X[t]?(0,r.jsx)("img",{src:X[t],alt:"Radiogra
1ph thumbnail",className:"w-full h-14 object-cover rounded-lg",style:{filter:tE}}):(0,r.jsx)("div",{className:"w-full h-14 bg-neutral-900 rounded-lg flex items-center justify-center",children:Z[t]?(0,r.jsx)("span",{className:"text-[8px] text-red-400",children:"Error"}):(0,r.jsx)("div",{className:"w-3 h-3 border border-neutral-700 border-t-neutral-400 rounded-full animate-spin"})}),(0,r.jsx)("p",{className:"text-[8px] text-neutral-500 truncate mt-0.5 px-0.5",children:(null==M?void 0:M[t])||"".concat(t+1)})]},t))}),eM&&eE&&t1&&tb?(0,r.jsxs)("div",{className:"flex-1 flex flex-col overflow-hidden min-h-0",children:[(tt||eO)&&(0,r.jsxs)("div",{className:"flex items-center gap-3 px-4 py-2 shrink-0",style:{background:"rgba(10,10,10,0.95)",borderBottom:"1px solid rgba(255,255,255,0.06)"},children:[(0,r.jsx)("div",{className:"flex items-center gap-3 min-w-0 flex-1",children:(0,r.jsx)("span",{className:"text-[11px] text-neutral-500 truncate",children:tt?"".concat(B("rx_ficha_abierta"),": ").concat(tt.nombre):B("cef_conflicto")})}),(0,r.jsx)("div",{className:"flex justify-end",children:tt&&(0,r.jsx)("button",{onClick:tO,className:"shrink-0 text-[11px] text-neutral-400 hover:text-white transition px-2.5 py-1 rounded-lg",style:{border:"1px solid rgba(255,255,255,0.08)"},children:B("rx_ficha_volver")})})]}),(0,r.jsx)(_,{dataUrl:t1,mmPorPixel:null,anchoPx:tb.ancho,altoPx:tb.alto,estado:null!==(a=eB[eQ])&&void 0!==a?a:null,onCambiar:e=>{tr&&eH(t=>({...t,[eQ]:e}))},soloLectura:!tr,filtroDeImagen:tE,ajustandoImagen:"brillo"===et,encuadre:{zoom:en,x:ex.x,y:ex.y},encuadrando:"zoom"===et||"mano"===et?et:null,onEncuadrar:e=>{let{dZoom:t,dx:a,dy:r}=e;t&&ei(e=>Math.round(Math.min(400,Math.max(25,e+t)))),(a||r)&&eh(e=>({x:e.x+(null!=a?a:0),y:e.y+(null!=r?r:0)}))},ranuraSobreLaPlaca:eP,onAjustarImagen:(e,t)=>{ec(t=>Math.round(Math.min(200,Math.max(0,t+.4*e)))),el(e=>Math.round(Math.min(200,Math.max(0,e-.4*t))))},idioma:H,paciente:null!=R?R:null,clinica:null!=A?A:null,estudio:null!=E?E:null,rotuloDeLaImagen:(null==M?void 0:M[q])||(V?"".concat(q+1,"/").concat(O.length):null),refDelTrazado:eK,onGuardarAnalisis:L&&!tt?tH:void 0,textos:{titulo:B("cef_titulo"),analisis:B("cef_analisis"),puntos:B("cef_puntos"),marcaEl:B("cef_marcaEl"),listo:B("cef_listo"),limpiar:B("cef_limpiar"),limpiarSeguro:B("cef_limpiarSeguro"),quitar:B("cef_quitar"),trazado:B("cef_trazado"),contorno:B("cef_contorno"),contornoPuntos:B("cef_contornoPuntos"),valores:B("cef_valores"),valoresAyuda:B("cef_valoresAyuda"),vista:B("cef_vista"),pestanaResultados:B("cef_pestanaResultados"),masAcciones:B("cef_masAcciones"),hojaTrazado:B("cef_hojaTrazado"),otrosPuntos:B("cef_otrosPuntos"),medida:B("cef_medida"),valor:B("cef_valor"),norma:B("cef_norma"),ayuda:B("cef_ayuda"),sinEscala:B("cef_sinEscala"),descargarHoja:B("cef_descargarHoja"),alInforme:B("cef_alInforme"),generando:B("cef_generando"),hojaTitulo:B("cef_hojaTitulo"),severidad:B("cef_severidad"),grafico:B("cef_grafico"),significado:B("cef_significado"),paciente:B("cef_paciente"),estudio:B("cef_estudio"),fecha:B("cef_fecha"),sexo:B("cef_sexo"),hombre:B("cef_hombre"),mujer:B("cef_mujer"),faltaSexo:B("cef_faltaSexo"),faltaEdad:B("cef_faltaEdad"),normaAdulta:B("cef_normaAdulta"),datos:B("cef_datos"),datosNota:B("cef_datosNota"),nacimiento:B("cef_nacimiento"),anios:B("cef_anios"),comenzar:B("cef_comenzar"),omitir:B("cef_omitir"),cambiar:B("cef_cambiar"),elegirAnalisis:B("cef_elegirAnalisis"),datosDelPaciente:B("cef_datosDelPaciente"),comoLeer:B("cef_comoLeer"),fuentes:B("cef_fuentes"),escala:B("cef_escala"),escalaNota:B("cef_escalaNota"),distancia:B("cef_distancia"),distanciaEjemplo:B("cef_distanciaEjemplo"),marcaRegla:B("cef_marcaRegla"),marcaRegla2:B("cef_marcaRegla2"),aplicar:B("cef_aplicar"),sinEscalaOmitir:B("cef_sinEscalaOmitir"),factor:B("cef_factor"),baseCorta:B("cef_baseCorta"),factorRaro:B("cef_factorRaro"),quitarCalibracion:B("cef_quitarCalibracion"),pantallaChica:B("cef_pantallaChica"),guardarAnalisis:B("cef_guardarAnalisis"),guardandoAnalisis:B("cef_guardandoAnalisis"),resumenDelCaso:B("cef_resumenDelCaso"),resumenEsqueletico:B("cef_resumenEsqueletico"),resumenDental:B("cef_resumenDental"),resumenBlando:B("cef_resumenBlando"),puntoAnterior:B("cef_puntoAnterior"),puntoSiguiente:B("cef_puntoSiguiente"),verPuntos:B("cef_verPuntos"),ocultarPuntos:B("cef_ocultarPuntos"),lupaEnEspera:B("cef_lupaEnEspera"),lupaCorregir:B("cef_lupaCorregir"),modoMarcar:
1B("cef_modoMarcar"),modoCorregir:B("cef_modoCorregir"),modoCorregirPie:B("cef_modoCorregirPie"),sugerirPuntos:B("cef_sugerirPuntos"),sugiriendo:B("cef_sugiriendo"),avisoIaTitulo:B("cef_avisoIaTitulo"),avisoIaCuerpo:B("cef_avisoIaCuerpo"),avisoIaResponsabilidad:B("cef_avisoIaResponsabilidad"),avisoIaSeguir:B("cef_avisoIaSeguir"),avisoIaCancelar:B("cef_avisoIaCancelar"),sugerirNoDisponible:B("cef_sugerirNoDisponible"),sugerirFallo:B("cef_sugerirFallo"),sugerirSinLibreria:B("cef_sugerirSinLibreria"),sugerirSinArchivo:B("cef_sugerirSinArchivo"),darPorRevisado:B("cef_darPorRevisado"),darTodoPorRevisado:B("cef_darTodoPorRevisado"),revisarSinMover:B("cef_revisarSinMover"),sinRevisarRotulo:B("cef_sinRevisarRotulo"),sinRevisarAviso:B("cef_sinRevisarAviso"),sinRevisarResumen:B("cef_sinRevisarResumen"),hojaAutomaticos:B("cef_hojaAutomaticos")}},eQ),eI&&eT&&tJ&&(0,o.createPortal)(t$(eT,!0),eI)]}):null,eE&&eM?null:e1?(0,r.jsx)("div",{className:"flex-1 flex flex-col overflow-hidden min-h-0",children:0===e0.visibles.length?(0,r.jsx)("div",{className:"flex-1 flex items-center justify-center p-8",children:(0,r.jsx)("p",{className:"text-[12px] text-neutral-500 max-w-sm text-center leading-relaxed",children:B("rx_analisis_vacio")})}):(0,r.jsx)(k,{scenes:e0.visibles,onDeleteScene:e=>{e0.borrar(e)},onAbrirEscena:tU,onReordenar:e=>{e0.reordenar(e)},onUpdateComment:(e,t)=>{e0.renombrar(e,t)},clinicLogoUrl:I,clinicName:A,patientName:R})}):e_?(0,r.jsx)("div",{className:"flex-1 overflow-auto p-3",children:(0,r.jsx)("div",{className:"grid gap-2 h-full",style:{gridTemplateColumns:"repeat(2, 1fr)",gridTemplateRows:O.length<=2?"1fr":"repeat(2, 1fr)"},children:O.map((e,t)=>(0,r.jsxs)("div",{className:"relative rounded-lg overflow-hidden bg-black border border-white/5 cursor-pointer hover:border-[#a3e635]/30 transition-colors",onClick:()=>{ek(!1),tS(t)},title:B("radiograph_clickDetail"),children:[X[t]?(0,r.jsx)("img",{src:X[t],alt:(null==M?void 0:M[t])||B("radiograph_imageN",{n:t+1}),draggable:!1,className:"w-full h-full object-contain",style:{filter:tE}}):(0,r.jsx)("div",{className:"w-full h-full flex items-center justify-center bg-neutral-900",children:Z[t]?(0,r.jsx)("span",{className:"text-xs text-red-400",children:"Error"}):(0,r.jsx)("div",{className:"w-4 h-4 border-2 border-neutral-700 border-t-neutral-400 rounded-full animate-spin"})}),(0,r.jsx)("span",{className:"absolute bottom-1.5 left-1.5 text-[10px] text-neutral-400 bg-black/70 px-1.5 py-0.5 rounded",children:(null==M?void 0:M[t])||"".concat(t+1)})]},t))})}):(0,r.jsxs)("div",{ref:tm,className:"flex-1 overflow-hidden relative",style:{cursor:tT,touchAction:"none"},onWheel:tR,onMouseDown:tW,onMouseMove:tz,onMouseUp:tA,onMouseLeave:tA,onPointerDown:tI.onPointerDown,children:[(0,r.jsx)("div",{className:"absolute inset-0 flex items-center justify-center",children:t1?(0,r.jsx)("img",{ref:U,src:t1,alt:E||B("radiograph_defaultName"),draggable:!1,className:"max-w-none transition-transform duration-75",style:{filter:tE,transform:"scale(".concat(en/100,") translate(").concat(ex.x/(en/100),"px, ").concat(ex.y/(en/100),"px)"),maxHeight:en<=100?"100%":"none",maxWidth:en<=100?"100%":"none",objectFit:"contain"}}):(0,r.jsx)("p",{className:"text-neutral-600 text-sm",children:t2?B("radiograph_imageError"):B("radiograph_loadingShort")})}),th&&tJ&&(0,r.jsx)("div",{style:{position:"absolute",...th,pointerEvents:"none"},children:t$("".concat(Math.round(th.width),"x").concat(Math.round(th.height)))}),(null==to?void 0:to.paso)==="preguntar"&&(0,r.jsx)("div",{className:"absolute inset-0 flex items-center justify-center px-6",style:{background:"rgba(0,0,0,0.55)",backdropFilter:"blur(3px)"},children:(0,r.jsxs)("div",{className:"max-w-sm w-full rounded-xl p-5",style:{background:"rgba(16,16,16,0.98)",border:"1px solid rgba(255,255,255,0.09)"},children:[(0,r.jsx)("p",{className:"text-[13px] font-semibold text-white mb-1.5",children:B("rx_calibrar_titulo")}),(0,r.jsx)("p",{className:"text-[12px] text-neutral-400 leading-relaxed mb-4",children:eM?B("rx_calibrar_explicacion_tele"):B("rx_calibrar_explicacion")}),(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("button",{onClick:tQ,className:"flex-1 text-[12px] font-semibold py-2 rounded-lg bg-[#a3e635]/15 text-[#a3e635] hover:bg-[#a3e635]/25 transition",children:B("rx_calibrar_si")}),(0,r.jsx)("button",{onClick:()=>{tu(!0),tl(null),ea("medir")},className:"flex-1 text-[12px] py-2 rounded-lg text-neutral-400 bg-white/5 hover:bg-white/10 transition",children:B("rx_calibrar_no")})]})]})}),to&&"preguntar"!==to.paso&&(0,r.jsx)("div",{className:"absolute bottom-3 left-1/2 -translate-x-1/2 flex items-center gap-2 px-3.5 py-2 rounded-lg text-[11px] whitespace-nowrap",style:{background:"rgba(10,10,10,0.92)",border:"1px solid rgba(163,230,53,0.25)",backdropFilter:"blur(8px)"},children:"trazar"===to.paso?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{className:"text-[#a3e635] font-semibold",children:B("rx_calibrar_traza")}),(0,r.jsx)("button",{onClick:()=>{tl(null),ea("puntero")},className:"text-neutral-500 hover:text-white",children:B("vista3d_export_cancelar")}
1)]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{className:"text-neutral-300",children:B("rx_calibrar_pregunta")}),(0,r.jsx)("input",{autoFocus:!0,value:ts,onChange:e=>tc(e.target.value),onKeyDown:e=>{"Enter"===e.key&&tK(),"Escape"===e.key&&(tl(null),ea("puntero"))},inputMode:"decimal",className:"w-16 bg-white/5 rounded px-2 py-0.5 text-white tabular-nums outline-none",style:{border:"1px solid rgba(255,255,255,0.12)"}}),(0,r.jsx)("span",{className:"text-neutral-500",children:"mm"}),(0,r.jsx)("button",{onClick:tK,className:"text-[#a3e635] font-semibold hover:underline",children:B("cef_aplicar")}),(0,r.jsx)("button",{onClick:()=>{tl(null),ea("puntero")},className:"text-neutral-500 hover:text-white",children:B("vista3d_export_cancelar")})]})}),tv.mediciones.length>0&&!to&&(0,r.jsxs)("div",{className:"hidden md:flex absolute bottom-3 right-3 items-center gap-2 px-3 py-1.5 rounded-lg text-[11px]",style:{background:"rgba(10,10,10,0.85)",border:"1px solid rgba(255,255,255,0.07)",backdropFilter:"blur(8px)"},children:[(0,r.jsx)("span",{className:"text-neutral-400",children:tj?B("rx_escala_calibrada"):B("rx_escala_sin")}),(0,r.jsx)("button",{onClick:tQ,className:"text-neutral-500 hover:text-white transition underline underline-offset-2",children:tj?B("rx_recalibrar"):B("rx_calibrar")})]}),tD&&(0,r.jsxs)("div",{className:"hidden md:flex absolute bottom-3 left-3 items-center gap-2.5 px-3 py-1.5 rounded-lg text-[11px] tabular-nums",style:{background:"rgba(10,10,10,0.85)",border:"1px solid rgba(255,255,255,0.07)",backdropFilter:"blur(8px)"},children:[100!==en&&(0,r.jsxs)("span",{className:"text-neutral-300",children:[B("rx_tool_zoom")," ",en,"%"]}),100!==eo&&(0,r.jsxs)("span",{className:"text-neutral-300",children:[B("radiograph_brightness")," ",eo,"%"]}),100!==es&&(0,r.jsxs)("span",{className:"text-neutral-300",children:[B("radiograph_contrast")," ",es,"%"]}),ed&&(0,r.jsx)("span",{className:"text-[#a3e635]",children:B("radiograph_invert")}),(0,r.jsx)("button",{onClick:tC,className:"text-neutral-500 hover:text-white transition underline underline-offset-2",children:B("rx_reset")})]})]}),eN&&L&&(0,r.jsx)(w,{examId:L,patientName:R,examName:E,subtype:z,clinicName:A,logoUrl:I,onClose:()=>eC(!1)}),ez&&(0,r.jsx)(y.T,{titulo:B("cef_bloqueada_titulo"),cuerpo:B("cef_bloqueada_cuerpo"),onVerPlanes:()=>{eA(!1),window.open("/pricing","_blank")},onCerrar:()=>eA(!1)})]})]}):(0,r.jsx)("div",{className:"flex items-center justify-center h-screen bg-black",children:(0,r.jsxs)("div",{className:"text-center",children:[(0,r.jsx)("div",{className:"w-6 h-6 border-2 border-[#333] border-t-[#a3e635] rounded-full animate-spin mx-auto mb-3"}),V&&(0,r.jsx)("p",{className:"text-[11px] text-neutral-600",children:B("radiograph_loading",{loaded:O.length-$,total:O.length})})]})})}}}]);
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.