@teipublisher/pb-components 2.10.1 → 2.10.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/css/gridjs/mermaid.min.css +1 -1
- package/css/leaflet/leaflet.css +63 -42
- package/css/prismjs/prism-coy.css +4 -3
- package/css/prismjs/prism-coy.min.css +1 -0
- package/css/prismjs/prism-dark.min.css +1 -0
- package/css/prismjs/prism-funky.min.css +1 -0
- package/css/prismjs/prism-okaidia.min.css +1 -0
- package/css/prismjs/prism-solarizedlight.min.css +1 -0
- package/css/prismjs/prism-tomorrow.min.css +1 -0
- package/css/prismjs/prism-twilight.css +3 -33
- package/css/prismjs/prism-twilight.min.css +1 -0
- package/css/prismjs/prism.min.css +1 -0
- package/css/tom-select/tom-select.bootstrap4.min.css +1 -1
- package/css/tom-select/tom-select.bootstrap5.min.css +1 -1
- package/css/tom-select/tom-select.default.min.css +1 -1
- package/css/tom-select/tom-select.min.css +1 -1
- package/dist/{iron-form-9e72ac45.js → iron-form-89b60473.js} +1 -1
- package/dist/jinn-codemirror-da585937.js +1 -0
- package/dist/{paper-checkbox-102e3b43.js → paper-checkbox-56ead3d4.js} +100 -109
- package/dist/pb-code-editor.js +1 -1
- package/dist/pb-component-docs.js +94 -103
- package/dist/pb-components-bundle.js +171 -162
- package/dist/pb-edit-app.js +29 -29
- package/dist/{pb-i18n-f7a50012.js → pb-i18n-9000294c.js} +1 -1
- package/dist/pb-leaflet-map.js +1 -1
- package/dist/pb-odd-editor.js +1 -1
- package/dist/pb-tify.js +1 -1
- package/dist/{vaadin-element-mixin-b6179444.js → vaadin-element-mixin-67c5648d.js} +17 -18
- package/gh-pages.js +6 -0
- package/lib/leaflet-src.js +1623 -1173
- package/lib/paged.polyfill.js +1335 -1124
- package/package.json +4 -3
- package/src/pb-page.js +2 -1
- package/dist/jinn-codemirror-13c59456.js +0 -1
- /package/dist/{es-global-bridge-6abe3a88.js → es-global-bridge-5c039c0b.js} +0 -0
- /package/dist/{pb-mixin-ea2e9070.js → pb-mixin-d61c06b6.js} +0 -0
|
@@ -174,7 +174,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
174
174
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
175
175
|
Code distributed by Google as part of the polymer project is also
|
|
176
176
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
177
|
-
*/let Pt=0,Ot=0,Tt=[],It=0,Nt=!1,Rt=document.createTextNode("");function Mt(){Nt=!1;const e=Tt.length;for(let t=0;t<e;t++){let e=Tt[t];if(e)try{e()}catch(e){setTimeout(()=>{throw e})}}Tt.splice(0,e),Ot+=e}new window.MutationObserver(Mt).observe(Rt,{characterData:!0});const zt={after:e=>({run:t=>window.setTimeout(t,e),cancel(e){window.clearTimeout(e)}}),run:(e,t)=>window.setTimeout(e,t),cancel(e){window.clearTimeout(e)}},Ft={run:e=>window.requestAnimationFrame(e),cancel(e){window.cancelAnimationFrame(e)}},Dt={run:e=>window.requestIdleCallback?window.requestIdleCallback(e):window.setTimeout(e,16),cancel(e){window.cancelIdleCallback?window.cancelIdleCallback(e):window.clearTimeout(e)}},Lt={run:e=>(Nt||(Nt=!0,Rt.textContent=It++),Tt.push(e),Pt++),cancel(e){const t=e-Ot;if(t>=0){if(!Tt[t])throw new Error("invalid async handle: "+e);Tt[t]=null}}},Bt=Lt,Ht=Ue(e=>{class t extends e{static createProperties(e){const t=this.prototype;for(let i in e)i in t||t._createPropertyAccessor(i)}static attributeNameForProperty(e){return e.toLowerCase()}static typeForProperty(e){}_createPropertyAccessor(e,t){this._addPropertyToAttributeMap(e),this.hasOwnProperty(JSCompiler_renameProperty("__dataHasAccessor",this))||(this.__dataHasAccessor=Object.assign({},this.__dataHasAccessor)),this.__dataHasAccessor[e]||(this.__dataHasAccessor[e]=!0,this._definePropertyAccessor(e,t))}_addPropertyToAttributeMap(e){this.hasOwnProperty(JSCompiler_renameProperty("__dataAttributes",this))||(this.__dataAttributes=Object.assign({},this.__dataAttributes));let t=this.__dataAttributes[e];return t||(t=this.constructor.attributeNameForProperty(e),this.__dataAttributes[t]=e),t}_definePropertyAccessor(e,t){Object.defineProperty(this,e,{get(){return this.__data[e]},set:t?function(){}:function(t){this._setPendingProperty(e,t,!0)&&this._invalidateProperties()}})}constructor(){super(),this.__dataEnabled=!1,this.__dataReady=!1,this.__dataInvalid=!1,this.__data={},this.__dataPending=null,this.__dataOld=null,this.__dataInstanceProps=null,this.__dataCounter=0,this.__serializing=!1,this._initializeProperties()}ready(){this.__dataReady=!0,this._flushProperties()}_initializeProperties(){for(let e in this.__dataHasAccessor)this.hasOwnProperty(e)&&(this.__dataInstanceProps=this.__dataInstanceProps||{},this.__dataInstanceProps[e]=this[e],delete this[e])}_initializeInstanceProperties(e){Object.assign(this,e)}_setProperty(e,t){this._setPendingProperty(e,t)&&this._invalidateProperties()}_getProperty(e){return this.__data[e]}_setPendingProperty(e,t,i){let n=this.__data[e],o=this._shouldPropertyChange(e,t,n);return o&&(this.__dataPending||(this.__dataPending={},this.__dataOld={}),this.__dataOld&&!(e in this.__dataOld)&&(this.__dataOld[e]=n),this.__data[e]=t,this.__dataPending[e]=t),o}_isPropertyPending(e){return!(!this.__dataPending||!this.__dataPending.hasOwnProperty(e))}_invalidateProperties(){!this.__dataInvalid&&this.__dataReady&&(this.__dataInvalid=!0,Bt.run(()=>{this.__dataInvalid&&(this.__dataInvalid=!1,this._flushProperties())}))}_enableProperties(){this.__dataEnabled||(this.__dataEnabled=!0,this.__dataInstanceProps&&(this._initializeInstanceProperties(this.__dataInstanceProps),this.__dataInstanceProps=null),this.ready())}_flushProperties(){this.__dataCounter++;const e=this.__data,t=this.__dataPending,i=this.__dataOld;this._shouldPropertiesChange(e,t,i)&&(this.__dataPending=null,this.__dataOld=null,this._propertiesChanged(e,t,i)),this.__dataCounter--}_shouldPropertiesChange(e,t,i){return Boolean(t)}_propertiesChanged(e,t,i){}_shouldPropertyChange(e,t,i){return i!==t&&(i==i||t==t)}attributeChangedCallback(e,t,i,n){t!==i&&this._attributeToProperty(e,i),super.attributeChangedCallback&&super.attributeChangedCallback(e,t,i,n)}_attributeToProperty(e,t,i){if(!this.__serializing){const n=this.__dataAttributes,o=n&&n[e]||e;this[o]=this._deserializeValue(t,i||this.constructor.typeForProperty(o))}}_propertyToAttribute(e,t,i){this.__serializing=!0,i=arguments.length<3?this[e]:i,this._valueToNodeAttribute(this,i,t||this.constructor.attributeNameForProperty(e)),this.__serializing=!1}_valueToNodeAttribute(e,t,i){const n=this._serializeValue(t);"class"!==i&&"name"!==i&&"slot"!==i||(e=dt(e)),void 0===n?e.removeAttribute(i):e.setAttribute(i,n)}_serializeValue(e){switch(typeof e){case"boolean":return e?"":void 0;default:return null!=e?e.toString():void 0}}_deserializeValue(e,t){switch(t){case Boolean:return null!==e;case Number:return Number(e);default:return e}}}return t}),jt={};let qt=HTMLElement.prototype;for(;qt;){let e=Object.getOwnPropertyNames(qt);for(let t=0;t<e.length;t++)jt[e[t]]=!0;qt=Object.getPrototypeOf(qt)}
|
|
177
|
+
*/let Pt=0,Ot=0,Tt=[],It=0,Nt=!1,Rt=document.createTextNode("");function Mt(){Nt=!1;const e=Tt.length;for(let t=0;t<e;t++){let e=Tt[t];if(e)try{e()}catch(e){setTimeout(()=>{throw e})}}Tt.splice(0,e),Ot+=e}new window.MutationObserver(Mt).observe(Rt,{characterData:!0});const zt={after:e=>({run:t=>window.setTimeout(t,e),cancel(e){window.clearTimeout(e)}}),run:(e,t)=>window.setTimeout(e,t),cancel(e){window.clearTimeout(e)}},Ft={run:e=>window.requestAnimationFrame(e),cancel(e){window.cancelAnimationFrame(e)}},Dt={run:e=>window.requestIdleCallback?window.requestIdleCallback(e):window.setTimeout(e,16),cancel(e){window.cancelIdleCallback?window.cancelIdleCallback(e):window.clearTimeout(e)}},Lt={run:e=>(Nt||(Nt=!0,Rt.textContent=It++),Tt.push(e),Pt++),cancel(e){const t=e-Ot;if(t>=0){if(!Tt[t])throw new Error("invalid async handle: "+e);Tt[t]=null}}},Bt=Lt,Ht=Ue(e=>{class t extends e{static createProperties(e){const t=this.prototype;for(let i in e)i in t||t._createPropertyAccessor(i)}static attributeNameForProperty(e){return e.toLowerCase()}static typeForProperty(e){}_createPropertyAccessor(e,t){this._addPropertyToAttributeMap(e),this.hasOwnProperty(JSCompiler_renameProperty("__dataHasAccessor",this))||(this.__dataHasAccessor=Object.assign({},this.__dataHasAccessor)),this.__dataHasAccessor[e]||(this.__dataHasAccessor[e]=!0,this._definePropertyAccessor(e,t))}_addPropertyToAttributeMap(e){this.hasOwnProperty(JSCompiler_renameProperty("__dataAttributes",this))||(this.__dataAttributes=Object.assign({},this.__dataAttributes));let t=this.__dataAttributes[e];return t||(t=this.constructor.attributeNameForProperty(e),this.__dataAttributes[t]=e),t}_definePropertyAccessor(e,t){Object.defineProperty(this,e,{get(){return this.__data[e]},set:t?function(){}:function(t){this._setPendingProperty(e,t,!0)&&this._invalidateProperties()}})}constructor(){super(),this.__dataEnabled=!1,this.__dataReady=!1,this.__dataInvalid=!1,this.__data={},this.__dataPending=null,this.__dataOld=null,this.__dataInstanceProps=null,this.__dataCounter=0,this.__serializing=!1,this._initializeProperties()}ready(){this.__dataReady=!0,this._flushProperties()}_initializeProperties(){for(let e in this.__dataHasAccessor)this.hasOwnProperty(e)&&(this.__dataInstanceProps=this.__dataInstanceProps||{},this.__dataInstanceProps[e]=this[e],delete this[e])}_initializeInstanceProperties(e){Object.assign(this,e)}_setProperty(e,t){this._setPendingProperty(e,t)&&this._invalidateProperties()}_getProperty(e){return this.__data[e]}_setPendingProperty(e,t,i){let n=this.__data[e],o=this._shouldPropertyChange(e,t,n);return o&&(this.__dataPending||(this.__dataPending={},this.__dataOld={}),this.__dataOld&&!(e in this.__dataOld)&&(this.__dataOld[e]=n),this.__data[e]=t,this.__dataPending[e]=t),o}_isPropertyPending(e){return!(!this.__dataPending||!this.__dataPending.hasOwnProperty(e))}_invalidateProperties(){!this.__dataInvalid&&this.__dataReady&&(this.__dataInvalid=!0,Bt.run(()=>{this.__dataInvalid&&(this.__dataInvalid=!1,this._flushProperties())}))}_enableProperties(){this.__dataEnabled||(this.__dataEnabled=!0,this.__dataInstanceProps&&(this._initializeInstanceProperties(this.__dataInstanceProps),this.__dataInstanceProps=null),this.ready())}_flushProperties(){this.__dataCounter++;const e=this.__data,t=this.__dataPending,i=this.__dataOld;this._shouldPropertiesChange(e,t,i)&&(this.__dataPending=null,this.__dataOld=null,this._propertiesChanged(e,t,i)),this.__dataCounter--}_shouldPropertiesChange(e,t,i){return Boolean(t)}_propertiesChanged(e,t,i){}_shouldPropertyChange(e,t,i){return i!==t&&(i==i||t==t)}attributeChangedCallback(e,t,i,n){t!==i&&this._attributeToProperty(e,i),super.attributeChangedCallback&&super.attributeChangedCallback(e,t,i,n)}_attributeToProperty(e,t,i){if(!this.__serializing){const n=this.__dataAttributes,o=n&&n[e]||e;this[o]=this._deserializeValue(t,i||this.constructor.typeForProperty(o))}}_propertyToAttribute(e,t,i){this.__serializing=!0,i=arguments.length<3?this[e]:i,this._valueToNodeAttribute(this,i,t||this.constructor.attributeNameForProperty(e)),this.__serializing=!1}_valueToNodeAttribute(e,t,i){const n=this._serializeValue(t);"class"!==i&&"name"!==i&&"slot"!==i||(e=dt(e)),void 0===n?e.removeAttribute(i):e.setAttribute(i,""===n&&window.trustedTypes?window.trustedTypes.emptyScript:n)}_serializeValue(e){switch(typeof e){case"boolean":return e?"":void 0;default:return null!=e?e.toString():void 0}}_deserializeValue(e,t){switch(t){case Boolean:return null!==e;case Number:return Number(e);default:return e}}}return t}),jt={};let qt=HTMLElement.prototype;for(;qt;){let e=Object.getOwnPropertyNames(qt);for(let t=0;t<e.length;t++)jt[e[t]]=!0;qt=Object.getPrototypeOf(qt)}const Vt=window.trustedTypes?e=>trustedTypes.isHTML(e)||trustedTypes.isScript(e)||trustedTypes.isScriptURL(e):()=>!1;function $t(e,t){if(!jt[t]){let i=e[t];void 0!==i&&(e.__data?e._setPendingProperty(t,i):(e.__dataProto?e.hasOwnProperty(JSCompiler_renameProperty("__dataProto",e))||(e.__dataProto=Object.create(e.__dataProto)):e.__dataProto={},e.__dataProto[t]=i))}}const Ut=Ue(e=>{const t=Ht(e);class i extends t{static createPropertiesForAttributes(){let e=this.observedAttributes;for(let t=0;t<e.length;t++)this.prototype._createPropertyAccessor(kt(e[t]))}static attributeNameForProperty(e){return Et(e)}_initializeProperties(){this.__dataProto&&(this._initializeProtoProperties(this.__dataProto),this.__dataProto=null),super._initializeProperties()}_initializeProtoProperties(e){for(let t in e)this._setProperty(t,e[t])}_ensureAttribute(e,t){const i=this;i.hasAttribute(e)||this._valueToNodeAttribute(i,t,e)}_serializeValue(e){switch(typeof e){case"object":if(e instanceof Date)return e.toString();if(e){if(Vt(e))return e;try{return JSON.stringify(e)}catch(e){return""}}default:return super._serializeValue(e)}}_deserializeValue(e,t){let i;switch(t){case Object:try{i=JSON.parse(e)}catch(t){i=e}break;case Array:try{i=JSON.parse(e)}catch(t){i=null,console.warn("Polymer::Attributes: couldn't decode Array as JSON: "+e)}break;case Date:i=isNaN(e)?String(e):Number(e),i=new Date(i);break;default:i=super._deserializeValue(e,t)}return i}_definePropertyAccessor(e,t){$t(this,e),super._definePropertyAccessor(e,t)}_hasAccessor(e){return this.__dataHasAccessor&&this.__dataHasAccessor[e]}_isPropertyPending(e){return Boolean(this.__dataPending&&e in this.__dataPending)}}return i}),Kt={"dom-if":!0,"dom-repeat":!0};
|
|
178
178
|
/**
|
|
179
179
|
@license
|
|
180
180
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -183,7 +183,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
183
183
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
184
184
|
Code distributed by Google as part of the polymer project is also
|
|
185
185
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
186
|
-
*/let
|
|
186
|
+
*/let Yt=!1,Wt=!1;function Jt(){if(!Yt){Yt=!0;const e=document.createElement("textarea");e.placeholder="a",Wt=e.placeholder===e.textContent}return Wt}function Xt(e){Jt()&&"textarea"===e.localName&&e.placeholder&&e.placeholder===e.textContent&&(e.textContent=null)}const Zt=(()=>{const e=window.trustedTypes&&window.trustedTypes.createPolicy("polymer-template-event-attribute-policy",{createScript:e=>e});return(t,i,n)=>{const o=i.getAttribute(n);e&&n.startsWith("on-")?t.setAttribute(n,e.createScript(o,n)):t.setAttribute(n,o)}})();function Gt(e){let t=e.getAttribute("is");if(t&&Kt[t]){let i=e;for(i.removeAttribute("is"),e=i.ownerDocument.createElement(t),i.parentNode.replaceChild(e,i),e.appendChild(i);i.attributes.length;){const{name:t}=i.attributes[0];Zt(e,i,t),i.removeAttribute(t)}}return e}function Qt(e,t){let i=t.parentInfo&&Qt(e,t.parentInfo);if(!i)return e;for(let e=i.firstChild,n=0;e;e=e.nextSibling)if(t.parentIndex===n++)return e}function ei(e,t,i,n){n.id&&(t[n.id]=i)}function ti(e,t,i){if(i.events&&i.events.length)for(let n,o=0,s=i.events;o<s.length&&(n=s[o]);o++)e._addMethodEventListenerToNode(t,n.name,n.value,e)}function ii(e,t,i,n){i.templateInfo&&(t._templateInfo=i.templateInfo,t._parentTemplateInfo=n)}function ni(e,t,i){return e=e._methodHost||e,function(t){e[i]?e[i](t,t.detail):console.warn("listener method `"+i+"` not defined")}}const oi=Ue(e=>{class t extends e{static _parseTemplate(e,t){if(!e._templateInfo){let i=e._templateInfo={};i.nodeInfoList=[],i.nestedTemplate=Boolean(t),i.stripWhiteSpace=t&&t.stripWhiteSpace||e.hasAttribute&&e.hasAttribute("strip-whitespace"),this._parseTemplateContent(e,i,{parent:null})}return e._templateInfo}static _parseTemplateContent(e,t,i){return this._parseTemplateNode(e.content,t,i)}static _parseTemplateNode(e,t,i){let n=!1,o=e;return"template"!=o.localName||o.hasAttribute("preserve-content")?"slot"===o.localName&&(t.hasInsertionPoint=!0):n=this._parseTemplateNestedTemplate(o,t,i)||n,Xt(o),o.firstChild&&this._parseTemplateChildNodes(o,t,i),o.hasAttributes&&o.hasAttributes()&&(n=this._parseTemplateNodeAttributes(o,t,i)||n),n||i.noted}static _parseTemplateChildNodes(e,t,i){if("script"!==e.localName&&"style"!==e.localName)for(let n,o=e.firstChild,s=0;o;o=n){if("template"==o.localName&&(o=Gt(o)),n=o.nextSibling,o.nodeType===Node.TEXT_NODE){let i=n;for(;i&&i.nodeType===Node.TEXT_NODE;)o.textContent+=i.textContent,n=i.nextSibling,e.removeChild(i),i=n;if(t.stripWhiteSpace&&!o.textContent.trim()){e.removeChild(o);continue}}let r={parentIndex:s,parentInfo:i};this._parseTemplateNode(o,t,r)&&(r.infoIndex=t.nodeInfoList.push(r)-1),o.parentNode&&s++}}static _parseTemplateNestedTemplate(e,t,i){let n=e,o=this._parseTemplate(n,t);return(o.content=n.content.ownerDocument.createDocumentFragment()).appendChild(n.content),i.templateInfo=o,!0}static _parseTemplateNodeAttributes(e,t,i){let n=!1,o=Array.from(e.attributes);for(let s,r=o.length-1;s=o[r];r--)n=this._parseTemplateNodeAttribute(e,t,i,s.name,s.value)||n;return n}static _parseTemplateNodeAttribute(e,t,i,n,o){return"on-"===n.slice(0,3)?(e.removeAttribute(n),i.events=i.events||[],i.events.push({name:n.slice(3),value:o}),!0):"id"===n&&(i.id=o,!0)}static _contentForTemplate(e){let t=e._templateInfo;return t&&t.content||e.content}_stampTemplate(e,t){e&&!e.content&&window.HTMLTemplateElement&&HTMLTemplateElement.decorate&&HTMLTemplateElement.decorate(e);let i=(t=t||this.constructor._parseTemplate(e)).nodeInfoList,n=t.content||e.content,o=document.importNode(n,!0);o.__noInsertionPoint=!t.hasInsertionPoint;let s=o.nodeList=new Array(i.length);o.$={};for(let e,n=0,r=i.length;n<r&&(e=i[n]);n++){let i=s[n]=Qt(o,e);ei(this,o.$,i,e),ii(this,i,e,t),ti(this,i,e)}return o=o,o}_addMethodEventListenerToNode(e,t,i,n){let o=ni(n=n||e,t,i);return this._addEventListenerToNode(e,t,o),o}_addEventListenerToNode(e,t,i){e.addEventListener(t,i)}_removeEventListenerFromNode(e,t,i){e.removeEventListener(t,i)}}return t});
|
|
187
187
|
/**
|
|
188
188
|
* @fileoverview
|
|
189
189
|
* @suppress {checkPrototypalTypes}
|
|
@@ -194,7 +194,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
194
194
|
* be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by
|
|
195
195
|
* Google as part of the polymer project is also subject to an additional IP
|
|
196
196
|
* rights grant found at http://polymer.github.io/PATENTS.txt
|
|
197
|
-
*/let ni=0;const oi=[],si={COMPUTE:"__computeEffects",REFLECT:"__reflectEffects",NOTIFY:"__notifyEffects",PROPAGATE:"__propagateEffects",OBSERVE:"__observeEffects",READ_ONLY:"__readOnly"},ri="__computeInfo",ai=/[A-Z]/;function li(e,t,i){let n=e[t];if(n){if(!e.hasOwnProperty(t)&&(n=e[t]=Object.create(e[t]),i))for(let e in n){let t=n[e],i=n[e]=Array(t.length);for(let e=0;e<t.length;e++)i[e]=t[e]}}else n=e[t]={};return n}function ci(e,t,i,n,o,s){if(t){let r=!1;const a=ni++;for(let l in i){let c=t[o?ft(l):l];if(c)for(let t,p=0,h=c.length;p<h&&(t=c[p]);p++)t.info&&t.info.lastRun===a||o&&!hi(l,t.trigger)||(t.info&&(t.info.lastRun=a),t.fn(e,l,i,n,t.info,o,s),r=!0)}return r}return!1}function pi(e,t,i,n,o,s,r,a){let l=!1,c=t[r?ft(n):n];if(c)for(let t,p=0,h=c.length;p<h&&(t=c[p]);p++)t.info&&t.info.lastRun===i||r&&!hi(n,t.trigger)||(t.info&&(t.info.lastRun=i),t.fn(e,n,o,s,t.info,r,a),l=!0);return l}function hi(e,t){if(t){let i=t.name;return i==e||!(!t.structured||!_t(i,e))||!(!t.wildcard||!mt(i,e))}return!0}function di(e,t,i,n,o){let s="string"==typeof o.method?e[o.method]:o.method,r=o.property;s?s.call(e,e.__data[r],n[r]):o.dynamicFn||console.warn("observer method `"+o.method+"` not defined")}function ui(e,t,i,n,o){let s,r,a=e[si.NOTIFY],l=ni++;for(let r in t)t[r]&&(a&&pi(e,a,l,r,i,n,o)||o&&fi(e,r,i))&&(s=!0);s&&(r=e.__dataHost)&&r._invalidateProperties&&r._invalidateProperties()}function fi(e,t,i){let n=ft(t);if(n!==t){return _i(e,Et(n)+"-changed",i[t],t),!0}return!1}function _i(e,t,i,n){let o={value:i,queueProperty:!0};n&&(o.path=n),dt(e).dispatchEvent(new CustomEvent(t,{detail:o}))}function mi(e,t,i,n,o,s){let r=(s?ft(t):t)!=t?t:null,a=r?wt(e,r):e.__data[t];r&&void 0===a&&(a=i[t]),_i(e,o.eventName,a,r)}function yi(e,t,i,n,o){let s,r=e.detail,a=r&&r.path;a?(n=yt(i,n,a),s=r&&r.value):s=e.currentTarget[i],s=o?!s:s,t[si.READ_ONLY]&&t[si.READ_ONLY][n]||!t._setPendingPropertyOrPath(n,s,!0,Boolean(a))||r&&r.queueProperty||t._invalidateProperties()}function gi(e,t,i,n,o){let s=e.__data[t];Te&&(s=Te(s,o.attrName,"attribute",e)),e._propertyToAttribute(t,o.attrName,s)}function bi(e,t,i,n){let o=e[si.COMPUTE];if(o)if(Le){ni++;const s=xi(e),r=[];for(let e in t)wi(e,o,r,s,n);let a;for(;a=r.shift();)Si(e,"",t,i,a)&&wi(a.methodInfo,o,r,s,n);Object.assign(i,e.__dataOld),Object.assign(t,e.__dataPending),e.__dataPending=null}else{let s=t;for(;ci(e,o,s,i,n);)Object.assign(i,e.__dataOld),Object.assign(t,e.__dataPending),s=e.__dataPending,e.__dataPending=null}}const vi=(e,t,i)=>{let n=0,o=t.length-1,s=-1;for(;n<=o;){const r=n+o>>1,a=i.get(t[r].methodInfo)-i.get(e.methodInfo);if(a<0)n=r+1;else{if(!(a>0)){s=r;break}o=r-1}}s<0&&(s=o+1),t.splice(s,0,e)},wi=(e,t,i,n,o)=>{const s=t[o?ft(e):e];if(s)for(let t=0;t<s.length;t++){const r=s[t];r.info.lastRun===ni||o&&!hi(e,r.trigger)||(r.info.lastRun=ni,vi(r.info,i,n))}};function xi(e){let t=e.constructor.__orderedComputedDeps;if(!t){t=new Map;const i=e[si.COMPUTE];let n,{counts:o,ready:s,total:r}=Ci(e);for(;n=s.shift();){t.set(n,t.size);const e=i[n];e&&e.forEach(e=>{const t=e.info.methodInfo;--r,0==--o[t]&&s.push(t)})}if(0!==r){const t=e;console.warn(`Computed graph for ${t.localName} incomplete; circular?`)}e.constructor.__orderedComputedDeps=t}return t}function Ci(e){const t=e[ri],i={},n=e[si.COMPUTE],o=[];let s=0;for(let e in t){const n=t[e];s+=i[e]=n.args.filter(e=>!e.literal).length+(n.dynamicFn?1:0)}for(let e in n)t[e]||o.push(e);return{counts:i,ready:o,total:s}}function Si(e,t,i,n,o){let s=Fi(e,t,i,n,o);if(s===oi)return!1;let r=o.methodInfo;return e.__dataHasAccessor&&e.__dataHasAccessor[r]?e._setPendingProperty(r,s,!0):(e[r]=s,!1)}function Ai(e,t,i){let n=e.__dataLinkedPaths;if(n){let o;for(let s in n){let r=n[s];mt(s,t)?(o=yt(s,r,t),e._setPendingPropertyOrPath(o,i,!0,!0)):mt(r,t)&&(o=yt(r,s,t),e._setPendingPropertyOrPath(o,i,!0,!0))}}}function ki(e,t,i,n,o,s,r){i.bindings=i.bindings||[];let a={kind:n,target:o,parts:s,literal:r,isCompound:1!==s.length};if(i.bindings.push(a),Ii(a)){let{event:e,negate:t}=a.parts[0];a.listenerEvent=e||Et(o)+"-changed",a.listenerNegate=t}let l=t.nodeInfoList.length;for(let i=0;i<a.parts.length;i++){let n=a.parts[i];n.compoundIndex=i,Ei(e,t,a,n,l)}}function Ei(e,t,i,n,o){if(!n.literal)if("attribute"===i.kind&&"-"===i.target[0])console.warn("Cannot set attribute "+i.target+' because "-" is not a valid attribute starting character');else{let s=n.dependencies,r={index:o,binding:i,part:n,evaluator:e};for(let i=0;i<s.length;i++){let n=s[i];"string"==typeof n&&(n=$i(n),n.wildcard=!0),e._addTemplatePropertyEffect(t,n.rootProperty,{fn:Pi,info:r,trigger:n})}}}function Pi(e,t,i,n,o,s,r){let a=r[o.index],l=o.binding,c=o.part;if(s&&c.source&&t.length>c.source.length&&"property"==l.kind&&!l.isCompound&&a.__isPropertyEffectsClient&&a.__dataHasAccessor&&a.__dataHasAccessor[l.target]){let n=i[t];t=yt(c.source,l.target,t),a._setPendingPropertyOrPath(t,n,!1,!0)&&e._enqueueClient(a)}else{let r=o.evaluator._evaluateBinding(e,c,t,i,n,s);r!==oi&&Oi(e,a,l,c,r)}}function Oi(e,t,i,n,o){if(o=Ti(t,o,i,n),Te&&(o=Te(o,i.target,i.kind,t)),"attribute"==i.kind)e._valueToNodeAttribute(t,o,i.target);else{let n=i.target;t.__isPropertyEffectsClient&&t.__dataHasAccessor&&t.__dataHasAccessor[n]?t[si.READ_ONLY]&&t[si.READ_ONLY][n]||t._setPendingProperty(n,o)&&e._enqueueClient(t):e._setUnmanagedPropertyToNode(t,n,o)}}function Ti(e,t,i,n){if(i.isCompound){let o=e.__dataCompoundStorage[i.target];o[n.compoundIndex]=t,t=o.join("")}return"attribute"!==i.kind&&("textContent"!==i.target&&("value"!==i.target||"input"!==e.localName&&"textarea"!==e.localName)||(t=null==t?"":t)),t}function Ii(e){return Boolean(e.target)&&"attribute"!=e.kind&&"text"!=e.kind&&!e.isCompound&&"{"===e.parts[0].mode}function Ni(e,t){let{nodeList:i,nodeInfoList:n}=t;if(n.length)for(let t=0;t<n.length;t++){let o=n[t],s=i[t],r=o.bindings;if(r)for(let t=0;t<r.length;t++){let i=r[t];Ri(s,i),Mi(s,e,i)}s.__dataHost=e}}function Ri(e,t){if(t.isCompound){let i=e.__dataCompoundStorage||(e.__dataCompoundStorage={}),n=t.parts,o=new Array(n.length);for(let e=0;e<n.length;e++)o[e]=n[e].literal;let s=t.target;i[s]=o,t.literal&&"property"==t.kind&&("className"===s&&(e=dt(e)),e[s]=t.literal)}}function Mi(e,t,i){if(i.listenerEvent){let n=i.parts[0];e.addEventListener(i.listenerEvent,(function(e){yi(e,t,i.target,n.source,n.negate)}))}}function zi(e,t,i,n,o,s){s=t.static||s&&("object"!=typeof s||s[t.methodName]);let r={methodName:t.methodName,args:t.args,methodInfo:o,dynamicFn:s};for(let o,s=0;s<t.args.length&&(o=t.args[s]);s++)o.literal||e._addPropertyEffect(o.rootProperty,i,{fn:n,info:r,trigger:o});return s&&e._addPropertyEffect(t.methodName,i,{fn:n,info:r}),r}function Fi(e,t,i,n,o){let s=e._methodHost||e,r=s[o.methodName];if(r){let n=e._marshalArgs(o.args,t,i);return n===oi?oi:r.apply(s,n)}o.dynamicFn||console.warn("method `"+o.methodName+"` not defined")}const Di=[],Li="(?:[a-zA-Z_$][\\w.:$\\-*]*)",Bi="(?:("+Li+"|"+"(?:[-+]?[0-9]*\\.?[0-9]+(?:[eE][-+]?[0-9]+)?)"+"|"+("(?:"+"(?:'(?:[^'\\\\]|\\\\.)*')"+"|"+'(?:"(?:[^"\\\\]|\\\\.)*")'+")")+")\\s*)",Hi=new RegExp("(\\[\\[|{{)\\s*"+"(?:(!)\\s*)?"+("("+Li+"\\s*"+("(?:\\(\\s*(?:"+("(?:"+Bi+"(?:,\\s*"+Bi+")*)")+"?)\\)\\s*)")+"?)")+"(?:]]|}})","g");function ji(e){let t="";for(let i=0;i<e.length;i++){t+=e[i].literal||""}return t}function qi(e){let t=e.match(/([^\s]+?)\(([\s\S]*)\)/);if(t){let e={methodName:t[1],static:!0,args:Di};if(t[2].trim()){return Vi(t[2].replace(/\\,/g,",").split(","),e)}return e}return null}function Vi(e,t){return t.args=e.map((function(e){let i=$i(e);return i.literal||(t.static=!1),i}),this),t}function $i(e){let t=e.trim().replace(/,/g,",").replace(/\\(.)/g,"$1"),i={name:t,value:"",literal:!1},n=t[0];switch("-"===n&&(n=t[1]),n>="0"&&n<="9"&&(n="#"),n){case"'":case'"':i.value=t.slice(1,-1),i.literal=!0;break;case"#":i.value=Number(t),i.literal=!0}return i.literal||(i.rootProperty=ft(t),i.structured=ut(t),i.structured&&(i.wildcard=".*"==t.slice(-2),i.wildcard&&(i.name=t.slice(0,-2)))),i}function Ui(e,t,i){let n=wt(e,i);return void 0===n&&(n=t[i]),n}function Ki(e,t,i,n){const o={indexSplices:n};De&&!e._overrideLegacyUndefined&&(t.splices=o),e.notifyPath(i+".splices",o),e.notifyPath(i+".length",t.length),De&&!e._overrideLegacyUndefined&&(o.indexSplices=[])}function Yi(e,t,i,n,o,s){Ki(e,t,i,[{index:n,addedCount:o,removed:s,object:t,type:"splice"}])}function Wi(e){return e[0].toUpperCase()+e.substring(1)}const Ji=Ue(e=>{const t=ii($t(e));class i extends t{constructor(){super(),this.__isPropertyEffectsClient=!0,this.__dataClientsReady,this.__dataPendingClients,this.__dataToNotify,this.__dataLinkedPaths,this.__dataHasPaths,this.__dataCompoundStorage,this.__dataHost,this.__dataTemp,this.__dataClientsInitialized,this.__data,this.__dataPending,this.__dataOld,this.__computeEffects,this.__computeInfo,this.__reflectEffects,this.__notifyEffects,this.__propagateEffects,this.__observeEffects,this.__readOnly,this.__templateInfo,this._overrideLegacyUndefined}get PROPERTY_EFFECT_TYPES(){return si}_initializeProperties(){super._initializeProperties(),this._registerHost(),this.__dataClientsReady=!1,this.__dataPendingClients=null,this.__dataToNotify=null,this.__dataLinkedPaths=null,this.__dataHasPaths=!1,this.__dataCompoundStorage=this.__dataCompoundStorage||null,this.__dataHost=this.__dataHost||null,this.__dataTemp={},this.__dataClientsInitialized=!1}_registerHost(){if(Xi.length){let e=Xi[Xi.length-1];e._enqueueClient(this),this.__dataHost=e}}_initializeProtoProperties(e){this.__data=Object.create(e),this.__dataPending=Object.create(e),this.__dataOld={}}_initializeInstanceProperties(e){let t=this[si.READ_ONLY];for(let i in e)t&&t[i]||(this.__dataPending=this.__dataPending||{},this.__dataOld=this.__dataOld||{},this.__data[i]=this.__dataPending[i]=e[i])}_addPropertyEffect(e,t,i){this._createPropertyAccessor(e,t==si.READ_ONLY);let n=li(this,t,!0)[e];n||(n=this[t][e]=[]),n.push(i)}_removePropertyEffect(e,t,i){let n=li(this,t,!0)[e],o=n.indexOf(i);o>=0&&n.splice(o,1)}_hasPropertyEffect(e,t){let i=this[t];return Boolean(i&&i[e])}_hasReadOnlyEffect(e){return this._hasPropertyEffect(e,si.READ_ONLY)}_hasNotifyEffect(e){return this._hasPropertyEffect(e,si.NOTIFY)}_hasReflectEffect(e){return this._hasPropertyEffect(e,si.REFLECT)}_hasComputedEffect(e){return this._hasPropertyEffect(e,si.COMPUTE)}_setPendingPropertyOrPath(e,t,i,n){if(n||ft(Array.isArray(e)?e[0]:e)!==e){if(!n){let i=wt(this,e);if(!(e=xt(this,e,t))||!super._shouldPropertyChange(e,t,i))return!1}if(this.__dataHasPaths=!0,this._setPendingProperty(e,t,i))return Ai(this,e,t),!0}else{if(this.__dataHasAccessor&&this.__dataHasAccessor[e])return this._setPendingProperty(e,t,i);this[e]=t}return!1}_setUnmanagedPropertyToNode(e,t,i){i===e[t]&&"object"!=typeof i||("className"===t&&(e=dt(e)),e[t]=i)}_setPendingProperty(e,t,i){let n=this.__dataHasPaths&&ut(e),o=n?this.__dataTemp:this.__data;return!!this._shouldPropertyChange(e,t,o[e])&&(this.__dataPending||(this.__dataPending={},this.__dataOld={}),e in this.__dataOld||(this.__dataOld[e]=this.__data[e]),n?this.__dataTemp[e]=t:this.__data[e]=t,this.__dataPending[e]=t,(n||this[si.NOTIFY]&&this[si.NOTIFY][e])&&(this.__dataToNotify=this.__dataToNotify||{},this.__dataToNotify[e]=i),!0)}_setProperty(e,t){this._setPendingProperty(e,t,!0)&&this._invalidateProperties()}_invalidateProperties(){this.__dataReady&&this._flushProperties()}_enqueueClient(e){this.__dataPendingClients=this.__dataPendingClients||[],e!==this&&this.__dataPendingClients.push(e)}_flushClients(){this.__dataClientsReady?this.__enableOrFlushClients():(this.__dataClientsReady=!0,this._readyClients(),this.__dataReady=!0)}__enableOrFlushClients(){let e=this.__dataPendingClients;if(e){this.__dataPendingClients=null;for(let t=0;t<e.length;t++){let i=e[t];i.__dataEnabled?i.__dataPending&&i._flushProperties():i._enableProperties()}}}_readyClients(){this.__enableOrFlushClients()}setProperties(e,t){for(let i in e)!t&&this[si.READ_ONLY]&&this[si.READ_ONLY][i]||this._setPendingPropertyOrPath(i,e[i],!0);this._invalidateProperties()}ready(){this._flushProperties(),this.__dataClientsReady||this._flushClients(),this.__dataPending&&this._flushProperties()}_propertiesChanged(e,t,i){let n,o=this.__dataHasPaths;this.__dataHasPaths=!1,bi(this,t,i,o),n=this.__dataToNotify,this.__dataToNotify=null,this._propagatePropertyChanges(t,i,o),this._flushClients(),ci(this,this[si.REFLECT],t,i,o),ci(this,this[si.OBSERVE],t,i,o),n&&ui(this,n,t,i,o),1==this.__dataCounter&&(this.__dataTemp={})}_propagatePropertyChanges(e,t,i){this[si.PROPAGATE]&&ci(this,this[si.PROPAGATE],e,t,i),this.__templateInfo&&this._runEffectsForTemplate(this.__templateInfo,e,t,i)}_runEffectsForTemplate(e,t,i,n){const o=(t,n)=>{ci(this,e.propertyEffects,t,i,n,e.nodeList);for(let o=e.firstChild;o;o=o.nextSibling)this._runEffectsForTemplate(o,t,i,n)};e.runEffects?e.runEffects(o,t,n):o(t,n)}linkPaths(e,t){e=bt(e),t=bt(t),this.__dataLinkedPaths=this.__dataLinkedPaths||{},this.__dataLinkedPaths[e]=t}unlinkPaths(e){e=bt(e),this.__dataLinkedPaths&&delete this.__dataLinkedPaths[e]}notifySplices(e,t){let i={path:""};Ki(this,wt(this,e,i),i.path,t)}get(e,t){return wt(t||this,e)}set(e,t,i){i?xt(i,e,t):this[si.READ_ONLY]&&this[si.READ_ONLY][e]||this._setPendingPropertyOrPath(e,t,!0)&&this._invalidateProperties()}push(e,...t){let i={path:""},n=wt(this,e,i),o=n.length,s=n.push(...t);return t.length&&Yi(this,n,i.path,o,t.length,[]),s}pop(e){let t={path:""},i=wt(this,e,t),n=Boolean(i.length),o=i.pop();return n&&Yi(this,i,t.path,i.length,0,[o]),o}splice(e,t,i,...n){let o,s={path:""},r=wt(this,e,s);return t<0?t=r.length-Math.floor(-t):t&&(t=Math.floor(t)),o=2===arguments.length?r.splice(t):r.splice(t,i,...n),(n.length||o.length)&&Yi(this,r,s.path,t,n.length,o),o}shift(e){let t={path:""},i=wt(this,e,t),n=Boolean(i.length),o=i.shift();return n&&Yi(this,i,t.path,0,0,[o]),o}unshift(e,...t){let i={path:""},n=wt(this,e,i),o=n.unshift(...t);return t.length&&Yi(this,n,i.path,0,t.length,[]),o}notifyPath(e,t){let i;if(1==arguments.length){let n={path:""};t=wt(this,e,n),i=n.path}else i=Array.isArray(e)?bt(e):e;this._setPendingPropertyOrPath(i,t,!0,!0)&&this._invalidateProperties()}_createReadOnlyProperty(e,t){this._addPropertyEffect(e,si.READ_ONLY),t&&(this["_set"+Wi(e)]=function(t){this._setProperty(e,t)})}_createPropertyObserver(e,t,i){let n={property:e,method:t,dynamicFn:Boolean(i)};this._addPropertyEffect(e,si.OBSERVE,{fn:di,info:n,trigger:{name:e}}),i&&this._addPropertyEffect(t,si.OBSERVE,{fn:di,info:n,trigger:{name:t}})}_createMethodObserver(e,t){let i=qi(e);if(!i)throw new Error("Malformed observer expression '"+e+"'");zi(this,i,si.OBSERVE,Fi,null,t)}_createNotifyingProperty(e){this._addPropertyEffect(e,si.NOTIFY,{fn:mi,info:{eventName:Et(e)+"-changed",property:e}})}_createReflectedProperty(e){let t=this.constructor.attributeNameForProperty(e);"-"===t[0]?console.warn("Property "+e+" cannot be reflected to attribute "+t+' because "-" is not a valid starting attribute name. Use a lowercase first letter for the property instead.'):this._addPropertyEffect(e,si.REFLECT,{fn:gi,info:{attrName:t}})}_createComputedProperty(e,t,i){let n=qi(t);if(!n)throw new Error("Malformed computed expression '"+t+"'");const o=zi(this,n,si.COMPUTE,Si,e,i);li(this,ri)[e]=o}_marshalArgs(e,t,i){const n=this.__data,o=[];for(let s=0,r=e.length;s<r;s++){let{name:r,structured:a,wildcard:l,value:c,literal:p}=e[s];if(!p)if(l){const e=mt(r,t),o=Ui(n,i,e?t:r);c={path:e?t:r,value:o,base:e?wt(n,r):o}}else c=a?Ui(n,i,r):n[r];if(De&&!this._overrideLegacyUndefined&&void 0===c&&e.length>1)return oi;o[s]=c}return o}static addPropertyEffect(e,t,i){this.prototype._addPropertyEffect(e,t,i)}static createPropertyObserver(e,t,i){this.prototype._createPropertyObserver(e,t,i)}static createMethodObserver(e,t){this.prototype._createMethodObserver(e,t)}static createNotifyingProperty(e){this.prototype._createNotifyingProperty(e)}static createReadOnlyProperty(e,t){this.prototype._createReadOnlyProperty(e,t)}static createReflectedProperty(e){this.prototype._createReflectedProperty(e)}static createComputedProperty(e,t,i){this.prototype._createComputedProperty(e,t,i)}static bindTemplate(e){return this.prototype._bindTemplate(e)}_bindTemplate(e,t){let i=this.constructor._parseTemplate(e),n=this.__preBoundTemplateInfo==i;if(!n)for(let e in i.propertyEffects)this._createPropertyAccessor(e);if(t)if(i=Object.create(i),i.wasPreBound=n,this.__templateInfo){const t=e._parentTemplateInfo||this.__templateInfo,n=t.lastChild;i.parent=t,t.lastChild=i,i.previousSibling=n,n?n.nextSibling=i:t.firstChild=i}else this.__templateInfo=i;else this.__preBoundTemplateInfo=i;return i}static _addTemplatePropertyEffect(e,t,i){(e.hostProps=e.hostProps||{})[t]=!0;let n=e.propertyEffects=e.propertyEffects||{};(n[t]=n[t]||[]).push(i)}_stampTemplate(e,t){t=t||this._bindTemplate(e,!0),Xi.push(this);let i=super._stampTemplate(e,t);if(Xi.pop(),t.nodeList=i.nodeList,!t.wasPreBound){let e=t.childNodes=[];for(let t=i.firstChild;t;t=t.nextSibling)e.push(t)}return i.templateInfo=t,Ni(this,t),this.__dataClientsReady&&(this._runEffectsForTemplate(t,this.__data,null,!1),this._flushClients()),i}_removeBoundDom(e){const t=e.templateInfo,{previousSibling:i,nextSibling:n,parent:o}=t;i?i.nextSibling=n:o&&(o.firstChild=n),n?n.previousSibling=i:o&&(o.lastChild=i),t.nextSibling=t.previousSibling=null;let s=t.childNodes;for(let e=0;e<s.length;e++){let t=s[e];dt(dt(t).parentNode).removeChild(t)}}static _parseTemplateNode(e,i,n){let o=t._parseTemplateNode.call(this,e,i,n);if(e.nodeType===Node.TEXT_NODE){let t=this._parseBindings(e.textContent,i);t&&(e.textContent=ji(t)||" ",ki(this,i,n,"text","textContent",t),o=!0)}return o}static _parseTemplateNodeAttribute(e,i,n,o,s){let r=this._parseBindings(s,i);if(r){let t=o,s="property";ai.test(o)?s="attribute":"$"==o[o.length-1]&&(o=o.slice(0,-1),s="attribute");let a=ji(r);return a&&"attribute"==s&&("class"==o&&e.hasAttribute("class")&&(a+=" "+e.getAttribute(o)),e.setAttribute(o,a)),"attribute"==s&&"disable-upgrade$"==t&&e.setAttribute(o,""),"input"===e.localName&&"value"===t&&e.setAttribute(t,""),e.removeAttribute(t),"property"===s&&(o=kt(o)),ki(this,i,n,s,o,r,a),!0}return t._parseTemplateNodeAttribute.call(this,e,i,n,o,s)}static _parseTemplateNestedTemplate(e,i,n){let o=t._parseTemplateNestedTemplate.call(this,e,i,n);const s=e.parentNode,r=n.templateInfo,a="dom-if"===s.localName,l="dom-repeat"===s.localName;Be&&(a||l)&&(s.removeChild(e),(n=n.parentInfo).templateInfo=r,n.noted=!0,o=!1);let c=r.hostProps;if(He&&a)c&&(i.hostProps=Object.assign(i.hostProps||{},c),Be||(n.parentInfo.noted=!0));else{let e="{";for(let t in c){ki(this,i,n,"property","_host_"+t,[{mode:e,source:t,dependencies:[t],hostProp:!0}])}}return o}static _parseBindings(e,t){let i,n=[],o=0;for(;null!==(i=Hi.exec(e));){i.index>o&&n.push({literal:e.slice(o,i.index)});let s=i[1][0],r=Boolean(i[2]),a=i[3].trim(),l=!1,c="",p=-1;"{"==s&&(p=a.indexOf("::"))>0&&(c=a.substring(p+2),a=a.substring(0,p),l=!0);let h=qi(a),d=[];if(h){let{args:e,methodName:i}=h;for(let t=0;t<e.length;t++){let i=e[t];i.literal||d.push(i)}let n=t.dynamicFns;(n&&n[i]||h.static)&&(d.push(i),h.dynamicFn=!0)}else d.push(a);n.push({source:a,mode:s,negate:r,customEvent:l,signature:h,dependencies:d,event:c}),o=Hi.lastIndex}if(o&&o<e.length){let t=e.substring(o);t&&n.push({literal:t})}return n.length?n:null}static _evaluateBinding(e,t,i,n,o,s){let r;return r=t.signature?Fi(e,i,n,o,t.signature):i!=t.source?wt(e,t.source):s&&ut(i)?wt(e,i):e.__data[i],t.negate&&(r=!r),r}}return i}),Xi=[];
|
|
197
|
+
*/let si=0;const ri=[],ai={COMPUTE:"__computeEffects",REFLECT:"__reflectEffects",NOTIFY:"__notifyEffects",PROPAGATE:"__propagateEffects",OBSERVE:"__observeEffects",READ_ONLY:"__readOnly"},li="__computeInfo",ci=/[A-Z]/;function pi(e,t,i){let n=e[t];if(n){if(!e.hasOwnProperty(t)&&(n=e[t]=Object.create(e[t]),i))for(let e in n){let t=n[e],i=n[e]=Array(t.length);for(let e=0;e<t.length;e++)i[e]=t[e]}}else n=e[t]={};return n}function hi(e,t,i,n,o,s){if(t){let r=!1;const a=si++;for(let l in i){let c=t[o?ft(l):l];if(c)for(let t,p=0,h=c.length;p<h&&(t=c[p]);p++)t.info&&t.info.lastRun===a||o&&!ui(l,t.trigger)||(t.info&&(t.info.lastRun=a),t.fn(e,l,i,n,t.info,o,s),r=!0)}return r}return!1}function di(e,t,i,n,o,s,r,a){let l=!1,c=t[r?ft(n):n];if(c)for(let t,p=0,h=c.length;p<h&&(t=c[p]);p++)t.info&&t.info.lastRun===i||r&&!ui(n,t.trigger)||(t.info&&(t.info.lastRun=i),t.fn(e,n,o,s,t.info,r,a),l=!0);return l}function ui(e,t){if(t){let i=t.name;return i==e||!(!t.structured||!_t(i,e))||!(!t.wildcard||!mt(i,e))}return!0}function fi(e,t,i,n,o){let s="string"==typeof o.method?e[o.method]:o.method,r=o.property;s?s.call(e,e.__data[r],n[r]):o.dynamicFn||console.warn("observer method `"+o.method+"` not defined")}function _i(e,t,i,n,o){let s,r,a=e[ai.NOTIFY],l=si++;for(let r in t)t[r]&&(a&&di(e,a,l,r,i,n,o)||o&&mi(e,r,i))&&(s=!0);s&&(r=e.__dataHost)&&r._invalidateProperties&&r._invalidateProperties()}function mi(e,t,i){let n=ft(t);if(n!==t){return yi(e,Et(n)+"-changed",i[t],t),!0}return!1}function yi(e,t,i,n){let o={value:i,queueProperty:!0};n&&(o.path=n),dt(e).dispatchEvent(new CustomEvent(t,{detail:o}))}function gi(e,t,i,n,o,s){let r=(s?ft(t):t)!=t?t:null,a=r?wt(e,r):e.__data[t];r&&void 0===a&&(a=i[t]),yi(e,o.eventName,a,r)}function bi(e,t,i,n,o){let s,r=e.detail,a=r&&r.path;a?(n=yt(i,n,a),s=r&&r.value):s=e.currentTarget[i],s=o?!s:s,t[ai.READ_ONLY]&&t[ai.READ_ONLY][n]||!t._setPendingPropertyOrPath(n,s,!0,Boolean(a))||r&&r.queueProperty||t._invalidateProperties()}function vi(e,t,i,n,o){let s=e.__data[t];Te&&(s=Te(s,o.attrName,"attribute",e)),e._propertyToAttribute(t,o.attrName,s)}function wi(e,t,i,n){let o=e[ai.COMPUTE];if(o)if(Le){si++;const s=Si(e),r=[];for(let e in t)Ci(e,o,r,s,n);let a;for(;a=r.shift();)ki(e,"",t,i,a)&&Ci(a.methodInfo,o,r,s,n);Object.assign(i,e.__dataOld),Object.assign(t,e.__dataPending),e.__dataPending=null}else{let s=t;for(;hi(e,o,s,i,n);)Object.assign(i,e.__dataOld),Object.assign(t,e.__dataPending),s=e.__dataPending,e.__dataPending=null}}const xi=(e,t,i)=>{let n=0,o=t.length-1,s=-1;for(;n<=o;){const r=n+o>>1,a=i.get(t[r].methodInfo)-i.get(e.methodInfo);if(a<0)n=r+1;else{if(!(a>0)){s=r;break}o=r-1}}s<0&&(s=o+1),t.splice(s,0,e)},Ci=(e,t,i,n,o)=>{const s=t[o?ft(e):e];if(s)for(let t=0;t<s.length;t++){const r=s[t];r.info.lastRun===si||o&&!ui(e,r.trigger)||(r.info.lastRun=si,xi(r.info,i,n))}};function Si(e){let t=e.constructor.__orderedComputedDeps;if(!t){t=new Map;const i=e[ai.COMPUTE];let n,{counts:o,ready:s,total:r}=Ai(e);for(;n=s.shift();){t.set(n,t.size);const e=i[n];e&&e.forEach(e=>{const t=e.info.methodInfo;--r,0==--o[t]&&s.push(t)})}if(0!==r){const t=e;console.warn(`Computed graph for ${t.localName} incomplete; circular?`)}e.constructor.__orderedComputedDeps=t}return t}function Ai(e){const t=e[li],i={},n=e[ai.COMPUTE],o=[];let s=0;for(let e in t){const n=t[e];s+=i[e]=n.args.filter(e=>!e.literal).length+(n.dynamicFn?1:0)}for(let e in n)t[e]||o.push(e);return{counts:i,ready:o,total:s}}function ki(e,t,i,n,o){let s=Li(e,t,i,n,o);if(s===ri)return!1;let r=o.methodInfo;return e.__dataHasAccessor&&e.__dataHasAccessor[r]?e._setPendingProperty(r,s,!0):(e[r]=s,!1)}function Ei(e,t,i){let n=e.__dataLinkedPaths;if(n){let o;for(let s in n){let r=n[s];mt(s,t)?(o=yt(s,r,t),e._setPendingPropertyOrPath(o,i,!0,!0)):mt(r,t)&&(o=yt(r,s,t),e._setPendingPropertyOrPath(o,i,!0,!0))}}}function Pi(e,t,i,n,o,s,r){i.bindings=i.bindings||[];let a={kind:n,target:o,parts:s,literal:r,isCompound:1!==s.length};if(i.bindings.push(a),Ri(a)){let{event:e,negate:t}=a.parts[0];a.listenerEvent=e||Et(o)+"-changed",a.listenerNegate=t}let l=t.nodeInfoList.length;for(let i=0;i<a.parts.length;i++){let n=a.parts[i];n.compoundIndex=i,Oi(e,t,a,n,l)}}function Oi(e,t,i,n,o){if(!n.literal)if("attribute"===i.kind&&"-"===i.target[0])console.warn("Cannot set attribute "+i.target+' because "-" is not a valid attribute starting character');else{let s=n.dependencies,r={index:o,binding:i,part:n,evaluator:e};for(let i=0;i<s.length;i++){let n=s[i];"string"==typeof n&&(n=Ki(n),n.wildcard=!0),e._addTemplatePropertyEffect(t,n.rootProperty,{fn:Ti,info:r,trigger:n})}}}function Ti(e,t,i,n,o,s,r){let a=r[o.index],l=o.binding,c=o.part;if(s&&c.source&&t.length>c.source.length&&"property"==l.kind&&!l.isCompound&&a.__isPropertyEffectsClient&&a.__dataHasAccessor&&a.__dataHasAccessor[l.target]){let n=i[t];t=yt(c.source,l.target,t),a._setPendingPropertyOrPath(t,n,!1,!0)&&e._enqueueClient(a)}else{let r=o.evaluator._evaluateBinding(e,c,t,i,n,s);r!==ri&&Ii(e,a,l,c,r)}}function Ii(e,t,i,n,o){if(o=Ni(t,o,i,n),Te&&(o=Te(o,i.target,i.kind,t)),"attribute"==i.kind)e._valueToNodeAttribute(t,o,i.target);else{let n=i.target;t.__isPropertyEffectsClient&&t.__dataHasAccessor&&t.__dataHasAccessor[n]?t[ai.READ_ONLY]&&t[ai.READ_ONLY][n]||t._setPendingProperty(n,o)&&e._enqueueClient(t):e._setUnmanagedPropertyToNode(t,n,o)}}function Ni(e,t,i,n){if(i.isCompound){let o=e.__dataCompoundStorage[i.target];o[n.compoundIndex]=t,t=o.join("")}return"attribute"!==i.kind&&("textContent"!==i.target&&("value"!==i.target||"input"!==e.localName&&"textarea"!==e.localName)||(t=null==t?"":t)),t}function Ri(e){return Boolean(e.target)&&"attribute"!=e.kind&&"text"!=e.kind&&!e.isCompound&&"{"===e.parts[0].mode}function Mi(e,t){let{nodeList:i,nodeInfoList:n}=t;if(n.length)for(let t=0;t<n.length;t++){let o=n[t],s=i[t],r=o.bindings;if(r)for(let t=0;t<r.length;t++){let i=r[t];zi(s,i),Fi(s,e,i)}s.__dataHost=e}}function zi(e,t){if(t.isCompound){let i=e.__dataCompoundStorage||(e.__dataCompoundStorage={}),n=t.parts,o=new Array(n.length);for(let e=0;e<n.length;e++)o[e]=n[e].literal;let s=t.target;i[s]=o,t.literal&&"property"==t.kind&&("className"===s&&(e=dt(e)),e[s]=t.literal)}}function Fi(e,t,i){if(i.listenerEvent){let n=i.parts[0];e.addEventListener(i.listenerEvent,(function(e){bi(e,t,i.target,n.source,n.negate)}))}}function Di(e,t,i,n,o,s){s=t.static||s&&("object"!=typeof s||s[t.methodName]);let r={methodName:t.methodName,args:t.args,methodInfo:o,dynamicFn:s};for(let o,s=0;s<t.args.length&&(o=t.args[s]);s++)o.literal||e._addPropertyEffect(o.rootProperty,i,{fn:n,info:r,trigger:o});return s&&e._addPropertyEffect(t.methodName,i,{fn:n,info:r}),r}function Li(e,t,i,n,o){let s=e._methodHost||e,r=s[o.methodName];if(r){let n=e._marshalArgs(o.args,t,i);return n===ri?ri:r.apply(s,n)}o.dynamicFn||console.warn("method `"+o.methodName+"` not defined")}const Bi=[],Hi="(?:[a-zA-Z_$][\\w.:$\\-*]*)",ji="(?:("+Hi+"|"+"(?:[-+]?[0-9]*\\.?[0-9]+(?:[eE][-+]?[0-9]+)?)"+"|"+("(?:"+"(?:'(?:[^'\\\\]|\\\\.)*')"+"|"+'(?:"(?:[^"\\\\]|\\\\.)*")'+")")+")\\s*)",qi=new RegExp("(\\[\\[|{{)\\s*"+"(?:(!)\\s*)?"+("("+Hi+"\\s*"+("(?:\\(\\s*(?:"+("(?:"+ji+"(?:,\\s*"+ji+")*)")+"?)\\)\\s*)")+"?)")+"(?:]]|}})","g");function Vi(e){let t="";for(let i=0;i<e.length;i++){t+=e[i].literal||""}return t}function $i(e){let t=e.match(/([^\s]+?)\(([\s\S]*)\)/);if(t){let e={methodName:t[1],static:!0,args:Bi};if(t[2].trim()){return Ui(t[2].replace(/\\,/g,",").split(","),e)}return e}return null}function Ui(e,t){return t.args=e.map((function(e){let i=Ki(e);return i.literal||(t.static=!1),i}),this),t}function Ki(e){let t=e.trim().replace(/,/g,",").replace(/\\(.)/g,"$1"),i={name:t,value:"",literal:!1},n=t[0];switch("-"===n&&(n=t[1]),n>="0"&&n<="9"&&(n="#"),n){case"'":case'"':i.value=t.slice(1,-1),i.literal=!0;break;case"#":i.value=Number(t),i.literal=!0}return i.literal||(i.rootProperty=ft(t),i.structured=ut(t),i.structured&&(i.wildcard=".*"==t.slice(-2),i.wildcard&&(i.name=t.slice(0,-2)))),i}function Yi(e,t,i){let n=wt(e,i);return void 0===n&&(n=t[i]),n}function Wi(e,t,i,n){const o={indexSplices:n};De&&!e._overrideLegacyUndefined&&(t.splices=o),e.notifyPath(i+".splices",o),e.notifyPath(i+".length",t.length),De&&!e._overrideLegacyUndefined&&(o.indexSplices=[])}function Ji(e,t,i,n,o,s){Wi(e,t,i,[{index:n,addedCount:o,removed:s,object:t,type:"splice"}])}function Xi(e){return e[0].toUpperCase()+e.substring(1)}const Zi=Ue(e=>{const t=oi(Ut(e));class i extends t{constructor(){super(),this.__isPropertyEffectsClient=!0,this.__dataClientsReady,this.__dataPendingClients,this.__dataToNotify,this.__dataLinkedPaths,this.__dataHasPaths,this.__dataCompoundStorage,this.__dataHost,this.__dataTemp,this.__dataClientsInitialized,this.__data,this.__dataPending,this.__dataOld,this.__computeEffects,this.__computeInfo,this.__reflectEffects,this.__notifyEffects,this.__propagateEffects,this.__observeEffects,this.__readOnly,this.__templateInfo,this._overrideLegacyUndefined}get PROPERTY_EFFECT_TYPES(){return ai}_initializeProperties(){super._initializeProperties(),this._registerHost(),this.__dataClientsReady=!1,this.__dataPendingClients=null,this.__dataToNotify=null,this.__dataLinkedPaths=null,this.__dataHasPaths=!1,this.__dataCompoundStorage=this.__dataCompoundStorage||null,this.__dataHost=this.__dataHost||null,this.__dataTemp={},this.__dataClientsInitialized=!1}_registerHost(){if(Gi.length){let e=Gi[Gi.length-1];e._enqueueClient(this),this.__dataHost=e}}_initializeProtoProperties(e){this.__data=Object.create(e),this.__dataPending=Object.create(e),this.__dataOld={}}_initializeInstanceProperties(e){let t=this[ai.READ_ONLY];for(let i in e)t&&t[i]||(this.__dataPending=this.__dataPending||{},this.__dataOld=this.__dataOld||{},this.__data[i]=this.__dataPending[i]=e[i])}_addPropertyEffect(e,t,i){this._createPropertyAccessor(e,t==ai.READ_ONLY);let n=pi(this,t,!0)[e];n||(n=this[t][e]=[]),n.push(i)}_removePropertyEffect(e,t,i){let n=pi(this,t,!0)[e],o=n.indexOf(i);o>=0&&n.splice(o,1)}_hasPropertyEffect(e,t){let i=this[t];return Boolean(i&&i[e])}_hasReadOnlyEffect(e){return this._hasPropertyEffect(e,ai.READ_ONLY)}_hasNotifyEffect(e){return this._hasPropertyEffect(e,ai.NOTIFY)}_hasReflectEffect(e){return this._hasPropertyEffect(e,ai.REFLECT)}_hasComputedEffect(e){return this._hasPropertyEffect(e,ai.COMPUTE)}_setPendingPropertyOrPath(e,t,i,n){if(n||ft(Array.isArray(e)?e[0]:e)!==e){if(!n){let i=wt(this,e);if(!(e=xt(this,e,t))||!super._shouldPropertyChange(e,t,i))return!1}if(this.__dataHasPaths=!0,this._setPendingProperty(e,t,i))return Ei(this,e,t),!0}else{if(this.__dataHasAccessor&&this.__dataHasAccessor[e])return this._setPendingProperty(e,t,i);this[e]=t}return!1}_setUnmanagedPropertyToNode(e,t,i){i===e[t]&&"object"!=typeof i||("className"===t&&(e=dt(e)),e[t]=i)}_setPendingProperty(e,t,i){let n=this.__dataHasPaths&&ut(e),o=n?this.__dataTemp:this.__data;return!!this._shouldPropertyChange(e,t,o[e])&&(this.__dataPending||(this.__dataPending={},this.__dataOld={}),e in this.__dataOld||(this.__dataOld[e]=this.__data[e]),n?this.__dataTemp[e]=t:this.__data[e]=t,this.__dataPending[e]=t,(n||this[ai.NOTIFY]&&this[ai.NOTIFY][e])&&(this.__dataToNotify=this.__dataToNotify||{},this.__dataToNotify[e]=i),!0)}_setProperty(e,t){this._setPendingProperty(e,t,!0)&&this._invalidateProperties()}_invalidateProperties(){this.__dataReady&&this._flushProperties()}_enqueueClient(e){this.__dataPendingClients=this.__dataPendingClients||[],e!==this&&this.__dataPendingClients.push(e)}_flushClients(){this.__dataClientsReady?this.__enableOrFlushClients():(this.__dataClientsReady=!0,this._readyClients(),this.__dataReady=!0)}__enableOrFlushClients(){let e=this.__dataPendingClients;if(e){this.__dataPendingClients=null;for(let t=0;t<e.length;t++){let i=e[t];i.__dataEnabled?i.__dataPending&&i._flushProperties():i._enableProperties()}}}_readyClients(){this.__enableOrFlushClients()}setProperties(e,t){for(let i in e)!t&&this[ai.READ_ONLY]&&this[ai.READ_ONLY][i]||this._setPendingPropertyOrPath(i,e[i],!0);this._invalidateProperties()}ready(){this._flushProperties(),this.__dataClientsReady||this._flushClients(),this.__dataPending&&this._flushProperties()}_propertiesChanged(e,t,i){let n,o=this.__dataHasPaths;this.__dataHasPaths=!1,wi(this,t,i,o),n=this.__dataToNotify,this.__dataToNotify=null,this._propagatePropertyChanges(t,i,o),this._flushClients(),hi(this,this[ai.REFLECT],t,i,o),hi(this,this[ai.OBSERVE],t,i,o),n&&_i(this,n,t,i,o),1==this.__dataCounter&&(this.__dataTemp={})}_propagatePropertyChanges(e,t,i){this[ai.PROPAGATE]&&hi(this,this[ai.PROPAGATE],e,t,i),this.__templateInfo&&this._runEffectsForTemplate(this.__templateInfo,e,t,i)}_runEffectsForTemplate(e,t,i,n){const o=(t,n)=>{hi(this,e.propertyEffects,t,i,n,e.nodeList);for(let o=e.firstChild;o;o=o.nextSibling)this._runEffectsForTemplate(o,t,i,n)};e.runEffects?e.runEffects(o,t,n):o(t,n)}linkPaths(e,t){e=bt(e),t=bt(t),this.__dataLinkedPaths=this.__dataLinkedPaths||{},this.__dataLinkedPaths[e]=t}unlinkPaths(e){e=bt(e),this.__dataLinkedPaths&&delete this.__dataLinkedPaths[e]}notifySplices(e,t){let i={path:""};Wi(this,wt(this,e,i),i.path,t)}get(e,t){return wt(t||this,e)}set(e,t,i){i?xt(i,e,t):this[ai.READ_ONLY]&&this[ai.READ_ONLY][e]||this._setPendingPropertyOrPath(e,t,!0)&&this._invalidateProperties()}push(e,...t){let i={path:""},n=wt(this,e,i),o=n.length,s=n.push(...t);return t.length&&Ji(this,n,i.path,o,t.length,[]),s}pop(e){let t={path:""},i=wt(this,e,t),n=Boolean(i.length),o=i.pop();return n&&Ji(this,i,t.path,i.length,0,[o]),o}splice(e,t,i,...n){let o,s={path:""},r=wt(this,e,s);return t<0?t=r.length-Math.floor(-t):t&&(t=Math.floor(t)),o=2===arguments.length?r.splice(t):r.splice(t,i,...n),(n.length||o.length)&&Ji(this,r,s.path,t,n.length,o),o}shift(e){let t={path:""},i=wt(this,e,t),n=Boolean(i.length),o=i.shift();return n&&Ji(this,i,t.path,0,0,[o]),o}unshift(e,...t){let i={path:""},n=wt(this,e,i),o=n.unshift(...t);return t.length&&Ji(this,n,i.path,0,t.length,[]),o}notifyPath(e,t){let i;if(1==arguments.length){let n={path:""};t=wt(this,e,n),i=n.path}else i=Array.isArray(e)?bt(e):e;this._setPendingPropertyOrPath(i,t,!0,!0)&&this._invalidateProperties()}_createReadOnlyProperty(e,t){this._addPropertyEffect(e,ai.READ_ONLY),t&&(this["_set"+Xi(e)]=function(t){this._setProperty(e,t)})}_createPropertyObserver(e,t,i){let n={property:e,method:t,dynamicFn:Boolean(i)};this._addPropertyEffect(e,ai.OBSERVE,{fn:fi,info:n,trigger:{name:e}}),i&&this._addPropertyEffect(t,ai.OBSERVE,{fn:fi,info:n,trigger:{name:t}})}_createMethodObserver(e,t){let i=$i(e);if(!i)throw new Error("Malformed observer expression '"+e+"'");Di(this,i,ai.OBSERVE,Li,null,t)}_createNotifyingProperty(e){this._addPropertyEffect(e,ai.NOTIFY,{fn:gi,info:{eventName:Et(e)+"-changed",property:e}})}_createReflectedProperty(e){let t=this.constructor.attributeNameForProperty(e);"-"===t[0]?console.warn("Property "+e+" cannot be reflected to attribute "+t+' because "-" is not a valid starting attribute name. Use a lowercase first letter for the property instead.'):this._addPropertyEffect(e,ai.REFLECT,{fn:vi,info:{attrName:t}})}_createComputedProperty(e,t,i){let n=$i(t);if(!n)throw new Error("Malformed computed expression '"+t+"'");const o=Di(this,n,ai.COMPUTE,ki,e,i);pi(this,li)[e]=o}_marshalArgs(e,t,i){const n=this.__data,o=[];for(let s=0,r=e.length;s<r;s++){let{name:r,structured:a,wildcard:l,value:c,literal:p}=e[s];if(!p)if(l){const e=mt(r,t),o=Yi(n,i,e?t:r);c={path:e?t:r,value:o,base:e?wt(n,r):o}}else c=a?Yi(n,i,r):n[r];if(De&&!this._overrideLegacyUndefined&&void 0===c&&e.length>1)return ri;o[s]=c}return o}static addPropertyEffect(e,t,i){this.prototype._addPropertyEffect(e,t,i)}static createPropertyObserver(e,t,i){this.prototype._createPropertyObserver(e,t,i)}static createMethodObserver(e,t){this.prototype._createMethodObserver(e,t)}static createNotifyingProperty(e){this.prototype._createNotifyingProperty(e)}static createReadOnlyProperty(e,t){this.prototype._createReadOnlyProperty(e,t)}static createReflectedProperty(e){this.prototype._createReflectedProperty(e)}static createComputedProperty(e,t,i){this.prototype._createComputedProperty(e,t,i)}static bindTemplate(e){return this.prototype._bindTemplate(e)}_bindTemplate(e,t){let i=this.constructor._parseTemplate(e),n=this.__preBoundTemplateInfo==i;if(!n)for(let e in i.propertyEffects)this._createPropertyAccessor(e);if(t)if(i=Object.create(i),i.wasPreBound=n,this.__templateInfo){const t=e._parentTemplateInfo||this.__templateInfo,n=t.lastChild;i.parent=t,t.lastChild=i,i.previousSibling=n,n?n.nextSibling=i:t.firstChild=i}else this.__templateInfo=i;else this.__preBoundTemplateInfo=i;return i}static _addTemplatePropertyEffect(e,t,i){(e.hostProps=e.hostProps||{})[t]=!0;let n=e.propertyEffects=e.propertyEffects||{};(n[t]=n[t]||[]).push(i)}_stampTemplate(e,t){t=t||this._bindTemplate(e,!0),Gi.push(this);let i=super._stampTemplate(e,t);if(Gi.pop(),t.nodeList=i.nodeList,!t.wasPreBound){let e=t.childNodes=[];for(let t=i.firstChild;t;t=t.nextSibling)e.push(t)}return i.templateInfo=t,Mi(this,t),this.__dataClientsReady&&(this._runEffectsForTemplate(t,this.__data,null,!1),this._flushClients()),i}_removeBoundDom(e){const t=e.templateInfo,{previousSibling:i,nextSibling:n,parent:o}=t;i?i.nextSibling=n:o&&(o.firstChild=n),n?n.previousSibling=i:o&&(o.lastChild=i),t.nextSibling=t.previousSibling=null;let s=t.childNodes;for(let e=0;e<s.length;e++){let t=s[e];dt(dt(t).parentNode).removeChild(t)}}static _parseTemplateNode(e,i,n){let o=t._parseTemplateNode.call(this,e,i,n);if(e.nodeType===Node.TEXT_NODE){let t=this._parseBindings(e.textContent,i);t&&(e.textContent=Vi(t)||" ",Pi(this,i,n,"text","textContent",t),o=!0)}return o}static _parseTemplateNodeAttribute(e,i,n,o,s){let r=this._parseBindings(s,i);if(r){let t=o,s="property";ci.test(o)?s="attribute":"$"==o[o.length-1]&&(o=o.slice(0,-1),s="attribute");let a=Vi(r);return a&&"attribute"==s&&("class"==o&&e.hasAttribute("class")&&(a+=" "+e.getAttribute(o)),e.setAttribute(o,a)),"attribute"==s&&"disable-upgrade$"==t&&e.setAttribute(o,""),"input"===e.localName&&"value"===t&&e.setAttribute(t,""),e.removeAttribute(t),"property"===s&&(o=kt(o)),Pi(this,i,n,s,o,r,a),!0}return t._parseTemplateNodeAttribute.call(this,e,i,n,o,s)}static _parseTemplateNestedTemplate(e,i,n){let o=t._parseTemplateNestedTemplate.call(this,e,i,n);const s=e.parentNode,r=n.templateInfo,a="dom-if"===s.localName,l="dom-repeat"===s.localName;Be&&(a||l)&&(s.removeChild(e),(n=n.parentInfo).templateInfo=r,n.noted=!0,o=!1);let c=r.hostProps;if(He&&a)c&&(i.hostProps=Object.assign(i.hostProps||{},c),Be||(n.parentInfo.noted=!0));else{let e="{";for(let t in c){Pi(this,i,n,"property","_host_"+t,[{mode:e,source:t,dependencies:[t],hostProp:!0}])}}return o}static _parseBindings(e,t){let i,n=[],o=0;for(;null!==(i=qi.exec(e));){i.index>o&&n.push({literal:e.slice(o,i.index)});let s=i[1][0],r=Boolean(i[2]),a=i[3].trim(),l=!1,c="",p=-1;"{"==s&&(p=a.indexOf("::"))>0&&(c=a.substring(p+2),a=a.substring(0,p),l=!0);let h=$i(a),d=[];if(h){let{args:e,methodName:i}=h;for(let t=0;t<e.length;t++){let i=e[t];i.literal||d.push(i)}let n=t.dynamicFns;(n&&n[i]||h.static)&&(d.push(i),h.dynamicFn=!0)}else d.push(a);n.push({source:a,mode:s,negate:r,customEvent:l,signature:h,dependencies:d,event:c}),o=qi.lastIndex}if(o&&o<e.length){let t=e.substring(o);t&&n.push({literal:t})}return n.length?n:null}static _evaluateBinding(e,t,i,n,o,s){let r;return r=t.signature?Li(e,i,n,o,t.signature):i!=t.source?wt(e,t.source):s&&ut(i)?wt(e,i):e.__data[i],t.negate&&(r=!r),r}}return i}),Gi=[];
|
|
198
198
|
/**
|
|
199
199
|
@license
|
|
200
200
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -204,7 +204,7 @@ The complete set of contributors may be found at http://polymer.github.io/CONTRI
|
|
|
204
204
|
Code distributed by Google as part of the polymer project is also
|
|
205
205
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
206
206
|
*/
|
|
207
|
-
function
|
|
207
|
+
function Qi(e){}
|
|
208
208
|
/**
|
|
209
209
|
@license
|
|
210
210
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -213,7 +213,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
213
213
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
214
214
|
Code distributed by Google as part of the polymer project is also
|
|
215
215
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
216
|
-
*/function
|
|
216
|
+
*/function en(e){const t={};for(let i in e){const n=e[i];t[i]="function"==typeof n?{type:n}:n}return t}const tn=Ue(e=>{const t=Ht(e);function i(e){const t=Object.getPrototypeOf(e);return t.prototype instanceof o?t:null}function n(e){if(!e.hasOwnProperty(JSCompiler_renameProperty("__ownProperties",e))){let t=null;if(e.hasOwnProperty(JSCompiler_renameProperty("properties",e))){const i=e.properties;i&&(t=en(i))}e.__ownProperties=t}return e.__ownProperties}class o extends t{static get observedAttributes(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__observedAttributes",this))){Qi(this.prototype);const e=this._properties;this.__observedAttributes=e?Object.keys(e).map(e=>this.prototype._addPropertyToAttributeMap(e)):[]}return this.__observedAttributes}static finalize(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__finalized",this))){const e=i(this);e&&e.finalize(),this.__finalized=!0,this._finalizeClass()}}static _finalizeClass(){const e=n(this);e&&this.createProperties(e)}static get _properties(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__properties",this))){const e=i(this);this.__properties=Object.assign({},e&&e._properties,n(this))}return this.__properties}static typeForProperty(e){const t=this._properties[e];return t&&t.type}_initializeProperties(){this.constructor.finalize(),super._initializeProperties()}connectedCallback(){super.connectedCallback&&super.connectedCallback(),this._enableProperties()}disconnectedCallback(){super.disconnectedCallback&&super.disconnectedCallback()}}return o}),nn="3.5.1",on=window.ShadyCSS&&window.ShadyCSS.cssBuild,sn=Ue(e=>{const t=tn(Zi(e));function i(e){if(!e.hasOwnProperty(JSCompiler_renameProperty("__propertyDefaults",e))){e.__propertyDefaults=null;let t=e._properties;for(let i in t){let n=t[i];"value"in n&&(e.__propertyDefaults=e.__propertyDefaults||{},e.__propertyDefaults[i]=n)}}return e.__propertyDefaults}function n(e){return e.hasOwnProperty(JSCompiler_renameProperty("__ownObservers",e))||(e.__ownObservers=e.hasOwnProperty(JSCompiler_renameProperty("observers",e))?e.observers:null),e.__ownObservers}function o(e,t,i,n){i.computed&&(i.readOnly=!0),i.computed&&(e._hasReadOnlyEffect(t)?console.warn(`Cannot redefine computed property '${t}'.`):e._createComputedProperty(t,i.computed,n)),i.readOnly&&!e._hasReadOnlyEffect(t)?e._createReadOnlyProperty(t,!i.computed):!1===i.readOnly&&e._hasReadOnlyEffect(t)&&console.warn(`Cannot make readOnly property '${t}' non-readOnly.`),i.reflectToAttribute&&!e._hasReflectEffect(t)?e._createReflectedProperty(t):!1===i.reflectToAttribute&&e._hasReflectEffect(t)&&console.warn(`Cannot make reflected property '${t}' non-reflected.`),i.notify&&!e._hasNotifyEffect(t)?e._createNotifyingProperty(t):!1===i.notify&&e._hasNotifyEffect(t)&&console.warn(`Cannot make notify property '${t}' non-notify.`),i.observer&&e._createPropertyObserver(t,i.observer,n[i.observer]),e._addPropertyToAttributeMap(t)}function s(e,t,i,n){if(!on){const o=t.content.querySelectorAll("style"),s=st(t),r=rt(i),a=t.content.firstElementChild;for(let i=0;i<r.length;i++){let o=r[i];o.textContent=e._processStyleText(o.textContent,n),t.content.insertBefore(o,a)}let l=0;for(let t=0;t<s.length;t++){let i=s[t],r=o[l];r!==i?(i=i.cloneNode(!0),r.parentNode.insertBefore(i,r)):l++,i.textContent=e._processStyleText(i.textContent,n)}}if(window.ShadyCSS&&window.ShadyCSS.prepareTemplate(t,i),Ve&&on&&Pe){const i=t.content.querySelectorAll("style");if(i){let t="";Array.from(i).forEach(e=>{t+=e.textContent,e.parentNode.removeChild(e)}),e._styleSheet=new CSSStyleSheet,e._styleSheet.replaceSync(t)}}}function r(e){let t=null;if(e&&(!Ne||Re)&&(t=Ze.import(e,"template"),Ne&&!t))throw new Error("strictTemplatePolicy: expecting dom-module or null template for "+e);return t}class a extends t{static get polymerElementVersion(){return nn}static _finalizeClass(){t._finalizeClass.call(this);const e=n(this);e&&this.createObservers(e,this._properties),this._prepareTemplate()}static _prepareTemplate(){let e=this.template;e&&("string"==typeof e?(console.error("template getter must return HTMLTemplateElement"),e=null):Me||(e=e.cloneNode(!0))),this.prototype._template=e}static createProperties(e){for(let t in e)o(this.prototype,t,e[t],e)}static createObservers(e,t){const i=this.prototype;for(let n=0;n<e.length;n++)i._createMethodObserver(e[n],t)}static get template(){if(!this.hasOwnProperty(JSCompiler_renameProperty("_template",this))){let e=this.prototype.hasOwnProperty(JSCompiler_renameProperty("_template",this.prototype))?this.prototype._template:void 0;"function"==typeof e&&(e=e()),this._template=void 0!==e?e:this.hasOwnProperty(JSCompiler_renameProperty("is",this))&&r(this.is)||Object.getPrototypeOf(this.prototype).constructor.template}return this._template}static set template(e){this._template=e}static get importPath(){if(!this.hasOwnProperty(JSCompiler_renameProperty("_importPath",this))){const e=this.importMeta;if(e)this._importPath=ke(e.url);else{const e=Ze.import(this.is);this._importPath=e&&e.assetpath||Object.getPrototypeOf(this.prototype).constructor.importPath}}return this._importPath}constructor(){super(),this._template,this._importPath,this.rootPath,this.importPath,this.root,this.$}_initializeProperties(){this.constructor.finalize(),this.constructor._finalizeTemplate(this.localName),super._initializeProperties(),this.rootPath=Oe,this.importPath=this.constructor.importPath;let e=i(this.constructor);if(e)for(let t in e){let i=e[t];if(this._canApplyPropertyDefault(t)){let e="function"==typeof i.value?i.value.call(this):i.value;this._hasAccessor(t)?this._setPendingProperty(t,e,!0):this[t]=e}}}_canApplyPropertyDefault(e){return!this.hasOwnProperty(e)}static _processStyleText(e,t){return Ae(e,t)}static _finalizeTemplate(e){const t=this.prototype._template;if(t&&!t.__polymerFinalized){t.__polymerFinalized=!0;const i=this.importPath;s(this,t,e,i?Se(i):""),this.prototype._bindTemplate(t)}}connectedCallback(){window.ShadyCSS&&this._template&&window.ShadyCSS.styleElement(this),super.connectedCallback()}ready(){this._template&&(this.root=this._stampTemplate(this._template),this.$=this.root.$),super.ready()}_readyClients(){this._template&&(this.root=this._attachDom(this.root)),super._readyClients()}_attachDom(e){const t=dt(this);if(t.attachShadow)return e?(t.shadowRoot||(t.attachShadow({mode:"open",shadyUpgradeFragment:e}),t.shadowRoot.appendChild(e),this.constructor._styleSheet&&(t.shadowRoot.adoptedStyleSheets=[this.constructor._styleSheet])),Fe&&window.ShadyDOM&&window.ShadyDOM.flushInitial(t.shadowRoot),t.shadowRoot):null;throw new Error("ShadowDOM not available. PolymerElement can create dom as children instead of in ShadowDOM by setting `this.root = this;` before `ready`.")}updateStyles(e){window.ShadyCSS&&window.ShadyCSS.styleSubtree(this,e)}resolveUrl(e,t){return!t&&this.importPath&&(t=Se(this.importPath)),Se(e,t)}static _parseTemplateContent(e,i,n){return i.dynamicFns=i.dynamicFns||this._properties,t._parseTemplateContent.call(this,e,i,n)}static _addTemplatePropertyEffect(e,i,n){return!ze||i in this._properties||n.info.part.signature&&n.info.part.signature.static||n.info.part.hostProp||e.nestedTemplate||console.warn(`Property '${i}' used in template but not declared in 'properties'; attribute will not be observed.`),t._addTemplatePropertyEffect.call(this,e,i,n)}}return a});
|
|
217
217
|
/**
|
|
218
218
|
* @fileoverview
|
|
219
219
|
* @suppress {checkPrototypalTypes}
|
|
@@ -234,7 +234,7 @@ The complete set of contributors may be found at http://polymer.github.io/CONTRI
|
|
|
234
234
|
Code distributed by Google as part of the polymer project is also
|
|
235
235
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
236
236
|
*/
|
|
237
|
-
class
|
|
237
|
+
class rn{constructor(){this._asyncModule=null,this._callback=null,this._timer=null}setConfig(e,t){this._asyncModule=e,this._callback=t,this._timer=this._asyncModule.run(()=>{this._timer=null,an.delete(this),this._callback()})}cancel(){this.isActive()&&(this._cancelAsync(),an.delete(this))}_cancelAsync(){this.isActive()&&(this._asyncModule.cancel(this._timer),this._timer=null)}flush(){this.isActive()&&(this.cancel(),this._callback())}isActive(){return null!=this._timer}static debounce(e,t,i){return e instanceof rn?e._cancelAsync():e=new rn,e.setConfig(t,i),e}}let an=new Set;const ln=function(e){an.add(e)},cn=function(){const e=Boolean(an.size);return an.forEach(e=>{try{e.flush()}catch(e){setTimeout(()=>{throw e})}}),e};
|
|
238
238
|
/**
|
|
239
239
|
@license
|
|
240
240
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -244,7 +244,7 @@ The complete set of contributors may be found at http://polymer.github.io/CONTRI
|
|
|
244
244
|
Code distributed by Google as part of the polymer project is also
|
|
245
245
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
246
246
|
*/
|
|
247
|
-
let
|
|
247
|
+
let pn="string"==typeof document.head.style.touchAction,hn="__polymerGestures",dn="__polymerGesturesHandled",un="__polymerGesturesTouchAction",fn=25,_n=5,mn=2,yn=2500,gn=["mousedown","mousemove","mouseup","click"],bn=[0,1,4,2],vn=function(){try{return 1===new MouseEvent("test",{buttons:1}).buttons}catch(e){return!1}}();function wn(e){return gn.indexOf(e)>-1}let xn=!1;function Cn(e){if(!wn(e)&&"touchend"!==e)return pn&&xn&&Ie?{passive:!0}:void 0}!function(){try{let e=Object.defineProperty({},"passive",{get(){xn=!0}});window.addEventListener("test",null,e),window.removeEventListener("test",null,e)}catch(e){}}();let Sn=navigator.userAgent.match(/iP(?:[oa]d|hone)|Android/);const An=[],kn={button:!0,input:!0,keygen:!0,meter:!0,output:!0,textarea:!0,progress:!0,select:!0},En={button:!0,command:!0,fieldset:!0,input:!0,keygen:!0,optgroup:!0,option:!0,select:!0,textarea:!0};function Pn(e){return kn[e.localName]||!1}function On(e){let t=Array.prototype.slice.call(e.labels||[]);if(!t.length){t=[];try{let i=e.getRootNode();if(e.id){let n=i.querySelectorAll(`label[for = '${e.id}']`);for(let e=0;e<n.length;e++)t.push(n[e])}}catch(e){}}return t}let Tn=function(e){let t=e.sourceCapabilities;if((!t||t.firesTouchEvents)&&(e[dn]={skip:!0},"click"===e.type)){let t=!1,i=Bn(e);for(let e=0;e<i.length;e++){if(i[e].nodeType===Node.ELEMENT_NODE)if("label"===i[e].localName)An.push(i[e]);else if(Pn(i[e])){let n=On(i[e]);for(let e=0;e<n.length;e++)t=t||An.indexOf(n[e])>-1}if(i[e]===zn.mouse.target)return}if(t)return;e.preventDefault(),e.stopPropagation()}};function In(e){let t=Sn?["click"]:gn;for(let i,n=0;n<t.length;n++)i=t[n],e?(An.length=0,document.addEventListener(i,Tn,!0)):document.removeEventListener(i,Tn,!0)}function Nn(e){zn.mouse.mouseIgnoreJob||In(!0);let t=function(){In(),zn.mouse.target=null,zn.mouse.mouseIgnoreJob=null};zn.mouse.target=Bn(e)[0],zn.mouse.mouseIgnoreJob=rn.debounce(zn.mouse.mouseIgnoreJob,zt.after(yn),t)}function Rn(e){let t=e.type;if(!wn(t))return!1;if("mousemove"===t){let t=void 0===e.buttons?1:e.buttons;return e instanceof window.MouseEvent&&!vn&&(t=bn[e.which]||0),Boolean(1&t)}return 0===(void 0===e.button?0:e.button)}function Mn(e){if("click"===e.type){if(0===e.detail)return!0;let t=Vn(e);if(!t.nodeType||t.nodeType!==Node.ELEMENT_NODE)return!0;let i=t.getBoundingClientRect(),n=e.pageX,o=e.pageY;return!(n>=i.left&&n<=i.right&&o>=i.top&&o<=i.bottom)}return!1}let zn={mouse:{target:null,mouseIgnoreJob:null},touch:{x:0,y:0,id:-1,scrollDecided:!1}};function Fn(e){let t="auto",i=Bn(e);for(let e,n=0;n<i.length;n++)if(e=i[n],e[un]){t=e[un];break}return t}function Dn(e,t,i){e.movefn=t,e.upfn=i,document.addEventListener("mousemove",t),document.addEventListener("mouseup",i)}function Ln(e){document.removeEventListener("mousemove",e.movefn),document.removeEventListener("mouseup",e.upfn),e.movefn=null,e.upfn=null}document.addEventListener("touchend",Nn,!!xn&&{passive:!0});const Bn=window.ShadyDOM&&window.ShadyDOM.noPatch?window.ShadyDOM.composedPath:e=>e.composedPath&&e.composedPath()||[],Hn={},jn=[];function qn(e,t){let i=document.elementFromPoint(e,t),n=i;for(;n&&n.shadowRoot&&!window.ShadyDOM;){let o=n;if(n=n.shadowRoot.elementFromPoint(e,t),o===n)break;n&&(i=n)}return i}function Vn(e){const t=Bn(e);return t.length>0?t[0]:e.target}function $n(e){let t,i=e.type,n=e.currentTarget[hn];if(!n)return;let o=n[i];if(o){if(!e[dn]&&(e[dn]={},"touch"===i.slice(0,5))){let t=(e=e).changedTouches[0];if("touchstart"===i&&1===e.touches.length&&(zn.touch.id=t.identifier),zn.touch.id!==t.identifier)return;pn||"touchstart"!==i&&"touchmove"!==i||Un(e)}if(t=e[dn],!t.skip){for(let i,n=0;n<jn.length;n++)i=jn[n],o[i.name]&&!t[i.name]&&i.flow&&i.flow.start.indexOf(e.type)>-1&&i.reset&&i.reset();for(let n,s=0;s<jn.length;s++)n=jn[s],o[n.name]&&!t[n.name]&&(t[n.name]=!0,n[i](e))}}}function Un(e){let t=e.changedTouches[0],i=e.type;if("touchstart"===i)zn.touch.x=t.clientX,zn.touch.y=t.clientY,zn.touch.scrollDecided=!1;else if("touchmove"===i){if(zn.touch.scrollDecided)return;zn.touch.scrollDecided=!0;let i=Fn(e),n=!1,o=Math.abs(zn.touch.x-t.clientX),s=Math.abs(zn.touch.y-t.clientY);e.cancelable&&("none"===i?n=!0:"pan-x"===i?n=s>o:"pan-y"===i&&(n=o>s)),n?e.preventDefault():eo("track")}}function Kn(e,t,i){return!!Hn[t]&&(Wn(e,t,i),!0)}function Yn(e,t,i){return!!Hn[t]&&(Jn(e,t,i),!0)}function Wn(e,t,i){let n=Hn[t],o=n.deps,s=n.name,r=e[hn];r||(e[hn]=r={});for(let t,i,n=0;n<o.length;n++)t=o[n],Sn&&wn(t)&&"click"!==t||(i=r[t],i||(r[t]=i={_count:0}),0===i._count&&e.addEventListener(t,$n,Cn(t)),i[s]=(i[s]||0)+1,i._count=(i._count||0)+1);e.addEventListener(t,i),n.touchAction&&Gn(e,n.touchAction)}function Jn(e,t,i){let n=Hn[t],o=n.deps,s=n.name,r=e[hn];if(r)for(let t,i,n=0;n<o.length;n++)t=o[n],i=r[t],i&&i[s]&&(i[s]=(i[s]||1)-1,i._count=(i._count||1)-1,0===i._count&&e.removeEventListener(t,$n,Cn(t)));e.removeEventListener(t,i)}function Xn(e){jn.push(e);for(let t=0;t<e.emits.length;t++)Hn[e.emits[t]]=e}function Zn(e){for(let t,i=0;i<jn.length;i++){t=jn[i];for(let i,n=0;n<t.emits.length;n++)if(i=t.emits[n],i===e)return t}return null}function Gn(e,t){pn&&e instanceof HTMLElement&&Lt.run(()=>{e.style.touchAction=t}),e[un]=t}function Qn(e,t,i){let n=new Event(t,{bubbles:!0,cancelable:!0,composed:!0});if(n.detail=i,dt(e).dispatchEvent(n),n.defaultPrevented){let e=i.preventer||i.sourceEvent;e&&e.preventDefault&&e.preventDefault()}}function eo(e){let t=Zn(e);t.info&&(t.info.prevent=!0)}function to(){zn.mouse.mouseIgnoreJob&&zn.mouse.mouseIgnoreJob.flush()}function io(e,t,i,n){t&&Qn(t,e,{x:i.clientX,y:i.clientY,sourceEvent:i,preventer:n,prevent:function(e){return eo(e)}})}function no(e,t,i){if(e.prevent)return!1;if(e.started)return!0;let n=Math.abs(e.x-t),o=Math.abs(e.y-i);return n>=_n||o>=_n}function oo(e,t,i){if(!t)return;let n,o=e.moves[e.moves.length-2],s=e.moves[e.moves.length-1],r=s.x-e.x,a=s.y-e.y,l=0;o&&(n=s.x-o.x,l=s.y-o.y),Qn(t,"track",{state:e.state,x:i.clientX,y:i.clientY,dx:r,dy:a,ddx:n,ddy:l,sourceEvent:i,hover:function(){return qn(i.clientX,i.clientY)}})}function so(e,t,i){let n=Math.abs(t.clientX-e.x),o=Math.abs(t.clientY-e.y),s=Vn(i||t);!s||En[s.localName]&&s.hasAttribute("disabled")||(isNaN(n)||isNaN(o)||n<=fn&&o<=fn||Mn(t))&&(e.prevent||Qn(s,"tap",{x:t.clientX,y:t.clientY,sourceEvent:t,preventer:i}))}Xn({name:"downup",deps:["mousedown","touchstart","touchend"],flow:{start:["mousedown","touchstart"],end:["mouseup","touchend"]},emits:["down","up"],info:{movefn:null,upfn:null},reset:function(){Ln(this.info)},mousedown:function(e){if(!Rn(e))return;let t=Vn(e),i=this,n=function(e){Rn(e)||(io("up",t,e),Ln(i.info))},o=function(e){Rn(e)&&io("up",t,e),Ln(i.info)};Dn(this.info,n,o),io("down",t,e)},touchstart:function(e){io("down",Vn(e),e.changedTouches[0],e)},touchend:function(e){io("up",Vn(e),e.changedTouches[0],e)}}),Xn({name:"track",touchAction:"none",deps:["mousedown","touchstart","touchmove","touchend"],flow:{start:["mousedown","touchstart"],end:["mouseup","touchend"]},emits:["track"],info:{x:0,y:0,state:"start",started:!1,moves:[],addMove:function(e){this.moves.length>mn&&this.moves.shift(),this.moves.push(e)},movefn:null,upfn:null,prevent:!1},reset:function(){this.info.state="start",this.info.started=!1,this.info.moves=[],this.info.x=0,this.info.y=0,this.info.prevent=!1,Ln(this.info)},mousedown:function(e){if(!Rn(e))return;let t=Vn(e),i=this,n=function(e){let n=e.clientX,o=e.clientY;no(i.info,n,o)&&(i.info.state=i.info.started?"mouseup"===e.type?"end":"track":"start","start"===i.info.state&&eo("tap"),i.info.addMove({x:n,y:o}),Rn(e)||(i.info.state="end",Ln(i.info)),t&&oo(i.info,t,e),i.info.started=!0)},o=function(e){i.info.started&&n(e),Ln(i.info)};Dn(this.info,n,o),this.info.x=e.clientX,this.info.y=e.clientY},touchstart:function(e){let t=e.changedTouches[0];this.info.x=t.clientX,this.info.y=t.clientY},touchmove:function(e){let t=Vn(e),i=e.changedTouches[0],n=i.clientX,o=i.clientY;no(this.info,n,o)&&("start"===this.info.state&&eo("tap"),this.info.addMove({x:n,y:o}),oo(this.info,t,i),this.info.state="track",this.info.started=!0)},touchend:function(e){let t=Vn(e),i=e.changedTouches[0];this.info.started&&(this.info.state="end",this.info.addMove({x:i.clientX,y:i.clientY}),oo(this.info,t,i))}}),Xn({name:"tap",deps:["mousedown","click","touchstart","touchend"],flow:{start:["mousedown","touchstart"],end:["click","touchend"]},emits:["tap"],info:{x:NaN,y:NaN,prevent:!1},reset:function(){this.info.x=NaN,this.info.y=NaN,this.info.prevent=!1},mousedown:function(e){Rn(e)&&(this.info.x=e.clientX,this.info.y=e.clientY)},click:function(e){Rn(e)&&so(this.info,e)},touchstart:function(e){const t=e.changedTouches[0];this.info.x=t.clientX,this.info.y=t.clientY},touchend:function(e){so(this.info,e.changedTouches[0],e)}});const ro=Vn,ao=Ue(e=>{class t extends e{_addEventListenerToNode(e,t,i){Kn(e,t,i)||super._addEventListenerToNode(e,t,i)}_removeEventListenerFromNode(e,t,i){Yn(e,t,i)||super._removeEventListenerFromNode(e,t,i)}}return t}),lo=/:host\(:dir\((ltr|rtl)\)\)/g,co=':host([dir="$1"])',po=/([\s\w-#\.\[\]\*]*):dir\((ltr|rtl)\)/g,ho=':host([dir="$2"]) $1',uo=/:dir\((?:ltr|rtl)\)/,fo=Boolean(window.ShadyDOM&&window.ShadyDOM.inUse),_o=[];
|
|
248
248
|
/**
|
|
249
249
|
@license
|
|
250
250
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -253,7 +253,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
253
253
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
254
254
|
Code distributed by Google as part of the polymer project is also
|
|
255
255
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
256
|
-
*/let
|
|
256
|
+
*/let mo=null,yo="";function go(){yo=document.documentElement.getAttribute("dir")}function bo(e){if(!e.__autoDirOptOut){e.setAttribute("dir",yo)}}function vo(){go(),yo=document.documentElement.getAttribute("dir");for(let e=0;e<_o.length;e++)bo(_o[e])}function wo(){mo&&mo.takeRecords().length&&vo()}const xo=Ue(e=>{fo||mo||(go(),mo=new MutationObserver(vo),mo.observe(document.documentElement,{attributes:!0,attributeFilter:["dir"]}));const t=Ut(e);class i extends t{static _processStyleText(e,i){return e=t._processStyleText.call(this,e,i),!fo&&uo.test(e)&&(e=this._replaceDirInCssText(e),this.__activateDir=!0),e}static _replaceDirInCssText(e){let t=e;return t=t.replace(lo,co),t=t.replace(po,ho),t}constructor(){super(),this.__autoDirOptOut=!1}ready(){super.ready(),this.__autoDirOptOut=this.hasAttribute("dir")}connectedCallback(){t.prototype.connectedCallback&&super.connectedCallback(),this.constructor.__activateDir&&(wo(),_o.push(this),bo(this))}disconnectedCallback(){if(t.prototype.disconnectedCallback&&super.disconnectedCallback(),this.constructor.__activateDir){const e=_o.indexOf(this);e>-1&&_o.splice(e,1)}}}return i.__activateDir=!1,i});
|
|
257
257
|
/**
|
|
258
258
|
@license
|
|
259
259
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -262,7 +262,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
262
262
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
263
263
|
Code distributed by Google as part of the polymer project is also
|
|
264
264
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
265
|
-
*/let
|
|
265
|
+
*/let Co=!1,So=[],Ao=[];function ko(){Co=!0,requestAnimationFrame((function(){Co=!1,Eo(So),setTimeout((function(){Po(Ao)}))}))}function Eo(e){for(;e.length;)Oo(e.shift())}function Po(e){for(let t=0,i=e.length;t<i;t++)Oo(e.shift())}function Oo(e){const t=e[0],i=e[1],n=e[2];try{i.apply(t,n)}catch(e){setTimeout(()=>{throw e})}}function To(e,t,i){Co||ko(),Ao.push([e,t,i])}
|
|
266
266
|
/**
|
|
267
267
|
@license
|
|
268
268
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -271,7 +271,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
271
271
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
272
272
|
Code distributed by Google as part of the polymer project is also
|
|
273
273
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
274
|
-
*/function
|
|
274
|
+
*/function Io(){document.body.removeAttribute("unresolved")}
|
|
275
275
|
/**
|
|
276
276
|
@license
|
|
277
277
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -281,7 +281,7 @@ The complete set of contributors may be found at http://polymer.github.io/CONTRI
|
|
|
281
281
|
Code distributed by Google as part of the polymer project is also
|
|
282
282
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
283
283
|
*/
|
|
284
|
-
function
|
|
284
|
+
function No(e,t,i){return{index:e,removed:t,addedCount:i}}"interactive"===document.readyState||"complete"===document.readyState?Io():window.addEventListener("DOMContentLoaded",Io);const Ro=0,Mo=1,zo=2,Fo=3;function Do(e,t,i,n,o,s){let r=s-o+1,a=i-t+1,l=new Array(r);for(let e=0;e<r;e++)l[e]=new Array(a),l[e][0]=e;for(let e=0;e<a;e++)l[0][e]=e;for(let i=1;i<r;i++)for(let s=1;s<a;s++)if(Vo(e[t+s-1],n[o+i-1]))l[i][s]=l[i-1][s-1];else{let e=l[i-1][s]+1,t=l[i][s-1]+1;l[i][s]=e<t?e:t}return l}function Lo(e){let t=e.length-1,i=e[0].length-1,n=e[t][i],o=[];for(;t>0||i>0;){if(0==t){o.push(zo),i--;continue}if(0==i){o.push(Fo),t--;continue}let s,r=e[t-1][i-1],a=e[t-1][i],l=e[t][i-1];s=a<l?a<r?a:r:l<r?l:r,s==r?(r==n?o.push(Ro):(o.push(Mo),n=r),t--,i--):s==a?(o.push(Fo),t--,n=a):(o.push(zo),i--,n=l)}return o.reverse(),o}function Bo(e,t,i,n,o,s){let r,a=0,l=0,c=Math.min(i-t,s-o);if(0==t&&0==o&&(a=Ho(e,n,c)),i==e.length&&s==n.length&&(l=jo(e,n,c-a)),o+=a,s-=l,(i-=l)-(t+=a)==0&&s-o==0)return[];if(t==i){for(r=No(t,[],0);o<s;)r.removed.push(n[o++]);return[r]}if(o==s)return[No(t,[],i-t)];let p=Lo(Do(e,t,i,n,o,s));r=void 0;let h=[],d=t,u=o;for(let e=0;e<p.length;e++)switch(p[e]){case Ro:r&&(h.push(r),r=void 0),d++,u++;break;case Mo:r||(r=No(d,[],0)),r.addedCount++,d++,r.removed.push(n[u]),u++;break;case zo:r||(r=No(d,[],0)),r.addedCount++,d++;break;case Fo:r||(r=No(d,[],0)),r.removed.push(n[u]),u++}return r&&h.push(r),h}function Ho(e,t,i){for(let n=0;n<i;n++)if(!Vo(e[n],t[n]))return n;return i}function jo(e,t,i){let n=e.length,o=t.length,s=0;for(;s<i&&Vo(e[--n],t[--o]);)s++;return s}function qo(e,t){return Bo(e,0,e.length,t,0,t.length)}function Vo(e,t){return e===t}
|
|
285
285
|
/**
|
|
286
286
|
@license
|
|
287
287
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -290,7 +290,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
290
290
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
291
291
|
Code distributed by Google as part of the polymer project is also
|
|
292
292
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
293
|
-
*/function
|
|
293
|
+
*/function $o(e){return"slot"===e.localName}let Uo=class{static getFlattenedNodes(e){const t=dt(e);return $o(e)?(e=e,t.assignedNodes({flatten:!0})):Array.from(t.childNodes).map(e=>$o(e)?dt(e=e).assignedNodes({flatten:!0}):[e]).reduce((e,t)=>e.concat(t),[])}constructor(e,t){this._shadyChildrenObserver=null,this._nativeChildrenObserver=null,this._connected=!1,this._target=e,this.callback=t,this._effectiveNodes=[],this._observer=null,this._scheduled=!1,this._boundSchedule=()=>{this._schedule()},this.connect(),this._schedule()}connect(){$o(this._target)?this._listenSlots([this._target]):dt(this._target).children&&(this._listenSlots(dt(this._target).children),window.ShadyDOM?this._shadyChildrenObserver=window.ShadyDOM.observeChildren(this._target,e=>{this._processMutations(e)}):(this._nativeChildrenObserver=new MutationObserver(e=>{this._processMutations(e)}),this._nativeChildrenObserver.observe(this._target,{childList:!0}))),this._connected=!0}disconnect(){$o(this._target)?this._unlistenSlots([this._target]):dt(this._target).children&&(this._unlistenSlots(dt(this._target).children),window.ShadyDOM&&this._shadyChildrenObserver?(window.ShadyDOM.unobserveChildren(this._shadyChildrenObserver),this._shadyChildrenObserver=null):this._nativeChildrenObserver&&(this._nativeChildrenObserver.disconnect(),this._nativeChildrenObserver=null)),this._connected=!1}_schedule(){this._scheduled||(this._scheduled=!0,Lt.run(()=>this.flush()))}_processMutations(e){this._processSlotMutations(e),this.flush()}_processSlotMutations(e){if(e)for(let t=0;t<e.length;t++){let i=e[t];i.addedNodes&&this._listenSlots(i.addedNodes),i.removedNodes&&this._unlistenSlots(i.removedNodes)}}flush(){if(!this._connected)return!1;window.ShadyDOM&&ShadyDOM.flush(),this._nativeChildrenObserver?this._processSlotMutations(this._nativeChildrenObserver.takeRecords()):this._shadyChildrenObserver&&this._processSlotMutations(this._shadyChildrenObserver.takeRecords()),this._scheduled=!1;let e={target:this._target,addedNodes:[],removedNodes:[]},t=this.constructor.getFlattenedNodes(this._target),i=qo(t,this._effectiveNodes);for(let t,n=0;n<i.length&&(t=i[n]);n++)for(let i,n=0;n<t.removed.length&&(i=t.removed[n]);n++)e.removedNodes.push(i);for(let n,o=0;o<i.length&&(n=i[o]);o++)for(let i=n.index;i<n.index+n.addedCount;i++)e.addedNodes.push(t[i]);this._effectiveNodes=t;let n=!1;return(e.addedNodes.length||e.removedNodes.length)&&(n=!0,this.callback.call(this._target,e)),n}_listenSlots(e){for(let t=0;t<e.length;t++){let i=e[t];$o(i)&&i.addEventListener("slotchange",this._boundSchedule)}}_unlistenSlots(e){for(let t=0;t<e.length;t++){let i=e[t];$o(i)&&i.removeEventListener("slotchange",this._boundSchedule)}}};
|
|
294
294
|
/**
|
|
295
295
|
@license
|
|
296
296
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -299,7 +299,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
299
299
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
300
300
|
Code distributed by Google as part of the polymer project is also
|
|
301
301
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
302
|
-
*/const
|
|
302
|
+
*/const Ko=function(){let e,t;do{e=window.ShadyDOM&&ShadyDOM.flush(),window.ShadyCSS&&window.ShadyCSS.ScopingShim&&window.ShadyCSS.ScopingShim.flush(),t=cn()}while(e||t)},Yo=Element.prototype,Wo=Yo.matches||Yo.matchesSelector||Yo.mozMatchesSelector||Yo.msMatchesSelector||Yo.oMatchesSelector||Yo.webkitMatchesSelector,Jo=function(e,t){return Wo.call(e,t)};
|
|
303
303
|
/**
|
|
304
304
|
@license
|
|
305
305
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -308,7 +308,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
308
308
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
309
309
|
Code distributed by Google as part of the polymer project is also
|
|
310
310
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
311
|
-
*/class
|
|
311
|
+
*/class Xo{constructor(e){window.ShadyDOM&&window.ShadyDOM.inUse&&window.ShadyDOM.patch(e),this.node=e}observeNodes(e){return new Uo(this.node,e)}unobserveNodes(e){e.disconnect()}notifyObserver(){}deepContains(e){if(dt(this.node).contains(e))return!0;let t=e,i=e.ownerDocument;for(;t&&t!==i&&t!==this.node;)t=dt(t).parentNode||dt(t).host;return t===this.node}getOwnerRoot(){return dt(this.node).getRootNode()}getDistributedNodes(){return"slot"===this.node.localName?dt(this.node).assignedNodes({flatten:!0}):[]}getDestinationInsertionPoints(){let e=[],t=dt(this.node).assignedSlot;for(;t;)e.push(t),t=dt(t).assignedSlot;return e}importNode(e,t){let i=this.node instanceof Document?this.node:this.node.ownerDocument;return dt(i).importNode(e,t)}getEffectiveChildNodes(){return Uo.getFlattenedNodes(this.node)}queryDistributedElements(e){let t=this.getEffectiveChildNodes(),i=[];for(let n,o=0,s=t.length;o<s&&(n=t[o]);o++)n.nodeType===Node.ELEMENT_NODE&&Jo(n,e)&&i.push(n);return i}get activeElement(){let e=this.node;return void 0!==e._activeElement?e._activeElement:e.activeElement}}function Zo(e,t){for(let i=0;i<t.length;i++){let n=t[i];e[n]=function(){return this.node[n].apply(this.node,arguments)}}}function Go(e,t){for(let i=0;i<t.length;i++){let n=t[i];Object.defineProperty(e,n,{get:function(){return this.node[n]},configurable:!0})}}function Qo(e,t){for(let i=0;i<t.length;i++){let n=t[i];Object.defineProperty(e,n,{get:function(){return this.node[n]},set:function(e){this.node[n]=e},configurable:!0})}}class es{constructor(e){this.event=e}get rootTarget(){return this.path[0]}get localTarget(){return this.event.target}get path(){return this.event.composedPath()}}Xo.prototype.cloneNode,Xo.prototype.appendChild,Xo.prototype.insertBefore,Xo.prototype.removeChild,Xo.prototype.replaceChild,Xo.prototype.setAttribute,Xo.prototype.removeAttribute,Xo.prototype.querySelector,Xo.prototype.querySelectorAll,Xo.prototype.parentNode,Xo.prototype.firstChild,Xo.prototype.lastChild,Xo.prototype.nextSibling,Xo.prototype.previousSibling,Xo.prototype.firstElementChild,Xo.prototype.lastElementChild,Xo.prototype.nextElementSibling,Xo.prototype.previousElementSibling,Xo.prototype.childNodes,Xo.prototype.children,Xo.prototype.classList,Xo.prototype.textContent,Xo.prototype.innerHTML;let ts=Xo;if(window.ShadyDOM&&window.ShadyDOM.inUse&&window.ShadyDOM.noPatch&&window.ShadyDOM.Wrapper){class e extends window.ShadyDOM.Wrapper{}Object.getOwnPropertyNames(Xo.prototype).forEach(t=>{"activeElement"!=t&&(e.prototype[t]=Xo.prototype[t])}),Go(e.prototype,["classList"]),ts=e,Object.defineProperties(es.prototype,{localTarget:{get(){const e=this.event.currentTarget,t=e&&is(e).getOwnerRoot(),i=this.path;for(let e=0;e<i.length;e++){const n=i[e];if(is(n).getOwnerRoot()===t)return n}},configurable:!0},path:{get(){return window.ShadyDOM.composedPath(this.event)},configurable:!0}})}else Zo(Xo.prototype,["cloneNode","appendChild","insertBefore","removeChild","replaceChild","setAttribute","removeAttribute","querySelector","querySelectorAll","attachShadow"]),Go(Xo.prototype,["parentNode","firstChild","lastChild","nextSibling","previousSibling","firstElementChild","lastElementChild","nextElementSibling","previousElementSibling","childNodes","children","classList","shadowRoot"]),Qo(Xo.prototype,["textContent","innerHTML","className"]);const is=function(e){if((e=e||document)instanceof ts)return e;if(e instanceof es)return e;let t=e.__domApi;return t||(t=e instanceof Event?new es(e):new ts(e),e.__domApi=t),t},ns=window.ShadyDOM,os=window.ShadyCSS;
|
|
312
312
|
/**
|
|
313
313
|
@license
|
|
314
314
|
Copyright (c) 2019 The Polymer Project Authors. All rights reserved.
|
|
@@ -317,7 +317,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
317
317
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
318
318
|
Code distributed by Google as part of the polymer project is also
|
|
319
319
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
320
|
-
*/function
|
|
320
|
+
*/function ss(e,t){return dt(e).getRootNode()===t}function rs(e,t=!1){if(!ns||!os)return null;if(!ns.handlesDynamicScoping)return null;const i=os.ScopingShim;if(!i)return null;const n=i.scopeForNode(e),o=dt(e).getRootNode(),s=e=>{if(!ss(e,o))return;const t=Array.from(ns.nativeMethods.querySelectorAll.call(e,"*"));t.push(e);for(let e=0;e<t.length;e++){const s=t[e];if(!ss(s,o))continue;const r=i.currentScopeForNode(s);r!==n&&(""!==r&&i.unscopeNode(s,r),i.scopeNode(s,n))}};if(s(e),t){const t=new MutationObserver(e=>{for(let t=0;t<e.length;t++){const i=e[t];for(let e=0;e<i.addedNodes.length;e++){const t=i.addedNodes[e];t.nodeType===Node.ELEMENT_NODE&&s(t)}}});return t.observe(e,{childList:!0,subtree:!0}),t}return null}
|
|
321
321
|
/**
|
|
322
322
|
* @fileoverview
|
|
323
323
|
* @suppress {checkPrototypalTypes}
|
|
@@ -328,7 +328,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
328
328
|
* be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by
|
|
329
329
|
* Google as part of the polymer project is also subject to an additional IP
|
|
330
330
|
* rights grant found at http://polymer.github.io/PATENTS.txt
|
|
331
|
-
*/const
|
|
331
|
+
*/const as="disable-upgrade",ls=e=>{for(;e;){const t=Object.getOwnPropertyDescriptor(e,"observedAttributes");if(t)return t.get;e=Object.getPrototypeOf(e.prototype).constructor}return()=>[]},cs=(Ue(e=>{const t=sn(e);let i=ls(t);class n extends t{constructor(){super(),this.__isUpgradeDisabled}static get observedAttributes(){return i.call(this).concat(as)}_initializeProperties(){this.hasAttribute(as)?this.__isUpgradeDisabled=!0:super._initializeProperties()}_enableProperties(){this.__isUpgradeDisabled||super._enableProperties()}_canApplyPropertyDefault(e){return super._canApplyPropertyDefault(e)&&!(this.__isUpgradeDisabled&&this._isPropertyPending(e))}attributeChangedCallback(e,t,i,n){e==as?this.__isUpgradeDisabled&&null==i&&(super._initializeProperties(),this.__isUpgradeDisabled=!1,dt(this).isConnected&&super.connectedCallback()):super.attributeChangedCallback(e,t,i,n)}connectedCallback(){this.__isUpgradeDisabled||super.connectedCallback()}disconnectedCallback(){this.__isUpgradeDisabled||super.disconnectedCallback()}}return n}),"disable-upgrade");let ps=window.ShadyCSS;const hs=Ue(e=>{const t=ao(sn(e)),i=on?t:xo(t),n=ls(i),o={x:"pan-x",y:"pan-y",none:"none",all:"auto"};class s extends i{constructor(){super(),this.isAttached,this.__boundListeners,this._debouncers,this.__isUpgradeDisabled,this.__needsAttributesAtConnected,this._legacyForceObservedAttributes}static get importMeta(){return this.prototype.importMeta}created(){}__attributeReaction(e,t,i){(this.__dataAttributes&&this.__dataAttributes[e]||e===cs)&&this.attributeChangedCallback(e,t,i,null)}setAttribute(e,t){if(qe&&!this._legacyForceObservedAttributes){const i=this.getAttribute(e);super.setAttribute(e,t),this.__attributeReaction(e,i,String(t))}else super.setAttribute(e,t)}removeAttribute(e){if(qe&&!this._legacyForceObservedAttributes){const t=this.getAttribute(e);super.removeAttribute(e),this.__attributeReaction(e,t,null)}else super.removeAttribute(e)}static get observedAttributes(){return qe&&!this.prototype._legacyForceObservedAttributes?(this.hasOwnProperty(JSCompiler_renameProperty("__observedAttributes",this))||(this.__observedAttributes=[],Qi(this.prototype)),this.__observedAttributes):n.call(this).concat(cs)}_enableProperties(){this.__isUpgradeDisabled||super._enableProperties()}_canApplyPropertyDefault(e){return super._canApplyPropertyDefault(e)&&!(this.__isUpgradeDisabled&&this._isPropertyPending(e))}connectedCallback(){this.__needsAttributesAtConnected&&this._takeAttributes(),this.__isUpgradeDisabled||(super.connectedCallback(),this.isAttached=!0,this.attached())}attached(){}disconnectedCallback(){this.__isUpgradeDisabled||(super.disconnectedCallback(),this.isAttached=!1,this.detached())}detached(){}attributeChangedCallback(e,t,i,n){t!==i&&(e==cs?this.__isUpgradeDisabled&&null==i&&(this._initializeProperties(),this.__isUpgradeDisabled=!1,dt(this).isConnected&&this.connectedCallback()):(super.attributeChangedCallback(e,t,i,n),this.attributeChanged(e,t,i)))}attributeChanged(e,t,i){}_initializeProperties(){if(Me&&this.hasAttribute(cs))this.__isUpgradeDisabled=!0;else{let e=Object.getPrototypeOf(this);e.hasOwnProperty(JSCompiler_renameProperty("__hasRegisterFinished",e))||(this._registered(),e.__hasRegisterFinished=!0),super._initializeProperties(),this.root=this,this.created(),qe&&!this._legacyForceObservedAttributes&&(this.hasAttributes()?this._takeAttributes():this.parentNode||(this.__needsAttributesAtConnected=!0)),this._applyListeners()}}_takeAttributes(){const e=this.attributes;for(let t=0,i=e.length;t<i;t++){const i=e[t];this.__attributeReaction(i.name,null,i.value)}}_registered(){}ready(){this._ensureAttributes(),super.ready()}_ensureAttributes(){}_applyListeners(){}serialize(e){return this._serializeValue(e)}deserialize(e,t){return this._deserializeValue(e,t)}reflectPropertyToAttribute(e,t,i){this._propertyToAttribute(e,t,i)}serializeValueToAttribute(e,t,i){this._valueToNodeAttribute(i||this,e,t)}extend(e,t){if(!e||!t)return e||t;let i=Object.getOwnPropertyNames(t);for(let n,o=0;o<i.length&&(n=i[o]);o++){let i=Object.getOwnPropertyDescriptor(t,n);i&&Object.defineProperty(e,n,i)}return e}mixin(e,t){for(let i in t)e[i]=t[i];return e}chainObject(e,t){return e&&t&&e!==t&&(e.__proto__=t),e}instanceTemplate(e){let t=this.constructor._contentForTemplate(e);return document.importNode(t,!0)}fire(e,t,i){i=i||{},t=null==t?{}:t;let n=new Event(e,{bubbles:void 0===i.bubbles||i.bubbles,cancelable:Boolean(i.cancelable),composed:void 0===i.composed||i.composed});n.detail=t;let o=i.node||this;return dt(o).dispatchEvent(n),n}listen(e,t,i){e=e||this;let n=this.__boundListeners||(this.__boundListeners=new WeakMap),o=n.get(e);o||(o={},n.set(e,o));let s=t+i;o[s]||(o[s]=this._addMethodEventListenerToNode(e,t,i,this))}unlisten(e,t,i){e=e||this;let n=this.__boundListeners&&this.__boundListeners.get(e),o=t+i,s=n&&n[o];s&&(this._removeEventListenerFromNode(e,t,s),n[o]=null)}setScrollDirection(e,t){Gn(t||this,o[e]||"auto")}$$(e){return this.root.querySelector(e)}get domHost(){let e=dt(this).getRootNode();return e instanceof DocumentFragment?e.host:e}distributeContent(){const e=is(this);window.ShadyDOM&&e.shadowRoot&&ShadyDOM.flush()}getEffectiveChildNodes(){return is(this).getEffectiveChildNodes()}queryDistributedElements(e){return is(this).queryDistributedElements(e)}getEffectiveChildren(){return this.getEffectiveChildNodes().filter((function(e){return e.nodeType===Node.ELEMENT_NODE}))}getEffectiveTextContent(){let e=this.getEffectiveChildNodes(),t=[];for(let i,n=0;i=e[n];n++)i.nodeType!==Node.COMMENT_NODE&&t.push(i.textContent);return t.join("")}queryEffectiveChildren(e){let t=this.queryDistributedElements(e);return t&&t[0]}queryAllEffectiveChildren(e){return this.queryDistributedElements(e)}getContentChildNodes(e){let t=this.root.querySelector(e||"slot");return t?is(t).getDistributedNodes():[]}getContentChildren(e){return this.getContentChildNodes(e).filter((function(e){return e.nodeType===Node.ELEMENT_NODE}))}isLightDescendant(e){const t=this;return t!==e&&dt(t).contains(e)&&dt(t).getRootNode()===dt(e).getRootNode()}isLocalDescendant(e){return this.root===dt(e).getRootNode()}scopeSubtree(e,t=!1){return rs(e,t)}getComputedStyleValue(e){return ps.getComputedStyleValue(this,e)}debounce(e,t,i){return this._debouncers=this._debouncers||{},this._debouncers[e]=rn.debounce(this._debouncers[e],i>0?zt.after(i):Lt,t.bind(this))}isDebouncerActive(e){this._debouncers=this._debouncers||{};let t=this._debouncers[e];return!(!t||!t.isActive())}flushDebouncer(e){this._debouncers=this._debouncers||{};let t=this._debouncers[e];t&&t.flush()}cancelDebouncer(e){this._debouncers=this._debouncers||{};let t=this._debouncers[e];t&&t.cancel()}async(e,t){return t>0?zt.run(e.bind(this),t):~Lt.run(e.bind(this))}cancelAsync(e){e<0?Lt.cancel(~e):zt.cancel(e)}create(e,t){let i=document.createElement(e);if(t)if(i.setProperties)i.setProperties(t);else for(let e in t)i[e]=t[e];return i}elementMatches(e,t){return Jo(t||this,e)}toggleAttribute(e,t){let i=this;return 3===arguments.length&&(i=arguments[2]),1==arguments.length&&(t=!i.hasAttribute(e)),t?(dt(i).setAttribute(e,""),!0):(dt(i).removeAttribute(e),!1)}toggleClass(e,t,i){i=i||this,1==arguments.length&&(t=!i.classList.contains(e)),t?i.classList.add(e):i.classList.remove(e)}transform(e,t){(t=t||this).style.webkitTransform=e,t.style.transform=e}translate3d(e,t,i,n){n=n||this,this.transform("translate3d("+e+","+t+","+i+")",n)}arrayDelete(e,t){let i;if(Array.isArray(e)){if(i=e.indexOf(t),i>=0)return e.splice(i,1)}else{if(i=wt(this,e).indexOf(t),i>=0)return this.splice(e,i,1)}return null}_logger(e,t){switch(Array.isArray(t)&&1===t.length&&Array.isArray(t[0])&&(t=t[0]),e){case"log":case"warn":case"error":console[e](...t)}}_log(...e){this._logger("log",e)}_warn(...e){this._logger("warn",e)}_error(...e){this._logger("error",e)}_logf(e,...t){return["[%s::%s]",this.is,e,...t]}}return s.prototype.is="",s}),ds={attached:!0,detached:!0,ready:!0,created:!0,beforeRegister:!0,registered:!0,attributeChanged:!0,listeners:!0,hostAttributes:!0},us={attached:!0,detached:!0,ready:!0,created:!0,beforeRegister:!0,registered:!0,attributeChanged:!0,behaviors:!0,_noAccessors:!0},fs=Object.assign({listeners:!0,hostAttributes:!0,properties:!0,observers:!0},us);
|
|
332
332
|
/**
|
|
333
333
|
@license
|
|
334
334
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -337,7 +337,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
337
337
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
338
338
|
Code distributed by Google as part of the polymer project is also
|
|
339
339
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
340
|
-
*/function
|
|
340
|
+
*/function _s(e,t,i){const n=e._noAccessors,o=Object.getOwnPropertyNames(e);for(let s=0;s<o.length;s++){let r=o[s];if(!(r in i))if(n)t[r]=e[r];else{let i=Object.getOwnPropertyDescriptor(e,r);i&&(i.configurable=!0,Object.defineProperty(t,r,i))}}}function ms(e,t){return xs({},hs(t),e)}function ys(e,t,i){for(let n=0;n<t.length;n++)gs(e,t[n],i,fs)}function gs(e,t,i,n){_s(t,e,n);for(let e in ds)t[e]&&(i[e]=i[e]||[],i[e].push(t[e]))}function bs(e,t,i){t=t||[];for(let n=e.length-1;n>=0;n--){let o=e[n];o?Array.isArray(o)?bs(o,t):t.indexOf(o)<0&&(!i||i.indexOf(o)<0)&&t.unshift(o):console.warn("behavior is null, check for missing or 404 import")}return t}function vs(e,t){for(const i in t){const n=e[i],o=t[i];e[i]=!("value"in o)&&n&&"value"in n?Object.assign({value:n.value},o):o}}const ws=hs(HTMLElement);function xs(e,t,i){let n;const o={};class s extends t{static _finalizeClass(){if(this.hasOwnProperty(JSCompiler_renameProperty("generatedFrom",this))){if(n)for(let e,t=0;t<n.length;t++)e=n[t],e.properties&&this.createProperties(e.properties),e.observers&&this.createObservers(e.observers,e.properties);e.properties&&this.createProperties(e.properties),e.observers&&this.createObservers(e.observers,e.properties),this._prepareTemplate()}else t._finalizeClass.call(this)}static get properties(){const t={};if(n)for(let e=0;e<n.length;e++)vs(t,n[e].properties);return vs(t,e.properties),t}static get observers(){let t=[];if(n)for(let e,i=0;i<n.length;i++)e=n[i],e.observers&&(t=t.concat(e.observers));return e.observers&&(t=t.concat(e.observers)),t}created(){super.created();const e=o.created;if(e)for(let t=0;t<e.length;t++)e[t].call(this)}_registered(){const e=s.prototype;if(!e.hasOwnProperty(JSCompiler_renameProperty("__hasRegisterFinished",e))){e.__hasRegisterFinished=!0,super._registered(),Me&&r(e);const t=Object.getPrototypeOf(this);let i=o.beforeRegister;if(i)for(let e=0;e<i.length;e++)i[e].call(t);if(i=o.registered,i)for(let e=0;e<i.length;e++)i[e].call(t)}}_applyListeners(){super._applyListeners();const e=o.listeners;if(e)for(let t=0;t<e.length;t++){const i=e[t];if(i)for(let e in i)this._addMethodEventListenerToNode(this,e,i[e])}}_ensureAttributes(){const e=o.hostAttributes;if(e)for(let t=e.length-1;t>=0;t--){const i=e[t];for(let e in i)this._ensureAttribute(e,i[e])}super._ensureAttributes()}ready(){super.ready();let e=o.ready;if(e)for(let t=0;t<e.length;t++)e[t].call(this)}attached(){super.attached();let e=o.attached;if(e)for(let t=0;t<e.length;t++)e[t].call(this)}detached(){super.detached();let e=o.detached;if(e)for(let t=0;t<e.length;t++)e[t].call(this)}attributeChanged(e,t,i){super.attributeChanged();let n=o.attributeChanged;if(n)for(let o=0;o<n.length;o++)n[o].call(this,e,t,i)}}if(i){Array.isArray(i)||(i=[i]);let e=t.prototype.behaviors;n=bs(i,null,e),s.prototype.behaviors=e?e.concat(i):n}const r=t=>{n&&ys(t,n,o),gs(t,e,o,us)};return Me||r(s.prototype),s.generatedFrom=e,s}const Cs=function(e,t){e||console.warn("Polymer.Class requires `info` argument");let i=t?t(ws):ws;return i=xs(e,i,e.behaviors),i.is=i.prototype.is=e.is,i},Ss=function(e){let t;return t="function"==typeof e?e:Ss.Class(e),e._legacyForceObservedAttributes&&(t.prototype._legacyForceObservedAttributes=e._legacyForceObservedAttributes),customElements.define(t.is,t),t};
|
|
341
341
|
/**
|
|
342
342
|
@license
|
|
343
343
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -356,7 +356,7 @@ The complete set of contributors may be found at http://polymer.github.io/CONTRI
|
|
|
356
356
|
Code distributed by Google as part of the polymer project is also
|
|
357
357
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
358
358
|
*/
|
|
359
|
-
function
|
|
359
|
+
function As(e,t,i,n,o){let s;o&&(s="object"==typeof i&&null!==i,s&&(n=e.__dataTemp[t]));let r=n!==i&&(n==n||i==i);return s&&r&&(e.__dataTemp[t]=i),r}Ss.Class=Cs;const ks=Ue(e=>{class t extends e{_shouldPropertyChange(e,t,i){return As(this,e,t,i,!0)}}return t}),Es=Ue(e=>{class t extends e{static get properties(){return{mutableData:Boolean}}_shouldPropertyChange(e,t,i){return As(this,e,t,i,this.mutableData)}}return t});ks._mutablePropertyChange=As;
|
|
360
360
|
/**
|
|
361
361
|
@license
|
|
362
362
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -366,7 +366,7 @@ The complete set of contributors may be found at http://polymer.github.io/CONTRI
|
|
|
366
366
|
Code distributed by Google as part of the polymer project is also
|
|
367
367
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
368
368
|
*/
|
|
369
|
-
let
|
|
369
|
+
let Ps=null;function Os(){return Ps}Os.prototype=Object.create(HTMLTemplateElement.prototype,{constructor:{value:Os,writable:!0}});const Ts=Zi(Os),Is=ks(Ts);function Ns(e,t){Ps=e,Object.setPrototypeOf(e,t.prototype),new t,Ps=null}const Rs=Zi(class{});function Ms(e,t){for(let i=0;i<t.length;i++){let n=t[i];if(Boolean(e)!=Boolean(n.__hideTemplateChildren__))if(n.nodeType===Node.TEXT_NODE)e?(n.__polymerTextContent__=n.textContent,n.textContent=""):n.textContent=n.__polymerTextContent__;else if("slot"===n.localName)if(e)n.__polymerReplaced__=document.createComment("hidden-slot"),dt(dt(n).parentNode).replaceChild(n.__polymerReplaced__,n);else{const e=n.__polymerReplaced__;e&&dt(dt(e).parentNode).replaceChild(n,e)}else n.style&&(e?(n.__polymerDisplay__=n.style.display,n.style.display="none"):n.style.display=n.__polymerDisplay__);n.__hideTemplateChildren__=e,n._showHideChildren&&n._showHideChildren(e)}}class zs extends Rs{constructor(e){super(),this._configureProperties(e),this.root=this._stampTemplate(this.__dataHost);let t=[];this.children=t;for(let e=this.root.firstChild;e;e=e.nextSibling)t.push(e),e.__templatizeInstance=this;this.__templatizeOwner&&this.__templatizeOwner.__hideTemplateChildren__&&this._showHideChildren(!0);let i=this.__templatizeOptions;(e&&i.instanceProps||!i.instanceProps)&&this._enableProperties()}_configureProperties(e){if(this.__templatizeOptions.forwardHostProp)for(let e in this.__hostProps)this._setPendingProperty(e,this.__dataHost["_host_"+e]);for(let t in e)this._setPendingProperty(t,e[t])}forwardHostProp(e,t){this._setPendingPropertyOrPath(e,t,!1,!0)&&this.__dataHost._enqueueClient(this)}_addEventListenerToNode(e,t,i){if(this._methodHost&&this.__templatizeOptions.parentModel)this._methodHost._addEventListenerToNode(e,t,e=>{e.model=this,i(e)});else{let n=this.__dataHost.__dataHost;n&&n._addEventListenerToNode(e,t,i)}}_showHideChildren(e){Ms(e,this.children)}_setUnmanagedPropertyToNode(e,t,i){e.__hideTemplateChildren__&&e.nodeType==Node.TEXT_NODE&&"textContent"==t?e.__polymerTextContent__=i:super._setUnmanagedPropertyToNode(e,t,i)}get parentModel(){let e=this.__parentModel;if(!e){let t;e=this;do{e=e.__dataHost.__dataHost}while((t=e.__templatizeOptions)&&!t.parentModel);this.__parentModel=e}return e}dispatchEvent(e){return!0}}zs.prototype.__dataHost,zs.prototype.__templatizeOptions,zs.prototype._methodHost,zs.prototype.__templatizeOwner,zs.prototype.__hostProps;const Fs=ks(zs);function Ds(e){let t=e.__dataHost;return t&&t._methodHost||t}function Ls(e,t,i){let n=i.mutableData?Fs:zs;$s.mixin&&(n=$s.mixin(n));let o=class extends n{};return o.prototype.__templatizeOptions=i,o.prototype._bindTemplate(e),js(o,e,t,i),o}function Bs(e,t,i,n){let o=i.forwardHostProp;if(o&&t.hasHostProps){const s="template"==e.localName;let r=t.templatizeTemplateClass;if(!r){if(s){let e=i.mutableData?Is:Ts;class n extends e{}r=t.templatizeTemplateClass=n}else{const i=e.constructor;class n extends i{}r=t.templatizeTemplateClass=n}let a=t.hostProps;for(let e in a)r.prototype._addPropertyEffect("_host_"+e,r.prototype.PROPERTY_EFFECT_TYPES.PROPAGATE,{fn:Hs(e,o)}),r.prototype._createNotifyingProperty("_host_"+e);ze&&n&&Us(t,i,n)}if(e.__dataProto&&Object.assign(e.__data,e.__dataProto),s)Ns(e,r),e.__dataTemp={},e.__dataPending=null,e.__dataOld=null,e._enableProperties();else{Object.setPrototypeOf(e,r.prototype);const i=t.hostProps;for(let t in i)if(t="_host_"+t,t in e){const i=e[t];delete e[t],e.__data[t]=i}}}}function Hs(e,t){return function(e,i,n){t.call(e.__templatizeOwner,i.substring("_host_".length),n[i])}}function js(e,t,i,n){let o=i.hostProps||{};for(let t in n.instanceProps){delete o[t];let i=n.notifyInstanceProp;i&&e.prototype._addPropertyEffect(t,e.prototype.PROPERTY_EFFECT_TYPES.NOTIFY,{fn:qs(t,i)})}if(n.forwardHostProp&&t.__dataHost)for(let t in o)i.hasHostProps||(i.hasHostProps=!0),e.prototype._addPropertyEffect(t,e.prototype.PROPERTY_EFFECT_TYPES.NOTIFY,{fn:Vs()})}function qs(e,t){return function(e,i,n){t.call(e.__templatizeOwner,e,i,n[i])}}function Vs(){return function(e,t,i){e.__dataHost._setPendingPropertyOrPath("_host_"+t,i[t],!0,!0)}}function $s(e,t,i){if(Ne&&!Ds(e))throw new Error("strictTemplatePolicy: template owner not trusted");if(i=i||{},e.__templatizeOwner)throw new Error("A <template> can only be templatized once");e.__templatizeOwner=t;let n=(t?t.constructor:zs)._parseTemplate(e),o=n.templatizeInstanceClass;o||(o=Ls(e,n,i),n.templatizeInstanceClass=o);const s=Ds(e);Bs(e,n,i,s);let r=class extends o{};return r.prototype._methodHost=s,r.prototype.__dataHost=e,r.prototype.__templatizeOwner=t,r.prototype.__hostProps=n.hostProps,r=r,r}function Us(e,t,i){const n=i.constructor._properties,{propertyEffects:o}=e,{instanceProps:s}=t;for(let e in o)if(!(n[e]||s&&s[e])){const t=o[e];for(let i=0;i<t.length;i++){const{part:n}=t[i].info;if(!n.signature||!n.signature.static){console.warn(`Property '${e}' used in template but not declared in 'properties'; attribute will not be observed.`);break}}}}function Ks(e,t){let i;for(;t;)if(i=t.__dataHost?t:t.__templatizeInstance){if(i.__dataHost==e)return i;t=i.__dataHost}else t=dt(t).parentNode;return null}
|
|
370
370
|
/**
|
|
371
371
|
@license
|
|
372
372
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -375,7 +375,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
375
375
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
376
376
|
Code distributed by Google as part of the polymer project is also
|
|
377
377
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
378
|
-
*/const
|
|
378
|
+
*/const Ys={templatize(e,t){this._templatizerTemplate=e,this.ctor=$s(e,this,{mutableData:Boolean(t),parentModel:this._parentModel,instanceProps:this._instanceProps,forwardHostProp:this._forwardHostPropV2,notifyInstanceProp:this._notifyInstancePropV2})},stamp(e){return new this.ctor(e)},modelForElement(e){return Ks(this._templatizerTemplate,e)}};
|
|
379
379
|
/**
|
|
380
380
|
@license
|
|
381
381
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -384,7 +384,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
384
384
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
385
385
|
Code distributed by Google as part of the polymer project is also
|
|
386
386
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
387
|
-
*/let
|
|
387
|
+
*/let Ws=!1;function Js(){if(Me&&!Ee){if(!Ws){Ws=!0;const e=document.createElement("style");e.textContent="dom-bind,dom-if,dom-repeat{display:none;}",document.head.appendChild(e)}return!0}return!1}
|
|
388
388
|
/**
|
|
389
389
|
@license
|
|
390
390
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -393,7 +393,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
393
393
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
394
394
|
Code distributed by Google as part of the polymer project is also
|
|
395
395
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
396
|
-
*/const
|
|
396
|
+
*/const Xs=ao(Es(Zi(HTMLElement)));class Zs extends Xs{static get observedAttributes(){return["mutable-data"]}constructor(){if(super(),Ne)throw new Error("strictTemplatePolicy: dom-bind not allowed");this.root=null,this.$=null,this.__children=null}attributeChangedCallback(e,t,i,n){this.mutableData=!0}connectedCallback(){Js()||(this.style.display="none"),this.render()}disconnectedCallback(){this.__removeChildren()}__insertChildren(){dt(dt(this).parentNode).insertBefore(this.root,this)}__removeChildren(){if(this.__children)for(let e=0;e<this.__children.length;e++)this.root.appendChild(this.__children[e])}render(){let e;if(!this.__children){if(e=e||this.querySelector("template"),!e){let t=new MutationObserver(()=>{if(e=this.querySelector("template"),!e)throw new Error("dom-bind requires a <template> child");t.disconnect(),this.render()});return void t.observe(this,{childList:!0})}this.root=this._stampTemplate(e),this.$=this.root.$,this.__children=[];for(let e=this.root.firstChild;e;e=e.nextSibling)this.__children[this.__children.length]=e;this._enableProperties()}this.__insertChildren(),this.dispatchEvent(new CustomEvent("dom-change",{bubbles:!0,composed:!0}))}}customElements.define("dom-bind",Zs);
|
|
397
397
|
/**
|
|
398
398
|
@license
|
|
399
399
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -403,16 +403,7 @@ The complete set of contributors may be found at http://polymer.github.io/CONTRI
|
|
|
403
403
|
Code distributed by Google as part of the polymer project is also
|
|
404
404
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
405
405
|
*/
|
|
406
|
-
class
|
|
407
|
-
/**
|
|
408
|
-
@license
|
|
409
|
-
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
410
|
-
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
411
|
-
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
412
|
-
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
413
|
-
Code distributed by Google as part of the polymer project is also
|
|
414
|
-
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
415
|
-
*/class ir extends tr{static get is(){return"dom-repeat"}static get template(){return null}static get properties(){return{items:{type:Array},as:{type:String,value:"item"},indexAs:{type:String,value:"index"},itemsIndexAs:{type:String,value:"itemsIndex"},sort:{type:Function,observer:"__sortChanged"},filter:{type:Function,observer:"__filterChanged"},observe:{type:String,observer:"__observeChanged"},delay:Number,renderedItemCount:{type:Number,notify:!je,readOnly:!0},initialCount:{type:Number},targetFramerate:{type:Number,value:20},_targetFrameTime:{type:Number,computed:"__computeFrameTime(targetFramerate)"},notifyDomChange:{type:Boolean},reuseChunkedInstances:{type:Boolean}}}static get observers(){return["__itemsChanged(items.*)"]}constructor(){super(),this.__instances=[],this.__renderDebouncer=null,this.__itemsIdxToInstIdx={},this.__chunkCount=null,this.__renderStartTime=null,this.__itemsArrayChanged=!1,this.__shouldMeasureChunk=!1,this.__shouldContinueChunking=!1,this.__chunkingId=0,this.__sortFn=null,this.__filterFn=null,this.__observePaths=null,this.__ctor=null,this.__isDetached=!0,this.template=null,this._templateInfo}disconnectedCallback(){super.disconnectedCallback(),this.__isDetached=!0;for(let e=0;e<this.__instances.length;e++)this.__detachInstance(e)}connectedCallback(){if(super.connectedCallback(),Ys()||(this.style.display="none"),this.__isDetached){this.__isDetached=!1;let e=dt(dt(this).parentNode);for(let t=0;t<this.__instances.length;t++)this.__attachInstance(t,e)}}__ensureTemplatized(){if(!this.__ctor){const e=this;let t=this.template=e._templateInfo?e:this.querySelector("template");if(!t){let e=new MutationObserver(()=>{if(!this.querySelector("template"))throw new Error("dom-repeat requires a <template> child");e.disconnect(),this.__render()});return e.observe(this,{childList:!0}),!1}let i={};i[this.as]=!0,i[this.indexAs]=!0,i[this.itemsIndexAs]=!0,this.__ctor=qs(t,this,{mutableData:this.mutableData,parentModel:!0,instanceProps:i,forwardHostProp:function(e,t){let i=this.__instances;for(let n,o=0;o<i.length&&(n=i[o]);o++)n.forwardHostProp(e,t)},notifyInstanceProp:function(e,t,i){if(gt(this.as,t)){let n=e[this.itemsIndexAs];t==this.as&&(this.items[n]=i);let o=yt(this.as,`${JSCompiler_renameProperty("items",this)}.${n}`,t);this.notifyPath(o,i)}}})}return!0}__getMethodHost(){return this.__dataHost._methodHost||this.__dataHost}__functionFromPropertyValue(e){if("string"==typeof e){let t=e,i=this.__getMethodHost();return function(){return i[t].apply(i,arguments)}}return e}__sortChanged(e){this.__sortFn=this.__functionFromPropertyValue(e),this.items&&this.__debounceRender(this.__render)}__filterChanged(e){this.__filterFn=this.__functionFromPropertyValue(e),this.items&&this.__debounceRender(this.__render)}__computeFrameTime(e){return Math.ceil(1e3/e)}__observeChanged(){this.__observePaths=this.observe&&this.observe.replace(".*",".").split(" ")}__handleObservedPaths(e){if(this.__sortFn||this.__filterFn)if(e){if(this.__observePaths){let t=this.__observePaths;for(let i=0;i<t.length;i++)0===e.indexOf(t[i])&&this.__debounceRender(this.__render,this.delay)}}else this.__debounceRender(this.__render,this.delay)}__itemsChanged(e){this.items&&!Array.isArray(this.items)&&console.warn("dom-repeat expected array for `items`, found",this.items),this.__handleItemPath(e.path,e.value)||("items"===e.path&&(this.__itemsArrayChanged=!0),this.__debounceRender(this.__render))}__debounceRender(e,t=0){this.__renderDebouncer=on.debounce(this.__renderDebouncer,t>0?zt.after(t):Lt,e.bind(this)),rn(this.__renderDebouncer)}render(){this.__debounceRender(this.__render),$o()}__render(){if(!this.__ensureTemplatized())return;let e=this.items||[];const t=this.__sortAndFilterItems(e),i=this.__calculateLimit(t.length);this.__updateInstances(e,i,t),this.initialCount&&(this.__shouldMeasureChunk||this.__shouldContinueChunking)&&(cancelAnimationFrame(this.__chunkingId),this.__chunkingId=requestAnimationFrame(()=>this.__continueChunking())),this._setRenderedItemCount(this.__instances.length),je&&!this.notifyDomChange||this.dispatchEvent(new CustomEvent("dom-change",{bubbles:!0,composed:!0}))}__sortAndFilterItems(e){let t=new Array(e.length);for(let i=0;i<e.length;i++)t[i]=i;return this.__filterFn&&(t=t.filter((t,i,n)=>this.__filterFn(e[t],i,n))),this.__sortFn&&t.sort((t,i)=>this.__sortFn(e[t],e[i])),t}__calculateLimit(e){let t=e;const i=this.__instances.length;if(this.initialCount){let n;!this.__chunkCount||this.__itemsArrayChanged&&!this.reuseChunkedInstances?(t=Math.min(e,this.initialCount),n=Math.max(t-i,0),this.__chunkCount=n||1):(n=Math.min(Math.max(e-i,0),this.__chunkCount),t=Math.min(i+n,e)),this.__shouldMeasureChunk=n===this.__chunkCount,this.__shouldContinueChunking=t<e,this.__renderStartTime=performance.now()}return this.__itemsArrayChanged=!1,t}__continueChunking(){if(this.__shouldMeasureChunk){const e=performance.now()-this.__renderStartTime,t=this._targetFrameTime/e;this.__chunkCount=Math.round(this.__chunkCount*t)||1}this.__shouldContinueChunking&&this.__debounceRender(this.__render)}__updateInstances(e,t,i){const n=this.__itemsIdxToInstIdx={};let o;for(o=0;o<t;o++){let t=this.__instances[o],s=i[o],r=e[s];n[s]=o,t?(t._setPendingProperty(this.as,r),t._setPendingProperty(this.indexAs,o),t._setPendingProperty(this.itemsIndexAs,s),t._flushProperties()):this.__insertInstance(r,o,s)}for(let e=this.__instances.length-1;e>=o;e--)this.__detachAndRemoveInstance(e)}__detachInstance(e){let t=this.__instances[e];const i=dt(t.root);for(let e=0;e<t.children.length;e++){let n=t.children[e];i.appendChild(n)}return t}__attachInstance(e,t){let i=this.__instances[e];t.insertBefore(i.root,this)}__detachAndRemoveInstance(e){this.__detachInstance(e),this.__instances.splice(e,1)}__stampInstance(e,t,i){let n={};return n[this.as]=e,n[this.indexAs]=t,n[this.itemsIndexAs]=i,new this.__ctor(n)}__insertInstance(e,t,i){const n=this.__stampInstance(e,t,i);let o=this.__instances[t+1],s=o?o.children[0]:this;return dt(dt(this).parentNode).insertBefore(n.root,s),this.__instances[t]=n,n}_showHideChildren(e){for(let t=0;t<this.__instances.length;t++)this.__instances[t]._showHideChildren(e)}__handleItemPath(e,t){let i=e.slice(6),n=i.indexOf("."),o=n<0?i:i.substring(0,n);if(o==parseInt(o,10)){let e=n<0?"":i.substring(n+1);this.__handleObservedPaths(e);let s=this.__itemsIdxToInstIdx[o],r=this.__instances[s];if(r){let i=this.as+(e?"."+e:"");r._setPendingPropertyOrPath(i,t,!1,!0),r._flushProperties()}return!0}}itemForElement(e){let t=this.modelForElement(e);return t&&t[this.as]}indexForElement(e){let t=this.modelForElement(e);return t&&t[this.indexAs]}modelForElement(e){return $s(this.template,e)}}customElements.define(ir.is,ir);
|
|
406
|
+
const Gs=window.trustedTypes&&trustedTypes.createPolicy("polymer-html-literal",{createHTML:e=>e});class Qs{constructor(e,t){nr(e,t);const i=t.reduce((t,i,n)=>t+er(i)+e[n+1],e[0]);this.value=i.toString()}toString(){return this.value}}function er(e){if(e instanceof Qs)return e.value;throw new Error("non-literal value passed to Polymer's htmlLiteral function: "+e)}function tr(e){if(e instanceof HTMLTemplateElement)return e.innerHTML;if(e instanceof Qs)return er(e);throw new Error("non-template value passed to Polymer's html function: "+e)}const ir=function(e,...t){nr(e,t);const i=document.createElement("template");let n=t.reduce((t,i,n)=>t+tr(i)+e[n+1],e[0]);return Gs&&(n=Gs.createHTML(n)),i.innerHTML=n,i},nr=(e,t)=>{if(!Array.isArray(e)||!Array.isArray(e.raw)||t.length!==e.length-1)throw new TypeError("Invalid call to the html template tag")},or=sn(HTMLElement),sr=Es(or);class rr extends sr{static get is(){return"dom-repeat"}static get template(){return null}static get properties(){return{items:{type:Array},as:{type:String,value:"item"},indexAs:{type:String,value:"index"},itemsIndexAs:{type:String,value:"itemsIndex"},sort:{type:Function,observer:"__sortChanged"},filter:{type:Function,observer:"__filterChanged"},observe:{type:String,observer:"__observeChanged"},delay:Number,renderedItemCount:{type:Number,notify:!je,readOnly:!0},initialCount:{type:Number},targetFramerate:{type:Number,value:20},_targetFrameTime:{type:Number,computed:"__computeFrameTime(targetFramerate)"},notifyDomChange:{type:Boolean},reuseChunkedInstances:{type:Boolean}}}static get observers(){return["__itemsChanged(items.*)"]}constructor(){super(),this.__instances=[],this.__renderDebouncer=null,this.__itemsIdxToInstIdx={},this.__chunkCount=null,this.__renderStartTime=null,this.__itemsArrayChanged=!1,this.__shouldMeasureChunk=!1,this.__shouldContinueChunking=!1,this.__chunkingId=0,this.__sortFn=null,this.__filterFn=null,this.__observePaths=null,this.__ctor=null,this.__isDetached=!0,this.template=null,this._templateInfo}disconnectedCallback(){super.disconnectedCallback(),this.__isDetached=!0;for(let e=0;e<this.__instances.length;e++)this.__detachInstance(e);this.__chunkingId&&cancelAnimationFrame(this.__chunkingId)}connectedCallback(){if(super.connectedCallback(),Js()||(this.style.display="none"),this.__isDetached){this.__isDetached=!1;let e=dt(dt(this).parentNode);for(let t=0;t<this.__instances.length;t++)this.__attachInstance(t,e);this.__chunkingId&&this.__render()}}__ensureTemplatized(){if(!this.__ctor){const e=this;let t=this.template=e._templateInfo?e:this.querySelector("template");if(!t){let e=new MutationObserver(()=>{if(!this.querySelector("template"))throw new Error("dom-repeat requires a <template> child");e.disconnect(),this.__render()});return e.observe(this,{childList:!0}),!1}let i={};i[this.as]=!0,i[this.indexAs]=!0,i[this.itemsIndexAs]=!0,this.__ctor=$s(t,this,{mutableData:this.mutableData,parentModel:!0,instanceProps:i,forwardHostProp:function(e,t){let i=this.__instances;for(let n,o=0;o<i.length&&(n=i[o]);o++)n.forwardHostProp(e,t)},notifyInstanceProp:function(e,t,i){if(gt(this.as,t)){let n=e[this.itemsIndexAs];t==this.as&&(this.items[n]=i);let o=yt(this.as,`${JSCompiler_renameProperty("items",this)}.${n}`,t);this.notifyPath(o,i)}}})}return!0}__getMethodHost(){return this.__dataHost._methodHost||this.__dataHost}__functionFromPropertyValue(e){if("string"==typeof e){let t=e,i=this.__getMethodHost();return function(){return i[t].apply(i,arguments)}}return e}__sortChanged(e){this.__sortFn=this.__functionFromPropertyValue(e),this.items&&this.__debounceRender(this.__render)}__filterChanged(e){this.__filterFn=this.__functionFromPropertyValue(e),this.items&&this.__debounceRender(this.__render)}__computeFrameTime(e){return Math.ceil(1e3/e)}__observeChanged(){this.__observePaths=this.observe&&this.observe.replace(".*",".").split(" ")}__handleObservedPaths(e){if(this.__sortFn||this.__filterFn)if(e){if(this.__observePaths){let t=this.__observePaths;for(let i=0;i<t.length;i++)0===e.indexOf(t[i])&&this.__debounceRender(this.__render,this.delay)}}else this.__debounceRender(this.__render,this.delay)}__itemsChanged(e){this.items&&!Array.isArray(this.items)&&console.warn("dom-repeat expected array for `items`, found",this.items),this.__handleItemPath(e.path,e.value)||("items"===e.path&&(this.__itemsArrayChanged=!0),this.__debounceRender(this.__render))}__debounceRender(e,t=0){this.__renderDebouncer=rn.debounce(this.__renderDebouncer,t>0?zt.after(t):Lt,e.bind(this)),ln(this.__renderDebouncer)}render(){this.__debounceRender(this.__render),Ko()}__render(){if(!this.__ensureTemplatized())return;let e=this.items||[];const t=this.__sortAndFilterItems(e),i=this.__calculateLimit(t.length);this.__updateInstances(e,i,t),this.initialCount&&(this.__shouldMeasureChunk||this.__shouldContinueChunking)&&(cancelAnimationFrame(this.__chunkingId),this.__chunkingId=requestAnimationFrame(()=>{this.__chunkingId=null,this.__continueChunking()})),this._setRenderedItemCount(this.__instances.length),je&&!this.notifyDomChange||this.dispatchEvent(new CustomEvent("dom-change",{bubbles:!0,composed:!0}))}__sortAndFilterItems(e){let t=new Array(e.length);for(let i=0;i<e.length;i++)t[i]=i;return this.__filterFn&&(t=t.filter((t,i,n)=>this.__filterFn(e[t],i,n))),this.__sortFn&&t.sort((t,i)=>this.__sortFn(e[t],e[i])),t}__calculateLimit(e){let t=e;const i=this.__instances.length;if(this.initialCount){let n;!this.__chunkCount||this.__itemsArrayChanged&&!this.reuseChunkedInstances?(t=Math.min(e,this.initialCount),n=Math.max(t-i,0),this.__chunkCount=n||1):(n=Math.min(Math.max(e-i,0),this.__chunkCount),t=Math.min(i+n,e)),this.__shouldMeasureChunk=n===this.__chunkCount,this.__shouldContinueChunking=t<e,this.__renderStartTime=performance.now()}return this.__itemsArrayChanged=!1,t}__continueChunking(){if(this.__shouldMeasureChunk){const e=performance.now()-this.__renderStartTime,t=this._targetFrameTime/e;this.__chunkCount=Math.round(this.__chunkCount*t)||1}this.__shouldContinueChunking&&this.__debounceRender(this.__render)}__updateInstances(e,t,i){const n=this.__itemsIdxToInstIdx={};let o;for(o=0;o<t;o++){let t=this.__instances[o],s=i[o],r=e[s];n[s]=o,t?(t._setPendingProperty(this.as,r),t._setPendingProperty(this.indexAs,o),t._setPendingProperty(this.itemsIndexAs,s),t._flushProperties()):this.__insertInstance(r,o,s)}for(let e=this.__instances.length-1;e>=o;e--)this.__detachAndRemoveInstance(e)}__detachInstance(e){let t=this.__instances[e];const i=dt(t.root);for(let e=0;e<t.children.length;e++){let n=t.children[e];i.appendChild(n)}return t}__attachInstance(e,t){let i=this.__instances[e];t.insertBefore(i.root,this)}__detachAndRemoveInstance(e){this.__detachInstance(e),this.__instances.splice(e,1)}__stampInstance(e,t,i){let n={};return n[this.as]=e,n[this.indexAs]=t,n[this.itemsIndexAs]=i,new this.__ctor(n)}__insertInstance(e,t,i){const n=this.__stampInstance(e,t,i);let o=this.__instances[t+1],s=o?o.children[0]:this;return dt(dt(this).parentNode).insertBefore(n.root,s),this.__instances[t]=n,n}_showHideChildren(e){for(let t=0;t<this.__instances.length;t++)this.__instances[t]._showHideChildren(e)}__handleItemPath(e,t){let i=e.slice(6),n=i.indexOf("."),o=n<0?i:i.substring(0,n);if(o==parseInt(o,10)){let e=n<0?"":i.substring(n+1);this.__handleObservedPaths(e);let s=this.__itemsIdxToInstIdx[o],r=this.__instances[s];if(r){let i=this.as+(e?"."+e:"");r._setPendingPropertyOrPath(i,t,!1,!0),r._flushProperties()}return!0}}itemForElement(e){let t=this.modelForElement(e);return t&&t[this.as]}indexForElement(e){let t=this.modelForElement(e);return t&&t[this.indexAs]}modelForElement(e){return Ks(this.template,e)}}customElements.define(rr.is,rr);
|
|
416
407
|
/**
|
|
417
408
|
@license
|
|
418
409
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -422,7 +413,7 @@ The complete set of contributors may be found at http://polymer.github.io/CONTRI
|
|
|
422
413
|
Code distributed by Google as part of the polymer project is also
|
|
423
414
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
424
415
|
*/
|
|
425
|
-
class
|
|
416
|
+
class ar extends or{static get is(){return"dom-if"}static get template(){return null}static get properties(){return{if:{type:Boolean,observer:"__debounceRender"},restamp:{type:Boolean,observer:"__debounceRender"},notifyDomChange:{type:Boolean}}}constructor(){super(),this.__renderDebouncer=null,this._lastIf=!1,this.__hideTemplateChildren__=!1,this.__template,this._templateInfo}__debounceRender(){this.__renderDebouncer=rn.debounce(this.__renderDebouncer,Lt,()=>this.__render()),ln(this.__renderDebouncer)}disconnectedCallback(){super.disconnectedCallback();const e=dt(this).parentNode;e&&(e.nodeType!=Node.DOCUMENT_FRAGMENT_NODE||dt(e).host)||this.__teardownInstance()}connectedCallback(){super.connectedCallback(),Js()||(this.style.display="none"),this.if&&this.__debounceRender()}__ensureTemplate(){if(!this.__template){const e=this;let t=e._templateInfo?e:dt(e).querySelector("template");if(!t){let e=new MutationObserver(()=>{if(!dt(this).querySelector("template"))throw new Error("dom-if requires a <template> child");e.disconnect(),this.__render()});return e.observe(this,{childList:!0}),!1}this.__template=t}return!0}__ensureInstance(){let e=dt(this).parentNode;if(this.__hasInstance()){let t=this.__getInstanceNodes();if(t&&t.length){if(dt(this).previousSibling!==t[t.length-1])for(let i,n=0;n<t.length&&(i=t[n]);n++)dt(e).insertBefore(i,this)}}else{if(!e)return!1;if(!this.__ensureTemplate())return!1;this.__createAndInsertInstance(e)}return!0}render(){Ko()}__render(){if(this.if){if(!this.__ensureInstance())return}else this.restamp&&this.__teardownInstance();this._showHideChildren(),je&&!this.notifyDomChange||this.if==this._lastIf||(this.dispatchEvent(new CustomEvent("dom-change",{bubbles:!0,composed:!0})),this._lastIf=this.if)}__hasInstance(){}__getInstanceNodes(){}__createAndInsertInstance(e){}__teardownInstance(){}_showHideChildren(){}}class lr extends ar{constructor(){super(),this.__instance=null,this.__syncInfo=null}__hasInstance(){return Boolean(this.__instance)}__getInstanceNodes(){return this.__instance.templateInfo.childNodes}__createAndInsertInstance(e){const t=this.__dataHost||this;if(Ne&&!this.__dataHost)throw new Error("strictTemplatePolicy: template owner not trusted");const i=t._bindTemplate(this.__template,!0);i.runEffects=(e,t,i)=>{let n=this.__syncInfo;if(this.if)n&&(this.__syncInfo=null,this._showHideChildren(),t=Object.assign(n.changedProps,t)),e(t,i);else if(this.__instance)if(n||(n=this.__syncInfo={runEffects:e,changedProps:{}}),i)for(const e in t){const t=ft(e);n.changedProps[t]=this.__dataHost[t]}else Object.assign(n.changedProps,t)},this.__instance=t._stampTemplate(this.__template,i),dt(e).insertBefore(this.__instance,this)}__syncHostProperties(){const e=this.__syncInfo;e&&(this.__syncInfo=null,e.runEffects(e.changedProps,!1))}__teardownInstance(){const e=this.__dataHost||this;this.__instance&&(e._removeBoundDom(this.__instance),this.__instance=null,this.__syncInfo=null)}_showHideChildren(){const e=this.__hideTemplateChildren__||!this.if;this.__instance&&Boolean(this.__instance.__hidden)!==e&&(this.__instance.__hidden=e,Ms(e,this.__instance.templateInfo.childNodes)),e||this.__syncHostProperties()}}class cr extends ar{constructor(){super(),this.__ctor=null,this.__instance=null,this.__invalidProps=null}__hasInstance(){return Boolean(this.__instance)}__getInstanceNodes(){return this.__instance.children}__createAndInsertInstance(e){this.__ctor||(this.__ctor=$s(this.__template,this,{mutableData:!0,forwardHostProp:function(e,t){this.__instance&&(this.if?this.__instance.forwardHostProp(e,t):(this.__invalidProps=this.__invalidProps||Object.create(null),this.__invalidProps[ft(e)]=!0))}})),this.__instance=new this.__ctor,dt(e).insertBefore(this.__instance.root,this)}__teardownInstance(){if(this.__instance){let e=this.__instance.children;if(e&&e.length){let t=dt(e[0]).parentNode;if(t){t=dt(t);for(let i,n=0;n<e.length&&(i=e[n]);n++)t.removeChild(i)}}this.__invalidProps=null,this.__instance=null}}__syncHostProperties(){let e=this.__invalidProps;if(e){this.__invalidProps=null;for(let t in e)this.__instance._setPendingProperty(t,this.__dataHost[t]);this.__instance._flushProperties()}}_showHideChildren(){const e=this.__hideTemplateChildren__||!this.if;this.__instance&&Boolean(this.__instance.__hidden)!==e&&(this.__instance.__hidden=e,this.__instance._showHideChildren(e)),e||this.__syncHostProperties()}}const pr=He?lr:cr;customElements.define(pr.is,pr);
|
|
426
417
|
/**
|
|
427
418
|
@license
|
|
428
419
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -432,7 +423,7 @@ The complete set of contributors may be found at http://polymer.github.io/CONTRI
|
|
|
432
423
|
Code distributed by Google as part of the polymer project is also
|
|
433
424
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
434
425
|
*/
|
|
435
|
-
let
|
|
426
|
+
let hr=Ue(e=>{let t=sn(e);class i extends t{static get properties(){return{items:{type:Array},multi:{type:Boolean,value:!1},selected:{type:Object,notify:!0},selectedItem:{type:Object,notify:!0},toggle:{type:Boolean,value:!1}}}static get observers(){return["__updateSelection(multi, items.*)"]}constructor(){super(),this.__lastItems=null,this.__lastMulti=null,this.__selectedMap=null}__updateSelection(e,t){let i=t.path;if(i==JSCompiler_renameProperty("items",this)){let i=t.base||[],n=this.__lastItems;if(e!==this.__lastMulti&&this.clearSelection(),n){let e=qo(i,n);this.__applySplices(e)}this.__lastItems=i,this.__lastMulti=e}else if(t.path==JSCompiler_renameProperty("items",this)+".splices")this.__applySplices(t.value.indexSplices);else{let e=i.slice((JSCompiler_renameProperty("items",this)+".").length),t=parseInt(e,10);e.indexOf(".")<0&&e==t&&this.__deselectChangedIdx(t)}}__applySplices(e){let t=this.__selectedMap;for(let i=0;i<e.length;i++){let n=e[i];t.forEach((e,i)=>{e<n.index||(e>=n.index+n.removed.length?t.set(i,e+n.addedCount-n.removed.length):t.set(i,-1))});for(let e=0;e<n.addedCount;e++){let i=n.index+e;t.has(this.items[i])&&t.set(this.items[i],i)}}this.__updateLinks();let i=0;t.forEach((e,n)=>{e<0?(this.multi?this.splice(JSCompiler_renameProperty("selected",this),i,1):this.selected=this.selectedItem=null,t.delete(n)):i++})}__updateLinks(){if(this.__dataLinkedPaths={},this.multi){let e=0;this.__selectedMap.forEach(t=>{t>=0&&this.linkPaths(`${JSCompiler_renameProperty("items",this)}.${t}`,`${JSCompiler_renameProperty("selected",this)}.${e++}`)})}else this.__selectedMap.forEach(e=>{this.linkPaths(JSCompiler_renameProperty("selected",this),`${JSCompiler_renameProperty("items",this)}.${e}`),this.linkPaths(JSCompiler_renameProperty("selectedItem",this),`${JSCompiler_renameProperty("items",this)}.${e}`)})}clearSelection(){this.__dataLinkedPaths={},this.__selectedMap=new Map,this.selected=this.multi?[]:null,this.selectedItem=null}isSelected(e){return this.__selectedMap.has(e)}isIndexSelected(e){return this.isSelected(this.items[e])}__deselectChangedIdx(e){let t=this.__selectedIndexForItemIndex(e);if(t>=0){let e=0;this.__selectedMap.forEach((i,n)=>{t==e++&&this.deselect(n)})}}__selectedIndexForItemIndex(e){let t=this.__dataLinkedPaths[`${JSCompiler_renameProperty("items",this)}.${e}`];if(t)return parseInt(t.slice((JSCompiler_renameProperty("selected",this)+".").length),10)}deselect(e){let t=this.__selectedMap.get(e);if(t>=0){let i;this.__selectedMap.delete(e),this.multi&&(i=this.__selectedIndexForItemIndex(t)),this.__updateLinks(),this.multi?this.splice(JSCompiler_renameProperty("selected",this),i,1):this.selected=this.selectedItem=null}}deselectIndex(e){this.deselect(this.items[e])}select(e){this.selectIndex(this.items.indexOf(e))}selectIndex(e){let t=this.items[e];this.isSelected(t)?this.toggle&&this.deselectIndex(e):(this.multi||this.__selectedMap.clear(),this.__selectedMap.set(t,e),this.__updateLinks(),this.multi?this.push(JSCompiler_renameProperty("selected",this),t):this.selected=this.selectedItem=t)}}return i})(or);class dr extends hr{static get is(){return"array-selector"}static get template(){return null}}customElements.define(dr.is,dr);
|
|
436
427
|
/**
|
|
437
428
|
@license
|
|
438
429
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -442,7 +433,7 @@ The complete set of contributors may be found at http://polymer.github.io/CONTRI
|
|
|
442
433
|
Code distributed by Google as part of the polymer project is also
|
|
443
434
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
444
435
|
*/
|
|
445
|
-
const
|
|
436
|
+
const ur=new ye;window.ShadyCSS||(window.ShadyCSS={prepareTemplate(e,t,i){},prepareTemplateDom(e,t){},prepareTemplateStyles(e,t,i){},styleSubtree(e,t){ur.processStyles(),V(e,t)},styleElement(e){ur.processStyles()},styleDocument(e){ur.processStyles(),V(document.body,e)},getComputedStyleValue:(e,t)=>$(e,t),flushCustomStyles(){},nativeCss:s,nativeShadow:e,cssBuild:i,disableRuntime:o}),window.ShadyCSS.CustomStyleInterface=ur;
|
|
446
437
|
/**
|
|
447
438
|
@license
|
|
448
439
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -452,7 +443,7 @@ The complete set of contributors may be found at http://polymer.github.io/CONTRI
|
|
|
452
443
|
Code distributed by Google as part of the polymer project is also
|
|
453
444
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
454
445
|
*/
|
|
455
|
-
const
|
|
446
|
+
const fr="include",_r=window.ShadyCSS.CustomStyleInterface;class mr extends HTMLElement{constructor(){super(),this._style=null,_r.addCustomStyle(this)}getStyle(){if(this._style)return this._style;const e=this.querySelector("style");if(!e)return null;this._style=e;const t=e.getAttribute(fr);return t&&(e.removeAttribute(fr),e.textContent=lt(t)+e.textContent),this.ownerDocument!==window.document&&window.document.head.appendChild(this),this._style}}window.customElements.define("custom-style",mr);
|
|
456
447
|
/**
|
|
457
448
|
@license
|
|
458
449
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -462,7 +453,7 @@ The complete set of contributors may be found at http://polymer.github.io/CONTRI
|
|
|
462
453
|
Code distributed by Google as part of the polymer project is also
|
|
463
454
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
464
455
|
*/
|
|
465
|
-
const
|
|
456
|
+
const yr=hs(HTMLElement).prototype,gr=ir`
|
|
466
457
|
<custom-style>
|
|
467
458
|
<style is="custom-style">
|
|
468
459
|
[hidden] {
|
|
@@ -824,7 +815,7 @@ http://polymer.github.io/AUTHORS.txt The complete set of contributors may be
|
|
|
824
815
|
found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
|
|
825
816
|
part of the polymer project is also subject to an additional IP rights grant
|
|
826
817
|
found at http://polymer.github.io/PATENTS.txt
|
|
827
|
-
*/
|
|
818
|
+
*/gr.setAttribute("style","display: none;"),document.head.appendChild(gr.content);var br=document.createElement("style");br.textContent="[hidden] { display: none !important; }",document.head.appendChild(br);
|
|
828
819
|
/**
|
|
829
820
|
@license
|
|
830
821
|
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
|
@@ -835,7 +826,7 @@ found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
|
|
|
835
826
|
part of the polymer project is also subject to an additional IP rights grant
|
|
836
827
|
found at http://polymer.github.io/PATENTS.txt
|
|
837
828
|
*/
|
|
838
|
-
class
|
|
829
|
+
class vr{constructor(e){vr[" "](e),this.type=e&&e.type||"default",this.key=e&&e.key,e&&"value"in e&&(this.value=e.value)}get value(){var e=this.type,t=this.key;if(e&&t)return vr.types[e]&&vr.types[e][t]}set value(e){var t=this.type,i=this.key;t&&i&&(t=vr.types[t]=vr.types[t]||{},null==e?delete t[i]:t[i]=e)}get list(){if(this.type){var e=vr.types[this.type];return e?Object.keys(e).map((function(e){return wr[this.type][e]}),this):[]}}byKey(e){return this.key=e,this.value}}vr[" "]=function(){},vr.types={};var wr=vr.types;Ss({is:"iron-meta",properties:{type:{type:String,value:"default"},key:{type:String},value:{type:String,notify:!0},self:{type:Boolean,observer:"_selfChanged"},__meta:{type:Boolean,computed:"__computeMeta(type, key, value)"}},hostAttributes:{hidden:!0},__computeMeta:function(e,t,i){var n=new vr({type:e,key:t});return void 0!==i&&i!==n.value?n.value=i:this.value!==n.value&&(this.value=n.value),n},get list(){return this.__meta&&this.__meta.list},_selfChanged:function(e){e&&(this.value=this)},byKey:function(e){return new vr({type:this.type,key:e}).value}}),
|
|
839
830
|
/**
|
|
840
831
|
@license
|
|
841
832
|
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
|
@@ -846,7 +837,7 @@ found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
|
|
|
846
837
|
part of the polymer project is also subject to an additional IP rights grant
|
|
847
838
|
found at http://polymer.github.io/PATENTS.txt
|
|
848
839
|
*/
|
|
849
|
-
|
|
840
|
+
Ss({_template:ir`
|
|
850
841
|
<style>
|
|
851
842
|
:host {
|
|
852
843
|
@apply --layout-inline;
|
|
@@ -867,7 +858,7 @@ xs({_template:Qs`
|
|
|
867
858
|
display: none;
|
|
868
859
|
}
|
|
869
860
|
</style>
|
|
870
|
-
`,is:"iron-icon",properties:{icon:{type:String},theme:{type:String},src:{type:String},_meta:{value:
|
|
861
|
+
`,is:"iron-icon",properties:{icon:{type:String},theme:{type:String},src:{type:String},_meta:{value:yr.create("iron-meta",{type:"iconset"})}},observers:["_updateIcon(_meta, isAttached)","_updateIcon(theme, isAttached)","_srcChanged(src, isAttached)","_iconChanged(icon, isAttached)"],_DEFAULT_ICONSET:"icons",_iconChanged:function(e){var t=(e||"").split(":");this._iconName=t.pop(),this._iconsetName=t.pop()||this._DEFAULT_ICONSET,this._updateIcon()},_srcChanged:function(e){this._updateIcon()},_usesIconset:function(){return this.icon||!this.src},_updateIcon:function(){this._usesIconset()?(this._img&&this._img.parentNode&&is(this.root).removeChild(this._img),""===this._iconName?this._iconset&&this._iconset.removeIcon(this):this._iconsetName&&this._meta&&(this._iconset=this._meta.byKey(this._iconsetName),this._iconset?(this._iconset.applyIcon(this,this._iconName,this.theme),this.unlisten(window,"iron-iconset-added","_updateIcon")):this.listen(window,"iron-iconset-added","_updateIcon"))):(this._iconset&&this._iconset.removeIcon(this),this._img||(this._img=document.createElement("img"),this._img.style.width="100%",this._img.style.height="100%",this._img.draggable=!1),this._img.src=this.src,is(this.root).appendChild(this._img))}});
|
|
871
862
|
/**
|
|
872
863
|
@license
|
|
873
864
|
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
|
@@ -878,7 +869,7 @@ found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
|
|
|
878
869
|
part of the polymer project is also subject to an additional IP rights grant
|
|
879
870
|
found at http://polymer.github.io/PATENTS.txt
|
|
880
871
|
*/
|
|
881
|
-
const
|
|
872
|
+
const xr=ir`
|
|
882
873
|
<custom-style>
|
|
883
874
|
<style is="custom-style">
|
|
884
875
|
html {
|
|
@@ -942,7 +933,7 @@ const gr=Qs`
|
|
|
942
933
|
};
|
|
943
934
|
}
|
|
944
935
|
</style>
|
|
945
|
-
</custom-style>`;
|
|
936
|
+
</custom-style>`;xr.setAttribute("style","display: none;"),document.head.appendChild(xr.content);
|
|
946
937
|
/**
|
|
947
938
|
@license
|
|
948
939
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -953,7 +944,7 @@ found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
|
|
|
953
944
|
part of the polymer project is also subject to an additional IP rights grant
|
|
954
945
|
found at http://polymer.github.io/PATENTS.txt
|
|
955
946
|
*/
|
|
956
|
-
const
|
|
947
|
+
const Cr=ir`
|
|
957
948
|
<dom-module id="paper-material-styles">
|
|
958
949
|
<template>
|
|
959
950
|
<style>
|
|
@@ -1039,7 +1030,7 @@ const br=Qs`
|
|
|
1039
1030
|
}
|
|
1040
1031
|
</style>
|
|
1041
1032
|
</template>
|
|
1042
|
-
</dom-module>`;
|
|
1033
|
+
</dom-module>`;Cr.setAttribute("style","display: none;"),document.head.appendChild(Cr.content);
|
|
1043
1034
|
/**
|
|
1044
1035
|
@license
|
|
1045
1036
|
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
|
@@ -1050,7 +1041,7 @@ found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
|
|
|
1050
1041
|
part of the polymer project is also subject to an additional IP rights grant
|
|
1051
1042
|
found at http://polymer.github.io/PATENTS.txt
|
|
1052
1043
|
*/
|
|
1053
|
-
const
|
|
1044
|
+
const Sr=ir`
|
|
1054
1045
|
<custom-style>
|
|
1055
1046
|
<style is="custom-style">
|
|
1056
1047
|
html {
|
|
@@ -1373,7 +1364,7 @@ const vr=Qs`
|
|
|
1373
1364
|
|
|
1374
1365
|
</style>
|
|
1375
1366
|
</custom-style>
|
|
1376
|
-
`;
|
|
1367
|
+
`;Sr.setAttribute("style","display: none;"),document.head.appendChild(Sr.content);
|
|
1377
1368
|
/**
|
|
1378
1369
|
@license
|
|
1379
1370
|
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
|
@@ -1384,7 +1375,7 @@ found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
|
|
|
1384
1375
|
part of the polymer project is also subject to an additional IP rights grant
|
|
1385
1376
|
found at http://polymer.github.io/PATENTS.txt
|
|
1386
1377
|
*/
|
|
1387
|
-
const
|
|
1378
|
+
const Ar=ir`
|
|
1388
1379
|
<custom-style>
|
|
1389
1380
|
<style is="custom-style">
|
|
1390
1381
|
html {
|
|
@@ -1440,7 +1431,7 @@ const wr=Qs`
|
|
|
1440
1431
|
--default-primary-color: var(--primary-color);
|
|
1441
1432
|
}
|
|
1442
1433
|
</style>
|
|
1443
|
-
</custom-style>`;
|
|
1434
|
+
</custom-style>`;Ar.setAttribute("style","display: none;"),document.head.appendChild(Ar.content);
|
|
1444
1435
|
/**
|
|
1445
1436
|
@license
|
|
1446
1437
|
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
|
@@ -1451,7 +1442,7 @@ found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
|
|
|
1451
1442
|
part of the polymer project is also subject to an additional IP rights grant
|
|
1452
1443
|
found at http://polymer.github.io/PATENTS.txt
|
|
1453
1444
|
*/
|
|
1454
|
-
const
|
|
1445
|
+
const kr={properties:{focused:{type:Boolean,value:!1,notify:!0,readOnly:!0,reflectToAttribute:!0},disabled:{type:Boolean,value:!1,notify:!0,observer:"_disabledChanged",reflectToAttribute:!0},_oldTabIndex:{type:String},_boundFocusBlurHandler:{type:Function,value:function(){return this._focusBlurHandler.bind(this)}}},observers:["_changedControlState(focused, disabled)"],ready:function(){this.addEventListener("focus",this._boundFocusBlurHandler,!0),this.addEventListener("blur",this._boundFocusBlurHandler,!0)},_focusBlurHandler:function(e){this._setFocused("focus"===e.type)},_disabledChanged:function(e,t){this.setAttribute("aria-disabled",e?"true":"false"),this.style.pointerEvents=e?"none":"",e?(this._oldTabIndex=this.getAttribute("tabindex"),this._setFocused(!1),this.tabIndex=-1,this.blur()):void 0!==this._oldTabIndex&&(null===this._oldTabIndex?this.removeAttribute("tabindex"):this.setAttribute("tabindex",this._oldTabIndex))},_changedControlState:function(){this._controlStateChanged&&this._controlStateChanged()}};
|
|
1455
1446
|
/**
|
|
1456
1447
|
@license
|
|
1457
1448
|
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
|
@@ -1461,7 +1452,7 @@ http://polymer.github.io/AUTHORS.txt The complete set of contributors may be
|
|
|
1461
1452
|
found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
|
|
1462
1453
|
part of the polymer project is also subject to an additional IP rights grant
|
|
1463
1454
|
found at http://polymer.github.io/PATENTS.txt
|
|
1464
|
-
*/var
|
|
1455
|
+
*/var Er={"U+0008":"backspace","U+0009":"tab","U+001B":"esc","U+0020":"space","U+007F":"del"},Pr={8:"backspace",9:"tab",13:"enter",27:"esc",33:"pageup",34:"pagedown",35:"end",36:"home",32:"space",37:"left",38:"up",39:"right",40:"down",46:"del",106:"*"},Or={shift:"shiftKey",ctrl:"ctrlKey",alt:"altKey",meta:"metaKey"},Tr=/[a-z0-9*]/,Ir=/U\+/,Nr=/^arrow/,Rr=/^space(bar)?/,Mr=/^escape$/;function zr(e,t){var i="";if(e){var n=e.toLowerCase();" "===n||Rr.test(n)?i="space":Mr.test(n)?i="esc":1==n.length?t&&!Tr.test(n)||(i=n):i=Nr.test(n)?n.replace("arrow",""):"multiply"==n?"*":n}return i}function Fr(e){var t="";return e&&(e in Er?t=Er[e]:Ir.test(e)?(e=parseInt(e.replace("U+","0x"),16),t=String.fromCharCode(e).toLowerCase()):t=e.toLowerCase()),t}function Dr(e){var t="";return Number(e)&&(t=e>=65&&e<=90?String.fromCharCode(32+e):e>=112&&e<=123?"f"+(e-112+1):e>=48&&e<=57?String(e-48):e>=96&&e<=105?String(e-96):Pr[e]),t}function Lr(e,t){return e.key?zr(e.key,t):e.detail&&e.detail.key?zr(e.detail.key,t):Fr(e.keyIdentifier)||Dr(e.keyCode)||""}function Br(e,t){return Lr(t,e.hasModifiers)===e.key&&(!e.hasModifiers||!!t.shiftKey==!!e.shiftKey&&!!t.ctrlKey==!!e.ctrlKey&&!!t.altKey==!!e.altKey&&!!t.metaKey==!!e.metaKey)}function Hr(e){return 1===e.length?{combo:e,key:e,event:"keydown"}:e.split("+").reduce((function(e,t){var i=t.split(":"),n=i[0],o=i[1];return n in Or?(e[Or[n]]=!0,e.hasModifiers=!0):(e.key=n,e.event=o||"keydown"),e}),{combo:e.split(":").shift()})}function jr(e){return e.trim().split(" ").map((function(e){return Hr(e)}))}const qr={properties:{keyEventTarget:{type:Object,value:function(){return this}},stopKeyboardEventPropagation:{type:Boolean,value:!1},_boundKeyHandlers:{type:Array,value:function(){return[]}},_imperativeKeyBindings:{type:Object,value:function(){return{}}}},observers:["_resetKeyEventListeners(keyEventTarget, _boundKeyHandlers)"],keyBindings:{},registered:function(){this._prepKeyBindings()},attached:function(){this._listenKeyEventListeners()},detached:function(){this._unlistenKeyEventListeners()},addOwnKeyBinding:function(e,t){this._imperativeKeyBindings[e]=t,this._prepKeyBindings(),this._resetKeyEventListeners()},removeOwnKeyBindings:function(){this._imperativeKeyBindings={},this._prepKeyBindings(),this._resetKeyEventListeners()},keyboardEventMatchesKeys:function(e,t){for(var i=jr(t),n=0;n<i.length;++n)if(Br(i[n],e))return!0;return!1},_collectKeyBindings:function(){var e=this.behaviors.map((function(e){return e.keyBindings}));return-1===e.indexOf(this.keyBindings)&&e.push(this.keyBindings),e},_prepKeyBindings:function(){for(var e in this._keyBindings={},this._collectKeyBindings().forEach((function(e){for(var t in e)this._addKeyBinding(t,e[t])}),this),this._imperativeKeyBindings)this._addKeyBinding(e,this._imperativeKeyBindings[e]);for(var t in this._keyBindings)this._keyBindings[t].sort((function(e,t){var i=e[0].hasModifiers;return i===t[0].hasModifiers?0:i?-1:1}))},_addKeyBinding:function(e,t){jr(e).forEach((function(e){this._keyBindings[e.event]=this._keyBindings[e.event]||[],this._keyBindings[e.event].push([e,t])}),this)},_resetKeyEventListeners:function(){this._unlistenKeyEventListeners(),this.isAttached&&this._listenKeyEventListeners()},_listenKeyEventListeners:function(){this.keyEventTarget&&Object.keys(this._keyBindings).forEach((function(e){var t=this._keyBindings[e],i=this._onKeyBindingEvent.bind(this,t);this._boundKeyHandlers.push([this.keyEventTarget,e,i]),this.keyEventTarget.addEventListener(e,i)}),this)},_unlistenKeyEventListeners:function(){for(var e,t,i,n;this._boundKeyHandlers.length;)t=(e=this._boundKeyHandlers.pop())[0],i=e[1],n=e[2],t.removeEventListener(i,n)},_onKeyBindingEvent:function(e,t){if(this.stopKeyboardEventPropagation&&t.stopPropagation(),!t.defaultPrevented)for(var i=0;i<e.length;i++){var n=e[i][0],o=e[i][1];if(Br(n,t)&&(this._triggerKeyHandler(n,o,t),t.defaultPrevented))return}},_triggerKeyHandler:function(e,t,i){var n=Object.create(e);n.keyboardEvent=i;var o=new CustomEvent(e.event,{detail:n,cancelable:!0});this[t].call(this,o),o.defaultPrevented&&i.preventDefault()}},Vr={properties:{pressed:{type:Boolean,readOnly:!0,value:!1,reflectToAttribute:!0,observer:"_pressedChanged"},toggles:{type:Boolean,value:!1,reflectToAttribute:!0},active:{type:Boolean,value:!1,notify:!0,reflectToAttribute:!0},pointerDown:{type:Boolean,readOnly:!0,value:!1},receivedFocusFromKeyboard:{type:Boolean,readOnly:!0},ariaActiveAttribute:{type:String,value:"aria-pressed",observer:"_ariaActiveAttributeChanged"}},listeners:{down:"_downHandler",up:"_upHandler",tap:"_tapHandler"},observers:["_focusChanged(focused)","_activeChanged(active, ariaActiveAttribute)"],keyBindings:{"enter:keydown":"_asyncClick","space:keydown":"_spaceKeyDownHandler","space:keyup":"_spaceKeyUpHandler"},_mouseEventRe:/^mouse/,_tapHandler:function(){this.toggles?this._userActivate(!this.active):this.active=!1},_focusChanged:function(e){this._detectKeyboardFocus(e),e||this._setPressed(!1)},_detectKeyboardFocus:function(e){this._setReceivedFocusFromKeyboard(!this.pointerDown&&e)},_userActivate:function(e){this.active!==e&&(this.active=e,this.fire("change"))},_downHandler:function(e){this._setPointerDown(!0),this._setPressed(!0),this._setReceivedFocusFromKeyboard(!1)},_upHandler:function(){this._setPointerDown(!1),this._setPressed(!1)},_spaceKeyDownHandler:function(e){var t=e.detail.keyboardEvent,i=is(t).localTarget;this.isLightDescendant(i)||(t.preventDefault(),t.stopImmediatePropagation(),this._setPressed(!0))},_spaceKeyUpHandler:function(e){var t=e.detail.keyboardEvent,i=is(t).localTarget;this.isLightDescendant(i)||(this.pressed&&this._asyncClick(),this._setPressed(!1))},_asyncClick:function(){this.async((function(){this.click()}),1)},_pressedChanged:function(e){this._changedButtonState()},_ariaActiveAttributeChanged:function(e,t){t&&t!=e&&this.hasAttribute(t)&&this.removeAttribute(t)},_activeChanged:function(e,t){this.toggles?this.setAttribute(this.ariaActiveAttribute,e?"true":"false"):this.removeAttribute(this.ariaActiveAttribute),this._changedButtonState()},_controlStateChanged:function(){this.disabled?this._setPressed(!1):this._changedButtonState()},_changedButtonState:function(){this._buttonStateChanged&&this._buttonStateChanged()}},$r=[qr,Vr];
|
|
1465
1456
|
/**
|
|
1466
1457
|
@license
|
|
1467
1458
|
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
|
@@ -1482,7 +1473,7 @@ found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
|
|
|
1482
1473
|
part of the polymer project is also subject to an additional IP rights grant
|
|
1483
1474
|
found at http://polymer.github.io/PATENTS.txt
|
|
1484
1475
|
*/
|
|
1485
|
-
var
|
|
1476
|
+
var Ur={distance:function(e,t,i,n){var o=e-i,s=t-n;return Math.sqrt(o*o+s*s)},now:window.performance&&window.performance.now?window.performance.now.bind(window.performance):Date.now};function Kr(e){this.element=e,this.width=this.boundingRect.width,this.height=this.boundingRect.height,this.size=Math.max(this.width,this.height)}function Yr(e){this.element=e,this.color=window.getComputedStyle(e).color,this.wave=document.createElement("div"),this.waveContainer=document.createElement("div"),this.wave.style.backgroundColor=this.color,this.wave.classList.add("wave"),this.waveContainer.classList.add("wave-container"),is(this.waveContainer).appendChild(this.wave),this.resetInteractionState()}Kr.prototype={get boundingRect(){return this.element.getBoundingClientRect()},furthestCornerDistanceFrom:function(e,t){var i=Ur.distance(e,t,0,0),n=Ur.distance(e,t,this.width,0),o=Ur.distance(e,t,0,this.height),s=Ur.distance(e,t,this.width,this.height);return Math.max(i,n,o,s)}},Yr.MAX_RADIUS=300,Yr.prototype={get recenters(){return this.element.recenters},get center(){return this.element.center},get mouseDownElapsed(){var e;return this.mouseDownStart?(e=Ur.now()-this.mouseDownStart,this.mouseUpStart&&(e-=this.mouseUpElapsed),e):0},get mouseUpElapsed(){return this.mouseUpStart?Ur.now()-this.mouseUpStart:0},get mouseDownElapsedSeconds(){return this.mouseDownElapsed/1e3},get mouseUpElapsedSeconds(){return this.mouseUpElapsed/1e3},get mouseInteractionSeconds(){return this.mouseDownElapsedSeconds+this.mouseUpElapsedSeconds},get initialOpacity(){return this.element.initialOpacity},get opacityDecayVelocity(){return this.element.opacityDecayVelocity},get radius(){var e=this.containerMetrics.width*this.containerMetrics.width,t=this.containerMetrics.height*this.containerMetrics.height,i=1.1*Math.min(Math.sqrt(e+t),Yr.MAX_RADIUS)+5,n=1.1-i/Yr.MAX_RADIUS*.2,o=this.mouseInteractionSeconds/n,s=i*(1-Math.pow(80,-o));return Math.abs(s)},get opacity(){return this.mouseUpStart?Math.max(0,this.initialOpacity-this.mouseUpElapsedSeconds*this.opacityDecayVelocity):this.initialOpacity},get outerOpacity(){var e=.3*this.mouseUpElapsedSeconds,t=this.opacity;return Math.max(0,Math.min(e,t))},get isOpacityFullyDecayed(){return this.opacity<.01&&this.radius>=Math.min(this.maxRadius,Yr.MAX_RADIUS)},get isRestingAtMaxRadius(){return this.opacity>=this.initialOpacity&&this.radius>=Math.min(this.maxRadius,Yr.MAX_RADIUS)},get isAnimationComplete(){return this.mouseUpStart?this.isOpacityFullyDecayed:this.isRestingAtMaxRadius},get translationFraction(){return Math.min(1,this.radius/this.containerMetrics.size*2/Math.sqrt(2))},get xNow(){return this.xEnd?this.xStart+this.translationFraction*(this.xEnd-this.xStart):this.xStart},get yNow(){return this.yEnd?this.yStart+this.translationFraction*(this.yEnd-this.yStart):this.yStart},get isMouseDown(){return this.mouseDownStart&&!this.mouseUpStart},resetInteractionState:function(){this.maxRadius=0,this.mouseDownStart=0,this.mouseUpStart=0,this.xStart=0,this.yStart=0,this.xEnd=0,this.yEnd=0,this.slideDistance=0,this.containerMetrics=new Kr(this.element)},draw:function(){var e,t,i;this.wave.style.opacity=this.opacity,e=this.radius/(this.containerMetrics.size/2),t=this.xNow-this.containerMetrics.width/2,i=this.yNow-this.containerMetrics.height/2,this.waveContainer.style.webkitTransform="translate("+t+"px, "+i+"px)",this.waveContainer.style.transform="translate3d("+t+"px, "+i+"px, 0)",this.wave.style.webkitTransform="scale("+e+","+e+")",this.wave.style.transform="scale3d("+e+","+e+",1)"},downAction:function(e){var t=this.containerMetrics.width/2,i=this.containerMetrics.height/2;this.resetInteractionState(),this.mouseDownStart=Ur.now(),this.center?(this.xStart=t,this.yStart=i,this.slideDistance=Ur.distance(this.xStart,this.yStart,this.xEnd,this.yEnd)):(this.xStart=e?e.detail.x-this.containerMetrics.boundingRect.left:this.containerMetrics.width/2,this.yStart=e?e.detail.y-this.containerMetrics.boundingRect.top:this.containerMetrics.height/2),this.recenters&&(this.xEnd=t,this.yEnd=i,this.slideDistance=Ur.distance(this.xStart,this.yStart,this.xEnd,this.yEnd)),this.maxRadius=this.containerMetrics.furthestCornerDistanceFrom(this.xStart,this.yStart),this.waveContainer.style.top=(this.containerMetrics.height-this.containerMetrics.size)/2+"px",this.waveContainer.style.left=(this.containerMetrics.width-this.containerMetrics.size)/2+"px",this.waveContainer.style.width=this.containerMetrics.size+"px",this.waveContainer.style.height=this.containerMetrics.size+"px"},upAction:function(e){this.isMouseDown&&(this.mouseUpStart=Ur.now())},remove:function(){is(is(this.waveContainer).parentNode).removeChild(this.waveContainer)}},Ss({_template:ir`
|
|
1486
1477
|
<style>
|
|
1487
1478
|
:host {
|
|
1488
1479
|
display: block;
|
|
@@ -1552,7 +1543,7 @@ var jr={distance:function(e,t,i,n){var o=e-i,s=t-n;return Math.sqrt(o*o+s*s)},no
|
|
|
1552
1543
|
|
|
1553
1544
|
<div id="background"></div>
|
|
1554
1545
|
<div id="waves"></div>
|
|
1555
|
-
`,is:"paper-ripple",behaviors:[
|
|
1546
|
+
`,is:"paper-ripple",behaviors:[qr],properties:{initialOpacity:{type:Number,value:.25},opacityDecayVelocity:{type:Number,value:.8},recenters:{type:Boolean,value:!1},center:{type:Boolean,value:!1},ripples:{type:Array,value:function(){return[]}},animating:{type:Boolean,readOnly:!0,reflectToAttribute:!0,value:!1},holdDown:{type:Boolean,value:!1,observer:"_holdDownChanged"},noink:{type:Boolean,value:!1},_animating:{type:Boolean},_boundAnimate:{type:Function,value:function(){return this.animate.bind(this)}}},get target(){return this.keyEventTarget},keyBindings:{"enter:keydown":"_onEnterKeydown","space:keydown":"_onSpaceKeydown","space:keyup":"_onSpaceKeyup"},attached:function(){11==is(this).parentNode.nodeType?this.keyEventTarget=is(this).getOwnerRoot().host:this.keyEventTarget=is(this).parentNode;var e=this.keyEventTarget;this.listen(e,"up","uiUpAction"),this.listen(e,"down","uiDownAction")},detached:function(){this.unlisten(this.keyEventTarget,"up","uiUpAction"),this.unlisten(this.keyEventTarget,"down","uiDownAction"),this.keyEventTarget=null},get shouldKeepAnimating(){for(var e=0;e<this.ripples.length;++e)if(!this.ripples[e].isAnimationComplete)return!0;return!1},simulatedRipple:function(){this.downAction(null),this.async((function(){this.upAction()}),1)},uiDownAction:function(e){this.noink||this.downAction(e)},downAction:function(e){this.holdDown&&this.ripples.length>0||(this.addRipple().downAction(e),this._animating||(this._animating=!0,this.animate()))},uiUpAction:function(e){this.noink||this.upAction(e)},upAction:function(e){this.holdDown||(this.ripples.forEach((function(t){t.upAction(e)})),this._animating=!0,this.animate())},onAnimationComplete:function(){this._animating=!1,this.$.background.style.backgroundColor="",this.fire("transitionend")},addRipple:function(){var e=new Yr(this);return is(this.$.waves).appendChild(e.waveContainer),this.$.background.style.backgroundColor=e.color,this.ripples.push(e),this._setAnimating(!0),e},removeRipple:function(e){var t=this.ripples.indexOf(e);t<0||(this.ripples.splice(t,1),e.remove(),this.ripples.length||this._setAnimating(!1))},animate:function(){if(this._animating){var e,t;for(e=0;e<this.ripples.length;++e)(t=this.ripples[e]).draw(),this.$.background.style.opacity=t.outerOpacity,t.isOpacityFullyDecayed&&!t.isRestingAtMaxRadius&&this.removeRipple(t);this.shouldKeepAnimating||0!==this.ripples.length?window.requestAnimationFrame(this._boundAnimate):this.onAnimationComplete()}},animateRipple:function(){return this.animate()},_onEnterKeydown:function(){this.uiDownAction(),this.async(this.uiUpAction,1)},_onSpaceKeydown:function(){this.uiDownAction()},_onSpaceKeyup:function(){this.uiUpAction()},_holdDownChanged:function(e,t){void 0!==t&&(e?this.downAction():this.upAction())}});
|
|
1556
1547
|
/**
|
|
1557
1548
|
@license
|
|
1558
1549
|
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
|
@@ -1563,7 +1554,7 @@ found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
|
|
|
1563
1554
|
part of the polymer project is also subject to an additional IP rights grant
|
|
1564
1555
|
found at http://polymer.github.io/PATENTS.txt
|
|
1565
1556
|
*/
|
|
1566
|
-
const
|
|
1557
|
+
const Wr={properties:{noink:{type:Boolean,observer:"_noinkChanged"},_rippleContainer:{type:Object}},_buttonStateChanged:function(){this.focused&&this.ensureRipple()},_downHandler:function(e){Vr._downHandler.call(this,e),this.pressed&&this.ensureRipple(e)},ensureRipple:function(e){if(!this.hasRipple()){this._ripple=this._createRipple(),this._ripple.noink=this.noink;var t=this._rippleContainer||this.root;if(t&&is(t).appendChild(this._ripple),e){var i=is(this._rippleContainer||this),n=is(e).rootTarget;i.deepContains(n)&&this._ripple.uiDownAction(e)}}},getRipple:function(){return this.ensureRipple(),this._ripple},hasRipple:function(){return Boolean(this._ripple)},_createRipple:function(){return document.createElement("paper-ripple")},_noinkChanged:function(e){this.hasRipple()&&(this._ripple.noink=e)}},Jr={properties:{elevation:{type:Number,reflectToAttribute:!0,readOnly:!0}},observers:["_calculateElevation(focused, disabled, active, pressed, receivedFocusFromKeyboard)","_computeKeyboardClass(receivedFocusFromKeyboard)"],hostAttributes:{role:"button",tabindex:"0",animated:!0},_calculateElevation:function(){var e=1;this.disabled?e=0:this.active||this.pressed?e=4:this.receivedFocusFromKeyboard&&(e=3),this._setElevation(e)},_computeKeyboardClass:function(e){this.toggleClass("keyboard-focus",e)},_spaceKeyDownHandler:function(e){Vr._spaceKeyDownHandler.call(this,e),this.hasRipple()&&this.getRipple().ripples.length<1&&this._ripple.uiDownAction()},_spaceKeyUpHandler:function(e){Vr._spaceKeyUpHandler.call(this,e),this.hasRipple()&&this._ripple.uiUpAction()}},Xr=[$r,kr,Wr,Jr];
|
|
1567
1558
|
/**
|
|
1568
1559
|
@license
|
|
1569
1560
|
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
|
@@ -1584,7 +1575,7 @@ found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
|
|
|
1584
1575
|
part of the polymer project is also subject to an additional IP rights grant
|
|
1585
1576
|
found at http://polymer.github.io/PATENTS.txt
|
|
1586
1577
|
*/
|
|
1587
|
-
|
|
1578
|
+
Ss({is:"iron-iconset-svg",properties:{name:{type:String,observer:"_nameChanged"},size:{type:Number,value:24},rtlMirroring:{type:Boolean,value:!1},useGlobalRtlAttribute:{type:Boolean,value:!1}},created:function(){this._meta=new vr({type:"iconset",key:null,value:null})},attached:function(){this.style.display="none"},getIconNames:function(){return this._icons=this._createIconMap(),Object.keys(this._icons).map((function(e){return this.name+":"+e}),this)},applyIcon:function(e,t){this.removeIcon(e);var i=this._cloneIcon(t,this.rtlMirroring&&this._targetIsRTL(e));if(i){var n=is(e.root||e);return n.insertBefore(i,n.childNodes[0]),e._svgIcon=i}return null},removeIcon:function(e){e._svgIcon&&(is(e.root||e).removeChild(e._svgIcon),e._svgIcon=null)},_targetIsRTL:function(e){if(null==this.__targetIsRTL)if(this.useGlobalRtlAttribute){var t=document.body&&document.body.hasAttribute("dir")?document.body:document.documentElement;this.__targetIsRTL="rtl"===t.getAttribute("dir")}else e&&e.nodeType!==Node.ELEMENT_NODE&&(e=e.host),this.__targetIsRTL=e&&"rtl"===window.getComputedStyle(e).direction;return this.__targetIsRTL},_nameChanged:function(){this._meta.value=null,this._meta.key=this.name,this._meta.value=this,this.async((function(){this.fire("iron-iconset-added",this,{node:window})}))},_createIconMap:function(){var e=Object.create(null);return is(this).querySelectorAll("[id]").forEach((function(t){e[t.id]=t})),e},_cloneIcon:function(e,t){return this._icons=this._icons||this._createIconMap(),this._prepareSvgClone(this._icons[e],this.size,t)},_prepareSvgClone:function(e,t,i){if(e){var n=e.cloneNode(!0),o=document.createElementNS("http://www.w3.org/2000/svg","svg"),s=n.getAttribute("viewBox")||"0 0 "+t+" "+t,r="pointer-events: none; display: block; width: 100%; height: 100%;";return i&&n.hasAttribute("mirror-in-rtl")&&(r+="-webkit-transform:scale(-1,1);transform:scale(-1,1);transform-origin:center;"),o.setAttribute("viewBox",s),o.setAttribute("preserveAspectRatio","xMidYMid meet"),o.setAttribute("focusable","false"),o.style.cssText=r,o.appendChild(n).removeAttribute("id"),o}return null}});
|
|
1588
1579
|
/**
|
|
1589
1580
|
@license
|
|
1590
1581
|
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
|
@@ -1595,7 +1586,7 @@ found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
|
|
|
1595
1586
|
part of the polymer project is also subject to an additional IP rights grant
|
|
1596
1587
|
found at http://polymer.github.io/PATENTS.txt
|
|
1597
1588
|
*/
|
|
1598
|
-
var
|
|
1589
|
+
var Zr=new Set;const Gr={properties:{_parentResizable:{type:Object,observer:"_parentResizableChanged"},_notifyingDescendant:{type:Boolean,value:!1}},listeners:{"iron-request-resize-notifications":"_onIronRequestResizeNotifications"},created:function(){this._interestedResizables=[],this._boundNotifyResize=this.notifyResize.bind(this),this._boundOnDescendantIronResize=this._onDescendantIronResize.bind(this)},attached:function(){this._requestResizeNotifications()},detached:function(){this._parentResizable?this._parentResizable.stopResizeNotificationsFor(this):(Zr.delete(this),window.removeEventListener("resize",this._boundNotifyResize)),this._parentResizable=null},notifyResize:function(){this.isAttached&&(this._interestedResizables.forEach((function(e){this.resizerShouldNotify(e)&&this._notifyDescendant(e)}),this),this._fireResize())},assignParentResizable:function(e){this._parentResizable&&this._parentResizable.stopResizeNotificationsFor(this),this._parentResizable=e,e&&-1===e._interestedResizables.indexOf(this)&&(e._interestedResizables.push(this),e._subscribeIronResize(this))},stopResizeNotificationsFor:function(e){var t=this._interestedResizables.indexOf(e);t>-1&&(this._interestedResizables.splice(t,1),this._unsubscribeIronResize(e))},_subscribeIronResize:function(e){e.addEventListener("iron-resize",this._boundOnDescendantIronResize)},_unsubscribeIronResize:function(e){e.removeEventListener("iron-resize",this._boundOnDescendantIronResize)},resizerShouldNotify:function(e){return!0},_onDescendantIronResize:function(e){this._notifyingDescendant?e.stopPropagation():Ee||this._fireResize()},_fireResize:function(){this.fire("iron-resize",null,{node:this,bubbles:!1})},_onIronRequestResizeNotifications:function(e){var t=is(e).rootTarget;t!==this&&(t.assignParentResizable(this),this._notifyDescendant(t),e.stopPropagation())},_parentResizableChanged:function(e){e&&window.removeEventListener("resize",this._boundNotifyResize)},_notifyDescendant:function(e){this.isAttached&&(this._notifyingDescendant=!0,e.notifyResize(),this._notifyingDescendant=!1)},_requestResizeNotifications:function(){if(this.isAttached)if("loading"===document.readyState){var e=this._requestResizeNotifications.bind(this);document.addEventListener("readystatechange",(function t(){document.removeEventListener("readystatechange",t),e()}))}else this._findParent(),this._parentResizable?this._parentResizable._interestedResizables.forEach((function(e){e!==this&&e._findParent()}),this):(Zr.forEach((function(e){e!==this&&e._findParent()}),this),window.addEventListener("resize",this._boundNotifyResize),this.notifyResize())},_findParent:function(){this.assignParentResizable(null),this.fire("iron-request-resize-notifications",null,{node:this,bubbles:!0,cancelable:!0}),this._parentResizable?Zr.delete(this):Zr.add(this)}};
|
|
1599
1590
|
/**
|
|
1600
1591
|
@license
|
|
1601
1592
|
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
|
@@ -1616,7 +1607,7 @@ found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
|
|
|
1616
1607
|
part of the polymer project is also subject to an additional IP rights grant
|
|
1617
1608
|
found at http://polymer.github.io/PATENTS.txt
|
|
1618
1609
|
*/
|
|
1619
|
-
if(
|
|
1610
|
+
if(Ss({is:"iron-request",hostAttributes:{hidden:!0},properties:{xhr:{type:Object,notify:!0,readOnly:!0,value:function(){return new XMLHttpRequest}},response:{type:Object,notify:!0,readOnly:!0,value:function(){return null}},status:{type:Number,notify:!0,readOnly:!0,value:0},statusText:{type:String,notify:!0,readOnly:!0,value:""},completes:{type:Object,readOnly:!0,notify:!0,value:function(){return new Promise(function(e,t){this.resolveCompletes=e,this.rejectCompletes=t}.bind(this))}},progress:{type:Object,notify:!0,readOnly:!0,value:function(){return{}}},aborted:{type:Boolean,notify:!0,readOnly:!0,value:!1},errored:{type:Boolean,notify:!0,readOnly:!0,value:!1},timedOut:{type:Boolean,notify:!0,readOnly:!0,value:!1}},get succeeded(){if(this.errored||this.aborted||this.timedOut)return!1;var e=this.xhr.status||0;return 0===e||e>=200&&e<300},send:function(e){var t=this.xhr;if(t.readyState>0)return null;t.addEventListener("progress",function(e){this._setProgress({lengthComputable:e.lengthComputable,loaded:e.loaded,total:e.total}),this.fire("iron-request-progress-changed",{value:this.progress})}.bind(this)),t.addEventListener("error",function(t){this._setErrored(!0),this._updateStatus();var i=e.rejectWithRequest?{error:t,request:this}:t;this.rejectCompletes(i)}.bind(this)),t.addEventListener("timeout",function(t){this._setTimedOut(!0),this._updateStatus();var i=e.rejectWithRequest?{error:t,request:this}:t;this.rejectCompletes(i)}.bind(this)),t.addEventListener("abort",function(){this._setAborted(!0),this._updateStatus();var t=new Error("Request aborted."),i=e.rejectWithRequest?{error:t,request:this}:t;this.rejectCompletes(i)}.bind(this)),t.addEventListener("loadend",function(){if(this._updateStatus(),this._setResponse(this.parseResponse()),this.succeeded)this.resolveCompletes(this);else{var t=new Error("The request failed with status code: "+this.xhr.status),i=e.rejectWithRequest?{error:t,request:this}:t;this.rejectCompletes(i)}}.bind(this)),this.url=e.url;var i=!1!==e.async;t.open(e.method||"GET",e.url,i);var n={json:"application/json",text:"text/plain",html:"text/html",xml:"application/xml",arraybuffer:"application/octet-stream"}[e.handleAs],o=e.headers||Object.create(null),s=Object.create(null);for(var r in o)s[r.toLowerCase()]=o[r];if(o=s,n&&!o.accept&&(o.accept=n),Object.keys(o).forEach((function(e){/[A-Z]/.test(e)&&yr._error("Headers must be lower case, got",e),t.setRequestHeader(e,o[e])}),this),i){t.timeout=e.timeout;var a=e.handleAs;!e.jsonPrefix&&a||(a="text"),t.responseType=t._responseType=a,e.jsonPrefix&&(t._jsonPrefix=e.jsonPrefix)}t.withCredentials=!!e.withCredentials;var l=this._encodeBodyObject(e.body,o["content-type"]);return t.send(l),this.completes},parseResponse:function(){var e=this.xhr,t=e.responseType||e._responseType,i=!this.xhr.responseType,n=e._jsonPrefix&&e._jsonPrefix.length||0;try{switch(t){case"json":if(i||void 0===e.response)try{return JSON.parse(e.responseText)}catch(t){return console.warn("Failed to parse JSON sent from "+e.responseURL),null}return e.response;case"xml":return e.responseXML;case"blob":case"document":case"arraybuffer":return e.response;case"text":default:if(n)try{return JSON.parse(e.responseText.substring(n))}catch(t){return console.warn("Failed to parse JSON sent from "+e.responseURL),null}return e.responseText}}catch(e){this.rejectCompletes(new Error("Could not parse response. "+e.message))}},abort:function(){this._setAborted(!0),this.xhr.abort()},_encodeBodyObject:function(e,t){if("string"==typeof e)return e;var i=e;switch(t){case"application/json":return JSON.stringify(i);case"application/x-www-form-urlencoded":return this._wwwFormUrlEncode(i)}return e},_wwwFormUrlEncode:function(e){if(!e)return"";var t=[];return Object.keys(e).forEach((function(i){t.push(this._wwwFormUrlEncodePiece(i)+"="+this._wwwFormUrlEncodePiece(e[i]))}),this),t.join("&")},_wwwFormUrlEncodePiece:function(e){return null!=e&&e.toString?encodeURIComponent(e.toString().replace(/\r?\n/g,"\r\n")).replace(/%20/g,"+"):""},_updateStatus:function(){this._setStatus(this.xhr.status),this._setStatusText(void 0===this.xhr.statusText?"":this.xhr.statusText)}}),
|
|
1620
1611
|
/**
|
|
1621
1612
|
@license
|
|
1622
1613
|
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
|
@@ -1627,7 +1618,7 @@ found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
|
|
|
1627
1618
|
part of the polymer project is also subject to an additional IP rights grant
|
|
1628
1619
|
found at http://polymer.github.io/PATENTS.txt
|
|
1629
1620
|
*/
|
|
1630
|
-
|
|
1621
|
+
Ss({is:"iron-ajax",hostAttributes:{hidden:!0},properties:{url:{type:String},params:{type:Object,value:function(){return{}}},method:{type:String,value:"GET"},headers:{type:Object,value:function(){return{}}},contentType:{type:String,value:null},body:{type:Object,value:null},sync:{type:Boolean,value:!1},handleAs:{type:String,value:"json"},withCredentials:{type:Boolean,value:!1},timeout:{type:Number,value:0},auto:{type:Boolean,value:!1},verbose:{type:Boolean,value:!1},lastRequest:{type:Object,notify:!0,readOnly:!0},lastProgress:{type:Object,notify:!0,readOnly:!0},loading:{type:Boolean,notify:!0,readOnly:!0},lastResponse:{type:Object,notify:!0,readOnly:!0},lastError:{type:Object,notify:!0,readOnly:!0},activeRequests:{type:Array,notify:!0,readOnly:!0,value:function(){return[]}},debounceDuration:{type:Number,value:0,notify:!0},jsonPrefix:{type:String,value:""},bubbles:{type:Boolean,value:!1},rejectWithRequest:{type:Boolean,value:!1},_boundHandleResponse:{type:Function,value:function(){return this._handleResponse.bind(this)}}},observers:["_requestOptionsChanged(url, method, params.*, headers, contentType, body, sync, handleAs, jsonPrefix, withCredentials, timeout, auto)"],created:function(){this._boundOnProgressChanged=this._onProgressChanged.bind(this)},get queryString(){var e,t,i=[];for(e in this.params)if(t=this.params[e],e=window.encodeURIComponent(e),Array.isArray(t))for(var n=0;n<t.length;n++)i.push(e+"="+window.encodeURIComponent(t[n]));else null!==t?i.push(e+"="+window.encodeURIComponent(t)):i.push(e);return i.join("&")},get requestUrl(){var e=this.queryString,t=this.url||"";if(e){var i=t.indexOf("?")>=0?"&":"?";return t+i+e}return t},get requestHeaders(){var e,t={},i=this.contentType;if(null==i&&"string"==typeof this.body&&(i="application/x-www-form-urlencoded"),i&&(t["content-type"]=i),"object"==typeof this.headers)for(e in this.headers)t[e]=this.headers[e].toString();return t},_onProgressChanged:function(e){this._setLastProgress(e.detail.value)},toRequestOptions:function(){return{url:this.requestUrl||"",method:this.method,headers:this.requestHeaders,body:this.body,async:!this.sync,handleAs:this.handleAs,jsonPrefix:this.jsonPrefix,withCredentials:this.withCredentials,timeout:this.timeout,rejectWithRequest:this.rejectWithRequest}},generateRequest:function(){var e=document.createElement("iron-request"),t=this.toRequestOptions();return this.push("activeRequests",e),e.completes.then(this._boundHandleResponse).catch(this._handleError.bind(this,e)).then(this._discardRequest.bind(this,e)),this.fire("iron-ajax-presend",{request:e,options:t},{bubbles:this.bubbles,cancelable:!0}).defaultPrevented?(e.abort(),e.rejectCompletes(e),e):(this.lastRequest&&this.lastRequest.removeEventListener("iron-request-progress-changed",this._boundOnProgressChanged),e.addEventListener("iron-request-progress-changed",this._boundOnProgressChanged),e.send(t),this._setLastProgress(null),this._setLastRequest(e),this._setLoading(!0),this.fire("request",{request:e,options:t},{bubbles:this.bubbles,composed:!0}),this.fire("iron-ajax-request",{request:e,options:t},{bubbles:this.bubbles,composed:!0}),e)},_handleResponse:function(e){e===this.lastRequest&&(this._setLastResponse(e.response),this._setLastError(null),this._setLoading(!1)),this.fire("response",e,{bubbles:this.bubbles,composed:!0}),this.fire("iron-ajax-response",e,{bubbles:this.bubbles,composed:!0})},_handleError:function(e,t){this.verbose&&yr._error(t),e===this.lastRequest&&(this._setLastError({request:e,error:t,status:e.xhr.status,statusText:e.xhr.statusText,response:e.xhr.response}),this._setLastResponse(null),this._setLoading(!1)),this.fire("iron-ajax-error",{request:e,error:t},{bubbles:this.bubbles,composed:!0}),this.fire("error",{request:e,error:t},{bubbles:this.bubbles,composed:!0})},_discardRequest:function(e){var t=this.activeRequests.indexOf(e);t>-1&&this.splice("activeRequests",t,1)},_requestOptionsChanged:function(){this.debounce("generate-request",(function(){null!=this.url&&this.auto&&this.generateRequest()}),this.debounceDuration)}}),!window.polymerSkipLoadingFontRoboto){const e=document.createElement("link");e.rel="stylesheet",e.type="text/css",e.crossOrigin="anonymous",e.href="https://fonts.googleapis.com/css?family=Roboto+Mono:400,700|Roboto:400,300,300italic,400italic,500,500italic,700,700italic",document.head.appendChild(e)}
|
|
1631
1622
|
/**
|
|
1632
1623
|
@license
|
|
1633
1624
|
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
|
@@ -1637,7 +1628,7 @@ http://polymer.github.io/AUTHORS.txt The complete set of contributors may be
|
|
|
1637
1628
|
found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
|
|
1638
1629
|
part of the polymer project is also subject to an additional IP rights grant
|
|
1639
1630
|
found at http://polymer.github.io/PATENTS.txt
|
|
1640
|
-
*/const
|
|
1631
|
+
*/const Qr=ir`<custom-style>
|
|
1641
1632
|
<style is="custom-style">
|
|
1642
1633
|
html {
|
|
1643
1634
|
|
|
@@ -1793,7 +1784,7 @@ found at http://polymer.github.io/PATENTS.txt
|
|
|
1793
1784
|
}
|
|
1794
1785
|
|
|
1795
1786
|
</style>
|
|
1796
|
-
</custom-style>`;
|
|
1787
|
+
</custom-style>`;Qr.setAttribute("style","display: none;"),document.head.appendChild(Qr.content);
|
|
1797
1788
|
/**
|
|
1798
1789
|
@license
|
|
1799
1790
|
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
|
@@ -1804,7 +1795,7 @@ found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
|
|
|
1804
1795
|
part of the polymer project is also subject to an additional IP rights grant
|
|
1805
1796
|
found at http://polymer.github.io/PATENTS.txt
|
|
1806
1797
|
*/
|
|
1807
|
-
const
|
|
1798
|
+
const ea=document.createElement("template");ea.setAttribute("style","display: none;"),ea.innerHTML='<dom-module id="paper-dialog-shared-styles">\n <template>\n <style>\n :host {\n display: block;\n margin: 24px 40px;\n\n background: var(--paper-dialog-background-color, var(--primary-background-color));\n color: var(--paper-dialog-color, var(--primary-text-color));\n\n @apply --paper-font-body1;\n @apply --shadow-elevation-16dp;\n @apply --paper-dialog;\n }\n\n :host > ::slotted(*) {\n margin-top: 20px;\n padding: 0 24px;\n }\n\n :host > ::slotted(.no-padding) {\n padding: 0;\n }\n\n \n :host > ::slotted(*:first-child) {\n margin-top: 24px;\n }\n\n :host > ::slotted(*:last-child) {\n margin-bottom: 24px;\n }\n\n /* In 1.x, this selector was `:host > ::content h2`. In 2.x <slot> allows\n to select direct children only, which increases the weight of this\n selector, so we have to re-define first-child/last-child margins below. */\n :host > ::slotted(h2) {\n position: relative;\n margin: 0;\n\n @apply --paper-font-title;\n @apply --paper-dialog-title;\n }\n\n /* Apply mixin again, in case it sets margin-top. */\n :host > ::slotted(h2:first-child) {\n margin-top: 24px;\n @apply --paper-dialog-title;\n }\n\n /* Apply mixin again, in case it sets margin-bottom. */\n :host > ::slotted(h2:last-child) {\n margin-bottom: 24px;\n @apply --paper-dialog-title;\n }\n\n :host > ::slotted(.paper-dialog-buttons),\n :host > ::slotted(.buttons) {\n position: relative;\n padding: 8px 8px 8px 24px;\n margin: 0;\n\n color: var(--paper-dialog-button-color, var(--primary-color));\n\n @apply --layout-horizontal;\n @apply --layout-end-justified;\n }\n </style>\n </template>\n</dom-module>',document.head.appendChild(ea.content);
|
|
1808
1799
|
/**
|
|
1809
1800
|
@license
|
|
1810
1801
|
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
|
@@ -1815,7 +1806,7 @@ found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
|
|
|
1815
1806
|
part of the polymer project is also subject to an additional IP rights grant
|
|
1816
1807
|
found at http://polymer.github.io/PATENTS.txt
|
|
1817
1808
|
*/
|
|
1818
|
-
const
|
|
1809
|
+
const ta={properties:{animationConfig:{type:Object},entryAnimation:{observer:"_entryAnimationChanged",type:String},exitAnimation:{observer:"_exitAnimationChanged",type:String}},_entryAnimationChanged:function(){this.animationConfig=this.animationConfig||{},this.animationConfig.entry=[{name:this.entryAnimation,node:this}]},_exitAnimationChanged:function(){this.animationConfig=this.animationConfig||{},this.animationConfig.exit=[{name:this.exitAnimation,node:this}]},_copyProperties:function(e,t){for(var i in t)e[i]=t[i]},_cloneConfig:function(e){var t={isClone:!0};return this._copyProperties(t,e),t},_getAnimationConfigRecursive:function(e,t,i){var n;if(this.animationConfig)if(this.animationConfig.value&&"function"==typeof this.animationConfig.value)this._warn(this._logf("playAnimation","Please put 'animationConfig' inside of your components 'properties' object instead of outside of it."));else if(n=e?this.animationConfig[e]:this.animationConfig,Array.isArray(n)||(n=[n]),n)for(var o,s=0;o=n[s];s++)if(o.animatable)o.animatable._getAnimationConfigRecursive(o.type||e,t,i);else if(o.id){var r=t[o.id];r?(r.isClone||(t[o.id]=this._cloneConfig(r),r=t[o.id]),this._copyProperties(r,o)):t[o.id]=o}else i.push(o)},getAnimationConfig:function(e){var t={},i=[];for(var n in this._getAnimationConfigRecursive(e,t,i),t)i.push(t[n]);return i}},ia=[ta,{_configureAnimations:function(e){var t=[],i=[];if(e.length>0)for(let t,n=0;t=e[n];n++){let e=document.createElement(t.name);if(e.isNeonAnimation){let n=null;e.configure||(e.configure=function(e){return null}),n=e.configure(t),i.push({result:n,config:t,neonAnimation:e})}else console.warn(this.is+":",t.name,"not found!")}for(var n=0;n<i.length;n++){let e=i[n].result,o=i[n].config,s=i[n].neonAnimation;try{"function"!=typeof e.cancel&&(e=document.timeline.play(e))}catch(t){e=null,console.warn("Couldnt play","(",o.name,").",t)}e&&t.push({neonAnimation:s,config:o,animation:e})}return t},_shouldComplete:function(e){for(var t=!0,i=0;i<e.length;i++)if("finished"!=e[i].animation.playState){t=!1;break}return t},_complete:function(e){for(var t=0;t<e.length;t++)e[t].neonAnimation.complete(e[t].config);for(t=0;t<e.length;t++)e[t].animation.cancel()},playAnimation:function(e,t){var i=this.getAnimationConfig(e);if(i){this._active=this._active||{},this._active[e]&&(this._complete(this._active[e]),delete this._active[e]);var n=this._configureAnimations(i);if(0!=n.length){this._active[e]=n;for(var o=0;o<n.length;o++)n[o].animation.onfinish=function(){this._shouldComplete(n)&&(this._complete(n),delete this._active[e],this.fire("neon-animation-finish",t,{bubbles:!1}))}.bind(this)}else this.fire("neon-animation-finish",t,{bubbles:!1})}},cancelAnimation:function(){for(var e in this._active){var t=this._active[e];for(var i in t)t[i].animation.cancel()}this._active={}}}];
|
|
1819
1810
|
/**
|
|
1820
1811
|
@license
|
|
1821
1812
|
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
|
@@ -1836,7 +1827,7 @@ found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
|
|
|
1836
1827
|
part of the polymer project is also subject to an additional IP rights grant
|
|
1837
1828
|
found at http://polymer.github.io/PATENTS.txt
|
|
1838
1829
|
*/
|
|
1839
|
-
let
|
|
1830
|
+
let na=void 0;const oa=()=>{if(void 0!==na)return na;const e=document.createElement("div");Object.assign(e.style,{overflow:"auto",position:"fixed",left:"0px",top:"0px",maxWidth:"100px",maxHeight:"100px"});const t=document.createElement("div");return t.style.width="200px",t.style.height="200px",e.appendChild(t),document.body.appendChild(e),na=Math.abs(e.offsetWidth-100)>1?e.offsetWidth-e.clientWidth:0,document.body.removeChild(e),na},sa={properties:{sizingTarget:{type:Object,value:function(){return this}},fitInto:{type:Object,value:window},noOverlap:{type:Boolean},positionTarget:{type:Element},horizontalAlign:{type:String},verticalAlign:{type:String},dynamicAlign:{type:Boolean},horizontalOffset:{type:Number,value:0,notify:!0},verticalOffset:{type:Number,value:0,notify:!0},autoFitOnAttach:{type:Boolean,value:!1},expandSizingTargetForScrollbars:{type:Boolean,value:!1},_fitInfo:{type:Object}},get _fitWidth(){return this.fitInto===window?this.fitInto.innerWidth:this.fitInto.getBoundingClientRect().width},get _fitHeight(){return this.fitInto===window?this.fitInto.innerHeight:this.fitInto.getBoundingClientRect().height},get _fitLeft(){return this.fitInto===window?0:this.fitInto.getBoundingClientRect().left},get _fitTop(){return this.fitInto===window?0:this.fitInto.getBoundingClientRect().top},get _defaultPositionTarget(){var e=is(this).parentNode;return e&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&(e=e.host),e},get _localeHorizontalAlign(){if(this._isRTL){if("right"===this.horizontalAlign)return"left";if("left"===this.horizontalAlign)return"right"}return this.horizontalAlign},get __shouldPosition(){return(this.horizontalAlign||this.verticalAlign)&&this.positionTarget},get _isRTL(){return void 0===this._memoizedIsRTL&&(this._memoizedIsRTL="rtl"==window.getComputedStyle(this).direction),this._memoizedIsRTL},attached:function(){this.positionTarget=this.positionTarget||this._defaultPositionTarget,this.autoFitOnAttach&&("none"===window.getComputedStyle(this).display?setTimeout(function(){this.fit()}.bind(this)):(window.ShadyDOM&&ShadyDOM.flush(),this.fit()))},detached:function(){this.__deferredFit&&(clearTimeout(this.__deferredFit),this.__deferredFit=null)},fit:function(){this.position(),this.constrain(),this.center()},_discoverInfo:function(){if(!this._fitInfo){var e=window.getComputedStyle(this),t=window.getComputedStyle(this.sizingTarget);this._fitInfo={inlineStyle:{top:this.style.top||"",left:this.style.left||"",position:this.style.position||""},sizerInlineStyle:{maxWidth:this.sizingTarget.style.maxWidth||"",maxHeight:this.sizingTarget.style.maxHeight||"",boxSizing:this.sizingTarget.style.boxSizing||""},positionedBy:{vertically:"auto"!==e.top?"top":"auto"!==e.bottom?"bottom":null,horizontally:"auto"!==e.left?"left":"auto"!==e.right?"right":null},sizedBy:{height:"none"!==t.maxHeight,width:"none"!==t.maxWidth,minWidth:parseInt(t.minWidth,10)||0,minHeight:parseInt(t.minHeight,10)||0},margin:{top:parseInt(e.marginTop,10)||0,right:parseInt(e.marginRight,10)||0,bottom:parseInt(e.marginBottom,10)||0,left:parseInt(e.marginLeft,10)||0}}}},resetFit:function(){var e=this._fitInfo||{};for(var t in e.sizerInlineStyle)this.sizingTarget.style[t]=e.sizerInlineStyle[t];for(var t in e.inlineStyle)this.style[t]=e.inlineStyle[t];this._fitInfo=null},refit:function(){var e=this.sizingTarget.scrollLeft,t=this.sizingTarget.scrollTop;this.resetFit(),this.fit(),this.sizingTarget.scrollLeft=e,this.sizingTarget.scrollTop=t},position:function(){if(!this.__shouldPosition)return;this._discoverInfo(),window.ShadyDOM&&window.ShadyDOM.flush(),this.style.position="fixed",this.sizingTarget.style.boxSizing="border-box",this.style.left="0px",this.style.top="0px";var e=this.getBoundingClientRect(),t=this.__getNormalizedRect(this.positionTarget),i=this.__getNormalizedRect(this.fitInto);let n,o,s,r;this.expandSizingTargetForScrollbars&&(n=this.sizingTarget.offsetWidth,o=this.sizingTarget.offsetHeight,s=this.sizingTarget.clientWidth,r=this.sizingTarget.clientHeight);var a=this._fitInfo.margin,l={width:e.width+a.left+a.right,height:e.height+a.top+a.bottom},c=this.__getPosition(this._localeHorizontalAlign,this.verticalAlign,l,e,t,i),p=c.left+a.left,h=c.top+a.top,d=Math.min(i.right-a.right,p+e.width),u=Math.min(i.bottom-a.bottom,h+e.height);p=Math.max(i.left+a.left,Math.min(p,d-this._fitInfo.sizedBy.minWidth)),h=Math.max(i.top+a.top,Math.min(h,u-this._fitInfo.sizedBy.minHeight));const f=Math.max(d-p,this._fitInfo.sizedBy.minWidth),_=Math.max(u-h,this._fitInfo.sizedBy.minHeight);this.sizingTarget.style.maxWidth=f+"px",this.sizingTarget.style.maxHeight=_+"px";const m=p-e.left,y=h-e.top;if(this.style.left=m+"px",this.style.top=y+"px",this.expandSizingTargetForScrollbars){const e=this.sizingTarget.offsetHeight,t=e-this.sizingTarget.clientHeight-(o-r);if(t>0){const n=i.height-a.top-a.bottom,o=Math.min(n,_+t);this.sizingTarget.style.maxHeight=o+"px";const s=this.sizingTarget.offsetHeight,r=s-e;let l;"top"===c.verticalAlign?l=y:"middle"===c.verticalAlign?l=y-r/2:"bottom"===c.verticalAlign&&(l=y-r),l=Math.max(i.top+a.top,Math.min(l,i.bottom-a.bottom-s)),this.style.top=l+"px"}const l=this.sizingTarget.offsetWidth,p=l-this.sizingTarget.clientWidth-(n-s);if(p>0){const e=oa(),t=i.width-a.left-a.right,n=Math.min(t,f+p-e);this.sizingTarget.style.maxWidth=n+"px";const o=this.sizingTarget.offsetWidth+e,s=o-l;let r;"left"===c.horizontalAlign?r=m:"center"===c.horizontalAlign?r=m-s/2:"right"===c.horizontalAlign&&(r=m-s),r=Math.max(i.left+a.left,Math.min(r,i.right-a.right-o)),this.style.left=r+"px"}}},constrain:function(){if(!this.__shouldPosition){this._discoverInfo();var e=this._fitInfo;e.positionedBy.vertically||(this.style.position="fixed",this.style.top="0px"),e.positionedBy.horizontally||(this.style.position="fixed",this.style.left="0px"),this.sizingTarget.style.boxSizing="border-box";var t=this.getBoundingClientRect();e.sizedBy.height||this.__sizeDimension(t,e.positionedBy.vertically,"top","bottom","Height"),e.sizedBy.width||this.__sizeDimension(t,e.positionedBy.horizontally,"left","right","Width")}},_sizeDimension:function(e,t,i,n,o){this.__sizeDimension(e,t,i,n,o)},__sizeDimension:function(e,t,i,n,o){var s=this._fitInfo,r=this.__getNormalizedRect(this.fitInto),a="Width"===o?r.width:r.height,l=t===n,c=l?a-e[n]:e[i],p=s.margin[l?i:n],h="offset"+o,d=this[h]-this.sizingTarget[h];this.sizingTarget.style["max"+o]=a-p-c-d+"px"},center:function(){if(!this.__shouldPosition){this._discoverInfo();var e=this._fitInfo.positionedBy;if(!e.vertically||!e.horizontally){this.style.position="fixed",e.vertically||(this.style.top="0px"),e.horizontally||(this.style.left="0px");var t=this.getBoundingClientRect(),i=this.__getNormalizedRect(this.fitInto);if(!e.vertically){var n=i.top-t.top+(i.height-t.height)/2;this.style.top=n+"px"}if(!e.horizontally){var o=i.left-t.left+(i.width-t.width)/2;this.style.left=o+"px"}}}},__getNormalizedRect:function(e){return e===document.documentElement||e===window?{top:0,left:0,width:window.innerWidth,height:window.innerHeight,right:window.innerWidth,bottom:window.innerHeight}:e.getBoundingClientRect()},__getOffscreenArea:function(e,t,i){var n=Math.min(0,e.top)+Math.min(0,i.bottom-(e.top+t.height)),o=Math.min(0,e.left)+Math.min(0,i.right-(e.left+t.width));return Math.abs(n)*t.width+Math.abs(o)*t.height},__getPosition:function(e,t,i,n,o,s){var r,a=[{verticalAlign:"top",horizontalAlign:"left",top:o.top+this.verticalOffset,left:o.left+this.horizontalOffset},{verticalAlign:"top",horizontalAlign:"right",top:o.top+this.verticalOffset,left:o.right-i.width-this.horizontalOffset},{verticalAlign:"bottom",horizontalAlign:"left",top:o.bottom-i.height-this.verticalOffset,left:o.left+this.horizontalOffset},{verticalAlign:"bottom",horizontalAlign:"right",top:o.bottom-i.height-this.verticalOffset,left:o.right-i.width-this.horizontalOffset}];if(this.noOverlap){for(var l=0,c=a.length;l<c;l++){var p={};for(var h in a[l])p[h]=a[l][h];a.push(p)}a[0].top=a[1].top+=o.height,a[2].top=a[3].top-=o.height,a[4].left=a[6].left+=o.width,a[5].left=a[7].left-=o.width}t="auto"===t?null:t,(e="auto"===e?null:e)&&"center"!==e||(a.push({verticalAlign:"top",horizontalAlign:"center",top:o.top+this.verticalOffset+(this.noOverlap?o.height:0),left:o.left-n.width/2+o.width/2+this.horizontalOffset}),a.push({verticalAlign:"bottom",horizontalAlign:"center",top:o.bottom-i.height-this.verticalOffset-(this.noOverlap?o.height:0),left:o.left-n.width/2+o.width/2+this.horizontalOffset})),t&&"middle"!==t||(a.push({verticalAlign:"middle",horizontalAlign:"left",top:o.top-n.height/2+o.height/2+this.verticalOffset,left:o.left+this.horizontalOffset+(this.noOverlap?o.width:0)}),a.push({verticalAlign:"middle",horizontalAlign:"right",top:o.top-n.height/2+o.height/2+this.verticalOffset,left:o.right-i.width-this.horizontalOffset-(this.noOverlap?o.width:0)})),"middle"===t&&"center"===e&&a.push({verticalAlign:"middle",horizontalAlign:"center",top:o.top-n.height/2+o.height/2+this.verticalOffset,left:o.left-n.width/2+o.width/2+this.horizontalOffset});for(l=0;l<a.length;l++){var d=a[l],u=d.verticalAlign===t,f=d.horizontalAlign===e;if(!this.dynamicAlign&&!this.noOverlap&&u&&f){r=d;break}var _=(!t||u)&&(!e||f);if(this.dynamicAlign||_){if(d.offscreenArea=this.__getOffscreenArea(d,i,s),0===d.offscreenArea&&_){r=d;break}r=r||d;var m=d.offscreenArea-r.offscreenArea;(m<0||0===m&&(u||f))&&(r=d)}}return r}};
|
|
1840
1831
|
/**
|
|
1841
1832
|
@license
|
|
1842
1833
|
Copyright (c) 2016 The Polymer Project Authors. All rights reserved.
|
|
@@ -1847,7 +1838,7 @@ found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
|
|
|
1847
1838
|
part of the polymer project is also subject to an additional IP rights grant
|
|
1848
1839
|
found at http://polymer.github.io/PATENTS.txt
|
|
1849
1840
|
*/
|
|
1850
|
-
var
|
|
1841
|
+
var ra=Element.prototype,aa=ra.matches||ra.matchesSelector||ra.mozMatchesSelector||ra.msMatchesSelector||ra.oMatchesSelector||ra.webkitMatchesSelector;class la{getTabbableNodes(e){var t=[];return this._collectTabbableNodes(e,t)?this._sortByTabIndex(t):t}isFocusable(e){return aa.call(e,"input, select, textarea, button, object")?aa.call(e,":not([disabled])"):aa.call(e,"a[href], area[href], iframe, [tabindex], [contentEditable]")}isTabbable(e){return this.isFocusable(e)&&aa.call(e,':not([tabindex="-1"])')&&this._isVisible(e)}_normalizedTabIndex(e){if(this.isFocusable(e)){var t=e.getAttribute("tabindex")||0;return Number(t)}return-1}_collectTabbableNodes(e,t){if(e.nodeType!==Node.ELEMENT_NODE)return!1;var i=e;if(!this._isVisible(i))return!1;var n,o=this._normalizedTabIndex(i),s=o>0;o>=0&&t.push(i),n="content"===i.localName||"slot"===i.localName?is(i).getDistributedNodes():is(i.root||i).children;for(var r=0;r<n.length;r++)s=this._collectTabbableNodes(n[r],t)||s;return s}_isVisible(e){var t=e.style;return"hidden"!==t.visibility&&"none"!==t.display&&("hidden"!==(t=window.getComputedStyle(e)).visibility&&"none"!==t.display)}_sortByTabIndex(e){var t=e.length;if(t<2)return e;var i=Math.ceil(t/2),n=this._sortByTabIndex(e.slice(0,i)),o=this._sortByTabIndex(e.slice(i));return this._mergeSortByTabIndex(n,o)}_mergeSortByTabIndex(e,t){for(var i=[];e.length>0&&t.length>0;)this._hasLowerTabOrder(e[0],t[0])?i.push(t.shift()):i.push(e.shift());return i.concat(e,t)}_hasLowerTabOrder(e,t){var i=Math.max(e.tabIndex,0),n=Math.max(t.tabIndex,0);return 0===i||0===n?n>i:i>n}}const ca=new la;
|
|
1851
1842
|
/**
|
|
1852
1843
|
@license
|
|
1853
1844
|
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
|
@@ -1857,7 +1848,7 @@ http://polymer.github.io/AUTHORS.txt The complete set of contributors may be
|
|
|
1857
1848
|
found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
|
|
1858
1849
|
part of the polymer project is also subject to an additional IP rights grant
|
|
1859
1850
|
found at http://polymer.github.io/PATENTS.txt
|
|
1860
|
-
*/
|
|
1851
|
+
*/Ss({_template:ir`
|
|
1861
1852
|
<style>
|
|
1862
1853
|
:host {
|
|
1863
1854
|
position: fixed;
|
|
@@ -1880,7 +1871,7 @@ found at http://polymer.github.io/PATENTS.txt
|
|
|
1880
1871
|
</style>
|
|
1881
1872
|
|
|
1882
1873
|
<slot></slot>
|
|
1883
|
-
`,is:"iron-overlay-backdrop",properties:{opened:{reflectToAttribute:!0,type:Boolean,value:!1,observer:"_openedChanged"}},listeners:{transitionend:"_onTransitionend"},created:function(){this.__openedRaf=null},attached:function(){this.opened&&this._openedChanged(this.opened)},prepare:function(){this.opened&&!this.parentNode&&
|
|
1874
|
+
`,is:"iron-overlay-backdrop",properties:{opened:{reflectToAttribute:!0,type:Boolean,value:!1,observer:"_openedChanged"}},listeners:{transitionend:"_onTransitionend"},created:function(){this.__openedRaf=null},attached:function(){this.opened&&this._openedChanged(this.opened)},prepare:function(){this.opened&&!this.parentNode&&is(document.body).appendChild(this)},open:function(){this.opened=!0},close:function(){this.opened=!1},complete:function(){this.opened||this.parentNode!==document.body||is(this.parentNode).removeChild(this)},_onTransitionend:function(e){e&&e.target===this&&this.complete()},_openedChanged:function(e){if(e)this.prepare();else{var t=window.getComputedStyle(this);"0s"!==t.transitionDuration&&0!=t.opacity||this.complete()}this.isAttached&&(this.__openedRaf&&(window.cancelAnimationFrame(this.__openedRaf),this.__openedRaf=null),this.scrollTop=this.scrollTop,this.__openedRaf=window.requestAnimationFrame(function(){this.__openedRaf=null,this.toggleClass("opened",this.opened)}.bind(this)))}});
|
|
1884
1875
|
/**
|
|
1885
1876
|
@license
|
|
1886
1877
|
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
|
@@ -1891,7 +1882,7 @@ found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
|
|
|
1891
1882
|
part of the polymer project is also subject to an additional IP rights grant
|
|
1892
1883
|
found at http://polymer.github.io/PATENTS.txt
|
|
1893
1884
|
*/
|
|
1894
|
-
class
|
|
1885
|
+
class pa{constructor(){this._overlays=[],this._minimumZ=101,this._backdropElement=null,Kn(document.documentElement,"tap",(function(){})),document.addEventListener("tap",this._onCaptureClick.bind(this),!0),document.addEventListener("focus",this._onCaptureFocus.bind(this),!0),document.addEventListener("keydown",this._onCaptureKeyDown.bind(this),!0)}get backdropElement(){return this._backdropElement||(this._backdropElement=document.createElement("iron-overlay-backdrop")),this._backdropElement}get deepActiveElement(){var e=document.activeElement;for(e&&e instanceof Element!=!1||(e=document.body);e.root&&is(e.root).activeElement;)e=is(e.root).activeElement;return e}_bringOverlayAtIndexToFront(e){var t=this._overlays[e];if(t){var i=this._overlays.length-1,n=this._overlays[i];if(n&&this._shouldBeBehindOverlay(t,n)&&i--,!(e>=i)){var o=Math.max(this.currentOverlayZ(),this._minimumZ);for(this._getZ(t)<=o&&this._applyOverlayZ(t,o);e<i;)this._overlays[e]=this._overlays[e+1],e++;this._overlays[i]=t}}}addOrRemoveOverlay(e){e.opened?this.addOverlay(e):this.removeOverlay(e)}addOverlay(e){var t=this._overlays.indexOf(e);if(t>=0)return this._bringOverlayAtIndexToFront(t),void this.trackBackdrop();var i=this._overlays.length,n=this._overlays[i-1],o=Math.max(this._getZ(n),this._minimumZ),s=this._getZ(e);if(n&&this._shouldBeBehindOverlay(e,n)){this._applyOverlayZ(n,o),i--;var r=this._overlays[i-1];o=Math.max(this._getZ(r),this._minimumZ)}s<=o&&this._applyOverlayZ(e,o),this._overlays.splice(i,0,e),this.trackBackdrop()}removeOverlay(e){var t=this._overlays.indexOf(e);-1!==t&&(this._overlays.splice(t,1),this.trackBackdrop())}currentOverlay(){var e=this._overlays.length-1;return this._overlays[e]}currentOverlayZ(){return this._getZ(this.currentOverlay())}ensureMinimumZ(e){this._minimumZ=Math.max(this._minimumZ,e)}focusOverlay(){var e=this.currentOverlay();e&&e._applyFocus()}trackBackdrop(){var e=this._overlayWithBackdrop();(e||this._backdropElement)&&(this.backdropElement.style.zIndex=this._getZ(e)-1,this.backdropElement.opened=!!e,this.backdropElement.prepare())}getBackdrops(){for(var e=[],t=0;t<this._overlays.length;t++)this._overlays[t].withBackdrop&&e.push(this._overlays[t]);return e}backdropZ(){return this._getZ(this._overlayWithBackdrop())-1}_overlayWithBackdrop(){for(var e=this._overlays.length-1;e>=0;e--)if(this._overlays[e].withBackdrop)return this._overlays[e]}_getZ(e){var t=this._minimumZ;if(e){var i=Number(e.style.zIndex||window.getComputedStyle(e).zIndex);i==i&&(t=i)}return t}_setZ(e,t){e.style.zIndex=t}_applyOverlayZ(e,t){this._setZ(e,t+2)}_overlayInPath(e){e=e||[];for(var t=0;t<e.length;t++)if(e[t]._manager===this)return e[t]}_onCaptureClick(e){var t=this._overlays.length-1;if(-1!==t)for(var i,n=is(e).path;(i=this._overlays[t])&&this._overlayInPath(n)!==i&&(i._onCaptureClick(e),i.allowClickThrough);)t--}_onCaptureFocus(e){var t=this.currentOverlay();t&&t._onCaptureFocus(e)}_onCaptureKeyDown(e){var t=this.currentOverlay();t&&(qr.keyboardEventMatchesKeys(e,"esc")?t._onCaptureEsc(e):qr.keyboardEventMatchesKeys(e,"tab")&&t._onCaptureTab(e))}_shouldBeBehindOverlay(e,t){return!e.alwaysOnTop&&t.alwaysOnTop}}const ha=new pa;
|
|
1895
1886
|
/**
|
|
1896
1887
|
@license
|
|
1897
1888
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -1901,7 +1892,7 @@ http://polymer.github.io/AUTHORS.txt The complete set of contributors may be
|
|
|
1901
1892
|
found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
|
|
1902
1893
|
part of the polymer project is also subject to an additional IP rights grant
|
|
1903
1894
|
found at http://polymer.github.io/PATENTS.txt
|
|
1904
|
-
*/var
|
|
1895
|
+
*/var da,ua,fa={pageX:0,pageY:0},_a=null,ma=[],ya=["wheel","mousewheel","DOMMouseScroll","touchstart","touchmove"];function ga(e){va.indexOf(e)>=0||(0===va.length&&xa(),va.push(e),ua=va[va.length-1])}function ba(e){var t=va.indexOf(e);-1!==t&&(va.splice(t,1),ua=va[va.length-1],0===va.length&&Ca())}const va=[];function wa(e){if(e.cancelable&&Sa(e)&&e.preventDefault(),e.targetTouches){var t=e.targetTouches[0];fa.pageX=t.pageX,fa.pageY=t.pageY}}function xa(){da=da||wa.bind(void 0);for(var e=0,t=ya.length;e<t;e++)document.addEventListener(ya[e],da,{capture:!0,passive:!1})}function Ca(){for(var e=0,t=ya.length;e<t;e++)document.removeEventListener(ya[e],da,{capture:!0,passive:!1})}function Sa(e){var t=is(e).rootTarget;if("touchmove"!==e.type&&_a!==t&&(_a=t,ma=Aa(is(e).path)),!ma.length)return!0;if("touchstart"===e.type)return!1;var i=Ea(e);return!ka(ma,i.deltaX,i.deltaY)}function Aa(e){for(var t=[],i=e.indexOf(ua),n=0;n<=i;n++)if(e[n].nodeType===Node.ELEMENT_NODE){var o=e[n],s=o.style;"scroll"!==s.overflow&&"auto"!==s.overflow&&(s=window.getComputedStyle(o)),"scroll"!==s.overflow&&"auto"!==s.overflow||t.push(o)}return t}function ka(e,t,i){if(t||i)for(var n=Math.abs(i)>=Math.abs(t),o=0;o<e.length;o++){var s=e[o];if(n?i<0?s.scrollTop>0:s.scrollTop<s.scrollHeight-s.clientHeight:t<0?s.scrollLeft>0:s.scrollLeft<s.scrollWidth-s.clientWidth)return s}}function Ea(e){var t={deltaX:e.deltaX,deltaY:e.deltaY};if("deltaX"in e);else if("wheelDeltaX"in e&&"wheelDeltaY"in e)t.deltaX=-e.wheelDeltaX,t.deltaY=-e.wheelDeltaY;else if("wheelDelta"in e)t.deltaX=0,t.deltaY=-e.wheelDelta;else if("axis"in e)t.deltaX=1===e.axis?e.detail:0,t.deltaY=2===e.axis?e.detail:0;else if(e.targetTouches){var i=e.targetTouches[0];t.deltaX=fa.pageX-i.pageX,t.deltaY=fa.pageY-i.pageY}return t}
|
|
1905
1896
|
/**
|
|
1906
1897
|
@license
|
|
1907
1898
|
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
|
@@ -1911,7 +1902,7 @@ http://polymer.github.io/AUTHORS.txt The complete set of contributors may be
|
|
|
1911
1902
|
found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
|
|
1912
1903
|
part of the polymer project is also subject to an additional IP rights grant
|
|
1913
1904
|
found at http://polymer.github.io/PATENTS.txt
|
|
1914
|
-
*/const
|
|
1905
|
+
*/const Pa={properties:{opened:{observer:"_openedChanged",type:Boolean,value:!1,notify:!0},canceled:{observer:"_canceledChanged",readOnly:!0,type:Boolean,value:!1},withBackdrop:{observer:"_withBackdropChanged",type:Boolean},noAutoFocus:{type:Boolean,value:!1},noCancelOnEscKey:{type:Boolean,value:!1},noCancelOnOutsideClick:{type:Boolean,value:!1},closingReason:{type:Object},restoreFocusOnClose:{type:Boolean,value:!1},allowClickThrough:{type:Boolean},alwaysOnTop:{type:Boolean},scrollAction:{type:String},_manager:{type:Object,value:ha},_focusedChild:{type:Object}},listeners:{"iron-resize":"_onIronResize"},observers:["__updateScrollObservers(isAttached, opened, scrollAction)"],get backdropElement(){return this._manager.backdropElement},get _focusNode(){return this._focusedChild||is(this).querySelector("[autofocus]")||this},get _focusableNodes(){return ca.getTabbableNodes(this)},ready:function(){this.__isAnimating=!1,this.__shouldRemoveTabIndex=!1,this.__firstFocusableNode=this.__lastFocusableNode=null,this.__rafs={},this.__restoreFocusNode=null,this.__scrollTop=this.__scrollLeft=null,this.__onCaptureScroll=this.__onCaptureScroll.bind(this),this.__rootNodes=null,this._ensureSetup()},attached:function(){this.opened&&this._openedChanged(this.opened),this._observer=is(this).observeNodes(this._onNodesChange)},detached:function(){for(var e in this._observer&&is(this).unobserveNodes(this._observer),this._observer=null,this.__rafs)null!==this.__rafs[e]&&cancelAnimationFrame(this.__rafs[e]);this.__rafs={},this._manager.removeOverlay(this),this.__isAnimating&&(this.opened?this._finishRenderOpened():(this._applyFocus(),this._finishRenderClosed()))},toggle:function(){this._setCanceled(!1),this.opened=!this.opened},open:function(){this._setCanceled(!1),this.opened=!0},close:function(){this._setCanceled(!1),this.opened=!1},cancel:function(e){this.fire("iron-overlay-canceled",e,{cancelable:!0}).defaultPrevented||(this._setCanceled(!0),this.opened=!1)},invalidateTabbables:function(){this.__firstFocusableNode=this.__lastFocusableNode=null},_ensureSetup:function(){this._overlaySetup||(this._overlaySetup=!0,this.style.outline="none",this.style.display="none")},_openedChanged:function(e){e?this.removeAttribute("aria-hidden"):this.setAttribute("aria-hidden","true"),this.isAttached&&(this.__isAnimating=!0,this.__deraf("__openedChanged",this.__openedChanged))},_canceledChanged:function(){this.closingReason=this.closingReason||{},this.closingReason.canceled=this.canceled},_withBackdropChanged:function(){this.withBackdrop&&!this.hasAttribute("tabindex")?(this.setAttribute("tabindex","-1"),this.__shouldRemoveTabIndex=!0):this.__shouldRemoveTabIndex&&(this.removeAttribute("tabindex"),this.__shouldRemoveTabIndex=!1),this.opened&&this.isAttached&&this._manager.trackBackdrop()},_prepareRenderOpened:function(){this.__restoreFocusNode=this._manager.deepActiveElement,this._preparePositioning(),this.refit(),this._finishPositioning(),this.noAutoFocus&&document.activeElement===this._focusNode&&(this._focusNode.blur(),this.__restoreFocusNode.focus())},_renderOpened:function(){this._finishRenderOpened()},_renderClosed:function(){this._finishRenderClosed()},_finishRenderOpened:function(){this.notifyResize(),this.__isAnimating=!1,this.fire("iron-overlay-opened")},_finishRenderClosed:function(){this.style.display="none",this.style.zIndex="",this.notifyResize(),this.__isAnimating=!1,this.fire("iron-overlay-closed",this.closingReason)},_preparePositioning:function(){this.style.transition=this.style.webkitTransition="none",this.style.transform=this.style.webkitTransform="none",this.style.display=""},_finishPositioning:function(){this.style.display="none",this.scrollTop=this.scrollTop,this.style.transition=this.style.webkitTransition="",this.style.transform=this.style.webkitTransform="",this.style.display="",this.scrollTop=this.scrollTop},_applyFocus:function(){if(this.opened)this.noAutoFocus||this._focusNode.focus();else{if(this.restoreFocusOnClose&&this.__restoreFocusNode){var e=this._manager.deepActiveElement;(e===document.body||Ta(this,e))&&this.__restoreFocusNode.focus()}this.__restoreFocusNode=null,this._focusNode.blur(),this._focusedChild=null}},_onCaptureClick:function(e){this.noCancelOnOutsideClick||this.cancel(e)},_onCaptureFocus:function(e){if(this.withBackdrop){var t=is(e).path;-1===t.indexOf(this)?(e.stopPropagation(),this._applyFocus()):this._focusedChild=t[0]}},_onCaptureEsc:function(e){this.noCancelOnEscKey||this.cancel(e)},_onCaptureTab:function(e){if(this.withBackdrop){this.__ensureFirstLastFocusables();var t=e.shiftKey,i=t?this.__firstFocusableNode:this.__lastFocusableNode,n=t?this.__lastFocusableNode:this.__firstFocusableNode,o=!1;if(i===n)o=!0;else{var s=this._manager.deepActiveElement;o=s===i||s===this}o&&(e.preventDefault(),this._focusedChild=n,this._applyFocus())}},_onIronResize:function(){this.opened&&!this.__isAnimating&&this.__deraf("refit",this.refit)},_onNodesChange:function(){this.opened&&!this.__isAnimating&&(this.invalidateTabbables(),this.notifyResize())},__ensureFirstLastFocusables:function(){var e=this._focusableNodes;this.__firstFocusableNode=e[0],this.__lastFocusableNode=e[e.length-1]},__openedChanged:function(){this.opened?(this._prepareRenderOpened(),this._manager.addOverlay(this),this._applyFocus(),this._renderOpened()):(this._manager.removeOverlay(this),this._applyFocus(),this._renderClosed())},__deraf:function(e,t){var i=this.__rafs;null!==i[e]&&cancelAnimationFrame(i[e]),i[e]=requestAnimationFrame(function(){i[e]=null,t.call(this)}.bind(this))},__updateScrollObservers:function(e,t,i){e&&t&&this.__isValidScrollAction(i)?("lock"===i&&(this.__saveScrollPosition(),ga(this)),this.__addScrollListeners()):(ba(this),this.__removeScrollListeners())},__addScrollListeners:function(){if(!this.__rootNodes){if(this.__rootNodes=[],Ee)for(var e=this;e;)e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&e.host&&this.__rootNodes.push(e),e=e.host||e.assignedSlot||e.parentNode;this.__rootNodes.push(document)}this.__rootNodes.forEach((function(e){e.addEventListener("scroll",this.__onCaptureScroll,{capture:!0,passive:!0})}),this)},__removeScrollListeners:function(){this.__rootNodes&&this.__rootNodes.forEach((function(e){e.removeEventListener("scroll",this.__onCaptureScroll,{capture:!0,passive:!0})}),this),this.isAttached||(this.__rootNodes=null)},__isValidScrollAction:function(e){return"lock"===e||"refit"===e||"cancel"===e},__onCaptureScroll:function(e){if(!(this.__isAnimating||is(e).path.indexOf(this)>=0))switch(this.scrollAction){case"lock":this.__restoreScrollPosition();break;case"refit":this.__deraf("refit",this.refit);break;case"cancel":this.cancel(e)}},__saveScrollPosition:function(){document.scrollingElement?(this.__scrollTop=document.scrollingElement.scrollTop,this.__scrollLeft=document.scrollingElement.scrollLeft):(this.__scrollTop=Math.max(document.documentElement.scrollTop,document.body.scrollTop),this.__scrollLeft=Math.max(document.documentElement.scrollLeft,document.body.scrollLeft))},__restoreScrollPosition:function(){document.scrollingElement?(document.scrollingElement.scrollTop=this.__scrollTop,document.scrollingElement.scrollLeft=this.__scrollLeft):(document.documentElement.scrollTop=document.body.scrollTop=this.__scrollTop,document.documentElement.scrollLeft=document.body.scrollLeft=this.__scrollLeft)}},Oa=e=>e.assignedSlot||e.parentNode||e.host,Ta=(e,t)=>{for(let i=t;i;i=Oa(i))if(i===e)return!0;return!1},Ia=[sa,Gr,Pa],Na={hostAttributes:{role:"dialog",tabindex:"-1"},properties:{modal:{type:Boolean,value:!1},__readied:{type:Boolean,value:!1}},observers:["_modalChanged(modal, __readied)"],listeners:{tap:"_onDialogClick"},ready:function(){this.__prevNoCancelOnOutsideClick=this.noCancelOnOutsideClick,this.__prevNoCancelOnEscKey=this.noCancelOnEscKey,this.__prevWithBackdrop=this.withBackdrop,this.__readied=!0},_modalChanged:function(e,t){t&&(e?(this.__prevNoCancelOnOutsideClick=this.noCancelOnOutsideClick,this.__prevNoCancelOnEscKey=this.noCancelOnEscKey,this.__prevWithBackdrop=this.withBackdrop,this.noCancelOnOutsideClick=!0,this.noCancelOnEscKey=!0,this.withBackdrop=!0):(this.noCancelOnOutsideClick=this.noCancelOnOutsideClick&&this.__prevNoCancelOnOutsideClick,this.noCancelOnEscKey=this.noCancelOnEscKey&&this.__prevNoCancelOnEscKey,this.withBackdrop=this.withBackdrop&&this.__prevWithBackdrop))},_updateClosingReasonConfirmed:function(e){this.closingReason=this.closingReason||{},this.closingReason.confirmed=e},_onDialogClick:function(e){for(var t=is(e).path,i=0,n=t.indexOf(this);i<n;i++){var o=t[i];if(o.hasAttribute&&(o.hasAttribute("dialog-dismiss")||o.hasAttribute("dialog-confirm"))){this._updateClosingReasonConfirmed(o.hasAttribute("dialog-confirm")),this.close(),e.stopPropagation();break}}}};
|
|
1915
1906
|
/**
|
|
1916
1907
|
@license
|
|
1917
1908
|
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
|
@@ -1922,10 +1913,10 @@ found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
|
|
|
1922
1913
|
part of the polymer project is also subject to an additional IP rights grant
|
|
1923
1914
|
found at http://polymer.github.io/PATENTS.txt
|
|
1924
1915
|
*/
|
|
1925
|
-
|
|
1916
|
+
Ss({_template:ir`
|
|
1926
1917
|
<style include="paper-dialog-shared-styles"></style>
|
|
1927
1918
|
<slot></slot>
|
|
1928
|
-
`,is:"paper-dialog",behaviors:[[
|
|
1919
|
+
`,is:"paper-dialog",behaviors:[[Ia,Na],ia],listeners:{"neon-animation-finish":"_onNeonAnimationFinish"},_renderOpened:function(){this.cancelAnimation(),this.playAnimation("entry")},_renderClosed:function(){this.cancelAnimation(),this.playAnimation("exit")},_onNeonAnimationFinish:function(){this.opened?this._finishRenderOpened():this._finishRenderClosed()}}),
|
|
1929
1920
|
/**
|
|
1930
1921
|
@license
|
|
1931
1922
|
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
|
@@ -1936,7 +1927,7 @@ found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
|
|
|
1936
1927
|
part of the polymer project is also subject to an additional IP rights grant
|
|
1937
1928
|
found at http://polymer.github.io/PATENTS.txt
|
|
1938
1929
|
*/
|
|
1939
|
-
|
|
1930
|
+
Ss({_template:ir`
|
|
1940
1931
|
<style>
|
|
1941
1932
|
|
|
1942
1933
|
:host {
|
|
@@ -1979,7 +1970,7 @@ xs({_template:Qs`
|
|
|
1979
1970
|
<div id="scrollable" class="scrollable" on-scroll="updateScrollState">
|
|
1980
1971
|
<slot></slot>
|
|
1981
1972
|
</div>
|
|
1982
|
-
`,is:"paper-dialog-scrollable",properties:{dialogElement:{type:Object}},get scrollTarget(){return this.$.scrollable},ready:function(){this._ensureTarget(),this.classList.add("no-padding")},attached:function(){this._ensureTarget(),requestAnimationFrame(this.updateScrollState.bind(this))},updateScrollState:function(){this.toggleClass("is-scrolled",this.scrollTarget.scrollTop>0),this.toggleClass("can-scroll",this.scrollTarget.offsetHeight<this.scrollTarget.scrollHeight),this.toggleClass("scrolled-to-bottom",this.scrollTarget.scrollTop+this.scrollTarget.offsetHeight>=this.scrollTarget.scrollHeight)},_ensureTarget:function(){this.dialogElement=this.dialogElement||this.parentElement,this.dialogElement&&this.dialogElement.behaviors&&this.dialogElement.behaviors.indexOf(
|
|
1973
|
+
`,is:"paper-dialog-scrollable",properties:{dialogElement:{type:Object}},get scrollTarget(){return this.$.scrollable},ready:function(){this._ensureTarget(),this.classList.add("no-padding")},attached:function(){this._ensureTarget(),requestAnimationFrame(this.updateScrollState.bind(this))},updateScrollState:function(){this.toggleClass("is-scrolled",this.scrollTarget.scrollTop>0),this.toggleClass("can-scroll",this.scrollTarget.offsetHeight<this.scrollTarget.scrollHeight),this.toggleClass("scrolled-to-bottom",this.scrollTarget.scrollTop+this.scrollTarget.offsetHeight>=this.scrollTarget.scrollHeight)},_ensureTarget:function(){this.dialogElement=this.dialogElement||this.parentElement,this.dialogElement&&this.dialogElement.behaviors&&this.dialogElement.behaviors.indexOf(Na)>=0?(this.dialogElement.sizingTarget=this.scrollTarget,this.scrollTarget.classList.remove("fit")):this.dialogElement&&this.scrollTarget.classList.add("fit")}});
|
|
1983
1974
|
/**
|
|
1984
1975
|
@license
|
|
1985
1976
|
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
|
@@ -1990,7 +1981,7 @@ found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
|
|
|
1990
1981
|
part of the polymer project is also subject to an additional IP rights grant
|
|
1991
1982
|
found at http://polymer.github.io/PATENTS.txt
|
|
1992
1983
|
*/
|
|
1993
|
-
const
|
|
1984
|
+
const Ra=Ss({_template:ir`
|
|
1994
1985
|
<style>
|
|
1995
1986
|
:host {
|
|
1996
1987
|
display: inline-block;
|
|
@@ -1999,7 +1990,7 @@ const Oa=xs({_template:Qs`
|
|
|
1999
1990
|
}
|
|
2000
1991
|
</style>
|
|
2001
1992
|
<div aria-live$="[[mode]]">[[_text]]</div>
|
|
2002
|
-
`,is:"iron-a11y-announcer",properties:{mode:{type:String,value:"polite"},timeout:{type:Number,value:150},_text:{type:String,value:""}},created:function(){
|
|
1993
|
+
`,is:"iron-a11y-announcer",properties:{mode:{type:String,value:"polite"},timeout:{type:Number,value:150},_text:{type:String,value:""}},created:function(){Ra.instance||(Ra.instance=this),document.addEventListener("iron-announce",this._onIronAnnounce.bind(this))},announce:function(e){this._text="",this.async((function(){this._text=e}),this.timeout)},_onIronAnnounce:function(e){e.detail&&e.detail.text&&this.announce(e.detail.text)}});Ra.instance=null,Ra.requestAvailability=function(){Ra.instance||(Ra.instance=document.createElement("iron-a11y-announcer")),document.body?document.body.appendChild(Ra.instance):document.addEventListener("load",(function(){document.body.appendChild(Ra.instance)}))};
|
|
2003
1994
|
/**
|
|
2004
1995
|
@license
|
|
2005
1996
|
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
|
@@ -2010,7 +2001,7 @@ found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
|
|
|
2010
2001
|
part of the polymer project is also subject to an additional IP rights grant
|
|
2011
2002
|
found at http://polymer.github.io/PATENTS.txt
|
|
2012
2003
|
*/
|
|
2013
|
-
let
|
|
2004
|
+
let Ma=null;const za={properties:{validator:{type:String},invalid:{notify:!0,reflectToAttribute:!0,type:Boolean,value:!1,observer:"_invalidChanged"}},registered:function(){Ma=new vr({type:"validator"})},_invalidChanged:function(){this.invalid?this.setAttribute("aria-invalid","true"):this.removeAttribute("aria-invalid")},get _validator(){return Ma&&Ma.byKey(this.validator)},hasValidator:function(){return null!=this._validator},validate:function(e){return void 0===e&&void 0!==this.value?this.invalid=!this._getValidity(this.value):this.invalid=!this._getValidity(e),!this.invalid},_getValidity:function(e){return!this.hasValidator()||this._validator.validate(e)}};
|
|
2014
2005
|
/**
|
|
2015
2006
|
@license
|
|
2016
2007
|
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
|
@@ -2020,14 +2011,14 @@ http://polymer.github.io/AUTHORS.txt The complete set of contributors may be
|
|
|
2020
2011
|
found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
|
|
2021
2012
|
part of the polymer project is also subject to an additional IP rights grant
|
|
2022
2013
|
found at http://polymer.github.io/PATENTS.txt
|
|
2023
|
-
*/
|
|
2014
|
+
*/Ss({_template:ir`
|
|
2024
2015
|
<style>
|
|
2025
2016
|
:host {
|
|
2026
2017
|
display: inline-block;
|
|
2027
2018
|
}
|
|
2028
2019
|
</style>
|
|
2029
2020
|
<slot id="content"></slot>
|
|
2030
|
-
`,is:"iron-input",behaviors:[
|
|
2021
|
+
`,is:"iron-input",behaviors:[za],properties:{bindValue:{type:String,value:""},value:{type:String,computed:"_computeValue(bindValue)"},allowedPattern:{type:String},autoValidate:{type:Boolean,value:!1},_inputElement:Object},observers:["_bindValueChanged(bindValue, _inputElement)"],listeners:{input:"_onInput",keypress:"_onKeypress"},created:function(){Ra.requestAvailability(),this._previousValidInput="",this._patternAlreadyChecked=!1},attached:function(){this._observer=is(this).observeNodes(function(e){this._initSlottedInput()}.bind(this))},detached:function(){this._observer&&(is(this).unobserveNodes(this._observer),this._observer=null)},get inputElement(){return this._inputElement},_initSlottedInput:function(){this._inputElement=this.getEffectiveChildren()[0],this.inputElement&&this.inputElement.value&&(this.bindValue=this.inputElement.value),this.fire("iron-input-ready")},get _patternRegExp(){var e;if(this.allowedPattern)e=new RegExp(this.allowedPattern);else switch(this.inputElement.type){case"number":e=/[0-9.,e-]/}return e},_bindValueChanged:function(e,t){t&&(void 0===e?t.value=null:e!==t.value&&(this.inputElement.value=e),this.autoValidate&&this.validate(),this.fire("bind-value-changed",{value:e}))},_onInput:function(){this.allowedPattern&&!this._patternAlreadyChecked&&(this._checkPatternValidity()||(this._announceInvalidCharacter("Invalid string of characters not entered."),this.inputElement.value=this._previousValidInput));this.bindValue=this._previousValidInput=this.inputElement.value,this._patternAlreadyChecked=!1},_isPrintable:function(e){var t=8==e.keyCode||9==e.keyCode||13==e.keyCode||27==e.keyCode,i=19==e.keyCode||20==e.keyCode||45==e.keyCode||46==e.keyCode||144==e.keyCode||145==e.keyCode||e.keyCode>32&&e.keyCode<41||e.keyCode>111&&e.keyCode<124;return!(t||0==e.charCode&&i)},_onKeypress:function(e){if(this.allowedPattern||"number"===this.inputElement.type){var t=this._patternRegExp;if(t&&!(e.metaKey||e.ctrlKey||e.altKey)){this._patternAlreadyChecked=!0;var i=String.fromCharCode(e.charCode);this._isPrintable(e)&&!t.test(i)&&(e.preventDefault(),this._announceInvalidCharacter("Invalid character "+i+" not entered."))}}},_checkPatternValidity:function(){var e=this._patternRegExp;if(!e)return!0;for(var t=0;t<this.inputElement.value.length;t++)if(!e.test(this.inputElement.value[t]))return!1;return!0},validate:function(){if(!this.inputElement)return this.invalid=!1,!0;var e=this.inputElement.checkValidity();return e&&(this.required&&""===this.bindValue?e=!1:this.hasValidator()&&(e=za.validate.call(this,this.bindValue))),this.invalid=!e,this.fire("iron-input-validate"),e},_announceInvalidCharacter:function(e){this.fire("iron-announce",{text:e})},_computeValue:function(e){return e}});
|
|
2031
2022
|
/**
|
|
2032
2023
|
@license
|
|
2033
2024
|
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
|
@@ -2038,7 +2029,7 @@ found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
|
|
|
2038
2029
|
part of the polymer project is also subject to an additional IP rights grant
|
|
2039
2030
|
found at http://polymer.github.io/PATENTS.txt
|
|
2040
2031
|
*/
|
|
2041
|
-
const
|
|
2032
|
+
const Fa={attached:function(){this.fire("addon-attached")},update:function(e){}};
|
|
2042
2033
|
/**
|
|
2043
2034
|
@license
|
|
2044
2035
|
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
|
@@ -2048,7 +2039,7 @@ http://polymer.github.io/AUTHORS.txt The complete set of contributors may be
|
|
|
2048
2039
|
found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
|
|
2049
2040
|
part of the polymer project is also subject to an additional IP rights grant
|
|
2050
2041
|
found at http://polymer.github.io/PATENTS.txt
|
|
2051
|
-
*/
|
|
2042
|
+
*/Ss({_template:ir`
|
|
2052
2043
|
<style>
|
|
2053
2044
|
:host {
|
|
2054
2045
|
display: inline-block;
|
|
@@ -2068,7 +2059,7 @@ found at http://polymer.github.io/PATENTS.txt
|
|
|
2068
2059
|
</style>
|
|
2069
2060
|
|
|
2070
2061
|
<span>[[_charCounterStr]]</span>
|
|
2071
|
-
`,is:"paper-input-char-counter",behaviors:[
|
|
2062
|
+
`,is:"paper-input-char-counter",behaviors:[Fa],properties:{_charCounterStr:{type:String,value:"0"}},update:function(e){if(e.inputElement){e.value=e.value||"";var t=e.value.toString().length.toString();e.inputElement.hasAttribute("maxlength")&&(t+="/"+e.inputElement.getAttribute("maxlength")),this._charCounterStr=t}}});
|
|
2072
2063
|
/**
|
|
2073
2064
|
@license
|
|
2074
2065
|
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
|
@@ -2079,7 +2070,7 @@ found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
|
|
|
2079
2070
|
part of the polymer project is also subject to an additional IP rights grant
|
|
2080
2071
|
found at http://polymer.github.io/PATENTS.txt
|
|
2081
2072
|
*/
|
|
2082
|
-
const
|
|
2073
|
+
const Da=ir`
|
|
2083
2074
|
<custom-style>
|
|
2084
2075
|
<style is="custom-style">
|
|
2085
2076
|
html {
|
|
@@ -2103,7 +2094,7 @@ const Ra=Qs`
|
|
|
2103
2094
|
}
|
|
2104
2095
|
</style>
|
|
2105
2096
|
</custom-style>
|
|
2106
|
-
`;
|
|
2097
|
+
`;Da.setAttribute("style","display: none;"),document.head.appendChild(Da.content),Ss({_template:ir`
|
|
2107
2098
|
<style>
|
|
2108
2099
|
:host {
|
|
2109
2100
|
display: block;
|
|
@@ -2354,7 +2345,7 @@ const Ra=Qs`
|
|
|
2354
2345
|
<div class$="[[_computeAddOnContentClass(focused,invalid)]]">
|
|
2355
2346
|
<slot name="add-on"></slot>
|
|
2356
2347
|
</div>
|
|
2357
|
-
`,is:"paper-input-container",properties:{noLabelFloat:{type:Boolean,value:!1},alwaysFloatLabel:{type:Boolean,value:!1},attrForValue:{type:String,value:"bind-value"},autoValidate:{type:Boolean,value:!1},invalid:{observer:"_invalidChanged",type:Boolean,value:!1},focused:{readOnly:!0,type:Boolean,value:!1,notify:!0},_addons:{type:Array},_inputHasContent:{type:Boolean,value:!1},_inputSelector:{type:String,value:"input,iron-input,textarea,.paper-input-input"},_boundOnFocus:{type:Function,value:function(){return this._onFocus.bind(this)}},_boundOnBlur:{type:Function,value:function(){return this._onBlur.bind(this)}},_boundOnInput:{type:Function,value:function(){return this._onInput.bind(this)}},_boundValueChanged:{type:Function,value:function(){return this._onValueChanged.bind(this)}}},listeners:{"addon-attached":"_onAddonAttached","iron-input-validate":"_onIronInputValidate"},get _valueChangedEvent(){return this.attrForValue+"-changed"},get _propertyForValue(){return kt(this.attrForValue)},get _inputElement(){return
|
|
2348
|
+
`,is:"paper-input-container",properties:{noLabelFloat:{type:Boolean,value:!1},alwaysFloatLabel:{type:Boolean,value:!1},attrForValue:{type:String,value:"bind-value"},autoValidate:{type:Boolean,value:!1},invalid:{observer:"_invalidChanged",type:Boolean,value:!1},focused:{readOnly:!0,type:Boolean,value:!1,notify:!0},_addons:{type:Array},_inputHasContent:{type:Boolean,value:!1},_inputSelector:{type:String,value:"input,iron-input,textarea,.paper-input-input"},_boundOnFocus:{type:Function,value:function(){return this._onFocus.bind(this)}},_boundOnBlur:{type:Function,value:function(){return this._onBlur.bind(this)}},_boundOnInput:{type:Function,value:function(){return this._onInput.bind(this)}},_boundValueChanged:{type:Function,value:function(){return this._onValueChanged.bind(this)}}},listeners:{"addon-attached":"_onAddonAttached","iron-input-validate":"_onIronInputValidate"},get _valueChangedEvent(){return this.attrForValue+"-changed"},get _propertyForValue(){return kt(this.attrForValue)},get _inputElement(){return is(this).querySelector(this._inputSelector)},get _inputElementValue(){return this._inputElement[this._propertyForValue]||this._inputElement.value},ready:function(){this.__isFirstValueUpdate=!0,this._addons||(this._addons=[]),this.addEventListener("focus",this._boundOnFocus,!0),this.addEventListener("blur",this._boundOnBlur,!0)},attached:function(){this.attrForValue?this._inputElement.addEventListener(this._valueChangedEvent,this._boundValueChanged):this.addEventListener("input",this._onInput),this._inputElementValue&&""!=this._inputElementValue?this._handleValueAndAutoValidate(this._inputElement):this._handleValue(this._inputElement)},_onAddonAttached:function(e){this._addons||(this._addons=[]);var t=e.target;-1===this._addons.indexOf(t)&&(this._addons.push(t),this.isAttached&&this._handleValue(this._inputElement))},_onFocus:function(){this._setFocused(!0)},_onBlur:function(){this._setFocused(!1),this._handleValueAndAutoValidate(this._inputElement)},_onInput:function(e){this._handleValueAndAutoValidate(e.target)},_onValueChanged:function(e){var t=e.target;this.__isFirstValueUpdate&&(this.__isFirstValueUpdate=!1,void 0===t.value||""===t.value)||this._handleValueAndAutoValidate(e.target)},_handleValue:function(e){var t=this._inputElementValue;t||0===t||"number"===e.type&&!e.checkValidity()?this._inputHasContent=!0:this._inputHasContent=!1,this.updateAddons({inputElement:e,value:t,invalid:this.invalid})},_handleValueAndAutoValidate:function(e){var t;this.autoValidate&&e&&(t=e.validate?e.validate(this._inputElementValue):e.checkValidity(),this.invalid=!t);this._handleValue(e)},_onIronInputValidate:function(e){this.invalid=this._inputElement.invalid},_invalidChanged:function(){this._addons&&this.updateAddons({invalid:this.invalid})},updateAddons:function(e){for(var t,i=0;t=this._addons[i];i++)t.update(e)},_computeInputContentClass:function(e,t,i,n,o){var s="input-content";if(e)o&&(s+=" label-is-hidden"),n&&(s+=" is-invalid");else{var r=this.querySelector("label");t||o?(s+=" label-is-floating",this.$.labelAndInputContainer.style.position="static",n?s+=" is-invalid":i&&(s+=" label-is-highlighted")):(r&&(this.$.labelAndInputContainer.style.position="relative"),n&&(s+=" is-invalid"))}return i&&(s+=" focused"),s},_computeUnderlineClass:function(e,t){var i="underline";return t?i+=" is-invalid":e&&(i+=" is-highlighted"),i},_computeAddOnContentClass:function(e,t){var i="add-on-content";return t?i+=" is-invalid":e&&(i+=" is-highlighted"),i}}),
|
|
2358
2349
|
/**
|
|
2359
2350
|
@license
|
|
2360
2351
|
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
|
@@ -2365,7 +2356,7 @@ found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
|
|
|
2365
2356
|
part of the polymer project is also subject to an additional IP rights grant
|
|
2366
2357
|
found at http://polymer.github.io/PATENTS.txt
|
|
2367
2358
|
*/
|
|
2368
|
-
|
|
2359
|
+
Ss({_template:ir`
|
|
2369
2360
|
<style>
|
|
2370
2361
|
:host {
|
|
2371
2362
|
display: inline-block;
|
|
@@ -2405,7 +2396,7 @@ xs({_template:Qs`
|
|
|
2405
2396
|
<div id="a11yWrapper">
|
|
2406
2397
|
<slot></slot>
|
|
2407
2398
|
</div>
|
|
2408
|
-
`,is:"paper-input-error",behaviors:[
|
|
2399
|
+
`,is:"paper-input-error",behaviors:[Fa],properties:{invalid:{readOnly:!0,reflectToAttribute:!0,type:Boolean}},update:function(e){this._setInvalid(e.invalid)}});
|
|
2409
2400
|
/**
|
|
2410
2401
|
@license
|
|
2411
2402
|
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
|
@@ -2416,7 +2407,7 @@ found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
|
|
|
2416
2407
|
part of the polymer project is also subject to an additional IP rights grant
|
|
2417
2408
|
found at http://polymer.github.io/PATENTS.txt
|
|
2418
2409
|
*/
|
|
2419
|
-
const
|
|
2410
|
+
const La={properties:{name:{type:String},value:{notify:!0,type:String},required:{type:Boolean,value:!1}},attached:function(){},detached:function(){}},Ba={NextLabelID:1,NextAddonID:1,NextInputID:1},Ha={properties:{label:{type:String},value:{notify:!0,type:String},disabled:{type:Boolean,value:!1},invalid:{type:Boolean,value:!1,notify:!0},allowedPattern:{type:String},type:{type:String},list:{type:String},pattern:{type:String},required:{type:Boolean,value:!1},errorMessage:{type:String},charCounter:{type:Boolean,value:!1},noLabelFloat:{type:Boolean,value:!1},alwaysFloatLabel:{type:Boolean,value:!1},autoValidate:{type:Boolean,value:!1},validator:{type:String},autocomplete:{type:String,value:"off"},autofocus:{type:Boolean,observer:"_autofocusChanged"},inputmode:{type:String},minlength:{type:Number},maxlength:{type:Number},min:{type:String},max:{type:String},step:{type:String},name:{type:String},placeholder:{type:String,value:""},readonly:{type:Boolean,value:!1},size:{type:Number},autocapitalize:{type:String,value:"none"},autocorrect:{type:String,value:"off"},autosave:{type:String},results:{type:Number},accept:{type:String},multiple:{type:Boolean},_ariaDescribedBy:{type:String,value:""},_ariaLabelledBy:{type:String,value:""},_inputId:{type:String,value:""}},listeners:{"addon-attached":"_onAddonAttached"},keyBindings:{"shift+tab:keydown":"_onShiftTabDown"},hostAttributes:{tabindex:0},get inputElement(){return this.$||(this.$={}),this.$.input||(this._generateInputId(),this.$.input=this.$$("#"+this._inputId)),this.$.input},get _focusableElement(){return this.inputElement},created:function(){this._typesThatHaveText=["date","datetime","datetime-local","month","time","week","file"]},attached:function(){this._updateAriaLabelledBy(),!or&&this.inputElement&&-1!==this._typesThatHaveText.indexOf(this.inputElement.type)&&(this.alwaysFloatLabel=!0)},_appendStringWithSpace:function(e,t){return e=e?e+" "+t:t},_onAddonAttached:function(e){var t=is(e).rootTarget;if(t.id)this._ariaDescribedBy=this._appendStringWithSpace(this._ariaDescribedBy,t.id);else{var i="paper-input-add-on-"+Ba.NextAddonID++;t.id=i,this._ariaDescribedBy=this._appendStringWithSpace(this._ariaDescribedBy,i)}},validate:function(){return this.inputElement.validate()},_focusBlurHandler:function(e){kr._focusBlurHandler.call(this,e),this.focused&&!this._shiftTabPressed&&this._focusableElement&&this._focusableElement.focus()},_onShiftTabDown:function(e){var t=this.getAttribute("tabindex");this._shiftTabPressed=!0,this.setAttribute("tabindex","-1"),this.async((function(){this.setAttribute("tabindex",t),this._shiftTabPressed=!1}),1)},_handleAutoValidate:function(){this.autoValidate&&this.validate()},updateValueAndPreserveCaret:function(e){try{var t=this.inputElement.selectionStart;this.value=e,this.inputElement.selectionStart=t,this.inputElement.selectionEnd=t}catch(t){this.value=e}},_computeAlwaysFloatLabel:function(e,t){return t||e},_updateAriaLabelledBy:function(){var e,t=is(this.root).querySelector("label");t?(t.id?e=t.id:(e="paper-input-label-"+Ba.NextLabelID++,t.id=e),this._ariaLabelledBy=e):this._ariaLabelledBy=""},_generateInputId:function(){this._inputId&&""!==this._inputId||(this._inputId="input-"+Ba.NextInputID++)},_onChange:function(e){this.shadowRoot&&this.fire(e.type,{sourceEvent:e},{node:this,bubbles:e.bubbles,cancelable:e.cancelable})},_autofocusChanged:function(){if(this.autofocus&&this._focusableElement){var e=document.activeElement;e instanceof HTMLElement&&e!==document.body&&e!==document.documentElement||this._focusableElement.focus()}}},ja=[kr,qr,Ha];
|
|
2420
2411
|
/**
|
|
2421
2412
|
@license
|
|
2422
2413
|
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
|
@@ -2437,7 +2428,7 @@ found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
|
|
|
2437
2428
|
part of the polymer project is also subject to an additional IP rights grant
|
|
2438
2429
|
found at http://polymer.github.io/PATENTS.txt
|
|
2439
2430
|
*/
|
|
2440
|
-
|
|
2431
|
+
Ss({is:"paper-input",_template:ir`
|
|
2441
2432
|
<style>
|
|
2442
2433
|
:host {
|
|
2443
2434
|
display: block;
|
|
@@ -2541,7 +2532,7 @@ xs({is:"paper-input",_template:Qs`
|
|
|
2541
2532
|
</template>
|
|
2542
2533
|
|
|
2543
2534
|
</paper-input-container>
|
|
2544
|
-
`,behaviors:[
|
|
2535
|
+
`,behaviors:[ja,La],properties:{value:{type:String},inputRole:{type:String,value:void 0},inputAriaHaspopup:{type:String,value:void 0}},get _focusableElement(){return this.inputElement._inputElement},listeners:{"iron-input-ready":"_onIronInputReady"},_onIronInputReady:function(){this.$.nativeInput||(this.$.nativeInput=this.$$("input")),this.inputElement&&-1!==this._typesThatHaveText.indexOf(this.$.nativeInput.type)&&(this.alwaysFloatLabel=!0),this.inputElement.bindValue&&this.$.container._handleValueAndAutoValidate(this.inputElement)}});
|
|
2545
2536
|
/**
|
|
2546
2537
|
@license
|
|
2547
2538
|
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
|
@@ -2552,7 +2543,7 @@ found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
|
|
|
2552
2543
|
part of the polymer project is also subject to an additional IP rights grant
|
|
2553
2544
|
found at http://polymer.github.io/PATENTS.txt
|
|
2554
2545
|
*/
|
|
2555
|
-
const
|
|
2546
|
+
const qa=ir`
|
|
2556
2547
|
<style include="paper-material-styles">
|
|
2557
2548
|
/* Need to specify the same specificity as the styles imported from paper-material. */
|
|
2558
2549
|
:host {
|
|
@@ -2638,7 +2629,7 @@ const La=Qs`
|
|
|
2638
2629
|
}
|
|
2639
2630
|
</style>
|
|
2640
2631
|
|
|
2641
|
-
<slot></slot>`;
|
|
2632
|
+
<slot></slot>`;qa.setAttribute("strip-whitespace",""),Ss({_template:qa,is:"paper-button",behaviors:[Xr],properties:{raised:{type:Boolean,reflectToAttribute:!0,value:!1,observer:"_calculateElevation"}},_calculateElevation:function(){this.raised?Jr._calculateElevation.apply(this):this._setElevation(0)}}),
|
|
2642
2633
|
/**
|
|
2643
2634
|
@license
|
|
2644
2635
|
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
|
@@ -2649,7 +2640,7 @@ found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
|
|
|
2649
2640
|
part of the polymer project is also subject to an additional IP rights grant
|
|
2650
2641
|
found at http://polymer.github.io/PATENTS.txt
|
|
2651
2642
|
*/
|
|
2652
|
-
|
|
2643
|
+
Ss({_template:ir`
|
|
2653
2644
|
<style>
|
|
2654
2645
|
:host {
|
|
2655
2646
|
position: fixed;
|
|
@@ -2668,7 +2659,7 @@ xs({_template:Qs`
|
|
|
2668
2659
|
<div id="contentWrapper">
|
|
2669
2660
|
<slot id="content" name="dropdown-content"></slot>
|
|
2670
2661
|
</div>
|
|
2671
|
-
`,is:"iron-dropdown",behaviors:[
|
|
2662
|
+
`,is:"iron-dropdown",behaviors:[kr,qr,Ia,ia],properties:{horizontalAlign:{type:String,value:"left",reflectToAttribute:!0},verticalAlign:{type:String,value:"top",reflectToAttribute:!0},openAnimationConfig:{type:Object},closeAnimationConfig:{type:Object},focusTarget:{type:Object},noAnimations:{type:Boolean,value:!1},allowOutsideScroll:{type:Boolean,value:!1,observer:"_allowOutsideScrollChanged"}},listeners:{"neon-animation-finish":"_onNeonAnimationFinish"},observers:["_updateOverlayPosition(positionTarget, verticalAlign, horizontalAlign, verticalOffset, horizontalOffset)"],get containedElement(){for(var e=is(this.$.content).getDistributedNodes(),t=0,i=e.length;t<i;t++)if(e[t].nodeType===Node.ELEMENT_NODE)return e[t]},ready:function(){this.scrollAction||(this.scrollAction=this.allowOutsideScroll?"refit":"lock"),this._readied=!0},attached:function(){this.sizingTarget&&this.sizingTarget!==this||(this.sizingTarget=this.containedElement||this)},detached:function(){this.cancelAnimation()},_openedChanged:function(){this.opened&&this.disabled?this.cancel():(this.cancelAnimation(),this._updateAnimationConfig(),Pa._openedChanged.apply(this,arguments))},_renderOpened:function(){!this.noAnimations&&this.animationConfig.open?(this.$.contentWrapper.classList.add("animating"),this.playAnimation("open")):Pa._renderOpened.apply(this,arguments)},_renderClosed:function(){!this.noAnimations&&this.animationConfig.close?(this.$.contentWrapper.classList.add("animating"),this.playAnimation("close")):Pa._renderClosed.apply(this,arguments)},_onNeonAnimationFinish:function(){this.$.contentWrapper.classList.remove("animating"),this.opened?this._finishRenderOpened():this._finishRenderClosed()},_updateAnimationConfig:function(){for(var e=this.containedElement,t=[].concat(this.openAnimationConfig||[]).concat(this.closeAnimationConfig||[]),i=0;i<t.length;i++)t[i].node=e;this.animationConfig={open:this.openAnimationConfig,close:this.closeAnimationConfig}},_updateOverlayPosition:function(){this.isAttached&&this.notifyResize()},_allowOutsideScrollChanged:function(e){this._readied&&(e?this.scrollAction&&"lock"!==this.scrollAction||(this.scrollAction="refit"):this.scrollAction="lock")},_applyFocus:function(){var e=this.focusTarget||this.containedElement;e&&this.opened&&!this.noAutoFocus?e.focus():Pa._applyFocus.apply(this,arguments)}});
|
|
2672
2663
|
/**
|
|
2673
2664
|
@license
|
|
2674
2665
|
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
|
@@ -2679,7 +2670,7 @@ found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
|
|
|
2679
2670
|
part of the polymer project is also subject to an additional IP rights grant
|
|
2680
2671
|
found at http://polymer.github.io/PATENTS.txt
|
|
2681
2672
|
*/
|
|
2682
|
-
const
|
|
2673
|
+
const Va={properties:{animationTiming:{type:Object,value:function(){return{duration:500,easing:"cubic-bezier(0.4, 0, 0.2, 1)",fill:"both"}}}},isNeonAnimation:!0,created:function(){document.body.animate||console.warn("No web animations detected. This element will not function without a web animations polyfill.")},timingFromConfig:function(e){if(e.timing)for(var t in e.timing)this.animationTiming[t]=e.timing[t];return this.animationTiming},setPrefixedProperty:function(e,t,i){for(var n,o={transform:["webkitTransform"],transformOrigin:["mozTransformOrigin","webkitTransformOrigin"]}[t],s=0;n=o[s];s++)e.style[n]=i;e.style[t]=i},complete:function(e){}};
|
|
2683
2674
|
/**
|
|
2684
2675
|
@license
|
|
2685
2676
|
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
|
@@ -2689,7 +2680,7 @@ http://polymer.github.io/AUTHORS.txt The complete set of contributors may be
|
|
|
2689
2680
|
found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
|
|
2690
2681
|
part of the polymer project is also subject to an additional IP rights grant
|
|
2691
2682
|
found at http://polymer.github.io/PATENTS.txt
|
|
2692
|
-
*/
|
|
2683
|
+
*/Ss({is:"fade-in-animation",behaviors:[Va],configure:function(e){var t=e.node;return this._effect=new KeyframeEffect(t,[{opacity:"0"},{opacity:"1"}],this.timingFromConfig(e)),this._effect}}),
|
|
2693
2684
|
/**
|
|
2694
2685
|
@license
|
|
2695
2686
|
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
|
@@ -2700,7 +2691,7 @@ found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
|
|
|
2700
2691
|
part of the polymer project is also subject to an additional IP rights grant
|
|
2701
2692
|
found at http://polymer.github.io/PATENTS.txt
|
|
2702
2693
|
*/
|
|
2703
|
-
|
|
2694
|
+
Ss({is:"fade-out-animation",behaviors:[Va],configure:function(e){var t=e.node;return this._effect=new KeyframeEffect(t,[{opacity:"1"},{opacity:"0"}],this.timingFromConfig(e)),this._effect}}),
|
|
2704
2695
|
/**
|
|
2705
2696
|
@license
|
|
2706
2697
|
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
|
@@ -2711,7 +2702,7 @@ found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
|
|
|
2711
2702
|
part of the polymer project is also subject to an additional IP rights grant
|
|
2712
2703
|
found at http://polymer.github.io/PATENTS.txt
|
|
2713
2704
|
*/
|
|
2714
|
-
|
|
2705
|
+
Ss({is:"paper-menu-grow-height-animation",_template:null,behaviors:[Va],configure:function(e){var t=e.node,i=t.getBoundingClientRect().height;return this._effect=new KeyframeEffect(t,[{height:i/2+"px"},{height:i+"px"}],this.timingFromConfig(e)),this._effect}}),Ss({is:"paper-menu-grow-width-animation",_template:null,behaviors:[Va],configure:function(e){var t=e.node,i=t.getBoundingClientRect().width;return this._effect=new KeyframeEffect(t,[{width:i/2+"px"},{width:i+"px"}],this.timingFromConfig(e)),this._effect}}),Ss({is:"paper-menu-shrink-width-animation",_template:null,behaviors:[Va],configure:function(e){var t=e.node,i=t.getBoundingClientRect().width;return this._effect=new KeyframeEffect(t,[{width:i+"px"},{width:i-i/20+"px"}],this.timingFromConfig(e)),this._effect}}),Ss({is:"paper-menu-shrink-height-animation",_template:null,behaviors:[Va],configure:function(e){var t=e.node,i=t.getBoundingClientRect().height;return this.setPrefixedProperty(t,"transformOrigin","0 0"),this._effect=new KeyframeEffect(t,[{height:i+"px",transform:"translateY(0)"},{height:i/2+"px",transform:"translateY(-20px)"}],this.timingFromConfig(e)),this._effect}});
|
|
2715
2706
|
/**
|
|
2716
2707
|
@license
|
|
2717
2708
|
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
|
@@ -2722,7 +2713,7 @@ found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
|
|
|
2722
2713
|
part of the polymer project is also subject to an additional IP rights grant
|
|
2723
2714
|
found at http://polymer.github.io/PATENTS.txt
|
|
2724
2715
|
*/
|
|
2725
|
-
var
|
|
2716
|
+
var $a={ANIMATION_CUBIC_BEZIER:"cubic-bezier(.3,.95,.5,1)",MAX_ANIMATION_TIME_MS:400};const Ua=Ss({_template:ir`
|
|
2726
2717
|
<style>
|
|
2727
2718
|
:host {
|
|
2728
2719
|
display: inline-block;
|
|
@@ -2780,7 +2771,7 @@ var Ha={ANIMATION_CUBIC_BEZIER:"cubic-bezier(.3,.95,.5,1)",MAX_ANIMATION_TIME_MS
|
|
|
2780
2771
|
<slot id="content" name="dropdown-content"></slot>
|
|
2781
2772
|
</div>
|
|
2782
2773
|
</iron-dropdown>
|
|
2783
|
-
`,is:"paper-menu-button",behaviors:[
|
|
2774
|
+
`,is:"paper-menu-button",behaviors:[qr,kr],properties:{opened:{type:Boolean,value:!1,notify:!0,observer:"_openedChanged"},horizontalAlign:{type:String,value:"left",reflectToAttribute:!0},verticalAlign:{type:String,value:"top",reflectToAttribute:!0},dynamicAlign:{type:Boolean},horizontalOffset:{type:Number,value:0,notify:!0},verticalOffset:{type:Number,value:0,notify:!0},noOverlap:{type:Boolean},noAnimations:{type:Boolean,value:!1},ignoreSelect:{type:Boolean,value:!1},closeOnActivate:{type:Boolean,value:!1},openAnimationConfig:{type:Object,value:function(){return[{name:"fade-in-animation",timing:{delay:100,duration:200}},{name:"paper-menu-grow-width-animation",timing:{delay:100,duration:150,easing:$a.ANIMATION_CUBIC_BEZIER}},{name:"paper-menu-grow-height-animation",timing:{delay:100,duration:275,easing:$a.ANIMATION_CUBIC_BEZIER}}]}},closeAnimationConfig:{type:Object,value:function(){return[{name:"fade-out-animation",timing:{duration:150}},{name:"paper-menu-shrink-width-animation",timing:{delay:100,duration:50,easing:$a.ANIMATION_CUBIC_BEZIER}},{name:"paper-menu-shrink-height-animation",timing:{duration:200,easing:"ease-in"}}]}},allowOutsideScroll:{type:Boolean,value:!1},restoreFocusOnClose:{type:Boolean,value:!0},expandSizingTargetForScrollbars:{type:Boolean,value:!1},_dropdownContent:{type:Object}},hostAttributes:{role:"group","aria-haspopup":"true"},listeners:{"iron-activate":"_onIronActivate","iron-select":"_onIronSelect"},get contentElement(){for(var e=is(this.$.content).getDistributedNodes(),t=0,i=e.length;t<i;t++)if(e[t].nodeType===Node.ELEMENT_NODE)return e[t]},toggle:function(){this.opened?this.close():this.open()},open:function(){this.disabled||this.$.dropdown.open()},close:function(){this.$.dropdown.close()},_onIronSelect:function(e){this.ignoreSelect||this.close()},_onIronActivate:function(e){this.closeOnActivate&&this.close()},_openedChanged:function(e,t){e?(this._dropdownContent=this.contentElement,this.fire("paper-dropdown-open")):null!=t&&this.fire("paper-dropdown-close")},_disabledChanged:function(e){kr._disabledChanged.apply(this,arguments),e&&this.opened&&this.close()},__onIronOverlayCanceled:function(e){var t=e.detail,i=this.$.trigger;is(t).path.indexOf(i)>-1&&e.preventDefault()}});Object.keys($a).forEach((function(e){Ua[e]=$a[e]}));
|
|
2784
2775
|
/**
|
|
2785
2776
|
@license
|
|
2786
2777
|
Copyright (c) 2016 The Polymer Project Authors. All rights reserved.
|
|
@@ -2791,7 +2782,7 @@ found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
|
|
|
2791
2782
|
part of the polymer project is also subject to an additional IP rights grant
|
|
2792
2783
|
found at http://polymer.github.io/PATENTS.txt
|
|
2793
2784
|
*/
|
|
2794
|
-
const
|
|
2785
|
+
const Ka=document.createElement("template");Ka.setAttribute("style","display: none;"),Ka.innerHTML='<iron-iconset-svg name="paper-dropdown-menu" size="24">\n<svg><defs>\n<g id="arrow-drop-down"><path d="M7 10l5 5 5-5z"></path></g>\n</defs></svg>\n</iron-iconset-svg>',document.head.appendChild(Ka.content);
|
|
2795
2786
|
/**
|
|
2796
2787
|
@license
|
|
2797
2788
|
Copyright (c) 2016 The Polymer Project Authors. All rights reserved.
|
|
@@ -2802,7 +2793,7 @@ found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
|
|
|
2802
2793
|
part of the polymer project is also subject to an additional IP rights grant
|
|
2803
2794
|
found at http://polymer.github.io/PATENTS.txt
|
|
2804
2795
|
*/
|
|
2805
|
-
const
|
|
2796
|
+
const Ya=document.createElement("template");Ya.setAttribute("style","display: none;"),Ya.innerHTML='<dom-module id="paper-dropdown-menu-shared-styles">\n <template>\n <style>\n :host {\n display: inline-block;\n position: relative;\n text-align: left;\n\n /* NOTE(cdata): Both values are needed, since some phones require the\n * value to be `transparent`.\n */\n -webkit-tap-highlight-color: rgba(0,0,0,0);\n -webkit-tap-highlight-color: transparent;\n\n --paper-input-container-input: {\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n max-width: 100%;\n box-sizing: border-box;\n cursor: pointer;\n };\n\n @apply --paper-dropdown-menu;\n }\n\n /* paper-dropdown-menu and paper-dropdown-menu-light both delegate focus\n * to other internal elements which manage focus styling. */\n :host(:focus) {\n outline: none;\n }\n\n :host(:dir(rtl)) {\n text-align: right;\n\n @apply(--paper-dropdown-menu);\n }\n\n :host([disabled]) {\n @apply --paper-dropdown-menu-disabled;\n }\n\n :host([noink]) paper-ripple {\n display: none;\n }\n\n :host([no-label-float]) paper-ripple {\n top: 8px;\n }\n\n paper-ripple {\n top: 12px;\n left: 0px;\n bottom: 8px;\n right: 0px;\n\n @apply --paper-dropdown-menu-ripple;\n }\n\n paper-menu-button {\n display: block;\n padding: 0;\n\n @apply --paper-dropdown-menu-button;\n }\n\n paper-input {\n @apply --paper-dropdown-menu-input;\n }\n\n iron-icon {\n color: var(--disabled-text-color);\n\n @apply --paper-dropdown-menu-icon;\n }\n </style>\n </template>\n</dom-module>',document.head.appendChild(Ya.content);
|
|
2806
2797
|
/**
|
|
2807
2798
|
@license
|
|
2808
2799
|
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
|
@@ -2813,7 +2804,7 @@ found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
|
|
|
2813
2804
|
part of the polymer project is also subject to an additional IP rights grant
|
|
2814
2805
|
found at http://polymer.github.io/PATENTS.txt
|
|
2815
2806
|
*/
|
|
2816
|
-
const
|
|
2807
|
+
const Wa=hs(HTMLElement);Ss({_template:ir`
|
|
2817
2808
|
<style include="paper-dropdown-menu-shared-styles"></style>
|
|
2818
2809
|
|
|
2819
2810
|
<paper-menu-button id="menuButton" vertical-align="[[verticalAlign]]" horizontal-align="[[horizontalAlign]]" dynamic-align="[[dynamicAlign]]" vertical-offset="[[_computeMenuVerticalOffset(noLabelFloat, verticalOffset)]]" disabled="[[disabled]]" no-animations="[[noAnimations]]" on-iron-select="_onIronSelect" on-iron-deselect="_onIronDeselect" opened="{{opened}}" close-on-activate allow-outside-scroll="[[allowOutsideScroll]]" restore-focus-on-close="[[restoreFocusOnClose]]" expand-sizing-target-for-scrollbars="[[expandSizingTargetForScrollbars]]">
|
|
@@ -2828,7 +2819,7 @@ const $a=cs(HTMLElement);xs({_template:Qs`
|
|
|
2828
2819
|
</div>
|
|
2829
2820
|
<slot id="content" name="dropdown-content" slot="dropdown-content"></slot>
|
|
2830
2821
|
</paper-menu-button>
|
|
2831
|
-
`,is:"paper-dropdown-menu",behaviors:[
|
|
2822
|
+
`,is:"paper-dropdown-menu",behaviors:[$r,kr,La,za],properties:{selectedItemLabel:{type:String,notify:!0,readOnly:!0},selectedItem:{type:Object,notify:!0,readOnly:!0},value:{type:String,notify:!0},label:{type:String},placeholder:{type:String},errorMessage:{type:String},opened:{type:Boolean,notify:!0,value:!1,observer:"_openedChanged"},allowOutsideScroll:{type:Boolean,value:!1},noLabelFloat:{type:Boolean,value:!1,reflectToAttribute:!0},alwaysFloatLabel:{type:Boolean,value:!1},noAnimations:{type:Boolean,value:!1},horizontalAlign:{type:String,value:"right"},verticalAlign:{type:String,value:"top"},verticalOffset:Number,dynamicAlign:{type:Boolean},restoreFocusOnClose:{type:Boolean,value:!0},expandSizingTargetForScrollbars:{type:Boolean,value:!1}},listeners:{tap:"_onTap"},keyBindings:{"up down":"open",esc:"close"},observers:["_selectedItemChanged(selectedItem)"],_attachDom(e){const t=dt(this);return t.attachShadow({mode:"open",delegatesFocus:!0,shadyUpgradeFragment:e}),t.shadowRoot.appendChild(e),Wa.prototype._attachDom.call(this,e)},focus(){this.$.input._focusableElement.focus()},attached:function(){var e=this.contentElement;e&&e.selectedItem&&this._setSelectedItem(e.selectedItem)},get contentElement(){for(var e=is(this.$.content).getDistributedNodes(),t=0,i=e.length;t<i;t++)if(e[t].nodeType===Node.ELEMENT_NODE)return e[t]},open:function(){this.$.menuButton.open()},close:function(){this.$.menuButton.close()},_onIronSelect:function(e){this._setSelectedItem(e.detail.item)},_onIronDeselect:function(e){this._setSelectedItem(null)},_onTap:function(e){ro(e)===this&&this.open()},_selectedItemChanged:function(e){var t="";t=e?e.label||e.getAttribute("label")||e.textContent.trim():"",this.value=t,this._setSelectedItemLabel(t)},_computeMenuVerticalOffset:function(e,t){return t||(e?-4:8)},_getValidity:function(e){return this.disabled||!this.required||this.required&&!!this.value},_openedChanged:function(){var e=this.opened?"true":"false",t=this.contentElement;t&&t.setAttribute("aria-expanded",e)}});
|
|
2832
2823
|
/**
|
|
2833
2824
|
@license
|
|
2834
2825
|
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
|
@@ -2839,7 +2830,7 @@ found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
|
|
|
2839
2830
|
part of the polymer project is also subject to an additional IP rights grant
|
|
2840
2831
|
found at http://polymer.github.io/PATENTS.txt
|
|
2841
2832
|
*/
|
|
2842
|
-
class
|
|
2833
|
+
class Ja{constructor(e){this.selection=[],this.selectCallback=e}get(){return this.multi?this.selection.slice():this.selection[0]}clear(e){this.selection.slice().forEach((function(t){(!e||e.indexOf(t)<0)&&this.setItemSelected(t,!1)}),this)}isSelected(e){return this.selection.indexOf(e)>=0}setItemSelected(e,t){if(null!=e&&t!==this.isSelected(e)){if(t)this.selection.push(e);else{var i=this.selection.indexOf(e);i>=0&&this.selection.splice(i,1)}this.selectCallback&&this.selectCallback(e,t)}}select(e){this.multi?this.toggle(e):this.get()!==e&&(this.setItemSelected(this.get(),!1),this.setItemSelected(e,!0))}toggle(e){this.setItemSelected(e,!this.isSelected(e))}}
|
|
2843
2834
|
/**
|
|
2844
2835
|
@license
|
|
2845
2836
|
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
|
@@ -2849,7 +2840,7 @@ http://polymer.github.io/AUTHORS.txt The complete set of contributors may be
|
|
|
2849
2840
|
found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
|
|
2850
2841
|
part of the polymer project is also subject to an additional IP rights grant
|
|
2851
2842
|
found at http://polymer.github.io/PATENTS.txt
|
|
2852
|
-
*/const
|
|
2843
|
+
*/const Xa={properties:{attrForSelected:{type:String,value:null},selected:{type:String,notify:!0},selectedItem:{type:Object,readOnly:!0,notify:!0},activateEvent:{type:String,value:"tap",observer:"_activateEventChanged"},selectable:String,selectedClass:{type:String,value:"iron-selected"},selectedAttribute:{type:String,value:null},fallbackSelection:{type:String,value:null},items:{type:Array,readOnly:!0,notify:!0,value:function(){return[]}},_excludedLocalNames:{type:Object,value:function(){return{template:1,"dom-bind":1,"dom-if":1,"dom-repeat":1}}}},observers:["_updateAttrForSelected(attrForSelected)","_updateSelected(selected)","_checkFallback(fallbackSelection)"],created:function(){this._bindFilterItem=this._filterItem.bind(this),this._selection=new Ja(this._applySelection.bind(this))},attached:function(){this._observer=this._observeItems(this),this._addListener(this.activateEvent)},detached:function(){this._observer&&is(this).unobserveNodes(this._observer),this._removeListener(this.activateEvent)},indexOf:function(e){return this.items?this.items.indexOf(e):-1},select:function(e){this.selected=e},selectPrevious:function(){var e=this.items.length,t=e-1;void 0!==this.selected&&(t=(Number(this._valueToIndex(this.selected))-1+e)%e),this.selected=this._indexToValue(t)},selectNext:function(){var e=0;void 0!==this.selected&&(e=(Number(this._valueToIndex(this.selected))+1)%this.items.length),this.selected=this._indexToValue(e)},selectIndex:function(e){this.select(this._indexToValue(e))},forceSynchronousItemUpdate:function(){this._observer&&"function"==typeof this._observer.flush?this._observer.flush():this._updateItems()},get _shouldUpdateSelection(){return null!=this.selected},_checkFallback:function(){this._updateSelected()},_addListener:function(e){this.listen(this,e,"_activateHandler")},_removeListener:function(e){this.unlisten(this,e,"_activateHandler")},_activateEventChanged:function(e,t){this._removeListener(t),this._addListener(e)},_updateItems:function(){var e=is(this).queryDistributedElements(this.selectable||"*");e=Array.prototype.filter.call(e,this._bindFilterItem),this._setItems(e)},_updateAttrForSelected:function(){this.selectedItem&&(this.selected=this._valueForItem(this.selectedItem))},_updateSelected:function(){this._selectSelected(this.selected)},_selectSelected:function(e){if(this.items){var t=this._valueToItem(this.selected);t?this._selection.select(t):this._selection.clear(),this.fallbackSelection&&this.items.length&&void 0===this._selection.get()&&(this.selected=this.fallbackSelection)}},_filterItem:function(e){return!this._excludedLocalNames[e.localName]},_valueToItem:function(e){return null==e?null:this.items[this._valueToIndex(e)]},_valueToIndex:function(e){if(!this.attrForSelected)return Number(e);for(var t,i=0;t=this.items[i];i++)if(this._valueForItem(t)==e)return i},_indexToValue:function(e){if(!this.attrForSelected)return e;var t=this.items[e];return t?this._valueForItem(t):void 0},_valueForItem:function(e){if(!e)return null;if(!this.attrForSelected){var t=this.indexOf(e);return-1===t?null:t}var i=e[kt(this.attrForSelected)];return null!=i?i:e.getAttribute(this.attrForSelected)},_applySelection:function(e,t){this.selectedClass&&this.toggleClass(this.selectedClass,t,e),this.selectedAttribute&&this.toggleAttribute(this.selectedAttribute,t,e),this._selectionChange(),this.fire("iron-"+(t?"select":"deselect"),{item:e})},_selectionChange:function(){this._setSelectedItem(this._selection.get())},_observeItems:function(e){return is(e).observeNodes((function(e){this._updateItems(),this._updateSelected(),this.fire("iron-items-changed",e,{bubbles:!1,cancelable:!1})}))},_activateHandler:function(e){for(var t=e.target,i=this.items;t&&t!=this;){var n=i.indexOf(t);if(n>=0){var o=this._indexToValue(n);return void this._itemActivate(o,t)}t=t.parentNode}},_itemActivate:function(e,t){this.fire("iron-activate",{selected:e,item:t},{cancelable:!0}).defaultPrevented||this.select(e)}},Za={properties:{multi:{type:Boolean,value:!1,observer:"multiChanged"},selectedValues:{type:Array,notify:!0,value:function(){return[]}},selectedItems:{type:Array,readOnly:!0,notify:!0,value:function(){return[]}}},observers:["_updateSelected(selectedValues.splices)"],select:function(e){this.multi?this._toggleSelected(e):this.selected=e},multiChanged:function(e){this._selection.multi=e,this._updateSelected()},get _shouldUpdateSelection(){return null!=this.selected||null!=this.selectedValues&&this.selectedValues.length},_updateAttrForSelected:function(){this.multi?this.selectedItems&&this.selectedItems.length>0&&(this.selectedValues=this.selectedItems.map((function(e){return this._indexToValue(this.indexOf(e))}),this).filter((function(e){return null!=e}),this)):Xa._updateAttrForSelected.apply(this)},_updateSelected:function(){this.multi?this._selectMulti(this.selectedValues):this._selectSelected(this.selected)},_selectMulti:function(e){e=e||[];var t=(this._valuesToItems(e)||[]).filter((function(e){return null!=e}));this._selection.clear(t);for(var i=0;i<t.length;i++)this._selection.setItemSelected(t[i],!0);this.fallbackSelection&&!this._selection.get().length&&(this._valueToItem(this.fallbackSelection)&&this.select(this.fallbackSelection))},_selectionChange:function(){var e=this._selection.get();this.multi?(this._setSelectedItems(e),this._setSelectedItem(e.length?e[0]:null)):null!=e?(this._setSelectedItems([e]),this._setSelectedItem(e)):(this._setSelectedItems([]),this._setSelectedItem(null))},_toggleSelected:function(e){var t=this.selectedValues.indexOf(e);t<0?this.push("selectedValues",e):this.splice("selectedValues",t,1)},_valuesToItems:function(e){return null==e?null:e.map((function(e){return this._valueToItem(e)}),this)}},Ga={properties:{focusedItem:{observer:"_focusedItemChanged",readOnly:!0,type:Object},attrForItemTitle:{type:String},disabled:{type:Boolean,value:!1,observer:"_disabledChanged"}},_MODIFIER_KEYS:["Alt","AltGraph","CapsLock","Control","Fn","FnLock","Hyper","Meta","NumLock","OS","ScrollLock","Shift","Super","Symbol","SymbolLock"],_SEARCH_RESET_TIMEOUT_MS:1e3,_previousTabIndex:0,hostAttributes:{role:"menu"},observers:["_updateMultiselectable(multi)"],listeners:{focus:"_onFocus",keydown:"_onKeydown","iron-items-changed":"_onIronItemsChanged"},keyBindings:{up:"_onUpKey",down:"_onDownKey",esc:"_onEscKey","shift+tab:keydown":"_onShiftTabDown"},attached:function(){this._resetTabindices()},select:function(e){this._defaultFocusAsync&&(this.cancelAsync(this._defaultFocusAsync),this._defaultFocusAsync=null);var t=this._valueToItem(e);t&&t.hasAttribute("disabled")||(this._setFocusedItem(t),Za.select.apply(this,arguments))},_resetTabindices:function(){var e=this.multi?this.selectedItems&&this.selectedItems[0]:this.selectedItem;this.items.forEach((function(t){t.setAttribute("tabindex",t===e?"0":"-1"),t.setAttribute("aria-selected",this._selection.isSelected(t))}),this)},_updateMultiselectable:function(e){e?this.setAttribute("aria-multiselectable","true"):this.removeAttribute("aria-multiselectable")},_focusWithKeyboardEvent:function(e){if(-1===this._MODIFIER_KEYS.indexOf(e.key)){this.cancelDebouncer("_clearSearchText");for(var t,i=this._searchText||"",n=(i+=(e.key&&1==e.key.length?e.key:String.fromCharCode(e.keyCode)).toLocaleLowerCase()).length,o=0;t=this.items[o];o++)if(!t.hasAttribute("disabled")){var s=this.attrForItemTitle||"textContent",r=(t[s]||t.getAttribute(s)||"").trim();if(!(r.length<n)&&r.slice(0,n).toLocaleLowerCase()==i){this._setFocusedItem(t);break}}this._searchText=i,this.debounce("_clearSearchText",this._clearSearchText,this._SEARCH_RESET_TIMEOUT_MS)}},_clearSearchText:function(){this._searchText=""},_focusPrevious:function(){for(var e=this.items.length,t=Number(this.indexOf(this.focusedItem)),i=1;i<e+1;i++){var n=this.items[(t-i+e)%e];if(!n.hasAttribute("disabled")){var o=is(n).getOwnerRoot()||document;if(this._setFocusedItem(n),is(o).activeElement==n)return}}},_focusNext:function(){for(var e=this.items.length,t=Number(this.indexOf(this.focusedItem)),i=1;i<e+1;i++){var n=this.items[(t+i)%e];if(!n.hasAttribute("disabled")){var o=is(n).getOwnerRoot()||document;if(this._setFocusedItem(n),is(o).activeElement==n)return}}},_applySelection:function(e,t){t?e.setAttribute("aria-selected","true"):e.setAttribute("aria-selected","false"),Xa._applySelection.apply(this,arguments)},_focusedItemChanged:function(e,t){t&&t.setAttribute("tabindex","-1"),!e||e.hasAttribute("disabled")||this.disabled||(e.setAttribute("tabindex","0"),e.focus())},_onIronItemsChanged:function(e){e.detail.addedNodes.length&&this._resetTabindices()},_onShiftTabDown:function(e){var t=this.getAttribute("tabindex");Ga._shiftTabPressed=!0,this._setFocusedItem(null),this.setAttribute("tabindex","-1"),this.async((function(){this.setAttribute("tabindex",t),Ga._shiftTabPressed=!1}),1)},_onFocus:function(e){if(!Ga._shiftTabPressed){var t=is(e).rootTarget;(t===this||void 0===t.tabIndex||this.isLightDescendant(t))&&(this._defaultFocusAsync=this.async((function(){var e=this.multi?this.selectedItems&&this.selectedItems[0]:this.selectedItem;this._setFocusedItem(null),e?this._setFocusedItem(e):this.items[0]&&this._focusNext()})))}},_onUpKey:function(e){this._focusPrevious(),e.detail.keyboardEvent.preventDefault()},_onDownKey:function(e){this._focusNext(),e.detail.keyboardEvent.preventDefault()},_onEscKey:function(e){var t=this.focusedItem;t&&t.blur()},_onKeydown:function(e){this.keyboardEventMatchesKeys(e,"up down esc")||this._focusWithKeyboardEvent(e),e.stopPropagation()},_activateHandler:function(e){Xa._activateHandler.call(this,e),e.stopPropagation()},_disabledChanged:function(e){e?(this._previousTabIndex=this.hasAttribute("tabindex")?this.tabIndex:0,this.removeAttribute("tabindex")):this.hasAttribute("tabindex")||this.setAttribute("tabindex",this._previousTabIndex)},_shiftTabPressed:!1},Qa=[[Xa,Za],qr,Ga];
|
|
2853
2844
|
/**
|
|
2854
2845
|
@license
|
|
2855
2846
|
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
|
@@ -2870,7 +2861,7 @@ found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
|
|
|
2870
2861
|
part of the polymer project is also subject to an additional IP rights grant
|
|
2871
2862
|
found at http://polymer.github.io/PATENTS.txt
|
|
2872
2863
|
*/
|
|
2873
|
-
|
|
2864
|
+
Ss({_template:ir`
|
|
2874
2865
|
<style>
|
|
2875
2866
|
:host {
|
|
2876
2867
|
display: block;
|
|
@@ -2884,7 +2875,7 @@ xs({_template:Qs`
|
|
|
2884
2875
|
</style>
|
|
2885
2876
|
|
|
2886
2877
|
<slot></slot>
|
|
2887
|
-
`,is:"paper-listbox",behaviors:[
|
|
2878
|
+
`,is:"paper-listbox",behaviors:[Qa],hostAttributes:{role:"listbox"}});
|
|
2888
2879
|
/**
|
|
2889
2880
|
@license
|
|
2890
2881
|
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
|
@@ -2895,7 +2886,7 @@ found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
|
|
|
2895
2886
|
part of the polymer project is also subject to an additional IP rights grant
|
|
2896
2887
|
found at http://polymer.github.io/PATENTS.txt
|
|
2897
2888
|
*/
|
|
2898
|
-
const
|
|
2889
|
+
const el={properties:{checked:{type:Boolean,value:!1,reflectToAttribute:!0,notify:!0,observer:"_checkedChanged"},toggles:{type:Boolean,value:!0,reflectToAttribute:!0},value:{type:String,value:"on",observer:"_valueChanged"}},observers:["_requiredChanged(required)"],created:function(){this._hasIronCheckedElementBehavior=!0},_getValidity:function(e){return this.disabled||!this.required||this.checked},_requiredChanged:function(){this.required?this.setAttribute("aria-required","true"):this.removeAttribute("aria-required")},_checkedChanged:function(){this.active=this.checked,this.fire("iron-change")},_valueChanged:function(){void 0!==this.value&&null!==this.value||(this.value="on")}},tl={observers:["_focusedChanged(receivedFocusFromKeyboard)"],_focusedChanged:function(e){e&&this.ensureRipple(),this.hasRipple()&&(this._ripple.holdDown=e)},_createRipple:function(){var e=Wr._createRipple();return e.id="ink",e.setAttribute("center",""),e.classList.add("circle"),e}},il=[$r,kr,Wr,tl],nl=[il,[La,za,el],{_checkedChanged:function(){el._checkedChanged.call(this),this.hasRipple()&&(this.checked?this._ripple.setAttribute("checked",""):this._ripple.removeAttribute("checked"))},_buttonStateChanged:function(){Wr._buttonStateChanged.call(this),this.disabled||this.isAttached&&(this.checked=this.active)}}],ol=ir`<style>
|
|
2899
2890
|
:host {
|
|
2900
2891
|
display: inline-block;
|
|
2901
2892
|
white-space: nowrap;
|
|
@@ -3075,4 +3066,4 @@ const Xa={properties:{checked:{type:Boolean,value:!1,reflectToAttribute:!0,notif
|
|
|
3075
3066
|
</div>
|
|
3076
3067
|
</div>
|
|
3077
3068
|
|
|
3078
|
-
<div id="checkboxLabel"><slot></slot></div>`;
|
|
3069
|
+
<div id="checkboxLabel"><slot></slot></div>`;ol.setAttribute("strip-whitespace",""),Ss({_template:ol,is:"paper-checkbox",behaviors:[nl],hostAttributes:{role:"checkbox","aria-checked":!1,tabindex:0},properties:{ariaActiveAttribute:{type:String,value:"aria-checked"}},attached:function(){To(this,(function(){if("-1px"===this.getComputedStyleValue("--calculated-paper-checkbox-ink-size").trim()){var e=this.getComputedStyleValue("--calculated-paper-checkbox-size").trim(),t="px",i=e.match(/[A-Za-z]+$/);null!==i&&(t=i[0]);var n=parseFloat(e),o=8/3*n;"px"===t&&(o=Math.floor(o))%2!=n%2&&o++,this.updateStyles({"--paper-checkbox-ink-size":o+t})}}))},_computeCheckboxClass:function(e,t){var i="";return e&&(i+="checked "),t&&(i+="invalid"),i},_computeCheckmarkClass:function(e){return e?"":"hidden"},_createRipple:function(){return this._rippleContainer=this.$.checkboxContainer,tl._createRipple.call(this)}});export{ms as A,yr as B,rn as D,Uo as F,ao as G,kr as I,ia as N,Ss as P,Ys as T,Xr as a,$r as b,Wr as c,is as d,Qa as e,Gr as f,Ga as g,ir as h,Xa as i,To as j,Ft as k,ln as l,or as m,Kn as n,ta as o,Va as p,za as q,to as r,ja as s,La as t,Se as u,Ko as v,il as w,Ze as x,Dt as y,zt as z};
|