Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@speechly/browser-ui

Package Overview
Dependencies
Maintainers
6
Versions
55
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@speechly/browser-ui - npm Package Compare versions

Comparing version 5.1.0-beta.3 to 5.1.0-beta.4

2

core/intro-popup.js

@@ -1,2 +0,2 @@

!function(t){"function"==typeof define&&define.amd?define(t):t()}((function(){"use strict";function t(){}const e=t=>t;function n(t){return t()}function o(){return Object.create(null)}function i(t){t.forEach(n)}function r(t){return"function"==typeof t}function s(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}function c(t,e){return t!=t?e==e:t!==e}function l(t){return 0===Object.keys(t).length}const a="undefined"!=typeof window;let u=a?()=>window.performance.now():()=>Date.now(),d=a?t=>requestAnimationFrame(t):t;const p=new Set;function h(t){p.forEach((e=>{e.c(t)||(p.delete(e),e.f())})),0!==p.size&&d(h)}function f(t,e){t.appendChild(e)}function m(t){if(!t)return document;const e=t.getRootNode?t.getRootNode():t.ownerDocument;return e&&e.host?e:t.ownerDocument}function g(t,e){f(t.head||t,e)}function w(t,e,n){t.insertBefore(e,n||null)}function y(t){t.parentNode.removeChild(t)}function $(t){return document.createElement(t)}function b(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function v(t){return document.createTextNode(t)}function x(){return v(" ")}function _(){return v("")}function k(t,e,n,o){return t.addEventListener(e,n,o),()=>t.removeEventListener(e,n,o)}function C(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function z(t,e,n,o){t.style.setProperty(e,n,o?"important":"")}function E(t,e,n){t.classList[n?"add":"remove"](e)}function S(t){const e={};for(const n of t)e[n.name]=n.value;return e}const M=new Set;let T,N=0;function L(t,e,n,o,i,r,s,c=0){const l=16.666/o;let a="{\n";for(let t=0;t<=1;t+=l){const o=e+(n-e)*r(t);a+=100*t+`%{${s(o,1-o)}}\n`}const u=a+`100% {${s(n,1-n)}}\n}`,d=`__svelte_${function(t){let e=5381,n=t.length;for(;n--;)e=(e<<5)-e^t.charCodeAt(n);return e>>>0}(u)}_${c}`,p=m(t);M.add(p);const h=p.__svelte_stylesheet||(p.__svelte_stylesheet=function(t){const e=$("style");return g(m(t),e),e}(t).sheet),f=p.__svelte_rules||(p.__svelte_rules={});f[d]||(f[d]=!0,h.insertRule(`@keyframes ${d} ${u}`,h.cssRules.length));const w=t.style.animation||"";return t.style.animation=`${w?`${w}, `:""}${d} ${o}ms linear ${i}ms 1 both`,N+=1,d}function A(t,e){const n=(t.style.animation||"").split(", "),o=n.filter(e?t=>t.indexOf(e)<0:t=>-1===t.indexOf("__svelte")),i=n.length-o.length;i&&(t.style.animation=o.join(", "),N-=i,N||d((()=>{N||(M.forEach((t=>{const e=t.__svelte_stylesheet;let n=e.cssRules.length;for(;n--;)e.deleteRule(n);t.__svelte_rules={}})),M.clear())})))}function P(t){T=t}function D(){if(!T)throw new Error("Function called outside component initialization");return T}const R=[],j=[],B=[],H=[],F=Promise.resolve();let O=!1;function V(t){B.push(t)}let I=!1;const q=new Set;function G(){if(!I){I=!0;do{for(let t=0;t<R.length;t+=1){const e=R[t];P(e),W(e.$$)}for(P(null),R.length=0;j.length;)j.pop()();for(let t=0;t<B.length;t+=1){const e=B[t];q.has(e)||(q.add(e),e())}B.length=0}while(R.length);for(;H.length;)H.pop()();O=!1,I=!1,q.clear()}}function W(t){if(null!==t.fragment){t.update(),i(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(V)}}let U;function J(t,e,n){t.dispatchEvent(function(t,e,n=!1){const o=document.createEvent("CustomEvent");return o.initCustomEvent(t,n,!1,e),o}(`${e?"intro":"outro"}${n}`))}const K=new Set;let Q;function X(){Q={r:0,c:[],p:Q}}function Y(){Q.r||i(Q.c),Q=Q.p}function Z(t,e){t&&t.i&&(K.delete(t),t.i(e))}function tt(t,e,n,o){if(t&&t.o){if(K.has(t))return;K.add(t),Q.c.push((()=>{K.delete(t),o&&(n&&t.d(1),o())})),t.o(e)}}const et={duration:0};function nt(n,o,s,c){let l=o(n,s),a=c?0:1,f=null,m=null,g=null;function w(){g&&A(n,g)}function y(t,e){const n=t.b-a;return e*=Math.abs(n),{a:a,b:t.b,d:n,duration:e,start:t.start,end:t.start+e,group:t.group}}function $(o){const{delay:r=0,duration:s=300,easing:c=e,tick:$=t,css:b}=l||et,v={start:u()+r,b:o};o||(v.group=Q,Q.r+=1),f||m?m=v:(b&&(w(),g=L(n,a,o,s,r,c,b)),o&&$(0,1),f=y(v,s),V((()=>J(n,o,"start"))),function(t){let e;0===p.size&&d(h),new Promise((n=>{p.add(e={c:t,f:n})}))}((t=>{if(m&&t>m.start&&(f=y(m,s),m=null,J(n,f.b,"start"),b&&(w(),g=L(n,a,f.b,f.duration,0,c,l.css))),f)if(t>=f.end)$(a=f.b,1-a),J(n,f.b,"end"),m||(f.b?w():--f.group.r||i(f.group.c)),f=null;else if(t>=f.start){const e=t-f.start;a=f.a+f.d*c(e/f.duration),$(a,1-a)}return!(!f&&!m)})))}return{run(t){r(l)?(U||(U=Promise.resolve(),U.then((()=>{U=null}))),U).then((()=>{l=l(),$(t)})):$(t)},end(){w(),f=m=null}}}const ot="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function it(t){t&&t.c()}function rt(t,e,o,s){const{fragment:c,on_mount:l,on_destroy:a,after_update:u}=t.$$;c&&c.m(e,o),s||V((()=>{const e=l.map(n).filter(r);a?a.push(...e):i(e),t.$$.on_mount=[]})),u.forEach(V)}function st(t,e){const n=t.$$;null!==n.fragment&&(i(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function ct(t,e){-1===t.$$.dirty[0]&&(R.push(t),O||(O=!0,F.then(G)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function lt(e,n,r,s,c,l,a,u=[-1]){const d=T;P(e);const p=e.$$={fragment:null,ctx:null,props:l,update:t,not_equal:c,bound:o(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(n.context||(d?d.$$.context:[])),callbacks:o(),dirty:u,skip_bound:!1,root:n.target||d.$$.root};a&&a(p.root);let h=!1;if(p.ctx=r?r(e,n.props||{},((t,n,...o)=>{const i=o.length?o[0]:n;return p.ctx&&c(p.ctx[t],p.ctx[t]=i)&&(!p.skip_bound&&p.bound[t]&&p.bound[t](i),h&&ct(e,t)),n})):[],p.update(),h=!0,i(p.before_update),p.fragment=!!s&&s(p.ctx),n.target){if(n.hydrate){const t=function(t){return Array.from(t.childNodes)}(n.target);p.fragment&&p.fragment.l(t),t.forEach(y)}else p.fragment&&p.fragment.c();n.intro&&Z(e.$$.fragment),rt(e,n.target,n.anchor,n.customElement),G()}P(d)}let at;"function"==typeof HTMLElement&&(at=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){const{on_mount:t}=this.$$;this.$$.on_disconnect=t.map(n).filter(r);for(const t in this.$$.slotted)this.appendChild(this.$$.slotted[t])}attributeChangedCallback(t,e,n){this[t]=n}disconnectedCallback(){i(this.$$.on_disconnect)}$destroy(){st(this,1),this.$destroy=t}$on(t,e){const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{const t=n.indexOf(e);-1!==t&&n.splice(t,1)}}$set(t){this.$$set&&!l(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}});function ut(t,{delay:n=0,duration:o=400,easing:i=e}={}){const r=+getComputedStyle(t).opacity;return{delay:n,duration:o,easing:i,css:t=>"opacity: "+t*r}}var dt,pt,ht,ft,mt,gt;function wt(t){!function(t,e,n){const o=m(t);if(!o.getElementById(e)){const t=$("style");t.id=e,t.textContent=n,g(o,t)}}(t,"svelte-1djrpwt",".Icon.svelte-1djrpwt{position:absolute;width:var(--icon-size);height:var(--icon-size);top:50%;left:50%;transform:translate(-50%, -50%);pointer-events:none;transition:0.25s;opacity:var(--icon-opacity)}")}function yt(t){let e,n,o,i;return{c(){e=b("svg"),n=b("g"),o=b("path"),i=b("rect"),C(o,"d","M42 26h4v4c0 9.265-7 16.895-16 17.89V55h-4v-7.11c-8.892-.982-15.833-8.444-15.997-17.56L10 30v-4h4v4c0 7.732 6.268 14 14 14 7.628 0 13.83-6.1 13.997-13.687L42 30v-4z"),C(i,"x","20"),C(i,"y","1"),C(i,"width","16"),C(i,"height","37"),C(i,"rx","8"),C(n,"fill","var(--icon-color)"),C(n,"fill-rule","evenodd"),C(e,"class","Icon svelte-1djrpwt"),C(e,"viewBox","0 0 56 56"),C(e,"xmlns","http://www.w3.org/2000/svg")},m(t,r){w(t,e,r),f(e,n),f(n,o),f(n,i)},d(t){t&&y(e)}}}function $t(t){let e,n,o,i;return{c(){e=b("svg"),n=b("g"),o=b("path"),i=b("path"),C(o,"d","M42 26h4v4c0 9.265-7 16.895-16 17.89V55h-4v-7.11c-8.892-.982-15.833-8.444-15.997-17.56L10 30v-4h4v4c0 7.732 6.268 14 14 14 7.628 0 13.83-6.1 13.997-13.687L42 30v-4z"),C(o,"fill-rule","nonzero"),C(i,"d","M37 13.081V31a8 8 0 11-16 0v-1.919l16-16zM26 1a8 8 0 018 8v1.319L18 26.318V9a8 8 0 018-8zM37.969 7.932l3.74-7.35 3.018 2.625zM39.654 10.608l7.531-3.359.695 3.94z"),C(n,"fill","var(--icon-color)"),C(n,"fill-rule","evenodd"),C(e,"class","Icon svelte-1djrpwt"),C(e,"viewBox","0 0 56 56"),C(e,"xmlns","http://www.w3.org/2000/svg")},m(t,r){w(t,e,r),f(e,n),f(n,o),f(n,i)},d(t){t&&y(e)}}}function bt(t){let e,n,o,i;return{c(){e=b("svg"),n=b("g"),o=b("path"),i=b("path"),C(o,"d","M36 14.828V30a8 8 0 01-15.961.79l15.96-15.962zM28 1a8 8 0 018 8v.172L20 25.173V9a8 8 0 018-8z"),C(i,"d","M42 26h4v4c0 9.265-7 16.895-16 17.89V55h-4v-7.11c-8.892-.982-15.833-8.444-15.997-17.56L10 30v-4h4v4c0 7.732 6.268 14 14 14 7.628 0 13.83-6.1 13.997-13.687L42 30v-4z"),C(n,"fill","var(--icon-color)"),C(n,"fill-rule","nonzero"),C(e,"class","Icon svelte-1djrpwt"),C(e,"viewBox","0 0 56 56"),C(e,"xmlns","http://www.w3.org/2000/svg")},m(t,r){w(t,e,r),f(e,n),f(n,o),f(n,i)},d(t){t&&y(e)}}}function vt(e){let n,o,i,r=e[0]===ft.Mic&&yt(),s=e[0]===ft.Error&&$t(),c=e[0]===ft.Denied&&bt();return{c(){r&&r.c(),n=x(),s&&s.c(),o=x(),c&&c.c(),i=_()},m(t,e){r&&r.m(t,e),w(t,n,e),s&&s.m(t,e),w(t,o,e),c&&c.m(t,e),w(t,i,e)},p(t,[e]){t[0]===ft.Mic?r||(r=yt(),r.c(),r.m(n.parentNode,n)):r&&(r.d(1),r=null),t[0]===ft.Error?s||(s=$t(),s.c(),s.m(o.parentNode,o)):s&&(s.d(1),s=null),t[0]===ft.Denied?c||(c=bt(),c.c(),c.m(i.parentNode,i)):c&&(c.d(1),c=null)},i:t,o:t,d(t){r&&r.d(t),t&&y(n),s&&s.d(t),t&&y(o),c&&c.d(t),t&&y(i)}}}function xt(t,e,n){let{icon:o=ft.Mic}=e;return t.$$set=t=>{"icon"in t&&n(0,o=t.icon)},[o]}!function(t){t[t.Failed=0]="Failed",t[t.NoBrowserSupport=1]="NoBrowserSupport",t[t.NoAudioConsent=2]="NoAudioConsent",t[t.Disconnected=3]="Disconnected",t[t.Disconnecting=4]="Disconnecting",t[t.Connecting=5]="Connecting",t[t.Connected=6]="Connected",t[t.Starting=7]="Starting",t[t.Stopping=8]="Stopping",t[t.Recording=9]="Recording"}(dt||(dt={})),function(t){t.SpeechlyFirstConnect="SpeechlyFirstConnect"}(pt||(pt={})),function(t){t.speechlypoweron="speechlypoweron",t.holdstart="holdstart",t.holdend="holdend",t.speechlystarting="speechlystarting",t.speechstate="speechstate",t.initialized="initialized",t.speechsegment="speechsegment",t.speechhandled="speechhandled",t.showhint="showhint",t.transcriptdrawerhint="hint",t.speechlyintroready="speechlyintroready",t.speechlyintroclosed="speechlyintroclosed"}(ht||(ht={})),function(t){t.Mic="mic",t.Error="error",t.Denied="denied"}(ft||(ft={})),function(t){t.Hold="hold",t.Click="click",t.Noninteractive="noninteractive"}(mt||(mt={})),function(t){t.None="none",t.Connecting="connecting",t.Busy="busy"}(gt||(gt={})),dt.Disconnected,dt.Disconnecting,dt.Connecting,dt.Connected,dt.Starting,dt.Recording,dt.Stopping,dt.Failed,dt.NoBrowserSupport,dt.NoAudioConsent;class _t extends class{$destroy(){st(this,1),this.$destroy=t}$on(t,e){const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{const t=n.indexOf(e);-1!==t&&n.splice(t,1)}}$set(t){this.$$set&&!l(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}{constructor(t){super(),lt(this,t,xt,vt,s,{icon:0},wt)}}const{window:kt}=ot;function Ct(t){let e;return{c(){e=$("link"),C(e,"href","https://fonts.googleapis.com/css2?family=Saira+Condensed:wght@700&display=swap"),C(e,"rel","stylesheet")},m(t,n){w(t,e,n)},d(t){t&&y(e)}}}function zt(t){let e;return{c(){e=$("link"),C(e,"href",t[2]),C(e,"rel","stylesheet")},m(t,n){w(t,e,n)},p(t,n){4&n&&C(e,"href",t[2])},d(t){t&&y(e)}}}function Et(t){let e,n,o,i,r,s,c,l,a,u,d,p,h;const m=[At,Lt,Nt,Tt,Mt,St],g=[];function b(t,e){return t[3]===Dt?0:t[3]===Rt?1:t[3]===jt?2:t[3]===dt.NoAudioConsent?3:t[3]===dt.NoBrowserSupport?4:5}return s=b(t),c=g[s]=m[s](t),{c(){e=$("modalbg"),o=x(),i=$("modalcontent"),r=$("main"),c.c(),l=x(),a=$("footer"),a.innerHTML='Voice input is automatically transcribed by <a target="_new" href="https://speechly.com/">Speechly</a> and can be used to improve the quality of service under <a target="_new" href="https://www.speechly.com/privacy/terms-and-conditions">terms of use</a>.',C(i,"class",t[1]),E(i,"defaultTypography",t[6])},m(n,c){w(n,e,c),w(n,o,c),w(n,i,c),f(i,r),g[s].m(r,null),f(i,l),f(i,a),d=!0,p||(h=k(e,"click",t[8]),p=!0)},p(t,e){let n=s;s=b(t),s===n?g[s].p(t,e):(X(),tt(g[n],1,1,(()=>{g[n]=null})),Y(),c=g[s],c?c.p(t,e):(c=g[s]=m[s](t),c.c()),Z(c,1),c.m(r,null)),(!d||2&e)&&C(i,"class",t[1]),66&e&&E(i,"defaultTypography",t[6])},i(o){d||(V((()=>{n||(n=nt(e,t[7],{},!0)),n.run(1)})),Z(c),V((()=>{u||(u=nt(i,t[7],{},!0)),u.run(1)})),d=!0)},o(o){n||(n=nt(e,t[7],{},!1)),n.run(0),tt(c),u||(u=nt(i,t[7],{},!1)),u.run(0),d=!1},d(t){t&&y(e),t&&n&&n.end(),t&&y(o),t&&y(i),g[s].d(),t&&u&&u.end(),p=!1,h()}}}function St(e){let n,o,i,r,s,c,l,a,u,d,p;return{c(){n=$("h2"),n.textContent="Failed to connect Speechly",o=x(),i=$("p"),r=v("Please check that Speechly application id '"),s=v(e[4]),c=v("' has been successfully deployed."),l=x(),a=$("options"),u=$("button"),u.textContent="Aww, bummer",C(u,"class","wide")},m(t,h){w(t,n,h),w(t,o,h),w(t,i,h),f(i,r),f(i,s),f(i,c),w(t,l,h),w(t,a,h),f(a,u),d||(p=k(u,"click",e[8]),d=!0)},p(t,e){16&e&&function(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}(s,t[4])},i:t,o:t,d(t){t&&y(n),t&&y(o),t&&y(i),t&&y(l),t&&y(a),d=!1,p()}}}function Mt(e){let n,o,i,r,s,c,l,a;return{c(){n=$("h2"),n.textContent="Unsupported Browser",o=x(),i=$("p"),i.textContent="To use the voice interface, please visit this site using a supported\n browser.",r=x(),s=$("options"),c=$("button"),c.textContent="Got it",C(c,"class","wide")},m(t,u){w(t,n,u),w(t,o,u),w(t,i,u),w(t,r,u),w(t,s,u),f(s,c),l||(a=k(c,"click",e[8]),l=!0)},p:t,i:t,o:t,d(t){t&&y(n),t&&y(o),t&&y(i),t&&y(r),t&&y(s),l=!1,a()}}}function Tt(e){let n,o,r,s,c,l,a,u,d,p,h,m;return{c(){n=$("h2"),n.textContent="Voice unavailable",o=x(),r=$("p"),r.textContent="Please reload the page to try again.",s=x(),c=$("p"),c.textContent="If that doesn't work, check your browser preferences to re-allow microphone use.",l=x(),a=$("options"),u=$("button"),u.textContent="Later",d=x(),p=$("button"),p.textContent="Reload",C(u,"class","wide"),C(p,"class","wide primary")},m(t,i){w(t,n,i),w(t,o,i),w(t,r,i),w(t,s,i),w(t,c,i),w(t,l,i),w(t,a,i),f(a,u),f(a,d),f(a,p),h||(m=[k(u,"click",e[8]),k(p,"click",e[16])],h=!0)},p:t,i:t,o:t,d(t){t&&y(n),t&&y(o),t&&y(r),t&&y(s),t&&y(c),t&&y(l),t&&y(a),h=!1,i(m)}}}function Nt(e){let n,o,r,s,c,l,a,u,d,p;return{c(){n=$("h2"),n.textContent="HTTPS Required",o=x(),r=$("p"),r.textContent="To use the voice interface, please visit this site using the secure\n https:// protocol.",s=x(),c=$("options"),l=$("button"),l.textContent="Try with HTTPS",a=x(),u=$("button"),u.textContent="Later",C(l,"class","wide"),C(u,"class","wide")},m(t,i){w(t,n,i),w(t,o,i),w(t,r,i),w(t,s,i),w(t,c,i),f(c,l),f(c,a),f(c,u),d||(p=[k(l,"click",e[15]),k(u,"click",e[8])],d=!0)},p:t,i:t,o:t,d(t){t&&y(n),t&&y(o),t&&y(r),t&&y(s),t&&y(c),d=!1,i(p)}}}function Lt(e){let n,o,i,r,s,c,l,a,u,d,p,h,m,g,b,_;return u=new _t({}),{c(){n=$("h2"),n.innerHTML='↖ <slot name="prompt-title">Allow microphone</slot>',o=x(),i=$("p"),r=$("slot"),s=v("Please click "),c=$("b"),c.textContent="Allow",l=v(" to use the microphone.\n We'll only listen to you when you press the "),a=$("span"),it(u.$$.fragment),d=v(" button."),p=x(),h=$("options"),m=$("button"),m.textContent="Got it",z(a,"display","inline-block"),z(a,"position","relative"),z(a,"color","white"),z(a,"width","20px"),z(a,"height","10px"),z(a,"--icon-color","white"),z(a,"--icon-size","20px"),C(r,"name","prompt-body"),C(m,"class","wide")},m(t,y){w(t,n,y),w(t,o,y),w(t,i,y),f(i,r),f(r,s),f(r,c),f(r,l),f(r,a),rt(u,a,null),f(r,d),w(t,p,y),w(t,h,y),f(h,m),g=!0,b||(_=k(m,"click",e[8]),b=!0)},p:t,i(t){g||(Z(u.$$.fragment,t),g=!0)},o(t){tt(u.$$.fragment,t),g=!1},d(t){t&&y(n),t&&y(o),t&&y(i),st(u),t&&y(p),t&&y(h),b=!1,_()}}}function At(e){let n,o,r,s,c,l,a,u,d,p,h,m,g,b,_,E,S,M;return d=new _t({}),{c(){n=$("h2"),n.innerHTML='<slot name="prompt-title">Allow microphone</slot>',o=x(),r=$("p"),s=$("slot"),c=v("Please click "),l=$("b"),l.textContent="Allow",a=v(" to use the microphone.\n We'll only listen to you when you press the "),u=$("span"),it(d.$$.fragment),p=v(" button."),h=x(),m=$("options"),g=$("button"),g.textContent="Later",b=x(),_=$("button"),_.textContent="Allow",z(u,"display","inline-block"),z(u,"position","relative"),z(u,"color","white"),z(u,"width","20px"),z(u,"height","10px"),z(u,"--icon-color","white"),z(u,"--icon-size","20px"),C(s,"name","welcome-body"),C(g,"class","wide"),C(_,"class","wide primary")},m(t,i){w(t,n,i),w(t,o,i),w(t,r,i),f(r,s),f(s,c),f(s,l),f(s,a),f(s,u),rt(d,u,null),f(s,p),w(t,h,i),w(t,m,i),f(m,g),f(m,b),f(m,_),E=!0,S||(M=[k(g,"click",e[8]),k(_,"click",e[9])],S=!0)},p:t,i(t){E||(Z(d.$$.fragment,t),E=!0)},o(t){tt(d.$$.fragment,t),E=!1},d(t){t&&y(n),t&&y(o),t&&y(r),st(d),t&&y(h),t&&y(m),S=!1,i(M)}}}function Pt(e){let n,o,r,s,c,l,a,u=e[6]&&Ct(),d=void 0!==e[2]&&zt(e),p=e[5]&&Et(e);return{c(){u&&u.c(),n=_(),o=x(),d&&d.c(),r=x(),s=$("modal"),p&&p.c(),this.c=t,z(s,"--remsize",e[0])},m(t,i){u&&u.m(document.head,null),f(document.head,n),w(t,o,i),d&&d.m(t,i),w(t,r,i),w(t,s,i),p&&p.m(s,null),c=!0,l||(a=[k(kt,"keydown",e[10]),k(kt,"message",e[11])],l=!0)},p(t,[e]){t[6]?u||(u=Ct(),u.c(),u.m(n.parentNode,n)):u&&(u.d(1),u=null),void 0!==t[2]?d?d.p(t,e):(d=zt(t),d.c(),d.m(r.parentNode,r)):d&&(d.d(1),d=null),t[5]?p?(p.p(t,e),32&e&&Z(p,1)):(p=Et(t),p.c(),Z(p,1),p.m(s,null)):p&&(X(),tt(p,1,1,(()=>{p=null})),Y()),(!c||1&e)&&z(s,"--remsize",t[0])},i(t){c||(Z(p),c=!0)},o(t){tt(p),c=!1},d(t){u&&u.d(t),y(n),t&&y(o),d&&d.d(t),t&&y(r),t&&y(s),p&&p.d(),l=!1,i(a)}}}const Dt="PagePriming",Rt="PagePrompt",jt="HttpsRequired";function Bt(t,e,n){let o,i,{hide:r="auto"}=e,{remsize:s="1.0rem"}=e,{position:c="fixed"}=e,{customcssurl:l}=e,{customtypography:a}=e;const u=(()=>{const t=D();return(e,n)=>{t.dispatchEvent(new CustomEvent(e,{detail:n,composed:!0}))}})(),d=(p=ut,function(t,e){if(!t.hasOwnProperty("ownerDocument")){Object.defineProperty(t,"ownerDocument",{get:function(){return t.parentElement}});let e=t;for(;e.parentElement;)e=e.parentElement;t.parentElement.head=e}return p(t,e)});var p;let h,f=!1,m=Dt,g=null;var w;w=()=>{n(14,f=!0),window.postMessage({type:ht.speechlyintroready},"*")},D().$$.on_mount.push(w);const y=(t={})=>{n(5,o=!1),u("speechlyintroclosed",t),window.postMessage(Object.assign({type:ht.speechlyintroclosed},t),"*")},$=t=>{var e,i;("auto"===r&&n(5,o=!0),"https:"===(null===(e=null===window||void 0===window?void 0:window.location)||void 0===e?void 0:e.protocol)||("localhost"===(i=window.location.hostname)||"[::1]"===i||null!==i.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/)))?n(3,m=t):n(3,m=jt)};return t.$$set=t=>{"hide"in t&&n(12,r=t.hide),"remsize"in t&&n(0,s=t.remsize),"position"in t&&n(1,c=t.position),"customcssurl"in t&&n(2,l=t.customcssurl),"customtypography"in t&&n(13,a=t.customtypography)},t.$$.update=()=>{20480&t.$$.dirty&&n(5,o=f&&"false"===r),8192&t.$$.dirty&&n(6,i=void 0===a||"false"===a)},[s,c,l,m,h,o,i,d,y,()=>{window.postMessage({type:ht.speechlystarting},"*"),window.SpeechlyClient.initialize()},t=>{f&&"Escape"===t.key&&(t.preventDefault(),y())},t=>{switch(t.data.type){case ht.speechlypoweron:"auto"===r&&n(5,o=!0);break;case ht.speechlystarting:m===Dt&&(n(3,m=Rt),g=window.setTimeout((()=>{g=null,"auto"===r&&n(5,o=!0)}),500));break;case ht.holdstart:switch(t.data.state){case dt.Failed:case dt.NoAudioConsent:case dt.NoBrowserSupport:$(t.data.state)}break;case ht.initialized:n(4,h=t.data.appId),t.data.success?g?(window.clearTimeout(g),g=null,y()):y({firstrun:!0}):$(t.data.state)}},r,a,f,()=>{window.location.href.replace(/^http(?!s)/,"https")},()=>{window.location.reload()}]}class Ht extends at{constructor(t){super(),this.shadowRoot.innerHTML="<style>modal{font-size:var(--remsize);pointer-events:none;height:100%}modalbg{position:fixed;top:0;bottom:0;left:0;right:0;overflow:hidden;z-index:2000;pointer-events:auto;background-color:#000000c0;backdrop-filter:blur(3px)}modalcontent{z-index:2001;pointer-events:auto;box-sizing:border-box;width:100%;min-height:100%;padding:1.5rem 2rem;display:flex;flex-direction:column;align-items:center;justify-content:center;color:#fff}modalcontent.fixed{position:fixed;top:0;left:0;right:0;bottom:0;overflow-x:hidden;overflow-y:auto}modalcontent.absolute{position:absolute;top:0;left:0;right:0;height:100vh}.defaultTypography,.defaultTypography button{font-family:sans-serif;line-height:150%;color:#fff;font-size:1rem}.defaultTypography h2{font-family:'Saira Condensed', sans-serif;padding:0;margin:0;text-transform:uppercase;color:#fff;font-size:135%;line-height:120%}main{position:relative;box-sizing:border-box;width:100%;max-width:400px;margin:auto 0;padding:2rem 0}b{color:#80bbff}footer{box-sizing:border-box;font-size:85%;color:#aaa;margin:0}options{display:block;margin-top:2.5rem}options>*{margin-left:4px}options>*:first-child{margin-left:0px}button.wide{box-sizing:border-box;min-width:9rem;max-width:100%;padding:0.60rem;border-radius:10rem;font-size:100%;border:1px solid #aaa;background-color:#fff0;transition:0.3s;color:#aaa;line-height:120%}button.wide:hover{transition:0.3s;border-color:#fff;color:#fff}button.primary{background-color:#aaa;border:0;color:#000}button.primary:hover{border:0;background-color:#ffff;transition:0.3s;color:#000}a,a:visited{color:#aaa;transition:0.3s}a:hover{color:#fff;transition:0.3s}.sidePanelLogo{width:85%;padding:0.75rem 0 0.75rem 0}@media(max-width: 480px){}@media(min-width: 480px) and (max-width: 688px){main{width:600px}}@media(min-width: 688px){main{width:600px}}</style>",lt(this,{target:this.shadowRoot,props:S(this.attributes),customElement:!0},Bt,Pt,c,{hide:12,remsize:0,position:1,customcssurl:2,customtypography:13},null),t&&(t.target&&w(t.target,this,t.anchor),t.props&&(this.$set(t.props),G()))}static get observedAttributes(){return["hide","remsize","position","customcssurl","customtypography"]}get hide(){return this.$$.ctx[12]}set hide(t){this.$$set({hide:t}),G()}get remsize(){return this.$$.ctx[0]}set remsize(t){this.$$set({remsize:t}),G()}get position(){return this.$$.ctx[1]}set position(t){this.$$set({position:t}),G()}get customcssurl(){return this.$$.ctx[2]}set customcssurl(t){this.$$set({customcssurl:t}),G()}get customtypography(){return this.$$.ctx[13]}set customtypography(t){this.$$set({customtypography:t}),G()}}customElements.get("intro-popup")?console.warn("Skipping re-defining customElement intro-popup"):customElements.define("intro-popup",Ht)}));
!function(t){"function"==typeof define&&define.amd?define(t):t()}((function(){"use strict";function t(){}const e=t=>t;function n(t){return t()}function o(){return Object.create(null)}function i(t){t.forEach(n)}function r(t){return"function"==typeof t}function s(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}function c(t,e){return t!=t?e==e:t!==e}function l(t){return 0===Object.keys(t).length}const a="undefined"!=typeof window;let u=a?()=>window.performance.now():()=>Date.now(),d=a?t=>requestAnimationFrame(t):t;const p=new Set;function h(t){p.forEach((e=>{e.c(t)||(p.delete(e),e.f())})),0!==p.size&&d(h)}function f(t,e){t.appendChild(e)}function m(t){if(!t)return document;const e=t.getRootNode?t.getRootNode():t.ownerDocument;return e&&e.host?e:t.ownerDocument}function g(t,e){f(t.head||t,e)}function w(t,e,n){t.insertBefore(e,n||null)}function y(t){t.parentNode.removeChild(t)}function $(t){return document.createElement(t)}function b(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function v(t){return document.createTextNode(t)}function x(){return v(" ")}function _(){return v("")}function k(t,e,n,o){return t.addEventListener(e,n,o),()=>t.removeEventListener(e,n,o)}function C(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function z(t,e,n,o){t.style.setProperty(e,n,o?"important":"")}function E(t,e,n){t.classList[n?"add":"remove"](e)}function S(t){const e={};for(const n of t)e[n.name]=n.value;return e}const T=new Set;let M,N=0;function L(t,e,n,o,i,r,s,c=0){const l=16.666/o;let a="{\n";for(let t=0;t<=1;t+=l){const o=e+(n-e)*r(t);a+=100*t+`%{${s(o,1-o)}}\n`}const u=a+`100% {${s(n,1-n)}}\n}`,d=`__svelte_${function(t){let e=5381,n=t.length;for(;n--;)e=(e<<5)-e^t.charCodeAt(n);return e>>>0}(u)}_${c}`,p=m(t);T.add(p);const h=p.__svelte_stylesheet||(p.__svelte_stylesheet=function(t){const e=$("style");return g(m(t),e),e}(t).sheet),f=p.__svelte_rules||(p.__svelte_rules={});f[d]||(f[d]=!0,h.insertRule(`@keyframes ${d} ${u}`,h.cssRules.length));const w=t.style.animation||"";return t.style.animation=`${w?`${w}, `:""}${d} ${o}ms linear ${i}ms 1 both`,N+=1,d}function A(t,e){const n=(t.style.animation||"").split(", "),o=n.filter(e?t=>t.indexOf(e)<0:t=>-1===t.indexOf("__svelte")),i=n.length-o.length;i&&(t.style.animation=o.join(", "),N-=i,N||d((()=>{N||(T.forEach((t=>{const e=t.__svelte_stylesheet;let n=e.cssRules.length;for(;n--;)e.deleteRule(n);t.__svelte_rules={}})),T.clear())})))}function P(t){M=t}function D(){if(!M)throw new Error("Function called outside component initialization");return M}const R=[],j=[],B=[],H=[],F=Promise.resolve();let O=!1;function V(t){B.push(t)}let I=!1;const q=new Set;function G(){if(!I){I=!0;do{for(let t=0;t<R.length;t+=1){const e=R[t];P(e),W(e.$$)}for(P(null),R.length=0;j.length;)j.pop()();for(let t=0;t<B.length;t+=1){const e=B[t];q.has(e)||(q.add(e),e())}B.length=0}while(R.length);for(;H.length;)H.pop()();O=!1,I=!1,q.clear()}}function W(t){if(null!==t.fragment){t.update(),i(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(V)}}let U;function J(t,e,n){t.dispatchEvent(function(t,e,n=!1){const o=document.createEvent("CustomEvent");return o.initCustomEvent(t,n,!1,e),o}(`${e?"intro":"outro"}${n}`))}const K=new Set;let Q;function X(){Q={r:0,c:[],p:Q}}function Y(){Q.r||i(Q.c),Q=Q.p}function Z(t,e){t&&t.i&&(K.delete(t),t.i(e))}function tt(t,e,n,o){if(t&&t.o){if(K.has(t))return;K.add(t),Q.c.push((()=>{K.delete(t),o&&(n&&t.d(1),o())})),t.o(e)}}const et={duration:0};function nt(n,o,s,c){let l=o(n,s),a=c?0:1,f=null,m=null,g=null;function w(){g&&A(n,g)}function y(t,e){const n=t.b-a;return e*=Math.abs(n),{a:a,b:t.b,d:n,duration:e,start:t.start,end:t.start+e,group:t.group}}function $(o){const{delay:r=0,duration:s=300,easing:c=e,tick:$=t,css:b}=l||et,v={start:u()+r,b:o};o||(v.group=Q,Q.r+=1),f||m?m=v:(b&&(w(),g=L(n,a,o,s,r,c,b)),o&&$(0,1),f=y(v,s),V((()=>J(n,o,"start"))),function(t){let e;0===p.size&&d(h),new Promise((n=>{p.add(e={c:t,f:n})}))}((t=>{if(m&&t>m.start&&(f=y(m,s),m=null,J(n,f.b,"start"),b&&(w(),g=L(n,a,f.b,f.duration,0,c,l.css))),f)if(t>=f.end)$(a=f.b,1-a),J(n,f.b,"end"),m||(f.b?w():--f.group.r||i(f.group.c)),f=null;else if(t>=f.start){const e=t-f.start;a=f.a+f.d*c(e/f.duration),$(a,1-a)}return!(!f&&!m)})))}return{run(t){r(l)?(U||(U=Promise.resolve(),U.then((()=>{U=null}))),U).then((()=>{l=l(),$(t)})):$(t)},end(){w(),f=m=null}}}const ot="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function it(t){t&&t.c()}function rt(t,e,o,s){const{fragment:c,on_mount:l,on_destroy:a,after_update:u}=t.$$;c&&c.m(e,o),s||V((()=>{const e=l.map(n).filter(r);a?a.push(...e):i(e),t.$$.on_mount=[]})),u.forEach(V)}function st(t,e){const n=t.$$;null!==n.fragment&&(i(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function ct(t,e){-1===t.$$.dirty[0]&&(R.push(t),O||(O=!0,F.then(G)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function lt(e,n,r,s,c,l,a,u=[-1]){const d=M;P(e);const p=e.$$={fragment:null,ctx:null,props:l,update:t,not_equal:c,bound:o(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(n.context||(d?d.$$.context:[])),callbacks:o(),dirty:u,skip_bound:!1,root:n.target||d.$$.root};a&&a(p.root);let h=!1;if(p.ctx=r?r(e,n.props||{},((t,n,...o)=>{const i=o.length?o[0]:n;return p.ctx&&c(p.ctx[t],p.ctx[t]=i)&&(!p.skip_bound&&p.bound[t]&&p.bound[t](i),h&&ct(e,t)),n})):[],p.update(),h=!0,i(p.before_update),p.fragment=!!s&&s(p.ctx),n.target){if(n.hydrate){const t=function(t){return Array.from(t.childNodes)}(n.target);p.fragment&&p.fragment.l(t),t.forEach(y)}else p.fragment&&p.fragment.c();n.intro&&Z(e.$$.fragment),rt(e,n.target,n.anchor,n.customElement),G()}P(d)}let at;"function"==typeof HTMLElement&&(at=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){const{on_mount:t}=this.$$;this.$$.on_disconnect=t.map(n).filter(r);for(const t in this.$$.slotted)this.appendChild(this.$$.slotted[t])}attributeChangedCallback(t,e,n){this[t]=n}disconnectedCallback(){i(this.$$.on_disconnect)}$destroy(){st(this,1),this.$destroy=t}$on(t,e){const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{const t=n.indexOf(e);-1!==t&&n.splice(t,1)}}$set(t){this.$$set&&!l(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}});function ut(t,{delay:n=0,duration:o=400,easing:i=e}={}){const r=+getComputedStyle(t).opacity;return{delay:n,duration:o,easing:i,css:t=>"opacity: "+t*r}}var dt,pt,ht,ft,mt,gt;function wt(t){!function(t,e,n){const o=m(t);if(!o.getElementById(e)){const t=$("style");t.id=e,t.textContent=n,g(o,t)}}(t,"svelte-1djrpwt",".Icon.svelte-1djrpwt{position:absolute;width:var(--icon-size);height:var(--icon-size);top:50%;left:50%;transform:translate(-50%, -50%);pointer-events:none;transition:0.25s;opacity:var(--icon-opacity)}")}function yt(t){let e,n,o,i;return{c(){e=b("svg"),n=b("g"),o=b("path"),i=b("rect"),C(o,"d","M42 26h4v4c0 9.265-7 16.895-16 17.89V55h-4v-7.11c-8.892-.982-15.833-8.444-15.997-17.56L10 30v-4h4v4c0 7.732 6.268 14 14 14 7.628 0 13.83-6.1 13.997-13.687L42 30v-4z"),C(i,"x","20"),C(i,"y","1"),C(i,"width","16"),C(i,"height","37"),C(i,"rx","8"),C(n,"fill","var(--icon-color)"),C(n,"fill-rule","evenodd"),C(e,"class","Icon svelte-1djrpwt"),C(e,"viewBox","0 0 56 56"),C(e,"xmlns","http://www.w3.org/2000/svg")},m(t,r){w(t,e,r),f(e,n),f(n,o),f(n,i)},d(t){t&&y(e)}}}function $t(t){let e,n,o,i;return{c(){e=b("svg"),n=b("g"),o=b("path"),i=b("path"),C(o,"d","M42 26h4v4c0 9.265-7 16.895-16 17.89V55h-4v-7.11c-8.892-.982-15.833-8.444-15.997-17.56L10 30v-4h4v4c0 7.732 6.268 14 14 14 7.628 0 13.83-6.1 13.997-13.687L42 30v-4z"),C(o,"fill-rule","nonzero"),C(i,"d","M37 13.081V31a8 8 0 11-16 0v-1.919l16-16zM26 1a8 8 0 018 8v1.319L18 26.318V9a8 8 0 018-8zM37.969 7.932l3.74-7.35 3.018 2.625zM39.654 10.608l7.531-3.359.695 3.94z"),C(n,"fill","var(--icon-color)"),C(n,"fill-rule","evenodd"),C(e,"class","Icon svelte-1djrpwt"),C(e,"viewBox","0 0 56 56"),C(e,"xmlns","http://www.w3.org/2000/svg")},m(t,r){w(t,e,r),f(e,n),f(n,o),f(n,i)},d(t){t&&y(e)}}}function bt(t){let e,n,o,i;return{c(){e=b("svg"),n=b("g"),o=b("path"),i=b("path"),C(o,"d","M36 14.828V30a8 8 0 01-15.961.79l15.96-15.962zM28 1a8 8 0 018 8v.172L20 25.173V9a8 8 0 018-8z"),C(i,"d","M42 26h4v4c0 9.265-7 16.895-16 17.89V55h-4v-7.11c-8.892-.982-15.833-8.444-15.997-17.56L10 30v-4h4v4c0 7.732 6.268 14 14 14 7.628 0 13.83-6.1 13.997-13.687L42 30v-4z"),C(n,"fill","var(--icon-color)"),C(n,"fill-rule","nonzero"),C(e,"class","Icon svelte-1djrpwt"),C(e,"viewBox","0 0 56 56"),C(e,"xmlns","http://www.w3.org/2000/svg")},m(t,r){w(t,e,r),f(e,n),f(n,o),f(n,i)},d(t){t&&y(e)}}}function vt(e){let n,o,i,r=e[0]===ft.Mic&&yt(),s=e[0]===ft.Error&&$t(),c=e[0]===ft.Denied&&bt();return{c(){r&&r.c(),n=x(),s&&s.c(),o=x(),c&&c.c(),i=_()},m(t,e){r&&r.m(t,e),w(t,n,e),s&&s.m(t,e),w(t,o,e),c&&c.m(t,e),w(t,i,e)},p(t,[e]){t[0]===ft.Mic?r||(r=yt(),r.c(),r.m(n.parentNode,n)):r&&(r.d(1),r=null),t[0]===ft.Error?s||(s=$t(),s.c(),s.m(o.parentNode,o)):s&&(s.d(1),s=null),t[0]===ft.Denied?c||(c=bt(),c.c(),c.m(i.parentNode,i)):c&&(c.d(1),c=null)},i:t,o:t,d(t){r&&r.d(t),t&&y(n),s&&s.d(t),t&&y(o),c&&c.d(t),t&&y(i)}}}function xt(t,e,n){let{icon:o=ft.Mic}=e;return t.$$set=t=>{"icon"in t&&n(0,o=t.icon)},[o]}!function(t){t[t.Failed=0]="Failed",t[t.NoBrowserSupport=1]="NoBrowserSupport",t[t.NoAudioConsent=2]="NoAudioConsent",t[t.Disconnected=3]="Disconnected",t[t.Disconnecting=4]="Disconnecting",t[t.Connecting=5]="Connecting",t[t.Connected=6]="Connected",t[t.Starting=7]="Starting",t[t.Stopping=8]="Stopping",t[t.Recording=9]="Recording"}(dt||(dt={})),function(t){t.SpeechlyFirstConnect="SpeechlyFirstConnect"}(pt||(pt={})),function(t){t.speechlypoweron="speechlypoweron",t.holdstart="holdstart",t.holdend="holdend",t.speechlystarting="speechlystarting",t.speechstate="speechstate",t.initialized="initialized",t.speechsegment="speechsegment",t.speechhandled="speechhandled",t.showhint="showhint",t.transcriptdrawerhint="hint",t.speechlyintroready="speechlyintroready",t.speechlyintroclosed="speechlyintroclosed"}(ht||(ht={})),function(t){t.Mic="mic",t.Error="error",t.Denied="denied"}(ft||(ft={})),function(t){t.Hold="hold",t.Click="click",t.Noninteractive="noninteractive"}(mt||(mt={})),function(t){t.None="none",t.Connecting="connecting",t.Busy="busy"}(gt||(gt={})),dt.Disconnected,dt.Disconnecting,dt.Connecting,dt.Connected,dt.Starting,dt.Recording,dt.Stopping,dt.Failed,dt.NoBrowserSupport,dt.NoAudioConsent;class _t extends class{$destroy(){st(this,1),this.$destroy=t}$on(t,e){const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{const t=n.indexOf(e);-1!==t&&n.splice(t,1)}}$set(t){this.$$set&&!l(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}{constructor(t){super(),lt(this,t,xt,vt,s,{icon:0},wt)}}const{window:kt}=ot;function Ct(t){let e;return{c(){e=$("link"),C(e,"href","https://fonts.googleapis.com/css2?family=Saira+Condensed:wght@700&display=swap"),C(e,"rel","stylesheet")},m(t,n){w(t,e,n)},d(t){t&&y(e)}}}function zt(t){let e;return{c(){e=$("link"),C(e,"href",t[2]),C(e,"rel","stylesheet")},m(t,n){w(t,e,n)},p(t,n){4&n&&C(e,"href",t[2])},d(t){t&&y(e)}}}function Et(t){let e,n,o,i,r,s,c,l,a,u,d,p,h;const m=[At,Lt,Nt,Mt,Tt,St],g=[];function b(t,e){return t[3]===Dt?0:t[3]===Rt?1:t[3]===jt?2:t[3]===dt.NoAudioConsent?3:t[3]===dt.NoBrowserSupport?4:5}return s=b(t),c=g[s]=m[s](t),{c(){e=$("modalbg"),o=x(),i=$("modalcontent"),r=$("main"),c.c(),l=x(),a=$("footer"),a.innerHTML='Voice input is automatically transcribed by <a target="_new" href="https://speechly.com/">Speechly</a> and can be used to improve the quality of service under <a target="_new" href="https://www.speechly.com/privacy/terms-and-conditions">terms of use</a>.',C(i,"class",t[1]),E(i,"defaultTypography",t[6])},m(n,c){w(n,e,c),w(n,o,c),w(n,i,c),f(i,r),g[s].m(r,null),f(i,l),f(i,a),d=!0,p||(h=k(e,"click",t[8]),p=!0)},p(t,e){let n=s;s=b(t),s===n?g[s].p(t,e):(X(),tt(g[n],1,1,(()=>{g[n]=null})),Y(),c=g[s],c?c.p(t,e):(c=g[s]=m[s](t),c.c()),Z(c,1),c.m(r,null)),(!d||2&e)&&C(i,"class",t[1]),66&e&&E(i,"defaultTypography",t[6])},i(o){d||(V((()=>{n||(n=nt(e,t[7],{},!0)),n.run(1)})),Z(c),V((()=>{u||(u=nt(i,t[7],{},!0)),u.run(1)})),d=!0)},o(o){n||(n=nt(e,t[7],{},!1)),n.run(0),tt(c),u||(u=nt(i,t[7],{},!1)),u.run(0),d=!1},d(t){t&&y(e),t&&n&&n.end(),t&&y(o),t&&y(i),g[s].d(),t&&u&&u.end(),p=!1,h()}}}function St(e){let n,o,i,r,s,c,l,a,u,d,p;return{c(){n=$("h2"),n.textContent="Failed to connect Speechly",o=x(),i=$("p"),r=v("Please check that Speechly application id '"),s=v(e[4]),c=v("' has been successfully deployed."),l=x(),a=$("options"),u=$("button"),u.textContent="Aww, bummer",C(u,"class","wide")},m(t,h){w(t,n,h),w(t,o,h),w(t,i,h),f(i,r),f(i,s),f(i,c),w(t,l,h),w(t,a,h),f(a,u),d||(p=k(u,"click",e[8]),d=!0)},p(t,e){16&e&&function(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}(s,t[4])},i:t,o:t,d(t){t&&y(n),t&&y(o),t&&y(i),t&&y(l),t&&y(a),d=!1,p()}}}function Tt(e){let n,o,i,r,s,c,l,a;return{c(){n=$("h2"),n.textContent="Unsupported Browser",o=x(),i=$("p"),i.textContent="To use the voice interface, please visit this site using a supported\n browser.",r=x(),s=$("options"),c=$("button"),c.textContent="Got it",C(c,"class","wide")},m(t,u){w(t,n,u),w(t,o,u),w(t,i,u),w(t,r,u),w(t,s,u),f(s,c),l||(a=k(c,"click",e[8]),l=!0)},p:t,i:t,o:t,d(t){t&&y(n),t&&y(o),t&&y(i),t&&y(r),t&&y(s),l=!1,a()}}}function Mt(e){let n,o,r,s,c,l,a,u,d,p,h,m;return{c(){n=$("h2"),n.textContent="Voice unavailable",o=x(),r=$("p"),r.textContent="Please reload the page to try again.",s=x(),c=$("p"),c.textContent="If that doesn't work, check your browser preferences to re-allow microphone use.",l=x(),a=$("options"),u=$("button"),u.textContent="Later",d=x(),p=$("button"),p.textContent="Reload",C(u,"class","wide"),C(p,"class","wide primary")},m(t,i){w(t,n,i),w(t,o,i),w(t,r,i),w(t,s,i),w(t,c,i),w(t,l,i),w(t,a,i),f(a,u),f(a,d),f(a,p),h||(m=[k(u,"click",e[8]),k(p,"click",e[16])],h=!0)},p:t,i:t,o:t,d(t){t&&y(n),t&&y(o),t&&y(r),t&&y(s),t&&y(c),t&&y(l),t&&y(a),h=!1,i(m)}}}function Nt(e){let n,o,r,s,c,l,a,u,d,p;return{c(){n=$("h2"),n.textContent="HTTPS Required",o=x(),r=$("p"),r.textContent="To use the voice interface, please visit this site using the secure\n https:// protocol.",s=x(),c=$("options"),l=$("button"),l.textContent="Try with HTTPS",a=x(),u=$("button"),u.textContent="Later",C(l,"class","wide"),C(u,"class","wide")},m(t,i){w(t,n,i),w(t,o,i),w(t,r,i),w(t,s,i),w(t,c,i),f(c,l),f(c,a),f(c,u),d||(p=[k(l,"click",e[15]),k(u,"click",e[8])],d=!0)},p:t,i:t,o:t,d(t){t&&y(n),t&&y(o),t&&y(r),t&&y(s),t&&y(c),d=!1,i(p)}}}function Lt(e){let n,o,i,r,s,c,l,a,u,d,p,h,m,g,b,_;return u=new _t({}),{c(){n=$("h2"),n.innerHTML='↖ <slot name="prompt-title">Allow microphone</slot>',o=x(),i=$("p"),r=$("slot"),s=v("Please click "),c=$("b"),c.textContent="Allow",l=v(" to use the microphone.\n We'll only listen to you when you press the "),a=$("span"),it(u.$$.fragment),d=v(" button."),p=x(),h=$("options"),m=$("button"),m.textContent="Got it",z(a,"display","inline-block"),z(a,"position","relative"),z(a,"color","white"),z(a,"width","20px"),z(a,"height","10px"),z(a,"--icon-color","white"),z(a,"--icon-size","20px"),C(r,"name","prompt-body"),C(m,"class","wide")},m(t,y){w(t,n,y),w(t,o,y),w(t,i,y),f(i,r),f(r,s),f(r,c),f(r,l),f(r,a),rt(u,a,null),f(r,d),w(t,p,y),w(t,h,y),f(h,m),g=!0,b||(_=k(m,"click",e[8]),b=!0)},p:t,i(t){g||(Z(u.$$.fragment,t),g=!0)},o(t){tt(u.$$.fragment,t),g=!1},d(t){t&&y(n),t&&y(o),t&&y(i),st(u),t&&y(p),t&&y(h),b=!1,_()}}}function At(e){let n,o,r,s,c,l,a,u,d,p,h,m,g,b,_,E,S,T;return d=new _t({}),{c(){n=$("h2"),n.innerHTML='<slot name="prompt-title">Allow microphone</slot>',o=x(),r=$("p"),s=$("slot"),c=v("Please click "),l=$("b"),l.textContent="Allow",a=v(" to use the microphone.\n We'll only listen to you when you press the "),u=$("span"),it(d.$$.fragment),p=v(" button."),h=x(),m=$("options"),g=$("button"),g.textContent="Later",b=x(),_=$("button"),_.textContent="Allow",z(u,"display","inline-block"),z(u,"position","relative"),z(u,"color","white"),z(u,"width","20px"),z(u,"height","10px"),z(u,"--icon-color","white"),z(u,"--icon-size","20px"),C(s,"name","welcome-body"),C(g,"class","wide"),C(_,"class","wide primary")},m(t,i){w(t,n,i),w(t,o,i),w(t,r,i),f(r,s),f(s,c),f(s,l),f(s,a),f(s,u),rt(d,u,null),f(s,p),w(t,h,i),w(t,m,i),f(m,g),f(m,b),f(m,_),E=!0,S||(T=[k(g,"click",e[8]),k(_,"click",e[9])],S=!0)},p:t,i(t){E||(Z(d.$$.fragment,t),E=!0)},o(t){tt(d.$$.fragment,t),E=!1},d(t){t&&y(n),t&&y(o),t&&y(r),st(d),t&&y(h),t&&y(m),S=!1,i(T)}}}function Pt(e){let n,o,r,s,c,l,a,u=e[6]&&Ct(),d=void 0!==e[2]&&zt(e),p=e[5]&&Et(e);return{c(){u&&u.c(),n=_(),o=x(),d&&d.c(),r=x(),s=$("modal"),p&&p.c(),this.c=t,z(s,"--remsize",e[0])},m(t,i){u&&u.m(document.head,null),f(document.head,n),w(t,o,i),d&&d.m(t,i),w(t,r,i),w(t,s,i),p&&p.m(s,null),c=!0,l||(a=[k(kt,"keydown",e[10]),k(kt,"message",e[11])],l=!0)},p(t,[e]){t[6]?u||(u=Ct(),u.c(),u.m(n.parentNode,n)):u&&(u.d(1),u=null),void 0!==t[2]?d?d.p(t,e):(d=zt(t),d.c(),d.m(r.parentNode,r)):d&&(d.d(1),d=null),t[5]?p?(p.p(t,e),32&e&&Z(p,1)):(p=Et(t),p.c(),Z(p,1),p.m(s,null)):p&&(X(),tt(p,1,1,(()=>{p=null})),Y()),(!c||1&e)&&z(s,"--remsize",t[0])},i(t){c||(Z(p),c=!0)},o(t){tt(p),c=!1},d(t){u&&u.d(t),y(n),t&&y(o),d&&d.d(t),t&&y(r),t&&y(s),p&&p.d(),l=!1,i(a)}}}const Dt="PagePriming",Rt="PagePrompt",jt="HttpsRequired";function Bt(t,e,n){let o,i,{hide:r="auto"}=e,{remsize:s="1.0rem"}=e,{position:c="fixed"}=e,{customcssurl:l}=e,{customtypography:a}=e;const u=(()=>{const t=D();return(e,n)=>{t.dispatchEvent(new CustomEvent(e,{detail:n,composed:!0}))}})(),d=(p=ut,function(t,e){if(!t.hasOwnProperty("ownerDocument")){Object.defineProperty(t,"ownerDocument",{get:function(){return t.parentElement}});let e=t;for(;e.parentElement;)e=e.parentElement;t.parentElement.head=e}return p(t,e)});var p;let h,f=!1,m=Dt,g=null;var w;w=()=>{n(14,f=!0),window.postMessage({type:ht.speechlyintroready},"*")},D().$$.on_mount.push(w);const y=(t={})=>{n(5,o=!1),u("speechlyintroclosed",t),window.postMessage(Object.assign({type:ht.speechlyintroclosed},t),"*")},$=t=>{var e,i;("auto"===r&&n(5,o=!0),g&&(window.clearTimeout(g),g=null),"https:"===(null===(e=null===window||void 0===window?void 0:window.location)||void 0===e?void 0:e.protocol)||("localhost"===(i=window.location.hostname)||"[::1]"===i||null!==i.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/)))?n(3,m=t):n(3,m=jt)};return t.$$set=t=>{"hide"in t&&n(12,r=t.hide),"remsize"in t&&n(0,s=t.remsize),"position"in t&&n(1,c=t.position),"customcssurl"in t&&n(2,l=t.customcssurl),"customtypography"in t&&n(13,a=t.customtypography)},t.$$.update=()=>{20480&t.$$.dirty&&n(5,o=f&&"false"===r),8192&t.$$.dirty&&n(6,i=void 0===a||"false"===a)},[s,c,l,m,h,o,i,d,y,()=>{window.postMessage({type:ht.speechlystarting},"*"),window.SpeechlyClient.initialize()},t=>{f&&"Escape"===t.key&&(t.preventDefault(),y())},t=>{switch(console.log(t),t.data.type){case ht.speechlypoweron:"auto"===r&&n(5,o=!0);break;case ht.speechlystarting:m===Dt?g=window.setTimeout((()=>{g=null,n(3,m=Rt),"auto"===r&&n(5,o=!0)}),500):n(5,o=!0);break;case ht.holdstart:switch(t.data.state){case dt.Failed:case dt.NoAudioConsent:case dt.NoBrowserSupport:$(t.data.state)}break;case ht.initialized:n(4,h=t.data.appId),t.data.success?g?(window.clearTimeout(g),g=null,y()):y({firstrun:!0}):$(t.data.state)}},r,a,f,()=>{window.location.href.replace(/^http(?!s)/,"https")},()=>{window.location.reload()}]}class Ht extends at{constructor(t){super(),this.shadowRoot.innerHTML="<style>modal{font-size:var(--remsize);pointer-events:none;height:100%}modalbg{position:fixed;top:0;bottom:0;left:0;right:0;overflow:hidden;z-index:2000;pointer-events:auto;background-color:#000000c0;backdrop-filter:blur(3px)}modalcontent{z-index:2001;pointer-events:auto;box-sizing:border-box;width:100%;min-height:100%;padding:1.5rem 2rem;display:flex;flex-direction:column;align-items:center;justify-content:center;color:#fff}modalcontent.fixed{position:fixed;top:0;left:0;right:0;bottom:0;overflow-x:hidden;overflow-y:auto}modalcontent.absolute{position:absolute;top:0;left:0;right:0;height:100vh}.defaultTypography,.defaultTypography button{font-family:sans-serif;line-height:150%;color:#fff;font-size:1rem}.defaultTypography h2{font-family:'Saira Condensed', sans-serif;padding:0;margin:0;text-transform:uppercase;color:#fff;font-size:135%;line-height:120%}main{position:relative;box-sizing:border-box;width:100%;max-width:400px;margin:auto 0;padding:2rem 0}b{color:#80bbff}footer{box-sizing:border-box;font-size:85%;color:#aaa;margin:0}options{display:block;margin-top:2.5rem}options>*{margin-left:4px}options>*:first-child{margin-left:0px}button.wide{box-sizing:border-box;min-width:9rem;max-width:100%;padding:0.60rem;border-radius:10rem;font-size:100%;border:1px solid #aaa;background-color:#fff0;transition:0.3s;color:#aaa;line-height:120%}button.wide:hover{transition:0.3s;border-color:#fff;color:#fff}button.primary{background-color:#aaa;border:0;color:#000}button.primary:hover{border:0;background-color:#ffff;transition:0.3s;color:#000}a,a:visited{color:#aaa;transition:0.3s}a:hover{color:#fff;transition:0.3s}.sidePanelLogo{width:85%;padding:0.75rem 0 0.75rem 0}@media(max-width: 480px){}@media(min-width: 480px) and (max-width: 688px){main{width:600px}}@media(min-width: 688px){main{width:600px}}</style>",lt(this,{target:this.shadowRoot,props:S(this.attributes),customElement:!0},Bt,Pt,c,{hide:12,remsize:0,position:1,customcssurl:2,customtypography:13},null),t&&(t.target&&w(t.target,this,t.anchor),t.props&&(this.$set(t.props),G()))}static get observedAttributes(){return["hide","remsize","position","customcssurl","customtypography"]}get hide(){return this.$$.ctx[12]}set hide(t){this.$$set({hide:t}),G()}get remsize(){return this.$$.ctx[0]}set remsize(t){this.$$set({remsize:t}),G()}get position(){return this.$$.ctx[1]}set position(t){this.$$set({position:t}),G()}get customcssurl(){return this.$$.ctx[2]}set customcssurl(t){this.$$set({customcssurl:t}),G()}get customtypography(){return this.$$.ctx[13]}set customtypography(t){this.$$set({customtypography:t}),G()}}customElements.get("intro-popup")?console.warn("Skipping re-defining customElement intro-popup"):customElements.define("intro-popup",Ht)}));
//# sourceMappingURL=intro-popup.js.map
{
"name": "@speechly/browser-ui",
"version": "5.1.0-beta.3",
"version": "5.1.0-beta.4",
"scripts": {

@@ -5,0 +5,0 @@ "build": "rimraf core && rollup -c --silent && mv core/types/src/* core && rimraf core/types",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc