UNPKG

@haxtheweb/haxcms-nodejs

Version:

HAXcms single and multisite nodejs server, api, and administration

6 lines 2.42 kB
/** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ var e,t=new Set,o=new Map,n=!0,polyfillSupport=function(e,n){var i,d;if(void 0!==window.ShadyCSS&&(!window.ShadyCSS.nativeShadow||window.ShadyCSS.ApplyShim)){var a=(null===(i=window.ShadyDOM)||void 0===i?void 0:i.inUse)&&!0===(null===(d=window.ShadyDOM)||void 0===d?void 0:d.noPatch)?window.ShadyDOM.wrap:function(e){return e},needsPrepareStyles=function(e){return void 0!==e&&!t.has(e)},cssForScope=function(e){var t=o.get(e);return void 0===t&&o.set(e,t=[]),t},l=new Map,r=e.createElement;e.createElement=function(t,o){var n=r.call(e,t,o),i=null==o?void 0:o.scope;if(void 0!==i&&(window.ShadyCSS.nativeShadow||window.ShadyCSS.prepareTemplateDom(n,i),needsPrepareStyles(i))){var d=cssForScope(i),a=n.content.querySelectorAll("style");d.push.apply(d,Array.from(a).map((function(e){var t;return null===(t=e.parentNode)||void 0===t||t.removeChild(e),e.textContent})))}return n};var s=document.createDocumentFragment(),p=document.createComment(""),v=n.prototype,h=v._$setValue;v._$setValue=function(e,n){var i,d;void 0===n&&(n=this);var l=a(this._$startNode).parentNode,r=null===(i=this.options)||void 0===i?void 0:i.scope;if(l instanceof ShadowRoot&&needsPrepareStyles(r)){var v=this._$startNode,u=this._$endNode;s.appendChild(p),this._$startNode=p,this._$endNode=null,h.call(this,e,n);var S=(null==e?void 0:e._$litType$)?this._$committedValue._$template.el:document.createElement("template");if(function(e,n){var i,d=cssForScope(e),a=0!==d.length;a&&((i=document.createElement("style")).textContent=d.join("\n"),n.content.appendChild(i)),t.add(e),o.delete(e),window.ShadyCSS.prepareTemplateStyles(n,e),a&&window.ShadyCSS.nativeShadow&&null!==(i=n.content.querySelector("style"))&&n.content.appendChild(i)}(r,S),s.removeChild(p),null===(d=window.ShadyCSS)||void 0===d?void 0:d.nativeShadow){var c=S.content.querySelector("style");null!==c&&s.appendChild(c.cloneNode(!0))}l.insertBefore(s,u),this._$startNode=v,this._$endNode=u}else h.call(this,e,n)},v._$getTemplate=function(t){var o,n=null===(o=this.options)||void 0===o?void 0:o.scope,i=l.get(n);void 0===i&&l.set(n,i=new Map);var d=i.get(t.strings);return void 0===d&&i.set(t.strings,d=new e(t,this.options)),d}}};polyfillSupport.noPatchSupported=n,null!==(e=globalThis.litHtmlPolyfillSupportDevMode)&&void 0!==e||(globalThis.litHtmlPolyfillSupportDevMode=polyfillSupport);export{};