OLD | NEW |
(Empty) | |
| 1 { |
| 2 "version": 3, |
| 3 "file": "polymer.concat.js", |
| 4 "sources": [ |
| 5 "src/polymer.js", |
| 6 "src/boot.js", |
| 7 "src/lib/lang.js", |
| 8 "src/lib/job.js", |
| 9 "src/lib/dom.js", |
| 10 "src/lib/super.js", |
| 11 "src/lib/deserialize.js", |
| 12 "src/api.js", |
| 13 "src/instance/utils.js", |
| 14 "src/instance/events.js", |
| 15 "src/instance/attributes.js", |
| 16 "src/instance/properties.js", |
| 17 "src/instance/mdv.js", |
| 18 "src/instance/base.js", |
| 19 "src/instance/styles.js", |
| 20 "src/declaration/polymer.js", |
| 21 "src/declaration/path.js", |
| 22 "src/declaration/styles.js", |
| 23 "src/declaration/events.js", |
| 24 "src/declaration/properties.js", |
| 25 "src/declaration/attributes.js", |
| 26 "src/declaration/prototype.js", |
| 27 "src/declaration/queue.js", |
| 28 "src/declaration/import.js", |
| 29 "src/declaration/polymer-element.js" |
| 30 ], |
| 31 "names": [], |
| 32 "mappings": "AAAA;AACA;AACA;AACA;AACA;AACA;;ACLA;AACA;AACA;AACA;AACA;AACA;AACA
;AACA;AACA;AACA;AACA;AACA;AACA;;ACZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC
A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC
A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A
ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A
ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A
ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A
ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjEA;AACA;AACA;AACA;AACA;AACA
;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA
;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjCA;AACA;AACA;AA
CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA
CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA
CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA
CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA
CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA
CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA
CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA
CA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;
AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;
AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;
AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;
AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnEA;AACA;AACA;AACA;AAC
A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC
A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;A
ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A
ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A
ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A
ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A
ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A
ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrGA
;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA
;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA
;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA
;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/
DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA
CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA
CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA
CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA
CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA
CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5FA;AACA;AACA;
AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;
AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;
AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;
AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;
AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;
AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;
AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;
AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;
AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;
AACA;AACA;AACA;;ACrJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC
A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC
A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC
A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC
A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC
A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC
A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC
A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC
A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpIA;AACA;AACA;AACA;AACA;AACA;AACA;A
ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A
ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A
ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A
ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A
ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A
ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A
ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A
ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A
ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A
ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A
ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A
ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A
ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A
ACA;AACA;AACA;AACA;AACA;;AC3NA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA
;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA
;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA
;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA
;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA
;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnFA;AACA;AACA;AACA;AACA;AACA;AA
CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA
CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA
CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA
CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA
CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA
CA;AACA;AACA;AACA;;ACzFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;
AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1B
A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC
A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC
A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC
A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC
A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC
A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC
A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC
A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC
A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC
A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC
A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC
A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC
A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC
A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC
A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A
ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A
ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A
ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,Y;AC/CA;AACA;AACA;AACA;AACA;AACA;AACA;AAC
A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC
A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC
A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC
A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC
A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC
A;AACA;;ACxFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A
ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A
ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A
ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A
ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzEA;AACA;AACA;AACA
;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA
;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA
;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA
;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA
;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA
;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA
;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA
;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA
;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA
;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA
;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA
;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA
;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA
;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA
;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACl
PA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA
CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA
CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA
CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA
CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA
CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA
CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA
CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5HA;AACA;AACA;
AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;
AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;
AACA;AACA;AACA;;ACrCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC
A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC
A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC
A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC
A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC
A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC
A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC
A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC
A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC
A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA", |
| 33 "sourcesContent": [ |
| 34 "/*\n * Copyright 2013 The Polymer Authors. All rights reserved.\n * Use of
this source code is governed by a BSD-style\n * license that can be found in the
LICENSE file.\n */\nPolymer = {};\n", |
| 35 "/*\n * Copyright 2013 The Polymer Authors. All rights reserved.\n * Use of
this source code is governed by a BSD-style\n * license that can be found in the
LICENSE file.\n */\n\n// TODO(sorvell): this ensures Polymer is an object and n
ot a function\n// Platform is currently defining it as a function to allow for a
sync loading\n// of polymer; once we refine the loading process this likely goes
away.\nif (typeof window.Polymer === 'function') {\n Polymer = {};\n}\n\n", |
| 36 "/*\n * Copyright 2013 The Polymer Authors. All rights reserved.\n * Use of
this source code is governed by a BSD-style\n * license that can be found in the
LICENSE file.\n */\n(function(scope) {\n\n // copy own properties from 'api' t
o 'prototype, with name hinting for 'super'\n function extend(prototype, api) {
\n if (prototype && api) {\n // use only own properties of 'api'\n
Object.getOwnPropertyNames(api).forEach(function(n) {\n // acquire proper
ty descriptor\n var pd = Object.getOwnPropertyDescriptor(api, n);\n
if (pd) {\n // clone property via descriptor\n Object.define
Property(prototype, n, pd);\n // cache name-of-method for 'super' engin
e\n if (typeof pd.value == 'function') {\n // hint the 'supe
r' engine\n pd.value.nom = n;\n }\n }\n });\n
}\n return prototype;\n }\n \n // exports\n\n scope.extend = extend;\n\n
})(Polymer);\n", |
| 37 "/* \n * Copyright 2013 The Polymer Authors. All rights reserved.\n * Use of
this source code is governed by a BSD-style\n * license that can be found in th
e LICENSE file.\n */\n\n(function(scope) {\n \n // usage\n \n // invoke cb.c
all(this) in 100ms, unless the job is re-registered,\n // which resets the time
r\n // \n // this.myJob = this.job(this.myJob, cb, 100)\n //\n // returns a
job handle which can be used to re-register a job\n\n var Job = function(inCont
ext) {\n this.context = inContext;\n this.boundComplete = this.complete.bi
nd(this)\n };\n Job.prototype = {\n go: function(callback, wait) {\n t
his.callback = callback;\n var h;\n if (!wait) {\n h = requestA
nimationFrame(this.boundComplete);\n this.handle = function() {\n
cancelAnimationFrame(h);\n }\n } else {\n h = setTimeout(th
is.boundComplete, wait);\n this.handle = function() {\n clearTim
eout(h);\n }\n }\n },\n stop: function() {\n if (this.han
dle) {\n this.handle();\n this.handle = null;\n }\n },\n
complete: function() {\n if (this.handle) {\n this.stop();\n
this.callback.call(this.context);\n }\n }\n };\n \n function job(jo
b, callback, wait) {\n if (job) {\n job.stop();\n } else {\n job
= new Job(this);\n }\n job.go(callback, wait);\n return job;\n }\n \
n // exports \n\n scope.job = job;\n \n})(Polymer);\n", |
| 38 "/*\n * Copyright 2013 The Polymer Authors. All rights reserved.\n * Use of
this source code is governed by a BSD-style\n * license that can be found in the
LICENSE file.\n */\n(function(scope) {\n\n var registry = {};\n\n HTMLElement
.register = function(tag, prototype) {\n registry[tag] = prototype;\n }\n\n
// get prototype mapped to node <tag>\n HTMLElement.getPrototypeForTag = funct
ion(tag) {\n var prototype = !tag ? HTMLElement.prototype : registry[tag];\n
// TODO(sjmiles): creating <tag> is likely to have wasteful side-effects\n
return prototype || Object.getPrototypeOf(document.createElement(tag));\n };\n
\n // we have to flag propagation stoppage for the event dispatcher\n var orig
inalStopPropagation = Event.prototype.stopPropagation;\n Event.prototype.stopPr
opagation = function() {\n this.cancelBubble = true;\n originalStopPropaga
tion.apply(this, arguments);\n };\n \n // TODO(sorvell): remove when we're su
re imports does not need\n // to load stylesheets\n /*\n HTMLImports.importer
.preloadSelectors += \n ', polymer-element link[rel=stylesheet]';\n */\n})
(Polymer);\n", |
| 39 "/*\n * Copyright 2013 The Polymer Authors. All rights reserved.\n * Use of
this source code is governed by a BSD-style\n * license that can be found in the
LICENSE file.\n */\n (function(scope) {\n // super\n\n // `arrayOfArgs` i
s an optional array of args like one might pass\n // to `Function.apply`\n\n
// TODO(sjmiles):\n // $super must be installed on an instance or proto
type chain\n // as `super`, and invoked via `this`, e.g.\n // `thi
s.super();`\n\n // will not work if function objects are not unique, for e
xample,\n // when using mixins.\n // The memoization strategy assume
s each function exists on only one \n // prototype chain i.e. we use the f
unction object for memoizing)\n // perhaps we can bookkeep on the prototyp
e itself instead\n function $super(arrayOfArgs) {\n // since we are thun
king a method call, performance is important here: \n // memoize all lookup
s, once memoized the fast path calls no other \n // functions\n //\n
// find the caller (cannot be `strict` because of 'caller')\n var calle
r = $super.caller;\n // memoized 'name of method' \n var nom = caller.
nom;\n // memoized next implementation prototype\n var _super = caller
._super;\n if (!_super) {\n if (!nom) {\n nom = caller.nom
= nameInThis.call(this, caller);\n }\n if (!nom) {\n cons
ole.warn('called super() on a method not installed declaratively (has no .nom pr
operty)');\n }\n // super prototype is either cached or we have to
find it\n // by searching __proto__ (at the 'top')\n _super = mem
oizeSuper(caller, nom, getPrototypeOf(this));\n }\n if (!_super) {\n
// if _super is falsey, there is no super implementation\n //consol
e.warn('called $super(' + nom + ') where there is no super implementation');\n
} else {\n // our super function\n var fn = _super[nom];\n
// memoize information so 'fn' can call 'super'\n if (!fn._super) {\n
memoizeSuper(fn, nom, _super);\n }\n // invoke the inher
ited method\n // if 'fn' is not function valued, this will throw\n
return fn.apply(this, arrayOfArgs || []);\n }\n }\n\n function nextS
uper(proto, name, caller) {\n // look for an inherited prototype that imple
ments name\n while (proto) {\n if ((proto[name] !== caller) && proto
[name]) {\n return proto;\n }\n proto = getPrototypeOf(pr
oto);\n }\n }\n\n function memoizeSuper(method, name, proto) {\n
// find and cache next prototype containing `name`\n // we need the protot
ype so we can do another lookup\n // from here\n method._super = nextS
uper(proto, name, method);\n if (method._super) {\n // _super is a p
rototype, the actual method is _super[name]\n // tag super method with it
's name for further lookups\n method._super[name].nom = name;\n }\n
return method._super;\n }\n\n function nameInThis(value) {\n var
p = this.__proto__;\n while (p && p !== HTMLElement.prototype) {\n
// TODO(sjmiles): getOwnPropertyNames is absurdly expensive\n var n$ = Ob
ject.getOwnPropertyNames(p);\n for (var i=0, l=n$.length, n; i<l && (n=n$
[i]); i++) {\n var d = Object.getOwnPropertyDescriptor(p, n);\n
if (typeof d.value === 'function' && d.value === value) {\n return
n;\n }\n }\n p = p.__proto__;\n }\n }\n\n // N
OTE: In some platforms (IE10) the prototype chain is faked via \n // __proto_
_. Therefore, always get prototype via __proto__ instead of\n // the more sta
ndard Object.getPrototypeOf.\n function getPrototypeOf(prototype) {\n re
turn prototype.__proto__;\n }\n\n // utility function to precompute name t
ags for functions\n // in a (unchained) prototype\n function hintSuper(pro
totype) {\n // tag functions with their prototype name to optimize\n /
/ super call invocations\n for (var n in prototype) {\n var pd = Obj
ect.getOwnPropertyDescriptor(prototype, n);\n if (pd && typeof pd.value =
== 'function') {\n pd.value.nom = n;\n }\n }\n }\n\n
// exports\n\n scope.super = $super;\n\n})(Polymer);\n", |
| 40 "/* \n * Copyright 2013 The Polymer Authors. All rights reserved.\n * Use of
this source code is governed by a BSD-style\n * license that can be found in th
e LICENSE file.\n */\n\n(function(scope) {\n\n var typeHandlers = {\n string
: function(value) {\n return value;\n },\n date: function(value) {\n
return new Date(Date.parse(value) || Date.now());\n },\n boolean: fun
ction(value) {\n if (value === '') {\n return true;\n }\n
return value === 'false' ? false : !!value;\n },\n number: function(value)
{\n var n = parseFloat(value);\n // hex values like \"0xFFFF\" parseF
loat as 0\n if (n === 0) {\n n = parseInt(value);\n }\n re
turn isNaN(n) ? value : n;\n // this code disabled because encoded values (
like \"0xFFFF\")\n // do not round trip to their original format\n //r
eturn (String(floatVal) === value) ? floatVal : value;\n },\n object: func
tion(value, currentValue) {\n if (currentValue === null) {\n return
value;\n }\n try {\n // If the string is an object, we can pars
e is with the JSON library.\n // include convenience replace for single-q
uotes. If the author omits\n // quotes altogether, parse will fail.\n
return JSON.parse(value.replace(/'/g, '\"'));\n } catch(e) {\n /
/ The object isn't valid JSON, return the raw value\n return value;\n
}\n },\n // avoid deserialization of functions\n 'function': function
(value, currentValue) {\n return currentValue;\n }\n };\n\n function d
eserializeValue(value, currentValue) {\n // attempt to infer type from defaul
t value\n var inferredType = typeof currentValue;\n // invent 'date' type
value for Date\n if (currentValue instanceof Date) {\n inferredType = 'd
ate';\n }\n // delegate deserialization via type string\n return typeHa
ndlers[inferredType](value, currentValue);\n }\n\n // exports\n\n scope.deser
ializeValue = deserializeValue;\n\n})(Polymer);\n", |
| 41 "/*\n * Copyright 2013 The Polymer Authors. All rights reserved.\n * Use of
this source code is governed by a BSD-style\n * license that can be found in the
LICENSE file.\n */\n(function(scope) {\n\n // imports\n\n var extend = scope.
extend;\n\n // module\n\n var api = {};\n\n api.declaration = {};\n api.inst
ance = {};\n\n api.publish = function(apis, prototype) {\n for (var n in api
s) {\n extend(prototype, apis[n]);\n }\n }\n\n // exports\n\n scope.a
pi = api;\n\n})(Polymer);\n", |
| 42 "/*\n * Copyright 2013 The Polymer Authors. All rights reserved.\n * Use of
this source code is governed by a BSD-style\n * license that can be found in the
LICENSE file.\n */\n(function(scope) {\n\n var utils = {\n /**\n * Inv
okes a function asynchronously. The context of the callback\n * function is
bound to 'this' automatically.\n * @method async\n * @param {Function
|String} method\n * @param {any|Array} args\n * @param {number} timeou
t\n */\n async: function(method, args, timeout) {\n // when polyfil
ling Object.observe, ensure changes \n // propagate before executing the as
ync method\n Platform.flush();\n // second argument to `apply` must be
an array\n args = (args && args.length) ? args : [args];\n // functio
n to invoke\n var fn = function() {\n (this[method] || method).apply
(this, args);\n }.bind(this);\n // execute `fn` sooner or later\n
var handle = timeout ? setTimeout(fn, timeout) :\n requestAnimationFra
me(fn);\n // NOTE: switch on inverting handle to determine which time is us
ed.\n return timeout ? handle : 1 / handle;\n },\n cancelAsync: funct
ion(handle) {\n if (handle < 1) {\n cancelAnimationFrame(Math.round(
1 / handle));\n } else {\n clearTimeout(handle);\n }\n },\n
/**\n * Fire an event.\n * @method fire\n * @returns {Object}
event\n * @param {string} type An event name.\n * @param {any} detail\
n * @param {Node} onNode Target node.\n */\n fire: function(type, d
etail, onNode, bubbles, cancelable) {\n var node = onNode || this;\n v
ar detail = detail || {};\n var event = new CustomEvent(type, {\n bu
bbles: (bubbles !== undefined ? bubbles : true), \n cancelable: (cancelab
le !== undefined ? cancelable : true), \n detail: detail\n });\n
node.dispatchEvent(event);\n return event;\n },\n /**\n * Fire
an event asynchronously.\n * @method asyncFire\n * @param {string} ty
pe An event name.\n * @param detail\n * @param {Node} toNode Target no
de.\n */\n asyncFire: function(/*inType, inDetail*/) {\n this.async
(\"fire\", arguments);\n },\n /**\n * Remove class from old, add clas
s to anew, if they exist\n * @param classFollows\n * @param anew A nod
e.\n * @param old A node\n * @param className\n */\n classFoll
ows: function(anew, old, className) {\n if (old) {\n old.classList.r
emove(className);\n }\n if (anew) {\n anew.classList.add(classN
ame);\n }\n }\n };\n\n // no-operation function for handy stubs\n var
nop = function() {};\n\n // null-object for handy stubs\n var nob = {};\n\n
// deprecated\n\n utils.asyncMethod = utils.async;\n\n // exports\n\n scope.a
pi.instance.utils = utils;\n scope.nop = nop;\n scope.nob = nob;\n\n})(Polymer
);\n", |
| 43 "/*\n * Copyright 2013 The Polymer Authors. All rights reserved.\n * Use of
this source code is governed by a BSD-style\n * license that can be found in the
LICENSE file.\n */\n\n(function(scope) {\n\n // imports\n\n var log = window.
logFlags || {};\n var EVENT_PREFIX = 'on-';\n\n // instance events api\n var
events = {\n // read-only\n EVENT_PREFIX: EVENT_PREFIX,\n // event list
eners on host\n addHostListeners: function() {\n var events = this.event
Delegates;\n log.events && (Object.keys(events).length > 0) && console.log(
'[%s] addHostListeners:', this.localName, events);\n // NOTE: host events l
ook like bindings but really are not;\n // (1) we don't want the attribute
to be set and (2) we want to support\n // multiple event listeners ('host'
and 'instance') and Node.bind\n // by default supports 1 thing being bound.
\n // We do, however, leverage the event hookup code in PolymerExpressions\
n // so that we have a common code path for handling declarative events.\n
var self = this, bindable, eventName;\n for (var n in events) {\n
eventName = EVENT_PREFIX + n;\n bindable = PolymerExpressions.prepareE
ventBinding(\n Path.get(events[n]),\n eventName, \n {
\n resolveEventHandler: function(model, path, node) {\n
var fn = path.getValueFrom(self);\n if (fn) {\n retu
rn fn.bind(self);\n }\n }\n }\n );\n
bindable(this, this, false);\n }\n },\n // call 'method' or funct
ion method on 'obj' with 'args', if the method exists\n dispatchMethod: funct
ion(obj, method, args) {\n if (obj) {\n log.events && console.group(
'[%s] dispatch [%s]', obj.localName, method);\n var fn = typeof method ==
= 'function' ? method : obj[method];\n if (fn) {\n fn[args ? 'ap
ply' : 'call'](obj, args);\n }\n log.events && console.groupEnd();
\n Platform.flush();\n }\n }\n };\n\n // exports\n\n scope.api
.instance.events = events;\n\n})(Polymer);\n", |
| 44 "/*\r\n * Copyright 2013 The Polymer Authors. All rights reserved.\r\n * Use
of this source code is governed by a BSD-style\r\n * license that can be found
in the LICENSE file.\r\n */\r\n(function(scope) {\r\n\r\n // instance api for a
ttributes\r\n\r\n var attributes = {\r\n copyInstanceAttributes: function ()
{\r\n var a$ = this._instanceAttributes;\r\n for (var k in a$) {\r\n
if (!this.hasAttribute(k)) {\r\n this.setAttribute(k, a$[k]);\r\
n }\r\n }\r\n },\r\n // for each attribute on this, deserializ
e value to property as needed\r\n takeAttributes: function() {\r\n // if
we have no publish lookup table, we have no attributes to take\r\n // TODO
(sjmiles): ad hoc\r\n if (this._publishLC) {\r\n for (var i=0, a$=th
is.attributes, l=a$.length, a; (a=a$[i]) && i<l; i++) {\r\n this.attrib
uteToProperty(a.name, a.value);\r\n }\r\n }\r\n },\r\n // if a
ttribute 'name' is mapped to a property, deserialize\r\n // 'value' into that
property\r\n attributeToProperty: function(name, value) {\r\n // try to
match this attribute to a property (attributes are\r\n // all lower-case,
so this is case-insensitive search)\r\n var name = this.propertyForAttribut
e(name);\r\n if (name) {\r\n // filter out 'mustached' values, these
are to be\r\n // replaced with bound-data and are not yet values\r\n
// themselves\r\n if (value && value.search(scope.bindPattern) >= 0)
{\r\n return;\r\n }\r\n // get original value\r\n
var currentValue = this[name];\r\n // deserialize Boolean or Number value
s from attribute\r\n var value = this.deserializeValue(value, currentValu
e);\r\n // only act if the value has changed\r\n if (value !== cur
rentValue) {\r\n // install new value (has side-effects)\r\n t
his[name] = value;\r\n }\r\n }\r\n },\r\n // return the publis
hed property matching name, or undefined\r\n propertyForAttribute: function(n
ame) {\r\n var match = this._publishLC && this._publishLC[name];\r\n /
/console.log('propertyForAttribute:', name, 'matches', match);\r\n return m
atch;\r\n },\r\n // convert representation of 'stringValue' based on type
of 'currentValue'\r\n deserializeValue: function(stringValue, currentValue) {
\r\n return scope.deserializeValue(stringValue, currentValue);\r\n },\r\
n serializeValue: function(value, inferredType) {\r\n if (inferredType =
== 'boolean') {\r\n return value ? '' : undefined;\r\n } else if (in
ferredType !== 'object' && inferredType !== 'function'\r\n && value !==
undefined) {\r\n return value;\r\n }\r\n },\r\n reflectProper
tyToAttribute: function(name) {\r\n var inferredType = typeof this[name];\r
\n // try to intelligently serialize property value\r\n var serialized
Value = this.serializeValue(this[name], inferredType);\r\n // boolean prope
rties must reflect as boolean attributes\r\n if (serializedValue !== undefi
ned) {\r\n this.setAttribute(name, serializedValue);\r\n // TODO(s
orvell): we should remove attr for all properties\r\n // that have undefi
ned serialization; however, we will need to\r\n // refine the attr reflec
tion system to achieve this; pica, for example,\r\n // relies on having i
nferredType object properties not removed as\r\n // attrs.\r\n } els
e if (inferredType === 'boolean') {\r\n this.removeAttribute(name);\r\n
}\r\n }\r\n };\r\n\r\n // exports\r\n\r\n scope.api.instance.attribute
s = attributes;\r\n\r\n})(Polymer);\r\n", |
| 45 "/*\n * Copyright 2013 The Polymer Authors. All rights reserved.\n * Use of
this source code is governed by a BSD-style\n * license that can be found in the
LICENSE file.\n */\n(function(scope) {\n\n // imports\n\n var log = window.lo
gFlags || {};\n\n // magic words\n\n var OBSERVE_SUFFIX = 'Changed';\n\n // e
lement api\n\n var empty = [];\n\n var properties = {\n observeProperties:
function() {\n var n$ = this._observeNames, pn$ = this._publishNames;\n
if ((n$ && n$.length) || (pn$ && pn$.length)) {\n var self = this;\n
var o = this._propertyObserver = new CompoundObserver();\n for (var
i=0, l=n$.length, n; (i<l) && (n=n$[i]); i++) {\n o.addPath(this, n);\n
// observer array properties\n var pd = Object.getOwnProperty
Descriptor(this.__proto__, n);\n if (pd && pd.value) {\n thi
s.observeArrayValue(n, pd.value, null);\n }\n }\n for (va
r i=0, l=pn$.length, n; (i<l) && (n=pn$[i]); i++) {\n if (!this.observe
|| (this.observe[n] === undefined)) {\n o.addPath(this, n);\n
}\n }\n o.open(this.notifyPropertyChanges, this);\n }\n
},\n notifyPropertyChanges: function(newValues, oldValues, paths) {\n v
ar name, method, called = {};\n for (var i in oldValues) {\n // note
: paths is of form [object, path, object, path]\n name = paths[2 * i + 1]
;\n if (this.publish[name] !== undefined) {\n this.reflectProper
tyToAttribute(name);\n }\n method = this.observe[name];\n i
f (method) {\n this.observeArrayValue(name, newValues[i], oldValues[i])
;\n if (!called[method]) {\n called[method] = true;\n
// observes the value if it is an array\n this.invokeMethod(meth
od, [oldValues[i], newValues[i], arguments]);\n }\n }\n }\n
},\n observeArrayValue: function(name, value, old) {\n // we only ca
re if there are registered side-effects\n var callbackName = this.observe[n
ame];\n if (callbackName) {\n // if we are observing the previous va
lue, stop\n if (Array.isArray(old)) {\n log.observe && console.l
og('[%s] observeArrayValue: unregister observer [%s]', this.localName, name);\n
this.unregisterObserver(name + '__array');\n }\n // if th
e new value is an array, being observing it\n if (Array.isArray(value)) {
\n log.observe && console.log('[%s] observeArrayValue: register observe
r [%s]', this.localName, name, value);\n var observer = new ArrayObserv
er(value);\n observer.open(function(value, old) {\n this.inv
okeMethod(callbackName, [old]);\n }, this);\n this.registerObs
erver(name + '__array', observer);\n }\n }\n },\n bindProperty
: function(property, observable) {\n // apply Polymer two-way reference bin
ding\n return bindProperties(this, property, observable);\n },\n unbi
ndAllProperties: function() {\n if (this._propertyObserver) {\n this
._propertyObserver.close();\n }\n this.unregisterObservers();\n },\
n unbindProperty: function(name) {\n return this.unregisterObserver(name
);\n },\n invokeMethod: function(method, args) {\n var fn = this[meth
od] || method;\n if (typeof fn === 'function') {\n fn.apply(this, ar
gs);\n }\n },\n // bookkeeping observers for memory management\n r
egisterObserver: function(name, observer) {\n var o$ = this._observers || (
this._observers = {});\n o$[name] = observer;\n },\n unregisterObserv
er: function(name) {\n var o$ = this._observers;\n if (o$ && o$[name])
{\n o$[name].close();\n o$[name] = null;\n return true;\n
}\n },\n unregisterObservers: function() {\n if (this._observers
) {\n var keys=Object.keys(this._observers);\n for (var i=0, l=key
s.length, k, o; (i < l) && (k=keys[i]); i++) {\n o = this._observers[k]
;\n o.close();\n }\n this._observers = {};\n }\n
}\n };\n\n // property binding\n // bind a property in A to a path in B by co
nverting A[property] to a\n // getter/setter pair that accesses B[...path...]\n
function bindProperties(inA, inProperty, observable) {\n log.bind && consol
e.log(LOG_BIND_PROPS, inB.localName || 'object', inPath, inA.localName, inProper
ty);\n // capture A's value if B's value is null or undefined,\n // otherw
ise use B's value\n // TODO(sorvell): need to review, can do with ObserverTra
nsform\n var v = observable.discardChanges();\n if (v === null || v === un
defined) {\n observable.setValue(inA[inProperty]);\n }\n return Obser
ver.defineComputedProperty(inA, inProperty, observable);\n }\n\n // logging\n
var LOG_OBSERVE = '[%s] watching [%s]';\n var LOG_OBSERVED = '[%s#%s] watch: [
%s] now [%s] was [%s]';\n var LOG_CHANGED = '[%s#%s] propertyChanged: [%s] now
[%s] was [%s]';\n var LOG_BIND_PROPS = \"[%s]: bindProperties: [%s] to [%s].[%s
]\";\n\n // exports\n\n scope.api.instance.properties = properties;\n\n})(Poly
mer);\n", |
| 46 "/*\n * Copyright 2013 The Polymer Authors. All rights reserved.\n * Use of
this source code is governed by a BSD-style\n * license that can be found in the
LICENSE file.\n */\n(function(scope) {\n\n // imports\n\n var log = window.lo
gFlags || 0;\n var events = scope.api.instance.events;\n\n var syntax = new Po
lymerExpressions();\n syntax.resolveEventHandler = function(model, path, node)
{\n var ctlr = findEventController(node);\n if (ctlr) {\n var fn = pa
th.getValueFrom(ctlr);\n if (fn) {\n return fn.bind(ctlr);\n }\
n }\n }\n\n // An event controller is the host element for the shadowRoot i
n which \n // the node exists, or the first ancestor with a 'lightDomController
'\n // property.\n function findEventController(node) {\n while (node.paren
tNode) {\n if (node.lightDomController) {\n return node;\n }\n
node = node.parentNode;\n }\n return node.host;\n };\n\n // element
api supporting mdv\n\n var mdv = {\n syntax: syntax,\n instanceTemplate:
function(template) {\n return template.createInstance(this, this.syntax);\
n },\n bind: function(name, observable, oneTime) {\n // note: binding
is a prepare signal. This allows us to be sure that any\n // property chan
ges that occur as a result of binding will be observed.\n if (!this._elemen
tPrepared) {\n this.prepareElement();\n }\n var property = this
.propertyForAttribute(name);\n if (!property) {\n // TODO(sjmiles):
this mixin method must use the special form\n // of `super` installed by
`mixinMethod` in declaration/prototype.js\n return this.mixinSuper(argume
nts);\n } else {\n // clean out the closets\n this.unbind(nam
e);\n // use n-way Polymer binding\n var observer = this.bindPrope
rty(property, observable);\n // stick path on observer so it's available
via this.bindings\n observer.path = observable.path_;\n // reflect
bound property to attribute when binding\n // to ensure binding is not l
eft on attribute if property\n // does not update due to not changing.\n
this.reflectPropertyToAttribute(property);\n return this.bindings[
name] = observer;\n }\n },\n asyncUnbindAll: function() {\n if (
!this._unbound) {\n log.unbind && console.log('[%s] asyncUnbindAll', this
.localName);\n this._unbindAllJob = this.job(this._unbindAllJob, this.unb
indAll, 0);\n }\n },\n unbindAll: function() {\n if (!this._unbo
und) {\n this.unbindAllProperties();\n this.super();\n // u
nbind shadowRoot\n var root = this.shadowRoot;\n while (root) {\n
unbindNodeTree(root);\n root = root.olderShadowRoot;\n
}\n this._unbound = true;\n }\n },\n cancelUnbindAll: function
(preventCascade) {\n if (this._unbound) {\n log.unbind && console.wa
rn('[%s] already unbound, cannot cancel unbindAll', this.localName);\n re
turn;\n }\n log.unbind && console.log('[%s] cancelUnbindAll', this.loc
alName);\n if (this._unbindAllJob) {\n this._unbindAllJob = this._un
bindAllJob.stop();\n }\n // cancel unbinding our shadow tree iff we're
not in the process of\n // cascading our tree (as we do, for example, when
the element is inserted).\n if (!preventCascade) {\n forNodeTree(th
is.shadowRoot, function(n) {\n if (n.cancelUnbindAll) {\n n.
cancelUnbindAll();\n }\n });\n }\n }\n };\n\n function
unbindNodeTree(node) {\n forNodeTree(node, _nodeUnbindAll);\n }\n\n functi
on _nodeUnbindAll(node) {\n node.unbindAll();\n }\n\n function forNodeTree(
node, callback) {\n if (node) {\n callback(node);\n for (var child
= node.firstChild; child; child = child.nextSibling) {\n forNodeTree(chil
d, callback);\n }\n }\n }\n\n var mustachePattern = /\\{\\{([^{}]*)}}/
;\n\n // exports\n\n scope.bindPattern = mustachePattern;\n scope.api.instanc
e.mdv = mdv;\n\n})(Polymer);\n", |
| 47 "/*\n * Copyright 2013 The Polymer Authors. All rights reserved.\n * Use of
this source code is governed by a BSD-style\n * license that can be found in the
LICENSE file.\n */\n(function(scope) {\n var preparingElements = 0;\n\n var b
ase = {\n PolymerBase: true,\n job: Polymer.job,\n super: Polymer.super
,\n // user entry point for element has had its createdCallback called\n c
reated: function() {\n },\n // user entry point for element has shadowRoot
and is ready for\n // api interaction\n ready: function() {\n },\n
createdCallback: function() {\n this.created();\n if (this.ownerDocume
nt.defaultView || this.alwaysPrepare ||\n preparingElements > 0) {\n
this.prepareElement();\n }\n },\n // system entry point, do not
override\n prepareElement: function() {\n this._elementPrepared = true;\
n // install shadowRoots storage\n this.shadowRoots = {};\n // in
stall property observers\n this.observeProperties();\n // install boil
erplate attributes\n this.copyInstanceAttributes();\n // process input
attributes\n this.takeAttributes();\n // add event listeners\n t
his.addHostListeners();\n // guarantees that while preparing, any\n //
sub-elements are also prepared\n preparingElements++;\n // process de
clarative resources\n this.parseDeclarations(this.__proto__);\n // dec
rement semaphore\n preparingElements--;\n // TODO(sorvell): CE polyfil
l uses unresolved attribute to simulate\n // :unresolved; remove this attri
bute to be compatible with native\n // CE.\n this.removeAttribute('unr
esolved');\n // user entry point\n this.ready();\n },\n attached
Callback: function() {\n if (!this._elementPrepared) {\n this.prepar
eElement();\n }\n this.cancelUnbindAll(true);\n // invoke user ac
tion\n if (this.attached) {\n this.attached();\n }\n // TO
DO(sorvell): bc\n if (this.enteredView) {\n this.enteredView();\n
}\n // NOTE: domReady can be used to access elements in dom (descendants
, \n // ancestors, siblings) such that the developer is enured to upgrade\n
// ordering. If the element definitions have loaded, domReady\n // ca
n be used to access upgraded elements.\n if (!this.hasBeenAttached) {\n
this.hasBeenAttached = true;\n if (this.domReady) {\n this.a
sync('domReady');\n }\n }\n },\n detachedCallback: function()
{\n if (!this.preventDispose) {\n this.asyncUnbindAll();\n }\n
// invoke user action\n if (this.detached) {\n this.detached();
\n }\n // TODO(sorvell): bc\n if (this.leftView) {\n this.
leftView();\n }\n },\n // TODO(sorvell): bc\n enteredViewCallback:
function() {\n this.attachedCallback();\n },\n // TODO(sorvell): bc\
n leftViewCallback: function() {\n this.detachedCallback();\n },\n
// TODO(sorvell): bc\n enteredDocumentCallback: function() {\n this.att
achedCallback();\n },\n // TODO(sorvell): bc\n leftDocumentCallback: fu
nction() {\n this.detachedCallback();\n },\n // recursive ancestral <
element> initialization, oldest first\n parseDeclarations: function(p) {\n
if (p && p.element) {\n this.parseDeclarations(p.__proto__);\n
p.parseDeclaration.call(this, p.element);\n }\n },\n // parse input <
element> as needed, override for custom behavior\n parseDeclaration: function
(elementElement) {\n var template = this.fetchTemplate(elementElement);\n
if (template) {\n var root = this.shadowFromTemplate(template);\n
this.shadowRoots[elementElement.name] = root; \n }\n },\n
// return a shadow-root template (if desired), override for custom behavior\n
fetchTemplate: function(elementElement) {\n return elementElement.querySel
ector('template');\n },\n // utility function that creates a shadow root f
rom a <template>\n shadowFromTemplate: function(template) {\n if (templa
te) {\n // make a shadow root\n var root = this.createShadowRoot()
;\n // migrate flag(s)\n root.resetStyleInheritance = this.resetSt
yleInheritance;\n // stamp template\n // which includes parsing an
d applying MDV bindings before being \n // inserted (to avoid {{}} in att
ribute values)\n // e.g. to prevent <img src=\"images/{{icon}}\"> from ge
nerating a 404.\n var dom = this.instanceTemplate(template);\n //
append to shadow dom\n root.appendChild(dom);\n // perform post-co
nstruction initialization tasks on shadow root\n this.shadowRootReady(roo
t, template);\n // return the created shadow root\n return root;\n
}\n },\n // utility function that stamps a <template> into light-dom
\n lightFromTemplate: function(template) {\n if (template) {\n //
TODO(sorvell): mark this element as a lightDOMController so that\n // ev
ent listeners on bound nodes inside it will be called on it.\n // Note, t
he expectation here is that events on all descendants \n // should be han
dled by this element.\n this.lightDomController = true;\n // stamp
template\n // which includes parsing and applying MDV bindings before be
ing \n // inserted (to avoid {{}} in attribute values)\n // e.g. t
o prevent <img src=\"images/{{icon}}\"> from generating a 404.\n var dom
= this.instanceTemplate(template);\n // append to shadow dom\n thi
s.appendChild(dom);\n // perform post-construction initialization tasks o
n ahem, light root\n this.shadowRootReady(this, template);\n // re
turn the created shadow root\n return dom;\n }\n },\n shadowRo
otReady: function(root, template) {\n // locate nodes with id and store ref
erences to them in this.$ hash\n this.marshalNodeReferences(root);\n /
/ set up pointer gestures\n PointerGestures.register(root);\n },\n //
locate nodes with id and store references to them in this.$ hash\n marshalNo
deReferences: function(root) {\n // establish $ instance variable\n va
r $ = this.$ = this.$ || {};\n // populate $ from nodes with ID from the LO
CAL tree\n if (root) {\n var n$ = root.querySelectorAll(\"[id]\");\n
for (var i=0, l=n$.length, n; (i<l) && (n=n$[i]); i++) {\n $[n.
id] = n;\n };\n }\n },\n attributeChangedCallback: function(na
me, oldValue) {\n // TODO(sjmiles): adhoc filter\n if (name !== 'class
' && name !== 'style') {\n this.attributeToProperty(name, this.getAttribu
te(name));\n }\n if (this.attributeChanged) {\n this.attributeC
hanged.apply(this, arguments);\n }\n },\n onMutation: function(node,
listener) {\n var observer = new MutationObserver(function(mutations) {\n
listener.call(this, observer, mutations);\n observer.disconnect();\
n }.bind(this));\n observer.observe(node, {childList: true, subtree: t
rue});\n }\n };\n\n // true if object has own PolymerBase api\n function i
sBase(object) {\n return object.hasOwnProperty('PolymerBase') \n }\n\n // n
ame a base constructor for dev tools\n\n function PolymerBase() {};\n PolymerB
ase.prototype = base;\n base.constructor = PolymerBase;\n \n // exports\n\n
scope.Base = PolymerBase;\n scope.isBase = isBase;\n scope.api.instance.base =
base;\n \n})(Polymer);\n", |
| 48 "/*\n * Copyright 2013 The Polymer Authors. All rights reserved.\n * Use of
this source code is governed by a BSD-style\n * license that can be found in the
LICENSE file.\n */\n(function(scope) {\n\n // imports\n\n var log = window.lo
gFlags || {};\n \n // magic words\n \n var STYLE_SCOPE_ATTRIBUTE = 'element'
;\n var STYLE_CONTROLLER_SCOPE = 'controller';\n \n var styles = {\n STYLE
_SCOPE_ATTRIBUTE: STYLE_SCOPE_ATTRIBUTE,\n /**\n * Installs external styl
esheets and <style> elements with the attribute \n * polymer-scope='controll
er' into the scope of element. This is intended\n * to be a called during cu
stom element construction. Note, this incurs a \n * per instance cost and sh
ould be used sparingly.\n *\n * The need for this type of styling should
go away when the shadowDOM spec\n * addresses these issues:\n * \n
* https://www.w3.org/Bugs/Public/show_bug.cgi?id=21391\n * https://www.w3.or
g/Bugs/Public/show_bug.cgi?id=21390\n * https://www.w3.org/Bugs/Public/show_
bug.cgi?id=21389\n * \n * @param element The custom element instance int
o whose controller (parent)\n * scope styles will be installed.\n * @par
am elementElement The <element> containing controller styles.\n */\n // TO
DO(sorvell): remove when spec issues are addressed\n installControllerStyles:
function() {\n // apply controller styles, but only if they are not yet ap
plied\n var scope = this.findStyleController();\n if (scope && !this.s
copeHasElementStyle(scope, STYLE_CONTROLLER_SCOPE)) {\n // allow inherite
d controller styles\n var proto = getPrototypeOf(this), cssText = '';\n
while (proto && proto.element) {\n cssText += proto.element.cssTe
xtForScope(STYLE_CONTROLLER_SCOPE);\n proto = getPrototypeOf(proto);\n
}\n if (cssText) {\n var style = this.element.cssTextToSc
opeStyle(cssText,\n STYLE_CONTROLLER_SCOPE);\n // TODO(sor
vell): for now these styles are not shimmed\n // but we may need to shi
m them\n Polymer.applyStyleToScope(style, scope);\n }\n }\n
},\n findStyleController: function() {\n if (window.ShadowDOMPolyfil
l) {\n return wrap(document.head);\n } else {\n // find the s
hadow root that contains this element\n var n = this;\n while (n.p
arentNode) {\n n = n.parentNode;\n }\n return n === docum
ent ? document.head : n;\n }\n },\n scopeHasElementStyle: function(sc
ope, descriptor) {\n var rule = STYLE_SCOPE_ATTRIBUTE + '=' + this.localNam
e + '-' + descriptor;\n return scope.querySelector('style[' + rule + ']');\
n }\n };\n \n // NOTE: use raw prototype traversal so that we ensure corre
ct traversal\n // on platforms where the protoype chain is simulated via __prot
o__ (IE10)\n function getPrototypeOf(prototype) {\n return prototype.__proto
__;\n }\n\n // exports\n\n scope.api.instance.styles = styles;\n \n})(Polyme
r);\n", |
| 49 "/*\n * Copyright 2013 The Polymer Authors. All rights reserved.\n * Use of
this source code is governed by a BSD-style\n * license that can be found in the
LICENSE file.\n */\n(function(scope) {\n\n // imports\n\n var extend = scope.
extend;\n var api = scope.api;\n\n // imperative implementation: Polymer()\n\n
// specify an 'own' prototype for tag `name`\n function element(name, prototy
pe) {\n if (getRegisteredPrototype[name]) {\n throw 'Already registered
(Polymer) prototype for element ' + name;\n }\n // cache the prototype\n
registerPrototype(name, prototype);\n // notify the registrar waiting for '
name', if any\n notifyPrototype(name);\n }\n\n // async prototype source\n\
n function waitingForPrototype(name, client) {\n waitPrototype[name] = clien
t;\n }\n\n var waitPrototype = {};\n\n function notifyPrototype(name) {\n
if (waitPrototype[name]) {\n waitPrototype[name].registerWhenReady();\n
delete waitPrototype[name];\n }\n }\n\n // utility and bookkeeping\n\n /
/ maps tag names to prototypes, as registered with\n // Polymer. Prototypes ass
ociated with a tag name\n // using document.registerElement are available from\
n // HTMLElement.getPrototypeForTag().\n // If an element was fully registered
by Polymer, then\n // Polymer.getRegisteredPrototype(name) === \n // HTMLEl
ement.getPrototypeForTag(name)\n\n var prototypesByName = {};\n\n function reg
isterPrototype(name, prototype) {\n return prototypesByName[name] = prototype
|| {};\n }\n\n function getRegisteredPrototype(name) {\n return prototypes
ByName[name];\n }\n\n // exports\n\n scope.getRegisteredPrototype = getRegist
eredPrototype;\n scope.waitingForPrototype = waitingForPrototype;\n\n // names
pace shenanigans so we can expose our scope on the registration \n // function\
n\n // make window.Polymer reference `element()`\n\n window.Polymer = element;
\n\n // TODO(sjmiles): find a way to do this that is less terrible\n // copy w
indow.Polymer properties onto `element()`\n\n extend(Polymer, scope);\n\n // U
nder the HTMLImports polyfill, scripts in the main document\n // do not block o
n imports; we want to allow calls to Polymer in the main\n // document. Platfor
m collects those calls until we can process them, which\n // we do here.\n\n v
ar declarations = Platform.deliverDeclarations();\n if (declarations) {\n fo
r (var i=0, l=declarations.length, d; (i<l) && (d=declarations[i]); i++) {\n
element.apply(null, d);\n }\n }\n\n})(Polymer);\n", |
| 50 "/* \n * Copyright 2013 The Polymer Authors. All rights reserved.\n * Use of
this source code is governed by a BSD-style\n * license that can be found in th
e LICENSE file.\n */\n\n(function(scope) {\n\nvar path = {\n resolveElementPath
s: function(node) {\n Platform.urlResolver.resolveDom(node);\n },\n addReso
lvePathApi: function() {\n // let assetpath attribute modify the resolve path
\n var assetPath = this.getAttribute('assetpath') || '';\n var root = new
URL(assetPath, this.ownerDocument.baseURI);\n this.prototype.resolvePath = fu
nction(urlPath, base) {\n var u = new URL(urlPath, base || root);\n re
turn u.href;\n };\n }\n};\n\n// exports\nscope.api.declaration.path = path;\
n\n})(Polymer);\n", |
| 51 "/*\n * Copyright 2013 The Polymer Authors. All rights reserved.\n * Use of
this source code is governed by a BSD-style\n * license that can be found in the
LICENSE file.\n */\n(function(scope) {\n\n // imports\n\n var log = window.lo
gFlags || {};\n var api = scope.api.instance.styles;\n var STYLE_SCOPE_ATTRIBU
TE = api.STYLE_SCOPE_ATTRIBUTE;\n\n // magic words\n\n var STYLE_SELECTOR = 's
tyle';\n var STYLE_LOADABLE_MATCH = '@import';\n var SHEET_SELECTOR = 'link[re
l=stylesheet]';\n var STYLE_GLOBAL_SCOPE = 'global';\n var SCOPE_ATTR = 'polym
er-scope';\n\n var styles = {\n // returns true if resources are loading\n
loadStyles: function(callback) {\n var content = this.templateContent();\
n if (content) {\n this.convertSheetsToStyles(content);\n }\n
var styles = this.findLoadableStyles(content);\n if (styles.length) {\n
Platform.styleResolver.loadStyles(styles, callback);\n } else if (c
allback) {\n callback();\n }\n },\n convertSheetsToStyles: fun
ction(root) {\n var s$ = root.querySelectorAll(SHEET_SELECTOR);\n for
(var i=0, l=s$.length, s, c; (i<l) && (s=s$[i]); i++) {\n c = createStyle
Element(importRuleForSheet(s, this.ownerDocument.baseURI),\n this.own
erDocument);\n this.copySheetAttributes(c, s);\n s.parentNode.repl
aceChild(c, s);\n }\n },\n copySheetAttributes: function(style, link)
{\n for (var i=0, a$=link.attributes, l=a$.length, a; (a=a$[i]) && i<l; i+
+) {\n if (a.name !== 'rel' && a.name !== 'src') {\n style.setAt
tribute(a.name, a.value);\n }\n }\n },\n findLoadableStyles: f
unction(root) {\n var loadables = [];\n if (root) {\n var s$ =
root.querySelectorAll(STYLE_SELECTOR);\n for (var i=0, l=s$.length, s; (i
<l) && (s=s$[i]); i++) {\n if (s.textContent.match(STYLE_LOADABLE_MATCH
)) {\n loadables.push(s);\n }\n }\n }\n ret
urn loadables;\n },\n /**\n * Install external stylesheets loaded in <
polymer-element> elements into the \n * element's template.\n * @param e
lementElement The <element> element to style.\n */\n // TODO(sorvell): wi
p... caching and styles handling can probably be removed\n // We need a schem
e to ensure stylesheets are eagerly loaded without \n // the creation of an e
lement instance. Here are 2 options for handling this:\n // 1. create a dummy
element with ShadowDOM in dom that includes ALL styles\n // processed here.\
n // 2. place stylesheets outside the element template. This will allow \n
// imports to naturally load the sheets. Then at load time, we can remove\n
// the stylesheet from dom.\n installSheets: function() {\n this.cacheSh
eets();\n this.cacheStyles();\n this.installLocalSheets();\n this
.installGlobalStyles();\n },\n /**\n * Remove all sheets from element
and store for later use.\n */\n cacheSheets: function() {\n this.she
ets = this.findNodes(SHEET_SELECTOR);\n this.sheets.forEach(function(s) {\n
if (s.parentNode) {\n s.parentNode.removeChild(s);\n }\n
});\n },\n cacheStyles: function() {\n this.styles = this.findN
odes(STYLE_SELECTOR + '[' + SCOPE_ATTR + ']');\n this.styles.forEach(functi
on(s) {\n if (s.parentNode) {\n s.parentNode.removeChild(s);\n
}\n });\n },\n /**\n * Takes external stylesheets loaded in
an <element> element and moves\n * their content into a <style> element ins
ide the <element>'s template.\n * The sheet is then removed from the <elemen
t>. This is done only so \n * that if the element is loaded in the main docu
ment, the sheet does\n * not become active.\n * Note, ignores sheets wit
h the attribute 'polymer-scope'.\n * @param elementElement The <element> ele
ment to style.\n */\n installLocalSheets: function () {\n var sheets
= this.sheets.filter(function(s) {\n return !s.hasAttribute(SCOPE_ATTR);
\n });\n var content = this.templateContent();\n if (content) {\n
var cssText = '';\n sheets.forEach(function(sheet) {\n c
ssText += cssTextFromSheet(sheet) + '\\n';\n });\n if (cssText) {\
n var style = createStyleElement(cssText, this.ownerDocument);\n
content.insertBefore(style, content.firstChild);\n }\n }\n },\
n findNodes: function(selector, matcher) {\n var nodes = this.querySelec
torAll(selector).array();\n var content = this.templateContent();\n if
(content) {\n var templateNodes = content.querySelectorAll(selector).arr
ay();\n nodes = nodes.concat(templateNodes);\n }\n return match
er ? nodes.filter(matcher) : nodes;\n },\n templateContent: function() {\n
var template = this.querySelector('template');\n return template && t
emplateContent(template);\n },\n /**\n * Promotes external stylesheets
and <style> elements with the attribute \n * polymer-scope='global' into gl
obal scope.\n * This is particularly useful for defining @keyframe rules whi
ch \n * currently do not function in scoped or shadow style elements.\n
* (See wkb.ug/72462)\n * @param elementElement The <element> element to styl
e.\n */\n // TODO(sorvell): remove when wkb.ug/72462 is addressed.\n in
stallGlobalStyles: function() {\n var style = this.styleForScope(STYLE_GLOB
AL_SCOPE);\n applyStyleToScope(style, document.head);\n },\n cssTextF
orScope: function(scopeDescriptor) {\n var cssText = '';\n // handle s
tylesheets\n var selector = '[' + SCOPE_ATTR + '=' + scopeDescriptor + ']';
\n var matcher = function(s) {\n return matchesSelector(s, selector)
;\n };\n var sheets = this.sheets.filter(matcher);\n sheets.forEa
ch(function(sheet) {\n cssText += cssTextFromSheet(sheet) + '\\n\\n';\n
});\n // handle cached style elements\n var styles = this.styles.f
ilter(matcher);\n styles.forEach(function(style) {\n cssText += styl
e.textContent + '\\n\\n';\n });\n return cssText;\n },\n styleFo
rScope: function(scopeDescriptor) {\n var cssText = this.cssTextForScope(sc
opeDescriptor);\n return this.cssTextToScopeStyle(cssText, scopeDescriptor)
;\n },\n cssTextToScopeStyle: function(cssText, scopeDescriptor) {\n
if (cssText) {\n var style = createStyleElement(cssText);\n style.
setAttribute(STYLE_SCOPE_ATTRIBUTE, this.getAttribute('name') +\n '-'
+ scopeDescriptor);\n return style;\n }\n }\n };\n\n function
importRuleForSheet(sheet, baseUrl) {\n var href = new URL(sheet.getAttribute(
'href'), baseUrl).href;\n return '@import \\'' + href + '\\';'\n }\n\n func
tion applyStyleToScope(style, scope) {\n if (style) {\n // TODO(sorvell)
: necessary for IE\n // see https://connect.microsoft.com/IE/feedback/detai
ls/790212/\n // cloning-a-style-element-and-adding-to-document-produces\n
// -unexpected-result#details\n // var clone = style.cloneNode(true);\n
var clone = createStyleElement(style.textContent);\n var attr = style
.getAttribute(STYLE_SCOPE_ATTRIBUTE);\n if (attr) {\n clone.setAttri
bute(STYLE_SCOPE_ATTRIBUTE, attr);\n }\n scope.appendChild(clone);\n
}\n }\n\n function createStyleElement(cssText, scope) {\n scope = scope |
| document;\n scope = scope.createElement ? scope : scope.ownerDocument;\n
var style = scope.createElement('style');\n style.textContent = cssText;\n
return style;\n }\n\n function cssTextFromSheet(sheet) {\n return (sheet
&& sheet.__resource) || '';\n }\n\n function matchesSelector(node, inSelector)
{\n if (matches) {\n return matches.call(node, inSelector);\n }\n }
\n var p = HTMLElement.prototype;\n var matches = p.matches || p.matchesSelect
or || p.webkitMatchesSelector \n || p.mozMatchesSelector;\n \n // exports
\n\n scope.api.declaration.styles = styles;\n scope.applyStyleToScope = applyS
tyleToScope;\n \n})(Polymer);\n", |
| 52 "/*\n * Copyright 2013 The Polymer Authors. All rights reserved.\n * Use of
this source code is governed by a BSD-style\n * license that can be found in the
LICENSE file.\n */\n\n(function(scope) {\n\n // imports\n\n var log = window.
logFlags || {};\n var api = scope.api.instance.events;\n var EVENT_PREFIX = ap
i.EVENT_PREFIX;\n // polymer-element declarative api: events feature\n\n var e
vents = { \n parseHostEvents: function() {\n // our delegates map\n
var delegates = this.prototype.eventDelegates;\n // extract data from attr
ibutes into delegates\n this.addAttributeDelegates(delegates);\n },\n
addAttributeDelegates: function(delegates) {\n // for each attribute\n
for (var i=0, a; a=this.attributes[i]; i++) {\n // does it have magic m
arker identifying it as an event delegate?\n if (this.hasEventPrefix(a.na
me)) {\n // if so, add the info to delegates\n delegates[this.
removeEventPrefix(a.name)] = a.value.replace('{{', '')\n .replace('
}}', '').trim();\n }\n }\n },\n // starts with 'on-'\n hasE
ventPrefix: function (n) {\n return n && (n[0] === 'o') && (n[1] === 'n') &
& (n[2] === '-');\n },\n removeEventPrefix: function(n) {\n return n.
slice(prefixLength);\n }\n };\n\n var prefixLength = EVENT_PREFIX.length;\n
\n // exports\n scope.api.declaration.events = events;\n\n})(Polymer);", |
| 53 "/*\n * Copyright 2013 The Polymer Authors. All rights reserved.\n * Use of
this source code is governed by a BSD-style\n * license that can be found in the
LICENSE file.\n */\n(function(scope) {\n\n // element api\n\n var properties
= {\n inferObservers: function(prototype) {\n // called before prototype
.observe is chained to inherited object\n var observe = prototype.observe,
property;\n for (var n in prototype) {\n if (n.slice(-7) === 'Change
d') {\n if (!observe) {\n observe = (prototype.observe = {}
);\n }\n property = n.slice(0, -7)\n observe[property
] = observe[property] || n;\n }\n }\n },\n explodeObservers: f
unction(prototype) {\n // called before prototype.observe is chained to inh
erited object\n var o = prototype.observe;\n if (o) {\n var exp
loded = {};\n for (var n in o) {\n var names = n.split(' ');\n
for (var i=0, ni; ni=names[i]; i++) {\n exploded[ni] = o[n];\
n }\n }\n prototype.observe = exploded;\n }\n },\
n optimizePropertyMaps: function(prototype) {\n if (prototype.observe) {
\n // construct name list\n var a = prototype._observeNames = [];\
n for (var n in prototype.observe) {\n var names = n.split(' ');
\n for (var i=0, ni; ni=names[i]; i++) {\n a.push(ni);\n
}\n //a.push(n);\n }\n }\n if (prototype.publish
) {\n // construct name list\n var a = prototype._publishNames = [
];\n for (var n in prototype.publish) {\n a.push(n);\n }\
n }\n },\n publishProperties: function(prototype, base) {\n // i
f we have any properties to publish\n var publish = prototype.publish;\n
if (publish) {\n // transcribe `publish` entries onto own prototype\n
this.requireProperties(publish, prototype, base);\n // construct m
ap of lower-cased property names\n prototype._publishLC = this.lowerCaseM
ap(publish);\n }\n },\n requireProperties: function(properties, proto
type, base) {\n // ensure a prototype value for each property\n for (v
ar n in properties) {\n if (prototype[n] === undefined && base[n] === und
efined) {\n prototype[n] = properties[n];\n }\n }\n },\n
lowerCaseMap: function(properties) {\n var map = {};\n for (var n
in properties) {\n map[n.toLowerCase()] = n;\n }\n return map;\
n }\n };\n\n // exports\n\n scope.api.declaration.properties = properties;
\n\n})(Polymer);\n", |
| 54 "/*\n * Copyright 2013 The Polymer Authors. All rights reserved.\n * Use of
this source code is governed by a BSD-style\n * license that can be found in the
LICENSE file.\n */\n(function(scope) {\n\n // magic words\n\n var ATTRIBUTES_
ATTRIBUTE = 'attributes';\n var ATTRIBUTES_REGEX = /\\s|,/;\n\n // attributes
api\n\n var attributes = {\n inheritAttributesObjects: function(prototype) {
\n // chain our lower-cased publish map to the inherited version\n thi
s.inheritObject(prototype, 'publishLC');\n // chain our instance attributes
map to the inherited version\n this.inheritObject(prototype, '_instanceAtt
ributes');\n },\n publishAttributes: function(prototype, base) {\n //
merge names from 'attributes' attribute\n var attributes = this.getAttribu
te(ATTRIBUTES_ATTRIBUTE);\n if (attributes) {\n // get properties to
publish\n var publish = prototype.publish || (prototype.publish = {});\n
// names='a b c' or names='a,b,c'\n var names = attributes.split(
ATTRIBUTES_REGEX);\n // record each name for publishing\n for (var
i=0, l=names.length, n; i<l; i++) {\n // remove excess ws\n n
= names[i].trim();\n // do not override explicit entries\n if
(n && publish[n] === undefined && base[n] === undefined) {\n publish
[n] = null;\n }\n }\n }\n },\n // record clonable att
ributes from <element>\n accumulateInstanceAttributes: function() {\n //
inherit instance attributes\n var clonable = this.prototype._instanceAttri
butes;\n // merge attributes from element\n var a$ = this.attributes;\
n for (var i=0, l=a$.length, a; (i<l) && (a=a$[i]); i++) { \n if (t
his.isInstanceAttribute(a.name)) {\n clonable[a.name] = a.value;\n
}\n }\n },\n isInstanceAttribute: function(name) {\n return !
this.blackList[name] && name.slice(0,3) !== 'on-';\n },\n // do not clone
these attributes onto instances\n blackList: {\n name: 1,\n 'extend
s': 1,\n constructor: 1,\n noscript: 1,\n assetpath: 1,\n 'c
ache-csstext': 1\n }\n };\n\n // add ATTRIBUTES_ATTRIBUTE to the blacklist\
n attributes.blackList[ATTRIBUTES_ATTRIBUTE] = 1;\n\n // exports\n\n scope.ap
i.declaration.attributes = attributes;\n\n})(Polymer);\n", |
| 55 "/*\n * Copyright 2013 The Polymer Authors. All rights reserved.\n * Use of
this source code is governed by a BSD-style\n * license that can be found in the
LICENSE file.\n */\n(function(scope) {\n\n // imports\n \n var api = scope.a
pi;\n var isBase = scope.isBase;\n var extend = scope.extend;\n\n // prototyp
e api\n\n var prototype = {\n\n register: function(name, extendeeName) {\n
// build prototype combining extendee, Polymer base, and named api\n th
is.buildPrototype(name, extendeeName);\n // register our custom element wit
h the platform\n this.registerPrototype(name, extendeeName);\n // refe
rence constructor in a global named by 'constructor' attribute\n this.publi
shConstructor();\n },\n\n buildPrototype: function(name, extendeeName) {\n
// get our custom prototype (before chaining)\n var extension = scope
.getRegisteredPrototype(name);\n // get basal prototype\n var base = t
his.generateBasePrototype(extendeeName);\n // implement declarative feature
s\n this.desugarBeforeChaining(extension, base);\n // join prototypes\
n this.prototype = this.chainPrototypes(extension, base);\n // more de
clarative features\n this.desugarAfterChaining(name, extendeeName);\n },
\n\n desugarBeforeChaining: function(prototype, base) {\n // back refere
nce declaration element\n // TODO(sjmiles): replace `element` with `element
Element` or `declaration`\n prototype.element = this;\n // transcribe
`attributes` declarations onto own prototype's `publish`\n this.publishAttr
ibutes(prototype, base);\n // `publish` properties to the prototype and to
attribute watch\n this.publishProperties(prototype, base);\n // infer
observers for `observe` list based on method names\n this.inferObservers(pr
ototype);\n // desugar compound observer syntax, e.g. 'a b c' \n this.
explodeObservers(prototype);\n },\n\n chainPrototypes: function(prototype,
base) {\n // chain various meta-data objects to inherited versions\n
this.inheritMetaData(prototype, base);\n // chain custom api to inherited\n
var chained = this.chainObject(prototype, base);\n // x-platform fixu
p\n ensurePrototypeTraversal(chained);\n return chained;\n },\n\n
inheritMetaData: function(prototype, base) {\n // chain observe object to
inherited\n this.inheritObject('observe', prototype, base);\n // chai
n publish object to inherited\n this.inheritObject('publish', prototype, ba
se);\n // chain our lower-cased publish map to the inherited version\n
this.inheritObject('_publishLC', prototype, base);\n // chain our instance
attributes map to the inherited version\n this.inheritObject('_instanceAtt
ributes', prototype, base);\n // chain our event delegates map to the inher
ited version\n this.inheritObject('eventDelegates', prototype, base);\n
},\n\n // implement various declarative features\n desugarAfterChaining: f
unction(name, extendee) {\n // build side-chained lists to optimize iterati
ons\n this.optimizePropertyMaps(this.prototype);\n // install external
stylesheets as if they are inline\n this.installSheets();\n // adjust
any paths in dom from imports\n this.resolveElementPaths(this);\n //
compile list of attributes to copy to instances\n this.accumulateInstanceAt
tributes();\n // parse on-* delegates declared on `this` element\n thi
s.parseHostEvents();\n //\n // install a helper method this.resolvePat
h to aid in \n // setting resource urls. e.g.\n // this.$.image.src =
this.resolvePath('images/foo.png')\n this.addResolvePathApi();\n // un
der ShadowDOMPolyfill, transforms to approximate missing CSS features\n if
(window.ShadowDOMPolyfill) {\n Platform.ShadowCSS.shimStyling(this.templa
teContent(), name, extendee);\n }\n // allow custom element access to
the declarative context\n if (this.prototype.registerCallback) {\n t
his.prototype.registerCallback(this);\n }\n },\n\n // if a named cons
tructor is requested in element, map a reference\n // to the constructor to t
he given symbol\n publishConstructor: function() {\n var symbol = this.g
etAttribute('constructor');\n if (symbol) {\n window[symbol] = this.
ctor;\n }\n },\n\n // build prototype combining extendee, Polymer bas
e, and named api\n generateBasePrototype: function(extnds) {\n var proto
type = this.findBasePrototype(extnds);\n if (!prototype) {\n // crea
te a prototype based on tag-name extension\n var prototype = HTMLElement.
getPrototypeForTag(extnds);\n // insert base api in inheritance chain (if
needed)\n prototype = this.ensureBaseApi(prototype);\n // memoize
this base\n memoizedBases[extnds] = prototype;\n }\n return pr
ototype;\n },\n\n findBasePrototype: function(name) {\n return memoiz
edBases[name];\n },\n\n // install Polymer instance api into prototype cha
in, as needed \n ensureBaseApi: function(prototype) {\n if (prototype.Po
lymerBase) {\n return prototype;\n }\n var extended = Object.cr
eate(prototype);\n // we need a unique copy of base api for each base proto
type\n // therefore we 'extend' here instead of simply chaining\n api.
publish(api.instance, extended);\n // TODO(sjmiles): sharing methods across
prototype chains is\n // not supported by 'super' implementation which opt
imizes\n // by memoizing prototype relationships.\n // Probably we sho
uld have a version of 'extend' that is \n // share-aware: it could study th
e text of each function,\n // look for usage of 'super', and wrap those fun
ctions in\n // closures.\n // As of now, there is only one problematic
method, so \n // we just patch it manually.\n // To avoid re-entrancy
problems, the special super method\n // installed is called `mixinSuper` a
nd the mixin method\n // must use this method instead of the default `super
`.\n this.mixinMethod(extended, prototype, api.instance.mdv, 'bind');\n
// return buffed-up prototype\n return extended;\n },\n\n mixinMeth
od: function(extended, prototype, api, name) {\n var $super = function(args
) {\n return prototype[name].apply(this, args);\n };\n extended
[name] = function() {\n this.mixinSuper = $super;\n return api[nam
e].apply(this, arguments);\n }\n },\n\n // ensure prototype[name] inh
erits from a prototype.prototype[name]\n inheritObject: function(name, protot
ype, base) {\n // require an object\n var source = prototype[name] ||
{};\n // chain inherited properties onto a new object\n prototype[name
] = this.chainObject(source, base[name]);\n },\n\n // register 'prototype'
to custom element 'name', store constructor \n registerPrototype: function(n
ame, extendee) { \n var info = {\n prototype: this.prototype\n
}\n // native element must be specified in extends\n var typeExtension
= this.findTypeExtension(extendee);\n if (typeExtension) {\n info.e
xtends = typeExtension;\n }\n // register the prototype with HTMLEleme
nt for name lookup\n HTMLElement.register(name, this.prototype);\n //
register the custom type\n this.ctor = document.registerElement(name, info)
;\n },\n\n findTypeExtension: function(name) {\n if (name && name.ind
exOf('-') < 0) {\n return name;\n } else {\n var p = this.fin
dBasePrototype(name);\n if (p.element) {\n return this.findTypeE
xtension(p.element.extends);\n }\n }\n }\n\n };\n\n // memoize
base prototypes\n var memoizedBases = {};\n\n // implementation of 'chainObjec
t' depends on support for __proto__\n if (Object.__proto__) {\n prototype.ch
ainObject = function(object, inherited) {\n if (object && inherited && obje
ct !== inherited) {\n object.__proto__ = inherited;\n }\n retur
n object;\n }\n } else {\n prototype.chainObject = function(object, inher
ited) {\n if (object && inherited && object !== inherited) {\n var c
hained = Object.create(inherited);\n object = extend(chained, object);\n
}\n return object;\n }\n }\n\n // On platforms that do not suppor
t __proto__ (versions of IE), the prototype\n // chain of a custom element is s
imulated via installation of __proto__.\n // Although custom elements manages t
his, we install it here so it's\n // available during desugaring.\n function e
nsurePrototypeTraversal(prototype) {\n if (!Object.__proto__) {\n var an
cestor = Object.getPrototypeOf(prototype);\n prototype.__proto__ = ancestor
;\n if (isBase(ancestor)) {\n ancestor.__proto__ = Object.getPrototy
peOf(ancestor);\n }\n }\n }\n\n // exports\n\n api.declaration.protot
ype = prototype;\n\n})(Polymer);\n", |
| 56 "/*\n * Copyright 2013 The Polymer Authors. All rights reserved.\n * Use of
this source code is governed by a BSD-style\n * license that can be found in the
LICENSE file.\n */\n(function(scope) {\n\n var queue = {\n // tell the queu
e to wait for an element to be ready\n wait: function(element, check, go) {\n
if (this.indexOf(element) === -1) {\n this.add(element);\n e
lement.__check = check;\n element.__go = go;\n }\n return (this
.indexOf(element) !== 0);\n },\n add: function(element) {\n //console
.log('queueing', element.name);\n queueForElement(element).push(element);\n
},\n indexOf: function(element) {\n var i = queueForElement(element)
.indexOf(element);\n if (i >= 0 && document.contains(element)) {\n i
+= (HTMLImports.useNative || HTMLImports.ready) ? importQueue.length :\n
1e9;\n }\n return i; \n },\n // tell the queue an element
is ready to be registered\n go: function(element) {\n var readied = this
.remove(element);\n if (readied) {\n readied.__go.call(readied);\n
readied.__check = readied.__go = null;\n this.check();\n }\n
},\n remove: function(element) {\n var i = this.indexOf(element);\n
if (i !== 0) {\n //console.warn('queue order wrong', i);\n retu
rn;\n }\n return queueForElement(element).shift(); \n },\n chec
k: function() {\n // next\n var element = this.nextElement();\n i
f (element) {\n element.__check.call(element);\n }\n if (this.c
anReady()) {\n this.ready();\n return true;\n }\n },\n
nextElement: function() {\n return nextQueued();\n },\n canReady: fun
ction() {\n return !this.waitToReady && this.isEmpty();\n },\n isEmpt
y: function() {\n return !importQueue.length && !mainQueue.length;\n },\
n ready: function() {\n // TODO(sorvell): As an optimization, turn off C
E polyfill upgrading\n // while registering. This way we avoid having to up
grade each document\n // piecemeal per registration and can instead registe
r all elements\n // and upgrade once in a batch. Without this optimization,
upgrade time\n // degrades significantly when SD polyfill is used. This is
mainly because\n // querying the document tree for elements is slow under
the SD polyfill.\n if (CustomElements.ready === false) {\n CustomEle
ments.upgradeDocumentTree(document);\n CustomElements.ready = true;\n
}\n if (readyCallbacks) {\n var fn;\n while (readyCallbacks
.length) {\n fn = readyCallbacks.shift();\n fn();\n }\n
}\n },\n addReadyCallback: function(callback) {\n if (callback)
{\n readyCallbacks.push(callback);\n }\n },\n waitToReady: tr
ue\n };\n\n var importQueue = [];\n var mainQueue = [];\n var readyCallbacks
= [];\n\n function queueForElement(element) {\n return document.contains(el
ement) ? mainQueue : importQueue;\n }\n\n function nextQueued() {\n return
importQueue.length ? importQueue[0] : mainQueue[0];\n }\n\n var polymerReadied
= false; \n\n document.addEventListener('WebComponentsReady', function() {\n
CustomElements.ready = false;\n });\n \n function whenPolymerReady(callback
) {\n queue.waitToReady = true;\n CustomElements.ready = false;\n HTMLI
mports.whenImportsReady(function() {\n queue.addReadyCallback(callback);\n
queue.waitToReady = false;\n queue.check();\n });\n }\n\n // expo
rts\n scope.queue = queue;\n scope.whenPolymerReady = whenPolymerReady;\n})(Po
lymer);\n", |
| 57 "/*\n * Copyright 2013 The Polymer Authors. All rights reserved.\n * Use of
this source code is governed by a BSD-style\n * license that can be found in the
LICENSE file.\n */\n(function(scope) {\n\n var whenPolymerReady = scope.whenPo
lymerReady;\n\n function importElements(elementOrFragment, callback) {\n if
(elementOrFragment) {\n document.head.appendChild(elementOrFragment);\n
whenPolymerReady(callback);\n } else if (callback) {\n callback();\n
}\n }\n\n function importUrls(urls, callback) {\n if (urls && urls.length
) {\n var frag = document.createDocumentFragment();\n for (var i=0
, l=urls.length, url, link; (i<l) && (url=urls[i]); i++) {\n link = doc
ument.createElement('link');\n link.rel = 'import';\n link.hre
f = url;\n frag.appendChild(link);\n }\n importElements(f
rag, callback);\n } else if (callback) {\n callback();\n }\n }\n\n
// exports\n scope.import = importUrls;\n scope.importElements = importElement
s;\n\n})(Polymer);\n", |
| 58 "/*\n * Copyright 2013 The Polymer Authors. All rights reserved.\n * Use of
this source code is governed by a BSD-style\n * license that can be found in the
LICENSE file.\n */\n(function(scope) {\n\n // imports\n\n var extend = scope.
extend;\n var api = scope.api;\n var queue = scope.queue;\n var whenPolymerRe
ady = scope.whenPolymerReady;\n var getRegisteredPrototype = scope.getRegistere
dPrototype;\n var waitingForPrototype = scope.waitingForPrototype;\n\n // decl
arative implementation: <polymer-element>\n\n var prototype = extend(Object.cre
ate(HTMLElement.prototype), {\n\n createdCallback: function() {\n if (th
is.getAttribute('name')) {\n this.init();\n }\n },\n\n init: f
unction() {\n // fetch declared values\n this.name = this.getAttribute
('name');\n this.extends = this.getAttribute('extends');\n // initiate
any async resource fetches\n this.loadResources();\n // register when
all constraints are met\n this.registerWhenReady();\n },\n\n registe
rWhenReady: function() {\n if (this.registered\n || this.waitingForPro
totype(this.name)\n || this.waitingForQueue()\n || this.waitingForRe
sources()) {\n return;\n }\n queue.go(this);\n },\n\n\n
// TODO(sorvell): refactor, this method is private-ish, but it's being\n //
called by the queue object.\n _register: function() {\n //console.log('r
egistering', this.name);\n //console.group('registering', this.name);\n
// warn if extending from a custom element not registered via Polymer\n i
f (isCustomTag(this.extends) && !isRegistered(this.extends)) {\n console.
warn('%s is attempting to extend %s, an unregistered element ' +\n 'o
r one that was not registered with Polymer.', this.name,\n this.exten
ds);\n }\n this.register(this.name, this.extends);\n this.registe
red = true;\n //console.groupEnd();\n },\n\n waitingForPrototype: fun
ction(name) {\n if (!getRegisteredPrototype(name)) {\n // then wait
for a prototype\n waitingForPrototype(name, this);\n // emulate sc
ript if user is not supplying one\n this.handleNoScript(name);\n /
/ prototype not ready yet\n return true;\n }\n },\n\n handleNo
Script: function(name) {\n // if explicitly marked as 'noscript'\n if
(this.hasAttribute('noscript') && !this.noscript) {\n this.noscript = tru
e;\n // TODO(sorvell): CustomElements polyfill awareness:\n // nos
cript elements should upgrade in logical order\n // script injection ensu
res this under native custom elements;\n // under imports + ce polyfills,
scripts run before upgrades.\n // dependencies should be ready at upgrad
e time so register\n // prototype at this time.\n if (window.Custo
mElements && !CustomElements.useNative) {\n Polymer(name);\n } e
lse {\n var script = document.createElement('script');\n scrip
t.textContent = 'Polymer(\\'' + name + '\\');';\n this.appendChild(scri
pt);\n }\n }\n },\n\n waitingForResources: function() {\n
return this._needsResources;\n },\n\n // NOTE: Elements must be queued in
proper order for inheritance/composition\n // dependency resolution. Previou
sly this was enforced for inheritance,\n // and by rule for composition. It's
now entirely by rule.\n waitingForQueue: function() {\n return queue.wa
it(this, this.registerWhenReady, this._register);\n },\n\n loadResources:
function() {\n this._needsResources = true;\n this.loadStyles(function
() {\n this._needsResources = false;\n this.registerWhenReady();\n
}.bind(this));\n }\n\n });\n\n // semi-pluggable APIs \n\n // TODO(s
jmiles): should be fully pluggable (aka decoupled, currently\n // the various p
lugins are allowed to depend on each other directly)\n api.publish(api.declarat
ion, prototype);\n\n // utility and bookkeeping\n\n function isRegistered(name
) {\n return Boolean(HTMLElement.getPrototypeForTag(name));\n }\n\n functio
n isCustomTag(name) {\n return (name && name.indexOf('-') >= 0);\n }\n\n //
exports\n\n scope.getRegisteredPrototype = getRegisteredPrototype;\n \n // b
oot tasks\n\n whenPolymerReady(function() {\n document.body.removeAttribute(
'unresolved');\n document.dispatchEvent(\n new CustomEvent('polymer-read
y', {bubbles: true})\n );\n });\n\n // register polymer-element with docume
nt\n\n document.registerElement('polymer-element', {prototype: prototype});\n\n
})(Polymer);\n" |
| 59 ] |
| 60 } |
OLD | NEW |