27 lines
189 KiB
JavaScript
27 lines
189 KiB
JavaScript
!function(){"use strict";function t(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var e,n={exports:{}};
|
||
/*!
|
||
* jQuery JavaScript Library v3.7.1
|
||
* https://jquery.com/
|
||
*
|
||
* Copyright OpenJS Foundation and other contributors
|
||
* Released under the MIT license
|
||
* https://jquery.org/license
|
||
*
|
||
* Date: 2023-08-28T13:37Z
|
||
*/var o,r,i,a=(e||(e=1,o="undefined"!=typeof window?window:n.exports,r=function(t,e){var n=[],o=Object.getPrototypeOf,r=n.slice,i=n.flat?function(t){return n.flat.call(t)}:function(t){return n.concat.apply([],t)},a=n.push,s=n.indexOf,l={},c=l.toString,u=l.hasOwnProperty,d=u.toString,f=d.call(Object),h={},p=function(t){return"function"==typeof t&&"number"!=typeof t.nodeType&&"function"!=typeof t.item},g=function(t){return null!=t&&t===t.window},m=t.document,v={type:!0,src:!0,nonce:!0,noModule:!0};function y(t,e,n){var o,r,i=(n=n||m).createElement("script");if(i.text=t,e)for(o in v)(r=e[o]||e.getAttribute&&e.getAttribute(o))&&i.setAttribute(o,r);n.head.appendChild(i).parentNode.removeChild(i)}function b(t){return null==t?t+"":"object"==typeof t||"function"==typeof t?l[c.call(t)]||"object":typeof t}var w="3.7.1",x=/HTML$/i,E=function(t,e){return new E.fn.init(t,e)};function C(t){var e=!!t&&"length"in t&&t.length,n=b(t);return!p(t)&&!g(t)&&("array"===n||0===e||"number"==typeof e&&e>0&&e-1 in t)}function T(t,e){return t.nodeName&&t.nodeName.toLowerCase()===e.toLowerCase()}E.fn=E.prototype={jquery:w,constructor:E,length:0,toArray:function(){return r.call(this)},get:function(t){return null==t?r.call(this):t<0?this[t+this.length]:this[t]},pushStack:function(t){var e=E.merge(this.constructor(),t);return e.prevObject=this,e},each:function(t){return E.each(this,t)},map:function(t){return this.pushStack(E.map(this,(function(e,n){return t.call(e,n,e)})))},slice:function(){return this.pushStack(r.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(E.grep(this,(function(t,e){return(e+1)%2})))},odd:function(){return this.pushStack(E.grep(this,(function(t,e){return e%2})))},eq:function(t){var e=this.length,n=+t+(t<0?e:0);return this.pushStack(n>=0&&n<e?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:a,sort:n.sort,splice:n.splice},E.extend=E.fn.extend=function(){var t,e,n,o,r,i,a=arguments[0]||{},s=1,l=arguments.length,c=!1;for("boolean"==typeof a&&(c=a,a=arguments[s]||{},s++),"object"==typeof a||p(a)||(a={}),s===l&&(a=this,s--);s<l;s++)if(null!=(t=arguments[s]))for(e in t)o=t[e],"__proto__"!==e&&a!==o&&(c&&o&&(E.isPlainObject(o)||(r=Array.isArray(o)))?(n=a[e],i=r&&!Array.isArray(n)?[]:r||E.isPlainObject(n)?n:{},r=!1,a[e]=E.extend(c,i,o)):void 0!==o&&(a[e]=o));return a},E.extend({expando:"jQuery"+(w+Math.random()).replace(/\D/g,""),isReady:!0,error:function(t){throw new Error(t)},noop:function(){},isPlainObject:function(t){var e,n;return!(!t||"[object Object]"!==c.call(t)||(e=o(t))&&("function"!=typeof(n=u.call(e,"constructor")&&e.constructor)||d.call(n)!==f))},isEmptyObject:function(t){var e;for(e in t)return!1;return!0},globalEval:function(t,e,n){y(t,{nonce:e&&e.nonce},n)},each:function(t,e){var n,o=0;if(C(t))for(n=t.length;o<n&&!1!==e.call(t[o],o,t[o]);o++);else for(o in t)if(!1===e.call(t[o],o,t[o]))break;return t},text:function(t){var e,n="",o=0,r=t.nodeType;if(!r)for(;e=t[o++];)n+=E.text(e);return 1===r||11===r?t.textContent:9===r?t.documentElement.textContent:3===r||4===r?t.nodeValue:n},makeArray:function(t,e){var n=e||[];return null!=t&&(C(Object(t))?E.merge(n,"string"==typeof t?[t]:t):a.call(n,t)),n},inArray:function(t,e,n){return null==e?-1:s.call(e,t,n)},isXMLDoc:function(t){var e=t&&t.namespaceURI,n=t&&(t.ownerDocument||t).documentElement;return!x.test(e||n&&n.nodeName||"HTML")},merge:function(t,e){for(var n=+e.length,o=0,r=t.length;o<n;o++)t[r++]=e[o];return t.length=r,t},grep:function(t,e,n){for(var o=[],r=0,i=t.length,a=!n;r<i;r++)!e(t[r],r)!==a&&o.push(t[r]);return o},map:function(t,e,n){var o,r,a=0,s=[];if(C(t))for(o=t.length;a<o;a++)null!=(r=e(t[a],a,n))&&s.push(r);else for(a in t)null!=(r=e(t[a],a,n))&&s.push(r);return i(s)},guid:1,support:h}),"function"==typeof Symbol&&(E.fn[Symbol.iterator]=n[Symbol.iterator]),E.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),(function(t,e){l["[object "+e+"]"]=e.toLowerCase()}));var A=n.pop,k=n.sort,S=n.splice,D="[\\x20\\t\\r\\n\\f]",N=new RegExp("^"+D+"+|((?:^|[^\\\\])(?:\\\\.)*)"+D+"+$","g");E.contains=function(t,e){var n=e&&e.parentNode;return t===n||!(!n||1!==n.nodeType||!(t.contains?t.contains(n):t.compareDocumentPosition&&16&t.compareDocumentPosition(n)))};var L=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g;function M(t,e){return e?"\0"===t?"<22>":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t}E.escapeSelector=function(t){return(t+"").replace(L,M)};var _=m,I=a;!function(){var e,o,i,a,l,c,d,f,p,g,m=I,v=E.expando,y=0,b=0,w=tt(),x=tt(),C=tt(),L=tt(),M=function(t,e){return t===e&&(l=!0),0},O="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",P="(?:\\\\[\\da-fA-F]{1,6}"+D+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",R="\\["+D+"*("+P+")(?:"+D+"*([*^$|!~]?=)"+D+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+P+"))|)"+D+"*\\]",j=":("+P+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+R+")*)|.*)\\)|)",B=new RegExp(D+"+","g"),H=new RegExp("^"+D+"*,"+D+"*"),F=new RegExp("^"+D+"*([>+~]|"+D+")"+D+"*"),q=new RegExp(D+"|>"),z=new RegExp(j),W=new RegExp("^"+P+"$"),U={ID:new RegExp("^#("+P+")"),CLASS:new RegExp("^\\.("+P+")"),TAG:new RegExp("^("+P+"|[*])"),ATTR:new RegExp("^"+R),PSEUDO:new RegExp("^"+j),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+D+"*(even|odd|(([+-]|)(\\d*)n|)"+D+"*(?:([+-]|)"+D+"*(\\d+)|))"+D+"*\\)|)","i"),bool:new RegExp("^(?:"+O+")$","i"),needsContext:new RegExp("^"+D+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+D+"*((?:-\\d)?\\d*)"+D+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,$=/^h\d$/i,X=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,V=/[+~]/,K=new RegExp("\\\\[\\da-fA-F]{1,6}"+D+"?|\\\\([^\\r\\n\\f])","g"),Q=function(t,e){var n="0x"+t.slice(1)-65536;return e||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},J=function(){lt()},G=ft((function(t){return!0===t.disabled&&T(t,"fieldset")}),{dir:"parentNode",next:"legend"});try{m.apply(n=r.call(_.childNodes),_.childNodes),n[_.childNodes.length].nodeType}catch(t){m={apply:function(t,e){I.apply(t,r.call(e))},call:function(t){I.apply(t,r.call(arguments,1))}}}function Z(t,e,n,o){var r,i,a,s,l,u,d,g=e&&e.ownerDocument,y=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==y&&9!==y&&11!==y)return n;if(!o&&(lt(e),e=e||c,f)){if(11!==y&&(l=X.exec(t)))if(r=l[1]){if(9===y){if(!(a=e.getElementById(r)))return n;if(a.id===r)return m.call(n,a),n}else if(g&&(a=g.getElementById(r))&&Z.contains(e,a)&&a.id===r)return m.call(n,a),n}else{if(l[2])return m.apply(n,e.getElementsByTagName(t)),n;if((r=l[3])&&e.getElementsByClassName)return m.apply(n,e.getElementsByClassName(r)),n}if(!(L[t+" "]||p&&p.test(t))){if(d=t,g=e,1===y&&(q.test(t)||F.test(t))){for((g=V.test(t)&&st(e.parentNode)||e)==e&&h.scope||((s=e.getAttribute("id"))?s=E.escapeSelector(s):e.setAttribute("id",s=v)),i=(u=ut(t)).length;i--;)u[i]=(s?"#"+s:":scope")+" "+dt(u[i]);d=u.join(",")}try{return m.apply(n,g.querySelectorAll(d)),n}catch(e){L(t,!0)}finally{s===v&&e.removeAttribute("id")}}}return yt(t.replace(N,"$1"),e,n,o)}function tt(){var t=[];return function e(n,r){return t.push(n+" ")>o.cacheLength&&delete e[t.shift()],e[n+" "]=r}}function et(t){return t[v]=!0,t}function nt(t){var e=c.createElement("fieldset");try{return!!t(e)}catch(t){return!1}finally{e.parentNode&&e.parentNode.removeChild(e),e=null}}function ot(t){return function(e){return T(e,"input")&&e.type===t}}function rt(t){return function(e){return(T(e,"input")||T(e,"button"))&&e.type===t}}function it(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&G(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function at(t){return et((function(e){return e=+e,et((function(n,o){for(var r,i=t([],n.length,e),a=i.length;a--;)n[r=i[a]]&&(n[r]=!(o[r]=n[r]))}))}))}function st(t){return t&&void 0!==t.getElementsByTagName&&t}function lt(t){var e,n=t?t.ownerDocument||t:_;return n!=c&&9===n.nodeType&&n.documentElement?(d=(c=n).documentElement,f=!E.isXMLDoc(c),g=d.matches||d.webkitMatchesSelector||d.msMatchesSelector,d.msMatchesSelector&&_!=c&&(e=c.defaultView)&&e.top!==e&&e.addEventListener("unload",J),h.getById=nt((function(t){return d.appendChild(t).id=E.expando,!c.getElementsByName||!c.getElementsByName(E.expando).length})),h.disconnectedMatch=nt((function(t){return g.call(t,"*")})),h.scope=nt((function(){return c.querySelectorAll(":scope")})),h.cssHas=nt((function(){try{return c.querySelector(":has(*,:jqfake)"),!1}catch(t){return!0}})),h.getById?(o.filter.ID=function(t){var e=t.replace(K,Q);return function(t){return t.getAttribute("id")===e}},o.find.ID=function(t,e){if(void 0!==e.getElementById&&f){var n=e.getElementById(t);return n?[n]:[]}}):(o.filter.ID=function(t){var e=t.replace(K,Q);return function(t){var n=void 0!==t.getAttributeNode&&t.getAttributeNode("id");return n&&n.value===e}},o.find.ID=function(t,e){if(void 0!==e.getElementById&&f){var n,o,r,i=e.getElementById(t);if(i){if((n=i.getAttributeNode("id"))&&n.value===t)return[i];for(r=e.getElementsByName(t),o=0;i=r[o++];)if((n=i.getAttributeNode("id"))&&n.value===t)return[i]}return[]}}),o.find.TAG=function(t,e){return void 0!==e.getElementsByTagName?e.getElementsByTagName(t):e.querySelectorAll(t)},o.find.CLASS=function(t,e){if(void 0!==e.getElementsByClassName&&f)return e.getElementsByClassName(t)},p=[],nt((function(t){var e;d.appendChild(t).innerHTML="<a id='"+v+"' href='' disabled='disabled'></a><select id='"+v+"-\r\\' disabled='disabled'><option selected=''></option></select>",t.querySelectorAll("[selected]").length||p.push("\\["+D+"*(?:value|"+O+")"),t.querySelectorAll("[id~="+v+"-]").length||p.push("~="),t.querySelectorAll("a#"+v+"+*").length||p.push(".#.+[+~]"),t.querySelectorAll(":checked").length||p.push(":checked"),(e=c.createElement("input")).setAttribute("type","hidden"),t.appendChild(e).setAttribute("name","D"),d.appendChild(t).disabled=!0,2!==t.querySelectorAll(":disabled").length&&p.push(":enabled",":disabled"),(e=c.createElement("input")).setAttribute("name",""),t.appendChild(e),t.querySelectorAll("[name='']").length||p.push("\\["+D+"*name"+D+"*="+D+"*(?:''|\"\")")})),h.cssHas||p.push(":has"),p=p.length&&new RegExp(p.join("|")),M=function(t,e){if(t===e)return l=!0,0;var n=!t.compareDocumentPosition-!e.compareDocumentPosition;return n||(1&(n=(t.ownerDocument||t)==(e.ownerDocument||e)?t.compareDocumentPosition(e):1)||!h.sortDetached&&e.compareDocumentPosition(t)===n?t===c||t.ownerDocument==_&&Z.contains(_,t)?-1:e===c||e.ownerDocument==_&&Z.contains(_,e)?1:a?s.call(a,t)-s.call(a,e):0:4&n?-1:1)},c):c}for(e in Z.matches=function(t,e){return Z(t,null,null,e)},Z.matchesSelector=function(t,e){if(lt(t),f&&!L[e+" "]&&(!p||!p.test(e)))try{var n=g.call(t,e);if(n||h.disconnectedMatch||t.document&&11!==t.document.nodeType)return n}catch(t){L(e,!0)}return Z(e,c,null,[t]).length>0},Z.contains=function(t,e){return(t.ownerDocument||t)!=c&<(t),E.contains(t,e)},Z.attr=function(t,e){(t.ownerDocument||t)!=c&<(t);var n=o.attrHandle[e.toLowerCase()],r=n&&u.call(o.attrHandle,e.toLowerCase())?n(t,e,!f):void 0;return void 0!==r?r:t.getAttribute(e)},Z.error=function(t){throw new Error("Syntax error, unrecognized expression: "+t)},E.uniqueSort=function(t){var e,n=[],o=0,i=0;if(l=!h.sortStable,a=!h.sortStable&&r.call(t,0),k.call(t,M),l){for(;e=t[i++];)e===t[i]&&(o=n.push(i));for(;o--;)S.call(t,n[o],1)}return a=null,t},E.fn.uniqueSort=function(){return this.pushStack(E.uniqueSort(r.apply(this)))},o=E.expr={cacheLength:50,createPseudo:et,match:U,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(t){return t[1]=t[1].replace(K,Q),t[3]=(t[3]||t[4]||t[5]||"").replace(K,Q),"~="===t[2]&&(t[3]=" "+t[3]+" "),t.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||Z.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&Z.error(t[0]),t},PSEUDO:function(t){var e,n=!t[6]&&t[2];return U.CHILD.test(t[0])?null:(t[3]?t[2]=t[4]||t[5]||"":n&&z.test(n)&&(e=ut(n,!0))&&(e=n.indexOf(")",n.length-e)-n.length)&&(t[0]=t[0].slice(0,e),t[2]=n.slice(0,e)),t.slice(0,3))}},filter:{TAG:function(t){var e=t.replace(K,Q).toLowerCase();return"*"===t?function(){return!0}:function(t){return T(t,e)}},CLASS:function(t){var e=w[t+" "];return e||(e=new RegExp("(^|"+D+")"+t+"("+D+"|$)"))&&w(t,(function(t){return e.test("string"==typeof t.className&&t.className||void 0!==t.getAttribute&&t.getAttribute("class")||"")}))},ATTR:function(t,e,n){return function(o){var r=Z.attr(o,t);return null==r?"!="===e:!e||(r+="","="===e?r===n:"!="===e?r!==n:"^="===e?n&&0===r.indexOf(n):"*="===e?n&&r.indexOf(n)>-1:"$="===e?n&&r.slice(-n.length)===n:"~="===e?(" "+r.replace(B," ")+" ").indexOf(n)>-1:"|="===e&&(r===n||r.slice(0,n.length+1)===n+"-"))}},CHILD:function(t,e,n,o,r){var i="nth"!==t.slice(0,3),a="last"!==t.slice(-4),s="of-type"===e;return 1===o&&0===r?function(t){return!!t.parentNode}:function(e,n,l){var c,u,d,f,h,p=i!==a?"nextSibling":"previousSibling",g=e.parentNode,m=s&&e.nodeName.toLowerCase(),b=!l&&!s,w=!1;if(g){if(i){for(;p;){for(d=e;d=d[p];)if(s?T(d,m):1===d.nodeType)return!1;h=p="only"===t&&!h&&"nextSibling"}return!0}if(h=[a?g.firstChild:g.lastChild],a&&b){for(w=(f=(c=(u=g[v]||(g[v]={}))[t]||[])[0]===y&&c[1])&&c[2],d=f&&g.childNodes[f];d=++f&&d&&d[p]||(w=f=0)||h.pop();)if(1===d.nodeType&&++w&&d===e){u[t]=[y,f,w];break}}else if(b&&(w=f=(c=(u=e[v]||(e[v]={}))[t]||[])[0]===y&&c[1]),!1===w)for(;(d=++f&&d&&d[p]||(w=f=0)||h.pop())&&(!(s?T(d,m):1===d.nodeType)||!++w||(b&&((u=d[v]||(d[v]={}))[t]=[y,w]),d!==e)););return(w-=r)===o||w%o==0&&w/o>=0}}},PSEUDO:function(t,e){var n,r=o.pseudos[t]||o.setFilters[t.toLowerCase()]||Z.error("unsupported pseudo: "+t);return r[v]?r(e):r.length>1?(n=[t,t,"",e],o.setFilters.hasOwnProperty(t.toLowerCase())?et((function(t,n){for(var o,i=r(t,e),a=i.length;a--;)t[o=s.call(t,i[a])]=!(n[o]=i[a])})):function(t){return r(t,0,n)}):r}},pseudos:{not:et((function(t){var e=[],n=[],o=vt(t.replace(N,"$1"));return o[v]?et((function(t,e,n,r){for(var i,a=o(t,null,r,[]),s=t.length;s--;)(i=a[s])&&(t[s]=!(e[s]=i))})):function(t,r,i){return e[0]=t,o(e,null,i,n),e[0]=null,!n.pop()}})),has:et((function(t){return function(e){return Z(t,e).length>0}})),contains:et((function(t){return t=t.replace(K,Q),function(e){return(e.textContent||E.text(e)).indexOf(t)>-1}})),lang:et((function(t){return W.test(t||"")||Z.error("unsupported lang: "+t),t=t.replace(K,Q).toLowerCase(),function(e){var n;do{if(n=f?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(n=n.toLowerCase())===t||0===n.indexOf(t+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}})),target:function(e){var n=t.location&&t.location.hash;return n&&n.slice(1)===e.id},root:function(t){return t===d},focus:function(t){return t===function(){try{return c.activeElement}catch(t){}}()&&c.hasFocus()&&!!(t.type||t.href||~t.tabIndex)},enabled:it(!1),disabled:it(!0),checked:function(t){return T(t,"input")&&!!t.checked||T(t,"option")&&!!t.selected},selected:function(t){return t.parentNode&&t.parentNode.selectedIndex,!0===t.selected},empty:function(t){for(t=t.firstChild;t;t=t.nextSibling)if(t.nodeType<6)return!1;return!0},parent:function(t){return!o.pseudos.empty(t)},header:function(t){return $.test(t.nodeName)},input:function(t){return Y.test(t.nodeName)},button:function(t){return T(t,"input")&&"button"===t.type||T(t,"button")},text:function(t){var e;return T(t,"input")&&"text"===t.type&&(null==(e=t.getAttribute("type"))||"text"===e.toLowerCase())},first:at((function(){return[0]})),last:at((function(t,e){return[e-1]})),eq:at((function(t,e,n){return[n<0?n+e:n]})),even:at((function(t,e){for(var n=0;n<e;n+=2)t.push(n);return t})),odd:at((function(t,e){for(var n=1;n<e;n+=2)t.push(n);return t})),lt:at((function(t,e,n){var o;for(o=n<0?n+e:n>e?e:n;--o>=0;)t.push(o);return t})),gt:at((function(t,e,n){for(var o=n<0?n+e:n;++o<e;)t.push(o);return t}))}},o.pseudos.nth=o.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})o.pseudos[e]=ot(e);for(e in{submit:!0,reset:!0})o.pseudos[e]=rt(e);function ct(){}function ut(t,e){var n,r,i,a,s,l,c,u=x[t+" "];if(u)return e?0:u.slice(0);for(s=t,l=[],c=o.preFilter;s;){for(a in n&&!(r=H.exec(s))||(r&&(s=s.slice(r[0].length)||s),l.push(i=[])),n=!1,(r=F.exec(s))&&(n=r.shift(),i.push({value:n,type:r[0].replace(N," ")}),s=s.slice(n.length)),o.filter)!(r=U[a].exec(s))||c[a]&&!(r=c[a](r))||(n=r.shift(),i.push({value:n,type:a,matches:r}),s=s.slice(n.length));if(!n)break}return e?s.length:s?Z.error(t):x(t,l).slice(0)}function dt(t){for(var e=0,n=t.length,o="";e<n;e++)o+=t[e].value;return o}function ft(t,e,n){var o=e.dir,r=e.next,i=r||o,a=n&&"parentNode"===i,s=b++;return e.first?function(e,n,r){for(;e=e[o];)if(1===e.nodeType||a)return t(e,n,r);return!1}:function(e,n,l){var c,u,d=[y,s];if(l){for(;e=e[o];)if((1===e.nodeType||a)&&t(e,n,l))return!0}else for(;e=e[o];)if(1===e.nodeType||a)if(u=e[v]||(e[v]={}),r&&T(e,r))e=e[o]||e;else{if((c=u[i])&&c[0]===y&&c[1]===s)return d[2]=c[2];if(u[i]=d,d[2]=t(e,n,l))return!0}return!1}}function ht(t){return t.length>1?function(e,n,o){for(var r=t.length;r--;)if(!t[r](e,n,o))return!1;return!0}:t[0]}function pt(t,e,n,o,r){for(var i,a=[],s=0,l=t.length,c=null!=e;s<l;s++)(i=t[s])&&(n&&!n(i,o,r)||(a.push(i),c&&e.push(s)));return a}function gt(t,e,n,o,r,i){return o&&!o[v]&&(o=gt(o)),r&&!r[v]&&(r=gt(r,i)),et((function(i,a,l,c){var u,d,f,h,p=[],g=[],v=a.length,y=i||function(t,e,n){for(var o=0,r=e.length;o<r;o++)Z(t,e[o],n);return n}(e||"*",l.nodeType?[l]:l,[]),b=!t||!i&&e?y:pt(y,p,t,l,c);if(n?n(b,h=r||(i?t:v||o)?[]:a,l,c):h=b,o)for(u=pt(h,g),o(u,[],l,c),d=u.length;d--;)(f=u[d])&&(h[g[d]]=!(b[g[d]]=f));if(i){if(r||t){if(r){for(u=[],d=h.length;d--;)(f=h[d])&&u.push(b[d]=f);r(null,h=[],u,c)}for(d=h.length;d--;)(f=h[d])&&(u=r?s.call(i,f):p[d])>-1&&(i[u]=!(a[u]=f))}}else h=pt(h===a?h.splice(v,h.length):h),r?r(null,a,h,c):m.apply(a,h)}))}function mt(t){for(var e,n,r,a=t.length,l=o.relative[t[0].type],c=l||o.relative[" "],u=l?1:0,d=ft((function(t){return t===e}),c,!0),f=ft((function(t){return s.call(e,t)>-1}),c,!0),h=[function(t,n,o){var r=!l&&(o||n!=i)||((e=n).nodeType?d(t,n,o):f(t,n,o));return e=null,r}];u<a;u++)if(n=o.relative[t[u].type])h=[ft(ht(h),n)];else{if((n=o.filter[t[u].type].apply(null,t[u].matches))[v]){for(r=++u;r<a&&!o.relative[t[r].type];r++);return gt(u>1&&ht(h),u>1&&dt(t.slice(0,u-1).concat({value:" "===t[u-2].type?"*":""})).replace(N,"$1"),n,u<r&&mt(t.slice(u,r)),r<a&&mt(t=t.slice(r)),r<a&&dt(t))}h.push(n)}return ht(h)}function vt(t,e){var n,r=[],a=[],s=C[t+" "];if(!s){for(e||(e=ut(t)),n=e.length;n--;)(s=mt(e[n]))[v]?r.push(s):a.push(s);s=C(t,function(t,e){var n=e.length>0,r=t.length>0,a=function(a,s,l,u,d){var h,p,g,v=0,b="0",w=a&&[],x=[],C=i,T=a||r&&o.find.TAG("*",d),k=y+=null==C?1:Math.random()||.1,S=T.length;for(d&&(i=s==c||s||d);b!==S&&null!=(h=T[b]);b++){if(r&&h){for(p=0,s||h.ownerDocument==c||(lt(h),l=!f);g=t[p++];)if(g(h,s||c,l)){m.call(u,h);break}d&&(y=k)}n&&((h=!g&&h)&&v--,a&&w.push(h))}if(v+=b,n&&b!==v){for(p=0;g=e[p++];)g(w,x,s,l);if(a){if(v>0)for(;b--;)w[b]||x[b]||(x[b]=A.call(u));x=pt(x)}m.apply(u,x),d&&!a&&x.length>0&&v+e.length>1&&E.uniqueSort(u)}return d&&(y=k,i=C),w};return n?et(a):a}(a,r)),s.selector=t}return s}function yt(t,e,n,r){var i,a,s,l,c,u="function"==typeof t&&t,d=!r&&ut(t=u.selector||t);if(n=n||[],1===d.length){if((a=d[0]=d[0].slice(0)).length>2&&"ID"===(s=a[0]).type&&9===e.nodeType&&f&&o.relative[a[1].type]){if(!(e=(o.find.ID(s.matches[0].replace(K,Q),e)||[])[0]))return n;u&&(e=e.parentNode),t=t.slice(a.shift().value.length)}for(i=U.needsContext.test(t)?0:a.length;i--&&(s=a[i],!o.relative[l=s.type]);)if((c=o.find[l])&&(r=c(s.matches[0].replace(K,Q),V.test(a[0].type)&&st(e.parentNode)||e))){if(a.splice(i,1),!(t=r.length&&dt(a)))return m.apply(n,r),n;break}}return(u||vt(t,d))(r,e,!f,n,!e||V.test(t)&&st(e.parentNode)||e),n}ct.prototype=o.filters=o.pseudos,o.setFilters=new ct,h.sortStable=v.split("").sort(M).join("")===v,lt(),h.sortDetached=nt((function(t){return 1&t.compareDocumentPosition(c.createElement("fieldset"))})),E.find=Z,E.expr[":"]=E.expr.pseudos,E.unique=E.uniqueSort,Z.compile=vt,Z.select=yt,Z.setDocument=lt,Z.tokenize=ut,Z.escape=E.escapeSelector,Z.getText=E.text,Z.isXML=E.isXMLDoc,Z.selectors=E.expr,Z.support=E.support,Z.uniqueSort=E.uniqueSort}();var O=function(t,e,n){for(var o=[],r=void 0!==n;(t=t[e])&&9!==t.nodeType;)if(1===t.nodeType){if(r&&E(t).is(n))break;o.push(t)}return o},P=function(t,e){for(var n=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&n.push(t);return n},R=E.expr.match.needsContext,j=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function B(t,e,n){return p(e)?E.grep(t,(function(t,o){return!!e.call(t,o,t)!==n})):e.nodeType?E.grep(t,(function(t){return t===e!==n})):"string"!=typeof e?E.grep(t,(function(t){return s.call(e,t)>-1!==n})):E.filter(e,t,n)}E.filter=function(t,e,n){var o=e[0];return n&&(t=":not("+t+")"),1===e.length&&1===o.nodeType?E.find.matchesSelector(o,t)?[o]:[]:E.find.matches(t,E.grep(e,(function(t){return 1===t.nodeType})))},E.fn.extend({find:function(t){var e,n,o=this.length,r=this;if("string"!=typeof t)return this.pushStack(E(t).filter((function(){for(e=0;e<o;e++)if(E.contains(r[e],this))return!0})));for(n=this.pushStack([]),e=0;e<o;e++)E.find(t,r[e],n);return o>1?E.uniqueSort(n):n},filter:function(t){return this.pushStack(B(this,t||[],!1))},not:function(t){return this.pushStack(B(this,t||[],!0))},is:function(t){return!!B(this,"string"==typeof t&&R.test(t)?E(t):t||[],!1).length}});var H,F=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(E.fn.init=function(t,e,n){var o,r;if(!t)return this;if(n=n||H,"string"==typeof t){if(!(o="<"===t[0]&&">"===t[t.length-1]&&t.length>=3?[null,t,null]:F.exec(t))||!o[1]&&e)return!e||e.jquery?(e||n).find(t):this.constructor(e).find(t);if(o[1]){if(e=e instanceof E?e[0]:e,E.merge(this,E.parseHTML(o[1],e&&e.nodeType?e.ownerDocument||e:m,!0)),j.test(o[1])&&E.isPlainObject(e))for(o in e)p(this[o])?this[o](e[o]):this.attr(o,e[o]);return this}return(r=m.getElementById(o[2]))&&(this[0]=r,this.length=1),this}return t.nodeType?(this[0]=t,this.length=1,this):p(t)?void 0!==n.ready?n.ready(t):t(E):E.makeArray(t,this)}).prototype=E.fn,H=E(m);var q=/^(?:parents|prev(?:Until|All))/,z={children:!0,contents:!0,next:!0,prev:!0};function W(t,e){for(;(t=t[e])&&1!==t.nodeType;);return t}E.fn.extend({has:function(t){var e=E(t,this),n=e.length;return this.filter((function(){for(var t=0;t<n;t++)if(E.contains(this,e[t]))return!0}))},closest:function(t,e){var n,o=0,r=this.length,i=[],a="string"!=typeof t&&E(t);if(!R.test(t))for(;o<r;o++)for(n=this[o];n&&n!==e;n=n.parentNode)if(n.nodeType<11&&(a?a.index(n)>-1:1===n.nodeType&&E.find.matchesSelector(n,t))){i.push(n);break}return this.pushStack(i.length>1?E.uniqueSort(i):i)},index:function(t){return t?"string"==typeof t?s.call(E(t),this[0]):s.call(this,t.jquery?t[0]:t):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(t,e){return this.pushStack(E.uniqueSort(E.merge(this.get(),E(t,e))))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),E.each({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return O(t,"parentNode")},parentsUntil:function(t,e,n){return O(t,"parentNode",n)},next:function(t){return W(t,"nextSibling")},prev:function(t){return W(t,"previousSibling")},nextAll:function(t){return O(t,"nextSibling")},prevAll:function(t){return O(t,"previousSibling")},nextUntil:function(t,e,n){return O(t,"nextSibling",n)},prevUntil:function(t,e,n){return O(t,"previousSibling",n)},siblings:function(t){return P((t.parentNode||{}).firstChild,t)},children:function(t){return P(t.firstChild)},contents:function(t){return null!=t.contentDocument&&o(t.contentDocument)?t.contentDocument:(T(t,"template")&&(t=t.content||t),E.merge([],t.childNodes))}},(function(t,e){E.fn[t]=function(n,o){var r=E.map(this,e,n);return"Until"!==t.slice(-5)&&(o=n),o&&"string"==typeof o&&(r=E.filter(o,r)),this.length>1&&(z[t]||E.uniqueSort(r),q.test(t)&&r.reverse()),this.pushStack(r)}}));var U=/[^\x20\t\r\n\f]+/g;function Y(t){return t}function $(t){throw t}function X(t,e,n,o){var r;try{t&&p(r=t.promise)?r.call(t).done(e).fail(n):t&&p(r=t.then)?r.call(t,e,n):e.apply(void 0,[t].slice(o))}catch(t){n.apply(void 0,[t])}}E.Callbacks=function(t){t="string"==typeof t?function(t){var e={};return E.each(t.match(U)||[],(function(t,n){e[n]=!0})),e}(t):E.extend({},t);var e,n,o,r,i=[],a=[],s=-1,l=function(){for(r=r||t.once,o=e=!0;a.length;s=-1)for(n=a.shift();++s<i.length;)!1===i[s].apply(n[0],n[1])&&t.stopOnFalse&&(s=i.length,n=!1);t.memory||(n=!1),e=!1,r&&(i=n?[]:"")},c={add:function(){return i&&(n&&!e&&(s=i.length-1,a.push(n)),function e(n){E.each(n,(function(n,o){p(o)?t.unique&&c.has(o)||i.push(o):o&&o.length&&"string"!==b(o)&&e(o)}))}(arguments),n&&!e&&l()),this},remove:function(){return E.each(arguments,(function(t,e){for(var n;(n=E.inArray(e,i,n))>-1;)i.splice(n,1),n<=s&&s--})),this},has:function(t){return t?E.inArray(t,i)>-1:i.length>0},empty:function(){return i&&(i=[]),this},disable:function(){return r=a=[],i=n="",this},disabled:function(){return!i},lock:function(){return r=a=[],n||e||(i=n=""),this},locked:function(){return!!r},fireWith:function(t,n){return r||(n=[t,(n=n||[]).slice?n.slice():n],a.push(n),e||l()),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!o}};return c},E.extend({Deferred:function(e){var n=[["notify","progress",E.Callbacks("memory"),E.Callbacks("memory"),2],["resolve","done",E.Callbacks("once memory"),E.Callbacks("once memory"),0,"resolved"],["reject","fail",E.Callbacks("once memory"),E.Callbacks("once memory"),1,"rejected"]],o="pending",r={state:function(){return o},always:function(){return i.done(arguments).fail(arguments),this},catch:function(t){return r.then(null,t)},pipe:function(){var t=arguments;return E.Deferred((function(e){E.each(n,(function(n,o){var r=p(t[o[4]])&&t[o[4]];i[o[1]]((function(){var t=r&&r.apply(this,arguments);t&&p(t.promise)?t.promise().progress(e.notify).done(e.resolve).fail(e.reject):e[o[0]+"With"](this,r?[t]:arguments)}))})),t=null})).promise()},then:function(e,o,r){var i=0;function a(e,n,o,r){return function(){var s=this,l=arguments,c=function(){var t,c;if(!(e<i)){if((t=o.apply(s,l))===n.promise())throw new TypeError("Thenable self-resolution");c=t&&("object"==typeof t||"function"==typeof t)&&t.then,p(c)?r?c.call(t,a(i,n,Y,r),a(i,n,$,r)):(i++,c.call(t,a(i,n,Y,r),a(i,n,$,r),a(i,n,Y,n.notifyWith))):(o!==Y&&(s=void 0,l=[t]),(r||n.resolveWith)(s,l))}},u=r?c:function(){try{c()}catch(t){E.Deferred.exceptionHook&&E.Deferred.exceptionHook(t,u.error),e+1>=i&&(o!==$&&(s=void 0,l=[t]),n.rejectWith(s,l))}};e?u():(E.Deferred.getErrorHook?u.error=E.Deferred.getErrorHook():E.Deferred.getStackHook&&(u.error=E.Deferred.getStackHook()),t.setTimeout(u))}}return E.Deferred((function(t){n[0][3].add(a(0,t,p(r)?r:Y,t.notifyWith)),n[1][3].add(a(0,t,p(e)?e:Y)),n[2][3].add(a(0,t,p(o)?o:$))})).promise()},promise:function(t){return null!=t?E.extend(t,r):r}},i={};return E.each(n,(function(t,e){var a=e[2],s=e[5];r[e[1]]=a.add,s&&a.add((function(){o=s}),n[3-t][2].disable,n[3-t][3].disable,n[0][2].lock,n[0][3].lock),a.add(e[3].fire),i[e[0]]=function(){return i[e[0]+"With"](this===i?void 0:this,arguments),this},i[e[0]+"With"]=a.fireWith})),r.promise(i),e&&e.call(i,i),i},when:function(t){var e=arguments.length,n=e,o=Array(n),i=r.call(arguments),a=E.Deferred(),s=function(t){return function(n){o[t]=this,i[t]=arguments.length>1?r.call(arguments):n,--e||a.resolveWith(o,i)}};if(e<=1&&(X(t,a.done(s(n)).resolve,a.reject,!e),"pending"===a.state()||p(i[n]&&i[n].then)))return a.then();for(;n--;)X(i[n],s(n),a.reject);return a.promise()}});var V=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;E.Deferred.exceptionHook=function(e,n){t.console&&t.console.warn&&e&&V.test(e.name)&&t.console.warn("jQuery.Deferred exception: "+e.message,e.stack,n)},E.readyException=function(e){t.setTimeout((function(){throw e}))};var K=E.Deferred();function Q(){m.removeEventListener("DOMContentLoaded",Q),t.removeEventListener("load",Q),E.ready()}E.fn.ready=function(t){return K.then(t).catch((function(t){E.readyException(t)})),this},E.extend({isReady:!1,readyWait:1,ready:function(t){(!0===t?--E.readyWait:E.isReady)||(E.isReady=!0,!0!==t&&--E.readyWait>0||K.resolveWith(m,[E]))}}),E.ready.then=K.then,"complete"===m.readyState||"loading"!==m.readyState&&!m.documentElement.doScroll?t.setTimeout(E.ready):(m.addEventListener("DOMContentLoaded",Q),t.addEventListener("load",Q));var J=function(t,e,n,o,r,i,a){var s=0,l=t.length,c=null==n;if("object"===b(n))for(s in r=!0,n)J(t,e,s,n[s],!0,i,a);else if(void 0!==o&&(r=!0,p(o)||(a=!0),c&&(a?(e.call(t,o),e=null):(c=e,e=function(t,e,n){return c.call(E(t),n)})),e))for(;s<l;s++)e(t[s],n,a?o:o.call(t[s],s,e(t[s],n)));return r?t:c?e.call(t):l?e(t[0],n):i},G=/^-ms-/,Z=/-([a-z])/g;function tt(t,e){return e.toUpperCase()}function et(t){return t.replace(G,"ms-").replace(Z,tt)}var nt=function(t){return 1===t.nodeType||9===t.nodeType||!+t.nodeType};function ot(){this.expando=E.expando+ot.uid++}ot.uid=1,ot.prototype={cache:function(t){var e=t[this.expando];return e||(e={},nt(t)&&(t.nodeType?t[this.expando]=e:Object.defineProperty(t,this.expando,{value:e,configurable:!0}))),e},set:function(t,e,n){var o,r=this.cache(t);if("string"==typeof e)r[et(e)]=n;else for(o in e)r[et(o)]=e[o];return r},get:function(t,e){return void 0===e?this.cache(t):t[this.expando]&&t[this.expando][et(e)]},access:function(t,e,n){return void 0===e||e&&"string"==typeof e&&void 0===n?this.get(t,e):(this.set(t,e,n),void 0!==n?n:e)},remove:function(t,e){var n,o=t[this.expando];if(void 0!==o){if(void 0!==e){n=(e=Array.isArray(e)?e.map(et):(e=et(e))in o?[e]:e.match(U)||[]).length;for(;n--;)delete o[e[n]]}(void 0===e||E.isEmptyObject(o))&&(t.nodeType?t[this.expando]=void 0:delete t[this.expando])}},hasData:function(t){var e=t[this.expando];return void 0!==e&&!E.isEmptyObject(e)}};var rt=new ot,it=new ot,at=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,st=/[A-Z]/g;function lt(t,e,n){var o;if(void 0===n&&1===t.nodeType)if(o="data-"+e.replace(st,"-$&").toLowerCase(),"string"==typeof(n=t.getAttribute(o))){try{n=function(t){return"true"===t||"false"!==t&&("null"===t?null:t===+t+""?+t:at.test(t)?JSON.parse(t):t)}(n)}catch(t){}it.set(t,e,n)}else n=void 0;return n}E.extend({hasData:function(t){return it.hasData(t)||rt.hasData(t)},data:function(t,e,n){return it.access(t,e,n)},removeData:function(t,e){it.remove(t,e)},_data:function(t,e,n){return rt.access(t,e,n)},_removeData:function(t,e){rt.remove(t,e)}}),E.fn.extend({data:function(t,e){var n,o,r,i=this[0],a=i&&i.attributes;if(void 0===t){if(this.length&&(r=it.get(i),1===i.nodeType&&!rt.get(i,"hasDataAttrs"))){for(n=a.length;n--;)a[n]&&0===(o=a[n].name).indexOf("data-")&&(o=et(o.slice(5)),lt(i,o,r[o]));rt.set(i,"hasDataAttrs",!0)}return r}return"object"==typeof t?this.each((function(){it.set(this,t)})):J(this,(function(e){var n;if(i&&void 0===e)return void 0!==(n=it.get(i,t))||void 0!==(n=lt(i,t))?n:void 0;this.each((function(){it.set(this,t,e)}))}),null,e,arguments.length>1,null,!0)},removeData:function(t){return this.each((function(){it.remove(this,t)}))}}),E.extend({queue:function(t,e,n){var o;if(t)return e=(e||"fx")+"queue",o=rt.get(t,e),n&&(!o||Array.isArray(n)?o=rt.access(t,e,E.makeArray(n)):o.push(n)),o||[]},dequeue:function(t,e){e=e||"fx";var n=E.queue(t,e),o=n.length,r=n.shift(),i=E._queueHooks(t,e);"inprogress"===r&&(r=n.shift(),o--),r&&("fx"===e&&n.unshift("inprogress"),delete i.stop,r.call(t,(function(){E.dequeue(t,e)}),i)),!o&&i&&i.empty.fire()},_queueHooks:function(t,e){var n=e+"queueHooks";return rt.get(t,n)||rt.access(t,n,{empty:E.Callbacks("once memory").add((function(){rt.remove(t,[e+"queue",n])}))})}}),E.fn.extend({queue:function(t,e){var n=2;return"string"!=typeof t&&(e=t,t="fx",n--),arguments.length<n?E.queue(this[0],t):void 0===e?this:this.each((function(){var n=E.queue(this,t,e);E._queueHooks(this,t),"fx"===t&&"inprogress"!==n[0]&&E.dequeue(this,t)}))},dequeue:function(t){return this.each((function(){E.dequeue(this,t)}))},clearQueue:function(t){return this.queue(t||"fx",[])},promise:function(t,e){var n,o=1,r=E.Deferred(),i=this,a=this.length,s=function(){--o||r.resolveWith(i,[i])};for("string"!=typeof t&&(e=t,t=void 0),t=t||"fx";a--;)(n=rt.get(i[a],t+"queueHooks"))&&n.empty&&(o++,n.empty.add(s));return s(),r.promise(e)}});var ct=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,ut=new RegExp("^(?:([+-])=|)("+ct+")([a-z%]*)$","i"),dt=["Top","Right","Bottom","Left"],ft=m.documentElement,ht=function(t){return E.contains(t.ownerDocument,t)},pt={composed:!0};ft.getRootNode&&(ht=function(t){return E.contains(t.ownerDocument,t)||t.getRootNode(pt)===t.ownerDocument});var gt=function(t,e){return"none"===(t=e||t).style.display||""===t.style.display&&ht(t)&&"none"===E.css(t,"display")};function mt(t,e,n,o){var r,i,a=20,s=o?function(){return o.cur()}:function(){return E.css(t,e,"")},l=s(),c=n&&n[3]||(E.cssNumber[e]?"":"px"),u=t.nodeType&&(E.cssNumber[e]||"px"!==c&&+l)&&ut.exec(E.css(t,e));if(u&&u[3]!==c){for(l/=2,c=c||u[3],u=+l||1;a--;)E.style(t,e,u+c),(1-i)*(1-(i=s()/l||.5))<=0&&(a=0),u/=i;u*=2,E.style(t,e,u+c),n=n||[]}return n&&(u=+u||+l||0,r=n[1]?u+(n[1]+1)*n[2]:+n[2],o&&(o.unit=c,o.start=u,o.end=r)),r}var vt={};function yt(t){var e,n=t.ownerDocument,o=t.nodeName,r=vt[o];return r||(e=n.body.appendChild(n.createElement(o)),r=E.css(e,"display"),e.parentNode.removeChild(e),"none"===r&&(r="block"),vt[o]=r,r)}function bt(t,e){for(var n,o,r=[],i=0,a=t.length;i<a;i++)(o=t[i]).style&&(n=o.style.display,e?("none"===n&&(r[i]=rt.get(o,"display")||null,r[i]||(o.style.display="")),""===o.style.display&>(o)&&(r[i]=yt(o))):"none"!==n&&(r[i]="none",rt.set(o,"display",n)));for(i=0;i<a;i++)null!=r[i]&&(t[i].style.display=r[i]);return t}E.fn.extend({show:function(){return bt(this,!0)},hide:function(){return bt(this)},toggle:function(t){return"boolean"==typeof t?t?this.show():this.hide():this.each((function(){gt(this)?E(this).show():E(this).hide()}))}});var wt,xt,Et=/^(?:checkbox|radio)$/i,Ct=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,Tt=/^$|^module$|\/(?:java|ecma)script/i;wt=m.createDocumentFragment().appendChild(m.createElement("div")),(xt=m.createElement("input")).setAttribute("type","radio"),xt.setAttribute("checked","checked"),xt.setAttribute("name","t"),wt.appendChild(xt),h.checkClone=wt.cloneNode(!0).cloneNode(!0).lastChild.checked,wt.innerHTML="<textarea>x</textarea>",h.noCloneChecked=!!wt.cloneNode(!0).lastChild.defaultValue,wt.innerHTML="<option></option>",h.option=!!wt.lastChild;var At={thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function kt(t,e){var n;return n=void 0!==t.getElementsByTagName?t.getElementsByTagName(e||"*"):void 0!==t.querySelectorAll?t.querySelectorAll(e||"*"):[],void 0===e||e&&T(t,e)?E.merge([t],n):n}function St(t,e){for(var n=0,o=t.length;n<o;n++)rt.set(t[n],"globalEval",!e||rt.get(e[n],"globalEval"))}At.tbody=At.tfoot=At.colgroup=At.caption=At.thead,At.th=At.td,h.option||(At.optgroup=At.option=[1,"<select multiple='multiple'>","</select>"]);var Dt=/<|&#?\w+;/;function Nt(t,e,n,o,r){for(var i,a,s,l,c,u,d=e.createDocumentFragment(),f=[],h=0,p=t.length;h<p;h++)if((i=t[h])||0===i)if("object"===b(i))E.merge(f,i.nodeType?[i]:i);else if(Dt.test(i)){for(a=a||d.appendChild(e.createElement("div")),s=(Ct.exec(i)||["",""])[1].toLowerCase(),l=At[s]||At._default,a.innerHTML=l[1]+E.htmlPrefilter(i)+l[2],u=l[0];u--;)a=a.lastChild;E.merge(f,a.childNodes),(a=d.firstChild).textContent=""}else f.push(e.createTextNode(i));for(d.textContent="",h=0;i=f[h++];)if(o&&E.inArray(i,o)>-1)r&&r.push(i);else if(c=ht(i),a=kt(d.appendChild(i),"script"),c&&St(a),n)for(u=0;i=a[u++];)Tt.test(i.type||"")&&n.push(i);return d}var Lt=/^([^.]*)(?:\.(.+)|)/;function Mt(){return!0}function _t(){return!1}function It(t,e,n,o,r,i){var a,s;if("object"==typeof e){for(s in"string"!=typeof n&&(o=o||n,n=void 0),e)It(t,s,n,o,e[s],i);return t}if(null==o&&null==r?(r=n,o=n=void 0):null==r&&("string"==typeof n?(r=o,o=void 0):(r=o,o=n,n=void 0)),!1===r)r=_t;else if(!r)return t;return 1===i&&(a=r,r=function(t){return E().off(t),a.apply(this,arguments)},r.guid=a.guid||(a.guid=E.guid++)),t.each((function(){E.event.add(this,e,r,o,n)}))}function Ot(t,e,n){n?(rt.set(t,e,!1),E.event.add(t,e,{namespace:!1,handler:function(t){var n,o=rt.get(this,e);if(1&t.isTrigger&&this[e]){if(o)(E.event.special[e]||{}).delegateType&&t.stopPropagation();else if(o=r.call(arguments),rt.set(this,e,o),this[e](),n=rt.get(this,e),rt.set(this,e,!1),o!==n)return t.stopImmediatePropagation(),t.preventDefault(),n}else o&&(rt.set(this,e,E.event.trigger(o[0],o.slice(1),this)),t.stopPropagation(),t.isImmediatePropagationStopped=Mt)}})):void 0===rt.get(t,e)&&E.event.add(t,e,Mt)}E.event={global:{},add:function(t,e,n,o,r){var i,a,s,l,c,u,d,f,h,p,g,m=rt.get(t);if(nt(t))for(n.handler&&(n=(i=n).handler,r=i.selector),r&&E.find.matchesSelector(ft,r),n.guid||(n.guid=E.guid++),(l=m.events)||(l=m.events=Object.create(null)),(a=m.handle)||(a=m.handle=function(e){return void 0!==E&&E.event.triggered!==e.type?E.event.dispatch.apply(t,arguments):void 0}),c=(e=(e||"").match(U)||[""]).length;c--;)h=g=(s=Lt.exec(e[c])||[])[1],p=(s[2]||"").split(".").sort(),h&&(d=E.event.special[h]||{},h=(r?d.delegateType:d.bindType)||h,d=E.event.special[h]||{},u=E.extend({type:h,origType:g,data:o,handler:n,guid:n.guid,selector:r,needsContext:r&&E.expr.match.needsContext.test(r),namespace:p.join(".")},i),(f=l[h])||((f=l[h]=[]).delegateCount=0,d.setup&&!1!==d.setup.call(t,o,p,a)||t.addEventListener&&t.addEventListener(h,a)),d.add&&(d.add.call(t,u),u.handler.guid||(u.handler.guid=n.guid)),r?f.splice(f.delegateCount++,0,u):f.push(u),E.event.global[h]=!0)},remove:function(t,e,n,o,r){var i,a,s,l,c,u,d,f,h,p,g,m=rt.hasData(t)&&rt.get(t);if(m&&(l=m.events)){for(c=(e=(e||"").match(U)||[""]).length;c--;)if(h=g=(s=Lt.exec(e[c])||[])[1],p=(s[2]||"").split(".").sort(),h){for(d=E.event.special[h]||{},f=l[h=(o?d.delegateType:d.bindType)||h]||[],s=s[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=i=f.length;i--;)u=f[i],!r&&g!==u.origType||n&&n.guid!==u.guid||s&&!s.test(u.namespace)||o&&o!==u.selector&&("**"!==o||!u.selector)||(f.splice(i,1),u.selector&&f.delegateCount--,d.remove&&d.remove.call(t,u));a&&!f.length&&(d.teardown&&!1!==d.teardown.call(t,p,m.handle)||E.removeEvent(t,h,m.handle),delete l[h])}else for(h in l)E.event.remove(t,h+e[c],n,o,!0);E.isEmptyObject(l)&&rt.remove(t,"handle events")}},dispatch:function(t){var e,n,o,r,i,a,s=new Array(arguments.length),l=E.event.fix(t),c=(rt.get(this,"events")||Object.create(null))[l.type]||[],u=E.event.special[l.type]||{};for(s[0]=l,e=1;e<arguments.length;e++)s[e]=arguments[e];if(l.delegateTarget=this,!u.preDispatch||!1!==u.preDispatch.call(this,l)){for(a=E.event.handlers.call(this,l,c),e=0;(r=a[e++])&&!l.isPropagationStopped();)for(l.currentTarget=r.elem,n=0;(i=r.handlers[n++])&&!l.isImmediatePropagationStopped();)l.rnamespace&&!1!==i.namespace&&!l.rnamespace.test(i.namespace)||(l.handleObj=i,l.data=i.data,void 0!==(o=((E.event.special[i.origType]||{}).handle||i.handler).apply(r.elem,s))&&!1===(l.result=o)&&(l.preventDefault(),l.stopPropagation()));return u.postDispatch&&u.postDispatch.call(this,l),l.result}},handlers:function(t,e){var n,o,r,i,a,s=[],l=e.delegateCount,c=t.target;if(l&&c.nodeType&&!("click"===t.type&&t.button>=1))for(;c!==this;c=c.parentNode||this)if(1===c.nodeType&&("click"!==t.type||!0!==c.disabled)){for(i=[],a={},n=0;n<l;n++)void 0===a[r=(o=e[n]).selector+" "]&&(a[r]=o.needsContext?E(r,this).index(c)>-1:E.find(r,this,null,[c]).length),a[r]&&i.push(o);i.length&&s.push({elem:c,handlers:i})}return c=this,l<e.length&&s.push({elem:c,handlers:e.slice(l)}),s},addProp:function(t,e){Object.defineProperty(E.Event.prototype,t,{enumerable:!0,configurable:!0,get:p(e)?function(){if(this.originalEvent)return e(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[t]},set:function(e){Object.defineProperty(this,t,{enumerable:!0,configurable:!0,writable:!0,value:e})}})},fix:function(t){return t[E.expando]?t:new E.Event(t)},special:{load:{noBubble:!0},click:{setup:function(t){var e=this||t;return Et.test(e.type)&&e.click&&T(e,"input")&&Ot(e,"click",!0),!1},trigger:function(t){var e=this||t;return Et.test(e.type)&&e.click&&T(e,"input")&&Ot(e,"click"),!0},_default:function(t){var e=t.target;return Et.test(e.type)&&e.click&&T(e,"input")&&rt.get(e,"click")||T(e,"a")}},beforeunload:{postDispatch:function(t){void 0!==t.result&&t.originalEvent&&(t.originalEvent.returnValue=t.result)}}}},E.removeEvent=function(t,e,n){t.removeEventListener&&t.removeEventListener(e,n)},E.Event=function(t,e){if(!(this instanceof E.Event))return new E.Event(t,e);t&&t.type?(this.originalEvent=t,this.type=t.type,this.isDefaultPrevented=t.defaultPrevented||void 0===t.defaultPrevented&&!1===t.returnValue?Mt:_t,this.target=t.target&&3===t.target.nodeType?t.target.parentNode:t.target,this.currentTarget=t.currentTarget,this.relatedTarget=t.relatedTarget):this.type=t,e&&E.extend(this,e),this.timeStamp=t&&t.timeStamp||Date.now(),this[E.expando]=!0},E.Event.prototype={constructor:E.Event,isDefaultPrevented:_t,isPropagationStopped:_t,isImmediatePropagationStopped:_t,isSimulated:!1,preventDefault:function(){var t=this.originalEvent;this.isDefaultPrevented=Mt,t&&!this.isSimulated&&t.preventDefault()},stopPropagation:function(){var t=this.originalEvent;this.isPropagationStopped=Mt,t&&!this.isSimulated&&t.stopPropagation()},stopImmediatePropagation:function(){var t=this.originalEvent;this.isImmediatePropagationStopped=Mt,t&&!this.isSimulated&&t.stopImmediatePropagation(),this.stopPropagation()}},E.each({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,toElement:!0,touches:!0,which:!0},E.event.addProp),E.each({focus:"focusin",blur:"focusout"},(function(t,e){function n(t){if(m.documentMode){var n=rt.get(this,"handle"),o=E.event.fix(t);o.type="focusin"===t.type?"focus":"blur",o.isSimulated=!0,n(t),o.target===o.currentTarget&&n(o)}else E.event.simulate(e,t.target,E.event.fix(t))}E.event.special[t]={setup:function(){var o;if(Ot(this,t,!0),!m.documentMode)return!1;(o=rt.get(this,e))||this.addEventListener(e,n),rt.set(this,e,(o||0)+1)},trigger:function(){return Ot(this,t),!0},teardown:function(){var t;if(!m.documentMode)return!1;(t=rt.get(this,e)-1)?rt.set(this,e,t):(this.removeEventListener(e,n),rt.remove(this,e))},_default:function(e){return rt.get(e.target,t)},delegateType:e},E.event.special[e]={setup:function(){var o=this.ownerDocument||this.document||this,r=m.documentMode?this:o,i=rt.get(r,e);i||(m.documentMode?this.addEventListener(e,n):o.addEventListener(t,n,!0)),rt.set(r,e,(i||0)+1)},teardown:function(){var o=this.ownerDocument||this.document||this,r=m.documentMode?this:o,i=rt.get(r,e)-1;i?rt.set(r,e,i):(m.documentMode?this.removeEventListener(e,n):o.removeEventListener(t,n,!0),rt.remove(r,e))}}})),E.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},(function(t,e){E.event.special[t]={delegateType:e,bindType:e,handle:function(t){var n,o=t.relatedTarget,r=t.handleObj;return o&&(o===this||E.contains(this,o))||(t.type=r.origType,n=r.handler.apply(this,arguments),t.type=e),n}}})),E.fn.extend({on:function(t,e,n,o){return It(this,t,e,n,o)},one:function(t,e,n,o){return It(this,t,e,n,o,1)},off:function(t,e,n){var o,r;if(t&&t.preventDefault&&t.handleObj)return o=t.handleObj,E(t.delegateTarget).off(o.namespace?o.origType+"."+o.namespace:o.origType,o.selector,o.handler),this;if("object"==typeof t){for(r in t)this.off(r,e,t[r]);return this}return!1!==e&&"function"!=typeof e||(n=e,e=void 0),!1===n&&(n=_t),this.each((function(){E.event.remove(this,t,n,e)}))}});var Pt=/<script|<style|<link/i,Rt=/checked\s*(?:[^=]|=\s*.checked.)/i,jt=/^\s*<!\[CDATA\[|\]\]>\s*$/g;function Bt(t,e){return T(t,"table")&&T(11!==e.nodeType?e:e.firstChild,"tr")&&E(t).children("tbody")[0]||t}function Ht(t){return t.type=(null!==t.getAttribute("type"))+"/"+t.type,t}function Ft(t){return"true/"===(t.type||"").slice(0,5)?t.type=t.type.slice(5):t.removeAttribute("type"),t}function qt(t,e){var n,o,r,i,a,s;if(1===e.nodeType){if(rt.hasData(t)&&(s=rt.get(t).events))for(r in rt.remove(e,"handle events"),s)for(n=0,o=s[r].length;n<o;n++)E.event.add(e,r,s[r][n]);it.hasData(t)&&(i=it.access(t),a=E.extend({},i),it.set(e,a))}}function zt(t,e){var n=e.nodeName.toLowerCase();"input"===n&&Et.test(t.type)?e.checked=t.checked:"input"!==n&&"textarea"!==n||(e.defaultValue=t.defaultValue)}function Wt(t,e,n,o){e=i(e);var r,a,s,l,c,u,d=0,f=t.length,g=f-1,m=e[0],v=p(m);if(v||f>1&&"string"==typeof m&&!h.checkClone&&Rt.test(m))return t.each((function(r){var i=t.eq(r);v&&(e[0]=m.call(this,r,i.html())),Wt(i,e,n,o)}));if(f&&(a=(r=Nt(e,t[0].ownerDocument,!1,t,o)).firstChild,1===r.childNodes.length&&(r=a),a||o)){for(l=(s=E.map(kt(r,"script"),Ht)).length;d<f;d++)c=r,d!==g&&(c=E.clone(c,!0,!0),l&&E.merge(s,kt(c,"script"))),n.call(t[d],c,d);if(l)for(u=s[s.length-1].ownerDocument,E.map(s,Ft),d=0;d<l;d++)c=s[d],Tt.test(c.type||"")&&!rt.access(c,"globalEval")&&E.contains(u,c)&&(c.src&&"module"!==(c.type||"").toLowerCase()?E._evalUrl&&!c.noModule&&E._evalUrl(c.src,{nonce:c.nonce||c.getAttribute("nonce")},u):y(c.textContent.replace(jt,""),c,u))}return t}function Ut(t,e,n){for(var o,r=e?E.filter(e,t):t,i=0;null!=(o=r[i]);i++)n||1!==o.nodeType||E.cleanData(kt(o)),o.parentNode&&(n&&ht(o)&&St(kt(o,"script")),o.parentNode.removeChild(o));return t}E.extend({htmlPrefilter:function(t){return t},clone:function(t,e,n){var o,r,i,a,s=t.cloneNode(!0),l=ht(t);if(!(h.noCloneChecked||1!==t.nodeType&&11!==t.nodeType||E.isXMLDoc(t)))for(a=kt(s),o=0,r=(i=kt(t)).length;o<r;o++)zt(i[o],a[o]);if(e)if(n)for(i=i||kt(t),a=a||kt(s),o=0,r=i.length;o<r;o++)qt(i[o],a[o]);else qt(t,s);return(a=kt(s,"script")).length>0&&St(a,!l&&kt(t,"script")),s},cleanData:function(t){for(var e,n,o,r=E.event.special,i=0;void 0!==(n=t[i]);i++)if(nt(n)){if(e=n[rt.expando]){if(e.events)for(o in e.events)r[o]?E.event.remove(n,o):E.removeEvent(n,o,e.handle);n[rt.expando]=void 0}n[it.expando]&&(n[it.expando]=void 0)}}}),E.fn.extend({detach:function(t){return Ut(this,t,!0)},remove:function(t){return Ut(this,t)},text:function(t){return J(this,(function(t){return void 0===t?E.text(this):this.empty().each((function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=t)}))}),null,t,arguments.length)},append:function(){return Wt(this,arguments,(function(t){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Bt(this,t).appendChild(t)}))},prepend:function(){return Wt(this,arguments,(function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=Bt(this,t);e.insertBefore(t,e.firstChild)}}))},before:function(){return Wt(this,arguments,(function(t){this.parentNode&&this.parentNode.insertBefore(t,this)}))},after:function(){return Wt(this,arguments,(function(t){this.parentNode&&this.parentNode.insertBefore(t,this.nextSibling)}))},empty:function(){for(var t,e=0;null!=(t=this[e]);e++)1===t.nodeType&&(E.cleanData(kt(t,!1)),t.textContent="");return this},clone:function(t,e){return t=null!=t&&t,e=null==e?t:e,this.map((function(){return E.clone(this,t,e)}))},html:function(t){return J(this,(function(t){var e=this[0]||{},n=0,o=this.length;if(void 0===t&&1===e.nodeType)return e.innerHTML;if("string"==typeof t&&!Pt.test(t)&&!At[(Ct.exec(t)||["",""])[1].toLowerCase()]){t=E.htmlPrefilter(t);try{for(;n<o;n++)1===(e=this[n]||{}).nodeType&&(E.cleanData(kt(e,!1)),e.innerHTML=t);e=0}catch(t){}}e&&this.empty().append(t)}),null,t,arguments.length)},replaceWith:function(){var t=[];return Wt(this,arguments,(function(e){var n=this.parentNode;E.inArray(this,t)<0&&(E.cleanData(kt(this)),n&&n.replaceChild(e,this))}),t)}}),E.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},(function(t,e){E.fn[t]=function(t){for(var n,o=[],r=E(t),i=r.length-1,s=0;s<=i;s++)n=s===i?this:this.clone(!0),E(r[s])[e](n),a.apply(o,n.get());return this.pushStack(o)}}));var Yt=new RegExp("^("+ct+")(?!px)[a-z%]+$","i"),$t=/^--/,Xt=function(e){var n=e.ownerDocument.defaultView;return n&&n.opener||(n=t),n.getComputedStyle(e)},Vt=function(t,e,n){var o,r,i={};for(r in e)i[r]=t.style[r],t.style[r]=e[r];for(r in o=n.call(t),e)t.style[r]=i[r];return o},Kt=new RegExp(dt.join("|"),"i");function Qt(t,e,n){var o,r,i,a,s=$t.test(e),l=t.style;return(n=n||Xt(t))&&(a=n.getPropertyValue(e)||n[e],s&&a&&(a=a.replace(N,"$1")||void 0),""!==a||ht(t)||(a=E.style(t,e)),!h.pixelBoxStyles()&&Yt.test(a)&&Kt.test(e)&&(o=l.width,r=l.minWidth,i=l.maxWidth,l.minWidth=l.maxWidth=l.width=a,a=n.width,l.width=o,l.minWidth=r,l.maxWidth=i)),void 0!==a?a+"":a}function Jt(t,e){return{get:function(){if(!t())return(this.get=e).apply(this,arguments);delete this.get}}}!function(){function e(){if(u){c.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",u.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",ft.appendChild(c).appendChild(u);var e=t.getComputedStyle(u);o="1%"!==e.top,l=12===n(e.marginLeft),u.style.right="60%",a=36===n(e.right),r=36===n(e.width),u.style.position="absolute",i=12===n(u.offsetWidth/3),ft.removeChild(c),u=null}}function n(t){return Math.round(parseFloat(t))}var o,r,i,a,s,l,c=m.createElement("div"),u=m.createElement("div");u.style&&(u.style.backgroundClip="content-box",u.cloneNode(!0).style.backgroundClip="",h.clearCloneStyle="content-box"===u.style.backgroundClip,E.extend(h,{boxSizingReliable:function(){return e(),r},pixelBoxStyles:function(){return e(),a},pixelPosition:function(){return e(),o},reliableMarginLeft:function(){return e(),l},scrollboxSize:function(){return e(),i},reliableTrDimensions:function(){var e,n,o,r;return null==s&&(e=m.createElement("table"),n=m.createElement("tr"),o=m.createElement("div"),e.style.cssText="position:absolute;left:-11111px;border-collapse:separate",n.style.cssText="box-sizing:content-box;border:1px solid",n.style.height="1px",o.style.height="9px",o.style.display="block",ft.appendChild(e).appendChild(n).appendChild(o),r=t.getComputedStyle(n),s=parseInt(r.height,10)+parseInt(r.borderTopWidth,10)+parseInt(r.borderBottomWidth,10)===n.offsetHeight,ft.removeChild(e)),s}}))}();var Gt=["Webkit","Moz","ms"],Zt=m.createElement("div").style,te={};function ee(t){var e=E.cssProps[t]||te[t];return e||(t in Zt?t:te[t]=function(t){for(var e=t[0].toUpperCase()+t.slice(1),n=Gt.length;n--;)if((t=Gt[n]+e)in Zt)return t}(t)||t)}var ne=/^(none|table(?!-c[ea]).+)/,oe={position:"absolute",visibility:"hidden",display:"block"},re={letterSpacing:"0",fontWeight:"400"};function ie(t,e,n){var o=ut.exec(e);return o?Math.max(0,o[2]-(n||0))+(o[3]||"px"):e}function ae(t,e,n,o,r,i){var a="width"===e?1:0,s=0,l=0,c=0;if(n===(o?"border":"content"))return 0;for(;a<4;a+=2)"margin"===n&&(c+=E.css(t,n+dt[a],!0,r)),o?("content"===n&&(l-=E.css(t,"padding"+dt[a],!0,r)),"margin"!==n&&(l-=E.css(t,"border"+dt[a]+"Width",!0,r))):(l+=E.css(t,"padding"+dt[a],!0,r),"padding"!==n?l+=E.css(t,"border"+dt[a]+"Width",!0,r):s+=E.css(t,"border"+dt[a]+"Width",!0,r));return!o&&i>=0&&(l+=Math.max(0,Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-i-l-s-.5))||0),l+c}function se(t,e,n){var o=Xt(t),r=(!h.boxSizingReliable()||n)&&"border-box"===E.css(t,"boxSizing",!1,o),i=r,a=Qt(t,e,o),s="offset"+e[0].toUpperCase()+e.slice(1);if(Yt.test(a)){if(!n)return a;a="auto"}return(!h.boxSizingReliable()&&r||!h.reliableTrDimensions()&&T(t,"tr")||"auto"===a||!parseFloat(a)&&"inline"===E.css(t,"display",!1,o))&&t.getClientRects().length&&(r="border-box"===E.css(t,"boxSizing",!1,o),(i=s in t)&&(a=t[s])),(a=parseFloat(a)||0)+ae(t,e,n||(r?"border":"content"),i,o,a)+"px"}function le(t,e,n,o,r){return new le.prototype.init(t,e,n,o,r)}E.extend({cssHooks:{opacity:{get:function(t,e){if(e){var n=Qt(t,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,aspectRatio:!0,borderImageSlice:!0,columnCount:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,scale:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeMiterlimit:!0,strokeOpacity:!0},cssProps:{},style:function(t,e,n,o){if(t&&3!==t.nodeType&&8!==t.nodeType&&t.style){var r,i,a,s=et(e),l=$t.test(e),c=t.style;if(l||(e=ee(s)),a=E.cssHooks[e]||E.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(r=a.get(t,!1,o))?r:c[e];"string"==(i=typeof n)&&(r=ut.exec(n))&&r[1]&&(n=mt(t,e,r),i="number"),null!=n&&n==n&&("number"!==i||l||(n+=r&&r[3]||(E.cssNumber[s]?"":"px")),h.clearCloneStyle||""!==n||0!==e.indexOf("background")||(c[e]="inherit"),a&&"set"in a&&void 0===(n=a.set(t,n,o))||(l?c.setProperty(e,n):c[e]=n))}},css:function(t,e,n,o){var r,i,a,s=et(e);return $t.test(e)||(e=ee(s)),(a=E.cssHooks[e]||E.cssHooks[s])&&"get"in a&&(r=a.get(t,!0,n)),void 0===r&&(r=Qt(t,e,o)),"normal"===r&&e in re&&(r=re[e]),""===n||n?(i=parseFloat(r),!0===n||isFinite(i)?i||0:r):r}}),E.each(["height","width"],(function(t,e){E.cssHooks[e]={get:function(t,n,o){if(n)return!ne.test(E.css(t,"display"))||t.getClientRects().length&&t.getBoundingClientRect().width?se(t,e,o):Vt(t,oe,(function(){return se(t,e,o)}))},set:function(t,n,o){var r,i=Xt(t),a=!h.scrollboxSize()&&"absolute"===i.position,s=(a||o)&&"border-box"===E.css(t,"boxSizing",!1,i),l=o?ae(t,e,o,s,i):0;return s&&a&&(l-=Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-parseFloat(i[e])-ae(t,e,"border",!1,i)-.5)),l&&(r=ut.exec(n))&&"px"!==(r[3]||"px")&&(t.style[e]=n,n=E.css(t,e)),ie(0,n,l)}}})),E.cssHooks.marginLeft=Jt(h.reliableMarginLeft,(function(t,e){if(e)return(parseFloat(Qt(t,"marginLeft"))||t.getBoundingClientRect().left-Vt(t,{marginLeft:0},(function(){return t.getBoundingClientRect().left})))+"px"})),E.each({margin:"",padding:"",border:"Width"},(function(t,e){E.cssHooks[t+e]={expand:function(n){for(var o=0,r={},i="string"==typeof n?n.split(" "):[n];o<4;o++)r[t+dt[o]+e]=i[o]||i[o-2]||i[0];return r}},"margin"!==t&&(E.cssHooks[t+e].set=ie)})),E.fn.extend({css:function(t,e){return J(this,(function(t,e,n){var o,r,i={},a=0;if(Array.isArray(e)){for(o=Xt(t),r=e.length;a<r;a++)i[e[a]]=E.css(t,e[a],!1,o);return i}return void 0!==n?E.style(t,e,n):E.css(t,e)}),t,e,arguments.length>1)}}),E.Tween=le,le.prototype={constructor:le,init:function(t,e,n,o,r,i){this.elem=t,this.prop=n,this.easing=r||E.easing._default,this.options=e,this.start=this.now=this.cur(),this.end=o,this.unit=i||(E.cssNumber[n]?"":"px")},cur:function(){var t=le.propHooks[this.prop];return t&&t.get?t.get(this):le.propHooks._default.get(this)},run:function(t){var e,n=le.propHooks[this.prop];return this.options.duration?this.pos=e=E.easing[this.easing](t,this.options.duration*t,0,1,this.options.duration):this.pos=e=t,this.now=(this.end-this.start)*e+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):le.propHooks._default.set(this),this}},le.prototype.init.prototype=le.prototype,le.propHooks={_default:{get:function(t){var e;return 1!==t.elem.nodeType||null!=t.elem[t.prop]&&null==t.elem.style[t.prop]?t.elem[t.prop]:(e=E.css(t.elem,t.prop,""))&&"auto"!==e?e:0},set:function(t){E.fx.step[t.prop]?E.fx.step[t.prop](t):1!==t.elem.nodeType||!E.cssHooks[t.prop]&&null==t.elem.style[ee(t.prop)]?t.elem[t.prop]=t.now:E.style(t.elem,t.prop,t.now+t.unit)}}},le.propHooks.scrollTop=le.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},E.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2},_default:"swing"},E.fx=le.prototype.init,E.fx.step={};var ce,ue,de=/^(?:toggle|show|hide)$/,fe=/queueHooks$/;function he(){ue&&(!1===m.hidden&&t.requestAnimationFrame?t.requestAnimationFrame(he):t.setTimeout(he,E.fx.interval),E.fx.tick())}function pe(){return t.setTimeout((function(){ce=void 0})),ce=Date.now()}function ge(t,e){var n,o=0,r={height:t};for(e=e?1:0;o<4;o+=2-e)r["margin"+(n=dt[o])]=r["padding"+n]=t;return e&&(r.opacity=r.width=t),r}function me(t,e,n){for(var o,r=(ve.tweeners[e]||[]).concat(ve.tweeners["*"]),i=0,a=r.length;i<a;i++)if(o=r[i].call(n,e,t))return o}function ve(t,e,n){var o,r,i=0,a=ve.prefilters.length,s=E.Deferred().always((function(){delete l.elem})),l=function(){if(r)return!1;for(var e=ce||pe(),n=Math.max(0,c.startTime+c.duration-e),o=1-(n/c.duration||0),i=0,a=c.tweens.length;i<a;i++)c.tweens[i].run(o);return s.notifyWith(t,[c,o,n]),o<1&&a?n:(a||s.notifyWith(t,[c,1,0]),s.resolveWith(t,[c]),!1)},c=s.promise({elem:t,props:E.extend({},e),opts:E.extend(!0,{specialEasing:{},easing:E.easing._default},n),originalProperties:e,originalOptions:n,startTime:ce||pe(),duration:n.duration,tweens:[],createTween:function(e,n){var o=E.Tween(t,c.opts,e,n,c.opts.specialEasing[e]||c.opts.easing);return c.tweens.push(o),o},stop:function(e){var n=0,o=e?c.tweens.length:0;if(r)return this;for(r=!0;n<o;n++)c.tweens[n].run(1);return e?(s.notifyWith(t,[c,1,0]),s.resolveWith(t,[c,e])):s.rejectWith(t,[c,e]),this}}),u=c.props;for(function(t,e){var n,o,r,i,a;for(n in t)if(r=e[o=et(n)],i=t[n],Array.isArray(i)&&(r=i[1],i=t[n]=i[0]),n!==o&&(t[o]=i,delete t[n]),(a=E.cssHooks[o])&&"expand"in a)for(n in i=a.expand(i),delete t[o],i)n in t||(t[n]=i[n],e[n]=r);else e[o]=r}(u,c.opts.specialEasing);i<a;i++)if(o=ve.prefilters[i].call(c,t,u,c.opts))return p(o.stop)&&(E._queueHooks(c.elem,c.opts.queue).stop=o.stop.bind(o)),o;return E.map(u,me,c),p(c.opts.start)&&c.opts.start.call(t,c),c.progress(c.opts.progress).done(c.opts.done,c.opts.complete).fail(c.opts.fail).always(c.opts.always),E.fx.timer(E.extend(l,{elem:t,anim:c,queue:c.opts.queue})),c}E.Animation=E.extend(ve,{tweeners:{"*":[function(t,e){var n=this.createTween(t,e);return mt(n.elem,t,ut.exec(e),n),n}]},tweener:function(t,e){p(t)?(e=t,t=["*"]):t=t.match(U);for(var n,o=0,r=t.length;o<r;o++)n=t[o],ve.tweeners[n]=ve.tweeners[n]||[],ve.tweeners[n].unshift(e)},prefilters:[function(t,e,n){var o,r,i,a,s,l,c,u,d="width"in e||"height"in e,f=this,h={},p=t.style,g=t.nodeType&>(t),m=rt.get(t,"fxshow");for(o in n.queue||(null==(a=E._queueHooks(t,"fx")).unqueued&&(a.unqueued=0,s=a.empty.fire,a.empty.fire=function(){a.unqueued||s()}),a.unqueued++,f.always((function(){f.always((function(){a.unqueued--,E.queue(t,"fx").length||a.empty.fire()}))}))),e)if(r=e[o],de.test(r)){if(delete e[o],i=i||"toggle"===r,r===(g?"hide":"show")){if("show"!==r||!m||void 0===m[o])continue;g=!0}h[o]=m&&m[o]||E.style(t,o)}if((l=!E.isEmptyObject(e))||!E.isEmptyObject(h))for(o in d&&1===t.nodeType&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],null==(c=m&&m.display)&&(c=rt.get(t,"display")),"none"===(u=E.css(t,"display"))&&(c?u=c:(bt([t],!0),c=t.style.display||c,u=E.css(t,"display"),bt([t]))),("inline"===u||"inline-block"===u&&null!=c)&&"none"===E.css(t,"float")&&(l||(f.done((function(){p.display=c})),null==c&&(u=p.display,c="none"===u?"":u)),p.display="inline-block")),n.overflow&&(p.overflow="hidden",f.always((function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]}))),l=!1,h)l||(m?"hidden"in m&&(g=m.hidden):m=rt.access(t,"fxshow",{display:c}),i&&(m.hidden=!g),g&&bt([t],!0),f.done((function(){for(o in g||bt([t]),rt.remove(t,"fxshow"),h)E.style(t,o,h[o])}))),l=me(g?m[o]:0,o,f),o in m||(m[o]=l.start,g&&(l.end=l.start,l.start=0))}],prefilter:function(t,e){e?ve.prefilters.unshift(t):ve.prefilters.push(t)}}),E.speed=function(t,e,n){var o=t&&"object"==typeof t?E.extend({},t):{complete:n||!n&&e||p(t)&&t,duration:t,easing:n&&e||e&&!p(e)&&e};return E.fx.off?o.duration=0:"number"!=typeof o.duration&&(o.duration in E.fx.speeds?o.duration=E.fx.speeds[o.duration]:o.duration=E.fx.speeds._default),null!=o.queue&&!0!==o.queue||(o.queue="fx"),o.old=o.complete,o.complete=function(){p(o.old)&&o.old.call(this),o.queue&&E.dequeue(this,o.queue)},o},E.fn.extend({fadeTo:function(t,e,n,o){return this.filter(gt).css("opacity",0).show().end().animate({opacity:e},t,n,o)},animate:function(t,e,n,o){var r=E.isEmptyObject(t),i=E.speed(e,n,o),a=function(){var e=ve(this,E.extend({},t),i);(r||rt.get(this,"finish"))&&e.stop(!0)};return a.finish=a,r||!1===i.queue?this.each(a):this.queue(i.queue,a)},stop:function(t,e,n){var o=function(t){var e=t.stop;delete t.stop,e(n)};return"string"!=typeof t&&(n=e,e=t,t=void 0),e&&this.queue(t||"fx",[]),this.each((function(){var e=!0,r=null!=t&&t+"queueHooks",i=E.timers,a=rt.get(this);if(r)a[r]&&a[r].stop&&o(a[r]);else for(r in a)a[r]&&a[r].stop&&fe.test(r)&&o(a[r]);for(r=i.length;r--;)i[r].elem!==this||null!=t&&i[r].queue!==t||(i[r].anim.stop(n),e=!1,i.splice(r,1));!e&&n||E.dequeue(this,t)}))},finish:function(t){return!1!==t&&(t=t||"fx"),this.each((function(){var e,n=rt.get(this),o=n[t+"queue"],r=n[t+"queueHooks"],i=E.timers,a=o?o.length:0;for(n.finish=!0,E.queue(this,t,[]),r&&r.stop&&r.stop.call(this,!0),e=i.length;e--;)i[e].elem===this&&i[e].queue===t&&(i[e].anim.stop(!0),i.splice(e,1));for(e=0;e<a;e++)o[e]&&o[e].finish&&o[e].finish.call(this);delete n.finish}))}}),E.each(["toggle","show","hide"],(function(t,e){var n=E.fn[e];E.fn[e]=function(t,o,r){return null==t||"boolean"==typeof t?n.apply(this,arguments):this.animate(ge(e,!0),t,o,r)}})),E.each({slideDown:ge("show"),slideUp:ge("hide"),slideToggle:ge("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},(function(t,e){E.fn[t]=function(t,n,o){return this.animate(e,t,n,o)}})),E.timers=[],E.fx.tick=function(){var t,e=0,n=E.timers;for(ce=Date.now();e<n.length;e++)(t=n[e])()||n[e]!==t||n.splice(e--,1);n.length||E.fx.stop(),ce=void 0},E.fx.timer=function(t){E.timers.push(t),E.fx.start()},E.fx.interval=13,E.fx.start=function(){ue||(ue=!0,he())},E.fx.stop=function(){ue=null},E.fx.speeds={slow:600,fast:200,_default:400},E.fn.delay=function(e,n){return e=E.fx&&E.fx.speeds[e]||e,n=n||"fx",this.queue(n,(function(n,o){var r=t.setTimeout(n,e);o.stop=function(){t.clearTimeout(r)}}))},function(){var t=m.createElement("input"),e=m.createElement("select").appendChild(m.createElement("option"));t.type="checkbox",h.checkOn=""!==t.value,h.optSelected=e.selected,(t=m.createElement("input")).value="t",t.type="radio",h.radioValue="t"===t.value}();var ye,be=E.expr.attrHandle;E.fn.extend({attr:function(t,e){return J(this,E.attr,t,e,arguments.length>1)},removeAttr:function(t){return this.each((function(){E.removeAttr(this,t)}))}}),E.extend({attr:function(t,e,n){var o,r,i=t.nodeType;if(3!==i&&8!==i&&2!==i)return void 0===t.getAttribute?E.prop(t,e,n):(1===i&&E.isXMLDoc(t)||(r=E.attrHooks[e.toLowerCase()]||(E.expr.match.bool.test(e)?ye:void 0)),void 0!==n?null===n?void E.removeAttr(t,e):r&&"set"in r&&void 0!==(o=r.set(t,n,e))?o:(t.setAttribute(e,n+""),n):r&&"get"in r&&null!==(o=r.get(t,e))?o:null==(o=E.find.attr(t,e))?void 0:o)},attrHooks:{type:{set:function(t,e){if(!h.radioValue&&"radio"===e&&T(t,"input")){var n=t.value;return t.setAttribute("type",e),n&&(t.value=n),e}}}},removeAttr:function(t,e){var n,o=0,r=e&&e.match(U);if(r&&1===t.nodeType)for(;n=r[o++];)t.removeAttribute(n)}}),ye={set:function(t,e,n){return!1===e?E.removeAttr(t,n):t.setAttribute(n,n),n}},E.each(E.expr.match.bool.source.match(/\w+/g),(function(t,e){var n=be[e]||E.find.attr;be[e]=function(t,e,o){var r,i,a=e.toLowerCase();return o||(i=be[a],be[a]=r,r=null!=n(t,e,o)?a:null,be[a]=i),r}}));var we=/^(?:input|select|textarea|button)$/i,xe=/^(?:a|area)$/i;function Ee(t){return(t.match(U)||[]).join(" ")}function Ce(t){return t.getAttribute&&t.getAttribute("class")||""}function Te(t){return Array.isArray(t)?t:"string"==typeof t&&t.match(U)||[]}E.fn.extend({prop:function(t,e){return J(this,E.prop,t,e,arguments.length>1)},removeProp:function(t){return this.each((function(){delete this[E.propFix[t]||t]}))}}),E.extend({prop:function(t,e,n){var o,r,i=t.nodeType;if(3!==i&&8!==i&&2!==i)return 1===i&&E.isXMLDoc(t)||(e=E.propFix[e]||e,r=E.propHooks[e]),void 0!==n?r&&"set"in r&&void 0!==(o=r.set(t,n,e))?o:t[e]=n:r&&"get"in r&&null!==(o=r.get(t,e))?o:t[e]},propHooks:{tabIndex:{get:function(t){var e=E.find.attr(t,"tabindex");return e?parseInt(e,10):we.test(t.nodeName)||xe.test(t.nodeName)&&t.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),h.optSelected||(E.propHooks.selected={get:function(t){var e=t.parentNode;return e&&e.parentNode&&e.parentNode.selectedIndex,null},set:function(t){var e=t.parentNode;e&&(e.selectedIndex,e.parentNode&&e.parentNode.selectedIndex)}}),E.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){E.propFix[this.toLowerCase()]=this})),E.fn.extend({addClass:function(t){var e,n,o,r,i,a;return p(t)?this.each((function(e){E(this).addClass(t.call(this,e,Ce(this)))})):(e=Te(t)).length?this.each((function(){if(o=Ce(this),n=1===this.nodeType&&" "+Ee(o)+" "){for(i=0;i<e.length;i++)r=e[i],n.indexOf(" "+r+" ")<0&&(n+=r+" ");a=Ee(n),o!==a&&this.setAttribute("class",a)}})):this},removeClass:function(t){var e,n,o,r,i,a;return p(t)?this.each((function(e){E(this).removeClass(t.call(this,e,Ce(this)))})):arguments.length?(e=Te(t)).length?this.each((function(){if(o=Ce(this),n=1===this.nodeType&&" "+Ee(o)+" "){for(i=0;i<e.length;i++)for(r=e[i];n.indexOf(" "+r+" ")>-1;)n=n.replace(" "+r+" "," ");a=Ee(n),o!==a&&this.setAttribute("class",a)}})):this:this.attr("class","")},toggleClass:function(t,e){var n,o,r,i,a=typeof t,s="string"===a||Array.isArray(t);return p(t)?this.each((function(n){E(this).toggleClass(t.call(this,n,Ce(this),e),e)})):"boolean"==typeof e&&s?e?this.addClass(t):this.removeClass(t):(n=Te(t),this.each((function(){if(s)for(i=E(this),r=0;r<n.length;r++)o=n[r],i.hasClass(o)?i.removeClass(o):i.addClass(o);else void 0!==t&&"boolean"!==a||((o=Ce(this))&&rt.set(this,"__className__",o),this.setAttribute&&this.setAttribute("class",o||!1===t?"":rt.get(this,"__className__")||""))})))},hasClass:function(t){var e,n,o=0;for(e=" "+t+" ";n=this[o++];)if(1===n.nodeType&&(" "+Ee(Ce(n))+" ").indexOf(e)>-1)return!0;return!1}});var Ae=/\r/g;E.fn.extend({val:function(t){var e,n,o,r=this[0];return arguments.length?(o=p(t),this.each((function(n){var r;1===this.nodeType&&(null==(r=o?t.call(this,n,E(this).val()):t)?r="":"number"==typeof r?r+="":Array.isArray(r)&&(r=E.map(r,(function(t){return null==t?"":t+""}))),(e=E.valHooks[this.type]||E.valHooks[this.nodeName.toLowerCase()])&&"set"in e&&void 0!==e.set(this,r,"value")||(this.value=r))}))):r?(e=E.valHooks[r.type]||E.valHooks[r.nodeName.toLowerCase()])&&"get"in e&&void 0!==(n=e.get(r,"value"))?n:"string"==typeof(n=r.value)?n.replace(Ae,""):null==n?"":n:void 0}}),E.extend({valHooks:{option:{get:function(t){var e=E.find.attr(t,"value");return null!=e?e:Ee(E.text(t))}},select:{get:function(t){var e,n,o,r=t.options,i=t.selectedIndex,a="select-one"===t.type,s=a?null:[],l=a?i+1:r.length;for(o=i<0?l:a?i:0;o<l;o++)if(((n=r[o]).selected||o===i)&&!n.disabled&&(!n.parentNode.disabled||!T(n.parentNode,"optgroup"))){if(e=E(n).val(),a)return e;s.push(e)}return s},set:function(t,e){for(var n,o,r=t.options,i=E.makeArray(e),a=r.length;a--;)((o=r[a]).selected=E.inArray(E.valHooks.option.get(o),i)>-1)&&(n=!0);return n||(t.selectedIndex=-1),i}}}}),E.each(["radio","checkbox"],(function(){E.valHooks[this]={set:function(t,e){if(Array.isArray(e))return t.checked=E.inArray(E(t).val(),e)>-1}},h.checkOn||(E.valHooks[this].get=function(t){return null===t.getAttribute("value")?"on":t.value})}));var ke=t.location,Se={guid:Date.now()},De=/\?/;E.parseXML=function(e){var n,o;if(!e||"string"!=typeof e)return null;try{n=(new t.DOMParser).parseFromString(e,"text/xml")}catch(t){}return o=n&&n.getElementsByTagName("parsererror")[0],n&&!o||E.error("Invalid XML: "+(o?E.map(o.childNodes,(function(t){return t.textContent})).join("\n"):e)),n};var Ne=/^(?:focusinfocus|focusoutblur)$/,Le=function(t){t.stopPropagation()};E.extend(E.event,{trigger:function(e,n,o,r){var i,a,s,l,c,d,f,h,v=[o||m],y=u.call(e,"type")?e.type:e,b=u.call(e,"namespace")?e.namespace.split("."):[];if(a=h=s=o=o||m,3!==o.nodeType&&8!==o.nodeType&&!Ne.test(y+E.event.triggered)&&(y.indexOf(".")>-1&&(b=y.split("."),y=b.shift(),b.sort()),c=y.indexOf(":")<0&&"on"+y,(e=e[E.expando]?e:new E.Event(y,"object"==typeof e&&e)).isTrigger=r?2:3,e.namespace=b.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+b.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=o),n=null==n?[e]:E.makeArray(n,[e]),f=E.event.special[y]||{},r||!f.trigger||!1!==f.trigger.apply(o,n))){if(!r&&!f.noBubble&&!g(o)){for(l=f.delegateType||y,Ne.test(l+y)||(a=a.parentNode);a;a=a.parentNode)v.push(a),s=a;s===(o.ownerDocument||m)&&v.push(s.defaultView||s.parentWindow||t)}for(i=0;(a=v[i++])&&!e.isPropagationStopped();)h=a,e.type=i>1?l:f.bindType||y,(d=(rt.get(a,"events")||Object.create(null))[e.type]&&rt.get(a,"handle"))&&d.apply(a,n),(d=c&&a[c])&&d.apply&&nt(a)&&(e.result=d.apply(a,n),!1===e.result&&e.preventDefault());return e.type=y,r||e.isDefaultPrevented()||f._default&&!1!==f._default.apply(v.pop(),n)||!nt(o)||c&&p(o[y])&&!g(o)&&((s=o[c])&&(o[c]=null),E.event.triggered=y,e.isPropagationStopped()&&h.addEventListener(y,Le),o[y](),e.isPropagationStopped()&&h.removeEventListener(y,Le),E.event.triggered=void 0,s&&(o[c]=s)),e.result}},simulate:function(t,e,n){var o=E.extend(new E.Event,n,{type:t,isSimulated:!0});E.event.trigger(o,null,e)}}),E.fn.extend({trigger:function(t,e){return this.each((function(){E.event.trigger(t,e,this)}))},triggerHandler:function(t,e){var n=this[0];if(n)return E.event.trigger(t,e,n,!0)}});var Me=/\[\]$/,_e=/\r?\n/g,Ie=/^(?:submit|button|image|reset|file)$/i,Oe=/^(?:input|select|textarea|keygen)/i;function Pe(t,e,n,o){var r;if(Array.isArray(e))E.each(e,(function(e,r){n||Me.test(t)?o(t,r):Pe(t+"["+("object"==typeof r&&null!=r?e:"")+"]",r,n,o)}));else if(n||"object"!==b(e))o(t,e);else for(r in e)Pe(t+"["+r+"]",e[r],n,o)}E.param=function(t,e){var n,o=[],r=function(t,e){var n=p(e)?e():e;o[o.length]=encodeURIComponent(t)+"="+encodeURIComponent(null==n?"":n)};if(null==t)return"";if(Array.isArray(t)||t.jquery&&!E.isPlainObject(t))E.each(t,(function(){r(this.name,this.value)}));else for(n in t)Pe(n,t[n],e,r);return o.join("&")},E.fn.extend({serialize:function(){return E.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var t=E.prop(this,"elements");return t?E.makeArray(t):this})).filter((function(){var t=this.type;return this.name&&!E(this).is(":disabled")&&Oe.test(this.nodeName)&&!Ie.test(t)&&(this.checked||!Et.test(t))})).map((function(t,e){var n=E(this).val();return null==n?null:Array.isArray(n)?E.map(n,(function(t){return{name:e.name,value:t.replace(_e,"\r\n")}})):{name:e.name,value:n.replace(_e,"\r\n")}})).get()}});var Re=/%20/g,je=/#.*$/,Be=/([?&])_=[^&]*/,He=/^(.*?):[ \t]*([^\r\n]*)$/gm,Fe=/^(?:GET|HEAD)$/,qe=/^\/\//,ze={},We={},Ue="*/".concat("*"),Ye=m.createElement("a");function $e(t){return function(e,n){"string"!=typeof e&&(n=e,e="*");var o,r=0,i=e.toLowerCase().match(U)||[];if(p(n))for(;o=i[r++];)"+"===o[0]?(o=o.slice(1)||"*",(t[o]=t[o]||[]).unshift(n)):(t[o]=t[o]||[]).push(n)}}function Xe(t,e,n,o){var r={},i=t===We;function a(s){var l;return r[s]=!0,E.each(t[s]||[],(function(t,s){var c=s(e,n,o);return"string"!=typeof c||i||r[c]?i?!(l=c):void 0:(e.dataTypes.unshift(c),a(c),!1)})),l}return a(e.dataTypes[0])||!r["*"]&&a("*")}function Ve(t,e){var n,o,r=E.ajaxSettings.flatOptions||{};for(n in e)void 0!==e[n]&&((r[n]?t:o||(o={}))[n]=e[n]);return o&&E.extend(!0,t,o),t}Ye.href=ke.href,E.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:ke.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(ke.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Ue,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":E.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,e){return e?Ve(Ve(t,E.ajaxSettings),e):Ve(E.ajaxSettings,t)},ajaxPrefilter:$e(ze),ajaxTransport:$e(We),ajax:function(e,n){"object"==typeof e&&(n=e,e=void 0),n=n||{};var o,r,i,a,s,l,c,u,d,f,h=E.ajaxSetup({},n),p=h.context||h,g=h.context&&(p.nodeType||p.jquery)?E(p):E.event,v=E.Deferred(),y=E.Callbacks("once memory"),b=h.statusCode||{},w={},x={},C="canceled",T={readyState:0,getResponseHeader:function(t){var e;if(c){if(!a)for(a={};e=He.exec(i);)a[e[1].toLowerCase()+" "]=(a[e[1].toLowerCase()+" "]||[]).concat(e[2]);e=a[t.toLowerCase()+" "]}return null==e?null:e.join(", ")},getAllResponseHeaders:function(){return c?i:null},setRequestHeader:function(t,e){return null==c&&(t=x[t.toLowerCase()]=x[t.toLowerCase()]||t,w[t]=e),this},overrideMimeType:function(t){return null==c&&(h.mimeType=t),this},statusCode:function(t){var e;if(t)if(c)T.always(t[T.status]);else for(e in t)b[e]=[b[e],t[e]];return this},abort:function(t){var e=t||C;return o&&o.abort(e),A(0,e),this}};if(v.promise(T),h.url=((e||h.url||ke.href)+"").replace(qe,ke.protocol+"//"),h.type=n.method||n.type||h.method||h.type,h.dataTypes=(h.dataType||"*").toLowerCase().match(U)||[""],null==h.crossDomain){l=m.createElement("a");try{l.href=h.url,l.href=l.href,h.crossDomain=Ye.protocol+"//"+Ye.host!=l.protocol+"//"+l.host}catch(t){h.crossDomain=!0}}if(h.data&&h.processData&&"string"!=typeof h.data&&(h.data=E.param(h.data,h.traditional)),Xe(ze,h,n,T),c)return T;for(d in(u=E.event&&h.global)&&0==E.active++&&E.event.trigger("ajaxStart"),h.type=h.type.toUpperCase(),h.hasContent=!Fe.test(h.type),r=h.url.replace(je,""),h.hasContent?h.data&&h.processData&&0===(h.contentType||"").indexOf("application/x-www-form-urlencoded")&&(h.data=h.data.replace(Re,"+")):(f=h.url.slice(r.length),h.data&&(h.processData||"string"==typeof h.data)&&(r+=(De.test(r)?"&":"?")+h.data,delete h.data),!1===h.cache&&(r=r.replace(Be,"$1"),f=(De.test(r)?"&":"?")+"_="+Se.guid+++f),h.url=r+f),h.ifModified&&(E.lastModified[r]&&T.setRequestHeader("If-Modified-Since",E.lastModified[r]),E.etag[r]&&T.setRequestHeader("If-None-Match",E.etag[r])),(h.data&&h.hasContent&&!1!==h.contentType||n.contentType)&&T.setRequestHeader("Content-Type",h.contentType),T.setRequestHeader("Accept",h.dataTypes[0]&&h.accepts[h.dataTypes[0]]?h.accepts[h.dataTypes[0]]+("*"!==h.dataTypes[0]?", "+Ue+"; q=0.01":""):h.accepts["*"]),h.headers)T.setRequestHeader(d,h.headers[d]);if(h.beforeSend&&(!1===h.beforeSend.call(p,T,h)||c))return T.abort();if(C="abort",y.add(h.complete),T.done(h.success),T.fail(h.error),o=Xe(We,h,n,T)){if(T.readyState=1,u&&g.trigger("ajaxSend",[T,h]),c)return T;h.async&&h.timeout>0&&(s=t.setTimeout((function(){T.abort("timeout")}),h.timeout));try{c=!1,o.send(w,A)}catch(t){if(c)throw t;A(-1,t)}}else A(-1,"No Transport");function A(e,n,a,l){var d,f,m,w,x,C=n;c||(c=!0,s&&t.clearTimeout(s),o=void 0,i=l||"",T.readyState=e>0?4:0,d=e>=200&&e<300||304===e,a&&(w=function(t,e,n){for(var o,r,i,a,s=t.contents,l=t.dataTypes;"*"===l[0];)l.shift(),void 0===o&&(o=t.mimeType||e.getResponseHeader("Content-Type"));if(o)for(r in s)if(s[r]&&s[r].test(o)){l.unshift(r);break}if(l[0]in n)i=l[0];else{for(r in n){if(!l[0]||t.converters[r+" "+l[0]]){i=r;break}a||(a=r)}i=i||a}if(i)return i!==l[0]&&l.unshift(i),n[i]}(h,T,a)),!d&&E.inArray("script",h.dataTypes)>-1&&E.inArray("json",h.dataTypes)<0&&(h.converters["text script"]=function(){}),w=function(t,e,n,o){var r,i,a,s,l,c={},u=t.dataTypes.slice();if(u[1])for(a in t.converters)c[a.toLowerCase()]=t.converters[a];for(i=u.shift();i;)if(t.responseFields[i]&&(n[t.responseFields[i]]=e),!l&&o&&t.dataFilter&&(e=t.dataFilter(e,t.dataType)),l=i,i=u.shift())if("*"===i)i=l;else if("*"!==l&&l!==i){if(!(a=c[l+" "+i]||c["* "+i]))for(r in c)if((s=r.split(" "))[1]===i&&(a=c[l+" "+s[0]]||c["* "+s[0]])){!0===a?a=c[r]:!0!==c[r]&&(i=s[0],u.unshift(s[1]));break}if(!0!==a)if(a&&t.throws)e=a(e);else try{e=a(e)}catch(t){return{state:"parsererror",error:a?t:"No conversion from "+l+" to "+i}}}return{state:"success",data:e}}(h,w,T,d),d?(h.ifModified&&((x=T.getResponseHeader("Last-Modified"))&&(E.lastModified[r]=x),(x=T.getResponseHeader("etag"))&&(E.etag[r]=x)),204===e||"HEAD"===h.type?C="nocontent":304===e?C="notmodified":(C=w.state,f=w.data,d=!(m=w.error))):(m=C,!e&&C||(C="error",e<0&&(e=0))),T.status=e,T.statusText=(n||C)+"",d?v.resolveWith(p,[f,C,T]):v.rejectWith(p,[T,C,m]),T.statusCode(b),b=void 0,u&&g.trigger(d?"ajaxSuccess":"ajaxError",[T,h,d?f:m]),y.fireWith(p,[T,C]),u&&(g.trigger("ajaxComplete",[T,h]),--E.active||E.event.trigger("ajaxStop")))}return T},getJSON:function(t,e,n){return E.get(t,e,n,"json")},getScript:function(t,e){return E.get(t,void 0,e,"script")}}),E.each(["get","post"],(function(t,e){E[e]=function(t,n,o,r){return p(n)&&(r=r||o,o=n,n=void 0),E.ajax(E.extend({url:t,type:e,dataType:r,data:n,success:o},E.isPlainObject(t)&&t))}})),E.ajaxPrefilter((function(t){var e;for(e in t.headers)"content-type"===e.toLowerCase()&&(t.contentType=t.headers[e]||"")})),E._evalUrl=function(t,e,n){return E.ajax({url:t,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(t){E.globalEval(t,e,n)}})},E.fn.extend({wrapAll:function(t){var e;return this[0]&&(p(t)&&(t=t.call(this[0])),e=E(t,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&e.insertBefore(this[0]),e.map((function(){for(var t=this;t.firstElementChild;)t=t.firstElementChild;return t})).append(this)),this},wrapInner:function(t){return p(t)?this.each((function(e){E(this).wrapInner(t.call(this,e))})):this.each((function(){var e=E(this),n=e.contents();n.length?n.wrapAll(t):e.append(t)}))},wrap:function(t){var e=p(t);return this.each((function(n){E(this).wrapAll(e?t.call(this,n):t)}))},unwrap:function(t){return this.parent(t).not("body").each((function(){E(this).replaceWith(this.childNodes)})),this}}),E.expr.pseudos.hidden=function(t){return!E.expr.pseudos.visible(t)},E.expr.pseudos.visible=function(t){return!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)},E.ajaxSettings.xhr=function(){try{return new t.XMLHttpRequest}catch(t){}};var Ke={0:200,1223:204},Qe=E.ajaxSettings.xhr();h.cors=!!Qe&&"withCredentials"in Qe,h.ajax=Qe=!!Qe,E.ajaxTransport((function(e){var n,o;if(h.cors||Qe&&!e.crossDomain)return{send:function(r,i){var a,s=e.xhr();if(s.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(a in e.xhrFields)s[a]=e.xhrFields[a];for(a in e.mimeType&&s.overrideMimeType&&s.overrideMimeType(e.mimeType),e.crossDomain||r["X-Requested-With"]||(r["X-Requested-With"]="XMLHttpRequest"),r)s.setRequestHeader(a,r[a]);n=function(t){return function(){n&&(n=o=s.onload=s.onerror=s.onabort=s.ontimeout=s.onreadystatechange=null,"abort"===t?s.abort():"error"===t?"number"!=typeof s.status?i(0,"error"):i(s.status,s.statusText):i(Ke[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=n(),o=s.onerror=s.ontimeout=n("error"),void 0!==s.onabort?s.onabort=o:s.onreadystatechange=function(){4===s.readyState&&t.setTimeout((function(){n&&o()}))},n=n("abort");try{s.send(e.hasContent&&e.data||null)}catch(t){if(n)throw t}},abort:function(){n&&n()}}})),E.ajaxPrefilter((function(t){t.crossDomain&&(t.contents.script=!1)})),E.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(t){return E.globalEval(t),t}}}),E.ajaxPrefilter("script",(function(t){void 0===t.cache&&(t.cache=!1),t.crossDomain&&(t.type="GET")})),E.ajaxTransport("script",(function(t){var e,n;if(t.crossDomain||t.scriptAttrs)return{send:function(o,r){e=E("<script>").attr(t.scriptAttrs||{}).prop({charset:t.scriptCharset,src:t.url}).on("load error",n=function(t){e.remove(),n=null,t&&r("error"===t.type?404:200,t.type)}),m.head.appendChild(e[0])},abort:function(){n&&n()}}}));var Je,Ge=[],Ze=/(=)\?(?=&|$)|\?\?/;E.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var t=Ge.pop()||E.expando+"_"+Se.guid++;return this[t]=!0,t}}),E.ajaxPrefilter("json jsonp",(function(e,n,o){var r,i,a,s=!1!==e.jsonp&&(Ze.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Ze.test(e.data)&&"data");if(s||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=p(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,s?e[s]=e[s].replace(Ze,"$1"+r):!1!==e.jsonp&&(e.url+=(De.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return a||E.error(r+" was not called"),a[0]},e.dataTypes[0]="json",i=t[r],t[r]=function(){a=arguments},o.always((function(){void 0===i?E(t).removeProp(r):t[r]=i,e[r]&&(e.jsonpCallback=n.jsonpCallback,Ge.push(r)),a&&p(i)&&i(a[0]),a=i=void 0})),"script"})),h.createHTMLDocument=((Je=m.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===Je.childNodes.length),E.parseHTML=function(t,e,n){return"string"!=typeof t?[]:("boolean"==typeof e&&(n=e,e=!1),e||(h.createHTMLDocument?((o=(e=m.implementation.createHTMLDocument("")).createElement("base")).href=m.location.href,e.head.appendChild(o)):e=m),i=!n&&[],(r=j.exec(t))?[e.createElement(r[1])]:(r=Nt([t],e,i),i&&i.length&&E(i).remove(),E.merge([],r.childNodes)));var o,r,i},E.fn.load=function(t,e,n){var o,r,i,a=this,s=t.indexOf(" ");return s>-1&&(o=Ee(t.slice(s)),t=t.slice(0,s)),p(e)?(n=e,e=void 0):e&&"object"==typeof e&&(r="POST"),a.length>0&&E.ajax({url:t,type:r||"GET",dataType:"html",data:e}).done((function(t){i=arguments,a.html(o?E("<div>").append(E.parseHTML(t)).find(o):t)})).always(n&&function(t,e){a.each((function(){n.apply(this,i||[t.responseText,e,t])}))}),this},E.expr.pseudos.animated=function(t){return E.grep(E.timers,(function(e){return t===e.elem})).length},E.offset={setOffset:function(t,e,n){var o,r,i,a,s,l,c=E.css(t,"position"),u=E(t),d={};"static"===c&&(t.style.position="relative"),s=u.offset(),i=E.css(t,"top"),l=E.css(t,"left"),("absolute"===c||"fixed"===c)&&(i+l).indexOf("auto")>-1?(a=(o=u.position()).top,r=o.left):(a=parseFloat(i)||0,r=parseFloat(l)||0),p(e)&&(e=e.call(t,n,E.extend({},s))),null!=e.top&&(d.top=e.top-s.top+a),null!=e.left&&(d.left=e.left-s.left+r),"using"in e?e.using.call(t,d):u.css(d)}},E.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each((function(e){E.offset.setOffset(this,t,e)}));var e,n,o=this[0];return o?o.getClientRects().length?(e=o.getBoundingClientRect(),n=o.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var t,e,n,o=this[0],r={top:0,left:0};if("fixed"===E.css(o,"position"))e=o.getBoundingClientRect();else{for(e=this.offset(),n=o.ownerDocument,t=o.offsetParent||n.documentElement;t&&(t===n.body||t===n.documentElement)&&"static"===E.css(t,"position");)t=t.parentNode;t&&t!==o&&1===t.nodeType&&((r=E(t).offset()).top+=E.css(t,"borderTopWidth",!0),r.left+=E.css(t,"borderLeftWidth",!0))}return{top:e.top-r.top-E.css(o,"marginTop",!0),left:e.left-r.left-E.css(o,"marginLeft",!0)}}},offsetParent:function(){return this.map((function(){for(var t=this.offsetParent;t&&"static"===E.css(t,"position");)t=t.offsetParent;return t||ft}))}}),E.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},(function(t,e){var n="pageYOffset"===e;E.fn[t]=function(o){return J(this,(function(t,o,r){var i;if(g(t)?i=t:9===t.nodeType&&(i=t.defaultView),void 0===r)return i?i[e]:t[o];i?i.scrollTo(n?i.pageXOffset:r,n?r:i.pageYOffset):t[o]=r}),t,o,arguments.length)}})),E.each(["top","left"],(function(t,e){E.cssHooks[e]=Jt(h.pixelPosition,(function(t,n){if(n)return n=Qt(t,e),Yt.test(n)?E(t).position()[e]+"px":n}))})),E.each({Height:"height",Width:"width"},(function(t,e){E.each({padding:"inner"+t,content:e,"":"outer"+t},(function(n,o){E.fn[o]=function(r,i){var a=arguments.length&&(n||"boolean"!=typeof r),s=n||(!0===r||!0===i?"margin":"border");return J(this,(function(e,n,r){var i;return g(e)?0===o.indexOf("outer")?e["inner"+t]:e.document.documentElement["client"+t]:9===e.nodeType?(i=e.documentElement,Math.max(e.body["scroll"+t],i["scroll"+t],e.body["offset"+t],i["offset"+t],i["client"+t])):void 0===r?E.css(e,n,s):E.style(e,n,r,s)}),e,a?r:void 0,a)}}))})),E.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],(function(t,e){E.fn[e]=function(t){return this.on(e,t)}})),E.fn.extend({bind:function(t,e,n){return this.on(t,null,e,n)},unbind:function(t,e){return this.off(t,null,e)},delegate:function(t,e,n,o){return this.on(e,t,n,o)},undelegate:function(t,e,n){return 1===arguments.length?this.off(t,"**"):this.off(e,t||"**",n)},hover:function(t,e){return this.on("mouseenter",t).on("mouseleave",e||t)}}),E.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),(function(t,e){E.fn[e]=function(t,n){return arguments.length>0?this.on(e,null,t,n):this.trigger(e)}}));var tn=/^[\s\uFEFF\xA0]+|([^\s\uFEFF\xA0])[\s\uFEFF\xA0]+$/g;E.proxy=function(t,e){var n,o,i;if("string"==typeof e&&(n=t[e],e=t,t=n),p(t))return o=r.call(arguments,2),i=function(){return t.apply(e||this,o.concat(r.call(arguments)))},i.guid=t.guid=t.guid||E.guid++,i},E.holdReady=function(t){t?E.readyWait++:E.ready(!0)},E.isArray=Array.isArray,E.parseJSON=JSON.parse,E.nodeName=T,E.isFunction=p,E.isWindow=g,E.camelCase=et,E.type=b,E.now=Date.now,E.isNumeric=function(t){var e=E.type(t);return("number"===e||"string"===e)&&!isNaN(t-parseFloat(t))},E.trim=function(t){return null==t?"":(t+"").replace(tn,"$1")};var en=t.jQuery,nn=t.$;return E.noConflict=function(e){return t.$===E&&(t.$=nn),e&&t.jQuery===E&&(t.jQuery=en),E},void 0===e&&(t.jQuery=t.$=E),E},n.exports=o.document?r(o,!0):function(t){if(!t.document)throw new Error("jQuery requires a window with a document");return r(t)}),n.exports),s=t(a),l={exports:{}};i||(i=1,l.exports=function(){
|
||
/*! matchMedia() polyfill - Test a CSS media type/query in JS. Authors & copyright (c) 2012: Scott Jehl, Paul Irish, Nicholas Zakas, David Knight. Dual MIT/BSD license */
|
||
window.matchMedia||(window.matchMedia=function(){var t=window.styleMedia||window.media;if(!t){var e=document.createElement("style"),n=document.getElementsByTagName("script")[0],o=null;e.type="text/css",e.id="matchmediajs-test",n.parentNode.insertBefore(e,n),o="getComputedStyle"in window&&window.getComputedStyle(e,null)||e.currentStyle,t={matchMedium:function(t){var n="@media "+t+"{ #matchmediajs-test { width: 1px; } }";return e.styleSheet?e.styleSheet.cssText=n:e.textContent=n,"1px"===o.width}}}return function(e){return{matches:t.matchMedium(e||"all"),media:e||"all"}}}())
|
||
/*! matchMedia() polyfill addListener/removeListener extension. Author & copyright (c) 2012: Scott Jehl. Dual MIT/BSD license */,function(){if(window.matchMedia&&window.matchMedia("all").addListener)return!1;var t=window.matchMedia,e=t("only all").matches,n=!1,o=0,r=[],i=function(e){clearTimeout(o),o=setTimeout((function(){for(var e=0,n=r.length;e<n;e++){var o=r[e].mql,i=r[e].listeners||[],a=t(o.media).matches;if(a!==o.matches){o.matches=a;for(var s=0,l=i.length;s<l;s++)i[s].call(window,o)}}}),30)};window.matchMedia=function(o){var a=t(o),s=[],l=0;return a.addListener=function(t){e&&(n||(n=!0,window.addEventListener("resize",i,!0)),0===l&&(l=r.push({mql:a,listeners:s})),s.push(t))},a.removeListener=function(t){for(var e=0,n=s.length;e<n;e++)s[e]===t&&s.splice(e,1)},a}}(),function(){for(var t=0,e=["ms","moz","webkit","o"],n=0;n<e.length&&!window.requestAnimationFrame;++n)window.requestAnimationFrame=window[e[n]+"RequestAnimationFrame"],window.cancelAnimationFrame=window[e[n]+"CancelAnimationFrame"]||window[e[n]+"CancelRequestAnimationFrame"];window.requestAnimationFrame||(window.requestAnimationFrame=function(e,n){var o=(new Date).getTime(),r=Math.max(0,16-(o-t)),i=window.setTimeout((function(){e(o+r)}),r);return t=o+r,i}),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(t){clearTimeout(t)})}(),"function"!=typeof window.CustomEvent&&function(){function t(t,e){e=e||{bubbles:!1,cancelable:!1,detail:void 0};var n=document.createEvent("CustomEvent");return n.initCustomEvent(t,e.bubbles,e.cancelable,e.detail),n}t.prototype=window.Event.prototype,window.CustomEvent=t}();var t=function(t,e){var n={},o=[],r=[],i=[],a=function(t,e,n){t.dataset?t.dataset[e]=n:t.setAttribute("data-"+e,n)};return n.obtainGridSettings=function(e){var n=t.getComputedStyle(e,":before").getPropertyValue("content").slice(1,-1),o=n.match(/^\s*(\d+)(?:\s?\.(.+))?\s*$/),r=1,i=[];return o?(r=o[1],i=(i=o[2])?i.split("."):["column"]):(o=n.match(/^\s*\.(.+)\s+(\d+)\s*$/))&&(i=o[1],(r=o[2])&&(r=r.split("."))),{numberOfColumns:r,columnClasses:i}},n.addColumns=function(t,o){for(var r,i=n.obtainGridSettings(t),s=i.numberOfColumns,l=i.columnClasses,c=new Array(+s),u=e.createDocumentFragment(),d=s;0!=d--;)r="[data-columns] > *:nth-child("+s+"n-"+d+")",c.push(o.querySelectorAll(r));c.forEach((function(t){var n=e.createElement("div"),o=e.createDocumentFragment();n.className=l.join(" "),Array.prototype.forEach.call(t,(function(t){o.appendChild(t)})),n.appendChild(o),u.appendChild(n)})),t.appendChild(u),a(t,"columns",s)},n.removeColumns=function(n){var o=e.createRange();o.selectNodeContents(n);var r=Array.prototype.filter.call(o.extractContents().childNodes,(function(e){return e instanceof t.HTMLElement})),i=r.length,s=r[0].childNodes.length,l=new Array(s*i);Array.prototype.forEach.call(r,(function(t,e){Array.prototype.forEach.call(t.children,(function(t,n){l[n*i+e]=t}))}));var c=e.createElement("div");return a(c,"columns",0),l.filter((function(t){return!!t})).forEach((function(t){c.appendChild(t)})),c},n.recreateColumns=function(e){t.requestAnimationFrame((function(){n.addColumns(e,n.removeColumns(e));var t=new CustomEvent("columnsChange");e.dispatchEvent(t)}))},n.mediaQueryChange=function(t){t.matches&&Array.prototype.forEach.call(o,n.recreateColumns)},n.getCSSRules=function(t){var e;try{e=t.sheet.cssRules||t.sheet.rules}catch(t){return[]}return e||[]},n.getStylesheets=function(){var t=Array.prototype.slice.call(e.querySelectorAll("style"));return t.forEach((function(e,n){"text/css"!==e.type&&""!==e.type&&t.splice(n,1)})),Array.prototype.concat.call(t,Array.prototype.slice.call(e.querySelectorAll("link[rel='stylesheet']")))},n.mediaRuleHasColumnsSelector=function(t){var e,n;try{e=t.length}catch(t){e=0}for(;e--;)if((n=t[e]).selectorText&&n.selectorText.match(/\[data-columns\](.*)::?before$/))return!0;return!1},n.scanMediaQueries=function(){var e=[];if(t.matchMedia){n.getStylesheets().forEach((function(t){Array.prototype.forEach.call(n.getCSSRules(t),(function(t){try{t.media&&t.cssRules&&n.mediaRuleHasColumnsSelector(t.cssRules)&&e.push(t)}catch(t){}}))}));var o=r.filter((function(t){return-1===e.indexOf(t)}));i.filter((function(t){return-1!==o.indexOf(t.rule)})).forEach((function(t){t.mql.removeListener(n.mediaQueryChange)})),i=i.filter((function(t){return-1===o.indexOf(t.rule)})),e.filter((function(t){return-1==r.indexOf(t)})).forEach((function(e){var o=t.matchMedia(e.media.mediaText);o.addListener(n.mediaQueryChange),i.push({rule:e,mql:o})})),r.length=0,r=e}},n.rescanMediaQueries=function(){n.scanMediaQueries(),Array.prototype.forEach.call(o,n.recreateColumns)},n.nextElementColumnIndex=function(t,e){var n,o,r=t.children,i=r.length,a=0,s=0;for(o=0;o<i;o++)n=r[o].children.length+(e[o].children||e[o].childNodes).length,0===a&&(a=n),n<a&&(s=o,a=n);return s},n.createFragmentsList=function(t){for(var n=new Array(t),o=0;o!==t;)n[o]=e.createDocumentFragment(),o++;return n},n.appendElements=function(t,e){var o=t.children,r=o.length,i=n.createFragmentsList(r);Array.prototype.forEach.call(e,(function(e){var o=n.nextElementColumnIndex(t,i);i[o].appendChild(e)})),Array.prototype.forEach.call(o,(function(t,e){t.appendChild(i[e])}))},n.prependElements=function(t,o){var r=t.children,i=r.length,a=n.createFragmentsList(i),s=i-1;o.forEach((function(t){var e=a[s];e.insertBefore(t,e.firstChild),0===s?s=i-1:s--})),Array.prototype.forEach.call(r,(function(t,e){t.insertBefore(a[e],t.firstChild)}));for(var l=e.createDocumentFragment(),c=o.length%i;0!=c--;)l.appendChild(t.lastChild);t.insertBefore(l,t.firstChild)},n.registerGrid=function(r){if("none"!==t.getComputedStyle(r).display){var i=e.createRange();i.selectNodeContents(r);var s=e.createElement("div");s.appendChild(i.extractContents()),a(s,"columns",0),n.addColumns(r,s),o.push(r)}},n.init=function(){var t=e.createElement("style");t.innerHTML="[data-columns]::before{display:block;visibility:hidden;position:absolute;font-size:1px;}",e.head.appendChild(t);var o=e.querySelectorAll("[data-columns]");Array.prototype.forEach.call(o,n.registerGrid),n.scanMediaQueries()},n.init(),{appendElements:n.appendElements,prependElements:n.prependElements,registerGrid:n.registerGrid,recreateColumns:n.recreateColumns,rescanMediaQueries:n.rescanMediaQueries,init:n.init,append_elements:n.appendElements,prepend_elements:n.prependElements,register_grid:n.registerGrid,recreate_columns:n.recreateColumns,rescan_media_queries:n.rescanMediaQueries}}(window,window.document);return t}());const c="animationend",u={animation:function(t,e,n,o){e.on(c+"."+t,(function(){s(this).off(c+"."+t).removeClass((function(t,e){return(e.match(/animate-\S+/g)||[]).join(" ")})),"function"==typeof o&&o()})),e.addClass("animate-"+t),"function"==typeof n&&n()},fadeIn:function(t,e,n){this.animation("fade-in",t,(function(){t.removeClass("hidden"),"function"==typeof e&&e()}),n)},fadeOut:function(t,e,n){this.animation("fade-out",t,e,(function(){t.addClass("hidden"),"function"==typeof n&&n()}))},slideFromTop:function(t,e,n){this.animation("slide-from-top",t,(function(){t.removeClass("hidden"),"function"==typeof e&&e()}),n)},slideFromRight:function(t,e,n){this.animation("slide-from-right",t,(function(){t.removeClass("hidden"),"function"==typeof e&&e()}),n)},hideSlideToBottom:function(t,e,n){this.animation("hide-slide-to-bottom",t,e,(function(){t.addClass("hidden"),"function"==typeof n&&n()}))},showSlideFromBottom:function(t,e,n){this.animation("show-slide-from-bottom",t,(function(){t.removeClass("hidden"),"function"==typeof e&&e()}),n)},compressHeight:function(t,e,n){this.animation("compress-height-50",t,e,(function(){t.addClass("hidden"),"function"==typeof n&&n()}))}},d={listeners:{},element:void 0,init:function(){const t=this;this.get().on("click",(function(e){"overlay"===e.target.id&&t.hide(),t.triggerEvent(e)}))},get:function(){return this.element||(this.element=s("#overlay").eq(0)),this.element},show:function(){u.fadeIn(this.get())},hide:function(){u.fadeOut(this.get())},addContent:function(t,e){0===this.get().find("#overlay-content-"+t).length?this.get().html('<div id="overlay-content-'+t+'">'+e+"</div>"):this.get().find("#overlay-content-"+t).html(e)},addListener:function(t,e){this.listeners[t]=e},triggerEvent:function(t){for(const e in this.listeners)"function"==typeof this.listeners[e]&&this.listeners[e](t)}},f=function(){s(".ripple, .button, .button-raised, .button-inverse").off("mousedown.tinymaterialripple").not("[disabled]").on("mousedown.tinymaterialripple",(function(t){const e=this;let n=t.pageX-s(t.target).offset().left,o=t.pageY-s(t.target).offset().top;const r=function(t){t!==e&&t&&(n+=t.offsetLeft,o+=t.offsetTop,r(t.offsetParent))};r(t.target);const i=s(e),a=s("<div/>");a.addClass("ripple-effect"),a.css({top:o-10+"px",left:n-10+"px",background:i.data("ripple-color")}).appendTo(i),window.setTimeout((function(){a.remove()}),2e3)}))},h=function(t){return s("<div/>").text(t).html()},p=function(t){return"object"!=typeof t?0:Object.keys(t).length},g=function(t,e,n,o,r){let i='<div class="container"><div id="modal-container" class="col-md-6 col-md-offset-3"><div class="modal animate-slide-from-top"><div class="modal-title">'+(t=(r=r||{}).noHtmlEscape?t:h(t))+"</div>",a="",l="";switch(e&&(a+="<p>"+(e=r.noHtmlEscape?e:h(e))+"</p>"),n){case"alert":l+='<button class="button ripple pull-right modal-ok">'+(r&&r.buttonLabelOk?r.buttonLabelOk:"OK")+"</button>";break;case"confirm":l+='<button class="button ripple '+(r&&r.buttonClassesOk?r.buttonClassesOk:"button-alert")+' pull-right modal-ok">'+(r&&r.buttonLabelOk?r.buttonLabelOk:"OK")+'</button><button class="button ripple pull-right modal-cancel">Cancel</button>';break;case"prompt":a+='<input type="text" class="input-new-tag" placeholder="Enter a new value..." value="'+r.value+'"/>',l+='<button class="button ripple '+(r&&r.buttonClassesOk?r.buttonClassesOk:"button-primary")+' pull-right modal-ok">'+(r&&r.buttonLabelOk?r.buttonLabelOk:"OK")+'</button><button class="button ripple pull-right modal-cancel">Cancel</button>';break;default:return void console.log("Modal type must be alert, confirm or prompt. "+n+" isn't recognized.")}i+='<div class="modal-body">'+a+"</div>",i+='<div class="modal-footer clearfix">'+l+"</div></div>",d.addContent("modal",i),d.show(),"prompt"===n&&s(".input-new-tag").focus(),d.addListener("modal",(function(t){const e=s(t.target);if(e.hasClass("modal-ok")){if("function"==typeof o){const t=s("#modal-container input.input-new-tag").val();o(!0,t)}d.hide()}else(e.hasClass("modal-cancel")||e.hasClass("container")||"modal-container"===e.attr("id")||"overlay-modal"===e.attr("id"))&&("function"==typeof o&&o(!1),d.hide())})),f()},m=function(t){if("object"!=typeof t)return void console.error("displayActionBar expects an object as options.");const e=function(){function t(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return t()+t()+"-"+t()+"-"+t()+"-"+t()+"-"+t()+t()+t()}();let n='<div id="'+e+'" class="hidden actionbar '+t.classes+'"><div class="container"><div class="row"><div class="actionbar-label">'+t.label+'</div><div class="actionbar-selectall">- <a href="#" class="actionbar-selectall-link">select all</a></div><div class="actionbar-controls">';n+='<button type="button" class="button button-default" id="actionbar-cancel">Cancel</button>';for(const e in t.controls){const o=t.controls[e];n+='<button type="button" class="'+o.classes+'" id="'+o.id+'">'+o.label+"</button>"}n+="</div></div></div></div>",s("body").append(n);const o=s("#"+e).eq(0);"function"==typeof t.onCancel&&s("#actionbar-cancel").on("click",(function(){t.onCancel()}));for(const e in t.controls){const n=t.controls[e];s("#"+n.id).on("click",n.callback)}return u.showSlideFromBottom(o),o},v={selectedLinks:{}};let y=!1;const b=s(".batch-trigger");let w=null;const x={init:function(){b.on("click",(()=>{this.toggle()}))},toggle:function(){const t=this;if(y)y=!1,b.removeClass("filter-on"),s(".link-outer").off("click.batch"),s(".links-list").removeClass("is-selectable"),u.hideSlideToBottom(s(".actionbar"),null,(function(){s(".actionbar").remove()})),u.showSlideFromBottom(s(".button-floating"));else{y=!0,b.addClass("filter-on");const e="batchInformationViewed";localStorage&&!localStorage.getItem(e)&&g("Multiple link selection","You now enter batch link selection mode. You can select several links by clicking on them and select an action in the bottom bar.","alert",(function(t){t&&localStorage.setItem(e,!0)}),{buttonLabelOk:"Understood!"}),s(".links-list").addClass("is-selectable"),s(".link-outer").on("click.batch",(function(e){e.preventDefault(),e.stopPropagation();const n=s(this),o=n.attr("id");n.hasClass("is-selected")?(n.removeClass("is-selected"),delete v.selectedLinks[o],t.refreshLabel()):(n.addClass("is-selected"),v.selectedLinks[o]={id:o,title:h(n.find(".link-title").text())},t.refreshLabel())})),u.hideSlideToBottom(s(".button-floating")),w=m({label:"",classes:"actionbar-delete-links",displayCancel:!0,onCancel:()=>{this.toggle()},controls:[{id:"delete-links-button",label:"Delete",classes:"button button-alert",callback:function(t){let e="",n='<ul class="is-bordered">';const o=[],r=p(v.selectedLinks);for(const t in v.selectedLinks)o.push(t),n+="<li>#<strong>"+t+"</strong>"+v.selectedLinks[t].title+"</li>";n+="</ul>",e=o.join("+");const i=shaarli.basePath+"/admin/shaare/delete?id="+e+"&token="+encodeURIComponent(s("#token").val());g("Are you sure to delete "+r+" links?","The following links will be <strong>IRRETRIEVABLY</strong> deleted: "+n,"confirm",(function(t){t&&(window.location.href=i)}),{noHtmlEscape:!0,buttonLabelOk:"Delete "+r+" links"})}},{id:"set-links-public-button",label:"Set public",classes:"button button-primary",callback:function(t){let e="",n='<ul class="is-bordered">';const o=[],r=p(v.selectedLinks);for(const t in v.selectedLinks)o.push(t),n+="<li>#<strong>"+t+"</strong>"+v.selectedLinks[t].title+"</li>";n+="</ul>",e=o.join("+");const i=shaarli.basePath+"/admin/shaare/visibility?token="+encodeURIComponent(s("#token").val())+"&newVisibility=public&id="+e;g("Are you sure to set those "+r+" links public?","The following links will be set as <strong>public</strong>: "+n,"confirm",(function(t){t&&(window.location.href=i)}),{noHtmlEscape:!0,buttonLabelOk:"Set "+r+" links public",buttonClassesOk:"button-primary"})}},{id:"set-links-private-button",label:"Set private",classes:"button button-primary",callback:function(t){let e="",n='<ul class="is-bordered">';const o=[],r=p(v.selectedLinks);for(const t in v.selectedLinks)o.push(t),n+="<li>#<strong>"+t+"</strong>"+v.selectedLinks[t].title+"</li>";n+="</ul>",e=o.join("+");const i=shaarli.basePath+"/admin/shaare/visibility?token="+encodeURIComponent(s("#token").val())+"&newVisibility=private&id="+e;g("Are you sure to set those "+r+" links private?","The following links will be set as <strong>private</strong>: "+n,"confirm",(function(t){t&&(window.location.href=i)}),{noHtmlEscape:!0,buttonLabelOk:"Set "+r+" links private",buttonClassesOk:"button-primary"})}}]}),t.refreshLabel()}},toggleLink:function(t,e,n){const o=this,r=t.attr("id"),i=function(){t.addClass("is-selected"),v.selectedLinks[r]={id:r,title:h(t.find(".link-title").text())},o.refreshLabel()},a=function(){t.removeClass("is-selected"),delete v.selectedLinks[r],o.refreshLabel()};e?i():n||t.hasClass("is-selected")?a():i()},refreshLabel:function(){const t=p(v.selectedLinks);w.find(".actionbar-label").text(t+" links selected"),0===t?w.find("button:not(#actionbar-cancel)").attr("disabled","disabled"):w.find("button:not(#actionbar-cancel)").removeAttr("disabled")}},E=async function(t){const e=[];Object.keys(t).forEach((n=>{e.push([encodeURIComponent(n),encodeURIComponent(t[n])].join("="))}));return await s.ajax({url:`${shaarli.basePath}/admin/shaare`,method:"post",data:e.join("&")})},C=async function(t){return await s.ajax({url:`${t}&source=batch`,method:"get"})},T=async function(t){return await s.ajax({method:"patch",url:`${shaarli.basePath}/admin/shaare/${t}/update-thumbnail`})},A=function(t){s.ajax({url:shaarli.basePath+"/admin/token",method:"get",success:function(e){s("#token").val(e),"function"==typeof t&&t(e)},error:function(t){console.error("Failed to refresh token.",t)}})},k=async function(t){const e={},n=t.find('[name="lf_id"]').length>0;t.find('input[type="text"], textarea, input[type="checkbox"], input[type="hidden"]').each((function(t,n){const o=s(n);"checkbox"!==o.attr("type")?e[o.attr("name")]=o.val():o.prop("checked")&&(e[o.attr("name")]="on")}));try{D(t),await E(e),N(t,n?"updated":"created","success")}catch(e){console.error(e),L(t),g("Error","Something went wrong when saving the link.","alert")}},S=function(){0===s('form[name="linkform"]').length&&s('[name="save_edit_batch"]').attr("disabled","disabled")},D=function(t){t.append('<div class="card-overlay"></div>');const e=t.height();t.css("max-height",`${e}px`)},N=function(t,e,n){const o=t.find('[name="lf_url"]').val(),r=n?`is-${n}`:"";t.find(".card-overlay").html(`<div class="is-flex"><div class="nowrap">${o}</div><div class="tag is-light ${r}">${e}</div></div>`),t.closest(".editlinkform").addClass("is-batch-done"),t.removeAttr("name")},L=function(t){t.find(".card-overlay").remove(),t.css("max-height","none")},M=function(){"addlink"===shaarli.pageName&&s(".button-batch-addform").on("click",(function(){s(".batch-addform").removeClass("hidden"),s(this).remove()})),"editlinkbatch"===shaarli.pageName&&(s('[name="save_edit"]').on("click",(async function(t){return t.preventDefault(),await k(s(this).closest("form")),S(),!1})),s('[name="save_edit_batch"]').on("click",(async function(t){return t.preventDefault(),await async function(){const t=document.querySelectorAll('form[name="linkform"]'),e=t.length,n=s("#progress-overlay"),o=n.find(".progress-current"),r=n.find(".progress-total"),i=n.find(".progress-actual");r.text(e),n.removeClass("hidden");for(let n=0;n<e;n++)await k(s(t[n])),o.text(n+1),i.css("width",100*(n+1)/e+"%");n.addClass("hidden")}(),S(),!1})),s('[name="delete_link"]').off("click").on("click",(async function(t){return t.preventDefault(),await async function(t){const e=t.attr("href"),n=t.closest("form");g("Delete link","Are you sure you want to delete this link?","confirm",(async function(t){if(t)try{D(n),await C(e),N(n,"deleted","danger")}catch(t){console.error(t),L(n),g("Error","Something went wrong when deleting the link.","alert")}}))}(s(this)),S(),!1})),s('[name="cancel-batch-link"]').on("click",(async function(t){return t.preventDefault(),await async function(t){const e=t.closest("form");D(e),await new Promise((t=>setTimeout(t,100))),N(e,"cancelled")}(s(this)),S(),!1})))};var _=new Map;function I(t){var e=_.get(t);e&&e.destroy()}function O(t){var e=_.get(t);e&&e.update()}var P=null;"undefined"==typeof window?((P=function(t){return t}).destroy=function(t){return t},P.update=function(t){return t}):((P=function(t,e){return t&&Array.prototype.forEach.call(t.length?t:[t],(function(t){return function(t){if(t&&t.nodeName&&"TEXTAREA"===t.nodeName&&!_.has(t)){var e,n=null,o=window.getComputedStyle(t),r=(e=t.value,function(){a({testForHeightReduction:""===e||!t.value.startsWith(e),restoreTextAlign:null}),e=t.value}),i=function(e){t.removeEventListener("autosize:destroy",i),t.removeEventListener("autosize:update",s),t.removeEventListener("input",r),window.removeEventListener("resize",s),Object.keys(e).forEach((function(n){return t.style[n]=e[n]})),_.delete(t)}.bind(t,{height:t.style.height,resize:t.style.resize,textAlign:t.style.textAlign,overflowY:t.style.overflowY,overflowX:t.style.overflowX,wordWrap:t.style.wordWrap});t.addEventListener("autosize:destroy",i),t.addEventListener("autosize:update",s),t.addEventListener("input",r),window.addEventListener("resize",s),t.style.overflowX="hidden",t.style.wordWrap="break-word",_.set(t,{destroy:i,update:s}),s()}function a(e){var r,i,s=e.restoreTextAlign,l=void 0===s?null:s,c=e.testForHeightReduction,u=void 0===c||c,d=o.overflowY;if(0!==t.scrollHeight&&("vertical"===o.resize?t.style.resize="none":"both"===o.resize&&(t.style.resize="horizontal"),u&&(r=function(t){for(var e=[];t&&t.parentNode&&t.parentNode instanceof Element;)t.parentNode.scrollTop&&e.push([t.parentNode,t.parentNode.scrollTop]),t=t.parentNode;return function(){return e.forEach((function(t){var e=t[0],n=t[1];e.style.scrollBehavior="auto",e.scrollTop=n,e.style.scrollBehavior=null}))}}(t),t.style.height=""),i="content-box"===o.boxSizing?t.scrollHeight-(parseFloat(o.paddingTop)+parseFloat(o.paddingBottom)):t.scrollHeight+parseFloat(o.borderTopWidth)+parseFloat(o.borderBottomWidth),"none"!==o.maxHeight&&i>parseFloat(o.maxHeight)?("hidden"===o.overflowY&&(t.style.overflow="scroll"),i=parseFloat(o.maxHeight)):"hidden"!==o.overflowY&&(t.style.overflow="hidden"),t.style.height=i+"px",l&&(t.style.textAlign=l),r&&r(),n!==i&&(t.dispatchEvent(new Event("autosize:resized",{bubbles:!0})),n=i),d!==o.overflow&&!l)){var f=o.textAlign;"hidden"===o.overflow&&(t.style.textAlign="start"===f?"end":"start"),a({restoreTextAlign:f,testForHeightReduction:!0})}}function s(){a({testForHeightReduction:!0,restoreTextAlign:null})}}(t)})),t}).destroy=function(t){return t&&Array.prototype.forEach.call(t.length?t:[t],I),t},P.update=function(t){return t&&Array.prototype.forEach.call(t.length?t:[t],O),t});var R=P;const j={init:function(){const t=this;s(".button-expand").on("click",(function(e){t.toggleExpand(s(this))})).each((function(){parseInt(localStorage.getItem("expand"))&&t.toggleExpand(s(this))})),R(s("#lf_description")),async function(){"editlink"!==shaarli.pageName&&"editlinkbatch"!==shaarli.pageName||!shaarli.asyncMetadata||s(".editlinkform").each((async function(t,e){const n=s(e),o=n.find(".loading-wrapper"),r=n.find('input[name="lf_title"]'),i=n.find('textarea[name="lf_description"]'),a=n.find('input[name="lf_tags"]'),l=n.find('input[name="lf_url"]').val();if(!(r.length>0&&r.val().length>0)){o.addClass("is-loading");try{const t=await s.ajax({url:shaarli.basePath+"/admin/metadata?url="+encodeURIComponent(l),method:"get"});t.title&&r&&r.length>0&&0===r.val().length&&r.val(t.title),t.description&&i&&i.length>0&&0===i.val().length&&i.val(t.description),t.tags&&a&&a.length>0&&0===a.val().length&&a.val(t.tags)}catch(t){console.error("Failed to get link metadata."),g("Error","An error occurred while getting metadata for "+h(l),"alert")}o.removeClass("is-loading")}}))}(),s("[name=delete_link]").on("click",(function(t){t.preventDefault();const e=s(this).attr("href");return g("Delete link","Are you sure you want to delete this link?","confirm",(function(t){t&&(window.location.href=e)})),!1}))},toggleExpand:function(t){const e=t.closest(".card"),n=e.toggleClass("is-expanded").hasClass("is-expanded")?1:0;e.closest(".editlinkform-row").toggleClass("row").find(".editlinkform-col").toggleClass("col-md-6 col-md-offset-3"),localStorage.setItem("expand",n)}},B=function(){s(".button-delete").on("click",(function(t){t.preventDefault();const e=s(this).attr("href");return g("Delete link","Are you sure you want to delete this link?","confirm",(function(t){t&&(window.location.href=e)})),!1})),shaarli.asyncMetadata&&s("div[data-async-thumbnail]").each((async function(t,e){const n=s(e),o=n.closest("[data-id]").data("id"),r=await T(o);if(!1!==r.thumbnail){const t=n.find("img");t.attr("src",r.thumbnail),t.data("src",r.thumbnail),n.removeClass("hidden")}}))},H=function(){const t=function(){const t=s("#search-overlay");u.fadeIn(t),t.find("#searchform_value").focus().select(),u.slideFromTop(t.find(".content-fullscreen"))};s("#button-search").on("click",t),s("#search-overlay").on("click",(function(t){0===s(t.target).parents("#form-search").length&&"form"!==t.target.nodeName.toLowerCase()&&u.fadeOut(s(this))})),s(document).on("keyup",(function(e){const n=e.which||e.keyCode;if(27===n){const t=s("#search-overlay");u.fadeOut(t)}else 83===n&&"INPUT"!==e.target.nodeName&&"TEXTAREA"!==e.target.nodeName&&"SELECT"!==e.target.nodeName&&t()})),s("#button-filter").on("click",(function(){const t=s("#searchform_value").val().trim();return s("#tagfilter_value").val(t),s("#hidden-tag-form").trigger("submit"),!1}))},F={init:function(){const t=this;s("html").on("click",(function(e){s.inArray("popup-trigger",e.target.classList)>-1||s(e.target).parents(".popup-trigger").length>=1||s.inArray("popup",e.target.classList)>-1||s(e.target).parents(".popup").length>=1||t.hideAll(),s.inArray("actionbar-selectall-link",e.target.classList)>-1&&(e.preventDefault(),s(".link-outer").each((function(){x.toggleLink(s(this),!0)})))})),s(".popup-trigger").on("click",(function(){t.hideAll();const e=s("#"+s(this).data("popup"));e.is(":visible")?u.fadeOut(e):u.slideFromTop(e)})),s(".popup-close").on("click",(function(){t.hideAll()})),s(".filters-links-per-page a").on("click",(function(e){t.hideAll()})),s(".popup-filter .switch label").on("click",(function(){const t=s(this).data("url");window.location.href=t}))},hideAll:function(){s(".popup:visible").each((function(){u.fadeOut(s(this))}))}},q=function(){if(0===s(".page-thumbnails").length)return;const t=s(".thumbnail-placeholder"),e=s(".thumbnail-link-title"),n=s(".progress-current"),o=s(".progress-actual");let r=0;const i=s('[name="ids"]').val().split(","),a=i.length,l=function(c){console.log("Updating thunmbnail #"+r+" with id "+c),s.ajax({url:shaarli.basePath+"/admin/shaare/"+i[r]+"/update-thumbnail",method:"patch",dataType:"json",success:function(s){r++,e.text(s.title),s.thumbnail?t.html('<img title="Current thumbnail" src="'+s.thumbnail+'"/>'):t.empty(),n.text(r),o.css("width",100*r/i.length+"%"),r<a?l(i[r]):e.text("Thumbnail update done!")},error:function(t){console.error("Failed to update thumbnail."),g("Error","An error occurred while downloading thumbnails. Return code: "+t.status,"alert")}})};l(i[r])},z=function(){s("#button-delete").on("click",(function(t){t.preventDefault();const e=s("#fromtag").val(),n=s(this).closest("form");return g('Delete the tag "'+e+'"','Are you sure you want to delete the tag "'+e+'" from all links?',"confirm",(function(t){t&&(n.append('<input type="hidden" name="deletetag">'),n.submit())})),!1})),s(".delete-tag").on("click",(function(t){t.preventDefault();const e=s(this),n=e.data("tag"),o=s("#token").val();g('Delete the tag "'+n+'"','Are you sure you want to delete the tag "'+n+'" from all links ?',"confirm",(function(t){t&&s.ajax({url:shaarli.basePath+"/admin/tags",method:"post",contentType:"application/x-www-form-urlencoded",data:{deletetag:1,fromtag:n,token:o},success:function(){const t=e.closest(".list-item-flex");u.compressHeight(t,null,(function(){t.remove()}))},error:function(){g("Error","Oops! something went wrong...","alert")},complete:function(){A()}})}))})),s(".rename-tag").on("click",(function(t){t.preventDefault();const e=s(this),n=e.closest(".list-item-flex"),o=e.data("tag"),r=s("#token").val(),i=s("<span/>").addClass("text-feedback").text("renaming...");g("Rename tag "+o,"Please write the new name of this tag below.","prompt",(function(t,e){t&&(n.find(".list-item-middle").append(i),s.ajax({url:shaarli.basePath+"/admin/tags",method:"post",contentType:"application/x-www-form-urlencoded",data:{fromtag:o,totag:e,token:r,renametag:"Rename tag"},success:function(){n.find(".tag-link").attr("href",shaarli.basePath+"/?searchtags="+encodeURIComponent(e)).text(e),n.find("[data-tag]").data("tag",e),n.find(".count").attr("href",shaarli.basePath+"/add-tag/"+encodeURIComponent(e)),n.find(".rename-tag").attr("href",shaarli.basePath+"/admin/tags?fromtag="+encodeURIComponent(e)),i.addClass("text-success").text("renamed successfully!")},error:function(){i.addClass("text-error").text("something went wrong")},complete:function(){A(),setTimeout((function(){i.remove()}),5e3)}}))}),{buttonLabelOk:"Rename",value:o})}))},W=function(){s(".notification-close").on("click",(function(){const t=s(this).closest(".notification");t.addClass("animate-fade-out"),setTimeout((function(){t.remove()}),250)}))};var U,Y={exports:{}};
|
||
/*!
|
||
hey, [be]Lazy.js - v1.8.2 - 2016.10.25
|
||
A fast, small and dependency free lazy load script (https://github.com/dinbror/blazy)
|
||
(c) Bjoern Klinggaard - @bklinggaard - http://dinbror.dk/blazy
|
||
*/var $,X=(U||(U=1,Y.exports=function(){var t,e,n,o,r="src",i="srcset";return function(r){if(!document.querySelectorAll){var i=document.createStyleSheet();document.querySelectorAll=function(t,e,n,o,r){for(r=document.all,e=[],n=(t=t.replace(/\[for\b/gi,"[htmlFor").split(",")).length;n--;){for(i.addRule(t[n],"k:v"),o=r.length;o--;)r[o].currentStyle.k&&e.push(r[o]);i.removeRule(0)}return e}}var l=this,c=l._util={};c.elements=[],c.destroyed=!0,l.options=r||{},l.options.error=l.options.error||!1,l.options.offset=l.options.offset||100,l.options.root=l.options.root||document,l.options.success=l.options.success||!1,l.options.selector=l.options.selector||".b-lazy",l.options.separator=l.options.separator||"|",l.options.containerClass=l.options.container,l.options.container=!!l.options.containerClass&&document.querySelectorAll(l.options.containerClass),l.options.errorClass=l.options.errorClass||"b-error",l.options.breakpoints=l.options.breakpoints||!1,l.options.loadInvisible=l.options.loadInvisible||!1,l.options.successClass=l.options.successClass||"b-loaded",l.options.validateDelay=l.options.validateDelay||25,l.options.saveViewportOffsetDelay=l.options.saveViewportOffsetDelay||50,l.options.srcset=l.options.srcset||"data-srcset",l.options.src=t=l.options.src||"data-src",o=Element.prototype.closest,n=window.devicePixelRatio>1,(e={}).top=0-l.options.offset,e.left=0-l.options.offset,l.revalidate=function(){a(l)},l.load=function(t,e){var n=this.options;t&&void 0===t.length?u(t,e,n):T(t,(function(t){u(t,e,n)}))},l.destroy=function(){var t=l._util;l.options.container&&T(l.options.container,(function(e){C(e,"scroll",t.validateT)})),C(window,"scroll",t.validateT),C(window,"resize",t.validateT),C(window,"resize",t.saveViewportOffsetT),t.count=0,t.elements.length=0,t.destroyed=!0},c.validateT=A((function(){s(l)}),l.options.validateDelay,l),c.saveViewportOffsetT=A((function(){x(l.options.offset)}),l.options.saveViewportOffsetDelay,l),x(l.options.offset),T(l.options.breakpoints,(function(e){if(e.width>=window.screen.width)return t=e.src,!1})),setTimeout((function(){a(l)}))};function a(t){var e=t._util;e.elements=w(t.options),e.count=e.elements.length,e.destroyed&&(e.destroyed=!1,t.options.container&&T(t.options.container,(function(t){E(t,"scroll",e.validateT)})),E(window,"resize",e.saveViewportOffsetT),E(window,"resize",e.validateT),E(window,"scroll",e.validateT)),s(t)}function s(t){for(var e=t._util,n=0;n<e.count;n++){var o=e.elements[n];(l(o,t.options)||y(o,t.options.successClass))&&(t.load(o),e.elements.splice(n,1),e.count--,n--)}0===e.count&&t.destroy()}function l(t,n){var r=t.getBoundingClientRect();if(n.container&&o){var i=t.closest(n.containerClass);if(i){var a=i.getBoundingClientRect();if(c(a,e)){var s=a.top-n.offset,l=a.right+n.offset,u=a.bottom+n.offset,d=a.left-n.offset;return c(r,{top:s>e.top?s:e.top,right:l<e.right?l:e.right,bottom:u<e.bottom?u:e.bottom,left:d>e.left?d:e.left})}return!1}}return c(r,e)}function c(t,e){return t.right>=e.left&&t.bottom>=e.top&&t.left<=e.right&&t.top<=e.bottom}function u(e,o,a){if(!y(e,a.successClass)&&(o||a.loadInvisible||e.offsetWidth>0&&e.offsetHeight>0)){var s=g(e,t)||g(e,a.src);if(s){var l=s.split(a.separator),c=l[n&&l.length>1?1:0],u=g(e,a.srcset),p=v(e,"img"),m=e.parentNode,w=m&&v(m,"picture");if(p||void 0===e.src){var x=new Image,A=function(){a.error&&a.error(e,"invalid"),b(e,a.errorClass),C(x,"error",A),C(x,"load",k)},k=function(){p?w||h(e,c,u):e.style.backgroundImage='url("'+c+'")',d(e,a),C(x,"load",k),C(x,"error",A)};w&&(x=e,T(m.getElementsByTagName("source"),(function(t){f(t,i,a.srcset)}))),E(x,"error",A),E(x,"load",k),h(x,c,u)}else e.src=c,d(e,a)}else v(e,"video")?(T(e.getElementsByTagName("source"),(function(t){f(t,r,a.src)})),e.load(),d(e,a)):(a.error&&a.error(e,"missing"),b(e,a.errorClass))}}function d(t,e){b(t,e.successClass),e.success&&e.success(t),m(t,e.src),m(t,e.srcset),T(e.breakpoints,(function(e){m(t,e.src)}))}function f(t,e,n){var o=g(t,n);o&&(p(t,e,o),m(t,n))}function h(t,e,n){n&&p(t,i,n),t.src=e}function p(t,e,n){t.setAttribute(e,n)}function g(t,e){return t.getAttribute(e)}function m(t,e){t.removeAttribute(e)}function v(t,e){return t.nodeName.toLowerCase()===e}function y(t,e){return-1!==(" "+t.className+" ").indexOf(" "+e+" ")}function b(t,e){y(t,e)||(t.className+=" "+e)}function w(t){for(var e=[],n=t.root.querySelectorAll(t.selector),o=n.length;o--;e.unshift(n[o]));return e}function x(t){e.bottom=(window.innerHeight||document.documentElement.clientHeight)+t,e.right=(window.innerWidth||document.documentElement.clientWidth)+t}function E(t,e,n){t.attachEvent?t.attachEvent&&t.attachEvent("on"+e,n):t.addEventListener(e,n,{capture:!1,passive:!0})}function C(t,e,n){t.detachEvent?t.detachEvent&&t.detachEvent("on"+e,n):t.removeEventListener(e,n,{capture:!1,passive:!0})}function T(t,e){if(t&&e)for(var n=t.length,o=0;o<n&&!1!==e(t[o],o);o++);}function A(t,e,n){var o=0;return function(){var r=+new Date;r-o<e||(o=r,t.apply(n,arguments))}}}()),Y.exports),V=t(X),K={exports:{}};var Q,J=($||($=1,Q=K,function(){var t=function(e,n){var r=this;t.count=(t.count||0)+1,this.count=t.count,this.isOpened=!1,this.input=o(e),this.input.setAttribute("autocomplete","off"),this.input.setAttribute("aria-autocomplete","list"),this.input.setAttribute("aria-expanded","false"),this.input.setAttribute("aria-controls","awesomplete_list_"+this.count),this.input.setAttribute("aria-owns","awesomplete_list_"+this.count),this.input.setAttribute("role","combobox"),this.options=n=n||{},function(t,e,n){for(var o in e){var r=e[o],i=t.input.getAttribute("data-"+o.toLowerCase());t[o]="number"==typeof r?parseInt(i):!1===r?null!==i:r instanceof Function?null:i,t[o]||0===t[o]||(t[o]=o in n?n[o]:r)}}(this,{minChars:2,maxItems:10,autoFirst:!1,data:t.DATA,filter:t.FILTER_CONTAINS,sort:!1!==n.sort&&t.SORT_BYLENGTH,container:t.CONTAINER,item:t.ITEM,replace:t.REPLACE,tabSelect:!1,listLabel:"Results List",statusNoResults:"No results found",statusXResults:"{0} results found",statusTypeXChar:"Type {0} or more characters for results"},n),this.index=-1,this.container=this.container(e),this.ul=o.create("ul",{hidden:"hidden",role:"listbox",id:"awesomplete_list_"+this.count,inside:this.container,"aria-label":this.listLabel}),this.status=o.create("span",{className:"visually-hidden",role:"status","aria-live":"assertive","aria-atomic":!0,inside:this.container,textContent:""}),this._events={input:{input:this.evaluate.bind(this),blur:this.close.bind(this,{reason:"blur"}),keydown:function(t){var e=t.keyCode;r.opened&&(13===e&&r.selected||9===e&&r.selected&&r.tabSelect?(t.preventDefault(),r.select(void 0,void 0,t)):27===e?r.close({reason:"esc"}):38!==e&&40!==e||(t.preventDefault(),r[38===e?"previous":"next"]()))}},form:{submit:this.close.bind(this,{reason:"submit"})},ul:{mousedown:function(t){t.preventDefault()},click:function(t){var e=t.target;if(e!==this){for(;e&&!/li/i.test(e.nodeName);)e=e.parentNode;e&&0===t.button&&(t.preventDefault(),r.select(e,t.target,t))}}}},o.bind(this.input,this._events.input),o.bind(this.input.form,this._events.form),o.bind(this.ul,this._events.ul),this.input.hasAttribute("list")?(this.list="#"+this.input.getAttribute("list"),this.input.removeAttribute("list")):this.list=this.input.getAttribute("data-list")||n.list||[],t.all.push(this)};function e(t){var e=Array.isArray(t)?{label:t[0],value:t[1]}:"object"==typeof t&&"label"in t&&"value"in t?t:{label:t,value:t};this.label=e.label||e.value,this.value=e.value}t.prototype={set list(t){if(Array.isArray(t))this._list=t;else if("string"==typeof t&&t.indexOf(",")>-1)this._list=t.split(/\s*,\s*/);else if((t=o(t))&&t.children){var e=[];n.apply(t.children).forEach((function(t){if(!t.disabled){var n=t.textContent.trim(),o=t.value||n,r=t.label||n;""!==o&&e.push({label:r,value:o})}})),this._list=e}document.activeElement===this.input&&this.evaluate()},get selected(){return this.index>-1},get opened(){return this.isOpened},close:function(t){this.opened&&(this.input.setAttribute("aria-expanded","false"),this.ul.setAttribute("hidden",""),this.isOpened=!1,this.index=-1,this.status.setAttribute("hidden",""),this.input.setAttribute("aria-activedescendant",""),o.fire(this.input,"awesomplete-close",t||{}))},open:function(){this.input.setAttribute("aria-expanded","true"),this.ul.removeAttribute("hidden"),this.isOpened=!0,this.status.removeAttribute("hidden"),this.autoFirst&&-1===this.index&&this.goto(0),o.fire(this.input,"awesomplete-open")},destroy:function(){if(o.unbind(this.input,this._events.input),o.unbind(this.input.form,this._events.form),!this.options.container){var e=this.container.parentNode;e.insertBefore(this.input,this.container),e.removeChild(this.container)}this.input.removeAttribute("autocomplete"),this.input.removeAttribute("aria-autocomplete"),this.input.removeAttribute("aria-expanded"),this.input.removeAttribute("aria-controls"),this.input.removeAttribute("aria-owns"),this.input.removeAttribute("role");var n=t.all.indexOf(this);-1!==n&&t.all.splice(n,1)},next:function(){var t=this.ul.children.length;this.goto(this.index<t-1?this.index+1:t?0:-1)},previous:function(){var t=this.ul.children.length,e=this.index-1;this.goto(this.selected&&-1!==e?e:t-1)},goto:function(t){var e=this.ul.children;this.selected&&e[this.index].setAttribute("aria-selected","false"),this.index=t,t>-1&&e.length>0&&(e[t].setAttribute("aria-selected","true"),this.input.setAttribute("aria-activedescendant",this.ul.id+"_item_"+this.index),this.ul.scrollTop=e[t].offsetTop-this.ul.clientHeight+e[t].clientHeight,o.fire(this.input,"awesomplete-highlight",{text:this.suggestions[this.index]}))},select:function(t,e,n){if(t?this.index=o.siblingIndex(t):t=this.ul.children[this.index],t){var r=this.suggestions[this.index];o.fire(this.input,"awesomplete-select",{text:r,origin:e||t,originalEvent:n})&&(this.replace(r),this.close({reason:"select"}),o.fire(this.input,"awesomplete-selectcomplete",{text:r,originalEvent:n}))}},evaluate:function(){var t=this,n=this.input.value;n.length>=this.minChars&&this._list&&this._list.length>0?(this.index=-1,this.ul.innerHTML="",this.suggestions=this._list.map((function(o){return new e(t.data(o,n))})).filter((function(e){return t.filter(e,n)})),!1!==this.sort&&(this.suggestions=this.suggestions.sort(this.sort)),this.suggestions=this.suggestions.slice(0,this.maxItems),this.suggestions.forEach((function(e,o){t.ul.appendChild(t.item(e,n,o))})),0===this.ul.children.length?(this.status.textContent=this.statusNoResults,this.close({reason:"nomatches"})):(this.input.setAttribute("aria-activedescendant",""),this.open(),this.status.textContent=this.statusXResults.replaceAll("{0}",this.ul.children.length))):(this.close({reason:"nomatches"}),this.minChar<=1||n.length>=this.minChars?this.status.textContent=this.statusNoResults:this.status.textContent=this.statusTypeXChar.replaceAll("{0}",this.minChars))}},t.all=[],t.FILTER_CONTAINS=function(t,e){return RegExp(o.regExpEscape(e.trim()),"i").test(t)},t.FILTER_STARTSWITH=function(t,e){return RegExp("^"+o.regExpEscape(e.trim()),"i").test(t)},t.SORT_BYLENGTH=function(t,e){return t.length!==e.length?t.length-e.length:t<e?-1:1},t.CONTAINER=function(t){return o.create("div",{className:"awesomplete",around:t})},t.ITEM=function(t,e,n){var r=""===e.trim()?t:t.replace(RegExp(o.regExpEscape(e.trim()),"gi"),"<mark>$&</mark>");return o.create("li",{innerHTML:r,role:"option","aria-selected":"false",tabindex:"-1",id:"awesomplete_list_"+this.count+"_item_"+n})},t.REPLACE=function(t){this.input.value=t.value},t.DATA=function(t){return t},Object.defineProperty(e.prototype=Object.create(String.prototype),"length",{get:function(){return this.label.length}}),e.prototype.toString=e.prototype.valueOf=function(){return""+this.label};var n=Array.prototype.slice;function o(t,e){return"string"==typeof t?(e||document).querySelector(t):t||null}function r(t,e){return n.call((e||document).querySelectorAll(t))}function i(){r("input.awesomplete").forEach((function(e){new t(e)}))}o.create=function(t,e){var n=document.createElement(t);for(var r in e){var i=e[r];if("inside"===r)o(i).appendChild(n);else if("around"===r){var a=o(i);a.parentNode.insertBefore(n,a),n.appendChild(a),null!=a.getAttribute("autofocus")&&a.focus()}else r in n?n[r]=i:n.setAttribute(r,i)}return n},o.bind=function(t,e){if(t)for(var n in e){var o=e[n];n.split(/\s+/).forEach((function(e){t.addEventListener(e,o)}))}},o.unbind=function(t,e){if(t)for(var n in e){var o=e[n];n.split(/\s+/).forEach((function(e){t.removeEventListener(e,o)}))}},o.fire=function(t,e,n){var o=document.createEvent("HTMLEvents");for(var r in o.initEvent(e,!0,!0),n)o[r]=n[r];return t.dispatchEvent(o)},o.regExpEscape=function(t){return t.replace(/[-\\^$*+?.()|[\]{}]/g,"\\$&")},o.siblingIndex=function(t){for(var e=0;t=t.previousElementSibling;e++);return e},"undefined"!=typeof self&&(self.Awesomplete=t),"undefined"!=typeof Document&&("loading"!==document.readyState?i():document.addEventListener("DOMContentLoaded",i)),t.$=o,t.$$=r,Q.exports&&(Q.exports=t)}()),K.exports),G=t(J);
|
||
/**!
|
||
* Sortable 1.15.6
|
||
* @author RubaXa <trash@rubaxa.org>
|
||
* @author owenm <owen23355@gmail.com>
|
||
* @license MIT
|
||
*/
|
||
function Z(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function tt(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Z(Object(n),!0).forEach((function(e){nt(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Z(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function et(t){return et="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},et(t)}function nt(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function ot(){return ot=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},ot.apply(this,arguments)}function rt(t,e){if(null==t)return{};var n,o,r=function(t,e){if(null==t)return{};var n,o,r={},i=Object.keys(t);for(o=0;o<i.length;o++)n=i[o],e.indexOf(n)>=0||(r[n]=t[n]);return r}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(o=0;o<i.length;o++)n=i[o],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function it(t){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(t)}var at=it(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),st=it(/Edge/i),lt=it(/firefox/i),ct=it(/safari/i)&&!it(/chrome/i)&&!it(/android/i),ut=it(/iP(ad|od|hone)/i),dt=it(/chrome/i)&&it(/android/i),ft={capture:!1,passive:!1};function ht(t,e,n){t.addEventListener(e,n,!at&&ft)}function pt(t,e,n){t.removeEventListener(e,n,!at&&ft)}function gt(t,e){if(e){if(">"===e[0]&&(e=e.substring(1)),t)try{if(t.matches)return t.matches(e);if(t.msMatchesSelector)return t.msMatchesSelector(e);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(e)}catch(t){return!1}return!1}}function mt(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function vt(t,e,n,o){if(t){n=n||document;do{if(null!=e&&(">"===e[0]?t.parentNode===n&>(t,e):gt(t,e))||o&&t===n)return t;if(t===n)break}while(t=mt(t))}return null}var yt,bt=/\s+/g;function wt(t,e,n){if(t&&e)if(t.classList)t.classList[n?"add":"remove"](e);else{var o=(" "+t.className+" ").replace(bt," ").replace(" "+e+" "," ");t.className=(o+(n?" "+e:"")).replace(bt," ")}}function xt(t,e,n){var o=t&&t.style;if(o){if(void 0===n)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(n=t.currentStyle),void 0===e?n:n[e];e in o||-1!==e.indexOf("webkit")||(e="-webkit-"+e),o[e]=n+("string"==typeof n?"":"px")}}function Et(t,e){var n="";if("string"==typeof t)n=t;else do{var o=xt(t,"transform");o&&"none"!==o&&(n=o+" "+n)}while(!e&&(t=t.parentNode));var r=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return r&&new r(n)}function Ct(t,e,n){if(t){var o=t.getElementsByTagName(e),r=0,i=o.length;if(n)for(;r<i;r++)n(o[r],r);return o}return[]}function Tt(){var t=document.scrollingElement;return t||document.documentElement}function At(t,e,n,o,r){if(t.getBoundingClientRect||t===window){var i,a,s,l,c,u,d;if(t!==window&&t.parentNode&&t!==Tt()?(a=(i=t.getBoundingClientRect()).top,s=i.left,l=i.bottom,c=i.right,u=i.height,d=i.width):(a=0,s=0,l=window.innerHeight,c=window.innerWidth,u=window.innerHeight,d=window.innerWidth),(e||n)&&t!==window&&(r=r||t.parentNode,!at))do{if(r&&r.getBoundingClientRect&&("none"!==xt(r,"transform")||n&&"static"!==xt(r,"position"))){var f=r.getBoundingClientRect();a-=f.top+parseInt(xt(r,"border-top-width")),s-=f.left+parseInt(xt(r,"border-left-width")),l=a+i.height,c=s+i.width;break}}while(r=r.parentNode);if(o&&t!==window){var h=Et(r||t),p=h&&h.a,g=h&&h.d;h&&(l=(a/=g)+(u/=g),c=(s/=p)+(d/=p))}return{top:a,left:s,bottom:l,right:c,width:d,height:u}}}function kt(t,e,n){for(var o=Mt(t,!0),r=At(t)[e];o;){if(!(r>=At(o)[n]))return o;if(o===Tt())break;o=Mt(o,!1)}return!1}function St(t,e,n,o){for(var r=0,i=0,a=t.children;i<a.length;){if("none"!==a[i].style.display&&a[i]!==Pe.ghost&&(o||a[i]!==Pe.dragged)&&vt(a[i],n.draggable,t,!1)){if(r===e)return a[i];r++}i++}return null}function Dt(t,e){for(var n=t.lastElementChild;n&&(n===Pe.ghost||"none"===xt(n,"display")||e&&!gt(n,e));)n=n.previousElementSibling;return n||null}function Nt(t,e){var n=0;if(!t||!t.parentNode)return-1;for(;t=t.previousElementSibling;)"TEMPLATE"===t.nodeName.toUpperCase()||t===Pe.clone||e&&!gt(t,e)||n++;return n}function Lt(t){var e=0,n=0,o=Tt();if(t)do{var r=Et(t),i=r.a,a=r.d;e+=t.scrollLeft*i,n+=t.scrollTop*a}while(t!==o&&(t=t.parentNode));return[e,n]}function Mt(t,e){if(!t||!t.getBoundingClientRect)return Tt();var n=t,o=!1;do{if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var r=xt(n);if(n.clientWidth<n.scrollWidth&&("auto"==r.overflowX||"scroll"==r.overflowX)||n.clientHeight<n.scrollHeight&&("auto"==r.overflowY||"scroll"==r.overflowY)){if(!n.getBoundingClientRect||n===document.body)return Tt();if(o||e)return n;o=!0}}}while(n=n.parentNode);return Tt()}function _t(t,e){return Math.round(t.top)===Math.round(e.top)&&Math.round(t.left)===Math.round(e.left)&&Math.round(t.height)===Math.round(e.height)&&Math.round(t.width)===Math.round(e.width)}function It(t,e){return function(){if(!yt){var n=arguments;1===n.length?t.call(this,n[0]):t.apply(this,n),yt=setTimeout((function(){yt=void 0}),e)}}}function Ot(t,e,n){t.scrollLeft+=e,t.scrollTop+=n}function Pt(t){var e=window.Polymer,n=window.jQuery||window.Zepto;return e&&e.dom?e.dom(t).cloneNode(!0):n?n(t).clone(!0)[0]:t.cloneNode(!0)}function Rt(t,e,n){var o={};return Array.from(t.children).forEach((function(r){var i,a,s,l;if(vt(r,e.draggable,t,!1)&&!r.animated&&r!==n){var c=At(r);o.left=Math.min(null!==(i=o.left)&&void 0!==i?i:1/0,c.left),o.top=Math.min(null!==(a=o.top)&&void 0!==a?a:1/0,c.top),o.right=Math.max(null!==(s=o.right)&&void 0!==s?s:-1/0,c.right),o.bottom=Math.max(null!==(l=o.bottom)&&void 0!==l?l:-1/0,c.bottom)}})),o.width=o.right-o.left,o.height=o.bottom-o.top,o.x=o.left,o.y=o.top,o}var jt="Sortable"+(new Date).getTime();function Bt(){var t,e=[];return{captureAnimationState:function(){(e=[],this.options.animation)&&[].slice.call(this.el.children).forEach((function(t){if("none"!==xt(t,"display")&&t!==Pe.ghost){e.push({target:t,rect:At(t)});var n=tt({},e[e.length-1].rect);if(t.thisAnimationDuration){var o=Et(t,!0);o&&(n.top-=o.f,n.left-=o.e)}t.fromRect=n}}))},addAnimationState:function(t){e.push(t)},removeAnimationState:function(t){e.splice(function(t,e){for(var n in t)if(t.hasOwnProperty(n))for(var o in e)if(e.hasOwnProperty(o)&&e[o]===t[n][o])return Number(n);return-1}(e,{target:t}),1)},animateAll:function(n){var o=this;if(!this.options.animation)return clearTimeout(t),void("function"==typeof n&&n());var r=!1,i=0;e.forEach((function(t){var e=0,n=t.target,a=n.fromRect,s=At(n),l=n.prevFromRect,c=n.prevToRect,u=t.rect,d=Et(n,!0);d&&(s.top-=d.f,s.left-=d.e),n.toRect=s,n.thisAnimationDuration&&_t(l,s)&&!_t(a,s)&&(u.top-s.top)/(u.left-s.left)==(a.top-s.top)/(a.left-s.left)&&(e=function(t,e,n,o){return Math.sqrt(Math.pow(e.top-t.top,2)+Math.pow(e.left-t.left,2))/Math.sqrt(Math.pow(e.top-n.top,2)+Math.pow(e.left-n.left,2))*o.animation}(u,l,c,o.options)),_t(s,a)||(n.prevFromRect=a,n.prevToRect=s,e||(e=o.options.animation),o.animate(n,u,s,e)),e&&(r=!0,i=Math.max(i,e),clearTimeout(n.animationResetTimer),n.animationResetTimer=setTimeout((function(){n.animationTime=0,n.prevFromRect=null,n.fromRect=null,n.prevToRect=null,n.thisAnimationDuration=null}),e),n.thisAnimationDuration=e)})),clearTimeout(t),r?t=setTimeout((function(){"function"==typeof n&&n()}),i):"function"==typeof n&&n(),e=[]},animate:function(t,e,n,o){if(o){xt(t,"transition",""),xt(t,"transform","");var r=Et(this.el),i=r&&r.a,a=r&&r.d,s=(e.left-n.left)/(i||1),l=(e.top-n.top)/(a||1);t.animatingX=!!s,t.animatingY=!!l,xt(t,"transform","translate3d("+s+"px,"+l+"px,0)"),this.forRepaintDummy=function(t){return t.offsetWidth}(t),xt(t,"transition","transform "+o+"ms"+(this.options.easing?" "+this.options.easing:"")),xt(t,"transform","translate3d(0,0,0)"),"number"==typeof t.animated&&clearTimeout(t.animated),t.animated=setTimeout((function(){xt(t,"transition",""),xt(t,"transform",""),t.animated=!1,t.animatingX=!1,t.animatingY=!1}),o)}}}}var Ht=[],Ft={initializeByDefault:!0},qt={mount:function(t){for(var e in Ft)Ft.hasOwnProperty(e)&&!(e in t)&&(t[e]=Ft[e]);Ht.forEach((function(e){if(e.pluginName===t.pluginName)throw"Sortable: Cannot mount plugin ".concat(t.pluginName," more than once")})),Ht.push(t)},pluginEvent:function(t,e,n){var o=this;this.eventCanceled=!1,n.cancel=function(){o.eventCanceled=!0};var r=t+"Global";Ht.forEach((function(o){e[o.pluginName]&&(e[o.pluginName][r]&&e[o.pluginName][r](tt({sortable:e},n)),e.options[o.pluginName]&&e[o.pluginName][t]&&e[o.pluginName][t](tt({sortable:e},n)))}))},initializePlugins:function(t,e,n,o){for(var r in Ht.forEach((function(o){var r=o.pluginName;if(t.options[r]||o.initializeByDefault){var i=new o(t,e,t.options);i.sortable=t,i.options=t.options,t[r]=i,ot(n,i.defaults)}})),t.options)if(t.options.hasOwnProperty(r)){var i=this.modifyOption(t,r,t.options[r]);void 0!==i&&(t.options[r]=i)}},getEventProperties:function(t,e){var n={};return Ht.forEach((function(o){"function"==typeof o.eventProperties&&ot(n,o.eventProperties.call(e[o.pluginName],t))})),n},modifyOption:function(t,e,n){var o;return Ht.forEach((function(r){t[r.pluginName]&&r.optionListeners&&"function"==typeof r.optionListeners[e]&&(o=r.optionListeners[e].call(t[r.pluginName],n))})),o}};var zt=["evt"],Wt=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=n.evt,r=rt(n,zt);qt.pluginEvent.bind(Pe)(t,e,tt({dragEl:Yt,parentEl:$t,ghostEl:Xt,rootEl:Vt,nextEl:Kt,lastDownEl:Qt,cloneEl:Jt,cloneHidden:Gt,dragStarted:de,putSortable:re,activeSortable:Pe.active,originalEvent:o,oldIndex:Zt,oldDraggableIndex:ee,newIndex:te,newDraggableIndex:ne,hideGhostForTarget:Me,unhideGhostForTarget:_e,cloneNowHidden:function(){Gt=!0},cloneNowShown:function(){Gt=!1},dispatchSortableEvent:function(t){Ut({sortable:e,name:t,originalEvent:o})}},r))};function Ut(t){!function(t){var e=t.sortable,n=t.rootEl,o=t.name,r=t.targetEl,i=t.cloneEl,a=t.toEl,s=t.fromEl,l=t.oldIndex,c=t.newIndex,u=t.oldDraggableIndex,d=t.newDraggableIndex,f=t.originalEvent,h=t.putSortable,p=t.extraEventProperties;if(e=e||n&&n[jt]){var g,m=e.options,v="on"+o.charAt(0).toUpperCase()+o.substr(1);!window.CustomEvent||at||st?(g=document.createEvent("Event")).initEvent(o,!0,!0):g=new CustomEvent(o,{bubbles:!0,cancelable:!0}),g.to=a||n,g.from=s||n,g.item=r||n,g.clone=i,g.oldIndex=l,g.newIndex=c,g.oldDraggableIndex=u,g.newDraggableIndex=d,g.originalEvent=f,g.pullMode=h?h.lastPutMode:void 0;var y=tt(tt({},p),qt.getEventProperties(o,e));for(var b in y)g[b]=y[b];n&&n.dispatchEvent(g),m[v]&&m[v].call(e,g)}}(tt({putSortable:re,cloneEl:Jt,targetEl:Yt,rootEl:Vt,oldIndex:Zt,oldDraggableIndex:ee,newIndex:te,newDraggableIndex:ne},t))}var Yt,$t,Xt,Vt,Kt,Qt,Jt,Gt,Zt,te,ee,ne,oe,re,ie,ae,se,le,ce,ue,de,fe,he,pe,ge,me=!1,ve=!1,ye=[],be=!1,we=!1,xe=[],Ee=!1,Ce=[],Te="undefined"!=typeof document,Ae=ut,ke=st||at?"cssFloat":"float",Se=Te&&!dt&&!ut&&"draggable"in document.createElement("div"),De=function(){if(Te){if(at)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto","auto"===t.style.pointerEvents}}(),Ne=function(t,e){var n=xt(t),o=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),r=St(t,0,e),i=St(t,1,e),a=r&&xt(r),s=i&&xt(i),l=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+At(r).width,c=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+At(i).width;if("flex"===n.display)return"column"===n.flexDirection||"column-reverse"===n.flexDirection?"vertical":"horizontal";if("grid"===n.display)return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(r&&a.float&&"none"!==a.float){var u="left"===a.float?"left":"right";return!i||"both"!==s.clear&&s.clear!==u?"horizontal":"vertical"}return r&&("block"===a.display||"flex"===a.display||"table"===a.display||"grid"===a.display||l>=o&&"none"===n[ke]||i&&"none"===n[ke]&&l+c>o)?"vertical":"horizontal"},Le=function(t){function e(t,n){return function(o,r,i,a){var s=o.options.group.name&&r.options.group.name&&o.options.group.name===r.options.group.name;if(null==t&&(n||s))return!0;if(null==t||!1===t)return!1;if(n&&"clone"===t)return t;if("function"==typeof t)return e(t(o,r,i,a),n)(o,r,i,a);var l=(n?o:r).options.group.name;return!0===t||"string"==typeof t&&t===l||t.join&&t.indexOf(l)>-1}}var n={},o=t.group;o&&"object"==et(o)||(o={name:o}),n.name=o.name,n.checkPull=e(o.pull,!0),n.checkPut=e(o.put),n.revertClone=o.revertClone,t.group=n},Me=function(){!De&&Xt&&xt(Xt,"display","none")},_e=function(){!De&&Xt&&xt(Xt,"display","")};Te&&!dt&&document.addEventListener("click",(function(t){if(ve)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),ve=!1,!1}),!0);var Ie=function(t){if(Yt){t=t.touches?t.touches[0]:t;var e=(r=t.clientX,i=t.clientY,ye.some((function(t){var e=t[jt].options.emptyInsertThreshold;if(e&&!Dt(t)){var n=At(t),o=r>=n.left-e&&r<=n.right+e,s=i>=n.top-e&&i<=n.bottom+e;return o&&s?a=t:void 0}})),a);if(e){var n={};for(var o in t)t.hasOwnProperty(o)&&(n[o]=t[o]);n.target=n.rootEl=e,n.preventDefault=void 0,n.stopPropagation=void 0,e[jt]._onDragOver(n)}}var r,i,a},Oe=function(t){Yt&&Yt.parentNode[jt]._isOutsideThisEl(t.target)};function Pe(t,e){if(!t||!t.nodeType||1!==t.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));this.el=t,this.options=e=ot({},e),t[jt]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(t.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Ne(t,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(t,e){t.setData("Text",e.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==Pe.supportPointer&&"PointerEvent"in window&&(!ct||ut),emptyInsertThreshold:5};for(var o in qt.initializePlugins(this,t,n),n)!(o in e)&&(e[o]=n[o]);for(var r in Le(e),this)"_"===r.charAt(0)&&"function"==typeof this[r]&&(this[r]=this[r].bind(this));this.nativeDraggable=!e.forceFallback&&Se,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?ht(t,"pointerdown",this._onTapStart):(ht(t,"mousedown",this._onTapStart),ht(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(ht(t,"dragover",this),ht(t,"dragenter",this)),ye.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),ot(this,Bt())}function Re(t,e,n,o,r,i,a,s){var l,c,u=t[jt],d=u.options.onMove;return!window.CustomEvent||at||st?(l=document.createEvent("Event")).initEvent("move",!0,!0):l=new CustomEvent("move",{bubbles:!0,cancelable:!0}),l.to=e,l.from=t,l.dragged=n,l.draggedRect=o,l.related=r||e,l.relatedRect=i||At(e),l.willInsertAfter=s,l.originalEvent=a,t.dispatchEvent(l),d&&(c=d.call(u,l,a)),c}function je(t){t.draggable=!1}function Be(){Ee=!1}function He(t){for(var e=t.tagName+t.className+t.src+t.href+t.textContent,n=e.length,o=0;n--;)o+=e.charCodeAt(n);return o.toString(36)}function Fe(t){return setTimeout(t,0)}function qe(t){return clearTimeout(t)}Pe.prototype={constructor:Pe,_isOutsideThisEl:function(t){this.el.contains(t)||t===this.el||(fe=null)},_getDirection:function(t,e){return"function"==typeof this.options.direction?this.options.direction.call(this,t,e,Yt):this.options.direction},_onTapStart:function(t){if(t.cancelable){var e=this,n=this.el,o=this.options,r=o.preventOnFilter,i=t.type,a=t.touches&&t.touches[0]||t.pointerType&&"touch"===t.pointerType&&t,s=(a||t).target,l=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||s,c=o.filter;if(function(t){Ce.length=0;var e=t.getElementsByTagName("input"),n=e.length;for(;n--;){var o=e[n];o.checked&&Ce.push(o)}}(n),!Yt&&!(/mousedown|pointerdown/.test(i)&&0!==t.button||o.disabled)&&!l.isContentEditable&&(this.nativeDraggable||!ct||!s||"SELECT"!==s.tagName.toUpperCase())&&!((s=vt(s,o.draggable,n,!1))&&s.animated||Qt===s)){if(Zt=Nt(s),ee=Nt(s,o.draggable),"function"==typeof c){if(c.call(this,t,s,this))return Ut({sortable:e,rootEl:l,name:"filter",targetEl:s,toEl:n,fromEl:n}),Wt("filter",e,{evt:t}),void(r&&t.preventDefault())}else if(c&&(c=c.split(",").some((function(o){if(o=vt(l,o.trim(),n,!1))return Ut({sortable:e,rootEl:o,name:"filter",targetEl:s,fromEl:n,toEl:n}),Wt("filter",e,{evt:t}),!0}))))return void(r&&t.preventDefault());o.handle&&!vt(l,o.handle,n,!1)||this._prepareDragStart(t,a,s)}}},_prepareDragStart:function(t,e,n){var o,r=this,i=r.el,a=r.options,s=i.ownerDocument;if(n&&!Yt&&n.parentNode===i){var l=At(n);if(Vt=i,$t=(Yt=n).parentNode,Kt=Yt.nextSibling,Qt=n,oe=a.group,Pe.dragged=Yt,ie={target:Yt,clientX:(e||t).clientX,clientY:(e||t).clientY},ce=ie.clientX-l.left,ue=ie.clientY-l.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,Yt.style["will-change"]="all",o=function(){Wt("delayEnded",r,{evt:t}),Pe.eventCanceled?r._onDrop():(r._disableDelayedDragEvents(),!lt&&r.nativeDraggable&&(Yt.draggable=!0),r._triggerDragStart(t,e),Ut({sortable:r,name:"choose",originalEvent:t}),wt(Yt,a.chosenClass,!0))},a.ignore.split(",").forEach((function(t){Ct(Yt,t.trim(),je)})),ht(s,"dragover",Ie),ht(s,"mousemove",Ie),ht(s,"touchmove",Ie),a.supportPointer?(ht(s,"pointerup",r._onDrop),!this.nativeDraggable&&ht(s,"pointercancel",r._onDrop)):(ht(s,"mouseup",r._onDrop),ht(s,"touchend",r._onDrop),ht(s,"touchcancel",r._onDrop)),lt&&this.nativeDraggable&&(this.options.touchStartThreshold=4,Yt.draggable=!0),Wt("delayStart",this,{evt:t}),!a.delay||a.delayOnTouchOnly&&!e||this.nativeDraggable&&(st||at))o();else{if(Pe.eventCanceled)return void this._onDrop();a.supportPointer?(ht(s,"pointerup",r._disableDelayedDrag),ht(s,"pointercancel",r._disableDelayedDrag)):(ht(s,"mouseup",r._disableDelayedDrag),ht(s,"touchend",r._disableDelayedDrag),ht(s,"touchcancel",r._disableDelayedDrag)),ht(s,"mousemove",r._delayedDragTouchMoveHandler),ht(s,"touchmove",r._delayedDragTouchMoveHandler),a.supportPointer&&ht(s,"pointermove",r._delayedDragTouchMoveHandler),r._dragStartTimer=setTimeout(o,a.delay)}}},_delayedDragTouchMoveHandler:function(t){var e=t.touches?t.touches[0]:t;Math.max(Math.abs(e.clientX-this._lastX),Math.abs(e.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){Yt&&je(Yt),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;pt(t,"mouseup",this._disableDelayedDrag),pt(t,"touchend",this._disableDelayedDrag),pt(t,"touchcancel",this._disableDelayedDrag),pt(t,"pointerup",this._disableDelayedDrag),pt(t,"pointercancel",this._disableDelayedDrag),pt(t,"mousemove",this._delayedDragTouchMoveHandler),pt(t,"touchmove",this._delayedDragTouchMoveHandler),pt(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||"touch"==t.pointerType&&t,!this.nativeDraggable||e?this.options.supportPointer?ht(document,"pointermove",this._onTouchMove):ht(document,e?"touchmove":"mousemove",this._onTouchMove):(ht(Yt,"dragend",this),ht(Vt,"dragstart",this._onDragStart));try{document.selection?Fe((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(t){}},_dragStarted:function(t,e){if(me=!1,Vt&&Yt){Wt("dragStarted",this,{evt:e}),this.nativeDraggable&&ht(document,"dragover",Oe);var n=this.options;!t&&wt(Yt,n.dragClass,!1),wt(Yt,n.ghostClass,!0),Pe.active=this,t&&this._appendGhost(),Ut({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(ae){this._lastX=ae.clientX,this._lastY=ae.clientY,Me();for(var t=document.elementFromPoint(ae.clientX,ae.clientY),e=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(ae.clientX,ae.clientY))!==e;)e=t;if(Yt.parentNode[jt]._isOutsideThisEl(t),e)do{if(e[jt]){if(e[jt]._onDragOver({clientX:ae.clientX,clientY:ae.clientY,target:t,rootEl:e})&&!this.options.dragoverBubble)break}t=e}while(e=mt(e));_e()}},_onTouchMove:function(t){if(ie){var e=this.options,n=e.fallbackTolerance,o=e.fallbackOffset,r=t.touches?t.touches[0]:t,i=Xt&&Et(Xt,!0),a=Xt&&i&&i.a,s=Xt&&i&&i.d,l=Ae&&ge&&Lt(ge),c=(r.clientX-ie.clientX+o.x)/(a||1)+(l?l[0]-xe[0]:0)/(a||1),u=(r.clientY-ie.clientY+o.y)/(s||1)+(l?l[1]-xe[1]:0)/(s||1);if(!Pe.active&&!me){if(n&&Math.max(Math.abs(r.clientX-this._lastX),Math.abs(r.clientY-this._lastY))<n)return;this._onDragStart(t,!0)}if(Xt){i?(i.e+=c-(se||0),i.f+=u-(le||0)):i={a:1,b:0,c:0,d:1,e:c,f:u};var d="matrix(".concat(i.a,",").concat(i.b,",").concat(i.c,",").concat(i.d,",").concat(i.e,",").concat(i.f,")");xt(Xt,"webkitTransform",d),xt(Xt,"mozTransform",d),xt(Xt,"msTransform",d),xt(Xt,"transform",d),se=c,le=u,ae=r}t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!Xt){var t=this.options.fallbackOnBody?document.body:Vt,e=At(Yt,!0,Ae,!0,t),n=this.options;if(Ae){for(ge=t;"static"===xt(ge,"position")&&"none"===xt(ge,"transform")&&ge!==document;)ge=ge.parentNode;ge!==document.body&&ge!==document.documentElement?(ge===document&&(ge=Tt()),e.top+=ge.scrollTop,e.left+=ge.scrollLeft):ge=Tt(),xe=Lt(ge)}wt(Xt=Yt.cloneNode(!0),n.ghostClass,!1),wt(Xt,n.fallbackClass,!0),wt(Xt,n.dragClass,!0),xt(Xt,"transition",""),xt(Xt,"transform",""),xt(Xt,"box-sizing","border-box"),xt(Xt,"margin",0),xt(Xt,"top",e.top),xt(Xt,"left",e.left),xt(Xt,"width",e.width),xt(Xt,"height",e.height),xt(Xt,"opacity","0.8"),xt(Xt,"position",Ae?"absolute":"fixed"),xt(Xt,"zIndex","100000"),xt(Xt,"pointerEvents","none"),Pe.ghost=Xt,t.appendChild(Xt),xt(Xt,"transform-origin",ce/parseInt(Xt.style.width)*100+"% "+ue/parseInt(Xt.style.height)*100+"%")}},_onDragStart:function(t,e){var n=this,o=t.dataTransfer,r=n.options;Wt("dragStart",this,{evt:t}),Pe.eventCanceled?this._onDrop():(Wt("setupClone",this),Pe.eventCanceled||((Jt=Pt(Yt)).removeAttribute("id"),Jt.draggable=!1,Jt.style["will-change"]="",this._hideClone(),wt(Jt,this.options.chosenClass,!1),Pe.clone=Jt),n.cloneId=Fe((function(){Wt("clone",n),Pe.eventCanceled||(n.options.removeCloneOnHide||Vt.insertBefore(Jt,Yt),n._hideClone(),Ut({sortable:n,name:"clone"}))})),!e&&wt(Yt,r.dragClass,!0),e?(ve=!0,n._loopId=setInterval(n._emulateDragOver,50)):(pt(document,"mouseup",n._onDrop),pt(document,"touchend",n._onDrop),pt(document,"touchcancel",n._onDrop),o&&(o.effectAllowed="move",r.setData&&r.setData.call(n,o,Yt)),ht(document,"drop",n),xt(Yt,"transform","translateZ(0)")),me=!0,n._dragStartId=Fe(n._dragStarted.bind(n,e,t)),ht(document,"selectstart",n),de=!0,window.getSelection().removeAllRanges(),ct&&xt(document.body,"user-select","none"))},_onDragOver:function(t){var e,n,o,r,i=this.el,a=t.target,s=this.options,l=s.group,c=Pe.active,u=oe===l,d=s.sort,f=re||c,h=this,p=!1;if(!Ee){if(void 0!==t.preventDefault&&t.cancelable&&t.preventDefault(),a=vt(a,s.draggable,i,!0),N("dragOver"),Pe.eventCanceled)return p;if(Yt.contains(t.target)||a.animated&&a.animatingX&&a.animatingY||h._ignoreWhileAnimating===a)return M(!1);if(ve=!1,c&&!s.disabled&&(u?d||(o=$t!==Vt):re===this||(this.lastPutMode=oe.checkPull(this,c,Yt,t))&&l.checkPut(this,c,Yt,t))){if(r="vertical"===this._getDirection(t,a),e=At(Yt),N("dragOverValid"),Pe.eventCanceled)return p;if(o)return $t=Vt,L(),this._hideClone(),N("revert"),Pe.eventCanceled||(Kt?Vt.insertBefore(Yt,Kt):Vt.appendChild(Yt)),M(!0);var g=Dt(i,s.draggable);if(!g||function(t,e,n){var o=At(Dt(n.el,n.options.draggable)),r=Rt(n.el,n.options,Xt),i=10;return e?t.clientX>r.right+i||t.clientY>o.bottom&&t.clientX>o.left:t.clientY>r.bottom+i||t.clientX>o.right&&t.clientY>o.top}(t,r,this)&&!g.animated){if(g===Yt)return M(!1);if(g&&i===t.target&&(a=g),a&&(n=At(a)),!1!==Re(Vt,i,Yt,e,a,n,t,!!a))return L(),g&&g.nextSibling?i.insertBefore(Yt,g.nextSibling):i.appendChild(Yt),$t=i,_(),M(!0)}else if(g&&function(t,e,n){var o=At(St(n.el,0,n.options,!0)),r=Rt(n.el,n.options,Xt),i=10;return e?t.clientX<r.left-i||t.clientY<o.top&&t.clientX<o.right:t.clientY<r.top-i||t.clientY<o.bottom&&t.clientX<o.left}(t,r,this)){var m=St(i,0,s,!0);if(m===Yt)return M(!1);if(n=At(a=m),!1!==Re(Vt,i,Yt,e,a,n,t,!1))return L(),i.insertBefore(Yt,m),$t=i,_(),M(!0)}else if(a.parentNode===i){n=At(a);var v,y,b,w=Yt.parentNode!==i,x=!function(t,e,n){var o=n?t.left:t.top,r=n?t.right:t.bottom,i=n?t.width:t.height,a=n?e.left:e.top,s=n?e.right:e.bottom,l=n?e.width:e.height;return o===a||r===s||o+i/2===a+l/2}(Yt.animated&&Yt.toRect||e,a.animated&&a.toRect||n,r),E=r?"top":"left",C=kt(a,"top","top")||kt(Yt,"top","top"),T=C?C.scrollTop:void 0;if(fe!==a&&(y=n[E],be=!1,we=!x&&s.invertSwap||w),v=function(t,e,n,o,r,i,a,s){var l=o?t.clientY:t.clientX,c=o?n.height:n.width,u=o?n.top:n.left,d=o?n.bottom:n.right,f=!1;if(!a)if(s&&pe<c*r){if(!be&&(1===he?l>u+c*i/2:l<d-c*i/2)&&(be=!0),be)f=!0;else if(1===he?l<u+pe:l>d-pe)return-he}else if(l>u+c*(1-r)/2&&l<d-c*(1-r)/2)return function(t){return Nt(Yt)<Nt(t)?1:-1}(e);if((f=f||a)&&(l<u+c*i/2||l>d-c*i/2))return l>u+c/2?1:-1;return 0}(t,a,n,r,x?1:s.swapThreshold,null==s.invertedSwapThreshold?s.swapThreshold:s.invertedSwapThreshold,we,fe===a),0!==v){var A=Nt(Yt);do{A-=v,b=$t.children[A]}while(b&&("none"===xt(b,"display")||b===Xt))}if(0===v||b===a)return M(!1);fe=a,he=v;var k=a.nextElementSibling,S=!1,D=Re(Vt,i,Yt,e,a,n,t,S=1===v);if(!1!==D)return 1!==D&&-1!==D||(S=1===D),Ee=!0,setTimeout(Be,30),L(),S&&!k?i.appendChild(Yt):a.parentNode.insertBefore(Yt,S?k:a),C&&Ot(C,0,T-C.scrollTop),$t=Yt.parentNode,void 0===y||we||(pe=Math.abs(y-At(a)[E])),_(),M(!0)}if(i.contains(Yt))return M(!1)}return!1}function N(s,l){Wt(s,h,tt({evt:t,isOwner:u,axis:r?"vertical":"horizontal",revert:o,dragRect:e,targetRect:n,canSort:d,fromSortable:f,target:a,completed:M,onMove:function(n,o){return Re(Vt,i,Yt,e,n,At(n),t,o)},changed:_},l))}function L(){N("dragOverAnimationCapture"),h.captureAnimationState(),h!==f&&f.captureAnimationState()}function M(e){return N("dragOverCompleted",{insertion:e}),e&&(u?c._hideClone():c._showClone(h),h!==f&&(wt(Yt,re?re.options.ghostClass:c.options.ghostClass,!1),wt(Yt,s.ghostClass,!0)),re!==h&&h!==Pe.active?re=h:h===Pe.active&&re&&(re=null),f===h&&(h._ignoreWhileAnimating=a),h.animateAll((function(){N("dragOverAnimationComplete"),h._ignoreWhileAnimating=null})),h!==f&&(f.animateAll(),f._ignoreWhileAnimating=null)),(a===Yt&&!Yt.animated||a===i&&!a.animated)&&(fe=null),s.dragoverBubble||t.rootEl||a===document||(Yt.parentNode[jt]._isOutsideThisEl(t.target),!e&&Ie(t)),!s.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),p=!0}function _(){te=Nt(Yt),ne=Nt(Yt,s.draggable),Ut({sortable:h,name:"change",toEl:i,newIndex:te,newDraggableIndex:ne,originalEvent:t})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){pt(document,"mousemove",this._onTouchMove),pt(document,"touchmove",this._onTouchMove),pt(document,"pointermove",this._onTouchMove),pt(document,"dragover",Ie),pt(document,"mousemove",Ie),pt(document,"touchmove",Ie)},_offUpEvents:function(){var t=this.el.ownerDocument;pt(t,"mouseup",this._onDrop),pt(t,"touchend",this._onDrop),pt(t,"pointerup",this._onDrop),pt(t,"pointercancel",this._onDrop),pt(t,"touchcancel",this._onDrop),pt(document,"selectstart",this)},_onDrop:function(t){var e=this.el,n=this.options;te=Nt(Yt),ne=Nt(Yt,n.draggable),Wt("drop",this,{evt:t}),$t=Yt&&Yt.parentNode,te=Nt(Yt),ne=Nt(Yt,n.draggable),Pe.eventCanceled||(me=!1,we=!1,be=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),qe(this.cloneId),qe(this._dragStartId),this.nativeDraggable&&(pt(document,"drop",this),pt(e,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),ct&&xt(document.body,"user-select",""),xt(Yt,"transform",""),t&&(de&&(t.cancelable&&t.preventDefault(),!n.dropBubble&&t.stopPropagation()),Xt&&Xt.parentNode&&Xt.parentNode.removeChild(Xt),(Vt===$t||re&&"clone"!==re.lastPutMode)&&Jt&&Jt.parentNode&&Jt.parentNode.removeChild(Jt),Yt&&(this.nativeDraggable&&pt(Yt,"dragend",this),je(Yt),Yt.style["will-change"]="",de&&!me&&wt(Yt,re?re.options.ghostClass:this.options.ghostClass,!1),wt(Yt,this.options.chosenClass,!1),Ut({sortable:this,name:"unchoose",toEl:$t,newIndex:null,newDraggableIndex:null,originalEvent:t}),Vt!==$t?(te>=0&&(Ut({rootEl:$t,name:"add",toEl:$t,fromEl:Vt,originalEvent:t}),Ut({sortable:this,name:"remove",toEl:$t,originalEvent:t}),Ut({rootEl:$t,name:"sort",toEl:$t,fromEl:Vt,originalEvent:t}),Ut({sortable:this,name:"sort",toEl:$t,originalEvent:t})),re&&re.save()):te!==Zt&&te>=0&&(Ut({sortable:this,name:"update",toEl:$t,originalEvent:t}),Ut({sortable:this,name:"sort",toEl:$t,originalEvent:t})),Pe.active&&(null!=te&&-1!==te||(te=Zt,ne=ee),Ut({sortable:this,name:"end",toEl:$t,originalEvent:t}),this.save())))),this._nulling()},_nulling:function(){Wt("nulling",this),Vt=Yt=$t=Xt=Kt=Jt=Qt=Gt=ie=ae=de=te=ne=Zt=ee=fe=he=re=oe=Pe.dragged=Pe.ghost=Pe.clone=Pe.active=null,Ce.forEach((function(t){t.checked=!0})),Ce.length=se=le=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":Yt&&(this._onDragOver(t),function(t){t.dataTransfer&&(t.dataTransfer.dropEffect="move");t.cancelable&&t.preventDefault()}(t));break;case"selectstart":t.preventDefault()}},toArray:function(){for(var t,e=[],n=this.el.children,o=0,r=n.length,i=this.options;o<r;o++)vt(t=n[o],i.draggable,this.el,!1)&&e.push(t.getAttribute(i.dataIdAttr)||He(t));return e},sort:function(t,e){var n={},o=this.el;this.toArray().forEach((function(t,e){var r=o.children[e];vt(r,this.options.draggable,o,!1)&&(n[t]=r)}),this),e&&this.captureAnimationState(),t.forEach((function(t){n[t]&&(o.removeChild(n[t]),o.appendChild(n[t]))})),e&&this.animateAll()},save:function(){var t=this.options.store;t&&t.set&&t.set(this)},closest:function(t,e){return vt(t,e||this.options.draggable,this.el,!1)},option:function(t,e){var n=this.options;if(void 0===e)return n[t];var o=qt.modifyOption(this,t,e);n[t]=void 0!==o?o:e,"group"===t&&Le(n)},destroy:function(){Wt("destroy",this);var t=this.el;t[jt]=null,pt(t,"mousedown",this._onTapStart),pt(t,"touchstart",this._onTapStart),pt(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(pt(t,"dragover",this),pt(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),(function(t){t.removeAttribute("draggable")})),this._onDrop(),this._disableDelayedDragEvents(),ye.splice(ye.indexOf(this.el),1),this.el=t=null},_hideClone:function(){if(!Gt){if(Wt("hideClone",this),Pe.eventCanceled)return;xt(Jt,"display","none"),this.options.removeCloneOnHide&&Jt.parentNode&&Jt.parentNode.removeChild(Jt),Gt=!0}},_showClone:function(t){if("clone"===t.lastPutMode){if(Gt){if(Wt("showClone",this),Pe.eventCanceled)return;Yt.parentNode!=Vt||this.options.group.revertClone?Kt?Vt.insertBefore(Jt,Kt):Vt.appendChild(Jt):Vt.insertBefore(Jt,Yt),this.options.group.revertClone&&this.animate(Yt,Jt),xt(Jt,"display",""),Gt=!1}}else this._hideClone()}},Te&&ht(document,"touchmove",(function(t){(Pe.active||me)&&t.cancelable&&t.preventDefault()})),Pe.utils={on:ht,off:pt,css:xt,find:Ct,is:function(t,e){return!!vt(t,e,t,!1)},extend:function(t,e){if(t&&e)for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t},throttle:It,closest:vt,toggleClass:wt,clone:Pt,index:Nt,nextTick:Fe,cancelNextTick:qe,detectDirection:Ne,getChild:St,expando:jt},Pe.get=function(t){return t[jt]},Pe.mount=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];e[0].constructor===Array&&(e=e[0]),e.forEach((function(t){if(!t.prototype||!t.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(t));t.utils&&(Pe.utils=tt(tt({},Pe.utils),t.utils)),qt.mount(t)}))},Pe.create=function(t,e){return new Pe(t,e)},Pe.version="1.15.6";var ze,We,Ue,Ye,$e,Xe,Ve=[],Ke=!1;function Qe(){Ve.forEach((function(t){clearInterval(t.pid)})),Ve=[]}function Je(){clearInterval(Xe)}var Ge=It((function(t,e,n,o){if(e.scroll){var r,i=(t.touches?t.touches[0]:t).clientX,a=(t.touches?t.touches[0]:t).clientY,s=e.scrollSensitivity,l=e.scrollSpeed,c=Tt(),u=!1;We!==n&&(We=n,Qe(),ze=e.scroll,r=e.scrollFn,!0===ze&&(ze=Mt(n,!0)));var d=0,f=ze;do{var h=f,p=At(h),g=p.top,m=p.bottom,v=p.left,y=p.right,b=p.width,w=p.height,x=void 0,E=void 0,C=h.scrollWidth,T=h.scrollHeight,A=xt(h),k=h.scrollLeft,S=h.scrollTop;h===c?(x=b<C&&("auto"===A.overflowX||"scroll"===A.overflowX||"visible"===A.overflowX),E=w<T&&("auto"===A.overflowY||"scroll"===A.overflowY||"visible"===A.overflowY)):(x=b<C&&("auto"===A.overflowX||"scroll"===A.overflowX),E=w<T&&("auto"===A.overflowY||"scroll"===A.overflowY));var D=x&&(Math.abs(y-i)<=s&&k+b<C)-(Math.abs(v-i)<=s&&!!k),N=E&&(Math.abs(m-a)<=s&&S+w<T)-(Math.abs(g-a)<=s&&!!S);if(!Ve[d])for(var L=0;L<=d;L++)Ve[L]||(Ve[L]={});Ve[d].vx==D&&Ve[d].vy==N&&Ve[d].el===h||(Ve[d].el=h,Ve[d].vx=D,Ve[d].vy=N,clearInterval(Ve[d].pid),0==D&&0==N||(u=!0,Ve[d].pid=setInterval(function(){o&&0===this.layer&&Pe.active._onTouchMove($e);var e=Ve[this.layer].vy?Ve[this.layer].vy*l:0,n=Ve[this.layer].vx?Ve[this.layer].vx*l:0;"function"==typeof r&&"continue"!==r.call(Pe.dragged.parentNode[jt],n,e,t,$e,Ve[this.layer].el)||Ot(Ve[this.layer].el,n,e)}.bind({layer:d}),24))),d++}while(e.bubbleScroll&&f!==c&&(f=Mt(f,!1)));Ke=u}}),30),Ze=function(t){var e=t.originalEvent,n=t.putSortable,o=t.dragEl,r=t.activeSortable,i=t.dispatchSortableEvent,a=t.hideGhostForTarget,s=t.unhideGhostForTarget;if(e){var l=n||r;a();var c=e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:e,u=document.elementFromPoint(c.clientX,c.clientY);s(),l&&!l.el.contains(u)&&(i("spill"),this.onSpill({dragEl:o,putSortable:n}))}};function tn(){}function en(){}tn.prototype={startIndex:null,dragStart:function(t){var e=t.oldDraggableIndex;this.startIndex=e},onSpill:function(t){var e=t.dragEl,n=t.putSortable;this.sortable.captureAnimationState(),n&&n.captureAnimationState();var o=St(this.sortable.el,this.startIndex,this.options);o?this.sortable.el.insertBefore(e,o):this.sortable.el.appendChild(e),this.sortable.animateAll(),n&&n.animateAll()},drop:Ze},ot(tn,{pluginName:"revertOnSpill"}),en.prototype={onSpill:function(t){var e=t.dragEl,n=t.putSortable||this.sortable;n.captureAnimationState(),e.parentNode&&e.parentNode.removeChild(e),n.animateAll()},drop:Ze},ot(en,{pluginName:"removeOnSpill"}),Pe.mount(new function(){function t(){for(var t in this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0},this)"_"===t.charAt(0)&&"function"==typeof this[t]&&(this[t]=this[t].bind(this))}return t.prototype={dragStarted:function(t){var e=t.originalEvent;this.sortable.nativeDraggable?ht(document,"dragover",this._handleAutoScroll):this.options.supportPointer?ht(document,"pointermove",this._handleFallbackAutoScroll):e.touches?ht(document,"touchmove",this._handleFallbackAutoScroll):ht(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(t){var e=t.originalEvent;this.options.dragOverBubble||e.rootEl||this._handleAutoScroll(e)},drop:function(){this.sortable.nativeDraggable?pt(document,"dragover",this._handleAutoScroll):(pt(document,"pointermove",this._handleFallbackAutoScroll),pt(document,"touchmove",this._handleFallbackAutoScroll),pt(document,"mousemove",this._handleFallbackAutoScroll)),Je(),Qe(),clearTimeout(yt),yt=void 0},nulling:function(){$e=We=ze=Ke=Xe=Ue=Ye=null,Ve.length=0},_handleFallbackAutoScroll:function(t){this._handleAutoScroll(t,!0)},_handleAutoScroll:function(t,e){var n=this,o=(t.touches?t.touches[0]:t).clientX,r=(t.touches?t.touches[0]:t).clientY,i=document.elementFromPoint(o,r);if($e=t,e||this.options.forceAutoScrollFallback||st||at||ct){Ge(t,this.options,i,e);var a=Mt(i,!0);!Ke||Xe&&o===Ue&&r===Ye||(Xe&&Je(),Xe=setInterval((function(){var i=Mt(document.elementFromPoint(o,r),!0);i!==a&&(a=i,Qe()),Ge(t,n.options,i,e)}),10),Ue=o,Ye=r)}else{if(!this.options.bubbleScroll||Mt(i,!0)===Tt())return void Qe();Ge(t,this.options,Mt(i,!1),!1)}}},ot(t,{pluginName:"scroll",initializeByDefault:!0})}),Pe.mount(en,tn);var nn,on,rn={};function an(){return on?nn:(on=1,nn=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then})}var sn,ln={},cn={};function un(){if(sn)return cn;let t;sn=1;const e=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];return cn.getSymbolSize=function(t){if(!t)throw new Error('"version" cannot be null or undefined');if(t<1||t>40)throw new Error('"version" should be in range from 1 to 40');return 4*t+17},cn.getSymbolTotalCodewords=function(t){return e[t]},cn.getBCHDigit=function(t){let e=0;for(;0!==t;)e++,t>>>=1;return e},cn.setToSJISFunction=function(e){if("function"!=typeof e)throw new Error('"toSJISFunc" is not a valid function.');t=e},cn.isKanjiModeEnabled=function(){return void 0!==t},cn.toSJIS=function(e){return t(e)},cn}var dn,fn,hn,pn,gn,mn={};function vn(){return dn||(dn=1,(t=mn).L={bit:1},t.M={bit:0},t.Q={bit:3},t.H={bit:2},t.isValid=function(t){return t&&void 0!==t.bit&&t.bit>=0&&t.bit<4},t.from=function(e,n){if(t.isValid(e))return e;try{return function(e){if("string"!=typeof e)throw new Error("Param is not a string");switch(e.toLowerCase()){case"l":case"low":return t.L;case"m":case"medium":return t.M;case"q":case"quartile":return t.Q;case"h":case"high":return t.H;default:throw new Error("Unknown EC Level: "+e)}}(e)}catch(t){return n}}),mn;var t}var yn,bn={};var wn,xn={};var En,Cn={};var Tn,An={};function kn(){if(Tn)return An;Tn=1;const t=vn(),e=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],n=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];return An.getBlocksCount=function(n,o){switch(o){case t.L:return e[4*(n-1)+0];case t.M:return e[4*(n-1)+1];case t.Q:return e[4*(n-1)+2];case t.H:return e[4*(n-1)+3];default:return}},An.getTotalCodewordsCount=function(e,o){switch(o){case t.L:return n[4*(e-1)+0];case t.M:return n[4*(e-1)+1];case t.Q:return n[4*(e-1)+2];case t.H:return n[4*(e-1)+3];default:return}},An}var Sn,Dn,Nn,Ln,Mn={},_n={};function In(){return Dn||(Dn=1,function(t){const e=function(){if(Sn)return _n;Sn=1;const t=new Uint8Array(512),e=new Uint8Array(256);return function(){let n=1;for(let o=0;o<255;o++)t[o]=n,e[n]=o,n<<=1,256&n&&(n^=285);for(let e=255;e<512;e++)t[e]=t[e-255]}(),_n.log=function(t){if(t<1)throw new Error("log("+t+")");return e[t]},_n.exp=function(e){return t[e]},_n.mul=function(n,o){return 0===n||0===o?0:t[e[n]+e[o]]},_n}();t.mul=function(t,n){const o=new Uint8Array(t.length+n.length-1);for(let r=0;r<t.length;r++)for(let i=0;i<n.length;i++)o[r+i]^=e.mul(t[r],n[i]);return o},t.mod=function(t,n){let o=new Uint8Array(t);for(;o.length-n.length>=0;){const t=o[0];for(let r=0;r<n.length;r++)o[r]^=e.mul(n[r],t);let r=0;for(;r<o.length&&0===o[r];)r++;o=o.slice(r)}return o},t.generateECPolynomial=function(n){let o=new Uint8Array([1]);for(let r=0;r<n;r++)o=t.mul(o,new Uint8Array([1,e.exp(r)]));return o}}(Mn)),Mn}var On,Pn={},Rn={},jn={};function Bn(){return On||(On=1,jn.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40}),jn}var Hn,Fn,qn,zn={};function Wn(){if(Hn)return zn;Hn=1;const t="[0-9]+";let e="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";e=e.replace(/u/g,"\\u");const n="(?:(?![A-Z0-9 $%*+\\-./:]|"+e+")(?:.|[\r\n]))+";zn.KANJI=new RegExp(e,"g"),zn.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),zn.BYTE=new RegExp(n,"g"),zn.NUMERIC=new RegExp(t,"g"),zn.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");const o=new RegExp("^"+e+"$"),r=new RegExp("^"+t+"$"),i=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");return zn.testKanji=function(t){return o.test(t)},zn.testNumeric=function(t){return r.test(t)},zn.testAlphanumeric=function(t){return i.test(t)},zn}function Un(){return Fn||(Fn=1,function(t){const e=Bn(),n=Wn();t.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},t.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},t.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},t.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},t.MIXED={bit:-1},t.getCharCountIndicator=function(t,n){if(!t.ccBits)throw new Error("Invalid mode: "+t);if(!e.isValid(n))throw new Error("Invalid version: "+n);return n>=1&&n<10?t.ccBits[0]:n<27?t.ccBits[1]:t.ccBits[2]},t.getBestModeForData=function(e){return n.testNumeric(e)?t.NUMERIC:n.testAlphanumeric(e)?t.ALPHANUMERIC:n.testKanji(e)?t.KANJI:t.BYTE},t.toString=function(t){if(t&&t.id)return t.id;throw new Error("Invalid mode")},t.isValid=function(t){return t&&t.bit&&t.ccBits},t.from=function(e,n){if(t.isValid(e))return e;try{return function(e){if("string"!=typeof e)throw new Error("Param is not a string");switch(e.toLowerCase()){case"numeric":return t.NUMERIC;case"alphanumeric":return t.ALPHANUMERIC;case"kanji":return t.KANJI;case"byte":return t.BYTE;default:throw new Error("Unknown mode: "+e)}}(e)}catch(t){return n}}}(Rn)),Rn}function Yn(){return qn||(qn=1,function(t){const e=un(),n=kn(),o=vn(),r=Un(),i=Bn(),a=e.getBCHDigit(7973);function s(t,e){return r.getCharCountIndicator(t,e)+4}function l(t,e){let n=0;return t.forEach((function(t){const o=s(t.mode,e);n+=o+t.getBitsLength()})),n}t.from=function(t,e){return i.isValid(t)?parseInt(t,10):e},t.getCapacity=function(t,o,a){if(!i.isValid(t))throw new Error("Invalid QR Code version");void 0===a&&(a=r.BYTE);const l=8*(e.getSymbolTotalCodewords(t)-n.getTotalCodewordsCount(t,o));if(a===r.MIXED)return l;const c=l-s(a,t);switch(a){case r.NUMERIC:return Math.floor(c/10*3);case r.ALPHANUMERIC:return Math.floor(c/11*2);case r.KANJI:return Math.floor(c/13);case r.BYTE:default:return Math.floor(c/8)}},t.getBestVersionForData=function(e,n){let i;const a=o.from(n,o.M);if(Array.isArray(e)){if(e.length>1)return function(e,n){for(let o=1;o<=40;o++)if(l(e,o)<=t.getCapacity(o,n,r.MIXED))return o}(e,a);if(0===e.length)return 1;i=e[0]}else i=e;return function(e,n,o){for(let r=1;r<=40;r++)if(n<=t.getCapacity(r,o,e))return r}(i.mode,i.getLength(),a)},t.getEncodedBits=function(t){if(!i.isValid(t)||t<7)throw new Error("Invalid QR Code version");let n=t<<12;for(;e.getBCHDigit(n)-a>=0;)n^=7973<<e.getBCHDigit(n)-a;return t<<12|n}}(Pn)),Pn}var $n,Xn={};var Vn,Kn,Qn,Jn,Gn,Zn,to,eo,no={};var oo,ro,io,ao={exports:{}};function so(){return oo||(oo=1,function(t){var e={single_source_shortest_paths:function(t,n,o){var r={},i={};i[n]=0;var a,s,l,c,u,d,f,h=e.PriorityQueue.make();for(h.push(n,0);!h.empty();)for(l in s=(a=h.pop()).value,c=a.cost,u=t[s]||{})u.hasOwnProperty(l)&&(d=c+u[l],f=i[l],(void 0===i[l]||f>d)&&(i[l]=d,h.push(l,d),r[l]=s));if(void 0!==o&&void 0===i[o]){var p=["Could not find a path from ",n," to ",o,"."].join("");throw new Error(p)}return r},extract_shortest_path_from_predecessor_list:function(t,e){for(var n=[],o=e;o;)n.push(o),t[o],o=t[o];return n.reverse(),n},find_path:function(t,n,o){var r=e.single_source_shortest_paths(t,n,o);return e.extract_shortest_path_from_predecessor_list(r,o)},PriorityQueue:{make:function(t){var n,o=e.PriorityQueue,r={};for(n in t=t||{},o)o.hasOwnProperty(n)&&(r[n]=o[n]);return r.queue=[],r.sorter=t.sorter||o.default_sorter,r},default_sorter:function(t,e){return t.cost-e.cost},push:function(t,e){var n={value:t,cost:e};this.queue.push(n),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}};t.exports=e}(ao)),ao.exports}function lo(){return ro||(ro=1,function(t){const e=Un(),n=function(){if(Kn)return Vn;Kn=1;const t=Un();function e(e){this.mode=t.NUMERIC,this.data=e.toString()}return e.getBitsLength=function(t){return 10*Math.floor(t/3)+(t%3?t%3*3+1:0)},e.prototype.getLength=function(){return this.data.length},e.prototype.getBitsLength=function(){return e.getBitsLength(this.data.length)},e.prototype.write=function(t){let e,n,o;for(e=0;e+3<=this.data.length;e+=3)n=this.data.substr(e,3),o=parseInt(n,10),t.put(o,10);const r=this.data.length-e;r>0&&(n=this.data.substr(e),o=parseInt(n,10),t.put(o,3*r+1))},Vn=e}(),o=function(){if(Jn)return Qn;Jn=1;const t=Un(),e=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function n(e){this.mode=t.ALPHANUMERIC,this.data=e}return n.getBitsLength=function(t){return 11*Math.floor(t/2)+t%2*6},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(t){let n;for(n=0;n+2<=this.data.length;n+=2){let o=45*e.indexOf(this.data[n]);o+=e.indexOf(this.data[n+1]),t.put(o,11)}this.data.length%2&&t.put(e.indexOf(this.data[n]),6)},Qn=n}(),r=function(){if(Zn)return Gn;Zn=1;const t=Un();function e(e){this.mode=t.BYTE,this.data="string"==typeof e?(new TextEncoder).encode(e):new Uint8Array(e)}return e.getBitsLength=function(t){return 8*t},e.prototype.getLength=function(){return this.data.length},e.prototype.getBitsLength=function(){return e.getBitsLength(this.data.length)},e.prototype.write=function(t){for(let e=0,n=this.data.length;e<n;e++)t.put(this.data[e],8)},Gn=e}(),i=function(){if(eo)return to;eo=1;const t=Un(),e=un();function n(e){this.mode=t.KANJI,this.data=e}return n.getBitsLength=function(t){return 13*t},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(t){let n;for(n=0;n<this.data.length;n++){let o=e.toSJIS(this.data[n]);if(o>=33088&&o<=40956)o-=33088;else{if(!(o>=57408&&o<=60351))throw new Error("Invalid SJIS character: "+this.data[n]+"\nMake sure your charset is UTF-8");o-=49472}o=192*(o>>>8&255)+(255&o),t.put(o,13)}},to=n}(),a=Wn(),s=un(),l=so();function c(t){return unescape(encodeURIComponent(t)).length}function u(t,e,n){const o=[];let r;for(;null!==(r=t.exec(n));)o.push({data:r[0],index:r.index,mode:e,length:r[0].length});return o}function d(t){const n=u(a.NUMERIC,e.NUMERIC,t),o=u(a.ALPHANUMERIC,e.ALPHANUMERIC,t);let r,i;s.isKanjiModeEnabled()?(r=u(a.BYTE,e.BYTE,t),i=u(a.KANJI,e.KANJI,t)):(r=u(a.BYTE_KANJI,e.BYTE,t),i=[]);return n.concat(o,r,i).sort((function(t,e){return t.index-e.index})).map((function(t){return{data:t.data,mode:t.mode,length:t.length}}))}function f(t,a){switch(a){case e.NUMERIC:return n.getBitsLength(t);case e.ALPHANUMERIC:return o.getBitsLength(t);case e.KANJI:return i.getBitsLength(t);case e.BYTE:return r.getBitsLength(t)}}function h(t,a){let l;const c=e.getBestModeForData(t);if(l=e.from(a,c),l!==e.BYTE&&l.bit<c.bit)throw new Error('"'+t+'" cannot be encoded with mode '+e.toString(l)+".\n Suggested mode is: "+e.toString(c));switch(l!==e.KANJI||s.isKanjiModeEnabled()||(l=e.BYTE),l){case e.NUMERIC:return new n(t);case e.ALPHANUMERIC:return new o(t);case e.KANJI:return new i(t);case e.BYTE:return new r(t)}}t.fromArray=function(t){return t.reduce((function(t,e){return"string"==typeof e?t.push(h(e,null)):e.data&&t.push(h(e.data,e.mode)),t}),[])},t.fromString=function(n,o){const r=function(t){const n=[];for(let o=0;o<t.length;o++){const r=t[o];switch(r.mode){case e.NUMERIC:n.push([r,{data:r.data,mode:e.ALPHANUMERIC,length:r.length},{data:r.data,mode:e.BYTE,length:r.length}]);break;case e.ALPHANUMERIC:n.push([r,{data:r.data,mode:e.BYTE,length:r.length}]);break;case e.KANJI:n.push([r,{data:r.data,mode:e.BYTE,length:c(r.data)}]);break;case e.BYTE:n.push([{data:r.data,mode:e.BYTE,length:c(r.data)}])}}return n}(d(n,s.isKanjiModeEnabled())),i=function(t,n){const o={},r={start:{}};let i=["start"];for(let a=0;a<t.length;a++){const s=t[a],l=[];for(let t=0;t<s.length;t++){const c=s[t],u=""+a+t;l.push(u),o[u]={node:c,lastCount:0},r[u]={};for(let t=0;t<i.length;t++){const a=i[t];o[a]&&o[a].node.mode===c.mode?(r[a][u]=f(o[a].lastCount+c.length,c.mode)-f(o[a].lastCount,c.mode),o[a].lastCount+=c.length):(o[a]&&(o[a].lastCount=c.length),r[a][u]=f(c.length,c.mode)+4+e.getCharCountIndicator(c.mode,n))}}i=l}for(let t=0;t<i.length;t++)r[i[t]].end=0;return{map:r,table:o}}(r,o),a=l.find_path(i.map,"start","end"),u=[];for(let t=1;t<a.length-1;t++)u.push(i.table[a[t]].node);return t.fromArray(function(t){return t.reduce((function(t,e){const n=t.length-1>=0?t[t.length-1]:null;return n&&n.mode===e.mode?(t[t.length-1].data+=e.data,t):(t.push(e),t)}),[])}(u))},t.rawSplit=function(e){return t.fromArray(d(e,s.isKanjiModeEnabled()))}}(no)),no}function co(){if(io)return ln;io=1;const t=un(),e=vn(),n=function(){if(hn)return fn;function t(){this.buffer=[],this.length=0}return hn=1,t.prototype={get:function(t){const e=Math.floor(t/8);return 1==(this.buffer[e]>>>7-t%8&1)},put:function(t,e){for(let n=0;n<e;n++)this.putBit(1==(t>>>e-n-1&1))},getLengthInBits:function(){return this.length},putBit:function(t){const e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}},fn=t}(),o=function(){if(gn)return pn;function t(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t,this.data=new Uint8Array(t*t),this.reservedBit=new Uint8Array(t*t)}return gn=1,t.prototype.set=function(t,e,n,o){const r=t*this.size+e;this.data[r]=n,o&&(this.reservedBit[r]=!0)},t.prototype.get=function(t,e){return this.data[t*this.size+e]},t.prototype.xor=function(t,e,n){this.data[t*this.size+e]^=n},t.prototype.isReserved=function(t,e){return this.reservedBit[t*this.size+e]},pn=t}(),r=(yn||(yn=1,function(t){const e=un().getSymbolSize;t.getRowColCoords=function(t){if(1===t)return[];const n=Math.floor(t/7)+2,o=e(t),r=145===o?26:2*Math.ceil((o-13)/(2*n-2)),i=[o-7];for(let t=1;t<n-1;t++)i[t]=i[t-1]-r;return i.push(6),i.reverse()},t.getPositions=function(e){const n=[],o=t.getRowColCoords(e),r=o.length;for(let t=0;t<r;t++)for(let e=0;e<r;e++)0===t&&0===e||0===t&&e===r-1||t===r-1&&0===e||n.push([o[t],o[e]]);return n}}(bn)),bn),i=function(){if(wn)return xn;wn=1;const t=un().getSymbolSize;return xn.getPositions=function(e){const n=t(e);return[[0,0],[n-7,0],[0,n-7]]},xn}(),a=(En||(En=1,function(t){t.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const e=3,n=3,o=40,r=10;function i(e,n,o){switch(e){case t.Patterns.PATTERN000:return(n+o)%2==0;case t.Patterns.PATTERN001:return n%2==0;case t.Patterns.PATTERN010:return o%3==0;case t.Patterns.PATTERN011:return(n+o)%3==0;case t.Patterns.PATTERN100:return(Math.floor(n/2)+Math.floor(o/3))%2==0;case t.Patterns.PATTERN101:return n*o%2+n*o%3==0;case t.Patterns.PATTERN110:return(n*o%2+n*o%3)%2==0;case t.Patterns.PATTERN111:return(n*o%3+(n+o)%2)%2==0;default:throw new Error("bad maskPattern:"+e)}}t.isValid=function(t){return null!=t&&""!==t&&!isNaN(t)&&t>=0&&t<=7},t.from=function(e){return t.isValid(e)?parseInt(e,10):void 0},t.getPenaltyN1=function(t){const n=t.size;let o=0,r=0,i=0,a=null,s=null;for(let l=0;l<n;l++){r=i=0,a=s=null;for(let c=0;c<n;c++){let n=t.get(l,c);n===a?r++:(r>=5&&(o+=e+(r-5)),a=n,r=1),n=t.get(c,l),n===s?i++:(i>=5&&(o+=e+(i-5)),s=n,i=1)}r>=5&&(o+=e+(r-5)),i>=5&&(o+=e+(i-5))}return o},t.getPenaltyN2=function(t){const e=t.size;let o=0;for(let n=0;n<e-1;n++)for(let r=0;r<e-1;r++){const e=t.get(n,r)+t.get(n,r+1)+t.get(n+1,r)+t.get(n+1,r+1);4!==e&&0!==e||o++}return o*n},t.getPenaltyN3=function(t){const e=t.size;let n=0,r=0,i=0;for(let o=0;o<e;o++){r=i=0;for(let a=0;a<e;a++)r=r<<1&2047|t.get(o,a),a>=10&&(1488===r||93===r)&&n++,i=i<<1&2047|t.get(a,o),a>=10&&(1488===i||93===i)&&n++}return n*o},t.getPenaltyN4=function(t){let e=0;const n=t.data.length;for(let o=0;o<n;o++)e+=t.data[o];return Math.abs(Math.ceil(100*e/n/5)-10)*r},t.applyMask=function(t,e){const n=e.size;for(let o=0;o<n;o++)for(let r=0;r<n;r++)e.isReserved(r,o)||e.xor(r,o,i(t,r,o))},t.getBestMask=function(e,n){const o=Object.keys(t.Patterns).length;let r=0,i=1/0;for(let a=0;a<o;a++){n(a),t.applyMask(a,e);const o=t.getPenaltyN1(e)+t.getPenaltyN2(e)+t.getPenaltyN3(e)+t.getPenaltyN4(e);t.applyMask(a,e),o<i&&(i=o,r=a)}return r}}(Cn)),Cn),s=kn(),l=function(){if(Ln)return Nn;Ln=1;const t=In();function e(t){this.genPoly=void 0,this.degree=t,this.degree&&this.initialize(this.degree)}return e.prototype.initialize=function(e){this.degree=e,this.genPoly=t.generateECPolynomial(this.degree)},e.prototype.encode=function(e){if(!this.genPoly)throw new Error("Encoder not initialized");const n=new Uint8Array(e.length+this.degree);n.set(e);const o=t.mod(n,this.genPoly),r=this.degree-o.length;if(r>0){const t=new Uint8Array(this.degree);return t.set(o,r),t}return o},Nn=e}(),c=Yn(),u=function(){if($n)return Xn;$n=1;const t=un(),e=t.getBCHDigit(1335);return Xn.getEncodedBits=function(n,o){const r=n.bit<<3|o;let i=r<<10;for(;t.getBCHDigit(i)-e>=0;)i^=1335<<t.getBCHDigit(i)-e;return 21522^(r<<10|i)},Xn}(),d=Un(),f=lo();function h(t,e,n){const o=t.size,r=u.getEncodedBits(e,n);let i,a;for(i=0;i<15;i++)a=1==(r>>i&1),i<6?t.set(i,8,a,!0):i<8?t.set(i+1,8,a,!0):t.set(o-15+i,8,a,!0),i<8?t.set(8,o-i-1,a,!0):i<9?t.set(8,15-i-1+1,a,!0):t.set(8,15-i-1,a,!0);t.set(o-8,8,1,!0)}function p(e,o,r){const i=new n;r.forEach((function(t){i.put(t.mode.bit,4),i.put(t.getLength(),d.getCharCountIndicator(t.mode,e)),t.write(i)}));const a=8*(t.getSymbolTotalCodewords(e)-s.getTotalCodewordsCount(e,o));for(i.getLengthInBits()+4<=a&&i.put(0,4);i.getLengthInBits()%8!=0;)i.putBit(0);const c=(a-i.getLengthInBits())/8;for(let t=0;t<c;t++)i.put(t%2?17:236,8);return function(e,n,o){const r=t.getSymbolTotalCodewords(n),i=s.getTotalCodewordsCount(n,o),a=r-i,c=s.getBlocksCount(n,o),u=r%c,d=c-u,f=Math.floor(r/c),h=Math.floor(a/c),p=h+1,g=f-h,m=new l(g);let v=0;const y=new Array(c),b=new Array(c);let w=0;const x=new Uint8Array(e.buffer);for(let t=0;t<c;t++){const e=t<d?h:p;y[t]=x.slice(v,v+e),b[t]=m.encode(y[t]),v+=e,w=Math.max(w,e)}const E=new Uint8Array(r);let C,T,A=0;for(C=0;C<w;C++)for(T=0;T<c;T++)C<y[T].length&&(E[A++]=y[T][C]);for(C=0;C<g;C++)for(T=0;T<c;T++)E[A++]=b[T][C];return E}(i,e,o)}function g(e,n,s,l){let u;if(Array.isArray(e))u=f.fromArray(e);else{if("string"!=typeof e)throw new Error("Invalid data");{let t=n;if(!t){const n=f.rawSplit(e);t=c.getBestVersionForData(n,s)}u=f.fromString(e,t||40)}}const d=c.getBestVersionForData(u,s);if(!d)throw new Error("The amount of data is too big to be stored in a QR Code");if(n){if(n<d)throw new Error("\nThe chosen QR Code version cannot contain this amount of data.\nMinimum version required to store current data is: "+d+".\n")}else n=d;const g=p(n,s,u),m=t.getSymbolSize(n),v=new o(m);return function(t,e){const n=t.size,o=i.getPositions(e);for(let e=0;e<o.length;e++){const r=o[e][0],i=o[e][1];for(let e=-1;e<=7;e++)if(!(r+e<=-1||n<=r+e))for(let o=-1;o<=7;o++)i+o<=-1||n<=i+o||(e>=0&&e<=6&&(0===o||6===o)||o>=0&&o<=6&&(0===e||6===e)||e>=2&&e<=4&&o>=2&&o<=4?t.set(r+e,i+o,!0,!0):t.set(r+e,i+o,!1,!0))}}(v,n),function(t){const e=t.size;for(let n=8;n<e-8;n++){const e=n%2==0;t.set(n,6,e,!0),t.set(6,n,e,!0)}}(v),function(t,e){const n=r.getPositions(e);for(let e=0;e<n.length;e++){const o=n[e][0],r=n[e][1];for(let e=-2;e<=2;e++)for(let n=-2;n<=2;n++)-2===e||2===e||-2===n||2===n||0===e&&0===n?t.set(o+e,r+n,!0,!0):t.set(o+e,r+n,!1,!0)}}(v,n),h(v,s,0),n>=7&&function(t,e){const n=t.size,o=c.getEncodedBits(e);let r,i,a;for(let e=0;e<18;e++)r=Math.floor(e/3),i=e%3+n-8-3,a=1==(o>>e&1),t.set(r,i,a,!0),t.set(i,r,a,!0)}(v,n),function(t,e){const n=t.size;let o=-1,r=n-1,i=7,a=0;for(let s=n-1;s>0;s-=2)for(6===s&&s--;;){for(let n=0;n<2;n++)if(!t.isReserved(r,s-n)){let o=!1;a<e.length&&(o=1==(e[a]>>>i&1)),t.set(r,s-n,o),i--,-1===i&&(a++,i=7)}if(r+=o,r<0||n<=r){r-=o,o=-o;break}}}(v,g),isNaN(l)&&(l=a.getBestMask(v,h.bind(null,v,s))),a.applyMask(l,v),h(v,s,l),{modules:v,version:n,errorCorrectionLevel:s,maskPattern:l,segments:u}}return ln.create=function(n,o){if(void 0===n||""===n)throw new Error("No input text");let r,i,s=e.M;return void 0!==o&&(s=e.from(o.errorCorrectionLevel,e.M),r=c.from(o.version),i=a.from(o.maskPattern),o.toSJISFunc&&t.setToSJISFunction(o.toSJISFunc)),g(n,r,s,i)},ln}var uo,fo,ho={},po={};function go(){return uo||(uo=1,function(t){function e(t){if("number"==typeof t&&(t=t.toString()),"string"!=typeof t)throw new Error("Color should be defined as hex string");let e=t.slice().replace("#","").split("");if(e.length<3||5===e.length||e.length>8)throw new Error("Invalid hex color: "+t);3!==e.length&&4!==e.length||(e=Array.prototype.concat.apply([],e.map((function(t){return[t,t]})))),6===e.length&&e.push("F","F");const n=parseInt(e.join(""),16);return{r:n>>24&255,g:n>>16&255,b:n>>8&255,a:255&n,hex:"#"+e.slice(0,6).join("")}}t.getOptions=function(t){t||(t={}),t.color||(t.color={});const n=void 0===t.margin||null===t.margin||t.margin<0?4:t.margin,o=t.width&&t.width>=21?t.width:void 0,r=t.scale||4;return{width:o,scale:o?4:r,margin:n,color:{dark:e(t.color.dark||"#000000ff"),light:e(t.color.light||"#ffffffff")},type:t.type,rendererOpts:t.rendererOpts||{}}},t.getScale=function(t,e){return e.width&&e.width>=t+2*e.margin?e.width/(t+2*e.margin):e.scale},t.getImageWidth=function(e,n){const o=t.getScale(e,n);return Math.floor((e+2*n.margin)*o)},t.qrToImageData=function(e,n,o){const r=n.modules.size,i=n.modules.data,a=t.getScale(r,o),s=Math.floor((r+2*o.margin)*a),l=o.margin*a,c=[o.color.light,o.color.dark];for(let t=0;t<s;t++)for(let n=0;n<s;n++){let u=4*(t*s+n),d=o.color.light;if(t>=l&&n>=l&&t<s-l&&n<s-l){d=c[i[Math.floor((t-l)/a)*r+Math.floor((n-l)/a)]?1:0]}e[u++]=d.r,e[u++]=d.g,e[u++]=d.b,e[u]=d.a}}}(po)),po}function mo(){return fo||(fo=1,function(t){const e=go();t.render=function(t,n,o){let r=o,i=n;void 0!==r||n&&n.getContext||(r=n,n=void 0),n||(i=function(){try{return document.createElement("canvas")}catch(t){throw new Error("You need to specify a canvas element")}}()),r=e.getOptions(r);const a=e.getImageWidth(t.modules.size,r),s=i.getContext("2d"),l=s.createImageData(a,a);return e.qrToImageData(l.data,t,r),function(t,e,n){t.clearRect(0,0,e.width,e.height),e.style||(e.style={}),e.height=n,e.width=n,e.style.height=n+"px",e.style.width=n+"px"}(s,i,a),s.putImageData(l,0,0),i},t.renderToDataURL=function(e,n,o){let r=o;void 0!==r||n&&n.getContext||(r=n,n=void 0),r||(r={});const i=t.render(e,n,r),a=r.type||"image/png",s=r.rendererOpts||{};return i.toDataURL(a,s.quality)}}(ho)),ho}var vo,yo,bo={};function wo(){if(vo)return bo;vo=1;const t=go();function e(t,e){const n=t.a/255,o=e+'="'+t.hex+'"';return n<1?o+" "+e+'-opacity="'+n.toFixed(2).slice(1)+'"':o}function n(t,e,n){let o=t+e;return void 0!==n&&(o+=" "+n),o}return bo.render=function(o,r,i){const a=t.getOptions(r),s=o.modules.size,l=o.modules.data,c=s+2*a.margin,u=a.color.light.a?"<path "+e(a.color.light,"fill")+' d="M0 0h'+c+"v"+c+'H0z"/>':"",d="<path "+e(a.color.dark,"stroke")+' d="'+function(t,e,o){let r="",i=0,a=!1,s=0;for(let l=0;l<t.length;l++){const c=Math.floor(l%e),u=Math.floor(l/e);c||a||(a=!0),t[l]?(s++,l>0&&c>0&&t[l-1]||(r+=a?n("M",c+o,.5+u+o):n("m",i,0),i=0,a=!1),c+1<e&&t[l+1]||(r+=n("h",s),s=0)):i++}return r}(l,s,a.margin)+'"/>',f='viewBox="0 0 '+c+" "+c+'"',h='<svg xmlns="http://www.w3.org/2000/svg" '+(a.width?'width="'+a.width+'" height="'+a.width+'" ':"")+f+' shape-rendering="crispEdges">'+u+d+"</svg>\n";return"function"==typeof i&&i(null,h),h},bo}var xo=function(){if(yo)return rn;yo=1;const t=an(),e=co(),n=mo(),o=wo();function r(n,o,r,i,a){const s=[].slice.call(arguments,1),l=s.length,c="function"==typeof s[l-1];if(!c&&!t())throw new Error("Callback required as last argument");if(!c){if(l<1)throw new Error("Too few arguments provided");return 1===l?(r=o,o=i=void 0):2!==l||o.getContext||(i=r,r=o,o=void 0),new Promise((function(t,a){try{const a=e.create(r,i);t(n(a,o,i))}catch(t){a(t)}}))}if(l<2)throw new Error("Too few arguments provided");2===l?(a=r,r=o,o=i=void 0):3===l&&(o.getContext&&void 0===a?(a=i,i=void 0):(a=i,i=r,r=o,o=void 0));try{const t=e.create(r,i);a(null,n(t,o,i))}catch(t){a(t)}}return rn.create=e.create,rn.toCanvas=r.bind(null,n.render),rn.toDataURL=r.bind(null,n.renderToDataURL),rn.toString=r.bind(null,(function(t,e,n){return o.render(t,n)})),rn}(),Eo=t(xo);const Co=function(){new V,function(){if(s("input[data-multiple]").length>0){let t;s("input[data-multiple]").each((function(){t=new G(this,{filter:function(t,e){return G.FILTER_CONTAINS(t,e.match(/[^ ]*$/)[0])},replace:function(t){const e=this.input.value.match(/^.+ \s*|/)[0];this.input.value=e+t+" "},minChars:1}),s(this).on("click",(function(){t.close()}))}));const e=s("#lf_tags");e.on("input",(function(){const n=e.data("list").replace(/,/g,"").split(" "),o=/(\w+) /g;let r;for(;null!==(r=o.exec(e.val()));){const t=n.indexOf(r[1]);-1!==t&&n.splice(t,1)}t.list=n}))}}(),s(".icon-qrcode, .qrcode").removeAttr("onclick").off("click").on("click",(function(t){t.preventDefault();const e=s(this).data("permalink");return d.addListener("qrcode",(function(t){d.hide()})),d.addContent("qrcode",'<div><canvas id="qrcode"/></div>'),Eo.toCanvas(document.getElementById("qrcode"),e,{errorCorrectionLevel:"H",width:250},(function(t){t&&console.error(t)})),d.show(),!1})),shaarli.isAuth&&("pluginsadmin"===shaarli.pageName&&s(".list-sortable").each((function(){Pe.create(this,{animation:200,draggable:".list-item-sortable",handle:".list-sortable-handle",forceFallback:!0,onEnd:function(t){let e=0;s(t.target).find(".list-item-sortable").each((function(){s(this).data("order",e).find("[type=hidden]").val(e),e++}))}})})),["editlink","editlinkbatch"].includes(shaarli.pageName)&&R(s('[name="lf_description"]')))};s((function(){f(),d.init(),H(),F.init(),W(),s(".icon-unfold").on("click",(function(){s(".header-main").toggleClass("unfold")})),s("[data-href]").on("click",(function(){const t=s(this).data("href");t&&(document.location.href=t)})),s(".filter-on").length>0&&(s("#input-readlater").prop("checked",!0),s(".header-button-filter").addClass("has-filter-readlater")),Co(),shaarli.isAuth&&(B(),j.init(),x.init(),M(),q(),z(),s(".bookmarklet").on("click",(function(t){return t.preventDefault(),g("Information","Drag this link to your bookmarks toolbar, or right-click it and choose Bookmark This Link.","alert"),!1}))),s(".autofocus").each((function(t,e){return s(e).trigger("focus"),!1}))}))}();
|