viewgate-wrapper 1.10.10 → 1.10.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,17 +1,17 @@
1
1
  (function(){"use strict";try{if(typeof document<"u"){var r=document.createElement("style");r.appendChild(document.createTextNode('@import"https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap";body{margin:0!important;padding:0!important}:root{--vg-primary: #6366f1;--vg-primary-glow: rgba(99, 102, 241, .5);--vg-primary-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);--vg-bg-glass: rgba(255, 255, 255, .7);--vg-radius: 16px;--vg-font-main: "Inter", system-ui, sans-serif;--vg-font-alt: "Inter", system-ui, sans-serif;--placeholder-color: #94a3b8;--vg-glass-border: rgba(255, 255, 255, .3);--vg-shadow-premium: 0 20px 50px rgba(0, 0, 0, .1)}.vg-container,.vg-container *{box-sizing:border-box}.vg-container{font-family:var(--vg-font-main);-webkit-font-smoothing:antialiased}.vg-glassmorphism{background:var(--vg-bg-glass);backdrop-filter:blur(16px) saturate(180%);-webkit-backdrop-filter:blur(16px) saturate(180%);border:1px solid var(--vg-glass-border);box-shadow:0 8px 32px #0000001a;border-radius:var(--vg-radius);position:relative}.vg-button-primary{background:var(--vg-primary-gradient);color:#fff;border:none;padding:12px 24px;font-family:var(--vg-font-main);font-size:14px;font-weight:700;cursor:pointer;transition:all .2s ease;border-radius:99px;display:flex;align-items:center;justify-content:center;gap:8px;box-shadow:0 4px 12px #6366f14d}.vg-button-primary:hover{transform:translateY(-2px);box-shadow:0 6px 20px #6366f166}.vg-button-primary:disabled,.vg-button-ghost:disabled{opacity:.5;cursor:not-allowed;filter:grayscale(.4);transform:none!important;box-shadow:none!important;pointer-events:none}.vg-button-ghost{background:#fffc;color:#1e293b;border:1px solid #e2e8f0;padding:10px 24px;font-family:var(--vg-font-main);font-size:14px;font-weight:600;cursor:pointer;transition:all .2s ease;border-radius:99px;display:flex;align-items:center;justify-content:center;gap:8px}.vg-button-ghost:hover{background:#fff;border-color:#cbd5e1;box-shadow:0 4px 12px #0000000d}.vg-badge{background:#f1f5f9;color:#64748b;padding:4px 12px;font-size:11px;border-radius:99px;font-weight:600;display:inline-flex;align-items:center;gap:6px}.vg-textarea{width:100%;box-sizing:border-box;border:1px solid #e2e8f0;border-radius:12px;padding:12px;font-family:var(--vg-font-main);font-size:15px;color:#0f172a;resize:none;outline:none;background:#f8fafc;transition:all .2s ease}.vg-textarea:focus{background:#fff;border-color:var(--vg-primary);box-shadow:0 0 0 4px #6366f11a}@keyframes vg-pop-in{0%{transform:scale(.6);opacity:0}70%{transform:scale(1.08);opacity:1}to{transform:scale(1);opacity:1}}@keyframes vg-slide-up-fade{0%{transform:translateY(12px) scale(.95);opacity:0}to{transform:translateY(0) scale(1);opacity:1}}.vg-animate-pop{animation:vg-pop-in .5s cubic-bezier(.34,1.56,.64,1) forwards}.vg-animate-slide-up{animation:vg-slide-up-fade .4s cubic-bezier(.22,1,.36,1) forwards}.vg-button-primary,.vg-button-ghost,.vg-pin-container,.vg-action-bar,.vg-glassmorphism{transition:all .3s cubic-bezier(.4,0,.2,1)}.vg-animate-slide{animation:vg-slide-in .4s cubic-bezier(.22,1,.36,1) forwards}.vg-animate-fade{animation:vg-fade-in .3s ease-out forwards}.vg-toasts{position:fixed;top:24px;right:24px;display:flex;flex-direction:column;gap:12px}.vg-toast{padding:12px 20px;display:flex;align-items:center;gap:12px;min-width:300px;border-radius:12px;box-shadow:0 10px 30px #0000001a;background:#fff}.vg-toast.success{border-left:6px solid #22c55e}.vg-toast.error{border-left:6px solid #ef4444}.vg-backdrop-blur{position:fixed;top:0;left:0;width:100%;height:100%;-webkit-backdrop-filter:blur(8px) grayscale(.2);backdrop-filter:blur(8px) grayscale(.2);background:#0000001a;pointer-events:none;transition:opacity .3s ease,clip-path .2s cubic-bezier(.19,1,.22,1)}.vg-selection-pulse{position:fixed;pointer-events:none;border:2px solid var(--vg-primary);border-radius:8px;box-shadow:0 0 0 0 var(--vg-primary-glow);animation:vg-pulse 2s infinite;transition:all .2s cubic-bezier(.19,1,.22,1)}@keyframes vg-pulse{0%{box-shadow:0 0 0 0 var(--vg-primary-glow)}70%{box-shadow:0 0 0 15px #6366f100}to{box-shadow:0 0 #6366f100}}.vg-selection-label{position:absolute;top:-40px;left:0;background:var(--vg-primary-gradient);color:#fff;padding:8px 16px;border-radius:20px;font-size:13px;font-weight:700;white-space:nowrap;box-shadow:0 4px 12px #6366f14d;display:flex;align-items:center;gap:8px}.vg-pin-container{transition:transform .2s ease}.vg-pin-container:hover{transform:scale(1.1)}.vg-formal-pin{width:32px;height:32px;border-radius:50%;background:var(--vg-primary-gradient);border:3px solid white;box-shadow:0 4px 12px #6366f166;display:flex;align-items:center;justify-content:center;color:#fff;transition:all .2s ease}.vg-formal-pin.ready{background:linear-gradient(135deg,#10b981,#059669);box-shadow:0 4px 12px #10b98166}.vg-formal-pin.modal-variant{background:linear-gradient(135deg,#f59e0b,#d97706);box-shadow:0 4px 12px #f59e0b66;border-style:dashed}.vg-pin-tooltip{position:absolute;top:calc(100% + 12px);left:50%;transform:translate(-50%);padding:12px 16px;border-radius:12px;background:#fff;color:#1e293b;width:240px;font-size:13px;box-shadow:0 10px 40px #00000026;opacity:0;pointer-events:none;transition:all .2s ease;border:1px solid #e2e8f0}.vg-pin-tooltip.vg-top{top:auto;bottom:calc(100% + 12px)}.vg-pin-container:hover .vg-pin-tooltip{opacity:1;transform:translate(-50%) translateY(-5px)}.vg-action-bar{display:flex;gap:12px;padding:0;background:transparent;border:none;box-shadow:none;-webkit-backdrop-filter:none;backdrop-filter:none}.vg-custom-scrollbar::-webkit-scrollbar{width:6px}.vg-custom-scrollbar::-webkit-scrollbar-track{background:transparent}.vg-custom-scrollbar::-webkit-scrollbar-thumb{background:#6366f166;border-radius:10px;transition:all .2s ease}.vg-custom-scrollbar::-webkit-scrollbar-thumb:hover{background:#6366f1b3}.vg-spinner{border:3px solid rgba(99,102,241,.1);border-top:3px solid var(--vg-primary);border-radius:50%;width:32px;height:32px;animation:vg-spin .8s linear infinite}@keyframes vg-spin{to{transform:rotate(360deg)}}.vg-animate-spin{animation:vg-spin .8s linear infinite}.vg-cursor-pointer,.vg-cursor-pointer *{cursor:pointer!important}')),document.head.appendChild(r)}}catch(a){console.error("vite-plugin-css-injected-by-js",a)}})();
2
- (function(M,m){typeof exports=="object"&&typeof module<"u"?m(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],m):(M=typeof globalThis<"u"?globalThis:M||self,m(M.ViewGateWrapper={},M.React,M.ReactDOM))})(this,(function(M,m,Et){"use strict";var fe={exports:{}},oe={};var Fe;function kt(){if(Fe)return oe;Fe=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,a,s){var i=null;if(s!==void 0&&(i=""+s),a.key!==void 0&&(i=""+a.key),"key"in a){s={};for(var d in a)d!=="key"&&(s[d]=a[d])}else s=a;return a=s.ref,{$$typeof:e,type:r,key:i,ref:a!==void 0?a:null,props:s}}return oe.Fragment=t,oe.jsx=n,oe.jsxs=n,oe}var ie={};var He;function Rt(){return He||(He=1,process.env.NODE_ENV!=="production"&&(function(){function e(c){if(c==null)return null;if(typeof c=="function")return c.$$typeof===ce?null:c.displayName||c.name||null;if(typeof c=="string")return c;switch(c){case P:return"Fragment";case H:return"Profiler";case F:return"StrictMode";case Le:return"Suspense";case W:return"SuspenseList";case vt:return"Activity"}if(typeof c=="object")switch(typeof c.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),c.$$typeof){case T:return"Portal";case L:return c.displayName||"Context";case G:return(c._context.displayName||"Context")+".Consumer";case _:var g=c.render;return c=c.displayName,c||(c=g.displayName||g.name||"",c=c!==""?"ForwardRef("+c+")":"ForwardRef"),c;case $:return g=c.displayName||null,g!==null?g:e(c.type)||"Memo";case we:g=c._payload,c=c._init;try{return e(c(g))}catch{}}return null}function t(c){return""+c}function n(c){try{t(c);var g=!1}catch{g=!0}if(g){g=console;var b=g.error,E=typeof Symbol=="function"&&Symbol.toStringTag&&c[Symbol.toStringTag]||c.constructor.name||"Object";return b.call(g,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",E),t(c)}}function r(c){if(c===P)return"<>";if(typeof c=="object"&&c!==null&&c.$$typeof===we)return"<...>";try{var g=e(c);return g?"<"+g+">":"<...>"}catch{return"<...>"}}function a(){var c=ne.A;return c===null?null:c.getOwner()}function s(){return Error("react-stack-top-frame")}function i(c){if(ve.call(c,"key")){var g=Object.getOwnPropertyDescriptor(c,"key").get;if(g&&g.isReactWarning)return!1}return c.key!==void 0}function d(c,g){function b(){re||(re=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",g))}b.isReactWarning=!0,Object.defineProperty(c,"key",{get:b,configurable:!0})}function p(){var c=e(this.type);return K[c]||(K[c]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),c=this.props.ref,c!==void 0?c:null}function u(c,g,b,E,se,Y){var j=b.ref;return c={$$typeof:S,type:c,key:g,props:b,_owner:E},(j!==void 0?j:null)!==null?Object.defineProperty(c,"ref",{enumerable:!1,get:p}):Object.defineProperty(c,"ref",{enumerable:!1,value:null}),c._store={},Object.defineProperty(c._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(c,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(c,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:se}),Object.defineProperty(c,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:Y}),Object.freeze&&(Object.freeze(c.props),Object.freeze(c)),c}function v(c,g,b,E,se,Y){var j=g.children;if(j!==void 0)if(E)if(be(j)){for(E=0;E<j.length;E++)f(j[E]);Object.freeze&&Object.freeze(j)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else f(j);if(ve.call(g,"key")){j=e(c);var V=Object.keys(g).filter(function(Me){return Me!=="key"});E=0<V.length?"{key: someKey, "+V.join(": ..., ")+": ...}":"{key: someKey}",Se[j+E]||(V=0<V.length?"{"+V.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
2
+ (function(M,m){typeof exports=="object"&&typeof module<"u"?m(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],m):(M=typeof globalThis<"u"?globalThis:M||self,m(M.ViewGateWrapper={},M.React,M.ReactDOM))})(this,(function(M,m,kt){"use strict";var he={exports:{}},oe={};var We;function Rt(){if(We)return oe;We=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,a,s){var i=null;if(s!==void 0&&(i=""+s),a.key!==void 0&&(i=""+a.key),"key"in a){s={};for(var d in a)d!=="key"&&(s[d]=a[d])}else s=a;return a=s.ref,{$$typeof:e,type:r,key:i,ref:a!==void 0?a:null,props:s}}return oe.Fragment=t,oe.jsx=n,oe.jsxs=n,oe}var ie={};var $e;function _t(){return $e||($e=1,process.env.NODE_ENV!=="production"&&(function(){function e(c){if(c==null)return null;if(typeof c=="function")return c.$$typeof===le?null:c.displayName||c.name||null;if(typeof c=="string")return c;switch(c){case P:return"Fragment";case H:return"Profiler";case F:return"StrictMode";case Me:return"Suspense";case W:return"SuspenseList";case bt:return"Activity"}if(typeof c=="object")switch(typeof c.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),c.$$typeof){case T:return"Portal";case L:return c.displayName||"Context";case A:return(c._context.displayName||"Context")+".Consumer";case O:var y=c.render;return c=c.displayName,c||(c=y.displayName||y.name||"",c=c!==""?"ForwardRef("+c+")":"ForwardRef"),c;case B:return y=c.displayName||null,y!==null?y:e(c.type)||"Memo";case be:y=c._payload,c=c._init;try{return e(c(y))}catch{}}return null}function t(c){return""+c}function n(c){try{t(c);var y=!1}catch{y=!0}if(y){y=console;var b=y.error,R=typeof Symbol=="function"&&Symbol.toStringTag&&c[Symbol.toStringTag]||c.constructor.name||"Object";return b.call(y,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",R),t(c)}}function r(c){if(c===P)return"<>";if(typeof c=="object"&&c!==null&&c.$$typeof===be)return"<...>";try{var y=e(c);return y?"<"+y+">":"<...>"}catch{return"<...>"}}function a(){var c=ne.A;return c===null?null:c.getOwner()}function s(){return Error("react-stack-top-frame")}function i(c){if(Se.call(c,"key")){var y=Object.getOwnPropertyDescriptor(c,"key").get;if(y&&y.isReactWarning)return!1}return c.key!==void 0}function d(c,y){function b(){re||(re=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",y))}b.isReactWarning=!0,Object.defineProperty(c,"key",{get:b,configurable:!0})}function p(){var c=e(this.type);return K[c]||(K[c]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),c=this.props.ref,c!==void 0?c:null}function u(c,y,b,R,se,X){var j=b.ref;return c={$$typeof:S,type:c,key:y,props:b,_owner:R},(j!==void 0?j:null)!==null?Object.defineProperty(c,"ref",{enumerable:!1,get:p}):Object.defineProperty(c,"ref",{enumerable:!1,value:null}),c._store={},Object.defineProperty(c._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(c,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(c,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:se}),Object.defineProperty(c,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:X}),Object.freeze&&(Object.freeze(c.props),Object.freeze(c)),c}function v(c,y,b,R,se,X){var j=y.children;if(j!==void 0)if(R)if(Ce(j)){for(R=0;R<j.length;R++)f(j[R]);Object.freeze&&Object.freeze(j)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else f(j);if(Se.call(y,"key")){j=e(c);var V=Object.keys(y).filter(function(ze){return ze!=="key"});R=0<V.length?"{key: someKey, "+V.join(": ..., ")+": ...}":"{key: someKey}",Ee[j+R]||(V=0<V.length?"{"+V.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
3
3
  let props = %s;
4
4
  <%s {...props} />
5
5
  React keys must be passed directly to JSX without using spread:
6
6
  let props = %s;
7
- <%s key={someKey} {...props} />`,E,j,V,j),Se[j+E]=!0)}if(j=null,b!==void 0&&(n(b),j=""+b),i(g)&&(n(g.key),j=""+g.key),"key"in g){b={};for(var de in g)de!=="key"&&(b[de]=g[de])}else b=g;return j&&d(b,typeof c=="function"?c.displayName||c.name||"Unknown":c),u(c,j,b,a(),se,Y)}function f(c){w(c)?c._store&&(c._store.validated=1):typeof c=="object"&&c!==null&&c.$$typeof===we&&(c._payload.status==="fulfilled"?w(c._payload.value)&&c._payload.value._store&&(c._payload.value._store.validated=1):c._store&&(c._store.validated=1))}function w(c){return typeof c=="object"&&c!==null&&c.$$typeof===S}var x=m,S=Symbol.for("react.transitional.element"),T=Symbol.for("react.portal"),P=Symbol.for("react.fragment"),F=Symbol.for("react.strict_mode"),H=Symbol.for("react.profiler"),G=Symbol.for("react.consumer"),L=Symbol.for("react.context"),_=Symbol.for("react.forward_ref"),Le=Symbol.for("react.suspense"),W=Symbol.for("react.suspense_list"),$=Symbol.for("react.memo"),we=Symbol.for("react.lazy"),vt=Symbol.for("react.activity"),ce=Symbol.for("react.client.reference"),ne=x.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ve=Object.prototype.hasOwnProperty,be=Array.isArray,B=console.createTask?console.createTask:function(){return null};x={react_stack_bottom_frame:function(c){return c()}};var re,K={},le=x.react_stack_bottom_frame.bind(x,s)(),U=B(r(s)),Se={};ie.Fragment=P,ie.jsx=function(c,g,b){var E=1e4>ne.recentlyCreatedOwnerStacks++;return v(c,g,b,!1,E?Error("react-stack-top-frame"):le,E?B(r(c)):U)},ie.jsxs=function(c,g,b){var E=1e4>ne.recentlyCreatedOwnerStacks++;return v(c,g,b,!0,E?Error("react-stack-top-frame"):le,E?B(r(c)):U)}})()),ie}var We;function jt(){return We||(We=1,process.env.NODE_ENV==="production"?fe.exports=kt():fe.exports=Rt()),fe.exports}var o=jt();const _t=({children:e})=>{const t=m.useRef(null),[n,r]=m.useState(null);return m.useEffect(()=>{if(t.current&&!t.current.shadowRoot){const a=t.current.attachShadow({mode:"open"});document.querySelectorAll("style[data-vite-dev-id], style:not([data-vite-dev-id])").forEach(d=>{(d.textContent?.includes(".vg-")||d.textContent?.includes("--vg-"))&&a.appendChild(d.cloneNode(!0))});const i=document.createElement("link");i.rel="stylesheet",i.href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800;900&display=swap",a.appendChild(i),r(a)}},[]),o.jsx("div",{"data-source-path":"/src/components/ShadowRootWrapper.tsx:38",ref:t,id:"viewgate-shadow-host",children:n&&Et.createPortal(e,n)})};const $e=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();const Ot=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const Tt=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase());const Be=e=>{const t=Tt(e);return t.charAt(0).toUpperCase()+t.slice(1)};var Vt={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const Pt=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};const Gt=m.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:a="",children:s,iconNode:i,...d},p)=>m.createElement("svg",{ref:p,...Vt,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:$e("lucide",a),...!s&&!Pt(d)&&{"aria-hidden":"true"},...d},[...i.map(([u,v])=>m.createElement(u,v)),...Array.isArray(s)?s:[s]]));const A=(e,t)=>{const n=m.forwardRef(({className:r,...a},s)=>m.createElement(Gt,{ref:s,iconNode:t,className:$e(`lucide-${Ot(Be(e))}`,`lucide-${e}`,r),...a}));return n.displayName=Be(e),n};const At=A("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);const q=A("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);const Ue=A("clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]]);const Ye=A("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);const Nt=A("eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);const Xe=A("grip-vertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]);const Lt=A("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);const Ee=A("message-square",[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]]);const Mt=A("mouse-pointer-2",[["path",{d:"M4.037 4.688a.495.495 0 0 1 .651-.651l16 6.5a.5.5 0 0 1-.063.947l-6.124 1.58a2 2 0 0 0-1.438 1.435l-1.579 6.126a.5.5 0 0 1-.947.063z",key:"edeuup"}]]);const It=A("pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);const zt=A("rotate-ccw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);const Dt=A("send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);const Je=A("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]);const ke=A("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Ft={en:{enterMode:"Enter Feedback Mode",exitMode:"Exit Mode",feedbackHeader:"Feedback",selectedElement:"Selected element:",line:"Line",placeholder:"Tell us what you'd like to change...",cancel:"Cancel",send:"Send Feedback",submitting:"Submitting...",success:"Your feedback has been submitted successfully!",error:"Failed to submit feedback. Check backend connection.",successHeader:"Success",errorHeader:"Error",preview:"Preview",viewComments:"View Comments",close:"Close",observe:"Observe",pending:"Pending",readyForReview:"Ready for Review",noComments:"No comments found.",deleteConfirm:"Delete comment",markReady:"Mark as Ready",reopen:"Reopen",review:"Review",confirmDelete:"Are you sure you want to permanently delete this comment? This action cannot be undone.",markReadyConfirm:"Complete review",confirmMarkReady:"Do you want to mark this comment as ready? it will be moved to the completed state.",reopenConfirm:"Reopen comment",confirmReopen:"Do you want to set this comment back to pending status?",yes:"Yes, confirm",no:"No, cancel",deleteSuccess:"Comment deleted successfully.",updateSuccess:"Updated successfully.",navigating:"Redirecting to review...",selectToComment:"Click to comment",feedbackSubheader:"What would you like to improve here?",sendFeedback:"Send Comment",edit:"Edit",save:"Save",commentDetails:"Comment Details",annotations:"Comments",viewAll:"View All",exitConfirmTitle:"Close ViewGate?",exitConfirmMessage:"Are you sure you want to close ViewGate? You can reopen it at any time by adding ?viewgate=true to your URL."},es:{enterMode:"Activar Modo Comentarios",exitMode:"Salir del Modo",feedbackHeader:"Comentarios",selectedElement:"Elemento seleccionado:",line:"Línea",placeholder:"Cuéntanos qué te gustaría cambiar...",cancel:"Cancelar",send:"Enviar Comentarios",submitting:"Enviando...",success:"¡Tus comentarios se han enviado con éxito!",error:"Error al enviar comentarios. Revisa la conexión con el servidor.",successHeader:"Éxito",errorHeader:"Error",preview:"Vista previa",viewComments:"Ver Comentarios",close:"Cerrar",observe:"Observar",pending:"Pendiente",readyForReview:"Lista para revisión",noComments:"No hay comentarios.",deleteConfirm:"Eliminar comentario",markReady:"Marcar como Listo",reopen:"Reabrir",review:"Revisar",confirmDelete:"¿Estás seguro de que deseas eliminar permanentemente este comentario? Esta acción no se puede deshacer.",markReadyConfirm:"Finalizar revisión",confirmMarkReady:"¿Deseas marcar este comentario como listo? Pasará al estado completado.",reopenConfirm:"Reabrir comentario",confirmReopen:"¿Deseas volver a poner este comentario en estado pendiente?",yes:"Sí, confirmar",no:"No, cancelar",deleteSuccess:"El comentario ha sido eliminado.",updateSuccess:"Actualizado correctamente.",navigating:"Redirigiendo a revisión...",selectToComment:"Haz clic para comentar",feedbackSubheader:"¿Qué te gustaría mejorar aquí?",sendFeedback:"Enviar Comentario",edit:"Editar",save:"Guardar",commentDetails:"Detalles del Comentario",annotations:"Comentarios",viewAll:"Ver Todos",exitConfirmTitle:"¿Cerrar ViewGate?",exitConfirmMessage:"¿Estás seguro de que deseas cerrar ViewGate? Puedes volver a activarlo en cualquier momento agregando ?viewgate=true a la URL."}},Ze=m.createContext(void 0),Ke=()=>{const e=m.useContext(Ze);if(!e)throw new Error("useViewGate must be used within a ViewGateProvider");return e},Re="viewgate_enabled",Ht=()=>typeof window>"u"?!1:new URLSearchParams(window.location.search).has("viewgate")?(sessionStorage.setItem(Re,"true"),!0):sessionStorage.getItem(Re)==="true",Wt=({children:e,language:t="es",apiKey:n,baseUrl:r="https://view-gate.vercel.app"})=>{const[a,s]=m.useState(!1),[i,d]=m.useState([]);m.useEffect(()=>{s(Ht())},[]);const p=()=>{if(sessionStorage.removeItem(Re),s(!1),typeof window<"u"){const f=new URL(window.location.href);f.searchParams.delete("viewgate"),window.history.replaceState({},"",f.toString())}},u=(f,w)=>{const x=Date.now();d(S=>[...S,{id:x,message:f,type:w}]),setTimeout(()=>{d(S=>S.filter(T=>T.id!==x))},4e3)},v=Ft[t];return o.jsxs(Ze.Provider,{"data-source-path":"/src/components/ViewGateProvider.tsx:248",value:{addToast:u,language:t,t:v,apiKey:n,baseUrl:r,disableViewGate:p,hasActiveToasts:i.length>0},children:[e,a&&o.jsx(_t,{"data-source-path":"/src/components/ViewGateProvider.tsx:259",children:o.jsxs("div",{"data-source-path":"/src/components/ViewGateProvider.tsx:260",className:"vg-container",children:[o.jsx(wt,{"data-source-path":"/src/components/ViewGateProvider.tsx:261"}),o.jsx("div",{"data-source-path":"/src/components/ViewGateProvider.tsx:262",className:"vg-toasts",style:{zIndex:2147483646},children:i.map(f=>o.jsxs("div",{"data-source-path":"/src/components/ViewGateProvider.tsx:264",className:`vg-toast vg-animate-slide ${f.type}`,children:[f.type==="success"?o.jsx(q,{"data-source-path":"/src/components/ViewGateProvider.tsx:266",size:24,color:"#22c55e"}):o.jsx(At,{"data-source-path":"/src/components/ViewGateProvider.tsx:268",size:24,color:"#ef4444"}),o.jsxs("div",{"data-source-path":"/src/components/ViewGateProvider.tsx:270",children:[o.jsx("strong",{"data-source-path":"/src/components/ViewGateProvider.tsx:271",style:{display:"block",fontSize:"13px",color:"#0f172a",textTransform:"uppercase",marginBottom:"2px"},children:f.type==="success"?v.successHeader:v.errorHeader}),o.jsx("span",{"data-source-path":"/src/components/ViewGateProvider.tsx:274",style:{fontSize:"14px",color:"#000000"},children:f.message})]})]},f.id))})]})})]})};function $t(e,t){if(e.match(/^[a-z]+:\/\//i))return e;if(e.match(/^\/\//))return window.location.protocol+e;if(e.match(/^[a-z]+:/i))return e;const n=document.implementation.createHTMLDocument(),r=n.createElement("base"),a=n.createElement("a");return n.head.appendChild(r),n.body.appendChild(a),t&&(r.href=t),a.href=e,a.href}const Bt=(()=>{let e=0;const t=()=>`0000${(Math.random()*36**4<<0).toString(36)}`.slice(-4);return()=>(e+=1,`u${t()}${e}`)})();function J(e){const t=[];for(let n=0,r=e.length;n<r;n++)t.push(e[n]);return t}let ee=null;function Qe(e={}){return ee||(e.includeStyleProperties?(ee=e.includeStyleProperties,ee):(ee=J(window.getComputedStyle(document.documentElement)),ee))}function he(e,t){const r=(e.ownerDocument.defaultView||window).getComputedStyle(e).getPropertyValue(t);return r?parseFloat(r.replace("px","")):0}function Ut(e){const t=he(e,"border-left-width"),n=he(e,"border-right-width");return e.clientWidth+t+n}function Yt(e){const t=he(e,"border-top-width"),n=he(e,"border-bottom-width");return e.clientHeight+t+n}function qe(e,t={}){const n=t.width||Ut(e),r=t.height||Yt(e);return{width:n,height:r}}function Xt(){let e,t;try{t=process}catch{}const n=t&&t.env?t.env.devicePixelRatio:null;return n&&(e=parseInt(n,10),Number.isNaN(e)&&(e=1)),e||window.devicePixelRatio||1}const I=16384;function Jt(e){(e.width>I||e.height>I)&&(e.width>I&&e.height>I?e.width>e.height?(e.height*=I/e.width,e.width=I):(e.width*=I/e.height,e.height=I):e.width>I?(e.height*=I/e.width,e.width=I):(e.width*=I/e.height,e.height=I))}function ge(e){return new Promise((t,n)=>{const r=new Image;r.onload=()=>{r.decode().then(()=>{requestAnimationFrame(()=>t(r))})},r.onerror=n,r.crossOrigin="anonymous",r.decoding="async",r.src=e})}async function Zt(e){return Promise.resolve().then(()=>new XMLSerializer().serializeToString(e)).then(encodeURIComponent).then(t=>`data:image/svg+xml;charset=utf-8,${t}`)}async function Kt(e,t,n){const r="http://www.w3.org/2000/svg",a=document.createElementNS(r,"svg"),s=document.createElementNS(r,"foreignObject");return a.setAttribute("width",`${t}`),a.setAttribute("height",`${n}`),a.setAttribute("viewBox",`0 0 ${t} ${n}`),s.setAttribute("width","100%"),s.setAttribute("height","100%"),s.setAttribute("x","0"),s.setAttribute("y","0"),s.setAttribute("externalResourcesRequired","true"),a.appendChild(s),s.appendChild(e),Zt(a)}const N=(e,t)=>{if(e instanceof t)return!0;const n=Object.getPrototypeOf(e);return n===null?!1:n.constructor.name===t.name||N(n,t)};function Qt(e){const t=e.getPropertyValue("content");return`${e.cssText} content: '${t.replace(/'|"/g,"")}';`}function qt(e,t){return Qe(t).map(n=>{const r=e.getPropertyValue(n),a=e.getPropertyPriority(n);return`${n}: ${r}${a?" !important":""};`}).join(" ")}function en(e,t,n,r){const a=`.${e}:${t}`,s=n.cssText?Qt(n):qt(n,r);return document.createTextNode(`${a}{${s}}`)}function et(e,t,n,r){const a=window.getComputedStyle(e,n),s=a.getPropertyValue("content");if(s===""||s==="none")return;const i=Bt();try{t.className=`${t.className} ${i}`}catch{return}const d=document.createElement("style");d.appendChild(en(i,n,a,r)),t.appendChild(d)}function tn(e,t,n){et(e,t,":before",n),et(e,t,":after",n)}const tt="application/font-woff",nt="image/jpeg",nn={woff:tt,woff2:tt,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:nt,jpeg:nt,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};function rn(e){const t=/\.([^./]*?)$/g.exec(e);return t?t[1]:""}function je(e){const t=rn(e).toLowerCase();return nn[t]||""}function sn(e){return e.split(/,/)[1]}function _e(e){return e.search(/^(data:)/)!==-1}function an(e,t){return`data:${t};base64,${e}`}async function rt(e,t,n){const r=await fetch(e,t);if(r.status===404)throw new Error(`Resource "${r.url}" not found`);const a=await r.blob();return new Promise((s,i)=>{const d=new FileReader;d.onerror=i,d.onloadend=()=>{try{s(n({res:r,result:d.result}))}catch(p){i(p)}},d.readAsDataURL(a)})}const Oe={};function on(e,t,n){let r=e.replace(/\?.*/,"");return n&&(r=e),/ttf|otf|eot|woff2?/i.test(r)&&(r=r.replace(/.*\//,"")),t?`[${t}]${r}`:r}async function Te(e,t,n){const r=on(e,t,n.includeQueryParams);if(Oe[r]!=null)return Oe[r];n.cacheBust&&(e+=(/\?/.test(e)?"&":"?")+new Date().getTime());let a;try{const s=await rt(e,n.fetchRequestInit,({res:i,result:d})=>(t||(t=i.headers.get("Content-Type")||""),sn(d)));a=an(s,t)}catch(s){a=n.imagePlaceholder||"";let i=`Failed to fetch resource: ${e}`;s&&(i=typeof s=="string"?s:s.message),i&&console.warn(i)}return Oe[r]=a,a}async function cn(e){const t=e.toDataURL();return t==="data:,"?e.cloneNode(!1):ge(t)}async function ln(e,t){if(e.currentSrc){const s=document.createElement("canvas"),i=s.getContext("2d");s.width=e.clientWidth,s.height=e.clientHeight,i?.drawImage(e,0,0,s.width,s.height);const d=s.toDataURL();return ge(d)}const n=e.poster,r=je(n),a=await Te(n,r,t);return ge(a)}async function dn(e,t){var n;try{if(!((n=e?.contentDocument)===null||n===void 0)&&n.body)return await ye(e.contentDocument.body,t,!0)}catch{}return e.cloneNode(!1)}async function un(e,t){return N(e,HTMLCanvasElement)?cn(e):N(e,HTMLVideoElement)?ln(e,t):N(e,HTMLIFrameElement)?dn(e,t):e.cloneNode(st(e))}const pn=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SLOT",st=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SVG";async function mn(e,t,n){var r,a;if(st(t))return t;let s=[];return pn(e)&&e.assignedNodes?s=J(e.assignedNodes()):N(e,HTMLIFrameElement)&&(!((r=e.contentDocument)===null||r===void 0)&&r.body)?s=J(e.contentDocument.body.childNodes):s=J(((a=e.shadowRoot)!==null&&a!==void 0?a:e).childNodes),s.length===0||N(e,HTMLVideoElement)||await s.reduce((i,d)=>i.then(()=>ye(d,n)).then(p=>{p&&t.appendChild(p)}),Promise.resolve()),t}function fn(e,t,n){const r=t.style;if(!r)return;const a=window.getComputedStyle(e);a.cssText?(r.cssText=a.cssText,r.transformOrigin=a.transformOrigin):Qe(n).forEach(s=>{let i=a.getPropertyValue(s);s==="font-size"&&i.endsWith("px")&&(i=`${Math.floor(parseFloat(i.substring(0,i.length-2)))-.1}px`),N(e,HTMLIFrameElement)&&s==="display"&&i==="inline"&&(i="block"),s==="d"&&t.getAttribute("d")&&(i=`path(${t.getAttribute("d")})`),r.setProperty(s,i,a.getPropertyPriority(s))})}function hn(e,t){N(e,HTMLTextAreaElement)&&(t.innerHTML=e.value),N(e,HTMLInputElement)&&t.setAttribute("value",e.value)}function gn(e,t){if(N(e,HTMLSelectElement)){const r=Array.from(t.children).find(a=>e.value===a.getAttribute("value"));r&&r.setAttribute("selected","")}}function yn(e,t,n){return N(t,Element)&&(fn(e,t,n),tn(e,t,n),hn(e,t),gn(e,t)),t}async function xn(e,t){const n=e.querySelectorAll?e.querySelectorAll("use"):[];if(n.length===0)return e;const r={};for(let s=0;s<n.length;s++){const d=n[s].getAttribute("xlink:href");if(d){const p=e.querySelector(d),u=document.querySelector(d);!p&&u&&!r[d]&&(r[d]=await ye(u,t,!0))}}const a=Object.values(r);if(a.length){const s="http://www.w3.org/1999/xhtml",i=document.createElementNS(s,"svg");i.setAttribute("xmlns",s),i.style.position="absolute",i.style.width="0",i.style.height="0",i.style.overflow="hidden",i.style.display="none";const d=document.createElementNS(s,"defs");i.appendChild(d);for(let p=0;p<a.length;p++)d.appendChild(a[p]);e.appendChild(i)}return e}async function ye(e,t,n){return!n&&t.filter&&!t.filter(e)?null:Promise.resolve(e).then(r=>un(r,t)).then(r=>mn(e,r,t)).then(r=>yn(e,r,t)).then(r=>xn(r,t))}const at=/url\((['"]?)([^'"]+?)\1\)/g,wn=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,vn=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function bn(e){const t=e.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${t})(['"]?\\))`,"g")}function Sn(e){const t=[];return e.replace(at,(n,r,a)=>(t.push(a),n)),t.filter(n=>!_e(n))}async function Cn(e,t,n,r,a){try{const s=n?$t(t,n):t,i=je(t);let d;return a||(d=await Te(s,i,r)),e.replace(bn(t),`$1${d}$3`)}catch{}return e}function En(e,{preferredFontFormat:t}){return t?e.replace(vn,n=>{for(;;){const[r,,a]=wn.exec(n)||[];if(!a)return"";if(a===t)return`src: ${r};`}}):e}function ot(e){return e.search(at)!==-1}async function it(e,t,n){if(!ot(e))return e;const r=En(e,n);return Sn(r).reduce((s,i)=>s.then(d=>Cn(d,i,t,n)),Promise.resolve(r))}async function te(e,t,n){var r;const a=(r=t.style)===null||r===void 0?void 0:r.getPropertyValue(e);if(a){const s=await it(a,null,n);return t.style.setProperty(e,s,t.style.getPropertyPriority(e)),!0}return!1}async function kn(e,t){await te("background",e,t)||await te("background-image",e,t),await te("mask",e,t)||await te("-webkit-mask",e,t)||await te("mask-image",e,t)||await te("-webkit-mask-image",e,t)}async function Rn(e,t){const n=N(e,HTMLImageElement);if(!(n&&!_e(e.src))&&!(N(e,SVGImageElement)&&!_e(e.href.baseVal)))return;const r=n?e.src:e.href.baseVal,a=await Te(r,je(r),t);await new Promise((s,i)=>{e.onload=s,e.onerror=t.onImageErrorHandler?(...p)=>{try{s(t.onImageErrorHandler(...p))}catch(u){i(u)}}:i;const d=e;d.decode&&(d.decode=s),d.loading==="lazy"&&(d.loading="eager"),n?(e.srcset="",e.src=a):e.href.baseVal=a})}async function jn(e,t){const r=J(e.childNodes).map(a=>ct(a,t));await Promise.all(r).then(()=>e)}async function ct(e,t){N(e,Element)&&(await kn(e,t),await Rn(e,t),await jn(e,t))}function _n(e,t){const{style:n}=e;t.backgroundColor&&(n.backgroundColor=t.backgroundColor),t.width&&(n.width=`${t.width}px`),t.height&&(n.height=`${t.height}px`);const r=t.style;return r!=null&&Object.keys(r).forEach(a=>{n[a]=r[a]}),e}const lt={};async function dt(e){let t=lt[e];if(t!=null)return t;const r=await(await fetch(e)).text();return t={url:e,cssText:r},lt[e]=t,t}async function ut(e,t){let n=e.cssText;const r=/url\(["']?([^"')]+)["']?\)/g,s=(n.match(/url\([^)]+\)/g)||[]).map(async i=>{let d=i.replace(r,"$1");return d.startsWith("https://")||(d=new URL(d,e.url).href),rt(d,t.fetchRequestInit,({result:p})=>(n=n.replace(i,`url(${p})`),[i,p]))});return Promise.all(s).then(()=>n)}function pt(e){if(e==null)return[];const t=[],n=/(\/\*[\s\S]*?\*\/)/gi;let r=e.replace(n,"");const a=new RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})","gi");for(;;){const p=a.exec(r);if(p===null)break;t.push(p[0])}r=r.replace(a,"");const s=/@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi,i="((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})",d=new RegExp(i,"gi");for(;;){let p=s.exec(r);if(p===null){if(p=d.exec(r),p===null)break;s.lastIndex=d.lastIndex}else d.lastIndex=s.lastIndex;t.push(p[0])}return t}async function On(e,t){const n=[],r=[];return e.forEach(a=>{if("cssRules"in a)try{J(a.cssRules||[]).forEach((s,i)=>{if(s.type===CSSRule.IMPORT_RULE){let d=i+1;const p=s.href,u=dt(p).then(v=>ut(v,t)).then(v=>pt(v).forEach(f=>{try{a.insertRule(f,f.startsWith("@import")?d+=1:a.cssRules.length)}catch(w){console.error("Error inserting rule from remote css",{rule:f,error:w})}})).catch(v=>{console.error("Error loading remote css",v.toString())});r.push(u)}})}catch(s){const i=e.find(d=>d.href==null)||document.styleSheets[0];a.href!=null&&r.push(dt(a.href).then(d=>ut(d,t)).then(d=>pt(d).forEach(p=>{i.insertRule(p,i.cssRules.length)})).catch(d=>{console.error("Error loading remote stylesheet",d)})),console.error("Error inlining remote css file",s)}}),Promise.all(r).then(()=>(e.forEach(a=>{if("cssRules"in a)try{J(a.cssRules||[]).forEach(s=>{n.push(s)})}catch(s){console.error(`Error while reading CSS rules from ${a.href}`,s)}}),n))}function Tn(e){return e.filter(t=>t.type===CSSRule.FONT_FACE_RULE).filter(t=>ot(t.style.getPropertyValue("src")))}async function Vn(e,t){if(e.ownerDocument==null)throw new Error("Provided element is not within a Document");const n=J(e.ownerDocument.styleSheets),r=await On(n,t);return Tn(r)}function mt(e){return e.trim().replace(/["']/g,"")}function Pn(e){const t=new Set;function n(r){(r.style.fontFamily||getComputedStyle(r).fontFamily).split(",").forEach(s=>{t.add(mt(s))}),Array.from(r.children).forEach(s=>{s instanceof HTMLElement&&n(s)})}return n(e),t}async function Gn(e,t){const n=await Vn(e,t),r=Pn(e);return(await Promise.all(n.filter(s=>r.has(mt(s.style.fontFamily))).map(s=>{const i=s.parentStyleSheet?s.parentStyleSheet.href:null;return it(s.cssText,i,t)}))).join(`
8
- `)}async function An(e,t){const n=t.fontEmbedCSS!=null?t.fontEmbedCSS:t.skipFonts?null:await Gn(e,t);if(n){const r=document.createElement("style"),a=document.createTextNode(n);r.appendChild(a),e.firstChild?e.insertBefore(r,e.firstChild):e.appendChild(r)}}async function Nn(e,t={}){const{width:n,height:r}=qe(e,t),a=await ye(e,t,!0);return await An(a,t),await ct(a,t),_n(a,t),await Kt(a,n,r)}async function Ln(e,t={}){const{width:n,height:r}=qe(e,t),a=await Nn(e,t),s=await ge(a),i=document.createElement("canvas"),d=i.getContext("2d"),p=t.pixelRatio||Xt(),u=t.canvasWidth||n,v=t.canvasHeight||r;return i.width=u*p,i.height=v*p,t.skipAutoScale||Jt(i),i.style.width=`${u}`,i.style.height=`${v}`,t.backgroundColor&&(d.fillStyle=t.backgroundColor,d.fillRect(0,0,i.width,i.height)),d.drawImage(s,0,0,i.width,i.height),i}async function ft(e,t={}){return(await Ln(e,t)).toDataURL()}const xe=2147483647,Ve=xe,Pe=2e6,Mn=xe-10,In=xe-5,zn=xe-15,Dn=()=>{const e=window.innerWidth;return e<768?"mobile":e<1024?"tablet":"desktop"},Fn=e=>{let t=0;for(let n=0;n<e.length;n++){const r=e.charCodeAt(n);t=(t<<5)-t+r,t=t&t}return Math.abs(t).toString(16)},Hn=(e,t)=>{if(!e)return"";try{const n=new Date(e);return isNaN(n.getTime())?"":new Intl.DateTimeFormat(t==="es"?"es-ES":"en-US",{day:"2-digit",month:"2-digit",year:"numeric",hour:"2-digit",minute:"2-digit",hour12:!1}).format(n)}catch{return""}},Wn=e=>{const t=(e.innerText||"").slice(0,30).trim(),n={tag:e.tagName.toLowerCase(),classHash:Fn(e.className),textSnippet:t,parentTag:e.parentElement?.tagName.toLowerCase(),neighborCount:e.parentElement?.children.length||0},r=e.getAttribute("aria-label");r&&(n.ariaLabel=r);const a=e.getAttribute("role");a&&(n.role=a);const s=e.getAttribute("name");return s&&(n.name=s),n},$n=(()=>{let e=null,t=null;return n=>{if(!n||typeof window>"u"||typeof document>"u")return n;if(n.includes("oklch")||n.includes("oklab")||n.includes("lab(")||n.includes("lch(")||n.includes("color("))try{if(e||(e=document.createElement("canvas"),e.width=1,e.height=1),t||(t=e.getContext("2d",{willReadFrequently:!0})),t){t.fillStyle="#000000",t.fillStyle=n;const s=t.fillStyle;if(s&&!s.includes("oklch")&&!s.includes("oklab"))return s}const r=document.createElement("div");r.style.color=n,document.body.appendChild(r);const a=getComputedStyle(r).color;return document.body.removeChild(r),a&&!a.includes("oklch")?a:"rgb(0,0,0)"}catch{return"rgb(0,0,0)"}return n}})(),ht=(e,t,n,r)=>new Promise(a=>{const s=new Image;s.onload=()=>{const i=document.createElement("canvas"),d=window.devicePixelRatio||1,p=t.width+n*2,u=t.height+n*2;i.width=p*d,i.height=u*d;const v=i.getContext("2d");if(v){v.scale(d,d);let f=(t.left-n)*r,w=(t.top-n)*r,x=p*r,S=u*r,T=0,P=0,F=p,H=u;f<0&&(T=Math.abs(f)/r,x+=f,F-=T,f=0),f+x>s.width&&(x=s.width-f,F=x/r),w<0&&(P=Math.abs(w)/r,S+=w,H-=P,w=0),w+S>s.height&&(S=s.height-w,H=S/r),v.fillStyle="#ffffff",v.fillRect(0,0,p,u),x>0&&S>0&&v.drawImage(s,f,w,x,S,T,P,F,H)}a(i.toDataURL("image/png"))},s.onerror=()=>a(""),s.src=e}),Bn=e=>{const t=window.getComputedStyle(e),n={};return["display","position","margin","padding","font-size","color","background-color","width","height","z-index"].forEach(a=>{const s=t.getPropertyValue(a);n[a]=$n(s)}),n},Un=e=>{const n=Object.keys(e).find(s=>s.startsWith("__reactFiber$")||s.startsWith("__reactInternalInstance$"));if(!n)return"";const r=[];let a=e[n];for(;a;){const s=a.type;if(typeof s=="function"){const i=s.displayName||s.name;i&&!i.includes("ViewGate")&&!r.includes(i)&&r.unshift(i)}a=a.return}return r.join(" > ")||"Generic Component"},gt=e=>{if(!e)return!1;const t=window.getComputedStyle(e),n=e.getBoundingClientRect(),r=e.getAttribute("role");if(r&&["listbox","menu","combobox","tooltip","option"].includes(r))return!1;const s=120;return n.width<s&&n.height<s||t.position!=="fixed"&&t.position!=="absolute"?!1:!!(e.closest('[role="dialog"]')||e.closest('[aria-modal="true"]')||e.classList.contains("modal")||e.classList.contains("modal-content"))},yt=e=>{if(!e.isConnected)return!1;const t=window.getComputedStyle(e);if(t.display==="none"||t.visibility==="hidden"||t.opacity==="0"||e.offsetWidth===0||e.offsetHeight===0)return!1;let n=e.parentElement;for(;n;){const a=window.getComputedStyle(n);if(a.display==="none"||a.visibility==="hidden"||a.opacity==="0")return!1;n=n.parentElement}const r=e.getBoundingClientRect();return!(r.width===0||r.height===0||r.top===0&&r.left===0&&r.width>window.innerWidth*.9)},Ge=(e,t=document)=>{const n=t.querySelector(e);if(n)return n;const r=t.querySelectorAll("*");for(const a of Array.from(r)){const s=a.shadowRoot;if(s){const i=Ge(e,s);if(i)return i}}return null},xt=(e,t)=>{let n=document.elementFromPoint(e,t);for(;n&&n.shadowRoot;){const r=n.shadowRoot.elementFromPoint(e,t);if(!r||r===n)break;n=r}return n},Yn=e=>{if(!e.tag)return null;const t=document.getElementsByTagName(e.tag);let n=null,r=0;for(let a=0;a<t.length;a++){const s=t[a];let i=0;s.innerText?.includes(e.text.slice(0,20))&&(i+=4),e.fingerprint?.classHash&&s.className.includes(e.fingerprint.classHash)&&(i+=2),e.fingerprint?.ariaLabel&&s.getAttribute("aria-label")===e.fingerprint.ariaLabel&&(i+=3),e.fingerprint?.role&&s.getAttribute("role")===e.fingerprint.role&&(i+=2),e.parentContext&&(s.parentElement?.innerText||"").includes(e.parentContext.slice(0,30))&&(i+=2),e.fingerprint?.neighborCount===s.parentElement?.children.length&&(i+=1),e.fingerprint?.parentTag===s.parentElement?.tagName.toLowerCase()&&(i+=1),i>r&&i>=5&&(r=i,n=s)}return n},Xn=e=>{let t=Ge(e.selector);if(t)return t;if(e.fallbackSelectors){for(const n of e.fallbackSelectors)if(t=Ge(n),t)return t}return t=Yn(e),t||null},Ae=e=>({tag:e.tagName.toLowerCase(),text:(e.innerText||e.getAttribute("placeholder")||"").slice(0,50).trim(),role:e.getAttribute("role")||void 0,type:e.getAttribute("type")||void 0}),Jn=e=>{const t=e.parentElement;if(!t)return;const n=Array.from(t.children).filter(i=>i!==e).slice(0,5).map(i=>Ae(i)),r=Array.from(t.children),a=r.indexOf(e);let s="middle";return a===0&&(s="start"),a===r.length-1&&(s="end"),{target:{...Ae(e),location:`${s} of ${t.tagName.toLowerCase()}`},parent:Ae(t),siblings:n}},Zn=e=>{let t="unknown:0",n=e;for(;n;){const f=n.getAttribute("data-source-path");if(f){t=f;break}n=n.parentElement}const r=Un(e),a=[],s=[],i=f=>{const w=[];let x=f;for(;x&&x.nodeType===Node.ELEMENT_NODE;){let S=x.nodeName.toLowerCase();s.unshift(S);const T=x.id&&!x.id.startsWith("__")?x.id:null;T&&a.push(`#${T}`);const P=x.getAttribute("data-testid")||x.getAttribute("data-qa");P&&a.push(`[data-testid="${P}"]`);const F=x.getAttribute("aria-label"),H=x.getAttribute("role"),G=x.getAttribute("name");if(P){S=`[${x.hasAttribute("data-testid")?"data-testid":"data-qa"}="${P}"]`,w.unshift(S);break}else if(T){S="#"+T,w.unshift(S);break}else if(F){S=`${x.localName}[aria-label="${F}"]`,w.unshift(S);break}else if(H){S=`${x.localName}[role="${H}"]`,w.unshift(S);break}else if(G){S=`${x.localName}[name="${G}"]`,w.unshift(S);break}else{let L=x,_=1;for(;L.previousElementSibling;)L=L.previousElementSibling,L.nodeName.toLowerCase()===x.nodeName.toLowerCase()&&_++;_>1&&(S+=`:nth-of-type(${_})`)}w.unshift(S),x=x.parentElement}return w.join(" > ")},d=gt(e.closest('[role="dialog"], [aria-modal="true"], .modal, .modal-content')),p=i(e),u={};["placeholder","aria-label","name","type","alt","title","value","role"].forEach(f=>{const w=e.getAttribute(f);w&&(u[f]=w)});const v=`${e.tagName.toLowerCase()}-${(e.innerText||"").slice(0,20).replace(/\s+/g,"_")}-${p.split(" > ").slice(-1)}`;return{tag:e.tagName.toLowerCase(),id:e.id||"",classes:e.className||"",text:(e.innerText||"").slice(0,100).trim(),selector:p,outerHtml:e.outerHTML,parentContext:(e.parentElement?.innerText||"").slice(0,150).trim(),componentPath:r,signature:v,source:t,attributes:u,fallbackSelectors:[...new Set(a)].slice(0,5),domPath:s.slice(-10),viewportSize:{width:window.innerWidth,height:window.innerHeight},uiContext:Jn(e),fingerprint:Wn(e),metadata:{hint:`Edit ${t.split(":")[0]} at line ${t.split(":")[1]||"?"}`,computedStyles:Bn(e),viewportBreakpoint:Dn(),outerHtml:e.outerHTML.slice(0,1500),scrollPosition:{x:window.scrollX,y:window.scrollY},isModal:d}}},wt=()=>{const{addToast:e,language:t,t:n,apiKey:r,baseUrl:a,disableViewGate:s,hasActiveToasts:i}=Ke(),[d,p]=m.useState(!1),[u,v]=m.useState(null),[f,w]=m.useState(null),[x,S]=m.useState(""),[T,P]=m.useState(!1),[F,H]=m.useState(!1),[G,L]=m.useState(!1),[_,Le]=m.useState([]),[W,$]=m.useState(null),[we,vt]=m.useState(!1),[ce,ne]=m.useState(!1),[ve,be]=m.useState({}),[B,re]=m.useState(null),[K,le]=m.useState(!1),[U,Se]=m.useState(()=>{if(typeof window>"u")return{top:24,right:24};const l=localStorage.getItem("vg-exit-pos");return l?JSON.parse(l):{top:24,right:24}}),[c,g]=m.useState(!1),b=m.useRef(null),[E,se]=m.useState(()=>{if(typeof window>"u")return{bottom:30,right:30};const l=localStorage.getItem("vg-bar-pos");return l?JSON.parse(l):{bottom:30,right:30}}),[Y,j]=m.useState(!1),V=m.useRef(null),de=l=>{l.preventDefault(),l.stopPropagation();const h=l.currentTarget.parentElement?.getBoundingClientRect();h&&(g(!0),b.current={x:l.clientX,y:l.clientY,top:U.top,right:U.right,width:h.width,height:h.height})},Me=l=>{l.preventDefault(),l.stopPropagation();const h=l.currentTarget.parentElement?.getBoundingClientRect();h&&(j(!0),V.current={x:l.clientX,y:l.clientY,bottom:E.bottom,right:E.right,width:h.width,height:h.height})};m.useEffect(()=>{if(!c&&!Y)return;const l=y=>{if(c&&b.current){const D=y.clientX-b.current.x,O=y.clientY-b.current.y;let k=b.current.top+O,C=b.current.right-D;const R=10;k=Math.max(R,Math.min(window.innerHeight-b.current.height-R,k)),C=Math.max(R,Math.min(window.innerWidth-b.current.width-R,C)),Se({top:k,right:C})}if(Y&&V.current){const D=y.clientX-V.current.x,O=y.clientY-V.current.y;let k=V.current.bottom-O,C=V.current.right-D;const R=10;k=Math.max(R,Math.min(window.innerHeight-V.current.height-R,k)),C=Math.max(R,Math.min(window.innerWidth-V.current.width-R,C)),se({bottom:k,right:C})}},h=()=>{c&&(g(!1),localStorage.setItem("vg-exit-pos",JSON.stringify(U)),b.current=null),Y&&(j(!1),localStorage.setItem("vg-bar-pos",JSON.stringify(E)),V.current=null)};return window.addEventListener("mousemove",l),window.addEventListener("mouseup",h),()=>{window.removeEventListener("mousemove",l),window.removeEventListener("mouseup",h)}},[c,Y,U,E]);const[bt,Ie]=m.useState(null),[St,Ct]=m.useState(""),[qn,er]=m.useState({}),ae=m.useRef(null),ue=m.useRef(null),pe=m.useCallback(()=>{ue.current||(ue.current=requestAnimationFrame(()=>{const l={},y=Array.from(document.querySelectorAll('[role="dialog"], [aria-modal="true"], .modal, .modal-content')).find(O=>gt(O)&&yt(O)),D=!!y;_.forEach(O=>{if(!O.reference)return;const k=Xn(O.reference),C=!!O.reference.metadata?.isModal;if(k&&yt(k)){let R=!1;if(D?R=y.contains(k):R=!C,!R)return;const z=k.getBoundingClientRect(),X=z.left+z.width/2,me=z.top+z.height/2;if(X>=0&&X<=window.innerWidth&&me>=0&&me<=window.innerHeight){const Z=document.elementFromPoint(X,me);if(Z&&!k.contains(Z)&&!ae.current?.contains(Z))return}l[O._id]={top:z.top+window.scrollY,left:z.left+window.scrollX,width:z.width,isModal:C}}}),er(l),ue.current=null}))},[_]),Q=m.useCallback(async()=>{if(r){ne(!0);try{const l=await fetch(`${a}/api/annotations`,{headers:{"x-api-key":r}});if(l.ok){const h=await l.json();Le(h.data||[])}}catch(l){console.error("Failed to fetch annotations",l)}finally{ne(!1)}}},[r,a]);m.useEffect(()=>{G&&_.length===0&&!ce&&L(!1)},[G,_.length,ce]),m.useEffect(()=>{if(!d&&_.length>0){pe();const l=new MutationObserver(()=>pe()),h=new ResizeObserver(()=>pe()),y=()=>pe();return l.observe(document.documentElement,{childList:!0,subtree:!0,attributes:!0}),h.observe(document.documentElement),window.addEventListener("scroll",y,!0),()=>{l.disconnect(),h.disconnect(),window.removeEventListener("scroll",y,!0),ue.current&&cancelAnimationFrame(ue.current)}}},[d,_.length,pe]),m.useEffect(()=>{Q()},[Q]),m.useEffect(()=>{ae.current=document.getElementById("viewgate-shadow-host")},[]);const ze=m.useCallback(l=>{if(!d||f)return;const h=xt(l.clientX,l.clientY);if(!h||ae.current?.contains(h)||h.closest(".vg-no-capture")){v(null);return}const y=h.getBoundingClientRect();v({tag:h.tagName.toLowerCase(),source:h.getAttribute("data-source-path")||"unknown:0",rect:y,element:h,previewText:(h.innerText||"").slice(0,100)||(h.getAttribute("placeholder")||"").slice(0,100)||h.tagName.toLowerCase(),semanticReference:{...Zn(h),normalizedOffset:{x:(l.clientX-y.left)/y.width,y:(l.clientY-y.top)/y.height}}})},[d,f]),De=m.useCallback(async l=>{if(!d||f)return;const h=xt(l.clientX,l.clientY);if(!(!h||ae.current?.contains(h)||h.closest(".vg-no-capture"))&&u){l.preventDefault(),l.stopPropagation(),H(!0);try{const O=window.scrollX,k=window.scrollY,C=await ft(document.documentElement,{pixelRatio:1.5,cacheBust:!0,width:window.innerWidth,height:window.innerHeight,backgroundColor:"#ffffff",style:{transform:`scale(${1/window.devicePixelRatio}) translate(-${O}px, -${k}px)`,transformOrigin:"top left"},filter:Z=>{const Ce=Z;return!(ae.current?.contains(Ce)||Ce.id==="viewgate-ui")}}),R=u.element.getBoundingClientRect(),z=R.top>=0&&R.left>=0&&R.bottom<=window.innerHeight&&R.right<=window.innerWidth;let X="";if(z&&R.width>0&&R.height>0)X=await ht(C,R,24,1.5);else try{X=await ft(u.element,{pixelRatio:2,cacheBust:!0,backgroundColor:"#ffffff",filter:Z=>{const Ce=Z;return!ae.current?.contains(Ce)}})}catch{X=await ht(C,R,24,1.5)}const me={...u.semanticReference,metadata:{...u.semanticReference.metadata,screenshotUrl:C,elementScreenshot:X}};w({...u,visualPreview:X,semanticReference:me})}catch(y){console.error("Failed to capture preview:",y),w(u)}finally{H(!1),v(null)}}},[d,u,f]);m.useEffect(()=>{const l=h=>{if(h.key==="Escape"){f?w(null):G?L(!1):d&&p(!1);return}const D=(()=>{let C=document.activeElement;for(;C&&C.shadowRoot&&C.shadowRoot.activeElement;)C=C.shadowRoot.activeElement;return C})();if(["input","textarea"].includes((D?.tagName||"").toLowerCase())||D?.isContentEditable)return;const k=h.key.toLowerCase();k==="c"&&!f&&!G&&p(C=>!C),k==="v"&&!f&&(_.length>0||G)&&(L(C=>!C),G||p(!1))};return d&&!f?document.body.classList.add("vg-cursor-pointer"):document.body.classList.remove("vg-cursor-pointer"),window.addEventListener("keydown",l),window.addEventListener("mousemove",ze,!0),window.addEventListener("click",De,!0),()=>{document.body.classList.remove("vg-cursor-pointer"),window.removeEventListener("keydown",l),window.removeEventListener("mousemove",ze,!0),window.removeEventListener("click",De,!0)}},[d,f,G,_,ze,De]);const tr=async()=>{if(!f||!x.trim())return;P(!0);const{semanticReference:l}=f,[h,y]=(l.source||"").split(":"),D=y||"0";try{if(!(await fetch(`${a}/api/annotations`,{method:"POST",headers:{"Content-Type":"application/json","x-api-key":r},body:JSON.stringify({filePath:h,line:parseInt(D),url:window.location.href,message:x,componentName:l.componentPath||f.tag,reference:{...l,viewport:{width:window.innerWidth,height:window.innerHeight},userAgent:navigator.userAgent,timestamp:new Date().toISOString()}})})).ok)throw new Error("Backend failed");e(n.success,"success"),w(null),S(""),p(!1),Q()}catch(O){console.error(O),e(n.error,"error")}finally{P(!1)}};return o.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:987",className:"vg-container",children:o.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:988",className:"vg-no-capture",children:[!i&&o.jsxs("div",{style:{position:"fixed",top:`${U.top}px`,right:`${U.right}px`,zIndex:Ve+10,display:"flex",alignItems:"center",gap:"8px",transition:c?"none":"all 0.3s cubic-bezier(0.4, 0, 0.2, 1)"},children:[o.jsx("div",{onMouseDown:de,style:{width:"20px",height:"32px",borderRadius:"6px",backgroundColor:"rgba(255, 255, 255, 0.85)",backdropFilter:"blur(4px)",display:"flex",alignItems:"center",justifyContent:"center",cursor:"grab",color:"#1e293b",opacity:d?0:1,visibility:d?"hidden":"visible",transition:"all 0.2s",border:"1px solid rgba(0,0,0,0.1)",boxShadow:"0 2px 8px rgba(0,0,0,0.05)"},onMouseEnter:l=>{l.currentTarget.style.backgroundColor="white",l.currentTarget.style.color="#000000"},onMouseLeave:l=>{l.currentTarget.style.backgroundColor="rgba(255, 255, 255, 0.85)",l.currentTarget.style.color="#1e293b"},children:o.jsx(Xe,{"data-source-path":"/src/components/ViewGateOverlay.tsx:1032",size:14})}),o.jsx("button",{onClick:l=>{l.stopPropagation(),$({title:n.exitConfirmTitle||"Close ViewGate?",message:n.exitConfirmMessage||"Are you sure you want to close ViewGate?",type:"danger",onConfirm:()=>s()})},title:"Cerrar ViewGate",style:{width:"40px",height:"40px",borderRadius:"12px",backgroundColor:"rgba(255, 255, 255, 0.9)",backdropFilter:"blur(8px)",display:"flex",alignItems:"center",justifyContent:"center",border:"1px solid rgba(0,0,0,0.05)",boxShadow:"0 4px 12px rgba(0,0,0,0.1)",cursor:"pointer",color:"#64748b",transition:"all 0.3s cubic-bezier(0.4, 0, 0.2, 1)"},onMouseEnter:l=>{l.currentTarget.style.transform="scale(1.1) rotate(90deg)",l.currentTarget.style.color="#ef4444",l.currentTarget.style.backgroundColor="white"},onMouseLeave:l=>{l.currentTarget.style.transform="scale(1) rotate(0deg)",l.currentTarget.style.color="#64748b",l.currentTarget.style.backgroundColor="rgba(255, 255, 255, 0.9)"},children:o.jsx(ke,{"data-source-path":"/src/components/ViewGateOverlay.tsx:1072",size:20,strokeWidth:2.5})})]}),o.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1078",style:{position:"fixed",bottom:`${E.bottom}px`,right:`${E.right}px`,zIndex:Ve,display:"flex",alignItems:"center",gap:"8px",transition:Y?"none":"all 0.4s cubic-bezier(0.4, 0, 0.2, 1)"},id:"viewgate-ui",children:[o.jsx("div",{onMouseDown:Me,style:{width:"24px",height:"40px",borderRadius:"10px",backgroundColor:"rgba(255, 255, 255, 0.85)",backdropFilter:"blur(4px)",display:"flex",alignItems:"center",justifyContent:"center",cursor:"grab",color:"#1e293b",opacity:d?0:1,visibility:d?"hidden":"visible",transition:"all 0.2s",border:"1px solid rgba(0,0,0,0.1)",boxShadow:"0 2px 8px rgba(0,0,0,0.05)"},onMouseEnter:l=>{l.currentTarget.style.backgroundColor="white",l.currentTarget.style.color="#000000"},onMouseLeave:l=>{l.currentTarget.style.backgroundColor="rgba(255, 255, 255, 0.85)",l.currentTarget.style.color="#1e293b"},className:"vg-animate-slide-up",children:o.jsx(Xe,{"data-source-path":"/src/components/ViewGateOverlay.tsx:1121",size:16})}),o.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1124",className:"vg-action-bar vg-animate-slide-up",style:{transition:"all 0.4s cubic-bezier(0.4, 0, 0.2, 1)"},children:[o.jsx("button",{onClick:()=>p(!d),className:"vg-button-primary vg-animate-pop",style:{padding:"12px 24px",background:d?"#ef4444":void 0},children:o.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1133",style:{display:"flex",alignItems:"center",gap:"10px"},children:[d?o.jsx(ke,{"data-source-path":"/src/components/ViewGateOverlay.tsx:1134",size:20,className:"vg-animate-pop"}):o.jsx(Ee,{"data-source-path":"/src/components/ViewGateOverlay.tsx:1134",size:20,className:"vg-animate-pop"}),o.jsx("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1135",children:d?n.exitMode:n.enterMode})]})}),_.length>0&&o.jsxs("button",{onClick:()=>{L(!G),p(!1),w(null)},className:"vg-button-ghost vg-animate-pop",style:{animationDelay:"0.1s"},children:[o.jsx(Nt,{"data-source-path":"/src/components/ViewGateOverlay.tsx:1148",size:20}),o.jsx("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1149",children:n.viewComments})]})]})]}),F&&o.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1157",style:{position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"rgba(255,255,255,0.6)",backdropFilter:"blur(4px)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:Ve+1,cursor:"wait"},children:o.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1163",className:"vg-glassmorphism",style:{padding:"30px 50px",display:"flex",flexDirection:"column",alignItems:"center",gap:"16px"},children:[o.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1164",className:"vg-spinner"}),o.jsx("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1165",style:{fontWeight:600,fontSize:"14px",color:"#000000"},children:"Capturando..."})]})}),d&&!f&&o.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1172",className:"vg-backdrop-blur",style:{opacity:1,clipPath:u?`polygon(
7
+ <%s key={someKey} {...props} />`,R,j,V,j),Ee[j+R]=!0)}if(j=null,b!==void 0&&(n(b),j=""+b),i(y)&&(n(y.key),j=""+y.key),"key"in y){b={};for(var ue in y)ue!=="key"&&(b[ue]=y[ue])}else b=y;return j&&d(b,typeof c=="function"?c.displayName||c.name||"Unknown":c),u(c,j,b,a(),se,X)}function f(c){w(c)?c._store&&(c._store.validated=1):typeof c=="object"&&c!==null&&c.$$typeof===be&&(c._payload.status==="fulfilled"?w(c._payload.value)&&c._payload.value._store&&(c._payload.value._store.validated=1):c._store&&(c._store.validated=1))}function w(c){return typeof c=="object"&&c!==null&&c.$$typeof===S}var x=m,S=Symbol.for("react.transitional.element"),T=Symbol.for("react.portal"),P=Symbol.for("react.fragment"),F=Symbol.for("react.strict_mode"),H=Symbol.for("react.profiler"),A=Symbol.for("react.consumer"),L=Symbol.for("react.context"),O=Symbol.for("react.forward_ref"),Me=Symbol.for("react.suspense"),W=Symbol.for("react.suspense_list"),B=Symbol.for("react.memo"),be=Symbol.for("react.lazy"),bt=Symbol.for("react.activity"),le=Symbol.for("react.client.reference"),ne=x.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Se=Object.prototype.hasOwnProperty,Ce=Array.isArray,U=console.createTask?console.createTask:function(){return null};x={react_stack_bottom_frame:function(c){return c()}};var re,K={},de=x.react_stack_bottom_frame.bind(x,s)(),Y=U(r(s)),Ee={};ie.Fragment=P,ie.jsx=function(c,y,b){var R=1e4>ne.recentlyCreatedOwnerStacks++;return v(c,y,b,!1,R?Error("react-stack-top-frame"):de,R?U(r(c)):Y)},ie.jsxs=function(c,y,b){var R=1e4>ne.recentlyCreatedOwnerStacks++;return v(c,y,b,!0,R?Error("react-stack-top-frame"):de,R?U(r(c)):Y)}})()),ie}var Be;function jt(){return Be||(Be=1,process.env.NODE_ENV==="production"?he.exports=Rt():he.exports=_t()),he.exports}var o=jt();const Ot=({children:e})=>{const t=m.useRef(null),[n,r]=m.useState(null);return m.useEffect(()=>{if(t.current&&!t.current.shadowRoot){const a=t.current.attachShadow({mode:"open"});document.querySelectorAll("style[data-vite-dev-id], style:not([data-vite-dev-id])").forEach(d=>{(d.textContent?.includes(".vg-")||d.textContent?.includes("--vg-"))&&a.appendChild(d.cloneNode(!0))});const i=document.createElement("link");i.rel="stylesheet",i.href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800;900&display=swap",a.appendChild(i),r(a)}},[]),o.jsx("div",{"data-source-path":"/src/components/ShadowRootWrapper.tsx:38",ref:t,id:"viewgate-shadow-host",children:n&&kt.createPortal(e,n)})};const Ue=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();const Tt=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const Vt=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase());const Ye=e=>{const t=Vt(e);return t.charAt(0).toUpperCase()+t.slice(1)};var Pt={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const At=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};const Gt=m.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:a="",children:s,iconNode:i,...d},p)=>m.createElement("svg",{ref:p,...Pt,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Ue("lucide",a),...!s&&!At(d)&&{"aria-hidden":"true"},...d},[...i.map(([u,v])=>m.createElement(u,v)),...Array.isArray(s)?s:[s]]));const G=(e,t)=>{const n=m.forwardRef(({className:r,...a},s)=>m.createElement(Gt,{ref:s,iconNode:t,className:Ue(`lucide-${Tt(Ye(e))}`,`lucide-${e}`,r),...a}));return n.displayName=Ye(e),n};const Nt=G("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);const q=G("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);const Xe=G("clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]]);const Je=G("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);const Lt=G("eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);const Ze=G("grip-vertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]);const It=G("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);const Re=G("message-square",[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]]);const Mt=G("mouse-pointer-2",[["path",{d:"M4.037 4.688a.495.495 0 0 1 .651-.651l16 6.5a.5.5 0 0 1-.063.947l-6.124 1.58a2 2 0 0 0-1.438 1.435l-1.579 6.126a.5.5 0 0 1-.947.063z",key:"edeuup"}]]);const zt=G("pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);const Dt=G("rotate-ccw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);const Ft=G("send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);const Ke=G("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]);const _e=G("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Ht={en:{enterMode:"Enter Feedback Mode",exitMode:"Exit Mode",feedbackHeader:"Feedback",selectedElement:"Selected element:",line:"Line",placeholder:"Tell us what you'd like to change...",cancel:"Cancel",send:"Send Feedback",submitting:"Submitting...",success:"Your feedback has been submitted successfully!",error:"Failed to submit feedback. Check backend connection.",successHeader:"Success",errorHeader:"Error",preview:"Preview",viewComments:"View Comments",close:"Close",observe:"Observe",pending:"Pending",readyForReview:"Ready for Review",noComments:"No comments found.",deleteConfirm:"Delete comment",markReady:"Mark as Ready",reopen:"Reopen",review:"Review",confirmDelete:"Are you sure you want to permanently delete this comment? This action cannot be undone.",markReadyConfirm:"Complete review",confirmMarkReady:"Do you want to mark this comment as ready? it will be moved to the completed state.",reopenConfirm:"Reopen comment",confirmReopen:"Do you want to set this comment back to pending status?",yes:"Yes, confirm",no:"No, cancel",deleteSuccess:"Comment deleted successfully.",updateSuccess:"Updated successfully.",navigating:"Redirecting to review...",selectToComment:"Click to comment",feedbackSubheader:"What would you like to improve here?",sendFeedback:"Send Comment",edit:"Edit",save:"Save",commentDetails:"Comment Details",annotations:"Comments",viewAll:"View All",exitConfirmTitle:"Close ViewGate?",exitConfirmMessage:"Are you sure you want to close ViewGate? You can reopen it at any time by adding ?viewgate=true to your URL."},es:{enterMode:"Activar Modo Comentarios",exitMode:"Salir del Modo",feedbackHeader:"Comentarios",selectedElement:"Elemento seleccionado:",line:"Línea",placeholder:"Cuéntanos qué te gustaría cambiar...",cancel:"Cancelar",send:"Enviar Comentarios",submitting:"Enviando...",success:"¡Tus comentarios se han enviado con éxito!",error:"Error al enviar comentarios. Revisa la conexión con el servidor.",successHeader:"Éxito",errorHeader:"Error",preview:"Vista previa",viewComments:"Ver Comentarios",close:"Cerrar",observe:"Observar",pending:"Pendiente",readyForReview:"Lista para revisión",noComments:"No hay comentarios.",deleteConfirm:"Eliminar comentario",markReady:"Marcar como Listo",reopen:"Reabrir",review:"Revisar",confirmDelete:"¿Estás seguro de que deseas eliminar permanentemente este comentario? Esta acción no se puede deshacer.",markReadyConfirm:"Finalizar revisión",confirmMarkReady:"¿Deseas marcar este comentario como listo? Pasará al estado completado.",reopenConfirm:"Reabrir comentario",confirmReopen:"¿Deseas volver a poner este comentario en estado pendiente?",yes:"Sí, confirmar",no:"No, cancelar",deleteSuccess:"El comentario ha sido eliminado.",updateSuccess:"Actualizado correctamente.",navigating:"Redirigiendo a revisión...",selectToComment:"Haz clic para comentar",feedbackSubheader:"¿Qué te gustaría mejorar aquí?",sendFeedback:"Enviar Comentario",edit:"Editar",save:"Guardar",commentDetails:"Detalles del Comentario",annotations:"Comentarios",viewAll:"Ver Todos",exitConfirmTitle:"¿Cerrar ViewGate?",exitConfirmMessage:"¿Estás seguro de que deseas cerrar ViewGate? Puedes volver a activarlo en cualquier momento agregando ?viewgate=true a la URL."}},Qe=m.createContext(void 0),qe=()=>{const e=m.useContext(Qe);if(!e)throw new Error("useViewGate must be used within a ViewGateProvider");return e},je="viewgate_enabled",Wt=()=>typeof window>"u"?!1:new URLSearchParams(window.location.search).has("viewgate")?(sessionStorage.setItem(je,"true"),!0):sessionStorage.getItem(je)==="true",$t=({children:e,language:t="es",apiKey:n,baseUrl:r="https://view-gate.vercel.app"})=>{const[a,s]=m.useState(!1),[i,d]=m.useState([]);m.useEffect(()=>{s(Wt())},[]);const p=()=>{if(sessionStorage.removeItem(je),s(!1),typeof window<"u"){const f=new URL(window.location.href);f.searchParams.delete("viewgate"),window.history.replaceState({},"",f.toString())}},u=(f,w)=>{const x=Date.now();d(S=>[...S,{id:x,message:f,type:w}]),setTimeout(()=>{d(S=>S.filter(T=>T.id!==x))},4e3)},v=Ht[t];return o.jsxs(Qe.Provider,{"data-source-path":"/src/components/ViewGateProvider.tsx:248",value:{addToast:u,language:t,t:v,apiKey:n,baseUrl:r,disableViewGate:p,hasActiveToasts:i.length>0},children:[e,a&&o.jsx(Ot,{"data-source-path":"/src/components/ViewGateProvider.tsx:259",children:o.jsxs("div",{"data-source-path":"/src/components/ViewGateProvider.tsx:260",className:"vg-container",children:[o.jsx(vt,{"data-source-path":"/src/components/ViewGateProvider.tsx:261"}),o.jsx("div",{"data-source-path":"/src/components/ViewGateProvider.tsx:262",className:"vg-toasts",style:{zIndex:2147483646},children:i.map(f=>o.jsxs("div",{"data-source-path":"/src/components/ViewGateProvider.tsx:264",className:`vg-toast vg-animate-slide ${f.type}`,children:[f.type==="success"?o.jsx(q,{"data-source-path":"/src/components/ViewGateProvider.tsx:266",size:24,color:"#22c55e"}):o.jsx(Nt,{"data-source-path":"/src/components/ViewGateProvider.tsx:268",size:24,color:"#ef4444"}),o.jsxs("div",{"data-source-path":"/src/components/ViewGateProvider.tsx:270",children:[o.jsx("strong",{"data-source-path":"/src/components/ViewGateProvider.tsx:271",style:{display:"block",fontSize:"13px",color:"#0f172a",textTransform:"uppercase",marginBottom:"2px"},children:f.type==="success"?v.successHeader:v.errorHeader}),o.jsx("span",{"data-source-path":"/src/components/ViewGateProvider.tsx:274",style:{fontSize:"14px",color:"#000000"},children:f.message})]})]},f.id))})]})})]})};function Bt(e,t){if(e.match(/^[a-z]+:\/\//i))return e;if(e.match(/^\/\//))return window.location.protocol+e;if(e.match(/^[a-z]+:/i))return e;const n=document.implementation.createHTMLDocument(),r=n.createElement("base"),a=n.createElement("a");return n.head.appendChild(r),n.body.appendChild(a),t&&(r.href=t),a.href=e,a.href}const Ut=(()=>{let e=0;const t=()=>`0000${(Math.random()*36**4<<0).toString(36)}`.slice(-4);return()=>(e+=1,`u${t()}${e}`)})();function Z(e){const t=[];for(let n=0,r=e.length;n<r;n++)t.push(e[n]);return t}let ee=null;function et(e={}){return ee||(e.includeStyleProperties?(ee=e.includeStyleProperties,ee):(ee=Z(window.getComputedStyle(document.documentElement)),ee))}function ge(e,t){const r=(e.ownerDocument.defaultView||window).getComputedStyle(e).getPropertyValue(t);return r?parseFloat(r.replace("px","")):0}function Yt(e){const t=ge(e,"border-left-width"),n=ge(e,"border-right-width");return e.clientWidth+t+n}function Xt(e){const t=ge(e,"border-top-width"),n=ge(e,"border-bottom-width");return e.clientHeight+t+n}function tt(e,t={}){const n=t.width||Yt(e),r=t.height||Xt(e);return{width:n,height:r}}function Jt(){let e,t;try{t=process}catch{}const n=t&&t.env?t.env.devicePixelRatio:null;return n&&(e=parseInt(n,10),Number.isNaN(e)&&(e=1)),e||window.devicePixelRatio||1}const z=16384;function Zt(e){(e.width>z||e.height>z)&&(e.width>z&&e.height>z?e.width>e.height?(e.height*=z/e.width,e.width=z):(e.width*=z/e.height,e.height=z):e.width>z?(e.height*=z/e.width,e.width=z):(e.width*=z/e.height,e.height=z))}function ye(e){return new Promise((t,n)=>{const r=new Image;r.onload=()=>{r.decode().then(()=>{requestAnimationFrame(()=>t(r))})},r.onerror=n,r.crossOrigin="anonymous",r.decoding="async",r.src=e})}async function Kt(e){return Promise.resolve().then(()=>new XMLSerializer().serializeToString(e)).then(encodeURIComponent).then(t=>`data:image/svg+xml;charset=utf-8,${t}`)}async function Qt(e,t,n){const r="http://www.w3.org/2000/svg",a=document.createElementNS(r,"svg"),s=document.createElementNS(r,"foreignObject");return a.setAttribute("width",`${t}`),a.setAttribute("height",`${n}`),a.setAttribute("viewBox",`0 0 ${t} ${n}`),s.setAttribute("width","100%"),s.setAttribute("height","100%"),s.setAttribute("x","0"),s.setAttribute("y","0"),s.setAttribute("externalResourcesRequired","true"),a.appendChild(s),s.appendChild(e),Kt(a)}const N=(e,t)=>{if(e instanceof t)return!0;const n=Object.getPrototypeOf(e);return n===null?!1:n.constructor.name===t.name||N(n,t)};function qt(e){const t=e.getPropertyValue("content");return`${e.cssText} content: '${t.replace(/'|"/g,"")}';`}function en(e,t){return et(t).map(n=>{const r=e.getPropertyValue(n),a=e.getPropertyPriority(n);return`${n}: ${r}${a?" !important":""};`}).join(" ")}function tn(e,t,n,r){const a=`.${e}:${t}`,s=n.cssText?qt(n):en(n,r);return document.createTextNode(`${a}{${s}}`)}function nt(e,t,n,r){const a=window.getComputedStyle(e,n),s=a.getPropertyValue("content");if(s===""||s==="none")return;const i=Ut();try{t.className=`${t.className} ${i}`}catch{return}const d=document.createElement("style");d.appendChild(tn(i,n,a,r)),t.appendChild(d)}function nn(e,t,n){nt(e,t,":before",n),nt(e,t,":after",n)}const rt="application/font-woff",st="image/jpeg",rn={woff:rt,woff2:rt,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:st,jpeg:st,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};function sn(e){const t=/\.([^./]*?)$/g.exec(e);return t?t[1]:""}function Oe(e){const t=sn(e).toLowerCase();return rn[t]||""}function an(e){return e.split(/,/)[1]}function Te(e){return e.search(/^(data:)/)!==-1}function on(e,t){return`data:${t};base64,${e}`}async function at(e,t,n){const r=await fetch(e,t);if(r.status===404)throw new Error(`Resource "${r.url}" not found`);const a=await r.blob();return new Promise((s,i)=>{const d=new FileReader;d.onerror=i,d.onloadend=()=>{try{s(n({res:r,result:d.result}))}catch(p){i(p)}},d.readAsDataURL(a)})}const Ve={};function cn(e,t,n){let r=e.replace(/\?.*/,"");return n&&(r=e),/ttf|otf|eot|woff2?/i.test(r)&&(r=r.replace(/.*\//,"")),t?`[${t}]${r}`:r}async function Pe(e,t,n){const r=cn(e,t,n.includeQueryParams);if(Ve[r]!=null)return Ve[r];n.cacheBust&&(e+=(/\?/.test(e)?"&":"?")+new Date().getTime());let a;try{const s=await at(e,n.fetchRequestInit,({res:i,result:d})=>(t||(t=i.headers.get("Content-Type")||""),an(d)));a=on(s,t)}catch(s){a=n.imagePlaceholder||"";let i=`Failed to fetch resource: ${e}`;s&&(i=typeof s=="string"?s:s.message),i&&console.warn(i)}return Ve[r]=a,a}async function ln(e){const t=e.toDataURL();return t==="data:,"?e.cloneNode(!1):ye(t)}async function dn(e,t){if(e.currentSrc){const s=document.createElement("canvas"),i=s.getContext("2d");s.width=e.clientWidth,s.height=e.clientHeight,i?.drawImage(e,0,0,s.width,s.height);const d=s.toDataURL();return ye(d)}const n=e.poster,r=Oe(n),a=await Pe(n,r,t);return ye(a)}async function un(e,t){var n;try{if(!((n=e?.contentDocument)===null||n===void 0)&&n.body)return await xe(e.contentDocument.body,t,!0)}catch{}return e.cloneNode(!1)}async function pn(e,t){return N(e,HTMLCanvasElement)?ln(e):N(e,HTMLVideoElement)?dn(e,t):N(e,HTMLIFrameElement)?un(e,t):e.cloneNode(ot(e))}const mn=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SLOT",ot=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SVG";async function fn(e,t,n){var r,a;if(ot(t))return t;let s=[];return mn(e)&&e.assignedNodes?s=Z(e.assignedNodes()):N(e,HTMLIFrameElement)&&(!((r=e.contentDocument)===null||r===void 0)&&r.body)?s=Z(e.contentDocument.body.childNodes):s=Z(((a=e.shadowRoot)!==null&&a!==void 0?a:e).childNodes),s.length===0||N(e,HTMLVideoElement)||await s.reduce((i,d)=>i.then(()=>xe(d,n)).then(p=>{p&&t.appendChild(p)}),Promise.resolve()),t}function hn(e,t,n){const r=t.style;if(!r)return;const a=window.getComputedStyle(e);a.cssText?(r.cssText=a.cssText,r.transformOrigin=a.transformOrigin):et(n).forEach(s=>{let i=a.getPropertyValue(s);s==="font-size"&&i.endsWith("px")&&(i=`${Math.floor(parseFloat(i.substring(0,i.length-2)))-.1}px`),N(e,HTMLIFrameElement)&&s==="display"&&i==="inline"&&(i="block"),s==="d"&&t.getAttribute("d")&&(i=`path(${t.getAttribute("d")})`),r.setProperty(s,i,a.getPropertyPriority(s))})}function gn(e,t){N(e,HTMLTextAreaElement)&&(t.innerHTML=e.value),N(e,HTMLInputElement)&&t.setAttribute("value",e.value)}function yn(e,t){if(N(e,HTMLSelectElement)){const r=Array.from(t.children).find(a=>e.value===a.getAttribute("value"));r&&r.setAttribute("selected","")}}function xn(e,t,n){return N(t,Element)&&(hn(e,t,n),nn(e,t,n),gn(e,t),yn(e,t)),t}async function wn(e,t){const n=e.querySelectorAll?e.querySelectorAll("use"):[];if(n.length===0)return e;const r={};for(let s=0;s<n.length;s++){const d=n[s].getAttribute("xlink:href");if(d){const p=e.querySelector(d),u=document.querySelector(d);!p&&u&&!r[d]&&(r[d]=await xe(u,t,!0))}}const a=Object.values(r);if(a.length){const s="http://www.w3.org/1999/xhtml",i=document.createElementNS(s,"svg");i.setAttribute("xmlns",s),i.style.position="absolute",i.style.width="0",i.style.height="0",i.style.overflow="hidden",i.style.display="none";const d=document.createElementNS(s,"defs");i.appendChild(d);for(let p=0;p<a.length;p++)d.appendChild(a[p]);e.appendChild(i)}return e}async function xe(e,t,n){return!n&&t.filter&&!t.filter(e)?null:Promise.resolve(e).then(r=>pn(r,t)).then(r=>fn(e,r,t)).then(r=>xn(e,r,t)).then(r=>wn(r,t))}const it=/url\((['"]?)([^'"]+?)\1\)/g,vn=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,bn=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function Sn(e){const t=e.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${t})(['"]?\\))`,"g")}function Cn(e){const t=[];return e.replace(it,(n,r,a)=>(t.push(a),n)),t.filter(n=>!Te(n))}async function En(e,t,n,r,a){try{const s=n?Bt(t,n):t,i=Oe(t);let d;return a||(d=await Pe(s,i,r)),e.replace(Sn(t),`$1${d}$3`)}catch{}return e}function kn(e,{preferredFontFormat:t}){return t?e.replace(bn,n=>{for(;;){const[r,,a]=vn.exec(n)||[];if(!a)return"";if(a===t)return`src: ${r};`}}):e}function ct(e){return e.search(it)!==-1}async function lt(e,t,n){if(!ct(e))return e;const r=kn(e,n);return Cn(r).reduce((s,i)=>s.then(d=>En(d,i,t,n)),Promise.resolve(r))}async function te(e,t,n){var r;const a=(r=t.style)===null||r===void 0?void 0:r.getPropertyValue(e);if(a){const s=await lt(a,null,n);return t.style.setProperty(e,s,t.style.getPropertyPriority(e)),!0}return!1}async function Rn(e,t){await te("background",e,t)||await te("background-image",e,t),await te("mask",e,t)||await te("-webkit-mask",e,t)||await te("mask-image",e,t)||await te("-webkit-mask-image",e,t)}async function _n(e,t){const n=N(e,HTMLImageElement);if(!(n&&!Te(e.src))&&!(N(e,SVGImageElement)&&!Te(e.href.baseVal)))return;const r=n?e.src:e.href.baseVal,a=await Pe(r,Oe(r),t);await new Promise((s,i)=>{e.onload=s,e.onerror=t.onImageErrorHandler?(...p)=>{try{s(t.onImageErrorHandler(...p))}catch(u){i(u)}}:i;const d=e;d.decode&&(d.decode=s),d.loading==="lazy"&&(d.loading="eager"),n?(e.srcset="",e.src=a):e.href.baseVal=a})}async function jn(e,t){const r=Z(e.childNodes).map(a=>dt(a,t));await Promise.all(r).then(()=>e)}async function dt(e,t){N(e,Element)&&(await Rn(e,t),await _n(e,t),await jn(e,t))}function On(e,t){const{style:n}=e;t.backgroundColor&&(n.backgroundColor=t.backgroundColor),t.width&&(n.width=`${t.width}px`),t.height&&(n.height=`${t.height}px`);const r=t.style;return r!=null&&Object.keys(r).forEach(a=>{n[a]=r[a]}),e}const ut={};async function pt(e){let t=ut[e];if(t!=null)return t;const r=await(await fetch(e)).text();return t={url:e,cssText:r},ut[e]=t,t}async function mt(e,t){let n=e.cssText;const r=/url\(["']?([^"')]+)["']?\)/g,s=(n.match(/url\([^)]+\)/g)||[]).map(async i=>{let d=i.replace(r,"$1");return d.startsWith("https://")||(d=new URL(d,e.url).href),at(d,t.fetchRequestInit,({result:p})=>(n=n.replace(i,`url(${p})`),[i,p]))});return Promise.all(s).then(()=>n)}function ft(e){if(e==null)return[];const t=[],n=/(\/\*[\s\S]*?\*\/)/gi;let r=e.replace(n,"");const a=new RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})","gi");for(;;){const p=a.exec(r);if(p===null)break;t.push(p[0])}r=r.replace(a,"");const s=/@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi,i="((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})",d=new RegExp(i,"gi");for(;;){let p=s.exec(r);if(p===null){if(p=d.exec(r),p===null)break;s.lastIndex=d.lastIndex}else d.lastIndex=s.lastIndex;t.push(p[0])}return t}async function Tn(e,t){const n=[],r=[];return e.forEach(a=>{if("cssRules"in a)try{Z(a.cssRules||[]).forEach((s,i)=>{if(s.type===CSSRule.IMPORT_RULE){let d=i+1;const p=s.href,u=pt(p).then(v=>mt(v,t)).then(v=>ft(v).forEach(f=>{try{a.insertRule(f,f.startsWith("@import")?d+=1:a.cssRules.length)}catch(w){console.error("Error inserting rule from remote css",{rule:f,error:w})}})).catch(v=>{console.error("Error loading remote css",v.toString())});r.push(u)}})}catch(s){const i=e.find(d=>d.href==null)||document.styleSheets[0];a.href!=null&&r.push(pt(a.href).then(d=>mt(d,t)).then(d=>ft(d).forEach(p=>{i.insertRule(p,i.cssRules.length)})).catch(d=>{console.error("Error loading remote stylesheet",d)})),console.error("Error inlining remote css file",s)}}),Promise.all(r).then(()=>(e.forEach(a=>{if("cssRules"in a)try{Z(a.cssRules||[]).forEach(s=>{n.push(s)})}catch(s){console.error(`Error while reading CSS rules from ${a.href}`,s)}}),n))}function Vn(e){return e.filter(t=>t.type===CSSRule.FONT_FACE_RULE).filter(t=>ct(t.style.getPropertyValue("src")))}async function Pn(e,t){if(e.ownerDocument==null)throw new Error("Provided element is not within a Document");const n=Z(e.ownerDocument.styleSheets),r=await Tn(n,t);return Vn(r)}function ht(e){return e.trim().replace(/["']/g,"")}function An(e){const t=new Set;function n(r){(r.style.fontFamily||getComputedStyle(r).fontFamily).split(",").forEach(s=>{t.add(ht(s))}),Array.from(r.children).forEach(s=>{s instanceof HTMLElement&&n(s)})}return n(e),t}async function Gn(e,t){const n=await Pn(e,t),r=An(e);return(await Promise.all(n.filter(s=>r.has(ht(s.style.fontFamily))).map(s=>{const i=s.parentStyleSheet?s.parentStyleSheet.href:null;return lt(s.cssText,i,t)}))).join(`
8
+ `)}async function Nn(e,t){const n=t.fontEmbedCSS!=null?t.fontEmbedCSS:t.skipFonts?null:await Gn(e,t);if(n){const r=document.createElement("style"),a=document.createTextNode(n);r.appendChild(a),e.firstChild?e.insertBefore(r,e.firstChild):e.appendChild(r)}}async function Ln(e,t={}){const{width:n,height:r}=tt(e,t),a=await xe(e,t,!0);return await Nn(a,t),await dt(a,t),On(a,t),await Qt(a,n,r)}async function In(e,t={}){const{width:n,height:r}=tt(e,t),a=await Ln(e,t),s=await ye(a),i=document.createElement("canvas"),d=i.getContext("2d"),p=t.pixelRatio||Jt(),u=t.canvasWidth||n,v=t.canvasHeight||r;return i.width=u*p,i.height=v*p,t.skipAutoScale||Zt(i),i.style.width=`${u}`,i.style.height=`${v}`,t.backgroundColor&&(d.fillStyle=t.backgroundColor,d.fillRect(0,0,i.width,i.height)),d.drawImage(s,0,0,i.width,i.height),i}async function gt(e,t={}){return(await In(e,t)).toDataURL()}const we=2147483647,Ae=we,Ge=2e6,Mn=we-10,zn=we-5,Dn=we-15,ce="data-vg-pin-id",Fn=()=>{const e=window.innerWidth;return e<768?"mobile":e<1024?"tablet":"desktop"},Hn=e=>{let t=0;for(let n=0;n<e.length;n++){const r=e.charCodeAt(n);t=(t<<5)-t+r,t=t&t}return Math.abs(t).toString(16)},Wn=(e,t)=>{if(!e)return"";try{const n=new Date(e);return isNaN(n.getTime())?"":new Intl.DateTimeFormat(t==="es"?"es-ES":"en-US",{day:"2-digit",month:"2-digit",year:"numeric",hour:"2-digit",minute:"2-digit",hour12:!1}).format(n)}catch{return""}},$n=e=>{const t=(e.innerText||"").slice(0,30).trim(),n={tag:e.tagName.toLowerCase(),classHash:Hn(e.className),textSnippet:t,parentTag:e.parentElement?.tagName.toLowerCase(),neighborCount:e.parentElement?.children.length||0},r=e.getAttribute("aria-label");r&&(n.ariaLabel=r);const a=e.getAttribute("role");a&&(n.role=a);const s=e.getAttribute("name");return s&&(n.name=s),n},Bn=(()=>{let e=null,t=null;return n=>{if(!n||typeof window>"u"||typeof document>"u")return n;if(n.includes("oklch")||n.includes("oklab")||n.includes("lab(")||n.includes("lch(")||n.includes("color("))try{if(e||(e=document.createElement("canvas"),e.width=1,e.height=1),t||(t=e.getContext("2d",{willReadFrequently:!0})),t){t.fillStyle="#000000",t.fillStyle=n;const s=t.fillStyle;if(s&&!s.includes("oklch")&&!s.includes("oklab"))return s}const r=document.createElement("div");r.style.color=n,document.body.appendChild(r);const a=getComputedStyle(r).color;return document.body.removeChild(r),a&&!a.includes("oklch")?a:"rgb(0,0,0)"}catch{return"rgb(0,0,0)"}return n}})(),yt=(e,t,n,r)=>new Promise(a=>{const s=new Image;s.onload=()=>{const i=document.createElement("canvas"),d=window.devicePixelRatio||1,p=t.width+n*2,u=t.height+n*2;i.width=p*d,i.height=u*d;const v=i.getContext("2d");if(v){v.scale(d,d);let f=(t.left-n)*r,w=(t.top-n)*r,x=p*r,S=u*r,T=0,P=0,F=p,H=u;f<0&&(T=Math.abs(f)/r,x+=f,F-=T,f=0),f+x>s.width&&(x=s.width-f,F=x/r),w<0&&(P=Math.abs(w)/r,S+=w,H-=P,w=0),w+S>s.height&&(S=s.height-w,H=S/r),v.fillStyle="#ffffff",v.fillRect(0,0,p,u),x>0&&S>0&&v.drawImage(s,f,w,x,S,T,P,F,H)}a(i.toDataURL("image/png"))},s.onerror=()=>a(""),s.src=e}),Un=e=>{const t=window.getComputedStyle(e),n={};return["display","position","margin","padding","font-size","color","background-color","width","height","z-index"].forEach(a=>{const s=t.getPropertyValue(a);n[a]=Bn(s)}),n},Yn=e=>{const n=Object.keys(e).find(s=>s.startsWith("__reactFiber$")||s.startsWith("__reactInternalInstance$"));if(!n)return"";const r=[];let a=e[n];for(;a;){const s=a.type;if(typeof s=="function"){const i=s.displayName||s.name;i&&!i.includes("ViewGate")&&!r.includes(i)&&r.unshift(i)}a=a.return}return r.join(" > ")||"Generic Component"},xt=e=>{if(!e)return!1;const t=window.getComputedStyle(e),n=e.getBoundingClientRect(),r=e.getAttribute("role");if(r&&["listbox","menu","combobox","tooltip","option"].includes(r))return!1;const s=120;return n.width<s&&n.height<s||t.position!=="fixed"&&t.position!=="absolute"?!1:!!(e.closest('[role="dialog"]')||e.closest('[aria-modal="true"]')||e.classList.contains("modal")||e.classList.contains("modal-content"))},Ne=e=>{if(!e.isConnected)return!1;const t=window.getComputedStyle(e);if(t.display==="none"||t.visibility==="hidden"||t.opacity==="0"||e.offsetWidth===0||e.offsetHeight===0)return!1;let n=e.parentElement;for(;n;){const a=window.getComputedStyle(n);if(a.display==="none"||a.visibility==="hidden"||a.opacity==="0")return!1;n=n.parentElement}const r=e.getBoundingClientRect();return!(r.width===0||r.height===0||r.top===0&&r.left===0&&r.width>window.innerWidth*.9)},ve=(e,t=document)=>{const n=t.querySelector(e);if(n)return n;const r=t.querySelectorAll("*");for(const a of Array.from(r)){const s=a.shadowRoot;if(s){const i=ve(e,s);if(i)return i}}return null},wt=(e,t)=>{let n=document.elementFromPoint(e,t);for(;n&&n.shadowRoot;){const r=n.shadowRoot.elementFromPoint(e,t);if(!r||r===n)break;n=r}return n},Xn=e=>{if(!e.tag)return null;const t=document.getElementsByTagName(e.tag);let n=null,r=0;for(let a=0;a<t.length;a++){const s=t[a];let i=0;s.innerText?.includes(e.text.slice(0,20))&&(i+=4),e.fingerprint?.classHash&&s.className.includes(e.fingerprint.classHash)&&(i+=2),e.fingerprint?.ariaLabel&&s.getAttribute("aria-label")===e.fingerprint.ariaLabel&&(i+=3),e.fingerprint?.role&&s.getAttribute("role")===e.fingerprint.role&&(i+=2),e.parentContext&&(s.parentElement?.innerText||"").includes(e.parentContext.slice(0,30))&&(i+=2),e.fingerprint?.neighborCount===s.parentElement?.children.length&&(i+=1),e.fingerprint?.parentTag===s.parentElement?.tagName.toLowerCase()&&(i+=1),i>r&&i>=5&&(r=i,n=s)}return n},Jn=(e,t)=>{if(t){const r=ve(`[${ce}="${t}"]`);if(r&&Ne(r))return r}let n=ve(e.selector);if(n)return n;if(e.fallbackSelectors){for(const r of e.fallbackSelectors)if(n=ve(r),n)return n}return n=Xn(e),n||null},Le=e=>({tag:e.tagName.toLowerCase(),text:(e.innerText||e.getAttribute("placeholder")||"").slice(0,50).trim(),role:e.getAttribute("role")||void 0,type:e.getAttribute("type")||void 0}),Zn=e=>{const t=e.parentElement;if(!t)return;const n=Array.from(t.children).filter(i=>i!==e).slice(0,5).map(i=>Le(i)),r=Array.from(t.children),a=r.indexOf(e);let s="middle";return a===0&&(s="start"),a===r.length-1&&(s="end"),{target:{...Le(e),location:`${s} of ${t.tagName.toLowerCase()}`},parent:Le(t),siblings:n}},Kn=e=>{let t="unknown:0",n=e;for(;n;){const f=n.getAttribute("data-source-path");if(f){t=f;break}n=n.parentElement}const r=Yn(e),a=[],s=[],i=f=>{const w=[];let x=f;for(;x&&x.nodeType===Node.ELEMENT_NODE;){let S=x.nodeName.toLowerCase();s.unshift(S);const T=x.id&&!x.id.startsWith("__")?x.id:null;T&&a.push(`#${T}`);const P=x.getAttribute("data-testid")||x.getAttribute("data-qa");P&&a.push(`[data-testid="${P}"]`);const F=x.getAttribute("aria-label"),H=x.getAttribute("role"),A=x.getAttribute("name");if(P){S=`[${x.hasAttribute("data-testid")?"data-testid":"data-qa"}="${P}"]`,w.unshift(S);break}else if(T){S="#"+T,w.unshift(S);break}else if(F){S=`${x.localName}[aria-label="${F}"]`,w.unshift(S);break}else if(H){S=`${x.localName}[role="${H}"]`,w.unshift(S);break}else if(A){S=`${x.localName}[name="${A}"]`,w.unshift(S);break}else{let L=x,O=1;for(;L.previousElementSibling;)L=L.previousElementSibling,L.nodeName.toLowerCase()===x.nodeName.toLowerCase()&&O++;O>1&&(S+=`:nth-of-type(${O})`)}w.unshift(S),x=x.parentElement}return w.join(" > ")},d=xt(e.closest('[role="dialog"], [aria-modal="true"], .modal, .modal-content')),p=i(e),u={};["placeholder","aria-label","name","type","alt","title","value","role"].forEach(f=>{const w=e.getAttribute(f);w&&(u[f]=w)});const v=`${e.tagName.toLowerCase()}-${(e.innerText||"").slice(0,20).replace(/\s+/g,"_")}-${p.split(" > ").slice(-1)}`;return{tag:e.tagName.toLowerCase(),id:e.id||"",classes:e.className||"",text:(e.innerText||"").slice(0,100).trim(),selector:p,outerHtml:e.outerHTML,parentContext:(e.parentElement?.innerText||"").slice(0,150).trim(),componentPath:r,signature:v,source:t,attributes:u,fallbackSelectors:[...new Set(a)].slice(0,5),domPath:s.slice(-10),viewportSize:{width:window.innerWidth,height:window.innerHeight},uiContext:Zn(e),fingerprint:$n(e),metadata:{hint:`Edit ${t.split(":")[0]} at line ${t.split(":")[1]||"?"}`,computedStyles:Un(e),viewportBreakpoint:Fn(),outerHtml:e.outerHTML.slice(0,1500),scrollPosition:{x:window.scrollX,y:window.scrollY},isModal:d}}},vt=()=>{const{addToast:e,language:t,t:n,apiKey:r,baseUrl:a,disableViewGate:s,hasActiveToasts:i}=qe(),[d,p]=m.useState(!1),[u,v]=m.useState(null),[f,w]=m.useState(null),[x,S]=m.useState(""),[T,P]=m.useState(!1),[F,H]=m.useState(!1),[A,L]=m.useState(!1),[O,Me]=m.useState([]),[W,B]=m.useState(null),[be,bt]=m.useState(!1),[le,ne]=m.useState(!1),[Se,Ce]=m.useState({}),[U,re]=m.useState(null),[K,de]=m.useState(!1),[Y,Ee]=m.useState(()=>{if(typeof window>"u")return{top:24,right:24};const l=localStorage.getItem("vg-exit-pos");return l?JSON.parse(l):{top:24,right:24}}),[c,y]=m.useState(!1),b=m.useRef(null),[R,se]=m.useState(()=>{if(typeof window>"u")return{bottom:30,right:30};const l=localStorage.getItem("vg-bar-pos");return l?JSON.parse(l):{bottom:30,right:30}}),[X,j]=m.useState(!1),V=m.useRef(null),ue=l=>{l.preventDefault(),l.stopPropagation();const h=l.currentTarget.parentElement?.getBoundingClientRect();h&&(y(!0),b.current={x:l.clientX,y:l.clientY,top:Y.top,right:Y.right,width:h.width,height:h.height})},ze=l=>{l.preventDefault(),l.stopPropagation();const h=l.currentTarget.parentElement?.getBoundingClientRect();h&&(j(!0),V.current={x:l.clientX,y:l.clientY,bottom:R.bottom,right:R.right,width:h.width,height:h.height})};m.useEffect(()=>{if(!c&&!X)return;const l=g=>{if(c&&b.current){const I=g.clientX-b.current.x,k=g.clientY-b.current.y;let C=b.current.top+k,E=b.current.right-I;const _=10;C=Math.max(_,Math.min(window.innerHeight-b.current.height-_,C)),E=Math.max(_,Math.min(window.innerWidth-b.current.width-_,E)),Ee({top:C,right:E})}if(X&&V.current){const I=g.clientX-V.current.x,k=g.clientY-V.current.y;let C=V.current.bottom-k,E=V.current.right-I;const _=10;C=Math.max(_,Math.min(window.innerHeight-V.current.height-_,C)),E=Math.max(_,Math.min(window.innerWidth-V.current.width-_,E)),se({bottom:C,right:E})}},h=()=>{c&&(y(!1),localStorage.setItem("vg-exit-pos",JSON.stringify(Y)),b.current=null),X&&(j(!1),localStorage.setItem("vg-bar-pos",JSON.stringify(R)),V.current=null)};return window.addEventListener("mousemove",l),window.addEventListener("mouseup",h),()=>{window.removeEventListener("mousemove",l),window.removeEventListener("mouseup",h)}},[c,X,Y,R]);const[St,De]=m.useState(null),[Ct,Et]=m.useState(""),[er,tr]=m.useState({}),ae=m.useRef(null),pe=m.useRef(null),me=m.useCallback(()=>{pe.current||(pe.current=requestAnimationFrame(()=>{const l={},g=Array.from(document.querySelectorAll('[role="dialog"], [aria-modal="true"], .modal, .modal-content')).find(k=>xt(k)&&Ne(k)),I=!!g;O.forEach(k=>{if(!k.reference)return;const C=Jn(k.reference,k._id),E=!!k.reference.metadata?.isModal;if(C&&Ne(C)){if(!C.hasAttribute(ce))C.setAttribute(ce,k._id);else{const $=C.getAttribute(ce);$!==k._id&&$?.startsWith("temp-")&&C.setAttribute(ce,k._id)}let _=!1;if(I?_=g.contains(C):_=!E,!_)return;const D=C.getBoundingClientRect(),J=D.left+D.width/2,fe=D.top+D.height/2;if(J>=0&&J<=window.innerWidth&&fe>=0&&fe<=window.innerHeight){const $=document.elementFromPoint(J,fe);if($&&!C.contains($)&&!ae.current?.contains($))return}l[k._id]={top:D.top+window.scrollY,left:D.left+window.scrollX,width:D.width,isModal:E}}}),tr(l),pe.current=null}))},[O]),Q=m.useCallback(async()=>{if(r){ne(!0);try{const l=await fetch(`${a}/api/annotations`,{headers:{"x-api-key":r}});if(l.ok){const I=((await l.json()).data||[]).reduce((k,C)=>k.find(_=>_._id===C._id)?k:k.concat([C]),[]);Me(I)}}catch(l){console.error("Failed to fetch annotations",l)}finally{ne(!1)}}},[r,a]);m.useEffect(()=>{A&&O.length===0&&!le&&L(!1)},[A,O.length,le]),m.useEffect(()=>{if(!d&&O.length>0){me();const l=new MutationObserver(()=>me()),h=new ResizeObserver(()=>me()),g=()=>me();return l.observe(document.documentElement,{childList:!0,subtree:!0,attributes:!0}),h.observe(document.documentElement),window.addEventListener("scroll",g,!0),()=>{l.disconnect(),h.disconnect(),window.removeEventListener("scroll",g,!0),pe.current&&cancelAnimationFrame(pe.current)}}},[d,O.length,me]),m.useEffect(()=>{Q()},[Q]),m.useEffect(()=>{ae.current=document.getElementById("viewgate-shadow-host")},[]);const Fe=m.useCallback(l=>{if(!d||f)return;const h=wt(l.clientX,l.clientY);if(!h||ae.current?.contains(h)||h.closest(".vg-no-capture")){v(null);return}const g=h.getBoundingClientRect();v({tag:h.tagName.toLowerCase(),source:h.getAttribute("data-source-path")||"unknown:0",rect:g,element:h,previewText:(h.innerText||"").slice(0,100)||(h.getAttribute("placeholder")||"").slice(0,100)||h.tagName.toLowerCase(),semanticReference:{...Kn(h),normalizedOffset:{x:(l.clientX-g.left)/g.width,y:(l.clientY-g.top)/g.height}}})},[d,f]),He=m.useCallback(async l=>{if(!d||f)return;const h=wt(l.clientX,l.clientY);if(!(!h||ae.current?.contains(h)||h.closest(".vg-no-capture"))&&u){l.preventDefault(),l.stopPropagation(),H(!0);try{const k=window.scrollX,C=window.scrollY,E=await gt(document.documentElement,{pixelRatio:1.5,cacheBust:!0,width:window.innerWidth,height:window.innerHeight,backgroundColor:"#ffffff",style:{transform:`scale(${1/window.devicePixelRatio}) translate(-${k}px, -${C}px)`,transformOrigin:"top left"},filter:$=>{const ke=$;return!(ae.current?.contains(ke)||ke.id==="viewgate-ui")}}),_=u.element.getBoundingClientRect(),D=_.top>=0&&_.left>=0&&_.bottom<=window.innerHeight&&_.right<=window.innerWidth;let J="";if(D&&_.width>0&&_.height>0)J=await yt(E,_,24,1.5);else try{J=await gt(u.element,{pixelRatio:2,cacheBust:!0,backgroundColor:"#ffffff",filter:$=>{const ke=$;return!ae.current?.contains(ke)}})}catch{J=await yt(E,_,24,1.5)}const fe={...u.semanticReference,metadata:{...u.semanticReference.metadata,screenshotUrl:E,elementScreenshot:J}};w({...u,visualPreview:J,semanticReference:fe})}catch(g){console.error("Failed to capture preview:",g),w(u)}finally{H(!1),v(null)}}},[d,u,f]);m.useEffect(()=>{const l=h=>{if(h.key==="Escape"){f?w(null):A?L(!1):d&&p(!1);return}const I=(()=>{let E=document.activeElement;for(;E&&E.shadowRoot&&E.shadowRoot.activeElement;)E=E.shadowRoot.activeElement;return E})();if(["input","textarea"].includes((I?.tagName||"").toLowerCase())||I?.isContentEditable)return;const C=h.key.toLowerCase();C==="c"&&!f&&!A&&p(E=>!E),C==="v"&&!f&&(O.length>0||A)&&(L(E=>!E),A||p(!1))};return d&&!f?document.body.classList.add("vg-cursor-pointer"):document.body.classList.remove("vg-cursor-pointer"),window.addEventListener("keydown",l),window.addEventListener("mousemove",Fe,!0),window.addEventListener("click",He,!0),()=>{document.body.classList.remove("vg-cursor-pointer"),window.removeEventListener("keydown",l),window.removeEventListener("mousemove",Fe,!0),window.removeEventListener("click",He,!0)}},[d,f,A,O,Fe,He]);const nr=async()=>{if(!f||!x.trim())return;P(!0);const{semanticReference:l}=f,[h,g]=(l.source||"").split(":"),I=g||"0";try{if(!(await fetch(`${a}/api/annotations`,{method:"POST",headers:{"Content-Type":"application/json","x-api-key":r},body:JSON.stringify({filePath:h,line:parseInt(I),url:window.location.href,message:x,componentName:l.componentPath||f.tag,reference:{...l,viewport:{width:window.innerWidth,height:window.innerHeight},userAgent:navigator.userAgent,timestamp:new Date().toISOString()}})})).ok)throw new Error("Backend failed");e(n.success,"success"),w(null),S(""),p(!1),Q()}catch(k){console.error(k),e(n.error,"error")}finally{P(!1)}};return o.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1021",className:"vg-container",children:o.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1022",className:"vg-no-capture",children:[!i&&o.jsxs("div",{style:{position:"fixed",top:`${Y.top}px`,right:`${Y.right}px`,zIndex:Ae+10,display:"flex",alignItems:"center",gap:"8px",transition:c?"none":"all 0.3s cubic-bezier(0.4, 0, 0.2, 1)"},children:[o.jsx("div",{onMouseDown:ue,style:{width:"20px",height:"32px",borderRadius:"6px",backgroundColor:"rgba(255, 255, 255, 0.85)",backdropFilter:"blur(4px)",display:"flex",alignItems:"center",justifyContent:"center",cursor:"grab",color:"#1e293b",opacity:d?0:1,visibility:d?"hidden":"visible",transition:"all 0.2s",border:"1px solid rgba(0,0,0,0.1)",boxShadow:"0 2px 8px rgba(0,0,0,0.05)"},onMouseEnter:l=>{l.currentTarget.style.backgroundColor="white",l.currentTarget.style.color="#000000"},onMouseLeave:l=>{l.currentTarget.style.backgroundColor="rgba(255, 255, 255, 0.85)",l.currentTarget.style.color="#1e293b"},children:o.jsx(Ze,{"data-source-path":"/src/components/ViewGateOverlay.tsx:1066",size:14})}),o.jsx("button",{onClick:l=>{l.stopPropagation(),B({title:n.exitConfirmTitle||"Close ViewGate?",message:n.exitConfirmMessage||"Are you sure you want to close ViewGate?",type:"danger",onConfirm:()=>s()})},title:"Cerrar ViewGate",style:{width:"40px",height:"40px",borderRadius:"12px",backgroundColor:"rgba(255, 255, 255, 0.9)",backdropFilter:"blur(8px)",display:"flex",alignItems:"center",justifyContent:"center",border:"1px solid rgba(0,0,0,0.05)",boxShadow:"0 4px 12px rgba(0,0,0,0.1)",cursor:"pointer",color:"#64748b",transition:"all 0.3s cubic-bezier(0.4, 0, 0.2, 1)"},onMouseEnter:l=>{l.currentTarget.style.transform="scale(1.1) rotate(90deg)",l.currentTarget.style.color="#ef4444",l.currentTarget.style.backgroundColor="white"},onMouseLeave:l=>{l.currentTarget.style.transform="scale(1) rotate(0deg)",l.currentTarget.style.color="#64748b",l.currentTarget.style.backgroundColor="rgba(255, 255, 255, 0.9)"},children:o.jsx(_e,{"data-source-path":"/src/components/ViewGateOverlay.tsx:1106",size:20,strokeWidth:2.5})})]}),o.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1112",style:{position:"fixed",bottom:`${R.bottom}px`,right:`${R.right}px`,zIndex:Ae,display:"flex",alignItems:"center",gap:"8px",transition:X?"none":"all 0.4s cubic-bezier(0.4, 0, 0.2, 1)"},id:"viewgate-ui",children:[o.jsx("div",{onMouseDown:ze,style:{width:"24px",height:"40px",borderRadius:"10px",backgroundColor:"rgba(255, 255, 255, 0.85)",backdropFilter:"blur(4px)",display:"flex",alignItems:"center",justifyContent:"center",cursor:"grab",color:"#1e293b",opacity:d?0:1,visibility:d?"hidden":"visible",transition:"all 0.2s",border:"1px solid rgba(0,0,0,0.1)",boxShadow:"0 2px 8px rgba(0,0,0,0.05)"},onMouseEnter:l=>{l.currentTarget.style.backgroundColor="white",l.currentTarget.style.color="#000000"},onMouseLeave:l=>{l.currentTarget.style.backgroundColor="rgba(255, 255, 255, 0.85)",l.currentTarget.style.color="#1e293b"},className:"vg-animate-slide-up",children:o.jsx(Ze,{"data-source-path":"/src/components/ViewGateOverlay.tsx:1155",size:16})}),o.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1158",className:"vg-action-bar vg-animate-slide-up",style:{transition:"all 0.4s cubic-bezier(0.4, 0, 0.2, 1)"},children:[o.jsx("button",{onClick:()=>p(!d),className:"vg-button-primary vg-animate-pop",style:{padding:"12px 24px",background:d?"#ef4444":void 0},children:o.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1167",style:{display:"flex",alignItems:"center",gap:"10px"},children:[d?o.jsx(_e,{"data-source-path":"/src/components/ViewGateOverlay.tsx:1168",size:20,className:"vg-animate-pop"}):o.jsx(Re,{"data-source-path":"/src/components/ViewGateOverlay.tsx:1168",size:20,className:"vg-animate-pop"}),o.jsx("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1169",children:d?n.exitMode:n.enterMode})]})}),O.length>0&&o.jsxs("button",{onClick:()=>{L(!A),p(!1),w(null)},className:"vg-button-ghost vg-animate-pop",style:{animationDelay:"0.1s"},children:[o.jsx(Lt,{"data-source-path":"/src/components/ViewGateOverlay.tsx:1182",size:20}),o.jsx("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1183",children:n.viewComments})]})]})]}),F&&o.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1191",style:{position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"rgba(255,255,255,0.6)",backdropFilter:"blur(4px)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:Ae+1,cursor:"wait"},children:o.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1197",className:"vg-glassmorphism",style:{padding:"30px 50px",display:"flex",flexDirection:"column",alignItems:"center",gap:"16px"},children:[o.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1198",className:"vg-spinner"}),o.jsx("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1199",style:{fontWeight:600,fontSize:"14px",color:"#000000"},children:"Capturando..."})]})}),d&&!f&&o.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1206",className:"vg-backdrop-blur",style:{opacity:1,clipPath:u?`polygon(
9
9
  0% 0%, 0% 100%, 100% 100%, 100% 0%, 0% 0%,
10
10
  ${u.rect.left}px ${u.rect.top}px,
11
11
  ${u.rect.right}px ${u.rect.top}px,
12
12
  ${u.rect.right}px ${u.rect.bottom}px,
13
13
  ${u.rect.left}px ${u.rect.bottom}px,
14
14
  ${u.rect.left}px ${u.rect.top}px
15
- )`:"none",zIndex:Mn}}),d&&u&&!f&&!F&&o.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1191",className:"vg-selection-pulse",style:{top:u.rect.top-4,left:u.rect.left-4,width:u.rect.width+8,height:u.rect.height+8,zIndex:In},children:o.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1201",className:"vg-selection-label",style:{...u.rect.top<60?u.rect.bottom>window.innerHeight-60?{top:"8px",bottom:"auto"}:{top:"100%",marginTop:"8px",bottom:"auto"}:{top:"-40px",bottom:"auto"},...u.rect.left+200>window.innerWidth?{left:"auto",right:"0"}:{left:"0",right:"auto"}},children:[o.jsx(Mt,{"data-source-path":"/src/components/ViewGateOverlay.tsx:1217",size:16}),o.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1218",style:{display:"flex",flexDirection:"column"},children:[o.jsx("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1219",style:{fontWeight:700},children:n.selectToComment}),o.jsxs("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1220",style:{fontSize:"10px",opacity:.8,fontFamily:"monospace"},children:[Math.round(u.rect.width)," × ",Math.round(u.rect.height)]})]})]})}),f&&o.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1230",className:"vg-animate-fade",style:{position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"rgba(15, 23, 42, 0.4)",backdropFilter:"blur(8px)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:Pe},children:o.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1235",className:"vg-glassmorphism vg-animate-slide",style:{padding:"40px",width:"500px",boxShadow:"0 25px 50px -12px rgba(0, 0, 0, 0.25)"},children:[o.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1239",style:{textAlign:"center",marginBottom:"32px"},children:[o.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1240",style:{width:"48px",height:"48px",background:"var(--vg-primary-gradient)",borderRadius:"12px",display:"flex",alignItems:"center",justifyContent:"center",margin:"0 auto 16px",color:"white",boxShadow:"0 8px 16px rgba(99, 102, 241, 0.3)"},children:o.jsx(Ee,{"data-source-path":"/src/components/ViewGateOverlay.tsx:1245",size:24})}),o.jsx("h2",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1247",style:{margin:"0 0 8px 0",fontSize:"24px",fontWeight:800,color:"#0f172a"},children:n.feedbackHeader}),o.jsx("p",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1248",style:{margin:0,color:"#000000",fontSize:"15px"},children:n.feedbackSubheader})]}),f.visualPreview&&o.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1252",style:{marginBottom:"24px",borderRadius:"12px",overflow:"hidden",border:"1px solid #e2e8f0",background:"#f8fafc",width:"fit-content",margin:"0 auto 24px auto"},children:o.jsx("img",{src:f.visualPreview,alt:"Preview",style:{maxWidth:"100%",maxHeight:"200px",objectFit:"contain",display:"block"}})}),o.jsx("textarea",{className:"vg-textarea",value:x,onChange:l=>S(l.target.value),rows:4,placeholder:n.placeholder,autoFocus:!0,style:{fontSize:"15px",padding:"16px",marginBottom:"24px"}}),o.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1279",style:{display:"flex",gap:"12px"},children:[o.jsx("button",{onClick:()=>!T&&w(null),className:"vg-button-ghost",disabled:T,style:{flex:1,padding:"12px"},children:n.cancel}),o.jsx("button",{onClick:tr,className:"vg-button-primary",disabled:T||!x.trim(),style:{flex:2},children:o.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1294",style:{display:"flex",alignItems:"center",gap:"8px"},children:[T?o.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1295",className:"vg-spinner",style:{width:"16px",height:"16px",borderWidth:"2px"}}):o.jsx(Dt,{"data-source-path":"/src/components/ViewGateOverlay.tsx:1295",size:18}),o.jsx("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1296",children:T?n.submitting:n.sendFeedback||"Send Comment"})]})})]})]})}),G&&o.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1306",className:"vg-animate-fade",style:{position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"rgba(15, 23, 42, 0.6)",backdropFilter:"blur(4px)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:Pe},children:o.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1311",className:"vg-glassmorphism vg-animate-slide",style:{padding:"32px",width:"650px",maxHeight:"85vh",display:"flex",flexDirection:"column"},children:[o.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1315",style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:"20px"},children:[o.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1316",style:{display:"flex",alignItems:"center",gap:"12px"},children:[o.jsx("h2",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1317",style:{margin:0,fontSize:"20px",fontWeight:800,color:"#0f172a"},children:B?n.commentDetails:n.annotations}),!B&&o.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1321",className:"vg-badge",style:{background:"#e0e7ff",color:"#6366f1"},children:_.length})]}),o.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1326",style:{display:"flex",gap:"8px"},children:[B&&o.jsx("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1328",className:"vg-button-ghost",style:{padding:"6px 14px",fontSize:"12px"},onClick:()=>re(null),children:n.viewAll||"View All"}),o.jsx("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1336",className:"vg-button-ghost",style:{padding:"8px",borderRadius:"50%"},onClick:()=>{L(!1),re(null)},children:o.jsx(ke,{"data-source-path":"/src/components/ViewGateOverlay.tsx:1341",size:20})})]})]}),o.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1346",style:{maxHeight:"60vh",overflowY:"auto",paddingRight:"10px"},className:"vg-custom-scrollbar",children:ce?o.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1348",style:{display:"flex",justifyContent:"center",padding:"40px"},children:o.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1349",className:"vg-spinner"})}):(B?_.filter(l=>l._id===B):_).map((l,h)=>o.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1353",className:"vg-glassmorphism vg-animate-slide",style:{padding:"20px",marginBottom:"16px",border:"1px solid rgba(0,0,0,0.05)",background:"rgba(255,255,255,0.5)",animationDelay:`${h*.05}s`},children:[o.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1364",style:{display:"flex",justifyContent:"space-between",marginBottom:"16px",alignItems:"center"},children:o.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1365",style:{display:"flex",gap:"12px",alignItems:"center"},children:[l.status==="ready_for_review"?o.jsxs("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1367",className:"vg-badge",style:{backgroundColor:"#f0fdf4",color:"#16a34a"},children:[o.jsx(q,{"data-source-path":"/src/components/ViewGateOverlay.tsx:1368",size:14})," ",n.readyForReview]}):o.jsxs("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1371",className:"vg-badge",style:{backgroundColor:"#fff7ed",color:"#ea580c"},children:[o.jsx(Ue,{"data-source-path":"/src/components/ViewGateOverlay.tsx:1372",size:14})," ",n.pending]}),o.jsx("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1375",style:{fontSize:"12px",color:"#000000"},children:Hn(l.timestamp||l.createdAt||l.reference?.timestamp,t)})]})}),bt===l._id?o.jsx("textarea",{className:"vg-textarea",value:St,onChange:y=>Ct(y.target.value),rows:3,autoFocus:!0,style:{marginBottom:"16px"}}):o.jsx("p",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1391",style:{margin:"0 0 20px 0",fontSize:"16px",color:"#1e293b",lineHeight:1.6},children:l.message}),o.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1394",style:{display:"flex",gap:"12px",justifyContent:"flex-end",borderTop:"1px solid #f1f5f9",paddingTop:"16px"},children:bt===l._id?o.jsxs(o.Fragment,{children:[o.jsx("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1397",className:"vg-button-primary vg-animate-pop",style:{padding:"8px 16px",fontSize:"13px"},onClick:async()=>{try{(await fetch(`${a}/api/annotations/${l._id}`,{method:"PATCH",headers:{"Content-Type":"application/json","x-api-key":r},body:JSON.stringify({message:St})})).ok&&(Ie(null),Q(),e(n.updateSuccess,"success"))}catch{e(n.error,"error")}},children:n.save}),o.jsx("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1419",className:"vg-button-ghost vg-animate-pop",style:{padding:"8px 16px",fontSize:"13px"},onClick:()=>Ie(null),children:n.cancel})]}):o.jsxs(o.Fragment,{children:[o.jsxs("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1423",className:"vg-button-ghost vg-animate-pop",style:{padding:"8px 16px",fontSize:"13px"},onClick:()=>{Ie(l._id),Ct(l.message)},children:[o.jsx(It,{"data-source-path":"/src/components/ViewGateOverlay.tsx:1431",size:14})," ",n.edit]}),o.jsxs("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1433",className:"vg-button-ghost vg-animate-pop",style:{padding:"8px 16px",fontSize:"13px",animationDelay:"0.05s"},onClick:()=>{l.url&&(window.location.href=l.url)},children:[o.jsx(Ye,{"data-source-path":"/src/components/ViewGateOverlay.tsx:1440",size:14})," ",n.review]}),l.status==="pending"?o.jsxs("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1443",className:"vg-button-primary vg-animate-pop",style:{padding:"8px 16px",fontSize:"13px",animationDelay:"0.1s"},onClick:()=>{$({title:n.markReadyConfirm,message:n.confirmMarkReady,type:"success",onConfirm:async()=>{try{(await fetch(`${a}/api/annotations/${l._id}`,{method:"PATCH",headers:{"Content-Type":"application/json","x-api-key":r},body:JSON.stringify({status:"ready_for_review"})})).ok&&(Q(),e(n.updateSuccess,"success"))}catch{e(n.error,"error")}finally{$(null)}}})},children:[o.jsx(q,{"data-source-path":"/src/components/ViewGateOverlay.tsx:1471",size:14})," ",n.markReady]}):o.jsxs("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1474",className:"vg-button-ghost vg-animate-pop",style:{padding:"8px 16px",fontSize:"13px",animationDelay:"0.1s"},onClick:()=>{$({title:n.reopenConfirm,message:n.confirmReopen,type:"success",onConfirm:async()=>{try{(await fetch(`${a}/api/annotations/${l._id}`,{method:"PATCH",headers:{"Content-Type":"application/json","x-api-key":r},body:JSON.stringify({status:"pending"})})).ok&&(Q(),e(n.updateSuccess,"success"))}catch{e(n.error,"error")}finally{$(null)}}})},children:[o.jsx(zt,{"data-source-path":"/src/components/ViewGateOverlay.tsx:1502",size:14})," ",n.reopen]}),o.jsx("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1505",className:"vg-button-ghost vg-animate-pop",style:{padding:"8px 12px",color:"#ef4444",borderColor:"#fee2e2",animationDelay:"0.15s"},onClick:()=>{$({title:n.deleteConfirm,message:n.confirmDelete,type:"danger",onConfirm:async()=>{try{(await fetch(`${a}/api/annotations/${l._id}`,{method:"DELETE",headers:{"x-api-key":r}})).ok&&(Q(),e(n.deleteSuccess,"success"))}catch{e(n.error,"error")}finally{$(null)}}})},children:o.jsx(Je,{"data-source-path":"/src/components/ViewGateOverlay.tsx:1532",size:16})})]})})]},l._id))})]})}),W&&o.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1547",className:"vg-animate-fade",style:{position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"rgba(11, 15, 25, 0.7)",backdropFilter:"blur(8px)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:Pe+100},children:o.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1552",className:"vg-glassmorphism vg-animate-slide",style:{padding:"40px",width:"420px",textAlign:"center",border:"1px solid rgba(255, 255, 255, 0.1)",boxShadow:"0 25px 50px -12px rgba(0, 0, 0, 0.5)"},children:[o.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1559",style:{width:"64px",height:"64px",background:W.type==="danger"?"rgba(239, 68, 68, 0.1)":"rgba(99, 102, 241, 0.1)",borderRadius:"20px",display:"flex",alignItems:"center",justifyContent:"center",margin:"0 auto 24px",color:W.type==="danger"?"#ef4444":"#6366f1",transform:"rotate(-5deg)"},children:W.type==="danger"?o.jsx(Je,{"data-source-path":"/src/components/ViewGateOverlay.tsx:1568",size:32}):o.jsx(q,{"data-source-path":"/src/components/ViewGateOverlay.tsx:1568",size:32})}),o.jsx("h3",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1570",style:{margin:"0 0 12px 0",fontSize:"20px",fontWeight:800,color:"#000000",letterSpacing:"-0.02em"},children:W.title}),o.jsx("p",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1571",style:{margin:"0 0 32px 0",fontSize:"15px",color:"#000000",lineHeight:1.6},children:W.message}),o.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1572",style:{display:"flex",gap:"16px"},children:[o.jsx("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1573",className:"vg-button-ghost",style:{flex:1,height:"44px"},onClick:()=>!K&&$(null),disabled:K,children:n.no}),o.jsx("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1581",className:"vg-button-primary",style:{flex:1,height:"44px",backgroundColor:W.type==="danger"?"#ef4444":void 0,backgroundImage:W.type==="danger"?"none":void 0,display:"flex",alignItems:"center",justifyContent:"center",gap:"8px"},disabled:K,onClick:async()=>{le(!0);try{await W.onConfirm()}catch(l){console.error("Confirmation error:",l)}finally{le(!1)}},children:K?o.jsx(Lt,{"data-source-path":"/src/components/ViewGateOverlay.tsx:1606",size:18,className:"vg-animate-spin"}):n.yes})]})]})}),!d&&!G&&_.map((l,h)=>{const y=qn[l._id];if(!y)return null;const O=_.slice(0,h).filter(k=>k.reference?.selector&&k.reference.selector===l.reference?.selector).length*34;return o.jsxs("div",{className:"vg-pin-container vg-animate-pop",style:{position:"fixed",top:y.top-20-window.scrollY,left:y.left+y.width/2-16+O-window.scrollX,cursor:"pointer",animationDelay:`${h*.08}s`,transition:"all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275)",zIndex:zn-h},onMouseEnter:k=>{const C=k.currentTarget.getBoundingClientRect();window.innerHeight-C.bottom<180?be(z=>({...z,[l._id]:"vg-top"})):be(z=>({...z,[l._id]:""}))},onClick:()=>{L(!0),re(l._id)},children:[o.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1653",className:`vg-pin-tooltip ${ve[l._id]||""}`,children:[o.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1654",style:{display:"flex",alignItems:"center",gap:"8px",marginBottom:"8px"},children:[l.status==="ready_for_review"?o.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1656",style:{display:"flex",alignItems:"center",gap:"6px",color:"#16a34a",fontWeight:700,fontSize:"11px"},children:[o.jsx(q,{"data-source-path":"/src/components/ViewGateOverlay.tsx:1657",size:12})," ",n.readyForReview]}):o.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1660",style:{display:"flex",alignItems:"center",gap:"6px",color:y.isModal?"#f59e0b":"#ea580c",fontWeight:700,fontSize:"11px"},children:[o.jsx(Ue,{"data-source-path":"/src/components/ViewGateOverlay.tsx:1661",size:12})," ",n.pending]}),y.isModal&&o.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1665",style:{display:"flex",alignItems:"center",gap:"6px",color:"#f59e0b",fontWeight:700,fontSize:"11px",marginLeft:"auto"},children:o.jsx("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1666",children:"MODAL"})})]}),o.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1670",style:{fontWeight:500,color:"#1e293b",lineHeight:1.4},children:l.message})]}),o.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1673",className:`vg-formal-pin ${l.status==="ready_for_review"?"ready":""} ${y.isModal?"modal-variant":""}`,children:l.status==="ready_for_review"?o.jsx(q,{"data-source-path":"/src/components/ViewGateOverlay.tsx:1674",size:18}):y.isModal?o.jsx(Ye,{"data-source-path":"/src/components/ViewGateOverlay.tsx:1674",size:16}):o.jsx(Ee,{"data-source-path":"/src/components/ViewGateOverlay.tsx:1674",size:16})})]},`pin-${l._id}`)})]})})};function Ne(e,t,n){if(!t.endsWith(".tsx")&&!t.endsWith(".jsx")||t.includes("node_modules"))return e;const r=d=>d.replace(/\\/g,"/"),a=r(t).replace(r(n),"");return e.split(`
15
+ )`:"none",zIndex:Mn}}),d&&u&&!f&&!F&&o.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1225",className:"vg-selection-pulse",style:{top:u.rect.top-4,left:u.rect.left-4,width:u.rect.width+8,height:u.rect.height+8,zIndex:zn},children:o.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1235",className:"vg-selection-label",style:{...u.rect.top<60?u.rect.bottom>window.innerHeight-60?{top:"8px",bottom:"auto"}:{top:"100%",marginTop:"8px",bottom:"auto"}:{top:"-40px",bottom:"auto"},...u.rect.left+200>window.innerWidth?{left:"auto",right:"0"}:{left:"0",right:"auto"}},children:[o.jsx(Mt,{"data-source-path":"/src/components/ViewGateOverlay.tsx:1251",size:16}),o.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1252",style:{display:"flex",flexDirection:"column"},children:[o.jsx("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1253",style:{fontWeight:700},children:n.selectToComment}),o.jsxs("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1254",style:{fontSize:"10px",opacity:.8,fontFamily:"monospace"},children:[Math.round(u.rect.width)," × ",Math.round(u.rect.height)]})]})]})}),f&&o.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1264",className:"vg-animate-fade",style:{position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"rgba(15, 23, 42, 0.4)",backdropFilter:"blur(8px)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:Ge},children:o.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1269",className:"vg-glassmorphism vg-animate-slide",style:{padding:"40px",width:"500px",boxShadow:"0 25px 50px -12px rgba(0, 0, 0, 0.25)"},children:[o.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1273",style:{textAlign:"center",marginBottom:"32px"},children:[o.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1274",style:{width:"48px",height:"48px",background:"var(--vg-primary-gradient)",borderRadius:"12px",display:"flex",alignItems:"center",justifyContent:"center",margin:"0 auto 16px",color:"white",boxShadow:"0 8px 16px rgba(99, 102, 241, 0.3)"},children:o.jsx(Re,{"data-source-path":"/src/components/ViewGateOverlay.tsx:1279",size:24})}),o.jsx("h2",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1281",style:{margin:"0 0 8px 0",fontSize:"24px",fontWeight:800,color:"#0f172a"},children:n.feedbackHeader}),o.jsx("p",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1282",style:{margin:0,color:"#000000",fontSize:"15px"},children:n.feedbackSubheader})]}),f.visualPreview&&o.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1286",style:{marginBottom:"24px",borderRadius:"12px",overflow:"hidden",border:"1px solid #e2e8f0",background:"#f8fafc",width:"fit-content",margin:"0 auto 24px auto"},children:o.jsx("img",{src:f.visualPreview,alt:"Preview",style:{maxWidth:"100%",maxHeight:"200px",objectFit:"contain",display:"block"}})}),o.jsx("textarea",{className:"vg-textarea",value:x,onChange:l=>S(l.target.value),rows:4,placeholder:n.placeholder,autoFocus:!0,style:{fontSize:"15px",padding:"16px",marginBottom:"24px"}}),o.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1313",style:{display:"flex",gap:"12px"},children:[o.jsx("button",{onClick:()=>!T&&w(null),className:"vg-button-ghost",disabled:T,style:{flex:1,padding:"12px"},children:n.cancel}),o.jsx("button",{onClick:nr,className:"vg-button-primary",disabled:T||!x.trim(),style:{flex:2},children:o.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1328",style:{display:"flex",alignItems:"center",gap:"8px"},children:[T?o.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1329",className:"vg-spinner",style:{width:"16px",height:"16px",borderWidth:"2px"}}):o.jsx(Ft,{"data-source-path":"/src/components/ViewGateOverlay.tsx:1329",size:18}),o.jsx("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1330",children:T?n.submitting:n.sendFeedback||"Send Comment"})]})})]})]})}),A&&o.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1340",className:"vg-animate-fade",style:{position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"rgba(15, 23, 42, 0.6)",backdropFilter:"blur(4px)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:Ge},children:o.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1345",className:"vg-glassmorphism vg-animate-slide",style:{padding:"32px",width:"650px",maxHeight:"85vh",display:"flex",flexDirection:"column"},children:[o.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1349",style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:"20px"},children:[o.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1350",style:{display:"flex",alignItems:"center",gap:"12px"},children:[o.jsx("h2",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1351",style:{margin:0,fontSize:"20px",fontWeight:800,color:"#0f172a"},children:U?n.commentDetails:n.annotations}),!U&&o.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1355",className:"vg-badge",style:{background:"#e0e7ff",color:"#6366f1"},children:O.length})]}),o.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1360",style:{display:"flex",gap:"8px"},children:[U&&o.jsx("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1362",className:"vg-button-ghost",style:{padding:"6px 14px",fontSize:"12px"},onClick:()=>re(null),children:n.viewAll||"View All"}),o.jsx("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1370",className:"vg-button-ghost",style:{padding:"8px",borderRadius:"50%"},onClick:()=>{L(!1),re(null)},children:o.jsx(_e,{"data-source-path":"/src/components/ViewGateOverlay.tsx:1375",size:20})})]})]}),o.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1380",style:{maxHeight:"60vh",overflowY:"auto",paddingRight:"10px"},className:"vg-custom-scrollbar",children:le?o.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1382",style:{display:"flex",justifyContent:"center",padding:"40px"},children:o.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1383",className:"vg-spinner"})}):(U?O.filter(l=>l._id===U):O).map((l,h)=>o.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1387",className:"vg-glassmorphism vg-animate-slide",style:{padding:"20px",marginBottom:"16px",border:"1px solid rgba(0,0,0,0.05)",background:"rgba(255,255,255,0.5)",animationDelay:`${h*.05}s`},children:[o.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1398",style:{display:"flex",justifyContent:"space-between",marginBottom:"16px",alignItems:"center"},children:o.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1399",style:{display:"flex",gap:"12px",alignItems:"center"},children:[l.status==="ready_for_review"?o.jsxs("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1401",className:"vg-badge",style:{backgroundColor:"#f0fdf4",color:"#16a34a"},children:[o.jsx(q,{"data-source-path":"/src/components/ViewGateOverlay.tsx:1402",size:14})," ",n.readyForReview]}):o.jsxs("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1405",className:"vg-badge",style:{backgroundColor:"#fff7ed",color:"#ea580c"},children:[o.jsx(Xe,{"data-source-path":"/src/components/ViewGateOverlay.tsx:1406",size:14})," ",n.pending]}),o.jsx("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1409",style:{fontSize:"12px",color:"#000000"},children:Wn(l.timestamp||l.createdAt||l.reference?.timestamp,t)})]})}),St===l._id?o.jsx("textarea",{className:"vg-textarea",value:Ct,onChange:g=>Et(g.target.value),rows:3,autoFocus:!0,style:{marginBottom:"16px"}}):o.jsx("p",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1425",style:{margin:"0 0 20px 0",fontSize:"16px",color:"#1e293b",lineHeight:1.6},children:l.message}),o.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1428",style:{display:"flex",gap:"12px",justifyContent:"flex-end",borderTop:"1px solid #f1f5f9",paddingTop:"16px"},children:St===l._id?o.jsxs(o.Fragment,{children:[o.jsx("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1431",className:"vg-button-primary vg-animate-pop",style:{padding:"8px 16px",fontSize:"13px"},onClick:async()=>{try{(await fetch(`${a}/api/annotations/${l._id}`,{method:"PATCH",headers:{"Content-Type":"application/json","x-api-key":r},body:JSON.stringify({message:Ct})})).ok&&(De(null),Q(),e(n.updateSuccess,"success"))}catch{e(n.error,"error")}},children:n.save}),o.jsx("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1453",className:"vg-button-ghost vg-animate-pop",style:{padding:"8px 16px",fontSize:"13px"},onClick:()=>De(null),children:n.cancel})]}):o.jsxs(o.Fragment,{children:[o.jsxs("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1457",className:"vg-button-ghost vg-animate-pop",style:{padding:"8px 16px",fontSize:"13px"},onClick:()=>{De(l._id),Et(l.message)},children:[o.jsx(zt,{"data-source-path":"/src/components/ViewGateOverlay.tsx:1465",size:14})," ",n.edit]}),o.jsxs("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1467",className:"vg-button-ghost vg-animate-pop",style:{padding:"8px 16px",fontSize:"13px",animationDelay:"0.05s"},onClick:()=>{l.url&&(window.location.href=l.url)},children:[o.jsx(Je,{"data-source-path":"/src/components/ViewGateOverlay.tsx:1474",size:14})," ",n.review]}),l.status==="pending"?o.jsxs("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1477",className:"vg-button-primary vg-animate-pop",style:{padding:"8px 16px",fontSize:"13px",animationDelay:"0.1s"},onClick:()=>{B({title:n.markReadyConfirm,message:n.confirmMarkReady,type:"success",onConfirm:async()=>{try{(await fetch(`${a}/api/annotations/${l._id}`,{method:"PATCH",headers:{"Content-Type":"application/json","x-api-key":r},body:JSON.stringify({status:"ready_for_review"})})).ok&&(Q(),e(n.updateSuccess,"success"))}catch{e(n.error,"error")}finally{B(null)}}})},children:[o.jsx(q,{"data-source-path":"/src/components/ViewGateOverlay.tsx:1505",size:14})," ",n.markReady]}):o.jsxs("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1508",className:"vg-button-ghost vg-animate-pop",style:{padding:"8px 16px",fontSize:"13px",animationDelay:"0.1s"},onClick:()=>{B({title:n.reopenConfirm,message:n.confirmReopen,type:"success",onConfirm:async()=>{try{(await fetch(`${a}/api/annotations/${l._id}`,{method:"PATCH",headers:{"Content-Type":"application/json","x-api-key":r},body:JSON.stringify({status:"pending"})})).ok&&(Q(),e(n.updateSuccess,"success"))}catch{e(n.error,"error")}finally{B(null)}}})},children:[o.jsx(Dt,{"data-source-path":"/src/components/ViewGateOverlay.tsx:1536",size:14})," ",n.reopen]}),o.jsx("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1539",className:"vg-button-ghost vg-animate-pop",style:{padding:"8px 12px",color:"#ef4444",borderColor:"#fee2e2",animationDelay:"0.15s"},onClick:()=>{B({title:n.deleteConfirm,message:n.confirmDelete,type:"danger",onConfirm:async()=>{try{(await fetch(`${a}/api/annotations/${l._id}`,{method:"DELETE",headers:{"x-api-key":r}})).ok&&(Q(),e(n.deleteSuccess,"success"))}catch{e(n.error,"error")}finally{B(null)}}})},children:o.jsx(Ke,{"data-source-path":"/src/components/ViewGateOverlay.tsx:1566",size:16})})]})})]},l._id))})]})}),W&&o.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1581",className:"vg-animate-fade",style:{position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"rgba(11, 15, 25, 0.7)",backdropFilter:"blur(8px)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:Ge+100},children:o.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1586",className:"vg-glassmorphism vg-animate-slide",style:{padding:"40px",width:"420px",textAlign:"center",border:"1px solid rgba(255, 255, 255, 0.1)",boxShadow:"0 25px 50px -12px rgba(0, 0, 0, 0.5)"},children:[o.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1593",style:{width:"64px",height:"64px",background:W.type==="danger"?"rgba(239, 68, 68, 0.1)":"rgba(99, 102, 241, 0.1)",borderRadius:"20px",display:"flex",alignItems:"center",justifyContent:"center",margin:"0 auto 24px",color:W.type==="danger"?"#ef4444":"#6366f1",transform:"rotate(-5deg)"},children:W.type==="danger"?o.jsx(Ke,{"data-source-path":"/src/components/ViewGateOverlay.tsx:1602",size:32}):o.jsx(q,{"data-source-path":"/src/components/ViewGateOverlay.tsx:1602",size:32})}),o.jsx("h3",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1604",style:{margin:"0 0 12px 0",fontSize:"20px",fontWeight:800,color:"#000000",letterSpacing:"-0.02em"},children:W.title}),o.jsx("p",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1605",style:{margin:"0 0 32px 0",fontSize:"15px",color:"#000000",lineHeight:1.6},children:W.message}),o.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1606",style:{display:"flex",gap:"16px"},children:[o.jsx("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1607",className:"vg-button-ghost",style:{flex:1,height:"44px"},onClick:()=>!K&&B(null),disabled:K,children:n.no}),o.jsx("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1615",className:"vg-button-primary",style:{flex:1,height:"44px",backgroundColor:W.type==="danger"?"#ef4444":void 0,backgroundImage:W.type==="danger"?"none":void 0,display:"flex",alignItems:"center",justifyContent:"center",gap:"8px"},disabled:K,onClick:async()=>{de(!0);try{await W.onConfirm()}catch(l){console.error("Confirmation error:",l)}finally{de(!1)}},children:K?o.jsx(It,{"data-source-path":"/src/components/ViewGateOverlay.tsx:1640",size:18,className:"vg-animate-spin"}):n.yes})]})]})}),!d&&!A&&O.map((l,h)=>{const g=er[l._id];if(!g)return null;const k=O.slice(0,h).filter(C=>C.reference?.selector&&C.reference.selector===l.reference?.selector).length*34;return o.jsxs("div",{className:"vg-pin-container vg-animate-pop",style:{position:"fixed",top:g.top-20-window.scrollY,left:g.left+g.width/2-16+k-window.scrollX,cursor:"pointer",animationDelay:`${h*.08}s`,transition:"all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275)",zIndex:Dn-h},onMouseEnter:C=>{const E=C.currentTarget.getBoundingClientRect();window.innerHeight-E.bottom<180?Ce(D=>({...D,[l._id]:"vg-top"})):Ce(D=>({...D,[l._id]:""}))},onClick:()=>{L(!0),re(l._id)},children:[o.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1687",className:`vg-pin-tooltip ${Se[l._id]||""}`,children:[o.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1688",style:{display:"flex",alignItems:"center",gap:"8px",marginBottom:"8px"},children:[l.status==="ready_for_review"?o.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1690",style:{display:"flex",alignItems:"center",gap:"6px",color:"#16a34a",fontWeight:700,fontSize:"11px"},children:[o.jsx(q,{"data-source-path":"/src/components/ViewGateOverlay.tsx:1691",size:12})," ",n.readyForReview]}):o.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1694",style:{display:"flex",alignItems:"center",gap:"6px",color:g.isModal?"#f59e0b":"#ea580c",fontWeight:700,fontSize:"11px"},children:[o.jsx(Xe,{"data-source-path":"/src/components/ViewGateOverlay.tsx:1695",size:12})," ",n.pending]}),g.isModal&&o.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1699",style:{display:"flex",alignItems:"center",gap:"6px",color:"#f59e0b",fontWeight:700,fontSize:"11px",marginLeft:"auto"},children:o.jsx("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1700",children:"MODAL"})})]}),o.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1704",style:{fontWeight:500,color:"#1e293b",lineHeight:1.4},children:l.message})]}),o.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1707",className:`vg-formal-pin ${l.status==="ready_for_review"?"ready":""} ${g.isModal?"modal-variant":""}`,children:l.status==="ready_for_review"?o.jsx(q,{"data-source-path":"/src/components/ViewGateOverlay.tsx:1708",size:18}):g.isModal?o.jsx(Je,{"data-source-path":"/src/components/ViewGateOverlay.tsx:1708",size:16}):o.jsx(Re,{"data-source-path":"/src/components/ViewGateOverlay.tsx:1708",size:16})})]},`pin-${l._id}`)})]})})};function Ie(e,t,n){if(!t.endsWith(".tsx")&&!t.endsWith(".jsx")||t.includes("node_modules"))return e;const r=d=>d.replace(/\\/g,"/"),a=r(t).replace(r(n),"");return e.split(`
16
16
  `).map((d,p)=>{const u=p+1;return d.replace(/(^|[^a-zA-Z0-9])<([a-zA-Z][a-zA-Z0-9\.]*)(?=[ \t\n\/\>])/g,(v,f,w)=>v.includes("data-source-path")||w==="Fragment"||w==="React.Fragment"?v:`${f}<${w} data-source-path="${a}:${u}"`)}).join(`
17
- `)}function Kn(){return{name:"vite-plugin-viewgate",enforce:"pre",transform(e,t){return{code:Ne(e,t,process.cwd()),map:null}}}}function Qn(e){const t=this.resourcePath;return t?(process.env.NODE_ENV,Ne(e,t,process.cwd())):e}M.ViewGate=Wt,M.ViewGateOverlay=wt,M.transformSourcePaths=Ne,M.useViewGate=Ke,M.viewgateNextLoader=Qn,M.viewgatePlugin=Kn,Object.defineProperty(M,Symbol.toStringTag,{value:"Module"})}));
17
+ `)}function Qn(){return{name:"vite-plugin-viewgate",enforce:"pre",transform(e,t){return{code:Ie(e,t,process.cwd()),map:null}}}}function qn(e){const t=this.resourcePath;return t?(process.env.NODE_ENV,Ie(e,t,process.cwd())):e}M.ViewGate=$t,M.ViewGateOverlay=vt,M.transformSourcePaths=Ie,M.useViewGate=qe,M.viewgateNextLoader=qn,M.viewgatePlugin=Qn,Object.defineProperty(M,Symbol.toStringTag,{value:"Module"})}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "viewgate-wrapper",
3
- "version": "1.10.10",
3
+ "version": "1.10.11",
4
4
  "type": "module",
5
5
  "main": "./dist/viewgate-wrapper.umd.cjs",
6
6
  "module": "./dist/viewgate-wrapper.js",