Socket
Socket
Sign inDemoInstall

@pelagiccreatures/sargasso

Package Overview
Dependencies
4
Maintainers
1
Versions
88
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.3.1 to 2.3.2

2

dist/sargasso.iife.min.js

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

var SargassoModule=function(e){"use strict";var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};var s="object"==typeof t&&t&&t.Object===Object&&t,i=s,n="object"==typeof self&&self&&self.Object===Object&&self,o=i||n||Function("return this")(),a=o.Symbol;var l=function arrayMap$1(e,t){for(var s=-1,i=null==e?0:e.length,n=Array(i);++s<i;)n[s]=t(e[s],s,e);return n},h=Array.isArray,u=a,p=Object.prototype,f=p.hasOwnProperty,b=p.toString,v=u?u.toStringTag:void 0;var m=function getRawTag$1(e){var t=f.call(e,v),s=e[v];try{e[v]=void 0;var i=!0}catch(e){}var n=b.call(e);return i&&(t?e[v]=s:delete e[v]),n},y=Object.prototype.toString;var _=m,w=function objectToString$1(e){return y.call(e)},O=a?a.toStringTag:void 0;var A=function baseGetTag$5(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":O&&O in Object(e)?_(e):w(e)};var $=function isObjectLike$5(e){return null!=e&&"object"==typeof e},x=A,j=$;var D=function isSymbol$2(e){return"symbol"==typeof e||j(e)&&"[object Symbol]"==x(e)},T=l,R=h,L=D,F=a?a.prototype:void 0,z=F?F.toString:void 0;var W=function baseToString$1(e){if("string"==typeof e)return e;if(R(e))return T(e,baseToString$1)+"";if(L(e))return z?z.call(e):"";var t=e+"";return"0"==t&&1/e==-Infinity?"-0":t},U=W;var B=function toString$4(e){return null==e?"":U(e)};var q=function baseSlice$1(e,t,s){var i=-1,n=e.length;t<0&&(t=-t>n?0:n+t),(s=s>n?n:s)<0&&(s+=n),n=t>s?0:s-t>>>0,t>>>=0;for(var o=Array(n);++i<n;)o[i]=e[i+t];return o};var Q=function castSlice$1(e,t,s){var i=e.length;return s=void 0===s?i:s,!t&&s>=i?e:q(e,t,s)},G=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");var J=function hasUnicode$2(e){return G.test(e)};var Y=function asciiToArray$1(e){return e.split("")},K="\\ud800-\\udfff",X="["+K+"]",ee="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",te="\\ud83c[\\udffb-\\udfff]",se="[^"+K+"]",re="(?:\\ud83c[\\udde6-\\uddff]){2}",ie="[\\ud800-\\udbff][\\udc00-\\udfff]",ne="(?:"+ee+"|"+te+")"+"?",oe="[\\ufe0e\\ufe0f]?",ae=oe+ne+("(?:\\u200d(?:"+[se,re,ie].join("|")+")"+oe+ne+")*"),le="(?:"+[se+ee+"?",ee,re,ie,X].join("|")+")",he=RegExp(te+"(?="+te+")|"+le+ae,"g");var ce=Y,ue=J,de=function unicodeToArray$1(e){return e.match(he)||[]};var pe=Q,fe=J,be=function stringToArray$1(e){return ue(e)?de(e):ce(e)},ge=B;var ve=function createCaseFirst$1(e){return function(t){t=ge(t);var s=fe(t)?be(t):void 0,i=s?s[0]:t.charAt(0),n=s?pe(s,1).join(""):t.slice(1);return i[e]()+n}}("toUpperCase"),me=B,ye=ve;var _e=function capitalize$1(e){return ye(me(e).toLowerCase())};var we=function arrayReduce$1(e,t,s,i){var n=-1,o=null==e?0:e.length;for(i&&o&&(s=e[++n]);++n<o;)s=t(s,e[n],n,e);return s};var Oe=function basePropertyOf$1(e){return function(t){return null==e?void 0:e[t]}}({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),Ae=B,$e=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,xe=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");var Se=function deburr$1(e){return(e=Ae(e))&&e.replace($e,Oe).replace(xe,"")},Ee=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;var je=function asciiWords$1(e){return e.match(Ee)||[]},Ce=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;var ke=function hasUnicodeWord$1(e){return Ce.test(e)},Me="\\ud800-\\udfff",De="\\u2700-\\u27bf",Pe="a-z\\xdf-\\xf6\\xf8-\\xff",Te="A-Z\\xc0-\\xd6\\xd8-\\xde",He="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Re="["+He+"]",Le="\\d+",Fe="["+De+"]",ze="["+Pe+"]",Ne="[^"+Me+He+Le+De+Pe+Te+"]",Ie="(?:\\ud83c[\\udde6-\\uddff]){2}",We="[\\ud800-\\udbff][\\udc00-\\udfff]",Ve="["+Te+"]",Ue="(?:"+ze+"|"+Ne+")",Be="(?:"+Ve+"|"+Ne+")",qe="(?:['’](?:d|ll|m|re|s|t|ve))?",Qe="(?:['’](?:D|LL|M|RE|S|T|VE))?",Ge="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",Ze="[\\ufe0e\\ufe0f]?",Je=Ze+Ge+("(?:\\u200d(?:"+["[^"+Me+"]",Ie,We].join("|")+")"+Ze+Ge+")*"),Ye="(?:"+[Fe,Ie,We].join("|")+")"+Je,Ke=RegExp([Ve+"?"+ze+"+"+qe+"(?="+[Re,Ve,"$"].join("|")+")",Be+"+"+Qe+"(?="+[Re,Ve+Ue,"$"].join("|")+")",Ve+"?"+Ue+"+"+qe,Ve+"+"+Qe,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Le,Ye].join("|"),"g");var Xe=je,et=ke,tt=B,st=function unicodeWords$1(e){return e.match(Ke)||[]};var rt=we,it=Se,nt=function words$1(e,t,s){return e=tt(e),void 0===(t=s?void 0:t)?et(e)?st(e):Xe(e):e.match(t)||[]},ot=RegExp("['’]","g");var at=function createCompounder$2(e){return function(t){return rt(nt(it(t).replace(ot,"")),e,"")}},lt=_e,ht=at((function(e,t,s){return t=t.toLowerCase(),e+(s?lt(t):t)}));const ct={},setValidator=(e,t)=>{ct[e]=t};setValidator("isDefined",(e=>void 0!==e)),setValidator("isUnDefined",(e=>void 0===e)),setValidator("isNull",(e=>null===e)),setValidator("isElement",(e=>e&&(e instanceof Element||e instanceof Window))),setValidator("isEventTarget",(e=>e&&e instanceof EventTarget)),setValidator("isString",(e=>e&&("string"==typeof e||e instanceof String))),setValidator("isArray",(e=>e&&e instanceof Array)),setValidator("notEmpty",(e=>e instanceof Array?0!==e.length:""!==e)),setValidator("isEmpty",(e=>void 0===e||!e||(e instanceof Array?0===e.length:""===e))),setValidator("isObject",(e=>e&&e instanceof Object)),setValidator("isFunction",(e=>e&&"function"==typeof e));const validate=(e,t,s)=>{const i=s.map((e=>{if(e instanceof Array){return-1!==e.map((e=>ct[e]&&ct[e](t))).indexOf(!0)}return ct[e]&&ct[e](t)}));if(-1!==i.indexOf(!1))throw new Error("call to "+e+" invalid value: "+t+" "+s,0+i)},ut=new WeakMap,hasClass=(e,t)=>(validate("hasClass element",e,["isDefined","isElement"]),validate("hasClass cssClass",t,["isDefined","notEmpty","isString"]),e.classList.contains(t)),isVisible=e=>(validate("isVisible element",e,["isDefined","isElement"]),!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)),setMetaData=(e,t,s)=>{validate("setMetaData element",e,["isDefined","isElement"]),validate("setMetaData k",t,["isDefined","isString"]),validate("setMetaData v",s,[["isUnDefined","isNull","isString","isObject"]]);const i=ut.get(e)||{};s?i[t]=s:delete i[t],ut.set(e,i)},getMetaData=(e,t)=>{validate("getMetaData element",e,["isDefined","isElement"]),validate("getMetaData k",t,["isDefined","isString"]);const s=ut.get(e)||{};return t?s[t]:s},on=function(e,t,s,i,n,o,a){"function"==typeof i&&(a=o,o=n,n=i,i=void 0),validate("on uid",e,["isDefined","notEmpty"]),validate("on container",t,["isDefined","isEventTarget"]),validate("on events",s,["isDefined","isString"]),validate("on fn",n,["isDefined","isFunction"]),validate("on selector",i,[["isEmpty","isString"]]);const l="on:"+e+"-"+s+"-"+i;if(getMetaData(t,l))return void console.error("Error: Sargasso utils.on: duplicate event handler specification. %o %s",t,l);const h={uid:e,events:s,selector:i||void 0,fn:o=>{a&&off(e,t,s,i),i?Array.from(t.querySelectorAll(i)).forEach((e=>{(o.target===e||e.contains(o.target))&&n(o,e)})):n(o)},options:o||!1};setMetaData(t,l,h),s.split(/[\s,]+/).forEach((e=>{t.addEventListener(e.trim(),h.fn,h.options)}))},off=function(e,t,s,i){validate("off uid",e,["isDefined","notEmpty"]),validate("off container",t,["isDefined","isEventTarget"]),validate("off events",s,["isDefined","isString"]),validate("off selector",i,[["isEmpty","isString"]]);const n="on:"+e+"-"+s+"-"+i,o=getMetaData(t,n);o&&(s.split(/[\s,]+/).forEach((e=>{t.removeEventListener(e.trim(),o.fn,o.options)})),setMetaData(t,n))},dt={hasClass:hasClass,addClass:(e,t)=>{validate("addClass element",e,["isDefined","isElement"]),validate("addClass addClasses",t,["isDefined","notEmpty",["isString","isArray"]]),Array.isArray(t)||(t=t.split(/[\s,]/)),t.forEach((t=>{t=t.trim(),hasClass(e,t)||e.classList.add(t)}))},removeClass:(e,t)=>{validate("removeClass element",e,["isDefined","isElement"]),validate("removeClass removeClasses",t,["isDefined","notEmpty",["isString","isArray"]]),Array.isArray(t)||(t=t.split(/[\s,]/)),t.forEach((t=>{t=t.trim(),hasClass(e,t)&&e.classList.remove(t)}))},isVisible:isVisible,inViewPort:(e,t=window)=>{validate("inViewPort element",e,["isDefined","isElement"]);const s=e.getBoundingClientRect(),i=isVisible(e),n=s.bottom<0;let o;return o=t.self===window?s.top>(window.innerHeight||document.documentElement.clientHeight):s.top>t.clientHeight,i&&!o&&!n},setCSS:(e,t)=>{validate("css element",e,["isDefined","isElement"]),validate("css css",t,["isDefined",["isObject"]]);for(const s in t)if(Object.prototype.hasOwnProperty.call(t,s)){const i=ht(s);e.style[i]=null!==t[s]?t[s]:null}},setMetaData:setMetaData,getMetaData:getMetaData,on:on,off:off,once:function(e,t,s,i,n,o){"function"==typeof i&&(o=n,n=i,i=void 0),on(e,t,s,i,n,o,!0)},offAll:function(e){validate("offAll container",e,["isDefined","isEventTarget"]);const t=ut.get(e)||{},s=[];for(const e in t)Object.prototype.hasOwnProperty.call(t,e)&&e.match(/^on:/)&&s.push(e);s.forEach((s=>{off(t[s].uid,e,t[s].events,t[s].selector)}))}};var pt=function isObject$4(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)},ft=o,bt=/\s/;var gt=function trimmedEndIndex$1(e){for(var t=e.length;t--&&bt.test(e.charAt(t)););return t},vt=/^\s+/;var mt=function baseTrim$1(e){return e?e.slice(0,gt(e)+1).replace(vt,""):e},yt=pt,_t=D,wt=/^[-+]0x[0-9a-f]+$/i,Ot=/^0b[01]+$/i,At=/^0o[0-7]+$/i,$t=parseInt;var xt=pt,now=function(){return ft.Date.now()},St=function toNumber$1(e){if("number"==typeof e)return e;if(_t(e))return NaN;if(yt(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=yt(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=mt(e);var s=Ot.test(e);return s||At.test(e)?$t(e.slice(2),s?2:8):wt.test(e)?NaN:+e},Et=Math.max,jt=Math.min;var Ct=function debounce(e,t,s){var i,n,o,a,l,h,u=0,p=!1,f=!1,b=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function invokeFunc(t){var s=i,o=n;return i=n=void 0,u=t,a=e.apply(o,s)}function leadingEdge(e){return u=e,l=setTimeout(timerExpired,t),p?invokeFunc(e):a}function shouldInvoke(e){var s=e-h;return void 0===h||s>=t||s<0||f&&e-u>=o}function timerExpired(){var e=now();if(shouldInvoke(e))return trailingEdge(e);l=setTimeout(timerExpired,function remainingWait(e){var s=t-(e-h);return f?jt(s,o-(e-u)):s}(e))}function trailingEdge(e){return l=void 0,b&&i?invokeFunc(e):(i=n=void 0,a)}function debounced(){var e=now(),s=shouldInvoke(e);if(i=arguments,n=this,h=e,s){if(void 0===l)return leadingEdge(h);if(f)return clearTimeout(l),l=setTimeout(timerExpired,t),invokeFunc(h)}return void 0===l&&(l=setTimeout(timerExpired,t)),a}return t=St(t)||0,xt(s)&&(p=!!s.leading,o=(f="maxWait"in s)?Et(St(s.maxWait)||0,t):o,b="trailing"in s?!!s.trailing:b),debounced.cancel=function cancel(){void 0!==l&&clearTimeout(l),u=0,i=h=n=l=void 0},debounced.flush=function flush(){return void 0===l?a:trailingEdge(now())},debounced};var kt=function listCacheClear$1(){this.__data__=[],this.size=0};var Mt=function eq$2(e,t){return e===t||e!=e&&t!=t},Dt=Mt;var Pt=function assocIndexOf$4(e,t){for(var s=e.length;s--;)if(Dt(e[s][0],t))return s;return-1},Tt=Pt,Ht=Array.prototype.splice;var Rt=Pt;var Lt=Pt;var Ft=Pt;var zt=kt,Nt=function listCacheDelete$1(e){var t=this.__data__,s=Tt(t,e);return!(s<0)&&(s==t.length-1?t.pop():Ht.call(t,s,1),--this.size,!0)},It=function listCacheGet$1(e){var t=this.__data__,s=Rt(t,e);return s<0?void 0:t[s][1]},Wt=function listCacheHas$1(e){return Lt(this.__data__,e)>-1},Vt=function listCacheSet$1(e,t){var s=this.__data__,i=Ft(s,e);return i<0?(++this.size,s.push([e,t])):s[i][1]=t,this};function ListCache$4(e){var t=-1,s=null==e?0:e.length;for(this.clear();++t<s;){var i=e[t];this.set(i[0],i[1])}}ListCache$4.prototype.clear=zt,ListCache$4.prototype.delete=Nt,ListCache$4.prototype.get=It,ListCache$4.prototype.has=Wt,ListCache$4.prototype.set=Vt;var Ut=ListCache$4,Bt=Ut;var qt=function stackClear$1(){this.__data__=new Bt,this.size=0};var Qt=function stackDelete$1(e){var t=this.__data__,s=t.delete(e);return this.size=t.size,s};var Gt=function stackGet$1(e){return this.__data__.get(e)};var Zt=function stackHas$1(e){return this.__data__.has(e)},Jt=A,Yt=pt;var Kt,Xt=function isFunction$2(e){if(!Yt(e))return!1;var t=Jt(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},es=o["__core-js_shared__"],ts=(Kt=/[^.]+$/.exec(es&&es.keys&&es.keys.IE_PROTO||""))?"Symbol(src)_1."+Kt:"";var ss=function isMasked$1(e){return!!ts&&ts in e},rs=Function.prototype.toString;var is=function toSource$2(e){if(null!=e){try{return rs.call(e)}catch(e){}try{return e+""}catch(e){}}return""},ns=Xt,os=ss,as=pt,ls=is,hs=/^\[object .+?Constructor\]$/,cs=Function.prototype,us=Object.prototype,ds=cs.toString,ps=us.hasOwnProperty,fs=RegExp("^"+ds.call(ps).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var bs=function baseIsNative$1(e){return!(!as(e)||os(e))&&(ns(e)?fs:hs).test(ls(e))},gs=function getValue$1(e,t){return null==e?void 0:e[t]};var vs=function getNative$6(e,t){var s=gs(e,t);return bs(s)?s:void 0},ms=vs(o,"Map"),ys=vs(Object,"create"),_s=ys;var ws=function hashClear$1(){this.__data__=_s?_s(null):{},this.size=0};var Os=function hashDelete$1(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},As=ys,$s=Object.prototype.hasOwnProperty;var xs=function hashGet$1(e){var t=this.__data__;if(As){var s=t[e];return"__lodash_hash_undefined__"===s?void 0:s}return $s.call(t,e)?t[e]:void 0},Ss=ys,Es=Object.prototype.hasOwnProperty;var js=ys;var Cs=ws,ks=Os,Ms=xs,Ds=function hashHas$1(e){var t=this.__data__;return Ss?void 0!==t[e]:Es.call(t,e)},Ps=function hashSet$1(e,t){var s=this.__data__;return this.size+=this.has(e)?0:1,s[e]=js&&void 0===t?"__lodash_hash_undefined__":t,this};function Hash$1(e){var t=-1,s=null==e?0:e.length;for(this.clear();++t<s;){var i=e[t];this.set(i[0],i[1])}}Hash$1.prototype.clear=Cs,Hash$1.prototype.delete=ks,Hash$1.prototype.get=Ms,Hash$1.prototype.has=Ds,Hash$1.prototype.set=Ps;var Ts=Hash$1,Hs=Ut,Rs=ms;var Ls=function isKeyable$1(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e};var Fs=function getMapData$4(e,t){var s=e.__data__;return Ls(t)?s["string"==typeof t?"string":"hash"]:s.map},zs=Fs;var Ns=Fs;var Is=Fs;var Ws=Fs;var Vs=function mapCacheClear$1(){this.size=0,this.__data__={hash:new Ts,map:new(Rs||Hs),string:new Ts}},Us=function mapCacheDelete$1(e){var t=zs(this,e).delete(e);return this.size-=t?1:0,t},Bs=function mapCacheGet$1(e){return Ns(this,e).get(e)},qs=function mapCacheHas$1(e){return Is(this,e).has(e)},Qs=function mapCacheSet$1(e,t){var s=Ws(this,e),i=s.size;return s.set(e,t),this.size+=s.size==i?0:1,this};function MapCache$2(e){var t=-1,s=null==e?0:e.length;for(this.clear();++t<s;){var i=e[t];this.set(i[0],i[1])}}MapCache$2.prototype.clear=Vs,MapCache$2.prototype.delete=Us,MapCache$2.prototype.get=Bs,MapCache$2.prototype.has=qs,MapCache$2.prototype.set=Qs;var Gs=MapCache$2,Zs=Ut,Js=ms,Ys=Gs;var Ks=Ut,Xs=qt,er=Qt,tr=Gt,sr=Zt,rr=function stackSet$1(e,t){var s=this.__data__;if(s instanceof Zs){var i=s.__data__;if(!Js||i.length<199)return i.push([e,t]),this.size=++s.size,this;s=this.__data__=new Ys(i)}return s.set(e,t),this.size=s.size,this};function Stack$1(e){var t=this.__data__=new Ks(e);this.size=t.size}Stack$1.prototype.clear=Xs,Stack$1.prototype.delete=er,Stack$1.prototype.get=tr,Stack$1.prototype.has=sr,Stack$1.prototype.set=rr;var ir=Gs,nr=function setCacheAdd$1(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},or=function setCacheHas$1(e){return this.__data__.has(e)};function SetCache$1(e){var t=-1,s=null==e?0:e.length;for(this.__data__=new ir;++t<s;)this.add(e[t])}SetCache$1.prototype.add=SetCache$1.prototype.push=nr,SetCache$1.prototype.has=or;o.Uint8Array;var ar=a?a.prototype:void 0;ar&&ar.valueOf;Object.prototype.propertyIsEnumerable,Object.getOwnPropertySymbols;var lr=A,hr=$;var cr=function baseIsArguments$1(e){return hr(e)&&"[object Arguments]"==lr(e)},ur=$,dr=Object.prototype,pr=dr.hasOwnProperty,fr=dr.propertyIsEnumerable,br=(cr(function(){return arguments}()),{}),gr={get exports(){return br},set exports(e){br=e}};var vr=function stubFalse(){return!1};!function(e,t){var s=o,i=vr,n=t&&!t.nodeType&&t,a=n&&e&&!e.nodeType&&e,l=a&&a.exports===n?s.Buffer:void 0,h=(l?l.isBuffer:void 0)||i;e.exports=h}(gr,br);var mr=function isLength$2(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991},yr=A,_r=mr,wr=$,Or={};Or["[object Float32Array]"]=Or["[object Float64Array]"]=Or["[object Int8Array]"]=Or["[object Int16Array]"]=Or["[object Int32Array]"]=Or["[object Uint8Array]"]=Or["[object Uint8ClampedArray]"]=Or["[object Uint16Array]"]=Or["[object Uint32Array]"]=!0,Or["[object Arguments]"]=Or["[object Array]"]=Or["[object ArrayBuffer]"]=Or["[object Boolean]"]=Or["[object DataView]"]=Or["[object Date]"]=Or["[object Error]"]=Or["[object Function]"]=Or["[object Map]"]=Or["[object Number]"]=Or["[object Object]"]=Or["[object RegExp]"]=Or["[object Set]"]=Or["[object String]"]=Or["[object WeakMap]"]=!1;var Ar=function baseIsTypedArray$1(e){return wr(e)&&_r(e.length)&&!!Or[yr(e)]};var $r=function baseUnary$1(e){return function(t){return e(t)}},xr={},Sr={get exports(){return xr},set exports(e){xr=e}};!function(e,t){var i=s,n=t&&!t.nodeType&&t,o=n&&e&&!e.nodeType&&e,a=o&&o.exports===n&&i.process,l=function(){try{var e=o&&o.require&&o.require("util").types;return e||a&&a.binding&&a.binding("util")}catch(e){}}();e.exports=l}(Sr,xr);var Er=Ar,jr=$r,Cr=xr&&xr.isTypedArray;Cr&&jr(Cr),Object.prototype.hasOwnProperty;Object.prototype;(function overArg$1(e,t){return function(s){return e(t(s))}})(Object.keys,Object),Object.prototype.hasOwnProperty;Object.prototype.hasOwnProperty;var kr=vs(o,"DataView"),Mr=ms,Dr=vs(o,"Promise"),Pr=vs(o,"Set"),Tr=vs(o,"WeakMap"),Hr=A,Rr=is,Lr="[object Map]",Fr="[object Promise]",zr="[object Set]",Nr="[object WeakMap]",Ir="[object DataView]",Wr=Rr(kr),Vr=Rr(Mr),Ur=Rr(Dr),Br=Rr(Pr),qr=Rr(Tr),Qr=Hr;(kr&&Qr(new kr(new ArrayBuffer(1)))!=Ir||Mr&&Qr(new Mr)!=Lr||Dr&&Qr(Dr.resolve())!=Fr||Pr&&Qr(new Pr)!=zr||Tr&&Qr(new Tr)!=Nr)&&(Qr=function(e){var t=Hr(e),s="[object Object]"==t?e.constructor:void 0,i=s?Rr(s):"";if(i)switch(i){case Wr:return Ir;case Vr:return Lr;case Ur:return Fr;case Br:return zr;case qr:return Nr}return t});Object.prototype.hasOwnProperty;var Gr,Zr,Jr,Yr,Kr,Xr,ei={},ti={get exports(){return ei},set exports(e){ei=e}},si=(Gr=[],Zr=[],Jr=[],Yr=[],Kr=null,Xr=function(e,t,s,i){var n=s||null,o=i||[{target:e,property:""}];Gr.push(o),e instanceof Array&&(e.hasOwnProperty("__length")?e.__length=e.length:Object.defineProperty(e,"__length",{enumerable:!1,value:e.length,writable:!0}));var a=[],_getPath=function(e,t,s){for(var i="",n=null,a=0;a<o.length;a++)n instanceof Array&&!isNaN(o[a].property)&&(o[a].property=n.indexOf(o[a].target)),i=i+"."+o[a].property,n=o[a].target;return i=(i=i+"."+t).substring(2),!0===s&&(i="/"+i.replace(/\./g,"/")),i},_notifyObservers=function(e){if(!0!==n.paused){var s="number"==typeof t;if(s||!0===t)setTimeout((function(){if(e===a.length){var t=a.slice(0);a=[];for(var s=0;s<n.observers.length;s++)n.observers[s](t)}}),s&&t>0?t:10);else{var i=a.slice(0);a=[];for(var o=0;o<n.observers.length;o++)n.observers[o](i)}}},l={get:function(e,s){if("__getTarget"===s)return e;if("__isProxy"===s)return!0;if("__getParent"===s)return function(e){void 0===e&&(e=1);var t=_getPath(0,"__getParent").split(".");return t.splice(-(e+1),e+1),function(e,t){return t.split(".").reduce((function(e,t){return e?e[t]:void 0}),e||self)}(n.parentProxy,t.join("."))};if("__getPath"===s)return _getPath(0,"__getParent").slice(0,-12);var i=e[s];if(e instanceof Date&&i instanceof Function&&null!==i)return i.bind(e);if(i instanceof Object&&null!==i&&e.hasOwnProperty(s)){if(!0===i.__isProxy&&(i=i.__getTarget),i.__targetPosition>-1&&null!==Jr[i.__targetPosition])for(var a=Yr[i.__targetPosition],l=0,h=a.length;l<h;l++)if(n===a[l].observable)return a[l].proxy;var u=o.slice(0);return u.push({target:i,property:s}),Xr(i,t,n,u)}return i},deleteProperty:function(e,t){var s=!0;Kr===u&&(s=!1,Kr=null);var i=Object.assign({},e);if(a.push({type:"delete",target:e,property:t,newValue:null,previousValue:i[t],currentPath:_getPath(0,t),jsonPointer:_getPath(0,t,!0),proxy:u}),!0===s){n.changesPaused||delete e[t];for(var o=0,l=Jr.length;o<l&&e!==Jr[o];o++);for(var h=Yr[o]||[],p=h.length;p--;)h[p].proxy!==u&&(Kr=h[p].proxy,delete h[p].proxy[t])}return _notifyObservers(a.length),!0},set:function(e,t,s,i){s&&s.__isProxy&&(s=s.__getTarget);var o=!0;Kr===u&&(o=!1,Kr=null);var l=e[t];if(l!==s||!1===o||"length"===t&&e instanceof Array&&e.__length!==s){var h=!0,p=typeof l,f="update";if("undefined"===p&&(f="add"),a.push({type:f,target:e,property:t,newValue:s,previousValue:i[t],currentPath:_getPath(0,t),jsonPointer:_getPath(0,t,!0),proxy:u}),"length"===t&&e instanceof Array&&e.__length!==s&&(a[a.length-1].previousValue=e.__length,e.__length=s),!0===o){n.changesPaused||(e[t]=s),h=!1;for(var b=e.__targetPosition,v=Yr[b].length;v--;)if(n===Yr[b][v].observable&&null!==Jr[Yr[b][v].observable.parentTarget.__targetPosition]){h=!0;break}if(h){for(var m=Yr[b],y=0,_=m.length;y<_;y++)m[y].proxy!==u&&(Kr=m[y].proxy,m[y].proxy[t]=s);setTimeout((function(){if("object"===p&&null!==l){for(var t=Object.keys(e),s=0,i=t.length;s<i;s++)if(e[t[s]]===l)return;var o=!1;if(function iterate(e){for(var t=Object.keys(e),s=0,i=t.length;s<i;s++){var n=e[t[s]];if(n instanceof Object&&null!==n&&iterate(n),n===l)return void(o=!0)}}(e),!0===o)return;!function iterate(e){for(var t=Object.keys(e),s=0,i=t.length;s<i;s++){var o=e[t[s]];o instanceof Object&&null!==o&&iterate(o)}var a=-1;for(s=0,i=Jr.length;s<i;s++)if(e===Jr[s]){a=s;break}if(a>-1){for(var l=Yr[a],h=l.length;h--;)if(n===l[h].observable){l.splice(h,1);break}0==l.length&&(Jr[a]=null)}}(l)}}),1e4)}}h&&_notifyObservers(a.length)}return!0}},h=e.__targetPosition;h>-1||Object.defineProperty(e,"__targetPosition",{value:Jr.length,writable:!1,enumerable:!1,configurable:!1});var u=new Proxy(e,l);null===n&&(n={parentTarget:e,domDelay:t,parentProxy:u,observers:[],paused:!1,path:o,changesPaused:!1},Zr.push(n));var p={target:e,proxy:u,observable:n};return h>-1?(null===Jr[h]&&(Jr[h]=e),Yr[h].push(p)):(Jr.push(e),Yr.push([p])),u},{create:function(e,t,s){!0===e.__isProxy&&(e=e.__getTarget);var i=Xr(e,t);return"function"==typeof s&&this.observe(i,s),function iterate(e){for(var t=e.__getTarget,s=Object.keys(t),i=0,n=s.length;i<n;i++){var o=s[i];t[o]instanceof Object&&null!==t[o]&&iterate(e[o])}}(i),i},observe:function(e,t){for(var s=Zr.length;s--;)if(Zr[s].parentProxy===e){Zr[s].observers.push(t);break}},pause:function(e){for(var t=Zr.length,s=!1;t--;)if(Zr[t].parentProxy===e){Zr[t].paused=!0,s=!0;break}if(0==s)throw new Error("ObseravableSlim could not pause observable -- matching proxy not found.")},resume:function(e){for(var t=Zr.length,s=!1;t--;)if(Zr[t].parentProxy===e){Zr[t].paused=!1,s=!0;break}if(0==s)throw new Error("ObseravableSlim could not resume observable -- matching proxy not found.")},pauseChanges:function(e){for(var t=Zr.length,s=!1;t--;)if(Zr[t].parentProxy===e){Zr[t].changesPaused=!0,s=!0;break}if(0==s)throw new Error("ObseravableSlim could not pause changes on observable -- matching proxy not found.")},resumeChanges:function(e){for(var t=Zr.length,s=!1;t--;)if(Zr[t].parentProxy===e){Zr[t].changesPaused=!1,s=!0;break}if(0==s)throw new Error("ObseravableSlim could not resume changes on observable -- matching proxy not found.")},remove:function(e){for(var t=null,s=!1,i=Zr.length;i--;)if(Zr[i].parentProxy===e){t=Zr[i],s=!0;break}for(var n=Yr.length;n--;)for(var o=Yr[n].length;o--;)Yr[n][o].observable===t&&(Yr[n].splice(o,1),0===Yr[n].length&&(Jr[n]=null));!0===s&&Zr.splice(i,1)}});try{ti.exports=si}catch(e){}const ri={};class ObservableObject{constructor(e,t={},s={}){if(this.id=e,ri[this.id])throw new Error("ObservableObject "+e+" already exists.");this.bound={},this.data=ei.create(t,!1,(e=>{this.sync(e)})),this.options=s,ri[this.id]=this}destroy(){ei.pause(this.data),delete ri[this.id],delete this.data,Object.keys(this.bound).forEach((e=>{Object.keys(this.bound[e]).forEach((t=>{this.unbind(t,e)}))})),ei.remove(this.data)}getObservableData(){return this.data}bind(e,t,s="*"){this.bound[s]||(this.bound[s]={}),this.bound[s][e]=t,t(this.id,"connect")}unbind(e,t="*"){this.bound[t][e](this.id,"disconnect"),this.bound[t]&&this.bound[t][e]&&delete this.bound[t][e]}sync(e){for(const t of e){const e=t.type,s=t.currentPath,i=t.newValue,n=t.previousValue,o=[];for(const e in this.bound)if("*"===e)o.push(e);else{const t=new RegExp("^"+e.replace(".","\\."));s.match(t)&&o.push(e)}for(const t of o)for(const o in this.bound[t])this.bound[t][o](this.id,e,s,i,n)}}}let ii,ni,oi,ai,li,hi;class ObserverSubscriptionManager{constructor(e){this.options=e,this.observers=[],this.pendingAnimationFrame=void 0,this.frameQueue=[],this.sleeping=!0}subscribe(e){!this.observers.length&&this.sleeping&&this.wakeup(),this.observers.push(e)}unSubscribe(e){-1!==this.observers.indexOf(e)&&this.observers.splice(this.observers.indexOf(e),1),this.observers.length||this.sleep()}sleep(){this.sleeping=!0}wakeup(){this.sleeping=!1}notifyObservers(e,t){for(let s=0;s<this.observers.length;s++)this.observers[s][e]&&this.observers[s][e].apply(this.observers[s],t||[])}flushQueue(){this.pendingAnimationFrame&&(cancelAnimationFrame(this.pendingAnimationFrame),this.pendingAnimationFrame=void 0),this.frameQueue=[]}queueFrame(e){this.frameQueue.push(e.bind(this)),this.pendingAnimationFrame||(this.pendingAnimationFrame=requestAnimationFrame((()=>{this.processQueue()})))}processQueue(){this.pendingAnimationFrame=void 0;const e=this.frameQueue.slice(0);this.frameQueue=[];for(let t=0;t<e.length;t++)e[t]()}}class DOMWatcher extends ObserverSubscriptionManager{constructor(e={}){super(e),this.mutationHandler=Ct(((e,t)=>{this.observeDOM(this.options.shadowDOM||document.body)}),25,{maxWait:100}),this.mutationObserver=new MutationObserver(this.mutationHandler,!1)}subscribe(e){super.subscribe(e),e.watchDOM(this.options.shadowDOM||document.body)}wakeup(){super.wakeup(),this.mutationObserver.observe(this.options.shadowDOM||document.body,{childList:!0,subtree:!0})}sleep(){super.sleep(),this.mutationObserver.disconnect()}observeDOM(e){this.notifyObservers("watchDOM",[e||this.options.shadowDOM||document.body])}}ii=new DOMWatcher,ni=new class ScrollWatcher extends ObserverSubscriptionManager{constructor(e={}){super(e),this.scrollElement=this.options.scrollElement||window,this.lastscroll=0,this.scrolling=!1}trigger(){this.scrolling||this.scrollLoop()}scrollLoop(){if(this.lastscroll!==this.scrollTop()){this.scrolling=!0,this.lastscroll=this.scrollTop(),this.watchScroll();const frame=()=>{this.scrollLoop()};this.queueFrame(frame)}else this.scrolling=!1}setOptions(e={}){this.sleep(),this.scrollElement=e.scrollElement||window,this.wakeup()}subscribe(e){super.subscribe(e),e.watchScroll()}wakeup(){super.wakeup(),dt.on("theScrollWatcher",this.scrollElement,"scroll",(()=>{this.trigger()}))}sleep(){super.sleep(),dt.off("theScrollWatcher",this.scrollElement,"scroll")}inViewPort(e){return dt.inViewPort(e,this.scrollElement)}watchScroll(){this.notifyObservers("watchScroll")}scrollTop(e){if(this.scrollElement===window){if(void 0===e)return window.pageYOffset;window.scrollTo(0,e)}else{if(void 0===e)return this.scrollElement.scrollTop;this.scrollElement.scrollTop=e}}},oi=new class ResizeWatcher extends ObserverSubscriptionManager{constructor(e){super(e),this.debounce=Ct((()=>{this.watchResize()}),250)}subscribe(e){super.subscribe(e),e.watchResize()}wakeup(){super.wakeup(),window.addEventListener("resize",this.debounce,!1)}sleep(){super.sleep(),window.removeEventListener("resize",this.debounce)}watchResize(){this.notifyObservers("watchResize")}},ai=new class OrientationWatcher extends ObserverSubscriptionManager{constructor(e){super(e),"onorientationchange"in window?dt.addClass(document.body,"have-orientation"):dt.addClass(document.body,"no-orientation"),this.debounce=Ct((()=>{this.watchOrientation()}),250)}subscribe(e){super.subscribe(e),e.watchOrientation()}wakeup(){super.wakeup(),"onorientationchange"in window&&window.addEventListener("orientationchange",this.debounce,!1)}sleep(){super.sleep(),"onorientationchange"in window&&window.removeEventListener("orientationchange",this.debounce)}watchOrientation(){this.notifyObservers("watchOrientation")}},li=new class WorkerWatcher extends ObserverSubscriptionManager{constructor(e){super(e),this.workers={}}registerWorker(e,t){if(!this.workers[e]){let s=t,i=!1;if(!t.match(/^(http|\/)/i)){const e=new Blob([t],{type:"text/javascript"});s=URL.createObjectURL(e),i=!0}this.workers[e]={worker:new Worker(s),observers:[]},i&&URL.revokeObjectURL(s),this.workers[e].worker.onmessage=t=>{this.workerMessage(e,t)}}return this.workers[e].worker}subscribe(e,t){if(!this.workers[t])throw new Error("worker "+t+" does not exist");this.workers[t].observers.push(e),super.subscribe(e)}unSubscribe(e,t){if(!this.workers[t])throw new Error("worker "+t+" does not exist");const s=this.workers[t].observers;-1!==s.indexOf(e)&&s.splice(s.indexOf(e),1),s.length||(this.workers[t].worker.terminate(),delete this.workers[t]),super.unSubscribe(e)}workerMessage(e,t){this.workers[e].observers.forEach((s=>{s.workerMessage&&s.workerMessage(e,t)}))}wakeup(){super.wakeup()}sleep(){super.sleep()}},hi=new class ObservableObjectWatcher extends ObserverSubscriptionManager{constructor(e){super(e),this.registeredObservableObjects={}}getObservable(e){return this.registeredObservableObjects[e]?this.registeredObservableObjects[e].observable:void 0}observableStart(e,t){const s=(e=>ri[e])(e);if(s&&void 0!==t)throw new Error("ObservableObject "+e+" already exists, can't build.");return this.registeredObservableObjects[e]||(this.registeredObservableObjects[e]=s?{id:e,observable:s,observers:[],managed:!1}:{id:e,observable:new ObservableObject(e,t),observers:[],managed:!0},this.registeredObservableObjects[e].observable.bind(this.constructor.name,this.notify.bind(this))),this.registeredObservableObjects[e].observable}observableDestroy(e){if(!this.registeredObservableObjects[e])throw new Error("ObservableObject observableDestroy "+e+" does not exist");this.registeredObservableObjects[e].observable.unbind(this.constructor.name),this.registeredObservableObjects[e].observable.destroy(),delete this.registeredObservableObjects[e]}subscribe(e,t,s){this.registeredObservableObjects[t]||this.observableStart(t,s),this.registeredObservableObjects[t].observers.push(e),super.subscribe(e)}unSubscribe(e,t){if(!this.registeredObservableObjects[t])throw new Error("ObservableObject unSubscribe "+t+" does not exist");const s=this.registeredObservableObjects[t].observers;-1!==s.indexOf(e)&&s.splice(s.indexOf(e),1),!s.length&&this.registeredObservableObjects[t].managed&&this.observableDestroy(t),super.unSubscribe(e)}notify(e,t,s,i,n){if(!this.registeredObservableObjects[e])throw new Error("ObservableObject notify "+e+" does not exist");this.registeredObservableObjects[e].observers.forEach((o=>{o.observableChanged&&o.observableChanged(e,t,s,i,n)}))}};var ci=at((function(e,t,s){return e+(s?"-":"")+t.toLowerCase()}));let ui=0;const di=[],pi="customElements"in window,fi={},registerSargassoClass=(e,t)=>{if(fi[e])throw new Error("Sargasso class "+e+" is already registered.");if(fi[e]=t,pi){const t=new Function("registeredClasses",`\n\t\t\treturn class ${e}Element extends HTMLElement {\n\t\t\t\tconstructor(element, options = {}) {\n\t\t\t\t\tsuper()\n\t\t\t\t\tthis.helperClass= '${e}'\n\t\t\t\t\tthis.helpers = []\n\t\t\t\t}\n\n\t\t\t\tconnectedCallback () {\n\t\t\t\t\tthis.helpers.push(new registeredClasses[this.helperClass](this,{isCustomElement:true}))\n\t\t\t\t\tif (this.hasAttributes()) {\n\t\t\t\t\t\tfor(let i = 0; i < this.attributes.length; i++) {\n\t\t\t\t\t\t\tif(this.attributes[i].name.match(/^sargasso-/)) {\n\t\t\t\t\t\t\t\tlet classname = this.attributes[i].name.replace(/^sargasso-/,'').split('-').map(word=> word.charAt(0).toUpperCase() + word.slice(1).toLowerCase()).join('')\n\t\t\t\t\t\t\t\tif(!registeredClasses[classname]) {\n\t\t\t\t\t\t\t\t\tconsole.log('instantiate by attribute ' + this.attributes[i].name + ' > ' + classname + ' is not a sargasso class')\n\t\t\t\t\t\t\t\t\tcontinue\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tthis.helpers.push(new registeredClasses[classname](this,{isCustomElement:true}))\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tthis.helpers.forEach((helper) => {\n\t\t\t\t\t\thelper.start()\n\t\t\t\t\t})\n\t\t\t\t}\n\n\t\t\t\tdisconnectedCallback () {\n\t\t\t\t\tthis.helpers.forEach((helper) => {\n\t\t\t\t\t\thelper.sleep()\n\t\t\t\t\t\thelper.destroy()\n\t\t\t\t \t})\n\t\t\t\t\tthis.helpers = [] // nuke the reference for trash collection\n\t\t\t\t}\n\t\t\t}`)(fi),s=window.sargassoOptions||{},i=void 0!==s.customElementPrefix?s.customElementPrefix:"sargasso-";customElements.define(i+ci(e),t)}},bi=["DOMChanged","didScroll","didResize","didBreakpoint","enterViewport","exitViewport","enterFullscreen","exitFullscreen","newPage","elementEvent","workerOnMessage","observableChanged"];class Sargasso{constructor(e,t={}){validate("Sargasso constructor element",e,["isDefined","isElement"]),validate("Sargasso constructor options",t,["isDefined",["isObject"]]),this.uid=++ui,this.element=e,t.shadowDOM&&(this._shadowDOM=e.attachShadow({mode:"open"}),this._shadowRoot=document.createElement("div"),this._shadowDOM.append(this._shadowRoot),this._hostElement=this.element,this.element=this._shadowRoot),this.options=t,this._pendingAnimationFrame=void 0,this._frameQueue=[],this._isInViewport=!1,this._workers={},this._observables={},this._template=void 0,this._templateArgs={},this._started=!1,this.render=Ct((()=>{this._render()}),100,{maxWait:250})}start(){const e=this.getMetaData("registeredResponsiveControllers")||[];e.push(this),this.setMetaData("registeredResponsiveControllers",e),this.setMetaData(this.constructor.name,this),di.push(this),this._shadowDOM&&(this._shadowDOMWatcher||(this._shadowDOMWatcher=new DOMWatcher({shadowDOM:this._shadowRoot})),this._shadowDOMWatcher.subscribe(this)),this.options.watchDOM&&ii.subscribe(this),(this.options.watchScroll||this.options.watchViewport)&&ni.subscribe(this),(this.options.watchResize||this.options.watchViewport)&&oi.subscribe(this),(this.options.watchOrientation||this.options.watchViewport)&&ai.subscribe(this),this.elementListener=e=>{e.detail&&e.detail.sargassoEvent&&-1!==bi.indexOf(e.detail.sargassoEvent)?this[e.detail.sargassoEvent].apply(this,e.detail.sargassoEventOptions||[]):this.elementEvent(e)},this.element.addEventListener("sargasso",this.elementListener),this._started=!0}sleep(){this._shadowDOM&&this._shadowDOMWatcher.unSubscribe(this),this.options.watchDOM&&ii.unSubscribe(this),(this.options.watchScroll||this.options.watchViewport)&&ni.unSubscribe(this),(this.options.watchResize||this.options.watchViewport)&&oi.unSubscribe(this),(this.options.watchOrientation||this.options.watchViewport)&&ai.unSubscribe(this),this.element.removeEventListener("sargasso",this.elementListener),dt.offAll(this.element),this._started=!1}DOMChanged(e){}didScroll(){}didResize(){}didBreakpoint(){}enterViewport(){}exitViewport(){}enterFullscreen(){}exitFullscreen(){}newPage(e,t){}elementEvent(e){}workerOnMessage(e,t){}observableChanged(e,t,s,i,n){this.render()}setMetaData(e,t){dt.setMetaData(this.element,e,t)}getMetaData(e){return dt.getMetaData(this.element,e)}on(e,t,s,i){dt.on(this.constructor.name+"-"+this.uid,this.element,e,t,s,i)}off(e,t){dt.off(this.constructor.name+"-"+this.uid,this.element,e,t)}once(e,t,s,i){dt.once(this.constructor.name+"-"+this.uid,this.element,e,t,s,i)}notifyAll(e,t){if(-1===bi.indexOf(e))throw new Error("invalid event name "+e);for(let s=0;s<di.length;s++){const i=di[s];i!==this&&i[e]&&i[e].apply(i,t)}}notifyElement(e,t,s){if(-1===bi.indexOf(t))throw new Error("invalid event name "+t);const i=this.getMetaData("registeredResponsiveControllers");if(i)for(let e=0;e<i.length;e++){const n=i[e];n!==this&&n[t]&&n[t].apply(n,s)}}queueFrame(e){this._frameQueue.push(e.bind(this)),this._pendingAnimationFrame||(this._pendingAnimationFrame=requestAnimationFrame((()=>{this._processQueue()})))}wantFullscreen(e){e?this.enterFullscreen():this.exitFullscreen()}hasClass(e){return dt.hasClass(this.element,e)}addClass(e){dt.addClass(this.element,e)}removeClass(e){dt.removeClass(this.element,e)}setCSS(e){dt.setCSS(this.element,e)}isVisible(){return dt.isVisible(this.element)}workerStart(e,t){return this._workers[e]=li.registerWorker(e,t),li.subscribe(this,e),this._workers[e]}workerPostMessage(e,t){t.uid||(t.uid=this.uid),this._workers[e]&&this._workers[e].postMessage(t)}getObservable(e){return this._observables[e]}getObservableData(e){return this._observables[e].data}observableStart(e,t){return hi.subscribe(this,e,t),this._observables[e]=hi.getObservable(e),this._observables[e]}observableStop(e){this._observables[e]&&(hi.unSubscribe(this,e),delete this._observables[e])}observableStopAll(){for(const e in this._observables)this.observableStop(e)}setTemplate(e){this._template=e}setRenderer(e){this.renderer=e}setTemplateArgs(e={}){this._templateArgs=e,this.render()}getTemplateArgs(){const e=this._templateArgs||{};return JSON.parse(JSON.stringify(e))}_render(){this._template&&this.renderer&&this.renderer(this._template(this.getTemplateArgs()),this.element)}_flushQueue(){this._pendingAnimationFrame&&(cancelAnimationFrame(this._pendingAnimationFrame),this._pendingAnimationFrame=void 0),this._frameQueue=[]}_processQueue(){this._pendingAnimationFrame=void 0;const e=this._frameQueue.slice(0);this._frameQueue=[];for(let t=0;t<e.length;t++)e[t]()}_stopWorker(e){this._workers[e]&&(li.unSubscribe(this,e),delete this._workers[e])}_stopAllWorkers(){for(const e in this._workers)this._stopWorker(e)}destroy(){this._stopAllWorkers(),this.observableStopAll(),this._flushQueue(),this._started&&this.sleep();const e=this.getMetaData("registeredResponsiveControllers");e&&-1!==e.indexOf(this)&&(e.splice(e.indexOf(this),1),this.setMetaData("registeredResponsiveControllers",e)),this.setMetaData(this.constructor.name,null),this.element=null,-1!==di.indexOf(this)&&di.splice(di.indexOf(this),1)}watchDOM(e){e===this._shadowRoot?ii.observeDOM(this._shadowRoot):this.DOMChanged(e)}watchScroll(){this.options.watchViewport&&this.inViewport(),this.didScroll()}watchResize(){this.options.watchViewport&&this.inViewport(),this.didResize()}watchOrientation(){!window.orientation||90!==window.orientation&&-90!==window.orientation?this.wantFullscreen(!1):this.wantFullscreen(!0)}inViewport(){ni.inViewPort(this.element)?this._isInViewport||(this.enterViewport(),this._isInViewport=!0):this._isInViewport&&(this.exitViewport(),this._isInViewport=!1)}workerMessage(e,t){t.data.uid===this.uid&&this.workerOnMessage(e,t.data)}nativeRequestFullScreen(){if(document.fullscreenElement){if(document.fullscreenElement===this.element)return;document.exitFullscreen()}this.element.requestFullscreen()}nativeExitFullScreen(){document.fullscreenElement&&document.fullscreenElement===this.element&&document.exitFullscreen()}}registerSargassoClass("Sargasso",Sargasso);class LazyInstantiate extends Sargasso{constructor(e,t={}){t.watchScroll=!0,t.watchResize=!0,t.watchDOM=!0,t.immortal=!0,super(e,t)}didResize(){super.didResize(),this.lazyHandler()}didScroll(){super.didScroll(),this.lazyHandler()}DOMChanged(e){super.DOMChanged(e),this.lazyHandler(e)}lazyHandler(e=document){const t=e.querySelectorAll("[data-lazy-sargasso-class]");for(let e=0;e<t.length;e++){const s=t[e];if(ni.inViewPort(s)){const i=s.getAttribute("data-lazy-sargasso-class").split(/\s*,\s*/);for(let s=0;s<i.length;s++){new fi[i[s]](t[e]).start()}s.removeAttribute("data-lazy-sargasso-class")}}}}registerSargassoClass("LazyInstantiate",LazyInstantiate);class SargassoSupervisor extends Sargasso{constructor(e,t={}){super(e,{watchDOM:!0,mortal:!1}),this.lazy=new LazyInstantiate(e,t)}start(){this.lazy.start(),super.start()}instantiate(e){const t=e.getAttribute("data-sargasso-class").split(/\s*,\s*/);for(let s=0;s<t.length;s++)try{new fi[t[s]](e).start()}catch(e){console.log("error instantiating "+t[s],e,fi)}e.removeAttribute("data-sargasso-class")}newPage(){this.doIt()}DOMChanged(e){this.doIt(e)}doIt(e=document.body){e.getAttribute("data-sargasso-class")&&this.instantiate(e);const t=e.querySelectorAll("[data-sargasso-class]");for(const e of t)this.instantiate(e);const s=[];for(let e=0;e<di.length;e++)di[e].options.immortal||di[e].options.isCustomElement||document.body.contains(di[e].element)||s.push(di[e]);for(let e=0;e<s.length;e++)s[e].destroy()}}registerSargassoClass("SargassoSupervisor",SargassoSupervisor);const gi=window.breakpoints||{widths:[{className:"breakpoint-phone",maxWidth:599},{className:"breakpoint-tablet",maxWidth:904},{className:"breakpoint-desktop",maxWidth:void 0}]};class Breakpoints extends Sargasso{constructor(e,t={}){t.watchResize=!0,super(e,t),this.options.widths=t.widths||gi,this.scale=void 0,this.widths=[],this.classes=[],this.debouncedDetectGeometry=Ct((()=>{this.detectGeometry()}),100,{maxWait:150})}start(){super.start(),this.debouncedDetectGeometry()}didResize(){this.debouncedDetectGeometry()}detectGeometry(){const e=window.doBreakpoints(this.options.widths);if(e!==this.scale){const frame=()=>{this.notifyAll("didBreakpoint",[e])};this.queueFrame(frame)}this.scale=e}}registerSargassoClass("Breakpoints",Breakpoints);class HijaxLoader extends Sargasso{constructor(e,t={}){t.watchDOM=!0,t.immortal=!0,super(e,t),this.excludeRegex=new RegExp("^(//|http|javascript|mailto|#)","i"),this.currentPage=location.pathname+location.search,this.cachedMarkup={}}start(){const e=document.querySelectorAll("[data-hijax-skip-unchanged]");for(let t=0;t<e.length;t++){const s=e[t],i=s.getAttribute("id");this.cachedMarkup[i]=s.innerHTML}super.start(),window.addEventListener("popstate",(e=>{this.watchPopState(e)}),!1)}DOMChanged(e){super.DOMChanged(e),this.hijaxLinks(e)}watchPopState(e){location.pathname+location.search!==this.currentPage&&this.preFlight(location.pathname+location.search)}hijaxLinks(e){const t=e?e.getElementsByTagName("a"):this.element.getElementsByTagName("a");for(let e=0;e<t.length;e++){const s=t[e],i=s.getAttribute("href");!i||s.getAttribute("data-hijaxed")||s.getAttribute("target")||s.hasAttribute("data-no-hijax")||this.excludeRegex.exec(i)||(s.setAttribute("data-hijaxed",!0),s.addEventListener("click",(e=>{e.preventDefault(),this.setPage(i)}),!1))}}setPage(e,t){e===this.currentPage||t?this.preFlight(e):(history.pushState(null,null,e),this.watchPopState())}preFlight(e){if(!this.options.preFlight)return this.loadPage(e);this.options.preFlight(e,((t,s,i)=>{t&&(this.options.onError?this.options.onError("danger",t):alert("Error loading page: "+t)),s?this.currentPage=location.pathname+location.search:this.loadPage(i||e)}))}loadPage(e){this.queueFrame((()=>{dt.addClass(document.body,"hijax-loading")})),this.options.onExitPage&&this.options.onExitPage();const t=new XMLHttpRequest;t.open("GET",e),t.setRequestHeader("Sargasso-Hijax",1),t.setRequestHeader("x-digitopia-hijax",1),this.options.onLoading&&(this.options.onLoading(),t.onreadystatechange=this.options.onLoading),t.onload=()=>{if(301===t.status||302===t.status||t.getResponseHeader("Sargasso-Location")){const e=t.getResponseHeader("Location")?t.getResponseHeader("Location"):t.getResponseHeader("Sargasso-Location");this.setPage(e)}else if(200===t.status){ni.scrollTop(0),this.mergePage(t.responseText);const e=this.currentPage,frame=()=>{this.notifyAll("newPage",[e,location.pathname+location.search]),dt.removeClass(document.body,"hijax-loading")};this.queueFrame(frame),this.currentPage=location.pathname+location.search}else{const e=t.getResponseHeader("Sargasso-Flash-Level")||"danger";let s=t.getResponseHeader("Sargasso-Flash-Message")||t.statusText;s||(s="Could not connect to server."),this.options.onError?this.options.onError(e,s):alert("Error loading page: "+s)}},t.send()}processScripts(e){Array.from(e).forEach((e=>{e.remove();const t=e.getAttribute("id");document.getElementById(t)||document.getElementsByTagName("head")[0].appendChild(e)}))}mergePage(e){const t=document.querySelectorAll("[data-ephemeral]");Array.from(t).forEach((e=>{e.remove()}));const s=e.split(/(<body[^>]*>|<\/body>)/gi),i=makeFragment(s[2]),n=document.querySelectorAll("[data-hijax]");for(let e=0;e<n.length;e++){const t=n[e],s=t.getAttribute("id"),o=i.getElementById(s);if(t.hasAttribute("data-hijax-skip-unchanged")){if(this.cachedMarkup[s]===o.innerHTML)continue;this.cachedMarkup[s]=o.innerHTML}const a=t.getAttribute("data-hijax-cache-key-selector");if(a&&o.querySelector(a)&&t.querySelector(a)&&t.querySelector(a).getAttribute("data-hijax-cache-key")===o.querySelector(a).getAttribute("data-hijax-cache-key"))continue;this.processScripts(o.querySelectorAll("script"));const frame=()=>{t.parentNode.replaceChild(o,t),this.options.onEnterPage&&this.options.onEnterPage(),this.hijaxLinks(o)};this.queueFrame(frame)}}}registerSargassoClass("HijaxLoader",HijaxLoader);const makeFragment=e=>{if(document.createRange&&document.createRange().createContextualFragment)return document.createRange().createContextualFragment(e);const t=document.createDocumentFragment(),s=document.createElement("div");return s.insertAdjacentHTML("afterBegin",e),t.appendChild(s),t};e.loadPageHandler=void 0;var vi;const mi=window,yi=mi.trustedTypes,_i=yi?yi.createPolicy("lit-html",{createHTML:e=>e}):void 0,wi=`lit$${(Math.random()+"").slice(9)}$`,Oi="?"+wi,Ai=`<${Oi}>`,$i=document,r=(e="")=>$i.createComment(e),d=e=>null===e||"object"!=typeof e&&"function"!=typeof e,xi=Array.isArray,c=e=>xi(e)||"function"==typeof(null==e?void 0:e[Symbol.iterator]),Si=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Ei=/-->/g,ji=/>/g,Ci=RegExp(">|[ \t\n\f\r](?:([^\\s\"'>=/]+)([ \t\n\f\r]*=[ \t\n\f\r]*(?:[^ \t\n\f\r\"'`<>=]|(\"|')|))|$)","g"),ki=/'/g,Mi=/"/g,Di=/^(?:script|style|textarea|title)$/i,g=e=>(t,...s)=>({_$litType$:e,strings:t,values:s}),Pi=g(1),Ti=(g(2),Symbol.for("lit-noChange")),Hi=Symbol.for("lit-nothing"),Ri=new WeakMap,Li=$i.createTreeWalker($i,129,null,!1),E=(e,t)=>{const s=e.length-1,i=[];let n,o=2===t?"<svg>":"",a=Si;for(let t=0;t<s;t++){const s=e[t];let l,h,u=-1,p=0;for(;p<s.length&&(a.lastIndex=p,h=a.exec(s),null!==h);)p=a.lastIndex,a===Si?"!--"===h[1]?a=Ei:void 0!==h[1]?a=ji:void 0!==h[2]?(Di.test(h[2])&&(n=RegExp("</"+h[2],"g")),a=Ci):void 0!==h[3]&&(a=Ci):a===Ci?">"===h[0]?(a=null!=n?n:Si,u=-1):void 0===h[1]?u=-2:(u=a.lastIndex-h[2].length,l=h[1],a=void 0===h[3]?Ci:'"'===h[3]?Mi:ki):a===Mi||a===ki?a=Ci:a===Ei||a===ji?a=Si:(a=Ci,n=void 0);const f=a===Ci&&e[t+1].startsWith("/>")?" ":"";o+=a===Si?s+Ai:u>=0?(i.push(l),s.slice(0,u)+"$lit$"+s.slice(u)+wi+f):s+wi+(-2===u?(i.push(void 0),t):f)}const l=o+(e[s]||"<?>")+(2===t?"</svg>":"");if(!Array.isArray(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==_i?_i.createHTML(l):l,i]};class C{constructor({strings:e,_$litType$:t},s){let i;this.parts=[];let n=0,o=0;const a=e.length-1,l=this.parts,[h,u]=E(e,t);if(this.el=C.createElement(h,s),Li.currentNode=this.el.content,2===t){const e=this.el.content,t=e.firstChild;t.remove(),e.append(...t.childNodes)}for(;null!==(i=Li.nextNode())&&l.length<a;){if(1===i.nodeType){if(i.hasAttributes()){const e=[];for(const t of i.getAttributeNames())if(t.endsWith("$lit$")||t.startsWith(wi)){const s=u[o++];if(e.push(t),void 0!==s){const e=i.getAttribute(s.toLowerCase()+"$lit$").split(wi),t=/([.?@])?(.*)/.exec(s);l.push({type:1,index:n,name:t[2],strings:e,ctor:"."===t[1]?M:"?"===t[1]?k:"@"===t[1]?H:S})}else l.push({type:6,index:n})}for(const t of e)i.removeAttribute(t)}if(Di.test(i.tagName)){const e=i.textContent.split(wi),t=e.length-1;if(t>0){i.textContent=yi?yi.emptyScript:"";for(let s=0;s<t;s++)i.append(e[s],r()),Li.nextNode(),l.push({type:2,index:++n});i.append(e[t],r())}}}else if(8===i.nodeType)if(i.data===Oi)l.push({type:2,index:n});else{let e=-1;for(;-1!==(e=i.data.indexOf(wi,e+1));)l.push({type:7,index:n}),e+=wi.length-1}n++}}static createElement(e,t){const s=$i.createElement("template");return s.innerHTML=e,s}}function P(e,t,s=e,i){var n,o,a,l;if(t===Ti)return t;let h=void 0!==i?null===(n=s._$Co)||void 0===n?void 0:n[i]:s._$Cl;const u=d(t)?void 0:t._$litDirective$;return(null==h?void 0:h.constructor)!==u&&(null===(o=null==h?void 0:h._$AO)||void 0===o||o.call(h,!1),void 0===u?h=void 0:(h=new u(e),h._$AT(e,s,i)),void 0!==i?(null!==(a=(l=s)._$Co)&&void 0!==a?a:l._$Co=[])[i]=h:s._$Cl=h),void 0!==h&&(t=P(e,h._$AS(e,t.values),h,i)),t}class V{constructor(e,t){this.u=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}v(e){var t;const{el:{content:s},parts:i}=this._$AD,n=(null!==(t=null==e?void 0:e.creationScope)&&void 0!==t?t:$i).importNode(s,!0);Li.currentNode=n;let o=Li.nextNode(),a=0,l=0,h=i[0];for(;void 0!==h;){if(a===h.index){let t;2===h.type?t=new N(o,o.nextSibling,this,e):1===h.type?t=new h.ctor(o,h.name,h.strings,this,e):6===h.type&&(t=new I(o,this,e)),this.u.push(t),h=i[++l]}a!==(null==h?void 0:h.index)&&(o=Li.nextNode(),a++)}return n}p(e){let t=0;for(const s of this.u)void 0!==s&&(void 0!==s.strings?(s._$AI(e,s,t),t+=s.strings.length-2):s._$AI(e[t])),t++}}class N{constructor(e,t,s,i){var n;this.type=2,this._$AH=Hi,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=s,this.options=i,this._$Cm=null===(n=null==i?void 0:i.isConnected)||void 0===n||n}get _$AU(){var e,t;return null!==(t=null===(e=this._$AM)||void 0===e?void 0:e._$AU)&&void 0!==t?t:this._$Cm}get parentNode(){let e=this._$AA.parentNode;const t=this._$AM;return void 0!==t&&11===e.nodeType&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=P(this,e,t),d(e)?e===Hi||null==e||""===e?(this._$AH!==Hi&&this._$AR(),this._$AH=Hi):e!==this._$AH&&e!==Ti&&this.g(e):void 0!==e._$litType$?this.$(e):void 0!==e.nodeType?this.T(e):c(e)?this.k(e):this.g(e)}O(e,t=this._$AB){return this._$AA.parentNode.insertBefore(e,t)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}g(e){this._$AH!==Hi&&d(this._$AH)?this._$AA.nextSibling.data=e:this.T($i.createTextNode(e)),this._$AH=e}$(e){var t;const{values:s,_$litType$:i}=e,n="number"==typeof i?this._$AC(e):(void 0===i.el&&(i.el=C.createElement(i.h,this.options)),i);if((null===(t=this._$AH)||void 0===t?void 0:t._$AD)===n)this._$AH.p(s);else{const e=new V(n,this),t=e.v(this.options);e.p(s),this.T(t),this._$AH=e}}_$AC(e){let t=Ri.get(e.strings);return void 0===t&&Ri.set(e.strings,t=new C(e)),t}k(e){xi(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let s,i=0;for(const n of e)i===t.length?t.push(s=new N(this.O(r()),this.O(r()),this,this.options)):s=t[i],s._$AI(n),i++;i<t.length&&(this._$AR(s&&s._$AB.nextSibling,i),t.length=i)}_$AR(e=this._$AA.nextSibling,t){var s;for(null===(s=this._$AP)||void 0===s||s.call(this,!1,!0,t);e&&e!==this._$AB;){const t=e.nextSibling;e.remove(),e=t}}setConnected(e){var t;void 0===this._$AM&&(this._$Cm=e,null===(t=this._$AP)||void 0===t||t.call(this,e))}}class S{constructor(e,t,s,i,n){this.type=1,this._$AH=Hi,this._$AN=void 0,this.element=e,this.name=t,this._$AM=i,this.options=n,s.length>2||""!==s[0]||""!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=Hi}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(e,t=this,s,i){const n=this.strings;let o=!1;if(void 0===n)e=P(this,e,t,0),o=!d(e)||e!==this._$AH&&e!==Ti,o&&(this._$AH=e);else{const i=e;let a,l;for(e=n[0],a=0;a<n.length-1;a++)l=P(this,i[s+a],t,a),l===Ti&&(l=this._$AH[a]),o||(o=!d(l)||l!==this._$AH[a]),l===Hi?e=Hi:e!==Hi&&(e+=(null!=l?l:"")+n[a+1]),this._$AH[a]=l}o&&!i&&this.j(e)}j(e){e===Hi?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=e?e:"")}}class M extends S{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===Hi?void 0:e}}const Fi=yi?yi.emptyScript:"";class k extends S{constructor(){super(...arguments),this.type=4}j(e){e&&e!==Hi?this.element.setAttribute(this.name,Fi):this.element.removeAttribute(this.name)}}class H extends S{constructor(e,t,s,i,n){super(e,t,s,i,n),this.type=5}_$AI(e,t=this){var s;if((e=null!==(s=P(this,e,t,0))&&void 0!==s?s:Hi)===Ti)return;const i=this._$AH,n=e===Hi&&i!==Hi||e.capture!==i.capture||e.once!==i.once||e.passive!==i.passive,o=e!==Hi&&(i===Hi||n);n&&this.element.removeEventListener(this.name,this,i),o&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){var t,s;"function"==typeof this._$AH?this._$AH.call(null!==(s=null===(t=this.options)||void 0===t?void 0:t.host)&&void 0!==s?s:this.element,e):this._$AH.handleEvent(e)}}class I{constructor(e,t,s){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(e){P(this,e)}}const zi=mi.litHtmlPolyfillSupport;null==zi||zi(C,N),(null!==(vi=mi.litHtmlVersions)&&void 0!==vi?vi:mi.litHtmlVersions=[]).push("2.5.0");const Z=(e,t,s)=>{var i,n;const o=null!==(i=null==s?void 0:s.renderBefore)&&void 0!==i?i:t;let a=o._$litPart$;if(void 0===a){const e=null!==(n=null==s?void 0:s.renderBefore)&&void 0!==n?n:null;o._$litPart$=a=new N(t.insertBefore(r(),e),e,void 0,null!=s?s:{})}return a._$AI(e),a};class SargassoComponent extends Sargasso{constructor(e,t={}){t.shadowDOM=void 0===t.shadowDOM||t.shadowDOM,t.componentOptions=window.sagassoComponentOptions||{},super(e,t),this.templateAttributes=[],this.renderAttributes=[],this.templateOptions={},this.obervableId=(this._hostElement||this.element).getAttribute("data-observable-id"),this.toDestroy=[]}start(){super.start(),this.obervableId&&(this.observableData=this.observableStart(this.obervableId)),this.renderOptions=this.observableStart("SargassoComponent-"+this.uid,{}),this.getAttributes(),this.watchAttributes(),this.setTemplateArgs({options:this.options.componentOptions||{},attributes:this.renderOptions.data,data:this.observableData?this.observableData.data:void 0}),this.setTemplate(this.buildTemplate()),this._template&&this.setRenderer(Z)}watchAttributes(){this.allAttributes=this.templateAttributes.concat(this.renderAttributes),this.attributeObserver=new MutationObserver((e=>{let t=!1,s=!1;e.forEach((e=>{"attributes"===e.type&&-1!==this.allAttributes.indexOf(e.attributeName)&&(t=!0,-1!==this.templateAttributes.indexOf(e.attributeName)&&(s=!0))})),t&&(this.getAttributes(),s&&(this.setTemplate(this.buildTemplate()),this.render()))})),this.attributeObserver.observe(this._hostElement||this.element,{attributes:!0})}getAttributes(){for(const e of this.templateAttributes){const t=(this._hostElement||this.element).getAttribute(e)||(this._hostElement||this.element).hasAttribute(e)||void 0;this.templateOptions[e]!==t&&(this.templateOptions[e]=t)}for(const e of this.renderAttributes){const t=(this._hostElement||this.element).getAttribute(e)||(this._hostElement||this.element).hasAttribute(e)||void 0;this.renderOptions.data[e]!==t&&(this.renderOptions.data[e]=t)}}buildTemplate(){return e=>Pi`
var SargassoModule=function(e){"use strict";var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};var s="object"==typeof t&&t&&t.Object===Object&&t,i=s,n="object"==typeof self&&self&&self.Object===Object&&self,o=i||n||Function("return this")(),a=o.Symbol;var l=function arrayMap$1(e,t){for(var s=-1,i=null==e?0:e.length,n=Array(i);++s<i;)n[s]=t(e[s],s,e);return n},h=Array.isArray,u=a,p=Object.prototype,f=p.hasOwnProperty,b=p.toString,v=u?u.toStringTag:void 0;var m=function getRawTag$1(e){var t=f.call(e,v),s=e[v];try{e[v]=void 0;var i=!0}catch(e){}var n=b.call(e);return i&&(t?e[v]=s:delete e[v]),n},y=Object.prototype.toString;var _=m,w=function objectToString$1(e){return y.call(e)},O=a?a.toStringTag:void 0;var A=function baseGetTag$5(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":O&&O in Object(e)?_(e):w(e)};var $=function isObjectLike$5(e){return null!=e&&"object"==typeof e},x=A,j=$;var D=function isSymbol$2(e){return"symbol"==typeof e||j(e)&&"[object Symbol]"==x(e)},T=l,R=h,L=D,F=a?a.prototype:void 0,z=F?F.toString:void 0;var W=function baseToString$1(e){if("string"==typeof e)return e;if(R(e))return T(e,baseToString$1)+"";if(L(e))return z?z.call(e):"";var t=e+"";return"0"==t&&1/e==-Infinity?"-0":t},U=W;var B=function toString$4(e){return null==e?"":U(e)};var q=function baseSlice$1(e,t,s){var i=-1,n=e.length;t<0&&(t=-t>n?0:n+t),(s=s>n?n:s)<0&&(s+=n),n=t>s?0:s-t>>>0,t>>>=0;for(var o=Array(n);++i<n;)o[i]=e[i+t];return o};var Q=function castSlice$1(e,t,s){var i=e.length;return s=void 0===s?i:s,!t&&s>=i?e:q(e,t,s)},G=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");var J=function hasUnicode$2(e){return G.test(e)};var Y=function asciiToArray$1(e){return e.split("")},K="\\ud800-\\udfff",X="["+K+"]",ee="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",te="\\ud83c[\\udffb-\\udfff]",se="[^"+K+"]",re="(?:\\ud83c[\\udde6-\\uddff]){2}",ie="[\\ud800-\\udbff][\\udc00-\\udfff]",ne="(?:"+ee+"|"+te+")"+"?",oe="[\\ufe0e\\ufe0f]?",ae=oe+ne+("(?:\\u200d(?:"+[se,re,ie].join("|")+")"+oe+ne+")*"),le="(?:"+[se+ee+"?",ee,re,ie,X].join("|")+")",he=RegExp(te+"(?="+te+")|"+le+ae,"g");var ce=Y,ue=J,de=function unicodeToArray$1(e){return e.match(he)||[]};var pe=Q,fe=J,be=function stringToArray$1(e){return ue(e)?de(e):ce(e)},ge=B;var ve=function createCaseFirst$1(e){return function(t){t=ge(t);var s=fe(t)?be(t):void 0,i=s?s[0]:t.charAt(0),n=s?pe(s,1).join(""):t.slice(1);return i[e]()+n}}("toUpperCase"),me=B,ye=ve;var _e=function capitalize$1(e){return ye(me(e).toLowerCase())};var we=function arrayReduce$1(e,t,s,i){var n=-1,o=null==e?0:e.length;for(i&&o&&(s=e[++n]);++n<o;)s=t(s,e[n],n,e);return s};var Oe=function basePropertyOf$1(e){return function(t){return null==e?void 0:e[t]}}({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),Ae=B,$e=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,xe=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");var Se=function deburr$1(e){return(e=Ae(e))&&e.replace($e,Oe).replace(xe,"")},Ee=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;var je=function asciiWords$1(e){return e.match(Ee)||[]},Ce=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;var ke=function hasUnicodeWord$1(e){return Ce.test(e)},Me="\\ud800-\\udfff",De="\\u2700-\\u27bf",Pe="a-z\\xdf-\\xf6\\xf8-\\xff",Te="A-Z\\xc0-\\xd6\\xd8-\\xde",He="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Re="["+He+"]",Le="\\d+",Fe="["+De+"]",ze="["+Pe+"]",Ne="[^"+Me+He+Le+De+Pe+Te+"]",Ie="(?:\\ud83c[\\udde6-\\uddff]){2}",We="[\\ud800-\\udbff][\\udc00-\\udfff]",Ve="["+Te+"]",Ue="(?:"+ze+"|"+Ne+")",Be="(?:"+Ve+"|"+Ne+")",qe="(?:['’](?:d|ll|m|re|s|t|ve))?",Qe="(?:['’](?:D|LL|M|RE|S|T|VE))?",Ge="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",Ze="[\\ufe0e\\ufe0f]?",Je=Ze+Ge+("(?:\\u200d(?:"+["[^"+Me+"]",Ie,We].join("|")+")"+Ze+Ge+")*"),Ye="(?:"+[Fe,Ie,We].join("|")+")"+Je,Ke=RegExp([Ve+"?"+ze+"+"+qe+"(?="+[Re,Ve,"$"].join("|")+")",Be+"+"+Qe+"(?="+[Re,Ve+Ue,"$"].join("|")+")",Ve+"?"+Ue+"+"+qe,Ve+"+"+Qe,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Le,Ye].join("|"),"g");var Xe=je,et=ke,tt=B,st=function unicodeWords$1(e){return e.match(Ke)||[]};var rt=we,it=Se,nt=function words$1(e,t,s){return e=tt(e),void 0===(t=s?void 0:t)?et(e)?st(e):Xe(e):e.match(t)||[]},ot=RegExp("['’]","g");var at=function createCompounder$2(e){return function(t){return rt(nt(it(t).replace(ot,"")),e,"")}},lt=_e,ht=at((function(e,t,s){return t=t.toLowerCase(),e+(s?lt(t):t)}));const ct={},setValidator=(e,t)=>{ct[e]=t};setValidator("isDefined",(e=>void 0!==e)),setValidator("isUnDefined",(e=>void 0===e)),setValidator("isNull",(e=>null===e)),setValidator("isElement",(e=>e&&(e instanceof Element||e instanceof Window))),setValidator("isEventTarget",(e=>e&&e instanceof EventTarget)),setValidator("isString",(e=>e&&("string"==typeof e||e instanceof String))),setValidator("isArray",(e=>e&&e instanceof Array)),setValidator("notEmpty",(e=>e instanceof Array?0!==e.length:""!==e)),setValidator("isEmpty",(e=>void 0===e||!e||(e instanceof Array?0===e.length:""===e))),setValidator("isObject",(e=>e&&e instanceof Object)),setValidator("isFunction",(e=>e&&"function"==typeof e));const validate=(e,t,s)=>{const i=s.map((e=>{if(e instanceof Array){return-1!==e.map((e=>ct[e]&&ct[e](t))).indexOf(!0)}return ct[e]&&ct[e](t)}));if(-1!==i.indexOf(!1))throw new Error("call to "+e+" invalid value: "+t+" "+s,0+i)},ut=new WeakMap,hasClass=(e,t)=>(validate("hasClass element",e,["isDefined","isElement"]),validate("hasClass cssClass",t,["isDefined","notEmpty","isString"]),e.classList.contains(t)),isVisible=e=>(validate("isVisible element",e,["isDefined","isElement"]),!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)),setMetaData=(e,t,s)=>{validate("setMetaData element",e,["isDefined","isElement"]),validate("setMetaData k",t,["isDefined","isString"]),validate("setMetaData v",s,[["isUnDefined","isNull","isString","isObject"]]);const i=ut.get(e)||{};s?i[t]=s:delete i[t],ut.set(e,i)},getMetaData=(e,t)=>{validate("getMetaData element",e,["isDefined","isElement"]),validate("getMetaData k",t,["isDefined","isString"]);const s=ut.get(e)||{};return t?s[t]:s},on=function(e,t,s,i,n,o,a){"function"==typeof i&&(a=o,o=n,n=i,i=void 0),validate("on uid",e,["isDefined","notEmpty"]),validate("on container",t,["isDefined","isEventTarget"]),validate("on events",s,["isDefined","isString"]),validate("on fn",n,["isDefined","isFunction"]),validate("on selector",i,[["isEmpty","isString"]]);const l="on:"+e+"-"+s+"-"+i;if(getMetaData(t,l))return void console.error("Error: Sargasso utils.on: duplicate event handler specification. %o %s",t,l);const h={uid:e,events:s,selector:i||void 0,fn:o=>{a&&off(e,t,s,i),i?Array.from(t.querySelectorAll(i)).forEach((e=>{(o.target===e||e.contains(o.target))&&n(o,e)})):n(o)},options:o||!1};setMetaData(t,l,h),s.split(/[\s,]+/).forEach((e=>{t.addEventListener(e.trim(),h.fn,h.options)}))},off=function(e,t,s,i){validate("off uid",e,["isDefined","notEmpty"]),validate("off container",t,["isDefined","isEventTarget"]),validate("off events",s,["isDefined","isString"]),validate("off selector",i,[["isEmpty","isString"]]);const n="on:"+e+"-"+s+"-"+i,o=getMetaData(t,n);o&&(s.split(/[\s,]+/).forEach((e=>{t.removeEventListener(e.trim(),o.fn,o.options)})),setMetaData(t,n))},dt={hasClass:hasClass,addClass:(e,t)=>{validate("addClass element",e,["isDefined","isElement"]),validate("addClass addClasses",t,["isDefined","notEmpty",["isString","isArray"]]),Array.isArray(t)||(t=t.split(/[\s,]/)),t.forEach((t=>{t=t.trim(),hasClass(e,t)||e.classList.add(t)}))},removeClass:(e,t)=>{validate("removeClass element",e,["isDefined","isElement"]),validate("removeClass removeClasses",t,["isDefined","notEmpty",["isString","isArray"]]),Array.isArray(t)||(t=t.split(/[\s,]/)),t.forEach((t=>{t=t.trim(),hasClass(e,t)&&e.classList.remove(t)}))},isVisible:isVisible,inViewPort:(e,t=window)=>{validate("inViewPort element",e,["isDefined","isElement"]);const s=e.getBoundingClientRect(),i=isVisible(e),n=s.bottom<0;let o;return o=t.self===window?s.top>(window.innerHeight||document.documentElement.clientHeight):s.top>t.clientHeight,i&&!o&&!n},setCSS:(e,t)=>{validate("css element",e,["isDefined","isElement"]),validate("css css",t,["isDefined",["isObject"]]);for(const s in t)if(Object.prototype.hasOwnProperty.call(t,s)){const i=ht(s);e.style[i]=null!==t[s]?t[s]:null}},setMetaData:setMetaData,getMetaData:getMetaData,on:on,off:off,once:function(e,t,s,i,n,o){"function"==typeof i&&(o=n,n=i,i=void 0),on(e,t,s,i,n,o,!0)},offAll:function(e){validate("offAll container",e,["isDefined","isEventTarget"]);const t=ut.get(e)||{},s=[];for(const e in t)Object.prototype.hasOwnProperty.call(t,e)&&e.match(/^on:/)&&s.push(e);s.forEach((s=>{off(t[s].uid,e,t[s].events,t[s].selector)}))}};var pt=function isObject$4(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)},ft=o,bt=/\s/;var gt=function trimmedEndIndex$1(e){for(var t=e.length;t--&&bt.test(e.charAt(t)););return t},vt=/^\s+/;var mt=function baseTrim$1(e){return e?e.slice(0,gt(e)+1).replace(vt,""):e},yt=pt,_t=D,wt=/^[-+]0x[0-9a-f]+$/i,Ot=/^0b[01]+$/i,At=/^0o[0-7]+$/i,$t=parseInt;var xt=pt,now=function(){return ft.Date.now()},St=function toNumber$1(e){if("number"==typeof e)return e;if(_t(e))return NaN;if(yt(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=yt(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=mt(e);var s=Ot.test(e);return s||At.test(e)?$t(e.slice(2),s?2:8):wt.test(e)?NaN:+e},Et=Math.max,jt=Math.min;var Ct=function debounce(e,t,s){var i,n,o,a,l,h,u=0,p=!1,f=!1,b=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function invokeFunc(t){var s=i,o=n;return i=n=void 0,u=t,a=e.apply(o,s)}function leadingEdge(e){return u=e,l=setTimeout(timerExpired,t),p?invokeFunc(e):a}function shouldInvoke(e){var s=e-h;return void 0===h||s>=t||s<0||f&&e-u>=o}function timerExpired(){var e=now();if(shouldInvoke(e))return trailingEdge(e);l=setTimeout(timerExpired,function remainingWait(e){var s=t-(e-h);return f?jt(s,o-(e-u)):s}(e))}function trailingEdge(e){return l=void 0,b&&i?invokeFunc(e):(i=n=void 0,a)}function debounced(){var e=now(),s=shouldInvoke(e);if(i=arguments,n=this,h=e,s){if(void 0===l)return leadingEdge(h);if(f)return clearTimeout(l),l=setTimeout(timerExpired,t),invokeFunc(h)}return void 0===l&&(l=setTimeout(timerExpired,t)),a}return t=St(t)||0,xt(s)&&(p=!!s.leading,o=(f="maxWait"in s)?Et(St(s.maxWait)||0,t):o,b="trailing"in s?!!s.trailing:b),debounced.cancel=function cancel(){void 0!==l&&clearTimeout(l),u=0,i=h=n=l=void 0},debounced.flush=function flush(){return void 0===l?a:trailingEdge(now())},debounced};var kt=function listCacheClear$1(){this.__data__=[],this.size=0};var Mt=function eq$2(e,t){return e===t||e!=e&&t!=t},Dt=Mt;var Pt=function assocIndexOf$4(e,t){for(var s=e.length;s--;)if(Dt(e[s][0],t))return s;return-1},Tt=Pt,Ht=Array.prototype.splice;var Rt=Pt;var Lt=Pt;var Ft=Pt;var zt=kt,Nt=function listCacheDelete$1(e){var t=this.__data__,s=Tt(t,e);return!(s<0)&&(s==t.length-1?t.pop():Ht.call(t,s,1),--this.size,!0)},It=function listCacheGet$1(e){var t=this.__data__,s=Rt(t,e);return s<0?void 0:t[s][1]},Wt=function listCacheHas$1(e){return Lt(this.__data__,e)>-1},Vt=function listCacheSet$1(e,t){var s=this.__data__,i=Ft(s,e);return i<0?(++this.size,s.push([e,t])):s[i][1]=t,this};function ListCache$4(e){var t=-1,s=null==e?0:e.length;for(this.clear();++t<s;){var i=e[t];this.set(i[0],i[1])}}ListCache$4.prototype.clear=zt,ListCache$4.prototype.delete=Nt,ListCache$4.prototype.get=It,ListCache$4.prototype.has=Wt,ListCache$4.prototype.set=Vt;var Ut=ListCache$4,Bt=Ut;var qt=function stackClear$1(){this.__data__=new Bt,this.size=0};var Qt=function stackDelete$1(e){var t=this.__data__,s=t.delete(e);return this.size=t.size,s};var Gt=function stackGet$1(e){return this.__data__.get(e)};var Zt=function stackHas$1(e){return this.__data__.has(e)},Jt=A,Yt=pt;var Kt,Xt=function isFunction$2(e){if(!Yt(e))return!1;var t=Jt(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},es=o["__core-js_shared__"],ts=(Kt=/[^.]+$/.exec(es&&es.keys&&es.keys.IE_PROTO||""))?"Symbol(src)_1."+Kt:"";var ss=function isMasked$1(e){return!!ts&&ts in e},rs=Function.prototype.toString;var is=function toSource$2(e){if(null!=e){try{return rs.call(e)}catch(e){}try{return e+""}catch(e){}}return""},ns=Xt,os=ss,as=pt,ls=is,hs=/^\[object .+?Constructor\]$/,cs=Function.prototype,us=Object.prototype,ds=cs.toString,ps=us.hasOwnProperty,fs=RegExp("^"+ds.call(ps).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var bs=function baseIsNative$1(e){return!(!as(e)||os(e))&&(ns(e)?fs:hs).test(ls(e))},gs=function getValue$1(e,t){return null==e?void 0:e[t]};var vs=function getNative$6(e,t){var s=gs(e,t);return bs(s)?s:void 0},ms=vs(o,"Map"),ys=vs(Object,"create"),_s=ys;var ws=function hashClear$1(){this.__data__=_s?_s(null):{},this.size=0};var Os=function hashDelete$1(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},As=ys,$s=Object.prototype.hasOwnProperty;var xs=function hashGet$1(e){var t=this.__data__;if(As){var s=t[e];return"__lodash_hash_undefined__"===s?void 0:s}return $s.call(t,e)?t[e]:void 0},Ss=ys,Es=Object.prototype.hasOwnProperty;var js=ys;var Cs=ws,ks=Os,Ms=xs,Ds=function hashHas$1(e){var t=this.__data__;return Ss?void 0!==t[e]:Es.call(t,e)},Ps=function hashSet$1(e,t){var s=this.__data__;return this.size+=this.has(e)?0:1,s[e]=js&&void 0===t?"__lodash_hash_undefined__":t,this};function Hash$1(e){var t=-1,s=null==e?0:e.length;for(this.clear();++t<s;){var i=e[t];this.set(i[0],i[1])}}Hash$1.prototype.clear=Cs,Hash$1.prototype.delete=ks,Hash$1.prototype.get=Ms,Hash$1.prototype.has=Ds,Hash$1.prototype.set=Ps;var Ts=Hash$1,Hs=Ut,Rs=ms;var Ls=function isKeyable$1(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e};var Fs=function getMapData$4(e,t){var s=e.__data__;return Ls(t)?s["string"==typeof t?"string":"hash"]:s.map},zs=Fs;var Ns=Fs;var Is=Fs;var Ws=Fs;var Vs=function mapCacheClear$1(){this.size=0,this.__data__={hash:new Ts,map:new(Rs||Hs),string:new Ts}},Us=function mapCacheDelete$1(e){var t=zs(this,e).delete(e);return this.size-=t?1:0,t},Bs=function mapCacheGet$1(e){return Ns(this,e).get(e)},qs=function mapCacheHas$1(e){return Is(this,e).has(e)},Qs=function mapCacheSet$1(e,t){var s=Ws(this,e),i=s.size;return s.set(e,t),this.size+=s.size==i?0:1,this};function MapCache$2(e){var t=-1,s=null==e?0:e.length;for(this.clear();++t<s;){var i=e[t];this.set(i[0],i[1])}}MapCache$2.prototype.clear=Vs,MapCache$2.prototype.delete=Us,MapCache$2.prototype.get=Bs,MapCache$2.prototype.has=qs,MapCache$2.prototype.set=Qs;var Gs=MapCache$2,Zs=Ut,Js=ms,Ys=Gs;var Ks=Ut,Xs=qt,er=Qt,tr=Gt,sr=Zt,rr=function stackSet$1(e,t){var s=this.__data__;if(s instanceof Zs){var i=s.__data__;if(!Js||i.length<199)return i.push([e,t]),this.size=++s.size,this;s=this.__data__=new Ys(i)}return s.set(e,t),this.size=s.size,this};function Stack$1(e){var t=this.__data__=new Ks(e);this.size=t.size}Stack$1.prototype.clear=Xs,Stack$1.prototype.delete=er,Stack$1.prototype.get=tr,Stack$1.prototype.has=sr,Stack$1.prototype.set=rr;var ir=Gs,nr=function setCacheAdd$1(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},or=function setCacheHas$1(e){return this.__data__.has(e)};function SetCache$1(e){var t=-1,s=null==e?0:e.length;for(this.__data__=new ir;++t<s;)this.add(e[t])}SetCache$1.prototype.add=SetCache$1.prototype.push=nr,SetCache$1.prototype.has=or;o.Uint8Array;var ar=a?a.prototype:void 0;ar&&ar.valueOf;Object.prototype.propertyIsEnumerable,Object.getOwnPropertySymbols;var lr=A,hr=$;var cr=function baseIsArguments$1(e){return hr(e)&&"[object Arguments]"==lr(e)},ur=$,dr=Object.prototype,pr=dr.hasOwnProperty,fr=dr.propertyIsEnumerable,br=(cr(function(){return arguments}()),{}),gr={get exports(){return br},set exports(e){br=e}};var vr=function stubFalse(){return!1};!function(e,t){var s=o,i=vr,n=t&&!t.nodeType&&t,a=n&&e&&!e.nodeType&&e,l=a&&a.exports===n?s.Buffer:void 0,h=(l?l.isBuffer:void 0)||i;e.exports=h}(gr,br);var mr=function isLength$2(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991},yr=A,_r=mr,wr=$,Or={};Or["[object Float32Array]"]=Or["[object Float64Array]"]=Or["[object Int8Array]"]=Or["[object Int16Array]"]=Or["[object Int32Array]"]=Or["[object Uint8Array]"]=Or["[object Uint8ClampedArray]"]=Or["[object Uint16Array]"]=Or["[object Uint32Array]"]=!0,Or["[object Arguments]"]=Or["[object Array]"]=Or["[object ArrayBuffer]"]=Or["[object Boolean]"]=Or["[object DataView]"]=Or["[object Date]"]=Or["[object Error]"]=Or["[object Function]"]=Or["[object Map]"]=Or["[object Number]"]=Or["[object Object]"]=Or["[object RegExp]"]=Or["[object Set]"]=Or["[object String]"]=Or["[object WeakMap]"]=!1;var Ar=function baseIsTypedArray$1(e){return wr(e)&&_r(e.length)&&!!Or[yr(e)]};var $r=function baseUnary$1(e){return function(t){return e(t)}},xr={},Sr={get exports(){return xr},set exports(e){xr=e}};!function(e,t){var i=s,n=t&&!t.nodeType&&t,o=n&&e&&!e.nodeType&&e,a=o&&o.exports===n&&i.process,l=function(){try{var e=o&&o.require&&o.require("util").types;return e||a&&a.binding&&a.binding("util")}catch(e){}}();e.exports=l}(Sr,xr);var Er=Ar,jr=$r,Cr=xr&&xr.isTypedArray;Cr&&jr(Cr),Object.prototype.hasOwnProperty;Object.prototype;(function overArg$1(e,t){return function(s){return e(t(s))}})(Object.keys,Object),Object.prototype.hasOwnProperty;Object.prototype.hasOwnProperty;var kr=vs(o,"DataView"),Mr=ms,Dr=vs(o,"Promise"),Pr=vs(o,"Set"),Tr=vs(o,"WeakMap"),Hr=A,Rr=is,Lr="[object Map]",Fr="[object Promise]",zr="[object Set]",Nr="[object WeakMap]",Ir="[object DataView]",Wr=Rr(kr),Vr=Rr(Mr),Ur=Rr(Dr),Br=Rr(Pr),qr=Rr(Tr),Qr=Hr;(kr&&Qr(new kr(new ArrayBuffer(1)))!=Ir||Mr&&Qr(new Mr)!=Lr||Dr&&Qr(Dr.resolve())!=Fr||Pr&&Qr(new Pr)!=zr||Tr&&Qr(new Tr)!=Nr)&&(Qr=function(e){var t=Hr(e),s="[object Object]"==t?e.constructor:void 0,i=s?Rr(s):"";if(i)switch(i){case Wr:return Ir;case Vr:return Lr;case Ur:return Fr;case Br:return zr;case qr:return Nr}return t});Object.prototype.hasOwnProperty;var Gr,Zr,Jr,Yr,Kr,Xr,ei={},ti={get exports(){return ei},set exports(e){ei=e}},si=(Gr=[],Zr=[],Jr=[],Yr=[],Kr=null,Xr=function(e,t,s,i){var n=s||null,o=i||[{target:e,property:""}];Gr.push(o),e instanceof Array&&(e.hasOwnProperty("__length")?e.__length=e.length:Object.defineProperty(e,"__length",{enumerable:!1,value:e.length,writable:!0}));var a=[],_getPath=function(e,t,s){for(var i="",n=null,a=0;a<o.length;a++)n instanceof Array&&!isNaN(o[a].property)&&(o[a].property=n.indexOf(o[a].target)),i=i+"."+o[a].property,n=o[a].target;return i=(i=i+"."+t).substring(2),!0===s&&(i="/"+i.replace(/\./g,"/")),i},_notifyObservers=function(e){if(!0!==n.paused){var s="number"==typeof t;if(s||!0===t)setTimeout((function(){if(e===a.length){var t=a.slice(0);a=[];for(var s=0;s<n.observers.length;s++)n.observers[s](t)}}),s&&t>0?t:10);else{var i=a.slice(0);a=[];for(var o=0;o<n.observers.length;o++)n.observers[o](i)}}},l={get:function(e,s){if("__getTarget"===s)return e;if("__isProxy"===s)return!0;if("__getParent"===s)return function(e){void 0===e&&(e=1);var t=_getPath(0,"__getParent").split(".");return t.splice(-(e+1),e+1),function(e,t){return t.split(".").reduce((function(e,t){return e?e[t]:void 0}),e||self)}(n.parentProxy,t.join("."))};if("__getPath"===s)return _getPath(0,"__getParent").slice(0,-12);var i=e[s];if(e instanceof Date&&i instanceof Function&&null!==i)return i.bind(e);if(i instanceof Object&&null!==i&&e.hasOwnProperty(s)){if(!0===i.__isProxy&&(i=i.__getTarget),i.__targetPosition>-1&&null!==Jr[i.__targetPosition])for(var a=Yr[i.__targetPosition],l=0,h=a.length;l<h;l++)if(n===a[l].observable)return a[l].proxy;var u=o.slice(0);return u.push({target:i,property:s}),Xr(i,t,n,u)}return i},deleteProperty:function(e,t){var s=!0;Kr===u&&(s=!1,Kr=null);var i=Object.assign({},e);if(a.push({type:"delete",target:e,property:t,newValue:null,previousValue:i[t],currentPath:_getPath(0,t),jsonPointer:_getPath(0,t,!0),proxy:u}),!0===s){n.changesPaused||delete e[t];for(var o=0,l=Jr.length;o<l&&e!==Jr[o];o++);for(var h=Yr[o]||[],p=h.length;p--;)h[p].proxy!==u&&(Kr=h[p].proxy,delete h[p].proxy[t])}return _notifyObservers(a.length),!0},set:function(e,t,s,i){s&&s.__isProxy&&(s=s.__getTarget);var o=!0;Kr===u&&(o=!1,Kr=null);var l=e[t];if(l!==s||!1===o||"length"===t&&e instanceof Array&&e.__length!==s){var h=!0,p=typeof l,f="update";if("undefined"===p&&(f="add"),a.push({type:f,target:e,property:t,newValue:s,previousValue:i[t],currentPath:_getPath(0,t),jsonPointer:_getPath(0,t,!0),proxy:u}),"length"===t&&e instanceof Array&&e.__length!==s&&(a[a.length-1].previousValue=e.__length,e.__length=s),!0===o){n.changesPaused||(e[t]=s),h=!1;for(var b=e.__targetPosition,v=Yr[b].length;v--;)if(n===Yr[b][v].observable&&null!==Jr[Yr[b][v].observable.parentTarget.__targetPosition]){h=!0;break}if(h){for(var m=Yr[b],y=0,_=m.length;y<_;y++)m[y].proxy!==u&&(Kr=m[y].proxy,m[y].proxy[t]=s);setTimeout((function(){if("object"===p&&null!==l){for(var t=Object.keys(e),s=0,i=t.length;s<i;s++)if(e[t[s]]===l)return;var o=!1;if(function iterate(e){for(var t=Object.keys(e),s=0,i=t.length;s<i;s++){var n=e[t[s]];if(n instanceof Object&&null!==n&&iterate(n),n===l)return void(o=!0)}}(e),!0===o)return;!function iterate(e){for(var t=Object.keys(e),s=0,i=t.length;s<i;s++){var o=e[t[s]];o instanceof Object&&null!==o&&iterate(o)}var a=-1;for(s=0,i=Jr.length;s<i;s++)if(e===Jr[s]){a=s;break}if(a>-1){for(var l=Yr[a],h=l.length;h--;)if(n===l[h].observable){l.splice(h,1);break}0==l.length&&(Jr[a]=null)}}(l)}}),1e4)}}h&&_notifyObservers(a.length)}return!0}},h=e.__targetPosition;h>-1||Object.defineProperty(e,"__targetPosition",{value:Jr.length,writable:!1,enumerable:!1,configurable:!1});var u=new Proxy(e,l);null===n&&(n={parentTarget:e,domDelay:t,parentProxy:u,observers:[],paused:!1,path:o,changesPaused:!1},Zr.push(n));var p={target:e,proxy:u,observable:n};return h>-1?(null===Jr[h]&&(Jr[h]=e),Yr[h].push(p)):(Jr.push(e),Yr.push([p])),u},{create:function(e,t,s){!0===e.__isProxy&&(e=e.__getTarget);var i=Xr(e,t);return"function"==typeof s&&this.observe(i,s),function iterate(e){for(var t=e.__getTarget,s=Object.keys(t),i=0,n=s.length;i<n;i++){var o=s[i];t[o]instanceof Object&&null!==t[o]&&iterate(e[o])}}(i),i},observe:function(e,t){for(var s=Zr.length;s--;)if(Zr[s].parentProxy===e){Zr[s].observers.push(t);break}},pause:function(e){for(var t=Zr.length,s=!1;t--;)if(Zr[t].parentProxy===e){Zr[t].paused=!0,s=!0;break}if(0==s)throw new Error("ObseravableSlim could not pause observable -- matching proxy not found.")},resume:function(e){for(var t=Zr.length,s=!1;t--;)if(Zr[t].parentProxy===e){Zr[t].paused=!1,s=!0;break}if(0==s)throw new Error("ObseravableSlim could not resume observable -- matching proxy not found.")},pauseChanges:function(e){for(var t=Zr.length,s=!1;t--;)if(Zr[t].parentProxy===e){Zr[t].changesPaused=!0,s=!0;break}if(0==s)throw new Error("ObseravableSlim could not pause changes on observable -- matching proxy not found.")},resumeChanges:function(e){for(var t=Zr.length,s=!1;t--;)if(Zr[t].parentProxy===e){Zr[t].changesPaused=!1,s=!0;break}if(0==s)throw new Error("ObseravableSlim could not resume changes on observable -- matching proxy not found.")},remove:function(e){for(var t=null,s=!1,i=Zr.length;i--;)if(Zr[i].parentProxy===e){t=Zr[i],s=!0;break}for(var n=Yr.length;n--;)for(var o=Yr[n].length;o--;)Yr[n][o].observable===t&&(Yr[n].splice(o,1),0===Yr[n].length&&(Jr[n]=null));!0===s&&Zr.splice(i,1)}});try{ti.exports=si}catch(e){}const ri={};class ObservableObject{constructor(e,t={},s={}){if(this.id=e,ri[this.id])throw new Error("ObservableObject "+e+" already exists.");this.bound={},this.data=ei.create(t,!1,(e=>{this.sync(e)})),this.options=s,ri[this.id]=this}destroy(){ei.pause(this.data),delete ri[this.id],delete this.data,Object.keys(this.bound).forEach((e=>{Object.keys(this.bound[e]).forEach((t=>{this.unbind(t,e)}))})),ei.remove(this.data)}getObservableData(){return this.data}bind(e,t,s="*"){this.bound[s]||(this.bound[s]={}),this.bound[s][e]=t,t(this.id,"connect")}unbind(e,t="*"){this.bound[t][e](this.id,"disconnect"),this.bound[t]&&this.bound[t][e]&&delete this.bound[t][e]}sync(e){for(const t of e){const e=t.type,s=t.currentPath,i=t.newValue,n=t.previousValue,o=[];for(const e in this.bound)if("*"===e)o.push(e);else{const t=new RegExp("^"+e.replace(".","\\."));s.match(t)&&o.push(e)}for(const t of o)for(const o in this.bound[t])this.bound[t][o](this.id,e,s,i,n)}}}let ii,ni,oi,ai,li,hi;class ObserverSubscriptionManager{constructor(e){this.options=e,this.observers=[],this.pendingAnimationFrame=void 0,this.frameQueue=[],this.sleeping=!0}subscribe(e){!this.observers.length&&this.sleeping&&this.wakeup(),this.observers.push(e)}unSubscribe(e){-1!==this.observers.indexOf(e)&&this.observers.splice(this.observers.indexOf(e),1),this.observers.length||this.sleep()}sleep(){this.sleeping=!0}wakeup(){this.sleeping=!1}notifyObservers(e,t){for(let s=0;s<this.observers.length;s++)this.observers[s][e]&&this.observers[s][e].apply(this.observers[s],t||[])}flushQueue(){this.pendingAnimationFrame&&(cancelAnimationFrame(this.pendingAnimationFrame),this.pendingAnimationFrame=void 0),this.frameQueue=[]}queueFrame(e){this.frameQueue.push(e.bind(this)),this.pendingAnimationFrame||(this.pendingAnimationFrame=requestAnimationFrame((()=>{this.processQueue()})))}processQueue(){this.pendingAnimationFrame=void 0;const e=this.frameQueue.slice(0);this.frameQueue=[];for(let t=0;t<e.length;t++)e[t]()}}class DOMWatcher extends ObserverSubscriptionManager{constructor(e={}){super(e),this.mutationHandler=Ct(((e,t)=>{this.observeDOM(this.options.shadowDOM||document.body)}),25,{maxWait:100}),this.mutationObserver=new MutationObserver(this.mutationHandler,!1)}subscribe(e){super.subscribe(e),e.watchDOM(this.options.shadowDOM||document.body)}wakeup(){super.wakeup(),this.mutationObserver.observe(this.options.shadowDOM||document.body,{childList:!0,subtree:!0})}sleep(){super.sleep(),this.mutationObserver.disconnect()}observeDOM(e){this.notifyObservers("watchDOM",[e||this.options.shadowDOM||document.body])}}ii=new DOMWatcher,ni=new class ScrollWatcher extends ObserverSubscriptionManager{constructor(e={}){super(e),this.scrollElement=this.options.scrollElement||window,this.lastscroll=0,this.scrolling=!1}trigger(){this.scrolling||this.scrollLoop()}scrollLoop(){if(this.lastscroll!==this.scrollTop()){this.scrolling=!0,this.lastscroll=this.scrollTop(),this.watchScroll();const frame=()=>{this.scrollLoop()};this.queueFrame(frame)}else this.scrolling=!1}setOptions(e={}){this.sleep(),this.scrollElement=e.scrollElement||window,this.wakeup()}subscribe(e){super.subscribe(e),e.watchScroll()}wakeup(){super.wakeup(),dt.on("theScrollWatcher",this.scrollElement,"scroll",(()=>{this.trigger()}))}sleep(){super.sleep(),dt.off("theScrollWatcher",this.scrollElement,"scroll")}inViewPort(e){return dt.inViewPort(e,this.scrollElement)}watchScroll(){this.notifyObservers("watchScroll")}scrollTop(e){if(this.scrollElement===window){if(void 0===e)return window.pageYOffset;window.scrollTo(0,e)}else{if(void 0===e)return this.scrollElement.scrollTop;this.scrollElement.scrollTop=e}}},oi=new class ResizeWatcher extends ObserverSubscriptionManager{constructor(e){super(e),this.debounce=Ct((()=>{this.watchResize()}),250)}subscribe(e){super.subscribe(e),e.watchResize()}wakeup(){super.wakeup(),window.addEventListener("resize",this.debounce,!1)}sleep(){super.sleep(),window.removeEventListener("resize",this.debounce)}watchResize(){this.notifyObservers("watchResize")}},ai=new class OrientationWatcher extends ObserverSubscriptionManager{constructor(e){super(e),"onorientationchange"in window?dt.addClass(document.body,"have-orientation"):dt.addClass(document.body,"no-orientation"),this.debounce=Ct((()=>{this.watchOrientation()}),250)}subscribe(e){super.subscribe(e),e.watchOrientation()}wakeup(){super.wakeup(),"onorientationchange"in window&&window.addEventListener("orientationchange",this.debounce,!1)}sleep(){super.sleep(),"onorientationchange"in window&&window.removeEventListener("orientationchange",this.debounce)}watchOrientation(){this.notifyObservers("watchOrientation")}},li=new class WorkerWatcher extends ObserverSubscriptionManager{constructor(e){super(e),this.workers={}}registerWorker(e,t){if(!this.workers[e]){let s=t,i=!1;if(!t.match(/^(http|\/)/i)){const e=new Blob([t],{type:"text/javascript"});s=URL.createObjectURL(e),i=!0}this.workers[e]={worker:new Worker(s),observers:[]},i&&URL.revokeObjectURL(s),this.workers[e].worker.onmessage=t=>{this.workerMessage(e,t)}}return this.workers[e].worker}subscribe(e,t){if(!this.workers[t])throw new Error("worker "+t+" does not exist");this.workers[t].observers.push(e),super.subscribe(e)}unSubscribe(e,t){if(!this.workers[t])throw new Error("worker "+t+" does not exist");const s=this.workers[t].observers;-1!==s.indexOf(e)&&s.splice(s.indexOf(e),1),s.length||(this.workers[t].worker.terminate(),delete this.workers[t]),super.unSubscribe(e)}workerMessage(e,t){this.workers[e].observers.forEach((s=>{s.workerMessage&&s.workerMessage(e,t)}))}wakeup(){super.wakeup()}sleep(){super.sleep()}},hi=new class ObservableObjectWatcher extends ObserverSubscriptionManager{constructor(e){super(e),this.registeredObservableObjects={}}getObservable(e){return this.registeredObservableObjects[e]?this.registeredObservableObjects[e].observable:void 0}observableStart(e,t){const s=(e=>ri[e])(e);if(s&&void 0!==t)throw new Error("ObservableObject "+e+" already exists, can't build.");return this.registeredObservableObjects[e]||(this.registeredObservableObjects[e]=s?{id:e,observable:s,observers:[],managed:!1}:{id:e,observable:new ObservableObject(e,t),observers:[],managed:!0},this.registeredObservableObjects[e].observable.bind(this.constructor.name,this.notify.bind(this))),this.registeredObservableObjects[e].observable}observableDestroy(e){if(!this.registeredObservableObjects[e])throw new Error("ObservableObject observableDestroy "+e+" does not exist");this.registeredObservableObjects[e].observable.unbind(this.constructor.name),this.registeredObservableObjects[e].observable.destroy(),delete this.registeredObservableObjects[e]}subscribe(e,t,s){this.registeredObservableObjects[t]||this.observableStart(t,s),this.registeredObservableObjects[t].observers.push(e),super.subscribe(e)}unSubscribe(e,t){if(!this.registeredObservableObjects[t])throw new Error("ObservableObject unSubscribe "+t+" does not exist");const s=this.registeredObservableObjects[t].observers;-1!==s.indexOf(e)&&s.splice(s.indexOf(e),1),!s.length&&this.registeredObservableObjects[t].managed&&this.observableDestroy(t),super.unSubscribe(e)}notify(e,t,s,i,n){if(!this.registeredObservableObjects[e])throw new Error("ObservableObject notify "+e+" does not exist");this.registeredObservableObjects[e].observers.forEach((o=>{o.observableChanged&&o.observableChanged(e,t,s,i,n)}))}};var ci=at((function(e,t,s){return e+(s?"-":"")+t.toLowerCase()}));let ui=0;const di=[],pi="customElements"in window,fi={},registerSargassoClass=(e,t)=>{if(fi[e])throw new Error("Sargasso class "+e+" is already registered.");if(fi[e]=t,pi){const t=new Function("registeredClasses",`\n\t\t\treturn class ${e}Element extends HTMLElement {\n\t\t\t\tconstructor(element, options = {}) {\n\t\t\t\t\tsuper()\n\t\t\t\t\tthis.helperClass= '${e}'\n\t\t\t\t\tthis.helpers = []\n\t\t\t\t}\n\n\t\t\t\tconnectedCallback () {\n\t\t\t\t\tthis.helpers.push(new registeredClasses[this.helperClass](this,{isCustomElement:true}))\n\t\t\t\t\tif (this.hasAttributes()) {\n\t\t\t\t\t\tfor(let i = 0; i < this.attributes.length; i++) {\n\t\t\t\t\t\t\tif(this.attributes[i].name.match(/^sargasso-/)) {\n\t\t\t\t\t\t\t\tlet classname = this.attributes[i].name.replace(/^sargasso-/,'').split('-').map(word=> word.charAt(0).toUpperCase() + word.slice(1).toLowerCase()).join('')\n\t\t\t\t\t\t\t\tif(!registeredClasses[classname]) {\n\t\t\t\t\t\t\t\t\tconsole.log('instantiate by attribute ' + this.attributes[i].name + ' > ' + classname + ' is not a sargasso class')\n\t\t\t\t\t\t\t\t\tcontinue\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tthis.helpers.push(new registeredClasses[classname](this,{isCustomElement:true}))\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tthis.helpers.forEach((helper) => {\n\t\t\t\t\t\thelper.start()\n\t\t\t\t\t})\n\t\t\t\t}\n\n\t\t\t\tdisconnectedCallback () {\n\t\t\t\t\tthis.helpers.forEach((helper) => {\n\t\t\t\t\t\thelper.sleep()\n\t\t\t\t\t\thelper.destroy()\n\t\t\t\t \t})\n\t\t\t\t\tthis.helpers = [] // nuke the reference for trash collection\n\t\t\t\t}\n\t\t\t}`)(fi),s=window.sargassoOptions||{},i=void 0!==s.customElementPrefix?s.customElementPrefix:"sargasso-";customElements.define(i+ci(e),t)}},bi=["DOMChanged","didScroll","didResize","didBreakpoint","enterViewport","exitViewport","enterFullscreen","exitFullscreen","newPage","elementEvent","workerOnMessage","observableChanged"];class Sargasso{constructor(e,t={}){validate("Sargasso constructor element",e,["isDefined","isElement"]),validate("Sargasso constructor options",t,["isDefined",["isObject"]]),this.uid=++ui,this.element=e,t.shadowDOM&&(this._shadowDOM=e.attachShadow({mode:"open"}),this._shadowRoot=document.createElement("div"),this._shadowDOM.append(this._shadowRoot),this._hostElement=this.element,this.element=this._shadowRoot),this.options=t,this._pendingAnimationFrame=void 0,this._frameQueue=[],this._isInViewport=!1,this._workers={},this._observables={},this._template=void 0,this._templateArgs={},this._started=!1,this.render=Ct((()=>{this._render()}),100,{maxWait:250})}start(){const e=this.getMetaData("registeredResponsiveControllers")||[];e.push(this),this.setMetaData("registeredResponsiveControllers",e),this.setMetaData(this.constructor.name,this),di.push(this),this._shadowDOM&&(this._shadowDOMWatcher||(this._shadowDOMWatcher=new DOMWatcher({shadowDOM:this._shadowRoot})),this._shadowDOMWatcher.subscribe(this)),this.options.watchDOM&&ii.subscribe(this),(this.options.watchScroll||this.options.watchViewport)&&ni.subscribe(this),(this.options.watchResize||this.options.watchViewport)&&oi.subscribe(this),(this.options.watchOrientation||this.options.watchViewport)&&ai.subscribe(this),this.elementListener=e=>{e.detail&&e.detail.sargassoEvent&&-1!==bi.indexOf(e.detail.sargassoEvent)?this[e.detail.sargassoEvent].apply(this,e.detail.sargassoEventOptions||[]):this.elementEvent(e)},this.element.addEventListener("sargasso",this.elementListener),this._started=!0}sleep(){this._shadowDOM&&this._shadowDOMWatcher.unSubscribe(this),this.options.watchDOM&&ii.unSubscribe(this),(this.options.watchScroll||this.options.watchViewport)&&ni.unSubscribe(this),(this.options.watchResize||this.options.watchViewport)&&oi.unSubscribe(this),(this.options.watchOrientation||this.options.watchViewport)&&ai.unSubscribe(this),this.element.removeEventListener("sargasso",this.elementListener),dt.offAll(this.element),this._started=!1}DOMChanged(e){}didScroll(){}didResize(){}didBreakpoint(){}enterViewport(){}exitViewport(){}enterFullscreen(){}exitFullscreen(){}newPage(e,t){}elementEvent(e){}workerOnMessage(e,t){}observableChanged(e,t,s,i,n){this.render()}setMetaData(e,t){dt.setMetaData(this.element,e,t)}getMetaData(e){return dt.getMetaData(this.element,e)}on(e,t,s,i){dt.on(this.constructor.name+"-"+this.uid,this.element,e,t,s,i)}off(e,t){dt.off(this.constructor.name+"-"+this.uid,this.element,e,t)}once(e,t,s,i){dt.once(this.constructor.name+"-"+this.uid,this.element,e,t,s,i)}notifyAll(e,t){if(-1===bi.indexOf(e))throw new Error("invalid event name "+e);for(let s=0;s<di.length;s++){const i=di[s];i!==this&&i[e]&&i[e].apply(i,t)}}notifyElement(e,t,s){if(-1===bi.indexOf(t))throw new Error("invalid event name "+t);const i=this.getMetaData("registeredResponsiveControllers");if(i)for(let e=0;e<i.length;e++){const n=i[e];n!==this&&n[t]&&n[t].apply(n,s)}}queueFrame(e){this._frameQueue.push(e.bind(this)),this._pendingAnimationFrame||(this._pendingAnimationFrame=requestAnimationFrame((()=>{this._processQueue()})))}wantFullscreen(e){e?this.enterFullscreen():this.exitFullscreen()}hasClass(e){return dt.hasClass(this.element,e)}addClass(e){dt.addClass(this.element,e)}removeClass(e){dt.removeClass(this.element,e)}setCSS(e){dt.setCSS(this.element,e)}isVisible(){return dt.isVisible(this.element)}workerStart(e,t){return this._workers[e]=li.registerWorker(e,t),li.subscribe(this,e),this._workers[e]}workerPostMessage(e,t){t.uid||(t.uid=this.uid),this._workers[e]&&this._workers[e].postMessage(t)}getObservable(e){return this._observables[e]}getObservableData(e){return this._observables[e].data}observableStart(e,t){return hi.subscribe(this,e,t),this._observables[e]=hi.getObservable(e),this._observables[e]}observableStop(e){this._observables[e]&&(hi.unSubscribe(this,e),delete this._observables[e])}observableStopAll(){for(const e in this._observables)this.observableStop(e)}setTemplate(e){this._template=e}setRenderer(e){this.renderer=e}setTemplateArgs(e={}){this._templateArgs=e,this.render()}getTemplateArgs(){const e=this._templateArgs||{};return JSON.parse(JSON.stringify(e))}_render(){this._template&&this.renderer&&this.renderer(this._template(this.getTemplateArgs()),this.element)}_flushQueue(){this._pendingAnimationFrame&&(cancelAnimationFrame(this._pendingAnimationFrame),this._pendingAnimationFrame=void 0),this._frameQueue=[]}_processQueue(){this._pendingAnimationFrame=void 0;const e=this._frameQueue.slice(0);this._frameQueue=[];for(let t=0;t<e.length;t++)e[t]()}_stopWorker(e){this._workers[e]&&(li.unSubscribe(this,e),delete this._workers[e])}_stopAllWorkers(){for(const e in this._workers)this._stopWorker(e)}destroy(){this._stopAllWorkers(),this.observableStopAll(),this._flushQueue(),this._started&&this.sleep();const e=this.getMetaData("registeredResponsiveControllers");e&&-1!==e.indexOf(this)&&(e.splice(e.indexOf(this),1),this.setMetaData("registeredResponsiveControllers",e)),this.setMetaData(this.constructor.name,null),this.element=null,-1!==di.indexOf(this)&&di.splice(di.indexOf(this),1)}watchDOM(e){e===this._shadowRoot?ii.observeDOM(this._shadowRoot):this.DOMChanged(e)}watchScroll(){this.options.watchViewport&&this.inViewport(),this.didScroll()}watchResize(){this.options.watchViewport&&this.inViewport(),this.didResize()}watchOrientation(){!window.orientation||90!==window.orientation&&-90!==window.orientation?this.wantFullscreen(!1):this.wantFullscreen(!0)}inViewport(){ni.inViewPort(this.element)?this._isInViewport||(this.enterViewport(),this._isInViewport=!0):this._isInViewport&&(this.exitViewport(),this._isInViewport=!1)}workerMessage(e,t){t.data.uid===this.uid&&this.workerOnMessage(e,t.data)}nativeRequestFullScreen(){if(document.fullscreenElement){if(document.fullscreenElement===this.element)return;document.exitFullscreen()}this.element.requestFullscreen()}nativeExitFullScreen(){document.fullscreenElement&&document.fullscreenElement===this.element&&document.exitFullscreen()}}registerSargassoClass("Sargasso",Sargasso);class LazyInstantiate extends Sargasso{constructor(e,t={}){t.watchScroll=!0,t.watchResize=!0,t.watchDOM=!0,t.immortal=!0,super(e,t)}didResize(){super.didResize(),this.lazyHandler()}didScroll(){super.didScroll(),this.lazyHandler()}DOMChanged(e){super.DOMChanged(e),this.lazyHandler(e)}lazyHandler(e=document){const t=e.querySelectorAll("[data-lazy-sargasso-class]");for(let e=0;e<t.length;e++){const s=t[e];if(ni.inViewPort(s)){const i=s.getAttribute("data-lazy-sargasso-class").split(/\s*,\s*/);for(let s=0;s<i.length;s++){new fi[i[s]](t[e]).start()}s.removeAttribute("data-lazy-sargasso-class")}}}}registerSargassoClass("LazyInstantiate",LazyInstantiate);class SargassoSupervisor extends Sargasso{constructor(e,t={}){super(e,{watchDOM:!0,mortal:!1}),this.lazy=new LazyInstantiate(e,t)}start(){this.lazy.start(),super.start()}instantiate(e){const t=e.getAttribute("data-sargasso-class").split(/\s*,\s*/);for(let s=0;s<t.length;s++)try{new fi[t[s]](e).start()}catch(e){console.log("error instantiating "+t[s],e,fi)}e.removeAttribute("data-sargasso-class")}newPage(){this.doIt()}DOMChanged(e){this.doIt(e)}doIt(e=document.body){e.getAttribute("data-sargasso-class")&&this.instantiate(e);const t=e.querySelectorAll("[data-sargasso-class]");for(const e of t)this.instantiate(e);const s=[];for(let e=0;e<di.length;e++)di[e].options.immortal||di[e].options.isCustomElement||document.body.contains(di[e].element)||s.push(di[e]);for(let e=0;e<s.length;e++)s[e].destroy()}}registerSargassoClass("SargassoSupervisor",SargassoSupervisor);const gi=window.breakpoints||{widths:[{className:"breakpoint-phone",maxWidth:599},{className:"breakpoint-tablet",maxWidth:904},{className:"breakpoint-desktop",maxWidth:void 0}]};class Breakpoints extends Sargasso{constructor(e,t={}){t.watchResize=!0,super(e,t),this.options.widths=t.widths||gi,this.scale=void 0,this.widths=[],this.classes=[],this.debouncedDetectGeometry=Ct((()=>{this.detectGeometry()}),100,{maxWait:150})}start(){super.start(),this.debouncedDetectGeometry()}didResize(){this.debouncedDetectGeometry()}detectGeometry(){const e=window.doBreakpoints(this.options.widths);if(e!==this.scale){const frame=()=>{this.notifyAll("didBreakpoint",[e])};this.queueFrame(frame)}this.scale=e}}registerSargassoClass("Breakpoints",Breakpoints);class HijaxLoader extends Sargasso{constructor(e,t={}){t.watchDOM=!0,t.immortal=!0,super(e,t),this.excludeRegex=new RegExp("^(//|http|javascript|mailto|#)","i"),this.currentPage=location.pathname+location.search,this.cachedMarkup={}}start(){const e=document.querySelectorAll("[data-hijax-skip-unchanged]");for(let t=0;t<e.length;t++){const s=e[t],i=s.getAttribute("id");this.cachedMarkup[i]=s.innerHTML}super.start(),window.addEventListener("popstate",(e=>{this.watchPopState(e)}),!1)}DOMChanged(e){super.DOMChanged(e),this.hijaxLinks(e)}watchPopState(e){location.pathname+location.search!==this.currentPage&&this.preFlight(location.pathname+location.search)}hijaxLinks(e){const t=e?e.getElementsByTagName("a"):this.element.getElementsByTagName("a");for(let e=0;e<t.length;e++){const s=t[e],i=s.getAttribute("href");!i||s.getAttribute("data-hijaxed")||s.getAttribute("target")||s.hasAttribute("data-no-hijax")||this.excludeRegex.exec(i)||(s.setAttribute("data-hijaxed",!0),s.addEventListener("click",(e=>{e.preventDefault(),this.setPage(i)}),!1))}}setPage(e,t){e===this.currentPage||t?this.preFlight(e):(history.pushState(null,null,e),this.watchPopState())}preFlight(e){if(!this.options.preFlight)return this.loadPage(e);this.options.preFlight(e,((t,s,i)=>{t&&(this.options.onError?this.options.onError("danger",t):alert("Error loading page: "+t)),s?this.currentPage=location.pathname+location.search:this.loadPage(i||e)}))}loadPage(e){this.queueFrame((()=>{dt.addClass(document.body,"hijax-loading")})),this.options.onExitPage&&this.options.onExitPage();const t=new XMLHttpRequest;t.open("GET",e),t.setRequestHeader("Sargasso-Hijax",1),t.setRequestHeader("x-digitopia-hijax",1),this.options.onLoading&&(this.options.onLoading(),t.onreadystatechange=this.options.onLoading),t.onload=()=>{if(301===t.status||302===t.status||t.getResponseHeader("Sargasso-Location")){const e=t.getResponseHeader("Location")?t.getResponseHeader("Location"):t.getResponseHeader("Sargasso-Location");this.setPage(e)}else if(200===t.status){ni.scrollTop(0),this.mergePage(t.responseText);const e=this.currentPage,frame=()=>{this.notifyAll("newPage",[e,location.pathname+location.search]),dt.removeClass(document.body,"hijax-loading")};this.queueFrame(frame),this.currentPage=location.pathname+location.search}else{const e=t.getResponseHeader("Sargasso-Flash-Level")||"danger";let s=t.getResponseHeader("Sargasso-Flash-Message")||t.statusText;s||(s="Could not connect to server."),this.options.onError?this.options.onError(e,s):alert("Error loading page: "+s)}},t.send()}processScripts(e){Array.from(e).forEach((e=>{e.remove();const t=e.getAttribute("id");document.getElementById(t)||document.getElementsByTagName("head")[0].appendChild(e)}))}mergePage(e){const t=document.querySelectorAll("[data-ephemeral]");Array.from(t).forEach((e=>{e.remove()}));const s=e.split(/(<body[^>]*>|<\/body>)/gi),i=makeFragment(s[2]),n=document.querySelectorAll("[data-hijax]");for(let e=0;e<n.length;e++){const t=n[e],s=t.getAttribute("id"),o=i.getElementById(s);if(t.hasAttribute("data-hijax-skip-unchanged")){if(this.cachedMarkup[s]===o.innerHTML)continue;this.cachedMarkup[s]=o.innerHTML}const a=t.getAttribute("data-hijax-cache-key-selector");if(a&&o.querySelector(a)&&t.querySelector(a)&&t.querySelector(a).getAttribute("data-hijax-cache-key")===o.querySelector(a).getAttribute("data-hijax-cache-key"))continue;this.processScripts(o.querySelectorAll("script"));const frame=()=>{t.parentNode.replaceChild(o,t),this.options.onEnterPage&&this.options.onEnterPage(),this.hijaxLinks(o)};this.queueFrame(frame)}}}registerSargassoClass("HijaxLoader",HijaxLoader);const makeFragment=e=>{if(document.createRange&&document.createRange().createContextualFragment)return document.createRange().createContextualFragment(e);const t=document.createDocumentFragment(),s=document.createElement("div");return s.insertAdjacentHTML("afterBegin",e),t.appendChild(s),t};e.loadPageHandler=void 0;var vi;const mi=window,yi=mi.trustedTypes,_i=yi?yi.createPolicy("lit-html",{createHTML:e=>e}):void 0,wi=`lit$${(Math.random()+"").slice(9)}$`,Oi="?"+wi,Ai=`<${Oi}>`,$i=document,r=(e="")=>$i.createComment(e),d=e=>null===e||"object"!=typeof e&&"function"!=typeof e,xi=Array.isArray,c=e=>xi(e)||"function"==typeof(null==e?void 0:e[Symbol.iterator]),Si=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Ei=/-->/g,ji=/>/g,Ci=RegExp(">|[ \t\n\f\r](?:([^\\s\"'>=/]+)([ \t\n\f\r]*=[ \t\n\f\r]*(?:[^ \t\n\f\r\"'`<>=]|(\"|')|))|$)","g"),ki=/'/g,Mi=/"/g,Di=/^(?:script|style|textarea|title)$/i,g=e=>(t,...s)=>({_$litType$:e,strings:t,values:s}),Pi=g(1),Ti=(g(2),Symbol.for("lit-noChange")),Hi=Symbol.for("lit-nothing"),Ri=new WeakMap,Li=$i.createTreeWalker($i,129,null,!1),E=(e,t)=>{const s=e.length-1,i=[];let n,o=2===t?"<svg>":"",a=Si;for(let t=0;t<s;t++){const s=e[t];let l,h,u=-1,p=0;for(;p<s.length&&(a.lastIndex=p,h=a.exec(s),null!==h);)p=a.lastIndex,a===Si?"!--"===h[1]?a=Ei:void 0!==h[1]?a=ji:void 0!==h[2]?(Di.test(h[2])&&(n=RegExp("</"+h[2],"g")),a=Ci):void 0!==h[3]&&(a=Ci):a===Ci?">"===h[0]?(a=null!=n?n:Si,u=-1):void 0===h[1]?u=-2:(u=a.lastIndex-h[2].length,l=h[1],a=void 0===h[3]?Ci:'"'===h[3]?Mi:ki):a===Mi||a===ki?a=Ci:a===Ei||a===ji?a=Si:(a=Ci,n=void 0);const f=a===Ci&&e[t+1].startsWith("/>")?" ":"";o+=a===Si?s+Ai:u>=0?(i.push(l),s.slice(0,u)+"$lit$"+s.slice(u)+wi+f):s+wi+(-2===u?(i.push(void 0),t):f)}const l=o+(e[s]||"<?>")+(2===t?"</svg>":"");if(!Array.isArray(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==_i?_i.createHTML(l):l,i]};class C{constructor({strings:e,_$litType$:t},s){let i;this.parts=[];let n=0,o=0;const a=e.length-1,l=this.parts,[h,u]=E(e,t);if(this.el=C.createElement(h,s),Li.currentNode=this.el.content,2===t){const e=this.el.content,t=e.firstChild;t.remove(),e.append(...t.childNodes)}for(;null!==(i=Li.nextNode())&&l.length<a;){if(1===i.nodeType){if(i.hasAttributes()){const e=[];for(const t of i.getAttributeNames())if(t.endsWith("$lit$")||t.startsWith(wi)){const s=u[o++];if(e.push(t),void 0!==s){const e=i.getAttribute(s.toLowerCase()+"$lit$").split(wi),t=/([.?@])?(.*)/.exec(s);l.push({type:1,index:n,name:t[2],strings:e,ctor:"."===t[1]?M:"?"===t[1]?k:"@"===t[1]?H:S})}else l.push({type:6,index:n})}for(const t of e)i.removeAttribute(t)}if(Di.test(i.tagName)){const e=i.textContent.split(wi),t=e.length-1;if(t>0){i.textContent=yi?yi.emptyScript:"";for(let s=0;s<t;s++)i.append(e[s],r()),Li.nextNode(),l.push({type:2,index:++n});i.append(e[t],r())}}}else if(8===i.nodeType)if(i.data===Oi)l.push({type:2,index:n});else{let e=-1;for(;-1!==(e=i.data.indexOf(wi,e+1));)l.push({type:7,index:n}),e+=wi.length-1}n++}}static createElement(e,t){const s=$i.createElement("template");return s.innerHTML=e,s}}function P(e,t,s=e,i){var n,o,a,l;if(t===Ti)return t;let h=void 0!==i?null===(n=s._$Co)||void 0===n?void 0:n[i]:s._$Cl;const u=d(t)?void 0:t._$litDirective$;return(null==h?void 0:h.constructor)!==u&&(null===(o=null==h?void 0:h._$AO)||void 0===o||o.call(h,!1),void 0===u?h=void 0:(h=new u(e),h._$AT(e,s,i)),void 0!==i?(null!==(a=(l=s)._$Co)&&void 0!==a?a:l._$Co=[])[i]=h:s._$Cl=h),void 0!==h&&(t=P(e,h._$AS(e,t.values),h,i)),t}class V{constructor(e,t){this.u=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}v(e){var t;const{el:{content:s},parts:i}=this._$AD,n=(null!==(t=null==e?void 0:e.creationScope)&&void 0!==t?t:$i).importNode(s,!0);Li.currentNode=n;let o=Li.nextNode(),a=0,l=0,h=i[0];for(;void 0!==h;){if(a===h.index){let t;2===h.type?t=new N(o,o.nextSibling,this,e):1===h.type?t=new h.ctor(o,h.name,h.strings,this,e):6===h.type&&(t=new I(o,this,e)),this.u.push(t),h=i[++l]}a!==(null==h?void 0:h.index)&&(o=Li.nextNode(),a++)}return n}p(e){let t=0;for(const s of this.u)void 0!==s&&(void 0!==s.strings?(s._$AI(e,s,t),t+=s.strings.length-2):s._$AI(e[t])),t++}}class N{constructor(e,t,s,i){var n;this.type=2,this._$AH=Hi,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=s,this.options=i,this._$Cm=null===(n=null==i?void 0:i.isConnected)||void 0===n||n}get _$AU(){var e,t;return null!==(t=null===(e=this._$AM)||void 0===e?void 0:e._$AU)&&void 0!==t?t:this._$Cm}get parentNode(){let e=this._$AA.parentNode;const t=this._$AM;return void 0!==t&&11===e.nodeType&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=P(this,e,t),d(e)?e===Hi||null==e||""===e?(this._$AH!==Hi&&this._$AR(),this._$AH=Hi):e!==this._$AH&&e!==Ti&&this.g(e):void 0!==e._$litType$?this.$(e):void 0!==e.nodeType?this.T(e):c(e)?this.k(e):this.g(e)}O(e,t=this._$AB){return this._$AA.parentNode.insertBefore(e,t)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}g(e){this._$AH!==Hi&&d(this._$AH)?this._$AA.nextSibling.data=e:this.T($i.createTextNode(e)),this._$AH=e}$(e){var t;const{values:s,_$litType$:i}=e,n="number"==typeof i?this._$AC(e):(void 0===i.el&&(i.el=C.createElement(i.h,this.options)),i);if((null===(t=this._$AH)||void 0===t?void 0:t._$AD)===n)this._$AH.p(s);else{const e=new V(n,this),t=e.v(this.options);e.p(s),this.T(t),this._$AH=e}}_$AC(e){let t=Ri.get(e.strings);return void 0===t&&Ri.set(e.strings,t=new C(e)),t}k(e){xi(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let s,i=0;for(const n of e)i===t.length?t.push(s=new N(this.O(r()),this.O(r()),this,this.options)):s=t[i],s._$AI(n),i++;i<t.length&&(this._$AR(s&&s._$AB.nextSibling,i),t.length=i)}_$AR(e=this._$AA.nextSibling,t){var s;for(null===(s=this._$AP)||void 0===s||s.call(this,!1,!0,t);e&&e!==this._$AB;){const t=e.nextSibling;e.remove(),e=t}}setConnected(e){var t;void 0===this._$AM&&(this._$Cm=e,null===(t=this._$AP)||void 0===t||t.call(this,e))}}class S{constructor(e,t,s,i,n){this.type=1,this._$AH=Hi,this._$AN=void 0,this.element=e,this.name=t,this._$AM=i,this.options=n,s.length>2||""!==s[0]||""!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=Hi}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(e,t=this,s,i){const n=this.strings;let o=!1;if(void 0===n)e=P(this,e,t,0),o=!d(e)||e!==this._$AH&&e!==Ti,o&&(this._$AH=e);else{const i=e;let a,l;for(e=n[0],a=0;a<n.length-1;a++)l=P(this,i[s+a],t,a),l===Ti&&(l=this._$AH[a]),o||(o=!d(l)||l!==this._$AH[a]),l===Hi?e=Hi:e!==Hi&&(e+=(null!=l?l:"")+n[a+1]),this._$AH[a]=l}o&&!i&&this.j(e)}j(e){e===Hi?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=e?e:"")}}class M extends S{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===Hi?void 0:e}}const Fi=yi?yi.emptyScript:"";class k extends S{constructor(){super(...arguments),this.type=4}j(e){e&&e!==Hi?this.element.setAttribute(this.name,Fi):this.element.removeAttribute(this.name)}}class H extends S{constructor(e,t,s,i,n){super(e,t,s,i,n),this.type=5}_$AI(e,t=this){var s;if((e=null!==(s=P(this,e,t,0))&&void 0!==s?s:Hi)===Ti)return;const i=this._$AH,n=e===Hi&&i!==Hi||e.capture!==i.capture||e.once!==i.once||e.passive!==i.passive,o=e!==Hi&&(i===Hi||n);n&&this.element.removeEventListener(this.name,this,i),o&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){var t,s;"function"==typeof this._$AH?this._$AH.call(null!==(s=null===(t=this.options)||void 0===t?void 0:t.host)&&void 0!==s?s:this.element,e):this._$AH.handleEvent(e)}}class I{constructor(e,t,s){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(e){P(this,e)}}const zi=mi.litHtmlPolyfillSupport;null==zi||zi(C,N),(null!==(vi=mi.litHtmlVersions)&&void 0!==vi?vi:mi.litHtmlVersions=[]).push("2.5.0");const Z=(e,t,s)=>{var i,n;const o=null!==(i=null==s?void 0:s.renderBefore)&&void 0!==i?i:t;let a=o._$litPart$;if(void 0===a){const e=null!==(n=null==s?void 0:s.renderBefore)&&void 0!==n?n:null;o._$litPart$=a=new N(t.insertBefore(r(),e),e,void 0,null!=s?s:{})}return a._$AI(e),a};class SargassoComponent extends Sargasso{constructor(e,t={}){t.shadowDOM=void 0===t.shadowDOM||t.shadowDOM,t.componentOptions=window.sagassoComponentOptions||{},super(e,t),this.templateAttributes=[],this.renderAttributes=[],this.templateOptions={},this.obervableId=(this._hostElement||this.element).getAttribute("data-observable-id"),this.toDestroy=[]}start(){super.start(),this.obervableId&&(this.observable=this.observableStart(this.obervableId),this.observableData=this.getObservableData(this.obervableId)),this.renderOptions=this.observableStart("SargassoComponent-"+this.uid,{}),this.getAttributes(),this.watchAttributes(),this.setTemplateArgs({options:this.options.componentOptions||{},attributes:this.renderOptions.data,data:this.observableData?this.observableData:void 0}),this.setTemplate(this.buildTemplate()),this._template&&this.setRenderer(Z)}watchAttributes(){this.allAttributes=this.templateAttributes.concat(this.renderAttributes),this.attributeObserver=new MutationObserver((e=>{let t=!1,s=!1;e.forEach((e=>{"attributes"===e.type&&-1!==this.allAttributes.indexOf(e.attributeName)&&(t=!0,-1!==this.templateAttributes.indexOf(e.attributeName)&&(s=!0))})),t&&(this.getAttributes(),s&&(this.setTemplate(this.buildTemplate()),this.render()))})),this.attributeObserver.observe(this._hostElement||this.element,{attributes:!0})}getAttributes(){for(const e of this.templateAttributes){const t=(this._hostElement||this.element).getAttribute(e)||(this._hostElement||this.element).hasAttribute(e)||void 0;this.templateOptions[e]!==t&&(this.templateOptions[e]=t)}for(const e of this.renderAttributes){const t=(this._hostElement||this.element).getAttribute(e)||(this._hostElement||this.element).hasAttribute(e)||void 0;this.renderOptions.data[e]!==t&&(this.renderOptions.data[e]=t)}}buildTemplate(){return e=>Pi`
<div class="web-component-body">

@@ -3,0 +3,0 @@ <p>using default buildTemplate - override buildTemplate to customize component markup</p>

{
"name": "@pelagiccreatures/sargasso",
"version": "2.3.1",
"version": "2.3.2",
"description": "Simple, Fast, Reactive, Supervised Javascript controllers for custom html elements.",

@@ -5,0 +5,0 @@ "type": "module",

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc