luda 0.1.12 → 0.1.13

Sign up to get free protection for your applications and to get access to all the features.
Files changed (39) hide show
  1. checksums.yaml +5 -5
  2. data/LICENSE +21 -0
  3. data/README.md +52 -3
  4. data/assets/javascripts/luda-degradation.js +1 -1
  5. data/assets/javascripts/luda-degradation.js.map +1 -1
  6. data/assets/javascripts/luda-degradation.min.js +1 -1
  7. data/assets/javascripts/luda-degradation.min.js.map +1 -1
  8. data/assets/javascripts/luda-sprockets.js +1 -1
  9. data/assets/javascripts/luda.js +84 -71
  10. data/assets/javascripts/luda.js.map +1 -1
  11. data/assets/javascripts/luda.min.js +2 -2
  12. data/assets/javascripts/luda.min.js.map +1 -1
  13. data/assets/javascripts/luda/behaviors/readonly.js +13 -5
  14. data/assets/javascripts/luda/elements/form-file.js +11 -6
  15. data/assets/javascripts/luda/index.js +3 -3
  16. data/assets/javascripts/luda/install.js +1 -1
  17. data/assets/stylesheets/luda/_core/_variables.sass +2 -2
  18. data/assets/stylesheets/luda/_core/behaviors/_disabled.sass +2 -7
  19. data/assets/stylesheets/luda/_core/behaviors/_readonly.sass +4 -6
  20. data/assets/stylesheets/luda/_core/elements/_icon.sass +1 -1
  21. data/assets/stylesheets/luda/_core/mixins/_button.sass +2 -0
  22. data/assets/stylesheets/luda/_core/mixins/_disabled.sass +10 -0
  23. data/assets/stylesheets/luda/_core/patterns/_carousel.sass +7 -7
  24. data/assets/stylesheets/luda/_core/utilities/{_align.sass → _alignment.sass} +1 -1
  25. data/assets/stylesheets/luda/_core/utilities/_flex.sass +4 -4
  26. data/assets/stylesheets/luda/_default.sass +27 -27
  27. data/assets/stylesheets/luda/default/_banner.sass +1 -1
  28. data/assets/stylesheets/luda/default/_mixins.sass +1 -0
  29. data/assets/stylesheets/luda/default/elements/_button.sass +1 -0
  30. data/assets/stylesheets/luda/default/index.sass +27 -27
  31. data/assets/stylesheets/luda/default/patterns/_button-group.sass +1 -0
  32. data/assets/stylesheets/luda/default/patterns/_navigation.sass +0 -1
  33. data/assets/stylesheets/luda/default/utilities/_alignment.sass +5 -0
  34. data/lib/luda/version.rb +1 -1
  35. metadata +8 -9
  36. data/MIT-LICENSE +0 -20
  37. data/assets/stylesheets/luda/_core/utilities/_space.sass +0 -227
  38. data/assets/stylesheets/luda/default/utilities/_align.sass +0 -5
  39. data/assets/stylesheets/luda/default/utilities/_space.sass +0 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA256:
3
- metadata.gz: 1054ce023a6863675d67d8ecccb446ff7518e4e7cb4e5f6f9128afdd577ddcd2
4
- data.tar.gz: dcd03dd757ca3d475f69358f096beaff38a219b356080e948f5183df75e867a2
2
+ SHA1:
3
+ metadata.gz: b5eddacd5a22522c901fa071bb75f3443b868158
4
+ data.tar.gz: 4a29547a3361bc8eeb857718a239b15ad779fc87
5
5
  SHA512:
6
- metadata.gz: 2c8c265427e255b307f7f43f44de490b8e1d2429cb7482b75b05c28b051de20b6741ab744e873b589489175f6c53b361a885f1cb7e0fd070eb796345a804e564
7
- data.tar.gz: 5d63d0d5a87a6dda234e346c01a3dd62787813feb64db91dadae948998b65ff3ba97f7a218356f2de548792e9b47a8c43e45d80dabfa26234fb1d47a0f72e330
6
+ metadata.gz: de5e9ae9cfc9b87f5789ee4a5bdbd3f2ed6c67a8d200a41a53a454f84242b08ea0565b5de77c961fa2f669ee9b226ab62bbd82cebb8f841416b0f2be9f35c2e5
7
+ data.tar.gz: bfec4be5b9c360563ceeb80fb020894e458dba1c231dbb0e0ad5ea9048820ab52a028dcab3160a888a0702057ad54488b50416e7576f3ab34465b349c7af6bd6
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2019 Oatw
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.
data/README.md CHANGED
@@ -1,5 +1,54 @@
1
- # Luda
1
+ <img src="https://github.com/oatw/luda/blob/master/site/assets/img/logo-horizontal-full.svg" alt="logo" width="300" height="134"/>
2
2
 
3
- A lightweight and responsive UI framework for modern development.
3
+ __A lightweight and responsive UI framework for modern web development.__
4
4
 
5
- ## This package has not been released officially, this is just a demo package to occupy a package name.
5
+ Know more about Luda at the [official site](https://oatw.github.io/luda).
6
+ Communicate with Luda's contributers in the [gitter chatroom](https://gitter.im/oatw/luda).
7
+
8
+ ## Key Features
9
+
10
+ - Lightweight - No dependency. Includes multiple themes, each theme is only ~25KB after gziped.
11
+ - Modular - Supports modular imports in asset management tools.
12
+ - Rhythmical - Built-in baseline grid, column grid, modular type scale and more...
13
+ - Automatic - Based on Mutation Observer API, components' lifecycles are handled automatically.
14
+
15
+ _Before version 1.0.0, only the default theme is released, more themes will be released after version 1.0.0._
16
+
17
+ ## Getting Started
18
+
19
+ Options to get Luda:
20
+
21
+ - Directly load the [CSS](https://unpkg.com/luda/dist/css/luda-default.min.css)
22
+ and [JS](https://unpkg.com/luda/dist/js/luda.min.js) from unpkg CDN.
23
+ - Download the [CSS and JS](https://github.com/oatw/luda/tree/master/release/dist) from this repo.
24
+ - Install with yarn: `yarn add luda`.
25
+ - Install with npm: `npm install luda`.
26
+ - Install with gem: `gem install luda`.
27
+
28
+ ## Bug Reports and Feature Requests
29
+
30
+ Before reporting a bug or submitting a feature request,
31
+ please make sure you've read the
32
+ [issue guidelines](https://github.com/oatw/luda/blob/master/.github/CONTRIBUTING.md#using-the-issue-tracker)
33
+ and similiar issues are not addresed on the
34
+ [issues list](https://github.com/oatw/luda/issues).
35
+ Thanks!
36
+
37
+ ## Contributing
38
+
39
+ To get started, please read the
40
+ [contribution guidelines](https://github.com/oatw/luda/blob/master/.github/CONTRIBUTING.md).
41
+ Any contribution is welcome and highly appreciated.
42
+ Thanks!
43
+
44
+ ## Versioning
45
+
46
+ Luda is maintained under the [Semantic Versioning guidelines(SemVer)](https://semver.org).
47
+ To find out changes in released versions,
48
+ please read this [changelog](https://github.com/oatw/luda/blob/master/CHANGELOG.md).
49
+
50
+
51
+ ## Copyright and License
52
+
53
+ Copyright [Oatw](https://github.com/oatw) under the
54
+ [MIT license](https://github.com/oatw/luda/blob/master/LICENSE).
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Luda degradation script 0.1.12 | https://luda.dev
2
+ * Luda degradation script 0.1.13 | https://oatw.github.io/luda
3
3
  * Copyright 2019 Oatw | https://oatw.blog
4
4
  * MIT license | http://opensource.org/licenses/MIT
5
5
  */
@@ -1 +1 @@
1
- {"version":3,"file":"luda-degradation.js","sources":["../../src/coffee/degradation.coffee"],"sourcesContent":["Degradation =\n\n _URL_ATTRIBUTE: 'data-degradation-url'\n\n _HTML: [\n '<div id=\"luda-degradation-html\" '\n 'style=\"padding:100px 30px;text-align:center\">'\n '<h1>Your Browser Is Too Old!</h1>'\n '<p>'\n 'Please visit this site with a modern browser '\n '<a target=\"_blank\" href=\"https://www.google.com/chrome/\">'\n '(Chrome recommended)'\n '</a>'\n '.</p>'\n '</div>'\n ].join('')\n\n _CSS_PROPERTIES: [\n display: 'flex'\n position: ['sticky||-webkit-sticky', 'fixed']\n 'transition'\n 'animation'\n ]\n\n _JS_PROPERTIES:\n es6Class: 'class X {}'\n es6ArrowFunction: '((x) => x)()'\n mutationObserver: 'new MutationObserver(function(){})'\n\n _NOTIFY_MILLSECONDS: 500\n\n check: ->\n @_checkEnv()\n @_checkJS @_JS_PROPERTIES\n @_checkCSS @_CSS_PROPERTIES\n\n _eval: eval\n\n _checkEnv: ->\n if typeof document isnt 'undefined'\n return window if typeof window isnt 'undefined'\n return global if typeof global isnt 'undefined'\n throw new Error 'Unsupported runtime environment.'\n\n _checkJS: (properties) ->\n for property, value of properties\n try\n @_eval value\n catch err\n @_notify()\n throw new Error property + ' ' + err\n\n _checkCSS: (properties) ->\n ele = document.createElement 'div'\n for property in properties\n if typeof property is 'string'\n @_CSSPropertySupported ele, property\n else\n for name, value of property\n @_CSSPropertySupported ele, name\n if value instanceof Array\n @_CSSValueSupported ele, name, valueEle for valueEle in value\n else\n @_CSSValueSupported ele, name, value\n\n _CSSPropertySupported: (ele, property) ->\n unless typeof ele.style[property] is 'string'\n @_notify()\n throw new Error 'Unsupported CSS property: ' + property\n\n _CSSValueSupported: (ele, property, valueStr) ->\n values = valueStr.split '||'\n for value in values\n ele.style[property] = value\n return if ele.style[property] is value\n @_notify()\n throw new Error 'Unsupported CSS property value: ' \\\n + property + ' ' + valueStr\n\n _notify: ->\n redirectUrl = document.documentElement.getAttribute @_URL_ATTRIBUTE\n return location.href = redirectUrl if redirectUrl\n for script in document.scripts\n redirectUrl = script.getAttribute @_URL_ATTRIBUTE\n return location.href = redirectUrl if redirectUrl\n _self = this\n setInterval(->\n unless document.getElementById 'luda-degradation-html'\n document.body.innerHTML = _self._HTML if document.body\n , @_NOTIFY_MILLSECONDS)\n\n\n\n\nDegradation.check()"],"names":[],"mappings":";;;;;;;;;;;EAAA,IAAA;;EAAA,WAAA,GAEE;IAAA,cAAA,EAAgB,sBAAhB;IAEA,KAAA,EAAO,CACL,kCADK,EAEL,+CAFK,EAGL,mCA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,cAAvC;MACd,IAAsC,WAAtC;EAAA,aAAO,QAAQ,CAAC,IAAT,GAAgB,YAAvB;;EACA;MAAA,KAAA,qCAAA;;QACE,WAAA,GAAc,MAAM,CAAC,YAAP,CAAoB,IAAC,CAAA,cAArB;QACd,IAAsC,WAAtC;EAAA,eAAO,QAAQ,CAAC,IAAT,GAAgB,YAAvB;;;MACF,KAAA,GAAQ;aACR,WAAA,CAAY;QACV,IAAA,CAAO,QAAQ,CAAC,cAAT,CAAwB,uBAAxB,CAAP;UACE,IAAyC,QAAQ,CAAC,IAAlD;mBAAA,QAAQ,CAAC,IAAI,CAAC,SAAd,GAA0B,KAAK,CAAC,MAAhC;WADF;;OADF,EAGE,IAAC,CAAA,mBAHH;;EApFF;;EA4FF,WAAW,CAAC,KAAZ;;;;"}
1
+ {"version":3,"file":"luda-degradation.js","sources":["../../coffee/degradation.coffee"],"sourcesContent":["Degradation =\n\n _URL_ATTRIBUTE: 'data-degradation-url'\n\n _HTML: [\n '<div id=\"luda-degradation-html\" '\n 'style=\"padding:100px 30px;text-align:center\">'\n '<h1>Your Browser Is Too Old!</h1>'\n '<p>'\n 'Please visit this site with a modern browser '\n '<a target=\"_blank\" href=\"https://www.google.com/chrome/\">'\n '(Chrome recommended)'\n '</a>'\n '.</p>'\n '</div>'\n ].join('')\n\n _CSS_PROPERTIES: [\n display: 'flex'\n position: ['sticky||-webkit-sticky', 'fixed']\n 'transition'\n 'animation'\n ]\n\n _JS_PROPERTIES:\n es6Class: 'class X {}'\n es6ArrowFunction: '((x) => x)()'\n mutationObserver: 'new MutationObserver(function(){})'\n\n _NOTIFY_MILLSECONDS: 500\n\n check: ->\n @_checkEnv()\n @_checkJS @_JS_PROPERTIES\n @_checkCSS @_CSS_PROPERTIES\n\n _eval: eval\n\n _checkEnv: ->\n if typeof document isnt 'undefined'\n return window if typeof window isnt 'undefined'\n return global if typeof global isnt 'undefined'\n throw new Error 'Unsupported runtime environment.'\n\n _checkJS: (properties) ->\n for property, value of properties\n try\n @_eval value\n catch err\n @_notify()\n throw new Error property + ' ' + err\n\n _checkCSS: (properties) ->\n ele = document.createElement 'div'\n for property in properties\n if typeof property is 'string'\n @_CSSPropertySupported ele, property\n else\n for name, value of property\n @_CSSPropertySupported ele, name\n if value instanceof Array\n @_CSSValueSupported ele, name, valueEle for valueEle in value\n else\n @_CSSValueSupported ele, name, value\n\n _CSSPropertySupported: (ele, property) ->\n unless typeof ele.style[property] is 'string'\n @_notify()\n throw new Error 'Unsupported CSS property: ' + property\n\n _CSSValueSupported: (ele, property, valueStr) ->\n values = valueStr.split '||'\n for value in values\n ele.style[property] = value\n return if ele.style[property] is value\n @_notify()\n throw new Error 'Unsupported CSS property value: ' \\\n + property + ' ' + valueStr\n\n _notify: ->\n redirectUrl = document.documentElement.getAttribute @_URL_ATTRIBUTE\n return location.href = redirectUrl if redirectUrl\n for script in document.scripts\n redirectUrl = script.getAttribute @_URL_ATTRIBUTE\n return location.href = redirectUrl if redirectUrl\n _self = this\n setInterval(->\n unless document.getElementById 'luda-degradation-html'\n document.body.innerHTML = _self._HTML if document.body\n , @_NOTIFY_MILLSECONDS)\n\n\n\n\nDegradation.check()"],"names":[],"mappings":";;;;;;;;;;;EAAA,IAAA;;EAAA,WAAA,GAEE;IAAA,cAAA,EAAgB,sBAAhB;IAEA,KAAA,EAAO,CACL,kCADK,EAEL,+CAFK,EAGL,mCAHK,EAIL,KAJK,EAKL,+CALK,EAML,2DANK,EAOL,sBAPK,EAQL,MARK,EASL,OATK,EAUL,QAVK,CAWJ,CAAC,IAXG,CAWE,EAXF,CAFP;IAeA,eAAA,EAAiB;MACf;QAAA,OAAA,EAAS,MAAT;QACA,QAAA,EAAU,CAAC,wBAAD;MAA2B,OAA3B;OAFK;MAGf,YAHe;MAIf,WAJe;KAfjB;IAsBA,cAAA,EACE;MAAA,QAAA,EAAU,YAAV;MACA,gBAAA,EAAkB,cADlB;MAEA,gBAAA,EAAkB;KAzBpB;IA2BA,mBAAA,EAAqB,GA3Br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AI,CAAC,SAAd,GAA0B,KAAK,CAAC,MAAhC;WADF;;OADF,EAGE,IAAC,CAAA,mBAHH;;EApFF;;EA4FF,WAAW,CAAC,KAAZ;;;;"}
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Luda degradation script 0.1.12 | https://luda.dev
2
+ * Luda degradation script 0.1.13 | https://oatw.github.io/luda
3
3
  * Copyright 2019 Oatw | https://oatw.blog
4
4
  * MIT license | http://opensource.org/licenses/MIT
5
5
  */
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/coffee/degradation.coffee"],"names":["Degradation","_URL_ATTRIBUTE","_HTML","join","_CSS_PROPERTIES","display","position","_JS_PROPERTIES","es6Class","es6ArrowFunction","mutationObserver","_NOTIFY_MILLSECONDS","check","this","_checkEnv","_checkJS","_checkCSS","_eval","eval","document","window","global","Error","properties","err","property","results","value","error","_notify","ele","i","len","name","valueEle","createElement","length","_CSSPropertySupported","results1","Array","results2","j","len1","_CSSValueSupported","style","valueStr","values","split","_self","redirectUrl","ref","script","documentElement","getAttribute","location","href","scripts","setInterval","getElementById","body","innerHTML"],"mappings":";;;;;2LAAA,IAAAA,YAAAA,YAEE,CAAAC,eAAgB,uBAEhBC,MAAO,CACL,mCACA,gDACA,oCACA,MACA,gDACA,4DACA,uBACA,OACA,QACA,UACEC,KAAK,IAETC,gBAAiB,CACf,CAAAC,QAAS,OACTC,SAAU,CAAC,yBAA0B,UACrC,aACA,aAGFC,eACE,CAAAC,SAAU,aACVC,iBAAkB,eAClBC,iBAAkB,sCAEpBC,oBAAqB,IAErBC,MAAO,WACLC,KAACC,YACDD,KAACE,SAASF,KAACN,uBACXM,KAACG,UAAUH,KAACT,kBAEda,MAAOC,KAEPJ,UAAW,WACT,UAAUK,WAAc,YAAxB,CACE,UAAwBC,SAAY,YAApC,CAAA,OAAOA,OACP,UAAwBC,SAAY,YAApC,CAAA,OAAOA,QACT,MAAM,IAAIC,MAAM,qCAElBP,SAAU,SAACQ,YACT,IAAAC,IAAAC,S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C,KAACZ,gBACrD,GAAsCgD,YAAtC,CAAA,OAAOK,SAASC,KAAON,YACvBC,IAAA/B,SAAAqC,QAAA,IAAAzB,EAAA,EAAAC,IAAAkB,IAAAd,OAAAL,EAAAC,IAAAD,IAAA,eACEkB,YAAcE,OAAOE,aAAaxC,KAACZ,gBACnC,GAAsCgD,YAAtC,CAAA,OAAOK,SAASC,KAAON,aACzBD,MAAQnC,YACR4C,YAAY,WACV,IAAOtC,SAASuC,eAAe,yBAA/B,CACE,GAAyCvC,SAASwC,KAAlD,QAAAxC,SAASwC,KAAKC,UAAYZ,MAAM9C,SAClCW,KAACF,uBAKPX,YAAYY","sourcesContent":["Degradation =\n\n _URL_ATTRIBUTE: 'data-degradation-url'\n\n _HTML: [\n '<div id=\"luda-degradation-html\" '\n 'style=\"padding:100px 30px;text-align:center\">'\n '<h1>Your Browser Is Too Old!</h1>'\n '<p>'\n 'Please visit this site with a modern browser '\n '<a target=\"_blank\" href=\"https://www.google.com/chrome/\">'\n '(Chrome recommended)'\n '</a>'\n '.</p>'\n '</div>'\n ].join('')\n\n _CSS_PROPERTIES: [\n display: 'flex'\n position: ['sticky||-webkit-sticky', 'fixed']\n 'transition'\n 'animation'\n ]\n\n _JS_PROPERTIES:\n es6Class: 'class X {}'\n es6ArrowFunction: '((x) => x)()'\n mutationObserver: 'new MutationObserver(function(){})'\n\n _NOTIFY_MILLSECONDS: 500\n\n check: ->\n @_checkEnv()\n @_checkJS @_JS_PROPERTIES\n @_checkCSS @_CSS_PROPERTIES\n\n _eval: eval\n\n _checkEnv: ->\n if typeof document isnt 'undefined'\n return window if typeof window isnt 'undefined'\n return global if typeof global isnt 'undefined'\n throw new Error 'Unsupported runtime environment.'\n\n _checkJS: (properties) ->\n for property, value of properties\n try\n @_eval value\n catch err\n @_notify()\n throw new Error property + ' ' + err\n\n _checkCSS: (properties) ->\n ele = document.createElement 'div'\n for property in properties\n if typeof property is 'string'\n @_CSSPropertySupported ele, property\n else\n for name, value of property\n @_CSSPropertySupported ele, name\n if value instanceof Array\n @_CSSValueSupported ele, name, valueEle for valueEle in value\n else\n @_CSSValueSupported ele, name, value\n\n _CSSPropertySupported: (ele, property) ->\n unless typeof ele.style[property] is 'string'\n @_notify()\n throw new Error 'Unsupported CSS property: ' + property\n\n _CSSValueSupported: (ele, property, valueStr) ->\n values = valueStr.split '||'\n for value in values\n ele.style[property] = value\n return if ele.style[property] is value\n @_notify()\n throw new Error 'Unsupported CSS property value: ' \\\n + property + ' ' + valueStr\n\n _notify: ->\n redirectUrl = document.documentElement.getAttribute @_URL_ATTRIBUTE\n return location.href = redirectUrl if redirectUrl\n for script in document.scripts\n redirectUrl = script.getAttribute @_URL_ATTRIBUTE\n return location.href = redirectUrl if redirectUrl\n _self = this\n setInterval(->\n unless document.getElementById 'luda-degradation-html'\n document.body.innerHTML = _self._HTML if document.body\n , @_NOTIFY_MILLSECONDS)\n\n\n\n\nDegradation.check()"]}
1
+ {"version":3,"sources":["../../coffee/degradation.coffee"],"names":["Degradation","_URL_ATTRIBUTE","_HTML","join","_CSS_PROPERTIES","display","position","_JS_PROPERTIES","es6Class","es6ArrowFunction","mutationObserver","_NOTIFY_MILLSECONDS","check","this","_checkEnv","_checkJS","_checkCSS","_eval","eval","document","window","global","Error","properties","err","property","results","value","error","_notify","ele","i","len","name","valueEle","createElement","length","_CSSPropertySupported","results1","Array","results2","j","len1","_CSSValueSupported","style","valueStr","values","split","_self","redirectUrl","ref","script","documentElement","getAttribute","location","href","scripts","setInterval","getElementById","body","innerHTML"],"mappings":";;;;;2LAAA,IAAAA,YAAAA,YAEE,CAAAC,eAAgB,uBAEhBC,MAAO,CACL,mCACA,gDACA,oCACA,MACA,gDACA,4DACA,uBACA,OACA,QACA,UACEC,KAAK,IAETC,gBAAiB,CACf,CAAAC,QAAS,OACTC,SAAU,CAAC,yBAA0B,UACrC,aACA,aAGFC,eACE,CAAAC,SAAU,aACVC,iBAAkB,eAClBC,iBAAkB,sCAEpBC,oBAAqB,IAErBC,M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L,EAAAC,IAAAD,IAAA,iBACED,IAAIc,MAAMnB,UAAYE,MACtB,GAAUG,IAAIc,MAAMnB,YAAaE,MAAjC,CAAA,QACFd,KAACgB,UACD,MAAM,IAAIP,MAAM,mCACdG,SAAW,IAAMoB,WAErBhB,QAAS,WACP,IAAAmB,MAAAjB,EAAAC,IAAAiB,YAAAC,IAAAC,OAAAF,YAAc9B,SAASiC,gBAAgBC,aAAaxC,KAACZ,gBACrD,GAAsCgD,YAAtC,CAAA,OAAOK,SAASC,KAAON,YACvBC,IAAA/B,SAAAqC,QAAA,IAAAzB,EAAA,EAAAC,IAAAkB,IAAAd,OAAAL,EAAAC,IAAAD,IAAA,eACEkB,YAAcE,OAAOE,aAAaxC,KAACZ,gBACnC,GAAsCgD,YAAtC,CAAA,OAAOK,SAASC,KAAON,aACzBD,MAAQnC,YACR4C,YAAY,WACV,IAAOtC,SAASuC,eAAe,yBAA/B,CACE,GAAyCvC,SAASwC,KAAlD,QAAAxC,SAASwC,KAAKC,UAAYZ,MAAM9C,SAClCW,KAACF,uBAKPX,YAAYY","sourcesContent":["Degradation =\n\n _URL_ATTRIBUTE: 'data-degradation-url'\n\n _HTML: [\n '<div id=\"luda-degradation-html\" '\n 'style=\"padding:100px 30px;text-align:center\">'\n '<h1>Your Browser Is Too Old!</h1>'\n '<p>'\n 'Please visit this site with a modern browser '\n '<a target=\"_blank\" href=\"https://www.google.com/chrome/\">'\n '(Chrome recommended)'\n '</a>'\n '.</p>'\n '</div>'\n ].join('')\n\n _CSS_PROPERTIES: [\n display: 'flex'\n position: ['sticky||-webkit-sticky', 'fixed']\n 'transition'\n 'animation'\n ]\n\n _JS_PROPERTIES:\n es6Class: 'class X {}'\n es6ArrowFunction: '((x) => x)()'\n mutationObserver: 'new MutationObserver(function(){})'\n\n _NOTIFY_MILLSECONDS: 500\n\n check: ->\n @_checkEnv()\n @_checkJS @_JS_PROPERTIES\n @_checkCSS @_CSS_PROPERTIES\n\n _eval: eval\n\n _checkEnv: ->\n if typeof document isnt 'undefined'\n return window if typeof window isnt 'undefined'\n return global if typeof global isnt 'undefined'\n throw new Error 'Unsupported runtime environment.'\n\n _checkJS: (properties) ->\n for property, value of properties\n try\n @_eval value\n catch err\n @_notify()\n throw new Error property + ' ' + err\n\n _checkCSS: (properties) ->\n ele = document.createElement 'div'\n for property in properties\n if typeof property is 'string'\n @_CSSPropertySupported ele, property\n else\n for name, value of property\n @_CSSPropertySupported ele, name\n if value instanceof Array\n @_CSSValueSupported ele, name, valueEle for valueEle in value\n else\n @_CSSValueSupported ele, name, value\n\n _CSSPropertySupported: (ele, property) ->\n unless typeof ele.style[property] is 'string'\n @_notify()\n throw new Error 'Unsupported CSS property: ' + property\n\n _CSSValueSupported: (ele, property, valueStr) ->\n values = valueStr.split '||'\n for value in values\n ele.style[property] = value\n return if ele.style[property] is value\n @_notify()\n throw new Error 'Unsupported CSS property value: ' \\\n + property + ' ' + valueStr\n\n _notify: ->\n redirectUrl = document.documentElement.getAttribute @_URL_ATTRIBUTE\n return location.href = redirectUrl if redirectUrl\n for script in document.scripts\n redirectUrl = script.getAttribute @_URL_ATTRIBUTE\n return location.href = redirectUrl if redirectUrl\n _self = this\n setInterval(->\n unless document.getElementById 'luda-degradation-html'\n document.body.innerHTML = _self._HTML if document.body\n , @_NOTIFY_MILLSECONDS)\n\n\n\n\nDegradation.check()"]}
@@ -1,7 +1,7 @@
1
1
  //= require luda/behaviors/enter
2
2
  //= require luda/behaviors/focus
3
- //= require luda/behaviors/tabulate
4
3
  //= require luda/behaviors/readonly
4
+ //= require luda/behaviors/tabulate
5
5
  //= require luda/behaviors/toggle
6
6
  //= require luda/elements/form-file
7
7
  //= require luda/elements/form-select
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Luda 0.1.12 | https://luda.dev
2
+ * Luda 0.1.13 | https://oatw.github.io/luda
3
3
  * Copyright 2019 Oatw | https://oatw.blog
4
4
  * MIT license | http://opensource.org/licenses/MIT
5
5
  */
@@ -757,65 +757,6 @@
757
757
 
758
758
  }).call(this));
759
759
 
760
- luda((function() {
761
- var _Class;
762
-
763
- _Class = class extends luda.Static {
764
- static _querySameName$radios($radio) {
765
- var $inputs, selector;
766
- if ($radio.name) {
767
- selector = `${this._selector}[name=${$radio.name}]`;
768
- } else {
769
- selector = this._selector;
770
- }
771
- $inputs = luda.$children(selector);
772
- return $inputs.filter(function($input) {
773
- return $input.tabIndex >= 0;
774
- });
775
- }
776
-
777
- static _query$prev$next($radio) {
778
- var $next, $prev, $sameNameRadios, radioIndex;
779
- $sameNameRadios = this._querySameName$radios($radio);
780
- radioIndex = $sameNameRadios.indexOf($radio);
781
- $prev = $sameNameRadios[radioIndex - 1];
782
- $next = $sameNameRadios[radioIndex + 1];
783
- return {$prev, $next};
784
- }
785
-
786
- static _init() {
787
- var self;
788
- self = this;
789
- return luda.on('keydown', function(e) {
790
- var $next, $prev;
791
- if (!document.documentElement.hasAttribute(self._DISABLED_ATTRIBUTE) && e.keyCode === luda.KEY_TAB && e.target.nodeName.toUpperCase() === 'INPUT' && e.target.type === 'radio') {
792
- if (e.shiftKey) {
793
- if ($prev = self._query$prev$next(e.target).$prev) {
794
- e.preventDefault();
795
- return $prev.focus();
796
- }
797
- } else {
798
- if ($next = self._query$prev$next(e.target).$next) {
799
- e.preventDefault();
800
- return $next.focus();
801
- }
802
- }
803
- }
804
- });
805
- }
806
-
807
- };
808
-
809
- _Class._SCOPE = 'tabulate';
810
-
811
- _Class._SELECTORS = ['input[type=radio]:not([disabled])'];
812
-
813
- _Class._DISABLED_ATTRIBUTE = 'data-tabulate-disabled';
814
-
815
- return _Class;
816
-
817
- }).call(this));
818
-
819
760
  var Factory;
820
761
 
821
762
  luda(Factory = (function() {
@@ -1144,15 +1085,15 @@
1144
1085
 
1145
1086
  _Class = class extends luda.Factory {
1146
1087
  _getConfig() {
1147
- var _isReadonly, _originalTabIndex, readonly;
1088
+ var _isReadonly, readonly;
1148
1089
  readonly = this._$component.getAttribute(this.constructor._READONLY_ATTRIBUTE);
1149
1090
  _isReadonly = readonly !== this.constructor._READONLY_FALSE_VALUE;
1150
- _originalTabIndex = this._$component.tabIndex;
1151
- return {_isReadonly, _originalTabIndex};
1091
+ return {_isReadonly};
1152
1092
  }
1153
1093
 
1154
1094
  _constructor() {
1155
- ({_isReadonly: this._isReadonly, _originalTabIndex: this._originalTabIndex} = this._getConfig());
1095
+ ({_isReadonly: this._isReadonly} = this._getConfig());
1096
+ this._setOriginalTabIndex();
1156
1097
  return this._setTabIndex();
1157
1098
  }
1158
1099
 
@@ -1160,11 +1101,17 @@
1160
1101
  return this._constructor();
1161
1102
  }
1162
1103
 
1104
+ _setOriginalTabIndex() {
1105
+ if (!this._$component.hasAttribute(this.constructor._ORIGINAL_TABINDEX_ATTRIBUTE)) {
1106
+ return this._$component.setAttribute(this.constructor._ORIGINAL_TABINDEX_ATTRIBUTE, this._$component.tabIndex);
1107
+ }
1108
+ }
1109
+
1163
1110
  _setTabIndex() {
1164
1111
  if (this._isReadonly) {
1165
1112
  return this._$component.tabIndex = -1;
1166
1113
  } else {
1167
- return this._$component.tabIndex = this._originalTabIndex;
1114
+ return this._$component.tabIndex = this._$component.getAttribute(this.constructor._ORIGINAL_TABINDEX_ATTRIBUTE);
1168
1115
  }
1169
1116
  }
1170
1117
 
@@ -1174,6 +1121,8 @@
1174
1121
 
1175
1122
  _Class._READONLY_ATTRIBUTE = 'data-readonly';
1176
1123
 
1124
+ _Class._ORIGINAL_TABINDEX_ATTRIBUTE = 'data-readonly-tabindex';
1125
+
1177
1126
  _Class._READONLY_FALSE_VALUE = 'false';
1178
1127
 
1179
1128
  _Class._SELECTOR = `[${_Class._READONLY_ATTRIBUTE}]`;
@@ -1187,6 +1136,65 @@
1187
1136
 
1188
1137
  }).call(this));
1189
1138
 
1139
+ luda((function() {
1140
+ var _Class;
1141
+
1142
+ _Class = class extends luda.Static {
1143
+ static _querySameName$radios($radio) {
1144
+ var $inputs, selector;
1145
+ if ($radio.name) {
1146
+ selector = `${this._selector}[name=${$radio.name}]`;
1147
+ } else {
1148
+ selector = this._selector;
1149
+ }
1150
+ $inputs = luda.$children(selector);
1151
+ return $inputs.filter(function($input) {
1152
+ return $input.tabIndex >= 0;
1153
+ });
1154
+ }
1155
+
1156
+ static _query$prev$next($radio) {
1157
+ var $next, $prev, $sameNameRadios, radioIndex;
1158
+ $sameNameRadios = this._querySameName$radios($radio);
1159
+ radioIndex = $sameNameRadios.indexOf($radio);
1160
+ $prev = $sameNameRadios[radioIndex - 1];
1161
+ $next = $sameNameRadios[radioIndex + 1];
1162
+ return {$prev, $next};
1163
+ }
1164
+
1165
+ static _init() {
1166
+ var self;
1167
+ self = this;
1168
+ return luda.on('keydown', function(e) {
1169
+ var $next, $prev;
1170
+ if (!document.documentElement.hasAttribute(self._DISABLED_ATTRIBUTE) && e.keyCode === luda.KEY_TAB && e.target.nodeName.toUpperCase() === 'INPUT' && e.target.type === 'radio') {
1171
+ if (e.shiftKey) {
1172
+ if ($prev = self._query$prev$next(e.target).$prev) {
1173
+ e.preventDefault();
1174
+ return $prev.focus();
1175
+ }
1176
+ } else {
1177
+ if ($next = self._query$prev$next(e.target).$next) {
1178
+ e.preventDefault();
1179
+ return $next.focus();
1180
+ }
1181
+ }
1182
+ }
1183
+ });
1184
+ }
1185
+
1186
+ };
1187
+
1188
+ _Class._SCOPE = 'tabulate';
1189
+
1190
+ _Class._SELECTORS = ['input[type=radio]:not([disabled])'];
1191
+
1192
+ _Class._DISABLED_ATTRIBUTE = 'data-tabulate-disabled';
1193
+
1194
+ return _Class;
1195
+
1196
+ }).call(this));
1197
+
1190
1198
  luda((function() {
1191
1199
  var _Class;
1192
1200
 
@@ -1340,7 +1348,7 @@
1340
1348
  _Class = class extends luda.Factory {
1341
1349
  reset() {
1342
1350
  this._$file.value = '';
1343
- return this._$simulator.value = '';
1351
+ return this._setSimulatorInitialValue();
1344
1352
  }
1345
1353
 
1346
1354
  _getConfig() {
@@ -1366,7 +1374,9 @@
1366
1374
  }
1367
1375
 
1368
1376
  _setPlaceholderValue() {
1369
- return this._$simulator.placeholder = this._$file.getAttribute(this.constructor._PLACEHOLDER_ATTRIBUTE);
1377
+ if (this._$file.hasAttribute(this.constructor._PLACEHOLDER_ATTRIBUTE)) {
1378
+ return this._$simulator.placeholder = this._$file.getAttribute(this.constructor._PLACEHOLDER_ATTRIBUTE);
1379
+ }
1370
1380
  }
1371
1381
 
1372
1382
  _setSimulatorValue() {
@@ -1377,7 +1387,12 @@
1377
1387
  });
1378
1388
  if (values.length) {
1379
1389
  return this._$simulator.value = values.join(this.constructor._VALUE_SPLITOR);
1380
- } else if (this._$file.hasAttribute(this.constructor._VALUE_ATTRIBUTE)) {
1390
+ }
1391
+ return this._setSimulatorInitialValue();
1392
+ }
1393
+
1394
+ _setSimulatorInitialValue() {
1395
+ if (this._$file.hasAttribute(this.constructor._VALUE_ATTRIBUTE)) {
1381
1396
  return this._$simulator.value = this._$file.getAttribute(this.constructor._VALUE_ATTRIBUTE);
1382
1397
  }
1383
1398
  }
@@ -1387,9 +1402,7 @@
1387
1402
  if (!this._$simulator) {
1388
1403
  this._insertSimulator();
1389
1404
  }
1390
- if (this._$file.hasAttribute(this.constructor._PLACEHOLDER_ATTRIBUTE)) {
1391
- this._setPlaceholderValue();
1392
- }
1405
+ this._setPlaceholderValue();
1393
1406
  return this._setSimulatorValue();
1394
1407
  }
1395
1408
  }
@@ -1 +1 @@
1
- {"version":3,"file":"luda.js","sources":["../../src/coffee/install.coffee","../../src/coffee/constants.coffee","../../src/coffee/dom.coffee","../../src/coffee/event.coffee","../../src/coffee/utilities.coffee","../../src/coffee/static.coffee","../../src/coffee/behaviors/enter.coffee","../../src/coffee/behaviors/focus.coffee","../../src/coffee/behaviors/tabulate.coffee","../../src/coffee/factory.coffee","../../src/coffee/behaviors/readonly.coffee","../../src/coffee/behaviors/toggle.coffee","../../src/coffee/elements/form-file.coffee","../../src/coffee/elements/form-select.coffee","../../src/coffee/patterns/carousel.coffee","../../src/coffee/patterns/dropdown.coffee","../../src/coffee/patterns/form-dropdown.coffee","../../src/coffee/patterns/tab.coffee"],"sourcesContent":["ENV = (->\n if typeof document isnt 'undefined'\n return window if typeof window isnt 'undefined'\n return global if typeof global isnt 'undefined'\n throw new Error 'Unsupported runtime environment.'\n)()\n\n\n\nunless typeof ENV.luda is 'function'\n ENV.luda = (installer) ->\n throw new Error 'Installer cannot be detected.' unless installer\n unless ['object', 'function'].includes typeof installer\n throw new Error 'Installer must be object, array or function.'\n if installer.hasOwnProperty '_SCOPE'\n unless typeof installer._SCOPE is 'string'\n throw new Error '_SCOPE must be string'\n return ENV.luda._install installer._SCOPE, installer\n if installer instanceof Array or typeof installer is 'function'\n throw new Error 'Unscoped installer must be object.'\n installed = {}\n for name, property of installer\n installed[name] = ENV.luda._install name, property\n installed\n\n ENV.luda._install = (namespace, installer) ->\n if ENV.luda[namespace]\n console.warn \"Namespace #{namespace} is ocupied, sikp installation.\"\n return ENV.luda[namespace]\n for installedName, installedInstaller of ENV.luda\n if installer is installedInstaller\n console.warn \"Installer is installed with name #{installedName},\n skip installation.\"\n return ENV.luda[installedName]\n if installer._install\n if typeof installer._install is 'function'\n return ENV.luda[namespace] = installer._install()\n return ENV.luda[namespace] = installer._install\n ENV.luda[namespace] = installer","import './install.coffee'\n\n\n\nluda\n\n KEY_LEFT: 37\n KEY_UP: 38\n KEY_RIGHT: 39\n KEY_DOWN: 40\n KEY_TAB: 9\n KEY_ESC: 27\n KEY_ENTER: 13","import './install.coffee'\n\n\n\nluda\n \n $child: (selector, $ancestor) ->\n $ancestor = document unless $ancestor\n $ancestor.querySelector selector\n\n $children: (selector, $ancestor) ->\n $ancestor = document unless $ancestor\n $descendant = @$child selector, $ancestor\n if $descendant\n descendants = Array.from($ancestor.querySelectorAll selector)\n else\n descendants = []\n\n $unnested: (selector, $ancestor, ancestorSelector) ->\n descendants = @$children selector, $ancestor\n descendants.filter ($descendant) =>\n $descendant if @$parent(ancestorSelector, $descendant) is $ancestor\n\n $parent: (selector, $descendant) ->\n $ancestor = $descendant.parentNode\n if $ancestor\n if $ancestor.matches and $ancestor.matches selector\n $ancestor\n else\n @$parent selector, $ancestor\n\n $parents: (selector, $descendant, _ancestors) ->\n $ancestor = @$parent selector, $descendant\n _ancestors = [] unless _ancestors\n if $ancestor\n _ancestors.push($ancestor)\n @$parents selector, $ancestor, _ancestors\n else\n _ancestors\n\n $after: ($node, $target) ->\n $parent = $target.parentNode\n if $parent.lastChild is $target\n $parent.appendChild $node\n else\n $parent.insertBefore $node, $target.nextSibling\n\n $prepend: ($node, $target) ->\n if $target.firstChild\n $target.insertBefore $node, $target.firstChild\n else\n $target.appendChild $node\n\n reflow: ($element) -> $element.offsetHeight\n\n _getTransitionDurations: (style, propertyLength) ->\n durationArray = style.split ','\n while durationArray.length < propertyLength\n durationArray = durationArray.concat durationArray\n if durationArray.length > propertyLength\n durationArray = durationArray.slice 0, propertyLength\n durationArray.map (durationStr) ->\n duration = parseFloat durationStr\n return 0 unless duration\n if durationStr.match 'ms' then duration else duration * 1000\n\n getTransitionDuration: ($element) ->\n styles = window.getComputedStyle $element\n length = styles.transitionProperty.split(',').length\n return 0 unless length\n delays = @_getTransitionDurations styles.transitionDelay, length\n durations = @_getTransitionDurations styles.transitionDuration, length\n finalDurations = durations.map (duration, index) -> duration + delays[index]\n Math.max.apply null, finalDurations\n\n _observeDom: (onNodeAdded, onNodeRemoved) ->\n observerConfig =\n childList: true\n subtree: true\n observer = new MutationObserver (mutations) ->\n mutations.forEach (mutation) ->\n $removedNodes = Array.from mutation.removedNodes\n $addedNodes = Array.from mutation.addedNodes\n $removedNodes.forEach ($node) ->\n onNodeRemoved $node if $node instanceof Element and onNodeRemoved\n $addedNodes.forEach ($node) ->\n onNodeAdded $node if $node instanceof Element and onNodeAdded\n observer.observe document.documentElement, observerConfig\n observer","import './install.coffee'\nimport './dom.coffee'\n\n\n\nluda\n \n _SWIPE_DISTANCE: 10\n _EVENT_TYPE_PREFIX: 'luda'\n _SWIPE_LEFT: 'swipeleft'\n _SWIPE_RIGHT: 'swiperight'\n _SWIPE_UP: 'swipeup'\n _SWIPE_DOWN: 'swipedown'\n _SWIPE_LEFT_OR_UP: 'swipeleft or swipeup'\n _SWIPE_RIGHT_OR_DOWN: 'swiperight or swipedown'\n _DOC_READY: 'docready'\n _FORM_RESET: 'reset'\n\n eventPath: (event) ->\n if event.composedPath\n path = event.composedPath()\n else if event.path\n path = event.path\n else\n path = [event.target].concat(luda.$parents '*', event.target)\n\n on: (event, selector..., handler) ->\n switch event\n when @_DOC_READY then @_onDocReady handler\n when @_FORM_RESET then @_onReset selector[0], handler\n when @_SWIPE_LEFT, \\\n @_SWIPE_RIGHT, \\\n @_SWIPE_UP, \\\n @_SWIPE_DOWN, \\\n @_SWIPE_LEFT_OR_UP, \\\n @_SWIPE_RIGHT_OR_DOWN\n then @_onSwipe event, selector[0], handler\n else @_on event, selector[0], handler\n\n onOpposite: (event, selector, handler) ->\n _self = this\n document.addEventListener event, (e) ->\n trigger = _self.eventPath(e).every ($element) ->\n not $element.matches or not $element.matches selector\n handler e if trigger\n\n dispatch: ($target, type, detail, delayMilliseconds, options = {}) ->\n options.bubbles = true unless typeof options.bubbles is 'boolean'\n options.cancelable = true unless typeof options.cancelable is 'boolean'\n options.composed = true unless typeof options.composed is 'boolean'\n evt = new Event \"#{@_EVENT_TYPE_PREFIX}:#{type}\", options\n evt.detail = detail\n if typeof delayMilliseconds is 'number'\n setTimeout ->\n $target.dispatchEvent evt if $target\n , delayMilliseconds\n else\n $target.dispatchEvent evt\n evt\n \n _onDocReady: (handler) ->\n if document.readyState is 'loading'\n document.addEventListener 'DOMContentLoaded', handler\n else\n handler()\n\n _onReset: (selector, handler) ->\n document.addEventListener 'reset', (e) ->\n if selector?\n luda.$children(selector, e.target).forEach ($element) ->\n handler.bind($element)(e)\n else\n handler e\n \n _onSwipe: (event, selector, handler) ->\n _self = this\n watch = false\n $touchStartElement = document\n touchStartE = null\n touchStartX = 0\n touchStartY = 0\n document.addEventListener 'touchstart', (e) ->\n if e.touches.length is 1\n touchStartX = e.touches[0].screenX\n touchStartY = e.touches[0].screenY\n if selector?\n _self.eventPath(e).some ($element) ->\n if $element.matches and $element.matches selector\n $touchStartElement = $element\n touchStartE = e\n watch = true\n return true\n else\n watch = true\n\n document.addEventListener 'touchmove', (e) ->\n if watch and e.touches.length is 1\n touchDistanceX = e.touches[0].screenX - touchStartX\n touchDistanceY = e.touches[0].screenY - touchStartY\n eventX = undefined\n eventY = undefined\n eventXOrY = undefined\n if Math.abs(touchDistanceX) >= _self._SWIPE_DISTANCE\n if touchDistanceX > 0\n eventX = _self._SWIPE_RIGHT\n else\n eventX = _self._SWIPE_LEFT\n if Math.abs(touchDistanceY) >= _self._SWIPE_DISTANCE\n if touchDistanceY > 0\n eventY = _self._SWIPE_DOWN\n else\n eventY = _self._SWIPE_UP\n if eventX is _self._SWIPE_LEFT \\\n or eventY is _self._SWIPE_UP\n eventXOrY = _self._SWIPE_LEFT_OR_UP\n if eventX is _self._SWIPE_RIGHT \\\n or eventY is _self._SWIPE_DOWN\n eventXOrY = _self._SWIPE_RIGHT_OR_DOWN\n if (eventX? and eventX is event) \\\n or (eventY? and eventY is event) \\\n or eventXOrY is event\n if selector?\n _self.eventPath(e).some ($element) ->\n if $element is $touchStartElement\n watch = false\n handler.bind($element)(touchStartE, e)\n return true\n else\n watch = false\n handler touchStartE, e\n\n _on: (event, selector, handler) ->\n if selector is window\n window.addEventListener event, (e) -> handler e\n else\n _self = this\n document.addEventListener event, (e) ->\n if selector?\n _self.eventPath(e).some ($element) ->\n if $element.matches and $element.matches selector\n handler.bind($element)(e)\n return true\n else\n handler e","import './install.coffee'\n\n\n\nluda\n \n except: (element, arr) ->\n arr.splice(arr.indexOf(element), 1) if arr.includes element","import './install.coffee'\nimport './utilities.coffee'\nimport './dom.coffee'\nimport './event.coffee'\n\n\n \nluda class Static\n\n @_SCOPE: 'Static'\n \n @_SELECTOR_INVALID_ERROR: '@param selector must be a css selector string'\n @_SELECTORS: []\n\n @_ACTIVATE_EVENT_TYPE: -> \"#{@_SCOPE}:activate\"\n @_ACTIVATED_EVENT_TYPE: -> \"#{@_SCOPE}:activated\"\n @_DEACTIVATE_EVENT_TYPE: -> \"#{@_SCOPE}:deactivate\"\n @_DEACTIVATED_EVENT_TYPE: -> \"#{@_SCOPE}:deactivated\"\n @_ACTIVATING_MARK_ATTRIBUTE: -> \"data-#{@_SCOPE}-activating\"\n @_DEACTIVATING_MARK_ATTRIBUTE: -> \"data-#{@_SCOPE}-deactivating\"\n\n @_Observed: []\n @_observer: null\n\n @_selector: ''\n\n @_add: (selector) ->\n throw new Error @_SELECTOR_INVALID_ERROR if typeof selector isnt 'string'\n @_SELECTORS.push selector unless @_SELECTORS.includes selector\n @_mergeSelectors()\n\n @_remove: (selector) ->\n throw new Error @_SELECTOR_INVALID_ERROR if typeof selector isnt 'string'\n luda.except selector, @_SELECTORS\n @_mergeSelectors()\n\n @_mergeSelectors: ->\n @_selector = @_SELECTORS.join ','\n\n @_activatePrevented: ($ele, detail) ->\n activateEvent = luda.dispatch $ele, @_ACTIVATE_EVENT_TYPE(), detail\n activateEvent.defaultPrevented\n\n @_deactivatePrevented: ($ele, detail) ->\n deactivateEvent = luda.dispatch $ele, @_DEACTIVATE_EVENT_TYPE(), detail\n deactivateEvent.defaultPrevented\n\n @_handleActivateEnd: ($ele, detail) ->\n @_setActivatingMark $ele, detail\n activateDuration = luda.getTransitionDuration $ele\n luda.dispatch $ele, @_ACTIVATED_EVENT_TYPE(), detail, activateDuration\n setTimeout =>\n @_removeActivatingMark $ele if $ele\n , activateDuration\n activateDuration\n\n @_handleDeactivateEnd: ($ele, detail) ->\n @_setDeactivatingMark $ele, detail\n deactivateDuration = luda.getTransitionDuration $ele\n luda.dispatch $ele, @_DEACTIVATED_EVENT_TYPE(), detail, deactivateDuration\n setTimeout =>\n @_removeDeactivatingMark $ele if $ele\n , deactivateDuration\n deactivateDuration\n\n @_handleActivateCancel: ($ele, detail) ->\n if @_isActivating $ele\n luda.dispatch $ele, @_ACTIVATED_EVENT_TYPE(), detail\n @_removeActivatingMark $ele\n\n @_handleDeactivateCancel: ($ele, detail) ->\n if @_isDeactivating $ele\n luda.dispatch $ele, @_DEACTIVATED_EVENT_TYPE(), detail\n @_removeDeactivatingMark $ele\n\n @_isActivating: ($ele) ->\n $ele.hasAttribute @_ACTIVATING_MARK_ATTRIBUTE()\n\n @_isDeactivating: ($ele) ->\n $ele.hasAttribute @_DEACTIVATING_MARK_ATTRIBUTE()\n\n @_isTransitioning: ($ele) ->\n @_isActivating($ele) or @_isDeactivating($ele)\n\n @_getActivatingMark: ($ele) ->\n $ele.getAttribute @_ACTIVATING_MARK_ATTRIBUTE()\n\n @_getDeactivatingMark: ($ele) ->\n $ele.getAttribute @_DEACTIVATING_MARK_ATTRIBUTE()\n\n @_removeActivatingMark: ($ele) ->\n $ele.removeAttribute @_ACTIVATING_MARK_ATTRIBUTE()\n\n @_removeDeactivatingMark: ($ele) ->\n $ele.removeAttribute @_DEACTIVATING_MARK_ATTRIBUTE()\n\n @_setActivatingMark: ($ele, value) ->\n $ele.setAttribute @_ACTIVATING_MARK_ATTRIBUTE(), value\n\n @_setDeactivatingMark: ($ele, value) ->\n $ele.setAttribute @_DEACTIVATING_MARK_ATTRIBUTE(), value\n\n @_onEleAdded: ($ele) ->\n Static._onEleAddedOrRemoved $ele, '_onElementAdded'\n\n @_onEleRemoved: ($ele) ->\n Static._onEleAddedOrRemoved $ele, '_onElementRemoved'\n\n @_onEleAddedOrRemoved: ($ele, action) ->\n Static._Observed.forEach (Observed) ->\n return unless Observed[action]\n $matched = luda.$children Observed._selector, $ele\n $matched.unshift $ele if $ele.matches Observed._selector\n $matched.forEach ($target) -> Observed[action] $target\n\n @_observe: (classObj) ->\n unless Static._observer\n Static._observer = \\\n luda._observeDom Static._onEleAdded, Static._onEleRemoved\n if classObj._onElementAdded or classObj._onElementRemoved \\\n and classObj._selector\n unless Static._Observed.includes classObj\n Static._Observed.push classObj\n\n @_install: ->\n self = this\n return this if this is Static\n @_SELECTORS = [] unless @hasOwnProperty '_SELECTORS'\n @_mergeSelectors()\n exposed = @_init() if typeof @_init is 'function'\n luda.on luda._DOC_READY, -> Static._observe(self)\n if exposed then exposed else this","import '../install.coffee'\nimport '../constants.coffee'\nimport '../event.coffee'\nimport '../static.coffee'\n\n\nluda class extends luda.Static\n\n @_SCOPE: 'enter'\n\n @_SELECTORS: [\n 'input[type=checkbox]'\n 'input[type=radio]'\n '[tabindex]'\n ]\n\n @_DISABLED_ATTRIBUTE: 'data-enter-disabled'\n\n @_init: ->\n self = this\n luda.on 'keydown', (e) ->\n if not document.documentElement.hasAttribute(self._DISABLED_ATTRIBUTE) \\\n and e.keyCode is luda.KEY_ENTER \\\n and e.target.matches(self._selector)\n e.preventDefault()\n setTimeout(-> e.target.click())","import '../install.coffee'\nimport '../dom.coffee'\nimport '../event.coffee'\nimport '../static.coffee'\n\n\n\nluda class extends luda.Static\n\n @_SCOPE: 'focus'\n\n @_CSS_CLASS: 'focus'\n # mouse focusable selectors\n @_SELECTORS: ['select'\n 'textarea'\n ':not(.btn-check):not(.btn-radio):not(.btn-file) >\n input:not([type=button]):not([type=submit]):not([type=reset])'\n ]\n @_TOUCHSTART_FOCUS_SELECTOR: 'input[type=range]'\n @_PARENT_FOCUS_SELECTOR: 'select[multiple]'\n @_PARENT_FOCUS_CHILDREN_SELECTOR: \"#{@_PARENT_FOCUS_SELECTOR} *\"\n\n @_DISABLED_ATTRIBUTE: 'data-focus-disabled'\n\n @_$focus: document.getElementsByClassName(@_CSS_CLASS)\n\n @_isActive: ->\n not document.documentElement.hasAttribute(@_DISABLED_ATTRIBUTE)\n\n @_removeFocusClassExcept: ($exception) ->\n Array.from(@_$focus).forEach ($focus) =>\n $focus.classList.remove @_CSS_CLASS if $focus isnt $exception\n\n @_addFocusClassExceptHtmlAndBody: ($target) ->\n if $target isnt document.body and $target isnt document.documentElement\n $target.classList.add @_CSS_CLASS\n\n @_changeFocusStateOnKeyEvent: (e) ->\n if @_isActive()\n @_removeFocusClassExcept e.target\n @_addFocusClassExceptHtmlAndBody e.target\n\n @_changeFocusStateOnMouseDownEvent: (e) ->\n if @_isActive()\n if e.target.matches @_PARENT_FOCUS_CHILDREN_SELECTOR\n target = luda.$parent @_PARENT_FOCUS_SELECTOR, e.target\n else\n target = e.target\n if target.matches @_selector\n @_removeFocusClassExcept target\n @_addFocusClassExceptHtmlAndBody target\n else\n @_removeFocusClassExcept()\n\n @_setElementPrototype: ->\n focus = HTMLElement.prototype.focus\n blur = HTMLElement.prototype.blur\n self = this\n HTMLElement.prototype.focus = ->\n focus.apply this, arguments\n if self._isActive() and document.activeElement is this\n self._removeFocusClassExcept this\n self._addFocusClassExceptHtmlAndBody this\n HTMLElement.prototype.blur = ->\n blur.apply this, arguments\n this.classList.remove self._CSS_CLASS if self._isActive()\n\n @_init: ->\n self = this\n @_setElementPrototype()\n luda.on 'keydown', @_changeFocusStateOnKeyEvent.bind this\n luda.on 'keyup', @_changeFocusStateOnKeyEvent.bind this\n luda.on 'mousedown', @_changeFocusStateOnMouseDownEvent.bind this\n luda.on 'touchstart', @_TOUCHSTART_FOCUS_SELECTOR, \\\n @_changeFocusStateOnMouseDownEvent.bind this\n luda.on 'focusin', @_changeFocusStateOnMouseDownEvent.bind this","import '../install.coffee'\nimport '../constants.coffee'\nimport '../dom.coffee'\nimport '../event.coffee'\nimport '../static.coffee'\n\n\n\nluda class extends luda.Static\n\n @_SCOPE: 'tabulate'\n\n @_SELECTORS: ['input[type=radio]:not([disabled])']\n\n @_DISABLED_ATTRIBUTE: 'data-tabulate-disabled'\n\n @_querySameName$radios: ($radio) ->\n if $radio.name\n selector = \"#{@_selector}[name=#{$radio.name}]\"\n else\n selector = @_selector\n $inputs = luda.$children selector\n $inputs.filter ($input) -> $input.tabIndex >= 0\n\n @_query$prev$next: ($radio) ->\n $sameNameRadios = @_querySameName$radios $radio\n radioIndex = $sameNameRadios.indexOf $radio\n $prev = $sameNameRadios[radioIndex - 1]\n $next = $sameNameRadios[radioIndex + 1]\n {$prev, $next}\n\n @_init: ->\n self = this\n luda.on 'keydown', (e) ->\n if not document.documentElement.hasAttribute(self._DISABLED_ATTRIBUTE) \\\n and e.keyCode is luda.KEY_TAB \\\n and e.target.nodeName.toUpperCase() is 'INPUT' \\\n and e.target.type is 'radio'\n if e.shiftKey\n if $prev = self._query$prev$next(e.target).$prev\n e.preventDefault()\n $prev.focus()\n else\n if $next = self._query$prev$next(e.target).$next\n e.preventDefault()\n $next.focus()","import './install.coffee'\nimport './utilities.coffee'\nimport './dom.coffee'\nimport './event.coffee'\n\n\n\n\nluda class Factory\n\n @_SCOPE: 'Factory'\n \n @_COMPONENT_NO_SELECTOR_ERROR: 'Extended component must has a css selector'\n @_$COMPONENT_INVALID_ERROR: '@param $component must be an instance of Element'\n @_SELECTOR: ''\n\n @_ACTIVATE_EVENT_TYPE: -> \"#{@_SCOPE}:activate\"\n @_ACTIVATED_EVENT_TYPE: -> \"#{@_SCOPE}:activated\"\n @_DEACTIVATE_EVENT_TYPE: -> \"#{@_SCOPE}:deactivate\"\n @_DEACTIVATED_EVENT_TYPE: -> \"#{@_SCOPE}:deactivated\"\n @_ACTIVATING_MARK_ATTRIBUTE: -> \"data-#{@_SCOPE}-activating\"\n @_DEACTIVATING_MARK_ATTRIBUTE: -> \"data-#{@_SCOPE}-deactivating\"\n\n @_instances: []\n\n @_Observed: []\n @_observer: null\n @_observerConfig:\n childList: true\n subtree: true\n\n _hasDescendant: (descendant) ->\n if @_children.length and descendant\n return true if @_children.includes descendant\n return @_children.some (child) -> child._hasDescendant descendant\n else\n return false\n\n _observe: ->\n @_observer = new MutationObserver @_onMutations.bind this\n @_observer.observe @_$component, @constructor._observerConfig\n\n _disconnect: ->\n @_observer.disconnect()\n @_observer = null\n\n _activatePrevented: ($ele, detail) ->\n activateEvent = luda.dispatch($ele, \\\n @constructor._ACTIVATE_EVENT_TYPE(), detail)\n activateEvent.defaultPrevented\n\n _deactivatePrevented: ($ele, detail) ->\n deactivateEvent = luda.dispatch($ele, \\\n @constructor._DEACTIVATE_EVENT_TYPE(), detail)\n deactivateEvent.defaultPrevented\n\n _handleActivateEnd: ($ele, detail) ->\n @_setActivatingMark detail\n activateDuration = luda.getTransitionDuration $ele\n luda.dispatch($ele, \\\n @constructor._ACTIVATED_EVENT_TYPE(), detail, \\\n activateDuration)\n setTimeout =>\n @_removeActivatingMark() if @_$component\n , activateDuration\n activateDuration\n\n _handleDeactivateEnd: ($ele, detail) ->\n @_setDeactivatingMark detail\n deactivateDuration = luda.getTransitionDuration $ele\n luda.dispatch($ele, \\\n @constructor._DEACTIVATED_EVENT_TYPE(), detail, \\\n deactivateDuration)\n setTimeout =>\n @_removeDeactivatingMark() if @_$component\n , deactivateDuration\n deactivateDuration\n\n _handleActivateCancel: ($ele, detail) ->\n if @_isActivating()\n luda.dispatch($ele, \\\n @constructor._ACTIVATED_EVENT_TYPE(), detail)\n @_removeActivatingMark()\n\n _handleDeactivateCancel: ($ele, detail) ->\n if @_isDeactivating()\n luda.dispatch($ele, \\\n @constructor._DEACTIVATED_EVENT_TYPE(), detail)\n @_removeDeactivatingMark()\n\n _isActivating: ->\n @_$component.hasAttribute @constructor._ACTIVATING_MARK_ATTRIBUTE()\n\n _isDeactivating: ->\n @_$component.hasAttribute @constructor._DEACTIVATING_MARK_ATTRIBUTE()\n\n _isTransitioning: ->\n @_isActivating() or @_isDeactivating()\n\n _getActivatingMark: ->\n @_$component.getAttribute @constructor._ACTIVATING_MARK_ATTRIBUTE()\n\n _getDeactivatingMark: ->\n @_$component.getAttribute @constructor._DEACTIVATING_MARK_ATTRIBUTE()\n\n _removeActivatingMark: ->\n @_$component.removeAttribute @constructor._ACTIVATING_MARK_ATTRIBUTE()\n\n _removeDeactivatingMark: ->\n @_$component.removeAttribute @constructor._DEACTIVATING_MARK_ATTRIBUTE()\n\n _setActivatingMark: (value) ->\n @_$component.setAttribute @constructor._ACTIVATING_MARK_ATTRIBUTE(), value\n\n _setDeactivatingMark: (value) ->\n @_$component.setAttribute @constructor._DEACTIVATING_MARK_ATTRIBUTE(), value\n\n @create: ($component) ->\n componentIsElementInstance = $component instanceof Element\n throw new Error @_$COMPONENT_INVALID_ERROR unless componentIsElementInstance\n $family = @_query$family $component\n instance = @query $component\n if $family._$parent\n if parent = @query $family._$parent\n @_instances.push instance = @_createInstance $component unless instance\n if instance._parent isnt parent\n parent._children.push(instance) and (instance._parent = parent)\n $family._$children.forEach ($child) => @create $child\n return instance\n else\n @create $family._$parent\n return @query $component\n else\n @_instances.push instance = @_createInstance $component unless instance\n $family._$children.forEach ($child) => @create $child\n return instance\n\n @destroy: (instance$component) ->\n instance = @query instance$component\n if instance\n instance._disconnect() if instance._observer\n instance._destroy() if instance._destroy\n @destroy instance._children[0] while instance._children.length\n if instance._parent\n luda.except instance, instance._parent._children\n luda.except instance, @_instances\n for attribute, value of instance\n instance[attribute] = null\n \n @query: (instance$component) ->\n instance = null\n if instance$component instanceof this \\\n and @_instances.includes instance$component\n instance = instance$component\n else if instance$component instanceof Element\n @_instances.some (inited) ->\n if inited._$component is instance$component\n instance = inited\n return true\n return instance\n\n @_query$family: ($component) ->\n _$parent = null\n _$children = []\n if @_SELECTOR\n _$parent = luda.$parent @_SELECTOR, $component\n _$children = luda.$unnested @_SELECTOR, $component, @_SELECTOR\n {_$parent, _$children}\n\n @_createInstance: ($component) ->\n instance = new this()\n instance._$component = $component\n instance._parent = null\n instance._children = []\n instance._observer = null\n instance._constructor() if instance._constructor\n unless instance._observer and instance._onMutations and @_observerConfig\n instance._observe()\n instance\n\n @_onEleAdded: ($ele) ->\n Factory._onEleAddedOrRemoved($ele, 'create')\n\n @_onEleRemoved: ($ele) ->\n Factory._onEleAddedOrRemoved($ele, 'destroy')\n\n @_onEleAddedOrRemoved: ($ele, action) ->\n Factory._Observed.forEach (Observed) ->\n return Observed[action] $ele if $ele.matches Observed._SELECTOR\n luda.$children(Observed._SELECTOR, $ele).forEach ($child) ->\n Observed[action] $child\n\n @_observe: (classObj) ->\n unless Factory._observer\n Factory._observer = \\\n luda._observeDom Factory._onEleAdded, Factory._onEleRemoved\n unless Factory._Observed.includes classObj\n Factory._Observed.push classObj\n\n @_install: ->\n self = this\n return this if this is Factory\n unless @_SELECTOR or typeof @_SELECTOR isnt 'string'\n throw new Error @_COMPONENT_NO_SELECTOR_ERROR\n @_instances = [] unless @hasOwnProperty '_instances'\n exposed = @_init() if typeof @_init is 'function'\n luda.on luda._DOC_READY, ->\n luda.$children(self._SELECTOR).forEach ($component) ->\n self.create $component\n Factory._observe(self)\n if exposed then exposed else this","import '../install.coffee'\nimport '../factory.coffee'\n\n\n\nluda class extends luda.Factory\n\n @_SCOPE: 'readonly'\n @_READONLY_ATTRIBUTE: 'data-readonly'\n @_READONLY_FALSE_VALUE: 'false'\n @_SELECTOR: \"[#{@_READONLY_ATTRIBUTE}]\"\n\n @_observerConfig:\n attributes: true\n attributeFilter: [@_READONLY_ATTRIBUTE]\n\n _getConfig: ->\n readonly = @_$component.getAttribute @constructor._READONLY_ATTRIBUTE\n _isReadonly = readonly isnt @constructor._READONLY_FALSE_VALUE\n _originalTabIndex = @_$component.tabIndex\n {_isReadonly, _originalTabIndex}\n \n _constructor: ->\n {\n @_isReadonly,\n @_originalTabIndex\n } = @_getConfig()\n @_setTabIndex()\n\n _onMutations: ->\n @_constructor()\n\n _setTabIndex: ->\n if @_isReadonly\n @_$component.tabIndex = -1\n else\n @_$component.tabIndex = @_originalTabIndex","import '../install.coffee'\nimport '../dom.coffee'\nimport '../event.coffee'\nimport '../static.coffee'\n\n\n\nluda class extends luda.Static\n\n @_SCOPE: 'toggle'\n @_TOGGLE_TARGET_ATTRIBUTE: 'data-toggle-target'\n @_TOGGLE_ATTRIBUTE: 'data-toggle'\n @_TOGGLE_FOR_ATTRIBUTE: 'data-toggle-for'\n @_TOGGLE_DISABLED_ATTRIBUTE: 'data-toggle-disabled'\n @_AUTO_DEACTIVATE_ATTRIBUTE: 'data-toggle-auto-deactivate'\n @_AUTO_DEACTIVATE_DURATION: 3000\n @_ACTIVE_CSS_CLASS: 'toggle-active'\n @_SELECTORS: [\n \"[#{@_TOGGLE_TARGET_ATTRIBUTE}]\"\n ]\n\n @activate: (name$target) ->\n @_query$targets(name$target).forEach ($target) =>\n return if $target.classList.contains @_ACTIVE_CSS_CLASS\n return if @_isTransitioning $target\n return if @_activatePrevented $target\n $target.classList.add @_ACTIVE_CSS_CLASS\n @_handleActivateEnd $target\n @_delayDeactivate $target if @_shouldAutoDeactivate $target\n\n @deactivate: (name$target) ->\n @_query$targets(name$target).forEach ($target) =>\n return unless $target.classList.contains @_ACTIVE_CSS_CLASS\n return if @_isTransitioning $target\n return if @_deactivatePrevented $target\n $target.classList.remove @_ACTIVE_CSS_CLASS\n @_handleDeactivateEnd $target\n\n @toggle: (name$target) ->\n @_query$targets(name$target).forEach ($target) =>\n if $target.classList.contains @_ACTIVE_CSS_CLASS\n @deactivate($target)\n else\n @activate($target)\n\n @_onElementAdded: ($ele) ->\n @_handleActivateCancel $ele\n @_handleDeactivateCancel $ele\n @_delayDeactivate $ele if @_shouldAutoDeactivate $ele\n\n @_shouldAutoDeactivate: ($target) ->\n $target.hasAttribute @_AUTO_DEACTIVATE_ATTRIBUTE\n\n @_delayDeactivate: ($target) ->\n delay = parseInt $target.getAttribute(@_AUTO_DEACTIVATE_ATTRIBUTE), 10\n delay = @_AUTO_DEACTIVATE_DURATION if not delay\n setTimeout =>\n @deactivate $target if $target\n , delay\n\n @_query$targets: (name$target) ->\n if name$target instanceof Element\n [name$target]\n else\n luda.$children \"[#{@_TOGGLE_TARGET_ATTRIBUTE}=#{name$target}]\"\n\n @_init: ->\n self = this\n clickEventSelector = \"[#{@_TOGGLE_FOR_ATTRIBUTE}],[#{@_TOGGLE_ATTRIBUTE}]\"\n luda.on luda._DOC_READY, ->\n luda.$children(self._selector).forEach ($target) ->\n self._delayDeactivate $target if self._shouldAutoDeactivate $target\n luda.on 'click', clickEventSelector, (e) ->\n toggleChecked = false\n luda.eventPath(e).some ($path) ->\n if $path instanceof Element\n if $path.hasAttribute(self._TOGGLE_ATTRIBUTE) \\\n or $path.hasAttribute(self._TOGGLE_FOR_ATTRIBUTE)\n if toggleName = $path.getAttribute self._TOGGLE_FOR_ATTRIBUTE\n self.toggle toggleName\n toggleChecked = true\n if $path.hasAttribute self._TOGGLE_ATTRIBUTE\n if $path.hasAttribute self._TOGGLE_TARGET_ATTRIBUTE\n $toggle = $path\n else\n $toggle = luda.$parent \\\n \"[#{self._TOGGLE_TARGET_ATTRIBUTE}]\", $path\n if $toggle\n self.toggle $toggle\n toggleChecked = true\n else if $path.hasAttribute self._TOGGLE_DISABLED_ATTRIBUTE\n toggleChecked = true","import '../install.coffee'\nimport '../dom.coffee'\nimport '../event.coffee'\nimport '../factory.coffee'\n\n\n\nluda class extends luda.Factory\n\n @_SCOPE: 'fmFile'\n\n @_VALUE_SPLITOR: ' '\n @_SELECTOR: '.fm-file'\n @_FILE_SELECTOR: 'input[type=file]'\n @_SIMULATOR_SELECTOR: 'input:not([type=file])'\n @_PLACEHOLDER_ATTRIBUTE: 'placeholder'\n @_VALUE_ATTRIBUTE: 'value'\n\n @_observerConfig:\n childList: true\n subtree: true\n\n reset: ->\n @_$file.value = ''\n @_$simulator.value = ''\n\n _getConfig: ->\n _$file = luda.$child @constructor._FILE_SELECTOR, @_$component\n _$simulator = luda.$child \\\n @constructor._SIMULATOR_SELECTOR, @_$component\n {_$file, _$simulator}\n\n _constructor: ->\n {\n @_$file,\n @_$simulator\n } = @_getConfig()\n @_init()\n\n _onMutations: ->\n @_constructor()\n\n _insertSimulator: ->\n @_$simulator = document.createElement 'input'\n @_$simulator.tabIndex = -1\n luda.$after @_$simulator, @_$file\n\n _setPlaceholderValue: ->\n @_$simulator.placeholder = \\\n @_$file.getAttribute @constructor._PLACEHOLDER_ATTRIBUTE\n\n _setSimulatorValue: ->\n values = []\n Array.from(@_$file.files).map (file) -> values.push file.name\n if values.length\n @_$simulator.value = values.join @constructor._VALUE_SPLITOR\n else if @_$file.hasAttribute(@constructor._VALUE_ATTRIBUTE)\n @_$simulator.value = @_$file.getAttribute @constructor._VALUE_ATTRIBUTE\n\n _init: ->\n if @_$file\n @_insertSimulator() unless @_$simulator\n if @_$file.hasAttribute @constructor._PLACEHOLDER_ATTRIBUTE\n @_setPlaceholderValue()\n @_setSimulatorValue()\n\n @reset: ($file) -> @query($file).reset()\n\n @_init: ->\n self = this\n luda.on 'change', \"#{@_SELECTOR} #{@_FILE_SELECTOR}\", (e) ->\n self.query(luda.$parent self._SELECTOR, this)._setSimulatorValue()\n luda.on luda._FORM_RESET, @_SELECTOR, (e) ->\n setTimeout => self.query(this)._setSimulatorValue()","import '../install.coffee'\nimport '../dom.coffee'\nimport '../event.coffee'\nimport '../factory.coffee'\n\n\n\nluda class extends luda.Factory\n\n @_SCOPE: 'fmSelect'\n\n @_SELECTOR: '.fm-select'\n @_SELECT_SELECTOR: 'select'\n @_SINGLE_SELECT_SIMULATOR_SELECTOR: 'input'\n @_PLACEHOLDER_ATTRIBUTE: 'placeholder'\n @_MULTIPLE_SELECT_PLACEHOLDER_CSS_CLASS: 'fm-select-multiple-placeholder'\n @_DEFAULT_SELECTED_OPTION_ATTRIBUTE: 'data-fm-select-default-selected'\n @_INITED_ATTRIBUTE: 'data-fm-select-inited'\n\n @_observerConfig:\n childList: true\n attributes: true\n subtree: true\n attributeFilter: ['selected']\n\n select: (indexOrIndexArray) ->\n if @_$select.multiple\n if @_$multipleSelectPlaceholder\n selectedIndexes = indexOrIndexArray\n else\n selectedIndexes = indexOrIndexArray.map (index) -> index + 1\n Array.from(@_$select.options).forEach ($option, index) ->\n $option.selected = selectedIndexes.includes index\n @_markSelectedOption()\n else\n @_$select.selectedIndex = indexOrIndexArray\n @_setSingleSelectSimulatorValue()\n @_markSelectedOption()\n\n _getConfig: ->\n _$select = luda.$child @constructor._SELECT_SELECTOR, @_$component\n _$singleSelectSimulator = luda.$child \\\n @constructor._SINGLE_SELECT_SIMULATOR_SELECTOR, @_$component\n _$multipleSelectPlaceholder = luda.$child \\\n \".#{@constructor._MULTIPLE_SELECT_PLACEHOLDER_CSS_CLASS}\", @_$component\n _$defaultSelectedOptions = luda.$children \\\n \"[#{@constructor._DEFAULT_SELECTED_OPTION_ATTRIBUTE}]\", @_$component\n _defaultSelectedOptionMarked = @_$component.hasAttribute \\\n @constructor._INITED_ATTRIBUTE\n {\n _$select,\n _$singleSelectSimulator,\n _$multipleSelectPlaceholder,\n _$defaultSelectedOptions,\n _defaultSelectedOptionMarked\n }\n\n _constructor: ->\n {\n @_$select,\n @_$singleSelectSimulator,\n @_$multipleSelectPlaceholder,\n @_$defaultSelectedOptions,\n @_defaultSelectedOptionMarked\n } = @_getConfig()\n if @_$select\n if @_$select.multiple\n @_initMultipleSelect()\n else\n @_initSingleSelect()\n \n _onMutations: ->\n @_constructor()\n\n _markSelectedOption: ->\n @_disconnect() if @_observer\n Array.from(@_$select.options).forEach ($option) ->\n if $option.selected\n $option.setAttribute 'selected', 'selected'\n else\n $option.removeAttribute 'selected'\n @_observe() unless @_observer\n\n _markDefaultSelectedOption: ->\n @_$component.setAttribute @constructor._INITED_ATTRIBUTE, ''\n Array.from(@_$select.options).forEach ($option) =>\n if $option.selected\n $option.setAttribute @constructor._DEFAULT_SELECTED_OPTION_ATTRIBUTE, ''\n\n _setSingleSelectedDefaultSelectedOption: ->\n hasSelected = Array.from(@_$select.options).some ($option) ->\n $option.getAttribute('selected') is 'selected'\n @_$select.selectedIndex = -1 unless hasSelected\n\n _insertSingleSelectSimulator: ->\n @_$singleSelectSimulator = document.createElement 'input'\n @_$singleSelectSimulator.tabIndex = -1\n luda.$after @_$singleSelectSimulator, @_$select\n\n _setSingleSelectPlaceholderValue: ->\n @_$singleSelectSimulator.placeholder = @_$select.getAttribute \\\n @constructor._PLACEHOLDER_ATTRIBUTE\n\n _setSingleSelectSimulatorValue: ->\n if $selectedOption = @_$select.options[@_$select.selectedIndex]\n @_$singleSelectSimulator.value = $selectedOption.innerText\n else\n @_$singleSelectSimulator.value = ''\n\n _initSingleSelect: ->\n @_insertSingleSelectSimulator() unless @_$singleSelectSimulator\n if @_$select.hasAttribute @constructor._PLACEHOLDER_ATTRIBUTE\n @_setSingleSelectedDefaultSelectedOption()\n @_setSingleSelectPlaceholderValue()\n @_markDefaultSelectedOption() unless @_defaultSelectedOptionMarked\n @_setSingleSelectSimulatorValue()\n @_markSelectedOption()\n\n _insertMultipleSelectBlankOption: ->\n @_$multipleSelectPlaceholder = document.createElement 'option'\n @_$multipleSelectPlaceholder.className = \\\n @constructor._MULTIPLE_SELECT_PLACEHOLDER_CSS_CLASS\n @_$multipleSelectPlaceholder.disabled = true\n luda.$prepend @_$multipleSelectPlaceholder, @_$select\n\n _setMultipleSelectPlaceholderValue: ->\n @_$multipleSelectPlaceholder.innerText = @_$select.getAttribute \\\n @constructor._PLACEHOLDER_ATTRIBUTE\n\n _initMultipleSelect: ->\n unless @_$multipleSelectPlaceholder\n if @_$select.hasAttribute @constructor._PLACEHOLDER_ATTRIBUTE\n @_insertMultipleSelectBlankOption()\n @_setMultipleSelectPlaceholderValue()\n @_markDefaultSelectedOption() unless @_defaultSelectedOptionMarked\n\n _reset: ->\n if @_$select\n Array.from(@_$select.options).forEach ($option) =>\n $option.selected = @_$defaultSelectedOptions.includes $option\n @_setSingleSelectSimulatorValue() unless @_$select.multiple\n @_markSelectedOption()\n\n @select: ($select, indexOrIndexArray) ->\n @query($select).select indexOrIndexArray\n\n @_init: ->\n self = this\n luda.on 'change', \"#{@_SELECTOR} #{@_SELECT_SELECTOR}\", (e) ->\n instance = self.query(luda.$parent self._SELECTOR, this)\n instance._setSingleSelectSimulatorValue() unless this.multiple\n instance._markSelectedOption()\n luda.on luda._FORM_RESET, @_SELECTOR, (e) ->\n setTimeout => self.query(this)._reset()","import '../install.coffee'\nimport '../dom.coffee'\nimport '../event.coffee'\nimport '../factory.coffee'\n\n\n\nluda class extends luda.Factory\n\n @_SCOPE: 'carousel'\n\n @_SELECTOR: '.carousel'\n @_ITEMS_SELECTOR: '.carousel-item'\n @_PREV_CONTROL_SELECTOR: '.carousel-prev'\n @_NEXT_CONTROL_SELECTOR: '.carousel-next'\n @_INDICATORS_SELECTOR: '.carousel-indicators .btn'\n @_INTERVAL_ATTRIBUTE: 'data-carousel-interval'\n @_WRAP_ATTRIBUTE: 'data-carousel-wrap'\n @_ACTIVATED_INDEX_ATTRIBUTE: 'data-carousel-activated-index'\n @_ITEM_ACTIVE_CSS_CLASS: 'carousel-item-active'\n @_ITEM_NEXT_CSS_CLASS: 'carousel-item-next'\n @_ITEM_PREV_CSS_CLASS: 'carousel-item-prev'\n @_ACTIVE_INDEX: 0\n @_INTERVAL: 5000\n @_WRAP: true\n @_FALSE: 'false'\n\n @_observerConfig:\n childList: true\n attributes: true\n subtree: true\n attributeFilter: [@_INTERVAL_ATTRIBUTE, @_WRAP_ATTRIBUTE]\n \n # public\n activate: (index) ->\n if @_$items.length and not @_isTransitioning()\n activatedIndex = @_activeIndex\n if index? \\\n and index isnt @_activeIndex \\\n and 0 <= index <= @_$items.length - 1 \\\n and @_canTransition(index, activatedIndex)\n @_activeIndex = index\n action = if index < activatedIndex then '_slidePrev' else '_slideNext'\n @[action] activatedIndex\n\n next: ->\n if @_$items.length and not @_isTransitioning()\n activatedIndex = @_activeIndex\n index = activatedIndex + 1\n if index > @_$items.length - 1\n return unless @_wrap\n index = 0\n return unless @_canTransition(index, activatedIndex)\n @_activeIndex = index\n @_slideNext activatedIndex\n @_playTimeStamp = Date.now()\n @_pausedRemainTime = @_interval\n\n prev: ->\n if @_$items.length and not @_isTransitioning()\n activatedIndex = @_activeIndex\n index = activatedIndex - 1\n if index < 0\n return unless @_wrap\n index = @_$items.length - 1\n return unless @_canTransition(index, activatedIndex)\n @_activeIndex = index\n @_slidePrev activatedIndex\n @_playTimeStamp = Date.now()\n @_pausedRemainTime = @_interval\n\n pause: ->\n if @_intervaling?\n clearInterval @_intervaling\n @_intervaling = null\n @_pausedRemainTime = @_pausedRemainTime - (Date.now() - @_playTimeStamp)\n\n play: ->\n if @_interval and @_$items.length > 1\n @_playTimeStamp = Date.now()\n @pause()\n execute = =>\n @next()\n @_intervaling = setInterval @next.bind(this), @_interval\n @_intervaling = setTimeout execute, @_pausedRemainTime\n\n # private\n _getConfig: ->\n _$items = luda.$unnested \\\n @constructor._ITEMS_SELECTOR, @_$component, @constructor._SELECTOR\n _$indicators = luda.$unnested \\\n @constructor._INDICATORS_SELECTOR, @_$component, @constructor._SELECTOR\n _$prevControl = luda.$child \\\n @constructor._PREV_CONTROL_SELECTOR, @_$component\n _$nextControl = luda.$child \\\n @constructor._NEXT_CONTROL_SELECTOR, @_$component\n _activeIndex = _$items.indexOf \\\n luda.$child \".#{@constructor._ITEM_ACTIVE_CSS_CLASS}\", @_$component\n _activeIndex = @constructor._ACTIVE_INDEX if _activeIndex is -1\n _interval = @_$component.getAttribute(@constructor._INTERVAL_ATTRIBUTE)\n if _interval is @constructor._FALSE\n _interval = false\n else\n _interval = Math.abs(parseInt _interval, 10) or @constructor._INTERVAL\n _wrap = @_$component.getAttribute(@constructor._WRAP_ATTRIBUTE)\n _wrap = if _wrap is @constructor._FALSE then false else @constructor._WRAP\n {\n _$items,\n _$indicators,\n _$prevControl,\n _$nextControl,\n _activeIndex,\n _interval,\n _wrap\n }\n\n _constructor: ->\n {\n @_$items,\n @_$indicators,\n @_$prevControl,\n @_$nextControl,\n @_activeIndex,\n @_interval,\n @_wrap\n } = @_getConfig()\n @_intervaling = null\n @_playTimeStamp = 0\n @_pausedRemainTime = @_interval\n @_layout()\n @_handleTransitionCancel()\n @play()\n\n _onMutations: (mutations) ->\n {\n @_$items,\n @_$indicators,\n @_$prevControl,\n @_$nextControl,\n @_activeIndex,\n @_interval,\n @_wrap\n } = @_getConfig()\n @_setIndicatorsState()\n @_setDirectionControlState()\n @play()\n\n _destroy: ->\n @pause()\n\n _layout: ->\n @_$items.forEach ($item, index) =>\n $item.style.transition = 'none'\n if index > @_activeIndex\n $item.classList.add @constructor._ITEM_NEXT_CSS_CLASS\n $item.classList.remove @constructor._ITEM_PREV_CSS_CLASS\n $item.classList.remove @constructor._ITEM_ACTIVE_CSS_CLASS\n else if index < @_activeIndex\n $item.classList.add @constructor._ITEM_PREV_CSS_CLASS\n $item.classList.remove @constructor._ITEM_NEXT_CSS_CLASS\n $item.classList.remove @constructor._ITEM_ACTIVE_CSS_CLASS\n else\n $item.classList.add @constructor._ITEM_ACTIVE_CSS_CLASS\n $item.classList.remove @constructor._ITEM_NEXT_CSS_CLASS\n $item.classList.remove @constructor._ITEM_PREV_CSS_CLASS\n luda.reflow $item\n $item.style.transition = ''\n @_setIndicatorsState()\n @_setDirectionControlState()\n\n _slideNext: (activatedIndex) ->\n if @_$items.length > 1\n $item = @_$items[@_activeIndex]\n $activatedItem = @_$items[activatedIndex]\n $item.style.transition = 'none'\n $item.classList.remove @constructor._ITEM_PREV_CSS_CLASS\n $item.classList.add @constructor._ITEM_NEXT_CSS_CLASS\n luda.reflow $item\n $item.style.transition = ''\n $item.classList.remove @constructor._ITEM_NEXT_CSS_CLASS\n $item.classList.add @constructor._ITEM_ACTIVE_CSS_CLASS\n $activatedItem.classList.remove @constructor._ITEM_ACTIVE_CSS_CLASS\n $activatedItem.classList.add @constructor._ITEM_PREV_CSS_CLASS\n @_handleTransitionEnd @_activeIndex, activatedIndex\n @_setIndicatorsState()\n @_setDirectionControlState()\n\n _slidePrev: (activatedIndex) ->\n if @_$items.length > 1\n $item = @_$items[@_activeIndex]\n $activatedItem = @_$items[activatedIndex]\n $item.style.transition = 'none'\n $item.classList.remove @constructor._ITEM_NEXT_CSS_CLASS\n $item.classList.add @constructor._ITEM_PREV_CSS_CLASS\n luda.reflow $item\n $item.style.transition = ''\n $item.classList.remove @constructor._ITEM_PREV_CSS_CLASS\n $item.classList.add @constructor._ITEM_ACTIVE_CSS_CLASS\n $activatedItem.classList.remove @constructor._ITEM_ACTIVE_CSS_CLASS\n $activatedItem.classList.add @constructor._ITEM_NEXT_CSS_CLASS\n @_handleTransitionEnd @_activeIndex, activatedIndex\n @_setIndicatorsState()\n @_setDirectionControlState()\n\n _canTransition: (activeIndex, activatedIndex) ->\n not @_activatePrevented(@_$items[activeIndex], activeIndex) \\\n and not @_deactivatePrevented(@_$items[activatedIndex], activatedIndex)\n\n _handleTransitionEnd: (activeIndex, activatedIndex) ->\n activateDuration = \\\n @_handleActivateEnd @_$items[activeIndex], activeIndex\n deactivateDuration = \\\n @_handleDeactivateEnd @_$items[activatedIndex], activatedIndex\n\n _handleTransitionCancel: ->\n if @_isActivating()\n index = parseInt @_getActivatingMark(), 10\n @_handleActivateCancel @_$items[index], index\n if @_isDeactivating()\n activatedIndex = parseInt @_getDeactivatingMark(), 10\n @_handleDeactivateCancel @_$items[activatedIndex], activatedIndex\n\n _setIndicatorsState: ->\n @_$indicators.forEach ($indicator, index) =>\n $indicator.disabled = index is @_activeIndex\n\n _setDirectionControlState: ->\n if @_$items.length <= 1\n @_$prevControl?.disabled = @_$nextControl?.disabled = true\n else\n @_$prevControl?.disabled = @_activeIndex is 0 and not @_wrap\n @_$nextControl?.disabled = \\\n @_activeIndex is @_$items.length - 1 and not @_wrap\n \n @activate: ($carousel, index) -> @query($carousel).activate index\n\n @next: ($carousel) -> @query($carousel).next()\n\n @prev: ($carousel) -> @query($carousel).prev()\n\n @pause: ($carousel) -> @query($carousel).pause()\n\n @play: ($carousel) -> @query($carousel).play()\n\n # static private\n @_init: ->\n self = this\n luda.on 'click', @_INDICATORS_SELECTOR, (e) ->\n instance = self.query luda.$parent self._SELECTOR, this\n instance.activate instance._$indicators.indexOf this\n luda.on 'touchstart', @_SELECTOR, (e) ->\n self.query(this).pause()\n luda.on 'touchend', @_SELECTOR, (e) ->\n setTimeout => self.query(this).play()\n luda.on 'mouseover', @_SELECTOR, (e) ->\n self.query(this).pause()\n luda.on 'mouseout', @_SELECTOR, (e) ->\n self.query(this).play()\n luda.on luda._SWIPE_LEFT_OR_UP, @_SELECTOR, (startE, e) ->\n self.query(this).next()\n luda.on luda._SWIPE_RIGHT_OR_DOWN, @_SELECTOR, (startE, e) ->\n self.query(this).prev()\n luda.on 'click', @_PREV_CONTROL_SELECTOR, (e) ->\n self.query(luda.$parent self._SELECTOR, this).prev()\n luda.on 'click', @_NEXT_CONTROL_SELECTOR, (e) ->\n self.query(luda.$parent self._SELECTOR, this).next()","import '../install.coffee'\nimport '../constants.coffee'\nimport '../dom.coffee'\nimport '../event.coffee'\nimport '../factory.coffee'\n\n\n\nluda class extends luda.Factory\n\n @_SCOPE: 'dropdown'\n @_SELECTOR: '.dropdown-fixed,.dropdown-absolute,\n .dropdown-static,.dropdown-absolute-m'\n @_MENU_SELECTOR: '.dropdown-menu'\n @_ITEMS_SELECTOR: 'a[href]:not([disabled]),button:not([disabled]),\n input:not([disabled]),[tabindex]:not([disabled])'\n @_TOGGLE_ATTRIBUTE: 'data-dropdown-toggle'\n @_TOGGLE_DISABLED_ATTRIBUTE: 'data-dropdown-toggle-disabled'\n @_STANDALONE_ATTRIBUTE: 'data-dropdown-standalone'\n @_SWITCHES_SELECTOR: \"[#{@_TOGGLE_ATTRIBUTE}]\"\n @_NONE_SWITCHES_SELECTOR: \"[#{@_TOGGLE_DISABLED_ATTRIBUTE}]\"\n @_ACTIVE_CSS_CLASS: 'dropdown-active'\n\n @_observerConfig:\n childList: true\n attributes: true\n subtree: true\n attributeFilter: [\n @_TOGGLE_ATTRIBUTE\n @_TOGGLE_DISABLED_ATTRIBUTE\n @_STANDALONE_ATTRIBUTE\n ]\n\n @_$focused: []\n\n activate: ->\n return if @_isActive() or @_isTransitioning()\n return if @_activatePrevented @_$menu\n @_$component.classList.add @constructor._ACTIVE_CSS_CLASS\n @constructor._$focused.push document.activeElement\n @_parent?.activate()\n @_handleActivateEnd @_$menu\n\n deactivate: (focus) ->\n return unless @_isActive() and not @_isTransitioning()\n return if @_deactivatePrevented @_$menu\n @_$component.classList.remove @constructor._ACTIVE_CSS_CLASS\n @_children.forEach (child) -> child.deactivate()\n if focus\n @constructor._$focused[@constructor._$focused.length - 1]?.focus()\n @constructor._$focused.splice @constructor._$focused.length - 1, 1\n @_handleDeactivateEnd @_$menu\n\n toggle: (focus) ->\n if @_isActive() then @deactivate(focus) else @activate()\n\n _prev: ->\n if @_$items.length and @_isActive()\n focusIndex = @_$items.indexOf(document.activeElement) - 1\n focusIndex = 0 if focusIndex < 0\n @_$items[focusIndex].focus()\n\n _next: ->\n if @_$items.length and @_isActive()\n focusIndex = @_$items.indexOf(document.activeElement) + 1\n focusIndex = @_$items.length - 1 if focusIndex > @_$items.length - 1\n @_$items[focusIndex].focus()\n\n _getConfig: ->\n _$menu = luda.$child @constructor._MENU_SELECTOR, @_$component\n _$switches = luda.$unnested( \\\n @constructor._SWITCHES_SELECTOR, @_$component, @constructor._SELECTOR)\n .concat(luda.$unnested \\\n @constructor._SWITCHES_SELECTOR, _$menu, @constructor._MENU_SELECTOR)\n _$noneSwitches = luda.$unnested( \\\n @constructor._NONE_SWITCHES_SELECTOR, \\\n @_$component, @constructor._SELECTOR) \\\n .concat(luda.$unnested \\\n @constructor._NONE_SWITCHES_SELECTOR, _$menu, @constructor._MENU_SELECTOR)\n _$items = luda.$unnested \\\n @constructor._ITEMS_SELECTOR, _$menu, @constructor._MENU_SELECTOR\n _isStandalone = @_$component.hasAttribute @constructor._STANDALONE_ATTRIBUTE\n {_$menu, _$items, _$switches, _$noneSwitches, _isStandalone}\n\n _constructor: ->\n @_onMutations()\n @_handleActivateCancel @_$menu\n @_handleDeactivateCancel @_$menu\n\n _onMutations: (mutations) ->\n {\n @_$menu,\n @_$items,\n @_$switches,\n @_$noneSwitches,\n @_isStandalone\n } = @_getConfig()\n\n _isActive: ->\n @_$component.classList.contains @constructor._ACTIVE_CSS_CLASS\n\n _deactivateChildrenExcept: (exceptions) ->\n if exceptions and not (exceptions instanceof Array)\n exceptions = [exceptions]\n if exceptions\n @_children.forEach (child) ->\n if child._isActive() and not exceptions.includes child\n child.deactivate()\n else\n @_children.forEach (child) ->\n child.deactivate() if child._isActive()\n\n @activate: ($dropdown) -> @query($dropdown).activate()\n\n @deactivate: ($dropdown, focus) -> @query($dropdown).deactivate(focus)\n\n @toggle: ($dropdown, focus) -> @query($dropdown).toggle focus\n\n @deactivateExcept: (instances$dropdowns) ->\n exceptions = []\n if instances$dropdowns and not (instances$dropdowns instanceof Array)\n instances$dropdowns = [instances$dropdowns]\n if instances$dropdowns\n instances$dropdowns.forEach (instance$dropdown) =>\n exceptions.push exception if exception = @query instance$dropdown\n if exceptions.length\n @_instances.forEach (instance) ->\n instanceIsntInExceptions = not exceptions.includes instance\n instanceHasntExceptionChild = exceptions.every (exception) ->\n not instance._hasDescendant exception\n if instance._isActive() \\\n and instanceIsntInExceptions \\\n and instanceHasntExceptionChild\n instance.deactivate()\n else\n @_instances.forEach (instance) ->\n instance.deactivate() if instance._isActive()\n\n @_standaloneInstances: ->\n @_instances.filter (instance) -> instance if instance._isStandalone\n\n @_init: ->\n self = this\n luda.onOpposite 'click', @_SELECTOR, (e) ->\n self.deactivateExcept self._standaloneInstances()\n luda.on 'click', @_SELECTOR, (e) ->\n if instance = self.query this\n toggleChecked = false\n focus = not e.detail\n self.deactivateExcept(self._standaloneInstances().concat instance)\n instance._deactivateChildrenExcept()\n instance._parent._deactivateChildrenExcept(instance) if instance._parent\n if instance._$switches.length or instance._$noneSwitches.length\n luda.eventPath(e).some ($path) ->\n if instance._$switches.includes $path\n instance.toggle focus\n toggleChecked = true\n else if instance._$noneSwitches.includes $path\n toggleChecked = true\n instance.toggle focus unless toggleChecked\n\n luda.onOpposite 'keyup', @_SELECTOR, (e) -> self.deactivateExcept()\n luda.on 'keyup', @_SELECTOR, (e) ->\n if e.keyCode is luda.KEY_TAB and instance = self.query this\n self.deactivateExcept(instance)\n instance.activate()\n luda.on 'keydown', @_SELECTOR, (e) ->\n if e.keyCode is luda.KEY_ESC and instance = self.query this\n e.preventDefault()\n if instance._isActive()\n instance.deactivate true\n else\n instance._parent?.deactivate true\n luda.on 'keydown', @_SELECTOR, (e) ->\n if [luda.KEY_LEFT, luda.KEY_UP].includes(e.keyCode) \\\n and instance = self.query this\n e.preventDefault()\n if instance._isActive()\n instance._prev()\n else\n instance._parent?._prev()\n else if [luda.KEY_RIGHT, luda.KEY_DOWN].includes(e.keyCode) \\\n and instance = self.query this\n e.preventDefault()\n if instance._isActive()\n instance._next()\n else\n instance._parent?._next()","import '../install.coffee'\nimport '../dom.coffee'\nimport '../event.coffee'\nimport '../factory.coffee'\nimport '../behaviors/focus.coffee'\nimport '../behaviors/enter.coffee'\n\n\n\nluda class extends luda.Factory\n\n @_SCOPE: 'fmDropdown'\n\n @_SELECTOR: '.fm-dropdown'\n @_VALUE_SPLITOR: ' '\n @_LABEL_ATTRIBUTE: 'data-fm-dropdown-label'\n @_VALUE_SELECTOR: '.dropdown-items .btn-radio input,\n .dropdown-items .btn-check input'\n @_DEFAULT_VALUE_SELECTOR: '.dropdown-items .btn-radio label,\n .dropdown-items .btn-check label'\n @_VALUE_HOLDER_SELECTOR: '.fm input'\n @_ENTER_BEHAVIOR_SELECTOR: '.fm-dropdown .fm input'\n\n @_observerConfig:\n childList: true\n attributes: true\n subtree: true\n attributeFilter: [\n 'checked'\n @_LABEL_ATTRIBUTE\n ]\n\n _getConfig: ->\n _$values = luda.$children @constructor._VALUE_SELECTOR, @_$component\n _$defaultValues = luda.$children \\\n @constructor._DEFAULT_VALUE_SELECTOR, @_$component\n _$valueHolder = luda.$child \\\n @constructor._VALUE_HOLDER_SELECTOR, @_$component\n {_$values, _$valueHolder, _$defaultValues}\n\n _constructor: ->\n {\n @_$values,\n @_$valueHolder,\n @_$defaultValues\n } = @_getConfig()\n @_setValueHolderAttribute()\n @_setValueHolderValue()\n\n _onMutations: ->\n @_constructor()\n\n _setValueHolderValue: ->\n values = []\n @_$values.forEach ($value, index) =>\n if $value.checked\n if $value.hasAttribute @constructor._LABEL_ATTRIBUTE\n value = $value.getAttribute @constructor._LABEL_ATTRIBUTE\n else\n value = @_$defaultValues[index].innerText\n values.push value if value and not values.includes value\n if @_$valueHolder\n @_$valueHolder.value = values.join @constructor._VALUE_SPLITOR\n\n _setValueHolderAttribute: ->\n @_$valueHolder.setAttribute('readonly', '') if @_$valueHolder\n\n @_init: ->\n self = this\n luda.enter._add @_ENTER_BEHAVIOR_SELECTOR\n luda.on 'change', \"#{@_SELECTOR} #{@_VALUE_SELECTOR}\", (e) ->\n self.query(luda.$parent self._SELECTOR, this)._setValueHolderValue()\n luda.on luda._FORM_RESET, @_SELECTOR, (e) ->\n setTimeout => self.query(this)._setValueHolderValue()\n # prevent ios device pop out wired navigation pannel\n if /iphone/i.test(navigator.userAgent) or /ipad/i.test(navigator.userAgent)\n luda.on 'focusin', @_ENTER_BEHAVIOR_SELECTOR, (e) ->\n this.blur()\n this.classList.add luda.focus._CSS_CLASS","import '../install.coffee'\nimport '../dom.coffee'\nimport '../event.coffee'\nimport '../factory.coffee'\n\n\n\nluda class extends luda.Factory\n\n @_SCOPE: 'tab'\n\n @_SELECTOR: '.tab'\n @_PANE_SELECTOR: '.tab-pane'\n @_INDICATOR_SELECTOR: '.tab-indicators .btn-radio input[type=radio]'\n @_PANE_ACTIVE_CSS_CLASS: 'tab-pane-active'\n @_ACTIVE_INDEX: 0\n\n @_observerConfig:\n childList: true\n subtree: true\n \n # public\n activate: (index) ->\n if @_$panes.length and not @_isTransitioning()\n activatedIndex = @_activeIndex\n if index? \\\n and index isnt @_activeIndex \\\n and 0 <= index <= @_$panes.length - 1\n return unless @_canTransition index, activatedIndex\n @_activeIndex = index\n @_activate activatedIndex\n\n\n # private\n _getConfig: ->\n _$panes = luda.$unnested \\\n @constructor._PANE_SELECTOR, @_$component, @constructor._SELECTOR\n _$indicators = luda.$unnested \\\n @constructor._INDICATOR_SELECTOR, @_$component, @constructor._SELECTOR\n _activeIndex = @constructor._ACTIVE_INDEX\n _$indicators.some ($indicator, index) ->\n if $indicator.checked\n _activeIndex = index\n true\n {_$panes, _$indicators, _activeIndex}\n\n _constructor: ->\n {\n @_$panes,\n @_$indicators,\n @_activeIndex\n } = @_getConfig()\n @_layout()\n @_handleTransitionCancel()\n\n _onMutations: (mutations) ->\n {\n @_$panes,\n @_$indicators,\n @_activeIndex\n } = @_getConfig()\n @_setIndicatorsState()\n\n _layout: ->\n @_$panes.forEach ($pane, index) =>\n $pane.style.transition = 'none'\n if index is @_activeIndex\n $pane.classList.add @constructor._PANE_ACTIVE_CSS_CLASS\n else\n $pane.classList.remove @constructor._PANE_ACTIVE_CSS_CLASS\n luda.reflow $pane\n $pane.style.transition = ''\n @_setIndicatorsState()\n\n _activate: (activatedIndex) ->\n $pane = @_$panes[@_activeIndex]\n $activatedPane = @_$panes[activatedIndex]\n $pane.classList.add @constructor._PANE_ACTIVE_CSS_CLASS\n $activatedPane.classList.remove @constructor._PANE_ACTIVE_CSS_CLASS\n @_handleTransitionEnd @_activeIndex, activatedIndex\n @_setIndicatorsState()\n\n _canTransition: (activeIndex, activatedIndex) ->\n not @_activatePrevented(@_$panes[activeIndex], activeIndex) \\\n and not @_deactivatePrevented(@_$panes[activatedIndex], activatedIndex)\n\n _handleTransitionEnd: (activeIndex, activatedIndex) ->\n activateDuration = \\\n @_handleActivateEnd @_$panes[activeIndex], activeIndex\n deactivateDuration = \\\n @_handleDeactivateEnd @_$panes[activatedIndex], activatedIndex\n\n _handleTransitionCancel: ->\n if @_isActivating()\n index = parseInt @_getActivatingMark(), 10\n @_handleActivateCancel @_$panes[index], index\n if @_isDeactivating()\n activatedIndex = parseInt @_getDeactivatingMark(), 10\n @_handleDeactivateCancel @_$panes[activatedIndex], activatedIndex\n\n _setIndicatorsState: ->\n @_$indicators.forEach ($indicator, index) =>\n if index is @_activeIndex\n $indicator.setAttribute 'checked', ''\n $indicator.checked = true\n else\n $indicator.removeAttribute 'checked'\n $indicator.checked = false\n\n @activate: ($tab, index) -> @query($tab).activate index\n\n # static private\n @_init: ->\n self = this\n luda.on 'change', @_INDICATOR_SELECTOR, (e) ->\n if this.checked\n instance = self.query luda.$parent self._SELECTOR, this\n instance._setIndicatorsState()\n instance.activate instance._$indicators.indexOf this"],"names":[],"mappings":";;;;;;;;;;;EAAA,IAAA;;EAAA,GAAA,GAAM,CAAC;IACL,IAAG,OAAO,QAAP,KAAqB,WAAxB;MACE,IAAiB,OAAO,MAAP,KAAmB,WAApC;EAAA,aAAO,OAAP;;MACA,IAAiB,OAAO,MAAP,KAAmB,WAApC;EAAA,aAAO,OAAP;OAFF;;IAGA,MAAM,IAAI,KAAJ,CAAU,kCAAV;EAJD,CAAD;;EASN,IAAO,OAAO,GAAG,CAAC,IAAX,KAAmB,UAA1B;IACE,GAAG,CAAC,IAAJ,GAAW,SAAC,SAAD;EACT,QAAA,SAAA,EAAA,IAAA,EAAA;MAAA,IAAA,CAAuD,SAAvD;QAAA,MAAM,IAAI,KAAJ,CAAU,+BAAV,EAAN;;MACA,IAAA,CAAO,CAAC,QAAD,EAAW,UAAX,CAAsB,CAAC,QAAvB,CAAgC,OAAO,SAAvC,CAAP;QACE,MAAM,IAAI,KAAJ,CAAU,8CAAV,EADR;;MAEA,IAAG,SAAS,CAAC,cAAV,CAAyB,QAAzB,CAAH;QACE,IAAO,OAAO,SAAS,CAAC,MAAjB,KAA2B,QAAlC;UACE,MAAM,IAAI,KAAJ,CAAU,uBAAV,EADR;;EAEA,aAAO,GAAG,CAAC,IAAI,CAAC,QAAT,CAAkB,SAAS,CAAC,MAA5B,EAAoC,SAApC,EAHT;;MAIA,IAAG,SAAA,YAAqB,KAArB,IAA8B,OAAO,SAAP,KAAoB,UAArD;QACE,MAAM,IAAI,KAAJ,CAAU,oCAAV,EADR;;MAEA,SAAA,GAAY;MACZ,KAAA,iBAAA;;QACE,SAAU,CAAA,IAAA,CAAV,GAAkB,GAAG,CAAC,IAAI,CAAC,QAAT,CAAkB,IAAlB,EAAwB,QAAxB;;aACpB;;IAEF,GAAG,CAAC,IAAI,CAAC,QAAT,GAAoB,SAAC,SAAD,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sBAAD,GAAyB;;IACzB,MAAC,CAAA,aAAD,GAAgB;;IAEhB,MAAC,CAAA,eAAD,GACE;MAAA,SAAA,EAAW,IAAX;MACA,OAAA,EAAS;;;;;eAZb;;;;"}
1
+ {"version":3,"file":"luda.js","sources":["../../coffee/install.coffee","../../coffee/constants.coffee","../../coffee/dom.coffee","../../coffee/event.coffee","../../coffee/utilities.coffee","../../coffee/static.coffee","../../coffee/behaviors/enter.coffee","../../coffee/behaviors/focus.coffee","../../coffee/factory.coffee","../../coffee/behaviors/readonly.coffee","../../coffee/behaviors/tabulate.coffee","../../coffee/behaviors/toggle.coffee","../../coffee/elements/form-file.coffee","../../coffee/elements/form-select.coffee","../../coffee/patterns/carousel.coffee","../../coffee/patterns/dropdown.coffee","../../coffee/patterns/form-dropdown.coffee","../../coffee/patterns/tab.coffee"],"sourcesContent":["ENV = (->\n if typeof document isnt 'undefined'\n return window if typeof window isnt 'undefined'\n return global if typeof global isnt 'undefined'\n throw new Error 'Unsupported runtime environment.'\n)()\n\n\n\nunless typeof ENV.luda is 'function'\n ENV.luda = (installer) ->\n throw new Error 'Installer cannot be detected.' unless installer\n unless ['object', 'function'].includes typeof installer\n throw new Error 'Installer must be object, array or function.'\n if installer.hasOwnProperty '_SCOPE'\n unless typeof installer._SCOPE is 'string'\n throw new Error '_SCOPE must be string'\n return ENV.luda._install installer._SCOPE, installer\n if installer instanceof Array or typeof installer is 'function'\n throw new Error 'Unscoped installer must be object.'\n installed = {}\n for name, property of installer\n installed[name] = ENV.luda._install name, property\n installed\n\n ENV.luda._install = (namespace, installer) ->\n if ENV.luda[namespace]\n console.warn \"Namespace #{namespace} is ocupied, sikp installation.\"\n return ENV.luda[namespace]\n for installedName, installedInstaller of ENV.luda\n if installer is installedInstaller\n console.warn \"Installer is installed with name #{installedName},\n skip installation.\"\n return ENV.luda[installedName]\n if installer._install\n if typeof installer._install is 'function'\n return ENV.luda[namespace] = installer._install()\n return ENV.luda[namespace] = installer._install\n ENV.luda[namespace] = installer","import './install.coffee'\n\n\n\nluda\n\n KEY_LEFT: 37\n KEY_UP: 38\n KEY_RIGHT: 39\n KEY_DOWN: 40\n KEY_TAB: 9\n KEY_ESC: 27\n KEY_ENTER: 13","import './install.coffee'\n\n\n\nluda\n \n $child: (selector, $ancestor) ->\n $ancestor = document unless $ancestor\n $ancestor.querySelector selector\n\n $children: (selector, $ancestor) ->\n $ancestor = document unless $ancestor\n $descendant = @$child selector, $ancestor\n if $descendant\n descendants = Array.from($ancestor.querySelectorAll selector)\n else\n descendants = []\n\n $unnested: (selector, $ancestor, ancestorSelector) ->\n descendants = @$children selector, $ancestor\n descendants.filter ($descendant) =>\n $descendant if @$parent(ancestorSelector, $descendant) is $ancestor\n\n $parent: (selector, $descendant) ->\n $ancestor = $descendant.parentNode\n if $ancestor\n if $ancestor.matches and $ancestor.matches selector\n $ancestor\n else\n @$parent selector, $ancestor\n\n $parents: (selector, $descendant, _ancestors) ->\n $ancestor = @$parent selector, $descendant\n _ancestors = [] unless _ancestors\n if $ancestor\n _ancestors.push($ancestor)\n @$parents selector, $ancestor, _ancestors\n else\n _ancestors\n\n $after: ($node, $target) ->\n $parent = $target.parentNode\n if $parent.lastChild is $target\n $parent.appendChild $node\n else\n $parent.insertBefore $node, $target.nextSibling\n\n $prepend: ($node, $target) ->\n if $target.firstChild\n $target.insertBefore $node, $target.firstChild\n else\n $target.appendChild $node\n\n reflow: ($element) -> $element.offsetHeight\n\n _getTransitionDurations: (style, propertyLength) ->\n durationArray = style.split ','\n while durationArray.length < propertyLength\n durationArray = durationArray.concat durationArray\n if durationArray.length > propertyLength\n durationArray = durationArray.slice 0, propertyLength\n durationArray.map (durationStr) ->\n duration = parseFloat durationStr\n return 0 unless duration\n if durationStr.match 'ms' then duration else duration * 1000\n\n getTransitionDuration: ($element) ->\n styles = window.getComputedStyle $element\n length = styles.transitionProperty.split(',').length\n return 0 unless length\n delays = @_getTransitionDurations styles.transitionDelay, length\n durations = @_getTransitionDurations styles.transitionDuration, length\n finalDurations = durations.map (duration, index) -> duration + delays[index]\n Math.max.apply null, finalDurations\n\n _observeDom: (onNodeAdded, onNodeRemoved) ->\n observerConfig =\n childList: true\n subtree: true\n observer = new MutationObserver (mutations) ->\n mutations.forEach (mutation) ->\n $removedNodes = Array.from mutation.removedNodes\n $addedNodes = Array.from mutation.addedNodes\n $removedNodes.forEach ($node) ->\n onNodeRemoved $node if $node instanceof Element and onNodeRemoved\n $addedNodes.forEach ($node) ->\n onNodeAdded $node if $node instanceof Element and onNodeAdded\n observer.observe document.documentElement, observerConfig\n observer","import './install.coffee'\nimport './dom.coffee'\n\n\n\nluda\n \n _SWIPE_DISTANCE: 10\n _EVENT_TYPE_PREFIX: 'luda'\n _SWIPE_LEFT: 'swipeleft'\n _SWIPE_RIGHT: 'swiperight'\n _SWIPE_UP: 'swipeup'\n _SWIPE_DOWN: 'swipedown'\n _SWIPE_LEFT_OR_UP: 'swipeleft or swipeup'\n _SWIPE_RIGHT_OR_DOWN: 'swiperight or swipedown'\n _DOC_READY: 'docready'\n _FORM_RESET: 'reset'\n\n eventPath: (event) ->\n if event.composedPath\n path = event.composedPath()\n else if event.path\n path = event.path\n else\n path = [event.target].concat(luda.$parents '*', event.target)\n\n on: (event, selector..., handler) ->\n switch event\n when @_DOC_READY then @_onDocReady handler\n when @_FORM_RESET then @_onReset selector[0], handler\n when @_SWIPE_LEFT, \\\n @_SWIPE_RIGHT, \\\n @_SWIPE_UP, \\\n @_SWIPE_DOWN, \\\n @_SWIPE_LEFT_OR_UP, \\\n @_SWIPE_RIGHT_OR_DOWN\n then @_onSwipe event, selector[0], handler\n else @_on event, selector[0], handler\n\n onOpposite: (event, selector, handler) ->\n _self = this\n document.addEventListener event, (e) ->\n trigger = _self.eventPath(e).every ($element) ->\n not $element.matches or not $element.matches selector\n handler e if trigger\n\n dispatch: ($target, type, detail, delayMilliseconds, options = {}) ->\n options.bubbles = true unless typeof options.bubbles is 'boolean'\n options.cancelable = true unless typeof options.cancelable is 'boolean'\n options.composed = true unless typeof options.composed is 'boolean'\n evt = new Event \"#{@_EVENT_TYPE_PREFIX}:#{type}\", options\n evt.detail = detail\n if typeof delayMilliseconds is 'number'\n setTimeout ->\n $target.dispatchEvent evt if $target\n , delayMilliseconds\n else\n $target.dispatchEvent evt\n evt\n \n _onDocReady: (handler) ->\n if document.readyState is 'loading'\n document.addEventListener 'DOMContentLoaded', handler\n else\n handler()\n\n _onReset: (selector, handler) ->\n document.addEventListener 'reset', (e) ->\n if selector?\n luda.$children(selector, e.target).forEach ($element) ->\n handler.bind($element)(e)\n else\n handler e\n \n _onSwipe: (event, selector, handler) ->\n _self = this\n watch = false\n $touchStartElement = document\n touchStartE = null\n touchStartX = 0\n touchStartY = 0\n document.addEventListener 'touchstart', (e) ->\n if e.touches.length is 1\n touchStartX = e.touches[0].screenX\n touchStartY = e.touches[0].screenY\n if selector?\n _self.eventPath(e).some ($element) ->\n if $element.matches and $element.matches selector\n $touchStartElement = $element\n touchStartE = e\n watch = true\n return true\n else\n watch = true\n\n document.addEventListener 'touchmove', (e) ->\n if watch and e.touches.length is 1\n touchDistanceX = e.touches[0].screenX - touchStartX\n touchDistanceY = e.touches[0].screenY - touchStartY\n eventX = undefined\n eventY = undefined\n eventXOrY = undefined\n if Math.abs(touchDistanceX) >= _self._SWIPE_DISTANCE\n if touchDistanceX > 0\n eventX = _self._SWIPE_RIGHT\n else\n eventX = _self._SWIPE_LEFT\n if Math.abs(touchDistanceY) >= _self._SWIPE_DISTANCE\n if touchDistanceY > 0\n eventY = _self._SWIPE_DOWN\n else\n eventY = _self._SWIPE_UP\n if eventX is _self._SWIPE_LEFT \\\n or eventY is _self._SWIPE_UP\n eventXOrY = _self._SWIPE_LEFT_OR_UP\n if eventX is _self._SWIPE_RIGHT \\\n or eventY is _self._SWIPE_DOWN\n eventXOrY = _self._SWIPE_RIGHT_OR_DOWN\n if (eventX? and eventX is event) \\\n or (eventY? and eventY is event) \\\n or eventXOrY is event\n if selector?\n _self.eventPath(e).some ($element) ->\n if $element is $touchStartElement\n watch = false\n handler.bind($element)(touchStartE, e)\n return true\n else\n watch = false\n handler touchStartE, e\n\n _on: (event, selector, handler) ->\n if selector is window\n window.addEventListener event, (e) -> handler e\n else\n _self = this\n document.addEventListener event, (e) ->\n if selector?\n _self.eventPath(e).some ($element) ->\n if $element.matches and $element.matches selector\n handler.bind($element)(e)\n return true\n else\n handler e","import './install.coffee'\n\n\n\nluda\n \n except: (element, arr) ->\n arr.splice(arr.indexOf(element), 1) if arr.includes element","import './install.coffee'\nimport './utilities.coffee'\nimport './dom.coffee'\nimport './event.coffee'\n\n\n \nluda class Static\n\n @_SCOPE: 'Static'\n \n @_SELECTOR_INVALID_ERROR: '@param selector must be a css selector string'\n @_SELECTORS: []\n\n @_ACTIVATE_EVENT_TYPE: -> \"#{@_SCOPE}:activate\"\n @_ACTIVATED_EVENT_TYPE: -> \"#{@_SCOPE}:activated\"\n @_DEACTIVATE_EVENT_TYPE: -> \"#{@_SCOPE}:deactivate\"\n @_DEACTIVATED_EVENT_TYPE: -> \"#{@_SCOPE}:deactivated\"\n @_ACTIVATING_MARK_ATTRIBUTE: -> \"data-#{@_SCOPE}-activating\"\n @_DEACTIVATING_MARK_ATTRIBUTE: -> \"data-#{@_SCOPE}-deactivating\"\n\n @_Observed: []\n @_observer: null\n\n @_selector: ''\n\n @_add: (selector) ->\n throw new Error @_SELECTOR_INVALID_ERROR if typeof selector isnt 'string'\n @_SELECTORS.push selector unless @_SELECTORS.includes selector\n @_mergeSelectors()\n\n @_remove: (selector) ->\n throw new Error @_SELECTOR_INVALID_ERROR if typeof selector isnt 'string'\n luda.except selector, @_SELECTORS\n @_mergeSelectors()\n\n @_mergeSelectors: ->\n @_selector = @_SELECTORS.join ','\n\n @_activatePrevented: ($ele, detail) ->\n activateEvent = luda.dispatch $ele, @_ACTIVATE_EVENT_TYPE(), detail\n activateEvent.defaultPrevented\n\n @_deactivatePrevented: ($ele, detail) ->\n deactivateEvent = luda.dispatch $ele, @_DEACTIVATE_EVENT_TYPE(), detail\n deactivateEvent.defaultPrevented\n\n @_handleActivateEnd: ($ele, detail) ->\n @_setActivatingMark $ele, detail\n activateDuration = luda.getTransitionDuration $ele\n luda.dispatch $ele, @_ACTIVATED_EVENT_TYPE(), detail, activateDuration\n setTimeout =>\n @_removeActivatingMark $ele if $ele\n , activateDuration\n activateDuration\n\n @_handleDeactivateEnd: ($ele, detail) ->\n @_setDeactivatingMark $ele, detail\n deactivateDuration = luda.getTransitionDuration $ele\n luda.dispatch $ele, @_DEACTIVATED_EVENT_TYPE(), detail, deactivateDuration\n setTimeout =>\n @_removeDeactivatingMark $ele if $ele\n , deactivateDuration\n deactivateDuration\n\n @_handleActivateCancel: ($ele, detail) ->\n if @_isActivating $ele\n luda.dispatch $ele, @_ACTIVATED_EVENT_TYPE(), detail\n @_removeActivatingMark $ele\n\n @_handleDeactivateCancel: ($ele, detail) ->\n if @_isDeactivating $ele\n luda.dispatch $ele, @_DEACTIVATED_EVENT_TYPE(), detail\n @_removeDeactivatingMark $ele\n\n @_isActivating: ($ele) ->\n $ele.hasAttribute @_ACTIVATING_MARK_ATTRIBUTE()\n\n @_isDeactivating: ($ele) ->\n $ele.hasAttribute @_DEACTIVATING_MARK_ATTRIBUTE()\n\n @_isTransitioning: ($ele) ->\n @_isActivating($ele) or @_isDeactivating($ele)\n\n @_getActivatingMark: ($ele) ->\n $ele.getAttribute @_ACTIVATING_MARK_ATTRIBUTE()\n\n @_getDeactivatingMark: ($ele) ->\n $ele.getAttribute @_DEACTIVATING_MARK_ATTRIBUTE()\n\n @_removeActivatingMark: ($ele) ->\n $ele.removeAttribute @_ACTIVATING_MARK_ATTRIBUTE()\n\n @_removeDeactivatingMark: ($ele) ->\n $ele.removeAttribute @_DEACTIVATING_MARK_ATTRIBUTE()\n\n @_setActivatingMark: ($ele, value) ->\n $ele.setAttribute @_ACTIVATING_MARK_ATTRIBUTE(), value\n\n @_setDeactivatingMark: ($ele, value) ->\n $ele.setAttribute @_DEACTIVATING_MARK_ATTRIBUTE(), value\n\n @_onEleAdded: ($ele) ->\n Static._onEleAddedOrRemoved $ele, '_onElementAdded'\n\n @_onEleRemoved: ($ele) ->\n Static._onEleAddedOrRemoved $ele, '_onElementRemoved'\n\n @_onEleAddedOrRemoved: ($ele, action) ->\n Static._Observed.forEach (Observed) ->\n return unless Observed[action]\n $matched = luda.$children Observed._selector, $ele\n $matched.unshift $ele if $ele.matches Observed._selector\n $matched.forEach ($target) -> Observed[action] $target\n\n @_observe: (classObj) ->\n unless Static._observer\n Static._observer = \\\n luda._observeDom Static._onEleAdded, Static._onEleRemoved\n if classObj._onElementAdded or classObj._onElementRemoved \\\n and classObj._selector\n unless Static._Observed.includes classObj\n Static._Observed.push classObj\n\n @_install: ->\n self = this\n return this if this is Static\n @_SELECTORS = [] unless @hasOwnProperty '_SELECTORS'\n @_mergeSelectors()\n exposed = @_init() if typeof @_init is 'function'\n luda.on luda._DOC_READY, -> Static._observe(self)\n if exposed then exposed else this","import '../install.coffee'\nimport '../constants.coffee'\nimport '../event.coffee'\nimport '../static.coffee'\n\n\nluda class extends luda.Static\n\n @_SCOPE: 'enter'\n\n @_SELECTORS: [\n 'input[type=checkbox]'\n 'input[type=radio]'\n '[tabindex]'\n ]\n\n @_DISABLED_ATTRIBUTE: 'data-enter-disabled'\n\n @_init: ->\n self = this\n luda.on 'keydown', (e) ->\n if not document.documentElement.hasAttribute(self._DISABLED_ATTRIBUTE) \\\n and e.keyCode is luda.KEY_ENTER \\\n and e.target.matches(self._selector)\n e.preventDefault()\n setTimeout(-> e.target.click())","import '../install.coffee'\nimport '../dom.coffee'\nimport '../event.coffee'\nimport '../static.coffee'\n\n\n\nluda class extends luda.Static\n\n @_SCOPE: 'focus'\n\n @_CSS_CLASS: 'focus'\n # mouse focusable selectors\n @_SELECTORS: ['select'\n 'textarea'\n ':not(.btn-check):not(.btn-radio):not(.btn-file) >\n input:not([type=button]):not([type=submit]):not([type=reset])'\n ]\n @_TOUCHSTART_FOCUS_SELECTOR: 'input[type=range]'\n @_PARENT_FOCUS_SELECTOR: 'select[multiple]'\n @_PARENT_FOCUS_CHILDREN_SELECTOR: \"#{@_PARENT_FOCUS_SELECTOR} *\"\n\n @_DISABLED_ATTRIBUTE: 'data-focus-disabled'\n\n @_$focus: document.getElementsByClassName(@_CSS_CLASS)\n\n @_isActive: ->\n not document.documentElement.hasAttribute(@_DISABLED_ATTRIBUTE)\n\n @_removeFocusClassExcept: ($exception) ->\n Array.from(@_$focus).forEach ($focus) =>\n $focus.classList.remove @_CSS_CLASS if $focus isnt $exception\n\n @_addFocusClassExceptHtmlAndBody: ($target) ->\n if $target isnt document.body and $target isnt document.documentElement\n $target.classList.add @_CSS_CLASS\n\n @_changeFocusStateOnKeyEvent: (e) ->\n if @_isActive()\n @_removeFocusClassExcept e.target\n @_addFocusClassExceptHtmlAndBody e.target\n\n @_changeFocusStateOnMouseDownEvent: (e) ->\n if @_isActive()\n if e.target.matches @_PARENT_FOCUS_CHILDREN_SELECTOR\n target = luda.$parent @_PARENT_FOCUS_SELECTOR, e.target\n else\n target = e.target\n if target.matches @_selector\n @_removeFocusClassExcept target\n @_addFocusClassExceptHtmlAndBody target\n else\n @_removeFocusClassExcept()\n\n @_setElementPrototype: ->\n focus = HTMLElement.prototype.focus\n blur = HTMLElement.prototype.blur\n self = this\n HTMLElement.prototype.focus = ->\n focus.apply this, arguments\n if self._isActive() and document.activeElement is this\n self._removeFocusClassExcept this\n self._addFocusClassExceptHtmlAndBody this\n HTMLElement.prototype.blur = ->\n blur.apply this, arguments\n this.classList.remove self._CSS_CLASS if self._isActive()\n\n @_init: ->\n self = this\n @_setElementPrototype()\n luda.on 'keydown', @_changeFocusStateOnKeyEvent.bind this\n luda.on 'keyup', @_changeFocusStateOnKeyEvent.bind this\n luda.on 'mousedown', @_changeFocusStateOnMouseDownEvent.bind this\n luda.on 'touchstart', @_TOUCHSTART_FOCUS_SELECTOR, \\\n @_changeFocusStateOnMouseDownEvent.bind this\n luda.on 'focusin', @_changeFocusStateOnMouseDownEvent.bind this","import './install.coffee'\nimport './utilities.coffee'\nimport './dom.coffee'\nimport './event.coffee'\n\n\n\n\nluda class Factory\n\n @_SCOPE: 'Factory'\n \n @_COMPONENT_NO_SELECTOR_ERROR: 'Extended component must has a css selector'\n @_$COMPONENT_INVALID_ERROR: '@param $component must be an instance of Element'\n @_SELECTOR: ''\n\n @_ACTIVATE_EVENT_TYPE: -> \"#{@_SCOPE}:activate\"\n @_ACTIVATED_EVENT_TYPE: -> \"#{@_SCOPE}:activated\"\n @_DEACTIVATE_EVENT_TYPE: -> \"#{@_SCOPE}:deactivate\"\n @_DEACTIVATED_EVENT_TYPE: -> \"#{@_SCOPE}:deactivated\"\n @_ACTIVATING_MARK_ATTRIBUTE: -> \"data-#{@_SCOPE}-activating\"\n @_DEACTIVATING_MARK_ATTRIBUTE: -> \"data-#{@_SCOPE}-deactivating\"\n\n @_instances: []\n\n @_Observed: []\n @_observer: null\n @_observerConfig:\n childList: true\n subtree: true\n\n _hasDescendant: (descendant) ->\n if @_children.length and descendant\n return true if @_children.includes descendant\n return @_children.some (child) -> child._hasDescendant descendant\n else\n return false\n\n _observe: ->\n @_observer = new MutationObserver @_onMutations.bind this\n @_observer.observe @_$component, @constructor._observerConfig\n\n _disconnect: ->\n @_observer.disconnect()\n @_observer = null\n\n _activatePrevented: ($ele, detail) ->\n activateEvent = luda.dispatch($ele, \\\n @constructor._ACTIVATE_EVENT_TYPE(), detail)\n activateEvent.defaultPrevented\n\n _deactivatePrevented: ($ele, detail) ->\n deactivateEvent = luda.dispatch($ele, \\\n @constructor._DEACTIVATE_EVENT_TYPE(), detail)\n deactivateEvent.defaultPrevented\n\n _handleActivateEnd: ($ele, detail) ->\n @_setActivatingMark detail\n activateDuration = luda.getTransitionDuration $ele\n luda.dispatch($ele, \\\n @constructor._ACTIVATED_EVENT_TYPE(), detail, \\\n activateDuration)\n setTimeout =>\n @_removeActivatingMark() if @_$component\n , activateDuration\n activateDuration\n\n _handleDeactivateEnd: ($ele, detail) ->\n @_setDeactivatingMark detail\n deactivateDuration = luda.getTransitionDuration $ele\n luda.dispatch($ele, \\\n @constructor._DEACTIVATED_EVENT_TYPE(), detail, \\\n deactivateDuration)\n setTimeout =>\n @_removeDeactivatingMark() if @_$component\n , deactivateDuration\n deactivateDuration\n\n _handleActivateCancel: ($ele, detail) ->\n if @_isActivating()\n luda.dispatch($ele, \\\n @constructor._ACTIVATED_EVENT_TYPE(), detail)\n @_removeActivatingMark()\n\n _handleDeactivateCancel: ($ele, detail) ->\n if @_isDeactivating()\n luda.dispatch($ele, \\\n @constructor._DEACTIVATED_EVENT_TYPE(), detail)\n @_removeDeactivatingMark()\n\n _isActivating: ->\n @_$component.hasAttribute @constructor._ACTIVATING_MARK_ATTRIBUTE()\n\n _isDeactivating: ->\n @_$component.hasAttribute @constructor._DEACTIVATING_MARK_ATTRIBUTE()\n\n _isTransitioning: ->\n @_isActivating() or @_isDeactivating()\n\n _getActivatingMark: ->\n @_$component.getAttribute @constructor._ACTIVATING_MARK_ATTRIBUTE()\n\n _getDeactivatingMark: ->\n @_$component.getAttribute @constructor._DEACTIVATING_MARK_ATTRIBUTE()\n\n _removeActivatingMark: ->\n @_$component.removeAttribute @constructor._ACTIVATING_MARK_ATTRIBUTE()\n\n _removeDeactivatingMark: ->\n @_$component.removeAttribute @constructor._DEACTIVATING_MARK_ATTRIBUTE()\n\n _setActivatingMark: (value) ->\n @_$component.setAttribute @constructor._ACTIVATING_MARK_ATTRIBUTE(), value\n\n _setDeactivatingMark: (value) ->\n @_$component.setAttribute @constructor._DEACTIVATING_MARK_ATTRIBUTE(), value\n\n @create: ($component) ->\n componentIsElementInstance = $component instanceof Element\n throw new Error @_$COMPONENT_INVALID_ERROR unless componentIsElementInstance\n $family = @_query$family $component\n instance = @query $component\n if $family._$parent\n if parent = @query $family._$parent\n @_instances.push instance = @_createInstance $component unless instance\n if instance._parent isnt parent\n parent._children.push(instance) and (instance._parent = parent)\n $family._$children.forEach ($child) => @create $child\n return instance\n else\n @create $family._$parent\n return @query $component\n else\n @_instances.push instance = @_createInstance $component unless instance\n $family._$children.forEach ($child) => @create $child\n return instance\n\n @destroy: (instance$component) ->\n instance = @query instance$component\n if instance\n instance._disconnect() if instance._observer\n instance._destroy() if instance._destroy\n @destroy instance._children[0] while instance._children.length\n if instance._parent\n luda.except instance, instance._parent._children\n luda.except instance, @_instances\n for attribute, value of instance\n instance[attribute] = null\n \n @query: (instance$component) ->\n instance = null\n if instance$component instanceof this \\\n and @_instances.includes instance$component\n instance = instance$component\n else if instance$component instanceof Element\n @_instances.some (inited) ->\n if inited._$component is instance$component\n instance = inited\n return true\n return instance\n\n @_query$family: ($component) ->\n _$parent = null\n _$children = []\n if @_SELECTOR\n _$parent = luda.$parent @_SELECTOR, $component\n _$children = luda.$unnested @_SELECTOR, $component, @_SELECTOR\n {_$parent, _$children}\n\n @_createInstance: ($component) ->\n instance = new this()\n instance._$component = $component\n instance._parent = null\n instance._children = []\n instance._observer = null\n instance._constructor() if instance._constructor\n unless instance._observer and instance._onMutations and @_observerConfig\n instance._observe()\n instance\n\n @_onEleAdded: ($ele) ->\n Factory._onEleAddedOrRemoved($ele, 'create')\n\n @_onEleRemoved: ($ele) ->\n Factory._onEleAddedOrRemoved($ele, 'destroy')\n\n @_onEleAddedOrRemoved: ($ele, action) ->\n Factory._Observed.forEach (Observed) ->\n return Observed[action] $ele if $ele.matches Observed._SELECTOR\n luda.$children(Observed._SELECTOR, $ele).forEach ($child) ->\n Observed[action] $child\n\n @_observe: (classObj) ->\n unless Factory._observer\n Factory._observer = \\\n luda._observeDom Factory._onEleAdded, Factory._onEleRemoved\n unless Factory._Observed.includes classObj\n Factory._Observed.push classObj\n\n @_install: ->\n self = this\n return this if this is Factory\n unless @_SELECTOR or typeof @_SELECTOR isnt 'string'\n throw new Error @_COMPONENT_NO_SELECTOR_ERROR\n @_instances = [] unless @hasOwnProperty '_instances'\n exposed = @_init() if typeof @_init is 'function'\n luda.on luda._DOC_READY, ->\n luda.$children(self._SELECTOR).forEach ($component) ->\n self.create $component\n Factory._observe(self)\n if exposed then exposed else this","import '../install.coffee'\nimport '../factory.coffee'\n\n\n\nluda class extends luda.Factory\n\n @_SCOPE: 'readonly'\n @_READONLY_ATTRIBUTE: 'data-readonly'\n @_ORIGINAL_TABINDEX_ATTRIBUTE: 'data-readonly-tabindex'\n @_READONLY_FALSE_VALUE: 'false'\n @_SELECTOR: \"[#{@_READONLY_ATTRIBUTE}]\"\n\n @_observerConfig:\n attributes: true\n attributeFilter: [@_READONLY_ATTRIBUTE]\n\n _getConfig: ->\n readonly = @_$component.getAttribute @constructor._READONLY_ATTRIBUTE\n _isReadonly = readonly isnt @constructor._READONLY_FALSE_VALUE\n {_isReadonly}\n \n _constructor: ->\n {\n @_isReadonly\n } = @_getConfig()\n @_setOriginalTabIndex()\n @_setTabIndex()\n\n _onMutations: ->\n @_constructor()\n\n _setOriginalTabIndex: ->\n unless @_$component.hasAttribute \\\n @constructor._ORIGINAL_TABINDEX_ATTRIBUTE\n @_$component.setAttribute \\\n @constructor._ORIGINAL_TABINDEX_ATTRIBUTE, @_$component.tabIndex\n\n _setTabIndex: ->\n if @_isReadonly\n @_$component.tabIndex = -1\n else\n @_$component.tabIndex = \\\n @_$component.getAttribute @constructor._ORIGINAL_TABINDEX_ATTRIBUTE","import '../install.coffee'\nimport '../constants.coffee'\nimport '../dom.coffee'\nimport '../event.coffee'\nimport '../static.coffee'\n\n\n\nluda class extends luda.Static\n\n @_SCOPE: 'tabulate'\n\n @_SELECTORS: ['input[type=radio]:not([disabled])']\n\n @_DISABLED_ATTRIBUTE: 'data-tabulate-disabled'\n\n @_querySameName$radios: ($radio) ->\n if $radio.name\n selector = \"#{@_selector}[name=#{$radio.name}]\"\n else\n selector = @_selector\n $inputs = luda.$children selector\n $inputs.filter ($input) -> $input.tabIndex >= 0\n\n @_query$prev$next: ($radio) ->\n $sameNameRadios = @_querySameName$radios $radio\n radioIndex = $sameNameRadios.indexOf $radio\n $prev = $sameNameRadios[radioIndex - 1]\n $next = $sameNameRadios[radioIndex + 1]\n {$prev, $next}\n\n @_init: ->\n self = this\n luda.on 'keydown', (e) ->\n if not document.documentElement.hasAttribute(self._DISABLED_ATTRIBUTE) \\\n and e.keyCode is luda.KEY_TAB \\\n and e.target.nodeName.toUpperCase() is 'INPUT' \\\n and e.target.type is 'radio'\n if e.shiftKey\n if $prev = self._query$prev$next(e.target).$prev\n e.preventDefault()\n $prev.focus()\n else\n if $next = self._query$prev$next(e.target).$next\n e.preventDefault()\n $next.focus()","import '../install.coffee'\nimport '../dom.coffee'\nimport '../event.coffee'\nimport '../static.coffee'\n\n\n\nluda class extends luda.Static\n\n @_SCOPE: 'toggle'\n @_TOGGLE_TARGET_ATTRIBUTE: 'data-toggle-target'\n @_TOGGLE_ATTRIBUTE: 'data-toggle'\n @_TOGGLE_FOR_ATTRIBUTE: 'data-toggle-for'\n @_TOGGLE_DISABLED_ATTRIBUTE: 'data-toggle-disabled'\n @_AUTO_DEACTIVATE_ATTRIBUTE: 'data-toggle-auto-deactivate'\n @_AUTO_DEACTIVATE_DURATION: 3000\n @_ACTIVE_CSS_CLASS: 'toggle-active'\n @_SELECTORS: [\n \"[#{@_TOGGLE_TARGET_ATTRIBUTE}]\"\n ]\n\n @activate: (name$target) ->\n @_query$targets(name$target).forEach ($target) =>\n return if $target.classList.contains @_ACTIVE_CSS_CLASS\n return if @_isTransitioning $target\n return if @_activatePrevented $target\n $target.classList.add @_ACTIVE_CSS_CLASS\n @_handleActivateEnd $target\n @_delayDeactivate $target if @_shouldAutoDeactivate $target\n\n @deactivate: (name$target) ->\n @_query$targets(name$target).forEach ($target) =>\n return unless $target.classList.contains @_ACTIVE_CSS_CLASS\n return if @_isTransitioning $target\n return if @_deactivatePrevented $target\n $target.classList.remove @_ACTIVE_CSS_CLASS\n @_handleDeactivateEnd $target\n\n @toggle: (name$target) ->\n @_query$targets(name$target).forEach ($target) =>\n if $target.classList.contains @_ACTIVE_CSS_CLASS\n @deactivate($target)\n else\n @activate($target)\n\n @_onElementAdded: ($ele) ->\n @_handleActivateCancel $ele\n @_handleDeactivateCancel $ele\n @_delayDeactivate $ele if @_shouldAutoDeactivate $ele\n\n @_shouldAutoDeactivate: ($target) ->\n $target.hasAttribute @_AUTO_DEACTIVATE_ATTRIBUTE\n\n @_delayDeactivate: ($target) ->\n delay = parseInt $target.getAttribute(@_AUTO_DEACTIVATE_ATTRIBUTE), 10\n delay = @_AUTO_DEACTIVATE_DURATION if not delay\n setTimeout =>\n @deactivate $target if $target\n , delay\n\n @_query$targets: (name$target) ->\n if name$target instanceof Element\n [name$target]\n else\n luda.$children \"[#{@_TOGGLE_TARGET_ATTRIBUTE}=#{name$target}]\"\n\n @_init: ->\n self = this\n clickEventSelector = \"[#{@_TOGGLE_FOR_ATTRIBUTE}],[#{@_TOGGLE_ATTRIBUTE}]\"\n luda.on luda._DOC_READY, ->\n luda.$children(self._selector).forEach ($target) ->\n self._delayDeactivate $target if self._shouldAutoDeactivate $target\n luda.on 'click', clickEventSelector, (e) ->\n toggleChecked = false\n luda.eventPath(e).some ($path) ->\n if $path instanceof Element\n if $path.hasAttribute(self._TOGGLE_ATTRIBUTE) \\\n or $path.hasAttribute(self._TOGGLE_FOR_ATTRIBUTE)\n if toggleName = $path.getAttribute self._TOGGLE_FOR_ATTRIBUTE\n self.toggle toggleName\n toggleChecked = true\n if $path.hasAttribute self._TOGGLE_ATTRIBUTE\n if $path.hasAttribute self._TOGGLE_TARGET_ATTRIBUTE\n $toggle = $path\n else\n $toggle = luda.$parent \\\n \"[#{self._TOGGLE_TARGET_ATTRIBUTE}]\", $path\n if $toggle\n self.toggle $toggle\n toggleChecked = true\n else if $path.hasAttribute self._TOGGLE_DISABLED_ATTRIBUTE\n toggleChecked = true","import '../install.coffee'\nimport '../dom.coffee'\nimport '../event.coffee'\nimport '../factory.coffee'\n\n\n\nluda class extends luda.Factory\n\n @_SCOPE: 'fmFile'\n\n @_VALUE_SPLITOR: ' '\n @_SELECTOR: '.fm-file'\n @_FILE_SELECTOR: 'input[type=file]'\n @_SIMULATOR_SELECTOR: 'input:not([type=file])'\n @_PLACEHOLDER_ATTRIBUTE: 'placeholder'\n @_VALUE_ATTRIBUTE: 'value'\n\n @_observerConfig:\n childList: true\n subtree: true\n\n reset: ->\n @_$file.value = ''\n @_setSimulatorInitialValue()\n\n _getConfig: ->\n _$file = luda.$child @constructor._FILE_SELECTOR, @_$component\n _$simulator = luda.$child \\\n @constructor._SIMULATOR_SELECTOR, @_$component\n {_$file, _$simulator}\n\n _constructor: ->\n {\n @_$file,\n @_$simulator\n } = @_getConfig()\n @_init()\n\n _onMutations: ->\n @_constructor()\n\n _insertSimulator: ->\n @_$simulator = document.createElement 'input'\n @_$simulator.tabIndex = -1\n luda.$after @_$simulator, @_$file\n\n _setPlaceholderValue: ->\n if @_$file.hasAttribute @constructor._PLACEHOLDER_ATTRIBUTE\n @_$simulator.placeholder = \\\n @_$file.getAttribute @constructor._PLACEHOLDER_ATTRIBUTE\n\n _setSimulatorValue: ->\n values = []\n Array.from(@_$file.files).map (file) -> values.push file.name\n if values.length\n return @_$simulator.value = values.join @constructor._VALUE_SPLITOR\n @_setSimulatorInitialValue()\n \n _setSimulatorInitialValue: ->\n if @_$file.hasAttribute(@constructor._VALUE_ATTRIBUTE)\n @_$simulator.value = @_$file.getAttribute @constructor._VALUE_ATTRIBUTE\n\n _init: ->\n if @_$file\n @_insertSimulator() unless @_$simulator\n @_setPlaceholderValue()\n @_setSimulatorValue()\n\n @reset: ($file) -> @query($file).reset()\n\n @_init: ->\n self = this\n luda.on 'change', \"#{@_SELECTOR} #{@_FILE_SELECTOR}\", (e) ->\n self.query(luda.$parent self._SELECTOR, this)._setSimulatorValue()\n luda.on luda._FORM_RESET, @_SELECTOR, (e) ->\n setTimeout => self.query(this)._setSimulatorValue()","import '../install.coffee'\nimport '../dom.coffee'\nimport '../event.coffee'\nimport '../factory.coffee'\n\n\n\nluda class extends luda.Factory\n\n @_SCOPE: 'fmSelect'\n\n @_SELECTOR: '.fm-select'\n @_SELECT_SELECTOR: 'select'\n @_SINGLE_SELECT_SIMULATOR_SELECTOR: 'input'\n @_PLACEHOLDER_ATTRIBUTE: 'placeholder'\n @_MULTIPLE_SELECT_PLACEHOLDER_CSS_CLASS: 'fm-select-multiple-placeholder'\n @_DEFAULT_SELECTED_OPTION_ATTRIBUTE: 'data-fm-select-default-selected'\n @_INITED_ATTRIBUTE: 'data-fm-select-inited'\n\n @_observerConfig:\n childList: true\n attributes: true\n subtree: true\n attributeFilter: ['selected']\n\n select: (indexOrIndexArray) ->\n if @_$select.multiple\n if @_$multipleSelectPlaceholder\n selectedIndexes = indexOrIndexArray\n else\n selectedIndexes = indexOrIndexArray.map (index) -> index + 1\n Array.from(@_$select.options).forEach ($option, index) ->\n $option.selected = selectedIndexes.includes index\n @_markSelectedOption()\n else\n @_$select.selectedIndex = indexOrIndexArray\n @_setSingleSelectSimulatorValue()\n @_markSelectedOption()\n\n _getConfig: ->\n _$select = luda.$child @constructor._SELECT_SELECTOR, @_$component\n _$singleSelectSimulator = luda.$child \\\n @constructor._SINGLE_SELECT_SIMULATOR_SELECTOR, @_$component\n _$multipleSelectPlaceholder = luda.$child \\\n \".#{@constructor._MULTIPLE_SELECT_PLACEHOLDER_CSS_CLASS}\", @_$component\n _$defaultSelectedOptions = luda.$children \\\n \"[#{@constructor._DEFAULT_SELECTED_OPTION_ATTRIBUTE}]\", @_$component\n _defaultSelectedOptionMarked = @_$component.hasAttribute \\\n @constructor._INITED_ATTRIBUTE\n {\n _$select,\n _$singleSelectSimulator,\n _$multipleSelectPlaceholder,\n _$defaultSelectedOptions,\n _defaultSelectedOptionMarked\n }\n\n _constructor: ->\n {\n @_$select,\n @_$singleSelectSimulator,\n @_$multipleSelectPlaceholder,\n @_$defaultSelectedOptions,\n @_defaultSelectedOptionMarked\n } = @_getConfig()\n if @_$select\n if @_$select.multiple\n @_initMultipleSelect()\n else\n @_initSingleSelect()\n \n _onMutations: ->\n @_constructor()\n\n _markSelectedOption: ->\n @_disconnect() if @_observer\n Array.from(@_$select.options).forEach ($option) ->\n if $option.selected\n $option.setAttribute 'selected', 'selected'\n else\n $option.removeAttribute 'selected'\n @_observe() unless @_observer\n\n _markDefaultSelectedOption: ->\n @_$component.setAttribute @constructor._INITED_ATTRIBUTE, ''\n Array.from(@_$select.options).forEach ($option) =>\n if $option.selected\n $option.setAttribute @constructor._DEFAULT_SELECTED_OPTION_ATTRIBUTE, ''\n\n _setSingleSelectedDefaultSelectedOption: ->\n hasSelected = Array.from(@_$select.options).some ($option) ->\n $option.getAttribute('selected') is 'selected'\n @_$select.selectedIndex = -1 unless hasSelected\n\n _insertSingleSelectSimulator: ->\n @_$singleSelectSimulator = document.createElement 'input'\n @_$singleSelectSimulator.tabIndex = -1\n luda.$after @_$singleSelectSimulator, @_$select\n\n _setSingleSelectPlaceholderValue: ->\n @_$singleSelectSimulator.placeholder = @_$select.getAttribute \\\n @constructor._PLACEHOLDER_ATTRIBUTE\n\n _setSingleSelectSimulatorValue: ->\n if $selectedOption = @_$select.options[@_$select.selectedIndex]\n @_$singleSelectSimulator.value = $selectedOption.innerText\n else\n @_$singleSelectSimulator.value = ''\n\n _initSingleSelect: ->\n @_insertSingleSelectSimulator() unless @_$singleSelectSimulator\n if @_$select.hasAttribute @constructor._PLACEHOLDER_ATTRIBUTE\n @_setSingleSelectedDefaultSelectedOption()\n @_setSingleSelectPlaceholderValue()\n @_markDefaultSelectedOption() unless @_defaultSelectedOptionMarked\n @_setSingleSelectSimulatorValue()\n @_markSelectedOption()\n\n _insertMultipleSelectBlankOption: ->\n @_$multipleSelectPlaceholder = document.createElement 'option'\n @_$multipleSelectPlaceholder.className = \\\n @constructor._MULTIPLE_SELECT_PLACEHOLDER_CSS_CLASS\n @_$multipleSelectPlaceholder.disabled = true\n luda.$prepend @_$multipleSelectPlaceholder, @_$select\n\n _setMultipleSelectPlaceholderValue: ->\n @_$multipleSelectPlaceholder.innerText = @_$select.getAttribute \\\n @constructor._PLACEHOLDER_ATTRIBUTE\n\n _initMultipleSelect: ->\n unless @_$multipleSelectPlaceholder\n if @_$select.hasAttribute @constructor._PLACEHOLDER_ATTRIBUTE\n @_insertMultipleSelectBlankOption()\n @_setMultipleSelectPlaceholderValue()\n @_markDefaultSelectedOption() unless @_defaultSelectedOptionMarked\n\n _reset: ->\n if @_$select\n Array.from(@_$select.options).forEach ($option) =>\n $option.selected = @_$defaultSelectedOptions.includes $option\n @_setSingleSelectSimulatorValue() unless @_$select.multiple\n @_markSelectedOption()\n\n @select: ($select, indexOrIndexArray) ->\n @query($select).select indexOrIndexArray\n\n @_init: ->\n self = this\n luda.on 'change', \"#{@_SELECTOR} #{@_SELECT_SELECTOR}\", (e) ->\n instance = self.query(luda.$parent self._SELECTOR, this)\n instance._setSingleSelectSimulatorValue() unless this.multiple\n instance._markSelectedOption()\n luda.on luda._FORM_RESET, @_SELECTOR, (e) ->\n setTimeout => self.query(this)._reset()","import '../install.coffee'\nimport '../dom.coffee'\nimport '../event.coffee'\nimport '../factory.coffee'\n\n\n\nluda class extends luda.Factory\n\n @_SCOPE: 'carousel'\n\n @_SELECTOR: '.carousel'\n @_ITEMS_SELECTOR: '.carousel-item'\n @_PREV_CONTROL_SELECTOR: '.carousel-prev'\n @_NEXT_CONTROL_SELECTOR: '.carousel-next'\n @_INDICATORS_SELECTOR: '.carousel-indicators .btn'\n @_INTERVAL_ATTRIBUTE: 'data-carousel-interval'\n @_WRAP_ATTRIBUTE: 'data-carousel-wrap'\n @_ACTIVATED_INDEX_ATTRIBUTE: 'data-carousel-activated-index'\n @_ITEM_ACTIVE_CSS_CLASS: 'carousel-item-active'\n @_ITEM_NEXT_CSS_CLASS: 'carousel-item-next'\n @_ITEM_PREV_CSS_CLASS: 'carousel-item-prev'\n @_ACTIVE_INDEX: 0\n @_INTERVAL: 5000\n @_WRAP: true\n @_FALSE: 'false'\n\n @_observerConfig:\n childList: true\n attributes: true\n subtree: true\n attributeFilter: [@_INTERVAL_ATTRIBUTE, @_WRAP_ATTRIBUTE]\n \n # public\n activate: (index) ->\n if @_$items.length and not @_isTransitioning()\n activatedIndex = @_activeIndex\n if index? \\\n and index isnt @_activeIndex \\\n and 0 <= index <= @_$items.length - 1 \\\n and @_canTransition(index, activatedIndex)\n @_activeIndex = index\n action = if index < activatedIndex then '_slidePrev' else '_slideNext'\n @[action] activatedIndex\n\n next: ->\n if @_$items.length and not @_isTransitioning()\n activatedIndex = @_activeIndex\n index = activatedIndex + 1\n if index > @_$items.length - 1\n return unless @_wrap\n index = 0\n return unless @_canTransition(index, activatedIndex)\n @_activeIndex = index\n @_slideNext activatedIndex\n @_playTimeStamp = Date.now()\n @_pausedRemainTime = @_interval\n\n prev: ->\n if @_$items.length and not @_isTransitioning()\n activatedIndex = @_activeIndex\n index = activatedIndex - 1\n if index < 0\n return unless @_wrap\n index = @_$items.length - 1\n return unless @_canTransition(index, activatedIndex)\n @_activeIndex = index\n @_slidePrev activatedIndex\n @_playTimeStamp = Date.now()\n @_pausedRemainTime = @_interval\n\n pause: ->\n if @_intervaling?\n clearInterval @_intervaling\n @_intervaling = null\n @_pausedRemainTime = @_pausedRemainTime - (Date.now() - @_playTimeStamp)\n\n play: ->\n if @_interval and @_$items.length > 1\n @_playTimeStamp = Date.now()\n @pause()\n execute = =>\n @next()\n @_intervaling = setInterval @next.bind(this), @_interval\n @_intervaling = setTimeout execute, @_pausedRemainTime\n\n # private\n _getConfig: ->\n _$items = luda.$unnested \\\n @constructor._ITEMS_SELECTOR, @_$component, @constructor._SELECTOR\n _$indicators = luda.$unnested \\\n @constructor._INDICATORS_SELECTOR, @_$component, @constructor._SELECTOR\n _$prevControl = luda.$child \\\n @constructor._PREV_CONTROL_SELECTOR, @_$component\n _$nextControl = luda.$child \\\n @constructor._NEXT_CONTROL_SELECTOR, @_$component\n _activeIndex = _$items.indexOf \\\n luda.$child \".#{@constructor._ITEM_ACTIVE_CSS_CLASS}\", @_$component\n _activeIndex = @constructor._ACTIVE_INDEX if _activeIndex is -1\n _interval = @_$component.getAttribute(@constructor._INTERVAL_ATTRIBUTE)\n if _interval is @constructor._FALSE\n _interval = false\n else\n _interval = Math.abs(parseInt _interval, 10) or @constructor._INTERVAL\n _wrap = @_$component.getAttribute(@constructor._WRAP_ATTRIBUTE)\n _wrap = if _wrap is @constructor._FALSE then false else @constructor._WRAP\n {\n _$items,\n _$indicators,\n _$prevControl,\n _$nextControl,\n _activeIndex,\n _interval,\n _wrap\n }\n\n _constructor: ->\n {\n @_$items,\n @_$indicators,\n @_$prevControl,\n @_$nextControl,\n @_activeIndex,\n @_interval,\n @_wrap\n } = @_getConfig()\n @_intervaling = null\n @_playTimeStamp = 0\n @_pausedRemainTime = @_interval\n @_layout()\n @_handleTransitionCancel()\n @play()\n\n _onMutations: (mutations) ->\n {\n @_$items,\n @_$indicators,\n @_$prevControl,\n @_$nextControl,\n @_activeIndex,\n @_interval,\n @_wrap\n } = @_getConfig()\n @_setIndicatorsState()\n @_setDirectionControlState()\n @play()\n\n _destroy: ->\n @pause()\n\n _layout: ->\n @_$items.forEach ($item, index) =>\n $item.style.transition = 'none'\n if index > @_activeIndex\n $item.classList.add @constructor._ITEM_NEXT_CSS_CLASS\n $item.classList.remove @constructor._ITEM_PREV_CSS_CLASS\n $item.classList.remove @constructor._ITEM_ACTIVE_CSS_CLASS\n else if index < @_activeIndex\n $item.classList.add @constructor._ITEM_PREV_CSS_CLASS\n $item.classList.remove @constructor._ITEM_NEXT_CSS_CLASS\n $item.classList.remove @constructor._ITEM_ACTIVE_CSS_CLASS\n else\n $item.classList.add @constructor._ITEM_ACTIVE_CSS_CLASS\n $item.classList.remove @constructor._ITEM_NEXT_CSS_CLASS\n $item.classList.remove @constructor._ITEM_PREV_CSS_CLASS\n luda.reflow $item\n $item.style.transition = ''\n @_setIndicatorsState()\n @_setDirectionControlState()\n\n _slideNext: (activatedIndex) ->\n if @_$items.length > 1\n $item = @_$items[@_activeIndex]\n $activatedItem = @_$items[activatedIndex]\n $item.style.transition = 'none'\n $item.classList.remove @constructor._ITEM_PREV_CSS_CLASS\n $item.classList.add @constructor._ITEM_NEXT_CSS_CLASS\n luda.reflow $item\n $item.style.transition = ''\n $item.classList.remove @constructor._ITEM_NEXT_CSS_CLASS\n $item.classList.add @constructor._ITEM_ACTIVE_CSS_CLASS\n $activatedItem.classList.remove @constructor._ITEM_ACTIVE_CSS_CLASS\n $activatedItem.classList.add @constructor._ITEM_PREV_CSS_CLASS\n @_handleTransitionEnd @_activeIndex, activatedIndex\n @_setIndicatorsState()\n @_setDirectionControlState()\n\n _slidePrev: (activatedIndex) ->\n if @_$items.length > 1\n $item = @_$items[@_activeIndex]\n $activatedItem = @_$items[activatedIndex]\n $item.style.transition = 'none'\n $item.classList.remove @constructor._ITEM_NEXT_CSS_CLASS\n $item.classList.add @constructor._ITEM_PREV_CSS_CLASS\n luda.reflow $item\n $item.style.transition = ''\n $item.classList.remove @constructor._ITEM_PREV_CSS_CLASS\n $item.classList.add @constructor._ITEM_ACTIVE_CSS_CLASS\n $activatedItem.classList.remove @constructor._ITEM_ACTIVE_CSS_CLASS\n $activatedItem.classList.add @constructor._ITEM_NEXT_CSS_CLASS\n @_handleTransitionEnd @_activeIndex, activatedIndex\n @_setIndicatorsState()\n @_setDirectionControlState()\n\n _canTransition: (activeIndex, activatedIndex) ->\n not @_activatePrevented(@_$items[activeIndex], activeIndex) \\\n and not @_deactivatePrevented(@_$items[activatedIndex], activatedIndex)\n\n _handleTransitionEnd: (activeIndex, activatedIndex) ->\n activateDuration = \\\n @_handleActivateEnd @_$items[activeIndex], activeIndex\n deactivateDuration = \\\n @_handleDeactivateEnd @_$items[activatedIndex], activatedIndex\n\n _handleTransitionCancel: ->\n if @_isActivating()\n index = parseInt @_getActivatingMark(), 10\n @_handleActivateCancel @_$items[index], index\n if @_isDeactivating()\n activatedIndex = parseInt @_getDeactivatingMark(), 10\n @_handleDeactivateCancel @_$items[activatedIndex], activatedIndex\n\n _setIndicatorsState: ->\n @_$indicators.forEach ($indicator, index) =>\n $indicator.disabled = index is @_activeIndex\n\n _setDirectionControlState: ->\n if @_$items.length <= 1\n @_$prevControl?.disabled = @_$nextControl?.disabled = true\n else\n @_$prevControl?.disabled = @_activeIndex is 0 and not @_wrap\n @_$nextControl?.disabled = \\\n @_activeIndex is @_$items.length - 1 and not @_wrap\n \n @activate: ($carousel, index) -> @query($carousel).activate index\n\n @next: ($carousel) -> @query($carousel).next()\n\n @prev: ($carousel) -> @query($carousel).prev()\n\n @pause: ($carousel) -> @query($carousel).pause()\n\n @play: ($carousel) -> @query($carousel).play()\n\n # static private\n @_init: ->\n self = this\n luda.on 'click', @_INDICATORS_SELECTOR, (e) ->\n instance = self.query luda.$parent self._SELECTOR, this\n instance.activate instance._$indicators.indexOf this\n luda.on 'touchstart', @_SELECTOR, (e) ->\n self.query(this).pause()\n luda.on 'touchend', @_SELECTOR, (e) ->\n setTimeout => self.query(this).play()\n luda.on 'mouseover', @_SELECTOR, (e) ->\n self.query(this).pause()\n luda.on 'mouseout', @_SELECTOR, (e) ->\n self.query(this).play()\n luda.on luda._SWIPE_LEFT_OR_UP, @_SELECTOR, (startE, e) ->\n self.query(this).next()\n luda.on luda._SWIPE_RIGHT_OR_DOWN, @_SELECTOR, (startE, e) ->\n self.query(this).prev()\n luda.on 'click', @_PREV_CONTROL_SELECTOR, (e) ->\n self.query(luda.$parent self._SELECTOR, this).prev()\n luda.on 'click', @_NEXT_CONTROL_SELECTOR, (e) ->\n self.query(luda.$parent self._SELECTOR, this).next()","import '../install.coffee'\nimport '../constants.coffee'\nimport '../dom.coffee'\nimport '../event.coffee'\nimport '../factory.coffee'\n\n\n\nluda class extends luda.Factory\n\n @_SCOPE: 'dropdown'\n @_SELECTOR: '.dropdown-fixed,.dropdown-absolute,\n .dropdown-static,.dropdown-absolute-m'\n @_MENU_SELECTOR: '.dropdown-menu'\n @_ITEMS_SELECTOR: 'a[href]:not([disabled]),button:not([disabled]),\n input:not([disabled]),[tabindex]:not([disabled])'\n @_TOGGLE_ATTRIBUTE: 'data-dropdown-toggle'\n @_TOGGLE_DISABLED_ATTRIBUTE: 'data-dropdown-toggle-disabled'\n @_STANDALONE_ATTRIBUTE: 'data-dropdown-standalone'\n @_SWITCHES_SELECTOR: \"[#{@_TOGGLE_ATTRIBUTE}]\"\n @_NONE_SWITCHES_SELECTOR: \"[#{@_TOGGLE_DISABLED_ATTRIBUTE}]\"\n @_ACTIVE_CSS_CLASS: 'dropdown-active'\n\n @_observerConfig:\n childList: true\n attributes: true\n subtree: true\n attributeFilter: [\n @_TOGGLE_ATTRIBUTE\n @_TOGGLE_DISABLED_ATTRIBUTE\n @_STANDALONE_ATTRIBUTE\n ]\n\n @_$focused: []\n\n activate: ->\n return if @_isActive() or @_isTransitioning()\n return if @_activatePrevented @_$menu\n @_$component.classList.add @constructor._ACTIVE_CSS_CLASS\n @constructor._$focused.push document.activeElement\n @_parent?.activate()\n @_handleActivateEnd @_$menu\n\n deactivate: (focus) ->\n return unless @_isActive() and not @_isTransitioning()\n return if @_deactivatePrevented @_$menu\n @_$component.classList.remove @constructor._ACTIVE_CSS_CLASS\n @_children.forEach (child) -> child.deactivate()\n if focus\n @constructor._$focused[@constructor._$focused.length - 1]?.focus()\n @constructor._$focused.splice @constructor._$focused.length - 1, 1\n @_handleDeactivateEnd @_$menu\n\n toggle: (focus) ->\n if @_isActive() then @deactivate(focus) else @activate()\n\n _prev: ->\n if @_$items.length and @_isActive()\n focusIndex = @_$items.indexOf(document.activeElement) - 1\n focusIndex = 0 if focusIndex < 0\n @_$items[focusIndex].focus()\n\n _next: ->\n if @_$items.length and @_isActive()\n focusIndex = @_$items.indexOf(document.activeElement) + 1\n focusIndex = @_$items.length - 1 if focusIndex > @_$items.length - 1\n @_$items[focusIndex].focus()\n\n _getConfig: ->\n _$menu = luda.$child @constructor._MENU_SELECTOR, @_$component\n _$switches = luda.$unnested( \\\n @constructor._SWITCHES_SELECTOR, @_$component, @constructor._SELECTOR)\n .concat(luda.$unnested \\\n @constructor._SWITCHES_SELECTOR, _$menu, @constructor._MENU_SELECTOR)\n _$noneSwitches = luda.$unnested( \\\n @constructor._NONE_SWITCHES_SELECTOR, \\\n @_$component, @constructor._SELECTOR) \\\n .concat(luda.$unnested \\\n @constructor._NONE_SWITCHES_SELECTOR, _$menu, @constructor._MENU_SELECTOR)\n _$items = luda.$unnested \\\n @constructor._ITEMS_SELECTOR, _$menu, @constructor._MENU_SELECTOR\n _isStandalone = @_$component.hasAttribute @constructor._STANDALONE_ATTRIBUTE\n {_$menu, _$items, _$switches, _$noneSwitches, _isStandalone}\n\n _constructor: ->\n @_onMutations()\n @_handleActivateCancel @_$menu\n @_handleDeactivateCancel @_$menu\n\n _onMutations: (mutations) ->\n {\n @_$menu,\n @_$items,\n @_$switches,\n @_$noneSwitches,\n @_isStandalone\n } = @_getConfig()\n\n _isActive: ->\n @_$component.classList.contains @constructor._ACTIVE_CSS_CLASS\n\n _deactivateChildrenExcept: (exceptions) ->\n if exceptions and not (exceptions instanceof Array)\n exceptions = [exceptions]\n if exceptions\n @_children.forEach (child) ->\n if child._isActive() and not exceptions.includes child\n child.deactivate()\n else\n @_children.forEach (child) ->\n child.deactivate() if child._isActive()\n\n @activate: ($dropdown) -> @query($dropdown).activate()\n\n @deactivate: ($dropdown, focus) -> @query($dropdown).deactivate(focus)\n\n @toggle: ($dropdown, focus) -> @query($dropdown).toggle focus\n\n @deactivateExcept: (instances$dropdowns) ->\n exceptions = []\n if instances$dropdowns and not (instances$dropdowns instanceof Array)\n instances$dropdowns = [instances$dropdowns]\n if instances$dropdowns\n instances$dropdowns.forEach (instance$dropdown) =>\n exceptions.push exception if exception = @query instance$dropdown\n if exceptions.length\n @_instances.forEach (instance) ->\n instanceIsntInExceptions = not exceptions.includes instance\n instanceHasntExceptionChild = exceptions.every (exception) ->\n not instance._hasDescendant exception\n if instance._isActive() \\\n and instanceIsntInExceptions \\\n and instanceHasntExceptionChild\n instance.deactivate()\n else\n @_instances.forEach (instance) ->\n instance.deactivate() if instance._isActive()\n\n @_standaloneInstances: ->\n @_instances.filter (instance) -> instance if instance._isStandalone\n\n @_init: ->\n self = this\n luda.onOpposite 'click', @_SELECTOR, (e) ->\n self.deactivateExcept self._standaloneInstances()\n luda.on 'click', @_SELECTOR, (e) ->\n if instance = self.query this\n toggleChecked = false\n focus = not e.detail\n self.deactivateExcept(self._standaloneInstances().concat instance)\n instance._deactivateChildrenExcept()\n instance._parent._deactivateChildrenExcept(instance) if instance._parent\n if instance._$switches.length or instance._$noneSwitches.length\n luda.eventPath(e).some ($path) ->\n if instance._$switches.includes $path\n instance.toggle focus\n toggleChecked = true\n else if instance._$noneSwitches.includes $path\n toggleChecked = true\n instance.toggle focus unless toggleChecked\n\n luda.onOpposite 'keyup', @_SELECTOR, (e) -> self.deactivateExcept()\n luda.on 'keyup', @_SELECTOR, (e) ->\n if e.keyCode is luda.KEY_TAB and instance = self.query this\n self.deactivateExcept(instance)\n instance.activate()\n luda.on 'keydown', @_SELECTOR, (e) ->\n if e.keyCode is luda.KEY_ESC and instance = self.query this\n e.preventDefault()\n if instance._isActive()\n instance.deactivate true\n else\n instance._parent?.deactivate true\n luda.on 'keydown', @_SELECTOR, (e) ->\n if [luda.KEY_LEFT, luda.KEY_UP].includes(e.keyCode) \\\n and instance = self.query this\n e.preventDefault()\n if instance._isActive()\n instance._prev()\n else\n instance._parent?._prev()\n else if [luda.KEY_RIGHT, luda.KEY_DOWN].includes(e.keyCode) \\\n and instance = self.query this\n e.preventDefault()\n if instance._isActive()\n instance._next()\n else\n instance._parent?._next()","import '../install.coffee'\nimport '../dom.coffee'\nimport '../event.coffee'\nimport '../factory.coffee'\nimport '../behaviors/focus.coffee'\nimport '../behaviors/enter.coffee'\n\n\n\nluda class extends luda.Factory\n\n @_SCOPE: 'fmDropdown'\n\n @_SELECTOR: '.fm-dropdown'\n @_VALUE_SPLITOR: ' '\n @_LABEL_ATTRIBUTE: 'data-fm-dropdown-label'\n @_VALUE_SELECTOR: '.dropdown-items .btn-radio input,\n .dropdown-items .btn-check input'\n @_DEFAULT_VALUE_SELECTOR: '.dropdown-items .btn-radio label,\n .dropdown-items .btn-check label'\n @_VALUE_HOLDER_SELECTOR: '.fm input'\n @_ENTER_BEHAVIOR_SELECTOR: '.fm-dropdown .fm input'\n\n @_observerConfig:\n childList: true\n attributes: true\n subtree: true\n attributeFilter: [\n 'checked'\n @_LABEL_ATTRIBUTE\n ]\n\n _getConfig: ->\n _$values = luda.$children @constructor._VALUE_SELECTOR, @_$component\n _$defaultValues = luda.$children \\\n @constructor._DEFAULT_VALUE_SELECTOR, @_$component\n _$valueHolder = luda.$child \\\n @constructor._VALUE_HOLDER_SELECTOR, @_$component\n {_$values, _$valueHolder, _$defaultValues}\n\n _constructor: ->\n {\n @_$values,\n @_$valueHolder,\n @_$defaultValues\n } = @_getConfig()\n @_setValueHolderAttribute()\n @_setValueHolderValue()\n\n _onMutations: ->\n @_constructor()\n\n _setValueHolderValue: ->\n values = []\n @_$values.forEach ($value, index) =>\n if $value.checked\n if $value.hasAttribute @constructor._LABEL_ATTRIBUTE\n value = $value.getAttribute @constructor._LABEL_ATTRIBUTE\n else\n value = @_$defaultValues[index].innerText\n values.push value if value and not values.includes value\n if @_$valueHolder\n @_$valueHolder.value = values.join @constructor._VALUE_SPLITOR\n\n _setValueHolderAttribute: ->\n @_$valueHolder.setAttribute('readonly', '') if @_$valueHolder\n\n @_init: ->\n self = this\n luda.enter._add @_ENTER_BEHAVIOR_SELECTOR\n luda.on 'change', \"#{@_SELECTOR} #{@_VALUE_SELECTOR}\", (e) ->\n self.query(luda.$parent self._SELECTOR, this)._setValueHolderValue()\n luda.on luda._FORM_RESET, @_SELECTOR, (e) ->\n setTimeout => self.query(this)._setValueHolderValue()\n # prevent ios device pop out wired navigation pannel\n if /iphone/i.test(navigator.userAgent) or /ipad/i.test(navigator.userAgent)\n luda.on 'focusin', @_ENTER_BEHAVIOR_SELECTOR, (e) ->\n this.blur()\n this.classList.add luda.focus._CSS_CLASS","import '../install.coffee'\nimport '../dom.coffee'\nimport '../event.coffee'\nimport '../factory.coffee'\n\n\n\nluda class extends luda.Factory\n\n @_SCOPE: 'tab'\n\n @_SELECTOR: '.tab'\n @_PANE_SELECTOR: '.tab-pane'\n @_INDICATOR_SELECTOR: '.tab-indicators .btn-radio input[type=radio]'\n @_PANE_ACTIVE_CSS_CLASS: 'tab-pane-active'\n @_ACTIVE_INDEX: 0\n\n @_observerConfig:\n childList: true\n subtree: true\n \n # public\n activate: (index) ->\n if @_$panes.length and not @_isTransitioning()\n activatedIndex = @_activeIndex\n if index? \\\n and index isnt @_activeIndex \\\n and 0 <= index <= @_$panes.length - 1\n return unless @_canTransition index, activatedIndex\n @_activeIndex = index\n @_activate activatedIndex\n\n\n # private\n _getConfig: ->\n _$panes = luda.$unnested \\\n @constructor._PANE_SELECTOR, @_$component, @constructor._SELECTOR\n _$indicators = luda.$unnested \\\n @constructor._INDICATOR_SELECTOR, @_$component, @constructor._SELECTOR\n _activeIndex = @constructor._ACTIVE_INDEX\n _$indicators.some ($indicator, index) ->\n if $indicator.checked\n _activeIndex = index\n true\n {_$panes, _$indicators, _activeIndex}\n\n _constructor: ->\n {\n @_$panes,\n @_$indicators,\n @_activeIndex\n } = @_getConfig()\n @_layout()\n @_handleTransitionCancel()\n\n _onMutations: (mutations) ->\n {\n @_$panes,\n @_$indicators,\n @_activeIndex\n } = @_getConfig()\n @_setIndicatorsState()\n\n _layout: ->\n @_$panes.forEach ($pane, index) =>\n $pane.style.transition = 'none'\n if index is @_activeIndex\n $pane.classList.add @constructor._PANE_ACTIVE_CSS_CLASS\n else\n $pane.classList.remove @constructor._PANE_ACTIVE_CSS_CLASS\n luda.reflow $pane\n $pane.style.transition = ''\n @_setIndicatorsState()\n\n _activate: (activatedIndex) ->\n $pane = @_$panes[@_activeIndex]\n $activatedPane = @_$panes[activatedIndex]\n $pane.classList.add @constructor._PANE_ACTIVE_CSS_CLASS\n $activatedPane.classList.remove @constructor._PANE_ACTIVE_CSS_CLASS\n @_handleTransitionEnd @_activeIndex, activatedIndex\n @_setIndicatorsState()\n\n _canTransition: (activeIndex, activatedIndex) ->\n not @_activatePrevented(@_$panes[activeIndex], activeIndex) \\\n and not @_deactivatePrevented(@_$panes[activatedIndex], activatedIndex)\n\n _handleTransitionEnd: (activeIndex, activatedIndex) ->\n activateDuration = \\\n @_handleActivateEnd @_$panes[activeIndex], activeIndex\n deactivateDuration = \\\n @_handleDeactivateEnd @_$panes[activatedIndex], activatedIndex\n\n _handleTransitionCancel: ->\n if @_isActivating()\n index = parseInt @_getActivatingMark(), 10\n @_handleActivateCancel @_$panes[index], index\n if @_isDeactivating()\n activatedIndex = parseInt @_getDeactivatingMark(), 10\n @_handleDeactivateCancel @_$panes[activatedIndex], activatedIndex\n\n _setIndicatorsState: ->\n @_$indicators.forEach ($indicator, index) =>\n if index is @_activeIndex\n $indicator.setAttribute 'checked', ''\n $indicator.checked = true\n else\n $indicator.removeAttribute 'checked'\n $indicator.checked = false\n\n @activate: ($tab, index) -> @query($tab).activate index\n\n # static private\n @_init: ->\n self = this\n luda.on 'change', @_INDICATOR_SELECTOR, (e) ->\n if this.checked\n instance = self.query luda.$parent self._SELECTOR, this\n instance._setIndicatorsState()\n instance.activate instance._$indicators.indexOf this"],"names":[],"mappings":";;;;;;;;;;;EAAA,IAAA;;EAAA,GAAA,GAAM,CAAC;IACL,IAAG,OAAO,QAAP,KAAqB,WAAxB;MACE,IAAiB,OAAO,MAAP,KAAmB,WAApC;EAAA,aAAO,OAAP;;MACA,IAAiB,OAAO,MAAP,KAAmB,WAApC;EAAA,aAAO,OAAP;OAFF;;IAGA,MAAM,IAAI,KAAJ,CAAU,kCAAV;EAJD,CAAD;;EASN,IAAO,OAAO,GAAG,CAAC,IAAX,KAAmB,UAA1B;IACE,GAAG,CAAC,IAAJ,GAAW,SAAC,SAAD;EACT,QAAA,SAAA,EAAA,IAAA,EAAA;MAAA,IAAA,CAAuD,SAAvD;Q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og
4
4
  * MIT license | http://opensource.org/licenses/MIT
5
5
  */
6
- (function(global,factory){typeof exports==="object"&&typeof module!=="undefined"?factory():typeof define==="function"&&define.amd?define(factory):factory()})(this,function(){"use strict";var ENV;ENV=function(){if(typeof document!=="undefined"){if(typeof window!=="undefined"){return window}if(typeof global!=="undefined"){return global}}throw new Error("Unsupported runtime environment.")}();if(typeof ENV.luda!=="function"){ENV.luda=function(installer){var installed,name,property;if(!installer){throw new Error("Installer cannot be detected.")}if(!["object","function"].includes(typeof installer)){throw new Error("Installer must be object, array or function.")}if(installer.hasOwnProperty("_SCOPE")){if(typeof installer._SCOPE!=="string"){throw new Error("_SCOPE must be string")}return ENV.luda._install(installer._SCOPE,installer)}if(installer instanceof Array||typeof installer==="function"){throw new Error("Unscoped installer must be object.")}installed={};for(name in installer){property=installer[name];installed[name]=ENV.luda._install(name,property)}return installed};ENV.luda._install=function(namespace,installer){var installedInstaller,installedName,ref;if(ENV.luda[namespace]){console.warn(`Namespace ${namespace} is ocupied, sikp installation.`);return ENV.luda[namespace]}ref=ENV.luda;for(installedName in ref){installedInstaller=ref[installedName];if(installer===installedInstaller){console.warn(`Installer is installed with name ${installedName}, skip installation.`);return ENV.luda[installedName]}}if(installer._install){if(typeof installer._install==="function"){return ENV.luda[namespace]=installer._install()}return ENV.luda[namespace]=installer._install}return ENV.luda[namespace]=installer}}luda({KEY_LEFT:37,KEY_UP:38,KEY_RIGHT:39,KEY_DOWN:40,KEY_TAB:9,KEY_ESC:27,KEY_ENTER:13});luda({$child:function(selector,$ancestor){if(!$ancestor){$ancestor=document}return $ancestor.querySelector(selector)},$children:function(selector,$ancestor){var $descendant,descendants;if(!$ancestor){$ancestor=document}$descendant=this.$child(selector,$ancestor);if($descendant){return descendants=Array.from($ancestor.querySelectorAll(selector))}else{return descendants=[]}},$unnested:function(selector,$ancestor,ancestorSelector){var descendants;descendants=this.$children(selector,$ancestor);return descendants.filter($descendant=>{if(this.$parent(ancestorSelector,$descendant)===$ancestor){return $descendant}})},$parent:function(selector,$descendant){var $ancestor;$ancestor=$descendant.parentNode;if($ancestor){if($ancestor.matches&&$ancestor.matches(selector)){return $ancestor}else{return this.$parent(selector,$ancestor)}}},$parents:function(selector,$descendant,_ancestors){var $ancestor;$ancestor=this.$parent(selector,$descendant);if(!_ancestors){_ancestors=[]}if($ancestor){_ancestors.push($ancestor);return this.$parents(selector,$ancestor,_ancestors)}else{return _ancestors}},$after:function($node,$target){var $parent;$parent=$target.parentNode;if($parent.lastChild===$target){return $parent.appendChild($node)}else{return $parent.insertBefore($node,$target.nextSibling)}},$prepend:function($node,$target){if($target.firstChild){return $target.insertBefore($node,$target.firstChild)}else{return $target.appendChild($node)}},reflow:function($element){return $element.offsetHeight},_getTransitionDurations:function(style,propertyLength){var durationArray;durationArray=style.split(",");while(durationArray.length<propertyLength){durationArray=durationArray.concat(durationArray)}if(durationArray.length>propertyLength){durationArray=durationArray.slice(0,propertyLength)}return durationArray.map(function(durationStr){var duration;duration=parseFloat(durationStr);if(!duration){return 0}if(durationStr.match("ms")){return duration}else{return duration*1e3}})},getTransitionDuration:function($element){var delays,durations,finalDurations,length,styles;styles=window.getComputedStyle($element);length=styles.transitionProperty.split(",").length;if(!length){return 0}delays=this._getTransitionDurations(styles.transitionDelay,length);durations=this._getTransitionDurations(styles.transitionDuration,length);finalDurations=durations.map(function(duration,index){return duration+delays[index]});return Math.max.apply(null,finalDurations)},_observeDom:function(onNodeAdded,onNodeRemoved){var observer,observerConfig;observerConfig={childList:true,subtree:true};observer=new MutationObserver(function(mutations){return mutations.forEach(function(mutation){var $addedNodes,$removedNodes;$removedNodes=Array.from(mutation.removedNodes);$addedNodes=Array.from(mutation.addedNodes);$removedNodes.forEach(function($node){if($node instanceof Element&&onNodeRemoved){return onNodeRemoved($node)}});return $addedNodes.forEach(function($node){if($node instanceof Element&&onNodeAdded){return onNodeAdded($node)}})})});observer.observe(document.documentElement,observerConfig);return observer}});var splice=[].splice;luda({_SWIPE_DISTANCE:10,_EVENT_TYPE_PREFIX:"luda",_SWIPE_LEFT:"swipeleft",_SWIPE_RIGHT:"swiperight",_SWIPE_UP:"swipeup",_SWIPE_DOWN:"swipedown",_SWIPE_LEFT_OR_UP:"swipeleft or swipeup",_SWIPE_RIGHT_OR_DOWN:"swiperight or swipedown",_DOC_READY:"docready",_FORM_RESET:"reset",eventPath:function(event){var path;if(event.composedPath){return path=event.composedPath()}else if(event.path){return path=event.path}else{return path=[event.target].concat(luda.$parents("*",event.target))}},on:function(event,...selector){var handler,ref;ref=selector,[...selector]=ref,[handler]=splice.call(selector,-1);switch(event){case this._DOC_READY:return this._onDocReady(handler);case this._FORM_RESET:return this._onReset(selector[0],handler);case this._SWIPE_LEFT:case this._SWIPE_RIGHT:case this._SWIPE_UP:case this._SWIPE_DOWN:case this._SWIPE_LEFT_OR_UP:case this._SWIPE_RIGHT_OR_DOWN:return this._onSwipe(event,selector[0],handler);default:return this._on(event,selector[0],handler)}},onOpposite:function(event,selector,handler){var _self;_self=this;return document.addEventListener(event,function(e){var trigger;trigger=_self.eventPath(e).every(function($element){return!$element.matches||!$element.matches(selector)});if(trigger){return handler(e)}})},dispatch:function($target,type,detail,delayMilliseconds,options={}){var evt;if(typeof options.bubbles!=="boolean"){options.bubbles=true}if(typeof options.cancelable!=="boolean"){options.cancelable=true}if(typeof options.composed!=="boolean"){options.composed=true}evt=new Event(`${this._EVENT_TYPE_PREFIX}:${type}`,options);evt.detail=detail;if(typeof delayMilliseconds==="number"){return setTimeout(function(){if($target){return $target.dispatchEvent(evt)}},delayMilliseconds)}else{$target.dispatchEvent(evt);return evt}},_onDocReady:function(handler){if(document.readyState==="loading"){return document.addEventListener("DOMContentLoaded",handler)}else{return handler()}},_onReset:function(selector,handler){return document.addEventListener("reset",function(e){if(selector!=null){return luda.$children(selector,e.target).forEach(function($element){return handler.bind($element)(e)})}else{return handler(e)}})},_onSwipe:function(event,selector,handler){var $touchStartElement,_self,touchStartE,touchStartX,touchStartY,watch;_self=this;watch=false;$touchStartElement=document;touchStartE=null;touchStartX=0;touchStartY=0;document.addEventListener("touchstart",function(e){if(e.touches.length===1){touchStartX=e.touches[0].screenX;touchStartY=e.touches[0].screenY;if(selector!=null){return _self.eventPath(e).some(function($element){if($element.matches&&$element.matches(selector)){$touchStartElement=$element;touchStartE=e;watch=true;return true}})}else{return watch=true}}});return document.addEventListener("touchmove",function(e){var eventX,eventXOrY,eventY,touchDistanceX,touchDistanceY;if(watch&&e.touches.length===1){touchDistanceX=e.touches[0].screenX-touchStartX;touchDistanceY=e.touches[0].screenY-touchStartY;eventX=void 0;eventY=void 0;eventXOrY=void 0;if(Math.abs(touchDistanceX)>=_self._SWIPE_DISTANCE){if(touchDistanceX>0){eventX=_self._SWIPE_RIGHT}else{eventX=_self._SWIPE_LEFT}}if(Math.abs(touchDistanceY)>=_self._SWIPE_DISTANCE){if(touchDistanceY>0){eventY=_self._SWIPE_DOWN}else{eventY=_self._SWIPE_UP}}if(eventX===_self._SWIPE_LEFT||eventY===_self._SWIPE_UP){eventXOrY=_self._SWIPE_LEFT_OR_UP}if(eventX===_self._SWIPE_RIGHT||eventY===_self._SWIPE_DOWN){eventXOrY=_self._SWIPE_RIGHT_OR_DOWN}if(eventX!=null&&eventX===event||eventY!=null&&eventY===event||eventXOrY===event){if(selector!=null){return _self.eventPath(e).some(function($element){if($element===$touchStartElement){watch=false;handler.bind($element)(touchStartE,e);return true}})}else{watch=false;return handler(touchStartE,e)}}}})},_on:function(event,selector,handler){var _self;if(selector===window){return window.addEventListener(event,function(e){return handler(e)})}else{_self=this;return document.addEventListener(event,function(e){if(selector!=null){return _self.eventPath(e).some(function($element){if($element.matches&&$element.matches(selector)){handler.bind($element)(e);return true}})}else{return handler(e)}})}}});luda({except:function(element,arr){if(arr.includes(element)){return arr.splice(arr.indexOf(element),1)}}});var Static;luda(Static=function(){class Static{static _ACTIVATE_EVENT_TYPE(){return`${this._SCOPE}:activate`}static _ACTIVATED_EVENT_TYPE(){return`${this._SCOPE}:activated`}static _DEACTIVATE_EVENT_TYPE(){return`${this._SCOPE}:deactivate`}static _DEACTIVATED_EVENT_TYPE(){return`${this._SCOPE}:deactivated`}static _ACTIVATING_MARK_ATTRIBUTE(){return`data-${this._SCOPE}-activating`}static _DEACTIVATING_MARK_ATTRIBUTE(){return`data-${this._SCOPE}-deactivating`}static _add(selector){if(typeof selector!=="string"){throw new Error(this._SELECTOR_INVALID_ERROR)}if(!this._SELECTORS.includes(selector)){this._SELECTORS.push(selector)}return this._mergeSelectors()}static _remove(selector){if(typeof selector!=="string"){throw new Error(this._SELECTOR_INVALID_ERROR)}luda.except(selector,this._SELECTORS);return this._mergeSelectors()}static _mergeSelectors(){return this._selector=this._SELECTORS.join(",")}static _activatePrevented($ele,detail){var activateEvent;activateEvent=luda.dispatch($ele,this._ACTIVATE_EVENT_TYPE(),detail);return activateEvent.defaultPrevented}static _deactivatePrevented($ele,detail){var deactivateEvent;deactivateEvent=luda.dispatch($ele,this._DEACTIVATE_EVENT_TYPE(),detail);return deactivateEvent.defaultPrevented}static _handleActivateEnd($ele,detail){var activateDuration;this._setActivatingMark($ele,detail);activateDuration=luda.getTransitionDuration($ele);luda.dispatch($ele,this._ACTIVATED_EVENT_TYPE(),detail,activateDuration);setTimeout(()=>{if($ele){return this._removeActivatingMark($ele)}},activateDuration);return activateDuration}static _handleDeactivateEnd($ele,detail){var deactivateDuration;this._setDeactivatingMark($ele,detail);deactivateDuration=luda.getTransitionDuration($ele);luda.dispatch($ele,this._DEACTIVATED_EVENT_TYPE(),detail,deactivateDuration);setTimeout(()=>{if($ele){return this._removeDeactivatingMark($ele)}},deactivateDuration);return deactivateDuration}static _handleActivateCancel($ele,detail){if(this._isActivating($ele)){luda.dispatch($ele,this._ACTIVATED_EVENT_TYPE(),detail);return this._removeActivatingMark($ele)}}static _handleDeactivateCancel($ele,detail){if(this._isDeactivating($ele)){luda.dispatch($ele,this._DEACTIVATED_EVENT_TYPE(),detail);return this._removeDeactivatingMark($ele)}}static _isActivating($ele){return $ele.hasAttribute(this._ACTIVATING_MARK_ATTRIBUTE())}static _isDeactivating($ele){return $ele.hasAttribute(this._DEACTIVATING_MARK_ATTRIBUTE())}static _isTransitioning($ele){return this._isActivating($ele)||this._isDeactivating($ele)}static _getActivatingMark($ele){return $ele.getAttribute(this._ACTIVATING_MARK_ATTRIBUTE())}static _getDeactivatingMark($ele){return $ele.getAttribute(this._DEACTIVATING_MARK_ATTRIBUTE())}static _removeActivatingMark($ele){return $ele.removeAttribute(this._ACTIVATING_MARK_ATTRIBUTE())}static _removeDeactivatingMark($ele){return $ele.removeAttribute(this._DEACTIVATING_MARK_ATTRIBUTE())}static _setActivatingMark($ele,value){return $ele.setAttribute(this._ACTIVATING_MARK_ATTRIBUTE(),value)}static _setDeactivatingMark($ele,value){return $ele.setAttribute(this._DEACTIVATING_MARK_ATTRIBUTE(),value)}static _onEleAdded($ele){return Static._onEleAddedOrRemoved($ele,"_onElementAdded")}static _onEleRemoved($ele){return Static._onEleAddedOrRemoved($ele,"_onElementRemoved")}static _onEleAddedOrRemoved($ele,action){return Static._Observed.forEach(function(Observed){var $matched;if(!Observed[action]){return}$matched=luda.$children(Observed._selector,$ele);if($ele.matches(Observed._selector)){$matched.unshift($ele)}return $matched.forEach(function($target){return Observed[action]($target)})})}static _observe(classObj){if(!Static._observer){Static._observer=luda._observeDom(Static._onEleAdded,Static._onEleRemoved)}if(classObj._onElementAdded||classObj._onElementRemoved&&classObj._selector){if(!Static._Observed.includes(classObj)){return Static._Observed.push(classObj)}}}static _install(){var exposed,self;self=this;if(this===Static){return this}if(!this.hasOwnProperty("_SELECTORS")){this._SELECTORS=[]}this._mergeSelectors();if(typeof this._init==="function"){exposed=this._init()}luda.on(luda._DOC_READY,function(){return Static._observe(self)});if(exposed){return exposed}else{return this}}}Static._SCOPE="Static";Static._SELECTOR_INVALID_ERROR="@param selector must be a css selector string";Static._SELECTORS=[];Static._Observed=[];Static._observer=null;Static._selector="";return Static}.call(this));luda(function(){var _Class;_Class=class extends luda.Static{static _init(){var self;self=this;return luda.on("keydown",function(e){if(!document.documentElement.hasAttribute(self._DISABLED_ATTRIBUTE)&&e.keyCode===luda.KEY_ENTER&&e.target.matches(self._selector)){e.preventDefault();return setTimeout(function(){return e.target.click()})}})}};_Class._SCOPE="enter";_Class._SELECTORS=["input[type=checkbox]","input[type=radio]","[tabindex]"];_Class._DISABLED_ATTRIBUTE="data-enter-disabled";return _Class}.call(this));luda(function(){var _Class;_Class=class extends luda.Static{static _isActive(){return!document.documentElement.hasAttribute(this._DISABLED_ATTRIBUTE)}static _removeFocusClassExcept($exception){return Array.from(this._$focus).forEach($focus=>{if($focus!==$exception){return $focus.classList.remove(this._CSS_CLASS)}})}static _addFocusClassExceptHtmlAndBody($target){if($target!==document.body&&$target!==document.documentElement){return $target.classList.add(this._CSS_CLASS)}}static _changeFocusStateOnKeyEvent(e){if(this._isActive()){this._removeFocusClassExcept(e.target);return this._addFocusClassExceptHtmlAndBody(e.target)}}static _changeFocusStateOnMouseDownEvent(e){var target;if(this._isActive()){if(e.target.matches(this._PARENT_FOCUS_CHILDREN_SELECTOR)){target=luda.$parent(this._PARENT_FOCUS_SELECTOR,e.target)}else{target=e.target}if(target.matches(this._selector)){this._removeFocusClassExcept(target);return this._addFocusClassExceptHtmlAndBody(target)}else{return this._removeFocusClassExcept()}}}static _setElementPrototype(){var blur,focus,self;focus=HTMLElement.prototype.focus;blur=HTMLElement.prototype.blur;self=this;HTMLElement.prototype.focus=function(){focus.apply(this,arguments);if(self._isActive()&&document.activeElement===this){self._removeFocusClassExcept(this);return self._addFocusClassExceptHtmlAndBody(this)}};return HTMLElement.prototype.blur=function(){blur.apply(this,arguments);if(self._isActive()){return this.classList.remove(self._CSS_CLASS)}}}static _init(){this._setElementPrototype();luda.on("keydown",this._changeFocusStateOnKeyEvent.bind(this));luda.on("keyup",this._changeFocusStateOnKeyEvent.bind(this));luda.on("mousedown",this._changeFocusStateOnMouseDownEvent.bind(this));luda.on("touchstart",this._TOUCHSTART_FOCUS_SELECTOR,this._changeFocusStateOnMouseDownEvent.bind(this));return luda.on("focusin",this._changeFocusStateOnMouseDownEvent.bind(this))}};_Class._SCOPE="focus";_Class._CSS_CLASS="focus";_Class._SELECTORS=["select","textarea",":not(.btn-check):not(.btn-radio):not(.btn-file) > input:not([type=button]):not([type=submit]):not([type=reset])"];_Class._TOUCHSTART_FOCUS_SELECTOR="input[type=range]";_Class._PARENT_FOCUS_SELECTOR="select[multiple]";_Class._PARENT_FOCUS_CHILDREN_SELECTOR=`${_Class._PARENT_FOCUS_SELECTOR} *`;_Class._DISABLED_ATTRIBUTE="data-focus-disabled";_Class._$focus=document.getElementsByClassName(_Class._CSS_CLASS);return _Class}.call(this));luda(function(){var _Class;_Class=class extends luda.Static{static _querySameName$radios($radio){var $inputs,selector;if($radio.name){selector=`${this._selector}[name=${$radio.name}]`}else{selector=this._selector}$inputs=luda.$children(selector);return $inputs.filter(function($input){return $input.tabIndex>=0})}static _query$prev$next($radio){var $next,$prev,$sameNameRadios,radioIndex;$sameNameRadios=this._querySameName$radios($radio);radioIndex=$sameNameRadios.indexOf($radio);$prev=$sameNameRadios[radioIndex-1];$next=$sameNameRadios[radioIndex+1];return{$prev:$prev,$next:$next}}static _init(){var self;self=this;return luda.on("keydown",function(e){var $next,$prev;if(!document.documentElement.hasAttribute(self._DISABLED_ATTRIBUTE)&&e.keyCode===luda.KEY_TAB&&e.target.nodeName.toUpperCase()==="INPUT"&&e.target.type==="radio"){if(e.shiftKey){if($prev=self._query$prev$next(e.target).$prev){e.preventDefault();return $prev.focus()}}else{if($next=self._query$prev$next(e.target).$next){e.preventDefault();return $next.focus()}}}})}};_Class._SCOPE="tabulate";_Class._SELECTORS=["input[type=radio]:not([disabled])"];_Class._DISABLED_ATTRIBUTE="data-tabulate-disabled";return _Class}.call(this));var Factory;luda(Factory=function(){class Factory{static _ACTIVATE_EVENT_TYPE(){return`${this._SCOPE}:activate`}static _ACTIVATED_EVENT_TYPE(){return`${this._SCOPE}:activated`}static _DEACTIVATE_EVENT_TYPE(){return`${this._SCOPE}:deactivate`}static _DEACTIVATED_EVENT_TYPE(){return`${this._SCOPE}:deactivated`}static _ACTIVATING_MARK_ATTRIBUTE(){return`data-${this._SCOPE}-activating`}static _DEACTIVATING_MARK_ATTRIBUTE(){return`data-${this._SCOPE}-deactivating`}_hasDescendant(descendant){if(this._children.length&&descendant){if(this._children.includes(descendant)){return true}return this._children.some(function(child){return child._hasDescendant(descendant)})}else{return false}}_observe(){this._observer=new MutationObserver(this._onMutations.bind(this));return this._observer.observe(this._$component,this.constructor._observerConfig)}_disconnect(){this._observer.disconnect();return this._observer=null}_activatePrevented($ele,detail){var activateEvent;activateEvent=luda.dispatch($ele,this.constructor._ACTIVATE_EVENT_TYPE(),detail);return activateEvent.defaultPrevented}_deactivatePrevented($ele,detail){var deactivateEvent;deactivateEvent=luda.dispatch($ele,this.constructor._DEACTIVATE_EVENT_TYPE(),detail);return deactivateEvent.defaultPrevented}_handleActivateEnd($ele,detail){var activateDuration;this._setActivatingMark(detail);activateDuration=luda.getTransitionDuration($ele);luda.dispatch($ele,this.constructor._ACTIVATED_EVENT_TYPE(),detail,activateDuration);setTimeout(()=>{if(this._$component){return this._removeActivatingMark()}},activateDuration);return activateDuration}_handleDeactivateEnd($ele,detail){var deactivateDuration;this._setDeactivatingMark(detail);deactivateDuration=luda.getTransitionDuration($ele);luda.dispatch($ele,this.constructor._DEACTIVATED_EVENT_TYPE(),detail,deactivateDuration);setTimeout(()=>{if(this._$component){return this._removeDeactivatingMark()}},deactivateDuration);return deactivateDuration}_handleActivateCancel($ele,detail){if(this._isActivating()){luda.dispatch($ele,this.constructor._ACTIVATED_EVENT_TYPE(),detail);return this._removeActivatingMark()}}_handleDeactivateCancel($ele,detail){if(this._isDeactivating()){luda.dispatch($ele,this.constructor._DEACTIVATED_EVENT_TYPE(),detail);return this._removeDeactivatingMark()}}_isActivating(){return this._$component.hasAttribute(this.constructor._ACTIVATING_MARK_ATTRIBUTE())}_isDeactivating(){return this._$component.hasAttribute(this.constructor._DEACTIVATING_MARK_ATTRIBUTE())}_isTransitioning(){return this._isActivating()||this._isDeactivating()}_getActivatingMark(){return this._$component.getAttribute(this.constructor._ACTIVATING_MARK_ATTRIBUTE())}_getDeactivatingMark(){return this._$component.getAttribute(this.constructor._DEACTIVATING_MARK_ATTRIBUTE())}_removeActivatingMark(){return this._$component.removeAttribute(this.constructor._ACTIVATING_MARK_ATTRIBUTE())}_removeDeactivatingMark(){return this._$component.removeAttribute(this.constructor._DEACTIVATING_MARK_ATTRIBUTE())}_setActivatingMark(value){return this._$component.setAttribute(this.constructor._ACTIVATING_MARK_ATTRIBUTE(),value)}_setDeactivatingMark(value){return this._$component.setAttribute(this.constructor._DEACTIVATING_MARK_ATTRIBUTE(),value)}static create($component){var $family,componentIsElementInstance,instance,parent;componentIsElementInstance=$component instanceof Element;if(!componentIsElementInstance){throw new Error(this._$COMPONENT_INVALID_ERROR)}$family=this._query$family($component);instance=this.query($component);if($family._$parent){if(parent=this.query($family._$parent)){if(!instance){this._instances.push(instance=this._createInstance($component))}if(instance._parent!==parent){parent._children.push(instance)&&(instance._parent=parent)}$family._$children.forEach($child=>{return this.create($child)});return instance}else{this.create($family._$parent);return this.query($component)}}else{if(!instance){this._instances.push(instance=this._createInstance($component))}$family._$children.forEach($child=>{return this.create($child)});return instance}}static destroy(instance$component){var attribute,instance,results,value;instance=this.query(instance$component);if(instance){if(instance._observer){instance._disconnect()}if(instance._destroy){instance._destroy()}while(instance._children.length){this.destroy(instance._children[0])}if(instance._parent){luda.except(instance,instance._parent._children)}luda.except(instance,this._instances);results=[];for(attribute in instance){value=instance[attribute];results.push(instance[attribute]=null)}return results}}static query(instance$component){var instance;instance=null;if(instance$component instanceof this&&this._instances.includes(instance$component)){instance=instance$component}else if(instance$component instanceof Element){this._instances.some(function(inited){if(inited._$component===instance$component){instance=inited;return true}})}return instance}static _query$family($component){var _$children,_$parent;_$parent=null;_$children=[];if(this._SELECTOR){_$parent=luda.$parent(this._SELECTOR,$component);_$children=luda.$unnested(this._SELECTOR,$component,this._SELECTOR)}return{_$parent:_$parent,_$children:_$children}}static _createInstance($component){var instance;instance=new this;instance._$component=$component;instance._parent=null;instance._children=[];instance._observer=null;if(instance._constructor){instance._constructor()}if(!(instance._observer&&instance._onMutations&&this._observerConfig)){instance._observe()}return instance}static _onEleAdded($ele){return Factory._onEleAddedOrRemoved($ele,"create")}static _onEleRemoved($ele){return Factory._onEleAddedOrRemoved($ele,"destroy")}static _onEleAddedOrRemoved($ele,action){return Factory._Observed.forEach(function(Observed){if($ele.matches(Observed._SELECTOR)){return Observed[action]($ele)}return luda.$children(Observed._SELECTOR,$ele).forEach(function($child){return Observed[action]($child)})})}static _observe(classObj){if(!Factory._observer){Factory._observer=luda._observeDom(Factory._onEleAdded,Factory._onEleRemoved)}if(!Factory._Observed.includes(classObj)){return Factory._Observed.push(classObj)}}static _install(){var exposed,self;self=this;if(this===Factory){return this}if(!(this._SELECTOR||typeof this._SELECTOR!=="string")){throw new Error(this._COMPONENT_NO_SELECTOR_ERROR)}if(!this.hasOwnProperty("_instances")){this._instances=[]}if(typeof this._init==="function"){exposed=this._init()}luda.on(luda._DOC_READY,function(){luda.$children(self._SELECTOR).forEach(function($component){return self.create($component)});return Factory._observe(self)});if(exposed){return exposed}else{return this}}}Factory._SCOPE="Factory";Factory._COMPONENT_NO_SELECTOR_ERROR="Extended component must has a css selector";Factory._$COMPONENT_INVALID_ERROR="@param $component must be an instance of Element";Factory._SELECTOR="";Factory._instances=[];Factory._Observed=[];Factory._observer=null;Factory._observerConfig={childList:true,subtree:true};return Factory}.call(this));luda(function(){var _Class;_Class=class extends luda.Factory{_getConfig(){var _isReadonly,_originalTabIndex,readonly;readonly=this._$component.getAttribute(this.constructor._READONLY_ATTRIBUTE);_isReadonly=readonly!==this.constructor._READONLY_FALSE_VALUE;_originalTabIndex=this._$component.tabIndex;return{_isReadonly:_isReadonly,_originalTabIndex:_originalTabIndex}}_constructor(){({_isReadonly:this._isReadonly,_originalTabIndex:this._originalTabIndex}=this._getConfig());return this._setTabIndex()}_onMutations(){return this._constructor()}_setTabIndex(){if(this._isReadonly){return this._$component.tabIndex=-1}else{return this._$component.tabIndex=this._originalTabIndex}}};_Class._SCOPE="readonly";_Class._READONLY_ATTRIBUTE="data-readonly";_Class._READONLY_FALSE_VALUE="false";_Class._SELECTOR=`[${_Class._READONLY_ATTRIBUTE}]`;_Class._observerConfig={attributes:true,attributeFilter:[_Class._READONLY_ATTRIBUTE]};return _Class}.call(this));luda(function(){var _Class;_Class=class extends luda.Static{static activate(name$target){return this._query$targets(name$target).forEach($target=>{if($target.classList.contains(this._ACTIVE_CSS_CLASS)){return}if(this._isTransitioning($target)){return}if(this._activatePrevented($target)){return}$target.classList.add(this._ACTIVE_CSS_CLASS);this._handleActivateEnd($target);if(this._shouldAutoDeactivate($target)){return this._delayDeactivate($target)}})}static deactivate(name$target){return this._query$targets(name$target).forEach($target=>{if(!$target.classList.contains(this._ACTIVE_CSS_CLASS)){return}if(this._isTransitioning($target)){return}if(this._deactivatePrevented($target)){return}$target.classList.remove(this._ACTIVE_CSS_CLASS);return this._handleDeactivateEnd($target)})}static toggle(name$target){return this._query$targets(name$target).forEach($target=>{if($target.classList.contains(this._ACTIVE_CSS_CLASS)){return this.deactivate($target)}else{return this.activate($target)}})}static _onElementAdded($ele){this._handleActivateCancel($ele);this._handleDeactivateCancel($ele);if(this._shouldAutoDeactivate($ele)){return this._delayDeactivate($ele)}}static _shouldAutoDeactivate($target){return $target.hasAttribute(this._AUTO_DEACTIVATE_ATTRIBUTE)}static _delayDeactivate($target){var delay;delay=parseInt($target.getAttribute(this._AUTO_DEACTIVATE_ATTRIBUTE),10);if(!delay){delay=this._AUTO_DEACTIVATE_DURATION}return setTimeout(()=>{if($target){return this.deactivate($target)}},delay)}static _query$targets(name$target){if(name$target instanceof Element){return[name$target]}else{return luda.$children(`[${this._TOGGLE_TARGET_ATTRIBUTE}=${name$target}]`)}}static _init(){var clickEventSelector,self;self=this;clickEventSelector=`[${this._TOGGLE_FOR_ATTRIBUTE}],[${this._TOGGLE_ATTRIBUTE}]`;luda.on(luda._DOC_READY,function(){return luda.$children(self._selector).forEach(function($target){if(self._shouldAutoDeactivate($target)){return self._delayDeactivate($target)}})});return luda.on("click",clickEventSelector,function(e){var toggleChecked;toggleChecked=false;return luda.eventPath(e).some(function($path){var $toggle,toggleName;if($path instanceof Element){if($path.hasAttribute(self._TOGGLE_ATTRIBUTE)||$path.hasAttribute(self._TOGGLE_FOR_ATTRIBUTE)){if(toggleName=$path.getAttribute(self._TOGGLE_FOR_ATTRIBUTE)){self.toggle(toggleName);toggleChecked=true}if($path.hasAttribute(self._TOGGLE_ATTRIBUTE)){if($path.hasAttribute(self._TOGGLE_TARGET_ATTRIBUTE)){$toggle=$path}else{$toggle=luda.$parent(`[${self._TOGGLE_TARGET_ATTRIBUTE}]`,$path)}if($toggle){self.toggle($toggle);return toggleChecked=true}}}else if($path.hasAttribute(self._TOGGLE_DISABLED_ATTRIBUTE)){return toggleChecked=true}}})})}};_Class._SCOPE="toggle";_Class._TOGGLE_TARGET_ATTRIBUTE="data-toggle-target";_Class._TOGGLE_ATTRIBUTE="data-toggle";_Class._TOGGLE_FOR_ATTRIBUTE="data-toggle-for";_Class._TOGGLE_DISABLED_ATTRIBUTE="data-toggle-disabled";_Class._AUTO_DEACTIVATE_ATTRIBUTE="data-toggle-auto-deactivate";_Class._AUTO_DEACTIVATE_DURATION=3e3;_Class._ACTIVE_CSS_CLASS="toggle-active";_Class._SELECTORS=[`[${_Class._TOGGLE_TARGET_ATTRIBUTE}]`];return _Class}.call(this));luda(function(){var _Class;_Class=class extends luda.Factory{reset(){this._$file.value="";return this._$simulator.value=""}_getConfig(){var _$file,_$simulator;_$file=luda.$child(this.constructor._FILE_SELECTOR,this._$component);_$simulator=luda.$child(this.constructor._SIMULATOR_SELECTOR,this._$component);return{_$file:_$file,_$simulator:_$simulator}}_constructor(){({_$file:this._$file,_$simulator:this._$simulator}=this._getConfig());return this._init()}_onMutations(){return this._constructor()}_insertSimulator(){this._$simulator=document.createElement("input");this._$simulator.tabIndex=-1;return luda.$after(this._$simulator,this._$file)}_setPlaceholderValue(){return this._$simulator.placeholder=this._$file.getAttribute(this.constructor._PLACEHOLDER_ATTRIBUTE)}_setSimulatorValue(){var values;values=[];Array.from(this._$file.files).map(function(file){return values.push(file.name)});if(values.length){return this._$simulator.value=values.join(this.constructor._VALUE_SPLITOR)}else if(this._$file.hasAttribute(this.constructor._VALUE_ATTRIBUTE)){return this._$simulator.value=this._$file.getAttribute(this.constructor._VALUE_ATTRIBUTE)}}_init(){if(this._$file){if(!this._$simulator){this._insertSimulator()}if(this._$file.hasAttribute(this.constructor._PLACEHOLDER_ATTRIBUTE)){this._setPlaceholderValue()}return this._setSimulatorValue()}}static reset($file){return this.query($file).reset()}static _init(){var self;self=this;luda.on("change",`${this._SELECTOR} ${this._FILE_SELECTOR}`,function(e){return self.query(luda.$parent(self._SELECTOR,this))._setSimulatorValue()});return luda.on(luda._FORM_RESET,this._SELECTOR,function(e){return setTimeout(()=>{return self.query(this)._setSimulatorValue()})})}};_Class._SCOPE="fmFile";_Class._VALUE_SPLITOR=" ";_Class._SELECTOR=".fm-file";_Class._FILE_SELECTOR="input[type=file]";_Class._SIMULATOR_SELECTOR="input:not([type=file])";_Class._PLACEHOLDER_ATTRIBUTE="placeholder";_Class._VALUE_ATTRIBUTE="value";_Class._observerConfig={childList:true,subtree:true};return _Class}.call(this));luda(function(){var _Class;_Class=class extends luda.Factory{select(indexOrIndexArray){var selectedIndexes;if(this._$select.multiple){if(this._$multipleSelectPlaceholder){selectedIndexes=indexOrIndexArray}else{selectedIndexes=indexOrIndexArray.map(function(index){return index+1})}Array.from(this._$select.options).forEach(function($option,index){return $option.selected=selectedIndexes.includes(index)});return this._markSelectedOption()}else{this._$select.selectedIndex=indexOrIndexArray;this._setSingleSelectSimulatorValue();return this._markSelectedOption()}}_getConfig(){var _$defaultSelectedOptions,_$multipleSelectPlaceholder,_$select,_$singleSelectSimulator,_defaultSelectedOptionMarked;_$select=luda.$child(this.constructor._SELECT_SELECTOR,this._$component);_$singleSelectSimulator=luda.$child(this.constructor._SINGLE_SELECT_SIMULATOR_SELECTOR,this._$component);_$multipleSelectPlaceholder=luda.$child(`.${this.constructor._MULTIPLE_SELECT_PLACEHOLDER_CSS_CLASS}`,this._$component);_$defaultSelectedOptions=luda.$children(`[${this.constructor._DEFAULT_SELECTED_OPTION_ATTRIBUTE}]`,this._$component);_defaultSelectedOptionMarked=this._$component.hasAttribute(this.constructor._INITED_ATTRIBUTE);return{_$select:_$select,_$singleSelectSimulator:_$singleSelectSimulator,_$multipleSelectPlaceholder:_$multipleSelectPlaceholder,_$defaultSelectedOptions:_$defaultSelectedOptions,_defaultSelectedOptionMarked:_defaultSelectedOptionMarked}}_constructor(){({_$select:this._$select,_$singleSelectSimulator:this._$singleSelectSimulator,_$multipleSelectPlaceholder:this._$multipleSelectPlaceholder,_$defaultSelectedOptions:this._$defaultSelectedOptions,_defaultSelectedOptionMarked:this._defaultSelectedOptionMarked}=this._getConfig());if(this._$select){if(this._$select.multiple){return this._initMultipleSelect()}else{return this._initSingleSelect()}}}_onMutations(){return this._constructor()}_markSelectedOption(){if(this._observer){this._disconnect()}Array.from(this._$select.options).forEach(function($option){if($option.selected){return $option.setAttribute("selected","selected")}else{return $option.removeAttribute("selected")}});if(!this._observer){return this._observe()}}_markDefaultSelectedOption(){this._$component.setAttribute(this.constructor._INITED_ATTRIBUTE,"");return Array.from(this._$select.options).forEach($option=>{if($option.selected){return $option.setAttribute(this.constructor._DEFAULT_SELECTED_OPTION_ATTRIBUTE,"")}})}_setSingleSelectedDefaultSelectedOption(){var hasSelected;hasSelected=Array.from(this._$select.options).some(function($option){return $option.getAttribute("selected")==="selected"});if(!hasSelected){return this._$select.selectedIndex=-1}}_insertSingleSelectSimulator(){this._$singleSelectSimulator=document.createElement("input");this._$singleSelectSimulator.tabIndex=-1;return luda.$after(this._$singleSelectSimulator,this._$select)}_setSingleSelectPlaceholderValue(){return this._$singleSelectSimulator.placeholder=this._$select.getAttribute(this.constructor._PLACEHOLDER_ATTRIBUTE)}_setSingleSelectSimulatorValue(){var $selectedOption;if($selectedOption=this._$select.options[this._$select.selectedIndex]){return this._$singleSelectSimulator.value=$selectedOption.innerText}else{return this._$singleSelectSimulator.value=""}}_initSingleSelect(){if(!this._$singleSelectSimulator){this._insertSingleSelectSimulator()}if(this._$select.hasAttribute(this.constructor._PLACEHOLDER_ATTRIBUTE)){this._setSingleSelectedDefaultSelectedOption();this._setSingleSelectPlaceholderValue()}if(!this._defaultSelectedOptionMarked){this._markDefaultSelectedOption()}this._setSingleSelectSimulatorValue();return this._markSelectedOption()}_insertMultipleSelectBlankOption(){this._$multipleSelectPlaceholder=document.createElement("option");this._$multipleSelectPlaceholder.className=this.constructor._MULTIPLE_SELECT_PLACEHOLDER_CSS_CLASS;this._$multipleSelectPlaceholder.disabled=true;return luda.$prepend(this._$multipleSelectPlaceholder,this._$select)}_setMultipleSelectPlaceholderValue(){return this._$multipleSelectPlaceholder.innerText=this._$select.getAttribute(this.constructor._PLACEHOLDER_ATTRIBUTE)}_initMultipleSelect(){if(!this._$multipleSelectPlaceholder){if(this._$select.hasAttribute(this.constructor._PLACEHOLDER_ATTRIBUTE)){this._insertMultipleSelectBlankOption();this._setMultipleSelectPlaceholderValue()}}if(!this._defaultSelectedOptionMarked){return this._markDefaultSelectedOption()}}_reset(){if(this._$select){Array.from(this._$select.options).forEach($option=>{return $option.selected=this._$defaultSelectedOptions.includes($option)});if(!this._$select.multiple){this._setSingleSelectSimulatorValue()}return this._markSelectedOption()}}static select($select,indexOrIndexArray){return this.query($select).select(indexOrIndexArray)}static _init(){var self;self=this;luda.on("change",`${this._SELECTOR} ${this._SELECT_SELECTOR}`,function(e){var instance;instance=self.query(luda.$parent(self._SELECTOR,this));if(!this.multiple){instance._setSingleSelectSimulatorValue()}return instance._markSelectedOption()});return luda.on(luda._FORM_RESET,this._SELECTOR,function(e){return setTimeout(()=>{return self.query(this)._reset()})})}};_Class._SCOPE="fmSelect";_Class._SELECTOR=".fm-select";_Class._SELECT_SELECTOR="select";_Class._SINGLE_SELECT_SIMULATOR_SELECTOR="input";_Class._PLACEHOLDER_ATTRIBUTE="placeholder";_Class._MULTIPLE_SELECT_PLACEHOLDER_CSS_CLASS="fm-select-multiple-placeholder";_Class._DEFAULT_SELECTED_OPTION_ATTRIBUTE="data-fm-select-default-selected";_Class._INITED_ATTRIBUTE="data-fm-select-inited";_Class._observerConfig={childList:true,attributes:true,subtree:true,attributeFilter:["selected"]};return _Class}.call(this));luda(function(){var _Class;_Class=class extends luda.Factory{activate(index){var action,activatedIndex;if(this._$items.length&&!this._isTransitioning()){activatedIndex=this._activeIndex;if(index!=null&&index!==this._activeIndex&&(0<=index&&index<=this._$items.length-1)&&this._canTransition(index,activatedIndex)){this._activeIndex=index;action=index<activatedIndex?"_slidePrev":"_slideNext";return this[action](activatedIndex)}}}next(){var activatedIndex,index;if(this._$items.length&&!this._isTransitioning()){activatedIndex=this._activeIndex;index=activatedIndex+1;if(index>this._$items.length-1){if(!this._wrap){return}index=0}if(!this._canTransition(index,activatedIndex)){return}this._activeIndex=index;this._slideNext(activatedIndex);this._playTimeStamp=Date.now();return this._pausedRemainTime=this._interval}}prev(){var activatedIndex,index;if(this._$items.length&&!this._isTransitioning()){activatedIndex=this._activeIndex;index=activatedIndex-1;if(index<0){if(!this._wrap){return}index=this._$items.length-1}if(!this._canTransition(index,activatedIndex)){return}this._activeIndex=index;this._slidePrev(activatedIndex);this._playTimeStamp=Date.now();return this._pausedRemainTime=this._interval}}pause(){if(this._intervaling!=null){clearInterval(this._intervaling);this._intervaling=null;return this._pausedRemainTime=this._pausedRemainTime-(Date.now()-this._playTimeStamp)}}play(){var execute;if(this._interval&&this._$items.length>1){this._playTimeStamp=Date.now();this.pause();execute=(()=>{this.next();return this._intervaling=setInterval(this.next.bind(this),this._interval)});return this._intervaling=setTimeout(execute,this._pausedRemainTime)}}_getConfig(){var _$indicators,_$items,_$nextControl,_$prevControl,_activeIndex,_interval,_wrap;_$items=luda.$unnested(this.constructor._ITEMS_SELECTOR,this._$component,this.constructor._SELECTOR);_$indicators=luda.$unnested(this.constructor._INDICATORS_SELECTOR,this._$component,this.constructor._SELECTOR);_$prevControl=luda.$child(this.constructor._PREV_CONTROL_SELECTOR,this._$component);_$nextControl=luda.$child(this.constructor._NEXT_CONTROL_SELECTOR,this._$component);_activeIndex=_$items.indexOf(luda.$child(`.${this.constructor._ITEM_ACTIVE_CSS_CLASS}`,this._$component));if(_activeIndex===-1){_activeIndex=this.constructor._ACTIVE_INDEX}_interval=this._$component.getAttribute(this.constructor._INTERVAL_ATTRIBUTE);if(_interval===this.constructor._FALSE){_interval=false}else{_interval=Math.abs(parseInt(_interval,10))||this.constructor._INTERVAL}_wrap=this._$component.getAttribute(this.constructor._WRAP_ATTRIBUTE);_wrap=_wrap===this.constructor._FALSE?false:this.constructor._WRAP;return{_$items:_$items,_$indicators:_$indicators,_$prevControl:_$prevControl,_$nextControl:_$nextControl,_activeIndex:_activeIndex,_interval:_interval,_wrap:_wrap}}_constructor(){({_$items:this._$items,_$indicators:this._$indicators,_$prevControl:this._$prevControl,_$nextControl:this._$nextControl,_activeIndex:this._activeIndex,_interval:this._interval,_wrap:this._wrap}=this._getConfig());this._intervaling=null;this._playTimeStamp=0;this._pausedRemainTime=this._interval;this._layout();this._handleTransitionCancel();return this.play()}_onMutations(mutations){({_$items:this._$items,_$indicators:this._$indicators,_$prevControl:this._$prevControl,_$nextControl:this._$nextControl,_activeIndex:this._activeIndex,_interval:this._interval,_wrap:this._wrap}=this._getConfig());this._setIndicatorsState();this._setDirectionControlState();return this.play()}_destroy(){return this.pause()}_layout(){this._$items.forEach(($item,index)=>{$item.style.transition="none";if(index>this._activeIndex){$item.classList.add(this.constructor._ITEM_NEXT_CSS_CLASS);$item.classList.remove(this.constructor._ITEM_PREV_CSS_CLASS);$item.classList.remove(this.constructor._ITEM_ACTIVE_CSS_CLASS)}else if(index<this._activeIndex){$item.classList.add(this.constructor._ITEM_PREV_CSS_CLASS);$item.classList.remove(this.constructor._ITEM_NEXT_CSS_CLASS);$item.classList.remove(this.constructor._ITEM_ACTIVE_CSS_CLASS)}else{$item.classList.add(this.constructor._ITEM_ACTIVE_CSS_CLASS);$item.classList.remove(this.constructor._ITEM_NEXT_CSS_CLASS);$item.classList.remove(this.constructor._ITEM_PREV_CSS_CLASS)}luda.reflow($item);return $item.style.transition=""});this._setIndicatorsState();return this._setDirectionControlState()}_slideNext(activatedIndex){var $activatedItem,$item;if(this._$items.length>1){$item=this._$items[this._activeIndex];$activatedItem=this._$items[activatedIndex];$item.style.transition="none";$item.classList.remove(this.constructor._ITEM_PREV_CSS_CLASS);$item.classList.add(this.constructor._ITEM_NEXT_CSS_CLASS);luda.reflow($item);$item.style.transition="";$item.classList.remove(this.constructor._ITEM_NEXT_CSS_CLASS);$item.classList.add(this.constructor._ITEM_ACTIVE_CSS_CLASS);$activatedItem.classList.remove(this.constructor._ITEM_ACTIVE_CSS_CLASS);$activatedItem.classList.add(this.constructor._ITEM_PREV_CSS_CLASS);this._handleTransitionEnd(this._activeIndex,activatedIndex);this._setIndicatorsState();return this._setDirectionControlState()}}_slidePrev(activatedIndex){var $activatedItem,$item;if(this._$items.length>1){$item=this._$items[this._activeIndex];$activatedItem=this._$items[activatedIndex];$item.style.transition="none";$item.classList.remove(this.constructor._ITEM_NEXT_CSS_CLASS);$item.classList.add(this.constructor._ITEM_PREV_CSS_CLASS);luda.reflow($item);$item.style.transition="";$item.classList.remove(this.constructor._ITEM_PREV_CSS_CLASS);$item.classList.add(this.constructor._ITEM_ACTIVE_CSS_CLASS);$activatedItem.classList.remove(this.constructor._ITEM_ACTIVE_CSS_CLASS);$activatedItem.classList.add(this.constructor._ITEM_NEXT_CSS_CLASS);this._handleTransitionEnd(this._activeIndex,activatedIndex);this._setIndicatorsState();return this._setDirectionControlState()}}_canTransition(activeIndex,activatedIndex){return!this._activatePrevented(this._$items[activeIndex],activeIndex)&&!this._deactivatePrevented(this._$items[activatedIndex],activatedIndex)}_handleTransitionEnd(activeIndex,activatedIndex){var activateDuration,deactivateDuration;activateDuration=this._handleActivateEnd(this._$items[activeIndex],activeIndex);return deactivateDuration=this._handleDeactivateEnd(this._$items[activatedIndex],activatedIndex)}_handleTransitionCancel(){var activatedIndex,index;if(this._isActivating()){index=parseInt(this._getActivatingMark(),10);this._handleActivateCancel(this._$items[index],index)}if(this._isDeactivating()){activatedIndex=parseInt(this._getDeactivatingMark(),10);return this._handleDeactivateCancel(this._$items[activatedIndex],activatedIndex)}}_setIndicatorsState(){return this._$indicators.forEach(($indicator,index)=>{return $indicator.disabled=index===this._activeIndex})}_setDirectionControlState(){var ref,ref1,ref2,ref3;if(this._$items.length<=1){return(ref=this._$prevControl)!=null?ref.disabled=(ref1=this._$nextControl)!=null?ref1.disabled=true:void 0:void 0}else{if((ref2=this._$prevControl)!=null){ref2.disabled=this._activeIndex===0&&!this._wrap}return(ref3=this._$nextControl)!=null?ref3.disabled=this._activeIndex===this._$items.length-1&&!this._wrap:void 0}}static activate($carousel,index){return this.query($carousel).activate(index)}static next($carousel){return this.query($carousel).next()}static prev($carousel){return this.query($carousel).prev()}static pause($carousel){return this.query($carousel).pause()}static play($carousel){return this.query($carousel).play()}static _init(){var self;self=this;luda.on("click",this._INDICATORS_SELECTOR,function(e){var instance;instance=self.query(luda.$parent(self._SELECTOR,this));return instance.activate(instance._$indicators.indexOf(this))});luda.on("touchstart",this._SELECTOR,function(e){return self.query(this).pause()});luda.on("touchend",this._SELECTOR,function(e){return setTimeout(()=>{return self.query(this).play()})});luda.on("mouseover",this._SELECTOR,function(e){return self.query(this).pause()});luda.on("mouseout",this._SELECTOR,function(e){return self.query(this).play()});luda.on(luda._SWIPE_LEFT_OR_UP,this._SELECTOR,function(startE,e){return self.query(this).next()});luda.on(luda._SWIPE_RIGHT_OR_DOWN,this._SELECTOR,function(startE,e){return self.query(this).prev()});luda.on("click",this._PREV_CONTROL_SELECTOR,function(e){return self.query(luda.$parent(self._SELECTOR,this)).prev()});return luda.on("click",this._NEXT_CONTROL_SELECTOR,function(e){return self.query(luda.$parent(self._SELECTOR,this)).next()})}};_Class._SCOPE="carousel";_Class._SELECTOR=".carousel";_Class._ITEMS_SELECTOR=".carousel-item";_Class._PREV_CONTROL_SELECTOR=".carousel-prev";_Class._NEXT_CONTROL_SELECTOR=".carousel-next";_Class._INDICATORS_SELECTOR=".carousel-indicators .btn";_Class._INTERVAL_ATTRIBUTE="data-carousel-interval";_Class._WRAP_ATTRIBUTE="data-carousel-wrap";_Class._ACTIVATED_INDEX_ATTRIBUTE="data-carousel-activated-index";_Class._ITEM_ACTIVE_CSS_CLASS="carousel-item-active";_Class._ITEM_NEXT_CSS_CLASS="carousel-item-next";_Class._ITEM_PREV_CSS_CLASS="carousel-item-prev";_Class._ACTIVE_INDEX=0;_Class._INTERVAL=5e3;_Class._WRAP=true;_Class._FALSE="false";_Class._observerConfig={childList:true,attributes:true,subtree:true,attributeFilter:[_Class._INTERVAL_ATTRIBUTE,_Class._WRAP_ATTRIBUTE]};return _Class}.call(this));luda(function(){var _Class;_Class=class extends luda.Factory{activate(){var ref;if(this._isActive()||this._isTransitioning()){return}if(this._activatePrevented(this._$menu)){return}this._$component.classList.add(this.constructor._ACTIVE_CSS_CLASS);this.constructor._$focused.push(document.activeElement);if((ref=this._parent)!=null){ref.activate()}return this._handleActivateEnd(this._$menu)}deactivate(focus){var ref;if(!(this._isActive()&&!this._isTransitioning())){return}if(this._deactivatePrevented(this._$menu)){return}this._$component.classList.remove(this.constructor._ACTIVE_CSS_CLASS);this._children.forEach(function(child){return child.deactivate()});if(focus){if((ref=this.constructor._$focused[this.constructor._$focused.length-1])!=null){ref.focus()}}this.constructor._$focused.splice(this.constructor._$focused.length-1,1);return this._handleDeactivateEnd(this._$menu)}toggle(focus){if(this._isActive()){return this.deactivate(focus)}else{return this.activate()}}_prev(){var focusIndex;if(this._$items.length&&this._isActive()){focusIndex=this._$items.indexOf(document.activeElement)-1;if(focusIndex<0){focusIndex=0}return this._$items[focusIndex].focus()}}_next(){var focusIndex;if(this._$items.length&&this._isActive()){focusIndex=this._$items.indexOf(document.activeElement)+1;if(focusIndex>this._$items.length-1){focusIndex=this._$items.length-1}return this._$items[focusIndex].focus()}}_getConfig(){var _$items,_$menu,_$noneSwitches,_$switches,_isStandalone;_$menu=luda.$child(this.constructor._MENU_SELECTOR,this._$component);_$switches=luda.$unnested(this.constructor._SWITCHES_SELECTOR,this._$component,this.constructor._SELECTOR).concat(luda.$unnested(this.constructor._SWITCHES_SELECTOR,_$menu,this.constructor._MENU_SELECTOR));_$noneSwitches=luda.$unnested(this.constructor._NONE_SWITCHES_SELECTOR,this._$component,this.constructor._SELECTOR).concat(luda.$unnested(this.constructor._NONE_SWITCHES_SELECTOR,_$menu,this.constructor._MENU_SELECTOR));_$items=luda.$unnested(this.constructor._ITEMS_SELECTOR,_$menu,this.constructor._MENU_SELECTOR);_isStandalone=this._$component.hasAttribute(this.constructor._STANDALONE_ATTRIBUTE);return{_$menu:_$menu,_$items:_$items,_$switches:_$switches,_$noneSwitches:_$noneSwitches,_isStandalone:_isStandalone}}_constructor(){this._onMutations();this._handleActivateCancel(this._$menu);return this._handleDeactivateCancel(this._$menu)}_onMutations(mutations){return({_$menu:this._$menu,_$items:this._$items,_$switches:this._$switches,_$noneSwitches:this._$noneSwitches,_isStandalone:this._isStandalone}=this._getConfig())}_isActive(){return this._$component.classList.contains(this.constructor._ACTIVE_CSS_CLASS)}_deactivateChildrenExcept(exceptions){if(exceptions&&!(exceptions instanceof Array)){exceptions=[exceptions]}if(exceptions){return this._children.forEach(function(child){if(child._isActive()&&!exceptions.includes(child)){return child.deactivate()}})}else{return this._children.forEach(function(child){if(child._isActive()){return child.deactivate()}})}}static activate($dropdown){return this.query($dropdown).activate()}static deactivate($dropdown,focus){return this.query($dropdown).deactivate(focus)}static toggle($dropdown,focus){return this.query($dropdown).toggle(focus)}static deactivateExcept(instances$dropdowns){var exceptions;exceptions=[];if(instances$dropdowns&&!(instances$dropdowns instanceof Array)){instances$dropdowns=[instances$dropdowns]}if(instances$dropdowns){instances$dropdowns.forEach(instance$dropdown=>{var exception;if(exception=this.query(instance$dropdown)){return exceptions.push(exception)}})}if(exceptions.length){return this._instances.forEach(function(instance){var instanceHasntExceptionChild,instanceIsntInExceptions;instanceIsntInExceptions=!exceptions.includes(instance);instanceHasntExceptionChild=exceptions.every(function(exception){return!instance._hasDescendant(exception)});if(instance._isActive()&&instanceIsntInExceptions&&instanceHasntExceptionChild){return instance.deactivate()}})}else{return this._instances.forEach(function(instance){if(instance._isActive()){return instance.deactivate()}})}}static _standaloneInstances(){return this._instances.filter(function(instance){if(instance._isStandalone){return instance}})}static _init(){var self;self=this;luda.onOpposite("click",this._SELECTOR,function(e){return self.deactivateExcept(self._standaloneInstances())});luda.on("click",this._SELECTOR,function(e){var focus,instance,toggleChecked;if(instance=self.query(this)){toggleChecked=false;focus=!e.detail;self.deactivateExcept(self._standaloneInstances().concat(instance));instance._deactivateChildrenExcept();if(instance._parent){instance._parent._deactivateChildrenExcept(instance)}if(instance._$switches.length||instance._$noneSwitches.length){luda.eventPath(e).some(function($path){if(instance._$switches.includes($path)){instance.toggle(focus);return toggleChecked=true}else if(instance._$noneSwitches.includes($path)){return toggleChecked=true}})}if(!toggleChecked){return instance.toggle(focus)}}});luda.onOpposite("keyup",this._SELECTOR,function(e){return self.deactivateExcept()});luda.on("keyup",this._SELECTOR,function(e){var instance;if(e.keyCode===luda.KEY_TAB&&(instance=self.query(this))){self.deactivateExcept(instance);return instance.activate()}});luda.on("keydown",this._SELECTOR,function(e){var instance,ref;if(e.keyCode===luda.KEY_ESC&&(instance=self.query(this))){e.preventDefault();if(instance._isActive()){return instance.deactivate(true)}else{return(ref=instance._parent)!=null?ref.deactivate(true):void 0}}});return luda.on("keydown",this._SELECTOR,function(e){var instance,ref,ref1;if([luda.KEY_LEFT,luda.KEY_UP].includes(e.keyCode)&&(instance=self.query(this))){e.preventDefault();if(instance._isActive()){return instance._prev()}else{return(ref=instance._parent)!=null?ref._prev():void 0}}else if([luda.KEY_RIGHT,luda.KEY_DOWN].includes(e.keyCode)&&(instance=self.query(this))){e.preventDefault();if(instance._isActive()){return instance._next()}else{return(ref1=instance._parent)!=null?ref1._next():void 0}}})}};_Class._SCOPE="dropdown";_Class._SELECTOR=".dropdown-fixed,.dropdown-absolute, .dropdown-static,.dropdown-absolute-m";_Class._MENU_SELECTOR=".dropdown-menu";_Class._ITEMS_SELECTOR="a[href]:not([disabled]),button:not([disabled]), input:not([disabled]),[tabindex]:not([disabled])";_Class._TOGGLE_ATTRIBUTE="data-dropdown-toggle";_Class._TOGGLE_DISABLED_ATTRIBUTE="data-dropdown-toggle-disabled";_Class._STANDALONE_ATTRIBUTE="data-dropdown-standalone";_Class._SWITCHES_SELECTOR=`[${_Class._TOGGLE_ATTRIBUTE}]`;_Class._NONE_SWITCHES_SELECTOR=`[${_Class._TOGGLE_DISABLED_ATTRIBUTE}]`;_Class._ACTIVE_CSS_CLASS="dropdown-active";_Class._observerConfig={childList:true,attributes:true,subtree:true,attributeFilter:[_Class._TOGGLE_ATTRIBUTE,_Class._TOGGLE_DISABLED_ATTRIBUTE,_Class._STANDALONE_ATTRIBUTE]};_Class._$focused=[];return _Class}.call(this));luda(function(){var _Class;_Class=class extends luda.Factory{_getConfig(){var _$defaultValues,_$valueHolder,_$values;_$values=luda.$children(this.constructor._VALUE_SELECTOR,this._$component);_$defaultValues=luda.$children(this.constructor._DEFAULT_VALUE_SELECTOR,this._$component);_$valueHolder=luda.$child(this.constructor._VALUE_HOLDER_SELECTOR,this._$component);return{_$values:_$values,_$valueHolder:_$valueHolder,_$defaultValues:_$defaultValues}}_constructor(){({_$values:this._$values,_$valueHolder:this._$valueHolder,_$defaultValues:this._$defaultValues}=this._getConfig());this._setValueHolderAttribute();return this._setValueHolderValue()}_onMutations(){return this._constructor()}_setValueHolderValue(){var values;values=[];this._$values.forEach(($value,index)=>{var value;if($value.checked){if($value.hasAttribute(this.constructor._LABEL_ATTRIBUTE)){value=$value.getAttribute(this.constructor._LABEL_ATTRIBUTE)}else{value=this._$defaultValues[index].innerText}}if(value&&!values.includes(value)){return values.push(value)}});if(this._$valueHolder){return this._$valueHolder.value=values.join(this.constructor._VALUE_SPLITOR)}}_setValueHolderAttribute(){if(this._$valueHolder){return this._$valueHolder.setAttribute("readonly","")}}static _init(){var self;self=this;luda.enter._add(this._ENTER_BEHAVIOR_SELECTOR);luda.on("change",`${this._SELECTOR} ${this._VALUE_SELECTOR}`,function(e){return self.query(luda.$parent(self._SELECTOR,this))._setValueHolderValue()});luda.on(luda._FORM_RESET,this._SELECTOR,function(e){return setTimeout(()=>{return self.query(this)._setValueHolderValue()})});if(/iphone/i.test(navigator.userAgent)||/ipad/i.test(navigator.userAgent)){return luda.on("focusin",this._ENTER_BEHAVIOR_SELECTOR,function(e){this.blur();return this.classList.add(luda.focus._CSS_CLASS)})}}};_Class._SCOPE="fmDropdown";_Class._SELECTOR=".fm-dropdown";_Class._VALUE_SPLITOR=" ";_Class._LABEL_ATTRIBUTE="data-fm-dropdown-label";_Class._VALUE_SELECTOR=".dropdown-items .btn-radio input, .dropdown-items .btn-check input";_Class._DEFAULT_VALUE_SELECTOR=".dropdown-items .btn-radio label, .dropdown-items .btn-check label";_Class._VALUE_HOLDER_SELECTOR=".fm input";_Class._ENTER_BEHAVIOR_SELECTOR=".fm-dropdown .fm input";_Class._observerConfig={childList:true,attributes:true,subtree:true,attributeFilter:["checked",_Class._LABEL_ATTRIBUTE]};return _Class}.call(this));luda(function(){var _Class;_Class=class extends luda.Factory{activate(index){var activatedIndex;if(this._$panes.length&&!this._isTransitioning()){activatedIndex=this._activeIndex;if(index!=null&&index!==this._activeIndex&&(0<=index&&index<=this._$panes.length-1)){if(!this._canTransition(index,activatedIndex)){return}this._activeIndex=index;return this._activate(activatedIndex)}}}_getConfig(){var _$indicators,_$panes,_activeIndex;_$panes=luda.$unnested(this.constructor._PANE_SELECTOR,this._$component,this.constructor._SELECTOR);_$indicators=luda.$unnested(this.constructor._INDICATOR_SELECTOR,this._$component,this.constructor._SELECTOR);_activeIndex=this.constructor._ACTIVE_INDEX;_$indicators.some(function($indicator,index){if($indicator.checked){_activeIndex=index;return true}});return{_$panes:_$panes,_$indicators:_$indicators,_activeIndex:_activeIndex}}_constructor(){({_$panes:this._$panes,_$indicators:this._$indicators,_activeIndex:this._activeIndex}=this._getConfig());this._layout();return this._handleTransitionCancel()}_onMutations(mutations){({_$panes:this._$panes,_$indicators:this._$indicators,_activeIndex:this._activeIndex}=this._getConfig());return this._setIndicatorsState()}_layout(){this._$panes.forEach(($pane,index)=>{$pane.style.transition="none";if(index===this._activeIndex){$pane.classList.add(this.constructor._PANE_ACTIVE_CSS_CLASS)}else{$pane.classList.remove(this.constructor._PANE_ACTIVE_CSS_CLASS)}luda.reflow($pane);return $pane.style.transition=""});return this._setIndicatorsState()}_activate(activatedIndex){var $activatedPane,$pane;$pane=this._$panes[this._activeIndex];$activatedPane=this._$panes[activatedIndex];$pane.classList.add(this.constructor._PANE_ACTIVE_CSS_CLASS);$activatedPane.classList.remove(this.constructor._PANE_ACTIVE_CSS_CLASS);this._handleTransitionEnd(this._activeIndex,activatedIndex);return this._setIndicatorsState()}_canTransition(activeIndex,activatedIndex){return!this._activatePrevented(this._$panes[activeIndex],activeIndex)&&!this._deactivatePrevented(this._$panes[activatedIndex],activatedIndex)}_handleTransitionEnd(activeIndex,activatedIndex){var activateDuration,deactivateDuration;activateDuration=this._handleActivateEnd(this._$panes[activeIndex],activeIndex);return deactivateDuration=this._handleDeactivateEnd(this._$panes[activatedIndex],activatedIndex)}_handleTransitionCancel(){var activatedIndex,index;if(this._isActivating()){index=parseInt(this._getActivatingMark(),10);this._handleActivateCancel(this._$panes[index],index)}if(this._isDeactivating()){activatedIndex=parseInt(this._getDeactivatingMark(),10);return this._handleDeactivateCancel(this._$panes[activatedIndex],activatedIndex)}}_setIndicatorsState(){return this._$indicators.forEach(($indicator,index)=>{if(index===this._activeIndex){$indicator.setAttribute("checked","");return $indicator.checked=true}else{$indicator.removeAttribute("checked");return $indicator.checked=false}})}static activate($tab,index){return this.query($tab).activate(index)}static _init(){var self;self=this;return luda.on("change",this._INDICATOR_SELECTOR,function(e){var instance;if(this.checked){instance=self.query(luda.$parent(self._SELECTOR,this));instance._setIndicatorsState();return instance.activate(instance._$indicators.indexOf(this))}})}};_Class._SCOPE="tab";_Class._SELECTOR=".tab";_Class._PANE_SELECTOR=".tab-pane";_Class._INDICATOR_SELECTOR=".tab-indicators .btn-radio input[type=radio]";_Class._PANE_ACTIVE_CSS_CLASS="tab-pane-active";_Class._ACTIVE_INDEX=0;_Class._observerConfig={childList:true,subtree:true};return _Class}.call(this))});
6
+ (function(global,factory){typeof exports==="object"&&typeof module!=="undefined"?factory():typeof define==="function"&&define.amd?define(factory):factory()})(this,function(){"use strict";var ENV;ENV=function(){if(typeof document!=="undefined"){if(typeof window!=="undefined"){return window}if(typeof global!=="undefined"){return global}}throw new Error("Unsupported runtime environment.")}();if(typeof ENV.luda!=="function"){ENV.luda=function(installer){var installed,name,property;if(!installer){throw new Error("Installer cannot be detected.")}if(!["object","function"].includes(typeof installer)){throw new Error("Installer must be object, array or function.")}if(installer.hasOwnProperty("_SCOPE")){if(typeof installer._SCOPE!=="string"){throw new Error("_SCOPE must be string")}return ENV.luda._install(installer._SCOPE,installer)}if(installer instanceof Array||typeof installer==="function"){throw new Error("Unscoped installer must be object.")}installed={};for(name in installer){property=installer[name];installed[name]=ENV.luda._install(name,property)}return installed};ENV.luda._install=function(namespace,installer){var installedInstaller,installedName,ref;if(ENV.luda[namespace]){console.warn(`Namespace ${namespace} is ocupied, sikp installation.`);return ENV.luda[namespace]}ref=ENV.luda;for(installedName in ref){installedInstaller=ref[installedName];if(installer===installedInstaller){console.warn(`Installer is installed with name ${installedName}, skip installation.`);return ENV.luda[installedName]}}if(installer._install){if(typeof installer._install==="function"){return ENV.luda[namespace]=installer._install()}return ENV.luda[namespace]=installer._install}return ENV.luda[namespace]=installer}}luda({KEY_LEFT:37,KEY_UP:38,KEY_RIGHT:39,KEY_DOWN:40,KEY_TAB:9,KEY_ESC:27,KEY_ENTER:13});luda({$child:function(selector,$ancestor){if(!$ancestor){$ancestor=document}return $ancestor.querySelector(selector)},$children:function(selector,$ancestor){var $descendant,descendants;if(!$ancestor){$ancestor=document}$descendant=this.$child(selector,$ancestor);if($descendant){return descendants=Array.from($ancestor.querySelectorAll(selector))}else{return descendants=[]}},$unnested:function(selector,$ancestor,ancestorSelector){var descendants;descendants=this.$children(selector,$ancestor);return descendants.filter($descendant=>{if(this.$parent(ancestorSelector,$descendant)===$ancestor){return $descendant}})},$parent:function(selector,$descendant){var $ancestor;$ancestor=$descendant.parentNode;if($ancestor){if($ancestor.matches&&$ancestor.matches(selector)){return $ancestor}else{return this.$parent(selector,$ancestor)}}},$parents:function(selector,$descendant,_ancestors){var $ancestor;$ancestor=this.$parent(selector,$descendant);if(!_ancestors){_ancestors=[]}if($ancestor){_ancestors.push($ancestor);return this.$parents(selector,$ancestor,_ancestors)}else{return _ancestors}},$after:function($node,$target){var $parent;$parent=$target.parentNode;if($parent.lastChild===$target){return $parent.appendChild($node)}else{return $parent.insertBefore($node,$target.nextSibling)}},$prepend:function($node,$target){if($target.firstChild){return $target.insertBefore($node,$target.firstChild)}else{return $target.appendChild($node)}},reflow:function($element){return $element.offsetHeight},_getTransitionDurations:function(style,propertyLength){var durationArray;durationArray=style.split(",");while(durationArray.length<propertyLength){durationArray=durationArray.concat(durationArray)}if(durationArray.length>propertyLength){durationArray=durationArray.slice(0,propertyLength)}return durationArray.map(function(durationStr){var duration;duration=parseFloat(durationStr);if(!duration){return 0}if(durationStr.match("ms")){return duration}else{return duration*1e3}})},getTransitionDuration:function($element){var delays,durations,finalDurations,length,styles;styles=window.getComputedStyle($element);length=styles.transitionProperty.split(",").length;if(!length){return 0}delays=this._getTransitionDurations(styles.transitionDelay,length);durations=this._getTransitionDurations(styles.transitionDuration,length);finalDurations=durations.map(function(duration,index){return duration+delays[index]});return Math.max.apply(null,finalDurations)},_observeDom:function(onNodeAdded,onNodeRemoved){var observer,observerConfig;observerConfig={childList:true,subtree:true};observer=new MutationObserver(function(mutations){return mutations.forEach(function(mutation){var $addedNodes,$removedNodes;$removedNodes=Array.from(mutation.removedNodes);$addedNodes=Array.from(mutation.addedNodes);$removedNodes.forEach(function($node){if($node instanceof Element&&onNodeRemoved){return onNodeRemoved($node)}});return $addedNodes.forEach(function($node){if($node instanceof Element&&onNodeAdded){return onNodeAdded($node)}})})});observer.observe(document.documentElement,observerConfig);return observer}});var splice=[].splice;luda({_SWIPE_DISTANCE:10,_EVENT_TYPE_PREFIX:"luda",_SWIPE_LEFT:"swipeleft",_SWIPE_RIGHT:"swiperight",_SWIPE_UP:"swipeup",_SWIPE_DOWN:"swipedown",_SWIPE_LEFT_OR_UP:"swipeleft or swipeup",_SWIPE_RIGHT_OR_DOWN:"swiperight or swipedown",_DOC_READY:"docready",_FORM_RESET:"reset",eventPath:function(event){var path;if(event.composedPath){return path=event.composedPath()}else if(event.path){return path=event.path}else{return path=[event.target].concat(luda.$parents("*",event.target))}},on:function(event,...selector){var handler,ref;ref=selector,[...selector]=ref,[handler]=splice.call(selector,-1);switch(event){case this._DOC_READY:return this._onDocReady(handler);case this._FORM_RESET:return this._onReset(selector[0],handler);case this._SWIPE_LEFT:case this._SWIPE_RIGHT:case this._SWIPE_UP:case this._SWIPE_DOWN:case this._SWIPE_LEFT_OR_UP:case this._SWIPE_RIGHT_OR_DOWN:return this._onSwipe(event,selector[0],handler);default:return this._on(event,selector[0],handler)}},onOpposite:function(event,selector,handler){var _self;_self=this;return document.addEventListener(event,function(e){var trigger;trigger=_self.eventPath(e).every(function($element){return!$element.matches||!$element.matches(selector)});if(trigger){return handler(e)}})},dispatch:function($target,type,detail,delayMilliseconds,options={}){var evt;if(typeof options.bubbles!=="boolean"){options.bubbles=true}if(typeof options.cancelable!=="boolean"){options.cancelable=true}if(typeof options.composed!=="boolean"){options.composed=true}evt=new Event(`${this._EVENT_TYPE_PREFIX}:${type}`,options);evt.detail=detail;if(typeof delayMilliseconds==="number"){return setTimeout(function(){if($target){return $target.dispatchEvent(evt)}},delayMilliseconds)}else{$target.dispatchEvent(evt);return evt}},_onDocReady:function(handler){if(document.readyState==="loading"){return document.addEventListener("DOMContentLoaded",handler)}else{return handler()}},_onReset:function(selector,handler){return document.addEventListener("reset",function(e){if(selector!=null){return luda.$children(selector,e.target).forEach(function($element){return handler.bind($element)(e)})}else{return handler(e)}})},_onSwipe:function(event,selector,handler){var $touchStartElement,_self,touchStartE,touchStartX,touchStartY,watch;_self=this;watch=false;$touchStartElement=document;touchStartE=null;touchStartX=0;touchStartY=0;document.addEventListener("touchstart",function(e){if(e.touches.length===1){touchStartX=e.touches[0].screenX;touchStartY=e.touches[0].screenY;if(selector!=null){return _self.eventPath(e).some(function($element){if($element.matches&&$element.matches(selector)){$touchStartElement=$element;touchStartE=e;watch=true;return true}})}else{return watch=true}}});return document.addEventListener("touchmove",function(e){var eventX,eventXOrY,eventY,touchDistanceX,touchDistanceY;if(watch&&e.touches.length===1){touchDistanceX=e.touches[0].screenX-touchStartX;touchDistanceY=e.touches[0].screenY-touchStartY;eventX=void 0;eventY=void 0;eventXOrY=void 0;if(Math.abs(touchDistanceX)>=_self._SWIPE_DISTANCE){if(touchDistanceX>0){eventX=_self._SWIPE_RIGHT}else{eventX=_self._SWIPE_LEFT}}if(Math.abs(touchDistanceY)>=_self._SWIPE_DISTANCE){if(touchDistanceY>0){eventY=_self._SWIPE_DOWN}else{eventY=_self._SWIPE_UP}}if(eventX===_self._SWIPE_LEFT||eventY===_self._SWIPE_UP){eventXOrY=_self._SWIPE_LEFT_OR_UP}if(eventX===_self._SWIPE_RIGHT||eventY===_self._SWIPE_DOWN){eventXOrY=_self._SWIPE_RIGHT_OR_DOWN}if(eventX!=null&&eventX===event||eventY!=null&&eventY===event||eventXOrY===event){if(selector!=null){return _self.eventPath(e).some(function($element){if($element===$touchStartElement){watch=false;handler.bind($element)(touchStartE,e);return true}})}else{watch=false;return handler(touchStartE,e)}}}})},_on:function(event,selector,handler){var _self;if(selector===window){return window.addEventListener(event,function(e){return handler(e)})}else{_self=this;return document.addEventListener(event,function(e){if(selector!=null){return _self.eventPath(e).some(function($element){if($element.matches&&$element.matches(selector)){handler.bind($element)(e);return true}})}else{return handler(e)}})}}});luda({except:function(element,arr){if(arr.includes(element)){return arr.splice(arr.indexOf(element),1)}}});var Static;luda(Static=function(){class Static{static _ACTIVATE_EVENT_TYPE(){return`${this._SCOPE}:activate`}static _ACTIVATED_EVENT_TYPE(){return`${this._SCOPE}:activated`}static _DEACTIVATE_EVENT_TYPE(){return`${this._SCOPE}:deactivate`}static _DEACTIVATED_EVENT_TYPE(){return`${this._SCOPE}:deactivated`}static _ACTIVATING_MARK_ATTRIBUTE(){return`data-${this._SCOPE}-activating`}static _DEACTIVATING_MARK_ATTRIBUTE(){return`data-${this._SCOPE}-deactivating`}static _add(selector){if(typeof selector!=="string"){throw new Error(this._SELECTOR_INVALID_ERROR)}if(!this._SELECTORS.includes(selector)){this._SELECTORS.push(selector)}return this._mergeSelectors()}static _remove(selector){if(typeof selector!=="string"){throw new Error(this._SELECTOR_INVALID_ERROR)}luda.except(selector,this._SELECTORS);return this._mergeSelectors()}static _mergeSelectors(){return this._selector=this._SELECTORS.join(",")}static _activatePrevented($ele,detail){var activateEvent;activateEvent=luda.dispatch($ele,this._ACTIVATE_EVENT_TYPE(),detail);return activateEvent.defaultPrevented}static _deactivatePrevented($ele,detail){var deactivateEvent;deactivateEvent=luda.dispatch($ele,this._DEACTIVATE_EVENT_TYPE(),detail);return deactivateEvent.defaultPrevented}static _handleActivateEnd($ele,detail){var activateDuration;this._setActivatingMark($ele,detail);activateDuration=luda.getTransitionDuration($ele);luda.dispatch($ele,this._ACTIVATED_EVENT_TYPE(),detail,activateDuration);setTimeout(()=>{if($ele){return this._removeActivatingMark($ele)}},activateDuration);return activateDuration}static _handleDeactivateEnd($ele,detail){var deactivateDuration;this._setDeactivatingMark($ele,detail);deactivateDuration=luda.getTransitionDuration($ele);luda.dispatch($ele,this._DEACTIVATED_EVENT_TYPE(),detail,deactivateDuration);setTimeout(()=>{if($ele){return this._removeDeactivatingMark($ele)}},deactivateDuration);return deactivateDuration}static _handleActivateCancel($ele,detail){if(this._isActivating($ele)){luda.dispatch($ele,this._ACTIVATED_EVENT_TYPE(),detail);return this._removeActivatingMark($ele)}}static _handleDeactivateCancel($ele,detail){if(this._isDeactivating($ele)){luda.dispatch($ele,this._DEACTIVATED_EVENT_TYPE(),detail);return this._removeDeactivatingMark($ele)}}static _isActivating($ele){return $ele.hasAttribute(this._ACTIVATING_MARK_ATTRIBUTE())}static _isDeactivating($ele){return $ele.hasAttribute(this._DEACTIVATING_MARK_ATTRIBUTE())}static _isTransitioning($ele){return this._isActivating($ele)||this._isDeactivating($ele)}static _getActivatingMark($ele){return $ele.getAttribute(this._ACTIVATING_MARK_ATTRIBUTE())}static _getDeactivatingMark($ele){return $ele.getAttribute(this._DEACTIVATING_MARK_ATTRIBUTE())}static _removeActivatingMark($ele){return $ele.removeAttribute(this._ACTIVATING_MARK_ATTRIBUTE())}static _removeDeactivatingMark($ele){return $ele.removeAttribute(this._DEACTIVATING_MARK_ATTRIBUTE())}static _setActivatingMark($ele,value){return $ele.setAttribute(this._ACTIVATING_MARK_ATTRIBUTE(),value)}static _setDeactivatingMark($ele,value){return $ele.setAttribute(this._DEACTIVATING_MARK_ATTRIBUTE(),value)}static _onEleAdded($ele){return Static._onEleAddedOrRemoved($ele,"_onElementAdded")}static _onEleRemoved($ele){return Static._onEleAddedOrRemoved($ele,"_onElementRemoved")}static _onEleAddedOrRemoved($ele,action){return Static._Observed.forEach(function(Observed){var $matched;if(!Observed[action]){return}$matched=luda.$children(Observed._selector,$ele);if($ele.matches(Observed._selector)){$matched.unshift($ele)}return $matched.forEach(function($target){return Observed[action]($target)})})}static _observe(classObj){if(!Static._observer){Static._observer=luda._observeDom(Static._onEleAdded,Static._onEleRemoved)}if(classObj._onElementAdded||classObj._onElementRemoved&&classObj._selector){if(!Static._Observed.includes(classObj)){return Static._Observed.push(classObj)}}}static _install(){var exposed,self;self=this;if(this===Static){return this}if(!this.hasOwnProperty("_SELECTORS")){this._SELECTORS=[]}this._mergeSelectors();if(typeof this._init==="function"){exposed=this._init()}luda.on(luda._DOC_READY,function(){return Static._observe(self)});if(exposed){return exposed}else{return this}}}Static._SCOPE="Static";Static._SELECTOR_INVALID_ERROR="@param selector must be a css selector string";Static._SELECTORS=[];Static._Observed=[];Static._observer=null;Static._selector="";return Static}.call(this));luda(function(){var _Class;_Class=class extends luda.Static{static _init(){var self;self=this;return luda.on("keydown",function(e){if(!document.documentElement.hasAttribute(self._DISABLED_ATTRIBUTE)&&e.keyCode===luda.KEY_ENTER&&e.target.matches(self._selector)){e.preventDefault();return setTimeout(function(){return e.target.click()})}})}};_Class._SCOPE="enter";_Class._SELECTORS=["input[type=checkbox]","input[type=radio]","[tabindex]"];_Class._DISABLED_ATTRIBUTE="data-enter-disabled";return _Class}.call(this));luda(function(){var _Class;_Class=class extends luda.Static{static _isActive(){return!document.documentElement.hasAttribute(this._DISABLED_ATTRIBUTE)}static _removeFocusClassExcept($exception){return Array.from(this._$focus).forEach($focus=>{if($focus!==$exception){return $focus.classList.remove(this._CSS_CLASS)}})}static _addFocusClassExceptHtmlAndBody($target){if($target!==document.body&&$target!==document.documentElement){return $target.classList.add(this._CSS_CLASS)}}static _changeFocusStateOnKeyEvent(e){if(this._isActive()){this._removeFocusClassExcept(e.target);return this._addFocusClassExceptHtmlAndBody(e.target)}}static _changeFocusStateOnMouseDownEvent(e){var target;if(this._isActive()){if(e.target.matches(this._PARENT_FOCUS_CHILDREN_SELECTOR)){target=luda.$parent(this._PARENT_FOCUS_SELECTOR,e.target)}else{target=e.target}if(target.matches(this._selector)){this._removeFocusClassExcept(target);return this._addFocusClassExceptHtmlAndBody(target)}else{return this._removeFocusClassExcept()}}}static _setElementPrototype(){var blur,focus,self;focus=HTMLElement.prototype.focus;blur=HTMLElement.prototype.blur;self=this;HTMLElement.prototype.focus=function(){focus.apply(this,arguments);if(self._isActive()&&document.activeElement===this){self._removeFocusClassExcept(this);return self._addFocusClassExceptHtmlAndBody(this)}};return HTMLElement.prototype.blur=function(){blur.apply(this,arguments);if(self._isActive()){return this.classList.remove(self._CSS_CLASS)}}}static _init(){this._setElementPrototype();luda.on("keydown",this._changeFocusStateOnKeyEvent.bind(this));luda.on("keyup",this._changeFocusStateOnKeyEvent.bind(this));luda.on("mousedown",this._changeFocusStateOnMouseDownEvent.bind(this));luda.on("touchstart",this._TOUCHSTART_FOCUS_SELECTOR,this._changeFocusStateOnMouseDownEvent.bind(this));return luda.on("focusin",this._changeFocusStateOnMouseDownEvent.bind(this))}};_Class._SCOPE="focus";_Class._CSS_CLASS="focus";_Class._SELECTORS=["select","textarea",":not(.btn-check):not(.btn-radio):not(.btn-file) > input:not([type=button]):not([type=submit]):not([type=reset])"];_Class._TOUCHSTART_FOCUS_SELECTOR="input[type=range]";_Class._PARENT_FOCUS_SELECTOR="select[multiple]";_Class._PARENT_FOCUS_CHILDREN_SELECTOR=`${_Class._PARENT_FOCUS_SELECTOR} *`;_Class._DISABLED_ATTRIBUTE="data-focus-disabled";_Class._$focus=document.getElementsByClassName(_Class._CSS_CLASS);return _Class}.call(this));var Factory;luda(Factory=function(){class Factory{static _ACTIVATE_EVENT_TYPE(){return`${this._SCOPE}:activate`}static _ACTIVATED_EVENT_TYPE(){return`${this._SCOPE}:activated`}static _DEACTIVATE_EVENT_TYPE(){return`${this._SCOPE}:deactivate`}static _DEACTIVATED_EVENT_TYPE(){return`${this._SCOPE}:deactivated`}static _ACTIVATING_MARK_ATTRIBUTE(){return`data-${this._SCOPE}-activating`}static _DEACTIVATING_MARK_ATTRIBUTE(){return`data-${this._SCOPE}-deactivating`}_hasDescendant(descendant){if(this._children.length&&descendant){if(this._children.includes(descendant)){return true}return this._children.some(function(child){return child._hasDescendant(descendant)})}else{return false}}_observe(){this._observer=new MutationObserver(this._onMutations.bind(this));return this._observer.observe(this._$component,this.constructor._observerConfig)}_disconnect(){this._observer.disconnect();return this._observer=null}_activatePrevented($ele,detail){var activateEvent;activateEvent=luda.dispatch($ele,this.constructor._ACTIVATE_EVENT_TYPE(),detail);return activateEvent.defaultPrevented}_deactivatePrevented($ele,detail){var deactivateEvent;deactivateEvent=luda.dispatch($ele,this.constructor._DEACTIVATE_EVENT_TYPE(),detail);return deactivateEvent.defaultPrevented}_handleActivateEnd($ele,detail){var activateDuration;this._setActivatingMark(detail);activateDuration=luda.getTransitionDuration($ele);luda.dispatch($ele,this.constructor._ACTIVATED_EVENT_TYPE(),detail,activateDuration);setTimeout(()=>{if(this._$component){return this._removeActivatingMark()}},activateDuration);return activateDuration}_handleDeactivateEnd($ele,detail){var deactivateDuration;this._setDeactivatingMark(detail);deactivateDuration=luda.getTransitionDuration($ele);luda.dispatch($ele,this.constructor._DEACTIVATED_EVENT_TYPE(),detail,deactivateDuration);setTimeout(()=>{if(this._$component){return this._removeDeactivatingMark()}},deactivateDuration);return deactivateDuration}_handleActivateCancel($ele,detail){if(this._isActivating()){luda.dispatch($ele,this.constructor._ACTIVATED_EVENT_TYPE(),detail);return this._removeActivatingMark()}}_handleDeactivateCancel($ele,detail){if(this._isDeactivating()){luda.dispatch($ele,this.constructor._DEACTIVATED_EVENT_TYPE(),detail);return this._removeDeactivatingMark()}}_isActivating(){return this._$component.hasAttribute(this.constructor._ACTIVATING_MARK_ATTRIBUTE())}_isDeactivating(){return this._$component.hasAttribute(this.constructor._DEACTIVATING_MARK_ATTRIBUTE())}_isTransitioning(){return this._isActivating()||this._isDeactivating()}_getActivatingMark(){return this._$component.getAttribute(this.constructor._ACTIVATING_MARK_ATTRIBUTE())}_getDeactivatingMark(){return this._$component.getAttribute(this.constructor._DEACTIVATING_MARK_ATTRIBUTE())}_removeActivatingMark(){return this._$component.removeAttribute(this.constructor._ACTIVATING_MARK_ATTRIBUTE())}_removeDeactivatingMark(){return this._$component.removeAttribute(this.constructor._DEACTIVATING_MARK_ATTRIBUTE())}_setActivatingMark(value){return this._$component.setAttribute(this.constructor._ACTIVATING_MARK_ATTRIBUTE(),value)}_setDeactivatingMark(value){return this._$component.setAttribute(this.constructor._DEACTIVATING_MARK_ATTRIBUTE(),value)}static create($component){var $family,componentIsElementInstance,instance,parent;componentIsElementInstance=$component instanceof Element;if(!componentIsElementInstance){throw new Error(this._$COMPONENT_INVALID_ERROR)}$family=this._query$family($component);instance=this.query($component);if($family._$parent){if(parent=this.query($family._$parent)){if(!instance){this._instances.push(instance=this._createInstance($component))}if(instance._parent!==parent){parent._children.push(instance)&&(instance._parent=parent)}$family._$children.forEach($child=>{return this.create($child)});return instance}else{this.create($family._$parent);return this.query($component)}}else{if(!instance){this._instances.push(instance=this._createInstance($component))}$family._$children.forEach($child=>{return this.create($child)});return instance}}static destroy(instance$component){var attribute,instance,results,value;instance=this.query(instance$component);if(instance){if(instance._observer){instance._disconnect()}if(instance._destroy){instance._destroy()}while(instance._children.length){this.destroy(instance._children[0])}if(instance._parent){luda.except(instance,instance._parent._children)}luda.except(instance,this._instances);results=[];for(attribute in instance){value=instance[attribute];results.push(instance[attribute]=null)}return results}}static query(instance$component){var instance;instance=null;if(instance$component instanceof this&&this._instances.includes(instance$component)){instance=instance$component}else if(instance$component instanceof Element){this._instances.some(function(inited){if(inited._$component===instance$component){instance=inited;return true}})}return instance}static _query$family($component){var _$children,_$parent;_$parent=null;_$children=[];if(this._SELECTOR){_$parent=luda.$parent(this._SELECTOR,$component);_$children=luda.$unnested(this._SELECTOR,$component,this._SELECTOR)}return{_$parent:_$parent,_$children:_$children}}static _createInstance($component){var instance;instance=new this;instance._$component=$component;instance._parent=null;instance._children=[];instance._observer=null;if(instance._constructor){instance._constructor()}if(!(instance._observer&&instance._onMutations&&this._observerConfig)){instance._observe()}return instance}static _onEleAdded($ele){return Factory._onEleAddedOrRemoved($ele,"create")}static _onEleRemoved($ele){return Factory._onEleAddedOrRemoved($ele,"destroy")}static _onEleAddedOrRemoved($ele,action){return Factory._Observed.forEach(function(Observed){if($ele.matches(Observed._SELECTOR)){return Observed[action]($ele)}return luda.$children(Observed._SELECTOR,$ele).forEach(function($child){return Observed[action]($child)})})}static _observe(classObj){if(!Factory._observer){Factory._observer=luda._observeDom(Factory._onEleAdded,Factory._onEleRemoved)}if(!Factory._Observed.includes(classObj)){return Factory._Observed.push(classObj)}}static _install(){var exposed,self;self=this;if(this===Factory){return this}if(!(this._SELECTOR||typeof this._SELECTOR!=="string")){throw new Error(this._COMPONENT_NO_SELECTOR_ERROR)}if(!this.hasOwnProperty("_instances")){this._instances=[]}if(typeof this._init==="function"){exposed=this._init()}luda.on(luda._DOC_READY,function(){luda.$children(self._SELECTOR).forEach(function($component){return self.create($component)});return Factory._observe(self)});if(exposed){return exposed}else{return this}}}Factory._SCOPE="Factory";Factory._COMPONENT_NO_SELECTOR_ERROR="Extended component must has a css selector";Factory._$COMPONENT_INVALID_ERROR="@param $component must be an instance of Element";Factory._SELECTOR="";Factory._instances=[];Factory._Observed=[];Factory._observer=null;Factory._observerConfig={childList:true,subtree:true};return Factory}.call(this));luda(function(){var _Class;_Class=class extends luda.Factory{_getConfig(){var _isReadonly,readonly;readonly=this._$component.getAttribute(this.constructor._READONLY_ATTRIBUTE);_isReadonly=readonly!==this.constructor._READONLY_FALSE_VALUE;return{_isReadonly:_isReadonly}}_constructor(){({_isReadonly:this._isReadonly}=this._getConfig());this._setOriginalTabIndex();return this._setTabIndex()}_onMutations(){return this._constructor()}_setOriginalTabIndex(){if(!this._$component.hasAttribute(this.constructor._ORIGINAL_TABINDEX_ATTRIBUTE)){return this._$component.setAttribute(this.constructor._ORIGINAL_TABINDEX_ATTRIBUTE,this._$component.tabIndex)}}_setTabIndex(){if(this._isReadonly){return this._$component.tabIndex=-1}else{return this._$component.tabIndex=this._$component.getAttribute(this.constructor._ORIGINAL_TABINDEX_ATTRIBUTE)}}};_Class._SCOPE="readonly";_Class._READONLY_ATTRIBUTE="data-readonly";_Class._ORIGINAL_TABINDEX_ATTRIBUTE="data-readonly-tabindex";_Class._READONLY_FALSE_VALUE="false";_Class._SELECTOR=`[${_Class._READONLY_ATTRIBUTE}]`;_Class._observerConfig={attributes:true,attributeFilter:[_Class._READONLY_ATTRIBUTE]};return _Class}.call(this));luda(function(){var _Class;_Class=class extends luda.Static{static _querySameName$radios($radio){var $inputs,selector;if($radio.name){selector=`${this._selector}[name=${$radio.name}]`}else{selector=this._selector}$inputs=luda.$children(selector);return $inputs.filter(function($input){return $input.tabIndex>=0})}static _query$prev$next($radio){var $next,$prev,$sameNameRadios,radioIndex;$sameNameRadios=this._querySameName$radios($radio);radioIndex=$sameNameRadios.indexOf($radio);$prev=$sameNameRadios[radioIndex-1];$next=$sameNameRadios[radioIndex+1];return{$prev:$prev,$next:$next}}static _init(){var self;self=this;return luda.on("keydown",function(e){var $next,$prev;if(!document.documentElement.hasAttribute(self._DISABLED_ATTRIBUTE)&&e.keyCode===luda.KEY_TAB&&e.target.nodeName.toUpperCase()==="INPUT"&&e.target.type==="radio"){if(e.shiftKey){if($prev=self._query$prev$next(e.target).$prev){e.preventDefault();return $prev.focus()}}else{if($next=self._query$prev$next(e.target).$next){e.preventDefault();return $next.focus()}}}})}};_Class._SCOPE="tabulate";_Class._SELECTORS=["input[type=radio]:not([disabled])"];_Class._DISABLED_ATTRIBUTE="data-tabulate-disabled";return _Class}.call(this));luda(function(){var _Class;_Class=class extends luda.Static{static activate(name$target){return this._query$targets(name$target).forEach($target=>{if($target.classList.contains(this._ACTIVE_CSS_CLASS)){return}if(this._isTransitioning($target)){return}if(this._activatePrevented($target)){return}$target.classList.add(this._ACTIVE_CSS_CLASS);this._handleActivateEnd($target);if(this._shouldAutoDeactivate($target)){return this._delayDeactivate($target)}})}static deactivate(name$target){return this._query$targets(name$target).forEach($target=>{if(!$target.classList.contains(this._ACTIVE_CSS_CLASS)){return}if(this._isTransitioning($target)){return}if(this._deactivatePrevented($target)){return}$target.classList.remove(this._ACTIVE_CSS_CLASS);return this._handleDeactivateEnd($target)})}static toggle(name$target){return this._query$targets(name$target).forEach($target=>{if($target.classList.contains(this._ACTIVE_CSS_CLASS)){return this.deactivate($target)}else{return this.activate($target)}})}static _onElementAdded($ele){this._handleActivateCancel($ele);this._handleDeactivateCancel($ele);if(this._shouldAutoDeactivate($ele)){return this._delayDeactivate($ele)}}static _shouldAutoDeactivate($target){return $target.hasAttribute(this._AUTO_DEACTIVATE_ATTRIBUTE)}static _delayDeactivate($target){var delay;delay=parseInt($target.getAttribute(this._AUTO_DEACTIVATE_ATTRIBUTE),10);if(!delay){delay=this._AUTO_DEACTIVATE_DURATION}return setTimeout(()=>{if($target){return this.deactivate($target)}},delay)}static _query$targets(name$target){if(name$target instanceof Element){return[name$target]}else{return luda.$children(`[${this._TOGGLE_TARGET_ATTRIBUTE}=${name$target}]`)}}static _init(){var clickEventSelector,self;self=this;clickEventSelector=`[${this._TOGGLE_FOR_ATTRIBUTE}],[${this._TOGGLE_ATTRIBUTE}]`;luda.on(luda._DOC_READY,function(){return luda.$children(self._selector).forEach(function($target){if(self._shouldAutoDeactivate($target)){return self._delayDeactivate($target)}})});return luda.on("click",clickEventSelector,function(e){var toggleChecked;toggleChecked=false;return luda.eventPath(e).some(function($path){var $toggle,toggleName;if($path instanceof Element){if($path.hasAttribute(self._TOGGLE_ATTRIBUTE)||$path.hasAttribute(self._TOGGLE_FOR_ATTRIBUTE)){if(toggleName=$path.getAttribute(self._TOGGLE_FOR_ATTRIBUTE)){self.toggle(toggleName);toggleChecked=true}if($path.hasAttribute(self._TOGGLE_ATTRIBUTE)){if($path.hasAttribute(self._TOGGLE_TARGET_ATTRIBUTE)){$toggle=$path}else{$toggle=luda.$parent(`[${self._TOGGLE_TARGET_ATTRIBUTE}]`,$path)}if($toggle){self.toggle($toggle);return toggleChecked=true}}}else if($path.hasAttribute(self._TOGGLE_DISABLED_ATTRIBUTE)){return toggleChecked=true}}})})}};_Class._SCOPE="toggle";_Class._TOGGLE_TARGET_ATTRIBUTE="data-toggle-target";_Class._TOGGLE_ATTRIBUTE="data-toggle";_Class._TOGGLE_FOR_ATTRIBUTE="data-toggle-for";_Class._TOGGLE_DISABLED_ATTRIBUTE="data-toggle-disabled";_Class._AUTO_DEACTIVATE_ATTRIBUTE="data-toggle-auto-deactivate";_Class._AUTO_DEACTIVATE_DURATION=3e3;_Class._ACTIVE_CSS_CLASS="toggle-active";_Class._SELECTORS=[`[${_Class._TOGGLE_TARGET_ATTRIBUTE}]`];return _Class}.call(this));luda(function(){var _Class;_Class=class extends luda.Factory{reset(){this._$file.value="";return this._setSimulatorInitialValue()}_getConfig(){var _$file,_$simulator;_$file=luda.$child(this.constructor._FILE_SELECTOR,this._$component);_$simulator=luda.$child(this.constructor._SIMULATOR_SELECTOR,this._$component);return{_$file:_$file,_$simulator:_$simulator}}_constructor(){({_$file:this._$file,_$simulator:this._$simulator}=this._getConfig());return this._init()}_onMutations(){return this._constructor()}_insertSimulator(){this._$simulator=document.createElement("input");this._$simulator.tabIndex=-1;return luda.$after(this._$simulator,this._$file)}_setPlaceholderValue(){if(this._$file.hasAttribute(this.constructor._PLACEHOLDER_ATTRIBUTE)){return this._$simulator.placeholder=this._$file.getAttribute(this.constructor._PLACEHOLDER_ATTRIBUTE)}}_setSimulatorValue(){var values;values=[];Array.from(this._$file.files).map(function(file){return values.push(file.name)});if(values.length){return this._$simulator.value=values.join(this.constructor._VALUE_SPLITOR)}return this._setSimulatorInitialValue()}_setSimulatorInitialValue(){if(this._$file.hasAttribute(this.constructor._VALUE_ATTRIBUTE)){return this._$simulator.value=this._$file.getAttribute(this.constructor._VALUE_ATTRIBUTE)}}_init(){if(this._$file){if(!this._$simulator){this._insertSimulator()}this._setPlaceholderValue();return this._setSimulatorValue()}}static reset($file){return this.query($file).reset()}static _init(){var self;self=this;luda.on("change",`${this._SELECTOR} ${this._FILE_SELECTOR}`,function(e){return self.query(luda.$parent(self._SELECTOR,this))._setSimulatorValue()});return luda.on(luda._FORM_RESET,this._SELECTOR,function(e){return setTimeout(()=>{return self.query(this)._setSimulatorValue()})})}};_Class._SCOPE="fmFile";_Class._VALUE_SPLITOR=" ";_Class._SELECTOR=".fm-file";_Class._FILE_SELECTOR="input[type=file]";_Class._SIMULATOR_SELECTOR="input:not([type=file])";_Class._PLACEHOLDER_ATTRIBUTE="placeholder";_Class._VALUE_ATTRIBUTE="value";_Class._observerConfig={childList:true,subtree:true};return _Class}.call(this));luda(function(){var _Class;_Class=class extends luda.Factory{select(indexOrIndexArray){var selectedIndexes;if(this._$select.multiple){if(this._$multipleSelectPlaceholder){selectedIndexes=indexOrIndexArray}else{selectedIndexes=indexOrIndexArray.map(function(index){return index+1})}Array.from(this._$select.options).forEach(function($option,index){return $option.selected=selectedIndexes.includes(index)});return this._markSelectedOption()}else{this._$select.selectedIndex=indexOrIndexArray;this._setSingleSelectSimulatorValue();return this._markSelectedOption()}}_getConfig(){var _$defaultSelectedOptions,_$multipleSelectPlaceholder,_$select,_$singleSelectSimulator,_defaultSelectedOptionMarked;_$select=luda.$child(this.constructor._SELECT_SELECTOR,this._$component);_$singleSelectSimulator=luda.$child(this.constructor._SINGLE_SELECT_SIMULATOR_SELECTOR,this._$component);_$multipleSelectPlaceholder=luda.$child(`.${this.constructor._MULTIPLE_SELECT_PLACEHOLDER_CSS_CLASS}`,this._$component);_$defaultSelectedOptions=luda.$children(`[${this.constructor._DEFAULT_SELECTED_OPTION_ATTRIBUTE}]`,this._$component);_defaultSelectedOptionMarked=this._$component.hasAttribute(this.constructor._INITED_ATTRIBUTE);return{_$select:_$select,_$singleSelectSimulator:_$singleSelectSimulator,_$multipleSelectPlaceholder:_$multipleSelectPlaceholder,_$defaultSelectedOptions:_$defaultSelectedOptions,_defaultSelectedOptionMarked:_defaultSelectedOptionMarked}}_constructor(){({_$select:this._$select,_$singleSelectSimulator:this._$singleSelectSimulator,_$multipleSelectPlaceholder:this._$multipleSelectPlaceholder,_$defaultSelectedOptions:this._$defaultSelectedOptions,_defaultSelectedOptionMarked:this._defaultSelectedOptionMarked}=this._getConfig());if(this._$select){if(this._$select.multiple){return this._initMultipleSelect()}else{return this._initSingleSelect()}}}_onMutations(){return this._constructor()}_markSelectedOption(){if(this._observer){this._disconnect()}Array.from(this._$select.options).forEach(function($option){if($option.selected){return $option.setAttribute("selected","selected")}else{return $option.removeAttribute("selected")}});if(!this._observer){return this._observe()}}_markDefaultSelectedOption(){this._$component.setAttribute(this.constructor._INITED_ATTRIBUTE,"");return Array.from(this._$select.options).forEach($option=>{if($option.selected){return $option.setAttribute(this.constructor._DEFAULT_SELECTED_OPTION_ATTRIBUTE,"")}})}_setSingleSelectedDefaultSelectedOption(){var hasSelected;hasSelected=Array.from(this._$select.options).some(function($option){return $option.getAttribute("selected")==="selected"});if(!hasSelected){return this._$select.selectedIndex=-1}}_insertSingleSelectSimulator(){this._$singleSelectSimulator=document.createElement("input");this._$singleSelectSimulator.tabIndex=-1;return luda.$after(this._$singleSelectSimulator,this._$select)}_setSingleSelectPlaceholderValue(){return this._$singleSelectSimulator.placeholder=this._$select.getAttribute(this.constructor._PLACEHOLDER_ATTRIBUTE)}_setSingleSelectSimulatorValue(){var $selectedOption;if($selectedOption=this._$select.options[this._$select.selectedIndex]){return this._$singleSelectSimulator.value=$selectedOption.innerText}else{return this._$singleSelectSimulator.value=""}}_initSingleSelect(){if(!this._$singleSelectSimulator){this._insertSingleSelectSimulator()}if(this._$select.hasAttribute(this.constructor._PLACEHOLDER_ATTRIBUTE)){this._setSingleSelectedDefaultSelectedOption();this._setSingleSelectPlaceholderValue()}if(!this._defaultSelectedOptionMarked){this._markDefaultSelectedOption()}this._setSingleSelectSimulatorValue();return this._markSelectedOption()}_insertMultipleSelectBlankOption(){this._$multipleSelectPlaceholder=document.createElement("option");this._$multipleSelectPlaceholder.className=this.constructor._MULTIPLE_SELECT_PLACEHOLDER_CSS_CLASS;this._$multipleSelectPlaceholder.disabled=true;return luda.$prepend(this._$multipleSelectPlaceholder,this._$select)}_setMultipleSelectPlaceholderValue(){return this._$multipleSelectPlaceholder.innerText=this._$select.getAttribute(this.constructor._PLACEHOLDER_ATTRIBUTE)}_initMultipleSelect(){if(!this._$multipleSelectPlaceholder){if(this._$select.hasAttribute(this.constructor._PLACEHOLDER_ATTRIBUTE)){this._insertMultipleSelectBlankOption();this._setMultipleSelectPlaceholderValue()}}if(!this._defaultSelectedOptionMarked){return this._markDefaultSelectedOption()}}_reset(){if(this._$select){Array.from(this._$select.options).forEach($option=>{return $option.selected=this._$defaultSelectedOptions.includes($option)});if(!this._$select.multiple){this._setSingleSelectSimulatorValue()}return this._markSelectedOption()}}static select($select,indexOrIndexArray){return this.query($select).select(indexOrIndexArray)}static _init(){var self;self=this;luda.on("change",`${this._SELECTOR} ${this._SELECT_SELECTOR}`,function(e){var instance;instance=self.query(luda.$parent(self._SELECTOR,this));if(!this.multiple){instance._setSingleSelectSimulatorValue()}return instance._markSelectedOption()});return luda.on(luda._FORM_RESET,this._SELECTOR,function(e){return setTimeout(()=>{return self.query(this)._reset()})})}};_Class._SCOPE="fmSelect";_Class._SELECTOR=".fm-select";_Class._SELECT_SELECTOR="select";_Class._SINGLE_SELECT_SIMULATOR_SELECTOR="input";_Class._PLACEHOLDER_ATTRIBUTE="placeholder";_Class._MULTIPLE_SELECT_PLACEHOLDER_CSS_CLASS="fm-select-multiple-placeholder";_Class._DEFAULT_SELECTED_OPTION_ATTRIBUTE="data-fm-select-default-selected";_Class._INITED_ATTRIBUTE="data-fm-select-inited";_Class._observerConfig={childList:true,attributes:true,subtree:true,attributeFilter:["selected"]};return _Class}.call(this));luda(function(){var _Class;_Class=class extends luda.Factory{activate(index){var action,activatedIndex;if(this._$items.length&&!this._isTransitioning()){activatedIndex=this._activeIndex;if(index!=null&&index!==this._activeIndex&&(0<=index&&index<=this._$items.length-1)&&this._canTransition(index,activatedIndex)){this._activeIndex=index;action=index<activatedIndex?"_slidePrev":"_slideNext";return this[action](activatedIndex)}}}next(){var activatedIndex,index;if(this._$items.length&&!this._isTransitioning()){activatedIndex=this._activeIndex;index=activatedIndex+1;if(index>this._$items.length-1){if(!this._wrap){return}index=0}if(!this._canTransition(index,activatedIndex)){return}this._activeIndex=index;this._slideNext(activatedIndex);this._playTimeStamp=Date.now();return this._pausedRemainTime=this._interval}}prev(){var activatedIndex,index;if(this._$items.length&&!this._isTransitioning()){activatedIndex=this._activeIndex;index=activatedIndex-1;if(index<0){if(!this._wrap){return}index=this._$items.length-1}if(!this._canTransition(index,activatedIndex)){return}this._activeIndex=index;this._slidePrev(activatedIndex);this._playTimeStamp=Date.now();return this._pausedRemainTime=this._interval}}pause(){if(this._intervaling!=null){clearInterval(this._intervaling);this._intervaling=null;return this._pausedRemainTime=this._pausedRemainTime-(Date.now()-this._playTimeStamp)}}play(){var execute;if(this._interval&&this._$items.length>1){this._playTimeStamp=Date.now();this.pause();execute=(()=>{this.next();return this._intervaling=setInterval(this.next.bind(this),this._interval)});return this._intervaling=setTimeout(execute,this._pausedRemainTime)}}_getConfig(){var _$indicators,_$items,_$nextControl,_$prevControl,_activeIndex,_interval,_wrap;_$items=luda.$unnested(this.constructor._ITEMS_SELECTOR,this._$component,this.constructor._SELECTOR);_$indicators=luda.$unnested(this.constructor._INDICATORS_SELECTOR,this._$component,this.constructor._SELECTOR);_$prevControl=luda.$child(this.constructor._PREV_CONTROL_SELECTOR,this._$component);_$nextControl=luda.$child(this.constructor._NEXT_CONTROL_SELECTOR,this._$component);_activeIndex=_$items.indexOf(luda.$child(`.${this.constructor._ITEM_ACTIVE_CSS_CLASS}`,this._$component));if(_activeIndex===-1){_activeIndex=this.constructor._ACTIVE_INDEX}_interval=this._$component.getAttribute(this.constructor._INTERVAL_ATTRIBUTE);if(_interval===this.constructor._FALSE){_interval=false}else{_interval=Math.abs(parseInt(_interval,10))||this.constructor._INTERVAL}_wrap=this._$component.getAttribute(this.constructor._WRAP_ATTRIBUTE);_wrap=_wrap===this.constructor._FALSE?false:this.constructor._WRAP;return{_$items:_$items,_$indicators:_$indicators,_$prevControl:_$prevControl,_$nextControl:_$nextControl,_activeIndex:_activeIndex,_interval:_interval,_wrap:_wrap}}_constructor(){({_$items:this._$items,_$indicators:this._$indicators,_$prevControl:this._$prevControl,_$nextControl:this._$nextControl,_activeIndex:this._activeIndex,_interval:this._interval,_wrap:this._wrap}=this._getConfig());this._intervaling=null;this._playTimeStamp=0;this._pausedRemainTime=this._interval;this._layout();this._handleTransitionCancel();return this.play()}_onMutations(mutations){({_$items:this._$items,_$indicators:this._$indicators,_$prevControl:this._$prevControl,_$nextControl:this._$nextControl,_activeIndex:this._activeIndex,_interval:this._interval,_wrap:this._wrap}=this._getConfig());this._setIndicatorsState();this._setDirectionControlState();return this.play()}_destroy(){return this.pause()}_layout(){this._$items.forEach(($item,index)=>{$item.style.transition="none";if(index>this._activeIndex){$item.classList.add(this.constructor._ITEM_NEXT_CSS_CLASS);$item.classList.remove(this.constructor._ITEM_PREV_CSS_CLASS);$item.classList.remove(this.constructor._ITEM_ACTIVE_CSS_CLASS)}else if(index<this._activeIndex){$item.classList.add(this.constructor._ITEM_PREV_CSS_CLASS);$item.classList.remove(this.constructor._ITEM_NEXT_CSS_CLASS);$item.classList.remove(this.constructor._ITEM_ACTIVE_CSS_CLASS)}else{$item.classList.add(this.constructor._ITEM_ACTIVE_CSS_CLASS);$item.classList.remove(this.constructor._ITEM_NEXT_CSS_CLASS);$item.classList.remove(this.constructor._ITEM_PREV_CSS_CLASS)}luda.reflow($item);return $item.style.transition=""});this._setIndicatorsState();return this._setDirectionControlState()}_slideNext(activatedIndex){var $activatedItem,$item;if(this._$items.length>1){$item=this._$items[this._activeIndex];$activatedItem=this._$items[activatedIndex];$item.style.transition="none";$item.classList.remove(this.constructor._ITEM_PREV_CSS_CLASS);$item.classList.add(this.constructor._ITEM_NEXT_CSS_CLASS);luda.reflow($item);$item.style.transition="";$item.classList.remove(this.constructor._ITEM_NEXT_CSS_CLASS);$item.classList.add(this.constructor._ITEM_ACTIVE_CSS_CLASS);$activatedItem.classList.remove(this.constructor._ITEM_ACTIVE_CSS_CLASS);$activatedItem.classList.add(this.constructor._ITEM_PREV_CSS_CLASS);this._handleTransitionEnd(this._activeIndex,activatedIndex);this._setIndicatorsState();return this._setDirectionControlState()}}_slidePrev(activatedIndex){var $activatedItem,$item;if(this._$items.length>1){$item=this._$items[this._activeIndex];$activatedItem=this._$items[activatedIndex];$item.style.transition="none";$item.classList.remove(this.constructor._ITEM_NEXT_CSS_CLASS);$item.classList.add(this.constructor._ITEM_PREV_CSS_CLASS);luda.reflow($item);$item.style.transition="";$item.classList.remove(this.constructor._ITEM_PREV_CSS_CLASS);$item.classList.add(this.constructor._ITEM_ACTIVE_CSS_CLASS);$activatedItem.classList.remove(this.constructor._ITEM_ACTIVE_CSS_CLASS);$activatedItem.classList.add(this.constructor._ITEM_NEXT_CSS_CLASS);this._handleTransitionEnd(this._activeIndex,activatedIndex);this._setIndicatorsState();return this._setDirectionControlState()}}_canTransition(activeIndex,activatedIndex){return!this._activatePrevented(this._$items[activeIndex],activeIndex)&&!this._deactivatePrevented(this._$items[activatedIndex],activatedIndex)}_handleTransitionEnd(activeIndex,activatedIndex){var activateDuration,deactivateDuration;activateDuration=this._handleActivateEnd(this._$items[activeIndex],activeIndex);return deactivateDuration=this._handleDeactivateEnd(this._$items[activatedIndex],activatedIndex)}_handleTransitionCancel(){var activatedIndex,index;if(this._isActivating()){index=parseInt(this._getActivatingMark(),10);this._handleActivateCancel(this._$items[index],index)}if(this._isDeactivating()){activatedIndex=parseInt(this._getDeactivatingMark(),10);return this._handleDeactivateCancel(this._$items[activatedIndex],activatedIndex)}}_setIndicatorsState(){return this._$indicators.forEach(($indicator,index)=>{return $indicator.disabled=index===this._activeIndex})}_setDirectionControlState(){var ref,ref1,ref2,ref3;if(this._$items.length<=1){return(ref=this._$prevControl)!=null?ref.disabled=(ref1=this._$nextControl)!=null?ref1.disabled=true:void 0:void 0}else{if((ref2=this._$prevControl)!=null){ref2.disabled=this._activeIndex===0&&!this._wrap}return(ref3=this._$nextControl)!=null?ref3.disabled=this._activeIndex===this._$items.length-1&&!this._wrap:void 0}}static activate($carousel,index){return this.query($carousel).activate(index)}static next($carousel){return this.query($carousel).next()}static prev($carousel){return this.query($carousel).prev()}static pause($carousel){return this.query($carousel).pause()}static play($carousel){return this.query($carousel).play()}static _init(){var self;self=this;luda.on("click",this._INDICATORS_SELECTOR,function(e){var instance;instance=self.query(luda.$parent(self._SELECTOR,this));return instance.activate(instance._$indicators.indexOf(this))});luda.on("touchstart",this._SELECTOR,function(e){return self.query(this).pause()});luda.on("touchend",this._SELECTOR,function(e){return setTimeout(()=>{return self.query(this).play()})});luda.on("mouseover",this._SELECTOR,function(e){return self.query(this).pause()});luda.on("mouseout",this._SELECTOR,function(e){return self.query(this).play()});luda.on(luda._SWIPE_LEFT_OR_UP,this._SELECTOR,function(startE,e){return self.query(this).next()});luda.on(luda._SWIPE_RIGHT_OR_DOWN,this._SELECTOR,function(startE,e){return self.query(this).prev()});luda.on("click",this._PREV_CONTROL_SELECTOR,function(e){return self.query(luda.$parent(self._SELECTOR,this)).prev()});return luda.on("click",this._NEXT_CONTROL_SELECTOR,function(e){return self.query(luda.$parent(self._SELECTOR,this)).next()})}};_Class._SCOPE="carousel";_Class._SELECTOR=".carousel";_Class._ITEMS_SELECTOR=".carousel-item";_Class._PREV_CONTROL_SELECTOR=".carousel-prev";_Class._NEXT_CONTROL_SELECTOR=".carousel-next";_Class._INDICATORS_SELECTOR=".carousel-indicators .btn";_Class._INTERVAL_ATTRIBUTE="data-carousel-interval";_Class._WRAP_ATTRIBUTE="data-carousel-wrap";_Class._ACTIVATED_INDEX_ATTRIBUTE="data-carousel-activated-index";_Class._ITEM_ACTIVE_CSS_CLASS="carousel-item-active";_Class._ITEM_NEXT_CSS_CLASS="carousel-item-next";_Class._ITEM_PREV_CSS_CLASS="carousel-item-prev";_Class._ACTIVE_INDEX=0;_Class._INTERVAL=5e3;_Class._WRAP=true;_Class._FALSE="false";_Class._observerConfig={childList:true,attributes:true,subtree:true,attributeFilter:[_Class._INTERVAL_ATTRIBUTE,_Class._WRAP_ATTRIBUTE]};return _Class}.call(this));luda(function(){var _Class;_Class=class extends luda.Factory{activate(){var ref;if(this._isActive()||this._isTransitioning()){return}if(this._activatePrevented(this._$menu)){return}this._$component.classList.add(this.constructor._ACTIVE_CSS_CLASS);this.constructor._$focused.push(document.activeElement);if((ref=this._parent)!=null){ref.activate()}return this._handleActivateEnd(this._$menu)}deactivate(focus){var ref;if(!(this._isActive()&&!this._isTransitioning())){return}if(this._deactivatePrevented(this._$menu)){return}this._$component.classList.remove(this.constructor._ACTIVE_CSS_CLASS);this._children.forEach(function(child){return child.deactivate()});if(focus){if((ref=this.constructor._$focused[this.constructor._$focused.length-1])!=null){ref.focus()}}this.constructor._$focused.splice(this.constructor._$focused.length-1,1);return this._handleDeactivateEnd(this._$menu)}toggle(focus){if(this._isActive()){return this.deactivate(focus)}else{return this.activate()}}_prev(){var focusIndex;if(this._$items.length&&this._isActive()){focusIndex=this._$items.indexOf(document.activeElement)-1;if(focusIndex<0){focusIndex=0}return this._$items[focusIndex].focus()}}_next(){var focusIndex;if(this._$items.length&&this._isActive()){focusIndex=this._$items.indexOf(document.activeElement)+1;if(focusIndex>this._$items.length-1){focusIndex=this._$items.length-1}return this._$items[focusIndex].focus()}}_getConfig(){var _$items,_$menu,_$noneSwitches,_$switches,_isStandalone;_$menu=luda.$child(this.constructor._MENU_SELECTOR,this._$component);_$switches=luda.$unnested(this.constructor._SWITCHES_SELECTOR,this._$component,this.constructor._SELECTOR).concat(luda.$unnested(this.constructor._SWITCHES_SELECTOR,_$menu,this.constructor._MENU_SELECTOR));_$noneSwitches=luda.$unnested(this.constructor._NONE_SWITCHES_SELECTOR,this._$component,this.constructor._SELECTOR).concat(luda.$unnested(this.constructor._NONE_SWITCHES_SELECTOR,_$menu,this.constructor._MENU_SELECTOR));_$items=luda.$unnested(this.constructor._ITEMS_SELECTOR,_$menu,this.constructor._MENU_SELECTOR);_isStandalone=this._$component.hasAttribute(this.constructor._STANDALONE_ATTRIBUTE);return{_$menu:_$menu,_$items:_$items,_$switches:_$switches,_$noneSwitches:_$noneSwitches,_isStandalone:_isStandalone}}_constructor(){this._onMutations();this._handleActivateCancel(this._$menu);return this._handleDeactivateCancel(this._$menu)}_onMutations(mutations){return({_$menu:this._$menu,_$items:this._$items,_$switches:this._$switches,_$noneSwitches:this._$noneSwitches,_isStandalone:this._isStandalone}=this._getConfig())}_isActive(){return this._$component.classList.contains(this.constructor._ACTIVE_CSS_CLASS)}_deactivateChildrenExcept(exceptions){if(exceptions&&!(exceptions instanceof Array)){exceptions=[exceptions]}if(exceptions){return this._children.forEach(function(child){if(child._isActive()&&!exceptions.includes(child)){return child.deactivate()}})}else{return this._children.forEach(function(child){if(child._isActive()){return child.deactivate()}})}}static activate($dropdown){return this.query($dropdown).activate()}static deactivate($dropdown,focus){return this.query($dropdown).deactivate(focus)}static toggle($dropdown,focus){return this.query($dropdown).toggle(focus)}static deactivateExcept(instances$dropdowns){var exceptions;exceptions=[];if(instances$dropdowns&&!(instances$dropdowns instanceof Array)){instances$dropdowns=[instances$dropdowns]}if(instances$dropdowns){instances$dropdowns.forEach(instance$dropdown=>{var exception;if(exception=this.query(instance$dropdown)){return exceptions.push(exception)}})}if(exceptions.length){return this._instances.forEach(function(instance){var instanceHasntExceptionChild,instanceIsntInExceptions;instanceIsntInExceptions=!exceptions.includes(instance);instanceHasntExceptionChild=exceptions.every(function(exception){return!instance._hasDescendant(exception)});if(instance._isActive()&&instanceIsntInExceptions&&instanceHasntExceptionChild){return instance.deactivate()}})}else{return this._instances.forEach(function(instance){if(instance._isActive()){return instance.deactivate()}})}}static _standaloneInstances(){return this._instances.filter(function(instance){if(instance._isStandalone){return instance}})}static _init(){var self;self=this;luda.onOpposite("click",this._SELECTOR,function(e){return self.deactivateExcept(self._standaloneInstances())});luda.on("click",this._SELECTOR,function(e){var focus,instance,toggleChecked;if(instance=self.query(this)){toggleChecked=false;focus=!e.detail;self.deactivateExcept(self._standaloneInstances().concat(instance));instance._deactivateChildrenExcept();if(instance._parent){instance._parent._deactivateChildrenExcept(instance)}if(instance._$switches.length||instance._$noneSwitches.length){luda.eventPath(e).some(function($path){if(instance._$switches.includes($path)){instance.toggle(focus);return toggleChecked=true}else if(instance._$noneSwitches.includes($path)){return toggleChecked=true}})}if(!toggleChecked){return instance.toggle(focus)}}});luda.onOpposite("keyup",this._SELECTOR,function(e){return self.deactivateExcept()});luda.on("keyup",this._SELECTOR,function(e){var instance;if(e.keyCode===luda.KEY_TAB&&(instance=self.query(this))){self.deactivateExcept(instance);return instance.activate()}});luda.on("keydown",this._SELECTOR,function(e){var instance,ref;if(e.keyCode===luda.KEY_ESC&&(instance=self.query(this))){e.preventDefault();if(instance._isActive()){return instance.deactivate(true)}else{return(ref=instance._parent)!=null?ref.deactivate(true):void 0}}});return luda.on("keydown",this._SELECTOR,function(e){var instance,ref,ref1;if([luda.KEY_LEFT,luda.KEY_UP].includes(e.keyCode)&&(instance=self.query(this))){e.preventDefault();if(instance._isActive()){return instance._prev()}else{return(ref=instance._parent)!=null?ref._prev():void 0}}else if([luda.KEY_RIGHT,luda.KEY_DOWN].includes(e.keyCode)&&(instance=self.query(this))){e.preventDefault();if(instance._isActive()){return instance._next()}else{return(ref1=instance._parent)!=null?ref1._next():void 0}}})}};_Class._SCOPE="dropdown";_Class._SELECTOR=".dropdown-fixed,.dropdown-absolute, .dropdown-static,.dropdown-absolute-m";_Class._MENU_SELECTOR=".dropdown-menu";_Class._ITEMS_SELECTOR="a[href]:not([disabled]),button:not([disabled]), input:not([disabled]),[tabindex]:not([disabled])";_Class._TOGGLE_ATTRIBUTE="data-dropdown-toggle";_Class._TOGGLE_DISABLED_ATTRIBUTE="data-dropdown-toggle-disabled";_Class._STANDALONE_ATTRIBUTE="data-dropdown-standalone";_Class._SWITCHES_SELECTOR=`[${_Class._TOGGLE_ATTRIBUTE}]`;_Class._NONE_SWITCHES_SELECTOR=`[${_Class._TOGGLE_DISABLED_ATTRIBUTE}]`;_Class._ACTIVE_CSS_CLASS="dropdown-active";_Class._observerConfig={childList:true,attributes:true,subtree:true,attributeFilter:[_Class._TOGGLE_ATTRIBUTE,_Class._TOGGLE_DISABLED_ATTRIBUTE,_Class._STANDALONE_ATTRIBUTE]};_Class._$focused=[];return _Class}.call(this));luda(function(){var _Class;_Class=class extends luda.Factory{_getConfig(){var _$defaultValues,_$valueHolder,_$values;_$values=luda.$children(this.constructor._VALUE_SELECTOR,this._$component);_$defaultValues=luda.$children(this.constructor._DEFAULT_VALUE_SELECTOR,this._$component);_$valueHolder=luda.$child(this.constructor._VALUE_HOLDER_SELECTOR,this._$component);return{_$values:_$values,_$valueHolder:_$valueHolder,_$defaultValues:_$defaultValues}}_constructor(){({_$values:this._$values,_$valueHolder:this._$valueHolder,_$defaultValues:this._$defaultValues}=this._getConfig());this._setValueHolderAttribute();return this._setValueHolderValue()}_onMutations(){return this._constructor()}_setValueHolderValue(){var values;values=[];this._$values.forEach(($value,index)=>{var value;if($value.checked){if($value.hasAttribute(this.constructor._LABEL_ATTRIBUTE)){value=$value.getAttribute(this.constructor._LABEL_ATTRIBUTE)}else{value=this._$defaultValues[index].innerText}}if(value&&!values.includes(value)){return values.push(value)}});if(this._$valueHolder){return this._$valueHolder.value=values.join(this.constructor._VALUE_SPLITOR)}}_setValueHolderAttribute(){if(this._$valueHolder){return this._$valueHolder.setAttribute("readonly","")}}static _init(){var self;self=this;luda.enter._add(this._ENTER_BEHAVIOR_SELECTOR);luda.on("change",`${this._SELECTOR} ${this._VALUE_SELECTOR}`,function(e){return self.query(luda.$parent(self._SELECTOR,this))._setValueHolderValue()});luda.on(luda._FORM_RESET,this._SELECTOR,function(e){return setTimeout(()=>{return self.query(this)._setValueHolderValue()})});if(/iphone/i.test(navigator.userAgent)||/ipad/i.test(navigator.userAgent)){return luda.on("focusin",this._ENTER_BEHAVIOR_SELECTOR,function(e){this.blur();return this.classList.add(luda.focus._CSS_CLASS)})}}};_Class._SCOPE="fmDropdown";_Class._SELECTOR=".fm-dropdown";_Class._VALUE_SPLITOR=" ";_Class._LABEL_ATTRIBUTE="data-fm-dropdown-label";_Class._VALUE_SELECTOR=".dropdown-items .btn-radio input, .dropdown-items .btn-check input";_Class._DEFAULT_VALUE_SELECTOR=".dropdown-items .btn-radio label, .dropdown-items .btn-check label";_Class._VALUE_HOLDER_SELECTOR=".fm input";_Class._ENTER_BEHAVIOR_SELECTOR=".fm-dropdown .fm input";_Class._observerConfig={childList:true,attributes:true,subtree:true,attributeFilter:["checked",_Class._LABEL_ATTRIBUTE]};return _Class}.call(this));luda(function(){var _Class;_Class=class extends luda.Factory{activate(index){var activatedIndex;if(this._$panes.length&&!this._isTransitioning()){activatedIndex=this._activeIndex;if(index!=null&&index!==this._activeIndex&&(0<=index&&index<=this._$panes.length-1)){if(!this._canTransition(index,activatedIndex)){return}this._activeIndex=index;return this._activate(activatedIndex)}}}_getConfig(){var _$indicators,_$panes,_activeIndex;_$panes=luda.$unnested(this.constructor._PANE_SELECTOR,this._$component,this.constructor._SELECTOR);_$indicators=luda.$unnested(this.constructor._INDICATOR_SELECTOR,this._$component,this.constructor._SELECTOR);_activeIndex=this.constructor._ACTIVE_INDEX;_$indicators.some(function($indicator,index){if($indicator.checked){_activeIndex=index;return true}});return{_$panes:_$panes,_$indicators:_$indicators,_activeIndex:_activeIndex}}_constructor(){({_$panes:this._$panes,_$indicators:this._$indicators,_activeIndex:this._activeIndex}=this._getConfig());this._layout();return this._handleTransitionCancel()}_onMutations(mutations){({_$panes:this._$panes,_$indicators:this._$indicators,_activeIndex:this._activeIndex}=this._getConfig());return this._setIndicatorsState()}_layout(){this._$panes.forEach(($pane,index)=>{$pane.style.transition="none";if(index===this._activeIndex){$pane.classList.add(this.constructor._PANE_ACTIVE_CSS_CLASS)}else{$pane.classList.remove(this.constructor._PANE_ACTIVE_CSS_CLASS)}luda.reflow($pane);return $pane.style.transition=""});return this._setIndicatorsState()}_activate(activatedIndex){var $activatedPane,$pane;$pane=this._$panes[this._activeIndex];$activatedPane=this._$panes[activatedIndex];$pane.classList.add(this.constructor._PANE_ACTIVE_CSS_CLASS);$activatedPane.classList.remove(this.constructor._PANE_ACTIVE_CSS_CLASS);this._handleTransitionEnd(this._activeIndex,activatedIndex);return this._setIndicatorsState()}_canTransition(activeIndex,activatedIndex){return!this._activatePrevented(this._$panes[activeIndex],activeIndex)&&!this._deactivatePrevented(this._$panes[activatedIndex],activatedIndex)}_handleTransitionEnd(activeIndex,activatedIndex){var activateDuration,deactivateDuration;activateDuration=this._handleActivateEnd(this._$panes[activeIndex],activeIndex);return deactivateDuration=this._handleDeactivateEnd(this._$panes[activatedIndex],activatedIndex)}_handleTransitionCancel(){var activatedIndex,index;if(this._isActivating()){index=parseInt(this._getActivatingMark(),10);this._handleActivateCancel(this._$panes[index],index)}if(this._isDeactivating()){activatedIndex=parseInt(this._getDeactivatingMark(),10);return this._handleDeactivateCancel(this._$panes[activatedIndex],activatedIndex)}}_setIndicatorsState(){return this._$indicators.forEach(($indicator,index)=>{if(index===this._activeIndex){$indicator.setAttribute("checked","");return $indicator.checked=true}else{$indicator.removeAttribute("checked");return $indicator.checked=false}})}static activate($tab,index){return this.query($tab).activate(index)}static _init(){var self;self=this;return luda.on("change",this._INDICATOR_SELECTOR,function(e){var instance;if(this.checked){instance=self.query(luda.$parent(self._SELECTOR,this));instance._setIndicatorsState();return instance.activate(instance._$indicators.indexOf(this))}})}};_Class._SCOPE="tab";_Class._SELECTOR=".tab";_Class._PANE_SELECTOR=".tab-pane";_Class._INDICATOR_SELECTOR=".tab-indicators .btn-radio input[type=radio]";_Class._PANE_ACTIVE_CSS_CLASS="tab-pane-active";_Class._ACTIVE_INDEX=0;_Class._observerConfig={childList:true,subtree:true};return _Class}.call(this))});
7
7
  //# sourceMappingURL=luda.min.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/coffee/install.coffee","../../src/coffee/constants.coffee","../../src/coffee/dom.coffee","../../src/coffee/event.coffee","../../src/coffee/utilities.coffee","../../src/coffee/static.coffee","../../src/coffee/behaviors/enter.coffee","../../src/coffee/behaviors/focus.coffee","../../src/coffee/behaviors/tabulate.coffee","../../src/coffee/factory.coffee","../../src/coffee/behaviors/readonly.coffee","../../src/coffee/behaviors/toggle.coffee","../../src/coffee/elements/form-file.coffee","../../src/coffee/elements/form-select.coffee","../../src/coffee/patterns/carousel.coffee","../../src/coffee/patterns/dropdown.coffee","../../src/coffee/patterns/form-dropdown.coffee","../../src/coffee/patterns/tab.coffee"],"names":["ENV","document","window","global","Error","luda","installer","installed","name","property","includes","hasOwnProperty","_SCOPE","_install","Array","namespace","installedInstaller","installedName","ref","console","warn","KEY_LEFT","KEY_UP","KEY_RIGHT","KEY_DOWN","KEY_TAB","KEY_ESC","KEY_ENTER","$child","selector","$ancestor","querySelector","$children","$descendant","descendants","this","from","querySelectorAll","$unnested","ancestorSelector","filter","$parent","parentNode","matches","$parents","_ancestors","push","$after","$node","$target","lastChild","appendChild","insertBefore","nextSibling","$prepend","firstChild","reflow","$element","offsetHeight","_getTransitionDurations","style","propertyLength","durationArray","split","length","concat","slice","map","durationStr","duration","parseFloat","match","getTransitionDuration","delays","durations","finalDurations","styles","getComputedStyle","transitionProperty","transitionDelay","transitionDuration","index","Math","max","apply","_observeDom","onNodeAdded","onNodeRemoved","observer","observerConfig","childList","subtree","MutationObserver","mutations","forEach","mutation","$addedNodes","$removedNodes","removedNodes","addedNodes","Element","observe","documentElement","splice","_SWIPE_DISTANCE","_EVENT_TYPE_PREFIX","_SWIPE_LEFT","_SWIPE_RIGHT","_SWIPE_UP","_SWIPE_DOWN","_SWIPE_LEFT_OR_UP","_SWIPE_RIGHT_OR_DOWN","_DOC_READY","_FORM_RESET","eventPath","event","path","composedPath","target","on","handler","call","_onDocReady","_onReset","_onSwipe","_on","onOpposite","_self","addEventListener","e","trigger","every","dispatch","type","detail","delayMilliseconds","options","evt","bubbles","cancelable","composed","Event","setTimeout","dispatchEvent","readyState","bind","$touchStartElement","touchStartE","touchStartX","touchStartY","watch","touches","screenX","screenY","some","eventX","eventXOrY","eventY","touchDistanceX","touchDistanceY","abs","except","element","arr","indexOf","Static","[object Object]","_SELECTOR_INVALID_ERROR","_SELECTORS","_mergeSelectors","_selector","join","$ele","activateEvent","_ACTIVATE_EVENT_TYPE","defaultPrevented","deactivateEvent","_DEACTIVATE_EVENT_TYPE","activateDuration","_setActivatingMark","_ACTIVATED_EVENT_TYPE","_removeActivatingMark","deactivateDuration","_setDeactivatingMark","_DEACTIVATED_EVENT_TYPE","_removeDeactivatingMark","_isActivating","_isDeactivating","hasAttribute","_ACTIVATING_MARK_ATTRIBUTE","_DEACTIVATING_MARK_ATTRIBUTE","getAttribute","removeAttribute","value","setAttribute","_onEleAddedOrRemoved","action","_Observed","Observed","$matched","unshift","classObj","_observer","_onEleAdded","_onEleRemoved","_onElementAdded","_onElementRemoved","exposed","self","_init","_observe","_DISABLED_ATTRIBUTE","keyCode","preventDefault","click","_Class","$exception","_$focus","$focus","classList","remove","_CSS_CLASS","body","add","_isActive","_removeFocusClassExcept","_addFocusClassExceptHtmlAndBody","_PARENT_FOCUS_CHILDREN_SELECTOR","_PARENT_FOCUS_SELECTOR","blur","focus","HTMLElement","prototype","arguments","activeElement","_setElementPrototype","_changeFocusStateOnKeyEvent","_changeFocusStateOnMouseDownEvent","_TOUCHSTART_FOCUS_SELECTOR","getElementsByClassName","$radio","$inputs","$input","tabIndex","$next","$prev","$sameNameRadios","radioIndex","_querySameName$radios","nodeName","toUpperCase","shiftKey","_query$prev$next","Factory","descendant","_children","child","_hasDescendant","_onMutations","_$component","constructor","_observerConfig","disconnect","$component","$family","componentIsElementInstance","instance","parent","_$COMPONENT_INVALID_ERROR","_query$family","query","_$parent","_instances","_createInstance","_parent","_$children","create","instance$component","attribute","results","_disconnect","_destroy","destroy","inited","_SELECTOR","_constructor","_COMPONENT_NO_SELECTOR_ERROR","_isReadonly","_originalTabIndex","readonly","_READONLY_ATTRIBUTE","_READONLY_FALSE_VALUE","_getConfig","_setTabIndex","attributes","attributeFilter","name$target","_query$targets","contains","_ACTIVE_CSS_CLASS","_isTransitioning","_activatePrevented","_handleActivateEnd","_shouldAutoDeactivate","_delayDeactivate","_deactivatePrevented","_handleDeactivateEnd","deactivate","activate","_handleActivateCancel","_handleDeactivateCancel","_AUTO_DEACTIVATE_ATTRIBUTE","delay","parseInt","_AUTO_DEACTIVATE_DURATION","_TOGGLE_TARGET_ATTRIBUTE","clickEventSelector","_TOGGLE_FOR_ATTRIBUTE","_TOGGLE_ATTRIBUTE","toggleChecked","$path","$toggle","toggleName","toggle","_TOGGLE_DISABLED_ATTRIBUTE","_$file","_$simulator","_FILE_SELECTOR","_SIMULATOR_SELECTOR","createElement","placeholder","_PLACEHOLDER_ATTRIBUTE","values","files","file","_VALUE_SPLITOR","_VALUE_ATTRIBUTE","_insertSimulator","_setPlaceholderValue","_setSimulatorValue","$file","reset","indexOrIndexArray","selectedIndexes","_$select","multiple","_$multipleSelectPlaceholder","$option","selected","_markSelectedOption","selectedIndex","_setSingleSelectSimulatorValue","_$defaultSelectedOptions","_$singleSelectSimulator","_defaultSelectedOptionMarked","_SELECT_SELECTOR","_SINGLE_SELECT_SIMULATOR_SELECTOR","_MULTIPLE_SELECT_PLACEHOLDER_CSS_CLASS","_DEFAULT_SELECTED_OPTION_ATTRIBUTE","_INITED_ATTRIBUTE","_initMultipleSelect","_initSingleSelect","hasSelected","$selectedOption","innerText","_insertSingleSelectSimulator","_setSingleSelectedDefaultSelectedOption","_setSingleSelectPlaceholderValue","_markDefaultSelectedOption","className","disabled","_insertMultipleSelectBlankOption","_setMultipleSelectPlaceholderValue","$select","select","_reset","activatedIndex","_$items","_activeIndex","_canTransition","_wrap","_slideNext","_playTimeStamp","Date","now","_pausedRemainTime","_interval","_slidePrev","_intervaling","clearInterval","execute","pause","next","setInterval","_$indicators","_$nextControl","_$prevControl","_ITEMS_SELECTOR","_INDICATORS_SELECTOR","_PREV_CONTROL_SELECTOR","_NEXT_CONTROL_SELECTOR","_ITEM_ACTIVE_CSS_CLASS","_ACTIVE_INDEX","_INTERVAL_ATTRIBUTE","_FALSE","_INTERVAL","_WRAP_ATTRIBUTE","_WRAP","_layout","_handleTransitionCancel","play","_setIndicatorsState","_setDirectionControlState","$item","transition","_ITEM_NEXT_CSS_CLASS","_ITEM_PREV_CSS_CLASS","$activatedItem","_handleTransitionEnd","activeIndex","_getActivatingMark","_getDeactivatingMark","$indicator","ref1","ref2","ref3","$carousel","prev","startE","_ACTIVATED_INDEX_ATTRIBUTE","_$menu","_$focused","focusIndex","_$noneSwitches","_$switches","_isStandalone","_MENU_SELECTOR","_SWITCHES_SELECTOR","_NONE_SWITCHES_SELECTOR","_STANDALONE_ATTRIBUTE","exceptions","$dropdown","instances$dropdowns","instance$dropdown","exception","instanceHasntExceptionChild","instanceIsntInExceptions","deactivateExcept","_standaloneInstances","_deactivateChildrenExcept","_prev","_next","_$defaultValues","_$valueHolder","_$values","_VALUE_SELECTOR","_DEFAULT_VALUE_SELECTOR","_VALUE_HOLDER_SELECTOR","_setValueHolderAttribute","_setValueHolderValue","$value","checked","_LABEL_ATTRIBUTE","enter","_add","_ENTER_BEHAVIOR_SELECTOR","test","navigator","userAgent","_$panes","_activate","_PANE_SELECTOR","_INDICATOR_SELECTOR","$pane","_PANE_ACTIVE_CSS_CLASS","$activatedPane","$tab"],"mappings":";;;;;2LAAA,IAAAA,IAAAA,IAAM,WACJ,UAAUC,WAAc,YAAxB,CACE,UAAwBC,SAAY,YAApC,CAAA,OAAOA,OACP,UAAwBC,SAAY,YAApC,CAAA,OAAOA,QACT,MAAM,IAAIC,MAAM,oCAJZ,GASN,UAAcJ,IAAIK,OAAQ,WAA1B,CACEL,IAAIK,KAAO,SAACC,WACV,IAAAC,UAAAC,KAAAC,S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zP,OACnDuO,SAASiJ,6BACTjJ,SAAS0C,SAAS1C,SAASgI,aAAatO,QAAQjI,YA7GtDoL,OAAC3M,OAAQ,MAET2M,OAACqE,UAAW,OACZrE,OAACgQ,eAAgB,YACjBhQ,OAACiQ,oBAAqB,+CACtBjQ,OAACmQ,uBAAwB,kBACzBnQ,OAAC2L,cAAe,EAEhB3L,OAAC8C,gBACC,CAAA3K,UAAW,KACXC,QAAS","sourcesContent":["ENV = (->\n if typeof document isnt 'undefined'\n return window if typeof window isnt 'undefined'\n return global if typeof global isnt 'undefined'\n throw new Error 'Unsupported runtime environment.'\n)()\n\n\n\nunless typeof ENV.luda is 'function'\n ENV.luda = (installer) ->\n throw new Error 'Installer cannot be detected.' unless installer\n unless ['object', 'function'].includes typeof installer\n throw new Error 'Installer must be object, array or function.'\n if installer.hasOwnProperty '_SCOPE'\n unless typeof installer._SCOPE is 'string'\n throw new Error '_SCOPE must be string'\n return ENV.luda._install installer._SCOPE, installer\n if installer instanceof Array or typeof installer is 'function'\n throw new Error 'Unscoped installer must be object.'\n installed = {}\n for name, property of installer\n installed[name] = ENV.luda._install name, property\n installed\n\n ENV.luda._install = (namespace, installer) ->\n if ENV.luda[namespace]\n console.warn \"Namespace #{namespace} is ocupied, sikp installation.\"\n return ENV.luda[namespace]\n for installedName, installedInstaller of ENV.luda\n if installer is installedInstaller\n console.warn \"Installer is installed with name #{installedName},\n skip installation.\"\n return ENV.luda[installedName]\n if installer._install\n if typeof installer._install is 'function'\n return ENV.luda[namespace] = installer._install()\n return ENV.luda[namespace] = installer._install\n ENV.luda[namespace] = installer","import './install.coffee'\n\n\n\nluda\n\n KEY_LEFT: 37\n KEY_UP: 38\n KEY_RIGHT: 39\n KEY_DOWN: 40\n KEY_TAB: 9\n KEY_ESC: 27\n KEY_ENTER: 13","import './install.coffee'\n\n\n\nluda\n \n $child: (selector, $ancestor) ->\n $ancestor = document unless $ancestor\n $ancestor.querySelector selector\n\n $children: (selector, $ancestor) ->\n $ancestor = document unless $ancestor\n $descendant = @$child selector, $ancestor\n if $descendant\n descendants = Array.from($ancestor.querySelectorAll selector)\n else\n descendants = []\n\n $unnested: (selector, $ancestor, ancestorSelector) ->\n descendants = @$children selector, $ancestor\n descendants.filter ($descendant) =>\n $descendant if @$parent(ancestorSelector, $descendant) is $ancestor\n\n $parent: (selector, $descendant) ->\n $ancestor = $descendant.parentNode\n if $ancestor\n if $ancestor.matches and $ancestor.matches selector\n $ancestor\n else\n @$parent selector, $ancestor\n\n $parents: (selector, $descendant, _ancestors) ->\n $ancestor = @$parent selector, $descendant\n _ancestors = [] unless _ancestors\n if $ancestor\n _ancestors.push($ancestor)\n @$parents selector, $ancestor, _ancestors\n else\n _ancestors\n\n $after: ($node, $target) ->\n $parent = $target.parentNode\n if $parent.lastChild is $target\n $parent.appendChild $node\n else\n $parent.insertBefore $node, $target.nextSibling\n\n $prepend: ($node, $target) ->\n if $target.firstChild\n $target.insertBefore $node, $target.firstChild\n else\n $target.appendChild $node\n\n reflow: ($element) -> $element.offsetHeight\n\n _getTransitionDurations: (style, propertyLength) ->\n durationArray = style.split ','\n while durationArray.length < propertyLength\n durationArray = durationArray.concat durationArray\n if durationArray.length > propertyLength\n durationArray = durationArray.slice 0, propertyLength\n durationArray.map (durationStr) ->\n duration = parseFloat durationStr\n return 0 unless duration\n if durationStr.match 'ms' then duration else duration * 1000\n\n getTransitionDuration: ($element) ->\n styles = window.getComputedStyle $element\n length = styles.transitionProperty.split(',').length\n return 0 unless length\n delays = @_getTransitionDurations styles.transitionDelay, length\n durations = @_getTransitionDurations styles.transitionDuration, length\n finalDurations = durations.map (duration, index) -> duration + delays[index]\n Math.max.apply null, finalDurations\n\n _observeDom: (onNodeAdded, onNodeRemoved) ->\n observerConfig =\n childList: true\n subtree: true\n observer = new MutationObserver (mutations) ->\n mutations.forEach (mutation) ->\n $removedNodes = Array.from mutation.removedNodes\n $addedNodes = Array.from mutation.addedNodes\n $removedNodes.forEach ($node) ->\n onNodeRemoved $node if $node instanceof Element and onNodeRemoved\n $addedNodes.forEach ($node) ->\n onNodeAdded $node if $node instanceof Element and onNodeAdded\n observer.observe document.documentElement, observerConfig\n observer","import './install.coffee'\nimport './dom.coffee'\n\n\n\nluda\n \n _SWIPE_DISTANCE: 10\n _EVENT_TYPE_PREFIX: 'luda'\n _SWIPE_LEFT: 'swipeleft'\n _SWIPE_RIGHT: 'swiperight'\n _SWIPE_UP: 'swipeup'\n _SWIPE_DOWN: 'swipedown'\n _SWIPE_LEFT_OR_UP: 'swipeleft or swipeup'\n _SWIPE_RIGHT_OR_DOWN: 'swiperight or swipedown'\n _DOC_READY: 'docready'\n _FORM_RESET: 'reset'\n\n eventPath: (event) ->\n if event.composedPath\n path = event.composedPath()\n else if event.path\n path = event.path\n else\n path = [event.target].concat(luda.$parents '*', event.target)\n\n on: (event, selector..., handler) ->\n switch event\n when @_DOC_READY then @_onDocReady handler\n when @_FORM_RESET then @_onReset selector[0], handler\n when @_SWIPE_LEFT, \\\n @_SWIPE_RIGHT, \\\n @_SWIPE_UP, \\\n @_SWIPE_DOWN, \\\n @_SWIPE_LEFT_OR_UP, \\\n @_SWIPE_RIGHT_OR_DOWN\n then @_onSwipe event, selector[0], handler\n else @_on event, selector[0], handler\n\n onOpposite: (event, selector, handler) ->\n _self = this\n document.addEventListener event, (e) ->\n trigger = _self.eventPath(e).every ($element) ->\n not $element.matches or not $element.matches selector\n handler e if trigger\n\n dispatch: ($target, type, detail, delayMilliseconds, options = {}) ->\n options.bubbles = true unless typeof options.bubbles is 'boolean'\n options.cancelable = true unless typeof options.cancelable is 'boolean'\n options.composed = true unless typeof options.composed is 'boolean'\n evt = new Event \"#{@_EVENT_TYPE_PREFIX}:#{type}\", options\n evt.detail = detail\n if typeof delayMilliseconds is 'number'\n setTimeout ->\n $target.dispatchEvent evt if $target\n , delayMilliseconds\n else\n $target.dispatchEvent evt\n evt\n \n _onDocReady: (handler) ->\n if document.readyState is 'loading'\n document.addEventListener 'DOMContentLoaded', handler\n else\n handler()\n\n _onReset: (selector, handler) ->\n document.addEventListener 'reset', (e) ->\n if selector?\n luda.$children(selector, e.target).forEach ($element) ->\n handler.bind($element)(e)\n else\n handler e\n \n _onSwipe: (event, selector, handler) ->\n _self = this\n watch = false\n $touchStartElement = document\n touchStartE = null\n touchStartX = 0\n touchStartY = 0\n document.addEventListener 'touchstart', (e) ->\n if e.touches.length is 1\n touchStartX = e.touches[0].screenX\n touchStartY = e.touches[0].screenY\n if selector?\n _self.eventPath(e).some ($element) ->\n if $element.matches and $element.matches selector\n $touchStartElement = $element\n touchStartE = e\n watch = true\n return true\n else\n watch = true\n\n document.addEventListener 'touchmove', (e) ->\n if watch and e.touches.length is 1\n touchDistanceX = e.touches[0].screenX - touchStartX\n touchDistanceY = e.touches[0].screenY - touchStartY\n eventX = undefined\n eventY = undefined\n eventXOrY = undefined\n if Math.abs(touchDistanceX) >= _self._SWIPE_DISTANCE\n if touchDistanceX > 0\n eventX = _self._SWIPE_RIGHT\n else\n eventX = _self._SWIPE_LEFT\n if Math.abs(touchDistanceY) >= _self._SWIPE_DISTANCE\n if touchDistanceY > 0\n eventY = _self._SWIPE_DOWN\n else\n eventY = _self._SWIPE_UP\n if eventX is _self._SWIPE_LEFT \\\n or eventY is _self._SWIPE_UP\n eventXOrY = _self._SWIPE_LEFT_OR_UP\n if eventX is _self._SWIPE_RIGHT \\\n or eventY is _self._SWIPE_DOWN\n eventXOrY = _self._SWIPE_RIGHT_OR_DOWN\n if (eventX? and eventX is event) \\\n or (eventY? and eventY is event) \\\n or eventXOrY is event\n if selector?\n _self.eventPath(e).some ($element) ->\n if $element is $touchStartElement\n watch = false\n handler.bind($element)(touchStartE, e)\n return true\n else\n watch = false\n handler touchStartE, e\n\n _on: (event, selector, handler) ->\n if selector is window\n window.addEventListener event, (e) -> handler e\n else\n _self = this\n document.addEventListener event, (e) ->\n if selector?\n _self.eventPath(e).some ($element) ->\n if $element.matches and $element.matches selector\n handler.bind($element)(e)\n return true\n else\n handler e","import './install.coffee'\n\n\n\nluda\n \n except: (element, arr) ->\n arr.splice(arr.indexOf(element), 1) if arr.includes element","import './install.coffee'\nimport './utilities.coffee'\nimport './dom.coffee'\nimport './event.coffee'\n\n\n \nluda class Static\n\n @_SCOPE: 'Static'\n \n @_SELECTOR_INVALID_ERROR: '@param selector must be a css selector string'\n @_SELECTORS: []\n\n @_ACTIVATE_EVENT_TYPE: -> \"#{@_SCOPE}:activate\"\n @_ACTIVATED_EVENT_TYPE: -> \"#{@_SCOPE}:activated\"\n @_DEACTIVATE_EVENT_TYPE: -> \"#{@_SCOPE}:deactivate\"\n @_DEACTIVATED_EVENT_TYPE: -> \"#{@_SCOPE}:deactivated\"\n @_ACTIVATING_MARK_ATTRIBUTE: -> \"data-#{@_SCOPE}-activating\"\n @_DEACTIVATING_MARK_ATTRIBUTE: -> \"data-#{@_SCOPE}-deactivating\"\n\n @_Observed: []\n @_observer: null\n\n @_selector: ''\n\n @_add: (selector) ->\n throw new Error @_SELECTOR_INVALID_ERROR if typeof selector isnt 'string'\n @_SELECTORS.push selector unless @_SELECTORS.includes selector\n @_mergeSelectors()\n\n @_remove: (selector) ->\n throw new Error @_SELECTOR_INVALID_ERROR if typeof selector isnt 'string'\n luda.except selector, @_SELECTORS\n @_mergeSelectors()\n\n @_mergeSelectors: ->\n @_selector = @_SELECTORS.join ','\n\n @_activatePrevented: ($ele, detail) ->\n activateEvent = luda.dispatch $ele, @_ACTIVATE_EVENT_TYPE(), detail\n activateEvent.defaultPrevented\n\n @_deactivatePrevented: ($ele, detail) ->\n deactivateEvent = luda.dispatch $ele, @_DEACTIVATE_EVENT_TYPE(), detail\n deactivateEvent.defaultPrevented\n\n @_handleActivateEnd: ($ele, detail) ->\n @_setActivatingMark $ele, detail\n activateDuration = luda.getTransitionDuration $ele\n luda.dispatch $ele, @_ACTIVATED_EVENT_TYPE(), detail, activateDuration\n setTimeout =>\n @_removeActivatingMark $ele if $ele\n , activateDuration\n activateDuration\n\n @_handleDeactivateEnd: ($ele, detail) ->\n @_setDeactivatingMark $ele, detail\n deactivateDuration = luda.getTransitionDuration $ele\n luda.dispatch $ele, @_DEACTIVATED_EVENT_TYPE(), detail, deactivateDuration\n setTimeout =>\n @_removeDeactivatingMark $ele if $ele\n , deactivateDuration\n deactivateDuration\n\n @_handleActivateCancel: ($ele, detail) ->\n if @_isActivating $ele\n luda.dispatch $ele, @_ACTIVATED_EVENT_TYPE(), detail\n @_removeActivatingMark $ele\n\n @_handleDeactivateCancel: ($ele, detail) ->\n if @_isDeactivating $ele\n luda.dispatch $ele, @_DEACTIVATED_EVENT_TYPE(), detail\n @_removeDeactivatingMark $ele\n\n @_isActivating: ($ele) ->\n $ele.hasAttribute @_ACTIVATING_MARK_ATTRIBUTE()\n\n @_isDeactivating: ($ele) ->\n $ele.hasAttribute @_DEACTIVATING_MARK_ATTRIBUTE()\n\n @_isTransitioning: ($ele) ->\n @_isActivating($ele) or @_isDeactivating($ele)\n\n @_getActivatingMark: ($ele) ->\n $ele.getAttribute @_ACTIVATING_MARK_ATTRIBUTE()\n\n @_getDeactivatingMark: ($ele) ->\n $ele.getAttribute @_DEACTIVATING_MARK_ATTRIBUTE()\n\n @_removeActivatingMark: ($ele) ->\n $ele.removeAttribute @_ACTIVATING_MARK_ATTRIBUTE()\n\n @_removeDeactivatingMark: ($ele) ->\n $ele.removeAttribute @_DEACTIVATING_MARK_ATTRIBUTE()\n\n @_setActivatingMark: ($ele, value) ->\n $ele.setAttribute @_ACTIVATING_MARK_ATTRIBUTE(), value\n\n @_setDeactivatingMark: ($ele, value) ->\n $ele.setAttribute @_DEACTIVATING_MARK_ATTRIBUTE(), value\n\n @_onEleAdded: ($ele) ->\n Static._onEleAddedOrRemoved $ele, '_onElementAdded'\n\n @_onEleRemoved: ($ele) ->\n Static._onEleAddedOrRemoved $ele, '_onElementRemoved'\n\n @_onEleAddedOrRemoved: ($ele, action) ->\n Static._Observed.forEach (Observed) ->\n return unless Observed[action]\n $matched = luda.$children Observed._selector, $ele\n $matched.unshift $ele if $ele.matches Observed._selector\n $matched.forEach ($target) -> Observed[action] $target\n\n @_observe: (classObj) ->\n unless Static._observer\n Static._observer = \\\n luda._observeDom Static._onEleAdded, Static._onEleRemoved\n if classObj._onElementAdded or classObj._onElementRemoved \\\n and classObj._selector\n unless Static._Observed.includes classObj\n Static._Observed.push classObj\n\n @_install: ->\n self = this\n return this if this is Static\n @_SELECTORS = [] unless @hasOwnProperty '_SELECTORS'\n @_mergeSelectors()\n exposed = @_init() if typeof @_init is 'function'\n luda.on luda._DOC_READY, -> Static._observe(self)\n if exposed then exposed else this","import '../install.coffee'\nimport '../constants.coffee'\nimport '../event.coffee'\nimport '../static.coffee'\n\n\nluda class extends luda.Static\n\n @_SCOPE: 'enter'\n\n @_SELECTORS: [\n 'input[type=checkbox]'\n 'input[type=radio]'\n '[tabindex]'\n ]\n\n @_DISABLED_ATTRIBUTE: 'data-enter-disabled'\n\n @_init: ->\n self = this\n luda.on 'keydown', (e) ->\n if not document.documentElement.hasAttribute(self._DISABLED_ATTRIBUTE) \\\n and e.keyCode is luda.KEY_ENTER \\\n and e.target.matches(self._selector)\n e.preventDefault()\n setTimeout(-> e.target.click())","import '../install.coffee'\nimport '../dom.coffee'\nimport '../event.coffee'\nimport '../static.coffee'\n\n\n\nluda class extends luda.Static\n\n @_SCOPE: 'focus'\n\n @_CSS_CLASS: 'focus'\n # mouse focusable selectors\n @_SELECTORS: ['select'\n 'textarea'\n ':not(.btn-check):not(.btn-radio):not(.btn-file) >\n input:not([type=button]):not([type=submit]):not([type=reset])'\n ]\n @_TOUCHSTART_FOCUS_SELECTOR: 'input[type=range]'\n @_PARENT_FOCUS_SELECTOR: 'select[multiple]'\n @_PARENT_FOCUS_CHILDREN_SELECTOR: \"#{@_PARENT_FOCUS_SELECTOR} *\"\n\n @_DISABLED_ATTRIBUTE: 'data-focus-disabled'\n\n @_$focus: document.getElementsByClassName(@_CSS_CLASS)\n\n @_isActive: ->\n not document.documentElement.hasAttribute(@_DISABLED_ATTRIBUTE)\n\n @_removeFocusClassExcept: ($exception) ->\n Array.from(@_$focus).forEach ($focus) =>\n $focus.classList.remove @_CSS_CLASS if $focus isnt $exception\n\n @_addFocusClassExceptHtmlAndBody: ($target) ->\n if $target isnt document.body and $target isnt document.documentElement\n $target.classList.add @_CSS_CLASS\n\n @_changeFocusStateOnKeyEvent: (e) ->\n if @_isActive()\n @_removeFocusClassExcept e.target\n @_addFocusClassExceptHtmlAndBody e.target\n\n @_changeFocusStateOnMouseDownEvent: (e) ->\n if @_isActive()\n if e.target.matches @_PARENT_FOCUS_CHILDREN_SELECTOR\n target = luda.$parent @_PARENT_FOCUS_SELECTOR, e.target\n else\n target = e.target\n if target.matches @_selector\n @_removeFocusClassExcept target\n @_addFocusClassExceptHtmlAndBody target\n else\n @_removeFocusClassExcept()\n\n @_setElementPrototype: ->\n focus = HTMLElement.prototype.focus\n blur = HTMLElement.prototype.blur\n self = this\n HTMLElement.prototype.focus = ->\n focus.apply this, arguments\n if self._isActive() and document.activeElement is this\n self._removeFocusClassExcept this\n self._addFocusClassExceptHtmlAndBody this\n HTMLElement.prototype.blur = ->\n blur.apply this, arguments\n this.classList.remove self._CSS_CLASS if self._isActive()\n\n @_init: ->\n self = this\n @_setElementPrototype()\n luda.on 'keydown', @_changeFocusStateOnKeyEvent.bind this\n luda.on 'keyup', @_changeFocusStateOnKeyEvent.bind this\n luda.on 'mousedown', @_changeFocusStateOnMouseDownEvent.bind this\n luda.on 'touchstart', @_TOUCHSTART_FOCUS_SELECTOR, \\\n @_changeFocusStateOnMouseDownEvent.bind this\n luda.on 'focusin', @_changeFocusStateOnMouseDownEvent.bind this","import '../install.coffee'\nimport '../constants.coffee'\nimport '../dom.coffee'\nimport '../event.coffee'\nimport '../static.coffee'\n\n\n\nluda class extends luda.Static\n\n @_SCOPE: 'tabulate'\n\n @_SELECTORS: ['input[type=radio]:not([disabled])']\n\n @_DISABLED_ATTRIBUTE: 'data-tabulate-disabled'\n\n @_querySameName$radios: ($radio) ->\n if $radio.name\n selector = \"#{@_selector}[name=#{$radio.name}]\"\n else\n selector = @_selector\n $inputs = luda.$children selector\n $inputs.filter ($input) -> $input.tabIndex >= 0\n\n @_query$prev$next: ($radio) ->\n $sameNameRadios = @_querySameName$radios $radio\n radioIndex = $sameNameRadios.indexOf $radio\n $prev = $sameNameRadios[radioIndex - 1]\n $next = $sameNameRadios[radioIndex + 1]\n {$prev, $next}\n\n @_init: ->\n self = this\n luda.on 'keydown', (e) ->\n if not document.documentElement.hasAttribute(self._DISABLED_ATTRIBUTE) \\\n and e.keyCode is luda.KEY_TAB \\\n and e.target.nodeName.toUpperCase() is 'INPUT' \\\n and e.target.type is 'radio'\n if e.shiftKey\n if $prev = self._query$prev$next(e.target).$prev\n e.preventDefault()\n $prev.focus()\n else\n if $next = self._query$prev$next(e.target).$next\n e.preventDefault()\n $next.focus()","import './install.coffee'\nimport './utilities.coffee'\nimport './dom.coffee'\nimport './event.coffee'\n\n\n\n\nluda class Factory\n\n @_SCOPE: 'Factory'\n \n @_COMPONENT_NO_SELECTOR_ERROR: 'Extended component must has a css selector'\n @_$COMPONENT_INVALID_ERROR: '@param $component must be an instance of Element'\n @_SELECTOR: ''\n\n @_ACTIVATE_EVENT_TYPE: -> \"#{@_SCOPE}:activate\"\n @_ACTIVATED_EVENT_TYPE: -> \"#{@_SCOPE}:activated\"\n @_DEACTIVATE_EVENT_TYPE: -> \"#{@_SCOPE}:deactivate\"\n @_DEACTIVATED_EVENT_TYPE: -> \"#{@_SCOPE}:deactivated\"\n @_ACTIVATING_MARK_ATTRIBUTE: -> \"data-#{@_SCOPE}-activating\"\n @_DEACTIVATING_MARK_ATTRIBUTE: -> \"data-#{@_SCOPE}-deactivating\"\n\n @_instances: []\n\n @_Observed: []\n @_observer: null\n @_observerConfig:\n childList: true\n subtree: true\n\n _hasDescendant: (descendant) ->\n if @_children.length and descendant\n return true if @_children.includes descendant\n return @_children.some (child) -> child._hasDescendant descendant\n else\n return false\n\n _observe: ->\n @_observer = new MutationObserver @_onMutations.bind this\n @_observer.observe @_$component, @constructor._observerConfig\n\n _disconnect: ->\n @_observer.disconnect()\n @_observer = null\n\n _activatePrevented: ($ele, detail) ->\n activateEvent = luda.dispatch($ele, \\\n @constructor._ACTIVATE_EVENT_TYPE(), detail)\n activateEvent.defaultPrevented\n\n _deactivatePrevented: ($ele, detail) ->\n deactivateEvent = luda.dispatch($ele, \\\n @constructor._DEACTIVATE_EVENT_TYPE(), detail)\n deactivateEvent.defaultPrevented\n\n _handleActivateEnd: ($ele, detail) ->\n @_setActivatingMark detail\n activateDuration = luda.getTransitionDuration $ele\n luda.dispatch($ele, \\\n @constructor._ACTIVATED_EVENT_TYPE(), detail, \\\n activateDuration)\n setTimeout =>\n @_removeActivatingMark() if @_$component\n , activateDuration\n activateDuration\n\n _handleDeactivateEnd: ($ele, detail) ->\n @_setDeactivatingMark detail\n deactivateDuration = luda.getTransitionDuration $ele\n luda.dispatch($ele, \\\n @constructor._DEACTIVATED_EVENT_TYPE(), detail, \\\n deactivateDuration)\n setTimeout =>\n @_removeDeactivatingMark() if @_$component\n , deactivateDuration\n deactivateDuration\n\n _handleActivateCancel: ($ele, detail) ->\n if @_isActivating()\n luda.dispatch($ele, \\\n @constructor._ACTIVATED_EVENT_TYPE(), detail)\n @_removeActivatingMark()\n\n _handleDeactivateCancel: ($ele, detail) ->\n if @_isDeactivating()\n luda.dispatch($ele, \\\n @constructor._DEACTIVATED_EVENT_TYPE(), detail)\n @_removeDeactivatingMark()\n\n _isActivating: ->\n @_$component.hasAttribute @constructor._ACTIVATING_MARK_ATTRIBUTE()\n\n _isDeactivating: ->\n @_$component.hasAttribute @constructor._DEACTIVATING_MARK_ATTRIBUTE()\n\n _isTransitioning: ->\n @_isActivating() or @_isDeactivating()\n\n _getActivatingMark: ->\n @_$component.getAttribute @constructor._ACTIVATING_MARK_ATTRIBUTE()\n\n _getDeactivatingMark: ->\n @_$component.getAttribute @constructor._DEACTIVATING_MARK_ATTRIBUTE()\n\n _removeActivatingMark: ->\n @_$component.removeAttribute @constructor._ACTIVATING_MARK_ATTRIBUTE()\n\n _removeDeactivatingMark: ->\n @_$component.removeAttribute @constructor._DEACTIVATING_MARK_ATTRIBUTE()\n\n _setActivatingMark: (value) ->\n @_$component.setAttribute @constructor._ACTIVATING_MARK_ATTRIBUTE(), value\n\n _setDeactivatingMark: (value) ->\n @_$component.setAttribute @constructor._DEACTIVATING_MARK_ATTRIBUTE(), value\n\n @create: ($component) ->\n componentIsElementInstance = $component instanceof Element\n throw new Error @_$COMPONENT_INVALID_ERROR unless componentIsElementInstance\n $family = @_query$family $component\n instance = @query $component\n if $family._$parent\n if parent = @query $family._$parent\n @_instances.push instance = @_createInstance $component unless instance\n if instance._parent isnt parent\n parent._children.push(instance) and (instance._parent = parent)\n $family._$children.forEach ($child) => @create $child\n return instance\n else\n @create $family._$parent\n return @query $component\n else\n @_instances.push instance = @_createInstance $component unless instance\n $family._$children.forEach ($child) => @create $child\n return instance\n\n @destroy: (instance$component) ->\n instance = @query instance$component\n if instance\n instance._disconnect() if instance._observer\n instance._destroy() if instance._destroy\n @destroy instance._children[0] while instance._children.length\n if instance._parent\n luda.except instance, instance._parent._children\n luda.except instance, @_instances\n for attribute, value of instance\n instance[attribute] = null\n \n @query: (instance$component) ->\n instance = null\n if instance$component instanceof this \\\n and @_instances.includes instance$component\n instance = instance$component\n else if instance$component instanceof Element\n @_instances.some (inited) ->\n if inited._$component is instance$component\n instance = inited\n return true\n return instance\n\n @_query$family: ($component) ->\n _$parent = null\n _$children = []\n if @_SELECTOR\n _$parent = luda.$parent @_SELECTOR, $component\n _$children = luda.$unnested @_SELECTOR, $component, @_SELECTOR\n {_$parent, _$children}\n\n @_createInstance: ($component) ->\n instance = new this()\n instance._$component = $component\n instance._parent = null\n instance._children = []\n instance._observer = null\n instance._constructor() if instance._constructor\n unless instance._observer and instance._onMutations and @_observerConfig\n instance._observe()\n instance\n\n @_onEleAdded: ($ele) ->\n Factory._onEleAddedOrRemoved($ele, 'create')\n\n @_onEleRemoved: ($ele) ->\n Factory._onEleAddedOrRemoved($ele, 'destroy')\n\n @_onEleAddedOrRemoved: ($ele, action) ->\n Factory._Observed.forEach (Observed) ->\n return Observed[action] $ele if $ele.matches Observed._SELECTOR\n luda.$children(Observed._SELECTOR, $ele).forEach ($child) ->\n Observed[action] $child\n\n @_observe: (classObj) ->\n unless Factory._observer\n Factory._observer = \\\n luda._observeDom Factory._onEleAdded, Factory._onEleRemoved\n unless Factory._Observed.includes classObj\n Factory._Observed.push classObj\n\n @_install: ->\n self = this\n return this if this is Factory\n unless @_SELECTOR or typeof @_SELECTOR isnt 'string'\n throw new Error @_COMPONENT_NO_SELECTOR_ERROR\n @_instances = [] unless @hasOwnProperty '_instances'\n exposed = @_init() if typeof @_init is 'function'\n luda.on luda._DOC_READY, ->\n luda.$children(self._SELECTOR).forEach ($component) ->\n self.create $component\n Factory._observe(self)\n if exposed then exposed else this","import '../install.coffee'\nimport '../factory.coffee'\n\n\n\nluda class extends luda.Factory\n\n @_SCOPE: 'readonly'\n @_READONLY_ATTRIBUTE: 'data-readonly'\n @_READONLY_FALSE_VALUE: 'false'\n @_SELECTOR: \"[#{@_READONLY_ATTRIBUTE}]\"\n\n @_observerConfig:\n attributes: true\n attributeFilter: [@_READONLY_ATTRIBUTE]\n\n _getConfig: ->\n readonly = @_$component.getAttribute @constructor._READONLY_ATTRIBUTE\n _isReadonly = readonly isnt @constructor._READONLY_FALSE_VALUE\n _originalTabIndex = @_$component.tabIndex\n {_isReadonly, _originalTabIndex}\n \n _constructor: ->\n {\n @_isReadonly,\n @_originalTabIndex\n } = @_getConfig()\n @_setTabIndex()\n\n _onMutations: ->\n @_constructor()\n\n _setTabIndex: ->\n if @_isReadonly\n @_$component.tabIndex = -1\n else\n @_$component.tabIndex = @_originalTabIndex","import '../install.coffee'\nimport '../dom.coffee'\nimport '../event.coffee'\nimport '../static.coffee'\n\n\n\nluda class extends luda.Static\n\n @_SCOPE: 'toggle'\n @_TOGGLE_TARGET_ATTRIBUTE: 'data-toggle-target'\n @_TOGGLE_ATTRIBUTE: 'data-toggle'\n @_TOGGLE_FOR_ATTRIBUTE: 'data-toggle-for'\n @_TOGGLE_DISABLED_ATTRIBUTE: 'data-toggle-disabled'\n @_AUTO_DEACTIVATE_ATTRIBUTE: 'data-toggle-auto-deactivate'\n @_AUTO_DEACTIVATE_DURATION: 3000\n @_ACTIVE_CSS_CLASS: 'toggle-active'\n @_SELECTORS: [\n \"[#{@_TOGGLE_TARGET_ATTRIBUTE}]\"\n ]\n\n @activate: (name$target) ->\n @_query$targets(name$target).forEach ($target) =>\n return if $target.classList.contains @_ACTIVE_CSS_CLASS\n return if @_isTransitioning $target\n return if @_activatePrevented $target\n $target.classList.add @_ACTIVE_CSS_CLASS\n @_handleActivateEnd $target\n @_delayDeactivate $target if @_shouldAutoDeactivate $target\n\n @deactivate: (name$target) ->\n @_query$targets(name$target).forEach ($target) =>\n return unless $target.classList.contains @_ACTIVE_CSS_CLASS\n return if @_isTransitioning $target\n return if @_deactivatePrevented $target\n $target.classList.remove @_ACTIVE_CSS_CLASS\n @_handleDeactivateEnd $target\n\n @toggle: (name$target) ->\n @_query$targets(name$target).forEach ($target) =>\n if $target.classList.contains @_ACTIVE_CSS_CLASS\n @deactivate($target)\n else\n @activate($target)\n\n @_onElementAdded: ($ele) ->\n @_handleActivateCancel $ele\n @_handleDeactivateCancel $ele\n @_delayDeactivate $ele if @_shouldAutoDeactivate $ele\n\n @_shouldAutoDeactivate: ($target) ->\n $target.hasAttribute @_AUTO_DEACTIVATE_ATTRIBUTE\n\n @_delayDeactivate: ($target) ->\n delay = parseInt $target.getAttribute(@_AUTO_DEACTIVATE_ATTRIBUTE), 10\n delay = @_AUTO_DEACTIVATE_DURATION if not delay\n setTimeout =>\n @deactivate $target if $target\n , delay\n\n @_query$targets: (name$target) ->\n if name$target instanceof Element\n [name$target]\n else\n luda.$children \"[#{@_TOGGLE_TARGET_ATTRIBUTE}=#{name$target}]\"\n\n @_init: ->\n self = this\n clickEventSelector = \"[#{@_TOGGLE_FOR_ATTRIBUTE}],[#{@_TOGGLE_ATTRIBUTE}]\"\n luda.on luda._DOC_READY, ->\n luda.$children(self._selector).forEach ($target) ->\n self._delayDeactivate $target if self._shouldAutoDeactivate $target\n luda.on 'click', clickEventSelector, (e) ->\n toggleChecked = false\n luda.eventPath(e).some ($path) ->\n if $path instanceof Element\n if $path.hasAttribute(self._TOGGLE_ATTRIBUTE) \\\n or $path.hasAttribute(self._TOGGLE_FOR_ATTRIBUTE)\n if toggleName = $path.getAttribute self._TOGGLE_FOR_ATTRIBUTE\n self.toggle toggleName\n toggleChecked = true\n if $path.hasAttribute self._TOGGLE_ATTRIBUTE\n if $path.hasAttribute self._TOGGLE_TARGET_ATTRIBUTE\n $toggle = $path\n else\n $toggle = luda.$parent \\\n \"[#{self._TOGGLE_TARGET_ATTRIBUTE}]\", $path\n if $toggle\n self.toggle $toggle\n toggleChecked = true\n else if $path.hasAttribute self._TOGGLE_DISABLED_ATTRIBUTE\n toggleChecked = true","import '../install.coffee'\nimport '../dom.coffee'\nimport '../event.coffee'\nimport '../factory.coffee'\n\n\n\nluda class extends luda.Factory\n\n @_SCOPE: 'fmFile'\n\n @_VALUE_SPLITOR: ' '\n @_SELECTOR: '.fm-file'\n @_FILE_SELECTOR: 'input[type=file]'\n @_SIMULATOR_SELECTOR: 'input:not([type=file])'\n @_PLACEHOLDER_ATTRIBUTE: 'placeholder'\n @_VALUE_ATTRIBUTE: 'value'\n\n @_observerConfig:\n childList: true\n subtree: true\n\n reset: ->\n @_$file.value = ''\n @_$simulator.value = ''\n\n _getConfig: ->\n _$file = luda.$child @constructor._FILE_SELECTOR, @_$component\n _$simulator = luda.$child \\\n @constructor._SIMULATOR_SELECTOR, @_$component\n {_$file, _$simulator}\n\n _constructor: ->\n {\n @_$file,\n @_$simulator\n } = @_getConfig()\n @_init()\n\n _onMutations: ->\n @_constructor()\n\n _insertSimulator: ->\n @_$simulator = document.createElement 'input'\n @_$simulator.tabIndex = -1\n luda.$after @_$simulator, @_$file\n\n _setPlaceholderValue: ->\n @_$simulator.placeholder = \\\n @_$file.getAttribute @constructor._PLACEHOLDER_ATTRIBUTE\n\n _setSimulatorValue: ->\n values = []\n Array.from(@_$file.files).map (file) -> values.push file.name\n if values.length\n @_$simulator.value = values.join @constructor._VALUE_SPLITOR\n else if @_$file.hasAttribute(@constructor._VALUE_ATTRIBUTE)\n @_$simulator.value = @_$file.getAttribute @constructor._VALUE_ATTRIBUTE\n\n _init: ->\n if @_$file\n @_insertSimulator() unless @_$simulator\n if @_$file.hasAttribute @constructor._PLACEHOLDER_ATTRIBUTE\n @_setPlaceholderValue()\n @_setSimulatorValue()\n\n @reset: ($file) -> @query($file).reset()\n\n @_init: ->\n self = this\n luda.on 'change', \"#{@_SELECTOR} #{@_FILE_SELECTOR}\", (e) ->\n self.query(luda.$parent self._SELECTOR, this)._setSimulatorValue()\n luda.on luda._FORM_RESET, @_SELECTOR, (e) ->\n setTimeout => self.query(this)._setSimulatorValue()","import '../install.coffee'\nimport '../dom.coffee'\nimport '../event.coffee'\nimport '../factory.coffee'\n\n\n\nluda class extends luda.Factory\n\n @_SCOPE: 'fmSelect'\n\n @_SELECTOR: '.fm-select'\n @_SELECT_SELECTOR: 'select'\n @_SINGLE_SELECT_SIMULATOR_SELECTOR: 'input'\n @_PLACEHOLDER_ATTRIBUTE: 'placeholder'\n @_MULTIPLE_SELECT_PLACEHOLDER_CSS_CLASS: 'fm-select-multiple-placeholder'\n @_DEFAULT_SELECTED_OPTION_ATTRIBUTE: 'data-fm-select-default-selected'\n @_INITED_ATTRIBUTE: 'data-fm-select-inited'\n\n @_observerConfig:\n childList: true\n attributes: true\n subtree: true\n attributeFilter: ['selected']\n\n select: (indexOrIndexArray) ->\n if @_$select.multiple\n if @_$multipleSelectPlaceholder\n selectedIndexes = indexOrIndexArray\n else\n selectedIndexes = indexOrIndexArray.map (index) -> index + 1\n Array.from(@_$select.options).forEach ($option, index) ->\n $option.selected = selectedIndexes.includes index\n @_markSelectedOption()\n else\n @_$select.selectedIndex = indexOrIndexArray\n @_setSingleSelectSimulatorValue()\n @_markSelectedOption()\n\n _getConfig: ->\n _$select = luda.$child @constructor._SELECT_SELECTOR, @_$component\n _$singleSelectSimulator = luda.$child \\\n @constructor._SINGLE_SELECT_SIMULATOR_SELECTOR, @_$component\n _$multipleSelectPlaceholder = luda.$child \\\n \".#{@constructor._MULTIPLE_SELECT_PLACEHOLDER_CSS_CLASS}\", @_$component\n _$defaultSelectedOptions = luda.$children \\\n \"[#{@constructor._DEFAULT_SELECTED_OPTION_ATTRIBUTE}]\", @_$component\n _defaultSelectedOptionMarked = @_$component.hasAttribute \\\n @constructor._INITED_ATTRIBUTE\n {\n _$select,\n _$singleSelectSimulator,\n _$multipleSelectPlaceholder,\n _$defaultSelectedOptions,\n _defaultSelectedOptionMarked\n }\n\n _constructor: ->\n {\n @_$select,\n @_$singleSelectSimulator,\n @_$multipleSelectPlaceholder,\n @_$defaultSelectedOptions,\n @_defaultSelectedOptionMarked\n } = @_getConfig()\n if @_$select\n if @_$select.multiple\n @_initMultipleSelect()\n else\n @_initSingleSelect()\n \n _onMutations: ->\n @_constructor()\n\n _markSelectedOption: ->\n @_disconnect() if @_observer\n Array.from(@_$select.options).forEach ($option) ->\n if $option.selected\n $option.setAttribute 'selected', 'selected'\n else\n $option.removeAttribute 'selected'\n @_observe() unless @_observer\n\n _markDefaultSelectedOption: ->\n @_$component.setAttribute @constructor._INITED_ATTRIBUTE, ''\n Array.from(@_$select.options).forEach ($option) =>\n if $option.selected\n $option.setAttribute @constructor._DEFAULT_SELECTED_OPTION_ATTRIBUTE, ''\n\n _setSingleSelectedDefaultSelectedOption: ->\n hasSelected = Array.from(@_$select.options).some ($option) ->\n $option.getAttribute('selected') is 'selected'\n @_$select.selectedIndex = -1 unless hasSelected\n\n _insertSingleSelectSimulator: ->\n @_$singleSelectSimulator = document.createElement 'input'\n @_$singleSelectSimulator.tabIndex = -1\n luda.$after @_$singleSelectSimulator, @_$select\n\n _setSingleSelectPlaceholderValue: ->\n @_$singleSelectSimulator.placeholder = @_$select.getAttribute \\\n @constructor._PLACEHOLDER_ATTRIBUTE\n\n _setSingleSelectSimulatorValue: ->\n if $selectedOption = @_$select.options[@_$select.selectedIndex]\n @_$singleSelectSimulator.value = $selectedOption.innerText\n else\n @_$singleSelectSimulator.value = ''\n\n _initSingleSelect: ->\n @_insertSingleSelectSimulator() unless @_$singleSelectSimulator\n if @_$select.hasAttribute @constructor._PLACEHOLDER_ATTRIBUTE\n @_setSingleSelectedDefaultSelectedOption()\n @_setSingleSelectPlaceholderValue()\n @_markDefaultSelectedOption() unless @_defaultSelectedOptionMarked\n @_setSingleSelectSimulatorValue()\n @_markSelectedOption()\n\n _insertMultipleSelectBlankOption: ->\n @_$multipleSelectPlaceholder = document.createElement 'option'\n @_$multipleSelectPlaceholder.className = \\\n @constructor._MULTIPLE_SELECT_PLACEHOLDER_CSS_CLASS\n @_$multipleSelectPlaceholder.disabled = true\n luda.$prepend @_$multipleSelectPlaceholder, @_$select\n\n _setMultipleSelectPlaceholderValue: ->\n @_$multipleSelectPlaceholder.innerText = @_$select.getAttribute \\\n @constructor._PLACEHOLDER_ATTRIBUTE\n\n _initMultipleSelect: ->\n unless @_$multipleSelectPlaceholder\n if @_$select.hasAttribute @constructor._PLACEHOLDER_ATTRIBUTE\n @_insertMultipleSelectBlankOption()\n @_setMultipleSelectPlaceholderValue()\n @_markDefaultSelectedOption() unless @_defaultSelectedOptionMarked\n\n _reset: ->\n if @_$select\n Array.from(@_$select.options).forEach ($option) =>\n $option.selected = @_$defaultSelectedOptions.includes $option\n @_setSingleSelectSimulatorValue() unless @_$select.multiple\n @_markSelectedOption()\n\n @select: ($select, indexOrIndexArray) ->\n @query($select).select indexOrIndexArray\n\n @_init: ->\n self = this\n luda.on 'change', \"#{@_SELECTOR} #{@_SELECT_SELECTOR}\", (e) ->\n instance = self.query(luda.$parent self._SELECTOR, this)\n instance._setSingleSelectSimulatorValue() unless this.multiple\n instance._markSelectedOption()\n luda.on luda._FORM_RESET, @_SELECTOR, (e) ->\n setTimeout => self.query(this)._reset()","import '../install.coffee'\nimport '../dom.coffee'\nimport '../event.coffee'\nimport '../factory.coffee'\n\n\n\nluda class extends luda.Factory\n\n @_SCOPE: 'carousel'\n\n @_SELECTOR: '.carousel'\n @_ITEMS_SELECTOR: '.carousel-item'\n @_PREV_CONTROL_SELECTOR: '.carousel-prev'\n @_NEXT_CONTROL_SELECTOR: '.carousel-next'\n @_INDICATORS_SELECTOR: '.carousel-indicators .btn'\n @_INTERVAL_ATTRIBUTE: 'data-carousel-interval'\n @_WRAP_ATTRIBUTE: 'data-carousel-wrap'\n @_ACTIVATED_INDEX_ATTRIBUTE: 'data-carousel-activated-index'\n @_ITEM_ACTIVE_CSS_CLASS: 'carousel-item-active'\n @_ITEM_NEXT_CSS_CLASS: 'carousel-item-next'\n @_ITEM_PREV_CSS_CLASS: 'carousel-item-prev'\n @_ACTIVE_INDEX: 0\n @_INTERVAL: 5000\n @_WRAP: true\n @_FALSE: 'false'\n\n @_observerConfig:\n childList: true\n attributes: true\n subtree: true\n attributeFilter: [@_INTERVAL_ATTRIBUTE, @_WRAP_ATTRIBUTE]\n \n # public\n activate: (index) ->\n if @_$items.length and not @_isTransitioning()\n activatedIndex = @_activeIndex\n if index? \\\n and index isnt @_activeIndex \\\n and 0 <= index <= @_$items.length - 1 \\\n and @_canTransition(index, activatedIndex)\n @_activeIndex = index\n action = if index < activatedIndex then '_slidePrev' else '_slideNext'\n @[action] activatedIndex\n\n next: ->\n if @_$items.length and not @_isTransitioning()\n activatedIndex = @_activeIndex\n index = activatedIndex + 1\n if index > @_$items.length - 1\n return unless @_wrap\n index = 0\n return unless @_canTransition(index, activatedIndex)\n @_activeIndex = index\n @_slideNext activatedIndex\n @_playTimeStamp = Date.now()\n @_pausedRemainTime = @_interval\n\n prev: ->\n if @_$items.length and not @_isTransitioning()\n activatedIndex = @_activeIndex\n index = activatedIndex - 1\n if index < 0\n return unless @_wrap\n index = @_$items.length - 1\n return unless @_canTransition(index, activatedIndex)\n @_activeIndex = index\n @_slidePrev activatedIndex\n @_playTimeStamp = Date.now()\n @_pausedRemainTime = @_interval\n\n pause: ->\n if @_intervaling?\n clearInterval @_intervaling\n @_intervaling = null\n @_pausedRemainTime = @_pausedRemainTime - (Date.now() - @_playTimeStamp)\n\n play: ->\n if @_interval and @_$items.length > 1\n @_playTimeStamp = Date.now()\n @pause()\n execute = =>\n @next()\n @_intervaling = setInterval @next.bind(this), @_interval\n @_intervaling = setTimeout execute, @_pausedRemainTime\n\n # private\n _getConfig: ->\n _$items = luda.$unnested \\\n @constructor._ITEMS_SELECTOR, @_$component, @constructor._SELECTOR\n _$indicators = luda.$unnested \\\n @constructor._INDICATORS_SELECTOR, @_$component, @constructor._SELECTOR\n _$prevControl = luda.$child \\\n @constructor._PREV_CONTROL_SELECTOR, @_$component\n _$nextControl = luda.$child \\\n @constructor._NEXT_CONTROL_SELECTOR, @_$component\n _activeIndex = _$items.indexOf \\\n luda.$child \".#{@constructor._ITEM_ACTIVE_CSS_CLASS}\", @_$component\n _activeIndex = @constructor._ACTIVE_INDEX if _activeIndex is -1\n _interval = @_$component.getAttribute(@constructor._INTERVAL_ATTRIBUTE)\n if _interval is @constructor._FALSE\n _interval = false\n else\n _interval = Math.abs(parseInt _interval, 10) or @constructor._INTERVAL\n _wrap = @_$component.getAttribute(@constructor._WRAP_ATTRIBUTE)\n _wrap = if _wrap is @constructor._FALSE then false else @constructor._WRAP\n {\n _$items,\n _$indicators,\n _$prevControl,\n _$nextControl,\n _activeIndex,\n _interval,\n _wrap\n }\n\n _constructor: ->\n {\n @_$items,\n @_$indicators,\n @_$prevControl,\n @_$nextControl,\n @_activeIndex,\n @_interval,\n @_wrap\n } = @_getConfig()\n @_intervaling = null\n @_playTimeStamp = 0\n @_pausedRemainTime = @_interval\n @_layout()\n @_handleTransitionCancel()\n @play()\n\n _onMutations: (mutations) ->\n {\n @_$items,\n @_$indicators,\n @_$prevControl,\n @_$nextControl,\n @_activeIndex,\n @_interval,\n @_wrap\n } = @_getConfig()\n @_setIndicatorsState()\n @_setDirectionControlState()\n @play()\n\n _destroy: ->\n @pause()\n\n _layout: ->\n @_$items.forEach ($item, index) =>\n $item.style.transition = 'none'\n if index > @_activeIndex\n $item.classList.add @constructor._ITEM_NEXT_CSS_CLASS\n $item.classList.remove @constructor._ITEM_PREV_CSS_CLASS\n $item.classList.remove @constructor._ITEM_ACTIVE_CSS_CLASS\n else if index < @_activeIndex\n $item.classList.add @constructor._ITEM_PREV_CSS_CLASS\n $item.classList.remove @constructor._ITEM_NEXT_CSS_CLASS\n $item.classList.remove @constructor._ITEM_ACTIVE_CSS_CLASS\n else\n $item.classList.add @constructor._ITEM_ACTIVE_CSS_CLASS\n $item.classList.remove @constructor._ITEM_NEXT_CSS_CLASS\n $item.classList.remove @constructor._ITEM_PREV_CSS_CLASS\n luda.reflow $item\n $item.style.transition = ''\n @_setIndicatorsState()\n @_setDirectionControlState()\n\n _slideNext: (activatedIndex) ->\n if @_$items.length > 1\n $item = @_$items[@_activeIndex]\n $activatedItem = @_$items[activatedIndex]\n $item.style.transition = 'none'\n $item.classList.remove @constructor._ITEM_PREV_CSS_CLASS\n $item.classList.add @constructor._ITEM_NEXT_CSS_CLASS\n luda.reflow $item\n $item.style.transition = ''\n $item.classList.remove @constructor._ITEM_NEXT_CSS_CLASS\n $item.classList.add @constructor._ITEM_ACTIVE_CSS_CLASS\n $activatedItem.classList.remove @constructor._ITEM_ACTIVE_CSS_CLASS\n $activatedItem.classList.add @constructor._ITEM_PREV_CSS_CLASS\n @_handleTransitionEnd @_activeIndex, activatedIndex\n @_setIndicatorsState()\n @_setDirectionControlState()\n\n _slidePrev: (activatedIndex) ->\n if @_$items.length > 1\n $item = @_$items[@_activeIndex]\n $activatedItem = @_$items[activatedIndex]\n $item.style.transition = 'none'\n $item.classList.remove @constructor._ITEM_NEXT_CSS_CLASS\n $item.classList.add @constructor._ITEM_PREV_CSS_CLASS\n luda.reflow $item\n $item.style.transition = ''\n $item.classList.remove @constructor._ITEM_PREV_CSS_CLASS\n $item.classList.add @constructor._ITEM_ACTIVE_CSS_CLASS\n $activatedItem.classList.remove @constructor._ITEM_ACTIVE_CSS_CLASS\n $activatedItem.classList.add @constructor._ITEM_NEXT_CSS_CLASS\n @_handleTransitionEnd @_activeIndex, activatedIndex\n @_setIndicatorsState()\n @_setDirectionControlState()\n\n _canTransition: (activeIndex, activatedIndex) ->\n not @_activatePrevented(@_$items[activeIndex], activeIndex) \\\n and not @_deactivatePrevented(@_$items[activatedIndex], activatedIndex)\n\n _handleTransitionEnd: (activeIndex, activatedIndex) ->\n activateDuration = \\\n @_handleActivateEnd @_$items[activeIndex], activeIndex\n deactivateDuration = \\\n @_handleDeactivateEnd @_$items[activatedIndex], activatedIndex\n\n _handleTransitionCancel: ->\n if @_isActivating()\n index = parseInt @_getActivatingMark(), 10\n @_handleActivateCancel @_$items[index], index\n if @_isDeactivating()\n activatedIndex = parseInt @_getDeactivatingMark(), 10\n @_handleDeactivateCancel @_$items[activatedIndex], activatedIndex\n\n _setIndicatorsState: ->\n @_$indicators.forEach ($indicator, index) =>\n $indicator.disabled = index is @_activeIndex\n\n _setDirectionControlState: ->\n if @_$items.length <= 1\n @_$prevControl?.disabled = @_$nextControl?.disabled = true\n else\n @_$prevControl?.disabled = @_activeIndex is 0 and not @_wrap\n @_$nextControl?.disabled = \\\n @_activeIndex is @_$items.length - 1 and not @_wrap\n \n @activate: ($carousel, index) -> @query($carousel).activate index\n\n @next: ($carousel) -> @query($carousel).next()\n\n @prev: ($carousel) -> @query($carousel).prev()\n\n @pause: ($carousel) -> @query($carousel).pause()\n\n @play: ($carousel) -> @query($carousel).play()\n\n # static private\n @_init: ->\n self = this\n luda.on 'click', @_INDICATORS_SELECTOR, (e) ->\n instance = self.query luda.$parent self._SELECTOR, this\n instance.activate instance._$indicators.indexOf this\n luda.on 'touchstart', @_SELECTOR, (e) ->\n self.query(this).pause()\n luda.on 'touchend', @_SELECTOR, (e) ->\n setTimeout => self.query(this).play()\n luda.on 'mouseover', @_SELECTOR, (e) ->\n self.query(this).pause()\n luda.on 'mouseout', @_SELECTOR, (e) ->\n self.query(this).play()\n luda.on luda._SWIPE_LEFT_OR_UP, @_SELECTOR, (startE, e) ->\n self.query(this).next()\n luda.on luda._SWIPE_RIGHT_OR_DOWN, @_SELECTOR, (startE, e) ->\n self.query(this).prev()\n luda.on 'click', @_PREV_CONTROL_SELECTOR, (e) ->\n self.query(luda.$parent self._SELECTOR, this).prev()\n luda.on 'click', @_NEXT_CONTROL_SELECTOR, (e) ->\n self.query(luda.$parent self._SELECTOR, this).next()","import '../install.coffee'\nimport '../constants.coffee'\nimport '../dom.coffee'\nimport '../event.coffee'\nimport '../factory.coffee'\n\n\n\nluda class extends luda.Factory\n\n @_SCOPE: 'dropdown'\n @_SELECTOR: '.dropdown-fixed,.dropdown-absolute,\n .dropdown-static,.dropdown-absolute-m'\n @_MENU_SELECTOR: '.dropdown-menu'\n @_ITEMS_SELECTOR: 'a[href]:not([disabled]),button:not([disabled]),\n input:not([disabled]),[tabindex]:not([disabled])'\n @_TOGGLE_ATTRIBUTE: 'data-dropdown-toggle'\n @_TOGGLE_DISABLED_ATTRIBUTE: 'data-dropdown-toggle-disabled'\n @_STANDALONE_ATTRIBUTE: 'data-dropdown-standalone'\n @_SWITCHES_SELECTOR: \"[#{@_TOGGLE_ATTRIBUTE}]\"\n @_NONE_SWITCHES_SELECTOR: \"[#{@_TOGGLE_DISABLED_ATTRIBUTE}]\"\n @_ACTIVE_CSS_CLASS: 'dropdown-active'\n\n @_observerConfig:\n childList: true\n attributes: true\n subtree: true\n attributeFilter: [\n @_TOGGLE_ATTRIBUTE\n @_TOGGLE_DISABLED_ATTRIBUTE\n @_STANDALONE_ATTRIBUTE\n ]\n\n @_$focused: []\n\n activate: ->\n return if @_isActive() or @_isTransitioning()\n return if @_activatePrevented @_$menu\n @_$component.classList.add @constructor._ACTIVE_CSS_CLASS\n @constructor._$focused.push document.activeElement\n @_parent?.activate()\n @_handleActivateEnd @_$menu\n\n deactivate: (focus) ->\n return unless @_isActive() and not @_isTransitioning()\n return if @_deactivatePrevented @_$menu\n @_$component.classList.remove @constructor._ACTIVE_CSS_CLASS\n @_children.forEach (child) -> child.deactivate()\n if focus\n @constructor._$focused[@constructor._$focused.length - 1]?.focus()\n @constructor._$focused.splice @constructor._$focused.length - 1, 1\n @_handleDeactivateEnd @_$menu\n\n toggle: (focus) ->\n if @_isActive() then @deactivate(focus) else @activate()\n\n _prev: ->\n if @_$items.length and @_isActive()\n focusIndex = @_$items.indexOf(document.activeElement) - 1\n focusIndex = 0 if focusIndex < 0\n @_$items[focusIndex].focus()\n\n _next: ->\n if @_$items.length and @_isActive()\n focusIndex = @_$items.indexOf(document.activeElement) + 1\n focusIndex = @_$items.length - 1 if focusIndex > @_$items.length - 1\n @_$items[focusIndex].focus()\n\n _getConfig: ->\n _$menu = luda.$child @constructor._MENU_SELECTOR, @_$component\n _$switches = luda.$unnested( \\\n @constructor._SWITCHES_SELECTOR, @_$component, @constructor._SELECTOR)\n .concat(luda.$unnested \\\n @constructor._SWITCHES_SELECTOR, _$menu, @constructor._MENU_SELECTOR)\n _$noneSwitches = luda.$unnested( \\\n @constructor._NONE_SWITCHES_SELECTOR, \\\n @_$component, @constructor._SELECTOR) \\\n .concat(luda.$unnested \\\n @constructor._NONE_SWITCHES_SELECTOR, _$menu, @constructor._MENU_SELECTOR)\n _$items = luda.$unnested \\\n @constructor._ITEMS_SELECTOR, _$menu, @constructor._MENU_SELECTOR\n _isStandalone = @_$component.hasAttribute @constructor._STANDALONE_ATTRIBUTE\n {_$menu, _$items, _$switches, _$noneSwitches, _isStandalone}\n\n _constructor: ->\n @_onMutations()\n @_handleActivateCancel @_$menu\n @_handleDeactivateCancel @_$menu\n\n _onMutations: (mutations) ->\n {\n @_$menu,\n @_$items,\n @_$switches,\n @_$noneSwitches,\n @_isStandalone\n } = @_getConfig()\n\n _isActive: ->\n @_$component.classList.contains @constructor._ACTIVE_CSS_CLASS\n\n _deactivateChildrenExcept: (exceptions) ->\n if exceptions and not (exceptions instanceof Array)\n exceptions = [exceptions]\n if exceptions\n @_children.forEach (child) ->\n if child._isActive() and not exceptions.includes child\n child.deactivate()\n else\n @_children.forEach (child) ->\n child.deactivate() if child._isActive()\n\n @activate: ($dropdown) -> @query($dropdown).activate()\n\n @deactivate: ($dropdown, focus) -> @query($dropdown).deactivate(focus)\n\n @toggle: ($dropdown, focus) -> @query($dropdown).toggle focus\n\n @deactivateExcept: (instances$dropdowns) ->\n exceptions = []\n if instances$dropdowns and not (instances$dropdowns instanceof Array)\n instances$dropdowns = [instances$dropdowns]\n if instances$dropdowns\n instances$dropdowns.forEach (instance$dropdown) =>\n exceptions.push exception if exception = @query instance$dropdown\n if exceptions.length\n @_instances.forEach (instance) ->\n instanceIsntInExceptions = not exceptions.includes instance\n instanceHasntExceptionChild = exceptions.every (exception) ->\n not instance._hasDescendant exception\n if instance._isActive() \\\n and instanceIsntInExceptions \\\n and instanceHasntExceptionChild\n instance.deactivate()\n else\n @_instances.forEach (instance) ->\n instance.deactivate() if instance._isActive()\n\n @_standaloneInstances: ->\n @_instances.filter (instance) -> instance if instance._isStandalone\n\n @_init: ->\n self = this\n luda.onOpposite 'click', @_SELECTOR, (e) ->\n self.deactivateExcept self._standaloneInstances()\n luda.on 'click', @_SELECTOR, (e) ->\n if instance = self.query this\n toggleChecked = false\n focus = not e.detail\n self.deactivateExcept(self._standaloneInstances().concat instance)\n instance._deactivateChildrenExcept()\n instance._parent._deactivateChildrenExcept(instance) if instance._parent\n if instance._$switches.length or instance._$noneSwitches.length\n luda.eventPath(e).some ($path) ->\n if instance._$switches.includes $path\n instance.toggle focus\n toggleChecked = true\n else if instance._$noneSwitches.includes $path\n toggleChecked = true\n instance.toggle focus unless toggleChecked\n\n luda.onOpposite 'keyup', @_SELECTOR, (e) -> self.deactivateExcept()\n luda.on 'keyup', @_SELECTOR, (e) ->\n if e.keyCode is luda.KEY_TAB and instance = self.query this\n self.deactivateExcept(instance)\n instance.activate()\n luda.on 'keydown', @_SELECTOR, (e) ->\n if e.keyCode is luda.KEY_ESC and instance = self.query this\n e.preventDefault()\n if instance._isActive()\n instance.deactivate true\n else\n instance._parent?.deactivate true\n luda.on 'keydown', @_SELECTOR, (e) ->\n if [luda.KEY_LEFT, luda.KEY_UP].includes(e.keyCode) \\\n and instance = self.query this\n e.preventDefault()\n if instance._isActive()\n instance._prev()\n else\n instance._parent?._prev()\n else if [luda.KEY_RIGHT, luda.KEY_DOWN].includes(e.keyCode) \\\n and instance = self.query this\n e.preventDefault()\n if instance._isActive()\n instance._next()\n else\n instance._parent?._next()","import '../install.coffee'\nimport '../dom.coffee'\nimport '../event.coffee'\nimport '../factory.coffee'\nimport '../behaviors/focus.coffee'\nimport '../behaviors/enter.coffee'\n\n\n\nluda class extends luda.Factory\n\n @_SCOPE: 'fmDropdown'\n\n @_SELECTOR: '.fm-dropdown'\n @_VALUE_SPLITOR: ' '\n @_LABEL_ATTRIBUTE: 'data-fm-dropdown-label'\n @_VALUE_SELECTOR: '.dropdown-items .btn-radio input,\n .dropdown-items .btn-check input'\n @_DEFAULT_VALUE_SELECTOR: '.dropdown-items .btn-radio label,\n .dropdown-items .btn-check label'\n @_VALUE_HOLDER_SELECTOR: '.fm input'\n @_ENTER_BEHAVIOR_SELECTOR: '.fm-dropdown .fm input'\n\n @_observerConfig:\n childList: true\n attributes: true\n subtree: true\n attributeFilter: [\n 'checked'\n @_LABEL_ATTRIBUTE\n ]\n\n _getConfig: ->\n _$values = luda.$children @constructor._VALUE_SELECTOR, @_$component\n _$defaultValues = luda.$children \\\n @constructor._DEFAULT_VALUE_SELECTOR, @_$component\n _$valueHolder = luda.$child \\\n @constructor._VALUE_HOLDER_SELECTOR, @_$component\n {_$values, _$valueHolder, _$defaultValues}\n\n _constructor: ->\n {\n @_$values,\n @_$valueHolder,\n @_$defaultValues\n } = @_getConfig()\n @_setValueHolderAttribute()\n @_setValueHolderValue()\n\n _onMutations: ->\n @_constructor()\n\n _setValueHolderValue: ->\n values = []\n @_$values.forEach ($value, index) =>\n if $value.checked\n if $value.hasAttribute @constructor._LABEL_ATTRIBUTE\n value = $value.getAttribute @constructor._LABEL_ATTRIBUTE\n else\n value = @_$defaultValues[index].innerText\n values.push value if value and not values.includes value\n if @_$valueHolder\n @_$valueHolder.value = values.join @constructor._VALUE_SPLITOR\n\n _setValueHolderAttribute: ->\n @_$valueHolder.setAttribute('readonly', '') if @_$valueHolder\n\n @_init: ->\n self = this\n luda.enter._add @_ENTER_BEHAVIOR_SELECTOR\n luda.on 'change', \"#{@_SELECTOR} #{@_VALUE_SELECTOR}\", (e) ->\n self.query(luda.$parent self._SELECTOR, this)._setValueHolderValue()\n luda.on luda._FORM_RESET, @_SELECTOR, (e) ->\n setTimeout => self.query(this)._setValueHolderValue()\n # prevent ios device pop out wired navigation pannel\n if /iphone/i.test(navigator.userAgent) or /ipad/i.test(navigator.userAgent)\n luda.on 'focusin', @_ENTER_BEHAVIOR_SELECTOR, (e) ->\n this.blur()\n this.classList.add luda.focus._CSS_CLASS","import '../install.coffee'\nimport '../dom.coffee'\nimport '../event.coffee'\nimport '../factory.coffee'\n\n\n\nluda class extends luda.Factory\n\n @_SCOPE: 'tab'\n\n @_SELECTOR: '.tab'\n @_PANE_SELECTOR: '.tab-pane'\n @_INDICATOR_SELECTOR: '.tab-indicators .btn-radio input[type=radio]'\n @_PANE_ACTIVE_CSS_CLASS: 'tab-pane-active'\n @_ACTIVE_INDEX: 0\n\n @_observerConfig:\n childList: true\n subtree: true\n \n # public\n activate: (index) ->\n if @_$panes.length and not @_isTransitioning()\n activatedIndex = @_activeIndex\n if index? \\\n and index isnt @_activeIndex \\\n and 0 <= index <= @_$panes.length - 1\n return unless @_canTransition index, activatedIndex\n @_activeIndex = index\n @_activate activatedIndex\n\n\n # private\n _getConfig: ->\n _$panes = luda.$unnested \\\n @constructor._PANE_SELECTOR, @_$component, @constructor._SELECTOR\n _$indicators = luda.$unnested \\\n @constructor._INDICATOR_SELECTOR, @_$component, @constructor._SELECTOR\n _activeIndex = @constructor._ACTIVE_INDEX\n _$indicators.some ($indicator, index) ->\n if $indicator.checked\n _activeIndex = index\n true\n {_$panes, _$indicators, _activeIndex}\n\n _constructor: ->\n {\n @_$panes,\n @_$indicators,\n @_activeIndex\n } = @_getConfig()\n @_layout()\n @_handleTransitionCancel()\n\n _onMutations: (mutations) ->\n {\n @_$panes,\n @_$indicators,\n @_activeIndex\n } = @_getConfig()\n @_setIndicatorsState()\n\n _layout: ->\n @_$panes.forEach ($pane, index) =>\n $pane.style.transition = 'none'\n if index is @_activeIndex\n $pane.classList.add @constructor._PANE_ACTIVE_CSS_CLASS\n else\n $pane.classList.remove @constructor._PANE_ACTIVE_CSS_CLASS\n luda.reflow $pane\n $pane.style.transition = ''\n @_setIndicatorsState()\n\n _activate: (activatedIndex) ->\n $pane = @_$panes[@_activeIndex]\n $activatedPane = @_$panes[activatedIndex]\n $pane.classList.add @constructor._PANE_ACTIVE_CSS_CLASS\n $activatedPane.classList.remove @constructor._PANE_ACTIVE_CSS_CLASS\n @_handleTransitionEnd @_activeIndex, activatedIndex\n @_setIndicatorsState()\n\n _canTransition: (activeIndex, activatedIndex) ->\n not @_activatePrevented(@_$panes[activeIndex], activeIndex) \\\n and not @_deactivatePrevented(@_$panes[activatedIndex], activatedIndex)\n\n _handleTransitionEnd: (activeIndex, activatedIndex) ->\n activateDuration = \\\n @_handleActivateEnd @_$panes[activeIndex], activeIndex\n deactivateDuration = \\\n @_handleDeactivateEnd @_$panes[activatedIndex], activatedIndex\n\n _handleTransitionCancel: ->\n if @_isActivating()\n index = parseInt @_getActivatingMark(), 10\n @_handleActivateCancel @_$panes[index], index\n if @_isDeactivating()\n activatedIndex = parseInt @_getDeactivatingMark(), 10\n @_handleDeactivateCancel @_$panes[activatedIndex], activatedIndex\n\n _setIndicatorsState: ->\n @_$indicators.forEach ($indicator, index) =>\n if index is @_activeIndex\n $indicator.setAttribute 'checked', ''\n $indicator.checked = true\n else\n $indicator.removeAttribute 'checked'\n $indicator.checked = false\n\n @activate: ($tab, index) -> @query($tab).activate index\n\n # static private\n @_init: ->\n self = this\n luda.on 'change', @_INDICATOR_SELECTOR, (e) ->\n if this.checked\n instance = self.query luda.$parent self._SELECTOR, this\n instance._setIndicatorsState()\n instance.activate instance._$indicators.indexOf this"]}
1
+ {"version":3,"sources":["../../coffee/install.coffee","../../coffee/constants.coffee","../../coffee/dom.coffee","../../coffee/event.coffee","../../coffee/utilities.coffee","../../coffee/static.coffee","../../coffee/behaviors/enter.coffee","../../coffee/behaviors/focus.coffee","../../coffee/factory.coffee","../../coffee/behaviors/readonly.coffee","../../coffee/behaviors/tabulate.coffee","../../coffee/behaviors/toggle.coffee","../../coffee/elements/form-file.coffee","../../coffee/elements/form-select.coffee","../../coffee/patterns/carousel.coffee","../../coffee/patterns/dropdown.coffee","../../coffee/patterns/form-dropdown.coffee","../../coffee/patterns/tab.coffee"],"names":["ENV","document","window","global","Error","luda","installer","installed","name","property","includes","hasOwnProperty","_SCOPE","_install","Array","namespace","installedInstaller","installedName","ref","console","warn","KEY_LEFT","KEY_UP","KEY_RIGHT","KEY_DOWN","KEY_TAB","KEY_ESC","KEY_ENTER","$child","selector","$ancestor","querySelector","$children","$descendant","descendants","this","from","querySelectorAll","$unnested","ancestorSelector","filter","$parent","parentNode","matches","$parents","_ancestors","push","$after","$node","$target","lastChild","appendChild","insertBefore","nextSibling","$prepend","firstChild","reflow","$element","offsetHeight","_getTransitionDurations","style","propertyLength","durationArray","split","length","concat","slice","map","durationStr","duration","parseFloat","match","getTransitionDuration","delays","durations","finalDurations","styles","getComputedStyle","transitionProperty","transitionDelay","transitionDuration","index","Math","max","apply","_observeDom","onNodeAdded","onNodeRemoved","observer","observerConfig","childList","subtree","MutationObserver","mutations","forEach","mutation","$addedNodes","$removedNodes","removedNodes","addedNodes","Element","observe","documentElement","splice","_SWIPE_DISTANCE","_EVENT_TYPE_PREFIX","_SWIPE_LEFT","_SWIPE_RIGHT","_SWIPE_UP","_SWIPE_DOWN","_SWIPE_LEFT_OR_UP","_SWIPE_RIGHT_OR_DOWN","_DOC_READY","_FORM_RESET","eventPath","event","path","composedPath","target","on","handler","call","_onDocReady","_onReset","_onSwipe","_on","onOpposite","_self","addEventListener","e","trigger","every","dispatch","type","detail","delayMilliseconds","options","evt","bubbles","cancelable","composed","Event","setTimeout","dispatchEvent","readyState","bind","$touchStartElement","touchStartE","touchStartX","touchStartY","watch","touches","screenX","screenY","some","eventX","eventXOrY","eventY","touchDistanceX","touchDistanceY","abs","except","element","arr","indexOf","Static","[object Object]","_SELECTOR_INVALID_ERROR","_SELECTORS","_mergeSelectors","_selector","join","$ele","activateEvent","_ACTIVATE_EVENT_TYPE","defaultPrevented","deactivateEvent","_DEACTIVATE_EVENT_TYPE","activateDuration","_setActivatingMark","_ACTIVATED_EVENT_TYPE","_removeActivatingMark","deactivateDuration","_setDeactivatingMark","_DEACTIVATED_EVENT_TYPE","_removeDeactivatingMark","_isActivating","_isDeactivating","hasAttribute","_ACTIVATING_MARK_ATTRIBUTE","_DEACTIVATING_MARK_ATTRIBUTE","getAttribute","removeAttribute","value","setAttribute","_onEleAddedOrRemoved","action","_Observed","Observed","$matched","unshift","classObj","_observer","_onEleAdded","_onEleRemoved","_onElementAdded","_onElementRemoved","exposed","self","_init","_observe","_DISABLED_ATTRIBUTE","keyCode","preventDefault","click","_Class","$exception","_$focus","$focus","classList","remove","_CSS_CLASS","body","add","_isActive","_removeFocusClassExcept","_addFocusClassExceptHtmlAndBody","_PARENT_FOCUS_CHILDREN_SELECTOR","_PARENT_FOCUS_SELECTOR","blur","focus","HTMLElement","prototype","arguments","activeElement","_setElementPrototype","_changeFocusStateOnKeyEvent","_changeFocusStateOnMouseDownEvent","_TOUCHSTART_FOCUS_SELECTOR","getElementsByClassName","Factory","descendant","_children","child","_hasDescendant","_onMutations","_$component","constructor","_observerConfig","disconnect","$component","$family","componentIsElementInstance","instance","parent","_$COMPONENT_INVALID_ERROR","_query$family","query","_$parent","_instances","_createInstance","_parent","_$children","create","instance$component","attribute","results","_disconnect","_destroy","destroy","inited","_SELECTOR","_constructor","_COMPONENT_NO_SELECTOR_ERROR","_isReadonly","readonly","_READONLY_ATTRIBUTE","_READONLY_FALSE_VALUE","_getConfig","_setOriginalTabIndex","_setTabIndex","_ORIGINAL_TABINDEX_ATTRIBUTE","tabIndex","attributes","attributeFilter","$radio","$inputs","$input","$next","$prev","$sameNameRadios","radioIndex","_querySameName$radios","nodeName","toUpperCase","shiftKey","_query$prev$next","name$target","_query$targets","contains","_ACTIVE_CSS_CLASS","_isTransitioning","_activatePrevented","_handleActivateEnd","_shouldAutoDeactivate","_delayDeactivate","_deactivatePrevented","_handleDeactivateEnd","deactivate","activate","_handleActivateCancel","_handleDeactivateCancel","_AUTO_DEACTIVATE_ATTRIBUTE","delay","parseInt","_AUTO_DEACTIVATE_DURATION","_TOGGLE_TARGET_ATTRIBUTE","clickEventSelector","_TOGGLE_FOR_ATTRIBUTE","_TOGGLE_ATTRIBUTE","toggleChecked","$path","$toggle","toggleName","toggle","_TOGGLE_DISABLED_ATTRIBUTE","_$file","_setSimulatorInitialValue","_$simulator","_FILE_SELECTOR","_SIMULATOR_SELECTOR","createElement","_PLACEHOLDER_ATTRIBUTE","placeholder","values","files","file","_VALUE_SPLITOR","_VALUE_ATTRIBUTE","_insertSimulator","_setPlaceholderValue","_setSimulatorValue","$file","reset","indexOrIndexArray","selectedIndexes","_$select","multiple","_$multipleSelectPlaceholder","$option","selected","_markSelectedOption","selectedIndex","_setSingleSelectSimulatorValue","_$defaultSelectedOptions","_$singleSelectSimulator","_defaultSelectedOptionMarked","_SELECT_SELECTOR","_SINGLE_SELECT_SIMULATOR_SELECTOR","_MULTIPLE_SELECT_PLACEHOLDER_CSS_CLASS","_DEFAULT_SELECTED_OPTION_ATTRIBUTE","_INITED_ATTRIBUTE","_initMultipleSelect","_initSingleSelect","hasSelected","$selectedOption","innerText","_insertSingleSelectSimulator","_setSingleSelectedDefaultSelectedOption","_setSingleSelectPlaceholderValue","_markDefaultSelectedOption","className","disabled","_insertMultipleSelectBlankOption","_setMultipleSelectPlaceholderValue","$select","select","_reset","activatedIndex","_$items","_activeIndex","_canTransition","_wrap","_slideNext","_playTimeStamp","Date","now","_pausedRemainTime","_interval","_slidePrev","_intervaling","clearInterval","execute","pause","next","setInterval","_$indicators","_$nextControl","_$prevControl","_ITEMS_SELECTOR","_INDICATORS_SELECTOR","_PREV_CONTROL_SELECTOR","_NEXT_CONTROL_SELECTOR","_ITEM_ACTIVE_CSS_CLASS","_ACTIVE_INDEX","_INTERVAL_ATTRIBUTE","_FALSE","_INTERVAL","_WRAP_ATTRIBUTE","_WRAP","_layout","_handleTransitionCancel","play","_setIndicatorsState","_setDirectionControlState","$item","transition","_ITEM_NEXT_CSS_CLASS","_ITEM_PREV_CSS_CLASS","$activatedItem","_handleTransitionEnd","activeIndex","_getActivatingMark","_getDeactivatingMark","$indicator","ref1","ref2","ref3","$carousel","prev","startE","_ACTIVATED_INDEX_ATTRIBUTE","_$menu","_$focused","focusIndex","_$noneSwitches","_$switches","_isStandalone","_MENU_SELECTOR","_SWITCHES_SELECTOR","_NONE_SWITCHES_SELECTOR","_STANDALONE_ATTRIBUTE","exceptions","$dropdown","instances$dropdowns","instance$dropdown","exception","instanceHasntExceptionChild","instanceIsntInExceptions","deactivateExcept","_standaloneInstances","_deactivateChildrenExcept","_prev","_next","_$defaultValues","_$valueHolder","_$values","_VALUE_SELECTOR","_DEFAULT_VALUE_SELECTOR","_VALUE_HOLDER_SELECTOR","_setValueHolderAttribute","_setValueHolderValue","$value","checked","_LABEL_ATTRIBUTE","enter","_add","_ENTER_BEHAVIOR_SELECTOR","test","navigator","userAgent","_$panes","_activate","_PANE_SELECTOR","_INDICATOR_SELECTOR","$pane","_PANE_ACTIVE_CSS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I,KAACyW,aAAa9S,QAAQ,CAAC0U,WAAYvV,SACjC,GAAGA,QAAS9C,KAACyV,aAAb,CACE4C,WAAWtO,aAAa,UAAW,WACnCsO,WAAWuC,QAAU,SAFvB,CAIEvC,WAAWxO,gBAAgB,kBAC3BwO,WAAWuC,QAAU,SAEhBzS,gBAACwT,KAAM7Y,cAAU9C,KAAC8N,MAAM6N,MAAMzK,SAASpO,OAG1CqF,eACN,IAAA0C,KAAAA,KAAO7K,YACP9B,KAAKkH,GAAG,SAAUpF,KAACub,oBAAqB,SAACzV,GACvC,IAAA4H,SAAA,GAAG1N,KAAK4a,QAAR,CACElN,SAAW7C,KAAKiD,MAAM5P,KAAKoC,QAAQuK,KAAK+D,UAAW5O,OACnD0N,SAASgK,6BACThK,SAASwD,SAASxD,SAAS+I,aAAaxO,QAAQjI,YA7GtDoL,OAAC3M,OAAQ,MAET2M,OAACwD,UAAW,OACZxD,OAACkQ,eAAgB,YACjBlQ,OAACmQ,oBAAqB,+CACtBnQ,OAACqQ,uBAAwB,kBACzBrQ,OAAC6L,cAAe,EAEhB7L,OAACiC,gBACC,CAAA9J,UAAW,KACXC,QAAS","sourcesContent":["ENV = (->\n if typeof document isnt 'undefined'\n return window if typeof window isnt 'undefined'\n return global if typeof global isnt 'undefined'\n throw new Error 'Unsupported runtime environment.'\n)()\n\n\n\nunless typeof ENV.luda is 'function'\n ENV.luda = (installer) ->\n throw new Error 'Installer cannot be detected.' unless installer\n unless ['object', 'function'].includes typeof installer\n throw new Error 'Installer must be object, array or function.'\n if installer.hasOwnProperty '_SCOPE'\n unless typeof installer._SCOPE is 'string'\n throw new Error '_SCOPE must be string'\n return ENV.luda._install installer._SCOPE, installer\n if installer instanceof Array or typeof installer is 'function'\n throw new Error 'Unscoped installer must be object.'\n installed = {}\n for name, property of installer\n installed[name] = ENV.luda._install name, property\n installed\n\n ENV.luda._install = (namespace, installer) ->\n if ENV.luda[namespace]\n console.warn \"Namespace #{namespace} is ocupied, sikp installation.\"\n return ENV.luda[namespace]\n for installedName, installedInstaller of ENV.luda\n if installer is installedInstaller\n console.warn \"Installer is installed with name #{installedName},\n skip installation.\"\n return ENV.luda[installedName]\n if installer._install\n if typeof installer._install is 'function'\n return ENV.luda[namespace] = installer._install()\n return ENV.luda[namespace] = installer._install\n ENV.luda[namespace] = installer","import './install.coffee'\n\n\n\nluda\n\n KEY_LEFT: 37\n KEY_UP: 38\n KEY_RIGHT: 39\n KEY_DOWN: 40\n KEY_TAB: 9\n KEY_ESC: 27\n KEY_ENTER: 13","import './install.coffee'\n\n\n\nluda\n \n $child: (selector, $ancestor) ->\n $ancestor = document unless $ancestor\n $ancestor.querySelector selector\n\n $children: (selector, $ancestor) ->\n $ancestor = document unless $ancestor\n $descendant = @$child selector, $ancestor\n if $descendant\n descendants = Array.from($ancestor.querySelectorAll selector)\n else\n descendants = []\n\n $unnested: (selector, $ancestor, ancestorSelector) ->\n descendants = @$children selector, $ancestor\n descendants.filter ($descendant) =>\n $descendant if @$parent(ancestorSelector, $descendant) is $ancestor\n\n $parent: (selector, $descendant) ->\n $ancestor = $descendant.parentNode\n if $ancestor\n if $ancestor.matches and $ancestor.matches selector\n $ancestor\n else\n @$parent selector, $ancestor\n\n $parents: (selector, $descendant, _ancestors) ->\n $ancestor = @$parent selector, $descendant\n _ancestors = [] unless _ancestors\n if $ancestor\n _ancestors.push($ancestor)\n @$parents selector, $ancestor, _ancestors\n else\n _ancestors\n\n $after: ($node, $target) ->\n $parent = $target.parentNode\n if $parent.lastChild is $target\n $parent.appendChild $node\n else\n $parent.insertBefore $node, $target.nextSibling\n\n $prepend: ($node, $target) ->\n if $target.firstChild\n $target.insertBefore $node, $target.firstChild\n else\n $target.appendChild $node\n\n reflow: ($element) -> $element.offsetHeight\n\n _getTransitionDurations: (style, propertyLength) ->\n durationArray = style.split ','\n while durationArray.length < propertyLength\n durationArray = durationArray.concat durationArray\n if durationArray.length > propertyLength\n durationArray = durationArray.slice 0, propertyLength\n durationArray.map (durationStr) ->\n duration = parseFloat durationStr\n return 0 unless duration\n if durationStr.match 'ms' then duration else duration * 1000\n\n getTransitionDuration: ($element) ->\n styles = window.getComputedStyle $element\n length = styles.transitionProperty.split(',').length\n return 0 unless length\n delays = @_getTransitionDurations styles.transitionDelay, length\n durations = @_getTransitionDurations styles.transitionDuration, length\n finalDurations = durations.map (duration, index) -> duration + delays[index]\n Math.max.apply null, finalDurations\n\n _observeDom: (onNodeAdded, onNodeRemoved) ->\n observerConfig =\n childList: true\n subtree: true\n observer = new MutationObserver (mutations) ->\n mutations.forEach (mutation) ->\n $removedNodes = Array.from mutation.removedNodes\n $addedNodes = Array.from mutation.addedNodes\n $removedNodes.forEach ($node) ->\n onNodeRemoved $node if $node instanceof Element and onNodeRemoved\n $addedNodes.forEach ($node) ->\n onNodeAdded $node if $node instanceof Element and onNodeAdded\n observer.observe document.documentElement, observerConfig\n observer","import './install.coffee'\nimport './dom.coffee'\n\n\n\nluda\n \n _SWIPE_DISTANCE: 10\n _EVENT_TYPE_PREFIX: 'luda'\n _SWIPE_LEFT: 'swipeleft'\n _SWIPE_RIGHT: 'swiperight'\n _SWIPE_UP: 'swipeup'\n _SWIPE_DOWN: 'swipedown'\n _SWIPE_LEFT_OR_UP: 'swipeleft or swipeup'\n _SWIPE_RIGHT_OR_DOWN: 'swiperight or swipedown'\n _DOC_READY: 'docready'\n _FORM_RESET: 'reset'\n\n eventPath: (event) ->\n if event.composedPath\n path = event.composedPath()\n else if event.path\n path = event.path\n else\n path = [event.target].concat(luda.$parents '*', event.target)\n\n on: (event, selector..., handler) ->\n switch event\n when @_DOC_READY then @_onDocReady handler\n when @_FORM_RESET then @_onReset selector[0], handler\n when @_SWIPE_LEFT, \\\n @_SWIPE_RIGHT, \\\n @_SWIPE_UP, \\\n @_SWIPE_DOWN, \\\n @_SWIPE_LEFT_OR_UP, \\\n @_SWIPE_RIGHT_OR_DOWN\n then @_onSwipe event, selector[0], handler\n else @_on event, selector[0], handler\n\n onOpposite: (event, selector, handler) ->\n _self = this\n document.addEventListener event, (e) ->\n trigger = _self.eventPath(e).every ($element) ->\n not $element.matches or not $element.matches selector\n handler e if trigger\n\n dispatch: ($target, type, detail, delayMilliseconds, options = {}) ->\n options.bubbles = true unless typeof options.bubbles is 'boolean'\n options.cancelable = true unless typeof options.cancelable is 'boolean'\n options.composed = true unless typeof options.composed is 'boolean'\n evt = new Event \"#{@_EVENT_TYPE_PREFIX}:#{type}\", options\n evt.detail = detail\n if typeof delayMilliseconds is 'number'\n setTimeout ->\n $target.dispatchEvent evt if $target\n , delayMilliseconds\n else\n $target.dispatchEvent evt\n evt\n \n _onDocReady: (handler) ->\n if document.readyState is 'loading'\n document.addEventListener 'DOMContentLoaded', handler\n else\n handler()\n\n _onReset: (selector, handler) ->\n document.addEventListener 'reset', (e) ->\n if selector?\n luda.$children(selector, e.target).forEach ($element) ->\n handler.bind($element)(e)\n else\n handler e\n \n _onSwipe: (event, selector, handler) ->\n _self = this\n watch = false\n $touchStartElement = document\n touchStartE = null\n touchStartX = 0\n touchStartY = 0\n document.addEventListener 'touchstart', (e) ->\n if e.touches.length is 1\n touchStartX = e.touches[0].screenX\n touchStartY = e.touches[0].screenY\n if selector?\n _self.eventPath(e).some ($element) ->\n if $element.matches and $element.matches selector\n $touchStartElement = $element\n touchStartE = e\n watch = true\n return true\n else\n watch = true\n\n document.addEventListener 'touchmove', (e) ->\n if watch and e.touches.length is 1\n touchDistanceX = e.touches[0].screenX - touchStartX\n touchDistanceY = e.touches[0].screenY - touchStartY\n eventX = undefined\n eventY = undefined\n eventXOrY = undefined\n if Math.abs(touchDistanceX) >= _self._SWIPE_DISTANCE\n if touchDistanceX > 0\n eventX = _self._SWIPE_RIGHT\n else\n eventX = _self._SWIPE_LEFT\n if Math.abs(touchDistanceY) >= _self._SWIPE_DISTANCE\n if touchDistanceY > 0\n eventY = _self._SWIPE_DOWN\n else\n eventY = _self._SWIPE_UP\n if eventX is _self._SWIPE_LEFT \\\n or eventY is _self._SWIPE_UP\n eventXOrY = _self._SWIPE_LEFT_OR_UP\n if eventX is _self._SWIPE_RIGHT \\\n or eventY is _self._SWIPE_DOWN\n eventXOrY = _self._SWIPE_RIGHT_OR_DOWN\n if (eventX? and eventX is event) \\\n or (eventY? and eventY is event) \\\n or eventXOrY is event\n if selector?\n _self.eventPath(e).some ($element) ->\n if $element is $touchStartElement\n watch = false\n handler.bind($element)(touchStartE, e)\n return true\n else\n watch = false\n handler touchStartE, e\n\n _on: (event, selector, handler) ->\n if selector is window\n window.addEventListener event, (e) -> handler e\n else\n _self = this\n document.addEventListener event, (e) ->\n if selector?\n _self.eventPath(e).some ($element) ->\n if $element.matches and $element.matches selector\n handler.bind($element)(e)\n return true\n else\n handler e","import './install.coffee'\n\n\n\nluda\n \n except: (element, arr) ->\n arr.splice(arr.indexOf(element), 1) if arr.includes element","import './install.coffee'\nimport './utilities.coffee'\nimport './dom.coffee'\nimport './event.coffee'\n\n\n \nluda class Static\n\n @_SCOPE: 'Static'\n \n @_SELECTOR_INVALID_ERROR: '@param selector must be a css selector string'\n @_SELECTORS: []\n\n @_ACTIVATE_EVENT_TYPE: -> \"#{@_SCOPE}:activate\"\n @_ACTIVATED_EVENT_TYPE: -> \"#{@_SCOPE}:activated\"\n @_DEACTIVATE_EVENT_TYPE: -> \"#{@_SCOPE}:deactivate\"\n @_DEACTIVATED_EVENT_TYPE: -> \"#{@_SCOPE}:deactivated\"\n @_ACTIVATING_MARK_ATTRIBUTE: -> \"data-#{@_SCOPE}-activating\"\n @_DEACTIVATING_MARK_ATTRIBUTE: -> \"data-#{@_SCOPE}-deactivating\"\n\n @_Observed: []\n @_observer: null\n\n @_selector: ''\n\n @_add: (selector) ->\n throw new Error @_SELECTOR_INVALID_ERROR if typeof selector isnt 'string'\n @_SELECTORS.push selector unless @_SELECTORS.includes selector\n @_mergeSelectors()\n\n @_remove: (selector) ->\n throw new Error @_SELECTOR_INVALID_ERROR if typeof selector isnt 'string'\n luda.except selector, @_SELECTORS\n @_mergeSelectors()\n\n @_mergeSelectors: ->\n @_selector = @_SELECTORS.join ','\n\n @_activatePrevented: ($ele, detail) ->\n activateEvent = luda.dispatch $ele, @_ACTIVATE_EVENT_TYPE(), detail\n activateEvent.defaultPrevented\n\n @_deactivatePrevented: ($ele, detail) ->\n deactivateEvent = luda.dispatch $ele, @_DEACTIVATE_EVENT_TYPE(), detail\n deactivateEvent.defaultPrevented\n\n @_handleActivateEnd: ($ele, detail) ->\n @_setActivatingMark $ele, detail\n activateDuration = luda.getTransitionDuration $ele\n luda.dispatch $ele, @_ACTIVATED_EVENT_TYPE(), detail, activateDuration\n setTimeout =>\n @_removeActivatingMark $ele if $ele\n , activateDuration\n activateDuration\n\n @_handleDeactivateEnd: ($ele, detail) ->\n @_setDeactivatingMark $ele, detail\n deactivateDuration = luda.getTransitionDuration $ele\n luda.dispatch $ele, @_DEACTIVATED_EVENT_TYPE(), detail, deactivateDuration\n setTimeout =>\n @_removeDeactivatingMark $ele if $ele\n , deactivateDuration\n deactivateDuration\n\n @_handleActivateCancel: ($ele, detail) ->\n if @_isActivating $ele\n luda.dispatch $ele, @_ACTIVATED_EVENT_TYPE(), detail\n @_removeActivatingMark $ele\n\n @_handleDeactivateCancel: ($ele, detail) ->\n if @_isDeactivating $ele\n luda.dispatch $ele, @_DEACTIVATED_EVENT_TYPE(), detail\n @_removeDeactivatingMark $ele\n\n @_isActivating: ($ele) ->\n $ele.hasAttribute @_ACTIVATING_MARK_ATTRIBUTE()\n\n @_isDeactivating: ($ele) ->\n $ele.hasAttribute @_DEACTIVATING_MARK_ATTRIBUTE()\n\n @_isTransitioning: ($ele) ->\n @_isActivating($ele) or @_isDeactivating($ele)\n\n @_getActivatingMark: ($ele) ->\n $ele.getAttribute @_ACTIVATING_MARK_ATTRIBUTE()\n\n @_getDeactivatingMark: ($ele) ->\n $ele.getAttribute @_DEACTIVATING_MARK_ATTRIBUTE()\n\n @_removeActivatingMark: ($ele) ->\n $ele.removeAttribute @_ACTIVATING_MARK_ATTRIBUTE()\n\n @_removeDeactivatingMark: ($ele) ->\n $ele.removeAttribute @_DEACTIVATING_MARK_ATTRIBUTE()\n\n @_setActivatingMark: ($ele, value) ->\n $ele.setAttribute @_ACTIVATING_MARK_ATTRIBUTE(), value\n\n @_setDeactivatingMark: ($ele, value) ->\n $ele.setAttribute @_DEACTIVATING_MARK_ATTRIBUTE(), value\n\n @_onEleAdded: ($ele) ->\n Static._onEleAddedOrRemoved $ele, '_onElementAdded'\n\n @_onEleRemoved: ($ele) ->\n Static._onEleAddedOrRemoved $ele, '_onElementRemoved'\n\n @_onEleAddedOrRemoved: ($ele, action) ->\n Static._Observed.forEach (Observed) ->\n return unless Observed[action]\n $matched = luda.$children Observed._selector, $ele\n $matched.unshift $ele if $ele.matches Observed._selector\n $matched.forEach ($target) -> Observed[action] $target\n\n @_observe: (classObj) ->\n unless Static._observer\n Static._observer = \\\n luda._observeDom Static._onEleAdded, Static._onEleRemoved\n if classObj._onElementAdded or classObj._onElementRemoved \\\n and classObj._selector\n unless Static._Observed.includes classObj\n Static._Observed.push classObj\n\n @_install: ->\n self = this\n return this if this is Static\n @_SELECTORS = [] unless @hasOwnProperty '_SELECTORS'\n @_mergeSelectors()\n exposed = @_init() if typeof @_init is 'function'\n luda.on luda._DOC_READY, -> Static._observe(self)\n if exposed then exposed else this","import '../install.coffee'\nimport '../constants.coffee'\nimport '../event.coffee'\nimport '../static.coffee'\n\n\nluda class extends luda.Static\n\n @_SCOPE: 'enter'\n\n @_SELECTORS: [\n 'input[type=checkbox]'\n 'input[type=radio]'\n '[tabindex]'\n ]\n\n @_DISABLED_ATTRIBUTE: 'data-enter-disabled'\n\n @_init: ->\n self = this\n luda.on 'keydown', (e) ->\n if not document.documentElement.hasAttribute(self._DISABLED_ATTRIBUTE) \\\n and e.keyCode is luda.KEY_ENTER \\\n and e.target.matches(self._selector)\n e.preventDefault()\n setTimeout(-> e.target.click())","import '../install.coffee'\nimport '../dom.coffee'\nimport '../event.coffee'\nimport '../static.coffee'\n\n\n\nluda class extends luda.Static\n\n @_SCOPE: 'focus'\n\n @_CSS_CLASS: 'focus'\n # mouse focusable selectors\n @_SELECTORS: ['select'\n 'textarea'\n ':not(.btn-check):not(.btn-radio):not(.btn-file) >\n input:not([type=button]):not([type=submit]):not([type=reset])'\n ]\n @_TOUCHSTART_FOCUS_SELECTOR: 'input[type=range]'\n @_PARENT_FOCUS_SELECTOR: 'select[multiple]'\n @_PARENT_FOCUS_CHILDREN_SELECTOR: \"#{@_PARENT_FOCUS_SELECTOR} *\"\n\n @_DISABLED_ATTRIBUTE: 'data-focus-disabled'\n\n @_$focus: document.getElementsByClassName(@_CSS_CLASS)\n\n @_isActive: ->\n not document.documentElement.hasAttribute(@_DISABLED_ATTRIBUTE)\n\n @_removeFocusClassExcept: ($exception) ->\n Array.from(@_$focus).forEach ($focus) =>\n $focus.classList.remove @_CSS_CLASS if $focus isnt $exception\n\n @_addFocusClassExceptHtmlAndBody: ($target) ->\n if $target isnt document.body and $target isnt document.documentElement\n $target.classList.add @_CSS_CLASS\n\n @_changeFocusStateOnKeyEvent: (e) ->\n if @_isActive()\n @_removeFocusClassExcept e.target\n @_addFocusClassExceptHtmlAndBody e.target\n\n @_changeFocusStateOnMouseDownEvent: (e) ->\n if @_isActive()\n if e.target.matches @_PARENT_FOCUS_CHILDREN_SELECTOR\n target = luda.$parent @_PARENT_FOCUS_SELECTOR, e.target\n else\n target = e.target\n if target.matches @_selector\n @_removeFocusClassExcept target\n @_addFocusClassExceptHtmlAndBody target\n else\n @_removeFocusClassExcept()\n\n @_setElementPrototype: ->\n focus = HTMLElement.prototype.focus\n blur = HTMLElement.prototype.blur\n self = this\n HTMLElement.prototype.focus = ->\n focus.apply this, arguments\n if self._isActive() and document.activeElement is this\n self._removeFocusClassExcept this\n self._addFocusClassExceptHtmlAndBody this\n HTMLElement.prototype.blur = ->\n blur.apply this, arguments\n this.classList.remove self._CSS_CLASS if self._isActive()\n\n @_init: ->\n self = this\n @_setElementPrototype()\n luda.on 'keydown', @_changeFocusStateOnKeyEvent.bind this\n luda.on 'keyup', @_changeFocusStateOnKeyEvent.bind this\n luda.on 'mousedown', @_changeFocusStateOnMouseDownEvent.bind this\n luda.on 'touchstart', @_TOUCHSTART_FOCUS_SELECTOR, \\\n @_changeFocusStateOnMouseDownEvent.bind this\n luda.on 'focusin', @_changeFocusStateOnMouseDownEvent.bind this","import './install.coffee'\nimport './utilities.coffee'\nimport './dom.coffee'\nimport './event.coffee'\n\n\n\n\nluda class Factory\n\n @_SCOPE: 'Factory'\n \n @_COMPONENT_NO_SELECTOR_ERROR: 'Extended component must has a css selector'\n @_$COMPONENT_INVALID_ERROR: '@param $component must be an instance of Element'\n @_SELECTOR: ''\n\n @_ACTIVATE_EVENT_TYPE: -> \"#{@_SCOPE}:activate\"\n @_ACTIVATED_EVENT_TYPE: -> \"#{@_SCOPE}:activated\"\n @_DEACTIVATE_EVENT_TYPE: -> \"#{@_SCOPE}:deactivate\"\n @_DEACTIVATED_EVENT_TYPE: -> \"#{@_SCOPE}:deactivated\"\n @_ACTIVATING_MARK_ATTRIBUTE: -> \"data-#{@_SCOPE}-activating\"\n @_DEACTIVATING_MARK_ATTRIBUTE: -> \"data-#{@_SCOPE}-deactivating\"\n\n @_instances: []\n\n @_Observed: []\n @_observer: null\n @_observerConfig:\n childList: true\n subtree: true\n\n _hasDescendant: (descendant) ->\n if @_children.length and descendant\n return true if @_children.includes descendant\n return @_children.some (child) -> child._hasDescendant descendant\n else\n return false\n\n _observe: ->\n @_observer = new MutationObserver @_onMutations.bind this\n @_observer.observe @_$component, @constructor._observerConfig\n\n _disconnect: ->\n @_observer.disconnect()\n @_observer = null\n\n _activatePrevented: ($ele, detail) ->\n activateEvent = luda.dispatch($ele, \\\n @constructor._ACTIVATE_EVENT_TYPE(), detail)\n activateEvent.defaultPrevented\n\n _deactivatePrevented: ($ele, detail) ->\n deactivateEvent = luda.dispatch($ele, \\\n @constructor._DEACTIVATE_EVENT_TYPE(), detail)\n deactivateEvent.defaultPrevented\n\n _handleActivateEnd: ($ele, detail) ->\n @_setActivatingMark detail\n activateDuration = luda.getTransitionDuration $ele\n luda.dispatch($ele, \\\n @constructor._ACTIVATED_EVENT_TYPE(), detail, \\\n activateDuration)\n setTimeout =>\n @_removeActivatingMark() if @_$component\n , activateDuration\n activateDuration\n\n _handleDeactivateEnd: ($ele, detail) ->\n @_setDeactivatingMark detail\n deactivateDuration = luda.getTransitionDuration $ele\n luda.dispatch($ele, \\\n @constructor._DEACTIVATED_EVENT_TYPE(), detail, \\\n deactivateDuration)\n setTimeout =>\n @_removeDeactivatingMark() if @_$component\n , deactivateDuration\n deactivateDuration\n\n _handleActivateCancel: ($ele, detail) ->\n if @_isActivating()\n luda.dispatch($ele, \\\n @constructor._ACTIVATED_EVENT_TYPE(), detail)\n @_removeActivatingMark()\n\n _handleDeactivateCancel: ($ele, detail) ->\n if @_isDeactivating()\n luda.dispatch($ele, \\\n @constructor._DEACTIVATED_EVENT_TYPE(), detail)\n @_removeDeactivatingMark()\n\n _isActivating: ->\n @_$component.hasAttribute @constructor._ACTIVATING_MARK_ATTRIBUTE()\n\n _isDeactivating: ->\n @_$component.hasAttribute @constructor._DEACTIVATING_MARK_ATTRIBUTE()\n\n _isTransitioning: ->\n @_isActivating() or @_isDeactivating()\n\n _getActivatingMark: ->\n @_$component.getAttribute @constructor._ACTIVATING_MARK_ATTRIBUTE()\n\n _getDeactivatingMark: ->\n @_$component.getAttribute @constructor._DEACTIVATING_MARK_ATTRIBUTE()\n\n _removeActivatingMark: ->\n @_$component.removeAttribute @constructor._ACTIVATING_MARK_ATTRIBUTE()\n\n _removeDeactivatingMark: ->\n @_$component.removeAttribute @constructor._DEACTIVATING_MARK_ATTRIBUTE()\n\n _setActivatingMark: (value) ->\n @_$component.setAttribute @constructor._ACTIVATING_MARK_ATTRIBUTE(), value\n\n _setDeactivatingMark: (value) ->\n @_$component.setAttribute @constructor._DEACTIVATING_MARK_ATTRIBUTE(), value\n\n @create: ($component) ->\n componentIsElementInstance = $component instanceof Element\n throw new Error @_$COMPONENT_INVALID_ERROR unless componentIsElementInstance\n $family = @_query$family $component\n instance = @query $component\n if $family._$parent\n if parent = @query $family._$parent\n @_instances.push instance = @_createInstance $component unless instance\n if instance._parent isnt parent\n parent._children.push(instance) and (instance._parent = parent)\n $family._$children.forEach ($child) => @create $child\n return instance\n else\n @create $family._$parent\n return @query $component\n else\n @_instances.push instance = @_createInstance $component unless instance\n $family._$children.forEach ($child) => @create $child\n return instance\n\n @destroy: (instance$component) ->\n instance = @query instance$component\n if instance\n instance._disconnect() if instance._observer\n instance._destroy() if instance._destroy\n @destroy instance._children[0] while instance._children.length\n if instance._parent\n luda.except instance, instance._parent._children\n luda.except instance, @_instances\n for attribute, value of instance\n instance[attribute] = null\n \n @query: (instance$component) ->\n instance = null\n if instance$component instanceof this \\\n and @_instances.includes instance$component\n instance = instance$component\n else if instance$component instanceof Element\n @_instances.some (inited) ->\n if inited._$component is instance$component\n instance = inited\n return true\n return instance\n\n @_query$family: ($component) ->\n _$parent = null\n _$children = []\n if @_SELECTOR\n _$parent = luda.$parent @_SELECTOR, $component\n _$children = luda.$unnested @_SELECTOR, $component, @_SELECTOR\n {_$parent, _$children}\n\n @_createInstance: ($component) ->\n instance = new this()\n instance._$component = $component\n instance._parent = null\n instance._children = []\n instance._observer = null\n instance._constructor() if instance._constructor\n unless instance._observer and instance._onMutations and @_observerConfig\n instance._observe()\n instance\n\n @_onEleAdded: ($ele) ->\n Factory._onEleAddedOrRemoved($ele, 'create')\n\n @_onEleRemoved: ($ele) ->\n Factory._onEleAddedOrRemoved($ele, 'destroy')\n\n @_onEleAddedOrRemoved: ($ele, action) ->\n Factory._Observed.forEach (Observed) ->\n return Observed[action] $ele if $ele.matches Observed._SELECTOR\n luda.$children(Observed._SELECTOR, $ele).forEach ($child) ->\n Observed[action] $child\n\n @_observe: (classObj) ->\n unless Factory._observer\n Factory._observer = \\\n luda._observeDom Factory._onEleAdded, Factory._onEleRemoved\n unless Factory._Observed.includes classObj\n Factory._Observed.push classObj\n\n @_install: ->\n self = this\n return this if this is Factory\n unless @_SELECTOR or typeof @_SELECTOR isnt 'string'\n throw new Error @_COMPONENT_NO_SELECTOR_ERROR\n @_instances = [] unless @hasOwnProperty '_instances'\n exposed = @_init() if typeof @_init is 'function'\n luda.on luda._DOC_READY, ->\n luda.$children(self._SELECTOR).forEach ($component) ->\n self.create $component\n Factory._observe(self)\n if exposed then exposed else this","import '../install.coffee'\nimport '../factory.coffee'\n\n\n\nluda class extends luda.Factory\n\n @_SCOPE: 'readonly'\n @_READONLY_ATTRIBUTE: 'data-readonly'\n @_ORIGINAL_TABINDEX_ATTRIBUTE: 'data-readonly-tabindex'\n @_READONLY_FALSE_VALUE: 'false'\n @_SELECTOR: \"[#{@_READONLY_ATTRIBUTE}]\"\n\n @_observerConfig:\n attributes: true\n attributeFilter: [@_READONLY_ATTRIBUTE]\n\n _getConfig: ->\n readonly = @_$component.getAttribute @constructor._READONLY_ATTRIBUTE\n _isReadonly = readonly isnt @constructor._READONLY_FALSE_VALUE\n {_isReadonly}\n \n _constructor: ->\n {\n @_isReadonly\n } = @_getConfig()\n @_setOriginalTabIndex()\n @_setTabIndex()\n\n _onMutations: ->\n @_constructor()\n\n _setOriginalTabIndex: ->\n unless @_$component.hasAttribute \\\n @constructor._ORIGINAL_TABINDEX_ATTRIBUTE\n @_$component.setAttribute \\\n @constructor._ORIGINAL_TABINDEX_ATTRIBUTE, @_$component.tabIndex\n\n _setTabIndex: ->\n if @_isReadonly\n @_$component.tabIndex = -1\n else\n @_$component.tabIndex = \\\n @_$component.getAttribute @constructor._ORIGINAL_TABINDEX_ATTRIBUTE","import '../install.coffee'\nimport '../constants.coffee'\nimport '../dom.coffee'\nimport '../event.coffee'\nimport '../static.coffee'\n\n\n\nluda class extends luda.Static\n\n @_SCOPE: 'tabulate'\n\n @_SELECTORS: ['input[type=radio]:not([disabled])']\n\n @_DISABLED_ATTRIBUTE: 'data-tabulate-disabled'\n\n @_querySameName$radios: ($radio) ->\n if $radio.name\n selector = \"#{@_selector}[name=#{$radio.name}]\"\n else\n selector = @_selector\n $inputs = luda.$children selector\n $inputs.filter ($input) -> $input.tabIndex >= 0\n\n @_query$prev$next: ($radio) ->\n $sameNameRadios = @_querySameName$radios $radio\n radioIndex = $sameNameRadios.indexOf $radio\n $prev = $sameNameRadios[radioIndex - 1]\n $next = $sameNameRadios[radioIndex + 1]\n {$prev, $next}\n\n @_init: ->\n self = this\n luda.on 'keydown', (e) ->\n if not document.documentElement.hasAttribute(self._DISABLED_ATTRIBUTE) \\\n and e.keyCode is luda.KEY_TAB \\\n and e.target.nodeName.toUpperCase() is 'INPUT' \\\n and e.target.type is 'radio'\n if e.shiftKey\n if $prev = self._query$prev$next(e.target).$prev\n e.preventDefault()\n $prev.focus()\n else\n if $next = self._query$prev$next(e.target).$next\n e.preventDefault()\n $next.focus()","import '../install.coffee'\nimport '../dom.coffee'\nimport '../event.coffee'\nimport '../static.coffee'\n\n\n\nluda class extends luda.Static\n\n @_SCOPE: 'toggle'\n @_TOGGLE_TARGET_ATTRIBUTE: 'data-toggle-target'\n @_TOGGLE_ATTRIBUTE: 'data-toggle'\n @_TOGGLE_FOR_ATTRIBUTE: 'data-toggle-for'\n @_TOGGLE_DISABLED_ATTRIBUTE: 'data-toggle-disabled'\n @_AUTO_DEACTIVATE_ATTRIBUTE: 'data-toggle-auto-deactivate'\n @_AUTO_DEACTIVATE_DURATION: 3000\n @_ACTIVE_CSS_CLASS: 'toggle-active'\n @_SELECTORS: [\n \"[#{@_TOGGLE_TARGET_ATTRIBUTE}]\"\n ]\n\n @activate: (name$target) ->\n @_query$targets(name$target).forEach ($target) =>\n return if $target.classList.contains @_ACTIVE_CSS_CLASS\n return if @_isTransitioning $target\n return if @_activatePrevented $target\n $target.classList.add @_ACTIVE_CSS_CLASS\n @_handleActivateEnd $target\n @_delayDeactivate $target if @_shouldAutoDeactivate $target\n\n @deactivate: (name$target) ->\n @_query$targets(name$target).forEach ($target) =>\n return unless $target.classList.contains @_ACTIVE_CSS_CLASS\n return if @_isTransitioning $target\n return if @_deactivatePrevented $target\n $target.classList.remove @_ACTIVE_CSS_CLASS\n @_handleDeactivateEnd $target\n\n @toggle: (name$target) ->\n @_query$targets(name$target).forEach ($target) =>\n if $target.classList.contains @_ACTIVE_CSS_CLASS\n @deactivate($target)\n else\n @activate($target)\n\n @_onElementAdded: ($ele) ->\n @_handleActivateCancel $ele\n @_handleDeactivateCancel $ele\n @_delayDeactivate $ele if @_shouldAutoDeactivate $ele\n\n @_shouldAutoDeactivate: ($target) ->\n $target.hasAttribute @_AUTO_DEACTIVATE_ATTRIBUTE\n\n @_delayDeactivate: ($target) ->\n delay = parseInt $target.getAttribute(@_AUTO_DEACTIVATE_ATTRIBUTE), 10\n delay = @_AUTO_DEACTIVATE_DURATION if not delay\n setTimeout =>\n @deactivate $target if $target\n , delay\n\n @_query$targets: (name$target) ->\n if name$target instanceof Element\n [name$target]\n else\n luda.$children \"[#{@_TOGGLE_TARGET_ATTRIBUTE}=#{name$target}]\"\n\n @_init: ->\n self = this\n clickEventSelector = \"[#{@_TOGGLE_FOR_ATTRIBUTE}],[#{@_TOGGLE_ATTRIBUTE}]\"\n luda.on luda._DOC_READY, ->\n luda.$children(self._selector).forEach ($target) ->\n self._delayDeactivate $target if self._shouldAutoDeactivate $target\n luda.on 'click', clickEventSelector, (e) ->\n toggleChecked = false\n luda.eventPath(e).some ($path) ->\n if $path instanceof Element\n if $path.hasAttribute(self._TOGGLE_ATTRIBUTE) \\\n or $path.hasAttribute(self._TOGGLE_FOR_ATTRIBUTE)\n if toggleName = $path.getAttribute self._TOGGLE_FOR_ATTRIBUTE\n self.toggle toggleName\n toggleChecked = true\n if $path.hasAttribute self._TOGGLE_ATTRIBUTE\n if $path.hasAttribute self._TOGGLE_TARGET_ATTRIBUTE\n $toggle = $path\n else\n $toggle = luda.$parent \\\n \"[#{self._TOGGLE_TARGET_ATTRIBUTE}]\", $path\n if $toggle\n self.toggle $toggle\n toggleChecked = true\n else if $path.hasAttribute self._TOGGLE_DISABLED_ATTRIBUTE\n toggleChecked = true","import '../install.coffee'\nimport '../dom.coffee'\nimport '../event.coffee'\nimport '../factory.coffee'\n\n\n\nluda class extends luda.Factory\n\n @_SCOPE: 'fmFile'\n\n @_VALUE_SPLITOR: ' '\n @_SELECTOR: '.fm-file'\n @_FILE_SELECTOR: 'input[type=file]'\n @_SIMULATOR_SELECTOR: 'input:not([type=file])'\n @_PLACEHOLDER_ATTRIBUTE: 'placeholder'\n @_VALUE_ATTRIBUTE: 'value'\n\n @_observerConfig:\n childList: true\n subtree: true\n\n reset: ->\n @_$file.value = ''\n @_setSimulatorInitialValue()\n\n _getConfig: ->\n _$file = luda.$child @constructor._FILE_SELECTOR, @_$component\n _$simulator = luda.$child \\\n @constructor._SIMULATOR_SELECTOR, @_$component\n {_$file, _$simulator}\n\n _constructor: ->\n {\n @_$file,\n @_$simulator\n } = @_getConfig()\n @_init()\n\n _onMutations: ->\n @_constructor()\n\n _insertSimulator: ->\n @_$simulator = document.createElement 'input'\n @_$simulator.tabIndex = -1\n luda.$after @_$simulator, @_$file\n\n _setPlaceholderValue: ->\n if @_$file.hasAttribute @constructor._PLACEHOLDER_ATTRIBUTE\n @_$simulator.placeholder = \\\n @_$file.getAttribute @constructor._PLACEHOLDER_ATTRIBUTE\n\n _setSimulatorValue: ->\n values = []\n Array.from(@_$file.files).map (file) -> values.push file.name\n if values.length\n return @_$simulator.value = values.join @constructor._VALUE_SPLITOR\n @_setSimulatorInitialValue()\n \n _setSimulatorInitialValue: ->\n if @_$file.hasAttribute(@constructor._VALUE_ATTRIBUTE)\n @_$simulator.value = @_$file.getAttribute @constructor._VALUE_ATTRIBUTE\n\n _init: ->\n if @_$file\n @_insertSimulator() unless @_$simulator\n @_setPlaceholderValue()\n @_setSimulatorValue()\n\n @reset: ($file) -> @query($file).reset()\n\n @_init: ->\n self = this\n luda.on 'change', \"#{@_SELECTOR} #{@_FILE_SELECTOR}\", (e) ->\n self.query(luda.$parent self._SELECTOR, this)._setSimulatorValue()\n luda.on luda._FORM_RESET, @_SELECTOR, (e) ->\n setTimeout => self.query(this)._setSimulatorValue()","import '../install.coffee'\nimport '../dom.coffee'\nimport '../event.coffee'\nimport '../factory.coffee'\n\n\n\nluda class extends luda.Factory\n\n @_SCOPE: 'fmSelect'\n\n @_SELECTOR: '.fm-select'\n @_SELECT_SELECTOR: 'select'\n @_SINGLE_SELECT_SIMULATOR_SELECTOR: 'input'\n @_PLACEHOLDER_ATTRIBUTE: 'placeholder'\n @_MULTIPLE_SELECT_PLACEHOLDER_CSS_CLASS: 'fm-select-multiple-placeholder'\n @_DEFAULT_SELECTED_OPTION_ATTRIBUTE: 'data-fm-select-default-selected'\n @_INITED_ATTRIBUTE: 'data-fm-select-inited'\n\n @_observerConfig:\n childList: true\n attributes: true\n subtree: true\n attributeFilter: ['selected']\n\n select: (indexOrIndexArray) ->\n if @_$select.multiple\n if @_$multipleSelectPlaceholder\n selectedIndexes = indexOrIndexArray\n else\n selectedIndexes = indexOrIndexArray.map (index) -> index + 1\n Array.from(@_$select.options).forEach ($option, index) ->\n $option.selected = selectedIndexes.includes index\n @_markSelectedOption()\n else\n @_$select.selectedIndex = indexOrIndexArray\n @_setSingleSelectSimulatorValue()\n @_markSelectedOption()\n\n _getConfig: ->\n _$select = luda.$child @constructor._SELECT_SELECTOR, @_$component\n _$singleSelectSimulator = luda.$child \\\n @constructor._SINGLE_SELECT_SIMULATOR_SELECTOR, @_$component\n _$multipleSelectPlaceholder = luda.$child \\\n \".#{@constructor._MULTIPLE_SELECT_PLACEHOLDER_CSS_CLASS}\", @_$component\n _$defaultSelectedOptions = luda.$children \\\n \"[#{@constructor._DEFAULT_SELECTED_OPTION_ATTRIBUTE}]\", @_$component\n _defaultSelectedOptionMarked = @_$component.hasAttribute \\\n @constructor._INITED_ATTRIBUTE\n {\n _$select,\n _$singleSelectSimulator,\n _$multipleSelectPlaceholder,\n _$defaultSelectedOptions,\n _defaultSelectedOptionMarked\n }\n\n _constructor: ->\n {\n @_$select,\n @_$singleSelectSimulator,\n @_$multipleSelectPlaceholder,\n @_$defaultSelectedOptions,\n @_defaultSelectedOptionMarked\n } = @_getConfig()\n if @_$select\n if @_$select.multiple\n @_initMultipleSelect()\n else\n @_initSingleSelect()\n \n _onMutations: ->\n @_constructor()\n\n _markSelectedOption: ->\n @_disconnect() if @_observer\n Array.from(@_$select.options).forEach ($option) ->\n if $option.selected\n $option.setAttribute 'selected', 'selected'\n else\n $option.removeAttribute 'selected'\n @_observe() unless @_observer\n\n _markDefaultSelectedOption: ->\n @_$component.setAttribute @constructor._INITED_ATTRIBUTE, ''\n Array.from(@_$select.options).forEach ($option) =>\n if $option.selected\n $option.setAttribute @constructor._DEFAULT_SELECTED_OPTION_ATTRIBUTE, ''\n\n _setSingleSelectedDefaultSelectedOption: ->\n hasSelected = Array.from(@_$select.options).some ($option) ->\n $option.getAttribute('selected') is 'selected'\n @_$select.selectedIndex = -1 unless hasSelected\n\n _insertSingleSelectSimulator: ->\n @_$singleSelectSimulator = document.createElement 'input'\n @_$singleSelectSimulator.tabIndex = -1\n luda.$after @_$singleSelectSimulator, @_$select\n\n _setSingleSelectPlaceholderValue: ->\n @_$singleSelectSimulator.placeholder = @_$select.getAttribute \\\n @constructor._PLACEHOLDER_ATTRIBUTE\n\n _setSingleSelectSimulatorValue: ->\n if $selectedOption = @_$select.options[@_$select.selectedIndex]\n @_$singleSelectSimulator.value = $selectedOption.innerText\n else\n @_$singleSelectSimulator.value = ''\n\n _initSingleSelect: ->\n @_insertSingleSelectSimulator() unless @_$singleSelectSimulator\n if @_$select.hasAttribute @constructor._PLACEHOLDER_ATTRIBUTE\n @_setSingleSelectedDefaultSelectedOption()\n @_setSingleSelectPlaceholderValue()\n @_markDefaultSelectedOption() unless @_defaultSelectedOptionMarked\n @_setSingleSelectSimulatorValue()\n @_markSelectedOption()\n\n _insertMultipleSelectBlankOption: ->\n @_$multipleSelectPlaceholder = document.createElement 'option'\n @_$multipleSelectPlaceholder.className = \\\n @constructor._MULTIPLE_SELECT_PLACEHOLDER_CSS_CLASS\n @_$multipleSelectPlaceholder.disabled = true\n luda.$prepend @_$multipleSelectPlaceholder, @_$select\n\n _setMultipleSelectPlaceholderValue: ->\n @_$multipleSelectPlaceholder.innerText = @_$select.getAttribute \\\n @constructor._PLACEHOLDER_ATTRIBUTE\n\n _initMultipleSelect: ->\n unless @_$multipleSelectPlaceholder\n if @_$select.hasAttribute @constructor._PLACEHOLDER_ATTRIBUTE\n @_insertMultipleSelectBlankOption()\n @_setMultipleSelectPlaceholderValue()\n @_markDefaultSelectedOption() unless @_defaultSelectedOptionMarked\n\n _reset: ->\n if @_$select\n Array.from(@_$select.options).forEach ($option) =>\n $option.selected = @_$defaultSelectedOptions.includes $option\n @_setSingleSelectSimulatorValue() unless @_$select.multiple\n @_markSelectedOption()\n\n @select: ($select, indexOrIndexArray) ->\n @query($select).select indexOrIndexArray\n\n @_init: ->\n self = this\n luda.on 'change', \"#{@_SELECTOR} #{@_SELECT_SELECTOR}\", (e) ->\n instance = self.query(luda.$parent self._SELECTOR, this)\n instance._setSingleSelectSimulatorValue() unless this.multiple\n instance._markSelectedOption()\n luda.on luda._FORM_RESET, @_SELECTOR, (e) ->\n setTimeout => self.query(this)._reset()","import '../install.coffee'\nimport '../dom.coffee'\nimport '../event.coffee'\nimport '../factory.coffee'\n\n\n\nluda class extends luda.Factory\n\n @_SCOPE: 'carousel'\n\n @_SELECTOR: '.carousel'\n @_ITEMS_SELECTOR: '.carousel-item'\n @_PREV_CONTROL_SELECTOR: '.carousel-prev'\n @_NEXT_CONTROL_SELECTOR: '.carousel-next'\n @_INDICATORS_SELECTOR: '.carousel-indicators .btn'\n @_INTERVAL_ATTRIBUTE: 'data-carousel-interval'\n @_WRAP_ATTRIBUTE: 'data-carousel-wrap'\n @_ACTIVATED_INDEX_ATTRIBUTE: 'data-carousel-activated-index'\n @_ITEM_ACTIVE_CSS_CLASS: 'carousel-item-active'\n @_ITEM_NEXT_CSS_CLASS: 'carousel-item-next'\n @_ITEM_PREV_CSS_CLASS: 'carousel-item-prev'\n @_ACTIVE_INDEX: 0\n @_INTERVAL: 5000\n @_WRAP: true\n @_FALSE: 'false'\n\n @_observerConfig:\n childList: true\n attributes: true\n subtree: true\n attributeFilter: [@_INTERVAL_ATTRIBUTE, @_WRAP_ATTRIBUTE]\n \n # public\n activate: (index) ->\n if @_$items.length and not @_isTransitioning()\n activatedIndex = @_activeIndex\n if index? \\\n and index isnt @_activeIndex \\\n and 0 <= index <= @_$items.length - 1 \\\n and @_canTransition(index, activatedIndex)\n @_activeIndex = index\n action = if index < activatedIndex then '_slidePrev' else '_slideNext'\n @[action] activatedIndex\n\n next: ->\n if @_$items.length and not @_isTransitioning()\n activatedIndex = @_activeIndex\n index = activatedIndex + 1\n if index > @_$items.length - 1\n return unless @_wrap\n index = 0\n return unless @_canTransition(index, activatedIndex)\n @_activeIndex = index\n @_slideNext activatedIndex\n @_playTimeStamp = Date.now()\n @_pausedRemainTime = @_interval\n\n prev: ->\n if @_$items.length and not @_isTransitioning()\n activatedIndex = @_activeIndex\n index = activatedIndex - 1\n if index < 0\n return unless @_wrap\n index = @_$items.length - 1\n return unless @_canTransition(index, activatedIndex)\n @_activeIndex = index\n @_slidePrev activatedIndex\n @_playTimeStamp = Date.now()\n @_pausedRemainTime = @_interval\n\n pause: ->\n if @_intervaling?\n clearInterval @_intervaling\n @_intervaling = null\n @_pausedRemainTime = @_pausedRemainTime - (Date.now() - @_playTimeStamp)\n\n play: ->\n if @_interval and @_$items.length > 1\n @_playTimeStamp = Date.now()\n @pause()\n execute = =>\n @next()\n @_intervaling = setInterval @next.bind(this), @_interval\n @_intervaling = setTimeout execute, @_pausedRemainTime\n\n # private\n _getConfig: ->\n _$items = luda.$unnested \\\n @constructor._ITEMS_SELECTOR, @_$component, @constructor._SELECTOR\n _$indicators = luda.$unnested \\\n @constructor._INDICATORS_SELECTOR, @_$component, @constructor._SELECTOR\n _$prevControl = luda.$child \\\n @constructor._PREV_CONTROL_SELECTOR, @_$component\n _$nextControl = luda.$child \\\n @constructor._NEXT_CONTROL_SELECTOR, @_$component\n _activeIndex = _$items.indexOf \\\n luda.$child \".#{@constructor._ITEM_ACTIVE_CSS_CLASS}\", @_$component\n _activeIndex = @constructor._ACTIVE_INDEX if _activeIndex is -1\n _interval = @_$component.getAttribute(@constructor._INTERVAL_ATTRIBUTE)\n if _interval is @constructor._FALSE\n _interval = false\n else\n _interval = Math.abs(parseInt _interval, 10) or @constructor._INTERVAL\n _wrap = @_$component.getAttribute(@constructor._WRAP_ATTRIBUTE)\n _wrap = if _wrap is @constructor._FALSE then false else @constructor._WRAP\n {\n _$items,\n _$indicators,\n _$prevControl,\n _$nextControl,\n _activeIndex,\n _interval,\n _wrap\n }\n\n _constructor: ->\n {\n @_$items,\n @_$indicators,\n @_$prevControl,\n @_$nextControl,\n @_activeIndex,\n @_interval,\n @_wrap\n } = @_getConfig()\n @_intervaling = null\n @_playTimeStamp = 0\n @_pausedRemainTime = @_interval\n @_layout()\n @_handleTransitionCancel()\n @play()\n\n _onMutations: (mutations) ->\n {\n @_$items,\n @_$indicators,\n @_$prevControl,\n @_$nextControl,\n @_activeIndex,\n @_interval,\n @_wrap\n } = @_getConfig()\n @_setIndicatorsState()\n @_setDirectionControlState()\n @play()\n\n _destroy: ->\n @pause()\n\n _layout: ->\n @_$items.forEach ($item, index) =>\n $item.style.transition = 'none'\n if index > @_activeIndex\n $item.classList.add @constructor._ITEM_NEXT_CSS_CLASS\n $item.classList.remove @constructor._ITEM_PREV_CSS_CLASS\n $item.classList.remove @constructor._ITEM_ACTIVE_CSS_CLASS\n else if index < @_activeIndex\n $item.classList.add @constructor._ITEM_PREV_CSS_CLASS\n $item.classList.remove @constructor._ITEM_NEXT_CSS_CLASS\n $item.classList.remove @constructor._ITEM_ACTIVE_CSS_CLASS\n else\n $item.classList.add @constructor._ITEM_ACTIVE_CSS_CLASS\n $item.classList.remove @constructor._ITEM_NEXT_CSS_CLASS\n $item.classList.remove @constructor._ITEM_PREV_CSS_CLASS\n luda.reflow $item\n $item.style.transition = ''\n @_setIndicatorsState()\n @_setDirectionControlState()\n\n _slideNext: (activatedIndex) ->\n if @_$items.length > 1\n $item = @_$items[@_activeIndex]\n $activatedItem = @_$items[activatedIndex]\n $item.style.transition = 'none'\n $item.classList.remove @constructor._ITEM_PREV_CSS_CLASS\n $item.classList.add @constructor._ITEM_NEXT_CSS_CLASS\n luda.reflow $item\n $item.style.transition = ''\n $item.classList.remove @constructor._ITEM_NEXT_CSS_CLASS\n $item.classList.add @constructor._ITEM_ACTIVE_CSS_CLASS\n $activatedItem.classList.remove @constructor._ITEM_ACTIVE_CSS_CLASS\n $activatedItem.classList.add @constructor._ITEM_PREV_CSS_CLASS\n @_handleTransitionEnd @_activeIndex, activatedIndex\n @_setIndicatorsState()\n @_setDirectionControlState()\n\n _slidePrev: (activatedIndex) ->\n if @_$items.length > 1\n $item = @_$items[@_activeIndex]\n $activatedItem = @_$items[activatedIndex]\n $item.style.transition = 'none'\n $item.classList.remove @constructor._ITEM_NEXT_CSS_CLASS\n $item.classList.add @constructor._ITEM_PREV_CSS_CLASS\n luda.reflow $item\n $item.style.transition = ''\n $item.classList.remove @constructor._ITEM_PREV_CSS_CLASS\n $item.classList.add @constructor._ITEM_ACTIVE_CSS_CLASS\n $activatedItem.classList.remove @constructor._ITEM_ACTIVE_CSS_CLASS\n $activatedItem.classList.add @constructor._ITEM_NEXT_CSS_CLASS\n @_handleTransitionEnd @_activeIndex, activatedIndex\n @_setIndicatorsState()\n @_setDirectionControlState()\n\n _canTransition: (activeIndex, activatedIndex) ->\n not @_activatePrevented(@_$items[activeIndex], activeIndex) \\\n and not @_deactivatePrevented(@_$items[activatedIndex], activatedIndex)\n\n _handleTransitionEnd: (activeIndex, activatedIndex) ->\n activateDuration = \\\n @_handleActivateEnd @_$items[activeIndex], activeIndex\n deactivateDuration = \\\n @_handleDeactivateEnd @_$items[activatedIndex], activatedIndex\n\n _handleTransitionCancel: ->\n if @_isActivating()\n index = parseInt @_getActivatingMark(), 10\n @_handleActivateCancel @_$items[index], index\n if @_isDeactivating()\n activatedIndex = parseInt @_getDeactivatingMark(), 10\n @_handleDeactivateCancel @_$items[activatedIndex], activatedIndex\n\n _setIndicatorsState: ->\n @_$indicators.forEach ($indicator, index) =>\n $indicator.disabled = index is @_activeIndex\n\n _setDirectionControlState: ->\n if @_$items.length <= 1\n @_$prevControl?.disabled = @_$nextControl?.disabled = true\n else\n @_$prevControl?.disabled = @_activeIndex is 0 and not @_wrap\n @_$nextControl?.disabled = \\\n @_activeIndex is @_$items.length - 1 and not @_wrap\n \n @activate: ($carousel, index) -> @query($carousel).activate index\n\n @next: ($carousel) -> @query($carousel).next()\n\n @prev: ($carousel) -> @query($carousel).prev()\n\n @pause: ($carousel) -> @query($carousel).pause()\n\n @play: ($carousel) -> @query($carousel).play()\n\n # static private\n @_init: ->\n self = this\n luda.on 'click', @_INDICATORS_SELECTOR, (e) ->\n instance = self.query luda.$parent self._SELECTOR, this\n instance.activate instance._$indicators.indexOf this\n luda.on 'touchstart', @_SELECTOR, (e) ->\n self.query(this).pause()\n luda.on 'touchend', @_SELECTOR, (e) ->\n setTimeout => self.query(this).play()\n luda.on 'mouseover', @_SELECTOR, (e) ->\n self.query(this).pause()\n luda.on 'mouseout', @_SELECTOR, (e) ->\n self.query(this).play()\n luda.on luda._SWIPE_LEFT_OR_UP, @_SELECTOR, (startE, e) ->\n self.query(this).next()\n luda.on luda._SWIPE_RIGHT_OR_DOWN, @_SELECTOR, (startE, e) ->\n self.query(this).prev()\n luda.on 'click', @_PREV_CONTROL_SELECTOR, (e) ->\n self.query(luda.$parent self._SELECTOR, this).prev()\n luda.on 'click', @_NEXT_CONTROL_SELECTOR, (e) ->\n self.query(luda.$parent self._SELECTOR, this).next()","import '../install.coffee'\nimport '../constants.coffee'\nimport '../dom.coffee'\nimport '../event.coffee'\nimport '../factory.coffee'\n\n\n\nluda class extends luda.Factory\n\n @_SCOPE: 'dropdown'\n @_SELECTOR: '.dropdown-fixed,.dropdown-absolute,\n .dropdown-static,.dropdown-absolute-m'\n @_MENU_SELECTOR: '.dropdown-menu'\n @_ITEMS_SELECTOR: 'a[href]:not([disabled]),button:not([disabled]),\n input:not([disabled]),[tabindex]:not([disabled])'\n @_TOGGLE_ATTRIBUTE: 'data-dropdown-toggle'\n @_TOGGLE_DISABLED_ATTRIBUTE: 'data-dropdown-toggle-disabled'\n @_STANDALONE_ATTRIBUTE: 'data-dropdown-standalone'\n @_SWITCHES_SELECTOR: \"[#{@_TOGGLE_ATTRIBUTE}]\"\n @_NONE_SWITCHES_SELECTOR: \"[#{@_TOGGLE_DISABLED_ATTRIBUTE}]\"\n @_ACTIVE_CSS_CLASS: 'dropdown-active'\n\n @_observerConfig:\n childList: true\n attributes: true\n subtree: true\n attributeFilter: [\n @_TOGGLE_ATTRIBUTE\n @_TOGGLE_DISABLED_ATTRIBUTE\n @_STANDALONE_ATTRIBUTE\n ]\n\n @_$focused: []\n\n activate: ->\n return if @_isActive() or @_isTransitioning()\n return if @_activatePrevented @_$menu\n @_$component.classList.add @constructor._ACTIVE_CSS_CLASS\n @constructor._$focused.push document.activeElement\n @_parent?.activate()\n @_handleActivateEnd @_$menu\n\n deactivate: (focus) ->\n return unless @_isActive() and not @_isTransitioning()\n return if @_deactivatePrevented @_$menu\n @_$component.classList.remove @constructor._ACTIVE_CSS_CLASS\n @_children.forEach (child) -> child.deactivate()\n if focus\n @constructor._$focused[@constructor._$focused.length - 1]?.focus()\n @constructor._$focused.splice @constructor._$focused.length - 1, 1\n @_handleDeactivateEnd @_$menu\n\n toggle: (focus) ->\n if @_isActive() then @deactivate(focus) else @activate()\n\n _prev: ->\n if @_$items.length and @_isActive()\n focusIndex = @_$items.indexOf(document.activeElement) - 1\n focusIndex = 0 if focusIndex < 0\n @_$items[focusIndex].focus()\n\n _next: ->\n if @_$items.length and @_isActive()\n focusIndex = @_$items.indexOf(document.activeElement) + 1\n focusIndex = @_$items.length - 1 if focusIndex > @_$items.length - 1\n @_$items[focusIndex].focus()\n\n _getConfig: ->\n _$menu = luda.$child @constructor._MENU_SELECTOR, @_$component\n _$switches = luda.$unnested( \\\n @constructor._SWITCHES_SELECTOR, @_$component, @constructor._SELECTOR)\n .concat(luda.$unnested \\\n @constructor._SWITCHES_SELECTOR, _$menu, @constructor._MENU_SELECTOR)\n _$noneSwitches = luda.$unnested( \\\n @constructor._NONE_SWITCHES_SELECTOR, \\\n @_$component, @constructor._SELECTOR) \\\n .concat(luda.$unnested \\\n @constructor._NONE_SWITCHES_SELECTOR, _$menu, @constructor._MENU_SELECTOR)\n _$items = luda.$unnested \\\n @constructor._ITEMS_SELECTOR, _$menu, @constructor._MENU_SELECTOR\n _isStandalone = @_$component.hasAttribute @constructor._STANDALONE_ATTRIBUTE\n {_$menu, _$items, _$switches, _$noneSwitches, _isStandalone}\n\n _constructor: ->\n @_onMutations()\n @_handleActivateCancel @_$menu\n @_handleDeactivateCancel @_$menu\n\n _onMutations: (mutations) ->\n {\n @_$menu,\n @_$items,\n @_$switches,\n @_$noneSwitches,\n @_isStandalone\n } = @_getConfig()\n\n _isActive: ->\n @_$component.classList.contains @constructor._ACTIVE_CSS_CLASS\n\n _deactivateChildrenExcept: (exceptions) ->\n if exceptions and not (exceptions instanceof Array)\n exceptions = [exceptions]\n if exceptions\n @_children.forEach (child) ->\n if child._isActive() and not exceptions.includes child\n child.deactivate()\n else\n @_children.forEach (child) ->\n child.deactivate() if child._isActive()\n\n @activate: ($dropdown) -> @query($dropdown).activate()\n\n @deactivate: ($dropdown, focus) -> @query($dropdown).deactivate(focus)\n\n @toggle: ($dropdown, focus) -> @query($dropdown).toggle focus\n\n @deactivateExcept: (instances$dropdowns) ->\n exceptions = []\n if instances$dropdowns and not (instances$dropdowns instanceof Array)\n instances$dropdowns = [instances$dropdowns]\n if instances$dropdowns\n instances$dropdowns.forEach (instance$dropdown) =>\n exceptions.push exception if exception = @query instance$dropdown\n if exceptions.length\n @_instances.forEach (instance) ->\n instanceIsntInExceptions = not exceptions.includes instance\n instanceHasntExceptionChild = exceptions.every (exception) ->\n not instance._hasDescendant exception\n if instance._isActive() \\\n and instanceIsntInExceptions \\\n and instanceHasntExceptionChild\n instance.deactivate()\n else\n @_instances.forEach (instance) ->\n instance.deactivate() if instance._isActive()\n\n @_standaloneInstances: ->\n @_instances.filter (instance) -> instance if instance._isStandalone\n\n @_init: ->\n self = this\n luda.onOpposite 'click', @_SELECTOR, (e) ->\n self.deactivateExcept self._standaloneInstances()\n luda.on 'click', @_SELECTOR, (e) ->\n if instance = self.query this\n toggleChecked = false\n focus = not e.detail\n self.deactivateExcept(self._standaloneInstances().concat instance)\n instance._deactivateChildrenExcept()\n instance._parent._deactivateChildrenExcept(instance) if instance._parent\n if instance._$switches.length or instance._$noneSwitches.length\n luda.eventPath(e).some ($path) ->\n if instance._$switches.includes $path\n instance.toggle focus\n toggleChecked = true\n else if instance._$noneSwitches.includes $path\n toggleChecked = true\n instance.toggle focus unless toggleChecked\n\n luda.onOpposite 'keyup', @_SELECTOR, (e) -> self.deactivateExcept()\n luda.on 'keyup', @_SELECTOR, (e) ->\n if e.keyCode is luda.KEY_TAB and instance = self.query this\n self.deactivateExcept(instance)\n instance.activate()\n luda.on 'keydown', @_SELECTOR, (e) ->\n if e.keyCode is luda.KEY_ESC and instance = self.query this\n e.preventDefault()\n if instance._isActive()\n instance.deactivate true\n else\n instance._parent?.deactivate true\n luda.on 'keydown', @_SELECTOR, (e) ->\n if [luda.KEY_LEFT, luda.KEY_UP].includes(e.keyCode) \\\n and instance = self.query this\n e.preventDefault()\n if instance._isActive()\n instance._prev()\n else\n instance._parent?._prev()\n else if [luda.KEY_RIGHT, luda.KEY_DOWN].includes(e.keyCode) \\\n and instance = self.query this\n e.preventDefault()\n if instance._isActive()\n instance._next()\n else\n instance._parent?._next()","import '../install.coffee'\nimport '../dom.coffee'\nimport '../event.coffee'\nimport '../factory.coffee'\nimport '../behaviors/focus.coffee'\nimport '../behaviors/enter.coffee'\n\n\n\nluda class extends luda.Factory\n\n @_SCOPE: 'fmDropdown'\n\n @_SELECTOR: '.fm-dropdown'\n @_VALUE_SPLITOR: ' '\n @_LABEL_ATTRIBUTE: 'data-fm-dropdown-label'\n @_VALUE_SELECTOR: '.dropdown-items .btn-radio input,\n .dropdown-items .btn-check input'\n @_DEFAULT_VALUE_SELECTOR: '.dropdown-items .btn-radio label,\n .dropdown-items .btn-check label'\n @_VALUE_HOLDER_SELECTOR: '.fm input'\n @_ENTER_BEHAVIOR_SELECTOR: '.fm-dropdown .fm input'\n\n @_observerConfig:\n childList: true\n attributes: true\n subtree: true\n attributeFilter: [\n 'checked'\n @_LABEL_ATTRIBUTE\n ]\n\n _getConfig: ->\n _$values = luda.$children @constructor._VALUE_SELECTOR, @_$component\n _$defaultValues = luda.$children \\\n @constructor._DEFAULT_VALUE_SELECTOR, @_$component\n _$valueHolder = luda.$child \\\n @constructor._VALUE_HOLDER_SELECTOR, @_$component\n {_$values, _$valueHolder, _$defaultValues}\n\n _constructor: ->\n {\n @_$values,\n @_$valueHolder,\n @_$defaultValues\n } = @_getConfig()\n @_setValueHolderAttribute()\n @_setValueHolderValue()\n\n _onMutations: ->\n @_constructor()\n\n _setValueHolderValue: ->\n values = []\n @_$values.forEach ($value, index) =>\n if $value.checked\n if $value.hasAttribute @constructor._LABEL_ATTRIBUTE\n value = $value.getAttribute @constructor._LABEL_ATTRIBUTE\n else\n value = @_$defaultValues[index].innerText\n values.push value if value and not values.includes value\n if @_$valueHolder\n @_$valueHolder.value = values.join @constructor._VALUE_SPLITOR\n\n _setValueHolderAttribute: ->\n @_$valueHolder.setAttribute('readonly', '') if @_$valueHolder\n\n @_init: ->\n self = this\n luda.enter._add @_ENTER_BEHAVIOR_SELECTOR\n luda.on 'change', \"#{@_SELECTOR} #{@_VALUE_SELECTOR}\", (e) ->\n self.query(luda.$parent self._SELECTOR, this)._setValueHolderValue()\n luda.on luda._FORM_RESET, @_SELECTOR, (e) ->\n setTimeout => self.query(this)._setValueHolderValue()\n # prevent ios device pop out wired navigation pannel\n if /iphone/i.test(navigator.userAgent) or /ipad/i.test(navigator.userAgent)\n luda.on 'focusin', @_ENTER_BEHAVIOR_SELECTOR, (e) ->\n this.blur()\n this.classList.add luda.focus._CSS_CLASS","import '../install.coffee'\nimport '../dom.coffee'\nimport '../event.coffee'\nimport '../factory.coffee'\n\n\n\nluda class extends luda.Factory\n\n @_SCOPE: 'tab'\n\n @_SELECTOR: '.tab'\n @_PANE_SELECTOR: '.tab-pane'\n @_INDICATOR_SELECTOR: '.tab-indicators .btn-radio input[type=radio]'\n @_PANE_ACTIVE_CSS_CLASS: 'tab-pane-active'\n @_ACTIVE_INDEX: 0\n\n @_observerConfig:\n childList: true\n subtree: true\n \n # public\n activate: (index) ->\n if @_$panes.length and not @_isTransitioning()\n activatedIndex = @_activeIndex\n if index? \\\n and index isnt @_activeIndex \\\n and 0 <= index <= @_$panes.length - 1\n return unless @_canTransition index, activatedIndex\n @_activeIndex = index\n @_activate activatedIndex\n\n\n # private\n _getConfig: ->\n _$panes = luda.$unnested \\\n @constructor._PANE_SELECTOR, @_$component, @constructor._SELECTOR\n _$indicators = luda.$unnested \\\n @constructor._INDICATOR_SELECTOR, @_$component, @constructor._SELECTOR\n _activeIndex = @constructor._ACTIVE_INDEX\n _$indicators.some ($indicator, index) ->\n if $indicator.checked\n _activeIndex = index\n true\n {_$panes, _$indicators, _activeIndex}\n\n _constructor: ->\n {\n @_$panes,\n @_$indicators,\n @_activeIndex\n } = @_getConfig()\n @_layout()\n @_handleTransitionCancel()\n\n _onMutations: (mutations) ->\n {\n @_$panes,\n @_$indicators,\n @_activeIndex\n } = @_getConfig()\n @_setIndicatorsState()\n\n _layout: ->\n @_$panes.forEach ($pane, index) =>\n $pane.style.transition = 'none'\n if index is @_activeIndex\n $pane.classList.add @constructor._PANE_ACTIVE_CSS_CLASS\n else\n $pane.classList.remove @constructor._PANE_ACTIVE_CSS_CLASS\n luda.reflow $pane\n $pane.style.transition = ''\n @_setIndicatorsState()\n\n _activate: (activatedIndex) ->\n $pane = @_$panes[@_activeIndex]\n $activatedPane = @_$panes[activatedIndex]\n $pane.classList.add @constructor._PANE_ACTIVE_CSS_CLASS\n $activatedPane.classList.remove @constructor._PANE_ACTIVE_CSS_CLASS\n @_handleTransitionEnd @_activeIndex, activatedIndex\n @_setIndicatorsState()\n\n _canTransition: (activeIndex, activatedIndex) ->\n not @_activatePrevented(@_$panes[activeIndex], activeIndex) \\\n and not @_deactivatePrevented(@_$panes[activatedIndex], activatedIndex)\n\n _handleTransitionEnd: (activeIndex, activatedIndex) ->\n activateDuration = \\\n @_handleActivateEnd @_$panes[activeIndex], activeIndex\n deactivateDuration = \\\n @_handleDeactivateEnd @_$panes[activatedIndex], activatedIndex\n\n _handleTransitionCancel: ->\n if @_isActivating()\n index = parseInt @_getActivatingMark(), 10\n @_handleActivateCancel @_$panes[index], index\n if @_isDeactivating()\n activatedIndex = parseInt @_getDeactivatingMark(), 10\n @_handleDeactivateCancel @_$panes[activatedIndex], activatedIndex\n\n _setIndicatorsState: ->\n @_$indicators.forEach ($indicator, index) =>\n if index is @_activeIndex\n $indicator.setAttribute 'checked', ''\n $indicator.checked = true\n else\n $indicator.removeAttribute 'checked'\n $indicator.checked = false\n\n @activate: ($tab, index) -> @query($tab).activate index\n\n # static private\n @_init: ->\n self = this\n luda.on 'change', @_INDICATOR_SELECTOR, (e) ->\n if this.checked\n instance = self.query luda.$parent self._SELECTOR, this\n instance._setIndicatorsState()\n instance.activate instance._$indicators.indexOf this"]}
@@ -11,15 +11,15 @@
11
11
 
12
12
  _Class = class extends luda.Factory {
13
13
  _getConfig() {
14
- var _isReadonly, _originalTabIndex, readonly;
14
+ var _isReadonly, readonly;
15
15
  readonly = this._$component.getAttribute(this.constructor._READONLY_ATTRIBUTE);
16
16
  _isReadonly = readonly !== this.constructor._READONLY_FALSE_VALUE;
17
- _originalTabIndex = this._$component.tabIndex;
18
- return {_isReadonly, _originalTabIndex};
17
+ return {_isReadonly};
19
18
  }
20
19
 
21
20
  _constructor() {
22
- ({_isReadonly: this._isReadonly, _originalTabIndex: this._originalTabIndex} = this._getConfig());
21
+ ({_isReadonly: this._isReadonly} = this._getConfig());
22
+ this._setOriginalTabIndex();
23
23
  return this._setTabIndex();
24
24
  }
25
25
 
@@ -27,11 +27,17 @@
27
27
  return this._constructor();
28
28
  }
29
29
 
30
+ _setOriginalTabIndex() {
31
+ if (!this._$component.hasAttribute(this.constructor._ORIGINAL_TABINDEX_ATTRIBUTE)) {
32
+ return this._$component.setAttribute(this.constructor._ORIGINAL_TABINDEX_ATTRIBUTE, this._$component.tabIndex);
33
+ }
34
+ }
35
+
30
36
  _setTabIndex() {
31
37
  if (this._isReadonly) {
32
38
  return this._$component.tabIndex = -1;
33
39
  } else {
34
- return this._$component.tabIndex = this._originalTabIndex;
40
+ return this._$component.tabIndex = this._$component.getAttribute(this.constructor._ORIGINAL_TABINDEX_ATTRIBUTE);
35
41
  }
36
42
  }
37
43
 
@@ -41,6 +47,8 @@
41
47
 
42
48
  _Class._READONLY_ATTRIBUTE = 'data-readonly';
43
49
 
50
+ _Class._ORIGINAL_TABINDEX_ATTRIBUTE = 'data-readonly-tabindex';
51
+
44
52
  _Class._READONLY_FALSE_VALUE = 'false';
45
53
 
46
54
  _Class._SELECTOR = `[${_Class._READONLY_ATTRIBUTE}]`;
@@ -14,7 +14,7 @@
14
14
  _Class = class extends luda.Factory {
15
15
  reset() {
16
16
  this._$file.value = '';
17
- return this._$simulator.value = '';
17
+ return this._setSimulatorInitialValue();
18
18
  }
19
19
 
20
20
  _getConfig() {
@@ -40,7 +40,9 @@
40
40
  }
41
41
 
42
42
  _setPlaceholderValue() {
43
- return this._$simulator.placeholder = this._$file.getAttribute(this.constructor._PLACEHOLDER_ATTRIBUTE);
43
+ if (this._$file.hasAttribute(this.constructor._PLACEHOLDER_ATTRIBUTE)) {
44
+ return this._$simulator.placeholder = this._$file.getAttribute(this.constructor._PLACEHOLDER_ATTRIBUTE);
45
+ }
44
46
  }
45
47
 
46
48
  _setSimulatorValue() {
@@ -51,7 +53,12 @@
51
53
  });
52
54
  if (values.length) {
53
55
  return this._$simulator.value = values.join(this.constructor._VALUE_SPLITOR);
54
- } else if (this._$file.hasAttribute(this.constructor._VALUE_ATTRIBUTE)) {
56
+ }
57
+ return this._setSimulatorInitialValue();
58
+ }
59
+
60
+ _setSimulatorInitialValue() {
61
+ if (this._$file.hasAttribute(this.constructor._VALUE_ATTRIBUTE)) {
55
62
  return this._$simulator.value = this._$file.getAttribute(this.constructor._VALUE_ATTRIBUTE);
56
63
  }
57
64
  }
@@ -61,9 +68,7 @@
61
68
  if (!this._$simulator) {
62
69
  this._insertSimulator();
63
70
  }
64
- if (this._$file.hasAttribute(this.constructor._PLACEHOLDER_ATTRIBUTE)) {
65
- this._setPlaceholderValue();
66
- }
71
+ this._setPlaceholderValue();
67
72
  return this._setSimulatorValue();
68
73
  }
69
74
  }