Skip to content

Instantly share code, notes, and snippets.

@deadsound
Created March 23, 2020 00:06
Show Gist options
  • Save deadsound/f804b87b53629ea1ffeae68df6a22fbc to your computer and use it in GitHub Desktop.
Save deadsound/f804b87b53629ea1ffeae68df6a22fbc to your computer and use it in GitHub Desktop.
Electron Fiddle Gist
<!DOCTYPE html>
<html><head><meta name="GCD" content="YTk3ODQ3ZWZhN2I4NzZmMzBkNTEwYjJl4f32cd8b586df346510aad001c1425d9"/>
<meta charset="utf-8">
<meta name="generator" content="Google Web Designer 7.1.1.1210">
<meta name="template" content="Banner 3.0.0">
<meta name="environment" content="gwd-dv360">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>.gwd-inactive{visibility:hidden}gwd-page{display:block}</style>
<style>.gwd-pagedeck{position:relative;display:block}.gwd-pagedeck>.gwd-page.transparent{opacity:0}.gwd-pagedeck>.gwd-page{position:absolute;top:0;left:0;-webkit-transition-property:-webkit-transform,opacity;-moz-transition-property:transform,opacity;transition-property:transform,opacity}.gwd-pagedeck>.gwd-page.linear{transition-timing-function:linear}.gwd-pagedeck>.gwd-page.ease-in{transition-timing-function:ease-in}.gwd-pagedeck>.gwd-page.ease-out{transition-timing-function:ease-out}.gwd-pagedeck>.gwd-page.ease{transition-timing-function:ease}.gwd-pagedeck>.gwd-page.ease-in-out{transition-timing-function:ease-in-out}.linear *,.ease-in *,.ease-out *,.ease *,.ease-in-out *{-webkit-transform:translateZ(0);transform:translateZ(0)}</style>
<style>div[is=gwd-page].fs,gwd-page.fs{border:none}</style>
<style type="text/css" id="gwd-lightbox-style">.gwd-lightbox{overflow:hidden}</style>
<style type="text/css" id="gwd-text-style">p{margin:0px}h1{margin:0px}h2{margin:0px}h3{margin:0px}</style>
<style type="text/css">html,body{width:100%;height:100%;margin:0px}.gwd-page-container{position:relative;width:100%;height:100%}.gwd-page-content{background-color:transparent;transform:matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);-webkit-transform:matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);-moz-transform:matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);perspective:1400px;-webkit-perspective:1400px;-moz-perspective:1400px;transform-style:preserve-3d;-webkit-transform-style:preserve-3d;-moz-transform-style:preserve-3d;position:absolute}.gwd-page-wrapper{background-color:#fff;position:absolute;transform:translateZ(0);-webkit-transform:translateZ(0);-moz-transform:translateZ(0)}.gwd-page-size{width:480px;height:320px}.gwd-page-oudd{background-image:none;background-color:rgba(12,12,12,0)}.gwd-button-18ey{position:absolute;width:100px;height:24px;left:-104px;top:290px;transform-style:preserve-3d;-webkit-transform-style:preserve-3d;-moz-transform-style:preserve-3d;transform:translate3d(-2px, 0, 0);-webkit-transform:translate3d(-2px, 0, 0);-moz-transform:translate3d(-2px, 0, 0)}@keyframes gwd-gen-101lgwdanimation_gwd-keyframes{0%{transform:translate3d(-2px, 0, 0);-webkit-transform:translate3d(-2px, 0, 0);-moz-transform:translate3d(-2px, 0, 0);animation-timing-function:ease;-webkit-animation-timing-function:ease;-moz-animation-timing-function:ease}100%{transform:translate3d(113px, 0, 0);-webkit-transform:translate3d(113px, 0, 0);-moz-transform:translate3d(113px, 0, 0);animation-timing-function:linear;-webkit-animation-timing-function:linear;-moz-animation-timing-function:linear}}@-webkit-keyframes gwd-gen-101lgwdanimation_gwd-keyframes{0%{-webkit-transform:translate3d(-2px, 0, 0);-webkit-animation-timing-function:ease}100%{-webkit-transform:translate3d(113px, 0, 0);-webkit-animation-timing-function:linear}}@-moz-keyframes gwd-gen-101lgwdanimation_gwd-keyframes{0%{-moz-transform:translate3d(-2px, 0, 0);-moz-animation-timing-function:ease}100%{-moz-transform:translate3d(113px, 0, 0);-moz-animation-timing-function:linear}}#page1.gwd-play-animation .gwd-gen-101lgwdanimation{animation:1s linear 0s 1 normal forwards gwd-gen-101lgwdanimation_gwd-keyframes;-webkit-animation:1s linear 0s 1 normal forwards gwd-gen-101lgwdanimation_gwd-keyframes;-moz-animation:1s linear 0s 1 normal forwards gwd-gen-101lgwdanimation_gwd-keyframes}</style>
<script data-source="googbase_min.js" data-version="4" data-exports-type="googbase">(function(){(window.goog=window.goog||{}).inherits=function(a,c){function b(){}b.prototype=c.prototype;a.prototype=new b;a.prototype.constructor=a};}).call(this);
</script>
<script data-source="gwd_webcomponents_min.js" data-version="6" data-exports-type="gwd_webcomponents">"undefined"==typeof document.register&&(document.register=function(a){return document.registerElement.apply(document,arguments)});document.createElement||(document.createElement=document.constructor.prototype.createElement,document.createElementNS=document.constructor.prototype.createElementNS);
/**
* @license
* Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
* This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
* The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
* The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
* Code distributed by Google as part of the polymer project is also
* subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/
// @version 0.7.24-5b70476
"undefined"==typeof WeakMap&&!function(){var e=Object.defineProperty,t=Date.now()%1e9,n=function(){this.name="__st"+(1e9*Math.random()>>>0)+(t++ +"__")};n.prototype={set:function(t,n){var o=t[this.name];return o&&o[0]===t?o[1]=n:e(t,this.name,{value:[t,n],writable:!0}),this},get:function(e){var t;return(t=e[this.name])&&t[0]===e?t[1]:void 0},"delete":function(e){var t=e[this.name];return!(!t||t[0]!==e)&&(t[0]=t[1]=void 0,!0)},has:function(e){var t=e[this.name];return!!t&&t[0]===e}},window.WeakMap=n}(),function(e){function t(e){E.push(e),b||(b=!0,m(o))}function n(e){return window.ShadowDOMPolyfill&&window.ShadowDOMPolyfill.wrapIfNeeded(e)||e}function o(){b=!1;var e=E;E=[],e.sort(function(e,t){return e.uid_-t.uid_});var t=!1;e.forEach(function(e){var n=e.takeRecords();r(e),n.length&&(e.callback_(n,e),t=!0)}),t&&o()}function r(e){e.nodes_.forEach(function(t){var n=v.get(t);n&&n.forEach(function(t){t.observer===e&&t.removeTransientObservers()})})}function i(e,t){for(var n=e;n;n=n.parentNode){var o=v.get(n);if(o)for(var r=0;r<o.length;r++){var i=o[r],a=i.options;if(n===e||a.subtree){var d=t(a);d&&i.enqueue(d)}}}}function a(e){this.callback_=e,this.nodes_=[],this.records_=[],this.uid_=++_}function d(e,t){this.type=e,this.target=t,this.addedNodes=[],this.removedNodes=[],this.previousSibling=null,this.nextSibling=null,this.attributeName=null,this.attributeNamespace=null,this.oldValue=null}function s(e){var t=new d(e.type,e.target);return t.addedNodes=e.addedNodes.slice(),t.removedNodes=e.removedNodes.slice(),t.previousSibling=e.previousSibling,t.nextSibling=e.nextSibling,t.attributeName=e.attributeName,t.attributeNamespace=e.attributeNamespace,t.oldValue=e.oldValue,t}function u(e,t){return y=new d(e,t)}function c(e){return N?N:(N=s(y),N.oldValue=e,N)}function l(){y=N=void 0}function f(e){return e===N||e===y}function p(e,t){return e===t?e:N&&f(e)?N:null}function w(e,t,n){this.observer=e,this.target=t,this.options=n,this.transientObservedNodes=[]}if(!e.JsMutationObserver){var m,v=new WeakMap;if(/Trident|Edge/.test(navigator.userAgent))m=setTimeout;else if(window.setImmediate)m=window.setImmediate;else{var h=[],g=String(Math.random());window.addEventListener("message",function(e){if(e.data===g){var t=h;h=[],t.forEach(function(e){e()})}}),m=function(e){h.push(e),window.postMessage(g,"*")}}var b=!1,E=[],_=0;a.prototype={observe:function(e,t){if(e=n(e),!t.childList&&!t.attributes&&!t.characterData||t.attributeOldValue&&!t.attributes||t.attributeFilter&&t.attributeFilter.length&&!t.attributes||t.characterDataOldValue&&!t.characterData)throw new SyntaxError;var o=v.get(e);o||v.set(e,o=[]);for(var r,i=0;i<o.length;i++)if(o[i].observer===this){r=o[i],r.removeListeners(),r.options=t;break}r||(r=new w(this,e,t),o.push(r),this.nodes_.push(e)),r.addListeners()},disconnect:function(){this.nodes_.forEach(function(e){for(var t=v.get(e),n=0;n<t.length;n++){var o=t[n];if(o.observer===this){o.removeListeners(),t.splice(n,1);break}}},this),this.records_=[]},takeRecords:function(){var e=this.records_;return this.records_=[],e}};var y,N;w.prototype={enqueue:function(e){var n=this.observer.records_,o=n.length;if(n.length>0){var r=n[o-1],i=p(r,e);if(i)return void(n[o-1]=i)}else t(this.observer);n[o]=e},addListeners:function(){this.addListeners_(this.target)},addListeners_:function(e){var t=this.options;t.attributes&&e.addEventListener("DOMAttrModified",this,!0),t.characterData&&e.addEventListener("DOMCharacterDataModified",this,!0),t.childList&&e.addEventListener("DOMNodeInserted",this,!0),(t.childList||t.subtree)&&e.addEventListener("DOMNodeRemoved",this,!0)},removeListeners:function(){this.removeListeners_(this.target)},removeListeners_:function(e){var t=this.options;t.attributes&&e.removeEventListener("DOMAttrModified",this,!0),t.characterData&&e.removeEventListener("DOMCharacterDataModified",this,!0),t.childList&&e.removeEventListener("DOMNodeInserted",this,!0),(t.childList||t.subtree)&&e.removeEventListener("DOMNodeRemoved",this,!0)},addTransientObserver:function(e){if(e!==this.target){this.addListeners_(e),this.transientObservedNodes.push(e);var t=v.get(e);t||v.set(e,t=[]),t.push(this)}},removeTransientObservers:function(){var e=this.transientObservedNodes;this.transientObservedNodes=[],e.forEach(function(e){this.removeListeners_(e);for(var t=v.get(e),n=0;n<t.length;n++)if(t[n]===this){t.splice(n,1);break}},this)},handleEvent:function(e){switch(e.stopImmediatePropagation(),e.type){case"DOMAttrModified":var t=e.attrName,n=e.relatedNode.namespaceURI,o=e.target,r=new u("attributes",o);r.attributeName=t,r.attributeNamespace=n;var a=e.attrChange===MutationEvent.ADDITION?null:e.prevValue;i(o,function(e){if(e.attributes&&(!e.attributeFilter||!e.attributeFilter.length||e.attributeFilter.indexOf(t)!==-1||e.attributeFilter.indexOf(n)!==-1))return e.attributeOldValue?c(a):r});break;case"DOMCharacterDataModified":var o=e.target,r=u("characterData",o),a=e.prevValue;i(o,function(e){if(e.characterData)return e.characterDataOldValue?c(a):r});break;case"DOMNodeRemoved":this.addTransientObserver(e.target);case"DOMNodeInserted":var d,s,f=e.target;"DOMNodeInserted"===e.type?(d=[f],s=[]):(d=[],s=[f]);var p=f.previousSibling,w=f.nextSibling,r=u("childList",e.target.parentNode);r.addedNodes=d,r.removedNodes=s,r.previousSibling=p,r.nextSibling=w,i(e.relatedNode,function(e){if(e.childList)return r})}l()}},e.JsMutationObserver=a,e.MutationObserver||(e.MutationObserver=a,a._isPolyfilled=!0)}}(self),function(e){"use strict";if(!window.performance||!window.performance.now){var t=Date.now();window.performance={now:function(){return Date.now()-t}}}window.requestAnimationFrame||(window.requestAnimationFrame=function(){var e=window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame;return e?function(t){return e(function(){t(performance.now())})}:function(e){return window.setTimeout(e,1e3/60)}}()),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(){return window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||function(e){clearTimeout(e)}}());var n=function(){var e=document.createEvent("Event");return e.initEvent("foo",!0,!0),e.preventDefault(),e.defaultPrevented}();if(!n){var o=Event.prototype.preventDefault;Event.prototype.preventDefault=function(){this.cancelable&&(o.call(this),Object.defineProperty(this,"defaultPrevented",{get:function(){return!0},configurable:!0}))}}var r=/Trident/.test(navigator.userAgent);if((!window.CustomEvent||r&&"function"!=typeof window.CustomEvent)&&(window.CustomEvent=function(e,t){t=t||{};var n=document.createEvent("CustomEvent");return n.initCustomEvent(e,Boolean(t.bubbles),Boolean(t.cancelable),t.detail),n},window.CustomEvent.prototype=window.Event.prototype),!window.Event||r&&"function"!=typeof window.Event){var i=window.Event;window.Event=function(e,t){t=t||{};var n=document.createEvent("Event");return n.initEvent(e,Boolean(t.bubbles),Boolean(t.cancelable)),n},window.Event.prototype=i.prototype}}(window.WebComponents),window.CustomElements=window.CustomElements||{flags:{}},function(e){var t=e.flags,n=[],o=function(e){n.push(e)},r=function(){n.forEach(function(t){t(e)})};e.addModule=o,e.initializeModules=r,e.hasNative=Boolean(document.registerElement),e.isIE=/Trident/.test(navigator.userAgent),e.useNative=!t.register&&e.hasNative&&!window.ShadowDOMPolyfill&&(!window.HTMLImports||window.HTMLImports.useNative)}(window.CustomElements),window.CustomElements.addModule(function(e){function t(e,t){n(e,function(e){return!!t(e)||void o(e,t)}),o(e,t)}function n(e,t,o){var r=e.firstElementChild;if(!r)for(r=e.firstChild;r&&r.nodeType!==Node.ELEMENT_NODE;)r=r.nextSibling;for(;r;)t(r,o)!==!0&&n(r,t,o),r=r.nextElementSibling;return null}function o(e,n){for(var o=e.shadowRoot;o;)t(o,n),o=o.olderShadowRoot}function r(e,t){i(e,t,[])}function i(e,t,n){if(e=window.wrap(e),!(n.indexOf(e)>=0)){n.push(e);for(var o,r=e.querySelectorAll("link[rel="+a+"]"),d=0,s=r.length;d<s&&(o=r[d]);d++)o["import"]&&i(o["import"],t,n);t(e)}}var a=window.HTMLImports?window.HTMLImports.IMPORT_LINK_TYPE:"none";e.forDocumentTree=r,e.forSubtree=t}),window.CustomElements.addModule(function(e){function t(e,t){return n(e,t)||o(e,t)}function n(t,n){return!!e.upgrade(t,n)||void(n&&a(t))}function o(e,t){b(e,function(e){if(n(e,t))return!0})}function r(e){N.push(e),y||(y=!0,setTimeout(i))}function i(){y=!1;for(var e,t=N,n=0,o=t.length;n<o&&(e=t[n]);n++)e();N=[]}function a(e){_?r(function(){d(e)}):d(e)}function d(e){e.__upgraded__&&!e.__attached&&(e.__attached=!0,e.attachedCallback&&e.attachedCallback())}function s(e){u(e),b(e,function(e){u(e)})}function u(e){_?r(function(){c(e)}):c(e)}function c(e){e.__upgraded__&&e.__attached&&(e.__attached=!1,e.detachedCallback&&e.detachedCallback())}function l(e){for(var t=e,n=window.wrap(document);t;){if(t==n)return!0;t=t.parentNode||t.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&t.host}}function f(e){if(e.shadowRoot&&!e.shadowRoot.__watched){g.dom&&console.log("watching shadow-root for: ",e.localName);for(var t=e.shadowRoot;t;)m(t),t=t.olderShadowRoot}}function p(e,n){if(g.dom){var o=n[0];if(o&&"childList"===o.type&&o.addedNodes&&o.addedNodes){for(var r=o.addedNodes[0];r&&r!==document&&!r.host;)r=r.parentNode;var i=r&&(r.URL||r._URL||r.host&&r.host.localName)||"";i=i.split("/?").shift().split("/").pop()}console.group("mutations (%d) [%s]",n.length,i||"")}var a=l(e);n.forEach(function(e){"childList"===e.type&&(M(e.addedNodes,function(e){e.localName&&t(e,a)}),M(e.removedNodes,function(e){e.localName&&s(e)}))}),g.dom&&console.groupEnd()}function w(e){for(e=window.wrap(e),e||(e=window.wrap(document));e.parentNode;)e=e.parentNode;var t=e.__observer;t&&(p(e,t.takeRecords()),i())}function m(e){if(!e.__observer){var t=new MutationObserver(p.bind(this,e));t.observe(e,{childList:!0,subtree:!0}),e.__observer=t}}function v(e){e=window.wrap(e),g.dom&&console.group("upgradeDocument: ",e.baseURI.split("/").pop());var n=e===window.wrap(document);t(e,n),m(e),g.dom&&console.groupEnd()}function h(e){E(e,v)}var g=e.flags,b=e.forSubtree,E=e.forDocumentTree,_=window.MutationObserver._isPolyfilled&&g["throttle-attached"];e.hasPolyfillMutations=_,e.hasThrottledAttached=_;var y=!1,N=[],M=Array.prototype.forEach.call.bind(Array.prototype.forEach),O=Element.prototype.createShadowRoot;O&&(Element.prototype.createShadowRoot=function(){var e=O.call(this);return window.CustomElements.watchShadow(this),e}),e.watchShadow=f,e.upgradeDocumentTree=h,e.upgradeDocument=v,e.upgradeSubtree=o,e.upgradeAll=t,e.attached=a,e.takeRecords=w}),window.CustomElements.addModule(function(e){function t(t,o){if("template"===t.localName&&window.HTMLTemplateElement&&HTMLTemplateElement.decorate&&HTMLTemplateElement.decorate(t),!t.__upgraded__&&t.nodeType===Node.ELEMENT_NODE){var r=t.getAttribute("is"),i=e.getRegisteredDefinition(t.localName)||e.getRegisteredDefinition(r);if(i&&(r&&i.tag==t.localName||!r&&!i["extends"]))return n(t,i,o)}}function n(t,n,r){return a.upgrade&&console.group("upgrade:",t.localName),n.is&&t.setAttribute("is",n.is),o(t,n),t.__upgraded__=!0,i(t),r&&e.attached(t),e.upgradeSubtree(t,r),a.upgrade&&console.groupEnd(),t}function o(e,t){Object.__proto__?e.__proto__=t.prototype:(r(e,t.prototype,t["native"]),e.__proto__=t.prototype)}function r(e,t,n){for(var o={},r=t;r!==n&&r!==HTMLElement.prototype;){for(var i,a=Object.getOwnPropertyNames(r),d=0;i=a[d];d++)o[i]||(Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i)),o[i]=1);r=Object.getPrototypeOf(r)}}function i(e){e.createdCallback&&e.createdCallback()}var a=e.flags;e.upgrade=t,e.upgradeWithDefinition=n,e.implementPrototype=o}),window.CustomElements.addModule(function(e){function t(t,o){var s=o||{};if(!t)throw new Error("document.registerElement: first argument `name` must not be empty");if(t.indexOf("-")<0)throw new Error("document.registerElement: first argument ('name') must contain a dash ('-'). Argument provided was '"+String(t)+"'.");if(r(t))throw new Error("Failed to execute 'registerElement' on 'Document': Registration failed for type '"+String(t)+"'. The type name is invalid.");if(u(t))throw new Error("DuplicateDefinitionError: a type with name '"+String(t)+"' is already registered");return s.prototype||(s.prototype=Object.create(HTMLElement.prototype)),s.__name=t.toLowerCase(),s["extends"]&&(s["extends"]=s["extends"].toLowerCase()),s.lifecycle=s.lifecycle||{},s.ancestry=i(s["extends"]),a(s),d(s),n(s.prototype),c(s.__name,s),s.ctor=l(s),s.ctor.prototype=s.prototype,s.prototype.constructor=s.ctor,e.ready&&v(document),s.ctor}function n(e){if(!e.setAttribute._polyfilled){var t=e.setAttribute;e.setAttribute=function(e,n){o.call(this,e,n,t)};var n=e.removeAttribute;e.removeAttribute=function(e){o.call(this,e,null,n)},e.setAttribute._polyfilled=!0}}function o(e,t,n){e=e.toLowerCase();var o=this.getAttribute(e);n.apply(this,arguments);var r=this.getAttribute(e);this.attributeChangedCallback&&r!==o&&this.attributeChangedCallback(e,o,r)}function r(e){for(var t=0;t<_.length;t++)if(e===_[t])return!0}function i(e){var t=u(e);return t?i(t["extends"]).concat([t]):[]}function a(e){for(var t,n=e["extends"],o=0;t=e.ancestry[o];o++)n=t.is&&t.tag;e.tag=n||e.__name,n&&(e.is=e.__name)}function d(e){if(!Object.__proto__){var t=HTMLElement.prototype;if(e.is){var n=document.createElement(e.tag);t=Object.getPrototypeOf(n)}for(var o,r=e.prototype,i=!1;r;)r==t&&(i=!0),o=Object.getPrototypeOf(r),o&&(r.__proto__=o),r=o;i||console.warn(e.tag+" prototype not found in prototype chain for "+e.is),e["native"]=t}}function s(e){return g(M(e.tag),e)}function u(e){if(e)return y[e.toLowerCase()]}function c(e,t){y[e]=t}function l(e){return function(){return s(e)}}function f(e,t,n){return e===N?p(t,n):O(e,t)}function p(e,t){e&&(e=e.toLowerCase()),t&&(t=t.toLowerCase());var n=u(t||e);if(n){if(e==n.tag&&t==n.is)return new n.ctor;if(!t&&!n.is)return new n.ctor}var o;return t?(o=p(e),o.setAttribute("is",t),o):(o=M(e),e.indexOf("-")>=0&&b(o,HTMLElement),o)}function w(e,t){var n=e[t];e[t]=function(){var e=n.apply(this,arguments);return h(e),e}}var m,v=(e.isIE,e.upgradeDocumentTree),h=e.upgradeAll,g=e.upgradeWithDefinition,b=e.implementPrototype,E=e.useNative,_=["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"],y={},N="http://www.w3.org/1999/xhtml",M=document.createElement.bind(document),O=document.createElementNS.bind(document);m=Object.__proto__||E?function(e,t){return e instanceof t}:function(e,t){if(e instanceof t)return!0;for(var n=e;n;){if(n===t.prototype)return!0;n=n.__proto__}return!1},w(Node.prototype,"cloneNode"),w(document,"importNode"),document.registerElement=t,document.createElement=p,document.createElementNS=f,e.registry=y,e["instanceof"]=m,e.reservedTagList=_,e.getRegisteredDefinition=u,document.register=document.registerElement}),function(e){function t(){i(window.wrap(document)),window.CustomElements.ready=!0;window.requestAnimationFrame||function(e){setTimeout(e,16)};setTimeout(function(){window.CustomElements.readyTime=Date.now(),window.HTMLImports&&(window.CustomElements.elapsed=window.CustomElements.readyTime-window.HTMLImports.readyTime),document.dispatchEvent(new CustomEvent("WebComponentsReady",{bubbles:!0}))})}var n=e.useNative,o=e.initializeModules;e.isIE;if(n){var r=function(){};e.watchShadow=r,e.upgrade=r,e.upgradeAll=r,e.upgradeDocumentTree=r,e.upgradeSubtree=r,e.takeRecords=r,e["instanceof"]=function(e,t){return e instanceof t}}else o();var i=e.upgradeDocumentTree,a=e.upgradeDocument;if(window.wrap||(window.ShadowDOMPolyfill?(window.wrap=window.ShadowDOMPolyfill.wrapIfNeeded,window.unwrap=window.ShadowDOMPolyfill.unwrapIfNeeded):window.wrap=window.unwrap=function(e){return e}),window.HTMLImports&&(window.HTMLImports.__importsParsingHook=function(e){e["import"]&&a(wrap(e["import"]))}),"complete"===document.readyState||e.flags.eager)t();else if("interactive"!==document.readyState||window.attachEvent||window.HTMLImports&&!window.HTMLImports.ready){var d=window.HTMLImports&&!window.HTMLImports.ready?"HTMLImportsLoaded":"DOMContentLoaded";window.addEventListener(d,t)}else t()}(window.CustomElements);</script>
<script data-source="gwdpage_min.js" data-version="12" data-exports-type="gwd-page">(function(){'use strict';var c;var d=function(a,f){var b=document.createEvent("Event");b.initEvent(a,!0,!0);f.dispatchEvent(b)};var e=function(){};goog.inherits(e,HTMLElement);c=e.prototype;c.createdCallback=function(){this.h=this.i.bind(this);this.a=[];this.g=this.b=this.f=!1;var a=parseInt(this.getAttribute("data-gwd-width"),10)||this.clientWidth;this.j=(parseInt(this.getAttribute("data-gwd-height"),10)||this.clientHeight)>=a;this.c=!1};
c.attachedCallback=function(){this.addEventListener("ready",this.h,!1);setTimeout(function(){this.a=Array.prototype.slice.call(this.querySelectorAll("*")).filter(function(a){return"function"!=typeof a.gwdLoad||"function"!=typeof a.gwdIsLoaded||a.gwdIsLoaded()?!1:!0},this);this.g=!0;0<this.a.length?(this.style.visibility="hidden",this.f=!1):g(this);this.b=!0;d("attached",this)}.bind(this),0)};
c.detachedCallback=function(){this.removeEventListener("ready",this.h,!1);this.classList.remove("gwd-play-animation");d("detached",this)};c.gwdActivate=function(){this.classList.remove("gwd-inactive");Array.prototype.slice.call(this.querySelectorAll("*")).forEach(function(a){"function"==typeof a.gwdActivate&&"function"==typeof a.gwdIsActive&&0==a.gwdIsActive()&&a.gwdActivate()});this.c=!0;this.b?this.b=!1:d("attached",this);d("pageactivated",this)};
c.gwdDeactivate=function(){this.classList.add("gwd-inactive");this.classList.remove("gwd-play-animation");var a=Array.prototype.slice.call(this.querySelectorAll("*"));a.push(this);for(var f=0;f<a.length;f++){var b=a[f];if(b.classList&&(b.classList.remove("gwd-pause-animation"),b.hasAttribute("data-gwd-current-label"))){var h=b.getAttribute("data-gwd-current-label");b.classList.remove(h);b.removeAttribute("data-gwd-current-label")}delete b.gwdGotoCounters;b!=this&&"function"==typeof b.gwdDeactivate&&
"function"==typeof b.gwdIsActive&&1==b.gwdIsActive()&&b.gwdDeactivate()}this.c=!1;d("pagedeactivated",this);d("detached",this)};c.gwdIsActive=function(){return this.c};c.gwdIsLoaded=function(){return this.g&&0==this.a.length};c.gwdLoad=function(){if(this.gwdIsLoaded())g(this);else for(var a=this.a.length-1;0<=a;a--)this.a[a].gwdLoad()};c.i=function(a){a=this.a.indexOf(a.target);0<=a&&(this.a.splice(a,1),0==this.a.length&&g(this))};
var g=function(a){a.style.visibility="";a.f||(d("ready",a),d("pageload",a));a.f=!0};e.prototype.gwdPresent=function(){d("pagepresenting",this);this.classList.add("gwd-play-animation")};e.prototype.isPortrait=function(){return this.j};e.prototype.attributeChangedCallback=function(){};document.registerElement("gwd-page",{prototype:e.prototype});}).call(this);
</script>
<script data-source="gwdpagedeck_min.js" data-version="12" data-exports-type="gwd-pagedeck">(function(){'use strict';var h;var l=["-ms-","-moz-","-webkit-",""],m=function(a,c){for(var b,d,e=0;e<l.length;++e)b=l[e]+"transition-duration",d=""+c,a.style.setProperty(b,d)};function n(a,c,b,d,e,g,f){this.j=a;this.f=c;this.w=b;a=d||"none";this.l=e="none"===a?0:e||1E3;this.g=g||"linear";this.i=[];if(e){g=f||"top";if(f=this.j){f.classList.add("gwd-page");f.classList.add("center");f="center";if("push"==a)switch(g){case "top":f="top";break;case "bottom":f="bottom";break;case "left":f="left";break;case "right":f="right"}this.i.push(f);"fade"==a&&this.i.push("transparent")}f=this.f;e="center";if("none"!=a&&"fade"!=a)switch(g){case "top":e="bottom";break;case "bottom":e="top";
break;case "left":e="right";break;case "right":e="left"}f.classList.add(e);f.classList.add("gwd-page");"fade"==a&&f.classList.add("transparent")}}n.prototype.start=function(){if(this.l){var a=this.j,c=this.f;p(c,this.J.bind(this));a&&(m(a,this.l+"ms"),a.classList.add(this.g));m(c,this.l+"ms");c.classList.add(this.g);c.setAttribute("gwd-reflow",c.offsetWidth);if(a)for(var b=0;b<this.i.length;++b)a.classList.add(this.i[b]);q(c)}else this.w()};
var r=function(a,c,b,d){b="transform: matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,"+b+","+d+",0,1);";return a+"."+c+"{-webkit-"+b+"-moz-"+b+"-ms-"+b+b+"}"},t="center top bottom left right transparent".split(" "),q=function(a){t.forEach(function(c){a.classList.remove(c)})},p=function(a,c){var b=function(){a.removeEventListener("webkitTransitionEnd",b);a.removeEventListener("transitionend",b);c()};a.addEventListener("webkitTransitionEnd",b);a.addEventListener("transitionend",b)};
n.prototype.J=function(){var a=this.j;a&&(q(a),m(a,0),a.classList.remove(this.g));m(this.f,0);this.f.classList.remove(this.g);this.w()};var u=function(a,c,b){if(b){var d=document.createEvent("CustomEvent");d.initCustomEvent(a,!0,!0,b)}else d=document.createEvent("Event"),d.initEvent(a,!0,!0);c.dispatchEvent(d)},w=function(a,c){var b=function(d){a.removeEventListener("attached",b);c(d)};a.addEventListener("attached",b)};var x=function(a,c,b,d){for(var e=[],g=3;g<arguments.length;++g)e[g-3]=arguments[g];g=c.split(".");for(var f=a,k=0;f&&k<g.length;k++)f=f[g[k]];g=f&&"function"===typeof f[b]?f[b]:void 0;g&&g.apply(null,e)};var y=function(){};goog.inherits(y,HTMLElement);y.prototype.createdCallback=function(){window.addEventListener("WebComponentsReady",this.I.bind(this),!1);this.u=this.h.bind(this,"shake");this.v=this.h.bind(this,"tilt");this.s=this.h.bind(this,"rotatetoportrait");this.o=this.h.bind(this,"rotatetolandscape");this.a=[];this.A=this.H.bind(this);this.D=this.F.bind(this);this.c=this.B=null;this.b=-1;this.m=!1;this.classList.add("gwd-pagedeck");Object.defineProperty(this,"currentIndex",{enumerable:!0,get:this.G.bind(this)})};
y.prototype.I=function(){this.a=Array.prototype.slice.call(this.querySelectorAll("gwd-page"));this.a.forEach(function(a){a.classList.add("gwd-page")});for(u("beforepagesdetached",this,{pages:this.a.slice()});this.firstChild;)this.removeChild(this.firstChild);-1==this.b&&void 0!==this.C&&this.goToPage(this.C)};
y.prototype.attachedCallback=function(){if(!this.B){var a=this.id;var c=this.offsetWidth;var b=this.offsetHeight;a=(a&&"#")+a+".gwd-pagedeck > .gwd-page";c=r(a,"center",0,0)+r(a,"top",0,b)+r(a,"bottom",0,-b)+r(a,"left",c,0)+r(a,"right",-c,0);b=document.createElement("style");void 0!==b.cssText?b.cssText=c:(b.type="text/css",b.innerText=c);document.head.appendChild(b);this.B=b}this.addEventListener("pageload",this.A,!1);document.body.addEventListener("shake",this.u,!0);document.body.addEventListener("tilt",
this.v,!0);document.body.addEventListener("rotatetoportrait",this.s,!0);document.body.addEventListener("rotatetolandscape",this.o,!0)};y.prototype.detachedCallback=function(){this.removeEventListener("pageload",this.A,!1);document.body&&(document.body.removeEventListener("shake",this.u,!0),document.body.removeEventListener("tilt",this.v,!0),document.body.removeEventListener("rotatetoportrait",this.s,!0),document.body.removeEventListener("rotatetolandscape",this.o,!0))};
var A=function(a,c,b,d,e,g){if(!(a.b==c||0>c||c>a.a.length-1||a.c)){var f=a.a[a.b],k=a.a[c];a.b=c;a.c=new n(f,k,a.D,b,d,e,g);var v=k.gwdLoad&&!k.gwdIsLoaded();a.m=v;w(k,function(){k.gwdActivate();v?k.gwdLoad():z(this)}.bind(a));a.appendChild(k)}};y.prototype.H=function(a){this.m&&a.target.parentNode==this&&(z(this),this.m=!1)};var z=function(a){x(window,"gwd.rumUtil","logContentRendered",window);u("pagetransitionstart",a);a.c.start()};h=y.prototype;
h.F=function(){if(this.c){var a=this.c.j,c=this.c.f;this.c=null;u("pagetransitionend",this,{outgoingPage:a?a:null,incomingPage:c});a&&a.gwdDeactivate();c.gwdPresent()}};h.findPageIndexByAttributeValue=function(a,c){for(var b=this.a.length,d,e=0;e<b;e++)if(d=this.a[e],"boolean"==typeof c){if(d.hasAttribute(a))return e}else if(d.getAttribute(a)==c)return e;return-1};h.goToNextPage=function(a,c,b,d,e){var g=this.b,f=g+1;f>=this.a.length&&(f=a?0:g);A(this,f,c,b,d,e)};
h.goToPreviousPage=function(a,c,b,d,e){var g=this.b,f=this.a.length,k=g-1;0>k&&(k=a?f-1:g);A(this,k,c,b,d,e)};h.goToPage=function(a,c,b,d,e){this.a.length?(a="number"==typeof a?a:this.findPageIndexByAttributeValue("id",a),0<=a&&A(this,a,c,b,d,e)):this.C=a};h.G=function(){return 0<=this.b?this.b:void 0};h.getPages=function(){return this.a};h.getPage=function(a){if("number"!=typeof a){if(!a)return null;a=this.findPageIndexByAttributeValue("id",a)}return 0>a||a>this.a.length-1?null:this.a[a]};
h.getCurrentPage=function(){return this.getPage(this.b)};h.getDefaultPage=function(){var a=this.getAttribute("default-page");return a?this.getPage(this.findPageIndexByAttributeValue("id",a)):this.getPage(0)};h.getOrientationSpecificPage=function(a,c){c=this.getPage(c);var b=c.getAttribute("alt-orientation-page");if(!b)return c;var d=c.isPortrait();a=1==a;b=this.getPage(b);return a==d?c:b};h.h=function(a,c){if(c.target==document.body){var b=this.getPage(this.b);u(a,b,c.detail)}};
h.getElementById=function(a){for(var c=this.a.length,b=0;b<c;b++){var d=this.a[b].querySelector("#"+a);if(d)return d}return null};h.getElementsBySelector=function(a){for(var c=this.a.length,b=[],d=0;d<c;d++){var e=this.a[d].querySelectorAll(a);e&&(b=b.concat(Array.prototype.slice.call(e)))}return b};h.attributeChangedCallback=function(){};document.registerElement("gwd-pagedeck",{prototype:y.prototype});}).call(this);
</script>
<script data-source="https://s0.2mdn.net/ads/studio/Enabler.js" data-exports-type="gwd-google-ad" src="https://s0.2mdn.net/ads/studio/Enabler.js"></script>
<script data-source="gwdgooglead_min.js" data-version="6" data-exports-type="gwd-google-ad">(function(){'use strict';var g;var k=function(a,b){if(a.contains&&1==b.nodeType)return a==b||a.contains(b);if("undefined"!=typeof a.compareDocumentPosition)return a==b||!!(a.compareDocumentPosition(b)&16);for(;b&&a!=b;)b=b.parentNode;return b==a},l=function(a){return"gwd-page"==a.tagName.toLowerCase()||"gwd-page"==a.getAttribute("is")},m=function(a){if(l(a))return a;for(;a&&9!=a.nodeType;)if((a=a.parentElement)&&l(a))return a;return null};function n(){this.A={}}n.prototype.add=function(a,b){a="string"==typeof a?a:a.getString();this.A[a]||(this.A[a]=[]);this.A[a].push(b)};var p=function(a){var b=[],c="object"==typeof gwd&&"GwdId"in gwd,d;for(d in a.A)b.push(c?new gwd.GwdId(d):d);return b},q=function(a,b){return b?a.A["string"==typeof b?b:b.getString()]||[]:[]};function r(a,b){this.j=a;this.ba=b;this.H=this.L.bind(this)}r.prototype.observe=function(a){if(a.nodeType==Node.ELEMENT_NODE)for(var b=p(this.j),c=0;c<b.length;c++){var d=u(b[c]);if(d&&k(a,d)){var e=q(this.j,b[c]);e&&e.forEach(function(f){d.addEventListener(f.event,this.H,!1)}.bind(this))}}};var v=function(a,b){if(b.nodeType==Node.ELEMENT_NODE)for(var c=p(a.j),d=0;d<c.length;d++){var e=u(c[d]);if(e&&k(b,e)){var f=q(a.j,c[d]);f&&f.forEach(function(h){e.removeEventListener(h.event,this.H,!1)}.bind(a))}}};
r.prototype.L=function(a){this.ba(a)};var u=function(a){return"string"==typeof a?document.getElementById(a):a.getElement(document)};document.registerElement("gwd-exit");document.registerElement("gwd-metric-event");document.registerElement("gwd-metric-configuration");document.registerElement("gwd-timer");var w=function(a,b,c){if(c){var d=document.createEvent("CustomEvent");d.initCustomEvent(a,!0,!0,c)}else d=document.createEvent("Event"),d.initEvent(a,!0,!0);b.dispatchEvent(d);return d};var x=function(a,b,c,d){for(var e=[],f=3;f<arguments.length;++f)e[f-3]=arguments[f];f=b.split(".");for(var h=a,t=0;h&&t<f.length;t++)h=h[f[t]];f=h&&"function"===typeof h[c]?h[c]:void 0;f&&f.apply(null,e)};var y=this||self,z=Date.now||function(){return+new Date},A=function(a,b){a=a.split(".");var c=y;a[0]in c||"undefined"==typeof c.execScript||c.execScript("var "+a[0]);for(var d;a.length&&(d=a.shift());)a.length||void 0===b?c=c[d]&&c[d]!==Object.prototype[d]?c[d]:c[d]={}:c[d]=b},B=function(a,b){function c(){}c.prototype=b.prototype;a.prototype=new c;a.prototype.constructor=a};var C=function(){this.Y=""};C.prototype.toString=function(){return"SafeScript{"+this.Y+"}"};C.prototype.g=function(a){this.Y=a};(new C).g("");/*
Copyright The Closure Library Authors.
SPDX-License-Identifier: Apache-2.0
*/
var D=function(){this.$=""};D.prototype.toString=function(){return"SafeStyle{"+this.$+"}"};D.prototype.g=function(a){this.$=a};(new D).g("");var E=function(){this.Z=""};E.prototype.toString=function(){return"SafeStyleSheet{"+this.Z+"}"};E.prototype.g=function(a){this.Z=a};(new E).g("");var F=function(){this.X=""};F.prototype.toString=function(){return"SafeHtml{"+this.X+"}"};F.prototype.g=function(a){this.X=a};(new F).g("<!DOCTYPE html>");(new F).g("");(new F).g("<br>");Object.freeze&&Object.freeze([]);var G=function(a,b){var c=(c=y.performance)&&c.now&&c.timing?Math.floor(c.now()+c.timing.navigationStart):z();a={label:a,type:9,value:c};b=b.google_js_reporting_queue=b.google_js_reporting_queue||[];2048>b.length&&b.push(a)};var H={},I=!1,J=!1;H.na=function(a){I||(I=!0,G("11",a))};H.oa=function(a){J||(J=!0,G("12",a))};H.pa=function(a,b,c){var d=b;d=void 0===d?y:d;if(d=(d=d.performance)&&d.now?d.now():null)a={label:a,type:void 0===c?0:c,value:d},b=b.google_js_reporting_queue=b.google_js_reporting_queue||[],2048>b.length&&b.push(a)};H.reset=function(a){J=I=!1;(a.google_js_reporting_queue=a.google_js_reporting_queue||[]).length=0};A("gwd.rumUtil",H);A("gwd.rumUtil.logContentLoading",H.na);
A("gwd.rumUtil.logContentRendered",H.oa);A("gwd.rumUtil.logTimingEvent",H.pa);A("gwd.rumUtil.reset",H.reset);var K=function(){};B(K,HTMLElement);g=K.prototype;
g.createdCallback=function(){document.body.style.opacity="0";this.S=this.ha.bind(this);this.J=this.ja.bind(this);this.T=this.ia.bind(this);this.D=this.ga.bind(this);this.C=this.ea.bind(this);this.F=w.bind(null,"expandfinish",this);this.B=w.bind(null,"collapsefinish",this);this.R=this.fa.bind(this);this.o=this.ma.bind(this);this.H=this.L.bind(this);this.V=this.ka.bind(this);this.aa=this.la.bind(this);this.c=this.i=null;this.v=this.w=!1;this.M=[];this.u=!1;this.N=this.hasAttribute("fullscreen");this.s=
null;this.G=this.l=!1;this.I=window.innerHeight>=window.innerWidth?1:2;this.h=this.b=null};
g.attachedCallback=function(){Enabler.addEventListener(studio.events.StudioEvent.EXPAND_START,this.D);Enabler.addEventListener(studio.events.StudioEvent.COLLAPSE_START,this.C);Enabler.addEventListener(studio.events.StudioEvent.FULLSCREEN_EXPAND_START,this.D);Enabler.addEventListener(studio.events.StudioEvent.FULLSCREEN_COLLAPSE_START,this.C);Enabler.addEventListener(studio.events.StudioEvent.EXPAND_FINISH,this.F);Enabler.addEventListener(studio.events.StudioEvent.COLLAPSE_FINISH,this.B);Enabler.addEventListener(studio.events.StudioEvent.FULLSCREEN_EXPAND_FINISH,
this.F);Enabler.addEventListener(studio.events.StudioEvent.FULLSCREEN_COLLAPSE_FINISH,this.B);Enabler.addEventListener(studio.events.StudioEvent.FULLSCREEN_DIMENSIONS,this.R);this.a=this.querySelector("gwd-pagedeck");this.a.addEventListener("pagetransitionend",this.V,!1);this.b=document.getElementById(this.getAttribute("data-provider"));this.h=document.querySelector("gwd-data-binder");var a=this.querySelector("gwd-metric-configuration"),b=new n;if(a){a=Array.prototype.slice.call(a.getElementsByTagName("gwd-metric-event"));
for(var c=0;c<a.length;c++){var d=a[c],e=d.getAttribute("source");if(e){var f=d.getAttribute("exit");d={event:d.getAttribute("event"),qa:d.getAttribute("metric")||f,ca:d.hasAttribute("cumulative"),exit:f};b.add(L(e),d)}}}this.j=b;this.U=new r(this.j,this.H);window.addEventListener("resize",this.aa,!1);x(window,"gwd.rumUtil","logContentLoading",window)};
g.detachedCallback=function(){Enabler.removeEventListener(studio.events.StudioEvent.INIT,this.S);Enabler.removeEventListener(studio.events.StudioEvent.VISIBLE,this.J);Enabler.removeEventListener(studio.events.StudioEvent.PAGE_LOADED,this.T);Enabler.removeEventListener(studio.events.StudioEvent.EXPAND_START,this.D);Enabler.removeEventListener(studio.events.StudioEvent.COLLAPSE_START,this.C);Enabler.removeEventListener(studio.events.StudioEvent.FULLSCREEN_EXPAND_START,this.D);Enabler.removeEventListener(studio.events.StudioEvent.FULLSCREEN_COLLAPSE_START,
this.C);Enabler.removeEventListener(studio.events.StudioEvent.EXPAND_FINISH,this.F);Enabler.removeEventListener(studio.events.StudioEvent.COLLAPSE_FINISH,this.B);Enabler.removeEventListener(studio.events.StudioEvent.FULLSCREEN_EXPAND_FINISH,this.F);Enabler.removeEventListener(studio.events.StudioEvent.FULLSCREEN_COLLAPSE_FINISH,this.B);Enabler.removeEventListener(studio.events.StudioEvent.FULLSCREEN_DIMENSIONS,this.R);this.a.removeEventListener("pagetransitionend",this.V,!1);window.removeEventListener("resize",
this.aa,!1);this.b&&this.i&&this.b.removeEventListener("ready",this.i);this.h&&this.c&&this.h.removeEventListener("bindingfinished",this.c);Enabler.removeEventListener(studio.events.StudioEvent.HOSTPAGE_SCROLL,this.o,!1);window.removeEventListener("message",this.o,!1)};g.initAd=function(){this.u=!1;var a=this.S;Enabler.removeEventListener(studio.events.StudioEvent.INIT,a);Enabler.addEventListener(studio.events.StudioEvent.INIT,a);Enabler.isInitialized()&&a()};
g.exit=function(a,b,c,d,e){Enabler.exit(a,b);("undefined"==typeof d||d)&&M(this);c&&this.goToPage(e)};g.exitOverride=function(a,b,c,d,e){Enabler.exitOverride(a,b);("undefined"==typeof d||d)&&M(this);c&&this.goToPage(e)};g.incrementCounter=function(a,b){Enabler.counter(a,b)};g.startTimer=function(a){Enabler.startTimer(a)};g.stopTimer=function(a){Enabler.stopTimer(a)};g.reportManualClose=function(){Enabler.reportManualClose()};
g.L=function(a){var b=a.target,c=L(b),d=c+": "+a.type;a:{var e=q(this.j,c);for(var f=0;f<e.length;f++)if(e[f].event==a.type){e=e[f];break a}e=void 0}e.exit&&a.detail&&a.detail.url?(d=c+": "+e.exit,a.detail["exit-id"]&&(d=a.detail["exit-id"]),b="",null!=a.detail["product-index"]&&(b=a.detail["product-index"]),this.b&&0==(this.b.getAttribute("gwd-schema-id")||"").indexOf("dynamic_remarketing")?(c=a.detail["action-event"],e={},c&&(e.clickX=c.clientX||c.changedTouches[0].clientX,e.clickY=c.clientY||c.changedTouches[0].clientY),
Enabler.dynamicExit(d,a.detail.url,b,void 0,e)):Enabler.exitOverride(d,a.detail.url),a.detail.handled=!0,a.detail.collapse&&this.goToPage()):(a=m(b))&&a.gwdIsActive()&&this.incrementCounter(e.qa||d,e.ca)};
g.ha=function(){Enabler.removeEventListener(studio.events.StudioEvent.HOSTPAGE_SCROLL,this.o,!1);window.removeEventListener("message",this.o,!1);Enabler.isServingInLiveEnvironment()?Enabler.addEventListener(studio.events.StudioEvent.HOSTPAGE_SCROLL,this.o,!1):window.addEventListener("message",this.o,!1);var a=function(){if(this.hasAttribute("polite-load")){var c=this.T;Enabler.isPageLoaded()?c():Enabler.addEventListener(studio.events.StudioEvent.PAGE_LOADED,c)}else c=this.J,Enabler.isVisible()?c():
Enabler.addEventListener(studio.events.StudioEvent.VISIBLE,c)}.bind(this);if(this.N){var b=function(c){(this.s=!!c.supported)&&w("fullscreensupport",this);Enabler.removeEventListener(studio.events.StudioEvent.FULLSCREEN_SUPPORT,b);a()}.bind(this);Enabler.addEventListener(studio.events.StudioEvent.FULLSCREEN_SUPPORT,b);Enabler.queryFullscreenSupport()}else a()};
g.ja=function(a){if(this.u)this.b&&this.P(null);else{var b;a&&(b=a.detail);var c=this.sa.bind(this,b);this.b&&(c=this.da.bind(this,c));if(this.N){Enabler.setResponsiveExpanding(!0);var d=function(e){this.G=e;c()}.bind(this);Enabler.loadModule(studio.module.ModuleId.GDN,function(){var e=studio.sdk.gdn.getConfig();e.isInCreativeToolsetContext()?e.isInterstitial(d):c()})}else c()}};g.ia=function(){var a=this.J;Enabler.isVisible()?a():Enabler.addEventListener(studio.events.StudioEvent.VISIBLE,a)};
g.da=function(a){this.b?(this.i&&this.b.removeEventListener("ready",this.i),this.i=this.P.bind(this,a),this.b.isDataLoaded()&&this.i(),this.b.addEventListener("ready",this.i)):a()};
g.P=function(a){var b=!!a;if(this.h){this.c&&(this.h.removeEventListener("bindingfinished",this.c),this.c=null);var c=this.b.getData();c&&(b=this.a.getElementsBySelector("*"),b=b.concat(this.a.getPages()),this.h.bindData(c,b)?this.W(a):(this.c=this.W.bind(this,a),this.h.addEventListener("bindingfinished",this.c)),b=!1)}b&&a()};
g.W=function(a){this.c&&(this.h.removeEventListener("bindingfinished",this.c),this.c=null);if(this.u){var b=document.getElementsByTagName("gwd-text-helper");0<b.length&&b[0].refitAll()}w("dynamicelementsready",this);a&&a()};g.sa=function(a){this.u||(this.u=!0,document.body.style.opacity="",w("adinitialized",this,a),this.G?(a=this.a.getPage(this.a.findPageIndexByAttributeValue("expanded",!0)),this.goToPage(a.id)):this.goToPage())};
g.goToPage=function(a,b,c,d,e){var f=this.a.getPage(this.a.currentIndex);if(a=a?this.a.getPage(a):this.a.getDefaultPage()){var h=!!f&&!!a&&!this.w&&!this.G&&!f.hasAttribute("expanded")&&a.hasAttribute("expanded");f=!!f&&!!a&&!this.v&&!this.G&&f.hasAttribute("expanded")&&!a.hasAttribute("expanded");h&&this.v||f&&this.w||((this.f=a.id,b&&(this.m={transition:b,duration:c,easing:d,direction:e}),h)?this.N&&!1!==this.s?this.s&&(this.l=!0,Enabler.requestFullscreenExpand()):Enabler.requestExpand():f?this.l?
Enabler.requestFullscreenCollapse():Enabler.requestCollapse():(this.v=this.w=!1,this.K()))}};g.ga=function(){w("expandstart",this);this.s?(this.l=!0,Enabler.finishFullscreenExpand()):Enabler.finishExpand();if(!this.f){var a=this.a.getPage(this.a.findPageIndexByAttributeValue("expanded",!0));a&&(this.f=a.id)}a=this.a.getPage(this.a.currentIndex);this.w=!!a&&this.f!=a.id;setTimeout(this.K.bind(this),30)};
g.ea=function(){w("collapsestart",this);this.l?(Enabler.finishFullscreenCollapse(),this.l=!1):Enabler.finishCollapse();this.f||(this.reportManualClose(),this.f=this.a.getDefaultPage().id);var a=this.a.getPage(this.a.currentIndex);this.v=!!a&&this.f!=a.id;setTimeout(this.K.bind(this),30)};
g.ma=function(a){if(Enabler.isServingInLiveEnvironment())var b=a;else{if(!a.data||"string"!==typeof a.data)return;try{b=JSON.parse(a.data)}catch(c){return}if(b.eventType!=studio.events.StudioEvent.HOSTPAGE_SCROLL)return}w("hostpagescroll",this,b)};g.la=function(){if(!this.f){var a=window.innerHeight>=window.innerWidth?1:2;this.I!=a&&(this.I=a,(a=this.a.getPage(this.a.currentIndex))&&setTimeout(this.goToPage.bind(this,a.id),0))}};g.fa=function(a){a&&Enabler.setResponsiveSize(a.width,a.height)};
g.K=function(){if(this.f){this.I=window.innerHeight>=window.innerWidth?1:2;var a=this.a.getOrientationSpecificPage(this.I,this.f);this.m?this.a.goToPage(a.id,this.m.transition,this.m.duration,this.m.easing,this.m.direction):this.a.goToPage(a.id);this.l&&a.classList.add("fs")}this.m=this.f=void 0};
g.ka=function(a){this.v=this.w=!1;if(a.target==this.a){var b=a.detail;a=b.outgoingPage;b=b.incomingPage;if(a&&(v(this.U,a),(a=a.querySelectorAll("video, gwd-video"))&&0<a.length))for(this.O=[];this.M.length;)studio.video.Reporter.detach(this.M.shift());this.U.observe(b);if((a=b.querySelectorAll("video, gwd-video"))&&0<a.length){b=studio.video&&studio.video.Reporter;var c=this.ra.bind(this);this.O=Array.prototype.slice.call(a);b?c():Enabler.loadModule(studio.module.ModuleId.VIDEO,c)}}};
g.ra=function(){for(var a,b;this.O.length;)if(b=this.O.shift(),a=L(b))studio.video.Reporter.attach(a,"gwd-video"==b.tagName.toLowerCase()?b.nativeElement:b,b.autoplay),this.M.push(a)};var L=function(a){return"object"==typeof gwd&&"GwdId"in gwd?(new gwd.GwdId(a)).getString():"string"==typeof a?a:a.id},M=function(a){Array.prototype.slice.call(a.a.querySelectorAll("video, gwd-video, gwd-youtube, gwd-audio, audio")).forEach(function(b){b.pause()})};K.prototype.attributeChangedCallback=function(){};
document.registerElement("gwd-google-ad",{prototype:K.prototype});}).call(this);
</script>
</head>
<body>
<gwd-google-ad id="gwd-ad">
<gwd-metric-configuration></gwd-metric-configuration>
<gwd-pagedeck class="gwd-page-container" id="pagedeck">
<gwd-page id="page1" class="gwd-page-wrapper gwd-page-size gwd-lightbox gwd-page-oudd" data-gwd-width="480px" data-gwd-height="320px">
<div class="gwd-page-content gwd-page-size">
<button id="button_1" class="gwd-button-18ey gwd-gen-101lgwdanimation">Button</button>
</div>
<div style="position: absolute; left: 0px; top: 0px; width: 100%; height: 1px; z-index: 9000; background-color: rgb(255, 1, 255);"></div><div style="position: absolute; right: 0px; top: 0px; width: 1px; height: 100%; z-index: 9000; background-color: rgb(255, 1, 255);"></div><div style="position: absolute; left: 0px; bottom: 0px; width: 100%; height: 1px; z-index: 9000; background-color: rgb(255, 1, 255);"></div><div style="position: absolute; left: 0px; top: 0px; width: 1px; height: 100%; z-index: 9000; background-color: rgb(255, 1, 255);"></div></gwd-page>
</gwd-pagedeck>
</gwd-google-ad>
<script type="text/javascript" id="gwd-init-code">
(function() {
var gwdAd = document.getElementById('gwd-ad');
/**
* Handles the DOMContentLoaded event. The DOMContentLoaded event is
* fired when the document has been completely loaded and parsed.
*/
function handleDomContentLoaded(event) {
}
/**
* Handles the WebComponentsReady event. This event is fired when all
* custom elements have been registered and upgraded.
*/
function handleWebComponentsReady(event) {
// Start the Ad lifecycle.
setTimeout(function() {
gwdAd.initAd();
}, 0);
}
/**
* Handles the event that is dispatched after the Ad has been
* initialized and before the default page of the Ad is shown.
*/
function handleAdInitialized(event) {}
window.addEventListener('DOMContentLoaded',
handleDomContentLoaded, false);
window.addEventListener('WebComponentsReady',
handleWebComponentsReady, false);
window.addEventListener('adinitialized',
handleAdInitialized, false);
})();
</script>
<script data-exports-type="gwd-studio-registration">function StudioExports() {
}</script><script type="text/gwd-admetadata">{"version":1,"type":"GoogleAd","format":"","template":"Banner 3.0.0","politeload":false,"fullscreen":false,"counters":[],"timers":[],"exits":[],"creativeProperties":{"minWidth":480,"minHeight":320,"maxWidth":480,"maxHeight":320},"components":["button","gwd-google-ad","gwd-page","gwd-pagedeck"],"responsive":false}</script><script data-exports-type="dclk-quick-preview">studio.Enabler.setRushSimulatedLocalEvents(true);</script></body></html>
// Modules to control application life and create native browser window
const {app, BrowserWindow} = require('electron')
function createWindow () {
// Create the browser window.
const mainWindow = new BrowserWindow({
width: 800,
height: 600,
transparent:true,
frame: false,
webPreferences: {
nodeIntegration: true
}
})
// and load the index.html of the app.
mainWindow.loadFile('index.html')
// Open the DevTools.
// mainWindow.webContents.openDevTools()
}
// This method will be called when Electron has finished
// initialization and is ready to create browser windows.
// Some APIs can only be used after this event occurs.
app.on('ready', createWindow)
// Quit when all windows are closed.
app.on('window-all-closed', function () {
// On OS X it is common for applications and their menu bar
// to stay active until the user quits explicitly with Cmd + Q
if (process.platform !== 'darwin') {
app.quit()
}
})
app.on('activate', function () {
// On OS X it's common to re-create a window in the app when the
// dock icon is clicked and there are no other windows open.
if (BrowserWindow.getAllWindows().length === 0) {
createWindow()
}
})
// In this file you can include the rest of your app's specific main process
// code. You can also put them in separate files and require them here.
// This file is required by the index.html file and will
// be executed in the renderer process for that window.
// All of the Node.js APIs are available in this process.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment