Report Overview
Submitted URL
www.uticaod.com/story/sports/2021/01/23/section-iii-has-work-do-after-ny-covid-19-high-risk-high-school-sports-get-ok/6686662002/
IP
151.101.194.62
ASN
#54113 FASTLY
Submitted
2023-01-26 19:40:19
Access
Website Title
Final URL
Tags
urlquery detections
No alerts detected
Detections
urlquery
0
Network Intrusion Detection
1
Threat Detection Systems
0
Domain Summary
Domain / FQDN | Rank | Registered | First Seen | Last Seen | Sent | Received | IP |
---|---|---|---|---|---|---|---|
firefox.settings.services.mozilla.com | 867 | 0001-01-01T00:00:00Z | 0001-01-01T00:00:00Z | 782 B | 2.4 kB | 35.241.9.150 | |
www.gannett-cdn.com | 5472 | 0001-01-01T00:00:00Z | 0001-01-01T00:00:00Z | 3.9 kB | 426 kB | 151.101.2.62 | |
atoms.uticaod.com | unknown | 0001-01-01T00:00:00Z | 0001-01-01T00:00:00Z | 3.2 kB | 37 kB | 151.101.2.62 | |
img-getpocket.cdn.mozilla.net | 1631 | 0001-01-01T00:00:00Z | 0001-01-01T00:00:00Z | 3.2 kB | 62 kB | 34.120.237.76 | |
js-agent.newrelic.com | 378 | 0001-01-01T00:00:00Z | 0001-01-01T00:00:00Z | 374 B | 13 kB | 151.101.130.137 | |
r3.o.lencr.org | 344 | 0001-01-01T00:00:00Z | 0001-01-01T00:00:00Z | 3.0 kB | 8.0 kB | 23.36.77.32 | |
cpt-static.gannettdigital.com | 19569 | 0001-01-01T00:00:00Z | 0001-01-01T00:00:00Z | 39 kB | 612 kB | 151.101.2.62 | |
api.gannett-cdn.com | 21099 | 0001-01-01T00:00:00Z | 0001-01-01T00:00:00Z | 1.9 kB | 8.7 kB | 151.101.130.62 | |
bam.nr-data.net | 630 | 0001-01-01T00:00:00Z | 0001-01-01T00:00:00Z | 1.6 kB | 876 B | 162.247.241.14 | |
content-signature-2.cdn.mozilla.net | 1152 | 0001-01-01T00:00:00Z | 0001-01-01T00:00:00Z | 413 B | 5.9 kB | 34.160.144.191 | |
cdn.cookielaw.org | 502 | 0001-01-01T00:00:00Z | 0001-01-01T00:00:00Z | 3.5 kB | 212 kB | 104.16.149.64 | |
push.services.mozilla.com | 2140 | 0001-01-01T00:00:00Z | 0001-01-01T00:00:00Z | 606 B | 127 B | 34.210.191.84 | |
www.uticaod.com | 166931 | 0001-01-01T00:00:00Z | 0001-01-01T00:00:00Z | 460 B | 914 B | 151.101.130.62 | |
contile.services.mozilla.com | 1114 | 0001-01-01T00:00:00Z | 0001-01-01T00:00:00Z | 333 B | 391 B | 34.117.237.239 | |
eu.uticaod.com | unknown | 0001-01-01T00:00:00Z | 0001-01-01T00:00:00Z | 557 B | 41 kB | 151.101.2.62 | |
cdn.polyfill.io | 2365 | 0001-01-01T00:00:00Z | 0001-01-01T00:00:00Z | 479 B | 755 B | 151.101.193.26 | |
user.uticaod.com | unknown | 0001-01-01T00:00:00Z | 0001-01-01T00:00:00Z | 1.2 kB | 1.9 kB | 151.101.2.62 |
Related reports
Network Intrusion Detection Systems
Suricata /w Emerging Threats Pro
Timestamp | Severity | Source IP | Destination IP | Alert |
---|---|---|---|---|
2023-01-26 19:40:08 | medium | Client IP | 151.101.130.62 |
Threat Detection Systems
OpenPhish
No alerts detected
PhishTank
No alerts detected
Fortinet's Web Filter
No alerts detected
mnemonic secure dns
No alerts detected
Quad9 DNS
No alerts detected
ThreatFox
No alerts detected
JavaScript (86)
URL | Size | First Seen | Last Seen | |
---|---|---|---|---|
http:text/javascript;charset=utf-8,'use%20strict'%3B%2F*global%20IntlMessageFormat%20*%2Fwindow.ga_data.behaviors%3Dwindow.ga_data.behaviors%7C%7C%7B%7D%3B%2F**%20%40polymerBehavior%20window.ga_data.behaviors.GalliumI18n%20*%2Fwindow.ga_data.behaviors.GalliumI18n%3D%7Bproperties%3A%7B%2F**%0A%20%20%20%20%20%20%20%20%20%20%20%20%20*%20The%20language%20used%20for%20translation.%0A%20%20%20%20%20%20%20%20%20%20%20%20%20*%2Flanguage%3A%7Btype%3AString%2Cvalue%3Awindow.ga_data.site.language%7C%7C'en'%7D%2C%2F**%0A%20%20%20%20%20%20%20%20%20%20%20%20%20*%20In%20some%20circumstances%2C%20specific%20overrides%20are%20needed%20per-site.%20This%20is%20where%20you%20define%20that.%0A%20%20%20%20%20%20%20%20%20%20%20%20%20*%20Should%20typically%20be%20a%20site%20code.%20(e.g.%20PCIN)%0A%20%20%20%20%20%20%20%20%20%20%20%20%20*%2Foverrides%3A%7Btype%3AString%2Cvalue%3Awindow.ga_data.site.l10n%7C%7Cnull%7D%2C%2F**%0A%20%20%20%20%20%20%20%20%20%20%20%20%20*%20The%20dictionary%20of%20localized%20messages%20defined%20by%20the%20module%2C%20for%20each%20of%20the%20languages%20that%0A%20%20%20%20%20%20%20%20%20%20%20%20%20*%20are%20going%20to%20be%20used.%20See%20http%3A%2F%2Fformatjs.io%2Fguides%2Fmessage-syntax%2F%20for%0A%20%20%20%20%20%20%20%20%20%20%20%20%20*%20more%20information%20on%20the%20message%20syntax.%0A%20%20%20%20%20%20%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20%20%20%20%20%20%20*%20For%20example%2C%20a%20valid%20dictionary%20would%20be%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20*%20this.l10n%20%3D%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20*%20%20'en'%3A%20%7B%20'greeting'%3A%20'Hello!'%20%7D%2C%20'es'%20%3A%20%7B%20'greeting'%3A%20'Bonjour!'%20%7D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20*%20%7D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20*%2Fl10n%3A%7Btype%3AObject%7D%2C%2F**%0A%20%20%20%20%20%20%20%20%20%20%20%20%20*%20Optional%20dictionary%20of%20user%20defined%20formats%2C%20as%20explained%20here%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20*%20http%3A%2F%2Fformatjs.io%2Fguides%2Fmessage-syntax%2F%23custom-formats%0A%20%20%20%20%20%20%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20%20%20%20%20%20%20*%20For%20example%2C%20a%20valid%20dictionary%20of%20formats%20would%20be%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20*%20this.formats%20%3D%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20*%20%20%20%20number%3A%20%7B%20USD%3A%20%7B%20style%3A%20'currency'%2C%20currency%3A%20'USD'%20%7D%20%7D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20*%20%7D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20*%2Fformats%3A%7Btype%3AObject%2Cvalue%3Afunction%20value()%7Breturn%7B%7D%3B%7D%7D%2C%2F**%0A%20%20%20%20%20%20%20%20%20%20%20%20%20*%20Translates%20a%20string%20to%20the%20current%20%60language%60.%20Any%20parameters%20to%20the%0A%20%20%20%20%20%20%20%20%20%20%20%20%20*%20string%20should%20be%20passed%20in%20order%2C%20as%20follows%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20*%20%60localize(stringKey%2C%20param1Name%2C%20param1Value%2C%20param2Name%2C%20param2Value)%60%0A%20%20%20%20%20%20%20%20%20%20%20%20%20*%2Flocalize%3A%7Btype%3AFunction%2Ccomputed%3A'__computeLocalize(language%2C%20l10n%2C%20formats)'%7D%7D%2C%2F**%0A%20%20%20%20%20%20%20%20*%20Upon%20attachment%2C%20if%20this%20site%20has%20custom%20copy%2C%20lets%20load%20it%20from%20an%20external%20resource.%0A%20%20%20%20%20%20%20%20*%2Fattached%3Afunction%20attached()%7Bif(this.overrides)%7Bthis.loadL10nResources()%3B%7D%7D%2C%2F**%0A%20%20%20%20%20%20%20%20%20*%20Returns%20a%20computed%20%60localize%60%20method%2C%20based%20on%20the%20current%20%60language%60.%0A%20%20%20%20%20%20%20%20%20*%2F__computeLocalize%3Afunction%20__computeLocalize(language%2Cl10n%2Cformats)%7Bvar%20proto%3Dthis.constructor.prototype%3Bthis.__checkLocalizationCache(proto)%3B%2F%2F%20Every%20time%20any%20of%20the%20parameters%20change%2C%20invalidate%20the%20strings%20cache.%0Aproto.__localizationCache.messages%3D%7B%7D%3Breturn%20function()%7Bvar%20key%3Darguments%5B0%5D%3Bif(!key%7C%7C!l10n%7C%7C!language%7C%7C!l10n%5Blanguage%5D)return%3B%2F%2F%20Cache%20the%20key%2Fvalue%20pairs%20for%20the%20same%20language%2C%20so%20that%20we%20don't%0A%2F%2F%20do%20extra%20work%20if%20we're%20just%20reusing%20strings%20across%20an%20application.%0Avar%20translatedValue%3Dl10n%5Blanguage%5D%5Bkey%5D%3Bif(!translatedValue)%7B%2F%2F%20A%20complete%20miss%20happened.%20Return%20empty%20value%20%26%20notify%20the%20console.%0A%2F%2Fconsole.warn('WARNING%3A%20A%20localization%20value%20was%20missing%20for%20component%3A%20'%2C%20this.localName%2C%20'key%3A%20'%2C%20key%2C%20'language%3A%20'%2C%20language)%3B%0Areturn''%3B%7Dvar%20messageKey%3Dkey%2BtranslatedValue%3Bvar%20translatedMessage%3Dproto.__localizationCache.messages%5BmessageKey%5D%3Bif(!translatedMessage)%7BtranslatedMessage%3Dnew%20IntlMessageFormat(translatedValue%2Clanguage%2Cformats)%3Bproto.__localizationCache.messages%5BmessageKey%5D%3DtranslatedMessage%3B%7Dvar%20args%3D%7B%7D%3Bfor(var%20i%3D1%3Bi%3Carguments.length%3Bi%2B%3D2)%7Bargs%5Barguments%5Bi%5D%5D%3Darguments%5Bi%2B1%5D%3B%7Dreturn%20translatedMessage.format(args)%3B%7D%3B%7D%2C%2F**%0A%20%20%20%20%20%20%20%20*%20Fetches%20remote%20l10n%20resource%20from%20the%20CDN.%20If%20multiple%20components%20request%20the%20same%20resource%2C%0A%20%20%20%20%20%20%20%20*%20they'll%20received%20a%20cached%20version.%0A%20%20%20%20%20%20%20%20*%2FloadL10nResources%3Afunction%20loadL10nResources()%7Bvar%20path%3D'https%3A%2F%2Fwww.gannett-cdn.com%2Fgannett-web%2Fconfig%2Fl10n%2F'%2Bthis.overrides%2B'.json'%3Bvar%20proto%3Dthis.constructor.prototype%3Bthis.__checkLocalizationCache(proto)%3B%2F%2F%20If%20the%20global%20ajax%20object%20has%20not%20been%20initialized%2C%20initialize%20and%20cache%20it.%0Avar%20ajax%3Dproto.__localizationCache.ajax%3Bif(!ajax)%7Bajax%3Dproto.__localizationCache.ajax%3Ddocument.createElement('iron-ajax')%3B%7Dvar%20request%3Dproto.__localizationCache.requests%5Bpath%5D%3Bif(!request)%7Bajax.url%3Dpath%3Bvar%20req%3Dajax.generateRequest()%3Breq.completes.then(this.__onRequestResponse.bind(this)%2Cthis.__onRequestError.bind(this))%3B%2F%2F%20Cache%20the%20instance%20so%20that%20it%20can%20be%20reused%20if%20the%20same%20path%20is%20loaded.%0Aproto.__localizationCache.requests%5Bpath%5D%3Dreq%3B%7Delse%7Brequest.completes.then(this.__onRequestResponse.bind(this)%2Cthis.__onRequestError.bind(this))%3B%7D%7D%2C%2F**%0A%20%20%20%20%20%20%20%20*%20If%20we%20fetch%20external%20l10n%2C%20we%20need%20to%20intelligently%20merge%20it%20in%20with%20this%20components%20l10n.%0A%20%20%20%20%20%20%20%20*%20In%20the%20external%20resources%2C%20they%20are%20required%20to%20prefix%20all%20keys%20with%20the%20components%20name%0A%20%20%20%20%20%20%20%20*%20(e.g.%20el-social-sharing)%2C%20so%20%60share-this-page%60%20INSIDE%20the%20component%20matches%0A%20%20%20%20%20%20%20%20*%20with%20%60el-social-sharing.share-this-page%60%20in%20the%20external%20l10n%20file.%0A%20%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20%20*%20We%20only%20perform%20the%20computation%20on%20the%20current%20language.%20Other%20languages%20do%20not%20get%20merged%20in%20for%20performance.%0A%20%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20%20*%20This%20causes%20a%20re-computation%20and%20dirties%20the%20element.%0A%20%20%20%20%20%20%20%20*%2F__onRequestResponse%3Afunction%20__onRequestResponse(event)%7Bvar%20response%3Devent.response%3B%2F%2F%20Deeply%20merge%20the%20response%0Avar%20l10nCache%3Dthis.l10n%7C%7C%7B%7D%3Bfor(var%20elName%20in%20l10nCache%5Bthis.language%5D)%7Bvar%20externalLocalizedResource%3Dresponse%5Bthis.language%5D%5Bthis.localName%2B'.'%2BelName%5D%3Bif(externalLocalizedResource)%7Bl10nCache%5Bthis.language%5D%5BelName%5D%3DexternalLocalizedResource%3B%7D%7D%2F%2F%20Force%20a%20re-compute%20by%20setting%20to%20null%20then%20its%20actual%20new%20value.%0Athis.l10n%3Dnull%3Bthis.l10n%3Dl10nCache%3B%7D%2C__onRequestError%3Afunction%20__onRequestError(event)%7B%2F**%0A%20%20%20%20%20%20%20%20%20%20%20%20%20*%20Uh%20oh!%20There's%20really%20no%20recovering%20from%20this%20error.%20Lets%20just%20try%20our%20best%20with%20what%20we%20have%20%C2%AF%5C_(%E3%83%84)_%2F%C2%AF%0A%20%20%20%20%20%20%20%20%20%20%20%20%20*%20Pray%20that%20the%20component%20has%20all%20the%20needed%20copy.%0A%20%20%20%20%20%20%20%20%20%20%20%20%20*%2F%2F%2F%20console.warn('WARNING%3A%20The%20external%20localization%20resource%20for%20this%20site%20failed.')%3B%0A%7D%2C__checkLocalizationCache%3Afunction%20__checkLocalizationCache(proto)%7B%2F%2F%20do%20nothing%20if%20proto%20is%20undefined.%0Aif(proto%3D%3D%3Dundefined)return%3B%2F%2F%20In%20the%20event%20proto%20not%20have%20__localizationCache%20object%2C%20create%20it.%0Aif(proto%5B'__localizationCache'%5D%3D%3D%3Dundefined)%7Bproto%5B'__localizationCache'%5D%3D%7Brequests%3A%7B%7D%2Cmessages%3A%7B%7D%2Cajax%3Anull%7D%3B%7D%7D%7D%3B%0A%2F%2F%23%20sourceMappingURL%3D..%2F..%2Fmaps%2Fgallium%2Fbehaviors%2Fgallium-i18n.html_script_0.js.map%0A%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Fcpt-static.gannettdigital.com%2Funiversal-web-client%2Fmaster%2Flatest%2Fgallium%2Fbehaviors%2Fgallium-i18n.html.js%0A | 6.2 kB | 2023-03-12 | 2024-01-25 | |
Pretty
Loading... | ||||
http:text/javascript;charset=utf-8,'use%20strict'%3Bvar%20_createClass%3Dfunction()%7Bfunction%20defineProperties(target%2Cprops)%7Bfor(var%20i%3D0%3Bi%3Cprops.length%3Bi%2B%2B)%7Bvar%20descriptor%3Dprops%5Bi%5D%3Bdescriptor.enumerable%3Ddescriptor.enumerable%7C%7Cfalse%3Bdescriptor.configurable%3Dtrue%3Bif(%22value%22in%20descriptor)descriptor.writable%3Dtrue%3BObject.defineProperty(target%2Cdescriptor.key%2Cdescriptor)%3B%7D%7Dreturn%20function(Constructor%2CprotoProps%2CstaticProps)%7Bif(protoProps)defineProperties(Constructor.prototype%2CprotoProps)%3Bif(staticProps)defineProperties(Constructor%2CstaticProps)%3Breturn%20Constructor%3B%7D%3B%7D()%3Bfunction%20_classCallCheck(instance%2CConstructor)%7Bif(!(instance%20instanceof%20Constructor))%7Bthrow%20new%20TypeError(%22Cannot%20call%20a%20class%20as%20a%20function%22)%3B%7D%7Dfunction%20_possibleConstructorReturn(self%2Ccall)%7Bif(!self)%7Bthrow%20new%20ReferenceError(%22this%20hasn't%20been%20initialised%20-%20super()%20hasn't%20been%20called%22)%3B%7Dreturn%20call%26%26(typeof%20call%3D%3D%3D%22object%22%7C%7Ctypeof%20call%3D%3D%3D%22function%22)%3Fcall%3Aself%3B%7Dfunction%20_inherits(subClass%2CsuperClass)%7Bif(typeof%20superClass!%3D%3D%22function%22%26%26superClass!%3D%3Dnull)%7Bthrow%20new%20TypeError(%22Super%20expression%20must%20either%20be%20null%20or%20a%20function%2C%20not%20%22%2Btypeof%20superClass)%3B%7DsubClass.prototype%3DObject.create(superClass%26%26superClass.prototype%2C%7Bconstructor%3A%7Bvalue%3AsubClass%2Cenumerable%3Afalse%2Cwritable%3Atrue%2Cconfigurable%3Atrue%7D%7D)%3Bif(superClass)Object.setPrototypeOf%3FObject.setPrototypeOf(subClass%2CsuperClass)%3AsubClass.__proto__%3DsuperClass%3B%7Dwindow.ga_data.mixins%3Dwindow.ga_data.mixins%7C%7C%7B%7D%3Bwindow.ga_data.mixins.VideoUtils%3DPolymer.dedupingMixin(function(superclass)%7Breturn%20function(_superclass)%7B_inherits(_class%2C_superclass)%3Bfunction%20_class()%7B_classCallCheck(this%2C_class)%3Bvar%20_this%3D_possibleConstructorReturn(this%2C(_class.__proto__%7C%7CObject.getPrototypeOf(_class)).call(this))%3B_this.markers%3D%7B%7D%3B_this.Deferred%3Dfunction()%7Bfunction%20_class2(timeout)%7Bvar%20_this2%3Dthis%3B_classCallCheck(this%2C_class2)%3Bthis.isResolved%3Dfalse%3Bthis.timeout%3Dtimeout%3Ftimeout%3Anull%3Bthis.promise%3Dnew%20Promise(function(resolve%2Creject)%7B_this2.resolve%3Dresolve%3B_this2.reject%3Dreject%3Bif(timeout)%7BsetTimeout(function()%7Bresolve()%3B%7D%2Ctimeout)%3B%7D%7D)%3Bthis.promise.then(function()%7B_this2.isResolved%3Dtrue%3B%7D)%3B%7Dreturn%20_class2%3B%7D()%3Breturn%20_this%3B%7D_createClass(_class%2C%5B%7Bkey%3A'log'%2Cvalue%3Afunction%20log(msg)%7Bif(this.getUrlParamValue('snow_debug'))%7Bconsole.log(typeof%20msg%3D%3D%3D'string'%3Fmsg%3D'%5BMEDIA%20VIDEO%5D%20'%2Bmsg%3Amsg)%3B%2F%2F%20eslint-disable-line%20no-console%0A%7D%7D%7D%2C%7Bkey%3A'_registerEvents'%2Cvalue%3Afunction%20_registerEvents(context%2Cevents%2Csubject)%7Bvar%20_this3%3Dthis%3Bif(events%26%26events.length%26%26subject)%7Bevents.forEach(function(item)%7Bif(item.handler%7C%7Citem.track%7C%7Citem.log)%7Bsubject.addEventListener(item.event%2Cfunction(e)%7Bif(item.log)%7B_this3.log(e.type)%3Bif(e.getError)_this3.log(e.getError().toString())%3B%7Dif(item.track)_this3.track(%7Bevent%3Ae.type%7D)%3B%2F%2Ftrack%20in%20NR%0Aif(item.handler)item.handler.call(context%2Ce)%3Bif(item.broadcast)_this3.broadcast('media-video-event'%2C%7Bevent%3Ae.type%2Cvideo%3A_this3%7D)%3B%7D)%3B%7D%7D)%3B%7D%7D%7D%2C%7Bkey%3A'track'%2Cvalue%3Afunction%20track(toTrack)%7Bvar%20_this4%3Dthis%3Bvar%20details%3Darguments.length%3E1%26%26arguments%5B1%5D!%3D%3Dundefined%3Farguments%5B1%5D%3A%7B%7D%3Bga_data.utils.isEUuserRestrictedAccess().then(function(tcData)%7Bvar%20choices%3Dga_data.utils.getPrivacyChoices()%3Bif(tcData.gdprApplies%26%26choices.performance!%3D%3Dtrue)return%3B%2F%2F%20No%20newrelic%20track%20for%20EU%20restricted%20delivery%0Aif(toTrack%26%26window.newrelic%26%26window.newrelic.addPageAction)%7Bwindow.newrelic.addPageAction('snowPlayer'%2CObject.assign(%7Btype%3AtoTrack%2Cplacement%3A_this4.placement%2Cdomain%3Awindow.location.hostname%2CplaybackIndex%3A_this4.playbackIndex%7D%2Cdetails))%3B%7D%7D)%3B%7D%7D%2C%7Bkey%3A'markStart'%2Cvalue%3Afunction%20markStart(tag)%7Bif(tag)this.markers%5Btag%5D%3Dperformance.now()%3B%7D%7D%2C%7Bkey%3A'markEnd'%2Cvalue%3Afunction%20markEnd(tag)%7Bvar%20details%3Darguments.length%3E1%26%26arguments%5B1%5D!%3D%3Dundefined%3Farguments%5B1%5D%3A%7B%7D%3Bvar%20persist%3Darguments.length%3E2%26%26arguments%5B2%5D!%3D%3Dundefined%3Farguments%5B2%5D%3Afalse%3Bif(tag%26%26this.markers%5Btag%5D)%7Bthis.track(tag%2CObject.assign(%7BtimeElapsed%3AparseFloat(((performance.now()-this.markers%5Btag%5D)%2F1000).toFixed(3))%7D%2Cdetails))%3Bif(!persist)this.clearMark(tag)%3B%7D%7D%7D%2C%7Bkey%3A'clearMark'%2Cvalue%3Afunction%20clearMark(tag)%7Bif(tag%26%26this.markers%5Btag%5D)delete%20this.markers%5Btag%5D%3B%7D%7D%2C%7Bkey%3A'getSeconds'%2Cvalue%3Afunction%20getSeconds(duration)%7Bvar%20seconds%3Dvoid%200%3Bif(duration)%7Btry%7Bvar%20hms%3Dduration%2ChmsArray%3Dhms.split('%3A')%2ChmsLength%3DhmsArray.length%3Bif(hmsLength%3C%3D2)hmsArray.unshift('00')%3Bvar%20time%3DhmsArray.map(function(n)%7Breturn%20parseInt(n)%3B%7D)%3Bseconds%3Dtime%5B0%5D*60*60%2Btime%5B1%5D*60%2Btime%5B2%5D%3B%7Dcatch(err)%7Bseconds%3D0%3B%7D%7Dreturn%20seconds%3B%7D%7D%2C%7Bkey%3A'formatTime'%2Cvalue%3Afunction%20formatTime(time)%7Bif(!time)return'0%3A00'%3Bvar%20hours%3DMath.floor(time%2F3600)%2Cminutes%3DMath.floor(time%2F60%2560)%2Cseconds%3DMath.floor(time%2560)%3Bif(seconds%3C10)seconds%3D'0'%2Bseconds%3Bif(hours%3E0)%7Bif(minutes%3C10)minutes%3D'0'%2Bminutes%3Breturn%20hours%2B'%3A'%2Bminutes%2B'%3A'%2Bseconds%3B%7Delse%7Breturn%20minutes%2B'%3A'%2Bseconds%3B%7D%7D%7D%2C%7Bkey%3A'sstsToString'%2Cvalue%3Afunction%20sstsToString(sstsObj)%7Bvar%20section%3DsstsObj.section%2Csubsection%3DsstsObj.subsection%2Csubtopic%3DsstsObj.subtopic%2Ctopic%3DsstsObj.topic%2CsstsArray%3D%5Bsection%2Csubsection%2Csubtopic%2Ctopic%5D%3Breturn%20sstsArray.filter(String).join('%2F')%3B%7D%7D%2C%7Bkey%3A'broadcast'%2Cvalue%3Afunction%20broadcast(name)%7Bvar%20details%3Darguments.length%3E1%26%26arguments%5B1%5D!%3D%3Dundefined%3Farguments%5B1%5D%3A''%3Bif(name)%7Bvar%20options%3D%7Bbubbles%3Atrue%2Ccomposed%3Atrue%2Cdetail%3Adetails%7D%3Bthis.dispatchEvent(new%20CustomEvent(name%2Coptions))%3B%7D%7D%7D%2C%7Bkey%3A'throttle'%2Cvalue%3Afunction%20throttle(func%2Cwait%2Coptions)%7Bvar%20context%3Dvoid%200%2Cargs%3Dvoid%200%2Cresult%3Dvoid%200%2Clater%3Dvoid%200%2Ctimeout%3Dnull%2Cprevious%3D0%3Bif(!options)options%3D%7B%7D%3Blater%3Dfunction%20later()%7Bprevious%3Doptions.leading%3D%3D%3Dfalse%3F0%3ADate.now()%3Btimeout%3Dnull%3Bresult%3Dfunc.apply(context%2Cargs)%3Bif(!timeout)context%3Dargs%3Dnull%3B%7D%3Breturn%20function()%7Bvar%20remaining%3Dvoid%200%2Cnow%3DDate.now()%3Bif(!previous%26%26options.leading%3D%3D%3Dfalse)previous%3Dnow%3Bremaining%3Dwait-(now-previous)%3Bcontext%3Dthis%3B%2F%2Feslint-disable-line%20no-invalid-this%0Aargs%3Darguments%3Bif(remaining%3C%3D0%7C%7Cremaining%3Ewait)%7Bif(timeout)%7BclearTimeout(timeout)%3Btimeout%3Dnull%3B%7Dprevious%3Dnow%3Bresult%3Dfunc.apply(context%2Cargs)%3Bif(!timeout)context%3Dargs%3Dnull%3B%7Delse%20if(!timeout%26%26options.trailing!%3D%3Dfalse)%7Btimeout%3DsetTimeout(later%2Cremaining)%3B%7Dreturn%20result%3B%7D%3B%7D%7D%2C%7Bkey%3A'loadScript'%2Cvalue%3Afunction%20loadScript(url%2Cid)%7B%2F%2F%20prevent%20duplicate%20script%20loads%0Aif(document.getElementById(id))%7Breturn%20Promise.resolve(url)%3B%7Dreturn%20new%20Promise(function(resolve%2Creject)%7Bvar%20element%3Ddocument.createElement('script')%3Belement.id%3Did%3Belement.async%3Dtrue%3Belement.src%3Durl%3B%2F%2F%20Important%20success%20and%20error%20for%20the%20promise%0Aelement.onload%3Dfunction()%7Bresolve(url)%3B%7D%3Belement.onerror%3Dfunction(e)%7Breject(e)%3B%7D%3Bdocument.body.appendChild(element)%3B%7D)%3B%7D%2F**%0A%20%20%20%20%20%20%20%20%20*%20Simple%20json%20retriever%0A%20%20%20%20%20%20%20%20%20*%20%40param%20url%20-%20url%20to%20fetch%20JSON%20from%0A%20%20%20%20%20%20%20%20%20*%20%40returns%20%7BPromise%7D%0A%20%20%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'request'%2Cvalue%3Afunction%20request(url)%7Breturn%20fetch(url).then(function(response)%7Breturn%20response.json().then(function(json)%7Breturn%20response.ok%3Fjson%3APromise.reject(json)%3B%7D)%3B%7D)%3B%7D%7D%2C%7Bkey%3A'getNested'%2Cvalue%3Afunction%20getNested(obj)%7Bif(obj)%7Bfor(var%20_len%3Darguments.length%2Cpath%3DArray(_len%3E1%3F_len-1%3A0)%2C_key%3D1%3B_key%3C_len%3B_key%2B%2B)%7Bpath%5B_key-1%5D%3Darguments%5B_key%5D%3B%7Dreturn%20path.reduce(function(obj%2Carg)%7Breturn%20obj%26%26obj%5Barg%5D%3B%7D%2Cobj)%3B%7Dreturn%20undefined%3B%7D%7D%2C%7Bkey%3A'getLocation'%2Cvalue%3Afunction%20getLocation(assetUrl)%7Bvar%20qsp%3Dvoid%200%2CvirtualPath%3Dvoid%200%2CvirtualHost%3Dvoid%200%3Btry%7Bvar%20url%3Dnew%20URL(assetUrl)%3Bqsp%3Durl.search%3BvirtualPath%3Durl.pathname%3BvirtualHost%3Durl.host%3B%7Dcatch(e)%7Bqsp%3Dwindow.location.search%3BvirtualPath%3Dwindow.location.pathname%3BvirtualHost%3Dwindow.location.host%3B%7Dreturn%7B'host'%3AvirtualHost%2C'path'%3AvirtualPath%2C'qsp'%3Aqsp%7D%3B%7D%7D%2C%7Bkey%3A'getUrlParamValue'%2Cvalue%3Afunction%20getUrlParamValue(key)%7Bvar%20value%3DdecodeURI((new%20RegExp('%5B%5C%5C%3F%26%5D'%2Bkey%2B'%3D(%5B%5E%26%23%5D*)'%2C'i').exec(window.location.search)%7C%7C%5B''%2C'false'%5D)%5B1%5D)%3Bif(value%3D%3D%3D'false')%7Breturn%20false%3B%7Delse%20if(value%3D%3D%3D'true')%7Breturn%20true%3B%7Dreturn%20value%3B%7D%7D%2C%7Bkey%3A'loadAndWaitForInit'%2Cvalue%3Afunction%20loadAndWaitForInit(scriptUrl%2Cid%2Ckey)%7Bvar%20_this5%3Dthis%3Breturn%20new%20Promise(function(resolve%2Creject)%7B_this5.loadScript(scriptUrl%2Cid).then(function()%7Breturn%20_this5.waitForInit(key).then(resolve%2Creject)%3B%7D%2Cfunction()%7Breturn%20reject()%3B%7D)%3B%7D)%3B%7D%7D%2C%7Bkey%3A'waitForInit'%2Cvalue%3Afunction%20waitForInit(key)%7Bvar%20_this6%3Dthis%3Bvar%20timeout%3Darguments.length%3E1%26%26arguments%5B1%5D!%3D%3Dundefined%3Farguments%5B1%5D%3A2000%3Breturn%20new%20Promise(function(resolve%2Creject)%7Bif(window%5Bkey%5D)%7Bresolve()%3Breturn%3B%7Dvar%20initInterval%3DsetInterval(function()%7Bif(window%5Bkey%5D)%7BclearInterval(initInterval)%3Bresolve()%3B%7D%7D%2C10)%3BsetTimeout(function()%7BclearInterval(initInterval)%3Bif(window%5Bkey%5D)%7B_this6.log(key%2B'%20initialized')%3Bresolve()%3B%7Delse%7B_this6.log(key%2B'%20failed%20to%20initialize')%3Breject()%3B%7D%7D%2Ctimeout)%3B%7D)%3B%7D%7D%2C%7Bkey%3A'cstToObj'%2Cvalue%3Afunction%20cstToObj(cst)%7Bvar%20list%3Dcst.split('%2F')%3Breturn%7Bsection%3Alist%5B0%5D%7C%7C''%2Csubsection%3Alist%5B1%5D%7C%7C''%2Ctopic%3Alist%5B2%5D%7C%7C''%7D%3B%7D%7D%2C%7Bkey%3A'joinStrings'%2Cvalue%3Afunction%20joinStrings(string1%2Cstring2)%7Bvar%20s1%3Dstring1%3Fstring1.toLowerCase()%3A''%2Cs2%3Dstring2%3Fstring2.toLowerCase()%3A''%2Clist%3D%5B%5D%3Bif(s1%3D%3D%3Ds2)return%20s1%3Bif(s1)list.push(s1)%3Bif(s2)list.push(s2)%3Breturn%20list.join()%3B%7D%7D%2C%7Bkey%3A'getStorage'%2Cvalue%3Afunction%20getStorage(name)%7Bif(!window.localStorage)return%3Breturn%20window.localStorage.getItem(name)%7C%7C''%3B%7D%7D%2C%7Bkey%3A'removeStorage'%2Cvalue%3Afunction%20removeStorage(name)%7Bif(!window.localStorage)return%3Bif(this.getStorage(name))window.localStorage.removeItem(name)%3B%7D%7D%2C%7Bkey%3A'setStorage'%2Cvalue%3Afunction%20setStorage(name%2Cvalue)%7Bif(!window.localStorage)return%3Bwindow.localStorage.setItem(name%2Cvalue)%3B%7D%2F**%0A%20%20%20%20%20%20%20%20%20*%20user%20agent%0A%20%20%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'isAndroid'%2Cget%3Afunction%20get()%7Bif(!this._isAndroid)this._isAndroid%3D%2FAndroid%2F.test(navigator.userAgent)%26%26!window.MSStream%3Breturn%20this._isAndroid%3B%7D%7D%2C%7Bkey%3A'isIphone'%2Cget%3Afunction%20get()%7Bif(!this._isIphone)this._isIphone%3D%2FiPhone%7CiPod%2F.test(navigator.userAgent)%26%26!window.MSStream%3Breturn%20this._isIphone%3B%7D%7D%2C%7Bkey%3A'isIpad'%2Cget%3Afunction%20get()%7Bif(!this._isIPad)this._isIPad%3D%2FiPad%2F.test(navigator.userAgent)%26%26!window.MSStream%3Breturn%20this._isIPad%3B%7D%7D%2C%7Bkey%3A'isIOS'%2Cget%3Afunction%20get()%7Bif(!this._isIOS)this._isIOS%3D%2FiPhone%7CiPod%7CiPad%2F.test(navigator.userAgent)%26%26!window.MSStream%3Breturn%20this._isIOS%3B%7D%7D%2C%7Bkey%3A'isSafari'%2Cget%3Afunction%20get()%7Bif(!this._isSafari)this._isSafari%3D%2FSafari%2F.test(navigator.userAgent)%26%26!%2FChrome%2F.test(navigator.userAgent)%3Breturn%20this._isSafari%3B%7D%7D%2C%7Bkey%3A'isIE'%2Cget%3Afunction%20get()%7Bif(!this._isIE)this._isIE%3D%2Fmsie%5Cs%7Ctrident%5C%2F%7Cedge%5C%2F%2Fi.test(navigator.userAgent)%3Breturn%20this._isIE%3B%7D%7D%2C%7Bkey%3A'isMobile'%2Cget%3Afunction%20get()%7Breturn%20this.isAndroid%7C%7Cthis.isIOS%3B%7D%7D%5D)%3Breturn%20_class%3B%7D(superclass)%3B%7D)%3B%0A%2F%2F%23%20sourceMappingURL%3D..%2F..%2Fmaps%2Fgallium%2Fmixins%2Fvideo-utils.html_script_0.js.map%0A%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Fcpt-static.gannettdigital.com%2Funiversal-web-client%2Fmaster%2Flatest%2Fgallium%2Fmixins%2Fvideo-utils.html.js%0A | 10 kB | 2023-03-13 | 2024-01-25 | |
Pretty
Loading... | ||||
cpt-static.gannettdigital.com/universal-web-client/master/latest/vendor/adobe/VisitorAPI.js | 46 kB | 2023-03-13 | 2024-01-25 | |
Pretty
Loading... | ||||
eu.uticaod.com/story/sports/2021/01/23/section-iii-has-work-do-after-ny-covid-19-high-risk-high-school-sports-get-ok/6686662002/ | 18 kB | 2023-03-07 | 2023-03-13 | |
Pretty
Loading... | ||||
atoms.uticaod.com/atoms-components/prod/dist/gannett-atoms-components/p-07e64061.js | 3.5 kB | 2023-03-08 | 2023-12-29 | |
Pretty
Loading... | ||||
http:text/javascript;charset=utf-8,%2F%2F%20bc%0APolymer.Base%3DPolymer.LegacyElementMixin(HTMLElement).prototype%3B%2F%2F%20NOTE%3A%20this%20is%20here%20for%20modulizer%20to%20export%20%60html%60%20for%20the%20module%20version%20of%20this%20file%0APolymer.html%3DPolymer.html%3B%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Fcpt-static.gannettdigital.com%2Funiversal-web-client%2Fmaster%2Flatest%2Fvendor%2Fcomponents%2Fpolymer%2Fpolymer.html.js%0A | 314 B | 2023-03-07 | 2024-01-25 | |
Pretty
Loading... | ||||
cpt-static.gannettdigital.com/universal-web-client/master/latest/vendor/components/intl-messageformat/dist/intl-messageformat.min.js | 16 kB | 2023-03-12 | 2024-02-06 | |
Pretty
Loading... | ||||
http:text/javascript;charset=utf-8,'use%20strict'%3B%2F**%0A%20%20%20%20%20*%20Base%20Gallium%20framework%20behavior.%0A%20%20%20%20%20*%20Adds%20a%20%60frameworkReady%60%20lifecycle%20method%20that%20is%20called%20when%20the%20global%20Gallium%20class%20is%20ready%0A%20%20%20%20%20*%20Adds%20helper%20methods%20for%20getting%20current%20User's%20Firefly%20paywall%20status%20data%0A%20%20%20%20%20*%20%3F%3F%3F%0A%20%20%20%20%20*%20Profit!%0A%20%20%20%20%20*%2Fwindow.ga_data.behaviors%3Dwindow.ga_data.behaviors%7C%7C%7B%7D%3B%2F**%20%40polymerBehavior%20window.ga_data.behaviors.GalliumElement%20*%2Fwindow.ga_data.behaviors.GalliumElement%3D%7Bready%3Afunction%20ready()%7Bvar%20_this%3Dthis%3Bif(window.Gallium)%7Bthis.frameworkReady()%3B%7Delse%7Bwindow.addEventListener('ga-init'%2Cfunction()%7B_this.frameworkReady()%3B%7D)%3B%7D%7D%2CframeworkReady%3Afunction%20frameworkReady()%7B%2F%2F%20Override%20in%20element%0A%7D%2C%2F**%0A%20%20%20%20%20%20%20%20%20*%20Get%20user%20state%20from%20Firefly%20cookie%0A%20%20%20%20%20%20%20%20%20*%20%0A%20%20%20%20%20%20%20%20%20*%20TODO%3A%20Add%20more%20data%20validation%20as%20done%20in%20https%3A%2F%2Fgithub.com%2FGannettDigital%2Fweb-standard-apps%2Fblob%2Fmaster%2Fusers%2Fstatic%2Fjs%2Fthird-party-apis%2Ffirefly%2Ffirefly.js%23L82%0A%20%20%20%20%20%20%20%20%20*%2F_getUserFireflyState%3Afunction%20_getUserFireflyState()%7Bvar%20fireflyCookie%3Dga_data.utils%3Fga_data.utils.readCookie('firefly_akamai_open')%7C%7C''%3A''%3Bvar%20fireflyValue%3Dnull%3Bif(fireflyCookie)%7Btry%7BfireflyValue%3DJSON.parse(atob(fireflyCookie))%3B%7Dcatch(e)%7Bif(window.newrelic)window.newrelic.noticeError(e)%3B%7D%7Dreturn%20fireflyValue%3B%7D%7D%3B%0A%2F%2F%23%20sourceMappingURL%3D..%2F..%2Fmaps%2Fgallium%2Fbehaviors%2Fgallium-element.html_script_0.js.map%0A%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Fcpt-static.gannettdigital.com%2Funiversal-web-client%2Fmaster%2Flatest%2Fgallium%2Fbehaviors%2Fgallium-element.html.js%0A | 1.4 kB | 2023-03-12 | 2024-01-25 | |
Pretty
Loading... | ||||
cpt-static.gannettdigital.com/universal-web-client/master/latest/core/scripts/partner.js | 70 kB | 2023-03-13 | 2023-03-13 | |
Pretty
Loading... | ||||
atoms.uticaod.com/atoms-components/prod/dist/gannett-atoms-components/p-5ac45bac.entry.js | 12 kB | 2023-03-08 | 2023-12-29 | |
Pretty
Loading... | ||||
http:text/javascript;charset=utf-8,var%20_createClass%3Dfunction()%7Bfunction%20defineProperties(target%2Cprops)%7Bfor(var%20i%3D0%3Bi%3Cprops.length%3Bi%2B%2B)%7Bvar%20descriptor%3Dprops%5Bi%5D%3Bdescriptor.enumerable%3Ddescriptor.enumerable%7C%7Cfalse%3Bdescriptor.configurable%3Dtrue%3Bif(%22value%22in%20descriptor)descriptor.writable%3Dtrue%3BObject.defineProperty(target%2Cdescriptor.key%2Cdescriptor)%3B%7D%7Dreturn%20function(Constructor%2CprotoProps%2CstaticProps)%7Bif(protoProps)defineProperties(Constructor.prototype%2CprotoProps)%3Bif(staticProps)defineProperties(Constructor%2CstaticProps)%3Breturn%20Constructor%3B%7D%3B%7D()%3Bvar%20_get%3Dfunction%20get(object%2Cproperty%2Creceiver)%7Bif(object%3D%3D%3Dnull)object%3DFunction.prototype%3Bvar%20desc%3DObject.getOwnPropertyDescriptor(object%2Cproperty)%3Bif(desc%3D%3D%3Dundefined)%7Bvar%20parent%3DObject.getPrototypeOf(object)%3Bif(parent%3D%3D%3Dnull)%7Breturn%20undefined%3B%7Delse%7Breturn%20get(parent%2Cproperty%2Creceiver)%3B%7D%7Delse%20if(%22value%22in%20desc)%7Breturn%20desc.value%3B%7Delse%7Bvar%20getter%3Ddesc.get%3Bif(getter%3D%3D%3Dundefined)%7Breturn%20undefined%3B%7Dreturn%20getter.call(receiver)%3B%7D%7D%3Bfunction%20_classCallCheck(instance%2CConstructor)%7Bif(!(instance%20instanceof%20Constructor))%7Bthrow%20new%20TypeError(%22Cannot%20call%20a%20class%20as%20a%20function%22)%3B%7D%7Dfunction%20_possibleConstructorReturn(self%2Ccall)%7Bif(!self)%7Bthrow%20new%20ReferenceError(%22this%20hasn't%20been%20initialised%20-%20super()%20hasn't%20been%20called%22)%3B%7Dreturn%20call%26%26(typeof%20call%3D%3D%3D%22object%22%7C%7Ctypeof%20call%3D%3D%3D%22function%22)%3Fcall%3Aself%3B%7Dfunction%20_inherits(subClass%2CsuperClass)%7Bif(typeof%20superClass!%3D%3D%22function%22%26%26superClass!%3D%3Dnull)%7Bthrow%20new%20TypeError(%22Super%20expression%20must%20either%20be%20null%20or%20a%20function%2C%20not%20%22%2Btypeof%20superClass)%3B%7DsubClass.prototype%3DObject.create(superClass%26%26superClass.prototype%2C%7Bconstructor%3A%7Bvalue%3AsubClass%2Cenumerable%3Afalse%2Cwritable%3Atrue%2Cconfigurable%3Atrue%7D%7D)%3Bif(superClass)Object.setPrototypeOf%3FObject.setPrototypeOf(subClass%2CsuperClass)%3AsubClass.__proto__%3DsuperClass%3B%7D(function()%7B'use%20strict'%3B%2F**%0A%20%20%20*%20Creates%20a%20copy%20of%20%60props%60%20with%20each%20property%20normalized%20such%20that%0A%20%20%20*%20upgraded%20it%20is%20an%20object%20with%20at%20least%20a%20type%20property%20%7B%20type%3A%20Type%7D.%0A%20%20%20*%0A%20%20%20*%20%40param%20%7BObject%7D%20props%20Properties%20to%20normalize%0A%20%20%20*%20%40return%20%7BObject%7D%20Copy%20of%20input%20%60props%60%20with%20normalized%20properties%20that%0A%20%20%20*%20are%20in%20the%20form%20%7Btype%3A%20Type%7D%0A%20%20%20*%20%40private%0A%20%20%20*%2Ffunction%20normalizeProperties(props)%7Bvar%20output%3D%7B%7D%3Bfor(var%20p%20in%20props)%7Bvar%20o%3Dprops%5Bp%5D%3Boutput%5Bp%5D%3Dtypeof%20o%3D%3D%3D'function'%3F%7Btype%3Ao%7D%3Ao%3B%7Dreturn%20output%3B%7D%2F**%0A%20%20%20*%20Mixin%20that%20provides%20a%20minimal%20starting%20point%20to%20using%20the%20PropertiesChanged%0A%20%20%20*%20mixin%20by%20providing%20a%20mechanism%20to%20declare%20properties%20in%20a%20static%0A%20%20%20*%20getter%20(e.g.%20static%20get%20properties()%20%7B%20return%20%7B%20foo%3A%20String%20%7D%20%7D).%20Changes%0A%20%20%20*%20are%20reported%20via%20the%20%60_propertiesChanged%60%20method.%0A%20%20%20*%0A%20%20%20*%20This%20mixin%20provides%20no%20specific%20support%20for%20rendering.%20Users%20are%20expected%0A%20%20%20*%20to%20create%20a%20ShadowRoot%20and%20put%20content%20into%20it%20and%20update%20it%20in%20whatever%0A%20%20%20*%20way%20makes%20sense.%20This%20can%20be%20done%20in%20reaction%20to%20properties%20changing%20by%0A%20%20%20*%20implementing%20%60_propertiesChanged%60.%0A%20%20%20*%0A%20%20%20*%20%40mixinFunction%0A%20%20%20*%20%40polymer%0A%20%20%20*%20%40appliesMixin%20Polymer.PropertiesChanged%0A%20%20%20*%20%40memberof%20Polymer%0A%20%20%20*%20%40summary%20Mixin%20that%20provides%20a%20minimal%20starting%20point%20for%20using%0A%20%20%20*%20the%20PropertiesChanged%20mixin%20by%20providing%20a%20declarative%20%60properties%60%20object.%0A%20%20%20*%2FPolymer.PropertiesMixin%3DPolymer.dedupingMixin(function(superClass)%7B%2F**%0A%20%20%20%20%20*%20%40constructor%0A%20%20%20%20%20*%20%40extends%20%7BsuperClass%7D%0A%20%20%20%20%20*%20%40implements%20%7BPolymer_PropertiesChanged%7D%0A%20%20%20%20%20*%20%40private%0A%20%20%20%20%20*%2Fvar%20base%3DPolymer.PropertiesChanged(superClass)%3B%2F**%0A%20%20%20%20%20*%20Returns%20the%20super%20class%20constructor%20for%20the%20given%20class%2C%20if%20it%20is%20an%0A%20%20%20%20%20*%20instance%20of%20the%20PropertiesMixin.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40param%20%7B!PropertiesMixinConstructor%7D%20constructor%20PropertiesMixin%20constructor%0A%20%20%20%20%20*%20%40return%20%7BPropertiesMixinConstructor%7D%20Super%20class%20constructor%0A%20%20%20%20%20*%2Ffunction%20superPropertiesClass(constructor)%7Bvar%20superCtor%3DObject.getPrototypeOf(constructor)%3B%2F%2F%20Note%2C%20the%20%60PropertiesMixin%60%20class%20below%20only%20refers%20to%20the%20class%0A%2F%2F%20generated%20by%20this%20call%20to%20the%20mixin%3B%20the%20instanceof%20test%20only%20works%0A%2F%2F%20because%20the%20mixin%20is%20deduped%20and%20guaranteed%20only%20to%20apply%20once%2C%20hence%0A%2F%2F%20all%20constructors%20in%20a%20proto%20chain%20will%20see%20the%20same%20%60PropertiesMixin%60%0Areturn%20superCtor.prototype%20instanceof%20PropertiesMixin%3F%2F**%20%40type%20%7BPropertiesMixinConstructor%7D%20*%2FsuperCtor%3Anull%3B%7D%2F**%0A%20%20%20%20%20*%20Returns%20a%20memoized%20version%20of%20the%20%60properties%60%20object%20for%20the%0A%20%20%20%20%20*%20given%20class.%20Properties%20not%20in%20object%20format%20are%20converted%20to%20at%0A%20%20%20%20%20*%20least%20%7Btype%7D.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40param%20%7BPropertiesMixinConstructor%7D%20constructor%20PropertiesMixin%20constructor%0A%20%20%20%20%20*%20%40return%20%7BObject%7D%20Memoized%20properties%20object%0A%20%20%20%20%20*%2Ffunction%20ownProperties(constructor)%7Bif(!constructor.hasOwnProperty(JSCompiler_renameProperty('__ownProperties'%2Cconstructor)))%7Bvar%20props%3Dnull%3Bif(constructor.hasOwnProperty(JSCompiler_renameProperty('properties'%2Cconstructor)))%7Bvar%20properties%3Dconstructor.properties%3Bif(properties)%7Bprops%3DnormalizeProperties(properties)%3B%7D%7Dconstructor.__ownProperties%3Dprops%3B%7Dreturn%20constructor.__ownProperties%3B%7D%2F**%0A%20%20%20%20%20*%20%40polymer%0A%20%20%20%20%20*%20%40mixinClass%0A%20%20%20%20%20*%20%40extends%20%7Bbase%7D%0A%20%20%20%20%20*%20%40implements%20%7BPolymer_PropertiesMixin%7D%0A%20%20%20%20%20*%20%40unrestricted%0A%20%20%20%20%20*%2Fvar%20PropertiesMixin%3Dfunction(_base)%7B_inherits(PropertiesMixin%2C_base)%3Bfunction%20PropertiesMixin()%7B_classCallCheck(this%2CPropertiesMixin)%3Breturn%20_possibleConstructorReturn(this%2C(PropertiesMixin.__proto__%7C%7CObject.getPrototypeOf(PropertiesMixin)).apply(this%2Carguments))%3B%7D_createClass(PropertiesMixin%2C%5B%7Bkey%3A'_initializeProperties'%2C%2F**%0A%20%20%20%20%20%20%20*%20Overrides%20%60PropertiesChanged%60%20method%20and%20adds%20a%20call%20to%0A%20%20%20%20%20%20%20*%20%60finalize%60%20which%20lazily%20configures%20the%20element's%20property%20accessors.%0A%20%20%20%20%20%20%20*%20%40override%0A%20%20%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20%20%20*%2Fvalue%3Afunction%20_initializeProperties()%7BPolymer.telemetry.instanceCount%2B%2B%3Bthis.constructor.finalize()%3B_get(PropertiesMixin.prototype.__proto__%7C%7CObject.getPrototypeOf(PropertiesMixin.prototype)%2C'_initializeProperties'%2Cthis).call(this)%3B%7D%2F**%0A%20%20%20%20%20%20%20*%20Called%20when%20the%20element%20is%20added%20to%20a%20document.%0A%20%20%20%20%20%20%20*%20Calls%20%60_enableProperties%60%20to%20turn%20on%20property%20system%20from%0A%20%20%20%20%20%20%20*%20%60PropertiesChanged%60.%0A%20%20%20%20%20%20%20*%20%40suppress%20%7BmissingProperties%7D%20Super%20may%20or%20may%20not%20implement%20the%20callback%0A%20%20%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'connectedCallback'%2Cvalue%3Afunction%20connectedCallback()%7Bif(_get(PropertiesMixin.prototype.__proto__%7C%7CObject.getPrototypeOf(PropertiesMixin.prototype)%2C'connectedCallback'%2Cthis))%7B_get(PropertiesMixin.prototype.__proto__%7C%7CObject.getPrototypeOf(PropertiesMixin.prototype)%2C'connectedCallback'%2Cthis).call(this)%3B%7Dthis._enableProperties()%3B%7D%2F**%0A%20%20%20%20%20%20%20*%20Called%20when%20the%20element%20is%20removed%20from%20a%20document%0A%20%20%20%20%20%20%20*%20%40suppress%20%7BmissingProperties%7D%20Super%20may%20or%20may%20not%20implement%20the%20callback%0A%20%20%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'disconnectedCallback'%2Cvalue%3Afunction%20disconnectedCallback()%7Bif(_get(PropertiesMixin.prototype.__proto__%7C%7CObject.getPrototypeOf(PropertiesMixin.prototype)%2C'disconnectedCallback'%2Cthis))%7B_get(PropertiesMixin.prototype.__proto__%7C%7CObject.getPrototypeOf(PropertiesMixin.prototype)%2C'disconnectedCallback'%2Cthis).call(this)%3B%7D%7D%7D%5D%2C%5B%7Bkey%3A'finalize'%2C%2F**%0A%20%20%20%20%20%20%20*%20Finalizes%20an%20element%20definition%2C%20including%20ensuring%20any%20super%20classes%0A%20%20%20%20%20%20%20*%20are%20also%20finalized.%20This%20includes%20ensuring%20property%0A%20%20%20%20%20%20%20*%20accessors%20exist%20on%20the%20element%20prototype.%20This%20method%20calls%0A%20%20%20%20%20%20%20*%20%60_finalizeClass%60%20to%20finalize%20each%20constructor%20in%20the%20prototype%20chain.%0A%20%20%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20%20%20*%2Fvalue%3Afunction%20finalize()%7Bif(!this.hasOwnProperty(JSCompiler_renameProperty('__finalized'%2Cthis)))%7Bvar%20superCtor%3DsuperPropertiesClass(%2F**%20%40type%20%7BPropertiesMixinConstructor%7D%20*%2Fthis)%3Bif(superCtor)%7BsuperCtor.finalize()%3B%7Dthis.__finalized%3Dtrue%3Bthis._finalizeClass()%3B%7D%7D%2F**%0A%20%20%20%20%20%20%20*%20Finalize%20an%20element%20class.%20This%20includes%20ensuring%20property%0A%20%20%20%20%20%20%20*%20accessors%20exist%20on%20the%20element%20prototype.%20This%20method%20is%20called%20by%0A%20%20%20%20%20%20%20*%20%60finalize%60%20and%20finalizes%20the%20class%20constructor.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40protected%0A%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'_finalizeClass'%2Cvalue%3Afunction%20_finalizeClass()%7Bvar%20props%3DownProperties(%2F**%20%40type%20%7BPropertiesMixinConstructor%7D%20*%2Fthis)%3Bif(props)%7Bthis.createProperties(props)%3B%7D%7D%2F**%0A%20%20%20%20%20%20%20*%20Returns%20a%20memoized%20version%20of%20all%20properties%2C%20including%20those%20inherited%0A%20%20%20%20%20%20%20*%20from%20super%20classes.%20Properties%20not%20in%20object%20format%20are%20converted%20to%0A%20%20%20%20%20%20%20*%20at%20least%20%7Btype%7D.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40return%20%7BObject%7D%20Object%20containing%20properties%20for%20this%20class%0A%20%20%20%20%20%20%20*%20%40protected%0A%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'typeForProperty'%2C%2F**%0A%20%20%20%20%20%20%20*%20Overrides%20%60PropertiesChanged%60%20method%20to%20return%20type%20specified%20in%20the%0A%20%20%20%20%20%20%20*%20static%20%60properties%60%20object%20for%20the%20given%20property.%0A%20%20%20%20%20%20%20*%20%40param%20%7Bstring%7D%20name%20Name%20of%20property%0A%20%20%20%20%20%20%20*%20%40return%20%7B*%7D%20Type%20to%20which%20to%20deserialize%20attribute%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40protected%0A%20%20%20%20%20%20%20*%2Fvalue%3Afunction%20typeForProperty(name)%7Bvar%20info%3Dthis._properties%5Bname%5D%3Breturn%20info%26%26info.type%3B%7D%7D%2C%7Bkey%3A'observedAttributes'%2C%2F**%0A%20%20%20%20%20%20%20*%20Implements%20standard%20custom%20elements%20getter%20to%20observes%20the%20attributes%0A%20%20%20%20%20%20%20*%20listed%20in%20%60properties%60.%0A%20%20%20%20%20%20%20*%20%40suppress%20%7BmissingProperties%7D%20Interfaces%20in%20closure%20do%20not%20inherit%20statics%2C%20but%20classes%20do%0A%20%20%20%20%20%20%20*%2Fget%3Afunction%20get()%7Bvar%20_this2%3Dthis%3Bif(!this.hasOwnProperty('__observedAttributes'))%7BPolymer.telemetry.register(this.prototype)%3Bvar%20props%3Dthis._properties%3Bthis.__observedAttributes%3Dprops%3FObject.keys(props).map(function(p)%7Breturn%20_this2.attributeNameForProperty(p)%3B%7D)%3A%5B%5D%3B%7Dreturn%20this.__observedAttributes%3B%7D%7D%2C%7Bkey%3A'_properties'%2Cget%3Afunction%20get()%7Bif(!this.hasOwnProperty(JSCompiler_renameProperty('__properties'%2Cthis)))%7Bvar%20superCtor%3DsuperPropertiesClass(%2F**%20%40type%20%7BPropertiesMixinConstructor%7D%20*%2Fthis)%3Bthis.__properties%3DObject.assign(%7B%7D%2CsuperCtor%26%26superCtor._properties%2CownProperties(%2F**%20%40type%20%7BPropertiesMixinConstructor%7D%20*%2Fthis))%3B%7Dreturn%20this.__properties%3B%7D%7D%5D)%3Breturn%20PropertiesMixin%3B%7D(base)%3Breturn%20PropertiesMixin%3B%7D)%3B%7D)()%3B%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Fcpt-static.gannettdigital.com%2Funiversal-web-client%2Fmaster%2Flatest%2Fvendor%2Fcomponents%2Fpolymer%2Flib%2Fmixins%2Fproperties-mixin.html.js%0A | 9.7 kB | 2023-03-07 | 2024-01-25 | |
Pretty
Loading... | ||||
http:text/javascript;charset=utf-8,var%20_createClass%3Dfunction()%7Bfunction%20defineProperties(target%2Cprops)%7Bfor(var%20i%3D0%3Bi%3Cprops.length%3Bi%2B%2B)%7Bvar%20descriptor%3Dprops%5Bi%5D%3Bdescriptor.enumerable%3Ddescriptor.enumerable%7C%7Cfalse%3Bdescriptor.configurable%3Dtrue%3Bif(%22value%22in%20descriptor)descriptor.writable%3Dtrue%3BObject.defineProperty(target%2Cdescriptor.key%2Cdescriptor)%3B%7D%7Dreturn%20function(Constructor%2CprotoProps%2CstaticProps)%7Bif(protoProps)defineProperties(Constructor.prototype%2CprotoProps)%3Bif(staticProps)defineProperties(Constructor%2CstaticProps)%3Breturn%20Constructor%3B%7D%3B%7D()%3Bfunction%20_classCallCheck(instance%2CConstructor)%7Bif(!(instance%20instanceof%20Constructor))%7Bthrow%20new%20TypeError(%22Cannot%20call%20a%20class%20as%20a%20function%22)%3B%7D%7Dfunction%20_possibleConstructorReturn(self%2Ccall)%7Bif(!self)%7Bthrow%20new%20ReferenceError(%22this%20hasn't%20been%20initialised%20-%20super()%20hasn't%20been%20called%22)%3B%7Dreturn%20call%26%26(typeof%20call%3D%3D%3D%22object%22%7C%7Ctypeof%20call%3D%3D%3D%22function%22)%3Fcall%3Aself%3B%7Dfunction%20_inherits(subClass%2CsuperClass)%7Bif(typeof%20superClass!%3D%3D%22function%22%26%26superClass!%3D%3Dnull)%7Bthrow%20new%20TypeError(%22Super%20expression%20must%20either%20be%20null%20or%20a%20function%2C%20not%20%22%2Btypeof%20superClass)%3B%7DsubClass.prototype%3DObject.create(superClass%26%26superClass.prototype%2C%7Bconstructor%3A%7Bvalue%3AsubClass%2Cenumerable%3Afalse%2Cwritable%3Atrue%2Cconfigurable%3Atrue%7D%7D)%3Bif(superClass)Object.setPrototypeOf%3FObject.setPrototypeOf(subClass%2CsuperClass)%3AsubClass.__proto__%3DsuperClass%3B%7D(function()%7B'use%20strict'%3B%2F**%0A%20%20%20*%20Element%20mixin%20for%20recording%20dynamic%20associations%20between%20item%20paths%20in%20a%0A%20%20%20*%20master%20%60items%60%20array%20and%20a%20%60selected%60%20array%20such%20that%20path%20changes%20to%20the%0A%20%20%20*%20master%20array%20(at%20the%20host)%20element%20or%20elsewhere%20via%20data-binding)%20are%0A%20%20%20*%20correctly%20propagated%20to%20items%20in%20the%20selected%20array%20and%20vice-versa.%0A%20%20%20*%0A%20%20%20*%20The%20%60items%60%20property%20accepts%20an%20array%20of%20user%20data%2C%20and%20via%20the%0A%20%20%20*%20%60select(item)%60%20and%20%60deselect(item)%60%20API%2C%20updates%20the%20%60selected%60%20property%0A%20%20%20*%20which%20may%20be%20bound%20to%20other%20parts%20of%20the%20application%2C%20and%20any%20changes%20to%0A%20%20%20*%20sub-fields%20of%20%60selected%60%20item(s)%20will%20be%20kept%20in%20sync%20with%20items%20in%20the%0A%20%20%20*%20%60items%60%20array.%20%20When%20%60multi%60%20is%20false%2C%20%60selected%60%20is%20a%20property%0A%20%20%20*%20representing%20the%20last%20selected%20item.%20%20When%20%60multi%60%20is%20true%2C%20%60selected%60%0A%20%20%20*%20is%20an%20array%20of%20multiply%20selected%20items.%0A%20%20%20*%0A%20%20%20*%20%40polymer%0A%20%20%20*%20%40mixinFunction%0A%20%20%20*%20%40appliesMixin%20Polymer.ElementMixin%0A%20%20%20*%20%40memberof%20Polymer%0A%20%20%20*%20%40summary%20Element%20mixin%20for%20recording%20dynamic%20associations%20between%20item%20paths%20in%20a%0A%20%20%20*%20master%20%60items%60%20array%20and%20a%20%60selected%60%20array%0A%20%20%20*%2Fvar%20ArraySelectorMixin%3DPolymer.dedupingMixin(function(superClass)%7B%2F**%0A%20%20%20%20%20*%20%40constructor%0A%20%20%20%20%20*%20%40extends%20%7BsuperClass%7D%0A%20%20%20%20%20*%20%40implements%20%7BPolymer_ElementMixin%7D%0A%20%20%20%20%20*%20%40private%0A%20%20%20%20%20*%2Fvar%20elementBase%3DPolymer.ElementMixin(superClass)%3B%2F**%0A%20%20%20%20%20*%20%40polymer%0A%20%20%20%20%20*%20%40mixinClass%0A%20%20%20%20%20*%20%40implements%20%7BPolymer_ArraySelectorMixin%7D%0A%20%20%20%20%20*%20%40unrestricted%0A%20%20%20%20%20*%2Fvar%20ArraySelectorMixin%3Dfunction(_elementBase)%7B_inherits(ArraySelectorMixin%2C_elementBase)%3B_createClass(ArraySelectorMixin%2Cnull%2C%5B%7Bkey%3A'properties'%2Cget%3Afunction%20get()%7Breturn%7B%2F**%0A%20%20%20%20%20%20%20%20%20%20%20*%20An%20array%20containing%20items%20from%20which%20selection%20will%20be%20made.%0A%20%20%20%20%20%20%20%20%20%20%20*%2Fitems%3A%7Btype%3AArray%7D%2C%2F**%0A%20%20%20%20%20%20%20%20%20%20%20*%20When%20%60true%60%2C%20multiple%20items%20may%20be%20selected%20at%20once%20(in%20this%20case%2C%0A%20%20%20%20%20%20%20%20%20%20%20*%20%60selected%60%20is%20an%20array%20of%20currently%20selected%20items).%20%20When%20%60false%60%2C%0A%20%20%20%20%20%20%20%20%20%20%20*%20only%20one%20item%20may%20be%20selected%20at%20a%20time.%0A%20%20%20%20%20%20%20%20%20%20%20*%2Fmulti%3A%7Btype%3ABoolean%2Cvalue%3Afalse%7D%2C%2F**%0A%20%20%20%20%20%20%20%20%20%20%20*%20When%20%60multi%60%20is%20true%2C%20this%20is%20an%20array%20that%20contains%20any%20selected.%0A%20%20%20%20%20%20%20%20%20%20%20*%20When%20%60multi%60%20is%20false%2C%20this%20is%20the%20currently%20selected%20item%2C%20or%20%60null%60%0A%20%20%20%20%20%20%20%20%20%20%20*%20if%20no%20item%20is%20selected.%0A%20%20%20%20%20%20%20%20%20%20%20*%20%40type%20%7B%3F(Object%7CArray%3C!Object%3E)%7D%0A%20%20%20%20%20%20%20%20%20%20%20*%2Fselected%3A%7Btype%3AObject%2Cnotify%3Atrue%7D%2C%2F**%0A%20%20%20%20%20%20%20%20%20%20%20*%20When%20%60multi%60%20is%20false%2C%20this%20is%20the%20currently%20selected%20item%2C%20or%20%60null%60%0A%20%20%20%20%20%20%20%20%20%20%20*%20if%20no%20item%20is%20selected.%0A%20%20%20%20%20%20%20%20%20%20%20*%20%40type%20%7B%3FObject%7D%0A%20%20%20%20%20%20%20%20%20%20%20*%2FselectedItem%3A%7Btype%3AObject%2Cnotify%3Atrue%7D%2C%2F**%0A%20%20%20%20%20%20%20%20%20%20%20*%20When%20%60true%60%2C%20calling%20%60select%60%20on%20an%20item%20that%20is%20already%20selected%0A%20%20%20%20%20%20%20%20%20%20%20*%20will%20deselect%20the%20item.%0A%20%20%20%20%20%20%20%20%20%20%20*%2Ftoggle%3A%7Btype%3ABoolean%2Cvalue%3Afalse%7D%7D%3B%7D%7D%2C%7Bkey%3A'observers'%2Cget%3Afunction%20get()%7Breturn%5B'__updateSelection(multi%2C%20items.*)'%5D%3B%7D%7D%5D)%3Bfunction%20ArraySelectorMixin()%7B_classCallCheck(this%2CArraySelectorMixin)%3Bvar%20_this%3D_possibleConstructorReturn(this%2C(ArraySelectorMixin.__proto__%7C%7CObject.getPrototypeOf(ArraySelectorMixin)).call(this))%3B_this.__lastItems%3Dnull%3B_this.__lastMulti%3Dnull%3B_this.__selectedMap%3Dnull%3Breturn%20_this%3B%7D_createClass(ArraySelectorMixin%2C%5B%7Bkey%3A'__updateSelection'%2Cvalue%3Afunction%20__updateSelection(multi%2CitemsInfo)%7Bvar%20path%3DitemsInfo.path%3Bif(path%3D%3D'items')%7B%2F%2F%20Case%201%20-%20items%20array%20changed%2C%20so%20diff%20against%20previous%20array%20and%0A%2F%2F%20deselect%20any%20removed%20items%20and%20adjust%20selected%20indices%0Avar%20newItems%3DitemsInfo.base%7C%7C%5B%5D%3Bvar%20lastItems%3Dthis.__lastItems%3Bvar%20lastMulti%3Dthis.__lastMulti%3Bif(multi!%3D%3DlastMulti)%7Bthis.clearSelection()%3B%7Dif(lastItems)%7Bvar%20splices%3DPolymer.ArraySplice.calculateSplices(newItems%2ClastItems)%3Bthis.__applySplices(splices)%3B%7Dthis.__lastItems%3DnewItems%3Bthis.__lastMulti%3Dmulti%3B%7Delse%20if(itemsInfo.path%3D%3D'items.splices')%7B%2F%2F%20Case%202%20-%20got%20specific%20splice%20information%20describing%20the%20array%20mutation%3A%0A%2F%2F%20deselect%20any%20removed%20items%20and%20adjust%20selected%20indices%0Athis.__applySplices(itemsInfo.value.indexSplices)%3B%7Delse%7B%2F%2F%20Case%203%20-%20an%20array%20element%20was%20changed%2C%20so%20deselect%20the%20previous%0A%2F%2F%20item%20for%20that%20index%20if%20it%20was%20previously%20selected%0Avar%20part%3Dpath.slice('items.'.length)%3Bvar%20idx%3DparseInt(part%2C10)%3Bif(part.indexOf('.')%3C0%26%26part%3D%3Didx)%7Bthis.__deselectChangedIdx(idx)%3B%7D%7D%7D%7D%2C%7Bkey%3A'__applySplices'%2Cvalue%3Afunction%20__applySplices(splices)%7Bvar%20_this2%3Dthis%3Bvar%20selected%3Dthis.__selectedMap%3B%2F%2F%20Adjust%20selected%20indices%20and%20mark%20removals%0Avar%20_loop%3Dfunction%20_loop(i)%7Bvar%20s%3Dsplices%5Bi%5D%3Bselected.forEach(function(idx%2Citem)%7Bif(idx%3Cs.index)%7B%2F%2F%20no%20change%0A%7Delse%20if(idx%3E%3Ds.index%2Bs.removed.length)%7B%2F%2F%20adjust%20index%0Aselected.set(item%2Cidx%2Bs.addedCount-s.removed.length)%3B%7Delse%7B%2F%2F%20remove%20index%0Aselected.set(item%2C-1)%3B%7D%7D)%3Bfor(var%20j%3D0%3Bj%3Cs.addedCount%3Bj%2B%2B)%7Bvar%20idx%3Ds.index%2Bj%3Bif(selected.has(_this2.items%5Bidx%5D))%7Bselected.set(_this2.items%5Bidx%5D%2Cidx)%3B%7D%7D%7D%3Bfor(var%20i%3D0%3Bi%3Csplices.length%3Bi%2B%2B)%7B_loop(i)%3B%7D%2F%2F%20Update%20linked%20paths%0Athis.__updateLinks()%3B%2F%2F%20Remove%20selected%20items%20that%20were%20removed%20from%20the%20items%20array%0Avar%20sidx%3D0%3Bselected.forEach(function(idx%2Citem)%7Bif(idx%3C0)%7Bif(_this2.multi)%7B_this2.splice('selected'%2Csidx%2C1)%3B%7Delse%7B_this2.selected%3D_this2.selectedItem%3Dnull%3B%7Dselected.delete(item)%3B%7Delse%7Bsidx%2B%2B%3B%7D%7D)%3B%7D%7D%2C%7Bkey%3A'__updateLinks'%2Cvalue%3Afunction%20__updateLinks()%7Bvar%20_this3%3Dthis%3Bthis.__dataLinkedPaths%3D%7B%7D%3Bif(this.multi)%7Bvar%20sidx%3D0%3Bthis.__selectedMap.forEach(function(idx)%7Bif(idx%3E%3D0)%7B_this3.linkPaths('items.'%2Bidx%2C'selected.'%2Bsidx%2B%2B)%3B%7D%7D)%3B%7Delse%7Bthis.__selectedMap.forEach(function(idx)%7B_this3.linkPaths('selected'%2C'items.'%2Bidx)%3B_this3.linkPaths('selectedItem'%2C'items.'%2Bidx)%3B%7D)%3B%7D%7D%2F**%0A%20%20%20%20%20%20%20*%20Clears%20the%20selection%20state.%0A%20%20%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'clearSelection'%2Cvalue%3Afunction%20clearSelection()%7B%2F%2F%20Unbind%20previous%20selection%0Athis.__dataLinkedPaths%3D%7B%7D%3B%2F%2F%20The%20selected%20map%20stores%203%20pieces%20of%20information%3A%0A%2F%2F%20key%3A%20items%20array%20object%0A%2F%2F%20value%3A%20items%20array%20index%0A%2F%2F%20order%3A%20selected%20array%20index%0Athis.__selectedMap%3Dnew%20Map()%3B%2F%2F%20Initialize%20selection%0Athis.selected%3Dthis.multi%3F%5B%5D%3Anull%3Bthis.selectedItem%3Dnull%3B%7D%2F**%0A%20%20%20%20%20%20%20*%20Returns%20whether%20the%20item%20is%20currently%20selected.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40param%20%7B*%7D%20item%20Item%20from%20%60items%60%20array%20to%20test%0A%20%20%20%20%20%20%20*%20%40return%20%7Bboolean%7D%20Whether%20the%20item%20is%20selected%0A%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'isSelected'%2Cvalue%3Afunction%20isSelected(item)%7Breturn%20this.__selectedMap.has(item)%3B%7D%2F**%0A%20%20%20%20%20%20%20*%20Returns%20whether%20the%20item%20is%20currently%20selected.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40param%20%7Bnumber%7D%20idx%20Index%20from%20%60items%60%20array%20to%20test%0A%20%20%20%20%20%20%20*%20%40return%20%7Bboolean%7D%20Whether%20the%20item%20is%20selected%0A%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'isIndexSelected'%2Cvalue%3Afunction%20isIndexSelected(idx)%7Breturn%20this.isSelected(this.items%5Bidx%5D)%3B%7D%7D%2C%7Bkey%3A'__deselectChangedIdx'%2Cvalue%3Afunction%20__deselectChangedIdx(idx)%7Bvar%20_this4%3Dthis%3Bvar%20sidx%3Dthis.__selectedIndexForItemIndex(idx)%3Bif(sidx%3E%3D0)%7Bvar%20i%3D0%3Bthis.__selectedMap.forEach(function(idx%2Citem)%7Bif(sidx%3D%3Di%2B%2B)%7B_this4.deselect(item)%3B%7D%7D)%3B%7D%7D%7D%2C%7Bkey%3A'__selectedIndexForItemIndex'%2Cvalue%3Afunction%20__selectedIndexForItemIndex(idx)%7Bvar%20selected%3Dthis.__dataLinkedPaths%5B'items.'%2Bidx%5D%3Bif(selected)%7Breturn%20parseInt(selected.slice('selected.'.length)%2C10)%3B%7D%7D%2F**%0A%20%20%20%20%20%20%20*%20Deselects%20the%20given%20item%20if%20it%20is%20already%20selected.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40param%20%7B*%7D%20item%20Item%20from%20%60items%60%20array%20to%20deselect%0A%20%20%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'deselect'%2Cvalue%3Afunction%20deselect(item)%7Bvar%20idx%3Dthis.__selectedMap.get(item)%3Bif(idx%3E%3D0)%7Bthis.__selectedMap.delete(item)%3Bvar%20sidx%3Dvoid%200%3Bif(this.multi)%7Bsidx%3Dthis.__selectedIndexForItemIndex(idx)%3B%7Dthis.__updateLinks()%3Bif(this.multi)%7Bthis.splice('selected'%2Csidx%2C1)%3B%7Delse%7Bthis.selected%3Dthis.selectedItem%3Dnull%3B%7D%7D%7D%2F**%0A%20%20%20%20%20%20%20*%20Deselects%20the%20given%20index%20if%20it%20is%20already%20selected.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40param%20%7Bnumber%7D%20idx%20Index%20from%20%60items%60%20array%20to%20deselect%0A%20%20%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'deselectIndex'%2Cvalue%3Afunction%20deselectIndex(idx)%7Bthis.deselect(this.items%5Bidx%5D)%3B%7D%2F**%0A%20%20%20%20%20%20%20*%20Selects%20the%20given%20item.%20%20When%20%60toggle%60%20is%20true%2C%20this%20will%20automatically%0A%20%20%20%20%20%20%20*%20deselect%20the%20item%20if%20already%20selected.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40param%20%7B*%7D%20item%20Item%20from%20%60items%60%20array%20to%20select%0A%20%20%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'select'%2Cvalue%3Afunction%20select(item)%7Bthis.selectIndex(this.items.indexOf(item))%3B%7D%2F**%0A%20%20%20%20%20%20%20*%20Selects%20the%20given%20index.%20%20When%20%60toggle%60%20is%20true%2C%20this%20will%20automatically%0A%20%20%20%20%20%20%20*%20deselect%20the%20item%20if%20already%20selected.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40param%20%7Bnumber%7D%20idx%20Index%20from%20%60items%60%20array%20to%20select%0A%20%20%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'selectIndex'%2Cvalue%3Afunction%20selectIndex(idx)%7Bvar%20item%3Dthis.items%5Bidx%5D%3Bif(!this.isSelected(item))%7Bif(!this.multi)%7Bthis.__selectedMap.clear()%3B%7Dthis.__selectedMap.set(item%2Cidx)%3Bthis.__updateLinks()%3Bif(this.multi)%7Bthis.push('selected'%2Citem)%3B%7Delse%7Bthis.selected%3Dthis.selectedItem%3Ditem%3B%7D%7Delse%20if(this.toggle)%7Bthis.deselectIndex(idx)%3B%7D%7D%7D%5D)%3Breturn%20ArraySelectorMixin%3B%7D(elementBase)%3Breturn%20ArraySelectorMixin%3B%7D)%3B%2F%2F%20export%20mixin%0APolymer.ArraySelectorMixin%3DArraySelectorMixin%3B%2F**%0A%20%20%20*%20%40constructor%0A%20%20%20*%20%40extends%20%7BPolymer.Element%7D%0A%20%20%20*%20%40implements%20%7BPolymer_ArraySelectorMixin%7D%0A%20%20%20*%20%40private%0A%20%20%20*%2Fvar%20baseArraySelector%3DArraySelectorMixin(Polymer.Element)%3B%2F**%0A%20%20%20*%20Element%20implementing%20the%20%60Polymer.ArraySelector%60%20mixin%2C%20which%20records%0A%20%20%20*%20dynamic%20associations%20between%20item%20paths%20in%20a%20master%20%60items%60%20array%20and%20a%0A%20%20%20*%20%60selected%60%20array%20such%20that%20path%20changes%20to%20the%20master%20array%20(at%20the%20host)%0A%20%20%20*%20element%20or%20elsewhere%20via%20data-binding)%20are%20correctly%20propagated%20to%20items%0A%20%20%20*%20in%20the%20selected%20array%20and%20vice-versa.%0A%20%20%20*%0A%20%20%20*%20The%20%60items%60%20property%20accepts%20an%20array%20of%20user%20data%2C%20and%20via%20the%0A%20%20%20*%20%60select(item)%60%20and%20%60deselect(item)%60%20API%2C%20updates%20the%20%60selected%60%20property%0A%20%20%20*%20which%20may%20be%20bound%20to%20other%20parts%20of%20the%20application%2C%20and%20any%20changes%20to%0A%20%20%20*%20sub-fields%20of%20%60selected%60%20item(s)%20will%20be%20kept%20in%20sync%20with%20items%20in%20the%0A%20%20%20*%20%60items%60%20array.%20%20When%20%60multi%60%20is%20false%2C%20%60selected%60%20is%20a%20property%0A%20%20%20*%20representing%20the%20last%20selected%20item.%20%20When%20%60multi%60%20is%20true%2C%20%60selected%60%0A%20%20%20*%20is%20an%20array%20of%20multiply%20selected%20items.%0A%20%20%20*%0A%20%20%20*%20Example%3A%0A%20%20%20*%0A%20%20%20*%20%60%60%60html%0A%20%20%20*%20%3Cdom-module%20id%3D%22employee-list%22%3E%0A%20%20%20*%0A%20%20%20*%20%20%20%3Ctemplate%3E%0A%20%20%20*%0A%20%20%20*%20%20%20%20%20%3Cdiv%3E%20Employee%20list%3A%20%3C%2Fdiv%3E%0A%20%20%20*%20%20%20%20%20%3Cdom-repeat%20id%3D%22employeeList%22%20items%3D%22%7B%7Bemployees%7D%7D%22%3E%0A%20%20%20*%20%20%20%20%20%20%20%3Ctemplate%3E%0A%20%20%20*%20%20%20%20%20%20%20%20%20%3Cdiv%3EFirst%20name%3A%20%3Cspan%3E%7B%7Bitem.first%7D%7D%3C%2Fspan%3E%3C%2Fdiv%3E%0A%20%20%20*%20%20%20%20%20%20%20%20%20%20%20%3Cdiv%3ELast%20name%3A%20%3Cspan%3E%7B%7Bitem.last%7D%7D%3C%2Fspan%3E%3C%2Fdiv%3E%0A%20%20%20*%20%20%20%20%20%20%20%20%20%20%20%3Cbutton%20on-click%3D%22toggleSelection%22%3ESelect%3C%2Fbutton%3E%0A%20%20%20*%20%20%20%20%20%20%20%3C%2Ftemplate%3E%0A%20%20%20*%20%20%20%20%20%3C%2Fdom-repeat%3E%0A%20%20%20*%0A%20%20%20*%20%20%20%20%20%3Carray-selector%20id%3D%22selector%22%20items%3D%22%7B%7Bemployees%7D%7D%22%20selected%3D%22%7B%7Bselected%7D%7D%22%20multi%20toggle%3E%3C%2Farray-selector%3E%0A%20%20%20*%0A%20%20%20*%20%20%20%20%20%3Cdiv%3E%20Selected%20employees%3A%20%3C%2Fdiv%3E%0A%20%20%20*%20%20%20%20%20%3Cdom-repeat%20items%3D%22%7B%7Bselected%7D%7D%22%3E%0A%20%20%20*%20%20%20%20%20%20%20%3Ctemplate%3E%0A%20%20%20*%20%20%20%20%20%20%20%20%20%3Cdiv%3EFirst%20name%3A%20%3Cspan%3E%7B%7Bitem.first%7D%7D%3C%2Fspan%3E%3C%2Fdiv%3E%0A%20%20%20*%20%20%20%20%20%20%20%20%20%3Cdiv%3ELast%20name%3A%20%3Cspan%3E%7B%7Bitem.last%7D%7D%3C%2Fspan%3E%3C%2Fdiv%3E%0A%20%20%20*%20%20%20%20%20%20%20%3C%2Ftemplate%3E%0A%20%20%20*%20%20%20%20%20%3C%2Fdom-repeat%3E%0A%20%20%20*%0A%20%20%20*%20%20%20%3C%2Ftemplate%3E%0A%20%20%20*%0A%20%20%20*%20%3C%2Fdom-module%3E%0A%20%20%20*%20%60%60%60%0A%20%20%20*%0A%20%20%20*%20%60%60%60js%0A%20%20%20*class%20EmployeeList%20extends%20Polymer.Element%20%7B%0A%20%20%20*%20%20static%20get%20is()%20%7B%20return%20'employee-list'%3B%20%7D%0A%20%20%20*%20%20static%20get%20properties()%20%7B%0A%20%20%20*%20%20%20%20return%20%7B%0A%20%20%20*%20%20%20%20%20%20employees%3A%20%7B%0A%20%20%20*%20%20%20%20%20%20%20%20value()%20%7B%0A%20%20%20*%20%20%20%20%20%20%20%20%20%20return%20%5B%0A%20%20%20*%20%20%20%20%20%20%20%20%20%20%20%20%7Bfirst%3A%20'Bob'%2C%20last%3A%20'Smith'%7D%2C%0A%20%20%20*%20%20%20%20%20%20%20%20%20%20%20%20%7Bfirst%3A%20'Sally'%2C%20last%3A%20'Johnson'%7D%2C%0A%20%20%20*%20%20%20%20%20%20%20%20%20%20%20%20...%0A%20%20%20*%20%20%20%20%20%20%20%20%20%20%5D%3B%0A%20%20%20*%20%20%20%20%20%20%20%20%7D%0A%20%20%20*%20%20%20%20%20%20%7D%0A%20%20%20*%20%20%20%20%7D%3B%0A%20%20%20*%20%20%7D%0A%20%20%20*%20%20toggleSelection(e)%20%7B%0A%20%20%20*%20%20%20%20let%20item%20%3D%20this.%24.employeeList.itemForElement(e.target)%3B%0A%20%20%20*%20%20%20%20this.%24.selector.select(item)%3B%0A%20%20%20*%20%20%7D%0A%20%20%20*%7D%0A%20%20%20*%20%60%60%60%0A%20%20%20*%0A%20%20%20*%20%40polymer%0A%20%20%20*%20%40customElement%0A%20%20%20*%20%40extends%20%7BbaseArraySelector%7D%0A%20%20%20*%20%40appliesMixin%20Polymer.ArraySelectorMixin%0A%20%20%20*%20%40memberof%20Polymer%0A%20%20%20*%20%40summary%20Custom%20element%20that%20links%20paths%20between%20an%20input%20%60items%60%20array%20and%0A%20%20%20*%20%20%20an%20output%20%60selected%60%20item%20or%20array%20based%20on%20calls%20to%20its%20selection%20API.%0A%20%20%20*%2Fvar%20ArraySelector%3Dfunction(_baseArraySelector)%7B_inherits(ArraySelector%2C_baseArraySelector)%3Bfunction%20ArraySelector()%7B_classCallCheck(this%2CArraySelector)%3Breturn%20_possibleConstructorReturn(this%2C(ArraySelector.__proto__%7C%7CObject.getPrototypeOf(ArraySelector)).apply(this%2Carguments))%3B%7D_createClass(ArraySelector%2Cnull%2C%5B%7Bkey%3A'is'%2C%2F%2F%20Not%20needed%20to%20find%20template%3B%20can%20be%20removed%20once%20the%20analyzer%0A%2F%2F%20can%20find%20the%20tag%20name%20from%20customElements.define%20call%0Aget%3Afunction%20get()%7Breturn'array-selector'%3B%7D%7D%5D)%3Breturn%20ArraySelector%3B%7D(baseArraySelector)%3BcustomElements.define(ArraySelector.is%2CArraySelector)%3B%2F**%20%40const%20*%2FPolymer.ArraySelector%3DArraySelector%3B%7D)()%3B%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Fcpt-static.gannettdigital.com%2Funiversal-web-client%2Fmaster%2Flatest%2Fvendor%2Fcomponents%2Fpolymer%2Flib%2Felements%2Farray-selector.html.js%0A | 14 kB | 2023-03-07 | 2024-01-25 | |
Pretty
Loading... | ||||
http:text/javascript;charset=utf-8,'use%20strict'%3Bvar%20_createClass%3Dfunction()%7Bfunction%20defineProperties(target%2Cprops)%7Bfor(var%20i%3D0%3Bi%3Cprops.length%3Bi%2B%2B)%7Bvar%20descriptor%3Dprops%5Bi%5D%3Bdescriptor.enumerable%3Ddescriptor.enumerable%7C%7Cfalse%3Bdescriptor.configurable%3Dtrue%3Bif(%22value%22in%20descriptor)descriptor.writable%3Dtrue%3BObject.defineProperty(target%2Cdescriptor.key%2Cdescriptor)%3B%7D%7Dreturn%20function(Constructor%2CprotoProps%2CstaticProps)%7Bif(protoProps)defineProperties(Constructor.prototype%2CprotoProps)%3Bif(staticProps)defineProperties(Constructor%2CstaticProps)%3Breturn%20Constructor%3B%7D%3B%7D()%3Bvar%20_get%3Dfunction%20get(object%2Cproperty%2Creceiver)%7Bif(object%3D%3D%3Dnull)object%3DFunction.prototype%3Bvar%20desc%3DObject.getOwnPropertyDescriptor(object%2Cproperty)%3Bif(desc%3D%3D%3Dundefined)%7Bvar%20parent%3DObject.getPrototypeOf(object)%3Bif(parent%3D%3D%3Dnull)%7Breturn%20undefined%3B%7Delse%7Breturn%20get(parent%2Cproperty%2Creceiver)%3B%7D%7Delse%20if(%22value%22in%20desc)%7Breturn%20desc.value%3B%7Delse%7Bvar%20getter%3Ddesc.get%3Bif(getter%3D%3D%3Dundefined)%7Breturn%20undefined%3B%7Dreturn%20getter.call(receiver)%3B%7D%7D%3Bfunction%20_classCallCheck(instance%2CConstructor)%7Bif(!(instance%20instanceof%20Constructor))%7Bthrow%20new%20TypeError(%22Cannot%20call%20a%20class%20as%20a%20function%22)%3B%7D%7Dfunction%20_possibleConstructorReturn(self%2Ccall)%7Bif(!self)%7Bthrow%20new%20ReferenceError(%22this%20hasn't%20been%20initialised%20-%20super()%20hasn't%20been%20called%22)%3B%7Dreturn%20call%26%26(typeof%20call%3D%3D%3D%22object%22%7C%7Ctypeof%20call%3D%3D%3D%22function%22)%3Fcall%3Aself%3B%7Dfunction%20_inherits(subClass%2CsuperClass)%7Bif(typeof%20superClass!%3D%3D%22function%22%26%26superClass!%3D%3Dnull)%7Bthrow%20new%20TypeError(%22Super%20expression%20must%20either%20be%20null%20or%20a%20function%2C%20not%20%22%2Btypeof%20superClass)%3B%7DsubClass.prototype%3DObject.create(superClass%26%26superClass.prototype%2C%7Bconstructor%3A%7Bvalue%3AsubClass%2Cenumerable%3Afalse%2Cwritable%3Atrue%2Cconfigurable%3Atrue%7D%7D)%3Bif(superClass)Object.setPrototypeOf%3FObject.setPrototypeOf(subClass%2CsuperClass)%3AsubClass.__proto__%3DsuperClass%3B%7Dvar%20PartnerOmnitureHeartbeat%3Dfunction(_window%24ga_data%24mixin)%7B_inherits(PartnerOmnitureHeartbeat%2C_window%24ga_data%24mixin)%3Bfunction%20PartnerOmnitureHeartbeat()%7B_classCallCheck(this%2CPartnerOmnitureHeartbeat)%3Breturn%20_possibleConstructorReturn(this%2C(PartnerOmnitureHeartbeat.__proto__%7C%7CObject.getPrototypeOf(PartnerOmnitureHeartbeat)).apply(this%2Carguments))%3B%7D_createClass(PartnerOmnitureHeartbeat%2C%5B%7Bkey%3A'ready'%2Cvalue%3Afunction%20ready()%7Bvar%20_this2%3Dthis%3B_get(PartnerOmnitureHeartbeat.prototype.__proto__%7C%7CObject.getPrototypeOf(PartnerOmnitureHeartbeat.prototype)%2C'ready'%2Cthis).call(this)%3BPolymer.RenderStatus.afterNextRender(this%2Cfunction()%7Breturn%20_this2._deferredWork()%3B%7D)%3B%7D%7D%2C%7Bkey%3A'_deferredWork'%2Cvalue%3Afunction%20_deferredWork()%7Bvar%20_this3%3Dthis%3Bthis.adobe%3Dthis.getNested(ga_data.site%2C'adobe')%7C%7C''%3Bif(this.adobe)%7B%2F%2F%20global%20settings%0Athis.trackingServer%3Dthis.getNested(this.adobe%2C'trackingServer')%3Bthis.trackingServerSecure%3Dthis.getNested(this.adobe%2C'trackingServerSecure')%3B%2F%2F%20hb%20settings%0Athis.hbSettings%3Dthis.getNested(this.adobe%2C'heartbeat')%7C%7C%7B%7D%3Bthis.hbTrackingServer%3Dthis.hbSettings.trackingServer%3Bthis.orgId%3Dthis.hbSettings.orgId%3Bif(!this.hbTrackingServer%7C%7C!this.orgId)return%3B%7Dthis.waitForInit('ADB').then(function()%7Bif(!_this3.videos)_this3.videos%3D%7B%7D%3B_this3.broadcast(_this3.constructor.is%2B'-ready'%2C%7Bel%3A_this3%7D)%3B%7D).catch(function()%7B_this3.track('heartbeatFailure'%2C%7Bdetails%3A'script%20failed%20to%20load.'%7D)%3B_this3.log('HeartBeat%20failed%20to%20load')%3B%7D)%3Bthis.currentUser%3Dthis._getUserInfo()%3B%7D%7D%2C%7Bkey%3A'initialize'%2Cvalue%3Afunction%20initialize(video)%7Bthis.log('Heartbeat%3A%20initialize')%3Bif(video.placementConfig.adobe)%7Bif(video.placementConfig.adobe.market)this.adobe.market%3Dvideo.placementConfig.adobe.market%3Bif(video.placementConfig.adobe.account)this.adobe.account%3Dvideo.placementConfig.adobe.account%3B%7Dthis._createHbInstance(video)%3Bthis._setupVideoEvents(video)%3B%7D%2F**%0A%20%20%20%20%20%20%20%20%20*%20HB%20State%20checks%0A%20%20%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'_isInPause'%2Cvalue%3Afunction%20_isInPause(video)%7Breturn%20this.videos%5Bvideo.experienceId%5D.hb._isInPause()%3B%7D%7D%2C%7Bkey%3A'_isInSession'%2Cvalue%3Afunction%20_isInSession(video)%7B%2F%2F%20if%20_videoInfo%20is%20not%20set%20or%20is%20destroyed%20by%20calling%20trackSessionEnd()%0Areturn%20video%26%26this.videos%5Bvideo.experienceId%5D%3Fthis.videos%5Bvideo.experienceId%5D.hb._videoInfo%3Afalse%3B%7D%7D%2C%7Bkey%3A'_adComplete'%2Cvalue%3Afunction%20_adComplete(video)%7Bif(this._isInSession(video))%7Bthis.videos%5Bvideo.experienceId%5D.hb.trackEvent(window.ADB.va.MediaHeartbeat.Event.AdComplete)%3Bthis.log('Heartbeat%3A%20adComplete%20called')%3B%2F%2F%20Need%20to%20restart%20session%20to%20pick%20up%20new%20playbackState%20if%20unlimited%20ads%0Aif(video._unlimitedAdsActive%26%26!document.hidden)%7Bthis.log('Heartbeat%3A%20Supports%20unlimited%20ads%20kill%20session')%3Bthis._endSession(video)%3B%7D%7D%7D%7D%2C%7Bkey%3A'_adSkip'%2Cvalue%3Afunction%20_adSkip(video)%7Bif(this._isInSession(video))%7B%2F%2F%20https%3A%2F%2Fmarketing.adobe.com%2Fresources%2Fhelp%2Fen_US%2Fsc%2Fappmeasurement%2Fhbvideo%2Fvod-skipped-ads.html%0Athis.videos%5Bvideo.experienceId%5D.hb.trackEvent(window.ADB.va.MediaHeartbeat.Event.AdSkip%2Cnull%2Cnull)%3Bthis.log('Heartbeat%3A%20adskip%20called')%3B%7D%7D%7D%2C%7Bkey%3A'_adStart'%2Cvalue%3Afunction%20_adStart(video)%7Bif(!this._isInSession(video))return%3Bvar%20ad%3Dvideo.Preroll.adData%2CadPosition%3Dthis.getNested(ad%2C'adPodInfo'%2C'adPosition')%7C%7C1%3B%2F%2F%20createAdBreakObject(%3CADBREAK_NAME%3E%2C%20%3CPOSITION%3E%2C%20%3CSTART_TIME%3E)%3B%0Avar%20adBreakObject%3Dwindow.ADB.va.MediaHeartbeat.createAdBreakObject(video.placement%2CadPosition%2C0)%3B%2F%2F%20createAdObject(%3CAD_NAME%3E%2C%20%3CAD_ID%3E%2C%20%3CPOSITION%3E%2C%20%3CLENGTH%3E)%3B%0Avar%20adObject%3Dwindow.ADB.va.MediaHeartbeat.createAdObject(ad.title%2Cad.adId%2CadPosition%2Cad.duration)%3Bvar%20adCustomMetadata%3D%7Baffiliate%3Aad.adSystem%2Ccampaign%3Aad.apiFramework%2Ccreative%3Aad.mediaUrl%7D%3Bthis.videos%5Bvideo.experienceId%5D.hb.trackEvent(window.ADB.va.MediaHeartbeat.Event.AdBreakStart%2CadBreakObject)%3Bthis.videos%5Bvideo.experienceId%5D.hb.trackEvent(window.ADB.va.MediaHeartbeat.Event.AdStart%2CadObject%2CadCustomMetadata)%3Bthis.log('Heartbeat%3A%20adStart%20called')%3B%7D%7D%2C%7Bkey%3A'_onPause'%2Cvalue%3Afunction%20_onPause(video)%7Bvar%20_this4%3Dthis%3Bif(this._isInSession(video))%7Bthis.videos%5Bvideo.experienceId%5D.hb.trackPause()%3Bthis.log('Heartbeat%3A%20trackPause')%3B%2F%2F%20check%20pause%20state%20after%20one%20minute%0A%2F%2F%20if%20still%20paused%20kill%20session%0A%2F%2F%20https%3A%2F%2Fmarketing.adobe.com%2Fresources%2Fhelp%2Fen_US%2Fsc%2Fappmeasurement%2Fhbvideo%2Fcookbook-app-interrupts.html%0A%2F%2F%20set%20timeout%20to%20check%20pause%20state%0Avideo.hbPauseTimeout%3DsetTimeout(function()%7Bif(_this4._isInPause(video))%7B_this4.log('Heartbeat%3A%20End%20session%2C%20timeout%20reached%2C%20asset%3A%20'%2Bvideo.data.id)%3B_this4._endSession(video)%3B%7D%7D%2C60000)%3B%7D%7D%7D%2C%7Bkey%3A'_onPlay'%2Cvalue%3Afunction%20_onPlay(video)%7Bif(this._isInSession(video))%7Bthis.videos%5Bvideo.experienceId%5D.hb.trackPlay()%3Bthis.log('Heartbeat%3A%20trackPlay')%3B%7D%7D%2F%2F%20playing%20after%20pause%20or%20stopped%20for%20buffering%0A%7D%2C%7Bkey%3A'_onPlaying'%2Cvalue%3Afunction%20_onPlaying(video)%7Bif(this._isInSession(video))%7Bthis.videos%5Bvideo.experienceId%5D.hb.trackPlay()%3B%7Dif(video.hbPauseTimeout)%7BclearTimeout(video.hbPauseTimeout)%3Bvideo.hbPauseTimeout%3Dnull%3B%7D%7D%7D%2C%7Bkey%3A'_onVisibilityChange'%2Cvalue%3Afunction%20_onVisibilityChange()%7Bvar%20_this5%3Dthis%3B%2F%2F%20loop%20through%20all%20items%20in%20this.videos%0AObject.keys(this.videos).map(function(e)%7Bvar%20video%3D_this5.videos%5Be%5D.video%3B%2F%2F%20video%20won't%20get%20set%20if%20session%20never%20started%0Aif(video%26%26_this5._isInSession(video))%7Bif(document.hidden)%7B_this5.log('Heartbeat%3A%20document.hidden%2C%20hb%20pause')%3B_this5._onPause(video)%3B%2F%2F%20pause%20on%20hidden%0A%2F%2F%20check%20to%20see%20if%20video%20is%20still%20playing%20and%20resume%20tracking%20if%20visible%0A%7Delse%20if(video.state%3D%3D%3Dvideo.states.PLAYING)%7B_this5.log('Heartbeat%3A%20!document.hidden%2C%20hb%20play')%3B_this5._onPlay(video)%3B%7D%7D%7D)%3B%7D%2F%2F%20End%20tracking%20session%20(source%20change%20i.e.%20playlist%20or%20after%20trackComplete)%0A%7D%2C%7Bkey%3A'_endSession'%2Cvalue%3Afunction%20_endSession(video)%7Bif(this._isInSession(video))%7Bthis.videos%5Bvideo.experienceId%5D.hb.trackSessionEnd()%3Bthis.log('Heartbeat%3A%20trackSessionEnd%2C%20asset%3A%20'%2Bvideo.data.id)%3B%7D%7D%7D%2C%7Bkey%3A'_trackBitrateChange'%2Cvalue%3Afunction%20_trackBitrateChange(video)%7Bif(this._isInSession(video))%7Bthis.videos%5Bvideo.experienceId%5D.hb.trackEvent(window.ADB.va.MediaHeartbeat.Event.BitrateChange%2Cthis._getQos(video))%3Bthis.log('Heartbeat%3A%20Bitrate%20Changed%20to%20'%2Bvideo.bitRate)%3B%7D%7D%2F%2F%20Fire%20complete%20event%20when%20video%20completes%0A%7D%2C%7Bkey%3A'_trackingComplete'%2Cvalue%3Afunction%20_trackingComplete(video)%7Bif(this._isInSession(video))%7Bthis.videos%5Bvideo.experienceId%5D.hb.trackComplete()%3B%2F%2F%20log%20and%20track%20complete%0Athis.log('Heartbeat%3A%20trackComplete%2C%20asset%3A%20'%2Bvideo.data.id)%3Bthis._endSession(video)%3B%7D%7D%7D%2C%7Bkey%3A'_setupVideoEvents'%2Cvalue%3Afunction%20_setupVideoEvents(video)%7Bvar%20_this6%3Dthis%3Bvideo.addEventListener('media-video-event'%2Cfunction(e)%7Bvar%20vid%3D_this6.getNested(e%2C'detail'%2C'video')%2Cevent%3D_this6.getNested(e%2C'detail'%2C'event')%3Bif(vid)%7Bif(vid.isPreroll)%7Bswitch(event)%7Bcase'preroll-skipped'%3A_this6._adSkip(vid)%3Bbreak%3B%7D%7Delse%20if(vid.isVideo)%7Bswitch(event)%7B%2F%2F%20end%20session%20when%20new%20playlist%20video%20thumb%20is%20selected%0Acase'playlist-change-video'%3A_this6._endSession(vid)%3Bbreak%3Bcase'playing'%3A_this6._onPlaying(vid)%3Bbreak%3Bcase'video-bitrate-change'%3A_this6._trackBitrateChange(vid)%3Bbreak%3B%7D%7D%7D%7D)%3Bvideo.addEventListener('state'%2Cfunction(e)%7Bvar%20vid%3D_this6.getNested(e%2C'detail'%2C'video')%3Bif(vid)%7Bswitch(vid.state)%7Bcase%20vid.states.STARTED%3A_this6._trackSessionStart(vid)%3Bbreak%3B%7Dif(vid.isPreroll)%7Bswitch(vid.state)%7Bcase%20vid.states.STARTED%3A_this6._adStart(vid)%3Bbreak%3Bcase%20vid.states.DONE%3A_this6._adComplete(vid)%3Bbreak%3B%7D%7Delse%20if(vid.isVideo)%7Bswitch(vid.state)%7Bcase%20vid.states.STARTED%3A%2F%2F%20onPlay%20is%20video%20first%20play%20only%0A_this6._onPlay(vid)%3B_this6._trackTime(vid)%3Bbreak%3Bcase%20vid.states.PAUSED%3A_this6._onPause(vid)%3Bbreak%3Bcase%20vid.states.PLAYING%3A_this6._onPlaying(vid)%3Bbreak%3Bcase%20vid.states.DONE%3A_this6._trackingComplete(vid)%3Bbreak%3B%7D%7D%7D%7D)%3B%7D%7D%2C%7Bkey%3A'_trackTime'%2Cvalue%3Afunction%20_trackTime(video)%7Bvar%20_this7%3Dthis%3Bif(this._isInSession(video))%7Bvar%20timeChange%3Dfunction%20timeChange()%7Bif(video.currentTime%3E%3Dvideo.duration*.95)%7B_this7.log('Heartbeat%3A%20New%20Relic%2095%25%20Progress%20Marker%20called%2C%20asset%3A'%2Bvideo.data.id)%3BclearInterval(video.hbTimerInterval)%3B%7D%7D%3B%2F%2F%20set%20interval%20to%20check%20playhead%20time%0Avideo.hbTimerInterval%3DsetInterval(function()%7Breturn%20timeChange()%3B%7D%2C500)%3B%7D%7D%2F%2F%20Set%20up%20Visitor%2C%20AppMeasurement%2C%20MediaHeartbeatConfig%2C%20MediaHeartbeatDelegate%20and%20MediaHeartbeat%20instance%0A%2F%2F%20Configuration%20docs%3A%20https%3A%2F%2Fmarketing.adobe.com%2Fresources%2Fhelp%2Fen_US%2Fsc%2Fappmeasurement%2Fhbvideo%2Fset-up-js.html%0A%7D%2C%7Bkey%3A'_createHbInstance'%2Cvalue%3Afunction%20_createHbInstance(video)%7Bvar%20_this8%3Dthis%3B%2F%2F%20Set-up%20the%20Visitor%20and%20AppMeasurement%20instance%0A%2F%2F%20Visitor%20included%20in%20partner-omniture%0Avar%20visitor%3Dnew%20window.Visitor.getInstance(this.orgId)%3B%2F%2F%20eslint-disable-line%20new-cap%0Avisitor.trackingServer%3Dthis.trackingServer%3Bvisitor.trackingServerSecure%3Dthis.trackingServerSecure%3B%2F%2F%20Set-up%20the%20AppMeasurement%20component%0A%2F%2F%20AppMeasurement%20included%20in%20partner-omniture%0Avar%20appMeasurement%3Dnew%20window.AppMeasurement.getInstance(this.orgId)%3B%2F%2F%20eslint-disable-line%20new-cap%0AappMeasurement.visitor%3Dvisitor%3BappMeasurement.trackingServer%3Dthis.trackingServer%3BappMeasurement.trackingServerSecure%3Dthis.trackingServerSecure%3BappMeasurement.account%3Dthis.getNested(this.adobe%2C'account')%3BappMeasurement.pageName%3Dwindow.location!%3D%3Dwindow.parent.location%3Fdocument.referrer%3Awindow.location.toString()%3BappMeasurement.charSet%3D'UTF-8'%3B%2F%2F%20heartbeat%20configs%0Avar%20mediaConfig%3Dnew%20window.ADB.va.MediaHeartbeatConfig()%3BmediaConfig.trackingServer%3Dthis.hbTrackingServer%3BmediaConfig.playerName%3Dvideo.placement%7C%7C'placeholder'%3B%2F%2FTODO%20need%20real%20placement%0AmediaConfig.channel%3Dthis.getNested(this.adobe%2C'market')%3BmediaConfig.debugLogging%3Dthis.getUrlParamValue('hb_debug')%7C%7Cfalse%3BmediaConfig.appVersion%3D'UW%3A'%2Bga_data.server.clientVersion%2B'%3A'%2Bga_data.site.uaid%2B'%3Aheartbeat'%3BmediaConfig.ssl%3Dtrue%3BmediaConfig.ovp%3D'HTML5'%3B%2F%2F%20Set-up%20Media%20Heartbeat%20Delegate%0Avar%20mediaDelegate%3Dnew%20window.ADB.va.MediaHeartbeatDelegate()%3B%2F%2F%20return%20current%20playback%20time%20to%20mediaDelegate%0AmediaDelegate.getCurrentPlaybackTime%3Dfunction()%7Breturn%20video.currentTime%3B%7D%3B%2F%2F%20return%20QOS%20to%20mediaDelegate%0AmediaDelegate.getQoSObject%3Dfunction()%7Bif(video.isVideo)%7Breturn%20_this8._getQos(video)%3B%7D%7D%3B%2F%2F%20Create%20mediaHeartbeat%20instance%0Athis.videos%5Bvideo.experienceId%5D%3D%7Bhb%3Anew%20window.ADB.va.MediaHeartbeat(mediaDelegate%2CmediaConfig%2CappMeasurement)%7D%3Bthis.log('Heartbeat%3A%20mediaHeartbeat%20instance%20created%2C%20placement%3A%20'%2Bvideo.placement)%3B%2F%2F%20track%20visibility%20changes%0Adocument.addEventListener('visibilitychange'%2Cfunction()%7Breturn%20_this8._onVisibilityChange()%3B%7D)%3B%7D%7D%2C%7Bkey%3A'_getQos'%2Cvalue%3Afunction%20_getQos(video)%7Bvar%20vid%3Dvideo.videoTag%2CplaybackQuality%3Dvid.getVideoPlaybackQuality%3Fvid.getVideoPlaybackQuality()%3Avid.videoPlaybackQuality%2CdroppedFrames%3DplaybackQuality%3FplaybackQuality.droppedVideoFrames%3Avid.webkitDroppedFrameCount%2Cbitrate%3Dvideo.bitRate%2Cfps%3D30%2C%2F%2F%20default%20fps%20from%20google%20transcoding%0Astartuptime%3Dvideo.markers.perceivedLoadTime%3Fvideo.markers.perceivedLoadTime%3A0%3Breturn%20window.ADB.va.MediaHeartbeat.createQoSObject(bitrate%2Cstartuptime%2Cfps%2CdroppedFrames)%3B%7D%7D%2C%7Bkey%3A'_getDate'%2Cvalue%3Afunction%20_getDate(dateCreated)%7B%2F%2F%20For%20Web-API%20calls%2C%20strip%20AM%7CPM%20else%20%22Invalid%20Date%22%20is%20returned%0Avar%20d%3Dnew%20Date(dateCreated.replace(%2FAM%7CPM%2Fi%2C''))%2Czero%3Dfunction%20zero(val)%7Breturn%20val%3C10%3F'0'%2Bval%3Aval%3B%7D%3Breturn%7Bminutes%3Azero(d.getMinutes())%2Chours%3Azero(d.getHours())%2Cday%3Azero(d.getDate())%2Cmonth%3Azero(d.getMonth()%2B1)%2Cyear%3Ad.getFullYear()%7D%3B%7D%7D%2C%7Bkey%3A'_getUserInfo'%2Cvalue%3Afunction%20_getUserInfo()%7Bvar%20userLocalData%3Dthis.getNested(Gallium%2C'userLocalData')%3Bif(userLocalData.response%26%26Object.keys(userLocalData.response).length)%7Breturn%20userLocalData%3B%7D%7D%7D%2C%7Bkey%3A'_trackSessionStart'%2Cvalue%3Afunction%20_trackSessionStart(video)%7Bif(this._isInSession(video))return%3Bvideo.log('Heartbeat%3A%20_trackSessionStart%20Called')%3Bvar%20_getLocation%3Dthis.getLocation(video.data.url)%2Chost%3D_getLocation.host%2Cpath%3D_getLocation.path%2C_getDate2%3Dthis._getDate(video.data.dateCreated)%2Cminutes%3D_getDate2.minutes%2Chours%3D_getDate2.hours%2Cday%3D_getDate2.day%2Cmonth%3D_getDate2.month%2Cyear%3D_getDate2.year%2CgetNested%3Dga_data.utils.getNested%2CmediaInfo%3Dwindow.ADB.va.MediaHeartbeat.createMediaObject(video.data.title%2C%2F%2F%20%3CVIDEO_NAME%3E%0AString(video.data.id)%2C%2F%2F%20%3CVIDEO_ID%3E%0Avideo.duration%7C%7Cvideo.data.coreDuration%2C%2F%2F%20%3CVIDEO_LENGTH%3E%0Awindow.ADB.va.MediaHeartbeat.StreamType.VOD)%2Cssts%3Dvideo.data.ssts%2CcustomMeta%3D%7Bauthor%3Avideo.data.author%2CcontentProtectionState%3AgetNested(ga_data.route%2C'cam'%2C'contentProtectionState')%2Ccredit%3Avideo.data.credit%2Cdate%3Ayear%2B'-'%2Bmonth%2B'-'%2Bday%2CdateCreated%3Avideo.data.dateCreated%2CgannettTracking%3Avideo.data.gannettTracking%2Ckeywords%3Avideo.data.keywords%2Cmarket%3Athis.getNested(this.adobe%2C'market')%2Corigin%3Avideo.data.origin%2Coriginator%3Ahost%2CpageUrl%3Athis.videos%5Bvideo.experienceId%5D.hb._appMeasurement.pageName%2Cplatform%3Avideo.placementConfig.platform%2CplaybackState%3Avideo._playbackState%2CplaylistCount%3Avideo.playlistIndex%2B1%2C%2F%2F%20index%20is%200%20based%2C%20analytics%20aren't%2C%0AplaylistTitle%3Avideo.playlistTitle%2CpublicationName%3Aga_data.site.publicationName%2Crecommendedvideo%3Avideo.data.recommendedBy%2Csection%3Assts.section%2CsiteId%3Aga_data.site.siteId%2Cssts%3Avideo.sstsToString(ssts)%2Csubsection%3Assts.subsection%2Csubtopic%3Assts.subtopic%2Ctime%3Ahours%2B'%3A'%2Bminutes%2Ctopic%3Assts.topic%2Ctype%3Avideo.data.irisVideoAd%2Cvariant%3Avideo.variant%2CvideoPath%3Apath%2CvideoUrl%3Avideo.data.url%2C%2F%2F%20user%20related%20meta%0AanonymousId%3AgetNested(this.currentUser%2C'response'%2C'anonymousId')%2C%2F%2F%20GUP%20User%20info%20follows%0AclientID%3Athis._getClientId()%2Ccohort%3AgetNested(this.currentUser%2C'response'%2C'insights'%2C'cohort')%2CdynamicPaywallSegments%3Athis._getPaywallSegment()%2CfireflyUserId%3AgetNested(this.currentUser%2C'response'%2C'user'%2C'fireflyUserId')%2CuserLicenseType%3AgetNested(this.currentUser%2C'response'%2C'user'%2C'userLicenseType')%2C%2F%2F%20User%20Status%20%2F%2F%20FIXME%3A%20Needs%20more%20logic%0AuserScroll%3Aga_data.utils.scrollUserDetected()%3F'subscriber'%3A'none'%2CuserType%3Athis._getUserType(this.currentUser)%7D%3B%2F%2F%20Set%20standard%20Video%20Metadata%0Avar%20standardVideoMetadata%3D%7B%7D%2Ckeys%3Dwindow.ADB.va.MediaHeartbeat.VideoMetadataKeys%3BstandardVideoMetadata%5Bkeys.ASSET_ID%5D%3Dvideo.data.id%3BstandardVideoMetadata%5Bkeys.EPISODE%5D%3Dga_data.site.publicationName%3BstandardVideoMetadata%5Bkeys.FEED%5D%3Dvideo.data.url%3BstandardVideoMetadata%5Bkeys.FIRST_DIGITAL_DATE%5D%3Dvideo.data.dateCreated%3BstandardVideoMetadata%5Bkeys.GENRE%5D%3DcustomMeta.ssts%3BstandardVideoMetadata%5Bkeys.NETWORK%5D%3Dvideo.data.origin%3BstandardVideoMetadata%5Bkeys.ORIGINATOR%5D%3Dhost%3BstandardVideoMetadata%5Bkeys.SHOW%5D%3Dvideo.data.keywords%3BstandardVideoMetadata%5Bkeys.SHOW_TYPE%5D%3Dvideo.placementConfig.platform%3BmediaInfo.setValue(window.ADB.va.MediaHeartbeat.MediaObjectKey.StandardVideoMetadata%2CstandardVideoMetadata)%3Bthis.videos%5Bvideo.experienceId%5D.video%3Dvideo%3Bthis.videos%5Bvideo.experienceId%5D.hb.trackSessionStart(mediaInfo%2CcustomMeta)%3B%2F%2F%20Content%20starts%20logging%0Athis.log('Heartbeat%3A%20trackSessionStart%2C%20asset%3A%20'%2Bvideo.data.id)%3B%7D%7D%5D%2C%5B%7Bkey%3A'is'%2C%2F%2F%20eslint-disable-line%20new-cap%0Aget%3Afunction%20get()%7Breturn'partner-omniture-heartbeat-media-video'%3B%7D%7D%5D)%3Breturn%20PartnerOmnitureHeartbeat%3B%7D(window.ga_data.mixins.VideoUtils(Polymer.mixinBehaviors(%5Bwindow.ga_data.behaviors.GalliumElement%2Cwindow.ga_data.behaviors.AnalyticsElementBehavior%5D%2CPolymer.Element)))%3BcustomElements.define(PartnerOmnitureHeartbeat.is%2CPartnerOmnitureHeartbeat)%3B%0A%2F%2F%23%20sourceMappingURL%3D..%2F..%2F..%2Fmaps%2Felements%2Fpartner%2Fpartner-omniture-heartbeat-media-video%2Fpartner-omniture-heartbeat-media-video.html_script_0.js.map%0A%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Fcpt-static.gannettdigital.com%2Funiversal-web-client%2Fmaster%2Flatest%2Felements%2Fpartner%2Fpartner-omniture-heartbeat-media-video%2Fpartner-omniture-heartbeat-media-video.html.js%0A | 17 kB | 2023-03-13 | 2023-03-14 | |
Pretty
Loading... | ||||
cpt-static.gannettdigital.com/universal-web-client/master/latest/vendor/components/webcomponentsjs/webcomponents-hi.js | 11 kB | 2023-03-07 | 2024-04-05 | |
Pretty
Loading... | ||||
http:text/javascript;charset=utf-8,(function()%7B'use%20strict'%3B%2F%2F%20Microtask%20implemented%20using%20Mutation%20Observer%0Avar%20microtaskCurrHandle%3D0%3Bvar%20microtaskLastHandle%3D0%3Bvar%20microtaskCallbacks%3D%5B%5D%3Bvar%20microtaskNodeContent%3D0%3Bvar%20microtaskNode%3Ddocument.createTextNode('')%3Bnew%20window.MutationObserver(microtaskFlush).observe(microtaskNode%2C%7BcharacterData%3Atrue%7D)%3Bfunction%20microtaskFlush()%7Bvar%20len%3DmicrotaskCallbacks.length%3Bfor(var%20i%3D0%3Bi%3Clen%3Bi%2B%2B)%7Bvar%20cb%3DmicrotaskCallbacks%5Bi%5D%3Bif(cb)%7Btry%7Bcb()%3B%7Dcatch(e)%7BsetTimeout(function()%7Bthrow%20e%3B%7D)%3B%7D%7D%7DmicrotaskCallbacks.splice(0%2Clen)%3BmicrotaskLastHandle%2B%3Dlen%3B%7D%2F**%0A%20%20%20*%20Module%20that%20provides%20a%20number%20of%20strategies%20for%20enqueuing%20asynchronous%0A%20%20%20*%20tasks.%20%20Each%20sub-module%20provides%20a%20standard%20%60run(fn)%60%20interface%20that%20returns%20a%0A%20%20%20*%20handle%2C%20and%20a%20%60cancel(handle)%60%20interface%20for%20canceling%20async%20tasks%20before%0A%20%20%20*%20they%20run.%0A%20%20%20*%0A%20%20%20*%20%40namespace%0A%20%20%20*%20%40memberof%20Polymer%0A%20%20%20*%20%40summary%20Module%20that%20provides%20a%20number%20of%20strategies%20for%20enqueuing%20asynchronous%0A%20%20%20*%20tasks.%0A%20%20%20*%2FPolymer.Async%3D%7B%2F**%0A%20%20%20%20%20*%20Async%20interface%20wrapper%20around%20%60setTimeout%60.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40namespace%0A%20%20%20%20%20*%20%40memberof%20Polymer.Async%0A%20%20%20%20%20*%20%40summary%20Async%20interface%20wrapper%20around%20%60setTimeout%60.%0A%20%20%20%20%20*%2FtimeOut%3A%7B%2F**%0A%20%20%20%20%20%20%20*%20Returns%20a%20sub-module%20with%20the%20async%20interface%20providing%20the%20provided%0A%20%20%20%20%20%20%20*%20delay.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40memberof%20Polymer.Async.timeOut%0A%20%20%20%20%20%20%20*%20%40param%20%7Bnumber%3D%7D%20delay%20Time%20to%20wait%20before%20calling%20callbacks%20in%20ms%0A%20%20%20%20%20%20%20*%20%40return%20%7B!AsyncInterface%7D%20An%20async%20timeout%20interface%0A%20%20%20%20%20%20%20*%2Fafter%3Afunction%20after(delay)%7Breturn%7Brun%3Afunction%20run(fn)%7Breturn%20window.setTimeout(fn%2Cdelay)%3B%7D%2Ccancel%3Afunction%20cancel(handle)%7Bwindow.clearTimeout(handle)%3B%7D%7D%3B%7D%2C%2F**%0A%20%20%20%20%20%20%20*%20Enqueues%20a%20function%20called%20in%20the%20next%20task.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40memberof%20Polymer.Async.timeOut%0A%20%20%20%20%20%20%20*%20%40param%20%7B!Function%7D%20fn%20Callback%20to%20run%0A%20%20%20%20%20%20%20*%20%40param%20%7Bnumber%3D%7D%20delay%20Delay%20in%20milliseconds%0A%20%20%20%20%20%20%20*%20%40return%20%7Bnumber%7D%20Handle%20used%20for%20canceling%20task%0A%20%20%20%20%20%20%20*%2Frun%3Afunction%20run(fn%2Cdelay)%7Breturn%20window.setTimeout(fn%2Cdelay)%3B%7D%2C%2F**%0A%20%20%20%20%20%20%20*%20Cancels%20a%20previously%20enqueued%20%60timeOut%60%20callback.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40memberof%20Polymer.Async.timeOut%0A%20%20%20%20%20%20%20*%20%40param%20%7Bnumber%7D%20handle%20Handle%20returned%20from%20%60run%60%20of%20callback%20to%20cancel%0A%20%20%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20%20%20*%2Fcancel%3Afunction%20cancel(handle)%7Bwindow.clearTimeout(handle)%3B%7D%7D%2C%2F**%0A%20%20%20%20%20*%20Async%20interface%20wrapper%20around%20%60requestAnimationFrame%60.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40namespace%0A%20%20%20%20%20*%20%40memberof%20Polymer.Async%0A%20%20%20%20%20*%20%40summary%20Async%20interface%20wrapper%20around%20%60requestAnimationFrame%60.%0A%20%20%20%20%20*%2FanimationFrame%3A%7B%2F**%0A%20%20%20%20%20%20%20*%20Enqueues%20a%20function%20called%20at%20%60requestAnimationFrame%60%20timing.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40memberof%20Polymer.Async.animationFrame%0A%20%20%20%20%20%20%20*%20%40param%20%7Bfunction(number)%3Avoid%7D%20fn%20Callback%20to%20run%0A%20%20%20%20%20%20%20*%20%40return%20%7Bnumber%7D%20Handle%20used%20for%20canceling%20task%0A%20%20%20%20%20%20%20*%2Frun%3Afunction%20run(fn)%7Breturn%20window.requestAnimationFrame(fn)%3B%7D%2C%2F**%0A%20%20%20%20%20%20%20*%20Cancels%20a%20previously%20enqueued%20%60animationFrame%60%20callback.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40memberof%20Polymer.Async.animationFrame%0A%20%20%20%20%20%20%20*%20%40param%20%7Bnumber%7D%20handle%20Handle%20returned%20from%20%60run%60%20of%20callback%20to%20cancel%0A%20%20%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20%20%20*%2Fcancel%3Afunction%20cancel(handle)%7Bwindow.cancelAnimationFrame(handle)%3B%7D%7D%2C%2F**%0A%20%20%20%20%20*%20Async%20interface%20wrapper%20around%20%60requestIdleCallback%60.%20%20Falls%20back%20to%0A%20%20%20%20%20*%20%60setTimeout%60%20on%20browsers%20that%20do%20not%20support%20%60requestIdleCallback%60.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40namespace%0A%20%20%20%20%20*%20%40memberof%20Polymer.Async%0A%20%20%20%20%20*%20%40summary%20Async%20interface%20wrapper%20around%20%60requestIdleCallback%60.%0A%20%20%20%20%20*%2FidlePeriod%3A%7B%2F**%0A%20%20%20%20%20%20%20*%20Enqueues%20a%20function%20called%20at%20%60requestIdleCallback%60%20timing.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40memberof%20Polymer.Async.idlePeriod%0A%20%20%20%20%20%20%20*%20%40param%20%7Bfunction(!IdleDeadline)%3Avoid%7D%20fn%20Callback%20to%20run%0A%20%20%20%20%20%20%20*%20%40return%20%7Bnumber%7D%20Handle%20used%20for%20canceling%20task%0A%20%20%20%20%20%20%20*%2Frun%3Afunction%20run(fn)%7Breturn%20window.requestIdleCallback%3Fwindow.requestIdleCallback(fn)%3Awindow.setTimeout(fn%2C16)%3B%7D%2C%2F**%0A%20%20%20%20%20%20%20*%20Cancels%20a%20previously%20enqueued%20%60idlePeriod%60%20callback.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40memberof%20Polymer.Async.idlePeriod%0A%20%20%20%20%20%20%20*%20%40param%20%7Bnumber%7D%20handle%20Handle%20returned%20from%20%60run%60%20of%20callback%20to%20cancel%0A%20%20%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20%20%20*%2Fcancel%3Afunction%20cancel(handle)%7Bwindow.cancelIdleCallback%3Fwindow.cancelIdleCallback(handle)%3Awindow.clearTimeout(handle)%3B%7D%7D%2C%2F**%0A%20%20%20%20%20*%20Async%20interface%20for%20enqueuing%20callbacks%20that%20run%20at%20microtask%20timing.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20Note%20that%20microtask%20timing%20is%20achieved%20via%20a%20single%20%60MutationObserver%60%2C%0A%20%20%20%20%20*%20and%20thus%20callbacks%20enqueued%20with%20this%20API%20will%20all%20run%20in%20a%20single%0A%20%20%20%20%20*%20batch%2C%20and%20not%20interleaved%20with%20other%20microtasks%20such%20as%20promises.%0A%20%20%20%20%20*%20Promises%20are%20avoided%20as%20an%20implementation%20choice%20for%20the%20time%20being%0A%20%20%20%20%20*%20due%20to%20Safari%20bugs%20that%20cause%20Promises%20to%20lack%20microtask%20guarantees.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40namespace%0A%20%20%20%20%20*%20%40memberof%20Polymer.Async%0A%20%20%20%20%20*%20%40summary%20Async%20interface%20for%20enqueuing%20callbacks%20that%20run%20at%20microtask%0A%20%20%20%20%20*%20%20%20timing.%0A%20%20%20%20%20*%2FmicroTask%3A%7B%2F**%0A%20%20%20%20%20%20%20*%20Enqueues%20a%20function%20called%20at%20microtask%20timing.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40memberof%20Polymer.Async.microTask%0A%20%20%20%20%20%20%20*%20%40param%20%7B!Function%3D%7D%20callback%20Callback%20to%20run%0A%20%20%20%20%20%20%20*%20%40return%20%7Bnumber%7D%20Handle%20used%20for%20canceling%20task%0A%20%20%20%20%20%20%20*%2Frun%3Afunction%20run(callback)%7BmicrotaskNode.textContent%3DmicrotaskNodeContent%2B%2B%3BmicrotaskCallbacks.push(callback)%3Breturn%20microtaskCurrHandle%2B%2B%3B%7D%2C%2F**%0A%20%20%20%20%20%20%20*%20Cancels%20a%20previously%20enqueued%20%60microTask%60%20callback.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40memberof%20Polymer.Async.microTask%0A%20%20%20%20%20%20%20*%20%40param%20%7Bnumber%7D%20handle%20Handle%20returned%20from%20%60run%60%20of%20callback%20to%20cancel%0A%20%20%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20%20%20*%2Fcancel%3Afunction%20cancel(handle)%7Bvar%20idx%3Dhandle-microtaskLastHandle%3Bif(idx%3E%3D0)%7Bif(!microtaskCallbacks%5Bidx%5D)%7Bthrow%20new%20Error('invalid%20async%20handle%3A%20'%2Bhandle)%3B%7DmicrotaskCallbacks%5Bidx%5D%3Dnull%3B%7D%7D%7D%7D%3B%7D)()%3B%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Fcpt-static.gannettdigital.com%2Funiversal-web-client%2Fmaster%2Flatest%2Fvendor%2Fcomponents%2Fpolymer%2Flib%2Futils%2Fasync.html.js%0A | 5.7 kB | 2023-03-07 | 2024-01-25 | |
Pretty
Loading... | ||||
http:text/javascript;charset=utf-8,(function()%7B'use%20strict'%3B%2F%2F%20unresolved%0Afunction%20resolve()%7Bdocument.body.removeAttribute('unresolved')%3B%7Dif(window.WebComponents)%7Bwindow.addEventListener('WebComponentsReady'%2Cresolve)%3B%7Delse%7Bif(document.readyState%3D%3D%3D'interactive'%7C%7Cdocument.readyState%3D%3D%3D'complete')%7Bresolve()%3B%7Delse%7Bwindow.addEventListener('DOMContentLoaded'%2Cresolve)%3B%7D%7D%7D)()%3B%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Fcpt-static.gannettdigital.com%2Funiversal-web-client%2Fmaster%2Flatest%2Fvendor%2Fcomponents%2Fpolymer%2Flib%2Futils%2Funresolved.html.js%0A | 480 B | 2023-03-07 | 2024-01-25 | |
Pretty
Loading... | ||||
http:text/javascript;charset=utf-8,(function()%7B'use%20strict'%3B%2F%2F%20unique%20global%20id%20for%20deduping%20mixins.%0Avar%20dedupeId%3D0%3B%2F**%0A%20%20%20*%20%40constructor%0A%20%20%20*%20%40extends%20%7BFunction%7D%0A%20%20%20*%20%40private%0A%20%20%20*%2Ffunction%20MixinFunction()%7B%7D%2F**%20%40type%20%7B(WeakMap%20%7C%20undefined)%7D%20*%2FMixinFunction.prototype.__mixinApplications%3B%2F**%20%40type%20%7B(Object%20%7C%20undefined)%7D%20*%2FMixinFunction.prototype.__mixinSet%3B%2F*%20eslint-disable%20valid-jsdoc%20*%2F%2F**%0A%20%20%20*%20Wraps%20an%20ES6%20class%20expression%20mixin%20such%20that%20the%20mixin%20is%20only%20applied%0A%20%20%20*%20if%20it%20has%20not%20already%20been%20applied%20its%20base%20argument.%20Also%20memoizes%20mixin%0A%20%20%20*%20applications.%0A%20%20%20*%0A%20%20%20*%20%40memberof%20Polymer%0A%20%20%20*%20%40template%20T%0A%20%20%20*%20%40param%20%7BT%7D%20mixin%20ES6%20class%20expression%20mixin%20to%20wrap%0A%20%20%20*%20%40return%20%7BT%7D%0A%20%20%20*%20%40suppress%20%7BinvalidCasts%7D%0A%20%20%20*%2FPolymer.dedupingMixin%3Dfunction(mixin)%7Bvar%20mixinApplications%3D%2F**%20%40type%20%7B!MixinFunction%7D%20*%2Fmixin.__mixinApplications%3Bif(!mixinApplications)%7BmixinApplications%3Dnew%20WeakMap()%3B%2F**%20%40type%20%7B!MixinFunction%7D%20*%2Fmixin.__mixinApplications%3DmixinApplications%3B%7D%2F%2F%20maintain%20a%20unique%20id%20for%20each%20mixin%0Avar%20mixinDedupeId%3DdedupeId%2B%2B%3Bfunction%20dedupingMixin(base)%7Bvar%20baseSet%3D%2F**%20%40type%20%7B!MixinFunction%7D%20*%2Fbase.__mixinSet%3Bif(baseSet%26%26baseSet%5BmixinDedupeId%5D)%7Breturn%20base%3B%7Dvar%20map%3DmixinApplications%3Bvar%20extended%3Dmap.get(base)%3Bif(!extended)%7Bextended%3D%2F**%20%40type%20%7B!Function%7D%20*%2Fmixin(base)%3Bmap.set(base%2Cextended)%3B%7D%2F%2F%20copy%20inherited%20mixin%20set%20from%20the%20extended%20class%2C%20or%20the%20base%20class%0A%2F%2F%20NOTE%3A%20we%20avoid%20use%20of%20Set%20here%20because%20some%20browser%20(IE11)%0A%2F%2F%20cannot%20extend%20a%20base%20Set%20via%20the%20constructor.%0Avar%20mixinSet%3DObject.create(%2F**%20%40type%20%7B!MixinFunction%7D%20*%2Fextended.__mixinSet%7C%7CbaseSet%7C%7Cnull)%3BmixinSet%5BmixinDedupeId%5D%3Dtrue%3B%2F**%20%40type%20%7B!MixinFunction%7D%20*%2Fextended.__mixinSet%3DmixinSet%3Breturn%20extended%3B%7Dreturn(%2F**%20%40type%20%7BT%7D%20*%2FdedupingMixin)%3B%7D%3B%2F*%20eslint-enable%20valid-jsdoc%20*%2F%7D)()%3B%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Fcpt-static.gannettdigital.com%2Funiversal-web-client%2Fmaster%2Flatest%2Fvendor%2Fcomponents%2Fpolymer%2Flib%2Futils%2Fmixin.html.js%0A | 1.9 kB | 2023-03-07 | 2024-01-25 | |
Pretty
Loading... | ||||
http:text/javascript;charset=utf-8,var%20_get%3Dfunction%20get(object%2Cproperty%2Creceiver)%7Bif(object%3D%3D%3Dnull)object%3DFunction.prototype%3Bvar%20desc%3DObject.getOwnPropertyDescriptor(object%2Cproperty)%3Bif(desc%3D%3D%3Dundefined)%7Bvar%20parent%3DObject.getPrototypeOf(object)%3Bif(parent%3D%3D%3Dnull)%7Breturn%20undefined%3B%7Delse%7Breturn%20get(parent%2Cproperty%2Creceiver)%3B%7D%7Delse%20if(%22value%22in%20desc)%7Breturn%20desc.value%3B%7Delse%7Bvar%20getter%3Ddesc.get%3Bif(getter%3D%3D%3Dundefined)%7Breturn%20undefined%3B%7Dreturn%20getter.call(receiver)%3B%7D%7D%3Bvar%20_createClass%3Dfunction()%7Bfunction%20defineProperties(target%2Cprops)%7Bfor(var%20i%3D0%3Bi%3Cprops.length%3Bi%2B%2B)%7Bvar%20descriptor%3Dprops%5Bi%5D%3Bdescriptor.enumerable%3Ddescriptor.enumerable%7C%7Cfalse%3Bdescriptor.configurable%3Dtrue%3Bif(%22value%22in%20descriptor)descriptor.writable%3Dtrue%3BObject.defineProperty(target%2Cdescriptor.key%2Cdescriptor)%3B%7D%7Dreturn%20function(Constructor%2CprotoProps%2CstaticProps)%7Bif(protoProps)defineProperties(Constructor.prototype%2CprotoProps)%3Bif(staticProps)defineProperties(Constructor%2CstaticProps)%3Breturn%20Constructor%3B%7D%3B%7D()%3Bfunction%20_classCallCheck(instance%2CConstructor)%7Bif(!(instance%20instanceof%20Constructor))%7Bthrow%20new%20TypeError(%22Cannot%20call%20a%20class%20as%20a%20function%22)%3B%7D%7Dfunction%20_possibleConstructorReturn(self%2Ccall)%7Bif(!self)%7Bthrow%20new%20ReferenceError(%22this%20hasn't%20been%20initialised%20-%20super()%20hasn't%20been%20called%22)%3B%7Dreturn%20call%26%26(typeof%20call%3D%3D%3D%22object%22%7C%7Ctypeof%20call%3D%3D%3D%22function%22)%3Fcall%3Aself%3B%7Dfunction%20_inherits(subClass%2CsuperClass)%7Bif(typeof%20superClass!%3D%3D%22function%22%26%26superClass!%3D%3Dnull)%7Bthrow%20new%20TypeError(%22Super%20expression%20must%20either%20be%20null%20or%20a%20function%2C%20not%20%22%2Btypeof%20superClass)%3B%7DsubClass.prototype%3DObject.create(superClass%26%26superClass.prototype%2C%7Bconstructor%3A%7Bvalue%3AsubClass%2Cenumerable%3Afalse%2Cwritable%3Atrue%2Cconfigurable%3Atrue%7D%7D)%3Bif(superClass)Object.setPrototypeOf%3FObject.setPrototypeOf(subClass%2CsuperClass)%3AsubClass.__proto__%3DsuperClass%3B%7D(function()%7B'use%20strict'%3B%2F**%0A%20%20%20*%20The%20%60%3Cdom-if%3E%60%20element%20will%20stamp%20a%20light-dom%20%60%3Ctemplate%3E%60%20child%20when%0A%20%20%20*%20the%20%60if%60%20property%20becomes%20truthy%2C%20and%20the%20template%20can%20use%20Polymer%0A%20%20%20*%20data-binding%20and%20declarative%20event%20features%20when%20used%20in%20the%20context%20of%0A%20%20%20*%20a%20Polymer%20element's%20template.%0A%20%20%20*%0A%20%20%20*%20When%20%60if%60%20becomes%20falsy%2C%20the%20stamped%20content%20is%20hidden%20but%20not%0A%20%20%20*%20removed%20from%20dom.%20When%20%60if%60%20subsequently%20becomes%20truthy%20again%2C%20the%20content%0A%20%20%20*%20is%20simply%20re-shown.%20This%20approach%20is%20used%20due%20to%20its%20favorable%20performance%0A%20%20%20*%20characteristics%3A%20the%20expense%20of%20creating%20template%20content%20is%20paid%20only%0A%20%20%20*%20once%20and%20lazily.%0A%20%20%20*%0A%20%20%20*%20Set%20the%20%60restamp%60%20property%20to%20true%20to%20force%20the%20stamped%20content%20to%20be%0A%20%20%20*%20created%20%2F%20destroyed%20when%20the%20%60if%60%20condition%20changes.%0A%20%20%20*%0A%20%20%20*%20%40customElement%0A%20%20%20*%20%40polymer%0A%20%20%20*%20%40extends%20Polymer.Element%0A%20%20%20*%20%40memberof%20Polymer%0A%20%20%20*%20%40summary%20Custom%20element%20that%20conditionally%20stamps%20and%20hides%20or%20removes%0A%20%20%20*%20%20%20template%20content%20based%20on%20a%20boolean%20flag.%0A%20%20%20*%2Fvar%20DomIf%3Dfunction(_Polymer%24Element)%7B_inherits(DomIf%2C_Polymer%24Element)%3B_createClass(DomIf%2Cnull%2C%5B%7Bkey%3A'is'%2C%2F%2F%20Not%20needed%20to%20find%20template%3B%20can%20be%20removed%20once%20the%20analyzer%0A%2F%2F%20can%20find%20the%20tag%20name%20from%20customElements.define%20call%0Aget%3Afunction%20get()%7Breturn'dom-if'%3B%7D%7D%2C%7Bkey%3A'template'%2Cget%3Afunction%20get()%7Breturn%20null%3B%7D%7D%2C%7Bkey%3A'properties'%2Cget%3Afunction%20get()%7Breturn%7B%2F**%0A%20%20%20%20%20%20%20%20%20*%20Fired%20whenever%20DOM%20is%20added%20or%20removed%2Fhidden%20by%20this%20template%20(by%0A%20%20%20%20%20%20%20%20%20*%20default%2C%20rendering%20occurs%20lazily).%20%20To%20force%20immediate%20rendering%2C%20call%0A%20%20%20%20%20%20%20%20%20*%20%60render%60.%0A%20%20%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20%20%20*%20%40event%20dom-change%0A%20%20%20%20%20%20%20%20%20*%2F%2F**%0A%20%20%20%20%20%20%20%20%20*%20A%20boolean%20indicating%20whether%20this%20template%20should%20stamp.%0A%20%20%20%20%20%20%20%20%20*%2Fif%3A%7Btype%3ABoolean%2Cobserver%3A'__debounceRender'%7D%2C%2F**%0A%20%20%20%20%20%20%20%20%20*%20When%20true%2C%20elements%20will%20be%20removed%20from%20DOM%20and%20discarded%20when%20%60if%60%0A%20%20%20%20%20%20%20%20%20*%20becomes%20false%20and%20re-created%20and%20added%20back%20to%20the%20DOM%20when%20%60if%60%0A%20%20%20%20%20%20%20%20%20*%20becomes%20true.%20%20By%20default%2C%20stamped%20elements%20will%20be%20hidden%20but%20left%0A%20%20%20%20%20%20%20%20%20*%20in%20the%20DOM%20when%20%60if%60%20becomes%20false%2C%20which%20is%20generally%20results%0A%20%20%20%20%20%20%20%20%20*%20in%20better%20performance.%0A%20%20%20%20%20%20%20%20%20*%2Frestamp%3A%7Btype%3ABoolean%2Cobserver%3A'__debounceRender'%7D%7D%3B%7D%7D%5D)%3Bfunction%20DomIf()%7B_classCallCheck(this%2CDomIf)%3Bvar%20_this%3D_possibleConstructorReturn(this%2C(DomIf.__proto__%7C%7CObject.getPrototypeOf(DomIf)).call(this))%3B_this.__renderDebouncer%3Dnull%3B_this.__invalidProps%3Dnull%3B_this.__instance%3Dnull%3B_this._lastIf%3Dfalse%3B_this.__ctor%3Dnull%3Breturn%20_this%3B%7D_createClass(DomIf%2C%5B%7Bkey%3A'__debounceRender'%2Cvalue%3Afunction%20__debounceRender()%7Bvar%20_this2%3Dthis%3B%2F%2F%20Render%20is%20async%20for%202%20reasons%3A%0A%2F%2F%201.%20To%20eliminate%20dom%20creation%20trashing%20if%20user%20code%20thrashes%20%60if%60%20in%20the%0A%2F%2F%20%20%20%20same%20turn.%20This%20was%20more%20common%20in%201.x%20where%20a%20compound%20computed%0A%2F%2F%20%20%20%20property%20could%20result%20in%20the%20result%20changing%20multiple%20times%2C%20but%20is%0A%2F%2F%20%20%20%20mitigated%20to%20a%20large%20extent%20by%20batched%20property%20processing%20in%202.x.%0A%2F%2F%202.%20To%20avoid%20double%20object%20propagation%20when%20a%20bag%20including%20values%20bound%0A%2F%2F%20%20%20%20to%20the%20%60if%60%20property%20as%20well%20as%20one%20or%20more%20hostProps%20could%20enqueue%0A%2F%2F%20%20%20%20the%20%3Cdom-if%3E%20to%20flush%20before%20the%20%3Ctemplate%3E's%20host%20property%0A%2F%2F%20%20%20%20forwarding.%20In%20that%20scenario%20creating%20an%20instance%20would%20result%20in%0A%2F%2F%20%20%20%20the%20host%20props%20being%20set%20once%2C%20and%20then%20the%20enqueued%20changes%20on%20the%0A%2F%2F%20%20%20%20template%20would%20set%20properties%20a%20second%20time%2C%20potentially%20causing%20an%0A%2F%2F%20%20%20%20object%20to%20be%20set%20to%20an%20instance%20more%20than%20once.%20%20Creating%20the%0A%2F%2F%20%20%20%20instance%20async%20from%20flushing%20data%20ensures%20this%20doesn't%20happen.%20If%0A%2F%2F%20%20%20%20we%20wanted%20a%20sync%20option%20in%20the%20future%2C%20simply%20having%20%3Cdom-if%3E%20flush%0A%2F%2F%20%20%20%20(or%20clear)%20its%20template's%20pending%20host%20properties%20before%20creating%0A%2F%2F%20%20%20%20the%20instance%20would%20also%20avoid%20the%20problem.%0Athis.__renderDebouncer%3DPolymer.Debouncer.debounce(this.__renderDebouncer%2CPolymer.Async.microTask%2Cfunction()%7Breturn%20_this2.__render()%3B%7D)%3BPolymer.enqueueDebouncer(this.__renderDebouncer)%3B%7D%2F**%0A%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'disconnectedCallback'%2Cvalue%3Afunction%20disconnectedCallback()%7B_get(DomIf.prototype.__proto__%7C%7CObject.getPrototypeOf(DomIf.prototype)%2C'disconnectedCallback'%2Cthis).call(this)%3Bif(!this.parentNode%7C%7Cthis.parentNode.nodeType%3D%3DNode.DOCUMENT_FRAGMENT_NODE%26%26!this.parentNode.host)%7Bthis.__teardownInstance()%3B%7D%7D%2F**%0A%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'connectedCallback'%2Cvalue%3Afunction%20connectedCallback()%7B_get(DomIf.prototype.__proto__%7C%7CObject.getPrototypeOf(DomIf.prototype)%2C'connectedCallback'%2Cthis).call(this)%3Bthis.style.display%3D'none'%3Bif(this.if)%7Bthis.__debounceRender()%3B%7D%7D%2F**%0A%20%20%20%20%20*%20Forces%20the%20element%20to%20render%20its%20content.%20Normally%20rendering%20is%0A%20%20%20%20%20*%20asynchronous%20to%20a%20provoking%20change.%20This%20is%20done%20for%20efficiency%20so%0A%20%20%20%20%20*%20that%20multiple%20changes%20trigger%20only%20a%20single%20render.%20The%20render%20method%0A%20%20%20%20%20*%20should%20be%20called%20if%2C%20for%20example%2C%20template%20rendering%20is%20required%20to%0A%20%20%20%20%20*%20validate%20application%20state.%0A%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'render'%2Cvalue%3Afunction%20render()%7BPolymer.flush()%3B%7D%7D%2C%7Bkey%3A'__render'%2Cvalue%3Afunction%20__render()%7Bif(this.if)%7Bif(!this.__ensureInstance())%7B%2F%2F%20No%20template%20found%20yet%0Areturn%3B%7Dthis._showHideChildren()%3B%7Delse%20if(this.restamp)%7Bthis.__teardownInstance()%3B%7Dif(!this.restamp%26%26this.__instance)%7Bthis._showHideChildren()%3B%7Dif(this.if!%3Dthis._lastIf)%7Bthis.dispatchEvent(new%20CustomEvent('dom-change'%2C%7Bbubbles%3Atrue%2Ccomposed%3Atrue%7D))%3Bthis._lastIf%3Dthis.if%3B%7D%7D%7D%2C%7Bkey%3A'__ensureInstance'%2Cvalue%3Afunction%20__ensureInstance()%7Bvar%20_this3%3Dthis%3Bvar%20parentNode%3Dthis.parentNode%3B%2F%2F%20Guard%20against%20element%20being%20detached%20while%20render%20was%20queued%0Aif(parentNode)%7Bif(!this.__ctor)%7Bvar%20template%3D%2F**%20%40type%20%7BHTMLTemplateElement%7D%20*%2Fthis.querySelector('template')%3Bif(!template)%7B%2F%2F%20Wait%20until%20childList%20changes%20and%20template%20should%20be%20there%20by%20then%0Avar%20observer%3Dnew%20MutationObserver(function()%7Bif(_this3.querySelector('template'))%7Bobserver.disconnect()%3B_this3.__render()%3B%7Delse%7Bthrow%20new%20Error('dom-if%20requires%20a%20%3Ctemplate%3E%20child')%3B%7D%7D)%3Bobserver.observe(this%2C%7BchildList%3Atrue%7D)%3Breturn%20false%3B%7Dthis.__ctor%3DPolymer.Templatize.templatize(template%2Cthis%2C%7B%2F%2F%20dom-if%20templatizer%20instances%20require%20%60mutable%3A%20true%60%2C%20as%0A%2F%2F%20%60__syncHostProperties%60%20relies%20on%20that%20behavior%20to%20sync%20objects%0AmutableData%3Atrue%2C%2F**%0A%20%20%20%20%20%20%20%20%20%20%20%20%20*%20%40param%20%7Bstring%7D%20prop%20Property%20to%20forward%0A%20%20%20%20%20%20%20%20%20%20%20%20%20*%20%40param%20%7B*%7D%20value%20Value%20of%20property%0A%20%20%20%20%20%20%20%20%20%20%20%20%20*%20%40this%20%7Bthis%7D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20*%2FforwardHostProp%3Afunction%20forwardHostProp(prop%2Cvalue)%7Bif(this.__instance)%7Bif(this.if)%7Bthis.__instance.forwardHostProp(prop%2Cvalue)%3B%7Delse%7B%2F%2F%20If%20we%20have%20an%20instance%20but%20are%20squelching%20host%20property%0A%2F%2F%20forwarding%20due%20to%20if%20being%20false%2C%20note%20the%20invalidated%0A%2F%2F%20properties%20so%20%60__syncHostProperties%60%20can%20sync%20them%20the%20next%0A%2F%2F%20time%20%60if%60%20becomes%20true%0Athis.__invalidProps%3Dthis.__invalidProps%7C%7CObject.create(null)%3Bthis.__invalidProps%5BPolymer.Path.root(prop)%5D%3Dtrue%3B%7D%7D%7D%7D)%3B%7Dif(!this.__instance)%7Bthis.__instance%3Dnew%20this.__ctor()%3BparentNode.insertBefore(this.__instance.root%2Cthis)%3B%7Delse%7Bthis.__syncHostProperties()%3Bvar%20c%24%3Dthis.__instance.children%3Bif(c%24%26%26c%24.length)%7B%2F%2F%20Detect%20case%20where%20dom-if%20was%20re-attached%20in%20new%20position%0Avar%20lastChild%3Dthis.previousSibling%3Bif(lastChild!%3D%3Dc%24%5Bc%24.length-1%5D)%7Bfor(var%20i%3D0%2Cn%3Bi%3Cc%24.length%26%26(n%3Dc%24%5Bi%5D)%3Bi%2B%2B)%7BparentNode.insertBefore(n%2Cthis)%3B%7D%7D%7D%7D%7Dreturn%20true%3B%7D%7D%2C%7Bkey%3A'__syncHostProperties'%2Cvalue%3Afunction%20__syncHostProperties()%7Bvar%20props%3Dthis.__invalidProps%3Bif(props)%7Bfor(var%20prop%20in%20props)%7Bthis.__instance._setPendingProperty(prop%2Cthis.__dataHost%5Bprop%5D)%3B%7Dthis.__invalidProps%3Dnull%3Bthis.__instance._flushProperties()%3B%7D%7D%7D%2C%7Bkey%3A'__teardownInstance'%2Cvalue%3Afunction%20__teardownInstance()%7Bif(this.__instance)%7Bvar%20c%24%3Dthis.__instance.children%3Bif(c%24%26%26c%24.length)%7B%2F%2F%20use%20first%20child%20parent%2C%20for%20case%20when%20dom-if%20may%20have%20been%20detached%0Avar%20parent%3Dc%24%5B0%5D.parentNode%3B%2F%2F%20Instance%20children%20may%20be%20disconnected%20from%20parents%20when%20dom-if%0A%2F%2F%20detaches%20if%20a%20tree%20was%20innerHTML'ed%0Aif(parent)%7Bfor(var%20i%3D0%2Cn%3Bi%3Cc%24.length%26%26(n%3Dc%24%5Bi%5D)%3Bi%2B%2B)%7Bparent.removeChild(n)%3B%7D%7D%7Dthis.__instance%3Dnull%3Bthis.__invalidProps%3Dnull%3B%7D%7D%2F**%0A%20%20%20%20%20*%20Shows%20or%20hides%20the%20template%20instance%20top%20level%20child%20elements.%20For%0A%20%20%20%20%20*%20text%20nodes%2C%20%60textContent%60%20is%20removed%20while%20%22hidden%22%20and%20replaced%20when%0A%20%20%20%20%20*%20%22shown.%22%0A%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20*%20%40protected%0A%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'_showHideChildren'%2Cvalue%3Afunction%20_showHideChildren()%7Bvar%20hidden%3Dthis.__hideTemplateChildren__%7C%7C!this.if%3Bif(this.__instance)%7Bthis.__instance._showHideChildren(hidden)%3B%7D%7D%7D%5D)%3Breturn%20DomIf%3B%7D(Polymer.Element)%3BcustomElements.define(DomIf.is%2CDomIf)%3B%2F**%20%40const%20*%2FPolymer.DomIf%3DDomIf%3B%7D)()%3B%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Fcpt-static.gannettdigital.com%2Funiversal-web-client%2Fmaster%2Flatest%2Fvendor%2Fcomponents%2Fpolymer%2Flib%2Felements%2Fdom-if.html.js%0A | 10 kB | 2023-03-07 | 2024-01-25 | |
Pretty
Loading... | ||||
http:text/javascript;charset=utf-8,%0A%20%20'use%20strict'%3B%0A%0A%20%20Polymer(%7B%0A%0A%20%20%20%20is%3A%20'iron-ajax'%2C%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20Fired%20before%20a%20request%20is%20sent.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40event%20iron-ajax-presend%0A%20%20%20%20%20*%2F%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20Fired%20when%20a%20request%20is%20sent.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40event%20request%0A%20%20%20%20%20*%20%40event%20iron-ajax-request%0A%20%20%20%20%20*%2F%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20Fired%20when%20a%20response%20is%20received.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40event%20response%0A%20%20%20%20%20*%20%40event%20iron-ajax-response%0A%20%20%20%20%20*%2F%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20Fired%20when%20an%20error%20is%20received.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40event%20error%0A%20%20%20%20%20*%20%40event%20iron-ajax-error%0A%20%20%20%20%20*%2F%0A%0A%20%20%20%20hostAttributes%3A%20%7B%0A%20%20%20%20%20%20hidden%3A%20true%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20properties%3A%20%7B%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20The%20URL%20target%20of%20the%20request.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20url%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20String%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20An%20object%20that%20contains%20query%20parameters%20to%20be%20appended%20to%20the%0A%20%20%20%20%20%20%20*%20specified%20%60url%60%20when%20generating%20a%20request.%20If%20you%20wish%20to%20set%20the%20body%0A%20%20%20%20%20%20%20*%20content%20when%20making%20a%20POST%20request%2C%20you%20should%20use%20the%20%60body%60%20property%0A%20%20%20%20%20%20%20*%20instead.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20params%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Object%2C%0A%20%20%20%20%20%20%20%20value%3A%20function()%20%7B%0A%20%20%20%20%20%20%20%20%20%20return%20%7B%7D%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20The%20HTTP%20method%20to%20use%20such%20as%20'GET'%2C%20'POST'%2C%20'PUT'%2C%20or%20'DELETE'.%0A%20%20%20%20%20%20%20*%20Default%20is%20'GET'.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20method%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20String%2C%0A%20%20%20%20%20%20%20%20value%3A%20'GET'%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20HTTP%20request%20headers%20to%20send.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20Example%3A%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%20%20%20%20%3Ciron-ajax%0A%20%20%20%20%20%20%20*%20%20%20%20%20%20%20%20%20auto%0A%20%20%20%20%20%20%20*%20%20%20%20%20%20%20%20%20url%3D%22http%3A%2F%2Fsomesite.com%22%0A%20%20%20%20%20%20%20*%20%20%20%20%20%20%20%20%20headers%3D'%7B%22X-Requested-With%22%3A%20%22XMLHttpRequest%22%7D'%0A%20%20%20%20%20%20%20*%20%20%20%20%20%20%20%20%20handle-as%3D%22json%22%3E%3C%2Firon-ajax%3E%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20Note%3A%20setting%20a%20%60Content-Type%60%20header%20here%20will%20override%20the%20value%0A%20%20%20%20%20%20%20*%20specified%20by%20the%20%60contentType%60%20property%20of%20this%20element.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20headers%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Object%2C%0A%20%20%20%20%20%20%20%20value%3A%20function()%20%7B%0A%20%20%20%20%20%20%20%20%20%20return%20%7B%7D%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20Content%20type%20to%20use%20when%20sending%20data.%20If%20the%20%60contentType%60%20property%0A%20%20%20%20%20%20%20*%20is%20set%20and%20a%20%60Content-Type%60%20header%20is%20specified%20in%20the%20%60headers%60%0A%20%20%20%20%20%20%20*%20property%2C%20the%20%60headers%60%20property%20value%20will%20take%20precedence.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20Varies%20the%20handling%20of%20the%20%60body%60%20param.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20contentType%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20String%2C%0A%20%20%20%20%20%20%20%20value%3A%20null%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20Body%20content%20to%20send%20with%20the%20request%2C%20typically%20used%20with%20%22POST%22%0A%20%20%20%20%20%20%20*%20requests.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20If%20body%20is%20a%20string%20it%20will%20be%20sent%20unmodified.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20If%20Content-Type%20is%20set%20to%20a%20value%20listed%20below%2C%20then%0A%20%20%20%20%20%20%20*%20the%20body%20will%20be%20encoded%20accordingly.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%20%20%20*%20%60content-type%3D%22application%2Fjson%22%60%0A%20%20%20%20%20%20%20*%20%20%20%20%20%20*%20body%20is%20encoded%20like%20%60%7B%22foo%22%3A%22bar%20baz%22%2C%22x%22%3A1%7D%60%0A%20%20%20%20%20%20%20*%20%20%20%20*%20%60content-type%3D%22application%2Fx-www-form-urlencoded%22%60%0A%20%20%20%20%20%20%20*%20%20%20%20%20%20*%20body%20is%20encoded%20like%20%60foo%3Dbar%2Bbaz%26x%3D1%60%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20Otherwise%20the%20body%20will%20be%20passed%20to%20the%20browser%20unmodified%2C%20and%20it%0A%20%20%20%20%20%20%20*%20will%20handle%20any%20encoding%20(e.g.%20for%20FormData%2C%20Blob%2C%20ArrayBuffer).%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40type%20(ArrayBuffer%7CArrayBufferView%7CBlob%7CDocument%7CFormData%7Cnull%7Cstring%7Cundefined%7CObject)%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20body%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Object%2C%0A%20%20%20%20%20%20%20%20value%3A%20null%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20Toggle%20whether%20XHR%20is%20synchronous%20or%20asynchronous.%20Don't%20change%20this%0A%20%20%20%20%20%20%20*%20to%20true%20unless%20You%20Know%20What%20You%20Are%20Doing%E2%84%A2.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20sync%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Boolean%2C%0A%20%20%20%20%20%20%20%20value%3A%20false%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20Specifies%20what%20data%20to%20store%20in%20the%20%60response%60%20property%2C%20and%0A%20%20%20%20%20%20%20*%20to%20deliver%20as%20%60event.detail.response%60%20in%20%60response%60%20events.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20One%20of%3A%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%20%20%20%60text%60%3A%20uses%20%60XHR.responseText%60.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%20%20%20%60xml%60%3A%20uses%20%60XHR.responseXML%60.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%20%20%20%60json%60%3A%20uses%20%60XHR.responseText%60%20parsed%20as%20JSON.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%20%20%20%60arraybuffer%60%3A%20uses%20%60XHR.response%60.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%20%20%20%60blob%60%3A%20uses%20%60XHR.response%60.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%20%20%20%60document%60%3A%20uses%20%60XHR.response%60.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20handleAs%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20String%2C%0A%20%20%20%20%20%20%20%20value%3A%20'json'%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20Set%20the%20withCredentials%20flag%20on%20the%20request.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20withCredentials%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Boolean%2C%0A%20%20%20%20%20%20%20%20value%3A%20false%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20Set%20the%20timeout%20flag%20on%20the%20request.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20timeout%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Number%2C%0A%20%20%20%20%20%20%20%20value%3A%200%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20If%20true%2C%20automatically%20performs%20an%20Ajax%20request%20when%20either%20%60url%60%20or%0A%20%20%20%20%20%20%20*%20%60params%60%20changes.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20auto%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Boolean%2C%0A%20%20%20%20%20%20%20%20value%3A%20false%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20If%20true%2C%20error%20messages%20will%20automatically%20be%20logged%20to%20the%20console.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20verbose%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Boolean%2C%0A%20%20%20%20%20%20%20%20value%3A%20false%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20The%20most%20recent%20request%20made%20by%20this%20iron-ajax%20element.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20lastRequest%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Object%2C%0A%20%20%20%20%20%20%20%20notify%3A%20true%2C%0A%20%20%20%20%20%20%20%20readOnly%3A%20true%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20The%20%60progress%60%20property%20of%20this%20element's%20%60lastRequest%60.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20lastProgress%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Object%2C%0A%20%20%20%20%20%20%20%20notify%3A%20true%2C%0A%20%20%20%20%20%20%20%20readOnly%3A%20true%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20True%20while%20lastRequest%20is%20in%20flight.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20loading%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Boolean%2C%0A%20%20%20%20%20%20%20%20notify%3A%20true%2C%0A%20%20%20%20%20%20%20%20readOnly%3A%20true%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20lastRequest's%20response.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20Note%20that%20lastResponse%20and%20lastError%20are%20set%20when%20lastRequest%20finishes%2C%0A%20%20%20%20%20%20%20*%20so%20if%20loading%20is%20true%2C%20then%20lastResponse%20and%20lastError%20will%20correspond%0A%20%20%20%20%20%20%20*%20to%20the%20result%20of%20the%20previous%20request.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20The%20type%20of%20the%20response%20is%20determined%20by%20the%20value%20of%20%60handleAs%60%20at%0A%20%20%20%20%20%20%20*%20the%20time%20that%20the%20request%20was%20generated.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40type%20%7BObject%7D%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20lastResponse%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Object%2C%0A%20%20%20%20%20%20%20%20notify%3A%20true%2C%0A%20%20%20%20%20%20%20%20readOnly%3A%20true%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20lastRequest's%20error%2C%20if%20any.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40type%20%7BObject%7D%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20lastError%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Object%2C%0A%20%20%20%20%20%20%20%20notify%3A%20true%2C%0A%20%20%20%20%20%20%20%20readOnly%3A%20true%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20An%20Array%20of%20all%20in-flight%20requests%20originating%20from%20this%20iron-ajax%0A%20%20%20%20%20%20%20*%20element.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20activeRequests%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Array%2C%0A%20%20%20%20%20%20%20%20notify%3A%20true%2C%0A%20%20%20%20%20%20%20%20readOnly%3A%20true%2C%0A%20%20%20%20%20%20%20%20value%3A%20function()%20%7B%0A%20%20%20%20%20%20%20%20%20%20return%20%5B%5D%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20Length%20of%20time%20in%20milliseconds%20to%20debounce%20multiple%20automatically%20generated%20requests.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20debounceDuration%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Number%2C%0A%20%20%20%20%20%20%20%20value%3A%200%2C%0A%20%20%20%20%20%20%20%20notify%3A%20true%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20Prefix%20to%20be%20stripped%20from%20a%20JSON%20response%20before%20parsing%20it.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20In%20order%20to%20prevent%20an%20attack%20using%20CSRF%20with%20Array%20responses%0A%20%20%20%20%20%20%20*%20(http%3A%2F%2Fhaacked.com%2Farchive%2F2008%2F11%2F20%2Fanatomy-of-a-subtle-json-vulnerability.aspx%2F)%0A%20%20%20%20%20%20%20*%20many%20backends%20will%20mitigate%20this%20by%20prefixing%20all%20JSON%20response%20bodies%0A%20%20%20%20%20%20%20*%20with%20a%20string%20that%20would%20be%20nonsensical%20to%20a%20JavaScript%20parser.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20jsonPrefix%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20String%2C%0A%20%20%20%20%20%20%20%20value%3A%20''%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20By%20default%2C%20iron-ajax's%20events%20do%20not%20bubble.%20Setting%20this%20attribute%20will%20cause%20its%0A%20%20%20%20%20%20%20*%20request%20and%20response%20events%20as%20well%20as%20its%20iron-ajax-request%2C%20-response%2C%20%20and%20-error%0A%20%20%20%20%20%20%20*%20events%20to%20bubble%20to%20the%20window%20object.%20The%20vanilla%20error%20event%20never%20bubbles%20when%0A%20%20%20%20%20%20%20*%20using%20shadow%20dom%20even%20if%20this.bubbles%20is%20true%20because%20a%20scoped%20flag%20is%20not%20passed%20with%0A%20%20%20%20%20%20%20*%20it%20(first%20link)%20and%20because%20the%20shadow%20dom%20spec%20did%20not%20used%20to%20allow%20certain%20events%2C%0A%20%20%20%20%20%20%20*%20including%20events%20named%20error%2C%20to%20leak%20outside%20of%20shadow%20trees%20(second%20link).%0A%20%20%20%20%20%20%20*%20https%3A%2F%2Fwww.w3.org%2FTR%2Fshadow-dom%2F%23scoped-flag%0A%20%20%20%20%20%20%20*%20https%3A%2F%2Fwww.w3.org%2FTR%2F2015%2FWD-shadow-dom-20151215%2F%23events-that-are-not-leaked-into-ancestor-trees%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20bubbles%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Boolean%2C%0A%20%20%20%20%20%20%20%20value%3A%20false%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20Changes%20the%20%5B%60completes%60%5D(iron-request%23property-completes)%20promise%20chain%20%0A%20%20%20%20%20%20%20*%20from%20%60generateRequest%60%20to%20reject%20with%20an%20object%0A%20%20%20%20%20%20%20*%20containing%20the%20original%20request%2C%20as%20well%20an%20error%20message.%0A%20%20%20%20%20%20%20*%20If%20false%20(default)%2C%20the%20promise%20rejects%20with%20an%20error%20message%20only.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20rejectWithRequest%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Boolean%2C%0A%20%20%20%20%20%20%20%20value%3A%20false%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20_boundHandleResponse%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Function%2C%0A%20%20%20%20%20%20%20%20value%3A%20function()%20%7B%0A%20%20%20%20%20%20%20%20%20%20return%20this._handleResponse.bind(this)%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20observers%3A%20%5B%0A%20%20%20%20%20%20'_requestOptionsChanged(url%2C%20method%2C%20params.*%2C%20headers%2C%20contentType%2C%20'%20%2B%0A%20%20%20%20%20%20%20%20%20%20'body%2C%20sync%2C%20handleAs%2C%20jsonPrefix%2C%20withCredentials%2C%20timeout%2C%20auto)'%0A%20%20%20%20%5D%2C%0A%0A%20%20%20%20created%3A%20function()%20%7B%0A%20%20%20%20%20%20this._boundOnProgressChanged%20%3D%20this._onProgressChanged.bind(this)%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20The%20query%20string%20that%20should%20be%20appended%20to%20the%20%60url%60%2C%20serialized%20from%0A%20%20%20%20%20*%20the%20current%20value%20of%20%60params%60.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40return%20%7Bstring%7D%0A%20%20%20%20%20*%2F%0A%20%20%20%20get%20queryString%20()%20%7B%0A%20%20%20%20%20%20var%20queryParts%20%3D%20%5B%5D%3B%0A%20%20%20%20%20%20var%20param%3B%0A%20%20%20%20%20%20var%20value%3B%0A%0A%20%20%20%20%20%20for%20(param%20in%20this.params)%20%7B%0A%20%20%20%20%20%20%20%20value%20%3D%20this.params%5Bparam%5D%3B%0A%20%20%20%20%20%20%20%20param%20%3D%20window.encodeURIComponent(param)%3B%0A%0A%20%20%20%20%20%20%20%20if%20(Array.isArray(value))%20%7B%0A%20%20%20%20%20%20%20%20%20%20for%20(var%20i%20%3D%200%3B%20i%20%3C%20value.length%3B%20i%2B%2B)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20queryParts.push(param%20%2B%20'%3D'%20%2B%20window.encodeURIComponent(value%5Bi%5D))%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%20else%20if%20(value%20!%3D%3D%20null)%20%7B%0A%20%20%20%20%20%20%20%20%20%20queryParts.push(param%20%2B%20'%3D'%20%2B%20window.encodeURIComponent(value))%3B%0A%20%20%20%20%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20%20%20queryParts.push(param)%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20return%20queryParts.join('%26')%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20The%20%60url%60%20with%20query%20string%20(if%20%60params%60%20are%20specified)%2C%20suitable%20for%0A%20%20%20%20%20*%20providing%20to%20an%20%60iron-request%60%20instance.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40return%20%7Bstring%7D%0A%20%20%20%20%20*%2F%0A%20%20%20%20get%20requestUrl()%20%7B%0A%20%20%20%20%20%20var%20queryString%20%3D%20this.queryString%3B%0A%20%20%20%20%20%20var%20url%20%3D%20this.url%20%7C%7C%20''%3B%0A%0A%20%20%20%20%20%20if%20(queryString)%20%7B%0A%20%20%20%20%20%20%20%20var%20bindingChar%20%3D%20url.indexOf('%3F')%20%3E%3D%200%20%3F%20'%26'%20%3A%20'%3F'%3B%0A%20%20%20%20%20%20%20%20return%20url%20%2B%20bindingChar%20%2B%20queryString%3B%0A%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20return%20url%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20An%20object%20that%20maps%20header%20names%20to%20header%20values%2C%20first%20applying%20the%0A%20%20%20%20%20*%20the%20value%20of%20%60Content-Type%60%20and%20then%20overlaying%20the%20headers%20specified%0A%20%20%20%20%20*%20in%20the%20%60headers%60%20property.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40return%20%7BObject%7D%0A%20%20%20%20%20*%2F%0A%20%20%20%20get%20requestHeaders()%20%7B%0A%20%20%20%20%20%20var%20headers%20%3D%20%7B%7D%3B%0A%20%20%20%20%20%20var%20contentType%20%3D%20this.contentType%3B%0A%20%20%20%20%20%20if%20(contentType%20%3D%3D%20null%20%26%26%20(typeof%20this.body%20%3D%3D%3D%20'string'))%20%7B%0A%20%20%20%20%20%20%20%20contentType%20%3D%20'application%2Fx-www-form-urlencoded'%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20if%20(contentType)%20%7B%0A%20%20%20%20%20%20%20%20headers%5B'content-type'%5D%20%3D%20contentType%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20var%20header%3B%0A%0A%20%20%20%20%20%20if%20(typeof%20this.headers%20%3D%3D%3D%20'object')%20%7B%0A%20%20%20%20%20%20%20%20for%20(header%20in%20this.headers)%20%7B%0A%20%20%20%20%20%20%20%20%20%20headers%5Bheader%5D%20%3D%20this.headers%5Bheader%5D.toString()%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20return%20headers%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_onProgressChanged%3A%20function(event)%20%7B%0A%20%20%20%20%20%20this._setLastProgress(event.detail.value)%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20Request%20options%20suitable%20for%20generating%20an%20%60iron-request%60%20instance%20based%0A%20%20%20%20%20*%20on%20the%20current%20state%20of%20the%20%60iron-ajax%60%20instance's%20properties.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40return%20%7B%7B%0A%20%20%20%20%20*%20%20%20url%3A%20string%2C%0A%20%20%20%20%20*%20%20%20method%3A%20(string%7Cundefined)%2C%0A%20%20%20%20%20*%20%20%20async%3A%20(boolean%7Cundefined)%2C%0A%20%20%20%20%20*%20%20%20body%3A%20(ArrayBuffer%7CArrayBufferView%7CBlob%7CDocument%7CFormData%7Cnull%7Cstring%7Cundefined%7CObject)%2C%0A%20%20%20%20%20*%20%20%20headers%3A%20(Object%7Cundefined)%2C%0A%20%20%20%20%20*%20%20%20handleAs%3A%20(string%7Cundefined)%2C%0A%20%20%20%20%20*%20%20%20jsonPrefix%3A%20(string%7Cundefined)%2C%0A%20%20%20%20%20*%20%20%20withCredentials%3A%20(boolean%7Cundefined)%7D%7D%0A%20%20%20%20%20*%2F%0A%20%20%20%20toRequestOptions%3A%20function()%20%7B%0A%20%20%20%20%20%20return%20%7B%0A%20%20%20%20%20%20%20%20url%3A%20this.requestUrl%20%7C%7C%20''%2C%0A%20%20%20%20%20%20%20%20method%3A%20this.method%2C%0A%20%20%20%20%20%20%20%20headers%3A%20this.requestHeaders%2C%0A%20%20%20%20%20%20%20%20body%3A%20this.body%2C%0A%20%20%20%20%20%20%20%20async%3A%20!this.sync%2C%0A%20%20%20%20%20%20%20%20handleAs%3A%20this.handleAs%2C%0A%20%20%20%20%20%20%20%20jsonPrefix%3A%20this.jsonPrefix%2C%0A%20%20%20%20%20%20%20%20withCredentials%3A%20this.withCredentials%2C%0A%20%20%20%20%20%20%20%20timeout%3A%20this.timeout%2C%0A%20%20%20%20%20%20%20%20rejectWithRequest%3A%20this.rejectWithRequest%2C%0A%20%20%20%20%20%20%7D%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20Performs%20an%20AJAX%20request%20to%20the%20specified%20URL.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40return%20%7B!IronRequestElement%7D%0A%20%20%20%20%20*%2F%0A%20%20%20%20generateRequest%3A%20function()%20%7B%0A%20%20%20%20%20%20var%20request%20%3D%20%2F**%20%40type%20%7B!IronRequestElement%7D%20*%2F%20(document.createElement('iron-request'))%3B%0A%20%20%20%20%20%20var%20requestOptions%20%3D%20this.toRequestOptions()%3B%0A%0A%20%20%20%20%20%20this.push('activeRequests'%2C%20request)%3B%0A%0A%20%20%20%20%20%20request.completes.then(%0A%20%20%20%20%20%20%20%20this._boundHandleResponse%0A%20%20%20%20%20%20).catch(%0A%20%20%20%20%20%20%20%20this._handleError.bind(this%2C%20request)%0A%20%20%20%20%20%20).then(%0A%20%20%20%20%20%20%20%20this._discardRequest.bind(this%2C%20request)%0A%20%20%20%20%20%20)%3B%0A%0A%20%20%20%20%20%20var%20evt%20%3D%20this.fire('iron-ajax-presend'%2C%20%7B%0A%20%20%20%20%20%20%20%20request%3A%20request%2C%0A%20%20%20%20%20%20%20%20options%3A%20requestOptions%0A%20%20%20%20%20%20%7D%2C%20%7Bbubbles%3A%20this.bubbles%2C%20cancelable%3A%20true%7D)%3B%0A%0A%20%20%20%20%20%20if%20(evt.defaultPrevented)%20%7B%0A%20%20%20%20%20%20%20%20request.abort()%3B%0A%20%20%20%20%20%20%20%20request.rejectCompletes(request)%3B%0A%20%20%20%20%20%20%20%20return%20request%3B%0A%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20if%20(this.lastRequest)%20%7B%0A%20%20%20%20%20%20%20%20this.lastRequest.removeEventListener('iron-request-progress-changed'%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20this._boundOnProgressChanged)%3B%0A%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20request.addEventListener('iron-request-progress-changed'%2C%0A%20%20%20%20%20%20%20%20%20%20this._boundOnProgressChanged)%3B%0A%0A%20%20%20%20%20%20request.send(requestOptions)%3B%0A%20%20%20%20%20%20this._setLastProgress(null)%3B%0A%20%20%20%20%20%20this._setLastRequest(request)%3B%0A%20%20%20%20%20%20this._setLoading(true)%3B%0A%0A%20%20%20%20%20%20this.fire('request'%2C%20%7B%0A%20%20%20%20%20%20%20%20request%3A%20request%2C%0A%20%20%20%20%20%20%20%20options%3A%20requestOptions%0A%20%20%20%20%20%20%7D%2C%20%7B%0A%20%20%20%20%20%20%20%20bubbles%3A%20this.bubbles%2C%0A%20%20%20%20%20%20%20%20composed%3A%20true%0A%20%20%20%20%20%20%7D)%3B%0A%0A%20%20%20%20%20%20this.fire('iron-ajax-request'%2C%20%7B%0A%20%20%20%20%20%20%20%20request%3A%20request%2C%0A%20%20%20%20%20%20%20%20options%3A%20requestOptions%0A%20%20%20%20%20%20%7D%2C%20%7B%0A%20%20%20%20%20%20%20%20bubbles%3A%20this.bubbles%2C%0A%20%20%20%20%20%20%20%20composed%3A%20true%0A%20%20%20%20%20%20%7D)%3B%0A%0A%20%20%20%20%20%20return%20request%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_handleResponse%3A%20function(request)%20%7B%0A%20%20%20%20%20%20if%20(request%20%3D%3D%3D%20this.lastRequest)%20%7B%0A%20%20%20%20%20%20%20%20this._setLastResponse(request.response)%3B%0A%20%20%20%20%20%20%20%20this._setLastError(null)%3B%0A%20%20%20%20%20%20%20%20this._setLoading(false)%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20this.fire('response'%2C%20request%2C%20%7B%0A%20%20%20%20%20%20%20%20bubbles%3A%20this.bubbles%2C%0A%20%20%20%20%20%20%20%20composed%3A%20true%0A%20%20%20%20%20%20%7D)%3B%0A%20%20%20%20%20%20this.fire('iron-ajax-response'%2C%20request%2C%20%7B%0A%20%20%20%20%20%20%20%20bubbles%3A%20this.bubbles%2C%0A%20%20%20%20%20%20%20%20composed%3A%20true%0A%20%20%20%20%20%20%7D)%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_handleError%3A%20function(request%2C%20error)%20%7B%0A%20%20%20%20%20%20if%20(this.verbose)%20%7B%0A%20%20%20%20%20%20%20%20Polymer.Base._error(error)%3B%0A%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20if%20(request%20%3D%3D%3D%20this.lastRequest)%20%7B%0A%20%20%20%20%20%20%20%20this._setLastError(%7B%0A%20%20%20%20%20%20%20%20%20%20request%3A%20request%2C%0A%20%20%20%20%20%20%20%20%20%20error%3A%20error%2C%0A%20%20%20%20%20%20%20%20%20%20status%3A%20request.xhr.status%2C%0A%20%20%20%20%20%20%20%20%20%20statusText%3A%20request.xhr.statusText%2C%0A%20%20%20%20%20%20%20%20%20%20response%3A%20request.xhr.response%0A%20%20%20%20%20%20%20%20%7D)%3B%0A%20%20%20%20%20%20%20%20this._setLastResponse(null)%3B%0A%20%20%20%20%20%20%20%20this._setLoading(false)%3B%0A%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20%2F%2F%20Tests%20fail%20if%20this%20goes%20after%20the%20normal%20this.fire('error'%2C%20...)%0A%20%20%20%20%20%20this.fire('iron-ajax-error'%2C%20%7B%0A%20%20%20%20%20%20%20%20request%3A%20request%2C%0A%20%20%20%20%20%20%20%20error%3A%20error%0A%20%20%20%20%20%20%7D%2C%20%7B%0A%20%20%20%20%20%20%20%20bubbles%3A%20this.bubbles%2C%0A%20%20%20%20%20%20%20%20composed%3A%20true%0A%20%20%20%20%20%20%7D)%3B%0A%0A%20%20%20%20%20%20this.fire('error'%2C%20%7B%0A%20%20%20%20%20%20%20%20request%3A%20request%2C%0A%20%20%20%20%20%20%20%20error%3A%20error%0A%20%20%20%20%20%20%7D%2C%20%7B%0A%20%20%20%20%20%20%20%20bubbles%3A%20this.bubbles%2C%0A%20%20%20%20%20%20%20%20composed%3A%20true%0A%20%20%20%20%20%20%7D)%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_discardRequest%3A%20function(request)%20%7B%0A%20%20%20%20%20%20var%20requestIndex%20%3D%20this.activeRequests.indexOf(request)%3B%0A%0A%20%20%20%20%20%20if%20(requestIndex%20%3E%20-1)%20%7B%0A%20%20%20%20%20%20%20%20this.splice('activeRequests'%2C%20requestIndex%2C%201)%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_requestOptionsChanged%3A%20function()%20%7B%0A%20%20%20%20%20%20this.debounce('generate-request'%2C%20function()%20%7B%0A%20%20%20%20%20%20%20%20if%20(this.url%20%3D%3D%20null)%20%7B%0A%20%20%20%20%20%20%20%20%20%20return%3B%0A%20%20%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20%20%20if%20(this.auto)%20%7B%0A%20%20%20%20%20%20%20%20%20%20this.generateRequest()%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%2C%20this.debounceDuration)%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%7D)%3B%0A%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Fcpt-static.gannettdigital.com%2Funiversal-web-client%2Fmaster%2Flatest%2Fvendor%2Fcomponents%2Firon-ajax%2Firon-ajax.html.js%0A | 15 kB | 2023-03-12 | 2024-01-25 | |
Pretty
Loading... | ||||
eu.uticaod.com/story/sports/2021/01/23/section-iii-has-work-do-after-ny-covid-19-high-risk-high-school-sports-get-ok/6686662002/ | 8.9 kB | 2023-03-13 | 2023-03-13 | |
Pretty
Loading... | ||||
cdn.cookielaw.org/scripttemplates/202210.1.0/otTCF.js | 70 kB | 2023-03-07 | 2024-02-03 | |
Pretty
Loading... | ||||
js-agent.newrelic.com/nr-spa-1044.min.js | 31 kB | 2023-03-07 | 2023-05-05 | |
Pretty
Loading... | ||||
http:text/javascript;charset=utf-8,(function()%7B'use%20strict'%3Bfunction%20newSplice(index%2Cremoved%2CaddedCount)%7Breturn%7Bindex%3Aindex%2Cremoved%3Aremoved%2CaddedCount%3AaddedCount%7D%3B%7Dvar%20EDIT_LEAVE%3D0%3Bvar%20EDIT_UPDATE%3D1%3Bvar%20EDIT_ADD%3D2%3Bvar%20EDIT_DELETE%3D3%3B%2F%2F%20Note%3A%20This%20function%20is%20*based*%20on%20the%20computation%20of%20the%20Levenshtein%0A%2F%2F%20%22edit%22%20distance.%20The%20one%20change%20is%20that%20%22updates%22%20are%20treated%20as%20two%0A%2F%2F%20edits%20-%20not%20one.%20With%20Array%20splices%2C%20an%20update%20is%20really%20a%20delete%0A%2F%2F%20followed%20by%20an%20add.%20By%20retaining%20this%2C%20we%20optimize%20for%20%22keeping%22%20the%0A%2F%2F%20maximum%20array%20items%20in%20the%20original%20array.%20For%20example%3A%0A%2F%2F%0A%2F%2F%20%20%20'xxxx123'%20-%3E%20'123yyyy'%0A%2F%2F%0A%2F%2F%20With%201-edit%20updates%2C%20the%20shortest%20path%20would%20be%20just%20to%20update%20all%20seven%0A%2F%2F%20characters.%20With%202-edit%20updates%2C%20we%20delete%204%2C%20leave%203%2C%20and%20add%204.%20This%0A%2F%2F%20leaves%20the%20substring%20'123'%20intact.%0Afunction%20calcEditDistances(current%2CcurrentStart%2CcurrentEnd%2Cold%2ColdStart%2ColdEnd)%7B%2F%2F%20%22Deletion%22%20columns%0Avar%20rowCount%3DoldEnd-oldStart%2B1%3Bvar%20columnCount%3DcurrentEnd-currentStart%2B1%3Bvar%20distances%3Dnew%20Array(rowCount)%3B%2F%2F%20%22Addition%22%20rows.%20Initialize%20null%20column.%0Afor(var%20i%3D0%3Bi%3CrowCount%3Bi%2B%2B)%7Bdistances%5Bi%5D%3Dnew%20Array(columnCount)%3Bdistances%5Bi%5D%5B0%5D%3Di%3B%7D%2F%2F%20Initialize%20null%20row%0Afor(var%20j%3D0%3Bj%3CcolumnCount%3Bj%2B%2B)%7Bdistances%5B0%5D%5Bj%5D%3Dj%3B%7Dfor(var%20_i%3D1%3B_i%3CrowCount%3B_i%2B%2B)%7Bfor(var%20_j%3D1%3B_j%3CcolumnCount%3B_j%2B%2B)%7Bif(equals(current%5BcurrentStart%2B_j-1%5D%2Cold%5BoldStart%2B_i-1%5D))distances%5B_i%5D%5B_j%5D%3Ddistances%5B_i-1%5D%5B_j-1%5D%3Belse%7Bvar%20north%3Ddistances%5B_i-1%5D%5B_j%5D%2B1%3Bvar%20west%3Ddistances%5B_i%5D%5B_j-1%5D%2B1%3Bdistances%5B_i%5D%5B_j%5D%3Dnorth%3Cwest%3Fnorth%3Awest%3B%7D%7D%7Dreturn%20distances%3B%7D%2F%2F%20This%20starts%20at%20the%20final%20weight%2C%20and%20walks%20%22backward%22%20by%20finding%0A%2F%2F%20the%20minimum%20previous%20weight%20recursively%20until%20the%20origin%20of%20the%20weight%0A%2F%2F%20matrix.%0Afunction%20spliceOperationsFromEditDistances(distances)%7Bvar%20i%3Ddistances.length-1%3Bvar%20j%3Ddistances%5B0%5D.length-1%3Bvar%20current%3Ddistances%5Bi%5D%5Bj%5D%3Bvar%20edits%3D%5B%5D%3Bwhile(i%3E0%7C%7Cj%3E0)%7Bif(i%3D%3D0)%7Bedits.push(EDIT_ADD)%3Bj--%3Bcontinue%3B%7Dif(j%3D%3D0)%7Bedits.push(EDIT_DELETE)%3Bi--%3Bcontinue%3B%7Dvar%20northWest%3Ddistances%5Bi-1%5D%5Bj-1%5D%3Bvar%20west%3Ddistances%5Bi-1%5D%5Bj%5D%3Bvar%20north%3Ddistances%5Bi%5D%5Bj-1%5D%3Bvar%20min%3Dvoid%200%3Bif(west%3Cnorth)min%3Dwest%3CnorthWest%3Fwest%3AnorthWest%3Belse%20min%3Dnorth%3CnorthWest%3Fnorth%3AnorthWest%3Bif(min%3D%3DnorthWest)%7Bif(northWest%3D%3Dcurrent)%7Bedits.push(EDIT_LEAVE)%3B%7Delse%7Bedits.push(EDIT_UPDATE)%3Bcurrent%3DnorthWest%3B%7Di--%3Bj--%3B%7Delse%20if(min%3D%3Dwest)%7Bedits.push(EDIT_DELETE)%3Bi--%3Bcurrent%3Dwest%3B%7Delse%7Bedits.push(EDIT_ADD)%3Bj--%3Bcurrent%3Dnorth%3B%7D%7Dedits.reverse()%3Breturn%20edits%3B%7D%2F**%0A%20%20%20*%20Splice%20Projection%20functions%3A%0A%20%20%20*%0A%20%20%20*%20A%20splice%20map%20is%20a%20representation%20of%20how%20a%20previous%20array%20of%20items%0A%20%20%20*%20was%20transformed%20into%20a%20new%20array%20of%20items.%20Conceptually%20it%20is%20a%20list%20of%0A%20%20%20*%20tuples%20of%0A%20%20%20*%0A%20%20%20*%20%20%20%3Cindex%2C%20removed%2C%20addedCount%3E%0A%20%20%20*%0A%20%20%20*%20which%20are%20kept%20in%20ascending%20index%20order%20of.%20The%20tuple%20represents%20that%20at%0A%20%20%20*%20the%20%7Cindex%7C%2C%20%7Cremoved%7C%20sequence%20of%20items%20were%20removed%2C%20and%20counting%20forward%0A%20%20%20*%20from%20%7Cindex%7C%2C%20%7CaddedCount%7C%20items%20were%20added.%0A%20%20%20*%2F%2F**%0A%20%20%20*%20Lacking%20individual%20splice%20mutation%20information%2C%20the%20minimal%20set%20of%0A%20%20%20*%20splices%20can%20be%20synthesized%20given%20the%20previous%20state%20and%20final%20state%20of%20an%0A%20%20%20*%20array.%20The%20basic%20approach%20is%20to%20calculate%20the%20edit%20distance%20matrix%20and%0A%20%20%20*%20choose%20the%20shortest%20path%20through%20it.%0A%20%20%20*%0A%20%20%20*%20Complexity%3A%20O(l%20*%20p)%0A%20%20%20*%20%20%20l%3A%20The%20length%20of%20the%20current%20array%0A%20%20%20*%20%20%20p%3A%20The%20length%20of%20the%20old%20array%0A%20%20%20*%0A%20%20%20*%20%40param%20%7B!Array%7D%20current%20The%20current%20%22changed%22%20array%20for%20which%20to%0A%20%20%20*%20calculate%20splices.%0A%20%20%20*%20%40param%20%7Bnumber%7D%20currentStart%20Starting%20index%20in%20the%20%60current%60%20array%20for%0A%20%20%20*%20which%20splices%20are%20calculated.%0A%20%20%20*%20%40param%20%7Bnumber%7D%20currentEnd%20Ending%20index%20in%20the%20%60current%60%20array%20for%0A%20%20%20*%20which%20splices%20are%20calculated.%0A%20%20%20*%20%40param%20%7B!Array%7D%20old%20The%20original%20%22unchanged%22%20array%20to%20compare%20%60current%60%0A%20%20%20*%20against%20to%20determine%20splices.%0A%20%20%20*%20%40param%20%7Bnumber%7D%20oldStart%20Starting%20index%20in%20the%20%60old%60%20array%20for%0A%20%20%20*%20which%20splices%20are%20calculated.%0A%20%20%20*%20%40param%20%7Bnumber%7D%20oldEnd%20Ending%20index%20in%20the%20%60old%60%20array%20for%0A%20%20%20*%20which%20splices%20are%20calculated.%0A%20%20%20*%20%40return%20%7B!Array%7D%20Returns%20an%20array%20of%20splice%20record%20objects.%20Each%20of%20these%0A%20%20%20*%20contains%3A%20%60index%60%20the%20location%20where%20the%20splice%20occurred%3B%20%60removed%60%0A%20%20%20*%20the%20array%20of%20removed%20items%20from%20this%20location%3B%20%60addedCount%60%20the%20number%0A%20%20%20*%20of%20items%20added%20at%20this%20location.%0A%20%20%20*%2Ffunction%20calcSplices(current%2CcurrentStart%2CcurrentEnd%2Cold%2ColdStart%2ColdEnd)%7Bvar%20prefixCount%3D0%3Bvar%20suffixCount%3D0%3Bvar%20splice%3Dvoid%200%3Bvar%20minLength%3DMath.min(currentEnd-currentStart%2ColdEnd-oldStart)%3Bif(currentStart%3D%3D0%26%26oldStart%3D%3D0)prefixCount%3DsharedPrefix(current%2Cold%2CminLength)%3Bif(currentEnd%3D%3Dcurrent.length%26%26oldEnd%3D%3Dold.length)suffixCount%3DsharedSuffix(current%2Cold%2CminLength-prefixCount)%3BcurrentStart%2B%3DprefixCount%3BoldStart%2B%3DprefixCount%3BcurrentEnd-%3DsuffixCount%3BoldEnd-%3DsuffixCount%3Bif(currentEnd-currentStart%3D%3D0%26%26oldEnd-oldStart%3D%3D0)return%5B%5D%3Bif(currentStart%3D%3DcurrentEnd)%7Bsplice%3DnewSplice(currentStart%2C%5B%5D%2C0)%3Bwhile(oldStart%3ColdEnd)%7Bsplice.removed.push(old%5BoldStart%2B%2B%5D)%3B%7Dreturn%5Bsplice%5D%3B%7Delse%20if(oldStart%3D%3DoldEnd)return%5BnewSplice(currentStart%2C%5B%5D%2CcurrentEnd-currentStart)%5D%3Bvar%20ops%3DspliceOperationsFromEditDistances(calcEditDistances(current%2CcurrentStart%2CcurrentEnd%2Cold%2ColdStart%2ColdEnd))%3Bsplice%3Dundefined%3Bvar%20splices%3D%5B%5D%3Bvar%20index%3DcurrentStart%3Bvar%20oldIndex%3DoldStart%3Bfor(var%20i%3D0%3Bi%3Cops.length%3Bi%2B%2B)%7Bswitch(ops%5Bi%5D)%7Bcase%20EDIT_LEAVE%3Aif(splice)%7Bsplices.push(splice)%3Bsplice%3Dundefined%3B%7Dindex%2B%2B%3BoldIndex%2B%2B%3Bbreak%3Bcase%20EDIT_UPDATE%3Aif(!splice)splice%3DnewSplice(index%2C%5B%5D%2C0)%3Bsplice.addedCount%2B%2B%3Bindex%2B%2B%3Bsplice.removed.push(old%5BoldIndex%5D)%3BoldIndex%2B%2B%3Bbreak%3Bcase%20EDIT_ADD%3Aif(!splice)splice%3DnewSplice(index%2C%5B%5D%2C0)%3Bsplice.addedCount%2B%2B%3Bindex%2B%2B%3Bbreak%3Bcase%20EDIT_DELETE%3Aif(!splice)splice%3DnewSplice(index%2C%5B%5D%2C0)%3Bsplice.removed.push(old%5BoldIndex%5D)%3BoldIndex%2B%2B%3Bbreak%3B%7D%7Dif(splice)%7Bsplices.push(splice)%3B%7Dreturn%20splices%3B%7Dfunction%20sharedPrefix(current%2Cold%2CsearchLength)%7Bfor(var%20i%3D0%3Bi%3CsearchLength%3Bi%2B%2B)%7Bif(!equals(current%5Bi%5D%2Cold%5Bi%5D))return%20i%3B%7Dreturn%20searchLength%3B%7Dfunction%20sharedSuffix(current%2Cold%2CsearchLength)%7Bvar%20index1%3Dcurrent.length%3Bvar%20index2%3Dold.length%3Bvar%20count%3D0%3Bwhile(count%3CsearchLength%26%26equals(current%5B--index1%5D%2Cold%5B--index2%5D))%7Bcount%2B%2B%3B%7Dreturn%20count%3B%7Dfunction%20calculateSplices(current%2Cprevious)%7Breturn%20calcSplices(current%2C0%2Ccurrent.length%2Cprevious%2C0%2Cprevious.length)%3B%7Dfunction%20equals(currentValue%2CpreviousValue)%7Breturn%20currentValue%3D%3D%3DpreviousValue%3B%7D%2F**%0A%20%20%20*%20%40namespace%0A%20%20%20*%20%40memberof%20Polymer%0A%20%20%20*%20%40summary%20Module%20that%20provides%20utilities%20for%20diffing%20arrays.%0A%20%20%20*%2FPolymer.ArraySplice%3D%7B%2F**%0A%20%20%20%20%20*%20Returns%20an%20array%20of%20splice%20records%20indicating%20the%20minimum%20edits%20required%0A%20%20%20%20%20*%20to%20transform%20the%20%60previous%60%20array%20into%20the%20%60current%60%20array.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20Splice%20records%20are%20ordered%20by%20index%20and%20contain%20the%20following%20fields%3A%0A%20%20%20%20%20*%20-%20%60index%60%3A%20index%20where%20edit%20started%0A%20%20%20%20%20*%20-%20%60removed%60%3A%20array%20of%20removed%20items%20from%20this%20index%0A%20%20%20%20%20*%20-%20%60addedCount%60%3A%20number%20of%20items%20added%20at%20this%20index%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20This%20function%20is%20based%20on%20the%20Levenshtein%20%22minimum%20edit%20distance%22%0A%20%20%20%20%20*%20algorithm.%20Note%20that%20updates%20are%20treated%20as%20removal%20followed%20by%20addition.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20The%20worst-case%20time%20complexity%20of%20this%20algorithm%20is%20%60O(l%20*%20p)%60%0A%20%20%20%20%20*%20%20%20l%3A%20The%20length%20of%20the%20current%20array%0A%20%20%20%20%20*%20%20%20p%3A%20The%20length%20of%20the%20previous%20array%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20However%2C%20the%20worst-case%20complexity%20is%20reduced%20by%20an%20%60O(n)%60%20optimization%0A%20%20%20%20%20*%20to%20detect%20any%20shared%20prefix%20%26%20suffix%20between%20the%20two%20arrays%20and%20only%0A%20%20%20%20%20*%20perform%20the%20more%20expensive%20minimum%20edit%20distance%20calculation%20over%20the%0A%20%20%20%20%20*%20non-shared%20portions%20of%20the%20arrays.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40function%0A%20%20%20%20%20*%20%40memberof%20Polymer.ArraySplice%0A%20%20%20%20%20*%20%40param%20%7B!Array%7D%20current%20The%20%22changed%22%20array%20for%20which%20splices%20will%20be%0A%20%20%20%20%20*%20calculated.%0A%20%20%20%20%20*%20%40param%20%7B!Array%7D%20previous%20The%20%22unchanged%22%20original%20array%20to%20compare%0A%20%20%20%20%20*%20%60current%60%20against%20to%20determine%20the%20splices.%0A%20%20%20%20%20*%20%40return%20%7B!Array%7D%20Returns%20an%20array%20of%20splice%20record%20objects.%20Each%20of%20these%0A%20%20%20%20%20*%20contains%3A%20%60index%60%20the%20location%20where%20the%20splice%20occurred%3B%20%60removed%60%0A%20%20%20%20%20*%20the%20array%20of%20removed%20items%20from%20this%20location%3B%20%60addedCount%60%20the%20number%0A%20%20%20%20%20*%20of%20items%20added%20at%20this%20location.%0A%20%20%20%20%20*%2FcalculateSplices%3AcalculateSplices%7D%3B%7D)()%3B%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Fcpt-static.gannettdigital.com%2Funiversal-web-client%2Fmaster%2Flatest%2Fvendor%2Fcomponents%2Fpolymer%2Flib%2Futils%2Farray-splice.html.js%0A | 8.0 kB | 2023-03-07 | 2024-01-25 | |
Pretty
Loading... | ||||
http:text/javascript;charset=utf-8,(function()%7B'use%20strict'%3Bvar%20debouncerQueue%3D%5B%5D%3B%2F**%0A%20%20%20*%20Adds%20a%20%60Polymer.Debouncer%60%20to%20a%20list%20of%20globally%20flushable%20tasks.%0A%20%20%20*%0A%20%20%20*%20%40memberof%20Polymer%0A%20%20%20*%20%40param%20%7B!Polymer.Debouncer%7D%20debouncer%20Debouncer%20to%20enqueue%0A%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20*%2FPolymer.enqueueDebouncer%3Dfunction(debouncer)%7BdebouncerQueue.push(debouncer)%3B%7D%3Bfunction%20flushDebouncers()%7Bvar%20didFlush%3DBoolean(debouncerQueue.length)%3Bwhile(debouncerQueue.length)%7Btry%7BdebouncerQueue.shift().flush()%3B%7Dcatch(e)%7BsetTimeout(function()%7Bthrow%20e%3B%7D)%3B%7D%7Dreturn%20didFlush%3B%7D%2F**%0A%20%20%20*%20Forces%20several%20classes%20of%20asynchronously%20queued%20tasks%20to%20flush%3A%0A%20%20%20*%20-%20Debouncers%20added%20via%20%60enqueueDebouncer%60%0A%20%20%20*%20-%20ShadyDOM%20distribution%0A%20%20%20*%0A%20%20%20*%20%40memberof%20Polymer%0A%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20*%2FPolymer.flush%3Dfunction()%7Bvar%20shadyDOM%3Dvoid%200%2Cdebouncers%3Dvoid%200%3Bdo%7BshadyDOM%3Dwindow.ShadyDOM%26%26ShadyDOM.flush()%3Bif(window.ShadyCSS%26%26window.ShadyCSS.ScopingShim)%7Bwindow.ShadyCSS.ScopingShim.flush()%3B%7Ddebouncers%3DflushDebouncers()%3B%7Dwhile(shadyDOM%7C%7Cdebouncers)%3B%7D%3B%7D)()%3B%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Fcpt-static.gannettdigital.com%2Funiversal-web-client%2Fmaster%2Flatest%2Fvendor%2Fcomponents%2Fpolymer%2Flib%2Futils%2Fflush.html.js%0A | 1.1 kB | 2023-03-07 | 2024-01-25 | |
Pretty
Loading... | ||||
http:text/javascript;charset=utf-8,'use%20strict'%3Bvar%20_createClass%3Dfunction()%7Bfunction%20defineProperties(target%2Cprops)%7Bfor(var%20i%3D0%3Bi%3Cprops.length%3Bi%2B%2B)%7Bvar%20descriptor%3Dprops%5Bi%5D%3Bdescriptor.enumerable%3Ddescriptor.enumerable%7C%7Cfalse%3Bdescriptor.configurable%3Dtrue%3Bif(%22value%22in%20descriptor)descriptor.writable%3Dtrue%3BObject.defineProperty(target%2Cdescriptor.key%2Cdescriptor)%3B%7D%7Dreturn%20function(Constructor%2CprotoProps%2CstaticProps)%7Bif(protoProps)defineProperties(Constructor.prototype%2CprotoProps)%3Bif(staticProps)defineProperties(Constructor%2CstaticProps)%3Breturn%20Constructor%3B%7D%3B%7D()%3Bfunction%20_classCallCheck(instance%2CConstructor)%7Bif(!(instance%20instanceof%20Constructor))%7Bthrow%20new%20TypeError(%22Cannot%20call%20a%20class%20as%20a%20function%22)%3B%7D%7Dfunction%20_possibleConstructorReturn(self%2Ccall)%7Bif(!self)%7Bthrow%20new%20ReferenceError(%22this%20hasn't%20been%20initialised%20-%20super()%20hasn't%20been%20called%22)%3B%7Dreturn%20call%26%26(typeof%20call%3D%3D%3D%22object%22%7C%7Ctypeof%20call%3D%3D%3D%22function%22)%3Fcall%3Aself%3B%7Dfunction%20_inherits(subClass%2CsuperClass)%7Bif(typeof%20superClass!%3D%3D%22function%22%26%26superClass!%3D%3Dnull)%7Bthrow%20new%20TypeError(%22Super%20expression%20must%20either%20be%20null%20or%20a%20function%2C%20not%20%22%2Btypeof%20superClass)%3B%7DsubClass.prototype%3DObject.create(superClass%26%26superClass.prototype%2C%7Bconstructor%3A%7Bvalue%3AsubClass%2Cenumerable%3Afalse%2Cwritable%3Atrue%2Cconfigurable%3Atrue%7D%7D)%3Bif(superClass)Object.setPrototypeOf%3FObject.setPrototypeOf(subClass%2CsuperClass)%3AsubClass.__proto__%3DsuperClass%3B%7Dvar%20PartnerComscoreMediaVideo%3Dfunction(_window%24ga_data%24mixin)%7B_inherits(PartnerComscoreMediaVideo%2C_window%24ga_data%24mixin)%3Bfunction%20PartnerComscoreMediaVideo()%7B_classCallCheck(this%2CPartnerComscoreMediaVideo)%3Breturn%20_possibleConstructorReturn(this%2C(PartnerComscoreMediaVideo.__proto__%7C%7CObject.getPrototypeOf(PartnerComscoreMediaVideo)).apply(this%2Carguments))%3B%7D_createClass(PartnerComscoreMediaVideo%2C%5B%7Bkey%3A'ready'%2Cvalue%3Afunction%20ready()%7Bvar%20_this2%3Dthis%3BPolymer.RenderStatus.afterNextRender(this%2Cfunction()%7Bif(!_this2.videos)_this2.videos%3D%7B%7D%3Bdocument.addEventListener('visibilitychange'%2Cfunction()%7Breturn%20_this2.onVisibilityChange()%3B%7D)%3B_this2.init()%3B%7D%2C%5B%5D)%3B%7D%7D%2C%7Bkey%3A'init'%2Cvalue%3Afunction%20init()%7Bvar%20_this3%3Dthis%3Bthis.waitForInit('ns_').then(function()%7B_this3.broadcast(_this3.constructor.is%2B'-ready'%2C%7Bel%3A_this3%7D)%3B%7D)%3B%7D%7D%2C%7Bkey%3A'initialize'%2Cvalue%3Afunction%20initialize(video)%7Bthis._setStreamingTag(video)%3Bthis._setupVideoEvents(video)%3B%7D%7D%2C%7Bkey%3A'_setupVideoEvents'%2Cvalue%3Afunction%20_setupVideoEvents(video)%7Bvar%20_this4%3Dthis%3Bvideo.addEventListener('state'%2Cfunction(e)%7Bvar%20vid%3D_this4.getNested(e%2C'detail'%2C'video')%3Bif(vid)%7Bswitch(vid.state)%7Bcase%20vid.states.INITIALIZING%3A_this4._setStreamingTag(vid)%3Bbreak%3B%7Dif(vid.isPreroll)%7Bswitch(vid.state)%7Bcase%20vid.states.STARTED%3A_this4.comscoreAdPlayback(vid)%3Bbreak%3Bcase%20vid.states.DONE%3A_this4._stopStreamingTag(video)%3Bbreak%3B%7D%7Delse%20if(vid.isVideo)%7Bswitch(vid.state)%7Bcase%20vid.states.STARTED%3Acase%20vid.states.PLAYING%3A_this4.comscoreContentPlayback(video)%3Bbreak%3Bcase%20vid.states.PAUSED%3Acase%20vid.states.DONE%3A_this4._stopStreamingTag(video)%3Bbreak%3B%7D%7D%7D%7D)%3B%7D%7D%2C%7Bkey%3A'comscoreAdPlayback'%2Cvalue%3Afunction%20comscoreAdPlayback(video)%7Bthis.log('comscore%20PREROLL%20PLAYBACK')%3Bvar%20comVideo%3Dthis.videos%5Bvideo.experienceId%5D%3BcomVideo.streamingTag.playVideoAdvertisement(%7Bns_st_cl%3Avideo.Preroll.duration*1000%2Cns_st_ci%3AcomVideo.metadata.ns_st_ci%7D%2Cwindow.ns_.StreamingTag.AdType.LinearOnDemandPreRoll)%3B%7D%2F**%0A%20%20%20%20%20%20%20%20%20*%20On%20video%20playback%0A%20%20%20%20%20%20%20%20%20*%20*%2F%7D%2C%7Bkey%3A'comscoreContentPlayback'%2Cvalue%3Afunction%20comscoreContentPlayback(video)%7Bthis.log('comscore%20CONTENT%20PLAYBACK')%3Bvar%20comVideo%3Dthis.videos%5Bvideo.experienceId%5D%3BcomVideo.streamingTag.playVideoContentPart(comVideo.metadata%2Cwindow.ns_.StreamingTag.ContentType.LongFormOnDemand)%3B%7D%2F**%0A%20%20%20%20%20%20%20%20%20*%20Stop%20all%20tracking%20for%20items%20in%20this.comscoreVideo%20array%20when%20focus%20is%20lost%0A%20%20%20%20%20%20%20%20%20*%20*%2F%7D%2C%7Bkey%3A'onVisibilityChange'%2Cvalue%3Afunction%20onVisibilityChange()%7Bif(document.hidden)%7Bthis._stopStreamingTag()%3B%7D%7D%2F**%0A%20%20%20%20%20%20%20%20%20*%20Metadata%20options%20to%20pass%20to%20comscore%0A%20%20%20%20%20%20%20%20%20*%20*%20%5Bc3%5D%20site%20value%2C%20site_key%20or%20custom%20value%0A%20%20%20%20%20%20%20%20%20*%20*%20%5Bc4%5D%20section%20value%0A%20%20%20%20%20%20%20%20%20*%20*%20%5Bc6%5D%20required%20null%20value%0A%20%20%20%20%20%20%20%20%20*%20*%20%5Bc7%5D%20full%20video%20url%0A%20%20%20%20%20%20%20%20%20*%20*%20%5Bc8%5D%20video%20title%0A%20%20%20%20%20%20%20%20%20*%20*%20%5Bns_st_ce%5D%20Complete%20episode%20flag%0A%20%20%20%20%20%20%20%20%20*%20*%20%5Bns_st_ci%5D%20content%20id%0A%20%20%20%20%20%20%20%20%20*%20*%20%5Bns_st_cl%5D%20clip%20length%0A%20%20%20%20%20%20%20%20%20*%20*%20%5Bns_st_ddt%5D%20Digital%20air%20date%0A%20%20%20%20%20%20%20%20%20*%20*%20%5Bns_st_ge%5D%20content%20genre%20-%20same%20as%20section%0A%20%20%20%20%20%20%20%20%20*%20*%20%5Bns_st_ia%5D%20Ad%20Load%20Flag%0A%20%20%20%20%20%20%20%20%20*%20*%20%5Bns_st_tdt%5D%20TV%20air%20date%0A%20%20%20%20%20%20%20%20%20*%20*%20%5Bns_st_ti%5D%20TMS%20id%0A%20%20%20%20%20%20%20%20%20*%20*%2F%7D%2C%7Bkey%3A'_setStreamingTag'%2Cvalue%3Afunction%20_setStreamingTag(video)%7Bthis.log('comscore%20SET%20STREAMING%20TAG')%3Bvar%20data%3Dvideo.data%3Bthis.videos%5Bvideo.experienceId%5D%3D%7BstreamingTag%3Anew%20window.ns_.StreamingTag(%7BcustomerC2%3Athis.comscore.c2%7D)%2Cvideo%3Avideo%2Cmetadata%3A%7Bc3%3Aga_data.site.baseName%2Cc4%3Adata.ssts.section%2Cc6%3A'*null'%2Cc7%3Adata.url%2Cc8%3Adata.title%2Cns_st_ce%3A'*null'%2Cns_st_ci%3Adata.id%2Cns_st_cl%3Adata.coreDuration*1000%2C%2F%2F%20miliseconds%0Ans_st_ddt%3Adata.dateCreated%2Cns_st_ge%3Adata.ssts.section%2Cns_st_ia%3A'*null'%2Cns_st_tdt%3A'*null'%2Cns_st_ti%3A'*null'%7D%7D%3B%7D%2F**%0A%20%20%20%20%20%20%20%20%20*%20Call%20comscore%20stop%20method%20when%0A%20%20%20%20%20%20%20%20%20*%20*%20Video%20playback%20has%20ended%0A%20%20%20%20%20%20%20%20%20*%20*%20Ad%20playback%20has%20ended%0A%20%20%20%20%20%20%20%20%20*%20*%20document.hidden%20(Navigating%20away%20current%20window%2C%20Home%2FSleep%20button%20pressed%20on%20mobile)%0A%20%20%20%20%20%20%20%20%20*%20*%2F%7D%2C%7Bkey%3A'_stopStreamingTag'%2Cvalue%3Afunction%20_stopStreamingTag(video)%7Bthis.log('comscore%20STOP%20STREAMING%20TAG')%3Bif(video)%7Bthis.videos%5Bvideo.experienceId%5D.streamingTag.stop()%3B%7Delse%7B%2F%2F%20stop%20all%20videos%0Avar%20_iteratorNormalCompletion%3Dtrue%3Bvar%20_didIteratorError%3Dfalse%3Bvar%20_iteratorError%3Dundefined%3Btry%7Bfor(var%20_iterator%3DObject.keys(this.videos)%5BSymbol.iterator%5D()%2C_step%3B!(_iteratorNormalCompletion%3D(_step%3D_iterator.next()).done)%3B_iteratorNormalCompletion%3Dtrue)%7Bvar%20_video%3D_step.value%3Bthis.videos%5B_video%5D.streamingTag.stop()%3B%7D%7Dcatch(err)%7B_didIteratorError%3Dtrue%3B_iteratorError%3Derr%3B%7Dfinally%7Btry%7Bif(!_iteratorNormalCompletion%26%26_iterator.return)%7B_iterator.return()%3B%7D%7Dfinally%7Bif(_didIteratorError)%7Bthrow%20_iteratorError%3B%7D%7D%7D%7D%7D%7D%5D%2C%5B%7Bkey%3A'is'%2C%2F%2F%20eslint-disable-line%20new-cap%0Aget%3Afunction%20get()%7Breturn'partner-comscore-media-video'%3B%7D%7D%2C%7Bkey%3A'properties'%2Cget%3Afunction%20get()%7Breturn%7Bcomscore%3A%7Btype%3AObject%2Cvalue%3A%7Bc2%3A'6035223'%7D%2CreadOnly%3Atrue%7D%7D%3B%7D%7D%5D)%3Breturn%20PartnerComscoreMediaVideo%3B%7D(window.ga_data.mixins.VideoUtils(Polymer.Element))%3BcustomElements.define(PartnerComscoreMediaVideo.is%2CPartnerComscoreMediaVideo)%3B%0A%2F%2F%23%20sourceMappingURL%3D..%2F..%2F..%2Fmaps%2Felements%2Fpartner%2Fpartner-comscore-media-video%2Fpartner-comscore-media-video.html_script_0.js.map%0A%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Fcpt-static.gannettdigital.com%2Funiversal-web-client%2Fmaster%2Flatest%2Felements%2Fpartner%2Fpartner-comscore-media-video%2Fpartner-comscore-media-video.html.js%0A | 6.5 kB | 2023-03-13 | 2024-01-25 | |
Pretty
Loading... | ||||
http:text/javascript;charset=utf-8,var%20_createClass%3Dfunction()%7Bfunction%20defineProperties(target%2Cprops)%7Bfor(var%20i%3D0%3Bi%3Cprops.length%3Bi%2B%2B)%7Bvar%20descriptor%3Dprops%5Bi%5D%3Bdescriptor.enumerable%3Ddescriptor.enumerable%7C%7Cfalse%3Bdescriptor.configurable%3Dtrue%3Bif(%22value%22in%20descriptor)descriptor.writable%3Dtrue%3BObject.defineProperty(target%2Cdescriptor.key%2Cdescriptor)%3B%7D%7Dreturn%20function(Constructor%2CprotoProps%2CstaticProps)%7Bif(protoProps)defineProperties(Constructor.prototype%2CprotoProps)%3Bif(staticProps)defineProperties(Constructor%2CstaticProps)%3Breturn%20Constructor%3B%7D%3B%7D()%3Bvar%20_get%3Dfunction%20get(object%2Cproperty%2Creceiver)%7Bif(object%3D%3D%3Dnull)object%3DFunction.prototype%3Bvar%20desc%3DObject.getOwnPropertyDescriptor(object%2Cproperty)%3Bif(desc%3D%3D%3Dundefined)%7Bvar%20parent%3DObject.getPrototypeOf(object)%3Bif(parent%3D%3D%3Dnull)%7Breturn%20undefined%3B%7Delse%7Breturn%20get(parent%2Cproperty%2Creceiver)%3B%7D%7Delse%20if(%22value%22in%20desc)%7Breturn%20desc.value%3B%7Delse%7Bvar%20getter%3Ddesc.get%3Bif(getter%3D%3D%3Dundefined)%7Breturn%20undefined%3B%7Dreturn%20getter.call(receiver)%3B%7D%7D%3Bfunction%20_toConsumableArray(arr)%7Bif(Array.isArray(arr))%7Bfor(var%20i%3D0%2Carr2%3DArray(arr.length)%3Bi%3Carr.length%3Bi%2B%2B)%7Barr2%5Bi%5D%3Darr%5Bi%5D%3B%7Dreturn%20arr2%3B%7Delse%7Breturn%20Array.from(arr)%3B%7D%7Dfunction%20_classCallCheck(instance%2CConstructor)%7Bif(!(instance%20instanceof%20Constructor))%7Bthrow%20new%20TypeError(%22Cannot%20call%20a%20class%20as%20a%20function%22)%3B%7D%7Dfunction%20_possibleConstructorReturn(self%2Ccall)%7Bif(!self)%7Bthrow%20new%20ReferenceError(%22this%20hasn't%20been%20initialised%20-%20super()%20hasn't%20been%20called%22)%3B%7Dreturn%20call%26%26(typeof%20call%3D%3D%3D%22object%22%7C%7Ctypeof%20call%3D%3D%3D%22function%22)%3Fcall%3Aself%3B%7Dfunction%20_inherits(subClass%2CsuperClass)%7Bif(typeof%20superClass!%3D%3D%22function%22%26%26superClass!%3D%3Dnull)%7Bthrow%20new%20TypeError(%22Super%20expression%20must%20either%20be%20null%20or%20a%20function%2C%20not%20%22%2Btypeof%20superClass)%3B%7DsubClass.prototype%3DObject.create(superClass%26%26superClass.prototype%2C%7Bconstructor%3A%7Bvalue%3AsubClass%2Cenumerable%3Afalse%2Cwritable%3Atrue%2Cconfigurable%3Atrue%7D%7D)%3Bif(superClass)Object.setPrototypeOf%3FObject.setPrototypeOf(subClass%2CsuperClass)%3AsubClass.__proto__%3DsuperClass%3B%7D(function()%7B'use%20strict'%3Bvar%20styleInterface%3Dwindow.ShadyCSS%3B%2F**%0A%20%20%20*%20Element%20class%20mixin%20that%20provides%20Polymer's%20%22legacy%22%20API%20intended%20to%20be%0A%20%20%20*%20backward-compatible%20to%20the%20greatest%20extent%20possible%20with%20the%20API%0A%20%20%20*%20found%20on%20the%20Polymer%201.x%20%60Polymer.Base%60%20prototype%20applied%20to%20all%20elements%0A%20%20%20*%20defined%20using%20the%20%60Polymer(%7B...%7D)%60%20function.%0A%20%20%20*%0A%20%20%20*%20%40mixinFunction%0A%20%20%20*%20%40polymer%0A%20%20%20*%20%40appliesMixin%20Polymer.ElementMixin%0A%20%20%20*%20%40appliesMixin%20Polymer.GestureEventListeners%0A%20%20%20*%20%40property%20isAttached%20%7Bboolean%7D%20Set%20to%20%60true%60%20in%20this%20element's%0A%20%20%20*%20%20%20%60connectedCallback%60%20and%20%60false%60%20in%20%60disconnectedCallback%60%0A%20%20%20*%20%40memberof%20Polymer%0A%20%20%20*%20%40summary%20Element%20class%20mixin%20that%20provides%20Polymer's%20%22legacy%22%20API%0A%20%20%20*%2FPolymer.LegacyElementMixin%3DPolymer.dedupingMixin(function(base)%7B%2F**%0A%20%20%20%20%20*%20%40constructor%0A%20%20%20%20%20*%20%40extends%20%7Bbase%7D%0A%20%20%20%20%20*%20%40implements%20%7BPolymer_ElementMixin%7D%0A%20%20%20%20%20*%20%40implements%20%7BPolymer_GestureEventListeners%7D%0A%20%20%20%20%20*%20%40implements%20%7BPolymer_DirMixin%7D%0A%20%20%20%20%20*%20%40private%0A%20%20%20%20%20*%2Fvar%20legacyElementBase%3DPolymer.DirMixin(Polymer.GestureEventListeners(Polymer.ElementMixin(base)))%3B%2F**%0A%20%20%20%20%20*%20Map%20of%20simple%20names%20to%20touch%20action%20names%0A%20%20%20%20%20*%20%40dict%0A%20%20%20%20%20*%2Fvar%20DIRECTION_MAP%3D%7B'x'%3A'pan-x'%2C'y'%3A'pan-y'%2C'none'%3A'none'%2C'all'%3A'auto'%7D%3B%2F**%0A%20%20%20%20%20*%20%40polymer%0A%20%20%20%20%20*%20%40mixinClass%0A%20%20%20%20%20*%20%40extends%20%7BlegacyElementBase%7D%0A%20%20%20%20%20*%20%40implements%20%7BPolymer_LegacyElementMixin%7D%0A%20%20%20%20%20*%20%40unrestricted%0A%20%20%20%20%20*%2Fvar%20LegacyElement%3Dfunction(_legacyElementBase)%7B_inherits(LegacyElement%2C_legacyElementBase)%3Bfunction%20LegacyElement()%7B_classCallCheck(this%2CLegacyElement)%3B%2F**%20%40type%20%7Bboolean%7D%20*%2Fvar%20_this%3D_possibleConstructorReturn(this%2C(LegacyElement.__proto__%7C%7CObject.getPrototypeOf(LegacyElement)).call(this))%3B_this.isAttached%3B%2F**%20%40type%20%7BWeakMap%3C!Element%2C%20!Object%3Cstring%2C%20!Function%3E%3E%7D%20*%2F_this.__boundListeners%3B%2F**%20%40type%20%7BObject%3Cstring%2C%20Function%3E%7D%20*%2F_this._debouncers%3Breturn%20_this%3B%7D%2F**%0A%20%20%20%20%20%20%20*%20Forwards%20%60importMeta%60%20from%20the%20prototype%20(i.e.%20from%20the%20info%20object%0A%20%20%20%20%20%20%20*%20passed%20to%20%60Polymer(%7B...%7D)%60)%20to%20the%20static%20API.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40return%20%7B!Object%7D%20The%20%60import.meta%60%20object%20set%20on%20the%20prototype%0A%20%20%20%20%20%20%20*%20%40suppress%20%7BmissingProperties%7D%20%60this%60%20is%20always%20in%20the%20instance%20in%0A%20%20%20%20%20%20%20*%20%20closure%20for%20some%20reason%20even%20in%20a%20static%20method%2C%20rather%20than%20the%20class%0A%20%20%20%20%20%20%20*%2F_createClass(LegacyElement%2C%5B%7Bkey%3A'created'%2C%2F**%0A%20%20%20%20%20%20%20*%20Legacy%20callback%20called%20during%20the%20%60constructor%60%2C%20for%20overriding%0A%20%20%20%20%20%20%20*%20by%20the%20user.%0A%20%20%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20%20%20*%2Fvalue%3Afunction%20created()%7B%7D%2F**%0A%20%20%20%20%20%20%20*%20Provides%20an%20implementation%20of%20%60connectedCallback%60%0A%20%20%20%20%20%20%20*%20which%20adds%20Polymer%20legacy%20API's%20%60attached%60%20method.%0A%20%20%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20%20%20*%20%40override%0A%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'connectedCallback'%2Cvalue%3Afunction%20connectedCallback()%7B_get(LegacyElement.prototype.__proto__%7C%7CObject.getPrototypeOf(LegacyElement.prototype)%2C'connectedCallback'%2Cthis).call(this)%3Bthis.isAttached%3Dtrue%3Bthis.attached()%3B%7D%2F**%0A%20%20%20%20%20%20%20*%20Legacy%20callback%20called%20during%20%60connectedCallback%60%2C%20for%20overriding%0A%20%20%20%20%20%20%20*%20by%20the%20user.%0A%20%20%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'attached'%2Cvalue%3Afunction%20attached()%7B%7D%2F**%0A%20%20%20%20%20%20%20*%20Provides%20an%20implementation%20of%20%60disconnectedCallback%60%0A%20%20%20%20%20%20%20*%20which%20adds%20Polymer%20legacy%20API's%20%60detached%60%20method.%0A%20%20%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20%20%20*%20%40override%0A%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'disconnectedCallback'%2Cvalue%3Afunction%20disconnectedCallback()%7B_get(LegacyElement.prototype.__proto__%7C%7CObject.getPrototypeOf(LegacyElement.prototype)%2C'disconnectedCallback'%2Cthis).call(this)%3Bthis.isAttached%3Dfalse%3Bthis.detached()%3B%7D%2F**%0A%20%20%20%20%20%20%20*%20Legacy%20callback%20called%20during%20%60disconnectedCallback%60%2C%20for%20overriding%0A%20%20%20%20%20%20%20*%20by%20the%20user.%0A%20%20%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'detached'%2Cvalue%3Afunction%20detached()%7B%7D%2F**%0A%20%20%20%20%20%20%20*%20Provides%20an%20override%20implementation%20of%20%60attributeChangedCallback%60%0A%20%20%20%20%20%20%20*%20which%20adds%20the%20Polymer%20legacy%20API's%20%60attributeChanged%60%20method.%0A%20%20%20%20%20%20%20*%20%40param%20%7Bstring%7D%20name%20Name%20of%20attribute.%0A%20%20%20%20%20%20%20*%20%40param%20%7B%3Fstring%7D%20old%20Old%20value%20of%20attribute.%0A%20%20%20%20%20%20%20*%20%40param%20%7B%3Fstring%7D%20value%20Current%20value%20of%20attribute.%0A%20%20%20%20%20%20%20*%20%40param%20%7B%3Fstring%7D%20namespace%20Attribute%20namespace.%0A%20%20%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20%20%20*%20%40override%0A%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'attributeChangedCallback'%2Cvalue%3Afunction%20attributeChangedCallback(name%2Cold%2Cvalue%2Cnamespace)%7Bif(old!%3D%3Dvalue)%7B_get(LegacyElement.prototype.__proto__%7C%7CObject.getPrototypeOf(LegacyElement.prototype)%2C'attributeChangedCallback'%2Cthis).call(this%2Cname%2Cold%2Cvalue%2Cnamespace)%3Bthis.attributeChanged(name%2Cold%2Cvalue)%3B%7D%7D%2F**%0A%20%20%20%20%20%20%20*%20Legacy%20callback%20called%20during%20%60attributeChangedChallback%60%2C%20for%20overriding%0A%20%20%20%20%20%20%20*%20by%20the%20user.%0A%20%20%20%20%20%20%20*%20%40param%20%7Bstring%7D%20name%20Name%20of%20attribute.%0A%20%20%20%20%20%20%20*%20%40param%20%7B%3Fstring%7D%20old%20Old%20value%20of%20attribute.%0A%20%20%20%20%20%20%20*%20%40param%20%7B%3Fstring%7D%20value%20Current%20value%20of%20attribute.%0A%20%20%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'attributeChanged'%2Cvalue%3Afunction%20attributeChanged(name%2Cold%2Cvalue)%7B%7D%2F%2F%20eslint-disable-line%20no-unused-vars%0A%2F**%0A%20%20%20%20%20%20%20*%20Overrides%20the%20default%20%60Polymer.PropertyEffects%60%20implementation%20to%0A%20%20%20%20%20%20%20*%20add%20support%20for%20class%20initialization%20via%20the%20%60_registered%60%20callback.%0A%20%20%20%20%20%20%20*%20This%20is%20called%20only%20when%20the%20first%20instance%20of%20the%20element%20is%20created.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20%20%20*%20%40override%0A%20%20%20%20%20%20%20*%20%40suppress%20%7BinvalidCasts%7D%0A%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'_initializeProperties'%2Cvalue%3Afunction%20_initializeProperties()%7Bvar%20proto%3DObject.getPrototypeOf(this)%3Bif(!proto.hasOwnProperty('__hasRegisterFinished'))%7Bthis._registered()%3B%2F%2F%20backstop%20in%20case%20the%20%60_registered%60%20implementation%20does%20not%20set%20this%0Aproto.__hasRegisterFinished%3Dtrue%3B%7D_get(LegacyElement.prototype.__proto__%7C%7CObject.getPrototypeOf(LegacyElement.prototype)%2C'_initializeProperties'%2Cthis).call(this)%3Bthis.root%3D%2F**%20%40type%20%7BHTMLElement%7D%20*%2Fthis%3Bthis.created()%3B%2F%2F%20Ensure%20listeners%20are%20applied%20immediately%20so%20that%20they%20are%0A%2F%2F%20added%20before%20declarative%20event%20listeners.%20This%20allows%20an%20element%20to%0A%2F%2F%20decorate%20itself%20via%20an%20event%20prior%20to%20any%20declarative%20listeners%0A%2F%2F%20seeing%20the%20event.%20Note%2C%20this%20ensures%20compatibility%20with%201.x%20ordering.%0Athis._applyListeners()%3B%7D%2F**%0A%20%20%20%20%20%20%20*%20Called%20automatically%20when%20an%20element%20is%20initializing.%0A%20%20%20%20%20%20%20*%20Users%20may%20override%20this%20method%20to%20perform%20class%20registration%20time%0A%20%20%20%20%20%20%20*%20work.%20The%20implementation%20should%20ensure%20the%20work%20is%20performed%0A%20%20%20%20%20%20%20*%20only%20once%20for%20the%20class.%0A%20%20%20%20%20%20%20*%20%40protected%0A%20%20%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'_registered'%2Cvalue%3Afunction%20_registered()%7B%7D%2F**%0A%20%20%20%20%20%20%20*%20Overrides%20the%20default%20%60Polymer.PropertyEffects%60%20implementation%20to%0A%20%20%20%20%20%20%20*%20add%20support%20for%20installing%20%60hostAttributes%60%20and%20%60listeners%60.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20%20%20*%20%40override%0A%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'ready'%2Cvalue%3Afunction%20ready()%7Bthis._ensureAttributes()%3B_get(LegacyElement.prototype.__proto__%7C%7CObject.getPrototypeOf(LegacyElement.prototype)%2C'ready'%2Cthis).call(this)%3B%7D%2F**%0A%20%20%20%20%20%20%20*%20Ensures%20an%20element%20has%20required%20attributes.%20Called%20when%20the%20element%0A%20%20%20%20%20%20%20*%20is%20being%20readied%20via%20%60ready%60.%20Users%20should%20override%20to%20set%20the%0A%20%20%20%20%20%20%20*%20element's%20required%20attributes.%20The%20implementation%20should%20be%20sure%0A%20%20%20%20%20%20%20*%20to%20check%20and%20not%20override%20existing%20attributes%20added%20by%0A%20%20%20%20%20%20%20*%20the%20user%20of%20the%20element.%20Typically%2C%20setting%20attributes%20should%20be%20left%0A%20%20%20%20%20%20%20*%20to%20the%20element%20user%20and%20not%20done%20here%3B%20reasonable%20exceptions%20include%0A%20%20%20%20%20%20%20*%20setting%20aria%20roles%20and%20focusability.%0A%20%20%20%20%20%20%20*%20%40protected%0A%20%20%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'_ensureAttributes'%2Cvalue%3Afunction%20_ensureAttributes()%7B%7D%2F**%0A%20%20%20%20%20%20%20*%20Adds%20element%20event%20listeners.%20Called%20when%20the%20element%0A%20%20%20%20%20%20%20*%20is%20being%20readied%20via%20%60ready%60.%20Users%20should%20override%20to%0A%20%20%20%20%20%20%20*%20add%20any%20required%20element%20event%20listeners.%0A%20%20%20%20%20%20%20*%20In%20performance%20critical%20elements%2C%20the%20work%20done%20here%20should%20be%20kept%0A%20%20%20%20%20%20%20*%20to%20a%20minimum%20since%20it%20is%20done%20before%20the%20element%20is%20rendered.%20In%0A%20%20%20%20%20%20%20*%20these%20elements%2C%20consider%20adding%20listeners%20asynchronously%20so%20as%20not%20to%0A%20%20%20%20%20%20%20*%20block%20render.%0A%20%20%20%20%20%20%20*%20%40protected%0A%20%20%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'_applyListeners'%2Cvalue%3Afunction%20_applyListeners()%7B%7D%2F**%0A%20%20%20%20%20%20%20*%20Converts%20a%20typed%20JavaScript%20value%20to%20a%20string.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20Note%20this%20method%20is%20provided%20as%20backward-compatible%20legacy%20API%0A%20%20%20%20%20%20%20*%20only.%20%20It%20is%20not%20directly%20called%20by%20any%20Polymer%20features.%20To%20customize%0A%20%20%20%20%20%20%20*%20how%20properties%20are%20serialized%20to%20attributes%20for%20attribute%20bindings%20and%0A%20%20%20%20%20%20%20*%20%60reflectToAttribute%3A%20true%60%20properties%20as%20well%20as%20this%20method%2C%20override%0A%20%20%20%20%20%20%20*%20the%20%60_serializeValue%60%20method%20provided%20by%20%60Polymer.PropertyAccessors%60.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40param%20%7B*%7D%20value%20Value%20to%20deserialize%0A%20%20%20%20%20%20%20*%20%40return%20%7Bstring%20%7C%20undefined%7D%20Serialized%20value%0A%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'serialize'%2Cvalue%3Afunction%20serialize(value)%7Breturn%20this._serializeValue(value)%3B%7D%2F**%0A%20%20%20%20%20%20%20*%20Converts%20a%20string%20to%20a%20typed%20JavaScript%20value.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20Note%20this%20method%20is%20provided%20as%20backward-compatible%20legacy%20API%0A%20%20%20%20%20%20%20*%20only.%20%20It%20is%20not%20directly%20called%20by%20any%20Polymer%20features.%20%20To%20customize%0A%20%20%20%20%20%20%20*%20how%20attributes%20are%20deserialized%20to%20properties%20for%20in%0A%20%20%20%20%20%20%20*%20%60attributeChangedCallback%60%2C%20override%20%60_deserializeValue%60%20method%0A%20%20%20%20%20%20%20*%20provided%20by%20%60Polymer.PropertyAccessors%60.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40param%20%7Bstring%7D%20value%20String%20to%20deserialize%0A%20%20%20%20%20%20%20*%20%40param%20%7B*%7D%20type%20Type%20to%20deserialize%20the%20string%20to%0A%20%20%20%20%20%20%20*%20%40return%20%7B*%7D%20Returns%20the%20deserialized%20value%20in%20the%20%60type%60%20given.%0A%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'deserialize'%2Cvalue%3Afunction%20deserialize(value%2Ctype)%7Breturn%20this._deserializeValue(value%2Ctype)%3B%7D%2F**%0A%20%20%20%20%20%20%20*%20Serializes%20a%20property%20to%20its%20associated%20attribute.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20Note%20this%20method%20is%20provided%20as%20backward-compatible%20legacy%20API%0A%20%20%20%20%20%20%20*%20only.%20%20It%20is%20not%20directly%20called%20by%20any%20Polymer%20features.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40param%20%7Bstring%7D%20property%20Property%20name%20to%20reflect.%0A%20%20%20%20%20%20%20*%20%40param%20%7Bstring%3D%7D%20attribute%20Attribute%20name%20to%20reflect.%0A%20%20%20%20%20%20%20*%20%40param%20%7B*%3D%7D%20value%20Property%20value%20to%20reflect.%0A%20%20%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'reflectPropertyToAttribute'%2Cvalue%3Afunction%20reflectPropertyToAttribute(property%2Cattribute%2Cvalue)%7Bthis._propertyToAttribute(property%2Cattribute%2Cvalue)%3B%7D%2F**%0A%20%20%20%20%20%20%20*%20Sets%20a%20typed%20value%20to%20an%20HTML%20attribute%20on%20a%20node.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20Note%20this%20method%20is%20provided%20as%20backward-compatible%20legacy%20API%0A%20%20%20%20%20%20%20*%20only.%20%20It%20is%20not%20directly%20called%20by%20any%20Polymer%20features.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40param%20%7B*%7D%20value%20Value%20to%20serialize.%0A%20%20%20%20%20%20%20*%20%40param%20%7Bstring%7D%20attribute%20Attribute%20name%20to%20serialize%20to.%0A%20%20%20%20%20%20%20*%20%40param%20%7BElement%7D%20node%20Element%20to%20set%20attribute%20to.%0A%20%20%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'serializeValueToAttribute'%2Cvalue%3Afunction%20serializeValueToAttribute(value%2Cattribute%2Cnode)%7Bthis._valueToNodeAttribute(%2F**%20%40type%20%7BElement%7D%20*%2Fnode%7C%7Cthis%2Cvalue%2Cattribute)%3B%7D%2F**%0A%20%20%20%20%20%20%20*%20Copies%20own%20properties%20(including%20accessor%20descriptors)%20from%20a%20source%0A%20%20%20%20%20%20%20*%20object%20to%20a%20target%20object.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40param%20%7BObject%7D%20prototype%20Target%20object%20to%20copy%20properties%20to.%0A%20%20%20%20%20%20%20*%20%40param%20%7BObject%7D%20api%20Source%20object%20to%20copy%20properties%20from.%0A%20%20%20%20%20%20%20*%20%40return%20%7BObject%7D%20prototype%20object%20that%20was%20passed%20as%20first%20argument.%0A%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'extend'%2Cvalue%3Afunction%20extend(prototype%2Capi)%7Bif(!(prototype%26%26api))%7Breturn%20prototype%7C%7Capi%3B%7Dvar%20n%24%3DObject.getOwnPropertyNames(api)%3Bfor(var%20i%3D0%2Cn%3Bi%3Cn%24.length%26%26(n%3Dn%24%5Bi%5D)%3Bi%2B%2B)%7Bvar%20pd%3DObject.getOwnPropertyDescriptor(api%2Cn)%3Bif(pd)%7BObject.defineProperty(prototype%2Cn%2Cpd)%3B%7D%7Dreturn%20prototype%3B%7D%2F**%0A%20%20%20%20%20%20%20*%20Copies%20props%20from%20a%20source%20object%20to%20a%20target%20object.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20Note%2C%20this%20method%20uses%20a%20simple%20%60for...in%60%20strategy%20for%20enumerating%0A%20%20%20%20%20%20%20*%20properties.%20%20To%20ensure%20only%20%60ownProperties%60%20are%20copied%20from%20source%0A%20%20%20%20%20%20%20*%20to%20target%20and%20that%20accessor%20implementations%20are%20copied%2C%20use%20%60extend%60.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40param%20%7B!Object%7D%20target%20Target%20object%20to%20copy%20properties%20to.%0A%20%20%20%20%20%20%20*%20%40param%20%7B!Object%7D%20source%20Source%20object%20to%20copy%20properties%20from.%0A%20%20%20%20%20%20%20*%20%40return%20%7B!Object%7D%20Target%20object%20that%20was%20passed%20as%20first%20argument.%0A%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'mixin'%2Cvalue%3Afunction%20mixin(target%2Csource)%7Bfor(var%20i%20in%20source)%7Btarget%5Bi%5D%3Dsource%5Bi%5D%3B%7Dreturn%20target%3B%7D%2F**%0A%20%20%20%20%20%20%20*%20Sets%20the%20prototype%20of%20an%20object.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20Note%20this%20method%20is%20provided%20as%20backward-compatible%20legacy%20API%0A%20%20%20%20%20%20%20*%20only.%20%20It%20is%20not%20directly%20called%20by%20any%20Polymer%20features.%0A%20%20%20%20%20%20%20*%20%40param%20%7BObject%7D%20object%20The%20object%20on%20which%20to%20set%20the%20prototype.%0A%20%20%20%20%20%20%20*%20%40param%20%7BObject%7D%20prototype%20The%20prototype%20that%20will%20be%20set%20on%20the%20given%0A%20%20%20%20%20%20%20*%20%60object%60.%0A%20%20%20%20%20%20%20*%20%40return%20%7BObject%7D%20Returns%20the%20given%20%60object%60%20with%20its%20prototype%20set%0A%20%20%20%20%20%20%20*%20to%20the%20given%20%60prototype%60%20object.%0A%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'chainObject'%2Cvalue%3Afunction%20chainObject(object%2Cprototype)%7Bif(object%26%26prototype%26%26object!%3D%3Dprototype)%7Bobject.__proto__%3Dprototype%3B%7Dreturn%20object%3B%7D%2F*%20****%20Begin%20Template%20****%20*%2F%2F**%0A%20%20%20%20%20%20%20*%20Calls%20%60importNode%60%20on%20the%20%60content%60%20of%20the%20%60template%60%20specified%20and%0A%20%20%20%20%20%20%20*%20returns%20a%20document%20fragment%20containing%20the%20imported%20content.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40param%20%7BHTMLTemplateElement%7D%20template%20HTML%20template%20element%20to%20instance.%0A%20%20%20%20%20%20%20*%20%40return%20%7B!DocumentFragment%7D%20Document%20fragment%20containing%20the%20imported%0A%20%20%20%20%20%20%20*%20%20%20template%20content.%0A%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'instanceTemplate'%2Cvalue%3Afunction%20instanceTemplate(template)%7Bvar%20content%3Dthis.constructor._contentForTemplate(template)%3Bvar%20dom%3D%2F**%20%40type%20%7B!DocumentFragment%7D%20*%2Fdocument.importNode(content%2Ctrue)%3Breturn%20dom%3B%7D%2F*%20****%20Begin%20Events%20****%20*%2F%2F**%0A%20%20%20%20%20%20%20*%20Dispatches%20a%20custom%20event%20with%20an%20optional%20detail%20value.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40param%20%7Bstring%7D%20type%20Name%20of%20event%20type.%0A%20%20%20%20%20%20%20*%20%40param%20%7B*%3D%7D%20detail%20Detail%20value%20containing%20event-specific%0A%20%20%20%20%20%20%20*%20%20%20payload.%0A%20%20%20%20%20%20%20*%20%40param%20%7B%7B%20bubbles%3A%20(boolean%7Cundefined)%2C%20cancelable%3A%20(boolean%7Cundefined)%2C%20composed%3A%20(boolean%7Cundefined)%20%7D%3D%7D%0A%20%20%20%20%20%20%20*%20%20options%20Object%20specifying%20options.%20%20These%20may%20include%3A%0A%20%20%20%20%20%20%20*%20%20%60bubbles%60%20(boolean%2C%20defaults%20to%20%60true%60)%2C%0A%20%20%20%20%20%20%20*%20%20%60cancelable%60%20(boolean%2C%20defaults%20to%20false)%2C%20and%0A%20%20%20%20%20%20%20*%20%20%60node%60%20on%20which%20to%20fire%20the%20event%20(HTMLElement%2C%20defaults%20to%20%60this%60).%0A%20%20%20%20%20%20%20*%20%40return%20%7B!Event%7D%20The%20new%20event%20that%20was%20fired.%0A%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'fire'%2Cvalue%3Afunction%20fire(type%2Cdetail%2Coptions)%7Boptions%3Doptions%7C%7C%7B%7D%3Bdetail%3Ddetail%3D%3D%3Dnull%7C%7Cdetail%3D%3D%3Dundefined%3F%7B%7D%3Adetail%3Bvar%20event%3Dnew%20Event(type%2C%7Bbubbles%3Aoptions.bubbles%3D%3D%3Dundefined%3Ftrue%3Aoptions.bubbles%2Ccancelable%3ABoolean(options.cancelable)%2Ccomposed%3Aoptions.composed%3D%3D%3Dundefined%3Ftrue%3Aoptions.composed%7D)%3Bevent.detail%3Ddetail%3Bvar%20node%3Doptions.node%7C%7Cthis%3Bnode.dispatchEvent(event)%3Breturn%20event%3B%7D%2F**%0A%20%20%20%20%20%20%20*%20Convenience%20method%20to%20add%20an%20event%20listener%20on%20a%20given%20element%2C%0A%20%20%20%20%20%20%20*%20late%20bound%20to%20a%20named%20method%20on%20this%20element.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40param%20%7BElement%7D%20node%20Element%20to%20add%20event%20listener%20to.%0A%20%20%20%20%20%20%20*%20%40param%20%7Bstring%7D%20eventName%20Name%20of%20event%20to%20listen%20for.%0A%20%20%20%20%20%20%20*%20%40param%20%7Bstring%7D%20methodName%20Name%20of%20handler%20method%20on%20%60this%60%20to%20call.%0A%20%20%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'listen'%2Cvalue%3Afunction%20listen(node%2CeventName%2CmethodName)%7Bnode%3D%2F**%20%40type%20%7B!Element%7D%20*%2Fnode%7C%7Cthis%3Bvar%20hbl%3Dthis.__boundListeners%7C%7C(this.__boundListeners%3Dnew%20WeakMap())%3Bvar%20bl%3Dhbl.get(node)%3Bif(!bl)%7Bbl%3D%7B%7D%3Bhbl.set(node%2Cbl)%3B%7Dvar%20key%3DeventName%2BmethodName%3Bif(!bl%5Bkey%5D)%7Bbl%5Bkey%5D%3Dthis._addMethodEventListenerToNode(node%2CeventName%2CmethodName%2Cthis)%3B%7D%7D%2F**%0A%20%20%20%20%20%20%20*%20Convenience%20method%20to%20remove%20an%20event%20listener%20from%20a%20given%20element%2C%0A%20%20%20%20%20%20%20*%20late%20bound%20to%20a%20named%20method%20on%20this%20element.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40param%20%7BElement%7D%20node%20Element%20to%20remove%20event%20listener%20from.%0A%20%20%20%20%20%20%20*%20%40param%20%7Bstring%7D%20eventName%20Name%20of%20event%20to%20stop%20listening%20to.%0A%20%20%20%20%20%20%20*%20%40param%20%7Bstring%7D%20methodName%20Name%20of%20handler%20method%20on%20%60this%60%20to%20not%20call%0A%20%20%20%20%20%20%20anymore.%0A%20%20%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'unlisten'%2Cvalue%3Afunction%20unlisten(node%2CeventName%2CmethodName)%7Bnode%3D%2F**%20%40type%20%7B!Element%7D%20*%2Fnode%7C%7Cthis%3Bvar%20bl%3Dthis.__boundListeners%26%26this.__boundListeners.get(node)%3Bvar%20key%3DeventName%2BmethodName%3Bvar%20handler%3Dbl%26%26bl%5Bkey%5D%3Bif(handler)%7Bthis._removeEventListenerFromNode(node%2CeventName%2Chandler)%3Bbl%5Bkey%5D%3Dnull%3B%7D%7D%2F**%0A%20%20%20%20%20%20%20*%20Override%20scrolling%20behavior%20to%20all%20direction%2C%20one%20direction%2C%20or%20none.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20Valid%20scroll%20directions%3A%0A%20%20%20%20%20%20%20*%20%20%20-%20'all'%3A%20scroll%20in%20any%20direction%0A%20%20%20%20%20%20%20*%20%20%20-%20'x'%3A%20scroll%20only%20in%20the%20'x'%20direction%0A%20%20%20%20%20%20%20*%20%20%20-%20'y'%3A%20scroll%20only%20in%20the%20'y'%20direction%0A%20%20%20%20%20%20%20*%20%20%20-%20'none'%3A%20disable%20scrolling%20for%20this%20node%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40param%20%7Bstring%3D%7D%20direction%20Direction%20to%20allow%20scrolling%0A%20%20%20%20%20%20%20*%20Defaults%20to%20%60all%60.%0A%20%20%20%20%20%20%20*%20%40param%20%7BElement%3D%7D%20node%20Element%20to%20apply%20scroll%20direction%20setting.%0A%20%20%20%20%20%20%20*%20Defaults%20to%20%60this%60.%0A%20%20%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'setScrollDirection'%2Cvalue%3Afunction%20setScrollDirection(direction%2Cnode)%7BPolymer.Gestures.setTouchAction(%2F**%20%40type%20%7BElement%7D%20*%2Fnode%7C%7Cthis%2CDIRECTION_MAP%5Bdirection%5D%7C%7C'auto')%3B%7D%2F*%20****%20End%20Events%20****%20*%2F%2F**%0A%20%20%20%20%20%20%20*%20Convenience%20method%20to%20run%20%60querySelector%60%20on%20this%20local%20DOM%20scope.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20This%20function%20calls%20%60Polymer.dom(this.root).querySelector(slctr)%60.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40param%20%7Bstring%7D%20slctr%20Selector%20to%20run%20on%20this%20local%20DOM%20scope%0A%20%20%20%20%20%20%20*%20%40return%20%7BElement%7D%20Element%20found%20by%20the%20selector%2C%20or%20null%20if%20not%20found.%0A%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'%24%24'%2Cvalue%3Afunction%20%24%24(slctr)%7Breturn%20this.root.querySelector(slctr)%3B%7D%2F**%0A%20%20%20%20%20%20%20*%20Return%20the%20element%20whose%20local%20dom%20within%20which%20this%20element%0A%20%20%20%20%20%20%20*%20is%20contained.%20This%20is%20a%20shorthand%20for%0A%20%20%20%20%20%20%20*%20%60this.getRootNode().host%60.%0A%20%20%20%20%20%20%20*%20%40this%20%7BElement%7D%0A%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'distributeContent'%2C%2F**%0A%20%20%20%20%20%20%20*%20Force%20this%20element%20to%20distribute%20its%20children%20to%20its%20local%20dom.%0A%20%20%20%20%20%20%20*%20This%20should%20not%20be%20necessary%20as%20of%20Polymer%202.0.2%20and%20is%20provided%20only%0A%20%20%20%20%20%20%20*%20for%20backwards%20compatibility.%0A%20%20%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20%20%20*%2Fvalue%3Afunction%20distributeContent()%7Bif(window.ShadyDOM%26%26this.shadowRoot)%7BShadyDOM.flush()%3B%7D%7D%2F**%0A%20%20%20%20%20%20%20*%20Returns%20a%20list%20of%20nodes%20that%20are%20the%20effective%20childNodes.%20The%20effective%0A%20%20%20%20%20%20%20*%20childNodes%20list%20is%20the%20same%20as%20the%20element's%20childNodes%20except%20that%0A%20%20%20%20%20%20%20*%20any%20%60%3Ccontent%3E%60%20elements%20are%20replaced%20with%20the%20list%20of%20nodes%20distributed%0A%20%20%20%20%20%20%20*%20to%20the%20%60%3Ccontent%3E%60%2C%20the%20result%20of%20its%20%60getDistributedNodes%60%20method.%0A%20%20%20%20%20%20%20*%20%40return%20%7B!Array%3C!Node%3E%7D%20List%20of%20effective%20child%20nodes.%0A%20%20%20%20%20%20%20*%20%40suppress%20%7BinvalidCasts%7D%20LegacyElementMixin%20must%20be%20applied%20to%20an%20HTMLElement%0A%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'getEffectiveChildNodes'%2Cvalue%3Afunction%20getEffectiveChildNodes()%7Bvar%20thisEl%3D%2F**%20%40type%20%7BElement%7D%20*%2Fthis%3Bvar%20domApi%3D%2F**%20%40type%20%7BPolymer.DomApi%7D%20*%2FPolymer.dom(thisEl)%3Breturn%20domApi.getEffectiveChildNodes()%3B%7D%2F**%0A%20%20%20%20%20%20%20*%20Returns%20a%20list%20of%20nodes%20distributed%20within%20this%20element%20that%20match%0A%20%20%20%20%20%20%20*%20%60selector%60.%20These%20can%20be%20dom%20children%20or%20elements%20distributed%20to%0A%20%20%20%20%20%20%20*%20children%20that%20are%20insertion%20points.%0A%20%20%20%20%20%20%20*%20%40param%20%7Bstring%7D%20selector%20Selector%20to%20run.%0A%20%20%20%20%20%20%20*%20%40return%20%7B!Array%3C!Node%3E%7D%20List%20of%20distributed%20elements%20that%20match%20selector.%0A%20%20%20%20%20%20%20*%20%40suppress%20%7BinvalidCasts%7D%20LegacyElementMixin%20must%20be%20applied%20to%20an%20HTMLElement%0A%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'queryDistributedElements'%2Cvalue%3Afunction%20queryDistributedElements(selector)%7Bvar%20thisEl%3D%2F**%20%40type%20%7BElement%7D%20*%2Fthis%3Bvar%20domApi%3D%2F**%20%40type%20%7BPolymer.DomApi%7D%20*%2FPolymer.dom(thisEl)%3Breturn%20domApi.queryDistributedElements(selector)%3B%7D%2F**%0A%20%20%20%20%20%20%20*%20Returns%20a%20list%20of%20elements%20that%20are%20the%20effective%20children.%20The%20effective%0A%20%20%20%20%20%20%20*%20children%20list%20is%20the%20same%20as%20the%20element's%20children%20except%20that%0A%20%20%20%20%20%20%20*%20any%20%60%3Ccontent%3E%60%20elements%20are%20replaced%20with%20the%20list%20of%20elements%0A%20%20%20%20%20%20%20*%20distributed%20to%20the%20%60%3Ccontent%3E%60.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40return%20%7B!Array%3C!Node%3E%7D%20List%20of%20effective%20children.%0A%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'getEffectiveChildren'%2Cvalue%3Afunction%20getEffectiveChildren()%7Bvar%20list%3Dthis.getEffectiveChildNodes()%3Breturn%20list.filter(function(%2F**%20%40type%20%7B!Node%7D%20*%2Fn)%7Breturn%20n.nodeType%3D%3D%3DNode.ELEMENT_NODE%3B%7D)%3B%7D%2F**%0A%20%20%20%20%20%20%20*%20Returns%20a%20string%20of%20text%20content%20that%20is%20the%20concatenation%20of%20the%0A%20%20%20%20%20%20%20*%20text%20content's%20of%20the%20element's%20effective%20childNodes%20(the%20elements%0A%20%20%20%20%20%20%20*%20returned%20by%20%3Ca%20href%3D%22%23getEffectiveChildNodes%3EgetEffectiveChildNodes%3C%2Fa%3E.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40return%20%7Bstring%7D%20List%20of%20effective%20children.%0A%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'getEffectiveTextContent'%2Cvalue%3Afunction%20getEffectiveTextContent()%7Bvar%20cn%3Dthis.getEffectiveChildNodes()%3Bvar%20tc%3D%5B%5D%3Bfor(var%20i%3D0%2Cc%3Bc%3Dcn%5Bi%5D%3Bi%2B%2B)%7Bif(c.nodeType!%3D%3DNode.COMMENT_NODE)%7Btc.push(c.textContent)%3B%7D%7Dreturn%20tc.join('')%3B%7D%2F**%0A%20%20%20%20%20%20%20*%20Returns%20the%20first%20effective%20childNode%20within%20this%20element%20that%0A%20%20%20%20%20%20%20*%20match%20%60selector%60.%20These%20can%20be%20dom%20child%20nodes%20or%20elements%20distributed%0A%20%20%20%20%20%20%20*%20to%20children%20that%20are%20insertion%20points.%0A%20%20%20%20%20%20%20*%20%40param%20%7Bstring%7D%20selector%20Selector%20to%20run.%0A%20%20%20%20%20%20%20*%20%40return%20%7BNode%7D%20First%20effective%20child%20node%20that%20matches%20selector.%0A%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'queryEffectiveChildren'%2Cvalue%3Afunction%20queryEffectiveChildren(selector)%7Bvar%20e%24%3Dthis.queryDistributedElements(selector)%3Breturn%20e%24%26%26e%24%5B0%5D%3B%7D%2F**%0A%20%20%20%20%20%20%20*%20Returns%20a%20list%20of%20effective%20childNodes%20within%20this%20element%20that%0A%20%20%20%20%20%20%20*%20match%20%60selector%60.%20These%20can%20be%20dom%20child%20nodes%20or%20elements%20distributed%0A%20%20%20%20%20%20%20*%20to%20children%20that%20are%20insertion%20points.%0A%20%20%20%20%20%20%20*%20%40param%20%7Bstring%7D%20selector%20Selector%20to%20run.%0A%20%20%20%20%20%20%20*%20%40return%20%7B!Array%3C!Node%3E%7D%20List%20of%20effective%20child%20nodes%20that%20match%20selector.%0A%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'queryAllEffectiveChildren'%2Cvalue%3Afunction%20queryAllEffectiveChildren(selector)%7Breturn%20this.queryDistributedElements(selector)%3B%7D%2F**%0A%20%20%20%20%20%20%20*%20Returns%20a%20list%20of%20nodes%20distributed%20to%20this%20element's%20%60%3Cslot%3E%60.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20If%20this%20element%20contains%20more%20than%20one%20%60%3Cslot%3E%60%20in%20its%20local%20DOM%2C%0A%20%20%20%20%20%20%20*%20an%20optional%20selector%20may%20be%20passed%20to%20choose%20the%20desired%20content.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40param%20%7Bstring%3D%7D%20slctr%20CSS%20selector%20to%20choose%20the%20desired%0A%20%20%20%20%20%20%20*%20%20%20%60%3Cslot%3E%60.%20%20Defaults%20to%20%60content%60.%0A%20%20%20%20%20%20%20*%20%40return%20%7B!Array%3C!Node%3E%7D%20List%20of%20distributed%20nodes%20for%20the%20%60%3Cslot%3E%60.%0A%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'getContentChildNodes'%2Cvalue%3Afunction%20getContentChildNodes(slctr)%7Bvar%20content%3Dthis.root.querySelector(slctr%7C%7C'slot')%3Breturn%20content%3F%2F**%20%40type%20%7BPolymer.DomApi%7D%20*%2FPolymer.dom(content).getDistributedNodes()%3A%5B%5D%3B%7D%2F**%0A%20%20%20%20%20%20%20*%20Returns%20a%20list%20of%20element%20children%20distributed%20to%20this%20element's%0A%20%20%20%20%20%20%20*%20%60%3Cslot%3E%60.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20If%20this%20element%20contains%20more%20than%20one%20%60%3Cslot%3E%60%20in%20its%0A%20%20%20%20%20%20%20*%20local%20DOM%2C%20an%20optional%20selector%20may%20be%20passed%20to%20choose%20the%20desired%0A%20%20%20%20%20%20%20*%20content.%20%20This%20method%20differs%20from%20%60getContentChildNodes%60%20in%20that%20only%0A%20%20%20%20%20%20%20*%20elements%20are%20returned.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40param%20%7Bstring%3D%7D%20slctr%20CSS%20selector%20to%20choose%20the%20desired%0A%20%20%20%20%20%20%20*%20%20%20%60%3Ccontent%3E%60.%20%20Defaults%20to%20%60content%60.%0A%20%20%20%20%20%20%20*%20%40return%20%7B!Array%3C!HTMLElement%3E%7D%20List%20of%20distributed%20nodes%20for%20the%0A%20%20%20%20%20%20%20*%20%20%20%60%3Cslot%3E%60.%0A%20%20%20%20%20%20%20*%20%40suppress%20%7BinvalidCasts%7D%0A%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'getContentChildren'%2Cvalue%3Afunction%20getContentChildren(slctr)%7Bvar%20children%3D%2F**%20%40type%20%7B!Array%3C!HTMLElement%3E%7D%20*%2Fthis.getContentChildNodes(slctr).filter(function(n)%7Breturn%20n.nodeType%3D%3D%3DNode.ELEMENT_NODE%3B%7D)%3Breturn%20children%3B%7D%2F**%0A%20%20%20%20%20%20%20*%20Checks%20whether%20an%20element%20is%20in%20this%20element's%20light%20DOM%20tree.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40param%20%7B%3FNode%7D%20node%20The%20element%20to%20be%20checked.%0A%20%20%20%20%20%20%20*%20%40return%20%7Bboolean%7D%20true%20if%20node%20is%20in%20this%20element's%20light%20DOM%20tree.%0A%20%20%20%20%20%20%20*%20%40suppress%20%7BinvalidCasts%7D%20LegacyElementMixin%20must%20be%20applied%20to%20an%20HTMLElement%0A%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'isLightDescendant'%2Cvalue%3Afunction%20isLightDescendant(node)%7Bvar%20thisNode%3D%2F**%20%40type%20%7BNode%7D%20*%2Fthis%3Breturn%20thisNode!%3D%3Dnode%26%26thisNode.contains(node)%26%26thisNode.getRootNode()%3D%3D%3Dnode.getRootNode()%3B%7D%2F**%0A%20%20%20%20%20%20%20*%20Checks%20whether%20an%20element%20is%20in%20this%20element's%20local%20DOM%20tree.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40param%20%7B!Element%7D%20node%20The%20element%20to%20be%20checked.%0A%20%20%20%20%20%20%20*%20%40return%20%7Bboolean%7D%20true%20if%20node%20is%20in%20this%20element's%20local%20DOM%20tree.%0A%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'isLocalDescendant'%2Cvalue%3Afunction%20isLocalDescendant(node)%7Breturn%20this.root%3D%3D%3Dnode.getRootNode()%3B%7D%2F**%0A%20%20%20%20%20%20%20*%20No-op%20for%20backwards%20compatibility.%20This%20should%20now%20be%20handled%20by%0A%20%20%20%20%20%20%20*%20ShadyCss%20library.%0A%20%20%20%20%20%20%20*%20%40param%20%20%7B*%7D%20container%20Unused%0A%20%20%20%20%20%20%20*%20%40param%20%20%7B*%7D%20shouldObserve%20Unused%0A%20%20%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'scopeSubtree'%2Cvalue%3Afunction%20scopeSubtree(container%2CshouldObserve)%7B%7D%2F%2F%20eslint-disable-line%20no-unused-vars%0A%2F**%0A%20%20%20%20%20%20%20*%20Returns%20the%20computed%20style%20value%20for%20the%20given%20property.%0A%20%20%20%20%20%20%20*%20%40param%20%7Bstring%7D%20property%20The%20css%20property%20name.%0A%20%20%20%20%20%20%20*%20%40return%20%7Bstring%7D%20Returns%20the%20computed%20css%20property%20value%20for%20the%20given%0A%20%20%20%20%20%20%20*%20%60property%60.%0A%20%20%20%20%20%20%20*%20%40suppress%20%7BinvalidCasts%7D%20LegacyElementMixin%20must%20be%20applied%20to%20an%20HTMLElement%0A%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'getComputedStyleValue'%2Cvalue%3Afunction%20getComputedStyleValue(property)%7Breturn%20styleInterface.getComputedStyleValue(%2F**%20%40type%20%7B!Element%7D%20*%2Fthis%2Cproperty)%3B%7D%2F%2F%20debounce%0A%2F**%0A%20%20%20%20%20%20%20*%20Call%20%60debounce%60%20to%20collapse%20multiple%20requests%20for%20a%20named%20task%20into%0A%20%20%20%20%20%20%20*%20one%20invocation%20which%20is%20made%20after%20the%20wait%20time%20has%20elapsed%20with%0A%20%20%20%20%20%20%20*%20no%20new%20request.%20%20If%20no%20wait%20time%20is%20given%2C%20the%20callback%20will%20be%20called%0A%20%20%20%20%20%20%20*%20at%20microtask%20timing%20(guaranteed%20before%20paint).%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%20%20%20%20debouncedClickAction(e)%20%7B%0A%20%20%20%20%20%20%20*%20%20%20%20%20%20%20%2F%2F%20will%20not%20call%20%60processClick%60%20more%20than%20once%20per%20100ms%0A%20%20%20%20%20%20%20*%20%20%20%20%20%20%20this.debounce('click'%2C%20function()%20%7B%0A%20%20%20%20%20%20%20*%20%20%20%20%20%20%20%20this.processClick()%3B%0A%20%20%20%20%20%20%20*%20%20%20%20%20%20%20%7D%20100)%3B%0A%20%20%20%20%20%20%20*%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40param%20%7Bstring%7D%20jobName%20String%20to%20identify%20the%20debounce%20job.%0A%20%20%20%20%20%20%20*%20%40param%20%7Bfunction()%3Avoid%7D%20callback%20Function%20that%20is%20called%20(with%20%60this%60%0A%20%20%20%20%20%20%20*%20%20%20context)%20when%20the%20wait%20time%20elapses.%0A%20%20%20%20%20%20%20*%20%40param%20%7Bnumber%7D%20wait%20Optional%20wait%20time%20in%20milliseconds%20(ms)%20after%20the%0A%20%20%20%20%20%20%20*%20%20%20last%20signal%20that%20must%20elapse%20before%20invoking%20%60callback%60%0A%20%20%20%20%20%20%20*%20%40return%20%7B!Object%7D%20Returns%20a%20debouncer%20object%20on%20which%20exists%20the%0A%20%20%20%20%20%20%20*%20following%20methods%3A%20%60isActive()%60%20returns%20true%20if%20the%20debouncer%20is%0A%20%20%20%20%20%20%20*%20active%3B%20%60cancel()%60%20cancels%20the%20debouncer%20if%20it%20is%20active%3B%0A%20%20%20%20%20%20%20*%20%60flush()%60%20immediately%20invokes%20the%20debounced%20callback%20if%20the%20debouncer%0A%20%20%20%20%20%20%20*%20is%20active.%0A%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'debounce'%2Cvalue%3Afunction%20debounce(jobName%2Ccallback%2Cwait)%7Bthis._debouncers%3Dthis._debouncers%7C%7C%7B%7D%3Breturn%20this._debouncers%5BjobName%5D%3DPolymer.Debouncer.debounce(this._debouncers%5BjobName%5D%2Cwait%3E0%3FPolymer.Async.timeOut.after(wait)%3APolymer.Async.microTask%2Ccallback.bind(this))%3B%7D%2F**%0A%20%20%20%20%20%20%20*%20Returns%20whether%20a%20named%20debouncer%20is%20active.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40param%20%7Bstring%7D%20jobName%20The%20name%20of%20the%20debouncer%20started%20with%20%60debounce%60%0A%20%20%20%20%20%20%20*%20%40return%20%7Bboolean%7D%20Whether%20the%20debouncer%20is%20active%20(has%20not%20yet%20fired).%0A%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'isDebouncerActive'%2Cvalue%3Afunction%20isDebouncerActive(jobName)%7Bthis._debouncers%3Dthis._debouncers%7C%7C%7B%7D%3Bvar%20debouncer%3Dthis._debouncers%5BjobName%5D%3Breturn!!(debouncer%26%26debouncer.isActive())%3B%7D%2F**%0A%20%20%20%20%20%20%20*%20Immediately%20calls%20the%20debouncer%20%60callback%60%20and%20inactivates%20it.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40param%20%7Bstring%7D%20jobName%20The%20name%20of%20the%20debouncer%20started%20with%20%60debounce%60%0A%20%20%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'flushDebouncer'%2Cvalue%3Afunction%20flushDebouncer(jobName)%7Bthis._debouncers%3Dthis._debouncers%7C%7C%7B%7D%3Bvar%20debouncer%3Dthis._debouncers%5BjobName%5D%3Bif(debouncer)%7Bdebouncer.flush()%3B%7D%7D%2F**%0A%20%20%20%20%20%20%20*%20Cancels%20an%20active%20debouncer.%20%20The%20%60callback%60%20will%20not%20be%20called.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40param%20%7Bstring%7D%20jobName%20The%20name%20of%20the%20debouncer%20started%20with%20%60debounce%60%0A%20%20%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'cancelDebouncer'%2Cvalue%3Afunction%20cancelDebouncer(jobName)%7Bthis._debouncers%3Dthis._debouncers%7C%7C%7B%7D%3Bvar%20debouncer%3Dthis._debouncers%5BjobName%5D%3Bif(debouncer)%7Bdebouncer.cancel()%3B%7D%7D%2F**%0A%20%20%20%20%20%20%20*%20Runs%20a%20callback%20function%20asynchronously.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20By%20default%20(if%20no%20waitTime%20is%20specified)%2C%20async%20callbacks%20are%20run%20at%0A%20%20%20%20%20%20%20*%20microtask%20timing%2C%20which%20will%20occur%20before%20paint.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40param%20%7B!Function%7D%20callback%20The%20callback%20function%20to%20run%2C%20bound%20to%20%60this%60.%0A%20%20%20%20%20%20%20*%20%40param%20%7Bnumber%3D%7D%20waitTime%20Time%20to%20wait%20before%20calling%20the%0A%20%20%20%20%20%20%20*%20%20%20%60callback%60.%20%20If%20unspecified%20or%200%2C%20the%20callback%20will%20be%20run%20at%20microtask%0A%20%20%20%20%20%20%20*%20%20%20timing%20(before%20paint).%0A%20%20%20%20%20%20%20*%20%40return%20%7Bnumber%7D%20Handle%20that%20may%20be%20used%20to%20cancel%20the%20async%20job.%0A%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'async'%2Cvalue%3Afunction%20async(callback%2CwaitTime)%7Breturn%20waitTime%3E0%3FPolymer.Async.timeOut.run(callback.bind(this)%2CwaitTime)%3A~Polymer.Async.microTask.run(callback.bind(this))%3B%7D%2F**%0A%20%20%20%20%20%20%20*%20Cancels%20an%20async%20operation%20started%20with%20%60async%60.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40param%20%7Bnumber%7D%20handle%20Handle%20returned%20from%20original%20%60async%60%20call%20to%0A%20%20%20%20%20%20%20*%20%20%20cancel.%0A%20%20%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'cancelAsync'%2Cvalue%3Afunction%20cancelAsync(handle)%7Bhandle%3C0%3FPolymer.Async.microTask.cancel(~handle)%3APolymer.Async.timeOut.cancel(handle)%3B%7D%2F%2F%20other%0A%2F**%0A%20%20%20%20%20%20%20*%20Convenience%20method%20for%20creating%20an%20element%20and%20configuring%20it.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40param%20%7Bstring%7D%20tag%20HTML%20element%20tag%20to%20create.%0A%20%20%20%20%20%20%20*%20%40param%20%7BObject%3D%7D%20props%20Object%20of%20properties%20to%20configure%20on%20the%0A%20%20%20%20%20%20%20*%20%20%20%20instance.%0A%20%20%20%20%20%20%20*%20%40return%20%7B!Element%7D%20Newly%20created%20and%20configured%20element.%0A%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'create'%2Cvalue%3Afunction%20create(tag%2Cprops)%7Bvar%20elt%3Ddocument.createElement(tag)%3Bif(props)%7Bif(elt.setProperties)%7Belt.setProperties(props)%3B%7Delse%7Bfor(var%20n%20in%20props)%7Belt%5Bn%5D%3Dprops%5Bn%5D%3B%7D%7D%7Dreturn%20elt%3B%7D%2F**%0A%20%20%20%20%20%20%20*%20Convenience%20method%20for%20importing%20an%20HTML%20document%20imperatively.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20This%20method%20creates%20a%20new%20%60%3Clink%20rel%3D%22import%22%3E%60%20element%20with%0A%20%20%20%20%20%20%20*%20the%20provided%20URL%20and%20appends%20it%20to%20the%20document%20to%20start%20loading.%0A%20%20%20%20%20%20%20*%20In%20the%20%60onload%60%20callback%2C%20the%20%60import%60%20property%20of%20the%20%60link%60%0A%20%20%20%20%20%20%20*%20element%20will%20contain%20the%20imported%20document%20contents.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40param%20%7Bstring%7D%20href%20URL%20to%20document%20to%20load.%0A%20%20%20%20%20%20%20*%20%40param%20%7B%3Ffunction(!Event)%3Avoid%3D%7D%20onload%20Callback%20to%20notify%20when%20an%20import%20successfully%0A%20%20%20%20%20%20%20*%20%20%20loaded.%0A%20%20%20%20%20%20%20*%20%40param%20%7B%3Ffunction(!ErrorEvent)%3Avoid%3D%7D%20onerror%20Callback%20to%20notify%20when%20an%20import%0A%20%20%20%20%20%20%20*%20%20%20unsuccessfully%20loaded.%0A%20%20%20%20%20%20%20*%20%40param%20%7Bboolean%3D%7D%20optAsync%20True%20if%20the%20import%20should%20be%20loaded%20%60async%60.%0A%20%20%20%20%20%20%20*%20%20%20Defaults%20to%20%60false%60.%0A%20%20%20%20%20%20%20*%20%40return%20%7B!HTMLLinkElement%7D%20The%20link%20element%20for%20the%20URL%20to%20be%20loaded.%0A%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'importHref'%2Cvalue%3Afunction%20importHref(href%2Conload%2Conerror%2CoptAsync)%7B%2F%2F%20eslint-disable-line%20no-unused-vars%0Avar%20loadFn%3Donload%3Fonload.bind(this)%3Anull%3Bvar%20errorFn%3Donerror%3Fonerror.bind(this)%3Anull%3Breturn%20Polymer.importHref(href%2CloadFn%2CerrorFn%2CoptAsync)%3B%7D%2F**%0A%20%20%20%20%20%20%20*%20Polyfill%20for%20Element.prototype.matches%2C%20which%20is%20sometimes%20still%0A%20%20%20%20%20%20%20*%20prefixed.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40param%20%7Bstring%7D%20selector%20Selector%20to%20test.%0A%20%20%20%20%20%20%20*%20%40param%20%7B!Element%3D%7D%20node%20Element%20to%20test%20the%20selector%20against.%0A%20%20%20%20%20%20%20*%20%40return%20%7Bboolean%7D%20Whether%20the%20element%20matches%20the%20selector.%0A%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'elementMatches'%2Cvalue%3Afunction%20elementMatches(selector%2Cnode)%7Breturn%20Polymer.dom.matchesSelector(%2F**%20%40type%20%7B!Element%7D%20*%2Fnode%7C%7Cthis%2Cselector)%3B%7D%2F**%0A%20%20%20%20%20%20%20*%20Toggles%20an%20HTML%20attribute%20on%20or%20off.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40param%20%7Bstring%7D%20name%20HTML%20attribute%20name%0A%20%20%20%20%20%20%20*%20%40param%20%7Bboolean%3D%7D%20bool%20Boolean%20to%20force%20the%20attribute%20on%20or%20off.%0A%20%20%20%20%20%20%20*%20%20%20%20When%20unspecified%2C%20the%20state%20of%20the%20attribute%20will%20be%20reversed.%0A%20%20%20%20%20%20%20*%20%40param%20%7BElement%3D%7D%20node%20Node%20to%20target.%20%20Defaults%20to%20%60this%60.%0A%20%20%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'toggleAttribute'%2Cvalue%3Afunction%20toggleAttribute(name%2Cbool%2Cnode)%7Bnode%3D%2F**%20%40type%20%7BElement%7D%20*%2Fnode%7C%7Cthis%3Bif(arguments.length%3D%3D1)%7Bbool%3D!node.hasAttribute(name)%3B%7Dif(bool)%7Bnode.setAttribute(name%2C'')%3B%7Delse%7Bnode.removeAttribute(name)%3B%7D%7D%2F**%0A%20%20%20%20%20%20%20*%20Toggles%20a%20CSS%20class%20on%20or%20off.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40param%20%7Bstring%7D%20name%20CSS%20class%20name%0A%20%20%20%20%20%20%20*%20%40param%20%7Bboolean%3D%7D%20bool%20Boolean%20to%20force%20the%20class%20on%20or%20off.%0A%20%20%20%20%20%20%20*%20%20%20%20When%20unspecified%2C%20the%20state%20of%20the%20class%20will%20be%20reversed.%0A%20%20%20%20%20%20%20*%20%40param%20%7BElement%3D%7D%20node%20Node%20to%20target.%20%20Defaults%20to%20%60this%60.%0A%20%20%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'toggleClass'%2Cvalue%3Afunction%20toggleClass(name%2Cbool%2Cnode)%7Bnode%3D%2F**%20%40type%20%7BElement%7D%20*%2Fnode%7C%7Cthis%3Bif(arguments.length%3D%3D1)%7Bbool%3D!node.classList.contains(name)%3B%7Dif(bool)%7Bnode.classList.add(name)%3B%7Delse%7Bnode.classList.remove(name)%3B%7D%7D%2F**%0A%20%20%20%20%20%20%20*%20Cross-platform%20helper%20for%20setting%20an%20element's%20CSS%20%60transform%60%20property.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40param%20%7Bstring%7D%20transformText%20Transform%20setting.%0A%20%20%20%20%20%20%20*%20%40param%20%7BElement%3D%7D%20node%20Element%20to%20apply%20the%20transform%20to.%0A%20%20%20%20%20%20%20*%20Defaults%20to%20%60this%60%0A%20%20%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'transform'%2Cvalue%3Afunction%20transform(transformText%2Cnode)%7Bnode%3D%2F**%20%40type%20%7BElement%7D%20*%2Fnode%7C%7Cthis%3Bnode.style.webkitTransform%3DtransformText%3Bnode.style.transform%3DtransformText%3B%7D%2F**%0A%20%20%20%20%20%20%20*%20Cross-platform%20helper%20for%20setting%20an%20element's%20CSS%20%60translate3d%60%0A%20%20%20%20%20%20%20*%20property.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40param%20%7Bnumber%7D%20x%20X%20offset.%0A%20%20%20%20%20%20%20*%20%40param%20%7Bnumber%7D%20y%20Y%20offset.%0A%20%20%20%20%20%20%20*%20%40param%20%7Bnumber%7D%20z%20Z%20offset.%0A%20%20%20%20%20%20%20*%20%40param%20%7BElement%3D%7D%20node%20Element%20to%20apply%20the%20transform%20to.%0A%20%20%20%20%20%20%20*%20Defaults%20to%20%60this%60.%0A%20%20%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'translate3d'%2Cvalue%3Afunction%20translate3d(x%2Cy%2Cz%2Cnode)%7Bnode%3D%2F**%20%40type%20%7BElement%7D%20*%2Fnode%7C%7Cthis%3Bthis.transform('translate3d('%2Bx%2B'%2C'%2By%2B'%2C'%2Bz%2B')'%2Cnode)%3B%7D%2F**%0A%20%20%20%20%20%20%20*%20Removes%20an%20item%20from%20an%20array%2C%20if%20it%20exists.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20If%20the%20array%20is%20specified%20by%20path%2C%20a%20change%20notification%20is%0A%20%20%20%20%20%20%20*%20generated%2C%20so%20that%20observers%2C%20data%20bindings%20and%20computed%0A%20%20%20%20%20%20%20*%20properties%20watching%20that%20path%20can%20update.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20If%20the%20array%20is%20passed%20directly%2C%20**no%20change%0A%20%20%20%20%20%20%20*%20notification%20is%20generated**.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40param%20%7Bstring%20%7C%20!Array%3Cnumber%7Cstring%3E%7D%20arrayOrPath%20Path%20to%20array%20from%20which%20to%20remove%20the%20item%0A%20%20%20%20%20%20%20*%20%20%20(or%20the%20array%20itself).%0A%20%20%20%20%20%20%20*%20%40param%20%7B*%7D%20item%20Item%20to%20remove.%0A%20%20%20%20%20%20%20*%20%40return%20%7BArray%7D%20Array%20containing%20item%20removed.%0A%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'arrayDelete'%2Cvalue%3Afunction%20arrayDelete(arrayOrPath%2Citem)%7Bvar%20index%3Dvoid%200%3Bif(Array.isArray(arrayOrPath))%7Bindex%3DarrayOrPath.indexOf(item)%3Bif(index%3E%3D0)%7Breturn%20arrayOrPath.splice(index%2C1)%3B%7D%7Delse%7Bvar%20arr%3DPolymer.Path.get(this%2CarrayOrPath)%3Bindex%3Darr.indexOf(item)%3Bif(index%3E%3D0)%7Breturn%20this.splice(arrayOrPath%2Cindex%2C1)%3B%7D%7Dreturn%20null%3B%7D%2F%2F%20logging%0A%2F**%0A%20%20%20%20%20%20%20*%20Facades%20%60console.log%60%2F%60warn%60%2F%60error%60%20as%20override%20point.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40param%20%7Bstring%7D%20level%20One%20of%20'log'%2C%20'warn'%2C%20'error'%0A%20%20%20%20%20%20%20*%20%40param%20%7BArray%7D%20args%20Array%20of%20strings%20or%20objects%20to%20log%0A%20%20%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'_logger'%2Cvalue%3Afunction%20_logger(level%2Cargs)%7Bvar%20_console%3B%2F%2F%20accept%20%5B'foo'%2C%20'bar'%5D%20and%20%5B%5B'foo'%2C%20'bar'%5D%5D%0Aif(Array.isArray(args)%26%26args.length%3D%3D%3D1%26%26Array.isArray(args%5B0%5D))%7Bargs%3Dargs%5B0%5D%3B%7Dswitch(level)%7Bcase'log'%3Acase'warn'%3Acase'error'%3A(_console%3Dconsole)%5Blevel%5D.apply(_console%2C_toConsumableArray(args))%3B%7D%7D%2F**%0A%20%20%20%20%20%20%20*%20Facades%20%60console.log%60%20as%20an%20override%20point.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40param%20%7B...*%7D%20args%20Array%20of%20strings%20or%20objects%20to%20log%0A%20%20%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'_log'%2Cvalue%3Afunction%20_log()%7Bfor(var%20_len%3Darguments.length%2Cargs%3DArray(_len)%2C_key%3D0%3B_key%3C_len%3B_key%2B%2B)%7Bargs%5B_key%5D%3Darguments%5B_key%5D%3B%7Dthis._logger('log'%2Cargs)%3B%7D%2F**%0A%20%20%20%20%20%20%20*%20Facades%20%60console.warn%60%20as%20an%20override%20point.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40param%20%7B...*%7D%20args%20Array%20of%20strings%20or%20objects%20to%20log%0A%20%20%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'_warn'%2Cvalue%3Afunction%20_warn()%7Bfor(var%20_len2%3Darguments.length%2Cargs%3DArray(_len2)%2C_key2%3D0%3B_key2%3C_len2%3B_key2%2B%2B)%7Bargs%5B_key2%5D%3Darguments%5B_key2%5D%3B%7Dthis._logger('warn'%2Cargs)%3B%7D%2F**%0A%20%20%20%20%20%20%20*%20Facades%20%60console.error%60%20as%20an%20override%20point.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40param%20%7B...*%7D%20args%20Array%20of%20strings%20or%20objects%20to%20log%0A%20%20%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'_error'%2Cvalue%3Afunction%20_error()%7Bfor(var%20_len3%3Darguments.length%2Cargs%3DArray(_len3)%2C_key3%3D0%3B_key3%3C_len3%3B_key3%2B%2B)%7Bargs%5B_key3%5D%3Darguments%5B_key3%5D%3B%7Dthis._logger('error'%2Cargs)%3B%7D%2F**%0A%20%20%20%20%20%20%20*%20Formats%20a%20message%20using%20the%20element%20type%20an%20a%20method%20name.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40param%20%7Bstring%7D%20methodName%20Method%20name%20to%20associate%20with%20message%0A%20%20%20%20%20%20%20*%20%40param%20%7B...*%7D%20args%20Array%20of%20strings%20or%20objects%20to%20log%0A%20%20%20%20%20%20%20*%20%40return%20%7BArray%7D%20Array%20with%20formatting%20information%20for%20%60console%60%0A%20%20%20%20%20%20%20*%20%20%20logging.%0A%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'_logf'%2Cvalue%3Afunction%20_logf(methodName)%7Bfor(var%20_len4%3Darguments.length%2Cargs%3DArray(_len4%3E1%3F_len4-1%3A0)%2C_key4%3D1%3B_key4%3C_len4%3B_key4%2B%2B)%7Bargs%5B_key4-1%5D%3Darguments%5B_key4%5D%3B%7Dreturn%5B'%5B%25s%3A%3A%25s%5D'%2Cthis.is%2CmethodName%5D.concat(args)%3B%7D%7D%2C%7Bkey%3A'domHost'%2Cget%3Afunction%20get()%7Bvar%20root%3Dthis.getRootNode()%3Breturn%20root%20instanceof%20DocumentFragment%3F%2F**%20%40type%20%7BShadowRoot%7D%20*%2Froot.host%3Aroot%3B%7D%7D%5D%2C%5B%7Bkey%3A'importMeta'%2Cget%3Afunction%20get()%7Breturn%20this.prototype.importMeta%3B%7D%7D%5D)%3Breturn%20LegacyElement%3B%7D(legacyElementBase)%3BLegacyElement.prototype.is%3D''%3Breturn%20LegacyElement%3B%7D)%3B%7D)()%3B%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Fcpt-static.gannettdigital.com%2Funiversal-web-client%2Fmaster%2Flatest%2Fvendor%2Fcomponents%2Fpolymer%2Flib%2Flegacy%2Flegacy-element-mixin.html.js%0A | 37 kB | 2023-03-07 | 2024-01-25 | |
Pretty
Loading... | ||||
http:text/javascript;charset=utf-8,var%20_createClass%3Dfunction()%7Bfunction%20defineProperties(target%2Cprops)%7Bfor(var%20i%3D0%3Bi%3Cprops.length%3Bi%2B%2B)%7Bvar%20descriptor%3Dprops%5Bi%5D%3Bdescriptor.enumerable%3Ddescriptor.enumerable%7C%7Cfalse%3Bdescriptor.configurable%3Dtrue%3Bif(%22value%22in%20descriptor)descriptor.writable%3Dtrue%3BObject.defineProperty(target%2Cdescriptor.key%2Cdescriptor)%3B%7D%7Dreturn%20function(Constructor%2CprotoProps%2CstaticProps)%7Bif(protoProps)defineProperties(Constructor.prototype%2CprotoProps)%3Bif(staticProps)defineProperties(Constructor%2CstaticProps)%3Breturn%20Constructor%3B%7D%3B%7D()%3Bvar%20_get%3Dfunction%20get(object%2Cproperty%2Creceiver)%7Bif(object%3D%3D%3Dnull)object%3DFunction.prototype%3Bvar%20desc%3DObject.getOwnPropertyDescriptor(object%2Cproperty)%3Bif(desc%3D%3D%3Dundefined)%7Bvar%20parent%3DObject.getPrototypeOf(object)%3Bif(parent%3D%3D%3Dnull)%7Breturn%20undefined%3B%7Delse%7Breturn%20get(parent%2Cproperty%2Creceiver)%3B%7D%7Delse%20if(%22value%22in%20desc)%7Breturn%20desc.value%3B%7Delse%7Bvar%20getter%3Ddesc.get%3Bif(getter%3D%3D%3Dundefined)%7Breturn%20undefined%3B%7Dreturn%20getter.call(receiver)%3B%7D%7D%3Bfunction%20_classCallCheck(instance%2CConstructor)%7Bif(!(instance%20instanceof%20Constructor))%7Bthrow%20new%20TypeError(%22Cannot%20call%20a%20class%20as%20a%20function%22)%3B%7D%7Dfunction%20_possibleConstructorReturn(self%2Ccall)%7Bif(!self)%7Bthrow%20new%20ReferenceError(%22this%20hasn't%20been%20initialised%20-%20super()%20hasn't%20been%20called%22)%3B%7Dreturn%20call%26%26(typeof%20call%3D%3D%3D%22object%22%7C%7Ctypeof%20call%3D%3D%3D%22function%22)%3Fcall%3Aself%3B%7Dfunction%20_inherits(subClass%2CsuperClass)%7Bif(typeof%20superClass!%3D%3D%22function%22%26%26superClass!%3D%3Dnull)%7Bthrow%20new%20TypeError(%22Super%20expression%20must%20either%20be%20null%20or%20a%20function%2C%20not%20%22%2Btypeof%20superClass)%3B%7DsubClass.prototype%3DObject.create(superClass%26%26superClass.prototype%2C%7Bconstructor%3A%7Bvalue%3AsubClass%2Cenumerable%3Afalse%2Cwritable%3Atrue%2Cconfigurable%3Atrue%7D%7D)%3Bif(superClass)Object.setPrototypeOf%3FObject.setPrototypeOf(subClass%2CsuperClass)%3AsubClass.__proto__%3DsuperClass%3B%7D(function()%7B'use%20strict'%3Bvar%20lifecycleProps%3D%7Battached%3Atrue%2Cdetached%3Atrue%2Cready%3Atrue%2Ccreated%3Atrue%2CbeforeRegister%3Atrue%2Cregistered%3Atrue%2CattributeChanged%3Atrue%2Clisteners%3Atrue%2ChostAttributes%3Atrue%7D%3Bvar%20excludeOnInfo%3D%7Battached%3Atrue%2Cdetached%3Atrue%2Cready%3Atrue%2Ccreated%3Atrue%2CbeforeRegister%3Atrue%2Cregistered%3Atrue%2CattributeChanged%3Atrue%2Cbehaviors%3Atrue%2C_noAccessors%3Atrue%7D%3Bvar%20excludeOnBehaviors%3DObject.assign(%7Blisteners%3Atrue%2ChostAttributes%3Atrue%2Cproperties%3Atrue%2Cobservers%3Atrue%7D%2CexcludeOnInfo)%3Bfunction%20copyProperties(source%2Ctarget%2CexcludeProps)%7Bvar%20noAccessors%3Dsource._noAccessors%3Bfor(var%20p%20in%20source)%7Bif(!(p%20in%20excludeProps))%7Bif(noAccessors)%7Btarget%5Bp%5D%3Dsource%5Bp%5D%3B%7Delse%7Bvar%20pd%3DObject.getOwnPropertyDescriptor(source%2Cp)%3Bif(pd)%7B%2F%2F%20ensure%20property%20is%20configurable%20so%20that%20a%20later%20behavior%20can%0A%2F%2F%20re-configure%20it.%0Apd.configurable%3Dtrue%3BObject.defineProperty(target%2Cp%2Cpd)%3B%7D%7D%7D%7D%7D%2F**%0A%20%20%20%20%20*%20Applies%20a%20%22legacy%22%20behavior%20or%20array%20of%20behaviors%20to%20the%20provided%20class.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20Note%3A%20this%20method%20will%20automatically%20also%20apply%20the%20%60Polymer.LegacyElementMixin%60%0A%20%20%20%20%20*%20to%20ensure%20that%20any%20legacy%20behaviors%20can%20rely%20on%20legacy%20Polymer%20API%20on%0A%20%20%20%20%20*%20the%20underlying%20element.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40template%20T%0A%20%20%20%20%20*%20%40param%20%7B!Object%7C!Array%3C!Object%3E%7D%20behaviors%20Behavior%20object%20or%20array%20of%20behaviors.%0A%20%20%20%20%20*%20%40param%20%7Bfunction(new%3AT)%7D%20klass%20Element%20class.%0A%20%20%20%20%20*%20%40return%20%7Bfunction(new%3AT)%7D%20Returns%20a%20new%20Element%20class%20extended%20by%20the%0A%20%20%20%20%20*%20passed%20in%20%60behaviors%60%20and%20also%20by%20%60Polymer.LegacyElementMixin%60.%0A%20%20%20%20%20*%20%40memberof%20Polymer%0A%20%20%20%20%20*%20%40suppress%20%7BinvalidCasts%2C%20checkTypes%7D%0A%20%20%20%20%20*%2Ffunction%20mixinBehaviors(behaviors%2Cklass)%7Breturn%20GenerateClassFromInfo(%7B%7D%2CPolymer.LegacyElementMixin(klass)%2Cbehaviors)%3B%7D%2F%2F%20NOTE%3A%0A%2F%2F%201.x%0A%2F%2F%20Behaviors%20were%20mixed%20in%20*in%20reverse%20order*%20and%20de-duped%20on%20the%20fly.%0A%2F%2F%20The%20rule%20was%20that%20behavior%20properties%20were%20copied%20onto%20the%20element%0A%2F%2F%20prototype%20if%20and%20only%20if%20the%20property%20did%20not%20already%20exist.%0A%2F%2F%20Given%3A%20Polymer%7B%20behaviors%3A%20%5BA%2C%20B%2C%20C%2C%20A%2C%20B%5D%7D%2C%20property%20copy%20order%20was%3A%0A%2F%2F%20(1)%2C%20B%2C%20(2)%2C%20A%2C%20(3)%20C.%20This%20means%20prototype%20properties%20win%20over%0A%2F%2F%20B%20properties%20win%20over%20A%20win%20over%20C.%20This%20mirrors%20what%20would%20happen%0A%2F%2F%20with%20inheritance%20if%20element%20extended%20B%20extended%20A%20extended%20C.%0A%2F%2F%0A%2F%2F%20Again%20given%2C%20Polymer%7B%20behaviors%3A%20%5BA%2C%20B%2C%20C%2C%20A%2C%20B%5D%7D%2C%20the%20resulting%0A%2F%2F%20%60behaviors%60%20array%20was%20%5BC%2C%20A%2C%20B%5D.%0A%2F%2F%20Behavior%20lifecycle%20methods%20were%20called%20in%20behavior%20array%20order%0A%2F%2F%20followed%20by%20the%20element%2C%20e.g.%20(1)%20C.created%2C%20(2)%20A.created%2C%0A%2F%2F%20(3)%20B.created%2C%20(4)%20element.created.%20There%20was%20no%20support%20for%0A%2F%2F%20super%2C%20and%20%22super-behavior%22%20methods%20were%20callable%20only%20by%20name).%0A%2F%2F%0A%2F%2F%202.x%0A%2F%2F%20Behaviors%20are%20made%20into%20proper%20mixins%20which%20live%20in%20the%0A%2F%2F%20element's%20prototype%20chain.%20Behaviors%20are%20placed%20in%20the%20element%20prototype%0A%2F%2F%20eldest%20to%20youngest%20and%20de-duped%20youngest%20to%20oldest%3A%0A%2F%2F%20So%2C%20first%20%5BA%2C%20B%2C%20C%2C%20A%2C%20B%5D%20becomes%20%5BC%2C%20A%2C%20B%5D%20then%2C%0A%2F%2F%20the%20element%20prototype%20becomes%20(oldest)%20(1)%20Polymer.Element%2C%20(2)%20class(C)%2C%0A%2F%2F%20(3)%20class(A)%2C%20(4)%20class(B)%2C%20(5)%20class(Polymer(%7B...%7D)).%0A%2F%2F%20Result%3A%0A%2F%2F%20This%20means%20element%20properties%20win%20over%20B%20properties%20win%20over%20A%20win%0A%2F%2F%20over%20C.%20(same%20as%201.x)%0A%2F%2F%20If%20lifecycle%20is%20called%20(super%20then%20me)%2C%20order%20is%0A%2F%2F%20(1)%20C.created%2C%20(2)%20A.created%2C%20(3)%20B.created%2C%20(4)%20element.created%0A%2F%2F%20(again%20same%20as%201.x)%0Afunction%20applyBehaviors(proto%2Cbehaviors%2Clifecycle)%7Bfor(var%20i%3D0%3Bi%3Cbehaviors.length%3Bi%2B%2B)%7BapplyInfo(proto%2Cbehaviors%5Bi%5D%2Clifecycle%2CexcludeOnBehaviors)%3B%7D%7Dfunction%20applyInfo(proto%2Cinfo%2Clifecycle%2CexcludeProps)%7BcopyProperties(info%2Cproto%2CexcludeProps)%3Bfor(var%20p%20in%20lifecycleProps)%7Bif(info%5Bp%5D)%7Blifecycle%5Bp%5D%3Dlifecycle%5Bp%5D%7C%7C%5B%5D%3Blifecycle%5Bp%5D.push(info%5Bp%5D)%3B%7D%7D%7D%2F**%0A%20%20%20%20%20*%20%40param%20%7BArray%7D%20behaviors%20List%20of%20behaviors%20to%20flatten.%0A%20%20%20%20%20*%20%40param%20%7BArray%3D%7D%20list%20Target%20list%20to%20flatten%20behaviors%20into.%0A%20%20%20%20%20*%20%40param%20%7BArray%3D%7D%20exclude%20List%20of%20behaviors%20to%20exclude%20from%20the%20list.%0A%20%20%20%20%20*%20%40return%20%7B!Array%7D%20Returns%20the%20list%20of%20flattened%20behaviors.%0A%20%20%20%20%20*%2Ffunction%20flattenBehaviors(behaviors%2Clist%2Cexclude)%7Blist%3Dlist%7C%7C%5B%5D%3Bfor(var%20i%3Dbehaviors.length-1%3Bi%3E%3D0%3Bi--)%7Bvar%20b%3Dbehaviors%5Bi%5D%3Bif(b)%7Bif(Array.isArray(b))%7BflattenBehaviors(b%2Clist)%3B%7Delse%7B%2F%2F%20dedup%0Aif(list.indexOf(b)%3C0%26%26(!exclude%7C%7Cexclude.indexOf(b)%3C0))%7Blist.unshift(b)%3B%7D%7D%7Delse%7Bconsole.warn('behavior%20is%20null%2C%20check%20for%20missing%20or%20404%20import')%3B%7D%7Dreturn%20list%3B%7D%2F*%20Note%20about%20construction%20and%20extension%20of%20legacy%20classes.%0A%20%20%20%20%20%20%5BChanged%20in%20Q4%202018%20to%20optimize%20performance.%5D%0A%0A%20%20%20%20%20%20When%20calling%20%60Polymer%60%20or%20%60mixinBehaviors%60%2C%20the%20generated%20class%20below%20is%0A%20%20%20%20%20%20made.%20The%20list%20of%20behaviors%20was%20previously%20made%20into%20one%20generated%20class%20per%0A%20%20%20%20%20%20behavior%2C%20but%20this%20is%20no%20longer%20the%20case%20as%20behaviors%20are%20now%20called%0A%20%20%20%20%20%20manually.%20Note%2C%20there%20may%20*still*%20be%20multiple%20generated%20classes%20in%20the%0A%20%20%20%20%20%20element's%20prototype%20chain%20if%20extension%20is%20used%20with%20%60mixinBehaviors%60.%0A%0A%20%20%20%20%20%20The%20generated%20class%20is%20directly%20tied%20to%20the%20info%20object%20and%20behaviors%0A%20%20%20%20%20%20used%20to%20create%20it.%20That%20list%20of%20behaviors%20is%20filtered%20so%20it's%20only%20the%0A%20%20%20%20%20%20behaviors%20not%20active%20on%20the%20superclass.%20In%20order%20to%20call%20through%20to%20the%0A%20%20%20%20%20%20entire%20list%20of%20lifecycle%20methods%2C%20it's%20important%20to%20call%20%60super%60.%0A%0A%20%20%20%20%20%20The%20element's%20%60properties%60%20and%20%60observers%60%20are%20controlled%20via%20the%20finalization%0A%20%20%20%20%20%20mechanism%20provided%20by%20%60PropertiesMixin%60.%20%60Properties%60%20and%20%60observers%60%20are%0A%20%20%20%20%20%20collected%20by%20manually%20traversing%20the%20prototype%20chain%20and%20merging.%0A%0A%20%20%20%20%20%20To%20limit%20changes%2C%20the%20%60_registered%60%20method%20is%20called%20via%20%60_initializeProperties%60%0A%20%20%20%20%20%20and%20not%20%60_finalizeClass%60.%0A%20%20%20%20*%2F%2F**%0A%20%20%20%20%20*%20%40param%20%7B!PolymerInit%7D%20info%20Polymer%20info%20object%0A%20%20%20%20%20*%20%40param%20%7Bfunction(new%3AHTMLElement)%7D%20Base%20base%20class%20to%20extend%20with%20info%20object%0A%20%20%20%20%20*%20%40param%20%7BObject%7D%20behaviors%20behaviors%20to%20copy%20into%20the%20element%0A%20%20%20%20%20*%20%40return%20%7Bfunction(new%3AHTMLElement)%7D%20Generated%20class%0A%20%20%20%20%20*%20%40suppress%20%7BcheckTypes%7D%0A%20%20%20%20%20*%20%40private%0A%20%20%20%20%20*%2Ffunction%20GenerateClassFromInfo(info%2CBase%2Cbehaviors)%7B%2F%2F%20manages%20behavior%20and%20lifecycle%20processing%20(filled%20in%20after%20class%20definition)%0Avar%20behaviorList%3Dvoid%200%3Bvar%20lifecycle%3D%7B%7D%3B%2F**%20%40private%20*%2Fvar%20PolymerGenerated%3Dfunction(_Base)%7B_inherits(PolymerGenerated%2C_Base)%3Bfunction%20PolymerGenerated()%7B_classCallCheck(this%2CPolymerGenerated)%3Breturn%20_possibleConstructorReturn(this%2C(PolymerGenerated.__proto__%7C%7CObject.getPrototypeOf(PolymerGenerated)).apply(this%2Carguments))%3B%7D_createClass(PolymerGenerated%2C%5B%7Bkey%3A'created'%2C%2F**%0A%20%20%20%20%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20%20%20%20%20*%2Fvalue%3Afunction%20created()%7B_get(PolymerGenerated.prototype.__proto__%7C%7CObject.getPrototypeOf(PolymerGenerated.prototype)%2C'created'%2Cthis).call(this)%3Bvar%20list%3Dlifecycle.created%3Bif(list)%7Bfor(var%20i%3D0%3Bi%3Clist.length%3Bi%2B%2B)%7Blist%5Bi%5D.call(this)%3B%7D%7D%7D%2F**%0A%20%20%20%20%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'_registered'%2Cvalue%3Afunction%20_registered()%7B%2F*%20NOTE%3A%20%60beforeRegister%60%20is%20called%20here%20for%20bc%2C%20but%20the%20behavior%0A%20%20%20%20%20%20%20%20%20%20%20%20is%20different%20than%20in%201.x.%20In%201.0%2C%20the%20method%20was%20called%20*after*%0A%20%20%20%20%20%20%20%20%20%20%20%20mixing%20prototypes%20together%20but%20*before*%20processing%20of%20meta-objects.%0A%20%20%20%20%20%20%20%20%20%20%20%20However%2C%20dynamic%20effects%20can%20still%20be%20set%20here%20and%20can%20be%20done%20either%0A%20%20%20%20%20%20%20%20%20%20%20%20in%20%60beforeRegister%60%20or%20%60registered%60.%20It%20is%20no%20longer%20possible%20to%20set%0A%20%20%20%20%20%20%20%20%20%20%20%20%60is%60%20in%20%60beforeRegister%60%20as%20you%20could%20in%201.x.%0A%20%20%20%20%20%20%20%20%20%20*%2F%2F%2F%20only%20proceed%20if%20the%20generated%20class'%20prototype%20has%20not%20been%20registered.%0Avar%20generatedProto%3DPolymerGenerated.prototype%3Bif(!generatedProto.hasOwnProperty('__hasRegisterFinished'))%7BgeneratedProto.__hasRegisterFinished%3Dtrue%3B%2F%2F%20ensure%20superclass%20is%20registered%20first.%0A_get(PolymerGenerated.prototype.__proto__%7C%7CObject.getPrototypeOf(PolymerGenerated.prototype)%2C'_registered'%2Cthis).call(this)%3B%2F%2F%20copy%20properties%20onto%20the%20generated%20class%20lazily%20if%20we're%20optimizing%2C%0Aif(Polymer.legacyOptimizations)%7BcopyPropertiesToProto(generatedProto)%3B%7D%2F%2F%20make%20sure%20legacy%20lifecycle%20is%20called%20on%20the%20*element*'s%20prototype%0A%2F%2F%20and%20not%20the%20generated%20class%20prototype%3B%20if%20the%20element%20has%20been%0A%2F%2F%20extended%2C%20these%20are%20*not*%20the%20same.%0Avar%20proto%3DObject.getPrototypeOf(this)%3Bvar%20list%3Dlifecycle.beforeRegister%3Bif(list)%7Bfor(var%20i%3D0%3Bi%3Clist.length%3Bi%2B%2B)%7Blist%5Bi%5D.call(proto)%3B%7D%7Dlist%3Dlifecycle.registered%3Bif(list)%7Bfor(var%20_i%3D0%3B_i%3Clist.length%3B_i%2B%2B)%7Blist%5B_i%5D.call(proto)%3B%7D%7D%7D%7D%2F**%0A%20%20%20%20%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'_applyListeners'%2Cvalue%3Afunction%20_applyListeners()%7B_get(PolymerGenerated.prototype.__proto__%7C%7CObject.getPrototypeOf(PolymerGenerated.prototype)%2C'_applyListeners'%2Cthis).call(this)%3Bvar%20list%3Dlifecycle.listeners%3Bif(list)%7Bfor(var%20i%3D0%3Bi%3Clist.length%3Bi%2B%2B)%7Bvar%20listeners%3Dlist%5Bi%5D%3Bif(listeners)%7Bfor(var%20l%20in%20listeners)%7Bthis._addMethodEventListenerToNode(this%2Cl%2Clisteners%5Bl%5D)%3B%7D%7D%7D%7D%7D%2F%2F%20note%3A%20exception%20to%20%22super%20then%20me%22%20rule%3B%0A%2F%2F%20do%20work%20before%20calling%20super%20so%20that%20super%20attributes%0A%2F%2F%20only%20apply%20if%20not%20already%20set.%0A%2F**%0A%20%20%20%20%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'_ensureAttributes'%2Cvalue%3Afunction%20_ensureAttributes()%7Bvar%20list%3Dlifecycle.hostAttributes%3Bif(list)%7Bfor(var%20i%3Dlist.length-1%3Bi%3E%3D0%3Bi--)%7Bvar%20hostAttributes%3Dlist%5Bi%5D%3Bfor(var%20a%20in%20hostAttributes)%7Bthis._ensureAttribute(a%2ChostAttributes%5Ba%5D)%3B%7D%7D%7D_get(PolymerGenerated.prototype.__proto__%7C%7CObject.getPrototypeOf(PolymerGenerated.prototype)%2C'_ensureAttributes'%2Cthis).call(this)%3B%7D%2F**%0A%20%20%20%20%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'ready'%2Cvalue%3Afunction%20ready()%7B_get(PolymerGenerated.prototype.__proto__%7C%7CObject.getPrototypeOf(PolymerGenerated.prototype)%2C'ready'%2Cthis).call(this)%3Bvar%20list%3Dlifecycle.ready%3Bif(list)%7Bfor(var%20i%3D0%3Bi%3Clist.length%3Bi%2B%2B)%7Blist%5Bi%5D.call(this)%3B%7D%7D%7D%2F**%0A%20%20%20%20%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'attached'%2Cvalue%3Afunction%20attached()%7B_get(PolymerGenerated.prototype.__proto__%7C%7CObject.getPrototypeOf(PolymerGenerated.prototype)%2C'attached'%2Cthis).call(this)%3Bvar%20list%3Dlifecycle.attached%3Bif(list)%7Bfor(var%20i%3D0%3Bi%3Clist.length%3Bi%2B%2B)%7Blist%5Bi%5D.call(this)%3B%7D%7D%7D%2F**%0A%20%20%20%20%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'detached'%2Cvalue%3Afunction%20detached()%7B_get(PolymerGenerated.prototype.__proto__%7C%7CObject.getPrototypeOf(PolymerGenerated.prototype)%2C'detached'%2Cthis).call(this)%3Bvar%20list%3Dlifecycle.detached%3Bif(list)%7Bfor(var%20i%3D0%3Bi%3Clist.length%3Bi%2B%2B)%7Blist%5Bi%5D.call(this)%3B%7D%7D%7D%2F**%0A%20%20%20%20%20%20%20%20%20*%20Implements%20native%20Custom%20Elements%20%60attributeChangedCallback%60%20to%0A%20%20%20%20%20%20%20%20%20*%20set%20an%20attribute%20value%20to%20a%20property%20via%20%60_attributeToProperty%60.%0A%20%20%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20%20%20*%20%40param%20%7Bstring%7D%20name%20Name%20of%20attribute%20that%20changed%0A%20%20%20%20%20%20%20%20%20*%20%40param%20%7B%3Fstring%7D%20old%20Old%20attribute%20value%0A%20%20%20%20%20%20%20%20%20*%20%40param%20%7B%3Fstring%7D%20value%20New%20attribute%20value%0A%20%20%20%20%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'attributeChanged'%2Cvalue%3Afunction%20attributeChanged(name%2Cold%2Cvalue)%7B_get(PolymerGenerated.prototype.__proto__%7C%7CObject.getPrototypeOf(PolymerGenerated.prototype)%2C'attributeChanged'%2Cthis).call(this)%3Bvar%20list%3Dlifecycle.attributeChanged%3Bif(list)%7Bfor(var%20i%3D0%3Bi%3Clist.length%3Bi%2B%2B)%7Blist%5Bi%5D.call(this%2Cname%2Cold%2Cvalue)%3B%7D%7D%7D%7D%5D%2C%5B%7Bkey%3A'_finalizeClass'%2C%2F%2F%20explicitly%20not%20calling%20super._finalizeClass%0Avalue%3Afunction%20_finalizeClass()%7B%2F%2F%20if%20calling%20via%20a%20subclass%20that%20hasn't%20been%20generated%2C%20pass%20through%20to%20super%0Aif(!this.hasOwnProperty(window.JSCompiler_renameProperty('generatedFrom'%2Cthis)))%7B_get(PolymerGenerated.__proto__%7C%7CObject.getPrototypeOf(PolymerGenerated)%2C'_finalizeClass'%2Cthis).call(this)%3B%7Delse%7B%2F%2F%20interleave%20properties%20and%20observers%20per%20behavior%20and%20%60info%60%0Aif(behaviorList)%7Bfor(var%20i%3D0%2Cb%3Bi%3CbehaviorList.length%3Bi%2B%2B)%7Bb%3DbehaviorList%5Bi%5D%3Bif(b.properties)%7Bthis.createProperties(b.properties)%3B%7Dif(b.observers)%7Bthis.createObservers(b.observers%2Cb.properties)%3B%7D%7D%7Dif(info.properties)%7Bthis.createProperties(info.properties)%3B%7Dif(info.observers)%7Bthis.createObservers(info.observers%2Cinfo.properties)%3B%7D%2F%2F%20make%20sure%20to%20prepare%20the%20element%20template%0Athis._prepareTemplate()%3B%7D%7D%7D%2C%7Bkey%3A'properties'%2Cget%3Afunction%20get()%7Bvar%20properties%3D%7B%7D%3Bif(behaviorList)%7Bfor(var%20i%3D0%3Bi%3CbehaviorList.length%3Bi%2B%2B)%7BObject.assign(properties%2CbehaviorList%5Bi%5D.properties)%3B%7D%7DObject.assign(properties%2Cinfo.properties)%3Breturn%20properties%3B%7D%7D%2C%7Bkey%3A'observers'%2Cget%3Afunction%20get()%7Bvar%20observers%3D%5B%5D%3Bif(behaviorList)%7Bfor(var%20i%3D0%2Cb%3Bi%3CbehaviorList.length%3Bi%2B%2B)%7Bb%3DbehaviorList%5Bi%5D%3Bif(b.observers)%7Bobservers%3Dobservers.concat(b.observers)%3B%7D%7D%7Dif(info.observers)%7Bobservers%3Dobservers.concat(info.observers)%3B%7Dreturn%20observers%3B%7D%7D%5D)%3Breturn%20PolymerGenerated%3B%7D(Base)%3B%2F%2F%20apply%20behaviors%2C%20note%20actual%20copying%20is%20done%20lazily%20at%20first%20instance%20creation%0Aif(behaviors)%7B%2F%2F%20NOTE%3A%20ensure%20the%20behavior%20is%20extending%20a%20class%20with%0A%2F%2F%20legacy%20element%20api.%20This%20is%20necessary%20since%20behaviors%20expect%20to%20be%20able%0A%2F%2F%20to%20access%201.x%20legacy%20api.%0Aif(!Array.isArray(behaviors))%7Bbehaviors%3D%5Bbehaviors%5D%3B%7Dvar%20superBehaviors%3DBase.prototype.behaviors%3B%2F%2F%20get%20flattened%2C%20deduped%20list%20of%20behaviors%20*not*%20already%20on%20super%20class%0AbehaviorList%3DflattenBehaviors(behaviors%2Cnull%2CsuperBehaviors)%3BPolymerGenerated.prototype.behaviors%3DsuperBehaviors%3FsuperBehaviors.concat(behaviors)%3AbehaviorList%3B%7Dvar%20copyPropertiesToProto%3Dfunction%20copyPropertiesToProto(proto)%7Bif(behaviorList)%7BapplyBehaviors(proto%2CbehaviorList%2Clifecycle)%3B%7DapplyInfo(proto%2Cinfo%2Clifecycle%2CexcludeOnInfo)%3B%7D%3B%2F%2F%20copy%20properties%20if%20we're%20not%20optimizing%0Aif(!Polymer.legacyOptimizations)%7BcopyPropertiesToProto(PolymerGenerated.prototype)%3B%7DPolymerGenerated.generatedFrom%3Dinfo%3Breturn%20PolymerGenerated%3B%7D%2F**%0A%20%20%20%20%20*%20Generates%20a%20class%20that%20extends%20%60Polymer.LegacyElement%60%20based%20on%20the%0A%20%20%20%20%20*%20provided%20info%20object.%20%20Metadata%20objects%20on%20the%20%60info%60%20object%0A%20%20%20%20%20*%20(%60properties%60%2C%20%60observers%60%2C%20%60listeners%60%2C%20%60behaviors%60%2C%20%60is%60)%20are%20used%0A%20%20%20%20%20*%20for%20Polymer's%20meta-programming%20systems%2C%20and%20any%20functions%20are%20copied%0A%20%20%20%20%20*%20to%20the%20generated%20class.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20Valid%20%22metadata%22%20values%20are%20as%20follows%3A%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%60is%60%3A%20String%20providing%20the%20tag%20name%20to%20register%20the%20element%20under.%20In%0A%20%20%20%20%20*%20addition%2C%20if%20a%20%60dom-module%60%20with%20the%20same%20id%20exists%2C%20the%20first%20template%0A%20%20%20%20%20*%20in%20that%20%60dom-module%60%20will%20be%20stamped%20into%20the%20shadow%20root%20of%20this%20element%2C%0A%20%20%20%20%20*%20with%20support%20for%20declarative%20event%20listeners%20(%60on-...%60)%2C%20Polymer%20data%0A%20%20%20%20%20*%20bindings%20(%60%5B%5B...%5D%5D%60%20and%20%60%7B%7B...%7D%7D%60)%2C%20and%20id-based%20node%20finding%20into%0A%20%20%20%20%20*%20%60this.%24%60.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%60properties%60%3A%20Object%20describing%20property-related%20metadata%20used%20by%20Polymer%0A%20%20%20%20%20*%20features%20(key%3A%20property%20names%2C%20value%3A%20object%20containing%20property%20metadata).%0A%20%20%20%20%20*%20Valid%20keys%20in%20per-property%20metadata%20include%3A%0A%20%20%20%20%20*%20-%20%60type%60%20(String%7CNumber%7CObject%7CArray%7C...)%3A%20Used%20by%0A%20%20%20%20%20*%20%20%20%60attributeChangedCallback%60%20to%20determine%20how%20string-based%20attributes%0A%20%20%20%20%20*%20%20%20are%20deserialized%20to%20JavaScript%20property%20values.%0A%20%20%20%20%20*%20-%20%60notify%60%20(boolean)%3A%20Causes%20a%20change%20in%20the%20property%20to%20fire%20a%0A%20%20%20%20%20*%20%20%20non-bubbling%20event%20called%20%60%3Cproperty%3E-changed%60.%20Elements%20that%20have%0A%20%20%20%20%20*%20%20%20enabled%20two-way%20binding%20to%20the%20property%20use%20this%20event%20to%20observe%20changes.%0A%20%20%20%20%20*%20-%20%60readOnly%60%20(boolean)%3A%20Creates%20a%20getter%20for%20the%20property%2C%20but%20no%20setter.%0A%20%20%20%20%20*%20%20%20To%20set%20a%20read-only%20property%2C%20use%20the%20private%20setter%20method%0A%20%20%20%20%20*%20%20%20%60_setProperty(property%2C%20value)%60.%0A%20%20%20%20%20*%20-%20%60observer%60%20(string)%3A%20Observer%20method%20name%20that%20will%20be%20called%20when%0A%20%20%20%20%20*%20%20%20the%20property%20changes.%20The%20arguments%20of%20the%20method%20are%0A%20%20%20%20%20*%20%20%20%60(value%2C%20previousValue)%60.%0A%20%20%20%20%20*%20-%20%60computed%60%20(string)%3A%20String%20describing%20method%20and%20dependent%20properties%0A%20%20%20%20%20*%20%20%20for%20computing%20the%20value%20of%20this%20property%20(e.g.%20%60'computeFoo(bar%2C%20zot)'%60).%0A%20%20%20%20%20*%20%20%20Computed%20properties%20are%20read-only%20by%20default%20and%20can%20only%20be%20changed%0A%20%20%20%20%20*%20%20%20via%20the%20return%20value%20of%20the%20computing%20method.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%60observers%60%3A%20Array%20of%20strings%20describing%20multi-property%20observer%20methods%0A%20%20%20%20%20*%20%20and%20their%20dependent%20properties%20(e.g.%20%60'observeABC(a%2C%20b%2C%20c)'%60).%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%60listeners%60%3A%20Object%20describing%20event%20listeners%20to%20be%20added%20to%20each%0A%20%20%20%20%20*%20%20instance%20of%20this%20element%20(key%3A%20event%20name%2C%20value%3A%20method%20name).%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%60behaviors%60%3A%20Array%20of%20additional%20%60info%60%20objects%20containing%20metadata%0A%20%20%20%20%20*%20and%20callbacks%20in%20the%20same%20format%20as%20the%20%60info%60%20object%20here%20which%20are%0A%20%20%20%20%20*%20merged%20into%20this%20element.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%60hostAttributes%60%3A%20Object%20listing%20attributes%20to%20be%20applied%20to%20the%20host%0A%20%20%20%20%20*%20%20once%20created%20(key%3A%20attribute%20name%2C%20value%3A%20attribute%20value).%20%20Values%0A%20%20%20%20%20*%20%20are%20serialized%20based%20on%20the%20type%20of%20the%20value.%20%20Host%20attributes%20should%0A%20%20%20%20%20*%20%20generally%20be%20limited%20to%20attributes%20such%20as%20%60tabIndex%60%20and%20%60aria-...%60.%0A%20%20%20%20%20*%20%20Attributes%20in%20%60hostAttributes%60%20are%20only%20applied%20if%20a%20user-supplied%0A%20%20%20%20%20*%20%20attribute%20is%20not%20already%20present%20(attributes%20in%20markup%20override%0A%20%20%20%20%20*%20%20%60hostAttributes%60).%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20In%20addition%2C%20the%20following%20Polymer-specific%20callbacks%20may%20be%20provided%3A%0A%20%20%20%20%20*%20-%20%60registered%60%3A%20called%20after%20first%20instance%20of%20this%20element%2C%0A%20%20%20%20%20*%20-%20%60created%60%3A%20called%20during%20%60constructor%60%0A%20%20%20%20%20*%20-%20%60attached%60%3A%20called%20during%20%60connectedCallback%60%0A%20%20%20%20%20*%20-%20%60detached%60%3A%20called%20during%20%60disconnectedCallback%60%0A%20%20%20%20%20*%20-%20%60ready%60%3A%20called%20before%20first%20%60attached%60%2C%20after%20all%20properties%20of%0A%20%20%20%20%20*%20%20%20this%20element%20have%20been%20propagated%20to%20its%20template%20and%20all%20observers%0A%20%20%20%20%20*%20%20%20have%20run%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40param%20%7B!PolymerInit%7D%20info%20Object%20containing%20Polymer%20metadata%20and%20functions%0A%20%20%20%20%20*%20%20%20to%20become%20class%20methods.%0A%20%20%20%20%20*%20%40template%20T%0A%20%20%20%20%20*%20%40param%20%7Bfunction(T)%3AT%7D%20mixin%20Optional%20mixin%20to%20apply%20to%20legacy%20base%20class%0A%20%20%20%20%20*%20%20%20before%20extending%20with%20Polymer%20metaprogramming.%0A%20%20%20%20%20*%20%40return%20%7Bfunction(new%3AHTMLElement)%7D%20Generated%20class%0A%20%20%20%20%20*%20%40memberof%20Polymer%0A%20%20%20%20%20*%2FPolymer.Class%3Dfunction(info%2Cmixin)%7Bif(!info)%7Bconsole.warn('Polymer.Class%20requires%20%60info%60%20argument')%3B%7Dvar%20klass%3Dmixin%3Fmixin(Polymer.LegacyElementMixin(HTMLElement))%3APolymer.LegacyElementMixin(HTMLElement)%3Bklass%3DGenerateClassFromInfo(info%2Cklass%2Cinfo.behaviors)%3Bif(info._enableDisableUpgrade)%7Bklass%3DPolymer.DisableUpgradeMixin(klass)%3B%7D%2F%2F%20decorate%20klass%20with%20registration%20info%0Aklass.is%3Dklass.prototype.is%3Dinfo.is%3Breturn%20klass%3B%7D%3BPolymer.mixinBehaviors%3DmixinBehaviors%3B%7D)()%3B%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Fcpt-static.gannettdigital.com%2Funiversal-web-client%2Fmaster%2Flatest%2Fvendor%2Fcomponents%2Fpolymer%2Flib%2Flegacy%2Fclass.html.js%0A | 19 kB | 2023-03-07 | 2024-01-25 | |
Pretty
Loading... | ||||
http:text/javascript;charset=utf-8,'use%20strict'%3BPolymer(%7Bis%3A'story-emphasis'%2CdesignId%3A'S9'%2Cbehaviors%3A%5Bwindow.ga_data.behaviors.GalliumI18n%5D%2Cproperties%3A%7Bl10n%3A%7Bvalue%3Afunction%20value()%7Breturn%7B'en'%3A%7B'story-from'%3A'Story%20From'%7D%2C'es'%3A%7B'story-from'%3A'De%20art%C3%ADculo'%7D%7D%3B%7D%7D%2C%2F*%20Optional%2C%20denotes%20SSTS-based%20Context%20Label%20*%2Fsection%3A%7Btype%3AString%2Cobserver%3A'sectionChange'%7D%2C%2F*%20Optional%2C%20denotes%20Sponsored%20or%20Branded%20Content%20*%2Fsponsor%3A%7Btype%3AString%2Cobserver%3A'sponsorChange'%7D%2C%2F*%20Optional%2C%20provided%20for%20Blog%20content%20*%2Fimage%3A%7Btype%3AString%7D%2C%2F*%20Optional%2C%20denotes%20Blog%20content%20*%2Fblog%3A%7Btype%3AString%2Cobserver%3A'blogChange'%7D%2Clink%3A%7Btype%3AString%2Cobserver%3A'_linkChangeHandler'%7D%2C%2F*%20Optional%2C%20used%20to%20add%20in%20additional%20layout%20classes%20*%2Flayout%3A%7Btype%3AString%2Cvalue%3A''%7D%2CpremiumContent%3A%7Btype%3ABoolean%2Cvalue%3Afalse%7D%7D%2CsectionChange%3Afunction%20sectionChange(section)%7Bif(section%3D%3D%3D'opinion')%7Bthis.%24.background.classList.add(section)%3Bthis.%24.label.innerText%3Dsection%3B%7D%7D%2CsponsorChange%3Afunction%20sponsorChange(sponsor)%7Bthis.%24.background.classList.add('sponsor-story')%3Bthis.%24.label.innerText%3Dsponsor%3Bif(this.image)%7Bthis.%24.labelImage.setAttribute('src'%2Cthis.image)%3Bthis.%24.labelImage.setAttribute('alt'%2Csponsor)%3Bif(this.image.toLowerCase().indexOf('svg')%3E-1)%7Bthis.%24.labelImage.classList.add('svg-image')%3B%7Dthis.%24.background.classList.add('logo')%3B%7D%7D%2CblogChange%3Afunction%20blogChange(blog)%7Bthis.%24.background.classList.add('blog')%3Bif(this.image)%7Bthis.%24.labelImage.setAttribute('src'%2Cthis.image)%3Bthis.%24.labelImage.setAttribute('alt'%2Cblog)%3Bif(this.image.toLowerCase().indexOf('svg')%3E-1)%7Bthis.%24.labelImage.classList.add('svg-image')%3B%7D%7Delse%7Bthis.%24.label.innerText%3Dblog%3Bthis.%24.labelImage.classList.add('no-logo')%3B%7D%7D%2C_linkChangeHandler%3Afunction%20_linkChangeHandler(link)%7Bvar%20_this%3Dthis%3Bvar%20isLinked%3Dlink!%3D%3D''%26%26link!%3D%3D'%2Fopinion'%3Bthis.%24.background.classList.toggle('link'%2CisLinked)%3Bif(isLinked)%7Bif(!this.linkClickHandler)%7Bthis.linkClickHandler%3Dfunction()%7Bwindow.location%3D_this.link%3B%7D%3Bthis.%24.background.addEventListener('click'%2Cthis.linkClickHandler)%3B%7D%7Delse%20if(this.linkClickHandler)%7Bthis.%24.background.removeEventListener('click'%2Cthis.linkClickHandler)%3B%7D%7D%7D)%3B%0A%2F%2F%23%20sourceMappingURL%3D..%2F..%2F..%2Fmaps%2Felements%2Fstory%2Fstory-emphasis%2Fstory-emphasis.html_script_0.js.map%0A%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Fcpt-static.gannettdigital.com%2Funiversal-web-client%2Fmaster%2Flatest%2Felements%2Fstory%2Fstory-emphasis%2Fstory-emphasis.html.js%0A | 2.3 kB | 2023-03-13 | 2024-01-25 | |
Pretty
Loading... | ||||
http:text/javascript;charset=utf-8,var%20_typeof%3Dtypeof%20Symbol%3D%3D%3D%22function%22%26%26typeof%20Symbol.iterator%3D%3D%3D%22symbol%22%3Ffunction(obj)%7Breturn%20typeof%20obj%3B%7D%3Afunction(obj)%7Breturn%20obj%26%26typeof%20Symbol%3D%3D%3D%22function%22%26%26obj.constructor%3D%3D%3DSymbol%26%26obj!%3D%3DSymbol.prototype%3F%22symbol%22%3Atypeof%20obj%3B%7D%3Bvar%20_get%3Dfunction%20get(object%2Cproperty%2Creceiver)%7Bif(object%3D%3D%3Dnull)object%3DFunction.prototype%3Bvar%20desc%3DObject.getOwnPropertyDescriptor(object%2Cproperty)%3Bif(desc%3D%3D%3Dundefined)%7Bvar%20parent%3DObject.getPrototypeOf(object)%3Bif(parent%3D%3D%3Dnull)%7Breturn%20undefined%3B%7Delse%7Breturn%20get(parent%2Cproperty%2Creceiver)%3B%7D%7Delse%20if(%22value%22in%20desc)%7Breturn%20desc.value%3B%7Delse%7Bvar%20getter%3Ddesc.get%3Bif(getter%3D%3D%3Dundefined)%7Breturn%20undefined%3B%7Dreturn%20getter.call(receiver)%3B%7D%7D%3Bvar%20_createClass%3Dfunction()%7Bfunction%20defineProperties(target%2Cprops)%7Bfor(var%20i%3D0%3Bi%3Cprops.length%3Bi%2B%2B)%7Bvar%20descriptor%3Dprops%5Bi%5D%3Bdescriptor.enumerable%3Ddescriptor.enumerable%7C%7Cfalse%3Bdescriptor.configurable%3Dtrue%3Bif(%22value%22in%20descriptor)descriptor.writable%3Dtrue%3BObject.defineProperty(target%2Cdescriptor.key%2Cdescriptor)%3B%7D%7Dreturn%20function(Constructor%2CprotoProps%2CstaticProps)%7Bif(protoProps)defineProperties(Constructor.prototype%2CprotoProps)%3Bif(staticProps)defineProperties(Constructor%2CstaticProps)%3Breturn%20Constructor%3B%7D%3B%7D()%3Bfunction%20_classCallCheck(instance%2CConstructor)%7Bif(!(instance%20instanceof%20Constructor))%7Bthrow%20new%20TypeError(%22Cannot%20call%20a%20class%20as%20a%20function%22)%3B%7D%7Dfunction%20_possibleConstructorReturn(self%2Ccall)%7Bif(!self)%7Bthrow%20new%20ReferenceError(%22this%20hasn't%20been%20initialised%20-%20super()%20hasn't%20been%20called%22)%3B%7Dreturn%20call%26%26(typeof%20call%3D%3D%3D%22object%22%7C%7Ctypeof%20call%3D%3D%3D%22function%22)%3Fcall%3Aself%3B%7Dfunction%20_inherits(subClass%2CsuperClass)%7Bif(typeof%20superClass!%3D%3D%22function%22%26%26superClass!%3D%3Dnull)%7Bthrow%20new%20TypeError(%22Super%20expression%20must%20either%20be%20null%20or%20a%20function%2C%20not%20%22%2Btypeof%20superClass)%3B%7DsubClass.prototype%3DObject.create(superClass%26%26superClass.prototype%2C%7Bconstructor%3A%7Bvalue%3AsubClass%2Cenumerable%3Afalse%2Cwritable%3Atrue%2Cconfigurable%3Atrue%7D%7D)%3Bif(superClass)Object.setPrototypeOf%3FObject.setPrototypeOf(subClass%2CsuperClass)%3AsubClass.__proto__%3DsuperClass%3B%7D(function()%7B'use%20strict'%3B%2F**%20%40const%20%7B!AsyncInterface%7D%20*%2Fvar%20microtask%3DPolymer.Async.microTask%3B%2F**%0A%20%20%20%20%20*%20Element%20class%20mixin%20that%20provides%20basic%20meta-programming%20for%20creating%20one%0A%20%20%20%20%20*%20or%20more%20property%20accessors%20(getter%2Fsetter%20pair)%20that%20enqueue%20an%20async%0A%20%20%20%20%20*%20(batched)%20%60_propertiesChanged%60%20callback.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20For%20basic%20usage%20of%20this%20mixin%2C%20call%20%60MyClass.createProperties(props)%60%0A%20%20%20%20%20*%20once%20at%20class%20definition%20time%20to%20create%20property%20accessors%20for%20properties%0A%20%20%20%20%20*%20named%20in%20props%2C%20implement%20%60_propertiesChanged%60%20to%20react%20as%20desired%20to%0A%20%20%20%20%20*%20property%20changes%2C%20and%20implement%20%60static%20get%20observedAttributes()%60%20and%0A%20%20%20%20%20*%20include%20lowercase%20versions%20of%20any%20property%20names%20that%20should%20be%20set%20from%0A%20%20%20%20%20*%20attributes.%20Last%2C%20call%20%60this._enableProperties()%60%20in%20the%20element's%0A%20%20%20%20%20*%20%60connectedCallback%60%20to%20enable%20the%20accessors.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40mixinFunction%0A%20%20%20%20%20*%20%40polymer%0A%20%20%20%20%20*%20%40memberof%20Polymer%0A%20%20%20%20%20*%20%40summary%20Element%20class%20mixin%20for%20reacting%20to%20property%20changes%20from%0A%20%20%20%20%20*%20%20%20generated%20property%20accessors.%0A%20%20%20%20%20*%2FPolymer.PropertiesChanged%3DPolymer.dedupingMixin(function(superClass)%7B%2F**%0A%20%20%20%20%20%20%20*%20%40polymer%0A%20%20%20%20%20%20%20*%20%40mixinClass%0A%20%20%20%20%20%20%20*%20%40extends%20%7BsuperClass%7D%0A%20%20%20%20%20%20%20*%20%40implements%20%7BPolymer_PropertiesChanged%7D%0A%20%20%20%20%20%20%20*%20%40unrestricted%0A%20%20%20%20%20%20%20*%2Fvar%20PropertiesChanged%3Dfunction(_superClass)%7B_inherits(PropertiesChanged%2C_superClass)%3B_createClass(PropertiesChanged%2C%5B%7Bkey%3A'_createPropertyAccessor'%2C%2F%2Feslint-disable-line%20no-unused-vars%0A%2F**%0A%20%20%20%20%20%20%20%20%20*%20Creates%20a%20setter%2Fgetter%20pair%20for%20the%20named%20property%20with%20its%20own%0A%20%20%20%20%20%20%20%20%20*%20local%20storage.%20%20The%20getter%20returns%20the%20value%20in%20the%20local%20storage%2C%0A%20%20%20%20%20%20%20%20%20*%20and%20the%20setter%20calls%20%60_setProperty%60%2C%20which%20updates%20the%20local%20storage%0A%20%20%20%20%20%20%20%20%20*%20for%20the%20property%20and%20enqueues%20a%20%60_propertiesChanged%60%20callback.%0A%20%20%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20%20%20*%20This%20method%20may%20be%20called%20on%20a%20prototype%20or%20an%20instance.%20%20Calling%0A%20%20%20%20%20%20%20%20%20*%20this%20method%20may%20overwrite%20a%20property%20value%20that%20already%20exists%20on%0A%20%20%20%20%20%20%20%20%20*%20the%20prototype%2Finstance%20by%20creating%20the%20accessor.%0A%20%20%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20%20%20*%20%40param%20%7Bstring%7D%20property%20Name%20of%20the%20property%0A%20%20%20%20%20%20%20%20%20*%20%40param%20%7Bboolean%3D%7D%20readOnly%20When%20true%2C%20no%20setter%20is%20created%3B%20the%0A%20%20%20%20%20%20%20%20%20*%20%20%20protected%20%60_setProperty%60%20function%20must%20be%20used%20to%20set%20the%20property%0A%20%20%20%20%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20%20%20%20%20*%20%40protected%0A%20%20%20%20%20%20%20%20%20*%2Fvalue%3Afunction%20_createPropertyAccessor(property%2CreadOnly)%7Bthis._addPropertyToAttributeMap(property)%3Bif(!this.hasOwnProperty('__dataHasAccessor'))%7Bthis.__dataHasAccessor%3DObject.assign(%7B%7D%2Cthis.__dataHasAccessor)%3B%7Dif(!this.__dataHasAccessor%5Bproperty%5D)%7Bthis.__dataHasAccessor%5Bproperty%5D%3Dtrue%3Bthis._definePropertyAccessor(property%2CreadOnly)%3B%7D%7D%2F**%0A%20%20%20%20%20%20%20%20%20*%20Adds%20the%20given%20%60property%60%20to%20a%20map%20matching%20attribute%20names%0A%20%20%20%20%20%20%20%20%20*%20to%20property%20names%2C%20using%20%60attributeNameForProperty%60.%20This%20map%20is%0A%20%20%20%20%20%20%20%20%20*%20used%20when%20deserializing%20attribute%20values%20to%20properties.%0A%20%20%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20%20%20*%20%40param%20%7Bstring%7D%20property%20Name%20of%20the%20property%0A%20%20%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'_addPropertyToAttributeMap'%2Cvalue%3Afunction%20_addPropertyToAttributeMap(property)%7Bif(!this.hasOwnProperty('__dataAttributes'))%7Bthis.__dataAttributes%3DObject.assign(%7B%7D%2Cthis.__dataAttributes)%3B%7Dif(!this.__dataAttributes%5Bproperty%5D)%7Bvar%20attr%3Dthis.constructor.attributeNameForProperty(property)%3Bthis.__dataAttributes%5Battr%5D%3Dproperty%3B%7D%7D%2F**%0A%20%20%20%20%20%20%20%20%20*%20Defines%20a%20property%20accessor%20for%20the%20given%20property.%0A%20%20%20%20%20%20%20%20%20*%20%40param%20%7Bstring%7D%20property%20Name%20of%20the%20property%0A%20%20%20%20%20%20%20%20%20*%20%40param%20%7Bboolean%3D%7D%20readOnly%20When%20true%2C%20no%20setter%20is%20created%0A%20%20%20%20%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'_definePropertyAccessor'%2Cvalue%3Afunction%20_definePropertyAccessor(property%2CreadOnly)%7BObject.defineProperty(this%2Cproperty%2C%7B%2F*%20eslint-disable%20valid-jsdoc%20*%2F%2F**%20%40this%20%7BPropertiesChanged%7D%20*%2Fget%3Afunction%20get()%7Breturn%20this._getProperty(property)%3B%7D%2C%2F**%20%40this%20%7BPropertiesChanged%7D%20*%2Fset%3AreadOnly%3Ffunction()%7B%7D%3Afunction(value)%7Bthis._setProperty(property%2Cvalue)%3B%7D%2F*%20eslint-enable%20*%2F%7D)%3B%7D%7D%5D%2C%5B%7Bkey%3A'createProperties'%2C%2F**%0A%20%20%20%20%20%20%20%20%20*%20Creates%20property%20accessors%20for%20the%20given%20property%20names.%0A%20%20%20%20%20%20%20%20%20*%20%40param%20%7B!Object%7D%20props%20Object%20whose%20keys%20are%20names%20of%20accessors.%0A%20%20%20%20%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20%20%20%20%20*%20%40protected%0A%20%20%20%20%20%20%20%20%20*%2Fvalue%3Afunction%20createProperties(props)%7Bvar%20proto%3Dthis.prototype%3Bfor(var%20prop%20in%20props)%7B%2F%2F%20don't%20stomp%20an%20existing%20accessor%0Aif(!(prop%20in%20proto))%7Bproto._createPropertyAccessor(prop)%3B%7D%7D%7D%2F**%0A%20%20%20%20%20%20%20%20%20*%20Returns%20an%20attribute%20name%20that%20corresponds%20to%20the%20given%20property.%0A%20%20%20%20%20%20%20%20%20*%20The%20attribute%20name%20is%20the%20lowercased%20property%20name.%20Override%20to%0A%20%20%20%20%20%20%20%20%20*%20customize%20this%20mapping.%0A%20%20%20%20%20%20%20%20%20*%20%40param%20%7Bstring%7D%20property%20Property%20to%20convert%0A%20%20%20%20%20%20%20%20%20*%20%40return%20%7Bstring%7D%20Attribute%20name%20corresponding%20to%20the%20given%20property.%0A%20%20%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20%20%20*%20%40protected%0A%20%20%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'attributeNameForProperty'%2Cvalue%3Afunction%20attributeNameForProperty(property)%7Breturn%20property.toLowerCase()%3B%7D%2F**%0A%20%20%20%20%20%20%20%20%20*%20Override%20point%20to%20provide%20a%20type%20to%20which%20to%20deserialize%20a%20value%20to%0A%20%20%20%20%20%20%20%20%20*%20a%20given%20property.%0A%20%20%20%20%20%20%20%20%20*%20%40param%20%7Bstring%7D%20name%20Name%20of%20property%0A%20%20%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20%20%20*%20%40protected%0A%20%20%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'typeForProperty'%2Cvalue%3Afunction%20typeForProperty(name)%7B%7D%7D%5D)%3Bfunction%20PropertiesChanged()%7B_classCallCheck(this%2CPropertiesChanged)%3Bvar%20_this%3D_possibleConstructorReturn(this%2C(PropertiesChanged.__proto__%7C%7CObject.getPrototypeOf(PropertiesChanged)).call(this))%3B_this.__dataEnabled%3Dfalse%3B_this.__dataReady%3Dfalse%3B_this.__dataInvalid%3Dfalse%3B_this.__data%3D%7B%7D%3B_this.__dataPending%3Dnull%3B_this.__dataOld%3Dnull%3B_this.__dataInstanceProps%3Dnull%3B_this.__serializing%3Dfalse%3B_this._initializeProperties()%3Breturn%20_this%3B%7D%2F**%0A%20%20%20%20%20%20%20%20%20*%20Lifecycle%20callback%20called%20when%20properties%20are%20enabled%20via%0A%20%20%20%20%20%20%20%20%20*%20%60_enableProperties%60.%0A%20%20%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20%20%20*%20Users%20may%20override%20this%20function%20to%20implement%20behavior%20that%20is%0A%20%20%20%20%20%20%20%20%20*%20dependent%20on%20the%20element%20having%20its%20property%20data%20initialized%2C%20e.g.%0A%20%20%20%20%20%20%20%20%20*%20from%20defaults%20(initialized%20from%20%60constructor%60%2C%20%60_initializeProperties%60)%2C%0A%20%20%20%20%20%20%20%20%20*%20%60attributeChangedCallback%60%2C%20or%20values%20propagated%20from%20host%20e.g.%20via%0A%20%20%20%20%20%20%20%20%20*%20bindings.%20%20%60super.ready()%60%20must%20be%20called%20to%20ensure%20the%20data%20system%0A%20%20%20%20%20%20%20%20%20*%20becomes%20enabled.%0A%20%20%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20%20%20%20%20*%20%40public%0A%20%20%20%20%20%20%20%20%20*%2F_createClass(PropertiesChanged%2C%5B%7Bkey%3A'ready'%2Cvalue%3Afunction%20ready()%7Bthis.__dataReady%3Dtrue%3Bthis._flushProperties()%3B%7D%2F**%0A%20%20%20%20%20%20%20%20%20*%20Initializes%20the%20local%20storage%20for%20property%20accessors.%0A%20%20%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20%20%20*%20Provided%20as%20an%20override%20point%20for%20performing%20any%20setup%20work%20prior%0A%20%20%20%20%20%20%20%20%20*%20to%20initializing%20the%20property%20accessor%20system.%0A%20%20%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20%20%20%20%20*%20%40protected%0A%20%20%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'_initializeProperties'%2Cvalue%3Afunction%20_initializeProperties()%7B%2F%2F%20Capture%20instance%20properties%3B%20these%20will%20be%20set%20into%20accessors%0A%2F%2F%20during%20first%20flush.%20Don't%20set%20them%20here%2C%20since%20we%20want%0A%2F%2F%20these%20to%20overwrite%20defaults%2Fconstructor%20assignments%0Afor(var%20p%20in%20this.__dataHasAccessor)%7Bif(this.hasOwnProperty(p))%7Bthis.__dataInstanceProps%3Dthis.__dataInstanceProps%7C%7C%7B%7D%3Bthis.__dataInstanceProps%5Bp%5D%3Dthis%5Bp%5D%3Bdelete%20this%5Bp%5D%3B%7D%7D%7D%2F**%0A%20%20%20%20%20%20%20%20%20*%20Called%20at%20ready%20time%20with%20bag%20of%20instance%20properties%20that%20overwrote%0A%20%20%20%20%20%20%20%20%20*%20accessors%20when%20the%20element%20upgraded.%0A%20%20%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20%20%20*%20The%20default%20implementation%20sets%20these%20properties%20back%20into%20the%0A%20%20%20%20%20%20%20%20%20*%20setter%20at%20ready%20time.%20%20This%20method%20is%20provided%20as%20an%20override%0A%20%20%20%20%20%20%20%20%20*%20point%20for%20customizing%20or%20providing%20more%20efficient%20initialization.%0A%20%20%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20%20%20*%20%40param%20%7BObject%7D%20props%20Bag%20of%20property%20values%20that%20were%20overwritten%0A%20%20%20%20%20%20%20%20%20*%20%20%20when%20creating%20property%20accessors.%0A%20%20%20%20%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20%20%20%20%20*%20%40protected%0A%20%20%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'_initializeInstanceProperties'%2Cvalue%3Afunction%20_initializeInstanceProperties(props)%7BObject.assign(this%2Cprops)%3B%7D%2F**%0A%20%20%20%20%20%20%20%20%20*%20Updates%20the%20local%20storage%20for%20a%20property%20(via%20%60_setPendingProperty%60)%0A%20%20%20%20%20%20%20%20%20*%20and%20enqueues%20a%20%60_proeprtiesChanged%60%20callback.%0A%20%20%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20%20%20*%20%40param%20%7Bstring%7D%20property%20Name%20of%20the%20property%0A%20%20%20%20%20%20%20%20%20*%20%40param%20%7B*%7D%20value%20Value%20to%20set%0A%20%20%20%20%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20%20%20%20%20*%20%40protected%0A%20%20%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'_setProperty'%2Cvalue%3Afunction%20_setProperty(property%2Cvalue)%7Bif(this._setPendingProperty(property%2Cvalue))%7Bthis._invalidateProperties()%3B%7D%7D%2F**%0A%20%20%20%20%20%20%20%20%20*%20Returns%20the%20value%20for%20the%20given%20property.%0A%20%20%20%20%20%20%20%20%20*%20%40param%20%7Bstring%7D%20property%20Name%20of%20property%0A%20%20%20%20%20%20%20%20%20*%20%40return%20%7B*%7D%20Value%20for%20the%20given%20property%0A%20%20%20%20%20%20%20%20%20*%20%40protected%0A%20%20%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'_getProperty'%2Cvalue%3Afunction%20_getProperty(property)%7Breturn%20this.__data%5Bproperty%5D%3B%7D%2F*%20eslint-disable%20no-unused-vars%20*%2F%2F**%0A%20%20%20%20%20%20%20%20%20*%20Updates%20the%20local%20storage%20for%20a%20property%2C%20records%20the%20previous%20value%2C%0A%20%20%20%20%20%20%20%20%20*%20and%20adds%20it%20to%20the%20set%20of%20%22pending%20changes%22%20that%20will%20be%20passed%20to%20the%0A%20%20%20%20%20%20%20%20%20*%20%60_propertiesChanged%60%20callback.%20%20This%20method%20does%20not%20enqueue%20the%0A%20%20%20%20%20%20%20%20%20*%20%60_propertiesChanged%60%20callback.%0A%20%20%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20%20%20*%20%40param%20%7Bstring%7D%20property%20Name%20of%20the%20property%0A%20%20%20%20%20%20%20%20%20*%20%40param%20%7B*%7D%20value%20Value%20to%20set%0A%20%20%20%20%20%20%20%20%20*%20%40param%20%7Bboolean%3D%7D%20ext%20Not%20used%20here%3B%20affordance%20for%20closure%0A%20%20%20%20%20%20%20%20%20*%20%40return%20%7Bboolean%7D%20Returns%20true%20if%20the%20property%20changed%0A%20%20%20%20%20%20%20%20%20*%20%40protected%0A%20%20%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'_setPendingProperty'%2Cvalue%3Afunction%20_setPendingProperty(property%2Cvalue%2Cext)%7Bvar%20old%3Dthis.__data%5Bproperty%5D%3Bvar%20changed%3Dthis._shouldPropertyChange(property%2Cvalue%2Cold)%3Bif(changed)%7Bif(!this.__dataPending)%7Bthis.__dataPending%3D%7B%7D%3Bthis.__dataOld%3D%7B%7D%3B%7D%2F%2F%20Ensure%20old%20is%20captured%20from%20the%20last%20turn%0Aif(this.__dataOld%26%26!(property%20in%20this.__dataOld))%7Bthis.__dataOld%5Bproperty%5D%3Dold%3B%7Dthis.__data%5Bproperty%5D%3Dvalue%3Bthis.__dataPending%5Bproperty%5D%3Dvalue%3B%7Dreturn%20changed%3B%7D%2F*%20eslint-enable%20*%2F%2F**%0A%20%20%20%20%20%20%20%20%20*%20Marks%20the%20properties%20as%20invalid%2C%20and%20enqueues%20an%20async%0A%20%20%20%20%20%20%20%20%20*%20%60_propertiesChanged%60%20callback.%0A%20%20%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20%20%20%20%20*%20%40protected%0A%20%20%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'_invalidateProperties'%2Cvalue%3Afunction%20_invalidateProperties()%7Bvar%20_this2%3Dthis%3Bif(!this.__dataInvalid%26%26this.__dataReady)%7Bthis.__dataInvalid%3Dtrue%3Bmicrotask.run(function()%7Bif(_this2.__dataInvalid)%7B_this2.__dataInvalid%3Dfalse%3B_this2._flushProperties()%3B%7D%7D)%3B%7D%7D%2F**%0A%20%20%20%20%20%20%20%20%20*%20Call%20to%20enable%20property%20accessor%20processing.%20Before%20this%20method%20is%0A%20%20%20%20%20%20%20%20%20*%20called%20accessor%20values%20will%20be%20set%20but%20side%20effects%20are%0A%20%20%20%20%20%20%20%20%20*%20queued.%20When%20called%2C%20any%20pending%20side%20effects%20occur%20immediately.%0A%20%20%20%20%20%20%20%20%20*%20For%20elements%2C%20generally%20%60connectedCallback%60%20is%20a%20normal%20spot%20to%20do%20so.%0A%20%20%20%20%20%20%20%20%20*%20It%20is%20safe%20to%20call%20this%20method%20multiple%20times%20as%20it%20only%20turns%20on%0A%20%20%20%20%20%20%20%20%20*%20property%20accessors%20once.%0A%20%20%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20%20%20%20%20*%20%40protected%0A%20%20%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'_enableProperties'%2Cvalue%3Afunction%20_enableProperties()%7Bif(!this.__dataEnabled)%7Bthis.__dataEnabled%3Dtrue%3Bif(this.__dataInstanceProps)%7Bthis._initializeInstanceProperties(this.__dataInstanceProps)%3Bthis.__dataInstanceProps%3Dnull%3B%7Dthis.ready()%3B%7D%7D%2F**%0A%20%20%20%20%20%20%20%20%20*%20Calls%20the%20%60_propertiesChanged%60%20callback%20with%20the%20current%20set%20of%0A%20%20%20%20%20%20%20%20%20*%20pending%20changes%20(and%20old%20values%20recorded%20when%20pending%20changes%20were%0A%20%20%20%20%20%20%20%20%20*%20set)%2C%20and%20resets%20the%20pending%20set%20of%20changes.%20Generally%2C%20this%20method%0A%20%20%20%20%20%20%20%20%20*%20should%20not%20be%20called%20in%20user%20code.%0A%20%20%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20%20%20%20%20*%20%40protected%0A%20%20%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'_flushProperties'%2Cvalue%3Afunction%20_flushProperties()%7Bvar%20props%3Dthis.__data%3Bvar%20changedProps%3Dthis.__dataPending%3Bvar%20old%3Dthis.__dataOld%3Bif(this._shouldPropertiesChange(props%2CchangedProps%2Cold))%7Bthis.__dataPending%3Dnull%3Bthis.__dataOld%3Dnull%3Bthis._propertiesChanged(props%2CchangedProps%2Cold)%3B%7D%7D%2F**%0A%20%20%20%20%20%20%20%20%20*%20Called%20in%20%60_flushProperties%60%20to%20determine%20if%20%60_propertiesChanged%60%0A%20%20%20%20%20%20%20%20%20*%20should%20be%20called.%20The%20default%20implementation%20returns%20true%20if%0A%20%20%20%20%20%20%20%20%20*%20properties%20are%20pending.%20Override%20to%20customize%20when%0A%20%20%20%20%20%20%20%20%20*%20%60_propertiesChanged%60%20is%20called.%0A%20%20%20%20%20%20%20%20%20*%20%40param%20%7B!Object%7D%20currentProps%20Bag%20of%20all%20current%20accessor%20values%0A%20%20%20%20%20%20%20%20%20*%20%40param%20%7B!Object%7D%20changedProps%20Bag%20of%20properties%20changed%20since%20the%20last%0A%20%20%20%20%20%20%20%20%20*%20%20%20call%20to%20%60_propertiesChanged%60%0A%20%20%20%20%20%20%20%20%20*%20%40param%20%7B!Object%7D%20oldProps%20Bag%20of%20previous%20values%20for%20each%20property%0A%20%20%20%20%20%20%20%20%20*%20%20%20in%20%60changedProps%60%0A%20%20%20%20%20%20%20%20%20*%20%40return%20%7Bboolean%7D%20true%20if%20changedProps%20is%20truthy%0A%20%20%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'_shouldPropertiesChange'%2Cvalue%3Afunction%20_shouldPropertiesChange(currentProps%2CchangedProps%2ColdProps)%7B%2F%2F%20eslint-disable-line%20no-unused-vars%0Areturn%20Boolean(changedProps)%3B%7D%2F**%0A%20%20%20%20%20%20%20%20%20*%20Callback%20called%20when%20any%20properties%20with%20accessors%20created%20via%0A%20%20%20%20%20%20%20%20%20*%20%60_createPropertyAccessor%60%20have%20been%20set.%0A%20%20%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20%20%20*%20%40param%20%7B!Object%7D%20currentProps%20Bag%20of%20all%20current%20accessor%20values%0A%20%20%20%20%20%20%20%20%20*%20%40param%20%7B!Object%7D%20changedProps%20Bag%20of%20properties%20changed%20since%20the%20last%0A%20%20%20%20%20%20%20%20%20*%20%20%20call%20to%20%60_propertiesChanged%60%0A%20%20%20%20%20%20%20%20%20*%20%40param%20%7B!Object%7D%20oldProps%20Bag%20of%20previous%20values%20for%20each%20property%0A%20%20%20%20%20%20%20%20%20*%20%20%20in%20%60changedProps%60%0A%20%20%20%20%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20%20%20%20%20*%20%40protected%0A%20%20%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'_propertiesChanged'%2Cvalue%3Afunction%20_propertiesChanged(currentProps%2CchangedProps%2ColdProps)%7B%7D%2F%2F%20eslint-disable-line%20no-unused-vars%0A%2F**%0A%20%20%20%20%20%20%20%20%20*%20Method%20called%20to%20determine%20whether%20a%20property%20value%20should%20be%0A%20%20%20%20%20%20%20%20%20*%20considered%20as%20a%20change%20and%20cause%20the%20%60_propertiesChanged%60%20callback%0A%20%20%20%20%20%20%20%20%20*%20to%20be%20enqueued.%0A%20%20%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20%20%20*%20The%20default%20implementation%20returns%20%60true%60%20if%20a%20strict%20equality%0A%20%20%20%20%20%20%20%20%20*%20check%20fails.%20The%20method%20always%20returns%20false%20for%20%60NaN%60.%0A%20%20%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20%20%20*%20Override%20this%20method%20to%20e.g.%20provide%20stricter%20checking%20for%0A%20%20%20%20%20%20%20%20%20*%20Objects%2FArrays%20when%20using%20immutable%20patterns.%0A%20%20%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20%20%20*%20%40param%20%7Bstring%7D%20property%20Property%20name%0A%20%20%20%20%20%20%20%20%20*%20%40param%20%7B*%7D%20value%20New%20property%20value%0A%20%20%20%20%20%20%20%20%20*%20%40param%20%7B*%7D%20old%20Previous%20property%20value%0A%20%20%20%20%20%20%20%20%20*%20%40return%20%7Bboolean%7D%20Whether%20the%20property%20should%20be%20considered%20a%20change%0A%20%20%20%20%20%20%20%20%20*%20%20%20and%20enqueue%20a%20%60_proeprtiesChanged%60%20callback%0A%20%20%20%20%20%20%20%20%20*%20%40protected%0A%20%20%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'_shouldPropertyChange'%2Cvalue%3Afunction%20_shouldPropertyChange(property%2Cvalue%2Cold)%7Breturn(%2F%2F%20Strict%20equality%20check%0Aold!%3D%3Dvalue%26%26(%2F%2F%20This%20ensures%20(old%3D%3DNaN%2C%20value%3D%3DNaN)%20always%20returns%20false%0Aold%3D%3D%3Dold%7C%7Cvalue%3D%3D%3Dvalue))%3B%7D%2F**%0A%20%20%20%20%20%20%20%20%20*%20Implements%20native%20Custom%20Elements%20%60attributeChangedCallback%60%20to%0A%20%20%20%20%20%20%20%20%20*%20set%20an%20attribute%20value%20to%20a%20property%20via%20%60_attributeToProperty%60.%0A%20%20%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20%20%20*%20%40param%20%7Bstring%7D%20name%20Name%20of%20attribute%20that%20changed%0A%20%20%20%20%20%20%20%20%20*%20%40param%20%7B%3Fstring%7D%20old%20Old%20attribute%20value%0A%20%20%20%20%20%20%20%20%20*%20%40param%20%7B%3Fstring%7D%20value%20New%20attribute%20value%0A%20%20%20%20%20%20%20%20%20*%20%40param%20%7B%3Fstring%7D%20namespace%20Attribute%20namespace.%0A%20%20%20%20%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20%20%20%20%20*%20%40suppress%20%7BmissingProperties%7D%20Super%20may%20or%20may%20not%20implement%20the%20callback%0A%20%20%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'attributeChangedCallback'%2Cvalue%3Afunction%20attributeChangedCallback(name%2Cold%2Cvalue%2Cnamespace)%7Bif(old!%3D%3Dvalue)%7Bthis._attributeToProperty(name%2Cvalue)%3B%7Dif(_get(PropertiesChanged.prototype.__proto__%7C%7CObject.getPrototypeOf(PropertiesChanged.prototype)%2C'attributeChangedCallback'%2Cthis))%7B_get(PropertiesChanged.prototype.__proto__%7C%7CObject.getPrototypeOf(PropertiesChanged.prototype)%2C'attributeChangedCallback'%2Cthis).call(this%2Cname%2Cold%2Cvalue%2Cnamespace)%3B%7D%7D%2F**%0A%20%20%20%20%20%20%20%20%20*%20Deserializes%20an%20attribute%20to%20its%20associated%20property.%0A%20%20%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20%20%20*%20This%20method%20calls%20the%20%60_deserializeValue%60%20method%20to%20convert%20the%20string%20to%0A%20%20%20%20%20%20%20%20%20*%20a%20typed%20value.%0A%20%20%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20%20%20*%20%40param%20%7Bstring%7D%20attribute%20Name%20of%20attribute%20to%20deserialize.%0A%20%20%20%20%20%20%20%20%20*%20%40param%20%7B%3Fstring%7D%20value%20of%20the%20attribute.%0A%20%20%20%20%20%20%20%20%20*%20%40param%20%7B*%3D%7D%20type%20type%20to%20deserialize%20to%2C%20defaults%20to%20the%20value%0A%20%20%20%20%20%20%20%20%20*%20returned%20from%20%60typeForProperty%60%0A%20%20%20%20%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'_attributeToProperty'%2Cvalue%3Afunction%20_attributeToProperty(attribute%2Cvalue%2Ctype)%7Bif(!this.__serializing)%7Bvar%20map%3Dthis.__dataAttributes%3Bvar%20property%3Dmap%26%26map%5Battribute%5D%7C%7Cattribute%3Bthis%5Bproperty%5D%3Dthis._deserializeValue(value%2Ctype%7C%7Cthis.constructor.typeForProperty(property))%3B%7D%7D%2F**%0A%20%20%20%20%20%20%20%20%20*%20Serializes%20a%20property%20to%20its%20associated%20attribute.%0A%20%20%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20%20%20*%20%40suppress%20%7BinvalidCasts%7D%20Closure%20can't%20figure%20out%20%60this%60%20is%20an%20element.%0A%20%20%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20%20%20*%20%40param%20%7Bstring%7D%20property%20Property%20name%20to%20reflect.%0A%20%20%20%20%20%20%20%20%20*%20%40param%20%7Bstring%3D%7D%20attribute%20Attribute%20name%20to%20reflect%20to.%0A%20%20%20%20%20%20%20%20%20*%20%40param%20%7B*%3D%7D%20value%20Property%20value%20to%20refect.%0A%20%20%20%20%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'_propertyToAttribute'%2Cvalue%3Afunction%20_propertyToAttribute(property%2Cattribute%2Cvalue)%7Bthis.__serializing%3Dtrue%3Bvalue%3Darguments.length%3C3%3Fthis%5Bproperty%5D%3Avalue%3Bthis._valueToNodeAttribute(%2F**%20%40type%20%7B!HTMLElement%7D%20*%2Fthis%2Cvalue%2Cattribute%7C%7Cthis.constructor.attributeNameForProperty(property))%3Bthis.__serializing%3Dfalse%3B%7D%2F**%0A%20%20%20%20%20%20%20%20%20*%20Sets%20a%20typed%20value%20to%20an%20HTML%20attribute%20on%20a%20node.%0A%20%20%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20%20%20*%20This%20method%20calls%20the%20%60_serializeValue%60%20method%20to%20convert%20the%20typed%0A%20%20%20%20%20%20%20%20%20*%20value%20to%20a%20string.%20%20If%20the%20%60_serializeValue%60%20method%20returns%20%60undefined%60%2C%0A%20%20%20%20%20%20%20%20%20*%20the%20attribute%20will%20be%20removed%20(this%20is%20the%20default%20for%20boolean%0A%20%20%20%20%20%20%20%20%20*%20type%20%60false%60).%0A%20%20%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20%20%20*%20%40param%20%7BElement%7D%20node%20Element%20to%20set%20attribute%20to.%0A%20%20%20%20%20%20%20%20%20*%20%40param%20%7B*%7D%20value%20Value%20to%20serialize.%0A%20%20%20%20%20%20%20%20%20*%20%40param%20%7Bstring%7D%20attribute%20Attribute%20name%20to%20serialize%20to.%0A%20%20%20%20%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'_valueToNodeAttribute'%2Cvalue%3Afunction%20_valueToNodeAttribute(node%2Cvalue%2Cattribute)%7Bvar%20str%3Dthis._serializeValue(value)%3Bif(str%3D%3D%3Dundefined)%7Bnode.removeAttribute(attribute)%3B%7Delse%7Bnode.setAttribute(attribute%2Cstr)%3B%7D%7D%2F**%0A%20%20%20%20%20%20%20%20%20*%20Converts%20a%20typed%20JavaScript%20value%20to%20a%20string.%0A%20%20%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20%20%20*%20This%20method%20is%20called%20when%20setting%20JS%20property%20values%20to%0A%20%20%20%20%20%20%20%20%20*%20HTML%20attributes.%20%20Users%20may%20override%20this%20method%20to%20provide%0A%20%20%20%20%20%20%20%20%20*%20serialization%20for%20custom%20types.%0A%20%20%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20%20%20*%20%40param%20%7B*%7D%20value%20Property%20value%20to%20serialize.%0A%20%20%20%20%20%20%20%20%20*%20%40return%20%7Bstring%20%7C%20undefined%7D%20String%20serialized%20from%20the%20provided%0A%20%20%20%20%20%20%20%20%20*%20property%20%20value.%0A%20%20%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'_serializeValue'%2Cvalue%3Afunction%20_serializeValue(value)%7Bswitch(typeof%20value%3D%3D%3D'undefined'%3F'undefined'%3A_typeof(value))%7Bcase'boolean'%3Areturn%20value%3F''%3Aundefined%3Bdefault%3Areturn%20value!%3Dnull%3Fvalue.toString()%3Aundefined%3B%7D%7D%2F**%0A%20%20%20%20%20%20%20%20%20*%20Converts%20a%20string%20to%20a%20typed%20JavaScript%20value.%0A%20%20%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20%20%20*%20This%20method%20is%20called%20when%20reading%20HTML%20attribute%20values%20to%0A%20%20%20%20%20%20%20%20%20*%20JS%20properties.%20%20Users%20may%20override%20this%20method%20to%20provide%0A%20%20%20%20%20%20%20%20%20*%20deserialization%20for%20custom%20%60type%60s.%20Types%20for%20%60Boolean%60%2C%20%60String%60%2C%0A%20%20%20%20%20%20%20%20%20*%20and%20%60Number%60%20convert%20attributes%20to%20the%20expected%20types.%0A%20%20%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20%20%20*%20%40param%20%7B%3Fstring%7D%20value%20Value%20to%20deserialize.%0A%20%20%20%20%20%20%20%20%20*%20%40param%20%7B*%3D%7D%20type%20Type%20to%20deserialize%20the%20string%20to.%0A%20%20%20%20%20%20%20%20%20*%20%40return%20%7B*%7D%20Typed%20value%20deserialized%20from%20the%20provided%20string.%0A%20%20%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'_deserializeValue'%2Cvalue%3Afunction%20_deserializeValue(value%2Ctype)%7Bswitch(type)%7Bcase%20Boolean%3Areturn%20value!%3D%3Dnull%3Bcase%20Number%3Areturn%20Number(value)%3Bdefault%3Areturn%20value%3B%7D%7D%7D%5D)%3Breturn%20PropertiesChanged%3B%7D(superClass)%3Breturn%20PropertiesChanged%3B%7D)%3B%7D)()%3B%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Fcpt-static.gannettdigital.com%2Funiversal-web-client%2Fmaster%2Flatest%2Fvendor%2Fcomponents%2Fpolymer%2Flib%2Fmixins%2Fproperties-changed.html.js%0A | 20 kB | 2023-03-07 | 2024-01-25 | |
Pretty
Loading... | ||||
http:text/javascript;charset=utf-8,var%20_createClass%3Dfunction()%7Bfunction%20defineProperties(target%2Cprops)%7Bfor(var%20i%3D0%3Bi%3Cprops.length%3Bi%2B%2B)%7Bvar%20descriptor%3Dprops%5Bi%5D%3Bdescriptor.enumerable%3Ddescriptor.enumerable%7C%7Cfalse%3Bdescriptor.configurable%3Dtrue%3Bif(%22value%22in%20descriptor)descriptor.writable%3Dtrue%3BObject.defineProperty(target%2Cdescriptor.key%2Cdescriptor)%3B%7D%7Dreturn%20function(Constructor%2CprotoProps%2CstaticProps)%7Bif(protoProps)defineProperties(Constructor.prototype%2CprotoProps)%3Bif(staticProps)defineProperties(Constructor%2CstaticProps)%3Breturn%20Constructor%3B%7D%3B%7D()%3Bvar%20_get%3Dfunction%20get(object%2Cproperty%2Creceiver)%7Bif(object%3D%3D%3Dnull)object%3DFunction.prototype%3Bvar%20desc%3DObject.getOwnPropertyDescriptor(object%2Cproperty)%3Bif(desc%3D%3D%3Dundefined)%7Bvar%20parent%3DObject.getPrototypeOf(object)%3Bif(parent%3D%3D%3Dnull)%7Breturn%20undefined%3B%7Delse%7Breturn%20get(parent%2Cproperty%2Creceiver)%3B%7D%7Delse%20if(%22value%22in%20desc)%7Breturn%20desc.value%3B%7Delse%7Bvar%20getter%3Ddesc.get%3Bif(getter%3D%3D%3Dundefined)%7Breturn%20undefined%3B%7Dreturn%20getter.call(receiver)%3B%7D%7D%3Bfunction%20_classCallCheck(instance%2CConstructor)%7Bif(!(instance%20instanceof%20Constructor))%7Bthrow%20new%20TypeError(%22Cannot%20call%20a%20class%20as%20a%20function%22)%3B%7D%7Dfunction%20_possibleConstructorReturn(self%2Ccall)%7Bif(!self)%7Bthrow%20new%20ReferenceError(%22this%20hasn't%20been%20initialised%20-%20super()%20hasn't%20been%20called%22)%3B%7Dreturn%20call%26%26(typeof%20call%3D%3D%3D%22object%22%7C%7Ctypeof%20call%3D%3D%3D%22function%22)%3Fcall%3Aself%3B%7Dfunction%20_inherits(subClass%2CsuperClass)%7Bif(typeof%20superClass!%3D%3D%22function%22%26%26superClass!%3D%3Dnull)%7Bthrow%20new%20TypeError(%22Super%20expression%20must%20either%20be%20null%20or%20a%20function%2C%20not%20%22%2Btypeof%20superClass)%3B%7DsubClass.prototype%3DObject.create(superClass%26%26superClass.prototype%2C%7Bconstructor%3A%7Bvalue%3AsubClass%2Cenumerable%3Afalse%2Cwritable%3Atrue%2Cconfigurable%3Atrue%7D%7D)%3Bif(superClass)Object.setPrototypeOf%3FObject.setPrototypeOf(subClass%2CsuperClass)%3AsubClass.__proto__%3DsuperClass%3B%7D(function()%7B'use%20strict'%3Bvar%20HOST_DIR%3D%2F%3Ahost%5C(%3Adir%5C((ltr%7Crtl)%5C)%5C)%2Fg%3Bvar%20HOST_DIR_REPLACMENT%3D'%3Ahost(%5Bdir%3D%22%241%22%5D)'%3Bvar%20EL_DIR%3D%2F(%5B%5Cs%5Cw-%23%5C.%5C%5B%5C%5D%5C*%5D*)%3Adir%5C((ltr%7Crtl)%5C)%2Fg%3Bvar%20EL_DIR_REPLACMENT%3D'%3Ahost(%5Bdir%3D%22%242%22%5D)%20%241'%3Bvar%20DIR_CHECK%3D%2F%3Adir%5C((%3F%3Altr%7Crtl)%5C)%2F%3Bvar%20SHIM_SHADOW%3DBoolean(window%5B'ShadyDOM'%5D%26%26window%5B'ShadyDOM'%5D%5B'inUse'%5D)%3B%2F**%0A%20%20%20%20%20*%20%40type%20%7B!Array%3C!Polymer_DirMixin%3E%7D%0A%20%20%20%20%20*%2Fvar%20DIR_INSTANCES%3D%5B%5D%3B%2F**%20%40type%20%7BMutationObserver%7D%20*%2Fvar%20observer%3Dnull%3Bvar%20DOCUMENT_DIR%3D''%3Bfunction%20getRTL()%7BDOCUMENT_DIR%3Ddocument.documentElement.getAttribute('dir')%3B%7D%2F**%0A%20%20%20%20%20*%20%40param%20%7B!Polymer_DirMixin%7D%20instance%20Instance%20to%20set%20RTL%20status%20on%0A%20%20%20%20%20*%2Ffunction%20setRTL(instance)%7Bif(!instance.__autoDirOptOut)%7Bvar%20el%3D%2F**%20%40type%20%7B!HTMLElement%7D%20*%2Finstance%3Bel.setAttribute('dir'%2CDOCUMENT_DIR)%3B%7D%7Dfunction%20updateDirection()%7BgetRTL()%3BDOCUMENT_DIR%3Ddocument.documentElement.getAttribute('dir')%3Bfor(var%20i%3D0%3Bi%3CDIR_INSTANCES.length%3Bi%2B%2B)%7BsetRTL(DIR_INSTANCES%5Bi%5D)%3B%7D%7Dfunction%20takeRecords()%7Bif(observer%26%26observer.takeRecords().length)%7BupdateDirection()%3B%7D%7D%2F**%0A%20%20%20%20%20*%20Element%20class%20mixin%20that%20allows%20elements%20to%20use%20the%20%60%3Adir%60%20CSS%20Selector%20to%20have%0A%20%20%20%20%20*%20text%20direction%20specific%20styling.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20With%20this%20mixin%2C%20any%20stylesheet%20provided%20in%20the%20template%20will%20transform%20%60%3Adir%60%20into%0A%20%20%20%20%20*%20%60%3Ahost(%5Bdir%5D)%60%20and%20sync%20direction%20with%20the%20page%20via%20the%20element's%20%60dir%60%20attribute.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20Elements%20can%20opt%20out%20of%20the%20global%20page%20text%20direction%20by%20setting%20the%20%60dir%60%20attribute%0A%20%20%20%20%20*%20directly%20in%20%60ready()%60%20or%20in%20HTML.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20Caveats%3A%0A%20%20%20%20%20*%20-%20Applications%20must%20set%20%60%3Chtml%20dir%3D%22ltr%22%3E%60%20or%20%60%3Chtml%20dir%3D%22rtl%22%3E%60%20to%20sync%20direction%0A%20%20%20%20%20*%20-%20Automatic%20left-to-right%20or%20right-to-left%20styling%20is%20sync'd%20with%20the%20%60%3Chtml%3E%60%20element%20only.%0A%20%20%20%20%20*%20-%20Changing%20%60dir%60%20at%20runtime%20is%20supported.%0A%20%20%20%20%20*%20-%20Opting%20out%20of%20the%20global%20direction%20styling%20is%20permanent%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40mixinFunction%0A%20%20%20%20%20*%20%40polymer%0A%20%20%20%20%20*%20%40appliesMixin%20Polymer.PropertyAccessors%0A%20%20%20%20%20*%20%40memberof%20Polymer%0A%20%20%20%20%20*%2FPolymer.DirMixin%3DPolymer.dedupingMixin(function(base)%7Bif(!SHIM_SHADOW)%7Bif(!observer)%7BgetRTL()%3Bobserver%3Dnew%20MutationObserver(updateDirection)%3Bobserver.observe(document.documentElement%2C%7Battributes%3Atrue%2CattributeFilter%3A%5B'dir'%5D%7D)%3B%7D%7D%2F**%0A%20%20%20%20%20%20%20*%20%40constructor%0A%20%20%20%20%20%20%20*%20%40extends%20%7Bbase%7D%0A%20%20%20%20%20%20%20*%20%40implements%20%7BPolymer_PropertyAccessors%7D%0A%20%20%20%20%20%20%20*%20%40private%0A%20%20%20%20%20%20%20*%2Fvar%20elementBase%3DPolymer.PropertyAccessors(base)%3B%2F**%0A%20%20%20%20%20%20%20*%20%40polymer%0A%20%20%20%20%20%20%20*%20%40mixinClass%0A%20%20%20%20%20%20%20*%20%40implements%20%7BPolymer_DirMixin%7D%0A%20%20%20%20%20%20%20*%2Fvar%20Dir%3Dfunction(_elementBase)%7B_inherits(Dir%2C_elementBase)%3B_createClass(Dir%2Cnull%2C%5B%7Bkey%3A'_processStyleText'%2C%2F**%0A%20%20%20%20%20%20%20%20%20*%20%40override%0A%20%20%20%20%20%20%20%20%20*%20%40suppress%20%7BmissingProperties%7D%20Interfaces%20in%20closure%20do%20not%20inherit%20statics%2C%20but%20classes%20do%0A%20%20%20%20%20%20%20%20%20*%2Fvalue%3Afunction%20_processStyleText(cssText%2CbaseURI)%7BcssText%3D_get(Dir.__proto__%7C%7CObject.getPrototypeOf(Dir)%2C'_processStyleText'%2Cthis).call(this%2CcssText%2CbaseURI)%3Bif(!SHIM_SHADOW%26%26DIR_CHECK.test(cssText))%7BcssText%3Dthis._replaceDirInCssText(cssText)%3Bthis.__activateDir%3Dtrue%3B%7Dreturn%20cssText%3B%7D%2F**%0A%20%20%20%20%20%20%20%20%20*%20Replace%20%60%3Adir%60%20in%20the%20given%20CSS%20text%0A%20%20%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20%20%20*%20%40param%20%7Bstring%7D%20text%20CSS%20text%20to%20replace%20DIR%0A%20%20%20%20%20%20%20%20%20*%20%40return%20%7Bstring%7D%20Modified%20CSS%0A%20%20%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'_replaceDirInCssText'%2Cvalue%3Afunction%20_replaceDirInCssText(text)%7Bvar%20replacedText%3Dtext%3BreplacedText%3DreplacedText.replace(HOST_DIR%2CHOST_DIR_REPLACMENT)%3BreplacedText%3DreplacedText.replace(EL_DIR%2CEL_DIR_REPLACMENT)%3Breturn%20replacedText%3B%7D%7D%5D)%3Bfunction%20Dir()%7B_classCallCheck(this%2CDir)%3B%2F**%20%40type%20%7Bboolean%7D%20*%2Fvar%20_this%3D_possibleConstructorReturn(this%2C(Dir.__proto__%7C%7CObject.getPrototypeOf(Dir)).call(this))%3B_this.__autoDirOptOut%3Dfalse%3Breturn%20_this%3B%7D%2F**%0A%20%20%20%20%20%20%20%20%20*%20%40suppress%20%7BinvalidCasts%7D%20Closure%20doesn't%20understand%20that%20%60this%60%20is%20an%20HTMLElement%0A%20%20%20%20%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20%20%20%20%20*%2F_createClass(Dir%2C%5B%7Bkey%3A'ready'%2Cvalue%3Afunction%20ready()%7B_get(Dir.prototype.__proto__%7C%7CObject.getPrototypeOf(Dir.prototype)%2C'ready'%2Cthis).call(this)%3Bthis.__autoDirOptOut%3D%2F**%20%40type%20%7B!HTMLElement%7D%20*%2Fthis.hasAttribute('dir')%3B%7D%2F**%0A%20%20%20%20%20%20%20%20%20*%20%40suppress%20%7BmissingProperties%7D%20If%20it%20exists%20on%20elementBase%2C%20it%20can%20be%20super'd%0A%20%20%20%20%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'connectedCallback'%2Cvalue%3Afunction%20connectedCallback()%7Bif(elementBase.prototype.connectedCallback)%7B_get(Dir.prototype.__proto__%7C%7CObject.getPrototypeOf(Dir.prototype)%2C'connectedCallback'%2Cthis).call(this)%3B%7Dif(this.constructor.__activateDir)%7BtakeRecords()%3BDIR_INSTANCES.push(this)%3BsetRTL(this)%3B%7D%7D%2F**%0A%20%20%20%20%20%20%20%20%20*%20%40suppress%20%7BmissingProperties%7D%20If%20it%20exists%20on%20elementBase%2C%20it%20can%20be%20super'd%0A%20%20%20%20%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'disconnectedCallback'%2Cvalue%3Afunction%20disconnectedCallback()%7Bif(elementBase.prototype.disconnectedCallback)%7B_get(Dir.prototype.__proto__%7C%7CObject.getPrototypeOf(Dir.prototype)%2C'disconnectedCallback'%2Cthis).call(this)%3B%7Dif(this.constructor.__activateDir)%7Bvar%20idx%3DDIR_INSTANCES.indexOf(this)%3Bif(idx%3E-1)%7BDIR_INSTANCES.splice(idx%2C1)%3B%7D%7D%7D%7D%5D)%3Breturn%20Dir%3B%7D(elementBase)%3BDir.__activateDir%3Dfalse%3Breturn%20Dir%3B%7D)%3B%7D)()%3B%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Fcpt-static.gannettdigital.com%2Funiversal-web-client%2Fmaster%2Flatest%2Fvendor%2Fcomponents%2Fpolymer%2Flib%2Fmixins%2Fdir-mixin.html.js%0A | 6.8 kB | 2023-03-07 | 2024-01-25 | |
Pretty
Loading... | ||||
http:text/javascript;charset=utf-8,(function()%7B'use%20strict'%3B%2F%2F%20run%20a%20callback%20when%20HTMLImports%20are%20ready%20or%20immediately%20if%0A%2F%2F%20this%20api%20is%20not%20available.%0Afunction%20whenImportsReady(cb)%7Bif(window.HTMLImports)%7BHTMLImports.whenReady(cb)%3B%7Delse%7Bcb()%3B%7D%7D%2F**%0A%20%20%20*%20Convenience%20method%20for%20importing%20an%20HTML%20document%20imperatively.%0A%20%20%20*%0A%20%20%20*%20This%20method%20creates%20a%20new%20%60%3Clink%20rel%3D%22import%22%3E%60%20element%20with%0A%20%20%20*%20the%20provided%20URL%20and%20appends%20it%20to%20the%20document%20to%20start%20loading.%0A%20%20%20*%20In%20the%20%60onload%60%20callback%2C%20the%20%60import%60%20property%20of%20the%20%60link%60%0A%20%20%20*%20element%20will%20contain%20the%20imported%20document%20contents.%0A%20%20%20*%0A%20%20%20*%20%40memberof%20Polymer%0A%20%20%20*%20%40param%20%7Bstring%7D%20href%20URL%20to%20document%20to%20load.%0A%20%20%20*%20%40param%20%7B%3Ffunction(!Event)%3Avoid%3D%7D%20onload%20Callback%20to%20notify%20when%20an%20import%20successfully%0A%20%20%20*%20%20%20loaded.%0A%20%20%20*%20%40param%20%7B%3Ffunction(!ErrorEvent)%3Avoid%3D%7D%20onerror%20Callback%20to%20notify%20when%20an%20import%0A%20%20%20*%20%20%20unsuccessfully%20loaded.%0A%20%20%20*%20%40param%20%7Bboolean%3D%7D%20optAsync%20True%20if%20the%20import%20should%20be%20loaded%20%60async%60.%0A%20%20%20*%20%20%20Defaults%20to%20%60false%60.%0A%20%20%20*%20%40return%20%7B!HTMLLinkElement%7D%20The%20link%20element%20for%20the%20URL%20to%20be%20loaded.%0A%20%20%20*%2FPolymer.importHref%3Dfunction(href%2Conload%2Conerror%2CoptAsync)%7Bvar%20link%3D%2F**%20%40type%20%7BHTMLLinkElement%7D%20*%2Fdocument.head.querySelector('link%5Bhref%3D%22'%2Bhref%2B'%22%5D%5Bimport-href%5D')%3Bif(!link)%7Blink%3D%2F**%20%40type%20%7BHTMLLinkElement%7D%20*%2Fdocument.createElement('link')%3Blink.rel%3D'import'%3Blink.href%3Dhref%3Blink.setAttribute('import-href'%2C'')%3B%7D%2F%2F%20always%20ensure%20link%20has%20%60async%60%20attribute%20if%20user%20specified%20one%2C%0A%2F%2F%20even%20if%20it%20was%20previously%20not%20async.%20This%20is%20considered%20less%20confusing.%0Aif(optAsync)%7Blink.setAttribute('async'%2C'')%3B%7D%2F%2F%20NOTE%3A%20the%20link%20may%20now%20be%20in%203%20states%3A%20(1)%20pending%20insertion%2C%0A%2F%2F%20(2)%20inflight%2C%20(3)%20already%20loaded.%20In%20each%20case%2C%20we%20need%20to%20add%0A%2F%2F%20event%20listeners%20to%20process%20callbacks.%0Avar%20cleanup%3Dfunction%20cleanup()%7Blink.removeEventListener('load'%2CloadListener)%3Blink.removeEventListener('error'%2CerrorListener)%3B%7D%3Bvar%20loadListener%3Dfunction%20loadListener(event)%7Bcleanup()%3B%2F%2F%20In%20case%20of%20a%20successful%20load%2C%20cache%20the%20load%20event%20on%20the%20link%20so%0A%2F%2F%20that%20it%20can%20be%20used%20to%20short-circuit%20this%20method%20in%20the%20future%20when%0A%2F%2F%20it%20is%20called%20with%20the%20same%20href%20param.%0Alink.__dynamicImportLoaded%3Dtrue%3Bif(onload)%7BwhenImportsReady(function()%7Bonload(event)%3B%7D)%3B%7D%7D%3Bvar%20errorListener%3Dfunction%20errorListener(event)%7Bcleanup()%3B%2F%2F%20In%20case%20of%20an%20error%2C%20remove%20the%20link%20from%20the%20document%20so%20that%20it%0A%2F%2F%20will%20be%20automatically%20created%20again%20the%20next%20time%20%60importHref%60%20is%0A%2F%2F%20called.%0Aif(link.parentNode)%7Blink.parentNode.removeChild(link)%3B%7Dif(onerror)%7BwhenImportsReady(function()%7Bonerror(event)%3B%7D)%3B%7D%7D%3Blink.addEventListener('load'%2CloadListener)%3Blink.addEventListener('error'%2CerrorListener)%3Bif(link.parentNode%3D%3Dnull)%7Bdocument.head.appendChild(link)%3B%2F%2F%20if%20the%20link%20already%20loaded%2C%20dispatch%20a%20fake%20load%20event%0A%2F%2F%20so%20that%20listeners%20are%20called%20and%20get%20a%20proper%20event%20argument.%0A%7Delse%20if(link.__dynamicImportLoaded)%7Blink.dispatchEvent(new%20Event('load'))%3B%7Dreturn%20link%3B%7D%3B%7D)()%3B%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Fcpt-static.gannettdigital.com%2Funiversal-web-client%2Fmaster%2Flatest%2Fvendor%2Fcomponents%2Fpolymer%2Flib%2Futils%2Fimport-href.html.js%0A | 3.0 kB | 2023-03-07 | 2024-01-25 | |
Pretty
Loading... | ||||
atoms.uticaod.com/atoms-components/prod/dist/gannett-atoms-components/p-ea758920.entry.js | 1.7 kB | 2023-03-08 | 2023-12-29 | |
Pretty
Loading... | ||||
http:text/javascript;charset=utf-8,var%20_createClass%3Dfunction()%7Bfunction%20defineProperties(target%2Cprops)%7Bfor(var%20i%3D0%3Bi%3Cprops.length%3Bi%2B%2B)%7Bvar%20descriptor%3Dprops%5Bi%5D%3Bdescriptor.enumerable%3Ddescriptor.enumerable%7C%7Cfalse%3Bdescriptor.configurable%3Dtrue%3Bif(%22value%22in%20descriptor)descriptor.writable%3Dtrue%3BObject.defineProperty(target%2Cdescriptor.key%2Cdescriptor)%3B%7D%7Dreturn%20function(Constructor%2CprotoProps%2CstaticProps)%7Bif(protoProps)defineProperties(Constructor.prototype%2CprotoProps)%3Bif(staticProps)defineProperties(Constructor%2CstaticProps)%3Breturn%20Constructor%3B%7D%3B%7D()%3Bvar%20_typeof%3Dtypeof%20Symbol%3D%3D%3D%22function%22%26%26typeof%20Symbol.iterator%3D%3D%3D%22symbol%22%3Ffunction(obj)%7Breturn%20typeof%20obj%3B%7D%3Afunction(obj)%7Breturn%20obj%26%26typeof%20Symbol%3D%3D%3D%22function%22%26%26obj.constructor%3D%3D%3DSymbol%26%26obj!%3D%3DSymbol.prototype%3F%22symbol%22%3Atypeof%20obj%3B%7D%3Bfunction%20_classCallCheck(instance%2CConstructor)%7Bif(!(instance%20instanceof%20Constructor))%7Bthrow%20new%20TypeError(%22Cannot%20call%20a%20class%20as%20a%20function%22)%3B%7D%7Dfunction%20_possibleConstructorReturn(self%2Ccall)%7Bif(!self)%7Bthrow%20new%20ReferenceError(%22this%20hasn't%20been%20initialised%20-%20super()%20hasn't%20been%20called%22)%3B%7Dreturn%20call%26%26(typeof%20call%3D%3D%3D%22object%22%7C%7Ctypeof%20call%3D%3D%3D%22function%22)%3Fcall%3Aself%3B%7Dfunction%20_inherits(subClass%2CsuperClass)%7Bif(typeof%20superClass!%3D%3D%22function%22%26%26superClass!%3D%3Dnull)%7Bthrow%20new%20TypeError(%22Super%20expression%20must%20either%20be%20null%20or%20a%20function%2C%20not%20%22%2Btypeof%20superClass)%3B%7DsubClass.prototype%3DObject.create(superClass%26%26superClass.prototype%2C%7Bconstructor%3A%7Bvalue%3AsubClass%2Cenumerable%3Afalse%2Cwritable%3Atrue%2Cconfigurable%3Atrue%7D%7D)%3Bif(superClass)Object.setPrototypeOf%3FObject.setPrototypeOf(subClass%2CsuperClass)%3AsubClass.__proto__%3DsuperClass%3B%7D(function()%7B'use%20strict'%3B%2F%2F%20Common%20implementation%20for%20mixin%20%26%20behavior%0Afunction%20mutablePropertyChange(inst%2Cproperty%2Cvalue%2Cold%2CmutableData)%7Bvar%20isObject%3Dvoid%200%3Bif(mutableData)%7BisObject%3D(typeof%20value%3D%3D%3D'undefined'%3F'undefined'%3A_typeof(value))%3D%3D%3D'object'%26%26value!%3D%3Dnull%3B%2F%2F%20Pull%20%60old%60%20for%20Objects%20from%20temp%20cache%2C%20but%20treat%20%60null%60%20as%20a%20primitive%0Aif(isObject)%7Bold%3Dinst.__dataTemp%5Bproperty%5D%3B%7D%7D%2F%2F%20Strict%20equality%20check%2C%20but%20return%20false%20for%20NaN%3D%3D%3DNaN%0Avar%20shouldChange%3Dold!%3D%3Dvalue%26%26(old%3D%3D%3Dold%7C%7Cvalue%3D%3D%3Dvalue)%3B%2F%2F%20Objects%20are%20stored%20in%20temporary%20cache%20(cleared%20at%20end%20of%0A%2F%2F%20turn)%2C%20which%20is%20used%20for%20dirty-checking%0Aif(isObject%26%26shouldChange)%7Binst.__dataTemp%5Bproperty%5D%3Dvalue%3B%7Dreturn%20shouldChange%3B%7D%2F**%0A%20%20%20*%20Element%20class%20mixin%20to%20skip%20strict%20dirty-checking%20for%20objects%20and%20arrays%0A%20%20%20*%20(always%20consider%20them%20to%20be%20%22dirty%22)%2C%20for%20use%20on%20elements%20utilizing%0A%20%20%20*%20%60Polymer.PropertyEffects%60%0A%20%20%20*%0A%20%20%20*%20By%20default%2C%20%60Polymer.PropertyEffects%60%20performs%20strict%20dirty%20checking%20on%0A%20%20%20*%20objects%2C%20which%20means%20that%20any%20deep%20modifications%20to%20an%20object%20or%20array%20will%0A%20%20%20*%20not%20be%20propagated%20unless%20%22immutable%22%20data%20patterns%20are%20used%20(i.e.%20all%20object%0A%20%20%20*%20references%20from%20the%20root%20to%20the%20mutation%20were%20changed).%0A%20%20%20*%0A%20%20%20*%20Polymer%20also%20provides%20a%20proprietary%20data%20mutation%20and%20path%20notification%20API%0A%20%20%20*%20(e.g.%20%60notifyPath%60%2C%20%60set%60%2C%20and%20array%20mutation%20API's)%20that%20allow%20efficient%0A%20%20%20*%20mutation%20and%20notification%20of%20deep%20changes%20in%20an%20object%20graph%20to%20all%20elements%0A%20%20%20*%20bound%20to%20the%20same%20object%20graph.%0A%20%20%20*%0A%20%20%20*%20In%20cases%20where%20neither%20immutable%20patterns%20nor%20the%20data%20mutation%20API%20can%20be%0A%20%20%20*%20used%2C%20applying%20this%20mixin%20will%20cause%20Polymer%20to%20skip%20dirty%20checking%20for%0A%20%20%20*%20objects%20and%20arrays%20(always%20consider%20them%20to%20be%20%22dirty%22).%20%20This%20allows%20a%0A%20%20%20*%20user%20to%20make%20a%20deep%20modification%20to%20a%20bound%20object%20graph%2C%20and%20then%20either%0A%20%20%20*%20simply%20re-set%20the%20object%20(e.g.%20%60this.items%20%3D%20this.items%60)%20or%20call%20%60notifyPath%60%0A%20%20%20*%20(e.g.%20%60this.notifyPath('items')%60)%20to%20update%20the%20tree.%20%20Note%20that%20all%0A%20%20%20*%20elements%20that%20wish%20to%20be%20updated%20based%20on%20deep%20mutations%20must%20apply%20this%0A%20%20%20*%20mixin%20or%20otherwise%20skip%20strict%20dirty%20checking%20for%20objects%2Farrays.%0A%20%20%20*%20Specifically%2C%20any%20elements%20in%20the%20binding%20tree%20between%20the%20source%20of%20a%0A%20%20%20*%20mutation%20and%20the%20consumption%20of%20it%20must%20apply%20this%20mixin%20or%20enable%20the%0A%20%20%20*%20%60Polymer.OptionalMutableData%60%20mixin.%0A%20%20%20*%0A%20%20%20*%20In%20order%20to%20make%20the%20dirty%20check%20strategy%20configurable%2C%20see%0A%20%20%20*%20%60Polymer.OptionalMutableData%60.%0A%20%20%20*%0A%20%20%20*%20Note%2C%20the%20performance%20characteristics%20of%20propagating%20large%20object%20graphs%0A%20%20%20*%20will%20be%20worse%20as%20opposed%20to%20using%20strict%20dirty%20checking%20with%20immutable%0A%20%20%20*%20patterns%20or%20Polymer's%20path%20notification%20API.%0A%20%20%20*%0A%20%20%20*%20%40mixinFunction%0A%20%20%20*%20%40polymer%0A%20%20%20*%20%40memberof%20Polymer%0A%20%20%20*%20%40summary%20Element%20class%20mixin%20to%20skip%20strict%20dirty-checking%20for%20objects%0A%20%20%20*%20%20%20and%20arrays%0A%20%20%20*%2FPolymer.MutableData%3DPolymer.dedupingMixin(function(superClass)%7B%2F**%0A%20%20%20%20%20*%20%40polymer%0A%20%20%20%20%20*%20%40mixinClass%0A%20%20%20%20%20*%20%40implements%20%7BPolymer_MutableData%7D%0A%20%20%20%20%20*%2Fvar%20MutableData%3Dfunction(_superClass)%7B_inherits(MutableData%2C_superClass)%3Bfunction%20MutableData()%7B_classCallCheck(this%2CMutableData)%3Breturn%20_possibleConstructorReturn(this%2C(MutableData.__proto__%7C%7CObject.getPrototypeOf(MutableData)).apply(this%2Carguments))%3B%7D_createClass(MutableData%2C%5B%7Bkey%3A'_shouldPropertyChange'%2C%2F**%0A%20%20%20%20%20%20%20*%20Overrides%20%60Polymer.PropertyEffects%60%20to%20provide%20option%20for%20skipping%0A%20%20%20%20%20%20%20*%20strict%20equality%20checking%20for%20Objects%20and%20Arrays.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20This%20method%20pulls%20the%20value%20to%20dirty%20check%20against%20from%20the%20%60__dataTemp%60%0A%20%20%20%20%20%20%20*%20cache%20(rather%20than%20the%20normal%20%60__data%60%20cache)%20for%20Objects.%20%20Since%20the%20temp%0A%20%20%20%20%20%20%20*%20cache%20is%20cleared%20at%20the%20end%20of%20a%20turn%2C%20this%20implementation%20allows%0A%20%20%20%20%20%20%20*%20side-effects%20of%20deep%20object%20changes%20to%20be%20processed%20by%20re-setting%20the%0A%20%20%20%20%20%20%20*%20same%20object%20(using%20the%20temp%20cache%20as%20an%20in-turn%20backstop%20to%20prevent%0A%20%20%20%20%20%20%20*%20cycles%20due%20to%202-way%20notification).%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40param%20%7Bstring%7D%20property%20Property%20name%0A%20%20%20%20%20%20%20*%20%40param%20%7B*%7D%20value%20New%20property%20value%0A%20%20%20%20%20%20%20*%20%40param%20%7B*%7D%20old%20Previous%20property%20value%0A%20%20%20%20%20%20%20*%20%40return%20%7Bboolean%7D%20Whether%20the%20property%20should%20be%20considered%20a%20change%0A%20%20%20%20%20%20%20*%20%40protected%0A%20%20%20%20%20%20%20*%2Fvalue%3Afunction%20_shouldPropertyChange(property%2Cvalue%2Cold)%7Breturn%20mutablePropertyChange(this%2Cproperty%2Cvalue%2Cold%2Ctrue)%3B%7D%7D%5D)%3Breturn%20MutableData%3B%7D(superClass)%3Breturn%20MutableData%3B%7D)%3B%2F**%0A%20%20%20*%20Element%20class%20mixin%20to%20add%20the%20optional%20ability%20to%20skip%20strict%0A%20%20%20*%20dirty-checking%20for%20objects%20and%20arrays%20(always%20consider%20them%20to%20be%0A%20%20%20*%20%22dirty%22)%20by%20setting%20a%20%60mutable-data%60%20attribute%20on%20an%20element%20instance.%0A%20%20%20*%0A%20%20%20*%20By%20default%2C%20%60Polymer.PropertyEffects%60%20performs%20strict%20dirty%20checking%20on%0A%20%20%20*%20objects%2C%20which%20means%20that%20any%20deep%20modifications%20to%20an%20object%20or%20array%20will%0A%20%20%20*%20not%20be%20propagated%20unless%20%22immutable%22%20data%20patterns%20are%20used%20(i.e.%20all%20object%0A%20%20%20*%20references%20from%20the%20root%20to%20the%20mutation%20were%20changed).%0A%20%20%20*%0A%20%20%20*%20Polymer%20also%20provides%20a%20proprietary%20data%20mutation%20and%20path%20notification%20API%0A%20%20%20*%20(e.g.%20%60notifyPath%60%2C%20%60set%60%2C%20and%20array%20mutation%20API's)%20that%20allow%20efficient%0A%20%20%20*%20mutation%20and%20notification%20of%20deep%20changes%20in%20an%20object%20graph%20to%20all%20elements%0A%20%20%20*%20bound%20to%20the%20same%20object%20graph.%0A%20%20%20*%0A%20%20%20*%20In%20cases%20where%20neither%20immutable%20patterns%20nor%20the%20data%20mutation%20API%20can%20be%0A%20%20%20*%20used%2C%20applying%20this%20mixin%20will%20allow%20Polymer%20to%20skip%20dirty%20checking%20for%0A%20%20%20*%20objects%20and%20arrays%20(always%20consider%20them%20to%20be%20%22dirty%22).%20%20This%20allows%20a%0A%20%20%20*%20user%20to%20make%20a%20deep%20modification%20to%20a%20bound%20object%20graph%2C%20and%20then%20either%0A%20%20%20*%20simply%20re-set%20the%20object%20(e.g.%20%60this.items%20%3D%20this.items%60)%20or%20call%20%60notifyPath%60%0A%20%20%20*%20(e.g.%20%60this.notifyPath('items')%60)%20to%20update%20the%20tree.%20%20Note%20that%20all%0A%20%20%20*%20elements%20that%20wish%20to%20be%20updated%20based%20on%20deep%20mutations%20must%20apply%20this%0A%20%20%20*%20mixin%20or%20otherwise%20skip%20strict%20dirty%20checking%20for%20objects%2Farrays.%0A%20%20%20*%20Specifically%2C%20any%20elements%20in%20the%20binding%20tree%20between%20the%20source%20of%20a%0A%20%20%20*%20mutation%20and%20the%20consumption%20of%20it%20must%20enable%20this%20mixin%20or%20apply%20the%0A%20%20%20*%20%60Polymer.MutableData%60%20mixin.%0A%20%20%20*%0A%20%20%20*%20While%20this%20mixin%20adds%20the%20ability%20to%20forgo%20Object%2FArray%20dirty%20checking%2C%0A%20%20%20*%20the%20%60mutableData%60%20flag%20defaults%20to%20false%20and%20must%20be%20set%20on%20the%20instance.%0A%20%20%20*%0A%20%20%20*%20Note%2C%20the%20performance%20characteristics%20of%20propagating%20large%20object%20graphs%0A%20%20%20*%20will%20be%20worse%20by%20relying%20on%20%60mutableData%3A%20true%60%20as%20opposed%20to%20using%0A%20%20%20*%20strict%20dirty%20checking%20with%20immutable%20patterns%20or%20Polymer's%20path%20notification%0A%20%20%20*%20API.%0A%20%20%20*%0A%20%20%20*%20%40mixinFunction%0A%20%20%20*%20%40polymer%0A%20%20%20*%20%40memberof%20Polymer%0A%20%20%20*%20%40summary%20Element%20class%20mixin%20to%20optionally%20skip%20strict%20dirty-checking%0A%20%20%20*%20%20%20for%20objects%20and%20arrays%0A%20%20%20*%2FPolymer.OptionalMutableData%3DPolymer.dedupingMixin(function(superClass)%7B%2F**%0A%20%20%20%20%20*%20%40mixinClass%0A%20%20%20%20%20*%20%40polymer%0A%20%20%20%20%20*%20%40implements%20%7BPolymer_OptionalMutableData%7D%0A%20%20%20%20%20*%2Fvar%20OptionalMutableData%3Dfunction(_superClass2)%7B_inherits(OptionalMutableData%2C_superClass2)%3Bfunction%20OptionalMutableData()%7B_classCallCheck(this%2COptionalMutableData)%3Breturn%20_possibleConstructorReturn(this%2C(OptionalMutableData.__proto__%7C%7CObject.getPrototypeOf(OptionalMutableData)).apply(this%2Carguments))%3B%7D_createClass(OptionalMutableData%2C%5B%7Bkey%3A'_shouldPropertyChange'%2C%2F**%0A%20%20%20%20%20%20%20*%20Overrides%20%60Polymer.PropertyEffects%60%20to%20provide%20option%20for%20skipping%0A%20%20%20%20%20%20%20*%20strict%20equality%20checking%20for%20Objects%20and%20Arrays.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20When%20%60this.mutableData%60%20is%20true%20on%20this%20instance%2C%20this%20method%0A%20%20%20%20%20%20%20*%20pulls%20the%20value%20to%20dirty%20check%20against%20from%20the%20%60__dataTemp%60%20cache%0A%20%20%20%20%20%20%20*%20(rather%20than%20the%20normal%20%60__data%60%20cache)%20for%20Objects.%20%20Since%20the%20temp%0A%20%20%20%20%20%20%20*%20cache%20is%20cleared%20at%20the%20end%20of%20a%20turn%2C%20this%20implementation%20allows%0A%20%20%20%20%20%20%20*%20side-effects%20of%20deep%20object%20changes%20to%20be%20processed%20by%20re-setting%20the%0A%20%20%20%20%20%20%20*%20same%20object%20(using%20the%20temp%20cache%20as%20an%20in-turn%20backstop%20to%20prevent%0A%20%20%20%20%20%20%20*%20cycles%20due%20to%202-way%20notification).%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40param%20%7Bstring%7D%20property%20Property%20name%0A%20%20%20%20%20%20%20*%20%40param%20%7B*%7D%20value%20New%20property%20value%0A%20%20%20%20%20%20%20*%20%40param%20%7B*%7D%20old%20Previous%20property%20value%0A%20%20%20%20%20%20%20*%20%40return%20%7Bboolean%7D%20Whether%20the%20property%20should%20be%20considered%20a%20change%0A%20%20%20%20%20%20%20*%20%40protected%0A%20%20%20%20%20%20%20*%2Fvalue%3Afunction%20_shouldPropertyChange(property%2Cvalue%2Cold)%7Breturn%20mutablePropertyChange(this%2Cproperty%2Cvalue%2Cold%2Cthis.mutableData)%3B%7D%7D%5D%2C%5B%7Bkey%3A'properties'%2Cget%3Afunction%20get()%7Breturn%7B%2F**%0A%20%20%20%20%20%20%20%20%20%20%20*%20Instance-level%20flag%20for%20configuring%20the%20dirty-checking%20strategy%0A%20%20%20%20%20%20%20%20%20%20%20*%20for%20this%20element.%20%20When%20true%2C%20Objects%20and%20Arrays%20will%20skip%20dirty%0A%20%20%20%20%20%20%20%20%20%20%20*%20checking%2C%20otherwise%20strict%20equality%20checking%20will%20be%20used.%0A%20%20%20%20%20%20%20%20%20%20%20*%2FmutableData%3ABoolean%7D%3B%7D%7D%5D)%3Breturn%20OptionalMutableData%3B%7D(superClass)%3Breturn%20OptionalMutableData%3B%7D)%3B%2F%2F%20Export%20for%20use%20by%20legacy%20behavior%0APolymer.MutableData._mutablePropertyChange%3DmutablePropertyChange%3B%7D)()%3B%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Fcpt-static.gannettdigital.com%2Funiversal-web-client%2Fmaster%2Flatest%2Fvendor%2Fcomponents%2Fpolymer%2Flib%2Fmixins%2Fmutable-data.html.js%0A | 10 kB | 2023-03-07 | 2024-01-25 | |
Pretty
Loading... | ||||
http:text/javascript;charset=utf-8,var%20_createClass%3Dfunction()%7Bfunction%20defineProperties(target%2Cprops)%7Bfor(var%20i%3D0%3Bi%3Cprops.length%3Bi%2B%2B)%7Bvar%20descriptor%3Dprops%5Bi%5D%3Bdescriptor.enumerable%3Ddescriptor.enumerable%7C%7Cfalse%3Bdescriptor.configurable%3Dtrue%3Bif(%22value%22in%20descriptor)descriptor.writable%3Dtrue%3BObject.defineProperty(target%2Cdescriptor.key%2Cdescriptor)%3B%7D%7Dreturn%20function(Constructor%2CprotoProps%2CstaticProps)%7Bif(protoProps)defineProperties(Constructor.prototype%2CprotoProps)%3Bif(staticProps)defineProperties(Constructor%2CstaticProps)%3Breturn%20Constructor%3B%7D%3B%7D()%3Bvar%20_get%3Dfunction%20get(object%2Cproperty%2Creceiver)%7Bif(object%3D%3D%3Dnull)object%3DFunction.prototype%3Bvar%20desc%3DObject.getOwnPropertyDescriptor(object%2Cproperty)%3Bif(desc%3D%3D%3Dundefined)%7Bvar%20parent%3DObject.getPrototypeOf(object)%3Bif(parent%3D%3D%3Dnull)%7Breturn%20undefined%3B%7Delse%7Breturn%20get(parent%2Cproperty%2Creceiver)%3B%7D%7Delse%20if(%22value%22in%20desc)%7Breturn%20desc.value%3B%7Delse%7Bvar%20getter%3Ddesc.get%3Bif(getter%3D%3D%3Dundefined)%7Breturn%20undefined%3B%7Dreturn%20getter.call(receiver)%3B%7D%7D%3Bfunction%20_possibleConstructorReturn(self%2Ccall)%7Bif(!self)%7Bthrow%20new%20ReferenceError(%22this%20hasn't%20been%20initialised%20-%20super()%20hasn't%20been%20called%22)%3B%7Dreturn%20call%26%26(typeof%20call%3D%3D%3D%22object%22%7C%7Ctypeof%20call%3D%3D%3D%22function%22)%3Fcall%3Aself%3B%7Dfunction%20_inherits(subClass%2CsuperClass)%7Bif(typeof%20superClass!%3D%3D%22function%22%26%26superClass!%3D%3Dnull)%7Bthrow%20new%20TypeError(%22Super%20expression%20must%20either%20be%20null%20or%20a%20function%2C%20not%20%22%2Btypeof%20superClass)%3B%7DsubClass.prototype%3DObject.create(superClass%26%26superClass.prototype%2C%7Bconstructor%3A%7Bvalue%3AsubClass%2Cenumerable%3Afalse%2Cwritable%3Atrue%2Cconfigurable%3Atrue%7D%7D)%3Bif(superClass)Object.setPrototypeOf%3FObject.setPrototypeOf(subClass%2CsuperClass)%3AsubClass.__proto__%3DsuperClass%3B%7Dfunction%20_classCallCheck(instance%2CConstructor)%7Bif(!(instance%20instanceof%20Constructor))%7Bthrow%20new%20TypeError(%22Cannot%20call%20a%20class%20as%20a%20function%22)%3B%7D%7D(function()%7B'use%20strict'%3B%2F%2F%20Base%20class%20for%20HTMLTemplateElement%20extension%20that%20has%20property%20effects%0A%2F%2F%20machinery%20for%20propagating%20host%20properties%20to%20children.%20This%20is%20an%20ES5%0A%2F%2F%20class%20only%20because%20Babel%20(incorrectly)%20requires%20super()%20in%20the%20class%0A%2F%2F%20constructor%20even%20though%20no%20%60this%60%20is%20used%20and%20it%20returns%20an%20instance.%0Avar%20newInstance%3Dnull%3B%2F**%0A%20%20%20%20%20*%20%40constructor%0A%20%20%20%20%20*%20%40extends%20%7BHTMLTemplateElement%7D%0A%20%20%20%20%20*%20%40private%0A%20%20%20%20%20*%2Ffunction%20HTMLTemplateElementExtension()%7Breturn%20newInstance%3B%7DHTMLTemplateElementExtension.prototype%3DObject.create(HTMLTemplateElement.prototype%2C%7Bconstructor%3A%7Bvalue%3AHTMLTemplateElementExtension%2Cwritable%3Atrue%7D%7D)%3B%2F**%0A%20%20%20%20%20*%20%40constructor%0A%20%20%20%20%20*%20%40implements%20%7BPolymer_PropertyEffects%7D%0A%20%20%20%20%20*%20%40extends%20%7BHTMLTemplateElementExtension%7D%0A%20%20%20%20%20*%20%40private%0A%20%20%20%20%20*%2Fvar%20DataTemplate%3DPolymer.PropertyEffects(HTMLTemplateElementExtension)%3B%2F**%0A%20%20%20%20%20*%20%40constructor%0A%20%20%20%20%20*%20%40implements%20%7BPolymer_MutableData%7D%0A%20%20%20%20%20*%20%40extends%20%7BDataTemplate%7D%0A%20%20%20%20%20*%20%40private%0A%20%20%20%20%20*%2Fvar%20MutableDataTemplate%3DPolymer.MutableData(DataTemplate)%3B%2F%2F%20Applies%20a%20DataTemplate%20subclass%20to%20a%20%3Ctemplate%3E%20instance%0Afunction%20upgradeTemplate(template%2Cconstructor)%7BnewInstance%3Dtemplate%3BObject.setPrototypeOf(template%2Cconstructor.prototype)%3Bnew%20constructor()%3BnewInstance%3Dnull%3B%7D%2F**%0A%20%20%20%20%20*%20Base%20class%20for%20TemplateInstance.%0A%20%20%20%20%20*%20%40constructor%0A%20%20%20%20%20*%20%40implements%20%7BPolymer_PropertyEffects%7D%0A%20%20%20%20%20*%20%40private%0A%20%20%20%20%20*%2Fvar%20base%3DPolymer.PropertyEffects(function()%7Bfunction%20_class()%7B_classCallCheck(this%2C_class)%3B%7Dreturn%20_class%3B%7D())%3B%2F**%0A%20%20%20%20%20*%20%40polymer%0A%20%20%20%20%20*%20%40customElement%0A%20%20%20%20%20*%20%40appliesMixin%20Polymer.PropertyEffects%0A%20%20%20%20%20*%20%40unrestricted%0A%20%20%20%20%20*%2Fvar%20TemplateInstanceBase%3Dfunction(_base)%7B_inherits(TemplateInstanceBase%2C_base)%3Bfunction%20TemplateInstanceBase(props)%7B_classCallCheck(this%2CTemplateInstanceBase)%3Bvar%20_this%3D_possibleConstructorReturn(this%2C(TemplateInstanceBase.__proto__%7C%7CObject.getPrototypeOf(TemplateInstanceBase)).call(this))%3B_this._configureProperties(props)%3B_this.root%3D_this._stampTemplate(_this.__dataHost)%3B%2F%2F%20Save%20list%20of%20stamped%20children%0Avar%20children%3D_this.children%3D%5B%5D%3Bfor(var%20n%3D_this.root.firstChild%3Bn%3Bn%3Dn.nextSibling)%7Bchildren.push(n)%3Bn.__templatizeInstance%3D_this%3B%7Dif(_this.__templatizeOwner%26%26_this.__templatizeOwner.__hideTemplateChildren__)%7B_this._showHideChildren(true)%3B%7D%2F%2F%20Flush%20props%20only%20when%20props%20are%20passed%20if%20instance%20props%20exist%0A%2F%2F%20or%20when%20there%20isn't%20instance%20props.%0Avar%20options%3D_this.__templatizeOptions%3Bif(props%26%26options.instanceProps%7C%7C!options.instanceProps)%7B_this._enableProperties()%3B%7Dreturn%20_this%3B%7D%2F**%0A%20%20%20%20%20%20%20*%20Configure%20the%20given%20%60props%60%20by%20calling%20%60_setPendingProperty%60.%20Also%0A%20%20%20%20%20%20%20*%20sets%20any%20properties%20stored%20in%20%60__hostProps%60.%0A%20%20%20%20%20%20%20*%20%40private%0A%20%20%20%20%20%20%20*%20%40param%20%7BObject%7D%20props%20Object%20of%20property%20name-value%20pairs%20to%20set.%0A%20%20%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20%20%20*%2F_createClass(TemplateInstanceBase%2C%5B%7Bkey%3A'_configureProperties'%2Cvalue%3Afunction%20_configureProperties(props)%7Bvar%20options%3Dthis.__templatizeOptions%3Bif(options.forwardHostProp)%7Bfor(var%20hprop%20in%20this.__hostProps)%7Bthis._setPendingProperty(hprop%2Cthis.__dataHost%5B'_host_'%2Bhprop%5D)%3B%7D%7D%2F%2F%20Any%20instance%20props%20passed%20in%20the%20constructor%20will%20overwrite%20host%20props%3B%0A%2F%2F%20normally%20this%20would%20be%20a%20user%20error%20but%20we%20don't%20specifically%20filter%20them%0Afor(var%20iprop%20in%20props)%7Bthis._setPendingProperty(iprop%2Cprops%5Biprop%5D)%3B%7D%7D%2F**%0A%20%20%20%20%20%20%20*%20Forwards%20a%20host%20property%20to%20this%20instance.%20%20This%20method%20should%20be%0A%20%20%20%20%20%20%20*%20called%20on%20instances%20from%20the%20%60options.forwardHostProp%60%20callback%0A%20%20%20%20%20%20%20*%20to%20propagate%20changes%20of%20host%20properties%20to%20each%20instance.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20Note%20this%20method%20enqueues%20the%20change%2C%20which%20are%20flushed%20as%20a%20batch.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40param%20%7Bstring%7D%20prop%20Property%20or%20path%20name%0A%20%20%20%20%20%20%20*%20%40param%20%7B*%7D%20value%20Value%20of%20the%20property%20to%20forward%0A%20%20%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'forwardHostProp'%2Cvalue%3Afunction%20forwardHostProp(prop%2Cvalue)%7Bif(this._setPendingPropertyOrPath(prop%2Cvalue%2Cfalse%2Ctrue))%7Bthis.__dataHost._enqueueClient(this)%3B%7D%7D%2F**%0A%20%20%20%20%20%20%20*%20Override%20point%20for%20adding%20custom%20or%20simulated%20event%20handling.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40param%20%7B!Node%7D%20node%20Node%20to%20add%20event%20listener%20to%0A%20%20%20%20%20%20%20*%20%40param%20%7Bstring%7D%20eventName%20Name%20of%20event%0A%20%20%20%20%20%20%20*%20%40param%20%7Bfunction(!Event)%3Avoid%7D%20handler%20Listener%20function%20to%20add%0A%20%20%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'_addEventListenerToNode'%2Cvalue%3Afunction%20_addEventListenerToNode(node%2CeventName%2Chandler)%7Bvar%20_this2%3Dthis%3Bif(this._methodHost%26%26this.__templatizeOptions.parentModel)%7B%2F%2F%20If%20this%20instance%20should%20be%20considered%20a%20parent%20model%2C%20decorate%0A%2F%2F%20events%20this%20template%20instance%20as%20%60model%60%0Athis._methodHost._addEventListenerToNode(node%2CeventName%2Cfunction(e)%7Be.model%3D_this2%3Bhandler(e)%3B%7D)%3B%7Delse%7B%2F%2F%20Otherwise%20delegate%20to%20the%20template's%20host%20(which%20could%20be)%0A%2F%2F%20another%20template%20instance%0Avar%20templateHost%3Dthis.__dataHost.__dataHost%3Bif(templateHost)%7BtemplateHost._addEventListenerToNode(node%2CeventName%2Chandler)%3B%7D%7D%7D%2F**%0A%20%20%20%20%20%20%20*%20Shows%20or%20hides%20the%20template%20instance%20top%20level%20child%20elements.%20For%0A%20%20%20%20%20%20%20*%20text%20nodes%2C%20%60textContent%60%20is%20removed%20while%20%22hidden%22%20and%20replaced%20when%0A%20%20%20%20%20%20%20*%20%22shown.%22%0A%20%20%20%20%20%20%20*%20%40param%20%7Bboolean%7D%20hide%20Set%20to%20true%20to%20hide%20the%20children%3B%0A%20%20%20%20%20%20%20*%20set%20to%20false%20to%20show%20them.%0A%20%20%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20%20%20*%20%40protected%0A%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'_showHideChildren'%2Cvalue%3Afunction%20_showHideChildren(hide)%7Bvar%20c%3Dthis.children%3Bfor(var%20i%3D0%3Bi%3Cc.length%3Bi%2B%2B)%7Bvar%20n%3Dc%5Bi%5D%3B%2F%2F%20Ignore%20non-changes%0Aif(Boolean(hide)!%3DBoolean(n.__hideTemplateChildren__))%7Bif(n.nodeType%3D%3D%3DNode.TEXT_NODE)%7Bif(hide)%7Bn.__polymerTextContent__%3Dn.textContent%3Bn.textContent%3D''%3B%7Delse%7Bn.textContent%3Dn.__polymerTextContent__%3B%7D%2F%2F%20remove%20and%20replace%20slot%0A%7Delse%20if(n.localName%3D%3D%3D'slot')%7Bif(hide)%7Bn.__polymerReplaced__%3Ddocument.createComment('hidden-slot')%3Bn.parentNode.replaceChild(n.__polymerReplaced__%2Cn)%3B%7Delse%7Bvar%20replace%3Dn.__polymerReplaced__%3Bif(replace)%7Breplace.parentNode.replaceChild(n%2Creplace)%3B%7D%7D%7Delse%20if(n.style)%7Bif(hide)%7Bn.__polymerDisplay__%3Dn.style.display%3Bn.style.display%3D'none'%3B%7Delse%7Bn.style.display%3Dn.__polymerDisplay__%3B%7D%7D%7Dn.__hideTemplateChildren__%3Dhide%3Bif(n._showHideChildren)%7Bn._showHideChildren(hide)%3B%7D%7D%7D%2F**%0A%20%20%20%20%20%20%20*%20Overrides%20default%20property-effects%20implementation%20to%20intercept%0A%20%20%20%20%20%20%20*%20textContent%20bindings%20while%20children%20are%20%22hidden%22%20and%20cache%20in%0A%20%20%20%20%20%20%20*%20private%20storage%20for%20later%20retrieval.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40param%20%7B!Node%7D%20node%20The%20node%20to%20set%20a%20property%20on%0A%20%20%20%20%20%20%20*%20%40param%20%7Bstring%7D%20prop%20The%20property%20to%20set%0A%20%20%20%20%20%20%20*%20%40param%20%7B*%7D%20value%20The%20value%20to%20set%0A%20%20%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20%20%20*%20%40protected%0A%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'_setUnmanagedPropertyToNode'%2Cvalue%3Afunction%20_setUnmanagedPropertyToNode(node%2Cprop%2Cvalue)%7Bif(node.__hideTemplateChildren__%26%26node.nodeType%3D%3DNode.TEXT_NODE%26%26prop%3D%3D'textContent')%7Bnode.__polymerTextContent__%3Dvalue%3B%7Delse%7B_get(TemplateInstanceBase.prototype.__proto__%7C%7CObject.getPrototypeOf(TemplateInstanceBase.prototype)%2C'_setUnmanagedPropertyToNode'%2Cthis).call(this%2Cnode%2Cprop%2Cvalue)%3B%7D%7D%2F**%0A%20%20%20%20%20%20%20*%20Find%20the%20parent%20model%20of%20this%20template%20instance.%20%20The%20parent%20model%0A%20%20%20%20%20%20%20*%20is%20either%20another%20templatize%20instance%20that%20had%20option%20%60parentModel%3A%20true%60%2C%0A%20%20%20%20%20%20%20*%20or%20else%20the%20host%20element.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40return%20%7B!Polymer_PropertyEffects%7D%20The%20parent%20model%20of%20this%20instance%0A%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'dispatchEvent'%2C%2F**%0A%20%20%20%20%20%20%20*%20Stub%20of%20HTMLElement's%20%60dispatchEvent%60%2C%20so%20that%20effects%20that%20may%0A%20%20%20%20%20%20%20*%20dispatch%20events%20safely%20no-op.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40param%20%7BEvent%7D%20event%20Event%20to%20dispatch%0A%20%20%20%20%20%20%20*%20%40return%20%7Bboolean%7D%20Always%20true.%0A%20%20%20%20%20%20%20*%2Fvalue%3Afunction%20dispatchEvent(event)%7B%2F%2F%20eslint-disable-line%20no-unused-vars%0Areturn%20true%3B%7D%7D%2C%7Bkey%3A'parentModel'%2Cget%3Afunction%20get()%7Bvar%20model%3Dthis.__parentModel%3Bif(!model)%7Bvar%20options%3Dvoid%200%3Bmodel%3Dthis%3Bdo%7B%2F%2F%20A%20template%20instance's%20%60__dataHost%60%20is%20a%20%3Ctemplate%3E%0A%2F%2F%20%60model.__dataHost.__dataHost%60%20is%20the%20template's%20host%0Amodel%3Dmodel.__dataHost.__dataHost%3B%7Dwhile((options%3Dmodel.__templatizeOptions)%26%26!options.parentModel)%3Bthis.__parentModel%3Dmodel%3B%7Dreturn%20model%3B%7D%7D%5D)%3Breturn%20TemplateInstanceBase%3B%7D(base)%3B%2F**%20%40type%20%7B!DataTemplate%7D%20*%2FTemplateInstanceBase.prototype.__dataHost%3B%2F**%20%40type%20%7B!TemplatizeOptions%7D%20*%2FTemplateInstanceBase.prototype.__templatizeOptions%3B%2F**%20%40type%20%7B!Polymer_PropertyEffects%7D%20*%2FTemplateInstanceBase.prototype._methodHost%3B%2F**%20%40type%20%7B!Object%7D%20*%2FTemplateInstanceBase.prototype.__templatizeOwner%3B%2F**%20%40type%20%7B!Object%7D%20*%2FTemplateInstanceBase.prototype.__hostProps%3B%2F**%0A%20%20%20%20%20*%20%40constructor%0A%20%20%20%20%20*%20%40extends%20%7BTemplateInstanceBase%7D%0A%20%20%20%20%20*%20%40implements%20%7BPolymer_MutableData%7D%0A%20%20%20%20%20*%20%40private%0A%20%20%20%20%20*%2Fvar%20MutableTemplateInstanceBase%3DPolymer.MutableData(TemplateInstanceBase)%3Bfunction%20findMethodHost(template)%7B%2F%2F%20Technically%20this%20should%20be%20the%20owner%20of%20the%20outermost%20template.%0A%2F%2F%20In%20shadow%20dom%2C%20this%20is%20always%20getRootNode().host%2C%20but%20we%20can%0A%2F%2F%20approximate%20this%20via%20cooperation%20with%20our%20dataHost%20always%20setting%0A%2F%2F%20%60_methodHost%60%20as%20long%20as%20there%20were%20bindings%20(or%20id's)%20on%20this%0A%2F%2F%20instance%20causing%20it%20to%20get%20a%20dataHost.%0Avar%20templateHost%3Dtemplate.__dataHost%3Breturn%20templateHost%26%26templateHost._methodHost%7C%7CtemplateHost%3B%7D%2F*%20eslint-disable%20valid-jsdoc%20*%2F%2F**%0A%20%20%20%20%20*%20%40suppress%20%7BmissingProperties%7D%20class.prototype%20is%20not%20defined%20for%20some%20reason%0A%20%20%20%20%20*%2Ffunction%20createTemplatizerClass(template%2CtemplateInfo%2Coptions)%7B%2F%2F%20Anonymous%20class%20created%20by%20the%20templatize%0Avar%20base%3Doptions.mutableData%3FMutableTemplateInstanceBase%3ATemplateInstanceBase%3B%2F%2F%20Affordance%20for%20global%20mixins%20onto%20TemplatizeInstance%0Aif(Polymer.Templatize.mixin)%7Bbase%3DPolymer.Templatize.mixin(base)%3B%7D%2F**%0A%20%20%20%20%20%20%20*%20%40constructor%0A%20%20%20%20%20%20%20*%20%40extends%20%7Bbase%7D%0A%20%20%20%20%20%20%20*%20%40private%0A%20%20%20%20%20%20%20*%2Fvar%20klass%3Dfunction(_base2)%7B_inherits(klass%2C_base2)%3Bfunction%20klass()%7B_classCallCheck(this%2Cklass)%3Breturn%20_possibleConstructorReturn(this%2C(klass.__proto__%7C%7CObject.getPrototypeOf(klass)).apply(this%2Carguments))%3B%7Dreturn%20klass%3B%7D(base)%3Bklass.prototype.__templatizeOptions%3Doptions%3Bklass.prototype._bindTemplate(template)%3BaddNotifyEffects(klass%2Ctemplate%2CtemplateInfo%2Coptions)%3Breturn%20klass%3B%7D%2F**%0A%20%20%20%20%20*%20%40suppress%20%7BmissingProperties%7D%20class.prototype%20is%20not%20defined%20for%20some%20reason%0A%20%20%20%20%20*%2Ffunction%20addPropagateEffects(template%2CtemplateInfo%2Coptions)%7Bvar%20userForwardHostProp%3Doptions.forwardHostProp%3Bif(userForwardHostProp)%7B%2F%2F%20Provide%20data%20API%20and%20property%20effects%20on%20memoized%20template%20class%0Avar%20klass%3DtemplateInfo.templatizeTemplateClass%3Bif(!klass)%7Bvar%20_base3%3Doptions.mutableData%3FMutableDataTemplate%3ADataTemplate%3B%2F**%20%40private%20*%2Fklass%3DtemplateInfo.templatizeTemplateClass%3Dfunction(_base4)%7B_inherits(TemplatizedTemplate%2C_base4)%3Bfunction%20TemplatizedTemplate()%7B_classCallCheck(this%2CTemplatizedTemplate)%3Breturn%20_possibleConstructorReturn(this%2C(TemplatizedTemplate.__proto__%7C%7CObject.getPrototypeOf(TemplatizedTemplate)).apply(this%2Carguments))%3B%7Dreturn%20TemplatizedTemplate%3B%7D(_base3)%3B%2F%2F%20Add%20template%20-%20%3Einstances%20effects%0A%2F%2F%20and%20host%20%3C-%20template%20effects%0Avar%20hostProps%3DtemplateInfo.hostProps%3Bfor(var%20prop%20in%20hostProps)%7Bklass.prototype._addPropertyEffect('_host_'%2Bprop%2Cklass.prototype.PROPERTY_EFFECT_TYPES.PROPAGATE%2C%7Bfn%3AcreateForwardHostPropEffect(prop%2CuserForwardHostProp)%7D)%3Bklass.prototype._createNotifyingProperty('_host_'%2Bprop)%3B%7D%7DupgradeTemplate(template%2Cklass)%3B%2F%2F%20Mix%20any%20pre-bound%20data%20into%20__data%3B%20no%20need%20to%20flush%20this%20to%0A%2F%2F%20instances%20since%20they%20pull%20from%20the%20template%20at%20instance-time%0Aif(template.__dataProto)%7B%2F%2F%20Note%2C%20generally%20%60__dataProto%60%20could%20be%20chained%2C%20but%20it's%20guaranteed%0A%2F%2F%20to%20not%20be%20since%20this%20is%20a%20vanilla%20template%20we%20just%20added%20effects%20to%0AObject.assign(template.__data%2Ctemplate.__dataProto)%3B%7D%2F%2F%20Clear%20any%20pending%20data%20for%20performance%0Atemplate.__dataTemp%3D%7B%7D%3Btemplate.__dataPending%3Dnull%3Btemplate.__dataOld%3Dnull%3Btemplate._enableProperties()%3B%7D%7D%2F*%20eslint-enable%20valid-jsdoc%20*%2Ffunction%20createForwardHostPropEffect(hostProp%2CuserForwardHostProp)%7Breturn%20function%20forwardHostProp(template%2Cprop%2Cprops)%7BuserForwardHostProp.call(template.__templatizeOwner%2Cprop.substring('_host_'.length)%2Cprops%5Bprop%5D)%3B%7D%3B%7Dfunction%20addNotifyEffects(klass%2Ctemplate%2CtemplateInfo%2Coptions)%7Bvar%20hostProps%3DtemplateInfo.hostProps%7C%7C%7B%7D%3Bfor(var%20iprop%20in%20options.instanceProps)%7Bdelete%20hostProps%5Biprop%5D%3Bvar%20userNotifyInstanceProp%3Doptions.notifyInstanceProp%3Bif(userNotifyInstanceProp)%7Bklass.prototype._addPropertyEffect(iprop%2Cklass.prototype.PROPERTY_EFFECT_TYPES.NOTIFY%2C%7Bfn%3AcreateNotifyInstancePropEffect(iprop%2CuserNotifyInstanceProp)%7D)%3B%7D%7Dif(options.forwardHostProp%26%26template.__dataHost)%7Bfor(var%20hprop%20in%20hostProps)%7Bklass.prototype._addPropertyEffect(hprop%2Cklass.prototype.PROPERTY_EFFECT_TYPES.NOTIFY%2C%7Bfn%3AcreateNotifyHostPropEffect()%7D)%3B%7D%7D%7Dfunction%20createNotifyInstancePropEffect(instProp%2CuserNotifyInstanceProp)%7Breturn%20function%20notifyInstanceProp(inst%2Cprop%2Cprops)%7BuserNotifyInstanceProp.call(inst.__templatizeOwner%2Cinst%2Cprop%2Cprops%5Bprop%5D)%3B%7D%3B%7Dfunction%20createNotifyHostPropEffect()%7Breturn%20function%20notifyHostProp(inst%2Cprop%2Cprops)%7Binst.__dataHost._setPendingPropertyOrPath('_host_'%2Bprop%2Cprops%5Bprop%5D%2Ctrue%2Ctrue)%3B%7D%3B%7D%2F**%0A%20%20%20%20%20*%20Module%20for%20preparing%20and%20stamping%20instances%20of%20templates%20that%20utilize%0A%20%20%20%20%20*%20Polymer's%20data-binding%20and%20declarative%20event%20listener%20features.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20Example%3A%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%20%20%20%20%2F%2F%20Get%20a%20template%20from%20somewhere%2C%20e.g.%20light%20DOM%0A%20%20%20%20%20*%20%20%20%20%20let%20template%20%3D%20this.querySelector('template')%3B%0A%20%20%20%20%20*%20%20%20%20%20%2F%2F%20Prepare%20the%20template%0A%20%20%20%20%20*%20%20%20%20%20let%20TemplateClass%20%3D%20Polymer.Templatize.templatize(template)%3B%0A%20%20%20%20%20*%20%20%20%20%20%2F%2F%20Instance%20the%20template%20with%20an%20initial%20data%20model%0A%20%20%20%20%20*%20%20%20%20%20let%20instance%20%3D%20new%20TemplateClass(%7BmyProp%3A%20'initial'%7D)%3B%0A%20%20%20%20%20*%20%20%20%20%20%2F%2F%20Insert%20the%20instance's%20DOM%20somewhere%2C%20e.g.%20element's%20shadow%20DOM%0A%20%20%20%20%20*%20%20%20%20%20this.shadowRoot.appendChild(instance.root)%3B%0A%20%20%20%20%20*%20%20%20%20%20%2F%2F%20Changing%20a%20property%20on%20the%20instance%20will%20propagate%20to%20bindings%0A%20%20%20%20%20*%20%20%20%20%20%2F%2F%20in%20the%20template%0A%20%20%20%20%20*%20%20%20%20%20instance.myProp%20%3D%20'new%20value'%3B%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20The%20%60options%60%20dictionary%20passed%20to%20%60templatize%60%20allows%20for%20customizing%0A%20%20%20%20%20*%20features%20of%20the%20generated%20template%20class%2C%20including%20how%20outer-scope%20host%0A%20%20%20%20%20*%20properties%20should%20be%20forwarded%20into%20template%20instances%2C%20how%20any%20instance%0A%20%20%20%20%20*%20properties%20added%20into%20the%20template's%20scope%20should%20be%20notified%20out%20to%0A%20%20%20%20%20*%20the%20host%2C%20and%20whether%20the%20instance%20should%20be%20decorated%20as%20a%20%22parent%20model%22%0A%20%20%20%20%20*%20of%20any%20event%20handlers.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%20%20%20%20%2F%2F%20Customize%20property%20forwarding%20and%20event%20model%20decoration%0A%20%20%20%20%20*%20%20%20%20%20let%20TemplateClass%20%3D%20Polymer.Templatize.templatize(template%2C%20this%2C%20%7B%0A%20%20%20%20%20*%20%20%20%20%20%20%20parentModel%3A%20true%2C%0A%20%20%20%20%20*%20%20%20%20%20%20%20forwardHostProp(property%2C%20value)%20%7B...%7D%2C%0A%20%20%20%20%20*%20%20%20%20%20%20%20instanceProps%3A%20%7B...%7D%2C%0A%20%20%20%20%20*%20%20%20%20%20%20%20notifyInstanceProp(instance%2C%20property%2C%20value)%20%7B...%7D%2C%0A%20%20%20%20%20*%20%20%20%20%20%7D)%3B%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40namespace%0A%20%20%20%20%20*%20%40memberof%20Polymer%0A%20%20%20%20%20*%20%40summary%20Module%20for%20preparing%20and%20stamping%20instances%20of%20templates%0A%20%20%20%20%20*%20%20%20utilizing%20Polymer%20templating%20features.%0A%20%20%20%20%20*%2FPolymer.Templatize%3D%7B%2F**%0A%20%20%20%20%20%20%20*%20Returns%20an%20anonymous%20%60Polymer.PropertyEffects%60%20class%20bound%20to%20the%0A%20%20%20%20%20%20%20*%20%60%3Ctemplate%3E%60%20provided.%20%20Instancing%20the%20class%20will%20result%20in%20the%0A%20%20%20%20%20%20%20*%20template%20being%20stamped%20into%20a%20document%20fragment%20stored%20as%20the%20instance's%0A%20%20%20%20%20%20%20*%20%60root%60%20property%2C%20after%20which%20it%20can%20be%20appended%20to%20the%20DOM.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20Templates%20may%20utilize%20all%20Polymer%20data-binding%20features%20as%20well%20as%0A%20%20%20%20%20%20%20*%20declarative%20event%20listeners.%20%20Event%20listeners%20and%20inline%20computing%0A%20%20%20%20%20%20%20*%20functions%20in%20the%20template%20will%20be%20called%20on%20the%20host%20of%20the%20template.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20The%20constructor%20returned%20takes%20a%20single%20argument%20dictionary%20of%20initial%0A%20%20%20%20%20%20%20*%20property%20values%20to%20propagate%20into%20template%20bindings.%20%20Additionally%0A%20%20%20%20%20%20%20*%20host%20properties%20can%20be%20forwarded%20in%2C%20and%20instance%20properties%20can%20be%0A%20%20%20%20%20%20%20*%20notified%20out%20by%20providing%20optional%20callbacks%20in%20the%20%60options%60%20dictionary.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20Valid%20configuration%20in%20%60options%60%20are%20as%20follows%3A%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20-%20%60forwardHostProp(property%2C%20value)%60%3A%20Called%20when%20a%20property%20referenced%0A%20%20%20%20%20%20%20*%20%20%20in%20the%20template%20changed%20on%20the%20template's%20host.%20As%20this%20library%20does%0A%20%20%20%20%20%20%20*%20%20%20not%20retain%20references%20to%20templates%20instanced%20by%20the%20user%2C%20it%20is%20the%0A%20%20%20%20%20%20%20*%20%20%20templatize%20owner's%20responsibility%20to%20forward%20host%20property%20changes%20into%0A%20%20%20%20%20%20%20*%20%20%20user-stamped%20instances.%20%20The%20%60instance.forwardHostProp(property%2C%20value)%60%0A%20%20%20%20%20%20%20*%20%20%20%20method%20on%20the%20generated%20class%20should%20be%20called%20to%20forward%20host%0A%20%20%20%20%20%20%20*%20%20%20properties%20into%20the%20template%20to%20prevent%20unnecessary%20property-changed%0A%20%20%20%20%20%20%20*%20%20%20notifications.%20Any%20properties%20referenced%20in%20the%20template%20that%20are%20not%0A%20%20%20%20%20%20%20*%20%20%20defined%20in%20%60instanceProps%60%20will%20be%20notified%20up%20to%20the%20template's%20host%0A%20%20%20%20%20%20%20*%20%20%20automatically.%0A%20%20%20%20%20%20%20*%20-%20%60instanceProps%60%3A%20Dictionary%20of%20property%20names%20that%20will%20be%20added%0A%20%20%20%20%20%20%20*%20%20%20to%20the%20instance%20by%20the%20templatize%20owner.%20%20These%20properties%20shadow%20any%0A%20%20%20%20%20%20%20*%20%20%20host%20properties%2C%20and%20changes%20within%20the%20template%20to%20these%20properties%0A%20%20%20%20%20%20%20*%20%20%20will%20result%20in%20%60notifyInstanceProp%60%20being%20called.%0A%20%20%20%20%20%20%20*%20-%20%60mutableData%60%3A%20When%20%60true%60%2C%20the%20generated%20class%20will%20skip%20strict%0A%20%20%20%20%20%20%20*%20%20%20dirty-checking%20for%20objects%20and%20arrays%20(always%20consider%20them%20to%20be%0A%20%20%20%20%20%20%20*%20%20%20%22dirty%22).%0A%20%20%20%20%20%20%20*%20-%20%60notifyInstanceProp(instance%2C%20property%2C%20value)%60%3A%20Called%20when%0A%20%20%20%20%20%20%20*%20%20%20an%20instance%20property%20changes.%20%20Users%20may%20choose%20to%20call%20%60notifyPath%60%0A%20%20%20%20%20%20%20*%20%20%20on%20e.g.%20the%20owner%20to%20notify%20the%20change.%0A%20%20%20%20%20%20%20*%20-%20%60parentModel%60%3A%20When%20%60true%60%2C%20events%20handled%20by%20declarative%20event%20listeners%0A%20%20%20%20%20%20%20*%20%20%20(%60on-event%3D%22handler%22%60)%20will%20be%20decorated%20with%20a%20%60model%60%20property%20pointing%0A%20%20%20%20%20%20%20*%20%20%20to%20the%20template%20instance%20that%20stamped%20it.%20%20It%20will%20also%20be%20returned%0A%20%20%20%20%20%20%20*%20%20%20from%20%60instance.parentModel%60%20in%20cases%20where%20template%20instance%20nesting%0A%20%20%20%20%20%20%20*%20%20%20causes%20an%20inner%20model%20to%20shadow%20an%20outer%20model.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20All%20callbacks%20are%20called%20bound%20to%20the%20%60owner%60.%20Any%20context%0A%20%20%20%20%20%20%20*%20needed%20for%20the%20callbacks%20(such%20as%20references%20to%20%60instances%60%20stamped)%0A%20%20%20%20%20%20%20*%20should%20be%20stored%20on%20the%20%60owner%60%20such%20that%20they%20can%20be%20retrieved%20via%0A%20%20%20%20%20%20%20*%20%60this%60.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20When%20%60options.forwardHostProp%60%20is%20declared%20as%20an%20option%2C%20any%20properties%0A%20%20%20%20%20%20%20*%20referenced%20in%20the%20template%20will%20be%20automatically%20forwarded%20from%20the%20host%20of%0A%20%20%20%20%20%20%20*%20the%20%60%3Ctemplate%3E%60%20to%20instances%2C%20with%20the%20exception%20of%20any%20properties%20listed%20in%0A%20%20%20%20%20%20%20*%20the%20%60options.instanceProps%60%20object.%20%20%60instanceProps%60%20are%20assumed%20to%20be%0A%20%20%20%20%20%20%20*%20managed%20by%20the%20owner%20of%20the%20instances%2C%20either%20passed%20into%20the%20constructor%0A%20%20%20%20%20%20%20*%20or%20set%20after%20the%20fact.%20%20Note%2C%20any%20properties%20passed%20into%20the%20constructor%20will%0A%20%20%20%20%20%20%20*%20always%20be%20set%20to%20the%20instance%20(regardless%20of%20whether%20they%20would%20normally%0A%20%20%20%20%20%20%20*%20be%20forwarded%20from%20the%20host).%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20Note%20that%20%60templatize()%60%20can%20be%20run%20only%20once%20for%20a%20given%20%60%3Ctemplate%3E%60.%0A%20%20%20%20%20%20%20*%20Further%20calls%20will%20result%20in%20an%20error.%20Also%2C%20there%20is%20a%20special%0A%20%20%20%20%20%20%20*%20behavior%20if%20the%20template%20was%20duplicated%20through%20a%20mechanism%20such%20as%0A%20%20%20%20%20%20%20*%20%60%3Cdom-repeat%3E%60%20or%20%60%3Ctest-fixture%3E%60.%20In%20this%20case%2C%20all%20calls%20to%0A%20%20%20%20%20%20%20*%20%60templatize()%60%20return%20the%20same%20class%20for%20all%20duplicates%20of%20a%20template.%0A%20%20%20%20%20%20%20*%20The%20class%20returned%20from%20%60templatize()%60%20is%20generated%20only%20once%20using%0A%20%20%20%20%20%20%20*%20the%20%60options%60%20from%20the%20first%20call.%20This%20means%20that%20any%20%60options%60%0A%20%20%20%20%20%20%20*%20provided%20to%20subsequent%20calls%20will%20be%20ignored.%20Therefore%2C%20it%20is%20very%0A%20%20%20%20%20%20%20*%20important%20not%20to%20close%20over%20any%20variables%20inside%20the%20callbacks.%20Also%2C%0A%20%20%20%20%20%20%20*%20arrow%20functions%20must%20be%20avoided%20because%20they%20bind%20the%20outer%20%60this%60.%0A%20%20%20%20%20%20%20*%20Inside%20the%20callbacks%2C%20any%20contextual%20information%20can%20be%20accessed%0A%20%20%20%20%20%20%20*%20through%20%60this%60%2C%20which%20points%20to%20the%20%60owner%60.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40memberof%20Polymer.Templatize%0A%20%20%20%20%20%20%20*%20%40param%20%7B!HTMLTemplateElement%7D%20template%20Template%20to%20templatize%0A%20%20%20%20%20%20%20*%20%40param%20%7BPolymer_PropertyEffects%3D%7D%20owner%20Owner%20of%20the%20template%20instances%3B%0A%20%20%20%20%20%20%20*%20%20%20any%20optional%20callbacks%20will%20be%20bound%20to%20this%20owner.%0A%20%20%20%20%20%20%20*%20%40param%20%7BObject%3D%7D%20options%20Options%20dictionary%20(see%20summary%20for%20details)%0A%20%20%20%20%20%20%20*%20%40return%20%7Bfunction(new%3ATemplateInstanceBase)%7D%20Generated%20class%20bound%20to%20the%20template%0A%20%20%20%20%20%20%20*%20%20%20provided%0A%20%20%20%20%20%20%20*%20%40suppress%20%7BinvalidCasts%7D%0A%20%20%20%20%20%20%20*%2Ftemplatize%3Afunction%20templatize(template%2Cowner%2Coptions)%7B%2F%2F%20Under%20strictTemplatePolicy%2C%20the%20templatized%20element%20must%20be%20owned%0A%2F%2F%20by%20a%20(trusted)%20Polymer%20element%2C%20indicated%20by%20existence%20of%20_methodHost%3B%0A%2F%2F%20e.g.%20for%20dom-if%20%26%20dom-repeat%20in%20main%20document%2C%20_methodHost%20is%20null%0Aif(Polymer.strictTemplatePolicy%26%26!findMethodHost(template))%7Bthrow%20new%20Error('strictTemplatePolicy%3A%20template%20owner%20not%20trusted')%3B%7Doptions%3D%2F**%20%40type%20%7B!TemplatizeOptions%7D%20*%2Foptions%7C%7C%7B%7D%3Bif(template.__templatizeOwner)%7Bthrow%20new%20Error('A%20%3Ctemplate%3E%20can%20only%20be%20templatized%20once')%3B%7Dtemplate.__templatizeOwner%3Downer%3Bvar%20ctor%3Downer%3Fowner.constructor%3ATemplateInstanceBase%3Bvar%20templateInfo%3Dctor._parseTemplate(template)%3B%2F%2F%20Get%20memoized%20base%20class%20for%20the%20prototypical%20template%2C%20which%0A%2F%2F%20includes%20property%20effects%20for%20binding%20template%20%26%20forwarding%0Avar%20baseClass%3DtemplateInfo.templatizeInstanceClass%3Bif(!baseClass)%7BbaseClass%3DcreateTemplatizerClass(template%2CtemplateInfo%2Coptions)%3BtemplateInfo.templatizeInstanceClass%3DbaseClass%3B%7D%2F%2F%20Host%20property%20forwarding%20must%20be%20installed%20onto%20template%20instance%0AaddPropagateEffects(template%2CtemplateInfo%2Coptions)%3B%2F%2F%20Subclass%20base%20class%20and%20add%20reference%20for%20this%20specific%20template%0A%2F**%20%40private%20*%2Fvar%20klass%3Dfunction(_baseClass)%7B_inherits(TemplateInstance%2C_baseClass)%3Bfunction%20TemplateInstance()%7B_classCallCheck(this%2CTemplateInstance)%3Breturn%20_possibleConstructorReturn(this%2C(TemplateInstance.__proto__%7C%7CObject.getPrototypeOf(TemplateInstance)).apply(this%2Carguments))%3B%7Dreturn%20TemplateInstance%3B%7D(baseClass)%3Bklass.prototype._methodHost%3DfindMethodHost(template)%3Bklass.prototype.__dataHost%3Dtemplate%3Bklass.prototype.__templatizeOwner%3Downer%3Bklass.prototype.__hostProps%3DtemplateInfo.hostProps%3Bklass%3D%2F**%20%40type%20%7Bfunction(new%3ATemplateInstanceBase)%7D%20*%2Fklass%3B%2F%2Feslint-disable-line%20no-self-assign%0Areturn%20klass%3B%7D%2C%2F**%0A%20%20%20%20%20%20%20*%20Returns%20the%20template%20%22model%22%20associated%20with%20a%20given%20element%2C%20which%0A%20%20%20%20%20%20%20*%20serves%20as%20the%20binding%20scope%20for%20the%20template%20instance%20the%20element%20is%0A%20%20%20%20%20%20%20*%20contained%20in.%20A%20template%20model%20is%20an%20instance%20of%0A%20%20%20%20%20%20%20*%20%60TemplateInstanceBase%60%2C%20and%20should%20be%20used%20to%20manipulate%20data%0A%20%20%20%20%20%20%20*%20associated%20with%20this%20template%20instance.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20Example%3A%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%20%20let%20model%20%3D%20modelForElement(el)%3B%0A%20%20%20%20%20%20%20*%20%20%20if%20(model.index%20%3C%2010)%20%7B%0A%20%20%20%20%20%20%20*%20%20%20%20%20model.set('item.checked'%2C%20true)%3B%0A%20%20%20%20%20%20%20*%20%20%20%7D%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40memberof%20Polymer.Templatize%0A%20%20%20%20%20%20%20*%20%40param%20%7BHTMLTemplateElement%7D%20template%20The%20model%20will%20be%20returned%20for%0A%20%20%20%20%20%20%20*%20%20%20elements%20stamped%20from%20this%20template%0A%20%20%20%20%20%20%20*%20%40param%20%7BNode%3D%7D%20node%20Node%20for%20which%20to%20return%20a%20template%20model.%0A%20%20%20%20%20%20%20*%20%40return%20%7BTemplateInstanceBase%7D%20Template%20instance%20representing%20the%0A%20%20%20%20%20%20%20*%20%20%20binding%20scope%20for%20the%20element%0A%20%20%20%20%20%20%20*%2FmodelForElement%3Afunction%20modelForElement(template%2Cnode)%7Bvar%20model%3Dvoid%200%3Bwhile(node)%7B%2F%2F%20An%20element%20with%20a%20__templatizeInstance%20marks%20the%20top%20boundary%0A%2F%2F%20of%20a%20scope%3B%20walk%20up%20until%20we%20find%20one%2C%20and%20then%20ensure%20that%0A%2F%2F%20its%20__dataHost%20matches%20%60this%60%2C%20meaning%20this%20dom-repeat%20stamped%20it%0Aif(model%3Dnode.__templatizeInstance)%7B%2F%2F%20Found%20an%20element%20stamped%20by%20another%20template%3B%20keep%20walking%20up%0A%2F%2F%20from%20its%20__dataHost%0Aif(model.__dataHost!%3Dtemplate)%7Bnode%3Dmodel.__dataHost%3B%7Delse%7Breturn%20model%3B%7D%7Delse%7B%2F%2F%20Still%20in%20a%20template%20scope%2C%20keep%20going%20up%20until%0A%2F%2F%20a%20__templatizeInstance%20is%20found%0Anode%3Dnode.parentNode%3B%7D%7Dreturn%20null%3B%7D%7D%3BPolymer.TemplateInstanceBase%3DTemplateInstanceBase%3B%7D)()%3B%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Fcpt-static.gannettdigital.com%2Funiversal-web-client%2Fmaster%2Flatest%2Fvendor%2Fcomponents%2Fpolymer%2Flib%2Futils%2Ftemplatize.html.js%0A | 25 kB | 2023-03-07 | 2024-01-25 | |
Pretty
Loading... | ||||
http:text/javascript;charset=utf-8,var%20_createClass%3Dfunction()%7Bfunction%20defineProperties(target%2Cprops)%7Bfor(var%20i%3D0%3Bi%3Cprops.length%3Bi%2B%2B)%7Bvar%20descriptor%3Dprops%5Bi%5D%3Bdescriptor.enumerable%3Ddescriptor.enumerable%7C%7Cfalse%3Bdescriptor.configurable%3Dtrue%3Bif(%22value%22in%20descriptor)descriptor.writable%3Dtrue%3BObject.defineProperty(target%2Cdescriptor.key%2Cdescriptor)%3B%7D%7Dreturn%20function(Constructor%2CprotoProps%2CstaticProps)%7Bif(protoProps)defineProperties(Constructor.prototype%2CprotoProps)%3Bif(staticProps)defineProperties(Constructor%2CstaticProps)%3Breturn%20Constructor%3B%7D%3B%7D()%3Bfunction%20_classCallCheck(instance%2CConstructor)%7Bif(!(instance%20instanceof%20Constructor))%7Bthrow%20new%20TypeError(%22Cannot%20call%20a%20class%20as%20a%20function%22)%3B%7D%7D(function()%7B'use%20strict'%3B%2F**%0A%20%20%20%20%20*%20Class%20representing%20a%20static%20string%20value%20which%20can%20be%20used%20to%20filter%0A%20%20%20%20%20*%20strings%20by%20asseting%20that%20they%20have%20been%20created%20via%20this%20class.%20The%0A%20%20%20%20%20*%20%60value%60%20property%20returns%20the%20string%20passed%20to%20the%20constructor.%0A%20%20%20%20%20*%2Fvar%20LiteralString%3Dfunction()%7Bfunction%20LiteralString(string)%7B_classCallCheck(this%2CLiteralString)%3B%2F**%20%40type%20%7Bstring%7D%20*%2Fthis.value%3Dstring.toString()%3B%7D%2F**%0A%20%20%20%20%20%20%20*%20%40return%20%7Bstring%7D%20LiteralString%20string%20value%0A%20%20%20%20%20%20%20*%2F_createClass(LiteralString%2C%5B%7Bkey%3A'toString'%2Cvalue%3Afunction%20toString()%7Breturn%20this.value%3B%7D%7D%5D)%3Breturn%20LiteralString%3B%7D()%3B%2F**%0A%20%20%20%20%20*%20%40param%20%7B*%7D%20value%20Object%20to%20stringify%20into%20HTML%0A%20%20%20%20%20*%20%40return%20%7Bstring%7D%20HTML%20stringified%20form%20of%20%60obj%60%0A%20%20%20%20%20*%2Ffunction%20literalValue(value)%7Bif(value%20instanceof%20LiteralString)%7Breturn(%2F**%20%40type%20%7B!LiteralString%7D%20*%2Fvalue.value)%3B%7Delse%7Bthrow%20new%20Error('non-literal%20value%20passed%20to%20Polymer.htmlLiteral%3A%20'%2Bvalue)%3B%7D%7D%2F**%0A%20%20%20%20%20*%20%40param%20%7B*%7D%20value%20Object%20to%20stringify%20into%20HTML%0A%20%20%20%20%20*%20%40return%20%7Bstring%7D%20HTML%20stringified%20form%20of%20%60obj%60%0A%20%20%20%20%20*%2Ffunction%20htmlValue(value)%7Bif(value%20instanceof%20HTMLTemplateElement)%7Breturn(%2F**%20%40type%20%7B!HTMLTemplateElement%20%7D%20*%2Fvalue.innerHTML)%3B%7Delse%20if(value%20instanceof%20LiteralString)%7Breturn%20literalValue(value)%3B%7Delse%7Bthrow%20new%20Error('non-template%20value%20passed%20to%20Polymer.html%3A%20'%2Bvalue)%3B%7D%7D%2F**%0A%20%20%20%20%20*%20A%20template%20literal%20tag%20that%20creates%20an%20HTML%20%3Ctemplate%3E%20element%20from%20the%0A%20%20%20%20%20*%20contents%20of%20the%20string.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20This%20allows%20you%20to%20write%20a%20Polymer%20Template%20in%20JavaScript.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20Templates%20can%20be%20composed%20by%20interpolating%20%60HTMLTemplateElement%60s%20in%0A%20%20%20%20%20*%20expressions%20in%20the%20JavaScript%20template%20literal.%20The%20nested%20template's%0A%20%20%20%20%20*%20%60innerHTML%60%20is%20included%20in%20the%20containing%20template.%20%20The%20only%20other%0A%20%20%20%20%20*%20values%20allowed%20in%20expressions%20are%20those%20returned%20from%20%60Polymer.htmlLiteral%60%0A%20%20%20%20%20*%20which%20ensures%20only%20literal%20values%20from%20JS%20source%20ever%20reach%20the%20HTML%2C%20to%0A%20%20%20%20%20*%20guard%20against%20XSS%20risks.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20All%20other%20values%20are%20disallowed%20in%20expressions%20to%20help%20prevent%20XSS%0A%20%20%20%20%20*%20attacks%3B%20however%2C%20%60Polymer.htmlLiteral%60%20can%20be%20used%20to%20compose%20static%0A%20%20%20%20%20*%20string%20values%20into%20templates.%20This%20is%20useful%20to%20compose%20strings%20into%0A%20%20%20%20%20*%20places%20that%20do%20not%20accept%20html%2C%20like%20the%20css%20text%20of%20a%20%60style%60%0A%20%20%20%20%20*%20element.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20Example%3A%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%20%20%20%20static%20get%20template()%20%7B%0A%20%20%20%20%20*%20%20%20%20%20%20%20return%20Polymer.html%60%0A%20%20%20%20%20*%20%20%20%20%20%20%20%20%20%3Cstyle%3E%3Ahost%7B%20content%3A%22...%22%20%7D%3C%2Fstyle%3E%0A%20%20%20%20%20*%20%20%20%20%20%20%20%20%20%3Cdiv%20class%3D%22shadowed%22%3E%24%7Bthis.partialTemplate%7D%3C%2Fdiv%3E%0A%20%20%20%20%20*%20%20%20%20%20%20%20%20%20%24%7Bsuper.template%7D%0A%20%20%20%20%20*%20%20%20%20%20%20%20%60%3B%0A%20%20%20%20%20*%20%20%20%20%20%7D%0A%20%20%20%20%20*%20%20%20%20%20static%20get%20partialTemplate()%20%7B%20return%20Polymer.html%60%3Cspan%3EPartial!%3C%2Fspan%3E%60%3B%20%7D%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40memberof%20Polymer%0A%20%20%20%20%20*%20%40param%20%7B!ITemplateArray%7D%20strings%20Constant%20parts%20of%20tagged%20template%20literal%0A%20%20%20%20%20*%20%40param%20%7B...*%7D%20values%20Variable%20parts%20of%20tagged%20template%20literal%0A%20%20%20%20%20*%20%40return%20%7B!HTMLTemplateElement%7D%20Constructed%20HTMLTemplateElement%0A%20%20%20%20%20*%2FPolymer.html%3Dfunction%20html(strings)%7Bvar%20template%3D%2F**%20%40type%20%7B!HTMLTemplateElement%7D%20*%2Fdocument.createElement('template')%3Bfor(var%20_len%3Darguments.length%2Cvalues%3DArray(_len%3E1%3F_len-1%3A0)%2C_key%3D1%3B_key%3C_len%3B_key%2B%2B)%7Bvalues%5B_key-1%5D%3Darguments%5B_key%5D%3B%7Dtemplate.innerHTML%3Dvalues.reduce(function(acc%2Cv%2Cidx)%7Breturn%20acc%2BhtmlValue(v)%2Bstrings%5Bidx%2B1%5D%3B%7D%2Cstrings%5B0%5D)%3Breturn%20template%3B%7D%3B%2F**%0A%20%20%20%20%20*%20An%20html%20literal%20tag%20that%20can%20be%20used%20with%20%60Polymer.html%60%20to%20compose.%0A%20%20%20%20%20*%20a%20literal%20string.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20Example%3A%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%20%20%20%20static%20get%20template()%20%7B%0A%20%20%20%20%20*%20%20%20%20%20%20%20return%20Polymer.html%60%0A%20%20%20%20%20*%20%20%20%20%20%20%20%20%20%3Cstyle%3E%0A%20%20%20%20%20*%20%20%20%20%20%20%20%20%20%20%20%3Ahost%20%7B%20display%3A%20block%3B%20%7D%0A%20%20%20%20%20*%20%20%20%20%20%20%20%20%20%20%20%24%7BstyleTemplate%7D%0A%20%20%20%20%20*%20%20%20%20%20%20%20%20%20%3C%2Fstyle%3E%0A%20%20%20%20%20*%20%20%20%20%20%20%20%20%20%3Cdiv%20class%3D%22shadowed%22%3E%24%7BstaticValue%7D%3C%2Fdiv%3E%0A%20%20%20%20%20*%20%20%20%20%20%20%20%20%20%24%7Bsuper.template%7D%0A%20%20%20%20%20*%20%20%20%20%20%20%20%60%3B%0A%20%20%20%20%20*%20%20%20%20%20%7D%0A%20%20%20%20%20*%20%20%20%20%20static%20get%20styleTemplate()%20%7B%20return%20Polymer.htmlLiteral%60.shadowed%20%7B%20background%3A%20gray%3B%20%7D%60%3B%20%7D%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40memberof%20Polymer%0A%20%20%20%20%20*%20%40param%20%7B!ITemplateArray%7D%20strings%20Constant%20parts%20of%20tagged%20template%20literal%0A%20%20%20%20%20*%20%40param%20%7B...*%7D%20values%20Variable%20parts%20of%20tagged%20template%20literal%0A%20%20%20%20%20*%20%40return%20%7B!LiteralString%7D%20Constructed%20literal%20string%0A%20%20%20%20%20*%2FPolymer.htmlLiteral%3Dfunction(strings)%7Bfor(var%20_len2%3Darguments.length%2Cvalues%3DArray(_len2%3E1%3F_len2-1%3A0)%2C_key2%3D1%3B_key2%3C_len2%3B_key2%2B%2B)%7Bvalues%5B_key2-1%5D%3Darguments%5B_key2%5D%3B%7Dreturn%20new%20LiteralString(values.reduce(function(acc%2Cv%2Cidx)%7Breturn%20acc%2BliteralValue(v)%2Bstrings%5Bidx%2B1%5D%3B%7D%2Cstrings%5B0%5D))%3B%7D%3B%7D)()%3B%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Fcpt-static.gannettdigital.com%2Funiversal-web-client%2Fmaster%2Flatest%2Fvendor%2Fcomponents%2Fpolymer%2Flib%2Futils%2Fhtml-tag.html.js%0A | 5.1 kB | 2023-03-07 | 2024-01-25 | |
Pretty
Loading... | ||||
cpt-static.gannettdigital.com/universal-web-client/master/latest/vendor/comscore/streamsense.5.1.1.160316.min.js | 90 kB | 2023-03-13 | 2024-01-25 | |
Pretty
Loading... | ||||
cpt-static.gannettdigital.com/universal-web-client/master/latest/core/scripts/utils.js | 18 kB | 2023-03-09 | 2023-03-14 | |
Pretty
Loading... | ||||
cpt-static.gannettdigital.com/universal-web-client/master/latest/vendor/components/webcomponentsjs/custom-elements-es5-adapter.js | 938 B | 2023-03-07 | 2024-02-12 | |
Pretty
Loading... | ||||
atoms.uticaod.com/atoms-components/prod/dist/gannett-atoms-components/p-0cb08652.js | 8.9 kB | 2023-03-08 | 2023-12-30 | |
Pretty
Loading... | ||||
http:text/javascript;charset=utf-8,(function()%7B'use%20strict'%3Bvar%20CSS_URL_RX%3D%2F(url%5C()(%5B%5E)%5D*)(%5C))%2Fg%3Bvar%20ABS_URL%3D%2F(%5E%5C%2F)%7C(%5E%23)%7C(%5E%5B%5Cw-%5Cd%5D*%3A)%2F%3Bvar%20workingURL%3Dvoid%200%3Bvar%20resolveDoc%3Dvoid%200%3B%2F**%0A%20%20%20%20%20*%20Resolves%20the%20given%20URL%20against%20the%20provided%20%60baseUri'.%0A%20%20%20%20%20*%20%0A%20%20%20%20%20*%20Note%20that%20this%20function%20performs%20no%20resolution%20for%20URLs%20that%20start%0A%20%20%20%20%20*%20with%20%60%2F%60%20(absolute%20URLs)%20or%20%60%23%60%20(hash%20identifiers).%20%20For%20general%20purpose%0A%20%20%20%20%20*%20URL%20resolution%2C%20use%20%60window.URL%60.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40memberof%20Polymer.ResolveUrl%0A%20%20%20%20%20*%20%40param%20%7Bstring%7D%20url%20Input%20URL%20to%20resolve%0A%20%20%20%20%20*%20%40param%20%7B%3Fstring%3D%7D%20baseURI%20Base%20URI%20to%20resolve%20the%20URL%20against%0A%20%20%20%20%20*%20%40return%20%7Bstring%7D%20resolved%20URL%0A%20%20%20%20%20*%2Ffunction%20resolveUrl(url%2CbaseURI)%7Bif(url%26%26ABS_URL.test(url))%7Breturn%20url%3B%7D%2F%2F%20Lazy%20feature%20detection.%0Aif(workingURL%3D%3D%3Dundefined)%7BworkingURL%3Dfalse%3Btry%7Bvar%20u%3Dnew%20URL('b'%2C'http%3A%2F%2Fa')%3Bu.pathname%3D'c%2520d'%3BworkingURL%3Du.href%3D%3D%3D'http%3A%2F%2Fa%2Fc%2520d'%3B%7Dcatch(e)%7B%2F%2F%20silently%20fail%0A%7D%7Dif(!baseURI)%7BbaseURI%3Ddocument.baseURI%7C%7Cwindow.location.href%3B%7Dif(workingURL)%7Breturn%20new%20URL(url%2CbaseURI).href%3B%7D%2F%2F%20Fallback%20to%20creating%20an%20anchor%20into%20a%20disconnected%20document.%0Aif(!resolveDoc)%7BresolveDoc%3Ddocument.implementation.createHTMLDocument('temp')%3BresolveDoc.base%3DresolveDoc.createElement('base')%3BresolveDoc.head.appendChild(resolveDoc.base)%3BresolveDoc.anchor%3DresolveDoc.createElement('a')%3BresolveDoc.body.appendChild(resolveDoc.anchor)%3B%7DresolveDoc.base.href%3DbaseURI%3BresolveDoc.anchor.href%3Durl%3Breturn%20resolveDoc.anchor.href%7C%7Curl%3B%7D%2F**%0A%20%20%20%20%20*%20Resolves%20any%20relative%20URL's%20in%20the%20given%20CSS%20text%20against%20the%20provided%0A%20%20%20%20%20*%20%60ownerDocument%60's%20%60baseURI%60.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40memberof%20Polymer.ResolveUrl%0A%20%20%20%20%20*%20%40param%20%7Bstring%7D%20cssText%20CSS%20text%20to%20process%0A%20%20%20%20%20*%20%40param%20%7Bstring%7D%20baseURI%20Base%20URI%20to%20resolve%20the%20URL%20against%0A%20%20%20%20%20*%20%40return%20%7Bstring%7D%20Processed%20CSS%20text%20with%20resolved%20URL's%0A%20%20%20%20%20*%2Ffunction%20resolveCss(cssText%2CbaseURI)%7Breturn%20cssText.replace(CSS_URL_RX%2Cfunction(m%2Cpre%2Curl%2Cpost)%7Breturn%20pre%2B'%5C''%2BresolveUrl(url.replace(%2F%5B%22'%5D%2Fg%2C'')%2CbaseURI)%2B'%5C''%2Bpost%3B%7D)%3B%7D%2F**%0A%20%20%20%20%20*%20Returns%20a%20path%20from%20a%20given%20%60url%60.%20The%20path%20includes%20the%20trailing%0A%20%20%20%20%20*%20%60%2F%60%20from%20the%20url.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40memberof%20Polymer.ResolveUrl%0A%20%20%20%20%20*%20%40param%20%7Bstring%7D%20url%20Input%20URL%20to%20transform%0A%20%20%20%20%20*%20%40return%20%7Bstring%7D%20resolved%20path%0A%20%20%20%20%20*%2Ffunction%20pathFromUrl(url)%7Breturn%20url.substring(0%2Curl.lastIndexOf('%2F')%2B1)%3B%7D%2F**%0A%20%20%20%20%20*%20Module%20with%20utilities%20for%20resolving%20relative%20URL's.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40namespace%0A%20%20%20%20%20*%20%40memberof%20Polymer%0A%20%20%20%20%20*%20%40summary%20Module%20with%20utilities%20for%20resolving%20relative%20URL's.%0A%20%20%20%20%20*%2FPolymer.ResolveUrl%3D%7BresolveCss%3AresolveCss%2CresolveUrl%3AresolveUrl%2CpathFromUrl%3ApathFromUrl%7D%3B%7D)()%3B%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Fcpt-static.gannettdigital.com%2Funiversal-web-client%2Fmaster%2Flatest%2Fvendor%2Fcomponents%2Fpolymer%2Flib%2Futils%2Fresolve-url.html.js%0A | 2.7 kB | 2023-03-07 | 2024-01-25 | |
Pretty
Loading... | ||||
http:text/javascript;charset=utf-8,'use%20strict'%3Bvar%20siteColor%3Dwindow.ga_data.site.colors.siteColor%3Bif(siteColor!%3D%3Dundefined)%7Bdocument.documentElement.style.setProperty('--color-theme'%2CsiteColor)%3B%7D%0A%2F%2F%23%20sourceMappingURL%3D..%2F..%2Fmaps%2Fgallium%2Fthemes%2Funiversal.html_script_0.js.map%0A%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Fcpt-static.gannettdigital.com%2Funiversal-web-client%2Fmaster%2Flatest%2Fgallium%2Fthemes%2Funiversal.html.js%0A | 361 B | 2023-03-07 | 2024-01-25 | |
Pretty
Loading... | ||||
cpt-static.gannettdigital.com/universal-web-client/master/latest/vendor/components/shadycss/apply-shim.min.js | 11 kB | 2023-03-07 | 2024-02-06 | |
Pretty
Loading... | ||||
http:text/javascript;charset=utf-8,var%20_createClass%3Dfunction()%7Bfunction%20defineProperties(target%2Cprops)%7Bfor(var%20i%3D0%3Bi%3Cprops.length%3Bi%2B%2B)%7Bvar%20descriptor%3Dprops%5Bi%5D%3Bdescriptor.enumerable%3Ddescriptor.enumerable%7C%7Cfalse%3Bdescriptor.configurable%3Dtrue%3Bif(%22value%22in%20descriptor)descriptor.writable%3Dtrue%3BObject.defineProperty(target%2Cdescriptor.key%2Cdescriptor)%3B%7D%7Dreturn%20function(Constructor%2CprotoProps%2CstaticProps)%7Bif(protoProps)defineProperties(Constructor.prototype%2CprotoProps)%3Bif(staticProps)defineProperties(Constructor%2CstaticProps)%3Breturn%20Constructor%3B%7D%3B%7D()%3Bfunction%20_classCallCheck(instance%2CConstructor)%7Bif(!(instance%20instanceof%20Constructor))%7Bthrow%20new%20TypeError(%22Cannot%20call%20a%20class%20as%20a%20function%22)%3B%7D%7D(function()%7B'use%20strict'%3B%2F**%0A%20%20%20*%20%40summary%20Collapse%20multiple%20callbacks%20into%20one%20invocation%20after%20a%20timer.%0A%20%20%20*%20%40memberof%20Polymer%0A%20%20%20*%2Fvar%20Debouncer%3Dfunction()%7Bfunction%20Debouncer()%7B_classCallCheck(this%2CDebouncer)%3Bthis._asyncModule%3Dnull%3Bthis._callback%3Dnull%3Bthis._timer%3Dnull%3B%7D%2F**%0A%20%20%20%20%20*%20Sets%20the%20scheduler%3B%20that%20is%2C%20a%20module%20with%20the%20Async%20interface%2C%0A%20%20%20%20%20*%20a%20callback%20and%20optional%20arguments%20to%20be%20passed%20to%20the%20run%20function%0A%20%20%20%20%20*%20from%20the%20async%20module.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40param%20%7B!AsyncInterface%7D%20asyncModule%20Object%20with%20Async%20interface.%0A%20%20%20%20%20*%20%40param%20%7Bfunction()%7D%20callback%20Callback%20to%20run.%0A%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20*%2F_createClass(Debouncer%2C%5B%7Bkey%3A'setConfig'%2Cvalue%3Afunction%20setConfig(asyncModule%2Ccallback)%7Bvar%20_this%3Dthis%3Bthis._asyncModule%3DasyncModule%3Bthis._callback%3Dcallback%3Bthis._timer%3Dthis._asyncModule.run(function()%7B_this._timer%3Dnull%3B_this._callback()%3B%7D)%3B%7D%2F**%0A%20%20%20%20%20*%20Cancels%20an%20active%20debouncer%20and%20returns%20a%20reference%20to%20itself.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'cancel'%2Cvalue%3Afunction%20cancel()%7Bif(this.isActive())%7Bthis._asyncModule.cancel(this._timer)%3Bthis._timer%3Dnull%3B%7D%7D%2F**%0A%20%20%20%20%20*%20Flushes%20an%20active%20debouncer%20and%20returns%20a%20reference%20to%20itself.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'flush'%2Cvalue%3Afunction%20flush()%7Bif(this.isActive())%7Bthis.cancel()%3Bthis._callback()%3B%7D%7D%2F**%0A%20%20%20%20%20*%20Returns%20true%20if%20the%20debouncer%20is%20active.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40return%20%7Bboolean%7D%20True%20if%20active.%0A%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'isActive'%2Cvalue%3Afunction%20isActive()%7Breturn%20this._timer!%3Dnull%3B%7D%2F**%0A%20%20%20%20%20*%20Creates%20a%20debouncer%20if%20no%20debouncer%20is%20passed%20as%20a%20parameter%0A%20%20%20%20%20*%20or%20it%20cancels%20an%20active%20debouncer%20otherwise.%20The%20following%0A%20%20%20%20%20*%20example%20shows%20how%20a%20debouncer%20can%20be%20called%20multiple%20times%20within%20a%0A%20%20%20%20%20*%20microtask%20and%20%22debounced%22%20such%20that%20the%20provided%20callback%20function%20is%0A%20%20%20%20%20*%20called%20once.%20Add%20this%20method%20to%20a%20custom%20element%3A%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20_debounceWork()%20%7B%0A%20%20%20%20%20*%20%20%20this._debounceJob%20%3D%20Polymer.Debouncer.debounce(this._debounceJob%2C%0A%20%20%20%20%20*%20%20%20%20%20%20%20Polymer.Async.microTask%2C%20()%20%3D%3E%20%7B%0A%20%20%20%20%20*%20%20%20%20%20this._doWork()%3B%0A%20%20%20%20%20*%20%20%20%7D)%3B%0A%20%20%20%20%20*%20%7D%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20If%20the%20%60_debounceWork%60%20method%20is%20called%20multiple%20times%20within%20the%20same%0A%20%20%20%20%20*%20microtask%2C%20the%20%60_doWork%60%20function%20will%20be%20called%20only%20once%20at%20the%20next%0A%20%20%20%20%20*%20microtask%20checkpoint.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20Note%3A%20In%20testing%20it%20is%20often%20convenient%20to%20avoid%20asynchrony.%20To%20accomplish%0A%20%20%20%20%20*%20this%20with%20a%20debouncer%2C%20you%20can%20use%20%60Polymer.enqueueDebouncer%60%20and%0A%20%20%20%20%20*%20%60Polymer.flush%60.%20For%20example%2C%20extend%20the%20above%20example%20by%20adding%0A%20%20%20%20%20*%20%60Polymer.enqueueDebouncer(this._debounceJob)%60%20at%20the%20end%20of%20the%0A%20%20%20%20%20*%20%60_debounceWork%60%20method.%20Then%20in%20a%20test%2C%20call%20%60Polymer.flush%60%20to%20ensure%0A%20%20%20%20%20*%20the%20debouncer%20has%20completed.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40param%20%7BDebouncer%3F%7D%20debouncer%20Debouncer%20object.%0A%20%20%20%20%20*%20%40param%20%7B!AsyncInterface%7D%20asyncModule%20Object%20with%20Async%20interface%0A%20%20%20%20%20*%20%40param%20%7Bfunction()%7D%20callback%20Callback%20to%20run.%0A%20%20%20%20%20*%20%40return%20%7B!Debouncer%7D%20Returns%20a%20debouncer%20object.%0A%20%20%20%20%20*%2F%7D%5D%2C%5B%7Bkey%3A'debounce'%2Cvalue%3Afunction%20debounce(debouncer%2CasyncModule%2Ccallback)%7Bif(debouncer%20instanceof%20Debouncer)%7Bdebouncer.cancel()%3B%7Delse%7Bdebouncer%3Dnew%20Debouncer()%3B%7Ddebouncer.setConfig(asyncModule%2Ccallback)%3Breturn%20debouncer%3B%7D%7D%5D)%3Breturn%20Debouncer%3B%7D()%3B%2F**%20%40const%20*%2FPolymer.Debouncer%3DDebouncer%3B%7D)()%3B%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Fcpt-static.gannettdigital.com%2Funiversal-web-client%2Fmaster%2Flatest%2Fvendor%2Fcomponents%2Fpolymer%2Flib%2Futils%2Fdebounce.html.js%0A | 4.0 kB | 2023-03-07 | 2024-01-25 | |
Pretty
Loading... | ||||
http:text/javascript;charset=utf-8,'use%20strict'%3Bvar%20_createClass%3Dfunction()%7Bfunction%20defineProperties(target%2Cprops)%7Bfor(var%20i%3D0%3Bi%3Cprops.length%3Bi%2B%2B)%7Bvar%20descriptor%3Dprops%5Bi%5D%3Bdescriptor.enumerable%3Ddescriptor.enumerable%7C%7Cfalse%3Bdescriptor.configurable%3Dtrue%3Bif(%22value%22in%20descriptor)descriptor.writable%3Dtrue%3BObject.defineProperty(target%2Cdescriptor.key%2Cdescriptor)%3B%7D%7Dreturn%20function(Constructor%2CprotoProps%2CstaticProps)%7Bif(protoProps)defineProperties(Constructor.prototype%2CprotoProps)%3Bif(staticProps)defineProperties(Constructor%2CstaticProps)%3Breturn%20Constructor%3B%7D%3B%7D()%3Bvar%20_get%3Dfunction%20get(object%2Cproperty%2Creceiver)%7Bif(object%3D%3D%3Dnull)object%3DFunction.prototype%3Bvar%20desc%3DObject.getOwnPropertyDescriptor(object%2Cproperty)%3Bif(desc%3D%3D%3Dundefined)%7Bvar%20parent%3DObject.getPrototypeOf(object)%3Bif(parent%3D%3D%3Dnull)%7Breturn%20undefined%3B%7Delse%7Breturn%20get(parent%2Cproperty%2Creceiver)%3B%7D%7Delse%20if(%22value%22in%20desc)%7Breturn%20desc.value%3B%7Delse%7Bvar%20getter%3Ddesc.get%3Bif(getter%3D%3D%3Dundefined)%7Breturn%20undefined%3B%7Dreturn%20getter.call(receiver)%3B%7D%7D%3Bfunction%20_classCallCheck(instance%2CConstructor)%7Bif(!(instance%20instanceof%20Constructor))%7Bthrow%20new%20TypeError(%22Cannot%20call%20a%20class%20as%20a%20function%22)%3B%7D%7Dfunction%20_possibleConstructorReturn(self%2Ccall)%7Bif(!self)%7Bthrow%20new%20ReferenceError(%22this%20hasn't%20been%20initialised%20-%20super()%20hasn't%20been%20called%22)%3B%7Dreturn%20call%26%26(typeof%20call%3D%3D%3D%22object%22%7C%7Ctypeof%20call%3D%3D%3D%22function%22)%3Fcall%3Aself%3B%7Dfunction%20_inherits(subClass%2CsuperClass)%7Bif(typeof%20superClass!%3D%3D%22function%22%26%26superClass!%3D%3Dnull)%7Bthrow%20new%20TypeError(%22Super%20expression%20must%20either%20be%20null%20or%20a%20function%2C%20not%20%22%2Btypeof%20superClass)%3B%7DsubClass.prototype%3DObject.create(superClass%26%26superClass.prototype%2C%7Bconstructor%3A%7Bvalue%3AsubClass%2Cenumerable%3Afalse%2Cwritable%3Atrue%2Cconfigurable%3Atrue%7D%7D)%3Bif(superClass)Object.setPrototypeOf%3FObject.setPrototypeOf(subClass%2CsuperClass)%3AsubClass.__proto__%3DsuperClass%3B%7Dvar%20PartnerNudgeVideo%3Dfunction(_window%24ga_data%24mixin)%7B_inherits(PartnerNudgeVideo%2C_window%24ga_data%24mixin)%3Bfunction%20PartnerNudgeVideo()%7B_classCallCheck(this%2CPartnerNudgeVideo)%3Breturn%20_possibleConstructorReturn(this%2C(PartnerNudgeVideo.__proto__%7C%7CObject.getPrototypeOf(PartnerNudgeVideo)).apply(this%2Carguments))%3B%7D_createClass(PartnerNudgeVideo%2C%5B%7Bkey%3A'ready'%2Cvalue%3Afunction%20ready()%7B_get(PartnerNudgeVideo.prototype.__proto__%7C%7CObject.getPrototypeOf(PartnerNudgeVideo.prototype)%2C'ready'%2Cthis).call(this)%3Bthis.broadcast(this.constructor.is%2B'-ready'%2C%7Bel%3Athis%7D)%3B%7D%7D%2C%7Bkey%3A'initialize'%2Cvalue%3Afunction%20initialize(video)%7Bvar%20_this2%3Dthis%3Bif(!video.placementConfig.nudge)return%3B%2F%2F%20only%20load%20script%20and%20set%20events%20if%20sponsored%20video%20or%20placement%20for%20nudge%20is%20true%0Aif(video._isSponsored()%26%26video.placementConfig.nudge.enabled)%7Bthis.loadAndWaitForInit(video.placementConfig.nudge.scriptUrl%2C'nudge'%2C'ndg').then(function()%7B_this2._setupVideoEvents(video)%3B_this2.log('Nudge%20Loaded')%3B%7D).catch(function()%7B_this2.log('Nudge%20failed%20to%20load')%3B_this2.track('nudgeFailure')%3B%7D)%3B%7Delse%7Bthis.log('Nudge%20requirements%20not%20met%2C%20cancel%20load')%3B%7D%7D%7D%2C%7Bkey%3A'_setupVideoEvents'%2Cvalue%3Afunction%20_setupVideoEvents(video)%7Bvar%20_this3%3Dthis%3B%2F%2F%20set%20flags%0A%2F%2F%20no%20need%20to%20reset%20since%20continousplay%20is%20disabled%20for%20sponsored%20videos%0Avar%20play3Called%3Dfalse%2Cplay5Called%3Dfalse%3Bvar%20stateChange%3Dfunction%20stateChange(e)%7Bvar%20vid%3D_this3.getNested(e%2C'detail'%2C'video')%3Bif(vid%26%26vid.isVideo)%7Bswitch(vid.state)%7Bcase%20vid.states.STARTED%3Awindow.ndg('play'%2Cvid.data.id%2C%7B'title'%3Avid.data.title%7D)%3Bbreak%3Bcase%20vid.states.DONE%3Awindow.ndg('play_complete'%2Cvid.data.id%2C%7B'title'%3Avid.data.title%7D)%3Bvideo.videoTag.removeEventListener('timeupdate'%2CtimeChange)%3Bvideo.removeEventListener('state'%2CstateChange)%3Bbreak%3B%7D%7D%7D%3Bvar%20timeChange%3Dfunction%20timeChange()%7B%2F%2F%20required%20call%20at%203%20sec%20mark%0Aif(video.currentTime%3E%3D3%26%26!play3Called)%7Bwindow.ndg('play_3'%2Cvideo.data.id%2C%7B'title'%3Avideo.data.title%7D)%3Bplay3Called%3Dtrue%3B_this3.log('play%203%20called')%3B%7D%2F%2F%20required%20call%20at%205%20sec%20mark%0Aif(video.currentTime%3E%3D5%26%26!play5Called)%7Bwindow.ndg('play_5'%2Cvideo.data.id%2C%7B'title'%3Avideo.data.title%7D)%3Bplay5Called%3Dtrue%3B_this3.log('play%205%20called')%3B%7D%7D%3Bvideo.videoTag.addEventListener('timeupdate'%2CtimeChange)%3Bvideo.addEventListener('state'%2CstateChange)%3B%7D%7D%5D%2C%5B%7Bkey%3A'is'%2C%2F%2F%20eslint-disable-line%20new-cap%0Aget%3Afunction%20get()%7Breturn'partner-nudge-media-video'%3B%7D%7D%5D)%3Breturn%20PartnerNudgeVideo%3B%7D(window.ga_data.mixins.VideoUtils(Polymer.Element))%3BcustomElements.define(PartnerNudgeVideo.is%2CPartnerNudgeVideo)%3B%0A%2F%2F%23%20sourceMappingURL%3D..%2F..%2F..%2Fmaps%2Felements%2Fpartner%2Fpartner-nudge-media-video%2Fpartner-nudge-media-video.html_script_0.js.map%0A%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Fcpt-static.gannettdigital.com%2Funiversal-web-client%2Fmaster%2Flatest%2Felements%2Fpartner%2Fpartner-nudge-media-video%2Fpartner-nudge-media-video.html.js%0A | 4.5 kB | 2023-03-13 | 2024-01-25 | |
Pretty
Loading... | ||||
cpt-static.gannettdigital.com/universal-web-client/master/latest/vendor/components/webcomponentsjs/webcomponents-loader.js | 3.7 kB | 2023-03-07 | 2024-04-05 | |
Pretty
Loading... | ||||
cpt-static.gannettdigital.com/universal-web-client/master/latest/core/scripts/gallium.js | 12 kB | 2023-03-08 | 2024-01-25 | |
Pretty
Loading... | ||||
atoms.uticaod.com/atoms-components/prod/dist/gannett-atoms-components/gannett-atoms-components.esm.js | 20 kB | 2023-03-08 | 2023-03-13 | |
Pretty
Loading... | ||||
http:text/javascript;charset=utf-8,'use%20strict'%3Bwindow.ga_data.behaviors%3Dwindow.ga_data.behaviors%7C%7C%7B%7D%3B%2F**%20%40polymerBehavior%20window.ga_data.behaviors.AnalyticsElementBehavior%20*%2Fwindow.ga_data.behaviors.AnalyticsElementBehavior%3D%7B_flattenSsts%3Afunction%20_flattenSsts(acc%2Ccur)%7Breturn%20acc%2B(cur!%3D%3D''%3F'%3A'%2Bcur%3A'')%3B%7D%2C_getTypeValue%3Afunction%20_getTypeValue(route)%7Bvar%20contentType%3Droute.contentType%3Bswitch(route.contentType)%7Bcase'generic'%3AcontentType%3D'interactive'%3Bbreak%3Bcase'story'%3AcontentType%3D'article'%3Bbreak%3B%2F%2F%20TODO%3A%20Add%20support%20for%20standalone%20video%20%2F%20gallery%0A%7Dreturn%20contentType%3B%7D%2C%2F**%0A%20%20%20%20%20%20%20%20%20*%20Helper%20to%20get%20current%20time%20rounded%20to%20nearest%20half%20hour....%0A%20%20%20%20%20%20%20%20%20*%2F_getRoundedTimestamp%3Afunction%20_getRoundedTimestamp(date)%7Bif(!this._toLocaleStringSupportsLocales())return''%3Bvar%20realMin%3Ddate.getMinutes()%3Bif(realMin%3E45)%7Bdate.setMinutes(0)%3Bdate.setHours(date.getHours()%2B1)%3B%2F%2F%20Increment%2C%20will%20roll%20over%20(at%20least%20in%20chrome)%0A%7Delse%20if(realMin%3C15)%7Bdate.setMinutes(0)%3B%7Delse%7Bdate.setMinutes(30)%3B%7Dreturn%20date.toLocaleTimeString('en-US'%2C%7Bhour%3A'numeric'%2Cminute%3A'numeric'%7D).toLowerCase()%3B%7D%2C_getRoundedTimestampAndDayOfWeek%3Afunction%20_getRoundedTimestampAndDayOfWeek(date)%7Breturn%20this._getRoundedTimestamp(date)%2B'%7C'%2Bdate.toLocaleString('en-US'%2C%7Bweekday%3A'long'%7D)%3B%7D%2C%2F%2F%20https%3A%2F%2Fdeveloper.mozilla.org%2Fen-US%2Fdocs%2FWeb%2FJavaScript%2FReference%2FGlobal_Objects%2FDate%2FtoLocaleString%23Checking_for_support_for_locales_and_options_arguments%0A_toLocaleStringSupportsLocales%3Afunction%20_toLocaleStringSupportsLocales()%7Btry%7Bnew%20Date().toLocaleString('i')%3B%7Dcatch(e)%7Breturn%20e%20instanceof%20RangeError%3B%7Dreturn%20false%3B%7D%2C%2F**%0A%20%20%20%20%20%20%20%20*%20Helper%20to%20get%20user's%20meter%20state%0A%20%20%20%20%20%20%20%20*%20https%3A%2F%2Fconfluence.gannett.com%2Fdisplay%2FANALYTICS%2FUser%2BStatus%0A%20%20%20%20%20%20%20%20*%2F_getUserStatus%3Afunction%20_getUserStatus()%7Bvar%20user%3Darguments.length%3E0%26%26arguments%5B0%5D!%3D%3Dundefined%3Farguments%5B0%5D%3Afalse%3Bvar%20isAuthenticated%3Dvoid%200%2CmarketAccess%3Dvoid%200%2ClicenseType%3Dvoid%200%2Cguid%3Dvoid%200%2CuserStatus%3D'none'%3Bif(user)%7Bif(typeof%20user.meta!%3D%3D'undefined')%7BisAuthenticated%3Duser.meta.isAuthenticatedInCurrentContext%3B%7Dif(typeof%20user.response!%3D%3D'undefined')%7BmarketAccess%3Duser.response.user.hasMarketAccess%3BlicenseType%3Duser.response.user.userLicenseType%3Bguid%3Duser.response.user.userGuid%3B%7Dif(isAuthenticated%26%26marketAccess)%7BuserStatus%3DlicenseType%3B%7Delse%20if(isAuthenticated)%7BuserStatus%3D'authenticated'%3B%7Delse%20if(guid!%3D%3Dundefined)%7BuserStatus%3D'newsletter_guid'%3B%7D%7Dreturn%20userStatus%3B%7D%2C%2F**%0A%20%20%20%20%20%20%20%20*%20Helper%20to%20get%20user's%20meter%20state%0A%20%20%20%20%20%20%20%20*%20https%3A%2F%2Fconfluence.gannett.com%2Fdisplay%2FDATACOLLECTION%2FUser%2BMeter%2BState%0A%20%20%20%20%20%20%20%20*%2F_getUserMeterState%3Afunction%20_getUserMeterState()%7Bvar%20userAuthenticated%3Darguments.length%3E0%26%26arguments%5B0%5D!%3D%3Dundefined%3Farguments%5B0%5D%3Afalse%3Bvar%20state%3D'nothitpaywall'%3Bvar%20fireflyValue%3Dthis._getUserFireflyState()%3Bif(fireflyValue)%7Bvar%20remaining%3DfireflyValue.viewThreshold-fireflyValue.viewCount%3Bif(userAuthenticated)%7Bstate%3D'authorized'%3B%7Delse%20if(remaining%3E0)%7Bstate%3Dremaining%3B%7Delse%7Bstate%3D'nofreearticlesremaining'%3B%7D%7Dreturn%20state%3B%7D%2C%2F**%0A%20%20%20%20%20%20%20%20*%20Helper%20to%20get%20user's%20type%0A%20%20%20%20%20%20%20%20*%20https%3A%2F%2Fconfluence.gannett.com%2Fdisplay%2FDS%2FUser%2BType%0A%20%20%20%20%20%20%20%20*%2F_getUserType%3Afunction%20_getUserType()%7Bvar%20user%3Darguments.length%3E0%26%26arguments%5B0%5D!%3D%3Dundefined%3Farguments%5B0%5D%3Afalse%3Bvar%20userType%3D'anonymous'%3Bif(user)%7Bif(ga_data.utils.getNested(user%2C'response'%2C'user'%2C'hasMarketAccess'))%7BuserType%3D'subscriber'%3B%7Delse%20if(!ga_data.utils.getNested(user%2C'meta'%2C'isAnonymous'))%7BuserType%3D'registered'%3B%7D%7Dreturn%20userType%3B%7D%2C%2F**%0A%20%20%20%20%20%20%20%20*%20Helper%20to%20get%20the%20identifier%20for%20the%20tag%20manager%20being%20used%0A%20%20%20%20%20%20%20%20*%20https%3A%2F%2Fconfluence.gannett.com%2Fdisplay%2FDS%2FPage%2BAnalytics%2BImplementation%0A%20%20%20%20%20%20%20%20*%2F_getPageAnalyticsImplementation%3Afunction%20_getPageAnalyticsImplementation()%7Breturn'UW%3A'%2Bga_data.server.clientVersion%2B'%3A'%2Bga_data.site.uaid%3B%7D%2C%2F**%0A%20%20%20%20%20%20%20%20*%20Helper%20to%20create%20a%20UUID%0A%20%20%20%20%20%20%20%20*%20Borrowed%20from%20https%3A%2F%2Fgithub.com%2FGannettDigital%2Fgupui%2Fblob%2Frelease%2Fgupui%2Fcore%2Fjs%2Fmath_uuid.js%0A%20%20%20%20%20%20%20%20*%2F_generateUuid%3Afunction%20_generateUuid(len%2Cradix)%7Bvar%20chars%3D'0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'.split('')%2Cuuid%3D%5B%5D%2Ci%3Bradix%3Dradix%7C%7Cchars.length%3Bif(len)%7B%2F%2F%20Compact%20form%0Afor(i%3D0%3Bi%3Clen%3Bi%2B%2B)%7Buuid%5Bi%5D%3Dchars%5B0%7CMath.random()*radix%5D%3B%7D%7Delse%7B%2F%2F%20rfc4122%2C%20version%204%20form%0Avar%20r%3B%2F%2F%20rfc4122%20requires%20these%20characters%0Auuid%5B8%5D%3Duuid%5B13%5D%3Duuid%5B18%5D%3Duuid%5B23%5D%3D'-'%3Buuid%5B14%5D%3D'4'%3B%2F%2F%20Fill%20in%20random%20data.%20%20At%20i%3D%3D19%20set%20the%20high%20bits%20of%20clock%20sequence%20as%0A%2F%2F%20per%20rfc4122%2C%20sec.%204.1.5%0Afor(i%3D0%3Bi%3C36%3Bi%2B%2B)%7Bif(!uuid%5Bi%5D)%7Br%3D0%7CMath.random()*16%3Buuid%5Bi%5D%3Dchars%5Bi%3D%3D19%3Fr%260x3%7C0x8%3Ar%5D%3B%7D%7D%7Dreturn%20uuid.join('')%3B%7D%2C%2F**%0A%20%20%20%20%20%20%20%20*%20Helper%20to%20get%20GUP%20Dynamic%20paywall%0A%20%20%20%20%20%20%20%20*%2F_getPaywallSegment%3Afunction%20_getPaywallSegment()%7Bvar%20gupInsights%3D%7B%7D%3Btry%7BgupInsights%3DJSON.parse(window.localStorage.getItem('user_insights'))%3B%7Dcatch(e)%7Bif(window.newrelic)window.newrelic.noticeError(e)%3B%7Dif(gupInsights)%7Breturn%20ga_data.utils.getNested(gupInsights%2C'cam-experience'%2C'id')%7C%7C''%3B%7Delse%7Breturn''%3B%7D%7D%7D%3B%0A%2F%2F%23%20sourceMappingURL%3D..%2F..%2Fmaps%2Fgallium%2Fbehaviors%2Fanalytics-element-behavior.html_script_0.js.map%0A%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Fcpt-static.gannettdigital.com%2Funiversal-web-client%2Fmaster%2Flatest%2Fgallium%2Fbehaviors%2Fanalytics-element-behavior.html.js%0A | 5.0 kB | 2023-03-13 | 2024-01-25 | |
Pretty
Loading... | ||||
http:text/javascript;charset=utf-8,'use%20strict'%3BPolymer(%7Bis%3A'promo-premium-indicator'%2Cbehaviors%3A%5Bwindow.ga_data.behaviors.GalliumElement%5D%2Cproperties%3A%7BlabelName%3A%7Btype%3AString%2Cvalue%3A'For%20Subscribers'%7D%2CisPremium%3A%7Btype%3ABoolean%2Cvalue%3Afalse%7D%2Cicon%3A%7Btype%3ABoolean%2Cvalue%3Afalse%7D%2Clabel%3A%7Btype%3ABoolean%2Cvalue%3Afalse%7D%2Chybrid%3A%7Btype%3ABoolean%2Cvalue%3Afalse%7D%7D%2CframeworkReady%3Afunction%20frameworkReady()%7Bif(this.isPremium)%7Bvar%20_ref%3Dga_data.utils.getNested(ga_data%2C'site'%2C'consumerMarketing')%7C%7C%7B%7D%2CpremiumLabel%3D_ref.premiumLabel%2CisPremiumLabelEnabled%3D_ref.isPremiumLabelEnabled%2CisPremiumIconEnabled%3D_ref.isPremiumIconEnabled%3Bvar%20isSubscriberLabelVariant%3Dga_data.intents.indexOf('variant-group%3Aso_indicator')%3E-1%3Bvar%20isStarIconVariant%3Dga_data.intents.indexOf('variant-group%3Aso_star')%3E-1%3Bif(this.label)%7Bthis.%24.labelContainer.hidden%3D!(isPremiumLabelEnabled%7C%7CisSubscriberLabelVariant)%3B%7Delse%20if(this.icon)%7Bthis.%24.iconContainer.hidden%3D!(isPremiumIconEnabled%7C%7CisStarIconVariant)%3B%7Delse%20if(this.hybrid)%7Bthis.%24.hybridContainer.hidden%3D!(isPremiumLabelEnabled%7C%7CisPremiumIconEnabled)%3B%7Dif(premiumLabel)this.labelName%3DpremiumLabel%3B%7D%7D%7D)%3B%0A%2F%2F%23%20sourceMappingURL%3D..%2F..%2F..%2Fmaps%2Felements%2Fpromo%2Fpromo-premium-indicator%2Fpromo-premium-indicator.html_script_0.js.map%0A%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Fcpt-static.gannettdigital.com%2Funiversal-web-client%2Fmaster%2Flatest%2Felements%2Fpromo%2Fpromo-premium-indicator%2Fpromo-premium-indicator.html.js%0A | 1.3 kB | 2023-03-13 | 2024-01-25 | |
Pretty
Loading... | ||||
eu.uticaod.com/story/sports/2021/01/23/section-iii-has-work-do-after-ny-covid-19-high-risk-high-school-sports-get-ok/6686662002/ | 3.0 kB | 2023-03-13 | 2024-01-25 | |
Pretty
Loading... | ||||
http:text/javascript;charset=utf-8,var%20_createClass%3Dfunction()%7Bfunction%20defineProperties(target%2Cprops)%7Bfor(var%20i%3D0%3Bi%3Cprops.length%3Bi%2B%2B)%7Bvar%20descriptor%3Dprops%5Bi%5D%3Bdescriptor.enumerable%3Ddescriptor.enumerable%7C%7Cfalse%3Bdescriptor.configurable%3Dtrue%3Bif(%22value%22in%20descriptor)descriptor.writable%3Dtrue%3BObject.defineProperty(target%2Cdescriptor.key%2Cdescriptor)%3B%7D%7Dreturn%20function(Constructor%2CprotoProps%2CstaticProps)%7Bif(protoProps)defineProperties(Constructor.prototype%2CprotoProps)%3Bif(staticProps)defineProperties(Constructor%2CstaticProps)%3Breturn%20Constructor%3B%7D%3B%7D()%3Bfunction%20_classCallCheck(instance%2CConstructor)%7Bif(!(instance%20instanceof%20Constructor))%7Bthrow%20new%20TypeError(%22Cannot%20call%20a%20class%20as%20a%20function%22)%3B%7D%7Dfunction%20_possibleConstructorReturn(self%2Ccall)%7Bif(!self)%7Bthrow%20new%20ReferenceError(%22this%20hasn't%20been%20initialised%20-%20super()%20hasn't%20been%20called%22)%3B%7Dreturn%20call%26%26(typeof%20call%3D%3D%3D%22object%22%7C%7Ctypeof%20call%3D%3D%3D%22function%22)%3Fcall%3Aself%3B%7Dfunction%20_inherits(subClass%2CsuperClass)%7Bif(typeof%20superClass!%3D%3D%22function%22%26%26superClass!%3D%3Dnull)%7Bthrow%20new%20TypeError(%22Super%20expression%20must%20either%20be%20null%20or%20a%20function%2C%20not%20%22%2Btypeof%20superClass)%3B%7DsubClass.prototype%3DObject.create(superClass%26%26superClass.prototype%2C%7Bconstructor%3A%7Bvalue%3AsubClass%2Cenumerable%3Afalse%2Cwritable%3Atrue%2Cconfigurable%3Atrue%7D%7D)%3Bif(superClass)Object.setPrototypeOf%3FObject.setPrototypeOf(subClass%2CsuperClass)%3AsubClass.__proto__%3DsuperClass%3B%7D(function()%7B'use%20strict'%3Bvar%20walker%3Ddocument.createTreeWalker(document%2CNodeFilter.SHOW_ALL%2Cnull%2Cfalse)%3B%2F%2F%201.x%20backwards-compatible%20auto-wrapper%20for%20template%20type%20extensions%0A%2F%2F%20This%20is%20a%20clear%20layering%20violation%20and%20gives%20favored-nation%20status%20to%0A%2F%2F%20dom-if%20and%20dom-repeat%20templates.%20%20This%20is%20a%20conceit%20we're%20choosing%20to%20keep%0A%2F%2F%20a.)%20to%20ease%201.x%20backwards-compatibility%20due%20to%20loss%20of%20%60is%60%2C%20and%0A%2F%2F%20b.)%20to%20maintain%20if%2Frepeat%20capability%20in%20parser-constrained%20elements%0A%2F%2F%20%20%20%20%20(e.g.%20table%2C%20select)%20in%20lieu%20of%20native%20CE%20type%20extensions%20without%0A%2F%2F%20%20%20%20%20massive%20new%20invention%20in%20this%20space%20(e.g.%20directive%20system)%0Avar%20templateExtensions%3D%7B'dom-if'%3Atrue%2C'dom-repeat'%3Atrue%7D%3Bfunction%20wrapTemplateExtension(node)%7Bvar%20is%3Dnode.getAttribute('is')%3Bif(is%26%26templateExtensions%5Bis%5D)%7Bvar%20t%3Dnode%3Bt.removeAttribute('is')%3Bnode%3Dt.ownerDocument.createElement(is)%3Bt.parentNode.replaceChild(node%2Ct)%3Bnode.appendChild(t)%3Bwhile(t.attributes.length)%7Bnode.setAttribute(t.attributes%5B0%5D.name%2Ct.attributes%5B0%5D.value)%3Bt.removeAttribute(t.attributes%5B0%5D.name)%3B%7D%7Dreturn%20node%3B%7Dfunction%20findTemplateNode(root%2CnodeInfo)%7B%2F%2F%20recursively%20ascend%20tree%20until%20we%20hit%20root%0Avar%20parent%3DnodeInfo.parentInfo%26%26findTemplateNode(root%2CnodeInfo.parentInfo)%3B%2F%2F%20unwind%20the%20stack%2C%20returning%20the%20indexed%20node%20at%20each%20level%0Aif(parent)%7B%2F%2F%20note%3A%20marginally%20faster%20than%20indexing%20via%20childNodes%0A%2F%2F%20(http%3A%2F%2Fjsperf.com%2Fchildnodes-lookup)%0Awalker.currentNode%3Dparent%3Bfor(var%20n%3Dwalker.firstChild()%2Ci%3D0%3Bn%3Bn%3Dwalker.nextSibling())%7Bif(nodeInfo.parentIndex%3D%3D%3Di%2B%2B)%7Breturn%20n%3B%7D%7D%7Delse%7Breturn%20root%3B%7D%7D%2F%2F%20construct%20%60%24%60%20map%20(from%20id%20annotations)%0Afunction%20applyIdToMap(inst%2Cmap%2Cnode%2CnodeInfo)%7Bif(nodeInfo.id)%7Bmap%5BnodeInfo.id%5D%3Dnode%3B%7D%7D%2F%2F%20install%20event%20listeners%20(from%20event%20annotations)%0Afunction%20applyEventListener(inst%2Cnode%2CnodeInfo)%7Bif(nodeInfo.events%26%26nodeInfo.events.length)%7Bfor(var%20j%3D0%2Ce%24%3DnodeInfo.events%2Ce%3Bj%3Ce%24.length%26%26(e%3De%24%5Bj%5D)%3Bj%2B%2B)%7Binst._addMethodEventListenerToNode(node%2Ce.name%2Ce.value%2Cinst)%3B%7D%7D%7D%2F%2F%20push%20configuration%20references%20at%20configure%20time%0Afunction%20applyTemplateContent(inst%2Cnode%2CnodeInfo)%7Bif(nodeInfo.templateInfo)%7Bnode._templateInfo%3DnodeInfo.templateInfo%3B%7D%7Dfunction%20createNodeEventHandler(context%2CeventName%2CmethodName)%7B%2F%2F%20Instances%20can%20optionally%20have%20a%20_methodHost%20which%20allows%20redirecting%20where%0A%2F%2F%20to%20find%20methods.%20Currently%20used%20by%20%60templatize%60.%0Acontext%3Dcontext._methodHost%7C%7Ccontext%3Bvar%20handler%3Dfunction%20handler(e)%7Bif(context%5BmethodName%5D)%7Bcontext%5BmethodName%5D(e%2Ce.detail)%3B%7Delse%7Bconsole.warn('listener%20method%20%60'%2BmethodName%2B'%60%20not%20defined')%3B%7D%7D%3Breturn%20handler%3B%7D%2F**%0A%20%20%20*%20Element%20mixin%20that%20provides%20basic%20template%20parsing%20and%20stamping%2C%20including%0A%20%20%20*%20the%20following%20template-related%20features%20for%20stamped%20templates%3A%0A%20%20%20*%0A%20%20%20*%20-%20Declarative%20event%20listeners%20(%60on-eventname%3D%22listener%22%60)%0A%20%20%20*%20-%20Map%20of%20node%20id's%20to%20stamped%20node%20instances%20(%60this.%24.id%60)%0A%20%20%20*%20-%20Nested%20template%20content%20caching%2Fremoval%20and%20re-installation%20(performance%0A%20%20%20*%20%20%20optimization)%0A%20%20%20*%0A%20%20%20*%20%40mixinFunction%0A%20%20%20*%20%40polymer%0A%20%20%20*%20%40memberof%20Polymer%0A%20%20%20*%20%40summary%20Element%20class%20mixin%20that%20provides%20basic%20template%20parsing%20and%20stamping%0A%20%20%20*%2FPolymer.TemplateStamp%3DPolymer.dedupingMixin(function(superClass)%7B%2F**%0A%20%20%20%20%20*%20%40polymer%0A%20%20%20%20%20*%20%40mixinClass%0A%20%20%20%20%20*%20%40implements%20%7BPolymer_TemplateStamp%7D%0A%20%20%20%20%20*%2Fvar%20TemplateStamp%3Dfunction(_superClass)%7B_inherits(TemplateStamp%2C_superClass)%3Bfunction%20TemplateStamp()%7B_classCallCheck(this%2CTemplateStamp)%3Breturn%20_possibleConstructorReturn(this%2C(TemplateStamp.__proto__%7C%7CObject.getPrototypeOf(TemplateStamp)).apply(this%2Carguments))%3B%7D_createClass(TemplateStamp%2C%5B%7Bkey%3A'_stampTemplate'%2C%2F**%0A%20%20%20%20%20%20%20*%20Clones%20the%20provided%20template%20content%20and%20returns%20a%20document%20fragment%0A%20%20%20%20%20%20%20*%20containing%20the%20cloned%20dom.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20The%20template%20is%20parsed%20(once%20and%20memoized)%20using%20this%20library's%0A%20%20%20%20%20%20%20*%20template%20parsing%20features%2C%20and%20provides%20the%20following%20value-added%0A%20%20%20%20%20%20%20*%20features%3A%0A%20%20%20%20%20%20%20*%20*%20Adds%20declarative%20event%20listeners%20for%20%60on-event%3D%22handler%22%60%20attributes%0A%20%20%20%20%20%20%20*%20*%20Generates%20an%20%22id%20map%22%20for%20all%20nodes%20with%20id's%20under%20%60%24%60%20on%20returned%0A%20%20%20%20%20%20%20*%20%20%20document%20fragment%0A%20%20%20%20%20%20%20*%20*%20Passes%20template%20info%20including%20%60content%60%20back%20to%20templates%20as%0A%20%20%20%20%20%20%20*%20%20%20%60_templateInfo%60%20(a%20performance%20optimization%20to%20avoid%20deep%20template%0A%20%20%20%20%20%20%20*%20%20%20cloning)%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20Note%20that%20the%20memoized%20template%20parsing%20process%20is%20destructive%20to%20the%0A%20%20%20%20%20%20%20*%20template%3A%20attributes%20for%20bindings%20and%20declarative%20event%20listeners%20are%0A%20%20%20%20%20%20%20*%20removed%20after%20being%20noted%20in%20notes%2C%20and%20any%20nested%20%60%3Ctemplate%3E.content%60%0A%20%20%20%20%20%20%20*%20is%20removed%20and%20stored%20in%20notes%20as%20well.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40param%20%7B!HTMLTemplateElement%7D%20template%20Template%20to%20stamp%0A%20%20%20%20%20%20%20*%20%40return%20%7B!StampedTemplate%7D%20Cloned%20template%20content%0A%20%20%20%20%20%20%20*%2Fvalue%3Afunction%20_stampTemplate(template)%7B%2F%2F%20Polyfill%20support%3A%20bootstrap%20the%20template%20if%20it%20has%20not%20already%20been%0Aif(template%26%26!template.content%26%26window.HTMLTemplateElement%26%26HTMLTemplateElement.decorate)%7BHTMLTemplateElement.decorate(template)%3B%7Dvar%20templateInfo%3Dthis.constructor._parseTemplate(template)%3Bvar%20nodeInfo%3DtemplateInfo.nodeInfoList%3Bvar%20content%3DtemplateInfo.content%7C%7Ctemplate.content%3Bvar%20dom%3D%2F**%20%40type%20%7BDocumentFragment%7D%20*%2Fdocument.importNode(content%2Ctrue)%3B%2F%2F%20NOTE%3A%20ShadyDom%20optimization%20indicating%20there%20is%20an%20insertion%20point%0Adom.__noInsertionPoint%3D!templateInfo.hasInsertionPoint%3Bvar%20nodes%3Ddom.nodeList%3Dnew%20Array(nodeInfo.length)%3Bdom.%24%3D%7B%7D%3Bfor(var%20i%3D0%2Cl%3DnodeInfo.length%2Cinfo%3Bi%3Cl%26%26(info%3DnodeInfo%5Bi%5D)%3Bi%2B%2B)%7Bvar%20node%3Dnodes%5Bi%5D%3DfindTemplateNode(dom%2Cinfo)%3BapplyIdToMap(this%2Cdom.%24%2Cnode%2Cinfo)%3BapplyTemplateContent(this%2Cnode%2Cinfo)%3BapplyEventListener(this%2Cnode%2Cinfo)%3B%7Ddom%3D%2F**%20%40type%20%7B!StampedTemplate%7D%20*%2Fdom%3B%2F%2F%20eslint-disable-line%20no-self-assign%0Areturn%20dom%3B%7D%2F**%0A%20%20%20%20%20%20%20*%20Adds%20an%20event%20listener%20by%20method%20name%20for%20the%20event%20provided.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20This%20method%20generates%20a%20handler%20function%20that%20looks%20up%20the%20method%0A%20%20%20%20%20%20%20*%20name%20at%20handling%20time.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40param%20%7B!Node%7D%20node%20Node%20to%20add%20listener%20on%0A%20%20%20%20%20%20%20*%20%40param%20%7Bstring%7D%20eventName%20Name%20of%20event%0A%20%20%20%20%20%20%20*%20%40param%20%7Bstring%7D%20methodName%20Name%20of%20method%0A%20%20%20%20%20%20%20*%20%40param%20%7B*%3D%7D%20context%20Context%20the%20method%20will%20be%20called%20on%20(defaults%0A%20%20%20%20%20%20%20*%20%20%20to%20%60node%60)%0A%20%20%20%20%20%20%20*%20%40return%20%7BFunction%7D%20Generated%20handler%20function%0A%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'_addMethodEventListenerToNode'%2Cvalue%3Afunction%20_addMethodEventListenerToNode(node%2CeventName%2CmethodName%2Ccontext)%7Bcontext%3Dcontext%7C%7Cnode%3Bvar%20handler%3DcreateNodeEventHandler(context%2CeventName%2CmethodName)%3Bthis._addEventListenerToNode(node%2CeventName%2Chandler)%3Breturn%20handler%3B%7D%2F**%0A%20%20%20%20%20%20%20*%20Override%20point%20for%20adding%20custom%20or%20simulated%20event%20handling.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40param%20%7B!Node%7D%20node%20Node%20to%20add%20event%20listener%20to%0A%20%20%20%20%20%20%20*%20%40param%20%7Bstring%7D%20eventName%20Name%20of%20event%0A%20%20%20%20%20%20%20*%20%40param%20%7Bfunction(!Event)%3Avoid%7D%20handler%20Listener%20function%20to%20add%0A%20%20%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'_addEventListenerToNode'%2Cvalue%3Afunction%20_addEventListenerToNode(node%2CeventName%2Chandler)%7Bnode.addEventListener(eventName%2Chandler)%3B%7D%2F**%0A%20%20%20%20%20%20%20*%20Override%20point%20for%20adding%20custom%20or%20simulated%20event%20handling.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40param%20%7B!Node%7D%20node%20Node%20to%20remove%20event%20listener%20from%0A%20%20%20%20%20%20%20*%20%40param%20%7Bstring%7D%20eventName%20Name%20of%20event%0A%20%20%20%20%20%20%20*%20%40param%20%7Bfunction(!Event)%3Avoid%7D%20handler%20Listener%20function%20to%20remove%0A%20%20%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'_removeEventListenerFromNode'%2Cvalue%3Afunction%20_removeEventListenerFromNode(node%2CeventName%2Chandler)%7Bnode.removeEventListener(eventName%2Chandler)%3B%7D%7D%5D%2C%5B%7Bkey%3A'_parseTemplate'%2C%2F**%0A%20%20%20%20%20%20%20*%20Scans%20a%20template%20to%20produce%20template%20metadata.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20Template-specific%20metadata%20are%20stored%20in%20the%20object%20returned%2C%20and%20node-%0A%20%20%20%20%20%20%20*%20specific%20metadata%20are%20stored%20in%20objects%20in%20its%20flattened%20%60nodeInfoList%60%0A%20%20%20%20%20%20%20*%20array.%20%20Only%20nodes%20in%20the%20template%20that%20were%20parsed%20as%20nodes%20of%0A%20%20%20%20%20%20%20*%20interest%20contain%20an%20object%20in%20%60nodeInfoList%60.%20%20Each%20%60nodeInfo%60%20object%0A%20%20%20%20%20%20%20*%20contains%20an%20%60index%60%20(%60childNodes%60%20index%20in%20parent)%20and%20optionally%0A%20%20%20%20%20%20%20*%20%60parent%60%2C%20which%20points%20to%20node%20info%20of%20its%20parent%20(including%20its%20index).%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20The%20template%20metadata%20object%20returned%20from%20this%20method%20has%20the%20following%0A%20%20%20%20%20%20%20*%20structure%20(many%20fields%20optional)%3A%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%60%60%60js%0A%20%20%20%20%20%20%20*%20%20%20%7B%0A%20%20%20%20%20%20%20*%20%20%20%20%20%2F%2F%20Flattened%20list%20of%20node%20metadata%20(for%20nodes%20that%20generated%20metadata)%0A%20%20%20%20%20%20%20*%20%20%20%20%20nodeInfoList%3A%20%5B%0A%20%20%20%20%20%20%20*%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20*%20%20%20%20%20%20%20%20%20%2F%2F%20%60id%60%20attribute%20for%20any%20nodes%20with%20id's%20for%20generating%20%60%24%60%20map%0A%20%20%20%20%20%20%20*%20%20%20%20%20%20%20%20%20id%3A%20%7Bstring%7D%2C%0A%20%20%20%20%20%20%20*%20%20%20%20%20%20%20%20%20%2F%2F%20%60on-event%3D%22handler%22%60%20metadata%0A%20%20%20%20%20%20%20*%20%20%20%20%20%20%20%20%20events%3A%20%5B%0A%20%20%20%20%20%20%20*%20%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20*%20%20%20%20%20%20%20%20%20%20%20%20%20name%3A%20%7Bstring%7D%2C%20%20%20%2F%2F%20event%20name%0A%20%20%20%20%20%20%20*%20%20%20%20%20%20%20%20%20%20%20%20%20value%3A%20%7Bstring%7D%2C%20%20%2F%2F%20handler%20method%20name%0A%20%20%20%20%20%20%20*%20%20%20%20%20%20%20%20%20%20%20%7D%2C%20...%0A%20%20%20%20%20%20%20*%20%20%20%20%20%20%20%20%20%5D%2C%0A%20%20%20%20%20%20%20*%20%20%20%20%20%20%20%20%20%2F%2F%20Notes%20when%20the%20template%20contained%20a%20%60%3Cslot%3E%60%20for%20shady%20DOM%0A%20%20%20%20%20%20%20*%20%20%20%20%20%20%20%20%20%2F%2F%20optimization%20purposes%0A%20%20%20%20%20%20%20*%20%20%20%20%20%20%20%20%20hasInsertionPoint%3A%20%7Bboolean%7D%2C%0A%20%20%20%20%20%20%20*%20%20%20%20%20%20%20%20%20%2F%2F%20For%20nested%20%60%3Ctemplate%3E%60%60%20nodes%2C%20nested%20template%20metadata%0A%20%20%20%20%20%20%20*%20%20%20%20%20%20%20%20%20templateInfo%3A%20%7Bobject%7D%2C%20%2F%2F%20nested%20template%20metadata%0A%20%20%20%20%20%20%20*%20%20%20%20%20%20%20%20%20%2F%2F%20Metadata%20to%20allow%20efficient%20retrieval%20of%20instanced%20node%0A%20%20%20%20%20%20%20*%20%20%20%20%20%20%20%20%20%2F%2F%20corresponding%20to%20this%20metadata%0A%20%20%20%20%20%20%20*%20%20%20%20%20%20%20%20%20parentInfo%3A%20%7Bnumber%7D%2C%20%20%20%2F%2F%20reference%20to%20parent%20nodeInfo%3E%0A%20%20%20%20%20%20%20*%20%20%20%20%20%20%20%20%20parentIndex%3A%20%7Bnumber%7D%2C%20%20%2F%2F%20index%20in%20parent's%20%60childNodes%60%20collection%0A%20%20%20%20%20%20%20*%20%20%20%20%20%20%20%20%20infoIndex%3A%20%7Bnumber%7D%2C%20%20%20%20%2F%2F%20index%20of%20this%20%60nodeInfo%60%20in%20%60templateInfo.nodeInfoList%60%0A%20%20%20%20%20%20%20*%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20*%20%20%20%20%20%20%20...%0A%20%20%20%20%20%20%20*%20%20%20%20%20%5D%2C%0A%20%20%20%20%20%20%20*%20%20%20%20%20%2F%2F%20When%20true%2C%20the%20template%20had%20the%20%60strip-whitespace%60%20attribute%0A%20%20%20%20%20%20%20*%20%20%20%20%20%2F%2F%20or%20was%20nested%20in%20a%20template%20with%20that%20setting%0A%20%20%20%20%20%20%20*%20%20%20%20%20stripWhitespace%3A%20%7Bboolean%7D%2C%0A%20%20%20%20%20%20%20*%20%20%20%20%20%2F%2F%20For%20nested%20templates%2C%20nested%20template%20content%20is%20moved%20into%0A%20%20%20%20%20%20%20*%20%20%20%20%20%2F%2F%20a%20document%20fragment%20stored%20here%3B%20this%20is%20an%20optimization%20to%0A%20%20%20%20%20%20%20*%20%20%20%20%20%2F%2F%20avoid%20the%20cost%20of%20nested%20template%20cloning%0A%20%20%20%20%20%20%20*%20%20%20%20%20content%3A%20%7BDocumentFragment%7D%0A%20%20%20%20%20%20%20*%20%20%20%7D%0A%20%20%20%20%20%20%20*%20%60%60%60%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20This%20method%20kicks%20off%20a%20recursive%20treewalk%20as%20follows%3A%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%60%60%60%0A%20%20%20%20%20%20%20*%20%20%20%20_parseTemplate%20%3C---------------------%2B%0A%20%20%20%20%20%20%20*%20%20%20%20%20%20_parseTemplateContent%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7C%0A%20%20%20%20%20%20%20*%20%20%20%20%20%20%20%20_parseTemplateNode%20%20%3C------------%7C--%2B%0A%20%20%20%20%20%20%20*%20%20%20%20%20%20%20%20%20%20_parseTemplateNestedTemplate%20--%2B%20%20%7C%0A%20%20%20%20%20%20%20*%20%20%20%20%20%20%20%20%20%20_parseTemplateChildNodes%20---------%2B%0A%20%20%20%20%20%20%20*%20%20%20%20%20%20%20%20%20%20_parseTemplateNodeAttributes%0A%20%20%20%20%20%20%20*%20%20%20%20%20%20%20%20%20%20%20%20_parseTemplateNodeAttribute%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%60%60%60%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20These%20methods%20may%20be%20overridden%20to%20add%20custom%20metadata%20about%20templates%0A%20%20%20%20%20%20%20*%20to%20either%20%60templateInfo%60%20or%20%60nodeInfo%60.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20Note%20that%20this%20method%20may%20be%20destructive%20to%20the%20template%2C%20in%20that%0A%20%20%20%20%20%20%20*%20e.g.%20event%20annotations%20may%20be%20removed%20after%20being%20noted%20in%20the%0A%20%20%20%20%20%20%20*%20template%20metadata.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40param%20%7B!HTMLTemplateElement%7D%20template%20Template%20to%20parse%0A%20%20%20%20%20%20%20*%20%40param%20%7BTemplateInfo%3D%7D%20outerTemplateInfo%20Template%20metadata%20from%20the%20outer%0A%20%20%20%20%20%20%20*%20%20%20template%2C%20for%20parsing%20nested%20templates%0A%20%20%20%20%20%20%20*%20%40return%20%7B!TemplateInfo%7D%20Parsed%20template%20metadata%0A%20%20%20%20%20%20%20*%2Fvalue%3Afunction%20_parseTemplate(template%2CouterTemplateInfo)%7B%2F%2F%20since%20a%20template%20may%20be%20re-used%2C%20memo-ize%20metadata%0Aif(!template._templateInfo)%7Bvar%20templateInfo%3Dtemplate._templateInfo%3D%7B%7D%3BtemplateInfo.nodeInfoList%3D%5B%5D%3BtemplateInfo.stripWhiteSpace%3DPolymer.legacyOptimizations%7C%7CouterTemplateInfo%26%26outerTemplateInfo.stripWhiteSpace%7C%7Ctemplate.hasAttribute('strip-whitespace')%3Bthis._parseTemplateContent(template%2CtemplateInfo%2C%7Bparent%3Anull%7D)%3B%7Dreturn%20template._templateInfo%3B%7D%7D%2C%7Bkey%3A'_parseTemplateContent'%2Cvalue%3Afunction%20_parseTemplateContent(template%2CtemplateInfo%2CnodeInfo)%7Breturn%20this._parseTemplateNode(template.content%2CtemplateInfo%2CnodeInfo)%3B%7D%2F**%0A%20%20%20%20%20%20%20*%20Parses%20template%20node%20and%20adds%20template%20and%20node%20metadata%20based%20on%0A%20%20%20%20%20%20%20*%20the%20current%20node%2C%20and%20its%20%60childNodes%60%20and%20%60attributes%60.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20This%20method%20may%20be%20overridden%20to%20add%20custom%20node%20or%20template%20specific%0A%20%20%20%20%20%20%20*%20metadata%20based%20on%20this%20node.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40param%20%7BNode%7D%20node%20Node%20to%20parse%0A%20%20%20%20%20%20%20*%20%40param%20%7B!TemplateInfo%7D%20templateInfo%20Template%20metadata%20for%20current%20template%0A%20%20%20%20%20%20%20*%20%40param%20%7B!NodeInfo%7D%20nodeInfo%20Node%20metadata%20for%20current%20template.%0A%20%20%20%20%20%20%20*%20%40return%20%7Bboolean%7D%20%60true%60%20if%20the%20visited%20node%20added%20node-specific%0A%20%20%20%20%20%20%20*%20%20%20metadata%20to%20%60nodeInfo%60%0A%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'_parseTemplateNode'%2Cvalue%3Afunction%20_parseTemplateNode(node%2CtemplateInfo%2CnodeInfo)%7Bvar%20noted%3Dvoid%200%3Bvar%20element%3D%2F**%20%40type%20%7BElement%7D%20*%2Fnode%3Bif(element.localName%3D%3D'template'%26%26!element.hasAttribute('preserve-content'))%7Bnoted%3Dthis._parseTemplateNestedTemplate(element%2CtemplateInfo%2CnodeInfo)%7C%7Cnoted%3B%7Delse%20if(element.localName%3D%3D%3D'slot')%7B%2F%2F%20For%20ShadyDom%20optimization%2C%20indicating%20there%20is%20an%20insertion%20point%0AtemplateInfo.hasInsertionPoint%3Dtrue%3B%7Dwalker.currentNode%3Delement%3Bif(walker.firstChild())%7Bnoted%3Dthis._parseTemplateChildNodes(element%2CtemplateInfo%2CnodeInfo)%7C%7Cnoted%3B%7Dif(element.hasAttributes%26%26element.hasAttributes())%7Bnoted%3Dthis._parseTemplateNodeAttributes(element%2CtemplateInfo%2CnodeInfo)%7C%7Cnoted%3B%7Dreturn%20noted%3B%7D%2F**%0A%20%20%20%20%20%20%20*%20Parses%20template%20child%20nodes%20for%20the%20given%20root%20node.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20This%20method%20also%20wraps%20whitelisted%20legacy%20template%20extensions%0A%20%20%20%20%20%20%20*%20(%60is%3D%22dom-if%22%60%20and%20%60is%3D%22dom-repeat%22%60)%20with%20their%20equivalent%20element%0A%20%20%20%20%20%20%20*%20wrappers%2C%20collapses%20text%20nodes%2C%20and%20strips%20whitespace%20from%20the%20template%0A%20%20%20%20%20%20%20*%20if%20the%20%60templateInfo.stripWhitespace%60%20setting%20was%20provided.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40param%20%7BNode%7D%20root%20Root%20node%20whose%20%60childNodes%60%20will%20be%20parsed%0A%20%20%20%20%20%20%20*%20%40param%20%7B!TemplateInfo%7D%20templateInfo%20Template%20metadata%20for%20current%20template%0A%20%20%20%20%20%20%20*%20%40param%20%7B!NodeInfo%7D%20nodeInfo%20Node%20metadata%20for%20current%20template.%0A%20%20%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'_parseTemplateChildNodes'%2Cvalue%3Afunction%20_parseTemplateChildNodes(root%2CtemplateInfo%2CnodeInfo)%7Bif(root.localName%3D%3D%3D'script'%7C%7Croot.localName%3D%3D%3D'style')%7Breturn%3B%7Dwalker.currentNode%3Droot%3Bfor(var%20node%3Dwalker.firstChild()%2CparentIndex%3D0%2Cnext%3Bnode%3Bnode%3Dnext)%7B%2F%2F%20Wrap%20templates%0Aif(node.localName%3D%3D'template')%7Bnode%3DwrapTemplateExtension(node)%3B%7D%2F%2F%20collapse%20adjacent%20textNodes%3A%20fixes%20an%20IE%20issue%20that%20can%20cause%0A%2F%2F%20text%20nodes%20to%20be%20inexplicably%20split%20%3D(%0A%2F%2F%20note%20that%20root.normalize()%20should%20work%20but%20does%20not%20so%20we%20do%20this%0A%2F%2F%20manually.%0Awalker.currentNode%3Dnode%3Bnext%3Dwalker.nextSibling()%3Bif(node.nodeType%3D%3D%3DNode.TEXT_NODE)%7Bvar%2F**%20Node%20*%2Fn%3Dnext%3Bwhile(n%26%26n.nodeType%3D%3D%3DNode.TEXT_NODE)%7Bnode.textContent%2B%3Dn.textContent%3Bnext%3Dwalker.nextSibling()%3Broot.removeChild(n)%3Bn%3Dnext%3B%7D%2F%2F%20optionally%20strip%20whitespace%0Aif(templateInfo.stripWhiteSpace%26%26!node.textContent.trim())%7Broot.removeChild(node)%3Bcontinue%3B%7D%7Dvar%20childInfo%3D%7BparentIndex%3AparentIndex%2CparentInfo%3AnodeInfo%7D%3Bif(this._parseTemplateNode(node%2CtemplateInfo%2CchildInfo))%7BchildInfo.infoIndex%3DtemplateInfo.nodeInfoList.push(%2F**%20%40type%20%7B!NodeInfo%7D%20*%2FchildInfo)-1%3B%7D%2F%2F%20Increment%20if%20not%20removed%0Awalker.currentNode%3Dnode%3Bif(walker.parentNode())%7BparentIndex%2B%2B%3B%7D%7D%7D%2F**%0A%20%20%20%20%20%20%20*%20Parses%20template%20content%20for%20the%20given%20nested%20%60%3Ctemplate%3E%60.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20Nested%20template%20info%20is%20stored%20as%20%60templateInfo%60%20in%20the%20current%20node's%0A%20%20%20%20%20%20%20*%20%60nodeInfo%60.%20%60template.content%60%20is%20removed%20and%20stored%20in%20%60templateInfo%60.%0A%20%20%20%20%20%20%20*%20It%20will%20then%20be%20the%20responsibility%20of%20the%20host%20to%20set%20it%20back%20to%20the%0A%20%20%20%20%20%20%20*%20template%20and%20for%20users%20stamping%20nested%20templates%20to%20use%20the%0A%20%20%20%20%20%20%20*%20%60_contentForTemplate%60%20method%20to%20retrieve%20the%20content%20for%20this%20template%0A%20%20%20%20%20%20%20*%20(an%20optimization%20to%20avoid%20the%20cost%20of%20cloning%20nested%20template%20content).%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40param%20%7BHTMLTemplateElement%7D%20node%20Node%20to%20parse%20(a%20%3Ctemplate%3E)%0A%20%20%20%20%20%20%20*%20%40param%20%7BTemplateInfo%7D%20outerTemplateInfo%20Template%20metadata%20for%20current%20template%0A%20%20%20%20%20%20%20*%20%20%20that%20includes%20the%20template%20%60node%60%0A%20%20%20%20%20%20%20*%20%40param%20%7B!NodeInfo%7D%20nodeInfo%20Node%20metadata%20for%20current%20template.%0A%20%20%20%20%20%20%20*%20%40return%20%7Bboolean%7D%20%60true%60%20if%20the%20visited%20node%20added%20node-specific%0A%20%20%20%20%20%20%20*%20%20%20metadata%20to%20%60nodeInfo%60%0A%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'_parseTemplateNestedTemplate'%2Cvalue%3Afunction%20_parseTemplateNestedTemplate(node%2CouterTemplateInfo%2CnodeInfo)%7Bvar%20templateInfo%3Dthis._parseTemplate(node%2CouterTemplateInfo)%3Bvar%20content%3DtemplateInfo.content%3Dnode.content.ownerDocument.createDocumentFragment()%3Bcontent.appendChild(node.content)%3BnodeInfo.templateInfo%3DtemplateInfo%3Breturn%20true%3B%7D%2F**%0A%20%20%20%20%20%20%20*%20Parses%20template%20node%20attributes%20and%20adds%20node%20metadata%20to%20%60nodeInfo%60%0A%20%20%20%20%20%20%20*%20for%20nodes%20of%20interest.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40param%20%7BElement%7D%20node%20Node%20to%20parse%0A%20%20%20%20%20%20%20*%20%40param%20%7BTemplateInfo%7D%20templateInfo%20Template%20metadata%20for%20current%20template%0A%20%20%20%20%20%20%20*%20%40param%20%7BNodeInfo%7D%20nodeInfo%20Node%20metadata%20for%20current%20template.%0A%20%20%20%20%20%20%20*%20%40return%20%7Bboolean%7D%20%60true%60%20if%20the%20visited%20node%20added%20node-specific%0A%20%20%20%20%20%20%20*%20%20%20metadata%20to%20%60nodeInfo%60%0A%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'_parseTemplateNodeAttributes'%2Cvalue%3Afunction%20_parseTemplateNodeAttributes(node%2CtemplateInfo%2CnodeInfo)%7B%2F%2F%20Make%20copy%20of%20original%20attribute%20list%2C%20since%20the%20order%20may%20change%0A%2F%2F%20as%20attributes%20are%20added%20and%20removed%0Avar%20noted%3Dfalse%3Bvar%20attrs%3DArray.from(node.attributes)%3Bfor(var%20i%3Dattrs.length-1%2Ca%3Ba%3Dattrs%5Bi%5D%3Bi--)%7Bnoted%3Dthis._parseTemplateNodeAttribute(node%2CtemplateInfo%2CnodeInfo%2Ca.name%2Ca.value)%7C%7Cnoted%3B%7Dreturn%20noted%3B%7D%2F**%0A%20%20%20%20%20%20%20*%20Parses%20a%20single%20template%20node%20attribute%20and%20adds%20node%20metadata%20to%0A%20%20%20%20%20%20%20*%20%60nodeInfo%60%20for%20attributes%20of%20interest.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20This%20implementation%20adds%20metadata%20for%20%60on-event%3D%22handler%22%60%20attributes%0A%20%20%20%20%20%20%20*%20and%20%60id%60%20attributes.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40param%20%7BElement%7D%20node%20Node%20to%20parse%0A%20%20%20%20%20%20%20*%20%40param%20%7B!TemplateInfo%7D%20templateInfo%20Template%20metadata%20for%20current%20template%0A%20%20%20%20%20%20%20*%20%40param%20%7B!NodeInfo%7D%20nodeInfo%20Node%20metadata%20for%20current%20template.%0A%20%20%20%20%20%20%20*%20%40param%20%7Bstring%7D%20name%20Attribute%20name%0A%20%20%20%20%20%20%20*%20%40param%20%7Bstring%7D%20value%20Attribute%20value%0A%20%20%20%20%20%20%20*%20%40return%20%7Bboolean%7D%20%60true%60%20if%20the%20visited%20node%20added%20node-specific%0A%20%20%20%20%20%20%20*%20%20%20metadata%20to%20%60nodeInfo%60%0A%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'_parseTemplateNodeAttribute'%2Cvalue%3Afunction%20_parseTemplateNodeAttribute(node%2CtemplateInfo%2CnodeInfo%2Cname%2Cvalue)%7B%2F%2F%20events%20(on-*)%0Aif(name.slice(0%2C3)%3D%3D%3D'on-')%7Bnode.removeAttribute(name)%3BnodeInfo.events%3DnodeInfo.events%7C%7C%5B%5D%3BnodeInfo.events.push(%7Bname%3Aname.slice(3)%2Cvalue%3Avalue%7D)%3Breturn%20true%3B%7D%2F%2F%20static%20id%0Aelse%20if(name%3D%3D%3D'id')%7BnodeInfo.id%3Dvalue%3Breturn%20true%3B%7Dreturn%20false%3B%7D%2F**%0A%20%20%20%20%20%20%20*%20Returns%20the%20%60content%60%20document%20fragment%20for%20a%20given%20template.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20For%20nested%20templates%2C%20Polymer%20performs%20an%20optimization%20to%20cache%20nested%0A%20%20%20%20%20%20%20*%20template%20content%20to%20avoid%20the%20cost%20of%20cloning%20deeply%20nested%20templates.%0A%20%20%20%20%20%20%20*%20This%20method%20retrieves%20the%20cached%20content%20for%20a%20given%20template.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40param%20%7BHTMLTemplateElement%7D%20template%20Template%20to%20retrieve%20%60content%60%20for%0A%20%20%20%20%20%20%20*%20%40return%20%7BDocumentFragment%7D%20Content%20fragment%0A%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'_contentForTemplate'%2Cvalue%3Afunction%20_contentForTemplate(template)%7Bvar%20templateInfo%3D%2F**%20%40type%20%7BHTMLTemplateElementWithInfo%7D%20*%2Ftemplate._templateInfo%3Breturn%20templateInfo%26%26templateInfo.content%7C%7Ctemplate.content%3B%7D%7D%5D)%3Breturn%20TemplateStamp%3B%7D(superClass)%3Breturn%20TemplateStamp%3B%7D)%3B%7D)()%3B%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Fcpt-static.gannettdigital.com%2Funiversal-web-client%2Fmaster%2Flatest%2Fvendor%2Fcomponents%2Fpolymer%2Flib%2Fmixins%2Ftemplate-stamp.html.js%0A | 20 kB | 2023-03-07 | 2024-01-25 | |
Pretty
Loading... | ||||
http:text/javascript;charset=utf-8,var%20_get%3Dfunction%20get(object%2Cproperty%2Creceiver)%7Bif(object%3D%3D%3Dnull)object%3DFunction.prototype%3Bvar%20desc%3DObject.getOwnPropertyDescriptor(object%2Cproperty)%3Bif(desc%3D%3D%3Dundefined)%7Bvar%20parent%3DObject.getPrototypeOf(object)%3Bif(parent%3D%3D%3Dnull)%7Breturn%20undefined%3B%7Delse%7Breturn%20get(parent%2Cproperty%2Creceiver)%3B%7D%7Delse%20if(%22value%22in%20desc)%7Breturn%20desc.value%3B%7Delse%7Bvar%20getter%3Ddesc.get%3Bif(getter%3D%3D%3Dundefined)%7Breturn%20undefined%3B%7Dreturn%20getter.call(receiver)%3B%7D%7D%3Bvar%20_createClass%3Dfunction()%7Bfunction%20defineProperties(target%2Cprops)%7Bfor(var%20i%3D0%3Bi%3Cprops.length%3Bi%2B%2B)%7Bvar%20descriptor%3Dprops%5Bi%5D%3Bdescriptor.enumerable%3Ddescriptor.enumerable%7C%7Cfalse%3Bdescriptor.configurable%3Dtrue%3Bif(%22value%22in%20descriptor)descriptor.writable%3Dtrue%3BObject.defineProperty(target%2Cdescriptor.key%2Cdescriptor)%3B%7D%7Dreturn%20function(Constructor%2CprotoProps%2CstaticProps)%7Bif(protoProps)defineProperties(Constructor.prototype%2CprotoProps)%3Bif(staticProps)defineProperties(Constructor%2CstaticProps)%3Breturn%20Constructor%3B%7D%3B%7D()%3Bfunction%20_classCallCheck(instance%2CConstructor)%7Bif(!(instance%20instanceof%20Constructor))%7Bthrow%20new%20TypeError(%22Cannot%20call%20a%20class%20as%20a%20function%22)%3B%7D%7Dfunction%20_possibleConstructorReturn(self%2Ccall)%7Bif(!self)%7Bthrow%20new%20ReferenceError(%22this%20hasn't%20been%20initialised%20-%20super()%20hasn't%20been%20called%22)%3B%7Dreturn%20call%26%26(typeof%20call%3D%3D%3D%22object%22%7C%7Ctypeof%20call%3D%3D%3D%22function%22)%3Fcall%3Aself%3B%7Dfunction%20_inherits(subClass%2CsuperClass)%7Bif(typeof%20superClass!%3D%3D%22function%22%26%26superClass!%3D%3Dnull)%7Bthrow%20new%20TypeError(%22Super%20expression%20must%20either%20be%20null%20or%20a%20function%2C%20not%20%22%2Btypeof%20superClass)%3B%7DsubClass.prototype%3DObject.create(superClass%26%26superClass.prototype%2C%7Bconstructor%3A%7Bvalue%3AsubClass%2Cenumerable%3Afalse%2Cwritable%3Atrue%2Cconfigurable%3Atrue%7D%7D)%3Bif(superClass)Object.setPrototypeOf%3FObject.setPrototypeOf(subClass%2CsuperClass)%3AsubClass.__proto__%3DsuperClass%3B%7D(function()%7B'use%20strict'%3Bvar%20TemplateInstanceBase%3DPolymer.TemplateInstanceBase%3B%2F%2F%20eslint-disable-line%0A%2F**%0A%20%20%20*%20%40constructor%0A%20%20%20*%20%40implements%20%7BPolymer_OptionalMutableData%7D%0A%20%20%20*%20%40extends%20%7BPolymer.Element%7D%0A%20%20%20*%20%40private%0A%20%20%20*%2Fvar%20domRepeatBase%3DPolymer.OptionalMutableData(Polymer.Element)%3B%2F**%0A%20%20%20*%20The%20%60%3Cdom-repeat%3E%60%20element%20will%20automatically%20stamp%20and%20binds%20one%20instance%0A%20%20%20*%20of%20template%20content%20to%20each%20object%20in%20a%20user-provided%20array.%0A%20%20%20*%20%60dom-repeat%60%20accepts%20an%20%60items%60%20property%2C%20and%20one%20instance%20of%20the%20template%0A%20%20%20*%20is%20stamped%20for%20each%20item%20into%20the%20DOM%20at%20the%20location%20of%20the%20%60dom-repeat%60%0A%20%20%20*%20element.%20%20The%20%60item%60%20property%20will%20be%20set%20on%20each%20instance's%20binding%0A%20%20%20*%20scope%2C%20thus%20templates%20should%20bind%20to%20sub-properties%20of%20%60item%60.%0A%20%20%20*%0A%20%20%20*%20Example%3A%0A%20%20%20*%0A%20%20%20*%20%60%60%60html%0A%20%20%20*%20%3Cdom-module%20id%3D%22employee-list%22%3E%0A%20%20%20*%0A%20%20%20*%20%20%20%3Ctemplate%3E%0A%20%20%20*%0A%20%20%20*%20%20%20%20%20%3Cdiv%3E%20Employee%20list%3A%20%3C%2Fdiv%3E%0A%20%20%20*%20%20%20%20%20%3Cdom-repeat%20items%3D%22%7B%7Bemployees%7D%7D%22%3E%0A%20%20%20*%20%20%20%20%20%20%20%3Ctemplate%3E%0A%20%20%20*%20%20%20%20%20%20%20%20%20%3Cdiv%3EFirst%20name%3A%20%3Cspan%3E%7B%7Bitem.first%7D%7D%3C%2Fspan%3E%3C%2Fdiv%3E%0A%20%20%20*%20%20%20%20%20%20%20%20%20%3Cdiv%3ELast%20name%3A%20%3Cspan%3E%7B%7Bitem.last%7D%7D%3C%2Fspan%3E%3C%2Fdiv%3E%0A%20%20%20*%20%20%20%20%20%20%20%3C%2Ftemplate%3E%0A%20%20%20*%20%20%20%20%20%3C%2Fdom-repeat%3E%0A%20%20%20*%0A%20%20%20*%20%20%20%3C%2Ftemplate%3E%0A%20%20%20*%0A%20%20%20*%20%3C%2Fdom-module%3E%0A%20%20%20*%20%60%60%60%0A%20%20%20*%0A%20%20%20*%20With%20the%20following%20custom%20element%20definition%3A%0A%20%20%20*%0A%20%20%20*%20%60%60%60js%0A%20%20%20*%20class%20EmployeeList%20extends%20Polymer.Element%20%7B%0A%20%20%20*%20%20%20static%20get%20is()%20%7B%20return%20'employee-list'%3B%20%7D%0A%20%20%20*%20%20%20static%20get%20properties()%20%7B%0A%20%20%20*%20%20%20%20%20return%20%7B%0A%20%20%20*%20%20%20%20%20%20%20employees%3A%20%7B%0A%20%20%20*%20%20%20%20%20%20%20%20%20value()%20%7B%0A%20%20%20*%20%20%20%20%20%20%20%20%20%20%20return%20%5B%0A%20%20%20*%20%20%20%20%20%20%20%20%20%20%20%20%20%7Bfirst%3A%20'Bob'%2C%20last%3A%20'Smith'%7D%2C%0A%20%20%20*%20%20%20%20%20%20%20%20%20%20%20%20%20%7Bfirst%3A%20'Sally'%2C%20last%3A%20'Johnson'%7D%2C%0A%20%20%20*%20%20%20%20%20%20%20%20%20%20%20%20%20...%0A%20%20%20*%20%20%20%20%20%20%20%20%20%20%20%5D%3B%0A%20%20%20*%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20*%20%20%20%20%20%20%20%7D%0A%20%20%20*%20%20%20%20%20%7D%3B%0A%20%20%20*%20%20%20%7D%0A%20%20%20*%20%7D%0A%20%20%20*%20%60%60%60%0A%20%20%20*%0A%20%20%20*%20Notifications%20for%20changes%20to%20items%20sub-properties%20will%20be%20forwarded%20to%20template%0A%20%20%20*%20instances%2C%20which%20will%20update%20via%20the%20normal%20structured%20data%20notification%20system.%0A%20%20%20*%0A%20%20%20*%20Mutations%20to%20the%20%60items%60%20array%20itself%20should%20be%20made%20using%20the%20Array%0A%20%20%20*%20mutation%20API's%20on%20%60Polymer.Base%60%20(%60push%60%2C%20%60pop%60%2C%20%60splice%60%2C%20%60shift%60%2C%0A%20%20%20*%20%60unshift%60)%2C%20and%20template%20instances%20will%20be%20kept%20in%20sync%20with%20the%20data%20in%20the%0A%20%20%20*%20array.%0A%20%20%20*%0A%20%20%20*%20Events%20caught%20by%20event%20handlers%20within%20the%20%60dom-repeat%60%20template%20will%20be%0A%20%20%20*%20decorated%20with%20a%20%60model%60%20property%2C%20which%20represents%20the%20binding%20scope%20for%0A%20%20%20*%20each%20template%20instance.%20%20The%20model%20is%20an%20instance%20of%20Polymer.Base%2C%20and%20should%0A%20%20%20*%20be%20used%20to%20manipulate%20data%20on%20the%20instance%2C%20for%20example%0A%20%20%20*%20%60event.model.set('item.checked'%2C%20true)%3B%60.%0A%20%20%20*%0A%20%20%20*%20Alternatively%2C%20the%20model%20for%20a%20template%20instance%20for%20an%20element%20stamped%20by%0A%20%20%20*%20a%20%60dom-repeat%60%20can%20be%20obtained%20using%20the%20%60modelForElement%60%20API%20on%20the%0A%20%20%20*%20%60dom-repeat%60%20that%20stamped%20it%2C%20for%20example%0A%20%20%20*%20%60this.%24.domRepeat.modelForElement(event.target).set('item.checked'%2C%20true)%3B%60.%0A%20%20%20*%20This%20may%20be%20useful%20for%20manipulating%20instance%20data%20of%20event%20targets%20obtained%0A%20%20%20*%20by%20event%20handlers%20on%20parents%20of%20the%20%60dom-repeat%60%20(event%20delegation).%0A%20%20%20*%0A%20%20%20*%20A%20view-specific%20filter%2Fsort%20may%20be%20applied%20to%20each%20%60dom-repeat%60%20by%20supplying%20a%0A%20%20%20*%20%60filter%60%20and%2For%20%60sort%60%20property.%20%20This%20may%20be%20a%20string%20that%20names%20a%20function%20on%0A%20%20%20*%20the%20host%2C%20or%20a%20function%20may%20be%20assigned%20to%20the%20property%20directly.%20%20The%20functions%0A%20%20%20*%20should%20implemented%20following%20the%20standard%20%60Array%60%20filter%2Fsort%20API.%0A%20%20%20*%0A%20%20%20*%20In%20order%20to%20re-run%20the%20filter%20or%20sort%20functions%20based%20on%20changes%20to%20sub-fields%0A%20%20%20*%20of%20%60items%60%2C%20the%20%60observe%60%20property%20may%20be%20set%20as%20a%20space-separated%20list%20of%0A%20%20%20*%20%60item%60%20sub-fields%20that%20should%20cause%20a%20re-filter%2Fsort%20when%20modified.%20%20If%0A%20%20%20*%20the%20filter%20or%20sort%20function%20depends%20on%20properties%20not%20contained%20in%20%60items%60%2C%0A%20%20%20*%20the%20user%20should%20observe%20changes%20to%20those%20properties%20and%20call%20%60render%60%20to%20update%0A%20%20%20*%20the%20view%20based%20on%20the%20dependency%20change.%0A%20%20%20*%0A%20%20%20*%20For%20example%2C%20for%20an%20%60dom-repeat%60%20with%20a%20filter%20of%20the%20following%3A%0A%20%20%20*%0A%20%20%20*%20%60%60%60js%0A%20%20%20*%20isEngineer(item)%20%7B%0A%20%20%20*%20%20%20return%20item.type%20%3D%3D%20'engineer'%20%7C%7C%20item.manager.type%20%3D%3D%20'engineer'%3B%0A%20%20%20*%20%7D%0A%20%20%20*%20%60%60%60%0A%20%20%20*%0A%20%20%20*%20Then%20the%20%60observe%60%20property%20should%20be%20configured%20as%20follows%3A%0A%20%20%20*%0A%20%20%20*%20%60%60%60html%0A%20%20%20*%20%3Cdom-repeat%20items%3D%22%7B%7Bemployees%7D%7D%22%20filter%3D%22isEngineer%22%20observe%3D%22type%20manager.type%22%3E%0A%20%20%20*%20%60%60%60%0A%20%20%20*%0A%20%20%20*%20%40customElement%0A%20%20%20*%20%40polymer%0A%20%20%20*%20%40memberof%20Polymer%0A%20%20%20*%20%40extends%20%7BdomRepeatBase%7D%0A%20%20%20*%20%40appliesMixin%20Polymer.OptionalMutableData%0A%20%20%20*%20%40summary%20Custom%20element%20for%20stamping%20instance%20of%20a%20template%20bound%20to%0A%20%20%20*%20%20%20items%20in%20an%20array.%0A%20%20%20*%2Fvar%20DomRepeat%3Dfunction(_domRepeatBase)%7B_inherits(DomRepeat%2C_domRepeatBase)%3B_createClass(DomRepeat%2Cnull%2C%5B%7Bkey%3A'is'%2C%2F%2F%20Not%20needed%20to%20find%20template%3B%20can%20be%20removed%20once%20the%20analyzer%0A%2F%2F%20can%20find%20the%20tag%20name%20from%20customElements.define%20call%0Aget%3Afunction%20get()%7Breturn'dom-repeat'%3B%7D%7D%2C%7Bkey%3A'template'%2Cget%3Afunction%20get()%7Breturn%20null%3B%7D%7D%2C%7Bkey%3A'properties'%2Cget%3Afunction%20get()%7B%2F**%0A%20%20%20%20%20%20%20*%20Fired%20whenever%20DOM%20is%20added%20or%20removed%20by%20this%20template%20(by%0A%20%20%20%20%20%20%20*%20default%2C%20rendering%20occurs%20lazily).%20%20To%20force%20immediate%20rendering%2C%20call%0A%20%20%20%20%20%20%20*%20%60render%60.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40event%20dom-change%0A%20%20%20%20%20%20%20*%2Freturn%7B%2F**%0A%20%20%20%20%20%20%20%20%20*%20An%20array%20containing%20items%20determining%20how%20many%20instances%20of%20the%20template%0A%20%20%20%20%20%20%20%20%20*%20to%20stamp%20and%20that%20that%20each%20template%20instance%20should%20bind%20to.%0A%20%20%20%20%20%20%20%20%20*%2Fitems%3A%7Btype%3AArray%7D%2C%2F**%0A%20%20%20%20%20%20%20%20%20*%20The%20name%20of%20the%20variable%20to%20add%20to%20the%20binding%20scope%20for%20the%20array%0A%20%20%20%20%20%20%20%20%20*%20element%20associated%20with%20a%20given%20template%20instance.%0A%20%20%20%20%20%20%20%20%20*%2Fas%3A%7Btype%3AString%2Cvalue%3A'item'%7D%2C%2F**%0A%20%20%20%20%20%20%20%20%20*%20The%20name%20of%20the%20variable%20to%20add%20to%20the%20binding%20scope%20with%20the%20index%0A%20%20%20%20%20%20%20%20%20*%20of%20the%20instance%20in%20the%20sorted%20and%20filtered%20list%20of%20rendered%20items.%0A%20%20%20%20%20%20%20%20%20*%20Note%2C%20for%20the%20index%20in%20the%20%60this.items%60%20array%2C%20use%20the%20value%20of%20the%0A%20%20%20%20%20%20%20%20%20*%20%60itemsIndexAs%60%20property.%0A%20%20%20%20%20%20%20%20%20*%2FindexAs%3A%7Btype%3AString%2Cvalue%3A'index'%7D%2C%2F**%0A%20%20%20%20%20%20%20%20%20*%20The%20name%20of%20the%20variable%20to%20add%20to%20the%20binding%20scope%20with%20the%20index%0A%20%20%20%20%20%20%20%20%20*%20of%20the%20instance%20in%20the%20%60this.items%60%20array.%20Note%2C%20for%20the%20index%20of%0A%20%20%20%20%20%20%20%20%20*%20this%20instance%20in%20the%20sorted%20and%20filtered%20list%20of%20rendered%20items%2C%0A%20%20%20%20%20%20%20%20%20*%20use%20the%20value%20of%20the%20%60indexAs%60%20property.%0A%20%20%20%20%20%20%20%20%20*%2FitemsIndexAs%3A%7Btype%3AString%2Cvalue%3A'itemsIndex'%7D%2C%2F**%0A%20%20%20%20%20%20%20%20%20*%20A%20function%20that%20should%20determine%20the%20sort%20order%20of%20the%20items.%20%20This%0A%20%20%20%20%20%20%20%20%20*%20property%20should%20either%20be%20provided%20as%20a%20string%2C%20indicating%20a%20method%0A%20%20%20%20%20%20%20%20%20*%20name%20on%20the%20element's%20host%2C%20or%20else%20be%20an%20actual%20function.%20%20The%0A%20%20%20%20%20%20%20%20%20*%20function%20should%20match%20the%20sort%20function%20passed%20to%20%60Array.sort%60.%0A%20%20%20%20%20%20%20%20%20*%20Using%20a%20sort%20function%20has%20no%20effect%20on%20the%20underlying%20%60items%60%20array.%0A%20%20%20%20%20%20%20%20%20*%2Fsort%3A%7Btype%3AFunction%2Cobserver%3A'__sortChanged'%7D%2C%2F**%0A%20%20%20%20%20%20%20%20%20*%20A%20function%20that%20can%20be%20used%20to%20filter%20items%20out%20of%20the%20view.%20%20This%0A%20%20%20%20%20%20%20%20%20*%20property%20should%20either%20be%20provided%20as%20a%20string%2C%20indicating%20a%20method%0A%20%20%20%20%20%20%20%20%20*%20name%20on%20the%20element's%20host%2C%20or%20else%20be%20an%20actual%20function.%20%20The%0A%20%20%20%20%20%20%20%20%20*%20function%20should%20match%20the%20sort%20function%20passed%20to%20%60Array.filter%60.%0A%20%20%20%20%20%20%20%20%20*%20Using%20a%20filter%20function%20has%20no%20effect%20on%20the%20underlying%20%60items%60%20array.%0A%20%20%20%20%20%20%20%20%20*%2Ffilter%3A%7Btype%3AFunction%2Cobserver%3A'__filterChanged'%7D%2C%2F**%0A%20%20%20%20%20%20%20%20%20*%20When%20using%20a%20%60filter%60%20or%20%60sort%60%20function%2C%20the%20%60observe%60%20property%0A%20%20%20%20%20%20%20%20%20*%20should%20be%20set%20to%20a%20space-separated%20list%20of%20the%20names%20of%20item%0A%20%20%20%20%20%20%20%20%20*%20sub-fields%20that%20should%20trigger%20a%20re-sort%20or%20re-filter%20when%20changed.%0A%20%20%20%20%20%20%20%20%20*%20These%20should%20generally%20be%20fields%20of%20%60item%60%20that%20the%20sort%20or%20filter%0A%20%20%20%20%20%20%20%20%20*%20function%20depends%20on.%0A%20%20%20%20%20%20%20%20%20*%2Fobserve%3A%7Btype%3AString%2Cobserver%3A'__observeChanged'%7D%2C%2F**%0A%20%20%20%20%20%20%20%20%20*%20When%20using%20a%20%60filter%60%20or%20%60sort%60%20function%2C%20the%20%60delay%60%20property%0A%20%20%20%20%20%20%20%20%20*%20determines%20a%20debounce%20time%20in%20ms%20after%20a%20change%20to%20observed%20item%0A%20%20%20%20%20%20%20%20%20*%20properties%20that%20must%20pass%20before%20the%20filter%20or%20sort%20is%20re-run.%0A%20%20%20%20%20%20%20%20%20*%20This%20is%20useful%20in%20rate-limiting%20shuffling%20of%20the%20view%20when%0A%20%20%20%20%20%20%20%20%20*%20item%20changes%20may%20be%20frequent.%0A%20%20%20%20%20%20%20%20%20*%2Fdelay%3ANumber%2C%2F**%0A%20%20%20%20%20%20%20%20%20*%20Count%20of%20currently%20rendered%20items%20after%20%60filter%60%20(if%20any)%20has%20been%20applied.%0A%20%20%20%20%20%20%20%20%20*%20If%20%22chunking%20mode%22%20is%20enabled%2C%20%60renderedItemCount%60%20is%20updated%20each%20time%20a%0A%20%20%20%20%20%20%20%20%20*%20set%20of%20template%20instances%20is%20rendered.%0A%20%20%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20%20%20*%2FrenderedItemCount%3A%7Btype%3ANumber%2Cnotify%3Atrue%2CreadOnly%3Atrue%7D%2C%2F**%0A%20%20%20%20%20%20%20%20%20*%20Defines%20an%20initial%20count%20of%20template%20instances%20to%20render%20after%20setting%0A%20%20%20%20%20%20%20%20%20*%20the%20%60items%60%20array%2C%20before%20the%20next%20paint%2C%20and%20puts%20the%20%60dom-repeat%60%0A%20%20%20%20%20%20%20%20%20*%20into%20%22chunking%20mode%22.%20%20The%20remaining%20items%20will%20be%20created%20and%20rendered%0A%20%20%20%20%20%20%20%20%20*%20incrementally%20at%20each%20animation%20frame%20therof%20until%20all%20instances%20have%0A%20%20%20%20%20%20%20%20%20*%20been%20rendered.%0A%20%20%20%20%20%20%20%20%20*%2FinitialCount%3A%7Btype%3ANumber%2Cobserver%3A'__initializeChunking'%7D%2C%2F**%0A%20%20%20%20%20%20%20%20%20*%20When%20%60initialCount%60%20is%20used%2C%20this%20property%20defines%20a%20frame%20rate%20(in%0A%20%20%20%20%20%20%20%20%20*%20fps)%20to%20target%20by%20throttling%20the%20number%20of%20instances%20rendered%20each%0A%20%20%20%20%20%20%20%20%20*%20frame%20to%20not%20exceed%20the%20budget%20for%20the%20target%20frame%20rate.%20%20The%0A%20%20%20%20%20%20%20%20%20*%20framerate%20is%20effectively%20the%20number%20of%20%60requestAnimationFrame%60s%20that%0A%20%20%20%20%20%20%20%20%20*%20it%20tries%20to%20allow%20to%20actually%20fire%20in%20a%20given%20second.%20It%20does%20this%0A%20%20%20%20%20%20%20%20%20*%20by%20measuring%20the%20time%20between%20%60rAF%60s%20and%20continuously%20adjusting%20the%0A%20%20%20%20%20%20%20%20%20*%20number%20of%20items%20created%20each%20%60rAF%60%20to%20maintain%20the%20target%20framerate.%0A%20%20%20%20%20%20%20%20%20*%20Setting%20this%20to%20a%20higher%20number%20allows%20lower%20latency%20and%20higher%0A%20%20%20%20%20%20%20%20%20*%20throughput%20for%20event%20handlers%20and%20other%20tasks%2C%20but%20results%20in%20a%0A%20%20%20%20%20%20%20%20%20*%20longer%20time%20for%20the%20remaining%20items%20to%20complete%20rendering.%0A%20%20%20%20%20%20%20%20%20*%2FtargetFramerate%3A%7Btype%3ANumber%2Cvalue%3A20%7D%2C_targetFrameTime%3A%7Btype%3ANumber%2Ccomputed%3A'__computeFrameTime(targetFramerate)'%7D%7D%3B%7D%7D%2C%7Bkey%3A'observers'%2Cget%3Afunction%20get()%7Breturn%5B'__itemsChanged(items.*)'%5D%3B%7D%7D%5D)%3Bfunction%20DomRepeat()%7B_classCallCheck(this%2CDomRepeat)%3Bvar%20_this%3D_possibleConstructorReturn(this%2C(DomRepeat.__proto__%7C%7CObject.getPrototypeOf(DomRepeat)).call(this))%3B_this.__instances%3D%5B%5D%3B_this.__limit%3DInfinity%3B_this.__pool%3D%5B%5D%3B_this.__renderDebouncer%3Dnull%3B_this.__itemsIdxToInstIdx%3D%7B%7D%3B_this.__chunkCount%3Dnull%3B_this.__lastChunkTime%3Dnull%3B_this.__sortFn%3Dnull%3B_this.__filterFn%3Dnull%3B_this.__observePaths%3Dnull%3B_this.__ctor%3Dnull%3B_this.__isDetached%3Dtrue%3B_this.template%3Dnull%3Breturn%20_this%3B%7D%2F**%0A%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20*%2F_createClass(DomRepeat%2C%5B%7Bkey%3A'disconnectedCallback'%2Cvalue%3Afunction%20disconnectedCallback()%7B_get(DomRepeat.prototype.__proto__%7C%7CObject.getPrototypeOf(DomRepeat.prototype)%2C'disconnectedCallback'%2Cthis).call(this)%3Bthis.__isDetached%3Dtrue%3Bfor(var%20i%3D0%3Bi%3Cthis.__instances.length%3Bi%2B%2B)%7Bthis.__detachInstance(i)%3B%7D%7D%2F**%0A%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'connectedCallback'%2Cvalue%3Afunction%20connectedCallback()%7B_get(DomRepeat.prototype.__proto__%7C%7CObject.getPrototypeOf(DomRepeat.prototype)%2C'connectedCallback'%2Cthis).call(this)%3Bthis.style.display%3D'none'%3B%2F%2F%20only%20perform%20attachment%20if%20the%20element%20was%20previously%20detached.%0Aif(this.__isDetached)%7Bthis.__isDetached%3Dfalse%3Bvar%20parent%3Dthis.parentNode%3Bfor(var%20i%3D0%3Bi%3Cthis.__instances.length%3Bi%2B%2B)%7Bthis.__attachInstance(i%2Cparent)%3B%7D%7D%7D%7D%2C%7Bkey%3A'__ensureTemplatized'%2Cvalue%3Afunction%20__ensureTemplatized()%7Bvar%20_this2%3Dthis%3B%2F%2F%20Templatizing%20(generating%20the%20instance%20constructor)%20needs%20to%20wait%0A%2F%2F%20until%20ready%2C%20since%20won't%20have%20its%20template%20content%20handed%20back%20to%0A%2F%2F%20it%20until%20then%0Aif(!this.__ctor)%7Bvar%20template%3Dthis.template%3D%2F**%20%40type%20%7BHTMLTemplateElement%7D%20*%2Fthis.querySelector('template')%3Bif(!template)%7B%2F%2F%20%2F%2F%20Wait%20until%20childList%20changes%20and%20template%20should%20be%20there%20by%20then%0Avar%20observer%3Dnew%20MutationObserver(function()%7Bif(_this2.querySelector('template'))%7Bobserver.disconnect()%3B_this2.__render()%3B%7Delse%7Bthrow%20new%20Error('dom-repeat%20requires%20a%20%3Ctemplate%3E%20child')%3B%7D%7D)%3Bobserver.observe(this%2C%7BchildList%3Atrue%7D)%3Breturn%20false%3B%7D%2F%2F%20Template%20instance%20props%20that%20should%20be%20excluded%20from%20forwarding%0Avar%20instanceProps%3D%7B%7D%3BinstanceProps%5Bthis.as%5D%3Dtrue%3BinstanceProps%5Bthis.indexAs%5D%3Dtrue%3BinstanceProps%5Bthis.itemsIndexAs%5D%3Dtrue%3Bthis.__ctor%3DPolymer.Templatize.templatize(template%2Cthis%2C%7BmutableData%3Athis.mutableData%2CparentModel%3Atrue%2CinstanceProps%3AinstanceProps%2C%2F**%0A%20%20%20%20%20%20%20%20%20%20%20*%20%40this%20%7Bthis%7D%0A%20%20%20%20%20%20%20%20%20%20%20*%20%40param%20%7Bstring%7D%20prop%20Property%20to%20set%0A%20%20%20%20%20%20%20%20%20%20%20*%20%40param%20%7B*%7D%20value%20Value%20to%20set%20property%20to%0A%20%20%20%20%20%20%20%20%20%20%20*%2FforwardHostProp%3Afunction%20forwardHostProp(prop%2Cvalue)%7Bvar%20i%24%3Dthis.__instances%3Bfor(var%20i%3D0%2Cinst%3Bi%3Ci%24.length%26%26(inst%3Di%24%5Bi%5D)%3Bi%2B%2B)%7Binst.forwardHostProp(prop%2Cvalue)%3B%7D%7D%2C%2F**%0A%20%20%20%20%20%20%20%20%20%20%20*%20%40this%20%7Bthis%7D%0A%20%20%20%20%20%20%20%20%20%20%20*%20%40param%20%7BObject%7D%20inst%20Instance%20to%20notify%0A%20%20%20%20%20%20%20%20%20%20%20*%20%40param%20%7Bstring%7D%20prop%20Property%20to%20notify%0A%20%20%20%20%20%20%20%20%20%20%20*%20%40param%20%7B*%7D%20value%20Value%20to%20notify%0A%20%20%20%20%20%20%20%20%20%20%20*%2FnotifyInstanceProp%3Afunction%20notifyInstanceProp(inst%2Cprop%2Cvalue)%7Bif(Polymer.Path.matches(this.as%2Cprop))%7Bvar%20idx%3Dinst%5Bthis.itemsIndexAs%5D%3Bif(prop%3D%3Dthis.as)%7Bthis.items%5Bidx%5D%3Dvalue%3B%7Dvar%20path%3DPolymer.Path.translate(this.as%2C'items.'%2Bidx%2Cprop)%3Bthis.notifyPath(path%2Cvalue)%3B%7D%7D%7D)%3B%7Dreturn%20true%3B%7D%7D%2C%7Bkey%3A'__getMethodHost'%2Cvalue%3Afunction%20__getMethodHost()%7B%2F%2F%20Technically%20this%20should%20be%20the%20owner%20of%20the%20outermost%20template.%0A%2F%2F%20In%20shadow%20dom%2C%20this%20is%20always%20getRootNode().host%2C%20but%20we%20can%0A%2F%2F%20approximate%20this%20via%20cooperation%20with%20our%20dataHost%20always%20setting%0A%2F%2F%20%60_methodHost%60%20as%20long%20as%20there%20were%20bindings%20(or%20id's)%20on%20this%0A%2F%2F%20instance%20causing%20it%20to%20get%20a%20dataHost.%0Areturn%20this.__dataHost._methodHost%7C%7Cthis.__dataHost%3B%7D%7D%2C%7Bkey%3A'__functionFromPropertyValue'%2Cvalue%3Afunction%20__functionFromPropertyValue(functionOrMethodName)%7Bif(typeof%20functionOrMethodName%3D%3D%3D'string')%7Bvar%20methodName%3DfunctionOrMethodName%3Bvar%20obj%3Dthis.__getMethodHost()%3Breturn%20function()%7Breturn%20obj%5BmethodName%5D.apply(obj%2Carguments)%3B%7D%3B%7Dreturn%20functionOrMethodName%3B%7D%7D%2C%7Bkey%3A'__sortChanged'%2Cvalue%3Afunction%20__sortChanged(sort)%7Bthis.__sortFn%3Dthis.__functionFromPropertyValue(sort)%3Bif(this.items)%7Bthis.__debounceRender(this.__render)%3B%7D%7D%7D%2C%7Bkey%3A'__filterChanged'%2Cvalue%3Afunction%20__filterChanged(filter)%7Bthis.__filterFn%3Dthis.__functionFromPropertyValue(filter)%3Bif(this.items)%7Bthis.__debounceRender(this.__render)%3B%7D%7D%7D%2C%7Bkey%3A'__computeFrameTime'%2Cvalue%3Afunction%20__computeFrameTime(rate)%7Breturn%20Math.ceil(1000%2Frate)%3B%7D%7D%2C%7Bkey%3A'__initializeChunking'%2Cvalue%3Afunction%20__initializeChunking()%7Bif(this.initialCount)%7Bthis.__limit%3Dthis.initialCount%3Bthis.__chunkCount%3Dthis.initialCount%3Bthis.__lastChunkTime%3Dperformance.now()%3B%7D%7D%7D%2C%7Bkey%3A'__tryRenderChunk'%2Cvalue%3Afunction%20__tryRenderChunk()%7B%2F%2F%20Debounced%20so%20that%20multiple%20calls%20through%20%60_render%60%20between%20animation%0A%2F%2F%20frames%20only%20queue%20one%20new%20rAF%20(e.g.%20array%20mutation%20%26%20chunked%20render)%0Aif(this.items%26%26this.__limit%3Cthis.items.length)%7Bthis.__debounceRender(this.__requestRenderChunk)%3B%7D%7D%7D%2C%7Bkey%3A'__requestRenderChunk'%2Cvalue%3Afunction%20__requestRenderChunk()%7Bvar%20_this3%3Dthis%3BrequestAnimationFrame(function()%7Breturn%20_this3.__renderChunk()%3B%7D)%3B%7D%7D%2C%7Bkey%3A'__renderChunk'%2Cvalue%3Afunction%20__renderChunk()%7B%2F%2F%20Simple%20auto%20chunkSize%20throttling%20algorithm%20based%20on%20feedback%20loop%3A%0A%2F%2F%20measure%20actual%20time%20between%20frames%20and%20scale%20chunk%20count%20by%20ratio%0A%2F%2F%20of%20target%2Factual%20frame%20time%0Avar%20currChunkTime%3Dperformance.now()%3Bvar%20ratio%3Dthis._targetFrameTime%2F(currChunkTime-this.__lastChunkTime)%3Bthis.__chunkCount%3DMath.round(this.__chunkCount*ratio)%7C%7C1%3Bthis.__limit%2B%3Dthis.__chunkCount%3Bthis.__lastChunkTime%3DcurrChunkTime%3Bthis.__debounceRender(this.__render)%3B%7D%7D%2C%7Bkey%3A'__observeChanged'%2Cvalue%3Afunction%20__observeChanged()%7Bthis.__observePaths%3Dthis.observe%26%26this.observe.replace('.*'%2C'.').split('%20')%3B%7D%7D%2C%7Bkey%3A'__itemsChanged'%2Cvalue%3Afunction%20__itemsChanged(change)%7Bif(this.items%26%26!Array.isArray(this.items))%7Bconsole.warn('dom-repeat%20expected%20array%20for%20%60items%60%2C%20found'%2Cthis.items)%3B%7D%2F%2F%20If%20path%20was%20to%20an%20item%20(e.g.%20'items.3'%20or%20'items.3.foo')%2C%20forward%20the%0A%2F%2F%20path%20to%20that%20instance%20synchronously%20(returns%20false%20for%20non-item%20paths)%0Aif(!this.__handleItemPath(change.path%2Cchange.value))%7B%2F%2F%20Otherwise%2C%20the%20array%20was%20reset%20('items')%20or%20spliced%20('items.splices')%2C%0A%2F%2F%20so%20queue%20a%20full%20refresh%0Athis.__initializeChunking()%3Bthis.__debounceRender(this.__render)%3B%7D%7D%7D%2C%7Bkey%3A'__handleObservedPaths'%2Cvalue%3Afunction%20__handleObservedPaths(path)%7B%2F%2F%20Handle%20cases%20where%20path%20changes%20should%20cause%20a%20re-sort%2Ffilter%0Aif(this.__sortFn%7C%7Cthis.__filterFn)%7Bif(!path)%7B%2F%2F%20Always%20re-render%20if%20the%20item%20itself%20changed%0Athis.__debounceRender(this.__render%2Cthis.delay)%3B%7Delse%20if(this.__observePaths)%7B%2F%2F%20Otherwise%2C%20re-render%20if%20the%20path%20changed%20matches%20an%20observed%20path%0Avar%20paths%3Dthis.__observePaths%3Bfor(var%20i%3D0%3Bi%3Cpaths.length%3Bi%2B%2B)%7Bif(path.indexOf(paths%5Bi%5D)%3D%3D%3D0)%7Bthis.__debounceRender(this.__render%2Cthis.delay)%3B%7D%7D%7D%7D%7D%2F**%0A%20%20%20%20%20*%20%40param%20%7Bfunction(this%3ADomRepeat)%7D%20fn%20Function%20to%20debounce.%0A%20%20%20%20%20*%20%40param%20%7Bnumber%3D%7D%20delay%20Delay%20in%20ms%20to%20debounce%20by.%0A%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'__debounceRender'%2Cvalue%3Afunction%20__debounceRender(fn)%7Bvar%20delay%3Darguments.length%3E1%26%26arguments%5B1%5D!%3D%3Dundefined%3Farguments%5B1%5D%3A0%3Bthis.__renderDebouncer%3DPolymer.Debouncer.debounce(this.__renderDebouncer%2Cdelay%3E0%3FPolymer.Async.timeOut.after(delay)%3APolymer.Async.microTask%2Cfn.bind(this))%3BPolymer.enqueueDebouncer(this.__renderDebouncer)%3B%7D%2F**%0A%20%20%20%20%20*%20Forces%20the%20element%20to%20render%20its%20content.%20Normally%20rendering%20is%0A%20%20%20%20%20*%20asynchronous%20to%20a%20provoking%20change.%20This%20is%20done%20for%20efficiency%20so%0A%20%20%20%20%20*%20that%20multiple%20changes%20trigger%20only%20a%20single%20render.%20The%20render%20method%0A%20%20%20%20%20*%20should%20be%20called%20if%2C%20for%20example%2C%20template%20rendering%20is%20required%20to%0A%20%20%20%20%20*%20validate%20application%20state.%0A%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'render'%2Cvalue%3Afunction%20render()%7B%2F%2F%20Queue%20this%20repeater%2C%20then%20flush%20all%20in%20order%0Athis.__debounceRender(this.__render)%3BPolymer.flush()%3B%7D%7D%2C%7Bkey%3A'__render'%2Cvalue%3Afunction%20__render()%7Bif(!this.__ensureTemplatized())%7B%2F%2F%20No%20template%20found%20yet%0Areturn%3B%7Dthis.__applyFullRefresh()%3B%2F%2F%20Reset%20the%20pool%0A%2F%2F%20TODO(kschaaf)%3A%20Reuse%20pool%20across%20turns%20and%20nested%20templates%0A%2F%2F%20Now%20that%20objects%2Farrays%20are%20re-evaluated%20when%20set%2C%20we%20can%20safely%0A%2F%2F%20reuse%20pooled%20instances%20across%20turns%2C%20however%20we%20still%20need%20to%20decide%0A%2F%2F%20semantics%20regarding%20how%20long%20to%20hold%2C%20how%20many%20to%20hold%2C%20etc.%0Athis.__pool.length%3D0%3B%2F%2F%20Set%20rendered%20item%20count%0Athis._setRenderedItemCount(this.__instances.length)%3B%2F%2F%20Notify%20users%0Athis.dispatchEvent(new%20CustomEvent('dom-change'%2C%7Bbubbles%3Atrue%2Ccomposed%3Atrue%7D))%3B%2F%2F%20Check%20to%20see%20if%20we%20need%20to%20render%20more%20items%0Athis.__tryRenderChunk()%3B%7D%7D%2C%7Bkey%3A'__applyFullRefresh'%2Cvalue%3Afunction%20__applyFullRefresh()%7Bvar%20_this4%3Dthis%3Bvar%20items%3Dthis.items%7C%7C%5B%5D%3Bvar%20isntIdxToItemsIdx%3Dnew%20Array(items.length)%3Bfor(var%20i%3D0%3Bi%3Citems.length%3Bi%2B%2B)%7BisntIdxToItemsIdx%5Bi%5D%3Di%3B%7D%2F%2F%20Apply%20user%20filter%0Aif(this.__filterFn)%7BisntIdxToItemsIdx%3DisntIdxToItemsIdx.filter(function(i%2Cidx%2Carray)%7Breturn%20_this4.__filterFn(items%5Bi%5D%2Cidx%2Carray)%3B%7D)%3B%7D%2F%2F%20Apply%20user%20sort%0Aif(this.__sortFn)%7BisntIdxToItemsIdx.sort(function(a%2Cb)%7Breturn%20_this4.__sortFn(items%5Ba%5D%2Citems%5Bb%5D)%3B%7D)%3B%7D%2F%2F%20items-%3Einst%20map%20kept%20for%20item%20path%20forwarding%0Avar%20itemsIdxToInstIdx%3Dthis.__itemsIdxToInstIdx%3D%7B%7D%3Bvar%20instIdx%3D0%3B%2F%2F%20Generate%20instances%20and%20assign%20items%0Avar%20limit%3DMath.min(isntIdxToItemsIdx.length%2Cthis.__limit)%3Bfor(%3BinstIdx%3Climit%3BinstIdx%2B%2B)%7Bvar%20inst%3Dthis.__instances%5BinstIdx%5D%3Bvar%20itemIdx%3DisntIdxToItemsIdx%5BinstIdx%5D%3Bvar%20item%3Ditems%5BitemIdx%5D%3BitemsIdxToInstIdx%5BitemIdx%5D%3DinstIdx%3Bif(inst)%7Binst._setPendingProperty(this.as%2Citem)%3Binst._setPendingProperty(this.indexAs%2CinstIdx)%3Binst._setPendingProperty(this.itemsIndexAs%2CitemIdx)%3Binst._flushProperties()%3B%7Delse%7Bthis.__insertInstance(item%2CinstIdx%2CitemIdx)%3B%7D%7D%2F%2F%20Remove%20any%20extra%20instances%20from%20previous%20state%0Afor(var%20_i%3Dthis.__instances.length-1%3B_i%3E%3DinstIdx%3B_i--)%7Bthis.__detachAndRemoveInstance(_i)%3B%7D%7D%7D%2C%7Bkey%3A'__detachInstance'%2Cvalue%3Afunction%20__detachInstance(idx)%7Bvar%20inst%3Dthis.__instances%5Bidx%5D%3Bfor(var%20i%3D0%3Bi%3Cinst.children.length%3Bi%2B%2B)%7Bvar%20el%3Dinst.children%5Bi%5D%3Binst.root.appendChild(el)%3B%7Dreturn%20inst%3B%7D%7D%2C%7Bkey%3A'__attachInstance'%2Cvalue%3Afunction%20__attachInstance(idx%2Cparent)%7Bvar%20inst%3Dthis.__instances%5Bidx%5D%3Bparent.insertBefore(inst.root%2Cthis)%3B%7D%7D%2C%7Bkey%3A'__detachAndRemoveInstance'%2Cvalue%3Afunction%20__detachAndRemoveInstance(idx)%7Bvar%20inst%3Dthis.__detachInstance(idx)%3Bif(inst)%7Bthis.__pool.push(inst)%3B%7Dthis.__instances.splice(idx%2C1)%3B%7D%7D%2C%7Bkey%3A'__stampInstance'%2Cvalue%3Afunction%20__stampInstance(item%2CinstIdx%2CitemIdx)%7Bvar%20model%3D%7B%7D%3Bmodel%5Bthis.as%5D%3Ditem%3Bmodel%5Bthis.indexAs%5D%3DinstIdx%3Bmodel%5Bthis.itemsIndexAs%5D%3DitemIdx%3Breturn%20new%20this.__ctor(model)%3B%7D%7D%2C%7Bkey%3A'__insertInstance'%2Cvalue%3Afunction%20__insertInstance(item%2CinstIdx%2CitemIdx)%7Bvar%20inst%3Dthis.__pool.pop()%3Bif(inst)%7B%2F%2F%20TODO(kschaaf)%3A%20If%20the%20pool%20is%20shared%20across%20turns%2C%20hostProps%0A%2F%2F%20need%20to%20be%20re-set%20to%20reused%20instances%20in%20addition%20to%20item%0Ainst._setPendingProperty(this.as%2Citem)%3Binst._setPendingProperty(this.indexAs%2CinstIdx)%3Binst._setPendingProperty(this.itemsIndexAs%2CitemIdx)%3Binst._flushProperties()%3B%7Delse%7Binst%3Dthis.__stampInstance(item%2CinstIdx%2CitemIdx)%3B%7Dvar%20beforeRow%3Dthis.__instances%5BinstIdx%2B1%5D%3Bvar%20beforeNode%3DbeforeRow%3FbeforeRow.children%5B0%5D%3Athis%3Bthis.parentNode.insertBefore(inst.root%2CbeforeNode)%3Bthis.__instances%5BinstIdx%5D%3Dinst%3Breturn%20inst%3B%7D%2F%2F%20Implements%20extension%20point%20from%20Templatize%20mixin%0A%2F**%0A%20%20%20%20%20*%20Shows%20or%20hides%20the%20template%20instance%20top%20level%20child%20elements.%20For%0A%20%20%20%20%20*%20text%20nodes%2C%20%60textContent%60%20is%20removed%20while%20%22hidden%22%20and%20replaced%20when%0A%20%20%20%20%20*%20%22shown.%22%0A%20%20%20%20%20*%20%40param%20%7Bboolean%7D%20hidden%20Set%20to%20true%20to%20hide%20the%20children%3B%0A%20%20%20%20%20*%20set%20to%20false%20to%20show%20them.%0A%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20*%20%40protected%0A%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'_showHideChildren'%2Cvalue%3Afunction%20_showHideChildren(hidden)%7Bfor(var%20i%3D0%3Bi%3Cthis.__instances.length%3Bi%2B%2B)%7Bthis.__instances%5Bi%5D._showHideChildren(hidden)%3B%7D%7D%2F%2F%20Called%20as%20a%20side%20effect%20of%20a%20host%20items.%3Ckey%3E.%3Cpath%3E%20path%20change%2C%0A%2F%2F%20responsible%20for%20notifying%20item.%3Cpath%3E%20changes%20to%20inst%20for%20key%0A%7D%2C%7Bkey%3A'__handleItemPath'%2Cvalue%3Afunction%20__handleItemPath(path%2Cvalue)%7Bvar%20itemsPath%3Dpath.slice(6)%3B%2F%2F%20'items.'.length%20%3D%3D%206%0Avar%20dot%3DitemsPath.indexOf('.')%3Bvar%20itemsIdx%3Ddot%3C0%3FitemsPath%3AitemsPath.substring(0%2Cdot)%3B%2F%2F%20If%20path%20was%20index%20into%20array...%0Aif(itemsIdx%3D%3DparseInt(itemsIdx%2C10))%7Bvar%20itemSubPath%3Ddot%3C0%3F''%3AitemsPath.substring(dot%2B1)%3B%2F%2F%20If%20the%20path%20is%20observed%2C%20it%20will%20trigger%20a%20full%20refresh%0Athis.__handleObservedPaths(itemSubPath)%3B%2F%2F%20Note%2C%20even%20if%20a%20rull%20refresh%20is%20triggered%2C%20always%20do%20the%20path%0A%2F%2F%20notification%20because%20unless%20mutableData%20is%20used%20for%20dom-repeat%0A%2F%2F%20and%20all%20elements%20in%20the%20instance%20subtree%2C%20a%20full%20refresh%20may%0A%2F%2F%20not%20trigger%20the%20proper%20update.%0Avar%20instIdx%3Dthis.__itemsIdxToInstIdx%5BitemsIdx%5D%3Bvar%20inst%3Dthis.__instances%5BinstIdx%5D%3Bif(inst)%7Bvar%20itemPath%3Dthis.as%2B(itemSubPath%3F'.'%2BitemSubPath%3A'')%3B%2F%2F%20This%20is%20effectively%20%60notifyPath%60%2C%20but%20avoids%20some%20of%20the%20overhead%0A%2F%2F%20of%20the%20public%20API%0Ainst._setPendingPropertyOrPath(itemPath%2Cvalue%2Cfalse%2Ctrue)%3Binst._flushProperties()%3B%7Dreturn%20true%3B%7D%7D%2F**%0A%20%20%20%20%20*%20Returns%20the%20item%20associated%20with%20a%20given%20element%20stamped%20by%0A%20%20%20%20%20*%20this%20%60dom-repeat%60.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20Note%2C%20to%20modify%20sub-properties%20of%20the%20item%2C%0A%20%20%20%20%20*%20%60modelForElement(el).set('item.%3Csub-prop%3E'%2C%20value)%60%0A%20%20%20%20%20*%20should%20be%20used.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40param%20%7B!HTMLElement%7D%20el%20Element%20for%20which%20to%20return%20the%20item.%0A%20%20%20%20%20*%20%40return%20%7B*%7D%20Item%20associated%20with%20the%20element.%0A%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'itemForElement'%2Cvalue%3Afunction%20itemForElement(el)%7Bvar%20instance%3Dthis.modelForElement(el)%3Breturn%20instance%26%26instance%5Bthis.as%5D%3B%7D%2F**%0A%20%20%20%20%20*%20Returns%20the%20inst%20index%20for%20a%20given%20element%20stamped%20by%20this%20%60dom-repeat%60.%0A%20%20%20%20%20*%20If%20%60sort%60%20is%20provided%2C%20the%20index%20will%20reflect%20the%20sorted%20order%20(rather%0A%20%20%20%20%20*%20than%20the%20original%20array%20order).%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40param%20%7B!HTMLElement%7D%20el%20Element%20for%20which%20to%20return%20the%20index.%0A%20%20%20%20%20*%20%40return%20%7B%3Fnumber%7D%20Row%20index%20associated%20with%20the%20element%20(note%20this%20may%0A%20%20%20%20%20*%20%20%20not%20correspond%20to%20the%20array%20index%20if%20a%20user%20%60sort%60%20is%20applied).%0A%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'indexForElement'%2Cvalue%3Afunction%20indexForElement(el)%7Bvar%20instance%3Dthis.modelForElement(el)%3Breturn%20instance%26%26instance%5Bthis.indexAs%5D%3B%7D%2F**%0A%20%20%20%20%20*%20Returns%20the%20template%20%22model%22%20associated%20with%20a%20given%20element%2C%20which%0A%20%20%20%20%20*%20serves%20as%20the%20binding%20scope%20for%20the%20template%20instance%20the%20element%20is%0A%20%20%20%20%20*%20contained%20in.%20A%20template%20model%20is%20an%20instance%20of%20%60Polymer.Base%60%2C%20and%0A%20%20%20%20%20*%20should%20be%20used%20to%20manipulate%20data%20associated%20with%20this%20template%20instance.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20Example%3A%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%20%20let%20model%20%3D%20modelForElement(el)%3B%0A%20%20%20%20%20*%20%20%20if%20(model.index%20%3C%2010)%20%7B%0A%20%20%20%20%20*%20%20%20%20%20model.set('item.checked'%2C%20true)%3B%0A%20%20%20%20%20*%20%20%20%7D%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40param%20%7B!HTMLElement%7D%20el%20Element%20for%20which%20to%20return%20a%20template%20model.%0A%20%20%20%20%20*%20%40return%20%7BTemplateInstanceBase%7D%20Model%20representing%20the%20binding%20scope%20for%0A%20%20%20%20%20*%20%20%20the%20element.%0A%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'modelForElement'%2Cvalue%3Afunction%20modelForElement(el)%7Breturn%20Polymer.Templatize.modelForElement(this.template%2Cel)%3B%7D%7D%5D)%3Breturn%20DomRepeat%3B%7D(domRepeatBase)%3BcustomElements.define(DomRepeat.is%2CDomRepeat)%3B%2F**%20%40const%20*%2FPolymer.DomRepeat%3DDomRepeat%3B%7D)()%3B%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Fcpt-static.gannettdigital.com%2Funiversal-web-client%2Fmaster%2Flatest%2Fvendor%2Fcomponents%2Fpolymer%2Flib%2Felements%2Fdom-repeat.html.js%0A | 26 kB | 2023-03-07 | 2024-01-25 | |
Pretty
Loading... | ||||
http:text/javascript;charset=utf-8,(function()%7B'use%20strict'%3B%2F**%0A%20%20%20*%20Module%20with%20utilities%20for%20manipulating%20structured%20data%20path%20strings.%0A%20%20%20*%0A%20%20%20*%20%40namespace%0A%20%20%20*%20%40memberof%20Polymer%0A%20%20%20*%20%40summary%20Module%20with%20utilities%20for%20manipulating%20structured%20data%20path%20strings.%0A%20%20%20*%2Fvar%20Path%3D%7B%2F**%0A%20%20%20%20%20*%20Returns%20true%20if%20the%20given%20string%20is%20a%20structured%20data%20path%20(has%20dots).%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20Example%3A%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%60%60%60%0A%20%20%20%20%20*%20Polymer.Path.isPath('foo.bar.baz')%20%2F%2F%20true%0A%20%20%20%20%20*%20Polymer.Path.isPath('foo')%20%20%20%20%20%20%20%20%20%2F%2F%20false%0A%20%20%20%20%20*%20%60%60%60%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40memberof%20Polymer.Path%0A%20%20%20%20%20*%20%40param%20%7Bstring%7D%20path%20Path%20string%0A%20%20%20%20%20*%20%40return%20%7Bboolean%7D%20True%20if%20the%20string%20contained%20one%20or%20more%20dots%0A%20%20%20%20%20*%2FisPath%3Afunction%20isPath(path)%7Breturn%20path.indexOf('.')%3E%3D0%3B%7D%2C%2F**%0A%20%20%20%20%20*%20Returns%20the%20root%20property%20name%20for%20the%20given%20path.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20Example%3A%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%60%60%60%0A%20%20%20%20%20*%20Polymer.Path.root('foo.bar.baz')%20%2F%2F%20'foo'%0A%20%20%20%20%20*%20Polymer.Path.root('foo')%20%20%20%20%20%20%20%20%20%2F%2F%20'foo'%0A%20%20%20%20%20*%20%60%60%60%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40memberof%20Polymer.Path%0A%20%20%20%20%20*%20%40param%20%7Bstring%7D%20path%20Path%20string%0A%20%20%20%20%20*%20%40return%20%7Bstring%7D%20Root%20property%20name%0A%20%20%20%20%20*%2Froot%3Afunction%20root(path)%7Bvar%20dotIndex%3Dpath.indexOf('.')%3Bif(dotIndex%3D%3D%3D-1)%7Breturn%20path%3B%7Dreturn%20path.slice(0%2CdotIndex)%3B%7D%2C%2F**%0A%20%20%20%20%20*%20Given%20%60base%60%20is%20%60foo.bar%60%2C%20%60foo%60%20is%20an%20ancestor%2C%20%60foo.bar%60%20is%20not%0A%20%20%20%20%20*%20Returns%20true%20if%20the%20given%20path%20is%20an%20ancestor%20of%20the%20base%20path.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20Example%3A%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%60%60%60%0A%20%20%20%20%20*%20Polymer.Path.isAncestor('foo.bar'%2C%20'foo')%20%20%20%20%20%20%20%20%20%2F%2F%20true%0A%20%20%20%20%20*%20Polymer.Path.isAncestor('foo.bar'%2C%20'foo.bar')%20%20%20%20%20%2F%2F%20false%0A%20%20%20%20%20*%20Polymer.Path.isAncestor('foo.bar'%2C%20'foo.bar.baz')%20%2F%2F%20false%0A%20%20%20%20%20*%20%60%60%60%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40memberof%20Polymer.Path%0A%20%20%20%20%20*%20%40param%20%7Bstring%7D%20base%20Path%20string%20to%20test%20against.%0A%20%20%20%20%20*%20%40param%20%7Bstring%7D%20path%20Path%20string%20to%20test.%0A%20%20%20%20%20*%20%40return%20%7Bboolean%7D%20True%20if%20%60path%60%20is%20an%20ancestor%20of%20%60base%60.%0A%20%20%20%20%20*%2FisAncestor%3Afunction%20isAncestor(base%2Cpath)%7B%2F%2F%20%20%20%20%20base.startsWith(path%20%2B%20'.')%3B%0Areturn%20base.indexOf(path%2B'.')%3D%3D%3D0%3B%7D%2C%2F**%0A%20%20%20%20%20*%20Given%20%60base%60%20is%20%60foo.bar%60%2C%20%60foo.bar.baz%60%20is%20an%20descendant%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20Example%3A%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%60%60%60%0A%20%20%20%20%20*%20Polymer.Path.isDescendant('foo.bar'%2C%20'foo.bar.baz')%20%2F%2F%20true%0A%20%20%20%20%20*%20Polymer.Path.isDescendant('foo.bar'%2C%20'foo.bar')%20%20%20%20%20%2F%2F%20false%0A%20%20%20%20%20*%20Polymer.Path.isDescendant('foo.bar'%2C%20'foo')%20%20%20%20%20%20%20%20%20%2F%2F%20false%0A%20%20%20%20%20*%20%60%60%60%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40memberof%20Polymer.Path%0A%20%20%20%20%20*%20%40param%20%7Bstring%7D%20base%20Path%20string%20to%20test%20against.%0A%20%20%20%20%20*%20%40param%20%7Bstring%7D%20path%20Path%20string%20to%20test.%0A%20%20%20%20%20*%20%40return%20%7Bboolean%7D%20True%20if%20%60path%60%20is%20a%20descendant%20of%20%60base%60.%0A%20%20%20%20%20*%2FisDescendant%3Afunction%20isDescendant(base%2Cpath)%7B%2F%2F%20%20%20%20%20path.startsWith(base%20%2B%20'.')%3B%0Areturn%20path.indexOf(base%2B'.')%3D%3D%3D0%3B%7D%2C%2F**%0A%20%20%20%20%20*%20Replaces%20a%20previous%20base%20path%20with%20a%20new%20base%20path%2C%20preserving%20the%0A%20%20%20%20%20*%20remainder%20of%20the%20path.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20User%20must%20ensure%20%60path%60%20has%20a%20prefix%20of%20%60base%60.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20Example%3A%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%60%60%60%0A%20%20%20%20%20*%20Polymer.Path.translate('foo.bar'%2C%20'zot'%2C%20'foo.bar.baz')%20%2F%2F%20'zot.baz'%0A%20%20%20%20%20*%20%60%60%60%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40memberof%20Polymer.Path%0A%20%20%20%20%20*%20%40param%20%7Bstring%7D%20base%20Current%20base%20string%20to%20remove%0A%20%20%20%20%20*%20%40param%20%7Bstring%7D%20newBase%20New%20base%20string%20to%20replace%20with%0A%20%20%20%20%20*%20%40param%20%7Bstring%7D%20path%20Path%20to%20translate%0A%20%20%20%20%20*%20%40return%20%7Bstring%7D%20Translated%20string%0A%20%20%20%20%20*%2Ftranslate%3Afunction%20translate(base%2CnewBase%2Cpath)%7Breturn%20newBase%2Bpath.slice(base.length)%3B%7D%2C%2F**%0A%20%20%20%20%20*%20%40param%20%7Bstring%7D%20base%20Path%20string%20to%20test%20against%0A%20%20%20%20%20*%20%40param%20%7Bstring%7D%20path%20Path%20string%20to%20test%0A%20%20%20%20%20*%20%40return%20%7Bboolean%7D%20True%20if%20%60path%60%20is%20equal%20to%20%60base%60%0A%20%20%20%20%20*%20%40this%20%7BPath%7D%0A%20%20%20%20%20*%2Fmatches%3Afunction%20matches(base%2Cpath)%7Breturn%20base%3D%3D%3Dpath%7C%7Cthis.isAncestor(base%2Cpath)%7C%7Cthis.isDescendant(base%2Cpath)%3B%7D%2C%2F**%0A%20%20%20%20%20*%20Converts%20array-based%20paths%20to%20flattened%20path.%20%20String-based%20paths%0A%20%20%20%20%20*%20are%20returned%20as-is.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20Example%3A%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%60%60%60%0A%20%20%20%20%20*%20Polymer.Path.normalize(%5B'foo.bar'%2C%200%2C%20'baz'%5D)%20%20%2F%2F%20'foo.bar.0.baz'%0A%20%20%20%20%20*%20Polymer.Path.normalize('foo.bar.0.baz')%20%20%20%20%20%20%20%20%2F%2F%20'foo.bar.0.baz'%0A%20%20%20%20%20*%20%60%60%60%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40memberof%20Polymer.Path%0A%20%20%20%20%20*%20%40param%20%7Bstring%20%7C%20!Array%3Cstring%7Cnumber%3E%7D%20path%20Input%20path%0A%20%20%20%20%20*%20%40return%20%7Bstring%7D%20Flattened%20path%0A%20%20%20%20%20*%2Fnormalize%3Afunction%20normalize(path)%7Bif(Array.isArray(path))%7Bvar%20parts%3D%5B%5D%3Bfor(var%20i%3D0%3Bi%3Cpath.length%3Bi%2B%2B)%7Bvar%20args%3Dpath%5Bi%5D.toString().split('.')%3Bfor(var%20j%3D0%3Bj%3Cargs.length%3Bj%2B%2B)%7Bparts.push(args%5Bj%5D)%3B%7D%7Dreturn%20parts.join('.')%3B%7Delse%7Breturn%20path%3B%7D%7D%2C%2F**%0A%20%20%20%20%20*%20Splits%20a%20path%20into%20an%20array%20of%20property%20names.%20Accepts%20either%20arrays%0A%20%20%20%20%20*%20of%20path%20parts%20or%20strings.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20Example%3A%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%60%60%60%0A%20%20%20%20%20*%20Polymer.Path.split(%5B'foo.bar'%2C%200%2C%20'baz'%5D)%20%20%2F%2F%20%5B'foo'%2C%20'bar'%2C%20'0'%2C%20'baz'%5D%0A%20%20%20%20%20*%20Polymer.Path.split('foo.bar.0.baz')%20%20%20%20%20%20%20%20%2F%2F%20%5B'foo'%2C%20'bar'%2C%20'0'%2C%20'baz'%5D%0A%20%20%20%20%20*%20%60%60%60%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40memberof%20Polymer.Path%0A%20%20%20%20%20*%20%40param%20%7Bstring%20%7C%20!Array%3Cstring%7Cnumber%3E%7D%20path%20Input%20path%0A%20%20%20%20%20*%20%40return%20%7B!Array%3Cstring%3E%7D%20Array%20of%20path%20parts%0A%20%20%20%20%20*%20%40this%20%7BPath%7D%0A%20%20%20%20%20*%20%40suppress%20%7BcheckTypes%7D%0A%20%20%20%20%20*%2Fsplit%3Afunction%20split(path)%7Bif(Array.isArray(path))%7Breturn%20this.normalize(path).split('.')%3B%7Dreturn%20path.toString().split('.')%3B%7D%2C%2F**%0A%20%20%20%20%20*%20Reads%20a%20value%20from%20a%20path.%20%20If%20any%20sub-property%20in%20the%20path%20is%20%60undefined%60%2C%0A%20%20%20%20%20*%20this%20method%20returns%20%60undefined%60%20(will%20never%20throw.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40memberof%20Polymer.Path%0A%20%20%20%20%20*%20%40param%20%7BObject%7D%20root%20Object%20from%20which%20to%20dereference%20path%20from%0A%20%20%20%20%20*%20%40param%20%7Bstring%20%7C%20!Array%3Cstring%7Cnumber%3E%7D%20path%20Path%20to%20read%0A%20%20%20%20%20*%20%40param%20%7BObject%3D%7D%20info%20If%20an%20object%20is%20provided%20to%20%60info%60%2C%20the%20normalized%0A%20%20%20%20%20*%20%20(flattened)%20path%20will%20be%20set%20to%20%60info.path%60.%0A%20%20%20%20%20*%20%40return%20%7B*%7D%20Value%20at%20path%2C%20or%20%60undefined%60%20if%20the%20path%20could%20not%20be%0A%20%20%20%20%20*%20%20fully%20dereferenced.%0A%20%20%20%20%20*%20%40this%20%7BPath%7D%0A%20%20%20%20%20*%2Fget%3Afunction%20get(root%2Cpath%2Cinfo)%7Bvar%20prop%3Droot%3Bvar%20parts%3Dthis.split(path)%3B%2F%2F%20Loop%20over%20path%20parts%5B0..n-1%5D%20and%20dereference%0Afor(var%20i%3D0%3Bi%3Cparts.length%3Bi%2B%2B)%7Bif(!prop)%7Breturn%3B%7Dvar%20part%3Dparts%5Bi%5D%3Bprop%3Dprop%5Bpart%5D%3B%7Dif(info)%7Binfo.path%3Dparts.join('.')%3B%7Dreturn%20prop%3B%7D%2C%2F**%0A%20%20%20%20%20*%20Sets%20a%20value%20to%20a%20path.%20%20If%20any%20sub-property%20in%20the%20path%20is%20%60undefined%60%2C%0A%20%20%20%20%20*%20this%20method%20will%20no-op.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40memberof%20Polymer.Path%0A%20%20%20%20%20*%20%40param%20%7BObject%7D%20root%20Object%20from%20which%20to%20dereference%20path%20from%0A%20%20%20%20%20*%20%40param%20%7Bstring%20%7C%20!Array%3Cstring%7Cnumber%3E%7D%20path%20Path%20to%20set%0A%20%20%20%20%20*%20%40param%20%7B*%7D%20value%20Value%20to%20set%20to%20path%0A%20%20%20%20%20*%20%40return%20%7Bstring%20%7C%20undefined%7D%20The%20normalized%20version%20of%20the%20input%20path%0A%20%20%20%20%20*%20%40this%20%7BPath%7D%0A%20%20%20%20%20*%2Fset%3Afunction%20set(root%2Cpath%2Cvalue)%7Bvar%20prop%3Droot%3Bvar%20parts%3Dthis.split(path)%3Bvar%20last%3Dparts%5Bparts.length-1%5D%3Bif(parts.length%3E1)%7B%2F%2F%20Loop%20over%20path%20parts%5B0..n-2%5D%20and%20dereference%0Afor(var%20i%3D0%3Bi%3Cparts.length-1%3Bi%2B%2B)%7Bvar%20part%3Dparts%5Bi%5D%3Bprop%3Dprop%5Bpart%5D%3Bif(!prop)%7Breturn%3B%7D%7D%2F%2F%20Set%20value%20to%20object%20at%20end%20of%20path%0Aprop%5Blast%5D%3Dvalue%3B%7Delse%7B%2F%2F%20Simple%20property%20set%0Aprop%5Bpath%5D%3Dvalue%3B%7Dreturn%20parts.join('.')%3B%7D%7D%3B%2F**%0A%20%20%20*%20Returns%20true%20if%20the%20given%20string%20is%20a%20structured%20data%20path%20(has%20dots).%0A%20%20%20*%0A%20%20%20*%20This%20function%20is%20deprecated.%20%20Use%20%60Polymer.Path.isPath%60%20instead.%0A%20%20%20*%0A%20%20%20*%20Example%3A%0A%20%20%20*%0A%20%20%20*%20%60%60%60%0A%20%20%20*%20Polymer.Path.isDeep('foo.bar.baz')%20%2F%2F%20true%0A%20%20%20*%20Polymer.Path.isDeep('foo')%20%20%20%20%20%20%20%20%20%2F%2F%20false%0A%20%20%20*%20%60%60%60%0A%20%20%20*%0A%20%20%20*%20%40deprecated%0A%20%20%20*%20%40memberof%20Polymer.Path%0A%20%20%20*%20%40param%20%7Bstring%7D%20path%20Path%20string%0A%20%20%20*%20%40return%20%7Bboolean%7D%20True%20if%20the%20string%20contained%20one%20or%20more%20dots%0A%20%20%20*%2FPath.isDeep%3DPath.isPath%3BPolymer.Path%3DPath%3B%7D)()%3B%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Fcpt-static.gannettdigital.com%2Funiversal-web-client%2Fmaster%2Flatest%2Fvendor%2Fcomponents%2Fpolymer%2Flib%2Futils%2Fpath.html.js%0A | 7.1 kB | 2023-03-07 | 2024-01-25 | |
Pretty
Loading... | ||||
http:text/javascript;charset=utf-8,var%20_typeof%3Dtypeof%20Symbol%3D%3D%3D%22function%22%26%26typeof%20Symbol.iterator%3D%3D%3D%22symbol%22%3Ffunction(obj)%7Breturn%20typeof%20obj%3B%7D%3Afunction(obj)%7Breturn%20obj%26%26typeof%20Symbol%3D%3D%3D%22function%22%26%26obj.constructor%3D%3D%3DSymbol%26%26obj!%3D%3DSymbol.prototype%3F%22symbol%22%3Atypeof%20obj%3B%7D%3Bvar%20_createClass%3Dfunction()%7Bfunction%20defineProperties(target%2Cprops)%7Bfor(var%20i%3D0%3Bi%3Cprops.length%3Bi%2B%2B)%7Bvar%20descriptor%3Dprops%5Bi%5D%3Bdescriptor.enumerable%3Ddescriptor.enumerable%7C%7Cfalse%3Bdescriptor.configurable%3Dtrue%3Bif(%22value%22in%20descriptor)descriptor.writable%3Dtrue%3BObject.defineProperty(target%2Cdescriptor.key%2Cdescriptor)%3B%7D%7Dreturn%20function(Constructor%2CprotoProps%2CstaticProps)%7Bif(protoProps)defineProperties(Constructor.prototype%2CprotoProps)%3Bif(staticProps)defineProperties(Constructor%2CstaticProps)%3Breturn%20Constructor%3B%7D%3B%7D()%3Bvar%20_get%3Dfunction%20get(object%2Cproperty%2Creceiver)%7Bif(object%3D%3D%3Dnull)object%3DFunction.prototype%3Bvar%20desc%3DObject.getOwnPropertyDescriptor(object%2Cproperty)%3Bif(desc%3D%3D%3Dundefined)%7Bvar%20parent%3DObject.getPrototypeOf(object)%3Bif(parent%3D%3D%3Dnull)%7Breturn%20undefined%3B%7Delse%7Breturn%20get(parent%2Cproperty%2Creceiver)%3B%7D%7Delse%20if(%22value%22in%20desc)%7Breturn%20desc.value%3B%7Delse%7Bvar%20getter%3Ddesc.get%3Bif(getter%3D%3D%3Dundefined)%7Breturn%20undefined%3B%7Dreturn%20getter.call(receiver)%3B%7D%7D%3Bfunction%20_classCallCheck(instance%2CConstructor)%7Bif(!(instance%20instanceof%20Constructor))%7Bthrow%20new%20TypeError(%22Cannot%20call%20a%20class%20as%20a%20function%22)%3B%7D%7Dfunction%20_possibleConstructorReturn(self%2Ccall)%7Bif(!self)%7Bthrow%20new%20ReferenceError(%22this%20hasn't%20been%20initialised%20-%20super()%20hasn't%20been%20called%22)%3B%7Dreturn%20call%26%26(typeof%20call%3D%3D%3D%22object%22%7C%7Ctypeof%20call%3D%3D%3D%22function%22)%3Fcall%3Aself%3B%7Dfunction%20_inherits(subClass%2CsuperClass)%7Bif(typeof%20superClass!%3D%3D%22function%22%26%26superClass!%3D%3Dnull)%7Bthrow%20new%20TypeError(%22Super%20expression%20must%20either%20be%20null%20or%20a%20function%2C%20not%20%22%2Btypeof%20superClass)%3B%7DsubClass.prototype%3DObject.create(superClass%26%26superClass.prototype%2C%7Bconstructor%3A%7Bvalue%3AsubClass%2Cenumerable%3Afalse%2Cwritable%3Atrue%2Cconfigurable%3Atrue%7D%7D)%3Bif(superClass)Object.setPrototypeOf%3FObject.setPrototypeOf(subClass%2CsuperClass)%3AsubClass.__proto__%3DsuperClass%3B%7D(function()%7B'use%20strict'%3Bvar%20caseMap%3DPolymer.CaseMap%3B%2F%2F%20Save%20map%20of%20native%20properties%3B%20this%20forms%20a%20blacklist%20or%20properties%0A%2F%2F%20that%20won't%20have%20their%20values%20%22saved%22%20by%20%60saveAccessorValue%60%2C%20since%0A%2F%2F%20reading%20from%20an%20HTMLElement%20accessor%20from%20the%20context%20of%20a%20prototype%20throws%0Avar%20nativeProperties%3D%7B%7D%3Bvar%20proto%3DHTMLElement.prototype%3Bwhile(proto)%7Bvar%20props%3DObject.getOwnPropertyNames(proto)%3Bfor(var%20i%3D0%3Bi%3Cprops.length%3Bi%2B%2B)%7BnativeProperties%5Bprops%5Bi%5D%5D%3Dtrue%3B%7Dproto%3DObject.getPrototypeOf(proto)%3B%7D%2F**%0A%20%20%20*%20Used%20to%20save%20the%20value%20of%20a%20property%20that%20will%20be%20overridden%20with%0A%20%20%20*%20an%20accessor.%20If%20the%20%60model%60%20is%20a%20prototype%2C%20the%20values%20will%20be%20saved%0A%20%20%20*%20in%20%60__dataProto%60%2C%20and%20it's%20up%20to%20the%20user%20(or%20downstream%20mixin)%20to%0A%20%20%20*%20decide%20how%2Fwhen%20to%20set%20these%20values%20back%20into%20the%20accessors.%0A%20%20%20*%20If%20%60model%60%20is%20already%20an%20instance%20(it%20has%20a%20%60__data%60%20property)%2C%20then%0A%20%20%20*%20the%20value%20will%20be%20set%20as%20a%20pending%20property%2C%20meaning%20the%20user%20should%0A%20%20%20*%20call%20%60_invalidateProperties%60%20or%20%60_flushProperties%60%20to%20take%20effect%0A%20%20%20*%0A%20%20%20*%20%40param%20%7BObject%7D%20model%20Prototype%20or%20instance%0A%20%20%20*%20%40param%20%7Bstring%7D%20property%20Name%20of%20property%0A%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20*%20%40private%0A%20%20%20*%2Ffunction%20saveAccessorValue(model%2Cproperty)%7B%2F%2F%20Don't%20read%2Fstore%20value%20for%20any%20native%20properties%20since%20they%20could%20throw%0Aif(!nativeProperties%5Bproperty%5D)%7Bvar%20value%3Dmodel%5Bproperty%5D%3Bif(value!%3D%3Dundefined)%7Bif(model.__data)%7B%2F%2F%20Adding%20accessor%20to%20instance%3B%20update%20the%20property%0A%2F%2F%20It%20is%20the%20user's%20responsibility%20to%20call%20_flushProperties%0Amodel._setPendingProperty(property%2Cvalue)%3B%7Delse%7B%2F%2F%20Adding%20accessor%20to%20proto%3B%20save%20proto's%20value%20for%20instance-time%20use%0Aif(!model.__dataProto)%7Bmodel.__dataProto%3D%7B%7D%3B%7Delse%20if(!model.hasOwnProperty(JSCompiler_renameProperty('__dataProto'%2Cmodel)))%7Bmodel.__dataProto%3DObject.create(model.__dataProto)%3B%7Dmodel.__dataProto%5Bproperty%5D%3Dvalue%3B%7D%7D%7D%7D%2F**%0A%20%20%20*%20Element%20class%20mixin%20that%20provides%20basic%20meta-programming%20for%20creating%20one%0A%20%20%20*%20or%20more%20property%20accessors%20(getter%2Fsetter%20pair)%20that%20enqueue%20an%20async%0A%20%20%20*%20(batched)%20%60_propertiesChanged%60%20callback.%0A%20%20%20*%0A%20%20%20*%20For%20basic%20usage%20of%20this%20mixin%3A%0A%20%20%20*%20%0A%20%20%20*%20-%20%20%20Declare%20attributes%20to%20observe%20via%20the%20standard%20%60static%20get%20observedAttributes()%60.%20Use%0A%20%20%20*%20%20%20%20%20%60dash-case%60%20attribute%20names%20to%20represent%20%60camelCase%60%20property%20names.%20%0A%20%20%20*%20-%20%20%20Implement%20the%20%60_propertiesChanged%60%20callback%20on%20the%20class.%0A%20%20%20*%20-%20%20%20Call%20%60MyClass.createPropertiesForAttributes()%60%20**once**%20on%20the%20class%20to%20generate%20%0A%20%20%20*%20%20%20%20%20property%20accessors%20for%20each%20observed%20attribute.%20This%20must%20be%20called%20before%20the%20first%20%0A%20%20%20*%20%20%20%20%20instance%20is%20created%2C%20for%20example%2C%20by%20calling%20it%20before%20calling%20%60customElements.define%60.%0A%20%20%20*%20%20%20%20%20It%20can%20also%20be%20called%20lazily%20from%20the%20element's%20%60constructor%60%2C%20as%20long%20as%20it's%20guarded%20so%0A%20%20%20*%20%20%20%20%20that%20the%20call%20is%20only%20made%20once%2C%20when%20the%20first%20instance%20is%20created.%0A%20%20%20*%20-%20%20%20Call%20%60this._enableProperties()%60%20in%20the%20element's%20%60connectedCallback%60%20to%20enable%20%0A%20%20%20*%20%20%20%20%20the%20accessors.%0A%20%20%20*%0A%20%20%20*%20Any%20%60observedAttributes%60%20will%20automatically%20be%0A%20%20%20*%20deserialized%20via%20%60attributeChangedCallback%60%20and%20set%20to%20the%20associated%0A%20%20%20*%20property%20using%20%60dash-case%60-to-%60camelCase%60%20convention.%0A%20%20%20*%0A%20%20%20*%20%40mixinFunction%0A%20%20%20*%20%40polymer%0A%20%20%20*%20%40appliesMixin%20Polymer.PropertiesChanged%0A%20%20%20*%20%40memberof%20Polymer%0A%20%20%20*%20%40summary%20Element%20class%20mixin%20for%20reacting%20to%20property%20changes%20from%0A%20%20%20*%20%20%20generated%20property%20accessors.%0A%20%20%20*%2FPolymer.PropertyAccessors%3DPolymer.dedupingMixin(function(superClass)%7B%2F**%0A%20%20%20%20%20*%20%40constructor%0A%20%20%20%20%20*%20%40extends%20%7BsuperClass%7D%0A%20%20%20%20%20*%20%40implements%20%7BPolymer_PropertiesChanged%7D%0A%20%20%20%20%20*%20%40unrestricted%0A%20%20%20%20%20*%20%40private%0A%20%20%20%20%20*%2Fvar%20base%3DPolymer.PropertiesChanged(superClass)%3B%2F**%0A%20%20%20%20%20*%20%40polymer%0A%20%20%20%20%20*%20%40mixinClass%0A%20%20%20%20%20*%20%40implements%20%7BPolymer_PropertyAccessors%7D%0A%20%20%20%20%20*%20%40extends%20%7Bbase%7D%0A%20%20%20%20%20*%20%40unrestricted%0A%20%20%20%20%20*%2Fvar%20PropertyAccessors%3Dfunction(_base)%7B_inherits(PropertyAccessors%2C_base)%3Bfunction%20PropertyAccessors()%7B_classCallCheck(this%2CPropertyAccessors)%3Breturn%20_possibleConstructorReturn(this%2C(PropertyAccessors.__proto__%7C%7CObject.getPrototypeOf(PropertyAccessors)).apply(this%2Carguments))%3B%7D_createClass(PropertyAccessors%2C%5B%7Bkey%3A'_initializeProperties'%2C%2F**%0A%20%20%20%20%20%20%20*%20Overrides%20PropertiesChanged%20implementation%20to%20initialize%20values%20for%0A%20%20%20%20%20%20%20*%20accessors%20created%20for%20values%20that%20already%20existed%20on%20the%20element%0A%20%20%20%20%20%20%20*%20prototype.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20%20%20*%20%40protected%0A%20%20%20%20%20%20%20*%2Fvalue%3Afunction%20_initializeProperties()%7Bif(this.__dataProto)%7Bthis._initializeProtoProperties(this.__dataProto)%3Bthis.__dataProto%3Dnull%3B%7D_get(PropertyAccessors.prototype.__proto__%7C%7CObject.getPrototypeOf(PropertyAccessors.prototype)%2C'_initializeProperties'%2Cthis).call(this)%3B%7D%2F**%0A%20%20%20%20%20%20%20*%20Called%20at%20instance%20time%20with%20bag%20of%20properties%20that%20were%20overwritten%0A%20%20%20%20%20%20%20*%20by%20accessors%20on%20the%20prototype%20when%20accessors%20were%20created.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20The%20default%20implementation%20sets%20these%20properties%20back%20into%20the%0A%20%20%20%20%20%20%20*%20setter%20at%20instance%20time.%20%20This%20method%20is%20provided%20as%20an%20override%0A%20%20%20%20%20%20%20*%20point%20for%20customizing%20or%20providing%20more%20efficient%20initialization.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40param%20%7BObject%7D%20props%20Bag%20of%20property%20values%20that%20were%20overwritten%0A%20%20%20%20%20%20%20*%20%20%20when%20creating%20property%20accessors.%0A%20%20%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20%20%20*%20%40protected%0A%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'_initializeProtoProperties'%2Cvalue%3Afunction%20_initializeProtoProperties(props)%7Bfor(var%20p%20in%20props)%7Bthis._setProperty(p%2Cprops%5Bp%5D)%3B%7D%7D%2F**%0A%20%20%20%20%20%20%20*%20Ensures%20the%20element%20has%20the%20given%20attribute.%20If%20it%20does%20not%2C%0A%20%20%20%20%20%20%20*%20assigns%20the%20given%20value%20to%20the%20attribute.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40suppress%20%7BinvalidCasts%7D%20Closure%20can't%20figure%20out%20%60this%60%20is%20infact%20an%20element%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40param%20%7Bstring%7D%20attribute%20Name%20of%20attribute%20to%20ensure%20is%20set.%0A%20%20%20%20%20%20%20*%20%40param%20%7Bstring%7D%20value%20of%20the%20attribute.%0A%20%20%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'_ensureAttribute'%2Cvalue%3Afunction%20_ensureAttribute(attribute%2Cvalue)%7Bvar%20el%3D%2F**%20%40type%20%7B!HTMLElement%7D%20*%2Fthis%3Bif(!el.hasAttribute(attribute))%7Bthis._valueToNodeAttribute(el%2Cvalue%2Cattribute)%3B%7D%7D%2F**%0A%20%20%20%20%20%20%20*%20Overrides%20PropertiesChanged%20implemention%20to%20serialize%20objects%20as%20JSON.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40param%20%7B*%7D%20value%20Property%20value%20to%20serialize.%0A%20%20%20%20%20%20%20*%20%40return%20%7Bstring%20%7C%20undefined%7D%20String%20serialized%20from%20the%20provided%20property%20value.%0A%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'_serializeValue'%2Cvalue%3Afunction%20_serializeValue(value)%7B%2F*%20eslint-disable%20no-fallthrough%20*%2Fswitch(typeof%20value%3D%3D%3D'undefined'%3F'undefined'%3A_typeof(value))%7Bcase'object'%3Aif(value%20instanceof%20Date)%7Breturn%20value.toString()%3B%7Delse%20if(value)%7Btry%7Breturn%20JSON.stringify(value)%3B%7Dcatch(x)%7Breturn''%3B%7D%7Ddefault%3Areturn%20_get(PropertyAccessors.prototype.__proto__%7C%7CObject.getPrototypeOf(PropertyAccessors.prototype)%2C'_serializeValue'%2Cthis).call(this%2Cvalue)%3B%7D%7D%2F**%0A%20%20%20%20%20%20%20*%20Converts%20a%20string%20to%20a%20typed%20JavaScript%20value.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20This%20method%20is%20called%20by%20Polymer%20when%20reading%20HTML%20attribute%20values%20to%0A%20%20%20%20%20%20%20*%20JS%20properties.%20%20Users%20may%20override%20this%20method%20on%20Polymer%20element%0A%20%20%20%20%20%20%20*%20prototypes%20to%20provide%20deserialization%20for%20custom%20%60type%60s.%20%20Note%2C%0A%20%20%20%20%20%20%20*%20the%20%60type%60%20argument%20is%20the%20value%20of%20the%20%60type%60%20field%20provided%20in%20the%0A%20%20%20%20%20%20%20*%20%60properties%60%20configuration%20object%20for%20a%20given%20property%2C%20and%20is%0A%20%20%20%20%20%20%20*%20by%20convention%20the%20constructor%20for%20the%20type%20to%20deserialize.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40param%20%7B%3Fstring%7D%20value%20Attribute%20value%20to%20deserialize.%0A%20%20%20%20%20%20%20*%20%40param%20%7B*%3D%7D%20type%20Type%20to%20deserialize%20the%20string%20to.%0A%20%20%20%20%20%20%20*%20%40return%20%7B*%7D%20Typed%20value%20deserialized%20from%20the%20provided%20string.%0A%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'_deserializeValue'%2Cvalue%3Afunction%20_deserializeValue(value%2Ctype)%7B%2F**%0A%20%20%20%20%20%20%20%20%20*%20%40type%20%7B*%7D%0A%20%20%20%20%20%20%20%20%20*%2Fvar%20outValue%3Dvoid%200%3Bswitch(type)%7Bcase%20Object%3Atry%7BoutValue%3DJSON.parse(%2F**%20%40type%20%7Bstring%7D%20*%2Fvalue)%3B%7Dcatch(x)%7B%2F%2F%20allow%20non-JSON%20literals%20like%20Strings%20and%20Numbers%0AoutValue%3Dvalue%3B%7Dbreak%3Bcase%20Array%3Atry%7BoutValue%3DJSON.parse(%2F**%20%40type%20%7Bstring%7D%20*%2Fvalue)%3B%7Dcatch(x)%7BoutValue%3Dnull%3Bconsole.warn('Polymer%3A%3AAttributes%3A%20couldn%5C't%20decode%20Array%20as%20JSON%3A%20'%2Bvalue)%3B%7Dbreak%3Bcase%20Date%3AoutValue%3DisNaN(value)%3FString(value)%3ANumber(value)%3BoutValue%3Dnew%20Date(outValue)%3Bbreak%3Bdefault%3AoutValue%3D_get(PropertyAccessors.prototype.__proto__%7C%7CObject.getPrototypeOf(PropertyAccessors.prototype)%2C'_deserializeValue'%2Cthis).call(this%2Cvalue%2Ctype)%3Bbreak%3B%7Dreturn%20outValue%3B%7D%2F*%20eslint-enable%20no-fallthrough%20*%2F%2F**%0A%20%20%20%20%20%20%20*%20Overrides%20PropertiesChanged%20implementation%20to%20save%20existing%20prototype%0A%20%20%20%20%20%20%20*%20property%20value%20so%20that%20it%20can%20be%20reset.%0A%20%20%20%20%20%20%20*%20%40param%20%7Bstring%7D%20property%20Name%20of%20the%20property%0A%20%20%20%20%20%20%20*%20%40param%20%7Bboolean%3D%7D%20readOnly%20When%20true%2C%20no%20setter%20is%20created%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20When%20calling%20on%20a%20prototype%2C%20any%20overwritten%20values%20are%20saved%20in%0A%20%20%20%20%20%20%20*%20%60__dataProto%60%2C%20and%20it%20is%20up%20to%20the%20subclasser%20to%20decide%20how%2Fwhen%0A%20%20%20%20%20%20%20*%20to%20set%20those%20properties%20back%20into%20the%20accessor.%20%20When%20calling%20on%20an%0A%20%20%20%20%20%20%20*%20instance%2C%20the%20overwritten%20value%20is%20set%20via%20%60_setPendingProperty%60%2C%0A%20%20%20%20%20%20%20*%20and%20the%20user%20should%20call%20%60_invalidateProperties%60%20or%20%60_flushProperties%60%0A%20%20%20%20%20%20%20*%20for%20the%20values%20to%20take%20effect.%0A%20%20%20%20%20%20%20*%20%40protected%0A%20%20%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'_definePropertyAccessor'%2Cvalue%3Afunction%20_definePropertyAccessor(property%2CreadOnly)%7BsaveAccessorValue(this%2Cproperty)%3B_get(PropertyAccessors.prototype.__proto__%7C%7CObject.getPrototypeOf(PropertyAccessors.prototype)%2C'_definePropertyAccessor'%2Cthis).call(this%2Cproperty%2CreadOnly)%3B%7D%2F**%0A%20%20%20%20%20%20%20*%20Returns%20true%20if%20this%20library%20created%20an%20accessor%20for%20the%20given%20property.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40param%20%7Bstring%7D%20property%20Property%20name%0A%20%20%20%20%20%20%20*%20%40return%20%7Bboolean%7D%20True%20if%20an%20accessor%20was%20created%0A%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'_hasAccessor'%2Cvalue%3Afunction%20_hasAccessor(property)%7Breturn%20this.__dataHasAccessor%26%26this.__dataHasAccessor%5Bproperty%5D%3B%7D%2F**%0A%20%20%20%20%20%20%20*%20Returns%20true%20if%20the%20specified%20property%20has%20a%20pending%20change.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40param%20%7Bstring%7D%20prop%20Property%20name%0A%20%20%20%20%20%20%20*%20%40return%20%7Bboolean%7D%20True%20if%20property%20has%20a%20pending%20change%0A%20%20%20%20%20%20%20*%20%40protected%0A%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'_isPropertyPending'%2Cvalue%3Afunction%20_isPropertyPending(prop)%7Breturn%20Boolean(this.__dataPending%26%26prop%20in%20this.__dataPending)%3B%7D%7D%5D%2C%5B%7Bkey%3A'createPropertiesForAttributes'%2C%2F**%0A%20%20%20%20%20%20%20*%20Generates%20property%20accessors%20for%20all%20attributes%20in%20the%20standard%0A%20%20%20%20%20%20%20*%20static%20%60observedAttributes%60%20array.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20Attribute%20names%20are%20mapped%20to%20property%20names%20using%20the%20%60dash-case%60%20to%0A%20%20%20%20%20%20%20*%20%60camelCase%60%20convention%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20%20%20*%2Fvalue%3Afunction%20createPropertiesForAttributes()%7Bvar%20a%24%3Dthis.observedAttributes%3Bfor(var%20_i%3D0%3B_i%3Ca%24.length%3B_i%2B%2B)%7Bthis.prototype._createPropertyAccessor(caseMap.dashToCamelCase(a%24%5B_i%5D))%3B%7D%7D%2F**%0A%20%20%20%20%20%20%20*%20Returns%20an%20attribute%20name%20that%20corresponds%20to%20the%20given%20property.%0A%20%20%20%20%20%20%20*%20By%20default%2C%20converts%20camel%20to%20dash%20case%2C%20e.g.%20%60fooBar%60%20to%20%60foo-bar%60.%0A%20%20%20%20%20%20%20*%20%40param%20%7Bstring%7D%20property%20Property%20to%20convert%0A%20%20%20%20%20%20%20*%20%40return%20%7Bstring%7D%20Attribute%20name%20corresponding%20to%20the%20given%20property.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40protected%0A%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'attributeNameForProperty'%2Cvalue%3Afunction%20attributeNameForProperty(property)%7Breturn%20caseMap.camelToDashCase(property)%3B%7D%7D%5D)%3Breturn%20PropertyAccessors%3B%7D(base)%3Breturn%20PropertyAccessors%3B%7D)%3B%7D)()%3B%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Fcpt-static.gannettdigital.com%2Funiversal-web-client%2Fmaster%2Flatest%2Fvendor%2Fcomponents%2Fpolymer%2Flib%2Fmixins%2Fproperty-accessors.html.js%0A | 13 kB | 2023-03-07 | 2024-01-25 | |
Pretty
Loading... | ||||
http:text/javascript;charset=utf-8,(function()%7B'use%20strict'%3B%2F%2F%20detect%20native%20touch%20action%20support%0Avar%20HAS_NATIVE_TA%3Dtypeof%20document.head.style.touchAction%3D%3D%3D'string'%3Bvar%20GESTURE_KEY%3D'__polymerGestures'%3Bvar%20HANDLED_OBJ%3D'__polymerGesturesHandled'%3Bvar%20TOUCH_ACTION%3D'__polymerGesturesTouchAction'%3B%2F%2F%20radius%20for%20tap%20and%20track%0Avar%20TAP_DISTANCE%3D25%3Bvar%20TRACK_DISTANCE%3D5%3B%2F%2F%20number%20of%20last%20N%20track%20positions%20to%20keep%0Avar%20TRACK_LENGTH%3D2%3B%2F%2F%20Disabling%20%22mouse%22%20handlers%20for%202500ms%20is%20enough%0Avar%20MOUSE_TIMEOUT%3D2500%3Bvar%20MOUSE_EVENTS%3D%5B'mousedown'%2C'mousemove'%2C'mouseup'%2C'click'%5D%3B%2F%2F%20an%20array%20of%20bitmask%20values%20for%20mapping%20MouseEvent.which%20to%20MouseEvent.buttons%0Avar%20MOUSE_WHICH_TO_BUTTONS%3D%5B0%2C1%2C4%2C2%5D%3Bvar%20MOUSE_HAS_BUTTONS%3Dfunction()%7Btry%7Breturn%20new%20MouseEvent('test'%2C%7Bbuttons%3A1%7D).buttons%3D%3D%3D1%3B%7Dcatch(e)%7Breturn%20false%3B%7D%7D()%3B%2F**%0A%20%20%20*%20%40param%20%7Bstring%7D%20name%20Possible%20mouse%20event%20name%0A%20%20%20*%20%40return%20%7Bboolean%7D%20true%20if%20mouse%20event%2C%20false%20if%20not%0A%20%20%20*%2Ffunction%20isMouseEvent(name)%7Breturn%20MOUSE_EVENTS.indexOf(name)%3E-1%3B%7D%2F*%20eslint%20no-empty%3A%20%5B%22error%22%2C%20%7B%20%22allowEmptyCatch%22%3A%20true%20%7D%5D%20*%2F%2F%2F%20check%20for%20passive%20event%20listeners%0Avar%20SUPPORTS_PASSIVE%3Dfalse%3B(function()%7Btry%7Bvar%20opts%3DObject.defineProperty(%7B%7D%2C'passive'%2C%7Bget%3Afunction%20get()%7BSUPPORTS_PASSIVE%3Dtrue%3B%7D%7D)%3Bwindow.addEventListener('test'%2Cnull%2Copts)%3Bwindow.removeEventListener('test'%2Cnull%2Copts)%3B%7Dcatch(e)%7B%7D%7D)()%3B%2F**%0A%20%20%20*%20Generate%20settings%20for%20event%20listeners%2C%20dependant%20on%20%60Polymer.passiveTouchGestures%60%0A%20%20%20*%0A%20%20%20*%20%40param%20%7Bstring%7D%20eventName%20Event%20name%20to%20determine%20if%20%60%7Bpassive%7D%60%20option%20is%20needed%0A%20%20%20*%20%40return%20%7B%7Bpassive%3A%20boolean%7D%20%7C%20undefined%7D%20Options%20to%20use%20for%20addEventListener%20and%20removeEventListener%0A%20%20%20*%2Ffunction%20PASSIVE_TOUCH(eventName)%7Bif(isMouseEvent(eventName)%7C%7CeventName%3D%3D%3D'touchend')%7Breturn%3B%7Dif(HAS_NATIVE_TA%26%26SUPPORTS_PASSIVE%26%26Polymer.passiveTouchGestures)%7Breturn%7Bpassive%3Atrue%7D%3B%7Delse%7Breturn%3B%7D%7D%2F%2F%20Check%20for%20touch-only%20devices%0Avar%20IS_TOUCH_ONLY%3Dnavigator.userAgent.match(%2FiP(%3F%3A%5Boa%5Dd%7Chone)%7CAndroid%2F)%3Bvar%20GestureRecognizer%3Dfunction%20GestureRecognizer()%7B%7D%3B%2F%2F%20eslint-disable-line%20no-unused-vars%0A%2F**%20%40type%20%7Bfunction()%3A%20void%7D%20*%2FGestureRecognizer.prototype.reset%3B%2F**%20%40type%20%7Bfunction(MouseEvent)%3A%20void%20%7C%20undefined%7D%20*%2FGestureRecognizer.prototype.mousedown%3B%2F**%20%40type%20%7B(function(MouseEvent)%3A%20void%20%7C%20undefined)%7D%20*%2FGestureRecognizer.prototype.mousemove%3B%2F**%20%40type%20%7B(function(MouseEvent)%3A%20void%20%7C%20undefined)%7D%20*%2FGestureRecognizer.prototype.mouseup%3B%2F**%20%40type%20%7B(function(TouchEvent)%3A%20void%20%7C%20undefined)%7D%20*%2FGestureRecognizer.prototype.touchstart%3B%2F**%20%40type%20%7B(function(TouchEvent)%3A%20void%20%7C%20undefined)%7D%20*%2FGestureRecognizer.prototype.touchmove%3B%2F**%20%40type%20%7B(function(TouchEvent)%3A%20void%20%7C%20undefined)%7D%20*%2FGestureRecognizer.prototype.touchend%3B%2F**%20%40type%20%7B(function(MouseEvent)%3A%20void%20%7C%20undefined)%7D%20*%2FGestureRecognizer.prototype.click%3B%2F%2F%20keep%20track%20of%20any%20labels%20hit%20by%20the%20mouseCanceller%0A%2F**%20%40type%20%7B!Array%3C!HTMLLabelElement%3E%7D%20*%2Fvar%20clickedLabels%3D%5B%5D%3B%2F**%20%40type%20%7B!Object%3Cboolean%3E%7D%20*%2Fvar%20labellable%3D%7B'button'%3Atrue%2C'input'%3Atrue%2C'keygen'%3Atrue%2C'meter'%3Atrue%2C'output'%3Atrue%2C'textarea'%3Atrue%2C'progress'%3Atrue%2C'select'%3Atrue%7D%3B%2F%2F%20Defined%20at%20https%3A%2F%2Fhtml.spec.whatwg.org%2Fmultipage%2Fform-control-infrastructure.html%23enabling-and-disabling-form-controls%3A-the-disabled-attribute%0A%2F**%20%40type%20%7B!Object%3Cboolean%3E%7D%20*%2Fvar%20canBeDisabled%3D%7B'button'%3Atrue%2C'command'%3Atrue%2C'fieldset'%3Atrue%2C'input'%3Atrue%2C'keygen'%3Atrue%2C'optgroup'%3Atrue%2C'option'%3Atrue%2C'select'%3Atrue%2C'textarea'%3Atrue%7D%3B%2F**%0A%20%20%20*%20%40param%20%7BHTMLElement%7D%20el%20Element%20to%20check%20labelling%20status%0A%20%20%20*%20%40return%20%7Bboolean%7D%20element%20can%20have%20labels%0A%20%20%20*%2Ffunction%20canBeLabelled(el)%7Breturn%20labellable%5Bel.localName%5D%7C%7Cfalse%3B%7D%2F**%0A%20%20%20*%20%40param%20%7BHTMLElement%7D%20el%20Element%20that%20may%20be%20labelled.%0A%20%20%20*%20%40return%20%7B!Array%3C!HTMLLabelElement%3E%7D%20Relevant%20label%20for%20%60el%60%0A%20%20%20*%2Ffunction%20matchingLabels(el)%7Bvar%20labels%3DArray.from(%2F**%20%40type%20%7BHTMLInputElement%7D%20*%2Fel.labels%7C%7C%5B%5D)%3B%2F%2F%20IE%20doesn't%20have%20%60labels%60%20and%20Safari%20doesn't%20populate%20%60labels%60%0A%2F%2F%20if%20element%20is%20in%20a%20shadowroot.%0A%2F%2F%20In%20this%20instance%2C%20finding%20the%20non-ancestor%20labels%20is%20enough%2C%0A%2F%2F%20as%20the%20mouseCancellor%20code%20will%20handle%20ancstor%20labels%0Aif(!labels.length)%7Blabels%3D%5B%5D%3Bvar%20root%3Del.getRootNode()%3B%2F%2F%20if%20there%20is%20an%20id%20on%20%60el%60%2C%20check%20for%20all%20labels%20with%20a%20matching%20%60for%60%20attribute%0Aif(el.id)%7Bvar%20matching%3Droot.querySelectorAll('label%5Bfor%20%3D%20'%2Bel.id%2B'%5D')%3Bfor(var%20i%3D0%3Bi%3Cmatching.length%3Bi%2B%2B)%7Blabels.push(%2F**%20%40type%20%7B!HTMLLabelElement%7D%20*%2Fmatching%5Bi%5D)%3B%7D%7D%7Dreturn%20labels%3B%7D%2F%2F%20touch%20will%20make%20synthetic%20mouse%20events%0A%2F%2F%20%60preventDefault%60%20on%20touchend%20will%20cancel%20them%2C%0A%2F%2F%20but%20this%20breaks%20%60%3Cinput%3E%60%20focus%20and%20link%20clicks%0A%2F%2F%20disable%20mouse%20handlers%20for%20MOUSE_TIMEOUT%20ms%20after%0A%2F%2F%20a%20touchend%20to%20ignore%20synthetic%20mouse%20events%0Avar%20mouseCanceller%3Dfunction%20mouseCanceller(mouseEvent)%7B%2F%2F%20Check%20for%20sourceCapabilities%2C%20used%20to%20distinguish%20synthetic%20events%0A%2F%2F%20if%20mouseEvent%20did%20not%20come%20from%20a%20device%20that%20fires%20touch%20events%2C%0A%2F%2F%20it%20was%20made%20by%20a%20real%20mouse%20and%20should%20be%20counted%0A%2F%2F%20http%3A%2F%2Fwicg.github.io%2FInputDeviceCapabilities%2F%23dom-inputdevicecapabilities-firestouchevents%0Avar%20sc%3DmouseEvent.sourceCapabilities%3Bif(sc%26%26!sc.firesTouchEvents)%7Breturn%3B%7D%2F%2F%20skip%20synthetic%20mouse%20events%0AmouseEvent%5BHANDLED_OBJ%5D%3D%7Bskip%3Atrue%7D%3B%2F%2F%20disable%20%22ghost%20clicks%22%0Aif(mouseEvent.type%3D%3D%3D'click')%7Bvar%20clickFromLabel%3Dfalse%3Bvar%20path%3DmouseEvent.composedPath%26%26mouseEvent.composedPath()%3Bif(path)%7Bfor(var%20i%3D0%3Bi%3Cpath.length%3Bi%2B%2B)%7Bif(path%5Bi%5D.nodeType%3D%3D%3DNode.ELEMENT_NODE)%7Bif(path%5Bi%5D.localName%3D%3D%3D'label')%7BclickedLabels.push(path%5Bi%5D)%3B%7Delse%20if(canBeLabelled(path%5Bi%5D))%7Bvar%20ownerLabels%3DmatchingLabels(path%5Bi%5D)%3B%2F%2F%20check%20if%20one%20of%20the%20clicked%20labels%20is%20labelling%20this%20element%0Afor(var%20j%3D0%3Bj%3CownerLabels.length%3Bj%2B%2B)%7BclickFromLabel%3DclickFromLabel%7C%7CclickedLabels.indexOf(ownerLabels%5Bj%5D)%3E-1%3B%7D%7D%7Dif(path%5Bi%5D%3D%3D%3DPOINTERSTATE.mouse.target)%7Breturn%3B%7D%7D%7D%2F%2F%20if%20one%20of%20the%20clicked%20labels%20was%20labelling%20the%20target%20element%2C%0A%2F%2F%20this%20is%20not%20a%20ghost%20click%0Aif(clickFromLabel)%7Breturn%3B%7DmouseEvent.preventDefault()%3BmouseEvent.stopPropagation()%3B%7D%7D%3B%2F**%0A%20%20%20*%20%40param%20%7Bboolean%3D%7D%20setup%20True%20to%20add%2C%20false%20to%20remove.%0A%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20*%2Ffunction%20setupTeardownMouseCanceller(setup)%7Bvar%20events%3DIS_TOUCH_ONLY%3F%5B'click'%5D%3AMOUSE_EVENTS%3Bfor(var%20i%3D0%2Cen%3Bi%3Cevents.length%3Bi%2B%2B)%7Ben%3Devents%5Bi%5D%3Bif(setup)%7B%2F%2F%20reset%20clickLabels%20array%0AclickedLabels.length%3D0%3Bdocument.addEventListener(en%2CmouseCanceller%2Ctrue)%3B%7Delse%7Bdocument.removeEventListener(en%2CmouseCanceller%2Ctrue)%3B%7D%7D%7Dfunction%20ignoreMouse(e)%7Bif(!POINTERSTATE.mouse.mouseIgnoreJob)%7BsetupTeardownMouseCanceller(true)%3B%7Dvar%20unset%3Dfunction%20unset()%7BsetupTeardownMouseCanceller()%3BPOINTERSTATE.mouse.target%3Dnull%3BPOINTERSTATE.mouse.mouseIgnoreJob%3Dnull%3B%7D%3BPOINTERSTATE.mouse.target%3De.composedPath()%5B0%5D%3BPOINTERSTATE.mouse.mouseIgnoreJob%3DPolymer.Debouncer.debounce(POINTERSTATE.mouse.mouseIgnoreJob%2CPolymer.Async.timeOut.after(MOUSE_TIMEOUT)%2Cunset)%3B%7D%2F**%0A%20%20%20*%20%40param%20%7BMouseEvent%7D%20ev%20event%20to%20test%20for%20left%20mouse%20button%20down%0A%20%20%20*%20%40return%20%7Bboolean%7D%20has%20left%20mouse%20button%20down%0A%20%20%20*%2Ffunction%20hasLeftMouseButton(ev)%7Bvar%20type%3Dev.type%3B%2F%2F%20exit%20early%20if%20the%20event%20is%20not%20a%20mouse%20event%0Aif(!isMouseEvent(type))%7Breturn%20false%3B%7D%2F%2F%20ev.button%20is%20not%20reliable%20for%20mousemove%20(0%20is%20overloaded%20as%20both%20left%20button%20and%20no%20buttons)%0A%2F%2F%20instead%20we%20use%20ev.buttons%20(bitmask%20of%20buttons)%20or%20fall%20back%20to%20ev.which%20(deprecated%2C%200%20for%20no%20buttons%2C%201%20for%20left%20button)%0Aif(type%3D%3D%3D'mousemove')%7B%2F%2F%20allow%20undefined%20for%20testing%20events%0Avar%20buttons%3Dev.buttons%3D%3D%3Dundefined%3F1%3Aev.buttons%3Bif(ev%20instanceof%20window.MouseEvent%26%26!MOUSE_HAS_BUTTONS)%7Bbuttons%3DMOUSE_WHICH_TO_BUTTONS%5Bev.which%5D%7C%7C0%3B%7D%2F%2F%20buttons%20is%20a%20bitmask%2C%20check%20that%20the%20left%20button%20bit%20is%20set%20(1)%0Areturn%20Boolean(buttons%261)%3B%7Delse%7B%2F%2F%20allow%20undefined%20for%20testing%20events%0Avar%20button%3Dev.button%3D%3D%3Dundefined%3F0%3Aev.button%3B%2F%2F%20ev.button%20is%200%20in%20mousedown%2Fmouseup%2Fclick%20for%20left%20button%20activation%0Areturn%20button%3D%3D%3D0%3B%7D%7Dfunction%20isSyntheticClick(ev)%7Bif(ev.type%3D%3D%3D'click')%7B%2F%2F%20ev.detail%20is%200%20for%20HTMLElement.click%20in%20most%20browsers%0Aif(ev.detail%3D%3D%3D0)%7Breturn%20true%3B%7D%2F%2F%20in%20the%20worst%20case%2C%20check%20that%20the%20x%2Fy%20position%20of%20the%20click%20is%20within%0A%2F%2F%20the%20bounding%20box%20of%20the%20target%20of%20the%20event%0A%2F%2F%20Thanks%20IE%2010%20%3E%3A(%0Avar%20t%3DGestures._findOriginalTarget(ev)%3B%2F%2F%20make%20sure%20the%20target%20of%20the%20event%20is%20an%20element%20so%20we%20can%20use%20getBoundingClientRect%2C%0A%2F%2F%20if%20not%2C%20just%20assume%20it%20is%20a%20synthetic%20click%0Aif(!t.nodeType%7C%7C%2F**%20%40type%20%7BElement%7D%20*%2Ft.nodeType!%3D%3DNode.ELEMENT_NODE)%7Breturn%20true%3B%7Dvar%20bcr%3D%2F**%20%40type%20%7BElement%7D%20*%2Ft.getBoundingClientRect()%3B%2F%2F%20use%20page%20x%2Fy%20to%20account%20for%20scrolling%0Avar%20x%3Dev.pageX%2Cy%3Dev.pageY%3B%2F%2F%20ev%20is%20a%20synthetic%20click%20if%20the%20position%20is%20outside%20the%20bounding%20box%20of%20the%20target%0Areturn!(x%3E%3Dbcr.left%26%26x%3C%3Dbcr.right%26%26y%3E%3Dbcr.top%26%26y%3C%3Dbcr.bottom)%3B%7Dreturn%20false%3B%7Dvar%20POINTERSTATE%3D%7Bmouse%3A%7Btarget%3Anull%2CmouseIgnoreJob%3Anull%7D%2Ctouch%3A%7Bx%3A0%2Cy%3A0%2Cid%3A-1%2CscrollDecided%3Afalse%7D%7D%3Bfunction%20firstTouchAction(ev)%7Bvar%20ta%3D'auto'%3Bvar%20path%3Dev.composedPath%26%26ev.composedPath()%3Bif(path)%7Bfor(var%20i%3D0%2Cn%3Bi%3Cpath.length%3Bi%2B%2B)%7Bn%3Dpath%5Bi%5D%3Bif(n%5BTOUCH_ACTION%5D)%7Bta%3Dn%5BTOUCH_ACTION%5D%3Bbreak%3B%7D%7D%7Dreturn%20ta%3B%7Dfunction%20trackDocument(stateObj%2Cmovefn%2Cupfn)%7BstateObj.movefn%3Dmovefn%3BstateObj.upfn%3Dupfn%3Bdocument.addEventListener('mousemove'%2Cmovefn)%3Bdocument.addEventListener('mouseup'%2Cupfn)%3B%7Dfunction%20untrackDocument(stateObj)%7Bdocument.removeEventListener('mousemove'%2CstateObj.movefn)%3Bdocument.removeEventListener('mouseup'%2CstateObj.upfn)%3BstateObj.movefn%3Dnull%3BstateObj.upfn%3Dnull%3B%7D%2F%2F%20use%20a%20document-wide%20touchend%20listener%20to%20start%20the%20ghost-click%20prevention%20mechanism%0A%2F%2F%20Use%20passive%20event%20listeners%2C%20if%20supported%2C%20to%20not%20affect%20scrolling%20performance%0Adocument.addEventListener('touchend'%2CignoreMouse%2CSUPPORTS_PASSIVE%3F%7Bpassive%3Atrue%7D%3Afalse)%3B%2F**%0A%20%20%20*%20Module%20for%20adding%20listeners%20to%20a%20node%20for%20the%20following%20normalized%0A%20%20%20*%20cross-platform%20%22gesture%22%20events%3A%0A%20%20%20*%20-%20%60down%60%20-%20mouse%20or%20touch%20went%20down%0A%20%20%20*%20-%20%60up%60%20-%20mouse%20or%20touch%20went%20up%0A%20%20%20*%20-%20%60tap%60%20-%20mouse%20click%20or%20finger%20tap%0A%20%20%20*%20-%20%60track%60%20-%20mouse%20drag%20or%20touch%20move%0A%20%20%20*%0A%20%20%20*%20%40namespace%0A%20%20%20*%20%40memberof%20Polymer%0A%20%20%20*%20%40summary%20Module%20for%20adding%20cross-platform%20gesture%20event%20listeners.%0A%20%20%20*%2Fvar%20Gestures%3D%7Bgestures%3A%7B%7D%2Crecognizers%3A%5B%5D%2C%2F**%0A%20%20%20%20%20*%20Finds%20the%20element%20rendered%20on%20the%20screen%20at%20the%20provided%20coordinates.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20Similar%20to%20%60document.elementFromPoint%60%2C%20but%20pierces%20through%0A%20%20%20%20%20*%20shadow%20roots.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40memberof%20Polymer.Gestures%0A%20%20%20%20%20*%20%40param%20%7Bnumber%7D%20x%20Horizontal%20pixel%20coordinate%0A%20%20%20%20%20*%20%40param%20%7Bnumber%7D%20y%20Vertical%20pixel%20coordinate%0A%20%20%20%20%20*%20%40return%20%7BElement%7D%20Returns%20the%20deepest%20shadowRoot%20inclusive%20element%0A%20%20%20%20%20*%20found%20at%20the%20screen%20position%20given.%0A%20%20%20%20%20*%2FdeepTargetFind%3Afunction%20deepTargetFind(x%2Cy)%7Bvar%20node%3Ddocument.elementFromPoint(x%2Cy)%3Bvar%20next%3Dnode%3B%2F%2F%20this%20code%20path%20is%20only%20taken%20when%20native%20ShadowDOM%20is%20used%0A%2F%2F%20if%20there%20is%20a%20shadowroot%2C%20it%20may%20have%20a%20node%20at%20x%2Fy%0A%2F%2F%20if%20there%20is%20not%20a%20shadowroot%2C%20exit%20the%20loop%0Awhile(next%26%26next.shadowRoot%26%26!window.ShadyDOM)%7B%2F%2F%20if%20there%20is%20a%20node%20at%20x%2Fy%20in%20the%20shadowroot%2C%20look%20deeper%0Avar%20oldNext%3Dnext%3Bnext%3Dnext.shadowRoot.elementFromPoint(x%2Cy)%3B%2F%2F%20on%20Safari%2C%20elementFromPoint%20may%20return%20the%20shadowRoot%20host%0Aif(oldNext%3D%3D%3Dnext)%7Bbreak%3B%7Dif(next)%7Bnode%3Dnext%3B%7D%7Dreturn%20node%3B%7D%2C%2F**%0A%20%20%20%20%20*%20a%20cheaper%20check%20than%20ev.composedPath()%5B0%5D%3B%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40private%0A%20%20%20%20%20*%20%40param%20%7BEvent%7D%20ev%20Event.%0A%20%20%20%20%20*%20%40return%20%7BEventTarget%7D%20Returns%20the%20event%20target.%0A%20%20%20%20%20*%2F_findOriginalTarget%3Afunction%20_findOriginalTarget(ev)%7B%2F%2F%20shadowdom%0Aif(ev.composedPath)%7Bvar%20targets%3D%2F**%20%40type%20%7B!Array%3C!EventTarget%3E%7D%20*%2Fev.composedPath()%3B%2F%2F%20It%20shouldn't%20be%2C%20but%20sometimes%20targets%20is%20empty%20(window%20on%20Safari).%0Areturn%20targets.length%3E0%3Ftargets%5B0%5D%3Aev.target%3B%7D%2F%2F%20shadydom%0Areturn%20ev.target%3B%7D%2C%2F**%0A%20%20%20%20%20*%20%40private%0A%20%20%20%20%20*%20%40param%20%7BEvent%7D%20ev%20Event.%0A%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20*%2F_handleNative%3Afunction%20_handleNative(ev)%7Bvar%20handled%3Dvoid%200%3Bvar%20type%3Dev.type%3Bvar%20node%3Dev.currentTarget%3Bvar%20gobj%3Dnode%5BGESTURE_KEY%5D%3Bif(!gobj)%7Breturn%3B%7Dvar%20gs%3Dgobj%5Btype%5D%3Bif(!gs)%7Breturn%3B%7Dif(!ev%5BHANDLED_OBJ%5D)%7Bev%5BHANDLED_OBJ%5D%3D%7B%7D%3Bif(type.slice(0%2C5)%3D%3D%3D'touch')%7Bev%3D%2F**%20%40type%20%7BTouchEvent%7D%20*%2Fev%3B%2F%2F%20eslint-disable-line%20no-self-assign%0Avar%20t%3Dev.changedTouches%5B0%5D%3Bif(type%3D%3D%3D'touchstart')%7B%2F%2F%20only%20handle%20the%20first%20finger%0Aif(ev.touches.length%3D%3D%3D1)%7BPOINTERSTATE.touch.id%3Dt.identifier%3B%7D%7Dif(POINTERSTATE.touch.id!%3D%3Dt.identifier)%7Breturn%3B%7Dif(!HAS_NATIVE_TA)%7Bif(type%3D%3D%3D'touchstart'%7C%7Ctype%3D%3D%3D'touchmove')%7BGestures._handleTouchAction(ev)%3B%7D%7D%7D%7Dhandled%3Dev%5BHANDLED_OBJ%5D%3B%2F%2F%20used%20to%20ignore%20synthetic%20mouse%20events%0Aif(handled.skip)%7Breturn%3B%7D%2F%2F%20reset%20recognizer%20state%0Afor(var%20i%3D0%2Cr%3Bi%3CGestures.recognizers.length%3Bi%2B%2B)%7Br%3DGestures.recognizers%5Bi%5D%3Bif(gs%5Br.name%5D%26%26!handled%5Br.name%5D)%7Bif(r.flow%26%26r.flow.start.indexOf(ev.type)%3E-1%26%26r.reset)%7Br.reset()%3B%7D%7D%7D%2F%2F%20enforce%20gesture%20recognizer%20order%0Afor(var%20_i%3D0%2C_r%3B_i%3CGestures.recognizers.length%3B_i%2B%2B)%7B_r%3DGestures.recognizers%5B_i%5D%3Bif(gs%5B_r.name%5D%26%26!handled%5B_r.name%5D)%7Bhandled%5B_r.name%5D%3Dtrue%3B_r%5Btype%5D(ev)%3B%7D%7D%7D%2C%2F**%0A%20%20%20%20%20*%20%40private%0A%20%20%20%20%20*%20%40param%20%7BTouchEvent%7D%20ev%20Event.%0A%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20*%2F_handleTouchAction%3Afunction%20_handleTouchAction(ev)%7Bvar%20t%3Dev.changedTouches%5B0%5D%3Bvar%20type%3Dev.type%3Bif(type%3D%3D%3D'touchstart')%7BPOINTERSTATE.touch.x%3Dt.clientX%3BPOINTERSTATE.touch.y%3Dt.clientY%3BPOINTERSTATE.touch.scrollDecided%3Dfalse%3B%7Delse%20if(type%3D%3D%3D'touchmove')%7Bif(POINTERSTATE.touch.scrollDecided)%7Breturn%3B%7DPOINTERSTATE.touch.scrollDecided%3Dtrue%3Bvar%20ta%3DfirstTouchAction(ev)%3Bvar%20prevent%3Dfalse%3Bvar%20dx%3DMath.abs(POINTERSTATE.touch.x-t.clientX)%3Bvar%20dy%3DMath.abs(POINTERSTATE.touch.y-t.clientY)%3Bif(!ev.cancelable)%7B%2F%2F%20scrolling%20is%20happening%0A%7Delse%20if(ta%3D%3D%3D'none')%7Bprevent%3Dtrue%3B%7Delse%20if(ta%3D%3D%3D'pan-x')%7Bprevent%3Ddy%3Edx%3B%7Delse%20if(ta%3D%3D%3D'pan-y')%7Bprevent%3Ddx%3Edy%3B%7Dif(prevent)%7Bev.preventDefault()%3B%7Delse%7BGestures.prevent('track')%3B%7D%7D%7D%2C%2F**%0A%20%20%20%20%20*%20Adds%20an%20event%20listener%20to%20a%20node%20for%20the%20given%20gesture%20type.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40memberof%20Polymer.Gestures%0A%20%20%20%20%20*%20%40param%20%7B!Node%7D%20node%20Node%20to%20add%20listener%20on%0A%20%20%20%20%20*%20%40param%20%7Bstring%7D%20evType%20Gesture%20type%3A%20%60down%60%2C%20%60up%60%2C%20%60track%60%2C%20or%20%60tap%60%0A%20%20%20%20%20*%20%40param%20%7B!function(!Event)%3Avoid%7D%20handler%20Event%20listener%20function%20to%20call%0A%20%20%20%20%20*%20%40return%20%7Bboolean%7D%20Returns%20true%20if%20a%20gesture%20event%20listener%20was%20added.%0A%20%20%20%20%20*%20%40this%20%7BGestures%7D%0A%20%20%20%20%20*%2FaddListener%3Afunction%20addListener(node%2CevType%2Chandler)%7Bif(this.gestures%5BevType%5D)%7Bthis._add(node%2CevType%2Chandler)%3Breturn%20true%3B%7Dreturn%20false%3B%7D%2C%2F**%0A%20%20%20%20%20*%20Removes%20an%20event%20listener%20from%20a%20node%20for%20the%20given%20gesture%20type.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40memberof%20Polymer.Gestures%0A%20%20%20%20%20*%20%40param%20%7B!Node%7D%20node%20Node%20to%20remove%20listener%20from%0A%20%20%20%20%20*%20%40param%20%7Bstring%7D%20evType%20Gesture%20type%3A%20%60down%60%2C%20%60up%60%2C%20%60track%60%2C%20or%20%60tap%60%0A%20%20%20%20%20*%20%40param%20%7B!function(!Event)%3Avoid%7D%20handler%20Event%20listener%20function%20previously%20passed%20to%0A%20%20%20%20%20*%20%20%60addListener%60.%0A%20%20%20%20%20*%20%40return%20%7Bboolean%7D%20Returns%20true%20if%20a%20gesture%20event%20listener%20was%20removed.%0A%20%20%20%20%20*%20%40this%20%7BGestures%7D%0A%20%20%20%20%20*%2FremoveListener%3Afunction%20removeListener(node%2CevType%2Chandler)%7Bif(this.gestures%5BevType%5D)%7Bthis._remove(node%2CevType%2Chandler)%3Breturn%20true%3B%7Dreturn%20false%3B%7D%2C%2F**%0A%20%20%20%20%20*%20automate%20the%20event%20listeners%20for%20the%20native%20events%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40private%0A%20%20%20%20%20*%20%40param%20%7B!HTMLElement%7D%20node%20Node%20on%20which%20to%20add%20the%20event.%0A%20%20%20%20%20*%20%40param%20%7Bstring%7D%20evType%20Event%20type%20to%20add.%0A%20%20%20%20%20*%20%40param%20%7Bfunction(!Event)%7D%20handler%20Event%20handler%20function.%0A%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20*%20%40this%20%7BGestures%7D%0A%20%20%20%20%20*%2F_add%3Afunction%20_add(node%2CevType%2Chandler)%7Bvar%20recognizer%3Dthis.gestures%5BevType%5D%3Bvar%20deps%3Drecognizer.deps%3Bvar%20name%3Drecognizer.name%3Bvar%20gobj%3Dnode%5BGESTURE_KEY%5D%3Bif(!gobj)%7Bnode%5BGESTURE_KEY%5D%3Dgobj%3D%7B%7D%3B%7Dfor(var%20i%3D0%2Cdep%2Cgd%3Bi%3Cdeps.length%3Bi%2B%2B)%7Bdep%3Ddeps%5Bi%5D%3B%2F%2F%20don't%20add%20mouse%20handlers%20on%20iOS%20because%20they%20cause%20gray%20selection%20overlays%0Aif(IS_TOUCH_ONLY%26%26isMouseEvent(dep)%26%26dep!%3D%3D'click')%7Bcontinue%3B%7Dgd%3Dgobj%5Bdep%5D%3Bif(!gd)%7Bgobj%5Bdep%5D%3Dgd%3D%7B_count%3A0%7D%3B%7Dif(gd._count%3D%3D%3D0)%7Bnode.addEventListener(dep%2Cthis._handleNative%2CPASSIVE_TOUCH(dep))%3B%7Dgd%5Bname%5D%3D(gd%5Bname%5D%7C%7C0)%2B1%3Bgd._count%3D(gd._count%7C%7C0)%2B1%3B%7Dnode.addEventListener(evType%2Chandler)%3Bif(recognizer.touchAction)%7Bthis.setTouchAction(node%2Crecognizer.touchAction)%3B%7D%7D%2C%2F**%0A%20%20%20%20%20*%20automate%20event%20listener%20removal%20for%20native%20events%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40private%0A%20%20%20%20%20*%20%40param%20%7B!HTMLElement%7D%20node%20Node%20on%20which%20to%20remove%20the%20event.%0A%20%20%20%20%20*%20%40param%20%7Bstring%7D%20evType%20Event%20type%20to%20remove.%0A%20%20%20%20%20*%20%40param%20%7Bfunction(Event%3F)%7D%20handler%20Event%20handler%20function.%0A%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20*%20%40this%20%7BGestures%7D%0A%20%20%20%20%20*%2F_remove%3Afunction%20_remove(node%2CevType%2Chandler)%7Bvar%20recognizer%3Dthis.gestures%5BevType%5D%3Bvar%20deps%3Drecognizer.deps%3Bvar%20name%3Drecognizer.name%3Bvar%20gobj%3Dnode%5BGESTURE_KEY%5D%3Bif(gobj)%7Bfor(var%20i%3D0%2Cdep%2Cgd%3Bi%3Cdeps.length%3Bi%2B%2B)%7Bdep%3Ddeps%5Bi%5D%3Bgd%3Dgobj%5Bdep%5D%3Bif(gd%26%26gd%5Bname%5D)%7Bgd%5Bname%5D%3D(gd%5Bname%5D%7C%7C1)-1%3Bgd._count%3D(gd._count%7C%7C1)-1%3Bif(gd._count%3D%3D%3D0)%7Bnode.removeEventListener(dep%2Cthis._handleNative%2CPASSIVE_TOUCH(dep))%3B%7D%7D%7D%7Dnode.removeEventListener(evType%2Chandler)%3B%7D%2C%2F**%0A%20%20%20%20%20*%20Registers%20a%20new%20gesture%20event%20recognizer%20for%20adding%20new%20custom%0A%20%20%20%20%20*%20gesture%20event%20types.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40memberof%20Polymer.Gestures%0A%20%20%20%20%20*%20%40param%20%7B!GestureRecognizer%7D%20recog%20Gesture%20recognizer%20descriptor%0A%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20*%20%40this%20%7BGestures%7D%0A%20%20%20%20%20*%2Fregister%3Afunction%20register(recog)%7Bthis.recognizers.push(recog)%3Bfor(var%20i%3D0%3Bi%3Crecog.emits.length%3Bi%2B%2B)%7Bthis.gestures%5Brecog.emits%5Bi%5D%5D%3Drecog%3B%7D%7D%2C%2F**%0A%20%20%20%20%20*%20%40private%0A%20%20%20%20%20*%20%40param%20%7Bstring%7D%20evName%20Event%20name.%0A%20%20%20%20%20*%20%40return%20%7BObject%7D%20Returns%20the%20gesture%20for%20the%20given%20event%20name.%0A%20%20%20%20%20*%20%40this%20%7BGestures%7D%0A%20%20%20%20%20*%2F_findRecognizerByEvent%3Afunction%20_findRecognizerByEvent(evName)%7Bfor(var%20i%3D0%2Cr%3Bi%3Cthis.recognizers.length%3Bi%2B%2B)%7Br%3Dthis.recognizers%5Bi%5D%3Bfor(var%20j%3D0%2Cn%3Bj%3Cr.emits.length%3Bj%2B%2B)%7Bn%3Dr.emits%5Bj%5D%3Bif(n%3D%3D%3DevName)%7Breturn%20r%3B%7D%7D%7Dreturn%20null%3B%7D%2C%2F**%0A%20%20%20%20%20*%20Sets%20scrolling%20direction%20on%20node.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20This%20value%20is%20checked%20on%20first%20move%2C%20thus%20it%20should%20be%20called%20prior%20to%0A%20%20%20%20%20*%20adding%20event%20listeners.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40memberof%20Polymer.Gestures%0A%20%20%20%20%20*%20%40param%20%7B!Element%7D%20node%20Node%20to%20set%20touch%20action%20setting%20on%0A%20%20%20%20%20*%20%40param%20%7Bstring%7D%20value%20Touch%20action%20value%0A%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20*%2FsetTouchAction%3Afunction%20setTouchAction(node%2Cvalue)%7Bif(HAS_NATIVE_TA)%7B%2F%2F%20NOTE%3A%20add%20touchAction%20async%20so%20that%20events%20can%20be%20added%20in%0A%2F%2F%20custom%20element%20constructors.%20Otherwise%20we%20run%20afoul%20of%20custom%0A%2F%2F%20elements%20restriction%20against%20settings%20attributes%20(style)%20in%20the%0A%2F%2F%20constructor.%0APolymer.Async.microTask.run(function()%7Bnode.style.touchAction%3Dvalue%3B%7D)%3B%7Dnode%5BTOUCH_ACTION%5D%3Dvalue%3B%7D%2C%2F**%0A%20%20%20%20%20*%20Dispatches%20an%20event%20on%20the%20%60target%60%20element%20of%20%60type%60%20with%20the%20given%0A%20%20%20%20%20*%20%60detail%60.%0A%20%20%20%20%20*%20%40private%0A%20%20%20%20%20*%20%40param%20%7B!EventTarget%7D%20target%20The%20element%20on%20which%20to%20fire%20an%20event.%0A%20%20%20%20%20*%20%40param%20%7Bstring%7D%20type%20The%20type%20of%20event%20to%20fire.%0A%20%20%20%20%20*%20%40param%20%7B!Object%3D%7D%20detail%20The%20detail%20object%20to%20populate%20on%20the%20event.%0A%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20*%2F_fire%3Afunction%20_fire(target%2Ctype%2Cdetail)%7Bvar%20ev%3Dnew%20Event(type%2C%7Bbubbles%3Atrue%2Ccancelable%3Atrue%2Ccomposed%3Atrue%7D)%3Bev.detail%3Ddetail%3Btarget.dispatchEvent(ev)%3B%2F%2F%20forward%20%60preventDefault%60%20in%20a%20clean%20way%0Aif(ev.defaultPrevented)%7Bvar%20preventer%3Ddetail.preventer%7C%7Cdetail.sourceEvent%3Bif(preventer%26%26preventer.preventDefault)%7Bpreventer.preventDefault()%3B%7D%7D%7D%2C%2F**%0A%20%20%20%20%20*%20Prevents%20the%20dispatch%20and%20default%20action%20of%20the%20given%20event%20name.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40memberof%20Polymer.Gestures%0A%20%20%20%20%20*%20%40param%20%7Bstring%7D%20evName%20Event%20name.%0A%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20*%20%40this%20%7BGestures%7D%0A%20%20%20%20%20*%2Fprevent%3Afunction%20prevent(evName)%7Bvar%20recognizer%3Dthis._findRecognizerByEvent(evName)%3Bif(recognizer.info)%7Brecognizer.info.prevent%3Dtrue%3B%7D%7D%2C%2F**%0A%20%20%20%20%20*%20Reset%20the%202500ms%20timeout%20on%20processing%20mouse%20input%20after%20detecting%20touch%20input.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20Touch%20inputs%20create%20synthesized%20mouse%20inputs%20anywhere%20from%200%20to%202000ms%20after%20the%20touch.%0A%20%20%20%20%20*%20This%20method%20should%20only%20be%20called%20during%20testing%20with%20simulated%20touch%20inputs.%0A%20%20%20%20%20*%20Calling%20this%20method%20in%20production%20may%20cause%20duplicate%20taps%20or%20other%20Gestures.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40memberof%20Polymer.Gestures%0A%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20*%2FresetMouseCanceller%3Afunction%20resetMouseCanceller()%7Bif(POINTERSTATE.mouse.mouseIgnoreJob)%7BPOINTERSTATE.mouse.mouseIgnoreJob.flush()%3B%7D%7D%7D%3B%2F*%20eslint-disable%20valid-jsdoc%20*%2FGestures.register(%7Bname%3A'downup'%2Cdeps%3A%5B'mousedown'%2C'touchstart'%2C'touchend'%5D%2Cflow%3A%7Bstart%3A%5B'mousedown'%2C'touchstart'%5D%2Cend%3A%5B'mouseup'%2C'touchend'%5D%7D%2Cemits%3A%5B'down'%2C'up'%5D%2Cinfo%3A%7Bmovefn%3Anull%2Cupfn%3Anull%7D%2C%2F**%0A%20%20%20%20%20*%20%40this%20%7BGestureRecognizer%7D%0A%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20*%2Freset%3Afunction%20reset()%7BuntrackDocument(this.info)%3B%7D%2C%2F**%0A%20%20%20%20%20*%20%40this%20%7BGestureRecognizer%7D%0A%20%20%20%20%20*%20%40param%20%7BMouseEvent%7D%20e%0A%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20*%2Fmousedown%3Afunction%20mousedown(e)%7Bif(!hasLeftMouseButton(e))%7Breturn%3B%7Dvar%20t%3DGestures._findOriginalTarget(e)%3Bvar%20self%3Dthis%3Bvar%20movefn%3Dfunction%20movefn(e)%7Bif(!hasLeftMouseButton(e))%7Bself._fire('up'%2Ct%2Ce)%3BuntrackDocument(self.info)%3B%7D%7D%3Bvar%20upfn%3Dfunction%20upfn(e)%7Bif(hasLeftMouseButton(e))%7Bself._fire('up'%2Ct%2Ce)%3B%7DuntrackDocument(self.info)%3B%7D%3BtrackDocument(this.info%2Cmovefn%2Cupfn)%3Bthis._fire('down'%2Ct%2Ce)%3B%7D%2C%2F**%0A%20%20%20%20%20*%20%40this%20%7BGestureRecognizer%7D%0A%20%20%20%20%20*%20%40param%20%7BTouchEvent%7D%20e%0A%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20*%2Ftouchstart%3Afunction%20touchstart(e)%7Bthis._fire('down'%2CGestures._findOriginalTarget(e)%2Ce.changedTouches%5B0%5D%2Ce)%3B%7D%2C%2F**%0A%20%20%20%20%20*%20%40this%20%7BGestureRecognizer%7D%0A%20%20%20%20%20*%20%40param%20%7BTouchEvent%7D%20e%0A%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20*%2Ftouchend%3Afunction%20touchend(e)%7Bthis._fire('up'%2CGestures._findOriginalTarget(e)%2Ce.changedTouches%5B0%5D%2Ce)%3B%7D%2C%2F**%0A%20%20%20%20%20*%20%40param%20%7Bstring%7D%20type%0A%20%20%20%20%20*%20%40param%20%7B!EventTarget%7D%20target%0A%20%20%20%20%20*%20%40param%20%7BEvent%7D%20event%0A%20%20%20%20%20*%20%40param%20%7BFunction%7D%20preventer%0A%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20*%2F_fire%3Afunction%20_fire(type%2Ctarget%2Cevent%2Cpreventer)%7BGestures._fire(target%2Ctype%2C%7Bx%3Aevent.clientX%2Cy%3Aevent.clientY%2CsourceEvent%3Aevent%2Cpreventer%3Apreventer%2Cprevent%3Afunction%20prevent(e)%7Breturn%20Gestures.prevent(e)%3B%7D%7D)%3B%7D%7D)%3BGestures.register(%7Bname%3A'track'%2CtouchAction%3A'none'%2Cdeps%3A%5B'mousedown'%2C'touchstart'%2C'touchmove'%2C'touchend'%5D%2Cflow%3A%7Bstart%3A%5B'mousedown'%2C'touchstart'%5D%2Cend%3A%5B'mouseup'%2C'touchend'%5D%7D%2Cemits%3A%5B'track'%5D%2Cinfo%3A%7Bx%3A0%2Cy%3A0%2Cstate%3A'start'%2Cstarted%3Afalse%2Cmoves%3A%5B%5D%2C%2F**%20%40this%20%7BGestureRecognizer%7D%20*%2FaddMove%3Afunction%20addMove(move)%7Bif(this.moves.length%3ETRACK_LENGTH)%7Bthis.moves.shift()%3B%7Dthis.moves.push(move)%3B%7D%2Cmovefn%3Anull%2Cupfn%3Anull%2Cprevent%3Afalse%7D%2C%2F**%0A%20%20%20%20%20*%20%40this%20%7BGestureRecognizer%7D%0A%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20*%2Freset%3Afunction%20reset()%7Bthis.info.state%3D'start'%3Bthis.info.started%3Dfalse%3Bthis.info.moves%3D%5B%5D%3Bthis.info.x%3D0%3Bthis.info.y%3D0%3Bthis.info.prevent%3Dfalse%3BuntrackDocument(this.info)%3B%7D%2C%2F**%0A%20%20%20%20%20*%20%40this%20%7BGestureRecognizer%7D%0A%20%20%20%20%20*%20%40param%20%7Bnumber%7D%20x%0A%20%20%20%20%20*%20%40param%20%7Bnumber%7D%20y%0A%20%20%20%20%20*%20%40return%20%7Bboolean%7D%0A%20%20%20%20%20*%2FhasMovedEnough%3Afunction%20hasMovedEnough(x%2Cy)%7Bif(this.info.prevent)%7Breturn%20false%3B%7Dif(this.info.started)%7Breturn%20true%3B%7Dvar%20dx%3DMath.abs(this.info.x-x)%3Bvar%20dy%3DMath.abs(this.info.y-y)%3Breturn%20dx%3E%3DTRACK_DISTANCE%7C%7Cdy%3E%3DTRACK_DISTANCE%3B%7D%2C%2F**%0A%20%20%20%20%20*%20%40this%20%7BGestureRecognizer%7D%0A%20%20%20%20%20*%20%40param%20%7BMouseEvent%7D%20e%0A%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20*%2Fmousedown%3Afunction%20mousedown(e)%7Bif(!hasLeftMouseButton(e))%7Breturn%3B%7Dvar%20t%3DGestures._findOriginalTarget(e)%3Bvar%20self%3Dthis%3Bvar%20movefn%3Dfunction%20movefn(e)%7Bvar%20x%3De.clientX%2Cy%3De.clientY%3Bif(self.hasMovedEnough(x%2Cy))%7B%2F%2F%20first%20move%20is%20'start'%2C%20subsequent%20moves%20are%20'move'%2C%20mouseup%20is%20'end'%0Aself.info.state%3Dself.info.started%3Fe.type%3D%3D%3D'mouseup'%3F'end'%3A'track'%3A'start'%3Bif(self.info.state%3D%3D%3D'start')%7B%2F%2F%20if%20and%20only%20if%20tracking%2C%20always%20prevent%20tap%0AGestures.prevent('tap')%3B%7Dself.info.addMove(%7Bx%3Ax%2Cy%3Ay%7D)%3Bif(!hasLeftMouseButton(e))%7B%2F%2F%20always%20_fire%20%22end%22%0Aself.info.state%3D'end'%3BuntrackDocument(self.info)%3B%7Dself._fire(t%2Ce)%3Bself.info.started%3Dtrue%3B%7D%7D%3Bvar%20upfn%3Dfunction%20upfn(e)%7Bif(self.info.started)%7Bmovefn(e)%3B%7D%2F%2F%20remove%20the%20temporary%20listeners%0AuntrackDocument(self.info)%3B%7D%3B%2F%2F%20add%20temporary%20document%20listeners%20as%20mouse%20retargets%0AtrackDocument(this.info%2Cmovefn%2Cupfn)%3Bthis.info.x%3De.clientX%3Bthis.info.y%3De.clientY%3B%7D%2C%2F**%0A%20%20%20%20%20*%20%40this%20%7BGestureRecognizer%7D%0A%20%20%20%20%20*%20%40param%20%7BTouchEvent%7D%20e%0A%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20*%2Ftouchstart%3Afunction%20touchstart(e)%7Bvar%20ct%3De.changedTouches%5B0%5D%3Bthis.info.x%3Dct.clientX%3Bthis.info.y%3Dct.clientY%3B%7D%2C%2F**%0A%20%20%20%20%20*%20%40this%20%7BGestureRecognizer%7D%0A%20%20%20%20%20*%20%40param%20%7BTouchEvent%7D%20e%0A%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20*%2Ftouchmove%3Afunction%20touchmove(e)%7Bvar%20t%3DGestures._findOriginalTarget(e)%3Bvar%20ct%3De.changedTouches%5B0%5D%3Bvar%20x%3Dct.clientX%2Cy%3Dct.clientY%3Bif(this.hasMovedEnough(x%2Cy))%7Bif(this.info.state%3D%3D%3D'start')%7B%2F%2F%20if%20and%20only%20if%20tracking%2C%20always%20prevent%20tap%0AGestures.prevent('tap')%3B%7Dthis.info.addMove(%7Bx%3Ax%2Cy%3Ay%7D)%3Bthis._fire(t%2Cct)%3Bthis.info.state%3D'track'%3Bthis.info.started%3Dtrue%3B%7D%7D%2C%2F**%0A%20%20%20%20%20*%20%40this%20%7BGestureRecognizer%7D%0A%20%20%20%20%20*%20%40param%20%7BTouchEvent%7D%20e%0A%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20*%2Ftouchend%3Afunction%20touchend(e)%7Bvar%20t%3DGestures._findOriginalTarget(e)%3Bvar%20ct%3De.changedTouches%5B0%5D%3B%2F%2F%20only%20trackend%20if%20track%20was%20started%20and%20not%20aborted%0Aif(this.info.started)%7B%2F%2F%20reset%20started%20state%20on%20up%0Athis.info.state%3D'end'%3Bthis.info.addMove(%7Bx%3Act.clientX%2Cy%3Act.clientY%7D)%3Bthis._fire(t%2Cct%2Ce)%3B%7D%7D%2C%2F**%0A%20%20%20%20%20*%20%40this%20%7BGestureRecognizer%7D%0A%20%20%20%20%20*%20%40param%20%7B!EventTarget%7D%20target%0A%20%20%20%20%20*%20%40param%20%7BTouch%7D%20touch%0A%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20*%2F_fire%3Afunction%20_fire(target%2Ctouch)%7Bvar%20secondlast%3Dthis.info.moves%5Bthis.info.moves.length-2%5D%3Bvar%20lastmove%3Dthis.info.moves%5Bthis.info.moves.length-1%5D%3Bvar%20dx%3Dlastmove.x-this.info.x%3Bvar%20dy%3Dlastmove.y-this.info.y%3Bvar%20ddx%3Dvoid%200%2Cddy%3D0%3Bif(secondlast)%7Bddx%3Dlastmove.x-secondlast.x%3Bddy%3Dlastmove.y-secondlast.y%3B%7DGestures._fire(target%2C'track'%2C%7Bstate%3Athis.info.state%2Cx%3Atouch.clientX%2Cy%3Atouch.clientY%2Cdx%3Adx%2Cdy%3Ady%2Cddx%3Addx%2Cddy%3Addy%2CsourceEvent%3Atouch%2Chover%3Afunction%20hover()%7Breturn%20Gestures.deepTargetFind(touch.clientX%2Ctouch.clientY)%3B%7D%7D)%3B%7D%7D)%3BGestures.register(%7Bname%3A'tap'%2Cdeps%3A%5B'mousedown'%2C'click'%2C'touchstart'%2C'touchend'%5D%2Cflow%3A%7Bstart%3A%5B'mousedown'%2C'touchstart'%5D%2Cend%3A%5B'click'%2C'touchend'%5D%7D%2Cemits%3A%5B'tap'%5D%2Cinfo%3A%7Bx%3ANaN%2Cy%3ANaN%2Cprevent%3Afalse%7D%2C%2F**%0A%20%20%20%20%20*%20%40this%20%7BGestureRecognizer%7D%0A%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20*%2Freset%3Afunction%20reset()%7Bthis.info.x%3DNaN%3Bthis.info.y%3DNaN%3Bthis.info.prevent%3Dfalse%3B%7D%2C%2F**%0A%20%20%20%20%20*%20%40this%20%7BGestureRecognizer%7D%0A%20%20%20%20%20*%20%40param%20%7BMouseEvent%7D%20e%0A%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20*%2Fsave%3Afunction%20save(e)%7Bthis.info.x%3De.clientX%3Bthis.info.y%3De.clientY%3B%7D%2C%2F**%0A%20%20%20%20%20*%20%40this%20%7BGestureRecognizer%7D%0A%20%20%20%20%20*%20%40param%20%7BMouseEvent%7D%20e%0A%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20*%2Fmousedown%3Afunction%20mousedown(e)%7Bif(hasLeftMouseButton(e))%7Bthis.save(e)%3B%7D%7D%2C%2F**%0A%20%20%20%20%20*%20%40this%20%7BGestureRecognizer%7D%0A%20%20%20%20%20*%20%40param%20%7BMouseEvent%7D%20e%0A%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20*%2Fclick%3Afunction%20click(e)%7Bif(hasLeftMouseButton(e))%7Bthis.forward(e)%3B%7D%7D%2C%2F**%0A%20%20%20%20%20*%20%40this%20%7BGestureRecognizer%7D%0A%20%20%20%20%20*%20%40param%20%7BTouchEvent%7D%20e%0A%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20*%2Ftouchstart%3Afunction%20touchstart(e)%7Bthis.save(e.changedTouches%5B0%5D%2Ce)%3B%7D%2C%2F**%0A%20%20%20%20%20*%20%40this%20%7BGestureRecognizer%7D%0A%20%20%20%20%20*%20%40param%20%7BTouchEvent%7D%20e%0A%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20*%2Ftouchend%3Afunction%20touchend(e)%7Bthis.forward(e.changedTouches%5B0%5D%2Ce)%3B%7D%2C%2F**%0A%20%20%20%20%20*%20%40this%20%7BGestureRecognizer%7D%0A%20%20%20%20%20*%20%40param%20%7BEvent%20%7C%20Touch%7D%20e%0A%20%20%20%20%20*%20%40param%20%7BEvent%3D%7D%20preventer%0A%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20*%2Fforward%3Afunction%20forward(e%2Cpreventer)%7Bvar%20dx%3DMath.abs(e.clientX-this.info.x)%3Bvar%20dy%3DMath.abs(e.clientY-this.info.y)%3B%2F%2F%20find%20original%20target%20from%20%60preventer%60%20for%20TouchEvents%2C%20or%20%60e%60%20for%20MouseEvents%0Avar%20t%3DGestures._findOriginalTarget(%2F**%20%40type%20%7BEvent%7D%20*%2Fpreventer%7C%7Ce)%3Bif(!t%7C%7CcanBeDisabled%5B%2F**%20%40type%20%7B!HTMLElement%7D%20*%2Ft.localName%5D%26%26t.hasAttribute('disabled'))%7Breturn%3B%7D%2F%2F%20dx%2Cdy%20can%20be%20NaN%20if%20%60click%60%20has%20been%20simulated%20and%20there%20was%20no%20%60down%60%20for%20%60start%60%0Aif(isNaN(dx)%7C%7CisNaN(dy)%7C%7Cdx%3C%3DTAP_DISTANCE%26%26dy%3C%3DTAP_DISTANCE%7C%7CisSyntheticClick(e))%7B%2F%2F%20prevent%20taps%20from%20being%20generated%20if%20an%20event%20has%20canceled%20them%0Aif(!this.info.prevent)%7BGestures._fire(t%2C'tap'%2C%7Bx%3Ae.clientX%2Cy%3Ae.clientY%2CsourceEvent%3Ae%2Cpreventer%3Apreventer%7D)%3B%7D%7D%7D%7D)%3B%2F*%20eslint-enable%20valid-jsdoc%20*%2F%2F**%20%40deprecated%20*%2FGestures.findOriginalTarget%3DGestures._findOriginalTarget%3B%2F**%20%40deprecated%20*%2FGestures.add%3DGestures.addListener%3B%2F**%20%40deprecated%20*%2FGestures.remove%3DGestures.removeListener%3BPolymer.Gestures%3DGestures%3B%7D)()%3B%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Fcpt-static.gannettdigital.com%2Funiversal-web-client%2Fmaster%2Flatest%2Fvendor%2Fcomponents%2Fpolymer%2Flib%2Futils%2Fgestures.html.js%0A | 27 kB | 2023-03-07 | 2024-01-25 | |
Pretty
Loading... | ||||
unknown | 0 B | 2023-03-07 | 2024-04-25 | |
Pretty
Loading... | ||||
http:text/javascript;charset=utf-8,var%20_createClass%3Dfunction()%7Bfunction%20defineProperties(target%2Cprops)%7Bfor(var%20i%3D0%3Bi%3Cprops.length%3Bi%2B%2B)%7Bvar%20descriptor%3Dprops%5Bi%5D%3Bdescriptor.enumerable%3Ddescriptor.enumerable%7C%7Cfalse%3Bdescriptor.configurable%3Dtrue%3Bif(%22value%22in%20descriptor)descriptor.writable%3Dtrue%3BObject.defineProperty(target%2Cdescriptor.key%2Cdescriptor)%3B%7D%7Dreturn%20function(Constructor%2CprotoProps%2CstaticProps)%7Bif(protoProps)defineProperties(Constructor.prototype%2CprotoProps)%3Bif(staticProps)defineProperties(Constructor%2CstaticProps)%3Breturn%20Constructor%3B%7D%3B%7D()%3Bfunction%20_classCallCheck(instance%2CConstructor)%7Bif(!(instance%20instanceof%20Constructor))%7Bthrow%20new%20TypeError(%22Cannot%20call%20a%20class%20as%20a%20function%22)%3B%7D%7Dfunction%20_possibleConstructorReturn(self%2Ccall)%7Bif(!self)%7Bthrow%20new%20ReferenceError(%22this%20hasn't%20been%20initialised%20-%20super()%20hasn't%20been%20called%22)%3B%7Dreturn%20call%26%26(typeof%20call%3D%3D%3D%22object%22%7C%7Ctypeof%20call%3D%3D%3D%22function%22)%3Fcall%3Aself%3B%7Dfunction%20_inherits(subClass%2CsuperClass)%7Bif(typeof%20superClass!%3D%3D%22function%22%26%26superClass!%3D%3Dnull)%7Bthrow%20new%20TypeError(%22Super%20expression%20must%20either%20be%20null%20or%20a%20function%2C%20not%20%22%2Btypeof%20superClass)%3B%7DsubClass.prototype%3DObject.create(superClass%26%26superClass.prototype%2C%7Bconstructor%3A%7Bvalue%3AsubClass%2Cenumerable%3Afalse%2Cwritable%3Atrue%2Cconfigurable%3Atrue%7D%7D)%3Bif(superClass)Object.setPrototypeOf%3FObject.setPrototypeOf(subClass%2CsuperClass)%3AsubClass.__proto__%3DsuperClass%3B%7D(function()%7B'use%20strict'%3Bvar%20attr%3D'include'%3Bvar%20CustomStyleInterface%3Dwindow.ShadyCSS.CustomStyleInterface%3B%2F**%0A%20%20%20*%20Custom%20element%20for%20defining%20styles%20in%20the%20main%20document%20that%20can%20take%0A%20%20%20*%20advantage%20of%20%5Bshady%20DOM%5D(https%3A%2F%2Fgithub.com%2Fwebcomponents%2Fshadycss)%20shims%0A%20%20%20*%20for%20style%20encapsulation%2C%20custom%20properties%2C%20and%20custom%20mixins.%0A%20%20%20*%0A%20%20%20*%20-%20Document%20styles%20defined%20in%20a%20%60%3Ccustom-style%3E%60%20are%20shimmed%20to%20ensure%20they%0A%20%20%20*%20%20%20do%20not%20leak%20into%20local%20DOM%20when%20running%20on%20browsers%20without%20native%0A%20%20%20*%20%20%20Shadow%20DOM.%0A%20%20%20*%20-%20Custom%20properties%20can%20be%20defined%20in%20a%20%60%3Ccustom-style%3E%60.%20Use%20the%20%60html%60%20selector%0A%20%20%20*%20%20%20to%20define%20custom%20properties%20that%20apply%20to%20all%20custom%20elements.%0A%20%20%20*%20-%20Custom%20mixins%20can%20be%20defined%20in%20a%20%60%3Ccustom-style%3E%60%2C%20if%20you%20import%20the%20optional%0A%20%20%20*%20%20%20%5Bapply%20shim%5D(https%3A%2F%2Fgithub.com%2Fwebcomponents%2Fshadycss%23about-applyshim)%0A%20%20%20*%20%20%20(%60shadycss%2Fapply-shim.html%60).%0A%20%20%20*%0A%20%20%20*%20To%20use%3A%0A%20%20%20*%0A%20%20%20*%20-%20Import%20%60custom-style.html%60.%0A%20%20%20*%20-%20Place%20a%20%60%3Ccustom-style%3E%60%20element%20in%20the%20main%20document%2C%20wrapping%20an%20inline%20%60%3Cstyle%3E%60%20tag%20that%0A%20%20%20*%20%20%20contains%20the%20CSS%20rules%20you%20want%20to%20shim.%0A%20%20%20*%0A%20%20%20*%20For%20example%3A%0A%20%20%20*%0A%20%20%20*%20%60%60%60html%0A%20%20%20*%20%3C!--%20import%20apply%20shim--only%20required%20if%20using%20mixins%20--%3E%0A%20%20%20*%20%3Clink%20rel%3D%22import%22%20href%3D%22bower_components%2Fshadycss%2Fapply-shim.html%22%3E%0A%20%20%20*%20%3C!--%20import%20custom-style%20element%20--%3E%0A%20%20%20*%20%3Clink%20rel%3D%22import%22%20href%3D%22bower_components%2Fpolymer%2Flib%2Felements%2Fcustom-style.html%22%3E%0A%20%20%20*%0A%20%20%20*%20%3Ccustom-style%3E%0A%20%20%20*%20%20%20%3Cstyle%3E%0A%20%20%20*%20%20%20%20%20html%20%7B%0A%20%20%20*%20%20%20%20%20%20%20--custom-color%3A%20blue%3B%0A%20%20%20*%20%20%20%20%20%20%20--custom-mixin%3A%20%7B%0A%20%20%20*%20%20%20%20%20%20%20%20%20font-weight%3A%20bold%3B%0A%20%20%20*%20%20%20%20%20%20%20%20%20color%3A%20red%3B%0A%20%20%20*%20%20%20%20%20%20%20%7D%3B%0A%20%20%20*%20%20%20%20%20%7D%0A%20%20%20*%20%20%20%3C%2Fstyle%3E%0A%20%20%20*%20%3C%2Fcustom-style%3E%0A%20%20%20*%20%60%60%60%0A%20%20%20*%0A%20%20%20*%20%40customElement%0A%20%20%20*%20%40extends%20HTMLElement%0A%20%20%20*%20%40memberof%20Polymer%0A%20%20%20*%20%40summary%20Custom%20element%20for%20defining%20styles%20in%20the%20main%20document%20that%20can%0A%20%20%20*%20%20%20take%20advantage%20of%20Polymer's%20style%20scoping%20and%20custom%20properties%20shims.%0A%20%20%20*%2Fvar%20CustomStyle%3Dfunction(_HTMLElement)%7B_inherits(CustomStyle%2C_HTMLElement)%3Bfunction%20CustomStyle()%7B_classCallCheck(this%2CCustomStyle)%3Bvar%20_this%3D_possibleConstructorReturn(this%2C(CustomStyle.__proto__%7C%7CObject.getPrototypeOf(CustomStyle)).call(this))%3B_this._style%3Dnull%3BCustomStyleInterface.addCustomStyle(_this)%3Breturn%20_this%3B%7D%2F**%0A%20%20%20%20%20*%20Returns%20the%20light-DOM%20%60%3Cstyle%3E%60%20child%20this%20element%20wraps.%20%20Upon%20first%0A%20%20%20%20%20*%20call%20any%20style%20modules%20referenced%20via%20the%20%60include%60%20attribute%20will%20be%0A%20%20%20%20%20*%20concatenated%20to%20this%20element's%20%60%3Cstyle%3E%60.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40return%20%7BHTMLStyleElement%7D%20This%20element's%20light-DOM%20%60%3Cstyle%3E%60%0A%20%20%20%20%20*%2F_createClass(CustomStyle%2C%5B%7Bkey%3A'getStyle'%2Cvalue%3Afunction%20getStyle()%7Bif(this._style)%7Breturn%20this._style%3B%7Dvar%20style%3D%2F**%20%40type%20%7BHTMLStyleElement%7D%20*%2Fthis.querySelector('style')%3Bif(!style)%7Breturn%20null%3B%7Dthis._style%3Dstyle%3Bvar%20include%3Dstyle.getAttribute(attr)%3Bif(include)%7Bstyle.removeAttribute(attr)%3Bstyle.textContent%3DPolymer.StyleGather.cssFromModules(include)%2Bstyle.textContent%3B%7D%2F*%0A%20%20%20%20%20%20HTML%20Imports%20styling%20the%20main%20document%20are%20deprecated%20in%20Chrome%0A%20%20%20%20%20%20https%3A%2F%2Fcrbug.com%2F523952%0A%0A%20%20%20%20%20%20If%20this%20element%20is%20not%20in%20the%20main%20document%2C%20then%20it%20must%20be%20in%20an%20HTML%20Import%20document.%0A%20%20%20%20%20%20In%20that%20case%2C%20move%20the%20custom%20style%20to%20the%20main%20document.%0A%0A%20%20%20%20%20%20The%20ordering%20of%20%60%3Ccustom-style%3E%60%20should%20stay%20the%20same%20as%20when%20loaded%20by%20HTML%20Imports%2C%20but%20there%20may%20be%20odd%0A%20%20%20%20%20%20cases%20of%20ordering%20w.r.t%20the%20main%20document%20styles.%0A%20%20%20%20%20%20*%2Fif(this.ownerDocument!%3D%3Dwindow.document)%7Bwindow.document.head.appendChild(this)%3B%7Dreturn%20this._style%3B%7D%7D%5D)%3Breturn%20CustomStyle%3B%7D(HTMLElement)%3Bwindow.customElements.define('custom-style'%2CCustomStyle)%3B%2F**%20%40const%20*%2FPolymer.CustomStyle%3DCustomStyle%3B%7D)()%3B%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Fcpt-static.gannettdigital.com%2Funiversal-web-client%2Fmaster%2Flatest%2Fvendor%2Fcomponents%2Fpolymer%2Flib%2Felements%2Fcustom-style.html.js%0A | 5.0 kB | 2023-03-07 | 2024-01-25 | |
Pretty
Loading... | ||||
http:text/javascript;charset=utf-8,var%20_createClass%3Dfunction()%7Bfunction%20defineProperties(target%2Cprops)%7Bfor(var%20i%3D0%3Bi%3Cprops.length%3Bi%2B%2B)%7Bvar%20descriptor%3Dprops%5Bi%5D%3Bdescriptor.enumerable%3Ddescriptor.enumerable%7C%7Cfalse%3Bdescriptor.configurable%3Dtrue%3Bif(%22value%22in%20descriptor)descriptor.writable%3Dtrue%3BObject.defineProperty(target%2Cdescriptor.key%2Cdescriptor)%3B%7D%7Dreturn%20function(Constructor%2CprotoProps%2CstaticProps)%7Bif(protoProps)defineProperties(Constructor.prototype%2CprotoProps)%3Bif(staticProps)defineProperties(Constructor%2CstaticProps)%3Breturn%20Constructor%3B%7D%3B%7D()%3Bfunction%20_classCallCheck(instance%2CConstructor)%7Bif(!(instance%20instanceof%20Constructor))%7Bthrow%20new%20TypeError(%22Cannot%20call%20a%20class%20as%20a%20function%22)%3B%7D%7Dfunction%20_possibleConstructorReturn(self%2Ccall)%7Bif(!self)%7Bthrow%20new%20ReferenceError(%22this%20hasn't%20been%20initialised%20-%20super()%20hasn't%20been%20called%22)%3B%7Dreturn%20call%26%26(typeof%20call%3D%3D%3D%22object%22%7C%7Ctypeof%20call%3D%3D%3D%22function%22)%3Fcall%3Aself%3B%7Dfunction%20_inherits(subClass%2CsuperClass)%7Bif(typeof%20superClass!%3D%3D%22function%22%26%26superClass!%3D%3Dnull)%7Bthrow%20new%20TypeError(%22Super%20expression%20must%20either%20be%20null%20or%20a%20function%2C%20not%20%22%2Btypeof%20superClass)%3B%7DsubClass.prototype%3DObject.create(superClass%26%26superClass.prototype%2C%7Bconstructor%3A%7Bvalue%3AsubClass%2Cenumerable%3Afalse%2Cwritable%3Atrue%2Cconfigurable%3Atrue%7D%7D)%3Bif(superClass)Object.setPrototypeOf%3FObject.setPrototypeOf(subClass%2CsuperClass)%3AsubClass.__proto__%3DsuperClass%3B%7D(function()%7B'use%20strict'%3Bvar%20modules%3D%7B%7D%3Bvar%20lcModules%3D%7B%7D%3Bfunction%20setModule(id%2Cmodule)%7B%2F%2F%20store%20id%20separate%20from%20lowercased%20id%20so%20that%0A%2F%2F%20in%20all%20cases%20mixedCase%20id%20will%20stored%20distinctly%0A%2F%2F%20and%20lowercase%20version%20is%20a%20fallback%0Amodules%5Bid%5D%3DlcModules%5Bid.toLowerCase()%5D%3Dmodule%3B%7Dfunction%20findModule(id)%7Breturn%20modules%5Bid%5D%7C%7ClcModules%5Bid.toLowerCase()%5D%3B%7Dfunction%20styleOutsideTemplateCheck(inst)%7Bif(inst.querySelector('style'))%7Bconsole.warn('dom-module%20%25s%20has%20style%20outside%20template'%2Cinst.id)%3B%7D%7D%2F**%0A%20%20%20*%20The%20%60dom-module%60%20element%20registers%20the%20dom%20it%20contains%20to%20the%20name%20given%0A%20%20%20*%20by%20the%20module's%20id%20attribute.%20It%20provides%20a%20unified%20database%20of%20dom%0A%20%20%20*%20accessible%20via%20its%20static%20%60import%60%20API.%0A%20%20%20*%0A%20%20%20*%20A%20key%20use%20case%20of%20%60dom-module%60%20is%20for%20providing%20custom%20element%20%60%3Ctemplate%3E%60s%0A%20%20%20*%20via%20HTML%20imports%20that%20are%20parsed%20by%20the%20native%20HTML%20parser%2C%20that%20can%20be%0A%20%20%20*%20relocated%20during%20a%20bundling%20pass%20and%20still%20looked%20up%20by%20%60id%60.%0A%20%20%20*%0A%20%20%20*%20Example%3A%0A%20%20%20*%0A%20%20%20*%20%20%20%20%20%3Cdom-module%20id%3D%22foo%22%3E%0A%20%20%20*%20%20%20%20%20%20%20%3Cimg%20src%3D%22stuff.png%22%3E%0A%20%20%20*%20%20%20%20%20%3C%2Fdom-module%3E%0A%20%20%20*%0A%20%20%20*%20Then%20in%20code%20in%20some%20other%20location%20that%20cannot%20access%20the%20dom-module%20above%0A%20%20%20*%0A%20%20%20*%20%20%20%20%20let%20img%20%3D%20customElements.get('dom-module').import('foo'%2C%20'img')%3B%0A%20%20%20*%0A%20%20%20*%20%40customElement%0A%20%20%20*%20%40extends%20HTMLElement%0A%20%20%20*%20%40memberof%20Polymer%0A%20%20%20*%20%40summary%20Custom%20element%20that%20provides%20a%20registry%20of%20relocatable%20DOM%20content%0A%20%20%20*%20%20%20by%20%60id%60%20that%20is%20agnostic%20to%20bundling.%0A%20%20%20*%20%40unrestricted%0A%20%20%20*%2Fvar%20DomModule%3Dfunction(_HTMLElement)%7B_inherits(DomModule%2C_HTMLElement)%3Bfunction%20DomModule()%7B_classCallCheck(this%2CDomModule)%3Breturn%20_possibleConstructorReturn(this%2C(DomModule.__proto__%7C%7CObject.getPrototypeOf(DomModule)).apply(this%2Carguments))%3B%7D_createClass(DomModule%2C%5B%7Bkey%3A'attributeChangedCallback'%2C%2F*%20eslint-disable%20no-unused-vars%20*%2F%2F**%0A%20%20%20%20%20*%20%40param%20%7Bstring%7D%20name%20Name%20of%20attribute.%0A%20%20%20%20%20*%20%40param%20%7B%3Fstring%7D%20old%20Old%20value%20of%20attribute.%0A%20%20%20%20%20*%20%40param%20%7B%3Fstring%7D%20value%20Current%20value%20of%20attribute.%0A%20%20%20%20%20*%20%40param%20%7B%3Fstring%7D%20namespace%20Attribute%20namespace.%0A%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20*%2Fvalue%3Afunction%20attributeChangedCallback(name%2Cold%2Cvalue%2Cnamespace)%7Bif(old!%3D%3Dvalue)%7Bthis.register()%3B%7D%7D%2F*%20eslint-enable%20no-unused-args%20*%2F%2F**%0A%20%20%20%20%20*%20The%20absolute%20URL%20of%20the%20original%20location%20of%20this%20%60dom-module%60.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20This%20value%20will%20differ%20from%20this%20element's%20%60ownerDocument%60%20in%20the%0A%20%20%20%20%20*%20following%20ways%3A%0A%20%20%20%20%20*%20-%20Takes%20into%20account%20any%20%60assetpath%60%20attribute%20added%20during%20bundling%0A%20%20%20%20%20*%20%20%20to%20indicate%20the%20original%20location%20relative%20to%20the%20bundled%20location%0A%20%20%20%20%20*%20-%20Uses%20the%20HTMLImports%20polyfill's%20%60importForElement%60%20API%20to%20ensure%0A%20%20%20%20%20*%20%20%20the%20path%20is%20relative%20to%20the%20import%20document's%20location%20since%0A%20%20%20%20%20*%20%20%20%60ownerDocument%60%20is%20not%20currently%20polyfilled%0A%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'register'%2C%2F**%0A%20%20%20%20%20*%20Registers%20the%20dom-module%20at%20a%20given%20id.%20This%20method%20should%20only%20be%20called%0A%20%20%20%20%20*%20when%20a%20dom-module%20is%20imperatively%20created.%20For%0A%20%20%20%20%20*%20example%2C%20%60document.createElement('dom-module').register('foo')%60.%0A%20%20%20%20%20*%20%40param%20%7Bstring%3D%7D%20id%20The%20id%20at%20which%20to%20register%20the%20dom-module.%0A%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20*%2Fvalue%3Afunction%20register(id)%7Bid%3Did%7C%7Cthis.id%3Bif(id)%7B%2F%2F%20Under%20strictTemplatePolicy%2C%20reject%20and%20null%20out%20any%20re-registered%0A%2F%2F%20dom-module%20since%20it%20is%20ambiguous%20whether%20first-in%20or%20last-in%20is%20trusted%20%0Aif(Polymer.strictTemplatePolicy%26%26findModule(id)!%3D%3Dundefined)%7BsetModule(id%2Cnull)%3Bthrow%20new%20Error('strictTemplatePolicy%3A%20dom-module%20'%2Bid%2B'%20re-registered')%3B%7Dthis.id%3Did%3BsetModule(id%2Cthis)%3BstyleOutsideTemplateCheck(this)%3B%7D%7D%7D%2C%7Bkey%3A'assetpath'%2Cget%3Afunction%20get()%7B%2F%2F%20Don't%20override%20existing%20assetpath.%0Aif(!this.__assetpath)%7B%2F%2F%20note%3A%20assetpath%20set%20via%20an%20attribute%20must%20be%20relative%20to%20this%0A%2F%2F%20element's%20location%3B%20accomodate%20polyfilled%20HTMLImports%0Avar%20owner%3Dwindow.HTMLImports%26%26HTMLImports.importForElement%3FHTMLImports.importForElement(this)%7C%7Cdocument%3Athis.ownerDocument%3Bvar%20url%3DPolymer.ResolveUrl.resolveUrl(this.getAttribute('assetpath')%7C%7C''%2Cowner.baseURI)%3Bthis.__assetpath%3DPolymer.ResolveUrl.pathFromUrl(url)%3B%7Dreturn%20this.__assetpath%3B%7D%7D%5D%2C%5B%7Bkey%3A'import'%2C%2F**%0A%20%20%20%20%20*%20Retrieves%20the%20element%20specified%20by%20the%20css%20%60selector%60%20in%20the%20module%0A%20%20%20%20%20*%20registered%20by%20%60id%60.%20For%20example%2C%20this.import('foo'%2C%20'img')%3B%0A%20%20%20%20%20*%20%40param%20%7Bstring%7D%20id%20The%20id%20of%20the%20dom-module%20in%20which%20to%20search.%0A%20%20%20%20%20*%20%40param%20%7Bstring%3D%7D%20selector%20The%20css%20selector%20by%20which%20to%20find%20the%20element.%0A%20%20%20%20%20*%20%40return%20%7BElement%7D%20Returns%20the%20element%20which%20matches%20%60selector%60%20in%20the%0A%20%20%20%20%20*%20module%20registered%20at%20the%20specified%20%60id%60.%0A%20%20%20%20%20*%2Fvalue%3Afunction%20_import(id%2Cselector)%7Bif(id)%7Bvar%20m%3DfindModule(id)%3Bif(m%26%26selector)%7Breturn%20m.querySelector(selector)%3B%7Dreturn%20m%3B%7Dreturn%20null%3B%7D%7D%2C%7Bkey%3A'observedAttributes'%2Cget%3Afunction%20get()%7Breturn%5B'id'%5D%3B%7D%7D%5D)%3Breturn%20DomModule%3B%7D(HTMLElement)%3BDomModule.prototype%5B'modules'%5D%3Dmodules%3BcustomElements.define('dom-module'%2CDomModule)%3B%2F**%20%40const%20*%2FPolymer.DomModule%3DDomModule%3B%7D)()%3B%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Fcpt-static.gannettdigital.com%2Funiversal-web-client%2Fmaster%2Flatest%2Fvendor%2Fcomponents%2Fpolymer%2Flib%2Felements%2Fdom-module.html.js%0A | 6.2 kB | 2023-03-07 | 2024-01-25 | |
Pretty
Loading... | ||||
eu.uticaod.com/story/sports/2021/01/23/section-iii-has-work-do-after-ny-covid-19-high-risk-high-school-sports-get-ok/6686662002/ | 11 kB | 2023-03-07 | 2023-12-30 | |
Pretty
Loading... | ||||
http:text/javascript;charset=utf-8,(function()%7B'use%20strict'%3Bvar%20userPolymer%3Dwindow.Polymer%3B%2F**%0A%20%20%20*%20%40namespace%20Polymer%0A%20%20%20*%20%40summary%20Polymer%20is%20a%20lightweight%20library%20built%20on%20top%20of%20the%20web%0A%20%20%20*%20%20%20standards-based%20Web%20Components%20API's%2C%20and%20makes%20it%20easy%20to%20build%20your%0A%20%20%20*%20%20%20own%20custom%20HTML%20elements.%0A%20%20%20*%20%40param%20%7B!PolymerInit%7D%20info%20Prototype%20for%20the%20custom%20element.%20It%20must%20contain%0A%20%20%20*%20%20%20an%20%60is%60%20property%20to%20specify%20the%20element%20name.%20Other%20properties%20populate%0A%20%20%20*%20%20%20the%20element%20prototype.%20The%20%60properties%60%2C%20%60observers%60%2C%20%60hostAttributes%60%2C%0A%20%20%20*%20%20%20and%20%60listeners%60%20properties%20are%20processed%20to%20create%20element%20features.%0A%20%20%20*%20%40return%20%7B!Object%7D%20Returns%20a%20custom%20element%20class%20for%20the%20given%20provided%0A%20%20%20*%20%20%20prototype%20%60info%60%20object.%20The%20name%20of%20the%20element%20if%20given%20by%20%60info.is%60.%0A%20%20%20*%2Fwindow.Polymer%3Dfunction(info)%7Breturn%20window.Polymer._polymerFn(info)%3B%7D%3B%2F%2F%20support%20user%20settings%20on%20the%20Polymer%20object%0Aif(userPolymer)%7BObject.assign(Polymer%2CuserPolymer)%3B%7D%2F%2F%20To%20be%20plugged%20by%20legacy%20implementation%20if%20loaded%0A%2F*%20eslint-disable%20valid-jsdoc%20*%2F%2F**%0A%20%20%20*%20%40param%20%7B!PolymerInit%7D%20info%20Prototype%20for%20the%20custom%20element.%20It%20must%20contain%0A%20%20%20*%20%20%20an%20%60is%60%20property%20to%20specify%20the%20element%20name.%20Other%20properties%20populate%0A%20%20%20*%20%20%20the%20element%20prototype.%20The%20%60properties%60%2C%20%60observers%60%2C%20%60hostAttributes%60%2C%0A%20%20%20*%20%20%20and%20%60listeners%60%20properties%20are%20processed%20to%20create%20element%20features.%0A%20%20%20*%20%40return%20%7B!Object%7D%20Returns%20a%20custom%20element%20class%20for%20the%20given%20provided%0A%20%20%20*%20%20%20prototype%20%60info%60%20object.%20The%20name%20of%20the%20element%20if%20given%20by%20%60info.is%60.%0A%20%20%20*%2Fwindow.Polymer._polymerFn%3Dfunction(info)%7B%2F%2F%20eslint-disable-line%20no-unused-vars%0Athrow%20new%20Error('Load%20polymer.html%20to%20use%20the%20Polymer()%20function.')%3B%7D%3B%2F*%20eslint-enable%20*%2Fwindow.Polymer.version%3D'2.7.0'%3B%2F*%20eslint-disable%20no-unused-vars%20*%2F%2F*%0A%20%20When%20using%20Closure%20Compiler%2C%20JSCompiler_renameProperty(property%2C%20object)%20is%20replaced%20by%20the%20munged%20name%20for%20object%5Bproperty%5D%0A%20%20We%20cannot%20alias%20this%20function%2C%20so%20we%20have%20to%20use%20a%20small%20shim%20that%20has%20the%20same%20behavior%20when%20not%20compiling.%0A%20%20*%2Fwindow.JSCompiler_renameProperty%3Dfunction(prop%2Cobj)%7Breturn%20prop%3B%7D%3B%2F*%20eslint-enable%20*%2F%7D)()%3B%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Fcpt-static.gannettdigital.com%2Funiversal-web-client%2Fmaster%2Flatest%2Fvendor%2Fcomponents%2Fpolymer%2Flib%2Futils%2Fboot.html.js%0A | 2.2 kB | 2023-03-07 | 2024-01-25 | |
Pretty
Loading... | ||||
http:text/javascript;charset=utf-8,function%20_toConsumableArray(arr)%7Bif(Array.isArray(arr))%7Bfor(var%20i%3D0%2Carr2%3DArray(arr.length)%3Bi%3Carr.length%3Bi%2B%2B)%7Barr2%5Bi%5D%3Darr%5Bi%5D%3B%7Dreturn%20arr2%3B%7Delse%7Breturn%20Array.from(arr)%3B%7D%7D(function()%7B'use%20strict'%3Bvar%20MODULE_STYLE_LINK_SELECTOR%3D'link%5Brel%3Dimport%5D%5Btype~%3Dcss%5D'%3Bvar%20INCLUDE_ATTR%3D'include'%3Bvar%20SHADY_UNSCOPED_ATTR%3D'shady-unscoped'%3Bfunction%20importModule(moduleId)%7Bvar%2F**%20Polymer.DomModule%20*%2FPolymerDomModule%3DcustomElements.get('dom-module')%3Bif(!PolymerDomModule)%7Breturn%20null%3B%7Dreturn%20PolymerDomModule.import(moduleId)%3B%7Dfunction%20styleForImport(importDoc)%7B%2F%2F%20NOTE%3A%20polyfill%20affordance.%0A%2F%2F%20under%20the%20HTMLImports%20polyfill%2C%20there%20will%20be%20no%20'body'%2C%0A%2F%2F%20but%20the%20import%20pseudo-doc%20can%20be%20used%20directly.%0Avar%20container%3DimportDoc.body%3FimportDoc.body%3AimportDoc%3Bvar%20importCss%3DPolymer.ResolveUrl.resolveCss(container.textContent%2CimportDoc.baseURI)%3Bvar%20style%3Ddocument.createElement('style')%3Bstyle.textContent%3DimportCss%3Breturn%20style%3B%7D%2F**%20%40typedef%20%7B%7Bassetpath%3A%20string%7D%7D%20*%2Fvar%20templateWithAssetPath%3Dvoid%200%3B%2F%2F%20eslint-disable-line%20no-unused-vars%0A%2F**%0A%20%20%20*%20Module%20with%20utilities%20for%20collection%20CSS%20text%20from%20%60%3Ctemplates%3E%60%2C%20external%0A%20%20%20*%20stylesheets%2C%20and%20%60dom-module%60s.%0A%20%20%20*%0A%20%20%20*%20%40namespace%0A%20%20%20*%20%40memberof%20Polymer%0A%20%20%20*%20%40summary%20Module%20with%20utilities%20for%20collection%20CSS%20text%20from%20various%20sources.%0A%20%20%20*%2Fvar%20StyleGather%3D%7B%2F**%0A%20%20%20%20%20*%20Returns%20a%20list%20of%20%3Cstyle%3E%20elements%20in%20a%20space-separated%20list%20of%20%60dom-module%60s.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40memberof%20Polymer.StyleGather%0A%20%20%20%20%20*%20%40param%20%7Bstring%7D%20moduleIds%20List%20of%20dom-module%20id's%20within%20which%20to%0A%20%20%20%20%20*%20search%20for%20css.%0A%20%20%20%20%20*%20%40return%20%7B!Array%3C!HTMLStyleElement%3E%7D%20Array%20of%20contained%20%3Cstyle%3E%20elements%0A%20%20%20%20%20*%20%40this%20%7BStyleGather%7D%0A%20%20%20%20%20*%2FstylesFromModules%3Afunction%20stylesFromModules(moduleIds)%7Bvar%20modules%3DmoduleIds.trim().split(%2F%5Cs%2B%2F)%3Bvar%20styles%3D%5B%5D%3Bfor(var%20i%3D0%3Bi%3Cmodules.length%3Bi%2B%2B)%7Bstyles.push.apply(styles%2C_toConsumableArray(this.stylesFromModule(modules%5Bi%5D)))%3B%7Dreturn%20styles%3B%7D%2C%2F**%0A%20%20%20%20%20*%20Returns%20a%20list%20of%20%3Cstyle%3E%20elements%20in%20a%20given%20%60dom-module%60.%0A%20%20%20%20%20*%20Styles%20in%20a%20%60dom-module%60%20can%20come%20either%20from%20%60%3Cstyle%3E%60s%20within%20the%0A%20%20%20%20%20*%20first%20%60%3Ctemplate%3E%60%2C%20or%20else%20from%20one%20or%20more%0A%20%20%20%20%20*%20%60%3Clink%20rel%3D%22import%22%20type%3D%22css%22%3E%60%20links%20outside%20the%20template.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40memberof%20Polymer.StyleGather%0A%20%20%20%20%20*%20%40param%20%7Bstring%7D%20moduleId%20dom-module%20id%20to%20gather%20styles%20from%0A%20%20%20%20%20*%20%40return%20%7B!Array%3C!HTMLStyleElement%3E%7D%20Array%20of%20contained%20styles.%0A%20%20%20%20%20*%20%40this%20%7BStyleGather%7D%0A%20%20%20%20%20*%2FstylesFromModule%3Afunction%20stylesFromModule(moduleId)%7Bvar%20m%3DimportModule(moduleId)%3Bif(!m)%7Bconsole.warn('Could%20not%20find%20style%20data%20in%20module%20named'%2CmoduleId)%3Breturn%5B%5D%3B%7Dif(m._styles%3D%3D%3Dundefined)%7Bvar%20styles%3D%5B%5D%3B%2F%2F%20module%20imports%3A%20%3Clink%20rel%3D%22import%22%20type%3D%22css%22%3E%0Astyles.push.apply(styles%2C_toConsumableArray(this._stylesFromModuleImports(m)))%3B%2F%2F%20include%20css%20from%20the%20first%20template%20in%20the%20module%0Avar%20template%3Dm.querySelector('template')%3Bif(template)%7Bstyles.push.apply(styles%2C_toConsumableArray(this.stylesFromTemplate(template%2C%2F**%20%40type%20%7BtemplateWithAssetPath%7D%20*%2Fm.assetpath)))%3B%7Dm._styles%3Dstyles%3B%7Dreturn%20m._styles%3B%7D%2C%2F**%0A%20%20%20%20%20*%20Returns%20the%20%60%3Cstyle%3E%60%20elements%20within%20a%20given%20template.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40memberof%20Polymer.StyleGather%0A%20%20%20%20%20*%20%40param%20%7B!HTMLTemplateElement%7D%20template%20Template%20to%20gather%20styles%20from%0A%20%20%20%20%20*%20%40param%20%7Bstring%7D%20baseURI%20baseURI%20for%20style%20content%0A%20%20%20%20%20*%20%40return%20%7B!Array%3C!HTMLStyleElement%3E%7D%20Array%20of%20styles%0A%20%20%20%20%20*%20%40this%20%7BStyleGather%7D%0A%20%20%20%20%20*%2FstylesFromTemplate%3Afunction%20stylesFromTemplate(template%2CbaseURI)%7Bif(!template._styles)%7Bvar%20styles%3D%5B%5D%3B%2F%2F%20if%20element%20is%20a%20template%2C%20get%20content%20from%20its%20.content%0Avar%20e%24%3Dtemplate.content.querySelectorAll('style')%3Bfor(var%20i%3D0%3Bi%3Ce%24.length%3Bi%2B%2B)%7Bvar%20e%3De%24%5Bi%5D%3B%2F%2F%20support%20style%20sharing%20by%20allowing%20styles%20to%20%22include%22%0A%2F%2F%20other%20dom-modules%20that%20contain%20styling%0Avar%20include%3De.getAttribute(INCLUDE_ATTR)%3Bif(include)%7Bstyles.push.apply(styles%2C_toConsumableArray(this.stylesFromModules(include).filter(function(item%2Cindex%2Cself)%7Breturn%20self.indexOf(item)%3D%3D%3Dindex%3B%7D)))%3B%7Dif(baseURI)%7Be.textContent%3DPolymer.ResolveUrl.resolveCss(e.textContent%2CbaseURI)%3B%7Dstyles.push(e)%3B%7Dtemplate._styles%3Dstyles%3B%7Dreturn%20template._styles%3B%7D%2C%2F**%0A%20%20%20%20%20*%20Returns%20a%20list%20of%20%3Cstyle%3E%20elements%20%20from%20stylesheets%20loaded%20via%20%60%3Clink%20rel%3D%22import%22%20type%3D%22css%22%3E%60%20links%20within%20the%20specified%20%60dom-module%60.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40memberof%20Polymer.StyleGather%0A%20%20%20%20%20*%20%40param%20%7Bstring%7D%20moduleId%20Id%20of%20%60dom-module%60%20to%20gather%20CSS%20from%0A%20%20%20%20%20*%20%40return%20%7B!Array%3C!HTMLStyleElement%3E%7D%20Array%20of%20contained%20styles.%0A%20%20%20%20%20*%20%40this%20%7BStyleGather%7D%0A%20%20%20%20%20*%2FstylesFromModuleImports%3Afunction%20stylesFromModuleImports(moduleId)%7Bvar%20m%3DimportModule(moduleId)%3Breturn%20m%3Fthis._stylesFromModuleImports(m)%3A%5B%5D%3B%7D%2C%2F**%0A%20%20%20%20%20*%20%40memberof%20Polymer.StyleGather%0A%20%20%20%20%20*%20%40this%20%7BStyleGather%7D%0A%20%20%20%20%20*%20%40param%20%7B!HTMLElement%7D%20module%20dom-module%20element%20that%20could%20contain%20%60%3Clink%20rel%3D%22import%22%20type%3D%22css%22%3E%60%20styles%0A%20%20%20%20%20*%20%40return%20%7B!Array%3C!HTMLStyleElement%3E%7D%20Array%20of%20contained%20styles%0A%20%20%20%20%20*%2F_stylesFromModuleImports%3Afunction%20_stylesFromModuleImports(module)%7Bvar%20styles%3D%5B%5D%3Bvar%20p%24%3Dmodule.querySelectorAll(MODULE_STYLE_LINK_SELECTOR)%3Bfor(var%20i%3D0%3Bi%3Cp%24.length%3Bi%2B%2B)%7Bvar%20p%3Dp%24%5Bi%5D%3Bif(p.import)%7Bvar%20importDoc%3Dp.import%3Bvar%20unscoped%3Dp.hasAttribute(SHADY_UNSCOPED_ATTR)%3Bif(unscoped%26%26!importDoc._unscopedStyle)%7Bvar%20style%3DstyleForImport(importDoc)%3Bstyle.setAttribute(SHADY_UNSCOPED_ATTR%2C'')%3BimportDoc._unscopedStyle%3Dstyle%3B%7Delse%20if(!importDoc._style)%7BimportDoc._style%3DstyleForImport(importDoc)%3B%7Dstyles.push(unscoped%3FimportDoc._unscopedStyle%3AimportDoc._style)%3B%7D%7Dreturn%20styles%3B%7D%2C%2F**%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20Returns%20CSS%20text%20of%20styles%20in%20a%20space-separated%20list%20of%20%60dom-module%60s.%0A%20%20%20%20%20*%20Note%3A%20This%20method%20is%20deprecated%2C%20use%20%60stylesFromModules%60%20instead.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40deprecated%0A%20%20%20%20%20*%20%40memberof%20Polymer.StyleGather%0A%20%20%20%20%20*%20%40param%20%7Bstring%7D%20moduleIds%20List%20of%20dom-module%20id's%20within%20which%20to%0A%20%20%20%20%20*%20search%20for%20css.%0A%20%20%20%20%20*%20%40return%20%7Bstring%7D%20Concatenated%20CSS%20content%20from%20specified%20%60dom-module%60s%0A%20%20%20%20%20*%20%40this%20%7BStyleGather%7D%0A%20%20%20%20%20*%2FcssFromModules%3Afunction%20cssFromModules(moduleIds)%7Bvar%20modules%3DmoduleIds.trim().split(%2F%5Cs%2B%2F)%3Bvar%20cssText%3D''%3Bfor(var%20i%3D0%3Bi%3Cmodules.length%3Bi%2B%2B)%7BcssText%2B%3Dthis.cssFromModule(modules%5Bi%5D)%3B%7Dreturn%20cssText%3B%7D%2C%2F**%0A%20%20%20%20%20*%20Returns%20CSS%20text%20of%20styles%20in%20a%20given%20%60dom-module%60.%20%20CSS%20in%20a%20%60dom-module%60%0A%20%20%20%20%20*%20can%20come%20either%20from%20%60%3Cstyle%3E%60s%20within%20the%20first%20%60%3Ctemplate%3E%60%2C%20or%20else%0A%20%20%20%20%20*%20from%20one%20or%20more%20%60%3Clink%20rel%3D%22import%22%20type%3D%22css%22%3E%60%20links%20outside%20the%0A%20%20%20%20%20*%20template.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20Any%20%60%3Cstyles%3E%60%20processed%20are%20removed%20from%20their%20original%20location.%0A%20%20%20%20%20*%20Note%3A%20This%20method%20is%20deprecated%2C%20use%20%60styleFromModule%60%20instead.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40deprecated%0A%20%20%20%20%20*%20%40memberof%20Polymer.StyleGather%0A%20%20%20%20%20*%20%40param%20%7Bstring%7D%20moduleId%20dom-module%20id%20to%20gather%20styles%20from%0A%20%20%20%20%20*%20%40return%20%7Bstring%7D%20Concatenated%20CSS%20content%20from%20specified%20%60dom-module%60%0A%20%20%20%20%20*%20%40this%20%7BStyleGather%7D%0A%20%20%20%20%20*%2FcssFromModule%3Afunction%20cssFromModule(moduleId)%7Bvar%20m%3DimportModule(moduleId)%3Bif(m%26%26m._cssText%3D%3D%3Dundefined)%7B%2F%2F%20module%20imports%3A%20%3Clink%20rel%3D%22import%22%20type%3D%22css%22%3E%0Avar%20cssText%3Dthis._cssFromModuleImports(m)%3B%2F%2F%20include%20css%20from%20the%20first%20template%20in%20the%20module%0Avar%20t%3Dm.querySelector('template')%3Bif(t)%7BcssText%2B%3Dthis.cssFromTemplate(t%2C%2F**%20%40type%20%7BtemplateWithAssetPath%7D%20*%2Fm.assetpath)%3B%7Dm._cssText%3DcssText%7C%7Cnull%3B%7Dif(!m)%7Bconsole.warn('Could%20not%20find%20style%20data%20in%20module%20named'%2CmoduleId)%3B%7Dreturn%20m%26%26m._cssText%7C%7C''%3B%7D%2C%2F**%0A%20%20%20%20%20*%20Returns%20CSS%20text%20of%20%60%3Cstyles%3E%60%20within%20a%20given%20template.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20Any%20%60%3Cstyles%3E%60%20processed%20are%20removed%20from%20their%20original%20location.%0A%20%20%20%20%20*%20Note%3A%20This%20method%20is%20deprecated%2C%20use%20%60styleFromTemplate%60%20instead.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40deprecated%0A%20%20%20%20%20*%20%40memberof%20Polymer.StyleGather%0A%20%20%20%20%20*%20%40param%20%7B!HTMLTemplateElement%7D%20template%20Template%20to%20gather%20styles%20from%0A%20%20%20%20%20*%20%40param%20%7Bstring%7D%20baseURI%20Base%20URI%20to%20resolve%20the%20URL%20against%0A%20%20%20%20%20*%20%40return%20%7Bstring%7D%20Concatenated%20CSS%20content%20from%20specified%20template%0A%20%20%20%20%20*%20%40this%20%7BStyleGather%7D%0A%20%20%20%20%20*%2FcssFromTemplate%3Afunction%20cssFromTemplate(template%2CbaseURI)%7Bvar%20cssText%3D''%3Bvar%20e%24%3Dthis.stylesFromTemplate(template%2CbaseURI)%3B%2F%2F%20if%20element%20is%20a%20template%2C%20get%20content%20from%20its%20.content%0Afor(var%20i%3D0%3Bi%3Ce%24.length%3Bi%2B%2B)%7Bvar%20e%3De%24%5Bi%5D%3Bif(e.parentNode)%7Be.parentNode.removeChild(e)%3B%7DcssText%2B%3De.textContent%3B%7Dreturn%20cssText%3B%7D%2C%2F**%0A%20%20%20%20%20*%20Returns%20CSS%20text%20from%20stylesheets%20loaded%20via%20%60%3Clink%20rel%3D%22import%22%20type%3D%22css%22%3E%60%0A%20%20%20%20%20*%20links%20within%20the%20specified%20%60dom-module%60.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20Note%3A%20This%20method%20is%20deprecated%2C%20use%20%60stylesFromModuleImports%60%20instead.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40deprecated%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40memberof%20Polymer.StyleGather%0A%20%20%20%20%20*%20%40param%20%7Bstring%7D%20moduleId%20Id%20of%20%60dom-module%60%20to%20gather%20CSS%20from%0A%20%20%20%20%20*%20%40return%20%7Bstring%7D%20Concatenated%20CSS%20content%20from%20links%20in%20specified%20%60dom-module%60%0A%20%20%20%20%20*%20%40this%20%7BStyleGather%7D%0A%20%20%20%20%20*%2FcssFromModuleImports%3Afunction%20cssFromModuleImports(moduleId)%7Bvar%20m%3DimportModule(moduleId)%3Breturn%20m%3Fthis._cssFromModuleImports(m)%3A''%3B%7D%2C%2F**%0A%20%20%20%20%20*%20%40deprecated%0A%20%20%20%20%20*%20%40memberof%20Polymer.StyleGather%0A%20%20%20%20%20*%20%40this%20%7BStyleGather%7D%0A%20%20%20%20%20*%20%40param%20%7B!HTMLElement%7D%20module%20dom-module%20element%20that%20could%20contain%20%60%3Clink%20rel%3D%22import%22%20type%3D%22css%22%3E%60%20styles%0A%20%20%20%20%20*%20%40return%20%7Bstring%7D%20Concatenated%20CSS%20content%20from%20links%20in%20the%20dom-module%0A%20%20%20%20%20*%2F_cssFromModuleImports%3Afunction%20_cssFromModuleImports(module)%7Bvar%20cssText%3D''%3Bvar%20styles%3Dthis._stylesFromModuleImports(module)%3Bfor(var%20i%3D0%3Bi%3Cstyles.length%3Bi%2B%2B)%7BcssText%2B%3Dstyles%5Bi%5D.textContent%3B%7Dreturn%20cssText%3B%7D%7D%3BPolymer.StyleGather%3DStyleGather%3B%7D)()%3B%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Fcpt-static.gannettdigital.com%2Funiversal-web-client%2Fmaster%2Flatest%2Fvendor%2Fcomponents%2Fpolymer%2Flib%2Futils%2Fstyle-gather.html.js%0A | 9.3 kB | 2023-03-07 | 2024-01-25 | |
Pretty
Loading... | ||||
http:text/javascript;charset=utf-8,(function()%7B'use%20strict'%3B%2F**%0A%20%20%20*%20Provides%20basic%20tracking%20of%20element%20definitions%20(registrations)%20and%0A%20%20%20*%20instance%20counts.%0A%20%20%20*%0A%20%20%20*%20%40namespace%0A%20%20%20*%20%40summary%20Provides%20basic%20tracking%20of%20element%20definitions%20(registrations)%20and%0A%20%20%20*%20instance%20counts.%0A%20%20%20*%2FPolymer.telemetry%3D%7B%2F**%0A%20%20%20%20%20*%20Total%20number%20of%20Polymer%20element%20instances%20created.%0A%20%20%20%20%20*%20%40type%20%7Bnumber%7D%0A%20%20%20%20%20*%2FinstanceCount%3A0%2C%2F**%0A%20%20%20%20%20*%20Array%20of%20Polymer%20element%20classes%20that%20have%20been%20finalized.%0A%20%20%20%20%20*%20%40type%20%7BArray%3CPolymer.Element%3E%7D%0A%20%20%20%20%20*%2Fregistrations%3A%5B%5D%2C%2F**%0A%20%20%20%20%20*%20%40param%20%7B!PolymerElementConstructor%7D%20prototype%20Element%20prototype%20to%20log%0A%20%20%20%20%20*%20%40this%20%7Bthis%7D%0A%20%20%20%20%20*%20%40private%0A%20%20%20%20%20*%2F_regLog%3Afunction%20_regLog(prototype)%7Bconsole.log('%5B'%2Bprototype.is%2B'%5D%3A%20registered')%3B%7D%2C%2F**%0A%20%20%20%20%20*%20Registers%20a%20class%20prototype%20for%20telemetry%20purposes.%0A%20%20%20%20%20*%20%40param%20%7BHTMLElement%7D%20prototype%20Element%20prototype%20to%20register%0A%20%20%20%20%20*%20%40this%20%7Bthis%7D%0A%20%20%20%20%20*%20%40protected%0A%20%20%20%20%20*%2Fregister%3Afunction%20register(prototype)%7Bthis.registrations.push(prototype)%3BPolymer.log%26%26this._regLog(prototype)%3B%7D%2C%2F**%0A%20%20%20%20%20*%20Logs%20all%20elements%20registered%20with%20an%20%60is%60%20to%20the%20console.%0A%20%20%20%20%20*%20%40public%0A%20%20%20%20%20*%20%40this%20%7Bthis%7D%0A%20%20%20%20%20*%2FdumpRegistrations%3Afunction%20dumpRegistrations()%7Bthis.registrations.forEach(this._regLog)%3B%7D%7D%3B%7D)()%3B%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Fcpt-static.gannettdigital.com%2Funiversal-web-client%2Fmaster%2Flatest%2Fvendor%2Fcomponents%2Fpolymer%2Flib%2Futils%2Ftelemetry.html.js%0A | 1.4 kB | 2023-03-07 | 2024-01-25 | |
Pretty
Loading... | ||||
http:text/javascript;charset=utf-8,var%20_createClass%3Dfunction()%7Bfunction%20defineProperties(target%2Cprops)%7Bfor(var%20i%3D0%3Bi%3Cprops.length%3Bi%2B%2B)%7Bvar%20descriptor%3Dprops%5Bi%5D%3Bdescriptor.enumerable%3Ddescriptor.enumerable%7C%7Cfalse%3Bdescriptor.configurable%3Dtrue%3Bif(%22value%22in%20descriptor)descriptor.writable%3Dtrue%3BObject.defineProperty(target%2Cdescriptor.key%2Cdescriptor)%3B%7D%7Dreturn%20function(Constructor%2CprotoProps%2CstaticProps)%7Bif(protoProps)defineProperties(Constructor.prototype%2CprotoProps)%3Bif(staticProps)defineProperties(Constructor%2CstaticProps)%3Breturn%20Constructor%3B%7D%3B%7D()%3Bvar%20_get%3Dfunction%20get(object%2Cproperty%2Creceiver)%7Bif(object%3D%3D%3Dnull)object%3DFunction.prototype%3Bvar%20desc%3DObject.getOwnPropertyDescriptor(object%2Cproperty)%3Bif(desc%3D%3D%3Dundefined)%7Bvar%20parent%3DObject.getPrototypeOf(object)%3Bif(parent%3D%3D%3Dnull)%7Breturn%20undefined%3B%7Delse%7Breturn%20get(parent%2Cproperty%2Creceiver)%3B%7D%7Delse%20if(%22value%22in%20desc)%7Breturn%20desc.value%3B%7Delse%7Bvar%20getter%3Ddesc.get%3Bif(getter%3D%3D%3Dundefined)%7Breturn%20undefined%3B%7Dreturn%20getter.call(receiver)%3B%7D%7D%3Bfunction%20_classCallCheck(instance%2CConstructor)%7Bif(!(instance%20instanceof%20Constructor))%7Bthrow%20new%20TypeError(%22Cannot%20call%20a%20class%20as%20a%20function%22)%3B%7D%7Dfunction%20_possibleConstructorReturn(self%2Ccall)%7Bif(!self)%7Bthrow%20new%20ReferenceError(%22this%20hasn't%20been%20initialised%20-%20super()%20hasn't%20been%20called%22)%3B%7Dreturn%20call%26%26(typeof%20call%3D%3D%3D%22object%22%7C%7Ctypeof%20call%3D%3D%3D%22function%22)%3Fcall%3Aself%3B%7Dfunction%20_inherits(subClass%2CsuperClass)%7Bif(typeof%20superClass!%3D%3D%22function%22%26%26superClass!%3D%3Dnull)%7Bthrow%20new%20TypeError(%22Super%20expression%20must%20either%20be%20null%20or%20a%20function%2C%20not%20%22%2Btypeof%20superClass)%3B%7DsubClass.prototype%3DObject.create(superClass%26%26superClass.prototype%2C%7Bconstructor%3A%7Bvalue%3AsubClass%2Cenumerable%3Afalse%2Cwritable%3Atrue%2Cconfigurable%3Atrue%7D%7D)%3Bif(superClass)Object.setPrototypeOf%3FObject.setPrototypeOf(subClass%2CsuperClass)%3AsubClass.__proto__%3DsuperClass%3B%7D(function()%7B'use%20strict'%3B%2F**%0A%20%20%20*%20%40const%20%7BPolymer.Gestures%7D%0A%20%20%20*%2Fvar%20gestures%3DPolymer.Gestures%3B%2F**%0A%20%20%20*%20Element%20class%20mixin%20that%20provides%20API%20for%20adding%20Polymer's%20cross-platform%0A%20%20%20*%20gesture%20events%20to%20nodes.%0A%20%20%20*%0A%20%20%20*%20The%20API%20is%20designed%20to%20be%20compatible%20with%20override%20points%20implemented%0A%20%20%20*%20in%20%60Polymer.TemplateStamp%60%20such%20that%20declarative%20event%20listeners%20in%0A%20%20%20*%20templates%20will%20support%20gesture%20events%20when%20this%20mixin%20is%20applied%20along%20with%0A%20%20%20*%20%60Polymer.TemplateStamp%60.%0A%20%20%20*%0A%20%20%20*%20%40mixinFunction%0A%20%20%20*%20%40polymer%0A%20%20%20*%20%40memberof%20Polymer%0A%20%20%20*%20%40summary%20Element%20class%20mixin%20that%20provides%20API%20for%20adding%20Polymer's%20cross-platform%0A%20%20%20*%20gesture%20events%20to%20nodes%0A%20%20%20*%2FPolymer.GestureEventListeners%3DPolymer.dedupingMixin(function(superClass)%7B%2F**%0A%20%20%20%20%20*%20%40polymer%0A%20%20%20%20%20*%20%40mixinClass%0A%20%20%20%20%20*%20%40implements%20%7BPolymer_GestureEventListeners%7D%0A%20%20%20%20%20*%2Fvar%20GestureEventListeners%3Dfunction(_superClass)%7B_inherits(GestureEventListeners%2C_superClass)%3Bfunction%20GestureEventListeners()%7B_classCallCheck(this%2CGestureEventListeners)%3Breturn%20_possibleConstructorReturn(this%2C(GestureEventListeners.__proto__%7C%7CObject.getPrototypeOf(GestureEventListeners)).apply(this%2Carguments))%3B%7D_createClass(GestureEventListeners%2C%5B%7Bkey%3A'_addEventListenerToNode'%2C%2F**%0A%20%20%20%20%20%20%20*%20Add%20the%20event%20listener%20to%20the%20node%20if%20it%20is%20a%20gestures%20event.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40param%20%7B!Node%7D%20node%20Node%20to%20add%20event%20listener%20to%0A%20%20%20%20%20%20%20*%20%40param%20%7Bstring%7D%20eventName%20Name%20of%20event%0A%20%20%20%20%20%20%20*%20%40param%20%7Bfunction(!Event)%3Avoid%7D%20handler%20Listener%20function%20to%20add%0A%20%20%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20%20%20*%2Fvalue%3Afunction%20_addEventListenerToNode(node%2CeventName%2Chandler)%7Bif(!gestures.addListener(node%2CeventName%2Chandler))%7B_get(GestureEventListeners.prototype.__proto__%7C%7CObject.getPrototypeOf(GestureEventListeners.prototype)%2C'_addEventListenerToNode'%2Cthis).call(this%2Cnode%2CeventName%2Chandler)%3B%7D%7D%2F**%0A%20%20%20%20%20%20%20*%20Remove%20the%20event%20listener%20to%20the%20node%20if%20it%20is%20a%20gestures%20event.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40param%20%7B!Node%7D%20node%20Node%20to%20remove%20event%20listener%20from%0A%20%20%20%20%20%20%20*%20%40param%20%7Bstring%7D%20eventName%20Name%20of%20event%0A%20%20%20%20%20%20%20*%20%40param%20%7Bfunction(!Event)%3Avoid%7D%20handler%20Listener%20function%20to%20remove%0A%20%20%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'_removeEventListenerFromNode'%2Cvalue%3Afunction%20_removeEventListenerFromNode(node%2CeventName%2Chandler)%7Bif(!gestures.removeListener(node%2CeventName%2Chandler))%7B_get(GestureEventListeners.prototype.__proto__%7C%7CObject.getPrototypeOf(GestureEventListeners.prototype)%2C'_removeEventListenerFromNode'%2Cthis).call(this%2Cnode%2CeventName%2Chandler)%3B%7D%7D%7D%5D)%3Breturn%20GestureEventListeners%3B%7D(superClass)%3Breturn%20GestureEventListeners%3B%7D)%3B%7D)()%3B%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Fcpt-static.gannettdigital.com%2Funiversal-web-client%2Fmaster%2Flatest%2Fvendor%2Fcomponents%2Fpolymer%2Flib%2Fmixins%2Fgesture-event-listeners.html.js%0A | 4.4 kB | 2023-03-07 | 2024-01-25 | |
Pretty
Loading... | ||||
eu.uticaod.com/story/sports/2021/01/23/section-iii-has-work-do-after-ny-covid-19-high-risk-high-school-sports-get-ok/6686662002/ | 29 B | 2023-03-07 | 2024-04-24 | |
Pretty
Loading... | ||||
eu.uticaod.com/story/sports/2021/01/23/section-iii-has-work-do-after-ny-covid-19-high-risk-high-school-sports-get-ok/6686662002/ | 2.9 kB | 2023-03-07 | 2024-01-25 | |
Pretty
Loading... | ||||
cdn.cookielaw.org/scripttemplates/otSDKStub.js | 25 kB | 2023-03-12 | 2024-02-09 | |
Pretty
Loading... | ||||
http:text/javascript;charset=utf-8,(function()%7B'use%20strict'%3Bvar%20TemplateInstanceBase%3DPolymer.TemplateInstanceBase%3B%2F%2F%20eslint-disable-line%0A%2F**%0A%20%20%20%20%20*%20%40typedef%20%7B%7B%0A%20%20%20%20%20*%20%20%20_templatizerTemplate%3A%20HTMLTemplateElement%2C%0A%20%20%20%20%20*%20%20%20_parentModel%3A%20boolean%2C%0A%20%20%20%20%20*%20%20%20_instanceProps%3A%20Object%2C%0A%20%20%20%20%20*%20%20%20_forwardHostPropV2%3A%20Function%2C%0A%20%20%20%20%20*%20%20%20_notifyInstancePropV2%3A%20Function%2C%0A%20%20%20%20%20*%20%20%20ctor%3A%20TemplateInstanceBase%0A%20%20%20%20%20*%20%7D%7D%0A%20%20%20%20%20*%2Fvar%20TemplatizerUser%3Dvoid%200%3B%2F%2F%20eslint-disable-line%0A%2F**%0A%20%20%20%20%20*%20The%20%60Polymer.Templatizer%60%20behavior%20adds%20methods%20to%20generate%20instances%20of%0A%20%20%20%20%20*%20templates%20that%20are%20each%20managed%20by%20an%20anonymous%20%60Polymer.PropertyEffects%60%0A%20%20%20%20%20*%20instance%20where%20data-bindings%20in%20the%20stamped%20template%20content%20are%20bound%20to%0A%20%20%20%20%20*%20accessors%20on%20itself.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20This%20behavior%20is%20provided%20in%20Polymer%202.x%20as%20a%20hybrid-element%20convenience%0A%20%20%20%20%20*%20only.%20%20For%20non-hybrid%20usage%2C%20the%20%60Polymer.Templatize%60%20library%0A%20%20%20%20%20*%20should%20be%20used%20instead.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20Example%3A%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%20%20%20%20%2F%2F%20Get%20a%20template%20from%20somewhere%2C%20e.g.%20light%20DOM%0A%20%20%20%20%20*%20%20%20%20%20let%20template%20%3D%20this.querySelector('template')%3B%0A%20%20%20%20%20*%20%20%20%20%20%2F%2F%20Prepare%20the%20template%0A%20%20%20%20%20*%20%20%20%20%20this.templatize(template)%3B%0A%20%20%20%20%20*%20%20%20%20%20%2F%2F%20Instance%20the%20template%20with%20an%20initial%20data%20model%0A%20%20%20%20%20*%20%20%20%20%20let%20instance%20%3D%20this.stamp(%7BmyProp%3A%20'initial'%7D)%3B%0A%20%20%20%20%20*%20%20%20%20%20%2F%2F%20Insert%20the%20instance's%20DOM%20somewhere%2C%20e.g.%20light%20DOM%0A%20%20%20%20%20*%20%20%20%20%20Polymer.dom(this).appendChild(instance.root)%3B%0A%20%20%20%20%20*%20%20%20%20%20%2F%2F%20Changing%20a%20property%20on%20the%20instance%20will%20propagate%20to%20bindings%0A%20%20%20%20%20*%20%20%20%20%20%2F%2F%20in%20the%20template%0A%20%20%20%20%20*%20%20%20%20%20instance.myProp%20%3D%20'new%20value'%3B%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20Users%20of%20%60Templatizer%60%20may%20need%20to%20implement%20the%20following%20abstract%0A%20%20%20%20%20*%20API's%20to%20determine%20how%20properties%20and%20paths%20from%20the%20host%20should%20be%0A%20%20%20%20%20*%20forwarded%20into%20to%20instances%3A%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%20%20%20%20_forwardHostPropV2%3A%20function(prop%2C%20value)%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20Likewise%2C%20users%20may%20implement%20these%20additional%20abstract%20API's%20to%20determine%0A%20%20%20%20%20*%20how%20instance-specific%20properties%20that%20change%20on%20the%20instance%20should%20be%0A%20%20%20%20%20*%20forwarded%20out%20to%20the%20host%2C%20if%20necessary.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%20%20%20%20_notifyInstancePropV2%3A%20function(inst%2C%20prop%2C%20value)%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20In%20order%20to%20determine%20which%20properties%20are%20instance-specific%20and%20require%0A%20%20%20%20%20*%20custom%20notification%20via%20%60_notifyInstanceProp%60%2C%20define%20an%20%60_instanceProps%60%0A%20%20%20%20%20*%20object%20containing%20keys%20for%20each%20instance%20prop%2C%20for%20example%3A%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%20%20%20%20_instanceProps%3A%20%7B%0A%20%20%20%20%20*%20%20%20%20%20%20%20item%3A%20true%2C%0A%20%20%20%20%20*%20%20%20%20%20%20%20index%3A%20true%0A%20%20%20%20%20*%20%20%20%20%20%7D%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20Any%20properties%20used%20in%20the%20template%20that%20are%20not%20defined%20in%20_instanceProp%0A%20%20%20%20%20*%20will%20be%20forwarded%20out%20to%20the%20Templatize%20%60owner%60%20automatically.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20Users%20may%20also%20implement%20the%20following%20abstract%20function%20to%20show%20or%0A%20%20%20%20%20*%20hide%20any%20DOM%20generated%20using%20%60stamp%60%3A%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%20%20%20%20_showHideChildren%3A%20function(shouldHide)%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20Note%20that%20some%20callbacks%20are%20suffixed%20with%20%60V2%60%20in%20the%20Polymer%202.x%20behavior%0A%20%20%20%20%20*%20as%20the%20implementations%20will%20need%20to%20differ%20from%20the%20callbacks%20required%0A%20%20%20%20%20*%20by%20the%201.x%20Templatizer%20API%20due%20to%20changes%20in%20the%20%60TemplateInstance%60%20API%0A%20%20%20%20%20*%20between%20versions%201.x%20and%202.x.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40polymerBehavior%0A%20%20%20%20%20*%2FPolymer.Templatizer%3D%7B%2F**%0A%20%20%20%20%20%20%20*%20Generates%20an%20anonymous%20%60TemplateInstance%60%20class%20(stored%20as%20%60this.ctor%60)%0A%20%20%20%20%20%20%20*%20for%20the%20provided%20template.%20%20This%20method%20should%20be%20called%20once%20per%0A%20%20%20%20%20%20%20*%20template%20to%20prepare%20an%20element%20for%20stamping%20the%20template%2C%20followed%0A%20%20%20%20%20%20%20*%20by%20%60stamp%60%20to%20create%20new%20instances%20of%20the%20template.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40param%20%7B!HTMLTemplateElement%7D%20template%20Template%20to%20prepare%0A%20%20%20%20%20%20%20*%20%40param%20%7Bboolean%3D%7D%20mutableData%20When%20%60true%60%2C%20the%20generated%20class%20will%20skip%0A%20%20%20%20%20%20%20*%20%20%20strict%20dirty-checking%20for%20objects%20and%20arrays%20(always%20consider%20them%20to%0A%20%20%20%20%20%20%20*%20%20%20be%20%22dirty%22).%20Defaults%20to%20false.%0A%20%20%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20%20%20*%20%40this%20%7BTemplatizerUser%7D%0A%20%20%20%20%20%20%20*%2Ftemplatize%3Afunction%20templatize(template%2CmutableData)%7Bthis._templatizerTemplate%3Dtemplate%3Bthis.ctor%3DPolymer.Templatize.templatize(template%2Cthis%2C%7BmutableData%3ABoolean(mutableData)%2CparentModel%3Athis._parentModel%2CinstanceProps%3Athis._instanceProps%2CforwardHostProp%3Athis._forwardHostPropV2%2CnotifyInstanceProp%3Athis._notifyInstancePropV2%7D)%3B%7D%2C%2F**%0A%20%20%20%20%20%20%20*%20Creates%20an%20instance%20of%20the%20template%20prepared%20by%20%60templatize%60.%20%20The%20object%0A%20%20%20%20%20%20%20*%20returned%20is%20an%20instance%20of%20the%20anonymous%20class%20generated%20by%20%60templatize%60%0A%20%20%20%20%20%20%20*%20whose%20%60root%60%20property%20is%20a%20document%20fragment%20containing%20newly%20cloned%0A%20%20%20%20%20%20%20*%20template%20content%2C%20and%20which%20has%20property%20accessors%20corresponding%20to%0A%20%20%20%20%20%20%20*%20properties%20referenced%20in%20template%20bindings.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40param%20%7BObject%3D%7D%20model%20Object%20containing%20initial%20property%20values%20to%0A%20%20%20%20%20%20%20*%20%20%20populate%20into%20the%20template%20bindings.%0A%20%20%20%20%20%20%20*%20%40return%20%7BTemplateInstanceBase%7D%20Returns%20the%20created%20instance%20of%0A%20%20%20%20%20%20%20*%20the%20template%20prepared%20by%20%60templatize%60.%0A%20%20%20%20%20%20%20*%20%40this%20%7BTemplatizerUser%7D%0A%20%20%20%20%20%20%20*%2Fstamp%3Afunction%20stamp(model)%7Breturn%20new%20this.ctor(model)%3B%7D%2C%2F**%0A%20%20%20%20%20%20%20*%20Returns%20the%20template%20%22model%22%20(%60TemplateInstance%60)%20associated%20with%0A%20%20%20%20%20%20%20*%20a%20given%20element%2C%20which%20serves%20as%20the%20binding%20scope%20for%20the%20template%0A%20%20%20%20%20%20%20*%20instance%20the%20element%20is%20contained%20in.%20%20A%20template%20model%20should%20be%20used%0A%20%20%20%20%20%20%20*%20to%20manipulate%20data%20associated%20with%20this%20template%20instance.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40param%20%7BHTMLElement%7D%20el%20Element%20for%20which%20to%20return%20a%20template%20model.%0A%20%20%20%20%20%20%20*%20%40return%20%7BTemplateInstanceBase%7D%20Model%20representing%20the%20binding%20scope%20for%0A%20%20%20%20%20%20%20*%20%20%20the%20element.%0A%20%20%20%20%20%20%20*%20%40this%20%7BTemplatizerUser%7D%0A%20%20%20%20%20%20%20*%2FmodelForElement%3Afunction%20modelForElement(el)%7Breturn%20Polymer.Templatize.modelForElement(this._templatizerTemplate%2Cel)%3B%7D%7D%3B%7D)()%3B%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Fcpt-static.gannettdigital.com%2Funiversal-web-client%2Fmaster%2Flatest%2Fvendor%2Fcomponents%2Fpolymer%2Flib%2Flegacy%2Ftemplatizer-behavior.html.js%0A | 5.6 kB | 2023-03-07 | 2024-01-25 | |
Pretty
Loading... | ||||
http:text/javascript;charset=utf-8,'use%20strict'%3BPolymer(%7Bis%3A'ui-icon'%2CdesignId%3A'UI9'%2Cproperties%3A%7BiconName%3A%7Btype%3AString%2Cvalue%3A''%7D%2CimgSource%3A%7Btype%3AString%2Cvalue%3A''%7D%2CiconFull%3A%7Btype%3AString%2Ccomputed%3A'_makeIcon(iconName%2C%20imgSource%2C%20svgResize)'%7D%2CsvgResize%3A%7Btype%3ANumber%7D%7D%2C_makeIcon%3Afunction%20_makeIcon(iconName%2CimgSource%2CsvgResize)%7Bif(iconName)%7Bvar%20iconData%3Dthis.%24.iconMap.querySelector('%23'%2BiconName)%3B%2F%2F%20if%20we%20have%20an%20icon%20name%20and%20it%20matches%20one%20of%20the%20ids%20above%0Aif(iconData)%7Bvar%20container%3Dthis.%24.iconCont%2C%2F%2F%20iconVBs%20are%20on%20end%20of%20every%20iconName%0AiconVB%3DiconName.slice(-2)%2Csvg%3Dthis.%24.iconSVG%3Bwhile(svg.firstChild)%7Bsvg.removeChild(svg.firstChild)%3B%7D%2F%2F%20If%20the%20icon%20is%20already%20filled%20(ie%20its%20changing)%2C%20deletes%20current%20data%0Asvg.setAttribute('viewBox'%2C'0%200%20'%2BiconVB%2B'%20'%2BiconVB)%3Bcontainer.removeAttribute('class')%3B%2F%2F%20backwards%20compatibility%20-%20only%20add%20class%20if%20we%20don't%20have%20a%20width%20and%20height%20ruleset%20on%20%60this%60%20instance%0Aif(!svgResize)%7Bvar%20style%3Dwindow.getComputedStyle(this)%3Bif((style.width%3D%3D%3D'auto'%7C%7Cstyle.width%3D%3D%3D'')%26%26(style.height%3D%3D%3D'auto'%7C%7Cstyle.height%3D%3D%3D''))%7Bcontainer.classList.add('ic-'%2BiconVB)%3B%7D%7Delse%7Bcontainer.style.width%3Dthis.svgResize%2B'px'%3Bcontainer.style.height%3Dthis.svgResize%2B'px'%3B%7D%2F%2F%20cloning%20the%20first%20child%20so%20it%20can%20be%20deleted%20without%20affecting%20iconMap%0Asvg.appendChild(iconData.cloneNode(true))%3Bcontainer.hidden%3Dfalse%3B%7D%7Delse%7Bthis.%24.externalImage.hidden%3D!imgSource%3B%7Dreturn''%3B%7D%7D)%3B%0A%2F%2F%23%20sourceMappingURL%3D..%2F..%2F..%2Fmaps%2Felements%2Fui%2Fui-icon%2Fui-icon.html_script_0.js.map%0A%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Fcpt-static.gannettdigital.com%2Funiversal-web-client%2Fmaster%2Flatest%2Felements%2Fui%2Fui-icon%2Fui-icon.html.js%0A | 1.6 kB | 2023-03-12 | 2024-01-25 | |
Pretty
Loading... | ||||
cpt-static.gannettdigital.com/universal-web-client/master/latest/vendor/adobe/AppMeasurement.js | 37 kB | 2023-03-13 | 2024-01-25 | |
Pretty
Loading... | ||||
atoms.uticaod.com/atoms-library/prod/dist/gannett-atoms-library.js | 58 kB | 2023-03-08 | 2024-01-25 | |
Pretty
Loading... | ||||
http:text/javascript;charset=utf-8,var%20_createClass%3Dfunction()%7Bfunction%20defineProperties(target%2Cprops)%7Bfor(var%20i%3D0%3Bi%3Cprops.length%3Bi%2B%2B)%7Bvar%20descriptor%3Dprops%5Bi%5D%3Bdescriptor.enumerable%3Ddescriptor.enumerable%7C%7Cfalse%3Bdescriptor.configurable%3Dtrue%3Bif(%22value%22in%20descriptor)descriptor.writable%3Dtrue%3BObject.defineProperty(target%2Cdescriptor.key%2Cdescriptor)%3B%7D%7Dreturn%20function(Constructor%2CprotoProps%2CstaticProps)%7Bif(protoProps)defineProperties(Constructor.prototype%2CprotoProps)%3Bif(staticProps)defineProperties(Constructor%2CstaticProps)%3Breturn%20Constructor%3B%7D%3B%7D()%3Bvar%20_get%3Dfunction%20get(object%2Cproperty%2Creceiver)%7Bif(object%3D%3D%3Dnull)object%3DFunction.prototype%3Bvar%20desc%3DObject.getOwnPropertyDescriptor(object%2Cproperty)%3Bif(desc%3D%3D%3Dundefined)%7Bvar%20parent%3DObject.getPrototypeOf(object)%3Bif(parent%3D%3D%3Dnull)%7Breturn%20undefined%3B%7Delse%7Breturn%20get(parent%2Cproperty%2Creceiver)%3B%7D%7Delse%20if(%22value%22in%20desc)%7Breturn%20desc.value%3B%7Delse%7Bvar%20getter%3Ddesc.get%3Bif(getter%3D%3D%3Dundefined)%7Breturn%20undefined%3B%7Dreturn%20getter.call(receiver)%3B%7D%7D%3Bfunction%20_classCallCheck(instance%2CConstructor)%7Bif(!(instance%20instanceof%20Constructor))%7Bthrow%20new%20TypeError(%22Cannot%20call%20a%20class%20as%20a%20function%22)%3B%7D%7Dfunction%20_possibleConstructorReturn(self%2Ccall)%7Bif(!self)%7Bthrow%20new%20ReferenceError(%22this%20hasn't%20been%20initialised%20-%20super()%20hasn't%20been%20called%22)%3B%7Dreturn%20call%26%26(typeof%20call%3D%3D%3D%22object%22%7C%7Ctypeof%20call%3D%3D%3D%22function%22)%3Fcall%3Aself%3B%7Dfunction%20_inherits(subClass%2CsuperClass)%7Bif(typeof%20superClass!%3D%3D%22function%22%26%26superClass!%3D%3Dnull)%7Bthrow%20new%20TypeError(%22Super%20expression%20must%20either%20be%20null%20or%20a%20function%2C%20not%20%22%2Btypeof%20superClass)%3B%7DsubClass.prototype%3DObject.create(superClass%26%26superClass.prototype%2C%7Bconstructor%3A%7Bvalue%3AsubClass%2Cenumerable%3Afalse%2Cwritable%3Atrue%2Cconfigurable%3Atrue%7D%7D)%3Bif(superClass)Object.setPrototypeOf%3FObject.setPrototypeOf(subClass%2CsuperClass)%3AsubClass.__proto__%3DsuperClass%3B%7D(function()%7B'use%20strict'%3Bvar%20builtCSS%3Dwindow.ShadyCSS%26%26window.ShadyCSS%5B'cssBuild'%5D%3B%2F**%0A%20%20%20*%20Element%20class%20mixin%20that%20provides%20the%20core%20API%20for%20Polymer's%20meta-programming%0A%20%20%20*%20features%20including%20template%20stamping%2C%20data-binding%2C%20attribute%20deserialization%2C%0A%20%20%20*%20and%20property%20change%20observation.%0A%20%20%20*%0A%20%20%20*%20Subclassers%20may%20provide%20the%20following%20static%20getters%20to%20return%20metadata%0A%20%20%20*%20used%20to%20configure%20Polymer's%20features%20for%20the%20class%3A%0A%20%20%20*%0A%20%20%20*%20-%20%60static%20get%20is()%60%3A%20When%20the%20template%20is%20provided%20via%20a%20%60dom-module%60%2C%0A%20%20%20*%20%20%20users%20should%20return%20the%20%60dom-module%60%20id%20from%20a%20static%20%60is%60%20getter.%20%20If%0A%20%20%20*%20%20%20no%20template%20is%20needed%20or%20the%20template%20is%20provided%20directly%20via%20the%0A%20%20%20*%20%20%20%60template%60%20getter%2C%20there%20is%20no%20need%20to%20define%20%60is%60%20for%20the%20element.%0A%20%20%20*%0A%20%20%20*%20-%20%60static%20get%20template()%60%3A%20Users%20may%20provide%20the%20template%20directly%20(as%0A%20%20%20*%20%20%20opposed%20to%20via%20%60dom-module%60)%20by%20implementing%20a%20static%20%60template%60%20getter.%0A%20%20%20*%20%20%20The%20getter%20may%20return%20an%20%60HTMLTemplateElement%60%20or%20a%20string%2C%20which%20will%0A%20%20%20*%20%20%20automatically%20be%20parsed%20into%20a%20template.%0A%20%20%20*%0A%20%20%20*%20-%20%60static%20get%20properties()%60%3A%20Should%20return%20an%20object%20describing%0A%20%20%20*%20%20%20property-related%20metadata%20used%20by%20Polymer%20features%20(key%3A%20property%20name%0A%20%20%20*%20%20%20value%3A%20object%20containing%20property%20metadata).%20Valid%20keys%20in%20per-property%0A%20%20%20*%20%20%20metadata%20include%3A%0A%20%20%20*%20%20%20-%20%60type%60%20(String%7CNumber%7CObject%7CArray%7C...)%3A%20Used%20by%0A%20%20%20*%20%20%20%20%20%60attributeChangedCallback%60%20to%20determine%20how%20string-based%20attributes%0A%20%20%20*%20%20%20%20%20are%20deserialized%20to%20JavaScript%20property%20values.%0A%20%20%20*%20%20%20-%20%60notify%60%20(boolean)%3A%20Causes%20a%20change%20in%20the%20property%20to%20fire%20a%0A%20%20%20*%20%20%20%20%20non-bubbling%20event%20called%20%60%3Cproperty%3E-changed%60.%20Elements%20that%20have%0A%20%20%20*%20%20%20%20%20enabled%20two-way%20binding%20to%20the%20property%20use%20this%20event%20to%20observe%20changes.%0A%20%20%20*%20%20%20-%20%60readOnly%60%20(boolean)%3A%20Creates%20a%20getter%20for%20the%20property%2C%20but%20no%20setter.%0A%20%20%20*%20%20%20%20%20To%20set%20a%20read-only%20property%2C%20use%20the%20private%20setter%20method%0A%20%20%20*%20%20%20%20%20%60_setProperty(property%2C%20value)%60.%0A%20%20%20*%20%20%20-%20%60observer%60%20(string)%3A%20Observer%20method%20name%20that%20will%20be%20called%20when%0A%20%20%20*%20%20%20%20%20the%20property%20changes.%20The%20arguments%20of%20the%20method%20are%0A%20%20%20*%20%20%20%20%20%60(value%2C%20previousValue)%60.%0A%20%20%20*%20%20%20-%20%60computed%60%20(string)%3A%20String%20describing%20method%20and%20dependent%20properties%0A%20%20%20*%20%20%20%20%20for%20computing%20the%20value%20of%20this%20property%20(e.g.%20%60'computeFoo(bar%2C%20zot)'%60).%0A%20%20%20*%20%20%20%20%20Computed%20properties%20are%20read-only%20by%20default%20and%20can%20only%20be%20changed%0A%20%20%20*%20%20%20%20%20via%20the%20return%20value%20of%20the%20computing%20method.%0A%20%20%20*%0A%20%20%20*%20-%20%60static%20get%20observers()%60%3A%20Array%20of%20strings%20describing%20multi-property%0A%20%20%20*%20%20%20observer%20methods%20and%20their%20dependent%20properties%20(e.g.%0A%20%20%20*%20%20%20%60'observeABC(a%2C%20b%2C%20c)'%60).%0A%20%20%20*%0A%20%20%20*%20The%20base%20class%20provides%20default%20implementations%20for%20the%20following%20standard%0A%20%20%20*%20custom%20element%20lifecycle%20callbacks%3B%20users%20may%20override%20these%2C%20but%20should%0A%20%20%20*%20call%20the%20super%20method%20to%20ensure%0A%20%20%20*%20-%20%60constructor%60%3A%20Run%20when%20the%20element%20is%20created%20or%20upgraded%0A%20%20%20*%20-%20%60connectedCallback%60%3A%20Run%20each%20time%20the%20element%20is%20connected%20to%20the%0A%20%20%20*%20%20%20document%0A%20%20%20*%20-%20%60disconnectedCallback%60%3A%20Run%20each%20time%20the%20element%20is%20disconnected%20from%0A%20%20%20*%20%20%20the%20document%0A%20%20%20*%20-%20%60attributeChangedCallback%60%3A%20Run%20each%20time%20an%20attribute%20in%0A%20%20%20*%20%20%20%60observedAttributes%60%20is%20set%20or%20removed%20(note%3A%20this%20element's%20default%0A%20%20%20*%20%20%20%60observedAttributes%60%20implementation%20will%20automatically%20return%20an%20array%0A%20%20%20*%20%20%20of%20dash-cased%20attributes%20based%20on%20%60properties%60)%0A%20%20%20*%0A%20%20%20*%20%40mixinFunction%0A%20%20%20*%20%40polymer%0A%20%20%20*%20%40appliesMixin%20Polymer.PropertyEffects%0A%20%20%20*%20%40appliesMixin%20Polymer.PropertiesMixin%0A%20%20%20*%20%40memberof%20Polymer%0A%20%20%20*%20%40property%20rootPath%20%7Bstring%7D%20Set%20to%20the%20value%20of%20%60Polymer.rootPath%60%2C%0A%20%20%20*%20%20%20which%20defaults%20to%20the%20main%20document%20path%0A%20%20%20*%20%40property%20importPath%20%7Bstring%7D%20Set%20to%20the%20value%20of%20the%20class's%20static%0A%20%20%20*%20%20%20%60importPath%60%20property%2C%20which%20defaults%20to%20the%20path%20of%20this%20element's%0A%20%20%20*%20%20%20%60dom-module%60%20(when%20%60is%60%20is%20used)%2C%20but%20can%20be%20overridden%20for%20other%0A%20%20%20*%20%20%20import%20strategies.%0A%20%20%20*%20%40summary%20Element%20class%20mixin%20that%20provides%20the%20core%20API%20for%20Polymer's%0A%20%20%20*%20meta-programming%20features.%0A%20%20%20*%2FPolymer.ElementMixin%3DPolymer.dedupingMixin(function(base)%7B%2F**%0A%20%20%20%20%20*%20%40constructor%0A%20%20%20%20%20*%20%40extends%20%7Bbase%7D%0A%20%20%20%20%20*%20%40implements%20%7BPolymer_PropertyEffects%7D%0A%20%20%20%20%20*%20%40implements%20%7BPolymer_PropertiesMixin%7D%0A%20%20%20%20%20*%20%40private%0A%20%20%20%20%20*%2Fvar%20polymerElementBase%3DPolymer.PropertiesMixin(Polymer.PropertyEffects(base))%3B%2F**%0A%20%20%20%20%20*%20Returns%20a%20list%20of%20properties%20with%20default%20values.%0A%20%20%20%20%20*%20This%20list%20is%20created%20as%20an%20optimization%20since%20it%20is%20a%20subset%20of%0A%20%20%20%20%20*%20the%20list%20returned%20from%20%60_properties%60.%0A%20%20%20%20%20*%20This%20list%20is%20used%20in%20%60_initializeProperties%60%20to%20set%20property%20defaults.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40param%20%7BPolymerElementConstructor%7D%20constructor%20Element%20class%0A%20%20%20%20%20*%20%40return%20%7BPolymerElementProperties%7D%20Flattened%20properties%20for%20this%20class%0A%20%20%20%20%20*%20%20%20that%20have%20default%20values%0A%20%20%20%20%20*%20%40private%0A%20%20%20%20%20*%2Ffunction%20propertyDefaults(constructor)%7Bif(!constructor.hasOwnProperty(JSCompiler_renameProperty('__propertyDefaults'%2Cconstructor)))%7Bconstructor.__propertyDefaults%3Dnull%3Bvar%20props%3Dconstructor._properties%3Bfor(var%20p%20in%20props)%7Bvar%20info%3Dprops%5Bp%5D%3Bif('value'in%20info)%7Bconstructor.__propertyDefaults%3Dconstructor.__propertyDefaults%7C%7C%7B%7D%3Bconstructor.__propertyDefaults%5Bp%5D%3Dinfo%3B%7D%7D%7Dreturn%20constructor.__propertyDefaults%3B%7D%2F**%0A%20%20%20%20%20*%20Returns%20a%20memoized%20version%20of%20the%20%60observers%60%20array.%0A%20%20%20%20%20*%20%40param%20%7BPolymerElementConstructor%7D%20constructor%20Element%20class%0A%20%20%20%20%20*%20%40return%20%7BArray%7D%20Array%20containing%20own%20observers%20for%20the%20given%20class%0A%20%20%20%20%20*%20%40protected%0A%20%20%20%20%20*%2Ffunction%20ownObservers(constructor)%7Bif(!constructor.hasOwnProperty(JSCompiler_renameProperty('__ownObservers'%2Cconstructor)))%7Bconstructor.__ownObservers%3Dconstructor.hasOwnProperty(JSCompiler_renameProperty('observers'%2Cconstructor))%3F%2F**%20%40type%20%7BPolymerElementConstructor%7D%20*%2Fconstructor.observers%3Anull%3B%7Dreturn%20constructor.__ownObservers%3B%7D%2F**%0A%20%20%20%20%20*%20Creates%20effects%20for%20a%20property.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20Note%2C%20once%20a%20property%20has%20been%20set%20to%0A%20%20%20%20%20*%20%60readOnly%60%2C%20%60computed%60%2C%20%60reflectToAttribute%60%2C%20or%20%60notify%60%0A%20%20%20%20%20*%20these%20values%20may%20not%20be%20changed.%20For%20example%2C%20a%20subclass%20cannot%0A%20%20%20%20%20*%20alter%20these%20settings.%20However%2C%20additional%20%60observers%60%20may%20be%20added%0A%20%20%20%20%20*%20by%20subclasses.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20The%20info%20object%20should%20contain%20property%20metadata%20as%20follows%3A%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20*%20%60type%60%3A%20%7Bfunction%7D%20type%20to%20which%20an%20attribute%20matching%20the%20property%0A%20%20%20%20%20*%20is%20deserialized.%20Note%20the%20property%20is%20camel-cased%20from%20a%20dash-cased%0A%20%20%20%20%20*%20attribute.%20For%20example%2C%20'foo-bar'%20attribute%20is%20deserialized%20to%20a%0A%20%20%20%20%20*%20property%20named%20'fooBar'.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20*%20%60readOnly%60%3A%20%7Bboolean%7D%20creates%20a%20readOnly%20property%20and%0A%20%20%20%20%20*%20makes%20a%20private%20setter%20for%20the%20private%20of%20the%20form%20'_setFoo'%20for%20a%0A%20%20%20%20%20*%20property%20'foo'%2C%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20*%20%60computed%60%3A%20%7Bstring%7D%20creates%20a%20computed%20property.%20A%20computed%20property%0A%20%20%20%20%20*%20is%20also%20automatically%20set%20to%20%60readOnly%3A%20true%60.%20The%20value%20is%20calculated%0A%20%20%20%20%20*%20by%20running%20a%20method%20and%20arguments%20parsed%20from%20the%20given%20string.%20For%0A%20%20%20%20%20*%20example%20'compute(foo)'%20will%20compute%20a%20given%20property%20when%20the%0A%20%20%20%20%20*%20'foo'%20property%20changes%20by%20executing%20the%20'compute'%20method.%20This%20method%0A%20%20%20%20%20*%20must%20return%20the%20computed%20value.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20*%20%60reflectToAttribute%60%3A%20%7Bboolean%7D%20If%20true%2C%20the%20property%20value%20is%20reflected%0A%20%20%20%20%20*%20to%20an%20attribute%20of%20the%20same%20name.%20Note%2C%20the%20attribute%20is%20dash-cased%0A%20%20%20%20%20*%20so%20a%20property%20named%20'fooBar'%20is%20reflected%20as%20'foo-bar'.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20*%20%60notify%60%3A%20%7Bboolean%7D%20sends%20a%20non-bubbling%20notification%20event%20when%0A%20%20%20%20%20*%20the%20property%20changes.%20For%20example%2C%20a%20property%20named%20'foo'%20sends%20an%0A%20%20%20%20%20*%20event%20named%20'foo-changed'%20with%20%60event.detail%60%20set%20to%20the%20value%20of%0A%20%20%20%20%20*%20the%20property.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20*%20observer%3A%20%7Bstring%7D%20name%20of%20a%20method%20that%20runs%20when%20the%20property%0A%20%20%20%20%20*%20changes.%20The%20arguments%20of%20the%20method%20are%20(value%2C%20previousValue).%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20Note%3A%20Users%20may%20want%20control%20over%20modifying%20property%0A%20%20%20%20%20*%20effects%20via%20subclassing.%20For%20example%2C%20a%20user%20might%20want%20to%20make%20a%0A%20%20%20%20%20*%20reflectToAttribute%20property%20not%20do%20so%20in%20a%20subclass.%20We've%20chosen%20to%0A%20%20%20%20%20*%20disable%20this%20because%20it%20leads%20to%20additional%20complication.%0A%20%20%20%20%20*%20For%20example%2C%20a%20readOnly%20effect%20generates%20a%20special%20setter.%20If%20a%20subclass%0A%20%20%20%20%20*%20disables%20the%20effect%2C%20the%20setter%20would%20fail%20unexpectedly.%0A%20%20%20%20%20*%20Based%20on%20feedback%2C%20we%20may%20want%20to%20try%20to%20make%20effects%20more%20malleable%0A%20%20%20%20%20*%20and%2For%20provide%20an%20advanced%20api%20for%20manipulating%20them.%0A%20%20%20%20%20*%20Also%20consider%20adding%20warnings%20when%20an%20effect%20cannot%20be%20changed.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40param%20%7B!PolymerElement%7D%20proto%20Element%20class%20prototype%20to%20add%20accessors%0A%20%20%20%20%20*%20%20%20and%20effects%20to%0A%20%20%20%20%20*%20%40param%20%7Bstring%7D%20name%20Name%20of%20the%20property.%0A%20%20%20%20%20*%20%40param%20%7BObject%7D%20info%20Info%20object%20from%20which%20to%20create%20property%20effects.%0A%20%20%20%20%20*%20Supported%20keys%3A%0A%20%20%20%20%20*%20%40param%20%7BObject%7D%20allProps%20Flattened%20map%20of%20all%20properties%20defined%20in%20this%0A%20%20%20%20%20*%20%20%20element%20(including%20inherited%20properties)%0A%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20*%20%40private%0A%20%20%20%20%20*%2Ffunction%20createPropertyFromConfig(proto%2Cname%2Cinfo%2CallProps)%7B%2F%2F%20computed%20forces%20readOnly...%0Aif(info.computed)%7Binfo.readOnly%3Dtrue%3B%7D%2F%2F%20Note%2C%20since%20all%20computed%20properties%20are%20readOnly%2C%20this%20prevents%0A%2F%2F%20adding%20additional%20computed%20property%20effects%20(which%20leads%20to%20a%20confusing%0A%2F%2F%20setup%20where%20multiple%20triggers%20for%20setting%20a%20property)%0A%2F%2F%20While%20we%20do%20have%20%60hasComputedEffect%60%20this%20is%20set%20on%20the%20property's%0A%2F%2F%20dependencies%20rather%20than%20itself.%0Aif(info.computed%26%26!proto._hasReadOnlyEffect(name))%7Bproto._createComputedProperty(name%2Cinfo.computed%2CallProps)%3B%7Dif(info.readOnly%26%26!proto._hasReadOnlyEffect(name))%7Bproto._createReadOnlyProperty(name%2C!info.computed)%3B%7Dif(info.reflectToAttribute%26%26!proto._hasReflectEffect(name))%7Bproto._createReflectedProperty(name)%3B%7Dif(info.notify%26%26!proto._hasNotifyEffect(name))%7Bproto._createNotifyingProperty(name)%3B%7D%2F%2F%20always%20add%20observer%0Aif(info.observer)%7Bproto._createPropertyObserver(name%2Cinfo.observer%2CallProps%5Binfo.observer%5D)%3B%7D%2F%2F%20always%20create%20the%20mapping%20from%20attribute%20back%20to%20property%20for%20deserialization.%0Aproto._addPropertyToAttributeMap(name)%3B%7D%2F**%0A%20%20%20%20%20*%20Process%20all%20style%20elements%20in%20the%20element%20template.%20Styles%20with%20the%0A%20%20%20%20%20*%20%60include%60%20attribute%20are%20processed%20such%20that%20any%20styles%20in%0A%20%20%20%20%20*%20the%20associated%20%22style%20modules%22%20are%20included%20in%20the%20element%20template.%0A%20%20%20%20%20*%20%40param%20%7BPolymerElementConstructor%7D%20klass%20Element%20class%0A%20%20%20%20%20*%20%40param%20%7B!HTMLTemplateElement%7D%20template%20Template%20to%20process%0A%20%20%20%20%20*%20%40param%20%7Bstring%7D%20is%20Name%20of%20element%0A%20%20%20%20%20*%20%40param%20%7Bstring%7D%20baseURI%20Base%20URI%20for%20element%0A%20%20%20%20%20*%20%40private%0A%20%20%20%20%20*%2Ffunction%20processElementStyles(klass%2Ctemplate%2Cis%2CbaseURI)%7Bif(!builtCSS)%7Bvar%20templateStyles%3Dtemplate.content.querySelectorAll('style')%3Bvar%20stylesWithImports%3DPolymer.StyleGather.stylesFromTemplate(template)%3B%2F%2F%20insert%20styles%20from%20%3Clink%20rel%3D%22import%22%20type%3D%22css%22%3E%20at%20the%20top%20of%20the%20template%0Avar%20linkedStyles%3DPolymer.StyleGather.stylesFromModuleImports(is)%3Bvar%20firstTemplateChild%3Dtemplate.content.firstElementChild%3Bfor(var%20idx%3D0%3Bidx%3ClinkedStyles.length%3Bidx%2B%2B)%7Bvar%20s%3DlinkedStyles%5Bidx%5D%3Bs.textContent%3Dklass._processStyleText(s.textContent%2CbaseURI)%3Btemplate.content.insertBefore(s%2CfirstTemplateChild)%3B%7D%2F%2F%20keep%20track%20of%20the%20last%20%22concrete%22%20style%20in%20the%20template%20we%20have%20encountered%0Avar%20templateStyleIndex%3D0%3B%2F%2F%20ensure%20all%20gathered%20styles%20are%20actually%20in%20this%20template.%0Afor(var%20i%3D0%3Bi%3CstylesWithImports.length%3Bi%2B%2B)%7Bvar%20_s%3DstylesWithImports%5Bi%5D%3Bvar%20templateStyle%3DtemplateStyles%5BtemplateStyleIndex%5D%3B%2F%2F%20if%20the%20style%20is%20not%20in%20this%20template%2C%20it's%20been%20%22included%22%20and%0A%2F%2F%20we%20put%20a%20clone%20of%20it%20in%20the%20template%20before%20the%20style%20that%20included%20it%0Aif(templateStyle!%3D%3D_s)%7B_s%3D_s.cloneNode(true)%3BtemplateStyle.parentNode.insertBefore(_s%2CtemplateStyle)%3B%7Delse%7BtemplateStyleIndex%2B%2B%3B%7D_s.textContent%3Dklass._processStyleText(_s.textContent%2CbaseURI)%3B%7D%7Dif(window.ShadyCSS)%7Bwindow.ShadyCSS.prepareTemplate(template%2Cis)%3B%7D%7D%2F**%0A%20%20%20%20%20*%20Look%20up%20template%20from%20dom-module%20for%20element%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40param%20%7B!string%7D%20is%20Element%20name%20to%20look%20up%0A%20%20%20%20%20*%20%40return%20%7B!HTMLTemplateElement%7D%20Template%20found%20in%20dom%20module%2C%20or%0A%20%20%20%20%20*%20%20%20undefined%20if%20not%20found%0A%20%20%20%20%20*%20%40protected%0A%20%20%20%20%20*%2Ffunction%20getTemplateFromDomModule(is)%7Bvar%20template%3Dnull%3Bif(is%26%26Polymer.DomModule)%7Btemplate%3DPolymer.DomModule.import(is%2C'template')%3B%2F%2F%20Under%20strictTemplatePolicy%2C%20require%20any%20element%20with%20an%20%60is%60%0A%2F%2F%20specified%20to%20have%20a%20dom-module%0Aif(Polymer.strictTemplatePolicy%26%26!template)%7Bthrow%20new%20Error('strictTemplatePolicy%3A%20expecting%20dom-module%20or%20null%20template%20for%20'%2Bis)%3B%7D%7Dreturn%20template%3B%7D%2F**%0A%20%20%20%20%20*%20%40polymer%0A%20%20%20%20%20*%20%40mixinClass%0A%20%20%20%20%20*%20%40unrestricted%0A%20%20%20%20%20*%20%40implements%20%7BPolymer_ElementMixin%7D%0A%20%20%20%20%20*%2Fvar%20PolymerElement%3Dfunction(_polymerElementBase)%7B_inherits(PolymerElement%2C_polymerElementBase)%3B_createClass(PolymerElement%2Cnull%2C%5B%7Bkey%3A'_finalizeClass'%2C%2F**%0A%20%20%20%20%20%20%20*%20Override%20of%20PropertiesMixin%20_finalizeClass%20to%20create%20observers%20and%0A%20%20%20%20%20%20%20*%20find%20the%20template.%0A%20%20%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20%20%20*%20%40protected%0A%20%20%20%20%20%20%20*%20%40override%0A%20%20%20%20%20%20%20*%20%40suppress%20%7BmissingProperties%7D%20Interfaces%20in%20closure%20do%20not%20inherit%20statics%2C%20but%20classes%20do%0A%20%20%20%20%20%20%20*%2Fvalue%3Afunction%20_finalizeClass()%7B_get(PolymerElement.__proto__%7C%7CObject.getPrototypeOf(PolymerElement)%2C'_finalizeClass'%2Cthis).call(this)%3Bvar%20observers%3DownObservers(this)%3Bif(observers)%7Bthis.createObservers(observers%2Cthis._properties)%3B%7Dthis._prepareTemplate()%3B%7D%7D%2C%7Bkey%3A'_prepareTemplate'%2Cvalue%3Afunction%20_prepareTemplate()%7B%2F%2F%20note%3A%20create%20%22working%22%20template%20that%20is%20finalized%20at%20instance%20time%0Avar%20template%3D%2F**%20%40type%20%7BPolymerElementConstructor%7D%20*%2Fthis.template%3Bif(template)%7Bif(typeof%20template%3D%3D%3D'string')%7Bvar%20t%3Ddocument.createElement('template')%3Bt.innerHTML%3Dtemplate%3Btemplate%3Dt%3B%7Delse%20if(!Polymer.legacyOptimizations)%7Btemplate%3Dtemplate.cloneNode(true)%3B%7D%7Dthis.prototype._template%3Dtemplate%3B%7D%2F**%0A%20%20%20%20%20%20%20*%20Override%20of%20PropertiesChanged%20createProperties%20to%20create%20accessors%0A%20%20%20%20%20%20%20*%20and%20property%20effects%20for%20all%20of%20the%20properties.%0A%20%20%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20%20%20*%20%40protected%0A%20%20%20%20%20%20%20*%20%40override%0A%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'createProperties'%2Cvalue%3Afunction%20createProperties(props)%7Bfor(var%20p%20in%20props)%7BcreatePropertyFromConfig(this.prototype%2Cp%2Cprops%5Bp%5D%2Cprops)%3B%7D%7D%2F**%0A%20%20%20%20%20%20%20*%20Creates%20observers%20for%20the%20given%20%60observers%60%20array.%0A%20%20%20%20%20%20%20*%20Leverages%20%60PropertyEffects%60%20to%20create%20observers.%0A%20%20%20%20%20%20%20*%20%40param%20%7BObject%7D%20observers%20Array%20of%20observer%20descriptors%20for%0A%20%20%20%20%20%20%20*%20%20%20this%20class%0A%20%20%20%20%20%20%20*%20%40param%20%7BObject%7D%20dynamicFns%20Object%20containing%20keys%20for%20any%20properties%0A%20%20%20%20%20%20%20*%20%20%20that%20are%20functions%20and%20should%20trigger%20the%20effect%20when%20the%20function%0A%20%20%20%20%20%20%20*%20%20%20reference%20is%20changed%0A%20%20%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20%20%20*%20%40protected%0A%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'createObservers'%2Cvalue%3Afunction%20createObservers(observers%2CdynamicFns)%7Bvar%20proto%3Dthis.prototype%3Bfor(var%20i%3D0%3Bi%3Cobservers.length%3Bi%2B%2B)%7Bproto._createMethodObserver(observers%5Bi%5D%2CdynamicFns)%3B%7D%7D%2F**%0A%20%20%20%20%20%20%20*%20Returns%20the%20template%20that%20will%20be%20stamped%20into%20this%20element's%20shadow%20root.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20If%20a%20%60static%20get%20is()%60%20getter%20is%20defined%2C%20the%20default%20implementation%0A%20%20%20%20%20%20%20*%20will%20return%20the%20first%20%60%3Ctemplate%3E%60%20in%20a%20%60dom-module%60%20whose%20%60id%60%0A%20%20%20%20%20%20%20*%20matches%20this%20element's%20%60is%60.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20Users%20may%20override%20this%20getter%20to%20return%20an%20arbitrary%20template%0A%20%20%20%20%20%20%20*%20(in%20which%20case%20the%20%60is%60%20getter%20is%20unnecessary).%20The%20template%20returned%0A%20%20%20%20%20%20%20*%20may%20be%20either%20an%20%60HTMLTemplateElement%60%20or%20a%20string%20that%20will%20be%0A%20%20%20%20%20%20%20*%20automatically%20parsed%20into%20a%20template.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20Note%20that%20when%20subclassing%2C%20if%20the%20super%20class%20overrode%20the%20default%0A%20%20%20%20%20%20%20*%20implementation%20and%20the%20subclass%20would%20like%20to%20provide%20an%20alternate%0A%20%20%20%20%20%20%20*%20template%20via%20a%20%60dom-module%60%2C%20it%20should%20override%20this%20getter%20and%0A%20%20%20%20%20%20%20*%20return%20%60Polymer.DomModule.import(this.is%2C%20'template')%60.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20If%20a%20subclass%20would%20like%20to%20modify%20the%20super%20class%20template%2C%20it%20should%0A%20%20%20%20%20%20%20*%20clone%20it%20rather%20than%20modify%20it%20in%20place.%20%20If%20the%20getter%20does%20expensive%0A%20%20%20%20%20%20%20*%20work%20such%20as%20cloning%2Fmodifying%20a%20template%2C%20it%20should%20memoize%20the%0A%20%20%20%20%20%20%20*%20template%20for%20maximum%20performance%3A%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%20%20let%20memoizedTemplate%3B%0A%20%20%20%20%20%20%20*%20%20%20class%20MySubClass%20extends%20MySuperClass%20%7B%0A%20%20%20%20%20%20%20*%20%20%20%20%20static%20get%20template()%20%7B%0A%20%20%20%20%20%20%20*%20%20%20%20%20%20%20if%20(!memoizedTemplate)%20%7B%0A%20%20%20%20%20%20%20*%20%20%20%20%20%20%20%20%20memoizedTemplate%20%3D%20MySuperClass.template.cloneNode(true)%3B%0A%20%20%20%20%20%20%20*%20%20%20%20%20%20%20%20%20let%20subContent%20%3D%20document.createElement('div')%3B%0A%20%20%20%20%20%20%20*%20%20%20%20%20%20%20%20%20subContent.textContent%20%3D%20'This%20came%20from%20MySubClass'%3B%0A%20%20%20%20%20%20%20*%20%20%20%20%20%20%20%20%20memoizedTemplate.content.appendChild(subContent)%3B%0A%20%20%20%20%20%20%20*%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20*%20%20%20%20%20%20%20return%20memoizedTemplate%3B%0A%20%20%20%20%20%20%20*%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20*%20%20%20%7D%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40return%20%7BHTMLTemplateElement%7Cstring%7D%20Template%20to%20be%20stamped%0A%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'template'%2Cget%3Afunction%20get()%7B%2F%2F%20Explanation%20of%20template-related%20properties%3A%0A%2F%2F%20-%20constructor.template%20(this%20getter)%3A%20the%20template%20for%20the%20class.%0A%2F%2F%20%20%20%20%20This%20can%20come%20from%20the%20prototype%20(for%20legacy%20elements)%2C%20from%20a%0A%2F%2F%20%20%20%20%20dom-module%2C%20or%20from%20the%20super%20class's%20template%20(or%20can%20be%20overridden%0A%2F%2F%20%20%20%20%20altogether%20by%20the%20user)%0A%2F%2F%20-%20constructor._template%3A%20memoized%20version%20of%20constructor.template%0A%2F%2F%20-%20prototype._template%3A%20working%20template%20for%20the%20element%2C%20which%20will%20be%0A%2F%2F%20%20%20%20%20parsed%20and%20modified%20in%20place.%20It%20is%20a%20cloned%20version%20of%0A%2F%2F%20%20%20%20%20constructor.template%2C%20saved%20in%20_finalizeClass().%20Note%20that%20before%0A%2F%2F%20%20%20%20%20this%20getter%20is%20called%2C%20for%20legacy%20elements%20this%20could%20be%20from%20a%0A%2F%2F%20%20%20%20%20_template%20field%20on%20the%20info%20object%20passed%20to%20Polymer()%2C%20a%20behavior%2C%0A%2F%2F%20%20%20%20%20or%20set%20in%20registered()%3B%20once%20the%20static%20getter%20runs%2C%20a%20clone%20of%20it%0A%2F%2F%20%20%20%20%20will%20overwrite%20it%20on%20the%20prototype%20as%20the%20working%20template.%0Aif(!this.hasOwnProperty(JSCompiler_renameProperty('_template'%2Cthis)))%7Bthis._template%3D%2F%2F%20If%20user%20has%20put%20template%20on%20prototype%20(e.g.%20in%20legacy%20via%20registered%0A%2F%2F%20callback%20or%20info%20object)%2C%20prefer%20that%20first%0Athis.prototype.hasOwnProperty(JSCompiler_renameProperty('_template'%2Cthis.prototype))%3Fthis.prototype._template%3A%2F%2F%20Look%20in%20dom-module%20associated%20with%20this%20element's%20is%0AgetTemplateFromDomModule(%2F**%20%40type%20%7BPolymerElementConstructor%7D*%2Fthis.is)%7C%7C%2F%2F%20Next%20look%20for%20superclass%20template%20(call%20the%20super%20impl%20this%0A%2F%2F%20way%20so%20that%20%60this%60%20points%20to%20the%20superclass)%0AObject.getPrototypeOf(%2F**%20%40type%20%7BPolymerElementConstructor%7D*%2Fthis.prototype).constructor.template%3B%7Dreturn%20this._template%3B%7D%2F**%0A%20%20%20%20%20%20%20*%20Set%20the%20template.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40param%20%7B!HTMLTemplateElement%7Cstring%7D%20value%20Template%20to%20set.%0A%20%20%20%20%20%20%20*%2F%2Cset%3Afunction%20set(value)%7Bthis._template%3Dvalue%3B%7D%2F**%0A%20%20%20%20%20%20%20*%20Path%20matching%20the%20url%20from%20which%20the%20element%20was%20imported.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20This%20path%20is%20used%20to%20resolve%20url's%20in%20template%20style%20cssText.%0A%20%20%20%20%20%20%20*%20The%20%60importPath%60%20property%20is%20also%20set%20on%20element%20instances%20and%20can%20be%0A%20%20%20%20%20%20%20*%20used%20to%20create%20bindings%20relative%20to%20the%20import%20path.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20For%20elements%20defined%20in%20ES%20modules%2C%20users%20should%20implement%0A%20%20%20%20%20%20%20*%20%60static%20get%20importMeta()%20%7B%20return%20import.meta%3B%20%7D%60%2C%20and%20the%20default%0A%20%20%20%20%20%20%20*%20implementation%20of%20%60importPath%60%20will%20%20return%20%60import.meta.url%60's%20path.%0A%20%20%20%20%20%20%20*%20For%20elements%20defined%20in%20HTML%20imports%2C%20this%20getter%20will%20return%20the%20path%0A%20%20%20%20%20%20%20*%20to%20the%20document%20containing%20a%20%60dom-module%60%20element%20matching%20this%0A%20%20%20%20%20%20%20*%20element's%20static%20%60is%60%20property.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20Note%2C%20this%20path%20should%20contain%20a%20trailing%20%60%2F%60.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40return%20%7Bstring%7D%20The%20import%20path%20for%20this%20element%20class%0A%20%20%20%20%20%20%20*%20%40suppress%20%7BmissingProperties%7D%0A%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'importPath'%2Cget%3Afunction%20get()%7Bif(!this.hasOwnProperty(JSCompiler_renameProperty('_importPath'%2Cthis)))%7Bvar%20meta%3Dthis.importMeta%3Bif(meta)%7Bthis._importPath%3DPolymer.ResolveUrl.pathFromUrl(meta.url)%3B%7Delse%7Bvar%20module%3DPolymer.DomModule%26%26Polymer.DomModule.import(%2F**%20%40type%20%7BPolymerElementConstructor%7D%20*%2Fthis.is)%3Bthis._importPath%3Dmodule%26%26module.assetpath%7C%7CObject.getPrototypeOf(%2F**%20%40type%20%7BPolymerElementConstructor%7D*%2Fthis.prototype).constructor.importPath%3B%7D%7Dreturn%20this._importPath%3B%7D%7D%5D)%3Bfunction%20PolymerElement()%7B_classCallCheck(this%2CPolymerElement)%3B%2F**%20%40type%20%7BHTMLTemplateElement%7D%20*%2Fvar%20_this%3D_possibleConstructorReturn(this%2C(PolymerElement.__proto__%7C%7CObject.getPrototypeOf(PolymerElement)).call(this))%3B_this._template%3B%2F**%20%40type%20%7Bstring%7D%20*%2F_this._importPath%3B%2F**%20%40type%20%7Bstring%7D%20*%2F_this.rootPath%3B%2F**%20%40type%20%7Bstring%7D%20*%2F_this.importPath%3B%2F**%20%40type%20%7BStampedTemplate%20%7C%20HTMLElement%20%7C%20ShadowRoot%7D%20*%2F_this.root%3B%2F**%20%40type%20%7B!Object%3Cstring%2C%20!Element%3E%7D%20*%2F_this.%24%3Breturn%20_this%3B%7D%2F**%0A%20%20%20%20%20%20%20*%20Overrides%20the%20default%20%60Polymer.PropertyAccessors%60%20to%20ensure%20class%0A%20%20%20%20%20%20%20*%20metaprogramming%20related%20to%20property%20accessors%20and%20effects%20has%0A%20%20%20%20%20%20%20*%20completed%20(calls%20%60finalize%60).%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20It%20also%20initializes%20any%20property%20defaults%20provided%20via%20%60value%60%20in%0A%20%20%20%20%20%20%20*%20%60properties%60%20metadata.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20%20%20*%20%40override%0A%20%20%20%20%20%20%20*%20%40suppress%20%7BinvalidCasts%7D%0A%20%20%20%20%20%20%20*%2F_createClass(PolymerElement%2C%5B%7Bkey%3A'_initializeProperties'%2Cvalue%3Afunction%20_initializeProperties()%7Bthis.constructor.finalize()%3B%2F%2F%20note%3A%20finalize%20template%20when%20we%20have%20access%20to%20%60localName%60%20to%0A%2F%2F%20avoid%20dependence%20on%20%60is%60%20for%20polyfilling%20styling.%0Athis.constructor._finalizeTemplate(%2F**%20%40type%20%7B!HTMLElement%7D%20*%2Fthis.localName)%3B_get(PolymerElement.prototype.__proto__%7C%7CObject.getPrototypeOf(PolymerElement.prototype)%2C'_initializeProperties'%2Cthis).call(this)%3B%2F%2F%20set%20path%20defaults%0Athis.rootPath%3DPolymer.rootPath%3Bthis.importPath%3Dthis.constructor.importPath%3B%2F%2F%20apply%20property%20defaults...%0Avar%20p%24%3DpropertyDefaults(this.constructor)%3Bif(!p%24)%7Breturn%3B%7Dfor(var%20p%20in%20p%24)%7Bvar%20info%3Dp%24%5Bp%5D%3B%2F%2F%20Don't%20set%20default%20value%20if%20there%20is%20already%20an%20own%20property%2C%20which%0A%2F%2F%20happens%20when%20a%20%60properties%60%20property%20with%20default%20but%20no%20effects%20had%0A%2F%2F%20a%20property%20set%20(e.g.%20bound)%20by%20its%20host%20before%20upgrade%0Aif(!this.hasOwnProperty(p))%7Bvar%20value%3Dtypeof%20info.value%3D%3D'function'%3Finfo.value.call(this)%3Ainfo.value%3B%2F%2F%20Set%20via%20%60_setProperty%60%20if%20there%20is%20an%20accessor%2C%20to%20enable%0A%2F%2F%20initializing%20readOnly%20property%20defaults%0Aif(this._hasAccessor(p))%7Bthis._setPendingProperty(p%2Cvalue%2Ctrue)%3B%7Delse%7Bthis%5Bp%5D%3Dvalue%3B%7D%7D%7D%7D%2F**%0A%20%20%20%20%20%20%20*%20Gather%20style%20text%20for%20a%20style%20element%20in%20the%20template.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40param%20%7Bstring%7D%20cssText%20Text%20containing%20styling%20to%20process%0A%20%20%20%20%20%20%20*%20%40param%20%7Bstring%7D%20baseURI%20Base%20URI%20to%20rebase%20CSS%20paths%20against%0A%20%20%20%20%20%20%20*%20%40return%20%7Bstring%7D%20The%20processed%20CSS%20text%0A%20%20%20%20%20%20%20*%20%40protected%0A%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'connectedCallback'%2C%2F**%0A%20%20%20%20%20%20%20*%20Provides%20a%20default%20implementation%20of%20the%20standard%20Custom%20Elements%0A%20%20%20%20%20%20%20*%20%60connectedCallback%60.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20The%20default%20implementation%20enables%20the%20property%20effects%20system%20and%0A%20%20%20%20%20%20%20*%20flushes%20any%20pending%20properties%2C%20and%20updates%20shimmed%20CSS%20properties%0A%20%20%20%20%20%20%20*%20when%20using%20the%20ShadyCSS%20scoping%2Fcustom%20properties%20polyfill.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40suppress%20%7BmissingProperties%2C%20invalidCasts%7D%20Super%20may%20or%20may%20not%20implement%20the%20callback%0A%20%20%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20%20%20*%2Fvalue%3Afunction%20connectedCallback()%7Bif(window.ShadyCSS%26%26this._template)%7Bwindow.ShadyCSS.styleElement(%2F**%20%40type%20%7B!HTMLElement%7D%20*%2Fthis)%3B%7D_get(PolymerElement.prototype.__proto__%7C%7CObject.getPrototypeOf(PolymerElement.prototype)%2C'connectedCallback'%2Cthis).call(this)%3B%7D%2F**%0A%20%20%20%20%20%20%20*%20Stamps%20the%20element%20template.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20%20%20*%20%40override%0A%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'ready'%2Cvalue%3Afunction%20ready()%7Bif(this._template)%7Bthis.root%3Dthis._stampTemplate(this._template)%3Bthis.%24%3Dthis.root.%24%3B%7D_get(PolymerElement.prototype.__proto__%7C%7CObject.getPrototypeOf(PolymerElement.prototype)%2C'ready'%2Cthis).call(this)%3B%7D%2F**%0A%20%20%20%20%20%20%20*%20Implements%20%60PropertyEffects%60's%20%60_readyClients%60%20call.%20Attaches%0A%20%20%20%20%20%20%20*%20element%20dom%20by%20calling%20%60_attachDom%60%20with%20the%20dom%20stamped%20from%20the%0A%20%20%20%20%20%20%20*%20element's%20template%20via%20%60_stampTemplate%60.%20Note%20that%20this%20allows%0A%20%20%20%20%20%20%20*%20client%20dom%20to%20be%20attached%20to%20the%20element%20prior%20to%20any%20observers%0A%20%20%20%20%20%20%20*%20running.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20%20%20*%20%40override%0A%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'_readyClients'%2Cvalue%3Afunction%20_readyClients()%7Bif(this._template)%7Bthis.root%3Dthis._attachDom(%2F**%20%40type%20%7BStampedTemplate%7D%20*%2Fthis.root)%3B%7D%2F%2F%20The%20super._readyClients%20here%20sets%20the%20clients%20initialized%20flag.%0A%2F%2F%20We%20must%20wait%20to%20do%20this%20until%20after%20client%20dom%20is%20created%2Fattached%0A%2F%2F%20so%20that%20this%20flag%20can%20be%20checked%20to%20prevent%20notifications%20fired%0A%2F%2F%20during%20this%20process%20from%20being%20handled%20before%20clients%20are%20ready.%0A_get(PolymerElement.prototype.__proto__%7C%7CObject.getPrototypeOf(PolymerElement.prototype)%2C'_readyClients'%2Cthis).call(this)%3B%7D%2F**%0A%20%20%20%20%20%20%20*%20Attaches%20an%20element's%20stamped%20dom%20to%20itself.%20By%20default%2C%0A%20%20%20%20%20%20%20*%20this%20method%20creates%20a%20%60shadowRoot%60%20and%20adds%20the%20dom%20to%20it.%0A%20%20%20%20%20%20%20*%20However%2C%20this%20method%20may%20be%20overridden%20to%20allow%20an%20element%0A%20%20%20%20%20%20%20*%20to%20put%20its%20dom%20in%20another%20location.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40throws%20%7BError%7D%0A%20%20%20%20%20%20%20*%20%40suppress%20%7BmissingReturn%7D%0A%20%20%20%20%20%20%20*%20%40param%20%7BStampedTemplate%7D%20dom%20to%20attach%20to%20the%20element.%0A%20%20%20%20%20%20%20*%20%40return%20%7BShadowRoot%7D%20node%20to%20which%20the%20dom%20has%20been%20attached.%0A%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'_attachDom'%2Cvalue%3Afunction%20_attachDom(dom)%7Bif(this.attachShadow)%7Bif(dom)%7Bif(!this.shadowRoot)%7Bthis.attachShadow(%7Bmode%3A'open'%7D)%3B%7Dthis.shadowRoot.appendChild(dom)%3Breturn%20this.shadowRoot%3B%7Dreturn%20null%3B%7Delse%7Bthrow%20new%20Error('ShadowDOM%20not%20available.%20'%2B%2F%2F%20TODO(sorvell)%3A%20move%20to%20compile-time%20conditional%20when%20supported%0A'Polymer.Element%20can%20create%20dom%20as%20children%20instead%20of%20in%20'%2B'ShadowDOM%20by%20setting%20%60this.root%20%3D%20this%3B%5C%60%20before%20%5C%60ready%5C%60.')%3B%7D%7D%2F**%0A%20%20%20%20%20%20%20*%20When%20using%20the%20ShadyCSS%20scoping%20and%20custom%20property%20shim%2C%20causes%20all%0A%20%20%20%20%20%20%20*%20shimmed%20styles%20in%20this%20element%20(and%20its%20subtree)%20to%20be%20updated%0A%20%20%20%20%20%20%20*%20based%20on%20current%20custom%20property%20values.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20The%20optional%20parameter%20overrides%20inline%20custom%20property%20styles%20with%20an%0A%20%20%20%20%20%20%20*%20object%20of%20properties%20where%20the%20keys%20are%20CSS%20properties%2C%20and%20the%20values%0A%20%20%20%20%20%20%20*%20are%20strings.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20Example%3A%20%60this.updateStyles(%7B'--color'%3A%20'blue'%7D)%60%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20These%20properties%20are%20retained%20unless%20a%20value%20of%20%60null%60%20is%20set.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20Note%3A%20This%20function%20does%20not%20support%20updating%20CSS%20mixins.%0A%20%20%20%20%20%20%20*%20You%20can%20not%20dynamically%20change%20the%20value%20of%20an%20%60%40apply%60.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40param%20%7BObject%3D%7D%20properties%20Bag%20of%20custom%20property%20key%2Fvalues%20to%0A%20%20%20%20%20%20%20*%20%20%20apply%20to%20this%20element.%0A%20%20%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20%20%20*%20%40suppress%20%7BinvalidCasts%7D%0A%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'updateStyles'%2Cvalue%3Afunction%20updateStyles(properties)%7Bif(window.ShadyCSS)%7Bwindow.ShadyCSS.styleSubtree(%2F**%20%40type%20%7B!HTMLElement%7D%20*%2Fthis%2Cproperties)%3B%7D%7D%2F**%0A%20%20%20%20%20%20%20*%20Rewrites%20a%20given%20URL%20relative%20to%20a%20base%20URL.%20The%20base%20URL%20defaults%20to%0A%20%20%20%20%20%20%20*%20the%20original%20location%20of%20the%20document%20containing%20the%20%60dom-module%60%20for%0A%20%20%20%20%20%20%20*%20this%20element.%20This%20method%20will%20return%20the%20same%20URL%20before%20and%20after%0A%20%20%20%20%20%20%20*%20bundling.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20Note%20that%20this%20function%20performs%20no%20resolution%20for%20URLs%20that%20start%0A%20%20%20%20%20%20%20*%20with%20%60%2F%60%20(absolute%20URLs)%20or%20%60%23%60%20(hash%20identifiers).%20%20For%20general%20purpose%0A%20%20%20%20%20%20%20*%20URL%20resolution%2C%20use%20%60window.URL%60.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40param%20%7Bstring%7D%20url%20URL%20to%20resolve.%0A%20%20%20%20%20%20%20*%20%40param%20%7Bstring%3D%7D%20base%20Optional%20base%20URL%20to%20resolve%20against%2C%20defaults%0A%20%20%20%20%20%20%20*%20to%20the%20element's%20%60importPath%60%0A%20%20%20%20%20%20%20*%20%40return%20%7Bstring%7D%20Rewritten%20URL%20relative%20to%20base%0A%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'resolveUrl'%2Cvalue%3Afunction%20resolveUrl(url%2Cbase)%7Bif(!base%26%26this.importPath)%7Bbase%3DPolymer.ResolveUrl.resolveUrl(this.importPath)%3B%7Dreturn%20Polymer.ResolveUrl.resolveUrl(url%2Cbase)%3B%7D%2F**%0A%20%20%20%20%20%20%20*%20Overrides%20%60PropertyAccessors%60%20to%20add%20map%20of%20dynamic%20functions%20on%0A%20%20%20%20%20%20%20*%20template%20info%2C%20for%20consumption%20by%20%60PropertyEffects%60%20template%20binding%0A%20%20%20%20%20%20%20*%20code.%20This%20map%20determines%20which%20method%20templates%20should%20have%20accessors%0A%20%20%20%20%20%20%20*%20created%20for%20them.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40override%0A%20%20%20%20%20%20%20*%20%40suppress%20%7BmissingProperties%7D%20Interfaces%20in%20closure%20do%20not%20inherit%20statics%2C%20but%20classes%20do%0A%20%20%20%20%20%20%20*%2F%7D%5D%2C%5B%7Bkey%3A'_processStyleText'%2Cvalue%3Afunction%20_processStyleText(cssText%2CbaseURI)%7Breturn%20Polymer.ResolveUrl.resolveCss(cssText%2CbaseURI)%3B%7D%2F**%0A%20%20%20%20%20%20*%20Configures%20an%20element%20%60proto%60%20to%20function%20with%20a%20given%20%60template%60.%0A%20%20%20%20%20%20*%20The%20element%20name%20%60is%60%20and%20extends%20%60ext%60%20must%20be%20specified%20for%20ShadyCSS%0A%20%20%20%20%20%20*%20style%20scoping.%0A%20%20%20%20%20%20*%0A%20%20%20%20%20%20*%20%40param%20%7Bstring%7D%20is%20Tag%20name%20(or%20type%20extension%20name)%20for%20this%20element%0A%20%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20%20*%20%40protected%0A%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'_finalizeTemplate'%2Cvalue%3Afunction%20_finalizeTemplate(is)%7B%2F**%20%40const%20%7BHTMLTemplateElement%7D%20*%2Fvar%20template%3Dthis.prototype._template%3Bif(template%26%26!template.__polymerFinalized)%7Btemplate.__polymerFinalized%3Dtrue%3Bvar%20importPath%3Dthis.importPath%3Bvar%20baseURI%3DimportPath%3FPolymer.ResolveUrl.resolveUrl(importPath)%3A''%3B%2F%2F%20e.g.%20support%20%60include%3D%22module-name%22%60%2C%20and%20ShadyCSS%0AprocessElementStyles(this%2Ctemplate%2Cis%2CbaseURI)%3Bthis.prototype._bindTemplate(template)%3B%7D%7D%7D%2C%7Bkey%3A'_parseTemplateContent'%2Cvalue%3Afunction%20_parseTemplateContent(template%2CtemplateInfo%2CnodeInfo)%7BtemplateInfo.dynamicFns%3DtemplateInfo.dynamicFns%7C%7Cthis._properties%3Breturn%20_get(PolymerElement.__proto__%7C%7CObject.getPrototypeOf(PolymerElement)%2C'_parseTemplateContent'%2Cthis).call(this%2Ctemplate%2CtemplateInfo%2CnodeInfo)%3B%7D%7D%5D)%3Breturn%20PolymerElement%3B%7D(polymerElementBase)%3Breturn%20PolymerElement%3B%7D)%3B%2F**%0A%20%20%20*%20When%20using%20the%20ShadyCSS%20scoping%20and%20custom%20property%20shim%2C%20causes%20all%0A%20%20%20*%20shimmed%20%60styles%60%20(via%20%60custom-style%60)%20in%20the%20document%20(and%20its%20subtree)%0A%20%20%20*%20to%20be%20updated%20based%20on%20current%20custom%20property%20values.%0A%20%20%20*%0A%20%20%20*%20The%20optional%20parameter%20overrides%20inline%20custom%20property%20styles%20with%20an%0A%20%20%20*%20object%20of%20properties%20where%20the%20keys%20are%20CSS%20properties%2C%20and%20the%20values%0A%20%20%20*%20are%20strings.%0A%20%20%20*%0A%20%20%20*%20Example%3A%20%60Polymer.updateStyles(%7B'--color'%3A%20'blue'%7D)%60%0A%20%20%20*%0A%20%20%20*%20These%20properties%20are%20retained%20unless%20a%20value%20of%20%60null%60%20is%20set.%0A%20%20%20*%0A%20%20%20*%20%40param%20%7BObject%3D%7D%20props%20Bag%20of%20custom%20property%20key%2Fvalues%20to%0A%20%20%20*%20%20%20apply%20to%20the%20document.%0A%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20*%2FPolymer.updateStyles%3Dfunction(props)%7Bif(window.ShadyCSS)%7Bwindow.ShadyCSS.styleDocument(props)%3B%7D%7D%3B%7D)()%3B%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Fcpt-static.gannettdigital.com%2Funiversal-web-client%2Fmaster%2Flatest%2Fvendor%2Fcomponents%2Fpolymer%2Flib%2Fmixins%2Felement-mixin.html.js%0A | 31 kB | 2023-03-07 | 2024-01-25 | |
Pretty
Loading... | ||||
http:text/javascript;charset=utf-8,var%20_createClass%3Dfunction()%7Bfunction%20defineProperties(target%2Cprops)%7Bfor(var%20i%3D0%3Bi%3Cprops.length%3Bi%2B%2B)%7Bvar%20descriptor%3Dprops%5Bi%5D%3Bdescriptor.enumerable%3Ddescriptor.enumerable%7C%7Cfalse%3Bdescriptor.configurable%3Dtrue%3Bif(%22value%22in%20descriptor)descriptor.writable%3Dtrue%3BObject.defineProperty(target%2Cdescriptor.key%2Cdescriptor)%3B%7D%7Dreturn%20function(Constructor%2CprotoProps%2CstaticProps)%7Bif(protoProps)defineProperties(Constructor.prototype%2CprotoProps)%3Bif(staticProps)defineProperties(Constructor%2CstaticProps)%3Breturn%20Constructor%3B%7D%3B%7D()%3Bfunction%20_classCallCheck(instance%2CConstructor)%7Bif(!(instance%20instanceof%20Constructor))%7Bthrow%20new%20TypeError(%22Cannot%20call%20a%20class%20as%20a%20function%22)%3B%7D%7D(function()%7B'use%20strict'%3B%2F**%0A%20%20%20*%20Returns%20true%20if%20%60node%60%20is%20a%20slot%20element%0A%20%20%20*%20%40param%20%7BNode%7D%20node%20Node%20to%20test.%0A%20%20%20*%20%40return%20%7Bboolean%7D%20Returns%20true%20if%20the%20given%20%60node%60%20is%20a%20slot%0A%20%20%20*%20%40private%0A%20%20%20*%2Ffunction%20isSlot(node)%7Breturn%20node.localName%3D%3D%3D'slot'%3B%7D%2F**%0A%20%20%20*%20Class%20that%20listens%20for%20changes%20(additions%20or%20removals)%20to%0A%20%20%20*%20%22flattened%20nodes%22%20on%20a%20given%20%60node%60.%20The%20list%20of%20flattened%20nodes%20consists%0A%20%20%20*%20of%20a%20node's%20children%20and%2C%20for%20any%20children%20that%20are%20%60%3Cslot%3E%60%20elements%2C%0A%20%20%20*%20the%20expanded%20flattened%20list%20of%20%60assignedNodes%60.%0A%20%20%20*%20For%20example%2C%20if%20the%20observed%20node%20has%20children%20%60%3Ca%3E%3C%2Fa%3E%3Cslot%3E%3C%2Fslot%3E%3Cb%3E%3C%2Fb%3E%60%0A%20%20%20*%20and%20the%20%60%3Cslot%3E%60%20has%20one%20%60%3Cdiv%3E%60%20assigned%20to%20it%2C%20then%20the%20flattened%0A%20%20%20*%20nodes%20list%20is%20%60%3Ca%3E%3C%2Fa%3E%3Cdiv%3E%3C%2Fdiv%3E%3Cb%3E%3C%2Fb%3E%60.%20If%20the%20%60%3Cslot%3E%60%20has%20other%0A%20%20%20*%20%60%3Cslot%3E%60%20elements%20assigned%20to%20it%2C%20these%20are%20flattened%20as%20well.%0A%20%20%20*%0A%20%20%20*%20The%20provided%20%60callback%60%20is%20called%20whenever%20any%20change%20to%20this%20list%0A%20%20%20*%20of%20flattened%20nodes%20occurs%2C%20where%20an%20addition%20or%20removal%20of%20a%20node%20is%0A%20%20%20*%20considered%20a%20change.%20The%20%60callback%60%20is%20called%20with%20one%20argument%2C%20an%20object%0A%20%20%20*%20containing%20an%20array%20of%20any%20%60addedNodes%60%20and%20%60removedNodes%60.%0A%20%20%20*%0A%20%20%20*%20Note%3A%20the%20callback%20is%20called%20asynchronous%20to%20any%20changes%0A%20%20%20*%20at%20a%20microtask%20checkpoint.%20This%20is%20because%20observation%20is%20performed%20using%0A%20%20%20*%20%60MutationObserver%60%20and%20the%20%60%3Cslot%3E%60%20element's%20%60slotchange%60%20event%20which%0A%20%20%20*%20are%20asynchronous.%0A%20%20%20*%0A%20%20%20*%20An%20example%3A%0A%20%20%20*%20%60%60%60js%0A%20%20%20*%20class%20TestSelfObserve%20extends%20Polymer.Element%20%7B%0A%20%20%20*%20%20%20static%20get%20is()%20%7B%20return%20'test-self-observe'%3B%7D%0A%20%20%20*%20%20%20connectedCallback()%20%7B%0A%20%20%20*%20%20%20%20%20super.connectedCallback()%3B%0A%20%20%20*%20%20%20%20%20this._observer%20%3D%20new%20Polymer.FlattenedNodesObserver(this%2C%20(info)%20%3D%3E%20%7B%0A%20%20%20*%20%20%20%20%20%20%20this.info%20%3D%20info%3B%0A%20%20%20*%20%20%20%20%20%7D)%3B%0A%20%20%20*%20%20%20%7D%0A%20%20%20*%20%20%20disconnectedCallback()%20%7B%0A%20%20%20*%20%20%20%20%20super.disconnectedCallback()%3B%0A%20%20%20*%20%20%20%20%20this._observer.disconnect()%3B%0A%20%20%20*%20%20%20%7D%0A%20%20%20*%20%7D%0A%20%20%20*%20customElements.define(TestSelfObserve.is%2C%20TestSelfObserve)%3B%0A%20%20%20*%20%60%60%60%0A%20%20%20*%0A%20%20%20*%20%40memberof%20Polymer%0A%20%20%20*%20%40summary%20Class%20that%20listens%20for%20changes%20(additions%20or%20removals)%20to%0A%20%20%20*%20%22flattened%20nodes%22%20on%20a%20given%20%60node%60.%0A%20%20%20*%2Fvar%20FlattenedNodesObserver%3Dfunction()%7B_createClass(FlattenedNodesObserver%2Cnull%2C%5B%7Bkey%3A'getFlattenedNodes'%2C%2F**%0A%20%20%20%20%20*%20Returns%20the%20list%20of%20flattened%20nodes%20for%20the%20given%20%60node%60.%0A%20%20%20%20%20*%20This%20list%20consists%20of%20a%20node's%20children%20and%2C%20for%20any%20children%0A%20%20%20%20%20*%20that%20are%20%60%3Cslot%3E%60%20elements%2C%20the%20expanded%20flattened%20list%20of%20%60assignedNodes%60.%0A%20%20%20%20%20*%20For%20example%2C%20if%20the%20observed%20node%20has%20children%20%60%3Ca%3E%3C%2Fa%3E%3Cslot%3E%3C%2Fslot%3E%3Cb%3E%3C%2Fb%3E%60%0A%20%20%20%20%20*%20and%20the%20%60%3Cslot%3E%60%20has%20one%20%60%3Cdiv%3E%60%20assigned%20to%20it%2C%20then%20the%20flattened%0A%20%20%20%20%20*%20nodes%20list%20is%20%60%3Ca%3E%3C%2Fa%3E%3Cdiv%3E%3C%2Fdiv%3E%3Cb%3E%3C%2Fb%3E%60.%20If%20the%20%60%3Cslot%3E%60%20has%20other%0A%20%20%20%20%20*%20%60%3Cslot%3E%60%20elements%20assigned%20to%20it%2C%20these%20are%20flattened%20as%20well.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40param%20%7BHTMLElement%7CHTMLSlotElement%7D%20node%20The%20node%20for%20which%20to%20return%20the%20list%20of%20flattened%20nodes.%0A%20%20%20%20%20*%20%40return%20%7BArray%7D%20The%20list%20of%20flattened%20nodes%20for%20the%20given%20%60node%60.%0A%20%20%20%20*%2Fvalue%3Afunction%20getFlattenedNodes(node)%7Bif(isSlot(node))%7Bnode%3D%2F**%20%40type%20%7BHTMLSlotElement%7D%20*%2Fnode%3B%2F%2F%20eslint-disable-line%20no-self-assign%0Areturn%20node.assignedNodes(%7Bflatten%3Atrue%7D)%3B%7Delse%7Breturn%20Array.from(node.childNodes).map(function(node)%7Bif(isSlot(node))%7Bnode%3D%2F**%20%40type%20%7BHTMLSlotElement%7D%20*%2Fnode%3B%2F%2F%20eslint-disable-line%20no-self-assign%0Areturn%20node.assignedNodes(%7Bflatten%3Atrue%7D)%3B%7Delse%7Breturn%5Bnode%5D%3B%7D%7D).reduce(function(a%2Cb)%7Breturn%20a.concat(b)%3B%7D%2C%5B%5D)%3B%7D%7D%2F**%0A%20%20%20%20%20*%20%40param%20%7BElement%7D%20target%20Node%20on%20which%20to%20listen%20for%20changes.%0A%20%20%20%20%20*%20%40param%20%7B%3Ffunction(!Element%2C%20%7B%20target%3A%20!Element%2C%20addedNodes%3A%20!Array%3C!Element%3E%2C%20removedNodes%3A%20!Array%3C!Element%3E%20%7D)%3Avoid%7D%20callback%20Function%20called%20when%20there%20are%20additions%0A%20%20%20%20%20*%20or%20removals%20from%20the%20target's%20list%20of%20flattened%20nodes.%0A%20%20%20%20*%2F%7D%5D)%3Bfunction%20FlattenedNodesObserver(target%2Ccallback)%7Bvar%20_this%3Dthis%3B_classCallCheck(this%2CFlattenedNodesObserver)%3B%2F**%0A%20%20%20%20%20%20%20*%20%40type%20%7BMutationObserver%7D%0A%20%20%20%20%20%20%20*%20%40private%0A%20%20%20%20%20%20%20*%2Fthis._shadyChildrenObserver%3Dnull%3B%2F**%0A%20%20%20%20%20%20%20*%20%40type%20%7BMutationObserver%7D%0A%20%20%20%20%20%20%20*%20%40private%0A%20%20%20%20%20%20%20*%2Fthis._nativeChildrenObserver%3Dnull%3Bthis._connected%3Dfalse%3B%2F**%0A%20%20%20%20%20%20%20*%20%40type%20%7BElement%7D%0A%20%20%20%20%20%20%20*%20%40private%0A%20%20%20%20%20%20%20*%2Fthis._target%3Dtarget%3Bthis.callback%3Dcallback%3Bthis._effectiveNodes%3D%5B%5D%3Bthis._observer%3Dnull%3Bthis._scheduled%3Dfalse%3B%2F**%0A%20%20%20%20%20%20%20*%20%40type%20%7Bfunction()%7D%0A%20%20%20%20%20%20%20*%20%40private%0A%20%20%20%20%20%20%20*%2Fthis._boundSchedule%3Dfunction()%7B_this._schedule()%3B%7D%3Bthis.connect()%3Bthis._schedule()%3B%7D%2F**%0A%20%20%20%20%20*%20Activates%20an%20observer.%20This%20method%20is%20automatically%20called%20when%0A%20%20%20%20%20*%20a%20%60FlattenedNodesObserver%60%20is%20created.%20It%20should%20only%20be%20called%20to%0A%20%20%20%20%20*%20re-activate%20an%20observer%20that%20has%20been%20deactivated%20via%20the%20%60disconnect%60%20method.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20*%2F_createClass(FlattenedNodesObserver%2C%5B%7Bkey%3A'connect'%2Cvalue%3Afunction%20connect()%7Bvar%20_this2%3Dthis%3Bif(isSlot(this._target))%7Bthis._listenSlots(%5Bthis._target%5D)%3B%7Delse%20if(this._target.children)%7Bthis._listenSlots(this._target.children)%3Bif(window.ShadyDOM)%7Bthis._shadyChildrenObserver%3DShadyDOM.observeChildren(this._target%2Cfunction(mutations)%7B_this2._processMutations(mutations)%3B%7D)%3B%7Delse%7Bthis._nativeChildrenObserver%3Dnew%20MutationObserver(function(mutations)%7B_this2._processMutations(mutations)%3B%7D)%3Bthis._nativeChildrenObserver.observe(this._target%2C%7BchildList%3Atrue%7D)%3B%7D%7Dthis._connected%3Dtrue%3B%7D%2F**%0A%20%20%20%20%20*%20Deactivates%20the%20flattened%20nodes%20observer.%20After%20calling%20this%20method%0A%20%20%20%20%20*%20the%20observer%20callback%20will%20not%20be%20called%20when%20changes%20to%20flattened%20nodes%0A%20%20%20%20%20*%20occur.%20The%20%60connect%60%20method%20may%20be%20subsequently%20called%20to%20reactivate%0A%20%20%20%20%20*%20the%20observer.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'disconnect'%2Cvalue%3Afunction%20disconnect()%7Bif(isSlot(this._target))%7Bthis._unlistenSlots(%5Bthis._target%5D)%3B%7Delse%20if(this._target.children)%7Bthis._unlistenSlots(this._target.children)%3Bif(window.ShadyDOM%26%26this._shadyChildrenObserver)%7BShadyDOM.unobserveChildren(this._shadyChildrenObserver)%3Bthis._shadyChildrenObserver%3Dnull%3B%7Delse%20if(this._nativeChildrenObserver)%7Bthis._nativeChildrenObserver.disconnect()%3Bthis._nativeChildrenObserver%3Dnull%3B%7D%7Dthis._connected%3Dfalse%3B%7D%2F**%0A%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20*%20%40private%0A%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'_schedule'%2Cvalue%3Afunction%20_schedule()%7Bvar%20_this3%3Dthis%3Bif(!this._scheduled)%7Bthis._scheduled%3Dtrue%3BPolymer.Async.microTask.run(function()%7Breturn%20_this3.flush()%3B%7D)%3B%7D%7D%2F**%0A%20%20%20%20%20*%20%40param%20%7BArray%3CMutationRecord%3E%7D%20mutations%20Mutations%20signaled%20by%20the%20mutation%20observer%0A%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20*%20%40private%0A%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'_processMutations'%2Cvalue%3Afunction%20_processMutations(mutations)%7Bthis._processSlotMutations(mutations)%3Bthis.flush()%3B%7D%2F**%0A%20%20%20%20%20*%20%40param%20%7BArray%3CMutationRecord%3E%7D%20mutations%20Mutations%20signaled%20by%20the%20mutation%20observer%0A%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20*%20%40private%0A%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'_processSlotMutations'%2Cvalue%3Afunction%20_processSlotMutations(mutations)%7Bif(mutations)%7Bfor(var%20i%3D0%3Bi%3Cmutations.length%3Bi%2B%2B)%7Bvar%20mutation%3Dmutations%5Bi%5D%3Bif(mutation.addedNodes)%7Bthis._listenSlots(mutation.addedNodes)%3B%7Dif(mutation.removedNodes)%7Bthis._unlistenSlots(mutation.removedNodes)%3B%7D%7D%7D%7D%2F**%0A%20%20%20%20%20*%20Flushes%20the%20observer%20causing%20any%20pending%20changes%20to%20be%20immediately%0A%20%20%20%20%20*%20delivered%20the%20observer%20callback.%20By%20default%20these%20changes%20are%20delivered%0A%20%20%20%20%20*%20asynchronously%20at%20the%20next%20microtask%20checkpoint.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40return%20%7Bboolean%7D%20Returns%20true%20if%20any%20pending%20changes%20caused%20the%20observer%0A%20%20%20%20%20*%20callback%20to%20run.%0A%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'flush'%2Cvalue%3Afunction%20flush()%7Bif(!this._connected)%7Breturn%20false%3B%7Dif(window.ShadyDOM)%7BShadyDOM.flush()%3B%7Dif(this._nativeChildrenObserver)%7Bthis._processSlotMutations(this._nativeChildrenObserver.takeRecords())%3B%7Delse%20if(this._shadyChildrenObserver)%7Bthis._processSlotMutations(this._shadyChildrenObserver.takeRecords())%3B%7Dthis._scheduled%3Dfalse%3Bvar%20info%3D%7Btarget%3Athis._target%2CaddedNodes%3A%5B%5D%2CremovedNodes%3A%5B%5D%7D%3Bvar%20newNodes%3Dthis.constructor.getFlattenedNodes(this._target)%3Bvar%20splices%3DPolymer.ArraySplice.calculateSplices(newNodes%2Cthis._effectiveNodes)%3B%2F%2F%20process%20removals%0Afor(var%20i%3D0%2Cs%3Bi%3Csplices.length%26%26(s%3Dsplices%5Bi%5D)%3Bi%2B%2B)%7Bfor(var%20j%3D0%2Cn%3Bj%3Cs.removed.length%26%26(n%3Ds.removed%5Bj%5D)%3Bj%2B%2B)%7Binfo.removedNodes.push(n)%3B%7D%7D%2F%2F%20process%20adds%0Afor(var%20_i%3D0%2C_s%3B_i%3Csplices.length%26%26(_s%3Dsplices%5B_i%5D)%3B_i%2B%2B)%7Bfor(var%20_j%3D_s.index%3B_j%3C_s.index%2B_s.addedCount%3B_j%2B%2B)%7Binfo.addedNodes.push(newNodes%5B_j%5D)%3B%7D%7D%2F%2F%20update%20cache%0Athis._effectiveNodes%3DnewNodes%3Bvar%20didFlush%3Dfalse%3Bif(info.addedNodes.length%7C%7Cinfo.removedNodes.length)%7BdidFlush%3Dtrue%3Bthis.callback.call(this._target%2Cinfo)%3B%7Dreturn%20didFlush%3B%7D%2F**%0A%20%20%20%20%20*%20%40param%20%7B!Array%3CElement%7CNode%3E%7C!NodeList%3CNode%3E%7D%20nodeList%20Nodes%20that%20could%20change%0A%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20*%20%40private%0A%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'_listenSlots'%2Cvalue%3Afunction%20_listenSlots(nodeList)%7Bfor(var%20i%3D0%3Bi%3CnodeList.length%3Bi%2B%2B)%7Bvar%20n%3DnodeList%5Bi%5D%3Bif(isSlot(n))%7Bn.addEventListener('slotchange'%2Cthis._boundSchedule)%3B%7D%7D%7D%2F**%0A%20%20%20%20%20*%20%40param%20%7B!Array%3CElement%7CNode%3E%7C!NodeList%3CNode%3E%7D%20nodeList%20Nodes%20that%20could%20change%0A%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20*%20%40private%0A%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'_unlistenSlots'%2Cvalue%3Afunction%20_unlistenSlots(nodeList)%7Bfor(var%20i%3D0%3Bi%3CnodeList.length%3Bi%2B%2B)%7Bvar%20n%3DnodeList%5Bi%5D%3Bif(isSlot(n))%7Bn.removeEventListener('slotchange'%2Cthis._boundSchedule)%3B%7D%7D%7D%7D%5D)%3Breturn%20FlattenedNodesObserver%3B%7D()%3BPolymer.FlattenedNodesObserver%3DFlattenedNodesObserver%3B%7D)()%3B%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Fcpt-static.gannettdigital.com%2Funiversal-web-client%2Fmaster%2Flatest%2Fvendor%2Fcomponents%2Fpolymer%2Flib%2Futils%2Fflattened-nodes-observer.html.js%0A | 9.7 kB | 2023-03-07 | 2024-01-25 | |
Pretty
Loading... | ||||
http:text/javascript;charset=utf-8,var%20_createClass%3Dfunction()%7Bfunction%20defineProperties(target%2Cprops)%7Bfor(var%20i%3D0%3Bi%3Cprops.length%3Bi%2B%2B)%7Bvar%20descriptor%3Dprops%5Bi%5D%3Bdescriptor.enumerable%3Ddescriptor.enumerable%7C%7Cfalse%3Bdescriptor.configurable%3Dtrue%3Bif(%22value%22in%20descriptor)descriptor.writable%3Dtrue%3BObject.defineProperty(target%2Cdescriptor.key%2Cdescriptor)%3B%7D%7Dreturn%20function(Constructor%2CprotoProps%2CstaticProps)%7Bif(protoProps)defineProperties(Constructor.prototype%2CprotoProps)%3Bif(staticProps)defineProperties(Constructor%2CstaticProps)%3Breturn%20Constructor%3B%7D%3B%7D()%3Bfunction%20_classCallCheck(instance%2CConstructor)%7Bif(!(instance%20instanceof%20Constructor))%7Bthrow%20new%20TypeError(%22Cannot%20call%20a%20class%20as%20a%20function%22)%3B%7D%7D(function()%7B'use%20strict'%3Bvar%20p%3DElement.prototype%3B%2F**%0A%20%20%20*%20%40const%20%7Bfunction(this%3ANode%2C%20string)%3A%20boolean%7D%0A%20%20%20*%2Fvar%20normalizedMatchesSelector%3Dp.matches%7C%7Cp.matchesSelector%7C%7Cp.mozMatchesSelector%7C%7Cp.msMatchesSelector%7C%7Cp.oMatchesSelector%7C%7Cp.webkitMatchesSelector%3B%2F**%0A%20%20%20*%20Cross-platform%20%60element.matches%60%20shim.%0A%20%20%20*%0A%20%20%20*%20%40function%20matchesSelector%0A%20%20%20*%20%40memberof%20Polymer.dom%0A%20%20%20*%20%40param%20%7B!Node%7D%20node%20Node%20to%20check%20selector%20against%0A%20%20%20*%20%40param%20%7Bstring%7D%20selector%20Selector%20to%20match%0A%20%20%20*%20%40return%20%7Bboolean%7D%20True%20if%20node%20matched%20selector%0A%20%20%20*%2Fvar%20matchesSelector%3Dfunction%20matchesSelector(node%2Cselector)%7Breturn%20normalizedMatchesSelector.call(node%2Cselector)%3B%7D%3B%2F**%0A%20%20%20*%20Node%20API%20wrapper%20class%20returned%20from%20%60Polymer.dom.(target)%60%20when%0A%20%20%20*%20%60target%60%20is%20a%20%60Node%60.%0A%20%20%20*%0A%20%20%20*%20%40memberof%20Polymer%0A%20%20%20*%2Fvar%20DomApi%3Dfunction()%7B%2F**%0A%20%20%20%20%20*%20%40param%20%7BNode%7D%20node%20Node%20for%20which%20to%20create%20a%20Polymer.dom%20helper%20object.%0A%20%20%20%20%20*%2Ffunction%20DomApi(node)%7B_classCallCheck(this%2CDomApi)%3Bthis.node%3Dnode%3B%7D%2F**%0A%20%20%20%20%20*%20Returns%20an%20instance%20of%20%60Polymer.FlattenedNodesObserver%60%20that%0A%20%20%20%20%20*%20listens%20for%20node%20changes%20on%20this%20element.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40param%20%7Bfunction(!Element%2C%20%7B%20target%3A%20!Element%2C%20addedNodes%3A%20!Array%3C!Element%3E%2C%20removedNodes%3A%20!Array%3C!Element%3E%20%7D)%3Avoid%7D%20callback%20Called%20when%20direct%20or%20distributed%20children%0A%20%20%20%20%20*%20%20%20of%20this%20element%20changes%0A%20%20%20%20%20*%20%40return%20%7B!Polymer.FlattenedNodesObserver%7D%20Observer%20instance%0A%20%20%20%20%20*%2F_createClass(DomApi%2C%5B%7Bkey%3A'observeNodes'%2Cvalue%3Afunction%20observeNodes(callback)%7Breturn%20new%20Polymer.FlattenedNodesObserver(this.node%2Ccallback)%3B%7D%2F**%0A%20%20%20%20%20*%20Disconnects%20an%20observer%20previously%20created%20via%20%60observeNodes%60%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40param%20%7B!Polymer.FlattenedNodesObserver%7D%20observerHandle%20Observer%20instance%0A%20%20%20%20%20*%20%20%20to%20disconnect.%0A%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'unobserveNodes'%2Cvalue%3Afunction%20unobserveNodes(observerHandle)%7BobserverHandle.disconnect()%3B%7D%2F**%0A%20%20%20%20%20*%20Provided%20as%20a%20backwards-compatible%20API%20only.%20%20This%20method%20does%20nothing.%0A%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'notifyObserver'%2Cvalue%3Afunction%20notifyObserver()%7B%7D%2F**%0A%20%20%20%20%20*%20Returns%20true%20if%20the%20provided%20node%20is%20contained%20with%20this%20element's%0A%20%20%20%20%20*%20light-DOM%20children%20or%20shadow%20root%2C%20including%20any%20nested%20shadow%20roots%0A%20%20%20%20%20*%20of%20children%20therein.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40param%20%7BNode%7D%20node%20Node%20to%20test%0A%20%20%20%20%20*%20%40return%20%7Bboolean%7D%20Returns%20true%20if%20the%20given%20%60node%60%20is%20contained%20within%0A%20%20%20%20%20*%20%20%20this%20element's%20light%20or%20shadow%20DOM.%0A%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'deepContains'%2Cvalue%3Afunction%20deepContains(node)%7Bif(this.node.contains(node))%7Breturn%20true%3B%7Dvar%20n%3Dnode%3Bvar%20doc%3Dnode.ownerDocument%3B%2F%2F%20walk%20from%20node%20to%20%60this%60%20or%20%60document%60%0Awhile(n%26%26n!%3D%3Ddoc%26%26n!%3D%3Dthis.node)%7B%2F%2F%20use%20logical%20parentnode%2C%20or%20native%20ShadowRoot%20host%0An%3Dn.parentNode%7C%7Cn.host%3B%7Dreturn%20n%3D%3D%3Dthis.node%3B%7D%2F**%0A%20%20%20%20%20*%20Returns%20the%20root%20node%20of%20this%20node.%20%20Equivalent%20to%20%60getRoodNode()%60.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40return%20%7BNode%7D%20Top%20most%20element%20in%20the%20dom%20tree%20in%20which%20the%20node%0A%20%20%20%20%20*%20exists.%20If%20the%20node%20is%20connected%20to%20a%20document%20this%20is%20either%20a%0A%20%20%20%20%20*%20shadowRoot%20or%20the%20document%3B%20otherwise%2C%20it%20may%20be%20the%20node%0A%20%20%20%20%20*%20itself%20or%20a%20node%20or%20document%20fragment%20containing%20it.%0A%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'getOwnerRoot'%2Cvalue%3Afunction%20getOwnerRoot()%7Breturn%20this.node.getRootNode()%3B%7D%2F**%0A%20%20%20%20%20*%20For%20slot%20elements%2C%20returns%20the%20nodes%20assigned%20to%20the%20slot%3B%20otherwise%0A%20%20%20%20%20*%20an%20empty%20array.%20It%20is%20equivalent%20to%20%60%3Cslot%3E.addignedNodes(%7Bflatten%3Atrue%7D)%60.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40return%20%7B!Array%3C!Node%3E%7D%20Array%20of%20assigned%20nodes%0A%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'getDistributedNodes'%2Cvalue%3Afunction%20getDistributedNodes()%7Breturn%20this.node.localName%3D%3D%3D'slot'%3Fthis.node.assignedNodes(%7Bflatten%3Atrue%7D)%3A%5B%5D%3B%7D%2F**%0A%20%20%20%20%20*%20Returns%20an%20array%20of%20all%20slots%20this%20element%20was%20distributed%20to.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40return%20%7B!Array%3C!HTMLSlotElement%3E%7D%20Description%0A%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'getDestinationInsertionPoints'%2Cvalue%3Afunction%20getDestinationInsertionPoints()%7Bvar%20ip%24%3D%5B%5D%3Bvar%20n%3Dthis.node.assignedSlot%3Bwhile(n)%7Bip%24.push(n)%3Bn%3Dn.assignedSlot%3B%7Dreturn%20ip%24%3B%7D%2F**%0A%20%20%20%20%20*%20Calls%20%60importNode%60%20on%20the%20%60ownerDocument%60%20for%20this%20node.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40param%20%7B!Node%7D%20node%20Node%20to%20import%0A%20%20%20%20%20*%20%40param%20%7Bboolean%7D%20deep%20True%20if%20the%20node%20should%20be%20cloned%20deeply%20during%0A%20%20%20%20%20*%20%20%20import%0A%20%20%20%20%20*%20%40return%20%7BNode%7D%20Clone%20of%20given%20node%20imported%20to%20this%20owner%20document%0A%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'importNode'%2Cvalue%3Afunction%20importNode(node%2Cdeep)%7Bvar%20doc%3Dthis.node%20instanceof%20Document%3Fthis.node%3Athis.node.ownerDocument%3Breturn%20doc.importNode(node%2Cdeep)%3B%7D%2F**%0A%20%20%20%20%20*%20%40return%20%7B!Array%3C!Node%3E%7D%20Returns%20a%20flattened%20list%20of%20all%20child%20nodes%20and%0A%20%20%20%20%20*%20nodes%20assigned%20to%20child%20slots.%0A%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'getEffectiveChildNodes'%2Cvalue%3Afunction%20getEffectiveChildNodes()%7Breturn%20Polymer.FlattenedNodesObserver.getFlattenedNodes(this.node)%3B%7D%2F**%0A%20%20%20%20%20*%20Returns%20a%20filtered%20list%20of%20flattened%20child%20elements%20for%20this%20element%20based%0A%20%20%20%20%20*%20on%20the%20given%20selector.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40param%20%7Bstring%7D%20selector%20Selector%20to%20filter%20nodes%20against%0A%20%20%20%20%20*%20%40return%20%7B!Array%3C!HTMLElement%3E%7D%20List%20of%20flattened%20child%20elements%0A%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'queryDistributedElements'%2Cvalue%3Afunction%20queryDistributedElements(selector)%7Bvar%20c%24%3Dthis.getEffectiveChildNodes()%3Bvar%20list%3D%5B%5D%3Bfor(var%20i%3D0%2Cl%3Dc%24.length%2Cc%3Bi%3Cl%26%26(c%3Dc%24%5Bi%5D)%3Bi%2B%2B)%7Bif(c.nodeType%3D%3D%3DNode.ELEMENT_NODE%26%26matchesSelector(c%2Cselector))%7Blist.push(c)%3B%7D%7Dreturn%20list%3B%7D%2F**%0A%20%20%20%20%20*%20For%20shadow%20roots%2C%20returns%20the%20currently%20focused%20element%20within%20this%0A%20%20%20%20%20*%20shadow%20root.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40return%20%7BNode%7Cundefined%7D%20Currently%20focused%20element%0A%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'activeElement'%2Cget%3Afunction%20get()%7Bvar%20node%3Dthis.node%3Breturn%20node._activeElement!%3D%3Dundefined%3Fnode._activeElement%3Anode.activeElement%3B%7D%7D%5D)%3Breturn%20DomApi%3B%7D()%3Bfunction%20forwardMethods(proto%2Cmethods)%7Bvar%20_loop%3Dfunction%20_loop(i)%7Bvar%20method%3Dmethods%5Bi%5D%3B%2F*%20eslint-disable%20valid-jsdoc%20*%2Fproto%5Bmethod%5D%3D%2F**%20%40this%20%7BDomApi%7D%20*%2Ffunction()%7Breturn%20this.node%5Bmethod%5D.apply(this.node%2Carguments)%3B%7D%3B%2F*%20eslint-enable%20*%2F%7D%3Bfor(var%20i%3D0%3Bi%3Cmethods.length%3Bi%2B%2B)%7B_loop(i)%3B%7D%7Dfunction%20forwardReadOnlyProperties(proto%2Cproperties)%7Bvar%20_loop2%3Dfunction%20_loop2(i)%7Bvar%20name%3Dproperties%5Bi%5D%3BObject.defineProperty(proto%2Cname%2C%7Bget%3Afunction%20get()%7Bvar%20domApi%3D%2F**%20%40type%20%7BDomApi%7D%20*%2Fthis%3Breturn%20domApi.node%5Bname%5D%3B%7D%2Cconfigurable%3Atrue%7D)%3B%7D%3Bfor(var%20i%3D0%3Bi%3Cproperties.length%3Bi%2B%2B)%7B_loop2(i)%3B%7D%7Dfunction%20forwardProperties(proto%2Cproperties)%7Bvar%20_loop3%3Dfunction%20_loop3(i)%7Bvar%20name%3Dproperties%5Bi%5D%3BObject.defineProperty(proto%2Cname%2C%7Bget%3Afunction%20get()%7Bvar%20domApi%3D%2F**%20%40type%20%7BDomApi%7D%20*%2Fthis%3Breturn%20domApi.node%5Bname%5D%3B%7D%2Cset%3Afunction%20set(value)%7B%2F**%20%40type%20%7BDomApi%7D%20*%2Fthis.node%5Bname%5D%3Dvalue%3B%7D%2Cconfigurable%3Atrue%7D)%3B%7D%3Bfor(var%20i%3D0%3Bi%3Cproperties.length%3Bi%2B%2B)%7B_loop3(i)%3B%7D%7DforwardMethods(DomApi.prototype%2C%5B'cloneNode'%2C'appendChild'%2C'insertBefore'%2C'removeChild'%2C'replaceChild'%2C'setAttribute'%2C'removeAttribute'%2C'querySelector'%2C'querySelectorAll'%5D)%3BforwardReadOnlyProperties(DomApi.prototype%2C%5B'parentNode'%2C'firstChild'%2C'lastChild'%2C'nextSibling'%2C'previousSibling'%2C'firstElementChild'%2C'lastElementChild'%2C'nextElementSibling'%2C'previousElementSibling'%2C'childNodes'%2C'children'%2C'classList'%5D)%3BforwardProperties(DomApi.prototype%2C%5B'textContent'%2C'innerHTML'%5D)%3B%2F**%0A%20%20%20*%20Event%20API%20wrapper%20class%20returned%20from%20%60Polymer.dom.(target)%60%20when%0A%20%20%20*%20%60target%60%20is%20an%20%60Event%60.%0A%20%20%20*%2Fvar%20EventApi%3Dfunction()%7Bfunction%20EventApi(event)%7B_classCallCheck(this%2CEventApi)%3Bthis.event%3Devent%3B%7D%2F**%0A%20%20%20%20%20*%20Returns%20the%20first%20node%20on%20the%20%60composedPath%60%20of%20this%20event.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40return%20%7B!EventTarget%7D%20The%20node%20this%20event%20was%20dispatched%20to%0A%20%20%20%20%20*%2F_createClass(EventApi%2C%5B%7Bkey%3A'rootTarget'%2Cget%3Afunction%20get()%7Breturn%20this.event.composedPath()%5B0%5D%3B%7D%2F**%0A%20%20%20%20%20*%20Returns%20the%20local%20(re-targeted)%20target%20for%20this%20event.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40return%20%7B!EventTarget%7D%20The%20local%20(re-targeted)%20target%20for%20this%20event.%0A%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'localTarget'%2Cget%3Afunction%20get()%7Breturn%20this.event.target%3B%7D%2F**%0A%20%20%20%20%20*%20Returns%20the%20%60composedPath%60%20for%20this%20event.%0A%20%20%20%20%20*%20%40return%20%7B!Array%3C!EventTarget%3E%7D%20The%20nodes%20this%20event%20propagated%20through%0A%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'path'%2Cget%3Afunction%20get()%7Breturn%20this.event.composedPath()%3B%7D%7D%5D)%3Breturn%20EventApi%3B%7D()%3BPolymer.DomApi%3DDomApi%3B%2F**%0A%20%20%20*%20%40function%0A%20%20%20*%20%40param%20%7Bboolean%3D%7D%20deep%0A%20%20%20*%20%40return%20%7B!Node%7D%0A%20%20%20*%2FPolymer.DomApi.prototype.cloneNode%3B%2F**%0A%20%20%20*%20%40function%0A%20%20%20*%20%40param%20%7B!Node%7D%20node%0A%20%20%20*%20%40return%20%7B!Node%7D%0A%20%20%20*%2FPolymer.DomApi.prototype.appendChild%3B%2F**%0A%20%20%20*%20%40function%0A%20%20%20*%20%40param%20%7B!Node%7D%20newChild%0A%20%20%20*%20%40param%20%7BNode%7D%20refChild%0A%20%20%20*%20%40return%20%7B!Node%7D%0A%20%20%20*%2FPolymer.DomApi.prototype.insertBefore%3B%2F**%0A%20%20%20*%20%40function%0A%20%20%20*%20%40param%20%7B!Node%7D%20node%0A%20%20%20*%20%40return%20%7B!Node%7D%0A%20%20%20*%2FPolymer.DomApi.prototype.removeChild%3B%2F**%0A%20%20%20*%20%40function%0A%20%20%20*%20%40param%20%7B!Node%7D%20oldChild%0A%20%20%20*%20%40param%20%7B!Node%7D%20newChild%0A%20%20%20*%20%40return%20%7B!Node%7D%0A%20%20%20*%2FPolymer.DomApi.prototype.replaceChild%3B%2F**%0A%20%20%20*%20%40function%0A%20%20%20*%20%40param%20%7Bstring%7D%20name%0A%20%20%20*%20%40param%20%7Bstring%7D%20value%0A%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20*%2FPolymer.DomApi.prototype.setAttribute%3B%2F**%0A%20%20%20*%20%40function%0A%20%20%20*%20%40param%20%7Bstring%7D%20name%0A%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20*%2FPolymer.DomApi.prototype.removeAttribute%3B%2F**%0A%20%20%20*%20%40function%0A%20%20%20*%20%40param%20%7Bstring%7D%20selector%0A%20%20%20*%20%40return%20%7B%3FElement%7D%0A%20%20%20*%2FPolymer.DomApi.prototype.querySelector%3B%2F**%0A%20%20%20*%20%40function%0A%20%20%20*%20%40param%20%7Bstring%7D%20selector%0A%20%20%20*%20%40return%20%7B!NodeList%3C!Element%3E%7D%0A%20%20%20*%2FPolymer.DomApi.prototype.querySelectorAll%3B%2F**%0A%20%20%20*%20Legacy%20DOM%20and%20Event%20manipulation%20API%20wrapper%20factory%20used%20to%20abstract%0A%20%20%20*%20differences%20between%20native%20Shadow%20DOM%20and%20%22Shady%20DOM%22%20when%20polyfilling%20on%0A%20%20%20*%20older%20browsers.%0A%20%20%20*%0A%20%20%20*%20Note%20that%20in%20Polymer%202.x%20use%20of%20%60Polymer.dom%60%20is%20no%20longer%20required%20and%0A%20%20%20*%20in%20the%20majority%20of%20cases%20simply%20facades%20directly%20to%20the%20standard%20native%0A%20%20%20*%20API.%0A%20%20%20*%0A%20%20%20*%20%40namespace%0A%20%20%20*%20%40summary%20Legacy%20DOM%20and%20Event%20manipulation%20API%20wrapper%20factory%20used%20to%0A%20%20%20*%20abstract%20differences%20between%20native%20Shadow%20DOM%20and%20%22Shady%20DOM.%22%0A%20%20%20*%20%40memberof%20Polymer%0A%20%20%20*%20%40param%20%7B(Node%7CEvent)%3D%7D%20obj%20Node%20or%20event%20to%20operate%20on%0A%20%20%20*%20%40return%20%7B!DomApi%7C!EventApi%7D%20Wrapper%20providing%20either%20node%20API%20or%20event%20API%0A%20%20%20*%2FPolymer.dom%3Dfunction(obj)%7Bobj%3Dobj%7C%7Cdocument%3Bif(!obj.__domApi)%7Bvar%20helper%3Dvoid%200%3Bif(obj%20instanceof%20Event)%7Bhelper%3Dnew%20EventApi(obj)%3B%7Delse%7Bhelper%3Dnew%20DomApi(obj)%3B%7Dobj.__domApi%3Dhelper%3B%7Dreturn%20obj.__domApi%3B%7D%3BPolymer.dom.matchesSelector%3DmatchesSelector%3B%2F**%0A%20%20%20*%20Forces%20several%20classes%20of%20asynchronously%20queued%20tasks%20to%20flush%3A%0A%20%20%20*%20-%20Debouncers%20added%20via%20%60Polymer.enqueueDebouncer%60%0A%20%20%20*%20-%20ShadyDOM%20distribution%0A%20%20%20*%0A%20%20%20*%20This%20method%20facades%20to%20%60Polymer.flush%60.%0A%20%20%20*%0A%20%20%20*%20%40memberof%20Polymer.dom%0A%20%20%20*%2FPolymer.dom.flush%3DPolymer.flush%3B%2F**%0A%20%20%20*%20Adds%20a%20%60Polymer.Debouncer%60%20to%20a%20list%20of%20globally%20flushable%20tasks.%0A%20%20%20*%0A%20%20%20*%20This%20method%20facades%20to%20%60Polymer.enqueueDebouncer%60.%0A%20%20%20*%0A%20%20%20*%20%40memberof%20Polymer.dom%0A%20%20%20*%20%40param%20%7B!Polymer.Debouncer%7D%20debouncer%20Debouncer%20to%20enqueue%0A%20%20%20*%2FPolymer.dom.addDebouncer%3DPolymer.enqueueDebouncer%3B%7D)()%3B%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Fcpt-static.gannettdigital.com%2Funiversal-web-client%2Fmaster%2Flatest%2Fvendor%2Fcomponents%2Fpolymer%2Flib%2Flegacy%2Fpolymer.dom.html.js%0A | 11 kB | 2023-03-07 | 2024-01-25 | |
Pretty
Loading... | ||||
http:text/javascript;charset=utf-8,(function()%7B'use%20strict'%3B%2F**%0A%20%20%20*%20Base%20class%20that%20provides%20the%20core%20API%20for%20Polymer's%20meta-programming%0A%20%20%20*%20features%20including%20template%20stamping%2C%20data-binding%2C%20attribute%20deserialization%2C%0A%20%20%20*%20and%20property%20change%20observation.%0A%20%20%20*%0A%20%20%20*%20%40customElement%0A%20%20%20*%20%40memberof%20Polymer%0A%20%20%20*%20%40constructor%0A%20%20%20*%20%40implements%20%7BPolymer_ElementMixin%7D%0A%20%20%20*%20%40extends%20%7BHTMLElement%7D%0A%20%20%20*%20%40appliesMixin%20Polymer.ElementMixin%0A%20%20%20*%20%40summary%20Custom%20element%20base%20class%20that%20provides%20the%20core%20API%20for%20Polymer's%0A%20%20%20*%20%20%20key%20meta-programming%20features%20including%20template%20stamping%2C%20data-binding%2C%0A%20%20%20*%20%20%20attribute%20deserialization%2C%20and%20property%20change%20observation%0A%20%20%20*%2FPolymer.Element%3DPolymer.ElementMixin(HTMLElement)%3B%2F%2F%20NOTE%3A%20this%20is%20here%20for%20modulizer%20to%20export%20%60html%60%20for%20the%20module%20version%20of%20this%20file%0APolymer.html%3DPolymer.html%3B%7D)()%3B%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Fcpt-static.gannettdigital.com%2Funiversal-web-client%2Fmaster%2Flatest%2Fvendor%2Fcomponents%2Fpolymer%2Fpolymer-element.html.js%0A | 939 B | 2023-03-07 | 2024-01-25 | |
Pretty
Loading... | ||||
http:text/javascript;charset=utf-8,%0A%20%20'use%20strict'%3B%0A%0A%20%20Polymer(%7B%0A%20%20%20%20is%3A%20'iron-request'%2C%0A%0A%20%20%20%20hostAttributes%3A%20%7B%0A%20%20%20%20%20%20hidden%3A%20true%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20properties%3A%20%7B%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20A%20reference%20to%20the%20XMLHttpRequest%20instance%20used%20to%20generate%20the%0A%20%20%20%20%20%20%20*%20network%20request.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40type%20%7BXMLHttpRequest%7D%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20xhr%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Object%2C%0A%20%20%20%20%20%20%20%20notify%3A%20true%2C%0A%20%20%20%20%20%20%20%20readOnly%3A%20true%2C%0A%20%20%20%20%20%20%20%20value%3A%20function()%20%7B%0A%20%20%20%20%20%20%20%20%20%20return%20new%20XMLHttpRequest()%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20A%20reference%20to%20the%20parsed%20response%20body%2C%20if%20the%20%60xhr%60%20has%20completely%0A%20%20%20%20%20%20%20*%20resolved.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40type%20%7B*%7D%0A%20%20%20%20%20%20%20*%20%40default%20null%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20response%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Object%2C%0A%20%20%20%20%20%20%20%20notify%3A%20true%2C%0A%20%20%20%20%20%20%20%20readOnly%3A%20true%2C%0A%20%20%20%20%20%20%20%20value%3A%20function()%20%7B%0A%20%20%20%20%20%20%20%20%20%20return%20null%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20A%20reference%20to%20the%20status%20code%2C%20if%20the%20%60xhr%60%20has%20completely%20resolved.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20status%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Number%2C%0A%20%20%20%20%20%20%20%20notify%3A%20true%2C%0A%20%20%20%20%20%20%20%20readOnly%3A%20true%2C%0A%20%20%20%20%20%20%20%20value%3A%200%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20A%20reference%20to%20the%20status%20text%2C%20if%20the%20%60xhr%60%20has%20completely%20resolved.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20statusText%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20String%2C%0A%20%20%20%20%20%20%20%20notify%3A%20true%2C%0A%20%20%20%20%20%20%20%20readOnly%3A%20true%2C%0A%20%20%20%20%20%20%20%20value%3A%20''%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20A%20promise%20that%20resolves%20when%20the%20%60xhr%60%20response%20comes%20back%2C%20or%20rejects%0A%20%20%20%20%20%20%20*%20if%20there%20is%20an%20error%20before%20the%20%60xhr%60%20completes.%0A%20%20%20%20%20%20%20*%20The%20resolve%20callback%20is%20called%20with%20the%20original%20request%20as%20an%20argument.%0A%20%20%20%20%20%20%20*%20By%20default%2C%20the%20reject%20callback%20is%20called%20with%20an%20%60Error%60%20as%20an%20argument.%0A%20%20%20%20%20%20%20*%20If%20%60rejectWithRequest%60%20is%20true%2C%20the%20reject%20callback%20is%20called%20with%20an%0A%20%20%20%20%20%20%20*%20object%20with%20two%20keys%3A%20%60request%60%2C%20the%20original%20request%2C%20and%20%60error%60%2C%20the%0A%20%20%20%20%20%20%20*%20error%20object.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40type%20%7BPromise%7D%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20completes%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Object%2C%0A%20%20%20%20%20%20%20%20readOnly%3A%20true%2C%0A%20%20%20%20%20%20%20%20notify%3A%20true%2C%0A%20%20%20%20%20%20%20%20value%3A%20function()%20%7B%0A%20%20%20%20%20%20%20%20%20%20return%20new%20Promise(function(resolve%2C%20reject)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20this.resolveCompletes%20%3D%20resolve%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20this.rejectCompletes%20%3D%20reject%3B%0A%20%20%20%20%20%20%20%20%20%20%7D.bind(this))%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20An%20object%20that%20contains%20progress%20information%20emitted%20by%20the%20XHR%20if%0A%20%20%20%20%20%20%20*%20available.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40default%20%7B%7D%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20progress%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Object%2C%0A%20%20%20%20%20%20%20%20notify%3A%20true%2C%0A%20%20%20%20%20%20%20%20readOnly%3A%20true%2C%0A%20%20%20%20%20%20%20%20value%3A%20function()%20%7B%0A%20%20%20%20%20%20%20%20%20%20return%20%7B%7D%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20Aborted%20will%20be%20true%20if%20an%20abort%20of%20the%20request%20is%20attempted.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20aborted%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Boolean%2C%0A%20%20%20%20%20%20%20%20notify%3A%20true%2C%0A%20%20%20%20%20%20%20%20readOnly%3A%20true%2C%0A%20%20%20%20%20%20%20%20value%3A%20false%2C%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20Errored%20will%20be%20true%20if%20the%20browser%20fired%20an%20error%20event%20from%20the%0A%20%20%20%20%20%20%20*%20XHR%20object%20(mainly%20network%20errors).%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20errored%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Boolean%2C%0A%20%20%20%20%20%20%20%20notify%3A%20true%2C%0A%20%20%20%20%20%20%20%20readOnly%3A%20true%2C%0A%20%20%20%20%20%20%20%20value%3A%20false%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20TimedOut%20will%20be%20true%20if%20the%20XHR%20threw%20a%20timeout%20event.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20timedOut%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Boolean%2C%0A%20%20%20%20%20%20%20%20notify%3A%20true%2C%0A%20%20%20%20%20%20%20%20readOnly%3A%20true%2C%0A%20%20%20%20%20%20%20%20value%3A%20false%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20Succeeded%20is%20true%20if%20the%20request%20succeeded.%20The%20request%20succeeded%20if%20it%0A%20%20%20%20%20*%20loaded%20without%20error%2C%20wasn't%20aborted%2C%20and%20the%20status%20code%20is%20%E2%89%A5%20200%2C%20and%0A%20%20%20%20%20*%20%3C%20300%2C%20or%20if%20the%20status%20code%20is%200.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20The%20status%20code%200%20is%20accepted%20as%20a%20success%20because%20some%20schemes%20-%20e.g.%0A%20%20%20%20%20*%20file%3A%2F%2F%20-%20don't%20provide%20status%20codes.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40return%20%7Bboolean%7D%0A%20%20%20%20%20*%2F%0A%20%20%20%20get%20succeeded()%20%7B%0A%20%20%20%20%20%20if%20(this.errored%20%7C%7C%20this.aborted%20%7C%7C%20this.timedOut)%20%7B%0A%20%20%20%20%20%20%20%20return%20false%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20var%20status%20%3D%20this.xhr.status%20%7C%7C%200%3B%0A%0A%20%20%20%20%20%20%2F%2F%20Note%3A%20if%20we%20are%20using%20the%20file%3A%2F%2F%20protocol%2C%20the%20status%20code%20will%20be%200%0A%20%20%20%20%20%20%2F%2F%20for%20all%20outcomes%20(successful%20or%20otherwise).%0A%20%20%20%20%20%20return%20status%20%3D%3D%3D%200%20%7C%7C%0A%20%20%20%20%20%20%20%20(status%20%3E%3D%20200%20%26%26%20status%20%3C%20300)%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20Sends%20an%20HTTP%20request%20to%20the%20server%20and%20returns%20a%20promise%20(see%20the%20%60completes%60%0A%20%20%20%20%20*%20property%20for%20details).%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20The%20handling%20of%20the%20%60body%60%20parameter%20will%20vary%20based%20on%20the%20Content-Type%0A%20%20%20%20%20*%20header.%20See%20the%20docs%20for%20iron-ajax's%20%60body%60%20property%20for%20details.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40param%20%7B%7B%0A%20%20%20%20%20*%20%20%20url%3A%20string%2C%0A%20%20%20%20%20*%20%20%20method%3A%20(string%7Cundefined)%2C%0A%20%20%20%20%20*%20%20%20async%3A%20(boolean%7Cundefined)%2C%0A%20%20%20%20%20*%20%20%20body%3A%20(ArrayBuffer%7CArrayBufferView%7CBlob%7CDocument%7CFormData%7Cnull%7Cstring%7Cundefined%7CObject)%2C%0A%20%20%20%20%20*%20%20%20headers%3A%20(Object%7Cundefined)%2C%0A%20%20%20%20%20*%20%20%20handleAs%3A%20(string%7Cundefined)%2C%0A%20%20%20%20%20*%20%20%20jsonPrefix%3A%20(string%7Cundefined)%2C%0A%20%20%20%20%20*%20%20%20withCredentials%3A%20(boolean%7Cundefined)%2C%0A%20%20%20%20%20*%20%20%20timeout%3A%20(Number%7Cundefined)%2C%0A%20%20%20%20%20*%20%20%20rejectWithRequest%3A%20(boolean%7Cundefined)%7D%7D%20options%20-%0A%20%20%20%20%20*%20%20%20-%20url%20The%20url%20to%20which%20the%20request%20is%20sent.%0A%20%20%20%20%20*%20%20%20-%20method%20The%20HTTP%20method%20to%20use%2C%20default%20is%20GET.%0A%20%20%20%20%20*%20%20%20-%20async%20By%20default%2C%20all%20requests%20are%20sent%20asynchronously.%20To%20send%20synchronous%20requests%2C%0A%20%20%20%20%20*%20%20%20%20%20%20%20%20%20set%20to%20false.%0A%20%20%20%20%20*%20%20%20-%20%20body%20The%20content%20for%20the%20request%20body%20for%20POST%20method.%0A%20%20%20%20%20*%20%20%20-%20%20headers%20HTTP%20request%20headers.%0A%20%20%20%20%20*%20%20%20-%20%20handleAs%20The%20response%20type.%20Default%20is%20'text'.%0A%20%20%20%20%20*%20%20%20-%20%20withCredentials%20Whether%20or%20not%20to%20send%20credentials%20on%20the%20request.%20Default%20is%20false.%0A%20%20%20%20%20*%20%20%20-%20%20timeout%20-%20Timeout%20for%20request%2C%20in%20milliseconds.%0A%20%20%20%20%20*%20%20%20-%20%20rejectWithRequest%20Set%20to%20true%20to%20include%20the%20request%20object%20with%20promise%20rejections.%0A%20%20%20%20%20*%20%40return%20%7BPromise%7D%0A%20%20%20%20%20*%2F%0A%20%20%20%20send%3A%20function(options)%20%7B%0A%20%20%20%20%20%20var%20xhr%20%3D%20this.xhr%3B%0A%0A%20%20%20%20%20%20if%20(xhr.readyState%20%3E%200)%20%7B%0A%20%20%20%20%20%20%20%20return%20null%3B%0A%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20xhr.addEventListener('progress'%2C%20function(progress)%20%7B%0A%20%20%20%20%20%20%20%20this._setProgress(%7B%0A%20%20%20%20%20%20%20%20%20%20lengthComputable%3A%20progress.lengthComputable%2C%0A%20%20%20%20%20%20%20%20%20%20loaded%3A%20progress.loaded%2C%0A%20%20%20%20%20%20%20%20%20%20total%3A%20progress.total%0A%20%20%20%20%20%20%20%20%7D)%3B%0A%0A%20%20%20%20%20%20%20%20%2F%2F%20Webcomponents%20v1%20spec%20does%20not%20fire%20*-changed%20events%20when%20not%20connected%0A%20%20%20%20%20%20%20%20this.fire('iron-request-progress-changed'%2C%20%7B%20value%3A%20this.progress%20%7D)%3B%0A%20%20%20%20%20%20%7D.bind(this))%0A%0A%20%20%20%20%20%20xhr.addEventListener('error'%2C%20function(error)%20%7B%0A%20%20%20%20%20%20%20%20this._setErrored(true)%3B%0A%20%20%20%20%20%20%20%20this._updateStatus()%3B%0A%20%20%20%20%20%20%20%20var%20response%20%3D%20options.rejectWithRequest%20%3F%20%7B%0A%20%20%20%20%20%20%20%20%20%20error%3A%20error%2C%0A%20%20%20%20%20%20%20%20%20%20request%3A%20this%0A%20%20%20%20%20%20%20%20%7D%20%3A%20error%3B%0A%20%20%20%20%20%20%20%20this.rejectCompletes(response)%3B%0A%20%20%20%20%20%20%7D.bind(this))%3B%0A%0A%20%20%20%20%20%20xhr.addEventListener('timeout'%2C%20function(error)%20%7B%0A%20%20%20%20%20%20%20%20this._setTimedOut(true)%3B%0A%20%20%20%20%20%20%20%20this._updateStatus()%3B%0A%20%20%20%20%20%20%20%20var%20response%20%3D%20options.rejectWithRequest%20%3F%20%7B%0A%20%20%20%20%20%20%20%20%20%20error%3A%20error%2C%0A%20%20%20%20%20%20%20%20%20%20request%3A%20this%0A%20%20%20%20%20%20%20%20%7D%20%3A%20error%3B%0A%20%20%20%20%20%20%20%20this.rejectCompletes(response)%3B%0A%20%20%20%20%20%20%7D.bind(this))%3B%0A%0A%20%20%20%20%20%20xhr.addEventListener('abort'%2C%20function()%20%7B%0A%20%20%20%20%20%20%20%20this._setAborted(true)%3B%0A%20%20%20%20%20%20%20%20this._updateStatus()%3B%0A%20%20%20%20%20%20%20%20var%20error%20%3D%20new%20Error('Request%20aborted.')%3B%0A%20%20%20%20%20%20%20%20var%20response%20%3D%20options.rejectWithRequest%20%3F%20%7B%0A%20%20%20%20%20%20%20%20%20%20error%3A%20error%2C%0A%20%20%20%20%20%20%20%20%20%20request%3A%20this%0A%20%20%20%20%20%20%20%20%7D%20%3A%20error%3B%0A%20%20%20%20%20%20%20%20this.rejectCompletes(response)%3B%0A%20%20%20%20%20%20%7D.bind(this))%3B%0A%0A%20%20%20%20%20%20%2F%2F%20Called%20after%20all%20of%20the%20above.%0A%20%20%20%20%20%20xhr.addEventListener('loadend'%2C%20function()%20%7B%0A%20%20%20%20%20%20%20%20this._updateStatus()%3B%0A%20%20%20%20%20%20%20%20this._setResponse(this.parseResponse())%3B%0A%0A%20%20%20%20%20%20%20%20if%20(!this.succeeded)%20%7B%0A%20%20%20%20%20%20%20%20%20%20var%20error%20%3D%20new%20Error('The%20request%20failed%20with%20status%20code%3A%20'%20%2B%20this.xhr.status)%3B%0A%20%20%20%20%20%20%20%20%20%20var%20response%20%3D%20options.rejectWithRequest%20%3F%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20error%3A%20error%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20request%3A%20this%0A%20%20%20%20%20%20%20%20%20%20%7D%20%3A%20error%3B%0A%20%20%20%20%20%20%20%20%20%20this.rejectCompletes(response)%3B%0A%20%20%20%20%20%20%20%20%20%20return%3B%0A%20%20%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20%20%20this.resolveCompletes(this)%3B%0A%20%20%20%20%20%20%7D.bind(this))%3B%0A%0A%20%20%20%20%20%20this.url%20%3D%20options.url%3B%0A%20%20%20%20%20%20var%20isXHRAsync%20%3D%20options.async%20!%3D%3D%20false%3B%0A%20%20%20%20%20%20xhr.open(%0A%20%20%20%20%20%20%20%20options.method%20%7C%7C%20'GET'%2C%0A%20%20%20%20%20%20%20%20options.url%2C%0A%20%20%20%20%20%20%20%20isXHRAsync%0A%20%20%20%20%20%20)%3B%0A%0A%20%20%20%20%20%20var%20acceptType%20%3D%20%7B%0A%20%20%20%20%20%20%20%20'json'%3A%20'application%2Fjson'%2C%0A%20%20%20%20%20%20%20%20'text'%3A%20'text%2Fplain'%2C%0A%20%20%20%20%20%20%20%20'html'%3A%20'text%2Fhtml'%2C%0A%20%20%20%20%20%20%20%20'xml'%3A%20'application%2Fxml'%2C%0A%20%20%20%20%20%20%20%20'arraybuffer'%3A%20'application%2Foctet-stream'%0A%20%20%20%20%20%20%7D%5Boptions.handleAs%5D%3B%0A%20%20%20%20%20%20var%20headers%20%3D%20options.headers%20%7C%7C%20Object.create(null)%3B%0A%20%20%20%20%20%20var%20newHeaders%20%3D%20Object.create(null)%3B%0A%20%20%20%20%20%20for%20(var%20key%20in%20headers)%20%7B%0A%20%20%20%20%20%20%20%20newHeaders%5Bkey.toLowerCase()%5D%20%3D%20headers%5Bkey%5D%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20headers%20%3D%20newHeaders%3B%0A%0A%20%20%20%20%20%20if%20(acceptType%20%26%26%20!headers%5B'accept'%5D)%20%7B%0A%20%20%20%20%20%20%20%20headers%5B'accept'%5D%20%3D%20acceptType%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20Object.keys(headers).forEach(function(requestHeader)%20%7B%0A%20%20%20%20%20%20%20%20if%20(%2F%5BA-Z%5D%2F.test(requestHeader))%20%7B%0A%20%20%20%20%20%20%20%20%20%20Polymer.Base._error('Headers%20must%20be%20lower%20case%2C%20got'%2C%20requestHeader)%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20xhr.setRequestHeader(%0A%20%20%20%20%20%20%20%20%20%20requestHeader%2C%0A%20%20%20%20%20%20%20%20%20%20headers%5BrequestHeader%5D%0A%20%20%20%20%20%20%20%20)%3B%0A%20%20%20%20%20%20%7D%2C%20this)%3B%0A%0A%20%20%20%20%20%20if%20(isXHRAsync)%20%7B%0A%20%20%20%20%20%20%20%20xhr.timeout%20%3D%20options.timeout%3B%0A%0A%20%20%20%20%20%20%20%20var%20handleAs%20%3D%20options.handleAs%3B%0A%0A%20%20%20%20%20%20%20%20%2F%2F%20If%20a%20JSON%20prefix%20is%20present%2C%20the%20responseType%20must%20be%20'text'%20or%20the%0A%20%20%20%20%20%20%20%20%2F%2F%20browser%20won%E2%80%99t%20be%20able%20to%20parse%20the%20response.%0A%20%20%20%20%20%20%20%20if%20(!!options.jsonPrefix%20%7C%7C%20!handleAs)%20%7B%0A%20%20%20%20%20%20%20%20%20%20handleAs%20%3D%20'text'%3B%0A%20%20%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20%20%20%2F%2F%20In%20IE%2C%20%60xhr.responseType%60%20is%20an%20empty%20string%20when%20the%20response%0A%20%20%20%20%20%20%20%20%2F%2F%20returns.%20Hence%2C%20caching%20it%20as%20%60xhr._responseType%60.%0A%20%20%20%20%20%20%20%20xhr.responseType%20%3D%20xhr._responseType%20%3D%20handleAs%3B%0A%0A%20%20%20%20%20%20%20%20%2F%2F%20Cache%20the%20JSON%20prefix%2C%20if%20it%20exists.%0A%20%20%20%20%20%20%20%20if%20(!!options.jsonPrefix)%20%7B%0A%20%20%20%20%20%20%20%20%20%20xhr._jsonPrefix%20%3D%20options.jsonPrefix%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20xhr.withCredentials%20%3D%20!!options.withCredentials%3B%0A%0A%0A%20%20%20%20%20%20var%20body%20%3D%20this._encodeBodyObject(options.body%2C%20headers%5B'content-type'%5D)%3B%0A%0A%20%20%20%20%20%20xhr.send(%0A%20%20%20%20%20%20%20%20%2F**%20%40type%20%7BArrayBuffer%7CArrayBufferView%7CBlob%7CDocument%7CFormData%7C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20null%7Cstring%7Cundefined%7D%20*%2F%0A%20%20%20%20%20%20%20%20(body))%3B%0A%0A%20%20%20%20%20%20return%20this.completes%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20Attempts%20to%20parse%20the%20response%20body%20of%20the%20XHR.%20If%20parsing%20succeeds%2C%0A%20%20%20%20%20*%20the%20value%20returned%20will%20be%20deserialized%20based%20on%20the%20%60responseType%60%0A%20%20%20%20%20*%20set%20on%20the%20XHR.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40return%20%7B*%7D%20The%20parsed%20response%2C%0A%20%20%20%20%20*%20or%20undefined%20if%20there%20was%20an%20empty%20response%20or%20parsing%20failed.%0A%20%20%20%20%20*%2F%0A%20%20%20%20parseResponse%3A%20function()%20%7B%0A%20%20%20%20%20%20var%20xhr%20%3D%20this.xhr%3B%0A%20%20%20%20%20%20var%20responseType%20%3D%20xhr.responseType%20%7C%7C%20xhr._responseType%3B%0A%20%20%20%20%20%20var%20preferResponseText%20%3D%20!this.xhr.responseType%3B%0A%20%20%20%20%20%20var%20prefixLen%20%3D%20(xhr._jsonPrefix%20%26%26%20xhr._jsonPrefix.length)%20%7C%7C%200%3B%0A%0A%20%20%20%20%20%20try%20%7B%0A%20%20%20%20%20%20%20%20switch%20(responseType)%20%7B%0A%20%20%20%20%20%20%20%20%20%20case%20'json'%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%2F%2F%20If%20the%20xhr%20object%20doesn't%20have%20a%20natural%20%60xhr.responseType%60%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%2F%2F%20we%20can%20assume%20that%20the%20browser%20hasn't%20parsed%20the%20response%20for%20us%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%2F%2F%20and%20so%20parsing%20is%20our%20responsibility.%20Likewise%20if%20response%20is%0A%20%20%20%20%20%20%20%20%20%20%20%20%2F%2F%20undefined%2C%20as%20there's%20no%20way%20to%20encode%20undefined%20in%20JSON.%0A%20%20%20%20%20%20%20%20%20%20%20%20if%20(preferResponseText%20%7C%7C%20xhr.response%20%3D%3D%3D%20undefined)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2F%2F%20Try%20to%20emulate%20the%20JSON%20section%20of%20the%20response%20body%20section%20of%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2F%2F%20the%20spec%3A%20https%3A%2F%2Fxhr.spec.whatwg.org%2F%23response-body%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2F%2F%20That%20is%20to%20say%2C%20we%20try%20to%20parse%20as%20JSON%2C%20but%20if%20anything%20goes%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2F%2F%20wrong%20return%20null.%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20try%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20return%20JSON.parse(xhr.responseText)%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%20catch%20(_)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20console.warn('Failed%20to%20parse%20JSON%20sent%20from%20'%20%2B%20xhr.responseUrl)%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20return%20null%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20return%20xhr.response%3B%0A%20%20%20%20%20%20%20%20%20%20case%20'xml'%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20return%20xhr.responseXML%3B%0A%20%20%20%20%20%20%20%20%20%20case%20'blob'%3A%0A%20%20%20%20%20%20%20%20%20%20case%20'document'%3A%0A%20%20%20%20%20%20%20%20%20%20case%20'arraybuffer'%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20return%20xhr.response%3B%0A%20%20%20%20%20%20%20%20%20%20case%20'text'%3A%0A%20%20%20%20%20%20%20%20%20%20default%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%2F%2F%20If%20%60prefixLen%60%20is%20set%2C%20it%20implies%20the%20response%20should%20be%20parsed%0A%20%20%20%20%20%20%20%20%20%20%20%20%2F%2F%20as%20JSON%20once%20the%20prefix%20of%20length%20%60prefixLen%60%20is%20stripped%20from%0A%20%20%20%20%20%20%20%20%20%20%20%20%2F%2F%20it.%20Emulate%20the%20behavior%20above%20where%20null%20is%20returned%20on%20failure%0A%20%20%20%20%20%20%20%20%20%20%20%20%2F%2F%20to%20parse.%0A%20%20%20%20%20%20%20%20%20%20%20%20if%20(prefixLen)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20try%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20return%20JSON.parse(xhr.responseText.substring(prefixLen))%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%20catch%20(_)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20console.warn('Failed%20to%20parse%20JSON%20sent%20from%20'%20%2B%20xhr.responseUrl)%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20return%20null%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20%20%20return%20xhr.responseText%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%20catch%20(e)%20%7B%0A%20%20%20%20%20%20%20%20this.rejectCompletes(new%20Error('Could%20not%20parse%20response.%20'%20%2B%20e.message))%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20Aborts%20the%20request.%0A%20%20%20%20%20*%2F%0A%20%20%20%20abort%3A%20function()%20%7B%0A%20%20%20%20%20%20this._setAborted(true)%3B%0A%20%20%20%20%20%20this.xhr.abort()%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20%40param%20%7B*%7D%20body%20The%20given%20body%20of%20the%20request%20to%20try%20and%20encode.%0A%20%20%20%20%20*%20%40param%20%7B%3Fstring%7D%20contentType%20The%20given%20content%20type%2C%20to%20infer%20an%20encoding%0A%20%20%20%20%20*%20%20%20%20%20from.%0A%20%20%20%20%20*%20%40return%20%7B*%7D%20Either%20the%20encoded%20body%20as%20a%20string%2C%20if%20successful%2C%0A%20%20%20%20%20*%20%20%20%20%20or%20the%20unaltered%20body%20object%20if%20no%20encoding%20could%20be%20inferred.%0A%20%20%20%20%20*%2F%0A%20%20%20%20_encodeBodyObject%3A%20function(body%2C%20contentType)%20%7B%0A%20%20%20%20%20%20if%20(typeof%20body%20%3D%3D%20'string')%20%7B%0A%20%20%20%20%20%20%20%20return%20body%3B%20%20%2F%2F%20Already%20encoded.%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20var%20bodyObj%20%3D%20%2F**%20%40type%20%7BObject%7D%20*%2F%20(body)%3B%0A%20%20%20%20%20%20switch(contentType)%20%7B%0A%20%20%20%20%20%20%20%20case('application%2Fjson')%3A%0A%20%20%20%20%20%20%20%20%20%20return%20JSON.stringify(bodyObj)%3B%0A%20%20%20%20%20%20%20%20case('application%2Fx-www-form-urlencoded')%3A%0A%20%20%20%20%20%20%20%20%20%20return%20this._wwwFormUrlEncode(bodyObj)%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20return%20body%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20%40param%20%7BObject%7D%20object%20The%20object%20to%20encode%20as%20x-www-form-urlencoded.%0A%20%20%20%20%20*%20%40return%20%7Bstring%7D%20.%0A%20%20%20%20%20*%2F%0A%20%20%20%20_wwwFormUrlEncode%3A%20function(object)%20%7B%0A%20%20%20%20%20%20if%20(!object)%20%7B%0A%20%20%20%20%20%20%20%20return%20''%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20var%20pieces%20%3D%20%5B%5D%3B%0A%20%20%20%20%20%20Object.keys(object).forEach(function(key)%20%7B%0A%20%20%20%20%20%20%20%20%2F%2F%20TODO(rictic)%3A%20handle%20array%20values%20here%2C%20in%20a%20consistent%20way%20with%0A%20%20%20%20%20%20%20%20%2F%2F%20%20%20iron-ajax%20params.%0A%20%20%20%20%20%20%20%20pieces.push(%0A%20%20%20%20%20%20%20%20%20%20%20%20this._wwwFormUrlEncodePiece(key)%20%2B%20'%3D'%20%2B%0A%20%20%20%20%20%20%20%20%20%20%20%20this._wwwFormUrlEncodePiece(object%5Bkey%5D))%3B%0A%20%20%20%20%20%20%7D%2C%20this)%3B%0A%20%20%20%20%20%20return%20pieces.join('%26')%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20%40param%20%7B*%7D%20str%20A%20key%20or%20value%20to%20encode%20as%20x-www-form-urlencoded.%0A%20%20%20%20%20*%20%40return%20%7Bstring%7D%20.%0A%20%20%20%20%20*%2F%0A%20%20%20%20_wwwFormUrlEncodePiece%3A%20function(str)%20%7B%0A%20%20%20%20%20%20%2F%2F%20Spec%20says%20to%20normalize%20newlines%20to%20%5Cr%5Cn%20and%20replace%20%2520%20spaces%20with%20%2B.%0A%20%20%20%20%20%20%2F%2F%20jQuery%20does%20this%20as%20well%2C%20so%20this%20is%20likely%20to%20be%20widely%20compatible.%0A%20%20%20%20%20%20if%20(str%20%3D%3D%3D%20null%20%7C%7C%20str%20%3D%3D%3D%20undefined%20%7C%7C%20!str.toString)%20%7B%0A%20%20%20%20%20%20%20%20return%20''%3B%0A%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20return%20encodeURIComponent(str.toString().replace(%2F%5Cr%3F%5Cn%2Fg%2C%20'%5Cr%5Cn'))%0A%20%20%20%20%20%20%20%20.replace(%2F%2520%2Fg%2C%20'%2B')%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20Updates%20the%20status%20code%20and%20status%20text.%0A%20%20%20%20%20*%2F%0A%20%20%20%20_updateStatus%3A%20function()%20%7B%0A%20%20%20%20%20%20this._setStatus(this.xhr.status)%3B%0A%20%20%20%20%20%20this._setStatusText((this.xhr.statusText%20%3D%3D%3D%20undefined)%20%3F%20''%20%3A%20this.xhr.statusText)%3B%0A%20%20%20%20%7D%0A%20%20%7D)%3B%0A%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Fcpt-static.gannettdigital.com%2Funiversal-web-client%2Fmaster%2Flatest%2Fvendor%2Fcomponents%2Firon-ajax%2Firon-request.html.js%0A | 14 kB | 2023-03-12 | 2024-01-25 | |
Pretty
Loading... | ||||
http:text/javascript;charset=utf-8,(function()%7B'use%20strict'%3Bvar%20caseMap%3D%7B%7D%3Bvar%20DASH_TO_CAMEL%3D%2F-%5Ba-z%5D%2Fg%3Bvar%20CAMEL_TO_DASH%3D%2F(%5BA-Z%5D)%2Fg%3B%2F**%0A%20%20%20*%20Module%20with%20utilities%20for%20converting%20between%20%22dash-case%22%20and%20%22camelCase%22%0A%20%20%20*%20identifiers.%0A%20%20%20*%0A%20%20%20*%20%40namespace%0A%20%20%20*%20%40memberof%20Polymer%0A%20%20%20*%20%40summary%20Module%20that%20provides%20utilities%20for%20converting%20between%20%22dash-case%22%0A%20%20%20*%20%20%20and%20%22camelCase%22.%0A%20%20%20*%2Fvar%20CaseMap%3D%7B%2F**%0A%20%20%20%20%20*%20Converts%20%22dash-case%22%20identifier%20(e.g.%20%60foo-bar-baz%60)%20to%20%22camelCase%22%0A%20%20%20%20%20*%20(e.g.%20%60fooBarBaz%60).%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40memberof%20Polymer.CaseMap%0A%20%20%20%20%20*%20%40param%20%7Bstring%7D%20dash%20Dash-case%20identifier%0A%20%20%20%20%20*%20%40return%20%7Bstring%7D%20Camel-case%20representation%20of%20the%20identifier%0A%20%20%20%20%20*%2FdashToCamelCase%3Afunction%20dashToCamelCase(dash)%7Breturn%20caseMap%5Bdash%5D%7C%7C(caseMap%5Bdash%5D%3Ddash.indexOf('-')%3C0%3Fdash%3Adash.replace(DASH_TO_CAMEL%2Cfunction(m)%7Breturn%20m%5B1%5D.toUpperCase()%3B%7D))%3B%7D%2C%2F**%0A%20%20%20%20%20*%20Converts%20%22camelCase%22%20identifier%20(e.g.%20%60fooBarBaz%60)%20to%20%22dash-case%22%0A%20%20%20%20%20*%20(e.g.%20%60foo-bar-baz%60).%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40memberof%20Polymer.CaseMap%0A%20%20%20%20%20*%20%40param%20%7Bstring%7D%20camel%20Camel-case%20identifier%0A%20%20%20%20%20*%20%40return%20%7Bstring%7D%20Dash-case%20representation%20of%20the%20identifier%0A%20%20%20%20%20*%2FcamelToDashCase%3Afunction%20camelToDashCase(camel)%7Breturn%20caseMap%5Bcamel%5D%7C%7C(caseMap%5Bcamel%5D%3Dcamel.replace(CAMEL_TO_DASH%2C'-%241').toLowerCase())%3B%7D%7D%3BPolymer.CaseMap%3DCaseMap%3B%7D)()%3B%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Fcpt-static.gannettdigital.com%2Funiversal-web-client%2Fmaster%2Flatest%2Fvendor%2Fcomponents%2Fpolymer%2Flib%2Futils%2Fcase-map.html.js%0A | 1.4 kB | 2023-03-07 | 2024-01-25 | |
Pretty
Loading... | ||||
http:text/javascript;charset=utf-8,var%20_createClass%3Dfunction()%7Bfunction%20defineProperties(target%2Cprops)%7Bfor(var%20i%3D0%3Bi%3Cprops.length%3Bi%2B%2B)%7Bvar%20descriptor%3Dprops%5Bi%5D%3Bdescriptor.enumerable%3Ddescriptor.enumerable%7C%7Cfalse%3Bdescriptor.configurable%3Dtrue%3Bif(%22value%22in%20descriptor)descriptor.writable%3Dtrue%3BObject.defineProperty(target%2Cdescriptor.key%2Cdescriptor)%3B%7D%7Dreturn%20function(Constructor%2CprotoProps%2CstaticProps)%7Bif(protoProps)defineProperties(Constructor.prototype%2CprotoProps)%3Bif(staticProps)defineProperties(Constructor%2CstaticProps)%3Breturn%20Constructor%3B%7D%3B%7D()%3Bfunction%20_classCallCheck(instance%2CConstructor)%7Bif(!(instance%20instanceof%20Constructor))%7Bthrow%20new%20TypeError(%22Cannot%20call%20a%20class%20as%20a%20function%22)%3B%7D%7Dfunction%20_possibleConstructorReturn(self%2Ccall)%7Bif(!self)%7Bthrow%20new%20ReferenceError(%22this%20hasn't%20been%20initialised%20-%20super()%20hasn't%20been%20called%22)%3B%7Dreturn%20call%26%26(typeof%20call%3D%3D%3D%22object%22%7C%7Ctypeof%20call%3D%3D%3D%22function%22)%3Fcall%3Aself%3B%7Dfunction%20_inherits(subClass%2CsuperClass)%7Bif(typeof%20superClass!%3D%3D%22function%22%26%26superClass!%3D%3Dnull)%7Bthrow%20new%20TypeError(%22Super%20expression%20must%20either%20be%20null%20or%20a%20function%2C%20not%20%22%2Btypeof%20superClass)%3B%7DsubClass.prototype%3DObject.create(superClass%26%26superClass.prototype%2C%7Bconstructor%3A%7Bvalue%3AsubClass%2Cenumerable%3Afalse%2Cwritable%3Atrue%2Cconfigurable%3Atrue%7D%7D)%3Bif(superClass)Object.setPrototypeOf%3FObject.setPrototypeOf(subClass%2CsuperClass)%3AsubClass.__proto__%3DsuperClass%3B%7D(function()%7B'use%20strict'%3B%2F**%0A%20%20%20%20%20*%20%40constructor%0A%20%20%20%20%20*%20%40extends%20%7BHTMLElement%7D%0A%20%20%20%20%20*%20%40implements%20%7BPolymer_PropertyEffects%7D%0A%20%20%20%20%20*%20%40implements%20%7BPolymer_OptionalMutableData%7D%0A%20%20%20%20%20*%20%40implements%20%7BPolymer_GestureEventListeners%7D%0A%20%20%20%20%20*%20%40private%0A%20%20%20%20%20*%2Fvar%20domBindBase%3DPolymer.GestureEventListeners(Polymer.OptionalMutableData(Polymer.PropertyEffects(HTMLElement)))%3B%2F**%0A%20%20%20%20%20*%20Custom%20element%20to%20allow%20using%20Polymer's%20template%20features%20(data%20binding%2C%0A%20%20%20%20%20*%20declarative%20event%20listeners%2C%20etc.)%20in%20the%20main%20document%20without%20defining%0A%20%20%20%20%20*%20a%20new%20custom%20element.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%60%3Ctemplate%3E%60%20tags%20utilizing%20bindings%20may%20be%20wrapped%20with%20the%20%60%3Cdom-bind%3E%60%0A%20%20%20%20%20*%20element%2C%20which%20will%20immediately%20stamp%20the%20wrapped%20template%20into%20the%20main%0A%20%20%20%20%20*%20document%20and%20bind%20elements%20to%20the%20%60dom-bind%60%20element%20itself%20as%20the%0A%20%20%20%20%20*%20binding%20scope.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40polymer%0A%20%20%20%20%20*%20%40customElement%0A%20%20%20%20%20*%20%40appliesMixin%20Polymer.PropertyEffects%0A%20%20%20%20%20*%20%40appliesMixin%20Polymer.OptionalMutableData%0A%20%20%20%20%20*%20%40appliesMixin%20Polymer.GestureEventListeners%0A%20%20%20%20%20*%20%40extends%20%7BdomBindBase%7D%0A%20%20%20%20%20*%20%40memberof%20Polymer%0A%20%20%20%20%20*%20%40summary%20Custom%20element%20to%20allow%20using%20Polymer's%20template%20features%20(data%0A%20%20%20%20%20*%20%20%20binding%2C%20declarative%20event%20listeners%2C%20etc.)%20in%20the%20main%20document.%0A%20%20%20%20%20*%2Fvar%20DomBind%3Dfunction(_domBindBase)%7B_inherits(DomBind%2C_domBindBase)%3B_createClass(DomBind%2Cnull%2C%5B%7Bkey%3A'observedAttributes'%2Cget%3Afunction%20get()%7Breturn%5B'mutable-data'%5D%3B%7D%7D%5D)%3Bfunction%20DomBind()%7B_classCallCheck(this%2CDomBind)%3Bvar%20_this%3D_possibleConstructorReturn(this%2C(DomBind.__proto__%7C%7CObject.getPrototypeOf(DomBind)).call(this))%3Bif(Polymer.strictTemplatePolicy)%7Bthrow%20new%20Error('strictTemplatePolicy%3A%20dom-bind%20not%20allowed')%3B%7D_this.root%3Dnull%3B_this.%24%3Dnull%3B_this.__children%3Dnull%3Breturn%20_this%3B%7D%2F**%20%40return%20%7Bvoid%7D%20*%2F_createClass(DomBind%2C%5B%7Bkey%3A'attributeChangedCallback'%2Cvalue%3Afunction%20attributeChangedCallback()%7B%2F%2F%20assumes%20only%20one%20observed%20attribute%0Athis.mutableData%3Dtrue%3B%7D%2F**%20%40return%20%7Bvoid%7D%20*%2F%7D%2C%7Bkey%3A'connectedCallback'%2Cvalue%3Afunction%20connectedCallback()%7Bthis.style.display%3D'none'%3Bthis.render()%3B%7D%2F**%20%40return%20%7Bvoid%7D%20*%2F%7D%2C%7Bkey%3A'disconnectedCallback'%2Cvalue%3Afunction%20disconnectedCallback()%7Bthis.__removeChildren()%3B%7D%7D%2C%7Bkey%3A'__insertChildren'%2Cvalue%3Afunction%20__insertChildren()%7Bthis.parentNode.insertBefore(this.root%2Cthis)%3B%7D%7D%2C%7Bkey%3A'__removeChildren'%2Cvalue%3Afunction%20__removeChildren()%7Bif(this.__children)%7Bfor(var%20i%3D0%3Bi%3Cthis.__children.length%3Bi%2B%2B)%7Bthis.root.appendChild(this.__children%5Bi%5D)%3B%7D%7D%7D%2F**%0A%20%20%20%20%20%20%20*%20Forces%20the%20element%20to%20render%20its%20content.%20This%20is%20typically%20only%0A%20%20%20%20%20%20%20*%20necessary%20to%20call%20if%20HTMLImports%20with%20the%20async%20attribute%20are%20used.%0A%20%20%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20%20%20*%2F%7D%2C%7Bkey%3A'render'%2Cvalue%3Afunction%20render()%7Bvar%20_this2%3Dthis%3Bvar%20template%3Dvoid%200%3Bif(!this.__children)%7Btemplate%3D%2F**%20%40type%20%7BHTMLTemplateElement%7D%20*%2Ftemplate%7C%7Cthis.querySelector('template')%3Bif(!template)%7B%2F%2F%20Wait%20until%20childList%20changes%20and%20template%20should%20be%20there%20by%20then%0Avar%20observer%3Dnew%20MutationObserver(function()%7Btemplate%3D%2F**%20%40type%20%7BHTMLTemplateElement%7D%20*%2F_this2.querySelector('template')%3Bif(template)%7Bobserver.disconnect()%3B_this2.render()%3B%7Delse%7Bthrow%20new%20Error('dom-bind%20requires%20a%20%3Ctemplate%3E%20child')%3B%7D%7D)%3Bobserver.observe(this%2C%7BchildList%3Atrue%7D)%3Breturn%3B%7Dthis.root%3Dthis._stampTemplate(template)%3Bthis.%24%3Dthis.root.%24%3Bthis.__children%3D%5B%5D%3Bfor(var%20n%3Dthis.root.firstChild%3Bn%3Bn%3Dn.nextSibling)%7Bthis.__children%5Bthis.__children.length%5D%3Dn%3B%7Dthis._enableProperties()%3B%7Dthis.__insertChildren()%3Bthis.dispatchEvent(new%20CustomEvent('dom-change'%2C%7Bbubbles%3Atrue%2Ccomposed%3Atrue%7D))%3B%7D%7D%5D)%3Breturn%20DomBind%3B%7D(domBindBase)%3BcustomElements.define('dom-bind'%2CDomBind)%3B%2F**%20%40const%20*%2FPolymer.DomBind%3DDomBind%3B%7D)()%3B%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Fcpt-static.gannettdigital.com%2Funiversal-web-client%2Fmaster%2Flatest%2Fvendor%2Fcomponents%2Fpolymer%2Flib%2Felements%2Fdom-bind.html.js%0A | 5.0 kB | 2023-03-07 | 2024-01-25 | |
Pretty
Loading... | ||||
http:text/javascript;charset=utf-8,(function()%7B'use%20strict'%3Bvar%20scheduled%3Dfalse%3Bvar%20beforeRenderQueue%3D%5B%5D%3Bvar%20afterRenderQueue%3D%5B%5D%3Bfunction%20schedule()%7Bscheduled%3Dtrue%3B%2F%2F%20before%20next%20render%0ArequestAnimationFrame(function()%7Bscheduled%3Dfalse%3BflushQueue(beforeRenderQueue)%3B%2F%2F%20after%20the%20render%0AsetTimeout(function()%7BrunQueue(afterRenderQueue)%3B%7D)%3B%7D)%3B%7Dfunction%20flushQueue(queue)%7Bwhile(queue.length)%7BcallMethod(queue.shift())%3B%7D%7Dfunction%20runQueue(queue)%7Bfor(var%20i%3D0%2Cl%3Dqueue.length%3Bi%3Cl%3Bi%2B%2B)%7BcallMethod(queue.shift())%3B%7D%7Dfunction%20callMethod(info)%7Bvar%20context%3Dinfo%5B0%5D%3Bvar%20callback%3Dinfo%5B1%5D%3Bvar%20args%3Dinfo%5B2%5D%3Btry%7Bcallback.apply(context%2Cargs)%3B%7Dcatch(e)%7BsetTimeout(function()%7Bthrow%20e%3B%7D)%3B%7D%7Dfunction%20flush()%7Bwhile(beforeRenderQueue.length%7C%7CafterRenderQueue.length)%7BflushQueue(beforeRenderQueue)%3BflushQueue(afterRenderQueue)%3B%7Dscheduled%3Dfalse%3B%7D%2F**%0A%20%20%20*%20Module%20for%20scheduling%20flushable%20pre-render%20and%20post-render%20tasks.%0A%20%20%20*%0A%20%20%20*%20%40namespace%0A%20%20%20*%20%40memberof%20Polymer%0A%20%20%20*%20%40summary%20Module%20for%20scheduling%20flushable%20pre-render%20and%20post-render%20tasks.%0A%20%20%20*%2FPolymer.RenderStatus%3D%7B%2F**%0A%20%20%20%20%20*%20Enqueues%20a%20callback%20which%20will%20be%20run%20before%20the%20next%20render%2C%20at%0A%20%20%20%20%20*%20%60requestAnimationFrame%60%20timing.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20This%20method%20is%20useful%20for%20enqueuing%20work%20that%20requires%20DOM%20measurement%2C%0A%20%20%20%20%20*%20since%20measurement%20may%20not%20be%20reliable%20in%20custom%20element%20callbacks%20before%0A%20%20%20%20%20*%20the%20first%20render%2C%20as%20well%20as%20for%20batching%20measurement%20tasks%20in%20general.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20Tasks%20in%20this%20queue%20may%20be%20flushed%20by%20calling%20%60Polymer.RenderStatus.flush()%60.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40memberof%20Polymer.RenderStatus%0A%20%20%20%20%20*%20%40param%20%7B*%7D%20context%20Context%20object%20the%20callback%20function%20will%20be%20bound%20to%0A%20%20%20%20%20*%20%40param%20%7Bfunction(...*)%3Avoid%7D%20callback%20Callback%20function%0A%20%20%20%20%20*%20%40param%20%7B!Array%3D%7D%20args%20An%20array%20of%20arguments%20to%20call%20the%20callback%20function%20with%0A%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20*%2FbeforeNextRender%3Afunction%20beforeNextRender(context%2Ccallback%2Cargs)%7Bif(!scheduled)%7Bschedule()%3B%7DbeforeRenderQueue.push(%5Bcontext%2Ccallback%2Cargs%5D)%3B%7D%2C%2F**%0A%20%20%20%20%20*%20Enqueues%20a%20callback%20which%20will%20be%20run%20after%20the%20next%20render%2C%20equivalent%0A%20%20%20%20%20*%20to%20one%20task%20(%60setTimeout%60)%20after%20the%20next%20%60requestAnimationFrame%60.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20This%20method%20is%20useful%20for%20tuning%20the%20first-render%20performance%20of%20an%0A%20%20%20%20%20*%20element%20or%20application%20by%20deferring%20non-critical%20work%20until%20after%20the%0A%20%20%20%20%20*%20first%20paint.%20%20Typical%20non-render-critical%20work%20may%20include%20adding%20UI%0A%20%20%20%20%20*%20event%20listeners%20and%20aria%20attributes.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40memberof%20Polymer.RenderStatus%0A%20%20%20%20%20*%20%40param%20%7B*%7D%20context%20Context%20object%20the%20callback%20function%20will%20be%20bound%20to%0A%20%20%20%20%20*%20%40param%20%7Bfunction(...*)%3Avoid%7D%20callback%20Callback%20function%0A%20%20%20%20%20*%20%40param%20%7B!Array%3D%7D%20args%20An%20array%20of%20arguments%20to%20call%20the%20callback%20function%20with%0A%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20*%2FafterNextRender%3Afunction%20afterNextRender(context%2Ccallback%2Cargs)%7Bif(!scheduled)%7Bschedule()%3B%7DafterRenderQueue.push(%5Bcontext%2Ccallback%2Cargs%5D)%3B%7D%2C%2F**%0A%20%20%20%20%20*%20Flushes%20all%20%60beforeNextRender%60%20tasks%2C%20followed%20by%20all%20%60afterNextRender%60%0A%20%20%20%20%20*%20tasks.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40memberof%20Polymer.RenderStatus%0A%20%20%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20%20%20*%2Fflush%3Aflush%7D%3B%7D)()%3B%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Fcpt-static.gannettdigital.com%2Funiversal-web-client%2Fmaster%2Flatest%2Fvendor%2Fcomponents%2Fpolymer%2Flib%2Futils%2Frender-status.html.js%0A | 3.1 kB | 2023-03-07 | 2024-01-25 | |
Pretty
Loading... | ||||
cpt-static.gannettdigital.com/universal-web-client/master/latest/vendor/adobe/VideoHeartbeat.min.js | 171 kB | 2023-03-13 | 2024-01-25 | |
Pretty
Loading... | ||||
bam.nr-data.net/1/b7ac0e2ada?a=20128261&sa=1&v=1044.a6554e7&t=Unnamed%20Transaction&rst=3388&ref=https://eu.uticaod.com/story/sports/2021/01/23/section-iii-has-work-do-after-ny-covid-19-high-risk-high-school-sports-get-ok/6686662002/&be=1135&fe=3299&dc=1618&af=err,xhr,stn,ins,spa&perf=%7B%22timing%22:%7B%22of%22:1674762008358,%22n%22:0,%22f%22:378,%22dn%22:402,%22dne%22:476,%22c%22:476,%22s%22:491,%22ce%22:518,%22rq%22:518,%22rp%22:1071,%22rpe%22:1071,%22dl%22:1082,%22di%22:1356,%22ds%22:1618,%22de%22:1621,%22dc%22:3298,%22l%22:3298,%22le%22:3300%7D,%22navigation%22:%7B%7D%7D&jsonp=NREUM.setToken | 57 B | 2023-03-07 | 2024-03-03 | |
Pretty
Loading... | ||||
eu.uticaod.com/story/sports/2021/01/23/section-iii-has-work-do-after-ny-covid-19-high-risk-high-school-sports-get-ok/6686662002/ | 156 B | 2023-03-07 | 2024-01-25 | |
Pretty
Loading... | ||||
cpt-static.gannettdigital.com/universal-web-client/master/latest/vendor/components/shadycss/custom-style-interface.min.js | 3.1 kB | 2023-03-07 | 2024-02-06 | |
Pretty
Loading... | ||||
http:text/javascript;charset=utf-8,%2F**%20%40suppress%20%7Bdeprecated%7D%20*%2F(function()%7B'use%20strict'%3B%2F**%0A%20%20%20*%20Sets%20the%20global%2C%20legacy%20settings.%0A%20%20%20*%0A%20%20%20*%20%40deprecated%0A%20%20%20*%20%40namespace%0A%20%20%20*%20%40memberof%20Polymer%0A%20%20%20*%2FPolymer.Settings%3DPolymer.Settings%7C%7C%7B%7D%3BPolymer.Settings.useShadow%3D!window.ShadyDOM%3BPolymer.Settings.useNativeCSSProperties%3DBoolean(!window.ShadyCSS%7C%7Cwindow.ShadyCSS.nativeCss)%3BPolymer.Settings.useNativeCustomElements%3D!window.customElements.polyfillWrapFlushCallback%3B%2F**%0A%20%20%20*%20Globally%20settable%20property%20that%20is%20automatically%20assigned%20to%0A%20%20%20*%20%60Polymer.ElementMixin%60%20instances%2C%20useful%20for%20binding%20in%20templates%20to%0A%20%20%20*%20make%20URL's%20relative%20to%20an%20application's%20root.%20%20Defaults%20to%20the%20main%0A%20%20%20*%20document%20URL%2C%20but%20can%20be%20overridden%20by%20users.%20%20It%20may%20be%20useful%20to%20set%0A%20%20%20*%20%60Polymer.rootPath%60%20to%20provide%20a%20stable%20application%20mount%20path%20when%0A%20%20%20*%20using%20client%20side%20routing.%0A%20%20%20*%0A%20%20%20*%20%40memberof%20Polymer%0A%20%20%20*%2FPolymer.rootPath%3DPolymer.rootPath%7C%7CPolymer.ResolveUrl.pathFromUrl(document.baseURI%7C%7Cwindow.location.href)%3B%2F**%0A%20%20%20*%20Sets%20the%20global%20rootPath%20property%20used%20by%20%60Polymer.ElementMixin%60%20and%0A%20%20%20*%20available%20via%20%60Polymer.rootPath%60.%0A%20%20%20*%0A%20%20%20*%20%40memberof%20Polymer%0A%20%20%20*%20%40param%20%7Bstring%7D%20path%20The%20new%20root%20path%0A%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20*%2FPolymer.setRootPath%3Dfunction(path)%7BPolymer.rootPath%3Dpath%3B%7D%3B%2F**%0A%20%20%20*%20A%20global%20callback%20used%20to%20sanitize%20any%20value%20before%20inserting%20it%20into%20the%20DOM.%20The%20callback%20signature%20is%3A%0A%20%20%20*%0A%20%20%20*%20%20%20%20%20Polymer%20%3D%20%7B%0A%20%20%20*%20%20%20%20%20%20%20sanitizeDOMValue%3A%20function(value%2C%20name%2C%20type%2C%20node)%20%7B%20...%20%7D%0A%20%20%20*%20%20%20%20%20%7D%0A%20%20%20*%0A%20%20%20*%20Where%3A%0A%20%20%20*%0A%20%20%20*%20%60value%60%20is%20the%20value%20to%20sanitize.%0A%20%20%20*%20%60name%60%20is%20the%20name%20of%20an%20attribute%20or%20property%20(for%20example%2C%20href).%0A%20%20%20*%20%60type%60%20indicates%20where%20the%20value%20is%20being%20inserted%3A%20one%20of%20property%2C%20attribute%2C%20or%20text.%0A%20%20%20*%20%60node%60%20is%20the%20node%20where%20the%20value%20is%20being%20inserted.%0A%20%20%20*%0A%20%20%20*%20%40type%20%7B(function(*%2Cstring%2Cstring%2CNode)%3A*)%7Cundefined%7D%0A%20%20%20*%20%40memberof%20Polymer%0A%20%20%20*%2FPolymer.sanitizeDOMValue%3DPolymer.sanitizeDOMValue%7C%7Cnull%3B%2F**%0A%20%20%20*%20Sets%20the%20global%20sanitizeDOMValue%20available%20via%20%60Polymer.sanitizeDOMValue%60.%0A%20%20%20*%0A%20%20%20*%20%40memberof%20Polymer%0A%20%20%20*%20%40param%20%7B(function(*%2Cstring%2Cstring%2CNode)%3A*)%7Cundefined%7D%20newSanitizeDOMValue%20the%20global%20sanitizeDOMValue%20callback%0A%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20*%2FPolymer.setSanitizeDOMValue%3Dfunction(newSanitizeDOMValue)%7BPolymer.sanitizeDOMValue%3DnewSanitizeDOMValue%3B%7D%3B%2F**%0A%20%20%20*%20Globally%20settable%20property%20to%20make%20Polymer%20Gestures%20use%20passive%20TouchEvent%20listeners%20when%20recognizing%20gestures.%0A%20%20%20*%20When%20set%20to%20%60true%60%2C%20gestures%20made%20from%20touch%20will%20not%20be%20able%20to%20prevent%20scrolling%2C%20allowing%20for%20smoother%0A%20%20%20*%20scrolling%20performance.%0A%20%20%20*%20Defaults%20to%20%60false%60%20for%20backwards%20compatibility.%0A%20%20%20*%0A%20%20%20*%20%40memberof%20Polymer%0A%20%20%20*%2FPolymer.passiveTouchGestures%3DPolymer.passiveTouchGestures%7C%7Cfalse%3B%2F**%0A%20%20%20*%20Sets%20%60passiveTouchGestures%60%20globally%20for%20all%20elements%20using%20Polymer%20Gestures.%0A%20%20%20*%0A%20%20%20*%20%40memberof%20Polymer%0A%20%20%20*%20%40param%20%7Bboolean%7D%20usePassive%20enable%20or%20disable%20passive%20touch%20gestures%20globally%0A%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20*%2FPolymer.setPassiveTouchGestures%3Dfunction(usePassive)%7BPolymer.passiveTouchGestures%3DusePassive%3B%7D%3BPolymer.legacyOptimizations%3DPolymer.legacyOptimizations%7C%7Cwindow.PolymerSettings%26%26window.PolymerSettings.legacyOptimizations%7C%7Cfalse%3B%2F**%0A%20%20%20*%20Sets%20%60legacyOptimizations%60%20globally%20for%20all%20elements.%20Enables%0A%20%20%20*%20optimizations%20when%20only%20legacy%20Polymer()%20style%20elements%20are%20used.%0A%20%20%20*%0A%20%20%20*%20%40memberof%20Polymer%0A%20%20%20*%20%40param%20%7Bboolean%7D%20useLegacyOptimizations%20enable%20or%20disable%20legacy%20optimizations%20globally.%0A%20%20%20*%20%40return%20%7Bvoid%7D%0A%20%20%20*%2FPolymer.setLegacyOptimizations%3Dfunction(useLegacyOptimizations)%7BPolymer.legacyOptimizations%3DuseLegacyOptimizations%3B%7D%3B%7D)()%3B%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Fcpt-static.gannettdigital.com%2Funiversal-web-client%2Fmaster%2Flatest%2Fvendor%2Fcomponents%2Fpolymer%2Flib%2Futils%2Fsettings.html.js%0A | 3.7 kB | 2023-03-07 | 2024-01-25 | |
Pretty
Loading... | ||||
cdn.polyfill.io/v2/polyfill.js?features=default,fetch,Array.prototype.find,IntersectionObserver,IntersectionObserverEntry,Intl,Intl.~locale.en-US | 222 B | 2023-03-07 | 2024-04-02 | |
Pretty
Loading... | ||||
http:text/javascript;charset=utf-8,(function()%7B'use%20strict'%3B%2F**%0A%20%20%20%20%20*%20Legacy%20class%20factory%20and%20registration%20helper%20for%20defining%20Polymer%0A%20%20%20%20%20*%20elements.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20This%20method%20is%20equivalent%20to%0A%20%20%20%20%20*%20%60customElements.define(info.is%2C%20Polymer.Class(info))%3B%60%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20See%20%60Polymer.Class%60%20for%20details%20on%20valid%20legacy%20metadata%20format%20for%20%60info%60.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40global%0A%20%20%20%20%20*%20%40override%0A%20%20%20%20%20*%20%40function%20Polymer%0A%20%20%20%20%20*%20%40param%20%7B!PolymerInit%7D%20info%20Object%20containing%20Polymer%20metadata%20and%20functions%0A%20%20%20%20%20*%20%20%20to%20become%20class%20methods.%0A%20%20%20%20%20*%20%40return%20%7Bfunction(new%3A%20HTMLElement)%7D%20Generated%20class%0A%20%20%20%20%20*%20%40suppress%20%7Bduplicate%2C%20invalidCasts%2C%20checkTypes%7D%0A%20%20%20%20%20*%2Fwindow.Polymer._polymerFn%3Dfunction(info)%7B%2F%2F%20if%20input%20is%20a%20%60class%60%20(aka%20a%20function%20with%20a%20prototype)%2C%20use%20the%20prototype%0A%2F%2F%20remember%20that%20the%20%60constructor%60%20will%20never%20be%20called%0Avar%20klass%3Dvoid%200%3Bif(typeof%20info%3D%3D%3D'function')%7Bklass%3Dinfo%3B%7Delse%7Bklass%3DPolymer.Class(info)%3B%7DcustomElements.define(klass.is%2C%2F**%20%40type%20%7B!HTMLElement%7D%20*%2Fklass)%3Breturn%20klass%3B%7D%3B%7D)()%3B%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Fcpt-static.gannettdigital.com%2Funiversal-web-client%2Fmaster%2Flatest%2Fvendor%2Fcomponents%2Fpolymer%2Flib%2Flegacy%2Fpolymer-fn.html.js%0A | 1.1 kB | 2023-03-07 | 2024-01-25 | |
Pretty
Loading... | ||||
http:text/javascript;charset=utf-8,(function()%7B'use%20strict'%3Bvar%20mutablePropertyChange%3Dvoid%200%3B%2F**%20%40suppress%20%7BmissingProperties%7D%20*%2F(function()%7BmutablePropertyChange%3DPolymer.MutableData._mutablePropertyChange%3B%7D)()%3B%2F**%0A%20%20%20*%20Legacy%20element%20behavior%20to%20skip%20strict%20dirty-checking%20for%20objects%20and%20arrays%2C%0A%20%20%20*%20(always%20consider%20them%20to%20be%20%22dirty%22)%20for%20use%20on%20legacy%20API%20Polymer%20elements.%0A%20%20%20*%0A%20%20%20*%20By%20default%2C%20%60Polymer.PropertyEffects%60%20performs%20strict%20dirty%20checking%20on%0A%20%20%20*%20objects%2C%20which%20means%20that%20any%20deep%20modifications%20to%20an%20object%20or%20array%20will%0A%20%20%20*%20not%20be%20propagated%20unless%20%22immutable%22%20data%20patterns%20are%20used%20(i.e.%20all%20object%0A%20%20%20*%20references%20from%20the%20root%20to%20the%20mutation%20were%20changed).%0A%20%20%20*%0A%20%20%20*%20Polymer%20also%20provides%20a%20proprietary%20data%20mutation%20and%20path%20notification%20API%0A%20%20%20*%20(e.g.%20%60notifyPath%60%2C%20%60set%60%2C%20and%20array%20mutation%20API's)%20that%20allow%20efficient%0A%20%20%20*%20mutation%20and%20notification%20of%20deep%20changes%20in%20an%20object%20graph%20to%20all%20elements%0A%20%20%20*%20bound%20to%20the%20same%20object%20graph.%0A%20%20%20*%0A%20%20%20*%20In%20cases%20where%20neither%20immutable%20patterns%20nor%20the%20data%20mutation%20API%20can%20be%0A%20%20%20*%20used%2C%20applying%20this%20mixin%20will%20cause%20Polymer%20to%20skip%20dirty%20checking%20for%0A%20%20%20*%20objects%20and%20arrays%20(always%20consider%20them%20to%20be%20%22dirty%22).%20%20This%20allows%20a%0A%20%20%20*%20user%20to%20make%20a%20deep%20modification%20to%20a%20bound%20object%20graph%2C%20and%20then%20either%0A%20%20%20*%20simply%20re-set%20the%20object%20(e.g.%20%60this.items%20%3D%20this.items%60)%20or%20call%20%60notifyPath%60%0A%20%20%20*%20(e.g.%20%60this.notifyPath('items')%60)%20to%20update%20the%20tree.%20%20Note%20that%20all%0A%20%20%20*%20elements%20that%20wish%20to%20be%20updated%20based%20on%20deep%20mutations%20must%20apply%20this%0A%20%20%20*%20mixin%20or%20otherwise%20skip%20strict%20dirty%20checking%20for%20objects%2Farrays.%0A%20%20%20*%20Specifically%2C%20any%20elements%20in%20the%20binding%20tree%20between%20the%20source%20of%20a%0A%20%20%20*%20mutation%20and%20the%20consumption%20of%20it%20must%20apply%20this%20behavior%20or%20enable%20the%0A%20%20%20*%20%60Polymer.OptionalMutableDataBehavior%60.%0A%20%20%20*%0A%20%20%20*%20In%20order%20to%20make%20the%20dirty%20check%20strategy%20configurable%2C%20see%0A%20%20%20*%20%60Polymer.OptionalMutableDataBehavior%60.%0A%20%20%20*%0A%20%20%20*%20Note%2C%20the%20performance%20characteristics%20of%20propagating%20large%20object%20graphs%0A%20%20%20*%20will%20be%20worse%20as%20opposed%20to%20using%20strict%20dirty%20checking%20with%20immutable%0A%20%20%20*%20patterns%20or%20Polymer's%20path%20notification%20API.%0A%20%20%20*%0A%20%20%20*%20%40polymerBehavior%0A%20%20%20*%20%40memberof%20Polymer%0A%20%20%20*%20%40summary%20Behavior%20to%20skip%20strict%20dirty-checking%20for%20objects%20and%0A%20%20%20*%20%20%20arrays%0A%20%20%20*%2FPolymer.MutableDataBehavior%3D%7B%2F**%0A%20%20%20%20%20*%20Overrides%20%60Polymer.PropertyEffects%60%20to%20provide%20option%20for%20skipping%0A%20%20%20%20%20*%20strict%20equality%20checking%20for%20Objects%20and%20Arrays.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20This%20method%20pulls%20the%20value%20to%20dirty%20check%20against%20from%20the%20%60__dataTemp%60%0A%20%20%20%20%20*%20cache%20(rather%20than%20the%20normal%20%60__data%60%20cache)%20for%20Objects.%20%20Since%20the%20temp%0A%20%20%20%20%20*%20cache%20is%20cleared%20at%20the%20end%20of%20a%20turn%2C%20this%20implementation%20allows%0A%20%20%20%20%20*%20side-effects%20of%20deep%20object%20changes%20to%20be%20processed%20by%20re-setting%20the%0A%20%20%20%20%20*%20same%20object%20(using%20the%20temp%20cache%20as%20an%20in-turn%20backstop%20to%20prevent%0A%20%20%20%20%20*%20cycles%20due%20to%202-way%20notification).%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40param%20%7Bstring%7D%20property%20Property%20name%0A%20%20%20%20%20*%20%40param%20%7B*%7D%20value%20New%20property%20value%0A%20%20%20%20%20*%20%40param%20%7B*%7D%20old%20Previous%20property%20value%0A%20%20%20%20%20*%20%40return%20%7Bboolean%7D%20Whether%20the%20property%20should%20be%20considered%20a%20change%0A%20%20%20%20%20*%20%40protected%0A%20%20%20%20%20*%2F_shouldPropertyChange%3Afunction%20_shouldPropertyChange(property%2Cvalue%2Cold)%7Breturn%20mutablePropertyChange(this%2Cproperty%2Cvalue%2Cold%2Ctrue)%3B%7D%7D%3B%2F**%0A%20%20%20*%20Legacy%20element%20behavior%20to%20add%20the%20optional%20ability%20to%20skip%20strict%0A%20%20%20*%20dirty-checking%20for%20objects%20and%20arrays%20(always%20consider%20them%20to%20be%0A%20%20%20*%20%22dirty%22)%20by%20setting%20a%20%60mutable-data%60%20attribute%20on%20an%20element%20instance.%0A%20%20%20*%0A%20%20%20*%20By%20default%2C%20%60Polymer.PropertyEffects%60%20performs%20strict%20dirty%20checking%20on%0A%20%20%20*%20objects%2C%20which%20means%20that%20any%20deep%20modifications%20to%20an%20object%20or%20array%20will%0A%20%20%20*%20not%20be%20propagated%20unless%20%22immutable%22%20data%20patterns%20are%20used%20(i.e.%20all%20object%0A%20%20%20*%20references%20from%20the%20root%20to%20the%20mutation%20were%20changed).%0A%20%20%20*%0A%20%20%20*%20Polymer%20also%20provides%20a%20proprietary%20data%20mutation%20and%20path%20notification%20API%0A%20%20%20*%20(e.g.%20%60notifyPath%60%2C%20%60set%60%2C%20and%20array%20mutation%20API's)%20that%20allow%20efficient%0A%20%20%20*%20mutation%20and%20notification%20of%20deep%20changes%20in%20an%20object%20graph%20to%20all%20elements%0A%20%20%20*%20bound%20to%20the%20same%20object%20graph.%0A%20%20%20*%0A%20%20%20*%20In%20cases%20where%20neither%20immutable%20patterns%20nor%20the%20data%20mutation%20API%20can%20be%0A%20%20%20*%20used%2C%20applying%20this%20mixin%20will%20allow%20Polymer%20to%20skip%20dirty%20checking%20for%0A%20%20%20*%20objects%20and%20arrays%20(always%20consider%20them%20to%20be%20%22dirty%22).%20%20This%20allows%20a%0A%20%20%20*%20user%20to%20make%20a%20deep%20modification%20to%20a%20bound%20object%20graph%2C%20and%20then%20either%0A%20%20%20*%20simply%20re-set%20the%20object%20(e.g.%20%60this.items%20%3D%20this.items%60)%20or%20call%20%60notifyPath%60%0A%20%20%20*%20(e.g.%20%60this.notifyPath('items')%60)%20to%20update%20the%20tree.%20%20Note%20that%20all%0A%20%20%20*%20elements%20that%20wish%20to%20be%20updated%20based%20on%20deep%20mutations%20must%20apply%20this%0A%20%20%20*%20mixin%20or%20otherwise%20skip%20strict%20dirty%20checking%20for%20objects%2Farrays.%0A%20%20%20*%20Specifically%2C%20any%20elements%20in%20the%20binding%20tree%20between%20the%20source%20of%20a%0A%20%20%20*%20mutation%20and%20the%20consumption%20of%20it%20must%20enable%20this%20behavior%20or%20apply%20the%0A%20%20%20*%20%60Polymer.OptionalMutableDataBehavior%60.%0A%20%20%20*%0A%20%20%20*%20While%20this%20behavior%20adds%20the%20ability%20to%20forgo%20Object%2FArray%20dirty%20checking%2C%0A%20%20%20*%20the%20%60mutableData%60%20flag%20defaults%20to%20false%20and%20must%20be%20set%20on%20the%20instance.%0A%20%20%20*%0A%20%20%20*%20Note%2C%20the%20performance%20characteristics%20of%20propagating%20large%20object%20graphs%0A%20%20%20*%20will%20be%20worse%20by%20relying%20on%20%60mutableData%3A%20true%60%20as%20opposed%20to%20using%0A%20%20%20*%20strict%20dirty%20checking%20with%20immutable%20patterns%20or%20Polymer's%20path%20notification%0A%20%20%20*%20API.%0A%20%20%20*%0A%20%20%20*%20%40polymerBehavior%0A%20%20%20*%20%40memberof%20Polymer%0A%20%20%20*%20%40summary%20Behavior%20to%20optionally%20skip%20strict%20dirty-checking%20for%20objects%20and%0A%20%20%20*%20%20%20arrays%0A%20%20%20*%2FPolymer.OptionalMutableDataBehavior%3D%7Bproperties%3A%7B%2F**%0A%20%20%20%20%20%20%20*%20Instance-level%20flag%20for%20configuring%20the%20dirty-checking%20strategy%0A%20%20%20%20%20%20%20*%20for%20this%20element.%20%20When%20true%2C%20Objects%20and%20Arrays%20will%20skip%20dirty%0A%20%20%20%20%20%20%20*%20checking%2C%20otherwise%20strict%20equality%20checking%20will%20be%20used.%0A%20%20%20%20%20%20%20*%2FmutableData%3ABoolean%7D%2C%2F**%0A%20%20%20%20%20*%20Overrides%20%60Polymer.PropertyEffects%60%20to%20skip%20strict%20equality%20checking%0A%20%20%20%20%20*%20for%20Objects%20and%20Arrays.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20Pulls%20the%20value%20to%20dirty%20check%20against%20from%20the%20%60__dataTemp%60%20cache%0A%20%20%20%20%20*%20(rather%20than%20the%20normal%20%60__data%60%20cache)%20for%20Objects.%20%20Since%20the%20temp%0A%20%20%20%20%20*%20cache%20is%20cleared%20at%20the%20end%20of%20a%20turn%2C%20this%20implementation%20allows%0A%20%20%20%20%20*%20side-effects%20of%20deep%20object%20changes%20to%20be%20processed%20by%20re-setting%20the%0A%20%20%20%20%20*%20same%20object%20(using%20the%20temp%20cache%20as%20an%20in-turn%20backstop%20to%20prevent%0A%20%20%20%20%20*%20cycles%20due%20to%202-way%20notification).%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40param%20%7Bstring%7D%20property%20Property%20name%0A%20%20%20%20%20*%20%40param%20%7B*%7D%20value%20New%20property%20value%0A%20%20%20%20%20*%20%40param%20%7B*%7D%20old%20Previous%20property%20value%0A%20%20%20%20%20*%20%40return%20%7Bboolean%7D%20Whether%20the%20property%20should%20be%20considered%20a%20change%0A%20%20%20%20%20*%20%40this%20%7Bthis%7D%0A%20%20%20%20%20*%20%40protected%0A%20%20%20%20%20*%2F_shouldPropertyChange%3Afunction%20_shouldPropertyChange(property%2Cvalue%2Cold)%7Breturn%20mutablePropertyChange(this%2Cproperty%2Cvalue%2Cold%2Cthis.mutableData)%3B%7D%7D%3B%7D)()%3B%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Fcpt-static.gannettdigital.com%2Funiversal-web-client%2Fmaster%2Flatest%2Fvendor%2Fcomponents%2Fpolymer%2Flib%2Flegacy%2Fmutable-data-behavior.html.js%0A | 6.8 kB | 2023-03-07 | 2024-01-25 | |
Pretty
Loading... | ||||
HTTP Transactions (134)
URL | IP | Response | Size | |||||||
---|---|---|---|---|---|---|---|---|---|---|
www.uticaod.com/story/sports/2021/01/23/section-iii-has-work-do-after-ny-covid-19-high-risk-high-school-sports-get-ok/6686662002/ | 151.101.130.62 | 302 https://eu.uticaod.com/story/sports/2021/01/23/section-iii-has-work-do-after-ny-covid-19-high-risk-high-school-sports-get-ok/6686662002/ | 0 B | |||||||
Detections
HTTP Headers
| ||||||||||
r3.o.lencr.org/ | 23.36.77.32 | 200 OK | 503 B | |||||||
HTTP Headers
| ||||||||||
r3.o.lencr.org/ | 23.36.77.32 | 200 OK | 503 B | |||||||
HTTP Headers
| ||||||||||
r3.o.lencr.org/ | 23.36.77.32 | 200 OK | 503 B | |||||||
HTTP Headers
| ||||||||||
firefox.settings.services.mozilla.com/v1/ | 35.241.9.150 | 200 OK | 939 B | |||||||
HTTP Headers
| ||||||||||
content-signature-2.cdn.mozilla.net/chains/remote-settings.content-signature.mozilla.org-2023-02-28-18-04-20.chain | 34.160.144.191 | 200 OK | 5.3 kB | |||||||
HTTP Headers
| ||||||||||
contile.services.mozilla.com/v1/tiles | 34.117.237.239 | 200 OK | 12 B | |||||||
HTTP Headers
| ||||||||||
firefox.settings.services.mozilla.com/v1/buckets/main/collections/ms-language-packs/records/cfr-v1-en-US | 35.241.9.150 | 200 OK | 329 B | |||||||
HTTP Headers
| ||||||||||
r3.o.lencr.org/ | 23.36.77.32 | 200 OK | 503 B | |||||||
HTTP Headers
| ||||||||||
eu.uticaod.com/story/sports/2021/01/23/section-iii-has-work-do-after-ny-covid-19-high-risk-high-school-sports-get-ok/6686662002/ | 151.101.2.62 | 200 OK | 40 kB | |||||||
HTTP Headers
| ||||||||||
cpt-static.gannettdigital.com/universal-web-client/master/latest/vendor/components/webcomponentsjs/webcomponents-loader.js | 151.101.2.62 | 200 OK | 1.5 kB | |||||||
HTTP Headers
| ||||||||||
cdn.cookielaw.org/scripttemplates/otSDKStub.js | 104.16.149.64 | 200 OK | 8.1 kB | |||||||
HTTP Headers
| ||||||||||
cpt-static.gannettdigital.com/universal-web-client/master/latest/vendor/components/webcomponentsjs/custom-elements-es5-adapter.js | 151.101.2.62 | 200 OK | 493 B | |||||||
HTTP Headers
| ||||||||||
cpt-static.gannettdigital.com/universal-web-client/master/latest/vendor/components/webcomponentsjs/webcomponents-hi.js | 151.101.2.62 | 200 OK | 3.7 kB | |||||||
HTTP Headers
| ||||||||||
cdn.cookielaw.org/consent/9fbf400a-c151-4467-98b3-87bd6edf354a/9fbf400a-c151-4467-98b3-87bd6edf354a.json | 104.16.149.64 | 200 OK | 1.7 kB | |||||||
HTTP Headers
| ||||||||||
cpt-static.gannettdigital.com/universal-web-client/master/latest/core/scripts/gallium.js | 151.101.130.62 | 200 OK | 3.6 kB | |||||||
HTTP Headers
| ||||||||||
cpt-static.gannettdigital.com/universal-web-client/master/latest/core/bundles/story.js | 151.101.130.62 | 200 OK | 115 kB | |||||||
HTTP Headers
| ||||||||||
cpt-static.gannettdigital.com/universal-web-client/master/latest/core/scripts/partner.js | 151.101.130.62 | 200 OK | 16 kB | |||||||
HTTP Headers
| ||||||||||
cdn.polyfill.io/v2/polyfill.js?features=default,fetch,Array.prototype.find,IntersectionObserver,IntersectionObserverEntry,Intl,Intl.~locale.en-US | 151.101.193.26 | 200 OK | 126 B | |||||||
HTTP Headers
| ||||||||||
cpt-static.gannettdigital.com/universal-web-client/master/latest/core/scripts/utils.js | 151.101.130.62 | 200 OK | 5.0 kB | |||||||
HTTP Headers
| ||||||||||
www.gannett-cdn.com/gannett-web/properties/uticaod/logos-and-branding/logo-default.svg | 151.101.2.62 | 200 OK | 4.3 kB | |||||||
HTTP Headers
| ||||||||||
cpt-static.gannettdigital.com/universal-web-client/master/latest/gallium/themes/universal.html | 151.101.130.62 | 200 OK | 5.4 kB | |||||||
HTTP Headers
| ||||||||||
cpt-static.gannettdigital.com/universal-web-client/master/latest/vendor/components/polymer/polymer.html | 151.101.130.62 | 200 OK | 566 B | |||||||
HTTP Headers
| ||||||||||
push.services.mozilla.com/ | 34.210.191.84 | 101 Switching Protocols | 0 B | |||||||
HTTP Headers
| ||||||||||
cpt-static.gannettdigital.com/universal-web-client/master/latest/gallium/themes/assets/universal/fonts/UnifySans_W_SBd.woff2 | 151.101.130.62 | 200 OK | 18 kB | |||||||
HTTP Headers
| ||||||||||
cpt-static.gannettdigital.com/universal-web-client/master/latest/gallium/themes/assets/universal/fonts/UnifySans_W_Bd.woff2 | 151.101.130.62 | 200 OK | 18 kB | |||||||
HTTP Headers
| ||||||||||
cpt-static.gannettdigital.com/universal-web-client/master/latest/gallium/themes/assets/universal/fonts/UnifySans_W_Rg.woff2 | 151.101.130.62 | 200 OK | 17 kB | |||||||
HTTP Headers
| ||||||||||
cpt-static.gannettdigital.com/universal-web-client/master/latest/gallium/themes/assets/universal/fonts/UnifySerif_W_Rg.woff2 | 151.101.130.62 | 200 OK | 21 kB | |||||||
HTTP Headers
| ||||||||||
cpt-static.gannettdigital.com/universal-web-client/master/latest/gallium/themes/assets/universal/fonts/UnifySerif_W_SBd.woff2 | 151.101.130.62 | 200 OK | 21 kB | |||||||
HTTP Headers
| ||||||||||
api.gannett-cdn.com/argon/navigation/1001018/top_nav_primary/?apiKey=f6YYPA1hPnB9Y9chky5GOmrZKmaguLVh | 151.101.130.62 | 200 OK | 845 B | |||||||
HTTP Headers
| ||||||||||
api.gannett-cdn.com/thorium/popular/NOBD/10?apiKey=TGgXAxAcR3ktiGl6cRsHSGsLS6ySi6yz&searchtype=socialReferrals | 151.101.130.62 | 200 OK | 3.3 kB | |||||||
HTTP Headers
| ||||||||||
api.gannett-cdn.com/thorium/breaking-news/?apiKey=TGgXAxAcR3ktiGl6cRsHSGsLS6ySi6yz&site-code=NOBD | 151.101.130.62 | 200 OK | 65 B | |||||||
HTTP Headers
| ||||||||||
user.uticaod.com/NOBD-GUP/user/ | 151.101.2.62 | 403 Forbidden | 465 B | |||||||
HTTP Headers
| ||||||||||
cpt-static.gannettdigital.com/universal-web-client/master/latest/elements/story/story-emphasis/story-emphasis.html | 151.101.130.62 | 200 OK | 1.7 kB | |||||||
HTTP Headers
| ||||||||||
cpt-static.gannettdigital.com/universal-web-client/master/latest/elements/partner/partner-nudge-media-video/partner-nudge-media-video.html | 151.101.130.62 | 200 OK | 1.7 kB | |||||||
HTTP Headers
| ||||||||||
cpt-static.gannettdigital.com/universal-web-client/master/latest/elements/partner/partner-comscore-media-video/partner-comscore-media-video.html | 151.101.130.62 | 200 OK | 2.3 kB | |||||||
HTTP Headers
| ||||||||||
cpt-static.gannettdigital.com/universal-web-client/master/latest/elements/partner/partner-omniture-heartbeat-media-video/partner-omniture-heartbeat-media-video.html | 151.101.130.62 | 200 OK | 5.2 kB | |||||||
HTTP Headers
| ||||||||||
api.gannett-cdn.com/thorium/popular/NOBD/5?searchtype=pageViews&ssts=sports&apiKey=TGgXAxAcR3ktiGl6cRsHSGsLS6ySi6yz | 151.101.130.62 | 200 OK | 1.6 kB | |||||||
HTTP Headers
| ||||||||||
atoms.uticaod.com/atoms-library/prod/dist/gannett-atoms-library.js | 151.101.2.62 | 200 OK | 16 kB | |||||||
HTTP Headers
| ||||||||||
cdn.cookielaw.org/scripttemplates/202210.1.0/otBannerSdk.js | 104.16.149.64 | 200 OK | 93 kB | |||||||
HTTP Headers
| ||||||||||
cpt-static.gannettdigital.com/universal-web-client/master/latest/vendor/components/polymer/lib/elements/custom-style.html | 151.101.130.62 | 200 OK | 2.1 kB | |||||||
HTTP Headers
| ||||||||||
cpt-static.gannettdigital.com/universal-web-client/master/latest/vendor/components/polymer/lib/legacy/legacy-element-mixin.html | 151.101.130.62 | 200 OK | 9.6 kB | |||||||
HTTP Headers
| ||||||||||
cpt-static.gannettdigital.com/universal-web-client/master/latest/vendor/components/polymer/lib/legacy/polymer-fn.html | 151.101.130.62 | 200 OK | 788 B | |||||||
HTTP Headers
| ||||||||||
cpt-static.gannettdigital.com/universal-web-client/master/latest/vendor/components/polymer/lib/legacy/templatizer-behavior.html | 151.101.130.62 | 200 OK | 2.2 kB | |||||||
HTTP Headers
| ||||||||||
cpt-static.gannettdigital.com/universal-web-client/master/latest/vendor/components/polymer/lib/elements/dom-bind.html | 151.101.130.62 | 200 OK | 2.1 kB | |||||||
HTTP Headers
| ||||||||||
cpt-static.gannettdigital.com/universal-web-client/master/latest/vendor/components/polymer/lib/elements/dom-repeat.html | 151.101.130.62 | 200 OK | 8.3 kB | |||||||
HTTP Headers
| ||||||||||
cpt-static.gannettdigital.com/universal-web-client/master/latest/vendor/components/polymer/lib/elements/array-selector.html | 151.101.130.62 | 200 OK | 4.0 kB | |||||||
HTTP Headers
| ||||||||||
cpt-static.gannettdigital.com/universal-web-client/master/latest/vendor/components/polymer/lib/elements/dom-if.html | 151.101.130.62 | 200 OK | 4.0 kB | |||||||
HTTP Headers
| ||||||||||
cpt-static.gannettdigital.com/universal-web-client/master/latest/vendor/components/polymer/lib/legacy/mutable-data-behavior.html | 151.101.130.62 | 200 OK | 1.9 kB | |||||||
HTTP Headers
| ||||||||||
cpt-static.gannettdigital.com/universal-web-client/master/latest/vendor/components/polymer/lib/utils/html-tag.html | 151.101.130.62 | 200 OK | 1.9 kB | |||||||
HTTP Headers
| ||||||||||
cpt-static.gannettdigital.com/universal-web-client/master/latest/gallium/behaviors/gallium-i18n.html | 151.101.130.62 | 200 OK | 3.0 kB | |||||||
HTTP Headers
| ||||||||||
cpt-static.gannettdigital.com/universal-web-client/master/latest/gallium/mixins/video-utils.html | 151.101.130.62 | 200 OK | 3.6 kB | |||||||
HTTP Headers
| ||||||||||
atoms.uticaod.com/atoms-configs/prod/dist/uw/NOBD/control/journey.json | 151.101.2.62 | 200 OK | 2.2 kB | |||||||
HTTP Headers
| ||||||||||
cpt-static.gannettdigital.com/universal-web-client/master/latest/elements/promo/promo-premium-indicator/promo-premium-indicator.html | 151.101.130.62 | 200 OK | 1.0 kB | |||||||
HTTP Headers
| ||||||||||
cpt-static.gannettdigital.com/universal-web-client/master/latest/elements/vendor/adobe/visitor-api.html | 151.101.130.62 | 200 OK | 113 B | |||||||
HTTP Headers
| ||||||||||
cpt-static.gannettdigital.com/universal-web-client/master/latest/elements/vendor/adobe/heartbeat-api.html | 151.101.130.62 | 200 OK | 116 B | |||||||
HTTP Headers
| ||||||||||
cpt-static.gannettdigital.com/universal-web-client/master/latest/elements/vendor/adobe/app-measurement.html | 151.101.130.62 | 200 OK | 113 B | |||||||
HTTP Headers
| ||||||||||
cpt-static.gannettdigital.com/universal-web-client/master/latest/gallium/behaviors/gallium-element.html | 151.101.130.62 | 200 OK | 731 B | |||||||
HTTP Headers
| ||||||||||
cpt-static.gannettdigital.com/universal-web-client/master/latest/gallium/behaviors/analytics-element-behavior.html | 151.101.130.62 | 200 OK | 2.1 kB | |||||||
HTTP Headers
| ||||||||||
www.gannett-cdn.com/presto/2023/01/21/NOBD/6fcd6751-faef-40d2-9089-0167b42dd058-DSC_7652.JPG?crop=2371,2371,x843,y0&width=124&quality=50 | 151.101.2.62 | 200 OK | 3.4 kB | |||||||
HTTP Headers
| ||||||||||
www.gannett-cdn.com/presto/2023/01/21/NOBD/53d17091-bce6-480f-8d36-4ff1649a4839-DSC_8019.JPG?crop=3231,3231,x288,y0&width=124&quality=50 | 151.101.2.62 | 200 OK | 4.0 kB | |||||||
HTTP Headers
| ||||||||||
www.gannett-cdn.com/presto/2023/01/18/NOBD/8548a52a-65ab-4652-b9bd-6e76adca3d64-78.14.jpg?crop=3486,3486,x218,y0&width=124&quality=50 | 151.101.2.62 | 200 OK | 2.0 kB | |||||||
HTTP Headers
| ||||||||||
www.gannett-cdn.com/presto/2023/01/14/NOBD/c200389f-2679-4eb2-8162-0a43cfb77251-DSC_5762.JPG?crop=2742,2742,x459,y0&width=124&quality=50 | 151.101.2.62 | 200 OK | 3.7 kB | |||||||
HTTP Headers
| ||||||||||
cdn.cookielaw.org/consent/9fbf400a-c151-4467-98b3-87bd6edf354a/2950a491-2ba4-41c2-bfe3-fb57175517f5/en.json | 104.16.149.64 | 200 OK | 26 kB | |||||||
HTTP Headers
| ||||||||||
www.gannett-cdn.com/presto/2023/01/19/NOBD/a9fc11ad-5c02-49d3-a373-999a20db3a3f-DSC_7140.JPG?crop=1744,1744,x128,y247&width=124&quality=50 | 151.101.2.62 | 200 OK | 3.8 kB | |||||||
HTTP Headers
| ||||||||||
cdn.cookielaw.org/vendorlist/iab2Data.json | 104.16.149.64 | 200 OK | 54 kB | |||||||
HTTP Headers
| ||||||||||
cpt-static.gannettdigital.com/universal-web-client/master/latest/elements/partner/partner-comscore-media-video/comscore-api.html | 151.101.130.62 | 200 OK | 131 B | |||||||
HTTP Headers
| ||||||||||
cdn.cookielaw.org/scripttemplates/202210.1.0/otTCF.js | 104.16.149.64 | 200 OK | 15 kB | |||||||
HTTP Headers
| ||||||||||
cpt-static.gannettdigital.com/universal-web-client/master/latest/vendor/components/shadycss/custom-style-interface.html | 151.101.130.62 | 200 OK | 326 B | |||||||
HTTP Headers
| ||||||||||
cpt-static.gannettdigital.com/universal-web-client/master/latest/vendor/components/polymer/lib/utils/style-gather.html | 151.101.130.62 | 200 OK | 2.5 kB | |||||||
HTTP Headers
| ||||||||||
cpt-static.gannettdigital.com/universal-web-client/master/latest/vendor/components/shadycss/apply-shim.html | 151.101.130.62 | 200 OK | 320 B | |||||||
HTTP Headers
| ||||||||||
cpt-static.gannettdigital.com/universal-web-client/master/latest/vendor/components/polymer/lib/mixins/gesture-event-listeners.html | 151.101.130.62 | 200 OK | 1.7 kB | |||||||
HTTP Headers
| ||||||||||
cpt-static.gannettdigital.com/universal-web-client/master/latest/vendor/components/polymer/lib/mixins/element-mixin.html | 151.101.130.62 | 200 OK | 9.3 kB | |||||||
HTTP Headers
| ||||||||||
cpt-static.gannettdigital.com/universal-web-client/master/latest/vendor/components/polymer/lib/utils/mixin.html | 151.101.130.62 | 200 OK | 1.0 kB | |||||||
HTTP Headers
| ||||||||||
cpt-static.gannettdigital.com/universal-web-client/master/latest/vendor/components/polymer/lib/mixins/dir-mixin.html | 151.101.130.62 | 200 OK | 2.6 kB | |||||||
HTTP Headers
| ||||||||||
cpt-static.gannettdigital.com/universal-web-client/master/latest/vendor/components/polymer/lib/utils/import-href.html | 151.101.130.62 | 200 OK | 1.5 kB | |||||||
HTTP Headers
| ||||||||||
cpt-static.gannettdigital.com/universal-web-client/master/latest/vendor/components/polymer/lib/utils/render-status.html | 151.101.130.62 | 200 OK | 1.2 kB | |||||||
HTTP Headers
| ||||||||||
cpt-static.gannettdigital.com/universal-web-client/master/latest/vendor/components/polymer/lib/utils/unresolved.html | 151.101.130.62 | 200 OK | 465 B | |||||||
HTTP Headers
| ||||||||||
cpt-static.gannettdigital.com/universal-web-client/master/latest/vendor/components/polymer/lib/legacy/polymer.dom.html | 151.101.130.62 | 200 OK | 3.6 kB | |||||||
HTTP Headers
| ||||||||||
cpt-static.gannettdigital.com/universal-web-client/master/latest/vendor/components/polymer/lib/legacy/class.html | 151.101.130.62 | 200 OK | 6.1 kB | |||||||
HTTP Headers
| ||||||||||
cpt-static.gannettdigital.com/universal-web-client/master/latest/vendor/components/polymer/lib/utils/templatize.html | 151.101.130.62 | 200 OK | 7.5 kB | |||||||
HTTP Headers
| ||||||||||
cpt-static.gannettdigital.com/universal-web-client/master/latest/vendor/components/polymer/lib/utils/boot.html | 151.101.130.62 | 200 OK | 1.0 kB | |||||||
HTTP Headers
| ||||||||||
atoms.uticaod.com/atoms-components/prod/dist/gannett-atoms-components/gannett-atoms-components.esm.js | 151.101.2.62 | 200 OK | 3.9 kB | |||||||
HTTP Headers
| ||||||||||
cpt-static.gannettdigital.com/universal-web-client/master/latest/vendor/components/polymer/lib/mixins/property-effects.html | 151.101.130.62 | 200 OK | 26 kB | |||||||
HTTP Headers
| ||||||||||
cpt-static.gannettdigital.com/universal-web-client/master/latest/vendor/components/polymer/lib/mixins/mutable-data.html | 151.101.130.62 | 200 OK | 2.9 kB | |||||||
HTTP Headers
| ||||||||||
cpt-static.gannettdigital.com/universal-web-client/master/latest/elements/ui/ui-icon/ui-icon.html | 151.101.130.62 | 200 OK | 18 kB | |||||||
HTTP Headers
| ||||||||||
cpt-static.gannettdigital.com/universal-web-client/master/latest/vendor/components/polymer/lib/utils/debounce.html | 151.101.130.62 | 200 OK | 1.6 kB | |||||||
HTTP Headers
| ||||||||||
cpt-static.gannettdigital.com/universal-web-client/master/latest/vendor/components/polymer/lib/utils/flush.html | 151.101.130.62 | 200 OK | 723 B | |||||||
HTTP Headers
| ||||||||||
cpt-static.gannettdigital.com/universal-web-client/master/latest/vendor/components/polymer/lib/utils/array-splice.html | 151.101.130.62 | 200 OK | 2.9 kB | |||||||
HTTP Headers
| ||||||||||
cpt-static.gannettdigital.com/universal-web-client/master/latest/vendor/components/polymer/polymer-element.html | 151.101.130.62 | 200 OK | 690 B | |||||||
HTTP Headers
| ||||||||||
cpt-static.gannettdigital.com/universal-web-client/master/latest/vendor/components/iron-ajax/iron-ajax.html | 151.101.130.62 | 200 OK | 4.7 kB | |||||||
HTTP Headers
| ||||||||||
atoms.uticaod.com/atoms-components/prod/dist/gannett-atoms-components/p-0cb08652.js | 151.101.2.62 | 200 OK | 4.3 kB | |||||||
HTTP Headers
| ||||||||||
www.gannett-cdn.com/sites/uticaod/images/favicon.png | 151.101.2.62 | 200 OK | 370 B | |||||||
HTTP Headers
| ||||||||||
cdn.cookielaw.org/scripttemplates/202210.1.0/assets/otCenterRounded.json | 104.16.149.64 | 200 OK | 2.6 kB | |||||||
HTTP Headers
| ||||||||||
atoms.uticaod.com/atoms-components/prod/dist/gannett-atoms-components/p-5ac45bac.entry.js | 151.101.2.62 | 200 OK | 3.2 kB | |||||||
HTTP Headers
| ||||||||||
atoms.uticaod.com/atoms-components/prod/dist/gannett-atoms-components/p-07e64061.js | 151.101.2.62 | 200 OK | 1.3 kB | |||||||
HTTP Headers
| ||||||||||
cdn.cookielaw.org/scripttemplates/202210.1.0/assets/otCommonStyles.css | 104.16.149.64 | 200 OK | 4.8 kB | |||||||
HTTP Headers
| ||||||||||
cpt-static.gannettdigital.com/universal-web-client/master/latest/vendor/components/polymer/lib/utils/gestures.html | 151.101.130.62 | 200 OK | 7.9 kB | |||||||
HTTP Headers
| ||||||||||
cpt-static.gannettdigital.com/universal-web-client/master/latest/vendor/components/polymer/lib/utils/settings.html | 151.101.130.62 | 200 OK | 1.5 kB | |||||||
HTTP Headers
| ||||||||||
cpt-static.gannettdigital.com/universal-web-client/master/latest/vendor/components/polymer/lib/elements/dom-module.html | 151.101.130.62 | 200 OK | 2.7 kB | |||||||
HTTP Headers
| ||||||||||
cpt-static.gannettdigital.com/universal-web-client/master/latest/vendor/components/polymer/lib/mixins/properties-mixin.html | 151.101.130.62 | 200 OK | 3.1 kB | |||||||
HTTP Headers
| ||||||||||
cpt-static.gannettdigital.com/universal-web-client/master/latest/vendor/components/polymer/lib/mixins/property-accessors.html | 151.101.130.62 | 200 OK | 4.3 kB | |||||||
HTTP Headers
| ||||||||||
cpt-static.gannettdigital.com/universal-web-client/master/latest/vendor/components/polymer/lib/utils/flattened-nodes-observer.html | 151.101.130.62 | 200 OK | 3.0 kB | |||||||
HTTP Headers
| ||||||||||
cpt-static.gannettdigital.com/universal-web-client/master/latest/vendor/components/polymer/lib/utils/path.html | 151.101.130.62 | 200 OK | 2.0 kB | |||||||
HTTP Headers
| ||||||||||
cpt-static.gannettdigital.com/universal-web-client/master/latest/vendor/components/polymer/lib/utils/case-map.html | 151.101.130.62 | 200 OK | 784 B | |||||||
HTTP Headers
| ||||||||||
cpt-static.gannettdigital.com/universal-web-client/master/latest/vendor/components/polymer/lib/mixins/template-stamp.html | 151.101.130.62 | 200 OK | 6.0 kB | |||||||
HTTP Headers
| ||||||||||
cpt-static.gannettdigital.com/universal-web-client/master/latest/vendor/components/polymer/lib/utils/async.html | 151.101.130.62 | 200 OK | 1.7 kB | |||||||
HTTP Headers
| ||||||||||
atoms.uticaod.com/atoms-components/prod/dist/gannett-atoms-components/p-ea758920.entry.js | 151.101.2.62 | 200 OK | 382 B | |||||||
HTTP Headers
| ||||||||||
cpt-static.gannettdigital.com/universal-web-client/master/latest/vendor/components/iron-ajax/iron-request.html | 151.101.130.62 | 200 OK | 4.3 kB | |||||||
HTTP Headers
| ||||||||||
user.uticaod.com/NOBD-GUP/user/newsletters/ | 151.101.2.62 | 403 Forbidden | 465 B | |||||||
HTTP Headers
| ||||||||||
cpt-static.gannettdigital.com/universal-web-client/master/latest/vendor/components/polymer/lib/utils/telemetry.html | 151.101.130.62 | 200 OK | 776 B | |||||||
HTTP Headers
| ||||||||||
cpt-static.gannettdigital.com/universal-web-client/master/latest/vendor/components/polymer/lib/mixins/properties-changed.html | 151.101.130.62 | 200 OK | 5.6 kB | |||||||
HTTP Headers
| ||||||||||
r3.o.lencr.org/ | 23.36.77.32 | 200 OK | 503 B | |||||||
HTTP Headers
| ||||||||||
r3.o.lencr.org/ | 23.36.77.32 | 200 OK | 503 B | |||||||
HTTP Headers
| ||||||||||
r3.o.lencr.org/ | 23.36.77.32 | 200 OK | 503 B | |||||||
HTTP Headers
| ||||||||||
r3.o.lencr.org/ | 23.36.77.32 | 200 OK | 503 B | |||||||
HTTP Headers
| ||||||||||
r3.o.lencr.org/ | 23.36.77.32 | 200 OK | 503 B | |||||||
HTTP Headers
| ||||||||||
img-getpocket.cdn.mozilla.net/296x148/filters:format(jpeg):quality(60):no_upscale():strip_exif()/https%3A%2F%2Fs3.amazonaws.com%2Fpocket-curatedcorpusapi-prod-images%2F8017df09-37d9-4c4b-9051-0442b3eb8fbf.jpeg | 34.120.237.76 | 200 OK | 9.3 kB | |||||||
HTTP Headers
| ||||||||||
img-getpocket.cdn.mozilla.net/296x148/filters:format(jpeg):quality(60):no_upscale():strip_exif()/https%3A%2F%2Fs3.amazonaws.com%2Fpocket-curatedcorpusapi-prod-images%2F6418a71b-f89d-45d1-bc77-36d6312f560b.jpeg | 34.120.237.76 | 200 OK | 5.9 kB | |||||||
HTTP Headers
| ||||||||||
img-getpocket.cdn.mozilla.net/296x148/filters:format(jpeg):quality(60):no_upscale():strip_exif()/https%3A%2F%2Fs3.amazonaws.com%2Fpocket-curatedcorpusapi-prod-images%2F09ccbe5e-77b1-4d6d-98f5-a477f3861d8c.jpeg | 34.120.237.76 | 200 OK | 13 kB | |||||||
HTTP Headers
| ||||||||||
img-getpocket.cdn.mozilla.net/296x148/filters:format(jpeg):quality(60):no_upscale():strip_exif()/https%3A%2F%2Fs3.amazonaws.com%2Fpocket-curatedcorpusapi-prod-images%2F05a55fc3-efb4-4124-a48d-b57fc1e9bea4.jpeg | 34.120.237.76 | 200 OK | 7.4 kB | |||||||
HTTP Headers
| ||||||||||
img-getpocket.cdn.mozilla.net/296x148/filters:format(jpeg):quality(60):no_upscale():strip_exif()/https%3A%2F%2Fs3.amazonaws.com%2Fpocket-curatedcorpusapi-prod-images%2Fa3e6d9a5-dd7d-4337-a00f-a145350a1a29.jpeg | 34.120.237.76 | 200 OK | 10 kB | |||||||
HTTP Headers
| ||||||||||
img-getpocket.cdn.mozilla.net/296x148/filters:format(jpeg):quality(60):no_upscale():strip_exif()/https%3A%2F%2Fs3.amazonaws.com%2Fpocket-curatedcorpusapi-prod-images%2F6a8a63ec-e0a4-4297-b143-649ad3968ae8.jpeg | 34.120.237.76 | 200 OK | 9.6 kB | |||||||
HTTP Headers
| ||||||||||
cpt-static.gannettdigital.com/universal-web-client/master/latest/vendor/components/shadycss/custom-style-interface.min.js | 151.101.2.62 | 200 OK | 1.3 kB | |||||||
HTTP Headers
| ||||||||||
cpt-static.gannettdigital.com/universal-web-client/master/latest/vendor/components/shadycss/apply-shim.min.js | 151.101.2.62 | 200 OK | 4.3 kB | |||||||
HTTP Headers
| ||||||||||
www.gannett-cdn.com/presto/2021/01/23/NOBD/6238bc72-11ea-4c62-8e91-131fa437a74c-Basketball0123.jpg?crop=3599,2025,x0,y721&width=2560 | 151.101.2.62 | 200 OK | 399 kB | |||||||
HTTP Headers
| ||||||||||
cpt-static.gannettdigital.com/universal-web-client/master/latest/vendor/components/intl-messageformat/dist/intl-messageformat.min.js | 151.101.2.62 | 200 OK | 5.0 kB | |||||||
HTTP Headers
| ||||||||||
cpt-static.gannettdigital.com/universal-web-client/master/latest/vendor/comscore/streamsense.5.1.1.160316.min.js | 151.101.2.62 | 200 OK | 17 kB | |||||||
HTTP Headers
| ||||||||||
cpt-static.gannettdigital.com/universal-web-client/master/latest/vendor/adobe/VisitorAPI.js | 151.101.2.62 | 200 OK | 15 kB | |||||||
HTTP Headers
| ||||||||||
cpt-static.gannettdigital.com/universal-web-client/master/latest/vendor/adobe/AppMeasurement.js | 151.101.2.62 | 200 OK | 14 kB | |||||||
HTTP Headers
| ||||||||||
cpt-static.gannettdigital.com/universal-web-client/master/latest/vendor/adobe/VideoHeartbeat.min.js | 151.101.2.62 | 200 OK | 34 kB | |||||||
HTTP Headers
| ||||||||||
js-agent.newrelic.com/nr-spa-1044.min.js | 151.101.130.137 | 200 OK | 12 kB | |||||||
HTTP Headers
| ||||||||||
bam.nr-data.net/1/b7ac0e2ada?a=20128261&sa=1&v=1044.a6554e7&t=Unnamed%20Transaction&rst=3388&ref=https://eu.uticaod.com/story/sports/2021/01/23/section-iii-has-work-do-after-ny-covid-19-high-risk-high-school-sports-get-ok/6686662002/&be=1135&fe=3299&dc=1618&af=err,xhr,stn,ins,spa&perf=%7B%22timing%22:%7B%22of%22:1674762008358,%22n%22:0,%22f%22:378,%22dn%22:402,%22dne%22:476,%22c%22:476,%22s%22:491,%22ce%22:518,%22rq%22:518,%22rp%22:1071,%22rpe%22:1071,%22dl%22:1082,%22di%22:1356,%22ds%22:1618,%22de%22:1621,%22dc%22:3298,%22l%22:3298,%22le%22:3300%7D,%22navigation%22:%7B%7D%7D&jsonp=NREUM.setToken | 162.247.241.14 | 200 OK | 82 B | |||||||
HTTP Headers
| ||||||||||
bam.nr-data.net/events/1/b7ac0e2ada?a=20128261&sa=1&v=1044.a6554e7&t=Unnamed%20Transaction&rst=3623&ref=https://eu.uticaod.com/story/sports/2021/01/23/section-iii-has-work-do-after-ny-covid-19-high-risk-high-school-sports-get-ok/6686662002/ | 162.247.241.14 | 200 OK | 24 B | |||||||
HTTP Headers
| ||||||||||