viewgate-wrapper 1.10.4 → 1.10.6

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
- (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{opacity:.5;cursor:not-allowed;transform: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-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-cursor-pointer,.vg-cursor-pointer *{cursor:pointer!important}')),document.head.appendChild(r)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})();
2
- (function(_,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):(_=typeof globalThis<"u"?globalThis:_||self,m(_.ViewGateWrapper={},_.React,_.ReactDOM))})(this,(function(_,m,Qe){"use strict";var se={exports:{}},K={};var be;function qe(){if(be)return K;be=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,a,s){var o=null;if(s!==void 0&&(o=""+s),a.key!==void 0&&(o=""+a.key),"key"in a){s={};for(var i in a)i!=="key"&&(s[i]=a[i])}else s=a;return a=s.ref,{$$typeof:e,type:r,key:o,ref:a!==void 0?a:null,props:s}}return K.Fragment=t,K.jsx=n,K.jsxs=n,K}var Q={};var Se;function et(){return Se||(Se=1,process.env.NODE_ENV!=="production"&&(function(){function e(l){if(l==null)return null;if(typeof l=="function")return l.$$typeof===ve?null:l.displayName||l.name||null;if(typeof l=="string")return l;switch(l){case I:return"Fragment";case N:return"Profiler";case T:return"StrictMode";case z:return"Suspense";case Je:return"SuspenseList";case ce:return"Activity"}if(typeof l=="object")switch(typeof l.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),l.$$typeof){case L:return"Portal";case $:return l.displayName||"Context";case E:return(l._context.displayName||"Context")+".Consumer";case P:var p=l.render;return l=l.displayName,l||(l=p.displayName||p.name||"",l=l!==""?"ForwardRef("+l+")":"ForwardRef"),l;case Ze:return p=l.displayName||null,p!==null?p:e(l.type)||"Memo";case q:p=l._payload,l=l._init;try{return e(l(p))}catch{}}return null}function t(l){return""+l}function n(l){try{t(l);var p=!1}catch{p=!0}if(p){p=console;var v=p.error,b=typeof Symbol=="function"&&Symbol.toStringTag&&l[Symbol.toStringTag]||l.constructor.name||"Object";return v.call(p,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",b),t(l)}}function r(l){if(l===I)return"<>";if(typeof l=="object"&&l!==null&&l.$$typeof===q)return"<...>";try{var p=e(l);return p?"<"+p+">":"<...>"}catch{return"<...>"}}function a(){var l=X.A;return l===null?null:l.getOwner()}function s(){return Error("react-stack-top-frame")}function o(l){if(M.call(l,"key")){var p=Object.getOwnPropertyDescriptor(l,"key").get;if(p&&p.isReactWarning)return!1}return l.key!==void 0}function i(l,p){function v(){Z||(Z=!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)",p))}v.isReactWarning=!0,Object.defineProperty(l,"key",{get:v,configurable:!0})}function u(){var l=e(this.type);return te[l]||(te[l]=!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.")),l=this.props.ref,l!==void 0?l:null}function f(l,p,v,b,D,W){var C=v.ref;return l={$$typeof:V,type:l,key:p,props:v,_owner:b},(C!==void 0?C:null)!==null?Object.defineProperty(l,"ref",{enumerable:!1,get:u}):Object.defineProperty(l,"ref",{enumerable:!1,value:null}),l._store={},Object.defineProperty(l._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(l,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(l,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:D}),Object.defineProperty(l,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:W}),Object.freeze&&(Object.freeze(l.props),Object.freeze(l)),l}function h(l,p,v,b,D,W){var C=p.children;if(C!==void 0)if(b)if(ee(C)){for(b=0;b<C.length;b++)w(C[b]);Object.freeze&&Object.freeze(C)}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 w(C);if(M.call(p,"key")){C=e(l);var d=Object.keys(p).filter(function(x){return x!=="key"});b=0<d.length?"{key: someKey, "+d.join(": ..., ")+": ...}":"{key: someKey}",de[C+b]||(d=0<d.length?"{"+d.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
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(G,f){typeof exports=="object"&&typeof module<"u"?f(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],f):(G=typeof globalThis<"u"?globalThis:G||self,f(G.ViewGateWrapper={},G.React,G.ReactDOM))})(this,(function(G,f,lt){"use strict";var ue={exports:{}},se={};var Ae;function dt(){if(Ae)return se;Ae=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 l in a)l!=="key"&&(s[l]=a[l])}else s=a;return a=s.ref,{$$typeof:e,type:r,key:i,ref:a!==void 0?a:null,props:s}}return se.Fragment=t,se.jsx=n,se.jsxs=n,se}var ae={};var Ge;function ut(){return Ge||(Ge=1,process.env.NODE_ENV!=="production"&&(function(){function e(c){if(c==null)return null;if(typeof c=="function")return c.$$typeof===oe?null:c.displayName||c.name||null;if(typeof c=="string")return c;switch(c){case z:return"Fragment";case Y:return"Profiler";case B:return"StrictMode";case Te:return"Suspense";case M:return"SuspenseList";case ct: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 P:return c.displayName||"Context";case j:return(c._context.displayName||"Context")+".Consumer";case k:var h=c.render;return c=c.displayName,c||(c=h.displayName||h.name||"",c=c!==""?"ForwardRef("+c+")":"ForwardRef"),c;case D:return h=c.displayName||null,h!==null?h:e(c.type)||"Memo";case ge:h=c._payload,c=c._init;try{return e(c(h))}catch{}}return null}function t(c){return""+c}function n(c){try{t(c);var h=!1}catch{h=!0}if(h){h=console;var C=h.error,E=typeof Symbol=="function"&&Symbol.toStringTag&&c[Symbol.toStringTag]||c.constructor.name||"Object";return C.call(h,"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===z)return"<>";if(typeof c=="object"&&c!==null&&c.$$typeof===ge)return"<...>";try{var h=e(c);return h?"<"+h+">":"<...>"}catch{return"<...>"}}function a(){var c=ee.A;return c===null?null:c.getOwner()}function s(){return Error("react-stack-top-frame")}function i(c){if(ye.call(c,"key")){var h=Object.getOwnPropertyDescriptor(c,"key").get;if(h&&h.isReactWarning)return!1}return c.key!==void 0}function l(c,h){function C(){te||(te=!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)",h))}C.isReactWarning=!0,Object.defineProperty(c,"key",{get:C,configurable:!0})}function p(){var c=e(this.type);return X[c]||(X[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,h,C,E,F,W){var S=C.ref;return c={$$typeof:b,type:c,key:h,props:C,_owner:E},(S!==void 0?S: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:F}),Object.defineProperty(c,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:W}),Object.freeze&&(Object.freeze(c.props),Object.freeze(c)),c}function w(c,h,C,E,F,W){var S=h.children;if(S!==void 0)if(E)if(xe(S)){for(E=0;E<S.length;E++)m(S[E]);Object.freeze&&Object.freeze(S)}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 m(S);if(ye.call(h,"key")){S=e(c);var A=Object.keys(h).filter(function(le){return le!=="key"});E=0<A.length?"{key: someKey, "+A.join(": ..., ")+": ...}":"{key: someKey}",ne[S+E]||(A=0<A.length?"{"+A.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} />`,b,C,d,C),de[C+b]=!0)}if(C=null,v!==void 0&&(n(v),C=""+v),o(p)&&(n(p.key),C=""+p.key),"key"in p){v={};for(var g in p)g!=="key"&&(v[g]=p[g])}else v=p;return C&&i(v,typeof l=="function"?l.displayName||l.name||"Unknown":l),f(l,C,v,a(),D,W)}function w(l){y(l)?l._store&&(l._store.validated=1):typeof l=="object"&&l!==null&&l.$$typeof===q&&(l._payload.status==="fulfilled"?y(l._payload.value)&&l._payload.value._store&&(l._payload.value._store.validated=1):l._store&&(l._store.validated=1))}function y(l){return typeof l=="object"&&l!==null&&l.$$typeof===V}var S=m,V=Symbol.for("react.transitional.element"),L=Symbol.for("react.portal"),I=Symbol.for("react.fragment"),T=Symbol.for("react.strict_mode"),N=Symbol.for("react.profiler"),E=Symbol.for("react.consumer"),$=Symbol.for("react.context"),P=Symbol.for("react.forward_ref"),z=Symbol.for("react.suspense"),Je=Symbol.for("react.suspense_list"),Ze=Symbol.for("react.memo"),q=Symbol.for("react.lazy"),ce=Symbol.for("react.activity"),ve=Symbol.for("react.client.reference"),X=S.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,M=Object.prototype.hasOwnProperty,ee=Array.isArray,J=console.createTask?console.createTask:function(){return null};S={react_stack_bottom_frame:function(l){return l()}};var Z,te={},ne=S.react_stack_bottom_frame.bind(S,s)(),le=J(r(s)),de={};Q.Fragment=I,Q.jsx=function(l,p,v){var b=1e4>X.recentlyCreatedOwnerStacks++;return h(l,p,v,!1,b?Error("react-stack-top-frame"):ne,b?J(r(l)):le)},Q.jsxs=function(l,p,v){var b=1e4>X.recentlyCreatedOwnerStacks++;return h(l,p,v,!0,b?Error("react-stack-top-frame"):ne,b?J(r(l)):le)}})()),Q}var Ce;function tt(){return Ce||(Ce=1,process.env.NODE_ENV==="production"?se.exports=qe():se.exports=et()),se.exports}var c=tt();const nt=({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(i=>{(i.textContent?.includes(".vg-")||i.textContent?.includes("--vg-"))&&a.appendChild(i.cloneNode(!0))});const o=document.createElement("link");o.rel="stylesheet",o.href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800;900&display=swap",a.appendChild(o),r(a)}},[]),c.jsx("div",{"data-source-path":"/src/components/ShadowRootWrapper.tsx:38",ref:t,id:"viewgate-shadow-host",children:n&&Qe.createPortal(e,n)})};const Ee=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();const rt=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const st=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase());const ke=e=>{const t=st(e);return t.charAt(0).toUpperCase()+t.slice(1)};var at={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 ot=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};const it=m.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:a="",children:s,iconNode:o,...i},u)=>m.createElement("svg",{ref:u,...at,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Ee("lucide",a),...!s&&!ot(i)&&{"aria-hidden":"true"},...i},[...o.map(([f,h])=>m.createElement(f,h)),...Array.isArray(s)?s:[s]]));const O=(e,t)=>{const n=m.forwardRef(({className:r,...a},s)=>m.createElement(it,{ref:s,iconNode:t,className:Ee(`lucide-${rt(ke(e))}`,`lucide-${e}`,r),...a}));return n.displayName=ke(e),n};const ct=O("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 U=O("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);const Re=O("clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]]);const lt=O("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 dt=O("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 ue=O("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 ut=O("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 pt=O("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 mt=O("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=O("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 _e=O("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 je=O("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:"Are you sure you want to close/delete this comment?",markReady:"Mark as Ready",reopen:"Reopen",review:"Review",confirmDelete:"Are you sure you want to permanently delete this comment?",markReadyConfirm:"Mark as Ready?",confirmMarkReady:"Are you sure you want to mark this comment as ready for review?",reopenConfirm:"Reopen Comment?",confirmReopen:"Are you sure you want to reopen this comment and set it back to pending?",yes:"Yes, proceed",no:"No, cancel",deleteSuccess:"The annotation has been deleted.",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"},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:"¿Estás seguro de que deseas cerrar y eliminar este comentario?",markReady:"Marcar como Listo",reopen:"Reabrir",review:"Revisar",confirmDelete:"¿Estás seguro de que deseas eliminar permanentemente este comentario?",markReadyConfirm:"¿Marcar como listo?",confirmMarkReady:"¿Estás seguro de que deseas marcar este comentario como listo para revisión?",reopenConfirm:"¿Reabrir comentario?",confirmReopen:"¿Estás seguro de que deseas reabrir este comentario y volverlo al estado pendiente?",yes:"Sí, continuar",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"}},Oe=m.createContext(void 0),Ve=()=>{const e=m.useContext(Oe);if(!e)throw new Error("useViewGate must be used within a ViewGateProvider");return e},gt=({children:e,language:t="es",apiKey:n,baseUrl:r="https://view-gate.vercel.app"})=>{const[a,s]=m.useState([]),o=(u,f)=>{const h=Date.now();s(w=>[...w,{id:h,message:u,type:f}]),setTimeout(()=>{s(w=>w.filter(y=>y.id!==h))},4e3)},i=ht[t];return c.jsxs(Oe.Provider,{"data-source-path":"/src/components/ViewGateProvider.tsx:211",value:{addToast:o,language:t,t:i,apiKey:n,baseUrl:r},children:[e,c.jsx(nt,{"data-source-path":"/src/components/ViewGateProvider.tsx:213",children:c.jsxs("div",{"data-source-path":"/src/components/ViewGateProvider.tsx:214",className:"vg-container",children:[c.jsx(Xe,{"data-source-path":"/src/components/ViewGateProvider.tsx:215"}),c.jsx("div",{"data-source-path":"/src/components/ViewGateProvider.tsx:216",className:"vg-toasts",style:{zIndex:2147483646},children:a.map(u=>c.jsxs("div",{"data-source-path":"/src/components/ViewGateProvider.tsx:218",className:`vg-toast vg-animate-slide ${u.type}`,children:[u.type==="success"?c.jsx(U,{"data-source-path":"/src/components/ViewGateProvider.tsx:220",size:24,color:"#22c55e"}):c.jsx(ct,{"data-source-path":"/src/components/ViewGateProvider.tsx:222",size:24,color:"#ef4444"}),c.jsxs("div",{"data-source-path":"/src/components/ViewGateProvider.tsx:224",children:[c.jsx("strong",{"data-source-path":"/src/components/ViewGateProvider.tsx:225",style:{display:"block",fontSize:"13px",color:"#0f172a",textTransform:"uppercase",marginBottom:"2px"},children:u.type==="success"?i.successHeader:i.errorHeader}),c.jsx("span",{"data-source-path":"/src/components/ViewGateProvider.tsx:228",style:{fontSize:"14px",color:"#64748b"},children:u.message})]})]},u.id))})]})})]})};function yt(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 xt=(()=>{let e=0;const t=()=>`0000${(Math.random()*36**4<<0).toString(36)}`.slice(-4);return()=>(e+=1,`u${t()}${e}`)})();function F(e){const t=[];for(let n=0,r=e.length;n<r;n++)t.push(e[n]);return t}let B=null;function Te(e={}){return B||(e.includeStyleProperties?(B=e.includeStyleProperties,B):(B=F(window.getComputedStyle(document.documentElement)),B))}function ae(e,t){const r=(e.ownerDocument.defaultView||window).getComputedStyle(e).getPropertyValue(t);return r?parseFloat(r.replace("px","")):0}function wt(e){const t=ae(e,"border-left-width"),n=ae(e,"border-right-width");return e.clientWidth+t+n}function vt(e){const t=ae(e,"border-top-width"),n=ae(e,"border-bottom-width");return e.clientHeight+t+n}function Pe(e,t={}){const n=t.width||wt(e),r=t.height||vt(e);return{width:n,height:r}}function bt(){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 j=16384;function St(e){(e.width>j||e.height>j)&&(e.width>j&&e.height>j?e.width>e.height?(e.height*=j/e.width,e.width=j):(e.width*=j/e.height,e.height=j):e.width>j?(e.height*=j/e.width,e.width=j):(e.width*=j/e.height,e.height=j))}function oe(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 Ct(e){return Promise.resolve().then(()=>new XMLSerializer().serializeToString(e)).then(encodeURIComponent).then(t=>`data:image/svg+xml;charset=utf-8,${t}`)}async function Et(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),Ct(a)}const R=(e,t)=>{if(e instanceof t)return!0;const n=Object.getPrototypeOf(e);return n===null?!1:n.constructor.name===t.name||R(n,t)};function kt(e){const t=e.getPropertyValue("content");return`${e.cssText} content: '${t.replace(/'|"/g,"")}';`}function Rt(e,t){return Te(t).map(n=>{const r=e.getPropertyValue(n),a=e.getPropertyPriority(n);return`${n}: ${r}${a?" !important":""};`}).join(" ")}function _t(e,t,n,r){const a=`.${e}:${t}`,s=n.cssText?kt(n):Rt(n,r);return document.createTextNode(`${a}{${s}}`)}function Ae(e,t,n,r){const a=window.getComputedStyle(e,n),s=a.getPropertyValue("content");if(s===""||s==="none")return;const o=xt();try{t.className=`${t.className} ${o}`}catch{return}const i=document.createElement("style");i.appendChild(_t(o,n,a,r)),t.appendChild(i)}function jt(e,t,n){Ae(e,t,":before",n),Ae(e,t,":after",n)}const Ne="application/font-woff",Ge="image/jpeg",Ot={woff:Ne,woff2:Ne,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:Ge,jpeg:Ge,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};function Vt(e){const t=/\.([^./]*?)$/g.exec(e);return t?t[1]:""}function pe(e){const t=Vt(e).toLowerCase();return Ot[t]||""}function Tt(e){return e.split(/,/)[1]}function me(e){return e.search(/^(data:)/)!==-1}function Pt(e,t){return`data:${t};base64,${e}`}async function Le(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,o)=>{const i=new FileReader;i.onerror=o,i.onloadend=()=>{try{s(n({res:r,result:i.result}))}catch(u){o(u)}},i.readAsDataURL(a)})}const fe={};function At(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 he(e,t,n){const r=At(e,t,n.includeQueryParams);if(fe[r]!=null)return fe[r];n.cacheBust&&(e+=(/\?/.test(e)?"&":"?")+new Date().getTime());let a;try{const s=await Le(e,n.fetchRequestInit,({res:o,result:i})=>(t||(t=o.headers.get("Content-Type")||""),Tt(i)));a=Pt(s,t)}catch(s){a=n.imagePlaceholder||"";let o=`Failed to fetch resource: ${e}`;s&&(o=typeof s=="string"?s:s.message),o&&console.warn(o)}return fe[r]=a,a}async function Nt(e){const t=e.toDataURL();return t==="data:,"?e.cloneNode(!1):oe(t)}async function Gt(e,t){if(e.currentSrc){const s=document.createElement("canvas"),o=s.getContext("2d");s.width=e.clientWidth,s.height=e.clientHeight,o?.drawImage(e,0,0,s.width,s.height);const i=s.toDataURL();return oe(i)}const n=e.poster,r=pe(n),a=await he(n,r,t);return oe(a)}async function Lt(e,t){var n;try{if(!((n=e?.contentDocument)===null||n===void 0)&&n.body)return await ie(e.contentDocument.body,t,!0)}catch{}return e.cloneNode(!1)}async function It(e,t){return R(e,HTMLCanvasElement)?Nt(e):R(e,HTMLVideoElement)?Gt(e,t):R(e,HTMLIFrameElement)?Lt(e,t):e.cloneNode(Ie(e))}const zt=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SLOT",Ie=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SVG";async function Ft(e,t,n){var r,a;if(Ie(t))return t;let s=[];return zt(e)&&e.assignedNodes?s=F(e.assignedNodes()):R(e,HTMLIFrameElement)&&(!((r=e.contentDocument)===null||r===void 0)&&r.body)?s=F(e.contentDocument.body.childNodes):s=F(((a=e.shadowRoot)!==null&&a!==void 0?a:e).childNodes),s.length===0||R(e,HTMLVideoElement)||await s.reduce((o,i)=>o.then(()=>ie(i,n)).then(u=>{u&&t.appendChild(u)}),Promise.resolve()),t}function Mt(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):Te(n).forEach(s=>{let o=a.getPropertyValue(s);s==="font-size"&&o.endsWith("px")&&(o=`${Math.floor(parseFloat(o.substring(0,o.length-2)))-.1}px`),R(e,HTMLIFrameElement)&&s==="display"&&o==="inline"&&(o="block"),s==="d"&&t.getAttribute("d")&&(o=`path(${t.getAttribute("d")})`),r.setProperty(s,o,a.getPropertyPriority(s))})}function Dt(e,t){R(e,HTMLTextAreaElement)&&(t.innerHTML=e.value),R(e,HTMLInputElement)&&t.setAttribute("value",e.value)}function Ht(e,t){if(R(e,HTMLSelectElement)){const r=Array.from(t.children).find(a=>e.value===a.getAttribute("value"));r&&r.setAttribute("selected","")}}function $t(e,t,n){return R(t,Element)&&(Mt(e,t,n),jt(e,t,n),Dt(e,t),Ht(e,t)),t}async function Wt(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 i=n[s].getAttribute("xlink:href");if(i){const u=e.querySelector(i),f=document.querySelector(i);!u&&f&&!r[i]&&(r[i]=await ie(f,t,!0))}}const a=Object.values(r);if(a.length){const s="http://www.w3.org/1999/xhtml",o=document.createElementNS(s,"svg");o.setAttribute("xmlns",s),o.style.position="absolute",o.style.width="0",o.style.height="0",o.style.overflow="hidden",o.style.display="none";const i=document.createElementNS(s,"defs");o.appendChild(i);for(let u=0;u<a.length;u++)i.appendChild(a[u]);e.appendChild(o)}return e}async function ie(e,t,n){return!n&&t.filter&&!t.filter(e)?null:Promise.resolve(e).then(r=>It(r,t)).then(r=>Ft(e,r,t)).then(r=>$t(e,r,t)).then(r=>Wt(r,t))}const ze=/url\((['"]?)([^'"]+?)\1\)/g,Ut=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,Bt=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function Yt(e){const t=e.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${t})(['"]?\\))`,"g")}function Xt(e){const t=[];return e.replace(ze,(n,r,a)=>(t.push(a),n)),t.filter(n=>!me(n))}async function Jt(e,t,n,r,a){try{const s=n?yt(t,n):t,o=pe(t);let i;return a||(i=await he(s,o,r)),e.replace(Yt(t),`$1${i}$3`)}catch{}return e}function Zt(e,{preferredFontFormat:t}){return t?e.replace(Bt,n=>{for(;;){const[r,,a]=Ut.exec(n)||[];if(!a)return"";if(a===t)return`src: ${r};`}}):e}function Fe(e){return e.search(ze)!==-1}async function Me(e,t,n){if(!Fe(e))return e;const r=Zt(e,n);return Xt(r).reduce((s,o)=>s.then(i=>Jt(i,o,t,n)),Promise.resolve(r))}async function Y(e,t,n){var r;const a=(r=t.style)===null||r===void 0?void 0:r.getPropertyValue(e);if(a){const s=await Me(a,null,n);return t.style.setProperty(e,s,t.style.getPropertyPriority(e)),!0}return!1}async function Kt(e,t){await Y("background",e,t)||await Y("background-image",e,t),await Y("mask",e,t)||await Y("-webkit-mask",e,t)||await Y("mask-image",e,t)||await Y("-webkit-mask-image",e,t)}async function Qt(e,t){const n=R(e,HTMLImageElement);if(!(n&&!me(e.src))&&!(R(e,SVGImageElement)&&!me(e.href.baseVal)))return;const r=n?e.src:e.href.baseVal,a=await he(r,pe(r),t);await new Promise((s,o)=>{e.onload=s,e.onerror=t.onImageErrorHandler?(...u)=>{try{s(t.onImageErrorHandler(...u))}catch(f){o(f)}}:o;const i=e;i.decode&&(i.decode=s),i.loading==="lazy"&&(i.loading="eager"),n?(e.srcset="",e.src=a):e.href.baseVal=a})}async function qt(e,t){const r=F(e.childNodes).map(a=>De(a,t));await Promise.all(r).then(()=>e)}async function De(e,t){R(e,Element)&&(await Kt(e,t),await Qt(e,t),await qt(e,t))}function en(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 He={};async function $e(e){let t=He[e];if(t!=null)return t;const r=await(await fetch(e)).text();return t={url:e,cssText:r},He[e]=t,t}async function We(e,t){let n=e.cssText;const r=/url\(["']?([^"')]+)["']?\)/g,s=(n.match(/url\([^)]+\)/g)||[]).map(async o=>{let i=o.replace(r,"$1");return i.startsWith("https://")||(i=new URL(i,e.url).href),Le(i,t.fetchRequestInit,({result:u})=>(n=n.replace(o,`url(${u})`),[o,u]))});return Promise.all(s).then(()=>n)}function Ue(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 u=a.exec(r);if(u===null)break;t.push(u[0])}r=r.replace(a,"");const s=/@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi,o="((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})",i=new RegExp(o,"gi");for(;;){let u=s.exec(r);if(u===null){if(u=i.exec(r),u===null)break;s.lastIndex=i.lastIndex}else i.lastIndex=s.lastIndex;t.push(u[0])}return t}async function tn(e,t){const n=[],r=[];return e.forEach(a=>{if("cssRules"in a)try{F(a.cssRules||[]).forEach((s,o)=>{if(s.type===CSSRule.IMPORT_RULE){let i=o+1;const u=s.href,f=$e(u).then(h=>We(h,t)).then(h=>Ue(h).forEach(w=>{try{a.insertRule(w,w.startsWith("@import")?i+=1:a.cssRules.length)}catch(y){console.error("Error inserting rule from remote css",{rule:w,error:y})}})).catch(h=>{console.error("Error loading remote css",h.toString())});r.push(f)}})}catch(s){const o=e.find(i=>i.href==null)||document.styleSheets[0];a.href!=null&&r.push($e(a.href).then(i=>We(i,t)).then(i=>Ue(i).forEach(u=>{o.insertRule(u,o.cssRules.length)})).catch(i=>{console.error("Error loading remote stylesheet",i)})),console.error("Error inlining remote css file",s)}}),Promise.all(r).then(()=>(e.forEach(a=>{if("cssRules"in a)try{F(a.cssRules||[]).forEach(s=>{n.push(s)})}catch(s){console.error(`Error while reading CSS rules from ${a.href}`,s)}}),n))}function nn(e){return e.filter(t=>t.type===CSSRule.FONT_FACE_RULE).filter(t=>Fe(t.style.getPropertyValue("src")))}async function rn(e,t){if(e.ownerDocument==null)throw new Error("Provided element is not within a Document");const n=F(e.ownerDocument.styleSheets),r=await tn(n,t);return nn(r)}function Be(e){return e.trim().replace(/["']/g,"")}function sn(e){const t=new Set;function n(r){(r.style.fontFamily||getComputedStyle(r).fontFamily).split(",").forEach(s=>{t.add(Be(s))}),Array.from(r.children).forEach(s=>{s instanceof HTMLElement&&n(s)})}return n(e),t}async function an(e,t){const n=await rn(e,t),r=sn(e);return(await Promise.all(n.filter(s=>r.has(Be(s.style.fontFamily))).map(s=>{const o=s.parentStyleSheet?s.parentStyleSheet.href:null;return Me(s.cssText,o,t)}))).join(`
8
- `)}async function on(e,t){const n=t.fontEmbedCSS!=null?t.fontEmbedCSS:t.skipFonts?null:await an(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 cn(e,t={}){const{width:n,height:r}=Pe(e,t),a=await ie(e,t,!0);return await on(a,t),await De(a,t),en(a,t),await Et(a,n,r)}async function ln(e,t={}){const{width:n,height:r}=Pe(e,t),a=await cn(e,t),s=await oe(a),o=document.createElement("canvas"),i=o.getContext("2d"),u=t.pixelRatio||bt(),f=t.canvasWidth||n,h=t.canvasHeight||r;return o.width=f*u,o.height=h*u,t.skipAutoScale||St(o),o.style.width=`${f}`,o.style.height=`${h}`,t.backgroundColor&&(i.fillStyle=t.backgroundColor,i.fillRect(0,0,o.width,o.height)),i.drawImage(s,0,0,o.width,o.height),o}async function dn(e,t={}){return(await ln(e,t)).toDataURL("image/jpeg",t.quality||1)}const Ye=2147483647,ge=2e6,un=90,pn=100,mn=50,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)},gn=(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""}},yn=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},xn=(()=>{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}})(),wn=(e,t,n,r)=>new Promise(a=>{const s=new Image;s.onload=()=>{const o=document.createElement("canvas"),i=window.devicePixelRatio||1,u=t.width+n*2,f=t.height+n*2;o.width=u*i,o.height=f*i;const h=o.getContext("2d");if(h){h.scale(i,i);const w=(t.left+window.scrollX-n)*r,y=(t.top+window.scrollY-n)*r,S=u*r,V=f*r;h.drawImage(s,w,y,S,V,0,0,u,f)}a(o.toDataURL("image/png"))},s.onerror=()=>a(""),s.src=e}),vn=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]=xn(s)}),n},bn=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 o=s.displayName||s.name;o&&!o.includes("ViewGate")&&!r.includes(o)&&r.unshift(o)}a=a.return}return r.join(" > ")||"Generic Component"},ye=(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 o=ye(e,s);if(o)return o}}return null},Sn=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 o=0;s.innerText?.includes(e.text.slice(0,20))&&(o+=4),e.fingerprint?.classHash&&s.className.includes(e.fingerprint.classHash)&&(o+=2),e.fingerprint?.ariaLabel&&s.getAttribute("aria-label")===e.fingerprint.ariaLabel&&(o+=3),e.fingerprint?.role&&s.getAttribute("role")===e.fingerprint.role&&(o+=2),e.parentContext&&(s.parentElement?.innerText||"").includes(e.parentContext.slice(0,30))&&(o+=2),e.fingerprint?.neighborCount===s.parentElement?.children.length&&(o+=1),e.fingerprint?.parentTag===s.parentElement?.tagName.toLowerCase()&&(o+=1),o>r&&o>=5&&(r=o,n=s)}return n},Cn=e=>{let t=ye(e.selector);if(t)return t;if(e.fallbackSelectors){for(const n of e.fallbackSelectors)if(t=ye(n),t)return t}if(t=Sn(e),t)return t;if(e.metadata?.scrollPosition&&e.viewportSize){const n=(e.normalizedOffset?.x||.5)*window.innerWidth,r=(e.normalizedOffset?.y||.5)*window.innerHeight;if(t=document.elementFromPoint(n,r),t&&t.tagName.toLowerCase()===e.tag)return t}return null},xe=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}),En=e=>{const t=e.parentElement;if(!t)return;const n=Array.from(t.children).filter(o=>o!==e).slice(0,5).map(o=>xe(o)),r=Array.from(t.children),a=r.indexOf(e);let s="middle";return a===0&&(s="start"),a===r.length-1&&(s="end"),{target:{...xe(e),location:`${s} of ${t.tagName.toLowerCase()}`},parent:xe(t),siblings:n}},kn=e=>{let t="unknown:0",n=e;for(;n;){const h=n.getAttribute("data-source-path");if(h){t=h;break}n=n.parentElement}const r=bn(e),a=[],s=[],i=(h=>{const w=[];let y=h;for(;y&&y.nodeType===Node.ELEMENT_NODE;){let S=y.nodeName.toLowerCase();s.unshift(S);const V=y.id&&!y.id.startsWith("__")?y.id:null;V&&a.push(`#${V}`);const L=y.getAttribute("data-testid")||y.getAttribute("data-qa");L&&a.push(`[data-testid="${L}"]`);const I=y.getAttribute("aria-label"),T=y.getAttribute("role"),N=y.getAttribute("name");if(L){S=`[${y.hasAttribute("data-testid")?"data-testid":"data-qa"}="${L}"]`,w.unshift(S);break}else if(V){S="#"+V,w.unshift(S);break}else if(I){S=`${y.localName}[aria-label="${I}"]`,w.unshift(S);break}else if(T){S=`${y.localName}[role="${T}"]`,w.unshift(S);break}else if(N){S=`${y.localName}[name="${N}"]`,w.unshift(S);break}else{let E=y,$=1;for(;E.previousElementSibling;)E=E.previousElementSibling,E.nodeName.toLowerCase()===y.nodeName.toLowerCase()&&$++;$>1&&(S+=`:nth-of-type(${$})`)}w.unshift(S),y=y.parentElement}return w.join(" > ")})(e),u={};["placeholder","aria-label","name","type","alt","title","value","role"].forEach(h=>{const w=e.getAttribute(h);w&&(u[h]=w)});const f=`${e.tagName.toLowerCase()}-${(e.innerText||"").slice(0,20).replace(/\s+/g,"_")}-${i.split(" > ").slice(-1)}`;return{tag:e.tagName.toLowerCase(),id:e.id||"",classes:e.className||"",text:(e.innerText||"").slice(0,100).trim(),selector:i,outerHtml:e.outerHTML,parentContext:(e.parentElement?.innerText||"").slice(0,150).trim(),componentPath:r,signature:f,source:t,attributes:u,fallbackSelectors:[...new Set(a)].slice(0,5),domPath:s.slice(-10),viewportSize:{width:window.innerWidth,height:window.innerHeight},uiContext:En(e),fingerprint:yn(e),metadata:{hint:`Edit ${t.split(":")[0]} at line ${t.split(":")[1]||"?"}`,computedStyles:vn(e),viewportBreakpoint:fn(),outerHtml:e.outerHTML.slice(0,1500),scrollPosition:{x:window.scrollX,y:window.scrollY}}}},Xe=()=>{const{addToast:e,language:t,t:n,apiKey:r,baseUrl:a}=Ve(),[s,o]=m.useState(!1),[i,u]=m.useState(null),[f,h]=m.useState(null),[w,y]=m.useState(""),[S,V]=m.useState(!1),[L,I]=m.useState(!1),[T,N]=m.useState(!1),[E,$]=m.useState([]),[P,z]=m.useState(null),[Je,Ze]=m.useState(!1),[q,ce]=m.useState(!1),[ve,X]=m.useState({}),[M,ee]=m.useState(null),[J,Z]=m.useState(null),[te,ne]=m.useState(""),[le,de]=m.useState({}),l=m.useRef(null),p=m.useRef(null),v=m.useCallback(()=>{p.current||(p.current=requestAnimationFrame(()=>{const d={};E.forEach(g=>{if(!g.reference)return;const x=Cn(g.reference);if(x){const A=x.getBoundingClientRect();d[g._id]={top:A.top+window.scrollY,left:A.left+window.scrollX,width:A.width}}}),de(d),p.current=null}))},[E]),b=m.useCallback(async()=>{if(r){ce(!0);try{const d=await fetch(`${a}/api/annotations`,{headers:{"x-api-key":r}});if(d.ok){const g=await d.json();$(g.data||[])}}catch(d){console.error("Failed to fetch annotations",d)}finally{ce(!1)}}},[r,a]);m.useEffect(()=>{if(!s&&E.length>0){v();const d=new MutationObserver(()=>v()),g=new ResizeObserver(()=>v()),x=()=>v();return d.observe(document.documentElement,{childList:!0,subtree:!0,attributes:!0}),g.observe(document.documentElement),window.addEventListener("scroll",x,!0),()=>{d.disconnect(),g.disconnect(),window.removeEventListener("scroll",x,!0),p.current&&cancelAnimationFrame(p.current)}}},[s,E.length,v]),m.useEffect(()=>{b()},[b]),m.useEffect(()=>{l.current=document.getElementById("viewgate-shadow-host")},[]);const D=m.useCallback(d=>{if(!s||f)return;const g=document.elementFromPoint(d.clientX,d.clientY);if(!g||l.current?.contains(g)||g.closest(".vg-no-capture")){u(null);return}const x=g.getBoundingClientRect();u({tag:g.tagName.toLowerCase(),source:g.getAttribute("data-source-path")||"unknown:0",rect:x,element:g,previewText:(g.innerText||"").slice(0,100)||(g.getAttribute("placeholder")||"").slice(0,100)||g.tagName.toLowerCase(),semanticReference:{...kn(g),normalizedOffset:{x:(d.clientX-x.left)/x.width,y:(d.clientY-x.top)/x.height}}})},[s,f]),W=m.useCallback(async d=>{if(!s||f)return;const g=d.target;if(!(l.current?.contains(g)||g.closest(".vg-no-capture"))&&i){d.preventDefault(),d.stopPropagation(),I(!0);try{const x=i.element.getBoundingClientRect(),A=24,H=2,G=await dn(document.body,{quality:.95,pixelRatio:H,filter:re=>!l.current?.contains(re)}),k=await wn(G,x,A,H),Ke={...i.semanticReference,metadata:{...i.semanticReference.metadata,screenshotUrl:G,elementScreenshot:k}};h({...i,visualPreview:k,semanticReference:Ke})}catch(x){console.error("Failed to capture preview:",x),h(i)}finally{I(!1),u(null)}}},[s,i,f]);m.useEffect(()=>{const d=g=>{if(g.key==="Escape"){f?h(null):T?N(!1):s&&o(!1);return}const A=(()=>{let k=document.activeElement;for(;k&&k.shadowRoot&&k.shadowRoot.activeElement;)k=k.shadowRoot.activeElement;return k})();if(["input","textarea"].includes((A?.tagName||"").toLowerCase())||A?.isContentEditable)return;const G=g.key.toLowerCase();G==="c"&&!f&&!T&&o(k=>!k),G==="v"&&!f&&(N(k=>!k),T||o(!1))};return s&&!f?document.body.classList.add("vg-cursor-pointer"):document.body.classList.remove("vg-cursor-pointer"),window.addEventListener("keydown",d),window.addEventListener("mousemove",D,!0),window.addEventListener("click",W,!0),()=>{document.body.classList.remove("vg-cursor-pointer"),window.removeEventListener("keydown",d),window.removeEventListener("mousemove",D,!0),window.removeEventListener("click",W,!0)}},[s,f,T,D,W]);const C=async()=>{if(!f||!w.trim())return;V(!0);const{semanticReference:d}=f,[g,x]=(d.source||"").split(":"),A=x||"0";try{if(!(await fetch(`${a}/api/annotations`,{method:"POST",headers:{"Content-Type":"application/json","x-api-key":r},body:JSON.stringify({filePath:g,line:parseInt(A),url:window.location.href,message:w,componentName:d.componentPath||f.tag,reference:{...d,viewport:{width:window.innerWidth,height:window.innerHeight},userAgent:navigator.userAgent,timestamp:new Date().toISOString()}})})).ok)throw new Error("Backend failed");e(n.success,"success"),h(null),y(""),o(!1),b()}catch(H){console.error(H),e(n.error,"error")}finally{V(!1)}};return c.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:710",className:"vg-container",children:c.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:711",className:"vg-no-capture",children:[c.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:713",style:{position:"fixed",bottom:"30px",right:"30px",zIndex:Ye},id:"viewgate-ui",children:c.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:714",className:"vg-action-bar vg-animate-slide-up",style:{transition:"all 0.4s cubic-bezier(0.4, 0, 0.2, 1)"},children:[c.jsx("button",{onClick:()=>o(!s),className:"vg-button-primary vg-animate-pop",style:{padding:"12px 24px",background:s?"#ef4444":void 0},children:c.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:723",style:{display:"flex",alignItems:"center",gap:"10px"},children:[s?c.jsx(je,{"data-source-path":"/src/components/ViewGateOverlay.tsx:724",size:20,className:"vg-animate-pop"}):c.jsx(ue,{"data-source-path":"/src/components/ViewGateOverlay.tsx:724",size:20,className:"vg-animate-pop"}),c.jsx("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:725",children:s?n.exitMode:n.enterMode})]})}),E.length>0&&c.jsxs("button",{onClick:()=>{N(!T),o(!1),h(null)},className:"vg-button-ghost vg-animate-pop",style:{animationDelay:"0.1s"},children:[c.jsx(dt,{"data-source-path":"/src/components/ViewGateOverlay.tsx:738",size:20}),c.jsx("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:739",children:n.viewComments})]})]})}),L&&c.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:747",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:Ye+1,cursor:"wait"},children:c.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:753",className:"vg-glassmorphism",style:{padding:"30px 50px",display:"flex",flexDirection:"column",alignItems:"center",gap:"16px"},children:[c.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:754",className:"vg-spinner"}),c.jsx("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:755",style:{fontWeight:600,fontSize:"14px",color:"#1e293b"},children:"Capturando..."})]})}),s&&!f&&c.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:762",className:"vg-backdrop-blur",style:{opacity:1,clipPath:i?`polygon(
7
+ <%s key={someKey} {...props} />`,E,S,A,S),ne[S+E]=!0)}if(S=null,C!==void 0&&(n(C),S=""+C),i(h)&&(n(h.key),S=""+h.key),"key"in h){C={};for(var J in h)J!=="key"&&(C[J]=h[J])}else C=h;return S&&l(C,typeof c=="function"?c.displayName||c.name||"Unknown":c),u(c,S,C,a(),F,W)}function m(c){v(c)?c._store&&(c._store.validated=1):typeof c=="object"&&c!==null&&c.$$typeof===ge&&(c._payload.status==="fulfilled"?v(c._payload.value)&&c._payload.value._store&&(c._payload.value._store.validated=1):c._store&&(c._store.validated=1))}function v(c){return typeof c=="object"&&c!==null&&c.$$typeof===b}var y=f,b=Symbol.for("react.transitional.element"),T=Symbol.for("react.portal"),z=Symbol.for("react.fragment"),B=Symbol.for("react.strict_mode"),Y=Symbol.for("react.profiler"),j=Symbol.for("react.consumer"),P=Symbol.for("react.context"),k=Symbol.for("react.forward_ref"),Te=Symbol.for("react.suspense"),M=Symbol.for("react.suspense_list"),D=Symbol.for("react.memo"),ge=Symbol.for("react.lazy"),ct=Symbol.for("react.activity"),oe=Symbol.for("react.client.reference"),ee=y.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ye=Object.prototype.hasOwnProperty,xe=Array.isArray,H=console.createTask?console.createTask:function(){return null};y={react_stack_bottom_frame:function(c){return c()}};var te,X={},ie=y.react_stack_bottom_frame.bind(y,s)(),ce=H(r(s)),ne={};ae.Fragment=z,ae.jsx=function(c,h,C){var E=1e4>ee.recentlyCreatedOwnerStacks++;return w(c,h,C,!1,E?Error("react-stack-top-frame"):ie,E?H(r(c)):ce)},ae.jsxs=function(c,h,C){var E=1e4>ee.recentlyCreatedOwnerStacks++;return w(c,h,C,!0,E?Error("react-stack-top-frame"):ie,E?H(r(c)):ce)}})()),ae}var Ne;function pt(){return Ne||(Ne=1,process.env.NODE_ENV==="production"?ue.exports=dt():ue.exports=ut()),ue.exports}var o=pt();const mt=({children:e})=>{const t=f.useRef(null),[n,r]=f.useState(null);return f.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(l=>{(l.textContent?.includes(".vg-")||l.textContent?.includes("--vg-"))&&a.appendChild(l.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&&lt.createPortal(e,n)})};const Le=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();const ft=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const ht=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase());const Ie=e=>{const t=ht(e);return t.charAt(0).toUpperCase()+t.slice(1)};var gt={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 yt=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};const xt=f.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:a="",children:s,iconNode:i,...l},p)=>f.createElement("svg",{ref:p,...gt,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Le("lucide",a),...!s&&!yt(l)&&{"aria-hidden":"true"},...l},[...i.map(([u,w])=>f.createElement(u,w)),...Array.isArray(s)?s:[s]]));const N=(e,t)=>{const n=f.forwardRef(({className:r,...a},s)=>f.createElement(xt,{ref:s,iconNode:t,className:Le(`lucide-${ft(Ie(e))}`,`lucide-${e}`,r),...a}));return n.displayName=Ie(e),n};const wt=N("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 K=N("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);const ze=N("clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]]);const Me=N("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 vt=N("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 bt=N("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);const we=N("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 St=N("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 Ct=N("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 Et=N("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 kt=N("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 Fe=N("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 ve=N("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Rt={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"},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"}},De=f.createContext(void 0),He=()=>{const e=f.useContext(De);if(!e)throw new Error("useViewGate must be used within a ViewGateProvider");return e},be="viewgate_enabled",_t=()=>typeof window>"u"?!1:new URLSearchParams(window.location.search).has("viewgate")?(sessionStorage.setItem(be,"true"),!0):sessionStorage.getItem(be)==="true",jt=({children:e,language:t="es",apiKey:n,baseUrl:r="https://view-gate.vercel.app"})=>{const[a,s]=f.useState(!1),[i,l]=f.useState([]);f.useEffect(()=>{s(_t())},[]);const p=()=>{if(sessionStorage.removeItem(be),s(!1),typeof window<"u"){const m=new URL(window.location.href);m.searchParams.delete("viewgate"),window.history.replaceState({},"",m.toString())}},u=(m,v)=>{const y=Date.now();l(b=>[...b,{id:y,message:m,type:v}]),setTimeout(()=>{l(b=>b.filter(T=>T.id!==y))},4e3)},w=Rt[t];return o.jsxs(De.Provider,{"data-source-path":"/src/components/ViewGateProvider.tsx:244",value:{addToast:u,language:t,t:w,apiKey:n,baseUrl:r,disableViewGate:p,hasActiveToasts:i.length>0},children:[e,a&&o.jsx(mt,{"data-source-path":"/src/components/ViewGateProvider.tsx:255",children:o.jsxs("div",{"data-source-path":"/src/components/ViewGateProvider.tsx:256",className:"vg-container",children:[o.jsx(it,{"data-source-path":"/src/components/ViewGateProvider.tsx:257"}),o.jsx("div",{"data-source-path":"/src/components/ViewGateProvider.tsx:258",className:"vg-toasts",style:{zIndex:2147483646},children:i.map(m=>o.jsxs("div",{"data-source-path":"/src/components/ViewGateProvider.tsx:260",className:`vg-toast vg-animate-slide ${m.type}`,children:[m.type==="success"?o.jsx(K,{"data-source-path":"/src/components/ViewGateProvider.tsx:262",size:24,color:"#22c55e"}):o.jsx(wt,{"data-source-path":"/src/components/ViewGateProvider.tsx:264",size:24,color:"#ef4444"}),o.jsxs("div",{"data-source-path":"/src/components/ViewGateProvider.tsx:266",children:[o.jsx("strong",{"data-source-path":"/src/components/ViewGateProvider.tsx:267",style:{display:"block",fontSize:"13px",color:"#0f172a",textTransform:"uppercase",marginBottom:"2px"},children:m.type==="success"?w.successHeader:w.errorHeader}),o.jsx("span",{"data-source-path":"/src/components/ViewGateProvider.tsx:270",style:{fontSize:"14px",color:"#64748b"},children:m.message})]})]},m.id))})]})})]})};function Ot(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 Vt=(()=>{let e=0;const t=()=>`0000${(Math.random()*36**4<<0).toString(36)}`.slice(-4);return()=>(e+=1,`u${t()}${e}`)})();function U(e){const t=[];for(let n=0,r=e.length;n<r;n++)t.push(e[n]);return t}let Q=null;function We(e={}){return Q||(e.includeStyleProperties?(Q=e.includeStyleProperties,Q):(Q=U(window.getComputedStyle(document.documentElement)),Q))}function pe(e,t){const r=(e.ownerDocument.defaultView||window).getComputedStyle(e).getPropertyValue(t);return r?parseFloat(r.replace("px","")):0}function Tt(e){const t=pe(e,"border-left-width"),n=pe(e,"border-right-width");return e.clientWidth+t+n}function Pt(e){const t=pe(e,"border-top-width"),n=pe(e,"border-bottom-width");return e.clientHeight+t+n}function $e(e,t={}){const n=t.width||Tt(e),r=t.height||Pt(e);return{width:n,height:r}}function At(){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 L=16384;function Gt(e){(e.width>L||e.height>L)&&(e.width>L&&e.height>L?e.width>e.height?(e.height*=L/e.width,e.width=L):(e.width*=L/e.height,e.height=L):e.width>L?(e.height*=L/e.width,e.width=L):(e.width*=L/e.height,e.height=L))}function me(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 Nt(e){return Promise.resolve().then(()=>new XMLSerializer().serializeToString(e)).then(encodeURIComponent).then(t=>`data:image/svg+xml;charset=utf-8,${t}`)}async function Lt(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),Nt(a)}const V=(e,t)=>{if(e instanceof t)return!0;const n=Object.getPrototypeOf(e);return n===null?!1:n.constructor.name===t.name||V(n,t)};function It(e){const t=e.getPropertyValue("content");return`${e.cssText} content: '${t.replace(/'|"/g,"")}';`}function zt(e,t){return We(t).map(n=>{const r=e.getPropertyValue(n),a=e.getPropertyPriority(n);return`${n}: ${r}${a?" !important":""};`}).join(" ")}function Mt(e,t,n,r){const a=`.${e}:${t}`,s=n.cssText?It(n):zt(n,r);return document.createTextNode(`${a}{${s}}`)}function Ue(e,t,n,r){const a=window.getComputedStyle(e,n),s=a.getPropertyValue("content");if(s===""||s==="none")return;const i=Vt();try{t.className=`${t.className} ${i}`}catch{return}const l=document.createElement("style");l.appendChild(Mt(i,n,a,r)),t.appendChild(l)}function Ft(e,t,n){Ue(e,t,":before",n),Ue(e,t,":after",n)}const Be="application/font-woff",Ye="image/jpeg",Dt={woff:Be,woff2:Be,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:Ye,jpeg:Ye,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};function Ht(e){const t=/\.([^./]*?)$/g.exec(e);return t?t[1]:""}function Se(e){const t=Ht(e).toLowerCase();return Dt[t]||""}function Wt(e){return e.split(/,/)[1]}function Ce(e){return e.search(/^(data:)/)!==-1}function $t(e,t){return`data:${t};base64,${e}`}async function Xe(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 l=new FileReader;l.onerror=i,l.onloadend=()=>{try{s(n({res:r,result:l.result}))}catch(p){i(p)}},l.readAsDataURL(a)})}const Ee={};function Ut(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 ke(e,t,n){const r=Ut(e,t,n.includeQueryParams);if(Ee[r]!=null)return Ee[r];n.cacheBust&&(e+=(/\?/.test(e)?"&":"?")+new Date().getTime());let a;try{const s=await Xe(e,n.fetchRequestInit,({res:i,result:l})=>(t||(t=i.headers.get("Content-Type")||""),Wt(l)));a=$t(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 Ee[r]=a,a}async function Bt(e){const t=e.toDataURL();return t==="data:,"?e.cloneNode(!1):me(t)}async function Yt(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 l=s.toDataURL();return me(l)}const n=e.poster,r=Se(n),a=await ke(n,r,t);return me(a)}async function Xt(e,t){var n;try{if(!((n=e?.contentDocument)===null||n===void 0)&&n.body)return await fe(e.contentDocument.body,t,!0)}catch{}return e.cloneNode(!1)}async function Jt(e,t){return V(e,HTMLCanvasElement)?Bt(e):V(e,HTMLVideoElement)?Yt(e,t):V(e,HTMLIFrameElement)?Xt(e,t):e.cloneNode(Je(e))}const Zt=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SLOT",Je=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SVG";async function Kt(e,t,n){var r,a;if(Je(t))return t;let s=[];return Zt(e)&&e.assignedNodes?s=U(e.assignedNodes()):V(e,HTMLIFrameElement)&&(!((r=e.contentDocument)===null||r===void 0)&&r.body)?s=U(e.contentDocument.body.childNodes):s=U(((a=e.shadowRoot)!==null&&a!==void 0?a:e).childNodes),s.length===0||V(e,HTMLVideoElement)||await s.reduce((i,l)=>i.then(()=>fe(l,n)).then(p=>{p&&t.appendChild(p)}),Promise.resolve()),t}function Qt(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):We(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`),V(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 qt(e,t){V(e,HTMLTextAreaElement)&&(t.innerHTML=e.value),V(e,HTMLInputElement)&&t.setAttribute("value",e.value)}function en(e,t){if(V(e,HTMLSelectElement)){const r=Array.from(t.children).find(a=>e.value===a.getAttribute("value"));r&&r.setAttribute("selected","")}}function tn(e,t,n){return V(t,Element)&&(Qt(e,t,n),Ft(e,t,n),qt(e,t),en(e,t)),t}async function nn(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 l=n[s].getAttribute("xlink:href");if(l){const p=e.querySelector(l),u=document.querySelector(l);!p&&u&&!r[l]&&(r[l]=await fe(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 l=document.createElementNS(s,"defs");i.appendChild(l);for(let p=0;p<a.length;p++)l.appendChild(a[p]);e.appendChild(i)}return e}async function fe(e,t,n){return!n&&t.filter&&!t.filter(e)?null:Promise.resolve(e).then(r=>Jt(r,t)).then(r=>Kt(e,r,t)).then(r=>tn(e,r,t)).then(r=>nn(r,t))}const Ze=/url\((['"]?)([^'"]+?)\1\)/g,rn=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,sn=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function an(e){const t=e.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${t})(['"]?\\))`,"g")}function on(e){const t=[];return e.replace(Ze,(n,r,a)=>(t.push(a),n)),t.filter(n=>!Ce(n))}async function cn(e,t,n,r,a){try{const s=n?Ot(t,n):t,i=Se(t);let l;return a||(l=await ke(s,i,r)),e.replace(an(t),`$1${l}$3`)}catch{}return e}function ln(e,{preferredFontFormat:t}){return t?e.replace(sn,n=>{for(;;){const[r,,a]=rn.exec(n)||[];if(!a)return"";if(a===t)return`src: ${r};`}}):e}function Ke(e){return e.search(Ze)!==-1}async function Qe(e,t,n){if(!Ke(e))return e;const r=ln(e,n);return on(r).reduce((s,i)=>s.then(l=>cn(l,i,t,n)),Promise.resolve(r))}async function q(e,t,n){var r;const a=(r=t.style)===null||r===void 0?void 0:r.getPropertyValue(e);if(a){const s=await Qe(a,null,n);return t.style.setProperty(e,s,t.style.getPropertyPriority(e)),!0}return!1}async function dn(e,t){await q("background",e,t)||await q("background-image",e,t),await q("mask",e,t)||await q("-webkit-mask",e,t)||await q("mask-image",e,t)||await q("-webkit-mask-image",e,t)}async function un(e,t){const n=V(e,HTMLImageElement);if(!(n&&!Ce(e.src))&&!(V(e,SVGImageElement)&&!Ce(e.href.baseVal)))return;const r=n?e.src:e.href.baseVal,a=await ke(r,Se(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 l=e;l.decode&&(l.decode=s),l.loading==="lazy"&&(l.loading="eager"),n?(e.srcset="",e.src=a):e.href.baseVal=a})}async function pn(e,t){const r=U(e.childNodes).map(a=>qe(a,t));await Promise.all(r).then(()=>e)}async function qe(e,t){V(e,Element)&&(await dn(e,t),await un(e,t),await pn(e,t))}function mn(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 et={};async function tt(e){let t=et[e];if(t!=null)return t;const r=await(await fetch(e)).text();return t={url:e,cssText:r},et[e]=t,t}async function nt(e,t){let n=e.cssText;const r=/url\(["']?([^"')]+)["']?\)/g,s=(n.match(/url\([^)]+\)/g)||[]).map(async i=>{let l=i.replace(r,"$1");return l.startsWith("https://")||(l=new URL(l,e.url).href),Xe(l,t.fetchRequestInit,({result:p})=>(n=n.replace(i,`url(${p})`),[i,p]))});return Promise.all(s).then(()=>n)}function rt(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]*?)})",l=new RegExp(i,"gi");for(;;){let p=s.exec(r);if(p===null){if(p=l.exec(r),p===null)break;s.lastIndex=l.lastIndex}else l.lastIndex=s.lastIndex;t.push(p[0])}return t}async function fn(e,t){const n=[],r=[];return e.forEach(a=>{if("cssRules"in a)try{U(a.cssRules||[]).forEach((s,i)=>{if(s.type===CSSRule.IMPORT_RULE){let l=i+1;const p=s.href,u=tt(p).then(w=>nt(w,t)).then(w=>rt(w).forEach(m=>{try{a.insertRule(m,m.startsWith("@import")?l+=1:a.cssRules.length)}catch(v){console.error("Error inserting rule from remote css",{rule:m,error:v})}})).catch(w=>{console.error("Error loading remote css",w.toString())});r.push(u)}})}catch(s){const i=e.find(l=>l.href==null)||document.styleSheets[0];a.href!=null&&r.push(tt(a.href).then(l=>nt(l,t)).then(l=>rt(l).forEach(p=>{i.insertRule(p,i.cssRules.length)})).catch(l=>{console.error("Error loading remote stylesheet",l)})),console.error("Error inlining remote css file",s)}}),Promise.all(r).then(()=>(e.forEach(a=>{if("cssRules"in a)try{U(a.cssRules||[]).forEach(s=>{n.push(s)})}catch(s){console.error(`Error while reading CSS rules from ${a.href}`,s)}}),n))}function hn(e){return e.filter(t=>t.type===CSSRule.FONT_FACE_RULE).filter(t=>Ke(t.style.getPropertyValue("src")))}async function gn(e,t){if(e.ownerDocument==null)throw new Error("Provided element is not within a Document");const n=U(e.ownerDocument.styleSheets),r=await fn(n,t);return hn(r)}function st(e){return e.trim().replace(/["']/g,"")}function yn(e){const t=new Set;function n(r){(r.style.fontFamily||getComputedStyle(r).fontFamily).split(",").forEach(s=>{t.add(st(s))}),Array.from(r.children).forEach(s=>{s instanceof HTMLElement&&n(s)})}return n(e),t}async function xn(e,t){const n=await gn(e,t),r=yn(e);return(await Promise.all(n.filter(s=>r.has(st(s.style.fontFamily))).map(s=>{const i=s.parentStyleSheet?s.parentStyleSheet.href:null;return Qe(s.cssText,i,t)}))).join(`
8
+ `)}async function wn(e,t){const n=t.fontEmbedCSS!=null?t.fontEmbedCSS:t.skipFonts?null:await xn(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 vn(e,t={}){const{width:n,height:r}=$e(e,t),a=await fe(e,t,!0);return await wn(a,t),await qe(a,t),mn(a,t),await Lt(a,n,r)}async function bn(e,t={}){const{width:n,height:r}=$e(e,t),a=await vn(e,t),s=await me(a),i=document.createElement("canvas"),l=i.getContext("2d"),p=t.pixelRatio||At(),u=t.canvasWidth||n,w=t.canvasHeight||r;return i.width=u*p,i.height=w*p,t.skipAutoScale||Gt(i),i.style.width=`${u}`,i.style.height=`${w}`,t.backgroundColor&&(l.fillStyle=t.backgroundColor,l.fillRect(0,0,i.width,i.height)),l.drawImage(s,0,0,i.width,i.height),i}async function Sn(e,t={}){return(await bn(e,t)).toDataURL("image/jpeg",t.quality||1)}const he=2147483647,Re=he,_e=2e6,Cn=he-10,En=he-5,kn=he-15,Rn=()=>{const e=window.innerWidth;return e<768?"mobile":e<1024?"tablet":"desktop"},_n=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)},jn=(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""}},On=e=>{const t=(e.innerText||"").slice(0,30).trim(),n={tag:e.tagName.toLowerCase(),classHash:_n(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},Vn=(()=>{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}})(),Tn=(e,t,n,r)=>new Promise(a=>{const s=new Image;s.onload=()=>{const i=document.createElement("canvas"),l=window.devicePixelRatio||1,p=t.width+n*2,u=t.height+n*2;i.width=p*l,i.height=u*l;const w=i.getContext("2d");if(w){w.scale(l,l);const m=(t.left-n)*r,v=(t.top-n)*r,y=p*r,b=u*r;w.drawImage(s,m,v,y,b,0,0,p,u)}a(i.toDataURL("image/png"))},s.onerror=()=>a(""),s.src=e}),Pn=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]=Vn(s)}),n},An=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"},at=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)},je=(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=je(e,s);if(i)return i}}return null},ot=(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},Gn=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},Nn=e=>{let t=je(e.selector);if(t)return t;if(e.fallbackSelectors){for(const n of e.fallbackSelectors)if(t=je(n),t)return t}return t=Gn(e),t||null},Oe=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}),Ln=e=>{const t=e.parentElement;if(!t)return;const n=Array.from(t.children).filter(i=>i!==e).slice(0,5).map(i=>Oe(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:{...Oe(e),location:`${s} of ${t.tagName.toLowerCase()}`},parent:Oe(t),siblings:n}},In=e=>{let t="unknown:0",n=e;for(;n;){const m=n.getAttribute("data-source-path");if(m){t=m;break}n=n.parentElement}const r=An(e),a=[],s=[],i=m=>{const v=[];let y=m;for(;y&&y.nodeType===Node.ELEMENT_NODE;){let b=y.nodeName.toLowerCase();s.unshift(b);const T=y.id&&!y.id.startsWith("__")?y.id:null;T&&a.push(`#${T}`);const z=y.getAttribute("data-testid")||y.getAttribute("data-qa");z&&a.push(`[data-testid="${z}"]`);const B=y.getAttribute("aria-label"),Y=y.getAttribute("role"),j=y.getAttribute("name");if(z){b=`[${y.hasAttribute("data-testid")?"data-testid":"data-qa"}="${z}"]`,v.unshift(b);break}else if(T){b="#"+T,v.unshift(b);break}else if(B){b=`${y.localName}[aria-label="${B}"]`,v.unshift(b);break}else if(Y){b=`${y.localName}[role="${Y}"]`,v.unshift(b);break}else if(j){b=`${y.localName}[name="${j}"]`,v.unshift(b);break}else{let P=y,k=1;for(;P.previousElementSibling;)P=P.previousElementSibling,P.nodeName.toLowerCase()===y.nodeName.toLowerCase()&&k++;k>1&&(b+=`:nth-of-type(${k})`)}v.unshift(b),y=y.parentElement}return v.join(" > ")},l=!!(e.closest('[role="dialog"]')||e.closest('[aria-modal="true"]')||e.closest(".modal")||e.closest(".modal-content")),p=i(e),u={};["placeholder","aria-label","name","type","alt","title","value","role"].forEach(m=>{const v=e.getAttribute(m);v&&(u[m]=v)});const w=`${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:w,source:t,attributes:u,fallbackSelectors:[...new Set(a)].slice(0,5),domPath:s.slice(-10),viewportSize:{width:window.innerWidth,height:window.innerHeight},uiContext:Ln(e),fingerprint:On(e),metadata:{hint:`Edit ${t.split(":")[0]} at line ${t.split(":")[1]||"?"}`,computedStyles:Pn(e),viewportBreakpoint:Rn(),outerHtml:e.outerHTML.slice(0,1500),scrollPosition:{x:window.scrollX,y:window.scrollY},isModal:l}}},it=()=>{const{addToast:e,language:t,t:n,apiKey:r,baseUrl:a,disableViewGate:s,hasActiveToasts:i}=He(),[l,p]=f.useState(!1),[u,w]=f.useState(null),[m,v]=f.useState(null),[y,b]=f.useState(""),[T,z]=f.useState(!1),[B,Y]=f.useState(!1),[j,P]=f.useState(!1),[k,Te]=f.useState([]),[M,D]=f.useState(null),[ge,ct]=f.useState(!1),[oe,ee]=f.useState(!1),[ye,xe]=f.useState({}),[H,te]=f.useState(null),[X,ie]=f.useState(!1),[ce,ne]=f.useState(null),[c,h]=f.useState(""),[C,E]=f.useState({}),F=f.useRef(null),W=f.useRef(null),S=f.useCallback(()=>{W.current||(W.current=requestAnimationFrame(()=>{const d={},g=Array.from(document.querySelectorAll('[role="dialog"], [aria-modal="true"], .modal')).find(O=>at(O)),$=!!g;k.forEach(O=>{if(!O.reference)return;const _=Nn(O.reference),R=!!O.reference.metadata?.isModal;if(_&&at(_)){let Z=!1;if($?Z=g.contains(_):Z=!R,!Z)return;const I=_.getBoundingClientRect(),de=I.left+I.width/2,re=I.top+I.height/2;if(de>=0&&de<=window.innerWidth&&re>=0&&re<=window.innerHeight){const Pe=document.elementFromPoint(de,re);if(Pe&&!_.contains(Pe)&&!F.current?.contains(Pe))return}d[O._id]={top:I.top+window.scrollY,left:I.left+window.scrollX,width:I.width,isModal:R}}}),E(d),W.current=null}))},[k]),A=f.useCallback(async()=>{if(r){ee(!0);try{const d=await fetch(`${a}/api/annotations`,{headers:{"x-api-key":r}});if(d.ok){const x=await d.json();Te(x.data||[])}}catch(d){console.error("Failed to fetch annotations",d)}finally{ee(!1)}}},[r,a]);f.useEffect(()=>{j&&k.length===0&&!oe&&P(!1)},[j,k.length,oe]),f.useEffect(()=>{if(!l&&k.length>0){S();const d=new MutationObserver(()=>S()),x=new ResizeObserver(()=>S()),g=()=>S();return d.observe(document.documentElement,{childList:!0,subtree:!0,attributes:!0}),x.observe(document.documentElement),window.addEventListener("scroll",g,!0),()=>{d.disconnect(),x.disconnect(),window.removeEventListener("scroll",g,!0),W.current&&cancelAnimationFrame(W.current)}}},[l,k.length,S]),f.useEffect(()=>{A()},[A]),f.useEffect(()=>{F.current=document.getElementById("viewgate-shadow-host")},[]);const J=f.useCallback(d=>{if(!l||m)return;const x=ot(d.clientX,d.clientY);if(!x||F.current?.contains(x)||x.closest(".vg-no-capture")){w(null);return}const g=x.getBoundingClientRect();w({tag:x.tagName.toLowerCase(),source:x.getAttribute("data-source-path")||"unknown:0",rect:g,element:x,previewText:(x.innerText||"").slice(0,100)||(x.getAttribute("placeholder")||"").slice(0,100)||x.tagName.toLowerCase(),semanticReference:{...In(x),normalizedOffset:{x:(d.clientX-g.left)/g.width,y:(d.clientY-g.top)/g.height}}})},[l,m]),le=f.useCallback(async d=>{if(!l||m)return;const x=ot(d.clientX,d.clientY);if(!(!x||F.current?.contains(x)||x.closest(".vg-no-capture"))&&u){d.preventDefault(),d.stopPropagation(),Y(!0);try{const g=u.element.getBoundingClientRect(),$=24,O=2,_=await Sn(document.body,{quality:.9,pixelRatio:O,width:window.innerWidth,height:window.innerHeight,style:{transform:`scale(${1/window.devicePixelRatio}) translate(-${window.scrollX}px, -${window.scrollY}px)`,transformOrigin:"top left"},filter:de=>{const re=de;return!(F.current?.contains(re)||re.id==="viewgate-ui")}}),R=u.element.getBoundingClientRect(),Z=await Tn(_,R,$,O),I={...u.semanticReference,metadata:{...u.semanticReference.metadata,screenshotUrl:_,elementScreenshot:Z}};v({...u,visualPreview:Z,semanticReference:I})}catch(g){console.error("Failed to capture preview:",g),v(u)}finally{Y(!1),w(null)}}},[l,u,m]);f.useEffect(()=>{const d=x=>{if(x.key==="Escape"){m?v(null):j?P(!1):l&&p(!1);return}const $=(()=>{let R=document.activeElement;for(;R&&R.shadowRoot&&R.shadowRoot.activeElement;)R=R.shadowRoot.activeElement;return R})();if(["input","textarea"].includes(($?.tagName||"").toLowerCase())||$?.isContentEditable)return;const _=x.key.toLowerCase();_==="c"&&!m&&!j&&p(R=>!R),_==="v"&&!m&&(k.length>0||j)&&(P(R=>!R),j||p(!1))};return l&&!m?document.body.classList.add("vg-cursor-pointer"):document.body.classList.remove("vg-cursor-pointer"),window.addEventListener("keydown",d),window.addEventListener("mousemove",J,!0),window.addEventListener("click",le,!0),()=>{document.body.classList.remove("vg-cursor-pointer"),window.removeEventListener("keydown",d),window.removeEventListener("mousemove",J,!0),window.removeEventListener("click",le,!0)}},[l,m,j,k,J,le]);const Fn=async()=>{if(!m||!y.trim())return;z(!0);const{semanticReference:d}=m,[x,g]=(d.source||"").split(":"),$=g||"0";try{if(!(await fetch(`${a}/api/annotations`,{method:"POST",headers:{"Content-Type":"application/json","x-api-key":r},body:JSON.stringify({filePath:x,line:parseInt($),url:window.location.href,message:y,componentName:d.componentPath||m.tag,reference:{...d,viewport:{width:window.innerWidth,height:window.innerHeight},userAgent:navigator.userAgent,timestamp:new Date().toISOString()}})})).ok)throw new Error("Backend failed");e(n.success,"success"),v(null),b(""),p(!1),A()}catch(O){console.error(O),e(n.error,"error")}finally{z(!1)}};return o.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:806",className:"vg-container",children:o.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:807",className:"vg-no-capture",children:[!i&&o.jsx("button",{onClick:d=>{d.stopPropagation(),s()},title:"Cerrar ViewGate",style:{position:"fixed",top:"24px",right:"24px",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)",zIndex:Re+10},onMouseEnter:d=>{d.currentTarget.style.transform="scale(1.1) rotate(90deg)",d.currentTarget.style.color="#ef4444",d.currentTarget.style.backgroundColor="white"},onMouseLeave:d=>{d.currentTarget.style.transform="scale(1) rotate(0deg)",d.currentTarget.style.color="#64748b",d.currentTarget.style.backgroundColor="rgba(255, 255, 255, 0.9)"},children:o.jsx(ve,{"data-source-path":"/src/components/ViewGateOverlay.tsx:846",size:20,strokeWidth:2.5})}),o.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:851",style:{position:"fixed",bottom:"30px",right:"30px",zIndex:Re},id:"viewgate-ui",children:o.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:852",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(!l),className:"vg-button-primary vg-animate-pop",style:{padding:"12px 24px",background:l?"#ef4444":void 0},children:o.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:861",style:{display:"flex",alignItems:"center",gap:"10px"},children:[l?o.jsx(ve,{"data-source-path":"/src/components/ViewGateOverlay.tsx:862",size:20,className:"vg-animate-pop"}):o.jsx(we,{"data-source-path":"/src/components/ViewGateOverlay.tsx:862",size:20,className:"vg-animate-pop"}),o.jsx("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:863",children:l?n.exitMode:n.enterMode})]})}),k.length>0&&o.jsxs("button",{onClick:()=>{P(!j),p(!1),v(null)},className:"vg-button-ghost vg-animate-pop",style:{animationDelay:"0.1s"},children:[o.jsx(vt,{"data-source-path":"/src/components/ViewGateOverlay.tsx:876",size:20}),o.jsx("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:877",children:n.viewComments})]})]})}),B&&o.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:885",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:Re+1,cursor:"wait"},children:o.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:891",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:892",className:"vg-spinner"}),o.jsx("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:893",style:{fontWeight:600,fontSize:"14px",color:"#1e293b"},children:"Capturando..."})]})}),l&&!m&&o.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:900",className:"vg-backdrop-blur",style:{opacity:1,clipPath:u?`polygon(
9
9
  0% 0%, 0% 100%, 100% 100%, 100% 0%, 0% 0%,
10
- ${i.rect.left}px ${i.rect.top}px,
11
- ${i.rect.right}px ${i.rect.top}px,
12
- ${i.rect.right}px ${i.rect.bottom}px,
13
- ${i.rect.left}px ${i.rect.bottom}px,
14
- ${i.rect.left}px ${i.rect.top}px
15
- )`:"none",zIndex:un}}),s&&i&&!f&&!L&&c.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:781",className:"vg-selection-pulse",style:{top:i.rect.top-4,left:i.rect.left-4,width:i.rect.width+8,height:i.rect.height+8,zIndex:pn},children:c.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:791",className:"vg-selection-label",style:{...i.rect.top<60?i.rect.bottom>window.innerHeight-60?{top:"8px",bottom:"auto"}:{top:"100%",marginTop:"8px",bottom:"auto"}:{top:"-40px",bottom:"auto"},...i.rect.left+200>window.innerWidth?{left:"auto",right:"0"}:{left:"0",right:"auto"}},children:[c.jsx(ut,{"data-source-path":"/src/components/ViewGateOverlay.tsx:807",size:16}),c.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:808",style:{display:"flex",flexDirection:"column"},children:[c.jsx("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:809",style:{fontWeight:700},children:n.selectToComment}),c.jsxs("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:810",style:{fontSize:"10px",opacity:.8,fontFamily:"monospace"},children:[Math.round(i.rect.width)," × ",Math.round(i.rect.height)]})]})]})}),f&&c.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:820",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:c.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:825",className:"vg-glassmorphism vg-animate-slide",style:{padding:"40px",width:"500px",boxShadow:"0 25px 50px -12px rgba(0, 0, 0, 0.25)"},children:[c.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:829",style:{textAlign:"center",marginBottom:"32px"},children:[c.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:830",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:c.jsx(ue,{"data-source-path":"/src/components/ViewGateOverlay.tsx:835",size:24})}),c.jsx("h2",{"data-source-path":"/src/components/ViewGateOverlay.tsx:837",style:{margin:"0 0 8px 0",fontSize:"24px",fontWeight:800,color:"#0f172a"},children:n.feedbackHeader}),c.jsx("p",{"data-source-path":"/src/components/ViewGateOverlay.tsx:838",style:{margin:0,color:"#64748b",fontSize:"15px"},children:n.feedbackSubheader})]}),f.visualPreview&&c.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:842",style:{marginBottom:"24px",borderRadius:"12px",overflow:"hidden",border:"1px solid #e2e8f0",background:"#f8fafc"},children:c.jsx("img",{src:f.visualPreview,alt:"Preview",style:{maxWidth:"100%",maxHeight:"200px",objectFit:"contain",display:"block",margin:"0 auto"}})}),c.jsx("textarea",{className:"vg-textarea",value:w,onChange:d=>y(d.target.value),rows:4,placeholder:n.placeholder,autoFocus:!0,style:{fontSize:"15px",padding:"16px",marginBottom:"24px"}}),c.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:861",style:{display:"flex",gap:"12px"},children:[c.jsx("button",{onClick:()=>h(null),className:"vg-button-ghost",style:{flex:1,padding:"12px"},children:n.cancel}),c.jsx("button",{onClick:C,className:"vg-button-primary",disabled:S||!w.trim(),style:{flex:2},children:c.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:875",style:{display:"flex",alignItems:"center",gap:"8px"},children:[S?c.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:876",className:"vg-spinner",style:{width:"16px",height:"16px",borderWidth:"2px"}}):c.jsx(ft,{"data-source-path":"/src/components/ViewGateOverlay.tsx:876",size:18}),c.jsx("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:877",children:S?n.submitting:n.sendFeedback||"Send Comment"})]})})]})]})}),T&&c.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:887",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:c.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:892",className:"vg-glassmorphism vg-animate-slide",style:{padding:"32px",width:"650px",maxHeight:"85vh",display:"flex",flexDirection:"column"},children:[c.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:896",style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:"20px"},children:[c.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:897",style:{display:"flex",alignItems:"center",gap:"12px"},children:[c.jsx("h2",{"data-source-path":"/src/components/ViewGateOverlay.tsx:898",style:{margin:0,fontSize:"20px",fontWeight:800,color:"#0f172a"},children:M?n.commentDetails:n.annotations}),!M&&c.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:902",className:"vg-badge",style:{background:"#e0e7ff",color:"#6366f1"},children:E.length})]}),c.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:907",style:{display:"flex",gap:"8px"},children:[M&&c.jsx("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:909",className:"vg-button-ghost",style:{padding:"6px 14px",fontSize:"12px"},onClick:()=>ee(null),children:n.viewAll||"View All"}),c.jsx("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:917",className:"vg-button-ghost",style:{padding:"8px",borderRadius:"50%"},onClick:()=>{N(!1),ee(null)},children:c.jsx(je,{"data-source-path":"/src/components/ViewGateOverlay.tsx:922",size:20})})]})]}),c.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:927",style:{maxHeight:"60vh",overflowY:"auto",paddingRight:"10px"},className:"vg-custom-scrollbar",children:q?c.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:929",style:{display:"flex",justifyContent:"center",padding:"40px"},children:c.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:930",className:"vg-spinner"})}):(M?E.filter(d=>d._id===M):E).map((d,g)=>c.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:934",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:`${g*.05}s`},children:[c.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:945",style:{display:"flex",justifyContent:"space-between",marginBottom:"16px",alignItems:"center"},children:c.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:946",style:{display:"flex",gap:"12px",alignItems:"center"},children:[d.status==="ready_for_review"?c.jsxs("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:948",className:"vg-badge",style:{backgroundColor:"#f0fdf4",color:"#16a34a"},children:[c.jsx(U,{"data-source-path":"/src/components/ViewGateOverlay.tsx:949",size:14})," ",n.readyForReview]}):c.jsxs("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:952",className:"vg-badge",style:{backgroundColor:"#fff7ed",color:"#ea580c"},children:[c.jsx(Re,{"data-source-path":"/src/components/ViewGateOverlay.tsx:953",size:14})," ",n.pending]}),c.jsx("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:956",style:{fontSize:"12px",color:"#94a3b8"},children:gn(d.timestamp||d.createdAt||d.reference?.timestamp,t)})]})}),J===d._id?c.jsx("textarea",{className:"vg-textarea",value:te,onChange:x=>ne(x.target.value),rows:3,autoFocus:!0,style:{marginBottom:"16px"}}):c.jsx("p",{"data-source-path":"/src/components/ViewGateOverlay.tsx:972",style:{margin:"0 0 20px 0",fontSize:"16px",color:"#1e293b",lineHeight:1.6},children:d.message}),c.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:975",style:{display:"flex",gap:"12px",justifyContent:"flex-end",borderTop:"1px solid #f1f5f9",paddingTop:"16px"},children:J===d._id?c.jsxs(c.Fragment,{children:[c.jsx("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:978",className:"vg-button-primary vg-animate-pop",style:{padding:"8px 16px",fontSize:"13px"},onClick:async()=>{try{(await fetch(`${a}/api/annotations/${d._id}`,{method:"PATCH",headers:{"Content-Type":"application/json","x-api-key":r},body:JSON.stringify({message:te})})).ok&&(Z(null),b(),e(n.updateSuccess,"success"))}catch{e(n.error,"error")}},children:n.save}),c.jsx("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1000",className:"vg-button-ghost vg-animate-pop",style:{padding:"8px 16px",fontSize:"13px"},onClick:()=>Z(null),children:n.cancel})]}):c.jsxs(c.Fragment,{children:[c.jsxs("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1004",className:"vg-button-ghost vg-animate-pop",style:{padding:"8px 16px",fontSize:"13px"},onClick:()=>{Z(d._id),ne(d.message)},children:[c.jsx(pt,{"data-source-path":"/src/components/ViewGateOverlay.tsx:1012",size:14})," ",n.edit]}),c.jsxs("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1014",className:"vg-button-ghost vg-animate-pop",style:{padding:"8px 16px",fontSize:"13px",animationDelay:"0.05s"},onClick:()=>{d.url&&(window.location.href=d.url)},children:[c.jsx(lt,{"data-source-path":"/src/components/ViewGateOverlay.tsx:1021",size:14})," ",n.review]}),d.status==="pending"?c.jsxs("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1024",className:"vg-button-primary vg-animate-pop",style:{padding:"8px 16px",fontSize:"13px",animationDelay:"0.1s"},onClick:()=>{z({title:n.markReadyConfirm,message:n.confirmMarkReady,type:"success",onConfirm:async()=>{try{(await fetch(`${a}/api/annotations/${d._id}`,{method:"PATCH",headers:{"Content-Type":"application/json","x-api-key":r},body:JSON.stringify({status:"ready_for_review"})})).ok&&(b(),e(n.updateSuccess,"success"))}catch{e(n.error,"error")}finally{z(null)}}})},children:[c.jsx(U,{"data-source-path":"/src/components/ViewGateOverlay.tsx:1052",size:14})," ",n.markReady]}):c.jsxs("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1055",className:"vg-button-ghost vg-animate-pop",style:{padding:"8px 16px",fontSize:"13px",animationDelay:"0.1s"},onClick:()=>{z({title:n.reopenConfirm,message:n.confirmReopen,type:"success",onConfirm:async()=>{try{(await fetch(`${a}/api/annotations/${d._id}`,{method:"PATCH",headers:{"Content-Type":"application/json","x-api-key":r},body:JSON.stringify({status:"pending"})})).ok&&(b(),e(n.updateSuccess,"success"))}catch{e(n.error,"error")}finally{z(null)}}})},children:[c.jsx(mt,{"data-source-path":"/src/components/ViewGateOverlay.tsx:1083",size:14})," ",n.reopen]}),c.jsx("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1086",className:"vg-button-ghost vg-animate-pop",style:{padding:"8px 12px",color:"#ef4444",borderColor:"#fee2e2",animationDelay:"0.15s"},onClick:()=>{z({title:n.deleteConfirm,message:n.confirmDelete,type:"danger",onConfirm:async()=>{try{(await fetch(`${a}/api/annotations/${d._id}`,{method:"DELETE",headers:{"x-api-key":r}})).ok&&(b(),e(n.deleteSuccess,"success"))}catch{e(n.error,"error")}finally{z(null)}}})},children:c.jsx(_e,{"data-source-path":"/src/components/ViewGateOverlay.tsx:1113",size:16})})]})})]},d._id))})]})}),P&&c.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1128",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+1},children:c.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1133",className:"vg-glassmorphism vg-animate-slide",style:{padding:"32px",width:"400px",textAlign:"center"},children:[c.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1134",style:{width:"48px",height:"48px",background:P.type==="danger"?"#fee2e2":"#e0e7ff",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",margin:"0 auto 20px",color:P.type==="danger"?"#ef4444":"#6366f1"},children:P.type==="danger"?c.jsx(_e,{"data-source-path":"/src/components/ViewGateOverlay.tsx:1142",size:24}):c.jsx(U,{"data-source-path":"/src/components/ViewGateOverlay.tsx:1142",size:24})}),c.jsx("h3",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1144",style:{margin:"0 0 8px 0",fontSize:"18px",fontWeight:800,color:"#0f172a"},children:P.title}),c.jsx("p",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1145",style:{margin:"0 0 24px 0",fontSize:"14px",color:"#64748b",lineHeight:1.5},children:P.message}),c.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1146",style:{display:"flex",gap:"12px"},children:[c.jsx("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1147",className:"vg-button-ghost",style:{flex:1},onClick:()=>z(null),children:n.no}),c.jsx("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1148",className:"vg-button-primary",style:{flex:1,backgroundColor:P.type==="danger"?"#ef4444":void 0,backgroundImage:P.type==="danger"?"none":void 0},onClick:P.onConfirm,children:n.yes})]})]})}),!s&&E.map((d,g)=>{const x=le[d._id];if(!x)return null;const H=E.slice(0,g).filter(G=>G.reference?.selector&&G.reference.selector===d.reference?.selector).length*34;return c.jsxs("div",{className:"vg-pin-container vg-animate-pop",style:{position:"fixed",top:x.top-20-window.scrollY,left:x.left+x.width/2-16+H-window.scrollX,cursor:"pointer",animationDelay:`${g*.08}s`,transition:"all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275)",zIndex:mn-g},onMouseEnter:G=>{const k=G.currentTarget.getBoundingClientRect();window.innerHeight-k.bottom<180?X(re=>({...re,[d._id]:"vg-top"})):X(re=>({...re,[d._id]:""}))},onClick:()=>{N(!0),ee(d._id)},children:[c.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1203",className:`vg-pin-tooltip ${ve[d._id]||""}`,children:[c.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1204",style:{display:"flex",alignItems:"center",gap:"8px",marginBottom:"8px"},children:d.status==="ready_for_review"?c.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1206",style:{display:"flex",alignItems:"center",gap:"6px",color:"#16a34a",fontWeight:700,fontSize:"11px"},children:[c.jsx(U,{"data-source-path":"/src/components/ViewGateOverlay.tsx:1207",size:12})," ",n.readyForReview]}):c.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1210",style:{display:"flex",alignItems:"center",gap:"6px",color:"#ea580c",fontWeight:700,fontSize:"11px"},children:[c.jsx(Re,{"data-source-path":"/src/components/ViewGateOverlay.tsx:1211",size:12})," ",n.pending]})}),c.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1215",style:{fontWeight:500,color:"#1e293b",lineHeight:1.4},children:d.message})]}),c.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1218",className:`vg-formal-pin ${d.status==="ready_for_review"?"ready":""}`,children:d.status==="ready_for_review"?c.jsx(U,{"data-source-path":"/src/components/ViewGateOverlay.tsx:1219",size:18}):c.jsx(ue,{"data-source-path":"/src/components/ViewGateOverlay.tsx:1219",size:16})})]},`pin-${d._id}`)})]})})};function we(e,t,n){if(!t.endsWith(".tsx")&&!t.endsWith(".jsx")||t.includes("node_modules"))return e;const r=i=>i.replace(/\\/g,"/"),a=r(t).replace(r(n),"");return e.split(`
16
- `).map((i,u)=>{const f=u+1;return i.replace(/(^|[^a-zA-Z0-9])<([a-zA-Z][a-zA-Z0-9\.]*)(?=[ \t\n\/\>])/g,(h,w,y)=>h.includes("data-source-path")||y==="Fragment"||y==="React.Fragment"?h:`${w}<${y} data-source-path="${a}:${f}"`)}).join(`
17
- `)}function Rn(){return{name:"vite-plugin-viewgate",enforce:"pre",transform(e,t){return{code:we(e,t,process.cwd()),map:null}}}}function _n(e){const t=this.resourcePath;return t?(process.env.NODE_ENV,we(e,t,process.cwd())):e}_.ViewGate=gt,_.ViewGateOverlay=Xe,_.transformSourcePaths=we,_.useViewGate=Ve,_.viewgateNextLoader=_n,_.viewgatePlugin=Rn,Object.defineProperty(_,Symbol.toStringTag,{value:"Module"})}));
10
+ ${u.rect.left}px ${u.rect.top}px,
11
+ ${u.rect.right}px ${u.rect.top}px,
12
+ ${u.rect.right}px ${u.rect.bottom}px,
13
+ ${u.rect.left}px ${u.rect.bottom}px,
14
+ ${u.rect.left}px ${u.rect.top}px
15
+ )`:"none",zIndex:Cn}}),l&&u&&!m&&!B&&o.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:919",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:En},children:o.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:929",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(St,{"data-source-path":"/src/components/ViewGateOverlay.tsx:945",size:16}),o.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:946",style:{display:"flex",flexDirection:"column"},children:[o.jsx("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:947",style:{fontWeight:700},children:n.selectToComment}),o.jsxs("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:948",style:{fontSize:"10px",opacity:.8,fontFamily:"monospace"},children:[Math.round(u.rect.width)," × ",Math.round(u.rect.height)]})]})]})}),m&&o.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:958",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:_e},children:o.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:963",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:967",style:{textAlign:"center",marginBottom:"32px"},children:[o.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:968",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(we,{"data-source-path":"/src/components/ViewGateOverlay.tsx:973",size:24})}),o.jsx("h2",{"data-source-path":"/src/components/ViewGateOverlay.tsx:975",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:976",style:{margin:0,color:"#64748b",fontSize:"15px"},children:n.feedbackSubheader})]}),m.visualPreview&&o.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:980",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:m.visualPreview,alt:"Preview",style:{maxWidth:"100%",maxHeight:"200px",objectFit:"contain",display:"block"}})}),o.jsx("textarea",{className:"vg-textarea",value:y,onChange:d=>b(d.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:1007",style:{display:"flex",gap:"12px"},children:[o.jsx("button",{onClick:()=>!T&&v(null),className:"vg-button-ghost",disabled:T,style:{flex:1,padding:"12px"},children:n.cancel}),o.jsx("button",{onClick:Fn,className:"vg-button-primary",disabled:T||!y.trim(),style:{flex:2},children:o.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1022",style:{display:"flex",alignItems:"center",gap:"8px"},children:[T?o.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1023",className:"vg-spinner",style:{width:"16px",height:"16px",borderWidth:"2px"}}):o.jsx(kt,{"data-source-path":"/src/components/ViewGateOverlay.tsx:1023",size:18}),o.jsx("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1024",children:T?n.submitting:n.sendFeedback||"Send Comment"})]})})]})]})}),j&&o.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1034",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:_e},children:o.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1039",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:1043",style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:"20px"},children:[o.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1044",style:{display:"flex",alignItems:"center",gap:"12px"},children:[o.jsx("h2",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1045",style:{margin:0,fontSize:"20px",fontWeight:800,color:"#0f172a"},children:H?n.commentDetails:n.annotations}),!H&&o.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1049",className:"vg-badge",style:{background:"#e0e7ff",color:"#6366f1"},children:k.length})]}),o.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1054",style:{display:"flex",gap:"8px"},children:[H&&o.jsx("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1056",className:"vg-button-ghost",style:{padding:"6px 14px",fontSize:"12px"},onClick:()=>te(null),children:n.viewAll||"View All"}),o.jsx("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1064",className:"vg-button-ghost",style:{padding:"8px",borderRadius:"50%"},onClick:()=>{P(!1),te(null)},children:o.jsx(ve,{"data-source-path":"/src/components/ViewGateOverlay.tsx:1069",size:20})})]})]}),o.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1074",style:{maxHeight:"60vh",overflowY:"auto",paddingRight:"10px"},className:"vg-custom-scrollbar",children:oe?o.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1076",style:{display:"flex",justifyContent:"center",padding:"40px"},children:o.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1077",className:"vg-spinner"})}):(H?k.filter(d=>d._id===H):k).map((d,x)=>o.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1081",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:`${x*.05}s`},children:[o.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1092",style:{display:"flex",justifyContent:"space-between",marginBottom:"16px",alignItems:"center"},children:o.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1093",style:{display:"flex",gap:"12px",alignItems:"center"},children:[d.status==="ready_for_review"?o.jsxs("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1095",className:"vg-badge",style:{backgroundColor:"#f0fdf4",color:"#16a34a"},children:[o.jsx(K,{"data-source-path":"/src/components/ViewGateOverlay.tsx:1096",size:14})," ",n.readyForReview]}):o.jsxs("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1099",className:"vg-badge",style:{backgroundColor:"#fff7ed",color:"#ea580c"},children:[o.jsx(ze,{"data-source-path":"/src/components/ViewGateOverlay.tsx:1100",size:14})," ",n.pending]}),o.jsx("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1103",style:{fontSize:"12px",color:"#94a3b8"},children:jn(d.timestamp||d.createdAt||d.reference?.timestamp,t)})]})}),ce===d._id?o.jsx("textarea",{className:"vg-textarea",value:c,onChange:g=>h(g.target.value),rows:3,autoFocus:!0,style:{marginBottom:"16px"}}):o.jsx("p",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1119",style:{margin:"0 0 20px 0",fontSize:"16px",color:"#1e293b",lineHeight:1.6},children:d.message}),o.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1122",style:{display:"flex",gap:"12px",justifyContent:"flex-end",borderTop:"1px solid #f1f5f9",paddingTop:"16px"},children:ce===d._id?o.jsxs(o.Fragment,{children:[o.jsx("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1125",className:"vg-button-primary vg-animate-pop",style:{padding:"8px 16px",fontSize:"13px"},onClick:async()=>{try{(await fetch(`${a}/api/annotations/${d._id}`,{method:"PATCH",headers:{"Content-Type":"application/json","x-api-key":r},body:JSON.stringify({message:c})})).ok&&(ne(null),A(),e(n.updateSuccess,"success"))}catch{e(n.error,"error")}},children:n.save}),o.jsx("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1147",className:"vg-button-ghost vg-animate-pop",style:{padding:"8px 16px",fontSize:"13px"},onClick:()=>ne(null),children:n.cancel})]}):o.jsxs(o.Fragment,{children:[o.jsxs("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1151",className:"vg-button-ghost vg-animate-pop",style:{padding:"8px 16px",fontSize:"13px"},onClick:()=>{ne(d._id),h(d.message)},children:[o.jsx(Ct,{"data-source-path":"/src/components/ViewGateOverlay.tsx:1159",size:14})," ",n.edit]}),o.jsxs("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1161",className:"vg-button-ghost vg-animate-pop",style:{padding:"8px 16px",fontSize:"13px",animationDelay:"0.05s"},onClick:()=>{d.url&&(window.location.href=d.url)},children:[o.jsx(Me,{"data-source-path":"/src/components/ViewGateOverlay.tsx:1168",size:14})," ",n.review]}),d.status==="pending"?o.jsxs("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1171",className:"vg-button-primary vg-animate-pop",style:{padding:"8px 16px",fontSize:"13px",animationDelay:"0.1s"},onClick:()=>{D({title:n.markReadyConfirm,message:n.confirmMarkReady,type:"success",onConfirm:async()=>{try{(await fetch(`${a}/api/annotations/${d._id}`,{method:"PATCH",headers:{"Content-Type":"application/json","x-api-key":r},body:JSON.stringify({status:"ready_for_review"})})).ok&&(A(),e(n.updateSuccess,"success"))}catch{e(n.error,"error")}finally{D(null)}}})},children:[o.jsx(K,{"data-source-path":"/src/components/ViewGateOverlay.tsx:1199",size:14})," ",n.markReady]}):o.jsxs("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1202",className:"vg-button-ghost vg-animate-pop",style:{padding:"8px 16px",fontSize:"13px",animationDelay:"0.1s"},onClick:()=>{D({title:n.reopenConfirm,message:n.confirmReopen,type:"success",onConfirm:async()=>{try{(await fetch(`${a}/api/annotations/${d._id}`,{method:"PATCH",headers:{"Content-Type":"application/json","x-api-key":r},body:JSON.stringify({status:"pending"})})).ok&&(A(),e(n.updateSuccess,"success"))}catch{e(n.error,"error")}finally{D(null)}}})},children:[o.jsx(Et,{"data-source-path":"/src/components/ViewGateOverlay.tsx:1230",size:14})," ",n.reopen]}),o.jsx("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1233",className:"vg-button-ghost vg-animate-pop",style:{padding:"8px 12px",color:"#ef4444",borderColor:"#fee2e2",animationDelay:"0.15s"},onClick:()=>{D({title:n.deleteConfirm,message:n.confirmDelete,type:"danger",onConfirm:async()=>{try{(await fetch(`${a}/api/annotations/${d._id}`,{method:"DELETE",headers:{"x-api-key":r}})).ok&&(A(),e(n.deleteSuccess,"success"))}catch{e(n.error,"error")}finally{D(null)}}})},children:o.jsx(Fe,{"data-source-path":"/src/components/ViewGateOverlay.tsx:1260",size:16})})]})})]},d._id))})]})}),M&&o.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1275",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:_e+100},children:o.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1280",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:1287",style:{width:"64px",height:"64px",background:M.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:M.type==="danger"?"#ef4444":"#6366f1",transform:"rotate(-5deg)"},children:M.type==="danger"?o.jsx(Fe,{"data-source-path":"/src/components/ViewGateOverlay.tsx:1296",size:32}):o.jsx(K,{"data-source-path":"/src/components/ViewGateOverlay.tsx:1296",size:32})}),o.jsx("h3",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1298",style:{margin:"0 0 12px 0",fontSize:"20px",fontWeight:800,color:"#f8fafc",letterSpacing:"-0.02em"},children:M.title}),o.jsx("p",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1299",style:{margin:"0 0 32px 0",fontSize:"15px",color:"#94a3b8",lineHeight:1.6},children:M.message}),o.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1300",style:{display:"flex",gap:"16px"},children:[o.jsx("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1301",className:"vg-button-ghost",style:{flex:1,height:"44px"},onClick:()=>!X&&D(null),disabled:X,children:n.no}),o.jsx("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1309",className:"vg-button-primary",style:{flex:1,height:"44px",backgroundColor:M.type==="danger"?"#ef4444":void 0,backgroundImage:M.type==="danger"?"none":void 0,display:"flex",alignItems:"center",justifyContent:"center",gap:"8px"},disabled:X,onClick:async()=>{ie(!0);try{await M.onConfirm()}catch(d){console.error("Confirmation error:",d)}finally{ie(!1)}},children:X?o.jsx(bt,{"data-source-path":"/src/components/ViewGateOverlay.tsx:1334",size:18,className:"vg-animate-spin"}):n.yes})]})]})}),!l&&!j&&k.map((d,x)=>{const g=C[d._id];if(!g)return null;const O=k.slice(0,x).filter(_=>_.reference?.selector&&_.reference.selector===d.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+O-window.scrollX,cursor:"pointer",animationDelay:`${x*.08}s`,transition:"all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275)",zIndex:kn-x},onMouseEnter:_=>{const R=_.currentTarget.getBoundingClientRect();window.innerHeight-R.bottom<180?xe(I=>({...I,[d._id]:"vg-top"})):xe(I=>({...I,[d._id]:""}))},onClick:()=>{P(!0),te(d._id)},children:[o.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1381",className:`vg-pin-tooltip ${ye[d._id]||""}`,children:[o.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1382",style:{display:"flex",alignItems:"center",gap:"8px",marginBottom:"8px"},children:[d.status==="ready_for_review"?o.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1384",style:{display:"flex",alignItems:"center",gap:"6px",color:"#16a34a",fontWeight:700,fontSize:"11px"},children:[o.jsx(K,{"data-source-path":"/src/components/ViewGateOverlay.tsx:1385",size:12})," ",n.readyForReview]}):o.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1388",style:{display:"flex",alignItems:"center",gap:"6px",color:g.isModal?"#f59e0b":"#ea580c",fontWeight:700,fontSize:"11px"},children:[o.jsx(ze,{"data-source-path":"/src/components/ViewGateOverlay.tsx:1389",size:12})," ",n.pending]}),g.isModal&&o.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1393",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:1394",children:"MODAL"})})]}),o.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1398",style:{fontWeight:500,color:"#1e293b",lineHeight:1.4},children:d.message})]}),o.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1401",className:`vg-formal-pin ${d.status==="ready_for_review"?"ready":""} ${g.isModal?"modal-variant":""}`,children:d.status==="ready_for_review"?o.jsx(K,{"data-source-path":"/src/components/ViewGateOverlay.tsx:1402",size:18}):g.isModal?o.jsx(Me,{"data-source-path":"/src/components/ViewGateOverlay.tsx:1402",size:16}):o.jsx(we,{"data-source-path":"/src/components/ViewGateOverlay.tsx:1402",size:16})})]},`pin-${d._id}`)})]})})};function Ve(e,t,n){if(!t.endsWith(".tsx")&&!t.endsWith(".jsx")||t.includes("node_modules"))return e;const r=l=>l.replace(/\\/g,"/"),a=r(t).replace(r(n),"");return e.split(`
16
+ `).map((l,p)=>{const u=p+1;return l.replace(/(^|[^a-zA-Z0-9])<([a-zA-Z][a-zA-Z0-9\.]*)(?=[ \t\n\/\>])/g,(w,m,v)=>w.includes("data-source-path")||v==="Fragment"||v==="React.Fragment"?w:`${m}<${v} data-source-path="${a}:${u}"`)}).join(`
17
+ `)}function zn(){return{name:"vite-plugin-viewgate",enforce:"pre",transform(e,t){return{code:Ve(e,t,process.cwd()),map:null}}}}function Mn(e){const t=this.resourcePath;return t?(process.env.NODE_ENV,Ve(e,t,process.cwd())):e}G.ViewGate=jt,G.ViewGateOverlay=it,G.transformSourcePaths=Ve,G.useViewGate=He,G.viewgateNextLoader=Mn,G.viewgatePlugin=zn,Object.defineProperty(G,Symbol.toStringTag,{value:"Module"})}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "viewgate-wrapper",
3
- "version": "1.10.4",
3
+ "version": "1.10.6",
4
4
  "type": "module",
5
5
  "main": "./dist/viewgate-wrapper.umd.cjs",
6
6
  "module": "./dist/viewgate-wrapper.js",