@lmjs/core 2.5.5 → 2.5.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  /* LumenJS V2 core — generated by packages/core/build/bundle.js, do not edit directly */
2
- (function(global){function toArray(x){if(x==null)return[];if(typeof NodeList!=="undefined"&&x instanceof NodeList)return Array.prototype.slice.call(x);if(typeof HTMLCollection!=="undefined"&&x instanceof HTMLCollection)return Array.prototype.slice.call(x);if(Array.isArray(x))return x;if(x instanceof $)return Array.prototype.slice.call(x);return[x]}var JQ_POSITIONAL=/:(first|last|even|odd|eq\((-?\d+)\)|gt\((-?\d+)\)|lt\((-?\d+)\))(?![-\w])/;var JQ_REWRITES=[[/:checkbox(?![-\w])/g,'[type="checkbox"]'],[/:radio(?![-\w])/g,'[type="radio"]'],[/:selected(?![-\w])/g,":checked"],[/:password(?![-\w])/g,'[type="password"]'],[/:text(?![-\w])/g,'[type="text"]'],[/:submit(?![-\w])/g,'[type="submit"]'],[/:file(?![-\w])/g,'[type="file"]'],[/:button(?![-\w])/g,"button"]];function _splitTopLevel(sel,ch){var out=[],depth=0,quote=null,cur="";for(var i=0;i<sel.length;i++){var c=sel[i];if(quote){if(c===quote)quote=null;cur+=c;continue}if(c==='"'||c==="'"){quote=c;cur+=c;continue}if(c==="("||c==="[")depth++;else if(c===")"||c==="]")depth--;if(c===ch&&depth===0){out.push(cur);cur="";continue}cur+=c}out.push(cur);return out}function _applyPositional(els,m){var n=els.length;if(m[1]==="first")return els.slice(0,1);if(m[1]==="last")return n?els.slice(n-1):[];if(m[1]==="even")return els.filter(function(_,i2){return i2%2===0});if(m[1]==="odd")return els.filter(function(_,i2){return i2%2===1});if(m[2]!==void 0){var i=+m[2];if(i<0)i+=n;return els[i]?[els[i]]:[]}if(m[3]!==void 0){var g=+m[3];if(g<0)g+=n;return els.slice(g+1)}var l=+m[4];if(l<0)l+=n;return els.slice(0,Math.max(0,l))}function _jqSelect(root,selector){var sel=selector;for(var r=0;r<JQ_REWRITES.length;r++)sel=sel.replace(JQ_REWRITES[r][0],JQ_REWRITES[r][1]);if(!JQ_POSITIONAL.test(sel))return toArray(root.querySelectorAll(sel));var out=[];_splitTopLevel(sel,",").forEach(function(part){var rest=part.trim(),current=null;while(rest.length){var m=JQ_POSITIONAL.exec(rest);var css=m?rest.slice(0,m.index):rest;if(css.trim()){if(current===null)current=toArray(root.querySelectorAll(css));else{var next=[];var scoped=/^\s*[>+~]/.test(css)?":scope"+css:":scope "+css.replace(/^\s+/,"");current.forEach(function(el){toArray(el.querySelectorAll(scoped)).forEach(function(x){if(next.indexOf(x)===-1)next.push(x)})});current=next}}else if(current===null)current=toArray(root.querySelectorAll("*"));if(!m)break;current=_applyPositional(current,m);rest=rest.slice(m.index+m[0].length)}(current||[]).forEach(function(x){if(out.indexOf(x)===-1)out.push(x)})});return out}function $(selector,context){if(!(this instanceof $))return new $(selector,context);if(typeof selector==="function")return $(document).ready(selector);var els=[];var sel=void 0;if(!selector){els=[]}else if(typeof selector==="string"){var trimmed=selector.trim();if(trimmed[0]==="<"){var tpl=document.createElement("template");tpl.innerHTML=trimmed;els=toArray(tpl.content.childNodes).filter(function(n){return n.nodeType===1})}else{sel=selector;var root=context?context instanceof $?context[0]:context:document;var atParts=selector.split(",").map(function(s){return s.trim()});var isAllAtAttrs=atParts.length>0&&atParts.every(function(p){return/^\[\\@[\w-]+\]$/.test(p)});if(isAllAtAttrs){var names=atParts.map(function(p){return"@"+/^\[\\@([\w-]+)\]$/.exec(p)[1]});var all=root?toArray(root.querySelectorAll("*")):[];els=all.filter(function(el){return names.some(function(n){return el.getAttribute(n)!=null})})}else{els=root?_jqSelect(root,selector):[]}}}else{els=toArray(selector)}for(var i=0;i<els.length;i++)this[i]=els[i];this.length=els.length;this.selector=sel;return this}$.fn=$.prototype;$.fn.jquery="lumenjs-shim";$.fn.extend=function(methods){for(var k in methods)if(Object.prototype.hasOwnProperty.call(methods,k))$.fn[k]=methods[k];return $};$.extend=function(target){for(var i=1;i<arguments.length;i++){var src=arguments[i];for(var k in src)if(Object.prototype.hasOwnProperty.call(src,k))target[k]=src[k]}return target};$.Event=function(type,props){var e=typeof type==="string"?new Event(type,{bubbles:true,cancelable:true}):type;if(props)for(var k in props)e[k]=props[k];return e};$.proxy=function(fn,context){return fn.bind(context)};$.trim=function(s){return(s==null?"":String(s)).trim()};$.inArray=function(val,arr){return Array.prototype.indexOf.call(arr,val)};function isArrayLike(obj){if(Array.isArray(obj)||obj instanceof $)return true;var length=obj&&typeof obj==="object"&&obj.length;return typeof length==="number"&&(length===0||length-1 in obj)}$.each=function(arr,fn){if(isArrayLike(arr)){for(var i=0;i<arr.length;i++)if(fn.call(arr[i],i,arr[i])===false)break}else{for(var k in arr)if(fn.call(arr[k],k,arr[k])===false)break}return arr};$.map=function(arr,fn){var out=[];var src=Array.isArray(arr)||arr instanceof $?arr:Object.keys(arr||{}).map(function(k){return arr[k]});for(var i=0;i<src.length;i++){var r=fn(src[i],i);if(r===null||r===void 0)continue;if(Array.isArray(r))out.push.apply(out,r);else out.push(r)}return out};var _ajaxActive=0;$.param=function(obj){var parts=[];function add(k2,v){if(v&&typeof v==="object"){for(var kk in v)if(Object.prototype.hasOwnProperty.call(v,kk))add(k2+"["+(Array.isArray(v)?"":kk)+"]",v[kk])}else parts.push(encodeURIComponent(k2)+"="+encodeURIComponent(v==null?"":v))}for(var k in obj)if(Object.prototype.hasOwnProperty.call(obj,k))add(k,obj[k]);return parts.join("&")};$.ajax=function(url,opts){if(typeof url==="object"){opts=url;url=opts.url}opts=opts||{};var method=(opts.method||opts.type||"GET").toUpperCase();var headers=Object.assign({},opts.headers||{});var init={method,headers};var data=opts.data;var isJson=/json/i.test(opts.contentType||"");if(data!=null&&method==="GET"){var qs=typeof data==="string"?data:$.param(data);if(qs)url+=(url.indexOf("?")===-1?"?":"&")+qs}else if(data!=null){if(typeof data==="string"||typeof FormData!=="undefined"&&data instanceof FormData)init.body=data;else if(isJson)init.body=JSON.stringify(data);else{init.body=$.param(data);if(!headers["Content-Type"])headers["Content-Type"]="application/x-www-form-urlencoded; charset=UTF-8"}if(isJson&&!headers["Content-Type"])headers["Content-Type"]=opts.contentType}if(_ajaxActive===0)$(document).trigger("ajaxStart");_ajaxActive++;$(document).trigger("ajaxSend");var p=fetch(url,init).then(function(res){var ct=res.headers.get("content-type")||"";return ct.indexOf("json")>-1?res.json():res.text()}).then(function(data2){opts.success&&opts.success(data2);$(document).trigger("ajaxSuccess");return data2}).catch(function(err){opts.error&&opts.error(err);$(document).trigger("ajaxError");throw err}).finally(function(){_ajaxActive--;$(document).trigger("ajaxComplete");if(_ajaxActive===0)$(document).trigger("ajaxStop")});p.done=function(fn){p.then(fn,function(){});return p};p.fail=function(fn){p.catch(fn);return p};p.always=function(fn){p.then(fn,fn);return p};return p};function _shorthand(method){return function(url,data,success,dataType){if(typeof data==="function"){dataType=success;success=data;data=void 0}return $.ajax({url,method,data,success,dataType})}}$.get=_shorthand("GET");$.post=_shorthand("POST");$.getJSON=function(url,data,success){return $.get(url,data,success,"json")};$.parseJSON=function(s){return JSON.parse(s)};$.isArray=Array.isArray;$.isFunction=function(f){return typeof f==="function"};$.noop=function(){};$.fn.each=function(fn){for(var i=0;i<this.length;i++)if(fn.call(this[i],i,this[i])===false)break;return this};$.fn.get=function(i){return i===void 0?toArray(this):this[i]};$.fn.not=function(exclude){var excludeArr=exclude instanceof $?toArray(exclude):Array.isArray(exclude)?exclude:[exclude];var out=[];this.each(function(){if(excludeArr.indexOf(this)===-1)out.push(this)});return $(out)};$.fn.attr=function(name,value){if(value===void 0)return this[0]?this[0].getAttribute(name):void 0;return this.each(function(){this.setAttribute(name,value)})};$.fn.prop=function(name,value){if(value===void 0)return this[0]?this[0][name]:void 0;return this.each(function(){this[name]=value})};$.fn.removeAttr=function(name){return this.each(function(){this.removeAttribute(name)})};$.fn.hasAttr=function(name){return!!(this[0]&&this[0].getAttribute(name)!=null)};var _dataCache=typeof WeakMap!=="undefined"?new WeakMap:null;function _dataStore(el,create){if(!_dataCache||!el||typeof el!=="object")return null;var s=_dataCache.get(el);if(!s&&create){s={};_dataCache.set(el,s)}return s}function _camel(k){return String(k).replace(/-([a-z])/g,function(_,c){return c.toUpperCase()})}function _parseDataAttr(v){if(v===void 0)return void 0;if(v==="true")return true;if(v==="false")return false;if(v==="null")return null;if(v!==""&&!isNaN(v)&&String(+v)===v)return+v;if(/^[\[{]/.test(v)){try{return JSON.parse(v)}catch(e){}}return v}$.fn.data=function(key,value){if(key&&typeof key==="object"){var obj=key;return this.each(function(){for(var k in obj)$(this).data(k,obj[k])})}if(value===void 0){var el=this[0];if(!el)return void 0;var store=_dataStore(el,false);var ds=el.dataset||{};if(key===void 0){var all={};for(var dk in ds)all[dk]=_parseDataAttr(ds[dk]);return Object.assign(all,store||{})}if(store&&Object.prototype.hasOwnProperty.call(store,key))return store[key];var ck=_camel(key);if(store&&Object.prototype.hasOwnProperty.call(store,ck))return store[ck];return _parseDataAttr(ds[ck])}return this.each(function(){var s=_dataStore(this,true);if(s)s[key]=value;if(this.dataset&&(value===null||typeof value!=="object")&&typeof value!=="function"){try{this.dataset[_camel(key)]=String(value)}catch(e){}}})};$.fn.removeData=function(key){return this.each(function(){var s=_dataStore(this,false);var keys=key===void 0?s?Object.keys(s):[]:String(key).split(/\s+/);for(var i=0;i<keys.length;i++){if(s){delete s[keys[i]];delete s[_camel(keys[i])]}if(this.dataset){try{delete this.dataset[_camel(keys[i])]}catch(e){}}}})};$.fn.val=function(value){if(value===void 0)return this[0]?this[0].value:void 0;return this.each(function(){this.value=value})};$.fn.html=function(value){if(value===void 0)return this[0]?this[0].innerHTML:void 0;if(typeof value!=="string"){var nodes=_normalizeAppendable([value]);return this.each(function(){this.innerHTML="";var self=this;nodes.forEach(function(n){self.appendChild(n)})})}return this.each(function(){this.innerHTML=value})};$.fn.text=function(value){if(value===void 0)return this[0]?this[0].textContent:"";return this.each(function(){this.textContent=value})};$.fn.css=function(name,value){if(typeof name==="object"){return this.each(function(){var el=this;for(var k in name)el.style[k]=name[k]})}if(value===void 0)return this[0]?getComputedStyle(this[0])[name]:void 0;return this.each(function(){this.style[name]=value})};$.fn.addClass=function(cls){var list=cls.split(/\s+/).filter(Boolean);return this.each(function(){this.classList.add.apply(this.classList,list)})};$.fn.removeClass=function(cls){var list=cls.split(/\s+/).filter(Boolean);return this.each(function(){this.classList.remove.apply(this.classList,list)})};$.fn.hasClass=function(cls){return!!(this[0]&&this[0].classList.contains(cls))};$.fn.toggleClass=function(cls,force){var list=cls.split(/\s+/).filter(Boolean);return this.each(function(){var el=this;list.forEach(function(c){el.classList.toggle(c,force)})})};$.fn.remove=function(){return this.each(function(){this.parentNode&&this.parentNode.removeChild(this)})};function _normalizeAppendable(args){var out=[];function add(item){if(item==null)return;if(Array.isArray(item)){item.forEach(add);return}if(item instanceof $){for(var i2=0;i2<item.length;i2++)add(item[i2]);return}if(typeof item==="string"){var tpl=document.createElement("template");tpl.innerHTML=item;while(tpl.content.firstChild)out.push(tpl.content.removeChild(tpl.content.firstChild));return}if(item instanceof Node){out.push(item);return}}for(var i=0;i<args.length;i++)add(args[i]);return out}$.fn.append=function(){if(arguments.length===1&&typeof arguments[0]==="string"){var html=arguments[0];return this.each(function(){this.insertAdjacentHTML("beforeend",html)})}var nodes=_normalizeAppendable(arguments);return this.each(function(){var self=this;nodes.forEach(function(n){self.appendChild(n)})})};$.fn.prepend=function(){if(arguments.length===1&&typeof arguments[0]==="string"){var html=arguments[0];return this.each(function(){this.insertAdjacentHTML("afterbegin",html)})}var nodes=_normalizeAppendable(arguments);return this.each(function(){var self=this;var ref=self.firstChild;nodes.forEach(function(n){self.insertBefore(n,ref)})})};$.fn.after=function(content){return this.each(function(){if(typeof content==="string")this.insertAdjacentHTML("afterend",content);else this.parentNode.insertBefore(content instanceof $?content[0]:content,this.nextSibling)})};$.fn.appendTo=function(target){$(target).append(this);return this};$.fn.width=function(){return this[0]?this[0].offsetWidth:0};$.fn.height=function(){return this[0]?this[0].offsetHeight:0};$.fn.innerHeight=function(){return this[0]?this[0].clientHeight:0};$.fn.innerWidth=function(){return this[0]?this[0].clientWidth:0};$.fn.scrollLeft=function(value){if(!this[0])return value===void 0?0:this;if(value===void 0)return this[0]===window?window.scrollX:this[0].scrollLeft;return this.each(function(){if(this===window)window.scrollTo(value,window.scrollY);else this.scrollLeft=value})};$.fn.scrollTop=function(value){if(!this[0])return value===void 0?0:this;if(value===void 0)return this[0]===window?window.scrollY:this[0].scrollTop;return this.each(function(){if(this===window)window.scrollTo(window.scrollX,value);else this.scrollTop=value})};$.fn.outerWidth=function(includeMargin){if(!this[0])return 0;var w=this[0].offsetWidth;if(includeMargin){var s=getComputedStyle(this[0]);w+=parseFloat(s.marginLeft||0)+parseFloat(s.marginRight||0)}return w};$.fn.outerHeight=function(includeMargin){if(!this[0])return 0;var h=this[0].offsetHeight;if(includeMargin){var s=getComputedStyle(this[0]);h+=parseFloat(s.marginTop||0)+parseFloat(s.marginBottom||0)}return h};$.fn.offset=function(){if(!this[0])return null;var rect=this[0].getBoundingClientRect();var docEl=document.documentElement;return{top:rect.top+(window.pageYOffset||docEl.scrollTop)-(docEl.clientTop||0),left:rect.left+(window.pageXOffset||docEl.scrollLeft)-(docEl.clientLeft||0)}};$.fn.parent=function(){return $(this[0]?this[0].parentElement:null)};$.fn.next=function(){return $(this[0]?this[0].nextElementSibling:null)};$.fn.closest=function(sel){return $(this[0]?this[0].closest(sel):null)};$.fn.find=function(sel){var out=[];if(sel&&typeof sel==="object"){var cands=toArray(sel instanceof $?sel:[sel]);var self=toArray(this);return $(cands.filter(function(c){return self.some(function(p){return p!==c&&p.contains(c)})}))}this.each(function(){var found=_jqSelect(this,sel);for(var i=0;i<found.length;i++)if(out.indexOf(found[i])===-1)out.push(found[i])});return $(out)};var JQUERY_PSEUDOS={":checkbox":function(el){return el.tagName==="INPUT"&&el.type==="checkbox"},":radio":function(el){return el.tagName==="INPUT"&&el.type==="radio"},":checked":function(el){return!!el.checked}};JQUERY_PSEUDOS[":selected"]=function(el){return!!el.selected};JQUERY_PSEUDOS[":visible"]=function(el){return!!(el.offsetWidth||el.offsetHeight||el.getClientRects().length)};JQUERY_PSEUDOS[":hidden"]=function(el){return!JQUERY_PSEUDOS[":visible"](el)};$.fn.is=function(sel){if(!this[0])return false;if(typeof sel==="function"){var s=this;return toArray(this).some(function(el,i){return sel.call(el,i,el)})}if(sel&&typeof sel==="object"){var set=toArray(sel instanceof $?sel:[sel]);return toArray(this).some(function(el){return set.indexOf(el)!==-1})}if(JQUERY_PSEUDOS[sel])return JQUERY_PSEUDOS[sel](this[0]);var rewritten=sel;for(var r=0;r<JQ_REWRITES.length;r++)rewritten=rewritten.replace(JQ_REWRITES[r][0],JQ_REWRITES[r][1]);try{return this[0].matches(rewritten)}catch(e){return false}};$.fn.ready=function(fn){if(document.readyState!=="loading")fn($);else document.addEventListener("DOMContentLoaded",function(){fn($)});return this};function _filterBySel(els,sel){if(!sel)return els;return els.filter(function(el){return $(el).is(sel)})}$.fn.eq=function(i){i=+i;if(i<0)i+=this.length;return $(this[i]?[this[i]]:[])};$.fn.first=function(){return this.eq(0)};$.fn.last=function(){return this.eq(-1)};$.fn.index=function(target){if(target===void 0){var el=this[0];if(!el||!el.parentElement)return-1;return toArray(el.parentElement.children).indexOf(el)}var node=target instanceof $?target[0]:typeof target==="string"?null:target;if(typeof target==="string")return toArray($(target)).indexOf(this[0]);return toArray(this).indexOf(node)};$.fn.add=function(sel,ctx){var out=toArray(this);toArray(typeof sel==="string"&&sel.trim()[0]!=="<"?$(sel,ctx):$(sel)).forEach(function(x){if(out.indexOf(x)===-1)out.push(x)});return $(out)};$.fn.children=function(sel){var out=[];this.each(function(){out.push.apply(out,toArray(this.children||[]))});return $(_filterBySel(out,sel))};$.fn.contents=function(){var out=[];this.each(function(){out.push.apply(out,toArray(this.childNodes||[]))});return $(out)};$.fn.siblings=function(sel){var out=[];this.each(function(){var me=this;if(!me.parentElement)return;toArray(me.parentElement.children).forEach(function(c){if(c!==me&&out.indexOf(c)===-1)out.push(c)})});return $(_filterBySel(out,sel))};$.fn.prev=function(sel){var out=[];this.each(function(){var p=this.previousElementSibling;if(p)out.push(p)});return $(_filterBySel(out,sel))};$.fn.prevAll=function(sel){var out=[];this.each(function(){var p=this.previousElementSibling;while(p){if(out.indexOf(p)===-1)out.push(p);p=p.previousElementSibling}});return $(_filterBySel(out,sel))};$.fn.nextAll=function(sel){var out=[];this.each(function(){var n=this.nextElementSibling;while(n){if(out.indexOf(n)===-1)out.push(n);n=n.nextElementSibling}});return $(_filterBySel(out,sel))};$.fn.parents=function(sel){var out=[];this.each(function(){var p=this.parentElement;while(p){if(out.indexOf(p)===-1)out.push(p);p=p.parentElement}});return $(_filterBySel(out,sel))};$.fn.filter=function(sel){var els=toArray(this);if(typeof sel==="function")return $(els.filter(function(el,i){return sel.call(el,i,el)}));return $(_filterBySel(els,sel))};$.fn.has=function(sel){return $(toArray(this).filter(function(el){return $(el).find(sel).length>0}))};$.fn.map=function(fn){var out=[];this.each(function(i,el){var r=fn.call(el,i,el);if(r!=null)Array.isArray(r)?out.push.apply(out,r):out.push(r)});return $(out)};$.fn.toArray=function(){return toArray(this)};function _isHidden(el){return el.style.display==="none"||window.getComputedStyle&&getComputedStyle(el).display==="none"}function _show(el){if(el.style.display==="none")el.style.display=el._lmOldDisplay||"";if(window.getComputedStyle&&getComputedStyle(el).display==="none")el.style.display=el._lmOldDisplay||"block"}function _hide(el){if(el.style.display&&el.style.display!=="none")el._lmOldDisplay=el.style.display;el.style.display="none"}function _timedArgs(a,b,c){var cb=[a,b,c].filter(function(x){return typeof x==="function"})[0];var ms=typeof a==="number"?a:a==="slow"?600:a==="fast"?200:a&&typeof a==="object"&&a.duration||0;return{ms,cb}}function _visibilityMethod(apply){return function(a,b,c){var t=_timedArgs(a,b,c),self=this;this.each(function(){apply(this)});if(t.cb)setTimeout(function(){self.each(function(){t.cb.call(this)})},t.ms);return this}}$.fn.show=_visibilityMethod(_show);$.fn.hide=_visibilityMethod(_hide);$.fn.fadeIn=$.fn.show;$.fn.fadeOut=$.fn.hide;$.fn.slideDown=$.fn.show;$.fn.slideUp=$.fn.hide;$.fn.toggle=function(state){if(typeof state==="boolean")return state?this.show():this.hide();var t=_timedArgs.apply(null,arguments),self=this;this.each(function(){_isHidden(this)?_show(this):_hide(this)});if(t.cb)setTimeout(function(){self.each(function(){t.cb.call(this)})},t.ms);return this};$.fn.fadeToggle=$.fn.toggle;$.fn.slideToggle=$.fn.toggle;$.fn.empty=function(){return this.each(function(){while(this.firstChild)this.removeChild(this.firstChild)})};$.fn.before=function(content){return this.each(function(){var t=this;_normalizeAppendable([content]).forEach(function(n){t.parentNode&&t.parentNode.insertBefore(n,t)})})};$.fn.wrap=function(wrapper){return this.each(function(){var w=_normalizeAppendable([wrapper]).filter(function(n){return n.nodeType===1})[0];if(!w||!this.parentNode)return;w=w.cloneNode(true);this.parentNode.insertBefore(w,this);var inner=w;while(inner.firstElementChild)inner=inner.firstElementChild;inner.appendChild(this)})};$.fn.unwrap=function(){var parents=[];this.each(function(){var p=this.parentElement;if(p&&p!==document.body&&parents.indexOf(p)===-1)parents.push(p)});parents.forEach(function(p){while(p.firstChild)p.parentNode.insertBefore(p.firstChild,p);p.parentNode.removeChild(p)});return this};$.fn.clone=function(){return $(toArray(this).map(function(el){return el.cloneNode(true)}))};$.fn.position=function(){var el=this[0];if(!el)return void 0;return{top:el.offsetTop,left:el.offsetLeft}};["ajaxStart","ajaxStop","ajaxSend","ajaxSuccess","ajaxError","ajaxComplete"].forEach(function(name){$.fn[name]=function(fn){return this.on(name,fn)}});var EVENT_NAME_MAP={touch:"touchstart",focus:"focusin",blur:"focusout"};var _eventBuses=typeof WeakMap!=="undefined"?new WeakMap:null;function _isNode(x){return x===window||x===document||typeof Node!=="undefined"&&x instanceof Node}function _isRealEventTarget(x){return x!=null&&typeof x.addEventListener==="function"&&typeof x.dispatchEvent==="function"}function _eventTargetFor(x){if(_isNode(x)||_isRealEventTarget(x))return x;if(!_eventBuses.has(x))_eventBuses.set(x,new EventTarget);return _eventBuses.get(x)}var AT_ATTR_SELECTOR=/^\[\\@([\w-]+)\]$/;function _callHandler(handler,ctx,e){var extra=e.__lmArgs;if(extra===void 0)return handler.call(ctx,e);return handler.apply(ctx,[e].concat(Array.isArray(extra)?extra:[extra]))}$.fn.on=function(events,selector,data,handler){if(typeof selector==="function"){handler=selector;selector=null}else if(typeof data==="function"&&handler===void 0){handler=data}else if(typeof handler!=="function"&&typeof data==="function"){handler=data}if(typeof selector!=="string")selector=null;if(typeof handler!=="function")return this;var evts=String(events).split(/\s+/).filter(Boolean);var atParts=selector?selector.split(",").map(function(p){return p.trim()}):[];var atAttrs=atParts.length&&atParts.every(function(p){return AT_ATTR_SELECTOR.test(p)})?atParts.map(function(p){return"@"+AT_ATTR_SELECTOR.exec(p)[1]}):null;var atAttr=!!atAttrs;function _hasAnyAt(el){for(var i=0;i<atAttrs.length;i++)if(el.getAttribute(atAttrs[i])!=null)return true;return false}return this.each(function(){var node=this;var bus=_eventTargetFor(node);evts.forEach(function(evtFull){var dot=evtFull.indexOf(".");var evt=dot===-1?evtFull:evtFull.slice(0,dot);var ns=dot===-1?"":evtFull.slice(dot+1);if(!evt)return;function listen(realName,wrapper){bus.addEventListener(realName,wrapper);_recordListener(bus,{type:evt,ns,selector,handler,real:realName,wrapper})}if(evt==="mouseenter"||evt==="mouseleave"){var realType=evt==="mouseenter"?"mouseover":"mouseout";listen(realType,function(e){var related=e.relatedTarget;if(atAttr){var el=e.target;var match=null;while(el&&el.nodeType===1){if(_hasAnyAt(el)){match=el;break}el=el.parentElement}if(match&&node.contains(match)&&!(related&&match.contains(related))){_callHandler(handler,match,e)}}else if(selector&&_isNode(node)){var match2=e.target.closest(selector);if(match2&&node.contains(match2)&&!(related&&match2.contains(related))){_callHandler(handler,match2,e)}}else if(!(related&&node.contains(related))){_callHandler(handler,node,e)}});return}var real=EVENT_NAME_MAP[evt]||evt;listen(real,function(e){if(atAttr||selector&&_isNode(node)){for(var el=e.target;el&&el.nodeType===1&&node.contains(el);el=el.parentElement){var hit=atAttr?_hasAnyAt(el):el.matches&&el.matches(selector);if(!hit)continue;var ret=_callHandler(handler,el,e);if(ret===false){e.preventDefault();e.stopPropagation()}if(e.cancelBubble)break}}else{_callHandler(handler,node,e)}})})})};$.fn.live=function(events,data,handler){if(this.selector&&typeof this.selector==="string")$(document).on(events,this.selector,data,handler);else this.on(events,data,handler);return this};$.fn.click=function(handler){return handler?this.on("click",handler):this.trigger("click")};$.fn.keydown=function(handler){return handler?this.on("keydown",handler):this.trigger("keydown")};$.fn.trigger=function(type,data){return this.each(function(){var bus=_eventTargetFor(this);var ev;if(type instanceof Event){ev=type}else if(type&&typeof type==="object"&&typeof type.type==="string"){ev=new Event(type.type,{bubbles:_isNode(this)});for(var k in type){if(k!=="type"&&Object.prototype.hasOwnProperty.call(type,k)){try{ev[k]=type[k]}catch(e){}}}}else{ev=new Event(type,{bubbles:_isNode(this)})}if(data!==void 0){ev.__lmArgs=data;try{if(ev.detail===void 0||ev.detail===null)ev.detail=data}catch(e){}}bus.dispatchEvent(ev)})};var _listenerRegistry=typeof WeakMap!=="undefined"?new WeakMap:null;function _recordListener(bus,rec){if(!_listenerRegistry)return;var list=_listenerRegistry.get(bus);if(!list){list=[];_listenerRegistry.set(bus,list)}list.push(rec)}$.fn.off=function(events,selector,handler){if(typeof selector==="function"){handler=selector;selector=void 0}var specs=events===void 0?[{type:"",ns:""}]:String(events).split(/\s+/).filter(Boolean).map(function(e){var d=e.indexOf(".");return{type:d===-1?e:e.slice(0,d),ns:d===-1?"":e.slice(d+1)}});return this.each(function(){if(!_listenerRegistry)return;var bus=_eventTargetFor(this);var list=_listenerRegistry.get(bus);if(!list)return;for(var i=list.length-1;i>=0;i--){var r=list[i];var hit=specs.some(function(sp){return(!sp.type||sp.type===r.type)&&(!sp.ns||sp.ns===r.ns)});if(!hit)continue;if(selector!==void 0&&selector!=="**"&&r.selector!==selector)continue;if(handler&&r.handler!==handler)continue;bus.removeEventListener(r.real,r.wrapper);list.splice(i,1)}})};$.fn.unbind=function(events,handler){return this.off(events,handler)};$.fn.bind=function(events,data,handler){return this.on(events,null,data,handler)};$.fn.one=function(events,selector,data,handler){var args=[].slice.call(arguments),fn=null,idx=-1;for(var i=args.length-1;i>=0;i--)if(typeof args[i]==="function"){fn=args[i];idx=i;break}if(!fn)return this;var self=this;args[idx]=function once(e){self.off(events,once);return fn.apply(this,arguments)};return this.on.apply(this,args)};$.fn.die=function(events,handler){if(this.selector&&typeof this.selector==="string")$(document).off(events,this.selector,handler);return this};["click","dblclick","keyup","keydown","keypress","focus","blur","change","submit","focusin","focusout","mouseenter","mouseleave","mouseover","mouseout","mousedown","mouseup","mousemove","resize","scroll","load","select"].forEach(function(name){$.fn[name]=function(handler){return handler?this.on(name,handler):this.trigger(name)}});$.fn.hover=function(enter,leave){this.on("mouseenter",enter);this.on("mouseleave",leave||enter);return this};var _animTimers=new WeakMap;function _animGetScroll(el,prop){if(el===window)return prop==="scrollLeft"?window.pageXOffset:window.pageYOffset;return el[prop]}function _animSetScroll(el,prop,val){if(el===window){if(prop==="scrollLeft")window.scrollTo(val,window.pageYOffset);else window.scrollTo(window.pageXOffset,val)}else{el[prop]=val}}var _cssNumberProps={opacity:1,zIndex:1,zoom:1,fontWeight:1,lineHeight:1,columnCount:1,flexGrow:1,flexShrink:1,order:1,widows:1,orphans:1};function _animSetStyle(el,prop,val){el.style[prop]=_cssNumberProps[prop]?val:val+"px"}$.fn.animate=function(props,options){var opts=typeof options==="number"?{duration:options}:options||{};var duration=opts.duration==null?400:opts.duration;this.each(function(){var el=this;var isWindowScroll=el===document.documentElement||el===document.body;var target=isWindowScroll?window:el;var start={};var isScrollProp={};for(var prop in props){if(!Object.prototype.hasOwnProperty.call(props,prop))continue;isScrollProp[prop]=prop==="scrollTop"||prop==="scrollLeft";if(isScrollProp[prop]){start[prop]=_animGetScroll(isWindowScroll?window:el,prop)}else{start[prop]=parseFloat(getComputedStyle(el)[prop])||0}}var existing=_animTimers.get(el);if(existing)cancelAnimationFrame(existing);if(duration===0){for(var p in props){var v=parseFloat(props[p]);if(isScrollProp[p])_animSetScroll(isWindowScroll?window:el,p,v);else _animSetStyle(el,p,v)}if(opts.complete)opts.complete.call(el);return}var startTime=null;function step(ts){if(startTime===null)startTime=ts;var elapsed=ts-startTime;var t=Math.min(1,elapsed/duration);for(var p2 in props){if(!Object.prototype.hasOwnProperty.call(props,p2))continue;var end=parseFloat(props[p2]);var val=start[p2]+(end-start[p2])*t;if(isScrollProp[p2])_animSetScroll(isWindowScroll?window:el,p2,val);else _animSetStyle(el,p2,val)}if(t<1){_animTimers.set(el,requestAnimationFrame(step))}else{_animTimers.delete(el);if(opts.complete)opts.complete.call(el)}}_animTimers.set(el,requestAnimationFrame(step))});return this};$.fn.stop=function(){this.each(function(){var id=_animTimers.get(this);if(id){cancelAnimationFrame(id);_animTimers.delete(this)}});return this};var _queues=new WeakMap;function _getQueue(el,name){var byName=_queues.get(el);if(!byName){byName={};_queues.set(el,byName)}if(!byName[name])byName[name]={items:[],running:false};return byName[name]}function _dequeue(el,name){var q=_getQueue(el,name);if(q.running)return;var next=q.items.shift();if(!next)return;q.running=true;next.call(el,function(){q.running=false;_dequeue(el,name)})}$.fn.queue=function(name,fn){if(typeof name==="function"){fn=name;name="fx"}name=name||"fx";if(fn===void 0)return _getQueue(this[0],name).items;return this.each(function(){_getQueue(this,name).items.push(fn);_dequeue(this,name)})};$.fn.dequeue=function(name){return this.each(function(){_dequeue(this,name||"fx")})};$.fn.delay=function(ms,name){name=name||"fx";return this.each(function(){_getQueue(this,name).items.push(function(next){setTimeout(next,ms)});_dequeue(this,name)})};$.fn.serializeArray=function(){var result=[];this.each(function(){if(this.tagName!=="FORM")return;var elements=this.elements?Array.prototype.slice.call(this.elements):[];elements.forEach(function(field){if(!field.name||field.disabled)return;var tag=field.tagName.toLowerCase();var type=(field.type||tag).toLowerCase();if(type==="submit"||type==="button"||type==="reset"||type==="fieldset")return;if((type==="checkbox"||type==="radio")&&!field.checked)return;if(type==="file"){var files=field.files?Array.prototype.map.call(field.files,function(f){return f.name}):[];result.push({name:field.name,value:files,type});return}if(tag==="select"&&field.multiple){Array.prototype.forEach.call(field.selectedOptions||[],function(opt){result.push({name:field.name,value:opt.value,type})});return}result.push({name:field.name,value:field.value,type})})});return result};$.fn.ajaxForm=function(options){options=options||{};return this.each(function(){var formEl=this;var $form=$(formEl);formEl.addEventListener("submit",function(ev){ev.preventDefault();var formData=$form.serializeArray();if(typeof options.beforeSubmit==="function"){options.beforeSubmit(formData,$form,options)}})})};if(!global.jQuery||!global.jQuery.fn||global.jQuery.fn.jquery==="lumenjs-shim"){global.$=$;global.jQuery=$}})(typeof window!=="undefined"?window:globalThis);
2
+ (function(global){function toArray(x){if(x==null)return[];if(typeof NodeList!=="undefined"&&x instanceof NodeList)return Array.prototype.slice.call(x);if(typeof HTMLCollection!=="undefined"&&x instanceof HTMLCollection)return Array.prototype.slice.call(x);if(Array.isArray(x))return x;if(x instanceof $)return Array.prototype.slice.call(x);return[x]}var JQ_POSITIONAL=/:(first|last|even|odd|eq\((-?\d+)\)|gt\((-?\d+)\)|lt\((-?\d+)\))(?![-\w])/;var JQ_REWRITES=[[/:checkbox(?![-\w])/g,'[type="checkbox"]'],[/:radio(?![-\w])/g,'[type="radio"]'],[/:selected(?![-\w])/g,":checked"],[/:password(?![-\w])/g,'[type="password"]'],[/:text(?![-\w])/g,'[type="text"]'],[/:submit(?![-\w])/g,'[type="submit"]'],[/:file(?![-\w])/g,'[type="file"]'],[/:button(?![-\w])/g,"button"]];function _splitTopLevel(sel,ch){var out=[],depth=0,quote=null,cur="";for(var i=0;i<sel.length;i++){var c=sel[i];if(quote){if(c===quote)quote=null;cur+=c;continue}if(c==='"'||c==="'"){quote=c;cur+=c;continue}if(c==="("||c==="[")depth++;else if(c===")"||c==="]")depth--;if(c===ch&&depth===0){out.push(cur);cur="";continue}cur+=c}out.push(cur);return out}function _applyPositional(els,m){var n=els.length;if(m[1]==="first")return els.slice(0,1);if(m[1]==="last")return n?els.slice(n-1):[];if(m[1]==="even")return els.filter(function(_,i2){return i2%2===0});if(m[1]==="odd")return els.filter(function(_,i2){return i2%2===1});if(m[2]!==void 0){var i=+m[2];if(i<0)i+=n;return els[i]?[els[i]]:[]}if(m[3]!==void 0){var g=+m[3];if(g<0)g+=n;return els.slice(g+1)}var l=+m[4];if(l<0)l+=n;return els.slice(0,Math.max(0,l))}function _jqSelect(root,selector){var sel=selector;for(var r=0;r<JQ_REWRITES.length;r++)sel=sel.replace(JQ_REWRITES[r][0],JQ_REWRITES[r][1]);if(!JQ_POSITIONAL.test(sel))return toArray(root.querySelectorAll(sel));var out=[];_splitTopLevel(sel,",").forEach(function(part){var rest=part.trim(),current=null;while(rest.length){var m=JQ_POSITIONAL.exec(rest);var css=m?rest.slice(0,m.index):rest;if(css.trim()){if(current===null)current=toArray(root.querySelectorAll(css));else{var next=[];var scoped=/^\s*[>+~]/.test(css)?":scope"+css:":scope "+css.replace(/^\s+/,"");current.forEach(function(el){toArray(el.querySelectorAll(scoped)).forEach(function(x){if(next.indexOf(x)===-1)next.push(x)})});current=next}}else if(current===null)current=toArray(root.querySelectorAll("*"));if(!m)break;current=_applyPositional(current,m);rest=rest.slice(m.index+m[0].length)}(current||[]).forEach(function(x){if(out.indexOf(x)===-1)out.push(x)})});return out}function $(selector,context){if(!(this instanceof $))return new $(selector,context);if(typeof selector==="function")return $(document).ready(selector);var els=[];var sel=void 0;if(!selector){els=[]}else if(typeof selector==="string"){var trimmed=selector.trim();if(trimmed[0]==="<"){var tpl=document.createElement("template");tpl.innerHTML=trimmed;els=toArray(tpl.content.childNodes).filter(function(n){return n.nodeType===1})}else{sel=selector;var root=context?context instanceof $?context[0]:context:document;var atParts=selector.split(",").map(function(s){return s.trim()});var isAllAtAttrs=atParts.length>0&&atParts.every(function(p){return/^\[\\@[\w-]+\]$/.test(p)});if(isAllAtAttrs){var names=atParts.map(function(p){return"@"+/^\[\\@([\w-]+)\]$/.exec(p)[1]});var all=root?toArray(root.querySelectorAll("*")):[];els=all.filter(function(el){return names.some(function(n){return el.getAttribute(n)!=null})})}else{els=root?_jqSelect(root,selector):[]}}}else{els=toArray(selector)}for(var i=0;i<els.length;i++)this[i]=els[i];this.length=els.length;this.selector=sel;return this}$.fn=$.prototype;$.fn.jquery="lumenjs-shim";$.fn.extend=function(methods){for(var k in methods)if(Object.prototype.hasOwnProperty.call(methods,k))$.fn[k]=methods[k];return $};$.extend=function(target){for(var i=1;i<arguments.length;i++){var src=arguments[i];for(var k in src)if(Object.prototype.hasOwnProperty.call(src,k))target[k]=src[k]}return target};$.Event=function(type,props){var e=typeof type==="string"?new Event(type,{bubbles:true,cancelable:true}):type;if(props)for(var k in props)e[k]=props[k];return e};$.proxy=function(fn,context){return fn.bind(context)};$.trim=function(s){return(s==null?"":String(s)).trim()};$.inArray=function(val,arr){return Array.prototype.indexOf.call(arr,val)};function isArrayLike(obj){if(Array.isArray(obj)||obj instanceof $)return true;var length=obj&&typeof obj==="object"&&obj.length;return typeof length==="number"&&(length===0||length-1 in obj)}$.each=function(arr,fn){if(isArrayLike(arr)){for(var i=0;i<arr.length;i++)if(fn.call(arr[i],i,arr[i])===false)break}else{for(var k in arr)if(fn.call(arr[k],k,arr[k])===false)break}return arr};$.map=function(arr,fn){var out=[];var src=Array.isArray(arr)||arr instanceof $?arr:Object.keys(arr||{}).map(function(k){return arr[k]});for(var i=0;i<src.length;i++){var r=fn(src[i],i);if(r===null||r===void 0)continue;if(Array.isArray(r))out.push.apply(out,r);else out.push(r)}return out};var _ajaxActive=0;$.param=function(obj){var parts=[];function add(k2,v){if(v&&typeof v==="object"){for(var kk in v)if(Object.prototype.hasOwnProperty.call(v,kk))add(k2+"["+(Array.isArray(v)?"":kk)+"]",v[kk])}else parts.push(encodeURIComponent(k2)+"="+encodeURIComponent(v==null?"":v))}for(var k in obj)if(Object.prototype.hasOwnProperty.call(obj,k))add(k,obj[k]);return parts.join("&")};$.ajax=function(url,opts){if(typeof url==="object"){opts=url;url=opts.url}opts=opts||{};var method=(opts.method||opts.type||"GET").toUpperCase();var headers=Object.assign({},opts.headers||{});var init={method,headers};var data=opts.data;var isJson=/json/i.test(opts.contentType||"");if(data!=null&&method==="GET"){var qs=typeof data==="string"?data:$.param(data);if(qs)url+=(url.indexOf("?")===-1?"?":"&")+qs}else if(data!=null){if(typeof data==="string"||typeof FormData!=="undefined"&&data instanceof FormData)init.body=data;else if(isJson)init.body=JSON.stringify(data);else{init.body=$.param(data);if(!headers["Content-Type"])headers["Content-Type"]="application/x-www-form-urlencoded; charset=UTF-8"}if(isJson&&!headers["Content-Type"])headers["Content-Type"]=opts.contentType}if(_ajaxActive===0)$(document).trigger("ajaxStart");_ajaxActive++;$(document).trigger("ajaxSend");var p=fetch(url,init).then(function(res){var ct=res.headers.get("content-type")||"";return ct.indexOf("json")>-1?res.json():res.text()}).then(function(data2){opts.success&&opts.success(data2);$(document).trigger("ajaxSuccess");return data2}).catch(function(err){opts.error&&opts.error(err);$(document).trigger("ajaxError");throw err}).finally(function(){_ajaxActive--;$(document).trigger("ajaxComplete");if(_ajaxActive===0)$(document).trigger("ajaxStop")});p.done=function(fn){p.then(fn,function(){});return p};p.fail=function(fn){p.catch(fn);return p};p.always=function(fn){p.then(fn,fn);return p};return p};function _shorthand(method){return function(url,data,success,dataType){if(typeof data==="function"){dataType=success;success=data;data=void 0}return $.ajax({url,method,data,success,dataType})}}$.get=_shorthand("GET");$.post=_shorthand("POST");$.getJSON=function(url,data,success){return $.get(url,data,success,"json")};$.parseJSON=function(s){return JSON.parse(s)};$.isArray=Array.isArray;$.isFunction=function(f){return typeof f==="function"};$.noop=function(){};$.fn.each=function(fn){for(var i=0;i<this.length;i++)if(fn.call(this[i],i,this[i])===false)break;return this};$.fn.get=function(i){return i===void 0?toArray(this):this[i]};$.fn.not=function(exclude){var excludeArr=exclude instanceof $?toArray(exclude):Array.isArray(exclude)?exclude:[exclude];var out=[];this.each(function(){if(excludeArr.indexOf(this)===-1)out.push(this)});return $(out)};$.fn.attr=function(name,value){if(value===void 0)return this[0]?this[0].getAttribute(name):void 0;return this.each(function(){this.setAttribute(name,value)})};$.fn.prop=function(name,value){if(value===void 0)return this[0]?this[0][name]:void 0;return this.each(function(){this[name]=value})};$.fn.removeAttr=function(name){return this.each(function(){this.removeAttribute(name)})};$.fn.hasAttr=function(name){return!!(this[0]&&this[0].getAttribute(name)!=null)};var _dataCache=typeof WeakMap!=="undefined"?new WeakMap:null;function _dataStore(el,create){if(!_dataCache||!el||typeof el!=="object")return null;var s=_dataCache.get(el);if(!s&&create){s={};_dataCache.set(el,s)}return s}function _camel(k){return String(k).replace(/-([a-z])/g,function(_,c){return c.toUpperCase()})}function _parseDataAttr(v){if(v===void 0)return void 0;if(v==="true")return true;if(v==="false")return false;if(v==="null")return null;if(v!==""&&!isNaN(v)&&String(+v)===v)return+v;if(/^[\[{]/.test(v)){try{return JSON.parse(v)}catch(e){}}return v}$.fn.data=function(key,value){if(key&&typeof key==="object"){var obj=key;return this.each(function(){for(var k in obj)$(this).data(k,obj[k])})}if(value===void 0){var el=this[0];if(!el)return void 0;var store=_dataStore(el,false);var ds=el.dataset||{};if(key===void 0){var all={};for(var dk in ds)all[dk]=_parseDataAttr(ds[dk]);return Object.assign(all,store||{})}if(store&&Object.prototype.hasOwnProperty.call(store,key))return store[key];var ck=_camel(key);if(store&&Object.prototype.hasOwnProperty.call(store,ck))return store[ck];return _parseDataAttr(ds[ck])}return this.each(function(){var s=_dataStore(this,true);if(s)s[key]=value;if(this.dataset&&(value===null||typeof value!=="object")&&typeof value!=="function"){try{this.dataset[_camel(key)]=String(value)}catch(e){}}})};$.fn.removeData=function(key){return this.each(function(){var s=_dataStore(this,false);var keys=key===void 0?s?Object.keys(s):[]:String(key).split(/\s+/);for(var i=0;i<keys.length;i++){if(s){delete s[keys[i]];delete s[_camel(keys[i])]}if(this.dataset){try{delete this.dataset[_camel(keys[i])]}catch(e){}}}})};$.fn.val=function(value){if(value===void 0)return this[0]?this[0].value:void 0;return this.each(function(){this.value=value})};$.fn.html=function(value){if(value===void 0)return this[0]?this[0].innerHTML:void 0;if(typeof value!=="string"){var nodes=_normalizeAppendable([value]);return this.each(function(){this.innerHTML="";var self=this;nodes.forEach(function(n){self.appendChild(n)})})}return this.each(function(){this.innerHTML=value})};$.fn.text=function(value){if(value===void 0)return this[0]?this[0].textContent:"";return this.each(function(){this.textContent=value})};$.fn.css=function(name,value){if(typeof name==="object"){return this.each(function(){var el=this;for(var k in name)el.style[k]=name[k]})}if(value===void 0)return this[0]?getComputedStyle(this[0])[name]:void 0;return this.each(function(){this.style[name]=value})};$.fn.addClass=function(cls){var list=cls.split(/\s+/).filter(Boolean);return this.each(function(){this.classList.add.apply(this.classList,list)})};$.fn.removeClass=function(cls){var list=cls.split(/\s+/).filter(Boolean);return this.each(function(){this.classList.remove.apply(this.classList,list)})};$.fn.hasClass=function(cls){return!!(this[0]&&this[0].classList.contains(cls))};$.fn.toggleClass=function(cls,force){var list=cls.split(/\s+/).filter(Boolean);return this.each(function(){var el=this;list.forEach(function(c){el.classList.toggle(c,force)})})};$.fn.remove=function(){return this.each(function(){this.parentNode&&this.parentNode.removeChild(this)})};function _normalizeAppendable(args){var out=[];function add(item){if(item==null)return;if(Array.isArray(item)){item.forEach(add);return}if(item instanceof $){for(var i2=0;i2<item.length;i2++)add(item[i2]);return}if(typeof item==="string"){var tpl=document.createElement("template");tpl.innerHTML=item;while(tpl.content.firstChild)out.push(tpl.content.removeChild(tpl.content.firstChild));return}if(item instanceof Node){out.push(item);return}}for(var i=0;i<args.length;i++)add(args[i]);return out}$.fn.append=function(){if(arguments.length===1&&typeof arguments[0]==="string"){var html=arguments[0];return this.each(function(){this.insertAdjacentHTML("beforeend",html)})}var nodes=_normalizeAppendable(arguments);return this.each(function(){var self=this;nodes.forEach(function(n){self.appendChild(n)})})};$.fn.prepend=function(){if(arguments.length===1&&typeof arguments[0]==="string"){var html=arguments[0];return this.each(function(){this.insertAdjacentHTML("afterbegin",html)})}var nodes=_normalizeAppendable(arguments);return this.each(function(){var self=this;var ref=self.firstChild;nodes.forEach(function(n){self.insertBefore(n,ref)})})};$.fn.after=function(content){return this.each(function(){if(typeof content==="string")this.insertAdjacentHTML("afterend",content);else this.parentNode.insertBefore(content instanceof $?content[0]:content,this.nextSibling)})};$.fn.appendTo=function(target){$(target).append(this);return this};$.fn.width=function(){return this[0]?this[0].offsetWidth:0};$.fn.height=function(){return this[0]?this[0].offsetHeight:0};$.fn.innerHeight=function(){return this[0]?this[0].clientHeight:0};$.fn.innerWidth=function(){return this[0]?this[0].clientWidth:0};$.fn.scrollLeft=function(value){if(!this[0])return value===void 0?0:this;if(value===void 0)return this[0]===window?window.scrollX:this[0].scrollLeft;return this.each(function(){if(this===window)window.scrollTo(value,window.scrollY);else this.scrollLeft=value})};$.fn.scrollTop=function(value){if(!this[0])return value===void 0?0:this;if(value===void 0)return this[0]===window?window.scrollY:this[0].scrollTop;return this.each(function(){if(this===window)window.scrollTo(window.scrollX,value);else this.scrollTop=value})};$.fn.outerWidth=function(includeMargin){if(!this[0])return 0;var w=this[0].offsetWidth;if(includeMargin){var s=getComputedStyle(this[0]);w+=parseFloat(s.marginLeft||0)+parseFloat(s.marginRight||0)}return w};$.fn.outerHeight=function(includeMargin){if(!this[0])return 0;var h=this[0].offsetHeight;if(includeMargin){var s=getComputedStyle(this[0]);h+=parseFloat(s.marginTop||0)+parseFloat(s.marginBottom||0)}return h};$.fn.offset=function(){if(!this[0])return null;var rect=this[0].getBoundingClientRect();var docEl=document.documentElement;return{top:rect.top+(window.pageYOffset||docEl.scrollTop)-(docEl.clientTop||0),left:rect.left+(window.pageXOffset||docEl.scrollLeft)-(docEl.clientLeft||0)}};$.fn.parent=function(){return $(this[0]?this[0].parentElement:null)};$.fn.next=function(){return $(this[0]?this[0].nextElementSibling:null)};$.fn.closest=function(sel){return $(this[0]?this[0].closest(sel):null)};$.fn.find=function(sel){var out=[];if(sel&&typeof sel==="object"){var cands=toArray(sel instanceof $?sel:[sel]);var self=toArray(this);return $(cands.filter(function(c){return self.some(function(p){return p!==c&&p.contains(c)})}))}this.each(function(){var found=_jqSelect(this,sel);for(var i=0;i<found.length;i++)if(out.indexOf(found[i])===-1)out.push(found[i])});return $(out)};var JQUERY_PSEUDOS={":checkbox":function(el){return el.tagName==="INPUT"&&el.type==="checkbox"},":radio":function(el){return el.tagName==="INPUT"&&el.type==="radio"},":checked":function(el){return!!el.checked}};JQUERY_PSEUDOS[":selected"]=function(el){return!!el.selected};JQUERY_PSEUDOS[":visible"]=function(el){return!!(el.offsetWidth||el.offsetHeight||el.getClientRects().length)};JQUERY_PSEUDOS[":hidden"]=function(el){return!JQUERY_PSEUDOS[":visible"](el)};$.fn.is=function(sel){if(!this[0])return false;if(typeof sel==="function"){var s=this;return toArray(this).some(function(el,i){return sel.call(el,i,el)})}if(sel&&typeof sel==="object"){var set=toArray(sel instanceof $?sel:[sel]);return toArray(this).some(function(el){return set.indexOf(el)!==-1})}if(JQUERY_PSEUDOS[sel])return JQUERY_PSEUDOS[sel](this[0]);var rewritten=sel;for(var r=0;r<JQ_REWRITES.length;r++)rewritten=rewritten.replace(JQ_REWRITES[r][0],JQ_REWRITES[r][1]);try{return this[0].matches(rewritten)}catch(e){return false}};$.fn.ready=function(fn){if(document.readyState!=="loading")fn($);else document.addEventListener("DOMContentLoaded",function(){fn($)});return this};function _filterBySel(els,sel){if(!sel)return els;return els.filter(function(el){return $(el).is(sel)})}$.fn.eq=function(i){i=+i;if(i<0)i+=this.length;return $(this[i]?[this[i]]:[])};$.fn.first=function(){return this.eq(0)};$.fn.last=function(){return this.eq(-1)};$.fn.index=function(target){if(target===void 0){var el=this[0];if(!el||!el.parentElement)return-1;return toArray(el.parentElement.children).indexOf(el)}var node=target instanceof $?target[0]:typeof target==="string"?null:target;if(typeof target==="string")return toArray($(target)).indexOf(this[0]);return toArray(this).indexOf(node)};$.fn.add=function(sel,ctx){var out=toArray(this);toArray(typeof sel==="string"&&sel.trim()[0]!=="<"?$(sel,ctx):$(sel)).forEach(function(x){if(out.indexOf(x)===-1)out.push(x)});return $(out)};$.fn.children=function(sel){var out=[];this.each(function(){out.push.apply(out,toArray(this.children||[]))});return $(_filterBySel(out,sel))};$.fn.contents=function(){var out=[];this.each(function(){out.push.apply(out,toArray(this.childNodes||[]))});return $(out)};$.fn.siblings=function(sel){var out=[];this.each(function(){var me=this;if(!me.parentElement)return;toArray(me.parentElement.children).forEach(function(c){if(c!==me&&out.indexOf(c)===-1)out.push(c)})});return $(_filterBySel(out,sel))};$.fn.prev=function(sel){var out=[];this.each(function(){var p=this.previousElementSibling;if(p)out.push(p)});return $(_filterBySel(out,sel))};$.fn.prevAll=function(sel){var out=[];this.each(function(){var p=this.previousElementSibling;while(p){if(out.indexOf(p)===-1)out.push(p);p=p.previousElementSibling}});return $(_filterBySel(out,sel))};$.fn.nextAll=function(sel){var out=[];this.each(function(){var n=this.nextElementSibling;while(n){if(out.indexOf(n)===-1)out.push(n);n=n.nextElementSibling}});return $(_filterBySel(out,sel))};$.fn.parents=function(sel){var out=[];this.each(function(){var p=this.parentElement;while(p){if(out.indexOf(p)===-1)out.push(p);p=p.parentElement}});return $(_filterBySel(out,sel))};$.fn.filter=function(sel){var els=toArray(this);if(typeof sel==="function")return $(els.filter(function(el,i){return sel.call(el,i,el)}));return $(_filterBySel(els,sel))};$.fn.has=function(sel){return $(toArray(this).filter(function(el){return $(el).find(sel).length>0}))};$.fn.map=function(fn){var out=[];this.each(function(i,el){var r=fn.call(el,i,el);if(r!=null)Array.isArray(r)?out.push.apply(out,r):out.push(r)});return $(out)};$.fn.toArray=function(){return toArray(this)};function _isHidden(el){return el.style.display==="none"||window.getComputedStyle&&getComputedStyle(el).display==="none"}function _show(el){if(el.style.display==="none")el.style.display=el._lmOldDisplay||"";if(window.getComputedStyle&&getComputedStyle(el).display==="none")el.style.display=el._lmOldDisplay||"block"}function _hide(el){if(el.style.display&&el.style.display!=="none")el._lmOldDisplay=el.style.display;el.style.display="none"}function _timedArgs(a,b,c){var cb=[a,b,c].filter(function(x){return typeof x==="function"})[0];var ms=typeof a==="number"?a:a==="slow"?600:a==="fast"?200:a&&typeof a==="object"&&a.duration||0;return{ms,cb}}function _visibilityMethod(apply){return function(a,b,c){var t=_timedArgs(a,b,c),self=this;this.each(function(){apply(this)});if(t.cb)setTimeout(function(){self.each(function(){t.cb.call(this)})},t.ms);return this}}$.fn.show=_visibilityMethod(_show);$.fn.hide=_visibilityMethod(_hide);$.fn.fadeIn=$.fn.show;$.fn.fadeOut=$.fn.hide;$.fn.slideDown=$.fn.show;$.fn.slideUp=$.fn.hide;$.fn.toggle=function(state){if(typeof state==="boolean")return state?this.show():this.hide();var t=_timedArgs.apply(null,arguments),self=this;this.each(function(){_isHidden(this)?_show(this):_hide(this)});if(t.cb)setTimeout(function(){self.each(function(){t.cb.call(this)})},t.ms);return this};$.fn.fadeToggle=$.fn.toggle;$.fn.slideToggle=$.fn.toggle;$.fn.empty=function(){return this.each(function(){while(this.firstChild)this.removeChild(this.firstChild)})};$.fn.before=function(content){return this.each(function(){var t=this;_normalizeAppendable([content]).forEach(function(n){t.parentNode&&t.parentNode.insertBefore(n,t)})})};$.fn.wrap=function(wrapper){return this.each(function(){var w=_normalizeAppendable([wrapper]).filter(function(n){return n.nodeType===1})[0];if(!w||!this.parentNode)return;w=w.cloneNode(true);this.parentNode.insertBefore(w,this);var inner=w;while(inner.firstElementChild)inner=inner.firstElementChild;inner.appendChild(this)})};$.fn.unwrap=function(){var parents=[];this.each(function(){var p=this.parentElement;if(p&&p!==document.body&&parents.indexOf(p)===-1)parents.push(p)});parents.forEach(function(p){while(p.firstChild)p.parentNode.insertBefore(p.firstChild,p);p.parentNode.removeChild(p)});return this};$.fn.clone=function(){return $(toArray(this).map(function(el){return el.cloneNode(true)}))};$.fn.position=function(){var el=this[0];if(!el)return void 0;return{top:el.offsetTop,left:el.offsetLeft}};["ajaxStart","ajaxStop","ajaxSend","ajaxSuccess","ajaxError","ajaxComplete"].forEach(function(name){$.fn[name]=function(fn){return this.on(name,fn)}});var EVENT_NAME_MAP={focus:"focusin",blur:"focusout"};var _eventBuses=typeof WeakMap!=="undefined"?new WeakMap:null;function _isNode(x){return x===window||x===document||typeof Node!=="undefined"&&x instanceof Node}function _isRealEventTarget(x){return x!=null&&typeof x.addEventListener==="function"&&typeof x.dispatchEvent==="function"}function _eventTargetFor(x){if(_isNode(x)||_isRealEventTarget(x))return x;if(!_eventBuses.has(x))_eventBuses.set(x,new EventTarget);return _eventBuses.get(x)}var AT_ATTR_SELECTOR=/^\[\\@([\w-]+)\]$/;function _callHandler(handler,ctx,e){var extra=e.__lmArgs;if(extra===void 0)return handler.call(ctx,e);return handler.apply(ctx,[e].concat(Array.isArray(extra)?extra:[extra]))}$.fn.on=function(events,selector,data,handler){if(typeof selector==="function"){handler=selector;selector=null}else if(typeof data==="function"&&handler===void 0){handler=data}else if(typeof handler!=="function"&&typeof data==="function"){handler=data}if(typeof selector!=="string")selector=null;if(typeof handler!=="function")return this;var evts=String(events).split(/\s+/).filter(Boolean);var atParts=selector?selector.split(",").map(function(p){return p.trim()}):[];var atAttrs=atParts.length&&atParts.every(function(p){return AT_ATTR_SELECTOR.test(p)})?atParts.map(function(p){return"@"+AT_ATTR_SELECTOR.exec(p)[1]}):null;var atAttr=!!atAttrs;function _hasAnyAt(el){for(var i=0;i<atAttrs.length;i++)if(el.getAttribute(atAttrs[i])!=null)return true;return false}return this.each(function(){var node=this;var bus=_eventTargetFor(node);evts.forEach(function(evtFull){var dot=evtFull.indexOf(".");var evt=dot===-1?evtFull:evtFull.slice(0,dot);var ns=dot===-1?"":evtFull.slice(dot+1);if(!evt)return;function listen(realName,wrapper){bus.addEventListener(realName,wrapper);_recordListener(bus,{type:evt,ns,selector,handler,real:realName,wrapper})}if(evt==="mouseenter"||evt==="mouseleave"){var realType=evt==="mouseenter"?"mouseover":"mouseout";listen(realType,function(e){var related=e.relatedTarget;if(atAttr){var el=e.target;var match=null;while(el&&el.nodeType===1){if(_hasAnyAt(el)){match=el;break}el=el.parentElement}if(match&&node.contains(match)&&!(related&&match.contains(related))){_callHandler(handler,match,e)}}else if(selector&&_isNode(node)){var match2=e.target.closest(selector);if(match2&&node.contains(match2)&&!(related&&match2.contains(related))){_callHandler(handler,match2,e)}}else if(!(related&&node.contains(related))){_callHandler(handler,node,e)}});return}var real=EVENT_NAME_MAP[evt]||evt;listen(real,function(e){if(atAttr||selector&&_isNode(node)){for(var el=e.target;el&&el.nodeType===1&&node.contains(el);el=el.parentElement){var hit=atAttr?_hasAnyAt(el):el.matches&&el.matches(selector);if(!hit)continue;var ret=_callHandler(handler,el,e);if(ret===false){e.preventDefault();e.stopPropagation()}if(e.cancelBubble)break}}else{_callHandler(handler,node,e)}})})})};$.fn.live=function(events,data,handler){if(this.selector&&typeof this.selector==="string")$(document).on(events,this.selector,data,handler);else this.on(events,data,handler);return this};$.fn.click=function(handler){return handler?this.on("click",handler):this.trigger("click")};$.fn.keydown=function(handler){return handler?this.on("keydown",handler):this.trigger("keydown")};$.fn.trigger=function(type,data){return this.each(function(){var bus=_eventTargetFor(this);var ev;if(type instanceof Event){ev=type}else if(type&&typeof type==="object"&&typeof type.type==="string"){ev=new Event(type.type,{bubbles:_isNode(this)});for(var k in type){if(k!=="type"&&Object.prototype.hasOwnProperty.call(type,k)){try{ev[k]=type[k]}catch(e){}}}}else{ev=new Event(type,{bubbles:_isNode(this)})}if(data!==void 0){ev.__lmArgs=data;try{if(ev.detail===void 0||ev.detail===null)ev.detail=data}catch(e){}}bus.dispatchEvent(ev)})};var _listenerRegistry=typeof WeakMap!=="undefined"?new WeakMap:null;function _recordListener(bus,rec){if(!_listenerRegistry)return;var list=_listenerRegistry.get(bus);if(!list){list=[];_listenerRegistry.set(bus,list)}list.push(rec)}$.fn.off=function(events,selector,handler){if(typeof selector==="function"){handler=selector;selector=void 0}var specs=events===void 0?[{type:"",ns:""}]:String(events).split(/\s+/).filter(Boolean).map(function(e){var d=e.indexOf(".");return{type:d===-1?e:e.slice(0,d),ns:d===-1?"":e.slice(d+1)}});return this.each(function(){if(!_listenerRegistry)return;var bus=_eventTargetFor(this);var list=_listenerRegistry.get(bus);if(!list)return;for(var i=list.length-1;i>=0;i--){var r=list[i];var hit=specs.some(function(sp){return(!sp.type||sp.type===r.type)&&(!sp.ns||sp.ns===r.ns)});if(!hit)continue;if(selector!==void 0&&selector!=="**"&&r.selector!==selector)continue;if(handler&&r.handler!==handler)continue;bus.removeEventListener(r.real,r.wrapper);list.splice(i,1)}})};$.fn.unbind=function(events,handler){return this.off(events,handler)};$.fn.bind=function(events,data,handler){return this.on(events,null,data,handler)};$.fn.one=function(events,selector,data,handler){var args=[].slice.call(arguments),fn=null,idx=-1;for(var i=args.length-1;i>=0;i--)if(typeof args[i]==="function"){fn=args[i];idx=i;break}if(!fn)return this;var self=this;args[idx]=function once(e){self.off(events,once);return fn.apply(this,arguments)};return this.on.apply(this,args)};$.fn.die=function(events,handler){if(this.selector&&typeof this.selector==="string")$(document).off(events,this.selector,handler);return this};["click","dblclick","keyup","keydown","keypress","focus","blur","change","submit","focusin","focusout","mouseenter","mouseleave","mouseover","mouseout","mousedown","mouseup","mousemove","resize","scroll","load","select"].forEach(function(name){$.fn[name]=function(handler){return handler?this.on(name,handler):this.trigger(name)}});$.fn.hover=function(enter,leave){this.on("mouseenter",enter);this.on("mouseleave",leave||enter);return this};var _animTimers=new WeakMap;function _animGetScroll(el,prop){if(el===window)return prop==="scrollLeft"?window.pageXOffset:window.pageYOffset;return el[prop]}function _animSetScroll(el,prop,val){if(el===window){if(prop==="scrollLeft")window.scrollTo(val,window.pageYOffset);else window.scrollTo(window.pageXOffset,val)}else{el[prop]=val}}var _cssNumberProps={opacity:1,zIndex:1,zoom:1,fontWeight:1,lineHeight:1,columnCount:1,flexGrow:1,flexShrink:1,order:1,widows:1,orphans:1};function _animSetStyle(el,prop,val){el.style[prop]=_cssNumberProps[prop]?val:val+"px"}$.fn.animate=function(props,options){var opts=typeof options==="number"?{duration:options}:options||{};var duration=opts.duration==null?400:opts.duration;this.each(function(){var el=this;var isWindowScroll=el===document.documentElement||el===document.body;var target=isWindowScroll?window:el;var start={};var isScrollProp={};for(var prop in props){if(!Object.prototype.hasOwnProperty.call(props,prop))continue;isScrollProp[prop]=prop==="scrollTop"||prop==="scrollLeft";if(isScrollProp[prop]){start[prop]=_animGetScroll(isWindowScroll?window:el,prop)}else{start[prop]=parseFloat(getComputedStyle(el)[prop])||0}}var existing=_animTimers.get(el);if(existing)cancelAnimationFrame(existing);if(duration===0){for(var p in props){var v=parseFloat(props[p]);if(isScrollProp[p])_animSetScroll(isWindowScroll?window:el,p,v);else _animSetStyle(el,p,v)}if(opts.complete)opts.complete.call(el);return}var startTime=null;function step(ts){if(startTime===null)startTime=ts;var elapsed=ts-startTime;var t=Math.min(1,elapsed/duration);for(var p2 in props){if(!Object.prototype.hasOwnProperty.call(props,p2))continue;var end=parseFloat(props[p2]);var val=start[p2]+(end-start[p2])*t;if(isScrollProp[p2])_animSetScroll(isWindowScroll?window:el,p2,val);else _animSetStyle(el,p2,val)}if(t<1){_animTimers.set(el,requestAnimationFrame(step))}else{_animTimers.delete(el);if(opts.complete)opts.complete.call(el)}}_animTimers.set(el,requestAnimationFrame(step))});return this};$.fn.stop=function(){this.each(function(){var id=_animTimers.get(this);if(id){cancelAnimationFrame(id);_animTimers.delete(this)}});return this};var _queues=new WeakMap;function _getQueue(el,name){var byName=_queues.get(el);if(!byName){byName={};_queues.set(el,byName)}if(!byName[name])byName[name]={items:[],running:false};return byName[name]}function _dequeue(el,name){var q=_getQueue(el,name);if(q.running)return;var next=q.items.shift();if(!next)return;q.running=true;next.call(el,function(){q.running=false;_dequeue(el,name)})}$.fn.queue=function(name,fn){if(typeof name==="function"){fn=name;name="fx"}name=name||"fx";if(fn===void 0)return _getQueue(this[0],name).items;return this.each(function(){_getQueue(this,name).items.push(fn);_dequeue(this,name)})};$.fn.dequeue=function(name){return this.each(function(){_dequeue(this,name||"fx")})};$.fn.delay=function(ms,name){name=name||"fx";return this.each(function(){_getQueue(this,name).items.push(function(next){setTimeout(next,ms)});_dequeue(this,name)})};$.fn.serializeArray=function(){var result=[];this.each(function(){if(this.tagName!=="FORM")return;var elements=this.elements?Array.prototype.slice.call(this.elements):[];elements.forEach(function(field){if(!field.name||field.disabled)return;var tag=field.tagName.toLowerCase();var type=(field.type||tag).toLowerCase();if(type==="submit"||type==="button"||type==="reset"||type==="fieldset")return;if((type==="checkbox"||type==="radio")&&!field.checked)return;if(type==="file"){var files=field.files?Array.prototype.map.call(field.files,function(f){return f.name}):[];result.push({name:field.name,value:files,type});return}if(tag==="select"&&field.multiple){Array.prototype.forEach.call(field.selectedOptions||[],function(opt){result.push({name:field.name,value:opt.value,type})});return}result.push({name:field.name,value:field.value,type})})});return result};$.fn.ajaxForm=function(options){options=options||{};return this.each(function(){var formEl=this;var $form=$(formEl);formEl.addEventListener("submit",function(ev){ev.preventDefault();var formData=$form.serializeArray();if(typeof options.beforeSubmit==="function"){options.beforeSubmit(formData,$form,options)}})})};if(!global.jQuery||!global.jQuery.fn||global.jQuery.fn.jquery==="lumenjs-shim"){global.$=$;global.jQuery=$}})(typeof window!=="undefined"?window:globalThis);
3
3
 
4
4
  !function(t){"use strict";var e=null,r=null,n=null,i=null,l=null,o=window,s="WebWorker",a=null,u=null,f=null,p=null,g=null,c=null,h=null;function _(t){return function(e){var r=this._callbackStack[t];return"function"==typeof e&&r.push(e),this}}for(h in null!==(e=(i=i||o)[l=l||s]||null)&&(r=e),c=Array.prototype.slice,n=window.Worker,e=function(){this._constructor.apply(this,arguments)},e.prototype._$=null,e.prototype._callbackStack=null,e.prototype._lastError=null,e.prototype._log=null,e.prototype._nativeWorker=null,e.prototype._state=null,e.prototype._workerBlobUrl=null,e.prototype._workerScript=null,e.prototype._workerUrl=null,e.prototype._constructor=function(e){var r=null,n=null,i=null;if(Object.defineProperty(this,"_$",{configurable:!1,enumerable:!0,value:t(this),writable:!1}),null===(e=e||null)&&this.throwError(g.INVALID_ARGUMENTS,null,!0),"string"==typeof e){let l="";e=t.trim(e);try{window.hasOwnProperty(e)&&"string"==typeof window[e]?(l=window[e],this._workerScript=l):r=t(e)}catch(t){}null!==r&&r.length>0?(n=r.text(),this._workerScript=n):""==l&&(i=e)}this._workerUrl=i,this._callbackStack={error:[],loading:[],loaded:[],starting:[],started:[],terminating:[],terminated:[]},this._assignEventHandlers(),this._state=a.INITIALIZED,this.trigger(f.INITIALIZED)},e.prototype._initLog=function(){return this._log=[],this._log},e.prototype.getUrl=function(){return this._workerUrl},e.prototype.getBlobUrl=function(){return this._workerBlobUrl},e.prototype.getLog=function(){return this._log||this._initLog()},e.prototype.getNativeWorker=function(){return this._nativeWorker},e.prototype.getState=function(){return this._state},e.prototype.isLoading=function(){return this.getState()===a.LOADING},e.prototype.isLoaded=function(){return this.getState()>=a.LOADED&&!this.isTerminated()},e.prototype.isStarting=function(){return this.getState()===a.STARTING},e.prototype.isStarted=function(){return this.getState()>=a.STARTED&&!this.isTerminated()},e.prototype.isTerminating=function(){return this.getState()===a.TERMINATING},e.prototype.isTerminated=function(){return this.getState()===a.TERMINATED},e.prototype.load=function(){var r,n,i=this;return i.isLoading()||i.isLoaded()||(i.trigger(f.WORKER_LOADING),r=i.getUrl()||null,n=function(){var t,r=null;r=i._workerScript,r=e._workerScriptWrapper.replace(/\{\{main-function\}\}/g,r),t=new window.Blob([r],{type:"text/javascript"}),i._workerBlobUrl=window.URL.createObjectURL(t),i._createWorker()},null===r?n():t.ajax({async:!0,url:r,dataType:"text",crossDomain:!0,success:function(t){i._workerScript=t,n()},error:function(){i.throwError(g.WORKER_DID_NOT_LOAD,arguments)}})),i},e.prototype.log=function(t){return(this._log||this._initLog()).push(t),this},e.prototype._createWorker=function(){return this._nativeWorker=new n(this.getBlobUrl()),this._attachMessageParser(),this},e.prototype._assignEventHandlers=function(){function t(t){return function(){var e,r,n=this._callbackStack[t];(e=t.toUpperCase())in a&&(this._state=a[e]);for(;r=n.pop();)r.apply(this,arguments)}}return this.on(f.ERROR,t("error")),this.on(f.WORKER_LOADING,t("loading")),this.on(f.WORKER_LOADED,t("loaded")),this.on(f.WORKER_STARTING,t("starting")),this.on(f.WORKER_STARTED,t("started")),this.on(f.WORKER_TERMINATING,t("terminating")),this.on(f.WORKER_TERMINATED,t("terminated")),this},e.prototype.error=_("error"),e.prototype.loading=_("loading"),e.prototype.loaded=_("loaded"),e.prototype.starting=_("starting"),e.prototype.started=_("started"),e.prototype.terminating=_("terminating"),e.prototype.terminated=_("terminated"),e.prototype.start=function(){var t;return this.isStarting()||this.isStarted()?this:(t=c.call(arguments),this.isLoaded()?(this.trigger(f.WORKER_STARTING),this.sendMessage(u.START,t),this):(this.on(f.WORKER_LOADED,(function(){this.start.apply(this,t)})),this.load(),this))},e.prototype.sendMessage=function(t,e){var r=null,n=null;return e=e||null,null===(t=t||null)||((n={__isWebWorkerMsg:!0}).action=t,n.args=e,(r=this.getNativeWorker())&&r.postMessage(n)),this},e.prototype._attachMessageParser=function(){var e=null;return(e=t(this.getNativeWorker())).on("message",t.proxy((function(t){var e=(t.originalEvent||t).data,r=null,n=null;"object"==typeof e&&"__isWebWorkerMsg"in e&&e.__isWebWorkerMsg&&(r=e.action,n=e.args,this[r].apply(this,n))}),this)),e.on("error",t.proxy(this.throwError,this)),this},e.prototype.terminate=function(){return(this.getNativeWorker()||null)&&(this.trigger(f.WORKER_TERMINATING),this.sendMessage(u.TERMINATE,c.call(arguments))),this},e.prototype.terminateNow=function(){var t=null;return this.isTerminating()||this.trigger(f.WORKER_TERMINATING),(t=this.getNativeWorker()||null)&&(t.terminate(),this._nativeWorker=null,this.trigger(f.WORKER_TERMINATED)),this},e.prototype.on=function(){var t=this._$;return t.on.apply(t,arguments),this},e.prototype.one=function(){var t=this._$;return t.one.apply(t,arguments),this},e.prototype.off=function(){var t=this._$;return t.off.apply(t,arguments),this._assignEventHandlers(),this},e.prototype.trigger=function(e){var r=!1,n=null,i=null;return"object"==typeof e&&(n=e.type||null),"string"==typeof e&&(n=e||null,r=!0),null===n?this:n in p?(r&&(e=new t.Event(n)),e.worker=this,i=[e],arguments.length>1&&(i=i.concat(c.call(arguments,1))),this._triggerSelf.apply(this,i),this):(r&&(e={type:n,data:arguments[1]?arguments[1]:{}}),i=[e],this.sendMessage(u.TRIGGER_SELF,i),this)},e.prototype.triggerSelf=function(e){var r=null,n=null;return null===(e=e||null)||("string"==typeof e&&(r=e,e=new t.Event(r)),e.originalEvent=e.originalEvent||e,e.worker=this,n=[e],arguments.length>1&&(n=n.concat(c.call(arguments,1))),this._triggerSelf.apply(this,n)),this},e.prototype._triggerSelf=function(){var t=null;return(t=this._$).trigger.apply(t,arguments),this},e.prototype.throwError=function(t,r,n){var i=null;if("object"==typeof(t=t||g.UNKNOWN)&&(i=(t=t.originalEvent||t).data||null),i=void 0===r?i:r,n=n||!1,this._lastError=t,e._lastError=t,"_triggerError"in this&&this._triggerError(t,r,n),n)throw new window.Error(t);return this},e.prototype._triggerError=function(e,r,n){var i=null;return(i=new t.Event(f.ERROR)).message=this.getLastError(),i.errorData=r,i.throwsException=!!n,this.trigger(i),this},e.prototype.getLastError=function(){return this._lastError},e._lastError=null,a={INITIALIZED:0,LOADING:1,LOADED:2,STARTING:3,STARTED:4,TERMINATING:5,TERMINATED:6},e.State=a,u={LOG:"log",START:"start",TERMINATE:"terminate",TERMINATE_NOW:"terminateNow",TRIGGER:"trigger",TRIGGER_SELF:"triggerSelf"},e.Action=u,f={INITIALIZED:"initialized",ERROR:"error",WORKER_LOADING:"worker-loading",WORKER_LOADED:"worker-loaded",WORKER_STARTING:"worker-starting",WORKER_STARTED:"worker-started",WORKER_TERMINATING:"worker-terminating",WORKER_TERMINATED:"worker-terminated"},e.Event=f,p={},e.EventMap=p,f)f[h]="webworker:"+f[h],p[f[h]]=h;g={UNKNOWN:"An unknown error occured.",INVALID_ARGUMENTS:"Invalid arguments were supplied to this method.",WORKER_DID_NOT_LOAD:"Unable to load worker."},e.Error=g,e._workerScriptWrapper='var e=null,t=null,n=null,r={};e={{state-data}};t={{action-data}};n={{event-data}};self._callbackStack=null;self._listeners=r;self._isTerminating=false;self._state=null;self.State=e;self.Action=t;self.Event=n;self._assignEventHandlers=function(){function t(t){return function(){var n=self._callbackStack[t],r,i;r=t.toUpperCase();if(r in e){self._state=e[r]}while(i=n.pop()){i.apply(self,arguments)}}}self.on(n.WORKER_TERMINATING,t("terminating"));return self};self.getState=function(){return this._state};self.isInitialized=function(){var e=self.getState();return e!==null&&e>=0};self.isTerminating=function(){return self.getState()===e.TERMINATING};self._main=function(){var startArgs=arguments;{{main-function}};return self};self._init=function(){self._callbackStack={terminating:[]};self._assignEventHandlers();self._state=e.INITIALIZED;self.trigger(n.WORKER_LOADED);return self};self.start=function(){if(!self.isInitialized()){return self}self.triggerSelf(n.WORKER_STARTING);self._main.apply(self,arguments);self.triggerSelf(n.WORKER_STARTED);self.trigger(n.WORKER_STARTED);return self};self.log=function(e){self.sendMessage(t.LOG,[e]);return self};self.on=function(e,t){e+="";t=t||null;if(typeof t!=="function"){return self}if(!(e in r)){r[e]=[]}r[e].push(t);return self};self.one=function(e,t){var n=null;n=function(){t.apply(this,arguments);self.off(e,n);return};self.on(e,n);return};self.off=function(e,t){var n=null;e=e||null;t=t||null;if(e===null&&t===null){for(n in r){delete r[n]}self._assignEventHandlers();return self}self._removeListenerFromEventType(e,t);return self};self._removeListenerFromEventType=function(e,t){var n=r[e],i=0;t=t||null;if(t===null){r[e]=[];return self}for(;i<n.length;i++){if(n[i]===t){n.splice(i,1);i--}}return self};self.terminating=function(e){var t=self._callbackStack.terminating;if(typeof e==="function"){t.push(e)}return self};self.trigger=function(e,n){var r=null;e=e||null;if(e===null){return self}if(typeof e==="string"){r=e||null;e={type:r}}else if(typeof e==="object"){r=e.type||null;n=e.data}if(r===null){return self}e.data=n;self.sendMessage(t.TRIGGER_SELF,[e]);return self};self.triggerSelf=function(e,t){var n=null,i=null,s=null,o=null,u=0;e=e||null;if(e===null){return this}if(typeof e==="string"){n=e||null;e={type:e}}else if(typeof e==="object"){n=e.type||null;t=e.data}if(n===null){return this}e.data=t;i=r[n]||null;if(i===null){return this}s=i.length;for(u=0;u<s;u++){o=i[u];o.apply(this,[e]);if(s!==i.length){u--;s=i.length}}return this};self.sendMessage=function(e,t){var n=null;e=e||null;t=t||[];if(e===null){return self}n={__isWebWorkerMsg:true};n.action=e;n.args=t;self.postMessage(n);return self};self.terminate=function(e){e=!!e;if(!self.isTerminating()){self._setTerminatingStatus();self.triggerSelf(n.WORKER_TERMINATING);self.trigger(n.WORKER_TERMINATING)}self.sendMessage(t.TERMINATE_NOW,[]);if(e){self._nativeClose()}return self};self.terminateNow=function(){return self.terminate(true)};self._setTerminatingStatus=function(){self._state=e.TERMINATING;return self};self._nativeClose=self.close;self.close=self.terminate;self.addEventListener("message",function(e){var t=e.originalEvent||e,n=t.data,r=null,i=null;if(typeof n==="object"&&"__isWebWorkerMsg"in n&&n.__isWebWorkerMsg){r=n.action;i=n.args;self[r].apply(self,i)}},false);self._init()',e._workerScriptWrapper=e._workerScriptWrapper.replace(/\{\{state-data\}\}/g,JSON.stringify(a)).replace(/\{\{action-data\}\}/g,JSON.stringify(u)).replace(/\{\{event-data\}\}/g,JSON.stringify(f)),e.getLastError=e.prototype.getLastError,e.noConflict=function(t,n){return t=t||null,n=n||null,o[s]===e&&(delete o[s],r&&(o[s]=r)),t&&n&&(t[n]=e),e},i[l]=e}(jQuery);
5
5
  !function(n){"use strict";function d(n,t){var r=(65535&n)+(65535&t);return(n>>16)+(t>>16)+(r>>16)<<16|65535&r}function f(n,t,r,e,o,u){return d((u=d(d(t,n),d(e,u)))<<o|u>>>32-o,r)}function l(n,t,r,e,o,u,c){return f(t&r|~t&e,n,t,o,u,c)}function g(n,t,r,e,o,u,c){return f(t&e|r&~e,n,t,o,u,c)}function v(n,t,r,e,o,u,c){return f(t^r^e,n,t,o,u,c)}function m(n,t,r,e,o,u,c){return f(r^(t|~e),n,t,o,u,c)}function c(n,t){var r,e,o,u;n[t>>5]|=128<<t%32,n[14+(t+64>>>9<<4)]=t;for(var c=1732584193,f=-271733879,i=-1732584194,a=271733878,h=0;h<n.length;h+=16)c=l(r=c,e=f,o=i,u=a,n[h],7,-680876936),a=l(a,c,f,i,n[h+1],12,-389564586),i=l(i,a,c,f,n[h+2],17,606105819),f=l(f,i,a,c,n[h+3],22,-1044525330),c=l(c,f,i,a,n[h+4],7,-176418897),a=l(a,c,f,i,n[h+5],12,1200080426),i=l(i,a,c,f,n[h+6],17,-1473231341),f=l(f,i,a,c,n[h+7],22,-45705983),c=l(c,f,i,a,n[h+8],7,1770035416),a=l(a,c,f,i,n[h+9],12,-1958414417),i=l(i,a,c,f,n[h+10],17,-42063),f=l(f,i,a,c,n[h+11],22,-1990404162),c=l(c,f,i,a,n[h+12],7,1804603682),a=l(a,c,f,i,n[h+13],12,-40341101),i=l(i,a,c,f,n[h+14],17,-1502002290),c=g(c,f=l(f,i,a,c,n[h+15],22,1236535329),i,a,n[h+1],5,-165796510),a=g(a,c,f,i,n[h+6],9,-1069501632),i=g(i,a,c,f,n[h+11],14,643717713),f=g(f,i,a,c,n[h],20,-373897302),c=g(c,f,i,a,n[h+5],5,-701558691),a=g(a,c,f,i,n[h+10],9,38016083),i=g(i,a,c,f,n[h+15],14,-660478335),f=g(f,i,a,c,n[h+4],20,-405537848),c=g(c,f,i,a,n[h+9],5,568446438),a=g(a,c,f,i,n[h+14],9,-1019803690),i=g(i,a,c,f,n[h+3],14,-187363961),f=g(f,i,a,c,n[h+8],20,1163531501),c=g(c,f,i,a,n[h+13],5,-1444681467),a=g(a,c,f,i,n[h+2],9,-51403784),i=g(i,a,c,f,n[h+7],14,1735328473),c=v(c,f=g(f,i,a,c,n[h+12],20,-1926607734),i,a,n[h+5],4,-378558),a=v(a,c,f,i,n[h+8],11,-2022574463),i=v(i,a,c,f,n[h+11],16,1839030562),f=v(f,i,a,c,n[h+14],23,-35309556),c=v(c,f,i,a,n[h+1],4,-1530992060),a=v(a,c,f,i,n[h+4],11,1272893353),i=v(i,a,c,f,n[h+7],16,-155497632),f=v(f,i,a,c,n[h+10],23,-1094730640),c=v(c,f,i,a,n[h+13],4,681279174),a=v(a,c,f,i,n[h],11,-358537222),i=v(i,a,c,f,n[h+3],16,-722521979),f=v(f,i,a,c,n[h+6],23,76029189),c=v(c,f,i,a,n[h+9],4,-640364487),a=v(a,c,f,i,n[h+12],11,-421815835),i=v(i,a,c,f,n[h+15],16,530742520),c=m(c,f=v(f,i,a,c,n[h+2],23,-995338651),i,a,n[h],6,-198630844),a=m(a,c,f,i,n[h+7],10,1126891415),i=m(i,a,c,f,n[h+14],15,-1416354905),f=m(f,i,a,c,n[h+5],21,-57434055),c=m(c,f,i,a,n[h+12],6,1700485571),a=m(a,c,f,i,n[h+3],10,-1894986606),i=m(i,a,c,f,n[h+10],15,-1051523),f=m(f,i,a,c,n[h+1],21,-2054922799),c=m(c,f,i,a,n[h+8],6,1873313359),a=m(a,c,f,i,n[h+15],10,-30611744),i=m(i,a,c,f,n[h+6],15,-1560198380),f=m(f,i,a,c,n[h+13],21,1309151649),c=m(c,f,i,a,n[h+4],6,-145523070),a=m(a,c,f,i,n[h+11],10,-1120210379),i=m(i,a,c,f,n[h+2],15,718787259),f=m(f,i,a,c,n[h+9],21,-343485551),c=d(c,r),f=d(f,e),i=d(i,o),a=d(a,u);return[c,f,i,a]}function i(n){for(var t="",r=32*n.length,e=0;e<r;e+=8)t+=String.fromCharCode(n[e>>5]>>>e%32&255);return t}function a(n){var t=[];for(t[(n.length>>2)-1]=void 0,e=0;e<t.length;e+=1)t[e]=0;for(var r=8*n.length,e=0;e<r;e+=8)t[e>>5]|=(255&n.charCodeAt(e/8))<<e%32;return t}function e(n){for(var t,r="0123456789abcdef",e="",o=0;o<n.length;o+=1)t=n.charCodeAt(o),e+=r.charAt(t>>>4&15)+r.charAt(15&t);return e}function r(n){return unescape(encodeURIComponent(n))}function o(n){return i(c(a(n=r(n)),8*n.length))}function u(n,t){return function(n,t){var r,e=a(n),o=[],u=[];for(o[15]=u[15]=void 0,16<e.length&&(e=c(e,8*n.length)),r=0;r<16;r+=1)o[r]=909522486^e[r],u[r]=1549556828^e[r];return t=c(o.concat(a(t)),512+8*t.length),i(c(u.concat(t),640))}(r(n),r(t))}function t(n,t,r){return t?r?u(t,n):e(u(t,n)):r?o(n):e(o(n))}"function"==typeof define&&define.amd?define(function(){return t}):"object"==typeof module&&module.exports?module.exports=t:n.md5=t}(this);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lmjs/core",
3
- "version": "2.5.5",
3
+ "version": "2.5.6",
4
4
  "description": "LumenJS reactive core runtime — the reactive engine, HTML/JS AST compiler, realtime socket client, and delegated event listeners powering LumenJS applications.",
5
5
  "files": [
6
6
  "dist/",
package/src/dom-shim.js CHANGED
@@ -807,12 +807,14 @@
807
807
  // ---- Events ----
808
808
  // A handful of event names need translating for delegation to actually
809
809
  // work — left as-is, these would silently never fire, exactly the class
810
- // of bug point 6 exists to stop happening. `touch` isn't a real DOM
811
- // event name at all. `focus`/`blur` are real, but don't bubble, so
810
+ // of bug point 6 exists to stop happening. `focus`/`blur` are real, but don't bubble, so
812
811
  // delegating them from `document`/`body` (lstnrs.js's whole pattern)
813
812
  // requires their bubbling equivalents instead — this is what real
814
813
  // jQuery does internally for the same reason.
815
- var EVENT_NAME_MAP = { touch: 'touchstart', focus: 'focusin', blur: 'focusout' };
814
+ // `touch` is NOT mapped (2026-10-08). It isn't a DOM event, so under V1's jQuery `.on("click touch")` only ever
815
+ // fired on click. Mapping it to touchstart made every "click touch" handler (@click, links, .navTgl, [tgl],
816
+ // [modal], ...) run twice on a phone: once on touchstart, again on the click the browser sends after it.
817
+ var EVENT_NAME_MAP = { focus: 'focusin', blur: 'focusout' };
816
818
 
817
819
  // jQuery lets you `.on()`/`.trigger()` an arbitrary plain object, not
818
820
  // just DOM nodes — real jQuery keeps its own event table for that case.