From dc98262376d3480f2969e001e71b6bd32c31aec9 Mon Sep 17 00:00:00 2001 From: Kenneth Rohde Christiansen Date: Mon, 14 Oct 2019 13:35:09 +0200 Subject: [PATCH] Add prebuild elements --- build/elements/camera-capture.js | 268 +++++++++++++++++++++++++++ build/elements/camera-capture.js.map | 1 + build/elements/demo-logger.js | 6 + build/elements/demo-logger.js.map | 1 + rollup.config.js | 6 +- 5 files changed, 281 insertions(+), 1 deletion(-) create mode 100644 build/elements/camera-capture.js create mode 100644 build/elements/camera-capture.js.map create mode 100644 build/elements/demo-logger.js create mode 100644 build/elements/demo-logger.js.map diff --git a/build/elements/camera-capture.js b/build/elements/camera-capture.js new file mode 100644 index 0000000..fdcb182 --- /dev/null +++ b/build/elements/camera-capture.js @@ -0,0 +1,268 @@ +function e(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}const t=new WeakMap,i=e=>(function(){const i=e(...arguments);return t.set(i,!0),i}),r=e=>"function"==typeof e&&t.has(e),n=void 0!==window.customElements&&void 0!==window.customElements.polyfillWrapFlushCallback,s=function(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;for(;t!==i;){const i=t.nextSibling;e.removeChild(t),t=i}},a={},o={},d=`{{lit-${String(Math.random()).slice(2)}}}`,c=`\x3c!--${d}--\x3e`,l=new RegExp(`${d}|${c}`),p="$lit$";class u{constructor(e,t){this.parts=[],this.element=t;const i=[],r=[],n=document.createTreeWalker(t.content,133,null,!1);let s=0,a=-1,o=0;const{strings:c,values:{length:u}}=e;for(;o0;){const t=c[o],i=g.exec(t)[2],r=i.toLowerCase()+p,n=e.getAttribute(r);e.removeAttribute(r);const s=n.split(l);this.parts.push({type:"attribute",index:a,name:i,strings:s}),o+=s.length-1}}"TEMPLATE"===e.tagName&&(r.push(e),n.currentNode=e.content)}else if(3===e.nodeType){const t=e.data;if(t.indexOf(d)>=0){const r=e.parentNode,n=t.split(l),s=n.length-1;for(let t=0;t{const i=e.length-t.length;return i>=0&&e.slice(i)===t},m=e=>-1!==e.index,f=()=>document.createComment(""),g=/([ \x09\x0a\x0c\x0d])([^\0-\x1F\x7F-\x9F "'>=\/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/;class _{constructor(e,t,i){this.__parts=[],this.template=e,this.processor=t,this.options=i}update(e){let t=0;for(const i of this.__parts)void 0!==i&&i.setValue(e[t]),t++;for(const e of this.__parts)void 0!==e&&e.commit()}_clone(){const e=n?this.template.element.content.cloneNode(!0):document.importNode(this.template.element.content,!0),t=[],i=this.template.parts,r=document.createTreeWalker(e,133,null,!1);let s,a=0,o=0,d=r.nextNode();for(;a-1||i)&&-1===e.indexOf("--\x3e",n+1);const s=g.exec(e);t+=null===s?e+(i?v:c):e.substr(0,s.index)+s[1]+s[2]+p+s[3]+d}return t+=this.strings[e]}getTemplateElement(){const e=document.createElement("template");return e.innerHTML=this.getHTML(),e}}const b=e=>null===e||!("object"==typeof e||"function"==typeof e),w=e=>Array.isArray(e)||!(!e||!e[Symbol.iterator]);class x{constructor(e,t,i){this.dirty=!0,this.element=e,this.name=t,this.strings=i,this.parts=[];for(let e=0;e0&&void 0!==arguments[0]?arguments[0]:this.startNode;s(this.startNode.parentNode,e.nextSibling,this.endNode)}}class C{constructor(e,t,i){if(this.value=void 0,this.__pendingValue=void 0,2!==i.length||""!==i[0]||""!==i[1])throw new Error("Boolean attributes can only contain a single expression");this.element=e,this.name=t,this.strings=i}setValue(e){this.__pendingValue=e}commit(){for(;r(this.__pendingValue);){const e=this.__pendingValue;this.__pendingValue=a,e(this)}if(this.__pendingValue===a)return;const e=!!this.__pendingValue;this.value!==e&&(e?this.element.setAttribute(this.name,""):this.element.removeAttribute(this.name),this.value=e),this.__pendingValue=a}}class A extends x{constructor(e,t,i){super(e,t,i),this.single=2===i.length&&""===i[0]&&""===i[1]}_createPart(){return new T(this)}_getValue(){return this.single?this.parts[0].value:super._getValue()}commit(){this.dirty&&(this.dirty=!1,this.element[this.name]=this._getValue())}}class T extends S{}let E=!1;try{const e={get capture(){return E=!0,!1}};window.addEventListener("test",e,e),window.removeEventListener("test",e,e)}catch(e){}class R{constructor(e,t,i){this.value=void 0,this.__pendingValue=void 0,this.element=e,this.eventName=t,this.eventContext=i,this.__boundHandleEvent=(e=>this.handleEvent(e))}setValue(e){this.__pendingValue=e}commit(){for(;r(this.__pendingValue);){const e=this.__pendingValue;this.__pendingValue=a,e(this)}if(this.__pendingValue===a)return;const e=this.__pendingValue,t=this.value,i=null==e||null!=t&&(e.capture!==t.capture||e.once!==t.once||e.passive!==t.passive),n=null!=e&&(null==t||i);i&&this.element.removeEventListener(this.eventName,this.__boundHandleEvent,this.__options),n&&(this.__options=I(e),this.element.addEventListener(this.eventName,this.__boundHandleEvent,this.__options)),this.value=e,this.__pendingValue=a}handleEvent(e){"function"==typeof this.value?this.value.call(this.eventContext||this.element,e):this.value.handleEvent(e)}}const I=e=>e&&(E?{capture:e.capture,passive:e.passive,once:e.once}:e.capture);const P=new class{handleAttributeExpressions(e,t,i,r){const n=t[0];return"."===n?new A(e,t.slice(1),i).parts:"@"===n?[new R(e,t.slice(1),r.eventContext)]:"?"===n?[new C(e,t.slice(1),i)]:new x(e,t,i).parts}handleTextExpression(e){return new k(e)}};function N(e){let t=M.get(e.type);void 0===t&&(t={stringsArray:new WeakMap,keyString:new Map},M.set(e.type,t));let i=t.stringsArray.get(e.strings);if(void 0!==i)return i;const r=e.strings.join(d);return void 0===(i=t.keyString.get(r))&&(i=new u(e,e.getTemplateElement()),t.keyString.set(r,i)),t.stringsArray.set(e.strings,i),i}const M=new Map,V=new WeakMap;(window.litHtmlVersions||(window.litHtmlVersions=[])).push("1.1.2");const H=function(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),r=1;re.parentNode.removeChild(e))}const D=e=>{let t=11===e.nodeType?0:1;const i=document.createTreeWalker(e,O,null,!1);for(;i.nextNode();)t++;return t},z=function(e){for(let t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1)+1;t`${e}--${t}`;let L=!0;void 0===window.ShadyCSS?L=!1:void 0===window.ShadyCSS.prepareTemplateDom&&(console.warn("Incompatible ShadyCSS version detected. Please update to at least @webcomponents/webcomponentsjs@2.0.2 and @webcomponents/shadycss@1.3.1."),L=!1);const U=e=>t=>{const i=B(t.type,e);let r=M.get(i);void 0===r&&(r={stringsArray:new WeakMap,keyString:new Map},M.set(i,r));let n=r.stringsArray.get(t.strings);if(void 0!==n)return n;const s=t.strings.join(d);if(void 0===(n=r.keyString.get(s))){const i=t.getTemplateElement();L&&window.ShadyCSS.prepareTemplateDom(i,e),n=new u(t,i),r.keyString.set(s,n)}return r.stringsArray.set(t.strings,n),n},$=["html","svg"],q=new Set,j=(e,t,i)=>{q.add(e);const r=i?i.element:document.createElement("template"),n=t.querySelectorAll("style"),{length:s}=n;if(0===s)return void window.ShadyCSS.prepareTemplateStyles(r,e);const a=document.createElement("style");for(let e=0;e{$.forEach(t=>{const i=M.get(B(t,e));void 0!==i&&i.keyString.forEach(e=>{const{element:{content:t}}=e,i=new Set;Array.from(t.querySelectorAll("style")).forEach(e=>{i.add(e)}),F(e,i)})})})(e);const o=r.content;i?function(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const{element:{content:r},parts:n}=e;if(null==i)return void r.appendChild(t);const s=document.createTreeWalker(r,O,null,!1);let a=z(n),o=0,d=-1;for(;s.nextNode();)for(d++,s.currentNode===i&&(o=D(t),i.parentNode.insertBefore(t,i));-1!==a&&n[a].index===d;){if(o>0){for(;-1!==a;)n[a].index+=o,a=z(n,a);return}a=z(n,a)}}(i,a,o.firstChild):o.insertBefore(a,o.firstChild),window.ShadyCSS.prepareTemplateStyles(r,e);const d=o.querySelector("style");if(window.ShadyCSS.nativeShadow&&null!==d)t.insertBefore(d.cloneNode(!0),t.firstChild);else if(i){o.insertBefore(a,o.firstChild);const e=new Set;e.add(a),F(i,e)}};window.JSCompiler_renameProperty=((e,t)=>e);const G={toAttribute(e,t){switch(t){case Boolean:return e?"":null;case Object:case Array:return null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){switch(t){case Boolean:return null!==e;case Number:return null===e?null:Number(e);case Object:case Array:return JSON.parse(e)}return e}},W=(e,t)=>t!==e&&(t==t||e==e),X={attribute:!0,type:String,converter:G,reflect:!1,hasChanged:W},K=Promise.resolve(!0),J=1,Y=4,Z=8,Q=16,ee=32,te="finalized";class ie extends HTMLElement{constructor(){super(),this._updateState=0,this._instanceProperties=void 0,this._updatePromise=K,this._hasConnectedResolver=void 0,this._changedProperties=new Map,this._reflectingProperties=void 0,this.initialize()}static get observedAttributes(){this.finalize();const e=[];return this._classProperties.forEach((t,i)=>{const r=this._attributeNameForProperty(i,t);void 0!==r&&(this._attributeToPropertyMap.set(r,i),e.push(r))}),e}static _ensureClassProperties(){if(!this.hasOwnProperty(JSCompiler_renameProperty("_classProperties",this))){this._classProperties=new Map;const e=Object.getPrototypeOf(this)._classProperties;void 0!==e&&e.forEach((e,t)=>this._classProperties.set(t,e))}}static createProperty(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:X;if(this._ensureClassProperties(),this._classProperties.set(e,t),t.noAccessor||this.prototype.hasOwnProperty(e))return;const i="symbol"==typeof e?Symbol():`__${e}`;Object.defineProperty(this.prototype,e,{get(){return this[i]},set(t){const r=this[e];this[i]=t,this._requestUpdate(e,r)},configurable:!0,enumerable:!0})}static finalize(){const e=Object.getPrototypeOf(this);if(e.hasOwnProperty(te)||e.finalize(),this[te]=!0,this._ensureClassProperties(),this._attributeToPropertyMap=new Map,this.hasOwnProperty(JSCompiler_renameProperty("properties",this))){const e=this.properties,t=[...Object.getOwnPropertyNames(e),..."function"==typeof Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e):[]];for(const i of t)this.createProperty(i,e[i])}}static _attributeNameForProperty(e,t){const i=t.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof e?e.toLowerCase():void 0}static _valueHasChanged(e,t){return(arguments.length>2&&void 0!==arguments[2]?arguments[2]:W)(e,t)}static _propertyValueFromAttribute(e,t){const i=t.type,r=t.converter||G,n="function"==typeof r?r:r.fromAttribute;return n?n(e,i):e}static _propertyValueToAttribute(e,t){if(void 0===t.reflect)return;const i=t.type,r=t.converter;return(r&&r.toAttribute||G.toAttribute)(e,i)}initialize(){this._saveInstanceProperties(),this._requestUpdate()}_saveInstanceProperties(){this.constructor._classProperties.forEach((e,t)=>{if(this.hasOwnProperty(t)){const e=this[t];delete this[t],this._instanceProperties||(this._instanceProperties=new Map),this._instanceProperties.set(t,e)}})}_applyInstanceProperties(){this._instanceProperties.forEach((e,t)=>this[t]=e),this._instanceProperties=void 0}connectedCallback(){this._updateState=this._updateState|ee,this._hasConnectedResolver&&(this._hasConnectedResolver(),this._hasConnectedResolver=void 0)}disconnectedCallback(){}attributeChangedCallback(e,t,i){t!==i&&this._attributeToProperty(e,i)}_propertyToAttribute(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:X;const r=this.constructor,n=r._attributeNameForProperty(e,i);if(void 0!==n){const e=r._propertyValueToAttribute(t,i);if(void 0===e)return;this._updateState=this._updateState|Z,null==e?this.removeAttribute(n):this.setAttribute(n,e),this._updateState=this._updateState&~Z}}_attributeToProperty(e,t){if(this._updateState&Z)return;const i=this.constructor,r=i._attributeToPropertyMap.get(e);if(void 0!==r){const e=i._classProperties.get(r)||X;this._updateState=this._updateState|Q,this[r]=i._propertyValueFromAttribute(t,e),this._updateState=this._updateState&~Q}}_requestUpdate(e,t){let i=!0;if(void 0!==e){const r=this.constructor,n=r._classProperties.get(e)||X;r._valueHasChanged(this[e],t,n.hasChanged)?(this._changedProperties.has(e)||this._changedProperties.set(e,t),!0!==n.reflect||this._updateState&Q||(void 0===this._reflectingProperties&&(this._reflectingProperties=new Map),this._reflectingProperties.set(e,n))):i=!1}!this._hasRequestedUpdate&&i&&this._enqueueUpdate()}requestUpdate(e,t){return this._requestUpdate(e,t),this.updateComplete}async _enqueueUpdate(){let e,t;this._updateState=this._updateState|Y;const i=this._updatePromise;this._updatePromise=new Promise((i,r)=>{e=i,t=r});try{await i}catch(e){}this._hasConnected||await new Promise(e=>this._hasConnectedResolver=e);try{const e=this.performUpdate();null!=e&&await e}catch(e){t(e)}e(!this._hasRequestedUpdate)}get _hasConnected(){return this._updateState&ee}get _hasRequestedUpdate(){return this._updateState&Y}get hasUpdated(){return this._updateState&J}performUpdate(){this._instanceProperties&&this._applyInstanceProperties();let e=!1;const t=this._changedProperties;try{(e=this.shouldUpdate(t))&&this.update(t)}catch(t){throw e=!1,t}finally{this._markUpdated()}e&&(this._updateState&J||(this._updateState=this._updateState|J,this.firstUpdated(t)),this.updated(t))}_markUpdated(){this._changedProperties=new Map,this._updateState=this._updateState&~Y}get updateComplete(){return this._getUpdateComplete()}_getUpdateComplete(){return this._updatePromise}shouldUpdate(e){return!0}update(e){void 0!==this._reflectingProperties&&this._reflectingProperties.size>0&&(this._reflectingProperties.forEach((e,t)=>this._propertyToAttribute(t,this[t],e)),this._reflectingProperties=void 0)}updated(e){}firstUpdated(e){}}ie[te]=!0;const re=e=>t=>"function"==typeof t?((e,t)=>(window.customElements.define(e,t),t))(e,t):((e,t)=>{const{kind:i,elements:r}=t;return{kind:i,elements:r,finisher(t){window.customElements.define(e,t)}}})(e,t),ne=(e,t)=>"method"!==t.kind||!t.descriptor||"value"in t.descriptor?{kind:"field",key:Symbol(),placement:"own",descriptor:{},initializer(){"function"==typeof t.initializer&&(this[t.key]=t.initializer.call(this))},finisher(i){i.createProperty(t.key,e)}}:Object.assign({},t,{finisher(i){i.createProperty(t.key,e)}}),se=(e,t,i)=>{t.constructor.createProperty(i,e)};function ae(e){return(t,i)=>void 0!==i?se(e,t,i):ne(e,t)}function oe(e){return(t,i)=>{const r={get(){return this.renderRoot.querySelector(e)},enumerable:!0,configurable:!0};return void 0!==i?de(r,t,i):ce(r,t)}}const de=(e,t,i)=>{Object.defineProperty(t,i,e)},ce=(e,t)=>({kind:"method",placement:"prototype",key:t.key,descriptor:e}),le="adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,pe=Symbol();class ue{constructor(e,t){if(t!==pe)throw new Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e}get styleSheet(){return void 0===this._styleSheet&&(le?(this._styleSheet=new CSSStyleSheet,this._styleSheet.replaceSync(this.cssText)):this._styleSheet=null),this._styleSheet}toString(){return this.cssText}}const he=function(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),r=1;rt+(e=>{if(e instanceof ue)return e.cssText;if("number"==typeof e)return e;throw new Error(`Value passed to 'css' function must be a 'css' function result: ${e}. Use 'unsafeCSS' to pass non-literal values, but\n take care to ensure page security.`)})(i)+e[r+1],e[0]);return new ue(n,pe)};(window.litElementVersions||(window.litElementVersions=[])).push("2.2.1");const me=e=>e.flat?e.flat(1/0):function e(t){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];for(let r=0,n=t.length;r(e.add(t),e),new Set).forEach(e=>t.unshift(e))}else e&&t.push(e);return t}initialize(){super.initialize(),this.renderRoot=this.createRenderRoot(),window.ShadowRoot&&this.renderRoot instanceof window.ShadowRoot&&this.adoptStyles()}createRenderRoot(){return this.attachShadow({mode:"open"})}adoptStyles(){const e=this.constructor._styles;0!==e.length&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow?le?this.renderRoot.adoptedStyleSheets=e.map(e=>e.styleSheet):this._needsShimAdoptedStyleSheets=!0:window.ShadyCSS.ScopingShim.prepareAdoptedCssText(e.map(e=>e.cssText),this.localName))}connectedCallback(){super.connectedCallback(),this.hasUpdated&&void 0!==window.ShadyCSS&&window.ShadyCSS.styleElement(this)}update(e){super.update(e);const t=this.render();t instanceof y&&this.constructor.render(t,this.renderRoot,{scopeName:this.localName,eventContext:this}),this._needsShimAdoptedStyleSheets&&(this._needsShimAdoptedStyleSheets=!1,this.constructor._styles.forEach(e=>{const t=document.createElement("style");t.textContent=e.cssText,this.renderRoot.appendChild(t)}))}render(){}}fe.finalized=!0,fe.render=((e,t,i)=>{if(!i||"object"!=typeof i||!i.scopeName)throw new Error("The `scopeName` option is required.");const r=i.scopeName,n=V.has(t),a=L&&11===t.nodeType&&!!t.host,o=a&&!q.has(r),d=o?document.createDocumentFragment():t;if(((e,t,i)=>{let r=V.get(t);void 0===r&&(s(t,t.firstChild),V.set(t,r=new k(Object.assign({templateFactory:N},i))),r.appendInto(t)),r.setValue(e),r.commit()})(e,d,Object.assign({templateFactory:U(r)},i)),o){const e=V.get(d);V.delete(d);const i=e.value instanceof _?e.value.template:void 0;j(r,d,i),s(t,t.firstChild),t.appendChild(d),V.set(t,e)}!n&&a&&window.ShadyCSS.styleElement(t.host)});var ge=function(e,t){return(ge=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(e,t)};function _e(e,t){function i(){this.constructor=e}ge(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}var ve=function(){return(ve=Object.assign||function(e){for(var t,i=1,r=arguments.length;i=0;o--)(n=e[o])&&(a=(s<3?n(a):s>3?n(t,i,a):n(t,i))||a);return s>3&&a&&Object.defineProperty(t,i,a),a}const be=he`:host{font-family:var(--mdc-icon-font, "Material Icons");font-weight:400;font-style:normal;font-size:var(--mdc-icon-size,24px);line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale;font-feature-settings:"liga"}`;let we=class extends fe{render(){return H``}};we.styles=be,we=ye([re("mwc-icon")],we);const xe=new WeakMap,Se=i(e=>t=>{if(!(t instanceof S)||t instanceof T||"class"!==t.committer.name||t.committer.parts.length>1)throw new Error("The `classMap` directive must be used in the `class` attribute and must be the only part in the attribute.");const{committer:i}=t,{element:r}=i;xe.has(t)||(r.className=i.strings.join(" "));const{classList:n}=r,s=xe.get(t);for(const t in s)t in e||n.remove(t);for(const t in e){const i=e[t];if(!s||i!==s[t]){n[i?"add":"remove"](t)}}xe.set(t,e)});var ke;function Ce(e,t){if(void 0===e&&(e=window),void 0===t&&(t=!1),void 0===ke||t){var i=!1;try{e.document.addEventListener("test",function(){},{get passive(){return i=!0}})}catch(e){}ke=i}return!!ke&&{passive:!0}}var Ae,Te=function(){function e(e){void 0===e&&(e={}),this.adapter_=e}return Object.defineProperty(e,"cssClasses",{get:function(){return{}},enumerable:!0,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return{}},enumerable:!0,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return{}},enumerable:!0,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{}},enumerable:!0,configurable:!0}),e.prototype.init=function(){},e.prototype.destroy=function(){},e}(),Ee={BG_FOCUSED:"mdc-ripple-upgraded--background-focused",FG_ACTIVATION:"mdc-ripple-upgraded--foreground-activation",FG_DEACTIVATION:"mdc-ripple-upgraded--foreground-deactivation",ROOT:"mdc-ripple-upgraded",UNBOUNDED:"mdc-ripple-upgraded--unbounded"},Re={VAR_FG_SCALE:"--mdc-ripple-fg-scale",VAR_FG_SIZE:"--mdc-ripple-fg-size",VAR_FG_TRANSLATE_END:"--mdc-ripple-fg-translate-end",VAR_FG_TRANSLATE_START:"--mdc-ripple-fg-translate-start",VAR_LEFT:"--mdc-ripple-left",VAR_TOP:"--mdc-ripple-top"},Ie={DEACTIVATION_TIMEOUT_MS:225,FG_DEACTIVATION_MS:150,INITIAL_ORIGIN_SCALE:.6,PADDING:10,TAP_DELAY_MS:300};var Pe=["touchstart","pointerdown","mousedown","keydown"],Ne=["touchend","pointerup","mouseup","contextmenu"],Me=[],Ve=function(e){function t(i){var r=e.call(this,ve({},t.defaultAdapter,i))||this;return r.activationAnimationHasEnded_=!1,r.activationTimer_=0,r.fgDeactivationRemovalTimer_=0,r.fgScale_="0",r.frame_={width:0,height:0},r.initialSize_=0,r.layoutFrame_=0,r.maxRadius_=0,r.unboundedCoords_={left:0,top:0},r.activationState_=r.defaultActivationState_(),r.activationTimerCallback_=function(){r.activationAnimationHasEnded_=!0,r.runDeactivationUXLogicIfReady_()},r.activateHandler_=function(e){return r.activate_(e)},r.deactivateHandler_=function(){return r.deactivate_()},r.focusHandler_=function(){return r.handleFocus()},r.blurHandler_=function(){return r.handleBlur()},r.resizeHandler_=function(){return r.layout()},r}return _e(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return Ee},enumerable:!0,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return Re},enumerable:!0,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return Ie},enumerable:!0,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{addClass:function(){},browserSupportsCssVars:function(){return!0},computeBoundingRect:function(){return{top:0,right:0,bottom:0,left:0,width:0,height:0}},containsEventTarget:function(){return!0},deregisterDocumentInteractionHandler:function(){},deregisterInteractionHandler:function(){},deregisterResizeHandler:function(){},getWindowPageOffset:function(){return{x:0,y:0}},isSurfaceActive:function(){return!0},isSurfaceDisabled:function(){return!0},isUnbounded:function(){return!0},registerDocumentInteractionHandler:function(){},registerInteractionHandler:function(){},registerResizeHandler:function(){},removeClass:function(){},updateCssVariable:function(){}}},enumerable:!0,configurable:!0}),t.prototype.init=function(){var e=this,i=this.supportsPressRipple_();if(this.registerRootHandlers_(i),i){var r=t.cssClasses,n=r.ROOT,s=r.UNBOUNDED;requestAnimationFrame(function(){e.adapter_.addClass(n),e.adapter_.isUnbounded()&&(e.adapter_.addClass(s),e.layoutInternal_())})}},t.prototype.destroy=function(){var e=this;if(this.supportsPressRipple_()){this.activationTimer_&&(clearTimeout(this.activationTimer_),this.activationTimer_=0,this.adapter_.removeClass(t.cssClasses.FG_ACTIVATION)),this.fgDeactivationRemovalTimer_&&(clearTimeout(this.fgDeactivationRemovalTimer_),this.fgDeactivationRemovalTimer_=0,this.adapter_.removeClass(t.cssClasses.FG_DEACTIVATION));var i=t.cssClasses,r=i.ROOT,n=i.UNBOUNDED;requestAnimationFrame(function(){e.adapter_.removeClass(r),e.adapter_.removeClass(n),e.removeCssVars_()})}this.deregisterRootHandlers_(),this.deregisterDeactivationHandlers_()},t.prototype.activate=function(e){this.activate_(e)},t.prototype.deactivate=function(){this.deactivate_()},t.prototype.layout=function(){var e=this;this.layoutFrame_&&cancelAnimationFrame(this.layoutFrame_),this.layoutFrame_=requestAnimationFrame(function(){e.layoutInternal_(),e.layoutFrame_=0})},t.prototype.setUnbounded=function(e){var i=t.cssClasses.UNBOUNDED;e?this.adapter_.addClass(i):this.adapter_.removeClass(i)},t.prototype.handleFocus=function(){var e=this;requestAnimationFrame(function(){return e.adapter_.addClass(t.cssClasses.BG_FOCUSED)})},t.prototype.handleBlur=function(){var e=this;requestAnimationFrame(function(){return e.adapter_.removeClass(t.cssClasses.BG_FOCUSED)})},t.prototype.supportsPressRipple_=function(){return this.adapter_.browserSupportsCssVars()},t.prototype.defaultActivationState_=function(){return{activationEvent:void 0,hasDeactivationUXRun:!1,isActivated:!1,isProgrammatic:!1,wasActivatedByPointer:!1,wasElementMadeActive:!1}},t.prototype.registerRootHandlers_=function(e){var t=this;e&&(Pe.forEach(function(e){t.adapter_.registerInteractionHandler(e,t.activateHandler_)}),this.adapter_.isUnbounded()&&this.adapter_.registerResizeHandler(this.resizeHandler_)),this.adapter_.registerInteractionHandler("focus",this.focusHandler_),this.adapter_.registerInteractionHandler("blur",this.blurHandler_)},t.prototype.registerDeactivationHandlers_=function(e){var t=this;"keydown"===e.type?this.adapter_.registerInteractionHandler("keyup",this.deactivateHandler_):Ne.forEach(function(e){t.adapter_.registerDocumentInteractionHandler(e,t.deactivateHandler_)})},t.prototype.deregisterRootHandlers_=function(){var e=this;Pe.forEach(function(t){e.adapter_.deregisterInteractionHandler(t,e.activateHandler_)}),this.adapter_.deregisterInteractionHandler("focus",this.focusHandler_),this.adapter_.deregisterInteractionHandler("blur",this.blurHandler_),this.adapter_.isUnbounded()&&this.adapter_.deregisterResizeHandler(this.resizeHandler_)},t.prototype.deregisterDeactivationHandlers_=function(){var e=this;this.adapter_.deregisterInteractionHandler("keyup",this.deactivateHandler_),Ne.forEach(function(t){e.adapter_.deregisterDocumentInteractionHandler(t,e.deactivateHandler_)})},t.prototype.removeCssVars_=function(){var e=this,i=t.strings;Object.keys(i).forEach(function(t){0===t.indexOf("VAR_")&&e.adapter_.updateCssVariable(i[t],null)})},t.prototype.activate_=function(e){var t=this;if(!this.adapter_.isSurfaceDisabled()){var i=this.activationState_;if(!i.isActivated){var r=this.previousActivationEvent_;if(!(r&&void 0!==e&&r.type!==e.type))i.isActivated=!0,i.isProgrammatic=void 0===e,i.activationEvent=e,i.wasActivatedByPointer=!i.isProgrammatic&&(void 0!==e&&("mousedown"===e.type||"touchstart"===e.type||"pointerdown"===e.type)),void 0!==e&&Me.length>0&&Me.some(function(e){return t.adapter_.containsEventTarget(e)})?this.resetActivationState_():(void 0!==e&&(Me.push(e.target),this.registerDeactivationHandlers_(e)),i.wasElementMadeActive=this.checkElementMadeActive_(e),i.wasElementMadeActive&&this.animateActivation_(),requestAnimationFrame(function(){Me=[],i.wasElementMadeActive||void 0===e||" "!==e.key&&32!==e.keyCode||(i.wasElementMadeActive=t.checkElementMadeActive_(e),i.wasElementMadeActive&&t.animateActivation_()),i.wasElementMadeActive||(t.activationState_=t.defaultActivationState_())}))}}},t.prototype.checkElementMadeActive_=function(e){return void 0===e||"keydown"!==e.type||this.adapter_.isSurfaceActive()},t.prototype.animateActivation_=function(){var e=this,i=t.strings,r=i.VAR_FG_TRANSLATE_START,n=i.VAR_FG_TRANSLATE_END,s=t.cssClasses,a=s.FG_DEACTIVATION,o=s.FG_ACTIVATION,d=t.numbers.DEACTIVATION_TIMEOUT_MS;this.layoutInternal_();var c="",l="";if(!this.adapter_.isUnbounded()){var p=this.getFgTranslationCoordinates_(),u=p.startPoint,h=p.endPoint;c=u.x+"px, "+u.y+"px",l=h.x+"px, "+h.y+"px"}this.adapter_.updateCssVariable(r,c),this.adapter_.updateCssVariable(n,l),clearTimeout(this.activationTimer_),clearTimeout(this.fgDeactivationRemovalTimer_),this.rmBoundedActivationClasses_(),this.adapter_.removeClass(a),this.adapter_.computeBoundingRect(),this.adapter_.addClass(o),this.activationTimer_=setTimeout(function(){return e.activationTimerCallback_()},d)},t.prototype.getFgTranslationCoordinates_=function(){var e,t=this.activationState_,i=t.activationEvent;return{startPoint:e={x:(e=t.wasActivatedByPointer?function(e,t,i){if(!e)return{x:0,y:0};var r,n,s=t.x,a=t.y,o=s+i.left,d=a+i.top;if("touchstart"===e.type){var c=e;r=c.changedTouches[0].pageX-o,n=c.changedTouches[0].pageY-d}else{var l=e;r=l.pageX-o,n=l.pageY-d}return{x:r,y:n}}(i,this.adapter_.getWindowPageOffset(),this.adapter_.computeBoundingRect()):{x:this.frame_.width/2,y:this.frame_.height/2}).x-this.initialSize_/2,y:e.y-this.initialSize_/2},endPoint:{x:this.frame_.width/2-this.initialSize_/2,y:this.frame_.height/2-this.initialSize_/2}}},t.prototype.runDeactivationUXLogicIfReady_=function(){var e=this,i=t.cssClasses.FG_DEACTIVATION,r=this.activationState_,n=r.hasDeactivationUXRun,s=r.isActivated;(n||!s)&&this.activationAnimationHasEnded_&&(this.rmBoundedActivationClasses_(),this.adapter_.addClass(i),this.fgDeactivationRemovalTimer_=setTimeout(function(){e.adapter_.removeClass(i)},Ie.FG_DEACTIVATION_MS))},t.prototype.rmBoundedActivationClasses_=function(){var e=t.cssClasses.FG_ACTIVATION;this.adapter_.removeClass(e),this.activationAnimationHasEnded_=!1,this.adapter_.computeBoundingRect()},t.prototype.resetActivationState_=function(){var e=this;this.previousActivationEvent_=this.activationState_.activationEvent,this.activationState_=this.defaultActivationState_(),setTimeout(function(){return e.previousActivationEvent_=void 0},t.numbers.TAP_DELAY_MS)},t.prototype.deactivate_=function(){var e=this,t=this.activationState_;if(t.isActivated){var i=ve({},t);t.isProgrammatic?(requestAnimationFrame(function(){return e.animateDeactivation_(i)}),this.resetActivationState_()):(this.deregisterDeactivationHandlers_(),requestAnimationFrame(function(){e.activationState_.hasDeactivationUXRun=!0,e.animateDeactivation_(i),e.resetActivationState_()}))}},t.prototype.animateDeactivation_=function(e){var t=e.wasActivatedByPointer,i=e.wasElementMadeActive;(t||i)&&this.runDeactivationUXLogicIfReady_()},t.prototype.layoutInternal_=function(){var e=this;this.frame_=this.adapter_.computeBoundingRect();var i=Math.max(this.frame_.height,this.frame_.width);this.maxRadius_=this.adapter_.isUnbounded()?i:Math.sqrt(Math.pow(e.frame_.width,2)+Math.pow(e.frame_.height,2))+t.numbers.PADDING,this.initialSize_=Math.floor(i*t.numbers.INITIAL_ORIGIN_SCALE),this.fgScale_=""+this.maxRadius_/this.initialSize_,this.updateLayoutCssVars_()},t.prototype.updateLayoutCssVars_=function(){var e=t.strings,i=e.VAR_FG_SIZE,r=e.VAR_LEFT,n=e.VAR_TOP,s=e.VAR_FG_SCALE;this.adapter_.updateCssVariable(i,this.initialSize_+"px"),this.adapter_.updateCssVariable(s,this.fgScale_),this.adapter_.isUnbounded()&&(this.unboundedCoords_={left:Math.round(this.frame_.width/2-this.initialSize_/2),top:Math.round(this.frame_.height/2-this.initialSize_/2)},this.adapter_.updateCssVariable(r,this.unboundedCoords_.left+"px"),this.adapter_.updateCssVariable(n,this.unboundedCoords_.top+"px"))},t}(Te);const He=he`@keyframes mdc-ripple-fg-radius-in{from{animation-timing-function:cubic-bezier(.4,0,.2,1);transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1)}to{transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}}@keyframes mdc-ripple-fg-opacity-in{from{animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity,0)}}@keyframes mdc-ripple-fg-opacity-out{from{animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity,0)}to{opacity:0}}`,Oe=function(e,t){void 0===t&&(t=!1);var i=e.CSS,r=Ae;if("boolean"==typeof Ae&&!t)return Ae;if(!i||"function"!=typeof i.supports)return!1;var n=i.supports("--css-vars","yes"),s=i.supports("(--css-vars: yes)")&&i.supports("color","#00000000");return r=!(!n&&!s||function(e){var t=e.document,i=t.createElement("div");i.className="mdc-ripple-surface--test-edge-var-bug",t.head.appendChild(i);var r=e.getComputedStyle(i),n=null!==r&&"solid"===r.borderTopStyle;return i.parentNode&&i.parentNode.removeChild(i),n}(e)),t||(Ae=r),r}(window),Fe=navigator.userAgent.match(/Safari/);let De=!1;const ze=e=>{Fe&&!De&&(()=>{De=!0;const e=new k({templateFactory:N});e.appendInto(document.head),e.setValue(He),e.commit()})();const t=e.surfaceNode,i=e.interactionNode||t;i.getRootNode()!==t.getRootNode()&&""===i.style.position&&(i.style.position="relative");const r=new Ve({browserSupportsCssVars:()=>Oe,isUnbounded:()=>void 0===e.unbounded||e.unbounded,isSurfaceActive:()=>(function(e,t){return(e.matches||e.webkitMatchesSelector||e.msMatchesSelector).call(e,t)})(i,":active"),isSurfaceDisabled:()=>Boolean(e.disabled),addClass:e=>t.classList.add(e),removeClass:e=>t.classList.remove(e),containsEventTarget:e=>i.contains(e),registerInteractionHandler:(e,t)=>i.addEventListener(e,t,Ce()),deregisterInteractionHandler:(e,t)=>i.removeEventListener(e,t,Ce()),registerDocumentInteractionHandler:(e,t)=>document.documentElement.addEventListener(e,t,Ce()),deregisterDocumentInteractionHandler:(e,t)=>document.documentElement.removeEventListener(e,t,Ce()),registerResizeHandler:e=>window.addEventListener("resize",e),deregisterResizeHandler:e=>window.removeEventListener("resize",e),updateCssVariable:(e,i)=>t.style.setProperty(e,i),computeBoundingRect:()=>t.getBoundingClientRect(),getWindowPageOffset:()=>({x:window.pageXOffset,y:window.pageYOffset})});return r.init(),r},Be=new WeakMap,Le=i(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t=>{const i=t.committer.element,r=e.interactionNode||i;let n=t.value;const s=Be.get(n);void 0!==s&&s!==r&&(n.destroy(),n=a),n===a?(n=ze(Object.assign({},e,{surfaceNode:i})),Be.set(n,r),t.setValue(n)):(void 0!==e.unbounded&&n.setUnbounded(e.unbounded),void 0!==e.disabled&&n.setUnbounded(e.disabled)),!0===e.active?n.activate():!1===e.active&&n.deactivate()}});class Ue extends fe{constructor(){super(...arguments),this.primary=!1,this.accent=!1,this.unbounded=!1,this.disabled=!1,this.interactionNode=this}connectedCallback(){if(this.interactionNode===this){const e=this.parentNode;e instanceof HTMLElement&&(this.interactionNode=e)}super.connectedCallback()}render(){const e={"mdc-ripple-surface--primary":this.primary,"mdc-ripple-surface--accent":this.accent},{disabled:t,unbounded:i,active:r,interactionNode:n}=this,s={disabled:t,unbounded:i,interactionNode:n};return void 0!==r&&(s.active=r),H`
`}}ye([ae({type:Boolean})],Ue.prototype,"primary",void 0),ye([ae({type:Boolean})],Ue.prototype,"active",void 0),ye([ae({type:Boolean})],Ue.prototype,"accent",void 0),ye([ae({type:Boolean})],Ue.prototype,"unbounded",void 0),ye([ae({type:Boolean})],Ue.prototype,"disabled",void 0),ye([ae({attribute:!1})],Ue.prototype,"interactionNode",void 0);const $e=he`@keyframes mdc-ripple-fg-radius-in{from{animation-timing-function:cubic-bezier(.4,0,.2,1);transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1)}to{transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}}@keyframes mdc-ripple-fg-opacity-in{from{animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity,0)}}@keyframes mdc-ripple-fg-opacity-out{from{animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity,0)}to{opacity:0}}.mdc-ripple-surface--test-edge-var-bug{--mdc-ripple-surface-test-edge-var:1px solid #000;visibility:hidden}.mdc-ripple-surface--test-edge-var-bug::before{border:var(--mdc-ripple-surface-test-edge-var)}.mdc-ripple-surface{--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:transparent;position:relative;outline:0;overflow:hidden}.mdc-ripple-surface::before,.mdc-ripple-surface::after{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:""}.mdc-ripple-surface::before{transition:opacity 15ms linear,background-color 15ms linear;z-index:1}.mdc-ripple-surface.mdc-ripple-upgraded::before{transform:scale(var(--mdc-ripple-fg-scale,1))}.mdc-ripple-surface.mdc-ripple-upgraded::after{top:0;left:0;transform:scale(0);transform-origin:center center}.mdc-ripple-surface.mdc-ripple-upgraded--unbounded::after{top:var(--mdc-ripple-top,0);left:var(--mdc-ripple-left,0)}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-activation::after{animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-deactivation::after{animation:mdc-ripple-fg-opacity-out 150ms;transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}.mdc-ripple-surface::before,.mdc-ripple-surface::after{background-color:#000}.mdc-ripple-surface:hover::before{opacity:.04}.mdc-ripple-surface.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:.12}.mdc-ripple-surface:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:.12}.mdc-ripple-surface.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:0.12}.mdc-ripple-surface::before,.mdc-ripple-surface::after{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.mdc-ripple-surface.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded]{overflow:visible}.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::before,.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::after{top:calc(50% - 50%);left:calc(50% - 50%);width:100%;height:100%}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::before,.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after{top:var(--mdc-ripple-top,calc(50% - 50%));left:var(--mdc-ripple-left,calc(50% - 50%));width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-ripple-surface--primary::before,.mdc-ripple-surface--primary::after{background-color:#6200ee}@supports not (-ms-ime-align: auto){.mdc-ripple-surface--primary::before,.mdc-ripple-surface--primary::after{background-color:var(--mdc-theme-primary,#6200ee)}}.mdc-ripple-surface--primary:hover::before{opacity:.04}.mdc-ripple-surface--primary.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--primary:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:.12}.mdc-ripple-surface--primary:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--primary:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:.12}.mdc-ripple-surface--primary.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:0.12}.mdc-ripple-surface--accent::before,.mdc-ripple-surface--accent::after{background-color:#018786}@supports not (-ms-ime-align: auto){.mdc-ripple-surface--accent::before,.mdc-ripple-surface--accent::after{background-color:var(--mdc-theme-secondary,#018786)}}.mdc-ripple-surface--accent:hover::before{opacity:.04}.mdc-ripple-surface--accent.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--accent:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:.12}.mdc-ripple-surface--accent:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--accent:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:.12}.mdc-ripple-surface--accent.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:0.12}.mdc-ripple-surface{pointer-events:none;position:absolute;top:0;right:0;bottom:0;left:0}`;let qe=class extends Ue{};qe.styles=$e,qe=ye([re("mwc-ripple")],qe);class je extends fe{constructor(){super(...arguments),this.disabled=!1,this.icon="",this.label=""}render(){return H``}}ye([ae({type:Boolean,reflect:!0})],je.prototype,"disabled",void 0),ye([ae({type:String})],je.prototype,"icon",void 0),ye([ae({type:String})],je.prototype,"label",void 0);const Ge=he`.mdc-icon-button{width:48px;height:48px;padding:12px;font-size:24px;display:inline-block;position:relative;box-sizing:border-box;border:none;outline:0;background-color:transparent;fill:currentColor;color:inherit;text-decoration:none;cursor:pointer;user-select:none}.mdc-icon-button svg,.mdc-icon-button img{width:24px;height:24px}.mdc-icon-button:disabled{color:rgba(0,0,0,.38);color:var(--mdc-theme-text-disabled-on-light,rgba(0,0,0,.38));cursor:default;pointer-events:none}.mdc-icon-button__icon{display:inline-block}.mdc-icon-button__icon.mdc-icon-button__icon--on{display:none}.mdc-icon-button--on .mdc-icon-button__icon{display:none}.mdc-icon-button--on .mdc-icon-button__icon.mdc-icon-button__icon--on{display:inline-block}@keyframes mdc-ripple-fg-radius-in{from{animation-timing-function:cubic-bezier(.4,0,.2,1);transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1)}to{transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}}@keyframes mdc-ripple-fg-opacity-in{from{animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity,0)}}@keyframes mdc-ripple-fg-opacity-out{from{animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity,0)}to{opacity:0}}.mdc-ripple-surface--test-edge-var-bug{--mdc-ripple-surface-test-edge-var:1px solid #000;visibility:hidden}.mdc-ripple-surface--test-edge-var-bug::before{border:var(--mdc-ripple-surface-test-edge-var)}.mdc-icon-button{--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:transparent}.mdc-icon-button::before,.mdc-icon-button::after{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:""}.mdc-icon-button::before{transition:opacity 15ms linear,background-color 15ms linear;z-index:1}.mdc-icon-button.mdc-ripple-upgraded::before{transform:scale(var(--mdc-ripple-fg-scale,1))}.mdc-icon-button.mdc-ripple-upgraded::after{top:0;left:0;transform:scale(0);transform-origin:center center}.mdc-icon-button.mdc-ripple-upgraded--unbounded::after{top:var(--mdc-ripple-top,0);left:var(--mdc-ripple-left,0)}.mdc-icon-button.mdc-ripple-upgraded--foreground-activation::after{animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.mdc-icon-button.mdc-ripple-upgraded--foreground-deactivation::after{animation:mdc-ripple-fg-opacity-out 150ms;transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}.mdc-icon-button::before,.mdc-icon-button::after{top:calc(50% - 50%);left:calc(50% - 50%);width:100%;height:100%}.mdc-icon-button.mdc-ripple-upgraded::before,.mdc-icon-button.mdc-ripple-upgraded::after{top:var(--mdc-ripple-top,calc(50% - 50%));left:var(--mdc-ripple-left,calc(50% - 50%));width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-icon-button.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-icon-button::before,.mdc-icon-button::after{background-color:#000}.mdc-icon-button:hover::before{opacity:.04}.mdc-icon-button.mdc-ripple-upgraded--background-focused::before,.mdc-icon-button:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:.12}.mdc-icon-button:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-icon-button:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:.12}.mdc-icon-button.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:0.12}.material-icons{font-family:var(--mdc-icon-font, "Material Icons");font-weight:400;font-style:normal;font-size:var(--mdc-icon-size,24px);line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale;font-feature-settings:"liga"}:host{display:inline-block;outline:0}.mdc-ripple-upgraded:focus::before,.mdc-ripple-upgraded:focus::after{background-color:currentColor;background-color:var(--mdc-theme-on-primary,currentColor);opacity:.12;opacity:var(--mdc-icon-button-ripple-opacity,.12)}`;let We=class extends je{};We.styles=Ge,We=ye([re("mwc-icon-button")],We);const Xe=e=>(t,i)=>{if(t.constructor._observers){if(!t.constructor.hasOwnProperty("_observers")){const e=t.constructor._observers;t.constructor._observers=new Map,e.forEach((e,i)=>t.constructor._observers.set(i,e))}}else{t.constructor._observers=new Map;const e=t.updated;t.updated=function(t){e.call(this,t),t.forEach((e,t)=>{const i=this.constructor._observers.get(t);void 0!==i&&i.call(this,this[t],e)})}}t.constructor._observers.set(i,e)};const Ke=()=>{},Je={get passive(){return!1}};document.addEventListener("x",Ke,Je),document.removeEventListener("x",Ke);class Ye extends fe{createFoundation(){void 0!==this.mdcFoundation&&this.mdcFoundation.destroy(),this.mdcFoundation=new this.mdcFoundationClass(this.createAdapter()),this.mdcFoundation.init()}firstUpdated(){this.createFoundation()}}class Ze extends Ye{createRenderRoot(){return this.attachShadow({mode:"open",delegatesFocus:!0})}click(){this.formElement&&(this.formElement.focus(),this.formElement.click())}setAriaLabel(e){this.formElement&&this.formElement.setAttribute("aria-label",e)}firstUpdated(){super.firstUpdated(),this.mdcRoot.addEventListener("change",e=>{this.dispatchEvent(new Event("change",e))})}}var Qe={animation:{prefixed:"-webkit-animation",standard:"animation"},transform:{prefixed:"-webkit-transform",standard:"transform"},transition:{prefixed:"-webkit-transition",standard:"transition"}},et={animationend:{cssProperty:"animation",prefixed:"webkitAnimationEnd",standard:"animationend"},animationiteration:{cssProperty:"animation",prefixed:"webkitAnimationIteration",standard:"animationiteration"},animationstart:{cssProperty:"animation",prefixed:"webkitAnimationStart",standard:"animationstart"},transitionend:{cssProperty:"transition",prefixed:"webkitTransitionEnd",standard:"transitionend"}};function tt(e){return Boolean(e.document)&&"function"==typeof e.document.createElement}var it={ACTIVE:"mdc-slider--active",DISABLED:"mdc-slider--disabled",DISCRETE:"mdc-slider--discrete",FOCUS:"mdc-slider--focus",HAS_TRACK_MARKER:"mdc-slider--display-markers",IN_TRANSIT:"mdc-slider--in-transit",IS_DISCRETE:"mdc-slider--discrete"},rt={ARIA_DISABLED:"aria-disabled",ARIA_VALUEMAX:"aria-valuemax",ARIA_VALUEMIN:"aria-valuemin",ARIA_VALUENOW:"aria-valuenow",CHANGE_EVENT:"MDCSlider:change",INPUT_EVENT:"MDCSlider:input",PIN_VALUE_MARKER_SELECTOR:".mdc-slider__pin-value-marker",STEP_DATA_ATTR:"data-step",THUMB_CONTAINER_SELECTOR:".mdc-slider__thumb-container",TRACK_MARKER_CONTAINER_SELECTOR:".mdc-slider__track-marker-container",TRACK_SELECTOR:".mdc-slider__track"},nt={PAGE_FACTOR:4},st=["mousedown","pointerdown","touchstart"],at=["mouseup","pointerup","touchend"],ot={mousedown:"mousemove",pointerdown:"pointermove",touchstart:"touchmove"},dt="ArrowDown",ct="ArrowLeft",lt="ArrowRight",pt="ArrowUp",ut="End",ht="Home",mt="PageDown",ft="PageUp",gt=function(e){function t(i){var r=e.call(this,ve({},t.defaultAdapter,i))||this;return r.savedTabIndex_=NaN,r.active_=!1,r.inTransit_=!1,r.isDiscrete_=!1,r.hasTrackMarker_=!1,r.handlingThumbTargetEvt_=!1,r.min_=0,r.max_=100,r.step_=0,r.value_=0,r.disabled_=!1,r.preventFocusState_=!1,r.thumbContainerPointerHandler_=function(){return r.handlingThumbTargetEvt_=!0},r.interactionStartHandler_=function(e){return r.handleDown_(e)},r.keydownHandler_=function(e){return r.handleKeydown_(e)},r.focusHandler_=function(){return r.handleFocus_()},r.blurHandler_=function(){return r.handleBlur_()},r.resizeHandler_=function(){return r.layout()},r}return _e(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return it},enumerable:!0,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return rt},enumerable:!0,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return nt},enumerable:!0,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{hasClass:function(){return!1},addClass:function(){},removeClass:function(){},getAttribute:function(){return null},setAttribute:function(){},removeAttribute:function(){},computeBoundingRect:function(){return{top:0,right:0,bottom:0,left:0,width:0,height:0}},getTabIndex:function(){return 0},registerInteractionHandler:function(){},deregisterInteractionHandler:function(){},registerThumbContainerInteractionHandler:function(){},deregisterThumbContainerInteractionHandler:function(){},registerBodyInteractionHandler:function(){},deregisterBodyInteractionHandler:function(){},registerResizeHandler:function(){},deregisterResizeHandler:function(){},notifyInput:function(){},notifyChange:function(){},setThumbContainerStyleProperty:function(){},setTrackStyleProperty:function(){},setMarkerValue:function(){},setTrackMarkers:function(){},isRTL:function(){return!1}}},enumerable:!0,configurable:!0}),t.prototype.init=function(){var e=this;this.isDiscrete_=this.adapter_.hasClass(it.IS_DISCRETE),this.hasTrackMarker_=this.adapter_.hasClass(it.HAS_TRACK_MARKER),st.forEach(function(t){e.adapter_.registerInteractionHandler(t,e.interactionStartHandler_),e.adapter_.registerThumbContainerInteractionHandler(t,e.thumbContainerPointerHandler_)}),this.adapter_.registerInteractionHandler("keydown",this.keydownHandler_),this.adapter_.registerInteractionHandler("focus",this.focusHandler_),this.adapter_.registerInteractionHandler("blur",this.blurHandler_),this.adapter_.registerResizeHandler(this.resizeHandler_),this.layout(),this.isDiscrete_&&0===this.getStep()&&(this.step_=1)},t.prototype.destroy=function(){var e=this;st.forEach(function(t){e.adapter_.deregisterInteractionHandler(t,e.interactionStartHandler_),e.adapter_.deregisterThumbContainerInteractionHandler(t,e.thumbContainerPointerHandler_)}),this.adapter_.deregisterInteractionHandler("keydown",this.keydownHandler_),this.adapter_.deregisterInteractionHandler("focus",this.focusHandler_),this.adapter_.deregisterInteractionHandler("blur",this.blurHandler_),this.adapter_.deregisterResizeHandler(this.resizeHandler_)},t.prototype.setupTrackMarker=function(){this.isDiscrete_&&this.hasTrackMarker_&&0!==this.getStep()&&this.adapter_.setTrackMarkers(this.getStep(),this.getMax(),this.getMin())},t.prototype.layout=function(){this.rect_=this.adapter_.computeBoundingRect(),this.updateUIForCurrentValue_()},t.prototype.getValue=function(){return this.value_},t.prototype.setValue=function(e){this.setValue_(e,!1)},t.prototype.getMax=function(){return this.max_},t.prototype.setMax=function(e){if(ethis.max_)throw new Error("Cannot set min to be greater than the slider's maximum value");this.min_=e,this.setValue_(this.value_,!1,!0),this.adapter_.setAttribute(rt.ARIA_VALUEMIN,String(this.min_)),this.setupTrackMarker()},t.prototype.getStep=function(){return this.step_},t.prototype.setStep=function(e){if(e<0)throw new Error("Step cannot be set to a negative number");this.isDiscrete_&&("number"!=typeof e||e<1)&&(e=1),this.step_=e,this.setValue_(this.value_,!1,!0),this.setupTrackMarker()},t.prototype.isDisabled=function(){return this.disabled_},t.prototype.setDisabled=function(e){this.disabled_=e,this.toggleClass_(it.DISABLED,this.disabled_),this.disabled_?(this.savedTabIndex_=this.adapter_.getTabIndex(),this.adapter_.setAttribute(rt.ARIA_DISABLED,"true"),this.adapter_.removeAttribute("tabindex")):(this.adapter_.removeAttribute(rt.ARIA_DISABLED),isNaN(this.savedTabIndex_)||this.adapter_.setAttribute("tabindex",String(this.savedTabIndex_)))},t.prototype.handleDown_=function(e){var t=this;if(!this.disabled_){this.preventFocusState_=!0,this.setInTransit_(!this.handlingThumbTargetEvt_),this.handlingThumbTargetEvt_=!1,this.setActive_(!0);var i=function(e){t.handleMove_(e)},r=ot[e.type],n=function e(){t.handleUp_(),t.adapter_.deregisterBodyInteractionHandler(r,i),at.forEach(function(i){return t.adapter_.deregisterBodyInteractionHandler(i,e)})};this.adapter_.registerBodyInteractionHandler(r,i),at.forEach(function(e){return t.adapter_.registerBodyInteractionHandler(e,n)}),this.setValueFromEvt_(e)}},t.prototype.handleMove_=function(e){e.preventDefault(),this.setValueFromEvt_(e)},t.prototype.handleUp_=function(){this.setActive_(!1),this.adapter_.notifyChange()},t.prototype.getPageX_=function(e){return e.targetTouches&&e.targetTouches.length>0?e.targetTouches[0].pageX:e.pageX},t.prototype.setValueFromEvt_=function(e){var t=this.getPageX_(e),i=this.computeValueFromPageX_(t);this.setValue_(i,!0)},t.prototype.computeValueFromPageX_=function(e){var t=this.max_,i=this.min_,r=(e-this.rect_.left)/this.rect_.width;return this.adapter_.isRTL()&&(r=1-r),i+r*(t-i)},t.prototype.handleKeydown_=function(e){var t=this.getKeyId_(e),i=this.getValueForKeyId_(t);isNaN(i)||(e.preventDefault(),this.adapter_.addClass(it.FOCUS),this.setValue_(i,!0),this.adapter_.notifyChange())},t.prototype.getKeyId_=function(e){return e.key===ct||37===e.keyCode?ct:e.key===lt||39===e.keyCode?lt:e.key===pt||38===e.keyCode?pt:e.key===dt||40===e.keyCode?dt:e.key===ht||36===e.keyCode?ht:e.key===ut||35===e.keyCode?ut:e.key===ft||33===e.keyCode?ft:e.key===mt||34===e.keyCode?mt:""},t.prototype.getValueForKeyId_=function(e){var t=this.max_,i=this.min_,r=this.step_||(t-i)/100;switch(this.adapter_.isRTL()&&(e===ct||e===lt)&&(r=-r),e){case ct:case dt:return this.value_-r;case lt:case pt:return this.value_+r;case ht:return this.min_;case ut:return this.max_;case ft:return this.value_+r*nt.PAGE_FACTOR;case mt:return this.value_-r*nt.PAGE_FACTOR;default:return NaN}},t.prototype.handleFocus_=function(){this.preventFocusState_||this.adapter_.addClass(it.FOCUS)},t.prototype.handleBlur_=function(){this.preventFocusState_=!1,this.adapter_.removeClass(it.FOCUS)},t.prototype.setValue_=function(e,t,i){if(void 0===i&&(i=!1),e!==this.value_||i){var r=this.min_,n=this.max_,s=e===r||e===n;this.step_&&!s&&(e=this.quantize_(e)),en&&(e=n),this.value_=e,this.adapter_.setAttribute(rt.ARIA_VALUENOW,String(this.value_)),this.updateUIForCurrentValue_(),t&&(this.adapter_.notifyInput(),this.isDiscrete_&&this.adapter_.setMarkerValue(e))}},t.prototype.quantize_=function(e){return Math.round(e/this.step_)*this.step_},t.prototype.updateUIForCurrentValue_=function(){var e=this,t=this.max_,i=this.min_,r=(this.value_-i)/(t-i),n=r*this.rect_.width;this.adapter_.isRTL()&&(n=this.rect_.width-n);var s=function(e,t){if(tt(e)&&t in Qe){var i=e.document.createElement("div"),r=Qe[t],n=r.standard,s=r.prefixed;return n in i.style?n:s}return t}(window,"transform"),a=function(e,t){if(tt(e)&&t in et){var i=e.document.createElement("div"),r=et[t],n=r.standard,s=r.prefixed;return r.cssProperty in i.style?n:s}return t}(window,"transitionend");if(this.inTransit_){this.adapter_.registerThumbContainerInteractionHandler(a,function t(){e.setInTransit_(!1),e.adapter_.deregisterThumbContainerInteractionHandler(a,t)})}requestAnimationFrame(function(){e.adapter_.setThumbContainerStyleProperty(s,"translateX("+n+"px) translateX(-50%)"),e.adapter_.setTrackStyleProperty(s,"scaleX("+r+")")})},t.prototype.setActive_=function(e){this.active_=e,this.toggleClass_(it.ACTIVE,this.active_)},t.prototype.setInTransit_=function(e){this.inTransit_=e,this.toggleClass_(it.IN_TRANSIT,this.inTransit_)},t.prototype.toggleClass_=function(e,t){t?this.adapter_.addClass(e):this.adapter_.removeClass(e)},t}(Te);const _t=(e,t)=>{const i=e.startNode.parentNode,r=void 0===t?e.endNode:t.startNode,n=i.insertBefore(f(),r);i.insertBefore(f(),r);const s=new k(e.options);return s.insertAfterNode(n),s},vt=(e,t)=>(e.setValue(t),e.commit(),e),yt=(e,t,i)=>{const r=e.startNode.parentNode,n=i?i.startNode:e.endNode,s=t.endNode.nextSibling;s!==n&&function(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;for(;t!==i;){const i=t.nextSibling;e.insertBefore(t,r),t=i}}(r,t.startNode,s,n)},bt=e=>{s(e.startNode.parentNode,e.startNode,e.endNode.nextSibling)},wt=(e,t,i)=>{const r=new Map;for(let n=t;n<=i;n++)r.set(e[n],n);return r},xt=new WeakMap,St=new WeakMap,kt=i((e,t,i)=>{let r;return void 0===i?i=t:void 0!==t&&(r=t),t=>{if(!(t instanceof k))throw new Error("repeat can only be used in text bindings");const n=xt.get(t)||[],s=St.get(t)||[],a=[],o=[],d=[];let c,l,p=0;for(const t of e)d[p]=r?r(t,p):p,o[p]=i(t,p),p++;let u=0,h=n.length-1,m=0,f=o.length-1;for(;u<=h&&m<=f;)if(null===n[u])u++;else if(null===n[h])h--;else if(s[u]===d[m])a[m]=vt(n[u],o[m]),u++,m++;else if(s[h]===d[f])a[f]=vt(n[h],o[f]),h--,f--;else if(s[u]===d[f])a[f]=vt(n[u],o[f]),yt(t,n[u],a[f+1]),u++,f--;else if(s[h]===d[m])a[m]=vt(n[h],o[m]),yt(t,n[h],n[u]),h--,m++;else if(void 0===c&&(c=wt(d,m,f),l=wt(s,u,h)),c.has(s[u]))if(c.has(s[h])){const e=l.get(d[m]),i=void 0!==e?n[e]:null;if(null===i){const e=_t(t,n[u]);vt(e,o[m]),a[m]=e}else a[m]=vt(i,o[m]),yt(t,i,n[u]),n[e]=null;m++}else bt(n[h]),h--;else bt(n[u]),u++;for(;m<=f;){const e=_t(t,a[f+1]);vt(e,o[m]),a[m++]=e}for(;u<=h;){const e=n[u++];null!==e&&bt(e)}xt.set(t,a),St.set(t,d)}}),{INPUT_EVENT:Ct,CHANGE_EVENT:At}=gt.strings;class Tt extends Ze{constructor(){super(...arguments),this.mdcFoundationClass=gt,this.value=0,this.min=0,this.max=100,this.step=0,this.disabled=!1,this.discrete=!1,this.markers=!1,this._numMarkers=0}render(){const{value:e,min:t,max:i,step:r,disabled:n,discrete:s,markers:a,_numMarkers:o}=this,d={"mdc-slider--discrete":s,"mdc-slider--display-markers":a&&s};let c="";if(s&&a){const e=kt(new Array(o),()=>H`
`);c=H`
${e}
`}return H`
${c}
${s?H`
`:""}
`}createAdapter(){return Object.assign(Object.assign({},(e=this.mdcRoot,{addClass:t=>{e.classList.add(t)},removeClass:t=>{e.classList.remove(t)},hasClass:t=>e.classList.contains(t)})),{getAttribute:e=>this.mdcRoot.getAttribute(e),setAttribute:(e,t)=>this.mdcRoot.setAttribute(e,t),removeAttribute:e=>this.mdcRoot.removeAttribute(e),computeBoundingRect:()=>this.mdcRoot.getBoundingClientRect(),getTabIndex:()=>this.mdcRoot.tabIndex,registerInteractionHandler:(e,t)=>this.mdcRoot.addEventListener(e,t),deregisterInteractionHandler:(e,t)=>this.mdcRoot.removeEventListener(e,t),registerThumbContainerInteractionHandler:(e,t)=>this.thumbContainer.addEventListener(e,t),deregisterThumbContainerInteractionHandler:(e,t)=>this.thumbContainer.removeEventListener(e,t),registerBodyInteractionHandler:(e,t)=>document.body.addEventListener(e,t),deregisterBodyInteractionHandler:(e,t)=>document.body.removeEventListener(e,t),registerResizeHandler:e=>window.addEventListener("resize",e),deregisterResizeHandler:e=>window.removeEventListener("resize",e),notifyInput:()=>{const e=this.mdcFoundation.getValue();e!==this.value&&(this.value=e,this.dispatchEvent(new CustomEvent(Ct,{detail:this,bubbles:!0,cancelable:!0})))},notifyChange:()=>{this.dispatchEvent(new CustomEvent(At,{detail:this,bubbles:!0,cancelable:!0}))},setThumbContainerStyleProperty:(e,t)=>this.thumbContainer.style.setProperty(e,t),setTrackStyleProperty:(e,t)=>this.trackElement.style.setProperty(e,t),setMarkerValue:e=>this.pinMarker.innerText=e.toString(),setTrackMarkers:(e,t,i)=>{},isRTL:()=>"rtl"===getComputedStyle(this.mdcRoot).direction});var e}layout(){this.mdcFoundation.layout()}}ye([oe(".mdc-slider")],Tt.prototype,"mdcRoot",void 0),ye([oe(".mdc-slider")],Tt.prototype,"formElement",void 0),ye([oe(".mdc-slider__thumb-container")],Tt.prototype,"thumbContainer",void 0),ye([oe(".mdc-slider__track")],Tt.prototype,"trackElement",void 0),ye([oe(".mdc-slider__pin-value-marker")],Tt.prototype,"pinMarker",void 0),ye([oe(".mdc-slider__track-marker-container")],Tt.prototype,"trackMarkerContainer",void 0),ye([ae({type:Number}),Xe(function(e){this.mdcFoundation.setValue(e)})],Tt.prototype,"value",void 0),ye([ae({type:Number}),Xe(function(e){this.mdcFoundation.setMin(e)})],Tt.prototype,"min",void 0),ye([ae({type:Number}),Xe(function(e){this.mdcFoundation.setMax(e)})],Tt.prototype,"max",void 0),ye([ae({type:Number}),Xe(function(e){this.mdcFoundation.setStep(e)})],Tt.prototype,"step",void 0),ye([ae({type:Boolean,reflect:!0}),Xe(function(e){this.mdcFoundation.setDisabled(e)})],Tt.prototype,"disabled",void 0),ye([ae({type:Boolean,reflect:!0})],Tt.prototype,"discrete",void 0),ye([ae({type:Boolean,reflect:!0}),Xe(function(){this.mdcFoundation.setupTrackMarker()})],Tt.prototype,"markers",void 0),ye([ae({type:Number})],Tt.prototype,"_numMarkers",void 0);const Et=he`@keyframes mdc-slider-emphasize{0%{animation-timing-function:ease-out}50%{animation-timing-function:ease-in;transform:scale(.85)}100%{transform:scale(.571)}}.mdc-slider{position:relative;width:100%;height:48px;cursor:pointer;touch-action:pan-x;-webkit-tap-highlight-color:transparent}.mdc-slider:not(.mdc-slider--disabled) .mdc-slider__track{background-color:#018786;background-color:var(--mdc-theme-secondary,#018786)}.mdc-slider:not(.mdc-slider--disabled) .mdc-slider__track-container{background-color:rgba(1,135,134,.26)}.mdc-slider:not(.mdc-slider--disabled) .mdc-slider__track-marker-container{background-color:#018786;background-color:var(--mdc-theme-secondary,#018786)}.mdc-slider:not(.mdc-slider--disabled) .mdc-slider__thumb{fill:#018786;fill:var(--mdc-theme-secondary,#018786);stroke:#018786;stroke:var(--mdc-theme-secondary,#018786)}.mdc-slider:not(.mdc-slider--disabled) .mdc-slider__focus-ring{background-color:#018786;background-color:var(--mdc-theme-secondary,#018786)}.mdc-slider:not(.mdc-slider--disabled) .mdc-slider__pin{background-color:#018786;background-color:var(--mdc-theme-secondary,#018786)}.mdc-slider:not(.mdc-slider--disabled) .mdc-slider__pin{color:#fff;color:var(--mdc-theme-text-primary-on-dark,#fff)}.mdc-slider--disabled{cursor:auto}.mdc-slider--disabled .mdc-slider__track{background-color:#9a9a9a}.mdc-slider--disabled .mdc-slider__track-container{background-color:rgba(154,154,154,.26)}.mdc-slider--disabled .mdc-slider__track-marker-container{background-color:#9a9a9a}.mdc-slider--disabled .mdc-slider__thumb{fill:#9a9a9a;stroke:#9a9a9a}.mdc-slider--disabled .mdc-slider__thumb{stroke:#fff;stroke:var(--mdc-slider-bg-color-behind-component,#fff)}.mdc-slider:focus{outline:0}.mdc-slider__track-container{position:absolute;top:50%;width:100%;height:2px;overflow:hidden}.mdc-slider__track{position:absolute;width:100%;height:100%;transform-origin:left top;will-change:transform}.mdc-slider[dir=rtl] .mdc-slider__track,[dir=rtl] .mdc-slider .mdc-slider__track{transform-origin:right top}.mdc-slider__track-marker-container{display:flex;margin-right:0;margin-left:-1px;visibility:hidden}.mdc-slider[dir=rtl] .mdc-slider__track-marker-container,[dir=rtl] .mdc-slider .mdc-slider__track-marker-container{margin-right:-1px;margin-left:0}.mdc-slider__track-marker-container::after{display:block;width:2px;height:2px;content:""}.mdc-slider__track-marker{flex:1}.mdc-slider__track-marker::after{display:block;width:2px;height:2px;content:""}.mdc-slider__track-marker:first-child::after{width:3px}.mdc-slider__thumb-container{position:absolute;top:15px;left:0;width:21px;height:100%;user-select:none;will-change:transform}.mdc-slider__thumb{position:absolute;top:0;left:0;transform:scale(.571);stroke-width:3.5;transition:transform .1s ease-out,fill .1s ease-out,stroke .1s ease-out}.mdc-slider__focus-ring{width:21px;height:21px;border-radius:50%;opacity:0;transition:transform .266s ease-out,opacity .266s ease-out,background-color .266s ease-out}.mdc-slider__pin{display:flex;position:absolute;top:0;left:0;align-items:center;justify-content:center;width:26px;height:26px;margin-top:-2px;margin-left:-2px;transform:rotate(-45deg) scale(0) translate(0,0);border-radius:50% 50% 50% 0;z-index:1;transition:transform .1s ease-out}.mdc-slider__pin-value-marker{font-family:Roboto,sans-serif;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-size:.875rem;line-height:1.25rem;font-weight:400;letter-spacing:.0178571429em;text-decoration:inherit;text-transform:inherit;transform:rotate(45deg)}.mdc-slider--active .mdc-slider__thumb{transform:scale3d(1,1,1)}.mdc-slider--focus .mdc-slider__thumb{animation:mdc-slider-emphasize .266s linear}.mdc-slider--focus .mdc-slider__focus-ring{transform:scale3d(1.55,1.55,1.55);opacity:.25}.mdc-slider--in-transit .mdc-slider__thumb{transition-delay:140ms}.mdc-slider--in-transit .mdc-slider__thumb-container,.mdc-slider--in-transit .mdc-slider__track,.mdc-slider:focus:not(.mdc-slider--active) .mdc-slider__thumb-container,.mdc-slider:focus:not(.mdc-slider--active) .mdc-slider__track{transition:transform 80ms ease}.mdc-slider--discrete.mdc-slider--active .mdc-slider__thumb{transform:scale(calc(12 / 21))}.mdc-slider--discrete.mdc-slider--active .mdc-slider__pin{transform:rotate(-45deg) scale(1) translate(19px,-20px)}.mdc-slider--discrete.mdc-slider--focus .mdc-slider__thumb{animation:none}.mdc-slider--discrete.mdc-slider--display-markers .mdc-slider__track-marker-container{visibility:visible}:host{display:inline-block;min-width:120px;outline:0}`;let Rt=class extends Tt{};Rt.styles=Et,Rt=ye([re("mwc-slider")],Rt);class It extends fe{static get properties(){return{label:{type:String},value:{type:Number,reflect:!0},min:{type:Number},max:{type:Number},step:{type:Number},disabled:{type:Boolean}}}_onchange(e){this.value=e.detail.value,console.log(this.value),this.dispatchEvent(new CustomEvent("change",{detail:{value:this.value}}))}layout(){this.shadowRoot.querySelector("#slider").layout()}render(){return H` +
${this.label}:
+ + +
+ ${this.value} + +
+ `}}e(It,"styles",he` + :host { + display: inline-flex; + align-items: center; + justify-content: flex-end; + margin: 6px; + } + + mwc-slider { + min-width: 140px; + padding: 0px 12px; + } + + .title { + width: 120px; + } + + .value { + min-width: 60px; + text-align: left; + } + + .disabled { + opacity: 0.5; + color: gray; + } + `),customElements.define("settings-slider",It);class Pt extends fe{constructor(){super(...arguments),e(this,"activePane",null)}static get properties(){return{flash:{type:Boolean}}}async applyFromTrack(e){await this.updateComplete;const t=e.getCapabilities();["torch"].forEach(e=>{if(!t[e]){this.shadowRoot.querySelector(`#${e}`).disabled=!0}}),["iso","exposureTime","focusDistance","colorTemperature","zoom","contrast","saturation","sharpness","brightness","exposureCompensation"].forEach(e=>{const i=this.shadowRoot.querySelector(`#${e}`);if(t[e]){const{min:r,max:n,step:s}=t[e];i.step=s,i.max=n,i.min=r}else console.log(e,"is not supported."),i.disabled=!0})}hide(){const e=this.shadowRoot.querySelector("#settings-bar");Array.from(e.children).forEach(e=>{e.classList.add("hidden")})}_toggleGroup(e){const t=e.target.getAttribute("for");if(!t)return;if(this.activePane=null,"torch"==t){if(!this.shadowRoot.querySelector("#torch").disabled){this.flash=!this.flash;const e={advanced:[{torch:this.flash}]};this.dispatchEvent(new CustomEvent("constraintschange",{detail:e}))}return void this.hide()}const i=this.shadowRoot.querySelector("#settings-bar"),r=this.shadowRoot.querySelector(`#${t}Settings`);Array.from(i.children).filter(e=>e!=r).forEach(e=>{e.classList.add("hidden")}),r.classList.toggle("hidden"),r.classList.contains("hidden")||(this.activePane=r,Array.from(r.children).forEach(e=>{"layout"in e&&e.layout()}))}_colorTemperatureChange(e){let t="";switch(!0){case e>=9e3:break;case e>=8e3:t="brightness_3";break;case e>=6500:t="wb_cloudy";break;case e>=5500:t="wb_sunny";break;case e>=5e3:break;case e>=4e3:t="wb_iridescent";break;case e>=3500:break;case e>=2500:t="wb_incandescent";break;case 0==e:t="wb_auto"}this.shadowRoot.getElementById("wbIcon").innerText=t}firstUpdated(){this.shadowRoot.querySelectorAll("settings-slider").forEach(e=>{e.onchange=(e=>{const t=e.target.getAttribute("id"),i=e.detail.value;console.log(t,":",i);let r={advanced:[{}]};r.advanced[0][t]=i,"exposureTime"==t?r.advanced[0].exposureMode="manual":"focusDistance"==t?r.advanced[0].focusMode="manual":"colorTemperature"==t&&(this._colorTemperatureChange(i),r.advanced[0].whiteBalanceMode="manual"),this.dispatchEvent(new CustomEvent("constraintschange",{detail:{constraints:r}}))})})}reset(){const e=this.activePane.getAttribute("id");let t={advanced:[{}]};"standardSettings"==e?Array.from(this.activePane.children).forEach(i=>{i.value=(i.max-i.min)/2+Number(i.min),i.disabled||(t.advanced[0][e]=i.value)}):"exposureTimeSettings"==e?(t.advanced[0].exposureMode="continuous",this.activePane.children[0].value=0):"focusDistanceSettings"==e?(t.advanced[0].focusMode="continuous",this.activePane.children[0].value=0):"colorTemperatureSettings"==e?(t.advanced[0].whiteBalanceMode="continuous",this.activePane.children[0].value=0,this._colorTemperatureChange(0)):"zoomSettings"==e&&(t.advanced[0].zoom=1,this.activePane.children[0].value=1),this.dispatchEvent(new CustomEvent("constraintschange",{detail:{constraints:t}}))}render(){return H` + +
e.stopPropagation()}> + + + + + + +
+
{this._toggleGroup(e),e.stopPropagation()}}> + + + + + + + +
+ `}}e(Pt,"styles",he` + :host { + width: 100%; + height: 100%; + display: inline-flex; + flex-direction: column; + justify-content: flex-end; + align-items: center; + } + + mwc-icon-button { + color: white; + --mdc-theme-text-disabled-on-light: gray; + //background-color: rgba(0, 0, 0, 0.1); + border-radius: 50%; + } + + .pro-icons { + width: 100%; + padding: 20px; + display: flex; + flex-direction: row; + flex-wrap: nowrap; + justify-content: space-around; + align-items: center; + align-content: stretch; + box-sizing: border-box; + } + + .hidden { + display: none !important; + } + + .settings-bar { + position: relative; + width: 100%; + padding: 10px; + box-sizing: border-box; + } + + .settings, .pro-settings { + display: flex; + flex-direction: column; + align-items: center; + color: white; + font-size: 16px; + text-shadow: -1px 0 black, 0 1px black, 1px 0 black, 0 -1px black; + text-align: center; + } + + #wbIcon { + display: inline; + font-size: 16px; + } + + @media screen and (max-width: 960px) { + .settings select { + font-size: 12px; + } + .settings { + font-size: 14px; + } + } + @media screen and (max-width: 400px) { + .settings select { + font-size: 10px; + } + .settings { + font-size: 12px; + } + } + `),customElements.define("settings-pane",Pt);class Nt extends fe{constructor(){super(...arguments),e(this,"facingMode","user")}_onResetClicked(e){this.shadowRoot.querySelector("settings-pane").reset(),this.shadowRoot.querySelector("#resetButton").classList.add("hidden")}async _onConstraintsChange(e){try{await this.videoTrack.applyConstraints(e.detail.constraints),this.shadowRoot.querySelector("settings-pane").applyFromTrack(this.videoTrack)}catch(e){console.error(e)}this.shadowRoot.querySelector("#resetButton").classList.remove("hidden")}_onSettingsBackgroundClicked(e){this.shadowRoot.querySelector("settings-pane").hide(),this.shadowRoot.querySelector("#resetButton").classList.add("hidden")}async _onFacingModeClicked(){this.selectedCamera=(this.selectedCamera+1)%this.cameras.length;const e=this.cameras[this.selectedCamera];this.constraints.deviceId={exact:e.deviceId},this.facingMode=this.getFacingMode(e),this.requestUpdate(),this.stopCamera();const t=this.shadowRoot.querySelector("video");await this.startCamera(t,this.constraints);const i=this.shadowRoot.querySelector("settings-pane");setTimeout(async()=>{await customElements.whenDefined("settings-pane"),i.applyFromTrack(this.videoTrack)},500)}async takePhoto(){try{const e=await this.imageCapturer.takePhoto(),t=await createImageBitmap(e),i=this.shadowRoot.querySelector("#gallery");i.width=getComputedStyle(i).width.split("px")[0],i.height=getComputedStyle(i).height.split("px")[0];let r=Math.max(i.width/t.width,i.height/t.height),n=(i.width-t.width*r)/2,s=(i.height-t.height*r)/2;i.getContext("2d").clearRect(0,0,i.width,i.height),i.getContext("2d").drawImage(t,0,0,t.width,t.height,n,s,t.width*r,t.height*r)}catch(e){console.error("takePhoto() failed: ",e)}}startCamera(e,t){return new Promise(async(i,r)=>{try{const n=await navigator.mediaDevices.getUserMedia({video:t,audio:!1});this.video=e,this.stream=n,e.srcObject=n,e.addEventListener("canplay",i,{once:!0}),e.play()}catch(e){r(e)}})}stopCamera(){this.video&&(this.video.pause(),this.video.srcObject=null),this.stream&&this.stream.getVideoTracks()[0].stop()}getFacingMode(e){return"environment"==e.facingMode||e.label.indexOf("facing back")>=0?"environment":"user"}async firstUpdated(){this.constraints={};const e=await navigator.mediaDevices.enumerateDevices();this.cameras=[],this.selectedCamera=0,e.forEach(e=>{"videoinput"==e.kind&&("user"==this.getFacingMode(e)?this.cameras.push(e):this.cameras.unshift(e))}),navigator.userAgent.includes("Android")&&screen.orientation.type.includes("portrait")?(this.constraints.width=Math.ceil(visualViewport.height),this.constraints.height=Math.ceil(visualViewport.width)):(this.constraints.width=Math.ceil(visualViewport.width),this.constraints.height=Math.ceil(visualViewport.height));let t=this.shadowRoot.getElementById("facingModeButton");this.cameras.length<2?(t.style.color="gray",t.style.border="2px solid gray"):t.disabled=!1,this.facingMode=this.getFacingMode(this.cameras[0]),this.requestUpdate(),this.constraints.deviceId={exact:this.cameras[0].deviceId};const i=this.shadowRoot.querySelector("video");await this.startCamera(i,this.constraints),this.videoTrack=i.srcObject.getVideoTracks()[0],this.imageCapturer=new ImageCapture(this.videoTrack),this.shadowRoot.querySelector("#cameraBar").style.width=`${i.videoWidth}px`;let r=this.shadowRoot.getElementById("mainContent");r.style.width=`${i.videoWidth}px`,r.classList.remove("hidden"),this.shadowRoot.querySelector(".canvas-wrapper").style.height=`${i.videoHeight}px`;let n=this.shadowRoot.querySelector("#resetButton");n.classList.remove("hidden"),n.style.left=`${i.videoWidth-n.offsetWidth}px`,n.style.bottom=`${i.videoHeight}px`,n.classList.add("hidden"),this.shadowRoot.getElementById("takePhotoButton").disabled=!1;const s=this.shadowRoot.querySelector("settings-pane");setTimeout(async()=>{await customElements.whenDefined("settings-pane"),s.applyFromTrack(this.videoTrack)},500)}render(){return H` + + `}}e(Nt,"styles",he` + :host { + display: block; + width: 100vw; + height: 100vh; + overflow: hidden; + } + + .hidden { + display: none !important; + } + + #mainContent { + margin: 0 auto; + } + + video { + display: inline; + } + + video:hover { + cursor: pointer; + } + + #resetButton { + position: relative; + padding: 15px; + color: white; + text-shadow: -1px 0 black, 0 1px black, 1px 0 black, 0 -1px black; + font-size: 18px; + background: none; + border: none; + z-index: 15; + outline: none; + } + + .canvas-wrapper { + position: relative; + width: 100%; + } + + .settings-wrapper { + position: absolute; + top: 0; + width: 100%; + height: 100%; + display: flex; + flex-direction: column; + justify-content: center; + align-items: flex-end; + } + + #cameraBar { + height: 100px; + background-color: transparent; + display: flex; + flex-direction: row; + flex-wrap: nowrap; + justify-content: space-around; + align-items: center; + } + + #gallery { + width: 48px; + height: 48px; + } + + #takePhotoButton { + height: 72px; + width: 72px; + } + + #takePhotoButton mwc-icon { + --mdc-icon-size: 48px; + } + + .camera-bar-icon { + height: 52px; + width: 52px; + display: flex; + justify-content: center; + outline: none; + border: 2px solid white; + border-radius: 52px; + color: white; + background-color: transparent; + } + `),customElements.define("camera-capture",Nt); +//# sourceMappingURL=camera-capture.js.map diff --git a/build/elements/camera-capture.js.map b/build/elements/camera-capture.js.map new file mode 100644 index 0000000..b67862d --- /dev/null +++ b/build/elements/camera-capture.js.map @@ -0,0 +1 @@ +{"version":3,"file":"camera-capture.js","sources":["../../node_modules/lit-html/lib/directive.js","../../node_modules/lit-html/lib/dom.js","../../node_modules/lit-html/lib/part.js","../../node_modules/lit-html/lib/template.js","../../node_modules/lit-html/lib/template-instance.js","../../node_modules/lit-html/lib/template-result.js","../../node_modules/lit-html/lib/parts.js","../../node_modules/lit-html/lib/default-template-processor.js","../../node_modules/lit-html/lib/template-factory.js","../../node_modules/lit-html/lib/render.js","../../node_modules/lit-html/lit-html.js","../../node_modules/lit-html/lib/modify-template.js","../../node_modules/lit-html/lib/shady-render.js","../../node_modules/lit-element/lib/updating-element.js","../../node_modules/lit-element/lib/decorators.js","../../node_modules/lit-element/lib/css-tag.js","../../node_modules/lit-element/lit-element.js","../../node_modules/tslib/tslib.es6.js","../../node_modules/@material/mwc-icon/mwc-icon-host-css.js","../../node_modules/@material/mwc-icon/mwc-icon.js","../../node_modules/lit-html/directives/class-map.js","../../node_modules/@material/dom/events.js","../../node_modules/@material/base/foundation.js","../../node_modules/@material/ripple/util.js","../../node_modules/@material/ripple/constants.js","../../node_modules/@material/ripple/foundation.js","../../node_modules/@material/mwc-ripple/mwc-ripple-global-css.js","../../node_modules/@material/mwc-ripple/ripple-directive.js","../../node_modules/@material/dom/ponyfill.js","../../node_modules/@material/mwc-ripple/mwc-ripple-base.js","../../node_modules/@material/mwc-ripple/mwc-ripple-css.js","../../node_modules/@material/mwc-ripple/mwc-ripple.js","../../node_modules/@material/mwc-icon-button/mwc-icon-button-base.js","../../node_modules/@material/mwc-icon-button/mwc-icon-button-css.js","../../node_modules/@material/mwc-icon-button/mwc-icon-button.js","../../node_modules/@material/mwc-base/observer.js","../../node_modules/@material/mwc-base/utils.js","../../node_modules/@material/mwc-base/base-element.js","../../node_modules/@material/mwc-base/form-element.js","../../node_modules/@material/animation/util.js","../../node_modules/@material/slider/constants.js","../../node_modules/@material/slider/foundation.js","../../node_modules/lit-html/directives/repeat.js","../../node_modules/@material/mwc-slider/mwc-slider-base.js","../../node_modules/@material/mwc-slider/mwc-slider-css.js","../../node_modules/@material/mwc-slider/mwc-slider.js","../../elements/camera-capture/settings-slider.js","../../elements/camera-capture/settings-pane.js","../../elements/camera-capture/camera-capture.js"],"sourcesContent":["/**\n * @license\n * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at\n * http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at\n * http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at\n * http://polymer.github.io/PATENTS.txt\n */\nconst directives = new WeakMap();\n/**\n * Brands a function as a directive factory function so that lit-html will call\n * the function during template rendering, rather than passing as a value.\n *\n * A _directive_ is a function that takes a Part as an argument. It has the\n * signature: `(part: Part) => void`.\n *\n * A directive _factory_ is a function that takes arguments for data and\n * configuration and returns a directive. Users of directive usually refer to\n * the directive factory as the directive. For example, \"The repeat directive\".\n *\n * Usually a template author will invoke a directive factory in their template\n * with relevant arguments, which will then return a directive function.\n *\n * Here's an example of using the `repeat()` directive factory that takes an\n * array and a function to render an item:\n *\n * ```js\n * html`
    <${repeat(items, (item) => html`
  • ${item}
  • `)}
`\n * ```\n *\n * When `repeat` is invoked, it returns a directive function that closes over\n * `items` and the template function. When the outer template is rendered, the\n * return directive function is called with the Part for the expression.\n * `repeat` then performs it's custom logic to render multiple items.\n *\n * @param f The directive factory function. Must be a function that returns a\n * function of the signature `(part: Part) => void`. The returned function will\n * be called with the part object.\n *\n * @example\n *\n * import {directive, html} from 'lit-html';\n *\n * const immutable = directive((v) => (part) => {\n * if (part.value !== v) {\n * part.setValue(v)\n * }\n * });\n */\nexport const directive = (f) => ((...args) => {\n const d = f(...args);\n directives.set(d, true);\n return d;\n});\nexport const isDirective = (o) => {\n return typeof o === 'function' && directives.has(o);\n};\n//# sourceMappingURL=directive.js.map","/**\n * @license\n * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at\n * http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at\n * http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at\n * http://polymer.github.io/PATENTS.txt\n */\n/**\n * True if the custom elements polyfill is in use.\n */\nexport const isCEPolyfill = window.customElements !== undefined &&\n window.customElements.polyfillWrapFlushCallback !==\n undefined;\n/**\n * Reparents nodes, starting from `start` (inclusive) to `end` (exclusive),\n * into another container (could be the same container), before `before`. If\n * `before` is null, it appends the nodes to the container.\n */\nexport const reparentNodes = (container, start, end = null, before = null) => {\n while (start !== end) {\n const n = start.nextSibling;\n container.insertBefore(start, before);\n start = n;\n }\n};\n/**\n * Removes nodes, starting from `start` (inclusive) to `end` (exclusive), from\n * `container`.\n */\nexport const removeNodes = (container, start, end = null) => {\n while (start !== end) {\n const n = start.nextSibling;\n container.removeChild(start);\n start = n;\n }\n};\n//# sourceMappingURL=dom.js.map","/**\n * @license\n * Copyright (c) 2018 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at\n * http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at\n * http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at\n * http://polymer.github.io/PATENTS.txt\n */\n/**\n * A sentinel value that signals that a value was handled by a directive and\n * should not be written to the DOM.\n */\nexport const noChange = {};\n/**\n * A sentinel value that signals a NodePart to fully clear its content.\n */\nexport const nothing = {};\n//# sourceMappingURL=part.js.map","/**\n * @license\n * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at\n * http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at\n * http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at\n * http://polymer.github.io/PATENTS.txt\n */\n/**\n * An expression marker with embedded unique key to avoid collision with\n * possible text in templates.\n */\nexport const marker = `{{lit-${String(Math.random()).slice(2)}}}`;\n/**\n * An expression marker used text-positions, multi-binding attributes, and\n * attributes with markup-like text values.\n */\nexport const nodeMarker = ``;\nexport const markerRegex = new RegExp(`${marker}|${nodeMarker}`);\n/**\n * Suffix appended to all bound attribute names.\n */\nexport const boundAttributeSuffix = '$lit$';\n/**\n * An updateable Template that tracks the location of dynamic parts.\n */\nexport class Template {\n constructor(result, element) {\n this.parts = [];\n this.element = element;\n const nodesToRemove = [];\n const stack = [];\n // Edge needs all 4 parameters present; IE11 needs 3rd parameter to be null\n const walker = document.createTreeWalker(element.content, 133 /* NodeFilter.SHOW_{ELEMENT|COMMENT|TEXT} */, null, false);\n // Keeps track of the last index associated with a part. We try to delete\n // unnecessary nodes, but we never want to associate two different parts\n // to the same index. They must have a constant node between.\n let lastPartIndex = 0;\n let index = -1;\n let partIndex = 0;\n const { strings, values: { length } } = result;\n while (partIndex < length) {\n const node = walker.nextNode();\n if (node === null) {\n // We've exhausted the content inside a nested template element.\n // Because we still have parts (the outer for-loop), we know:\n // - There is a template in the stack\n // - The walker will find a nextNode outside the template\n walker.currentNode = stack.pop();\n continue;\n }\n index++;\n if (node.nodeType === 1 /* Node.ELEMENT_NODE */) {\n if (node.hasAttributes()) {\n const attributes = node.attributes;\n const { length } = attributes;\n // Per\n // https://developer.mozilla.org/en-US/docs/Web/API/NamedNodeMap,\n // attributes are not guaranteed to be returned in document order.\n // In particular, Edge/IE can return them out of order, so we cannot\n // assume a correspondence between part index and attribute index.\n let count = 0;\n for (let i = 0; i < length; i++) {\n if (endsWith(attributes[i].name, boundAttributeSuffix)) {\n count++;\n }\n }\n while (count-- > 0) {\n // Get the template literal section leading up to the first\n // expression in this attribute\n const stringForPart = strings[partIndex];\n // Find the attribute name\n const name = lastAttributeNameRegex.exec(stringForPart)[2];\n // Find the corresponding attribute\n // All bound attributes have had a suffix added in\n // TemplateResult#getHTML to opt out of special attribute\n // handling. To look up the attribute value we also need to add\n // the suffix.\n const attributeLookupName = name.toLowerCase() + boundAttributeSuffix;\n const attributeValue = node.getAttribute(attributeLookupName);\n node.removeAttribute(attributeLookupName);\n const statics = attributeValue.split(markerRegex);\n this.parts.push({ type: 'attribute', index, name, strings: statics });\n partIndex += statics.length - 1;\n }\n }\n if (node.tagName === 'TEMPLATE') {\n stack.push(node);\n walker.currentNode = node.content;\n }\n }\n else if (node.nodeType === 3 /* Node.TEXT_NODE */) {\n const data = node.data;\n if (data.indexOf(marker) >= 0) {\n const parent = node.parentNode;\n const strings = data.split(markerRegex);\n const lastIndex = strings.length - 1;\n // Generate a new text node for each literal section\n // These nodes are also used as the markers for node parts\n for (let i = 0; i < lastIndex; i++) {\n let insert;\n let s = strings[i];\n if (s === '') {\n insert = createMarker();\n }\n else {\n const match = lastAttributeNameRegex.exec(s);\n if (match !== null && endsWith(match[2], boundAttributeSuffix)) {\n s = s.slice(0, match.index) + match[1] +\n match[2].slice(0, -boundAttributeSuffix.length) + match[3];\n }\n insert = document.createTextNode(s);\n }\n parent.insertBefore(insert, node);\n this.parts.push({ type: 'node', index: ++index });\n }\n // If there's no text, we must insert a comment to mark our place.\n // Else, we can trust it will stick around after cloning.\n if (strings[lastIndex] === '') {\n parent.insertBefore(createMarker(), node);\n nodesToRemove.push(node);\n }\n else {\n node.data = strings[lastIndex];\n }\n // We have a part for each match found\n partIndex += lastIndex;\n }\n }\n else if (node.nodeType === 8 /* Node.COMMENT_NODE */) {\n if (node.data === marker) {\n const parent = node.parentNode;\n // Add a new marker node to be the startNode of the Part if any of\n // the following are true:\n // * We don't have a previousSibling\n // * The previousSibling is already the start of a previous part\n if (node.previousSibling === null || index === lastPartIndex) {\n index++;\n parent.insertBefore(createMarker(), node);\n }\n lastPartIndex = index;\n this.parts.push({ type: 'node', index });\n // If we don't have a nextSibling, keep this node so we have an end.\n // Else, we can remove it to save future costs.\n if (node.nextSibling === null) {\n node.data = '';\n }\n else {\n nodesToRemove.push(node);\n index--;\n }\n partIndex++;\n }\n else {\n let i = -1;\n while ((i = node.data.indexOf(marker, i + 1)) !== -1) {\n // Comment node has a binding marker inside, make an inactive part\n // The binding won't work, but subsequent bindings will\n // TODO (justinfagnani): consider whether it's even worth it to\n // make bindings in comments work\n this.parts.push({ type: 'node', index: -1 });\n partIndex++;\n }\n }\n }\n }\n // Remove text binding nodes after the walk to not disturb the TreeWalker\n for (const n of nodesToRemove) {\n n.parentNode.removeChild(n);\n }\n }\n}\nconst endsWith = (str, suffix) => {\n const index = str.length - suffix.length;\n return index >= 0 && str.slice(index) === suffix;\n};\nexport const isTemplatePartActive = (part) => part.index !== -1;\n// Allows `document.createComment('')` to be renamed for a\n// small manual size-savings.\nexport const createMarker = () => document.createComment('');\n/**\n * This regex extracts the attribute name preceding an attribute-position\n * expression. It does this by matching the syntax allowed for attributes\n * against the string literal directly preceding the expression, assuming that\n * the expression is in an attribute-value position.\n *\n * See attributes in the HTML spec:\n * https://www.w3.org/TR/html5/syntax.html#elements-attributes\n *\n * \" \\x09\\x0a\\x0c\\x0d\" are HTML space characters:\n * https://www.w3.org/TR/html5/infrastructure.html#space-characters\n *\n * \"\\0-\\x1F\\x7F-\\x9F\" are Unicode control characters, which includes every\n * space character except \" \".\n *\n * So an attribute is:\n * * The name: any character except a control character, space character, ('),\n * (\"), \">\", \"=\", or \"/\"\n * * Followed by zero or more space characters\n * * Followed by \"=\"\n * * Followed by zero or more space characters\n * * Followed by:\n * * Any character except space, ('), (\"), \"<\", \">\", \"=\", (`), or\n * * (\") then any non-(\"), or\n * * (') then any non-(')\n */\nexport const lastAttributeNameRegex = /([ \\x09\\x0a\\x0c\\x0d])([^\\0-\\x1F\\x7F-\\x9F \"'>=/]+)([ \\x09\\x0a\\x0c\\x0d]*=[ \\x09\\x0a\\x0c\\x0d]*(?:[^ \\x09\\x0a\\x0c\\x0d\"'`<>=]*|\"[^\"]*|'[^']*))$/;\n//# sourceMappingURL=template.js.map","/**\n * @license\n * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at\n * http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at\n * http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at\n * http://polymer.github.io/PATENTS.txt\n */\n/**\n * @module lit-html\n */\nimport { isCEPolyfill } from './dom.js';\nimport { isTemplatePartActive } from './template.js';\n/**\n * An instance of a `Template` that can be attached to the DOM and updated\n * with new values.\n */\nexport class TemplateInstance {\n constructor(template, processor, options) {\n this.__parts = [];\n this.template = template;\n this.processor = processor;\n this.options = options;\n }\n update(values) {\n let i = 0;\n for (const part of this.__parts) {\n if (part !== undefined) {\n part.setValue(values[i]);\n }\n i++;\n }\n for (const part of this.__parts) {\n if (part !== undefined) {\n part.commit();\n }\n }\n }\n _clone() {\n // There are a number of steps in the lifecycle of a template instance's\n // DOM fragment:\n // 1. Clone - create the instance fragment\n // 2. Adopt - adopt into the main document\n // 3. Process - find part markers and create parts\n // 4. Upgrade - upgrade custom elements\n // 5. Update - set node, attribute, property, etc., values\n // 6. Connect - connect to the document. Optional and outside of this\n // method.\n //\n // We have a few constraints on the ordering of these steps:\n // * We need to upgrade before updating, so that property values will pass\n // through any property setters.\n // * We would like to process before upgrading so that we're sure that the\n // cloned fragment is inert and not disturbed by self-modifying DOM.\n // * We want custom elements to upgrade even in disconnected fragments.\n //\n // Given these constraints, with full custom elements support we would\n // prefer the order: Clone, Process, Adopt, Upgrade, Update, Connect\n //\n // But Safari dooes not implement CustomElementRegistry#upgrade, so we\n // can not implement that order and still have upgrade-before-update and\n // upgrade disconnected fragments. So we instead sacrifice the\n // process-before-upgrade constraint, since in Custom Elements v1 elements\n // must not modify their light DOM in the constructor. We still have issues\n // when co-existing with CEv0 elements like Polymer 1, and with polyfills\n // that don't strictly adhere to the no-modification rule because shadow\n // DOM, which may be created in the constructor, is emulated by being placed\n // in the light DOM.\n //\n // The resulting order is on native is: Clone, Adopt, Upgrade, Process,\n // Update, Connect. document.importNode() performs Clone, Adopt, and Upgrade\n // in one step.\n //\n // The Custom Elements v1 polyfill supports upgrade(), so the order when\n // polyfilled is the more ideal: Clone, Process, Adopt, Upgrade, Update,\n // Connect.\n const fragment = isCEPolyfill ?\n this.template.element.content.cloneNode(true) :\n document.importNode(this.template.element.content, true);\n const stack = [];\n const parts = this.template.parts;\n // Edge needs all 4 parameters present; IE11 needs 3rd parameter to be null\n const walker = document.createTreeWalker(fragment, 133 /* NodeFilter.SHOW_{ELEMENT|COMMENT|TEXT} */, null, false);\n let partIndex = 0;\n let nodeIndex = 0;\n let part;\n let node = walker.nextNode();\n // Loop through all the nodes and parts of a template\n while (partIndex < parts.length) {\n part = parts[partIndex];\n if (!isTemplatePartActive(part)) {\n this.__parts.push(undefined);\n partIndex++;\n continue;\n }\n // Progress the tree walker until we find our next part's node.\n // Note that multiple parts may share the same node (attribute parts\n // on a single element), so this loop may not run at all.\n while (nodeIndex < part.index) {\n nodeIndex++;\n if (node.nodeName === 'TEMPLATE') {\n stack.push(node);\n walker.currentNode = node.content;\n }\n if ((node = walker.nextNode()) === null) {\n // We've exhausted the content inside a nested template element.\n // Because we still have parts (the outer for-loop), we know:\n // - There is a template in the stack\n // - The walker will find a nextNode outside the template\n walker.currentNode = stack.pop();\n node = walker.nextNode();\n }\n }\n // We've arrived at our part's node.\n if (part.type === 'node') {\n const part = this.processor.handleTextExpression(this.options);\n part.insertAfterNode(node.previousSibling);\n this.__parts.push(part);\n }\n else {\n this.__parts.push(...this.processor.handleAttributeExpressions(node, part.name, part.strings, this.options));\n }\n partIndex++;\n }\n if (isCEPolyfill) {\n document.adoptNode(fragment);\n customElements.upgrade(fragment);\n }\n return fragment;\n }\n}\n//# sourceMappingURL=template-instance.js.map","/**\n * @license\n * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at\n * http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at\n * http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at\n * http://polymer.github.io/PATENTS.txt\n */\n/**\n * @module lit-html\n */\nimport { reparentNodes } from './dom.js';\nimport { boundAttributeSuffix, lastAttributeNameRegex, marker, nodeMarker } from './template.js';\nconst commentMarker = ` ${marker} `;\n/**\n * The return type of `html`, which holds a Template and the values from\n * interpolated expressions.\n */\nexport class TemplateResult {\n constructor(strings, values, type, processor) {\n this.strings = strings;\n this.values = values;\n this.type = type;\n this.processor = processor;\n }\n /**\n * Returns a string of HTML used to create a `