@qaiddev/thumbs-embed 1.0.7 → 1.0.8
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.d.ts +1 -1
- package/dist/qaid.js +140 -139
- package/dist/qaid.js.map +1 -1
- package/dist/qaid.umd.cjs +7 -7
- package/dist/qaid.umd.cjs.map +1 -1
- package/package.json +2 -2
package/dist/qaid.js
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var h = (e, t, o) =>
|
|
1
|
+
var Q = Object.defineProperty;
|
|
2
|
+
var tt = (e, t, o) => t in e ? Q(e, t, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[t] = o;
|
|
3
|
+
var h = (e, t, o) => tt(e, typeof t != "symbol" ? t + "" : t, o);
|
|
4
4
|
const T = `<svg xmlns="http://www.w3.org/2000/svg" class="qaid-icon" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
|
|
5
5
|
<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"/>
|
|
6
6
|
</svg>`, I = `<svg xmlns="http://www.w3.org/2000/svg" class="qaid-icon" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
|
|
7
7
|
<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"/>
|
|
8
|
-
</svg>`,
|
|
8
|
+
</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">
|
|
9
9
|
<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"/>
|
|
10
|
-
</svg>`, ot = ".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}button.qaid-btn-structural{display:inline-flex;align-items:center;justify-content:center;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none}.qaid-icon{width:24px;height: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:1rem;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;top:0;right:0;bottom:0;left:0;z-index:40;pointer-events:none}.qaid-capture-layer{position:fixed;top:0;right:0;bottom:0;left:0;cursor:crosshair;pointer-events:auto;z-index:9999}@keyframes qaid-slideDown{0%{transform:translateY(-100%)}to{transform:translateY(0)}}.qaid-vignette{position:fixed;top:0;right:0;bottom:0;left: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-scope{position:fixed;width:80px;height:80px;pointer-events:none;z-index:43;transform:translate(-50%,-50%)}.qaid-scope-ring{position:absolute;top:10px;right:10px;bottom:10px;left: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;top:20px;right:20px;bottom:20px;left: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, #6366f1);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;top:0;right:0;bottom:0;left: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;-moz-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-modal-header-text{flex:1;min-width:0}.qaid-modal-title{font-size:1.125rem;font-weight:700;margin:0 0 .25rem;color:light-dark(#1f2937,#f9fafb)}.qaid-modal-subtitle{color:light-dark(#6b7280,#9ca3af);margin:0;font-size:.875rem}.qaid-textarea{width:100%;height:6rem;padding:.75rem;border:1px solid light-dark(#d1d5db,#374151);border-radius:.5rem;font-family:inherit;font-size:1rem;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:.875rem;font-weight:500;cursor:pointer;transition:background-color .2s,filter .2s;-webkit-appearance:none;-moz-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;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:.875rem;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:.75rem;font-weight:600;cursor:pointer;transition:background-color .2s;-webkit-appearance:none;-moz-appearance:none;appearance:none}button.qaid-recording-stop:hover{background:#b91c1c}.qaid-video-preview{position:fixed;top:0;right:0;bottom:0;left:0;display:flex;align-items:center;justify-content:center;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:calc(100vw - 32px);max-height:calc(100vh - 32px);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:1.125rem;font-weight:700;margin:0 0 1rem;color:light-dark(#1f2937,#f9fafb)}.qaid-video-preview-box video{width:100%;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:.875rem;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-preview-actions{display:flex;gap:.5rem;justify-content:flex-end}button.qaid-video-btn{padding:.5rem 1rem;border:none;border-radius:.5rem;font-size:.875rem;font-weight:500;cursor:pointer;transition:background-color .2s,filter .2s;-webkit-appearance:none;-moz-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:.875rem;color:light-dark(#6b7280,#9ca3af)}", nt = "body.qaid-targeting,body.qaid-targeting *{cursor:none!important}.qaid-highlight{outline:3px solid color-mix(in srgb,var(--qaid-negative) 80%,transparent)!important;outline-offset:2px!important;box-shadow:inset 0 0 0 9999px color-mix(in srgb,var(--qaid-negative) 8%,transparent)!important;transition:outline .1s ease!important}body.qaid-targeting.qaid-type-up .qaid-highlight{outline-color:color-mix(in srgb,var(--qaid-positive) 80%,transparent)!important;box-shadow:inset 0 0 0 9999px color-mix(in srgb,var(--qaid-positive) 8%,transparent)!important}";
|
|
11
|
-
let
|
|
12
|
-
const
|
|
10
|
+
</svg>`, it = "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}button.qaid-btn-structural{display:inline-flex;align-items:center;justify-content:center;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none}.qaid-icon{width:24px;height: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:1rem;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;top:0;right:0;bottom:0;left:0;z-index:40;pointer-events:none}.qaid-capture-layer{position:fixed;top:0;right:0;bottom:0;left:0;pointer-events:none;z-index:9999}@keyframes qaid-slideDown{0%{transform:translateY(-100%)}to{transform:translateY(0)}}.qaid-vignette{position:fixed;top:0;right:0;bottom:0;left: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;top:10px;right:10px;bottom:10px;left: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;top:20px;right:20px;bottom:20px;left: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, #6366f1);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;top:0;right:0;bottom:0;left: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;-moz-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-modal-header-text{flex:1;min-width:0}.qaid-modal-title{font-size:1.125rem;font-weight:700;margin:0 0 .25rem;color:light-dark(#1f2937,#f9fafb)}.qaid-modal-subtitle{color:light-dark(#6b7280,#9ca3af);margin:0;font-size:.875rem}.qaid-textarea{width:100%;height:6rem;padding:.75rem;border:1px solid light-dark(#d1d5db,#374151);border-radius:.5rem;font-family:inherit;font-size:1rem;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:.875rem;font-weight:500;cursor:pointer;transition:background-color .2s,filter .2s;-webkit-appearance:none;-moz-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;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:.875rem;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:.75rem;font-weight:600;cursor:pointer;transition:background-color .2s;-webkit-appearance:none;-moz-appearance:none;appearance:none}button.qaid-recording-stop:hover{background:#b91c1c}.qaid-video-preview{position:fixed;top:0;right:0;bottom:0;left:0;display:flex;align-items:center;justify-content:center;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:calc(100vw - 32px);max-height:calc(100vh - 32px);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:1.125rem;font-weight:700;margin:0 0 1rem;color:light-dark(#1f2937,#f9fafb)}.qaid-video-preview-box video{width:100%;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:.875rem;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-preview-actions{display:flex;gap:.5rem;justify-content:flex-end}button.qaid-video-btn{padding:.5rem 1rem;border:none;border-radius:.5rem;font-size:.875rem;font-weight:500;cursor:pointer;transition:background-color .2s,filter .2s;-webkit-appearance:none;-moz-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:.875rem;color:light-dark(#6b7280,#9ca3af)}", ot = "body.qaid-targeting,body.qaid-targeting *{cursor:none!important}";
|
|
11
|
+
let x = 0;
|
|
12
|
+
const nt = "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 svg{width:var(--qaid-icon-size);height:var(--qaid-icon-size)}", at = {
|
|
13
13
|
small: 36,
|
|
14
14
|
medium: 48,
|
|
15
15
|
large: 64
|
|
16
|
-
},
|
|
16
|
+
}, st = {
|
|
17
17
|
small: 18,
|
|
18
18
|
medium: 24,
|
|
19
19
|
large: 32
|
|
20
20
|
};
|
|
21
|
-
function
|
|
21
|
+
function rt(e, t, o) {
|
|
22
22
|
const [i, n, a] = [e, t, o].map((s) => (s = s / 255, s <= 0.03928 ? s / 12.92 : Math.pow((s + 0.055) / 1.055, 2.4)));
|
|
23
23
|
return 0.2126 * i + 0.7152 * n + 0.0722 * a;
|
|
24
24
|
}
|
|
25
|
-
function
|
|
25
|
+
function dt(e) {
|
|
26
26
|
if (e.startsWith("#")) {
|
|
27
27
|
const o = e.slice(1), i = o.length === 3 ? o.split("").map((a) => a + a).join("") : o, n = parseInt(i, 16);
|
|
28
28
|
return {
|
|
@@ -38,11 +38,11 @@ function ct(e) {
|
|
|
38
38
|
b: parseInt(t[3])
|
|
39
39
|
} : null;
|
|
40
40
|
}
|
|
41
|
-
function
|
|
42
|
-
const t =
|
|
43
|
-
return t &&
|
|
41
|
+
function ct(e) {
|
|
42
|
+
const t = dt(e);
|
|
43
|
+
return t && rt(t.r, t.g, t.b) > 0.4 ? "black" : "white";
|
|
44
44
|
}
|
|
45
|
-
function
|
|
45
|
+
function lt(e = {}) {
|
|
46
46
|
const {
|
|
47
47
|
positiveColor: t = "rgb(0, 200, 83)",
|
|
48
48
|
negativeColor: o = "rgb(255, 0, 0)",
|
|
@@ -52,7 +52,7 @@ function ht(e = {}) {
|
|
|
52
52
|
backdropOpacity: s = 0.3,
|
|
53
53
|
fontFamily: l = "system-ui, -apple-system, sans-serif",
|
|
54
54
|
fontSize: d = 16
|
|
55
|
-
} = e, r =
|
|
55
|
+
} = e, r = at[n], c = st[n], u = ct(i);
|
|
56
56
|
return {
|
|
57
57
|
"--qaid-positive": t,
|
|
58
58
|
"--qaid-negative": o,
|
|
@@ -66,29 +66,29 @@ function ht(e = {}) {
|
|
|
66
66
|
"--qaid-font-size": `${d}px`
|
|
67
67
|
};
|
|
68
68
|
}
|
|
69
|
-
function
|
|
69
|
+
function ht(e, t) {
|
|
70
70
|
for (const [o, i] of Object.entries(t))
|
|
71
71
|
e.style.setProperty(o, i);
|
|
72
72
|
}
|
|
73
|
-
function
|
|
74
|
-
return
|
|
73
|
+
function B() {
|
|
74
|
+
return it + nt;
|
|
75
75
|
}
|
|
76
|
-
function
|
|
77
|
-
if (
|
|
76
|
+
function ut() {
|
|
77
|
+
if (x++, x > 1) return;
|
|
78
78
|
const e = document.createElement("style");
|
|
79
|
-
e.id = "qaid-styles", e.textContent =
|
|
79
|
+
e.id = "qaid-styles", e.textContent = ot, document.head.appendChild(e);
|
|
80
80
|
}
|
|
81
|
-
function
|
|
82
|
-
if (!(
|
|
81
|
+
function pt() {
|
|
82
|
+
if (!(x <= 0) && (x--, x === 0)) {
|
|
83
83
|
const e = document.getElementById("qaid-styles");
|
|
84
84
|
e && e.remove();
|
|
85
85
|
}
|
|
86
86
|
}
|
|
87
|
-
const
|
|
88
|
-
function
|
|
87
|
+
const mt = ["data-comp", "data-qa", "data-testid", "data-id"];
|
|
88
|
+
function U(e, t = document.body) {
|
|
89
89
|
let o = e;
|
|
90
90
|
for (; o && o !== t; ) {
|
|
91
|
-
for (const i of
|
|
91
|
+
for (const i of mt) {
|
|
92
92
|
const n = o.getAttribute(i);
|
|
93
93
|
if (n)
|
|
94
94
|
return `${i}="${n}"`;
|
|
@@ -97,38 +97,38 @@ function F(e, t = document.body) {
|
|
|
97
97
|
}
|
|
98
98
|
return null;
|
|
99
99
|
}
|
|
100
|
-
function
|
|
100
|
+
function ft(e, t = 100) {
|
|
101
101
|
var i;
|
|
102
102
|
const o = ((i = e.textContent) == null ? void 0 : i.trim().slice(0, t)) || "";
|
|
103
103
|
return o.length === t ? o + "..." : o;
|
|
104
104
|
}
|
|
105
|
-
function
|
|
105
|
+
function gt(e) {
|
|
106
106
|
let t = 1, o = e.previousElementSibling;
|
|
107
107
|
for (; o; )
|
|
108
108
|
t++, o = o.previousElementSibling;
|
|
109
109
|
return t;
|
|
110
110
|
}
|
|
111
|
-
function
|
|
111
|
+
function bt(e) {
|
|
112
112
|
const t = [];
|
|
113
113
|
let o = e;
|
|
114
114
|
for (; o && o !== document.body && o !== document.documentElement; ) {
|
|
115
|
-
const i = o.tagName.toLowerCase(), n =
|
|
115
|
+
const i = o.tagName.toLowerCase(), n = gt(o);
|
|
116
116
|
t.unshift(`${i}:nth-child(${n})`), o = o.parentElement;
|
|
117
117
|
}
|
|
118
118
|
return t.length > 0 ? `body > ${t.join(" > ")}` : "body";
|
|
119
119
|
}
|
|
120
|
-
function
|
|
120
|
+
function vt(e) {
|
|
121
121
|
return e.replace(/([!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~])/g, "\\$1");
|
|
122
122
|
}
|
|
123
|
-
function
|
|
124
|
-
const t =
|
|
125
|
-
return t ? `[${t}]` : e.id ? `#${
|
|
123
|
+
function yt(e) {
|
|
124
|
+
const t = U(e);
|
|
125
|
+
return t ? `[${t}]` : e.id ? `#${vt(e.id)}` : bt(e);
|
|
126
126
|
}
|
|
127
|
-
function
|
|
128
|
-
const t =
|
|
129
|
-
return { selector:
|
|
127
|
+
function wt(e) {
|
|
128
|
+
const t = ft(e), o = U(e);
|
|
129
|
+
return { selector: yt(e), text: t, dataAttr: o };
|
|
130
130
|
}
|
|
131
|
-
const
|
|
131
|
+
const F = {
|
|
132
132
|
width: 400,
|
|
133
133
|
height: 280,
|
|
134
134
|
arrowHeight: 12,
|
|
@@ -154,22 +154,22 @@ function xt(e, t, o, i, n) {
|
|
|
154
154
|
t - o - n
|
|
155
155
|
) : d = Math.max(n, e.y - o - i), { top: d, position: l };
|
|
156
156
|
}
|
|
157
|
-
function
|
|
157
|
+
function qt(e, t, o, i) {
|
|
158
158
|
let a = e.x + e.width / 2 - o / 2;
|
|
159
159
|
return a = Math.max(i, Math.min(a, t - o - i)), a;
|
|
160
160
|
}
|
|
161
|
-
function
|
|
161
|
+
function kt(e, t, o, i = 24, n = 24) {
|
|
162
162
|
const s = e.clickX - t - n / 2;
|
|
163
163
|
return Math.max(i, Math.min(s, o - i - n / 2));
|
|
164
164
|
}
|
|
165
|
-
function
|
|
165
|
+
function Ct(e, t, o, i = F) {
|
|
166
166
|
const n = i.height + i.arrowHeight, a = xt(
|
|
167
167
|
e,
|
|
168
168
|
o,
|
|
169
169
|
n,
|
|
170
170
|
i.gap,
|
|
171
171
|
i.viewportPadding
|
|
172
|
-
), s =
|
|
172
|
+
), s = qt(
|
|
173
173
|
e,
|
|
174
174
|
t,
|
|
175
175
|
i.width,
|
|
@@ -181,8 +181,8 @@ function St(e, t, o, i = W) {
|
|
|
181
181
|
position: a.position
|
|
182
182
|
};
|
|
183
183
|
}
|
|
184
|
-
function
|
|
185
|
-
const n =
|
|
184
|
+
function St(e, t, o, i = F) {
|
|
185
|
+
const n = Ct(e, t, o, i), a = kt(
|
|
186
186
|
e,
|
|
187
187
|
n.left,
|
|
188
188
|
i.width
|
|
@@ -192,15 +192,15 @@ function Et(e, t, o, i = W) {
|
|
|
192
192
|
arrow: { left: a }
|
|
193
193
|
};
|
|
194
194
|
}
|
|
195
|
-
const
|
|
196
|
-
function
|
|
195
|
+
const Et = 20;
|
|
196
|
+
function Tt(e) {
|
|
197
197
|
const t = [], o = console.error, i = console.warn, n = console.log, a = (s, l) => {
|
|
198
198
|
const d = {
|
|
199
199
|
message: l.map((r) => String(r)).join(" "),
|
|
200
200
|
timestamp: Date.now(),
|
|
201
201
|
level: s
|
|
202
202
|
};
|
|
203
|
-
t.length >=
|
|
203
|
+
t.length >= Et && t.shift(), t.push(d), e && e(d);
|
|
204
204
|
};
|
|
205
205
|
return console.error = function(...s) {
|
|
206
206
|
a("error", s), o.apply(console, s);
|
|
@@ -215,16 +215,16 @@ function It(e) {
|
|
|
215
215
|
}
|
|
216
216
|
};
|
|
217
217
|
}
|
|
218
|
-
const
|
|
218
|
+
const It = 20, P = 4096;
|
|
219
219
|
function k(e) {
|
|
220
220
|
if (e == null) return;
|
|
221
221
|
const t = typeof e == "string" ? e : JSON.stringify(e);
|
|
222
|
-
return t.length >
|
|
222
|
+
return t.length > P ? t.slice(0, P) + "…[truncated]" : t;
|
|
223
223
|
}
|
|
224
|
-
function
|
|
225
|
-
e.length >=
|
|
224
|
+
function A(e, t) {
|
|
225
|
+
e.length >= It && e.shift(), e.push(t);
|
|
226
226
|
}
|
|
227
|
-
async function
|
|
227
|
+
async function Lt(e) {
|
|
228
228
|
try {
|
|
229
229
|
const t = await e.clone().text();
|
|
230
230
|
return k(t);
|
|
@@ -240,8 +240,8 @@ function Rt() {
|
|
|
240
240
|
a != null && a.body && (d = k(a.body));
|
|
241
241
|
const r = await t.apply(window, [n, a]);
|
|
242
242
|
if (r.status >= 400) {
|
|
243
|
-
const c = await
|
|
244
|
-
|
|
243
|
+
const c = await Lt(r);
|
|
244
|
+
A(e, {
|
|
245
245
|
url: s,
|
|
246
246
|
method: l.toUpperCase(),
|
|
247
247
|
status: r.status,
|
|
@@ -259,7 +259,7 @@ function Rt() {
|
|
|
259
259
|
}, XMLHttpRequest.prototype.send = function(n) {
|
|
260
260
|
const a = this, s = n ? k(n) : void 0;
|
|
261
261
|
return a.addEventListener("load", function() {
|
|
262
|
-
a.status >= 400 &&
|
|
262
|
+
a.status >= 400 && A(e, {
|
|
263
263
|
url: a._qaid_url,
|
|
264
264
|
method: a._qaid_method.toUpperCase(),
|
|
265
265
|
status: a.status,
|
|
@@ -276,10 +276,10 @@ function Rt() {
|
|
|
276
276
|
}
|
|
277
277
|
};
|
|
278
278
|
}
|
|
279
|
-
function
|
|
279
|
+
function Mt() {
|
|
280
280
|
return typeof navigator < "u" && !!navigator.mediaDevices && typeof navigator.mediaDevices.getDisplayMedia == "function" && typeof MediaRecorder < "u";
|
|
281
281
|
}
|
|
282
|
-
function
|
|
282
|
+
function Dt() {
|
|
283
283
|
if (typeof MediaRecorder > "u") return "";
|
|
284
284
|
const e = [
|
|
285
285
|
"video/webm;codecs=vp9",
|
|
@@ -304,7 +304,7 @@ function zt(e = {}) {
|
|
|
304
304
|
return {
|
|
305
305
|
async start() {
|
|
306
306
|
p = !1, a = [];
|
|
307
|
-
const m =
|
|
307
|
+
const m = Dt();
|
|
308
308
|
if (!m)
|
|
309
309
|
throw new Error("No supported video MIME type found");
|
|
310
310
|
i = await navigator.mediaDevices.getDisplayMedia({
|
|
@@ -325,7 +325,7 @@ function zt(e = {}) {
|
|
|
325
325
|
y.data.size > 0 && a.push(y.data);
|
|
326
326
|
}, n.onstop = () => {
|
|
327
327
|
const y = new Blob(a, { type: m });
|
|
328
|
-
c && c(y), l && l(y), i && i.getTracks().forEach((
|
|
328
|
+
c && c(y), l && l(y), i && i.getTracks().forEach((q) => q.stop());
|
|
329
329
|
}, n.onerror = () => {
|
|
330
330
|
u && u(new Error("MediaRecorder error"));
|
|
331
331
|
}, n.start(1e3), r = Date.now(), d = setInterval(() => {
|
|
@@ -351,19 +351,19 @@ function zt(e = {}) {
|
|
|
351
351
|
}
|
|
352
352
|
};
|
|
353
353
|
}
|
|
354
|
-
function
|
|
354
|
+
function Ht(e = 640) {
|
|
355
355
|
return typeof window < "u" && window.innerWidth < e;
|
|
356
356
|
}
|
|
357
|
-
function
|
|
357
|
+
function O(e, t, o) {
|
|
358
358
|
const i = o.map((a) => a.style.visibility);
|
|
359
359
|
o.forEach((a) => a.style.visibility = "hidden");
|
|
360
360
|
const n = document.elementFromPoint(e, t);
|
|
361
361
|
return o.forEach((a, s) => a.style.visibility = i[s]), n;
|
|
362
362
|
}
|
|
363
|
-
function
|
|
363
|
+
function $(e) {
|
|
364
364
|
return e ? e.hasAttribute("data-qaid-embed") || e.hasAttribute("data-qaid-embed-overlay") ? !0 : !!e.closest("[data-qaid-embed], [data-qaid-embed-overlay]") : !1;
|
|
365
365
|
}
|
|
366
|
-
function
|
|
366
|
+
function Bt(e, t = 0) {
|
|
367
367
|
const o = e.getBoundingClientRect();
|
|
368
368
|
return {
|
|
369
369
|
x: o.left - t,
|
|
@@ -372,12 +372,7 @@ function At(e, t = 0) {
|
|
|
372
372
|
height: o.height + t * 2
|
|
373
373
|
};
|
|
374
374
|
}
|
|
375
|
-
function
|
|
376
|
-
document.querySelectorAll(`.${e}`).forEach((t) => {
|
|
377
|
-
t.classList.remove(e);
|
|
378
|
-
});
|
|
379
|
-
}
|
|
380
|
-
async function Ot(e = {}) {
|
|
375
|
+
async function Pt(e = {}) {
|
|
381
376
|
var n;
|
|
382
377
|
const { quality: t = 1, maxWidth: o = 1280, maxHeight: i = 800 } = e;
|
|
383
378
|
try {
|
|
@@ -407,40 +402,40 @@ async function Ot(e = {}) {
|
|
|
407
402
|
return console.warn("Screenshot capture failed:", a), null;
|
|
408
403
|
}
|
|
409
404
|
}
|
|
410
|
-
const
|
|
405
|
+
const N = "https://qaid.dev/lib/html2canvas.min.js", At = 1e4, Ot = 50;
|
|
411
406
|
let w = null;
|
|
412
|
-
function
|
|
407
|
+
function _t() {
|
|
413
408
|
if (typeof document > "u" || typeof window > "u")
|
|
414
409
|
return !1;
|
|
415
410
|
const e = document.createElement("canvas");
|
|
416
411
|
return typeof e.getContext == "function" && !!e.getContext("2d");
|
|
417
412
|
}
|
|
418
|
-
function
|
|
413
|
+
function $t() {
|
|
419
414
|
return window.html2canvas ? Promise.resolve(!0) : w || (w = new Promise((e) => {
|
|
420
415
|
if (!document.querySelector(
|
|
421
|
-
`script[src="${
|
|
416
|
+
`script[src="${N}"]`
|
|
422
417
|
)) {
|
|
423
418
|
const n = document.createElement("script");
|
|
424
|
-
n.src =
|
|
419
|
+
n.src = N, n.async = !0, document.head.appendChild(n);
|
|
425
420
|
}
|
|
426
421
|
const o = Date.now(), i = () => {
|
|
427
422
|
if (window.html2canvas) {
|
|
428
423
|
e(!0);
|
|
429
424
|
return;
|
|
430
425
|
}
|
|
431
|
-
if (Date.now() - o >
|
|
426
|
+
if (Date.now() - o > At) {
|
|
432
427
|
w = null, e(!1);
|
|
433
428
|
return;
|
|
434
429
|
}
|
|
435
|
-
setTimeout(i,
|
|
430
|
+
setTimeout(i, Ot);
|
|
436
431
|
};
|
|
437
432
|
i();
|
|
438
433
|
}), w);
|
|
439
434
|
}
|
|
440
|
-
async function
|
|
435
|
+
async function Nt(e = {}) {
|
|
441
436
|
const { quality: t = 0.8, maxWidth: o = 1280, maxHeight: i = 800 } = e;
|
|
442
437
|
try {
|
|
443
|
-
if (!await
|
|
438
|
+
if (!await $t() || !window.html2canvas)
|
|
444
439
|
return console.warn("html2canvas failed to load"), null;
|
|
445
440
|
const a = await window.html2canvas(document.body, {
|
|
446
441
|
useCORS: !0,
|
|
@@ -468,16 +463,16 @@ async function Vt(e = {}) {
|
|
|
468
463
|
return console.warn("DOM screenshot capture failed:", n), null;
|
|
469
464
|
}
|
|
470
465
|
}
|
|
471
|
-
const
|
|
472
|
-
function
|
|
466
|
+
const V = "qaid_visitor_id";
|
|
467
|
+
function Vt() {
|
|
473
468
|
try {
|
|
474
|
-
let e = localStorage.getItem(
|
|
475
|
-
return e || (e = crypto.randomUUID(), localStorage.setItem(
|
|
469
|
+
let e = localStorage.getItem(V);
|
|
470
|
+
return e || (e = crypto.randomUUID(), localStorage.setItem(V, e)), e;
|
|
476
471
|
} catch {
|
|
477
472
|
return crypto.randomUUID();
|
|
478
473
|
}
|
|
479
474
|
}
|
|
480
|
-
class
|
|
475
|
+
class Ut {
|
|
481
476
|
constructor(t) {
|
|
482
477
|
h(this, "config");
|
|
483
478
|
h(this, "state", "IDLE");
|
|
@@ -498,7 +493,6 @@ class Ft {
|
|
|
498
493
|
});
|
|
499
494
|
h(this, "feedbackId", null);
|
|
500
495
|
h(this, "mousePos", { x: 0, y: 0 });
|
|
501
|
-
h(this, "lastHighlighted", null);
|
|
502
496
|
h(this, "isMobile", !1);
|
|
503
497
|
h(this, "visitorId");
|
|
504
498
|
// Console capture
|
|
@@ -525,6 +519,7 @@ class Ft {
|
|
|
525
519
|
h(this, "crosshairH", null);
|
|
526
520
|
h(this, "crosshairV", null);
|
|
527
521
|
h(this, "scope", null);
|
|
522
|
+
h(this, "highlightBox", null);
|
|
528
523
|
h(this, "marker", null);
|
|
529
524
|
h(this, "modalContainer", null);
|
|
530
525
|
h(this, "backdrop", null);
|
|
@@ -585,13 +580,13 @@ class Ft {
|
|
|
585
580
|
maxDuration: ((m = t.videoOptions) == null ? void 0 : m.maxDuration) ?? 15
|
|
586
581
|
},
|
|
587
582
|
recordIcon: t.recordIcon ?? ""
|
|
588
|
-
}, this.boundKeyDown = this.handleKeyDown.bind(this), this.boundMouseMove = this.handleMouseMove.bind(this), this.boundClick = this.handleClick.bind(this), this.boundResize = this.handleResize.bind(this), this.visitorId =
|
|
583
|
+
}, this.boundKeyDown = this.handleKeyDown.bind(this), this.boundMouseMove = this.handleMouseMove.bind(this), this.boundClick = this.handleClick.bind(this), this.boundResize = this.handleResize.bind(this), this.visitorId = Vt(), this.init();
|
|
589
584
|
}
|
|
590
585
|
applyVars(t) {
|
|
591
|
-
|
|
586
|
+
ht(t, this.cssVars);
|
|
592
587
|
}
|
|
593
588
|
init() {
|
|
594
|
-
|
|
589
|
+
ut(), this.cssVars = lt({
|
|
595
590
|
positiveColor: this.config.colors.positive,
|
|
596
591
|
negativeColor: this.config.colors.negative,
|
|
597
592
|
markerColor: this.config.colors.marker,
|
|
@@ -600,13 +595,13 @@ class Ft {
|
|
|
600
595
|
backdropOpacity: this.config.backdropOpacity,
|
|
601
596
|
fontFamily: this.config.fontFamily,
|
|
602
597
|
fontSize: this.config.fontSize
|
|
603
|
-
}), this.checkMobile(), window.addEventListener("resize", this.boundResize), this.createEmbed(), this.consoleCapture =
|
|
598
|
+
}), this.checkMobile(), window.addEventListener("resize", this.boundResize), this.createEmbed(), this.consoleCapture = Tt((t) => {
|
|
604
599
|
var o;
|
|
605
600
|
this.feedbackData.consoleErrors = ((o = this.consoleCapture) == null ? void 0 : o.errors) ?? [];
|
|
606
601
|
}), this.feedbackData.consoleErrors = this.consoleCapture.errors;
|
|
607
602
|
}
|
|
608
603
|
checkMobile() {
|
|
609
|
-
this.isMobile =
|
|
604
|
+
this.isMobile = Ht();
|
|
610
605
|
}
|
|
611
606
|
handleResize() {
|
|
612
607
|
this.checkMobile();
|
|
@@ -616,7 +611,7 @@ class Ft {
|
|
|
616
611
|
let t = null;
|
|
617
612
|
this.config.container && (t = document.querySelector(this.config.container)), t ? (t.appendChild(this.shadowHost), this.isUserProvidedContainer = !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" });
|
|
618
613
|
const o = document.createElement("style");
|
|
619
|
-
if (o.textContent =
|
|
614
|
+
if (o.textContent = B(), this.shadowRoot.appendChild(o), this.config.css) {
|
|
620
615
|
const r = document.createElement("style");
|
|
621
616
|
r.textContent = this.config.css, this.shadowRoot.appendChild(r);
|
|
622
617
|
}
|
|
@@ -634,17 +629,17 @@ class Ft {
|
|
|
634
629
|
const r = document.createElement("div");
|
|
635
630
|
r.className = "qaid-tooltip-wrapper";
|
|
636
631
|
const c = document.createElement("button");
|
|
637
|
-
c.type = "button", c.className = n ? `${a} qaid-btn-up` : "qaid-btn qaid-btn-up", c.innerHTML = this.config.positiveIcon || T, c.addEventListener("click", (f) => this.handleThumbClick("up", f.currentTarget)), c.addEventListener("mouseenter", () => this.showTooltip(c)), c.addEventListener("mouseleave", () => this.hideTooltip()), r.appendChild(c);
|
|
632
|
+
c.type = "button", c.className = n ? `${a} qaid-btn-up` : "qaid-btn qaid-btn-up", c.innerHTML = this.config.positiveIcon || T, c.addEventListener("click", (f) => this.handleThumbClick("up", f.currentTarget, f)), c.addEventListener("mouseenter", () => this.showTooltip(c)), c.addEventListener("mouseleave", () => this.hideTooltip()), r.appendChild(c);
|
|
638
633
|
const u = document.createElement("div");
|
|
639
634
|
u.className = "qaid-tooltip-wrapper";
|
|
640
635
|
const p = document.createElement("button");
|
|
641
|
-
p.type = "button", p.className = n ? `${a} qaid-btn-down` : "qaid-btn qaid-btn-down", p.innerHTML = this.config.negativeIcon || I, p.addEventListener("click", (f) => this.handleThumbClick("down", f.currentTarget)), p.addEventListener("mouseenter", () => this.showTooltip(p)), p.addEventListener("mouseleave", () => this.hideTooltip()), u.appendChild(p), this.buttonsContainer.appendChild(r), this.buttonsContainer.appendChild(u);
|
|
636
|
+
p.type = "button", p.className = n ? `${a} qaid-btn-down` : "qaid-btn qaid-btn-down", p.innerHTML = this.config.negativeIcon || I, p.addEventListener("click", (f) => this.handleThumbClick("down", f.currentTarget, f)), p.addEventListener("mouseenter", () => this.showTooltip(p)), p.addEventListener("mouseleave", () => this.hideTooltip()), u.appendChild(p), this.buttonsContainer.appendChild(r), this.buttonsContainer.appendChild(u);
|
|
642
637
|
}
|
|
643
|
-
if (this.config.captureVideo &&
|
|
638
|
+
if (this.config.captureVideo && Mt()) {
|
|
644
639
|
const r = document.createElement("div");
|
|
645
640
|
r.className = "qaid-tooltip-wrapper";
|
|
646
641
|
const c = document.createElement("button");
|
|
647
|
-
c.type = "button", c.className = n ? `${a} qaid-btn-record` : "qaid-btn qaid-btn-record", c.innerHTML = this.config.recordIcon ||
|
|
642
|
+
c.type = "button", c.className = n ? `${a} qaid-btn-record` : "qaid-btn qaid-btn-record", c.innerHTML = this.config.recordIcon || et, c.addEventListener("click", () => this.startRecording()), c.addEventListener("mouseenter", () => this.showTooltip(c)), c.addEventListener("mouseleave", () => this.hideTooltip()), r.appendChild(c), this.buttonsContainer.appendChild(r);
|
|
648
643
|
}
|
|
649
644
|
}
|
|
650
645
|
/**
|
|
@@ -657,7 +652,7 @@ class Ft {
|
|
|
657
652
|
if (this.overlayShadowRoot) return this.overlayShadowRoot;
|
|
658
653
|
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" });
|
|
659
654
|
const t = document.createElement("style");
|
|
660
|
-
if (t.textContent =
|
|
655
|
+
if (t.textContent = B(), this.overlayShadowRoot.appendChild(t), this.config.css) {
|
|
661
656
|
const o = document.createElement("style");
|
|
662
657
|
o.textContent = this.config.css, this.overlayShadowRoot.appendChild(o);
|
|
663
658
|
}
|
|
@@ -674,8 +669,8 @@ class Ft {
|
|
|
674
669
|
hideTooltip() {
|
|
675
670
|
this.tooltipElement && this.tooltipElement.classList.remove("qaid-tooltip-visible");
|
|
676
671
|
}
|
|
677
|
-
handleThumbClick(t, o) {
|
|
678
|
-
this.config.skipTargeting ? this.submitDirectFeedback(t, o) : this.startTargeting(t);
|
|
672
|
+
handleThumbClick(t, o, i) {
|
|
673
|
+
this.config.skipTargeting ? this.submitDirectFeedback(t, o) : this.startTargeting(t, i);
|
|
679
674
|
}
|
|
680
675
|
submitDirectFeedback(t, o) {
|
|
681
676
|
this.feedbackData.feedbackType = t, this.feedbackData.elementSelector = null, this.feedbackData.elementText = null;
|
|
@@ -690,54 +685,60 @@ class Ft {
|
|
|
690
685
|
visible: !1
|
|
691
686
|
}, this.submitFeedback();
|
|
692
687
|
}
|
|
693
|
-
startTargeting(t) {
|
|
694
|
-
this.state = "TARGETING", this.feedbackData.feedbackType = t, this.feedbackData.elementSelector = null, this.feedbackData.elementText = null, this.selectedBounds.visible = !1, document.body.classList.add("qaid-targeting"), t === "up" ? document.body.classList.add("qaid-type-up") : document.body.classList.remove("qaid-type-up"), document.body.style.setProperty("--qaid-positive", this.cssVars["--qaid-positive"]), document.body.style.setProperty("--qaid-negative", this.cssVars["--qaid-negative"]), this.createTargetingOverlay(),
|
|
688
|
+
startTargeting(t, o) {
|
|
689
|
+
this.state = "TARGETING", this.feedbackData.feedbackType = t, this.feedbackData.elementSelector = null, this.feedbackData.elementText = null, this.selectedBounds.visible = !1, this.mousePos.x = o.clientX, this.mousePos.y = o.clientY, document.body.classList.add("qaid-targeting"), t === "up" ? document.body.classList.add("qaid-type-up") : document.body.classList.remove("qaid-type-up"), document.body.style.setProperty("--qaid-positive", this.cssVars["--qaid-positive"]), document.body.style.setProperty("--qaid-negative", this.cssVars["--qaid-negative"]), this.createTargetingOverlay(), document.addEventListener("keydown", this.boundKeyDown), document.addEventListener("mousemove", this.boundMouseMove), document.addEventListener("click", this.boundClick, !0);
|
|
695
690
|
}
|
|
696
691
|
createTargetingOverlay() {
|
|
697
692
|
const t = this.ensureOverlayHost();
|
|
698
|
-
this.overlayContainer = document.createElement("div"), this.overlayContainer.className = `qaid-targeting-overlay qaid-type-${this.feedbackData.feedbackType}`, this.captureLayer = document.createElement("div"), this.captureLayer.className = "qaid-capture-layer"
|
|
693
|
+
this.overlayContainer = document.createElement("div"), this.overlayContainer.className = `qaid-targeting-overlay qaid-type-${this.feedbackData.feedbackType}`, this.captureLayer = document.createElement("div"), this.captureLayer.className = "qaid-capture-layer";
|
|
699
694
|
const o = document.createElement("div");
|
|
700
695
|
o.className = "qaid-vignette", this.crosshairH = document.createElement("div"), this.crosshairH.className = "qaid-crosshair-h", this.crosshairV = document.createElement("div"), this.crosshairV.className = "qaid-crosshair-v", this.scope = document.createElement("div"), this.scope.className = "qaid-scope", this.scope.innerHTML = `
|
|
701
696
|
<div class="qaid-scope-ring"></div>
|
|
702
697
|
<div class="qaid-scope-ring-inner"></div>
|
|
703
698
|
<div class="qaid-scope-dot"></div>
|
|
704
|
-
`, this.overlayContainer.appendChild(this.captureLayer), this.overlayContainer.appendChild(o), this.overlayContainer.appendChild(this.crosshairH), this.overlayContainer.appendChild(this.crosshairV), this.overlayContainer.appendChild(this.scope), this.applyVars(this.overlayContainer), t.appendChild(this.overlayContainer);
|
|
699
|
+
`, this.highlightBox = document.createElement("div"), this.highlightBox.className = "qaid-highlight-box", this.overlayContainer.appendChild(this.captureLayer), this.overlayContainer.appendChild(o), this.overlayContainer.appendChild(this.highlightBox), this.overlayContainer.appendChild(this.crosshairH), this.overlayContainer.appendChild(this.crosshairV), this.overlayContainer.appendChild(this.scope), this.crosshairH.style.top = `${this.mousePos.y}px`, this.crosshairV.style.left = `${this.mousePos.x}px`, this.scope.style.left = `${this.mousePos.x}px`, this.scope.style.top = `${this.mousePos.y}px`, this.applyVars(this.overlayContainer), t.appendChild(this.overlayContainer);
|
|
705
700
|
}
|
|
706
701
|
handleKeyDown(t) {
|
|
707
702
|
t.key === "Escape" && (this.isRecording ? this.stopRecording() : this.videoPreview ? this.cancelRecordingPreview() : this.state === "TARGETING" ? this.cancelTargeting() : this.state === "MODAL_OPEN" && this.closeModal());
|
|
708
703
|
}
|
|
709
704
|
handleMouseMove(t) {
|
|
710
705
|
if (this.mousePos.x = t.clientX, this.mousePos.y = t.clientY, this.crosshairH && (this.crosshairH.style.top = `${t.clientY}px`), this.crosshairV && (this.crosshairV.style.left = `${t.clientX}px`), this.scope && (this.scope.style.left = `${t.clientX}px`, this.scope.style.top = `${t.clientY}px`), this.captureLayer && this.shadowHost) {
|
|
711
|
-
const o = [this.shadowHost, this.overlayShadowHost].filter(Boolean), i =
|
|
706
|
+
const o = [this.shadowHost, this.overlayShadowHost].filter(Boolean), i = O(
|
|
712
707
|
t.clientX,
|
|
713
708
|
t.clientY,
|
|
714
709
|
o
|
|
715
710
|
);
|
|
716
|
-
|
|
711
|
+
if (i && !$(i)) {
|
|
712
|
+
if (this.highlightBox) {
|
|
713
|
+
const n = i.getBoundingClientRect();
|
|
714
|
+
this.highlightBox.style.transform = `translate(${n.left}px, ${n.top}px)`, this.highlightBox.style.width = `${n.width}px`, this.highlightBox.style.height = `${n.height}px`, this.highlightBox.style.display = "block";
|
|
715
|
+
}
|
|
716
|
+
} else
|
|
717
|
+
this.highlightBox && (this.highlightBox.style.display = "none");
|
|
717
718
|
}
|
|
718
719
|
}
|
|
719
720
|
handleClick(t) {
|
|
720
|
-
if (
|
|
721
|
-
|
|
721
|
+
if (this.state !== "TARGETING" || !this.shadowHost) return;
|
|
722
|
+
t.preventDefault(), t.stopPropagation();
|
|
723
|
+
const o = [this.shadowHost, this.overlayShadowHost].filter(Boolean), i = O(
|
|
722
724
|
t.clientX,
|
|
723
725
|
t.clientY,
|
|
724
726
|
o
|
|
725
727
|
);
|
|
726
|
-
if (!i ||
|
|
728
|
+
if (!i || $(i))
|
|
727
729
|
return;
|
|
728
|
-
i
|
|
729
|
-
const n = At(i, 8);
|
|
730
|
+
const n = Bt(i, 8);
|
|
730
731
|
this.selectedBounds = {
|
|
731
732
|
...n,
|
|
732
733
|
clickX: t.clientX,
|
|
733
734
|
clickY: t.clientY,
|
|
734
735
|
visible: !0
|
|
735
736
|
};
|
|
736
|
-
const { selector: a, text: s } =
|
|
737
|
-
this.feedbackData.elementSelector = a, this.feedbackData.elementText = s,
|
|
737
|
+
const { selector: a, text: s } = wt(i);
|
|
738
|
+
this.feedbackData.elementSelector = a, this.feedbackData.elementText = s, this.removeTargetingOverlay(), document.removeEventListener("mousemove", this.boundMouseMove), document.removeEventListener("click", this.boundClick, !0), 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.state = "SELECTED", this.showSelectedMarker(), this.submitFeedback();
|
|
738
739
|
}
|
|
739
740
|
cancelTargeting() {
|
|
740
|
-
|
|
741
|
+
this.removeTargetingOverlay(), document.removeEventListener("mousemove", this.boundMouseMove), document.removeEventListener("click", this.boundClick, !0), 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.state = "IDLE", this.feedbackData.feedbackType = null, this.feedbackData.elementSelector = null, this.feedbackData.elementText = null, this.selectedBounds.visible = !1;
|
|
741
742
|
}
|
|
742
743
|
removeTargetingOverlay() {
|
|
743
744
|
this.overlayContainer && (this.overlayContainer.remove(), this.overlayContainer = null), this.captureLayer = null, this.crosshairH = null, this.crosshairV = null, this.scope = null;
|
|
@@ -753,7 +754,7 @@ class Ft {
|
|
|
753
754
|
async submitFeedback() {
|
|
754
755
|
if (!this.feedbackData.feedbackType) return;
|
|
755
756
|
let t = null;
|
|
756
|
-
this.config.captureScreenshot && (this.config.screenshotMethod === "dom" ? t = await
|
|
757
|
+
this.config.captureScreenshot && (this.config.screenshotMethod === "dom" ? t = await Nt(this.config.screenshotOptions) : t = await Pt(this.config.screenshotOptions));
|
|
757
758
|
const o = this.feedbackData.elementSelector ? {
|
|
758
759
|
x: this.selectedBounds.x,
|
|
759
760
|
y: this.selectedBounds.y,
|
|
@@ -807,7 +808,7 @@ class Ft {
|
|
|
807
808
|
`, this.applyVars(o), t.appendChild(o), this.modalContainer = o, this.setupModalInteractions();
|
|
808
809
|
}
|
|
809
810
|
showPositionedModal() {
|
|
810
|
-
const t = this.ensureOverlayHost(), { modal: o, arrow: i } =
|
|
811
|
+
const t = this.ensureOverlayHost(), { modal: o, arrow: i } = St(
|
|
811
812
|
this.selectedBounds,
|
|
812
813
|
window.innerWidth,
|
|
813
814
|
window.innerHeight,
|
|
@@ -1001,15 +1002,15 @@ class Ft {
|
|
|
1001
1002
|
* Destroy the embed and clean up all resources
|
|
1002
1003
|
*/
|
|
1003
1004
|
destroy() {
|
|
1004
|
-
this.cleanupRecording(), this.removeVideoPreview(), this.consoleCapture && (this.consoleCapture.restore(), this.consoleCapture = null), window.removeEventListener("resize", this.boundResize), document.removeEventListener("keydown", this.boundKeyDown),
|
|
1005
|
+
this.cleanupRecording(), this.removeVideoPreview(), this.consoleCapture && (this.consoleCapture.restore(), this.consoleCapture = null), window.removeEventListener("resize", this.boundResize), document.removeEventListener("keydown", this.boundKeyDown), document.removeEventListener("mousemove", this.boundMouseMove), document.removeEventListener("click", this.boundClick, !0), 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.overlayContainer = null, this.captureLayer = null, this.crosshairH = null, this.crosshairV = null, this.scope = null, this.marker = null, this.modalContainer = null, this.backdrop = null, this.tooltipElement = null, pt();
|
|
1005
1006
|
}
|
|
1006
1007
|
}
|
|
1007
|
-
function
|
|
1008
|
+
function W(e) {
|
|
1008
1009
|
var o;
|
|
1009
1010
|
const t = document.querySelector(e);
|
|
1010
1011
|
return ((o = t == null ? void 0 : t.textContent) == null ? void 0 : o.trim()) ?? "";
|
|
1011
1012
|
}
|
|
1012
|
-
function
|
|
1013
|
+
function Ft() {
|
|
1013
1014
|
var o;
|
|
1014
1015
|
const e = document.querySelector(
|
|
1015
1016
|
'script[type="application/json"][data-feedback-config]'
|
|
@@ -1019,20 +1020,20 @@ function Wt() {
|
|
|
1019
1020
|
if (!t) return null;
|
|
1020
1021
|
try {
|
|
1021
1022
|
const i = JSON.parse(t);
|
|
1022
|
-
return i.cssSelector && !i.css && (i.css =
|
|
1023
|
+
return i.cssSelector && !i.css && (i.css = W(i.cssSelector), delete i.cssSelector), i;
|
|
1023
1024
|
} catch {
|
|
1024
1025
|
return null;
|
|
1025
1026
|
}
|
|
1026
1027
|
}
|
|
1027
|
-
function
|
|
1028
|
+
function Wt(e) {
|
|
1028
1029
|
const t = e.getAttribute("data-endpoint");
|
|
1029
1030
|
if (!t) return null;
|
|
1030
|
-
const o = e.getAttribute("data-position"), i = e.getAttribute("data-zindex"), n = e.getAttribute("data-positive-color"), a = e.getAttribute("data-negative-color"), s = e.getAttribute("data-marker-color"), l = e.getAttribute("data-container"), d = e.getAttribute("data-button-class"), r = e.getAttribute("data-skip-targeting"), c = e.getAttribute("data-incognito"), u = e.getAttribute("data-button-size"), p = e.getAttribute("data-offset-x"), f = e.getAttribute("data-offset-y"), b = e.getAttribute("data-modal-width"), g = e.getAttribute("data-backdrop-opacity"), m = e.getAttribute("data-font-family"), v = e.getAttribute("data-font-size"), y = e.getAttribute("data-tooltip"),
|
|
1031
|
+
const o = e.getAttribute("data-position"), i = e.getAttribute("data-zindex"), n = e.getAttribute("data-positive-color"), a = e.getAttribute("data-negative-color"), s = e.getAttribute("data-marker-color"), l = e.getAttribute("data-container"), d = e.getAttribute("data-button-class"), r = e.getAttribute("data-skip-targeting"), c = e.getAttribute("data-incognito"), u = e.getAttribute("data-button-size"), p = e.getAttribute("data-offset-x"), f = e.getAttribute("data-offset-y"), b = e.getAttribute("data-modal-width"), g = e.getAttribute("data-backdrop-opacity"), m = e.getAttribute("data-font-family"), v = e.getAttribute("data-font-size"), y = e.getAttribute("data-tooltip"), q = e.getAttribute("data-modal-title"), L = e.getAttribute("data-modal-subtitle"), R = e.getAttribute("data-placeholder"), M = e.getAttribute("data-submit-button"), D = e.getAttribute("data-skip-button"), X = e.getAttribute("data-positive-icon"), _ = e.getAttribute("data-negative-icon"), j = e.getAttribute("data-api-key"), K = e.getAttribute("data-capture-screenshot"), C = e.getAttribute("data-screenshot-quality"), S = e.getAttribute("data-screenshot-max-width"), E = e.getAttribute("data-screenshot-max-height"), Y = e.getAttribute("data-capture-video"), J = e.getAttribute("data-hide-thumbs"), z = e.getAttribute("data-video-max-duration"), G = e.getAttribute("data-screenshot-method"), Z = e.getAttribute("data-direction"), H = e.getAttribute("data-css-selector");
|
|
1031
1032
|
return {
|
|
1032
1033
|
endpoint: t,
|
|
1033
|
-
css:
|
|
1034
|
-
apiKey:
|
|
1035
|
-
captureScreenshot:
|
|
1034
|
+
css: H ? W(H) : void 0,
|
|
1035
|
+
apiKey: j ?? void 0,
|
|
1036
|
+
captureScreenshot: K === "true" ? !0 : void 0,
|
|
1036
1037
|
screenshotOptions: C || S || E ? {
|
|
1037
1038
|
quality: C ? parseFloat(C) : void 0,
|
|
1038
1039
|
maxWidth: S ? parseInt(S, 10) : void 0,
|
|
@@ -1040,7 +1041,7 @@ function _t(e) {
|
|
|
1040
1041
|
} : void 0,
|
|
1041
1042
|
container: l ?? void 0,
|
|
1042
1043
|
buttonClass: d ?? void 0,
|
|
1043
|
-
direction:
|
|
1044
|
+
direction: Z ?? void 0,
|
|
1044
1045
|
position: o ?? void 0,
|
|
1045
1046
|
zIndex: i ? parseInt(i, 10) : void 0,
|
|
1046
1047
|
skipTargeting: r === "true" ? !0 : void 0,
|
|
@@ -1059,19 +1060,19 @@ function _t(e) {
|
|
|
1059
1060
|
negative: a ?? void 0,
|
|
1060
1061
|
marker: s ?? void 0
|
|
1061
1062
|
},
|
|
1062
|
-
text: y ||
|
|
1063
|
+
text: y || q || L || R || M || D ? {
|
|
1063
1064
|
tooltip: y ?? void 0,
|
|
1064
|
-
modalTitle:
|
|
1065
|
-
modalSubtitle:
|
|
1065
|
+
modalTitle: q ?? void 0,
|
|
1066
|
+
modalSubtitle: L ?? void 0,
|
|
1066
1067
|
placeholder: R ?? void 0,
|
|
1067
|
-
submitButton:
|
|
1068
|
-
skipButton:
|
|
1068
|
+
submitButton: M ?? void 0,
|
|
1069
|
+
skipButton: D ?? void 0
|
|
1069
1070
|
} : void 0,
|
|
1070
1071
|
positiveIcon: X ?? void 0,
|
|
1071
|
-
negativeIcon:
|
|
1072
|
-
screenshotMethod:
|
|
1073
|
-
captureVideo:
|
|
1074
|
-
hideThumbs:
|
|
1072
|
+
negativeIcon: _ ?? void 0,
|
|
1073
|
+
screenshotMethod: G ?? void 0,
|
|
1074
|
+
captureVideo: Y === "true" ? !0 : void 0,
|
|
1075
|
+
hideThumbs: J === "true" ? !0 : void 0,
|
|
1075
1076
|
videoOptions: z ? {
|
|
1076
1077
|
maxDuration: parseInt(z, 10)
|
|
1077
1078
|
} : void 0
|
|
@@ -1079,18 +1080,18 @@ function _t(e) {
|
|
|
1079
1080
|
}
|
|
1080
1081
|
if (typeof document < "u") {
|
|
1081
1082
|
const e = () => {
|
|
1082
|
-
const t = document.currentScript, o =
|
|
1083
|
-
n != null && n.endpoint && new
|
|
1083
|
+
const t = document.currentScript, o = Ft(), i = t ? Wt(t) : null, n = o ?? i;
|
|
1084
|
+
n != null && n.endpoint && new Ut(n);
|
|
1084
1085
|
};
|
|
1085
1086
|
document.readyState === "loading" ? document.addEventListener("DOMContentLoaded", e) : e();
|
|
1086
1087
|
}
|
|
1087
1088
|
export {
|
|
1088
|
-
|
|
1089
|
-
|
|
1089
|
+
Ut as QaidFeedback,
|
|
1090
|
+
Nt as captureDomScreenshot,
|
|
1090
1091
|
Rt as captureNetworkErrors,
|
|
1091
1092
|
zt as createVideoRecorder,
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1093
|
+
Dt as getSupportedMimeType,
|
|
1094
|
+
_t as isDomScreenshotSupported,
|
|
1095
|
+
Mt as isVideoRecordingSupported
|
|
1095
1096
|
};
|
|
1096
1097
|
//# sourceMappingURL=qaid.js.map
|