mumuki-gobstones-board 1.20.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,827 @@
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
+ }());window.Polymer = {
23
+ Settings: function () {
24
+ var settings = window.Polymer || {};
25
+ if (!settings.noUrlSettings) {
26
+ var parts = location.search.slice(1).split('&');
27
+ for (var i = 0, o; i < parts.length && (o = parts[i]); i++) {
28
+ o = o.split('=');
29
+ o[0] && (settings[o[0]] = o[1] || true);
30
+ }
31
+ }
32
+ settings.wantShadow = settings.dom === 'shadow';
33
+ settings.hasShadow = Boolean(Element.prototype.createShadowRoot);
34
+ settings.nativeShadow = settings.hasShadow && !window.ShadowDOMPolyfill;
35
+ settings.useShadow = settings.wantShadow && settings.hasShadow;
36
+ settings.hasNativeImports = Boolean('import' in document.createElement('link'));
37
+ settings.useNativeImports = settings.hasNativeImports;
38
+ settings.useNativeCustomElements = !window.CustomElements || window.CustomElements.useNative;
39
+ settings.useNativeShadow = settings.useShadow && settings.nativeShadow;
40
+ settings.usePolyfillProto = !settings.useNativeCustomElements && !Object.__proto__;
41
+ settings.hasNativeCSSProperties = !navigator.userAgent.match(/AppleWebKit\/601|Edge\/15/) && window.CSS && CSS.supports && CSS.supports('box-shadow', '0 0 0 var(--foo)');
42
+ settings.useNativeCSSProperties = settings.hasNativeCSSProperties && settings.lazyRegister && settings.useNativeCSSProperties;
43
+ settings.isIE = navigator.userAgent.match('Trident');
44
+ settings.passiveTouchGestures = settings.passiveTouchGestures || false;
45
+ return settings;
46
+ }()
47
+ };(function () {
48
+ var userPolymer = window.Polymer;
49
+ window.Polymer = function (prototype) {
50
+ if (typeof prototype === 'function') {
51
+ prototype = prototype.prototype;
52
+ }
53
+ if (!prototype) {
54
+ prototype = {};
55
+ }
56
+ prototype = desugar(prototype);
57
+ var customCtor = prototype === prototype.constructor.prototype ? prototype.constructor : null;
58
+ var options = { prototype: prototype };
59
+ if (prototype.extends) {
60
+ options.extends = prototype.extends;
61
+ }
62
+ Polymer.telemetry._registrate(prototype);
63
+ var ctor = document.registerElement(prototype.is, options);
64
+ return customCtor || ctor;
65
+ };
66
+ var desugar = function (prototype) {
67
+ var base = Polymer.Base;
68
+ if (prototype.extends) {
69
+ base = Polymer.Base._getExtendedPrototype(prototype.extends);
70
+ }
71
+ prototype = Polymer.Base.chainObject(prototype, base);
72
+ prototype.registerCallback();
73
+ return prototype;
74
+ };
75
+ if (userPolymer) {
76
+ for (var i in userPolymer) {
77
+ Polymer[i] = userPolymer[i];
78
+ }
79
+ }
80
+ Polymer.Class = function (prototype) {
81
+ if (!prototype.factoryImpl) {
82
+ prototype.factoryImpl = function () {
83
+ };
84
+ }
85
+ return desugar(prototype).constructor;
86
+ };
87
+ }());
88
+ Polymer.telemetry = {
89
+ registrations: [],
90
+ _regLog: function (prototype) {
91
+ console.log('[' + prototype.is + ']: registered');
92
+ },
93
+ _registrate: function (prototype) {
94
+ this.registrations.push(prototype);
95
+ Polymer.log && this._regLog(prototype);
96
+ },
97
+ dumpRegistrations: function () {
98
+ this.registrations.forEach(this._regLog);
99
+ }
100
+ };Object.defineProperty(window, 'currentImport', {
101
+ enumerable: true,
102
+ configurable: true,
103
+ get: function () {
104
+ return (document._currentScript || document.currentScript || {}).ownerDocument;
105
+ }
106
+ });Polymer.RenderStatus = {
107
+ _ready: false,
108
+ _callbacks: [],
109
+ whenReady: function (cb) {
110
+ if (this._ready) {
111
+ cb();
112
+ } else {
113
+ this._callbacks.push(cb);
114
+ }
115
+ },
116
+ _makeReady: function () {
117
+ this._ready = true;
118
+ for (var i = 0; i < this._callbacks.length; i++) {
119
+ this._callbacks[i]();
120
+ }
121
+ this._callbacks = [];
122
+ },
123
+ _catchFirstRender: function () {
124
+ requestAnimationFrame(function () {
125
+ Polymer.RenderStatus._makeReady();
126
+ });
127
+ },
128
+ _afterNextRenderQueue: [],
129
+ _waitingNextRender: false,
130
+ afterNextRender: function (element, fn, args) {
131
+ this._watchNextRender();
132
+ this._afterNextRenderQueue.push([
133
+ element,
134
+ fn,
135
+ args
136
+ ]);
137
+ },
138
+ hasRendered: function () {
139
+ return this._ready;
140
+ },
141
+ _watchNextRender: function () {
142
+ if (!this._waitingNextRender) {
143
+ this._waitingNextRender = true;
144
+ var fn = function () {
145
+ Polymer.RenderStatus._flushNextRender();
146
+ };
147
+ if (!this._ready) {
148
+ this.whenReady(fn);
149
+ } else {
150
+ requestAnimationFrame(fn);
151
+ }
152
+ }
153
+ },
154
+ _flushNextRender: function () {
155
+ var self = this;
156
+ setTimeout(function () {
157
+ self._flushRenderCallbacks(self._afterNextRenderQueue);
158
+ self._afterNextRenderQueue = [];
159
+ self._waitingNextRender = false;
160
+ });
161
+ },
162
+ _flushRenderCallbacks: function (callbacks) {
163
+ for (var i = 0, h; i < callbacks.length; i++) {
164
+ h = callbacks[i];
165
+ h[1].apply(h[0], h[2] || Polymer.nar);
166
+ }
167
+ }
168
+ };
169
+ if (window.HTMLImports) {
170
+ HTMLImports.whenReady(function () {
171
+ Polymer.RenderStatus._catchFirstRender();
172
+ });
173
+ } else {
174
+ Polymer.RenderStatus._catchFirstRender();
175
+ }
176
+ Polymer.ImportStatus = Polymer.RenderStatus;
177
+ Polymer.ImportStatus.whenLoaded = Polymer.ImportStatus.whenReady;(function () {
178
+ 'use strict';
179
+ var settings = Polymer.Settings;
180
+ Polymer.Base = {
181
+ __isPolymerInstance__: true,
182
+ _addFeature: function (feature) {
183
+ this.mixin(this, feature);
184
+ },
185
+ registerCallback: function () {
186
+ if (settings.lazyRegister === 'max') {
187
+ if (this.beforeRegister) {
188
+ this.beforeRegister();
189
+ }
190
+ } else {
191
+ this._desugarBehaviors();
192
+ for (var i = 0, b; i < this.behaviors.length; i++) {
193
+ b = this.behaviors[i];
194
+ if (b.beforeRegister) {
195
+ b.beforeRegister.call(this);
196
+ }
197
+ }
198
+ if (this.beforeRegister) {
199
+ this.beforeRegister();
200
+ }
201
+ }
202
+ this._registerFeatures();
203
+ if (!settings.lazyRegister) {
204
+ this.ensureRegisterFinished();
205
+ }
206
+ },
207
+ createdCallback: function () {
208
+ if (settings.disableUpgradeEnabled) {
209
+ if (this.hasAttribute('disable-upgrade')) {
210
+ this._propertySetter = disableUpgradePropertySetter;
211
+ this._configValue = null;
212
+ this.__data__ = {};
213
+ return;
214
+ } else {
215
+ this.__hasInitialized = true;
216
+ }
217
+ }
218
+ this.__initialize();
219
+ },
220
+ __initialize: function () {
221
+ if (!this.__hasRegisterFinished) {
222
+ this._ensureRegisterFinished(this.__proto__);
223
+ }
224
+ Polymer.telemetry.instanceCount++;
225
+ this.root = this;
226
+ for (var i = 0, b; i < this.behaviors.length; i++) {
227
+ b = this.behaviors[i];
228
+ if (b.created) {
229
+ b.created.call(this);
230
+ }
231
+ }
232
+ if (this.created) {
233
+ this.created();
234
+ }
235
+ this._initFeatures();
236
+ },
237
+ ensureRegisterFinished: function () {
238
+ this._ensureRegisterFinished(this);
239
+ },
240
+ _ensureRegisterFinished: function (proto) {
241
+ if (proto.__hasRegisterFinished !== proto.is || !proto.is) {
242
+ if (settings.lazyRegister === 'max') {
243
+ proto._desugarBehaviors();
244
+ for (var i = 0, b; i < proto.behaviors.length; i++) {
245
+ b = proto.behaviors[i];
246
+ if (b.beforeRegister) {
247
+ b.beforeRegister.call(proto);
248
+ }
249
+ }
250
+ }
251
+ proto.__hasRegisterFinished = proto.is;
252
+ if (proto._finishRegisterFeatures) {
253
+ proto._finishRegisterFeatures();
254
+ }
255
+ for (var j = 0, pb; j < proto.behaviors.length; j++) {
256
+ pb = proto.behaviors[j];
257
+ if (pb.registered) {
258
+ pb.registered.call(proto);
259
+ }
260
+ }
261
+ if (proto.registered) {
262
+ proto.registered();
263
+ }
264
+ if (settings.usePolyfillProto && proto !== this) {
265
+ proto.extend(this, proto);
266
+ }
267
+ }
268
+ },
269
+ attachedCallback: function () {
270
+ var self = this;
271
+ Polymer.RenderStatus.whenReady(function () {
272
+ self.isAttached = true;
273
+ for (var i = 0, b; i < self.behaviors.length; i++) {
274
+ b = self.behaviors[i];
275
+ if (b.attached) {
276
+ b.attached.call(self);
277
+ }
278
+ }
279
+ if (self.attached) {
280
+ self.attached();
281
+ }
282
+ });
283
+ },
284
+ detachedCallback: function () {
285
+ var self = this;
286
+ Polymer.RenderStatus.whenReady(function () {
287
+ self.isAttached = false;
288
+ for (var i = 0, b; i < self.behaviors.length; i++) {
289
+ b = self.behaviors[i];
290
+ if (b.detached) {
291
+ b.detached.call(self);
292
+ }
293
+ }
294
+ if (self.detached) {
295
+ self.detached();
296
+ }
297
+ });
298
+ },
299
+ attributeChangedCallback: function (name, oldValue, newValue) {
300
+ this._attributeChangedImpl(name);
301
+ for (var i = 0, b; i < this.behaviors.length; i++) {
302
+ b = this.behaviors[i];
303
+ if (b.attributeChanged) {
304
+ b.attributeChanged.call(this, name, oldValue, newValue);
305
+ }
306
+ }
307
+ if (this.attributeChanged) {
308
+ this.attributeChanged(name, oldValue, newValue);
309
+ }
310
+ },
311
+ _attributeChangedImpl: function (name) {
312
+ this._setAttributeToProperty(this, name);
313
+ },
314
+ extend: function (target, source) {
315
+ if (target && source) {
316
+ var n$ = Object.getOwnPropertyNames(source);
317
+ for (var i = 0, n; i < n$.length && (n = n$[i]); i++) {
318
+ this.copyOwnProperty(n, source, target);
319
+ }
320
+ }
321
+ return target || source;
322
+ },
323
+ mixin: function (target, source) {
324
+ for (var i in source) {
325
+ target[i] = source[i];
326
+ }
327
+ return target;
328
+ },
329
+ copyOwnProperty: function (name, source, target) {
330
+ var pd = Object.getOwnPropertyDescriptor(source, name);
331
+ if (pd) {
332
+ Object.defineProperty(target, name, pd);
333
+ }
334
+ },
335
+ _logger: function (level, args) {
336
+ if (args.length === 1 && Array.isArray(args[0])) {
337
+ args = args[0];
338
+ }
339
+ switch (level) {
340
+ case 'log':
341
+ case 'warn':
342
+ case 'error':
343
+ console[level].apply(console, args);
344
+ break;
345
+ }
346
+ },
347
+ _log: function () {
348
+ var args = Array.prototype.slice.call(arguments, 0);
349
+ this._logger('log', args);
350
+ },
351
+ _warn: function () {
352
+ var args = Array.prototype.slice.call(arguments, 0);
353
+ this._logger('warn', args);
354
+ },
355
+ _error: function () {
356
+ var args = Array.prototype.slice.call(arguments, 0);
357
+ this._logger('error', args);
358
+ },
359
+ _logf: function () {
360
+ return this._logPrefix.concat(this.is).concat(Array.prototype.slice.call(arguments, 0));
361
+ }
362
+ };
363
+ Polymer.Base._logPrefix = function () {
364
+ var color = window.chrome && !/edge/i.test(navigator.userAgent) || /firefox/i.test(navigator.userAgent);
365
+ return color ? [
366
+ '%c[%s::%s]:',
367
+ 'font-weight: bold; background-color:#EEEE00;'
368
+ ] : ['[%s::%s]:'];
369
+ }();
370
+ Polymer.Base.chainObject = function (object, inherited) {
371
+ if (object && inherited && object !== inherited) {
372
+ if (!Object.__proto__) {
373
+ object = Polymer.Base.extend(Object.create(inherited), object);
374
+ }
375
+ object.__proto__ = inherited;
376
+ }
377
+ return object;
378
+ };
379
+ Polymer.Base = Polymer.Base.chainObject(Polymer.Base, HTMLElement.prototype);
380
+ Polymer.BaseDescriptors = {};
381
+ var disableUpgradePropertySetter;
382
+ if (settings.disableUpgradeEnabled) {
383
+ disableUpgradePropertySetter = function (property, value) {
384
+ this.__data__[property] = value;
385
+ };
386
+ var origAttributeChangedCallback = Polymer.Base.attributeChangedCallback;
387
+ Polymer.Base.attributeChangedCallback = function (name, oldValue, newValue) {
388
+ if (!this.__hasInitialized && name === 'disable-upgrade') {
389
+ this.__hasInitialized = true;
390
+ this._propertySetter = Polymer.Bind._modelApi._propertySetter;
391
+ this._configValue = Polymer.Base._configValue;
392
+ this.__initialize();
393
+ }
394
+ origAttributeChangedCallback.call(this, name, oldValue, newValue);
395
+ };
396
+ }
397
+ if (window.CustomElements) {
398
+ Polymer.instanceof = CustomElements.instanceof;
399
+ } else {
400
+ Polymer.instanceof = function (obj, ctor) {
401
+ return obj instanceof ctor;
402
+ };
403
+ }
404
+ Polymer.isInstance = function (obj) {
405
+ return Boolean(obj && obj.__isPolymerInstance__);
406
+ };
407
+ Polymer.telemetry.instanceCount = 0;
408
+ }());(function () {
409
+ var modules = {};
410
+ var lcModules = {};
411
+ function setModule(id, module) {
412
+ modules[id] = lcModules[id.toLowerCase()] = module;
413
+ }
414
+ var findModule = function (id) {
415
+ return modules[id] || lcModules[id.toLowerCase()];
416
+ };
417
+ var DomModule = function () {
418
+ return document.createElement('dom-module');
419
+ };
420
+ DomModule.prototype = Object.create(HTMLElement.prototype);
421
+ Polymer.Base.mixin(DomModule.prototype, {
422
+ createdCallback: function () {
423
+ this.register();
424
+ },
425
+ register: function (id) {
426
+ id = id || this.id || this.getAttribute('name') || this.getAttribute('is');
427
+ if (id) {
428
+ if (Polymer.Settings.strictTemplatePolicy && findModule(id) !== undefined) {
429
+ setModule(id, null);
430
+ throw new Error('strictTemplatePolicy: dom-module ' + id + ' re-registered');
431
+ }
432
+ this.id = id;
433
+ setModule(id, this);
434
+ }
435
+ },
436
+ import: function (id, selector) {
437
+ if (id) {
438
+ var m = findModule(id);
439
+ if (!m) {
440
+ forceDomModulesUpgrade();
441
+ m = findModule(id);
442
+ }
443
+ if (m && selector) {
444
+ m = m.querySelector(selector);
445
+ }
446
+ return m;
447
+ }
448
+ }
449
+ });
450
+ Object.defineProperty(DomModule.prototype, 'constructor', {
451
+ value: DomModule,
452
+ configurable: true,
453
+ writable: true
454
+ });
455
+ var cePolyfill = window.CustomElements && !CustomElements.useNative;
456
+ document.registerElement('dom-module', DomModule);
457
+ function forceDomModulesUpgrade() {
458
+ if (cePolyfill) {
459
+ var script = document._currentScript || document.currentScript;
460
+ var doc = script && script.ownerDocument || document;
461
+ var modules = doc.querySelectorAll('dom-module');
462
+ for (var i = modules.length - 1, m; i >= 0 && (m = modules[i]); i--) {
463
+ if (m.__upgraded__) {
464
+ return;
465
+ } else {
466
+ CustomElements.upgrade(m);
467
+ }
468
+ }
469
+ }
470
+ }
471
+ }());Polymer.Base._addFeature({
472
+ _prepIs: function () {
473
+ if (!this.is) {
474
+ var module = (document._currentScript || document.currentScript).parentNode;
475
+ if (module.localName === 'dom-module') {
476
+ var id = module.id || module.getAttribute('name') || module.getAttribute('is');
477
+ this.is = id;
478
+ }
479
+ }
480
+ if (this.is) {
481
+ this.is = this.is.toLowerCase();
482
+ }
483
+ }
484
+ });Polymer.Base._addFeature({
485
+ behaviors: [],
486
+ _desugarBehaviors: function () {
487
+ if (this.behaviors.length) {
488
+ this.behaviors = this._desugarSomeBehaviors(this.behaviors);
489
+ }
490
+ },
491
+ _desugarSomeBehaviors: function (behaviors) {
492
+ var behaviorSet = [];
493
+ behaviors = this._flattenBehaviorsList(behaviors);
494
+ for (var i = behaviors.length - 1; i >= 0; i--) {
495
+ var b = behaviors[i];
496
+ if (behaviorSet.indexOf(b) === -1) {
497
+ this._mixinBehavior(b);
498
+ behaviorSet.unshift(b);
499
+ }
500
+ }
501
+ return behaviorSet;
502
+ },
503
+ _flattenBehaviorsList: function (behaviors) {
504
+ var flat = [];
505
+ for (var i = 0; i < behaviors.length; i++) {
506
+ var b = behaviors[i];
507
+ if (b instanceof Array) {
508
+ flat = flat.concat(this._flattenBehaviorsList(b));
509
+ } else if (b) {
510
+ flat.push(b);
511
+ } else {
512
+ this._warn(this._logf('_flattenBehaviorsList', 'behavior is null, check for missing or 404 import'));
513
+ }
514
+ }
515
+ return flat;
516
+ },
517
+ _mixinBehavior: function (b) {
518
+ var n$ = Object.getOwnPropertyNames(b);
519
+ var useAssignment = b._noAccessors;
520
+ for (var i = 0, n; i < n$.length && (n = n$[i]); i++) {
521
+ if (!Polymer.Base._behaviorProperties[n] && !this.hasOwnProperty(n)) {
522
+ if (useAssignment) {
523
+ this[n] = b[n];
524
+ } else {
525
+ this.copyOwnProperty(n, b, this);
526
+ }
527
+ }
528
+ }
529
+ },
530
+ _prepBehaviors: function () {
531
+ this._prepFlattenedBehaviors(this.behaviors);
532
+ },
533
+ _prepFlattenedBehaviors: function (behaviors) {
534
+ for (var i = 0, l = behaviors.length; i < l; i++) {
535
+ this._prepBehavior(behaviors[i]);
536
+ }
537
+ this._prepBehavior(this);
538
+ },
539
+ _marshalBehaviors: function () {
540
+ for (var i = 0; i < this.behaviors.length; i++) {
541
+ this._marshalBehavior(this.behaviors[i]);
542
+ }
543
+ this._marshalBehavior(this);
544
+ }
545
+ });
546
+ Polymer.Base._behaviorProperties = {
547
+ hostAttributes: true,
548
+ beforeRegister: true,
549
+ registered: true,
550
+ properties: true,
551
+ observers: true,
552
+ listeners: true,
553
+ created: true,
554
+ attached: true,
555
+ detached: true,
556
+ attributeChanged: true,
557
+ ready: true,
558
+ _noAccessors: true
559
+ };Polymer.Base._addFeature({
560
+ _getExtendedPrototype: function (tag) {
561
+ return this._getExtendedNativePrototype(tag);
562
+ },
563
+ _nativePrototypes: {},
564
+ _getExtendedNativePrototype: function (tag) {
565
+ var p = this._nativePrototypes[tag];
566
+ if (!p) {
567
+ p = Object.create(this.getNativePrototype(tag));
568
+ var p$ = Object.getOwnPropertyNames(Polymer.Base);
569
+ for (var i = 0, n; i < p$.length && (n = p$[i]); i++) {
570
+ if (!Polymer.BaseDescriptors[n]) {
571
+ p[n] = Polymer.Base[n];
572
+ }
573
+ }
574
+ Object.defineProperties(p, Polymer.BaseDescriptors);
575
+ this._nativePrototypes[tag] = p;
576
+ }
577
+ return p;
578
+ },
579
+ getNativePrototype: function (tag) {
580
+ return Object.getPrototypeOf(document.createElement(tag));
581
+ }
582
+ });Polymer.Base._addFeature({
583
+ _prepConstructor: function () {
584
+ this._factoryArgs = this.extends ? [
585
+ this.extends,
586
+ this.is
587
+ ] : [this.is];
588
+ var ctor = function () {
589
+ return this._factory(arguments);
590
+ };
591
+ if (this.hasOwnProperty('extends')) {
592
+ ctor.extends = this.extends;
593
+ }
594
+ Object.defineProperty(this, 'constructor', {
595
+ value: ctor,
596
+ writable: true,
597
+ configurable: true
598
+ });
599
+ ctor.prototype = this;
600
+ },
601
+ _factory: function (args) {
602
+ var elt = document.createElement.apply(document, this._factoryArgs);
603
+ if (this.factoryImpl) {
604
+ this.factoryImpl.apply(elt, args);
605
+ }
606
+ return elt;
607
+ }
608
+ });Polymer.nob = Object.create(null);
609
+ Polymer.Base._addFeature({
610
+ getPropertyInfo: function (property) {
611
+ var info = this._getPropertyInfo(property, this.properties);
612
+ if (!info) {
613
+ for (var i = 0; i < this.behaviors.length; i++) {
614
+ info = this._getPropertyInfo(property, this.behaviors[i].properties);
615
+ if (info) {
616
+ return info;
617
+ }
618
+ }
619
+ }
620
+ return info || Polymer.nob;
621
+ },
622
+ _getPropertyInfo: function (property, properties) {
623
+ var p = properties && properties[property];
624
+ if (typeof p === 'function') {
625
+ p = properties[property] = { type: p };
626
+ }
627
+ if (p) {
628
+ p.defined = true;
629
+ }
630
+ return p;
631
+ },
632
+ _prepPropertyInfo: function () {
633
+ this._propertyInfo = {};
634
+ for (var i = 0; i < this.behaviors.length; i++) {
635
+ this._addPropertyInfo(this._propertyInfo, this.behaviors[i].properties);
636
+ }
637
+ this._addPropertyInfo(this._propertyInfo, this.properties);
638
+ this._addPropertyInfo(this._propertyInfo, this._propertyEffects);
639
+ },
640
+ _addPropertyInfo: function (target, source) {
641
+ if (source) {
642
+ var t, s;
643
+ for (var i in source) {
644
+ t = target[i];
645
+ s = source[i];
646
+ if (i[0] === '_' && !s.readOnly) {
647
+ continue;
648
+ }
649
+ if (!target[i]) {
650
+ target[i] = {
651
+ type: typeof s === 'function' ? s : s.type,
652
+ readOnly: s.readOnly,
653
+ attribute: Polymer.CaseMap.camelToDashCase(i)
654
+ };
655
+ } else {
656
+ if (!t.type) {
657
+ t.type = s.type;
658
+ }
659
+ if (!t.readOnly) {
660
+ t.readOnly = s.readOnly;
661
+ }
662
+ }
663
+ }
664
+ }
665
+ }
666
+ });
667
+ (function () {
668
+ var propertiesDesc = {
669
+ configurable: true,
670
+ writable: true,
671
+ enumerable: true,
672
+ value: {}
673
+ };
674
+ Polymer.BaseDescriptors.properties = propertiesDesc;
675
+ Object.defineProperty(Polymer.Base, 'properties', propertiesDesc);
676
+ }());Polymer.CaseMap = {
677
+ _caseMap: {},
678
+ _rx: {
679
+ dashToCamel: /-[a-z]/g,
680
+ camelToDash: /([A-Z])/g
681
+ },
682
+ dashToCamelCase: function (dash) {
683
+ return this._caseMap[dash] || (this._caseMap[dash] = dash.indexOf('-') < 0 ? dash : dash.replace(this._rx.dashToCamel, function (m) {
684
+ return m[1].toUpperCase();
685
+ }));
686
+ },
687
+ camelToDashCase: function (camel) {
688
+ return this._caseMap[camel] || (this._caseMap[camel] = camel.replace(this._rx.camelToDash, '-$1').toLowerCase());
689
+ }
690
+ };Polymer.Base._addFeature({
691
+ _addHostAttributes: function (attributes) {
692
+ if (!this._aggregatedAttributes) {
693
+ this._aggregatedAttributes = {};
694
+ }
695
+ if (attributes) {
696
+ this.mixin(this._aggregatedAttributes, attributes);
697
+ }
698
+ },
699
+ _marshalHostAttributes: function () {
700
+ if (this._aggregatedAttributes) {
701
+ this._applyAttributes(this, this._aggregatedAttributes);
702
+ }
703
+ },
704
+ _applyAttributes: function (node, attr$) {
705
+ for (var n in attr$) {
706
+ if (!this.hasAttribute(n) && n !== 'class') {
707
+ var v = attr$[n];
708
+ this.serializeValueToAttribute(v, n, this);
709
+ }
710
+ }
711
+ },
712
+ _marshalAttributes: function () {
713
+ this._takeAttributesToModel(this);
714
+ },
715
+ _takeAttributesToModel: function (model) {
716
+ if (this.hasAttributes()) {
717
+ for (var i in this._propertyInfo) {
718
+ var info = this._propertyInfo[i];
719
+ if (this.hasAttribute(info.attribute)) {
720
+ this._setAttributeToProperty(model, info.attribute, i, info);
721
+ }
722
+ }
723
+ }
724
+ },
725
+ _setAttributeToProperty: function (model, attribute, property, info) {
726
+ if (!this._serializing) {
727
+ property = property || Polymer.CaseMap.dashToCamelCase(attribute);
728
+ info = info || this._propertyInfo && this._propertyInfo[property];
729
+ if (info && !info.readOnly) {
730
+ var v = this.getAttribute(attribute);
731
+ model[property] = this.deserialize(v, info.type);
732
+ }
733
+ }
734
+ },
735
+ _serializing: false,
736
+ reflectPropertyToAttribute: function (property, attribute, value) {
737
+ this._serializing = true;
738
+ value = value === undefined ? this[property] : value;
739
+ this.serializeValueToAttribute(value, attribute || Polymer.CaseMap.camelToDashCase(property));
740
+ this._serializing = false;
741
+ },
742
+ serializeValueToAttribute: function (value, attribute, node) {
743
+ var str = this.serialize(value);
744
+ node = node || this;
745
+ if (str === undefined) {
746
+ node.removeAttribute(attribute);
747
+ } else {
748
+ node.setAttribute(attribute, str);
749
+ }
750
+ },
751
+ deserialize: function (value, type) {
752
+ switch (type) {
753
+ case Number:
754
+ value = Number(value);
755
+ break;
756
+ case Boolean:
757
+ value = value != null;
758
+ break;
759
+ case Object:
760
+ try {
761
+ value = JSON.parse(value);
762
+ } catch (x) {
763
+ }
764
+ break;
765
+ case Array:
766
+ try {
767
+ value = JSON.parse(value);
768
+ } catch (x) {
769
+ value = null;
770
+ console.warn('Polymer::Attributes: couldn`t decode Array as JSON');
771
+ }
772
+ break;
773
+ case Date:
774
+ value = new Date(value);
775
+ break;
776
+ case String:
777
+ default:
778
+ break;
779
+ }
780
+ return value;
781
+ },
782
+ serialize: function (value) {
783
+ switch (typeof value) {
784
+ case 'boolean':
785
+ return value ? '' : undefined;
786
+ case 'object':
787
+ if (value instanceof Date) {
788
+ return value.toString();
789
+ } else if (value) {
790
+ try {
791
+ return JSON.stringify(value);
792
+ } catch (x) {
793
+ return '';
794
+ }
795
+ }
796
+ default:
797
+ return value != null ? value : undefined;
798
+ }
799
+ }
800
+ });Polymer.version = "1.12.0";Polymer.Base._addFeature({
801
+ _registerFeatures: function () {
802
+ this._prepIs();
803
+ this._prepBehaviors();
804
+ this._prepConstructor();
805
+ this._prepPropertyInfo();
806
+ },
807
+ _prepBehavior: function (b) {
808
+ this._addHostAttributes(b.hostAttributes);
809
+ },
810
+ _marshalBehavior: function (b) {
811
+ },
812
+ _initFeatures: function () {
813
+ this._marshalHostAttributes();
814
+ this._marshalBehaviors();
815
+ }
816
+ });</script>
817
+
818
+
819
+
820
+
821
+
822
+
823
+
824
+
825
+
826
+
827
+