export const remoteLinkBehavior=function(e){return class extends e{constructor(){super()}static get properties(){let e={};return super.properties&&(e=super.properties),e.remoteLinkTarget={type:String},e.remoteLinkURL={type:String},e}updated(e){super.updated&&super.updated(e),e.forEach(((e,t)=>{"remoteLinkTarget"!=t&&"remoteLinkURL"!=t||this._remoteLinkURLTarget(this.remoteLinkTarget,this.remoteLinkURL)}))}_remoteLinkURLTarget(e,t){e&&t&&this.remoteLinkURLisExternalLink(t)?(e.setAttribute("target","_blank"),e.setAttribute("rel","noopener noreferrer")):e&&(e.removeAttribute("target"),e.removeAttribute("rel"))}remoteLinkURLisExternalLink(e){if(0!=e.indexOf("http"))return!1;var t=location.href,r=location.pathname,i=t.substring(0,t.indexOf(r));return 0!=e.indexOf(i)}}};