Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

skatejs-named-slots

Package Overview
Dependencies
Maintainers
4
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

skatejs-named-slots - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

70

dist/index-with-deps.js

@@ -1136,44 +1136,38 @@ (function webpackUniversalModuleDefinition(root, factory) {

try {
var ce = new window.CustomEvent('test', {
bubbles: false,
cancelable: true,
detail: {
x: 'y'
}
});
ce.preventDefault();
if (ce.defaultPrevented !== true) {
// IE has problems with .preventDefault() on custom events
// http://stackoverflow.com/questions/23349191
throw new Error('Could not prevent default');
}
var ce = new window.CustomEvent('test');
ce.preventDefault();
if (ce.defaultPrevented !== true) {
// IE has problems with .preventDefault() on custom events
// http://stackoverflow.com/questions/23349191
throw new Error('Could not prevent default');
}
} catch (e) {
var CustomEvent = function CustomEvent(event, params) {
var evt;
params = params || {
bubbles: false,
cancelable: false,
detail: undefined
};
var CustomEvent = function CustomEvent(event, params) {
var evt, origPrevent;
params = params || {
bubbles: false,
cancelable: false,
detail: undefined
};
evt = document.createEvent("CustomEvent");
evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);
var origPrevent = evt.preventDefault;
evt.preventDefault = function () {
origPrevent.call(this);
try {
Object.defineProperty(this, 'defaultPrevented', {
get: function get() {
return true;
}
});
} catch (e) {
this.defaultPrevented = true;
}
};
return evt;
evt = document.createEvent("CustomEvent");
evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);
origPrevent = evt.preventDefault;
evt.preventDefault = function () {
origPrevent.call(this);
try {
Object.defineProperty(this, 'defaultPrevented', {
get: function get() {
return true;
}
});
} catch (e) {
this.defaultPrevented = true;
}
};
return evt;
};
CustomEvent.prototype = window.Event.prototype;
window.CustomEvent = CustomEvent; // expose definition to window
CustomEvent.prototype = window.Event.prototype;
window.CustomEvent = CustomEvent; // expose definition to window
}

@@ -1180,0 +1174,0 @@

@@ -1,2 +0,2 @@

!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.skatejsNamedSlots=t():e.skatejsNamedSlots=t()}(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=document.createElement("div");if(k["default"])return t.__innerHTML=e,t;for(var n=Ne.parseFromString("<div>"+e+"</div>","text/html").body.firstChild;n.hasChildNodes();){var r=n.firstChild;n.removeChild(r),t.appendChild(r)}return document.importNode(t,!0)}function i(e,t,n){Object.defineProperty(e,t,{configurable:!0,get:function(){return n}})}function u(e){return this[e]}function a(e){return e.item=u,e}function s(e){return!!fe.get(e)}function l(e){return s(e)?"host":(0,J["default"])(e)?"slot":(0,I["default"])(e)?"root":"node"}function d(e,t){for(;e&&e!==document;){if(t(e))return e;e=e.parentNode}}function c(e){return e.getAttribute&&e.getAttribute("name")||"default"}function f(e){return e.getAttribute&&e.getAttribute("slot")||"default"}function h(e,t,n){if(le.indexOf(t.nodeType)!==-1){var r=e.assignedNodes(),o=0===r.length,i=r.indexOf(n);ve.set(t,e),o&&ne.call(e.childNodes,function(t){return e.__removeChild(t)}),i>-1?(e.__insertBefore(t,void 0!==n?n:null),r.splice(i,0,t)):(e.__appendChild(t),r.push(t)),e.____triggerSlotChangeEvent()}}function p(e){var t=ve.get(e);if(t){var n=t.assignedNodes(),r=n.indexOf(e);if(r>-1){var o=1===n.length;n.splice(r,1),ve.set(e,null),t.__removeChild(e),o&&ne.call(t.childNodes,function(e){return t.__appendChild(e)}),t.____triggerSlotChangeEvent()}}}function v(e,t){for(var n=e.childNodes,r=n.length,o=0;o<r;o++)if(n[o]===t)return o;return-1}function _(e,t,n,r){var o=v(e,n);(0,x.eachNodeOrFragmentNodes)(t,function(t,n){r(t,n),k["default"]?pe.set(t,e):i(t,"parentNode",e),o>-1?te.splice.call(e.childNodes,o+n,0,t):te.push.call(e.childNodes,t)})}function g(e,t,n){var r=v(e,t);r>-1&&(n(t,0),k["default"]?pe.set(t,null):i(t,"parentNode",null),te.splice.call(e.childNodes,r,1))}function m(e,t,n){_(e,t,n,function(t){e.__insertBefore(t,void 0!==n?n:null)})}function N(e,t,n){_(e,t,n,function(t){var r=fe.get(e),o=ge.get(r),i=o[f(t)];i&&h(i,t,n)})}function b(e,t){var n=c(t);k["default"]||Array.isArray(t.childNodes)||i(t,"childNodes",(0,Q["default"])(t.childNodes)),ge.get(e)[n]=t,me.has(t)||me.set(t,e),(0,x.eachChildNode)(_e.get(e),function(e){e.assignedSlot||n!==f(e)||h(t,e)})}function y(e,t,n){(0,x.eachNodeOrFragmentNodes)(t,function(t){if((0,J["default"])(t))b(e,t);else{var n=(0,Y["default"])(t);if(n)for(var r=n.length,o=0;o<r;o++)b(e,n[o])}}),m(e,t,n)}function C(e,t,n){var r=0===e.assignedNodes().length;_(e,t,n,function(t){r&&e.__insertBefore(t,void 0!==n?n:null)})}function E(e,t){var n=0===e.assignedNodes().length;g(e,t,function(){n&&e.__removeChild(t)})}function O(e,t){g(e,t,function(){e.__removeChild(t)})}function w(e,t){g(e,t,function(){p(t)})}function M(e,t){var n=Array.prototype.slice.call(t.assignedNodes());n.forEach(p),delete ge.get(e)[c(t)],me["delete"](t)}function T(e,t){g(e,t,function(){if((0,J["default"])(t))M(e,t);else{var n=(0,Y["default"])(t);if(n)for(var r=0;r<n.length;r++)M(e,n[r])}e.__removeChild(t)})}function j(e){if((0,I["default"])(e))return e;if(e.parentNode)return j(e.parentNode)}function A(e,t,n){var r=l(e),o=t.parentNode,u=j(e);return k["default"]||Array.isArray(e.childNodes)||i(e,"childNodes",(0,Q["default"])(e.childNodes)),u&&"slot"===l(t)&&b(u,t),o&&"host"===l(o)&&(k["default"]?pe.set(t,null):i(t,"parentNode",null)),"node"===r?k["default"]?(pe.set(t,e),e.__insertBefore(t,void 0!==n?n:null)):m(e,t,n):"slot"===r?C(e,t,n):"host"===r?N(e,t,n):"root"===r?y(e,t,n):void 0}function L(e){if(k["default"]&&"slot"===l(e)&&e.__childNodes.length!==e.childNodes.length){for(;e.hasChildNodes();)e.removeChild(e.firstChild);ne.call(e.__childNodes,function(t){return e.appendChild(t)})}}Object.defineProperty(t,"__esModule",{value:!0});var P=n(1),S=r(P);n(3),n(4);var x=n(5),D=n(6),H=n(7),k=r(H),W=n(8),R=r(W),F=n(9),B=r(F),V=n(10),q=r(V),X=n(11),Y=r(X),G=n(13),I=r(G),z=n(12),J=r(z),K=n(14),Q=r(K),U=n(15),Z=r(U),$=n(16),ee=r($),te=Array.prototype,ne=te.forEach,re="_shadow_root_",oe=["childNodes","parentNode"],ie=["textContent"],ue=["assignedSlot"],ae=["textContent"],se=[],le=[Node.ELEMENT_NODE,Node.TEXT_NODE],de=new WeakMap,ce=new WeakMap,fe=new WeakMap,he=new WeakMap,pe=new WeakMap,ve=new WeakMap,_e=new WeakMap,ge=new WeakMap,me=new WeakMap,Ne=new DOMParser,be={____assignedNodes:{get:function(){return this.______assignedNodes||(this.______assignedNodes=[])}},____isInFallbackMode:{get:function(){return 0===this.assignedNodes().length}},____slotChangeListeners:{get:function(){return"undefined"==typeof this.______slotChangeListeners&&(this.______slotChangeListeners=0),this.______slotChangeListeners},set:function(e){this.______slotChangeListeners=e}},____triggerSlotChangeEvent:{value:(0,S["default"])(function(){this.____slotChangeListeners&&this.dispatchEvent(new CustomEvent("slotchange",{bubbles:!1,cancelable:!1}))})},addEventListener:{value:function(e,t,n){return"slotchange"===e&&(0,J["default"])(this)&&this.____slotChangeListeners++,this.__addEventListener(e,t,n)}},appendChild:{value:function(e){return A(this,e),e}},assignedSlot:{get:function(){var e=ve.get(this);if(!e)return null;var t=me.get(e),n=_e.get(t),r=ce.get(n);return"open"===r?e:null}},attachShadow:{value:function(e){var t=this,n=e&&e.mode;if("closed"!==n&&"open"!==n)throw new Error('You must specify { mode } as "open" or "closed" to attachShadow().');var r=fe.get(this);if(r)return r;var o=a([].slice.call(this.childNodes)),u=document.createElement(e.polyfillShadowRootTagName||re);return ce.set(this,n),fe.set(this,u),_e.set(u,this),ge.set(u,{}),k["default"]?he.set(this,o):i(this,"childNodes",o),o.forEach(function(e){t.__removeChild(e),k["default"]?pe.set(e,t):i(e,"parentNode",t)}),this.__appendChild(u)}},childElementCount:{get:function(){return this.children.length}},childNodes:{get:function(){if(k["default"]&&"node"===l(this))return this.__childNodes;var e=he.get(this);return e||he.set(this,e=a([])),e}},children:{get:function(){var e=[];return(0,x.eachChildNode)(this,function(t){1===t.nodeType&&e.push(t)}),a(e)}},firstChild:{get:function(){return this.childNodes[0]||null}},firstElementChild:{get:function(){return this.children[0]||null}},assignedNodes:{value:function(){if((0,J["default"])(this)){var e=de.get(this);return e||de.set(this,e=[]),e}}},hasChildNodes:{value:function(){return this.childNodes.length>0}},innerHTML:{get:function(){var e="",t=function(e){return e.outerHTML},n={1:t,3:B["default"],8:q["default"]};return(0,x.eachChildNode)(this,function(r){var o=n[r.nodeType]||t;e+=o(r)}),e},set:function(e){for(var t=o(e);this.hasChildNodes();)this.removeChild(this.firstChild);var n=(0,Y["default"])(t);for(ne.call(n,function(e){return L(e)});t.hasChildNodes();){var r=t.firstChild;t.removeChild(r),this.appendChild(r)}}},insertBefore:{value:function(e,t){return A(this,e,t),e}},lastChild:{get:function(){var e=this.childNodes;return e[e.length-1]||null}},lastElementChild:{get:function(){var e=this.children;return e[e.length-1]||null}},name:{get:function(){return this.getAttribute("name")},set:function(e){var t=this.name,n=this.__setAttribute("name",e);if(e===t)return n;if(!(0,J["default"])(this))return n;var r=me.get(this);return r&&(M(r,this),b(r,this)),n}},nextSibling:{get:function(){var e=this;return(0,x.eachChildNode)(this.parentNode,function(t,n,r){if(e===t)return r[n+1]||null})}},nextElementSibling:{get:function(){var e=this,t=void 0;return(0,x.eachChildNode)(this.parentNode,function(n){return t&&1===n.nodeType?n:void(e===n&&(t=!0))})}},outerHTML:{get:function(){var e=this.tagName.toLowerCase(),t=Array.prototype.slice.call(this.attributes).map(function(e){return" "+e.name+(e.value?'="'+e.value+'"':"")}).join("");return"<"+e+t+">"+this.innerHTML+"</"+e+">"},set:function(e){if(this.parentNode){var t=o(e);this.parentNode.replaceChild(t.firstChild,this)}else{if(!k["default"])throw new Error("Failed to set the 'outerHTML' property on 'Element': This element has no parent node.");this.__outerHTML=e}}},parentElement:{get:function(){return d(this.parentNode,function(e){return 1===e.nodeType})}},parentNode:{get:function(){return pe.get(this)||this.__parentNode||null}},previousSibling:{get:function(){var e=this;return(0,x.eachChildNode)(this.parentNode,function(t,n,r){if(e===t)return r[n-1]||null})}},previousElementSibling:{get:function(){var e=this,t=void 0;return(0,x.eachChildNode)(this.parentNode,function(n){return t&&e===n?t:void(1===n.nodeType&&(t=n))})}},removeChild:{value:function(e){var t=l(this);switch(t){case"node":if(k["default"])return pe.set(e,null),this.__removeChild(e);O(this,e);break;case"slot":E(this,e);break;case"host":w(this,e);break;case"root":T(this,e)}return e}},removeEventListener:{value:function(e,t,n){return"slotchange"===e&&this.____slotChangeListeners&&(0,J["default"])(this)&&this.____slotChangeListeners--,this.__removeEventListener(e,t,n)}},replaceChild:{value:function(e,t){return this.insertBefore(e,t),this.removeChild(t)}},setAttribute:{value:function(e,t){return"slot"===e&&(this[e]=t),(0,J["default"])(this)&&"name"===e&&(this[e]=t),this.__setAttribute(e,t)}},shadowRoot:{get:function(){return"open"===ce.get(this)?fe.get(this):null}},slot:{get:function(){return this.getAttribute("slot")},set:function(e){var t=this.name,n=this.__setAttribute("slot",e);if(t===e)return n;var r=ve.get(this),o=r&&me.get(r),i=o&&_e.get(o);return i&&(w(i,this),N(i,this)),n}},textContent:{get:function(){var e="";return(0,x.eachChildNode)(this,function(t){t.nodeType!==Node.COMMENT_NODE&&(e+=t.textContent)}),e},set:function(e){for(;this.hasChildNodes();)this.removeChild(this.firstChild);e&&this.appendChild(document.createTextNode(e))}}};D.shadowDomV1||(D.shadowDomV0?(0,Z["default"])():!function(){var e=Comment.prototype,t=HTMLElement.prototype,n=SVGElement.prototype,r=Text.prototype,o=document.createTextNode(""),i=document.createComment("");Object.keys(be).forEach(function(u){var a=be[u];if(a.configurable=!0,a.hasOwnProperty("value")&&(a.writable=!0),k["default"]||oe.indexOf(u)===-1){var s=(0,R["default"])(t,u),l=(0,R["default"])(r,u),d=(0,R["default"])(e,u),c=u in o&&ie.indexOf(u)===-1||~ue.indexOf(u),f=u in i&&ae.indexOf(u)===-1||~se.indexOf(u),h="__"+u;Object.defineProperty(t,u,a),Object.defineProperty(n,u,a),s&&(Object.defineProperty(t,h,s),Object.defineProperty(n,h,s)),c&&Object.defineProperty(r,u,a),c&&l&&Object.defineProperty(r,h,l),f&&Object.defineProperty(e,u,a),f&&d&&Object.defineProperty(e,h,d)}})}()),t["default"]=ee["default"]},function(e,t,n){"use strict";var r=n(2);e.exports=function(e,t,n){function o(){var d=r()-s;d<t&&d>0?i=setTimeout(o,t-d):(i=null,n||(l=e.apply(a,u),i||(a=u=null)))}var i,u,a,s,l;return null==t&&(t=100),function(){a=this,u=arguments,s=r();var d=n&&!i;return i||(i=setTimeout(o,t)),d&&(l=e.apply(a,u),a=u=null),l}}},function(e,t){"use strict";function n(){return(new Date).getTime()}e.exports=Date.now||n},function(e,t){"use strict";try{var n=new window.CustomEvent("test",{bubbles:!1,cancelable:!0,detail:{x:"y"}});if(n.preventDefault(),n.defaultPrevented!==!0)throw new Error("Could not prevent default")}catch(r){var o=function(e,t){var n;t=t||{bubbles:!1,cancelable:!1,detail:void 0},n=document.createEvent("CustomEvent"),n.initCustomEvent(e,t.bubbles,t.cancelable,t.detail);var r=n.preventDefault;return n.preventDefault=function(){r.call(this);try{Object.defineProperty(this,"defaultPrevented",{get:function(){return!0}})}catch(e){this.defaultPrevented=!0}},n};o.prototype=window.Event.prototype,window.CustomEvent=o}},function(e,t){"use strict";/**
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.skatejsNamedSlots=t():e.skatejsNamedSlots=t()}(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=document.createElement("div");if(k["default"])return t.__innerHTML=e,t;for(var n=Ne.parseFromString("<div>"+e+"</div>","text/html").body.firstChild;n.hasChildNodes();){var r=n.firstChild;n.removeChild(r),t.appendChild(r)}return document.importNode(t,!0)}function i(e,t,n){Object.defineProperty(e,t,{configurable:!0,get:function(){return n}})}function u(e){return this[e]}function a(e){return e.item=u,e}function s(e){return!!fe.get(e)}function l(e){return s(e)?"host":(0,J["default"])(e)?"slot":(0,I["default"])(e)?"root":"node"}function d(e,t){for(;e&&e!==document;){if(t(e))return e;e=e.parentNode}}function c(e){return e.getAttribute&&e.getAttribute("name")||"default"}function f(e){return e.getAttribute&&e.getAttribute("slot")||"default"}function h(e,t,n){if(le.indexOf(t.nodeType)!==-1){var r=e.assignedNodes(),o=0===r.length,i=r.indexOf(n);ve.set(t,e),o&&ne.call(e.childNodes,function(t){return e.__removeChild(t)}),i>-1?(e.__insertBefore(t,void 0!==n?n:null),r.splice(i,0,t)):(e.__appendChild(t),r.push(t)),e.____triggerSlotChangeEvent()}}function p(e){var t=ve.get(e);if(t){var n=t.assignedNodes(),r=n.indexOf(e);if(r>-1){var o=1===n.length;n.splice(r,1),ve.set(e,null),t.__removeChild(e),o&&ne.call(t.childNodes,function(e){return t.__appendChild(e)}),t.____triggerSlotChangeEvent()}}}function v(e,t){for(var n=e.childNodes,r=n.length,o=0;o<r;o++)if(n[o]===t)return o;return-1}function _(e,t,n,r){var o=v(e,n);(0,x.eachNodeOrFragmentNodes)(t,function(t,n){r(t,n),k["default"]?pe.set(t,e):i(t,"parentNode",e),o>-1?te.splice.call(e.childNodes,o+n,0,t):te.push.call(e.childNodes,t)})}function g(e,t,n){var r=v(e,t);r>-1&&(n(t,0),k["default"]?pe.set(t,null):i(t,"parentNode",null),te.splice.call(e.childNodes,r,1))}function m(e,t,n){_(e,t,n,function(t){e.__insertBefore(t,void 0!==n?n:null)})}function N(e,t,n){_(e,t,n,function(t){var r=fe.get(e),o=ge.get(r),i=o[f(t)];i&&h(i,t,n)})}function y(e,t){var n=c(t);k["default"]||Array.isArray(t.childNodes)||i(t,"childNodes",(0,Q["default"])(t.childNodes)),ge.get(e)[n]=t,me.has(t)||me.set(t,e),(0,x.eachChildNode)(_e.get(e),function(e){e.assignedSlot||n!==f(e)||h(t,e)})}function b(e,t,n){(0,x.eachNodeOrFragmentNodes)(t,function(t){if((0,J["default"])(t))y(e,t);else{var n=(0,Y["default"])(t);if(n)for(var r=n.length,o=0;o<r;o++)y(e,n[o])}}),m(e,t,n)}function C(e,t,n){var r=0===e.assignedNodes().length;_(e,t,n,function(t){r&&e.__insertBefore(t,void 0!==n?n:null)})}function E(e,t){var n=0===e.assignedNodes().length;g(e,t,function(){n&&e.__removeChild(t)})}function O(e,t){g(e,t,function(){e.__removeChild(t)})}function w(e,t){g(e,t,function(){p(t)})}function M(e,t){var n=Array.prototype.slice.call(t.assignedNodes());n.forEach(p),delete ge.get(e)[c(t)],me["delete"](t)}function T(e,t){g(e,t,function(){if((0,J["default"])(t))M(e,t);else{var n=(0,Y["default"])(t);if(n)for(var r=0;r<n.length;r++)M(e,n[r])}e.__removeChild(t)})}function j(e){if((0,I["default"])(e))return e;if(e.parentNode)return j(e.parentNode)}function A(e,t,n){var r=l(e),o=t.parentNode,u=j(e);return k["default"]||Array.isArray(e.childNodes)||i(e,"childNodes",(0,Q["default"])(e.childNodes)),u&&"slot"===l(t)&&y(u,t),o&&"host"===l(o)&&(k["default"]?pe.set(t,null):i(t,"parentNode",null)),"node"===r?k["default"]?(pe.set(t,e),e.__insertBefore(t,void 0!==n?n:null)):m(e,t,n):"slot"===r?C(e,t,n):"host"===r?N(e,t,n):"root"===r?b(e,t,n):void 0}function L(e){if(k["default"]&&"slot"===l(e)&&e.__childNodes.length!==e.childNodes.length){for(;e.hasChildNodes();)e.removeChild(e.firstChild);ne.call(e.__childNodes,function(t){return e.appendChild(t)})}}Object.defineProperty(t,"__esModule",{value:!0});var P=n(1),S=r(P);n(3),n(4);var x=n(5),D=n(6),H=n(7),k=r(H),W=n(8),R=r(W),F=n(9),B=r(F),V=n(10),q=r(V),X=n(11),Y=r(X),G=n(13),I=r(G),z=n(12),J=r(z),K=n(14),Q=r(K),U=n(15),Z=r(U),$=n(16),ee=r($),te=Array.prototype,ne=te.forEach,re="_shadow_root_",oe=["childNodes","parentNode"],ie=["textContent"],ue=["assignedSlot"],ae=["textContent"],se=[],le=[Node.ELEMENT_NODE,Node.TEXT_NODE],de=new WeakMap,ce=new WeakMap,fe=new WeakMap,he=new WeakMap,pe=new WeakMap,ve=new WeakMap,_e=new WeakMap,ge=new WeakMap,me=new WeakMap,Ne=new DOMParser,ye={____assignedNodes:{get:function(){return this.______assignedNodes||(this.______assignedNodes=[])}},____isInFallbackMode:{get:function(){return 0===this.assignedNodes().length}},____slotChangeListeners:{get:function(){return"undefined"==typeof this.______slotChangeListeners&&(this.______slotChangeListeners=0),this.______slotChangeListeners},set:function(e){this.______slotChangeListeners=e}},____triggerSlotChangeEvent:{value:(0,S["default"])(function(){this.____slotChangeListeners&&this.dispatchEvent(new CustomEvent("slotchange",{bubbles:!1,cancelable:!1}))})},addEventListener:{value:function(e,t,n){return"slotchange"===e&&(0,J["default"])(this)&&this.____slotChangeListeners++,this.__addEventListener(e,t,n)}},appendChild:{value:function(e){return A(this,e),e}},assignedSlot:{get:function(){var e=ve.get(this);if(!e)return null;var t=me.get(e),n=_e.get(t),r=ce.get(n);return"open"===r?e:null}},attachShadow:{value:function(e){var t=this,n=e&&e.mode;if("closed"!==n&&"open"!==n)throw new Error('You must specify { mode } as "open" or "closed" to attachShadow().');var r=fe.get(this);if(r)return r;var o=a([].slice.call(this.childNodes)),u=document.createElement(e.polyfillShadowRootTagName||re);return ce.set(this,n),fe.set(this,u),_e.set(u,this),ge.set(u,{}),k["default"]?he.set(this,o):i(this,"childNodes",o),o.forEach(function(e){t.__removeChild(e),k["default"]?pe.set(e,t):i(e,"parentNode",t)}),this.__appendChild(u)}},childElementCount:{get:function(){return this.children.length}},childNodes:{get:function(){if(k["default"]&&"node"===l(this))return this.__childNodes;var e=he.get(this);return e||he.set(this,e=a([])),e}},children:{get:function(){var e=[];return(0,x.eachChildNode)(this,function(t){1===t.nodeType&&e.push(t)}),a(e)}},firstChild:{get:function(){return this.childNodes[0]||null}},firstElementChild:{get:function(){return this.children[0]||null}},assignedNodes:{value:function(){if((0,J["default"])(this)){var e=de.get(this);return e||de.set(this,e=[]),e}}},hasChildNodes:{value:function(){return this.childNodes.length>0}},innerHTML:{get:function(){var e="",t=function(e){return e.outerHTML},n={1:t,3:B["default"],8:q["default"]};return(0,x.eachChildNode)(this,function(r){var o=n[r.nodeType]||t;e+=o(r)}),e},set:function(e){for(var t=o(e);this.hasChildNodes();)this.removeChild(this.firstChild);var n=(0,Y["default"])(t);for(ne.call(n,function(e){return L(e)});t.hasChildNodes();){var r=t.firstChild;t.removeChild(r),this.appendChild(r)}}},insertBefore:{value:function(e,t){return A(this,e,t),e}},lastChild:{get:function(){var e=this.childNodes;return e[e.length-1]||null}},lastElementChild:{get:function(){var e=this.children;return e[e.length-1]||null}},name:{get:function(){return this.getAttribute("name")},set:function(e){var t=this.name,n=this.__setAttribute("name",e);if(e===t)return n;if(!(0,J["default"])(this))return n;var r=me.get(this);return r&&(M(r,this),y(r,this)),n}},nextSibling:{get:function(){var e=this;return(0,x.eachChildNode)(this.parentNode,function(t,n,r){if(e===t)return r[n+1]||null})}},nextElementSibling:{get:function(){var e=this,t=void 0;return(0,x.eachChildNode)(this.parentNode,function(n){return t&&1===n.nodeType?n:void(e===n&&(t=!0))})}},outerHTML:{get:function(){var e=this.tagName.toLowerCase(),t=Array.prototype.slice.call(this.attributes).map(function(e){return" "+e.name+(e.value?'="'+e.value+'"':"")}).join("");return"<"+e+t+">"+this.innerHTML+"</"+e+">"},set:function(e){if(this.parentNode){var t=o(e);this.parentNode.replaceChild(t.firstChild,this)}else{if(!k["default"])throw new Error("Failed to set the 'outerHTML' property on 'Element': This element has no parent node.");this.__outerHTML=e}}},parentElement:{get:function(){return d(this.parentNode,function(e){return 1===e.nodeType})}},parentNode:{get:function(){return pe.get(this)||this.__parentNode||null}},previousSibling:{get:function(){var e=this;return(0,x.eachChildNode)(this.parentNode,function(t,n,r){if(e===t)return r[n-1]||null})}},previousElementSibling:{get:function(){var e=this,t=void 0;return(0,x.eachChildNode)(this.parentNode,function(n){return t&&e===n?t:void(1===n.nodeType&&(t=n))})}},removeChild:{value:function(e){var t=l(this);switch(t){case"node":if(k["default"])return pe.set(e,null),this.__removeChild(e);O(this,e);break;case"slot":E(this,e);break;case"host":w(this,e);break;case"root":T(this,e)}return e}},removeEventListener:{value:function(e,t,n){return"slotchange"===e&&this.____slotChangeListeners&&(0,J["default"])(this)&&this.____slotChangeListeners--,this.__removeEventListener(e,t,n)}},replaceChild:{value:function(e,t){return this.insertBefore(e,t),this.removeChild(t)}},setAttribute:{value:function(e,t){return"slot"===e&&(this[e]=t),(0,J["default"])(this)&&"name"===e&&(this[e]=t),this.__setAttribute(e,t)}},shadowRoot:{get:function(){return"open"===ce.get(this)?fe.get(this):null}},slot:{get:function(){return this.getAttribute("slot")},set:function(e){var t=this.name,n=this.__setAttribute("slot",e);if(t===e)return n;var r=ve.get(this),o=r&&me.get(r),i=o&&_e.get(o);return i&&(w(i,this),N(i,this)),n}},textContent:{get:function(){var e="";return(0,x.eachChildNode)(this,function(t){t.nodeType!==Node.COMMENT_NODE&&(e+=t.textContent)}),e},set:function(e){for(;this.hasChildNodes();)this.removeChild(this.firstChild);e&&this.appendChild(document.createTextNode(e))}}};D.shadowDomV1||(D.shadowDomV0?(0,Z["default"])():!function(){var e=Comment.prototype,t=HTMLElement.prototype,n=SVGElement.prototype,r=Text.prototype,o=document.createTextNode(""),i=document.createComment("");Object.keys(ye).forEach(function(u){var a=ye[u];if(a.configurable=!0,a.hasOwnProperty("value")&&(a.writable=!0),k["default"]||oe.indexOf(u)===-1){var s=(0,R["default"])(t,u),l=(0,R["default"])(r,u),d=(0,R["default"])(e,u),c=u in o&&ie.indexOf(u)===-1||~ue.indexOf(u),f=u in i&&ae.indexOf(u)===-1||~se.indexOf(u),h="__"+u;Object.defineProperty(t,u,a),Object.defineProperty(n,u,a),s&&(Object.defineProperty(t,h,s),Object.defineProperty(n,h,s)),c&&Object.defineProperty(r,u,a),c&&l&&Object.defineProperty(r,h,l),f&&Object.defineProperty(e,u,a),f&&d&&Object.defineProperty(e,h,d)}})}()),t["default"]=ee["default"]},function(e,t,n){"use strict";var r=n(2);e.exports=function(e,t,n){function o(){var d=r()-s;d<t&&d>0?i=setTimeout(o,t-d):(i=null,n||(l=e.apply(a,u),i||(a=u=null)))}var i,u,a,s,l;return null==t&&(t=100),function(){a=this,u=arguments,s=r();var d=n&&!i;return i||(i=setTimeout(o,t)),d&&(l=e.apply(a,u),a=u=null),l}}},function(e,t){"use strict";function n(){return(new Date).getTime()}e.exports=Date.now||n},function(e,t){"use strict";try{var n=new window.CustomEvent("test");if(n.preventDefault(),n.defaultPrevented!==!0)throw new Error("Could not prevent default")}catch(r){var o=function(e,t){var n,r;return t=t||{bubbles:!1,cancelable:!1,detail:void 0},n=document.createEvent("CustomEvent"),n.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),r=n.preventDefault,n.preventDefault=function(){r.call(this);try{Object.defineProperty(this,"defaultPrevented",{get:function(){return!0}})}catch(e){this.defaultPrevented=!0}},n};o.prototype=window.Event.prototype,window.CustomEvent=o}},function(e,t){"use strict";/**
* @license

@@ -3,0 +3,0 @@ * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.

@@ -13,4 +13,3 @@ {

"prepublish": "sk-bundle",
"commit": "npm run lint && git cz",
"validate": "npm ls"
"commit": "npm run lint && git cz"
},

@@ -47,3 +46,3 @@ "repository": {

"dependencies": {
"custom-event-polyfill": "joscha/custom-event-polyfill#de24bd9",
"custom-event-polyfill": "^0.3.0",
"debounce": "^1.0.0",

@@ -60,3 +59,3 @@ "webcomponents.js": "webcomponents/webcomponentsjs#b77ca74"

],
"version": "1.1.0"
"version": "1.1.1"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc