@trintel/zooy 1.0.1-beta.0
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/LICENSE +190 -0
- package/README.md +471 -0
- package/dist/chunks/16-30f5E9no.js +1 -0
- package/dist/chunks/16-41wFkj7S.js +1 -0
- package/dist/chunks/16-4Ffg4DOO.js +1 -0
- package/dist/chunks/16-8pr5mbIO.js +28 -0
- package/dist/chunks/16-B56B50XT.js +1 -0
- package/dist/chunks/16-BFJN6B6d.js +39 -0
- package/dist/chunks/16-BTonF5Je.js +29 -0
- package/dist/chunks/16-BiShwKPX.js +28 -0
- package/dist/chunks/16-BwDdccyH.js +33 -0
- package/dist/chunks/16-C7Xs-wKv.js +1 -0
- package/dist/chunks/16-CDRTWf-C.js +21 -0
- package/dist/chunks/16-CSWwhDUY.js +21 -0
- package/dist/chunks/16-ChlL35BX.js +62 -0
- package/dist/chunks/16-CpNRIuiB.js +1 -0
- package/dist/chunks/16-CqC9427V.js +21 -0
- package/dist/chunks/16-Cubm18Em.js +1 -0
- package/dist/chunks/16-D3Ol0pdg.js +21 -0
- package/dist/chunks/16-DH311Of_.js +1 -0
- package/dist/chunks/16-Dlq3qxDh.js +1 -0
- package/dist/chunks/16-Drl9-5Gn.js +21 -0
- package/dist/chunks/16-Dt4v0bcc.js +1 -0
- package/dist/chunks/16-DylBiJnm.js +1 -0
- package/dist/chunks/20-CZPIOG-A.js +84 -0
- package/dist/chunks/20-gmyNFvDv.js +1 -0
- package/dist/chunks/button-DdJepOoE.js +271 -0
- package/dist/chunks/button-skeleton-COf2kCDL.js +48 -0
- package/dist/chunks/button-skeleton-rf3WDPTZ.js +21 -0
- package/dist/chunks/button-zHEPxpXa.js +66 -0
- package/dist/chunks/carbon-element-CbfPUYRT.js +1 -0
- package/dist/chunks/carbon-element-DzDuXiyl.js +25 -0
- package/dist/chunks/checkbox-B5mHvx0J.js +200 -0
- package/dist/chunks/checkbox-BRPCg-DN.js +40 -0
- package/dist/chunks/class-map-BfNAkUL_.js +5 -0
- package/dist/chunks/class-map-DEHG4tmw.js +32 -0
- package/dist/chunks/collection-helpers-BwUB2CEz.js +8 -0
- package/dist/chunks/collection-helpers-CYLIiyii.js +1 -0
- package/dist/chunks/content-switcher-item-DeGjVRQY.js +350 -0
- package/dist/chunks/content-switcher-item-DucclV1b.js +27 -0
- package/dist/chunks/defs-DMmigODC.js +1077 -0
- package/dist/chunks/defs-DPD20sPK.js +1 -0
- package/dist/chunks/directive-Dp4ZTz-F.js +5 -0
- package/dist/chunks/directive-kLG6oqUu.js +27 -0
- package/dist/chunks/dropdown-item-BgLQ1VLo.js +69 -0
- package/dist/chunks/dropdown-item-DPdwOION.js +620 -0
- package/dist/chunks/focus-B9JYe97T.js +20 -0
- package/dist/chunks/focus-rQSNiwy7.js +1 -0
- package/dist/chunks/form-D6Tce4-W.js +1 -0
- package/dist/chunks/form-DpI-v6DA.js +20 -0
- package/dist/chunks/host-listener-CN245INl.js +37 -0
- package/dist/chunks/host-listener-DD3oGxvg.js +16 -0
- package/dist/chunks/host-listener-gxrTpxgv.js +1 -0
- package/dist/chunks/host-listener-rUcT_LUW.js +1 -0
- package/dist/chunks/icon-loader-Dk_AU26w.js +7 -0
- package/dist/chunks/icon-loader-o_JYDmJX.js +1 -0
- package/dist/chunks/icon-loader-utils-BBjK16O-.js +5 -0
- package/dist/chunks/icon-loader-utils-BEOGXn0q.js +117 -0
- package/dist/chunks/if-defined-BdZRLDJ6.js +5 -0
- package/dist/chunks/if-defined-C0yJsxi2.js +10 -0
- package/dist/chunks/if-non-empty-CEHK-hqx.js +1 -0
- package/dist/chunks/if-non-empty-DTGflHtA.js +5 -0
- package/dist/chunks/index-16wphaSo.js +4 -0
- package/dist/chunks/index-27oFQaOS.js +37 -0
- package/dist/chunks/index-45EApaFs.js +205 -0
- package/dist/chunks/index-5jmZyISW.js +1 -0
- package/dist/chunks/index-B1vQ44Hl.js +363 -0
- package/dist/chunks/index-B3CDjjXh.js +214 -0
- package/dist/chunks/index-B3mXrMt1.js +24 -0
- package/dist/chunks/index-B7mGUQhz.js +79 -0
- package/dist/chunks/index-BBNaYDog.js +22 -0
- package/dist/chunks/index-BBt9OmO5.js +12 -0
- package/dist/chunks/index-BIaF1Dfx.js +107 -0
- package/dist/chunks/index-BJAuRs3y.js +75 -0
- package/dist/chunks/index-BJKftWYn.js +89 -0
- package/dist/chunks/index-BLjNrhkN.js +4 -0
- package/dist/chunks/index-BOTu9u-3.js +86 -0
- package/dist/chunks/index-BPVpH8ll.js +160 -0
- package/dist/chunks/index-BRuvyoCz.js +15 -0
- package/dist/chunks/index-BSgHSOVT.js +65 -0
- package/dist/chunks/index-BSh7UYcP.js +9 -0
- package/dist/chunks/index-BUxB7aWd.js +96 -0
- package/dist/chunks/index-BXIxcS00.js +22 -0
- package/dist/chunks/index-BXczHDk-.js +187 -0
- package/dist/chunks/index-BaVyBv2V.js +25 -0
- package/dist/chunks/index-BgbqX0uv.js +234 -0
- package/dist/chunks/index-BjQlt8g2.js +451 -0
- package/dist/chunks/index-BoNLj7PW.js +44 -0
- package/dist/chunks/index-BwIoRMDI.js +24 -0
- package/dist/chunks/index-Bwix1iwB.js +38 -0
- package/dist/chunks/index-BxVW3p3I.js +258 -0
- package/dist/chunks/index-ByKyGGzb.js +3 -0
- package/dist/chunks/index-ByTSSU1x.js +1 -0
- package/dist/chunks/index-C8LyfVmf.js +428 -0
- package/dist/chunks/index-CBbsFlsv.js +290 -0
- package/dist/chunks/index-CByffhPq.js +762 -0
- package/dist/chunks/index-CIbRjtWm.js +32 -0
- package/dist/chunks/index-CIzeMGQv.js +81 -0
- package/dist/chunks/index-CLGxSjLW.js +62 -0
- package/dist/chunks/index-CMF5Cawn.js +70 -0
- package/dist/chunks/index-CO-A2KY9.js +562 -0
- package/dist/chunks/index-CONgwvp0.js +12 -0
- package/dist/chunks/index-CT43RMOu.js +20 -0
- package/dist/chunks/index-CUgiXqyk.js +4 -0
- package/dist/chunks/index-C_K070Kn.js +284 -0
- package/dist/chunks/index-C_ttE2g9.js +16 -0
- package/dist/chunks/index-CcgnA1uu.js +29 -0
- package/dist/chunks/index-Cd7aoWrX.js +336 -0
- package/dist/chunks/index-Ce-pMzBC.js +19 -0
- package/dist/chunks/index-CgYZ66P_.js +187 -0
- package/dist/chunks/index-ChcHMeAS.js +35 -0
- package/dist/chunks/index-Cixdzvwd.js +682 -0
- package/dist/chunks/index-Clq0Fl19.js +15 -0
- package/dist/chunks/index-CtxTJnIm.js +58 -0
- package/dist/chunks/index-Cv1hWa_y.js +242 -0
- package/dist/chunks/index-CzTjJ8lP.js +432 -0
- package/dist/chunks/index-D0xRAPD5.js +75 -0
- package/dist/chunks/index-D25buhRm.js +79 -0
- package/dist/chunks/index-D4DqJG5_.js +16 -0
- package/dist/chunks/index-D5GGFPcS.js +251 -0
- package/dist/chunks/index-D5kiHJpX.js +413 -0
- package/dist/chunks/index-DEjRiv5B.js +1 -0
- package/dist/chunks/index-DFA4_spk.js +160 -0
- package/dist/chunks/index-DFZsXFsx.js +19 -0
- package/dist/chunks/index-DGauWNwV.js +156 -0
- package/dist/chunks/index-DIR0jr3f.js +127 -0
- package/dist/chunks/index-DNeagy5a.js +65 -0
- package/dist/chunks/index-DO0fmDR9.js +2 -0
- package/dist/chunks/index-DSitHBEh.js +36 -0
- package/dist/chunks/index-DW7ST0tB.js +1 -0
- package/dist/chunks/index-DWfFgEXE.js +110 -0
- package/dist/chunks/index-DX6WAtmo.js +874 -0
- package/dist/chunks/index-DaPfSuLu.js +393 -0
- package/dist/chunks/index-DbKlVm7y.js +74 -0
- package/dist/chunks/index-DdNZTQw1.js +48 -0
- package/dist/chunks/index-Dgi-m1K-.js +1 -0
- package/dist/chunks/index-Dh4uigJs.js +454 -0
- package/dist/chunks/index-DnYNK1mz.js +8 -0
- package/dist/chunks/index-DnierBep.js +510 -0
- package/dist/chunks/index-DnpSGM23.js +213 -0
- package/dist/chunks/index-DntY4deR.js +41 -0
- package/dist/chunks/index-Dp4A8k6C.js +103 -0
- package/dist/chunks/index-Dphpk5r2.js +1 -0
- package/dist/chunks/index-DrBrgF-v.js +49 -0
- package/dist/chunks/index-Dr_cqQ-_.js +77 -0
- package/dist/chunks/index-Dt-nBtrQ.js +26 -0
- package/dist/chunks/index-DurPWBYc.js +24 -0
- package/dist/chunks/index-DwTj7cFr.js +57 -0
- package/dist/chunks/index-DyZVAYLv.js +52 -0
- package/dist/chunks/index-Hh597Yu6.js +121 -0
- package/dist/chunks/index-LxkAuMAA.js +1 -0
- package/dist/chunks/index-OaQhvPR1.js +46 -0
- package/dist/chunks/index-UPr2EvBX.js +149 -0
- package/dist/chunks/index-WNXgzThF.js +2340 -0
- package/dist/chunks/index-WvrCPen2.js +367 -0
- package/dist/chunks/index-cTXIVcWI.js +45 -0
- package/dist/chunks/index-caLn8cu1.js +1603 -0
- package/dist/chunks/index-hLI0Bnyb.js +77 -0
- package/dist/chunks/index-jBse-XgU.js +35 -0
- package/dist/chunks/index-oTjafsfN.js +25 -0
- package/dist/chunks/index-qNmuI3RB.js +149 -0
- package/dist/chunks/index-qiqzy9MI.js +23 -0
- package/dist/chunks/index-rwBsdvh6.js +87 -0
- package/dist/chunks/index-siqJUhKa.js +1 -0
- package/dist/chunks/index-w-G9CFId.js +1 -0
- package/dist/chunks/index-x6SeA7x7.js +405 -0
- package/dist/chunks/loading-icon-DJQIjg97.js +23 -0
- package/dist/chunks/loading-icon-DhJR6LyV.js +16 -0
- package/dist/chunks/main-DUusfqrI.js +18 -0
- package/dist/chunks/main-Dp7wHHgP.js +2882 -0
- package/dist/chunks/on-BPhwbVf3.js +10 -0
- package/dist/chunks/on-XRofyGQh.js +1 -0
- package/dist/chunks/property-DCYiZTFF.js +5 -0
- package/dist/chunks/property-pT1z5CCa.js +36 -0
- package/dist/chunks/query-CbRg6ZGy.js +23 -0
- package/dist/chunks/query-Dh8joWcT.js +9 -0
- package/dist/chunks/radio-group-manager-DBAEmhDM.js +1 -0
- package/dist/chunks/radio-group-manager-Du5wSOS1.js +102 -0
- package/dist/chunks/register-BK21_Wkj.js +11035 -0
- package/dist/chunks/register-BMNs2hNG.js +2157 -0
- package/dist/chunks/register-Cc9zkA5F.js +1 -0
- package/dist/chunks/register-JwwMwdRf.js +1273 -0
- package/dist/chunks/search-C3raqgOD.js +30 -0
- package/dist/chunks/search-CIhxkVjj.js +239 -0
- package/dist/chunks/select-item-4aISXm0r.js +76 -0
- package/dist/chunks/select-item-DjoxYopL.js +356 -0
- package/dist/chunks/settings-BPOpwVkr.js +594 -0
- package/dist/chunks/settings-CK2vhfPu.js +78 -0
- package/dist/chunks/shared-enums-BJDDuJr7.js +1 -0
- package/dist/chunks/shared-enums-DALKjQ7e.js +7 -0
- package/dist/chunks/state-Bpmgn27B.js +12 -0
- package/dist/chunks/state-FnSmMH94.js +5 -0
- package/dist/chunks/text-input-BygzMjjc.js +371 -0
- package/dist/chunks/text-input-cjcnMXO-.js +68 -0
- package/dist/chunks/tooltip-content-BjdZJ_Ui.js +134 -0
- package/dist/chunks/tooltip-content-DHyDYyOH.js +3 -0
- package/dist/chunks/tslib.es6-B07k2eac.js +1 -0
- package/dist/chunks/tslib.es6-C5gLNDSD.js +160 -0
- package/dist/chunks/unsafe-html-C_MKAcuC.js +5 -0
- package/dist/chunks/unsafe-html-D49sIpJ5.js +27 -0
- package/dist/chunks/validity-BMLNCMmP.js +1 -0
- package/dist/chunks/validity-CTz7ivUd.js +59 -0
- package/dist/zooy.cjs.js +1 -0
- package/dist/zooy.es.js +4 -0
- package/package.json +57 -0
- package/src/sass/carbon-icons.scss +46 -0
- package/src/sass/main.scss +7 -0
- package/src/sass/panels.scss +642 -0
- package/src/sass/reset.scss +43 -0
- package/src/sass/split.scss +131 -0
|
@@ -0,0 +1,2157 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const w=require("./main-DUusfqrI.js"),l=require("./tslib.es6-B07k2eac.js");/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2016 Google Inc.
|
|
4
|
+
*
|
|
5
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
* in the Software without restriction, including without limitation the rights
|
|
8
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
* furnished to do so, subject to the following conditions:
|
|
11
|
+
*
|
|
12
|
+
* The above copyright notice and this permission notice shall be included in
|
|
13
|
+
* all copies or substantial portions of the Software.
|
|
14
|
+
*
|
|
15
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
+
* THE SOFTWARE.
|
|
22
|
+
*/var C=(function(){function a(e){e===void 0&&(e={}),this.adapter=e}return Object.defineProperty(a,"cssClasses",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(a,"strings",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(a,"numbers",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(a,"defaultAdapter",{get:function(){return{}},enumerable:!1,configurable:!0}),a.prototype.init=function(){},a.prototype.destroy=function(){},a})();/**
|
|
23
|
+
* @license
|
|
24
|
+
* Copyright 2016 Google Inc.
|
|
25
|
+
*
|
|
26
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
27
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
28
|
+
* in the Software without restriction, including without limitation the rights
|
|
29
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
30
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
31
|
+
* furnished to do so, subject to the following conditions:
|
|
32
|
+
*
|
|
33
|
+
* The above copyright notice and this permission notice shall be included in
|
|
34
|
+
* all copies or substantial portions of the Software.
|
|
35
|
+
*
|
|
36
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
37
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
38
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
39
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
40
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
41
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
42
|
+
* THE SOFTWARE.
|
|
43
|
+
*/var T=(function(){function a(e,t){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];this.root=e,this.initialize.apply(this,l.__spreadArray([],l.__read(n))),this.foundation=t===void 0?this.getDefaultFoundation():t,this.foundation.init(),this.initialSyncWithDOM()}return a.attachTo=function(e){return new a(e,new C({}))},a.prototype.initialize=function(){},a.prototype.getDefaultFoundation=function(){throw new Error("Subclasses must override getDefaultFoundation to return a properly configured foundation class")},a.prototype.initialSyncWithDOM=function(){},a.prototype.destroy=function(){this.foundation.destroy()},a.prototype.listen=function(e,t,n){this.root.addEventListener(e,t,n)},a.prototype.unlisten=function(e,t,n){this.root.removeEventListener(e,t,n)},a.prototype.emit=function(e,t,n){n===void 0&&(n=!1);var i;typeof CustomEvent=="function"?i=new CustomEvent(e,{bubbles:n,detail:t}):(i=document.createEvent("CustomEvent"),i.initCustomEvent(e,n,!1,t)),this.root.dispatchEvent(i)},a})();/**
|
|
44
|
+
* @license
|
|
45
|
+
* Copyright 2018 Google Inc.
|
|
46
|
+
*
|
|
47
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
48
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
49
|
+
* in the Software without restriction, including without limitation the rights
|
|
50
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
51
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
52
|
+
* furnished to do so, subject to the following conditions:
|
|
53
|
+
*
|
|
54
|
+
* The above copyright notice and this permission notice shall be included in
|
|
55
|
+
* all copies or substantial portions of the Software.
|
|
56
|
+
*
|
|
57
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
58
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
59
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
60
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
61
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
62
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
63
|
+
* THE SOFTWARE.
|
|
64
|
+
*/function Mt(a,e){if(a.closest)return a.closest(e);for(var t=a;t;){if(it(t,e))return t;t=t.parentElement}return null}function it(a,e){var t=a.matches||a.webkitMatchesSelector||a.msMatchesSelector;return t.call(a,e)}function pn(a){var e=a;if(e.offsetParent!==null)return e.scrollWidth;var t=e.cloneNode(!0);t.style.setProperty("position","absolute"),t.style.setProperty("transform","translate(-9999px, -9999px)"),document.documentElement.appendChild(t);var n=t.scrollWidth;return document.documentElement.removeChild(t),n}/**
|
|
65
|
+
* @license
|
|
66
|
+
* Copyright 2016 Google Inc.
|
|
67
|
+
*
|
|
68
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
69
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
70
|
+
* in the Software without restriction, including without limitation the rights
|
|
71
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
72
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
73
|
+
* furnished to do so, subject to the following conditions:
|
|
74
|
+
*
|
|
75
|
+
* The above copyright notice and this permission notice shall be included in
|
|
76
|
+
* all copies or substantial portions of the Software.
|
|
77
|
+
*
|
|
78
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
79
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
80
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
81
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
82
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
83
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
84
|
+
* THE SOFTWARE.
|
|
85
|
+
*/var he={animation:{prefixed:"-webkit-animation",standard:"animation"},transform:{prefixed:"-webkit-transform",standard:"transform"},transition:{prefixed:"-webkit-transition",standard:"transition"}},fe={animationend:{cssProperty:"animation",prefixed:"webkitAnimationEnd",standard:"animationend"},animationiteration:{cssProperty:"animation",prefixed:"webkitAnimationIteration",standard:"animationiteration"},animationstart:{cssProperty:"animation",prefixed:"webkitAnimationStart",standard:"animationstart"},transitionend:{cssProperty:"transition",prefixed:"webkitTransitionEnd",standard:"transitionend"}};function je(a){return!!a.document&&typeof a.document.createElement=="function"}function Yt(a,e){if(je(a)&&e in he){var t=a.document.createElement("div"),n=he[e],i=n.standard,r=n.prefixed,o=i in t.style;return o?i:r}return e}function pe(a,e){if(je(a)&&e in fe){var t=a.document.createElement("div"),n=fe[e],i=n.standard,r=n.prefixed,o=n.cssProperty,s=o in t.style;return s?i:r}return e}/**
|
|
86
|
+
* @license
|
|
87
|
+
* Copyright 2019 Google Inc.
|
|
88
|
+
*
|
|
89
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
90
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
91
|
+
* in the Software without restriction, including without limitation the rights
|
|
92
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
93
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
94
|
+
* furnished to do so, subject to the following conditions:
|
|
95
|
+
*
|
|
96
|
+
* The above copyright notice and this permission notice shall be included in
|
|
97
|
+
* all copies or substantial portions of the Software.
|
|
98
|
+
*
|
|
99
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
100
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
101
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
102
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
103
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
104
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
105
|
+
* THE SOFTWARE.
|
|
106
|
+
*/function O(a){return a===void 0&&(a=window),En(a)?{passive:!0}:!1}function En(a){a===void 0&&(a=window);var e=!1;try{var t={get passive(){return e=!0,!1}},n=function(){};a.document.addEventListener("test",n,t),a.document.removeEventListener("test",n,t)}catch{e=!1}return e}/**
|
|
107
|
+
* @license
|
|
108
|
+
* Copyright 2016 Google Inc.
|
|
109
|
+
*
|
|
110
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
111
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
112
|
+
* in the Software without restriction, including without limitation the rights
|
|
113
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
114
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
115
|
+
* furnished to do so, subject to the following conditions:
|
|
116
|
+
*
|
|
117
|
+
* The above copyright notice and this permission notice shall be included in
|
|
118
|
+
* all copies or substantial portions of the Software.
|
|
119
|
+
*
|
|
120
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
121
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
122
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
123
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
124
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
125
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
126
|
+
* THE SOFTWARE.
|
|
127
|
+
*/var mn={BG_FOCUSED:"mdc-ripple-upgraded--background-focused",FG_ACTIVATION:"mdc-ripple-upgraded--foreground-activation",FG_DEACTIVATION:"mdc-ripple-upgraded--foreground-deactivation",ROOT:"mdc-ripple-upgraded",UNBOUNDED:"mdc-ripple-upgraded--unbounded"},gn={VAR_FG_SCALE:"--mdc-ripple-fg-scale",VAR_FG_SIZE:"--mdc-ripple-fg-size",VAR_FG_TRANSLATE_END:"--mdc-ripple-fg-translate-end",VAR_FG_TRANSLATE_START:"--mdc-ripple-fg-translate-start",VAR_LEFT:"--mdc-ripple-left",VAR_TOP:"--mdc-ripple-top"},Ee={DEACTIVATION_TIMEOUT_MS:225,FG_DEACTIVATION_MS:150,INITIAL_ORIGIN_SCALE:.6,PADDING:10,TAP_DELAY_MS:300},Kt;function An(a,e){e===void 0&&(e=!1);var t=a.CSS,n=Kt;if(typeof Kt=="boolean"&&!e)return Kt;var i=t&&typeof t.supports=="function";if(!i)return!1;var r=t.supports("--css-vars","yes"),o=t.supports("(--css-vars: yes)")&&t.supports("color","#00000000");return n=r||o,e||(Kt=n),n}function In(a,e,t){if(!a)return{x:0,y:0};var n=e.x,i=e.y,r=n+t.left,o=i+t.top,s,u;if(a.type==="touchstart"){var c=a;s=c.changedTouches[0].pageX-r,u=c.changedTouches[0].pageY-o}else{var h=a;s=h.pageX-r,u=h.pageY-o}return{x:s,y:u}}/**
|
|
128
|
+
* @license
|
|
129
|
+
* Copyright 2016 Google Inc.
|
|
130
|
+
*
|
|
131
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
132
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
133
|
+
* in the Software without restriction, including without limitation the rights
|
|
134
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
135
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
136
|
+
* furnished to do so, subject to the following conditions:
|
|
137
|
+
*
|
|
138
|
+
* The above copyright notice and this permission notice shall be included in
|
|
139
|
+
* all copies or substantial portions of the Software.
|
|
140
|
+
*
|
|
141
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
142
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
143
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
144
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
145
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
146
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
147
|
+
* THE SOFTWARE.
|
|
148
|
+
*/var me=["touchstart","pointerdown","mousedown","keydown"],ge=["touchend","pointerup","mouseup","contextmenu"],Wt=[],pt=(function(a){l.__extends(e,a);function e(t){var n=a.call(this,l.__assign(l.__assign({},e.defaultAdapter),t))||this;return n.activationAnimationHasEnded=!1,n.activationTimer=0,n.fgDeactivationRemovalTimer=0,n.fgScale="0",n.frame={width:0,height:0},n.initialSize=0,n.layoutFrame=0,n.maxRadius=0,n.unboundedCoords={left:0,top:0},n.activationState=n.defaultActivationState(),n.activationTimerCallback=function(){n.activationAnimationHasEnded=!0,n.runDeactivationUXLogicIfReady()},n.activateHandler=function(i){n.activateImpl(i)},n.deactivateHandler=function(){n.deactivateImpl()},n.focusHandler=function(){n.handleFocus()},n.blurHandler=function(){n.handleBlur()},n.resizeHandler=function(){n.layout()},n}return Object.defineProperty(e,"cssClasses",{get:function(){return mn},enumerable:!1,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return gn},enumerable:!1,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return Ee},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},browserSupportsCssVars:function(){return!0},computeBoundingRect:function(){return{top:0,right:0,bottom:0,left:0,width:0,height:0}},containsEventTarget:function(){return!0},deregisterDocumentInteractionHandler:function(){},deregisterInteractionHandler:function(){},deregisterResizeHandler:function(){},getWindowPageOffset:function(){return{x:0,y:0}},isSurfaceActive:function(){return!0},isSurfaceDisabled:function(){return!0},isUnbounded:function(){return!0},registerDocumentInteractionHandler:function(){},registerInteractionHandler:function(){},registerResizeHandler:function(){},removeClass:function(){},updateCssVariable:function(){}}},enumerable:!1,configurable:!0}),e.prototype.init=function(){var t=this,n=this.supportsPressRipple();if(this.registerRootHandlers(n),n){var i=e.cssClasses,r=i.ROOT,o=i.UNBOUNDED;requestAnimationFrame(function(){t.adapter.addClass(r),t.adapter.isUnbounded()&&(t.adapter.addClass(o),t.layoutInternal())})}},e.prototype.destroy=function(){var t=this;if(this.supportsPressRipple()){this.activationTimer&&(clearTimeout(this.activationTimer),this.activationTimer=0,this.adapter.removeClass(e.cssClasses.FG_ACTIVATION)),this.fgDeactivationRemovalTimer&&(clearTimeout(this.fgDeactivationRemovalTimer),this.fgDeactivationRemovalTimer=0,this.adapter.removeClass(e.cssClasses.FG_DEACTIVATION));var n=e.cssClasses,i=n.ROOT,r=n.UNBOUNDED;requestAnimationFrame(function(){t.adapter.removeClass(i),t.adapter.removeClass(r),t.removeCssVars()})}this.deregisterRootHandlers(),this.deregisterDeactivationHandlers()},e.prototype.activate=function(t){this.activateImpl(t)},e.prototype.deactivate=function(){this.deactivateImpl()},e.prototype.layout=function(){var t=this;this.layoutFrame&&cancelAnimationFrame(this.layoutFrame),this.layoutFrame=requestAnimationFrame(function(){t.layoutInternal(),t.layoutFrame=0})},e.prototype.setUnbounded=function(t){var n=e.cssClasses.UNBOUNDED;t?this.adapter.addClass(n):this.adapter.removeClass(n)},e.prototype.handleFocus=function(){var t=this;requestAnimationFrame(function(){return t.adapter.addClass(e.cssClasses.BG_FOCUSED)})},e.prototype.handleBlur=function(){var t=this;requestAnimationFrame(function(){return t.adapter.removeClass(e.cssClasses.BG_FOCUSED)})},e.prototype.supportsPressRipple=function(){return this.adapter.browserSupportsCssVars()},e.prototype.defaultActivationState=function(){return{activationEvent:void 0,hasDeactivationUXRun:!1,isActivated:!1,isProgrammatic:!1,wasActivatedByPointer:!1,wasElementMadeActive:!1}},e.prototype.registerRootHandlers=function(t){var n,i;if(t){try{for(var r=l.__values(me),o=r.next();!o.done;o=r.next()){var s=o.value;this.adapter.registerInteractionHandler(s,this.activateHandler)}}catch(u){n={error:u}}finally{try{o&&!o.done&&(i=r.return)&&i.call(r)}finally{if(n)throw n.error}}this.adapter.isUnbounded()&&this.adapter.registerResizeHandler(this.resizeHandler)}this.adapter.registerInteractionHandler("focus",this.focusHandler),this.adapter.registerInteractionHandler("blur",this.blurHandler)},e.prototype.registerDeactivationHandlers=function(t){var n,i;if(t.type==="keydown")this.adapter.registerInteractionHandler("keyup",this.deactivateHandler);else try{for(var r=l.__values(ge),o=r.next();!o.done;o=r.next()){var s=o.value;this.adapter.registerDocumentInteractionHandler(s,this.deactivateHandler)}}catch(u){n={error:u}}finally{try{o&&!o.done&&(i=r.return)&&i.call(r)}finally{if(n)throw n.error}}},e.prototype.deregisterRootHandlers=function(){var t,n;try{for(var i=l.__values(me),r=i.next();!r.done;r=i.next()){var o=r.value;this.adapter.deregisterInteractionHandler(o,this.activateHandler)}}catch(s){t={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}this.adapter.deregisterInteractionHandler("focus",this.focusHandler),this.adapter.deregisterInteractionHandler("blur",this.blurHandler),this.adapter.isUnbounded()&&this.adapter.deregisterResizeHandler(this.resizeHandler)},e.prototype.deregisterDeactivationHandlers=function(){var t,n;this.adapter.deregisterInteractionHandler("keyup",this.deactivateHandler);try{for(var i=l.__values(ge),r=i.next();!r.done;r=i.next()){var o=r.value;this.adapter.deregisterDocumentInteractionHandler(o,this.deactivateHandler)}}catch(s){t={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}},e.prototype.removeCssVars=function(){var t=this,n=e.strings,i=Object.keys(n);i.forEach(function(r){r.indexOf("VAR_")===0&&t.adapter.updateCssVariable(n[r],null)})},e.prototype.activateImpl=function(t){var n=this;if(!this.adapter.isSurfaceDisabled()){var i=this.activationState;if(!i.isActivated){var r=this.previousActivationEvent,o=r&&t!==void 0&&r.type!==t.type;if(!o){i.isActivated=!0,i.isProgrammatic=t===void 0,i.activationEvent=t,i.wasActivatedByPointer=i.isProgrammatic?!1:t!==void 0&&(t.type==="mousedown"||t.type==="touchstart"||t.type==="pointerdown");var s=t!==void 0&&Wt.length>0&&Wt.some(function(u){return n.adapter.containsEventTarget(u)});if(s){this.resetActivationState();return}t!==void 0&&(Wt.push(t.target),this.registerDeactivationHandlers(t)),i.wasElementMadeActive=this.checkElementMadeActive(t),i.wasElementMadeActive&&this.animateActivation(),requestAnimationFrame(function(){Wt=[],!i.wasElementMadeActive&&t!==void 0&&(t.key===" "||t.keyCode===32)&&(i.wasElementMadeActive=n.checkElementMadeActive(t),i.wasElementMadeActive&&n.animateActivation()),i.wasElementMadeActive||(n.activationState=n.defaultActivationState())})}}}},e.prototype.checkElementMadeActive=function(t){return t!==void 0&&t.type==="keydown"?this.adapter.isSurfaceActive():!0},e.prototype.animateActivation=function(){var t=this,n=e.strings,i=n.VAR_FG_TRANSLATE_START,r=n.VAR_FG_TRANSLATE_END,o=e.cssClasses,s=o.FG_DEACTIVATION,u=o.FG_ACTIVATION,c=e.numbers.DEACTIVATION_TIMEOUT_MS;this.layoutInternal();var h="",E="";if(!this.adapter.isUnbounded()){var p=this.getFgTranslationCoordinates(),f=p.startPoint,v=p.endPoint;h=f.x+"px, "+f.y+"px",E=v.x+"px, "+v.y+"px"}this.adapter.updateCssVariable(i,h),this.adapter.updateCssVariable(r,E),clearTimeout(this.activationTimer),clearTimeout(this.fgDeactivationRemovalTimer),this.rmBoundedActivationClasses(),this.adapter.removeClass(s),this.adapter.computeBoundingRect(),this.adapter.addClass(u),this.activationTimer=setTimeout(function(){t.activationTimerCallback()},c)},e.prototype.getFgTranslationCoordinates=function(){var t=this.activationState,n=t.activationEvent,i=t.wasActivatedByPointer,r;i?r=In(n,this.adapter.getWindowPageOffset(),this.adapter.computeBoundingRect()):r={x:this.frame.width/2,y:this.frame.height/2},r={x:r.x-this.initialSize/2,y:r.y-this.initialSize/2};var o={x:this.frame.width/2-this.initialSize/2,y:this.frame.height/2-this.initialSize/2};return{startPoint:r,endPoint:o}},e.prototype.runDeactivationUXLogicIfReady=function(){var t=this,n=e.cssClasses.FG_DEACTIVATION,i=this.activationState,r=i.hasDeactivationUXRun,o=i.isActivated,s=r||!o;s&&this.activationAnimationHasEnded&&(this.rmBoundedActivationClasses(),this.adapter.addClass(n),this.fgDeactivationRemovalTimer=setTimeout(function(){t.adapter.removeClass(n)},Ee.FG_DEACTIVATION_MS))},e.prototype.rmBoundedActivationClasses=function(){var t=e.cssClasses.FG_ACTIVATION;this.adapter.removeClass(t),this.activationAnimationHasEnded=!1,this.adapter.computeBoundingRect()},e.prototype.resetActivationState=function(){var t=this;this.previousActivationEvent=this.activationState.activationEvent,this.activationState=this.defaultActivationState(),setTimeout(function(){return t.previousActivationEvent=void 0},e.numbers.TAP_DELAY_MS)},e.prototype.deactivateImpl=function(){var t=this,n=this.activationState;if(n.isActivated){var i=l.__assign({},n);n.isProgrammatic?(requestAnimationFrame(function(){t.animateDeactivation(i)}),this.resetActivationState()):(this.deregisterDeactivationHandlers(),requestAnimationFrame(function(){t.activationState.hasDeactivationUXRun=!0,t.animateDeactivation(i),t.resetActivationState()}))}},e.prototype.animateDeactivation=function(t){var n=t.wasActivatedByPointer,i=t.wasElementMadeActive;(n||i)&&this.runDeactivationUXLogicIfReady()},e.prototype.layoutInternal=function(){var t=this;this.frame=this.adapter.computeBoundingRect();var n=Math.max(this.frame.height,this.frame.width),i=function(){var o=Math.sqrt(Math.pow(t.frame.width,2)+Math.pow(t.frame.height,2));return o+e.numbers.PADDING};this.maxRadius=this.adapter.isUnbounded()?n:i();var r=Math.floor(n*e.numbers.INITIAL_ORIGIN_SCALE);this.adapter.isUnbounded()&&r%2!==0?this.initialSize=r-1:this.initialSize=r,this.fgScale=""+this.maxRadius/this.initialSize,this.updateLayoutCssVars()},e.prototype.updateLayoutCssVars=function(){var t=e.strings,n=t.VAR_FG_SIZE,i=t.VAR_LEFT,r=t.VAR_TOP,o=t.VAR_FG_SCALE;this.adapter.updateCssVariable(n,this.initialSize+"px"),this.adapter.updateCssVariable(o,this.fgScale),this.adapter.isUnbounded()&&(this.unboundedCoords={left:Math.round(this.frame.width/2-this.initialSize/2),top:Math.round(this.frame.height/2-this.initialSize/2)},this.adapter.updateCssVariable(i,this.unboundedCoords.left+"px"),this.adapter.updateCssVariable(r,this.unboundedCoords.top+"px"))},e})(C);/**
|
|
149
|
+
* @license
|
|
150
|
+
* Copyright 2016 Google Inc.
|
|
151
|
+
*
|
|
152
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
153
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
154
|
+
* in the Software without restriction, including without limitation the rights
|
|
155
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
156
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
157
|
+
* furnished to do so, subject to the following conditions:
|
|
158
|
+
*
|
|
159
|
+
* The above copyright notice and this permission notice shall be included in
|
|
160
|
+
* all copies or substantial portions of the Software.
|
|
161
|
+
*
|
|
162
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
163
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
164
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
165
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
166
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
167
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
168
|
+
* THE SOFTWARE.
|
|
169
|
+
*/var D=(function(a){l.__extends(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.disabled=!1,t}return e.attachTo=function(t,n){n===void 0&&(n={isUnbounded:void 0});var i=new e(t);return n.isUnbounded!==void 0&&(i.unbounded=n.isUnbounded),i},e.createAdapter=function(t){return{addClass:function(n){return t.root.classList.add(n)},browserSupportsCssVars:function(){return An(window)},computeBoundingRect:function(){return t.root.getBoundingClientRect()},containsEventTarget:function(n){return t.root.contains(n)},deregisterDocumentInteractionHandler:function(n,i){return document.documentElement.removeEventListener(n,i,O())},deregisterInteractionHandler:function(n,i){return t.root.removeEventListener(n,i,O())},deregisterResizeHandler:function(n){return window.removeEventListener("resize",n)},getWindowPageOffset:function(){return{x:window.pageXOffset,y:window.pageYOffset}},isSurfaceActive:function(){return it(t.root,":active")},isSurfaceDisabled:function(){return!!t.disabled},isUnbounded:function(){return!!t.unbounded},registerDocumentInteractionHandler:function(n,i){return document.documentElement.addEventListener(n,i,O())},registerInteractionHandler:function(n,i){return t.root.addEventListener(n,i,O())},registerResizeHandler:function(n){return window.addEventListener("resize",n)},removeClass:function(n){return t.root.classList.remove(n)},updateCssVariable:function(n,i){return t.root.style.setProperty(n,i)}}},Object.defineProperty(e.prototype,"unbounded",{get:function(){return!!this.isUnbounded},set:function(t){this.isUnbounded=!!t,this.setUnbounded()},enumerable:!1,configurable:!0}),e.prototype.activate=function(){this.foundation.activate()},e.prototype.deactivate=function(){this.foundation.deactivate()},e.prototype.layout=function(){this.foundation.layout()},e.prototype.getDefaultFoundation=function(){return new pt(e.createAdapter(this))},e.prototype.initialSyncWithDOM=function(){var t=this.root;this.isUnbounded="mdcRippleIsUnbounded"in t.dataset},e.prototype.setUnbounded=function(){this.foundation.setUnbounded(!!this.isUnbounded)},e})(T);/**
|
|
170
|
+
* @license
|
|
171
|
+
* Copyright 2016 Google Inc.
|
|
172
|
+
*
|
|
173
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
174
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
175
|
+
* in the Software without restriction, including without limitation the rights
|
|
176
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
177
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
178
|
+
* furnished to do so, subject to the following conditions:
|
|
179
|
+
*
|
|
180
|
+
* The above copyright notice and this permission notice shall be included in
|
|
181
|
+
* all copies or substantial portions of the Software.
|
|
182
|
+
*
|
|
183
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
184
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
185
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
186
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
187
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
188
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
189
|
+
* THE SOFTWARE.
|
|
190
|
+
*/var Ht={ANIM_CHECKED_INDETERMINATE:"mdc-checkbox--anim-checked-indeterminate",ANIM_CHECKED_UNCHECKED:"mdc-checkbox--anim-checked-unchecked",ANIM_INDETERMINATE_CHECKED:"mdc-checkbox--anim-indeterminate-checked",ANIM_INDETERMINATE_UNCHECKED:"mdc-checkbox--anim-indeterminate-unchecked",ANIM_UNCHECKED_CHECKED:"mdc-checkbox--anim-unchecked-checked",ANIM_UNCHECKED_INDETERMINATE:"mdc-checkbox--anim-unchecked-indeterminate",BACKGROUND:"mdc-checkbox__background",CHECKED:"mdc-checkbox--checked",CHECKMARK:"mdc-checkbox__checkmark",CHECKMARK_PATH:"mdc-checkbox__checkmark-path",DISABLED:"mdc-checkbox--disabled",INDETERMINATE:"mdc-checkbox--indeterminate",MIXEDMARK:"mdc-checkbox__mixedmark",NATIVE_CONTROL:"mdc-checkbox__native-control",ROOT:"mdc-checkbox",SELECTED:"mdc-checkbox--selected",UPGRADED:"mdc-checkbox--upgraded"},X={ARIA_CHECKED_ATTR:"aria-checked",ARIA_CHECKED_INDETERMINATE_VALUE:"mixed",DATA_INDETERMINATE_ATTR:"data-indeterminate",NATIVE_CONTROL_SELECTOR:".mdc-checkbox__native-control",TRANSITION_STATE_CHECKED:"checked",TRANSITION_STATE_INDETERMINATE:"indeterminate",TRANSITION_STATE_INIT:"init",TRANSITION_STATE_UNCHECKED:"unchecked"},Ae={ANIM_END_LATCH_MS:250};/**
|
|
191
|
+
* @license
|
|
192
|
+
* Copyright 2016 Google Inc.
|
|
193
|
+
*
|
|
194
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
195
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
196
|
+
* in the Software without restriction, including without limitation the rights
|
|
197
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
198
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
199
|
+
* furnished to do so, subject to the following conditions:
|
|
200
|
+
*
|
|
201
|
+
* The above copyright notice and this permission notice shall be included in
|
|
202
|
+
* all copies or substantial portions of the Software.
|
|
203
|
+
*
|
|
204
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
205
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
206
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
207
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
208
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
209
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
210
|
+
* THE SOFTWARE.
|
|
211
|
+
*/var vn=(function(a){l.__extends(e,a);function e(t){var n=a.call(this,l.__assign(l.__assign({},e.defaultAdapter),t))||this;return n.currentCheckState=X.TRANSITION_STATE_INIT,n.currentAnimationClass="",n.animEndLatchTimer=0,n.enableAnimationEndHandler=!1,n}return Object.defineProperty(e,"cssClasses",{get:function(){return Ht},enumerable:!1,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return X},enumerable:!1,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return Ae},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},forceLayout:function(){},hasNativeControl:function(){return!1},isAttachedToDOM:function(){return!1},isChecked:function(){return!1},isIndeterminate:function(){return!1},removeClass:function(){},removeNativeControlAttr:function(){},setNativeControlAttr:function(){},setNativeControlDisabled:function(){}}},enumerable:!1,configurable:!0}),e.prototype.init=function(){this.currentCheckState=this.determineCheckState(),this.updateAriaChecked(),this.adapter.addClass(Ht.UPGRADED)},e.prototype.destroy=function(){clearTimeout(this.animEndLatchTimer)},e.prototype.setDisabled=function(t){this.adapter.setNativeControlDisabled(t),t?this.adapter.addClass(Ht.DISABLED):this.adapter.removeClass(Ht.DISABLED)},e.prototype.handleAnimationEnd=function(){var t=this;this.enableAnimationEndHandler&&(clearTimeout(this.animEndLatchTimer),this.animEndLatchTimer=setTimeout(function(){t.adapter.removeClass(t.currentAnimationClass),t.enableAnimationEndHandler=!1},Ae.ANIM_END_LATCH_MS))},e.prototype.handleChange=function(){this.transitionCheckState()},e.prototype.transitionCheckState=function(){if(this.adapter.hasNativeControl()){var t=this.currentCheckState,n=this.determineCheckState();if(t!==n){this.updateAriaChecked();var i=X.TRANSITION_STATE_UNCHECKED,r=Ht.SELECTED;n===i?this.adapter.removeClass(r):this.adapter.addClass(r),this.currentAnimationClass.length>0&&(clearTimeout(this.animEndLatchTimer),this.adapter.forceLayout(),this.adapter.removeClass(this.currentAnimationClass)),this.currentAnimationClass=this.getTransitionAnimationClass(t,n),this.currentCheckState=n,this.adapter.isAttachedToDOM()&&this.currentAnimationClass.length>0&&(this.adapter.addClass(this.currentAnimationClass),this.enableAnimationEndHandler=!0)}}},e.prototype.determineCheckState=function(){var t=X.TRANSITION_STATE_INDETERMINATE,n=X.TRANSITION_STATE_CHECKED,i=X.TRANSITION_STATE_UNCHECKED;return this.adapter.isIndeterminate()?t:this.adapter.isChecked()?n:i},e.prototype.getTransitionAnimationClass=function(t,n){var i=X.TRANSITION_STATE_INIT,r=X.TRANSITION_STATE_CHECKED,o=X.TRANSITION_STATE_UNCHECKED,s=e.cssClasses,u=s.ANIM_UNCHECKED_CHECKED,c=s.ANIM_UNCHECKED_INDETERMINATE,h=s.ANIM_CHECKED_UNCHECKED,E=s.ANIM_CHECKED_INDETERMINATE,p=s.ANIM_INDETERMINATE_CHECKED,f=s.ANIM_INDETERMINATE_UNCHECKED;switch(t){case i:return n===o?"":n===r?p:f;case o:return n===r?u:c;case r:return n===o?h:E;default:return n===r?p:f}},e.prototype.updateAriaChecked=function(){this.adapter.isIndeterminate()?this.adapter.setNativeControlAttr(X.ARIA_CHECKED_ATTR,X.ARIA_CHECKED_INDETERMINATE_VALUE):this.adapter.removeNativeControlAttr(X.ARIA_CHECKED_ATTR)},e})(C);/**
|
|
212
|
+
* @license
|
|
213
|
+
* Copyright 2016 Google Inc.
|
|
214
|
+
*
|
|
215
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
216
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
217
|
+
* in the Software without restriction, including without limitation the rights
|
|
218
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
219
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
220
|
+
* furnished to do so, subject to the following conditions:
|
|
221
|
+
*
|
|
222
|
+
* The above copyright notice and this permission notice shall be included in
|
|
223
|
+
* all copies or substantial portions of the Software.
|
|
224
|
+
*
|
|
225
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
226
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
227
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
228
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
229
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
230
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
231
|
+
* THE SOFTWARE.
|
|
232
|
+
*/var Ie=["checked","indeterminate"],qe=(function(a){l.__extends(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.rippleSurface=t.createRipple(),t}return e.attachTo=function(t){return new e(t)},Object.defineProperty(e.prototype,"ripple",{get:function(){return this.rippleSurface},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"checked",{get:function(){return this.getNativeControl().checked},set:function(t){this.getNativeControl().checked=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"indeterminate",{get:function(){return this.getNativeControl().indeterminate},set:function(t){this.getNativeControl().indeterminate=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"disabled",{get:function(){return this.getNativeControl().disabled},set:function(t){this.foundation.setDisabled(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){return this.getNativeControl().value},set:function(t){this.getNativeControl().value=t},enumerable:!1,configurable:!0}),e.prototype.initialize=function(){var t=X.DATA_INDETERMINATE_ATTR;this.getNativeControl().indeterminate=this.getNativeControl().getAttribute(t)==="true",this.getNativeControl().removeAttribute(t)},e.prototype.initialSyncWithDOM=function(){var t=this;this.handleChange=function(){t.foundation.handleChange()},this.handleAnimationEnd=function(){t.foundation.handleAnimationEnd()},this.getNativeControl().addEventListener("change",this.handleChange),this.listen(pe(window,"animationend"),this.handleAnimationEnd),this.installPropertyChangeHooks()},e.prototype.destroy=function(){this.rippleSurface.destroy(),this.getNativeControl().removeEventListener("change",this.handleChange),this.unlisten(pe(window,"animationend"),this.handleAnimationEnd),this.uninstallPropertyChangeHooks(),a.prototype.destroy.call(this)},e.prototype.getDefaultFoundation=function(){var t=this,n={addClass:function(i){return t.root.classList.add(i)},forceLayout:function(){return t.root.offsetWidth},hasNativeControl:function(){return!!t.getNativeControl()},isAttachedToDOM:function(){return!!t.root.parentNode},isChecked:function(){return t.checked},isIndeterminate:function(){return t.indeterminate},removeClass:function(i){t.root.classList.remove(i)},removeNativeControlAttr:function(i){t.getNativeControl().removeAttribute(i)},setNativeControlAttr:function(i,r){t.getNativeControl().setAttribute(i,r)},setNativeControlDisabled:function(i){t.getNativeControl().disabled=i}};return new vn(n)},e.prototype.createRipple=function(){var t=this,n=l.__assign(l.__assign({},D.createAdapter(this)),{deregisterInteractionHandler:function(i,r){t.getNativeControl().removeEventListener(i,r,O())},isSurfaceActive:function(){return it(t.getNativeControl(),":active")},isUnbounded:function(){return!0},registerInteractionHandler:function(i,r){t.getNativeControl().addEventListener(i,r,O())}});return new D(this.root,new pt(n))},e.prototype.installPropertyChangeHooks=function(){var t,n,i=this,r=this.getNativeControl(),o=Object.getPrototypeOf(r),s=function(p){var f=Object.getOwnPropertyDescriptor(o,p);if(!ve(f))return{value:void 0};var v=f.get,S={configurable:f.configurable,enumerable:f.enumerable,get:v,set:function(K){f.set.call(r,K),i.foundation.handleChange()}};Object.defineProperty(r,p,S)};try{for(var u=l.__values(Ie),c=u.next();!c.done;c=u.next()){var h=c.value,E=s(h);if(typeof E=="object")return E.value}}catch(p){t={error:p}}finally{try{c&&!c.done&&(n=u.return)&&n.call(u)}finally{if(t)throw t.error}}},e.prototype.uninstallPropertyChangeHooks=function(){var t,n,i=this.getNativeControl(),r=Object.getPrototypeOf(i);try{for(var o=l.__values(Ie),s=o.next();!s.done;s=o.next()){var u=s.value,c=Object.getOwnPropertyDescriptor(r,u);if(!ve(c))return;Object.defineProperty(i,u,c)}}catch(h){t={error:h}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}},e.prototype.getNativeControl=function(){var t=X.NATIVE_CONTROL_SELECTOR,n=this.root.querySelector(t);if(!n)throw new Error("Checkbox component requires a "+t+" element");return n},e})(T);function ve(a){return!!a&&typeof a.set=="function"}/**
|
|
233
|
+
* @license
|
|
234
|
+
* Copyright 2020 Google Inc.
|
|
235
|
+
*
|
|
236
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
237
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
238
|
+
* in the Software without restriction, including without limitation the rights
|
|
239
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
240
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
241
|
+
* furnished to do so, subject to the following conditions:
|
|
242
|
+
*
|
|
243
|
+
* The above copyright notice and this permission notice shall be included in
|
|
244
|
+
* all copies or substantial portions of the Software.
|
|
245
|
+
*
|
|
246
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
247
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
248
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
249
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
250
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
251
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
252
|
+
* THE SOFTWARE.
|
|
253
|
+
*/var gt;(function(a){a[a.UNSPECIFIED=0]="UNSPECIFIED",a[a.CLICK=1]="CLICK",a[a.BACKSPACE_KEY=2]="BACKSPACE_KEY",a[a.DELETE_KEY=3]="DELETE_KEY",a[a.SPACEBAR_KEY=4]="SPACEBAR_KEY",a[a.ENTER_KEY=5]="ENTER_KEY"})(gt||(gt={}));var st={ARIA_HIDDEN:"aria-hidden",INTERACTION_EVENT:"MDCChipTrailingAction:interaction",NAVIGATION_EVENT:"MDCChipTrailingAction:navigation",TAB_INDEX:"tabindex"};/**
|
|
254
|
+
* @license
|
|
255
|
+
* Copyright 2020 Google Inc.
|
|
256
|
+
*
|
|
257
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
258
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
259
|
+
* in the Software without restriction, including without limitation the rights
|
|
260
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
261
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
262
|
+
* furnished to do so, subject to the following conditions:
|
|
263
|
+
*
|
|
264
|
+
* The above copyright notice and this permission notice shall be included in
|
|
265
|
+
* all copies or substantial portions of the Software.
|
|
266
|
+
*
|
|
267
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
268
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
269
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
270
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
271
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
272
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
273
|
+
* THE SOFTWARE.
|
|
274
|
+
*/var g={UNKNOWN:"Unknown",BACKSPACE:"Backspace",ENTER:"Enter",SPACEBAR:"Spacebar",PAGE_UP:"PageUp",PAGE_DOWN:"PageDown",END:"End",HOME:"Home",ARROW_LEFT:"ArrowLeft",ARROW_UP:"ArrowUp",ARROW_RIGHT:"ArrowRight",ARROW_DOWN:"ArrowDown",DELETE:"Delete",ESCAPE:"Escape",TAB:"Tab"},j=new Set;j.add(g.BACKSPACE);j.add(g.ENTER);j.add(g.SPACEBAR);j.add(g.PAGE_UP);j.add(g.PAGE_DOWN);j.add(g.END);j.add(g.HOME);j.add(g.ARROW_LEFT);j.add(g.ARROW_UP);j.add(g.ARROW_RIGHT);j.add(g.ARROW_DOWN);j.add(g.DELETE);j.add(g.ESCAPE);j.add(g.TAB);var z={BACKSPACE:8,ENTER:13,SPACEBAR:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,ARROW_LEFT:37,ARROW_UP:38,ARROW_RIGHT:39,ARROW_DOWN:40,DELETE:46,ESCAPE:27,TAB:9},q=new Map;q.set(z.BACKSPACE,g.BACKSPACE);q.set(z.ENTER,g.ENTER);q.set(z.SPACEBAR,g.SPACEBAR);q.set(z.PAGE_UP,g.PAGE_UP);q.set(z.PAGE_DOWN,g.PAGE_DOWN);q.set(z.END,g.END);q.set(z.HOME,g.HOME);q.set(z.ARROW_LEFT,g.ARROW_LEFT);q.set(z.ARROW_UP,g.ARROW_UP);q.set(z.ARROW_RIGHT,g.ARROW_RIGHT);q.set(z.ARROW_DOWN,g.ARROW_DOWN);q.set(z.DELETE,g.DELETE);q.set(z.ESCAPE,g.ESCAPE);q.set(z.TAB,g.TAB);var Et=new Set;Et.add(g.PAGE_UP);Et.add(g.PAGE_DOWN);Et.add(g.END);Et.add(g.HOME);Et.add(g.ARROW_LEFT);Et.add(g.ARROW_UP);Et.add(g.ARROW_RIGHT);Et.add(g.ARROW_DOWN);function N(a){var e=a.key;if(j.has(e))return e;var t=q.get(a.keyCode);return t||g.UNKNOWN}function Cn(a){return Et.has(N(a))}/**
|
|
275
|
+
* @license
|
|
276
|
+
* Copyright 2020 Google Inc.
|
|
277
|
+
*
|
|
278
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
279
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
280
|
+
* in the Software without restriction, including without limitation the rights
|
|
281
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
282
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
283
|
+
* furnished to do so, subject to the following conditions:
|
|
284
|
+
*
|
|
285
|
+
* The above copyright notice and this permission notice shall be included in
|
|
286
|
+
* all copies or substantial portions of the Software.
|
|
287
|
+
*
|
|
288
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
289
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
290
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
291
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
292
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
293
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
294
|
+
* THE SOFTWARE.
|
|
295
|
+
*/var Tn=(function(a){l.__extends(e,a);function e(t){return a.call(this,l.__assign(l.__assign({},e.defaultAdapter),t))||this}return Object.defineProperty(e,"strings",{get:function(){return st},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{focus:function(){},getAttribute:function(){return null},setAttribute:function(){},notifyInteraction:function(){},notifyNavigation:function(){}}},enumerable:!1,configurable:!0}),e.prototype.handleClick=function(t){t.stopPropagation(),this.adapter.notifyInteraction(gt.CLICK)},e.prototype.handleKeydown=function(t){t.stopPropagation();var n=N(t);if(this.shouldNotifyInteractionFromKey(n)){var i=this.getTriggerFromKey(n);this.adapter.notifyInteraction(i);return}if(Cn(t)){this.adapter.notifyNavigation(n);return}},e.prototype.removeFocus=function(){this.adapter.setAttribute(st.TAB_INDEX,"-1")},e.prototype.focus=function(){this.adapter.setAttribute(st.TAB_INDEX,"0"),this.adapter.focus()},e.prototype.isNavigable=function(){return this.adapter.getAttribute(st.ARIA_HIDDEN)!=="true"},e.prototype.shouldNotifyInteractionFromKey=function(t){var n=t===g.ENTER||t===g.SPACEBAR,i=t===g.BACKSPACE||t===g.DELETE;return n||i},e.prototype.getTriggerFromKey=function(t){return t===g.SPACEBAR?gt.SPACEBAR_KEY:t===g.ENTER?gt.ENTER_KEY:t===g.DELETE?gt.DELETE_KEY:t===g.BACKSPACE?gt.BACKSPACE_KEY:gt.UNSPECIFIED},e})(C);/**
|
|
296
|
+
* @license
|
|
297
|
+
* Copyright 2020 Google Inc.
|
|
298
|
+
*
|
|
299
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
300
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
301
|
+
* in the Software without restriction, including without limitation the rights
|
|
302
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
303
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
304
|
+
* furnished to do so, subject to the following conditions:
|
|
305
|
+
*
|
|
306
|
+
* The above copyright notice and this permission notice shall be included in
|
|
307
|
+
* all copies or substantial portions of the Software.
|
|
308
|
+
*
|
|
309
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
310
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
311
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
312
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
313
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
314
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
315
|
+
* THE SOFTWARE.
|
|
316
|
+
*/var yn=(function(a){l.__extends(e,a);function e(){return a!==null&&a.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"ripple",{get:function(){return this.rippleSurface},enumerable:!1,configurable:!0}),e.attachTo=function(t){return new e(t)},e.prototype.initialize=function(t){t===void 0&&(t=function(i,r){return new D(i,r)});var n=D.createAdapter(this);this.rippleSurface=t(this.root,new pt(n))},e.prototype.initialSyncWithDOM=function(){var t=this;this.handleClick=function(n){t.foundation.handleClick(n)},this.handleKeydown=function(n){t.foundation.handleKeydown(n)},this.listen("click",this.handleClick),this.listen("keydown",this.handleKeydown)},e.prototype.destroy=function(){this.rippleSurface.destroy(),this.unlisten("click",this.handleClick),this.unlisten("keydown",this.handleKeydown),a.prototype.destroy.call(this)},e.prototype.getDefaultFoundation=function(){var t=this,n={focus:function(){t.root.focus()},getAttribute:function(i){return t.root.getAttribute(i)},notifyInteraction:function(i){return t.emit(st.INTERACTION_EVENT,{trigger:i},!0)},notifyNavigation:function(i){t.emit(st.NAVIGATION_EVENT,{key:i},!0)},setAttribute:function(i,r){t.root.setAttribute(i,r)}};return new Tn(n)},e.prototype.isNavigable=function(){return this.foundation.isNavigable()},e.prototype.focus=function(){this.foundation.focus()},e.prototype.removeFocus=function(){this.foundation.removeFocus()},e})(T);/**
|
|
317
|
+
* @license
|
|
318
|
+
* Copyright 2016 Google Inc.
|
|
319
|
+
*
|
|
320
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
321
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
322
|
+
* in the Software without restriction, including without limitation the rights
|
|
323
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
324
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
325
|
+
* furnished to do so, subject to the following conditions:
|
|
326
|
+
*
|
|
327
|
+
* The above copyright notice and this permission notice shall be included in
|
|
328
|
+
* all copies or substantial portions of the Software.
|
|
329
|
+
*
|
|
330
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
331
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
332
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
333
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
334
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
335
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
336
|
+
* THE SOFTWARE.
|
|
337
|
+
*/var ut;(function(a){a.LEFT="left",a.RIGHT="right"})(ut||(ut={}));var ft;(function(a){a.PRIMARY="primary",a.TRAILING="trailing",a.NONE="none"})(ft||(ft={}));var m={ADDED_ANNOUNCEMENT_ATTRIBUTE:"data-mdc-chip-added-announcement",ARIA_CHECKED:"aria-checked",ARROW_DOWN_KEY:"ArrowDown",ARROW_LEFT_KEY:"ArrowLeft",ARROW_RIGHT_KEY:"ArrowRight",ARROW_UP_KEY:"ArrowUp",BACKSPACE_KEY:"Backspace",CHECKMARK_SELECTOR:".mdc-chip__checkmark",DELETE_KEY:"Delete",END_KEY:"End",ENTER_KEY:"Enter",ENTRY_ANIMATION_NAME:"mdc-chip-entry",HOME_KEY:"Home",IE_ARROW_DOWN_KEY:"Down",IE_ARROW_LEFT_KEY:"Left",IE_ARROW_RIGHT_KEY:"Right",IE_ARROW_UP_KEY:"Up",IE_DELETE_KEY:"Del",INTERACTION_EVENT:"MDCChip:interaction",LEADING_ICON_SELECTOR:".mdc-chip__icon--leading",NAVIGATION_EVENT:"MDCChip:navigation",PRIMARY_ACTION_SELECTOR:".mdc-chip__primary-action",REMOVED_ANNOUNCEMENT_ATTRIBUTE:"data-mdc-chip-removed-announcement",REMOVAL_EVENT:"MDCChip:removal",SELECTION_EVENT:"MDCChip:selection",SPACEBAR_KEY:" ",TAB_INDEX:"tabindex",TRAILING_ACTION_SELECTOR:".mdc-chip-trailing-action",TRAILING_ICON_INTERACTION_EVENT:"MDCChip:trailingIconInteraction",TRAILING_ICON_SELECTOR:".mdc-chip__icon--trailing"},H={CHECKMARK:"mdc-chip__checkmark",CHIP_EXIT:"mdc-chip--exit",DELETABLE:"mdc-chip--deletable",EDITABLE:"mdc-chip--editable",EDITING:"mdc-chip--editing",HIDDEN_LEADING_ICON:"mdc-chip__icon--leading-hidden",LEADING_ICON:"mdc-chip__icon--leading",PRIMARY_ACTION:"mdc-chip__primary-action",PRIMARY_ACTION_FOCUSED:"mdc-chip--primary-action-focused",SELECTED:"mdc-chip--selected",TEXT:"mdc-chip__text",TRAILING_ACTION:"mdc-chip__trailing-action",TRAILING_ICON:"mdc-chip__icon--trailing"},Z=new Set;Z.add(m.ARROW_LEFT_KEY);Z.add(m.ARROW_RIGHT_KEY);Z.add(m.ARROW_DOWN_KEY);Z.add(m.ARROW_UP_KEY);Z.add(m.END_KEY);Z.add(m.HOME_KEY);Z.add(m.IE_ARROW_LEFT_KEY);Z.add(m.IE_ARROW_RIGHT_KEY);Z.add(m.IE_ARROW_DOWN_KEY);Z.add(m.IE_ARROW_UP_KEY);var It=new Set;It.add(m.ARROW_UP_KEY);It.add(m.ARROW_DOWN_KEY);It.add(m.HOME_KEY);It.add(m.END_KEY);It.add(m.IE_ARROW_UP_KEY);It.add(m.IE_ARROW_DOWN_KEY);/**
|
|
338
|
+
* @license
|
|
339
|
+
* Copyright 2016 Google Inc.
|
|
340
|
+
*
|
|
341
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
342
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
343
|
+
* in the Software without restriction, including without limitation the rights
|
|
344
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
345
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
346
|
+
* furnished to do so, subject to the following conditions:
|
|
347
|
+
*
|
|
348
|
+
* The above copyright notice and this permission notice shall be included in
|
|
349
|
+
* all copies or substantial portions of the Software.
|
|
350
|
+
*
|
|
351
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
352
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
353
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
354
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
355
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
356
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
357
|
+
* THE SOFTWARE.
|
|
358
|
+
*/var Ce={bottom:0,height:0,left:0,right:0,top:0,width:0},Dt;(function(a){a[a.SHOULD_FOCUS=0]="SHOULD_FOCUS",a[a.SHOULD_NOT_FOCUS=1]="SHOULD_NOT_FOCUS"})(Dt||(Dt={}));var Xe=(function(a){l.__extends(e,a);function e(t){var n=a.call(this,l.__assign(l.__assign({},e.defaultAdapter),t))||this;return n.shouldRemoveOnTrailingIconClick=!0,n.shouldFocusPrimaryActionOnClick=!0,n}return Object.defineProperty(e,"strings",{get:function(){return m},enumerable:!1,configurable:!0}),Object.defineProperty(e,"cssClasses",{get:function(){return H},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},addClassToLeadingIcon:function(){},eventTargetHasClass:function(){return!1},focusPrimaryAction:function(){},focusTrailingAction:function(){},getAttribute:function(){return null},getCheckmarkBoundingClientRect:function(){return Ce},getComputedStyleValue:function(){return""},getRootBoundingClientRect:function(){return Ce},hasClass:function(){return!1},hasLeadingIcon:function(){return!1},isRTL:function(){return!1},isTrailingActionNavigable:function(){return!1},notifyEditFinish:function(){},notifyEditStart:function(){},notifyInteraction:function(){},notifyNavigation:function(){},notifyRemoval:function(){},notifySelection:function(){},notifyTrailingIconInteraction:function(){},removeClass:function(){},removeClassFromLeadingIcon:function(){},removeTrailingActionFocus:function(){},setPrimaryActionAttr:function(){},setStyleProperty:function(){}}},enumerable:!1,configurable:!0}),e.prototype.isSelected=function(){return this.adapter.hasClass(H.SELECTED)},e.prototype.isEditable=function(){return this.adapter.hasClass(H.EDITABLE)},e.prototype.isEditing=function(){return this.adapter.hasClass(H.EDITING)},e.prototype.setSelected=function(t){this.setSelectedImpl(t),this.notifySelection(t)},e.prototype.setSelectedFromChipSet=function(t,n){this.setSelectedImpl(t),n&&this.notifyIgnoredSelection(t)},e.prototype.getShouldRemoveOnTrailingIconClick=function(){return this.shouldRemoveOnTrailingIconClick},e.prototype.setShouldRemoveOnTrailingIconClick=function(t){this.shouldRemoveOnTrailingIconClick=t},e.prototype.setShouldFocusPrimaryActionOnClick=function(t){this.shouldFocusPrimaryActionOnClick=t},e.prototype.getDimensions=function(){var t=this,n=function(){return t.adapter.getRootBoundingClientRect()},i=function(){return t.adapter.getCheckmarkBoundingClientRect()};if(!this.adapter.hasLeadingIcon()){var r=i();if(r){var o=n();return{bottom:o.bottom,height:o.height,left:o.left,right:o.right,top:o.top,width:o.width+r.height}}}return n()},e.prototype.beginExit=function(){this.adapter.addClass(H.CHIP_EXIT)},e.prototype.handleClick=function(){this.adapter.notifyInteraction(),this.setPrimaryActionFocusable(this.getFocusBehavior())},e.prototype.handleDoubleClick=function(){this.isEditable()&&this.startEditing()},e.prototype.handleTransitionEnd=function(t){var n=this,i=this.adapter.eventTargetHasClass(t.target,H.CHIP_EXIT),r=t.propertyName==="width",o=t.propertyName==="opacity";if(i&&o){var s=this.adapter.getComputedStyleValue("width");requestAnimationFrame(function(){n.adapter.setStyleProperty("width",s),n.adapter.setStyleProperty("padding","0"),n.adapter.setStyleProperty("margin","0"),requestAnimationFrame(function(){n.adapter.setStyleProperty("width","0")})});return}if(i&&r){this.removeFocus();var u=this.adapter.getAttribute(m.REMOVED_ANNOUNCEMENT_ATTRIBUTE);this.adapter.notifyRemoval(u)}if(o){var c=this.adapter.eventTargetHasClass(t.target,H.LEADING_ICON)&&this.adapter.hasClass(H.SELECTED),h=this.adapter.eventTargetHasClass(t.target,H.CHECKMARK)&&!this.adapter.hasClass(H.SELECTED);if(c){this.adapter.addClassToLeadingIcon(H.HIDDEN_LEADING_ICON);return}if(h){this.adapter.removeClassFromLeadingIcon(H.HIDDEN_LEADING_ICON);return}}},e.prototype.handleFocusIn=function(t){this.eventFromPrimaryAction(t)&&this.adapter.addClass(H.PRIMARY_ACTION_FOCUSED)},e.prototype.handleFocusOut=function(t){this.eventFromPrimaryAction(t)&&(this.isEditing()&&this.finishEditing(),this.adapter.removeClass(H.PRIMARY_ACTION_FOCUSED))},e.prototype.handleTrailingActionInteraction=function(){this.adapter.notifyTrailingIconInteraction(),this.removeChip()},e.prototype.handleKeydown=function(t){if(this.isEditing()){this.shouldFinishEditing(t)&&(t.preventDefault(),this.finishEditing());return}if(this.isEditable()&&this.shouldStartEditing(t)&&(t.preventDefault(),this.startEditing()),this.shouldNotifyInteraction(t)){this.adapter.notifyInteraction(),this.setPrimaryActionFocusable(this.getFocusBehavior());return}if(this.isDeleteAction(t)){t.preventDefault(),this.removeChip();return}Z.has(t.key)&&(t.preventDefault(),this.focusNextAction(t.key,ft.PRIMARY))},e.prototype.handleTrailingActionNavigation=function(t){this.focusNextAction(t.detail.key,ft.TRAILING)},e.prototype.removeFocus=function(){this.adapter.setPrimaryActionAttr(m.TAB_INDEX,"-1"),this.adapter.removeTrailingActionFocus()},e.prototype.focusPrimaryAction=function(){this.setPrimaryActionFocusable(Dt.SHOULD_FOCUS)},e.prototype.focusTrailingAction=function(){var t=this.adapter.isTrailingActionNavigable();if(t){this.adapter.setPrimaryActionAttr(m.TAB_INDEX,"-1"),this.adapter.focusTrailingAction();return}this.focusPrimaryAction()},e.prototype.setPrimaryActionFocusable=function(t){this.adapter.setPrimaryActionAttr(m.TAB_INDEX,"0"),t===Dt.SHOULD_FOCUS&&this.adapter.focusPrimaryAction(),this.adapter.removeTrailingActionFocus()},e.prototype.getFocusBehavior=function(){return this.shouldFocusPrimaryActionOnClick?Dt.SHOULD_FOCUS:Dt.SHOULD_NOT_FOCUS},e.prototype.focusNextAction=function(t,n){var i=this.adapter.isTrailingActionNavigable(),r=this.getDirection(t);if(It.has(t)||!i){this.adapter.notifyNavigation(t,n);return}if(n===ft.PRIMARY&&r===ut.RIGHT){this.focusTrailingAction();return}if(n===ft.TRAILING&&r===ut.LEFT){this.focusPrimaryAction();return}this.adapter.notifyNavigation(t,ft.NONE)},e.prototype.getDirection=function(t){var n=this.adapter.isRTL(),i=t===m.ARROW_LEFT_KEY||t===m.IE_ARROW_LEFT_KEY,r=t===m.ARROW_RIGHT_KEY||t===m.IE_ARROW_RIGHT_KEY;return!n&&i||n&&r?ut.LEFT:ut.RIGHT},e.prototype.removeChip=function(){this.shouldRemoveOnTrailingIconClick&&this.beginExit()},e.prototype.shouldStartEditing=function(t){return this.eventFromPrimaryAction(t)&&t.key===m.ENTER_KEY},e.prototype.shouldFinishEditing=function(t){return t.key===m.ENTER_KEY},e.prototype.shouldNotifyInteraction=function(t){return t.key===m.ENTER_KEY||t.key===m.SPACEBAR_KEY},e.prototype.isDeleteAction=function(t){var n=this.adapter.hasClass(H.DELETABLE);return n&&(t.key===m.BACKSPACE_KEY||t.key===m.DELETE_KEY||t.key===m.IE_DELETE_KEY)},e.prototype.setSelectedImpl=function(t){t?(this.adapter.addClass(H.SELECTED),this.adapter.setPrimaryActionAttr(m.ARIA_CHECKED,"true")):(this.adapter.removeClass(H.SELECTED),this.adapter.setPrimaryActionAttr(m.ARIA_CHECKED,"false"))},e.prototype.notifySelection=function(t){this.adapter.notifySelection(t,!1)},e.prototype.notifyIgnoredSelection=function(t){this.adapter.notifySelection(t,!0)},e.prototype.eventFromPrimaryAction=function(t){return this.adapter.eventTargetHasClass(t.target,H.PRIMARY_ACTION)},e.prototype.startEditing=function(){this.adapter.addClass(H.EDITING),this.adapter.notifyEditStart()},e.prototype.finishEditing=function(){this.adapter.removeClass(H.EDITING),this.adapter.notifyEditFinish()},e})(C);/**
|
|
359
|
+
* @license
|
|
360
|
+
* Copyright 2016 Google Inc.
|
|
361
|
+
*
|
|
362
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
363
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
364
|
+
* in the Software without restriction, including without limitation the rights
|
|
365
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
366
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
367
|
+
* furnished to do so, subject to the following conditions:
|
|
368
|
+
*
|
|
369
|
+
* The above copyright notice and this permission notice shall be included in
|
|
370
|
+
* all copies or substantial portions of the Software.
|
|
371
|
+
*
|
|
372
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
373
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
374
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
375
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
376
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
377
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
378
|
+
* THE SOFTWARE.
|
|
379
|
+
*/var Sn=(function(a){l.__extends(e,a);function e(){return a!==null&&a.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"selected",{get:function(){return this.foundation.isSelected()},set:function(t){this.foundation.setSelected(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"shouldRemoveOnTrailingIconClick",{get:function(){return this.foundation.getShouldRemoveOnTrailingIconClick()},set:function(t){this.foundation.setShouldRemoveOnTrailingIconClick(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"setShouldFocusPrimaryActionOnClick",{set:function(t){this.foundation.setShouldFocusPrimaryActionOnClick(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ripple",{get:function(){return this.rippleSurface},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"id",{get:function(){return this.root.id},enumerable:!1,configurable:!0}),e.attachTo=function(t){return new e(t)},e.prototype.initialize=function(t,n){var i=this;t===void 0&&(t=function(s,u){return new D(s,u)}),n===void 0&&(n=function(s){return new yn(s)}),this.leadingIcon=this.root.querySelector(m.LEADING_ICON_SELECTOR),this.checkmark=this.root.querySelector(m.CHECKMARK_SELECTOR),this.primaryAction=this.root.querySelector(m.PRIMARY_ACTION_SELECTOR);var r=this.root.querySelector(m.TRAILING_ACTION_SELECTOR);r&&(this.trailingAction=n(r));var o=l.__assign(l.__assign({},D.createAdapter(this)),{computeBoundingRect:function(){return i.foundation.getDimensions()}});this.rippleSurface=t(this.root,new pt(o))},e.prototype.initialSyncWithDOM=function(){var t=this;this.handleTrailingActionInteraction=function(){t.foundation.handleTrailingActionInteraction()},this.handleTrailingActionNavigation=function(n){t.foundation.handleTrailingActionNavigation(n)},this.handleClick=function(){t.foundation.handleClick()},this.handleKeydown=function(n){t.foundation.handleKeydown(n)},this.handleTransitionEnd=function(n){t.foundation.handleTransitionEnd(n)},this.handleFocusIn=function(n){t.foundation.handleFocusIn(n)},this.handleFocusOut=function(n){t.foundation.handleFocusOut(n)},this.listen("transitionend",this.handleTransitionEnd),this.listen("click",this.handleClick),this.listen("keydown",this.handleKeydown),this.listen("focusin",this.handleFocusIn),this.listen("focusout",this.handleFocusOut),this.trailingAction&&(this.listen(st.INTERACTION_EVENT,this.handleTrailingActionInteraction),this.listen(st.NAVIGATION_EVENT,this.handleTrailingActionNavigation))},e.prototype.destroy=function(){this.rippleSurface.destroy(),this.unlisten("transitionend",this.handleTransitionEnd),this.unlisten("keydown",this.handleKeydown),this.unlisten("click",this.handleClick),this.unlisten("focusin",this.handleFocusIn),this.unlisten("focusout",this.handleFocusOut),this.trailingAction&&(this.unlisten(st.INTERACTION_EVENT,this.handleTrailingActionInteraction),this.unlisten(st.NAVIGATION_EVENT,this.handleTrailingActionNavigation)),a.prototype.destroy.call(this)},e.prototype.beginExit=function(){this.foundation.beginExit()},e.prototype.getDefaultFoundation=function(){var t=this,n={addClass:function(i){return t.root.classList.add(i)},addClassToLeadingIcon:function(i){t.leadingIcon&&t.leadingIcon.classList.add(i)},eventTargetHasClass:function(i,r){return i?i.classList.contains(r):!1},focusPrimaryAction:function(){t.primaryAction&&t.primaryAction.focus()},focusTrailingAction:function(){t.trailingAction&&t.trailingAction.focus()},getAttribute:function(i){return t.root.getAttribute(i)},getCheckmarkBoundingClientRect:function(){return t.checkmark?t.checkmark.getBoundingClientRect():null},getComputedStyleValue:function(i){return window.getComputedStyle(t.root).getPropertyValue(i)},getRootBoundingClientRect:function(){return t.root.getBoundingClientRect()},hasClass:function(i){return t.root.classList.contains(i)},hasLeadingIcon:function(){return!!t.leadingIcon},isRTL:function(){return window.getComputedStyle(t.root).getPropertyValue("direction")==="rtl"},isTrailingActionNavigable:function(){return t.trailingAction?t.trailingAction.isNavigable():!1},notifyInteraction:function(){return t.emit(m.INTERACTION_EVENT,{chipId:t.id},!0)},notifyNavigation:function(i,r){return t.emit(m.NAVIGATION_EVENT,{chipId:t.id,key:i,source:r},!0)},notifyRemoval:function(i){t.emit(m.REMOVAL_EVENT,{chipId:t.id,removedAnnouncement:i},!0)},notifySelection:function(i,r){return t.emit(m.SELECTION_EVENT,{chipId:t.id,selected:i,shouldIgnore:r},!0)},notifyTrailingIconInteraction:function(){return t.emit(m.TRAILING_ICON_INTERACTION_EVENT,{chipId:t.id},!0)},notifyEditStart:function(){},notifyEditFinish:function(){},removeClass:function(i){return t.root.classList.remove(i)},removeClassFromLeadingIcon:function(i){t.leadingIcon&&t.leadingIcon.classList.remove(i)},removeTrailingActionFocus:function(){t.trailingAction&&t.trailingAction.removeFocus()},setPrimaryActionAttr:function(i,r){t.primaryAction&&t.primaryAction.setAttribute(i,r)},setStyleProperty:function(i,r){return t.root.style.setProperty(i,r)}};return new Xe(n)},e.prototype.setSelectedFromChipSet=function(t,n){this.foundation.setSelectedFromChipSet(t,n)},e.prototype.focusPrimaryAction=function(){this.foundation.focusPrimaryAction()},e.prototype.focusTrailingAction=function(){this.foundation.focusTrailingAction()},e.prototype.removeFocus=function(){this.foundation.removeFocus()},e.prototype.remove=function(){var t=this.root.parentNode;t!==null&&t.removeChild(this.root)},e})(T);/**
|
|
380
|
+
* @license
|
|
381
|
+
* Copyright 2020 Google Inc.
|
|
382
|
+
*
|
|
383
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
384
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
385
|
+
* in the Software without restriction, including without limitation the rights
|
|
386
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
387
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
388
|
+
* furnished to do so, subject to the following conditions:
|
|
389
|
+
*
|
|
390
|
+
* The above copyright notice and this permission notice shall be included in
|
|
391
|
+
* all copies or substantial portions of the Software.
|
|
392
|
+
*
|
|
393
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
394
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
395
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
396
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
397
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
398
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
399
|
+
* THE SOFTWARE.
|
|
400
|
+
*/var oe;(function(a){a.POLITE="polite",a.ASSERTIVE="assertive"})(oe||(oe={}));var _n="data-mdc-dom-announce";function bn(a,e){Rn.getInstance().say(a,e)}var Rn=(function(){function a(){this.liveRegions=new Map}return a.getInstance=function(){return a.instance||(a.instance=new a),a.instance},a.prototype.say=function(e,t){var n,i,r=(n=t?.priority)!==null&&n!==void 0?n:oe.POLITE,o=(i=t?.ownerDocument)!==null&&i!==void 0?i:document,s=this.getLiveRegion(r,o);s.textContent="",setTimeout(function(){s.textContent=e,o.addEventListener("click",u)},1);function u(){s.textContent="",o.removeEventListener("click",u)}},a.prototype.getLiveRegion=function(e,t){var n=this.liveRegions.get(t);n||(n=new Map,this.liveRegions.set(t,n));var i=n.get(e);if(i&&t.body.contains(i))return i;var r=this.createLiveRegion(e,t);return n.set(e,r),r},a.prototype.createLiveRegion=function(e,t){var n=t.createElement("div");return n.style.position="absolute",n.style.top="-9999px",n.style.left="-9999px",n.style.height="1px",n.style.overflow="hidden",n.setAttribute("aria-atomic","true"),n.setAttribute("aria-live",e),n.setAttribute(_n,"true"),t.body.appendChild(n),n},a})();/**
|
|
401
|
+
* @license
|
|
402
|
+
* Copyright 2016 Google Inc.
|
|
403
|
+
*
|
|
404
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
405
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
406
|
+
* in the Software without restriction, including without limitation the rights
|
|
407
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
408
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
409
|
+
* furnished to do so, subject to the following conditions:
|
|
410
|
+
*
|
|
411
|
+
* The above copyright notice and this permission notice shall be included in
|
|
412
|
+
* all copies or substantial portions of the Software.
|
|
413
|
+
*
|
|
414
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
415
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
416
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
417
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
418
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
419
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
420
|
+
* THE SOFTWARE.
|
|
421
|
+
*/var Ln={CHIP_SELECTOR:".mdc-chip"},Gt={CHOICE:"mdc-chip-set--choice",FILTER:"mdc-chip-set--filter"};/**
|
|
422
|
+
* @license
|
|
423
|
+
* Copyright 2017 Google Inc.
|
|
424
|
+
*
|
|
425
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
426
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
427
|
+
* in the Software without restriction, including without limitation the rights
|
|
428
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
429
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
430
|
+
* furnished to do so, subject to the following conditions:
|
|
431
|
+
*
|
|
432
|
+
* The above copyright notice and this permission notice shall be included in
|
|
433
|
+
* all copies or substantial portions of the Software.
|
|
434
|
+
*
|
|
435
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
436
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
437
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
438
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
439
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
440
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
441
|
+
* THE SOFTWARE.
|
|
442
|
+
*/var ze=(function(a){l.__extends(e,a);function e(t){var n=a.call(this,l.__assign(l.__assign({},e.defaultAdapter),t))||this;return n.selectedChipIds=[],n}return Object.defineProperty(e,"strings",{get:function(){return Ln},enumerable:!1,configurable:!0}),Object.defineProperty(e,"cssClasses",{get:function(){return Gt},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{announceMessage:function(){},focusChipPrimaryActionAtIndex:function(){},focusChipTrailingActionAtIndex:function(){},getChipListCount:function(){return-1},getIndexOfChipById:function(){return-1},hasClass:function(){return!1},isRTL:function(){return!1},removeChipAtIndex:function(){},removeFocusFromChipAtIndex:function(){},selectChipAtIndex:function(){}}},enumerable:!1,configurable:!0}),e.prototype.getSelectedChipIds=function(){return this.selectedChipIds.slice()},e.prototype.select=function(t){this.selectImpl(t,!1)},e.prototype.handleChipInteraction=function(t){var n=t.chipId,i=this.adapter.getIndexOfChipById(n);this.removeFocusFromChipsExcept(i),(this.adapter.hasClass(Gt.CHOICE)||this.adapter.hasClass(Gt.FILTER))&&this.toggleSelect(n)},e.prototype.handleChipSelection=function(t){var n=t.chipId,i=t.selected,r=t.shouldIgnore;if(!r){var o=this.selectedChipIds.indexOf(n)>=0;i&&!o?this.select(n):!i&&o&&this.deselectImpl(n)}},e.prototype.handleChipRemoval=function(t){var n=t.chipId,i=t.removedAnnouncement;i&&this.adapter.announceMessage(i);var r=this.adapter.getIndexOfChipById(n);this.deselectAndNotifyClients(n),this.adapter.removeChipAtIndex(r);var o=this.adapter.getChipListCount()-1;if(!(o<0)){var s=Math.min(r,o);this.removeFocusFromChipsExcept(s),this.adapter.focusChipTrailingActionAtIndex(s)}},e.prototype.handleChipNavigation=function(t){var n=t.chipId,i=t.key,r=t.source,o=this.adapter.getChipListCount()-1,s=this.adapter.getIndexOfChipById(n);if(!(s===-1||!Z.has(i))){var u=this.adapter.isRTL(),c=i===m.ARROW_LEFT_KEY||i===m.IE_ARROW_LEFT_KEY,h=i===m.ARROW_RIGHT_KEY||i===m.IE_ARROW_RIGHT_KEY,E=i===m.ARROW_DOWN_KEY||i===m.IE_ARROW_DOWN_KEY,p=!u&&h||u&&c||E,f=i===m.HOME_KEY,v=i===m.END_KEY;p?s++:f?s=0:v?s=o:s--,!(s<0||s>o)&&(this.removeFocusFromChipsExcept(s),this.focusChipAction(s,i,r))}},e.prototype.focusChipAction=function(t,n,i){var r=It.has(n);if(r&&i===ft.PRIMARY)return this.adapter.focusChipPrimaryActionAtIndex(t);if(r&&i===ft.TRAILING)return this.adapter.focusChipTrailingActionAtIndex(t);var o=this.getDirection(n);if(o===ut.LEFT)return this.adapter.focusChipTrailingActionAtIndex(t);if(o===ut.RIGHT)return this.adapter.focusChipPrimaryActionAtIndex(t)},e.prototype.getDirection=function(t){var n=this.adapter.isRTL(),i=t===m.ARROW_LEFT_KEY||t===m.IE_ARROW_LEFT_KEY,r=t===m.ARROW_RIGHT_KEY||t===m.IE_ARROW_RIGHT_KEY;return!n&&i||n&&r?ut.LEFT:ut.RIGHT},e.prototype.deselectImpl=function(t,n){n===void 0&&(n=!1);var i=this.selectedChipIds.indexOf(t);if(i>=0){this.selectedChipIds.splice(i,1);var r=this.adapter.getIndexOfChipById(t);this.adapter.selectChipAtIndex(r,!1,n)}},e.prototype.deselectAndNotifyClients=function(t){this.deselectImpl(t,!0)},e.prototype.toggleSelect=function(t){this.selectedChipIds.indexOf(t)>=0?this.deselectAndNotifyClients(t):this.selectAndNotifyClients(t)},e.prototype.removeFocusFromChipsExcept=function(t){for(var n=this.adapter.getChipListCount(),i=0;i<n;i++)i!==t&&this.adapter.removeFocusFromChipAtIndex(i)},e.prototype.selectAndNotifyClients=function(t){this.selectImpl(t,!0)},e.prototype.selectImpl=function(t,n){if(!(this.selectedChipIds.indexOf(t)>=0)){if(this.adapter.hasClass(Gt.CHOICE)&&this.selectedChipIds.length>0){var i=this.selectedChipIds[0],r=this.adapter.getIndexOfChipById(i);this.selectedChipIds=[],this.adapter.selectChipAtIndex(r,!1,n)}this.selectedChipIds.push(t);var o=this.adapter.getIndexOfChipById(t);this.adapter.selectChipAtIndex(o,!0,n)}},e})(C);/**
|
|
443
|
+
* @license
|
|
444
|
+
* Copyright 2016 Google Inc.
|
|
445
|
+
*
|
|
446
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
447
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
448
|
+
* in the Software without restriction, including without limitation the rights
|
|
449
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
450
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
451
|
+
* furnished to do so, subject to the following conditions:
|
|
452
|
+
*
|
|
453
|
+
* The above copyright notice and this permission notice shall be included in
|
|
454
|
+
* all copies or substantial portions of the Software.
|
|
455
|
+
*
|
|
456
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
457
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
458
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
459
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
460
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
461
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
462
|
+
* THE SOFTWARE.
|
|
463
|
+
*/var Qt=Xe.strings,Te=Qt.INTERACTION_EVENT,ye=Qt.SELECTION_EVENT,Se=Qt.REMOVAL_EVENT,_e=Qt.NAVIGATION_EVENT,On=ze.strings.CHIP_SELECTOR,be=0,Dn=(function(a){l.__extends(e,a);function e(){return a!==null&&a.apply(this,arguments)||this}return e.attachTo=function(t){return new e(t)},Object.defineProperty(e.prototype,"chips",{get:function(){return this.chipsList.slice()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"selectedChipIds",{get:function(){return this.foundation.getSelectedChipIds()},enumerable:!1,configurable:!0}),e.prototype.initialize=function(t){t===void 0&&(t=function(n){return new Sn(n)}),this.chipFactory=t,this.chipsList=this.instantiateChips(this.chipFactory)},e.prototype.initialSyncWithDOM=function(){var t,n,i=this;try{for(var r=l.__values(this.chipsList),o=r.next();!o.done;o=r.next()){var s=o.value;s.id&&s.selected&&this.foundation.select(s.id)}}catch(u){t={error:u}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}this.handleChipInteraction=function(u){return i.foundation.handleChipInteraction(u.detail)},this.handleChipSelection=function(u){return i.foundation.handleChipSelection(u.detail)},this.handleChipRemoval=function(u){return i.foundation.handleChipRemoval(u.detail)},this.handleChipNavigation=function(u){return i.foundation.handleChipNavigation(u.detail)},this.listen(Te,this.handleChipInteraction),this.listen(ye,this.handleChipSelection),this.listen(Se,this.handleChipRemoval),this.listen(_e,this.handleChipNavigation)},e.prototype.destroy=function(){var t,n;try{for(var i=l.__values(this.chipsList),r=i.next();!r.done;r=i.next()){var o=r.value;o.destroy()}}catch(s){t={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}this.unlisten(Te,this.handleChipInteraction),this.unlisten(ye,this.handleChipSelection),this.unlisten(Se,this.handleChipRemoval),this.unlisten(_e,this.handleChipNavigation),a.prototype.destroy.call(this)},e.prototype.addChip=function(t){t.id=t.id||"mdc-chip-"+ ++be,this.chipsList.push(this.chipFactory(t))},e.prototype.getDefaultFoundation=function(){var t=this,n={announceMessage:function(i){bn(i)},focusChipPrimaryActionAtIndex:function(i){t.chipsList[i].focusPrimaryAction()},focusChipTrailingActionAtIndex:function(i){t.chipsList[i].focusTrailingAction()},getChipListCount:function(){return t.chips.length},getIndexOfChipById:function(i){return t.findChipIndex(i)},hasClass:function(i){return t.root.classList.contains(i)},isRTL:function(){return window.getComputedStyle(t.root).getPropertyValue("direction")==="rtl"},removeChipAtIndex:function(i){i>=0&&i<t.chips.length&&(t.chipsList[i].destroy(),t.chipsList[i].remove(),t.chipsList.splice(i,1))},removeFocusFromChipAtIndex:function(i){t.chipsList[i].removeFocus()},selectChipAtIndex:function(i,r,o){i>=0&&i<t.chips.length&&t.chipsList[i].setSelectedFromChipSet(r,o)}};return new ze(n)},e.prototype.instantiateChips=function(t){var n=[].slice.call(this.root.querySelectorAll(On));return n.map(function(i){return i.id=i.id||"mdc-chip-"+ ++be,t(i)})},e.prototype.findChipIndex=function(t){for(var n=0;n<this.chips.length;n++)if(this.chipsList[n].id===t)return n;return-1},e})(T);/**
|
|
464
|
+
* @license
|
|
465
|
+
* Copyright 2017 Google Inc.
|
|
466
|
+
*
|
|
467
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
468
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
469
|
+
* in the Software without restriction, including without limitation the rights
|
|
470
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
471
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
472
|
+
* furnished to do so, subject to the following conditions:
|
|
473
|
+
*
|
|
474
|
+
* The above copyright notice and this permission notice shall be included in
|
|
475
|
+
* all copies or substantial portions of the Software.
|
|
476
|
+
*
|
|
477
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
478
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
479
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
480
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
481
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
482
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
483
|
+
* THE SOFTWARE.
|
|
484
|
+
*/var Y={CLOSED_CLASS:"mdc-linear-progress--closed",CLOSED_ANIMATION_OFF_CLASS:"mdc-linear-progress--closed-animation-off",INDETERMINATE_CLASS:"mdc-linear-progress--indeterminate",REVERSED_CLASS:"mdc-linear-progress--reversed",ANIMATION_READY_CLASS:"mdc-linear-progress--animation-ready"},J={ARIA_HIDDEN:"aria-hidden",ARIA_VALUEMAX:"aria-valuemax",ARIA_VALUEMIN:"aria-valuemin",ARIA_VALUENOW:"aria-valuenow",BUFFER_BAR_SELECTOR:".mdc-linear-progress__buffer-bar",FLEX_BASIS:"flex-basis",PRIMARY_BAR_SELECTOR:".mdc-linear-progress__primary-bar"},Ft={PRIMARY_HALF:.8367142,PRIMARY_FULL:2.00611057,SECONDARY_QUARTER:.37651913,SECONDARY_HALF:.84386165,SECONDARY_FULL:1.60277782};/**
|
|
485
|
+
* @license
|
|
486
|
+
* Copyright 2017 Google Inc.
|
|
487
|
+
*
|
|
488
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
489
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
490
|
+
* in the Software without restriction, including without limitation the rights
|
|
491
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
492
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
493
|
+
* furnished to do so, subject to the following conditions:
|
|
494
|
+
*
|
|
495
|
+
* The above copyright notice and this permission notice shall be included in
|
|
496
|
+
* all copies or substantial portions of the Software.
|
|
497
|
+
*
|
|
498
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
499
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
500
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
501
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
502
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
503
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
504
|
+
* THE SOFTWARE.
|
|
505
|
+
*/var te=(function(a){l.__extends(e,a);function e(t){var n=a.call(this,l.__assign(l.__assign({},e.defaultAdapter),t))||this;return n.observer=null,n}return Object.defineProperty(e,"cssClasses",{get:function(){return Y},enumerable:!1,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return J},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},attachResizeObserver:function(){return null},forceLayout:function(){},getWidth:function(){return 0},hasClass:function(){return!1},setBufferBarStyle:function(){return null},setPrimaryBarStyle:function(){return null},setStyle:function(){},removeAttribute:function(){},removeClass:function(){},setAttribute:function(){}}},enumerable:!1,configurable:!0}),e.prototype.init=function(){var t=this;this.determinate=!this.adapter.hasClass(Y.INDETERMINATE_CLASS),this.adapter.addClass(Y.ANIMATION_READY_CLASS),this.progress=0,this.buffer=1,this.observer=this.adapter.attachResizeObserver(function(n){var i,r;if(!t.determinate)try{for(var o=l.__values(n),s=o.next();!s.done;s=o.next()){var u=s.value;u.contentRect&&t.calculateAndSetDimensions(u.contentRect.width)}}catch(c){i={error:c}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}}),!this.determinate&&this.observer&&this.calculateAndSetDimensions(this.adapter.getWidth())},e.prototype.setDeterminate=function(t){if(this.determinate=t,this.determinate){this.adapter.removeClass(Y.INDETERMINATE_CLASS),this.adapter.setAttribute(J.ARIA_VALUENOW,this.progress.toString()),this.adapter.setAttribute(J.ARIA_VALUEMAX,"1"),this.adapter.setAttribute(J.ARIA_VALUEMIN,"0"),this.setPrimaryBarProgress(this.progress),this.setBufferBarProgress(this.buffer);return}this.observer&&this.calculateAndSetDimensions(this.adapter.getWidth()),this.adapter.addClass(Y.INDETERMINATE_CLASS),this.adapter.removeAttribute(J.ARIA_VALUENOW),this.adapter.removeAttribute(J.ARIA_VALUEMAX),this.adapter.removeAttribute(J.ARIA_VALUEMIN),this.setPrimaryBarProgress(1),this.setBufferBarProgress(1)},e.prototype.isDeterminate=function(){return this.determinate},e.prototype.setProgress=function(t){this.progress=t,this.determinate&&(this.setPrimaryBarProgress(t),this.adapter.setAttribute(J.ARIA_VALUENOW,t.toString()))},e.prototype.getProgress=function(){return this.progress},e.prototype.setBuffer=function(t){this.buffer=t,this.determinate&&this.setBufferBarProgress(t)},e.prototype.getBuffer=function(){return this.buffer},e.prototype.open=function(){this.adapter.removeClass(Y.CLOSED_CLASS),this.adapter.removeClass(Y.CLOSED_ANIMATION_OFF_CLASS),this.adapter.removeAttribute(J.ARIA_HIDDEN)},e.prototype.close=function(){this.adapter.addClass(Y.CLOSED_CLASS),this.adapter.setAttribute(J.ARIA_HIDDEN,"true")},e.prototype.isClosed=function(){return this.adapter.hasClass(Y.CLOSED_CLASS)},e.prototype.handleTransitionEnd=function(){this.adapter.hasClass(Y.CLOSED_CLASS)&&this.adapter.addClass(Y.CLOSED_ANIMATION_OFF_CLASS)},e.prototype.destroy=function(){a.prototype.destroy.call(this),this.observer&&this.observer.disconnect()},e.prototype.restartAnimation=function(){this.adapter.removeClass(Y.ANIMATION_READY_CLASS),this.adapter.forceLayout(),this.adapter.addClass(Y.ANIMATION_READY_CLASS)},e.prototype.setPrimaryBarProgress=function(t){var n="scaleX("+t+")",i=typeof window<"u"?Yt(window,"transform"):"transform";this.adapter.setPrimaryBarStyle(i,n)},e.prototype.setBufferBarProgress=function(t){var n=t*100+"%";this.adapter.setBufferBarStyle(J.FLEX_BASIS,n)},e.prototype.calculateAndSetDimensions=function(t){var n=t*Ft.PRIMARY_HALF,i=t*Ft.PRIMARY_FULL,r=t*Ft.SECONDARY_QUARTER,o=t*Ft.SECONDARY_HALF,s=t*Ft.SECONDARY_FULL;this.adapter.setStyle("--mdc-linear-progress-primary-half",n+"px"),this.adapter.setStyle("--mdc-linear-progress-primary-half-neg",-n+"px"),this.adapter.setStyle("--mdc-linear-progress-primary-full",i+"px"),this.adapter.setStyle("--mdc-linear-progress-primary-full-neg",-i+"px"),this.adapter.setStyle("--mdc-linear-progress-secondary-quarter",r+"px"),this.adapter.setStyle("--mdc-linear-progress-secondary-quarter-neg",-r+"px"),this.adapter.setStyle("--mdc-linear-progress-secondary-half",o+"px"),this.adapter.setStyle("--mdc-linear-progress-secondary-half-neg",-o+"px"),this.adapter.setStyle("--mdc-linear-progress-secondary-full",s+"px"),this.adapter.setStyle("--mdc-linear-progress-secondary-full-neg",-s+"px"),this.restartAnimation()},e})(C);/**
|
|
506
|
+
* @license
|
|
507
|
+
* Copyright 2017 Google Inc.
|
|
508
|
+
*
|
|
509
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
510
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
511
|
+
* in the Software without restriction, including without limitation the rights
|
|
512
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
513
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
514
|
+
* furnished to do so, subject to the following conditions:
|
|
515
|
+
*
|
|
516
|
+
* The above copyright notice and this permission notice shall be included in
|
|
517
|
+
* all copies or substantial portions of the Software.
|
|
518
|
+
*
|
|
519
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
520
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
521
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
522
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
523
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
524
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
525
|
+
* THE SOFTWARE.
|
|
526
|
+
*/var Ye=(function(a){l.__extends(e,a);function e(){return a!==null&&a.apply(this,arguments)||this}return e.attachTo=function(t){return new e(t)},Object.defineProperty(e.prototype,"determinate",{set:function(t){this.foundation.setDeterminate(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"progress",{set:function(t){this.foundation.setProgress(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"buffer",{set:function(t){this.foundation.setBuffer(t)},enumerable:!1,configurable:!0}),e.prototype.open=function(){this.foundation.open()},e.prototype.close=function(){this.foundation.close()},e.prototype.initialSyncWithDOM=function(){var t=this;this.root.addEventListener("transitionend",function(){t.foundation.handleTransitionEnd()})},e.prototype.getDefaultFoundation=function(){var t=this,n={addClass:function(i){t.root.classList.add(i)},forceLayout:function(){t.root.getBoundingClientRect()},setBufferBarStyle:function(i,r){var o=t.root.querySelector(te.strings.BUFFER_BAR_SELECTOR);o&&o.style.setProperty(i,r)},setPrimaryBarStyle:function(i,r){var o=t.root.querySelector(te.strings.PRIMARY_BAR_SELECTOR);o&&o.style.setProperty(i,r)},hasClass:function(i){return t.root.classList.contains(i)},removeAttribute:function(i){t.root.removeAttribute(i)},removeClass:function(i){t.root.classList.remove(i)},setAttribute:function(i,r){t.root.setAttribute(i,r)},setStyle:function(i,r){t.root.style.setProperty(i,r)},attachResizeObserver:function(i){var r=window.ResizeObserver;if(r){var o=new r(i);return o.observe(t.root),o}return null},getWidth:function(){return t.root.offsetWidth}};return new te(n)},e})(T);/**
|
|
527
|
+
* @license
|
|
528
|
+
* Copyright 2019 Google Inc.
|
|
529
|
+
*
|
|
530
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
531
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
532
|
+
* in the Software without restriction, including without limitation the rights
|
|
533
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
534
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
535
|
+
* furnished to do so, subject to the following conditions:
|
|
536
|
+
*
|
|
537
|
+
* The above copyright notice and this permission notice shall be included in
|
|
538
|
+
* all copies or substantial portions of the Software.
|
|
539
|
+
*
|
|
540
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
541
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
542
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
543
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
544
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
545
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
546
|
+
* THE SOFTWARE.
|
|
547
|
+
*/var x={CONTENT:"mdc-data-table__content",HEADER_CELL:"mdc-data-table__header-cell",HEADER_CELL_SORTED:"mdc-data-table__header-cell--sorted",HEADER_CELL_SORTED_DESCENDING:"mdc-data-table__header-cell--sorted-descending",HEADER_CELL_WITH_SORT:"mdc-data-table__header-cell--with-sort",HEADER_ROW:"mdc-data-table__header-row",HEADER_ROW_CHECKBOX:"mdc-data-table__header-row-checkbox",IN_PROGRESS:"mdc-data-table--in-progress",LINEAR_PROGRESS:"mdc-data-table__linear-progress",PROGRESS_INDICATOR:"mdc-data-table__progress-indicator",ROW:"mdc-data-table__row",ROW_CHECKBOX:"mdc-data-table__row-checkbox",ROW_SELECTED:"mdc-data-table__row--selected",SORT_STATUS_LABEL:"mdc-data-table__sort-status-label",TABLE_CONTAINER:"mdc-data-table__table-container"},Re={ARIA_SELECTED:"aria-selected",ARIA_SORT:"aria-sort"},jt={COLUMN_ID:"data-column-id",ROW_ID:"data-row-id"},$={HEADER_CELL:"."+x.HEADER_CELL,HEADER_CELL_WITH_SORT:"."+x.HEADER_CELL_WITH_SORT,HEADER_ROW:"."+x.HEADER_ROW,HEADER_ROW_CHECKBOX:"."+x.HEADER_ROW_CHECKBOX,PROGRESS_INDICATOR:"."+x.PROGRESS_INDICATOR,ROW:"."+x.ROW,ROW_CHECKBOX:"."+x.ROW_CHECKBOX,ROW_SELECTED:"."+x.ROW_SELECTED,SORT_STATUS_LABEL:"."+x.SORT_STATUS_LABEL},Le={SORTED_IN_DESCENDING:"Sorted in descending order",SORTED_IN_ASCENDING:"Sorted in ascending order"},vt={ARIA_SELECTED:Re.ARIA_SELECTED,ARIA_SORT:Re.ARIA_SORT},G;(function(a){a.ASCENDING="ascending",a.DESCENDING="descending",a.NONE="none",a.OTHER="other"})(G||(G={}));var kt={ROW_CLICK:"MDCDataTable:rowClick",ROW_SELECTION_CHANGED:"MDCDataTable:rowSelectionChanged",SELECTED_ALL:"MDCDataTable:selectedAll",SORTED:"MDCDataTable:sorted",UNSELECTED_ALL:"MDCDataTable:unselectedAll"};/**
|
|
548
|
+
* @license
|
|
549
|
+
* Copyright 2019 Google Inc.
|
|
550
|
+
*
|
|
551
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
552
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
553
|
+
* in the Software without restriction, including without limitation the rights
|
|
554
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
555
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
556
|
+
* furnished to do so, subject to the following conditions:
|
|
557
|
+
*
|
|
558
|
+
* The above copyright notice and this permission notice shall be included in
|
|
559
|
+
* all copies or substantial portions of the Software.
|
|
560
|
+
*
|
|
561
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
562
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
563
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
564
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
565
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
566
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
567
|
+
* THE SOFTWARE.
|
|
568
|
+
*/var xn=(function(a){l.__extends(e,a);function e(t){return a.call(this,l.__assign(l.__assign({},e.defaultAdapter),t))||this}return Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},addClassAtRowIndex:function(){},getAttributeByHeaderCellIndex:function(){return""},getHeaderCellCount:function(){return 0},getHeaderCellElements:function(){return[]},getRowCount:function(){return 0},getRowElements:function(){return[]},getRowIdAtIndex:function(){return""},getRowIndexByChildElement:function(){return 0},getSelectedRowCount:function(){return 0},getTableContainerHeight:function(){return 0},getTableHeaderHeight:function(){return 0},isCheckboxAtRowIndexChecked:function(){return!1},isHeaderRowCheckboxChecked:function(){return!1},isRowsSelectable:function(){return!1},notifyRowSelectionChanged:function(){},notifySelectedAll:function(){},notifySortAction:function(){},notifyUnselectedAll:function(){},notifyRowClick:function(){},registerHeaderRowCheckbox:function(){},registerRowCheckboxes:function(){},removeClass:function(){},removeClassAtRowIndex:function(){},removeClassNameByHeaderCellIndex:function(){},setAttributeAtRowIndex:function(){},setAttributeByHeaderCellIndex:function(){},setClassNameByHeaderCellIndex:function(){},setHeaderRowCheckboxChecked:function(){},setHeaderRowCheckboxIndeterminate:function(){},setProgressIndicatorStyles:function(){},setRowCheckboxCheckedAtIndex:function(){},setSortStatusLabelByHeaderCellIndex:function(){}}},enumerable:!1,configurable:!0}),e.prototype.layout=function(){this.adapter.isRowsSelectable()&&(this.adapter.registerHeaderRowCheckbox(),this.adapter.registerRowCheckboxes(),this.setHeaderRowCheckboxState())},e.prototype.layoutAsync=function(){return l.__awaiter(this,void 0,void 0,function(){return l.__generator(this,function(t){switch(t.label){case 0:return this.adapter.isRowsSelectable()?[4,this.adapter.registerHeaderRowCheckbox()]:[3,3];case 1:return t.sent(),[4,this.adapter.registerRowCheckboxes()];case 2:t.sent(),this.setHeaderRowCheckboxState(),t.label=3;case 3:return[2]}})})},e.prototype.getRows=function(){return this.adapter.getRowElements()},e.prototype.getHeaderCells=function(){return this.adapter.getHeaderCellElements()},e.prototype.setSelectedRowIds=function(t){for(var n=0;n<this.adapter.getRowCount();n++){var i=this.adapter.getRowIdAtIndex(n),r=!1;i&&t.indexOf(i)>=0&&(r=!0),this.adapter.setRowCheckboxCheckedAtIndex(n,r),this.selectRowAtIndex(n,r)}this.setHeaderRowCheckboxState()},e.prototype.getRowIds=function(){for(var t=[],n=0;n<this.adapter.getRowCount();n++)t.push(this.adapter.getRowIdAtIndex(n));return t},e.prototype.getSelectedRowIds=function(){for(var t=[],n=0;n<this.adapter.getRowCount();n++)this.adapter.isCheckboxAtRowIndexChecked(n)&&t.push(this.adapter.getRowIdAtIndex(n));return t},e.prototype.handleHeaderRowCheckboxChange=function(){for(var t=this.adapter.isHeaderRowCheckboxChecked(),n=0;n<this.adapter.getRowCount();n++)this.adapter.setRowCheckboxCheckedAtIndex(n,t),this.selectRowAtIndex(n,t);t?this.adapter.notifySelectedAll():this.adapter.notifyUnselectedAll()},e.prototype.handleRowCheckboxChange=function(t){var n=this.adapter.getRowIndexByChildElement(t.target);if(n!==-1){var i=this.adapter.isCheckboxAtRowIndexChecked(n);this.selectRowAtIndex(n,i),this.setHeaderRowCheckboxState();var r=this.adapter.getRowIdAtIndex(n);this.adapter.notifyRowSelectionChanged({rowId:r,rowIndex:n,selected:i})}},e.prototype.handleSortAction=function(t){for(var n=t.columnId,i=t.columnIndex,r=t.headerCell,o=0;o<this.adapter.getHeaderCellCount();o++)o!==i&&(this.adapter.removeClassNameByHeaderCellIndex(o,x.HEADER_CELL_SORTED),this.adapter.removeClassNameByHeaderCellIndex(o,x.HEADER_CELL_SORTED_DESCENDING),this.adapter.setAttributeByHeaderCellIndex(o,vt.ARIA_SORT,G.NONE),this.adapter.setSortStatusLabelByHeaderCellIndex(o,G.NONE));this.adapter.setClassNameByHeaderCellIndex(i,x.HEADER_CELL_SORTED);var s=this.adapter.getAttributeByHeaderCellIndex(i,vt.ARIA_SORT),u=G.NONE;s===G.ASCENDING?(this.adapter.setClassNameByHeaderCellIndex(i,x.HEADER_CELL_SORTED_DESCENDING),this.adapter.setAttributeByHeaderCellIndex(i,vt.ARIA_SORT,G.DESCENDING),u=G.DESCENDING):s===G.DESCENDING?(this.adapter.removeClassNameByHeaderCellIndex(i,x.HEADER_CELL_SORTED_DESCENDING),this.adapter.setAttributeByHeaderCellIndex(i,vt.ARIA_SORT,G.ASCENDING),u=G.ASCENDING):(this.adapter.setAttributeByHeaderCellIndex(i,vt.ARIA_SORT,G.ASCENDING),u=G.ASCENDING),this.adapter.setSortStatusLabelByHeaderCellIndex(i,u),this.adapter.notifySortAction({columnId:n,columnIndex:i,headerCell:r,sortValue:u})},e.prototype.handleRowClick=function(t){var n=t.rowId,i=t.row;this.adapter.notifyRowClick({rowId:n,row:i})},e.prototype.showProgress=function(){var t=this.adapter.getTableHeaderHeight(),n=this.adapter.getTableContainerHeight()-t,i=t;this.adapter.setProgressIndicatorStyles({height:n+"px",top:i+"px"}),this.adapter.addClass(x.IN_PROGRESS)},e.prototype.hideProgress=function(){this.adapter.removeClass(x.IN_PROGRESS)},e.prototype.setHeaderRowCheckboxState=function(){this.adapter.getSelectedRowCount()===0?(this.adapter.setHeaderRowCheckboxChecked(!1),this.adapter.setHeaderRowCheckboxIndeterminate(!1)):this.adapter.getSelectedRowCount()===this.adapter.getRowCount()?(this.adapter.setHeaderRowCheckboxChecked(!0),this.adapter.setHeaderRowCheckboxIndeterminate(!1)):(this.adapter.setHeaderRowCheckboxIndeterminate(!0),this.adapter.setHeaderRowCheckboxChecked(!1))},e.prototype.selectRowAtIndex=function(t,n){n?(this.adapter.addClassAtRowIndex(t,x.ROW_SELECTED),this.adapter.setAttributeAtRowIndex(t,vt.ARIA_SELECTED,"true")):(this.adapter.removeClassAtRowIndex(t,x.ROW_SELECTED),this.adapter.setAttributeAtRowIndex(t,vt.ARIA_SELECTED,"false"))},e})(C);/**
|
|
569
|
+
* @license
|
|
570
|
+
* Copyright 2019 Google Inc.
|
|
571
|
+
*
|
|
572
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
573
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
574
|
+
* in the Software without restriction, including without limitation the rights
|
|
575
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
576
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
577
|
+
* furnished to do so, subject to the following conditions:
|
|
578
|
+
*
|
|
579
|
+
* The above copyright notice and this permission notice shall be included in
|
|
580
|
+
* all copies or substantial portions of the Software.
|
|
581
|
+
*
|
|
582
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
583
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
584
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
585
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
586
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
587
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
588
|
+
* THE SOFTWARE.
|
|
589
|
+
*/var Nn=(function(a){l.__extends(e,a);function e(){return a!==null&&a.apply(this,arguments)||this}return e.attachTo=function(t){return new e(t)},e.prototype.initialize=function(t){t===void 0&&(t=function(n){return new qe(n)}),this.checkboxFactory=t},e.prototype.initialSyncWithDOM=function(){var t=this;this.headerRow=this.root.querySelector("."+x.HEADER_ROW),this.handleHeaderRowCheckboxChange=function(){t.foundation.handleHeaderRowCheckboxChange()},this.headerRow.addEventListener("change",this.handleHeaderRowCheckboxChange),this.headerRowClickListener=function(n){t.handleHeaderRowClick(n)},this.headerRow.addEventListener("click",this.headerRowClickListener),this.content=this.root.querySelector("."+x.CONTENT),this.handleContentClick=function(n){var i=Mt(n.target,$.ROW);i&&t.foundation.handleRowClick({rowId:t.getRowIdByRowElement(i),row:i})},this.content.addEventListener("click",this.handleContentClick),this.handleRowCheckboxChange=function(n){t.foundation.handleRowCheckboxChange(n)},this.content.addEventListener("change",this.handleRowCheckboxChange),this.layout()},e.prototype.layout=function(){this.foundation.layout()},e.prototype.getHeaderCells=function(){return[].slice.call(this.root.querySelectorAll($.HEADER_CELL))},e.prototype.getRows=function(){return this.foundation.getRows()},e.prototype.getSelectedRowIds=function(){return this.foundation.getSelectedRowIds()},e.prototype.setSelectedRowIds=function(t){this.foundation.setSelectedRowIds(t)},e.prototype.showProgress=function(){this.getLinearProgress().open(),this.foundation.showProgress()},e.prototype.hideProgress=function(){this.foundation.hideProgress(),this.getLinearProgress().close()},e.prototype.destroy=function(){var t,n;if(this.handleHeaderRowCheckboxChange&&this.headerRow.removeEventListener("change",this.handleHeaderRowCheckboxChange),this.headerRowClickListener&&this.headerRow.removeEventListener("click",this.headerRowClickListener),this.handleRowCheckboxChange&&this.content.removeEventListener("change",this.handleRowCheckboxChange),this.headerRowCheckbox&&this.headerRowCheckbox.destroy(),this.rowCheckboxList)try{for(var i=l.__values(this.rowCheckboxList),r=i.next();!r.done;r=i.next()){var o=r.value;o.destroy()}}catch(s){t={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}this.handleContentClick&&this.content.removeEventListener("click",this.handleContentClick)},e.prototype.getDefaultFoundation=function(){var t=this,n={addClass:function(i){t.root.classList.add(i)},removeClass:function(i){t.root.classList.remove(i)},getHeaderCellElements:function(){return t.getHeaderCells()},getHeaderCellCount:function(){return t.getHeaderCells().length},getAttributeByHeaderCellIndex:function(i,r){return t.getHeaderCells()[i].getAttribute(r)},setAttributeByHeaderCellIndex:function(i,r,o){t.getHeaderCells()[i].setAttribute(r,o)},setClassNameByHeaderCellIndex:function(i,r){t.getHeaderCells()[i].classList.add(r)},removeClassNameByHeaderCellIndex:function(i,r){t.getHeaderCells()[i].classList.remove(r)},notifySortAction:function(i){t.emit(kt.SORTED,i,!0)},getTableContainerHeight:function(){var i=t.root.querySelector("."+x.TABLE_CONTAINER);if(!i)throw new Error("MDCDataTable: Table container element not found.");return i.getBoundingClientRect().height},getTableHeaderHeight:function(){var i=t.root.querySelector($.HEADER_ROW);if(!i)throw new Error("MDCDataTable: Table header element not found.");return i.getBoundingClientRect().height},setProgressIndicatorStyles:function(i){var r=t.root.querySelector($.PROGRESS_INDICATOR);if(!r)throw new Error("MDCDataTable: Progress indicator element not found.");r.style.setProperty("height",i.height),r.style.setProperty("top",i.top)},addClassAtRowIndex:function(i,r){t.getRows()[i].classList.add(r)},getRowCount:function(){return t.getRows().length},getRowElements:function(){return[].slice.call(t.root.querySelectorAll($.ROW))},getRowIdAtIndex:function(i){return t.getRows()[i].getAttribute(jt.ROW_ID)},getRowIndexByChildElement:function(i){return t.getRows().indexOf(Mt(i,$.ROW))},getSelectedRowCount:function(){return t.root.querySelectorAll($.ROW_SELECTED).length},isCheckboxAtRowIndexChecked:function(i){return t.rowCheckboxList[i].checked},isHeaderRowCheckboxChecked:function(){return t.headerRowCheckbox.checked},isRowsSelectable:function(){return!!t.root.querySelector($.ROW_CHECKBOX)||!!t.root.querySelector($.HEADER_ROW_CHECKBOX)},notifyRowSelectionChanged:function(i){t.emit(kt.ROW_SELECTION_CHANGED,{row:t.getRowByIndex(i.rowIndex),rowId:t.getRowIdByIndex(i.rowIndex),rowIndex:i.rowIndex,selected:i.selected},!0)},notifySelectedAll:function(){t.emit(kt.SELECTED_ALL,{},!0)},notifyUnselectedAll:function(){t.emit(kt.UNSELECTED_ALL,{},!0)},notifyRowClick:function(i){t.emit(kt.ROW_CLICK,i,!0)},registerHeaderRowCheckbox:function(){t.headerRowCheckbox&&t.headerRowCheckbox.destroy();var i=t.root.querySelector($.HEADER_ROW_CHECKBOX);t.headerRowCheckbox=t.checkboxFactory(i)},registerRowCheckboxes:function(){t.rowCheckboxList&&t.rowCheckboxList.forEach(function(i){i.destroy()}),t.rowCheckboxList=[],t.getRows().forEach(function(i){var r=t.checkboxFactory(i.querySelector($.ROW_CHECKBOX));t.rowCheckboxList.push(r)})},removeClassAtRowIndex:function(i,r){t.getRows()[i].classList.remove(r)},setAttributeAtRowIndex:function(i,r,o){t.getRows()[i].setAttribute(r,o)},setHeaderRowCheckboxChecked:function(i){t.headerRowCheckbox.checked=i},setHeaderRowCheckboxIndeterminate:function(i){t.headerRowCheckbox.indeterminate=i},setRowCheckboxCheckedAtIndex:function(i,r){t.rowCheckboxList[i].checked=r},setSortStatusLabelByHeaderCellIndex:function(i,r){var o=t.getHeaderCells()[i],s=o.querySelector($.SORT_STATUS_LABEL);s&&(s.textContent=t.getSortStatusMessageBySortValue(r))}};return new xn(n)},e.prototype.getRowByIndex=function(t){return this.getRows()[t]},e.prototype.getRowIdByIndex=function(t){return this.getRowByIndex(t).getAttribute(jt.ROW_ID)},e.prototype.handleHeaderRowClick=function(t){var n=Mt(t.target,$.HEADER_CELL_WITH_SORT);if(n){var i=n.getAttribute(jt.COLUMN_ID),r=this.getHeaderCells().indexOf(n);r!==-1&&this.foundation.handleSortAction({columnId:i,columnIndex:r,headerCell:n})}},e.prototype.getSortStatusMessageBySortValue=function(t){switch(t){case G.ASCENDING:return Le.SORTED_IN_ASCENDING;case G.DESCENDING:return Le.SORTED_IN_DESCENDING;default:return""}},e.prototype.getLinearProgressElement=function(){var t=this.root.querySelector("."+x.LINEAR_PROGRESS);if(!t)throw new Error("MDCDataTable: linear progress element is not found.");return t},e.prototype.getLinearProgress=function(){if(!this.linearProgress){var t=this.getLinearProgressElement();this.linearProgress=new Ye(t)}return this.linearProgress},e.prototype.getRowIdByRowElement=function(t){return t.getAttribute(jt.ROW_ID)},e})(T);/**
|
|
590
|
+
* @license
|
|
591
|
+
* Copyright 2020 Google Inc.
|
|
592
|
+
*
|
|
593
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
594
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
595
|
+
* in the Software without restriction, including without limitation the rights
|
|
596
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
597
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
598
|
+
* furnished to do so, subject to the following conditions:
|
|
599
|
+
*
|
|
600
|
+
* The above copyright notice and this permission notice shall be included in
|
|
601
|
+
* all copies or substantial portions of the Software.
|
|
602
|
+
*
|
|
603
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
604
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
605
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
606
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
607
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
608
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
609
|
+
* THE SOFTWARE.
|
|
610
|
+
*/var Mn=(function(){function a(){this.rafIDs=new Map}return a.prototype.request=function(e,t){var n=this;this.cancel(e);var i=requestAnimationFrame(function(r){n.rafIDs.delete(e),t(r)});this.rafIDs.set(e,i)},a.prototype.cancel=function(e){var t=this.rafIDs.get(e);t&&(cancelAnimationFrame(t),this.rafIDs.delete(e))},a.prototype.cancelAll=function(){var e=this;this.rafIDs.forEach(function(t,n){e.cancel(n)})},a.prototype.getQueue=function(){var e=[];return this.rafIDs.forEach(function(t,n){e.push(n)}),e},a})();/**
|
|
611
|
+
* @license
|
|
612
|
+
* Copyright 2018 Google Inc.
|
|
613
|
+
*
|
|
614
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
615
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
616
|
+
* in the Software without restriction, including without limitation the rights
|
|
617
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
618
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
619
|
+
* furnished to do so, subject to the following conditions:
|
|
620
|
+
*
|
|
621
|
+
* The above copyright notice and this permission notice shall be included in
|
|
622
|
+
* all copies or substantial portions of the Software.
|
|
623
|
+
*
|
|
624
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
625
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
626
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
627
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
628
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
629
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
630
|
+
* THE SOFTWARE.
|
|
631
|
+
*/var mt,lt,A={LIST_ITEM_ACTIVATED_CLASS:"mdc-list-item--activated",LIST_ITEM_CLASS:"mdc-list-item",LIST_ITEM_DISABLED_CLASS:"mdc-list-item--disabled",LIST_ITEM_SELECTED_CLASS:"mdc-list-item--selected",LIST_ITEM_TEXT_CLASS:"mdc-list-item__text",LIST_ITEM_PRIMARY_TEXT_CLASS:"mdc-list-item__primary-text",ROOT:"mdc-list"},wn=(mt={},mt[""+A.LIST_ITEM_ACTIVATED_CLASS]="mdc-list-item--activated",mt[""+A.LIST_ITEM_CLASS]="mdc-list-item",mt[""+A.LIST_ITEM_DISABLED_CLASS]="mdc-list-item--disabled",mt[""+A.LIST_ITEM_SELECTED_CLASS]="mdc-list-item--selected",mt[""+A.LIST_ITEM_PRIMARY_TEXT_CLASS]="mdc-list-item__primary-text",mt[""+A.ROOT]="mdc-list",mt),St=(lt={},lt[""+A.LIST_ITEM_ACTIVATED_CLASS]="mdc-deprecated-list-item--activated",lt[""+A.LIST_ITEM_CLASS]="mdc-deprecated-list-item",lt[""+A.LIST_ITEM_DISABLED_CLASS]="mdc-deprecated-list-item--disabled",lt[""+A.LIST_ITEM_SELECTED_CLASS]="mdc-deprecated-list-item--selected",lt[""+A.LIST_ITEM_TEXT_CLASS]="mdc-deprecated-list-item__text",lt[""+A.LIST_ITEM_PRIMARY_TEXT_CLASS]="mdc-deprecated-list-item__primary-text",lt[""+A.ROOT]="mdc-deprecated-list",lt),y={ACTION_EVENT:"MDCList:action",SELECTION_CHANGE_EVENT:"MDCList:selectionChange",ARIA_CHECKED:"aria-checked",ARIA_CHECKED_CHECKBOX_SELECTOR:'[role="checkbox"][aria-checked="true"]',ARIA_CHECKED_RADIO_SELECTOR:'[role="radio"][aria-checked="true"]',ARIA_CURRENT:"aria-current",ARIA_DISABLED:"aria-disabled",ARIA_ORIENTATION:"aria-orientation",ARIA_ORIENTATION_HORIZONTAL:"horizontal",ARIA_ROLE_CHECKBOX_SELECTOR:'[role="checkbox"]',ARIA_SELECTED:"aria-selected",ARIA_INTERACTIVE_ROLES_SELECTOR:'[role="listbox"], [role="menu"]',ARIA_MULTI_SELECTABLE_SELECTOR:'[aria-multiselectable="true"]',CHECKBOX_RADIO_SELECTOR:'input[type="checkbox"], input[type="radio"]',CHECKBOX_SELECTOR:'input[type="checkbox"]',CHILD_ELEMENTS_TO_TOGGLE_TABINDEX:`
|
|
632
|
+
.`+A.LIST_ITEM_CLASS+` button:not(:disabled),
|
|
633
|
+
.`+A.LIST_ITEM_CLASS+` a,
|
|
634
|
+
.`+St[A.LIST_ITEM_CLASS]+` button:not(:disabled),
|
|
635
|
+
.`+St[A.LIST_ITEM_CLASS]+` a
|
|
636
|
+
`,DEPRECATED_SELECTOR:".mdc-deprecated-list",FOCUSABLE_CHILD_ELEMENTS:`
|
|
637
|
+
.`+A.LIST_ITEM_CLASS+` button:not(:disabled),
|
|
638
|
+
.`+A.LIST_ITEM_CLASS+` a,
|
|
639
|
+
.`+A.LIST_ITEM_CLASS+` input[type="radio"]:not(:disabled),
|
|
640
|
+
.`+A.LIST_ITEM_CLASS+` input[type="checkbox"]:not(:disabled),
|
|
641
|
+
.`+St[A.LIST_ITEM_CLASS]+` button:not(:disabled),
|
|
642
|
+
.`+St[A.LIST_ITEM_CLASS]+` a,
|
|
643
|
+
.`+St[A.LIST_ITEM_CLASS]+` input[type="radio"]:not(:disabled),
|
|
644
|
+
.`+St[A.LIST_ITEM_CLASS]+` input[type="checkbox"]:not(:disabled)
|
|
645
|
+
`,RADIO_SELECTOR:'input[type="radio"]',SELECTED_ITEM_SELECTOR:'[aria-selected="true"], [aria-current="true"]'},L={UNSET_INDEX:-1,TYPEAHEAD_BUFFER_CLEAR_TIMEOUT_MS:300},Pn="evolution";/**
|
|
646
|
+
* @license
|
|
647
|
+
* Copyright 2020 Google Inc.
|
|
648
|
+
*
|
|
649
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
650
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
651
|
+
* in the Software without restriction, including without limitation the rights
|
|
652
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
653
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
654
|
+
* furnished to do so, subject to the following conditions:
|
|
655
|
+
*
|
|
656
|
+
* The above copyright notice and this permission notice shall be included in
|
|
657
|
+
* all copies or substantial portions of the Software.
|
|
658
|
+
*
|
|
659
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
660
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
661
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
662
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
663
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
664
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
665
|
+
* THE SOFTWARE.
|
|
666
|
+
*/var Hn=["input","button","textarea","select"],Q=function(a){var e=a.target;if(e){var t=(""+e.tagName).toLowerCase();Hn.indexOf(t)===-1&&a.preventDefault()}};/**
|
|
667
|
+
* @license
|
|
668
|
+
* Copyright 2020 Google Inc.
|
|
669
|
+
*
|
|
670
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
671
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
672
|
+
* in the Software without restriction, including without limitation the rights
|
|
673
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
674
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
675
|
+
* furnished to do so, subject to the following conditions:
|
|
676
|
+
*
|
|
677
|
+
* The above copyright notice and this permission notice shall be included in
|
|
678
|
+
* all copies or substantial portions of the Software.
|
|
679
|
+
*
|
|
680
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
681
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
682
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
683
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
684
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
685
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
686
|
+
* THE SOFTWARE.
|
|
687
|
+
*/function Fn(){var a={bufferClearTimeout:0,currentFirstChar:"",sortedIndexCursor:0,typeaheadBuffer:""};return a}function kn(a,e){for(var t=new Map,n=0;n<a;n++){var i=e(n).trim();if(i){var r=i[0].toLowerCase();t.has(r)||t.set(r,[]),t.get(r).push({text:i.toLowerCase(),index:n})}}return t.forEach(function(o){o.sort(function(s,u){return s.index-u.index})}),t}function se(a,e){var t=a.nextChar,n=a.focusItemAtIndex,i=a.sortedIndexByFirstChar,r=a.focusedItemIndex,o=a.skipFocus,s=a.isItemAtIndexDisabled;clearTimeout(e.bufferClearTimeout),e.bufferClearTimeout=setTimeout(function(){Qe(e)},L.TYPEAHEAD_BUFFER_CLEAR_TIMEOUT_MS),e.typeaheadBuffer=e.typeaheadBuffer+t;var u;return e.typeaheadBuffer.length===1?u=Bn(i,r,s,e):u=Un(i,s,e),u!==-1&&!o&&n(u),u}function Bn(a,e,t,n){var i=n.typeaheadBuffer[0],r=a.get(i);if(!r)return-1;if(i===n.currentFirstChar&&r[n.sortedIndexCursor].index===e){n.sortedIndexCursor=(n.sortedIndexCursor+1)%r.length;var o=r[n.sortedIndexCursor].index;if(!t(o))return o}n.currentFirstChar=i;var s=-1,u;for(u=0;u<r.length;u++)if(!t(r[u].index)){s=u;break}for(;u<r.length;u++)if(r[u].index>e&&!t(r[u].index)){s=u;break}return s!==-1?(n.sortedIndexCursor=s,r[n.sortedIndexCursor].index):-1}function Un(a,e,t){var n=t.typeaheadBuffer[0],i=a.get(n);if(!i)return-1;var r=i[t.sortedIndexCursor];if(r.text.lastIndexOf(t.typeaheadBuffer,0)===0&&!e(r.index))return r.index;for(var o=(t.sortedIndexCursor+1)%i.length,s=-1;o!==t.sortedIndexCursor;){var u=i[o],c=u.text.lastIndexOf(t.typeaheadBuffer,0)===0,h=!e(u.index);if(c&&h){s=o;break}o=(o+1)%i.length}return s!==-1?(t.sortedIndexCursor=s,i[t.sortedIndexCursor].index):-1}function $e(a){return a.typeaheadBuffer.length>0}function Qe(a){a.typeaheadBuffer=""}function Oe(a,e){var t=a.event,n=a.isTargetListItem,i=a.focusedItemIndex,r=a.focusItemAtIndex,o=a.sortedIndexByFirstChar,s=a.isItemAtIndexDisabled,u=N(t)==="ArrowLeft",c=N(t)==="ArrowUp",h=N(t)==="ArrowRight",E=N(t)==="ArrowDown",p=N(t)==="Home",f=N(t)==="End",v=N(t)==="Enter",S=N(t)==="Spacebar";if(t.altKey||t.ctrlKey||t.metaKey||u||c||h||E||p||f||v)return-1;var K=!S&&t.key.length===1;if(K){Q(t);var W={focusItemAtIndex:r,focusedItemIndex:i,nextChar:t.key.toLowerCase(),sortedIndexByFirstChar:o,skipFocus:!1,isItemAtIndexDisabled:s};return se(W,e)}if(!S)return-1;n&&Q(t);var _=n&&$e(e);if(_){var W={focusItemAtIndex:r,focusedItemIndex:i,nextChar:" ",sortedIndexByFirstChar:o,skipFocus:!1,isItemAtIndexDisabled:s};return se(W,e)}return-1}/**
|
|
688
|
+
* @license
|
|
689
|
+
* Copyright 2018 Google Inc.
|
|
690
|
+
*
|
|
691
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
692
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
693
|
+
* in the Software without restriction, including without limitation the rights
|
|
694
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
695
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
696
|
+
* furnished to do so, subject to the following conditions:
|
|
697
|
+
*
|
|
698
|
+
* The above copyright notice and this permission notice shall be included in
|
|
699
|
+
* all copies or substantial portions of the Software.
|
|
700
|
+
*
|
|
701
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
702
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
703
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
704
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
705
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
706
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
707
|
+
* THE SOFTWARE.
|
|
708
|
+
*/function Vn(a){return a instanceof Array}var Kn=["Alt","Control","Meta","Shift"];function De(a){var e=new Set(a?Kn.filter(function(t){return a.getModifierState(t)}):[]);return function(t){return t.every(function(n){return e.has(n)})&&t.length===e.size}}var ue=(function(a){l.__extends(e,a);function e(t){var n=a.call(this,l.__assign(l.__assign({},e.defaultAdapter),t))||this;return n.wrapFocus=!1,n.isVertical=!0,n.isSingleSelectionList=!1,n.areDisabledItemsFocusable=!0,n.selectedIndex=L.UNSET_INDEX,n.focusedItemIndex=L.UNSET_INDEX,n.useActivatedClass=!1,n.useSelectedAttr=!1,n.ariaCurrentAttrValue=null,n.isCheckboxList=!1,n.isRadioList=!1,n.lastSelectedIndex=null,n.hasTypeahead=!1,n.typeaheadState=Fn(),n.sortedIndexByFirstChar=new Map,n}return Object.defineProperty(e,"strings",{get:function(){return y},enumerable:!1,configurable:!0}),Object.defineProperty(e,"cssClasses",{get:function(){return A},enumerable:!1,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return L},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClassForElementIndex:function(){},focusItemAtIndex:function(){},getAttributeForElementIndex:function(){return null},getFocusedElementIndex:function(){return 0},getListItemCount:function(){return 0},hasCheckboxAtIndex:function(){return!1},hasRadioAtIndex:function(){return!1},isCheckboxCheckedAtIndex:function(){return!1},isFocusInsideList:function(){return!1},isRootFocused:function(){return!1},listItemAtIndexHasClass:function(){return!1},notifyAction:function(){},notifySelectionChange:function(){},removeClassForElementIndex:function(){},setAttributeForElementIndex:function(){},setCheckedCheckboxOrRadioAtIndex:function(){},setTabIndexForListItemChildren:function(){},getPrimaryTextAtIndex:function(){return""}}},enumerable:!1,configurable:!0}),e.prototype.layout=function(){this.adapter.getListItemCount()!==0&&(this.adapter.hasCheckboxAtIndex(0)?this.isCheckboxList=!0:this.adapter.hasRadioAtIndex(0)?this.isRadioList=!0:this.maybeInitializeSingleSelection(),this.hasTypeahead&&(this.sortedIndexByFirstChar=this.typeaheadInitSortedIndex()))},e.prototype.getFocusedItemIndex=function(){return this.focusedItemIndex},e.prototype.setWrapFocus=function(t){this.wrapFocus=t},e.prototype.setVerticalOrientation=function(t){this.isVertical=t},e.prototype.setSingleSelection=function(t){this.isSingleSelectionList=t,t&&(this.maybeInitializeSingleSelection(),this.selectedIndex=this.getSelectedIndexFromDOM())},e.prototype.setDisabledItemsFocusable=function(t){this.areDisabledItemsFocusable=t},e.prototype.maybeInitializeSingleSelection=function(){var t=this.getSelectedIndexFromDOM();if(t!==L.UNSET_INDEX){var n=this.adapter.listItemAtIndexHasClass(t,A.LIST_ITEM_ACTIVATED_CLASS);n&&this.setUseActivatedClass(!0),this.isSingleSelectionList=!0,this.selectedIndex=t}},e.prototype.getSelectedIndexFromDOM=function(){for(var t=L.UNSET_INDEX,n=this.adapter.getListItemCount(),i=0;i<n;i++){var r=this.adapter.listItemAtIndexHasClass(i,A.LIST_ITEM_SELECTED_CLASS),o=this.adapter.listItemAtIndexHasClass(i,A.LIST_ITEM_ACTIVATED_CLASS);if(r||o){t=i;break}}return t},e.prototype.setHasTypeahead=function(t){this.hasTypeahead=t,t&&(this.sortedIndexByFirstChar=this.typeaheadInitSortedIndex())},e.prototype.isTypeaheadInProgress=function(){return this.hasTypeahead&&$e(this.typeaheadState)},e.prototype.setUseActivatedClass=function(t){this.useActivatedClass=t},e.prototype.setUseSelectedAttribute=function(t){this.useSelectedAttr=t},e.prototype.getSelectedIndex=function(){return this.selectedIndex},e.prototype.setSelectedIndex=function(t,n){n===void 0&&(n={}),this.isIndexValid(t)&&(this.isCheckboxList?this.setCheckboxAtIndex(t,n):this.isRadioList?this.setRadioAtIndex(t,n):this.setSingleSelectionAtIndex(t,n))},e.prototype.handleFocusIn=function(t){t>=0&&(this.focusedItemIndex=t,this.adapter.setAttributeForElementIndex(t,"tabindex","0"),this.adapter.setTabIndexForListItemChildren(t,"0"))},e.prototype.handleFocusOut=function(t){var n=this;t>=0&&(this.adapter.setAttributeForElementIndex(t,"tabindex","-1"),this.adapter.setTabIndexForListItemChildren(t,"-1")),setTimeout(function(){n.adapter.isFocusInsideList()||n.setTabindexToFirstSelectedOrFocusedItem()},0)},e.prototype.isIndexDisabled=function(t){return this.adapter.listItemAtIndexHasClass(t,A.LIST_ITEM_DISABLED_CLASS)},e.prototype.handleKeydown=function(t,n,i){var r=this,o,s=N(t)==="ArrowLeft",u=N(t)==="ArrowUp",c=N(t)==="ArrowRight",h=N(t)==="ArrowDown",E=N(t)==="Home",p=N(t)==="End",f=N(t)==="Enter",v=N(t)==="Spacebar",S=this.isVertical&&h||!this.isVertical&&c,K=this.isVertical&&u||!this.isVertical&&s,W=t.key==="A"||t.key==="a",_=De(t);if(this.adapter.isRootFocused()){if((K||p)&&_([]))t.preventDefault(),this.focusLastElement();else if((S||E)&&_([]))t.preventDefault(),this.focusFirstElement();else if(K&&_(["Shift"])&&this.isCheckboxList){t.preventDefault();var V=this.focusLastElement();V!==-1&&this.setSelectedIndexOnAction(V,!1)}else if(S&&_(["Shift"])&&this.isCheckboxList){t.preventDefault();var V=this.focusFirstElement();V!==-1&&this.setSelectedIndexOnAction(V,!1)}if(this.hasTypeahead){var P={event:t,focusItemAtIndex:function(Zt){r.focusItemAtIndex(Zt)},focusedItemIndex:-1,isTargetListItem:n,sortedIndexByFirstChar:this.sortedIndexByFirstChar,isItemAtIndexDisabled:function(Zt){return r.isIndexDisabled(Zt)}};Oe(P,this.typeaheadState)}return}var R=this.adapter.getFocusedElementIndex();if(!(R===-1&&(R=i,R<0))){if(S&&_([]))Q(t),this.focusNextElement(R);else if(K&&_([]))Q(t),this.focusPrevElement(R);else if(S&&_(["Shift"])&&this.isCheckboxList){Q(t);var V=this.focusNextElement(R);V!==-1&&this.setSelectedIndexOnAction(V,!1)}else if(K&&_(["Shift"])&&this.isCheckboxList){Q(t);var V=this.focusPrevElement(R);V!==-1&&this.setSelectedIndexOnAction(V,!1)}else if(E&&_([]))Q(t),this.focusFirstElement();else if(p&&_([]))Q(t),this.focusLastElement();else if(E&&_(["Control","Shift"])&&this.isCheckboxList){if(Q(t),this.isIndexDisabled(R))return;this.focusFirstElement(),this.toggleCheckboxRange(0,R,R)}else if(p&&_(["Control","Shift"])&&this.isCheckboxList){if(Q(t),this.isIndexDisabled(R))return;this.focusLastElement(),this.toggleCheckboxRange(R,this.adapter.getListItemCount()-1,R)}else if(W&&_(["Control"])&&this.isCheckboxList)t.preventDefault(),this.checkboxListToggleAll(this.selectedIndex===L.UNSET_INDEX?[]:this.selectedIndex,!0);else if((f||v)&&_([])){if(n){var Pt=t.target;if(Pt&&Pt.tagName==="A"&&f||(Q(t),this.isIndexDisabled(R)))return;this.isTypeaheadInProgress()||(this.isSelectableList()&&this.setSelectedIndexOnAction(R,!1),this.adapter.notifyAction(R))}}else if((f||v)&&_(["Shift"])&&this.isCheckboxList){var Pt=t.target;if(Pt&&Pt.tagName==="A"&&f||(Q(t),this.isIndexDisabled(R)))return;this.isTypeaheadInProgress()||(this.toggleCheckboxRange((o=this.lastSelectedIndex)!==null&&o!==void 0?o:R,R,R),this.adapter.notifyAction(R))}if(this.hasTypeahead){var P={event:t,focusItemAtIndex:function(Jt){r.focusItemAtIndex(Jt)},focusedItemIndex:this.focusedItemIndex,isTargetListItem:n,sortedIndexByFirstChar:this.sortedIndexByFirstChar,isItemAtIndexDisabled:function(Jt){return r.isIndexDisabled(Jt)}};Oe(P,this.typeaheadState)}}},e.prototype.handleClick=function(t,n,i){var r,o=De(i);t!==L.UNSET_INDEX&&(this.isIndexDisabled(t)||(o([])?(this.isSelectableList()&&this.setSelectedIndexOnAction(t,n),this.adapter.notifyAction(t)):this.isCheckboxList&&o(["Shift"])&&(this.toggleCheckboxRange((r=this.lastSelectedIndex)!==null&&r!==void 0?r:t,t,t),this.adapter.notifyAction(t))))},e.prototype.focusNextElement=function(t){var n=this.adapter.getListItemCount(),i=t,r=null;do{if(i++,i>=n)if(this.wrapFocus)i=0;else return t;if(i===r)return-1;r=r??i}while(!this.areDisabledItemsFocusable&&this.isIndexDisabled(i));return this.focusItemAtIndex(i),i},e.prototype.focusPrevElement=function(t){var n=this.adapter.getListItemCount(),i=t,r=null;do{if(i--,i<0)if(this.wrapFocus)i=n-1;else return t;if(i===r)return-1;r=r??i}while(!this.areDisabledItemsFocusable&&this.isIndexDisabled(i));return this.focusItemAtIndex(i),i},e.prototype.focusFirstElement=function(){return this.focusNextElement(-1)},e.prototype.focusLastElement=function(){return this.focusPrevElement(this.adapter.getListItemCount())},e.prototype.focusInitialElement=function(){var t=this.getFirstSelectedOrFocusedItemIndex();return this.focusItemAtIndex(t),t},e.prototype.setEnabled=function(t,n){this.isIndexValid(t,!1)&&(n?(this.adapter.removeClassForElementIndex(t,A.LIST_ITEM_DISABLED_CLASS),this.adapter.setAttributeForElementIndex(t,y.ARIA_DISABLED,"false")):(this.adapter.addClassForElementIndex(t,A.LIST_ITEM_DISABLED_CLASS),this.adapter.setAttributeForElementIndex(t,y.ARIA_DISABLED,"true")))},e.prototype.setSingleSelectionAtIndex=function(t,n){if(n===void 0&&(n={}),!(this.selectedIndex===t&&!n.forceUpdate)){var i=A.LIST_ITEM_SELECTED_CLASS;this.useActivatedClass&&(i=A.LIST_ITEM_ACTIVATED_CLASS),this.selectedIndex!==L.UNSET_INDEX&&this.adapter.removeClassForElementIndex(this.selectedIndex,i),this.setAriaForSingleSelectionAtIndex(t),this.setTabindexAtIndex(t),t!==L.UNSET_INDEX&&this.adapter.addClassForElementIndex(t,i),this.selectedIndex=t,n.isUserInteraction&&!n.forceUpdate&&this.adapter.notifySelectionChange([t])}},e.prototype.setAriaForSingleSelectionAtIndex=function(t){this.selectedIndex===L.UNSET_INDEX&&(this.ariaCurrentAttrValue=this.adapter.getAttributeForElementIndex(t,y.ARIA_CURRENT));var n=this.ariaCurrentAttrValue!==null,i=n?y.ARIA_CURRENT:y.ARIA_SELECTED;if(this.selectedIndex!==L.UNSET_INDEX&&this.adapter.setAttributeForElementIndex(this.selectedIndex,i,"false"),t!==L.UNSET_INDEX){var r=n?this.ariaCurrentAttrValue:"true";this.adapter.setAttributeForElementIndex(t,i,r)}},e.prototype.getSelectionAttribute=function(){return this.useSelectedAttr?y.ARIA_SELECTED:y.ARIA_CHECKED},e.prototype.setRadioAtIndex=function(t,n){n===void 0&&(n={});var i=this.getSelectionAttribute();this.adapter.setCheckedCheckboxOrRadioAtIndex(t,!0),!(this.selectedIndex===t&&!n.forceUpdate)&&(this.selectedIndex!==L.UNSET_INDEX&&this.adapter.setAttributeForElementIndex(this.selectedIndex,i,"false"),this.adapter.setAttributeForElementIndex(t,i,"true"),this.selectedIndex=t,n.isUserInteraction&&!n.forceUpdate&&this.adapter.notifySelectionChange([t]))},e.prototype.setCheckboxAtIndex=function(t,n){n===void 0&&(n={});for(var i=this.selectedIndex,r=n.isUserInteraction?new Set(i===L.UNSET_INDEX?[]:i):null,o=this.getSelectionAttribute(),s=[],u=0;u<this.adapter.getListItemCount();u++){var c=r?.has(u),h=t.indexOf(u)>=0;h!==c&&s.push(u),this.adapter.setCheckedCheckboxOrRadioAtIndex(u,h),this.adapter.setAttributeForElementIndex(u,o,h?"true":"false")}this.selectedIndex=t,n.isUserInteraction&&s.length&&this.adapter.notifySelectionChange(s)},e.prototype.toggleCheckboxRange=function(t,n,i){this.lastSelectedIndex=i;for(var r=new Set(this.selectedIndex===L.UNSET_INDEX?[]:this.selectedIndex),o=!r?.has(i),s=l.__read([t,n].sort(),2),u=s[0],c=s[1],h=this.getSelectionAttribute(),E=[],p=u;p<=c;p++)if(!this.isIndexDisabled(p)){var f=r.has(p);o!==f&&(E.push(p),this.adapter.setCheckedCheckboxOrRadioAtIndex(p,o),this.adapter.setAttributeForElementIndex(p,h,""+o),o?r.add(p):r.delete(p))}E.length&&(this.selectedIndex=l.__spreadArray([],l.__read(r)),this.adapter.notifySelectionChange(E))},e.prototype.setTabindexAtIndex=function(t){this.focusedItemIndex===L.UNSET_INDEX&&t!==0?this.adapter.setAttributeForElementIndex(0,"tabindex","-1"):this.focusedItemIndex>=0&&this.focusedItemIndex!==t&&this.adapter.setAttributeForElementIndex(this.focusedItemIndex,"tabindex","-1"),!(this.selectedIndex instanceof Array)&&this.selectedIndex!==t&&this.adapter.setAttributeForElementIndex(this.selectedIndex,"tabindex","-1"),t!==L.UNSET_INDEX&&this.adapter.setAttributeForElementIndex(t,"tabindex","0")},e.prototype.isSelectableList=function(){return this.isSingleSelectionList||this.isCheckboxList||this.isRadioList},e.prototype.setTabindexToFirstSelectedOrFocusedItem=function(){var t=this.getFirstSelectedOrFocusedItemIndex();this.setTabindexAtIndex(t)},e.prototype.getFirstSelectedOrFocusedItemIndex=function(){return this.isSelectableList()?typeof this.selectedIndex=="number"&&this.selectedIndex!==L.UNSET_INDEX?this.selectedIndex:Vn(this.selectedIndex)&&this.selectedIndex.length>0?this.selectedIndex.reduce(function(t,n){return Math.min(t,n)}):0:Math.max(this.focusedItemIndex,0)},e.prototype.isIndexValid=function(t,n){var i=this;if(n===void 0&&(n=!0),t instanceof Array){if(!this.isCheckboxList&&n)throw new Error("MDCListFoundation: Array of index is only supported for checkbox based list");return t.length===0?!0:t.some(function(r){return i.isIndexInRange(r)})}else if(typeof t=="number"){if(this.isCheckboxList&&n)throw new Error("MDCListFoundation: Expected array of index for checkbox based list but got number: "+t);return this.isIndexInRange(t)||this.isSingleSelectionList&&t===L.UNSET_INDEX}else return!1},e.prototype.isIndexInRange=function(t){var n=this.adapter.getListItemCount();return t>=0&&t<n},e.prototype.setSelectedIndexOnAction=function(t,n){this.lastSelectedIndex=t,this.isCheckboxList?(this.toggleCheckboxAtIndex(t,n),this.adapter.notifySelectionChange([t])):this.setSelectedIndex(t,{isUserInteraction:!0})},e.prototype.toggleCheckboxAtIndex=function(t,n){var i=this.getSelectionAttribute(),r=this.adapter.isCheckboxCheckedAtIndex(t),o;n?o=r:(o=!r,this.adapter.setCheckedCheckboxOrRadioAtIndex(t,o)),this.adapter.setAttributeForElementIndex(t,i,o?"true":"false");var s=this.selectedIndex===L.UNSET_INDEX?[]:this.selectedIndex.slice();o?s.push(t):s=s.filter(function(u){return u!==t}),this.selectedIndex=s},e.prototype.focusItemAtIndex=function(t){this.adapter.focusItemAtIndex(t),this.focusedItemIndex=t},e.prototype.checkboxListToggleAll=function(t,n){var i=this.adapter.getListItemCount();if(t.length===i)this.setCheckboxAtIndex([],{isUserInteraction:n});else{for(var r=[],o=0;o<i;o++)(!this.isIndexDisabled(o)||t.indexOf(o)>-1)&&r.push(o);this.setCheckboxAtIndex(r,{isUserInteraction:n})}},e.prototype.typeaheadMatchItem=function(t,n,i){var r=this;i===void 0&&(i=!1);var o={focusItemAtIndex:function(s){r.focusItemAtIndex(s)},focusedItemIndex:n||this.focusedItemIndex,nextChar:t,sortedIndexByFirstChar:this.sortedIndexByFirstChar,skipFocus:i,isItemAtIndexDisabled:function(s){return r.isIndexDisabled(s)}};return se(o,this.typeaheadState)},e.prototype.typeaheadInitSortedIndex=function(){return kn(this.adapter.getListItemCount(),this.adapter.getPrimaryTextAtIndex)},e.prototype.clearTypeaheadBuffer=function(){Qe(this.typeaheadState)},e})(C);/**
|
|
709
|
+
* @license
|
|
710
|
+
* Copyright 2018 Google Inc.
|
|
711
|
+
*
|
|
712
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
713
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
714
|
+
* in the Software without restriction, including without limitation the rights
|
|
715
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
716
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
717
|
+
* furnished to do so, subject to the following conditions:
|
|
718
|
+
*
|
|
719
|
+
* The above copyright notice and this permission notice shall be included in
|
|
720
|
+
* all copies or substantial portions of the Software.
|
|
721
|
+
*
|
|
722
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
723
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
724
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
725
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
726
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
727
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
728
|
+
* THE SOFTWARE.
|
|
729
|
+
*/var Ze=(function(a){l.__extends(e,a);function e(){return a!==null&&a.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"vertical",{set:function(t){this.foundation.setVerticalOrientation(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"listElements",{get:function(){return Array.from(this.root.querySelectorAll("."+this.classNameMap[A.LIST_ITEM_CLASS]))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"wrapFocus",{set:function(t){this.foundation.setWrapFocus(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"typeaheadInProgress",{get:function(){return this.foundation.isTypeaheadInProgress()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hasTypeahead",{set:function(t){this.foundation.setHasTypeahead(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"singleSelection",{set:function(t){this.foundation.setSingleSelection(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"disabledItemsFocusable",{set:function(t){this.foundation.setDisabledItemsFocusable(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"selectedIndex",{get:function(){return this.foundation.getSelectedIndex()},set:function(t){this.foundation.setSelectedIndex(t)},enumerable:!1,configurable:!0}),e.attachTo=function(t){return new e(t)},e.prototype.initialSyncWithDOM=function(){this.isEvolutionEnabled=Pn in this.root.dataset,this.isEvolutionEnabled?this.classNameMap=wn:it(this.root,y.DEPRECATED_SELECTOR)?this.classNameMap=St:this.classNameMap=Object.values(A).reduce(function(t,n){return t[n]=n,t},{}),this.handleClick=this.handleClickEvent.bind(this),this.handleKeydown=this.handleKeydownEvent.bind(this),this.focusInEventListener=this.handleFocusInEvent.bind(this),this.focusOutEventListener=this.handleFocusOutEvent.bind(this),this.listen("keydown",this.handleKeydown),this.listen("click",this.handleClick),this.listen("focusin",this.focusInEventListener),this.listen("focusout",this.focusOutEventListener),this.layout(),this.initializeListType(),this.ensureFocusable()},e.prototype.destroy=function(){this.unlisten("keydown",this.handleKeydown),this.unlisten("click",this.handleClick),this.unlisten("focusin",this.focusInEventListener),this.unlisten("focusout",this.focusOutEventListener)},e.prototype.layout=function(){var t=this.root.getAttribute(y.ARIA_ORIENTATION);this.vertical=t!==y.ARIA_ORIENTATION_HORIZONTAL;var n="."+this.classNameMap[A.LIST_ITEM_CLASS]+":not([tabindex])",i=y.FOCUSABLE_CHILD_ELEMENTS,r=this.root.querySelectorAll(n);r.length&&Array.prototype.forEach.call(r,function(s){s.setAttribute("tabindex","-1")});var o=this.root.querySelectorAll(i);o.length&&Array.prototype.forEach.call(o,function(s){s.setAttribute("tabindex","-1")}),this.isEvolutionEnabled&&this.foundation.setUseSelectedAttribute(!0),this.foundation.layout()},e.prototype.getPrimaryText=function(t){var n,i=t.querySelector("."+this.classNameMap[A.LIST_ITEM_PRIMARY_TEXT_CLASS]);if(this.isEvolutionEnabled||i)return(n=i?.textContent)!==null&&n!==void 0?n:"";var r=t.querySelector("."+this.classNameMap[A.LIST_ITEM_TEXT_CLASS]);return r&&r.textContent||""},e.prototype.initializeListType=function(){var t=this;if(this.isInteractive=it(this.root,y.ARIA_INTERACTIVE_ROLES_SELECTOR),this.isEvolutionEnabled&&this.isInteractive){var n=Array.from(this.root.querySelectorAll(y.SELECTED_ITEM_SELECTOR),function(s){return t.listElements.indexOf(s)});it(this.root,y.ARIA_MULTI_SELECTABLE_SELECTOR)?this.selectedIndex=n:n.length>0&&(this.selectedIndex=n[0]);return}var i=this.root.querySelectorAll(y.ARIA_ROLE_CHECKBOX_SELECTOR),r=this.root.querySelector(y.ARIA_CHECKED_RADIO_SELECTOR);if(i.length){var o=this.root.querySelectorAll(y.ARIA_CHECKED_CHECKBOX_SELECTOR);this.selectedIndex=Array.from(o,function(s){return t.listElements.indexOf(s)})}else r&&(this.selectedIndex=this.listElements.indexOf(r))},e.prototype.setEnabled=function(t,n){this.foundation.setEnabled(t,n)},e.prototype.typeaheadMatchItem=function(t,n){return this.foundation.typeaheadMatchItem(t,n,!0)},e.prototype.getDefaultFoundation=function(){var t=this,n={addClassForElementIndex:function(i,r){var o=t.listElements[i];o&&o.classList.add(t.classNameMap[r])},focusItemAtIndex:function(i){var r=t.listElements[i];r&&r.focus()},getAttributeForElementIndex:function(i,r){return t.listElements[i].getAttribute(r)},getFocusedElementIndex:function(){return t.listElements.indexOf(document.activeElement)},getListItemCount:function(){return t.listElements.length},getPrimaryTextAtIndex:function(i){return t.getPrimaryText(t.listElements[i])},hasCheckboxAtIndex:function(i){var r=t.listElements[i];return!!r.querySelector(y.CHECKBOX_SELECTOR)},hasRadioAtIndex:function(i){var r=t.listElements[i];return!!r.querySelector(y.RADIO_SELECTOR)},isCheckboxCheckedAtIndex:function(i){var r=t.listElements[i],o=r.querySelector(y.CHECKBOX_SELECTOR);return o.checked},isFocusInsideList:function(){return t.root!==document.activeElement&&t.root.contains(document.activeElement)},isRootFocused:function(){return document.activeElement===t.root},listItemAtIndexHasClass:function(i,r){return t.listElements[i].classList.contains(t.classNameMap[r])},notifyAction:function(i){t.emit(y.ACTION_EVENT,{index:i},!0)},notifySelectionChange:function(i){t.emit(y.SELECTION_CHANGE_EVENT,{changedIndices:i},!0)},removeClassForElementIndex:function(i,r){var o=t.listElements[i];o&&o.classList.remove(t.classNameMap[r])},setAttributeForElementIndex:function(i,r,o){var s=t.listElements[i];s&&s.setAttribute(r,o)},setCheckedCheckboxOrRadioAtIndex:function(i,r){var o=t.listElements[i],s=o.querySelector(y.CHECKBOX_RADIO_SELECTOR);s.checked=r;var u=document.createEvent("Event");u.initEvent("change",!0,!0),s.dispatchEvent(u)},setTabIndexForListItemChildren:function(i,r){var o=t.listElements[i],s=y.CHILD_ELEMENTS_TO_TOGGLE_TABINDEX;Array.prototype.forEach.call(o.querySelectorAll(s),function(u){u.setAttribute("tabindex",r)})}};return new ue(n)},e.prototype.ensureFocusable=function(){if(this.isEvolutionEnabled&&this.isInteractive&&!this.root.querySelector("."+this.classNameMap[A.LIST_ITEM_CLASS]+'[tabindex="0"]')){var t=this.initialFocusIndex();t!==-1&&(this.listElements[t].tabIndex=0)}},e.prototype.initialFocusIndex=function(){if(this.selectedIndex instanceof Array&&this.selectedIndex.length>0)return this.selectedIndex[0];if(typeof this.selectedIndex=="number"&&this.selectedIndex!==L.UNSET_INDEX)return this.selectedIndex;var t=this.root.querySelector("."+this.classNameMap[A.LIST_ITEM_CLASS]+":not(."+this.classNameMap[A.LIST_ITEM_DISABLED_CLASS]+")");return t===null?-1:this.getListItemIndex(t)},e.prototype.getListItemIndex=function(t){var n=Mt(t,"."+this.classNameMap[A.LIST_ITEM_CLASS]+", ."+this.classNameMap[A.ROOT]);return n&&it(n,"."+this.classNameMap[A.LIST_ITEM_CLASS])?this.listElements.indexOf(n):-1},e.prototype.handleFocusInEvent=function(t){var n=this.getListItemIndex(t.target);this.foundation.handleFocusIn(n)},e.prototype.handleFocusOutEvent=function(t){var n=this.getListItemIndex(t.target);this.foundation.handleFocusOut(n)},e.prototype.handleKeydownEvent=function(t){var n=this.getListItemIndex(t.target),i=t.target;this.foundation.handleKeydown(t,i.classList.contains(this.classNameMap[A.LIST_ITEM_CLASS]),n)},e.prototype.handleClickEvent=function(t){var n=this.getListItemIndex(t.target),i=t.target,r=!it(i,y.CHECKBOX_RADIO_SELECTOR);this.foundation.handleClick(n,r,t)},e})(T);/**
|
|
730
|
+
* @license
|
|
731
|
+
* Copyright 2016 Google Inc.
|
|
732
|
+
*
|
|
733
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
734
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
735
|
+
* in the Software without restriction, including without limitation the rights
|
|
736
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
737
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
738
|
+
* furnished to do so, subject to the following conditions:
|
|
739
|
+
*
|
|
740
|
+
* The above copyright notice and this permission notice shall be included in
|
|
741
|
+
* all copies or substantial portions of the Software.
|
|
742
|
+
*
|
|
743
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
744
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
745
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
746
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
747
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
748
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
749
|
+
* THE SOFTWARE.
|
|
750
|
+
*/var Wn={LABEL_FLOAT_ABOVE:"mdc-floating-label--float-above",LABEL_REQUIRED:"mdc-floating-label--required",LABEL_SHAKE:"mdc-floating-label--shake",ROOT:"mdc-floating-label"};/**
|
|
751
|
+
* @license
|
|
752
|
+
* Copyright 2016 Google Inc.
|
|
753
|
+
*
|
|
754
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
755
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
756
|
+
* in the Software without restriction, including without limitation the rights
|
|
757
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
758
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
759
|
+
* furnished to do so, subject to the following conditions:
|
|
760
|
+
*
|
|
761
|
+
* The above copyright notice and this permission notice shall be included in
|
|
762
|
+
* all copies or substantial portions of the Software.
|
|
763
|
+
*
|
|
764
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
765
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
766
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
767
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
768
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
769
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
770
|
+
* THE SOFTWARE.
|
|
771
|
+
*/var Je=(function(a){l.__extends(e,a);function e(t){var n=a.call(this,l.__assign(l.__assign({},e.defaultAdapter),t))||this;return n.shakeAnimationEndHandler=function(){n.handleShakeAnimationEnd()},n}return Object.defineProperty(e,"cssClasses",{get:function(){return Wn},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},getWidth:function(){return 0},registerInteractionHandler:function(){},deregisterInteractionHandler:function(){}}},enumerable:!1,configurable:!0}),e.prototype.init=function(){this.adapter.registerInteractionHandler("animationend",this.shakeAnimationEndHandler)},e.prototype.destroy=function(){this.adapter.deregisterInteractionHandler("animationend",this.shakeAnimationEndHandler)},e.prototype.getWidth=function(){return this.adapter.getWidth()},e.prototype.shake=function(t){var n=e.cssClasses.LABEL_SHAKE;t?this.adapter.addClass(n):this.adapter.removeClass(n)},e.prototype.float=function(t){var n=e.cssClasses,i=n.LABEL_FLOAT_ABOVE,r=n.LABEL_SHAKE;t?this.adapter.addClass(i):(this.adapter.removeClass(i),this.adapter.removeClass(r))},e.prototype.setRequired=function(t){var n=e.cssClasses.LABEL_REQUIRED;t?this.adapter.addClass(n):this.adapter.removeClass(n)},e.prototype.handleShakeAnimationEnd=function(){var t=e.cssClasses.LABEL_SHAKE;this.adapter.removeClass(t)},e})(C);/**
|
|
772
|
+
* @license
|
|
773
|
+
* Copyright 2016 Google Inc.
|
|
774
|
+
*
|
|
775
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
776
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
777
|
+
* in the Software without restriction, including without limitation the rights
|
|
778
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
779
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
780
|
+
* furnished to do so, subject to the following conditions:
|
|
781
|
+
*
|
|
782
|
+
* The above copyright notice and this permission notice shall be included in
|
|
783
|
+
* all copies or substantial portions of the Software.
|
|
784
|
+
*
|
|
785
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
786
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
787
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
788
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
789
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
790
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
791
|
+
* THE SOFTWARE.
|
|
792
|
+
*/var tn=(function(a){l.__extends(e,a);function e(){return a!==null&&a.apply(this,arguments)||this}return e.attachTo=function(t){return new e(t)},e.prototype.shake=function(t){this.foundation.shake(t)},e.prototype.float=function(t){this.foundation.float(t)},e.prototype.setRequired=function(t){this.foundation.setRequired(t)},e.prototype.getWidth=function(){return this.foundation.getWidth()},e.prototype.getDefaultFoundation=function(){var t=this,n={addClass:function(i){return t.root.classList.add(i)},removeClass:function(i){return t.root.classList.remove(i)},getWidth:function(){return pn(t.root)},registerInteractionHandler:function(i,r){return t.listen(i,r)},deregisterInteractionHandler:function(i,r){return t.unlisten(i,r)}};return new Je(n)},e})(T);/**
|
|
793
|
+
* @license
|
|
794
|
+
* Copyright 2017 Google Inc.
|
|
795
|
+
*
|
|
796
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
797
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
798
|
+
* in the Software without restriction, including without limitation the rights
|
|
799
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
800
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
801
|
+
* furnished to do so, subject to the following conditions:
|
|
802
|
+
*
|
|
803
|
+
* The above copyright notice and this permission notice shall be included in
|
|
804
|
+
* all copies or substantial portions of the Software.
|
|
805
|
+
*
|
|
806
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
807
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
808
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
809
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
810
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
811
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
812
|
+
* THE SOFTWARE.
|
|
813
|
+
*/var Gn={ROOT:"mdc-form-field"},jn={LABEL_SELECTOR:".mdc-form-field > label"};/**
|
|
814
|
+
* @license
|
|
815
|
+
* Copyright 2017 Google Inc.
|
|
816
|
+
*
|
|
817
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
818
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
819
|
+
* in the Software without restriction, including without limitation the rights
|
|
820
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
821
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
822
|
+
* furnished to do so, subject to the following conditions:
|
|
823
|
+
*
|
|
824
|
+
* The above copyright notice and this permission notice shall be included in
|
|
825
|
+
* all copies or substantial portions of the Software.
|
|
826
|
+
*
|
|
827
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
828
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
829
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
830
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
831
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
832
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
833
|
+
* THE SOFTWARE.
|
|
834
|
+
*/var xe=(function(a){l.__extends(e,a);function e(t){var n=a.call(this,l.__assign(l.__assign({},e.defaultAdapter),t))||this;return n.click=function(){n.handleClick()},n}return Object.defineProperty(e,"cssClasses",{get:function(){return Gn},enumerable:!1,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return jn},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{activateInputRipple:function(){},deactivateInputRipple:function(){},deregisterInteractionHandler:function(){},registerInteractionHandler:function(){}}},enumerable:!1,configurable:!0}),e.prototype.init=function(){this.adapter.registerInteractionHandler("click",this.click)},e.prototype.destroy=function(){this.adapter.deregisterInteractionHandler("click",this.click)},e.prototype.handleClick=function(){var t=this;this.adapter.activateInputRipple(),requestAnimationFrame(function(){t.adapter.deactivateInputRipple()})},e})(C);/**
|
|
835
|
+
* @license
|
|
836
|
+
* Copyright 2017 Google Inc.
|
|
837
|
+
*
|
|
838
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
839
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
840
|
+
* in the Software without restriction, including without limitation the rights
|
|
841
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
842
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
843
|
+
* furnished to do so, subject to the following conditions:
|
|
844
|
+
*
|
|
845
|
+
* The above copyright notice and this permission notice shall be included in
|
|
846
|
+
* all copies or substantial portions of the Software.
|
|
847
|
+
*
|
|
848
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
849
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
850
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
851
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
852
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
853
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
854
|
+
* THE SOFTWARE.
|
|
855
|
+
*/var de=(function(a){l.__extends(e,a);function e(){return a!==null&&a.apply(this,arguments)||this}return e.attachTo=function(t){return new e(t)},e.prototype.labelEl=function(){var t=xe.strings.LABEL_SELECTOR;return this.root.querySelector(t)},e.prototype.getDefaultFoundation=function(){var t=this,n={activateInputRipple:function(){t.input&&t.input.ripple&&t.input.ripple.activate()},deactivateInputRipple:function(){t.input&&t.input.ripple&&t.input.ripple.deactivate()},deregisterInteractionHandler:function(i,r){var o=t.labelEl();o&&o.removeEventListener(i,r)},registerInteractionHandler:function(i,r){var o=t.labelEl();o&&o.addEventListener(i,r)}};return new xe(n)},e})(T);/**
|
|
856
|
+
* @license
|
|
857
|
+
* Copyright 2018 Google Inc.
|
|
858
|
+
*
|
|
859
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
860
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
861
|
+
* in the Software without restriction, including without limitation the rights
|
|
862
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
863
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
864
|
+
* furnished to do so, subject to the following conditions:
|
|
865
|
+
*
|
|
866
|
+
* The above copyright notice and this permission notice shall be included in
|
|
867
|
+
* all copies or substantial portions of the Software.
|
|
868
|
+
*
|
|
869
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
870
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
871
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
872
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
873
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
874
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
875
|
+
* THE SOFTWARE.
|
|
876
|
+
*/var qt={ICON_BUTTON_ON:"mdc-icon-button--on",ROOT:"mdc-icon-button"},dt={ARIA_LABEL:"aria-label",ARIA_PRESSED:"aria-pressed",DATA_ARIA_LABEL_OFF:"data-aria-label-off",DATA_ARIA_LABEL_ON:"data-aria-label-on",CHANGE_EVENT:"MDCIconButtonToggle:change"};/**
|
|
877
|
+
* @license
|
|
878
|
+
* Copyright 2018 Google Inc.
|
|
879
|
+
*
|
|
880
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
881
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
882
|
+
* in the Software without restriction, including without limitation the rights
|
|
883
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
884
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
885
|
+
* furnished to do so, subject to the following conditions:
|
|
886
|
+
*
|
|
887
|
+
* The above copyright notice and this permission notice shall be included in
|
|
888
|
+
* all copies or substantial portions of the Software.
|
|
889
|
+
*
|
|
890
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
891
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
892
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
893
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
894
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
895
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
896
|
+
* THE SOFTWARE.
|
|
897
|
+
*/var en=(function(a){l.__extends(e,a);function e(t){var n=a.call(this,l.__assign(l.__assign({},e.defaultAdapter),t))||this;return n.hasToggledAriaLabel=!1,n}return Object.defineProperty(e,"cssClasses",{get:function(){return qt},enumerable:!1,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return dt},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},hasClass:function(){return!1},notifyChange:function(){},removeClass:function(){},getAttr:function(){return null},setAttr:function(){}}},enumerable:!1,configurable:!0}),e.prototype.init=function(){var t=this.adapter.getAttr(dt.DATA_ARIA_LABEL_ON),n=this.adapter.getAttr(dt.DATA_ARIA_LABEL_OFF);if(t&&n){if(this.adapter.getAttr(dt.ARIA_PRESSED)!==null)throw new Error("MDCIconButtonToggleFoundation: Button should not set `aria-pressed` if it has a toggled aria label.");this.hasToggledAriaLabel=!0}else this.adapter.setAttr(dt.ARIA_PRESSED,String(this.isOn()))},e.prototype.handleClick=function(){this.toggle(),this.adapter.notifyChange({isOn:this.isOn()})},e.prototype.isOn=function(){return this.adapter.hasClass(qt.ICON_BUTTON_ON)},e.prototype.toggle=function(t){if(t===void 0&&(t=!this.isOn()),t?this.adapter.addClass(qt.ICON_BUTTON_ON):this.adapter.removeClass(qt.ICON_BUTTON_ON),this.hasToggledAriaLabel){var n=t?this.adapter.getAttr(dt.DATA_ARIA_LABEL_ON):this.adapter.getAttr(dt.DATA_ARIA_LABEL_OFF);this.adapter.setAttr(dt.ARIA_LABEL,n||"")}else this.adapter.setAttr(dt.ARIA_PRESSED,""+t)},e})(C);/**
|
|
898
|
+
* @license
|
|
899
|
+
* Copyright 2018 Google Inc.
|
|
900
|
+
*
|
|
901
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
902
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
903
|
+
* in the Software without restriction, including without limitation the rights
|
|
904
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
905
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
906
|
+
* furnished to do so, subject to the following conditions:
|
|
907
|
+
*
|
|
908
|
+
* The above copyright notice and this permission notice shall be included in
|
|
909
|
+
* all copies or substantial portions of the Software.
|
|
910
|
+
*
|
|
911
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
912
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
913
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
914
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
915
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
916
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
917
|
+
* THE SOFTWARE.
|
|
918
|
+
*/var qn=en.strings,Xn=(function(a){l.__extends(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.rippleComponent=t.createRipple(),t}return e.attachTo=function(t){return new e(t)},e.prototype.initialSyncWithDOM=function(){var t=this;this.handleClick=function(){t.foundation.handleClick()},this.listen("click",this.handleClick)},e.prototype.destroy=function(){this.unlisten("click",this.handleClick),this.ripple.destroy(),a.prototype.destroy.call(this)},e.prototype.getDefaultFoundation=function(){var t=this,n={addClass:function(i){return t.root.classList.add(i)},hasClass:function(i){return t.root.classList.contains(i)},notifyChange:function(i){t.emit(qn.CHANGE_EVENT,i)},removeClass:function(i){return t.root.classList.remove(i)},getAttr:function(i){return t.root.getAttribute(i)},setAttr:function(i,r){return t.root.setAttribute(i,r)}};return new en(n)},Object.defineProperty(e.prototype,"ripple",{get:function(){return this.rippleComponent},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"on",{get:function(){return this.foundation.isOn()},set:function(t){this.foundation.toggle(t)},enumerable:!1,configurable:!0}),e.prototype.createRipple=function(){var t=new D(this.root);return t.unbounded=!0,t},e})(T);/**
|
|
919
|
+
* @license
|
|
920
|
+
* Copyright 2018 Google Inc.
|
|
921
|
+
*
|
|
922
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
923
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
924
|
+
* in the Software without restriction, including without limitation the rights
|
|
925
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
926
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
927
|
+
* furnished to do so, subject to the following conditions:
|
|
928
|
+
*
|
|
929
|
+
* The above copyright notice and this permission notice shall be included in
|
|
930
|
+
* all copies or substantial portions of the Software.
|
|
931
|
+
*
|
|
932
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
933
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
934
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
935
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
936
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
937
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
938
|
+
* THE SOFTWARE.
|
|
939
|
+
*/var Ct={LINE_RIPPLE_ACTIVE:"mdc-line-ripple--active",LINE_RIPPLE_DEACTIVATING:"mdc-line-ripple--deactivating"};/**
|
|
940
|
+
* @license
|
|
941
|
+
* Copyright 2018 Google Inc.
|
|
942
|
+
*
|
|
943
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
944
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
945
|
+
* in the Software without restriction, including without limitation the rights
|
|
946
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
947
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
948
|
+
* furnished to do so, subject to the following conditions:
|
|
949
|
+
*
|
|
950
|
+
* The above copyright notice and this permission notice shall be included in
|
|
951
|
+
* all copies or substantial portions of the Software.
|
|
952
|
+
*
|
|
953
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
954
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
955
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
956
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
957
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
958
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
959
|
+
* THE SOFTWARE.
|
|
960
|
+
*/var zn=(function(a){l.__extends(e,a);function e(t){var n=a.call(this,l.__assign(l.__assign({},e.defaultAdapter),t))||this;return n.transitionEndHandler=function(i){n.handleTransitionEnd(i)},n}return Object.defineProperty(e,"cssClasses",{get:function(){return Ct},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!1},setStyle:function(){},registerEventHandler:function(){},deregisterEventHandler:function(){}}},enumerable:!1,configurable:!0}),e.prototype.init=function(){this.adapter.registerEventHandler("transitionend",this.transitionEndHandler)},e.prototype.destroy=function(){this.adapter.deregisterEventHandler("transitionend",this.transitionEndHandler)},e.prototype.activate=function(){this.adapter.removeClass(Ct.LINE_RIPPLE_DEACTIVATING),this.adapter.addClass(Ct.LINE_RIPPLE_ACTIVE)},e.prototype.setRippleCenter=function(t){this.adapter.setStyle("transform-origin",t+"px center")},e.prototype.deactivate=function(){this.adapter.addClass(Ct.LINE_RIPPLE_DEACTIVATING)},e.prototype.handleTransitionEnd=function(t){var n=this.adapter.hasClass(Ct.LINE_RIPPLE_DEACTIVATING);t.propertyName==="opacity"&&n&&(this.adapter.removeClass(Ct.LINE_RIPPLE_ACTIVE),this.adapter.removeClass(Ct.LINE_RIPPLE_DEACTIVATING))},e})(C);/**
|
|
961
|
+
* @license
|
|
962
|
+
* Copyright 2018 Google Inc.
|
|
963
|
+
*
|
|
964
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
965
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
966
|
+
* in the Software without restriction, including without limitation the rights
|
|
967
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
968
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
969
|
+
* furnished to do so, subject to the following conditions:
|
|
970
|
+
*
|
|
971
|
+
* The above copyright notice and this permission notice shall be included in
|
|
972
|
+
* all copies or substantial portions of the Software.
|
|
973
|
+
*
|
|
974
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
975
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
976
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
977
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
978
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
979
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
980
|
+
* THE SOFTWARE.
|
|
981
|
+
*/var nn=(function(a){l.__extends(e,a);function e(){return a!==null&&a.apply(this,arguments)||this}return e.attachTo=function(t){return new e(t)},e.prototype.activate=function(){this.foundation.activate()},e.prototype.deactivate=function(){this.foundation.deactivate()},e.prototype.setRippleCenter=function(t){this.foundation.setRippleCenter(t)},e.prototype.getDefaultFoundation=function(){var t=this,n={addClass:function(i){return t.root.classList.add(i)},removeClass:function(i){return t.root.classList.remove(i)},hasClass:function(i){return t.root.classList.contains(i)},setStyle:function(i,r){return t.root.style.setProperty(i,r)},registerEventHandler:function(i,r){return t.listen(i,r)},deregisterEventHandler:function(i,r){return t.unlisten(i,r)}};return new zn(n)},e})(T);/**
|
|
982
|
+
* @license
|
|
983
|
+
* Copyright 2018 Google Inc.
|
|
984
|
+
*
|
|
985
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
986
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
987
|
+
* in the Software without restriction, including without limitation the rights
|
|
988
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
989
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
990
|
+
* furnished to do so, subject to the following conditions:
|
|
991
|
+
*
|
|
992
|
+
* The above copyright notice and this permission notice shall be included in
|
|
993
|
+
* all copies or substantial portions of the Software.
|
|
994
|
+
*
|
|
995
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
996
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
997
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
998
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
999
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
1000
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
1001
|
+
* THE SOFTWARE.
|
|
1002
|
+
*/var Vt={ANCHOR:"mdc-menu-surface--anchor",ANIMATING_CLOSED:"mdc-menu-surface--animating-closed",ANIMATING_OPEN:"mdc-menu-surface--animating-open",FIXED:"mdc-menu-surface--fixed",IS_OPEN_BELOW:"mdc-menu-surface--is-open-below",OPEN:"mdc-menu-surface--open",ROOT:"mdc-menu-surface"},ot={CLOSED_EVENT:"MDCMenuSurface:closed",CLOSING_EVENT:"MDCMenuSurface:closing",OPENED_EVENT:"MDCMenuSurface:opened",OPENING_EVENT:"MDCMenuSurface:opening",FOCUSABLE_ELEMENTS:["button:not(:disabled)",'[href]:not([aria-disabled="true"])',"input:not(:disabled)","select:not(:disabled)","textarea:not(:disabled)",'[tabindex]:not([tabindex="-1"]):not([aria-disabled="true"])'].join(", ")},Bt={TRANSITION_OPEN_DURATION:120,TRANSITION_CLOSE_DURATION:75,MARGIN_TO_EDGE:32,ANCHOR_TO_MENU_SURFACE_WIDTH_RATIO:.67,TOUCH_EVENT_WAIT_MS:30},M;(function(a){a[a.BOTTOM=1]="BOTTOM",a[a.CENTER=2]="CENTER",a[a.RIGHT=4]="RIGHT",a[a.FLIP_RTL=8]="FLIP_RTL"})(M||(M={}));var _t;(function(a){a[a.TOP_LEFT=0]="TOP_LEFT",a[a.TOP_RIGHT=4]="TOP_RIGHT",a[a.BOTTOM_LEFT=1]="BOTTOM_LEFT",a[a.BOTTOM_RIGHT=5]="BOTTOM_RIGHT",a[a.TOP_START=8]="TOP_START",a[a.TOP_END=12]="TOP_END",a[a.BOTTOM_START=9]="BOTTOM_START",a[a.BOTTOM_END=13]="BOTTOM_END"})(_t||(_t={}));/**
|
|
1003
|
+
* @license
|
|
1004
|
+
* Copyright 2018 Google Inc.
|
|
1005
|
+
*
|
|
1006
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
1007
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
1008
|
+
* in the Software without restriction, including without limitation the rights
|
|
1009
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
1010
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
1011
|
+
* furnished to do so, subject to the following conditions:
|
|
1012
|
+
*
|
|
1013
|
+
* The above copyright notice and this permission notice shall be included in
|
|
1014
|
+
* all copies or substantial portions of the Software.
|
|
1015
|
+
*
|
|
1016
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
1017
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
1018
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
1019
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
1020
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
1021
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
1022
|
+
* THE SOFTWARE.
|
|
1023
|
+
*/var At=(function(a){l.__extends(e,a);function e(t){var n=a.call(this,l.__assign(l.__assign({},e.defaultAdapter),t))||this;return n.isSurfaceOpen=!1,n.isQuickOpen=!1,n.isHoistedElement=!1,n.isFixedPosition=!1,n.isHorizontallyCenteredOnViewport=!1,n.maxHeight=0,n.openBottomBias=0,n.openAnimationEndTimerId=0,n.closeAnimationEndTimerId=0,n.animationRequestId=0,n.anchorCorner=_t.TOP_START,n.originCorner=_t.TOP_START,n.anchorMargin={top:0,right:0,bottom:0,left:0},n.position={x:0,y:0},n}return Object.defineProperty(e,"cssClasses",{get:function(){return Vt},enumerable:!1,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return ot},enumerable:!1,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return Bt},enumerable:!1,configurable:!0}),Object.defineProperty(e,"Corner",{get:function(){return _t},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!1},hasAnchor:function(){return!1},isElementInContainer:function(){return!1},isFocused:function(){return!1},isRtl:function(){return!1},getInnerDimensions:function(){return{height:0,width:0}},getAnchorDimensions:function(){return null},getWindowDimensions:function(){return{height:0,width:0}},getBodyDimensions:function(){return{height:0,width:0}},getWindowScroll:function(){return{x:0,y:0}},setPosition:function(){},setMaxHeight:function(){},setTransformOrigin:function(){},saveFocus:function(){},restoreFocus:function(){},notifyClose:function(){},notifyClosing:function(){},notifyOpen:function(){},notifyOpening:function(){}}},enumerable:!1,configurable:!0}),e.prototype.init=function(){var t=e.cssClasses,n=t.ROOT,i=t.OPEN;if(!this.adapter.hasClass(n))throw new Error(n+" class required in root element.");this.adapter.hasClass(i)&&(this.isSurfaceOpen=!0)},e.prototype.destroy=function(){clearTimeout(this.openAnimationEndTimerId),clearTimeout(this.closeAnimationEndTimerId),cancelAnimationFrame(this.animationRequestId)},e.prototype.setAnchorCorner=function(t){this.anchorCorner=t},e.prototype.flipCornerHorizontally=function(){this.originCorner=this.originCorner^M.RIGHT},e.prototype.setAnchorMargin=function(t){this.anchorMargin.top=t.top||0,this.anchorMargin.right=t.right||0,this.anchorMargin.bottom=t.bottom||0,this.anchorMargin.left=t.left||0},e.prototype.setIsHoisted=function(t){this.isHoistedElement=t},e.prototype.setFixedPosition=function(t){this.isFixedPosition=t},e.prototype.isFixed=function(){return this.isFixedPosition},e.prototype.setAbsolutePosition=function(t,n){this.position.x=this.isFinite(t)?t:0,this.position.y=this.isFinite(n)?n:0},e.prototype.setIsHorizontallyCenteredOnViewport=function(t){this.isHorizontallyCenteredOnViewport=t},e.prototype.setQuickOpen=function(t){this.isQuickOpen=t},e.prototype.setMaxHeight=function(t){this.maxHeight=t},e.prototype.setOpenBottomBias=function(t){this.openBottomBias=t},e.prototype.isOpen=function(){return this.isSurfaceOpen},e.prototype.open=function(){var t=this;this.isSurfaceOpen||(this.adapter.notifyOpening(),this.adapter.saveFocus(),this.isQuickOpen?(this.isSurfaceOpen=!0,this.adapter.addClass(e.cssClasses.OPEN),this.dimensions=this.adapter.getInnerDimensions(),this.autoposition(),this.adapter.notifyOpen()):(this.adapter.addClass(e.cssClasses.ANIMATING_OPEN),this.animationRequestId=requestAnimationFrame(function(){t.dimensions=t.adapter.getInnerDimensions(),t.autoposition(),t.adapter.addClass(e.cssClasses.OPEN),t.openAnimationEndTimerId=setTimeout(function(){t.openAnimationEndTimerId=0,t.adapter.removeClass(e.cssClasses.ANIMATING_OPEN),t.adapter.notifyOpen()},Bt.TRANSITION_OPEN_DURATION)}),this.isSurfaceOpen=!0))},e.prototype.close=function(t){var n=this;if(t===void 0&&(t=!1),!!this.isSurfaceOpen){if(this.adapter.notifyClosing(),this.isQuickOpen){this.isSurfaceOpen=!1,t||this.maybeRestoreFocus(),this.adapter.removeClass(e.cssClasses.OPEN),this.adapter.removeClass(e.cssClasses.IS_OPEN_BELOW),this.adapter.notifyClose();return}this.adapter.addClass(e.cssClasses.ANIMATING_CLOSED),requestAnimationFrame(function(){n.adapter.removeClass(e.cssClasses.OPEN),n.adapter.removeClass(e.cssClasses.IS_OPEN_BELOW),n.closeAnimationEndTimerId=setTimeout(function(){n.closeAnimationEndTimerId=0,n.adapter.removeClass(e.cssClasses.ANIMATING_CLOSED),n.adapter.notifyClose()},Bt.TRANSITION_CLOSE_DURATION)}),this.isSurfaceOpen=!1,t||this.maybeRestoreFocus()}},e.prototype.handleBodyClick=function(t){var n=t.target;this.adapter.isElementInContainer(n)||this.close()},e.prototype.handleKeydown=function(t){var n=t.keyCode,i=t.key,r=i==="Escape"||n===27;r&&this.close()},e.prototype.autoposition=function(){var t;this.measurements=this.getAutoLayoutmeasurements();var n=this.getoriginCorner(),i=this.getMenuSurfaceMaxHeight(n),r=this.hasBit(n,M.BOTTOM)?"bottom":"top",o=this.hasBit(n,M.RIGHT)?"right":"left",s=this.getHorizontalOriginOffset(n),u=this.getVerticalOriginOffset(n),c=this.measurements,h=c.anchorSize,E=c.surfaceSize,p=(t={},t[o]=s,t[r]=u,t);h.width/E.width>Bt.ANCHOR_TO_MENU_SURFACE_WIDTH_RATIO&&(o="center"),(this.isHoistedElement||this.isFixedPosition)&&this.adjustPositionForHoistedElement(p),this.adapter.setTransformOrigin(o+" "+r),this.adapter.setPosition(p),this.adapter.setMaxHeight(i?i+"px":""),this.hasBit(n,M.BOTTOM)||this.adapter.addClass(e.cssClasses.IS_OPEN_BELOW)},e.prototype.getAutoLayoutmeasurements=function(){var t=this.adapter.getAnchorDimensions(),n=this.adapter.getBodyDimensions(),i=this.adapter.getWindowDimensions(),r=this.adapter.getWindowScroll();return t||(t={top:this.position.y,right:this.position.x,bottom:this.position.y,left:this.position.x,width:0,height:0}),{anchorSize:t,bodySize:n,surfaceSize:this.dimensions,viewportDistance:{top:t.top,right:i.width-t.right,bottom:i.height-t.bottom,left:t.left},viewportSize:i,windowScroll:r}},e.prototype.getoriginCorner=function(){var t=this.originCorner,n=this.measurements,i=n.viewportDistance,r=n.anchorSize,o=n.surfaceSize,s=e.numbers.MARGIN_TO_EDGE,u=this.hasBit(this.anchorCorner,M.BOTTOM),c,h;u?(c=i.top-s+this.anchorMargin.bottom,h=i.bottom-s-this.anchorMargin.bottom):(c=i.top-s+this.anchorMargin.top,h=i.bottom-s+r.height-this.anchorMargin.top);var E=h-o.height>0;!E&&c>h+this.openBottomBias&&(t=this.setBit(t,M.BOTTOM));var p=this.adapter.isRtl(),f=this.hasBit(this.anchorCorner,M.FLIP_RTL),v=this.hasBit(this.anchorCorner,M.RIGHT)||this.hasBit(t,M.RIGHT),S=!1;p&&f?S=!v:S=v;var K,W;S?(K=i.left+r.width+this.anchorMargin.right,W=i.right-this.anchorMargin.right):(K=i.left+this.anchorMargin.left,W=i.right+r.width-this.anchorMargin.left);var _=K-o.width>0,V=W-o.width>0,P=this.hasBit(t,M.FLIP_RTL)&&this.hasBit(t,M.RIGHT);return V&&P&&p||!_&&P?t=this.unsetBit(t,M.RIGHT):(_&&S&&p||_&&!S&&v||!V&&K>=W)&&(t=this.setBit(t,M.RIGHT)),t},e.prototype.getMenuSurfaceMaxHeight=function(t){if(this.maxHeight>0)return this.maxHeight;var n=this.measurements.viewportDistance,i=0,r=this.hasBit(t,M.BOTTOM),o=this.hasBit(this.anchorCorner,M.BOTTOM),s=e.numbers.MARGIN_TO_EDGE;return r?(i=n.top+this.anchorMargin.top-s,o||(i+=this.measurements.anchorSize.height)):(i=n.bottom-this.anchorMargin.bottom+this.measurements.anchorSize.height-s,o&&(i-=this.measurements.anchorSize.height)),i},e.prototype.getHorizontalOriginOffset=function(t){var n=this.measurements.anchorSize,i=this.hasBit(t,M.RIGHT),r=this.hasBit(this.anchorCorner,M.RIGHT);if(i){var o=r?n.width-this.anchorMargin.left:this.anchorMargin.right;return this.isHoistedElement||this.isFixedPosition?o-(this.measurements.viewportSize.width-this.measurements.bodySize.width):o}return r?n.width-this.anchorMargin.right:this.anchorMargin.left},e.prototype.getVerticalOriginOffset=function(t){var n=this.measurements.anchorSize,i=this.hasBit(t,M.BOTTOM),r=this.hasBit(this.anchorCorner,M.BOTTOM),o=0;return i?o=r?n.height-this.anchorMargin.top:-this.anchorMargin.bottom:o=r?n.height+this.anchorMargin.bottom:this.anchorMargin.top,o},e.prototype.adjustPositionForHoistedElement=function(t){var n,i,r=this.measurements,o=r.windowScroll,s=r.viewportDistance,u=r.surfaceSize,c=r.viewportSize,h=Object.keys(t);try{for(var E=l.__values(h),p=E.next();!p.done;p=E.next()){var f=p.value,v=t[f]||0;if(this.isHorizontallyCenteredOnViewport&&(f==="left"||f==="right")){t[f]=(c.width-u.width)/2;continue}v+=s[f],this.isFixedPosition||(f==="top"?v+=o.y:f==="bottom"?v-=o.y:f==="left"?v+=o.x:v-=o.x),t[f]=v}}catch(S){n={error:S}}finally{try{p&&!p.done&&(i=E.return)&&i.call(E)}finally{if(n)throw n.error}}},e.prototype.maybeRestoreFocus=function(){var t=this,n=this.adapter.isFocused(),i=this.adapter.getOwnerDocument?this.adapter.getOwnerDocument():document,r=i.activeElement&&this.adapter.isElementInContainer(i.activeElement);(n||r)&&setTimeout(function(){t.adapter.restoreFocus()},Bt.TOUCH_EVENT_WAIT_MS)},e.prototype.hasBit=function(t,n){return!!(t&n)},e.prototype.setBit=function(t,n){return t|n},e.prototype.unsetBit=function(t,n){return t^n},e.prototype.isFinite=function(t){return typeof t=="number"&&isFinite(t)},e})(C);/**
|
|
1024
|
+
* @license
|
|
1025
|
+
* Copyright 2018 Google Inc.
|
|
1026
|
+
*
|
|
1027
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
1028
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
1029
|
+
* in the Software without restriction, including without limitation the rights
|
|
1030
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
1031
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
1032
|
+
* furnished to do so, subject to the following conditions:
|
|
1033
|
+
*
|
|
1034
|
+
* The above copyright notice and this permission notice shall be included in
|
|
1035
|
+
* all copies or substantial portions of the Software.
|
|
1036
|
+
*
|
|
1037
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
1038
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
1039
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
1040
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
1041
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
1042
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
1043
|
+
* THE SOFTWARE.
|
|
1044
|
+
*/var rn=(function(a){l.__extends(e,a);function e(){return a!==null&&a.apply(this,arguments)||this}return e.attachTo=function(t){return new e(t)},e.prototype.initialSyncWithDOM=function(){var t=this,n=this.root.parentElement;this.anchorElement=n&&n.classList.contains(Vt.ANCHOR)?n:null,this.root.classList.contains(Vt.FIXED)&&this.setFixedPosition(!0),this.handleKeydown=function(i){t.foundation.handleKeydown(i)},this.handleBodyClick=function(i){t.foundation.handleBodyClick(i)},this.registerBodyClickListener=function(){document.body.addEventListener("click",t.handleBodyClick,{capture:!0})},this.deregisterBodyClickListener=function(){document.body.removeEventListener("click",t.handleBodyClick,{capture:!0})},this.listen("keydown",this.handleKeydown),this.listen(ot.OPENED_EVENT,this.registerBodyClickListener),this.listen(ot.CLOSED_EVENT,this.deregisterBodyClickListener)},e.prototype.destroy=function(){this.unlisten("keydown",this.handleKeydown),this.unlisten(ot.OPENED_EVENT,this.registerBodyClickListener),this.unlisten(ot.CLOSED_EVENT,this.deregisterBodyClickListener),a.prototype.destroy.call(this)},e.prototype.isOpen=function(){return this.foundation.isOpen()},e.prototype.open=function(){this.foundation.open()},e.prototype.close=function(t){t===void 0&&(t=!1),this.foundation.close(t)},Object.defineProperty(e.prototype,"quickOpen",{set:function(t){this.foundation.setQuickOpen(t)},enumerable:!1,configurable:!0}),e.prototype.setIsHoisted=function(t){this.foundation.setIsHoisted(t)},e.prototype.setMenuSurfaceAnchorElement=function(t){this.anchorElement=t},e.prototype.setFixedPosition=function(t){t?this.root.classList.add(Vt.FIXED):this.root.classList.remove(Vt.FIXED),this.foundation.setFixedPosition(t)},e.prototype.setAbsolutePosition=function(t,n){this.foundation.setAbsolutePosition(t,n),this.setIsHoisted(!0)},e.prototype.setAnchorCorner=function(t){this.foundation.setAnchorCorner(t)},e.prototype.setAnchorMargin=function(t){this.foundation.setAnchorMargin(t)},e.prototype.getDefaultFoundation=function(){var t=this,n={addClass:function(i){return t.root.classList.add(i)},removeClass:function(i){return t.root.classList.remove(i)},hasClass:function(i){return t.root.classList.contains(i)},hasAnchor:function(){return!!t.anchorElement},notifyClose:function(){return t.emit(At.strings.CLOSED_EVENT,{})},notifyClosing:function(){t.emit(At.strings.CLOSING_EVENT,{})},notifyOpen:function(){return t.emit(At.strings.OPENED_EVENT,{})},notifyOpening:function(){return t.emit(At.strings.OPENING_EVENT,{})},isElementInContainer:function(i){return t.root.contains(i)},isRtl:function(){return getComputedStyle(t.root).getPropertyValue("direction")==="rtl"},setTransformOrigin:function(i){var r=Yt(window,"transform")+"-origin";t.root.style.setProperty(r,i)},isFocused:function(){return document.activeElement===t.root},saveFocus:function(){t.previousFocus=document.activeElement},restoreFocus:function(){t.root.contains(document.activeElement)&&t.previousFocus&&t.previousFocus.focus&&t.previousFocus.focus()},getInnerDimensions:function(){return{width:t.root.offsetWidth,height:t.root.offsetHeight}},getAnchorDimensions:function(){return t.anchorElement?t.anchorElement.getBoundingClientRect():null},getWindowDimensions:function(){return{width:window.innerWidth,height:window.innerHeight}},getBodyDimensions:function(){return{width:document.body.clientWidth,height:document.body.clientHeight}},getWindowScroll:function(){return{x:window.pageXOffset,y:window.pageYOffset}},setPosition:function(i){var r=t.root;r.style.left="left"in i?i.left+"px":"",r.style.right="right"in i?i.right+"px":"",r.style.top="top"in i?i.top+"px":"",r.style.bottom="bottom"in i?i.bottom+"px":""},setMaxHeight:function(i){t.root.style.maxHeight=i}};return new At(n)},e})(T);/**
|
|
1045
|
+
* @license
|
|
1046
|
+
* Copyright 2018 Google Inc.
|
|
1047
|
+
*
|
|
1048
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
1049
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
1050
|
+
* in the Software without restriction, including without limitation the rights
|
|
1051
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
1052
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
1053
|
+
* furnished to do so, subject to the following conditions:
|
|
1054
|
+
*
|
|
1055
|
+
* The above copyright notice and this permission notice shall be included in
|
|
1056
|
+
* all copies or substantial portions of the Software.
|
|
1057
|
+
*
|
|
1058
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
1059
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
1060
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
1061
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
1062
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
1063
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
1064
|
+
* THE SOFTWARE.
|
|
1065
|
+
*/var wt={MENU_SELECTED_LIST_ITEM:"mdc-menu-item--selected",MENU_SELECTION_GROUP:"mdc-menu__selection-group",ROOT:"mdc-menu"},et={ARIA_CHECKED_ATTR:"aria-checked",ARIA_DISABLED_ATTR:"aria-disabled",CHECKBOX_SELECTOR:'input[type="checkbox"]',LIST_SELECTOR:".mdc-list,.mdc-deprecated-list",SELECTED_EVENT:"MDCMenu:selected",SKIP_RESTORE_FOCUS:"data-menu-item-skip-restore-focus"},Yn={FOCUS_ROOT_INDEX:-1},xt;(function(a){a[a.NONE=0]="NONE",a[a.LIST_ROOT=1]="LIST_ROOT",a[a.FIRST_ITEM=2]="FIRST_ITEM",a[a.LAST_ITEM=3]="LAST_ITEM"})(xt||(xt={}));/**
|
|
1066
|
+
* @license
|
|
1067
|
+
* Copyright 2018 Google Inc.
|
|
1068
|
+
*
|
|
1069
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
1070
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
1071
|
+
* in the Software without restriction, including without limitation the rights
|
|
1072
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
1073
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
1074
|
+
* furnished to do so, subject to the following conditions:
|
|
1075
|
+
*
|
|
1076
|
+
* The above copyright notice and this permission notice shall be included in
|
|
1077
|
+
* all copies or substantial portions of the Software.
|
|
1078
|
+
*
|
|
1079
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
1080
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
1081
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
1082
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
1083
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
1084
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
1085
|
+
* THE SOFTWARE.
|
|
1086
|
+
*/var $n=(function(a){l.__extends(e,a);function e(t){var n=a.call(this,l.__assign(l.__assign({},e.defaultAdapter),t))||this;return n.closeAnimationEndTimerId=0,n.defaultFocusState=xt.LIST_ROOT,n.selectedIndex=-1,n}return Object.defineProperty(e,"cssClasses",{get:function(){return wt},enumerable:!1,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return et},enumerable:!1,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return Yn},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClassToElementAtIndex:function(){},removeClassFromElementAtIndex:function(){},addAttributeToElementAtIndex:function(){},removeAttributeFromElementAtIndex:function(){},getAttributeFromElementAtIndex:function(){return null},elementContainsClass:function(){return!1},closeSurface:function(){},getElementIndex:function(){return-1},notifySelected:function(){},getMenuItemCount:function(){return 0},focusItemAtIndex:function(){},focusListRoot:function(){},getSelectedSiblingOfItemAtIndex:function(){return-1},isSelectableItemAtIndex:function(){return!1}}},enumerable:!1,configurable:!0}),e.prototype.destroy=function(){this.closeAnimationEndTimerId&&clearTimeout(this.closeAnimationEndTimerId),this.adapter.closeSurface()},e.prototype.handleKeydown=function(t){var n=t.key,i=t.keyCode,r=n==="Tab"||i===9;r&&this.adapter.closeSurface(!0)},e.prototype.handleItemAction=function(t){var n=this,i=this.adapter.getElementIndex(t);if(!(i<0)){this.adapter.notifySelected({index:i});var r=this.adapter.getAttributeFromElementAtIndex(i,et.SKIP_RESTORE_FOCUS)==="true";this.adapter.closeSurface(r),this.closeAnimationEndTimerId=setTimeout(function(){var o=n.adapter.getElementIndex(t);o>=0&&n.adapter.isSelectableItemAtIndex(o)&&n.setSelectedIndex(o)},At.numbers.TRANSITION_CLOSE_DURATION)}},e.prototype.handleMenuSurfaceOpened=function(){switch(this.defaultFocusState){case xt.FIRST_ITEM:this.adapter.focusItemAtIndex(0);break;case xt.LAST_ITEM:this.adapter.focusItemAtIndex(this.adapter.getMenuItemCount()-1);break;case xt.NONE:break;default:this.adapter.focusListRoot();break}},e.prototype.setDefaultFocusState=function(t){this.defaultFocusState=t},e.prototype.getSelectedIndex=function(){return this.selectedIndex},e.prototype.setSelectedIndex=function(t){if(this.validatedIndex(t),!this.adapter.isSelectableItemAtIndex(t))throw new Error("MDCMenuFoundation: No selection group at specified index.");var n=this.adapter.getSelectedSiblingOfItemAtIndex(t);n>=0&&(this.adapter.removeAttributeFromElementAtIndex(n,et.ARIA_CHECKED_ATTR),this.adapter.removeClassFromElementAtIndex(n,wt.MENU_SELECTED_LIST_ITEM)),this.adapter.addClassToElementAtIndex(t,wt.MENU_SELECTED_LIST_ITEM),this.adapter.addAttributeToElementAtIndex(t,et.ARIA_CHECKED_ATTR,"true"),this.selectedIndex=t},e.prototype.setEnabled=function(t,n){this.validatedIndex(t),n?(this.adapter.removeClassFromElementAtIndex(t,A.LIST_ITEM_DISABLED_CLASS),this.adapter.addAttributeToElementAtIndex(t,et.ARIA_DISABLED_ATTR,"false")):(this.adapter.addClassToElementAtIndex(t,A.LIST_ITEM_DISABLED_CLASS),this.adapter.addAttributeToElementAtIndex(t,et.ARIA_DISABLED_ATTR,"true"))},e.prototype.validatedIndex=function(t){var n=this.adapter.getMenuItemCount(),i=t>=0&&t<n;if(!i)throw new Error("MDCMenuFoundation: No list item at specified index.")},e})(C);/**
|
|
1087
|
+
* @license
|
|
1088
|
+
* Copyright 2018 Google Inc.
|
|
1089
|
+
*
|
|
1090
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
1091
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
1092
|
+
* in the Software without restriction, including without limitation the rights
|
|
1093
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
1094
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
1095
|
+
* furnished to do so, subject to the following conditions:
|
|
1096
|
+
*
|
|
1097
|
+
* The above copyright notice and this permission notice shall be included in
|
|
1098
|
+
* all copies or substantial portions of the Software.
|
|
1099
|
+
*
|
|
1100
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
1101
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
1102
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
1103
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
1104
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
1105
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
1106
|
+
* THE SOFTWARE.
|
|
1107
|
+
*/var an=(function(a){l.__extends(e,a);function e(){return a!==null&&a.apply(this,arguments)||this}return e.attachTo=function(t){return new e(t)},e.prototype.initialize=function(t,n){t===void 0&&(t=function(i){return new rn(i)}),n===void 0&&(n=function(i){return new Ze(i)}),this.menuSurfaceFactory=t,this.listFactory=n},e.prototype.initialSyncWithDOM=function(){var t=this;this.menuSurface=this.menuSurfaceFactory(this.root);var n=this.root.querySelector(et.LIST_SELECTOR);n?(this.list=this.listFactory(n),this.list.wrapFocus=!0):this.list=null,this.handleKeydown=function(i){t.foundation.handleKeydown(i)},this.handleItemAction=function(i){t.foundation.handleItemAction(t.items[i.detail.index])},this.handleMenuSurfaceOpened=function(){t.foundation.handleMenuSurfaceOpened()},this.menuSurface.listen(At.strings.OPENED_EVENT,this.handleMenuSurfaceOpened),this.listen("keydown",this.handleKeydown),this.listen(ue.strings.ACTION_EVENT,this.handleItemAction)},e.prototype.destroy=function(){this.list&&this.list.destroy(),this.menuSurface.destroy(),this.menuSurface.unlisten(At.strings.OPENED_EVENT,this.handleMenuSurfaceOpened),this.unlisten("keydown",this.handleKeydown),this.unlisten(ue.strings.ACTION_EVENT,this.handleItemAction),a.prototype.destroy.call(this)},Object.defineProperty(e.prototype,"open",{get:function(){return this.menuSurface.isOpen()},set:function(t){t?this.menuSurface.open():this.menuSurface.close()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"wrapFocus",{get:function(){return this.list?this.list.wrapFocus:!1},set:function(t){this.list&&(this.list.wrapFocus=t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hasTypeahead",{set:function(t){this.list&&(this.list.hasTypeahead=t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"typeaheadInProgress",{get:function(){return this.list?this.list.typeaheadInProgress:!1},enumerable:!1,configurable:!0}),e.prototype.typeaheadMatchItem=function(t,n){return this.list?this.list.typeaheadMatchItem(t,n):-1},e.prototype.layout=function(){this.list&&this.list.layout()},Object.defineProperty(e.prototype,"items",{get:function(){return this.list?this.list.listElements:[]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"singleSelection",{set:function(t){this.list&&(this.list.singleSelection=t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"selectedIndex",{get:function(){return this.list?this.list.selectedIndex:L.UNSET_INDEX},set:function(t){this.list&&(this.list.selectedIndex=t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"quickOpen",{set:function(t){this.menuSurface.quickOpen=t},enumerable:!1,configurable:!0}),e.prototype.setDefaultFocusState=function(t){this.foundation.setDefaultFocusState(t)},e.prototype.setAnchorCorner=function(t){this.menuSurface.setAnchorCorner(t)},e.prototype.setAnchorMargin=function(t){this.menuSurface.setAnchorMargin(t)},e.prototype.setSelectedIndex=function(t){this.foundation.setSelectedIndex(t)},e.prototype.setEnabled=function(t,n){this.foundation.setEnabled(t,n)},e.prototype.getOptionByIndex=function(t){var n=this.items;return t<n.length?this.items[t]:null},e.prototype.getPrimaryTextAtIndex=function(t){var n=this.getOptionByIndex(t);return n&&this.list&&this.list.getPrimaryText(n)||""},e.prototype.setFixedPosition=function(t){this.menuSurface.setFixedPosition(t)},e.prototype.setIsHoisted=function(t){this.menuSurface.setIsHoisted(t)},e.prototype.setAbsolutePosition=function(t,n){this.menuSurface.setAbsolutePosition(t,n)},e.prototype.setAnchorElement=function(t){this.menuSurface.anchorElement=t},e.prototype.getDefaultFoundation=function(){var t=this,n={addClassToElementAtIndex:function(i,r){var o=t.items;o[i].classList.add(r)},removeClassFromElementAtIndex:function(i,r){var o=t.items;o[i].classList.remove(r)},addAttributeToElementAtIndex:function(i,r,o){var s=t.items;s[i].setAttribute(r,o)},removeAttributeFromElementAtIndex:function(i,r){var o=t.items;o[i].removeAttribute(r)},getAttributeFromElementAtIndex:function(i,r){var o=t.items;return o[i].getAttribute(r)},elementContainsClass:function(i,r){return i.classList.contains(r)},closeSurface:function(i){t.menuSurface.close(i)},getElementIndex:function(i){return t.items.indexOf(i)},notifySelected:function(i){t.emit(et.SELECTED_EVENT,{index:i.index,item:t.items[i.index]})},getMenuItemCount:function(){return t.items.length},focusItemAtIndex:function(i){t.items[i].focus()},focusListRoot:function(){t.root.querySelector(et.LIST_SELECTOR).focus()},isSelectableItemAtIndex:function(i){return!!Mt(t.items[i],"."+wt.MENU_SELECTION_GROUP)},getSelectedSiblingOfItemAtIndex:function(i){var r=Mt(t.items[i],"."+wt.MENU_SELECTION_GROUP),o=r.querySelector("."+wt.MENU_SELECTED_LIST_ITEM);return o?t.items.indexOf(o):-1}};return new $n(n)},e})(T);/**
|
|
1108
|
+
* @license
|
|
1109
|
+
* Copyright 2018 Google Inc.
|
|
1110
|
+
*
|
|
1111
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
1112
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
1113
|
+
* in the Software without restriction, including without limitation the rights
|
|
1114
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
1115
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
1116
|
+
* furnished to do so, subject to the following conditions:
|
|
1117
|
+
*
|
|
1118
|
+
* The above copyright notice and this permission notice shall be included in
|
|
1119
|
+
* all copies or substantial portions of the Software.
|
|
1120
|
+
*
|
|
1121
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
1122
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
1123
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
1124
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
1125
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
1126
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
1127
|
+
* THE SOFTWARE.
|
|
1128
|
+
*/var on={NOTCH_ELEMENT_SELECTOR:".mdc-notched-outline__notch"},Ne={NOTCH_ELEMENT_PADDING:8},le={NO_LABEL:"mdc-notched-outline--no-label",OUTLINE_NOTCHED:"mdc-notched-outline--notched",OUTLINE_UPGRADED:"mdc-notched-outline--upgraded"};/**
|
|
1129
|
+
* @license
|
|
1130
|
+
* Copyright 2017 Google Inc.
|
|
1131
|
+
*
|
|
1132
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
1133
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
1134
|
+
* in the Software without restriction, including without limitation the rights
|
|
1135
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
1136
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
1137
|
+
* furnished to do so, subject to the following conditions:
|
|
1138
|
+
*
|
|
1139
|
+
* The above copyright notice and this permission notice shall be included in
|
|
1140
|
+
* all copies or substantial portions of the Software.
|
|
1141
|
+
*
|
|
1142
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
1143
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
1144
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
1145
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
1146
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
1147
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
1148
|
+
* THE SOFTWARE.
|
|
1149
|
+
*/var Qn=(function(a){l.__extends(e,a);function e(t){return a.call(this,l.__assign(l.__assign({},e.defaultAdapter),t))||this}return Object.defineProperty(e,"strings",{get:function(){return on},enumerable:!1,configurable:!0}),Object.defineProperty(e,"cssClasses",{get:function(){return le},enumerable:!1,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return Ne},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},setNotchWidthProperty:function(){},removeNotchWidthProperty:function(){}}},enumerable:!1,configurable:!0}),e.prototype.notch=function(t){var n=e.cssClasses.OUTLINE_NOTCHED;t>0&&(t+=Ne.NOTCH_ELEMENT_PADDING),this.adapter.setNotchWidthProperty(t),this.adapter.addClass(n)},e.prototype.closeNotch=function(){var t=e.cssClasses.OUTLINE_NOTCHED;this.adapter.removeClass(t),this.adapter.removeNotchWidthProperty()},e})(C);/**
|
|
1150
|
+
* @license
|
|
1151
|
+
* Copyright 2017 Google Inc.
|
|
1152
|
+
*
|
|
1153
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
1154
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
1155
|
+
* in the Software without restriction, including without limitation the rights
|
|
1156
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
1157
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
1158
|
+
* furnished to do so, subject to the following conditions:
|
|
1159
|
+
*
|
|
1160
|
+
* The above copyright notice and this permission notice shall be included in
|
|
1161
|
+
* all copies or substantial portions of the Software.
|
|
1162
|
+
*
|
|
1163
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
1164
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
1165
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
1166
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
1167
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
1168
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
1169
|
+
* THE SOFTWARE.
|
|
1170
|
+
*/var sn=(function(a){l.__extends(e,a);function e(){return a!==null&&a.apply(this,arguments)||this}return e.attachTo=function(t){return new e(t)},e.prototype.initialSyncWithDOM=function(){this.notchElement=this.root.querySelector(on.NOTCH_ELEMENT_SELECTOR);var t=this.root.querySelector("."+Je.cssClasses.ROOT);t?(t.style.transitionDuration="0s",this.root.classList.add(le.OUTLINE_UPGRADED),requestAnimationFrame(function(){t.style.transitionDuration=""})):this.root.classList.add(le.NO_LABEL)},e.prototype.notch=function(t){this.foundation.notch(t)},e.prototype.closeNotch=function(){this.foundation.closeNotch()},e.prototype.getDefaultFoundation=function(){var t=this,n={addClass:function(i){return t.root.classList.add(i)},removeClass:function(i){return t.root.classList.remove(i)},setNotchWidthProperty:function(i){t.notchElement.style.setProperty("width",i+"px")},removeNotchWidthProperty:function(){t.notchElement.style.removeProperty("width")}};return new Qn(n)},e})(T);/**
|
|
1171
|
+
* @license
|
|
1172
|
+
* Copyright 2016 Google Inc.
|
|
1173
|
+
*
|
|
1174
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
1175
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
1176
|
+
* in the Software without restriction, including without limitation the rights
|
|
1177
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
1178
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
1179
|
+
* furnished to do so, subject to the following conditions:
|
|
1180
|
+
*
|
|
1181
|
+
* The above copyright notice and this permission notice shall be included in
|
|
1182
|
+
* all copies or substantial portions of the Software.
|
|
1183
|
+
*
|
|
1184
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
1185
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
1186
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
1187
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
1188
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
1189
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
1190
|
+
* THE SOFTWARE.
|
|
1191
|
+
*/var Zn={NATIVE_CONTROL_SELECTOR:".mdc-radio__native-control"},Jn={DISABLED:"mdc-radio--disabled",ROOT:"mdc-radio"};/**
|
|
1192
|
+
* @license
|
|
1193
|
+
* Copyright 2016 Google Inc.
|
|
1194
|
+
*
|
|
1195
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
1196
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
1197
|
+
* in the Software without restriction, including without limitation the rights
|
|
1198
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
1199
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
1200
|
+
* furnished to do so, subject to the following conditions:
|
|
1201
|
+
*
|
|
1202
|
+
* The above copyright notice and this permission notice shall be included in
|
|
1203
|
+
* all copies or substantial portions of the Software.
|
|
1204
|
+
*
|
|
1205
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
1206
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
1207
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
1208
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
1209
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
1210
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
1211
|
+
* THE SOFTWARE.
|
|
1212
|
+
*/var Me=(function(a){l.__extends(e,a);function e(t){return a.call(this,l.__assign(l.__assign({},e.defaultAdapter),t))||this}return Object.defineProperty(e,"cssClasses",{get:function(){return Jn},enumerable:!1,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return Zn},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},setNativeControlDisabled:function(){}}},enumerable:!1,configurable:!0}),e.prototype.setDisabled=function(t){var n=e.cssClasses.DISABLED;this.adapter.setNativeControlDisabled(t),t?this.adapter.addClass(n):this.adapter.removeClass(n)},e})(C);/**
|
|
1213
|
+
* @license
|
|
1214
|
+
* Copyright 2016 Google Inc.
|
|
1215
|
+
*
|
|
1216
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
1217
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
1218
|
+
* in the Software without restriction, including without limitation the rights
|
|
1219
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
1220
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
1221
|
+
* furnished to do so, subject to the following conditions:
|
|
1222
|
+
*
|
|
1223
|
+
* The above copyright notice and this permission notice shall be included in
|
|
1224
|
+
* all copies or substantial portions of the Software.
|
|
1225
|
+
*
|
|
1226
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
1227
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
1228
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
1229
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
1230
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
1231
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
1232
|
+
* THE SOFTWARE.
|
|
1233
|
+
*/var ti=(function(a){l.__extends(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.rippleSurface=t.createRipple(),t}return e.attachTo=function(t){return new e(t)},Object.defineProperty(e.prototype,"checked",{get:function(){return this.nativeControl.checked},set:function(t){this.nativeControl.checked=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"disabled",{get:function(){return this.nativeControl.disabled},set:function(t){this.foundation.setDisabled(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){return this.nativeControl.value},set:function(t){this.nativeControl.value=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ripple",{get:function(){return this.rippleSurface},enumerable:!1,configurable:!0}),e.prototype.destroy=function(){this.rippleSurface.destroy(),a.prototype.destroy.call(this)},e.prototype.getDefaultFoundation=function(){var t=this,n={addClass:function(i){return t.root.classList.add(i)},removeClass:function(i){return t.root.classList.remove(i)},setNativeControlDisabled:function(i){return t.nativeControl.disabled=i}};return new Me(n)},e.prototype.createRipple=function(){var t=this,n=l.__assign(l.__assign({},D.createAdapter(this)),{registerInteractionHandler:function(i,r){t.nativeControl.addEventListener(i,r,O())},deregisterInteractionHandler:function(i,r){t.nativeControl.removeEventListener(i,r,O())},isSurfaceActive:function(){return!1},isUnbounded:function(){return!0}});return new D(this.root,new pt(n))},Object.defineProperty(e.prototype,"nativeControl",{get:function(){var t=Me.strings.NATIVE_CONTROL_SELECTOR,n=this.root.querySelector(t);if(!n)throw new Error("Radio component requires a "+t+" element");return n},enumerable:!1,configurable:!0}),e})(T);/**
|
|
1234
|
+
* @license
|
|
1235
|
+
* Copyright 2016 Google Inc.
|
|
1236
|
+
*
|
|
1237
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
1238
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
1239
|
+
* in the Software without restriction, including without limitation the rights
|
|
1240
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
1241
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
1242
|
+
* furnished to do so, subject to the following conditions:
|
|
1243
|
+
*
|
|
1244
|
+
* The above copyright notice and this permission notice shall be included in
|
|
1245
|
+
* all copies or substantial portions of the Software.
|
|
1246
|
+
*
|
|
1247
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
1248
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
1249
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
1250
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
1251
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
1252
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
1253
|
+
* THE SOFTWARE.
|
|
1254
|
+
*/var b={ACTIVATED:"mdc-select--activated",DISABLED:"mdc-select--disabled",FOCUSED:"mdc-select--focused",INVALID:"mdc-select--invalid",MENU_INVALID:"mdc-select__menu--invalid",OUTLINED:"mdc-select--outlined",REQUIRED:"mdc-select--required",ROOT:"mdc-select",WITH_LEADING_ICON:"mdc-select--with-leading-icon"},U={ARIA_CONTROLS:"aria-controls",ARIA_DESCRIBEDBY:"aria-describedby",ARIA_SELECTED_ATTR:"aria-selected",CHANGE_EVENT:"MDCSelect:change",HIDDEN_INPUT_SELECTOR:'input[type="hidden"]',LABEL_SELECTOR:".mdc-floating-label",LEADING_ICON_SELECTOR:".mdc-select__icon",LINE_RIPPLE_SELECTOR:".mdc-line-ripple",MENU_SELECTOR:".mdc-select__menu",OUTLINE_SELECTOR:".mdc-notched-outline",SELECTED_TEXT_SELECTOR:".mdc-select__selected-text",SELECT_ANCHOR_SELECTOR:".mdc-select__anchor",VALUE_ATTR:"data-value"},Tt={LABEL_SCALE:.75,UNSET_INDEX:-1,CLICK_DEBOUNCE_TIMEOUT_MS:330};/**
|
|
1255
|
+
* @license
|
|
1256
|
+
* Copyright 2016 Google Inc.
|
|
1257
|
+
*
|
|
1258
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
1259
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
1260
|
+
* in the Software without restriction, including without limitation the rights
|
|
1261
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
1262
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
1263
|
+
* furnished to do so, subject to the following conditions:
|
|
1264
|
+
*
|
|
1265
|
+
* The above copyright notice and this permission notice shall be included in
|
|
1266
|
+
* all copies or substantial portions of the Software.
|
|
1267
|
+
*
|
|
1268
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
1269
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
1270
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
1271
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
1272
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
1273
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
1274
|
+
* THE SOFTWARE.
|
|
1275
|
+
*/var ei=(function(a){l.__extends(e,a);function e(t,n){n===void 0&&(n={});var i=a.call(this,l.__assign(l.__assign({},e.defaultAdapter),t))||this;return i.disabled=!1,i.isMenuOpen=!1,i.useDefaultValidation=!0,i.customValidity=!0,i.lastSelectedIndex=Tt.UNSET_INDEX,i.clickDebounceTimeout=0,i.recentlyClicked=!1,i.leadingIcon=n.leadingIcon,i.helperText=n.helperText,i}return Object.defineProperty(e,"cssClasses",{get:function(){return b},enumerable:!1,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return Tt},enumerable:!1,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return U},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!1},activateBottomLine:function(){},deactivateBottomLine:function(){},getSelectedIndex:function(){return-1},setSelectedIndex:function(){},hasLabel:function(){return!1},floatLabel:function(){},getLabelWidth:function(){return 0},setLabelRequired:function(){},hasOutline:function(){return!1},notchOutline:function(){},closeOutline:function(){},setRippleCenter:function(){},notifyChange:function(){},setSelectedText:function(){},isSelectAnchorFocused:function(){return!1},getSelectAnchorAttr:function(){return""},setSelectAnchorAttr:function(){},removeSelectAnchorAttr:function(){},addMenuClass:function(){},removeMenuClass:function(){},openMenu:function(){},closeMenu:function(){},getAnchorElement:function(){return null},setMenuAnchorElement:function(){},setMenuAnchorCorner:function(){},setMenuWrapFocus:function(){},focusMenuItemAtIndex:function(){},getMenuItemCount:function(){return 0},getMenuItemValues:function(){return[]},getMenuItemTextAtIndex:function(){return""},isTypeaheadInProgress:function(){return!1},typeaheadMatchItem:function(){return-1}}},enumerable:!1,configurable:!0}),e.prototype.getSelectedIndex=function(){return this.adapter.getSelectedIndex()},e.prototype.setSelectedIndex=function(t,n,i){n===void 0&&(n=!1),i===void 0&&(i=!1),!(t>=this.adapter.getMenuItemCount())&&(t===Tt.UNSET_INDEX?this.adapter.setSelectedText(""):this.adapter.setSelectedText(this.adapter.getMenuItemTextAtIndex(t).trim()),this.adapter.setSelectedIndex(t),n&&this.adapter.closeMenu(),!i&&this.lastSelectedIndex!==t&&this.handleChange(),this.lastSelectedIndex=t)},e.prototype.setValue=function(t,n){n===void 0&&(n=!1);var i=this.adapter.getMenuItemValues().indexOf(t);this.setSelectedIndex(i,!1,n)},e.prototype.getValue=function(){var t=this.adapter.getSelectedIndex(),n=this.adapter.getMenuItemValues();return t!==Tt.UNSET_INDEX?n[t]:""},e.prototype.getDisabled=function(){return this.disabled},e.prototype.setDisabled=function(t){this.disabled=t,this.disabled?(this.adapter.addClass(b.DISABLED),this.adapter.closeMenu()):this.adapter.removeClass(b.DISABLED),this.leadingIcon&&this.leadingIcon.setDisabled(this.disabled),this.disabled?this.adapter.removeSelectAnchorAttr("tabindex"):this.adapter.setSelectAnchorAttr("tabindex","0"),this.adapter.setSelectAnchorAttr("aria-disabled",this.disabled.toString())},e.prototype.openMenu=function(){this.adapter.addClass(b.ACTIVATED),this.adapter.openMenu(),this.isMenuOpen=!0,this.adapter.setSelectAnchorAttr("aria-expanded","true")},e.prototype.setHelperTextContent=function(t){this.helperText&&this.helperText.setContent(t)},e.prototype.layout=function(){if(this.adapter.hasLabel()){var t=this.getValue().length>0,n=this.adapter.hasClass(b.FOCUSED),i=t||n,r=this.adapter.hasClass(b.REQUIRED);this.notchOutline(i),this.adapter.floatLabel(i),this.adapter.setLabelRequired(r)}},e.prototype.layoutOptions=function(){var t=this.adapter.getMenuItemValues(),n=t.indexOf(this.getValue());this.setSelectedIndex(n,!1,!0)},e.prototype.handleMenuOpened=function(){if(this.adapter.getMenuItemValues().length!==0){var t=this.getSelectedIndex(),n=t>=0?t:0;this.adapter.focusMenuItemAtIndex(n)}},e.prototype.handleMenuClosing=function(){this.adapter.setSelectAnchorAttr("aria-expanded","false")},e.prototype.handleMenuClosed=function(){this.adapter.removeClass(b.ACTIVATED),this.isMenuOpen=!1,this.adapter.isSelectAnchorFocused()||this.blur()},e.prototype.handleChange=function(){this.layout(),this.adapter.notifyChange(this.getValue());var t=this.adapter.hasClass(b.REQUIRED);t&&this.useDefaultValidation&&this.setValid(this.isValid())},e.prototype.handleMenuItemAction=function(t){this.setSelectedIndex(t,!0)},e.prototype.handleFocus=function(){this.adapter.addClass(b.FOCUSED),this.layout(),this.adapter.activateBottomLine()},e.prototype.handleBlur=function(){this.isMenuOpen||this.blur()},e.prototype.handleClick=function(t){if(!(this.disabled||this.recentlyClicked)){if(this.setClickDebounceTimeout(),this.isMenuOpen){this.adapter.closeMenu();return}this.adapter.setRippleCenter(t),this.openMenu()}},e.prototype.handleKeydown=function(t){if(!(this.isMenuOpen||!this.adapter.hasClass(b.FOCUSED))){var n=N(t)===g.ENTER,i=N(t)===g.SPACEBAR,r=N(t)===g.ARROW_UP,o=N(t)===g.ARROW_DOWN,s=t.ctrlKey||t.metaKey;if(!s&&(!i&&t.key&&t.key.length===1||i&&this.adapter.isTypeaheadInProgress())){var u=i?" ":t.key,c=this.adapter.typeaheadMatchItem(u,this.getSelectedIndex());c>=0&&this.setSelectedIndex(c),t.preventDefault();return}!n&&!i&&!r&&!o||(this.openMenu(),t.preventDefault())}},e.prototype.notchOutline=function(t){if(this.adapter.hasOutline()){var n=this.adapter.hasClass(b.FOCUSED);if(t){var i=Tt.LABEL_SCALE,r=this.adapter.getLabelWidth()*i;this.adapter.notchOutline(r)}else n||this.adapter.closeOutline()}},e.prototype.setLeadingIconAriaLabel=function(t){this.leadingIcon&&this.leadingIcon.setAriaLabel(t)},e.prototype.setLeadingIconContent=function(t){this.leadingIcon&&this.leadingIcon.setContent(t)},e.prototype.getUseDefaultValidation=function(){return this.useDefaultValidation},e.prototype.setUseDefaultValidation=function(t){this.useDefaultValidation=t},e.prototype.setValid=function(t){this.useDefaultValidation||(this.customValidity=t),this.adapter.setSelectAnchorAttr("aria-invalid",(!t).toString()),t?(this.adapter.removeClass(b.INVALID),this.adapter.removeMenuClass(b.MENU_INVALID)):(this.adapter.addClass(b.INVALID),this.adapter.addMenuClass(b.MENU_INVALID)),this.syncHelperTextValidity(t)},e.prototype.isValid=function(){return this.useDefaultValidation&&this.adapter.hasClass(b.REQUIRED)&&!this.adapter.hasClass(b.DISABLED)?this.getSelectedIndex()!==Tt.UNSET_INDEX&&(this.getSelectedIndex()!==0||!!this.getValue()):this.customValidity},e.prototype.setRequired=function(t){t?this.adapter.addClass(b.REQUIRED):this.adapter.removeClass(b.REQUIRED),this.adapter.setSelectAnchorAttr("aria-required",t.toString()),this.adapter.setLabelRequired(t)},e.prototype.getRequired=function(){return this.adapter.getSelectAnchorAttr("aria-required")==="true"},e.prototype.init=function(){var t=this.adapter.getAnchorElement();t&&(this.adapter.setMenuAnchorElement(t),this.adapter.setMenuAnchorCorner(_t.BOTTOM_START)),this.adapter.setMenuWrapFocus(!1),this.setDisabled(this.adapter.hasClass(b.DISABLED)),this.syncHelperTextValidity(!this.adapter.hasClass(b.INVALID)),this.layout(),this.layoutOptions()},e.prototype.blur=function(){this.adapter.removeClass(b.FOCUSED),this.layout(),this.adapter.deactivateBottomLine();var t=this.adapter.hasClass(b.REQUIRED);t&&this.useDefaultValidation&&this.setValid(this.isValid())},e.prototype.syncHelperTextValidity=function(t){if(this.helperText){this.helperText.setValidity(t);var n=this.helperText.isVisible(),i=this.helperText.getId();n&&i?this.adapter.setSelectAnchorAttr(U.ARIA_DESCRIBEDBY,i):this.adapter.removeSelectAnchorAttr(U.ARIA_DESCRIBEDBY)}},e.prototype.setClickDebounceTimeout=function(){var t=this;clearTimeout(this.clickDebounceTimeout),this.clickDebounceTimeout=setTimeout(function(){t.recentlyClicked=!1},Tt.CLICK_DEBOUNCE_TIMEOUT_MS),this.recentlyClicked=!0},e})(C);/**
|
|
1276
|
+
* @license
|
|
1277
|
+
* Copyright 2018 Google Inc.
|
|
1278
|
+
*
|
|
1279
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
1280
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
1281
|
+
* in the Software without restriction, including without limitation the rights
|
|
1282
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
1283
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
1284
|
+
* furnished to do so, subject to the following conditions:
|
|
1285
|
+
*
|
|
1286
|
+
* The above copyright notice and this permission notice shall be included in
|
|
1287
|
+
* all copies or substantial portions of the Software.
|
|
1288
|
+
*
|
|
1289
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
1290
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
1291
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
1292
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
1293
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
1294
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
1295
|
+
* THE SOFTWARE.
|
|
1296
|
+
*/var yt={ARIA_HIDDEN:"aria-hidden",ROLE:"role"},ct={HELPER_TEXT_VALIDATION_MSG:"mdc-select-helper-text--validation-msg",HELPER_TEXT_VALIDATION_MSG_PERSISTENT:"mdc-select-helper-text--validation-msg-persistent"};/**
|
|
1297
|
+
* @license
|
|
1298
|
+
* Copyright 2018 Google Inc.
|
|
1299
|
+
*
|
|
1300
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
1301
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
1302
|
+
* in the Software without restriction, including without limitation the rights
|
|
1303
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
1304
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
1305
|
+
* furnished to do so, subject to the following conditions:
|
|
1306
|
+
*
|
|
1307
|
+
* The above copyright notice and this permission notice shall be included in
|
|
1308
|
+
* all copies or substantial portions of the Software.
|
|
1309
|
+
*
|
|
1310
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
1311
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
1312
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
1313
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
1314
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
1315
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
1316
|
+
* THE SOFTWARE.
|
|
1317
|
+
*/var ni=(function(a){l.__extends(e,a);function e(t){return a.call(this,l.__assign(l.__assign({},e.defaultAdapter),t))||this}return Object.defineProperty(e,"cssClasses",{get:function(){return ct},enumerable:!1,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return yt},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!1},setAttr:function(){},getAttr:function(){return null},removeAttr:function(){},setContent:function(){}}},enumerable:!1,configurable:!0}),e.prototype.getId=function(){return this.adapter.getAttr("id")},e.prototype.isVisible=function(){return this.adapter.getAttr(yt.ARIA_HIDDEN)!=="true"},e.prototype.setContent=function(t){this.adapter.setContent(t)},e.prototype.setValidation=function(t){t?this.adapter.addClass(ct.HELPER_TEXT_VALIDATION_MSG):this.adapter.removeClass(ct.HELPER_TEXT_VALIDATION_MSG)},e.prototype.setValidationMsgPersistent=function(t){t?this.adapter.addClass(ct.HELPER_TEXT_VALIDATION_MSG_PERSISTENT):this.adapter.removeClass(ct.HELPER_TEXT_VALIDATION_MSG_PERSISTENT)},e.prototype.getIsValidation=function(){return this.adapter.hasClass(ct.HELPER_TEXT_VALIDATION_MSG)},e.prototype.getIsValidationMsgPersistent=function(){return this.adapter.hasClass(ct.HELPER_TEXT_VALIDATION_MSG_PERSISTENT)},e.prototype.setValidity=function(t){var n=this.adapter.hasClass(ct.HELPER_TEXT_VALIDATION_MSG);if(n){var i=this.adapter.hasClass(ct.HELPER_TEXT_VALIDATION_MSG_PERSISTENT),r=!t||i;if(r){this.showToScreenReader(),t?this.adapter.removeAttr(yt.ROLE):this.adapter.setAttr(yt.ROLE,"alert");return}this.adapter.removeAttr(yt.ROLE),this.hide()}},e.prototype.showToScreenReader=function(){this.adapter.removeAttr(yt.ARIA_HIDDEN)},e.prototype.hide=function(){this.adapter.setAttr(yt.ARIA_HIDDEN,"true")},e})(C);/**
|
|
1318
|
+
* @license
|
|
1319
|
+
* Copyright 2018 Google Inc.
|
|
1320
|
+
*
|
|
1321
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
1322
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
1323
|
+
* in the Software without restriction, including without limitation the rights
|
|
1324
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
1325
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
1326
|
+
* furnished to do so, subject to the following conditions:
|
|
1327
|
+
*
|
|
1328
|
+
* The above copyright notice and this permission notice shall be included in
|
|
1329
|
+
* all copies or substantial portions of the Software.
|
|
1330
|
+
*
|
|
1331
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
1332
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
1333
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
1334
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
1335
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
1336
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
1337
|
+
* THE SOFTWARE.
|
|
1338
|
+
*/var ii=(function(a){l.__extends(e,a);function e(){return a!==null&&a.apply(this,arguments)||this}return e.attachTo=function(t){return new e(t)},Object.defineProperty(e.prototype,"foundationForSelect",{get:function(){return this.foundation},enumerable:!1,configurable:!0}),e.prototype.getDefaultFoundation=function(){var t=this,n={addClass:function(i){return t.root.classList.add(i)},removeClass:function(i){return t.root.classList.remove(i)},hasClass:function(i){return t.root.classList.contains(i)},getAttr:function(i){return t.root.getAttribute(i)},setAttr:function(i,r){return t.root.setAttribute(i,r)},removeAttr:function(i){return t.root.removeAttribute(i)},setContent:function(i){t.root.textContent=i}};return new ni(n)},e})(T);/**
|
|
1339
|
+
* @license
|
|
1340
|
+
* Copyright 2018 Google Inc.
|
|
1341
|
+
*
|
|
1342
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
1343
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
1344
|
+
* in the Software without restriction, including without limitation the rights
|
|
1345
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
1346
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
1347
|
+
* furnished to do so, subject to the following conditions:
|
|
1348
|
+
*
|
|
1349
|
+
* The above copyright notice and this permission notice shall be included in
|
|
1350
|
+
* all copies or substantial portions of the Software.
|
|
1351
|
+
*
|
|
1352
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
1353
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
1354
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
1355
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
1356
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
1357
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
1358
|
+
* THE SOFTWARE.
|
|
1359
|
+
*/var we={ICON_EVENT:"MDCSelect:icon",ICON_ROLE:"button"};/**
|
|
1360
|
+
* @license
|
|
1361
|
+
* Copyright 2018 Google Inc.
|
|
1362
|
+
*
|
|
1363
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
1364
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
1365
|
+
* in the Software without restriction, including without limitation the rights
|
|
1366
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
1367
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
1368
|
+
* furnished to do so, subject to the following conditions:
|
|
1369
|
+
*
|
|
1370
|
+
* The above copyright notice and this permission notice shall be included in
|
|
1371
|
+
* all copies or substantial portions of the Software.
|
|
1372
|
+
*
|
|
1373
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
1374
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
1375
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
1376
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
1377
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
1378
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
1379
|
+
* THE SOFTWARE.
|
|
1380
|
+
*/var Pe=["click","keydown"],He=(function(a){l.__extends(e,a);function e(t){var n=a.call(this,l.__assign(l.__assign({},e.defaultAdapter),t))||this;return n.savedTabIndex=null,n.interactionHandler=function(i){n.handleInteraction(i)},n}return Object.defineProperty(e,"strings",{get:function(){return we},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{getAttr:function(){return null},setAttr:function(){},removeAttr:function(){},setContent:function(){},registerInteractionHandler:function(){},deregisterInteractionHandler:function(){},notifyIconAction:function(){}}},enumerable:!1,configurable:!0}),e.prototype.init=function(){var t,n;this.savedTabIndex=this.adapter.getAttr("tabindex");try{for(var i=l.__values(Pe),r=i.next();!r.done;r=i.next()){var o=r.value;this.adapter.registerInteractionHandler(o,this.interactionHandler)}}catch(s){t={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}},e.prototype.destroy=function(){var t,n;try{for(var i=l.__values(Pe),r=i.next();!r.done;r=i.next()){var o=r.value;this.adapter.deregisterInteractionHandler(o,this.interactionHandler)}}catch(s){t={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}},e.prototype.setDisabled=function(t){this.savedTabIndex&&(t?(this.adapter.setAttr("tabindex","-1"),this.adapter.removeAttr("role")):(this.adapter.setAttr("tabindex",this.savedTabIndex),this.adapter.setAttr("role",we.ICON_ROLE)))},e.prototype.setAriaLabel=function(t){this.adapter.setAttr("aria-label",t)},e.prototype.setContent=function(t){this.adapter.setContent(t)},e.prototype.handleInteraction=function(t){var n=t.key==="Enter"||t.keyCode===13;(t.type==="click"||n)&&this.adapter.notifyIconAction()},e})(C);/**
|
|
1381
|
+
* @license
|
|
1382
|
+
* Copyright 2018 Google Inc.
|
|
1383
|
+
*
|
|
1384
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
1385
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
1386
|
+
* in the Software without restriction, including without limitation the rights
|
|
1387
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
1388
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
1389
|
+
* furnished to do so, subject to the following conditions:
|
|
1390
|
+
*
|
|
1391
|
+
* The above copyright notice and this permission notice shall be included in
|
|
1392
|
+
* all copies or substantial portions of the Software.
|
|
1393
|
+
*
|
|
1394
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
1395
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
1396
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
1397
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
1398
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
1399
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
1400
|
+
* THE SOFTWARE.
|
|
1401
|
+
*/var ri=(function(a){l.__extends(e,a);function e(){return a!==null&&a.apply(this,arguments)||this}return e.attachTo=function(t){return new e(t)},Object.defineProperty(e.prototype,"foundationForSelect",{get:function(){return this.foundation},enumerable:!1,configurable:!0}),e.prototype.getDefaultFoundation=function(){var t=this,n={getAttr:function(i){return t.root.getAttribute(i)},setAttr:function(i,r){return t.root.setAttribute(i,r)},removeAttr:function(i){return t.root.removeAttribute(i)},setContent:function(i){t.root.textContent=i},registerInteractionHandler:function(i,r){return t.listen(i,r)},deregisterInteractionHandler:function(i,r){return t.unlisten(i,r)},notifyIconAction:function(){return t.emit(He.strings.ICON_EVENT,{},!0)}};return new He(n)},e})(T);/**
|
|
1402
|
+
* @license
|
|
1403
|
+
* Copyright 2016 Google Inc.
|
|
1404
|
+
*
|
|
1405
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
1406
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
1407
|
+
* in the Software without restriction, including without limitation the rights
|
|
1408
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
1409
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
1410
|
+
* furnished to do so, subject to the following conditions:
|
|
1411
|
+
*
|
|
1412
|
+
* The above copyright notice and this permission notice shall be included in
|
|
1413
|
+
* all copies or substantial portions of the Software.
|
|
1414
|
+
*
|
|
1415
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
1416
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
1417
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
1418
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
1419
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
1420
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
1421
|
+
* THE SOFTWARE.
|
|
1422
|
+
*/var ai=(function(a){l.__extends(e,a);function e(){return a!==null&&a.apply(this,arguments)||this}return e.attachTo=function(t){return new e(t)},e.prototype.initialize=function(t,n,i,r,o,s){if(t===void 0&&(t=function(f){return new tn(f)}),n===void 0&&(n=function(f){return new nn(f)}),i===void 0&&(i=function(f){return new sn(f)}),r===void 0&&(r=function(f){return new an(f)}),o===void 0&&(o=function(f){return new ri(f)}),s===void 0&&(s=function(f){return new ii(f)}),this.selectAnchor=this.root.querySelector(U.SELECT_ANCHOR_SELECTOR),this.selectedText=this.root.querySelector(U.SELECTED_TEXT_SELECTOR),this.hiddenInput=this.root.querySelector(U.HIDDEN_INPUT_SELECTOR),!this.selectedText)throw new Error("MDCSelect: Missing required element: The following selector must be present: "+("'"+U.SELECTED_TEXT_SELECTOR+"'"));if(this.selectAnchor.hasAttribute(U.ARIA_CONTROLS)){var u=document.getElementById(this.selectAnchor.getAttribute(U.ARIA_CONTROLS));u&&(this.helperText=s(u))}this.menuSetup(r);var c=this.root.querySelector(U.LABEL_SELECTOR);this.label=c?t(c):null;var h=this.root.querySelector(U.LINE_RIPPLE_SELECTOR);this.lineRipple=h?n(h):null;var E=this.root.querySelector(U.OUTLINE_SELECTOR);this.outline=E?i(E):null;var p=this.root.querySelector(U.LEADING_ICON_SELECTOR);p&&(this.leadingIcon=o(p)),this.root.classList.contains(b.OUTLINED)||(this.ripple=this.createRipple())},e.prototype.initialSyncWithDOM=function(){var t=this;if(this.handleFocus=function(){t.foundation.handleFocus()},this.handleBlur=function(){t.foundation.handleBlur()},this.handleClick=function(n){t.selectAnchor.focus(),t.foundation.handleClick(t.getNormalizedXCoordinate(n))},this.handleKeydown=function(n){t.foundation.handleKeydown(n)},this.handleMenuItemAction=function(n){t.foundation.handleMenuItemAction(n.detail.index)},this.handleMenuOpened=function(){t.foundation.handleMenuOpened()},this.handleMenuClosed=function(){t.foundation.handleMenuClosed()},this.handleMenuClosing=function(){t.foundation.handleMenuClosing()},this.selectAnchor.addEventListener("focus",this.handleFocus),this.selectAnchor.addEventListener("blur",this.handleBlur),this.selectAnchor.addEventListener("click",this.handleClick),this.selectAnchor.addEventListener("keydown",this.handleKeydown),this.menu.listen(ot.CLOSED_EVENT,this.handleMenuClosed),this.menu.listen(ot.CLOSING_EVENT,this.handleMenuClosing),this.menu.listen(ot.OPENED_EVENT,this.handleMenuOpened),this.menu.listen(et.SELECTED_EVENT,this.handleMenuItemAction),this.hiddenInput){if(this.hiddenInput.value){this.foundation.setValue(this.hiddenInput.value,!0),this.foundation.layout();return}this.hiddenInput.value=this.value}},e.prototype.destroy=function(){this.selectAnchor.removeEventListener("focus",this.handleFocus),this.selectAnchor.removeEventListener("blur",this.handleBlur),this.selectAnchor.removeEventListener("keydown",this.handleKeydown),this.selectAnchor.removeEventListener("click",this.handleClick),this.menu.unlisten(ot.CLOSED_EVENT,this.handleMenuClosed),this.menu.unlisten(ot.OPENED_EVENT,this.handleMenuOpened),this.menu.unlisten(et.SELECTED_EVENT,this.handleMenuItemAction),this.menu.destroy(),this.ripple&&this.ripple.destroy(),this.outline&&this.outline.destroy(),this.leadingIcon&&this.leadingIcon.destroy(),this.helperText&&this.helperText.destroy(),a.prototype.destroy.call(this)},Object.defineProperty(e.prototype,"value",{get:function(){return this.foundation.getValue()},set:function(t){this.foundation.setValue(t)},enumerable:!1,configurable:!0}),e.prototype.setValue=function(t,n){n===void 0&&(n=!1),this.foundation.setValue(t,n)},Object.defineProperty(e.prototype,"selectedIndex",{get:function(){return this.foundation.getSelectedIndex()},set:function(t){this.foundation.setSelectedIndex(t,!0)},enumerable:!1,configurable:!0}),e.prototype.setSelectedIndex=function(t,n){n===void 0&&(n=!1),this.foundation.setSelectedIndex(t,!0,n)},Object.defineProperty(e.prototype,"disabled",{get:function(){return this.foundation.getDisabled()},set:function(t){this.foundation.setDisabled(t),this.hiddenInput&&(this.hiddenInput.disabled=t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"leadingIconAriaLabel",{set:function(t){this.foundation.setLeadingIconAriaLabel(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"leadingIconContent",{set:function(t){this.foundation.setLeadingIconContent(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"helperTextContent",{set:function(t){this.foundation.setHelperTextContent(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"useDefaultValidation",{set:function(t){this.foundation.setUseDefaultValidation(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"valid",{get:function(){return this.foundation.isValid()},set:function(t){this.foundation.setValid(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"required",{get:function(){return this.foundation.getRequired()},set:function(t){this.foundation.setRequired(t)},enumerable:!1,configurable:!0}),e.prototype.layout=function(){this.foundation.layout()},e.prototype.layoutOptions=function(){this.foundation.layoutOptions(),this.menu.layout(),this.menuItemValues=this.menu.items.map(function(t){return t.getAttribute(U.VALUE_ATTR)||""}),this.hiddenInput&&(this.hiddenInput.value=this.value)},e.prototype.getDefaultFoundation=function(){var t=l.__assign(l.__assign(l.__assign(l.__assign({},this.getSelectAdapterMethods()),this.getCommonAdapterMethods()),this.getOutlineAdapterMethods()),this.getLabelAdapterMethods());return new ei(t,this.getFoundationMap())},e.prototype.menuSetup=function(t){this.menuElement=this.root.querySelector(U.MENU_SELECTOR),this.menu=t(this.menuElement),this.menu.hasTypeahead=!0,this.menu.singleSelection=!0,this.menuItemValues=this.menu.items.map(function(n){return n.getAttribute(U.VALUE_ATTR)||""})},e.prototype.createRipple=function(){var t=this,n=l.__assign(l.__assign({},D.createAdapter({root:this.selectAnchor})),{registerInteractionHandler:function(i,r){t.selectAnchor.addEventListener(i,r)},deregisterInteractionHandler:function(i,r){t.selectAnchor.removeEventListener(i,r)}});return new D(this.selectAnchor,new pt(n))},e.prototype.getSelectAdapterMethods=function(){var t=this;return{getMenuItemAttr:function(n,i){return n.getAttribute(i)},setSelectedText:function(n){t.selectedText.textContent=n},isSelectAnchorFocused:function(){return document.activeElement===t.selectAnchor},getSelectAnchorAttr:function(n){return t.selectAnchor.getAttribute(n)},setSelectAnchorAttr:function(n,i){t.selectAnchor.setAttribute(n,i)},removeSelectAnchorAttr:function(n){t.selectAnchor.removeAttribute(n)},addMenuClass:function(n){t.menuElement.classList.add(n)},removeMenuClass:function(n){t.menuElement.classList.remove(n)},openMenu:function(){t.menu.open=!0},closeMenu:function(){t.menu.open=!1},getAnchorElement:function(){return t.root.querySelector(U.SELECT_ANCHOR_SELECTOR)},setMenuAnchorElement:function(n){t.menu.setAnchorElement(n)},setMenuAnchorCorner:function(n){t.menu.setAnchorCorner(n)},setMenuWrapFocus:function(n){t.menu.wrapFocus=n},getSelectedIndex:function(){var n=t.menu.selectedIndex;return n instanceof Array?n[0]:n},setSelectedIndex:function(n){t.menu.selectedIndex=n},focusMenuItemAtIndex:function(n){t.menu.items[n].focus()},getMenuItemCount:function(){return t.menu.items.length},getMenuItemValues:function(){return t.menuItemValues},getMenuItemTextAtIndex:function(n){return t.menu.getPrimaryTextAtIndex(n)},isTypeaheadInProgress:function(){return t.menu.typeaheadInProgress},typeaheadMatchItem:function(n,i){return t.menu.typeaheadMatchItem(n,i)}}},e.prototype.getCommonAdapterMethods=function(){var t=this;return{addClass:function(n){t.root.classList.add(n)},removeClass:function(n){t.root.classList.remove(n)},hasClass:function(n){return t.root.classList.contains(n)},setRippleCenter:function(n){t.lineRipple&&t.lineRipple.setRippleCenter(n)},activateBottomLine:function(){t.lineRipple&&t.lineRipple.activate()},deactivateBottomLine:function(){t.lineRipple&&t.lineRipple.deactivate()},notifyChange:function(n){t.hiddenInput&&(t.hiddenInput.value=n);var i=t.selectedIndex;t.emit(U.CHANGE_EVENT,{value:n,index:i},!0)}}},e.prototype.getOutlineAdapterMethods=function(){var t=this;return{hasOutline:function(){return!!t.outline},notchOutline:function(n){t.outline&&t.outline.notch(n)},closeOutline:function(){t.outline&&t.outline.closeNotch()}}},e.prototype.getLabelAdapterMethods=function(){var t=this;return{hasLabel:function(){return!!t.label},floatLabel:function(n){t.label&&t.label.float(n)},getLabelWidth:function(){return t.label?t.label.getWidth():0},setLabelRequired:function(n){t.label&&t.label.setRequired(n)}}},e.prototype.getNormalizedXCoordinate=function(t){var n=t.target.getBoundingClientRect(),i=this.isTouchEvent(t)?t.touches[0].clientX:t.clientX;return i-n.left},e.prototype.isTouchEvent=function(t){return!!t.touches},e.prototype.getFoundationMap=function(){return{helperText:this.helperText?this.helperText.foundationForSelect:void 0,leadingIcon:this.leadingIcon?this.leadingIcon.foundationForSelect:void 0}},e})(T);/**
|
|
1423
|
+
* @license
|
|
1424
|
+
* Copyright 2020 Google Inc.
|
|
1425
|
+
*
|
|
1426
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
1427
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
1428
|
+
* in the Software without restriction, including without limitation the rights
|
|
1429
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
1430
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
1431
|
+
* furnished to do so, subject to the following conditions:
|
|
1432
|
+
*
|
|
1433
|
+
* The above copyright notice and this permission notice shall be included in
|
|
1434
|
+
* all copies or substantial portions of the Software.
|
|
1435
|
+
*
|
|
1436
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
1437
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
1438
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
1439
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
1440
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
1441
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
1442
|
+
* THE SOFTWARE.
|
|
1443
|
+
*/var I={DISABLED:"mdc-slider--disabled",DISCRETE:"mdc-slider--discrete",INPUT:"mdc-slider__input",RANGE:"mdc-slider--range",THUMB:"mdc-slider__thumb",THUMB_FOCUSED:"mdc-slider__thumb--focused",THUMB_KNOB:"mdc-slider__thumb-knob",THUMB_TOP:"mdc-slider__thumb--top",THUMB_WITH_INDICATOR:"mdc-slider__thumb--with-indicator",TICK_MARKS:"mdc-slider--tick-marks",TICK_MARKS_CONTAINER:"mdc-slider__tick-marks",TICK_MARK_ACTIVE:"mdc-slider__tick-mark--active",TICK_MARK_INACTIVE:"mdc-slider__tick-mark--inactive",TRACK:"mdc-slider__track",TRACK_ACTIVE:"mdc-slider__track--active_fill",VALUE_INDICATOR_CONTAINER:"mdc-slider__value-indicator-container",VALUE_INDICATOR_TEXT:"mdc-slider__value-indicator-text"},ee={STEP_SIZE:1,MIN_RANGE:0,THUMB_UPDATE_MIN_PX:5},F={ARIA_VALUETEXT:"aria-valuetext",INPUT_DISABLED:"disabled",INPUT_MIN:"min",INPUT_MAX:"max",INPUT_VALUE:"value",INPUT_STEP:"step",DATA_MIN_RANGE:"data-min-range"},Fe={CHANGE:"MDCSlider:change",INPUT:"MDCSlider:input"},B={VAR_VALUE_INDICATOR_CARET_LEFT:"--slider-value-indicator-caret-left",VAR_VALUE_INDICATOR_CARET_RIGHT:"--slider-value-indicator-caret-right",VAR_VALUE_INDICATOR_CARET_TRANSFORM:"--slider-value-indicator-caret-transform",VAR_VALUE_INDICATOR_CONTAINER_LEFT:"--slider-value-indicator-container-left",VAR_VALUE_INDICATOR_CONTAINER_RIGHT:"--slider-value-indicator-container-right",VAR_VALUE_INDICATOR_CONTAINER_TRANSFORM:"--slider-value-indicator-container-transform"};/**
|
|
1444
|
+
* @license
|
|
1445
|
+
* Copyright 2020 Google Inc.
|
|
1446
|
+
*
|
|
1447
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
1448
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
1449
|
+
* in the Software without restriction, including without limitation the rights
|
|
1450
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
1451
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
1452
|
+
* furnished to do so, subject to the following conditions:
|
|
1453
|
+
*
|
|
1454
|
+
* The above copyright notice and this permission notice shall be included in
|
|
1455
|
+
* all copies or substantial portions of the Software.
|
|
1456
|
+
*
|
|
1457
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
1458
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
1459
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
1460
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
1461
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
1462
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
1463
|
+
* THE SOFTWARE.
|
|
1464
|
+
*/var bt;(function(a){a[a.ACTIVE=0]="ACTIVE",a[a.INACTIVE=1]="INACTIVE"})(bt||(bt={}));var d;(function(a){a[a.START=1]="START",a[a.END=2]="END"})(d||(d={}));/**
|
|
1465
|
+
* @license
|
|
1466
|
+
* Copyright 2020 Google Inc.
|
|
1467
|
+
*
|
|
1468
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
1469
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
1470
|
+
* in the Software without restriction, including without limitation the rights
|
|
1471
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
1472
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
1473
|
+
* furnished to do so, subject to the following conditions:
|
|
1474
|
+
*
|
|
1475
|
+
* The above copyright notice and this permission notice shall be included in
|
|
1476
|
+
* all copies or substantial portions of the Software.
|
|
1477
|
+
*
|
|
1478
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
1479
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
1480
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
1481
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
1482
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
1483
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
1484
|
+
* THE SOFTWARE.
|
|
1485
|
+
*/var $t;(function(a){a.SLIDER_UPDATE="slider_update"})($t||($t={}));var ne=typeof window<"u",oi=(function(a){l.__extends(e,a);function e(t){var n=a.call(this,l.__assign(l.__assign({},e.defaultAdapter),t))||this;return n.initialStylesRemoved=!1,n.isDisabled=!1,n.isDiscrete=!1,n.step=ee.STEP_SIZE,n.minRange=ee.MIN_RANGE,n.hasTickMarks=!1,n.isRange=!1,n.thumb=null,n.downEventClientX=null,n.startThumbKnobWidth=0,n.endThumbKnobWidth=0,n.animFrame=new Mn,n}return Object.defineProperty(e,"defaultAdapter",{get:function(){return{hasClass:function(){return!1},addClass:function(){},removeClass:function(){},addThumbClass:function(){},removeThumbClass:function(){},getAttribute:function(){return null},getInputValue:function(){return""},setInputValue:function(){},getInputAttribute:function(){return null},setInputAttribute:function(){return null},removeInputAttribute:function(){return null},focusInput:function(){},isInputFocused:function(){return!1},shouldHideFocusStylesForPointerEvents:function(){return!1},getThumbKnobWidth:function(){return 0},getValueIndicatorContainerWidth:function(){return 0},getThumbBoundingClientRect:function(){return{top:0,right:0,bottom:0,left:0,width:0,height:0}},getBoundingClientRect:function(){return{top:0,right:0,bottom:0,left:0,width:0,height:0}},isRTL:function(){return!1},setThumbStyleProperty:function(){},removeThumbStyleProperty:function(){},setTrackActiveStyleProperty:function(){},removeTrackActiveStyleProperty:function(){},setValueIndicatorText:function(){},getValueToAriaValueTextFn:function(){return null},updateTickMarks:function(){},setPointerCapture:function(){},emitChangeEvent:function(){},emitInputEvent:function(){},emitDragStartEvent:function(){},emitDragEndEvent:function(){},registerEventHandler:function(){},deregisterEventHandler:function(){},registerThumbEventHandler:function(){},deregisterThumbEventHandler:function(){},registerInputEventHandler:function(){},deregisterInputEventHandler:function(){},registerBodyEventHandler:function(){},deregisterBodyEventHandler:function(){},registerWindowEventHandler:function(){},deregisterWindowEventHandler:function(){}}},enumerable:!1,configurable:!0}),e.prototype.init=function(){var t=this;this.isDisabled=this.adapter.hasClass(I.DISABLED),this.isDiscrete=this.adapter.hasClass(I.DISCRETE),this.hasTickMarks=this.adapter.hasClass(I.TICK_MARKS),this.isRange=this.adapter.hasClass(I.RANGE);var n=this.convertAttributeValueToNumber(this.adapter.getInputAttribute(F.INPUT_MIN,this.isRange?d.START:d.END),F.INPUT_MIN),i=this.convertAttributeValueToNumber(this.adapter.getInputAttribute(F.INPUT_MAX,d.END),F.INPUT_MAX),r=this.convertAttributeValueToNumber(this.adapter.getInputAttribute(F.INPUT_VALUE,d.END),F.INPUT_VALUE),o=this.isRange?this.convertAttributeValueToNumber(this.adapter.getInputAttribute(F.INPUT_VALUE,d.START),F.INPUT_VALUE):n,s=this.adapter.getInputAttribute(F.INPUT_STEP,d.END),u=s?this.convertAttributeValueToNumber(s,F.INPUT_STEP):this.step,c=this.adapter.getAttribute(F.DATA_MIN_RANGE),h=c?this.convertAttributeValueToNumber(c,F.DATA_MIN_RANGE):this.minRange;this.validateProperties({min:n,max:i,value:r,valueStart:o,step:u,minRange:h}),this.min=n,this.max=i,this.value=r,this.valueStart=o,this.step=u,this.minRange=h,this.numDecimalPlaces=ke(this.step),this.valueBeforeDownEvent=r,this.valueStartBeforeDownEvent=o,this.mousedownOrTouchstartListener=this.handleMousedownOrTouchstart.bind(this),this.moveListener=this.handleMove.bind(this),this.pointerdownListener=this.handlePointerdown.bind(this),this.pointerupListener=this.handlePointerup.bind(this),this.thumbMouseenterListener=this.handleThumbMouseenter.bind(this),this.thumbMouseleaveListener=this.handleThumbMouseleave.bind(this),this.inputStartChangeListener=function(){t.handleInputChange(d.START)},this.inputEndChangeListener=function(){t.handleInputChange(d.END)},this.inputStartFocusListener=function(){t.handleInputFocus(d.START)},this.inputEndFocusListener=function(){t.handleInputFocus(d.END)},this.inputStartBlurListener=function(){t.handleInputBlur(d.START)},this.inputEndBlurListener=function(){t.handleInputBlur(d.END)},this.resizeListener=this.handleResize.bind(this),this.registerEventHandlers()},e.prototype.destroy=function(){this.deregisterEventHandlers()},e.prototype.setMin=function(t){this.min=t,this.isRange||(this.valueStart=t),this.updateUI()},e.prototype.setMax=function(t){this.max=t,this.updateUI()},e.prototype.getMin=function(){return this.min},e.prototype.getMax=function(){return this.max},e.prototype.getValue=function(){return this.value},e.prototype.setValue=function(t){if(this.isRange&&t<this.valueStart+this.minRange)throw new Error("end thumb value ("+t+") must be >= start thumb "+("value ("+this.valueStart+") + min range ("+this.minRange+")"));this.updateValue(t,d.END)},e.prototype.getValueStart=function(){if(!this.isRange)throw new Error("`valueStart` is only applicable for range sliders.");return this.valueStart},e.prototype.setValueStart=function(t){if(!this.isRange)throw new Error("`valueStart` is only applicable for range sliders.");if(this.isRange&&t>this.value-this.minRange)throw new Error("start thumb value ("+t+") must be <= end thumb "+("value ("+this.value+") - min range ("+this.minRange+")"));this.updateValue(t,d.START)},e.prototype.setStep=function(t){this.step=t,this.numDecimalPlaces=ke(t),this.updateUI()},e.prototype.setMinRange=function(t){if(!this.isRange)throw new Error("`minRange` is only applicable for range sliders.");if(t<0)throw new Error("`minRange` must be non-negative. "+("Current value: "+t));if(this.value-this.valueStart<t)throw new Error("start thumb value ("+this.valueStart+") and end thumb value "+("("+this.value+") must differ by at least "+t+"."));this.minRange=t},e.prototype.setIsDiscrete=function(t){this.isDiscrete=t,this.updateValueIndicatorUI(),this.updateTickMarksUI()},e.prototype.getStep=function(){return this.step},e.prototype.getMinRange=function(){if(!this.isRange)throw new Error("`minRange` is only applicable for range sliders.");return this.minRange},e.prototype.setHasTickMarks=function(t){this.hasTickMarks=t,this.updateTickMarksUI()},e.prototype.getDisabled=function(){return this.isDisabled},e.prototype.setDisabled=function(t){this.isDisabled=t,t?(this.adapter.addClass(I.DISABLED),this.isRange&&this.adapter.setInputAttribute(F.INPUT_DISABLED,"",d.START),this.adapter.setInputAttribute(F.INPUT_DISABLED,"",d.END)):(this.adapter.removeClass(I.DISABLED),this.isRange&&this.adapter.removeInputAttribute(F.INPUT_DISABLED,d.START),this.adapter.removeInputAttribute(F.INPUT_DISABLED,d.END))},e.prototype.getIsRange=function(){return this.isRange},e.prototype.layout=function(t){var n=t===void 0?{}:t,i=n.skipUpdateUI;this.rect=this.adapter.getBoundingClientRect(),this.isRange&&(this.startThumbKnobWidth=this.adapter.getThumbKnobWidth(d.START),this.endThumbKnobWidth=this.adapter.getThumbKnobWidth(d.END)),i||this.updateUI()},e.prototype.handleResize=function(){this.layout()},e.prototype.handleDown=function(t){if(!this.isDisabled){this.valueStartBeforeDownEvent=this.valueStart,this.valueBeforeDownEvent=this.value;var n=t.clientX!=null?t.clientX:t.targetTouches[0].clientX;this.downEventClientX=n;var i=this.mapClientXOnSliderScale(n);this.thumb=this.getThumbFromDownEvent(n,i),this.thumb!==null&&(this.handleDragStart(t,i,this.thumb),this.updateValue(i,this.thumb,{emitInputEvent:!0}))}},e.prototype.handleMove=function(t){if(!this.isDisabled){t.preventDefault();var n=t.clientX!=null?t.clientX:t.targetTouches[0].clientX,i=this.thumb!=null;if(this.thumb=this.getThumbFromMoveEvent(n),this.thumb!==null){var r=this.mapClientXOnSliderScale(n);i||(this.handleDragStart(t,r,this.thumb),this.adapter.emitDragStartEvent(r,this.thumb)),this.updateValue(r,this.thumb,{emitInputEvent:!0})}}},e.prototype.handleUp=function(){var t,n;if(!(this.isDisabled||this.thumb===null)){!((n=(t=this.adapter).shouldHideFocusStylesForPointerEvents)===null||n===void 0)&&n.call(t)&&this.handleInputBlur(this.thumb);var i=this.thumb===d.START?this.valueStartBeforeDownEvent:this.valueBeforeDownEvent,r=this.thumb===d.START?this.valueStart:this.value;i!==r&&this.adapter.emitChangeEvent(r,this.thumb),this.adapter.emitDragEndEvent(r,this.thumb),this.thumb=null}},e.prototype.handleThumbMouseenter=function(){!this.isDiscrete||!this.isRange||(this.adapter.addThumbClass(I.THUMB_WITH_INDICATOR,d.START),this.adapter.addThumbClass(I.THUMB_WITH_INDICATOR,d.END))},e.prototype.handleThumbMouseleave=function(){var t,n;!this.isDiscrete||!this.isRange||!(!((n=(t=this.adapter).shouldHideFocusStylesForPointerEvents)===null||n===void 0)&&n.call(t))&&(this.adapter.isInputFocused(d.START)||this.adapter.isInputFocused(d.END))||this.thumb||(this.adapter.removeThumbClass(I.THUMB_WITH_INDICATOR,d.START),this.adapter.removeThumbClass(I.THUMB_WITH_INDICATOR,d.END))},e.prototype.handleMousedownOrTouchstart=function(t){var n=this,i=t.type==="mousedown"?"mousemove":"touchmove";this.adapter.registerBodyEventHandler(i,this.moveListener);var r=function(){n.handleUp(),n.adapter.deregisterBodyEventHandler(i,n.moveListener),n.adapter.deregisterEventHandler("mouseup",r),n.adapter.deregisterEventHandler("touchend",r)};this.adapter.registerBodyEventHandler("mouseup",r),this.adapter.registerBodyEventHandler("touchend",r),this.handleDown(t)},e.prototype.handlePointerdown=function(t){var n=t.button===0;n&&(t.pointerId!=null&&this.adapter.setPointerCapture(t.pointerId),this.adapter.registerEventHandler("pointermove",this.moveListener),this.handleDown(t))},e.prototype.handleInputChange=function(t){var n=Number(this.adapter.getInputValue(t));t===d.START?this.setValueStart(n):this.setValue(n),this.adapter.emitChangeEvent(t===d.START?this.valueStart:this.value,t),this.adapter.emitInputEvent(t===d.START?this.valueStart:this.value,t)},e.prototype.handleInputFocus=function(t){if(this.adapter.addThumbClass(I.THUMB_FOCUSED,t),!!this.isDiscrete&&(this.adapter.addThumbClass(I.THUMB_WITH_INDICATOR,t),this.isRange)){var n=t===d.START?d.END:d.START;this.adapter.addThumbClass(I.THUMB_WITH_INDICATOR,n)}},e.prototype.handleInputBlur=function(t){if(this.adapter.removeThumbClass(I.THUMB_FOCUSED,t),!!this.isDiscrete&&(this.adapter.removeThumbClass(I.THUMB_WITH_INDICATOR,t),this.isRange)){var n=t===d.START?d.END:d.START;this.adapter.removeThumbClass(I.THUMB_WITH_INDICATOR,n)}},e.prototype.handleDragStart=function(t,n,i){var r,o;this.adapter.emitDragStartEvent(n,i),this.adapter.focusInput(i),!((o=(r=this.adapter).shouldHideFocusStylesForPointerEvents)===null||o===void 0)&&o.call(r)&&this.handleInputFocus(i),t.preventDefault()},e.prototype.getThumbFromDownEvent=function(t,n){if(!this.isRange)return d.END;var i=this.adapter.getThumbBoundingClientRect(d.START),r=this.adapter.getThumbBoundingClientRect(d.END),o=t>=i.left&&t<=i.right,s=t>=r.left&&t<=r.right;return o&&s?null:o?d.START:s?d.END:n<this.valueStart?d.START:n>this.value?d.END:n-this.valueStart<=this.value-n?d.START:d.END},e.prototype.getThumbFromMoveEvent=function(t){if(this.thumb!==null)return this.thumb;if(this.downEventClientX===null)throw new Error("`downEventClientX` is null after move event.");var n=Math.abs(this.downEventClientX-t)<ee.THUMB_UPDATE_MIN_PX;if(n)return this.thumb;var i=t<this.downEventClientX;return i?this.adapter.isRTL()?d.END:d.START:this.adapter.isRTL()?d.START:d.END},e.prototype.updateUI=function(t){t?this.updateThumbAndInputAttributes(t):(this.updateThumbAndInputAttributes(d.START),this.updateThumbAndInputAttributes(d.END)),this.updateThumbAndTrackUI(t),this.updateValueIndicatorUI(t),this.updateTickMarksUI()},e.prototype.updateThumbAndInputAttributes=function(t){if(t){var n=this.isRange&&t===d.START?this.valueStart:this.value,i=String(n);this.adapter.setInputAttribute(F.INPUT_VALUE,i,t),this.isRange&&t===d.START?this.adapter.setInputAttribute(F.INPUT_MIN,String(n+this.minRange),d.END):this.isRange&&t===d.END&&this.adapter.setInputAttribute(F.INPUT_MAX,String(n-this.minRange),d.START),this.adapter.getInputValue(t)!==i&&this.adapter.setInputValue(i,t);var r=this.adapter.getValueToAriaValueTextFn();r&&this.adapter.setInputAttribute(F.ARIA_VALUETEXT,r(n,t),t)}},e.prototype.updateValueIndicatorUI=function(t){if(this.isDiscrete){var n=this.isRange&&t===d.START?this.valueStart:this.value;this.adapter.setValueIndicatorText(n,t===d.START?d.START:d.END),!t&&this.isRange&&this.adapter.setValueIndicatorText(this.valueStart,d.START)}},e.prototype.updateTickMarksUI=function(){if(!(!this.isDiscrete||!this.hasTickMarks)){var t=(this.valueStart-this.min)/this.step,n=(this.value-this.valueStart)/this.step+1,i=(this.max-this.value)/this.step,r=Array.from({length:t}).fill(bt.INACTIVE),o=Array.from({length:n}).fill(bt.ACTIVE),s=Array.from({length:i}).fill(bt.INACTIVE);this.adapter.updateTickMarks(r.concat(o).concat(s))}},e.prototype.mapClientXOnSliderScale=function(t){var n=t-this.rect.left,i=n/this.rect.width;this.adapter.isRTL()&&(i=1-i);var r=this.min+i*(this.max-this.min);return r===this.max||r===this.min?r:Number(this.quantize(r).toFixed(this.numDecimalPlaces))},e.prototype.quantize=function(t){var n=Math.round((t-this.min)/this.step);return this.min+n*this.step},e.prototype.updateValue=function(t,n,i){var r=i===void 0?{}:i,o=r.emitInputEvent;if(t=this.clampValue(t,n),this.isRange&&n===d.START){if(this.valueStart===t)return;this.valueStart=t}else{if(this.value===t)return;this.value=t}this.updateUI(n),o&&this.adapter.emitInputEvent(n===d.START?this.valueStart:this.value,n)},e.prototype.clampValue=function(t,n){t=Math.min(Math.max(t,this.min),this.max);var i=this.isRange&&n===d.START&&t>this.value-this.minRange;if(i)return this.value-this.minRange;var r=this.isRange&&n===d.END&&t<this.valueStart+this.minRange;return r?this.valueStart+this.minRange:t},e.prototype.updateThumbAndTrackUI=function(t){var n=this,i=this,r=i.max,o=i.min,s=(this.value-this.valueStart)/(r-o),u=s*this.rect.width,c=this.adapter.isRTL(),h=ne?Yt(window,"transform"):"transform";if(this.isRange){var E=this.adapter.isRTL()?(r-this.value)/(r-o)*this.rect.width:(this.valueStart-o)/(r-o)*this.rect.width,p=E+u;this.animFrame.request($t.SLIDER_UPDATE,function(){var f=!c&&t===d.START||c&&t!==d.START;f?(n.adapter.setTrackActiveStyleProperty("transform-origin","right"),n.adapter.setTrackActiveStyleProperty("left","auto"),n.adapter.setTrackActiveStyleProperty("right",n.rect.width-p+"px")):(n.adapter.setTrackActiveStyleProperty("transform-origin","left"),n.adapter.setTrackActiveStyleProperty("right","auto"),n.adapter.setTrackActiveStyleProperty("left",E+"px")),n.adapter.setTrackActiveStyleProperty(h,"scaleX("+s+")");var v=c?p:E,S=n.adapter.isRTL()?E:p;(t===d.START||!t||!n.initialStylesRemoved)&&(n.adapter.setThumbStyleProperty(h,"translateX("+v+"px)",d.START),n.alignValueIndicator(d.START,v)),(t===d.END||!t||!n.initialStylesRemoved)&&(n.adapter.setThumbStyleProperty(h,"translateX("+S+"px)",d.END),n.alignValueIndicator(d.END,S)),n.removeInitialStyles(c),n.updateOverlappingThumbsUI(v,S,t)})}else this.animFrame.request($t.SLIDER_UPDATE,function(){var f=c?n.rect.width-u:u;n.adapter.setThumbStyleProperty(h,"translateX("+f+"px)",d.END),n.alignValueIndicator(d.END,f),n.adapter.setTrackActiveStyleProperty(h,"scaleX("+s+")"),n.removeInitialStyles(c)})},e.prototype.alignValueIndicator=function(t,n){if(this.isDiscrete){var i=this.adapter.getThumbBoundingClientRect(t).width/2,r=this.adapter.getValueIndicatorContainerWidth(t),o=this.adapter.getBoundingClientRect().width;r/2>n+i?(this.adapter.setThumbStyleProperty(B.VAR_VALUE_INDICATOR_CARET_LEFT,i+"px",t),this.adapter.setThumbStyleProperty(B.VAR_VALUE_INDICATOR_CARET_RIGHT,"auto",t),this.adapter.setThumbStyleProperty(B.VAR_VALUE_INDICATOR_CARET_TRANSFORM,"translateX(-50%)",t),this.adapter.setThumbStyleProperty(B.VAR_VALUE_INDICATOR_CONTAINER_LEFT,"0",t),this.adapter.setThumbStyleProperty(B.VAR_VALUE_INDICATOR_CONTAINER_RIGHT,"auto",t),this.adapter.setThumbStyleProperty(B.VAR_VALUE_INDICATOR_CONTAINER_TRANSFORM,"none",t)):r/2>o-n+i?(this.adapter.setThumbStyleProperty(B.VAR_VALUE_INDICATOR_CARET_LEFT,"auto",t),this.adapter.setThumbStyleProperty(B.VAR_VALUE_INDICATOR_CARET_RIGHT,i+"px",t),this.adapter.setThumbStyleProperty(B.VAR_VALUE_INDICATOR_CARET_TRANSFORM,"translateX(50%)",t),this.adapter.setThumbStyleProperty(B.VAR_VALUE_INDICATOR_CONTAINER_LEFT,"auto",t),this.adapter.setThumbStyleProperty(B.VAR_VALUE_INDICATOR_CONTAINER_RIGHT,"0",t),this.adapter.setThumbStyleProperty(B.VAR_VALUE_INDICATOR_CONTAINER_TRANSFORM,"none",t)):(this.adapter.setThumbStyleProperty(B.VAR_VALUE_INDICATOR_CARET_LEFT,"50%",t),this.adapter.setThumbStyleProperty(B.VAR_VALUE_INDICATOR_CARET_RIGHT,"auto",t),this.adapter.setThumbStyleProperty(B.VAR_VALUE_INDICATOR_CARET_TRANSFORM,"translateX(-50%)",t),this.adapter.setThumbStyleProperty(B.VAR_VALUE_INDICATOR_CONTAINER_LEFT,"50%",t),this.adapter.setThumbStyleProperty(B.VAR_VALUE_INDICATOR_CONTAINER_RIGHT,"auto",t),this.adapter.setThumbStyleProperty(B.VAR_VALUE_INDICATOR_CONTAINER_TRANSFORM,"translateX(-50%)",t))}},e.prototype.removeInitialStyles=function(t){if(!this.initialStylesRemoved){var n=t?"right":"left";this.adapter.removeThumbStyleProperty(n,d.END),this.isRange&&this.adapter.removeThumbStyleProperty(n,d.START),this.initialStylesRemoved=!0,this.resetTrackAndThumbAnimation()}},e.prototype.resetTrackAndThumbAnimation=function(){var t=this;if(this.isDiscrete){var n=ne?Yt(window,"transition"):"transition",i="none 0s ease 0s";this.adapter.setThumbStyleProperty(n,i,d.END),this.isRange&&this.adapter.setThumbStyleProperty(n,i,d.START),this.adapter.setTrackActiveStyleProperty(n,i),requestAnimationFrame(function(){t.adapter.removeThumbStyleProperty(n,d.END),t.adapter.removeTrackActiveStyleProperty(n),t.isRange&&t.adapter.removeThumbStyleProperty(n,d.START)})}},e.prototype.updateOverlappingThumbsUI=function(t,n,i){var r=!1;if(this.adapter.isRTL()){var o=t-this.startThumbKnobWidth/2,s=n+this.endThumbKnobWidth/2;r=s>=o}else{var u=t+this.startThumbKnobWidth/2,c=n-this.endThumbKnobWidth/2;r=u>=c}r?(this.adapter.addThumbClass(I.THUMB_TOP,i||d.END),this.adapter.removeThumbClass(I.THUMB_TOP,i===d.START?d.END:d.START)):(this.adapter.removeThumbClass(I.THUMB_TOP,d.START),this.adapter.removeThumbClass(I.THUMB_TOP,d.END))},e.prototype.convertAttributeValueToNumber=function(t,n){if(t===null)throw new Error("MDCSliderFoundation: `"+n+"` must be non-null.");var i=Number(t);if(isNaN(i))throw new Error("MDCSliderFoundation: `"+n+"` value is `"+t+"`, but must be a number.");return i},e.prototype.validateProperties=function(t){var n=t.min,i=t.max,r=t.value,o=t.valueStart,s=t.step,u=t.minRange;if(n>=i)throw new Error("MDCSliderFoundation: min must be strictly less than max. "+("Current: [min: "+n+", max: "+i+"]"));if(s<=0)throw new Error("MDCSliderFoundation: step must be a positive number. "+("Current step: "+s));if(this.isRange){if(r<n||r>i||o<n||o>i)throw new Error("MDCSliderFoundation: values must be in [min, max] range. "+("Current values: [start value: "+o+", end value: ")+(r+", min: "+n+", max: "+i+"]"));if(o>r)throw new Error("MDCSliderFoundation: start value must be <= end value. "+("Current values: [start value: "+o+", end value: "+r+"]"));if(u<0)throw new Error("MDCSliderFoundation: minimum range must be non-negative. "+("Current min range: "+u));if(r-o<u)throw new Error("MDCSliderFoundation: start value and end value must differ by at least "+(u+". Current values: [start value: "+o+", ")+("end value: "+r+"]"));var c=(o-n)/s,h=(r-n)/s;if(!Number.isInteger(parseFloat(c.toFixed(6)))||!Number.isInteger(parseFloat(h.toFixed(6))))throw new Error("MDCSliderFoundation: Slider values must be valid based on the "+("step value ("+s+"). Current values: [start value: ")+(o+", end value: "+r+", min: "+n+"]"))}else{if(r<n||r>i)throw new Error("MDCSliderFoundation: value must be in [min, max] range. "+("Current values: [value: "+r+", min: "+n+", max: "+i+"]"));var h=(r-n)/s;if(!Number.isInteger(parseFloat(h.toFixed(6))))throw new Error("MDCSliderFoundation: Slider value must be valid based on the "+("step value ("+s+"). Current value: "+r))}},e.prototype.registerEventHandlers=function(){this.adapter.registerWindowEventHandler("resize",this.resizeListener),e.SUPPORTS_POINTER_EVENTS?(this.adapter.registerEventHandler("pointerdown",this.pointerdownListener),this.adapter.registerEventHandler("pointerup",this.pointerupListener)):(this.adapter.registerEventHandler("mousedown",this.mousedownOrTouchstartListener),this.adapter.registerEventHandler("touchstart",this.mousedownOrTouchstartListener)),this.isRange&&(this.adapter.registerThumbEventHandler(d.START,"mouseenter",this.thumbMouseenterListener),this.adapter.registerThumbEventHandler(d.START,"mouseleave",this.thumbMouseleaveListener),this.adapter.registerInputEventHandler(d.START,"change",this.inputStartChangeListener),this.adapter.registerInputEventHandler(d.START,"focus",this.inputStartFocusListener),this.adapter.registerInputEventHandler(d.START,"blur",this.inputStartBlurListener)),this.adapter.registerThumbEventHandler(d.END,"mouseenter",this.thumbMouseenterListener),this.adapter.registerThumbEventHandler(d.END,"mouseleave",this.thumbMouseleaveListener),this.adapter.registerInputEventHandler(d.END,"change",this.inputEndChangeListener),this.adapter.registerInputEventHandler(d.END,"focus",this.inputEndFocusListener),this.adapter.registerInputEventHandler(d.END,"blur",this.inputEndBlurListener)},e.prototype.deregisterEventHandlers=function(){this.adapter.deregisterWindowEventHandler("resize",this.resizeListener),e.SUPPORTS_POINTER_EVENTS?(this.adapter.deregisterEventHandler("pointerdown",this.pointerdownListener),this.adapter.deregisterEventHandler("pointerup",this.pointerupListener)):(this.adapter.deregisterEventHandler("mousedown",this.mousedownOrTouchstartListener),this.adapter.deregisterEventHandler("touchstart",this.mousedownOrTouchstartListener)),this.isRange&&(this.adapter.deregisterThumbEventHandler(d.START,"mouseenter",this.thumbMouseenterListener),this.adapter.deregisterThumbEventHandler(d.START,"mouseleave",this.thumbMouseleaveListener),this.adapter.deregisterInputEventHandler(d.START,"change",this.inputStartChangeListener),this.adapter.deregisterInputEventHandler(d.START,"focus",this.inputStartFocusListener),this.adapter.deregisterInputEventHandler(d.START,"blur",this.inputStartBlurListener)),this.adapter.deregisterThumbEventHandler(d.END,"mouseenter",this.thumbMouseenterListener),this.adapter.deregisterThumbEventHandler(d.END,"mouseleave",this.thumbMouseleaveListener),this.adapter.deregisterInputEventHandler(d.END,"change",this.inputEndChangeListener),this.adapter.deregisterInputEventHandler(d.END,"focus",this.inputEndFocusListener),this.adapter.deregisterInputEventHandler(d.END,"blur",this.inputEndBlurListener)},e.prototype.handlePointerup=function(){this.handleUp(),this.adapter.deregisterEventHandler("pointermove",this.moveListener)},e.SUPPORTS_POINTER_EVENTS=ne&&!!window.PointerEvent&&!si(),e})(C);function si(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}function ke(a){var e=/(?:\.(\d+))?(?:[eE]([+\-]?\d+))?$/.exec(String(a));if(!e)return 0;var t=e[1]||"",n=e[2]||0;return Math.max(0,(t==="0"?0:t.length)-Number(n))}/**
|
|
1486
|
+
* @license
|
|
1487
|
+
* Copyright 2020 Google Inc.
|
|
1488
|
+
*
|
|
1489
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
1490
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
1491
|
+
* in the Software without restriction, including without limitation the rights
|
|
1492
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
1493
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
1494
|
+
* furnished to do so, subject to the following conditions:
|
|
1495
|
+
*
|
|
1496
|
+
* The above copyright notice and this permission notice shall be included in
|
|
1497
|
+
* all copies or substantial portions of the Software.
|
|
1498
|
+
*
|
|
1499
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
1500
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
1501
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
1502
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
1503
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
1504
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
1505
|
+
* THE SOFTWARE.
|
|
1506
|
+
*/var ui=(function(a){l.__extends(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.skipInitialUIUpdate=!1,t.valueToAriaValueTextFn=null,t}return e.attachTo=function(t,n){return n===void 0&&(n={}),new e(t,void 0,n)},e.prototype.getDefaultFoundation=function(){var t=this,n={hasClass:function(i){return t.root.classList.contains(i)},addClass:function(i){t.root.classList.add(i)},removeClass:function(i){t.root.classList.remove(i)},addThumbClass:function(i,r){t.getThumbEl(r).classList.add(i)},removeThumbClass:function(i,r){t.getThumbEl(r).classList.remove(i)},getAttribute:function(i){return t.root.getAttribute(i)},getInputValue:function(i){return t.getInput(i).value},setInputValue:function(i,r){t.getInput(r).value=i},getInputAttribute:function(i,r){return t.getInput(r).getAttribute(i)},setInputAttribute:function(i,r,o){t.getInput(o).setAttribute(i,r)},removeInputAttribute:function(i,r){t.getInput(r).removeAttribute(i)},focusInput:function(i){t.getInput(i).focus()},isInputFocused:function(i){return t.getInput(i)===document.activeElement},shouldHideFocusStylesForPointerEvents:function(){return!1},getThumbKnobWidth:function(i){return t.getThumbEl(i).querySelector("."+I.THUMB_KNOB).getBoundingClientRect().width},getThumbBoundingClientRect:function(i){return t.getThumbEl(i).getBoundingClientRect()},getBoundingClientRect:function(){return t.root.getBoundingClientRect()},getValueIndicatorContainerWidth:function(i){return t.getThumbEl(i).querySelector("."+I.VALUE_INDICATOR_CONTAINER).getBoundingClientRect().width},isRTL:function(){return getComputedStyle(t.root).direction==="rtl"},setThumbStyleProperty:function(i,r,o){t.getThumbEl(o).style.setProperty(i,r)},removeThumbStyleProperty:function(i,r){t.getThumbEl(r).style.removeProperty(i)},setTrackActiveStyleProperty:function(i,r){t.trackActive.style.setProperty(i,r)},removeTrackActiveStyleProperty:function(i){t.trackActive.style.removeProperty(i)},setValueIndicatorText:function(i,r){var o=t.getThumbEl(r).querySelector("."+I.VALUE_INDICATOR_TEXT);o.textContent=String(i)},getValueToAriaValueTextFn:function(){return t.valueToAriaValueTextFn},updateTickMarks:function(i){var r=t.root.querySelector("."+I.TICK_MARKS_CONTAINER);if(!r){r=document.createElement("div"),r.classList.add(I.TICK_MARKS_CONTAINER);var o=t.root.querySelector("."+I.TRACK);o.appendChild(r)}if(i.length!==r.children.length){for(;r.firstChild;)r.removeChild(r.firstChild);t.addTickMarks(r,i)}else t.updateTickMarks(r,i)},setPointerCapture:function(i){t.root.setPointerCapture(i)},emitChangeEvent:function(i,r){t.emit(Fe.CHANGE,{value:i,thumb:r})},emitInputEvent:function(i,r){t.emit(Fe.INPUT,{value:i,thumb:r})},emitDragStartEvent:function(i,r){t.getRipple(r).activate()},emitDragEndEvent:function(i,r){t.getRipple(r).deactivate()},registerEventHandler:function(i,r){t.listen(i,r)},deregisterEventHandler:function(i,r){t.unlisten(i,r)},registerThumbEventHandler:function(i,r,o){t.getThumbEl(i).addEventListener(r,o)},deregisterThumbEventHandler:function(i,r,o){t.getThumbEl(i).removeEventListener(r,o)},registerInputEventHandler:function(i,r,o){t.getInput(i).addEventListener(r,o)},deregisterInputEventHandler:function(i,r,o){t.getInput(i).removeEventListener(r,o)},registerBodyEventHandler:function(i,r){document.body.addEventListener(i,r)},deregisterBodyEventHandler:function(i,r){document.body.removeEventListener(i,r)},registerWindowEventHandler:function(i,r){window.addEventListener(i,r)},deregisterWindowEventHandler:function(i,r){window.removeEventListener(i,r)}};return new oi(n)},e.prototype.initialize=function(t){var n=t===void 0?{}:t,i=n.skipInitialUIUpdate;this.inputs=[].slice.call(this.root.querySelectorAll("."+I.INPUT)),this.thumbs=[].slice.call(this.root.querySelectorAll("."+I.THUMB)),this.trackActive=this.root.querySelector("."+I.TRACK_ACTIVE),this.ripples=this.createRipples(),i&&(this.skipInitialUIUpdate=!0)},e.prototype.initialSyncWithDOM=function(){this.foundation.layout({skipUpdateUI:this.skipInitialUIUpdate})},e.prototype.layout=function(){this.foundation.layout()},e.prototype.getValueStart=function(){return this.foundation.getValueStart()},e.prototype.setValueStart=function(t){this.foundation.setValueStart(t)},e.prototype.getValue=function(){return this.foundation.getValue()},e.prototype.setValue=function(t){this.foundation.setValue(t)},e.prototype.getDisabled=function(){return this.foundation.getDisabled()},e.prototype.setDisabled=function(t){this.foundation.setDisabled(t)},e.prototype.setValueToAriaValueTextFn=function(t){this.valueToAriaValueTextFn=t},e.prototype.getThumbEl=function(t){return t===d.END?this.thumbs[this.thumbs.length-1]:this.thumbs[0]},e.prototype.getInput=function(t){return t===d.END?this.inputs[this.inputs.length-1]:this.inputs[0]},e.prototype.getRipple=function(t){return t===d.END?this.ripples[this.ripples.length-1]:this.ripples[0]},e.prototype.addTickMarks=function(t,n){for(var i=document.createDocumentFragment(),r=0;r<n.length;r++){var o=document.createElement("div"),s=n[r]===bt.ACTIVE?I.TICK_MARK_ACTIVE:I.TICK_MARK_INACTIVE;o.classList.add(s),i.appendChild(o)}t.appendChild(i)},e.prototype.updateTickMarks=function(t,n){for(var i=Array.from(t.children),r=0;r<i.length;r++)n[r]===bt.ACTIVE?(i[r].classList.add(I.TICK_MARK_ACTIVE),i[r].classList.remove(I.TICK_MARK_INACTIVE)):(i[r].classList.add(I.TICK_MARK_INACTIVE),i[r].classList.remove(I.TICK_MARK_ACTIVE))},e.prototype.createRipples=function(){for(var t=[],n=[].slice.call(this.root.querySelectorAll("."+I.THUMB)),i=function(s){var u=n[s],c=r.inputs[s],h=l.__assign(l.__assign({},D.createAdapter(r)),{addClass:function(p){u.classList.add(p)},computeBoundingRect:function(){return u.getBoundingClientRect()},deregisterInteractionHandler:function(p,f){c.removeEventListener(p,f)},isSurfaceActive:function(){return it(c,":active")},isUnbounded:function(){return!0},registerInteractionHandler:function(p,f){c.addEventListener(p,f,O())},removeClass:function(p){u.classList.remove(p)},updateCssVariable:function(p,f){u.style.setProperty(p,f)}}),E=new D(u,new pt(h));E.unbounded=!0,t.push(E)},r=this,o=0;o<n.length;o++)i(o);return t},e})(T);/**
|
|
1507
|
+
* @license
|
|
1508
|
+
* Copyright 2018 Google Inc.
|
|
1509
|
+
*
|
|
1510
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
1511
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
1512
|
+
* in the Software without restriction, including without limitation the rights
|
|
1513
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
1514
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
1515
|
+
* furnished to do so, subject to the following conditions:
|
|
1516
|
+
*
|
|
1517
|
+
* The above copyright notice and this permission notice shall be included in
|
|
1518
|
+
* all copies or substantial portions of the Software.
|
|
1519
|
+
*
|
|
1520
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
1521
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
1522
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
1523
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
1524
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
1525
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
1526
|
+
* THE SOFTWARE.
|
|
1527
|
+
*/var un={ANIMATING:"mdc-tab-scroller--animating",SCROLL_AREA_SCROLL:"mdc-tab-scroller__scroll-area--scroll",SCROLL_TEST:"mdc-tab-scroller__test"},li={AREA_SELECTOR:".mdc-tab-scroller__scroll-area",CONTENT_SELECTOR:".mdc-tab-scroller__scroll-content"};/**
|
|
1528
|
+
* @license
|
|
1529
|
+
* Copyright 2018 Google Inc.
|
|
1530
|
+
*
|
|
1531
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
1532
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
1533
|
+
* in the Software without restriction, including without limitation the rights
|
|
1534
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
1535
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
1536
|
+
* furnished to do so, subject to the following conditions:
|
|
1537
|
+
*
|
|
1538
|
+
* The above copyright notice and this permission notice shall be included in
|
|
1539
|
+
* all copies or substantial portions of the Software.
|
|
1540
|
+
*
|
|
1541
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
1542
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
1543
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
1544
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
1545
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
1546
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
1547
|
+
* THE SOFTWARE.
|
|
1548
|
+
*/var ce=(function(){function a(e){this.adapter=e}return a})();/**
|
|
1549
|
+
* @license
|
|
1550
|
+
* Copyright 2018 Google Inc.
|
|
1551
|
+
*
|
|
1552
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
1553
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
1554
|
+
* in the Software without restriction, including without limitation the rights
|
|
1555
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
1556
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
1557
|
+
* furnished to do so, subject to the following conditions:
|
|
1558
|
+
*
|
|
1559
|
+
* The above copyright notice and this permission notice shall be included in
|
|
1560
|
+
* all copies or substantial portions of the Software.
|
|
1561
|
+
*
|
|
1562
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
1563
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
1564
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
1565
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
1566
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
1567
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
1568
|
+
* THE SOFTWARE.
|
|
1569
|
+
*/var di=(function(a){l.__extends(e,a);function e(){return a!==null&&a.apply(this,arguments)||this}return e.prototype.getScrollPositionRTL=function(){var t=this.adapter.getScrollAreaScrollLeft(),n=this.calculateScrollEdges().right;return Math.round(n-t)},e.prototype.scrollToRTL=function(t){var n=this.calculateScrollEdges(),i=this.adapter.getScrollAreaScrollLeft(),r=this.clampScrollValue(n.right-t);return{finalScrollPosition:r,scrollDelta:r-i}},e.prototype.incrementScrollRTL=function(t){var n=this.adapter.getScrollAreaScrollLeft(),i=this.clampScrollValue(n-t);return{finalScrollPosition:i,scrollDelta:i-n}},e.prototype.getAnimatingScrollPosition=function(t){return t},e.prototype.calculateScrollEdges=function(){var t=this.adapter.getScrollContentOffsetWidth(),n=this.adapter.getScrollAreaOffsetWidth();return{left:0,right:t-n}},e.prototype.clampScrollValue=function(t){var n=this.calculateScrollEdges();return Math.min(Math.max(n.left,t),n.right)},e})(ce);/**
|
|
1570
|
+
* @license
|
|
1571
|
+
* Copyright 2018 Google Inc.
|
|
1572
|
+
*
|
|
1573
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
1574
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
1575
|
+
* in the Software without restriction, including without limitation the rights
|
|
1576
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
1577
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
1578
|
+
* furnished to do so, subject to the following conditions:
|
|
1579
|
+
*
|
|
1580
|
+
* The above copyright notice and this permission notice shall be included in
|
|
1581
|
+
* all copies or substantial portions of the Software.
|
|
1582
|
+
*
|
|
1583
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
1584
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
1585
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
1586
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
1587
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
1588
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
1589
|
+
* THE SOFTWARE.
|
|
1590
|
+
*/var ci=(function(a){l.__extends(e,a);function e(){return a!==null&&a.apply(this,arguments)||this}return e.prototype.getScrollPositionRTL=function(t){var n=this.adapter.getScrollAreaScrollLeft();return Math.round(t-n)},e.prototype.scrollToRTL=function(t){var n=this.adapter.getScrollAreaScrollLeft(),i=this.clampScrollValue(-t);return{finalScrollPosition:i,scrollDelta:i-n}},e.prototype.incrementScrollRTL=function(t){var n=this.adapter.getScrollAreaScrollLeft(),i=this.clampScrollValue(n-t);return{finalScrollPosition:i,scrollDelta:i-n}},e.prototype.getAnimatingScrollPosition=function(t,n){return t-n},e.prototype.calculateScrollEdges=function(){var t=this.adapter.getScrollContentOffsetWidth(),n=this.adapter.getScrollAreaOffsetWidth();return{left:n-t,right:0}},e.prototype.clampScrollValue=function(t){var n=this.calculateScrollEdges();return Math.max(Math.min(n.right,t),n.left)},e})(ce);/**
|
|
1591
|
+
* @license
|
|
1592
|
+
* Copyright 2018 Google Inc.
|
|
1593
|
+
*
|
|
1594
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
1595
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
1596
|
+
* in the Software without restriction, including without limitation the rights
|
|
1597
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
1598
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
1599
|
+
* furnished to do so, subject to the following conditions:
|
|
1600
|
+
*
|
|
1601
|
+
* The above copyright notice and this permission notice shall be included in
|
|
1602
|
+
* all copies or substantial portions of the Software.
|
|
1603
|
+
*
|
|
1604
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
1605
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
1606
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
1607
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
1608
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
1609
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
1610
|
+
* THE SOFTWARE.
|
|
1611
|
+
*/var hi=(function(a){l.__extends(e,a);function e(){return a!==null&&a.apply(this,arguments)||this}return e.prototype.getScrollPositionRTL=function(t){var n=this.adapter.getScrollAreaScrollLeft();return Math.round(n-t)},e.prototype.scrollToRTL=function(t){var n=this.adapter.getScrollAreaScrollLeft(),i=this.clampScrollValue(t);return{finalScrollPosition:i,scrollDelta:n-i}},e.prototype.incrementScrollRTL=function(t){var n=this.adapter.getScrollAreaScrollLeft(),i=this.clampScrollValue(n+t);return{finalScrollPosition:i,scrollDelta:n-i}},e.prototype.getAnimatingScrollPosition=function(t,n){return t+n},e.prototype.calculateScrollEdges=function(){var t=this.adapter.getScrollContentOffsetWidth(),n=this.adapter.getScrollAreaOffsetWidth();return{left:t-n,right:0}},e.prototype.clampScrollValue=function(t){var n=this.calculateScrollEdges();return Math.min(Math.max(n.right,t),n.left)},e})(ce);/**
|
|
1612
|
+
* @license
|
|
1613
|
+
* Copyright 2018 Google Inc.
|
|
1614
|
+
*
|
|
1615
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
1616
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
1617
|
+
* in the Software without restriction, including without limitation the rights
|
|
1618
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
1619
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
1620
|
+
* furnished to do so, subject to the following conditions:
|
|
1621
|
+
*
|
|
1622
|
+
* The above copyright notice and this permission notice shall be included in
|
|
1623
|
+
* all copies or substantial portions of the Software.
|
|
1624
|
+
*
|
|
1625
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
1626
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
1627
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
1628
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
1629
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
1630
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
1631
|
+
* THE SOFTWARE.
|
|
1632
|
+
*/var ie=(function(a){l.__extends(e,a);function e(t){var n=a.call(this,l.__assign(l.__assign({},e.defaultAdapter),t))||this;return n.isAnimating=!1,n}return Object.defineProperty(e,"cssClasses",{get:function(){return un},enumerable:!1,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return li},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{eventTargetMatchesSelector:function(){return!1},addClass:function(){},removeClass:function(){},addScrollAreaClass:function(){},setScrollAreaStyleProperty:function(){},setScrollContentStyleProperty:function(){},getScrollContentStyleValue:function(){return""},setScrollAreaScrollLeft:function(){},getScrollAreaScrollLeft:function(){return 0},getScrollContentOffsetWidth:function(){return 0},getScrollAreaOffsetWidth:function(){return 0},computeScrollAreaClientRect:function(){return{top:0,right:0,bottom:0,left:0,width:0,height:0}},computeScrollContentClientRect:function(){return{top:0,right:0,bottom:0,left:0,width:0,height:0}},computeHorizontalScrollbarHeight:function(){return 0}}},enumerable:!1,configurable:!0}),e.prototype.init=function(){var t=this.adapter.computeHorizontalScrollbarHeight();this.adapter.setScrollAreaStyleProperty("margin-bottom",-t+"px"),this.adapter.addScrollAreaClass(e.cssClasses.SCROLL_AREA_SCROLL)},e.prototype.getScrollPosition=function(){if(this.isRTL())return this.computeCurrentScrollPositionRTL();var t=this.calculateCurrentTranslateX(),n=this.adapter.getScrollAreaScrollLeft();return n-t},e.prototype.handleInteraction=function(){this.isAnimating&&this.stopScrollAnimation()},e.prototype.handleTransitionEnd=function(t){var n=t.target;!this.isAnimating||!this.adapter.eventTargetMatchesSelector(n,e.strings.CONTENT_SELECTOR)||(this.isAnimating=!1,this.adapter.removeClass(e.cssClasses.ANIMATING))},e.prototype.incrementScroll=function(t){t!==0&&this.animate(this.getIncrementScrollOperation(t))},e.prototype.incrementScrollImmediate=function(t){if(t!==0){var n=this.getIncrementScrollOperation(t);n.scrollDelta!==0&&(this.stopScrollAnimation(),this.adapter.setScrollAreaScrollLeft(n.finalScrollPosition))}},e.prototype.scrollTo=function(t){if(this.isRTL()){this.scrollToImplRTL(t);return}this.scrollToImpl(t)},e.prototype.getRTLScroller=function(){return this.rtlScrollerInstance||(this.rtlScrollerInstance=this.rtlScrollerFactory()),this.rtlScrollerInstance},e.prototype.calculateCurrentTranslateX=function(){var t=this.adapter.getScrollContentStyleValue("transform");if(t==="none")return 0;var n=/\((.+?)\)/.exec(t);if(!n)return 0;var i=n[1],r=l.__read(i.split(","),6);r[0],r[1],r[2],r[3];var o=r[4];return r[5],parseFloat(o)},e.prototype.clampScrollValue=function(t){var n=this.calculateScrollEdges();return Math.min(Math.max(n.left,t),n.right)},e.prototype.computeCurrentScrollPositionRTL=function(){var t=this.calculateCurrentTranslateX();return this.getRTLScroller().getScrollPositionRTL(t)},e.prototype.calculateScrollEdges=function(){var t=this.adapter.getScrollContentOffsetWidth(),n=this.adapter.getScrollAreaOffsetWidth();return{left:0,right:t-n}},e.prototype.scrollToImpl=function(t){var n=this.getScrollPosition(),i=this.clampScrollValue(t),r=i-n;this.animate({finalScrollPosition:i,scrollDelta:r})},e.prototype.scrollToImplRTL=function(t){var n=this.getRTLScroller().scrollToRTL(t);this.animate(n)},e.prototype.getIncrementScrollOperation=function(t){if(this.isRTL())return this.getRTLScroller().incrementScrollRTL(t);var n=this.getScrollPosition(),i=t+n,r=this.clampScrollValue(i),o=r-n;return{finalScrollPosition:r,scrollDelta:o}},e.prototype.animate=function(t){var n=this;t.scrollDelta!==0&&(this.stopScrollAnimation(),this.adapter.setScrollAreaScrollLeft(t.finalScrollPosition),this.adapter.setScrollContentStyleProperty("transform","translateX("+t.scrollDelta+"px)"),this.adapter.computeScrollAreaClientRect(),requestAnimationFrame(function(){n.adapter.addClass(e.cssClasses.ANIMATING),n.adapter.setScrollContentStyleProperty("transform","none")}),this.isAnimating=!0)},e.prototype.stopScrollAnimation=function(){this.isAnimating=!1;var t=this.getAnimatingScrollPosition();this.adapter.removeClass(e.cssClasses.ANIMATING),this.adapter.setScrollContentStyleProperty("transform","translateX(0px)"),this.adapter.setScrollAreaScrollLeft(t)},e.prototype.getAnimatingScrollPosition=function(){var t=this.calculateCurrentTranslateX(),n=this.adapter.getScrollAreaScrollLeft();return this.isRTL()?this.getRTLScroller().getAnimatingScrollPosition(n,t):n-t},e.prototype.rtlScrollerFactory=function(){var t=this.adapter.getScrollAreaScrollLeft();this.adapter.setScrollAreaScrollLeft(t-1);var n=this.adapter.getScrollAreaScrollLeft();if(n<0)return this.adapter.setScrollAreaScrollLeft(t),new ci(this.adapter);var i=this.adapter.computeScrollAreaClientRect(),r=this.adapter.computeScrollContentClientRect(),o=Math.round(r.right-i.right);return this.adapter.setScrollAreaScrollLeft(t),o===n?new hi(this.adapter):new di(this.adapter)},e.prototype.isRTL=function(){return this.adapter.getScrollContentStyleValue("direction")==="rtl"},e})(C);/**
|
|
1633
|
+
* @license
|
|
1634
|
+
* Copyright 2018 Google Inc.
|
|
1635
|
+
*
|
|
1636
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
1637
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
1638
|
+
* in the Software without restriction, including without limitation the rights
|
|
1639
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
1640
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
1641
|
+
* furnished to do so, subject to the following conditions:
|
|
1642
|
+
*
|
|
1643
|
+
* The above copyright notice and this permission notice shall be included in
|
|
1644
|
+
* all copies or substantial portions of the Software.
|
|
1645
|
+
*
|
|
1646
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
1647
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
1648
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
1649
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
1650
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
1651
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
1652
|
+
* THE SOFTWARE.
|
|
1653
|
+
*/var re;function fi(a,e){if(e===void 0&&(e=!0),e&&typeof re<"u")return re;var t=a.createElement("div");t.classList.add(un.SCROLL_TEST),a.body.appendChild(t);var n=t.offsetHeight-t.clientHeight;return a.body.removeChild(t),e&&(re=n),n}/**
|
|
1654
|
+
* @license
|
|
1655
|
+
* Copyright 2018 Google Inc.
|
|
1656
|
+
*
|
|
1657
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
1658
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
1659
|
+
* in the Software without restriction, including without limitation the rights
|
|
1660
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
1661
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
1662
|
+
* furnished to do so, subject to the following conditions:
|
|
1663
|
+
*
|
|
1664
|
+
* The above copyright notice and this permission notice shall be included in
|
|
1665
|
+
* all copies or substantial portions of the Software.
|
|
1666
|
+
*
|
|
1667
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
1668
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
1669
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
1670
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
1671
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
1672
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
1673
|
+
* THE SOFTWARE.
|
|
1674
|
+
*/var pi=(function(a){l.__extends(e,a);function e(){return a!==null&&a.apply(this,arguments)||this}return e.attachTo=function(t){return new e(t)},e.prototype.initialize=function(){this.area=this.root.querySelector(ie.strings.AREA_SELECTOR),this.content=this.root.querySelector(ie.strings.CONTENT_SELECTOR)},e.prototype.initialSyncWithDOM=function(){var t=this;this.handleInteraction=function(){t.foundation.handleInteraction()},this.handleTransitionEnd=function(n){t.foundation.handleTransitionEnd(n)},this.area.addEventListener("wheel",this.handleInteraction,O()),this.area.addEventListener("touchstart",this.handleInteraction,O()),this.area.addEventListener("pointerdown",this.handleInteraction,O()),this.area.addEventListener("mousedown",this.handleInteraction,O()),this.area.addEventListener("keydown",this.handleInteraction,O()),this.content.addEventListener("transitionend",this.handleTransitionEnd)},e.prototype.destroy=function(){a.prototype.destroy.call(this),this.area.removeEventListener("wheel",this.handleInteraction,O()),this.area.removeEventListener("touchstart",this.handleInteraction,O()),this.area.removeEventListener("pointerdown",this.handleInteraction,O()),this.area.removeEventListener("mousedown",this.handleInteraction,O()),this.area.removeEventListener("keydown",this.handleInteraction,O()),this.content.removeEventListener("transitionend",this.handleTransitionEnd)},e.prototype.getDefaultFoundation=function(){var t=this,n={eventTargetMatchesSelector:function(i,r){return it(i,r)},addClass:function(i){t.root.classList.add(i)},removeClass:function(i){t.root.classList.remove(i)},addScrollAreaClass:function(i){t.area.classList.add(i)},setScrollAreaStyleProperty:function(i,r){t.area.style.setProperty(i,r)},setScrollContentStyleProperty:function(i,r){t.content.style.setProperty(i,r)},getScrollContentStyleValue:function(i){return window.getComputedStyle(t.content).getPropertyValue(i)},setScrollAreaScrollLeft:function(i){return t.area.scrollLeft=i},getScrollAreaScrollLeft:function(){return t.area.scrollLeft},getScrollContentOffsetWidth:function(){return t.content.offsetWidth},getScrollAreaOffsetWidth:function(){return t.area.offsetWidth},computeScrollAreaClientRect:function(){return t.area.getBoundingClientRect()},computeScrollContentClientRect:function(){return t.content.getBoundingClientRect()},computeHorizontalScrollbarHeight:function(){return fi(document)}};return new ie(n)},e.prototype.getScrollPosition=function(){return this.foundation.getScrollPosition()},e.prototype.getScrollContentWidth=function(){return this.content.offsetWidth},e.prototype.incrementScroll=function(t){this.foundation.incrementScroll(t)},e.prototype.scrollTo=function(t){this.foundation.scrollTo(t)},e})(T);/**
|
|
1675
|
+
* @license
|
|
1676
|
+
* Copyright 2018 Google Inc.
|
|
1677
|
+
*
|
|
1678
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
1679
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
1680
|
+
* in the Software without restriction, including without limitation the rights
|
|
1681
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
1682
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
1683
|
+
* furnished to do so, subject to the following conditions:
|
|
1684
|
+
*
|
|
1685
|
+
* The above copyright notice and this permission notice shall be included in
|
|
1686
|
+
* all copies or substantial portions of the Software.
|
|
1687
|
+
*
|
|
1688
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
1689
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
1690
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
1691
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
1692
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
1693
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
1694
|
+
* THE SOFTWARE.
|
|
1695
|
+
*/var Ei={ACTIVE:"mdc-tab-indicator--active",FADE:"mdc-tab-indicator--fade",NO_TRANSITION:"mdc-tab-indicator--no-transition"},mi={CONTENT_SELECTOR:".mdc-tab-indicator__content"};/**
|
|
1696
|
+
* @license
|
|
1697
|
+
* Copyright 2018 Google Inc.
|
|
1698
|
+
*
|
|
1699
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
1700
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
1701
|
+
* in the Software without restriction, including without limitation the rights
|
|
1702
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
1703
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
1704
|
+
* furnished to do so, subject to the following conditions:
|
|
1705
|
+
*
|
|
1706
|
+
* The above copyright notice and this permission notice shall be included in
|
|
1707
|
+
* all copies or substantial portions of the Software.
|
|
1708
|
+
*
|
|
1709
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
1710
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
1711
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
1712
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
1713
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
1714
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
1715
|
+
* THE SOFTWARE.
|
|
1716
|
+
*/var nt=(function(a){l.__extends(e,a);function e(t){return a.call(this,l.__assign(l.__assign({},e.defaultAdapter),t))||this}return Object.defineProperty(e,"cssClasses",{get:function(){return Ei},enumerable:!1,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return mi},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},computeContentClientRect:function(){return{top:0,right:0,bottom:0,left:0,width:0,height:0}},setContentStyleProperty:function(){}}},enumerable:!1,configurable:!0}),e.prototype.computeContentClientRect=function(){return this.adapter.computeContentClientRect()},e})(C);/**
|
|
1717
|
+
* @license
|
|
1718
|
+
* Copyright 2018 Google Inc.
|
|
1719
|
+
*
|
|
1720
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
1721
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
1722
|
+
* in the Software without restriction, including without limitation the rights
|
|
1723
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
1724
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
1725
|
+
* furnished to do so, subject to the following conditions:
|
|
1726
|
+
*
|
|
1727
|
+
* The above copyright notice and this permission notice shall be included in
|
|
1728
|
+
* all copies or substantial portions of the Software.
|
|
1729
|
+
*
|
|
1730
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
1731
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
1732
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
1733
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
1734
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
1735
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
1736
|
+
* THE SOFTWARE.
|
|
1737
|
+
*/var gi=(function(a){l.__extends(e,a);function e(){return a!==null&&a.apply(this,arguments)||this}return e.prototype.activate=function(){this.adapter.addClass(nt.cssClasses.ACTIVE)},e.prototype.deactivate=function(){this.adapter.removeClass(nt.cssClasses.ACTIVE)},e})(nt);/**
|
|
1738
|
+
* @license
|
|
1739
|
+
* Copyright 2018 Google Inc.
|
|
1740
|
+
*
|
|
1741
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
1742
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
1743
|
+
* in the Software without restriction, including without limitation the rights
|
|
1744
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
1745
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
1746
|
+
* furnished to do so, subject to the following conditions:
|
|
1747
|
+
*
|
|
1748
|
+
* The above copyright notice and this permission notice shall be included in
|
|
1749
|
+
* all copies or substantial portions of the Software.
|
|
1750
|
+
*
|
|
1751
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
1752
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
1753
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
1754
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
1755
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
1756
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
1757
|
+
* THE SOFTWARE.
|
|
1758
|
+
*/var Ai=(function(a){l.__extends(e,a);function e(){return a!==null&&a.apply(this,arguments)||this}return e.prototype.activate=function(t){if(!t){this.adapter.addClass(nt.cssClasses.ACTIVE);return}var n=this.computeContentClientRect(),i=t.width/n.width,r=t.left-n.left;this.adapter.addClass(nt.cssClasses.NO_TRANSITION),this.adapter.setContentStyleProperty("transform","translateX("+r+"px) scaleX("+i+")"),this.computeContentClientRect(),this.adapter.removeClass(nt.cssClasses.NO_TRANSITION),this.adapter.addClass(nt.cssClasses.ACTIVE),this.adapter.setContentStyleProperty("transform","")},e.prototype.deactivate=function(){this.adapter.removeClass(nt.cssClasses.ACTIVE)},e})(nt);/**
|
|
1759
|
+
* @license
|
|
1760
|
+
* Copyright 2018 Google Inc.
|
|
1761
|
+
*
|
|
1762
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
1763
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
1764
|
+
* in the Software without restriction, including without limitation the rights
|
|
1765
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
1766
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
1767
|
+
* furnished to do so, subject to the following conditions:
|
|
1768
|
+
*
|
|
1769
|
+
* The above copyright notice and this permission notice shall be included in
|
|
1770
|
+
* all copies or substantial portions of the Software.
|
|
1771
|
+
*
|
|
1772
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
1773
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
1774
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
1775
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
1776
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
1777
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
1778
|
+
* THE SOFTWARE.
|
|
1779
|
+
*/var Ii=(function(a){l.__extends(e,a);function e(){return a!==null&&a.apply(this,arguments)||this}return e.attachTo=function(t){return new e(t)},e.prototype.initialize=function(){this.content=this.root.querySelector(nt.strings.CONTENT_SELECTOR)},e.prototype.computeContentClientRect=function(){return this.foundation.computeContentClientRect()},e.prototype.getDefaultFoundation=function(){var t=this,n={addClass:function(i){return t.root.classList.add(i)},removeClass:function(i){return t.root.classList.remove(i)},computeContentClientRect:function(){return t.content.getBoundingClientRect()},setContentStyleProperty:function(i,r){t.content.style.setProperty(i,r)}};return this.root.classList.contains(nt.cssClasses.FADE)?new gi(n):new Ai(n)},e.prototype.activate=function(t){this.foundation.activate(t)},e.prototype.deactivate=function(){this.foundation.deactivate()},e})(T);/**
|
|
1780
|
+
* @license
|
|
1781
|
+
* Copyright 2018 Google Inc.
|
|
1782
|
+
*
|
|
1783
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
1784
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
1785
|
+
* in the Software without restriction, including without limitation the rights
|
|
1786
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
1787
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
1788
|
+
* furnished to do so, subject to the following conditions:
|
|
1789
|
+
*
|
|
1790
|
+
* The above copyright notice and this permission notice shall be included in
|
|
1791
|
+
* all copies or substantial portions of the Software.
|
|
1792
|
+
*
|
|
1793
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
1794
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
1795
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
1796
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
1797
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
1798
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
1799
|
+
* THE SOFTWARE.
|
|
1800
|
+
*/var Xt={ACTIVE:"mdc-tab--active"},Ut={ARIA_SELECTED:"aria-selected",CONTENT_SELECTOR:".mdc-tab__content",INTERACTED_EVENT:"MDCTab:interacted",RIPPLE_SELECTOR:".mdc-tab__ripple",TABINDEX:"tabIndex",TAB_INDICATOR_SELECTOR:".mdc-tab-indicator"};/**
|
|
1801
|
+
* @license
|
|
1802
|
+
* Copyright 2018 Google Inc.
|
|
1803
|
+
*
|
|
1804
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
1805
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
1806
|
+
* in the Software without restriction, including without limitation the rights
|
|
1807
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
1808
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
1809
|
+
* furnished to do so, subject to the following conditions:
|
|
1810
|
+
*
|
|
1811
|
+
* The above copyright notice and this permission notice shall be included in
|
|
1812
|
+
* all copies or substantial portions of the Software.
|
|
1813
|
+
*
|
|
1814
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
1815
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
1816
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
1817
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
1818
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
1819
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
1820
|
+
* THE SOFTWARE.
|
|
1821
|
+
*/var Nt=(function(a){l.__extends(e,a);function e(t){var n=a.call(this,l.__assign(l.__assign({},e.defaultAdapter),t))||this;return n.focusOnActivate=!0,n}return Object.defineProperty(e,"cssClasses",{get:function(){return Xt},enumerable:!1,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return Ut},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!1},setAttr:function(){},activateIndicator:function(){},deactivateIndicator:function(){},notifyInteracted:function(){},getOffsetLeft:function(){return 0},getOffsetWidth:function(){return 0},getContentOffsetLeft:function(){return 0},getContentOffsetWidth:function(){return 0},focus:function(){}}},enumerable:!1,configurable:!0}),e.prototype.handleClick=function(){this.adapter.notifyInteracted()},e.prototype.isActive=function(){return this.adapter.hasClass(Xt.ACTIVE)},e.prototype.setFocusOnActivate=function(t){this.focusOnActivate=t},e.prototype.activate=function(t){this.adapter.addClass(Xt.ACTIVE),this.adapter.setAttr(Ut.ARIA_SELECTED,"true"),this.adapter.setAttr(Ut.TABINDEX,"0"),this.adapter.activateIndicator(t),this.focusOnActivate&&this.adapter.focus()},e.prototype.deactivate=function(){this.isActive()&&(this.adapter.removeClass(Xt.ACTIVE),this.adapter.setAttr(Ut.ARIA_SELECTED,"false"),this.adapter.setAttr(Ut.TABINDEX,"-1"),this.adapter.deactivateIndicator())},e.prototype.computeDimensions=function(){var t=this.adapter.getOffsetWidth(),n=this.adapter.getOffsetLeft(),i=this.adapter.getContentOffsetWidth(),r=this.adapter.getContentOffsetLeft();return{contentLeft:n+r,contentRight:n+r+i,rootLeft:n,rootRight:n+t}},e})(C);/**
|
|
1822
|
+
* @license
|
|
1823
|
+
* Copyright 2018 Google Inc.
|
|
1824
|
+
*
|
|
1825
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
1826
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
1827
|
+
* in the Software without restriction, including without limitation the rights
|
|
1828
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
1829
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
1830
|
+
* furnished to do so, subject to the following conditions:
|
|
1831
|
+
*
|
|
1832
|
+
* The above copyright notice and this permission notice shall be included in
|
|
1833
|
+
* all copies or substantial portions of the Software.
|
|
1834
|
+
*
|
|
1835
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
1836
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
1837
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
1838
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
1839
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
1840
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
1841
|
+
* THE SOFTWARE.
|
|
1842
|
+
*/var vi=(function(a){l.__extends(e,a);function e(){return a!==null&&a.apply(this,arguments)||this}return e.attachTo=function(t){return new e(t)},e.prototype.initialize=function(t,n){t===void 0&&(t=function(o,s){return new D(o,s)}),n===void 0&&(n=function(o){return new Ii(o)}),this.id=this.root.id;var i=new pt(D.createAdapter(this));this.ripple=t(this.root,i);var r=this.root.querySelector(Nt.strings.TAB_INDICATOR_SELECTOR);this.tabIndicator=n(r),this.content=this.root.querySelector(Nt.strings.CONTENT_SELECTOR)},e.prototype.initialSyncWithDOM=function(){var t=this;this.handleClick=function(){t.foundation.handleClick()},this.listen("click",this.handleClick)},e.prototype.destroy=function(){this.unlisten("click",this.handleClick),this.ripple.destroy(),a.prototype.destroy.call(this)},e.prototype.getDefaultFoundation=function(){var t=this,n={setAttr:function(i,r){return t.root.setAttribute(i,r)},addClass:function(i){return t.root.classList.add(i)},removeClass:function(i){return t.root.classList.remove(i)},hasClass:function(i){return t.root.classList.contains(i)},activateIndicator:function(i){t.tabIndicator.activate(i)},deactivateIndicator:function(){t.tabIndicator.deactivate()},notifyInteracted:function(){return t.emit(Nt.strings.INTERACTED_EVENT,{tabId:t.id},!0)},getOffsetLeft:function(){return t.root.offsetLeft},getOffsetWidth:function(){return t.root.offsetWidth},getContentOffsetLeft:function(){return t.content.offsetLeft},getContentOffsetWidth:function(){return t.content.offsetWidth},focus:function(){return t.root.focus()}};return new Nt(n)},Object.defineProperty(e.prototype,"active",{get:function(){return this.foundation.isActive()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"focusOnActivate",{set:function(t){this.foundation.setFocusOnActivate(t)},enumerable:!1,configurable:!0}),e.prototype.activate=function(t){this.foundation.activate(t)},e.prototype.deactivate=function(){this.foundation.deactivate()},e.prototype.computeIndicatorClientRect=function(){return this.tabIndicator.computeContentClientRect()},e.prototype.computeDimensions=function(){return this.foundation.computeDimensions()},e.prototype.focus=function(){this.root.focus()},e})(T);/**
|
|
1843
|
+
* @license
|
|
1844
|
+
* Copyright 2018 Google Inc.
|
|
1845
|
+
*
|
|
1846
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
1847
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
1848
|
+
* in the Software without restriction, including without limitation the rights
|
|
1849
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
1850
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
1851
|
+
* furnished to do so, subject to the following conditions:
|
|
1852
|
+
*
|
|
1853
|
+
* The above copyright notice and this permission notice shall be included in
|
|
1854
|
+
* all copies or substantial portions of the Software.
|
|
1855
|
+
*
|
|
1856
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
1857
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
1858
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
1859
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
1860
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
1861
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
1862
|
+
* THE SOFTWARE.
|
|
1863
|
+
*/var k={ARROW_LEFT_KEY:"ArrowLeft",ARROW_RIGHT_KEY:"ArrowRight",END_KEY:"End",ENTER_KEY:"Enter",HOME_KEY:"Home",SPACE_KEY:"Space",TAB_ACTIVATED_EVENT:"MDCTabBar:activated",TAB_SCROLLER_SELECTOR:".mdc-tab-scroller",TAB_SELECTOR:".mdc-tab"},rt={ARROW_LEFT_KEYCODE:37,ARROW_RIGHT_KEYCODE:39,END_KEYCODE:35,ENTER_KEYCODE:13,EXTRA_SCROLL_AMOUNT:20,HOME_KEYCODE:36,SPACE_KEYCODE:32};/**
|
|
1864
|
+
* @license
|
|
1865
|
+
* Copyright 2018 Google Inc.
|
|
1866
|
+
*
|
|
1867
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
1868
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
1869
|
+
* in the Software without restriction, including without limitation the rights
|
|
1870
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
1871
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
1872
|
+
* furnished to do so, subject to the following conditions:
|
|
1873
|
+
*
|
|
1874
|
+
* The above copyright notice and this permission notice shall be included in
|
|
1875
|
+
* all copies or substantial portions of the Software.
|
|
1876
|
+
*
|
|
1877
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
1878
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
1879
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
1880
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
1881
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
1882
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
1883
|
+
* THE SOFTWARE.
|
|
1884
|
+
*/var Rt=new Set;Rt.add(k.ARROW_LEFT_KEY);Rt.add(k.ARROW_RIGHT_KEY);Rt.add(k.END_KEY);Rt.add(k.HOME_KEY);Rt.add(k.ENTER_KEY);Rt.add(k.SPACE_KEY);var Lt=new Map;Lt.set(rt.ARROW_LEFT_KEYCODE,k.ARROW_LEFT_KEY);Lt.set(rt.ARROW_RIGHT_KEYCODE,k.ARROW_RIGHT_KEY);Lt.set(rt.END_KEYCODE,k.END_KEY);Lt.set(rt.HOME_KEYCODE,k.HOME_KEY);Lt.set(rt.ENTER_KEYCODE,k.ENTER_KEY);Lt.set(rt.SPACE_KEYCODE,k.SPACE_KEY);var ln=(function(a){l.__extends(e,a);function e(t){var n=a.call(this,l.__assign(l.__assign({},e.defaultAdapter),t))||this;return n.useAutomaticActivation=!1,n}return Object.defineProperty(e,"strings",{get:function(){return k},enumerable:!1,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return rt},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{scrollTo:function(){},incrementScroll:function(){},getScrollPosition:function(){return 0},getScrollContentWidth:function(){return 0},getOffsetWidth:function(){return 0},isRTL:function(){return!1},setActiveTab:function(){},activateTabAtIndex:function(){},deactivateTabAtIndex:function(){},focusTabAtIndex:function(){},getTabIndicatorClientRectAtIndex:function(){return{top:0,right:0,bottom:0,left:0,width:0,height:0}},getTabDimensionsAtIndex:function(){return{rootLeft:0,rootRight:0,contentLeft:0,contentRight:0}},getPreviousActiveTabIndex:function(){return-1},getFocusedTabIndex:function(){return-1},getIndexOfTabById:function(){return-1},getTabListLength:function(){return 0},notifyTabActivated:function(){}}},enumerable:!1,configurable:!0}),e.prototype.setUseAutomaticActivation=function(t){this.useAutomaticActivation=t},e.prototype.activateTab=function(t){var n=this.adapter.getPreviousActiveTabIndex();if(!(!this.indexIsInRange(t)||t===n)){var i;n!==-1&&(this.adapter.deactivateTabAtIndex(n),i=this.adapter.getTabIndicatorClientRectAtIndex(n)),this.adapter.activateTabAtIndex(t,i),this.scrollIntoView(t),this.adapter.notifyTabActivated(t)}},e.prototype.handleKeyDown=function(t){var n=this.getKeyFromEvent(t);if(n!==void 0)if(this.isActivationKey(n)||t.preventDefault(),this.useAutomaticActivation){if(this.isActivationKey(n))return;var i=this.determineTargetFromKey(this.adapter.getPreviousActiveTabIndex(),n);this.adapter.setActiveTab(i),this.scrollIntoView(i)}else{var r=this.adapter.getFocusedTabIndex();if(this.isActivationKey(n))this.adapter.setActiveTab(r);else{var i=this.determineTargetFromKey(r,n);this.adapter.focusTabAtIndex(i),this.scrollIntoView(i)}}},e.prototype.handleTabInteraction=function(t){this.adapter.setActiveTab(this.adapter.getIndexOfTabById(t.detail.tabId))},e.prototype.scrollIntoView=function(t){if(this.indexIsInRange(t)){if(t===0){this.adapter.scrollTo(0);return}if(t===this.adapter.getTabListLength()-1){this.adapter.scrollTo(this.adapter.getScrollContentWidth());return}if(this.isRTL()){this.scrollIntoViewImplRTL(t);return}this.scrollIntoViewImpl(t)}},e.prototype.determineTargetFromKey=function(t,n){var i=this.isRTL(),r=this.adapter.getTabListLength()-1,o=n===k.END_KEY,s=n===k.ARROW_LEFT_KEY&&!i||n===k.ARROW_RIGHT_KEY&&i,u=n===k.ARROW_RIGHT_KEY&&!i||n===k.ARROW_LEFT_KEY&&i,c=t;return o?c=r:s?c-=1:u?c+=1:c=0,c<0?c=r:c>r&&(c=0),c},e.prototype.calculateScrollIncrement=function(t,n,i,r){var o=this.adapter.getTabDimensionsAtIndex(n),s=o.contentLeft-i-r,u=o.contentRight-i,c=u-rt.EXTRA_SCROLL_AMOUNT,h=s+rt.EXTRA_SCROLL_AMOUNT;return n<t?Math.min(c,0):Math.max(h,0)},e.prototype.calculateScrollIncrementRTL=function(t,n,i,r,o){var s=this.adapter.getTabDimensionsAtIndex(n),u=o-s.contentLeft-i,c=o-s.contentRight-i-r,h=c+rt.EXTRA_SCROLL_AMOUNT,E=u-rt.EXTRA_SCROLL_AMOUNT;return n>t?Math.max(h,0):Math.min(E,0)},e.prototype.findAdjacentTabIndexClosestToEdge=function(t,n,i,r){var o=n.rootLeft-i,s=n.rootRight-i-r,u=o+s,c=o<0||u<0,h=s>0||u>0;return c?t-1:h?t+1:-1},e.prototype.findAdjacentTabIndexClosestToEdgeRTL=function(t,n,i,r,o){var s=o-n.rootLeft-r-i,u=o-n.rootRight-i,c=s+u,h=s>0||c>0,E=u<0||c<0;return h?t+1:E?t-1:-1},e.prototype.getKeyFromEvent=function(t){return Rt.has(t.key)?t.key:Lt.get(t.keyCode)},e.prototype.isActivationKey=function(t){return t===k.SPACE_KEY||t===k.ENTER_KEY},e.prototype.indexIsInRange=function(t){return t>=0&&t<this.adapter.getTabListLength()},e.prototype.isRTL=function(){return this.adapter.isRTL()},e.prototype.scrollIntoViewImpl=function(t){var n=this.adapter.getScrollPosition(),i=this.adapter.getOffsetWidth(),r=this.adapter.getTabDimensionsAtIndex(t),o=this.findAdjacentTabIndexClosestToEdge(t,r,n,i);if(this.indexIsInRange(o)){var s=this.calculateScrollIncrement(t,o,n,i);this.adapter.incrementScroll(s)}},e.prototype.scrollIntoViewImplRTL=function(t){var n=this.adapter.getScrollPosition(),i=this.adapter.getOffsetWidth(),r=this.adapter.getTabDimensionsAtIndex(t),o=this.adapter.getScrollContentWidth(),s=this.findAdjacentTabIndexClosestToEdgeRTL(t,r,n,i,o);if(this.indexIsInRange(s)){var u=this.calculateScrollIncrementRTL(t,s,n,i,o);this.adapter.incrementScroll(u)}},e})(C);/**
|
|
1885
|
+
* @license
|
|
1886
|
+
* Copyright 2018 Google Inc.
|
|
1887
|
+
*
|
|
1888
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
1889
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
1890
|
+
* in the Software without restriction, including without limitation the rights
|
|
1891
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
1892
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
1893
|
+
* furnished to do so, subject to the following conditions:
|
|
1894
|
+
*
|
|
1895
|
+
* The above copyright notice and this permission notice shall be included in
|
|
1896
|
+
* all copies or substantial portions of the Software.
|
|
1897
|
+
*
|
|
1898
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
1899
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
1900
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
1901
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
1902
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
1903
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
1904
|
+
* THE SOFTWARE.
|
|
1905
|
+
*/var ae=ln.strings,Ci=0,Ti=(function(a){l.__extends(e,a);function e(){return a!==null&&a.apply(this,arguments)||this}return e.attachTo=function(t){return new e(t)},Object.defineProperty(e.prototype,"focusOnActivate",{set:function(t){var n,i;try{for(var r=l.__values(this.tabList),o=r.next();!o.done;o=r.next()){var s=o.value;s.focusOnActivate=t}}catch(u){n={error:u}}finally{try{o&&!o.done&&(i=r.return)&&i.call(r)}finally{if(n)throw n.error}}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"useAutomaticActivation",{set:function(t){this.foundation.setUseAutomaticActivation(t)},enumerable:!1,configurable:!0}),e.prototype.initialize=function(t,n){t===void 0&&(t=function(i){return new vi(i)}),n===void 0&&(n=function(i){return new pi(i)}),this.tabList=this.instantiateTabs(t),this.tabScroller=this.instantiatetabScroller(n)},e.prototype.initialSyncWithDOM=function(){var t=this;this.handleTabInteraction=function(i){t.foundation.handleTabInteraction(i)},this.handleKeyDown=function(i){t.foundation.handleKeyDown(i)},this.listen(Nt.strings.INTERACTED_EVENT,this.handleTabInteraction),this.listen("keydown",this.handleKeyDown);for(var n=0;n<this.tabList.length;n++)if(this.tabList[n].active){this.scrollIntoView(n);break}},e.prototype.destroy=function(){var t,n;a.prototype.destroy.call(this),this.unlisten(Nt.strings.INTERACTED_EVENT,this.handleTabInteraction),this.unlisten("keydown",this.handleKeyDown);try{for(var i=l.__values(this.tabList),r=i.next();!r.done;r=i.next()){var o=r.value;o.destroy()}}catch(s){t={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}this.tabScroller&&this.tabScroller.destroy()},e.prototype.getDefaultFoundation=function(){var t=this,n={scrollTo:function(i){t.tabScroller.scrollTo(i)},incrementScroll:function(i){t.tabScroller.incrementScroll(i)},getScrollPosition:function(){return t.tabScroller.getScrollPosition()},getScrollContentWidth:function(){return t.tabScroller.getScrollContentWidth()},getOffsetWidth:function(){return t.root.offsetWidth},isRTL:function(){return window.getComputedStyle(t.root).getPropertyValue("direction")==="rtl"},setActiveTab:function(i){t.foundation.activateTab(i)},activateTabAtIndex:function(i,r){t.tabList[i].activate(r)},deactivateTabAtIndex:function(i){t.tabList[i].deactivate()},focusTabAtIndex:function(i){t.tabList[i].focus()},getTabIndicatorClientRectAtIndex:function(i){return t.tabList[i].computeIndicatorClientRect()},getTabDimensionsAtIndex:function(i){return t.tabList[i].computeDimensions()},getPreviousActiveTabIndex:function(){for(var i=0;i<t.tabList.length;i++)if(t.tabList[i].active)return i;return-1},getFocusedTabIndex:function(){var i=t.getTabElements(),r=document.activeElement;return i.indexOf(r)},getIndexOfTabById:function(i){for(var r=0;r<t.tabList.length;r++)if(t.tabList[r].id===i)return r;return-1},getTabListLength:function(){return t.tabList.length},notifyTabActivated:function(i){return t.emit(ae.TAB_ACTIVATED_EVENT,{index:i},!0)}};return new ln(n)},e.prototype.activateTab=function(t){this.foundation.activateTab(t)},e.prototype.scrollIntoView=function(t){this.foundation.scrollIntoView(t)},e.prototype.getTabElements=function(){return[].slice.call(this.root.querySelectorAll(ae.TAB_SELECTOR))},e.prototype.instantiateTabs=function(t){return this.getTabElements().map(function(n){return n.id=n.id||"mdc-tab-"+ ++Ci,t(n)})},e.prototype.instantiatetabScroller=function(t){var n=this.root.querySelector(ae.TAB_SCROLLER_SELECTOR);return n?t(n):null},e})(T);/**
|
|
1906
|
+
* @license
|
|
1907
|
+
* Copyright 2019 Google Inc.
|
|
1908
|
+
*
|
|
1909
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
1910
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
1911
|
+
* in the Software without restriction, including without limitation the rights
|
|
1912
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
1913
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
1914
|
+
* furnished to do so, subject to the following conditions:
|
|
1915
|
+
*
|
|
1916
|
+
* The above copyright notice and this permission notice shall be included in
|
|
1917
|
+
* all copies or substantial portions of the Software.
|
|
1918
|
+
*
|
|
1919
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
1920
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
1921
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
1922
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
1923
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
1924
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
1925
|
+
* THE SOFTWARE.
|
|
1926
|
+
*/var dn={ROOT:"mdc-text-field-character-counter"},yi={ROOT_SELECTOR:"."+dn.ROOT};/**
|
|
1927
|
+
* @license
|
|
1928
|
+
* Copyright 2019 Google Inc.
|
|
1929
|
+
*
|
|
1930
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
1931
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
1932
|
+
* in the Software without restriction, including without limitation the rights
|
|
1933
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
1934
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
1935
|
+
* furnished to do so, subject to the following conditions:
|
|
1936
|
+
*
|
|
1937
|
+
* The above copyright notice and this permission notice shall be included in
|
|
1938
|
+
* all copies or substantial portions of the Software.
|
|
1939
|
+
*
|
|
1940
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
1941
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
1942
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
1943
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
1944
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
1945
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
1946
|
+
* THE SOFTWARE.
|
|
1947
|
+
*/var cn=(function(a){l.__extends(e,a);function e(t){return a.call(this,l.__assign(l.__assign({},e.defaultAdapter),t))||this}return Object.defineProperty(e,"cssClasses",{get:function(){return dn},enumerable:!1,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return yi},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{setContent:function(){}}},enumerable:!1,configurable:!0}),e.prototype.setCounterValue=function(t,n){t=Math.min(t,n),this.adapter.setContent(t+" / "+n)},e})(C);/**
|
|
1948
|
+
* @license
|
|
1949
|
+
* Copyright 2019 Google Inc.
|
|
1950
|
+
*
|
|
1951
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
1952
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
1953
|
+
* in the Software without restriction, including without limitation the rights
|
|
1954
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
1955
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
1956
|
+
* furnished to do so, subject to the following conditions:
|
|
1957
|
+
*
|
|
1958
|
+
* The above copyright notice and this permission notice shall be included in
|
|
1959
|
+
* all copies or substantial portions of the Software.
|
|
1960
|
+
*
|
|
1961
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
1962
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
1963
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
1964
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
1965
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
1966
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
1967
|
+
* THE SOFTWARE.
|
|
1968
|
+
*/var Si=(function(a){l.__extends(e,a);function e(){return a!==null&&a.apply(this,arguments)||this}return e.attachTo=function(t){return new e(t)},Object.defineProperty(e.prototype,"foundationForTextField",{get:function(){return this.foundation},enumerable:!1,configurable:!0}),e.prototype.getDefaultFoundation=function(){var t=this,n={setContent:function(i){t.root.textContent=i}};return new cn(n)},e})(T);/**
|
|
1969
|
+
* @license
|
|
1970
|
+
* Copyright 2016 Google Inc.
|
|
1971
|
+
*
|
|
1972
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
1973
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
1974
|
+
* in the Software without restriction, including without limitation the rights
|
|
1975
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
1976
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
1977
|
+
* furnished to do so, subject to the following conditions:
|
|
1978
|
+
*
|
|
1979
|
+
* The above copyright notice and this permission notice shall be included in
|
|
1980
|
+
* all copies or substantial portions of the Software.
|
|
1981
|
+
*
|
|
1982
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
1983
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
1984
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
1985
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
1986
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
1987
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
1988
|
+
* THE SOFTWARE.
|
|
1989
|
+
*/var tt={ARIA_CONTROLS:"aria-controls",ARIA_DESCRIBEDBY:"aria-describedby",INPUT_SELECTOR:".mdc-text-field__input",LABEL_SELECTOR:".mdc-floating-label",LEADING_ICON_SELECTOR:".mdc-text-field__icon--leading",LINE_RIPPLE_SELECTOR:".mdc-line-ripple",OUTLINE_SELECTOR:".mdc-notched-outline",PREFIX_SELECTOR:".mdc-text-field__affix--prefix",SUFFIX_SELECTOR:".mdc-text-field__affix--suffix",TRAILING_ICON_SELECTOR:".mdc-text-field__icon--trailing"},zt={DISABLED:"mdc-text-field--disabled",FOCUSED:"mdc-text-field--focused",HELPER_LINE:"mdc-text-field-helper-line",INVALID:"mdc-text-field--invalid",LABEL_FLOATING:"mdc-text-field--label-floating",NO_LABEL:"mdc-text-field--no-label",OUTLINED:"mdc-text-field--outlined",ROOT:"mdc-text-field",TEXTAREA:"mdc-text-field--textarea",WITH_LEADING_ICON:"mdc-text-field--with-leading-icon",WITH_TRAILING_ICON:"mdc-text-field--with-trailing-icon",WITH_INTERNAL_COUNTER:"mdc-text-field--with-internal-counter"},Be={LABEL_SCALE:.75},_i=["pattern","min","max","required","step","minlength","maxlength"],bi=["color","date","datetime-local","month","range","time","week"];/**
|
|
1990
|
+
* @license
|
|
1991
|
+
* Copyright 2016 Google Inc.
|
|
1992
|
+
*
|
|
1993
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
1994
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
1995
|
+
* in the Software without restriction, including without limitation the rights
|
|
1996
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
1997
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
1998
|
+
* furnished to do so, subject to the following conditions:
|
|
1999
|
+
*
|
|
2000
|
+
* The above copyright notice and this permission notice shall be included in
|
|
2001
|
+
* all copies or substantial portions of the Software.
|
|
2002
|
+
*
|
|
2003
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
2004
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
2005
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
2006
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
2007
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
2008
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
2009
|
+
* THE SOFTWARE.
|
|
2010
|
+
*/var Ue=["mousedown","touchstart"],Ve=["click","keydown"],Ri=(function(a){l.__extends(e,a);function e(t,n){n===void 0&&(n={});var i=a.call(this,l.__assign(l.__assign({},e.defaultAdapter),t))||this;return i.isFocused=!1,i.receivedUserInput=!1,i.valid=!0,i.useNativeValidation=!0,i.validateOnValueChange=!0,i.helperText=n.helperText,i.characterCounter=n.characterCounter,i.leadingIcon=n.leadingIcon,i.trailingIcon=n.trailingIcon,i.inputFocusHandler=function(){i.activateFocus()},i.inputBlurHandler=function(){i.deactivateFocus()},i.inputInputHandler=function(){i.handleInput()},i.setPointerXOffset=function(r){i.setTransformOrigin(r)},i.textFieldInteractionHandler=function(){i.handleTextFieldInteraction()},i.validationAttributeChangeHandler=function(r){i.handleValidationAttributeChange(r)},i}return Object.defineProperty(e,"cssClasses",{get:function(){return zt},enumerable:!1,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return tt},enumerable:!1,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return Be},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"shouldAlwaysFloat",{get:function(){var t=this.getNativeInput().type;return bi.indexOf(t)>=0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"shouldFloat",{get:function(){return this.shouldAlwaysFloat||this.isFocused||!!this.getValue()||this.isBadInput()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"shouldShake",{get:function(){return!this.isFocused&&!this.isValid()&&!!this.getValue()},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!0},setInputAttr:function(){},removeInputAttr:function(){},registerTextFieldInteractionHandler:function(){},deregisterTextFieldInteractionHandler:function(){},registerInputInteractionHandler:function(){},deregisterInputInteractionHandler:function(){},registerValidationAttributeChangeHandler:function(){return new MutationObserver(function(){})},deregisterValidationAttributeChangeHandler:function(){},getNativeInput:function(){return null},isFocused:function(){return!1},activateLineRipple:function(){},deactivateLineRipple:function(){},setLineRippleTransformOrigin:function(){},shakeLabel:function(){},floatLabel:function(){},setLabelRequired:function(){},hasLabel:function(){return!1},getLabelWidth:function(){return 0},hasOutline:function(){return!1},notchOutline:function(){},closeOutline:function(){}}},enumerable:!1,configurable:!0}),e.prototype.init=function(){var t,n,i,r;this.adapter.hasLabel()&&this.getNativeInput().required&&this.adapter.setLabelRequired(!0),this.adapter.isFocused()?this.inputFocusHandler():this.adapter.hasLabel()&&this.shouldFloat&&(this.notchOutline(!0),this.adapter.floatLabel(!0),this.styleFloating(!0)),this.adapter.registerInputInteractionHandler("focus",this.inputFocusHandler),this.adapter.registerInputInteractionHandler("blur",this.inputBlurHandler),this.adapter.registerInputInteractionHandler("input",this.inputInputHandler);try{for(var o=l.__values(Ue),s=o.next();!s.done;s=o.next()){var u=s.value;this.adapter.registerInputInteractionHandler(u,this.setPointerXOffset)}}catch(E){t={error:E}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}try{for(var c=l.__values(Ve),h=c.next();!h.done;h=c.next()){var u=h.value;this.adapter.registerTextFieldInteractionHandler(u,this.textFieldInteractionHandler)}}catch(E){i={error:E}}finally{try{h&&!h.done&&(r=c.return)&&r.call(c)}finally{if(i)throw i.error}}this.validationObserver=this.adapter.registerValidationAttributeChangeHandler(this.validationAttributeChangeHandler),this.setcharacterCounter(this.getValue().length)},e.prototype.destroy=function(){var t,n,i,r;this.adapter.deregisterInputInteractionHandler("focus",this.inputFocusHandler),this.adapter.deregisterInputInteractionHandler("blur",this.inputBlurHandler),this.adapter.deregisterInputInteractionHandler("input",this.inputInputHandler);try{for(var o=l.__values(Ue),s=o.next();!s.done;s=o.next()){var u=s.value;this.adapter.deregisterInputInteractionHandler(u,this.setPointerXOffset)}}catch(E){t={error:E}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}try{for(var c=l.__values(Ve),h=c.next();!h.done;h=c.next()){var u=h.value;this.adapter.deregisterTextFieldInteractionHandler(u,this.textFieldInteractionHandler)}}catch(E){i={error:E}}finally{try{h&&!h.done&&(r=c.return)&&r.call(c)}finally{if(i)throw i.error}}this.adapter.deregisterValidationAttributeChangeHandler(this.validationObserver)},e.prototype.handleTextFieldInteraction=function(){var t=this.adapter.getNativeInput();t&&t.disabled||(this.receivedUserInput=!0)},e.prototype.handleValidationAttributeChange=function(t){var n=this;t.some(function(i){return _i.indexOf(i)>-1?(n.styleValidity(!0),n.adapter.setLabelRequired(n.getNativeInput().required),!0):!1}),t.indexOf("maxlength")>-1&&this.setcharacterCounter(this.getValue().length)},e.prototype.notchOutline=function(t){if(!(!this.adapter.hasOutline()||!this.adapter.hasLabel()))if(t){var n=this.adapter.getLabelWidth()*Be.LABEL_SCALE;this.adapter.notchOutline(n)}else this.adapter.closeOutline()},e.prototype.activateFocus=function(){this.isFocused=!0,this.styleFocused(this.isFocused),this.adapter.activateLineRipple(),this.adapter.hasLabel()&&(this.notchOutline(this.shouldFloat),this.adapter.floatLabel(this.shouldFloat),this.styleFloating(this.shouldFloat),this.adapter.shakeLabel(this.shouldShake)),this.helperText&&(this.helperText.isPersistent()||!this.helperText.isValidation()||!this.valid)&&this.helperText.showToScreenReader()},e.prototype.setTransformOrigin=function(t){if(!(this.isDisabled()||this.adapter.hasOutline())){var n=t.touches,i=n?n[0]:t,r=i.target.getBoundingClientRect(),o=i.clientX-r.left;this.adapter.setLineRippleTransformOrigin(o)}},e.prototype.handleInput=function(){this.autoCompleteFocus(),this.setcharacterCounter(this.getValue().length)},e.prototype.autoCompleteFocus=function(){this.receivedUserInput||this.activateFocus()},e.prototype.deactivateFocus=function(){this.isFocused=!1,this.adapter.deactivateLineRipple();var t=this.isValid();this.styleValidity(t),this.styleFocused(this.isFocused),this.adapter.hasLabel()&&(this.notchOutline(this.shouldFloat),this.adapter.floatLabel(this.shouldFloat),this.styleFloating(this.shouldFloat),this.adapter.shakeLabel(this.shouldShake)),this.shouldFloat||(this.receivedUserInput=!1)},e.prototype.getValue=function(){return this.getNativeInput().value},e.prototype.setValue=function(t){if(this.getValue()!==t&&(this.getNativeInput().value=t),this.setcharacterCounter(t.length),this.validateOnValueChange){var n=this.isValid();this.styleValidity(n)}this.adapter.hasLabel()&&(this.notchOutline(this.shouldFloat),this.adapter.floatLabel(this.shouldFloat),this.styleFloating(this.shouldFloat),this.validateOnValueChange&&this.adapter.shakeLabel(this.shouldShake))},e.prototype.isValid=function(){return this.useNativeValidation?this.isNativeInputValid():this.valid},e.prototype.setValid=function(t){this.valid=t,this.styleValidity(t);var n=!t&&!this.isFocused&&!!this.getValue();this.adapter.hasLabel()&&this.adapter.shakeLabel(n)},e.prototype.setValidateOnValueChange=function(t){this.validateOnValueChange=t},e.prototype.getValidateOnValueChange=function(){return this.validateOnValueChange},e.prototype.setUseNativeValidation=function(t){this.useNativeValidation=t},e.prototype.isDisabled=function(){return this.getNativeInput().disabled},e.prototype.setDisabled=function(t){this.getNativeInput().disabled=t,this.styleDisabled(t)},e.prototype.setHelperTextContent=function(t){this.helperText&&this.helperText.setContent(t)},e.prototype.setLeadingIconAriaLabel=function(t){this.leadingIcon&&this.leadingIcon.setAriaLabel(t)},e.prototype.setLeadingIconContent=function(t){this.leadingIcon&&this.leadingIcon.setContent(t)},e.prototype.setTrailingIconAriaLabel=function(t){this.trailingIcon&&this.trailingIcon.setAriaLabel(t)},e.prototype.setTrailingIconContent=function(t){this.trailingIcon&&this.trailingIcon.setContent(t)},e.prototype.setcharacterCounter=function(t){if(this.characterCounter){var n=this.getNativeInput().maxLength;if(n===-1)throw new Error("MDCTextFieldFoundation: Expected maxlength html property on text input or textarea.");this.characterCounter.setCounterValue(t,n)}},e.prototype.isBadInput=function(){return this.getNativeInput().validity.badInput||!1},e.prototype.isNativeInputValid=function(){return this.getNativeInput().validity.valid},e.prototype.styleValidity=function(t){var n=e.cssClasses.INVALID;if(t?this.adapter.removeClass(n):this.adapter.addClass(n),this.helperText){this.helperText.setValidity(t);var i=this.helperText.isValidation();if(!i)return;var r=this.helperText.isVisible(),o=this.helperText.getId();r&&o?this.adapter.setInputAttr(tt.ARIA_DESCRIBEDBY,o):this.adapter.removeInputAttr(tt.ARIA_DESCRIBEDBY)}},e.prototype.styleFocused=function(t){var n=e.cssClasses.FOCUSED;t?this.adapter.addClass(n):this.adapter.removeClass(n)},e.prototype.styleDisabled=function(t){var n=e.cssClasses,i=n.DISABLED,r=n.INVALID;t?(this.adapter.addClass(i),this.adapter.removeClass(r)):this.adapter.removeClass(i),this.leadingIcon&&this.leadingIcon.setDisabled(t),this.trailingIcon&&this.trailingIcon.setDisabled(t)},e.prototype.styleFloating=function(t){var n=e.cssClasses.LABEL_FLOATING;t?this.adapter.addClass(n):this.adapter.removeClass(n)},e.prototype.getNativeInput=function(){var t=this.adapter?this.adapter.getNativeInput():null;return t||{disabled:!1,maxLength:-1,required:!1,type:"input",validity:{badInput:!1,valid:!0},value:""}},e})(C);/**
|
|
2011
|
+
* @license
|
|
2012
|
+
* Copyright 2016 Google Inc.
|
|
2013
|
+
*
|
|
2014
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
2015
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
2016
|
+
* in the Software without restriction, including without limitation the rights
|
|
2017
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
2018
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
2019
|
+
* furnished to do so, subject to the following conditions:
|
|
2020
|
+
*
|
|
2021
|
+
* The above copyright notice and this permission notice shall be included in
|
|
2022
|
+
* all copies or substantial portions of the Software.
|
|
2023
|
+
*
|
|
2024
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
2025
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
2026
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
2027
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
2028
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
2029
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
2030
|
+
* THE SOFTWARE.
|
|
2031
|
+
*/var at={HELPER_TEXT_PERSISTENT:"mdc-text-field-helper-text--persistent",HELPER_TEXT_VALIDATION_MSG:"mdc-text-field-helper-text--validation-msg",ROOT:"mdc-text-field-helper-text"},ht={ARIA_HIDDEN:"aria-hidden",ROLE:"role",ROOT_SELECTOR:"."+at.ROOT};/**
|
|
2032
|
+
* @license
|
|
2033
|
+
* Copyright 2017 Google Inc.
|
|
2034
|
+
*
|
|
2035
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
2036
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
2037
|
+
* in the Software without restriction, including without limitation the rights
|
|
2038
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
2039
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
2040
|
+
* furnished to do so, subject to the following conditions:
|
|
2041
|
+
*
|
|
2042
|
+
* The above copyright notice and this permission notice shall be included in
|
|
2043
|
+
* all copies or substantial portions of the Software.
|
|
2044
|
+
*
|
|
2045
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
2046
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
2047
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
2048
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
2049
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
2050
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
2051
|
+
* THE SOFTWARE.
|
|
2052
|
+
*/var hn=(function(a){l.__extends(e,a);function e(t){return a.call(this,l.__assign(l.__assign({},e.defaultAdapter),t))||this}return Object.defineProperty(e,"cssClasses",{get:function(){return at},enumerable:!1,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return ht},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!1},getAttr:function(){return null},setAttr:function(){},removeAttr:function(){},setContent:function(){}}},enumerable:!1,configurable:!0}),e.prototype.getId=function(){return this.adapter.getAttr("id")},e.prototype.isVisible=function(){return this.adapter.getAttr(ht.ARIA_HIDDEN)!=="true"},e.prototype.setContent=function(t){this.adapter.setContent(t)},e.prototype.isPersistent=function(){return this.adapter.hasClass(at.HELPER_TEXT_PERSISTENT)},e.prototype.setPersistent=function(t){t?this.adapter.addClass(at.HELPER_TEXT_PERSISTENT):this.adapter.removeClass(at.HELPER_TEXT_PERSISTENT)},e.prototype.isValidation=function(){return this.adapter.hasClass(at.HELPER_TEXT_VALIDATION_MSG)},e.prototype.setValidation=function(t){t?this.adapter.addClass(at.HELPER_TEXT_VALIDATION_MSG):this.adapter.removeClass(at.HELPER_TEXT_VALIDATION_MSG)},e.prototype.showToScreenReader=function(){this.adapter.removeAttr(ht.ARIA_HIDDEN)},e.prototype.setValidity=function(t){var n=this.adapter.hasClass(at.HELPER_TEXT_PERSISTENT),i=this.adapter.hasClass(at.HELPER_TEXT_VALIDATION_MSG),r=i&&!t;r?(this.showToScreenReader(),this.adapter.getAttr(ht.ROLE)==="alert"?this.refreshAlertRole():this.adapter.setAttr(ht.ROLE,"alert")):this.adapter.removeAttr(ht.ROLE),!n&&!r&&this.hide()},e.prototype.hide=function(){this.adapter.setAttr(ht.ARIA_HIDDEN,"true")},e.prototype.refreshAlertRole=function(){var t=this;this.adapter.removeAttr(ht.ROLE),requestAnimationFrame(function(){t.adapter.setAttr(ht.ROLE,"alert")})},e})(C);/**
|
|
2053
|
+
* @license
|
|
2054
|
+
* Copyright 2017 Google Inc.
|
|
2055
|
+
*
|
|
2056
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
2057
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
2058
|
+
* in the Software without restriction, including without limitation the rights
|
|
2059
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
2060
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
2061
|
+
* furnished to do so, subject to the following conditions:
|
|
2062
|
+
*
|
|
2063
|
+
* The above copyright notice and this permission notice shall be included in
|
|
2064
|
+
* all copies or substantial portions of the Software.
|
|
2065
|
+
*
|
|
2066
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
2067
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
2068
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
2069
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
2070
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
2071
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
2072
|
+
* THE SOFTWARE.
|
|
2073
|
+
*/var Li=(function(a){l.__extends(e,a);function e(){return a!==null&&a.apply(this,arguments)||this}return e.attachTo=function(t){return new e(t)},Object.defineProperty(e.prototype,"foundationForTextField",{get:function(){return this.foundation},enumerable:!1,configurable:!0}),e.prototype.getDefaultFoundation=function(){var t=this,n={addClass:function(i){return t.root.classList.add(i)},removeClass:function(i){return t.root.classList.remove(i)},hasClass:function(i){return t.root.classList.contains(i)},getAttr:function(i){return t.root.getAttribute(i)},setAttr:function(i,r){return t.root.setAttribute(i,r)},removeAttr:function(i){return t.root.removeAttribute(i)},setContent:function(i){t.root.textContent=i}};return new hn(n)},e})(T);/**
|
|
2074
|
+
* @license
|
|
2075
|
+
* Copyright 2016 Google Inc.
|
|
2076
|
+
*
|
|
2077
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
2078
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
2079
|
+
* in the Software without restriction, including without limitation the rights
|
|
2080
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
2081
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
2082
|
+
* furnished to do so, subject to the following conditions:
|
|
2083
|
+
*
|
|
2084
|
+
* The above copyright notice and this permission notice shall be included in
|
|
2085
|
+
* all copies or substantial portions of the Software.
|
|
2086
|
+
*
|
|
2087
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
2088
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
2089
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
2090
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
2091
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
2092
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
2093
|
+
* THE SOFTWARE.
|
|
2094
|
+
*/var Ke={ICON_EVENT:"MDCTextField:icon",ICON_ROLE:"button"},Oi={ROOT:"mdc-text-field__icon"};/**
|
|
2095
|
+
* @license
|
|
2096
|
+
* Copyright 2017 Google Inc.
|
|
2097
|
+
*
|
|
2098
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
2099
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
2100
|
+
* in the Software without restriction, including without limitation the rights
|
|
2101
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
2102
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
2103
|
+
* furnished to do so, subject to the following conditions:
|
|
2104
|
+
*
|
|
2105
|
+
* The above copyright notice and this permission notice shall be included in
|
|
2106
|
+
* all copies or substantial portions of the Software.
|
|
2107
|
+
*
|
|
2108
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
2109
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
2110
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
2111
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
2112
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
2113
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
2114
|
+
* THE SOFTWARE.
|
|
2115
|
+
*/var We=["click","keydown"],Ge=(function(a){l.__extends(e,a);function e(t){var n=a.call(this,l.__assign(l.__assign({},e.defaultAdapter),t))||this;return n.savedTabIndex=null,n.interactionHandler=function(i){n.handleInteraction(i)},n}return Object.defineProperty(e,"strings",{get:function(){return Ke},enumerable:!1,configurable:!0}),Object.defineProperty(e,"cssClasses",{get:function(){return Oi},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{getAttr:function(){return null},setAttr:function(){},removeAttr:function(){},setContent:function(){},registerInteractionHandler:function(){},deregisterInteractionHandler:function(){},notifyIconAction:function(){}}},enumerable:!1,configurable:!0}),e.prototype.init=function(){var t,n;this.savedTabIndex=this.adapter.getAttr("tabindex");try{for(var i=l.__values(We),r=i.next();!r.done;r=i.next()){var o=r.value;this.adapter.registerInteractionHandler(o,this.interactionHandler)}}catch(s){t={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}},e.prototype.destroy=function(){var t,n;try{for(var i=l.__values(We),r=i.next();!r.done;r=i.next()){var o=r.value;this.adapter.deregisterInteractionHandler(o,this.interactionHandler)}}catch(s){t={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}},e.prototype.setDisabled=function(t){this.savedTabIndex&&(t?(this.adapter.setAttr("tabindex","-1"),this.adapter.removeAttr("role")):(this.adapter.setAttr("tabindex",this.savedTabIndex),this.adapter.setAttr("role",Ke.ICON_ROLE)))},e.prototype.setAriaLabel=function(t){this.adapter.setAttr("aria-label",t)},e.prototype.setContent=function(t){this.adapter.setContent(t)},e.prototype.handleInteraction=function(t){var n=t.key==="Enter"||t.keyCode===13;(t.type==="click"||n)&&(t.preventDefault(),this.adapter.notifyIconAction())},e})(C);/**
|
|
2116
|
+
* @license
|
|
2117
|
+
* Copyright 2017 Google Inc.
|
|
2118
|
+
*
|
|
2119
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
2120
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
2121
|
+
* in the Software without restriction, including without limitation the rights
|
|
2122
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
2123
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
2124
|
+
* furnished to do so, subject to the following conditions:
|
|
2125
|
+
*
|
|
2126
|
+
* The above copyright notice and this permission notice shall be included in
|
|
2127
|
+
* all copies or substantial portions of the Software.
|
|
2128
|
+
*
|
|
2129
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
2130
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
2131
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
2132
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
2133
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
2134
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
2135
|
+
* THE SOFTWARE.
|
|
2136
|
+
*/var fn=(function(a){l.__extends(e,a);function e(){return a!==null&&a.apply(this,arguments)||this}return e.attachTo=function(t){return new e(t)},Object.defineProperty(e.prototype,"foundationForTextField",{get:function(){return this.foundation},enumerable:!1,configurable:!0}),e.prototype.getDefaultFoundation=function(){var t=this,n={getAttr:function(i){return t.root.getAttribute(i)},setAttr:function(i,r){return t.root.setAttribute(i,r)},removeAttr:function(i){return t.root.removeAttribute(i)},setContent:function(i){t.root.textContent=i},registerInteractionHandler:function(i,r){return t.listen(i,r)},deregisterInteractionHandler:function(i,r){return t.unlisten(i,r)},notifyIconAction:function(){return t.emit(Ge.strings.ICON_EVENT,{},!0)}};return new Ge(n)},e})(T);/**
|
|
2137
|
+
* @license
|
|
2138
|
+
* Copyright 2016 Google Inc.
|
|
2139
|
+
*
|
|
2140
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
2141
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
2142
|
+
* in the Software without restriction, including without limitation the rights
|
|
2143
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
2144
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
2145
|
+
* furnished to do so, subject to the following conditions:
|
|
2146
|
+
*
|
|
2147
|
+
* The above copyright notice and this permission notice shall be included in
|
|
2148
|
+
* all copies or substantial portions of the Software.
|
|
2149
|
+
*
|
|
2150
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
2151
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
2152
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
2153
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
2154
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
2155
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
2156
|
+
* THE SOFTWARE.
|
|
2157
|
+
*/var Di=(function(a){l.__extends(e,a);function e(){return a!==null&&a.apply(this,arguments)||this}return e.attachTo=function(t){return new e(t)},e.prototype.initialize=function(t,n,i,r,o,s,u){t===void 0&&(t=function(P,R){return new D(P,R)}),n===void 0&&(n=function(P){return new nn(P)}),i===void 0&&(i=function(P){return new Li(P)}),r===void 0&&(r=function(P){return new Si(P)}),o===void 0&&(o=function(P){return new fn(P)}),s===void 0&&(s=function(P){return new tn(P)}),u===void 0&&(u=function(P){return new sn(P)}),this.input=this.root.querySelector(tt.INPUT_SELECTOR);var c=this.root.querySelector(tt.LABEL_SELECTOR);this.label=c?s(c):null;var h=this.root.querySelector(tt.LINE_RIPPLE_SELECTOR);this.lineRipple=h?n(h):null;var E=this.root.querySelector(tt.OUTLINE_SELECTOR);this.outline=E?u(E):null;var p=hn.strings,f=this.root.nextElementSibling,v=f&&f.classList.contains(zt.HELPER_LINE),S=v&&f&&f.querySelector(p.ROOT_SELECTOR);this.helperText=S?i(S):null;var K=cn.strings,W=this.root.querySelector(K.ROOT_SELECTOR);!W&&v&&f&&(W=f.querySelector(K.ROOT_SELECTOR)),this.characterCounter=W?r(W):null;var _=this.root.querySelector(tt.LEADING_ICON_SELECTOR);this.leadingIcon=_?o(_):null;var V=this.root.querySelector(tt.TRAILING_ICON_SELECTOR);this.trailingIcon=V?o(V):null,this.prefix=this.root.querySelector(tt.PREFIX_SELECTOR),this.suffix=this.root.querySelector(tt.SUFFIX_SELECTOR),this.ripple=this.createRipple(t)},e.prototype.destroy=function(){this.ripple&&this.ripple.destroy(),this.lineRipple&&this.lineRipple.destroy(),this.helperText&&this.helperText.destroy(),this.characterCounter&&this.characterCounter.destroy(),this.leadingIcon&&this.leadingIcon.destroy(),this.trailingIcon&&this.trailingIcon.destroy(),this.label&&this.label.destroy(),this.outline&&this.outline.destroy(),a.prototype.destroy.call(this)},e.prototype.initialSyncWithDOM=function(){this.disabled=this.input.disabled},Object.defineProperty(e.prototype,"value",{get:function(){return this.foundation.getValue()},set:function(t){this.foundation.setValue(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"disabled",{get:function(){return this.foundation.isDisabled()},set:function(t){this.foundation.setDisabled(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"valid",{get:function(){return this.foundation.isValid()},set:function(t){this.foundation.setValid(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"required",{get:function(){return this.input.required},set:function(t){this.input.required=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"pattern",{get:function(){return this.input.pattern},set:function(t){this.input.pattern=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"minLength",{get:function(){return this.input.minLength},set:function(t){this.input.minLength=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"maxLength",{get:function(){return this.input.maxLength},set:function(t){t<0?this.input.removeAttribute("maxLength"):this.input.maxLength=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"min",{get:function(){return this.input.min},set:function(t){this.input.min=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"max",{get:function(){return this.input.max},set:function(t){this.input.max=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"step",{get:function(){return this.input.step},set:function(t){this.input.step=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"helperTextContent",{set:function(t){this.foundation.setHelperTextContent(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"leadingIconAriaLabel",{set:function(t){this.foundation.setLeadingIconAriaLabel(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"leadingIconContent",{set:function(t){this.foundation.setLeadingIconContent(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"trailingIconAriaLabel",{set:function(t){this.foundation.setTrailingIconAriaLabel(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"trailingIconContent",{set:function(t){this.foundation.setTrailingIconContent(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"useNativeValidation",{set:function(t){this.foundation.setUseNativeValidation(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"prefixText",{get:function(){return this.prefix?this.prefix.textContent:null},set:function(t){this.prefix&&(this.prefix.textContent=t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"suffixText",{get:function(){return this.suffix?this.suffix.textContent:null},set:function(t){this.suffix&&(this.suffix.textContent=t)},enumerable:!1,configurable:!0}),e.prototype.focus=function(){this.input.focus()},e.prototype.layout=function(){var t=this.foundation.shouldFloat;this.foundation.notchOutline(t)},e.prototype.getDefaultFoundation=function(){var t=l.__assign(l.__assign(l.__assign(l.__assign(l.__assign({},this.getRootAdapterMethods()),this.getInputAdapterMethods()),this.getLabelAdapterMethods()),this.getLineRippleAdapterMethods()),this.getOutlineAdapterMethods());return new Ri(t,this.getFoundationMap())},e.prototype.getRootAdapterMethods=function(){var t=this;return{addClass:function(n){return t.root.classList.add(n)},removeClass:function(n){return t.root.classList.remove(n)},hasClass:function(n){return t.root.classList.contains(n)},registerTextFieldInteractionHandler:function(n,i){t.listen(n,i)},deregisterTextFieldInteractionHandler:function(n,i){t.unlisten(n,i)},registerValidationAttributeChangeHandler:function(n){var i=function(s){return s.map(function(u){return u.attributeName}).filter(function(u){return u})},r=new MutationObserver(function(s){return n(i(s))}),o={attributes:!0};return r.observe(t.input,o),r},deregisterValidationAttributeChangeHandler:function(n){n.disconnect()}}},e.prototype.getInputAdapterMethods=function(){var t=this;return{getNativeInput:function(){return t.input},setInputAttr:function(n,i){t.input.setAttribute(n,i)},removeInputAttr:function(n){t.input.removeAttribute(n)},isFocused:function(){return document.activeElement===t.input},registerInputInteractionHandler:function(n,i){t.input.addEventListener(n,i,O())},deregisterInputInteractionHandler:function(n,i){t.input.removeEventListener(n,i,O())}}},e.prototype.getLabelAdapterMethods=function(){var t=this;return{floatLabel:function(n){t.label&&t.label.float(n)},getLabelWidth:function(){return t.label?t.label.getWidth():0},hasLabel:function(){return!!t.label},shakeLabel:function(n){t.label&&t.label.shake(n)},setLabelRequired:function(n){t.label&&t.label.setRequired(n)}}},e.prototype.getLineRippleAdapterMethods=function(){var t=this;return{activateLineRipple:function(){t.lineRipple&&t.lineRipple.activate()},deactivateLineRipple:function(){t.lineRipple&&t.lineRipple.deactivate()},setLineRippleTransformOrigin:function(n){t.lineRipple&&t.lineRipple.setRippleCenter(n)}}},e.prototype.getOutlineAdapterMethods=function(){var t=this;return{closeOutline:function(){t.outline&&t.outline.closeNotch()},hasOutline:function(){return!!t.outline},notchOutline:function(n){t.outline&&t.outline.notch(n)}}},e.prototype.getFoundationMap=function(){return{characterCounter:this.characterCounter?this.characterCounter.foundationForTextField:void 0,helperText:this.helperText?this.helperText.foundationForTextField:void 0,leadingIcon:this.leadingIcon?this.leadingIcon.foundationForTextField:void 0,trailingIcon:this.trailingIcon?this.trailingIcon.foundationForTextField:void 0}},e.prototype.createRipple=function(t){var n=this,i=this.root.classList.contains(zt.TEXTAREA),r=this.root.classList.contains(zt.OUTLINED);if(i||r)return null;var o=l.__assign(l.__assign({},D.createAdapter(this)),{isSurfaceActive:function(){return it(n.input,":active")},registerInteractionHandler:function(s,u){n.input.addEventListener(s,u,O())},deregisterInteractionHandler:function(s,u){n.input.removeEventListener(s,u,O())}});return t(this.root,new pt(o))},e})(T);const xi=function(a){[...a.querySelectorAll(".mdc-ripple-surface")].forEach(D.attachTo)},Ni=function(a){[...a.querySelectorAll(".mdc-button")].forEach(e=>{D.attachTo(e),this.listen(e,"click",t=>{const n=t.currentTarget,i=w.getElDataMap(n);this.dispatchPanelEvent(i.zv,Object.assign({orgEvt:t,trigger:n,href:n.href||i.href},i))})})},Mi=function(a){[...a.querySelectorAll(".mdc-fab")].forEach(e=>{D.attachTo(e),this.listen(e,"click",t=>{t.stopPropagation();const n=t.currentTarget,i=w.getElDataMap(n);this.dispatchPanelEvent(i.zv,Object.assign({orgEvt:t,trigger:n,href:n.href||i.href},i))})})},wi=function(a){[...a.querySelectorAll(".mdc-icon-button:not(.mdc-icon-toggle)")].forEach(e=>{const t=new D(e);e.zComponent=t,t.unbounded=!0,this.listen(e,"click",n=>{const i=n.currentTarget,r=w.getElDataMap(i),o=r.zv;w.isDefAndNotNull(o)&&(n.stopPropagation(),this.dispatchPanelEvent(r.zv,Object.assign({orgEvt:n,trigger:i,href:i.href||r.href},r)))})})},Pi=function(a){[...a.querySelectorAll(".mdc-icon-toggle")].forEach(e=>{const t=e.ariaPressed==="true",n=new Xn(e);n.on=t,e.zComponent=n,this.listen(e,"click",i=>i.stopPropagation()),this.listen(e,"MDCIconButtonToggle:change",i=>{i.stopPropagation();const r=i.currentTarget,o=i.detail.isOn,s=w.getElDataMap(r);this.dispatchPanelEvent(s.zv,Object.assign({orgEvt:i,trigger:r,href:r.href||s.href,isOn:o},s))})})},Hi=function(a){const e="mdc-checkbox__native-control";[...a.querySelectorAll(".mdc-data-table")].forEach(t=>{const n=new Nn(t);n.selectedAllAcrossPages=!1,n.onSomeSelected=r=>{},n.onNoneSelected=r=>{},n.onAllSelected=r=>{},n.toggleSelectAcrossPages=()=>(n.selectedAllAcrossPages=!n.selectedAllAcrossPages,n.selectedAllAcrossPages),n.setSelectAcrossPages=r=>(n.selectedAllAcrossPages=r,n.selectedAllAcrossPages),n.getSelectAcrossPages=()=>n.selectedAllAcrossPages,t.zComponent=n,t.dataTable=n;const i=r=>{const o=n.getSelectedRowIds().length;r.type==="MDCDataTable:selectedAll"?n.onAllSelected(o):o===0?n.onNoneSelected(o):n.onSomeSelected(o)};["MDCDataTable:rowSelectionChanged","MDCDataTable:selectedAll","MDCDataTable:unselectedAll"].forEach(r=>{this.listen(t,r,i)}),[...t.querySelectorAll(".mdc-data-table__row")].forEach(r=>{this.listen(r,"click",o=>{if(!o.target.classList.contains(e)){o.stopPropagation();const u=o.currentTarget,c=w.getElDataMap(u);this.dispatchPanelEvent(c.zv,Object.assign({orgEvt:o,trigger:u,href:u.href||c.href},c))}})})})},Fi=function(a){[...a.querySelectorAll(".mdc-tab-bar")].forEach(e=>{const t=new Ti(e);e.zComponent=t,this.listen(e,"MDCTabBar:activated",n=>{const i=t.tabList[n.detail.index].root,r=w.getElDataMap(i);this.dispatchPanelEvent(r.zv,Object.assign({orgEvt:n,trigger:i,href:i.href||r.href},r))})})},ki=function(a){[...a.querySelectorAll(".mdc-switch")].forEach(e=>{const t=e.querySelector("input"),n=w.getElDataMap(t);this.listen(t,"change",i=>{i.stopPropagation(),this.dispatchPanelEvent(n.zv,Object.assign({orgEvt:i,trigger:t,href:t.href||n.href,isOn:t.checked},n))})})},Bi=function(a){[...a.querySelectorAll(".mdc-chip-set")].forEach(e=>{const t=Dn.attachTo(e);e.zComponent=t,t.listen("MDCChip:interaction",n=>{const i=t.chips.find(s=>s.id===n.detail.chipId),r=i.root,o=w.getElDataMap(r);this.dispatchPanelEvent(o.zv,Object.assign({orgEvt:n,trigger:r,href:r.href||o.href,isOn:i.selected},o))})})},Ui=function(a){[...a.querySelectorAll(".mdc-menu-surface")].forEach(rn.attachTo)},Vi=function(a){[...a.querySelectorAll(".mdc-menu-surface--anchor:not(.mdc-select__menu)")].forEach(e=>{const t=e.querySelector(".mdc-menu"),n=w.getElDataMap(t).corner||"BOTTOM_START",i=new an(t);if(t.zComponent=i,i.setAnchorCorner(_t[n]),i.items.forEach(D.attachTo),i.quickOpen=!1,i.listen("click",r=>r.stopPropagation()),i.listen("MDCMenu:selected",r=>{r.stopPropagation();const o=r.detail.item,s=w.getElDataMap(o);this.dispatchPanelEvent(s.zv,Object.assign({orgEvt:r,trigger:o,href:o.href||s.href},s))}),e.addEventListener("click",()=>i.open=!i.open),t.classList.contains("z2-filter-on-keydown")){const r=()=>{s="",i.items.forEach(h=>h.classList.remove("hidden-list-itme"))},o=[...i.items].map(h=>w.toLowerCase(h.querySelector(".mdc-deprecated-list-item__text").textContent));let s="";const u="abcdefghijklmnopqrstuvwxyz0123456789 -_",c=h=>{const E=w.toLowerCase(h.key);h.defaultPrevented||(u.includes(E)?s=`${s}${E}`:E==="escape"?r():E==="backspace"&&(s=s.slice(0,-1)),s!==""&&o.forEach((p,f)=>{p.includes(s)?i.items[f].classList.remove("hidden-list-itme"):i.items[f].classList.add("hidden-list-itme")}))};i.listen("MDCMenuSurface:closed",()=>{r(),document.removeEventListener("keydown",c,!0)}),i.listen("MDCMenuSurface:opened",()=>{r(),document.addEventListener("keydown",c,!0)})}})},Ki=function(a){[...a.querySelectorAll(".mdc-deprecated-list:not(.mdc-menu__items)")].forEach(e=>{const t=new Ze(e);e.zComponent=t,w.isDefAndNotNull(e.id)&&this.listMap.set(e.id,t),t.listElements.forEach(n=>D.attachTo(n)),this.listen(e,"click",n=>{const i=n.target.closest("li"),r=w.getElDataMap(i);this.dispatchPanelEvent(r.zv,Object.assign({orgEvt:n,trigger:i,href:i.href||r.href},r))})})},Wi=function(a){[...a.querySelectorAll(".mdc-slider")].forEach(e=>{const t=new ui(e);e.zComponent=t;const n=w.getElDataMap(e),i=e.parentElement.querySelector(`#${n.inputid}`);this.listen(e,"MDCSlider:change",()=>{i.value=t.value})})},Gi=function(a){[...a.querySelectorAll(".mdc-linear-progress")].forEach(e=>{e.linProg=Ye.attachTo(e)})},ji=function(a){[...a.querySelectorAll(".mdc-text-field")].forEach(Di.attachTo)},qi=function(a){[...a.querySelectorAll(".mdc-text-field-icon")].forEach(fn.attachTo)},Xi=function(a,e){const t=i=>{const r=document.createElement("li");r.classList.add("mdc-deprecated-list-item"),r.dataset.value=i.value;const o=document.createElement("span");o.classList.add("mdc-deprecated-list-item__ripple"),r.appendChild(o);const s=document.createElement("span");return s.classList.add("mdc-deprecated-list-item__text"),s.textContent=i.textContent,r.appendChild(s),i.selected&&r.classList.add("mdc-deprecated-list-item--selected"),r},n=(i,r,o)=>()=>{for(;i.firstChild;)i.removeChild(i.lastChild);[...r.options].forEach(s=>i.appendChild(t(s))),o.layoutOptions();try{o.selectedIndex=r.options.selectedIndex}catch(s){console.error("MDC Select index sync error:",{targetIndex:r.options.selectedIndex,htmSelectField:r,mdcSelect:o,currentIndex:o.selectedIndex,error:s})}};[...a.querySelectorAll(".mdc-select")].forEach(i=>{const r=i.querySelector("ul.mdc-deprecated-list"),o=i.querySelector("select"),s=new ai(i);i.zComponent=s,o.buildMenu=n(r,o,s),o.buildMenu();const u=s.menu;e.hoist(u.menuSurface.root),u.setIsHoisted(!0),s.listen("MDCSelect:change",()=>{o.options[s.selectedIndex].selected=!0,o.dispatchEvent(new Event("custom:select:change"))})})},zi=function(a){[...a.querySelectorAll(".mdc-form-field:not(.for-radio):not(.for-checkbox)")].forEach(de.attachTo)},Yi=function(a){[...a.querySelectorAll(".mdc-form-field.for-radio")].forEach(e=>{const t=new de(e),n=e.querySelector(".mdc-radio");n.querySelector('input[type="radio"]').classList.add("mdc-radio__native-control"),t.input=new ti(n)})},$i=function(a){[...a.querySelectorAll(".mdc-form-field.for-checkbox")].forEach(e=>{const t=e.querySelector(".mdc-checkbox"),n=new qe(t),i=new de(e);i.input=n})};let Ot=null;function Qi(){return Ot||(w.isDefAndNotNull(window.mdc)&&Object.prototype.hasOwnProperty.call(window.mdc,"autoInit")?(Ot=Promise.resolve(),Ot):(Ot=new Promise((a,e)=>{const t=window.__MDC_CDN_URL__||"https://unpkg.com/material-components-web@14.0.0/dist/material-components-web.min.js",n=document.createElement("script");n.src=t,n.async=!0,n.onload=()=>{w.isDefAndNotNull(window.mdc)&&Object.prototype.hasOwnProperty.call(window.mdc,"autoInit")?a():e(new Error("MDC library loaded but window.mdc is not available"))},n.onerror=()=>{e(new Error(`Failed to load MDC library from ${t}`))},document.head.appendChild(n)}),Ot))}async function Zi(){try{await Qi()}catch(a){throw a}w.ComponentLibraryRegistry.register("mdc",{render:function(a,e){w.isDefAndNotNull(window.mdc)&&Object.prototype.hasOwnProperty.call(window.mdc,"autoInit")&&(xi.call(this,a),Ni.call(this,a),Mi.call(this,a),wi.call(this,a),Pi.call(this,a),Fi.call(this,a),ki.call(this,a),Bi.call(this,a),Ui.call(this,a),Vi.call(this,a),Ki.call(this,a),Wi.call(this,a),Gi.call(this,a),zi.call(this,a),Xi.call(this,a,this),qi.call(this,a),ji.call(this,a),Yi.call(this,a),$i.call(this,a),Hi.call(this,a))},dispose:function(a){[...a.querySelectorAll("[data-mdc-auto-init]")].forEach(t=>{try{t[t.getAttribute("data-mdc-auto-init")].destroy()}catch{}})},config:{version:"1.0",description:"Google Material Design Components (legacy, being phased out)"},utils:w.treeUtils}),console.debug("[Zooy] MDC library registered")}exports.registerMdcLibrary=Zi;
|