@qaiddev/thumbs-embed 1.10.1 → 1.11.0

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.
package/dist/index.js CHANGED
@@ -2,42 +2,42 @@ const U = `<svg xmlns="http://www.w3.org/2000/svg" class="qaid-icon" fill="none"
2
2
  <path stroke-linecap="round" stroke-linejoin="round" d="M14 10h4.764a2 2 0 011.789 2.894l-3.5 7A2 2 0 0115.263 21h-4.017c-.163 0-.326-.02-.485-.06L7 20m7-10V5a2 2 0 00-2-2h-.095c-.5 0-.905.405-.905.905 0 .714-.211 1.412-.608 2.006L7 11v9m7-10h-2M7 20H5a2 2 0 01-2-2v-6a2 2 0 012-2h2.5"/>
3
3
  </svg>`, j = `<svg xmlns="http://www.w3.org/2000/svg" class="qaid-icon" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
4
4
  <path stroke-linecap="round" stroke-linejoin="round" d="M10 14H5.236a2 2 0 01-1.789-2.894l3.5-7A2 2 0 018.737 3h4.018a2 2 0 01.485.06l3.76.94m-7 10v5a2 2 0 002 2h.095c.5 0 .905-.405.905-.905 0-.714.211-1.412.608-2.006L17 13V4m-7 10h2m5-10h2a2 2 0 012 2v6a2 2 0 01-2 2h-2.5"/>
5
- </svg>`, he = `<svg xmlns="http://www.w3.org/2000/svg" class="qaid-icon" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
5
+ </svg>`, ue = `<svg xmlns="http://www.w3.org/2000/svg" class="qaid-icon" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
6
6
  <path stroke-linecap="round" stroke-linejoin="round" d="M15.75 10.5l4.72-4.72a.75.75 0 011.28.53v11.38a.75.75 0 01-1.28.53l-4.72-4.72M4.5 18.75h9a2.25 2.25 0 002.25-2.25v-9a2.25 2.25 0 00-2.25-2.25h-9A2.25 2.25 0 002.25 7.5v9a2.25 2.25 0 002.25 2.25z"/>
7
- </svg>`, Et = `<svg xmlns="http://www.w3.org/2000/svg" class="qaid-icon" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
7
+ </svg>`, At = `<svg xmlns="http://www.w3.org/2000/svg" class="qaid-icon" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
8
8
  <path stroke-linecap="round" stroke-linejoin="round" d="M8 10h8M8 14h5m-9 6l3.5-3.5H18a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v14z"/>
9
- </svg>`, ue = `<svg xmlns="http://www.w3.org/2000/svg" class="qaid-icon" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
10
- <rect x="4" y="6" width="16" height="12" rx="1" stroke-linejoin="round"/>
11
9
  </svg>`, pe = `<svg xmlns="http://www.w3.org/2000/svg" class="qaid-icon" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
12
- <path stroke-linecap="round" stroke-linejoin="round" d="M5 19L19 5m0 0h-8m8 0v8"/>
10
+ <rect x="4" y="6" width="16" height="12" rx="1" stroke-linejoin="round"/>
13
11
  </svg>`, fe = `<svg xmlns="http://www.w3.org/2000/svg" class="qaid-icon" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
14
- <path stroke-linecap="round" stroke-linejoin="round" d="M12 20h9M16.5 3.5a2.121 2.121 0 013 3L7 19l-4 1 1-4L16.5 3.5z"/>
12
+ <path stroke-linecap="round" stroke-linejoin="round" d="M5 19L19 5m0 0h-8m8 0v8"/>
15
13
  </svg>`, me = `<svg xmlns="http://www.w3.org/2000/svg" class="qaid-icon" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
16
- <path stroke-linecap="round" stroke-linejoin="round" d="M12 3s6 6.4 6 10a6 6 0 01-12 0c0-3.6 6-10 6-10z"/>
14
+ <path stroke-linecap="round" stroke-linejoin="round" d="M12 20h9M16.5 3.5a2.121 2.121 0 013 3L7 19l-4 1 1-4L16.5 3.5z"/>
17
15
  </svg>`, be = `<svg xmlns="http://www.w3.org/2000/svg" class="qaid-icon" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
16
+ <path stroke-linecap="round" stroke-linejoin="round" d="M12 3s6 6.4 6 10a6 6 0 01-12 0c0-3.6 6-10 6-10z"/>
17
+ </svg>`, ge = `<svg xmlns="http://www.w3.org/2000/svg" class="qaid-icon" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
18
18
  <path stroke-linecap="round" stroke-linejoin="round" d="M9 14L4 9l5-5M4 9h11a5 5 0 010 10h-4"/>
19
- </svg>`, At = `<svg xmlns="http://www.w3.org/2000/svg" class="qaid-icon" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
19
+ </svg>`, Lt = `<svg xmlns="http://www.w3.org/2000/svg" class="qaid-icon" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
20
20
  <path stroke-linecap="round" stroke-linejoin="round" d="M20 6L9 17l-5-5"/>
21
- </svg>`, ge = `<svg xmlns="http://www.w3.org/2000/svg" class="qaid-icon" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
22
- <path stroke-linecap="round" stroke-linejoin="round" d="M12 6v8m0 4h.01"/>
23
21
  </svg>`, ve = `<svg xmlns="http://www.w3.org/2000/svg" class="qaid-icon" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
22
+ <path stroke-linecap="round" stroke-linejoin="round" d="M12 6v8m0 4h.01"/>
23
+ </svg>`, ye = `<svg xmlns="http://www.w3.org/2000/svg" class="qaid-icon" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
24
24
  <path stroke-linecap="round" stroke-linejoin="round" d="M6 6l12 12M18 6L6 18"/>
25
- </svg>`, ye = "button{cursor:pointer}.qaid-buttons{display:flex;gap:.5rem}.qaid-buttons.qaid-vertical{flex-direction:column}.qaid-buttons.qaid-auto-container{position:fixed;z-index:50}.qaid-buttons.qaid-auto-container.qaid-bottom-right{bottom:1rem;right:1rem}.qaid-buttons.qaid-auto-container.qaid-bottom-left{bottom:1rem;left:1rem}.qaid-buttons.qaid-auto-container.qaid-top-right{top:1rem;right:1rem}.qaid-buttons.qaid-auto-container.qaid-top-left{top:1rem;left:1rem}.qaid-buttons.qaid-incognito{opacity:0;transition:opacity .2s ease-in-out}.qaid-buttons.qaid-incognito:hover{opacity:1}.qaid-buttons.qaid-dismissed{display:none!important}.qaid-dismiss-btn{width:20px;height:20px;padding:0;border:none;border-radius:50%;background:#0006;color:#fff;display:flex;align-items:center;justify-content:center;align-self:center;opacity:0;transition:opacity .15s,background .15s;cursor:pointer;pointer-events:auto;-webkit-appearance:none;appearance:none}.qaid-dismiss-btn:hover{background:#0009}.qaid-buttons:hover .qaid-dismiss-btn{opacity:1}button.qaid-btn-structural{display:inline-flex;align-items:center;justify-content:center;cursor:pointer;-webkit-appearance:none;appearance:none}.qaid-icon{width:24px;height:24px}:where(button.qaid-btn-structural)>svg:where(:not(.qaid-icon):not([width])){width:var(--qaid-icon-size, 24px);height:var(--qaid-icon-size, 24px)}.qaid-btn-structural:not(:has(svg)),.qaid-btn:not(:has(svg)){font-size:var(--qaid-icon-size, 24px);line-height:1}.qaid-emoji-icon{font-size:var(--qaid-icon-size, 24px);line-height:1}.qaid-buttons,.qaid-buttons *,.qaid-modal-container,.qaid-modal-container *{cursor:pointer!important}.qaid-tooltip-wrapper{position:relative}.qaid-tooltip-text{position:fixed;padding:.5rem .75rem;background:#1f2937;color:#fff;font-size:var(--qaid-font-size, 16px);font-weight:600;border-radius:.5rem;white-space:nowrap;opacity:0;pointer-events:none;transition:opacity .15s;z-index:99999}.qaid-tooltip-text.qaid-tooltip-visible{opacity:1}.qaid-targeting-overlay{position:fixed;inset:0;z-index:40;pointer-events:none}.qaid-capture-layer{position:fixed;inset:0;pointer-events:none;z-index:9999}@keyframes qaid-slideDown{0%{transform:translateY(-100%)}to{transform:translateY(0)}}.qaid-vignette{position:fixed;inset:0;pointer-events:none;background:radial-gradient(ellipse at center,transparent 30%,rgba(0,0,0,.3) 70%,rgba(0,0,0,.6) 100%);z-index:41}.qaid-crosshair-h,.qaid-crosshair-v{position:fixed;pointer-events:none;z-index:42}.qaid-crosshair-h{left:0;right:0;height:1px;background:color-mix(in srgb,var(--qaid-negative) 60%,transparent)}.qaid-crosshair-v{top:0;bottom:0;width:1px;background:color-mix(in srgb,var(--qaid-negative) 60%,transparent)}.qaid-type-up .qaid-crosshair-h,.qaid-type-up .qaid-crosshair-v{background:color-mix(in srgb,var(--qaid-positive) 60%,transparent)}.qaid-highlight-box{position:fixed;top:0;left:0;pointer-events:none;z-index:41;display:none;border:3px solid color-mix(in srgb,var(--qaid-negative) 80%,transparent);border-radius:2px;background:color-mix(in srgb,var(--qaid-negative) 8%,transparent);will-change:transform,width,height}.qaid-type-up .qaid-highlight-box{border-color:color-mix(in srgb,var(--qaid-positive) 80%,transparent);background:color-mix(in srgb,var(--qaid-positive) 8%,transparent)}.qaid-scope{position:fixed;width:80px;height:80px;pointer-events:none;z-index:43;transform:translate(-50%,-50%)}.qaid-scope-ring{position:absolute;inset:10px;border:2px solid color-mix(in srgb,var(--qaid-negative) 80%,transparent);border-radius:50%}.qaid-type-up .qaid-scope-ring{border-color:color-mix(in srgb,var(--qaid-positive) 80%,transparent)}.qaid-scope-ring-inner{position:absolute;inset:20px;border:1px solid color-mix(in srgb,var(--qaid-negative) 50%,transparent);border-radius:50%}.qaid-type-up .qaid-scope-ring-inner{border-color:color-mix(in srgb,var(--qaid-positive) 50%,transparent)}.qaid-scope-dot{position:absolute;top:50%;left:50%;width:4px;height:4px;background:var(--qaid-negative);border-radius:50%;transform:translate(-50%,-50%)}.qaid-type-up .qaid-scope-dot{background:var(--qaid-positive)}.qaid-selected-marker{position:fixed;border:3px solid var(--qaid-marker, #6365f1);border-radius:50%;pointer-events:none;z-index:44;animation:qaid-markerPulse 1.5s ease-in-out infinite}@keyframes qaid-markerPulse{0%,to{opacity:1;transform:scale(1)}50%{opacity:.7;transform:scale(1.05)}}.qaid-backdrop{position:fixed;inset:0;z-index:45;background:#0000004d}.qaid-modal-container{position:fixed;z-index:50;display:flex;flex-direction:column;align-items:flex-start;max-height:calc(100vh - 32px);font-family:var(--qaid-font-family, system-ui, -apple-system, sans-serif);font-size:var(--qaid-font-size, 16px)}.qaid-modal-container.qaid-above{flex-direction:column-reverse}.qaid-modal-arrow{width:0;height:0;border-left:12px solid transparent;border-right:12px solid transparent;position:relative;align-self:flex-start}.qaid-modal-container.qaid-below .qaid-modal-arrow{border-bottom:12px solid light-dark(#ffffff,#1f2937)}.qaid-modal-container.qaid-above .qaid-modal-arrow{border-top:12px solid light-dark(#ffffff,#1f2937)}.qaid-modal-box{color-scheme:inherit;background:light-dark(#ffffff,#1f2937);border-radius:1rem;padding:1.5rem;box-shadow:0 25px 50px -12px light-dark(rgba(0,0,0,.25),rgba(0,0,0,.5));width:var(--qaid-modal-width, 400px);max-width:calc(100vw - 32px);max-height:calc(100vh - 60px);overflow-y:auto}.qaid-modal-header{display:flex;align-items:flex-start;gap:.75rem;margin-bottom:1rem}button.qaid-type-toggle{border:none;display:flex;align-items:center;justify-content:center;cursor:pointer;transition:all .2s;flex-shrink:0;-webkit-appearance:none;appearance:none}button.qaid-type-toggle:hover{transform:scale(1.1)}button.qaid-type-toggle:not(.qaid-type-toggle-custom){width:2.5rem;height:2.5rem;border-radius:50%}button.qaid-type-toggle:not(.qaid-type-toggle-custom) svg{width:1.25rem;height:1.25rem}button.qaid-type-toggle.qaid-type-up{background:var(--qaid-positive);color:#fff}button.qaid-type-toggle.qaid-type-down{background:var(--qaid-negative);color:#fff}.qaid-type-static{width:2.5rem;height:2.5rem;border-radius:50%;display:flex;align-items:center;justify-content:center;flex-shrink:0;background:var(--qaid-marker, #6365f1);color:var(--qaid-marker-text, white)}.qaid-type-static svg{width:1.25rem;height:1.25rem}.qaid-modal-header-text{flex:1;min-width:0}.qaid-modal-title{font-size:calc(var(--qaid-font-size, 16px) * 1.125);font-weight:700;margin:0 0 .25rem;color:light-dark(#1f2937,#f9fafb)}.qaid-modal-subtitle{color:light-dark(#6b7280,#9ca3af);margin:0;font-size:calc(var(--qaid-font-size, 16px) * .875)}.qaid-textarea{width:100%;height:6rem;padding:.75rem;border:1px solid light-dark(#d1d5db,#374151);border-radius:.5rem;font-family:inherit;font-size:var(--qaid-font-size, 16px);resize:vertical;margin-bottom:1rem;box-sizing:border-box;background:light-dark(#ffffff,#111827);color:light-dark(#1f2937,#f9fafb)}.qaid-textarea:focus{outline:none;border-color:var(--qaid-marker);box-shadow:0 0 0 3px color-mix(in srgb,var(--qaid-marker) 20%,transparent)}.qaid-btn-row{display:flex;gap:.5rem;justify-content:flex-end}button.qaid-btn-submit{padding:.5rem 1rem;background:var(--qaid-marker);color:var(--qaid-marker-text, white);border:none;border-radius:.5rem;font-size:calc(var(--qaid-font-size, 16px) * .875);font-weight:500;cursor:pointer;transition:background-color .2s,filter .2s;-webkit-appearance:none;appearance:none}button.qaid-btn-submit:hover{filter:brightness(.85)}button.qaid-btn-submit:focus{outline:none;box-shadow:0 0 0 3px color-mix(in srgb,var(--qaid-marker) 30%,transparent)}.qaid-bottom-sheet{position:fixed;bottom:0;left:0;right:0;z-index:50;animation:qaid-slideUpSheet .3s ease-out;font-family:var(--qaid-font-family, system-ui, -apple-system, sans-serif);font-size:var(--qaid-font-size, 16px)}.qaid-bottom-sheet-content{background:light-dark(#ffffff,#1f2937);border-radius:1rem 1rem 0 0;padding:1.5rem;padding-bottom:max(1.5rem,env(safe-area-inset-bottom))}.qaid-bottom-sheet-handle{width:36px;height:4px;background:light-dark(rgba(0,0,0,.2),rgba(255,255,255,.2));border-radius:2px;margin:0 auto 1rem}@keyframes qaid-slideUpSheet{0%{transform:translateY(100%)}to{transform:translateY(0)}}button.qaid-btn-record:hover{background:#dc2626;color:#fff}.qaid-recording-indicator{position:fixed;pointer-events:auto;top:12px;left:50%;transform:translate(-50%);display:flex;align-items:center;gap:.5rem;padding:.5rem 1rem;background:light-dark(#1f2937,#374151);color:#fff;border-radius:9999px;font-family:var(--qaid-font-family, system-ui, -apple-system, sans-serif);font-size:calc(var(--qaid-font-size, 16px) * .875);font-weight:500;box-shadow:0 4px 12px #0000004d;z-index:99999;animation:qaid-slideDown .2s ease-out}.qaid-recording-dot{width:10px;height:10px;background:#dc2626;border-radius:50%;animation:qaid-dotPulse 1.5s ease-in-out infinite}@keyframes qaid-dotPulse{0%,to{opacity:1}50%{opacity:.3}}.qaid-recording-time{font-variant-numeric:tabular-nums;min-width:2.5rem;text-align:center}button.qaid-recording-stop{padding:.25rem .75rem;background:#dc2626;color:#fff;border:none;border-radius:9999px;font-size:calc(var(--qaid-font-size, 16px) * .75);font-weight:600;cursor:pointer;transition:background-color .2s;-webkit-appearance:none;appearance:none}button.qaid-recording-stop:hover{background:#b91c1c}.qaid-video-preview{position:fixed;inset:0 0 auto;height:100vh;height:100dvh;display:flex;align-items:center;justify-content:center;padding:16px;padding-top:max(16px,env(safe-area-inset-top));padding-bottom:max(16px,env(safe-area-inset-bottom));box-sizing:border-box;background:#0009;z-index:99998;animation:qaid-fadeIn .2s ease-out}@keyframes qaid-fadeIn{0%{opacity:0}to{opacity:1}}.qaid-video-preview-box{color-scheme:inherit;background:light-dark(#ffffff,#1f2937);border-radius:1rem;padding:1.5rem;box-shadow:0 25px 50px -12px #00000080;width:560px;max-width:100%;max-height:100%;overflow-y:auto;font-family:var(--qaid-font-family, system-ui, -apple-system, sans-serif);font-size:var(--qaid-font-size, 16px)}.qaid-video-preview-box h3{font-size:calc(var(--qaid-font-size, 16px) * 1.125);font-weight:700;margin:0 0 1rem;color:light-dark(#1f2937,#f9fafb)}.qaid-video-preview-box video{width:100%;max-height:50vh;max-height:50dvh;object-fit:contain;border-radius:.5rem;background:#000;margin-bottom:1rem}.qaid-video-preview-box textarea{width:100%;height:4rem;padding:.75rem;border:1px solid light-dark(#d1d5db,#374151);border-radius:.5rem;font-family:inherit;font-size:calc(var(--qaid-font-size, 16px) * .875);resize:vertical;margin-bottom:1rem;box-sizing:border-box;background:light-dark(#ffffff,#111827);color:light-dark(#1f2937,#f9fafb)}.qaid-video-preview-box textarea:focus{outline:none;border-color:var(--qaid-marker);box-shadow:0 0 0 3px color-mix(in srgb,var(--qaid-marker) 20%,transparent)}.qaid-video-error{margin:0 0 .75rem;font-size:calc(var(--qaid-font-size, 16px) * .875);font-weight:500;color:light-dark(#b91c1c,#fca5a5)}.qaid-video-preview-actions{display:flex;gap:.5rem;justify-content:flex-end}button.qaid-video-btn{padding:.5rem 1rem;border:none;border-radius:.5rem;font-size:calc(var(--qaid-font-size, 16px) * .875);font-weight:500;cursor:pointer;transition:background-color .2s,filter .2s;-webkit-appearance:none;appearance:none}button.qaid-video-btn-cancel{background:light-dark(#f3f4f6,#374151);color:light-dark(#374151,#d1d5db)}button.qaid-video-btn-cancel:hover{background:light-dark(#e5e7eb,#4b5563)}button.qaid-video-btn-rerecord{background:light-dark(#fef3c7,#78350f);color:light-dark(#92400e,#fde68a)}button.qaid-video-btn-rerecord:hover{filter:brightness(.9)}button.qaid-video-btn-send{background:var(--qaid-marker);color:var(--qaid-marker-text, white)}button.qaid-video-btn-send:hover{filter:brightness(.85)}button.qaid-video-btn-send:disabled{opacity:.5;cursor:not-allowed}.qaid-video-sending{display:flex;align-items:center;gap:.5rem;font-size:calc(var(--qaid-font-size, 16px) * .875);color:light-dark(#6b7280,#9ca3af)}.qaid-annotate{position:fixed;inset:0;z-index:2147483000;display:flex;flex-direction:column;gap:.75rem;padding:16px;padding-top:max(16px,env(safe-area-inset-top));padding-bottom:max(16px,env(safe-area-inset-bottom));box-sizing:border-box;background:#000000d9;font-family:var(--qaid-font-family, system-ui, -apple-system, sans-serif);font-size:var(--qaid-font-size, 16px);animation:qaid-fadeIn .2s ease-out}.qaid-annotate-title{margin:0;font-size:var(--qaid-font-size, 16px);font-weight:700;text-align:center;color:#f9fafb}.qaid-annotate-desc{margin:0;font-size:calc(var(--qaid-font-size, 16px) * .8125);line-height:1.4;text-align:center;color:#f9fafbbf}.qaid-annotate-stage{flex:1 1 auto;min-height:0;display:flex;align-items:center;justify-content:center;overflow:auto}.qaid-annotate-canvas{max-width:100%;max-height:100%;object-fit:contain;background:light-dark(#ffffff,#111827);border-radius:.5rem;box-shadow:0 10px 30px #00000080;touch-action:none;cursor:crosshair}.qaid-annotate-toolbar{display:flex;flex-wrap:wrap;gap:.75rem;align-items:center;justify-content:center;padding:.5rem .75rem;background:light-dark(#ffffff,#1f2937);border-radius:.75rem;box-shadow:0 10px 30px light-dark(rgba(0,0,0,.25),rgba(0,0,0,.5))}.qaid-annotate-tools,.qaid-annotate-actions{display:flex;gap:.375rem;align-items:center}button.qaid-annotate-tool,button.qaid-annotate-action{display:inline-flex;align-items:center;justify-content:center;gap:.375rem;min-width:44px;min-height:44px;padding:0 .75rem;border:1px solid light-dark(#d1d5db,#374151);border-radius:.5rem;background:light-dark(#f9fafb,#111827);color:light-dark(#1f2937,#f9fafb);font-family:inherit;font-size:calc(var(--qaid-font-size, 16px) * .8125);font-weight:600;cursor:pointer;-webkit-appearance:none;appearance:none;transition:background-color .15s,color .15s,border-color .15s,filter .15s}button.qaid-annotate-tool svg,button.qaid-annotate-action svg{width:20px;height:20px}.qaid-annotate-colors{display:flex;gap:.25rem;align-items:center}button.qaid-annotate-swatch{width:28px;height:28px;min-width:28px;padding:0;border-radius:9999px;border:2px solid light-dark(#d1d5db,#4b5563);background:var(--qaid-swatch, #000);cursor:pointer;-webkit-appearance:none;appearance:none;transition:transform .1s,box-shadow .15s,border-color .15s}button.qaid-annotate-swatch:hover{transform:scale(1.12)}button.qaid-annotate-swatch[aria-pressed=true]{border-color:light-dark(#111827,#f9fafb);box-shadow:0 0 0 2px var(--qaid-swatch)}@media(forced-colors:active){button.qaid-annotate-swatch[aria-pressed=true]{outline:2px solid Highlight;outline-offset:1px}}button.qaid-annotate-tool:hover,button.qaid-annotate-action:hover{background:light-dark(#eef2ff,#312e81)}button.qaid-annotate-tool[aria-pressed=true],button.qaid-annotate-done{background:var(--qaid-marker, #6365f1);color:var(--qaid-marker-text, #fff);border-color:var(--qaid-marker, #6365f1)}button.qaid-annotate-done:hover{filter:brightness(.9);background:var(--qaid-marker, #6365f1)}button.qaid-annotate-action:disabled{opacity:.45;cursor:not-allowed}@media(forced-colors:active){button.qaid-annotate-tool[aria-pressed=true],button.qaid-annotate-done{border:2px solid Highlight}.qaid-annotate-canvas{border:1px solid CanvasText}}button:focus-visible,textarea:focus-visible,a:focus-visible,[tabindex]:focus-visible,[role=button]:focus-visible{outline:2px solid var(--qaid-marker, #6365f1);outline-offset:2px}.qaid-textarea:focus-visible,button.qaid-btn-submit:focus-visible,.qaid-video-preview-box textarea:focus-visible{outline:2px solid var(--qaid-marker, #6365f1);outline-offset:2px}.qaid-buttons.qaid-incognito:focus-within{opacity:1}.qaid-buttons:focus-within .qaid-dismiss-btn,.qaid-dismiss-btn:focus-visible{opacity:1}.qaid-dismiss-btn{min-width:24px;min-height:24px}button.qaid-recording-stop{min-height:24px}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}@media(forced-colors:active){button:focus-visible,textarea:focus-visible,a:focus-visible,[tabindex]:focus-visible,[role=button]:focus-visible,.qaid-textarea:focus,button.qaid-btn-submit:focus,.qaid-video-preview-box textarea:focus{outline:2px solid CanvasText;outline-offset:2px}.qaid-selected-marker,.qaid-highlight-box{border-color:Highlight}}.qaid-confirm{display:flex;flex-direction:column;align-items:center;text-align:center;gap:.5rem;padding:.5rem 0}.qaid-confirm-icon{display:flex;align-items:center;justify-content:center;width:44px;height:44px;border-radius:9999px;color:#fff;background:var(--qaid-success, #22c55e);margin-bottom:.25rem;animation:qaid-confirm-pop .28s cubic-bezier(.34,1.56,.64,1)}.qaid-confirm-icon .qaid-icon{width:24px;height:24px}.qaid-confirm-error .qaid-confirm-icon{background:var(--qaid-error, #dc2626)}.qaid-confirm-title{margin:0;font-size:var(--qaid-font-size, 16px);font-weight:600;color:var(--qaid-text, light-dark(#111827, #f9fafb))}.qaid-confirm-title:focus-visible{outline:2px solid var(--qaid-primary, #6365f1);outline-offset:3px;border-radius:4px}.qaid-confirm-message{margin:0;font-size:calc(var(--qaid-font-size, 16px) * .875);color:var(--qaid-text-muted, light-dark(#6b7280, #9ca3af))}.qaid-confirm .qaid-confirm-close{margin-top:.5rem;min-width:96px}@keyframes qaid-confirm-pop{0%{transform:scale(.6);opacity:0}to{transform:scale(1);opacity:1}}@media(prefers-reduced-motion:reduce){.qaid-confirm-icon{animation:none}}", we = "body.qaid-targeting,body.qaid-targeting *{cursor:none!important}";
25
+ </svg>`, we = "button{cursor:pointer}.qaid-buttons{display:flex;gap:.5rem}.qaid-buttons.qaid-vertical{flex-direction:column}.qaid-buttons.qaid-auto-container{position:fixed;z-index:50}.qaid-buttons.qaid-auto-container.qaid-bottom-right{bottom:1rem;right:1rem}.qaid-buttons.qaid-auto-container.qaid-bottom-left{bottom:1rem;left:1rem}.qaid-buttons.qaid-auto-container.qaid-top-right{top:1rem;right:1rem}.qaid-buttons.qaid-auto-container.qaid-top-left{top:1rem;left:1rem}.qaid-buttons.qaid-incognito{opacity:0;transition:opacity .2s ease-in-out}.qaid-buttons.qaid-incognito:hover{opacity:1}.qaid-buttons.qaid-dismissed{display:none!important}.qaid-dismiss-btn{width:20px;height:20px;padding:0;border:none;border-radius:50%;background:#0006;color:#fff;display:flex;align-items:center;justify-content:center;align-self:center;opacity:0;transition:opacity .15s,background .15s;cursor:pointer;pointer-events:auto;-webkit-appearance:none;appearance:none}.qaid-dismiss-btn:hover{background:#0009}.qaid-buttons:hover .qaid-dismiss-btn{opacity:1}button.qaid-btn-structural{display:inline-flex;align-items:center;justify-content:center;cursor:pointer;-webkit-appearance:none;appearance:none}.qaid-icon{width:24px;height:24px}:where(button.qaid-btn-structural)>svg:where(:not(.qaid-icon):not([width])){width:var(--qaid-icon-size, 24px);height:var(--qaid-icon-size, 24px)}.qaid-btn-structural:not(:has(svg)),.qaid-btn:not(:has(svg)){font-size:var(--qaid-icon-size, 24px);line-height:1}.qaid-emoji-icon{font-size:var(--qaid-icon-size, 24px);line-height:1}.qaid-buttons,.qaid-buttons *,.qaid-modal-container,.qaid-modal-container *{cursor:pointer!important}.qaid-tooltip-wrapper{position:relative}.qaid-tooltip-text{position:fixed;padding:.5rem .75rem;background:#1f2937;color:#fff;font-size:var(--qaid-font-size, 16px);font-weight:600;border-radius:.5rem;white-space:nowrap;opacity:0;pointer-events:none;transition:opacity .15s;z-index:99999}.qaid-tooltip-text.qaid-tooltip-visible{opacity:1}button.qaid-btn-record:hover{background:#dc2626;color:#fff}button:focus-visible,textarea:focus-visible,a:focus-visible,[tabindex]:focus-visible,[role=button]:focus-visible{outline:2px solid var(--qaid-marker, #6365f1);outline-offset:2px}.qaid-buttons.qaid-incognito:focus-within{opacity:1}.qaid-buttons:focus-within .qaid-dismiss-btn,.qaid-dismiss-btn:focus-visible{opacity:1}.qaid-dismiss-btn{min-width:24px;min-height:24px}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}@media(forced-colors:active){button:focus-visible,textarea:focus-visible,a:focus-visible,[tabindex]:focus-visible,[role=button]:focus-visible{outline:2px solid CanvasText;outline-offset:2px}}", ke = "body.qaid-targeting,body.qaid-targeting *{cursor:none!important}";
26
26
  let D = 0;
27
- const ke = "button.qaid-btn{width:var(--qaid-btn-size);height:var(--qaid-btn-size);border-radius:50%;border:none;background:#f3f4f6;color:#374151;display:flex;align-items:center;justify-content:center;cursor:pointer;box-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -1px rgba(0,0,0,.06);transition:background-color .2s,color .2s,transform .2s;-webkit-appearance:none;appearance:none;--qaid-hover-up-bg:var(--qaid-positive);--qaid-hover-up-color:#fff;--qaid-hover-down-bg:var(--qaid-negative);--qaid-hover-down-color:#fff}button.qaid-btn:hover{transform:scale(1.05)}button.qaid-btn-up:hover{background:var(--qaid-hover-up-bg);color:var(--qaid-hover-up-color)}button.qaid-btn-down:hover{background:var(--qaid-hover-down-bg);color:var(--qaid-hover-down-color)}button.qaid-btn-feedback:hover{background:var(--qaid-marker,#6365f1);color:var(--qaid-marker-text,#fff)}button.qaid-btn svg{width:var(--qaid-icon-size);height:var(--qaid-icon-size)}", xe = {
27
+ const xe = "button.qaid-btn{width:var(--qaid-btn-size);height:var(--qaid-btn-size);border-radius:50%;border:none;background:#f3f4f6;color:#374151;display:flex;align-items:center;justify-content:center;cursor:pointer;box-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -1px rgba(0,0,0,.06);transition:background-color .2s,color .2s,transform .2s;-webkit-appearance:none;appearance:none;--qaid-hover-up-bg:var(--qaid-positive);--qaid-hover-up-color:#fff;--qaid-hover-down-bg:var(--qaid-negative);--qaid-hover-down-color:#fff}button.qaid-btn:hover{transform:scale(1.05)}button.qaid-btn-up:hover{background:var(--qaid-hover-up-bg);color:var(--qaid-hover-up-color)}button.qaid-btn-down:hover{background:var(--qaid-hover-down-bg);color:var(--qaid-hover-down-color)}button.qaid-btn-feedback:hover{background:var(--qaid-marker,#6365f1);color:var(--qaid-marker-text,#fff)}button.qaid-btn svg{width:var(--qaid-icon-size);height:var(--qaid-icon-size)}", qe = {
28
28
  small: 36,
29
29
  medium: 48,
30
30
  large: 64
31
- }, qe = {
31
+ }, Ce = {
32
32
  small: 18,
33
33
  medium: 24,
34
34
  large: 32
35
35
  };
36
- function Ce(i, t, e) {
36
+ function Se(i, t, e) {
37
37
  const [o, n, s] = [i, t, e].map((a) => (a = a / 255, a <= 0.03928 ? a / 12.92 : Math.pow((a + 0.055) / 1.055, 2.4)));
38
38
  return 0.2126 * o + 0.7152 * n + 0.0722 * s;
39
39
  }
40
- function Se(i) {
40
+ function Te(i) {
41
41
  if (i.startsWith("#")) {
42
42
  const e = i.slice(1), o = e.length === 3 ? e.split("").map((s) => s + s).join("") : e, n = parseInt(o, 16);
43
43
  return {
@@ -53,11 +53,11 @@ function Se(i) {
53
53
  b: parseInt(t[3])
54
54
  } : null;
55
55
  }
56
- function Te(i) {
57
- const t = Se(i);
58
- return t && Ce(t.r, t.g, t.b) > 0.4 ? "black" : "white";
56
+ function Ee(i) {
57
+ const t = Te(i);
58
+ return t && Se(t.r, t.g, t.b) > 0.4 ? "black" : "white";
59
59
  }
60
- function Ee(i = {}) {
60
+ function Ae(i = {}) {
61
61
  const {
62
62
  positiveColor: t = "rgb(0, 200, 83)",
63
63
  negativeColor: e = "rgb(255, 0, 0)",
@@ -67,7 +67,7 @@ function Ee(i = {}) {
67
67
  backdropOpacity: a = 0.3,
68
68
  fontFamily: c = "system-ui, -apple-system, sans-serif",
69
69
  fontSize: l = 16
70
- } = i, d = xe[n], r = qe[n], h = Te(o);
70
+ } = i, d = qe[n], r = Ce[n], h = Ee(o);
71
71
  return {
72
72
  "--qaid-positive": t,
73
73
  "--qaid-negative": e,
@@ -81,22 +81,22 @@ function Ee(i = {}) {
81
81
  "--qaid-font-size": `${l}px`
82
82
  };
83
83
  }
84
- function Ae(i, t) {
84
+ function Le(i, t) {
85
85
  for (const [e, o] of Object.entries(t))
86
86
  i.style.setProperty(e, o);
87
87
  }
88
88
  function dt() {
89
- return ye + ke;
89
+ return we + xe;
90
90
  }
91
- function Le() {
91
+ function Ie() {
92
92
  if (D++, D > 1) return;
93
93
  const i = document.createElement("style");
94
- i.id = "qaid-styles", i.textContent = we, document.head.appendChild(i);
94
+ i.id = "qaid-styles", i.textContent = ke, document.head.appendChild(i);
95
95
  }
96
- function Ie() {
96
+ function De() {
97
97
  D <= 0 || (D--, D === 0 && document.getElementById("qaid-styles")?.remove());
98
98
  }
99
- const ct = "data-qaid-a11y-live", De = "position:absolute;width:1px;height:1px;margin:-1px;padding:0;border:0;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap;", Me = [
99
+ const ct = "data-qaid-a11y-live", Me = "position:absolute;width:1px;height:1px;margin:-1px;padding:0;border:0;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap;", Re = [
100
100
  "a[href]",
101
101
  "button",
102
102
  "input",
@@ -104,25 +104,25 @@ const ct = "data-qaid-a11y-live", De = "position:absolute;width:1px;height:1px;m
104
104
  "select",
105
105
  "[tabindex]"
106
106
  ].join(",");
107
- function Re(i) {
107
+ function Pe(i) {
108
108
  return i.ownerDocument || document;
109
109
  }
110
- function Pe(i, t) {
110
+ function Be(i, t) {
111
111
  const e = t ? "assertive" : "polite", o = i.querySelector(
112
112
  `[${ct}="${e}"]`
113
113
  );
114
114
  if (o) return o;
115
- const s = Re(i).createElement("div");
116
- return s.setAttribute(ct, e), s.setAttribute("role", t ? "alert" : "status"), s.setAttribute("aria-live", t ? "assertive" : "polite"), s.setAttribute("aria-atomic", "true"), s.style.cssText = De, i.appendChild(s), s;
115
+ const s = Pe(i).createElement("div");
116
+ return s.setAttribute(ct, e), s.setAttribute("role", t ? "alert" : "status"), s.setAttribute("aria-live", t ? "assertive" : "polite"), s.setAttribute("aria-atomic", "true"), s.style.cssText = Me, i.appendChild(s), s;
117
117
  }
118
- function Be(i, t, e = {}) {
119
- const o = Pe(i, !!e.assertive);
118
+ function He(i, t, e = {}) {
119
+ const o = Be(i, !!e.assertive);
120
120
  o.textContent = "", o.textContent = t;
121
121
  }
122
- function He(i) {
122
+ function Oe(i) {
123
123
  return i.hasAttribute("disabled") ? !0 : i.disabled === !0;
124
124
  }
125
- function Oe(i) {
125
+ function ze(i) {
126
126
  let t = i;
127
127
  for (; t; ) {
128
128
  if (t.hasAttribute("hidden")) return !0;
@@ -135,16 +135,16 @@ function Oe(i) {
135
135
  }
136
136
  function lt(i) {
137
137
  return Array.from(
138
- i.querySelectorAll(Me)
139
- ).filter((e) => !(e.getAttribute("tabindex") === "-1" || e instanceof HTMLInputElement && e.type === "hidden" || e instanceof HTMLAnchorElement && !e.getAttribute("href") || He(e) || Oe(e)));
138
+ i.querySelectorAll(Re)
139
+ ).filter((e) => !(e.getAttribute("tabindex") === "-1" || e instanceof HTMLInputElement && e.type === "hidden" || e instanceof HTMLAnchorElement && !e.getAttribute("href") || Oe(e) || ze(e)));
140
140
  }
141
- function Lt(i) {
141
+ function It(i) {
142
142
  let t = i.activeElement;
143
143
  for (; t && t.shadowRoot && t.shadowRoot.activeElement; )
144
144
  t = t.shadowRoot.activeElement;
145
145
  return t instanceof HTMLElement ? t : null;
146
146
  }
147
- function ze(i) {
147
+ function $e(i) {
148
148
  const t = i.ownerDocument || document;
149
149
  let e = !1;
150
150
  const o = (s) => {
@@ -154,7 +154,7 @@ function ze(i) {
154
154
  s.preventDefault(), i.focus();
155
155
  return;
156
156
  }
157
- const c = a[0], l = a[a.length - 1], d = Lt(t), r = d ? a.indexOf(d) !== -1 : !1;
157
+ const c = a[0], l = a[a.length - 1], d = It(t), r = d ? a.indexOf(d) !== -1 : !1;
158
158
  s.shiftKey ? (!r || d === c) && (s.preventDefault(), l.focus()) : (!r || d === l) && (s.preventDefault(), c.focus());
159
159
  };
160
160
  i.addEventListener("keydown", o);
@@ -165,20 +165,20 @@ function ze(i) {
165
165
  }
166
166
  };
167
167
  }
168
- function $e() {
169
- return Lt(document);
168
+ function _e() {
169
+ return It(document);
170
170
  }
171
- function _e(i) {
171
+ function Fe(i) {
172
172
  if (!(!i || typeof i.focus != "function"))
173
173
  try {
174
174
  i.focus();
175
175
  } catch {
176
176
  }
177
177
  }
178
- function Fe(i, t = {}) {
178
+ function Ne(i, t = {}) {
179
179
  i.setAttribute("role", "dialog"), i.setAttribute("aria-modal", "true"), t.labelledbyId && i.setAttribute("aria-labelledby", t.labelledbyId), t.describedbyId && i.setAttribute("aria-describedby", t.describedbyId), t.label && i.setAttribute("aria-label", t.label);
180
180
  }
181
- function Ne(i, t) {
181
+ function Ve(i, t) {
182
182
  let e = i;
183
183
  for (; e && e !== t; ) {
184
184
  const o = e.parentNode;
@@ -192,11 +192,11 @@ function Ne(i, t) {
192
192
  }
193
193
  return null;
194
194
  }
195
- function Ve(i) {
195
+ function Ue(i) {
196
196
  const e = (i.ownerDocument || document).body;
197
197
  if (!e) return () => {
198
198
  };
199
- const o = Ne(i, e), n = [];
199
+ const o = Ve(i, e), n = [];
200
200
  return Array.from(e.children).forEach((s) => {
201
201
  if (!(s instanceof HTMLElement) || o && s === o) return;
202
202
  const a = s.inert === !0, c = s.getAttribute("aria-hidden");
@@ -208,14 +208,14 @@ function Ve(i) {
208
208
  }
209
209
  };
210
210
  }
211
- const It = {
211
+ const Dt = {
212
212
  width: 400,
213
213
  height: 280,
214
214
  arrowHeight: 12,
215
215
  gap: 8,
216
216
  viewportPadding: 16
217
217
  };
218
- function Ue(i, t, e, o, n) {
218
+ function je(i, t, e, o, n) {
219
219
  const s = i.y, a = t - (i.y + i.height);
220
220
  if (a >= e + o)
221
221
  return {
@@ -234,22 +234,22 @@ function Ue(i, t, e, o, n) {
234
234
  t - e - n
235
235
  ) : l = Math.max(n, i.y - e - o), { top: l, position: c };
236
236
  }
237
- function je(i, t, e, o) {
237
+ function Ke(i, t, e, o) {
238
238
  let s = i.x + i.width / 2 - e / 2;
239
239
  return s = Math.max(o, Math.min(s, t - e - o)), s;
240
240
  }
241
- function Ke(i, t, e, o = 24, n = 24) {
241
+ function We(i, t, e, o = 24, n = 24) {
242
242
  const a = i.clickX - t - n / 2;
243
243
  return Math.max(o, Math.min(a, e - o - n / 2));
244
244
  }
245
- function We(i, t, e, o = It) {
246
- const n = o.height + o.arrowHeight, s = Ue(
245
+ function Xe(i, t, e, o = Dt) {
246
+ const n = o.height + o.arrowHeight, s = je(
247
247
  i,
248
248
  e,
249
249
  n,
250
250
  o.gap,
251
251
  o.viewportPadding
252
- ), a = je(
252
+ ), a = Ke(
253
253
  i,
254
254
  t,
255
255
  o.width,
@@ -261,15 +261,15 @@ function We(i, t, e, o = It) {
261
261
  position: s.position
262
262
  };
263
263
  }
264
- function Xe(i, t, e, o = {}) {
264
+ function Ye(i, t, e, o = {}) {
265
265
  const n = o.gap ?? 8;
266
266
  let s = i.bottom + n;
267
267
  s + t.height > e.height - n && (s = i.top - t.height - n);
268
268
  let a = i.left;
269
269
  return a < n ? a = n : a + t.width > e.width - n && (a = e.width - t.width - n), s < n ? s = n : s + t.height > e.height - n && (s = e.height - t.height - n), { top: s, left: a };
270
270
  }
271
- function Ye(i, t, e, o = It) {
272
- const n = We(i, t, e, o), s = Ke(
271
+ function Qe(i, t, e, o = Dt) {
272
+ const n = Xe(i, t, e, o), s = We(
273
273
  i,
274
274
  n.left,
275
275
  o.width
@@ -279,15 +279,15 @@ function Ye(i, t, e, o = It) {
279
279
  arrow: { left: s }
280
280
  };
281
281
  }
282
- const Qe = 20;
283
- function Je(i) {
282
+ const Je = 20;
283
+ function Ge(i) {
284
284
  const t = [], e = console.error, o = console.warn, n = console.log, s = (a, c) => {
285
285
  const l = {
286
286
  message: c.map((d) => String(d)).join(" "),
287
287
  timestamp: Date.now(),
288
288
  level: a
289
289
  };
290
- t.length >= Qe && t.shift(), t.push(l), i && i(l);
290
+ t.length >= Je && t.shift(), t.push(l), i && i(l);
291
291
  };
292
292
  return console.error = function(...a) {
293
293
  s("error", a), e.apply(console, a);
@@ -309,7 +309,7 @@ function q(i, t, e) {
309
309
  n === "className" ? o.className = s : o.setAttribute(n, s);
310
310
  return o;
311
311
  }
312
- function Ge(i = 640) {
312
+ function Ze(i = 640) {
313
313
  return typeof window < "u" && window.innerWidth < i;
314
314
  }
315
315
  function ht(i, t, e) {
@@ -330,7 +330,7 @@ function ut(i, t = 0) {
330
330
  height: e.height + t * 2
331
331
  };
332
332
  }
333
- const Ze = "https://unpkg.com/@qaiddev/quests-embed@1/dist/qaid-quests.js", ti = (i) => (
333
+ const ti = "https://unpkg.com/@qaiddev/quests-embed@1/dist/qaid-quests.js", ei = (i) => (
334
334
  // The URL is a runtime value, not a static specifier — keep Vite from
335
335
  // trying to analyze/bundle it.
336
336
  import(
@@ -338,12 +338,12 @@ const Ze = "https://unpkg.com/@qaiddev/quests-embed@1/dist/qaid-quests.js", ti =
338
338
  i
339
339
  )
340
340
  );
341
- let ei = ti, L = null, F = null;
341
+ let ii = ei, L = null, F = null;
342
342
  const K = /* @__PURE__ */ new Map(), N = /* @__PURE__ */ new Map();
343
- function Dt(i, t) {
343
+ function Mt(i, t) {
344
344
  return `${i.replace(/\/+$/, "")}/${encodeURIComponent(t)}/definition`;
345
345
  }
346
- function ii(i) {
346
+ function oi(i) {
347
347
  if (K.has(i)) return Promise.resolve();
348
348
  const t = N.get(i);
349
349
  if (t) return t;
@@ -355,8 +355,8 @@ function ii(i) {
355
355
  });
356
356
  return N.set(i, e), e;
357
357
  }
358
- function Mt(i) {
359
- return L && F === i || (F = i, L = Promise.resolve(ei(i)).then((t) => {
358
+ function Rt(i) {
359
+ return L && F === i || (F = i, L = Promise.resolve(ii(i)).then((t) => {
360
360
  const e = t;
361
361
  if (!e || typeof e.QaidQuests != "function")
362
362
  throw new Error("quests module has no QaidQuests export");
@@ -365,8 +365,8 @@ function Mt(i) {
365
365
  throw L = null, F = null, t;
366
366
  })), L;
367
367
  }
368
- async function oi(i) {
369
- const t = await Mt(i.moduleUrl), e = i.base.replace(/\/+$/, ""), o = Dt(e, i.questId), n = (c) => c != null ? { feedbackId: c } : void 0;
368
+ async function ni(i) {
369
+ const t = await Rt(i.moduleUrl), e = i.base.replace(/\/+$/, ""), o = Mt(e, i.questId), n = (c) => c != null ? { feedbackId: c } : void 0;
370
370
  let s;
371
371
  const a = i.feedbackId;
372
372
  return a instanceof Promise ? s = t.QaidQuests.supports?.asyncMetadata ? a.then(n, () => {
@@ -381,7 +381,7 @@ async function oi(i) {
381
381
  onClose: i.onClose
382
382
  });
383
383
  }
384
- const pt = "qaid_visitor_id", ft = "qaid_hide_feedback", ni = [
384
+ const pt = "qaid_visitor_id", ft = "qaid_hide_feedback", si = [
385
385
  "#ef4444",
386
386
  "#f59e0b",
387
387
  "#22c55e",
@@ -389,13 +389,13 @@ const pt = "qaid_visitor_id", ft = "qaid_hide_feedback", ni = [
389
389
  "#111827",
390
390
  "#ffffff"
391
391
  ];
392
- function si() {
392
+ function ai() {
393
393
  return typeof window.matchMedia == "function" && window.matchMedia("(pointer: coarse)").matches;
394
394
  }
395
395
  function W(i) {
396
396
  return i ? `${ft}_${i}` : ft;
397
397
  }
398
- function ai(i) {
398
+ function ri(i) {
399
399
  try {
400
400
  return localStorage.getItem(W(i)) === "1";
401
401
  } catch {
@@ -420,7 +420,7 @@ function bt() {
420
420
  const e = Array.from(t, (o) => o.toString(16).padStart(2, "0")).join("");
421
421
  return `${e.slice(0, 8)}-${e.slice(8, 12)}-${e.slice(12, 16)}-${e.slice(16, 20)}-${e.slice(20)}`;
422
422
  }
423
- function ri() {
423
+ function di() {
424
424
  try {
425
425
  let i = localStorage.getItem(pt);
426
426
  return i || (i = bt(), localStorage.setItem(pt, i)), i;
@@ -428,7 +428,13 @@ function ri() {
428
428
  return bt();
429
429
  }
430
430
  }
431
- class di {
431
+ function gt(i, t) {
432
+ const e = document.createElement("style");
433
+ e.setAttribute("data-qaid-feature", ""), e.textContent = t;
434
+ const o = i.querySelectorAll("style[data-qaid-base], style[data-qaid-feature]"), n = o[o.length - 1];
435
+ i.insertBefore(e, n ? n.nextSibling : i.firstChild);
436
+ }
437
+ class ci {
432
438
  config;
433
439
  state = "IDLE";
434
440
  feedbackData = {
@@ -552,7 +558,7 @@ class di {
552
558
  captureScreenshot: t.captureScreenshot ?? !1,
553
559
  annotate: t.annotate ?? !0,
554
560
  annotationColor: t.annotationColor ?? t.colors?.marker ?? "#6365f1",
555
- annotationPalette: t.annotationPalette ?? ni,
561
+ annotationPalette: t.annotationPalette ?? si,
556
562
  screenshotMethod: t.screenshotMethod ?? "permission",
557
563
  screenshotOptions: {
558
564
  quality: t.screenshotOptions?.quality ?? 0.8,
@@ -579,12 +585,12 @@ class di {
579
585
  video: t.quests?.video ?? "",
580
586
  // Quest service reuses the feedback API key unless overridden.
581
587
  apiKey: t.quests?.apiKey ?? t.apiKey ?? "",
582
- moduleUrl: t.quests?.moduleUrl ?? Ze
588
+ moduleUrl: t.quests?.moduleUrl ?? ti
583
589
  }
584
- }, this.boundKeyDown = this.handleKeyDown.bind(this), this.boundResize = this.handleResize.bind(this), this.visitorId = ri(), this.init();
590
+ }, this.boundKeyDown = this.handleKeyDown.bind(this), this.boundResize = this.handleResize.bind(this), this.visitorId = di(), this.init();
585
591
  }
586
592
  applyVars(t) {
587
- Ae(t, this.cssVars);
593
+ Le(t, this.cssVars);
588
594
  }
589
595
  /**
590
596
  * Announce a message via the shared visually-hidden live regions.
@@ -594,7 +600,7 @@ class di {
594
600
  */
595
601
  announceMsg(t, e = !1) {
596
602
  const o = this.overlayShadowRoot ?? this.shadowRoot;
597
- o && Be(o, t, { assertive: e });
603
+ o && He(o, t, { assertive: e });
598
604
  }
599
605
  /**
600
606
  * Turn a transient surface into an accessible modal dialog: save the
@@ -602,16 +608,16 @@ class di {
602
608
  * background. Paired with closeDialogA11y() on every close path.
603
609
  */
604
610
  openDialogA11y(t, e) {
605
- this.dialogTrigger = $e(), Fe(t, e), this.dialogTrap = ze(t), this.dialogRestoreInert = Ve(t);
611
+ this.dialogTrigger = _e(), Ne(t, e), this.dialogTrap = $e(t), this.dialogRestoreInert = Ue(t);
606
612
  }
607
613
  closeDialogA11y() {
608
- this.dialogTrap?.release(), this.dialogTrap = null, this.dialogRestoreInert && (this.dialogRestoreInert(), this.dialogRestoreInert = null), _e(this.dialogTrigger), this.dialogTrigger = null;
614
+ this.dialogTrap?.release(), this.dialogTrap = null, this.dialogRestoreInert && (this.dialogRestoreInert(), this.dialogRestoreInert = null), Fe(this.dialogTrigger), this.dialogTrigger = null;
609
615
  }
610
616
  clearActiveThumb() {
611
617
  this.activeThumbBtn && (this.activeThumbBtn.setAttribute("aria-pressed", "false"), this.activeThumbBtn = null);
612
618
  }
613
619
  init() {
614
- Le(), this.cssVars = Ee({
620
+ Ie(), this.cssVars = Ae({
615
621
  positiveColor: this.config.colors.positive,
616
622
  negativeColor: this.config.colors.negative,
617
623
  markerColor: this.config.colors.marker,
@@ -620,7 +626,7 @@ class di {
620
626
  backdropOpacity: this.config.backdropOpacity,
621
627
  fontFamily: this.config.fontFamily,
622
628
  fontSize: this.config.fontSize
623
- }), !this.config.hideDismiss && ai(this.config.apiKey) && (this._startDismissed = !0), this.checkMobile(), window.addEventListener("resize", this.boundResize), this.createEmbed(), this.consoleCapture = Je((t) => {
629
+ }), !this.config.hideDismiss && ri(this.config.apiKey) && (this._startDismissed = !0), this.checkMobile(), window.addEventListener("resize", this.boundResize), this.createEmbed(), this.consoleCapture = Ge((t) => {
624
630
  this.feedbackData.consoleErrors = this.consoleCapture?.errors ?? [];
625
631
  }), this.feedbackData.consoleErrors = this.consoleCapture.errors, this.observeDom(), (this.config.captureVideo && this.videoSupported() || this.config.captureScreenshot || this.linkedQuestIds().length > 0) && this.schedulePrewarm(() => {
626
632
  this.config.captureVideo && this.videoSupported() && this.prewarmVideo(), this.config.captureScreenshot && this.prewarmScreenshot(), this.prewarmQuests();
@@ -633,13 +639,13 @@ class di {
633
639
  * swallowed — a failed preload just falls back to an on-demand load.
634
640
  */
635
641
  prewarmVideo() {
636
- this.videoPrewarmed || (this.videoPrewarmed = !0, Promise.resolve().then(() => qt).catch(() => {
637
- }), Promise.resolve().then(() => $t).catch(() => {
642
+ this.videoPrewarmed || (this.videoPrewarmed = !0, Promise.resolve().then(() => Ct).catch(() => {
643
+ }), Promise.resolve().then(() => _t).catch(() => {
638
644
  }));
639
645
  }
640
646
  prewarmScreenshot() {
641
- this.screenshotPrewarmed || (this.screenshotPrewarmed = !0, (this.shouldCaptureViaDom() ? Promise.resolve().then(() => wt) : Promise.resolve().then(() => Ct)).catch(() => {
642
- }), this.config.annotate && Promise.resolve().then(() => xt).catch(() => {
647
+ this.screenshotPrewarmed || (this.screenshotPrewarmed = !0, (this.shouldCaptureViaDom() ? Promise.resolve().then(() => kt) : Promise.resolve().then(() => St)).catch(() => {
648
+ }), this.config.annotate && Promise.resolve().then(() => qt).catch(() => {
643
649
  }));
644
650
  }
645
651
  /** Quest ids linked to any button, when quest launching is on. */
@@ -656,10 +662,10 @@ class di {
656
662
  if (this.questsPrewarmed) return;
657
663
  const t = this.linkedQuestIds();
658
664
  if (t.length !== 0) {
659
- this.questsPrewarmed = !0, Mt(this.config.quests.moduleUrl).catch(() => {
665
+ this.questsPrewarmed = !0, Rt(this.config.quests.moduleUrl).catch(() => {
660
666
  });
661
667
  for (const e of t)
662
- ii(Dt(this.config.quests.base, e));
668
+ oi(Mt(this.config.quests.base, e));
663
669
  }
664
670
  }
665
671
  /** Run fn when the main thread is idle; cancelled by destroy(). */
@@ -688,7 +694,7 @@ class di {
688
694
  }), this.domObserver.observe(document.body, { childList: !0 });
689
695
  }
690
696
  checkMobile() {
691
- this.isMobile = Ge();
697
+ this.isMobile = Ze();
692
698
  }
693
699
  handleResize() {
694
700
  this.checkMobile();
@@ -698,7 +704,7 @@ class di {
698
704
  let t = null;
699
705
  this.config.container && (t = document.querySelector(this.config.container)), t ? (t.appendChild(this.shadowHost), this.isUserProvidedContainer = !0, this.config.hideDismiss = !0) : (this.shadowHost.style.position = "fixed", this.shadowHost.style.display = "block", this.shadowHost.style.inset = "0", this.shadowHost.style.pointerEvents = "none", this.shadowHost.style.zIndex = String(this.config.zIndex), document.body.appendChild(this.shadowHost)), this.shadowRoot = this.shadowHost.attachShadow({ mode: "open" });
700
706
  const e = document.createElement("style");
701
- if (e.textContent = dt(), this.shadowRoot.appendChild(e), this.config.css) {
707
+ if (e.setAttribute("data-qaid-base", ""), e.textContent = dt(), this.shadowRoot.appendChild(e), this.config.css) {
702
708
  const d = document.createElement("style");
703
709
  d.textContent = this.config.css, this.shadowRoot.appendChild(d);
704
710
  }
@@ -722,7 +728,7 @@ class di {
722
728
  const d = document.createElement("div");
723
729
  d.className = "qaid-tooltip-wrapper";
724
730
  const r = document.createElement("button");
725
- r.type = "button", r.className = n ? `${s} qaid-btn-feedback` : "qaid-btn qaid-btn-feedback", r.setAttribute("aria-label", this.config.text.feedbackLabel), r.innerHTML = this.config.feedbackIcon || Et, r.addEventListener("click", (h) => this.handleThumbClick("neutral", h.currentTarget, h)), r.addEventListener("mouseenter", () => {
731
+ r.type = "button", r.className = n ? `${s} qaid-btn-feedback` : "qaid-btn qaid-btn-feedback", r.setAttribute("aria-label", this.config.text.feedbackLabel), r.innerHTML = this.config.feedbackIcon || At, r.addEventListener("click", (h) => this.handleThumbClick("neutral", h.currentTarget, h)), r.addEventListener("mouseenter", () => {
726
732
  this.prewarmTargeting(), this.showTooltip(r);
727
733
  }), r.addEventListener("mouseleave", () => this.hideTooltip()), d.appendChild(r), this.buttonsContainer.appendChild(d);
728
734
  } else if (!this.config.hideThumbs) {
@@ -743,7 +749,7 @@ class di {
743
749
  const d = document.createElement("div");
744
750
  d.className = "qaid-tooltip-wrapper";
745
751
  const r = document.createElement("button");
746
- r.type = "button", r.className = n ? `${s} qaid-btn-record` : "qaid-btn qaid-btn-record", r.setAttribute("aria-label", this.config.text.recordLabel), r.innerHTML = this.config.recordIcon || he, r.addEventListener("click", () => {
752
+ r.type = "button", r.className = n ? `${s} qaid-btn-record` : "qaid-btn qaid-btn-record", r.setAttribute("aria-label", this.config.text.recordLabel), r.innerHTML = this.config.recordIcon || ue, r.addEventListener("click", () => {
747
753
  this.ensureRecording().then(
748
754
  (f) => this.config.videoOptions.redaction ? f.startPicking() : f.startRecording()
749
755
  );
@@ -767,17 +773,34 @@ class di {
767
773
  if (this.overlayShadowRoot) return this.overlayShadowRoot;
768
774
  this.overlayShadowHost = document.createElement("div"), this.overlayShadowHost.setAttribute("data-qaid-embed-overlay", ""), this.overlayShadowHost.style.position = "fixed", this.overlayShadowHost.style.inset = "0", this.overlayShadowHost.style.pointerEvents = "none", this.overlayShadowHost.style.zIndex = String(this.config.zIndex), document.body.appendChild(this.overlayShadowHost), this.overlayShadowRoot = this.overlayShadowHost.attachShadow({ mode: "open" });
769
775
  const t = document.createElement("style");
770
- if (t.textContent = dt(), this.overlayShadowRoot.appendChild(t), this.config.css) {
776
+ t.setAttribute("data-qaid-base", ""), t.textContent = dt(), this.overlayShadowRoot.appendChild(t);
777
+ for (const e of this.featureStyles) gt(this.overlayShadowRoot, e);
778
+ if (this.config.css) {
771
779
  const e = document.createElement("style");
772
780
  e.textContent = this.config.css, this.overlayShadowRoot.appendChild(e);
773
781
  }
774
782
  return this.overlayShadowRoot;
775
783
  }
784
+ /** The styles of every feature chunk loaded so far, in load order. */
785
+ featureStyles = [];
786
+ /**
787
+ * Add a feature chunk's styles to both shadow roots. The core stylesheet
788
+ * styles only the buttons; the message box, targeting, video and markup
789
+ * editor bring their own CSS with their chunk, so a page that never opens
790
+ * them never downloads it.
791
+ */
792
+ addFeatureStyles(t) {
793
+ if (!this.featureStyles.includes(t)) {
794
+ this.featureStyles.push(t);
795
+ for (const e of [this.shadowRoot, this.overlayShadowRoot])
796
+ e && gt(e, t);
797
+ }
798
+ }
776
799
  tooltipElement = null;
777
800
  showTooltip(t) {
778
801
  const e = this.tooltipElement;
779
802
  e.style.visibility = "hidden", e.classList.add("qaid-tooltip-visible");
780
- const o = t.getBoundingClientRect(), n = e.getBoundingClientRect(), { top: s, left: a } = Xe(
803
+ const o = t.getBoundingClientRect(), n = e.getBoundingClientRect(), { top: s, left: a } = Ye(
781
804
  o,
782
805
  n,
783
806
  { width: window.innerWidth, height: window.innerHeight }
@@ -824,7 +847,7 @@ class di {
824
847
  * instead of the permission-based Screen Capture API. Explicit "dom" wins;
825
848
  * otherwise DOM is used on touch devices to avoid the getDisplayMedia prompt. */
826
849
  shouldCaptureViaDom() {
827
- return this.config.screenshotMethod === "dom" || si();
850
+ return this.config.screenshotMethod === "dom" || ai();
828
851
  }
829
852
  /**
830
853
  * Open the full-screen annotation editor over the captured screenshot,
@@ -837,16 +860,16 @@ class di {
837
860
  const e = this.ensureOverlayHost(), o = this.overlayShadowHost, n = o.style.pointerEvents;
838
861
  o.style.pointerEvents = "auto";
839
862
  try {
840
- const { openAnnotationEditor: s } = await Promise.resolve().then(() => xt);
841
- return await s({
863
+ const { openAnnotationEditor: s, styles: a } = await Promise.resolve().then(() => qt);
864
+ return this.addFeatureStyles(a), await s({
842
865
  dataUrl: t,
843
866
  root: e,
844
867
  quality: this.config.screenshotOptions.quality,
845
868
  color: this.config.annotationColor,
846
869
  palette: this.config.annotationPalette,
847
- applyVars: (a) => this.applyVars(a),
848
- announce: (a, c) => this.announceMsg(a, c),
849
- openDialog: (a, c) => this.openDialogA11y(a, c),
870
+ applyVars: (c) => this.applyVars(c),
871
+ announce: (c, l) => this.announceMsg(c, l),
872
+ openDialog: (c, l) => this.openDialogA11y(c, l),
850
873
  closeDialog: () => this.closeDialogA11y()
851
874
  });
852
875
  } catch (s) {
@@ -860,10 +883,10 @@ class di {
860
883
  if (this.config.captureScreenshot || this.config.feedbackMode === "annotate")
861
884
  try {
862
885
  if (this.shouldCaptureViaDom()) {
863
- const { captureDomScreenshot: a } = await Promise.resolve().then(() => wt);
886
+ const { captureDomScreenshot: a } = await Promise.resolve().then(() => kt);
864
887
  t = await a(this.config.screenshotOptions);
865
888
  } else {
866
- const { captureScreenshot: a } = await Promise.resolve().then(() => Ct);
889
+ const { captureScreenshot: a } = await Promise.resolve().then(() => St);
867
890
  t = await a(this.config.screenshotOptions);
868
891
  }
869
892
  t && this.announceMsg("Screenshot captured");
@@ -946,7 +969,7 @@ class di {
946
969
  const o = this.questIdFor(t);
947
970
  if (!o) return !1;
948
971
  try {
949
- return this.activeQuest?.destroy(), this.activeQuest = await oi({
972
+ return this.activeQuest?.destroy(), this.activeQuest = await ni({
950
973
  questId: o,
951
974
  base: this.config.quests.base,
952
975
  apiKey: this.config.quests.apiKey || void 0,
@@ -975,8 +998,8 @@ class di {
975
998
  */
976
999
  async ensureModal() {
977
1000
  if (!this.modal) {
978
- const { ModalController: t } = await Promise.resolve().then(() => St);
979
- this.modal = new t(this.makeModalHost());
1001
+ const { ModalController: t, styles: e } = await Promise.resolve().then(() => Tt);
1002
+ this.addFeatureStyles(e), this.modal = new t(this.makeModalHost());
980
1003
  }
981
1004
  return this.modal;
982
1005
  }
@@ -1016,7 +1039,7 @@ class di {
1016
1039
  }
1017
1040
  /** Warm the modal chunk while the user is targeting, so it opens instantly. */
1018
1041
  prewarmModal() {
1019
- this.modalPrewarmed || (this.modalPrewarmed = !0, Promise.resolve().then(() => St).catch(() => {
1042
+ this.modalPrewarmed || (this.modalPrewarmed = !0, Promise.resolve().then(() => Tt).catch(() => {
1020
1043
  }));
1021
1044
  }
1022
1045
  /**
@@ -1026,8 +1049,8 @@ class di {
1026
1049
  */
1027
1050
  async ensureTargeting() {
1028
1051
  if (!this.targeting) {
1029
- const { TargetingController: t } = await Promise.resolve().then(() => Tt);
1030
- this.targeting = new t(this.makeTargetingHost());
1052
+ const { TargetingController: t, styles: e } = await Promise.resolve().then(() => Et);
1053
+ this.addFeatureStyles(e), this.targeting = new t(this.makeTargetingHost());
1031
1054
  }
1032
1055
  return this.targeting;
1033
1056
  }
@@ -1071,7 +1094,7 @@ class di {
1071
1094
  }
1072
1095
  /** Warm the targeting chunk on thumb-button hover, before the click. */
1073
1096
  prewarmTargeting() {
1074
- this.targetingPrewarmed || this.config.skipTargeting || (this.targetingPrewarmed = !0, Promise.resolve().then(() => Tt).catch(() => {
1097
+ this.targetingPrewarmed || this.config.skipTargeting || (this.targetingPrewarmed = !0, Promise.resolve().then(() => Et).catch(() => {
1075
1098
  }));
1076
1099
  }
1077
1100
  // ==================== Video Recording ====================
@@ -1090,8 +1113,8 @@ class di {
1090
1113
  */
1091
1114
  async ensureRecording() {
1092
1115
  if (!this.recording) {
1093
- const { RecordingController: t } = await Promise.resolve().then(() => qt);
1094
- this.recording = new t(this.makeRecordingHost());
1116
+ const { RecordingController: t, styles: e } = await Promise.resolve().then(() => Ct);
1117
+ this.addFeatureStyles(e), this.recording = new t(this.makeRecordingHost());
1095
1118
  }
1096
1119
  return this.recording;
1097
1120
  }
@@ -1146,13 +1169,13 @@ class di {
1146
1169
  const t = window;
1147
1170
  this.prewarmIsTimeout ? clearTimeout(this.prewarmHandle) : t.cancelIdleCallback?.(this.prewarmHandle), this.prewarmHandle = null;
1148
1171
  }
1149
- this.recording?.destroy(), this.recording = null, this.modal?.destroy(), this.modal = null, this.activeQuest?.destroy(), this.activeQuest = null, this.consoleCapture && (this.consoleCapture.restore(), this.consoleCapture = null), window.removeEventListener("resize", this.boundResize), document.removeEventListener("keydown", this.boundKeyDown), document.body.classList.remove("qaid-targeting", "qaid-type-up"), document.body.style.removeProperty("--qaid-positive"), document.body.style.removeProperty("--qaid-negative"), this.shadowHost && (this.shadowHost.remove(), this.shadowHost = null, this.shadowRoot = null), this.overlayShadowHost && (this.overlayShadowHost.remove(), this.overlayShadowHost = null, this.overlayShadowRoot = null), this.buttonsContainer = null, this.dismissBtn = null, this.tooltipElement = null, Ie();
1172
+ this.recording?.destroy(), this.recording = null, this.modal?.destroy(), this.modal = null, this.activeQuest?.destroy(), this.activeQuest = null, this.consoleCapture && (this.consoleCapture.restore(), this.consoleCapture = null), window.removeEventListener("resize", this.boundResize), document.removeEventListener("keydown", this.boundKeyDown), document.body.classList.remove("qaid-targeting", "qaid-type-up"), document.body.style.removeProperty("--qaid-positive"), document.body.style.removeProperty("--qaid-negative"), this.shadowHost && (this.shadowHost.remove(), this.shadowHost = null, this.shadowRoot = null), this.overlayShadowHost && (this.overlayShadowHost.remove(), this.overlayShadowHost = null, this.overlayShadowRoot = null), this.buttonsContainer = null, this.dismissBtn = null, this.tooltipElement = null, De();
1150
1173
  }
1151
1174
  }
1152
- function Rt(i) {
1175
+ function Pt(i) {
1153
1176
  return document.querySelector(i)?.textContent?.trim() ?? "";
1154
1177
  }
1155
- function ci() {
1178
+ function li() {
1156
1179
  const i = document.querySelector(
1157
1180
  'script[type="application/json"][data-feedback-config]'
1158
1181
  );
@@ -1161,22 +1184,22 @@ function ci() {
1161
1184
  if (!t) return null;
1162
1185
  try {
1163
1186
  const e = JSON.parse(t);
1164
- return e.cssSelector && !e.css && (e.css = Rt(e.cssSelector), delete e.cssSelector), e;
1187
+ return e.cssSelector && !e.css && (e.css = Pt(e.cssSelector), delete e.cssSelector), e;
1165
1188
  } catch {
1166
1189
  return null;
1167
1190
  }
1168
1191
  }
1169
- function Pt(i, t, e) {
1192
+ function Bt(i, t, e) {
1170
1193
  console.warn(`[thumbs-embed] Ignoring ${i}="${t}": expected ${e}.`);
1171
1194
  }
1172
- function li(i) {
1195
+ function hi(i) {
1173
1196
  const t = [];
1174
1197
  let e = 0, o = "";
1175
1198
  for (const n of i)
1176
1199
  n === "(" && e++, n === ")" && (e = Math.max(0, e - 1)), n === "," && e === 0 ? (t.push(o.trim()), o = "") : o += n;
1177
1200
  return t.push(o.trim()), t;
1178
1201
  }
1179
- function hi(i, t) {
1202
+ function ui(i, t) {
1180
1203
  if (t === null) return;
1181
1204
  const e = t.trim();
1182
1205
  let o = null;
@@ -1187,38 +1210,38 @@ function hi(i, t) {
1187
1210
  o = null;
1188
1211
  }
1189
1212
  else
1190
- o = li(e);
1213
+ o = hi(e);
1191
1214
  if (Array.isArray(o) && o.length > 0 && o.every((n) => typeof n == "string" && n.trim() !== ""))
1192
1215
  return o.map((n) => n.trim());
1193
- Pt(i, t, "a JSON array of colours or a comma-separated list");
1216
+ Bt(i, t, "a JSON array of colours or a comma-separated list");
1194
1217
  }
1195
1218
  function M(i, t) {
1196
1219
  if (t !== null) {
1197
1220
  if (t.trim() === "") {
1198
- Pt(i, t, "a non-empty label");
1221
+ Bt(i, t, "a non-empty label");
1199
1222
  return;
1200
1223
  }
1201
1224
  return t;
1202
1225
  }
1203
1226
  }
1204
- function ui(i) {
1227
+ function pi(i) {
1205
1228
  const t = i.getAttribute("data-endpoint");
1206
1229
  if (!t) return null;
1207
- const e = i.getAttribute("data-position"), o = i.getAttribute("data-zindex"), n = i.getAttribute("data-positive-color"), s = i.getAttribute("data-negative-color"), a = i.getAttribute("data-marker-color"), c = i.getAttribute("data-container"), l = i.getAttribute("data-button-class"), d = i.getAttribute("data-skip-targeting"), r = i.getAttribute("data-hide-confirmation"), h = i.getAttribute("data-single-button"), f = i.getAttribute("data-feedback-mode"), b = i.getAttribute("data-incognito"), y = i.getAttribute("data-button-size"), g = i.getAttribute("data-offset-x"), w = i.getAttribute("data-offset-y"), x = i.getAttribute("data-modal-width"), u = i.getAttribute("data-backdrop-opacity"), k = i.getAttribute("data-font-family"), v = i.getAttribute("data-font-size"), C = i.getAttribute("data-tooltip"), A = i.getAttribute("data-modal-title"), S = i.getAttribute("data-confirmation-title"), m = i.getAttribute("data-confirmation-message"), T = i.getAttribute("data-confirmation-close"), X = i.getAttribute("data-error-title"), Y = i.getAttribute("data-error-message"), Q = i.getAttribute("data-modal-subtitle"), J = i.getAttribute("data-placeholder"), G = i.getAttribute("data-submit-button"), Z = i.getAttribute("data-skip-button"), jt = i.getAttribute("data-positive-icon"), Kt = i.getAttribute("data-negative-icon"), Wt = i.getAttribute("data-feedback-icon"), tt = i.getAttribute("data-feedback-label"), Xt = i.getAttribute("data-api-key"), Yt = i.getAttribute("data-capture-screenshot"), Qt = i.getAttribute("data-annotate"), Jt = i.getAttribute("data-annotation-color"), O = i.getAttribute("data-screenshot-quality"), z = i.getAttribute("data-screenshot-max-width"), $ = i.getAttribute("data-screenshot-max-height"), Gt = i.getAttribute("data-capture-video"), et = i.getAttribute("data-video-redaction"), Zt = i.getAttribute("data-hide-thumbs"), te = i.getAttribute("data-hide-dismiss"), _ = i.getAttribute("data-video-max-duration"), ee = i.getAttribute("data-screenshot-method"), ie = i.getAttribute("data-direction"), it = i.getAttribute("data-css-selector"), oe = i.getAttribute("data-css"), ot = M("data-positive-label", i.getAttribute("data-positive-label")), nt = M("data-negative-label", i.getAttribute("data-negative-label")), st = M("data-record-label", i.getAttribute("data-record-label")), at = M("data-dismiss-label", i.getAttribute("data-dismiss-label")), ne = hi(
1230
+ const e = i.getAttribute("data-position"), o = i.getAttribute("data-zindex"), n = i.getAttribute("data-positive-color"), s = i.getAttribute("data-negative-color"), a = i.getAttribute("data-marker-color"), c = i.getAttribute("data-container"), l = i.getAttribute("data-button-class"), d = i.getAttribute("data-skip-targeting"), r = i.getAttribute("data-hide-confirmation"), h = i.getAttribute("data-single-button"), f = i.getAttribute("data-feedback-mode"), b = i.getAttribute("data-incognito"), y = i.getAttribute("data-button-size"), g = i.getAttribute("data-offset-x"), w = i.getAttribute("data-offset-y"), x = i.getAttribute("data-modal-width"), u = i.getAttribute("data-backdrop-opacity"), k = i.getAttribute("data-font-family"), v = i.getAttribute("data-font-size"), C = i.getAttribute("data-tooltip"), A = i.getAttribute("data-modal-title"), S = i.getAttribute("data-confirmation-title"), m = i.getAttribute("data-confirmation-message"), T = i.getAttribute("data-confirmation-close"), X = i.getAttribute("data-error-title"), Y = i.getAttribute("data-error-message"), Q = i.getAttribute("data-modal-subtitle"), J = i.getAttribute("data-placeholder"), G = i.getAttribute("data-submit-button"), Z = i.getAttribute("data-skip-button"), Kt = i.getAttribute("data-positive-icon"), Wt = i.getAttribute("data-negative-icon"), Xt = i.getAttribute("data-feedback-icon"), tt = i.getAttribute("data-feedback-label"), Yt = i.getAttribute("data-api-key"), Qt = i.getAttribute("data-capture-screenshot"), Jt = i.getAttribute("data-annotate"), Gt = i.getAttribute("data-annotation-color"), O = i.getAttribute("data-screenshot-quality"), z = i.getAttribute("data-screenshot-max-width"), $ = i.getAttribute("data-screenshot-max-height"), Zt = i.getAttribute("data-capture-video"), et = i.getAttribute("data-video-redaction"), te = i.getAttribute("data-hide-thumbs"), ee = i.getAttribute("data-hide-dismiss"), _ = i.getAttribute("data-video-max-duration"), ie = i.getAttribute("data-screenshot-method"), oe = i.getAttribute("data-direction"), it = i.getAttribute("data-css-selector"), ne = i.getAttribute("data-css"), ot = M("data-positive-label", i.getAttribute("data-positive-label")), nt = M("data-negative-label", i.getAttribute("data-negative-label")), st = M("data-record-label", i.getAttribute("data-record-label")), at = M("data-dismiss-label", i.getAttribute("data-dismiss-label")), se = ui(
1208
1231
  "data-annotation-palette",
1209
1232
  i.getAttribute("data-annotation-palette")
1210
- ), se = i.getAttribute("data-record-icon"), rt = i.getAttribute("data-quest-base"), ae = i.getAttribute("data-quest-up"), re = i.getAttribute("data-quest-down"), de = i.getAttribute("data-quest-video"), ce = i.getAttribute("data-quest-api-key"), le = i.getAttribute("data-quest-module-url");
1233
+ ), ae = i.getAttribute("data-record-icon"), rt = i.getAttribute("data-quest-base"), re = i.getAttribute("data-quest-up"), de = i.getAttribute("data-quest-down"), ce = i.getAttribute("data-quest-video"), le = i.getAttribute("data-quest-api-key"), he = i.getAttribute("data-quest-module-url");
1211
1234
  return {
1212
1235
  endpoint: t,
1213
1236
  // Inline CSS wins over a selector, as `css` wins over `cssSelector` in
1214
1237
  // the JSON block.
1215
- css: oe || (it ? Rt(it) : void 0),
1216
- apiKey: Xt ?? void 0,
1217
- captureScreenshot: Yt === "true" ? !0 : void 0,
1238
+ css: ne || (it ? Pt(it) : void 0),
1239
+ apiKey: Yt ?? void 0,
1240
+ captureScreenshot: Qt === "true" ? !0 : void 0,
1218
1241
  // Annotation is on by default; only an explicit "false" disables it.
1219
- annotate: Qt === "false" ? !1 : void 0,
1220
- annotationColor: Jt ?? void 0,
1221
- annotationPalette: ne,
1242
+ annotate: Jt === "false" ? !1 : void 0,
1243
+ annotationColor: Gt ?? void 0,
1244
+ annotationPalette: se,
1222
1245
  screenshotOptions: O || z || $ ? {
1223
1246
  quality: O ? parseFloat(O) : void 0,
1224
1247
  maxWidth: z ? parseInt(z, 10) : void 0,
@@ -1226,7 +1249,7 @@ function ui(i) {
1226
1249
  } : void 0,
1227
1250
  container: c ?? void 0,
1228
1251
  buttonClass: l ?? void 0,
1229
- direction: ie ?? void 0,
1252
+ direction: oe ?? void 0,
1230
1253
  position: e ?? void 0,
1231
1254
  zIndex: o ? parseInt(o, 10) : void 0,
1232
1255
  skipTargeting: d === "true" ? !0 : void 0,
@@ -1266,45 +1289,45 @@ function ui(i) {
1266
1289
  recordLabel: st,
1267
1290
  dismissLabel: at
1268
1291
  } : void 0,
1269
- positiveIcon: jt ?? void 0,
1270
- recordIcon: se ?? void 0,
1271
- negativeIcon: Kt ?? void 0,
1272
- feedbackIcon: Wt ?? void 0,
1273
- screenshotMethod: ee ?? void 0,
1274
- captureVideo: Gt === "true" ? !0 : void 0,
1275
- hideThumbs: Zt === "true" ? !0 : void 0,
1276
- hideDismiss: te === "true" ? !0 : void 0,
1292
+ positiveIcon: Kt ?? void 0,
1293
+ recordIcon: ae ?? void 0,
1294
+ negativeIcon: Wt ?? void 0,
1295
+ feedbackIcon: Xt ?? void 0,
1296
+ screenshotMethod: ie ?? void 0,
1297
+ captureVideo: Zt === "true" ? !0 : void 0,
1298
+ hideThumbs: te === "true" ? !0 : void 0,
1299
+ hideDismiss: ee === "true" ? !0 : void 0,
1277
1300
  videoOptions: _ || et ? {
1278
1301
  maxDuration: _ ? parseInt(_, 10) : void 0,
1279
1302
  redaction: et === "true" ? !0 : void 0
1280
1303
  } : void 0,
1281
1304
  quests: rt ? {
1282
1305
  base: rt,
1283
- up: ae ?? void 0,
1284
- down: re ?? void 0,
1285
- video: de ?? void 0,
1286
- apiKey: ce ?? void 0,
1287
- moduleUrl: le ?? void 0
1306
+ up: re ?? void 0,
1307
+ down: de ?? void 0,
1308
+ video: ce ?? void 0,
1309
+ apiKey: le ?? void 0,
1310
+ moduleUrl: he ?? void 0
1288
1311
  } : void 0
1289
1312
  };
1290
1313
  }
1291
- function pi() {
1314
+ function fi() {
1292
1315
  if (typeof document > "u") return;
1293
1316
  const i = () => {
1294
- const t = document.currentScript ?? document.querySelector("script[data-endpoint]"), e = ci() ?? (t ? ui(t) : null);
1295
- e?.endpoint && new di(e);
1317
+ const t = document.currentScript ?? document.querySelector("script[data-endpoint]"), e = li() ?? (t ? pi(t) : null);
1318
+ e?.endpoint && new ci(e);
1296
1319
  };
1297
1320
  document.readyState === "loading" ? document.addEventListener("DOMContentLoaded", i) : i();
1298
1321
  }
1299
- const fi = 20, gt = 4096;
1322
+ const mi = 20, vt = 4096;
1300
1323
  function P(i) {
1301
1324
  const t = typeof i == "string" ? i : JSON.stringify(i);
1302
- return t.length > gt ? t.slice(0, gt) + "…[truncated]" : t;
1325
+ return t.length > vt ? t.slice(0, vt) + "…[truncated]" : t;
1303
1326
  }
1304
- function vt(i, t) {
1305
- i.length >= fi && i.shift(), i.push(t);
1327
+ function yt(i, t) {
1328
+ i.length >= mi && i.shift(), i.push(t);
1306
1329
  }
1307
- async function mi(i) {
1330
+ async function bi(i) {
1308
1331
  try {
1309
1332
  const t = await i.clone().text();
1310
1333
  return P(t);
@@ -1312,7 +1335,7 @@ async function mi(i) {
1312
1335
  return;
1313
1336
  }
1314
1337
  }
1315
- function bi() {
1338
+ function gi() {
1316
1339
  const i = [], t = window.fetch;
1317
1340
  window.fetch = async function(n, s) {
1318
1341
  const a = typeof n == "string" ? n : n instanceof URL ? n.toString() : n.url, c = s?.method ?? (typeof n == "object" && "method" in n ? n.method : "GET");
@@ -1320,8 +1343,8 @@ function bi() {
1320
1343
  s?.body && (l = P(s.body));
1321
1344
  const d = await t.apply(window, [n, s]);
1322
1345
  if (d.status >= 400) {
1323
- const r = await mi(d);
1324
- vt(i, {
1346
+ const r = await bi(d);
1347
+ yt(i, {
1325
1348
  url: a,
1326
1349
  method: c.toUpperCase(),
1327
1350
  status: d.status,
@@ -1339,7 +1362,7 @@ function bi() {
1339
1362
  }, XMLHttpRequest.prototype.send = function(n) {
1340
1363
  const s = this, a = n ? P(n) : void 0;
1341
1364
  return s.addEventListener("load", function() {
1342
- s.status >= 400 && vt(i, {
1365
+ s.status >= 400 && yt(i, {
1343
1366
  url: s._qaid_url,
1344
1367
  method: s._qaid_method.toUpperCase(),
1345
1368
  status: s.status,
@@ -1356,27 +1379,27 @@ function bi() {
1356
1379
  }
1357
1380
  };
1358
1381
  }
1359
- function gi() {
1382
+ function vi() {
1360
1383
  const i = navigator.userAgent || "";
1361
1384
  return /iP(hone|ad|od)/.test(i) || // iPadOS 13+ masquerades as "MacIntel" but is a multi-touch device.
1362
1385
  navigator.platform === "MacIntel" && (navigator.maxTouchPoints || 0) > 1;
1363
1386
  }
1364
- function vi(i, t, e, o, n) {
1387
+ function yi(i, t, e, o, n) {
1365
1388
  const s = i >= t, a = e >= o;
1366
1389
  return s === a ? { width: i, height: t, rotate: 0 } : { width: t, height: i, rotate: n === 270 ? -90 : 90 };
1367
1390
  }
1368
- function yi(i, t, e) {
1391
+ function wi(i, t, e) {
1369
1392
  if (e.rotate === 0) {
1370
1393
  i.drawImage(t, 0, 0, e.width, e.height);
1371
1394
  return;
1372
1395
  }
1373
1396
  i.save(), e.rotate === 90 ? (i.translate(e.width, 0), i.rotate(Math.PI / 2)) : (i.translate(0, e.height), i.rotate(-Math.PI / 2)), i.drawImage(t, 0, 0, e.height, e.width), i.restore();
1374
1397
  }
1375
- function wi() {
1398
+ function ki() {
1376
1399
  const i = typeof screen < "u" ? screen.orientation : void 0;
1377
1400
  return i && typeof i.angle == "number" ? i.angle : 0;
1378
1401
  }
1379
- function Bt(i) {
1402
+ function Ht(i) {
1380
1403
  return new Promise((t) => {
1381
1404
  if (i.videoWidth > 0) {
1382
1405
  t();
@@ -1385,30 +1408,30 @@ function Bt(i) {
1385
1408
  i.addEventListener("loadedmetadata", () => t(), { once: !0 });
1386
1409
  });
1387
1410
  }
1388
- async function Ht(i) {
1411
+ async function Ot(i) {
1389
1412
  try {
1390
1413
  await i.play();
1391
1414
  } catch {
1392
1415
  }
1393
1416
  }
1394
- async function ki(i, t = 15) {
1417
+ async function xi(i, t = 15) {
1395
1418
  const e = document.createElement("canvas");
1396
1419
  if (typeof e.captureStream != "function") return null;
1397
1420
  const o = e.getContext("2d");
1398
1421
  if (!o) return null;
1399
1422
  const n = document.createElement("video");
1400
- n.muted = !0, n.playsInline = !0, n.srcObject = i, await Bt(n);
1401
- const s = vi(
1423
+ n.muted = !0, n.playsInline = !0, n.srcObject = i, await Ht(n);
1424
+ const s = yi(
1402
1425
  n.videoWidth,
1403
1426
  n.videoHeight,
1404
1427
  window.innerWidth,
1405
1428
  window.innerHeight,
1406
- wi()
1429
+ ki()
1407
1430
  );
1408
- e.width = s.width, e.height = s.height, await Ht(n);
1431
+ e.width = s.width, e.height = s.height, await Ot(n);
1409
1432
  let a = 0;
1410
1433
  const c = () => {
1411
- yi(o, n, s), a = requestAnimationFrame(c);
1434
+ wi(o, n, s), a = requestAnimationFrame(c);
1412
1435
  };
1413
1436
  c();
1414
1437
  const l = e.captureStream(t);
@@ -1419,15 +1442,15 @@ async function ki(i, t = 15) {
1419
1442
  }
1420
1443
  };
1421
1444
  }
1422
- function xi(i, t, e, o, n) {
1445
+ function qi(i, t, e, o, n) {
1423
1446
  const s = Math.max(0, Math.min(o, i.left * t)), a = Math.max(0, Math.min(n, i.top * e)), c = Math.max(0, Math.min(o, (i.left + i.width) * t)), l = Math.max(0, Math.min(n, (i.top + i.height) * e)), d = c - s, r = l - a;
1424
1447
  return d <= 0 || r <= 0 ? null : { x: s, y: a, w: d, h: r };
1425
1448
  }
1426
- function qi(i, t, e, o, n, s, a) {
1449
+ function Ci(i, t, e, o, n, s, a) {
1427
1450
  i.drawImage(t, 0, 0, o, n);
1428
1451
  const c = o / Math.max(1, window.innerWidth), l = n / Math.max(1, window.innerHeight);
1429
1452
  for (const d of e) {
1430
- const r = xi(
1453
+ const r = qi(
1431
1454
  d.getBoundingClientRect(),
1432
1455
  c,
1433
1456
  l,
@@ -1437,16 +1460,16 @@ function qi(i, t, e, o, n, s, a) {
1437
1460
  r && (i.save(), a ? (i.filter = `blur(${s}px)`, i.drawImage(t, r.x, r.y, r.w, r.h, r.x, r.y, r.w, r.h)) : (i.fillStyle = "#0b0b0b", i.fillRect(r.x, r.y, r.w, r.h)), i.restore());
1438
1461
  }
1439
1462
  }
1440
- async function Ci(i, t, e = {}) {
1463
+ async function Si(i, t, e = {}) {
1441
1464
  const o = e.frameRate ?? 15, n = e.blurRadius ?? 12, s = document.createElement("canvas");
1442
1465
  if (typeof s.captureStream != "function") return null;
1443
1466
  const a = s.getContext("2d");
1444
1467
  if (!a) return null;
1445
1468
  const c = "filter" in a, l = document.createElement("video");
1446
- l.muted = !0, l.playsInline = !0, l.srcObject = i, await Bt(l), s.width = l.videoWidth, s.height = l.videoHeight, await Ht(l);
1469
+ l.muted = !0, l.playsInline = !0, l.srcObject = i, await Ht(l), s.width = l.videoWidth, s.height = l.videoHeight, await Ot(l);
1447
1470
  let d = 0;
1448
1471
  const r = () => {
1449
- qi(
1472
+ Ci(
1450
1473
  a,
1451
1474
  l,
1452
1475
  t,
@@ -1465,11 +1488,11 @@ async function Ci(i, t, e = {}) {
1465
1488
  }
1466
1489
  };
1467
1490
  }
1468
- const Ot = "This browser cannot blur the areas you picked, so the recording was not started.";
1469
- function Si() {
1491
+ const zt = "This browser cannot blur the areas you picked, so the recording was not started.";
1492
+ function Ti() {
1470
1493
  return typeof navigator < "u" && !!navigator.mediaDevices && typeof navigator.mediaDevices.getDisplayMedia == "function" && typeof MediaRecorder < "u";
1471
1494
  }
1472
- function zt() {
1495
+ function $t() {
1473
1496
  if (typeof MediaRecorder > "u") return "";
1474
1497
  const i = [
1475
1498
  "video/webm;codecs=vp9",
@@ -1482,7 +1505,7 @@ function zt() {
1482
1505
  return t;
1483
1506
  return "";
1484
1507
  }
1485
- function Ti(i = {}) {
1508
+ function Ei(i = {}) {
1486
1509
  const t = i.maxDuration ?? 15, e = i.videoBitsPerSecond ?? 8e5, o = i.redactionElements ?? [], n = i.redactionBlurRadius;
1487
1510
  let s = null, a = null, c = null, l = null, d = [], r = null, h = null, f = null, b = 0, y = null, g = null, w = !1, x = null;
1488
1511
  function u() {
@@ -1494,7 +1517,7 @@ function Ti(i = {}) {
1494
1517
  return {
1495
1518
  async start() {
1496
1519
  w = !1, d = [];
1497
- const v = zt();
1520
+ const v = $t();
1498
1521
  if (!v)
1499
1522
  throw new Error("No supported video MIME type found");
1500
1523
  s = await navigator.mediaDevices.getDisplayMedia({
@@ -1518,16 +1541,16 @@ function Ti(i = {}) {
1518
1541
  k();
1519
1542
  });
1520
1543
  let S = s;
1521
- if (gi()) {
1522
- const m = await ki(s);
1544
+ if (vi()) {
1545
+ const m = await xi(s);
1523
1546
  m && (a = m, S = m.stream);
1524
1547
  }
1525
1548
  if (o.length > 0) {
1526
- const m = await Ci(S, o, {
1549
+ const m = await Si(S, o, {
1527
1550
  blurRadius: n
1528
1551
  });
1529
1552
  if (!m)
1530
- throw a && (a.stop(), a = null), s.getTracks().forEach((T) => T.stop()), s = null, new Error(Ot);
1553
+ throw a && (a.stop(), a = null), s.getTracks().forEach((T) => T.stop()), s = null, new Error(zt);
1531
1554
  c = m, S = m.stream;
1532
1555
  }
1533
1556
  l = new MediaRecorder(S, {
@@ -1563,46 +1586,46 @@ function Ti(i = {}) {
1563
1586
  }
1564
1587
  };
1565
1588
  }
1566
- const $t = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1589
+ const _t = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1567
1590
  __proto__: null,
1568
- REDACTION_UNAVAILABLE: Ot,
1569
- createVideoRecorder: Ti,
1570
- getSupportedMimeType: zt,
1571
- isVideoRecordingSupported: Si
1572
- }, Symbol.toStringTag, { value: "Module" })), yt = "https://qaid.dev/lib/html2canvas.min.js", Ei = 1e4, Ai = 50;
1591
+ REDACTION_UNAVAILABLE: zt,
1592
+ createVideoRecorder: Ei,
1593
+ getSupportedMimeType: $t,
1594
+ isVideoRecordingSupported: Ti
1595
+ }, Symbol.toStringTag, { value: "Module" })), wt = "https://qaid.dev/lib/html2canvas.min.js", Ai = 1e4, Li = 50;
1573
1596
  let I = null;
1574
- function Li() {
1597
+ function Ii() {
1575
1598
  if (typeof document > "u" || typeof window > "u")
1576
1599
  return !1;
1577
1600
  const i = document.createElement("canvas");
1578
1601
  return typeof i.getContext == "function" && !!i.getContext("2d");
1579
1602
  }
1580
- function Ii() {
1603
+ function Di() {
1581
1604
  return window.html2canvas ? Promise.resolve(!0) : I || (I = new Promise((i) => {
1582
1605
  if (!document.querySelector(
1583
- `script[src="${yt}"]`
1606
+ `script[src="${wt}"]`
1584
1607
  )) {
1585
1608
  const n = document.createElement("script");
1586
- n.src = yt, n.async = !0, document.head.appendChild(n);
1609
+ n.src = wt, n.async = !0, document.head.appendChild(n);
1587
1610
  }
1588
1611
  const e = Date.now(), o = () => {
1589
1612
  if (window.html2canvas) {
1590
1613
  i(!0);
1591
1614
  return;
1592
1615
  }
1593
- if (Date.now() - e > Ei) {
1616
+ if (Date.now() - e > Ai) {
1594
1617
  I = null, i(!1);
1595
1618
  return;
1596
1619
  }
1597
- setTimeout(o, Ai);
1620
+ setTimeout(o, Li);
1598
1621
  };
1599
1622
  o();
1600
1623
  }), I);
1601
1624
  }
1602
- async function Di(i = {}) {
1625
+ async function Mi(i = {}) {
1603
1626
  const { quality: t = 0.8, maxWidth: e = 1280, maxHeight: o = 800 } = i;
1604
1627
  try {
1605
- if (!await Ii() || !window.html2canvas)
1628
+ if (!await Di() || !window.html2canvas)
1606
1629
  return console.warn("html2canvas failed to load"), null;
1607
1630
  const s = await window.html2canvas(document.body, {
1608
1631
  useCORS: !0,
@@ -1627,11 +1650,11 @@ async function Di(i = {}) {
1627
1650
  return console.warn("DOM screenshot capture failed:", n), null;
1628
1651
  }
1629
1652
  }
1630
- const wt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1653
+ const kt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1631
1654
  __proto__: null,
1632
- captureDomScreenshot: Di,
1633
- isDomScreenshotSupported: Li
1634
- }, Symbol.toStringTag, { value: "Module" })), E = 12, Mi = "#ef4444", Ri = ["#ef4444", "#f59e0b", "#22c55e", "#3b82f6", "#111827", "#ffffff"], Pi = {
1655
+ captureDomScreenshot: Mi,
1656
+ isDomScreenshotSupported: Ii
1657
+ }, Symbol.toStringTag, { value: "Module" })), Ri = ".qaid-annotate{position:fixed;inset:0;z-index:2147483000;display:flex;flex-direction:column;gap:.75rem;padding:16px;padding-top:max(16px,env(safe-area-inset-top));padding-bottom:max(16px,env(safe-area-inset-bottom));box-sizing:border-box;background:#000000d9;font-family:var(--qaid-font-family, system-ui, -apple-system, sans-serif);font-size:var(--qaid-font-size, 16px);animation:qaid-fadeIn .2s ease-out}.qaid-annotate-title{margin:0;font-size:var(--qaid-font-size, 16px);font-weight:700;text-align:center;color:#f9fafb}.qaid-annotate-desc{margin:0;font-size:calc(var(--qaid-font-size, 16px) * .8125);line-height:1.4;text-align:center;color:#f9fafbbf}.qaid-annotate-stage{flex:1 1 auto;min-height:0;display:flex;align-items:center;justify-content:center;overflow:auto}.qaid-annotate-canvas{max-width:100%;max-height:100%;object-fit:contain;background:light-dark(#ffffff,#111827);border-radius:.5rem;box-shadow:0 10px 30px #00000080;touch-action:none;cursor:crosshair}.qaid-annotate-toolbar{display:flex;flex-wrap:wrap;gap:.75rem;align-items:center;justify-content:center;padding:.5rem .75rem;background:light-dark(#ffffff,#1f2937);border-radius:.75rem;box-shadow:0 10px 30px light-dark(rgba(0,0,0,.25),rgba(0,0,0,.5))}.qaid-annotate-tools,.qaid-annotate-actions{display:flex;gap:.375rem;align-items:center}button.qaid-annotate-tool,button.qaid-annotate-action{display:inline-flex;align-items:center;justify-content:center;gap:.375rem;min-width:44px;min-height:44px;padding:0 .75rem;border:1px solid light-dark(#d1d5db,#374151);border-radius:.5rem;background:light-dark(#f9fafb,#111827);color:light-dark(#1f2937,#f9fafb);font-family:inherit;font-size:calc(var(--qaid-font-size, 16px) * .8125);font-weight:600;cursor:pointer;-webkit-appearance:none;appearance:none;transition:background-color .15s,color .15s,border-color .15s,filter .15s}button.qaid-annotate-tool svg,button.qaid-annotate-action svg{width:20px;height:20px}.qaid-annotate-colors{display:flex;gap:.25rem;align-items:center}button.qaid-annotate-swatch{width:28px;height:28px;min-width:28px;padding:0;border-radius:9999px;border:2px solid light-dark(#d1d5db,#4b5563);background:var(--qaid-swatch, #000);cursor:pointer;-webkit-appearance:none;appearance:none;transition:transform .1s,box-shadow .15s,border-color .15s}button.qaid-annotate-swatch:hover{transform:scale(1.12)}button.qaid-annotate-swatch[aria-pressed=true]{border-color:light-dark(#111827,#f9fafb);box-shadow:0 0 0 2px var(--qaid-swatch)}@media(forced-colors:active){button.qaid-annotate-swatch[aria-pressed=true]{outline:2px solid Highlight;outline-offset:1px}}button.qaid-annotate-tool:hover,button.qaid-annotate-action:hover{background:light-dark(#eef2ff,#312e81)}button.qaid-annotate-tool[aria-pressed=true],button.qaid-annotate-done{background:var(--qaid-marker, #6365f1);color:var(--qaid-marker-text, #fff);border-color:var(--qaid-marker, #6365f1)}button.qaid-annotate-done:hover{filter:brightness(.9);background:var(--qaid-marker, #6365f1)}button.qaid-annotate-action:disabled{opacity:.45;cursor:not-allowed}@media(forced-colors:active){button.qaid-annotate-tool[aria-pressed=true],button.qaid-annotate-done{border:2px solid Highlight}.qaid-annotate-canvas{border:1px solid CanvasText}}@keyframes qaid-fadeIn{0%{opacity:0}to{opacity:1}}", E = 12, Pi = "#ef4444", Bi = ["#ef4444", "#f59e0b", "#22c55e", "#3b82f6", "#111827", "#ffffff"], Hi = {
1635
1658
  "#ef4444": "red",
1636
1659
  "#f59e0b": "amber",
1637
1660
  "#22c55e": "green",
@@ -1643,10 +1666,10 @@ const wt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1643
1666
  "#6365f1": "indigo",
1644
1667
  "#6366f1": "indigo"
1645
1668
  };
1646
- function kt(i) {
1647
- return Pi[i.toLowerCase()] ?? i;
1669
+ function xt(i) {
1670
+ return Hi[i.toLowerCase()] ?? i;
1648
1671
  }
1649
- const Bi = 4, Hi = 0.8, Oi = {
1672
+ const Oi = 4, zi = 0.8, $i = {
1650
1673
  title: "Annotate screenshot",
1651
1674
  instructions: "Draw on the screenshot to highlight or hide details, then choose Done to attach it or Skip to send the original.",
1652
1675
  rectangle: "Rectangle",
@@ -1666,12 +1689,12 @@ function B(i, t) {
1666
1689
  h: Math.abs(i.y - t.y)
1667
1690
  };
1668
1691
  }
1669
- function zi(i) {
1692
+ function _i(i) {
1670
1693
  if (i.type === "pen") return i.points.length < 2;
1671
1694
  const t = B(i.points[0], i.points[1]);
1672
1695
  return t.w < 3 && t.h < 3;
1673
1696
  }
1674
- function $i(i, t, e, o) {
1697
+ function Fi(i, t, e, o) {
1675
1698
  i.beginPath(), i.moveTo(t.x, t.y), i.lineTo(e.x, e.y), i.stroke();
1676
1699
  const n = Math.atan2(e.y - t.y, e.x - t.x), s = Math.max(10, o * 3);
1677
1700
  i.beginPath(), i.moveTo(e.x, e.y), i.lineTo(
@@ -1682,7 +1705,7 @@ function $i(i, t, e, o) {
1682
1705
  e.y - s * Math.sin(n + Math.PI / 6)
1683
1706
  ), i.stroke();
1684
1707
  }
1685
- function _i(i, t) {
1708
+ function Ni(i, t) {
1686
1709
  if (t.length !== 0) {
1687
1710
  i.beginPath(), i.moveTo(t[0].x, t[0].y);
1688
1711
  for (let e = 1; e < t.length; e++)
@@ -1690,7 +1713,7 @@ function _i(i, t) {
1690
1713
  i.stroke();
1691
1714
  }
1692
1715
  }
1693
- function Fi(i, t, e, o, n) {
1716
+ function Vi(i, t, e, o, n) {
1694
1717
  i.fillStyle = "rgb(15, 23, 42)", i.fillRect(t, e, o, n), i.fillStyle = "rgb(37, 47, 63)";
1695
1718
  for (let s = e; s < e + n; s += E)
1696
1719
  for (let a = t; a < t + o; a += E)
@@ -1709,30 +1732,30 @@ function H(i, t) {
1709
1732
  break;
1710
1733
  }
1711
1734
  case "arrow":
1712
- $i(i, t.points[0], t.points[1], t.strokeWidth);
1735
+ Fi(i, t.points[0], t.points[1], t.strokeWidth);
1713
1736
  break;
1714
1737
  case "pen":
1715
- _i(i, t.points);
1738
+ Ni(i, t.points);
1716
1739
  break;
1717
1740
  case "blur": {
1718
1741
  const e = B(t.points[0], t.points[1]);
1719
- Fi(i, e.x, e.y, e.w, e.h);
1742
+ Vi(i, e.x, e.y, e.w, e.h);
1720
1743
  break;
1721
1744
  }
1722
1745
  }
1723
1746
  i.restore();
1724
1747
  }
1725
- function _t(i) {
1748
+ function Ft(i) {
1726
1749
  return new Promise((t, e) => {
1727
1750
  const o = new Image();
1728
1751
  o.onload = () => t(o), o.onerror = () => e(new Error("Failed to load screenshot")), o.src = i;
1729
1752
  });
1730
1753
  }
1731
- async function Ft(i, t, e = {}) {
1732
- const o = e.quality ?? Hi;
1754
+ async function Nt(i, t, e = {}) {
1755
+ const o = e.quality ?? zi;
1733
1756
  let n;
1734
1757
  try {
1735
- n = await _t(i);
1758
+ n = await Ft(i);
1736
1759
  } catch {
1737
1760
  return i;
1738
1761
  }
@@ -1745,8 +1768,8 @@ async function Ft(i, t, e = {}) {
1745
1768
  H(a, c);
1746
1769
  return s.toDataURL("image/webp", o);
1747
1770
  }
1748
- let Ni = 0;
1749
- class Nt {
1771
+ let Ui = 0;
1772
+ class Vt {
1750
1773
  shapes = [];
1751
1774
  tool = "rect";
1752
1775
  opts;
@@ -1754,7 +1777,7 @@ class Nt {
1754
1777
  color;
1755
1778
  palette;
1756
1779
  strokeWidth;
1757
- uid = `qaid-annotate-${++Ni}`;
1780
+ uid = `qaid-annotate-${++Ui}`;
1758
1781
  container;
1759
1782
  canvas;
1760
1783
  ctx = null;
@@ -1768,7 +1791,7 @@ class Nt {
1768
1791
  // after the editor is mounted).
1769
1792
  resolveResult;
1770
1793
  constructor(t) {
1771
- this.opts = t, this.labels = { ...Oi, ...t.labels ?? {} }, this.color = t.color ?? Mi, this.palette = (t.palette && t.palette.length ? t.palette : Ri).slice(), this.palette.some((e) => e.toLowerCase() === this.color.toLowerCase()) || this.palette.unshift(this.color), this.strokeWidth = t.strokeWidth ?? Bi;
1794
+ this.opts = t, this.labels = { ...$i, ...t.labels ?? {} }, this.color = t.color ?? Pi, this.palette = (t.palette && t.palette.length ? t.palette : Bi).slice(), this.palette.some((e) => e.toLowerCase() === this.color.toLowerCase()) || this.palette.unshift(this.color), this.strokeWidth = t.strokeWidth ?? Oi;
1772
1795
  }
1773
1796
  /** Mount the editor and resolve when the user commits (Done) or skips. */
1774
1797
  open() {
@@ -1790,7 +1813,7 @@ class Nt {
1790
1813
  }
1791
1814
  /** A round colour swatch button for the toolbar's colour group. */
1792
1815
  swatchButton(t) {
1793
- const e = kt(t), o = q("button", {
1816
+ const e = xt(t), o = q("button", {
1794
1817
  type: "button",
1795
1818
  class: "qaid-annotate-swatch",
1796
1819
  "data-qaid-color": t,
@@ -1830,19 +1853,19 @@ class Nt {
1830
1853
  "aria-label": this.labels.title
1831
1854
  });
1832
1855
  const a = q("div", { class: "qaid-annotate-tools" });
1833
- a.appendChild(this.toolButton("rect", ue, this.labels.rectangle)), a.appendChild(this.toolButton("arrow", pe, this.labels.arrow)), a.appendChild(this.toolButton("pen", fe, this.labels.pen)), a.appendChild(this.toolButton("blur", me, this.labels.blur));
1856
+ a.appendChild(this.toolButton("rect", pe, this.labels.rectangle)), a.appendChild(this.toolButton("arrow", fe, this.labels.arrow)), a.appendChild(this.toolButton("pen", me, this.labels.pen)), a.appendChild(this.toolButton("blur", be, this.labels.blur));
1834
1857
  const c = q("div", {
1835
1858
  class: "qaid-annotate-colors",
1836
1859
  role: "group",
1837
1860
  "aria-label": this.labels.colors
1838
1861
  });
1839
1862
  for (const h of this.palette) c.appendChild(this.swatchButton(h));
1840
- this.undoBtn = this.actionButton("undo", be, this.labels.undo, "qaid-annotate-undo"), this.undoBtn.disabled = !0;
1841
- const l = this.actionButton("skip", ve, this.labels.skip, "qaid-annotate-skip"), d = this.actionButton("done", At, this.labels.done, "qaid-annotate-done"), r = q("div", { class: "qaid-annotate-actions" });
1863
+ this.undoBtn = this.actionButton("undo", ge, this.labels.undo, "qaid-annotate-undo"), this.undoBtn.disabled = !0;
1864
+ const l = this.actionButton("skip", ye, this.labels.skip, "qaid-annotate-skip"), d = this.actionButton("done", Lt, this.labels.done, "qaid-annotate-done"), r = q("div", { class: "qaid-annotate-actions" });
1842
1865
  r.appendChild(this.undoBtn), r.appendChild(l), r.appendChild(d), this.toolbar.appendChild(a), this.toolbar.appendChild(c), this.toolbar.appendChild(r), this.container.appendChild(o), this.container.appendChild(n), this.container.appendChild(s), this.container.appendChild(this.toolbar), this.opts.root.appendChild(this.container), this.toolbar.addEventListener("click", this.onToolbarClick), this.canvas.addEventListener("pointerdown", this.onPointerDown), this.container.addEventListener("pointermove", this.onPointerMove), this.container.addEventListener("pointerup", this.onPointerUp), this.container.addEventListener("keydown", this.onKeyDown), this.opts.openDialog?.(this.container, {
1843
1866
  labelledbyId: t,
1844
1867
  describedbyId: e
1845
- }), this.opts.announce?.(this.labels.instructions), _t(this.opts.dataUrl).then((h) => {
1868
+ }), this.opts.announce?.(this.labels.instructions), Ft(this.opts.dataUrl).then((h) => {
1846
1869
  this.img = h, this.canvas.width = h.naturalWidth || h.width || 1, this.canvas.height = h.naturalHeight || h.height || 1, this.redraw();
1847
1870
  }).catch(() => {
1848
1871
  this.img = null, this.redraw();
@@ -1874,7 +1897,7 @@ class Nt {
1874
1897
  n.getAttribute("data-qaid-tool") === t ? "true" : "false"
1875
1898
  );
1876
1899
  });
1877
- const o = this.labels[Vi[t]];
1900
+ const o = this.labels[ji[t]];
1878
1901
  this.opts.announce?.(`${o} tool selected`);
1879
1902
  }
1880
1903
  /** Set the active drawing colour; subsequent shapes use it. */
@@ -1884,7 +1907,7 @@ class Nt {
1884
1907
  "aria-pressed",
1885
1908
  (o.getAttribute("data-qaid-color") ?? "").toLowerCase() === t.toLowerCase() ? "true" : "false"
1886
1909
  );
1887
- }), this.opts.announce?.(`${kt(t)} colour selected`);
1910
+ }), this.opts.announce?.(`${xt(t)} colour selected`);
1888
1911
  }
1889
1912
  onToolbarClick = (t) => {
1890
1913
  const o = t.target?.closest(
@@ -1923,7 +1946,7 @@ class Nt {
1923
1946
  if (!this.drawing || !this.current) return;
1924
1947
  this.drawing = !1;
1925
1948
  const t = this.current;
1926
- if (this.current = null, zi(t)) {
1949
+ if (this.current = null, _i(t)) {
1927
1950
  this.redraw();
1928
1951
  return;
1929
1952
  }
@@ -1952,7 +1975,7 @@ class Nt {
1952
1975
  /** Composite the annotations and resolve with the new WebP data URL. */
1953
1976
  async done() {
1954
1977
  if (this.settled) return;
1955
- const t = await Ft(this.opts.dataUrl, this.shapes, {
1978
+ const t = await Nt(this.opts.dataUrl, this.shapes, {
1956
1979
  quality: this.opts.quality
1957
1980
  });
1958
1981
  this.opts.announce?.("Annotated screenshot attached"), this.settle(t);
@@ -1968,27 +1991,28 @@ class Nt {
1968
1991
  this.toolbar.removeEventListener("click", this.onToolbarClick), this.canvas.removeEventListener("pointerdown", this.onPointerDown), this.container.removeEventListener("pointermove", this.onPointerMove), this.container.removeEventListener("pointerup", this.onPointerUp), this.container.removeEventListener("keydown", this.onKeyDown), this.opts.closeDialog?.(), this.container.remove();
1969
1992
  }
1970
1993
  }
1971
- const Vi = {
1994
+ const ji = {
1972
1995
  rect: "rectangle",
1973
1996
  arrow: "arrow",
1974
1997
  pen: "pen",
1975
1998
  blur: "blur"
1976
1999
  };
1977
- function Ui(i) {
1978
- return new Nt(i).open();
2000
+ function Ki(i) {
2001
+ return new Vt(i).open();
1979
2002
  }
1980
- const xt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2003
+ const Wi = Ri, qt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1981
2004
  __proto__: null,
1982
- AnnotationEditor: Nt,
1983
- compositeAnnotations: Ft,
2005
+ AnnotationEditor: Vt,
2006
+ compositeAnnotations: Nt,
1984
2007
  drawShape: H,
1985
- openAnnotationEditor: Ui,
1986
- rectFromPoints: B
2008
+ openAnnotationEditor: Ki,
2009
+ rectFromPoints: B,
2010
+ styles: Wi
1987
2011
  }, Symbol.toStringTag, { value: "Module" }));
1988
- pi();
1989
- const ji = document;
2012
+ fi();
2013
+ const Xi = document;
1990
2014
  function p(i, t, ...e) {
1991
- const o = ji.createElement(i);
2015
+ const o = Xi.createElement(i);
1992
2016
  if (t) {
1993
2017
  if (t.class && (o.className = t.class), t.style && (o.style.cssText = t.style), t.html != null && (o.innerHTML = t.html), t.text != null && (o.textContent = t.text), t.attrs)
1994
2018
  for (const n in t.attrs) o.setAttribute(n, t.attrs[n]);
@@ -1999,7 +2023,8 @@ function p(i, t, ...e) {
1999
2023
  n != null && n !== !1 && o.append(n);
2000
2024
  return o;
2001
2025
  }
2002
- class Ki {
2026
+ const Yi = ".qaid-recording-indicator{position:fixed;pointer-events:auto;top:12px;left:50%;transform:translate(-50%);display:flex;align-items:center;gap:.5rem;padding:.5rem 1rem;background:light-dark(#1f2937,#374151);color:#fff;border-radius:9999px;font-family:var(--qaid-font-family, system-ui, -apple-system, sans-serif);font-size:calc(var(--qaid-font-size, 16px) * .875);font-weight:500;box-shadow:0 4px 12px #0000004d;z-index:99999;animation:qaid-slideDown .2s ease-out}.qaid-recording-dot{width:10px;height:10px;background:#dc2626;border-radius:50%;animation:qaid-dotPulse 1.5s ease-in-out infinite}@keyframes qaid-dotPulse{0%,to{opacity:1}50%{opacity:.3}}.qaid-recording-time{font-variant-numeric:tabular-nums;min-width:2.5rem;text-align:center}button.qaid-recording-stop{padding:.25rem .75rem;background:#dc2626;color:#fff;border:none;border-radius:9999px;font-size:calc(var(--qaid-font-size, 16px) * .75);font-weight:600;cursor:pointer;transition:background-color .2s;-webkit-appearance:none;appearance:none}button.qaid-recording-stop:hover{background:#b91c1c}.qaid-video-preview{position:fixed;inset:0 0 auto;height:100vh;height:100dvh;display:flex;align-items:center;justify-content:center;padding:16px;padding-top:max(16px,env(safe-area-inset-top));padding-bottom:max(16px,env(safe-area-inset-bottom));box-sizing:border-box;background:#0009;z-index:99998;animation:qaid-fadeIn .2s ease-out}@keyframes qaid-fadeIn{0%{opacity:0}to{opacity:1}}.qaid-video-preview-box{color-scheme:inherit;background:light-dark(#ffffff,#1f2937);border-radius:1rem;padding:1.5rem;box-shadow:0 25px 50px -12px #00000080;width:560px;max-width:100%;max-height:100%;overflow-y:auto;font-family:var(--qaid-font-family, system-ui, -apple-system, sans-serif);font-size:var(--qaid-font-size, 16px)}.qaid-video-preview-box h3{font-size:calc(var(--qaid-font-size, 16px) * 1.125);font-weight:700;margin:0 0 1rem;color:light-dark(#1f2937,#f9fafb)}.qaid-video-preview-box video{width:100%;max-height:50vh;max-height:50dvh;object-fit:contain;border-radius:.5rem;background:#000;margin-bottom:1rem}.qaid-video-preview-box textarea{width:100%;height:4rem;padding:.75rem;border:1px solid light-dark(#d1d5db,#374151);border-radius:.5rem;font-family:inherit;font-size:calc(var(--qaid-font-size, 16px) * .875);resize:vertical;margin-bottom:1rem;box-sizing:border-box;background:light-dark(#ffffff,#111827);color:light-dark(#1f2937,#f9fafb)}.qaid-video-preview-box textarea:focus{outline:none;border-color:var(--qaid-marker);box-shadow:0 0 0 3px color-mix(in srgb,var(--qaid-marker) 20%,transparent)}.qaid-video-error{margin:0 0 .75rem;font-size:calc(var(--qaid-font-size, 16px) * .875);font-weight:500;color:light-dark(#b91c1c,#fca5a5)}.qaid-video-preview-actions{display:flex;gap:.5rem;justify-content:flex-end}button.qaid-video-btn{padding:.5rem 1rem;border:none;border-radius:.5rem;font-size:calc(var(--qaid-font-size, 16px) * .875);font-weight:500;cursor:pointer;transition:background-color .2s,filter .2s;-webkit-appearance:none;appearance:none}button.qaid-video-btn-cancel{background:light-dark(#f3f4f6,#374151);color:light-dark(#374151,#d1d5db)}button.qaid-video-btn-cancel:hover{background:light-dark(#e5e7eb,#4b5563)}button.qaid-video-btn-rerecord{background:light-dark(#fef3c7,#78350f);color:light-dark(#92400e,#fde68a)}button.qaid-video-btn-rerecord:hover{filter:brightness(.9)}button.qaid-video-btn-send{background:var(--qaid-marker);color:var(--qaid-marker-text, white)}button.qaid-video-btn-send:hover{filter:brightness(.85)}button.qaid-video-btn-send:disabled{opacity:.5;cursor:not-allowed}.qaid-video-sending{display:flex;align-items:center;gap:.5rem;font-size:calc(var(--qaid-font-size, 16px) * .875);color:light-dark(#6b7280,#9ca3af)}@keyframes qaid-slideDown{0%{transform:translateY(-100%)}to{transform:translateY(0)}}button.qaid-recording-stop{min-height:24px}.qaid-video-preview-box textarea:focus-visible{outline:2px solid var(--qaid-marker, #6365f1);outline-offset:2px}@media(forced-colors:active){.qaid-video-preview-box textarea:focus{outline:2px solid CanvasText;outline-offset:2px}}";
2027
+ class Qi {
2003
2028
  constructor(t) {
2004
2029
  this.host = t;
2005
2030
  }
@@ -2026,8 +2051,8 @@ class Ki {
2026
2051
  async startRecording(t = []) {
2027
2052
  if (!(this.isRecording || this.host.state !== "IDLE"))
2028
2053
  try {
2029
- this.networkCapture = bi();
2030
- const { createVideoRecorder: e } = await Promise.resolve().then(() => $t);
2054
+ this.networkCapture = gi();
2055
+ const { createVideoRecorder: e } = await Promise.resolve().then(() => _t);
2031
2056
  this.videoRecorder = e({
2032
2057
  maxDuration: this.host.config.videoOptions.maxDuration,
2033
2058
  redactionElements: t
@@ -2254,11 +2279,12 @@ class Ki {
2254
2279
  this.isRecording = !1, this.removeRecordingIndicator(), this.videoRecorder && (this.videoRecorder.destroy(), this.videoRecorder = null), this.networkCapture && (this.networkCapture.restore(), this.networkCapture = null), this.recordedBlob && (this.recordedBlob = null), this.host.setButtonsDisabled(!1), this.host.overlayShadowHost && this.host.state === "IDLE" && (this.host.overlayShadowHost.style.pointerEvents = "none");
2255
2280
  }
2256
2281
  }
2257
- const qt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2282
+ const Ji = Yi, Ct = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2258
2283
  __proto__: null,
2259
- RecordingController: Ki
2284
+ RecordingController: Qi,
2285
+ styles: Ji
2260
2286
  }, Symbol.toStringTag, { value: "Module" }));
2261
- async function Wi(i = {}) {
2287
+ async function Gi(i = {}) {
2262
2288
  const { quality: t = 0.8, maxWidth: e = 1280, maxHeight: o = 800 } = i;
2263
2289
  try {
2264
2290
  if (!navigator.mediaDevices?.getDisplayMedia)
@@ -2287,11 +2313,11 @@ async function Wi(i = {}) {
2287
2313
  return console.warn("Screenshot capture failed:", n), null;
2288
2314
  }
2289
2315
  }
2290
- const Ct = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2316
+ const St = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2291
2317
  __proto__: null,
2292
- captureScreenshot: Wi
2293
- }, Symbol.toStringTag, { value: "Module" }));
2294
- class Xi {
2318
+ captureScreenshot: Gi
2319
+ }, Symbol.toStringTag, { value: "Module" })), Zi = ".qaid-backdrop{position:fixed;inset:0;z-index:45;background:#0000004d}.qaid-modal-container{position:fixed;z-index:50;display:flex;flex-direction:column;align-items:flex-start;max-height:calc(100vh - 32px);font-family:var(--qaid-font-family, system-ui, -apple-system, sans-serif);font-size:var(--qaid-font-size, 16px)}.qaid-modal-container.qaid-above{flex-direction:column-reverse}.qaid-modal-arrow{width:0;height:0;border-left:12px solid transparent;border-right:12px solid transparent;position:relative;align-self:flex-start}.qaid-modal-container.qaid-below .qaid-modal-arrow{border-bottom:12px solid light-dark(#ffffff,#1f2937)}.qaid-modal-container.qaid-above .qaid-modal-arrow{border-top:12px solid light-dark(#ffffff,#1f2937)}.qaid-modal-box{color-scheme:inherit;background:light-dark(#ffffff,#1f2937);border-radius:1rem;padding:1.5rem;box-shadow:0 25px 50px -12px light-dark(rgba(0,0,0,.25),rgba(0,0,0,.5));width:var(--qaid-modal-width, 400px);max-width:calc(100vw - 32px);max-height:calc(100vh - 60px);overflow-y:auto}.qaid-modal-header{display:flex;align-items:flex-start;gap:.75rem;margin-bottom:1rem}button.qaid-type-toggle{border:none;display:flex;align-items:center;justify-content:center;cursor:pointer;transition:all .2s;flex-shrink:0;-webkit-appearance:none;appearance:none}button.qaid-type-toggle:hover{transform:scale(1.1)}button.qaid-type-toggle:not(.qaid-type-toggle-custom){width:2.5rem;height:2.5rem;border-radius:50%}button.qaid-type-toggle:not(.qaid-type-toggle-custom) svg{width:1.25rem;height:1.25rem}button.qaid-type-toggle.qaid-type-up{background:var(--qaid-positive);color:#fff}button.qaid-type-toggle.qaid-type-down{background:var(--qaid-negative);color:#fff}.qaid-type-static{width:2.5rem;height:2.5rem;border-radius:50%;display:flex;align-items:center;justify-content:center;flex-shrink:0;background:var(--qaid-marker, #6365f1);color:var(--qaid-marker-text, white)}.qaid-type-static svg{width:1.25rem;height:1.25rem}.qaid-modal-header-text{flex:1;min-width:0}.qaid-modal-title{font-size:calc(var(--qaid-font-size, 16px) * 1.125);font-weight:700;margin:0 0 .25rem;color:light-dark(#1f2937,#f9fafb)}.qaid-modal-subtitle{color:light-dark(#6b7280,#9ca3af);margin:0;font-size:calc(var(--qaid-font-size, 16px) * .875)}.qaid-textarea{width:100%;height:6rem;padding:.75rem;border:1px solid light-dark(#d1d5db,#374151);border-radius:.5rem;font-family:inherit;font-size:var(--qaid-font-size, 16px);resize:vertical;margin-bottom:1rem;box-sizing:border-box;background:light-dark(#ffffff,#111827);color:light-dark(#1f2937,#f9fafb)}.qaid-textarea:focus{outline:none;border-color:var(--qaid-marker);box-shadow:0 0 0 3px color-mix(in srgb,var(--qaid-marker) 20%,transparent)}.qaid-btn-row{display:flex;gap:.5rem;justify-content:flex-end}button.qaid-btn-submit{padding:.5rem 1rem;background:var(--qaid-marker);color:var(--qaid-marker-text, white);border:none;border-radius:.5rem;font-size:calc(var(--qaid-font-size, 16px) * .875);font-weight:500;cursor:pointer;transition:background-color .2s,filter .2s;-webkit-appearance:none;appearance:none}button.qaid-btn-submit:hover{filter:brightness(.85)}button.qaid-btn-submit:focus{outline:none;box-shadow:0 0 0 3px color-mix(in srgb,var(--qaid-marker) 30%,transparent)}.qaid-bottom-sheet{position:fixed;bottom:0;left:0;right:0;z-index:50;animation:qaid-slideUpSheet .3s ease-out;font-family:var(--qaid-font-family, system-ui, -apple-system, sans-serif);font-size:var(--qaid-font-size, 16px)}.qaid-bottom-sheet-content{background:light-dark(#ffffff,#1f2937);border-radius:1rem 1rem 0 0;padding:1.5rem;padding-bottom:max(1.5rem,env(safe-area-inset-bottom))}.qaid-bottom-sheet-handle{width:36px;height:4px;background:light-dark(rgba(0,0,0,.2),rgba(255,255,255,.2));border-radius:2px;margin:0 auto 1rem}@keyframes qaid-slideUpSheet{0%{transform:translateY(100%)}to{transform:translateY(0)}}.qaid-confirm{display:flex;flex-direction:column;align-items:center;text-align:center;gap:.5rem;padding:.5rem 0}.qaid-confirm-icon{display:flex;align-items:center;justify-content:center;width:44px;height:44px;border-radius:9999px;color:#fff;background:var(--qaid-success, #22c55e);margin-bottom:.25rem;animation:qaid-confirm-pop .28s cubic-bezier(.34,1.56,.64,1)}.qaid-confirm-icon .qaid-icon{width:24px;height:24px}.qaid-confirm-error .qaid-confirm-icon{background:var(--qaid-error, #dc2626)}.qaid-confirm-title{margin:0;font-size:var(--qaid-font-size, 16px);font-weight:600;color:var(--qaid-text, light-dark(#111827, #f9fafb))}.qaid-confirm-title:focus-visible{outline:2px solid var(--qaid-primary, #6365f1);outline-offset:3px;border-radius:4px}.qaid-confirm-message{margin:0;font-size:calc(var(--qaid-font-size, 16px) * .875);color:var(--qaid-text-muted, light-dark(#6b7280, #9ca3af))}.qaid-confirm .qaid-confirm-close{margin-top:.5rem;min-width:96px}@keyframes qaid-confirm-pop{0%{transform:scale(.6);opacity:0}to{transform:scale(1);opacity:1}}@media(prefers-reduced-motion:reduce){.qaid-confirm-icon{animation:none}}.qaid-textarea:focus-visible,button.qaid-btn-submit:focus-visible{outline:2px solid var(--qaid-marker, #6365f1);outline-offset:2px}@media(forced-colors:active){.qaid-textarea:focus,button.qaid-btn-submit:focus{outline:2px solid CanvasText;outline-offset:2px}}";
2320
+ class to {
2295
2321
  constructor(t) {
2296
2322
  this.host = t;
2297
2323
  }
@@ -2334,7 +2360,7 @@ class Xi {
2334
2360
  ), this.host.applyVars(e), t.appendChild(e), this.modalContainer = e, this.setupModalInteractions();
2335
2361
  }
2336
2362
  showPositionedModal() {
2337
- const t = this.host.ensureOverlayHost(), { modal: e, arrow: o } = Ye(
2363
+ const t = this.host.ensureOverlayHost(), { modal: e, arrow: o } = Qe(
2338
2364
  this.host.selectedBounds,
2339
2365
  window.innerWidth,
2340
2366
  window.innerHeight,
@@ -2363,7 +2389,7 @@ class Xi {
2363
2389
  buildModalContent() {
2364
2390
  const { config: t, uid: e } = this.host, o = t.text, n = this.host.feedbackData.feedbackType, s = n === "up", a = t.positiveIcon || U, c = t.negativeIcon || j, l = t.buttonClass ? `qaid-type-toggle qaid-type-toggle-custom ${t.buttonClass} ${s ? "qaid-btn-up" : "qaid-btn-down"}` : `qaid-type-toggle ${s ? "qaid-type-up" : "qaid-type-down"}`, d = s ? "Feedback type: positive" : "Feedback type: negative", r = n === "neutral" ? p("span", {
2365
2391
  class: "qaid-type-static",
2366
- html: t.feedbackIcon || Et,
2392
+ html: t.feedbackIcon || At,
2367
2393
  attrs: { "aria-hidden": "true" }
2368
2394
  }) : p("button", {
2369
2395
  class: l,
@@ -2489,7 +2515,7 @@ class Xi {
2489
2515
  { class: t ? "qaid-confirm" : "qaid-confirm qaid-confirm-error" },
2490
2516
  p("span", {
2491
2517
  class: "qaid-confirm-icon",
2492
- html: t ? At : ge,
2518
+ html: t ? Lt : ve,
2493
2519
  attrs: { "aria-hidden": "true" }
2494
2520
  }),
2495
2521
  a,
@@ -2504,14 +2530,15 @@ class Xi {
2504
2530
  ), requestAnimationFrame(() => a.focus()), this.host.announceMsg(`${n} ${s}`, !0);
2505
2531
  }
2506
2532
  }
2507
- const St = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2533
+ const eo = Zi, Tt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2508
2534
  __proto__: null,
2509
- ModalController: Xi
2510
- }, Symbol.toStringTag, { value: "Module" })), Vt = ["data-comp", "data-qa", "data-testid", "data-id"];
2511
- function Ut(i, t = document.body) {
2535
+ ModalController: to,
2536
+ styles: eo
2537
+ }, Symbol.toStringTag, { value: "Module" })), Ut = ["data-comp", "data-qa", "data-testid", "data-id"];
2538
+ function jt(i, t = document.body) {
2512
2539
  let e = i;
2513
2540
  for (; e && e !== t; ) {
2514
- for (const o of Vt) {
2541
+ for (const o of Ut) {
2515
2542
  const n = e.getAttribute(o);
2516
2543
  if (n)
2517
2544
  return `${o}="${n}"`;
@@ -2520,37 +2547,37 @@ function Ut(i, t = document.body) {
2520
2547
  }
2521
2548
  return null;
2522
2549
  }
2523
- function Yi(i, t = 100) {
2550
+ function io(i, t = 100) {
2524
2551
  const e = i.textContent?.trim().slice(0, t) || "";
2525
2552
  return e.length === t ? e + "..." : e;
2526
2553
  }
2527
- function Qi(i) {
2554
+ function oo(i) {
2528
2555
  let t = 1, e = i.previousElementSibling;
2529
2556
  for (; e; )
2530
2557
  t++, e = e.previousElementSibling;
2531
2558
  return t;
2532
2559
  }
2533
- function Ji(i) {
2560
+ function no(i) {
2534
2561
  const t = [];
2535
2562
  let e = i;
2536
2563
  for (; e && e !== document.body && e !== document.documentElement; ) {
2537
- const o = e.tagName.toLowerCase(), n = Qi(e);
2564
+ const o = e.tagName.toLowerCase(), n = oo(e);
2538
2565
  t.unshift(`${o}:nth-child(${n})`), e = e.parentElement;
2539
2566
  }
2540
2567
  return t.length > 0 ? `body > ${t.join(" > ")}` : "body";
2541
2568
  }
2542
- function Gi(i) {
2569
+ function so(i) {
2543
2570
  return i.replace(/([!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~])/g, "\\$1");
2544
2571
  }
2545
- function Zi(i) {
2546
- const t = Ut(i);
2547
- return t ? `[${t}]` : i.id ? `#${Gi(i.id)}` : Ji(i);
2572
+ function ao(i) {
2573
+ const t = jt(i);
2574
+ return t ? `[${t}]` : i.id ? `#${so(i.id)}` : no(i);
2548
2575
  }
2549
2576
  function V(i) {
2550
- const t = Yi(i), e = Ut(i);
2551
- return { selector: Zi(i), text: t, dataAttr: e };
2577
+ const t = io(i), e = jt(i);
2578
+ return { selector: ao(i), text: t, dataAttr: e };
2552
2579
  }
2553
- const to = [
2580
+ const ro = [
2554
2581
  "a[href]",
2555
2582
  "button",
2556
2583
  "input:not([type=hidden])",
@@ -2569,9 +2596,9 @@ const to = [
2569
2596
  "p",
2570
2597
  "li",
2571
2598
  "label",
2572
- ...Vt.map((i) => `[${i}]`)
2573
- ].join(","), eo = /^(?:A|BUTTON|INPUT|SELECT|TEXTAREA|SUMMARY)$/;
2574
- function io(i) {
2599
+ ...Ut.map((i) => `[${i}]`)
2600
+ ].join(","), co = /^(?:A|BUTTON|INPUT|SELECT|TEXTAREA|SUMMARY)$/;
2601
+ function lo(i) {
2575
2602
  if (i.hasAttribute("hidden") || i.getAttribute("aria-hidden") === "true") return !1;
2576
2603
  const t = i.ownerDocument?.defaultView;
2577
2604
  if (t && typeof t.getComputedStyle == "function") {
@@ -2580,14 +2607,14 @@ function io(i) {
2580
2607
  }
2581
2608
  return !0;
2582
2609
  }
2583
- function oo(i = {}) {
2584
- const t = i.root ?? document.body, e = i.selector ?? to, o = i.isExcluded ?? (() => !1), n = i.isVisible ?? io;
2610
+ function ho(i = {}) {
2611
+ const t = i.root ?? document.body, e = i.selector ?? ro, o = i.isExcluded ?? (() => !1), n = i.isVisible ?? lo;
2585
2612
  return Array.from(t.querySelectorAll(e)).filter(
2586
2613
  (s) => !o(s) && n(s)
2587
2614
  );
2588
2615
  }
2589
- function no(i) {
2590
- const t = i.candidates ?? oo({
2616
+ function uo(i) {
2617
+ const t = i.candidates ?? ho({
2591
2618
  root: i.root,
2592
2619
  selector: i.selector,
2593
2620
  isExcluded: i.isExcluded,
@@ -2604,7 +2631,7 @@ function no(i) {
2604
2631
  if (!e) return;
2605
2632
  const k = u;
2606
2633
  if (typeof k.focus == "function") {
2607
- u.getAttribute("tabindex") === null && !eo.test(u.tagName) && (u.setAttribute("tabindex", "-1"), n.add(u));
2634
+ u.getAttribute("tabindex") === null && !co.test(u.tagName) && (u.setAttribute("tabindex", "-1"), n.add(u));
2608
2635
  try {
2609
2636
  k.focus();
2610
2637
  } catch {
@@ -2678,8 +2705,8 @@ function no(i) {
2678
2705
  stop: y
2679
2706
  };
2680
2707
  }
2681
- const so = 12;
2682
- class ao {
2708
+ const po = ".qaid-targeting-overlay{position:fixed;inset:0;z-index:40;pointer-events:none}.qaid-capture-layer{position:fixed;inset:0;pointer-events:none;z-index:9999}.qaid-vignette{position:fixed;inset:0;pointer-events:none;background:radial-gradient(ellipse at center,transparent 30%,rgba(0,0,0,.3) 70%,rgba(0,0,0,.6) 100%);z-index:41}.qaid-crosshair-h,.qaid-crosshair-v{position:fixed;pointer-events:none;z-index:42}.qaid-crosshair-h{left:0;right:0;height:1px;background:color-mix(in srgb,var(--qaid-negative) 60%,transparent)}.qaid-crosshair-v{top:0;bottom:0;width:1px;background:color-mix(in srgb,var(--qaid-negative) 60%,transparent)}.qaid-type-up .qaid-crosshair-h,.qaid-type-up .qaid-crosshair-v{background:color-mix(in srgb,var(--qaid-positive) 60%,transparent)}.qaid-highlight-box{position:fixed;top:0;left:0;pointer-events:none;z-index:41;display:none;border:3px solid color-mix(in srgb,var(--qaid-negative) 80%,transparent);border-radius:2px;background:color-mix(in srgb,var(--qaid-negative) 8%,transparent);will-change:transform,width,height}.qaid-type-up .qaid-highlight-box{border-color:color-mix(in srgb,var(--qaid-positive) 80%,transparent);background:color-mix(in srgb,var(--qaid-positive) 8%,transparent)}.qaid-scope{position:fixed;width:80px;height:80px;pointer-events:none;z-index:43;transform:translate(-50%,-50%)}.qaid-scope-ring{position:absolute;inset:10px;border:2px solid color-mix(in srgb,var(--qaid-negative) 80%,transparent);border-radius:50%}.qaid-type-up .qaid-scope-ring{border-color:color-mix(in srgb,var(--qaid-positive) 80%,transparent)}.qaid-scope-ring-inner{position:absolute;inset:20px;border:1px solid color-mix(in srgb,var(--qaid-negative) 50%,transparent);border-radius:50%}.qaid-type-up .qaid-scope-ring-inner{border-color:color-mix(in srgb,var(--qaid-positive) 50%,transparent)}.qaid-scope-dot{position:absolute;top:50%;left:50%;width:4px;height:4px;background:var(--qaid-negative);border-radius:50%;transform:translate(-50%,-50%)}.qaid-type-up .qaid-scope-dot{background:var(--qaid-positive)}.qaid-selected-marker{position:fixed;border:3px solid var(--qaid-marker, #6365f1);border-radius:50%;pointer-events:none;z-index:44;animation:qaid-markerPulse 1.5s ease-in-out infinite}@keyframes qaid-markerPulse{0%,to{opacity:1;transform:scale(1)}50%{opacity:.7;transform:scale(1.05)}}@media(forced-colors:active){.qaid-selected-marker,.qaid-highlight-box{border-color:Highlight}}", fo = 12;
2709
+ class mo {
2683
2710
  constructor(t) {
2684
2711
  this.host = t;
2685
2712
  }
@@ -2708,7 +2735,7 @@ class ao {
2708
2735
  * KeyboardTargetingController owns Tab/Arrow/Enter/Space/Escape.
2709
2736
  */
2710
2737
  startKeyboard(t) {
2711
- this.host.setState("TARGETING"), this.host.feedbackData.feedbackType = t, this.host.feedbackData.elementSelector = null, this.host.feedbackData.elementText = null, this.host.selectedBounds.visible = !1, document.body.style.setProperty("--qaid-positive", this.host.cssVars["--qaid-positive"]), document.body.style.setProperty("--qaid-negative", this.host.cssVars["--qaid-negative"]), this.createTargetingOverlay(), this.crosshairH && (this.crosshairH.style.display = "none"), this.crosshairV && (this.crosshairV.style.display = "none"), this.scope && (this.scope.style.display = "none"), this.keyboardController = no({
2738
+ this.host.setState("TARGETING"), this.host.feedbackData.feedbackType = t, this.host.feedbackData.elementSelector = null, this.host.feedbackData.elementText = null, this.host.selectedBounds.visible = !1, document.body.style.setProperty("--qaid-positive", this.host.cssVars["--qaid-positive"]), document.body.style.setProperty("--qaid-negative", this.host.cssVars["--qaid-negative"]), this.createTargetingOverlay(), this.crosshairH && (this.crosshairH.style.display = "none"), this.crosshairV && (this.crosshairV.style.display = "none"), this.scope && (this.scope.style.display = "none"), this.keyboardController = uo({
2712
2739
  isExcluded: (e) => R(e),
2713
2740
  onHighlight: (e) => {
2714
2741
  const o = e.getBoundingClientRect(), n = this.highlightBox;
@@ -2765,7 +2792,7 @@ class ao {
2765
2792
  }
2766
2793
  handleTouchEnd(t) {
2767
2794
  const e = t.changedTouches[0], o = this.touchStartPos;
2768
- this.touchStartPos = null, !(!e || !o || Math.hypot(e.clientX - o.x, e.clientY - o.y) > so) && (t.preventDefault(), this.selectAt(e.clientX, e.clientY));
2795
+ this.touchStartPos = null, !(!e || !o || Math.hypot(e.clientX - o.x, e.clientY - o.y) > fo) && (t.preventDefault(), this.selectAt(e.clientX, e.clientY));
2769
2796
  }
2770
2797
  /** Select the element under (x, y) and tear down targeting. */
2771
2798
  selectAt(t, e) {
@@ -2798,22 +2825,23 @@ class ao {
2798
2825
  this.keyboardController?.stop(), this.keyboardController = null, this.stopTargetingListeners(), this.hideMarker();
2799
2826
  }
2800
2827
  }
2801
- const Tt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2828
+ const bo = po, Et = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2802
2829
  __proto__: null,
2803
- TargetingController: ao
2830
+ TargetingController: mo,
2831
+ styles: bo
2804
2832
  }, Symbol.toStringTag, { value: "Module" }));
2805
2833
  export {
2806
- Nt as AnnotationEditor,
2807
- di as QaidFeedback,
2808
- Di as captureDomScreenshot,
2809
- bi as captureNetworkErrors,
2810
- Ft as compositeAnnotations,
2811
- Ti as createVideoRecorder,
2834
+ Vt as AnnotationEditor,
2835
+ ci as QaidFeedback,
2836
+ Mi as captureDomScreenshot,
2837
+ gi as captureNetworkErrors,
2838
+ Nt as compositeAnnotations,
2839
+ Ei as createVideoRecorder,
2812
2840
  H as drawShape,
2813
- zt as getSupportedMimeType,
2814
- Li as isDomScreenshotSupported,
2815
- Si as isVideoRecordingSupported,
2816
- Ui as openAnnotationEditor,
2841
+ $t as getSupportedMimeType,
2842
+ Ii as isDomScreenshotSupported,
2843
+ Ti as isVideoRecordingSupported,
2844
+ Ki as openAnnotationEditor,
2817
2845
  B as rectFromPoints
2818
2846
  };
2819
2847
  //# sourceMappingURL=index.js.map