@foxy.io/elements 1.24.0-beta.4 → 1.24.0-beta.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cdn/foxy-access-recovery-form.js +1 -1
- package/dist/cdn/foxy-address-card.js +1 -1
- package/dist/cdn/foxy-address-form.js +1 -1
- package/dist/cdn/foxy-admin-subscription-card.js +1 -1
- package/dist/cdn/foxy-api-browser.js +1 -1
- package/dist/cdn/foxy-applied-coupon-code-card.js +1 -1
- package/dist/cdn/foxy-applied-coupon-code-form.js +1 -1
- package/dist/cdn/foxy-applied-tax-card.js +1 -1
- package/dist/cdn/foxy-attribute-card.js +1 -1
- package/dist/cdn/foxy-attribute-form.js +1 -1
- package/dist/cdn/foxy-cancellation-form.js +1 -1
- package/dist/cdn/foxy-cart-card.js +1 -1
- package/dist/cdn/foxy-cart-form.js +1 -1
- package/dist/cdn/foxy-client-card.js +1 -1
- package/dist/cdn/foxy-client-form.js +1 -1
- package/dist/cdn/foxy-collection-page.js +1 -1
- package/dist/cdn/foxy-collection-pages.js +1 -1
- package/dist/cdn/foxy-copy-to-clipboard.js +1 -1
- package/dist/cdn/foxy-coupon-card.js +1 -1
- package/dist/cdn/foxy-coupon-code-form.js +1 -1
- package/dist/cdn/foxy-coupon-codes-form.js +1 -1
- package/dist/cdn/foxy-coupon-detail-card.js +1 -1
- package/dist/cdn/foxy-coupon-form.js +1 -1
- package/dist/cdn/foxy-custom-field-card.js +1 -1
- package/dist/cdn/foxy-custom-field-form.js +1 -1
- package/dist/cdn/foxy-customer-api.js +1 -1
- package/dist/cdn/foxy-customer-card.js +1 -1
- package/dist/cdn/foxy-customer-form.js +1 -1
- package/dist/cdn/foxy-customer-portal-settings.js +1 -1
- package/dist/cdn/foxy-customer-portal.js +2 -2
- package/dist/cdn/foxy-customer.js +1 -1
- package/dist/cdn/foxy-customers-table.js +1 -1
- package/dist/cdn/foxy-discount-builder.js +1 -1
- package/dist/cdn/foxy-discount-card.js +1 -1
- package/dist/cdn/foxy-discount-detail-card.js +1 -1
- package/dist/cdn/foxy-donation.js +1 -1
- package/dist/cdn/foxy-downloadable-card.js +1 -1
- package/dist/cdn/foxy-downloadable-form.js +1 -1
- package/dist/cdn/foxy-email-template-card.js +1 -1
- package/dist/cdn/foxy-email-template-form.js +1 -1
- package/dist/cdn/foxy-error-entry-card.js +1 -1
- package/dist/cdn/foxy-filter-attribute-card.js +1 -1
- package/dist/cdn/foxy-filter-attribute-form.js +1 -1
- package/dist/cdn/foxy-form-dialog.js +1 -1
- package/dist/cdn/foxy-generate-codes-form.js +1 -1
- package/dist/cdn/foxy-gift-card-card.js +1 -1
- package/dist/cdn/foxy-gift-card-code-form.js +1 -1
- package/dist/cdn/foxy-gift-card-code-log-card.js +1 -1
- package/dist/cdn/foxy-gift-card-codes-form.js +1 -1
- package/dist/cdn/foxy-gift-card-form.js +1 -1
- package/dist/cdn/foxy-i18n-editor.js +2 -2
- package/dist/cdn/foxy-i18n.js +1 -1
- package/dist/cdn/foxy-integration-card.js +1 -1
- package/dist/cdn/foxy-integration-form.js +1 -1
- package/dist/cdn/foxy-item-card.js +1 -1
- package/dist/cdn/foxy-item-category-card.js +1 -1
- package/dist/cdn/foxy-item-category-form.js +1 -1
- package/dist/cdn/foxy-item-form.js +1 -1
- package/dist/cdn/foxy-item-option-card.js +1 -1
- package/dist/cdn/foxy-item-option-form.js +1 -1
- package/dist/cdn/foxy-items-form.js +1 -1
- package/dist/cdn/foxy-nucleon-element.js +1 -1
- package/dist/cdn/foxy-pagination.js +1 -1
- package/dist/cdn/foxy-passkey-card.js +1 -1
- package/dist/cdn/foxy-passkey-form.js +1 -1
- package/dist/cdn/foxy-payment-card.js +1 -1
- package/dist/cdn/foxy-payment-method-card.js +1 -1
- package/dist/cdn/foxy-payments-api-fraud-protection-card.js +1 -1
- package/dist/cdn/foxy-payments-api-fraud-protection-form.js +1 -1
- package/dist/cdn/foxy-payments-api-payment-method-card.js +1 -1
- package/dist/cdn/foxy-payments-api-payment-method-form.js +1 -1
- package/dist/cdn/foxy-payments-api-payment-preset-card.js +1 -1
- package/dist/cdn/foxy-payments-api-payment-preset-form.js +1 -1
- package/dist/cdn/foxy-payments-api.js +1 -1
- package/dist/cdn/foxy-query-builder.js +1 -1
- package/dist/cdn/foxy-report-form.js +4 -4
- package/dist/cdn/foxy-reports-table.js +1 -1
- package/dist/cdn/foxy-shipment-card.js +1 -1
- package/dist/cdn/foxy-shipping-method-card.js +1 -1
- package/dist/cdn/foxy-sign-in-form.js +1 -1
- package/dist/cdn/foxy-spinner.js +2 -2
- package/dist/cdn/foxy-store-card.js +1 -1
- package/dist/cdn/foxy-store-form.js +1 -1
- package/dist/cdn/foxy-store-shipping-method-form.js +1 -1
- package/dist/cdn/foxy-subscription-card.js +1 -1
- package/dist/cdn/foxy-subscription-form.js +2 -2
- package/dist/cdn/foxy-subscription-settings-form.js +1 -1
- package/dist/cdn/foxy-subscriptions-table.js +1 -1
- package/dist/cdn/foxy-table.js +1 -1
- package/dist/cdn/foxy-tax-card.js +1 -1
- package/dist/cdn/foxy-tax-form.js +1 -1
- package/dist/cdn/foxy-template-config-form.js +1 -1
- package/dist/cdn/foxy-template-form.js +1 -1
- package/dist/cdn/foxy-template-set-card.js +1 -1
- package/dist/cdn/foxy-template-set-form.js +1 -1
- package/dist/cdn/foxy-transaction-card.js +1 -1
- package/dist/cdn/foxy-transaction.js +1 -1
- package/dist/cdn/foxy-transactions-table.js +1 -1
- package/dist/cdn/foxy-user-card.js +1 -1
- package/dist/cdn/foxy-user-form.js +1 -1
- package/dist/cdn/foxy-users-table.js +1 -1
- package/dist/cdn/foxy-webhook-card.js +1 -1
- package/dist/cdn/foxy-webhook-form.js +1 -1
- package/dist/cdn/foxy-webhook-log-card.js +1 -1
- package/dist/cdn/foxy-webhook-status-card.js +1 -1
- package/dist/cdn/{shared-9caffb4d.js → shared-017ab35f.js} +1 -1
- package/dist/cdn/{shared-e6828dbf.js → shared-0689b25a.js} +5 -5
- package/dist/cdn/shared-0dabe195.js +15 -0
- package/dist/cdn/{shared-1b060170.js → shared-125d1a00.js} +1 -1
- package/dist/cdn/shared-13cc4ed4.js +9 -0
- package/dist/cdn/{shared-ff992ead.js → shared-15fe0f50.js} +1 -1
- package/dist/cdn/{shared-379b37e6.js → shared-19c9fe00.js} +7 -11
- package/dist/cdn/shared-1b2e0709.js +1 -0
- package/dist/cdn/shared-1e43b4db.js +1 -0
- package/dist/cdn/{shared-c7f2f1ab.js → shared-1fd59009.js} +1 -1
- package/dist/cdn/{shared-31651a9c.js → shared-2fa6a5a0.js} +1 -1
- package/dist/cdn/{shared-65318cc1.js → shared-3164d0c3.js} +1 -1
- package/dist/cdn/{shared-e10052d0.js → shared-31a891e8.js} +3 -3
- package/dist/cdn/{shared-b3ac59eb.js → shared-403af08d.js} +2 -2
- package/dist/cdn/{shared-a92ae606.js → shared-421e46e9.js} +1 -1
- package/dist/cdn/{shared-dccf0420.js → shared-42adf053.js} +1 -1
- package/dist/cdn/{shared-77a4d8e8.js → shared-46f3f71c.js} +1 -1
- package/dist/cdn/{shared-e84fa0ea.js → shared-4966b3e4.js} +1 -1
- package/dist/cdn/{shared-b48a83b0.js → shared-4a0298cb.js} +1 -1
- package/dist/cdn/{shared-17d0db7f.js → shared-4bd1efd7.js} +3 -3
- package/dist/cdn/{shared-51d28e6d.js → shared-527abf31.js} +1 -1
- package/dist/cdn/{shared-fe54babe.js → shared-53532131.js} +1 -1
- package/dist/cdn/{shared-9c626d58.js → shared-5616a12f.js} +1 -1
- package/dist/cdn/{shared-c97e0d6e.js → shared-57922341.js} +1 -1
- package/dist/cdn/shared-619bcf83.js +1 -0
- package/dist/cdn/{shared-ba658670.js → shared-6273b7e1.js} +1 -1
- package/dist/cdn/{shared-4904bca4.js → shared-639dda4b.js} +1 -1
- package/dist/cdn/{shared-d14c2060.js → shared-6b0498b2.js} +3 -3
- package/dist/cdn/{shared-6f84ac3e.js → shared-6b3be508.js} +1 -1
- package/dist/cdn/{shared-c6c6ba69.js → shared-6dffe67d.js} +1 -1
- package/dist/cdn/{shared-4c956a8e.js → shared-72a13fda.js} +1 -1
- package/dist/cdn/{shared-4b67d699.js → shared-763a6797.js} +1 -1
- package/dist/cdn/shared-7680d300.js +122 -0
- package/dist/cdn/shared-79d01877.js +1 -0
- package/dist/cdn/{shared-6abdfcf2.js → shared-7bf6e728.js} +1 -1
- package/dist/cdn/{shared-69a21b9d.js → shared-7d4e0011.js} +1 -1
- package/dist/cdn/shared-7e887e5b.js +1 -0
- package/dist/cdn/{shared-8474bc4a.js → shared-7ead930c.js} +1 -1
- package/dist/cdn/shared-7f33a83a.js +12 -12
- package/dist/cdn/{shared-6dc64a17.js → shared-8128b5e3.js} +1 -1
- package/dist/cdn/{shared-984fcdf5.js → shared-8134d8a7.js} +3 -3
- package/dist/cdn/{shared-c4240bc6.js → shared-8465a37a.js} +1 -1
- package/dist/cdn/{shared-e7c3b7b6.js → shared-848813a4.js} +1 -1
- package/dist/cdn/shared-8528906b.js +1 -0
- package/dist/cdn/{shared-a3c73e91.js → shared-897ab5e6.js} +1 -1
- package/dist/cdn/{shared-4bbd600d.js → shared-8fbab85c.js} +1 -1
- package/dist/cdn/{shared-4dc58b73.js → shared-90be9ac7.js} +1 -1
- package/dist/cdn/{shared-0a248c0d.js → shared-91eb066c.js} +1 -1
- package/dist/cdn/{shared-1d28220a.js → shared-9765be8f.js} +1 -1
- package/dist/cdn/{shared-e6997950.js → shared-9bdd5400.js} +1 -1
- package/dist/cdn/{shared-dfe2602a.js → shared-a134d313.js} +1 -1
- package/dist/cdn/shared-a6517170.js +1 -0
- package/dist/cdn/shared-a7475f62.js +212 -0
- package/dist/cdn/shared-a88c5cf1.js +29 -0
- package/dist/cdn/{shared-479ad951.js → shared-a96a2154.js} +1 -1
- package/dist/cdn/shared-aa22ee61.js +1 -0
- package/dist/cdn/shared-aa569a99.js +804 -0
- package/dist/cdn/{shared-e8e92fe3.js → shared-ad0256d0.js} +2 -2
- package/dist/cdn/{shared-25f64060.js → shared-b334c8b6.js} +1 -1
- package/dist/cdn/{shared-1d08a5ad.js → shared-bbbb8894.js} +1 -1
- package/dist/cdn/{shared-bafcab47.js → shared-bf2113a4.js} +3 -3
- package/dist/cdn/{shared-88e36564.js → shared-c541c9e9.js} +26 -27
- package/dist/cdn/{shared-36725fe3.js → shared-c758220c.js} +1 -1
- package/dist/cdn/{shared-4674063d.js → shared-c97f7178.js} +27 -27
- package/dist/cdn/shared-d2222c8d.js +1 -0
- package/dist/cdn/{shared-64f98a0f.js → shared-db06114b.js} +7 -2
- package/dist/cdn/{shared-665d6cc4.js → shared-e5786b8b.js} +1 -1
- package/dist/cdn/shared-e640e9fa.js +1 -0
- package/dist/cdn/{shared-30bebd39.js → shared-eb232194.js} +3 -3
- package/dist/cdn/{shared-bdb51db9.js → shared-f4822b9e.js} +1 -1
- package/dist/cdn/{shared-db21f6db.js → shared-fa5f0117.js} +2 -2
- package/dist/cdn/shared-fc77174e.js +1 -0
- package/dist/cdn/shared-fec6fd04.js +1 -0
- package/dist/cdn/translations/address-form/en.json +577 -0
- package/dist/cdn/translations/customer/en.json +577 -0
- package/dist/cdn/translations/customer-portal/en.json +579 -1
- package/dist/elements/public/AddressForm/AddressForm.d.ts +2 -1
- package/dist/elements/public/AddressForm/AddressForm.js +53 -17
- package/dist/elements/public/AddressForm/AddressForm.js.map +1 -1
- package/dist/elements/public/AddressForm/countries.d.ts +1 -1
- package/dist/elements/public/AddressForm/countries.js +554 -251
- package/dist/elements/public/AddressForm/countries.js.map +1 -1
- package/package.json +10 -10
- package/dist/cdn/shared-09d4fbb8.js +0 -29
- package/dist/cdn/shared-1eac92fa.js +0 -1
- package/dist/cdn/shared-307262a1.js +0 -15
- package/dist/cdn/shared-332f2997.js +0 -1
- package/dist/cdn/shared-39f3b48d.js +0 -1
- package/dist/cdn/shared-432c5183.js +0 -9
- package/dist/cdn/shared-4dee79d4.js +0 -1
- package/dist/cdn/shared-53061389.js +0 -1
- package/dist/cdn/shared-59042137.js +0 -201
- package/dist/cdn/shared-65ba8b39.js +0 -1
- package/dist/cdn/shared-7f5618ba.js +0 -1
- package/dist/cdn/shared-92f27a38.js +0 -1
- package/dist/cdn/shared-b0f534ef.js +0 -1
- package/dist/cdn/shared-be24dd36.js +0 -804
- package/dist/cdn/shared-bf62a65b.js +0 -1
- package/dist/cdn/shared-c2d3b32b.js +0 -1
- package/dist/cdn/shared-cf269a17.js +0 -1
- package/dist/cdn/shared-fef9ecc1.js +0 -122
- package/dist/elements/public/AddressForm/regions.d.ts +0 -1
- package/dist/elements/public/AddressForm/regions.js +0 -67
- package/dist/elements/public/AddressForm/regions.js.map +0 -1
- /package/dist/cdn/{shared-64657919.js → shared-343d1fd7.js} +0 -0
- /package/dist/cdn/{shared-d6276c83.js → shared-3ab0306f.js} +0 -0
- /package/dist/cdn/{shared-e6f3e9f0.js → shared-bb05cfed.js} +0 -0
- /package/dist/cdn/{shared-99065f2a.js → shared-d7be11de.js} +0 -0
- /package/dist/cdn/{shared-0479553e.js → shared-f9180815.js} +0 -0
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
import{D as t,r as e,e as n,g as r,f as i,h as s,o,b as a,p as l,j as c,k as d,m as h,c as u,n as p,q as _,s as f,t as m,v as y}from"./shared-a88c5cf1.js";
|
|
2
|
+
/**
|
|
3
|
+
@license
|
|
4
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
5
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
6
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
7
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
8
|
+
Code distributed by Google as part of the polymer project is also
|
|
9
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
10
|
+
*/const g=window.trustedTypes&&trustedTypes.createPolicy("polymer-html-literal",{createHTML:t=>t});class P{constructor(t,e){v(t,e);const n=e.reduce(((e,n,r)=>e+b(n)+t[r+1]),t[0]);this.value=n.toString()}toString(){return this.value}}function b(t){if(t instanceof P)return t.value;throw new Error(`non-literal value passed to Polymer's htmlLiteral function: ${t}`)}const w=function(t,...e){v(t,e);const n=document.createElement("template");let r=e.reduce(((e,n,r)=>e+function(t){if(t instanceof HTMLTemplateElement)return t.innerHTML;if(t instanceof P)return b(t);throw new Error(`non-template value passed to Polymer's html function: ${t}`)}(n)+t[r+1]),t[0]);return g&&(r=g.createHTML(r)),n.innerHTML=r,n},v=(t,e)=>{if(!Array.isArray(t)||!Array.isArray(t.raw)||e.length!==t.length-1)throw new TypeError("Invalid call to the html template tag")};
|
|
11
|
+
/**
|
|
12
|
+
@license
|
|
13
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
14
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
15
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
16
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
17
|
+
Code distributed by Google as part of the polymer project is also
|
|
18
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
19
|
+
*/
|
|
20
|
+
let C,S=null,E=window.HTMLImports&&window.HTMLImports.whenReady||null;function T(t){requestAnimationFrame((function(){E?E(t):(S||(S=new Promise((t=>{C=t})),"complete"===document.readyState?C():document.addEventListener("readystatechange",(()=>{"complete"===document.readyState&&C()}))),S.then((function(){t&&t()})))}))}
|
|
21
|
+
/**
|
|
22
|
+
@license
|
|
23
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
24
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
25
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
26
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
27
|
+
Code distributed by Google as part of the polymer project is also
|
|
28
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
29
|
+
*/const O="__seenByShadyCSS",A="__shadyCSSCachedStyle";let N=null,x=null;class I{constructor(){this.customStyles=[],this.enqueued=!1,T((()=>{window.ShadyCSS.flushCustomStyles&&window.ShadyCSS.flushCustomStyles()}))}enqueueDocumentValidation(){!this.enqueued&&x&&(this.enqueued=!0,T(x))}addCustomStyle(t){t[O]||(t[O]=!0,this.customStyles.push(t),this.enqueueDocumentValidation())}getStyleForCustomStyle(t){if(t[A])return t[A];let e;return e=t.getStyle?t.getStyle():t,e}processStyles(){const t=this.customStyles;for(let e=0;e<t.length;e++){const n=t[e];if(n[A])continue;const r=this.getStyleForCustomStyle(n);if(r){const t=r.__appliedElement||r;N&&N(t),n[A]=t}}return t}}I.prototype.addCustomStyle=I.prototype.addCustomStyle,I.prototype.getStyleForCustomStyle=I.prototype.getStyleForCustomStyle,I.prototype.processStyles=I.prototype.processStyles,Object.defineProperties(I.prototype,{transformCallback:{get:()=>N,set(t){N=t}},validateCallback:{get:()=>x,set(t){let e=!1;x||(e=!0),x=t,e&&this.enqueueDocumentValidation()}}});
|
|
30
|
+
/**
|
|
31
|
+
@license
|
|
32
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
33
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
34
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
35
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
36
|
+
Code distributed by Google as part of the polymer project is also
|
|
37
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
38
|
+
*/
|
|
39
|
+
const L=/(?:^|[;\s{]\s*)(--[\w-]*?)\s*:\s*(?:((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};{])+)|\{([^}]*)\}(?:(?=[;\s}])|$))/gi,M=/(?:^|\W+)@apply\s*\(?([^);\n]*)\)?/gi,R=/@media\s(.*)/;
|
|
40
|
+
/**
|
|
41
|
+
@license
|
|
42
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
43
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
44
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
45
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
46
|
+
Code distributed by Google as part of the polymer project is also
|
|
47
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
48
|
+
*/
|
|
49
|
+
function k(t,e){for(let n in e)null===n?t.style.removeProperty(n):t.style.setProperty(n,e[n])}function D(t,e){const n=window.getComputedStyle(t).getPropertyValue(e);return n?n.trim():""}function F(t){const e=M.test(t)||L.test(t);return M.lastIndex=0,L.lastIndex=0,e}
|
|
50
|
+
/**
|
|
51
|
+
@license
|
|
52
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
53
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
54
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
55
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
56
|
+
Code distributed by Google as part of the polymer project is also
|
|
57
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
58
|
+
*/const z=!(window.ShadyDOM&&window.ShadyDOM.inUse);let H,B;function j(t){H=(!t||!t.shimcssproperties)&&(z||Boolean(!navigator.userAgent.match(/AppleWebKit\/601|Edge\/15/)&&window.CSS&&CSS.supports&&CSS.supports("box-shadow","0 0 0 var(--foo)")))}window.ShadyCSS&&void 0!==window.ShadyCSS.cssBuild&&(B=window.ShadyCSS.cssBuild);const Y=Boolean(window.ShadyCSS&&window.ShadyCSS.disableRuntime);window.ShadyCSS&&void 0!==window.ShadyCSS.nativeCss?H=window.ShadyCSS.nativeCss:window.ShadyCSS?(j(window.ShadyCSS),window.ShadyCSS=void 0):j(window.WebComponents&&window.WebComponents.flags);const q=H,J=new I;
|
|
59
|
+
/**
|
|
60
|
+
@license
|
|
61
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
62
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
63
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
64
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
65
|
+
Code distributed by Google as part of the polymer project is also
|
|
66
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
67
|
+
*/window.ShadyCSS||(window.ShadyCSS={prepareTemplate(t,e,n){},prepareTemplateDom(t,e){},prepareTemplateStyles(t,e,n){},styleSubtree(t,e){J.processStyles(),k(t,e)},styleElement(t){J.processStyles()},styleDocument(t){J.processStyles(),k(document.body,t)},getComputedStyleValue:(t,e)=>D(t,e),flushCustomStyles(){},nativeCss:q,nativeShadow:z,cssBuild:B,disableRuntime:Y}),window.ShadyCSS.CustomStyleInterface=J;
|
|
68
|
+
/**
|
|
69
|
+
@license
|
|
70
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
71
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
72
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
73
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
74
|
+
Code distributed by Google as part of the polymer project is also
|
|
75
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
76
|
+
*/
|
|
77
|
+
const $="link[rel=import][type~=css]",U="include",V="shady-unscoped";function X(e){return t.import(e)}function W(t){let n=t.body?t.body:t;const r=e(n.textContent,t.baseURI),i=document.createElement("style");return i.textContent=r,i}function G(t){const e=t.trim().split(/\s+/),n=[];for(let t=0;t<e.length;t++)n.push(...Z(e[t]));return n}function Z(t){const e=X(t);if(!e)return console.warn("Could not find style data in module named",t),[];if(void 0===e._styles){const t=[];t.push(...Q(e));const n=e.querySelector("template");n&&t.push(...K(n,e.assetpath)),e._styles=t}return e._styles}function K(t,n){if(!t._styles){const r=[],i=t.content.querySelectorAll("style");for(let t=0;t<i.length;t++){let s=i[t],o=s.getAttribute(U);o&&r.push(...G(o).filter((function(t,e,n){return n.indexOf(t)===e}))),n&&(s.textContent=e(s.textContent,n)),r.push(s)}t._styles=r}return t._styles}function Q(t){const e=[],n=t.querySelectorAll($);for(let t=0;t<n.length;t++){let r=n[t];if(r.import){const t=r.import,n=r.hasAttribute(V);if(n&&!t._unscopedStyle){const e=W(t);e.setAttribute(V,""),t._unscopedStyle=e}else t._style||(t._style=W(t));e.push(n?t._unscopedStyle:t._style)}}return e}function tt(t){let e=X(t);if(e&&void 0===e._cssText){let t=function(t){let e="",n=Q(t);for(let t=0;t<n.length;t++)e+=n[t].textContent;return e}
|
|
78
|
+
/**
|
|
79
|
+
@license
|
|
80
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
81
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
82
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
83
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
84
|
+
Code distributed by Google as part of the polymer project is also
|
|
85
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
86
|
+
*/(e),n=e.querySelector("template");n&&(t+=function(t,e){let n="";const r=K(t,e);for(let t=0;t<r.length;t++){let e=r[t];e.parentNode&&e.parentNode.removeChild(e),n+=e.textContent}return n}(n,e.assetpath)),e._cssText=t||null}return e||console.warn("Could not find style data in module named",t),e&&e._cssText||""}const et="include",nt=window.ShadyCSS.CustomStyleInterface;class rt extends HTMLElement{constructor(){super(),this._style=null,nt.addCustomStyle(this)}getStyle(){if(this._style)return this._style;const t=this.querySelector("style");if(!t)return null;this._style=t;const e=t.getAttribute(et);return e&&(t.removeAttribute(et),t.textContent=function(t){let e=t.trim().split(/\s+/),n="";for(let t=0;t<e.length;t++)n+=tt(e[t]);return n}(e)+t.textContent),this.ownerDocument!==window.document&&window.document.head.appendChild(this),this._style}}window.customElements.define("custom-style",rt);
|
|
87
|
+
/**
|
|
88
|
+
@license
|
|
89
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
90
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
91
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
92
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
93
|
+
Code distributed by Google as part of the polymer project is also
|
|
94
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
95
|
+
*/
|
|
96
|
+
let it=0;const st=function(t){let e=t.__mixinApplications;e||(e=new WeakMap,t.__mixinApplications=e);let n=it++;return function(r){let i=r.__mixinSet;if(i&&i[n])return r;let s=e,o=s.get(r);if(!o){o=t(r),s.set(r,o);let e=Object.create(o.__mixinSet||i||null);e[n]=!0,o.__mixinSet=e}return o}},ot=window.ShadyDOM&&window.ShadyDOM.noPatch&&window.ShadyDOM.wrap?window.ShadyDOM.wrap:window.ShadyDOM?t=>ShadyDOM.patch(t):t=>t;
|
|
97
|
+
/**
|
|
98
|
+
@license
|
|
99
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
100
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
101
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
102
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
103
|
+
Code distributed by Google as part of the polymer project is also
|
|
104
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
105
|
+
*/
|
|
106
|
+
/**
|
|
107
|
+
@license
|
|
108
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
109
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
110
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
111
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
112
|
+
Code distributed by Google as part of the polymer project is also
|
|
113
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
114
|
+
*/
|
|
115
|
+
function at(t){return t.indexOf(".")>=0}function lt(t){let e=t.indexOf(".");return-1===e?t:t.slice(0,e)}function ct(t,e){return 0===t.indexOf(e+".")}function dt(t,e){return 0===e.indexOf(t+".")}function ht(t,e,n){return e+n.slice(t.length)}function ut(t,e){return t===e||ct(t,e)||dt(t,e)}function pt(t){if(Array.isArray(t)){let e=[];for(let n=0;n<t.length;n++){let r=t[n].toString().split(".");for(let t=0;t<r.length;t++)e.push(r[t])}return e.join(".")}return t}function _t(t){return Array.isArray(t)?pt(t).split("."):t.toString().split(".")}function ft(t,e,n){let r=t,i=_t(e);for(let t=0;t<i.length;t++){if(!r)return;r=r[i[t]]}return n&&(n.path=i.join(".")),r}function mt(t,e,n){let r=t,i=_t(e),s=i[i.length-1];if(i.length>1){for(let t=0;t<i.length-1;t++){if(r=r[i[t]],!r)return}r[s]=n}else r[e]=n;return i.join(".")}
|
|
116
|
+
/**
|
|
117
|
+
@license
|
|
118
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
119
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
120
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
121
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
122
|
+
Code distributed by Google as part of the polymer project is also
|
|
123
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
124
|
+
*/const yt={},gt=/-[a-z]/g,Pt=/([A-Z])/g;function bt(t){return yt[t]||(yt[t]=t.indexOf("-")<0?t:t.replace(gt,(t=>t[1].toUpperCase())))}function wt(t){return yt[t]||(yt[t]=t.replace(Pt,"-$1").toLowerCase())}
|
|
125
|
+
/**
|
|
126
|
+
@license
|
|
127
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
128
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
129
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
130
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
131
|
+
Code distributed by Google as part of the polymer project is also
|
|
132
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
133
|
+
*/let vt=0,Ct=0,St=[],Et=0,Tt=!1,Ot=document.createTextNode("");new window.MutationObserver((function(){Tt=!1;const t=St.length;for(let e=0;e<t;e++){let t=St[e];if(t)try{t()}catch(t){setTimeout((()=>{throw t}))}}St.splice(0,t),Ct+=t})).observe(Ot,{characterData:!0});const At={after:t=>({run:e=>window.setTimeout(e,t),cancel(t){window.clearTimeout(t)}}),run:(t,e)=>window.setTimeout(t,e),cancel(t){window.clearTimeout(t)}},Nt={run:t=>window.requestAnimationFrame(t),cancel(t){window.cancelAnimationFrame(t)}},xt={run:t=>window.requestIdleCallback?window.requestIdleCallback(t):window.setTimeout(t,16),cancel(t){window.cancelIdleCallback?window.cancelIdleCallback(t):window.clearTimeout(t)}},It={run:t=>(Tt||(Tt=!0,Ot.textContent=Et++),St.push(t),vt++),cancel(t){const e=t-Ct;if(e>=0){if(!St[e])throw new Error("invalid async handle: "+t);St[e]=null}}},Lt=It,Mt=st((t=>class extends t{static createProperties(t){const e=this.prototype;for(let n in t)n in e||e._createPropertyAccessor(n)}static attributeNameForProperty(t){return t.toLowerCase()}static typeForProperty(t){}_createPropertyAccessor(t,e){this._addPropertyToAttributeMap(t),this.hasOwnProperty(JSCompiler_renameProperty("__dataHasAccessor",this))||(this.__dataHasAccessor=Object.assign({},this.__dataHasAccessor)),this.__dataHasAccessor[t]||(this.__dataHasAccessor[t]=!0,this._definePropertyAccessor(t,e))}_addPropertyToAttributeMap(t){this.hasOwnProperty(JSCompiler_renameProperty("__dataAttributes",this))||(this.__dataAttributes=Object.assign({},this.__dataAttributes));let e=this.__dataAttributes[t];return e||(e=this.constructor.attributeNameForProperty(t),this.__dataAttributes[e]=t),e}_definePropertyAccessor(t,e){Object.defineProperty(this,t,{get(){return this.__data[t]},set:e?function(){}:function(e){this._setPendingProperty(t,e,!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 t in this.__dataHasAccessor)this.hasOwnProperty(t)&&(this.__dataInstanceProps=this.__dataInstanceProps||{},this.__dataInstanceProps[t]=this[t],delete this[t])}_initializeInstanceProperties(t){Object.assign(this,t)}_setProperty(t,e){this._setPendingProperty(t,e)&&this._invalidateProperties()}_getProperty(t){return this.__data[t]}_setPendingProperty(t,e,n){let r=this.__data[t],i=this._shouldPropertyChange(t,e,r);return i&&(this.__dataPending||(this.__dataPending={},this.__dataOld={}),this.__dataOld&&!(t in this.__dataOld)&&(this.__dataOld[t]=r),this.__data[t]=e,this.__dataPending[t]=e),i}_isPropertyPending(t){return!(!this.__dataPending||!this.__dataPending.hasOwnProperty(t))}_invalidateProperties(){!this.__dataInvalid&&this.__dataReady&&(this.__dataInvalid=!0,Lt.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 t=this.__data,e=this.__dataPending,n=this.__dataOld;this._shouldPropertiesChange(t,e,n)&&(this.__dataPending=null,this.__dataOld=null,this._propertiesChanged(t,e,n)),this.__dataCounter--}_shouldPropertiesChange(t,e,n){return Boolean(e)}_propertiesChanged(t,e,n){}_shouldPropertyChange(t,e,n){return n!==e&&(n==n||e==e)}attributeChangedCallback(t,e,n,r){e!==n&&this._attributeToProperty(t,n),super.attributeChangedCallback&&super.attributeChangedCallback(t,e,n,r)}_attributeToProperty(t,e,n){if(!this.__serializing){const r=this.__dataAttributes,i=r&&r[t]||t;this[i]=this._deserializeValue(e,n||this.constructor.typeForProperty(i))}}_propertyToAttribute(t,e,n){this.__serializing=!0,n=arguments.length<3?this[t]:n,this._valueToNodeAttribute(this,n,e||this.constructor.attributeNameForProperty(t)),this.__serializing=!1}_valueToNodeAttribute(t,e,n){const r=this._serializeValue(e);"class"!==n&&"name"!==n&&"slot"!==n||(t=ot(t)),void 0===r?t.removeAttribute(n):t.setAttribute(n,""===r&&window.trustedTypes?window.trustedTypes.emptyScript:r)}_serializeValue(t){return"boolean"==typeof t?t?"":void 0:null!=t?t.toString():void 0}_deserializeValue(t,e){switch(e){case Boolean:return null!==t;case Number:return Number(t);default:return t}}})),Rt={};let kt=HTMLElement.prototype;for(;kt;){let t=Object.getOwnPropertyNames(kt);for(let e=0;e<t.length;e++)Rt[t[e]]=!0;kt=Object.getPrototypeOf(kt)}const Dt=window.trustedTypes?t=>trustedTypes.isHTML(t)||trustedTypes.isScript(t)||trustedTypes.isScriptURL(t):()=>!1;const Ft=st((t=>{const e=Mt(t);return class extends e{static createPropertiesForAttributes(){let t=this.observedAttributes;for(let e=0;e<t.length;e++)this.prototype._createPropertyAccessor(bt(t[e]))}static attributeNameForProperty(t){return wt(t)}_initializeProperties(){this.__dataProto&&(this._initializeProtoProperties(this.__dataProto),this.__dataProto=null),super._initializeProperties()}_initializeProtoProperties(t){for(let e in t)this._setProperty(e,t[e])}_ensureAttribute(t,e){const n=this;n.hasAttribute(t)||this._valueToNodeAttribute(n,e,t)}_serializeValue(t){if("object"==typeof t){if(t instanceof Date)return t.toString();if(t){if(Dt(t))return t;try{return JSON.stringify(t)}catch(t){return""}}}return super._serializeValue(t)}_deserializeValue(t,e){let n;switch(e){case Object:try{n=JSON.parse(t)}catch(e){n=t}break;case Array:try{n=JSON.parse(t)}catch(e){n=null,console.warn(`Polymer::Attributes: couldn't decode Array as JSON: ${t}`)}break;case Date:n=isNaN(t)?String(t):Number(t),n=new Date(n);break;default:n=super._deserializeValue(t,e)}return n}_definePropertyAccessor(t,e){!function(t,e){if(!Rt[e]){let n=t[e];void 0!==n&&(t.__data?t._setPendingProperty(e,n):(t.__dataProto?t.hasOwnProperty(JSCompiler_renameProperty("__dataProto",t))||(t.__dataProto=Object.create(t.__dataProto)):t.__dataProto={},t.__dataProto[e]=n))}}(this,t),super._definePropertyAccessor(t,e)}_hasAccessor(t){return this.__dataHasAccessor&&this.__dataHasAccessor[t]}_isPropertyPending(t){return Boolean(this.__dataPending&&t in this.__dataPending)}}})),zt={"dom-if":!0,"dom-repeat":!0};
|
|
134
|
+
/**
|
|
135
|
+
@license
|
|
136
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
137
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
138
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
139
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
140
|
+
Code distributed by Google as part of the polymer project is also
|
|
141
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
142
|
+
*/let Ht=!1,Bt=!1;function jt(t){(function(){if(!Ht){Ht=!0;const t=document.createElement("textarea");t.placeholder="a",Bt=t.placeholder===t.textContent}return Bt})()&&"textarea"===t.localName&&t.placeholder&&t.placeholder===t.textContent&&(t.textContent=null)}const Yt=(()=>{const t=window.trustedTypes&&window.trustedTypes.createPolicy("polymer-template-event-attribute-policy",{createScript:t=>t});return(e,n,r)=>{const i=n.getAttribute(r);t&&r.startsWith("on-")?e.setAttribute(r,t.createScript(i,r)):e.setAttribute(r,i)}})();function qt(t){let e=t.getAttribute("is");if(e&&zt[e]){let n=t;for(n.removeAttribute("is"),t=n.ownerDocument.createElement(e),n.parentNode.replaceChild(t,n),t.appendChild(n);n.attributes.length;){const{name:e}=n.attributes[0];Yt(t,n,e),n.removeAttribute(e)}}return t}function Jt(t,e){let n=e.parentInfo&&Jt(t,e.parentInfo);if(!n)return t;for(let t=n.firstChild,r=0;t;t=t.nextSibling)if(e.parentIndex===r++)return t}function $t(t,e,n,r){r.id&&(e[r.id]=n)}function Ut(t,e,n){if(n.events&&n.events.length)for(let r,i=0,s=n.events;i<s.length&&(r=s[i]);i++)t._addMethodEventListenerToNode(e,r.name,r.value,t)}function Vt(t,e,n,r){n.templateInfo&&(e._templateInfo=n.templateInfo,e._parentTemplateInfo=r)}const Xt=st((t=>class extends t{static _parseTemplate(t,e){if(!t._templateInfo){let n=t._templateInfo={};n.nodeInfoList=[],n.nestedTemplate=Boolean(e),n.stripWhiteSpace=e&&e.stripWhiteSpace||t.hasAttribute&&t.hasAttribute("strip-whitespace"),this._parseTemplateContent(t,n,{parent:null})}return t._templateInfo}static _parseTemplateContent(t,e,n){return this._parseTemplateNode(t.content,e,n)}static _parseTemplateNode(t,e,n){let r=!1,i=t;return"template"!=i.localName||i.hasAttribute("preserve-content")?"slot"===i.localName&&(e.hasInsertionPoint=!0):r=this._parseTemplateNestedTemplate(i,e,n)||r,jt(i),i.firstChild&&this._parseTemplateChildNodes(i,e,n),i.hasAttributes&&i.hasAttributes()&&(r=this._parseTemplateNodeAttributes(i,e,n)||r),r||n.noted}static _parseTemplateChildNodes(t,e,n){if("script"!==t.localName&&"style"!==t.localName)for(let r,i=t.firstChild,s=0;i;i=r){if("template"==i.localName&&(i=qt(i)),r=i.nextSibling,i.nodeType===Node.TEXT_NODE){let n=r;for(;n&&n.nodeType===Node.TEXT_NODE;)i.textContent+=n.textContent,r=n.nextSibling,t.removeChild(n),n=r;if(e.stripWhiteSpace&&!i.textContent.trim()){t.removeChild(i);continue}}let o={parentIndex:s,parentInfo:n};this._parseTemplateNode(i,e,o)&&(o.infoIndex=e.nodeInfoList.push(o)-1),i.parentNode&&s++}}static _parseTemplateNestedTemplate(t,e,n){let r=t,i=this._parseTemplate(r,e);return(i.content=r.content.ownerDocument.createDocumentFragment()).appendChild(r.content),n.templateInfo=i,!0}static _parseTemplateNodeAttributes(t,e,n){let r=!1,i=Array.from(t.attributes);for(let s,o=i.length-1;s=i[o];o--)r=this._parseTemplateNodeAttribute(t,e,n,s.name,s.value)||r;return r}static _parseTemplateNodeAttribute(t,e,n,r,i){return"on-"===r.slice(0,3)?(t.removeAttribute(r),n.events=n.events||[],n.events.push({name:r.slice(3),value:i}),!0):"id"===r&&(n.id=i,!0)}static _contentForTemplate(t){let e=t._templateInfo;return e&&e.content||t.content}_stampTemplate(t,e){t&&!t.content&&window.HTMLTemplateElement&&HTMLTemplateElement.decorate&&HTMLTemplateElement.decorate(t);let n=(e=e||this.constructor._parseTemplate(t)).nodeInfoList,r=e.content||t.content,i=document.importNode(r,!0);i.__noInsertionPoint=!e.hasInsertionPoint;let s=i.nodeList=new Array(n.length);i.$={};for(let t,r=0,o=n.length;r<o&&(t=n[r]);r++){let n=s[r]=Jt(i,t);$t(0,i.$,n,t),Vt(0,n,t,e),Ut(this,n,t)}return i}_addMethodEventListenerToNode(t,e,n,r){let i=function(t,e,n){return t=t._methodHost||t,function(e){t[n]?t[n](e,e.detail):console.warn("listener method `"+n+"` not defined")}}(r=r||t,0,n);return this._addEventListenerToNode(t,e,i),i}_addEventListenerToNode(t,e,n){t.addEventListener(e,n)}_removeEventListenerFromNode(t,e,n){t.removeEventListener(e,n)}}));
|
|
143
|
+
/**
|
|
144
|
+
* @fileoverview
|
|
145
|
+
* @suppress {checkPrototypalTypes}
|
|
146
|
+
* @license Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
147
|
+
* This code may only be used under the BSD style license found at
|
|
148
|
+
* http://polymer.github.io/LICENSE.txt The complete set of authors may be found
|
|
149
|
+
* at http://polymer.github.io/AUTHORS.txt The complete set of contributors may
|
|
150
|
+
* be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by
|
|
151
|
+
* Google as part of the polymer project is also subject to an additional IP
|
|
152
|
+
* rights grant found at http://polymer.github.io/PATENTS.txt
|
|
153
|
+
*/let Wt=0;const Gt=[],Zt={COMPUTE:"__computeEffects",REFLECT:"__reflectEffects",NOTIFY:"__notifyEffects",PROPAGATE:"__propagateEffects",OBSERVE:"__observeEffects",READ_ONLY:"__readOnly"},Kt="__computeInfo",Qt=/[A-Z]/;function te(t,e,n){let r=t[e];if(r){if(!t.hasOwnProperty(e)&&(r=t[e]=Object.create(t[e]),n))for(let t in r){let e=r[t],n=r[t]=Array(e.length);for(let t=0;t<e.length;t++)n[t]=e[t]}}else r=t[e]={};return r}function ee(t,e,n,r,i,s){if(e){let o=!1;const a=Wt++;for(let l in n){let c=e[i?lt(l):l];if(c)for(let e,d=0,h=c.length;d<h&&(e=c[d]);d++)e.info&&e.info.lastRun===a||i&&!re(l,e.trigger)||(e.info&&(e.info.lastRun=a),e.fn(t,l,n,r,e.info,i,s),o=!0)}return o}return!1}function ne(t,e,n,r,i,s,o,a){let l=!1,c=e[o?lt(r):r];if(c)for(let e,d=0,h=c.length;d<h&&(e=c[d]);d++)e.info&&e.info.lastRun===n||o&&!re(r,e.trigger)||(e.info&&(e.info.lastRun=n),e.fn(t,r,i,s,e.info,o,a),l=!0);return l}function re(t,e){if(e){let n=e.name;return n==t||!(!e.structured||!ct(n,t))||!(!e.wildcard||!dt(n,t))}return!0}function ie(t,e,n,r,i){let s="string"==typeof i.method?t[i.method]:i.method,o=i.property;s?s.call(t,t.__data[o],r[o]):i.dynamicFn||console.warn("observer method `"+i.method+"` not defined")}function se(t,e,n){let r=lt(e);if(r!==e){return oe(t,wt(r)+"-changed",n[e],e),!0}return!1}function oe(t,e,n,r){let i={value:n,queueProperty:!0};r&&(i.path=r),ot(t).dispatchEvent(new CustomEvent(e,{detail:i}))}function ae(t,e,n,r,i,s){let o=(s?lt(e):e)!=e?e:null,a=o?ft(t,o):t.__data[e];o&&void 0===a&&(a=n[e]),oe(t,i.eventName,a,o)}function le(t,e,n,r,i){let o=t.__data[e];s&&(o=s(o,i.attrName,"attribute",t)),t._propertyToAttribute(e,i.attrName,o)}function ce(t,e,n,r){let i=t[Zt.COMPUTE];if(i)if(o){Wt++;const s=function(t){let e=t.constructor.__orderedComputedDeps;if(!e){e=new Map;const n=t[Zt.COMPUTE];let r,{counts:i,ready:s,total:o}=function(t){const e=t[Kt],n={},r=t[Zt.COMPUTE],i=[];let s=0;for(let t in e){const r=e[t];s+=n[t]=r.args.filter((t=>!t.literal)).length+(r.dynamicFn?1:0)}for(let t in r)e[t]||i.push(t);return{counts:n,ready:i,total:s}}(t);for(;r=s.shift();){e.set(r,e.size);const t=n[r];t&&t.forEach((t=>{const e=t.info.methodInfo;--o,0==--i[e]&&s.push(e)}))}if(0!==o){const e=t;console.warn(`Computed graph for ${e.localName} incomplete; circular?`)}t.constructor.__orderedComputedDeps=e}return e}(t),o=[];for(let t in e)he(t,i,o,s,r);let a;for(;a=o.shift();)ue(t,"",e,n,a)&&he(a.methodInfo,i,o,s,r);Object.assign(n,t.__dataOld),Object.assign(e,t.__dataPending),t.__dataPending=null}else{let s=e;for(;ee(t,i,s,n,r);)Object.assign(n,t.__dataOld),Object.assign(e,t.__dataPending),s=t.__dataPending,t.__dataPending=null}}const de=(t,e,n)=>{let r=0,i=e.length-1,s=-1;for(;r<=i;){const o=r+i>>1,a=n.get(e[o].methodInfo)-n.get(t.methodInfo);if(a<0)r=o+1;else{if(!(a>0)){s=o;break}i=o-1}}s<0&&(s=i+1),e.splice(s,0,t)},he=(t,e,n,r,i)=>{const s=e[i?lt(t):t];if(s)for(let e=0;e<s.length;e++){const o=s[e];o.info.lastRun===Wt||i&&!re(t,o.trigger)||(o.info.lastRun=Wt,de(o.info,n,r))}};function ue(t,e,n,r,i){let s=Pe(t,e,n,r,i);if(s===Gt)return!1;let o=i.methodInfo;return t.__dataHasAccessor&&t.__dataHasAccessor[o]?t._setPendingProperty(o,s,!0):(t[o]=s,!1)}function pe(t,e,n,r,i,s,o){n.bindings=n.bindings||[];let a={kind:r,target:i,parts:s,literal:o,isCompound:1!==s.length};if(n.bindings.push(a),function(t){return Boolean(t.target)&&"attribute"!=t.kind&&"text"!=t.kind&&!t.isCompound&&"{"===t.parts[0].mode}(a)){let{event:t,negate:e}=a.parts[0];a.listenerEvent=t||wt(i)+"-changed",a.listenerNegate=e}let l=e.nodeInfoList.length;for(let n=0;n<a.parts.length;n++){let r=a.parts[n];r.compoundIndex=n,_e(t,e,a,r,l)}}function _e(t,e,n,r,i){if(!r.literal)if("attribute"===n.kind&&"-"===n.target[0])console.warn("Cannot set attribute "+n.target+' because "-" is not a valid attribute starting character');else{let s=r.dependencies,o={index:i,binding:n,part:r,evaluator:t};for(let n=0;n<s.length;n++){let r=s[n];"string"==typeof r&&(r=Te(r),r.wildcard=!0),t._addTemplatePropertyEffect(e,r.rootProperty,{fn:fe,info:o,trigger:r})}}}function fe(t,e,n,r,i,o,a){let l=a[i.index],c=i.binding,d=i.part;if(o&&d.source&&e.length>d.source.length&&"property"==c.kind&&!c.isCompound&&l.__isPropertyEffectsClient&&l.__dataHasAccessor&&l.__dataHasAccessor[c.target]){let r=n[e];e=ht(d.source,c.target,e),l._setPendingPropertyOrPath(e,r,!1,!0)&&t._enqueueClient(l)}else{let a=i.evaluator._evaluateBinding(t,d,e,n,r,o);a!==Gt&&function(t,e,n,r,i){i=function(t,e,n,r){if(n.isCompound){let i=t.__dataCompoundStorage[n.target];i[r.compoundIndex]=e,e=i.join("")}"attribute"!==n.kind&&("textContent"!==n.target&&("value"!==n.target||"input"!==t.localName&&"textarea"!==t.localName)||(e=null==e?"":e));return e}(e,i,n,r),s&&(i=s(i,n.target,n.kind,e));if("attribute"==n.kind)t._valueToNodeAttribute(e,i,n.target);else{let r=n.target;e.__isPropertyEffectsClient&&e.__dataHasAccessor&&e.__dataHasAccessor[r]?e[Zt.READ_ONLY]&&e[Zt.READ_ONLY][r]||e._setPendingProperty(r,i)&&t._enqueueClient(e):t._setUnmanagedPropertyToNode(e,r,i)}}(t,l,c,d,a)}}function me(t,e){if(e.isCompound){let n=t.__dataCompoundStorage||(t.__dataCompoundStorage={}),r=e.parts,i=new Array(r.length);for(let t=0;t<r.length;t++)i[t]=r[t].literal;let s=e.target;n[s]=i,e.literal&&"property"==e.kind&&("className"===s&&(t=ot(t)),t[s]=e.literal)}}function ye(t,e,n){if(n.listenerEvent){let r=n.parts[0];t.addEventListener(n.listenerEvent,(function(t){!function(t,e,n,r,i){let s,o=t.detail,a=o&&o.path;a?(r=ht(n,r,a),s=o&&o.value):s=t.currentTarget[n],s=i?!s:s,e[Zt.READ_ONLY]&&e[Zt.READ_ONLY][r]||!e._setPendingPropertyOrPath(r,s,!0,Boolean(a))||o&&o.queueProperty||e._invalidateProperties()}(t,e,n.target,r.source,r.negate)}))}}function ge(t,e,n,r,i,s){s=e.static||s&&("object"!=typeof s||s[e.methodName]);let o={methodName:e.methodName,args:e.args,methodInfo:i,dynamicFn:s};for(let i,s=0;s<e.args.length&&(i=e.args[s]);s++)i.literal||t._addPropertyEffect(i.rootProperty,n,{fn:r,info:o,trigger:i});return s&&t._addPropertyEffect(e.methodName,n,{fn:r,info:o}),o}function Pe(t,e,n,r,i){let s=t._methodHost||t,o=s[i.methodName];if(o){let r=t._marshalArgs(i.args,e,n);return r===Gt?Gt:o.apply(s,r)}i.dynamicFn||console.warn("method `"+i.methodName+"` not defined")}const be=[],we="(?:[a-zA-Z_$][\\w.:$\\-*]*)",ve="(?:("+we+"|(?:[-+]?[0-9]*\\.?[0-9]+(?:[eE][-+]?[0-9]+)?)|(?:(?:'(?:[^'\\\\]|\\\\.)*')|(?:\"(?:[^\"\\\\]|\\\\.)*\")))\\s*)",Ce=new RegExp("(\\[\\[|{{)\\s*(?:(!)\\s*)?"+("("+we+"\\s*"+("(?:\\(\\s*(?:"+("(?:"+ve+"(?:,\\s*"+ve+")*)")+"?)\\)\\s*)")+"?)")+"(?:]]|}})","g");function Se(t){let e="";for(let n=0;n<t.length;n++){e+=t[n].literal||""}return e}function Ee(t){let e=t.match(/([^\s]+?)\(([\s\S]*)\)/);if(e){let t={methodName:e[1],static:!0,args:be};if(e[2].trim()){return function(t,e){return e.args=t.map((function(t){let n=Te(t);return n.literal||(e.static=!1),n}),this),e}(e[2].replace(/\\,/g,",").split(","),t)}return t}return null}function Te(t){let e=t.trim().replace(/,/g,",").replace(/\\(.)/g,"$1"),n={name:e,value:"",literal:!1},r=e[0];switch("-"===r&&(r=e[1]),r>="0"&&r<="9"&&(r="#"),r){case"'":case'"':n.value=e.slice(1,-1),n.literal=!0;break;case"#":n.value=Number(e),n.literal=!0}return n.literal||(n.rootProperty=lt(e),n.structured=at(e),n.structured&&(n.wildcard=".*"==e.slice(-2),n.wildcard&&(n.name=e.slice(0,-2)))),n}function Oe(t,e,n){let r=ft(t,n);return void 0===r&&(r=e[n]),r}function Ae(t,e,r,i){const s={indexSplices:i};n&&!t._overrideLegacyUndefined&&(e.splices=s),t.notifyPath(r+".splices",s),t.notifyPath(r+".length",e.length),n&&!t._overrideLegacyUndefined&&(s.indexSplices=[])}function Ne(t,e,n,r,i,s){Ae(t,e,n,[{index:r,addedCount:i,removed:s,object:e,type:"splice"}])}const xe=st((t=>{const e=Xt(Ft(t));return class extends e{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 Zt}_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(Ie.length){let t=Ie[Ie.length-1];t._enqueueClient(this),this.__dataHost=t}}_initializeProtoProperties(t){this.__data=Object.create(t),this.__dataPending=Object.create(t),this.__dataOld={}}_initializeInstanceProperties(t){let e=this[Zt.READ_ONLY];for(let n in t)e&&e[n]||(this.__dataPending=this.__dataPending||{},this.__dataOld=this.__dataOld||{},this.__data[n]=this.__dataPending[n]=t[n])}_addPropertyEffect(t,e,n){this._createPropertyAccessor(t,e==Zt.READ_ONLY);let r=te(this,e,!0)[t];r||(r=this[e][t]=[]),r.push(n)}_removePropertyEffect(t,e,n){let r=te(this,e,!0)[t],i=r.indexOf(n);i>=0&&r.splice(i,1)}_hasPropertyEffect(t,e){let n=this[e];return Boolean(n&&n[t])}_hasReadOnlyEffect(t){return this._hasPropertyEffect(t,Zt.READ_ONLY)}_hasNotifyEffect(t){return this._hasPropertyEffect(t,Zt.NOTIFY)}_hasReflectEffect(t){return this._hasPropertyEffect(t,Zt.REFLECT)}_hasComputedEffect(t){return this._hasPropertyEffect(t,Zt.COMPUTE)}_setPendingPropertyOrPath(t,e,n,r){if(r||lt(Array.isArray(t)?t[0]:t)!==t){if(!r){let n=ft(this,t);if(!(t=mt(this,t,e))||!super._shouldPropertyChange(t,e,n))return!1}if(this.__dataHasPaths=!0,this._setPendingProperty(t,e,n))return function(t,e,n){let r=t.__dataLinkedPaths;if(r){let i;for(let s in r){let o=r[s];dt(s,e)?(i=ht(s,o,e),t._setPendingPropertyOrPath(i,n,!0,!0)):dt(o,e)&&(i=ht(o,s,e),t._setPendingPropertyOrPath(i,n,!0,!0))}}}(this,t,e),!0}else{if(this.__dataHasAccessor&&this.__dataHasAccessor[t])return this._setPendingProperty(t,e,n);this[t]=e}return!1}_setUnmanagedPropertyToNode(t,e,n){n===t[e]&&"object"!=typeof n||("className"===e&&(t=ot(t)),t[e]=n)}_setPendingProperty(t,e,n){let r=this.__dataHasPaths&&at(t),i=r?this.__dataTemp:this.__data;return!!this._shouldPropertyChange(t,e,i[t])&&(this.__dataPending||(this.__dataPending={},this.__dataOld={}),t in this.__dataOld||(this.__dataOld[t]=this.__data[t]),r?this.__dataTemp[t]=e:this.__data[t]=e,this.__dataPending[t]=e,(r||this[Zt.NOTIFY]&&this[Zt.NOTIFY][t])&&(this.__dataToNotify=this.__dataToNotify||{},this.__dataToNotify[t]=n),!0)}_setProperty(t,e){this._setPendingProperty(t,e,!0)&&this._invalidateProperties()}_invalidateProperties(){this.__dataReady&&this._flushProperties()}_enqueueClient(t){this.__dataPendingClients=this.__dataPendingClients||[],t!==this&&this.__dataPendingClients.push(t)}_flushClients(){this.__dataClientsReady?this.__enableOrFlushClients():(this.__dataClientsReady=!0,this._readyClients(),this.__dataReady=!0)}__enableOrFlushClients(){let t=this.__dataPendingClients;if(t){this.__dataPendingClients=null;for(let e=0;e<t.length;e++){let n=t[e];n.__dataEnabled?n.__dataPending&&n._flushProperties():n._enableProperties()}}}_readyClients(){this.__enableOrFlushClients()}setProperties(t,e){for(let n in t)!e&&this[Zt.READ_ONLY]&&this[Zt.READ_ONLY][n]||this._setPendingPropertyOrPath(n,t[n],!0);this._invalidateProperties()}ready(){this._flushProperties(),this.__dataClientsReady||this._flushClients(),this.__dataPending&&this._flushProperties()}_propertiesChanged(t,e,n){let r,i=this.__dataHasPaths;this.__dataHasPaths=!1,ce(this,e,n,i),r=this.__dataToNotify,this.__dataToNotify=null,this._propagatePropertyChanges(e,n,i),this._flushClients(),ee(this,this[Zt.REFLECT],e,n,i),ee(this,this[Zt.OBSERVE],e,n,i),r&&function(t,e,n,r,i){let s,o,a=t[Zt.NOTIFY],l=Wt++;for(let o in e)e[o]&&(a&&ne(t,a,l,o,n,r,i)||i&&se(t,o,n))&&(s=!0);s&&(o=t.__dataHost)&&o._invalidateProperties&&o._invalidateProperties()}(this,r,e,n,i),1==this.__dataCounter&&(this.__dataTemp={})}_propagatePropertyChanges(t,e,n){this[Zt.PROPAGATE]&&ee(this,this[Zt.PROPAGATE],t,e,n),this.__templateInfo&&this._runEffectsForTemplate(this.__templateInfo,t,e,n)}_runEffectsForTemplate(t,e,n,r){const i=(e,r)=>{ee(this,t.propertyEffects,e,n,r,t.nodeList);for(let i=t.firstChild;i;i=i.nextSibling)this._runEffectsForTemplate(i,e,n,r)};t.runEffects?t.runEffects(i,e,r):i(e,r)}linkPaths(t,e){t=pt(t),e=pt(e),this.__dataLinkedPaths=this.__dataLinkedPaths||{},this.__dataLinkedPaths[t]=e}unlinkPaths(t){t=pt(t),this.__dataLinkedPaths&&delete this.__dataLinkedPaths[t]}notifySplices(t,e){let n={path:""};Ae(this,ft(this,t,n),n.path,e)}get(t,e){return ft(e||this,t)}set(t,e,n){n?mt(n,t,e):this[Zt.READ_ONLY]&&this[Zt.READ_ONLY][t]||this._setPendingPropertyOrPath(t,e,!0)&&this._invalidateProperties()}push(t,...e){let n={path:""},r=ft(this,t,n),i=r.length,s=r.push(...e);return e.length&&Ne(this,r,n.path,i,e.length,[]),s}pop(t){let e={path:""},n=ft(this,t,e),r=Boolean(n.length),i=n.pop();return r&&Ne(this,n,e.path,n.length,0,[i]),i}splice(t,e,n,...r){let i,s={path:""},o=ft(this,t,s);return e<0?e=o.length-Math.floor(-e):e&&(e=Math.floor(e)),i=2===arguments.length?o.splice(e):o.splice(e,n,...r),(r.length||i.length)&&Ne(this,o,s.path,e,r.length,i),i}shift(t){let e={path:""},n=ft(this,t,e),r=Boolean(n.length),i=n.shift();return r&&Ne(this,n,e.path,0,0,[i]),i}unshift(t,...e){let n={path:""},r=ft(this,t,n),i=r.unshift(...e);return e.length&&Ne(this,r,n.path,0,e.length,[]),i}notifyPath(t,e){let n;if(1==arguments.length){let r={path:""};e=ft(this,t,r),n=r.path}else n=Array.isArray(t)?pt(t):t;this._setPendingPropertyOrPath(n,e,!0,!0)&&this._invalidateProperties()}_createReadOnlyProperty(t,e){var n;this._addPropertyEffect(t,Zt.READ_ONLY),e&&(this["_set"+(n=t,n[0].toUpperCase()+n.substring(1))]=function(e){this._setProperty(t,e)})}_createPropertyObserver(t,e,n){let r={property:t,method:e,dynamicFn:Boolean(n)};this._addPropertyEffect(t,Zt.OBSERVE,{fn:ie,info:r,trigger:{name:t}}),n&&this._addPropertyEffect(e,Zt.OBSERVE,{fn:ie,info:r,trigger:{name:e}})}_createMethodObserver(t,e){let n=Ee(t);if(!n)throw new Error("Malformed observer expression '"+t+"'");ge(this,n,Zt.OBSERVE,Pe,null,e)}_createNotifyingProperty(t){this._addPropertyEffect(t,Zt.NOTIFY,{fn:ae,info:{eventName:wt(t)+"-changed",property:t}})}_createReflectedProperty(t){let e=this.constructor.attributeNameForProperty(t);"-"===e[0]?console.warn("Property "+t+" cannot be reflected to attribute "+e+' because "-" is not a valid starting attribute name. Use a lowercase first letter for the property instead.'):this._addPropertyEffect(t,Zt.REFLECT,{fn:le,info:{attrName:e}})}_createComputedProperty(t,e,n){let r=Ee(e);if(!r)throw new Error("Malformed computed expression '"+e+"'");const i=ge(this,r,Zt.COMPUTE,ue,t,n);te(this,Kt)[t]=i}_marshalArgs(t,e,r){const i=this.__data,s=[];for(let o=0,a=t.length;o<a;o++){let{name:a,structured:l,wildcard:c,value:d,literal:h}=t[o];if(!h)if(c){const t=dt(a,e),n=Oe(i,r,t?e:a);d={path:t?e:a,value:n,base:t?ft(i,a):n}}else d=l?Oe(i,r,a):i[a];if(n&&!this._overrideLegacyUndefined&&void 0===d&&t.length>1)return Gt;s[o]=d}return s}static addPropertyEffect(t,e,n){this.prototype._addPropertyEffect(t,e,n)}static createPropertyObserver(t,e,n){this.prototype._createPropertyObserver(t,e,n)}static createMethodObserver(t,e){this.prototype._createMethodObserver(t,e)}static createNotifyingProperty(t){this.prototype._createNotifyingProperty(t)}static createReadOnlyProperty(t,e){this.prototype._createReadOnlyProperty(t,e)}static createReflectedProperty(t){this.prototype._createReflectedProperty(t)}static createComputedProperty(t,e,n){this.prototype._createComputedProperty(t,e,n)}static bindTemplate(t){return this.prototype._bindTemplate(t)}_bindTemplate(t,e){let n=this.constructor._parseTemplate(t),r=this.__preBoundTemplateInfo==n;if(!r)for(let t in n.propertyEffects)this._createPropertyAccessor(t);if(e)if(n=Object.create(n),n.wasPreBound=r,this.__templateInfo){const e=t._parentTemplateInfo||this.__templateInfo,r=e.lastChild;n.parent=e,e.lastChild=n,n.previousSibling=r,r?r.nextSibling=n:e.firstChild=n}else this.__templateInfo=n;else this.__preBoundTemplateInfo=n;return n}static _addTemplatePropertyEffect(t,e,n){(t.hostProps=t.hostProps||{})[e]=!0;let r=t.propertyEffects=t.propertyEffects||{};(r[e]=r[e]||[]).push(n)}_stampTemplate(t,e){e=e||this._bindTemplate(t,!0),Ie.push(this);let n=super._stampTemplate(t,e);if(Ie.pop(),e.nodeList=n.nodeList,!e.wasPreBound){let t=e.childNodes=[];for(let e=n.firstChild;e;e=e.nextSibling)t.push(e)}return n.templateInfo=e,function(t,e){let{nodeList:n,nodeInfoList:r}=e;if(r.length)for(let e=0;e<r.length;e++){let i=r[e],s=n[e],o=i.bindings;if(o)for(let e=0;e<o.length;e++){let n=o[e];me(s,n),ye(s,t,n)}s.__dataHost=t}}(this,e),this.__dataClientsReady&&(this._runEffectsForTemplate(e,this.__data,null,!1),this._flushClients()),n}_removeBoundDom(t){const e=t.templateInfo,{previousSibling:n,nextSibling:r,parent:i}=e;n?n.nextSibling=r:i&&(i.firstChild=r),r?r.previousSibling=n:i&&(i.lastChild=n),e.nextSibling=e.previousSibling=null;let s=e.childNodes;for(let t=0;t<s.length;t++){let e=s[t];ot(ot(e).parentNode).removeChild(e)}}static _parseTemplateNode(t,n,r){let i=e._parseTemplateNode.call(this,t,n,r);if(t.nodeType===Node.TEXT_NODE){let e=this._parseBindings(t.textContent,n);e&&(t.textContent=Se(e)||" ",pe(this,n,r,"text","textContent",e),i=!0)}return i}static _parseTemplateNodeAttribute(t,n,r,i,s){let o=this._parseBindings(s,n);if(o){let e=i,s="property";Qt.test(i)?s="attribute":"$"==i[i.length-1]&&(i=i.slice(0,-1),s="attribute");let a=Se(o);return a&&"attribute"==s&&("class"==i&&t.hasAttribute("class")&&(a+=" "+t.getAttribute(i)),t.setAttribute(i,a)),"attribute"==s&&"disable-upgrade$"==e&&t.setAttribute(i,""),"input"===t.localName&&"value"===e&&t.setAttribute(e,""),t.removeAttribute(e),"property"===s&&(i=bt(i)),pe(this,n,r,s,i,o,a),!0}return e._parseTemplateNodeAttribute.call(this,t,n,r,i,s)}static _parseTemplateNestedTemplate(t,n,s){let o=e._parseTemplateNestedTemplate.call(this,t,n,s);const a=t.parentNode,l=s.templateInfo,c="dom-if"===a.localName,d="dom-repeat"===a.localName;r&&(c||d)&&(a.removeChild(t),(s=s.parentInfo).templateInfo=l,s.noted=!0,o=!1);let h=l.hostProps;if(i&&c)h&&(n.hostProps=Object.assign(n.hostProps||{},h),r||(s.parentInfo.noted=!0));else{let t="{";for(let e in h){pe(this,n,s,"property","_host_"+e,[{mode:t,source:e,dependencies:[e],hostProp:!0}])}}return o}static _parseBindings(t,e){let n,r=[],i=0;for(;null!==(n=Ce.exec(t));){n.index>i&&r.push({literal:t.slice(i,n.index)});let s=n[1][0],o=Boolean(n[2]),a=n[3].trim(),l=!1,c="",d=-1;"{"==s&&(d=a.indexOf("::"))>0&&(c=a.substring(d+2),a=a.substring(0,d),l=!0);let h=Ee(a),u=[];if(h){let{args:t,methodName:n}=h;for(let e=0;e<t.length;e++){let n=t[e];n.literal||u.push(n)}let r=e.dynamicFns;(r&&r[n]||h.static)&&(u.push(n),h.dynamicFn=!0)}else u.push(a);r.push({source:a,mode:s,negate:o,customEvent:l,signature:h,dependencies:u,event:c}),i=Ce.lastIndex}if(i&&i<t.length){let e=t.substring(i);e&&r.push({literal:e})}return r.length?r:null}static _evaluateBinding(t,e,n,r,i,s){let o;return o=e.signature?Pe(t,n,r,0,e.signature):n!=e.source?ft(t,e.source):s&&at(n)?ft(t,n):t.__data[n],e.negate&&(o=!o),o}}})),Ie=[];
|
|
154
|
+
/**
|
|
155
|
+
@license
|
|
156
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
157
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
158
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
159
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
160
|
+
Code distributed by Google as part of the polymer project is also
|
|
161
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
162
|
+
*/
|
|
163
|
+
function Le(t){}
|
|
164
|
+
/**
|
|
165
|
+
@license
|
|
166
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
167
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
168
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
169
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
170
|
+
Code distributed by Google as part of the polymer project is also
|
|
171
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
172
|
+
*/const Me=st((t=>{const e=Mt(t);function n(t){const e=Object.getPrototypeOf(t);return e.prototype instanceof i?e:null}function r(t){if(!t.hasOwnProperty(JSCompiler_renameProperty("__ownProperties",t))){let e=null;if(t.hasOwnProperty(JSCompiler_renameProperty("properties",t))){const n=t.properties;n&&(e=function(t){const e={};for(let n in t){const r=t[n];e[n]="function"==typeof r?{type:r}:r}return e}(n))}t.__ownProperties=e}return t.__ownProperties}class i extends e{static get observedAttributes(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__observedAttributes",this))){this.prototype;const t=this._properties;this.__observedAttributes=t?Object.keys(t).map((t=>this.prototype._addPropertyToAttributeMap(t))):[]}return this.__observedAttributes}static finalize(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__finalized",this))){const t=n(this);t&&t.finalize(),this.__finalized=!0,this._finalizeClass()}}static _finalizeClass(){const t=r(this);t&&this.createProperties(t)}static get _properties(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__properties",this))){const t=n(this);this.__properties=Object.assign({},t&&t._properties,r(this))}return this.__properties}static typeForProperty(t){const e=this._properties[t];return e&&e.type}_initializeProperties(){this.constructor.finalize(),super._initializeProperties()}connectedCallback(){super.connectedCallback&&super.connectedCallback(),this._enableProperties()}disconnectedCallback(){super.disconnectedCallback&&super.disconnectedCallback()}}return i})),Re=window.ShadyCSS&&window.ShadyCSS.cssBuild,ke=st((n=>{const r=Me(xe(n));function i(t,e,n,r){n.computed&&(n.readOnly=!0),n.computed&&(t._hasReadOnlyEffect(e)?console.warn(`Cannot redefine computed property '${e}'.`):t._createComputedProperty(e,n.computed,r)),n.readOnly&&!t._hasReadOnlyEffect(e)?t._createReadOnlyProperty(e,!n.computed):!1===n.readOnly&&t._hasReadOnlyEffect(e)&&console.warn(`Cannot make readOnly property '${e}' non-readOnly.`),n.reflectToAttribute&&!t._hasReflectEffect(e)?t._createReflectedProperty(e):!1===n.reflectToAttribute&&t._hasReflectEffect(e)&&console.warn(`Cannot make reflected property '${e}' non-reflected.`),n.notify&&!t._hasNotifyEffect(e)?t._createNotifyingProperty(e):!1===n.notify&&t._hasNotifyEffect(e)&&console.warn(`Cannot make notify property '${e}' non-notify.`),n.observer&&t._createPropertyObserver(e,n.observer,r[n.observer]),t._addPropertyToAttributeMap(e)}function s(t,e,n,r){if(!Re){const i=e.content.querySelectorAll("style"),s=K(e),o=function(t){let e=X(t);return e?Q(e):[]}(n),a=e.content.firstElementChild;for(let n=0;n<o.length;n++){let i=o[n];i.textContent=t._processStyleText(i.textContent,r),e.content.insertBefore(i,a)}let l=0;for(let e=0;e<s.length;e++){let n=s[e],o=i[l];o!==n?(n=n.cloneNode(!0),o.parentNode.insertBefore(n,o)):l++,n.textContent=t._processStyleText(n.textContent,r)}}if(window.ShadyCSS&&window.ShadyCSS.prepareTemplate(e,n),p&&Re&&_){const n=e.content.querySelectorAll("style");if(n){let e="";Array.from(n).forEach((t=>{e+=t.textContent,t.parentNode.removeChild(t)})),t._styleSheet=new CSSStyleSheet,t._styleSheet.replaceSync(e)}}}return class extends r{static get polymerElementVersion(){return"3.5.1"}static _finalizeClass(){r._finalizeClass.call(this);const t=((e=this).hasOwnProperty(JSCompiler_renameProperty("__ownObservers",e))||(e.__ownObservers=e.hasOwnProperty(JSCompiler_renameProperty("observers",e))?e.observers:null),e.__ownObservers);var e;t&&this.createObservers(t,this._properties),this._prepareTemplate()}static _prepareTemplate(){let t=this.template;t&&("string"==typeof t?(console.error("template getter must return HTMLTemplateElement"),t=null):a||(t=t.cloneNode(!0))),this.prototype._template=t}static createProperties(t){for(let e in t)i(this.prototype,e,t[e],t)}static createObservers(t,e){const n=this.prototype;for(let r=0;r<t.length;r++)n._createMethodObserver(t[r],e)}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))&&function(e){let n=null;if(e&&(!f||m)&&(n=t.import(e,"template"),f&&!n))throw new Error(`strictTemplatePolicy: expecting dom-module or null template for ${e}`);return n}(this.is)||Object.getPrototypeOf(this.prototype).constructor.template}return this._template}static set template(t){this._template=t}static get importPath(){if(!this.hasOwnProperty(JSCompiler_renameProperty("_importPath",this))){const e=this.importMeta;if(e)this._importPath=l(e.url);else{const e=t.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=c,this.importPath=this.constructor.importPath;let t=function(t){if(!t.hasOwnProperty(JSCompiler_renameProperty("__propertyDefaults",t))){t.__propertyDefaults=null;let e=t._properties;for(let n in e){let r=e[n];"value"in r&&(t.__propertyDefaults=t.__propertyDefaults||{},t.__propertyDefaults[n]=r)}}return t.__propertyDefaults}(this.constructor);if(t)for(let e in t){let n=t[e];if(this._canApplyPropertyDefault(e)){let t="function"==typeof n.value?n.value.call(this):n.value;this._hasAccessor(e)?this._setPendingProperty(e,t,!0):this[e]=t}}}_canApplyPropertyDefault(t){return!this.hasOwnProperty(t)}static _processStyleText(t,n){return e(t,n)}static _finalizeTemplate(t){const e=this.prototype._template;if(e&&!e.__polymerFinalized){e.__polymerFinalized=!0;const n=this.importPath;s(this,e,t,n?d(n):""),this.prototype._bindTemplate(e)}}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(t){const e=ot(this);if(e.attachShadow)return t?(e.shadowRoot||(e.attachShadow({mode:"open",shadyUpgradeFragment:t}),e.shadowRoot.appendChild(t),this.constructor._styleSheet&&(e.shadowRoot.adoptedStyleSheets=[this.constructor._styleSheet])),h&&window.ShadyDOM&&window.ShadyDOM.flushInitial(e.shadowRoot),e.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(t){window.ShadyCSS&&window.ShadyCSS.styleSubtree(this,t)}resolveUrl(t,e){return!e&&this.importPath&&(e=d(this.importPath)),d(t,e)}static _parseTemplateContent(t,e,n){return e.dynamicFns=e.dynamicFns||this._properties,r._parseTemplateContent.call(this,t,e,n)}static _addTemplatePropertyEffect(t,e,n){return!u||e in this._properties||n.info.part.signature&&n.info.part.signature.static||n.info.part.hostProp||t.nestedTemplate||console.warn(`Property '${e}' used in template but not declared in 'properties'; attribute will not be observed.`),r._addTemplatePropertyEffect.call(this,t,e,n)}}})),De=ke(HTMLElement);
|
|
173
|
+
/**
|
|
174
|
+
* @fileoverview
|
|
175
|
+
* @suppress {checkPrototypalTypes}
|
|
176
|
+
* @license Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
177
|
+
* This code may only be used under the BSD style license found at
|
|
178
|
+
* http://polymer.github.io/LICENSE.txt The complete set of authors may be found
|
|
179
|
+
* at http://polymer.github.io/AUTHORS.txt The complete set of contributors may
|
|
180
|
+
* be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by
|
|
181
|
+
* Google as part of the polymer project is also subject to an additional IP
|
|
182
|
+
* rights grant found at http://polymer.github.io/PATENTS.txt
|
|
183
|
+
*/
|
|
184
|
+
/**
|
|
185
|
+
@license
|
|
186
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
187
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
188
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
189
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
190
|
+
Code distributed by Google as part of the polymer project is also
|
|
191
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
192
|
+
*/
|
|
193
|
+
class Fe{constructor(){this._asyncModule=null,this._callback=null,this._timer=null}setConfig(t,e){this._asyncModule=t,this._callback=e,this._timer=this._asyncModule.run((()=>{this._timer=null,ze.delete(this),this._callback()}))}cancel(){this.isActive()&&(this._cancelAsync(),ze.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(t,e,n){return t instanceof Fe?t._cancelAsync():t=new Fe,t.setConfig(e,n),t}}let ze=new Set;const He=function(t){ze.add(t)},Be=function(){const t=Boolean(ze.size);return ze.forEach((t=>{try{t.flush()}catch(t){setTimeout((()=>{throw t}))}})),t};
|
|
194
|
+
/**
|
|
195
|
+
@license
|
|
196
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
197
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
198
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
199
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
200
|
+
Code distributed by Google as part of the polymer project is also
|
|
201
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
202
|
+
*/
|
|
203
|
+
let je="string"==typeof document.head.style.touchAction,Ye="__polymerGestures",qe="__polymerGesturesHandled",Je="__polymerGesturesTouchAction",$e=["mousedown","mousemove","mouseup","click"],Ue=[0,1,4,2],Ve=function(){try{return 1===new MouseEvent("test",{buttons:1}).buttons}catch(t){return!1}}();function Xe(t){return $e.indexOf(t)>-1}let We=!1;function Ge(t){if(!Xe(t)&&"touchend"!==t)return je&&We&&y?{passive:!0}:void 0}!function(){try{let t=Object.defineProperty({},"passive",{get(){We=!0}});window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch(t){}}();let Ze=navigator.userAgent.match(/iP(?:[oa]d|hone)|Android/);const Ke=[],Qe={button:!0,input:!0,keygen:!0,meter:!0,output:!0,textarea:!0,progress:!0,select:!0},tn={button:!0,command:!0,fieldset:!0,input:!0,keygen:!0,optgroup:!0,option:!0,select:!0,textarea:!0};function en(t){let e=Array.prototype.slice.call(t.labels||[]);if(!e.length){e=[];try{let n=t.getRootNode();if(t.id){let r=n.querySelectorAll(`label[for = '${t.id}']`);for(let t=0;t<r.length;t++)e.push(r[t])}}catch(t){}}return e}let nn=function(t){let e=t.sourceCapabilities;var n;if((!e||e.firesTouchEvents)&&(t[qe]={skip:!0},"click"===t.type)){let e=!1,r=cn(t);for(let t=0;t<r.length;t++){if(r[t].nodeType===Node.ELEMENT_NODE)if("label"===r[t].localName)Ke.push(r[t]);else if(n=r[t],Qe[n.localName]){let n=en(r[t]);for(let t=0;t<n.length;t++)e=e||Ke.indexOf(n[t])>-1}if(r[t]===on.mouse.target)return}if(e)return;t.preventDefault(),t.stopPropagation()}};function rn(t){let e=Ze?["click"]:$e;for(let n,r=0;r<e.length;r++)n=e[r],t?(Ke.length=0,document.addEventListener(n,nn,!0)):document.removeEventListener(n,nn,!0)}function sn(t){let e=t.type;if(!Xe(e))return!1;if("mousemove"===e){let e=void 0===t.buttons?1:t.buttons;return t instanceof window.MouseEvent&&!Ve&&(e=Ue[t.which]||0),Boolean(1&e)}return 0===(void 0===t.button?0:t.button)}let on={mouse:{target:null,mouseIgnoreJob:null},touch:{x:0,y:0,id:-1,scrollDecided:!1}};function an(t,e,n){t.movefn=e,t.upfn=n,document.addEventListener("mousemove",e),document.addEventListener("mouseup",n)}function ln(t){document.removeEventListener("mousemove",t.movefn),document.removeEventListener("mouseup",t.upfn),t.movefn=null,t.upfn=null}document.addEventListener("touchend",(function(t){on.mouse.mouseIgnoreJob||rn(!0),on.mouse.target=cn(t)[0],on.mouse.mouseIgnoreJob=Fe.debounce(on.mouse.mouseIgnoreJob,At.after(2500),(function(){rn(),on.mouse.target=null,on.mouse.mouseIgnoreJob=null}))}),!!We&&{passive:!0});const cn=window.ShadyDOM&&window.ShadyDOM.noPatch?window.ShadyDOM.composedPath:t=>t.composedPath&&t.composedPath()||[],dn={},hn=[];function un(t){const e=cn(t);return e.length>0?e[0]:t.target}function pn(t){let e,n=t.type,r=t.currentTarget[Ye];if(!r)return;let i=r[n];if(i){if(!t[qe]&&(t[qe]={},"touch"===n.slice(0,5))){let e=t.changedTouches[0];if("touchstart"===n&&1===t.touches.length&&(on.touch.id=e.identifier),on.touch.id!==e.identifier)return;je||"touchstart"!==n&&"touchmove"!==n||function(t){let e=t.changedTouches[0],n=t.type;if("touchstart"===n)on.touch.x=e.clientX,on.touch.y=e.clientY,on.touch.scrollDecided=!1;else if("touchmove"===n){if(on.touch.scrollDecided)return;on.touch.scrollDecided=!0;let n=function(t){let e="auto",n=cn(t);for(let t,r=0;r<n.length;r++)if(t=n[r],t[Je]){e=t[Je];break}return e}(t),r=!1,i=Math.abs(on.touch.x-e.clientX),s=Math.abs(on.touch.y-e.clientY);t.cancelable&&("none"===n?r=!0:"pan-x"===n?r=s>i:"pan-y"===n&&(r=i>s)),r?t.preventDefault():Pn("track")}}(t)}if(e=t[qe],!e.skip){for(let n,r=0;r<hn.length;r++)n=hn[r],i[n.name]&&!e[n.name]&&n.flow&&n.flow.start.indexOf(t.type)>-1&&n.reset&&n.reset();for(let r,s=0;s<hn.length;s++)r=hn[s],i[r.name]&&!e[r.name]&&(e[r.name]=!0,r[n](t))}}}function _n(t,e,n){return!!dn[e]&&(function(t,e,n){let r=dn[e],i=r.deps,s=r.name,o=t[Ye];o||(t[Ye]=o={});for(let e,n,r=0;r<i.length;r++)e=i[r],Ze&&Xe(e)&&"click"!==e||(n=o[e],n||(o[e]=n={_count:0}),0===n._count&&t.addEventListener(e,pn,Ge(e)),n[s]=(n[s]||0)+1,n._count=(n._count||0)+1);t.addEventListener(e,n),r.touchAction&&yn(t,r.touchAction)}(t,e,n),!0)}function fn(t,e,n){return!!dn[e]&&(function(t,e,n){let r=dn[e],i=r.deps,s=r.name,o=t[Ye];if(o)for(let e,n,r=0;r<i.length;r++)e=i[r],n=o[e],n&&n[s]&&(n[s]=(n[s]||1)-1,n._count=(n._count||1)-1,0===n._count&&t.removeEventListener(e,pn,Ge(e)));t.removeEventListener(e,n)}(t,e,n),!0)}function mn(t){hn.push(t);for(let e=0;e<t.emits.length;e++)dn[t.emits[e]]=t}function yn(t,e){je&&t instanceof HTMLElement&&It.run((()=>{t.style.touchAction=e})),t[Je]=e}function gn(t,e,n){let r=new Event(e,{bubbles:!0,cancelable:!0,composed:!0});if(r.detail=n,ot(t).dispatchEvent(r),r.defaultPrevented){let t=n.preventer||n.sourceEvent;t&&t.preventDefault&&t.preventDefault()}}function Pn(t){let e=function(t){for(let e,n=0;n<hn.length;n++){e=hn[n];for(let n,r=0;r<e.emits.length;r++)if(n=e.emits[r],n===t)return e}return null}(t);e.info&&(e.info.prevent=!0)}function bn(){on.mouse.mouseIgnoreJob&&on.mouse.mouseIgnoreJob.flush()}function wn(t,e,n,r){e&&gn(e,t,{x:n.clientX,y:n.clientY,sourceEvent:n,preventer:r,prevent:function(t){return Pn(t)}})}function vn(t,e,n){if(t.prevent)return!1;if(t.started)return!0;let r=Math.abs(t.x-e),i=Math.abs(t.y-n);return r>=5||i>=5}function Cn(t,e,n){if(!e)return;let r,i=t.moves[t.moves.length-2],s=t.moves[t.moves.length-1],o=s.x-t.x,a=s.y-t.y,l=0;i&&(r=s.x-i.x,l=s.y-i.y),gn(e,"track",{state:t.state,x:n.clientX,y:n.clientY,dx:o,dy:a,ddx:r,ddy:l,sourceEvent:n,hover:function(){return function(t,e){let n=document.elementFromPoint(t,e),r=n;for(;r&&r.shadowRoot&&!window.ShadyDOM;){let i=r;if(r=r.shadowRoot.elementFromPoint(t,e),i===r)break;r&&(n=r)}return n}(n.clientX,n.clientY)}})}function Sn(t,e,n){let r=Math.abs(e.clientX-t.x),i=Math.abs(e.clientY-t.y),s=un(n||e);!s||tn[s.localName]&&s.hasAttribute("disabled")||(isNaN(r)||isNaN(i)||r<=25&&i<=25||function(t){if("click"===t.type){if(0===t.detail)return!0;let e=un(t);if(!e.nodeType||e.nodeType!==Node.ELEMENT_NODE)return!0;let n=e.getBoundingClientRect(),r=t.pageX,i=t.pageY;return!(r>=n.left&&r<=n.right&&i>=n.top&&i<=n.bottom)}return!1}(e))&&(t.prevent||gn(s,"tap",{x:e.clientX,y:e.clientY,sourceEvent:e,preventer:n}))}
|
|
204
|
+
/**
|
|
205
|
+
@license
|
|
206
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
207
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
208
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
209
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
210
|
+
Code distributed by Google as part of the polymer project is also
|
|
211
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
212
|
+
*/mn({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(t){if(!sn(t))return;let e=un(t),n=this;an(this.info,(function(t){sn(t)||(wn("up",e,t),ln(n.info))}),(function(t){sn(t)&&wn("up",e,t),ln(n.info)})),wn("down",e,t)},touchstart:function(t){wn("down",un(t),t.changedTouches[0],t)},touchend:function(t){wn("up",un(t),t.changedTouches[0],t)}}),mn({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(t){this.moves.length>2&&this.moves.shift(),this.moves.push(t)},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(t){if(!sn(t))return;let e=un(t),n=this,r=function(t){let r=t.clientX,i=t.clientY;vn(n.info,r,i)&&(n.info.state=n.info.started?"mouseup"===t.type?"end":"track":"start","start"===n.info.state&&Pn("tap"),n.info.addMove({x:r,y:i}),sn(t)||(n.info.state="end",ln(n.info)),e&&Cn(n.info,e,t),n.info.started=!0)};an(this.info,r,(function(t){n.info.started&&r(t),ln(n.info)})),this.info.x=t.clientX,this.info.y=t.clientY},touchstart:function(t){let e=t.changedTouches[0];this.info.x=e.clientX,this.info.y=e.clientY},touchmove:function(t){let e=un(t),n=t.changedTouches[0],r=n.clientX,i=n.clientY;vn(this.info,r,i)&&("start"===this.info.state&&Pn("tap"),this.info.addMove({x:r,y:i}),Cn(this.info,e,n),this.info.state="track",this.info.started=!0)},touchend:function(t){let e=un(t),n=t.changedTouches[0];this.info.started&&(this.info.state="end",this.info.addMove({x:n.clientX,y:n.clientY}),Cn(this.info,e,n))}}),mn({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(t){sn(t)&&(this.info.x=t.clientX,this.info.y=t.clientY)},click:function(t){sn(t)&&Sn(this.info,t)},touchstart:function(t){const e=t.changedTouches[0];this.info.x=e.clientX,this.info.y=e.clientY},touchend:function(t){Sn(this.info,t.changedTouches[0],t)}});const En=st((t=>class extends t{_addEventListenerToNode(t,e,n){_n(t,e,n)||super._addEventListenerToNode(t,e,n)}_removeEventListenerFromNode(t,e,n){fn(t,e,n)||super._removeEventListenerFromNode(t,e,n)}}));export{lt as A,bn as B,bt as C,Fe as D,ke as E,En as G,R as M,De as P,L as V,Nt as a,_n as b,z as c,B as d,He as e,Be as f,F as g,w as h,xt as i,M as j,D as k,Y as l,st as m,q as n,Ft as o,It as p,Re as q,Le as r,yn as s,At as t,k as u,ft as v,ot as w,xe as x,ut as y,ht as z};
|