pushfeedback 0.1.70 → 0.1.71

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.
Files changed (43) hide show
  1. package/dist/cjs/canvas-editor_3.cjs.entry.js +1367 -0
  2. package/dist/cjs/index-9a8f4784.js +1584 -0
  3. package/dist/cjs/index.cjs.js +2 -0
  4. package/dist/cjs/loader.cjs.js +22 -0
  5. package/dist/cjs/pushfeedback.cjs.js +23 -0
  6. package/dist/collection/collection-manifest.json +14 -0
  7. package/dist/collection/components/canvas-editor/canvas-editor.css +404 -0
  8. package/dist/collection/components/canvas-editor/canvas-editor.js +1282 -0
  9. package/dist/collection/components/feedback-button/feedback-button.css +81 -0
  10. package/dist/collection/components/feedback-button/feedback-button.js +1169 -0
  11. package/dist/collection/components/feedback-modal/feedback-modal.css +547 -0
  12. package/dist/collection/components/feedback-modal/feedback-modal.js +1257 -0
  13. package/dist/collection/index.js +1 -0
  14. package/dist/components/canvas-editor.js +6 -0
  15. package/dist/{pushfeedback/canvas-editor.entry.js → components/canvas-editor2.js} +64 -7
  16. package/dist/{pushfeedback/feedback-button.entry.js → components/feedback-button.js} +90 -8
  17. package/dist/components/feedback-modal.js +6 -0
  18. package/dist/{pushfeedback/feedback-modal.entry.js → components/feedback-modal2.js} +97 -7
  19. package/dist/components/index.js +4 -0
  20. package/dist/esm/canvas-editor_3.entry.js +1361 -0
  21. package/dist/esm/index-f65e9124.js +1555 -0
  22. package/dist/esm/index.js +1 -0
  23. package/dist/esm/loader.js +18 -0
  24. package/dist/esm/polyfills/core-js.js +11 -0
  25. package/dist/esm/polyfills/css-shim.js +1 -0
  26. package/dist/esm/polyfills/dom.js +79 -0
  27. package/dist/esm/polyfills/es5-html-element.js +1 -0
  28. package/dist/esm/polyfills/index.js +34 -0
  29. package/dist/esm/polyfills/system.js +6 -0
  30. package/dist/esm/pushfeedback.js +18 -0
  31. package/dist/index.cjs.js +1 -0
  32. package/dist/index.js +1 -0
  33. package/dist/pushfeedback/index.esm.js +0 -1
  34. package/dist/pushfeedback/p-2c39091c.entry.js +1 -0
  35. package/dist/pushfeedback/p-af2a1f7f.js +2 -0
  36. package/dist/pushfeedback/pushfeedback.css +1 -146
  37. package/dist/pushfeedback/pushfeedback.esm.js +1 -148
  38. package/package.json +1 -1
  39. package/dist/pushfeedback/app-globals-0f993ce5.js +0 -3
  40. package/dist/pushfeedback/css-shim-b7d3d95f.js +0 -4
  41. package/dist/pushfeedback/dom-64053c71.js +0 -73
  42. package/dist/pushfeedback/index-36434da0.js +0 -3371
  43. package/dist/pushfeedback/shadow-css-98135883.js +0 -387
@@ -0,0 +1 @@
1
+ import{r as t,c as e,h as o,H as i,g as s}from"./p-af2a1f7f.js";const a=class{constructor(o){t(this,o),this.screenshotReady=e(this,"screenshotReady",7),this.screenshotCancelled=e(this,"screenshotCancelled",7),this.screenshotFailed=e(this,"screenshotFailed",7),this.openScreenShot=async()=>{this.takingScreenshot=!0,this.annotations=[],this.currentAnnotation=null,this.isDrawing=!1,this.hoveredAnnotation=null,this.hideAllFeedbackElements();try{await new Promise((t=>setTimeout(t,100)));const t=await this.captureViewportScreenshot();this.originalImageData=t,this.takingScreenshot=!1,this.showCanvasEditor=!0,this.showAllFeedbackElements(),setTimeout((()=>{this.initializeCanvas()}),100)}catch(t){console.error("Failed to capture screenshot:",t),this.takingScreenshot=!1,this.showAllFeedbackElements(),this.handleScreenshotError(t)}},this.hideAllFeedbackElements=()=>{document.querySelectorAll("feedback-button, feedback-modal").forEach((t=>{t.style.visibility="hidden"}))},this.showAllFeedbackElements=()=>{document.querySelectorAll("feedback-button, feedback-modal").forEach((t=>{t.style.visibility="visible"}))},this.handleScreenshotError=t=>{let e=this.screenshotErrorGeneral;"NotAllowedError"===t.name?e+=" "+this.screenshotErrorPermission:"NotSupportedError"===t.name?e+=" "+this.screenshotErrorNotSupported:"NotFoundError"===t.name?e+=" "+this.screenshotErrorNotFound:"AbortError"===t.name?e+=" "+this.screenshotErrorCancelled:t.message&&t.message.includes("not supported")?e+=" "+this.screenshotErrorBrowserNotSupported:e+=" "+this.screenshotErrorUnexpected,this.screenshotFailed.emit({error:e})},this.closeCanvasEditor=()=>{this.showCanvasEditor=!1,this.screenshotCancelled.emit()},this.saveAnnotations=()=>{if(this.canvasRef){const t=this.canvasRef.toDataURL("image/png");this.screenshotReady.emit({screenshot:t})}this.showCanvasEditor=!1},this.initializeCanvas=()=>{if(!this.canvasRef||!this.originalImageData)return;this.canvasContext=this.canvasRef.getContext("2d");const t=new Image;t.onload=()=>{this.canvasRef.width=t.width,this.canvasRef.height=t.height;const e=Math.min((this.canvasRef.parentElement.clientWidth-32)/t.width,(this.canvasRef.parentElement.clientHeight-32)/t.height,1),o=t.height*e;this.canvasRef.style.width=t.width*e+"px",this.canvasRef.style.height=`${o}px`,this.canvasContext.drawImage(t,0,0),this.redrawAnnotations()},t.src=this.originalImageData},this.redrawAnnotations=()=>{if(!this.canvasContext)return;const t=new Image;t.onload=()=>{this.canvasContext.clearRect(0,0,this.canvasRef.width,this.canvasRef.height),this.canvasContext.drawImage(t,0,0),this.annotations.forEach((t=>{this.drawAnnotation(t)}))},t.src=this.originalImageData},this.drawAnnotation=t=>{if(this.canvasContext)switch(this.canvasContext.strokeStyle=t.color,this.canvasContext.lineWidth=t.lineWidth,this.canvasContext.lineCap="round",this.canvasContext.lineJoin="round",t.type){case"rectangle":this.canvasContext.strokeRect(t.startX,t.startY,t.width,t.height),this.selectedAnnotation===t&&this.drawSelectionIndicator(t),this.hoveredAnnotation===t&&this.drawRectangleResizeHandles(t);break;case"line":this.canvasContext.beginPath(),this.canvasContext.moveTo(t.startX,t.startY),this.canvasContext.lineTo(t.endX,t.endY),this.canvasContext.stroke(),this.selectedAnnotation===t&&this.drawSelectionIndicator(t),this.hoveredAnnotation===t&&this.drawLineResizeHandles(t);break;case"arrow":this.drawArrow(t.startX,t.startY,t.endX,t.endY),this.selectedAnnotation===t&&this.drawSelectionIndicator(t),this.hoveredAnnotation===t&&this.drawLineResizeHandles(t);break;case"text":const e=t.fontSize||24;this.canvasContext.fillStyle=t.color,this.canvasContext.font=`${e}px Arial`,this.canvasContext.fillText(t.text,t.x,t.y),this.selectedAnnotation===t&&this.drawTextSelectionIndicator(t)}},this.drawSelectionIndicator=t=>{if(!this.canvasContext)return;const e=this.canvasContext.strokeStyle,o=this.canvasContext.lineWidth;switch(this.canvasContext.strokeStyle="#0070F4",this.canvasContext.lineWidth=2,this.canvasContext.setLineDash([5,5]),t.type){case"rectangle":this.canvasContext.strokeRect(t.startX-2,t.startY-2,t.width+4,t.height+4);break;case"line":case"arrow":this.canvasContext.beginPath(),this.canvasContext.moveTo(t.startX,t.startY),this.canvasContext.lineTo(t.endX,t.endY),this.canvasContext.stroke()}this.canvasContext.setLineDash([]),this.canvasContext.strokeStyle=e,this.canvasContext.lineWidth=o},this.drawTextSelectionIndicator=t=>{if(!this.canvasContext)return;const e=t.fontSize||24,o=this.getTextWidth(t.text,e),i=this.canvasContext.strokeStyle,s=this.canvasContext.lineWidth;this.canvasContext.strokeStyle="#0070F4",this.canvasContext.lineWidth=2,this.canvasContext.setLineDash([3,3]),this.canvasContext.strokeRect(t.x-4,t.y-e-4,o+8,e+8),this.canvasContext.setLineDash([]),this.canvasContext.strokeStyle=i,this.canvasContext.lineWidth=s},this.drawArrow=(t,e,o,i)=>{const s=Math.atan2(i-e,o-t);this.canvasContext.beginPath(),this.canvasContext.moveTo(t,e),this.canvasContext.lineTo(o,i),this.canvasContext.stroke(),this.canvasContext.beginPath(),this.canvasContext.moveTo(o,i),this.canvasContext.lineTo(o-15*Math.cos(s-Math.PI/6),i-15*Math.sin(s-Math.PI/6)),this.canvasContext.moveTo(o,i),this.canvasContext.lineTo(o-15*Math.cos(s+Math.PI/6),i-15*Math.sin(s+Math.PI/6)),this.canvasContext.stroke()},this.undoLastAnnotation=()=>{this.annotations=this.annotations.slice(0,-1),this.redrawAnnotations()},this.handleColorSlotClick=t=>{this.editingColorIndex===t?(this.canvasDrawingColor=this.defaultColors[t],this.showColorPicker=!1,this.editingColorIndex=-1):(this.editingColorIndex=t,this.showColorPicker=!0,this.canvasDrawingColor=this.defaultColors[t])},this.updateColorSlot=t=>{this.editingColorIndex>=0&&this.editingColorIndex<this.defaultColors.length&&(this.defaultColors[this.editingColorIndex]=t,this.canvasDrawingColor=t,this.showColorPicker=!1,this.editingColorIndex=-1,this.defaultColors=[...this.defaultColors])},this.handleColorPickerInput=t=>{t.stopPropagation();const e=t.target.value;this.editingColorIndex>=0&&this.editingColorIndex<this.defaultColors.length&&(this.defaultColors[this.editingColorIndex]=e,this.canvasDrawingColor=e,this.defaultColors=[...this.defaultColors])},this.handleColorPickerClick=t=>{t.stopPropagation()},this.closeColorPicker=()=>{this.showColorPicker=!1,this.editingColorIndex=-1},this.getTextWidth=(t,e)=>{if(!this.canvasContext)return t.length*e*.6;const o=this.canvasContext.font;this.canvasContext.font=`${e}px Arial`;const i=this.canvasContext.measureText(t).width;return this.canvasContext.font=o,i},this.isPointInResizeHandle=(t,e,o)=>{switch(o.type){case"rectangle":const i=o.startX+o.width,s=o.startY+o.height;return t>=i-4&&t<=i+4&&e>=s-4&&e<=s+4;case"line":case"arrow":const a=[{x:o.startX,y:o.startY,point:"start"},{x:o.endX,y:o.endY,point:"end"}];for(const o of a)if(t>=o.x-4&&t<=o.x+4&&e>=o.y-4&&e<=o.y+4)return o.point;return!1;default:return!1}},this.drawRectangleResizeHandles=t=>{if(!this.canvasContext||"rectangle"!==t.type)return;const e=t.startX+t.width,o=t.startY+t.height;this.canvasContext.fillStyle="#0070F4",this.canvasContext.strokeStyle="#ffffff",this.canvasContext.lineWidth=2,this.canvasContext.fillRect(e-4,o-4,8,8),this.canvasContext.strokeRect(e-4,o-4,8,8)},this.drawLineResizeHandles=t=>{if(!this.canvasContext||"line"!==t.type&&"arrow"!==t.type)return;const e=[{x:t.startX,y:t.startY},{x:t.endX,y:t.endY}];this.canvasContext.fillStyle="#0070F4",this.canvasContext.strokeStyle="#ffffff",this.canvasContext.lineWidth=2,e.forEach((t=>{this.canvasContext.fillRect(t.x-4,t.y-4,8,8),this.canvasContext.strokeRect(t.x-4,t.y-4,8,8)}))},this.startResize=(t,e,o)=>{this.isResizing=!0,this.resizingAnnotation=t,this.resizeHandle=e,this.dragStartPos=o,"rectangle"===t.type&&(this.resizeStartDimensions={width:t.width,height:t.height})},this.handleResize=t=>{if(!this.resizingAnnotation||!this.dragStartPos)return;const e=this.resizingAnnotation,o=this.annotations.findIndex((t=>t===e));if(-1===o)return;let i=Object.assign({},e);switch(e.type){case"rectangle":const e=t.y-this.dragStartPos.y;i.width=Math.max(10,this.resizeStartDimensions.width+(t.x-this.dragStartPos.x)),i.height=Math.max(10,this.resizeStartDimensions.height+e);break;case"line":case"arrow":"start"===this.resizeHandle?(i.startX=t.x,i.startY=t.y):"end"===this.resizeHandle&&(i.endX=t.x,i.endY=t.y)}this.annotations[o]=i,this.resizingAnnotation=i,this.redrawAnnotations()},this.startTextEditing=t=>{const e=prompt(this.editTextPromptText,t.text);if(null!==e&&e.trim()){const o=this.annotations.findIndex((e=>e===t));-1!==o&&(this.annotations[o]=Object.assign(Object.assign({},t),{text:e.trim()}),this.selectedAnnotation=this.annotations[o],this.redrawAnnotations())}},this.updateSelectedTextSize=t=>{if(this.selectedAnnotation&&"text"===this.selectedAnnotation.type){const e=this.annotations.findIndex((t=>t===this.selectedAnnotation));-1!==e&&(this.annotations[e]=Object.assign(Object.assign({},this.selectedAnnotation),{fontSize:Math.max(8,Math.min(72,t))}),this.selectedAnnotation=this.annotations[e],this.redrawAnnotations())}},this.updateSelectedBorderWidth=t=>{if(this.selectedAnnotation&&["rectangle","line","arrow"].includes(this.selectedAnnotation.type)){const e=this.annotations.findIndex((t=>t===this.selectedAnnotation));-1!==e&&(this.annotations[e]=Object.assign(Object.assign({},this.selectedAnnotation),{lineWidth:Math.max(1,Math.min(20,t))}),this.selectedAnnotation=this.annotations[e],this.redrawAnnotations())}},this.handleCanvasMouseDown=t=>{if(!this.canvasRef)return;if(window.innerWidth<=768)return;this.showColorPicker&&this.closeColorPicker();const e=this.getCanvasCoordinates(t),o=this.findAnnotationAt(e.x,e.y);if(o){if(this.selectedAnnotation=o.annotation,"text"!==o.annotation.type){const t=this.isPointInResizeHandle(e.x,e.y,o.annotation);if(t)return this.startResize(o.annotation,t,e),void(this.canvasRef.style.cursor="nw-resize")}if("text"===o.annotation.type&&2===t.detail)return void this.startTextEditing(o.annotation);if(!this.isDrawing)return this.isDragging=!0,this.draggedAnnotation=o.annotation,this.dragStartPos=e,void(this.canvasRef.style.cursor="grabbing")}else this.selectedAnnotation=null;if(this.isDrawing=!0,"text"===this.canvasDrawingTool){const t=prompt(this.editTextPromptText);t&&(this.annotations=[...this.annotations,{type:"text",x:e.x,y:e.y,text:t,color:this.canvasDrawingColor,fontSize:this.canvasTextSize}],this.redrawAnnotations()),this.isDrawing=!1}else this.currentAnnotation={type:this.canvasDrawingTool,startX:e.x,startY:e.y,color:this.canvasDrawingColor,lineWidth:this.canvasLineWidth}},this.handleCanvasMouseMove=t=>{if(!this.canvasRef)return;if(window.innerWidth<=768)return;const e=this.getCanvasCoordinates(t);if(this.isResizing&&this.resizingAnnotation)return void this.handleResize(e);if(this.isDragging&&this.draggedAnnotation&&this.dragStartPos){const t=e.x-this.dragStartPos.x,o=e.y-this.dragStartPos.y,i=Object.assign({},this.draggedAnnotation);switch(i.type){case"rectangle":i.startX+=t,i.startY+=o;break;case"line":case"arrow":i.startX+=t,i.startY+=o,i.endX+=t,i.endY+=o;break;case"text":i.x+=t,i.y+=o}const s=this.annotations.findIndex((t=>t===this.draggedAnnotation));return-1!==s&&(this.annotations[s]=i,this.draggedAnnotation=i),this.dragStartPos=e,void this.redrawAnnotations()}if(this.isDrawing&&this.currentAnnotation)return"rectangle"===this.canvasDrawingTool?(this.currentAnnotation.width=e.x-this.currentAnnotation.startX,this.currentAnnotation.height=e.y-this.currentAnnotation.startY):(this.currentAnnotation.endX=e.x,this.currentAnnotation.endY=e.y),this.redrawAnnotations(),void this.drawAnnotation(this.currentAnnotation);const o=this.findAnnotationAt(e.x,e.y);if(o){if("text"!==o.annotation.type&&this.isPointInResizeHandle(e.x,e.y,o.annotation))return this.canvasRef.style.cursor="nw-resize",this.hoveredAnnotation=o.annotation,void this.redrawAnnotations();this.canvasRef.style.cursor="grab",this.hoveredAnnotation!==o.annotation&&(this.hoveredAnnotation=o.annotation,this.redrawAnnotations())}else this.canvasRef.style.cursor="crosshair",this.hoveredAnnotation&&(this.hoveredAnnotation=null,this.redrawAnnotations())},this.handleCanvasMouseUp=()=>{if(!(window.innerWidth<=768))return this.isResizing?(this.isResizing=!1,this.resizingAnnotation=null,this.dragStartPos=null,this.resizeHandle=!1,this.resizeStartDimensions=null,void(this.canvasRef&&(this.canvasRef.style.cursor="crosshair"))):this.isDragging?(this.isDragging=!1,this.draggedAnnotation=null,this.dragStartPos=null,void(this.canvasRef&&(this.canvasRef.style.cursor="crosshair"))):void(this.isDrawing&&this.currentAnnotation&&(this.isDrawing=!1,this.annotations=[...this.annotations,this.currentAnnotation],this.currentAnnotation=null,this.redrawAnnotations()))},this.getCanvasCoordinates=t=>{if(!this.canvasRef)return{x:0,y:0};const e=this.canvasRef.getBoundingClientRect();return{x:this.canvasRef.width/e.width*(t.clientX-e.left),y:this.canvasRef.height/e.height*(t.clientY-e.top)}},this.findAnnotationAt=(t,e)=>{for(let o=this.annotations.length-1;o>=0;o--){const i=this.annotations[o];if(this.isPointInAnnotation(t,e,i))return{annotation:i,index:o}}return null},this.isPointInAnnotation=(t,e,o)=>{const i=10;switch(o.type){case"rectangle":const s=Math.min(o.startX,o.startX+o.width),a=Math.max(o.startX,o.startX+o.width),r=Math.min(o.startY,o.startY+o.height),n=Math.max(o.startY,o.startY+o.height);return t>=s-i&&t<=a+i&&e>=r-i&&e<=n+i;case"line":case"arrow":const d=o.endY-o.startY,c=o.startX-o.endX;return Math.abs(d*t+c*e+(o.endX*o.startY-o.startX*o.endY))/Math.sqrt(d*d+c*c)<=i;case"text":const h=o.fontSize||24,l=this.getTextWidth(o.text,h);return t>=o.x-i&&t<=o.x+l+i&&e>=o.y-h-i&&e<=o.y+i;default:return!1}},this.canvasEditorTitle="Edit screenshot",this.canvasEditorCancelText="Cancel",this.canvasEditorSaveText="Save",this.screenshotTakingText="Taking screenshot...",this.screenshotAttachedText="Screenshot attached",this.screenshotButtonText="Add a screenshot",this.autoStartScreenshot=!1,this.existingScreenshot="",this.editTextButtonText="Edit Text",this.sizeLabelText="Size:",this.borderLabelText="Border:",this.editTextPromptText="Edit text:",this.screenshotErrorGeneral="Failed to capture screenshot.",this.screenshotErrorPermission="Permission denied. Please allow screen sharing to take screenshots.",this.screenshotErrorNotSupported="Screen capture is not supported in this browser.",this.screenshotErrorNotFound="No screen sources available for capture.",this.screenshotErrorCancelled="Screenshot capture was cancelled.",this.screenshotErrorBrowserNotSupported="Your browser does not support screen capture. Please use a browser like Chrome, Firefox, or Safari on desktop.",this.screenshotErrorUnexpected="An unexpected error occurred. Please try again.",this.takingScreenshot=!1,this.showCanvasEditor=!1,this.canvasDrawingTool="rectangle",this.canvasDrawingColor="#ff0000",this.canvasLineWidth=3,this.canvasTextSize=24,this.isDrawing=!1,this.annotations=[],this.currentAnnotation=null,this.isDragging=!1,this.draggedAnnotation=null,this.dragStartPos=null,this.showColorPicker=!1,this.editingColorIndex=-1,this.selectedAnnotation=null,this.isResizing=!1,this.resizingAnnotation=null,this.resizeStartSize=24,this.resizeStartDimensions=null,this.hoveredAnnotation=null,this.resizeHandle=!1,this.defaultColors=["#ff0000","#00ff00","#0000ff","#000000"]}componentDidLoad(){this.autoStartScreenshot?(this.showCanvasEditor=!0,setTimeout((()=>{this.openScreenShot()}),100)):this.existingScreenshot&&(this.originalImageData=this.existingScreenshot,this.showCanvasEditor=!0,setTimeout((()=>{this.initializeCanvas()}),100))}async captureViewportScreenshot(){try{if(!navigator.mediaDevices||!navigator.mediaDevices.getDisplayMedia)throw new Error("Screen Capture API is not supported in this browser");const t=await navigator.mediaDevices.getDisplayMedia({video:{mediaSource:"screen",width:{ideal:window.innerWidth},height:{ideal:window.innerHeight}},audio:!1,preferCurrentTab:!0}),e=document.createElement("video");return e.srcObject=t,e.autoplay=!0,e.muted=!0,new Promise(((o,i)=>{e.onloadedmetadata=()=>{e.play(),setTimeout((()=>{try{const i=document.createElement("canvas");i.width=e.videoWidth,i.height=e.videoHeight,i.getContext("2d").drawImage(e,0,0),t.getTracks().forEach((t=>t.stop()));const s=i.toDataURL("image/png");console.log("Screenshot captured successfully using Screen Capture API"),o(s)}catch(e){t.getTracks().forEach((t=>t.stop())),i(e)}}),100)},e.onerror=()=>{t.getTracks().forEach((t=>t.stop())),i(new Error("Failed to load video for screenshot capture"))}}))}catch(t){throw console.error("Screen capture failed:",t),t}}render(){var t,e,i,s,a,r;return o("div",{class:"canvas-editor-wrapper"},this.showCanvasEditor&&o("div",{class:"canvas-editor-overlay"},o("div",{class:"canvas-editor-modal"},o("div",{class:"canvas-editor-header"},o("div",{class:"canvas-editor-title"},o("h3",null,this.canvasEditorTitle)),o("div",{class:"canvas-editor-toolbar"},o("div",{class:"toolbar-section"},o("div",{class:"tool-group"},o("button",{class:"tool-btn "+("rectangle"===this.canvasDrawingTool?"active":""),onClick:()=>this.canvasDrawingTool="rectangle",title:"Rectangle"},o("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},o("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",ry:"2"}))),o("button",{class:"tool-btn "+("line"===this.canvasDrawingTool?"active":""),onClick:()=>this.canvasDrawingTool="line",title:"Line"},o("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},o("line",{x1:"5",y1:"12",x2:"19",y2:"12"}))),o("button",{class:"tool-btn "+("arrow"===this.canvasDrawingTool?"active":""),onClick:()=>this.canvasDrawingTool="arrow",title:"Arrow"},o("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},o("line",{x1:"7",y1:"17",x2:"17",y2:"7"}),o("polyline",{points:"7,7 17,7 17,17"}))),o("button",{class:"tool-btn "+("text"===this.canvasDrawingTool?"active":""),onClick:()=>this.canvasDrawingTool="text",title:"Text"},o("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},o("polyline",{points:"4,7 4,4 20,4 20,7"}),o("line",{x1:"9",y1:"20",x2:"15",y2:"20"}),o("line",{x1:"12",y1:"4",x2:"12",y2:"20"}))),o("div",{class:"toolbar-divider"}),o("button",{class:"tool-btn undo-btn",onClick:this.undoLastAnnotation,disabled:0===this.annotations.length,title:"Undo"},o("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},o("polyline",{points:"1,4 1,10 7,10"}),o("path",{d:"M3.51,15a9,9,0,0,0,14.85-3.36,9,9,0,0,0-9.19-10.15L1.83,10"}))))),o("div",{class:"toolbar-section"},o("div",{class:"color-palette"},this.defaultColors.map(((t,e)=>o("div",{class:"color-slot-wrapper"},o("button",{class:`color-btn ${this.canvasDrawingColor===t?"active":""} ${this.editingColorIndex===e?"editing":""}`,style:{backgroundColor:t},onClick:()=>this.handleColorSlotClick(e),title:`Color ${e+1} - Click to customize`},this.editingColorIndex===e&&o("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"white","stroke-width":"2"},o("path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z"}))),this.editingColorIndex===e&&this.showColorPicker&&o("div",{class:"color-picker-dropdown"},o("input",{type:"color",value:t,onInput:t=>this.handleColorPickerInput(t),onClick:t=>this.handleColorPickerClick(t)}))))))),(this.selectedAnnotation||this.canvasDrawingTool)&&o("div",{class:"toolbar-section selected-annotation-controls"},("text"===(null===(t=this.selectedAnnotation)||void 0===t?void 0:t.type)||!this.selectedAnnotation&&"text"===this.canvasDrawingTool)&&o("div",{class:"text-controls"},o("div",{class:"font-size-control"},o("label",null,this.sizeLabelText),o("input",{type:"range",min:"8",max:"72",value:(null===(e=this.selectedAnnotation)||void 0===e?void 0:e.fontSize)||this.canvasTextSize,onInput:t=>{const e=parseInt(t.target.value);this.selectedAnnotation?this.updateSelectedTextSize(e):this.canvasTextSize=e},class:"size-slider"}),o("span",{class:"size-value"},(null===(i=this.selectedAnnotation)||void 0===i?void 0:i.fontSize)||this.canvasTextSize,"px")),this.selectedAnnotation&&o("button",{class:"action-btn small",onClick:()=>this.startTextEditing(this.selectedAnnotation)},this.editTextButtonText)),(["rectangle","line","arrow"].includes(null===(s=this.selectedAnnotation)||void 0===s?void 0:s.type)||!this.selectedAnnotation&&["rectangle","line","arrow"].includes(this.canvasDrawingTool))&&o("div",{class:"shape-controls"},o("div",{class:"border-width-control"},o("label",null,this.borderLabelText),o("input",{type:"range",min:"1",max:"20",value:(null===(a=this.selectedAnnotation)||void 0===a?void 0:a.lineWidth)||this.canvasLineWidth,onInput:t=>{const e=parseInt(t.target.value);this.selectedAnnotation?this.updateSelectedBorderWidth(e):this.canvasLineWidth=e},class:"size-slider"}),o("span",{class:"size-value"},(null===(r=this.selectedAnnotation)||void 0===r?void 0:r.lineWidth)||this.canvasLineWidth,"px")))),o("div",{class:"toolbar-section"},o("button",{class:"action-btn secondary",onClick:this.closeCanvasEditor},this.canvasEditorCancelText),o("button",{class:"action-btn primary",onClick:this.saveAnnotations},this.canvasEditorSaveText))),o("div",{class:"canvas-editor-content"},o("canvas",{ref:t=>this.canvasRef=t,class:"annotation-canvas",onMouseDown:this.handleCanvasMouseDown,onMouseMove:this.handleCanvasMouseMove,onMouseUp:this.handleCanvasMouseUp,onMouseLeave:this.handleCanvasMouseUp}))))))}};a.style=':host{display:block}.canvas-editor-wrapper{position:relative}.canvas-editor-overlay{position:fixed;top:0;left:0;width:100vw;height:100vh;background:rgba(0, 0, 0, 0.8);display:flex;align-items:center;justify-content:center;z-index:9999}.canvas-editor-modal{width:95vw;max-width:1400px;max-height:900px;background:var(--feedback-canvas-editor-bg-color, #ffffff);border-radius:8px;border:1px solid var(--feedback-canvas-editor-border-color, #e0e0e0);display:flex;flex-direction:column;overflow:hidden;box-shadow:0 10px 40px rgba(0, 0, 0, 0.2)}.canvas-editor-header{background:var(--feedback-canvas-editor-header-bg-color, #f5f5f5);border-bottom:1px solid var(--feedback-canvas-editor-border-color, #e0e0e0);padding:12px 16px;display:flex;flex-direction:column;gap:12px}.canvas-editor-title h3{margin:0;font-size:16px;font-weight:600;color:var(--feedback-canvas-editor-tool-text-color, #333)}.canvas-editor-toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:16px}.toolbar-section{display:flex;align-items:center;gap:8px}.tool-group{display:flex;align-items:center;gap:4px}.tool-btn{width:36px;height:36px;display:flex;align-items:center;justify-content:center;background:var(--feedback-canvas-editor-tool-bg-color, #ffffff);border:1px solid var(--feedback-canvas-editor-border-color, #e0e0e0);border-radius:6px;cursor:pointer;transition:all 0.2s ease;padding:0}.tool-btn svg{width:18px;height:18px;color:var(--feedback-canvas-editor-tool-text-color, #333)}.tool-btn:hover:not(:disabled){background:var(--feedback-canvas-editor-tool-bg-hover, #f0f0f0)}.tool-btn.active,.tool-btn.active:hover{background:var(--feedback-canvas-editor-tool-bg-active, #0070f4);color:var(--feedback-canvas-editor-tool-text-active, #ffffff)}.tool-btn.active svg{color:var(--feedback-canvas-editor-tool-text-active, #ffffff)}.tool-btn:disabled{opacity:0.4;cursor:not-allowed;color:var(--feedback-canvas-editor-tool-text-color, #333)}.toolbar-divider{width:1px;height:24px;background:var(--feedback-canvas-editor-divider-color, #e0e0e0);margin:0 4px}.undo-btn{background:var(--feedback-canvas-editor-tool-bg-color, #ffffff) !important;border:1px solid var(--feedback-canvas-editor-border-color, #e0e0e0) !important}.undo-btn:hover:not(:disabled){background:var(--feedback-canvas-editor-tool-bg-hover, #f0f0f0) !important}.color-palette{display:flex;align-items:center;gap:6px}.color-slot-wrapper{position:relative;display:flex;align-items:center}.color-btn{width:32px;height:32px;border-radius:6px;border:2px solid transparent;cursor:pointer;transition:all 0.2s ease;display:flex;align-items:center;justify-content:center;background:var(--feedback-canvas-editor-tool-bg-color, #ffffff);border:1px solid var(--feedback-canvas-editor-border-color, #e0e0e0)}.color-btn:hover{transform:scale(1.1)}.color-btn.active{border-color:var(--feedback-primary-color, #0070f4);box-shadow:0 0 0 2px rgba(0, 112, 244, 0.2)}.color-btn.editing{border-color:var(--feedback-primary-color, #0070f4)}.color-picker-dropdown{position:absolute;top:100%;left:0;z-index:1000;margin-top:4px;background:var(--feedback-canvas-editor-tool-bg-color, #ffffff);border:1px solid var(--feedback-canvas-editor-border-color, #e0e0e0);border-radius:6px;padding:8px;box-shadow:0 4px 12px rgba(0, 0, 0, 0.1)}.color-picker-dropdown input[type="color"]{width:40px;height:40px;border:none;border-radius:4px;cursor:pointer}.size-control{display:flex;align-items:center;gap:8px;background:var(--feedback-canvas-editor-tool-bg-color, #ffffff);border:1px solid var(--feedback-canvas-editor-border-color, #e0e0e0);border-radius:6px;padding:6px 12px}.size-slider{width:80px;height:20px;-webkit-appearance:none;appearance:none;background:transparent;cursor:pointer}.size-slider::-webkit-slider-track{width:100%;height:4px;background:var(--feedback-canvas-editor-slider-track, #e0e0e0);border-radius:2px}.size-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:16px;height:16px;background:var(--feedback-primary-color, #0070f4);border-radius:50%;cursor:pointer}.size-slider::-moz-range-track{width:100%;height:4px;background:var(--feedback-canvas-editor-slider-track, #e0e0e0);border-radius:2px;border:none}.size-slider::-moz-range-thumb{width:16px;height:16px;background:var(--feedback-primary-color, #0070f4);border-radius:50%;border:none;cursor:pointer}.size-slider::-ms-track{width:100%;height:4px;background:var(--feedback-canvas-editor-slider-track, #e0e0e0);border-radius:2px;border:none;color:transparent}.size-slider::-ms-thumb{width:16px;height:16px;background:var(--feedback-primary-color, #0070f4);border-radius:50%;border:none;cursor:pointer}.size-value{font-weight:500;color:var(--feedback-canvas-editor-tool-text-color, #333);font-size:12px;min-width:30px}.selected-annotation-controls{border-left:2px solid var(--feedback-canvas-editor-divider-color, #e0e0e0);padding-left:12px;margin-left:8px;min-width:200px}.text-controls{display:flex;flex-direction:row;align-items:center;gap:12px}.font-size-control,.border-width-control{display:flex;align-items:center;gap:6px}.font-size-control label,.border-width-control label{font-size:12px;color:var(--feedback-canvas-editor-tool-text-color, #333);font-weight:500;min-width:35px}.action-btn{display:flex;align-items:center;gap:6px;padding:5px 12px;border:1px solid var(--feedback-canvas-editor-border-color, #e0e0e0);border-radius:6px;cursor:pointer;font-size:12px;font-weight:500;transition:all 0.2s ease;min-width:65px;justify-content:center;height:36px}.action-btn.secondary{background:var(--feedback-canvas-editor-tool-bg-color, #ffffff);color:var(--feedback-canvas-editor-tool-text-color, #333);border-color:var(--feedback-canvas-editor-border-color, #e0e0e0)}.action-btn.secondary:hover{background:var(--feedback-canvas-editor-tool-bg-hover, #f0f0f0)}.action-btn.primary{background:var(--feedback-primary-color, #0070f4);color:#ffffff;border-color:var(--feedback-primary-color, #0070f4)}.action-btn.primary:hover{background:#0056cc;border-color:#0056cc}.action-btn.small{height:28px;padding:4px 8px;font-size:12px;min-width:65px}.shape-controls{display:flex;flex-direction:column;gap:8px}.canvas-editor-content{flex:1;display:flex;align-items:center;justify-content:center;padding:16px;background:var(--feedback-canvas-editor-content-bg, #f5f5f5);overflow:hidden;min-height:0;min-width:0}.annotation-canvas{max-width:100%;max-height:100%;width:auto;height:auto;cursor:crosshair;border-radius:6px;box-shadow:0px 1px 2px 0px rgba(60, 64, 67, .30), 0px 2px 6px 2px rgba(60, 64, 67, .15);background:#ffffff;transition:box-shadow 0.3s ease;object-fit:contain;display:block}.annotation-canvas:hover{box-shadow:0px 2px 4px 0px rgba(60, 64, 67, .35), 0px 4px 12px 4px rgba(60, 64, 67, .20)}@media screen and (max-width: 768px){.canvas-editor-modal{width:100vw;height:100vh;border-radius:0}.canvas-editor-toolbar{flex-direction:column;align-items:stretch;gap:8px}.toolbar-section{justify-content:center}.selected-annotation-controls{border-left:none;border-top:2px solid var(--feedback-canvas-editor-divider-color, #e0e0e0);padding-left:0;padding-top:8px;margin-left:0;margin-top:8px;min-width:auto}}';const r=class{constructor(o){t(this,o),this.feedbackSent=e(this,"feedbackSent",7),this.feedbackError=e(this,"feedbackError",7),this.buttonPosition="default",this.buttonStyle="default",this.hideIcon=!1,this.hideMobile=!1,this.sessionId="",this.metadata="",this.submit=!1,this.customFont=!1,this.emailAddress="",this.isEmailRequired=!1,this.fetchData=!0,this.hideEmail=!1,this.hidePrivacyPolicy=!0,this.hideRating=!1,this.hideScreenshotButton=!1,this.modalPosition="center",this.project="",this.rating=void 0,this.ratingMode="thumbs",this.canvasEditorTitle="Edit screenshot",this.canvasEditorCancelText="Cancel",this.canvasEditorSaveText="Save",this.editTextButtonText="Edit Text",this.sizeLabelText="Size:",this.borderLabelText="Border:",this.editTextPromptText="Edit text:",this.screenshotErrorGeneral="Failed to capture screenshot.",this.screenshotErrorPermission="Permission denied. Please allow screen sharing to take screenshots.",this.screenshotErrorNotSupported="Screen capture is not supported in this browser.",this.screenshotErrorNotFound="No screen sources available for capture.",this.screenshotErrorCancelled="Screenshot capture was cancelled.",this.screenshotErrorBrowserNotSupported="Your browser does not support screen capture. Please use a browser like Chrome, Firefox, or Safari.",this.screenshotErrorUnexpected="An unexpected error occurred. Please try again.",this.emailPlaceholder="Email address (optional)",this.errorMessage="Please try again later.",this.errorMessage403="The request URL does not match the one defined in PushFeedback for this project.",this.errorMessage404="We could not find the provided project id in PushFeedback.",this.footerText="",this.messagePlaceholder="Comments",this.modalTitle="Share your feedback",this.modalTitleError="Oops!",this.modalTitleSuccess="Thanks for your feedback!",this.privacyPolicyText="I have read and expressly consent to the terms of the <a href='https://pushfeedback.com/privacy'>Privacy Policy</a>.",this.ratingPlaceholder="Was this page helpful?",this.ratingStarsPlaceholder="How would you rate this page?",this.screenshotAttachedText="Screenshot attached",this.screenshotButtonText="Add a screenshot",this.screenshotTakingText="Taking screenshot...",this.screenshotTopbarText="Select an element on this page",this.sendButtonText="Send",this.successMessage=""}componentWillLoad(){if(this.sessionId)localStorage.setItem("pushfeedback_sessionid",this.sessionId);else{let t=localStorage.getItem("pushfeedback_sessionid");t||(t=this.generateRandomSessionId(),localStorage.setItem("pushfeedback_sessionid",t),this.sessionId=t)}}componentDidLoad(){if("center-right"===this.buttonPosition){const t=this.el.shadowRoot.querySelector(".feedback-button-content");let e=0;this.isSafariBrowser()&&(e=5),t.style.right=(t.offsetWidth+e)/2*-1+"px"}this.customFont||this.loadInterFont()}connectedCallback(){this.feedbackModal=document.createElement("feedback-modal"),["customFont","emailAddress","fetchData","hideEmail","hidePrivacyPolicy","hideRating","hideScreenshotButton","isEmailRequired","modalPosition","project","rating","ratingMode","canvasEditorTitle","canvasEditorCancelText","canvasEditorSaveText","editTextButtonText","sizeLabelText","borderLabelText","editTextPromptText","screenshotErrorGeneral","screenshotErrorPermission","screenshotErrorNotSupported","screenshotErrorNotFound","screenshotErrorCancelled","screenshotErrorBrowserNotSupported","screenshotErrorUnexpected","emailPlaceholder","errorMessage","errorMessage403","errorMessage404","footerText","messagePlaceholder","metadata","modalTitle","modalTitleError","modalTitleSuccess","privacyPolicyText","ratingPlaceholder","ratingStarsPlaceholder","screenshotAttachedText","screenshotButtonText","screenshotTakingText","screenshotTopbarText","sendButtonText","successMessage"].forEach((t=>{this.feedbackModal[t]=this[t]})),document.body.appendChild(this.feedbackModal)}disconnectedCallback(){document.body.removeChild(this.feedbackModal)}generateRandomSessionId(t=16){return Math.random().toString(36).substr(2,t)}isSafariBrowser(){return/safari/i.test(navigator.userAgent)&&!/chrome/i.test(navigator.userAgent)}loadInterFont(){const t=document.createElement("link");t.href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500&display=swap",t.rel="stylesheet",document.head.appendChild(t)}showModal(){this.submit?this.submitRatingFeedback():this.feedbackModal.openModal()}async submitRatingFeedback(){try{const t={url:window.location.href,project:this.project,rating:this.rating||-1,ratingMode:this.ratingMode,message:"",metadata:this.metadata,session:localStorage.getItem("pushfeedback_sessionid")||""},e=await fetch("https://app.pushfeedback.com/api/feedback/",{method:"POST",body:JSON.stringify(t),headers:{"Content-Type":"application/json"}});if(201===e.status){const o=Object.assign(Object.assign({},t),{id:await e.json()});this.feedbackSent.emit({feedback:o})}else{const t=await e.text();this.feedbackError.emit({error:{status:e.status,message:t}})}}catch(t){this.feedbackError.emit({error:{status:500,message:t}})}}render(){return o(i,null,o("a",{class:`feedback-button-content feedback-button-content--${this.buttonStyle} feedback-button-content--${this.buttonPosition} ${this.customFont?"feedback-button-content--custom-font":""} ${this.hideMobile?"feedback-button-content--hide-mobile":""}`,onClick:()=>this.showModal()},!this.hideIcon&&"default"!=this.buttonStyle&&o("span",{class:"feedback-button-content-icon"},o("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"#fff","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon-edit"},o("path",{d:"M12 20h9"}),o("path",{d:"M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4L16.5 3.5z"}))),o("slot",null)))}get el(){return s(this)}};r.style=".feedback-button-content{cursor:pointer;max-width:fit-content;z-index:var(--feedback-button-z-index);font-family:var(--feedback-font-family)}.feedback-button-content--custom-font{font-family:inherit}.feedback-button-content--light{align-items:center;background-color:var(--feedback-button-light-bg-color);border-radius:var(--feedback-button-border-radius);box-shadow:rgba(60, 64, 67, 0.3) 0px 1px 2px 0px, rgba(60, 64, 67, 0.15) 0px 2px 6px 2px;box-sizing:border-box;color:var(--feedback-button-light-text-color);display:flex;font-size:var(--feedback-button-text-font-size);font-weight:var(--feedback-button-text-font-weight);padding:8px 15px}.feedback-button-content--dark{align-items:center;background-color:var(--feedback-button-dark-bg-color);border-radius:var(--feedback-button-border-radius);box-shadow:rgba(60, 64, 67, 0.3) 0px 1px 2px 0px, rgba(60, 64, 67, 0.15) 0px 2px 6px 2px;box-sizing:border-box;color:var(--feedback-button-dark-text-color);display:flex;font-weight:var(--feedback-button-text-font-weight);font-size:var(--feedback-button-text-font-size);padding:8px 15px}.icon-edit{stroke:var(--feedback-button-light-icon-color)}.feedback-button-content--dark .icon-edit{stroke:var(--feedback-button-dark-icon-color)}.feedback-button-content--bottom-right{bottom:10px;position:fixed;right:10px}.feedback-button-content--center-right{position:fixed;transform:rotate(-90deg) translateY(-50%);top:50%}.feedback-button-content--center-right.feedback-button-content--dark,.feedback-button-content--center-right.feedback-button-content--light{border-radius:4px;border-bottom-left-radius:0px;border-bottom-right-radius:0px}.feedback-button-content-icon{height:16px;margin-right:5px;width:16px}.feedback-button-content--center-right .feedback-button-content-icon{rotate:90deg}@media screen and (max-width: 767px){.feedback-button-content--hide-mobile{display:none}}";const n=class{constructor(o){t(this,o),this.feedbackSent=e(this,"feedbackSent",7),this.feedbackError=e(this,"feedbackError",7),this.onScrollDebounced=()=>{clearTimeout(this.scrollTimeout),this.scrollTimeout=setTimeout((()=>{document.documentElement.classList.remove("feedback-modal-screenshot-closing"),document.documentElement.style.top="",window.removeEventListener("scroll",this.onScrollDebounced)}),200)},this.handleSubmit=async t=>{if(t.preventDefault(),!this.isEmailRequired||this.formEmail){this.resetOverflow(),this.showScreenshotMode=!1,this.showScreenshotTopBar=!1,this.showModal=!1,this.sending=!0;try{const t={url:window.location.href,message:this.formMessage,email:this.formEmail,project:this.project,screenshot:this.encodedScreenshot,rating:this.selectedRating,ratingMode:this.ratingMode,metadata:this.metadata,verification:this.formVerification,session:localStorage.getItem("pushfeedback_sessionid")||""},e=await fetch("https://app.pushfeedback.com/api/feedback/",{method:"POST",body:JSON.stringify(t),headers:{"Content-Type":"application/json"}});if(201===e.status){const o=Object.assign(Object.assign({},t),{id:await e.json()});this.feedbackSent.emit({feedback:o}),this.formSuccess=!0,this.formError=!1}else{const t=await e.text();this.feedbackError.emit({error:{status:e.status,message:t}}),this.formSuccess=!1,this.formError=!0,this.formErrorStatus=e.status}}catch(t){this.feedbackError.emit({error:{status:500,message:t}}),this.formSuccess=!1,this.formError=!0,this.formErrorStatus=500}finally{this.sending=!1,this.showModal=!0}}},this.close=()=>{this.isAnimating=!1,setTimeout((()=>{this.sending=!1,this.showModal=!1,this.showScreenshotMode=!1,this.showScreenshotTopBar=!1,this.hasSelectedElement=!1,this.encodedScreenshot=null,document.querySelectorAll(".feedback-modal-element-selected").forEach((t=>{t.classList.remove("feedback-modal-element-selected")})),this.formSuccess=!1,this.formError=!1,this.formErrorStatus=500,this.formMessage="",this.formEmail="",this.resetOverflow()}),200)},this.handleScreenshotReady=t=>{this.encodedScreenshot=t.detail.screenshot,this.showModal=!0,this.takingScreenshot=!1,this.showCanvasEditor=!1,this.autoStartCapture=!1},this.handleScreenshotCancelled=()=>{this.showModal=!0,this.takingScreenshot=!1,this.showCanvasEditor=!1,this.autoStartCapture=!1},this.handleScreenshotError=t=>{console.error("Screenshot error:",t.detail.error),this.screenshotError=t.detail.error,this.showScreenshotError=!0,this.showModal=!0,this.takingScreenshot=!1,this.showCanvasEditor=!1,this.autoStartCapture=!1,setTimeout((()=>{this.showScreenshotError=!1}),8e3)},this.openScreenShot=()=>{this.showModal=!1,this.takingScreenshot=!0,this.autoStartCapture=!0,this.showCanvasEditor=!0},this.openCanvasEditor=t=>{t&&t.stopPropagation(),this.showModal=!1,this.autoStartCapture=!1,this.showCanvasEditor=!0},this.sending=!1,this.formMessage="",this.formEmail="",this.formSuccess=!1,this.formVerification="",this.formError=!1,this.formErrorStatus=500,this.encodedScreenshot=void 0,this.isPrivacyChecked=!1,this.whitelabel=!1,this.selectedRating=-1,this.overlayVisible=!1,this.isAnimating=!1,this.takingScreenshot=!1,this.showScreenshotError=!1,this.screenshotError="",this.showCanvasEditor=!1,this.autoStartCapture=!1,this.customFont=!1,this.emailAddress="",this.hideEmail=!1,this.isEmailRequired=!1,this.ratingMode="thumbs",this.hasSelectedElement=!1,this.hidePrivacyPolicy=!0,this.hideRating=!1,this.hideScreenshotButton=!1,this.project="",this.showScreenshotMode=!1,this.showScreenshotTopBar=!1,this.showModal=!1,this.rating=void 0,this.metadata=void 0,this.fetchData=!0,this.emailPlaceholder="Email address (optional)",this.errorMessage="Please try again later.",this.errorMessage403="The request URL does not match the one defined in PushFeedback for this project.",this.errorMessage404="We could not find the provided project ID in PushFeedback.",this.messagePlaceholder="Comments",this.footerText="",this.modalPosition="center",this.modalTitle="Share your feedback",this.modalTitleError="Oops!",this.modalTitleSuccess="Thanks for your feedback!",this.privacyPolicyText="I have read and expressly consent to the terms of the <a href='https://pushfeedback.com/privacy'>Privacy Policy</a>.",this.ratingPlaceholder="Was this page helpful?",this.ratingStarsPlaceholder="How would you rate this page?",this.sendButtonText="Send",this.screenshotAttachedText="Screenshot attached",this.screenshotButtonText="Add a screenshot",this.screenshotTakingText="Taking screenshot...",this.screenshotTopbarText="Select an element on this page",this.successMessage="",this.canvasEditorTitle="Edit screenshot",this.canvasEditorCancelText="Cancel",this.canvasEditorSaveText="Save",this.editTextButtonText="Edit Text",this.sizeLabelText="Size:",this.borderLabelText="Border:",this.editTextPromptText="Edit text:",this.screenshotErrorGeneral="Failed to capture screenshot.",this.screenshotErrorPermission="Permission denied. Please allow screen sharing to take screenshots.",this.screenshotErrorNotSupported="Screen capture is not supported in this browser.",this.screenshotErrorNotFound="No screen sources available for capture.",this.screenshotErrorCancelled="Screenshot capture was cancelled.",this.screenshotErrorBrowserNotSupported="Your browser does not support screen capture. Please use a browser like Chrome, Firefox, or Safari.",this.screenshotErrorUnexpected="An unexpected error occurred. Please try again."}componentWillLoad(){this.fetchData&&this.fetchProjectData(),this.formEmail=this.emailAddress,this.rating&&(this.selectedRating=this.rating),"thumbs"==this.ratingMode&&0==this.rating&&(this.selectedRating=5)}async fetchProjectData(){try{const t=await fetch("https://app.pushfeedback.com/api/projects/"+this.project+"/"),e=await t.json();this.whitelabel=e.whitelabel}catch(t){console.log(t)}}resetOverflow(){document.documentElement.classList.remove("feedback-modal-screenshot-open"),document.documentElement.classList.remove("feedback-modal-screenshot-open--scroll"),document.documentElement.classList.remove("feedback-modal-screenshot-closing")}handleMessageInput(t){this.formMessage=t.target.value}handleEmailInput(t){this.formEmail=t.target.value}handleCheckboxChange(t){this.isPrivacyChecked=t.target.checked}handleVerification(t){this.formVerification=t.target.value}handleRatingChange(t){this.selectedRating=t}render(){return o("div",{class:"feedback-modal-wrapper "+(this.customFont?"feedback-modal-wrapper--custom-font":"")},this.showCanvasEditor&&o("canvas-editor",{ref:t=>this.canvasEditorRef=t,"canvas-editor-title":this.canvasEditorTitle,"canvas-editor-cancel-text":this.canvasEditorCancelText,"canvas-editor-save-text":this.canvasEditorSaveText,"screenshot-taking-text":this.screenshotTakingText,"screenshot-attached-text":this.screenshotAttachedText,"screenshot-button-text":this.screenshotButtonText,"auto-start-screenshot":this.autoStartCapture,"existing-screenshot":this.encodedScreenshot||"","edit-text-button-text":this.editTextButtonText,"size-label-text":this.sizeLabelText,"border-label-text":this.borderLabelText,"edit-text-prompt-text":this.editTextPromptText,"screenshot-error-general":this.screenshotErrorGeneral,"screenshot-error-permission":this.screenshotErrorPermission,"screenshot-error-not-supported":this.screenshotErrorNotSupported,"screenshot-error-not-found":this.screenshotErrorNotFound,"screenshot-error-cancelled":this.screenshotErrorCancelled,"screenshot-error-browser-not-supported":this.screenshotErrorBrowserNotSupported,"screenshot-error-unexpected":this.screenshotErrorUnexpected,onScreenshotReady:this.handleScreenshotReady,onScreenshotCancelled:this.handleScreenshotCancelled,onScreenshotFailed:this.handleScreenshotError}),this.showScreenshotError&&o("div",{class:"screenshot-error-notification"},o("div",{class:"screenshot-error-content"},o("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},o("circle",{cx:"12",cy:"12",r:"10"}),o("line",{x1:"15",y1:"9",x2:"9",y2:"15"}),o("line",{x1:"9",y1:"9",x2:"15",y2:"15"})),o("span",null,this.screenshotError),o("button",{class:"error-close-btn",onClick:()=>this.showScreenshotError=!1,title:"Close"},o("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},o("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),o("line",{x1:"6",y1:"6",x2:"18",y2:"18"}))))),this.showModal&&o("div",{class:"feedback-overlay "+(this.isAnimating?"feedback-overlay--visible":"")}),this.showModal&&o("div",{class:`feedback-modal-content feedback-modal-content--${this.modalPosition} ${this.isAnimating?"feedback-modal-content--open":""}`,ref:t=>this.modalContent=t},o("div",{class:"feedback-modal-header"},o("span",null,this.formSuccess||this.formError?this.formSuccess?this.modalTitleSuccess:this.modalTitleError:this.modalTitle),o("button",{class:"feedback-modal-close",onClick:this.close},o("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 24 24",fill:"none",stroke:"#191919","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"feather feather-x"},o("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),o("line",{x1:"6",y1:"6",x2:"18",y2:"18"})))),o("div",{class:"feedback-modal-body"},this.formSuccess||this.formError?this.formSuccess&&!this.formError?o("div",{class:"feedback-modal-success"},o("p",{class:"feedback-modal-message"},this.successMessage)):this.formError&&404==this.formErrorStatus?o("p",{class:"feedback-modal-message"},this.errorMessage404):this.formError&&403==this.formErrorStatus?o("p",{class:"feedback-modal-message"},this.errorMessage403):this.formError?o("p",{class:"feedback-modal-message"},this.errorMessage):o("span",null):o("form",{onSubmit:this.handleSubmit},!this.hideRating&&o("div",{class:"feedback-modal-rating"},"thumbs"===this.ratingMode?o("div",{class:"feedback-modal-rating-content"},o("span",{class:"feedback-modal-input-heading"},this.ratingPlaceholder),o("div",{class:"feedback-modal-rating-buttons feedback-modal-rating-buttons--thumbs"},o("button",{title:"Yes",class:"feedback-modal-rating-button "+(1===this.selectedRating?"feedback-modal-rating-button--selected":""),onClick:t=>{t.preventDefault(),this.handleRatingChange(1)}},o("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"#5F6368","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},o("path",{d:"M14 9V5a3 3 0 0 0-3-3l-4 9v11h11.28a2 2 0 0 0 2-1.7l1.38-9a2 2 0 0 0-2-2.3zM7 22H4a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2h3"}))),o("button",{title:"No",class:"feedback-modal-rating-button "+(5===this.selectedRating?"feedback-modal-rating-button--selected":""),onClick:t=>{t.preventDefault(),this.handleRatingChange(5)}},o("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"#5F6368","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},o("path",{d:"M10 15v4a3 3 0 0 0 3 3l4-9V2H5.72a2 2 0 0 0-2 1.7l-1.38 9a2 2 0 0 0 2 2.3zm7-13h2.67A2.31 2.31 0 0 1 22 4v7a2.31 2.31 0 0 1-2.33 2H17"}))))):o("div",{class:"feedback-modal-rating-content"},o("span",{class:"feedback-modal-input-heading"},this.ratingStarsPlaceholder),o("div",{class:"feedback-modal-rating-buttons feedback-modal-rating-buttons--stars"},[1,2,3,4,5].map((t=>o("button",{key:t,class:"feedback-modal-rating-button "+(this.selectedRating>=t?"feedback-modal-rating-button--selected":""),onClick:e=>{e.preventDefault(),this.handleRatingChange(t)}},o("svg",{xmlns:"http://www.w3.org/2000/svg",width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:"#5F6368","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},o("polygon",{points:"12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"})))))))),o("div",{class:"feedback-modal-text"},o("textarea",{placeholder:this.messagePlaceholder,value:this.formMessage,onInput:t=>this.handleMessageInput(t)})),!this.hideEmail&&o("div",{class:"feedback-modal-email"},o("input",{placeholder:this.emailPlaceholder,type:"email",onInput:t=>this.handleEmailInput(t),value:this.formEmail,required:this.isEmailRequired})),o("div",{class:"feedback-verification"},o("input",{type:"text",name:"verification",style:{display:"none"},onInput:t=>this.handleVerification(t),value:this.formVerification})),!this.hidePrivacyPolicy&&o("div",{class:"feedback-modal-privacy"},o("input",{type:"checkbox",id:"privacyPolicy",onChange:t=>this.handleCheckboxChange(t),required:!0}),o("span",{innerHTML:this.privacyPolicyText})),o("div",{class:"feedback-modal-buttons "+(this.hideScreenshotButton?"single":"")},!this.hideScreenshotButton&&o("button",{type:"button",class:"feedback-modal-button feedback-modal-button--screenshot "+(this.encodedScreenshot?"feedback-modal-button--active":""),onClick:this.openScreenShot,disabled:this.sending||this.takingScreenshot},this.encodedScreenshot&&o("div",{class:"screenshot-preview",onClick:this.openCanvasEditor},o("img",{src:this.encodedScreenshot,alt:"Screenshot Preview"})),!this.encodedScreenshot&&!this.takingScreenshot&&o("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24",viewBox:"0 -960 960 960",width:"24"},o("path",{d:"M680-80v-120H560v-80h120v-120h80v120h120v80H760v120h-80ZM200-200v-200h80v120h120v80H200Zm0-360v-200h200v80H280v120h-80Zm480 0v-120H560v-80h200v200h-80Z"})),this.takingScreenshot&&o("div",{class:"screenshot-loading"},o("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"#666","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"feather-loader"},o("line",{x1:"12",y1:"2",x2:"12",y2:"6"}),o("line",{x1:"12",y1:"18",x2:"12",y2:"22"}),o("line",{x1:"4.93",y1:"4.93",x2:"7.76",y2:"7.76"}),o("line",{x1:"16.24",y1:"16.24",x2:"19.07",y2:"19.07"}),o("line",{x1:"2",y1:"12",x2:"6",y2:"12"}),o("line",{x1:"18",y1:"12",x2:"22",y2:"12"}),o("line",{x1:"4.93",y1:"19.07",x2:"7.76",y2:"16.24"}),o("line",{x1:"16.24",y1:"7.76",x2:"19.07",y2:"4.93"}))),this.takingScreenshot?this.screenshotTakingText:this.encodedScreenshot?this.screenshotAttachedText:this.screenshotButtonText),o("button",{class:"feedback-modal-button feedback-modal-button--submit",type:"submit",disabled:this.sending},this.sendButtonText)))),o("div",{class:"feedback-modal-footer"},o("div",{class:"feedback-logo",style:{display:this.whitelabel?"none":"block"}},"Powered by"," ",o("a",{target:"_blank",href:"https://pushfeedback.com"},"PushFeedback.com")),this.footerText&&o("div",{class:"feedback-footer-text"},o("span",{innerHTML:this.footerText})))))}componentDidRender(){this.showModal&&requestAnimationFrame((()=>{this.overlayVisible=!0}))}async openModal(){this.showModal=!0,requestAnimationFrame((()=>{requestAnimationFrame((()=>{this.isAnimating=!0}))}))}};n.style=".text-center{flex-grow:1;text-align:center}.feedback-modal-wrapper *{font-family:var(--feedback-font-family)}.feedback-modal-wrapper--custom-font *{font-family:inherit}.feedback-modal-wrapper{position:absolute;z-index:var(--feedback-modal-modal-wrapper-z-index)}.feedback-overlay{background-color:var(--feedback-modal-screenshot-bg-color);height:100%;left:0;opacity:0;position:fixed;top:0;width:100%;z-index:var(--feedback-modal-screnshot-z-index);transition:opacity 0.2s ease-out}.feedback-overlay--visible{opacity:1}.feedback-modal{display:inline-block;position:relative}.feedback-modal-content{background-color:var(--feedback-modal-content-bg-color);border-color:1px solid var(--feedback-modal-header-text-color);border-radius:var(--feedback-modal-content-border-radius);box-shadow:0px 1px 2px 0px rgba(60, 64, 67, .30), 0px 2px 6px 2px rgba(60, 64, 67, .15);box-sizing:border-box;color:var(--feedback-modal-content-text-color);display:flex;flex-direction:column;left:50%;max-width:90%;padding:20px;position:fixed;top:50%;transform:translate(-50%, -50%) scale(0.95);opacity:0;width:100%;z-index:var(--feedback-modal-content-z-index);transition:transform 0.2s ease-out, opacity 0.2s ease-out}.feedback-modal-content--open{transform:translate(-50%, -50%) scale(1);opacity:1}.feedback-modal-header{align-items:center;color:var(--feedback-modal-header-text-color);display:flex;font-size:var(--feedback-header-font-size);font-weight:var(--feedback-modal-header-font-weight);justify-content:space-between;margin-bottom:20px}.feedback-modal-rating-buttons{width:100%;margin-bottom:20px}.feedback-modal-rating-button{padding:0;background-color:transparent;border:transparent;margin-right:5px;cursor:pointer}.feedback-modal-rating-buttons--thumbs .feedback-modal-rating-button{border:1px solid var(--feedback-modal-button-border-color);border-radius:var(--feedback-modal-button-border-radius);color:var(--feedback-modal-button-text-color);font-size:var(--feedback-modal-button-font-size);font-weight:500;margin-right:10px;justify-content:center;padding:5px 10px}.feedback-modal-rating-buttons--thumbs .feedback-modal-rating-button:hover,.feedback-modal-rating-buttons--thumbs .feedback-modal-rating-button--selected{background-color:var(--feedback-modal-button-bg-color-active);border:1px solid var(--feedback-modal-button-border-color-active);color:var(--feedback-modal-button-text-color-active)}.feedback-modal-rating-buttons--thumbs .feedback-modal-rating-button:hover svg,.feedback-modal-rating-buttons--thumbs .feedback-modal-rating-button--selected svg{stroke:var(--feedback-modal-rating-button-selected-color)}.feedback-modal-rating-buttons svg{stroke:var(--feedback-modal-rating-button-color);cursor:pointer}.feedback-modal-rating-buttons--stars .feedback-modal-rating-button--selected svg{fill:var(--feedback-modal-rating-button-stars-selected-color);stroke:var(--feedback-modal-rating-button-stars-selected-color)}.feedback-modal-text textarea{background-color:var(--feedback-modal-input-bg-color);border:1px solid var(--feedback-modal-input-border-color);border-radius:var(--feedback-modal-input-border-radius);box-sizing:border-box;color:var(--feedback-modal-input-text-color);font-size:var(--feedback-modal-input-font-size);margin-bottom:20px;height:100px;min-height:100px;padding:10px;resize:vertical;width:100%}.feedback-modal-email input{background-color:var(--feedback-modal-input-bg-color);border:1px solid var(--feedback-modal-input-border-color);border-radius:var(--feedback-modal-input-border-radius);box-sizing:border-box;color:var(--feedback-modal-input-text-color);font-size:var(--feedback-modal-input-font-size);margin-bottom:20px;height:40px;padding:10px;width:100%;margin-bottom:20px}.feedback-modal-privacy{font-size:var(--feedback-modal-input-font-size);margin-bottom:20px}.feedback-modal-text textarea:focus,.feedback-modal-email input:focus{border:1px solid var(--feedback-modal-input-border-color-focused);outline:none}.feedback-modal-buttons{display:flex;flex-direction:column}.feedback-modal-buttons .feedback-modal-button{margin-bottom:20px}.feedback-modal-button{align-items:center;background-color:transparent;border:1px solid var(--feedback-modal-button-border-color);border-radius:var(--feedback-modal-button-border-radius);color:var(--feedback-modal-button-text-color);cursor:pointer;display:flex;font-size:var(--feedback-modal-button-font-size);font-weight:500;justify-content:center;min-height:40px;padding:5px 10px}.feedback-modal-button svg{margin-right:6px}.feedback-modal-button path{fill:var(--feedback-modal-button-icon-color)}.feedback-modal-button:hover path,.feedback-modal-button--active path{fill:var(--feedback-modal-button-icon-color-active)}.feedback-modal-button--submit{background-color:var(--feedback-modal-button-submit-bg-color);border:1px solid var(--feedback-modal-button-border-color-active);color:var(--feedback-modal-button-submit-text-color)}.feedback-modal-button:hover,.feedback-modal-button--active{background-color:var(--feedback-modal-button-bg-color-active);border:1px solid var(--feedback-modal-button-border-color-active);color:var(--feedback-modal-button-text-color-active)}.feedback-modal-button--submit:hover{background-color:var(--feedback-modal-button-submit-bg-color-hover);border:1px solid var(--feedback-modal-button-submit-border-color-hover);color:var(--feedback-modal-button-submit-text-color-hover)}.feedback-modal-input-heading{display:block;font-size:14px;font-weight:300;padding-bottom:10px}.feedback-modal-footer{font-size:12px;text-align:center}.feedback-modal-footer a{color:var(--feedback-modal-footer-link);font-weight:500;text-decoration:none}.feedback-logo,.feedback-footer-text{display:block;text-align:center;margin-top:5px}.feedback-footer-text{margin-top:10px;line-height:1.5}.feedback-modal-close{background-color:var(--feedback-modal-close-bg-color);border:0;border-radius:50%;cursor:pointer;height:22px;margin-left:auto;padding:0;width:22px}.feedback-modal-close svg{stroke:var(--feedback-modal-close-color)}.feedback-modal-screenshot{background-color:var(--feedback-modal-screenshot-bg-color);height:100%;left:0;position:fixed;top:0;width:100%;z-index:var(--feedback-modal-screnshot-z-index)}.feedback-modal-screenshot-header{align-items:center;background-color:var(--feedback-modal-screenshot-header-bg-color);border-radius:var(--feedback-modal-content-border-radius);box-shadow:0px 1px 2px 0px rgba(60, 64, 67, .30), 0px 2px 6px 2px rgba(60, 64, 67, .15);box-sizing:border-box;color:var(--feedback-modal-screenshot-header-text-color);cursor:pointer;display:flex;left:50%;top:20px;transform:translateX(-50%);padding:10px;position:fixed;width:max-content;z-index:var(--feedback-modal-screenshot-header-z-index)}.feedback-modal-screenshot-close{height:24px;padding-left:10px;width:24px}.feedback-modal-screenshot-close svg{stroke:var(--feedback-modal-close-color)}.feedback-modal-message{font-size:var(--feedback-modal-message-font-size);margin-top:0}.feedback-modal-element-hover{background-color:transparent;cursor:pointer;border:1px solid var(--feedback-modal-element-hover-border-color)}.feedback-modal-element-selected{background-color:transparent;border:3px solid var(--feedback-modal-element-selected-border-color) !important;box-shadow:0 0 0 2px rgba(0, 123, 255, 0.3) !important}.screenshot-preview{display:inline-block;width:30px;height:30px;overflow:hidden;border-radius:4px;margin-right:10px;box-shadow:0 2px 4px rgba(0, 0, 0, 0.1);cursor:pointer;transition:transform 0.2s ease}.screenshot-preview:hover{transform:scale(1.1)}.screenshot-preview img{width:100%;height:100%;object-fit:cover}.screenshot-loading{display:inline-flex;align-items:center;margin-right:8px}@media screen and (min-width: 768px){.feedback-modal-content{max-width:var(--feedback-modal-content-max-width)}.feedback-modal-content.feedback-modal-content--bottom-right{bottom:var(--feedback-modal-content-position-bottom);left:initial;right:var(--feedback-modal-content-position-right);top:initial;transform:initial}.feedback-modal-content.feedback-modal-content--bottom-left{bottom:var(--feedback-modal-content-position-bottom);left:var(--feedback-modal-content-position-left);top:initial;transform:initial}.feedback-modal-content.feedback-modal-content--top-right{right:var(--feedback-modal-content-position-right);top:var(--feedback-modal-content-position-top);transform:initial}.feedback-modal-content.feedback-modal-content--top-left{left:var(--feedback-modal-content-position-left);top:var(--feedback-modal-content-position-top);transform:initial}.feedback-modal-content.feedback-modal-content--center-left{left:5px;right:auto;top:50%;transform:translateY(-50%)}.feedback-modal-content.feedback-modal-content--center-right{left:auto;right:5px;top:50%;transform:translateY(-50%)}.feedback-modal-content.feedback-modal-content--sidebar-left.feedback-modal-content--open,.feedback-modal-content.feedback-modal-content--sidebar-right.feedback-modal-content--open{transform:translateX(0)}.feedback-modal-content.feedback-modal-content--sidebar-left{max-width:var(--feedback-modal-content-sidebar-max-width);left:0;right:auto;height:100vh;top:0;transform:translateX(-100%);transition:transform 0.5s ease-in-out;border-radius:0}.feedback-modal-content.feedback-modal-content--sidebar-right{max-width:var(--feedback-modal-content-sidebar-max-width);left:auto;right:0;height:100vh;top:0;transform:translateX(100%);transition:transform 0.5s ease-in-out;border-radius:0}.feedback-modal-text textarea{height:150px;min-height:150px}.feedback-modal-content.feedback-modal-content--bottom-right{transform:translateY(20px)}.feedback-modal-content.feedback-modal-content--bottom-right.feedback-modal-content--open{transform:translateY(0)}.feedback-modal-content.feedback-modal-content--bottom-left{transform:translateY(20px)}.feedback-modal-content.feedback-modal-content--bottom-left.feedback-modal-content--open{transform:translateY(0)}.feedback-modal-content.feedback-modal-content--top-right{transform:translateY(-20px)}.feedback-modal-content.feedback-modal-content--top-right.feedback-modal-content--open{transform:translateY(0)}.feedback-modal-content.feedback-modal-content--top-left{transform:translateY(-20px)}.feedback-modal-content.feedback-modal-content--top-left.feedback-modal-content--open{transform:translateY(0)}}@keyframes feather-spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.feather-loader{animation:feather-spin 1s linear infinite;display:block}.screenshot-error-notification{position:fixed;top:20px;left:50%;transform:translateX(-50%);z-index:10001;max-width:500px;width:90%;animation:slideDown 0.3s ease-out}@keyframes slideDown{from{opacity:0;transform:translateX(-50%) translateY(-20px)}to{opacity:1;transform:translateX(-50%) translateY(0)}}.screenshot-error-content{background:#fee;border:1px solid #fcc;border-radius:8px;padding:12px 16px;display:flex;align-items:center;gap:12px;box-shadow:0 4px 12px rgba(0, 0, 0, 0.15);color:#c53030}.screenshot-error-content svg:first-child{color:#e53e3e;flex-shrink:0}.screenshot-error-content span{flex:1;font-size:14px;line-height:1.4;font-weight:500}.error-close-btn{background:none;border:none;cursor:pointer;padding:4px;border-radius:4px;color:#c53030;flex-shrink:0;transition:background-color 0.2s ease}.error-close-btn:hover{background:rgba(197, 48, 48, 0.1)}";export{a as canvas_editor,r as feedback_button,n as feedback_modal}
@@ -0,0 +1,2 @@
1
+ let e,n,t=!1,l=!1;const s={},o=e=>"object"==(e=typeof e)||"function"===e;function i(e){var n,t,l;return null!==(l=null===(t=null===(n=e.head)||void 0===n?void 0:n.querySelector('meta[name="csp-nonce"]'))||void 0===t?void 0:t.getAttribute("content"))&&void 0!==l?l:void 0}const c=(e,n,...t)=>{let l=null,s=null,i=!1,c=!1;const u=[],a=n=>{for(let t=0;t<n.length;t++)l=n[t],Array.isArray(l)?a(l):null!=l&&"boolean"!=typeof l&&((i="function"!=typeof e&&!o(l))&&(l+=""),i&&c?u[u.length-1].t+=l:u.push(i?r(null,l):l),c=i)};if(a(t),n){n.key&&(s=n.key);{const e=n.className||n.class;e&&(n.class="object"!=typeof e?e:Object.keys(e).filter((n=>e[n])).join(" "))}}const f=r(e,null);return f.l=n,u.length>0&&(f.o=u),f.i=s,f},r=(e,n)=>({u:0,h:e,t:n,p:null,o:null,l:null,i:null}),u={},a=e=>U(e).m,f=(e,n,t)=>{const l=a(e);return{emit:e=>d(l,n,{bubbles:!!(4&t),composed:!!(2&t),cancelable:!!(1&t),detail:e})}},d=(e,n,t)=>{const l=Q.ce(n,t);return e.dispatchEvent(l),l},h=new WeakMap,p=e=>"sc-"+e.$,m=(e,n,t,l,s,i)=>{if(t!==l){let c=_(e,n),r=n.toLowerCase();if("class"===n){const n=e.classList,s=y(t),o=y(l);n.remove(...s.filter((e=>e&&!o.includes(e)))),n.add(...o.filter((e=>e&&!s.includes(e))))}else if("style"===n){for(const n in t)l&&null!=l[n]||(n.includes("-")?e.style.removeProperty(n):e.style[n]="");for(const n in l)t&&l[n]===t[n]||(n.includes("-")?e.style.setProperty(n,l[n]):e.style[n]=l[n])}else if("key"===n);else if("ref"===n)l&&l(e);else if(c||"o"!==n[0]||"n"!==n[1]){const r=o(l);if((c||r&&null!==l)&&!s)try{if(e.tagName.includes("-"))e[n]=l;else{const s=null==l?"":l;"list"===n?c=!1:null!=t&&e[n]==s||(e[n]=s)}}catch(e){}null==l||!1===l?!1===l&&""!==e.getAttribute(n)||e.removeAttribute(n):(!c||4&i||s)&&!r&&e.setAttribute(n,l=!0===l?"":l)}else n="-"===n[2]?n.slice(3):_(J,r)?r.slice(2):r[2]+n.slice(3),t&&Q.rel(e,n,t,!1),l&&Q.ael(e,n,l,!1)}},$=/\s/,y=e=>e?e.split($):[],b=(e,n,t,l)=>{const o=11===n.p.nodeType&&n.p.host?n.p.host:n.p,i=e&&e.l||s,c=n.l||s;for(l in i)l in c||m(o,l,i[l],void 0,t,n.u);for(l in c)m(o,l,i[l],c[l],t,n.u)},w=(n,l,s)=>{const o=l.o[s];let i,c,r=0;if(null!==o.t)i=o.p=K.createTextNode(o.t);else{if(t||(t="svg"===o.h),i=o.p=K.createElementNS(t?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",o.h),t&&"foreignObject"===o.h&&(t=!1),b(null,o,t),null!=e&&i["s-si"]!==e&&i.classList.add(i["s-si"]=e),o.o)for(r=0;r<o.o.length;++r)c=w(n,o,r),c&&i.appendChild(c);"svg"===o.h?t=!1:"foreignObject"===i.tagName&&(t=!0)}return i},v=(e,t,l,s,o,i)=>{let c,r=e;for(r.shadowRoot&&r.tagName===n&&(r=r.shadowRoot);o<=i;++o)s[o]&&(c=w(null,l,o),c&&(s[o].p=c,r.insertBefore(c,t)))},g=(e,n,t,l,s)=>{for(;n<=t;++n)(l=e[n])&&(s=l.p,k(l),s.remove())},j=(e,n)=>e.h===n.h&&e.i===n.i,S=(e,n)=>{const l=n.p=e.p,s=e.o,o=n.o,i=n.h,c=n.t;null===c?(t="svg"===i||"foreignObject"!==i&&t,"slot"===i||b(e,n,t),null!==s&&null!==o?((e,n,t,l)=>{let s,o,i=0,c=0,r=0,u=0,a=n.length-1,f=n[0],d=n[a],h=l.length-1,p=l[0],m=l[h];for(;i<=a&&c<=h;)if(null==f)f=n[++i];else if(null==d)d=n[--a];else if(null==p)p=l[++c];else if(null==m)m=l[--h];else if(j(f,p))S(f,p),f=n[++i],p=l[++c];else if(j(d,m))S(d,m),d=n[--a],m=l[--h];else if(j(f,m))S(f,m),e.insertBefore(f.p,d.p.nextSibling),f=n[++i],m=l[--h];else if(j(d,p))S(d,p),e.insertBefore(d.p,f.p),d=n[--a],p=l[++c];else{for(r=-1,u=i;u<=a;++u)if(n[u]&&null!==n[u].i&&n[u].i===p.i){r=u;break}r>=0?(o=n[r],o.h!==p.h?s=w(n&&n[c],t,r):(S(o,p),n[r]=void 0,s=o.p),p=l[++c]):(s=w(n&&n[c],t,c),p=l[++c]),s&&f.p.parentNode.insertBefore(s,f.p)}i>a?v(e,null==l[h+1]?null:l[h+1].p,t,l,c,h):c>h&&g(n,i,a)})(l,s,n,o):null!==o?(null!==e.t&&(l.textContent=""),v(l,null,n,o,0,o.length-1)):null!==s&&g(s,0,s.length-1),t&&"svg"===i&&(t=!1)):e.t!==c&&(l.data=c)},k=e=>{e.l&&e.l.ref&&e.l.ref(null),e.o&&e.o.map(k)},O=(e,n)=>{n&&!e.v&&n["s-p"]&&n["s-p"].push(new Promise((n=>e.v=n)))},C=(e,n)=>{if(e.u|=16,!(4&e.u))return O(e,e.g),oe((()=>M(e,n)));e.u|=512},M=(e,n)=>{const t=e.j;let l;return n&&(l=N(t,"componentWillLoad")),R(l,(()=>P(e,t,n)))},P=async(e,n,t)=>{const l=e.m,s=l["s-rc"];t&&(e=>{const n=e.S,t=e.m,l=n.u,s=((e,n)=>{var t;let l=p(n);const s=I.get(l);if(e=11===e.nodeType?e:K,s)if("string"==typeof s){let n,o=h.get(e=e.head||e);if(o||h.set(e,o=new Set),!o.has(l)){{n=K.createElement("style"),n.innerHTML=s;const l=null!==(t=Q.k)&&void 0!==t?t:i(K);null!=l&&n.setAttribute("nonce",l),e.insertBefore(n,e.querySelector("link"))}o&&o.add(l)}}else e.adoptedStyleSheets.includes(s)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,s]);return l})(t.shadowRoot?t.shadowRoot:t.getRootNode(),n);10&l&&(t["s-sc"]=s,t.classList.add(s+"-h"))})(e);x(e,n),s&&(s.map((e=>e())),l["s-rc"]=void 0);{const n=l["s-p"],t=()=>L(e);0===n.length?t():(Promise.all(n).then(t),e.u|=4,n.length=0)}},x=(t,l)=>{try{l=l.render(),t.u&=-17,t.u|=2,((t,l)=>{const s=t.m,o=t.S,i=t.O||r(null,null),a=(e=>e&&e.h===u)(l)?l:c(null,null,l);n=s.tagName,o.C&&(a.l=a.l||{},o.C.map((([e,n])=>a.l[n]=s[e]))),a.h=null,a.u|=4,t.O=a,a.p=i.p=s.shadowRoot||s,e=s["s-sc"],S(i,a)})(t,l)}catch(e){z(e,t.m)}return null},L=e=>{const n=e.m,t=e.j,l=e.g;N(t,"componentDidRender"),64&e.u||(e.u|=64,T(n),N(t,"componentDidLoad"),e.M(n),l||E()),e.P(n),e.v&&(e.v(),e.v=void 0),512&e.u&&se((()=>C(e,!1))),e.u&=-517},E=()=>{T(K.documentElement),se((()=>d(J,"appload",{detail:{namespace:"pushfeedback"}})))},N=(e,n,t)=>{if(e&&e[n])try{return e[n](t)}catch(e){z(e)}},R=(e,n)=>e&&e.then?e.then(n):n(),T=e=>e.classList.add("hydrated"),W=(e,n,t)=>{if(n.L){const l=Object.entries(n.L),s=e.prototype;if(l.map((([e,[l]])=>{31&l||2&t&&32&l?Object.defineProperty(s,e,{get(){return((e,n)=>U(this).N.get(n))(0,e)},set(t){((e,n,t,l)=>{const s=U(e),i=s.N.get(n),c=s.u,r=s.j;t=((e,n)=>null==e||o(e)?e:4&n?"false"!==e&&(""===e||!!e):2&n?parseFloat(e):1&n?e+"":e)(t,l.L[n][0]),8&c&&void 0!==i||t===i||Number.isNaN(i)&&Number.isNaN(t)||(s.N.set(n,t),r&&2==(18&c)&&C(s,!1))})(this,e,t,n)},configurable:!0,enumerable:!0}):1&t&&64&l&&Object.defineProperty(s,e,{value(...n){const t=U(this);return t.R.then((()=>t.j[e](...n)))}})})),1&t){const t=new Map;s.attributeChangedCallback=function(e,n,l){Q.jmp((()=>{const n=t.get(e);if(this.hasOwnProperty(n))l=this[n],delete this[n];else if(s.hasOwnProperty(n)&&"number"==typeof this[n]&&this[n]==l)return;this[n]=(null!==l||"boolean"!=typeof this[n])&&l}))},e.observedAttributes=l.filter((([e,n])=>15&n[0])).map((([e,l])=>{const s=l[1]||e;return t.set(s,e),512&l[0]&&n.C.push([e,s]),s}))}}return e},A=e=>{N(e,"connectedCallback")},D=(e,n={})=>{var t;const l=[],s=n.exclude||[],o=J.customElements,c=K.head,r=c.querySelector("meta[charset]"),u=K.createElement("style"),a=[];let f,d=!0;Object.assign(Q,n),Q.T=new URL(n.resourcesUrl||"./",K.baseURI).href,e.map((e=>{e[1].map((n=>{const t={u:n[0],$:n[1],L:n[2],W:n[3]};t.L=n[2],t.C=[];const i=t.$,c=class extends HTMLElement{constructor(e){super(e),V(e=this,t),1&t.u&&e.attachShadow({mode:"open"})}connectedCallback(){f&&(clearTimeout(f),f=null),d?a.push(this):Q.jmp((()=>(e=>{if(0==(1&Q.u)){const n=U(e),t=n.S,l=()=>{};if(1&n.u)A(n.j);else{n.u|=1;{let t=e;for(;t=t.parentNode||t.host;)if(t["s-p"]){O(n,n.g=t);break}}t.L&&Object.entries(t.L).map((([n,[t]])=>{if(31&t&&e.hasOwnProperty(n)){const t=e[n];delete e[n],e[n]=t}})),(async(e,n,t,l,s)=>{if(0==(32&n.u)){{if(n.u|=32,(s=G(t)).then){const e=()=>{};s=await s,e()}s.isProxied||(W(s,t,2),s.isProxied=!0);const e=()=>{};n.u|=8;try{new s(n)}catch(e){z(e)}n.u&=-9,e(),A(n.j)}if(s.style){let e=s.style;const n=p(t);if(!I.has(n)){const l=()=>{};((e,n,t)=>{let l=I.get(e);Y&&t?(l=l||new CSSStyleSheet,"string"==typeof l?l=n:l.replaceSync(n)):l=n,I.set(e,l)})(n,e,!!(1&t.u)),l()}}}const o=n.g,i=()=>C(n,!0);o&&o["s-rc"]?o["s-rc"].push(i):i()})(0,n,t)}l()}})(this)))}disconnectedCallback(){Q.jmp((()=>(()=>{0==(1&Q.u)&&N(U(this).j,"disconnectedCallback")})()))}componentOnReady(){return U(this).A}};t.D=e[0],s.includes(i)||o.get(i)||(l.push(i),o.define(i,W(c,t,1)))}))}));{u.innerHTML=l+"{visibility:hidden}.hydrated{visibility:inherit}",u.setAttribute("data-styles","");const e=null!==(t=Q.k)&&void 0!==t?t:i(K);null!=e&&u.setAttribute("nonce",e),c.insertBefore(u,r?r.nextSibling:c.firstChild)}d=!1,a.length?a.map((e=>e.connectedCallback())):Q.jmp((()=>f=setTimeout(E,30)))},F=e=>Q.k=e,H=new WeakMap,U=e=>H.get(e),q=(e,n)=>H.set(n.j=e,n),V=(e,n)=>{const t={u:0,m:e,S:n,N:new Map};return t.R=new Promise((e=>t.P=e)),t.A=new Promise((e=>t.M=e)),e["s-p"]=[],e["s-rc"]=[],H.set(e,t)},_=(e,n)=>n in e,z=(e,n)=>(0,console.error)(e,n),B=new Map,G=e=>{const n=e.$.replace(/-/g,"_"),t=e.D,l=B.get(t);return l?l[n]:import(`./${t}.entry.js`).then((e=>(B.set(t,e),e[n])),z)
2
+ /*!__STENCIL_STATIC_IMPORT_SWITCH__*/},I=new Map,J="undefined"!=typeof window?window:{},K=J.document||{head:{}},Q={u:0,T:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,n,t,l)=>e.addEventListener(n,t,l),rel:(e,n,t,l)=>e.removeEventListener(n,t,l),ce:(e,n)=>new CustomEvent(e,n)},X=e=>Promise.resolve(e),Y=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(e){}return!1})(),Z=[],ee=[],ne=(e,n)=>t=>{e.push(t),l||(l=!0,n&&4&Q.u?se(le):Q.raf(le))},te=e=>{for(let n=0;n<e.length;n++)try{e[n](performance.now())}catch(e){z(e)}e.length=0},le=()=>{te(Z),te(ee),(l=Z.length>0)&&Q.raf(le)},se=e=>X().then(e),oe=ne(ee,!0);export{u as H,D as b,f as c,a as g,c as h,X as p,q as r,F as s}
@@ -1,146 +1 @@
1
- :root {
2
- /* Colors */
3
- --feedback-primary-color: #0070F4;
4
- --feedback-secondary-color: #f1f3f4;
5
- --feedback-light-color: #ccc;
6
- --feedback-dark-color: #191919;
7
- --feedback-text-color: #5f6368;
8
- --feedback-white-color: #fff;
9
- --feedback-highlight-color: #ffb422;
10
-
11
- /* Fonts */
12
- --feedback-font-family: "Inter", "Tahoma", "sans-serif";
13
- --feedback-heading-font-size: 16px;
14
- --feedback-text-font-size: 14px;
15
-
16
- /* Feedback button*/
17
- --feedback-button-border-radius: 20px;
18
- --feedback-button-dark-bg-color: var(--feedback-primary-color);
19
- --feedback-button-dark-text-color: var(--feedback-white-color);
20
- --feedback-button-dark-icon-color: var(--feedback-white-color);
21
- --feedback-button-light-bg-color: var(--feedback-white-color);
22
- --feedback-button-light-text-color: var(--feedback-primary-color);
23
- --feedback-button-light-icon-color: var(--feedback-primary-color);
24
- --feedback-button-text-font-size: var(--feedback-text-font-size);
25
- --feedback-button-text-font-weight: 600;
26
- --feedback-button-z-index: 300;
27
-
28
-
29
- /*Feedback modal*/
30
- --feedback-modal-button-bg-color: var(--feedback-white-color);
31
- --feedback-modal-button-bg-color-active: var(--feedback-white-color);
32
- --feedback-modal-button-border-color: var(--feedback-light-color);
33
- --feedback-modal-button-border-color-active: var(--feedback-primary-color);
34
- --feedback-modal-button-border-radius: 4px;
35
- --feedback-modal-button-font-size: var(--feedback-text-font-size);
36
- --feedback-modal-button-icon-color: var(--feedback-dark-color);
37
- --feedback-modal-button-icon-color-active: var(--feedback-primary-color);
38
- --feedback-modal-button-submit-bg-color: var(--feedback-primary-color);
39
- --feedback-modal-button-submit-bg-color-hover: var(--feedback-primary-color);
40
- --feedback-modal-button-submit-border-color-hover: var(--feedback-primary-color);
41
- --feedback-modal-button-submit-text-color: var(--feedback-white-color);
42
- --feedback-modal-button-submit-text-color-hover: var(--feedback-white-color);
43
- --feedback-modal-button-text-color: var(--feedback-dark-color);
44
- --feedback-modal-button-text-color-active: var(--feedback-primary-color);
45
- --feedback-modal-close-bg-color: var(--feedback-white-color);
46
- --feedback-modal-close-color: var(--feedback-dark-color);
47
- --feedback-modal-content-bg-color: var(--feedback-white-color);
48
- --feedback-modal-content-border-color: var(--feedback-light-color);
49
- --feedback-modal-content-border-radius: 8px;
50
- --feedback-modal-content-font-family: var(--feedback-font-family);
51
- --feedback-modal-content-position-bottom: 10px;
52
- --feedback-modal-content-position-left: 10px;
53
- --feedback-modal-content-position-right: 10px;
54
- --feedback-modal-content-position-top: 10px;
55
- --feedback-modal-content-max-width: 600px;
56
- --feedback-modal-content-sidebar-max-width: 300px;
57
- --feedback-modal-content-text-color: var(--feedback-text-color);
58
- --feedback-modal-content-z-index: 300;
59
- --feedback-modal-element-hover-border-color: var(--feedback-primary-color);
60
- --feedback-modal-element-selected-border-color: var(--feedback-primary-color);
61
- --feedback-modal-footer-link: var(--feedback-dark-color);
62
- --feedback-modal-header-font-family: var(--feedback-font-family);
63
- --feedback-modal-header-font-size: var(--feedback-heading-font-size);
64
- --feedback-modal-header-font-weight: 500;
65
- --feedback-modal-header-text-color: var(--feedback-dark-color);
66
- --feedback-modal-input-bg-color: var(--feedback-secondary-color);
67
- --feedback-modal-input-border-color: transparent;
68
- --feedback-modal-input-border-color-focused: transparent;
69
- --feedback-modal-input-border-radius: 4px;
70
- --feedback-modal-input-font-size: var(--feedback-text-font-size);
71
- --feedback-modal-input-text-color: var(--feedback-text-color);
72
- --feedback-modal-message-font-size: var(--feedback-text-font-size);
73
- --feedback-modal-modal-wrapper-z-index: 300;
74
- --feedback-modal-rating-button-color: var(--feedback-text-color);
75
- --feedback-modal-rating-button-selected-color: var(--feedback-primary-color);
76
- --feedback-modal-rating-button-stars-selected-color: var(--feedback-highlight-color);
77
- --feedback-modal-screenshot-bg-color: rgba(0, 0, 0, 0.4);
78
- --feedback-modal-screenshot-close-color: var(--feedback-dark-color);
79
- --feedback-modal-screenshot-header-bg-color: var(--feedback-white-color);
80
- --feedback-modal-screenshot-header-text-color: var(--feedback-dark-color);
81
- --feedback-modal-screenshot-header-z-index: 250;
82
- --feedback-modal-screnshot-z-index: 100;
83
-
84
- /* Canvas Editor Variables */
85
- --feedback-canvas-editor-bg-color: var(--feedback-white-color);
86
- --feedback-canvas-editor-border-color: var(--feedback-light-color);
87
- --feedback-canvas-editor-header-bg-color: var(--feedback-secondary-color);
88
- --feedback-canvas-editor-tool-bg-color: var(--feedback-white-color);
89
- --feedback-canvas-editor-tool-bg-hover: var(--feedback-secondary-color);
90
- --feedback-canvas-editor-tool-bg-active: var(--feedback-primary-color);
91
- --feedback-canvas-editor-tool-text-color: var(--feedback-text-color);
92
- --feedback-canvas-editor-tool-text-active: var(--feedback-white-color);
93
- --feedback-canvas-editor-action-primary-bg: var(--feedback-primary-color);
94
- --feedback-canvas-editor-action-primary-text: var(--feedback-white-color);
95
- --feedback-canvas-editor-action-secondary-bg: var(--feedback-white-color);
96
- --feedback-canvas-editor-action-secondary-text: var(--feedback-text-color);
97
- --feedback-canvas-editor-action-secondary-border: var(--feedback-light-color);
98
- --feedback-canvas-editor-divider-color: var(--feedback-light-color);
99
- --feedback-canvas-editor-content-bg: var(--feedback-secondary-color);
100
- --feedback-canvas-editor-resize-handle-color: var(--feedback-primary-color);
101
- --feedback-canvas-editor-slider-track: var(--feedback-light-color);
102
- }
103
-
104
- [data-theme='dark'] {
105
- --feedback-text-color: #b0b8c4;
106
- --feedback-light-color: #363636;
107
- --feedback-modal-button-bg-color-active: transparent;
108
- --feedback-modal-button-icon-color: var(--feedback-white-color);
109
- --feedback-modal-button-text-color: var(--feedback-white-color);
110
- --feedback-modal-close-bg-color: transparent;
111
- --feedback-modal-close-color: var(--feedback-white-color);
112
- --feedback-modal-content-bg-color: var(--feedback-dark-color);
113
- --feedback-modal-content-text-color: var(--feedback-text-color);
114
- --feedback-modal-footer-link: var(--feedback-white-color);
115
- --feedback-modal-header-text-color: var(--feedback-white-color);
116
- --feedback-modal-input-bg-color: var(--feedback-light-color);
117
- --feedback-modal-input-text-color: var(--feedback-white-color);
118
- --feedback-modal-rating-button-color: var(--feedback-white-color);
119
- /* Todo: legacy, remove these variables */
120
- --feedback-modal-screenshot-close-color: var(--feedback-white-color);
121
- --feedback-modal-screenshot-header-bg-color: var(--feedback-dark-color);
122
- --feedback-modal-screenshot-header-text-color: var(--feedback-white-color);
123
-
124
- /* Canvas Editor Dark Theme */
125
- --feedback-canvas-editor-bg-color: var(--feedback-dark-color);
126
- --feedback-canvas-editor-border-color: var(--feedback-light-color);
127
- --feedback-canvas-editor-header-bg-color: var(--feedback-light-color);
128
- --feedback-canvas-editor-tool-bg-color: var(--feedback-light-color);
129
- --feedback-canvas-editor-tool-bg-hover: #4a4a4a;
130
- --feedback-canvas-editor-tool-text-color: var(--feedback-white-color);
131
- --feedback-canvas-editor-action-secondary-bg: var(--feedback-light-color);
132
- --feedback-canvas-editor-action-secondary-text: var(--feedback-white-color);
133
- --feedback-canvas-editor-action-secondary-border: var(--feedback-light-color);
134
- --feedback-canvas-editor-content-bg: var(--feedback-light-color);
135
- --feedback-canvas-editor-divider-color: #4a4a4a;
136
- --feedback-canvas-editor-slider-track: #4a4a4a;
137
- }
138
-
139
- .feedback-modal-screenshot-open {
140
- position: fixed;
141
- width: 100%;
142
- }
143
-
144
- .feedback-modal-screenshot-open--scroll{
145
- overflow-y: scroll;
146
- }
1
+ :root{--feedback-primary-color:#0070F4;--feedback-secondary-color:#f1f3f4;--feedback-light-color:#ccc;--feedback-dark-color:#191919;--feedback-text-color:#5f6368;--feedback-white-color:#fff;--feedback-highlight-color:#ffb422;--feedback-font-family:"Inter", "Tahoma", "sans-serif";--feedback-heading-font-size:16px;--feedback-text-font-size:14px;--feedback-button-border-radius:20px;--feedback-button-dark-bg-color:var(--feedback-primary-color);--feedback-button-dark-text-color:var(--feedback-white-color);--feedback-button-dark-icon-color:var(--feedback-white-color);--feedback-button-light-bg-color:var(--feedback-white-color);--feedback-button-light-text-color:var(--feedback-primary-color);--feedback-button-light-icon-color:var(--feedback-primary-color);--feedback-button-text-font-size:var(--feedback-text-font-size);--feedback-button-text-font-weight:600;--feedback-button-z-index:300;--feedback-modal-button-bg-color:var(--feedback-white-color);--feedback-modal-button-bg-color-active:var(--feedback-white-color);--feedback-modal-button-border-color:var(--feedback-light-color);--feedback-modal-button-border-color-active:var(--feedback-primary-color);--feedback-modal-button-border-radius:4px;--feedback-modal-button-font-size:var(--feedback-text-font-size);--feedback-modal-button-icon-color:var(--feedback-dark-color);--feedback-modal-button-icon-color-active:var(--feedback-primary-color);--feedback-modal-button-submit-bg-color:var(--feedback-primary-color);--feedback-modal-button-submit-bg-color-hover:var(--feedback-primary-color);--feedback-modal-button-submit-border-color-hover:var(--feedback-primary-color);--feedback-modal-button-submit-text-color:var(--feedback-white-color);--feedback-modal-button-submit-text-color-hover:var(--feedback-white-color);--feedback-modal-button-text-color:var(--feedback-dark-color);--feedback-modal-button-text-color-active:var(--feedback-primary-color);--feedback-modal-close-bg-color:var(--feedback-white-color);--feedback-modal-close-color:var(--feedback-dark-color);--feedback-modal-content-bg-color:var(--feedback-white-color);--feedback-modal-content-border-color:var(--feedback-light-color);--feedback-modal-content-border-radius:8px;--feedback-modal-content-font-family:var(--feedback-font-family);--feedback-modal-content-position-bottom:10px;--feedback-modal-content-position-left:10px;--feedback-modal-content-position-right:10px;--feedback-modal-content-position-top:10px;--feedback-modal-content-max-width:600px;--feedback-modal-content-sidebar-max-width:300px;--feedback-modal-content-text-color:var(--feedback-text-color);--feedback-modal-content-z-index:300;--feedback-modal-element-hover-border-color:var(--feedback-primary-color);--feedback-modal-element-selected-border-color:var(--feedback-primary-color);--feedback-modal-footer-link:var(--feedback-dark-color);--feedback-modal-header-font-family:var(--feedback-font-family);--feedback-modal-header-font-size:var(--feedback-heading-font-size);--feedback-modal-header-font-weight:500;--feedback-modal-header-text-color:var(--feedback-dark-color);--feedback-modal-input-bg-color:var(--feedback-secondary-color);--feedback-modal-input-border-color:transparent;--feedback-modal-input-border-color-focused:transparent;--feedback-modal-input-border-radius:4px;--feedback-modal-input-font-size:var(--feedback-text-font-size);--feedback-modal-input-text-color:var(--feedback-text-color);--feedback-modal-message-font-size:var(--feedback-text-font-size);--feedback-modal-modal-wrapper-z-index:300;--feedback-modal-rating-button-color:var(--feedback-text-color);--feedback-modal-rating-button-selected-color:var(--feedback-primary-color);--feedback-modal-rating-button-stars-selected-color:var(--feedback-highlight-color);--feedback-modal-screenshot-bg-color:rgba(0, 0, 0, 0.4);--feedback-modal-screenshot-close-color:var(--feedback-dark-color);--feedback-modal-screenshot-header-bg-color:var(--feedback-white-color);--feedback-modal-screenshot-header-text-color:var(--feedback-dark-color);--feedback-modal-screenshot-header-z-index:250;--feedback-modal-screnshot-z-index:100;--feedback-canvas-editor-bg-color:var(--feedback-white-color);--feedback-canvas-editor-border-color:var(--feedback-light-color);--feedback-canvas-editor-header-bg-color:var(--feedback-secondary-color);--feedback-canvas-editor-tool-bg-color:var(--feedback-white-color);--feedback-canvas-editor-tool-bg-hover:var(--feedback-secondary-color);--feedback-canvas-editor-tool-bg-active:var(--feedback-primary-color);--feedback-canvas-editor-tool-text-color:var(--feedback-text-color);--feedback-canvas-editor-tool-text-active:var(--feedback-white-color);--feedback-canvas-editor-action-primary-bg:var(--feedback-primary-color);--feedback-canvas-editor-action-primary-text:var(--feedback-white-color);--feedback-canvas-editor-action-secondary-bg:var(--feedback-white-color);--feedback-canvas-editor-action-secondary-text:var(--feedback-text-color);--feedback-canvas-editor-action-secondary-border:var(--feedback-light-color);--feedback-canvas-editor-divider-color:var(--feedback-light-color);--feedback-canvas-editor-content-bg:var(--feedback-secondary-color);--feedback-canvas-editor-resize-handle-color:var(--feedback-primary-color);--feedback-canvas-editor-slider-track:var(--feedback-light-color)}[data-theme='dark']{--feedback-text-color:#b0b8c4;--feedback-light-color:#363636;--feedback-modal-button-bg-color-active:transparent;--feedback-modal-button-icon-color:var(--feedback-white-color);--feedback-modal-button-text-color:var(--feedback-white-color);--feedback-modal-close-bg-color:transparent;--feedback-modal-close-color:var(--feedback-white-color);--feedback-modal-content-bg-color:var(--feedback-dark-color);--feedback-modal-content-text-color:var(--feedback-text-color);--feedback-modal-footer-link:var(--feedback-white-color);--feedback-modal-header-text-color:var(--feedback-white-color);--feedback-modal-input-bg-color:var(--feedback-light-color);--feedback-modal-input-text-color:var(--feedback-white-color);--feedback-modal-rating-button-color:var(--feedback-white-color);--feedback-modal-screenshot-close-color:var(--feedback-white-color);--feedback-modal-screenshot-header-bg-color:var(--feedback-dark-color);--feedback-modal-screenshot-header-text-color:var(--feedback-white-color);--feedback-canvas-editor-bg-color:var(--feedback-dark-color);--feedback-canvas-editor-border-color:var(--feedback-light-color);--feedback-canvas-editor-header-bg-color:var(--feedback-light-color);--feedback-canvas-editor-tool-bg-color:var(--feedback-light-color);--feedback-canvas-editor-tool-bg-hover:#4a4a4a;--feedback-canvas-editor-tool-text-color:var(--feedback-white-color);--feedback-canvas-editor-action-secondary-bg:var(--feedback-light-color);--feedback-canvas-editor-action-secondary-text:var(--feedback-white-color);--feedback-canvas-editor-action-secondary-border:var(--feedback-light-color);--feedback-canvas-editor-content-bg:var(--feedback-light-color);--feedback-canvas-editor-divider-color:#4a4a4a;--feedback-canvas-editor-slider-track:#4a4a4a}.feedback-modal-screenshot-open{position:fixed;width:100%}.feedback-modal-screenshot-open--scroll{overflow-y:scroll}
@@ -1,148 +1 @@
1
- import { B as BUILD, c as consoleDevInfo, p as plt, w as win, H, d as doc, N as NAMESPACE, a as promiseResolve, b as bootstrapLazy } from './index-36434da0.js';
2
- export { s as setNonce } from './index-36434da0.js';
3
- import { g as globalScripts } from './app-globals-0f993ce5.js';
4
-
5
- /*
6
- Stencil Client Patch Browser v2.22.3 | MIT Licensed | https://stenciljs.com
7
- */
8
- /**
9
- * Helper method for querying a `meta` tag that contains a nonce value
10
- * out of a DOM's head.
11
- *
12
- * @param doc The DOM containing the `head` to query against
13
- * @returns The content of the meta tag representing the nonce value, or `undefined` if no tag
14
- * exists or the tag has no content.
15
- */
16
- function queryNonceMetaTagContent(doc) {
17
- var _a, _b, _c;
18
- return (_c = (_b = (_a = doc.head) === null || _a === void 0 ? void 0 : _a.querySelector('meta[name="csp-nonce"]')) === null || _b === void 0 ? void 0 : _b.getAttribute('content')) !== null && _c !== void 0 ? _c : undefined;
19
- }
20
- const getDynamicImportFunction = (namespace) => `__sc_import_${namespace.replace(/\s|-/g, '_')}`;
21
- const patchBrowser = () => {
22
- // NOTE!! This fn cannot use async/await!
23
- if (BUILD.isDev && !BUILD.isTesting) {
24
- consoleDevInfo('Running in development mode.');
25
- }
26
- if (BUILD.cssVarShim) {
27
- // shim css vars
28
- plt.$cssShim$ = win.__cssshim;
29
- }
30
- if (BUILD.cloneNodeFix) {
31
- // opted-in to polyfill cloneNode() for slot polyfilled components
32
- patchCloneNodeFix(H.prototype);
33
- }
34
- if (BUILD.profile && !performance.mark) {
35
- // not all browsers support performance.mark/measure (Safari 10)
36
- // because the mark/measure APIs are designed to write entries to a buffer in the browser that does not exist,
37
- // simply stub the implementations out.
38
- // TODO(STENCIL-323): Remove this patch when support for older browsers is removed (breaking)
39
- // @ts-ignore
40
- performance.mark = performance.measure = () => {
41
- /*noop*/
42
- };
43
- performance.getEntriesByName = () => [];
44
- }
45
- // @ts-ignore
46
- const scriptElm = BUILD.scriptDataOpts || BUILD.safari10 || BUILD.dynamicImportShim
47
- ? Array.from(doc.querySelectorAll('script')).find((s) => new RegExp(`\/${NAMESPACE}(\\.esm)?\\.js($|\\?|#)`).test(s.src) ||
48
- s.getAttribute('data-stencil-namespace') === NAMESPACE)
49
- : null;
50
- const importMeta = import.meta.url;
51
- const opts = BUILD.scriptDataOpts ? scriptElm['data-opts'] || {} : {};
52
- if (BUILD.safari10 && 'onbeforeload' in scriptElm && !history.scrollRestoration /* IS_ESM_BUILD */) {
53
- // Safari < v11 support: This IF is true if it's Safari below v11.
54
- // This fn cannot use async/await since Safari didn't support it until v11,
55
- // however, Safari 10 did support modules. Safari 10 also didn't support "nomodule",
56
- // so both the ESM file and nomodule file would get downloaded. Only Safari
57
- // has 'onbeforeload' in the script, and "history.scrollRestoration" was added
58
- // to Safari in v11. Return a noop then() so the async/await ESM code doesn't continue.
59
- // IS_ESM_BUILD is replaced at build time so this check doesn't happen in systemjs builds.
60
- return {
61
- then() {
62
- /* promise noop */
63
- },
64
- };
65
- }
66
- if (!BUILD.safari10 && importMeta !== '') {
67
- opts.resourcesUrl = new URL('.', importMeta).href;
68
- }
69
- else if (BUILD.dynamicImportShim || BUILD.safari10) {
70
- opts.resourcesUrl = new URL('.', new URL(scriptElm.getAttribute('data-resources-url') || scriptElm.src, win.location.href)).href;
71
- if (BUILD.dynamicImportShim) {
72
- patchDynamicImport(opts.resourcesUrl, scriptElm);
73
- }
74
- if (BUILD.dynamicImportShim && !win.customElements) {
75
- // module support, but no custom elements support (Old Edge)
76
- // @ts-ignore
77
- return import(/* webpackChunkName: "polyfills-dom" */ './dom-64053c71.js').then(() => opts);
78
- }
79
- }
80
- return promiseResolve(opts);
81
- };
82
- const patchDynamicImport = (base, orgScriptElm) => {
83
- const importFunctionName = getDynamicImportFunction(NAMESPACE);
84
- try {
85
- // test if this browser supports dynamic imports
86
- // There is a caching issue in V8, that breaks using import() in Function
87
- // By generating a random string, we can workaround it
88
- // Check https://bugs.chromium.org/p/chromium/issues/detail?id=990810 for more info
89
- win[importFunctionName] = new Function('w', `return import(w);//${Math.random()}`);
90
- }
91
- catch (e) {
92
- // this shim is specifically for browsers that do support "esm" imports
93
- // however, they do NOT support "dynamic" imports
94
- // basically this code is for old Edge, v18 and below
95
- const moduleMap = new Map();
96
- win[importFunctionName] = (src) => {
97
- var _a;
98
- const url = new URL(src, base).href;
99
- let mod = moduleMap.get(url);
100
- if (!mod) {
101
- const script = doc.createElement('script');
102
- script.type = 'module';
103
- script.crossOrigin = orgScriptElm.crossOrigin;
104
- script.src = URL.createObjectURL(new Blob([`import * as m from '${url}'; window.${importFunctionName}.m = m;`], {
105
- type: 'application/javascript',
106
- }));
107
- // Apply CSP nonce to the script tag if it exists
108
- const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);
109
- if (nonce != null) {
110
- script.setAttribute('nonce', nonce);
111
- }
112
- mod = new Promise((resolve) => {
113
- script.onload = () => {
114
- resolve(win[importFunctionName].m);
115
- script.remove();
116
- };
117
- });
118
- moduleMap.set(url, mod);
119
- doc.head.appendChild(script);
120
- }
121
- return mod;
122
- };
123
- }
124
- };
125
- const patchCloneNodeFix = (HTMLElementPrototype) => {
126
- const nativeCloneNodeFn = HTMLElementPrototype.cloneNode;
127
- HTMLElementPrototype.cloneNode = function (deep) {
128
- if (this.nodeName === 'TEMPLATE') {
129
- return nativeCloneNodeFn.call(this, deep);
130
- }
131
- const clonedNode = nativeCloneNodeFn.call(this, false);
132
- const srcChildNodes = this.childNodes;
133
- if (deep) {
134
- for (let i = 0; i < srcChildNodes.length; i++) {
135
- // Node.ATTRIBUTE_NODE === 2, and checking because IE11
136
- if (srcChildNodes[i].nodeType !== 2) {
137
- clonedNode.appendChild(srcChildNodes[i].cloneNode(true));
138
- }
139
- }
140
- }
141
- return clonedNode;
142
- };
143
- };
144
-
145
- patchBrowser().then(options => {
146
- globalScripts();
147
- return bootstrapLazy([["canvas-editor",[[1,"canvas-editor",{"canvasEditorTitle":[1,"canvas-editor-title"],"canvasEditorCancelText":[1,"canvas-editor-cancel-text"],"canvasEditorSaveText":[1,"canvas-editor-save-text"],"screenshotTakingText":[1,"screenshot-taking-text"],"screenshotAttachedText":[1,"screenshot-attached-text"],"screenshotButtonText":[1,"screenshot-button-text"],"autoStartScreenshot":[4,"auto-start-screenshot"],"existingScreenshot":[1,"existing-screenshot"],"editTextButtonText":[1,"edit-text-button-text"],"sizeLabelText":[1,"size-label-text"],"borderLabelText":[1,"border-label-text"],"editTextPromptText":[1,"edit-text-prompt-text"],"screenshotErrorGeneral":[1,"screenshot-error-general"],"screenshotErrorPermission":[1,"screenshot-error-permission"],"screenshotErrorNotSupported":[1,"screenshot-error-not-supported"],"screenshotErrorNotFound":[1,"screenshot-error-not-found"],"screenshotErrorCancelled":[1,"screenshot-error-cancelled"],"screenshotErrorBrowserNotSupported":[1,"screenshot-error-browser-not-supported"],"screenshotErrorUnexpected":[1,"screenshot-error-unexpected"],"takingScreenshot":[32],"showCanvasEditor":[32],"canvasDrawingTool":[32],"canvasDrawingColor":[32],"canvasLineWidth":[32],"canvasTextSize":[32],"isDrawing":[32],"annotations":[32],"currentAnnotation":[32],"isDragging":[32],"draggedAnnotation":[32],"dragStartPos":[32],"showColorPicker":[32],"editingColorIndex":[32],"selectedAnnotation":[32],"isResizing":[32],"resizingAnnotation":[32],"resizeStartSize":[32],"resizeStartDimensions":[32],"hoveredAnnotation":[32],"resizeHandle":[32],"defaultColors":[32]}]]],["feedback-modal",[[1,"feedback-modal",{"customFont":[4,"custom-font"],"emailAddress":[1,"email-address"],"hideEmail":[4,"hide-email"],"isEmailRequired":[4,"is-email-required"],"ratingMode":[1,"rating-mode"],"hasSelectedElement":[1540,"has-selected-element"],"hidePrivacyPolicy":[4,"hide-privacy-policy"],"hideRating":[4,"hide-rating"],"hideScreenshotButton":[4,"hide-screenshot-button"],"project":[1],"showScreenshotMode":[1540,"show-screenshot-mode"],"showScreenshotTopBar":[1540,"show-screenshot-top-bar"],"showModal":[1540,"show-modal"],"rating":[2],"metadata":[1],"fetchData":[4,"fetch-data"],"emailPlaceholder":[1,"email-placeholder"],"errorMessage":[1,"error-message"],"errorMessage403":[1,"error-message-4-0-3"],"errorMessage404":[1,"error-message-4-0-4"],"messagePlaceholder":[1,"message-placeholder"],"footerText":[1,"footer-text"],"modalPosition":[1,"modal-position"],"modalTitle":[1,"modal-title"],"modalTitleError":[1,"modal-title-error"],"modalTitleSuccess":[1,"modal-title-success"],"privacyPolicyText":[1,"privacy-policy-text"],"ratingPlaceholder":[1,"rating-placeholder"],"ratingStarsPlaceholder":[1,"rating-stars-placeholder"],"sendButtonText":[1,"send-button-text"],"screenshotAttachedText":[1,"screenshot-attached-text"],"screenshotButtonText":[1,"screenshot-button-text"],"screenshotTakingText":[1,"screenshot-taking-text"],"screenshotTopbarText":[1,"screenshot-topbar-text"],"successMessage":[1,"success-message"],"canvasEditorTitle":[1,"canvas-editor-title"],"canvasEditorCancelText":[1,"canvas-editor-cancel-text"],"canvasEditorSaveText":[1,"canvas-editor-save-text"],"editTextButtonText":[1,"edit-text-button-text"],"sizeLabelText":[1,"size-label-text"],"borderLabelText":[1,"border-label-text"],"editTextPromptText":[1,"edit-text-prompt-text"],"screenshotErrorGeneral":[1,"screenshot-error-general"],"screenshotErrorPermission":[1,"screenshot-error-permission"],"screenshotErrorNotSupported":[1,"screenshot-error-not-supported"],"screenshotErrorNotFound":[1,"screenshot-error-not-found"],"screenshotErrorCancelled":[1,"screenshot-error-cancelled"],"screenshotErrorBrowserNotSupported":[1,"screenshot-error-browser-not-supported"],"screenshotErrorUnexpected":[1,"screenshot-error-unexpected"],"sending":[32],"formMessage":[32],"formEmail":[32],"formSuccess":[32],"formVerification":[32],"formError":[32],"formErrorStatus":[32],"encodedScreenshot":[32],"isPrivacyChecked":[32],"whitelabel":[32],"selectedRating":[32],"overlayVisible":[32],"isAnimating":[32],"takingScreenshot":[32],"showScreenshotError":[32],"screenshotError":[32],"showCanvasEditor":[32],"autoStartCapture":[32],"openModal":[64]}]]],["feedback-button",[[1,"feedback-button",{"buttonPosition":[1,"button-position"],"buttonStyle":[1,"button-style"],"hideIcon":[4,"hide-icon"],"hideMobile":[4,"hide-mobile"],"sessionId":[1537,"session-id"],"metadata":[1],"submit":[4],"customFont":[4,"custom-font"],"emailAddress":[1,"email-address"],"isEmailRequired":[4,"is-email-required"],"fetchData":[4,"fetch-data"],"hideEmail":[4,"hide-email"],"hidePrivacyPolicy":[4,"hide-privacy-policy"],"hideRating":[4,"hide-rating"],"hideScreenshotButton":[4,"hide-screenshot-button"],"modalPosition":[1,"modal-position"],"project":[1],"rating":[2],"ratingMode":[1,"rating-mode"],"canvasEditorTitle":[1,"canvas-editor-title"],"canvasEditorCancelText":[1,"canvas-editor-cancel-text"],"canvasEditorSaveText":[1,"canvas-editor-save-text"],"editTextButtonText":[1,"edit-text-button-text"],"sizeLabelText":[1,"size-label-text"],"borderLabelText":[1,"border-label-text"],"editTextPromptText":[1,"edit-text-prompt-text"],"screenshotErrorGeneral":[1,"screenshot-error-general"],"screenshotErrorPermission":[1,"screenshot-error-permission"],"screenshotErrorNotSupported":[1,"screenshot-error-not-supported"],"screenshotErrorNotFound":[1,"screenshot-error-not-found"],"screenshotErrorCancelled":[1,"screenshot-error-cancelled"],"screenshotErrorBrowserNotSupported":[1,"screenshot-error-browser-not-supported"],"screenshotErrorUnexpected":[1,"screenshot-error-unexpected"],"emailPlaceholder":[1,"email-placeholder"],"errorMessage":[1,"error-message"],"errorMessage403":[1,"error-message-4-0-3"],"errorMessage404":[1,"error-message-4-0-4"],"footerText":[1,"footer-text"],"messagePlaceholder":[1,"message-placeholder"],"modalTitle":[1,"modal-title"],"modalTitleError":[1,"modal-title-error"],"modalTitleSuccess":[1,"modal-title-success"],"privacyPolicyText":[1,"privacy-policy-text"],"ratingPlaceholder":[1,"rating-placeholder"],"ratingStarsPlaceholder":[1,"rating-stars-placeholder"],"screenshotAttachedText":[1,"screenshot-attached-text"],"screenshotButtonText":[1,"screenshot-button-text"],"screenshotTakingText":[1,"screenshot-taking-text"],"screenshotTopbarText":[1,"screenshot-topbar-text"],"sendButtonText":[1,"send-button-text"],"successMessage":[1,"success-message"]}]]]], options);
148
- });
1
+ import{p as e,b as t}from"./p-af2a1f7f.js";export{s as setNonce}from"./p-af2a1f7f.js";(()=>{const t=import.meta.url,r={};return""!==t&&(r.resourcesUrl=new URL(".",t).href),e(r)})().then((e=>t([["p-2c39091c",[[1,"feedback-button",{buttonPosition:[1,"button-position"],buttonStyle:[1,"button-style"],hideIcon:[4,"hide-icon"],hideMobile:[4,"hide-mobile"],sessionId:[1537,"session-id"],metadata:[1],submit:[4],customFont:[4,"custom-font"],emailAddress:[1,"email-address"],isEmailRequired:[4,"is-email-required"],fetchData:[4,"fetch-data"],hideEmail:[4,"hide-email"],hidePrivacyPolicy:[4,"hide-privacy-policy"],hideRating:[4,"hide-rating"],hideScreenshotButton:[4,"hide-screenshot-button"],modalPosition:[1,"modal-position"],project:[1],rating:[2],ratingMode:[1,"rating-mode"],canvasEditorTitle:[1,"canvas-editor-title"],canvasEditorCancelText:[1,"canvas-editor-cancel-text"],canvasEditorSaveText:[1,"canvas-editor-save-text"],editTextButtonText:[1,"edit-text-button-text"],sizeLabelText:[1,"size-label-text"],borderLabelText:[1,"border-label-text"],editTextPromptText:[1,"edit-text-prompt-text"],screenshotErrorGeneral:[1,"screenshot-error-general"],screenshotErrorPermission:[1,"screenshot-error-permission"],screenshotErrorNotSupported:[1,"screenshot-error-not-supported"],screenshotErrorNotFound:[1,"screenshot-error-not-found"],screenshotErrorCancelled:[1,"screenshot-error-cancelled"],screenshotErrorBrowserNotSupported:[1,"screenshot-error-browser-not-supported"],screenshotErrorUnexpected:[1,"screenshot-error-unexpected"],emailPlaceholder:[1,"email-placeholder"],errorMessage:[1,"error-message"],errorMessage403:[1,"error-message-4-0-3"],errorMessage404:[1,"error-message-4-0-4"],footerText:[1,"footer-text"],messagePlaceholder:[1,"message-placeholder"],modalTitle:[1,"modal-title"],modalTitleError:[1,"modal-title-error"],modalTitleSuccess:[1,"modal-title-success"],privacyPolicyText:[1,"privacy-policy-text"],ratingPlaceholder:[1,"rating-placeholder"],ratingStarsPlaceholder:[1,"rating-stars-placeholder"],screenshotAttachedText:[1,"screenshot-attached-text"],screenshotButtonText:[1,"screenshot-button-text"],screenshotTakingText:[1,"screenshot-taking-text"],screenshotTopbarText:[1,"screenshot-topbar-text"],sendButtonText:[1,"send-button-text"],successMessage:[1,"success-message"]}],[1,"feedback-modal",{customFont:[4,"custom-font"],emailAddress:[1,"email-address"],hideEmail:[4,"hide-email"],isEmailRequired:[4,"is-email-required"],ratingMode:[1,"rating-mode"],hasSelectedElement:[1540,"has-selected-element"],hidePrivacyPolicy:[4,"hide-privacy-policy"],hideRating:[4,"hide-rating"],hideScreenshotButton:[4,"hide-screenshot-button"],project:[1],showScreenshotMode:[1540,"show-screenshot-mode"],showScreenshotTopBar:[1540,"show-screenshot-top-bar"],showModal:[1540,"show-modal"],rating:[2],metadata:[1],fetchData:[4,"fetch-data"],emailPlaceholder:[1,"email-placeholder"],errorMessage:[1,"error-message"],errorMessage403:[1,"error-message-4-0-3"],errorMessage404:[1,"error-message-4-0-4"],messagePlaceholder:[1,"message-placeholder"],footerText:[1,"footer-text"],modalPosition:[1,"modal-position"],modalTitle:[1,"modal-title"],modalTitleError:[1,"modal-title-error"],modalTitleSuccess:[1,"modal-title-success"],privacyPolicyText:[1,"privacy-policy-text"],ratingPlaceholder:[1,"rating-placeholder"],ratingStarsPlaceholder:[1,"rating-stars-placeholder"],sendButtonText:[1,"send-button-text"],screenshotAttachedText:[1,"screenshot-attached-text"],screenshotButtonText:[1,"screenshot-button-text"],screenshotTakingText:[1,"screenshot-taking-text"],screenshotTopbarText:[1,"screenshot-topbar-text"],successMessage:[1,"success-message"],canvasEditorTitle:[1,"canvas-editor-title"],canvasEditorCancelText:[1,"canvas-editor-cancel-text"],canvasEditorSaveText:[1,"canvas-editor-save-text"],editTextButtonText:[1,"edit-text-button-text"],sizeLabelText:[1,"size-label-text"],borderLabelText:[1,"border-label-text"],editTextPromptText:[1,"edit-text-prompt-text"],screenshotErrorGeneral:[1,"screenshot-error-general"],screenshotErrorPermission:[1,"screenshot-error-permission"],screenshotErrorNotSupported:[1,"screenshot-error-not-supported"],screenshotErrorNotFound:[1,"screenshot-error-not-found"],screenshotErrorCancelled:[1,"screenshot-error-cancelled"],screenshotErrorBrowserNotSupported:[1,"screenshot-error-browser-not-supported"],screenshotErrorUnexpected:[1,"screenshot-error-unexpected"],sending:[32],formMessage:[32],formEmail:[32],formSuccess:[32],formVerification:[32],formError:[32],formErrorStatus:[32],encodedScreenshot:[32],isPrivacyChecked:[32],whitelabel:[32],selectedRating:[32],overlayVisible:[32],isAnimating:[32],takingScreenshot:[32],showScreenshotError:[32],screenshotError:[32],showCanvasEditor:[32],autoStartCapture:[32],openModal:[64]}],[1,"canvas-editor",{canvasEditorTitle:[1,"canvas-editor-title"],canvasEditorCancelText:[1,"canvas-editor-cancel-text"],canvasEditorSaveText:[1,"canvas-editor-save-text"],screenshotTakingText:[1,"screenshot-taking-text"],screenshotAttachedText:[1,"screenshot-attached-text"],screenshotButtonText:[1,"screenshot-button-text"],autoStartScreenshot:[4,"auto-start-screenshot"],existingScreenshot:[1,"existing-screenshot"],editTextButtonText:[1,"edit-text-button-text"],sizeLabelText:[1,"size-label-text"],borderLabelText:[1,"border-label-text"],editTextPromptText:[1,"edit-text-prompt-text"],screenshotErrorGeneral:[1,"screenshot-error-general"],screenshotErrorPermission:[1,"screenshot-error-permission"],screenshotErrorNotSupported:[1,"screenshot-error-not-supported"],screenshotErrorNotFound:[1,"screenshot-error-not-found"],screenshotErrorCancelled:[1,"screenshot-error-cancelled"],screenshotErrorBrowserNotSupported:[1,"screenshot-error-browser-not-supported"],screenshotErrorUnexpected:[1,"screenshot-error-unexpected"],takingScreenshot:[32],showCanvasEditor:[32],canvasDrawingTool:[32],canvasDrawingColor:[32],canvasLineWidth:[32],canvasTextSize:[32],isDrawing:[32],annotations:[32],currentAnnotation:[32],isDragging:[32],draggedAnnotation:[32],dragStartPos:[32],showColorPicker:[32],editingColorIndex:[32],selectedAnnotation:[32],isResizing:[32],resizingAnnotation:[32],resizeStartSize:[32],resizeStartDimensions:[32],hoveredAnnotation:[32],resizeHandle:[32],defaultColors:[32]}]]]],e)));
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "pushfeedback",
3
3
  "author": "TechDocs Studio <info@techdocs.studio>",
4
4
  "homepage": "https://pushfeedback.com/",
5
- "version": "0.1.70",
5
+ "version": "0.1.71",
6
6
  "description": "Feedback widget for websites.",
7
7
  "main": "dist/index.cjs.js",
8
8
  "module": "dist/index.js",
@@ -1,3 +0,0 @@
1
- const globalScripts = () => {};
2
-
3
- export { globalScripts as g };
@@ -1,4 +0,0 @@
1
- /*
2
- Stencil Client Patch Esm v2.22.3 | MIT Licensed | https://stenciljs.com
3
- */
4
- var __assign=undefined&&undefined.__assign||function(){return __assign=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var s in t=arguments[r])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e},__assign.apply(this,arguments)},StyleNode=function(){this.start=0,this.end=0,this.previous=null,this.parent=null,this.rules=null,this.parsedCssText="",this.cssText="",this.atRule=!1,this.type=0,this.keyframesName="",this.selector="",this.parsedSelector="";};function parse(e){return parseCss(lex(e=clean(e)),e)}function clean(e){return e.replace(RX.comments,"").replace(RX.port,"")}function lex(e){var t=new StyleNode;t.start=0,t.end=e.length;for(var r=t,n=0,s=e.length;n<s;n++)if(e[n]===OPEN_BRACE){r.rules||(r.rules=[]);var o=r,a=o.rules[o.rules.length-1]||null;(r=new StyleNode).start=n+1,r.parent=o,r.previous=a,o.rules.push(r);}else e[n]===CLOSE_BRACE&&(r.end=n+1,r=r.parent||t);return t}function parseCss(e,t){var r=t.substring(e.start,e.end-1);if(e.parsedCssText=e.cssText=r.trim(),e.parent){var n=e.previous?e.previous.end:e.parent.start;r=(r=(r=_expandUnicodeEscapes(r=t.substring(n,e.start-1))).replace(RX.multipleSpaces," ")).substring(r.lastIndexOf(";")+1);var s=e.parsedSelector=e.selector=r.trim();e.atRule=0===s.indexOf(AT_START),e.atRule?0===s.indexOf(MEDIA_START)?e.type=types.MEDIA_RULE:s.match(RX.keyframesRule)&&(e.type=types.KEYFRAMES_RULE,e.keyframesName=e.selector.split(RX.multipleSpaces).pop()):0===s.indexOf(VAR_START)?e.type=types.MIXIN_RULE:e.type=types.STYLE_RULE;}var o=e.rules;if(o)for(var a=0,i=o.length,l=void 0;a<i&&(l=o[a]);a++)parseCss(l,t);return e}function _expandUnicodeEscapes(e){return e.replace(/\\([0-9a-f]{1,6})\s/gi,(function(){for(var e=arguments[1],t=6-e.length;t--;)e="0"+e;return "\\"+e}))}var types={STYLE_RULE:1,KEYFRAMES_RULE:7,MEDIA_RULE:4,MIXIN_RULE:1e3},OPEN_BRACE="{",CLOSE_BRACE="}",RX={comments:/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,port:/@import[^;]*;/gim,customProp:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?(?:[;\n]|$)/gim,mixinProp:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?{[^}]*?}(?:[;\n]|$)?/gim,mixinApply:/@apply\s*\(?[^);]*\)?\s*(?:[;\n]|$)?/gim,varApply:/[^;:]*?:[^;]*?var\([^;]*\)(?:[;\n]|$)?/gim,keyframesRule:/^@[^\s]*keyframes/,multipleSpaces:/\s+/g},VAR_START="--",MEDIA_START="@media",AT_START="@",VAR_USAGE_START=/\bvar\(/,VAR_ASSIGN_START=/\B--[\w-]+\s*:/,COMMENTS=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,TRAILING_LINES=/^[\t ]+\n/gm;function findRegex(e,t,r){e.lastIndex=0;var n=t.substring(r).match(e);if(n){var s=r+n.index;return {start:s,end:s+n[0].length}}return null}function resolveVar(e,t,r){return e[t]?e[t]:r?executeTemplate(r,e):""}function findVarEndIndex(e,t){for(var r=0,n=t;n<e.length;n++){var s=e[n];if("("===s)r++;else if(")"===s&&--r<=0)return n+1}return n}function parseVar(e,t){var r=findRegex(VAR_USAGE_START,e,t);if(!r)return null;var n=findVarEndIndex(e,r.start),s=e.substring(r.end,n-1).split(","),o=s[0],a=s.slice(1);return {start:r.start,end:n,propName:o.trim(),fallback:a.length>0?a.join(",").trim():void 0}}function compileVar(e,t,r){var n=parseVar(e,r);if(!n)return t.push(e.substring(r,e.length)),e.length;var s=n.propName,o=null!=n.fallback?compileTemplate(n.fallback):void 0;return t.push(e.substring(r,n.start),(function(e){return resolveVar(e,s,o)})),n.end}function executeTemplate(e,t){for(var r="",n=0;n<e.length;n++){var s=e[n];r+="string"==typeof s?s:s(t);}return r}function findEndValue(e,t){for(var r=!1,n=!1,s=t;s<e.length;s++){var o=e[s];if(r)n&&'"'===o&&(r=!1),n||"'"!==o||(r=!1);else if('"'===o)r=!0,n=!0;else if("'"===o)r=!0,n=!1;else {if(";"===o)return s+1;if("}"===o)return s}}return s}function removeCustomAssigns(e){for(var t="",r=0;;){var n=findRegex(VAR_ASSIGN_START,e,r),s=n?n.start:e.length;if(t+=e.substring(r,s),!n)break;r=findEndValue(e,s);}return t}function compileTemplate(e){var t=0;e=removeCustomAssigns(e=e.replace(COMMENTS,"")).replace(TRAILING_LINES,"");for(var r=[];t<e.length;)t=compileVar(e,r,t);return r}function resolveValues(e){var t={};e.forEach((function(e){e.declarations.forEach((function(e){t[e.prop]=e.value;}));}));for(var r={},n=Object.entries(t),s=function(e){var t=!1;if(n.forEach((function(e){var n=e[0],s=executeTemplate(e[1],r);s!==r[n]&&(r[n]=s,t=!0);})),!t)return "break"},o=0;o<10;o++){if("break"===s())break}return r}function getSelectors(e,t){if(void 0===t&&(t=0),!e.rules)return [];var r=[];return e.rules.filter((function(e){return e.type===types.STYLE_RULE})).forEach((function(e){var n=getDeclarations(e.cssText);n.length>0&&e.parsedSelector.split(",").forEach((function(e){e=e.trim(),r.push({selector:e,declarations:n,specificity:computeSpecificity(),nu:t});})),t++;})),r}function computeSpecificity(e){return 1}var IMPORTANT="!important",FIND_DECLARATIONS=/(?:^|[;\s{]\s*)(--[\w-]*?)\s*:\s*(?:((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};{])+)|\{([^}]*)\}(?:(?=[;\s}])|$))/gm;function getDeclarations(e){for(var t,r=[];t=FIND_DECLARATIONS.exec(e.trim());){var n=normalizeValue(t[2]),s=n.value,o=n.important;r.push({prop:t[1].trim(),value:compileTemplate(s),important:o});}return r}function normalizeValue(e){var t=(e=e.replace(/\s+/gim," ").trim()).endsWith(IMPORTANT);return t&&(e=e.slice(0,e.length-IMPORTANT.length).trim()),{value:e,important:t}}function getActiveSelectors(e,t,r){var n=[],s=getScopesForElement(t,e);return r.forEach((function(e){return n.push(e)})),s.forEach((function(e){return n.push(e)})),sortSelectors(getSelectorsForScopes(n).filter((function(t){return matches(e,t.selector)})))}function getScopesForElement(e,t){for(var r=[];t;){var n=e.get(t);n&&r.push(n),t=t.parentElement;}return r}function getSelectorsForScopes(e){var t=[];return e.forEach((function(e){t.push.apply(t,e.selectors);})),t}function sortSelectors(e){return e.sort((function(e,t){return e.specificity===t.specificity?e.nu-t.nu:e.specificity-t.specificity})),e}function matches(e,t){return ":root"===t||"html"===t||e.matches(t)}function parseCSS(e){var t=parse(e),r=compileTemplate(e);return {original:e,template:r,selectors:getSelectors(t),usesCssVars:r.length>1}}function addGlobalStyle(e,t){if(e.some((function(e){return e.styleEl===t})))return !1;var r=parseCSS(t.textContent);return r.styleEl=t,e.push(r),!0}function updateGlobalScopes(e){var t=resolveValues(getSelectorsForScopes(e));e.forEach((function(e){e.usesCssVars&&(e.styleEl.textContent=executeTemplate(e.template,t));}));}function reScope(e,t){var r=e.template.map((function(r){return "string"==typeof r?replaceScope(r,e.scopeId,t):r})),n=e.selectors.map((function(r){return __assign(__assign({},r),{selector:replaceScope(r.selector,e.scopeId,t)})}));return __assign(__assign({},e),{template:r,selectors:n,scopeId:t})}function replaceScope(e,t,r){return e=replaceAll(e,"\\.".concat(t),".".concat(r))}function replaceAll(e,t,r){return e.replace(new RegExp(t,"g"),r)}function loadDocument(e,t){return loadDocumentStyles(e,t),loadDocumentLinks(e,t).then((function(){updateGlobalScopes(t);}))}function startWatcher(e,t){"undefined"!=typeof MutationObserver&&new MutationObserver((function(){loadDocumentStyles(e,t)&&updateGlobalScopes(t);})).observe(document.head,{childList:!0});}function loadDocumentLinks(e,t){for(var r=[],n=e.querySelectorAll('link[rel="stylesheet"][href]:not([data-no-shim])'),s=0;s<n.length;s++)r.push(addGlobalLink(e,t,n[s]));return Promise.all(r)}function loadDocumentStyles(e,t){return Array.from(e.querySelectorAll("style:not([data-styles]):not([data-no-shim])")).map((function(e){return addGlobalStyle(t,e)})).some(Boolean)}function addGlobalLink(e,t,r){var n=r.href;return fetch(n).then((function(e){return e.text()})).then((function(s){if(hasCssVariables(s)&&r.parentNode){hasRelativeUrls(s)&&(s=fixRelativeUrls(s,n));var o=e.createElement("style");o.setAttribute("data-styles",""),o.textContent=s,addGlobalStyle(t,o),r.parentNode.insertBefore(o,r),r.remove();}})).catch((function(e){console.error(e);}))}var CSS_VARIABLE_REGEXP=/[\s;{]--[-a-zA-Z0-9]+\s*:/m;function hasCssVariables(e){return e.indexOf("var(")>-1||CSS_VARIABLE_REGEXP.test(e)}var CSS_URL_REGEXP=/url[\s]*\([\s]*['"]?(?!(?:https?|data)\:|\/)([^\'\"\)]*)[\s]*['"]?\)[\s]*/gim;function hasRelativeUrls(e){return CSS_URL_REGEXP.lastIndex=0,CSS_URL_REGEXP.test(e)}function fixRelativeUrls(e,t){var r=t.replace(/[^/]*$/,"");return e.replace(CSS_URL_REGEXP,(function(e,t){var n=r+t;return e.replace(t,n)}))}var CustomStyle=function(){function e(e,t){this.win=e,this.doc=t,this.count=0,this.hostStyleMap=new WeakMap,this.hostScopeMap=new WeakMap,this.globalScopes=[],this.scopesMap=new Map,this.didInit=!1;}return e.prototype.i=function(){var e=this;return this.didInit||!this.win.requestAnimationFrame?Promise.resolve():(this.didInit=!0,new Promise((function(t){e.win.requestAnimationFrame((function(){startWatcher(e.doc,e.globalScopes),loadDocument(e.doc,e.globalScopes).then((function(){return t()}));}));})))},e.prototype.addLink=function(e){var t=this;return addGlobalLink(this.doc,this.globalScopes,e).then((function(){t.updateGlobal();}))},e.prototype.addGlobalStyle=function(e){addGlobalStyle(this.globalScopes,e)&&this.updateGlobal();},e.prototype.createHostStyle=function(e,t,r,n){if(this.hostScopeMap.has(e))throw new Error("host style already created");var s=this.registerHostTemplate(r,t,n),o=this.doc.createElement("style");return o.setAttribute("data-no-shim",""),s.usesCssVars?n?(o["s-sc"]=t="".concat(s.scopeId,"-").concat(this.count),o.textContent="/*needs update*/",this.hostStyleMap.set(e,o),this.hostScopeMap.set(e,reScope(s,t)),this.count++):(s.styleEl=o,s.usesCssVars||(o.textContent=executeTemplate(s.template,{})),this.globalScopes.push(s),this.updateGlobal(),this.hostScopeMap.set(e,s)):o.textContent=r,o},e.prototype.removeHost=function(e){var t=this.hostStyleMap.get(e);t&&t.remove(),this.hostStyleMap.delete(e),this.hostScopeMap.delete(e);},e.prototype.updateHost=function(e){var t=this.hostScopeMap.get(e);if(t&&t.usesCssVars&&t.isScoped){var r=this.hostStyleMap.get(e);if(r){var n=resolveValues(getActiveSelectors(e,this.hostScopeMap,this.globalScopes));r.textContent=executeTemplate(t.template,n);}}},e.prototype.updateGlobal=function(){updateGlobalScopes(this.globalScopes);},e.prototype.registerHostTemplate=function(e,t,r){var n=this.scopesMap.get(t);return n||((n=parseCSS(e)).scopeId=t,n.isScoped=r,this.scopesMap.set(t,n)),n},e}();!function(e){!e||e.__cssshim||e.CSS&&e.CSS.supports&&e.CSS.supports("color","var(--c)")||(e.__cssshim=new CustomStyle(e,e.document));}("undefined"!=typeof window&&window);