polymer-gold-rails 1.0.0.pre.rc.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (202) hide show
  1. checksums.yaml +7 -0
  2. data/README.md +36 -0
  3. data/Rakefile +1 -0
  4. data/app/assets/components/gold-cc-cvc-input/README.md +24 -0
  5. data/app/assets/components/gold-cc-cvc-input/bower.json +39 -0
  6. data/app/assets/components/gold-cc-cvc-input/cvc_hint.png +0 -0
  7. data/app/assets/components/gold-cc-cvc-input/cvc_hint_amex.png +0 -0
  8. data/app/assets/components/gold-cc-cvc-input/demo/index.html +54 -0
  9. data/app/assets/components/gold-cc-cvc-input/gold-cc-cvc-input.html +195 -0
  10. data/app/assets/components/gold-cc-cvc-input/hero.svg +36 -0
  11. data/app/assets/components/gold-cc-cvc-input/index.html +26 -0
  12. data/app/assets/components/gold-cc-cvc-input/test/basic.html +125 -0
  13. data/app/assets/components/gold-cc-cvc-input/test/index.html +25 -0
  14. data/app/assets/components/gold-cc-expiration-input/README.md +10 -0
  15. data/app/assets/components/gold-cc-expiration-input/bower.json +40 -0
  16. data/app/assets/components/gold-cc-expiration-input/date-input.html +157 -0
  17. data/app/assets/components/gold-cc-expiration-input/date-validator.html +38 -0
  18. data/app/assets/components/gold-cc-expiration-input/demo/index.html +53 -0
  19. data/app/assets/components/gold-cc-expiration-input/gold-cc-expiration-input.html +131 -0
  20. data/app/assets/components/gold-cc-expiration-input/hero.svg +58 -0
  21. data/app/assets/components/gold-cc-expiration-input/index.html +28 -0
  22. data/app/assets/components/gold-cc-expiration-input/test/basic.html +126 -0
  23. data/app/assets/components/gold-cc-expiration-input/test/index.html +25 -0
  24. data/app/assets/components/gold-cc-input/README.md +9 -0
  25. data/app/assets/components/gold-cc-input/bower.json +39 -0
  26. data/app/assets/components/gold-cc-input/cc-validator.js +192 -0
  27. data/app/assets/components/gold-cc-input/demo/index.html +48 -0
  28. data/app/assets/components/gold-cc-input/gold-cc-input.html +215 -0
  29. data/app/assets/components/gold-cc-input/hero.svg +52 -0
  30. data/app/assets/components/gold-cc-input/images/amex.png +0 -0
  31. data/app/assets/components/gold-cc-input/images/diners_club.png +0 -0
  32. data/app/assets/components/gold-cc-input/images/discover.png +0 -0
  33. data/app/assets/components/gold-cc-input/images/jcb.png +0 -0
  34. data/app/assets/components/gold-cc-input/images/mastercard.png +0 -0
  35. data/app/assets/components/gold-cc-input/images/visa.png +0 -0
  36. data/app/assets/components/gold-cc-input/index.html +28 -0
  37. data/app/assets/components/gold-cc-input/test/basic.html +136 -0
  38. data/app/assets/components/gold-cc-input/test/index.html +25 -0
  39. data/app/assets/components/gold-elements/README.md +12 -0
  40. data/app/assets/components/gold-elements/bower.json +42 -0
  41. data/app/assets/components/gold-elements/demo/complex-form.html +127 -0
  42. data/app/assets/components/gold-elements/demo/index.html +94 -0
  43. data/app/assets/components/gold-elements/demo/item-card.html +59 -0
  44. data/app/assets/components/gold-elements/demo/simple-form.css +55 -0
  45. data/app/assets/components/gold-elements/demo/simple-form.html +93 -0
  46. data/app/assets/components/gold-elements/screenshot.png +0 -0
  47. data/app/assets/components/gold-email-input/README.md +8 -0
  48. data/app/assets/components/gold-email-input/bower.json +40 -0
  49. data/app/assets/components/gold-email-input/demo/index.html +46 -0
  50. data/app/assets/components/gold-email-input/email-validator.html +31 -0
  51. data/app/assets/components/gold-email-input/gold-email-input.html +108 -0
  52. data/app/assets/components/gold-email-input/hero.svg +59 -0
  53. data/app/assets/components/gold-email-input/index.html +28 -0
  54. data/app/assets/components/gold-email-input/test/basic.html +97 -0
  55. data/app/assets/components/gold-email-input/test/index.html +25 -0
  56. data/app/assets/components/gold-phone-input/README.md +13 -0
  57. data/app/assets/components/gold-phone-input/bower.json +39 -0
  58. data/app/assets/components/gold-phone-input/demo/index.html +53 -0
  59. data/app/assets/components/gold-phone-input/gold-phone-input.html +197 -0
  60. data/app/assets/components/gold-phone-input/hero.svg +63 -0
  61. data/app/assets/components/gold-phone-input/index.html +28 -0
  62. data/app/assets/components/gold-phone-input/test/basic.html +117 -0
  63. data/app/assets/components/gold-phone-input/test/index.html +25 -0
  64. data/app/assets/components/gold-zip-input/README.md +8 -0
  65. data/app/assets/components/gold-zip-input/bower.json +40 -0
  66. data/app/assets/components/gold-zip-input/demo/index.html +54 -0
  67. data/app/assets/components/gold-zip-input/gold-zip-input.html +113 -0
  68. data/app/assets/components/gold-zip-input/hero.svg +43 -0
  69. data/app/assets/components/gold-zip-input/index.html +28 -0
  70. data/app/assets/components/gold-zip-input/test/basic.html +116 -0
  71. data/app/assets/components/gold-zip-input/test/index.html +25 -0
  72. data/app/assets/components/gold-zip-input/zip-validator.html +32 -0
  73. data/app/assets/components/iron-autogrow-textarea/README.md +24 -0
  74. data/app/assets/components/iron-autogrow-textarea/bower.json +37 -0
  75. data/app/assets/components/iron-autogrow-textarea/demo/index.html +81 -0
  76. data/app/assets/components/iron-autogrow-textarea/hero.svg +33 -0
  77. data/app/assets/components/iron-autogrow-textarea/index.html +30 -0
  78. data/app/assets/components/iron-autogrow-textarea/iron-autogrow-textarea.html +263 -0
  79. data/app/assets/components/iron-autogrow-textarea/test/basic.html +94 -0
  80. data/app/assets/components/iron-autogrow-textarea/test/index.html +25 -0
  81. data/app/assets/components/iron-flex-layout/README.md +4 -0
  82. data/app/assets/components/iron-flex-layout/bower.json +21 -0
  83. data/app/assets/components/iron-flex-layout/classes/iron-flex-layout.html +307 -0
  84. data/app/assets/components/iron-flex-layout/classes/iron-shadow-flex-layout.html +302 -0
  85. data/app/assets/components/iron-flex-layout/demo/index.html +40 -0
  86. data/app/assets/components/iron-flex-layout/demo/x-app.html +106 -0
  87. data/app/assets/components/iron-flex-layout/iron-flex-layout.html +313 -0
  88. data/app/assets/components/iron-form-element-behavior/README.md +2 -0
  89. data/app/assets/components/iron-form-element-behavior/bower.json +27 -0
  90. data/app/assets/components/iron-form-element-behavior/demo/index.html +53 -0
  91. data/app/assets/components/iron-form-element-behavior/demo/simple-element.html +27 -0
  92. data/app/assets/components/iron-form-element-behavior/demo/simple-form.html +42 -0
  93. data/app/assets/components/iron-form-element-behavior/index.html +30 -0
  94. data/app/assets/components/iron-form-element-behavior/iron-form-element-behavior.html +50 -0
  95. data/app/assets/components/iron-icon/README.md +56 -0
  96. data/app/assets/components/iron-icon/bower.json +29 -0
  97. data/app/assets/components/iron-icon/demo/index.html +28 -0
  98. data/app/assets/components/iron-icon/demo/location.png +0 -0
  99. data/app/assets/components/iron-icon/hero.svg +19 -0
  100. data/app/assets/components/iron-icon/index.html +26 -0
  101. data/app/assets/components/iron-icon/iron-icon.html +187 -0
  102. data/app/assets/components/iron-icon/test/index.html +31 -0
  103. data/app/assets/components/iron-icon/test/iron-icon.html +120 -0
  104. data/app/assets/components/iron-input/README.md +16 -0
  105. data/app/assets/components/iron-input/bower.json +36 -0
  106. data/app/assets/components/iron-input/demo/index.html +87 -0
  107. data/app/assets/components/iron-input/hero.svg +19 -0
  108. data/app/assets/components/iron-input/index.html +30 -0
  109. data/app/assets/components/iron-input/iron-input.html +235 -0
  110. data/app/assets/components/iron-input/test/index.html +24 -0
  111. data/app/assets/components/iron-input/test/iron-input.html +139 -0
  112. data/app/assets/components/iron-input/test/letters-only.html +30 -0
  113. data/app/assets/components/iron-meta/README.md +46 -0
  114. data/app/assets/components/iron-meta/bower.json +28 -0
  115. data/app/assets/components/iron-meta/demo/index.html +45 -0
  116. data/app/assets/components/iron-meta/hero.svg +33 -0
  117. data/app/assets/components/iron-meta/index.html +27 -0
  118. data/app/assets/components/iron-meta/iron-meta.html +352 -0
  119. data/app/assets/components/iron-meta/test/basic.html +48 -0
  120. data/app/assets/components/iron-meta/test/index.html +30 -0
  121. data/app/assets/components/iron-meta/test/iron-meta.html +186 -0
  122. data/app/assets/components/iron-validatable-behavior/README.md +3 -0
  123. data/app/assets/components/iron-validatable-behavior/bower.json +35 -0
  124. data/app/assets/components/iron-validatable-behavior/demo/cats-only.html +46 -0
  125. data/app/assets/components/iron-validatable-behavior/demo/index.html +71 -0
  126. data/app/assets/components/iron-validatable-behavior/demo/validatable-input.html +46 -0
  127. data/app/assets/components/iron-validatable-behavior/index.html +30 -0
  128. data/app/assets/components/iron-validatable-behavior/iron-validatable-behavior.html +101 -0
  129. data/app/assets/components/iron-validatable-behavior/test/index.html +35 -0
  130. data/app/assets/components/iron-validatable-behavior/test/iron-validatable-behavior.html +52 -0
  131. data/app/assets/components/iron-validatable-behavior/test/test-validatable.html +28 -0
  132. data/app/assets/components/iron-validator-behavior/README.md +4 -0
  133. data/app/assets/components/iron-validator-behavior/bower.json +34 -0
  134. data/app/assets/components/iron-validator-behavior/demo/cats-only.html +46 -0
  135. data/app/assets/components/iron-validator-behavior/demo/index.html +144 -0
  136. data/app/assets/components/iron-validator-behavior/index.html +30 -0
  137. data/app/assets/components/iron-validator-behavior/iron-validator-behavior.html +61 -0
  138. data/app/assets/components/iron-validator-behavior/test/index.html +34 -0
  139. data/app/assets/components/iron-validator-behavior/test/iron-validator-behavior.html +47 -0
  140. data/app/assets/components/iron-validator-behavior/test/simple-validator.html +26 -0
  141. data/app/assets/components/paper-input/README.md +5 -0
  142. data/app/assets/components/paper-input/all-imports.html +12 -0
  143. data/app/assets/components/paper-input/bower.json +44 -0
  144. data/app/assets/components/paper-input/demo/index.html +96 -0
  145. data/app/assets/components/paper-input/demo/ssn-input.html +94 -0
  146. data/app/assets/components/paper-input/demo/ssn-validator.html +31 -0
  147. data/app/assets/components/paper-input/hero.svg +19 -0
  148. data/app/assets/components/paper-input/index.html +28 -0
  149. data/app/assets/components/paper-input/paper-input-addon-behavior.html +47 -0
  150. data/app/assets/components/paper-input/paper-input-behavior.html +317 -0
  151. data/app/assets/components/paper-input/paper-input-char-counter.html +95 -0
  152. data/app/assets/components/paper-input/paper-input-container.html +495 -0
  153. data/app/assets/components/paper-input/paper-input-error.html +99 -0
  154. data/app/assets/components/paper-input/paper-input.html +126 -0
  155. data/app/assets/components/paper-input/paper-textarea.html +106 -0
  156. data/app/assets/components/paper-input/test/index.html +28 -0
  157. data/app/assets/components/paper-input/test/letters-only.html +30 -0
  158. data/app/assets/components/paper-input/test/paper-input-char-counter.html +112 -0
  159. data/app/assets/components/paper-input/test/paper-input-container.html +237 -0
  160. data/app/assets/components/paper-input/test/paper-input-error.html +60 -0
  161. data/app/assets/components/paper-input/test/paper-input.html +213 -0
  162. data/app/assets/components/paper-input/test/paper-textarea.html +169 -0
  163. data/app/assets/components/paper-styles/README.md +3 -0
  164. data/app/assets/components/paper-styles/bower.json +27 -0
  165. data/app/assets/components/paper-styles/classes/global.html +96 -0
  166. data/app/assets/components/paper-styles/classes/shadow-layout.html +302 -0
  167. data/app/assets/components/paper-styles/classes/shadow.html +39 -0
  168. data/app/assets/components/paper-styles/classes/typography.html +171 -0
  169. data/app/assets/components/paper-styles/color.html +333 -0
  170. data/app/assets/components/paper-styles/default-theme.html +39 -0
  171. data/app/assets/components/paper-styles/demo-pages.html +72 -0
  172. data/app/assets/components/paper-styles/demo.css +25 -0
  173. data/app/assets/components/paper-styles/paper-styles-classes.html +14 -0
  174. data/app/assets/components/paper-styles/paper-styles.html +17 -0
  175. data/app/assets/components/paper-styles/shadow.html +61 -0
  176. data/app/assets/components/paper-styles/typography.html +240 -0
  177. data/app/assets/components/polymer/LICENSE.txt +27 -0
  178. data/app/assets/components/polymer/bower.json +26 -0
  179. data/app/assets/components/polymer/build.log +27 -0
  180. data/app/assets/components/polymer/polymer-micro.html +523 -0
  181. data/app/assets/components/polymer/polymer-mini.html +1368 -0
  182. data/app/assets/components/polymer/polymer.html +3768 -0
  183. data/app/assets/components/webcomponentsjs/CustomElements.js +956 -0
  184. data/app/assets/components/webcomponentsjs/CustomElements.min.js +11 -0
  185. data/app/assets/components/webcomponentsjs/HTMLImports.js +1078 -0
  186. data/app/assets/components/webcomponentsjs/HTMLImports.min.js +11 -0
  187. data/app/assets/components/webcomponentsjs/MutationObserver.js +344 -0
  188. data/app/assets/components/webcomponentsjs/MutationObserver.min.js +11 -0
  189. data/app/assets/components/webcomponentsjs/README.md +125 -0
  190. data/app/assets/components/webcomponentsjs/ShadowDOM.js +4414 -0
  191. data/app/assets/components/webcomponentsjs/ShadowDOM.min.js +15 -0
  192. data/app/assets/components/webcomponentsjs/bower.json +14 -0
  193. data/app/assets/components/webcomponentsjs/build.log +33 -0
  194. data/app/assets/components/webcomponentsjs/package.json +31 -0
  195. data/app/assets/components/webcomponentsjs/webcomponents-lite.js +2300 -0
  196. data/app/assets/components/webcomponentsjs/webcomponents-lite.min.js +13 -0
  197. data/app/assets/components/webcomponentsjs/webcomponents.js +7112 -0
  198. data/app/assets/components/webcomponentsjs/webcomponents.min.js +15 -0
  199. data/lib/polymer-gold-rails.rb +2 -0
  200. data/lib/polymer-gold-rails/enigne.rb +4 -0
  201. data/lib/polymer-gold-rails/version.rb +3 -0
  202. metadata +312 -0
@@ -0,0 +1,27 @@
1
+ // Copyright (c) 2014 The Polymer Authors. All rights reserved.
2
+ //
3
+ // Redistribution and use in source and binary forms, with or without
4
+ // modification, are permitted provided that the following conditions are
5
+ // met:
6
+ //
7
+ // * Redistributions of source code must retain the above copyright
8
+ // notice, this list of conditions and the following disclaimer.
9
+ // * Redistributions in binary form must reproduce the above
10
+ // copyright notice, this list of conditions and the following disclaimer
11
+ // in the documentation and/or other materials provided with the
12
+ // distribution.
13
+ // * Neither the name of Google Inc. nor the names of its
14
+ // contributors may be used to endorse or promote products derived from
15
+ // this software without specific prior written permission.
16
+ //
17
+ // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18
+ // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19
+ // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
20
+ // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
21
+ // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22
+ // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23
+ // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24
+ // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25
+ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26
+ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27
+ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -0,0 +1,26 @@
1
+ {
2
+ "name": "polymer",
3
+ "version": "1.0.3",
4
+ "main": [
5
+ "polymer.html"
6
+ ],
7
+ "license": "http://polymer.github.io/LICENSE.txt",
8
+ "ignore": [
9
+ "/.*",
10
+ "/test/"
11
+ ],
12
+ "authors": [
13
+ "The Polymer Authors (http://polymer.github.io/AUTHORS.txt)"
14
+ ],
15
+ "repository": {
16
+ "type": "git",
17
+ "url": "https://github.com/Polymer/polymer.git"
18
+ },
19
+ "dependencies": {
20
+ "webcomponentsjs": "^0.7.2"
21
+ },
22
+ "devDependencies": {
23
+ "web-component-tester": "*"
24
+ },
25
+ "private": true
26
+ }
@@ -0,0 +1,27 @@
1
+ BUILD LOG
2
+ ---------
3
+ Build Time: 2015-06-04T20:19:11-0700
4
+
5
+ NODEJS INFORMATION
6
+ ==================
7
+ nodejs: v2.0.2
8
+ gulp: 3.9.0
9
+ gulp-audit: 1.0.0
10
+ gulp-rename: 1.2.2
11
+ gulp-vulcanize: 6.0.0
12
+ lazypipe: 0.2.3
13
+ polyclean: 1.2.0
14
+ run-sequence: 1.1.0
15
+ del: 1.2.0
16
+ gulp-replace: 0.5.3
17
+ vulcanize: 1.8.1
18
+
19
+ REPO REVISIONS
20
+ ==============
21
+ polymer: 0c73fc226b6b5ca308a851b334b1bdeda289195d
22
+
23
+ BUILD HASHES
24
+ ============
25
+ polymer-mini.html: 8173d099edaed570f4db95cd54317f49dc3183ae
26
+ polymer-micro.html: afd2d239fc08ec69fa912a0fc7e73e8ce58e3f91
27
+ polymer.html: 2094f18d71f5aec3321b1364575579e960b37cbc
@@ -0,0 +1,523 @@
1
+ <!--
2
+ @license
3
+ Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
4
+ This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
5
+ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
6
+ The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
7
+ Code distributed by Google as part of the polymer project is also
8
+ subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
9
+ --><script>(function () {
10
+ function resolve() {
11
+ document.body.removeAttribute('unresolved');
12
+ }
13
+ if (window.WebComponents) {
14
+ addEventListener('WebComponentsReady', resolve);
15
+ } else {
16
+ if (document.readyState === 'interactive' || document.readyState === 'complete') {
17
+ resolve();
18
+ } else {
19
+ addEventListener('DOMContentLoaded', resolve);
20
+ }
21
+ }
22
+ }());
23
+ Polymer = {
24
+ Settings: function () {
25
+ var user = window.Polymer || {};
26
+ location.search.slice(1).split('&').forEach(function (o) {
27
+ o = o.split('=');
28
+ o[0] && (user[o[0]] = o[1] || true);
29
+ });
30
+ var wantShadow = user.dom === 'shadow';
31
+ var hasShadow = Boolean(Element.prototype.createShadowRoot);
32
+ var nativeShadow = hasShadow && !window.ShadowDOMPolyfill;
33
+ var useShadow = wantShadow && hasShadow;
34
+ var hasNativeImports = Boolean('import' in document.createElement('link'));
35
+ var useNativeImports = hasNativeImports;
36
+ var useNativeCustomElements = !window.CustomElements || window.CustomElements.useNative;
37
+ return {
38
+ wantShadow: wantShadow,
39
+ hasShadow: hasShadow,
40
+ nativeShadow: nativeShadow,
41
+ useShadow: useShadow,
42
+ useNativeShadow: useShadow && nativeShadow,
43
+ useNativeImports: useNativeImports,
44
+ useNativeCustomElements: useNativeCustomElements
45
+ };
46
+ }()
47
+ };
48
+ (function () {
49
+ var userPolymer = window.Polymer;
50
+ window.Polymer = function (prototype) {
51
+ var ctor = desugar(prototype);
52
+ prototype = ctor.prototype;
53
+ var options = { prototype: prototype };
54
+ if (prototype.extends) {
55
+ options.extends = prototype.extends;
56
+ }
57
+ Polymer.telemetry._registrate(prototype);
58
+ document.registerElement(prototype.is, options);
59
+ return ctor;
60
+ };
61
+ var desugar = function (prototype) {
62
+ prototype = Polymer.Base.chainObject(prototype, Polymer.Base);
63
+ prototype.registerCallback();
64
+ return prototype.constructor;
65
+ };
66
+ window.Polymer = Polymer;
67
+ if (userPolymer) {
68
+ for (var i in userPolymer) {
69
+ Polymer[i] = userPolymer[i];
70
+ }
71
+ }
72
+ Polymer.Class = desugar;
73
+ }());
74
+ Polymer.telemetry = {
75
+ registrations: [],
76
+ _regLog: function (prototype) {
77
+ console.log('[' + prototype.is + ']: registered');
78
+ },
79
+ _registrate: function (prototype) {
80
+ this.registrations.push(prototype);
81
+ Polymer.log && this._regLog(prototype);
82
+ },
83
+ dumpRegistrations: function () {
84
+ this.registrations.forEach(this._regLog);
85
+ }
86
+ };
87
+ Object.defineProperty(window, 'currentImport', {
88
+ enumerable: true,
89
+ configurable: true,
90
+ get: function () {
91
+ return (document._currentScript || document.currentScript).ownerDocument;
92
+ }
93
+ });
94
+ Polymer.Base = {
95
+ _addFeature: function (feature) {
96
+ this.extend(this, feature);
97
+ },
98
+ registerCallback: function () {
99
+ this._registerFeatures();
100
+ this._doBehavior('registered');
101
+ },
102
+ createdCallback: function () {
103
+ Polymer.telemetry.instanceCount++;
104
+ this.root = this;
105
+ this._doBehavior('created');
106
+ this._initFeatures();
107
+ },
108
+ attachedCallback: function () {
109
+ this.isAttached = true;
110
+ this._doBehavior('attached');
111
+ },
112
+ detachedCallback: function () {
113
+ this.isAttached = false;
114
+ this._doBehavior('detached');
115
+ },
116
+ attributeChangedCallback: function (name) {
117
+ this._setAttributeToProperty(this, name);
118
+ this._doBehavior('attributeChanged', arguments);
119
+ },
120
+ extend: function (prototype, api) {
121
+ if (prototype && api) {
122
+ Object.getOwnPropertyNames(api).forEach(function (n) {
123
+ this.copyOwnProperty(n, api, prototype);
124
+ }, this);
125
+ }
126
+ return prototype || api;
127
+ },
128
+ copyOwnProperty: function (name, source, target) {
129
+ var pd = Object.getOwnPropertyDescriptor(source, name);
130
+ if (pd) {
131
+ Object.defineProperty(target, name, pd);
132
+ }
133
+ },
134
+ _log: console.log.apply.bind(console.log, console),
135
+ _warn: console.warn.apply.bind(console.warn, console),
136
+ _error: console.error.apply.bind(console.error, console),
137
+ _logf: function () {
138
+ return this._logPrefix.concat([this.is]).concat(Array.prototype.slice.call(arguments, 0));
139
+ }
140
+ };
141
+ Polymer.Base._logPrefix = function () {
142
+ var color = window.chrome || /firefox/i.test(navigator.userAgent);
143
+ return color ? [
144
+ '%c[%s::%s]:',
145
+ 'font-weight: bold; background-color:#EEEE00;'
146
+ ] : ['[%s::%s]:'];
147
+ }();
148
+ Polymer.Base.chainObject = function (object, inherited) {
149
+ if (object && inherited && object !== inherited) {
150
+ if (!Object.__proto__) {
151
+ object = Polymer.Base.extend(Object.create(inherited), object);
152
+ }
153
+ object.__proto__ = inherited;
154
+ }
155
+ return object;
156
+ };
157
+ Polymer.Base = Polymer.Base.chainObject(Polymer.Base, HTMLElement.prototype);
158
+ Polymer.telemetry.instanceCount = 0;
159
+ (function () {
160
+ var modules = {};
161
+ var DomModule = function () {
162
+ return document.createElement('dom-module');
163
+ };
164
+ DomModule.prototype = Object.create(HTMLElement.prototype);
165
+ DomModule.prototype.constructor = DomModule;
166
+ DomModule.prototype.createdCallback = function () {
167
+ var id = this.id || this.getAttribute('name') || this.getAttribute('is');
168
+ if (id) {
169
+ this.id = id;
170
+ modules[id] = this;
171
+ }
172
+ };
173
+ DomModule.prototype.import = function (id, slctr) {
174
+ var m = modules[id];
175
+ if (!m) {
176
+ forceDocumentUpgrade();
177
+ m = modules[id];
178
+ }
179
+ if (m && slctr) {
180
+ m = m.querySelector(slctr);
181
+ }
182
+ return m;
183
+ };
184
+ var cePolyfill = window.CustomElements && !CustomElements.useNative;
185
+ if (cePolyfill) {
186
+ var ready = CustomElements.ready;
187
+ CustomElements.ready = true;
188
+ }
189
+ document.registerElement('dom-module', DomModule);
190
+ if (cePolyfill) {
191
+ CustomElements.ready = ready;
192
+ }
193
+ function forceDocumentUpgrade() {
194
+ if (cePolyfill) {
195
+ var script = document._currentScript || document.currentScript;
196
+ if (script) {
197
+ CustomElements.upgradeAll(script.ownerDocument);
198
+ }
199
+ }
200
+ }
201
+ }());
202
+ Polymer.Base._addFeature({
203
+ _prepIs: function () {
204
+ if (!this.is) {
205
+ var module = (document._currentScript || document.currentScript).parentNode;
206
+ if (module.localName === 'dom-module') {
207
+ var id = module.id || module.getAttribute('name') || module.getAttribute('is');
208
+ this.is = id;
209
+ }
210
+ }
211
+ }
212
+ });
213
+ Polymer.Base._addFeature({
214
+ behaviors: [],
215
+ _prepBehaviors: function () {
216
+ if (this.behaviors.length) {
217
+ this.behaviors = this._flattenBehaviorsList(this.behaviors);
218
+ }
219
+ this._prepAllBehaviors(this.behaviors);
220
+ },
221
+ _flattenBehaviorsList: function (behaviors) {
222
+ var flat = [];
223
+ behaviors.forEach(function (b) {
224
+ if (b instanceof Array) {
225
+ flat = flat.concat(this._flattenBehaviorsList(b));
226
+ } else if (b) {
227
+ flat.push(b);
228
+ } else {
229
+ this._warn(this._logf('_flattenBehaviorsList', 'behavior is null, check for missing or 404 import'));
230
+ }
231
+ }, this);
232
+ return flat;
233
+ },
234
+ _prepAllBehaviors: function (behaviors) {
235
+ for (var i = behaviors.length - 1; i >= 0; i--) {
236
+ this._mixinBehavior(behaviors[i]);
237
+ }
238
+ for (var i = 0, l = behaviors.length; i < l; i++) {
239
+ this._prepBehavior(behaviors[i]);
240
+ }
241
+ this._prepBehavior(this);
242
+ },
243
+ _mixinBehavior: function (b) {
244
+ Object.getOwnPropertyNames(b).forEach(function (n) {
245
+ switch (n) {
246
+ case 'hostAttributes':
247
+ case 'registered':
248
+ case 'properties':
249
+ case 'observers':
250
+ case 'listeners':
251
+ case 'created':
252
+ case 'attached':
253
+ case 'detached':
254
+ case 'attributeChanged':
255
+ case 'configure':
256
+ case 'ready':
257
+ break;
258
+ default:
259
+ if (!this.hasOwnProperty(n)) {
260
+ this.copyOwnProperty(n, b, this);
261
+ }
262
+ break;
263
+ }
264
+ }, this);
265
+ },
266
+ _doBehavior: function (name, args) {
267
+ this.behaviors.forEach(function (b) {
268
+ this._invokeBehavior(b, name, args);
269
+ }, this);
270
+ this._invokeBehavior(this, name, args);
271
+ },
272
+ _invokeBehavior: function (b, name, args) {
273
+ var fn = b[name];
274
+ if (fn) {
275
+ fn.apply(this, args || Polymer.nar);
276
+ }
277
+ },
278
+ _marshalBehaviors: function () {
279
+ this.behaviors.forEach(function (b) {
280
+ this._marshalBehavior(b);
281
+ }, this);
282
+ this._marshalBehavior(this);
283
+ }
284
+ });
285
+ Polymer.Base._addFeature({
286
+ _prepExtends: function () {
287
+ if (this.extends) {
288
+ this.__proto__ = this._getExtendedPrototype(this.extends);
289
+ }
290
+ },
291
+ _getExtendedPrototype: function (tag) {
292
+ return this._getExtendedNativePrototype(tag);
293
+ },
294
+ _nativePrototypes: {},
295
+ _getExtendedNativePrototype: function (tag) {
296
+ var p = this._nativePrototypes[tag];
297
+ if (!p) {
298
+ var np = this.getNativePrototype(tag);
299
+ p = this.extend(Object.create(np), Polymer.Base);
300
+ this._nativePrototypes[tag] = p;
301
+ }
302
+ return p;
303
+ },
304
+ getNativePrototype: function (tag) {
305
+ return Object.getPrototypeOf(document.createElement(tag));
306
+ }
307
+ });
308
+ Polymer.Base._addFeature({
309
+ _prepConstructor: function () {
310
+ this._factoryArgs = this.extends ? [
311
+ this.extends,
312
+ this.is
313
+ ] : [this.is];
314
+ var ctor = function () {
315
+ return this._factory(arguments);
316
+ };
317
+ if (this.hasOwnProperty('extends')) {
318
+ ctor.extends = this.extends;
319
+ }
320
+ Object.defineProperty(this, 'constructor', {
321
+ value: ctor,
322
+ writable: true,
323
+ configurable: true
324
+ });
325
+ ctor.prototype = this;
326
+ },
327
+ _factory: function (args) {
328
+ var elt = document.createElement.apply(document, this._factoryArgs);
329
+ if (this.factoryImpl) {
330
+ this.factoryImpl.apply(elt, args);
331
+ }
332
+ return elt;
333
+ }
334
+ });
335
+ Polymer.nob = Object.create(null);
336
+ Polymer.Base._addFeature({
337
+ properties: {},
338
+ getPropertyInfo: function (property) {
339
+ var info = this._getPropertyInfo(property, this.properties);
340
+ if (!info) {
341
+ this.behaviors.some(function (b) {
342
+ return info = this._getPropertyInfo(property, b.properties);
343
+ }, this);
344
+ }
345
+ return info || Polymer.nob;
346
+ },
347
+ _getPropertyInfo: function (property, properties) {
348
+ var p = properties && properties[property];
349
+ if (typeof p === 'function') {
350
+ p = properties[property] = { type: p };
351
+ }
352
+ if (p) {
353
+ p.defined = true;
354
+ }
355
+ return p;
356
+ }
357
+ });
358
+ Polymer.CaseMap = {
359
+ _caseMap: {},
360
+ dashToCamelCase: function (dash) {
361
+ var mapped = Polymer.CaseMap._caseMap[dash];
362
+ if (mapped) {
363
+ return mapped;
364
+ }
365
+ if (dash.indexOf('-') < 0) {
366
+ return Polymer.CaseMap._caseMap[dash] = dash;
367
+ }
368
+ return Polymer.CaseMap._caseMap[dash] = dash.replace(/-([a-z])/g, function (m) {
369
+ return m[1].toUpperCase();
370
+ });
371
+ },
372
+ camelToDashCase: function (camel) {
373
+ var mapped = Polymer.CaseMap._caseMap[camel];
374
+ if (mapped) {
375
+ return mapped;
376
+ }
377
+ return Polymer.CaseMap._caseMap[camel] = camel.replace(/([a-z][A-Z])/g, function (g) {
378
+ return g[0] + '-' + g[1].toLowerCase();
379
+ });
380
+ }
381
+ };
382
+ Polymer.Base._addFeature({
383
+ _prepAttributes: function () {
384
+ this._aggregatedAttributes = {};
385
+ },
386
+ _addHostAttributes: function (attributes) {
387
+ if (attributes) {
388
+ this.mixin(this._aggregatedAttributes, attributes);
389
+ }
390
+ },
391
+ _marshalHostAttributes: function () {
392
+ this._applyAttributes(this, this._aggregatedAttributes);
393
+ },
394
+ _applyAttributes: function (node, attr$) {
395
+ for (var n in attr$) {
396
+ if (!this.hasAttribute(n) && n !== 'class') {
397
+ this.serializeValueToAttribute(attr$[n], n, this);
398
+ }
399
+ }
400
+ },
401
+ _marshalAttributes: function () {
402
+ this._takeAttributesToModel(this);
403
+ },
404
+ _takeAttributesToModel: function (model) {
405
+ for (var i = 0, l = this.attributes.length; i < l; i++) {
406
+ this._setAttributeToProperty(model, this.attributes[i].name);
407
+ }
408
+ },
409
+ _setAttributeToProperty: function (model, attrName) {
410
+ if (!this._serializing) {
411
+ var propName = Polymer.CaseMap.dashToCamelCase(attrName);
412
+ var info = this.getPropertyInfo(propName);
413
+ if (info.defined || this._propertyEffects && this._propertyEffects[propName]) {
414
+ var val = this.getAttribute(attrName);
415
+ model[propName] = this.deserialize(val, info.type);
416
+ }
417
+ }
418
+ },
419
+ _serializing: false,
420
+ reflectPropertyToAttribute: function (name) {
421
+ this._serializing = true;
422
+ this.serializeValueToAttribute(this[name], Polymer.CaseMap.camelToDashCase(name));
423
+ this._serializing = false;
424
+ },
425
+ serializeValueToAttribute: function (value, attribute, node) {
426
+ var str = this.serialize(value);
427
+ (node || this)[str === undefined ? 'removeAttribute' : 'setAttribute'](attribute, str);
428
+ },
429
+ deserialize: function (value, type) {
430
+ switch (type) {
431
+ case Number:
432
+ value = Number(value);
433
+ break;
434
+ case Boolean:
435
+ value = value !== null;
436
+ break;
437
+ case Object:
438
+ try {
439
+ value = JSON.parse(value);
440
+ } catch (x) {
441
+ }
442
+ break;
443
+ case Array:
444
+ try {
445
+ value = JSON.parse(value);
446
+ } catch (x) {
447
+ value = null;
448
+ console.warn('Polymer::Attributes: couldn`t decode Array as JSON');
449
+ }
450
+ break;
451
+ case Date:
452
+ value = new Date(value);
453
+ break;
454
+ case String:
455
+ default:
456
+ break;
457
+ }
458
+ return value;
459
+ },
460
+ serialize: function (value) {
461
+ switch (typeof value) {
462
+ case 'boolean':
463
+ return value ? '' : undefined;
464
+ case 'object':
465
+ if (value instanceof Date) {
466
+ return value;
467
+ } else if (value) {
468
+ try {
469
+ return JSON.stringify(value);
470
+ } catch (x) {
471
+ return '';
472
+ }
473
+ }
474
+ default:
475
+ return value != null ? value : undefined;
476
+ }
477
+ }
478
+ });
479
+ Polymer.Base._addFeature({
480
+ _setupDebouncers: function () {
481
+ this._debouncers = {};
482
+ },
483
+ debounce: function (jobName, callback, wait) {
484
+ this._debouncers[jobName] = Polymer.Debounce.call(this, this._debouncers[jobName], callback, wait);
485
+ },
486
+ isDebouncerActive: function (jobName) {
487
+ var debouncer = this._debouncers[jobName];
488
+ return debouncer && debouncer.finish;
489
+ },
490
+ flushDebouncer: function (jobName) {
491
+ var debouncer = this._debouncers[jobName];
492
+ if (debouncer) {
493
+ debouncer.complete();
494
+ }
495
+ },
496
+ cancelDebouncer: function (jobName) {
497
+ var debouncer = this._debouncers[jobName];
498
+ if (debouncer) {
499
+ debouncer.stop();
500
+ }
501
+ }
502
+ });
503
+ Polymer.version = '1.0.3';
504
+ Polymer.Base._addFeature({
505
+ _registerFeatures: function () {
506
+ this._prepIs();
507
+ this._prepAttributes();
508
+ this._prepBehaviors();
509
+ this._prepExtends();
510
+ this._prepConstructor();
511
+ },
512
+ _prepBehavior: function (b) {
513
+ this._addHostAttributes(b.hostAttributes);
514
+ },
515
+ _marshalBehavior: function (b) {
516
+ },
517
+ _initFeatures: function () {
518
+ this._marshalHostAttributes();
519
+ this._setupDebouncers();
520
+ this._marshalBehaviors();
521
+ }
522
+ });</script>
523
+