UNPKG

jdoms

Version:

jDoms is a fast, powerful, and zero-dependency JavaScript library for modern DOM manipulation, traversal, event handling, and more

2 lines 50.5 kB
/*! jDoms JavaScript Library v1.1.1 (https://mamedul.gitlab.io/jdoms)- Licensed under the MIT license */ ;!function(t,e){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=t.document?e(t):function(t){if(!t.document)throw new Error("jDoms requires a document which has a window");return e(t)}:"function"==typeof define&&define.amd?(define(e),e(t)):e(t),void 0!==t&&(t="undefined"!=typeof window?window:this||globalThis||self),t.jDoms=e(t)}("undefined"!=typeof window?window:this||globalThis||self,(function(t){"use strict";var n="1.1.1",r="MAMEDUL ISLAM";if(void 0===i)var i=t.document;console.log(t.document),"function"!=typeof String.prototype.trim&&(String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")}),Array.prototype.filter||(Array.prototype.filter=function(t){var e=this.length>>>0;if("function"!=typeof t)throw new TypeError;for(var n=[],r=arguments[1],i=0;i<e;i++)if(i in this){var o=this[i];t.call(r,o,i,this)&&n.push(o)}return n}),Array.prototype.indexOf||(Array.prototype.indexOf=function(t,e){for(var n=e||0,r=this.length;n<r;n++)if(this[n]===t)return n;return-1});var o=function(t){return void 0===t},s=function(t){return void 0!==t},a=function(t){return"string"==typeof t},h=function(t){return"number"==typeof t},u=function(t){return"number"==typeof t&&parseInt(t)===t},c=function(t){return"boolean"==typeof t},l=function(t){return"string"==typeof t||"number"==typeof t||"boolean"==typeof t},f=function(t){if("undefined"!=typeof Array&&"function"==typeof Array.isArray)return Array.isArray(t);try{return!(!t||!t.constructor||"Array"!==t.constructor.name)||"[object Array]"===Object.prototype.toString.call(t)}catch(t){}return!1},d=function(t){return"function"==typeof t},p=function(t){return"object"==typeof t},g=function(t){return"object"==typeof t&&"undefined"!=typeof Object&&t===Object(t)},v=function(t){return"function"==typeof t&&"jDoms"==t.name||"object"==typeof t&&void 0!==t.constructor&&void 0!==t.constructor.name&&"jDoms"==t.constructor.name},y=function(t){var e=0;if("boolean"==typeof t||"function"==typeof t||"symbol"==typeof t)e=1;else if("bigint"==typeof t)e="function"==typeof BigInt&&"function"==typeof BigInt.valueOf?(""+BigInt(t).valueOf()).length:(""+t).length+1;else if("string"==typeof t||"number"==typeof t)e=(""+t).length;else if("object"==typeof t){var n;if("function"==typeof Object&&"function"==typeof Object.keys&&(e=Object.keys(t).length),0==e)for(n in t)s(t.hasOwnProperty)&&t.hasOwnProperty(n)&&e++;0==e&&void 0!==t.nodeName&&void 0!==t.nodeType&&void 0!==t.nodeValue&&e++}return e},m=function(t){try{if(a(t))return t.trim?t.trim():t.replace(/^\s+|\s+$/gm,"");if(f(t)||p(t)){for(var e in t)t[e]=m(t[e]);return t}}catch(t){}return t},b=function(t){if(f(t))t=t.filter((function(t,e,n){return n.indexOf(t)===e}));else if(a(t)||h(t)){var e="";t=""+t;for(var n=0;n<t.length;n++)e.indexOf(t[n])<0&&(e+=t[n]);return e}return t},w=function(t,e){if(!g(t)||!g(e))return g(e)?JSON.parse(JSON.stringify(e)):e;for(var n in e)if(e.hasOwnProperty&&e.hasOwnProperty(n))try{g(e[n])?(g(t[n])||(t[n]={}),t[n]=w(t[n],e[n])):t[n]=e[n]}catch(r){t[n]=e[n]}return t},T=function(t){try{return encodeURI(t)}catch(t){}return""},C=function(t){try{return decodeURI(t)}catch(t){}return t},O=function(t){if(s(btoa))return btoa(t);var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";return function(t){var n,r,i,o,s,a,h,u="",c=0;for(t=function(t){t=t.replace(/\r\n/g,"\n");for(var e="",n=0;n<t.length;n++){var r=t.charCodeAt(n);r<128?e+=String.fromCharCode(r):r>127&&r<2048?(e+=String.fromCharCode(r>>6|192),e+=String.fromCharCode(63&r|128)):(e+=String.fromCharCode(r>>12|224),e+=String.fromCharCode(r>>6&63|128),e+=String.fromCharCode(63&r|128))}return e}(t);c<t.length;)o=(n=t.charCodeAt(c++))>>2,s=(3&n)<<4|(r=t.charCodeAt(c++))>>4,a=(15&r)<<2|(i=t.charCodeAt(c++))>>6,h=63&i,isNaN(r)?a=h=64:isNaN(i)&&(h=64),u=u+e.charAt(o)+e.charAt(s)+e.charAt(a)+e.charAt(h);return u}(t)},A=function(t){if(s(atob))return atob(t);var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";return function(t){var n,r,i,o,s,a,h="",u=0;for(t=t.replace(/[^A-Za-z0-9\+\/\=]/g,"");u<t.length;)n=e.indexOf(t.charAt(u++))<<2|(o=e.indexOf(t.charAt(u++)))>>4,r=(15&o)<<4|(s=e.indexOf(t.charAt(u++)))>>2,i=(3&s)<<6|(a=e.indexOf(t.charAt(u++))),h+=String.fromCharCode(n),64!=s&&(h+=String.fromCharCode(r)),64!=a&&(h+=String.fromCharCode(i));return h=function(t){for(var e="",n=0,r=0,i=0,o=0;n<t.length;)(r=t.charCodeAt(n))<128?(e+=String.fromCharCode(r),n++):r>191&&r<224?(i=t.charCodeAt(n+1),e+=String.fromCharCode((31&r)<<6|63&i),n+=2):(i=t.charCodeAt(n+1),o=t.charCodeAt(n+2),e+=String.fromCharCode((15&r)<<12|(63&i)<<6|63&o),n+=3);return e}(h),h}(t)},E=function(){function t(t){return o.lastIndex=0,o.test(t)?'"'+t.replace(o,(function(t){var e=h[t];return a(e)?e:"\\u"+("0000"+t.charCodeAt(0).toString(16)).slice(-4)}))+'"':'"'+t+'"'}function e(o,a){var h,u,c,l,f,p,g=n;try{if((f=a[o])&&"object"==typeof f&&d(f.toJSON)&&(f=f.toJSON(o)),f instanceof HTMLElement)return function(e){var n=e.tagName.toLowerCase(),r="<"+n;return e.attributes.length>0&&(r+=" "),r+=Array.prototype.map.call(e.attributes,(function(e){return""===e.value?e.name:e.name+"="+t(e.value)})).join(" "),r+(["!doctype","br","hr","img","link","meta","input"].indexOf(n)>-1?">":">"+e.innerHTML+"</"+n+">")}(f);if(f instanceof RegExp)return String(f);if(f instanceof MimeType||f instanceof Plugin)return Object.prototype.toString.call(f);switch(typeof f){case"string":return t(f);case"boolean":case"null":case"number":case"undefined":return String(f);case"function":case"object":if(!f)return"null";var v=i.indexOf(f)+1;if(v>0)return"/**ref:"+v.toString(16)+"**/";if(i.push(f),p="/**id:"+(v=i.length).toString(16)+"**/",d(f))return p+" "+String(f);if(n+=r,l=[],"[object Array]"===Object.prototype.toString.apply(f)){for(c=f.length,h=0;h<c;h+=1)l[h]=e(h,f)||"null";return u=0===l.length?"[]":"[\n"+n+p+"\n"+n+l.join(",\n"+n)+"\n"+g+"]",n=g,u}var y,m=function(t){var e=[];for(var n in t)e=e.concat(n);return e}(f);for(var b in m)s(m.hasOwnProperty)&&!m.hasOwnProperty(b)||(u=e(y=m[b],f))&&l.push(t(y)+": "+u);return u=0===l.length?"{}":"{\n"+n+p+"\n"+n+l.join(",\n"+n)+"\n"+g+"}",n=g,u}}catch(t){return""}}var n,r,i,o=/[\\\"\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,h={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};return{quote:t,getString:function(t){if(a(t))return t;n="",r=" ",i=[];for(var o=e("",{"":t}),s=i.length;s;)new RegExp("/\\*\\*ref:"+s.toString(16)+"\\*\\*/").test(o)||(o=o.replace(new RegExp("[\r\n\t ]*/\\*\\*id:"+s.toString(16)+"\\*\\*/","g"),"")),s--;return i=null,o}}}(),S=function(t){return Date.parse(t)},N=function(e){var n=location||t.location,r={hash:n.hash||"",host:n.host||"",hostname:n.hostname||"",href:n||"",origin:n.origin||"",password:n.password||"",pathname:n.pathname||"",port:n.port||"",protocol:n.protocol||"",search:n.search||"",username:n.username||""},o=i.createElement("a");return o.href=e,r.hash=o.hash,r.host=o.host,r.hostname=o.hostname,r.href=o.href,r.origin=o.origin,r.password=o.password,r.pathname=o.pathname,r.port=o.port,r.protocol=o.protocol,r.search=o.search,r.username=o.username,r},x=function(t){var e={};if(p(JSON)&&d(JSON.parse))try{e=JSON.parse(t)}catch(t){}else if(p(Components)&&d(Components.classes)&&d(Components.interfaces))try{e=Components.classes["@mozilla.org/dom/json;1"].createInstance(Components.interfaces.nsIJSON).decode(t)}catch(t){}else{var n=t.replace(/^\s+/,"").replace(/\s+$/,""),r=function(t){if(/^[\],:{}\s]*$/.test(n.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return new Function("return "+n)()}();e=r||e}return e},L=function(e){if(t.DOMParser)return(new DOMParser).parseFromString(e,"text/xml");if(s(ActiveXObject)){var n=new ActiveXObject("Microsoft.XMLDOM");return n.async=!1,n.loadXML(e)}return{}},j=function(t){if("string"!=typeof t)return i.createDocumentFragment();if(0===t.toLowerCase().replace(/^\s+|\s+$/gm,"").indexOf("<!doctype")&&i.implementation&&i.implementation.createHTMLDocument){var e=i.implementation.createHTMLDocument("");return e.documentElement.innerHTML=t,e}if("content"in i.createElement("template")){var n=i.createElement("template");return n.innerHTML=t,n.content}var r=i.createDocumentFragment(),o=i.createElement("body");for(o.innerHTML=t;o.childNodes&&o.childNodes.length>0;)r.appendChild(o.childNodes[0]);return r},P=function(e){for(var n={altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,touches:!0,which:!0},r=H(P.that).doms(P.selectors),i=0;i<r.length;i++){var o=(e=e||t.event).target||e.currentTarget||e.srcElement;if(r[i]==o||H(r[i]).child(o).length>0||s(r[i].compareDocumentPosition)&&16==r[i].compareDocumentPosition(o)||s(r[i].contains)&&r[i].contains(o)){for(var a in e)s(e.hasOwnProperty)&&!e.hasOwnProperty(a)||(n[a]=e[a]);o=["target","targetElement","srcElement"];for(var h=0;h<o.length;h++)n[o[h]]=r[i],s(Object.defineProperty)&&Object.defineProperty(n,o[h],{writable:!1,value:r[i]});P.callback(n)}}this.that=null,this.selectors=null,this.callback=null};P.type=null,P.that=null,P.selectors=null,P.callback=null;var F={version:n,length:function(){return this.length||0},index:function(t){try{return this[t]}catch{return}},doms:function(t){var e=arguments||[];t=t||e[0];var n=e[1]||"",r=[];if(this.length>0)for(var i=0;i<this.length;i++)for(var o=H(t,n,this[i]),s=0;s<o.length;s++)r=r.concat(o[s]);return H(r)},find:function(t){var e=arguments[1]||"";return this.doms(t,e)},search:function(t){var e=arguments[1]||"";return this.doms(t,e)},index:function(t){try{return 0==this.length?this._[parseInt(t)]:this[parseInt(t)]}catch(t){}return null},domIndex:function(t){var e=[];try{e=this[parseInt(t)]}catch(t){}return H(e)},key:function(t){try{if(s(this._.hasOwnProperty))return this._[t]}catch(t){}return null},each:function(t){for(var e=0;e<this.length;e++)t(this[e],e,this);return this},parent:function(){for(var t=(arguments||[])[0],e=[],n=[],r=0;r<this.length;r++)if(e=e.concat(this[r].parentElement||this[r].parentNode),s(t))for(var o=H(t,"",this[r].ownerDocument||i),a=0;a<o.length;a++)n=n.concat(o[a]);return s(t)&&(n.length>1&&(n=n.filter((function(t,e,n){return n.indexOf(t)===e}))),e=e.filter((function(t){return-1!==n.indexOf(t)}))),e=b(e),H(e)},closest:function(e){t.Element&&!Element.prototype.closest&&(Element.prototype.closest=function(t){var n,r=new H.qsAll(e,"",this.document||this.ownerDocument||i),o=this;do{for(n=r.length;--n>=0&&r.item(n)!==o;);}while(n<0&&(o=o.parentElement||o.parentNode));return o||[]});for(var n=[],r=0;r<this.length;r++)if(s(this[r].closest))try{var o=this[r].closest(e);if(f(o)||o instanceof NodeList)for(var a=0;a<o.length;a++)n=n.concat(o[a]);else o&&(n=n.concat(o))}catch{}return n=b(n),H(n)},child:function(){for(var t,e,n=(arguments||[])[0],r=[],o=[],a=0;a<this.length;a++){if(s(this[a].children))for(t=this[a].children,e=0;e<t.length;e++)r=r.concat(t[e]);else if(s(this[a].childNodes))for(t=this[a].childNodes,e=0;e<t.length;e++)t[a].nodeName&&t[a].nodeType==Node.ELEMENT_NODE&&(r=r.concat(t[e]));if(r=r.concat(),s(n))for(var h=H(n,"",this[a].ownerDocument||i),u=0;u<h.length;u++)o=o.concat(h[u])}return s(n)&&(o.length>1&&(o=o.filter((function(t,e,n){return n.indexOf(t)===e}))),r=r.filter((function(t){return-1!==o.indexOf(t)}))),r=b(r),H(r)},children:function(){var t=(arguments||[])[0];return this.child(t)},match:function(t){var e=arguments||[];t=t||e[0]||[];for(var n=e[1]||"",r=s(e[2])?e[2]:i,o=[],a=[],h=0;h<this.length;h++)o=o.concat(this[h]);for(var u=H(t,n,r),c=0;c<u.length;c++)a=a.concat(u[c]);return s(t)&&(a.length>1&&(a=a.filter((function(t,e,n){return n.indexOf(t)===e}))),o=o.filter((function(t){return-1!==a.indexOf(t)}))),o=b(o),H(o)},matchTo:function(t){var e=arguments||[];t=t||e[0]||[];for(var n=e[1]||"",r=s(e[2])?e[2]:i,o=[],a=[],h=0;h<this.length;h++)o=o.concat(this[h]);for(var u=H(t,n,r),c=0;c<u.length;c++)a=a.concat(u[c]);return s(t)&&(a.length>1&&(a=a.filter((function(t,e,n){return n.indexOf(t)===e}))),a=a.filter((function(t){return-1!==o.indexOf(t)}))),a=b(a),H(a)},merge:function(t){var e=arguments||[];t=t||e[0]||[];for(var n=e[1]||"",r=s(e[2])?e[2]:i,o=[],a=[],h=0;h<this.length;h++)o=o.concat(this[h]);for(var u=H(t,n,r),c=0;c<u.length;c++)a=a.concat(u[c]);if(s(t))for(var l=0;l<a.length;l++)o.indexOf(a[l])<0&&(o=o.concat(a[l]));return o=b(o),H(o)},unique:function(){for(var t=[],e=0;e<this.length;e++)t=t.concat(this[e]);return t=b(t),H(t)},not:function(t){var e=arguments||[];t=t||e[0];for(var n=e[1]||"",r=s(e[2])?e[2]:i,o=[],a=[],h=0;h<this.length;h++)o=o.concat(this[h]);for(var u=H(t,n,r),c=0;c<u.length;c++)a=a.concat(u[c]);return s(t)&&(a.length>1&&(a=a.filter((function(t,e,n){return n.indexOf(t)===e}))),o=o.filter((function(t){return-1===a.indexOf(t)}))),o=b(o),H(o)},is:function(t){if(o(this[0]))return!1;for(var e=[this[0]],n=[],r=H(this[0]).match(t),i=0;i<r.length;i++)n=n.concat(r[i]);return e=e.filter((function(t){return-1!==n.indexOf(t)})),e.length>0},isSame:function(t){var e=arguments||[];t=t||e[0]||[];for(var n=e[1]||"",r=s(e[2])?e[2]:i,o=[],a=[],h=0;h<this.length;h++)o=o.concat(this[h]);for(var u=H(t,n,r),c=0;c<u.length;c++)a=a.concat(u[c]);if(o=H.unique(o),a=H.unique(a),o.length!==a.length)return!1;if(o===a)return!0;for(var l=0;l<o.length;l++)if(-1==a.indexOf(o[l]))return!1;return!0},isContains:function(t){var e=arguments||[];t=t||e[0];var n=e[1]||"",r=s(e[2])?e[2]:i,o=this[0],a=H(t,n,r)[0];return!!(s(o)&&s(a)&&s(o.contains))&&o.contains(a)},isContainsBy:function(t){var e=arguments||[];t=t||e[0];var n=e[1]||"",r=s(e[2])?e[2]:i,o=this[0],a=H(t,n,r)[0];return!!(s(a)&&s(o)&&s(a.contains))&&a.contains(o)},previous:function(){for(var t=(arguments||[])[0],e=[],n=[],r=0;r<this.length;r++){for(var o=this[r].previousSibling;o&&1!=o.nodeType;)o=o.previousSibling;if(e=e.concat(o),s(t))for(var a=H(t,"",this[r].ownerDocument||i),h=0;h<a.length;h++)n=n.concat(a[h])}return s(t)&&(n.length>1&&(n=n.filter((function(t,e,n){return n.indexOf(t)===e}))),e=e.filter((function(t){return-1!==n.indexOf(t)}))),e=b(e),H(e)},next:function(){for(var t=(arguments||[])[0],e=[],n=[],r=0;r<this.length;r++){for(var o=this[r].nextSibling;o&&1!=o.nodeType;)o=o.nextSibling;if(e=e.concat(o),s(t))for(var a=H(t,"",this[r].ownerDocument||i),h=0;h<a.length;h++)n=n.concat(a[h])}return s(t)&&(n.length>1&&(n=n.filter((function(t,e,n){return n.indexOf(t)===e}))),e=e.filter((function(t){return-1!==n.indexOf(t)}))),e=b(e),H(e)},first:function(){var t=this[0]?[this[0]]:[];if(!t)return H(t);var e=(arguments||[])[0],n=[];if(s(e))for(var r=H(e,"",t[0].ownerDocument||i),o=0;o<r.length;o++)n=n.concat(r[o]);return s(e)&&(n.length>1&&(n=n.filter((function(t,e,n){return n.indexOf(t)===e}))),t=t.filter((function(t){return-1!==n.indexOf(t)}))),t=b(t),H(t)},last:function(){var t=this[this.length-1]?[this[this.length-1]]:[];if(!t)return H(t);var e=(arguments||[])[0],n=[];if(s(e))for(var r=H(e,"",t[0].ownerDocument||i),o=0;o<r.length;o++)n=n.concat(r[o]);return s(e)&&(n.length>1&&(n=n.filter((function(t,e,n){return n.indexOf(t)===e}))),t=t.filter((function(t){return-1!==n.indexOf(t)}))),t=b(t),H(t)},clone:function(){for(var t=arguments,e=!s(t[0])||!1!==t[0],n=0;n<this.length;n++)if(s(this[n].cloneNode))return H(this[n].cloneNode(e));return this},addEvent:function(t){var e,n,r=arguments,i=!1,o=(t=t||r[0]||"").split(" ");if(s(r[3])?(e=r[1],n=r[2],i=!0===r[3]):s(r[2])?(e=r[1],n=r[2]):s(r[1])&&(n=r[1]),!d(n))return this;for(var h=0;h<this.length;h++){var u=this[h];u._jDomsEvents||(u._jDomsEvents={});for(var c=0;c<o.length;c++){var l,f=o[c];if(f)l=a(e)?function(t){for(var r=t.target;r&&r!==this;)H(r).is(e)&&n.call(r,t),r=r.parentNode}:n,u._jDomsEvents[f]||(u._jDomsEvents[f]=[]),u._jDomsEvents[f].push({originalCallback:n,handler:l,selectors:e||null}),u.addEventListener?u.addEventListener(f,l,i):u.attachEvent&&u.attachEvent("on"+f,l)}}return this},on:function(t){var e=arguments;t=e[0];var n=e[1],r=e[2],i=e[3];return this.addEvent(t,n,r,i)},removeEvent:function(t){var e,n,r=arguments,i=!1,o=(t=t||r[0]||"").split(" ");s(r[3])?(e=r[1],n=r[2],i=!0===r[3]):s(r[2])?(e=r[1],n=r[2]):s(r[1])&&(n=r[1]);for(var h=0;h<this.length;h++){var u=this[h];if(u._jDomsEvents)for(var c=0;c<o.length;c++){var l=o[c];if(l&&u._jDomsEvents[l])for(var f=u._jDomsEvents[l],p=f.length-1;p>=0;p--){var g=f[p],v=!d(n)||g.originalCallback===n,y=!a(e)||g.selectors===e;v&&y&&(u.removeEventListener?u.removeEventListener(l,g.handler,i):u.detachEvent&&u.detachEvent("on"+l,g.handler),f.splice(p,1))}}}return this},off:function(t){var e=arguments;t=e[0];var n=e[1],r=e[2],i=e[3];return this.removeEvent(t,n,r,i)},fireEvent:function(t){for(var e=0;e<this.length;e++){var n=i;if(this[e].ownerDocument?n=this[e].ownerDocument:9==this[e].nodeType&&(n=this[e]),this[e].dispatchEvent){var r="";switch(t){case"click":case"mousedown":case"mouseup":r="MouseEvents";break;case"focus":case"change":case"blur":case"select":r="HTMLEvents"}var o=n.createEvent(r),a="change"!=t;s(o.initEvent)&&o.initEvent(t,a,!0),o.synthetic=!0,this[e].dispatchEvent(o,!0)}else if(this[e].fireEvent&&n.createEventObject){(o=n.createEventObject()).synthetic=!0,this[e].fireEvent("on"+t,o)}}return this},trigger:function(t){return this.fireEvent(t)},create:function(){var t=[];if(a(this._))for(var e,n,r=this._.replace(/(?:\s*-\s*)+|\s{2,}/g," ").split(" "),o=0;o<r.length;o++){if(e=null,n=r[o].replace(/[^A-Za-z]/gi,""),a(this.__)&&(e=i.createElementNS(this.__,n),p(this.___)))try{for(var h in this.___)s(this.__.hasOwnProperty)&&!this.__.hasOwnProperty(h)||e.setAttribute(h,this.___[h])}catch(t){}if(p(this.__))try{for(var u in e=i.createElement(n),this.__)s(this.__.hasOwnProperty)&&!this.__.hasOwnProperty(u)||e.setAttribute(u,this.__[u]);e.innerHTML=this.___}catch(t){}if(e){if(s(arguments[0])){var c=arguments[0];if(p(c))try{for(var l in c)s(c.hasOwnProperty)&&!c.hasOwnProperty(l)||(e[l]=c[l])}catch(t){}}t=t.concat(e)}}return H(t)},createElement:function(){return this.create(arguments[0])},getHtml:function(){for(var t=arguments||[],n=0;n<this.length;n++){if(s(t[0])&&!0===t[0]){if(s(this[n].outerHTML))return this[n].outerHTML;e.insertAdjacentHTML("beforeBegin",code);e.previousSibling;e.parentElement.removeChild(e);var r="";if((s(this[n].nodeName)||s(this[n].tagName))&&s(this[n].attributes)){var i=this[n].nodeName||this[n].tagName;i=i.toLowerCase();for(var o="",a=0;a<this[n].attributes.length;a++)o+=this[n].attributes[a].nodeName,o+=this[n].attributes[a].nodeValue.indexOf('"')>-1?"'":'"',o+=this[n].attributes[a].nodeValue,o+=this[n].attributes[a].nodeValue.indexOf('"')>-1?"'":'"';return r=s(this[n].innerHTML)?this[n].innerHTML:"","<"+i+(""==o?"":" "+o)+(["!doctype","br","hr","img","link","meta","input"].indexOf(i)>-1?"/>":">"+r+"<"+i+">")}}if(s(this[n].innerHTML))return this[n].innerHTML}return""},setHtml:function(t){for(var e=arguments||[],n=0;n<this.length;n++){if(s(e[1])&&!0===e[1])if(s(this[n].outerHTML))this[n].outerHTML=t;else this[n].insertAdjacentHTML("beforeBegin",code),(this[n].parentElement||this[n].parentNode).removeChild(this[n]);else s(this[n].innerHTML)&&(this[n].innerHTML=t)}return this},html:function(){var t=arguments||[],e=s(t[0]),n=!0===(s(t[1])&&!0===t[1]);return e?this.setHtml(t[0],n):this.getHtml(n)},appendHtml:function(t){for(var e=0;e<this.length;e++)try{if(p(t)&&h(t.length)||f(t))for(var n=0;n<t.length;n++)this[e].appendChild(t[n]);else if(s(t.nodeType))this[e].appendChild(t);else{var r=i.createDocumentFragment(),o=i.createElement("span");o.innerHTML=t;for(var a=0;a<o.childNodes.length;a++)r.appendChild(o.childNodes[a]);this[e].appendChild(r)}}catch(t){}return this},append:function(t){return this.appendHtml(t)},prependHtml:function(t){for(var e=0;e<this.length;e++)try{if(p(t))if(s(t.hasOwnProperty))for(var n in t)t.hasOwnProperty(n)&&(this[e].firstChild?this[e].insertBefore(t[n],this[e].firstChild):this[e].appendChild(t[n]));else s(t.nodeType)&&(this[e].firstChild?this[e].insertBefore(t,this[e].firstChild):this[e].appendChild(t));else{var r=i.createDocumentFragment(),o=i.createElement("span");o.innerHTML=t;for(var a=0;a<o.childNodes.length;a++)r.appendChild(o.childNodes[a]);this[e].firstChild?this[e].insertBefore(r,this[e].firstChild):this[e].appendChild(r)}}catch(t){}return this},prepend:function(t){return this.prependHtml(t)},appendHtmlTo:function(t){var e=arguments;t=e[0]||t||[];var n=e[1]||"",r=s(e[2])?e[2]:i;return H(t,n,r).appendHtml(this)},appendTo:function(t){var e=arguments;t=e[0]||t||[];var n=e[1]||"",r=s(e[2])?e[2]:i;return this.appendHtmlTo(t,n,r)},prependHtmlTo:function(t){var e=arguments||[];t=t||e[0]||[];var n=e[1]||"",r=s(e[2])?e[2]:i;return H(t,n,r).prependHtml(this)},prependTo:function(t){var e=arguments;t=e[0]||t||[];var n=e[1]||"",r=s(e[2])?e[2]:i;return this.prependHtmlTo(t,n,r)},addBefore:function(t){for(var e=0;e<this.length;e++)try{if(p(t)){if(s(t.innerHTML)&&s(t.nodeName)&&s(t.nodeType)&&1==t.nodeType)this[e].insertAdjacentElement("beforebegin",t);else if(f(t)||v(t))for(var n=0;n<t.length;n++)t[n]&&s(t[n].innerHTML)&&s(t[n].nodeName)&&s(t[n].nodeType)&&1==t[n].nodeType?this[e].insertAdjacentElement("beforebegin",t[n]):l(t[n])&&this[e].insertAdjacentHTML("beforebegin",t[n]);else if(s(t.hasOwnProperty))for(var r in t)s(t.hasOwnProperty(r))&&(t[r]&&s(t[r].innerHTML)&&s(t[r].nodeName)&&s(t[r].nodeType)&&1==t[r].nodeType?this[e].insertAdjacentElement("beforebegin",t[r]):l(t[r])&&this[e].insertAdjacentHTML("beforebegin",t[r]))}else l(t)&&this[e].insertAdjacentHTML("beforebegin",t)}catch(t){}return this},addAfter:function(t){for(var e=0;e<this.length;e++)try{if(p(t)){if(s(t.innerHTML)&&s(t.nodeName)&&s(t.nodeType)&&1==t.nodeType)s(this[e].insertAdjacentElement)&&this[e].insertAdjacentElement("afterend",t);else if(f(t)||v(t))for(var n=0;n<t.length;n++)t[n]&&s(t[n].innerHTML)&&s(t[n].nodeName)&&s(t[n].nodeType)&&1==t[n].nodeType?this[e].insertAdjacentElement("afterend",t[n]):l(t[n])&&s(this[e].insertAdjacentHTML)&&this[e].insertAdjacentHTML("afterend",t[n]);else if(s(t.hasOwnProperty))for(var r in t)s(t.hasOwnProperty(r))&&(t[r]&&s(t[r].innerHTML)&&s(t[r].nodeName)&&s(t[r].nodeType)&&1==t[r].nodeType?this[e].insertAdjacentElement("afterend",t[r]):l(t[r])&&s(this[e].insertAdjacentHTML)&&this[e].insertAdjacentHTML("afterend",t[r]))}else l(t)&&s(this[e].insertAdjacentHTML)&&this[e].insertAdjacentHTML("afterend",t)}catch(t){}return this},before:function(t){return this.addBefore(t)},after:function(t){return this.addAfter(t)},setText:function(t){for(var e=arguments||[],n=!0===(s(e[1])&&!0===e[1]),r=0;r<this.length;r++)try{this[r]&&(n?s(this[r].outerText)?this[r].outerText=t:(t=i.createTextNode(t),H(this[r]).setHtml(t)):s(this[r].textContent)?this[r].textContent=t:s(this[r].innerText)?this[r].innerText=t:(t=i.createTextNode(t),H(this[r]).setHtml(t)))}catch(t){}return this},getText:function(){for(var t=arguments||[],e=!0===(s(t[1])&&!0===t[1]),n=0;n<this.length;n++)try{if(this[n])return e?s(this[n].outerText)?this[n].outerText:H(this[n]).getHtml():s(this[n].textContent)?this[n].textContent:s(this[n].innerText)?this[n].innerText:H(this[n]).getHtml(content,e)}catch(t){}return""},text:function(){var t=arguments||[],e=s(t[0]),n=!0===(s(t[1])&&!0===t[1]);return e?this.setText(t[0],n):this.getText(n)},attributesList:function(){for(var t={},e=0;e<this.length;e++){if(this[e].attributes){t={};for(var n=0;n<this[e].attributes.length;n++)s(this[e].attributes[n].name)&&(t[this[e].attributes[n].name]=this[e].attributes[n].value)}return t}return t},attrList:function(){return this.attributesList()},setAttribute:function(){for(var t=arguments||[],e=t[0]||"",n=t[1],r=0;r<this.length;r++)if(p(e)){for(var i in e)if(s(this[r].setAttribute))try{this[r].setAttribute(i,e[i])}catch(t){}}else if(a(e)&&s(n))try{this[r].setAttribute(e,n)}catch(t){}return this},setAttr:function(){var t=arguments||[],e=t[0]||"",n=t[1];return this.setAttribute(e,n)},getAttribute:function(t){for(var e=0;e<this.length;e++)if(a(t))return this[e].getAttribute(t);return null},getAttr:function(t){return this.getAttribute(t)},attribute:function(){for(var t=arguments||[],e=t[0],n=t[1],r=0;r<this.length;r++)return p(e)||a(e)&&s(n)?this.setAttribute(e,n):a(e)&&o(n)&&this[r]&&this[r].getAttribute?this.getAttribute(e)||null:this.attributesList();return[]},attr:function(){var t=arguments||[],e=t[0],n=t[1];return this.attribute(e,n)},removeAttribute:function(t){for(var e=0;e<this.length;e++)if(this[e]&&s(this[e].removeAttribute))if(a(t))this[e].removeAttribute(t);else if(f(t))for(var n=0;n<t.length;n++)this[e].removeAttribute(t[n]);else if(g(t))for(var r in t)s(t.hasOwnProperty)&&!t.hasOwnProperty(r)||this[e].removeAttribute(t[r]);return this},removeAttr:function(t){return this.removeAttribute(t)},setProperty:function(t,e){for(var n=0;n<this.length;n++)if(this[n])if(p(t))for(var r in t)try{this[n][r]=t[r]}catch(t){}else if(a(t))try{this[n][t]=e}catch(t){}return this},setProp:function(t,e){return this.setProperty(t,e)},getProperty:function(t){for(var e=0;e<this.length;e++)if(a(t))try{return this[e][t]}catch(t){return null}return null},getProp:function(t){return this.getProperty(t)},property:function(){for(var t=arguments||[],e=t[0],n=t[1],r=0;r<this.length;r++){if(p(e))return this.setProperty(e);if(a(e)&&s(n))return this.setProperty(e,n);if(a(e)&&o(n))return this.getProperty(e)}return this},prop:function(){var t=arguments||[],e=t[0],n=t[1];return this.property(e,n)},removeProperty:function(t){for(var e=0;e<this.length;e++)if(s(this[e]))try{delete this[e][t],d(this[e].removeAttribute)&&this[e].removeAttribute(t)}catch(t){}return this},removeProp:function(t){return this.removeProperty(t)},getStyle:function(e){for(var n=0;n<this.length;n++)if(a(e)){if(this[n].style&&this[n].style[e])return this[n].style[e];var r=(this[n].ownerDocument||i).defaultView||t;if(r&&s(r.getComputedStyle))return r.getComputedStyle(this[n],null).getPropertyValue(e);if(this[n].currentStyle)return this[n].currentStyle[e];if(this[n].style)return this[n].style.getPropertyValue?this[n].style.getPropertyValue(e):this[n].style[e]}return""},setStyle:function(t){var e=arguments||[];t=t||e[0];var n=e[1],r=e[2];r=s(r)&&("important"==r||!0===r)?"important":"";for(var i=0;i<this.length;i++)if(p(t)){for(var o in t)if(this[i].style)try{this[i].style.setProperty&&(this[i].style[o]=t[o],this[i].style.setProperty(o,t[o],r))}catch(t){}}else if(a(t)&&s(n)&&this[i].style)try{this[i].style.setProperty&&(this[i].style[t]=n,this[i].style.setProperty(t,n,r))}catch(t){}return this},removeStyle:function(t){for(var e=0;e<this.length;e++)if(p(t)){t=Object.entries(t);for(var n=0;n<t.length;n++)this[e].style&&(this[e].style[t[n]]="",this[e].style[t[n]]=null,s(this[e].style.removeProperty)&&this[e].style.removeProperty(t[n]))}else a(t)&&this[e].style&&(this[e].style[t]="",this[e].style[t]=null,s(this[e].style.removeProperty)&&this[e].style.removeProperty(t));return this},style:function(){for(var t=arguments||[],e=t[0],n=t[1],r=t[2],i=0;i<this.length;i++)if(p(e))this.setStyle(e,n,r);else if(a(e)&&s(n))this.setStyle(e,n,r);else if(a(e)&&o(n))return this.getStyle(e);return this},css:function(){var t=arguments||[],e=t[0],n=t[1],r=t[2];return this.style(e,n,r)},getValue:function(){for(var t=0;t<this.length;t++)if(s(this[t].value))return this[t].value;return""},getVal:function(){return this.getValue()},setValue:function(t){for(var e=0;e<this.length;e++)if(s(this[e])&&s(t)&&s(this[e].value))try{this[e].value=t}catch(t){}return this},setVal:function(t){return this.setValue(t)},value:function(){for(var t=(arguments||[])[0],e=0;e<this.length;e++)if(s(this[e])){if(!s(t))return s(this[e].value)?this[e].value:"";if(s(this[e].value))try{this[e].value=t}catch(t){}}return s(t)?this:""},val:function(){var t=(arguments||[])[0];return this.value(t)},remove:function(){for(var t=0;t<this.length;t++)try{this[t]&&this[t].remove?this[t].remove():this[t]&&this[t].parentNode&&this[t].parentNode.removeChild(this[t])}catch(t){}return this},hide:function(){for(var t=arguments,e=s(t[0])&&!1===t[0]?"":"important",n=0;n<this.length;n++)this[n]&&this[n].style&&this[n].style.setProperty("display","none",e);return this},show:function(){var t="block",e=arguments,n=s(e[0])?e[0]:t;try{n=n&&["inherit","initial","inline","block","contents","flex","grid","inline-block","inline-flex","inline-grid","inline-table","list-item","run-in","table","table-caption","table-header-group","table-footer-group","table-column","table-column-group","table-row","table-row-group","table-cell"].indexOf(n)>-1?n.toLowerCase():t}catch(e){n=t}return this.setStyle("display",n,"important")},classList:function(){for(var t=[],e=0;e<this.length;e++){if(s(this[0].classList))return this[e].classList;if(s(this[e].getAttribute)){t=[];var n=s(this[e].getAttribute);if(n)for(var r=n.split(" "),i=0;i<r.length;i++)""!=r[e]&&(t=t.concat(r[e]));return t}}return t},hasClass:function(t){for(var e=0;e<this.length;e++){if(this[e]&&this[e].classList){if(this[e].classList.contains(t))return!0}else if(this[e]&&this[e].className&&(" "+this[e].className+" ").replace(/[\n\t]/g," ").indexOf(" "+t+" ")>-1)return!0}return!1},addClass:function(t){if(a(t))for(var e,n,r=0;r<this.length;r++)try{this[r]&&s(this[r].classList)?this[r].classList.add(t):(e=H(this[r]),-1==(n=H(this[r]).classList()).indexOf(t)&&(n=n.concat(t),e.setAttribute("class",n.join(" "))))}catch(t){}return this},removeClass:function(t){if(a(t))for(var e,n,r=0;r<this.length;r++)try{if(this[r]&&s(this[r].classList))this[r].classList.remove(t);else if(e=H(this[r]),n=H(this[r]).classList(),(n=H.unique(n)).indexOf(t)>-1){for(var i=0;i<n.length;i++)if(n[i]==t){n.splice(i,1);break}e.setAttribute("class",n.join(" "))}}catch(t){}return this},class:function(){return this.classList()},empty:function(){for(var t=0;t<this.length;t++)this[t]&&(s(this[t].value)?this[t].value="":s(this[t].innerHTML)&&(this[t].innerHTML=""));return this},normalize:function(){for(var t=0;t<this.length;t++)s(this[t].normalize)&&this[t].normalize();return this},getWidth:function(){for(var t=0;t<this.length;t++)return this[t].clientWidth?this[t].clientWidth:0;return 0},getHeight:function(){for(var t=0;t<this.length;t++)return this[t].clientHeight?this[t].clientHeight:0;return 0},setWidth:function(t){return h(t)&&(t+="px"),this.setStyle("width",t)},setHeight:function(t){return h(t)&&(t+="px"),this.setStyle("height",t)},width:function(){var t=(arguments||[])[0];return s(t)?this.setWidth(t):this.getWidth()},height:function(){var t=(arguments||[])[0];return s(t)?this.setHeight(t):this.getHeight()},offsetWidth:function(){for(var t=0;t<this.length;t++)return this[t].offsetWidth?this[t].offsetWidth:this[t].getBoundingClientRect?this[t].getBoundingClientRect().width:0;return 0},offsetHeight:function(){for(var t=0;t<this.length;t++)return this[t].offsetHeight?this[t].offsetHeight:this[t].getBoundingClientRect?this[t].getBoundingClientRect().height:0;return 0},offsetLeft:function(){for(var t=0;t<this.length;t++)return this[t].offsetLeft?this[t].offsetLeft:this[t].getBoundingClientRect?this[t].getBoundingClientRect().left:0;return 0},offsetTop:function(){for(var t=0;t<this.length;t++)return this[t].offsetTop?this[t].offsetTop:this[t].getBoundingClientRect?this[t].getBoundingClientRect().top:0;return 0},offset:function(){for(var t={left:0,top:0,x:0,y:0},e=0;e<this.length;e++){if(s(this[e].offsetLeft)&&(t.left=t.x=this[e].offsetLeft),s(this[e].offsetTop)&&(t.top=t.y=this[e].offsetTop),s(this[e].getBoundingClientRect)){var n=this[e].getBoundingClientRect();t.left=n.left,t.x=n.x,t.top=n.top,t.y=n.y}return t}return t},innerWidth:function(){for(var t=0;t<this.length;t++){var e=H(this[t]).getStyle("width");e=isNaN(parseFloat(e))?0:parseFloat(e);var n=H(this[t]).getStyle("padding-left");n=isNaN(parseFloat(n))?0:parseFloat(n);var r=H(this[t]).getStyle("padding-right");r=isNaN(parseFloat(r))?0:parseFloat(r);var i=H(this[t]).getStyle("border-left");i=isNaN(parseFloat(i))?0:parseFloat(i);var o=H(this[t]).getStyle("border-right");o=isNaN(parseFloat(o))?0:parseFloat(o);var a=H(this[t]).getStyle("box-sizing");return e||(s(this[t].offsetWidth)?"border-box"==a?this[t].offsetWidth:this[t].offsetWidth-(n+r):s(this[t].getBoundingClientRect)?"border-box"==a?this[t].getBoundingClientRect().width:this[t].getBoundingClientRect().width-(n+r+i+o):0)}return 0},innerHeight:function(){for(var t=0;t<this.length;t++){var e=H(this[t]).getStyle("height");e=isNaN(parseFloat(e))?0:parseFloat(e);var n=H(this[t]).getStyle("padding-top");n=isNaN(parseFloat(n))?0:parseFloat(n);var r=H(this[t]).getStyle("padding-bottom");r=isNaN(parseFloat(r))?0:parseFloat(r);var i=H(this[t]).getStyle("border-top");i=isNaN(parseFloat(i))?0:parseFloat(i);var o=H(this[t]).getStyle("border-bottom");o=isNaN(parseFloat(o))?0:parseFloat(o);var a=H(this[t]).getStyle("box-sizing");return e||(s(this[t].offsetHeight)?"border-box"==a?this[t].offsetHeight:this[t].offsetHeight-(n+r):s(this[t].getBoundingClientRect)?"border-box"==a?this[t].getBoundingClientRect().height:this[t].getBoundingClientRect().height-(n+r+i+o):0)}return 0},outerWidth:function(){for(var t=0;t<this.length;t++){var e=H(this[t]).getStyle("width");e=isNaN(parseFloat(e))?0:parseFloat(e);var n=H(this[t]).getStyle("padding-left");n=isNaN(parseFloat(n))?0:parseFloat(n);var r=H(this[t]).getStyle("padding-right");r=isNaN(parseFloat(r))?0:parseFloat(r);var i=H(this[t]).getStyle("border-left");i=isNaN(parseFloat(i))?0:parseFloat(i);var o=H(this[t]).getStyle("border-right");o=isNaN(parseFloat(o))?0:parseFloat(o);var a=H(this[t]).getStyle("margin-left");a=isNaN(parseFloat(a))?0:parseFloat(a);var h=H(this[t]).getStyle("margin-right");h=isNaN(parseFloat(h))?0:parseFloat(h);var u=H(this[t]).getStyle("box-sizing");return s(this[t].getBoundingClientRect)?this[t].getBoundingClientRect().width+(a+h):s(this[t].clientWidth)?this[t].clientWidth+(a+h):"border-box"==u?e+a:e+(n+r+i+o+a+h)}return 0},outerHeight:function(){for(var t=0;t<this.length;t++){var e=H(this[t]).getStyle("height");e=isNaN(parseFloat(e))?0:parseFloat(e);var n=H(this[t]).getStyle("padding-top");n=isNaN(parseFloat(n))?0:parseFloat(n);var r=H(this[t]).getStyle("padding-bottom");r=isNaN(parseFloat(r))?0:parseFloat(r);var i=H(this[t]).getStyle("border-top");i=isNaN(parseFloat(i))?0:parseFloat(i);var o=H(this[t]).getStyle("border-bottom");o=isNaN(parseFloat(o))?0:parseFloat(o);var a=H(this[t]).getStyle("margin-top");a=isNaN(parseFloat(a))?0:parseFloat(a);var h=H(this[t]).getStyle("margin-bottom");h=isNaN(parseFloat(h))?0:parseFloat(h);var u=H(this[t]).getStyle("box-sizing");return s(this[t].getBoundingClientRect)?this[t].getBoundingClientRect().height+a+h:s(this[t].clientHeight)?this[t].clientHeight+a+h:"border-box"==u?e+a+h:e+n+r+i+o+a+h}return 0},scrollWidth:function(){for(var t=0;t<this.length;t++)return this[t]&&s(this[t].scrollWidth)?this[t].scrollWidth:0;return 0},scrollHeight:function(){for(var t=0;t<this.length;t++)return this[t]&&s(this[t].scrollHeight)?this[t].scrollHeight:0;return 0},scrollTop:function(){for(var t=0;t<this.length;t++)return this[t]&&s(this[t].scrollTop)?this[t].scrollTop:0;return 0},scrollLeft:function(){for(var t=0;t<this.length;t++)return this[t]&&s(this[t].scrollLeft)?this[t].scrollLeft:0;return 0},scrollTo:function(){for(var t=arguments||[],e=t[0],n=t[1],r=0;r<this.length;r++)try{s(this[r].scrollTo)&&(g(e)?(o(e.top)&&s(e.y)&&(e.top=e.y),o(e.left)&&s(e.x)&&(e.left=e.x),this[r].scrollTo(e)):!h(e)||!h(n)&&s(n)||this[r].scrollTo(e,n||0))}catch(t){}return this},scrollBy:function(){for(var t=arguments||[],e=t[0],n=t[1],r=0;r<this.length;r++)try{s(this[r].scrollBy)&&(g(e)?(o(e.top)&&s(e.y)&&(e.top=e.y),o(e.left)&&s(e.x)&&(e.left=e.x),this[r].scrollBy(e)):!h(e)||!h(n)&&s(n)||this[r].scrollBy(e,n||0))}catch(t){}return this},click:function(){for(var t=0;t<this.length;t++)if(this[t].click)return this[t].click(),H(this[t]);return null},focus:function(){for(var t=0;t<this.length;t++)if(this[t].focus)return this[t].focus(),H(this[t]);return null},blur:function(){for(var t=0;t<this.length;t++)if(this[t].blur)return this[t].blur(),H(this[t]);return null},select:function(){for(var t=0;t<this.length;t++)if(this[t].select)return this[t].select(),H(this[t]);return null},delay:function(t,e){var n,r=(n=0,function(t,e){clearTimeout(n),n=setTimeout(t,e)});return r(t,e)},openFullscreen:function(){for(var t=0;t<this.length;t++)return this[t].requestFullscreen?(this[t].requestFullscreen(),!0):this[t].webkitRequestFullscreen?(this[t].webkitRequestFullscreen(),!0):!!this[t].msRequestFullscreen&&(this[t].msRequestFullscreen(),!0);return!1},document:function(){for(var e=0;e<this.length;e++)return this[e].nodeType&&9==this[e].nodeType?this[e]:this[e].ownerDocument||this.ownerDocument||i;return this.ownerDocument||t.document||i||null},window:function(){for(var e=this.document||i,n=0;n<this.length;n++)e=this[n].nodeType&&9==this[n].nodeType?this[n]:this[n].ownerDocument||this.ownerDocument||i;return e.defaultView||t||this.window||globalThis||null},buildQuery:function(){var t=arguments||[],e="",n=s(t[0])?t[0]:s(this[0])&&s(this[0].elements)?this[0].elements:this._;if(p(n)){if(u(n.length))for(var r=0;r<n.length;r++)n[r].name&&("radio"==n[r].type.toLowerCase()||"checkbox"==n[r].type.toLowerCase()?1==n[r].checked&&(e+=n[r].name+"="+encodeURIComponent(n[r].value)+"&"):e+=n[r].name+"="+encodeURIComponent(n[r].value)+"&");else for(var i in n)if(s(n.hasOwnProperty)&&n.hasOwnProperty(i))try{e+=i+"="+encodeURIComponent(n[i])+"&"}catch(t){}}else if(f(n))for(var i in n)try{e+=i+"="+encodeURIComponent(n[i])+"&"}catch(t){}return e.length>2&&(e=e.substring(0,e.length-1)),e},buildFormData:function(){return d(FormData)&&s(this[0])&&s(this[0].elements)?new FormData(this[0]):null},dateParse:function(){var t=this._||{};return S(t)},urlParse:function(){var t=this._||{};return N(t)},xmlParse:function(){var t=arguments||[];if(s(t[0]))return L(t[0]);for(var e=0;e<this.length;e++)return L(this[e]);return L({})},htmlParse:function(){var t=arguments||[];if(s(t[0]))return j(t[0]);for(var e=0;e<this.length;e++)return j(this[e]);return j({})},jsonParse:function(){var t=arguments||[];if(s(t[0]))return x(t[0]);for(var e=0;e<this.length;e++)return x(this[e]);return x({})}},H=function(){var t=arguments||[],e=t[0]||[],a=t[1]||"",h=s(t[2])?t[2]:i,u=new H.qsAll(e,a,h);for(var c in H.qsAll.prototype.constructor=H,H.qsAll.prototype.version=n,H.qsAll.prototype.developer=r,H.qsAll.prototype._=e,H.qsAll.prototype.__=a,H.qsAll.prototype.___=h,F)s(F.hasOwnProperty)&&!F.hasOwnProperty(c)||o(c)||o(F[c])||(H.qsAll.prototype[c]=F[c]);for(var l in H.fnc)s(H.fnc.hasOwnProperty)&&!H.fnc.hasOwnProperty(l)||o(l)||o(H.fnc[l])||s(F[l])||(H.qsAll.prototype[l]=H.fnc[l]);return u};return H.qsAll=function(t){var e=arguments||[];t=t||e[0]||[];var n=e[1]||"",r=s(e[2])?e[2]:i,o=[],h=null,u=0;try{if(t instanceof Window)o=[t],h="window";else if(t instanceof Document)o=[t],h="document";else if(t&&"object"==typeof t)if(v(t)){for(var c=0;c<t.length;c++)s(t[c])&&(o=o.concat(t[c]));h="jDoms"}else f(t)?(o=t,h="array"):s(t.nodeType)&&s(t.nodeName)&&s(t.nodeValue)?(o=[t],h="node"):(o=t,h="object");else if(a(t))if(s(r.querySelectorAll))o=r.querySelectorAll(t),h="query_selector_all";else if("#"==t.substr(0,1)&&t.replace(/[\.\/\`\'\=\<\>\~\%\(\)\[\]\{\}\|\*\^\:\"\s\\]/gi,"")==t&&s(r.getElementById)){var l=r.getElementById(t.substr(1));o=null==l?[]:[l],h="id"}else"."==t.substr(0,1)&&t.replace(/[\#\/\\\"\`\'\=\<\>\~\%\(\)\[\]\{\}\|\*\^\:\s]/gi,"")==t&&s(r.getElementsByClassName)?(o=null==(o=r.getElementsByClassName(t.substr(1)))?[]:o,h="class_name"):"[name="==t.substr(0,6)&&"]"==t.substr(-1)&&t.substr(6,t.length-7).replace(/^[\s+\"\']|[\s+\"\']$/gm,"")==t.substr(6,t.length-7).replace(/[^A-Za-z0-9_-]/gi,"")&&s(r.getElementsByName)?(o=null==(o=r.getElementsByName(t.substr(6,t.length-7).replace(/^[\s+\"\']|[\s+\"\']$/gm,"")))?[]:o,h="name"):t.replace(/[^A-Za-z0-9_-]/gi,"")==t&&s(r.getElementsByTagName)?(o=null==(o=r.getElementsByTagName(t))?[]:o,h="tag_name"):a(n)&&(o=null==(o=r.getElementsByTagNameNS(n,t))?[]:o,h="tag_name_ns")}catch(t){o=[],h="error_catch"}for(var d in"object"!=typeof o||["window","document","jDoms","object","array","id","node"].indexOf(h)>-1||(o="function"!=typeof Array||"function"!=typeof Array.from||"function"!=typeof Array.isArray||Array.isArray(o)?"function"==typeof Object&&"function"==typeof Object.entries?Object.entries(o):o:Array.from(o)),o)this[parseInt(d)]=o[d],u++;return this.length=u||0,this},H.fnc=H.prototype={},H.version=n,H.developer=r,H.isUndefined=function(t){return o(t)},H.isDefined=function(t){return function(t){return void 0!==t}(t)},H.isSet=function(t){return s(t)},H.isString=function(t){return a(t)},H.isNumber=function(t){return h(t)},H.isInt=function(t){return u(t)},H.isInteger=function(t){return u(t)},H.isFinite=function(t){return function(t){return isFinite(t)}(t)},H.isInfinity=function(t){return function(t){return"number"==typeof t&&!isFinite(t)}(t)},H.isBoolean=function(t){return c(t)},H.isBigInt=function(t){return function(t){return"bigint"==typeof t}(t)},H.isFlatten=function(t){return l(t)},H.isEmpty=function(t){return function(t){return!!(void 0===t||""===t||0===t||f(t)&&0===t.length||g(t)&&0===Object.keys(t).length||!1===t||null===t||isNaN(t))}(t)},H.isArray=function(t){return f(t)},H.isFunction=function(t){return d(t)},H.isObject=function(t){return p(t)},H.isPureObject=function(t){return g(t)},H.isSymbol=function(t){return function(t){return"symbol"==typeof t}(t)},H.isjDoms=function(t){return v(t)},H.isUnique=function(t){return function(t){return y(t)==y(b(t))}(t)},H.sizeOf=function(t){return y(t)},H.trim=function(t){return m(t)},H.unique=function(t){return b(t)},H.merge=function(t,e){return w(t,e)},H.escape=function(t){return T(t)},H.encodeString=function(t){return T(t)},H.unescape=function(t){return C(t)},H.decodeString=function(t){return C(t)},H.encodeBase64=function(t){return O(t)},H.decodeBase64=function(t){return A(t)},H.stringify=function(t){return E.getString(t)},H.delay=function(t,e){return function(t,e){var n,r=(n=0,function(t,e){clearTimeout(n),n=setTimeout(t,e||0)});return r(t,e)}(t,e)},H.now=function(){return(new Date).getTime()},H.promise=function(t,e){return function(t,e){var n=function(t){this.state="pending",this.value=void 0,this.consumers=[],t(this.resolve.bind(this),this.reject.bind(this))};return n.prototype.fulfill=function(t){"pending"===this.state&&(this.state="fulfilled",this.value=t,this.done())},n.prototype.reject=function(t){"pending"===this.state&&(this.state="rejected",this.value=t,this.done())},n.prototype.then=function(t,e){var r=new n((function(){}));return r.onFulfilled=d(t)?t:null,r.onRejected=d(e)?e:null,this.consumers=this.consumers.concat(r),this.done(),r},n.prototype.done=function(){var t=this;if("pending"!==this.state){var e="fulfilled"==this.state?"onFulfilled":"onRejected",n="fulfilled"==this.state?"resolve":"reject";setTimeout((function(){var r=t.consumers.splice(0);for(var i in r){var o=r[i];try{var s=o[e];s?o.resolve(s(t.value)):o[n](t.value)}catch(t){o.reject(t)}}}),0)}},n.prototype.resolve=function(t){var e,r;if(this===t)throw new TypeError("Circular reference: promise value is promise itself");if(t instanceof n)t.then(this.resolve.bind(this),this.reject.bind(this));else if(t===Object(t))try{r=t.then,d(r)?r.call(t,function(t){e||(e=!0,this.resolve(t))}.bind(this),function(t){e||(e=!0,this.reject(t))}.bind(this)):this.fulfill(t)}catch(t){if(e)return;this.reject(t)}else this.fulfill(t)},new n(t,e)}(t,e)},H.dateParse=function(t){return S(t)},H.urlParse=function(t){return N(t)},H.jsonParse=function(t){return x(t)},H.xmlParse=function(t){return L(t)},H.htmlParse=function(t){return j(t)},H.ajax=function(e){return function(e){var n;if(e=e||{},"undefined"!=typeof XMLHttpRequest)n=new XMLHttpRequest;else{if("undefined"==typeof ActiveXObject)throw new Error("No XHR support");n=new ActiveXObject("Microsoft.XMLHTTP")}e.xhr&&p(e.xhr)&&(n=e.xhr),a(e.enctype)&&("multipart/form-data"===e.enctype||e.enctype);var r="";a(e.url)&&(r=e.url);var i="GET";a(e.method)&&["GET","POST","PUT","DELETE","HEAD","OPTIONS","PATCH"].indexOf(e.method.toUpperCase())>-1&&(i=e.method.toUpperCase());var u=!0;if(c(e.async)&&(u=e.async),e.onBefore)try{e.onBefore(n)}catch(t){}var d=null;if(!p(e.data)||"undefined"!=typeof FormData&&e.data instanceof FormData)a(e.data)?(d=e.data,"GET"!==i&&"PUT"!==i||!d||(r+=(-1===r.indexOf("?")?"?":"&")+("?"===d[0]?d.slice(1):d),d=null)):"undefined"!=typeof FormData&&e.data instanceof FormData&&(d=e.data);else if("undefined"!=typeof FormData&&e.useFormData)for(var g in d=new FormData,e.data)e.data.hasOwnProperty&&!e.data.hasOwnProperty(g)||d.append(g,e.data[g]);else if("GET"===i||"PUT"===i){var v=[];for(var y in e.data)e.data.hasOwnProperty&&!e.data.hasOwnProperty(y)||v.push(encodeURIComponent(y)+"="+encodeURIComponent(e.data[y]));v.length&&(r+=(-1===r.indexOf("?")?"?":"&")+v.join("&"))}else{var m=[];for(var b in e.data)e.data.hasOwnProperty&&!e.data.hasOwnProperty(b)||m.push(encodeURIComponent(b)+"="+encodeURIComponent(e.data[b]));d=m.join("&")}try{n.withCredentials=(N(r).hostname||t.location.hostname)!==t.location.hostname}catch(t){}if(c(e.credentials)&&(n.withCredentials=e.credentials),a(e.type))try{n.responseType=e.type}catch(t){}if(n.open(i,r,u),"POST"===i&&!(d instanceof FormData))try{n.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8")}catch(t){}if(a(e.username)||h(e.username)||a(e.password)||h(e.password)){var w=a(e.authType)?e.authType:"Basic",T="";s(e.username)&&s(e.password)?T=O(e.username+":"+e.password):s(e.username)&&o(e.password)?T=O(String(e.username)):o(e.username)&&s(e.password)&&(T=O(String(e.password)));try{n.setRequestHeader("Authorization",w+" "+T)}catch(t){}}if(l(e.cache))try{n.setRequestHeader("Cache-Control",e.cache)}catch(t){}if(p(e.headers)||f(e.headers))for(var C in e.headers)if(!e.headers.hasOwnProperty||e.headers.hasOwnProperty(C))try{n.setRequestHeader(C,e.headers[C])}catch(t){}if(e.timeout&&(h(e.timeout)||a(e.timeout)))try{n.timeout=parseInt(e.timeout,10)}catch(t){}n.onreadystatechange=function(){if(e.onReadyStateChange)try{e.onReadyStateChange(n,this.readyState,this.status)}catch(t){}if(0===this.readyState){if(e.onNotConnected)try{e.onNotConnected(n)}catch(t){}}else if(1===this.readyState){if(e.onConnected)try{e.onConnected(n)}catch(t){}}else if(2===this.readyState){if(e.onReceived)try{e.onReceived(n)}catch(t){}}else if(3===this.readyState){if(e.onLoading)try{e.onLoading(n)}catch(t){}}else if(4===this.readyState){if(e.onComplete)try{e.onComplete(n)}catch(t){}if(this.status>=200&&this.status<300){if(e.onSuccess)try{e.onSuccess(n)}catch(t){}}else if(e.onError)try{e.onError(n)}catch(t){}}},n.onloadstart=function(t){if(e.onLoadStart)try{e.onLoadStart(t)}catch(t){}},n.onloadend=function(t){if(e.onLoadEnd)try{e.onLoadEnd(t)}catch(t){}},n.ontimeout=function(t){if(e.onTimeout)try{e.onTimeout(t)}catch(t){}},n.onload=function(t){if(e.onLoad)try{e.onLoad(t)}catch(t){}},n.onprogress=function(t){if(e.onProgress)try{e.onProgress(t)}catch(t){}},n.onabort=function(t){if(e.onAbort)try{e.onAbort(t)}catch(t){}},n.onerror=function(t){if(e.onError)try{e.onError(t)}catch(t){}};try{n.send(d)}catch(t){if(e.onError)try{e.onError(t)}catch(t){}}return n}(e)},H.document=function(){for(var e=0;e<this.length;e++)return this[e].nodeType&&9==this[e].nodeType?this[e]:this[e].ownerDocument||this.ownerDocument||i;return this.ownerDocument||t.document||i||null},H.window=function(){for(var e=this.document||i,n=0;n<this.length;n++)e=this[n].nodeType&&9==this[n].nodeType?this[n]:this[n].ownerDocument||this.ownerDocument||i;return e.defaultView||t||this.window||globalThis||null},H.userAgent=function(){return s(t.navigator)&&s(t.navigator.userAgent)?t.navigator.userAgent:""},H.isCookie=function(){return!(!s(t.navigator)||!s(t.navigator.cookieEnabled))&&navigator.cookieEnabled},H.setCookie=function(e,n,r){try{if(!navigator||!navigator.cookieEnabled)return!1;var o=(arguments||[])[3]||"/",s="https:"==t.location.protocol,a=new Date;a.setTime(a.getTime()+parseInt(r));var h="expires="+a.toUTCString();return i.cookie=e+"="+n+";"+h+";path="+o+";"+(s?"SameSite=None; Secure;":""),!0}catch(t){return!1}},H.getCookie=function(t){for(var e=t+"=",n=i.cookie.split(";"),r=0;r<n.length;r++){for(var o=n[r];" "==o.charAt(0);)o=o.substring(1);if(0==o.indexOf(e))return o.substring(e.length,o.length)}return null},H.removeCookie=function(t){try{var e=new Date(0);return i.cookie=t+"=; path=/; expires="+e.toUTCString()+";",!0}catch(t){return!1}},H.geo=function(e){var n={result:!1,accuracy:null,altitude:null,altitudeAccuracy:null,heading:null,latitude:null,longitude:null,speed:null,timestamp:(new Date).getTime()};s(t.navigator)&&s(t.navigator.geolocation)?navigator.geolocation.getCurrentPosition((function(t){n.result=t.coords.result=!0,n.accuracy=t.coords.accuracy||null,n.altitude=t.coords.altitude||null,n.altitudeAccuracy=t.coords.altitudeAccuracy||null,n.heading=t.coords.heading||null,n.latitude=t.coords.latitude||null,n.longitude=t.coords.longitude||null,n.speed=t.coords.speed||null,n.timestamp=(new Date).getTime(),e(n)})):(n.timestamp=(new Date).getTime(),e(n))},H.closeFullscreen=function(){return i.exitFullscreen?(i.exitFullscreen(),!0):i.webkitExitFullscreen?(i.webkitExitFullscreen(),!0):!!i.msExitFullscreen&&(i.msExitFullscreen(),!0)},H.active=function(){return H(H.document().activeElement)},H.activeDom=function(){return H(H.document().activeElement)},H.domReady=function(e){var n=!1,r=!0,i=!1,o=t||globalThis||self,s=o.document,a=s.documentElement,h=s.addEventListener?"addEventListener":"attachEvent",u=s.addEventListener?"removeEventListener":"detachEvent",c=s.addEventListener?"":