pushfeedback 0.0.2 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/feedback-button_2.cjs.entry.js +28 -21
- package/dist/cjs/{index-cb138587.js → index-df770657.js} +18 -107
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/pushfeedback.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/feedback-button/feedback-button.css +13 -10
- package/dist/collection/components/feedback-button/feedback-button.js +53 -19
- package/dist/collection/components/feedback-modal/feedback-modal.css +29 -21
- package/dist/collection/components/feedback-modal/feedback-modal.js +8 -4
- package/dist/components/feedback-button.js +20 -16
- package/dist/components/feedback-modal2.js +9 -5
- package/dist/esm/feedback-button_2.entry.js +28 -21
- package/dist/esm/{index-a9d8de87.js → index-0ae29483.js} +18 -107
- package/dist/esm/loader.js +3 -3
- package/dist/esm/pushfeedback.js +3 -3
- package/dist/pushfeedback/p-60079923.js +2 -0
- package/dist/pushfeedback/p-b4e69248.entry.js +1 -0
- package/dist/pushfeedback/pushfeedback.css +1 -1
- package/dist/pushfeedback/pushfeedback.esm.js +1 -1
- package/dist/types/components/feedback-button/feedback-button.d.ts +5 -3
- package/dist/types/components/feedback-modal/feedback-modal.d.ts +1 -0
- package/dist/types/components.d.ts +4 -0
- package/package.json +1 -1
- package/dist/pushfeedback/p-327ea768.entry.js +0 -1
- package/dist/pushfeedback/p-6aedd58b.js +0 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,h as e,H as o}from"./p-60079923.js";const n=class{constructor(e){t(this,e),this.modalTitle="Share your feedback",this.successModalTitle="Thanks for your feedback!",this.errorModalTitle="Oops! We didn't receive your feedback. Please try again later.",this.modalPosition="center",this.sendButtonText="Send",this.project="",this.screenshotButtonTooltipText="Take a Screenshot",this.screenshotTopbarText="SELECT AN ELEMENT ON THE PAGE",this.email="",this.emailPlaceholder="Email address (optional)",this.messagePlaceholder="How could this page be more helpful?",this.buttonStyle="default",this.buttonPosition="default"}connectedCallback(){this.feedbackModal=document.createElement("feedback-modal"),["modalTitle","successModalTitle","errorModalTitle","modalPosition","sendButtonText","project","screenshotButtonTooltipText","screenshotTopbarText","email","emailPlaceholder","messagePlaceholder"].forEach((t=>{this.feedbackModal[t]=this[t]})),document.body.appendChild(this.feedbackModal)}disconnectedCallback(){document.body.removeChild(this.feedbackModal)}showModal(){this.feedbackModal.showModal=!0}render(){return e(o,null,e("a",{class:`feedback-button-content feedback-button-content--${this.buttonStyle} feedback-button-content--${this.buttonStyle}`,onClick:()=>this.showModal()},e("slot",null)))}};n.style=".feedback-button-content{cursor:pointer}.feedback-button-content--light{background-color:var(--feedback-white-color);border:1px solid var(--feedback-light-color);border-radius:4px;color:var(--feedback-dark-color);padding:5px 10px;font-size:var(--feedback-text-font-size)}.feedback-button-content--light:hover{color:var(--feedback-primary-color);background-color:var(--feedback-secondary-color);border:1px solid var(--feedback-primary-color)}";var r,i,a=(r=function(t){!function(){var e=function(){return{escape:function(t){return t.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1")},parseExtension:e,mimeType:function(t){var o,n;return(o="application/font-woff",n="image/jpeg",{woff:o,woff2:o,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:n,jpeg:n,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml"})[e(t).toLowerCase()]||""},dataAsUrl:function(t,e){return"data:"+e+";base64,"+t},isDataUrl:function(t){return-1!==t.search(/^(data:)/)},canvasToBlob:function(t){return t.toBlob?new Promise((function(e){t.toBlob(e)})):function(t){return new Promise((function(e){for(var o=window.atob(t.toDataURL().split(",")[1]),n=o.length,r=new Uint8Array(n),i=0;i<n;i++)r[i]=o.charCodeAt(i);e(new Blob([r],{type:"image/png"}))}))}(t)},resolveUrl:function(t,e){var o=document.implementation.createHTMLDocument(),n=o.createElement("base");o.head.appendChild(n);var r=o.createElement("a");return o.body.appendChild(r),n.href=e,r.href=t,r.href},getAndEncode:function(t){return s.impl.options.cacheBust&&(t+=(/\?/.test(t)?"&":"?")+(new Date).getTime()),new Promise((function(e){var o,n=new XMLHttpRequest;if(n.onreadystatechange=function(){if(4===n.readyState)if(200===n.status){var r=new FileReader;r.onloadend=function(){var t=r.result.split(/,/)[1];e(t)},r.readAsDataURL(n.response)}else o?e(o):i("cannot fetch resource: "+t+", status: "+n.status)},n.ontimeout=function(){o?e(o):i("timeout of 30000ms occured while fetching resource: "+t)},n.responseType="blob",n.timeout=3e4,n.open("GET",t,!0),n.send(),s.impl.options.imagePlaceholder){var r=s.impl.options.imagePlaceholder.split(/,/);r&&r[1]&&(o=r[1])}function i(t){console.error(t),e("")}}))},uid:(t=0,function(){return"u"+("0000"+(Math.random()*Math.pow(36,4)<<0).toString(36)).slice(-4)+t++}),delay:function(t){return function(e){return new Promise((function(o){setTimeout((function(){o(e)}),t)}))}},asArray:function(t){for(var e=[],o=t.length,n=0;n<o;n++)e.push(t[n]);return e},escapeXhtml:function(t){return t.replace(/#/g,"%23").replace(/\n/g,"%0A")},makeImage:function(t){return new Promise((function(e,o){var n=new Image;n.onload=function(){e(n)},n.onerror=o,n.src=t}))},width:function(t){var e=o(t,"border-left-width"),n=o(t,"border-right-width");return t.scrollWidth+e+n},height:function(t){var e=o(t,"border-top-width"),n=o(t,"border-bottom-width");return t.scrollHeight+e+n}};var t;function e(t){var e=/\.([^\.\/]*?)$/g.exec(t);return e?e[1]:""}function o(t,e){var o=window.getComputedStyle(t).getPropertyValue(e);return parseFloat(o.replace("px",""))}}(),o=function(){var t=/url\(['"]?([^'"]+?)['"]?\)/g;return{inlineAll:function(t,e,i){return o(t)?Promise.resolve(t).then(n).then((function(o){var n=Promise.resolve(t);return o.forEach((function(t){n=n.then((function(o){return r(o,t,e,i)}))})),n})):Promise.resolve(t)},shouldProcess:o,impl:{readUrls:n,inline:r}};function o(e){return-1!==e.search(t)}function n(o){for(var n,r=[];null!==(n=t.exec(o));)r.push(n[1]);return r.filter((function(t){return!e.isDataUrl(t)}))}function r(t,o,n,r){return Promise.resolve(o).then((function(t){return n?e.resolveUrl(t,n):t})).then(r||e.getAndEncode).then((function(t){return e.dataAsUrl(t,e.mimeType(o))})).then((function(n){return t.replace(function(t){return new RegExp("(url\\(['\"]?)("+e.escape(t)+")(['\"]?\\))","g")}(o),"$1"+n+"$3")}))}}(),n=function(){return{resolveAll:function(){return t().then((function(t){return Promise.all(t.map((function(t){return t.resolve()})))})).then((function(t){return t.join("\n")}))},impl:{readAll:t}};function t(){return Promise.resolve(e.asArray(document.styleSheets)).then((function(t){var o=[];return t.forEach((function(t){try{e.asArray(t.cssRules||[]).forEach(o.push.bind(o))}catch(e){console.log("Error while reading CSS rules from "+t.href,e.toString())}})),o})).then((function(t){return t.filter((function(t){return t.type===CSSRule.FONT_FACE_RULE})).filter((function(t){return o.shouldProcess(t.style.getPropertyValue("src"))}))})).then((function(e){return e.map(t)}));function t(t){return{resolve:function(){return o.inlineAll(t.cssText,(t.parentStyleSheet||{}).href)},src:function(){return t.style.getPropertyValue("src")}}}}}(),r=function(){return{inlineAll:function n(r){return r instanceof Element?function(t){var e=t.style.getPropertyValue("background");return e?o.inlineAll(e).then((function(e){t.style.setProperty("background",e,t.style.getPropertyPriority("background"))})).then((function(){return t})):Promise.resolve(t)}(r).then((function(){return r instanceof HTMLImageElement?t(r).inline():Promise.all(e.asArray(r.childNodes).map((function(t){return n(t)})))})):Promise.resolve(r)},impl:{newImage:t}};function t(t){return{inline:function(o){return e.isDataUrl(t.src)?Promise.resolve():Promise.resolve(t.src).then(o||e.getAndEncode).then((function(o){return e.dataAsUrl(o,e.mimeType(t.src))})).then((function(e){return new Promise((function(o,n){t.onload=o,t.onerror=n,t.src=e}))}))}}}}(),i=void 0,a=!1,s={toSvg:c,toPng:function(t,e){return d(t,e||{}).then((function(t){return t.toDataURL()}))},toJpeg:function(t,e){return d(t,e=e||{}).then((function(t){return t.toDataURL("image/jpeg",e.quality||1)}))},toBlob:function(t,o){return d(t,o||{}).then(e.canvasToBlob)},toPixelData:function(t,o){return d(t,o||{}).then((function(o){return o.getContext("2d").getImageData(0,0,e.width(t),e.height(t)).data}))},impl:{fontFaces:n,images:r,util:e,inliner:o,options:{}}};function c(t,o){return function(t){s.impl.options.imagePlaceholder=void 0===t.imagePlaceholder?i:t.imagePlaceholder,s.impl.options.cacheBust=void 0===t.cacheBust?a:t.cacheBust}(o=o||{}),Promise.resolve(t).then((function(t){return l(t,o.filter,!0)})).then(f).then(u).then((function(t){return o.bgcolor&&(t.style.backgroundColor=o.bgcolor),o.width&&(t.style.width=o.width+"px"),o.height&&(t.style.height=o.height+"px"),o.style&&Object.keys(o.style).forEach((function(e){t.style[e]=o.style[e]})),t})).then((function(n){return function(t,o,n){return Promise.resolve(t).then((function(t){return t.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),(new XMLSerializer).serializeToString(t)})).then(e.escapeXhtml).then((function(t){return'<foreignObject x="0" y="0" width="100%" height="100%">'+t+"</foreignObject>"})).then((function(t){return'<svg xmlns="http://www.w3.org/2000/svg" width="'+o+'" height="'+n+'">'+t+"</svg>"})).then((function(t){return"data:image/svg+xml;charset=utf-8,"+t}))}(n,o.width||e.width(t),o.height||e.height(t))}))}function d(t,o){return c(t,o).then(e.makeImage).then(e.delay(100)).then((function(n){var r=function(t){var n=document.createElement("canvas");if(n.width=o.width||e.width(t),n.height=o.height||e.height(t),o.bgcolor){var r=n.getContext("2d");r.fillStyle=o.bgcolor,r.fillRect(0,0,n.width,n.height)}return n}(t);return r.getContext("2d").drawImage(n,0,0),r}))}function l(t,o,n){return n||!o||o(t)?Promise.resolve(t).then((function(t){return t instanceof HTMLCanvasElement?e.makeImage(t.toDataURL()):t.cloneNode(!1)})).then((function(n){return function(t,o,n){var r=t.childNodes;return 0===r.length?Promise.resolve(o):function(t,e,o){var n=Promise.resolve();return e.forEach((function(e){n=n.then((function(){return l(e,o)})).then((function(e){e&&t.appendChild(e)}))})),n}(o,e.asArray(r),n).then((function(){return o}))}(t,n,o)})).then((function(o){return function(t,o){return o instanceof Element?Promise.resolve().then((function(){n=window.getComputedStyle(t),r=o.style,n.cssText?r.cssText=n.cssText:function(t,o){e.asArray(t).forEach((function(e){o.setProperty(e,t.getPropertyValue(e),t.getPropertyPriority(e))}))}(n,r);var n,r})).then((function(){[":before",":after"].forEach((function(n){!function(n){var r=window.getComputedStyle(t,n),i=r.getPropertyValue("content");if(""!==i&&"none"!==i){var a=e.uid();o.className=o.className+" "+a;var s=document.createElement("style");s.appendChild(function(t,o,n){var r="."+t+":"+o,i=n.cssText?a(n):s(n);return document.createTextNode(r+"{"+i+"}");function a(t){var e=t.getPropertyValue("content");return t.cssText+" content: "+e+";"}function s(t){return e.asArray(t).map(o).join("; ")+";";function o(e){return e+": "+t.getPropertyValue(e)+(t.getPropertyPriority(e)?" !important":"")}}}(a,n,r)),o.appendChild(s)}}(n)}))})).then((function(){t instanceof HTMLTextAreaElement&&(o.innerHTML=t.value),t instanceof HTMLInputElement&&o.setAttribute("value",t.value)})).then((function(){o instanceof SVGElement&&(o.setAttribute("xmlns","http://www.w3.org/2000/svg"),o instanceof SVGRectElement&&["width","height"].forEach((function(t){var e=o.getAttribute(t);e&&o.style.setProperty(t,e)})))})).then((function(){return o})):o}(t,o)})):Promise.resolve()}function f(t){return n.resolveAll().then((function(e){var o=document.createElement("style");return t.appendChild(o),o.appendChild(document.createTextNode(e)),t}))}function u(t){return r.inlineAll(t).then((function(){return t}))}t.exports=s}()},r(i={path:undefined,exports:{},require:function(){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}()}}),i.exports);const s=class{constructor(e){t(this,e),this.handleSubmit=async t=>{t.preventDefault(),this.resetOverflow(),this.showScreenshotMode=!1,this.showModal=!1,this.sending=!0;let e="";this.encodedScreenshot&&await this.encodedScreenshot.then((t=>{e=t})).catch((t=>{console.log(t)}));try{200===(await fetch("https://app.pushfeedback.com/api/feedback/",{method:"POST",body:JSON.stringify({url:window.location.href,message:this.formMessage,email:this.formEmail,project:this.project,screenshot:e}),headers:{"Content-Type":"application/json"}})).status?(this.formSuccess=!0,this.formError=!1):(this.formSuccess=!1,this.formError=!0)}catch(t){this.formSuccess=!1,this.formError=!0}finally{this.sending=!1,this.showModal=!0}},this.close=()=>{this.sending=!1,this.showModal=!1,this.showScreenshotMode=!1,this.hasSelectedElement=!1,this.encodedScreenshot=null,this.formSuccess=!1,this.formError=!1,this.formMessage="",this.formEmail="",this.resetOverflow()},this.openScreenShot=()=>{this.hasSelectedElement=!1,this.showModal=!1,this.showScreenshotMode=!0,this.encodedScreenshot=null,this.resetOverflow()},this.closeScreenShot=()=>{this.showModal=!1,this.showScreenshotMode=!1,this.hasSelectedElement=!1,this.encodedScreenshot=null,this.overlay.style.display="none",this.resetOverflow()},this.handleMouseOverScreenShot=t=>{if(t.preventDefault(),this.hasSelectedElement)return;this.overlay.style.display="none",this.screenshotModal.style.display="none";const e=document.elementFromPoint(t.clientX,t.clientY).getBoundingClientRect();this.screenshotModal.style.display="",this.elementSelected.style.position="absolute",this.elementSelected.style.left=`${e.left}px`,this.elementSelected.style.top=`${e.top}px`,this.elementSelected.style.width=`${e.width}px`,this.elementSelected.style.height=`${e.height}px`,this.elementSelected.classList.add("feedback-modal-element-hover"),this.topSide.style.position="absolute",this.topSide.style.left=`${e.left}px`,this.topSide.style.top="0px",this.topSide.style.width=`${e.width+8}px`,this.topSide.style.height=`${e.top}px`,this.topSide.style.backgroundColor="rgba(0, 0, 0, 0.3)",this.leftSide.style.position="absolute",this.leftSide.style.left="0px",this.leftSide.style.top="0px",this.leftSide.style.width=`${e.left}px`,this.leftSide.style.height="100vh",this.leftSide.style.backgroundColor="rgba(0, 0, 0, 0.3)",this.bottomSide.style.position="absolute",this.bottomSide.style.left=`${e.left}px`,this.bottomSide.style.top=`${e.bottom+8}px`,this.bottomSide.style.width=`${e.width+8}px`,this.bottomSide.style.height="100vh",this.bottomSide.style.backgroundColor="rgba(0, 0, 0, 0.3)",this.rightSide.style.position="absolute",this.rightSide.style.left=`${e.right+8}px`,this.rightSide.style.top="0px",this.rightSide.style.width="100%",this.rightSide.style.height="100vh",this.rightSide.style.backgroundColor="rgba(0, 0, 0, 0.3)",this.screenshotModal.style.backgroundColor="transparent"},this.handleMouseClickedSelectedElement=t=>{t.preventDefault(),this.elementSelected&&this.elementSelected.classList.add("feedback-modal-element-selected");let e=this.elementSelected.getBoundingClientRect().top;this.elementSelected.style.top=`${e+window.pageYOffset}px`;const o=this.elementSelected.cloneNode(!0);document.body.appendChild(o),this.elementSelected.style.top=`${e}px`,this.encodedScreenshot=a.toPng(document.body,{cacheBust:!0}).then((function(t){return document.body.removeChild(o),t})).catch((function(t){return console.error("oops, something went wrong!",t),""})),document.getElementsByTagName("html")[0].style.overflow="hidden",this.hasSelectedElement=!0,this.overlay.style.display="block",this.showModal=!0},this.sending=!1,this.formMessage="",this.formEmail="",this.formSuccess=!1,this.formError=!1,this.encodedScreenshot=void 0,this.modalTitle="Share your feedback",this.successModalTitle="Thanks for your feedback!",this.errorModalTitle="Oops! We didn't receive your feedback. Please try again later.",this.modalPosition="center",this.sendButtonText="Send",this.project="",this.screenshotButtonTooltipText="Take a Screenshot",this.screenshotTopbarText="SELECT AN ELEMENT ON THE PAGE",this.email="",this.emailPlaceholder="Email address (optional)",this.messagePlaceholder="How could this page be more helpful?",this.showModal=!1,this.showScreenshotMode=!1,this.hasSelectedElement=!1}componentWillLoad(){this.formEmail=this.email}resetOverflow(){document.getElementsByTagName("html")[0].style.overflow="inherit"}handleMessageInput(t){this.formMessage=t.target.value}handleEmailInput(t){this.formEmail=t.target.value}render(){return e("div",{class:"feedback-modal-wrapper"},this.showScreenshotMode&&e("div",{class:"feedback-modal-screenshot",ref:t=>this.screenshotModal=t,onMouseMove:this.handleMouseOverScreenShot},e("div",{class:"feedback-modal-screenshot-element-selected",ref:t=>this.elementSelected=t,onClick:this.handleMouseClickedSelectedElement}),e("div",{class:"top-side",ref:t=>this.topSide=t}),e("div",{class:"left-side",ref:t=>this.leftSide=t}),e("div",{class:"bottom-side",ref:t=>this.bottomSide=t}),e("div",{class:"right-side",ref:t=>this.rightSide=t}),e("div",{class:"feedback-modal-screenshot-header",onClick:this.closeScreenShot},e("span",null,this.screenshotTopbarText),e("span",{class:"feedback-modal-screenshot-close"},e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"#fff","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"feather feather-x"},e("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),e("line",{x1:"6",y1:"6",x2:"18",y2:"18"})))),e("div",{class:"feedback-modal-screenshot-overlay",ref:t=>this.overlay=t})),this.showModal&&e("div",{class:`feedback-modal-content feedback-modal-content--${this.modalPosition}`,ref:t=>this.modalContent=t},e("div",{class:"feedback-modal-header"},this.formSuccess||this.formError?this.formSuccess?e("span",{class:"text-center"},this.successModalTitle):this.formError?e("span",{class:"text-center"},this.errorModalTitle):e("span",null):e("span",null,this.modalTitle),e("button",{class:"feedback-modal-close",onClick:this.close},e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"#ccc","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"feather feather-x"},e("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),e("line",{x1:"6",y1:"6",x2:"18",y2:"18"})))),e("div",{class:"feedback-modal-body"},this.formSuccess||this.formError?e("span",null):e("form",{onSubmit:this.handleSubmit},e("div",{class:"feedback-modal-text"},e("textarea",{placeholder:this.messagePlaceholder,value:this.formMessage,onInput:t=>this.handleMessageInput(t),required:!0})),!this.email&&e("div",{class:"feedback-modal-email"},e("input",{type:"email",placeholder:this.emailPlaceholder,onInput:t=>this.handleEmailInput(t),value:this.formEmail})),e("div",{class:"feedback-modal-buttons"},e("button",{type:"button",class:"button"+(this.encodedScreenshot?" active":""),title:this.screenshotButtonTooltipText,onClick:this.openScreenShot,disabled:this.sending},e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"feather feather-camera"},e("path",{d:"M23 19a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4l2-3h6l2 3h4a2 2 0 0 1 2 2z"}),e("circle",{cx:"12",cy:"13",r:"4"}))),e("button",{class:"button",type:"submit",disabled:this.sending},this.sendButtonText)))),e("div",{class:"feedback-modal-footer"},e("div",{class:"feedback-logo"},e("svg",{class:"w-8 h-8",viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg"},e("defs",null,e("radialGradient",{cx:"21.152%",cy:"86.063%",fx:"21.152%",fy:"86.063%",r:"79.941%",id:"footer-logo"},e("stop",{"stop-color":"#4FD1C5",offset:"0%"}),e("stop",{"stop-color":"#81E6D9",offset:"25.871%"}),e("stop",{"stop-color":"#338CF5",offset:"100%"}))),e("rect",{width:"32",height:"32",rx:"16",fill:"url(#footer-logo)","fill-rule":"nonzero"}))," ",e("a",{href:"https://pushfeedback.com"},"PushFeedback")))))}};s.style=".text-center{text-align:center;flex-grow: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;font-family:var(--feedback-modal-content-font-family);max-width:300px;padding:20px;position:fixed;width:100%;z-index:300;left:50%;top:50%;transform:translate(-50%, -50%)}@media screen and (min-width: 768px){.feedback-modal-content.feedback-modal-content--bottom-right{top:initial;left:initial;transform:initial;bottom:var(--feedback-modal-content-position-bottom);right:var(--feedback-modal-content-position-right)}.feedback-modal-content.feedback-modal-content--bottom-left{top:initial;transform:initial;bottom:var(--feedback-modal-content-position-bottom);left:var(--feedback-modal-content-position-left)}.feedback-modal-content.feedback-modal-content--top-right{top:initial;transform:initial;right:var(--feedback-modal-content-position-right);top:var(--fedback-modal-content-position-top)}.feedback-modal-content.feedback-modal-content--top-left{transform:initial;left:var(--feedback-modal-content-position-left);top:var(--fedback-modal-content-position-top)}}.feedback-modal-header{align-items:center;color:var(--feedback-modal-header-text-color);font-family:var(--feedback-modal-header-font-family);display:flex;font-size:var(--feedback-header-font-size);justify-content:space-between;margin-bottom:20px}.feedback-modal-text{margin-bottom:20px}.feedback-modal-text textarea{border:1px solid var(--feedback-modal-input-border-color);border-radius:4px;box-sizing:border-box;font-family:var(--feedback-modal-content-font-family);font-size:var(--feedback-modal-input-font-size);height:100px;padding:10px;resize:none;width:100%}.feedback-modal-email{margin-bottom:20px}.feedback-modal-email input{border:1px solid var(--feedback-modal-input-border-color);border-radius:4px;box-sizing:border-box;font-family:var(--feedback-modal-content-font-family);font-size:var(--feedback-modal-input-font-size);height:40px;padding:10px;width:100%}.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;justify-content:space-between}.button{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;font-size:var(--feedback-modal-button-font-size);padding:5px 10px}.button:hover,.button.active{color:var(--feedback-modal-button-text-color-active);background-color:var(--feedback-modal-button-bg-color-active);border:1px solid var(--feedback-modal-button-border-color-active)}.feedback-modal-footer{font-size:12px;margin-top:5px 0;text-align:center}.feedback-modal-footer a{color:#191919;text-decoration:none}.feedback-logo{display:flex;align-items:center;justify-content:center;margin-top:5px}.feedback-logo svg{max-width:12px;margin-right:5px}.feedback-modal-close{background-color:var(--feedback-modal-close-bg-color);border:0;border-radius:50%;cursor:pointer;margin-left:auto;padding:0;width:24px;height:24px}.feedback-modal-screenshot{background-color:var(--feedback-modal-screenshot-bg-color);box-shadow:0px 0px 0px 5px var(--feedback-modal-screenshot-element-selected-bg-color) inset;height:100vh;left:0;position:fixed;top:0;width:100%;z-index:100}.feedback-modal-screenshot-header{align-items:center;background-color:var(--feedback-modal-screenshot-header-bg-color);color:var(--feedback-modal-screenshot-element-selected-text-color);cursor:pointer;display:flex;padding:5px;position:fixed;justify-content:center;width:100%;z-index:200}.feedback-modal-screenshot-header span{padding-left:10px;padding-right:10px}.feedback-modal-screenshot-overlay{background-color:transparent;cursor:unset;height:100vh;left:0;position:fixed;top:0;width:100%;z-index:100}.feedback-modal-message{font-size:var(--fedback-modal-message-font-size)}.feedback-modal-element-hover{cursor:pointer;background-color:transparent;border:4px dashed var(--feedback-modal-screenshot-element-hover-border-color)}.feedback-modal-element-selected{border:4px solid var(--feedback-modal-screenshot-element-selected-border-color)}";export{n as feedback_button,s as feedback_modal}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{--feedback-primary-color:#0070F4;--feedback-secondary-color:#fbfbfb;--feedback-light-color:#ccc;--feedback-dark-color:#191919;--feedback-text-color:#5f6368;--feedback-white-color:#fff;--feedback-font-family:"Tahoma", "sans-serif";--feedback-heading-font-size:16px;--feedback-text-font-size:14px;--feedback-
|
|
1
|
+
:root{--feedback-primary-color:#0070F4;--feedback-secondary-color:#fbfbfb;--feedback-light-color:#ccc;--feedback-dark-color:#191919;--feedback-text-color:#5f6368;--feedback-white-color:#fff;--feedback-font-family:"Tahoma", "sans-serif";--feedback-heading-font-size:16px;--feedback-text-font-size:14px;--feedback-modal-content-bg-color:var(--feedback-white-color);--feedback-modal-content-border-color:var(--feedback-light-color);--feedback-modal-content-font-family:var(--feedback-font-family);--feedback-modal-content-text-color:var(--feedback-text-color);--feedback-modal-content-border-radius:8px;--feedback-modal-content-position-top:25px;--feedback-modal-content-position-bottom:25px;--feedback-modal-content-position-right:20px;--feedback-modal-content-position-left:20px;--feedback-modal-header-text-color:var(--feedback-dark-color);--feedback-modal-header-font-size:var(--feedback-header-font-size);--feedback-modal-header-font-family:var(--feedback-font-family);--feedback-modal-input-font-size:var(--feedback-text-font-size);--feedback-modal-button-font-size:var(--feedback-text-font-size);--fedback-modal-message-font-size:var(--feedback-text-font-size);--feedback-modal-button-bg-color:var(--feedback-white-color);--feedback-modal-button-bg-color-active:var(--feedback-secondary-color);--feedback-modal-button-text-color:var(--feedback-dark-color);--feedback-modal-button-text-color-active:var(--feedback-primary-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-input-border-color:var(--feedback-light-color);--feedback-modal-input-border-color-focused:var(--feedback-primary-color);--feedback-modal-input-border-radius:4px;--feedback-modal-close-bg-color:var(--feedback-white-color);--feedback-modal-screenshot-bg-color:rgba(0, 0, 0, 0.3);--feedback-modal-screenshot-element-hover-border-color:var(--feedback-primary-color);--feedback-modal-screenshot-element-selected-bg-color:var(--feedback-primary-color);--feedback-modal-screenshot-element-selected-text-color:var(--feedback-white-color);--feedback-modal-screenshot-element-selected-border-color:var(--feedback-primary-color);--feedback-modal-screenshot-header-bg-color:var(--feedback-primary-color)}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,b as
|
|
1
|
+
import{p as e,b as t}from"./p-60079923.js";export{s as setNonce}from"./p-60079923.js";(()=>{const t=import.meta.url,o={};return""!==t&&(o.resourcesUrl=new URL(".",t).href),e(o)})().then((e=>t([["p-b4e69248",[[1,"feedback-button",{modalTitle:[1,"modal-title"],successModalTitle:[1,"success-modal-title"],errorModalTitle:[1,"error-modal-title"],modalPosition:[1,"modal-position"],sendButtonText:[1,"send-button-text"],project:[1],screenshotButtonTooltipText:[1,"screenshot-button-tooltip-text"],screenshotTopbarText:[1,"screenshot-topbar-text"],email:[1],emailPlaceholder:[1,"email-placeholder"],messagePlaceholder:[1,"message-placeholder"],buttonStyle:[1,"button-style"],buttonPosition:[1,"button-position"]}],[1,"feedback-modal",{modalTitle:[1,"modal-title"],successModalTitle:[1,"success-modal-title"],errorModalTitle:[1,"error-modal-title"],modalPosition:[1,"modal-position"],sendButtonText:[1,"send-button-text"],project:[1],screenshotButtonTooltipText:[1,"screenshot-button-tooltip-text"],screenshotTopbarText:[1,"screenshot-topbar-text"],email:[1],emailPlaceholder:[1,"email-placeholder"],messagePlaceholder:[1,"message-placeholder"],showModal:[1540,"show-modal"],showScreenshotMode:[1540,"show-screenshot-mode"],hasSelectedElement:[1540,"has-selected-element"],sending:[32],formMessage:[32],formEmail:[32],formSuccess:[32],formError:[32],encodedScreenshot:[32]}]]]],e)));
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { FeedbackModal } from '../feedback-modal/feedback-modal';
|
|
2
1
|
export declare class FeedbackButton {
|
|
3
|
-
feedbackModal:
|
|
2
|
+
feedbackModal: any;
|
|
4
3
|
modalTitle: string;
|
|
5
4
|
successModalTitle: string;
|
|
6
5
|
errorModalTitle: string;
|
|
@@ -12,7 +11,10 @@ export declare class FeedbackButton {
|
|
|
12
11
|
email: string;
|
|
13
12
|
emailPlaceholder: string;
|
|
14
13
|
messagePlaceholder: string;
|
|
15
|
-
|
|
14
|
+
buttonStyle: string;
|
|
15
|
+
buttonPosition: string;
|
|
16
|
+
connectedCallback(): void;
|
|
17
|
+
disconnectedCallback(): void;
|
|
16
18
|
showModal(): void;
|
|
17
19
|
render(): any;
|
|
18
20
|
}
|
|
@@ -28,6 +28,7 @@ export declare class FeedbackModal {
|
|
|
28
28
|
bottomSide: HTMLElement;
|
|
29
29
|
rightSide: HTMLElement;
|
|
30
30
|
componentWillLoad(): void;
|
|
31
|
+
resetOverflow(): void;
|
|
31
32
|
handleMessageInput(event: Event): void;
|
|
32
33
|
handleEmailInput(event: Event): void;
|
|
33
34
|
handleSubmit: (event: Event) => Promise<void>;
|
|
@@ -7,6 +7,8 @@
|
|
|
7
7
|
import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime";
|
|
8
8
|
export namespace Components {
|
|
9
9
|
interface FeedbackButton {
|
|
10
|
+
"buttonPosition": string;
|
|
11
|
+
"buttonStyle": string;
|
|
10
12
|
"email": string;
|
|
11
13
|
"emailPlaceholder": string;
|
|
12
14
|
"errorModalTitle": string;
|
|
@@ -56,6 +58,8 @@ declare global {
|
|
|
56
58
|
}
|
|
57
59
|
declare namespace LocalJSX {
|
|
58
60
|
interface FeedbackButton {
|
|
61
|
+
"buttonPosition"?: string;
|
|
62
|
+
"buttonStyle"?: string;
|
|
59
63
|
"email"?: string;
|
|
60
64
|
"emailPlaceholder"?: string;
|
|
61
65
|
"errorModalTitle"?: string;
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e,h as t,H as o}from"./p-6aedd58b.js";const n=class{constructor(t){e(this,t),this.feedbackModal=void 0,this.modalTitle="Share your feedback",this.successModalTitle="Thanks for your feedback!",this.errorModalTitle="Oops! We didn't receive your feedback. Please try again later.",this.modalPosition="center",this.sendButtonText="Send",this.project="",this.screenshotButtonTooltipText="Take a Screenshot",this.screenshotTopbarText="SELECT AN ELEMENT ON THE PAGE",this.email="",this.emailPlaceholder="Email address (optional)",this.messagePlaceholder="How could this page be more helpful?"}componentDidLoad(){this.feedbackModal.showModal=!1}showModal(){this.feedbackModal.showModal=!0}render(){let e={};return["modalTitle","successModalTitle","errorModalTitle","modalPosition","sendButtonText","project","screenshotButtonTooltipText","screenshotTopbarText","email","emailPlaceholder","messagePlaceholder","showModal"].forEach((t=>{e[t]=this[t]})),t(o,null,t("a",{class:"feedback-button-content",onClick:()=>this.showModal()},t("slot",null)),t("feedback-modal",Object.assign({},e,{ref:e=>this.feedbackModal=e})))}};n.style=".feedback-button-content{cursor:pointer;background-color:var(--feedback-button-bg-color);border:1px solid var(--feedback-button-border-color);border-radius:var(--feedback-button-border-radius);color:var(--feedback-button-text-color);cursor:pointer;font-size:var(--feedback-modal-button-font-size);padding:5px 10px}.feedback-button-content:hover{color:var(--feedback-button-text-color-active);background-color:var(--feedback-button-bg-color-active);border:1px solid var(--feedback-button-border-color-active)}";var r,i,a=(r=function(e){!function(){var t=function(){return{escape:function(e){return e.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1")},parseExtension:t,mimeType:function(e){var o,n;return(o="application/font-woff",n="image/jpeg",{woff:o,woff2:o,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:n,jpeg:n,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml"})[t(e).toLowerCase()]||""},dataAsUrl:function(e,t){return"data:"+t+";base64,"+e},isDataUrl:function(e){return-1!==e.search(/^(data:)/)},canvasToBlob:function(e){return e.toBlob?new Promise((function(t){e.toBlob(t)})):function(e){return new Promise((function(t){for(var o=window.atob(e.toDataURL().split(",")[1]),n=o.length,r=new Uint8Array(n),i=0;i<n;i++)r[i]=o.charCodeAt(i);t(new Blob([r],{type:"image/png"}))}))}(e)},resolveUrl:function(e,t){var o=document.implementation.createHTMLDocument(),n=o.createElement("base");o.head.appendChild(n);var r=o.createElement("a");return o.body.appendChild(r),n.href=t,r.href=e,r.href},getAndEncode:function(e){return s.impl.options.cacheBust&&(e+=(/\?/.test(e)?"&":"?")+(new Date).getTime()),new Promise((function(t){var o,n=new XMLHttpRequest;if(n.onreadystatechange=function(){if(4===n.readyState)if(200===n.status){var r=new FileReader;r.onloadend=function(){var e=r.result.split(/,/)[1];t(e)},r.readAsDataURL(n.response)}else o?t(o):i("cannot fetch resource: "+e+", status: "+n.status)},n.ontimeout=function(){o?t(o):i("timeout of 30000ms occured while fetching resource: "+e)},n.responseType="blob",n.timeout=3e4,n.open("GET",e,!0),n.send(),s.impl.options.imagePlaceholder){var r=s.impl.options.imagePlaceholder.split(/,/);r&&r[1]&&(o=r[1])}function i(e){console.error(e),t("")}}))},uid:(e=0,function(){return"u"+("0000"+(Math.random()*Math.pow(36,4)<<0).toString(36)).slice(-4)+e++}),delay:function(e){return function(t){return new Promise((function(o){setTimeout((function(){o(t)}),e)}))}},asArray:function(e){for(var t=[],o=e.length,n=0;n<o;n++)t.push(e[n]);return t},escapeXhtml:function(e){return e.replace(/#/g,"%23").replace(/\n/g,"%0A")},makeImage:function(e){return new Promise((function(t,o){var n=new Image;n.onload=function(){t(n)},n.onerror=o,n.src=e}))},width:function(e){var t=o(e,"border-left-width"),n=o(e,"border-right-width");return e.scrollWidth+t+n},height:function(e){var t=o(e,"border-top-width"),n=o(e,"border-bottom-width");return e.scrollHeight+t+n}};var e;function t(e){var t=/\.([^\.\/]*?)$/g.exec(e);return t?t[1]:""}function o(e,t){var o=window.getComputedStyle(e).getPropertyValue(t);return parseFloat(o.replace("px",""))}}(),o=function(){var e=/url\(['"]?([^'"]+?)['"]?\)/g;return{inlineAll:function(e,t,i){return o(e)?Promise.resolve(e).then(n).then((function(o){var n=Promise.resolve(e);return o.forEach((function(e){n=n.then((function(o){return r(o,e,t,i)}))})),n})):Promise.resolve(e)},shouldProcess:o,impl:{readUrls:n,inline:r}};function o(t){return-1!==t.search(e)}function n(o){for(var n,r=[];null!==(n=e.exec(o));)r.push(n[1]);return r.filter((function(e){return!t.isDataUrl(e)}))}function r(e,o,n,r){return Promise.resolve(o).then((function(e){return n?t.resolveUrl(e,n):e})).then(r||t.getAndEncode).then((function(e){return t.dataAsUrl(e,t.mimeType(o))})).then((function(n){return e.replace(function(e){return new RegExp("(url\\(['\"]?)("+t.escape(e)+")(['\"]?\\))","g")}(o),"$1"+n+"$3")}))}}(),n=function(){return{resolveAll:function(){return e().then((function(e){return Promise.all(e.map((function(e){return e.resolve()})))})).then((function(e){return e.join("\n")}))},impl:{readAll:e}};function e(){return Promise.resolve(t.asArray(document.styleSheets)).then((function(e){var o=[];return e.forEach((function(e){try{t.asArray(e.cssRules||[]).forEach(o.push.bind(o))}catch(t){console.log("Error while reading CSS rules from "+e.href,t.toString())}})),o})).then((function(e){return e.filter((function(e){return e.type===CSSRule.FONT_FACE_RULE})).filter((function(e){return o.shouldProcess(e.style.getPropertyValue("src"))}))})).then((function(t){return t.map(e)}));function e(e){return{resolve:function(){return o.inlineAll(e.cssText,(e.parentStyleSheet||{}).href)},src:function(){return e.style.getPropertyValue("src")}}}}}(),r=function(){return{inlineAll:function n(r){return r instanceof Element?function(e){var t=e.style.getPropertyValue("background");return t?o.inlineAll(t).then((function(t){e.style.setProperty("background",t,e.style.getPropertyPriority("background"))})).then((function(){return e})):Promise.resolve(e)}(r).then((function(){return r instanceof HTMLImageElement?e(r).inline():Promise.all(t.asArray(r.childNodes).map((function(e){return n(e)})))})):Promise.resolve(r)},impl:{newImage:e}};function e(e){return{inline:function(o){return t.isDataUrl(e.src)?Promise.resolve():Promise.resolve(e.src).then(o||t.getAndEncode).then((function(o){return t.dataAsUrl(o,t.mimeType(e.src))})).then((function(t){return new Promise((function(o,n){e.onload=o,e.onerror=n,e.src=t}))}))}}}}(),i=void 0,a=!1,s={toSvg:c,toPng:function(e,t){return d(e,t||{}).then((function(e){return e.toDataURL()}))},toJpeg:function(e,t){return d(e,t=t||{}).then((function(e){return e.toDataURL("image/jpeg",t.quality||1)}))},toBlob:function(e,o){return d(e,o||{}).then(t.canvasToBlob)},toPixelData:function(e,o){return d(e,o||{}).then((function(o){return o.getContext("2d").getImageData(0,0,t.width(e),t.height(e)).data}))},impl:{fontFaces:n,images:r,util:t,inliner:o,options:{}}};function c(e,o){return function(e){s.impl.options.imagePlaceholder=void 0===e.imagePlaceholder?i:e.imagePlaceholder,s.impl.options.cacheBust=void 0===e.cacheBust?a:e.cacheBust}(o=o||{}),Promise.resolve(e).then((function(e){return l(e,o.filter,!0)})).then(u).then(f).then((function(e){return o.bgcolor&&(e.style.backgroundColor=o.bgcolor),o.width&&(e.style.width=o.width+"px"),o.height&&(e.style.height=o.height+"px"),o.style&&Object.keys(o.style).forEach((function(t){e.style[t]=o.style[t]})),e})).then((function(n){return function(e,o,n){return Promise.resolve(e).then((function(e){return e.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),(new XMLSerializer).serializeToString(e)})).then(t.escapeXhtml).then((function(e){return'<foreignObject x="0" y="0" width="100%" height="100%">'+e+"</foreignObject>"})).then((function(e){return'<svg xmlns="http://www.w3.org/2000/svg" width="'+o+'" height="'+n+'">'+e+"</svg>"})).then((function(e){return"data:image/svg+xml;charset=utf-8,"+e}))}(n,o.width||t.width(e),o.height||t.height(e))}))}function d(e,o){return c(e,o).then(t.makeImage).then(t.delay(100)).then((function(n){var r=function(e){var n=document.createElement("canvas");if(n.width=o.width||t.width(e),n.height=o.height||t.height(e),o.bgcolor){var r=n.getContext("2d");r.fillStyle=o.bgcolor,r.fillRect(0,0,n.width,n.height)}return n}(e);return r.getContext("2d").drawImage(n,0,0),r}))}function l(e,o,n){return n||!o||o(e)?Promise.resolve(e).then((function(e){return e instanceof HTMLCanvasElement?t.makeImage(e.toDataURL()):e.cloneNode(!1)})).then((function(n){return function(e,o,n){var r=e.childNodes;return 0===r.length?Promise.resolve(o):function(e,t,o){var n=Promise.resolve();return t.forEach((function(t){n=n.then((function(){return l(t,o)})).then((function(t){t&&e.appendChild(t)}))})),n}(o,t.asArray(r),n).then((function(){return o}))}(e,n,o)})).then((function(o){return function(e,o){return o instanceof Element?Promise.resolve().then((function(){n=window.getComputedStyle(e),r=o.style,n.cssText?r.cssText=n.cssText:function(e,o){t.asArray(e).forEach((function(t){o.setProperty(t,e.getPropertyValue(t),e.getPropertyPriority(t))}))}(n,r);var n,r})).then((function(){[":before",":after"].forEach((function(n){!function(n){var r=window.getComputedStyle(e,n),i=r.getPropertyValue("content");if(""!==i&&"none"!==i){var a=t.uid();o.className=o.className+" "+a;var s=document.createElement("style");s.appendChild(function(e,o,n){var r="."+e+":"+o,i=n.cssText?a(n):s(n);return document.createTextNode(r+"{"+i+"}");function a(e){var t=e.getPropertyValue("content");return e.cssText+" content: "+t+";"}function s(e){return t.asArray(e).map(o).join("; ")+";";function o(t){return t+": "+e.getPropertyValue(t)+(e.getPropertyPriority(t)?" !important":"")}}}(a,n,r)),o.appendChild(s)}}(n)}))})).then((function(){e instanceof HTMLTextAreaElement&&(o.innerHTML=e.value),e instanceof HTMLInputElement&&o.setAttribute("value",e.value)})).then((function(){o instanceof SVGElement&&(o.setAttribute("xmlns","http://www.w3.org/2000/svg"),o instanceof SVGRectElement&&["width","height"].forEach((function(e){var t=o.getAttribute(e);t&&o.style.setProperty(e,t)})))})).then((function(){return o})):o}(e,o)})):Promise.resolve()}function u(e){return n.resolveAll().then((function(t){var o=document.createElement("style");return e.appendChild(o),o.appendChild(document.createTextNode(t)),e}))}function f(e){return r.inlineAll(e).then((function(){return e}))}e.exports=s}()},r(i={path:undefined,exports:{},require:function(){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}()}}),i.exports);const s=class{constructor(t){e(this,t),this.handleSubmit=async e=>{e.preventDefault(),this.showScreenshotMode=!1,this.showModal=!1,this.sending=!0;let t="";this.encodedScreenshot&&await this.encodedScreenshot.then((e=>{t=e})).catch((e=>{console.log(e)}));try{200===(await fetch("https://app.pushfeedback.com/api/feedback/",{method:"POST",body:JSON.stringify({url:window.location.href,message:this.formMessage,email:this.formEmail,project:this.project,screenshot:t}),headers:{"Content-Type":"application/json"}})).status?(this.formSuccess=!0,this.formError=!1):(this.formSuccess=!1,this.formError=!0)}catch(e){this.formSuccess=!1,this.formError=!0}finally{this.sending=!1,this.showModal=!0}},this.close=()=>{this.sending=!1,this.showModal=!1,this.showScreenshotMode=!1,this.hasSelectedElement=!1,this.encodedScreenshot=null,this.formSuccess=!1,this.formError=!1,this.formMessage="",this.formEmail=""},this.openScreenShot=()=>{this.hasSelectedElement=!1,this.showModal=!1,this.showScreenshotMode=!0,this.encodedScreenshot=null,document.getElementsByTagName("html")[0].style.overflow="auto"},this.closeScreenShot=()=>{this.showModal=!1,this.showScreenshotMode=!1,this.hasSelectedElement=!1,this.encodedScreenshot=null,this.overlay.style.display="none",document.getElementsByTagName("html")[0].style.overflow="inherit"},this.handleMouseOverScreenShot=e=>{if(e.preventDefault(),this.hasSelectedElement)return;this.overlay.style.display="none",this.screenshotModal.style.display="none";const t=document.elementFromPoint(e.clientX,e.clientY).getBoundingClientRect();this.screenshotModal.style.display="",this.elementSelected.style.position="absolute",this.elementSelected.style.left=`${t.left}px`,this.elementSelected.style.top=`${t.top}px`,this.elementSelected.style.width=`${t.width}px`,this.elementSelected.style.height=`${t.height}px`,this.elementSelected.classList.add("feedback-modal-element-hover"),this.topSide.style.position="absolute",this.topSide.style.left=`${t.left}px`,this.topSide.style.top="0px",this.topSide.style.width=`${t.width+8}px`,this.topSide.style.height=`${t.top}px`,this.topSide.style.backgroundColor="rgba(0, 0, 0, 0.3)",this.leftSide.style.position="absolute",this.leftSide.style.left="0px",this.leftSide.style.top="0px",this.leftSide.style.width=`${t.left}px`,this.leftSide.style.height="100vh",this.leftSide.style.backgroundColor="rgba(0, 0, 0, 0.3)",this.bottomSide.style.position="absolute",this.bottomSide.style.left=`${t.left}px`,this.bottomSide.style.top=`${t.bottom+8}px`,this.bottomSide.style.width=`${t.width+8}px`,this.bottomSide.style.height="100vh",this.bottomSide.style.backgroundColor="rgba(0, 0, 0, 0.3)",this.rightSide.style.position="absolute",this.rightSide.style.left=`${t.right+8}px`,this.rightSide.style.top="0px",this.rightSide.style.width="100%",this.rightSide.style.height="100vh",this.rightSide.style.backgroundColor="rgba(0, 0, 0, 0.3)",this.screenshotModal.style.backgroundColor="transparent"},this.handleMouseClickedSelectedElement=e=>{e.preventDefault(),this.elementSelected&&this.elementSelected.classList.add("feedback-modal-element-selected");let t=this.elementSelected.getBoundingClientRect().top;this.elementSelected.style.top=`${t+window.pageYOffset}px`;const o=this.elementSelected.cloneNode(!0);document.body.appendChild(o),this.elementSelected.style.top=`${t}px`,this.encodedScreenshot=a.toPng(document.body,{cacheBust:!0}).then((function(e){return document.body.removeChild(o),e})).catch((function(e){return console.error("oops, something went wrong!",e),""})),document.getElementsByTagName("html")[0].style.overflow="hidden",this.hasSelectedElement=!0,this.overlay.style.display="block",this.showModal=!0},this.sending=!1,this.formMessage="",this.formEmail="",this.formSuccess=!1,this.formError=!1,this.encodedScreenshot=void 0,this.modalTitle="Share your feedback",this.successModalTitle="Thanks for your feedback!",this.errorModalTitle="Oops! We didn't receive your feedback. Please try again later.",this.modalPosition="center",this.sendButtonText="Send",this.project="",this.screenshotButtonTooltipText="Take a Screenshot",this.screenshotTopbarText="SELECT AN ELEMENT ON THE PAGE",this.email="",this.emailPlaceholder="Email address (optional)",this.messagePlaceholder="How could this page be more helpful?",this.showModal=!1,this.showScreenshotMode=!1,this.hasSelectedElement=!1}componentWillLoad(){this.formEmail=this.email}handleMessageInput(e){this.formMessage=e.target.value}handleEmailInput(e){this.formEmail=e.target.value}render(){return t("div",{class:"feedback-modal-wrapper"},this.showScreenshotMode&&t("div",{class:"feedback-modal-screenshot",ref:e=>this.screenshotModal=e,onMouseMove:this.handleMouseOverScreenShot},t("div",{class:"feedback-modal-screenshot-element-selected",ref:e=>this.elementSelected=e,onClick:this.handleMouseClickedSelectedElement}),t("div",{class:"top-side",ref:e=>this.topSide=e}),t("div",{class:"left-side",ref:e=>this.leftSide=e}),t("div",{class:"bottom-side",ref:e=>this.bottomSide=e}),t("div",{class:"right-side",ref:e=>this.rightSide=e}),t("div",{class:"feedback-modal-screenshot-header",onClick:this.closeScreenShot},t("span",null,this.screenshotTopbarText),t("span",{class:"feedback-modal-screenshot-close"},t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"#fff","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"feather feather-x"},t("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),t("line",{x1:"6",y1:"6",x2:"18",y2:"18"})))),t("div",{class:"feedback-modal-screenshot-overlay",ref:e=>this.overlay=e})),this.showModal&&t("div",{class:`feedback-modal-content feedback-modal-content--${this.modalPosition}`,ref:e=>this.modalContent=e},t("div",{class:"feedback-modal-header"},this.formSuccess||this.formError?this.formSuccess?t("span",{class:"text-center"},this.successModalTitle):this.formError?t("span",{class:"text-center"},this.errorModalTitle):t("span",null):t("span",null,this.modalTitle),t("button",{class:"feedback-modal-close",onClick:this.close},t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"#ccc","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"feather feather-x"},t("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),t("line",{x1:"6",y1:"6",x2:"18",y2:"18"})))),t("div",{class:"feedback-modal-body"},this.formSuccess||this.formError?t("span",null):t("form",{onSubmit:this.handleSubmit},t("div",{class:"feedback-modal-text"},t("textarea",{placeholder:this.messagePlaceholder,value:this.formMessage,onInput:e=>this.handleMessageInput(e),required:!0})),!this.email&&t("div",{class:"feedback-modal-email"},t("input",{type:"email",placeholder:this.emailPlaceholder,onInput:e=>this.handleEmailInput(e),value:this.formEmail})),t("div",{class:"feedback-modal-buttons"},t("button",{type:"button",class:"button"+(this.encodedScreenshot?" active":""),title:this.screenshotButtonTooltipText,onClick:this.openScreenShot,disabled:this.sending},t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"feather feather-camera"},t("path",{d:"M23 19a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4l2-3h6l2 3h4a2 2 0 0 1 2 2z"}),t("circle",{cx:"12",cy:"13",r:"4"}))),t("button",{class:"button",type:"submit",disabled:this.sending},this.sendButtonText)))),t("div",{class:"feedback-modal-footer"},t("div",{class:"feedback-logo"},t("svg",{class:"w-8 h-8",viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg"},t("defs",null,t("radialGradient",{cx:"21.152%",cy:"86.063%",fx:"21.152%",fy:"86.063%",r:"79.941%",id:"footer-logo"},t("stop",{"stop-color":"#4FD1C5",offset:"0%"}),t("stop",{"stop-color":"#81E6D9",offset:"25.871%"}),t("stop",{"stop-color":"#338CF5",offset:"100%"}))),t("rect",{width:"32",height:"32",rx:"16",fill:"url(#footer-logo)","fill-rule":"nonzero"}))," ",t("a",{href:"https://pushfeedback.com"},"PushFeedback")))))}};s.style=".text-center{text-align:center;flex-grow: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;font-family:var(--feedback-modal-content-font-family);max-width:300px;padding:20px;position:fixed;width:100%;z-index:300}.feedback-modal-content.feedback-modal-content--center{left:50%;top:50%;transform:translate(-50%, -50%)}.feedback-modal-content.feedback-modal-content--bottom-right{bottom:var(--feedback-modal-content-position-bottom);right:var(--feedback-modal-content-position-right)}.feedback-modal-content.feedback-modal-content--bottom-left{bottom:var(--feedback-modal-content-position-bottom);left:var(--feedback-modal-content-position-left)}.feedback-modal-content.feedback-modal-content--top-right{right:var(--feedback-modal-content-position-right);top:var(--fedback-modal-content-position-top)}.feedback-modal-content.feedback-modal-content--top-left{left:var(--feedback-modal-content-position-left);top:var(--fedback-modal-content-position-top)}.feedback-modal-header{align-items:center;color:var(--feedback-modal-header-text-color);font-family:var(--feedback-modal-header-font-family);display:flex;font-size:var(--feedback-header-font-size);justify-content:space-between;margin-bottom:20px}.feedback-modal-text{margin-bottom:20px}.feedback-modal-text textarea{border:1px solid var(--feedback-modal-input-border-color);border-radius:4px;box-sizing:border-box;font-family:var(--feedback-modal-content-font-family);font-size:var(--feedback-modal-input-font-size);height:100px;padding:10px;resize:none;width:100%}.feedback-modal-email{margin-bottom:20px}.feedback-modal-email input{border:1px solid var(--feedback-modal-input-border-color);border-radius:4px;box-sizing:border-box;font-family:var(--feedback-modal-content-font-family);font-size:var(--feedback-modal-input-font-size);height:40px;padding:10px;width:100%}.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;justify-content:space-between}.button{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;font-size:var(--feedback-modal-button-font-size);padding:5px 10px}.button:hover,.button.active{color:var(--feedback-modal-button-text-color-active);background-color:var(--feedback-modal-button-bg-color-active);border:1px solid var(--feedback-modal-button-border-color-active)}.feedback-modal-footer{font-size:12px;margin-top:5px 0;text-align:center}.feedback-modal-footer a{color:#191919;text-decoration:none}.feedback-logo{display:flex;align-items:center;justify-content:center;margin-top:5px}.feedback-logo svg{max-width:12px;margin-right:5px}.feedback-modal-close{background-color:var(--feedback-modal-close-bg-color);border:0;border-radius:50%;cursor:pointer;margin-left:auto;padding:0;width:24px;height:24px}.feedback-modal-screenshot{background-color:var(--feedback-modal-screenshot-bg-color);box-shadow:0px 0px 0px 5px var(--feedback-modal-screenshot-element-selected-bg-color) inset;height:100vh;left:0;position:fixed;top:0;width:100%;z-index:100}.feedback-modal-screenshot-header{align-items:center;background-color:var(--feedback-modal-screenshot-header-bg-color);color:var(--feedback-modal-screenshot-element-selected-text-color);cursor:pointer;display:flex;padding:5px;position:fixed;justify-content:center;width:100%;z-index:200}.feedback-modal-screenshot-header span{padding-left:10px;padding-right:10px}.feedback-modal-screenshot-overlay{background-color:transparent;cursor:unset;height:100vh;left:0;position:fixed;top:0;width:100%;z-index:100}.feedback-modal-message{font-size:var(--fedback-modal-message-font-size)}.feedback-modal-element-hover{cursor:pointer;background-color:transparent;border:4px dashed var(--feedback-modal-screenshot-element-hover-border-color)}.feedback-modal-element-selected{border:4px solid var(--feedback-modal-screenshot-element-selected-border-color)}";export{n as feedback_button,s as feedback_modal}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
let e,n,t=!1,l=!1;const s="http://www.w3.org/1999/xlink",o={},i=e=>"object"==(e=typeof e)||"function"===e;function r(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,o=!1,r=!1;const c=[],f=n=>{for(let t=0;t<n.length;t++)l=n[t],Array.isArray(l)?f(l):null!=l&&"boolean"!=typeof l&&((o="function"!=typeof e&&!i(l))&&(l+=""),o&&r?c[c.length-1].t+=l:c.push(o?u(null,l):l),r=o)};if(f(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 a=u(e,null);return a.l=n,c.length>0&&(a.o=c),a.i=s,a},u=(e,n)=>({u:0,h:e,t:n,p:null,o:null,l:null,i:null}),f={},a=new WeakMap,d=e=>"sc-"+e.$,h=(e,n,t,l,o,r)=>{if(t!==l){let c=D(e,n),u=n.toLowerCase();if("class"===n){const n=e.classList,s=$(t),o=$(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 f=i(l);if((c||f&&null!==l)&&!o)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){}let a=!1;u!==(u=u.replace(/^xlink\:?/,""))&&(n=u,a=!0),null==l||!1===l?!1===l&&""!==e.getAttribute(n)||(a?e.removeAttributeNS(s,n):e.removeAttribute(n)):(!c||4&r||o)&&!f&&(l=!0===l?"":l,a?e.setAttributeNS(s,n,l):e.setAttribute(n,l))}else n="-"===n[2]?n.slice(3):D(B,u)?u.slice(2):u[2]+n.slice(3),t&&I.rel(e,n,t,!1),l&&I.ael(e,n,l,!1)}},p=/\s/,$=e=>e?e.split(p):[],y=(e,n,t,l)=>{const s=11===n.p.nodeType&&n.p.host?n.p.host:n.p,i=e&&e.l||o,r=n.l||o;for(l in i)l in r||h(s,l,i[l],void 0,t,n.u);for(l in r)h(s,l,i[l],r[l],t,n.u)},m=(n,l,s)=>{const o=l.o[s];let i,r,c=0;if(null!==o.t)i=o.p=G.createTextNode(o.t);else{if(t||(t="svg"===o.h),i=o.p=G.createElementNS(t?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",o.h),t&&"foreignObject"===o.h&&(t=!1),y(null,o,t),null!=e&&i["s-si"]!==e&&i.classList.add(i["s-si"]=e),o.o)for(c=0;c<o.o.length;++c)r=m(n,o,c),r&&i.appendChild(r);"svg"===o.h?t=!1:"foreignObject"===i.tagName&&(t=!0)}return i},w=(e,t,l,s,o,i)=>{let r,c=e;for(c.shadowRoot&&c.tagName===n&&(c=c.shadowRoot);o<=i;++o)s[o]&&(r=m(null,l,o),r&&(s[o].p=r,c.insertBefore(r,t)))},b=(e,n,t,l,s)=>{for(;n<=t;++n)(l=e[n])&&(s=l.p,S(l),s.remove())},v=(e,n)=>e.h===n.h&&e.i===n.i,g=(e,n)=>{const l=n.p=e.p,s=e.o,o=n.o,i=n.h,r=n.t;null===r?(t="svg"===i||"foreignObject"!==i&&t,"slot"===i||y(e,n,t),null!==s&&null!==o?((e,n,t,l)=>{let s,o,i=0,r=0,c=0,u=0,f=n.length-1,a=n[0],d=n[f],h=l.length-1,p=l[0],$=l[h];for(;i<=f&&r<=h;)if(null==a)a=n[++i];else if(null==d)d=n[--f];else if(null==p)p=l[++r];else if(null==$)$=l[--h];else if(v(a,p))g(a,p),a=n[++i],p=l[++r];else if(v(d,$))g(d,$),d=n[--f],$=l[--h];else if(v(a,$))g(a,$),e.insertBefore(a.p,d.p.nextSibling),a=n[++i],$=l[--h];else if(v(d,p))g(d,p),e.insertBefore(d.p,a.p),d=n[--f],p=l[++r];else{for(c=-1,u=i;u<=f;++u)if(n[u]&&null!==n[u].i&&n[u].i===p.i){c=u;break}c>=0?(o=n[c],o.h!==p.h?s=m(n&&n[r],t,c):(g(o,p),n[c]=void 0,s=o.p),p=l[++r]):(s=m(n&&n[r],t,r),p=l[++r]),s&&a.p.parentNode.insertBefore(s,a.p)}i>f?w(e,null==l[h+1]?null:l[h+1].p,t,l,r,h):r>h&&b(n,i,f)})(l,s,n,o):null!==o?(null!==e.t&&(l.textContent=""),w(l,null,n,o,0,o.length-1)):null!==s&&b(s,0,s.length-1),t&&"svg"===i&&(t=!1)):e.t!==r&&(l.data=r)},S=e=>{e.l&&e.l.ref&&e.l.ref(null),e.o&&e.o.map(S)},j=(e,n)=>{n&&!e.m&&n["s-p"]&&n["s-p"].push(new Promise((n=>e.m=n)))},k=(e,n)=>{if(e.u|=16,!(4&e.u))return j(e,e.v),te((()=>O(e,n)));e.u|=512},O=(e,n)=>{const t=e.g;let l;return n&&(l=P(t,"componentWillLoad")),E(l,(()=>M(e,t,n)))},M=async(e,n,t)=>{const l=e.S,s=l["s-rc"];t&&(e=>{const n=e.j,t=e.S,l=n.u,s=((e,n)=>{var t;let l=d(n);const s=z.get(l);if(e=11===e.nodeType?e:G,s)if("string"==typeof s){let n,o=a.get(e=e.head||e);if(o||a.set(e,o=new Set),!o.has(l)){{n=G.createElement("style"),n.innerHTML=s;const l=null!==(t=I.k)&&void 0!==t?t:r(G);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=()=>C(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.S,o=t.j,i=t.O||u(null,null),r=(e=>e&&e.h===f)(l)?l:c(null,null,l);n=s.tagName,o.M&&(r.l=r.l||{},o.M.map((([e,n])=>r.l[n]=s[e]))),r.h=null,r.u|=4,t.O=r,r.p=i.p=s.shadowRoot||s,e=s["s-sc"],g(i,r)})(t,l)}catch(e){F(e,t.S)}return null},C=e=>{const n=e.S,t=e.g,l=e.v;64&e.u||(e.u|=64,N(n),P(t,"componentDidLoad"),e.C(n),l||L()),e.m&&(e.m(),e.m=void 0),512&e.u&&ne((()=>k(e,!1))),e.u&=-517},L=()=>{N(G.documentElement),ne((()=>(e=>{const n=I.ce("appload",{detail:{namespace:"pushfeedback"}});return e.dispatchEvent(n),n})(B)))},P=(e,n,t)=>{if(e&&e[n])try{return e[n](t)}catch(e){F(e)}},E=(e,n)=>e&&e.then?e.then(n):n(),N=e=>e.classList.add("hydrated"),T=(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)=>R(this).P.get(n))(0,e)},set(t){((e,n,t,l)=>{const s=R(e),o=s.P.get(n),r=s.u,c=s.g;t=((e,n)=>null==e||i(e)?e:4&n?"false"!==e&&(""===e||!!e):1&n?e+"":e)(t,l.L[n][0]),8&r&&void 0!==o||t===o||Number.isNaN(o)&&Number.isNaN(t)||(s.P.set(n,t),c&&2==(18&r)&&k(s,!1))})(this,e,t,n)},configurable:!0,enumerable:!0})})),1&t){const t=new Map;s.attributeChangedCallback=function(e,n,l){I.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.M.push([e,s]),s}))}}return e},W=(e,n={})=>{var t;const l=[],s=n.exclude||[],o=B.customElements,i=G.head,c=i.querySelector("meta[charset]"),u=G.createElement("style"),f=[];let a,h=!0;Object.assign(I,n),I.N=new URL(n.resourcesUrl||"./",G.baseURI).href,e.map((e=>{e[1].map((n=>{const t={u:n[0],$:n[1],L:n[2],T:n[3]};t.L=n[2],t.M=[];const i=t.$,r=class extends HTMLElement{constructor(e){super(e),q(e=this,t),1&t.u&&e.attachShadow({mode:"open"})}connectedCallback(){a&&(clearTimeout(a),a=null),h?f.push(this):I.jmp((()=>(e=>{if(0==(1&I.u)){const n=R(e),t=n.j,l=()=>{};if(!(1&n.u)){n.u|=1;{let t=e;for(;t=t.parentNode||t.host;)if(t["s-p"]){j(n,n.v=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=_(t)).then){const e=()=>{};s=await s,e()}s.isProxied||(T(s,t,2),s.isProxied=!0);const e=()=>{};n.u|=8;try{new s(n)}catch(e){F(e)}n.u&=-9,e()}if(s.style){let e=s.style;const n=d(t);if(!z.has(n)){const l=()=>{};((e,n,t)=>{let l=z.get(e);K&&t?(l=l||new CSSStyleSheet,"string"==typeof l?l=n:l.replaceSync(n)):l=n,z.set(e,l)})(n,e,!!(1&t.u)),l()}}}const o=n.v,i=()=>k(n,!0);o&&o["s-rc"]?o["s-rc"].push(i):i()})(0,n,t)}l()}})(this)))}disconnectedCallback(){I.jmp((()=>{}))}componentOnReady(){return R(this).W}};t.A=e[0],s.includes(i)||o.get(i)||(l.push(i),o.define(i,T(r,t,1)))}))}));{u.innerHTML=l+"{visibility:hidden}.hydrated{visibility:inherit}",u.setAttribute("data-styles","");const e=null!==(t=I.k)&&void 0!==t?t:r(G);null!=e&&u.setAttribute("nonce",e),i.insertBefore(u,c?c.nextSibling:i.firstChild)}h=!1,f.length?f.map((e=>e.connectedCallback())):I.jmp((()=>a=setTimeout(L,30)))},A=e=>I.k=e,H=new WeakMap,R=e=>H.get(e),U=(e,n)=>H.set(n.g=e,n),q=(e,n)=>{const t={u:0,S:e,j:n,P:new Map};return t.W=new Promise((e=>t.C=e)),e["s-p"]=[],e["s-rc"]=[],H.set(e,t)},D=(e,n)=>n in e,F=(e,n)=>(0,console.error)(e,n),V=new Map,_=e=>{const n=e.$.replace(/-/g,"_"),t=e.A,l=V.get(t);return l?l[n]:import(`./${t}.entry.js`).then((e=>(V.set(t,e),e[n])),F)
|
|
2
|
-
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/},z=new Map,B="undefined"!=typeof window?window:{},G=B.document||{head:{}},I={u:0,N:"",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)},J=e=>Promise.resolve(e),K=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(e){}return!1})(),Q=[],X=[],Y=(e,n)=>t=>{e.push(t),l||(l=!0,n&&4&I.u?ne(ee):I.raf(ee))},Z=e=>{for(let n=0;n<e.length;n++)try{e[n](performance.now())}catch(e){F(e)}e.length=0},ee=()=>{Z(Q),Z(X),(l=Q.length>0)&&I.raf(ee)},ne=e=>J().then(e),te=Y(X,!0);export{f as H,W as b,c as h,J as p,U as r,A as s}
|