@haxtheweb/haxcms-nodejs
Version:
HAXcms single and multisite nodejs server, api, and administration
10 lines • 3.37 kB
JavaScript
/**
* @license
* Copyright (c) 2018 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
*/
!function(){var e,n=!1,t=[],o=!1;function fireEvent(){window.WebComponents.ready=!0,document.dispatchEvent(new CustomEvent("WebComponentsReady",{bubbles:!0}))}function batchCustomElements(){window.customElements&&customElements.polyfillWrapFlushCallback&&customElements.polyfillWrapFlushCallback((function(n){e=n,o&&e()}))}function ready(){window.HTMLTemplateElement&&HTMLTemplateElement.bootstrap&&HTMLTemplateElement.bootstrap(window.document),n=!0,runWhenLoadedFns().then(fireEvent)}function runWhenLoadedFns(){o=!1;var n=t.map((function(e){return e instanceof Function?e():e}));return t=[],Promise.all(n).then((function(){o=!0,e&&e()})).catch((function(e){console.error(e)}))}window.WebComponents=window.WebComponents||{},window.WebComponents.ready=window.WebComponents.ready||!1,window.WebComponents.waitFor=window.WebComponents.waitFor||function(e){e&&(t.push(e),n&&runWhenLoadedFns())},window.WebComponents._batchCustomElements=batchCustomElements;var d="webcomponents-loader.js",r=[];(!("attachShadow"in Element.prototype)||!("getRootNode"in Element.prototype)||window.ShadyDOM&&window.ShadyDOM.force)&&r.push("sd"),window.customElements&&!window.customElements.forcePolyfill||r.push("ce");var c,i,a=function(){var e=document.createElement("template");if(!("content"in e))return!0;if(!(e.content.cloneNode()instanceof DocumentFragment))return!0;var n=document.createElement("template");n.content.appendChild(document.createElement("div")),e.content.appendChild(n);var t=e.cloneNode(!0);return 0===t.content.childNodes.length||0===t.content.firstChild.content.childNodes.length}();if(window.Promise&&Array.from&&window.URL&&window.Symbol&&!a||(r=["sd-ce-pf"]),r.length){var s,l=(i={createHTML:c=function(e){return e},createScript:c,createScriptURL:c},window.trustedTypes&&window.trustedTypes.createPolicy("webcomponents-loader",i)||i),m="bundles/webcomponents-"+r.join("-")+".js";if(window.WebComponents.root)s=window.WebComponents.root+m,window.trustedTypes&&window.trustedTypes.isScriptURL(window.WebComponents.root)&&(s=l.createScriptURL(s));else{var w=document.querySelector('script[src*="'+d+'"]');s=l.createScriptURL(w.src.replace(d,m))}var u=document.createElement("script");u.src=s,"loading"===document.readyState?(u.setAttribute("onload",l.createScript("window.WebComponents._batchCustomElements()")),document.write(l.createHTML(u.outerHTML)),document.addEventListener("DOMContentLoaded",ready)):(u.addEventListener("load",(function(){!function asyncReady(){batchCustomElements(),ready()}()})),u.addEventListener("error",(function(){throw new Error("Could not load polyfill bundle"+s)})),document.head.appendChild(u))}else"complete"===document.readyState?(n=!0,fireEvent()):(window.addEventListener("load",ready),window.addEventListener("DOMContentLoaded",(function(){window.removeEventListener("load",ready),ready()})))}();