@rocketspark/domain-checker
Version:
Embeddable Domain Checker for Rocketspark
13 lines • 2.54 kB
JavaScript
/*!
*
* @rocketspark/domain-checker v1.0.12
* git+https://github.com/rocketspark/domain-checker.git
*
* Copyright (c) Lee Reichardt and project contributors.
*
* This source code is licensed under the no license license found in the
* LICENSE file in the root directory of this source tree.
*
*/
;(self.webpackChunkDomainChecker=self.webpackChunkDomainChecker||[]).push([[237],{5237:function(e,t,o){o.r(t),o.d(t,{rs_content_placeholder:function(){return n}});var r=o(6919);const n=class{constructor(e){(0,r.r)(this,e),this.border=!0,this.maskContent=""}componentDidLoad(){if(void 0===this.mask)return;const e=(0,r.a)(`./assets/svg-masks/${this.mask}.svg`),t=new XMLHttpRequest;t.open("GET",e),t.onreadystatechange=()=>{if(4==t.readyState&&200==t.status){const e=document.createElement("div");e.innerHTML=t.responseText;const o=e.querySelector("svg");this.maskContent=o.outerHTML,this.width=o.getAttribute("width");const r=o.getAttribute("height");this.scale=parseFloat(r)/parseFloat(this.width)*100}},t.send()}render(){return(0,r.h)(r.H,{key:"9acb72c69ab7ecff0dbc6d236d38243948578823"},(0,r.h)("div",{key:"d149506c9fb99e0c748d9ebfd929133a0abbc076",class:{"rs-content-placeholder__container":!0,"rs-content-placeholder__container--no-border":!this.border},style:{width:`${this.width}px`}},(0,r.h)("div",{key:"c2f8252354bd35b2268892f5e7238b178fd89e6a",class:"rs-content-placeholder__loading",style:{paddingBottom:`${this.scale}%`,clipPath:"url(#clip-mask)"}}),(0,r.h)("div",{key:"00c8c79de8df53e5f9bef7cdd310f838cc59c36c",class:"rs-content-placeholder__svg-container",innerHTML:this.maskContent})))}static get assetsDirs(){return["assets"]}};n.style=":host{display:block}.rs-content-placeholder__container{box-shadow:inset 0 0 0 2px var(--rs-color-light);display:inline-block;border-radius:4px;cursor:wait}.rs-content-placeholder__container--no-border{box-shadow:none}.rs-content-placeholder__svg-container{height:0;width:0;overflow:hidden}.rs-content-placeholder__loading{width:100%;height:100%;position:relative;overflow:hidden;background-color:var(--rs-color-light)}.rs-content-placeholder__loading::before{content:'';display:block;position:absolute;left:-150px;top:0;height:100%;width:150px;background:linear-gradient(to right, var(--rs-color-light) 0%, rgba(255, 255, 255, 0.8) 50%, var(--rs-color-light) 100%);animation:rs-content-placeholder__load 2s cubic-bezier(0.4, 0.0, 0.2, 1) infinite}@keyframes rs-content-placeholder__load{from{left:-150px}to{left:100%}}"}}]);
//# sourceMappingURL=237.index.js.map