Version Description
- 2018-12-31 =
- Fixes: Layout improvements
Download this release
Release Info
Developer | dtbaker |
Plugin | Envato Elements – Template Kits (Beta) |
Version | 0.1.5 |
Comparing to | |
See all releases |
Code changes from version 0.1.4 to 0.1.5
- assets/css/main.min.css +1 -1
- assets/js/app.min.js +2 -2
- envato-elements.php +2 -2
- inc/class-elementor.php +8 -9
- readme.txt +7 -4
- src/js/app/index.js +6 -3
- src/scss/admin/_global.scss +1 -0
assets/css/main.min.css
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
.envato-elements-clearfix:after{content:'';display:block;clear:both;width:0;height:0}
|
3 |
.envato-elements__wrapper{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;margin:0;min-height:85vh;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;color:#555d66;background:#f1f1f1}
|
4 |
.envato-elements__header{background-color:#fff;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;border-bottom:1px solid #e0e5e9}
|
5 |
-
.envato-elements__header-logo{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;padding:0 30px 0 20px}
|
6 |
.envato-elements__header-logo img{height:22px}
|
7 |
.envato-elements__header-logo a:active,.envato-elements__header-logo a:focus{outline:0;border:0;-moz-outline-style:none;box-shadow:none}
|
8 |
.envato-elements__header-menu{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:left;-webkit-justify-content:left;-ms-flex-pack:left;justify-content:left;border-left:1px solid #f1f1f1;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}
|
2 |
.envato-elements-clearfix:after{content:'';display:block;clear:both;width:0;height:0}
|
3 |
.envato-elements__wrapper{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;margin:0;min-height:85vh;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;color:#555d66;background:#f1f1f1}
|
4 |
.envato-elements__header{background-color:#fff;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;border-bottom:1px solid #e0e5e9}
|
5 |
+
.envato-elements__header-logo{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;padding:0 30px 0 20px;min-height:55px}
|
6 |
.envato-elements__header-logo img{height:22px}
|
7 |
.envato-elements__header-logo a:active,.envato-elements__header-logo a:focus{outline:0;border:0;-moz-outline-style:none;box-shadow:none}
|
8 |
.envato-elements__header-menu{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:left;-webkit-justify-content:left;-ms-flex-pack:left;justify-content:left;border-left:1px solid #f1f1f1;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}
|
assets/js/app.min.js
CHANGED
@@ -12,6 +12,6 @@ set:function(e,t){if(Array.isArray(t))return e.checked=xe.inArray(xe(e).val(),t)
|
|
12 |
0===y&&m.hide().show();var _=a(g),b={x:0===_.x,y:0===_.y};c.extend(u,{defaultOptions:r,autoUpdateLoop:!1,autoUpdateRecommended:!s.mO(),nativeScrollbarSize:_,nativeScrollbarIsOverlaid:b,nativeScrollbarStyling:function(){return m.addClass("os-viewport-native-scrollbars-invisible"),m.css(f,p).hide().css(f,d).show(),g[i.oH]-g[i.cH]===0&&g[i.oW]-g[i.cW]===0}(),overlayScrollbarDummySize:{x:30,y:30},msie:function(){var t,n=e.navigator.userAgent,r="indexOf",o="substring",i=n[r]("MSIE "),s=n[r]("Trident/"),a=n[r]("Edge/"),l=n[r]("rv:"),c=e.parseInt;return i>0?t=c(n[o](i+5,n[r](".",i)),10):s>0?t=c(n[o](l+3,n[r](".",l)),10):a>0&&(t=c(n[o](a+5,n[r](".",a)),10)),t}(),cssCalc:function(){var e,n,r=t.createElement("div"),o=["calc","-webkit-calc","-moz-calc","-o-calc"];for(e=0;e<o.length;++e)if(n=o[e],r.style.cssText="width:"+n+"(1px);",r.style.length)return n;return null}(),restrictedMeasuring:function(){m.css(f,p);var e={w:g[i.sW],h:g[i.sH]};m.css(f,"visible");var t={w:g[i.sW],h:g[i.sH]};return e.w-t.w!==0||e.h-t.h!==0}(),rtlScrollBehavior:function(){m.css({"overflow-y":p,"overflow-x":d,direction:"rtl"}).scrollLeft(0);var e=m.offset(),t=v.offset();m.scrollLeft(999);var n=v.offset();return{i:e.left===t.left,n:t.left-n.left===0}}(),supportTransform:o("transform"),supportTransition:o("transition"),supportPassiveEvents:function(){var t=!1;try{e.addEventListener("test",null,Object.defineProperty({},"passive",{get:function(){t=!0}}))}catch(n){}return t}(),supportResizeObserver:!!s.rO(),supportMutationObserver:!!s.mO()}),m.removeAttr(i.s).remove(),function(){function t(e,t){var n=Math.abs(e),r=Math.abs(t);return!(n===r||n+1===r||n-1===r)}function n(){var t=e.screen.deviceXDPI||0,n=e.screen.logicalXDPI||1;return e.devicePixelRatio||t/n}if(!b.x||!b.y){var r=s.wW(),o=s.wH(),i=n();c(e).on("resize",function(){if(l.all().length>0){var e=s.wW(),f=s.wH(),p=e-r,d=f-o;if(0===p&&0===d)return;var g=Math.round(e/(r/100)),v=Math.round(f/(o/100)),y=Math.abs(p),_=Math.abs(d),b=Math.abs(g),w=Math.abs(v),x=n(),S=y>2&&_>2,k=!t(b,w),j=x!==i&&i>0,E=!(S&&k&&j);E||(h.append(m),u.nativeScrollbarSize=a(m[0]),m.remove(),c.each(l.all(),function(){l.has(this)&&l.get(this).update("zoom")})),r=e,o=f,i=x}})}}()}function p(e){var t,r=this,o="autoUpdate",i=o+"Interval",a=[],l=[],u=!1,f=33,p=f,d=s.now(),h=function(){if(a.length>0&&u){t=s.rAF()(function(){h()});var e=s.now(),r=e-d;if(r>p){d=e-r%p;for(var c=f,m=0;m<a.length;m++){var g=a[m];if(g!==n){var v=g.options(),y=v[o],_=Math.max(1,v[i]),b=s.now();(y===!0||null===y)&&b-l[m]>_&&(g.update("auto"),l[m]=new Date(b+=_)),c=Math.max(1,Math.min(c,_))}}p=c}}else p=f};r.add=function(t){c.inArray(t,a)===-1&&(a.push(t),l.push(s.now()),a.length>0&&!u&&(u=!0,e.autoUpdateLoop=u,h()))},r.remove=function(r){var o=c.inArray(r,a);o>-1&&(l.splice(o,1),a.splice(o,1),0===a.length&&u&&(u=!1,e.autoUpdateLoop=u,t!==n&&(s.cAF()(t),t=-1)))}}function d(u,f,p,d){function h(e,t,n){for(var r=t.split(pr),o=0;o<r.length;o++)e[0].addEventListener(r[o],n,{passive:!0})}function m(e,t,n){for(var r=t.split(pr),o=0;o<r.length;o++)e[0].removeEventListener(r[o],n,{passive:!0})}function v(e,t){var r=3333333,a=s.rO(),l="animationstart mozAnimationStart webkitAnimationStart MSAnimationStart",u="childNodes",f=function(){e[vr](r)[gr](Ze?Ae.n?-r:Ae.i?0:r:r),t()};if(Re){var d=e.append(he(Jr+" observed")).contents()[0],h=d[Cr]=new a(f);h.observe(d)}else if(Te>9||!Oe){e.prepend(he(Jr,he({className:Xr,dir:"ltr"},he(Xr,he(Zr))+he(Xr,he({className:Zr,style:"width: 200%; height: 200%"})))));var m,g,v,y,_=e[0][u][0][u][0],b=c(_[u][1]),w=c(_[u][0]),x=c(w[0][u][0]),S=_[i.oW],k=_[i.oH],j=2,E=p.nativeScrollbarSize,C=function(){w[gr](r)[vr](r),b[gr](r)[vr](r)},P=function(){g=0,m&&(S=v,k=y,f())},A=function(e){return v=_[i.oW],y=_[i.oH],m=v!=S||y!=k,e&&m&&!g?(s.cAF()(g),g=s.rAF()(P)):e||P(),C(),e&&(s.prvD(e),s.stpP(e)),!1},O={},T={};T[Yn]=-((E.y+1)*j),T[Jn]=E.x*-j,T[Xn]=E.y*-j,T[Zn]=-((E.x+1)*j),c(_).css(T),w.on(ar,A),b.on(ar,A),e.on(l,function(){A(!1)}),O[nr]=r,O[rr]=r,x.css(O),C()}else{var L=lt[0],M=L.attachEvent,I=Te!==n;if(M)e.prepend(he(Jr)),de(e,fr+Jr)[0].attachEvent("onresize",f);else{var D=L.createElement(o.o);D.setAttribute("tabindex","-1"),D.setAttribute(i.c,Jr),D.onload=function(){var e=this.contentDocument.defaultView;e.addEventListener("resize",f),e.document.documentElement.style.display="none"},D.type="text/html",I&&e.prepend(D),D.data="about:blank",I||e.prepend(D),e.on(l,f)}}if(e[0]===ht[0]){var N=function(){var t=pt.css("direction"),n={},o=0,i=!1;return t!==Bt&&("ltr"===t?(n[Zn]=0,n[Jn]=sr,o=r):(n[Zn]=sr,n[Jn]=0,o=Ae.n?-r:Ae.i?0:r),ht.children().eq(0).css(n),e[gr](o)[vr](r),Bt=t,i=!0),i};N(),e.on(ar,function(e){return N()&&K(),s.prvD(e),s.stpP(e),!1})}}function y(e){if(Re){var t=e.contents()[0];t[Cr].disconnect(),delete t[Cr]}else ke(e.children(fr+Jr).eq(0))}function _(e){if(e!==n&&Re){var t=e.contents()[0];t[Cr].unobserve(t)}}function b(e){if(e!==n&&Re){var t=e.contents()[0];t[Cr].observe(t)}}function w(){xn&&!wn&&(_n.observe(pt[0],{attributes:!0,attributeOldValue:!0,attributeFilter:[i.i,i.c,i.s]}),bn.observe(qe?ft[0]:_t[0],{attributes:!0,attributeOldValue:!0,subtree:!qe,childList:!qe,characterData:!qe,attributeFilter:qe?["wrap","cols","rows"]:[i.i,i.c,i.s]}),wn=!0)}function x(){xn&&wn&&(_n.disconnect(),bn.disconnect(),wn=!1)}function S(){if(!et){var e=ht[0],t={w:e[i.sW],h:e[i.sH]};if(Fe){var n=ye(t,an);an=t,n&&K(!0,!1)}else an=t}}function k(){Tn&&Z(!0)}function j(){Tn&&!ut.hasClass(go)&&Z(!1)}function E(){On&&(Z(!0),clearTimeout(En),En=setTimeout(function(){On&&!Be&&Z(!1)},100))}function C(e){var t=ot.callbacks;et||(tt!==n?clearTimeout(tt):((An||On)&&Z(!0),fe()||xe(pt,$r),oe(t.onScrollStart,e)),te(!0,vt[gr]()),te(!1,vt[vr]()),oe(t.onScroll,e),tt=setTimeout(function(){Be||(P(),oe(t.onScrollStop,e))},Wn))}function P(){clearTimeout(tt),tt=n,(An||On)&&Z(!1),fe()||Se(pt,$r)}function A(){V(),Hn.update(sr)}function O(e){var t=e.keyCode;if(!ue(t)){if(0===So.length){var n=function(){V(),Hn.update(sr)};n(),Sn=setInterval(n,1e3/60)}c.inArray(t,So)===-1&&So.push(t)}}function T(e){var t=e.keyCode;if(!ue(t)){var n=c.inArray(t,So);n>-1&&So.splice(n,1),0===So.length&&(V(),Hn.update(sr),clearInterval(Sn))}}function L(){setTimeout(function(){Be||(V(),Hn.update(sr))},50)}function M(){kn=!0}function I(){kn=!1,clearInterval(Sn),So=[],V(),Hn.update(sr)}function D(e){return ft[gr](Ae.i&&dn?9999999:0),ft[vr](0),s.prvD(e),s.stpP(e),!1}function N(e){if(!et){var t=e.originalEvent||e,r=t.touches!==n;(1===s.mBtn(e)||r)&&(wn&&(In=!0,x()),ko=s.page(e),jo.w=pt[0][i.oW]-(We?0:Ve),jo.h=pt[0][i.oH]-(We?0:Ke),lt.on(jr,H).on(br,$).on(_r,R),xe(ut,go),wt.setCapture&&wt.setCapture(),s.prvD(e),s.stpP(e))}}function $(e){var t=s.page(e),n={};($n||Nn)&&(n[nr]=jo.w+t.x-ko.x),(Rn||Nn)&&(n[rr]=jo.h+t.y-ko.y),pt.css(n),s.stpP(e)}function R(e){var t=e!==n;lt.off(jr,H).off(br,$).off(_r,R),Se(ut,go),wt.releaseCapture&&wt.releaseCapture(),t&&(In&&w(),Hn.update(sr)),In=!1}function H(e){return s.prvD(e),!1}function F(){K()}function B(){var e={};return ze&&yt&&(e.w=le(yt.css(er+nr)),e.h=le(yt.css(er+rr)),e.c=ye(e,yn),e.f=!0),yn=e,e.c}function q(e,t){var r=t!==n&&null!==t?t.split(pr):ir,o=e!==n&&null!==e?e.split(pr):ir;if(r===ir&&o===ir)return!1;var i,s,a,l,u=ae(o,r),f=!1,p=mn!==n&&null!==mn?mn.split(pr):[ir],d=hn!==n&&null!==hn?hn.split(pr):[ir],h=c.inArray(vo,u),m=u[i];for(h>-1&&u.splice(h,1),i=0;i<u.length;i++)if(m=u[i],0!==m.indexOf(Or)){for(a=!0,l=!0,s=0;s<p.length;s++)if(m===p[s]){a=!1;break}for(s=0;s<d.length;s++)if(m===d[s]){l=!1;break}if(a&&l){f=!0;break}}return f}function z(e){var t=e.attributeName,n=e.target,r=e.type,s="closest";if(n===_t[0])return null===t;if("attributes"===r&&(t===i.c||t===i.s)&&!qe){if(typeof n[s]!==o.f)return!0;if(null!==n[s](fr+Jr)||null!==n[s](fr+to)||null!==n[s](fr+lo))return!1}return!0}function U(){if(et)return!1;var e,t=qe&&Mt&&!Yt?ft.val().length:0,n=!wn&&Mt&&!qe,r={};n&&(e=_t.css(or),r[or]=Ze?Jn:Zn,r[nr]=sr,_t.css(r));var o={w:pe()[i.sW]+t,h:pe()[i.sH]+t};n&&(r[or]=e,r[nr]=lr,_t.css(r));var s=B(),a=ye(o,sn)||s;return sn=o,a}function W(){if(et||wn)return!1;var e=pt.attr(i.i)||ir,t=ve(e,Xt),n=pt.attr(i.c)||ir,r=ve(n,Zt),o=pt.attr(i.s)||ir,s=ve(o,en),a=pt.is(":visible")||ir,l=ve(a,tn),c=qe?ft.attr("rows")||ir:ir,u=ve(c,nn),f=qe?ft.attr("cols")||ir:ir,p=ve(f,rn),d=qe?ft.attr("wrap")||ir:ir,h=ve(d,on);return Xt=e,r&&(r=q(Zt,n)),Zt=n,en=o,tn=a,nn=c,rn=f,on=d,t||r||s||l||u||p||h}function G(e){if(!Fe)return!0;var t=[nr,er+nr,tr+nr,Vn+Zn,Vn+Jn,Zn,Jn,"font-weight","word-spacing"],n=[Kn+Zn,Kn+Jn,Qn+Zn+nr,Qn+Jn+nr],r=[rr,er+rr,tr+rr,Vn+Yn,Vn+Xn,Yn,Xn,"line-height"],o=[Kn+Yn,Kn+Xn,Qn+Yn+nr,Qn+Xn+nr],i="s",s="v-s",a=Wt.x===i||Wt.x===s,l=Wt.y===i||Wt.y===s,c=!1,u=function(e,t){for(var n=0;n<e.length;n++)if(e[n]===t)return!0;return!1};return l&&(c=u(r,e),c||We||(c=u(o,e))),a&&!c&&(c=u(t,e),c||We||(c=u(n,e))),c}function V(){if(!et){var e,t,n,r,o=!Yt,s=zn.w-(We||qt||!Mt?0:Ke+Ye),a=zn.h-(We||qt||!It?0:Ke+Ye),l={},c=Mt||o,u=ft[0];return l[er+nr]=ir,l[er+rr]=ir,l[nr]=sr,ft.css(l),e=u[i.oW],t=c?Math.max(e,u[i.sW]-1):1,t+=Mt?Je+(We?0:o?0:Ve+Qe):0,l[nr]=Mt?t:lr,l[rr]=sr,ft.css(l),n=u[i.oH],r=Math.max(n,u[i.sH]-1),l[nr]=t,l[rr]=r,bt.css(l),l[er+nr]=s+(!We&&Mt?Ve+Qe:0),l[er+rr]=a+(!We&&It?Ke+Ye:0),ft.css(l),{ow:e,oh:n,dw:t,dh:r}}}function K(e,t,r){var o=s.now(),a=_o>0&&Fe&&o-it<_o&&!It&&!Mt;if(clearTimeout(st),a&&(yo.h=e,yo.c=t,yo.f=r,st=setTimeout(K,_o)),!(Be||a||et||Fe&&!r&&pt.is(":hidden")||"inline"===pt.css("display"))){it=o,e=e||yo.h,t=t||yo.c,r=r||yo.f,yo={},e=e!==n&&e,t=t!==n&&t,r=r!==n&&r,!Le||Ce.x&&Ce.y?Ie=we(!0,{},p.nativeScrollbarSize):(Ie.x=0,Ie.y=0),Un={x:3*(Ie.x+(Ce.x?0:3)),y:3*(Ie.y+(Ce.y?0:3))},_(ht),_(dt);var l={l:vt[gr](),t:vt[vr]()},u=ot.callbacks,f=ot.scrollbars,g=ot.textarea,y=u.onUpdated,S=u.onOverflowChanged,C=u.onOverflowAmountChanged,P=u.onDirectionChanged,A=u.onContentSizeChanged,O=u.onHostSizeChanged,T=f.visibility,L=ve(T,ln,r),M=f.autoHide,I=ve(M,cn,r),D=f.clickScrolling,$=ve(D,un,r),R=f.dragScrolling,H=ve(R,fn,r),F=ot.className,q=ve(F,hn,r),z=ot.resize,U=ve(z,pn,r)&&!ze,W=!!qe&&"off"!==ft.attr("wrap"),G=ve(W,Yt,r),Q=ot.paddingAbsolute,Y=ve(Q,qt,r),J=ot.clipAlways,re=ve(J,zt,r),se=ot.sizeAutoCapable&&!ze,ae=ve(se,Qt,r),ue=ot.nativeScrollbarsOverlaid.showNativeScrollbars,fe=ve(ue,Vt),de=ot.autoUpdate,me=ve(de,Kt),ge=ot.overflowBehavior,be=ye(ge,Wt,cr,ur,r),ke=g.dynWidth,je=ve(vn,Ee),Ee=g.dynHeight,Te=ve(gn,Ee);if(Pn="n"===M,An="s"===M,On="m"===M,Tn="l"===M,Cn=f.autoHideDelay,Ln=f.touchSupport,mn=hn,Dn="n"===z,Nn="b"===z,$n="h"===z,Rn="v"===z,dn=ot.normalizeRTL,ue=ue&&Ce.x&&Ce.y,ln=T,cn=M,un=D,fn=R,hn=F,pn=z,Yt=W,qt=Q,zt=J,Qt=se,Vt=ue,Kt=de,Wt=we(!0,{},ge),vn=ke,gn=Ee,q&&(Se(pt,mn+pr+vo),xe(pt,F!==n&&null!==F&&F.length>0?F:vo)),me&&(de===!0?(x(),d.add(Hn)):null===de&&Oe?(x(),d.add(Hn)):(d.remove(Hn),w())),ae)if(se)if(mt===n&&(mt=c(he(Qr)),gt.before(mt)),Ge)dt.show();else{dt=c(he(Yr)),mt.before(dt);var De={w:-1,h:-1};v(dt,function(){var e={w:dt[0][i.oW],h:dt[0][i.oH]};ye(e,De)&&(Fe&&It&&e.h>0||Mt&&e.w>0?K():(Fe&&!It&&0===e.h||!Mt&&0===e.w)&&K()),De=e}),Ge=!0,null!==Me&&dt.css(rr,Me+"(100% + 1px)")}else Ge&&dt.hide();r&&(ht.find("*").trigger(ar),Ge&&dt.find("*").trigger(ar));var Ne,Re=pt.css("direction"),Ue=ve(Re,Ft,r),tt=pt.css("box-sizing"),nt=ve(tt,Nt,r),rt={c:r,t:le(pt.css(Kn+Yn)),r:le(pt.css(Kn+Jn)),b:le(pt.css(Kn+Xn)),l:le(pt.css(Kn+Zn))};try{Ne=Ge?dt[0].getBoundingClientRect():null}catch(at){return}Ze="rtl"===Re,We="border-box"===tt;var lt=Ze?Zn:Jn,ct=Ze?Jn:Zn,ut=pt[0],xt=gt[0],St=!1,kt=!(!Ge||"none"===pt.css(or))&&(0===Math.round(Ne.right-Ne.left)&&(!!Q||ut[i.cW]-Ve>0));if(se&&!kt){var jt=ut[i.oW],Et=mt.css(nr);mt.css(nr,sr);var Ct=ut[i.oW];mt.css(nr,Et),St=jt!==Ct,St||(mt.css(nr,jt+1),Ct=ut[i.oW],mt.css(nr,Et),St=jt!==Ct)}var Bt=(kt||St)&&se,Xt=ve(Bt,Mt,r),Zt=!Bt&&Mt,en=!!Ge&&0===Math.round(Ne.bottom-Ne.top),tn=ve(en,It,r),nn=!en&&It,rn="-"+nr,on=Bt&&We||!We,sn=en&&We||!We,an={c:r,t:sn?le(pt.css(Qn+Yn+rn)):0,r:on?le(pt.css(Qn+Jn+rn)):0,b:sn?le(pt.css(Qn+Xn+rn)):0,l:on?le(pt.css(Qn+Zn+rn)):0},_n={c:r,t:le(pt.css(Vn+Yn)),r:le(pt.css(Vn+Jn)),b:le(pt.css(Vn+Xn)),l:le(pt.css(Vn+Zn))},bn={h:String(pt.css(tr+rr)),w:String(pt.css(tr+nr))},xn={},Sn={};if(Ve=rt.l+rt.r,Ke=rt.t+rt.b,rt.c=_e(rt,$t),Qe=an.l+an.r,Ye=an.t+an.b,an.c=_e(an,Rt),Je=_n.l+_n.r,Xe=_n.t+_n.b,_n.c=_e(_n,Ht),bn.ih=le(bn.h),bn.iw=le(bn.w),bn.ch=bn.h.indexOf("px")>-1,bn.cw=bn.w.indexOf("px")>-1,bn.c=ye(bn,Dt,r),Ft=Re,Nt=tt,Mt=Bt,It=en,$t=rt,Rt=an,Ht=_n,Dt=bn,Ue&&Ge&&dt.css(or,ct),rt.c||Ue||Y||Xt||tn||nt||ae){var jn={},En={};ie(Sn,Vn,[-rt.t,-rt.r,-rt.b,-rt.l]),Q?(ie(jn,ir,[rt.t,rt.r,rt.b,rt.l]),qe?ie(En,Kn):ie(xn,Kn)):(ie(jn,ir),qe?ie(En,Kn,[rt.t,rt.r,rt.b,rt.l]):ie(xn,Kn,[rt.t,rt.r,rt.b,rt.l])),gt.css(jn),ft.css(En)}zn={w:xt[i.oW],h:xt[i.oH]};var Mn=!!qe&&V();if(en&&(tn||Y||nt||bn.c||rt.c||an.c)?(bn.cw&&(xn[tr+rr]=bn.ch?bn.ih-(Q?Ke:0)+(We?-Ye:Ke):ir),xn[rr]=sr):(tn||Y)&&(xn[tr+rr]=ir,xn[rr]=lr),Bt&&(Xt||Y||nt||bn.c||rt.c||an.c||Ue)?(bn.cw&&(xn[tr+nr]=bn.cw?bn.iw-(Q?Ve:0)+(We?-Qe:Ve)+(Ce.y?Pe.y:0):ir),xn[nr]=sr,Sn[tr+nr]=lr):(Xt||Y)&&(xn[tr+nr]=ir,xn[nr]=lr,xn[or]=ir,Sn[tr+nr]=ir),Bt&&(bn.cw||(xn[tr+nr]=ir),Sn[nr]=qe&&ke?Mn.dw:sr,xn[nr]=sr,xn[or]=ct),en&&(bn.ch||(xn[tr+rr]=ir),Sn[rr]=qe?Ee?Mn.dh:sr:_t[0][i.cH]),se&&mt.css(Sn),_t.css(xn),xn={},Sn={},Tt=Tt||{x:!1,y:!1},e||t||Ue||nt||Y||Xt||Bt||tn||en||bn.c||fe||be||re||U||L||je||Te||G||Y||je||Te||r){var In="overflow",Bn=In+"-x",qn=In+"-y",Wn="hidden",Gn="visible",fr=He?Ce.x||Ce.y||zn.w<Un.y||zn.h<Un.x||en:en,dr={},hr=Tt.y&&Lt.ys&&!ue?Ce.y?vt.css(lt):-Ie.y:0,mr=Tt.x&&Lt.xs&&!ue?Ce.x?vt.css(Xn):-Ie.x:0;ie(dr,ir),vt.css(dr),fr&&_t.css(In,Wn);var _r=pe(),Sr=He&&!fr?vt[0]:_r,kr={w:_r[i.cW],h:_r[i.cH]},jr={w:Math.max(_r[i.sW],Sr[i.sW]),h:Math.max(_r[i.sH],Sr[i.sH])},Er={w:qe&&Mn&&!ke?Mn.ow:Bt?kr.w:jr.w,h:qe&&Mn&&!Ee?Mn.oh:en?kr.h:jr.h};dr[Xn]=nn?ir:mr,dr[lt]=Zt?ir:hr,vt.css(dr);var Cr={w:ut[i.cW],h:ut[i.cH]},Pr={w:Math.max(Er.w+(Q?Ve:0),Cr.w-Ve)-(ke&&qe&&Bt?Je+(We?0:Ve+Qe):0),h:Math.max(Er.h+(Q?Ke:0),Cr.h-Ke)};if(Pr.c=ye(Pr,Ut,r),Ut=Pr,se){(Pr.c||en||Bt)&&(Sn[nr]=Pr.w,Sn[rr]=Pr.h);var Ar=Sn[nr]+(We?Qe:-Ve),Or=Sn[rr]+(We?Ye:-Ve),Tr={};(!Bt||!Bt&&an.c)&&(Sn[nr]=Cr.w-(We?0:Ve+Qe)-1-Je),(!en||!en&&an.c)&&(Sn[rr]=Cr.h-(We?0:Ke+Ye)-1-Xe),bn.cw&&bn.iw===Ar&&(Sn[nr]=Ar+(We?0:Ve)+1),bn.ch&&bn.ih===Or&&(Sn[rr]=Or+(We?0:Ke)+1),Bt&&(kr.w<zn.w||qe&&!W)&&0===Ve&&(qe&&(Tr[nr]=le(bt.css(nr))-1),Sn[nr]-=1),en&&(kr.h<zn.h||qe)&&0===Ke&&(qe&&(Tr[rr]=le(bt.css(rr))-1),Sn[rr]-=1),Er.h>0&&(Sn[nr]=Math.max(1,Sn[nr]),Sn[rr]=Math.max(1,Sn[rr])),qe&&bt.css(Tr),mt.css(Sn)}Bt&&(xn[nr]=lr),!Bt||We||wn||(xn[or]="none"),_t.css(xn),xn={};var Lr=_r.getBoundingClientRect(),Mr={w:Math.max(_r[i.sW],Sr[i.sW]),h:Math.max(_r[i.sH],Sr[i.sH])};if(fr&&_t.css(In,ir),Lr.width){var Ir=Lr.width,Br=Lr.height,qr=.001;Mr.w+=le(Ir+qr)-Ir,Mr.h+=le(Br+qr)-Br}Mr.c=t=ye(Mr,At,r),At=Mr,Cr={w:ut[i.cW],h:ut[i.cH]},e=ye(Cr,Pt),Pt=Cr,zn={w:xt[i.oW],h:xt[i.oH]};var zr={x:"v-s"===ge.x,y:"v-s"===ge.y},Ur={x:"v-h"===ge.x,y:"v-h"===ge.y},Wr={x:"s"===ge.x,y:"s"===ge.y},Gr={x:Math.max(0,Math.round(100*(Mr.w-Cr.w+(Q?Ve:0)))/100),y:Math.max(0,Math.round(100*(Mr.h-Cr.h+(Q?Ke:0)))/100)},Vr=qe&&(0===zn.w||0===zn.h);Vr&&(Gr.x=0,Gr.y=0);var Jr={x:Gr.x>0,y:Gr.y>0},Xr={x:Jr.x,y:Jr.y};(zr.x||Ur.x)&&(Xr.x=Jr.y&&!zr.y&&!Ur.y),(zr.y||Ur.y)&&(Xr.y=Jr.x&&!zr.x&&!Ur.x),Xr.xs=!!Xr.x&&(Wr.x||zr.x),Xr.ys=!!Xr.y&&(Wr.y||zr.y);var Zr={x:Jr.x&&Xr.xs,y:Jr.y&&Xr.ys},eo=Gt;if(Gr.c=ye(Gr,Gt,cr,ur,r),Gt=Gr,Jr.c=ye(Jr,Tt,cr,ur,r),Tt=Jr,Xr.c=ye(Xr,Lt,cr,ur,r),Lt=Xr,Ce.x||Ce.y){var to=r,no={};if((Jr.x||Jr.y)&&(no.w=Ce.y&&Jr.y?Mr.w+Pe.y:ir,no.h=Ce.x&&Jr.x?Mr.h+Pe.x:ir,to=ve(no,Ot,r),Ot=no),Jr.c||Xr.c||Mr.c||Ue||Xt||tn||Bt||en||fe){var ro="px solid transparent";xn[Qn+ct]=ir,xn[Vn+ct]=ir,Ce.x&&Jr.x&&Xr.xs?(en&&(xn[Vn+Xn]=ue?ir:Pe.x),en||ue?xn[Qn+Xn]=ir:xn[Qn+Xn]=Pe.x+ro):(no.h=ir,to=!0,xn[Qn+Xn]=ir,xn[Vn+Xn]=ir),Ce.y&&Jr.y&&Xr.ys?(Bt&&(xn[Vn+lt]=ue?ir:Pe.y),ue?xn[Qn+lt]=ir:xn[Qn+lt]=Pe.y+ro):(no.w=ir,to=!0,xn[Qn+lt]=ir,xn[Vn+lt]=ir)}if(ue&&(no.w=ir,no.h=ir,to=!0),to){var oo={};oo[nr]=Xr.y?no.w:ir,oo[rr]=Xr.x?no.h:ir,yt===n&&(yt=c(he(Kr)),vt.prepend(yt)),yt.css(oo)}_t.css(xn)}var io={},jn={};if(e||Jr.c||Xr.c||Mr.c||be||nt||fe||Ue||re||tn){io[ct]=ir;var so=function(){io[Xn]=ir,Fn.h=0},ao=function(){io[lt]=ir,Fn.w=0};if(Jr.x&&Xr.xs?(io[Bn]=ar,ue?so():(io[Xn]=-(Ce.x?Pe.x:Ie.x),Fn.h=Ce.x?Pe.y:0)):(io[Bn]=ir,so()),Jr.y&&Xr.ys?(io[qn]=ar,ue?ao():(io[lt]=-(Ce.y?Pe.y:Ie.y),Fn.w=Ce.y?Pe.x:0)):(io[qn]=ir,ao()),(zn.h<Un.x||zn.w<Un.y)&&(Jr.x&&Xr.x&&!Ce.x||Jr.y&&Xr.y&&!Ce.y)?(io[Kn+Yn]=Un.x,io[Vn+Yn]=-Un.x,io[Kn+ct]=Un.y,io[Vn+ct]=-Un.y):(io[Kn+Yn]=ir,io[Vn+Yn]=ir,io[Kn+ct]=ir,io[Vn+ct]=ir),io[Kn+lt]=ir,io[Vn+lt]=ir,Jr.x&&Xr.x||Jr.y&&Xr.y||Vr?qe&&Vr&&(jn[Bn]=Wn,jn[qn]=Wn):(!J||Ur.x||zr.x||Ur.y||zr.y)&&(qe&&(jn[Bn]=ir,jn[qn]=ir),io[Bn]=Gn,io[qn]=Gn),gt.css(jn),vt.css(io),io={},(Jr.c||nt||Xt||tn)&&(!Ce.x||!Ce.y)){var lo=_t[0],ho=lo.style;ho.webkitTransform="scale(1)",ho.display="run-in";lo[i.oH];ho.display=ir,ho.webkitTransform=ir}if(fe&&ue){pt.hide();ut[i.oH];pt.show()}}if(xn={},Ue||Xt||tn)if(Ze&&Bt){var mo=_t.css(or),go=Math.round(_t.css(or,ir).css(Zn,ir).position().left);_t.css(or,mo);var bo=Math.round(_t.position().left);go!==bo&&(xn[Zn]=go)}else xn[Zn]=ir;_t.css(xn);var wo="v"===T,xo="h"===T,So="a"===T,ko=s.bind(X,0,!0,!0,Zr.x),jo=s.bind(X,0,!1,!0,Zr.y),Eo=s.bind(X,0,!0,!1,Zr.x),Co=s.bind(X,0,!1,!1,Zr.y);if(Xr.x||Xr.y?xe(pt,Rr):Se(pt,Rr),Xr.x?xe(pt,Hr):Se(pt,Hr),Xr.y?xe(pt,Fr):Se(pt,Fr),Ue&&(Ze?xe(pt,Dr):Se(pt,Dr)),ze&&xe(pt,Nr),U){var Po=function(){wt.on(yr,N)},Ao=function(){wt.off(yr,N)};Dn?(xe(pt,Nr),Se(wt,[co,uo,fo,po].join(pr)),Ao()):(Se(pt,Nr),xe(wt,co),Nn?xe(wt,uo):$n?xe(wt,fo):Rn&&xe(wt,po),Ao(),Po())}if((L||be||Xr.c||Jr.c||fe)&&(ue?fe&&(Se(pt,$r),ue&&(Eo(),Co())):So?(Zr.x?ko():Eo(),Zr.y?jo():Co()):wo?(ko(),jo()):xo&&(Eo(),Co())),I||fe){var Oo=function(e){$e?e?h(pt,br,E):(h(pt,wr,k),h(pt,xr,j)):e?pt.on(br,E):pt.on(wr,k).on(xr,j)},To=function(){$e?(m(pt,br,E),m(pt,wr,k),m(pt,xr,j)):pt.off(br,E).off(wr,k).off(xr,j)};Tn||On?(To(),Oo(On)):To(),Pn?Z(!0):Z(!1,!0)}if((e||Gr.c||tn||Xt||U||nt||Y||fe||Ue)&&(ee(!0),te(!0,l.l),ee(!1),te(!1,l.t)),$&&ne(!0,D),H&&ne(!1,R),qe&&t){var Lo=ce();if(Lo){var Mo=Jt===n||Lo.rows!==Jt.rows,Io=Lo.cR,Do=Lo.cC,No=Lo.w,$o=Lo.r,Ro=Lo.c,Ho=Lo.p,Fo=Lo.m,Bo=Fo===Ho&&kn,qo={x:W||Do!==Ro||Io!==No?-1:Gt.x,y:(W?Bo||Mo&&eo!==n&&l.t===eo.y:(Bo||Mo)&&Io===$o)?Gt.y:-1},zo=qo.x>-1,Uo=qo.y>-1;(zo||Uo)&&(Uo&&vt[vr](qo.y),zo&&(Ze&&dn&&Ae.i?vt[gr](0):vt[gr](qo.x)))}Jt=Lo}else qe||(Ze&&Ae.i&&Ce.y&&Jr.x&&dn&&(l.l+=Fn.w||0),vt[gr](l.l),vt[vr](l.t));Ue&&oe(P,{isRTL:Ze,dir:Re}),e&&oe(O,{width:Pt.w,height:Pt.h}),t&&oe(A,{width:At.w,height:At.h}),(Jr.c||Xr.c)&&oe(S,{x:Jr.x,y:Jr.y,xScrollable:Xr.xs,yScrollable:Xr.ys,clipped:Xr.x||Xr.y}),Gr.c&&oe(C,{x:Gr.x,y:Gr.y})}ze&&(Jr.c||yn.c)&&(yn.f||B(),Ce.y&&Jr.x&&_t.css(er+nr,yn.w+Pe.y),Ce.x&&Jr.y&&_t.css(er+rr,yn.h+Pe.x),yn.c=!1),b(ht),b(dt),oe(y,{forced:r})}}function Q(e){rt=we(!0,{},rt,g.v(e,g.t,!0)),ot=we(!0,{},ot,g.v(e,g.t,!1,!0))}function Y(){xt=c(he(to+pr+ho)),St=c(he(no)),kt=c(he(oo)),jt=c(he(to+pr+mo)),Et=c(he(no)),Ct=c(he(oo)),xt.append(St),St.append(kt),jt.append(Et),Et.append(Ct),gt.after(jt),gt.after(xt),De&&(xt.on(Er,function(e){e.target===xt[0]&&(ee(!0),te(!0,vt[gr]()))}),jt.on(Er,function(e){e.target===jt[0]&&(ee(!1),te(!1,vt[vr]()))})),J(!0),J(!1),wt=c(he(lo)),pt.append(wt)}function J(e){var t,r,o,i=re(e),a=i.xy,l=ar+i.LT,c="active",u=1,f=function(){u=.5},p=function(){u=1},d=function(n){var o=i.i.tl,c=i.i.hl,u=i.i.ms,f=c/2+s.page(n)[a]-r,p=(f-c/2)/(o-c),d=u*p;d=isFinite(d)?d:0,Ze&&e&&(Ae.n||!Ae.n&&!Ae.i)&&(d*=-1),vt[l](t+d),$e||s.prvD(n)},h=function(e){e=e||e.originalEvent,Se(ut,go),Se(i.h,c),Se(i.t,c),Se(i.s,c),lt.off(br,d).off(_r,h).off(Sr,m).off(kr,g).off(jr,H),p(),t=n,r=n,o!==n&&(Hn.scrollStop(),clearTimeout(o),o=n);var s=pt[0].getBoundingClientRect();e.clientX>=s.left&&e.clientX<=s.right&&e.clientY>=s.top&&e.clientY<=s.bottom||j(),(An||On)&&Z(!1)},m=function(e){16==e.keyCode&&f()},g=function(e){16==e.keyCode&&p()};i.h.on(yr,function(o){if(!et){var u=o.originalEvent||o,f=u.touches!==n;fe()||!fn||f&&!Ln||(1===s.mBtn(o)||f)&&(t=vt[l](),t=t===n?0:t,(Ze&&e&&!Ae.n||!Ze)&&(t=t<0?0:t),r=s.page(o)[a],xe(ut,go),xe(i.h,c),xe(i.s,c),lt.on(br,d).on(_r,h).on(jr,H),!Te&&Ue||s.prvD(o),s.stpP(o))}}),i.t.on(yr,function(t){if(!et){var l=t.originalEvent||t,p=l.touches!==n;if(!fe()&&un&&(!p||Ln)&&(1===s.mBtn(t)||p)){var d,v=zn[i._wh],y=i.t.offset()[i.lt],_=!0;t.shiftKey&&f();var b=function(){if(!Be){var t=i.i.ho,s=i.i.hl,a=r-y,l=200*u,c=_?Math.max(333,l):l,f={},p=Ze&&e&&(!Ae.i&&!Ae.n||dn),h=t>a;p&&(h=t<a),h?(d===n&&(d=!0),f[i.xy]="-="+v):(d===n&&(d=!1),f[i.xy]="+="+v),Hn.scrollStop(),Hn.scroll(f,l,"linear");var m=d?t<=a:t+s>=a;p&&(m=d?t+s>=a:t<=a),m?(clearTimeout(o),Hn.scrollStop(),o=n):o=setTimeout(b,c),_=!1}};r=s.page(t)[a],xe(ut,go),xe(i.t,c),xe(i.s,c),lt.on(_r,h).on(Sr,m).on(kr,g).on(jr,H),b(),s.prvD(t),s.stpP(t)}}}).hover(function(){(An||On)&&(Mn=!0,Z(!0))},function(){(An||On)&&(Mn=!1,Z(!1))}),i.s.on(yr,function(e){s.stpP(e)})}function X(e,t,n){var r=e?Lr:Mr,o=e?xt:jt;t?Se(pt,r):xe(pt,r),n?Se(o,so):xe(o,so)}function Z(e,t){if(clearTimeout(jn),e)Se(xt,ao),Se(jt,ao);else{var n="active",r=function(){if(!Mn&&!Be){var e=kt.hasClass(n)||Ct.hasClass(n);!e&&(An||On||Tn)&&xe(xt,ao),!e&&(An||On||Tn)&&xe(jt,ao)}};Cn>0&&t!==!0?jn=setTimeout(r,Cn):r()}}function ee(e){var t={},n=re(e),r=1e6,o=Math.min(1,(Pt[n._wh]-(qt?e?Ve:Ke:0))/At[n._wh]);t[n.wh]=Math.floor(100*o*r)/r+"%",fe()||n.h.css(t),n.i.hl=n.h[0]["offset"+n.WH],n.i.hlr=o}function te(e,t){var n,r,o=Ze&&e,i={},s=re(e),a="translate(",l="transform",c=vt[0][ar+s.WH]-vt[0]["client"+s.WH],u=s.i.hl,f=s.t[0]["offset"+s.WH],p=f-u,d=p;Ae.n&&o&&(c*=-1),r=t/c,r=isNaN(r)?0:Math.min(1,r),s.i.ms=c,s.i.cs=t,s.i.csr=r,d*=r,d=isNaN(d)?0:d,o&&(Ae.n||!Ae.n&&!Ae.i)&&(d=f-u-d),d=Math.max(0,d),Ne?(o&&(d=-(f-u-d)),n=e?a+d+"px, 0)":a+"0, "+d+"px)",i["-webkit-"+l]=n,i["-moz-"+l]=n,i["-ms-"+l]=n,i["-o-"+l]=n,i[l]=n):i[s.lt]=d,fe()||s.h.css(i),s.i.ho=d,s.i.tl=f}function ne(e,t){var n=t?"removeClass":"addClass",r=e?St:kt,o=e?Et:Ct,i=e?ro:io;r[n](i),o[n](i)}function re(e){return{wh:e?nr:rr,WH:e?"Width":"Height",lt:e?Zn:Yn,LT:e?"Left":"Top",xy:e?cr:ur,XY:e?"X":"Y",_wh:e?"w":"h",_lt:e?"l":"t",t:e?St:Et,h:e?kt:Ct,s:e?xt:jt,i:e?Bn:qn}}function oe(e,t){Fe&&c.isFunction(e)&&e.call(Hn,t)}function ie(e,t,r){r===n&&(r=[ir,ir,ir,ir]),e[t+Yn]=r[0],e[t+Jn]=r[1],e[t+Xn]=r[2],e[t+Zn]=r[3]}function se(t){var n="ownerDocument",r="HTMLElement",i=t&&t[n]?t[n].parentWindow||e:e;return typeof i[r]===o.o?t instanceof i[r]:t&&typeof t===o.o&&null!==t&&1===t.nodeType&&typeof t.nodeName===o.s}function ae(e,t){var n,r,o=[],i=[];for(n=0;n<e.length;n++)o[e[n]]=!0;for(n=0;n<t.length;n++)o[t[n]]?delete o[t[n]]:o[t[n]]=!0;for(r in o)i.push(r);return i}function le(t){var n=e.parseInt(t);return isNaN(n)?0:n}function ce(){var e=ft[0].selectionStart;if(e!==n){var t,r,o="length",i=ft.val(),s=i[o],a=i.split("\n"),l=a[o],c=i.substr(0,e).split("\n"),u=0,f=0,p=c[o],d=c[c[o]-1][o];for(r=0;r<a[o];r++)t=a[r][o],t>f&&(u=r+1,f=t);return{cR:p,cC:d,r:l,c:f,w:u,p:e,m:s}}}function ue(e){for(var t=0;t<xo.length;t++)if(e===xo[t])return!0;return!1}function fe(){return Vt&&Ce.x&&Ce.y}function pe(){return qe?bt[0]:_t[0]}function de(e,t){return c.prototype.find.call(e,t).eq(0)}function he(e,t){return"<div "+(e?be(e)===o.s?'class="'+e+'"':function(){var t,n="";if(c.isPlainObject(e))for(t in e)n+=("className"===t?"class":t)+'="'+e[t]+'" ';return n}():ir)+">"+(t?t:ir)+"</div>"}function me(e,t){for(var n,r=t.split(fr),i=0;i<r.length;i++){if(!e.hasOwnProperty(r[i]))return;n=e[r[i]],i<r.length&&be(n)===o.o&&(e=n)}return n}function ge(e,t,n){for(var r=t.split(fr),o=r.length,i=0,s={},a=s;i<o;i++)s=s[r[i]]=i+1<o?{}:n;c.extend(e,a,!0)}function ve(e,t,r){return r===!0?r:t===n||e!==t}function ye(e,t,r,o,i){if(i===!0)return i;if(o===n&&i===n){if(r===!0)return r;r=n}return r=r===n?"w":r,o=o===n?"h":o,t===n||(e[r]!==t[r]||e[o]!==t[o])}function _e(e,t){return t===n||(e.t!==t.t||e.r!==t.r||e.b!==t.b||e.l!==t.l)}function be(e){return c.type(e)}function we(){return c.extend.apply(this,arguments)}function xe(e,t){return c.prototype.addClass.call(e,t)}function Se(e,t){return c.prototype.removeClass.call(e,t)}function ke(e){return c.prototype.remove.call(e)}function je(e,n){nt=p.defaultOptions,Le=p.nativeScrollbarStyling,Ie=we(!0,{},p.nativeScrollbarSize),Ce=we(!0,{},p.nativeScrollbarIsOverlaid),Pe=we(!0,{},p.overlayScrollbarDummySize),Ae=we(!0,{},p.rtlScrollBehavior),Q(we(!0,{},nt,n));var r=ot.callbacks;if(Ce.x&&Ce.x&&!ot.nativeScrollbarsOverlaid.initialize)return oe(r.onInitializationWithdrawn),!1;Me=p.cssCalc,Te=p.msie,Oe=p.autoUpdateRecommended,De=p.supportTransition,Ne=p.supportTransform,$e=p.supportPassiveEvents,Re=p.supportResizeObserver,xn=p.supportMutationObserver,He=p.restrictedMeasuring,lt=c(e.ownerDocument),at=c(lt[0].defaultView||lt[0].parentWindow),ct=de(lt,"html"),ut=de(ct,"body"),ft=c(e),qe=ft.is("textarea"),ze=ft.is("body"),Ue=lt[0]!==t;var o;if(ze&&(o={},o.l=Math.max(ft[gr](),ct[gr](),at[gr]()),o.t=Math.max(ft[vr](),ct[vr](),at[vr]())),qe){ft.wrap(he(Tr)),xe(ft,Br+pr+eo),pt=ft.parent();var a={};ot.sizeAutoCapable||(a[nr]=ft.css(nr),a[rr]=ft.css(rr)),pt.css(a).wrapInner(he(Vr+pr+eo)).wrapInner(he(Ur+pr+eo)).wrapInner(he(zr+pr+eo)),_t=de(pt,fr+Vr),vt=de(pt,fr+Ur),gt=de(pt,fr+zr),bt=c(he(qr)),_t.prepend(bt),ft.on(ar,D).on("drop",L).on("focus",M).on("focusout",I),Te>9||!Oe?ft.on("input",A):ft.on(Sr,O).on(kr,T)}else xe(ft,Or),pt=ft,pt.wrapInner(he(Vr)).wrapInner(he(Ur)).wrapInner(he(zr)),_t=de(pt,fr+Vr),vt=de(pt,fr+Ur),gt=de(pt,fr+zr),_t.on(Er,function(e){Kt!==!0&&(e=e.originalEvent||e,G(e.propertyName)&&K(sr))});if(Y(),$e?h(vt,ar,C):vt.on(ar,C),Le&&xe(vt,Ce.x&&Ce.y?Gr:Wr),xn){var l,u,f,d,m,g,y=s.mO(),_=s.now();_n=new y(function(e){if(Fe&&!et){var t,n=!1;c.each(e,function(){if(t=this,l=t.target,u=t.attributeName,n=u===i.c?q(t.oldValue,l.className):u!==i.s||t.oldValue!==l.style.cssText)return!1}),n&&Hn.update(sr)}}),bn=new y(function(e){if(Fe&&!et){var t,n=!1;c.each(e,function(){return t=this,n=z(t),!n}),n&&(d=s.now(),m=It||Mt,g=function(){Be||(_=d,qe&&V(),m?Hn.update():Hn.update(sr))},clearTimeout(f),wo<=0||d-_>wo||!m?g():f=setTimeout(g,wo))}})}return ze&&(xe(ct,Ar),vt[gr](o.l),vt[vr](o.t)),ht=c(he("os-resize-observer-host")),pt.prepend(ht),v(ht,S),S(),Hn.update(sr),setTimeout(function(){De&&!Be&&xe(pt,Ir)},333),Fe=!0,oe(r.onInitialized),Fe}if(se(u)){if(l.has(u)){var Ee=l.get(u);return Ee.options(f),Ee}var Ce,Pe,Ae,Oe,Te,Le,Me,Ie,De,Ne,$e,Re,He,Fe,Be,qe,ze,Ue,We,Ge,Ve,Ke,Qe,Ye,Je,Xe,Ze,et,tt,nt,rt,ot,it,st,at,lt,ct,ut,ft,pt,dt,ht,mt,gt,vt,yt,_t,bt,wt,xt,St,kt,jt,Et,Ct,Pt,At,Ot,Tt,Lt,Mt,It,Dt,Nt,$t,Rt,Ht,Ft,Bt,qt,zt,Ut,Wt,Gt,Vt,Kt,Qt,Yt,Jt,Xt,Zt,en,tn,nn,rn,on,sn,an,ln,cn,un,fn,pn,dn,hn,mn,gn,vn,yn,_n,bn,wn,xn,Sn,kn,jn,En,Cn,Pn,An,On,Tn,Ln,Mn,In,Dn,Nn,$n,Rn,Hn=new e[r],Fn={},Bn={},qn={},zn={},Un={},Wn=175,Gn="-hidden",Vn="margin-",Kn="padding-",Qn="border-",Yn="top",Jn="right",Xn="bottom",Zn="left",er="min-",tr="max-",nr="width",rr="height",or="float",ir="",sr="auto",ar="scroll",lr="100%",cr="x",ur="y",fr=".",pr=" ",dr="scrollbar",hr="-horizontal",mr="-vertical",gr=ar+"Left",vr=ar+"Top",yr="mousedown touchstart",_r="mouseup touchend touchcancel",br="mousemove touchmove",wr="mouseenter",xr="mouseleave",Sr="keydown",kr="keyup",jr="selectstart",Er="transitionend webkitTransitionEnd oTransitionEnd",Cr="__overlayScrollbarsRO__",Pr="os-",Ar=Pr+"html",Or=Pr+"host",Tr=Or+"-textarea",Lr=Or+"-"+dr+hr+Gn,Mr=Or+"-"+dr+mr+Gn,Ir=Or+"-transition",Dr=Or+"-rtl",Nr=Or+"-resize-disabled",$r=Or+"-scrolling",Rr=Or+"-overflow",Hr=Rr+"-x",Fr=Rr+"-y",Br=Pr+"textarea",qr=Br+"-cover",zr=Pr+"padding",Ur=Pr+"viewport",Wr=Ur+"-native-scrollbars-invisible",Gr=Ur+"-native-scrollbars-overlaid",Vr=Pr+"content",Kr=Pr+"content-arrange",Qr=Pr+"content-glue",Yr=Pr+"size-auto-observer",Jr=Pr+"resize-observer",Xr=Pr+"resize-observer-item",Zr=Xr+"-final",eo=Pr+"text-inherit",to=Pr+dr,no=to+"-track",ro=no+"-off",oo=to+"-handle",io=oo+"-off",so=to+"-unusable",ao=to+"-"+sr+Gn,lo=to+"-corner",co=lo+"-resize",uo=co+"-both",fo=co+hr,po=co+mr,ho=to+hr,mo=to+mr,go=Pr+"dragging",vo=Pr+"theme-none",yo={},_o=33,bo=[],wo=11,xo=[112,113,114,115,116,117,118,119,120,121,123,33,34,37,38,39,40,16,17,18,19,20,144],So=[],ko={},jo={};return Hn.sleep=function(){et=!0},Hn.update=function(e){var t,n,r="zoom"===e,o="img",i="load";e===sr?(t=W(),n=U(),(t||n)&&K(!1,n)):r?K(!0,!0):(e=et||e,et=!1,K(!1,!1,e)),qe||r||_t.find(o).each(function(e,t){var n=s.inA(t,bo);n===-1&&(t=c(t),t.off(i,F).on(i,F))})},Hn.options=function(e,t){if(c.isEmptyObject(e)||!c.isPlainObject(e)){if(be(e)===o.s){if(arguments.length>=2){var n={};return ge(n,e,t),Q(n),void K()}return me(rt,e)}return rt}Q(e);var r=et||!1;et=!1,K(),et=r},Hn.destroy=function(){Be=!0,d.remove(Hn),x(),y(ht),Ge&&y(dt),ke(ht),mt!==n&&ke(mt),yt!==n&&ke(yt),Ge&&ke(dt),$e?(m(pt,br,E),m(pt,wr,k),m(pt,xr,j)):pt.off(br,E).off(wr,k).off(xr,j),ke(xt),ke(jt),wt&&ke(wt),Dn||R(),_t.contents().unwrap().unwrap().unwrap(),ze&&Se(ct,Ar),qe?(ft.off(ar,D).off("drop",L).off("focus",M).off("focusout",I),Te>9||!Oe?ft.off("input",A):ft.off(Sr,O).off(kr,T),ke(bt),Se(ft,Br+pr+eo).unwrap().removeAttr(i.s),ke(pt)):(Se(ft,Or),Se(pt,[Or,Nr,Dr,Lr,Mr,Ir,$r,Rr,Hr,Fr,vo,hn].join(pr)));for(var e=0;e<bo.length;e++)c(bo[e]).off("load",F);bo=n,l.rem(u),oe(ot.callbacks.onDestroyed);for(var t in Hn)delete Hn[t];Hn=n},Hn.scroll=function(t,r,s,l){if(0===arguments.length||t===n){var u=Bn,f=qn,p=dn&&Ze&&Ae.i,d=dn&&Ze&&Ae.n,h=u.cs,m=u.csr,g=u.ms;return m=p?1-m:m,h=p?g-h:h,h*=d?-1:1,g*=d?-1:1,{x:{position:h,ratio:m,max:g,handleOffset:u.ho,handleLength:u.hl,handleLengthRatio:u.hlr,trackLength:u.tl,isRTL:Ze,isRTLNormalized:dn},y:{position:f.cs,ratio:f.csr,max:f.ms,handleOffset:f.ho,handleLength:f.hl,handleLengthRatio:f.hlr,trackLength:f.tl}}}var v,y=[cr,Zn,"l"],_=[ur,Yn,"t"],b=["+=","-=","*=","/="],w={},x=be(r)===o.o,S="end",k="begin",j="center",E="nearest",C={axis:"xy",block:[k,k],margin:[0,0,0,0]},P=[cr,ur,"xy","yx"],A=[k,S,j,E],O=t.hasOwnProperty("el"),T=O?t.el:t,L=!!(T instanceof c||a)&&T instanceof a,M=!L&&se(T),I=function(e,t){for(v=0;v<t.length;v++)if(e===t[v])return!0;return!1},D=function(e){var t={};if(be(e)===o.a&&e.length>0)t.x=e[0],t.y=e[1];else if(be(e)===o.s||be(e)===o.n)t.x=e,t.y=e;else if(be(e)===o.o){e=we({},e),v=0;for(var n in e)e.hasOwnProperty(n)&&(v>2&&delete e[n],v++);var r=function(t){var n=t?y:_;for(v=0;v<n.length;v++)if(n[v]in e)return e[n[v]]};t.x=r(!0),t.y=r(!1)}return t},N=function(t,r){var i,s,a,l=t?Bn:qn,c=l.cs,u=l.ms,f=" * ",p=Ze&&t,d=p&&Ae.n&&!dn,h="replace";if(be(r)===o.s){if(r.length>2){var m=r.substr(0,2);for(v=0;v<b.length;v++)if(m===b[v]){i=b[v];break}}r=i!==n?r.substr(2):r,r=r[h](/min/g,0),r=r[h](/</g,0),r=r[h](/max/g,(d?"-":ir)+lr),r=r[h](/>/g,(d?"-":ir)+lr),r=r[h](/px/g,ir),r=r[h](/%/g,f+u*(p&&Ae.n?-1:1)/100),r=r[h](/vw/g,f+zn.w),r=r[h](/vh/g,f+zn.h),s=le(e.parseFloat(e.eval(r)).toFixed())}else be(r)===o.n&&(s=r);if(!isNaN(s)&&s!==n&&be(s)===o.n){var g=dn&&p,y=c*(g&&Ae.n?-1:1),_=g&&Ae.i,w=g&&Ae.n;switch(y=_?u-y:y,i){case"+=":a=y+s;break;case"-=":a=y-s;break;case"*=":a=y*s;break;case"/=":a=y/s;break;default:a=s}_&&(a=u-a),w&&(a*=-1),p&&Ae.n?(a=Math.max(u,a),a=Math.min(0,a)):(a=Math.min(u,a),a=Math.max(0,a)),a===c&&(a=n)}return a};if(L||M){var $=L?T:c(T);if(0===$.length)return;if(O){var R,H,F,B=t.axis,q=t.block,z=be(q),U=t.margin,W=be(U);if(z===o.s)q=[q,q];else if(z===o.a)if(H=q.length,H>2||H<1)q=n;else{for(R=!0,1===H&&(q[1]=k),v=0;v<H;v++){var G=q[v];if(be(G)!==o.s||!I(G,A)){R=!1;break}}R||(q=n)}else q=n;if(W===o.n)U=[U,U,U,U];else if(W===o.b)U=U?[le($.css(Vn+Yn)),le($.css(Vn+Jn)),le($.css(Vn+Xn)),le($.css(Vn+Zn))]:[0,0,0,0];else if(W===o.a)if(F=U.length,2!==F&&4!==F)U=n;else{for(R=!0,v=0;v<F;v++)if(be(U[v])!==o.n){R=!1;break}R?2===F&&(U=[U[0],U[1],U[0],U[1]]):U=n}else U=n;C.axis=I(B,P)?B:C.axis,C.block=q||C.block,C.margin=U||C.margin}var V=$.offset(),K=gt.offset(),Q={l:Bn.cs,t:qn.cs},Y=C.axis,J=C.block,X=C.margin,Z={x:J[0]===(Ze?k:S),y:J[1]===S},ee={x:J[0]===j,y:J[1]===j},te={x:J[0]===E,y:J[1]===E},ne={},oe=Z.x||Z.y||ee.x||ee.y||te.x||te.y;V.top-=X[0],V.left-=X[3];var ie={
|
13 |
x:Math.round(V.left-K.left+Q.l),y:Math.round(V.top-K.top+Q.t)};if(Ze&&(Ae.n||Ae.i||(ie.x=Math.round(K.left-V.left+Q.l)),Ae.n&&dn&&(ie.x*=-1),Ae.i&&dn&&(ie.x=Math.round(K.left-V.left+(Bn.ms-Q.l)))),oe){var ae,ce={};Ne?(ae=$[0].getBoundingClientRect(),ce={w:ae[nr],h:ae[rr]}):ce={w:$[0][i.oW],h:$[0][i.oH]};var ue={w:ce.w+X[3]+X[1],h:ce.h+X[0]+X[2]},fe=function(e){var t=re(e),n=t._wh,r=t.lt,o=t.xy,i=ee[o]?2:1,s=V[r]+ue[n]/2,a=K[r]+zn[n]/2;te[o]&&(ne[o]=ue[n]<=zn[n]&&V[r]>=K[r]&&V[r]+ue[n]<=K[r]+zn[n],Z[o]=ue[n]<zn[n]?s>a:s<a),(Z[o]||ee[o])&&(ie[o]-=(zn[n]/i-ue[n]/i)*(e&&Ze&&dn?-1:1))};fe(!0),fe(!1)}(Y===cr||ne.y)&&delete ie.y,(Y===ur||ne.x)&&delete ie.x,t=ie}w.x=N(!0,D(t).x),w.y=N(!1,D(t).y);var pe=w.x!==n,de=w.y!==n;if(r>0||x){var he={};if(pe&&(he[gr]=w.x),de&&(he[vr]=w.y),x)vt.animate(he,r);else{var me={duration:r,complete:l};if(be(s)===o.a){var ge={};ge[gr]=s[0],ge[vr]=s[1],me.specialEasing=ge}else me.easing=s;vt.animate(he,me)}}else pe&&vt[gr](w.x),de&&vt[vr](w.y)},Hn.scrollStop=function(e,t,n){vt.stop(e,t,n)},Hn.getElements=function(){return{target:ft[0],host:pt[0],padding:gt[0],viewport:vt[0],content:_t[0],scrollbarHorizontal:{scrollbar:xt[0],track:St[0],handle:kt[0]},scrollbarVertical:{scrollbar:jt[0],track:Et[0],handle:Ct[0]},scrollbarCorner:wt}},Hn.getState=function(e){var t=function(e){if(!c.isPlainObject(e))return e;var t=we(!0,{},e),n=function(e,n){t.hasOwnProperty(e)&&(t[n]=t[e],delete t[e])};return n("w",nr),n("h",rr),delete t.c,t},n={sleeping:t(et)||!1,autoUpdate:t(!wn),widthAuto:t(Mt),heightAuto:t(It),padding:t($t),overflowAmount:t(Gt),hideOverflow:t(Lt),hasOverflow:t(Tt),contentScrollSize:t(At),viewportSize:t(zn),hostSize:t(Pt),documentMixed:t(Ue)};return be(e)===o.s?me(n,e):n},je(u,f)?(l.add(u,Hn),Hn):void(Hn=n)}}var h,m,g=function(){var e=[o.b,o.n,o.s,o.a,o.o,o.f,o.z],t=" ",n=":",r=[o.z,o.s],i=o.b,s=o.n,a=[o.z,i],l=[o.z,o.f],u="n:none b:both h:horizontal v:vertical",f="v-h:visible-hidden v-s:visible-scroll s:scroll h:hidden",p="v:visible h:hidden a:auto",d="n:never s:scroll l:leave m:move",h={className:["os-theme-dark",r],resize:["none",u],sizeAutoCapable:[!0,i],clipAlways:[!0,i],normalizeRTL:[!0,i],paddingAbsolute:[!1,i],autoUpdate:[null,a],autoUpdateInterval:[33,s],nativeScrollbarsOverlaid:{showNativeScrollbars:[!1,i],initialize:[!0,i]},overflowBehavior:{x:["scroll",f],y:["scroll",f]},scrollbars:{visibility:["auto",p],autoHide:["never",d],autoHideDelay:[800,s],dragScrolling:[!0,i],clickScrolling:[!1,i],touchSupport:[!0,i]},textarea:{dynWidth:[!1,i],dynHeight:[!1,i]},callbacks:{onInitialized:[null,l],onInitializationWithdrawn:[null,l],onDestroyed:[null,l],onScrollStart:[null,l],onScroll:[null,l],onScrollStop:[null,l],onOverflowChanged:[null,l],onOverflowAmountChanged:[null,l],onDirectionChanged:[null,l],onContentSizeChanged:[null,l],onHostSizeChanged:[null,l],onUpdated:[null,l]}},m=function(e){var t=function(n){var r,i,s;for(r in n)n.hasOwnProperty(r)&&(i=n[r],s=c.type(i),s===o.a?n[r]=i[e?1:0]:s===o.o&&(n[r]=t(i)));return n};return t(c.extend(!0,{},h))};return{d:m(),t:m(!0),v:function(r,i,s,a,l){var u={},f=c.extend(!0,{},r),p=function(r,i,l,u){for(var f in i)if(i.hasOwnProperty(f)&&r.hasOwnProperty(f)){var d,h,m,g,v,y,_,b,w=!1,x=i[f],S=c.type(x),k=c.type(x)!==o.a?[x]:x,j=r[f],E=c.type(j),C=u?u+".":"",P='The option "'+C+f+"\" wasn't set, because",A=[],O=[];if(S===o.o)l[f]={},p(j,x,l[f],C+f),c.isEmptyObject(j)&&delete r[f];else{for(y=0;y<k.length;y++)if(v=k[y],S=c.type(v),m=S===o.s&&c.inArray(v,e)===-1)for(A.push(o.s),d=v.split(t),O=O.concat(d),_=0;_<d.length;_++){for(h=d[_].split(n),g=h[0],b=0;b<h.length;b++)if(j===h[b]){w=!0;break}if(w)break}else if(A.push(v),E===v){w=!0;break}w?l[f]=m&&a?g:j:s&&console.warn(P+" it doesn't accept the type [ "+E.toUpperCase()+' ] with the value of "'+j+'".\r\nAccepted types are: [ '+A.join(", ").toUpperCase()+" ]."+(O.length>0?"\r\nValid strings are: [ "+O.join(", ").split(n).join(", ")+" ].":"")),delete r[f]}}};return p(f,i,u),l?c.extend(!0,u,f):!c.isEmptyObject(f)&&s&&console.warn("The following options are discarded due to invalidity:\r\n"+JSON.stringify(f,null,2)),u}}}();return e[r]=function(t,o){if(0===arguments.length)return this;u();var i,s,a=[];return c.isPlainObject(o)?t&&t.length?(c.each(t,function(){i=this,i!==n&&a.push(d(i,o,h,m))}),s=a.length>1?a:a[0]):s=d(t,o,h,m):t&&(t.length&&t.length>0?(c.each(t,function(){i=l.get(this),"!"===o?i instanceof e[r]&&a.push(i):a.push(i)}),s=a.length>1?a:a[0]):s=l.get(t)),s},e[r].globals=function(){u();var e=c.extend(!0,{},h);return delete e.msie,e},e[r].defaultOptions=function(e){u();var t=h.defaultOptions;return e===n?c.extend(!0,{},t):void(h.defaultOptions=c.extend(!0,{},t,g.v(e,g.t,!0)))},e[r]}(s,c,l);return a&&a.fn&&(a.fn.overlayScrollbars=function(e){var t=this;return a.isPlainObject(e)?(a.each(t,function(){u(this,e)}),t):u(t,e)}),u})},{}],379:[function(e,t,n){(function(e){function t(e,t){for(var n=0,r=e.length-1;r>=0;r--){var o=e[r];"."===o?e.splice(r,1):".."===o?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n--;n)e.unshift("..");return e}function r(e,t){if(e.filter)return e.filter(t);for(var n=[],r=0;r<e.length;r++)t(e[r],r,e)&&n.push(e[r]);return n}var o=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,i=function(e){return o.exec(e).slice(1)};n.resolve=function(){for(var n="",o=!1,i=arguments.length-1;i>=-1&&!o;i--){var s=i>=0?arguments[i]:e.cwd();if("string"!=typeof s)throw new TypeError("Arguments to path.resolve must be strings");s&&(n=s+"/"+n,o="/"===s.charAt(0))}return n=t(r(n.split("/"),function(e){return!!e}),!o).join("/"),(o?"/":"")+n||"."},n.normalize=function(e){var o=n.isAbsolute(e),i="/"===s(e,-1);return e=t(r(e.split("/"),function(e){return!!e}),!o).join("/"),e||o||(e="."),e&&i&&(e+="/"),(o?"/":"")+e},n.isAbsolute=function(e){return"/"===e.charAt(0)},n.join=function(){var e=Array.prototype.slice.call(arguments,0);return n.normalize(r(e,function(e,t){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e}).join("/"))},n.relative=function(e,t){function r(e){for(var t=0;t<e.length&&""===e[t];t++);for(var n=e.length-1;n>=0&&""===e[n];n--);return t>n?[]:e.slice(t,n-t+1)}e=n.resolve(e).substr(1),t=n.resolve(t).substr(1);for(var o=r(e.split("/")),i=r(t.split("/")),s=Math.min(o.length,i.length),a=s,l=0;l<s;l++)if(o[l]!==i[l]){a=l;break}for(var c=[],l=a;l<o.length;l++)c.push("..");return c=c.concat(i.slice(a)),c.join("/")},n.sep="/",n.delimiter=":",n.dirname=function(e){var t=i(e),n=t[0],r=t[1];return n||r?(r&&(r=r.substr(0,r.length-1)),n+r):"."},n.basename=function(e,t){var n=i(e)[2];return t&&n.substr(-1*t.length)===t&&(n=n.substr(0,n.length-t.length)),n},n.extname=function(e){return i(e)[3]};var s="b"==="ab".substr(-1)?function(e,t,n){return e.substr(t,n)}:function(e,t,n){return t<0&&(t=e.length+t),e.substr(t,n)}}).call(this,e("_process"))},{_process:380}],380:[function(e,t,n){function r(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function i(e){if(f===setTimeout)return setTimeout(e,0);if((f===r||!f)&&setTimeout)return f=setTimeout,setTimeout(e,0);try{return f(e,0)}catch(t){try{return f.call(null,e,0)}catch(t){return f.call(this,e,0)}}}function s(e){if(p===clearTimeout)return clearTimeout(e);if((p===o||!p)&&clearTimeout)return p=clearTimeout,clearTimeout(e);try{return p(e)}catch(t){try{return p.call(null,e)}catch(t){return p.call(this,e)}}}function a(){g&&h&&(g=!1,h.length?m=h.concat(m):v=-1,m.length&&l())}function l(){if(!g){var e=i(a);g=!0;for(var t=m.length;t;){for(h=m,m=[];++v<t;)h&&h[v].run();v=-1,t=m.length}h=null,g=!1,s(e)}}function c(e,t){this.fun=e,this.array=t}function u(){}var f,p,d=t.exports={};!function(){try{f="function"==typeof setTimeout?setTimeout:r}catch(e){f=r}try{p="function"==typeof clearTimeout?clearTimeout:o}catch(e){p=o}}();var h,m=[],g=!1,v=-1;d.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];m.push(new c(e,t)),1!==m.length||g||i(l)},c.prototype.run=function(){this.fun.apply(null,this.array)},d.title="browser",d.browser=!0,d.env={},d.argv=[],d.version="",d.versions={},d.on=u,d.addListener=u,d.once=u,d.off=u,d.removeListener=u,d.removeAllListeners=u,d.emit=u,d.prependListener=u,d.prependOnceListener=u,d.listeners=function(e){return[]},d.binding=function(e){throw new Error("process.binding is not supported")},d.cwd=function(){return"/"},d.chdir=function(e){throw new Error("process.chdir is not supported")},d.umask=function(){return 0}},{}],381:[function(e,t,n){"use strict";function r(e){return"/"===e.charAt(0)}function o(e,t){for(var n=t,r=n+1,o=e.length;r<o;n+=1,r+=1)e[n]=e[r];e.pop()}function i(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=e&&e.split("/")||[],i=t&&t.split("/")||[],s=e&&r(e),a=t&&r(t),l=s||a;if(e&&r(e)?i=n:n.length&&(i.pop(),i=i.concat(n)),!i.length)return"/";var c=void 0;if(i.length){var u=i[i.length-1];c="."===u||".."===u||""===u}else c=!1;for(var f=0,p=i.length;p>=0;p--){var d=i[p];"."===d?o(i,p):".."===d?(o(i,p),f++):f&&(o(i,p),f--)}if(!l)for(;f--;f)i.unshift("..");!l||""===i[0]||i[0]&&r(i[0])||i.unshift("");var h=i.join("/");return c&&"/"!==h.substr(-1)&&(h+="/"),h}n.__esModule=!0,n["default"]=i,t.exports=n["default"]},{}],382:[function(e,t,n){!function(n){"function"==typeof define&&define.amd?define(["jquery"],n):"object"==typeof t&&t.exports?t.exports=function(t,r){return void 0===r&&(r="undefined"!=typeof window?e("jquery"):e("jquery")(t)),n(r),r}:n(jQuery)}(function(e){var t=function(){if(e&&e.fn&&e.fn.select2&&e.fn.select2.amd)var t=e.fn.select2.amd;var t;return function(){if(!t||!t.requirejs){t?n=t:t={};var e,n,r;!function(t){function o(e,t){return w.call(e,t)}function i(e,t){var n,r,o,i,s,a,l,c,u,f,p,d,h=t&&t.split("/"),m=_.map,g=m&&m["*"]||{};if(e){for(e=e.split("/"),s=e.length-1,_.nodeIdCompat&&S.test(e[s])&&(e[s]=e[s].replace(S,"")),"."===e[0].charAt(0)&&h&&(d=h.slice(0,h.length-1),e=d.concat(e)),u=0;u<e.length;u++)if(p=e[u],"."===p)e.splice(u,1),u-=1;else if(".."===p){if(0===u||1===u&&".."===e[2]||".."===e[u-1])continue;u>0&&(e.splice(u-1,2),u-=2)}e=e.join("/")}if((h||g)&&m){for(n=e.split("/"),u=n.length;u>0;u-=1){if(r=n.slice(0,u).join("/"),h)for(f=h.length;f>0;f-=1)if(o=m[h.slice(0,f).join("/")],o&&(o=o[r])){i=o,a=u;break}if(i)break;!l&&g&&g[r]&&(l=g[r],c=u)}!i&&l&&(i=l,a=c),i&&(n.splice(0,a,i),e=n.join("/"))}return e}function s(e,n){return function(){var r=x.call(arguments,0);return"string"!=typeof r[0]&&1===r.length&&r.push(null),h.apply(t,r.concat([e,n]))}}function a(e){return function(t){return i(t,e)}}function l(e){return function(t){v[e]=t}}function c(e){if(o(y,e)){var n=y[e];delete y[e],b[e]=!0,d.apply(t,n)}if(!o(v,e)&&!o(b,e))throw new Error("No "+e);return v[e]}function u(e){var t,n=e?e.indexOf("!"):-1;return n>-1&&(t=e.substring(0,n),e=e.substring(n+1,e.length)),[t,e]}function f(e){return e?u(e):[]}function p(e){return function(){return _&&_.config&&_.config[e]||{}}}var d,h,m,g,v={},y={},_={},b={},w=Object.prototype.hasOwnProperty,x=[].slice,S=/\.js$/;m=function(e,t){var n,r=u(e),o=r[0],s=t[1];return e=r[1],o&&(o=i(o,s),n=c(o)),o?e=n&&n.normalize?n.normalize(e,a(s)):i(e,s):(e=i(e,s),r=u(e),o=r[0],e=r[1],o&&(n=c(o))),{f:o?o+"!"+e:e,n:e,pr:o,p:n}},g={require:function(e){return s(e)},exports:function(e){var t=v[e];return"undefined"!=typeof t?t:v[e]={}},module:function(e){return{id:e,uri:"",exports:v[e],config:p(e)}}},d=function(e,n,r,i){var a,u,p,d,h,_,w,x=[],S=typeof r;if(i=i||e,_=f(i),"undefined"===S||"function"===S){for(n=!n.length&&r.length?["require","exports","module"]:n,h=0;h<n.length;h+=1)if(d=m(n[h],_),u=d.f,"require"===u)x[h]=g.require(e);else if("exports"===u)x[h]=g.exports(e),w=!0;else if("module"===u)a=x[h]=g.module(e);else if(o(v,u)||o(y,u)||o(b,u))x[h]=c(u);else{if(!d.p)throw new Error(e+" missing "+u);d.p.load(d.n,s(i,!0),l(u),{}),x[h]=v[u]}p=r?r.apply(v[e],x):void 0,e&&(a&&a.exports!==t&&a.exports!==v[e]?v[e]=a.exports:p===t&&w||(v[e]=p))}else e&&(v[e]=r)},e=n=h=function(e,n,r,o,i){if("string"==typeof e)return g[e]?g[e](n):c(m(e,f(n)).f);if(!e.splice){if(_=e,_.deps&&h(_.deps,_.callback),!n)return;n.splice?(e=n,n=r,r=null):e=t}return n=n||function(){},"function"==typeof r&&(r=o,o=i),o?d(t,e,n,r):setTimeout(function(){d(t,e,n,r)},4),h},h.config=function(e){return h(e)},e._defined=v,r=function(e,t,n){if("string"!=typeof e)throw new Error("See almond README: incorrect module build, no module name");t.splice||(n=t,t=[]),o(v,e)||o(y,e)||(y[e]=[e,t,n])},r.amd={jQuery:!0}}(),t.requirejs=e,t.require=n,t.define=r}}(),t.define("almond",function(){}),t.define("jquery",[],function(){var t=e||$;return null==t&&console&&console.error&&console.error("Select2: An instance of jQuery or a jQuery-compatible library was not found. Make sure that you are including jQuery before Select2 on your web page."),t}),t.define("select2/utils",["jquery"],function(e){function t(e){var t=e.prototype,n=[];for(var r in t){var o=t[r];"function"==typeof o&&"constructor"!==r&&n.push(r)}return n}var n={};n.Extend=function(e,t){function n(){this.constructor=e}var r={}.hasOwnProperty;for(var o in t)r.call(t,o)&&(e[o]=t[o]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e},n.Decorate=function(e,n){function r(){var t=Array.prototype.unshift,r=n.prototype.constructor.length,o=e.prototype.constructor;r>0&&(t.call(arguments,e.prototype.constructor),o=n.prototype.constructor),o.apply(this,arguments)}function o(){this.constructor=r}var i=t(n),s=t(e);n.displayName=e.displayName,r.prototype=new o;for(var a=0;a<s.length;a++){var l=s[a];r.prototype[l]=e.prototype[l]}for(var c=(function(e){var t=function(){};e in r.prototype&&(t=r.prototype[e]);var o=n.prototype[e];return function(){var e=Array.prototype.unshift;return e.call(arguments,t),o.apply(this,arguments)}}),u=0;u<i.length;u++){var f=i[u];r.prototype[f]=c(f)}return r};var r=function(){this.listeners={}};r.prototype.on=function(e,t){this.listeners=this.listeners||{},e in this.listeners?this.listeners[e].push(t):this.listeners[e]=[t]},r.prototype.trigger=function(e){var t=Array.prototype.slice,n=t.call(arguments,1);this.listeners=this.listeners||{},null==n&&(n=[]),0===n.length&&n.push({}),n[0]._type=e,e in this.listeners&&this.invoke(this.listeners[e],t.call(arguments,1)),"*"in this.listeners&&this.invoke(this.listeners["*"],arguments)},r.prototype.invoke=function(e,t){for(var n=0,r=e.length;n<r;n++)e[n].apply(this,t)},n.Observable=r,n.generateChars=function(e){for(var t="",n=0;n<e;n++){var r=Math.floor(36*Math.random());t+=r.toString(36)}return t},n.bind=function(e,t){return function(){e.apply(t,arguments)}},n._convertData=function(e){for(var t in e){var n=t.split("-"),r=e;if(1!==n.length){for(var o=0;o<n.length;o++){var i=n[o];i=i.substring(0,1).toLowerCase()+i.substring(1),i in r||(r[i]={}),o==n.length-1&&(r[i]=e[t]),r=r[i]}delete e[t]}}return e},n.hasScroll=function(t,n){var r=e(n),o=n.style.overflowX,i=n.style.overflowY;return(o!==i||"hidden"!==i&&"visible"!==i)&&("scroll"===o||"scroll"===i||(r.innerHeight()<n.scrollHeight||r.innerWidth()<n.scrollWidth))},n.escapeMarkup=function(e){var t={"\\":"\","&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};return"string"!=typeof e?e:String(e).replace(/[&<>"'\/\\]/g,function(e){return t[e]})},n.appendMany=function(t,n){if("1.7"===e.fn.jquery.substr(0,3)){var r=e();e.map(n,function(e){r=r.add(e)}),n=r}t.append(n)},n.__cache={};var o=0;return n.GetUniqueElementId=function(e){var t=e.getAttribute("data-select2-id");return null==t&&(e.id?(t=e.id,e.setAttribute("data-select2-id",t)):(e.setAttribute("data-select2-id",++o),t=o.toString())),t},n.StoreData=function(e,t,r){var o=n.GetUniqueElementId(e);n.__cache[o]||(n.__cache[o]={}),n.__cache[o][t]=r},n.GetData=function(t,r){var o=n.GetUniqueElementId(t);return r?n.__cache[o]&&null!=n.__cache[o][r]?n.__cache[o][r]:e(t).data(r):n.__cache[o]},n.RemoveData=function(e){var t=n.GetUniqueElementId(e);null!=n.__cache[t]&&delete n.__cache[t]},n}),t.define("select2/results",["jquery","./utils"],function(e,t){function n(e,t,r){this.$element=e,this.data=r,this.options=t,n.__super__.constructor.call(this)}return t.Extend(n,t.Observable),n.prototype.render=function(){var t=e('<ul class="select2-results__options" role="tree"></ul>');return this.options.get("multiple")&&t.attr("aria-multiselectable","true"),this.$results=t,t},n.prototype.clear=function(){this.$results.empty()},n.prototype.displayMessage=function(t){var n=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var r=e('<li role="treeitem" aria-live="assertive" class="select2-results__option"></li>'),o=this.options.get("translations").get(t.message);r.append(n(o(t.args))),r[0].className+=" select2-results__message",this.$results.append(r)},n.prototype.hideMessages=function(){this.$results.find(".select2-results__message").remove()},n.prototype.append=function(e){this.hideLoading();var t=[];if(null==e.results||0===e.results.length)return void(0===this.$results.children().length&&this.trigger("results:message",{message:"noResults"}));e.results=this.sort(e.results);for(var n=0;n<e.results.length;n++){var r=e.results[n],o=this.option(r);t.push(o)}this.$results.append(t)},n.prototype.position=function(e,t){var n=t.find(".select2-results");n.append(e)},n.prototype.sort=function(e){var t=this.options.get("sorter");return t(e)},n.prototype.highlightFirstItem=function(){var e=this.$results.find(".select2-results__option[aria-selected]"),t=e.filter("[aria-selected=true]");t.length>0?t.first().trigger("mouseenter"):e.first().trigger("mouseenter"),this.ensureHighlightVisible()},n.prototype.setClasses=function(){var n=this;this.data.current(function(r){var o=e.map(r,function(e){return e.id.toString()}),i=n.$results.find(".select2-results__option[aria-selected]");i.each(function(){var n=e(this),r=t.GetData(this,"data"),i=""+r.id;null!=r.element&&r.element.selected||null==r.element&&e.inArray(i,o)>-1?n.attr("aria-selected","true"):n.attr("aria-selected","false")})})},n.prototype.showLoading=function(e){this.hideLoading();var t=this.options.get("translations").get("searching"),n={disabled:!0,loading:!0,text:t(e)},r=this.option(n);r.className+=" loading-results",this.$results.prepend(r)},n.prototype.hideLoading=function(){this.$results.find(".loading-results").remove()},n.prototype.option=function(n){var r=document.createElement("li");r.className="select2-results__option";var o={role:"treeitem","aria-selected":"false"};n.disabled&&(delete o["aria-selected"],o["aria-disabled"]="true"),null==n.id&&delete o["aria-selected"],null!=n._resultId&&(r.id=n._resultId),n.title&&(r.title=n.title),n.children&&(o.role="group",o["aria-label"]=n.text,delete o["aria-selected"]);for(var i in o){var s=o[i];r.setAttribute(i,s)}if(n.children){var a=e(r),l=document.createElement("strong");l.className="select2-results__group";e(l);this.template(n,l);for(var c=[],u=0;u<n.children.length;u++){var f=n.children[u],p=this.option(f);c.push(p)}var d=e("<ul></ul>",{"class":"select2-results__options select2-results__options--nested"});d.append(c),a.append(l),a.append(d)}else this.template(n,r);return t.StoreData(r,"data",n),r},n.prototype.bind=function(n,r){var o=this,i=n.id+"-results";this.$results.attr("id",i),n.on("results:all",function(e){o.clear(),o.append(e.data),n.isOpen()&&(o.setClasses(),o.highlightFirstItem())}),n.on("results:append",function(e){o.append(e.data),n.isOpen()&&o.setClasses()}),n.on("query",function(e){o.hideMessages(),o.showLoading(e)}),n.on("select",function(){n.isOpen()&&(o.setClasses(),o.highlightFirstItem())}),n.on("unselect",function(){n.isOpen()&&(o.setClasses(),o.highlightFirstItem())}),n.on("open",function(){o.$results.attr("aria-expanded","true"),o.$results.attr("aria-hidden","false"),o.setClasses(),o.ensureHighlightVisible()}),n.on("close",function(){o.$results.attr("aria-expanded","false"),o.$results.attr("aria-hidden","true"),o.$results.removeAttr("aria-activedescendant")}),n.on("results:toggle",function(){var e=o.getHighlightedResults();0!==e.length&&e.trigger("mouseup")}),n.on("results:select",function(){var e=o.getHighlightedResults();if(0!==e.length){var n=t.GetData(e[0],"data");"true"==e.attr("aria-selected")?o.trigger("close",{}):o.trigger("select",{data:n})}}),n.on("results:previous",function(){var e=o.getHighlightedResults(),t=o.$results.find("[aria-selected]"),n=t.index(e);if(!(n<=0)){var r=n-1;0===e.length&&(r=0);var i=t.eq(r);i.trigger("mouseenter");var s=o.$results.offset().top,a=i.offset().top,l=o.$results.scrollTop()+(a-s);0===r?o.$results.scrollTop(0):a-s<0&&o.$results.scrollTop(l)}}),n.on("results:next",function(){var e=o.getHighlightedResults(),t=o.$results.find("[aria-selected]"),n=t.index(e),r=n+1;if(!(r>=t.length)){var i=t.eq(r);i.trigger("mouseenter");var s=o.$results.offset().top+o.$results.outerHeight(!1),a=i.offset().top+i.outerHeight(!1),l=o.$results.scrollTop()+a-s;0===r?o.$results.scrollTop(0):a>s&&o.$results.scrollTop(l)}}),n.on("results:focus",function(e){e.element.addClass("select2-results__option--highlighted")}),n.on("results:message",function(e){o.displayMessage(e)}),e.fn.mousewheel&&this.$results.on("mousewheel",function(e){var t=o.$results.scrollTop(),n=o.$results.get(0).scrollHeight-t+e.deltaY,r=e.deltaY>0&&t-e.deltaY<=0,i=e.deltaY<0&&n<=o.$results.height();r?(o.$results.scrollTop(0),e.preventDefault(),e.stopPropagation()):i&&(o.$results.scrollTop(o.$results.get(0).scrollHeight-o.$results.height()),e.preventDefault(),e.stopPropagation())}),this.$results.on("mouseup",".select2-results__option[aria-selected]",function(n){var r=e(this),i=t.GetData(this,"data");return"true"===r.attr("aria-selected")?void(o.options.get("multiple")?o.trigger("unselect",{originalEvent:n,data:i}):o.trigger("close",{})):void o.trigger("select",{originalEvent:n,data:i})}),this.$results.on("mouseenter",".select2-results__option[aria-selected]",function(n){var r=t.GetData(this,"data");o.getHighlightedResults().removeClass("select2-results__option--highlighted"),o.trigger("results:focus",{data:r,element:e(this)})})},n.prototype.getHighlightedResults=function(){var e=this.$results.find(".select2-results__option--highlighted");return e},n.prototype.destroy=function(){this.$results.remove()},n.prototype.ensureHighlightVisible=function(){var e=this.getHighlightedResults();if(0!==e.length){var t=this.$results.find("[aria-selected]"),n=t.index(e),r=this.$results.offset().top,o=e.offset().top,i=this.$results.scrollTop()+(o-r),s=o-r;i-=2*e.outerHeight(!1),n<=2?this.$results.scrollTop(0):(s>this.$results.outerHeight()||s<0)&&this.$results.scrollTop(i)}},n.prototype.template=function(t,n){var r=this.options.get("templateResult"),o=this.options.get("escapeMarkup"),i=r(t,n);null==i?n.style.display="none":"string"==typeof i?n.innerHTML=o(i):e(n).append(i)},n}),t.define("select2/keys",[],function(){var e={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46};return e}),t.define("select2/selection/base",["jquery","../utils","../keys"],function(e,t,n){function r(e,t){this.$element=e,this.options=t,r.__super__.constructor.call(this)}return t.Extend(r,t.Observable),r.prototype.render=function(){var n=e('<span class="select2-selection" role="combobox" aria-haspopup="true" aria-expanded="false"></span>');return this._tabindex=0,null!=t.GetData(this.$element[0],"old-tabindex")?this._tabindex=t.GetData(this.$element[0],"old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")),n.attr("title",this.$element.attr("title")),n.attr("tabindex",this._tabindex),this.$selection=n,n},r.prototype.bind=function(e,t){var r=this,o=(e.id+"-container",e.id+"-results");this.container=e,this.$selection.on("focus",function(e){r.trigger("focus",e)}),this.$selection.on("blur",function(e){r._handleBlur(e)}),this.$selection.on("keydown",function(e){r.trigger("keypress",e),e.which===n.SPACE&&e.preventDefault()}),e.on("results:focus",function(e){r.$selection.attr("aria-activedescendant",e.data._resultId)}),e.on("selection:update",function(e){r.update(e.data)}),e.on("open",function(){r.$selection.attr("aria-expanded","true"),r.$selection.attr("aria-owns",o),r._attachCloseHandler(e)}),e.on("close",function(){r.$selection.attr("aria-expanded","false"),r.$selection.removeAttr("aria-activedescendant"),r.$selection.removeAttr("aria-owns"),r.$selection.focus(),window.setTimeout(function(){r.$selection.focus()},0),r._detachCloseHandler(e)}),e.on("enable",function(){r.$selection.attr("tabindex",r._tabindex)}),e.on("disable",function(){r.$selection.attr("tabindex","-1")})},r.prototype._handleBlur=function(t){var n=this;window.setTimeout(function(){document.activeElement==n.$selection[0]||e.contains(n.$selection[0],document.activeElement)||n.trigger("blur",t)},1)},r.prototype._attachCloseHandler=function(n){e(document.body).on("mousedown.select2."+n.id,function(n){var r=e(n.target),o=r.closest(".select2"),i=e(".select2.select2-container--open");i.each(function(){e(this);if(this!=o[0]){var n=t.GetData(this,"element");n.select2("close")}})})},r.prototype._detachCloseHandler=function(t){e(document.body).off("mousedown.select2."+t.id)},r.prototype.position=function(e,t){var n=t.find(".selection");n.append(e)},r.prototype.destroy=function(){this._detachCloseHandler(this.container)},r.prototype.update=function(e){throw new Error("The `update` method must be defined in child classes.")},r}),t.define("select2/selection/single",["jquery","./base","../utils","../keys"],function(e,t,n,r){function o(){o.__super__.constructor.apply(this,arguments)}return n.Extend(o,t),o.prototype.render=function(){var e=o.__super__.render.call(this);return e.addClass("select2-selection--single"),e.html('<span class="select2-selection__rendered"></span><span class="select2-selection__arrow" role="presentation"><b role="presentation"></b></span>'),e},o.prototype.bind=function(e,t){var n=this;o.__super__.bind.apply(this,arguments);var r=e.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",r).attr("role","textbox").attr("aria-readonly","true"),this.$selection.attr("aria-labelledby",r),this.$selection.on("mousedown",function(e){1===e.which&&n.trigger("toggle",{originalEvent:e})}),this.$selection.on("focus",function(e){}),this.$selection.on("blur",function(e){}),e.on("focus",function(t){e.isOpen()||n.$selection.focus()})},o.prototype.clear=function(){var e=this.$selection.find(".select2-selection__rendered");e.empty(),e.removeAttr("title")},o.prototype.display=function(e,t){var n=this.options.get("templateSelection"),r=this.options.get("escapeMarkup");return r(n(e,t))},o.prototype.selectionContainer=function(){return e("<span></span>")},o.prototype.update=function(e){if(0===e.length)return void this.clear();var t=e[0],n=this.$selection.find(".select2-selection__rendered"),r=this.display(t,n);n.empty().append(r),n.attr("title",t.title||t.text)},o}),t.define("select2/selection/multiple",["jquery","./base","../utils"],function(e,t,n){function r(e,t){r.__super__.constructor.apply(this,arguments)}return n.Extend(r,t),r.prototype.render=function(){var e=r.__super__.render.call(this);return e.addClass("select2-selection--multiple"),e.html('<ul class="select2-selection__rendered"></ul>'),e},r.prototype.bind=function(t,o){var i=this;r.__super__.bind.apply(this,arguments),this.$selection.on("click",function(e){i.trigger("toggle",{originalEvent:e})}),this.$selection.on("click",".select2-selection__choice__remove",function(t){if(!i.options.get("disabled")){var r=e(this),o=r.parent(),s=n.GetData(o[0],"data");i.trigger("unselect",{originalEvent:t,data:s})}})},r.prototype.clear=function(){var e=this.$selection.find(".select2-selection__rendered");e.empty(),e.removeAttr("title")},r.prototype.display=function(e,t){var n=this.options.get("templateSelection"),r=this.options.get("escapeMarkup");return r(n(e,t))},r.prototype.selectionContainer=function(){var t=e('<li class="select2-selection__choice"><span class="select2-selection__choice__remove" role="presentation">×</span></li>');return t},r.prototype.update=function(e){if(this.clear(),0!==e.length){for(var t=[],r=0;r<e.length;r++){var o=e[r],i=this.selectionContainer(),s=this.display(o,i);i.append(s),i.attr("title",o.title||o.text),n.StoreData(i[0],"data",o),t.push(i)}var a=this.$selection.find(".select2-selection__rendered");n.appendMany(a,t)}},r}),t.define("select2/selection/placeholder",["../utils"],function(e){function t(e,t,n){this.placeholder=this.normalizePlaceholder(n.get("placeholder")),e.call(this,t,n)}return t.prototype.normalizePlaceholder=function(e,t){return"string"==typeof t&&(t={id:"",text:t}),t},t.prototype.createPlaceholder=function(e,t){var n=this.selectionContainer();return n.html(this.display(t)),n.addClass("select2-selection__placeholder").removeClass("select2-selection__choice"),n},t.prototype.update=function(e,t){var n=1==t.length&&t[0].id!=this.placeholder.id,r=t.length>1;if(r||n)return e.call(this,t);this.clear();var o=this.createPlaceholder(this.placeholder);this.$selection.find(".select2-selection__rendered").append(o)},t}),t.define("select2/selection/allowClear",["jquery","../keys","../utils"],function(e,t,n){function r(){}return r.prototype.bind=function(e,t,n){var r=this;e.call(this,t,n),null==this.placeholder&&this.options.get("debug")&&window.console&&console.error&&console.error("Select2: The `allowClear` option should be used in combination with the `placeholder` option."),this.$selection.on("mousedown",".select2-selection__clear",function(e){r._handleClear(e)}),t.on("keypress",function(e){r._handleKeyboardClear(e,t)})},r.prototype._handleClear=function(e,t){if(!this.options.get("disabled")){var r=this.$selection.find(".select2-selection__clear");if(0!==r.length){t.stopPropagation();var o=n.GetData(r[0],"data"),i=this.$element.val();this.$element.val(this.placeholder.id);var s={data:o};if(this.trigger("clear",s),s.prevented)return void this.$element.val(i);for(var a=0;a<o.length;a++)if(s={data:o[a]},this.trigger("unselect",s),s.prevented)return void this.$element.val(i);this.$element.trigger("change"),this.trigger("toggle",{})}}},r.prototype._handleKeyboardClear=function(e,n,r){r.isOpen()||n.which!=t.DELETE&&n.which!=t.BACKSPACE||this._handleClear(n)},r.prototype.update=function(t,r){if(t.call(this,r),!(this.$selection.find(".select2-selection__placeholder").length>0||0===r.length)){var o=e('<span class="select2-selection__clear">×</span>');n.StoreData(o[0],"data",r),this.$selection.find(".select2-selection__rendered").prepend(o)}},r}),t.define("select2/selection/search",["jquery","../utils","../keys"],function(e,t,n){function r(e,t,n){e.call(this,t,n)}return r.prototype.render=function(t){var n=e('<li class="select2-search select2-search--inline"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="none" spellcheck="false" role="textbox" aria-autocomplete="list" /></li>');this.$searchContainer=n,this.$search=n.find("input");var r=t.call(this);return this._transferTabIndex(),r},r.prototype.bind=function(e,r,o){var i=this;e.call(this,r,o),r.on("open",function(){i.$search.trigger("focus")}),r.on("close",function(){i.$search.val(""),i.$search.removeAttr("aria-activedescendant"),i.$search.trigger("focus")}),r.on("enable",function(){i.$search.prop("disabled",!1),i._transferTabIndex()}),r.on("disable",function(){i.$search.prop("disabled",!0)}),r.on("focus",function(e){i.$search.trigger("focus")}),r.on("results:focus",function(e){i.$search.attr("aria-activedescendant",e.id)}),this.$selection.on("focusin",".select2-search--inline",function(e){i.trigger("focus",e)}),this.$selection.on("focusout",".select2-search--inline",function(e){i._handleBlur(e)}),this.$selection.on("keydown",".select2-search--inline",function(e){e.stopPropagation(),i.trigger("keypress",e),i._keyUpPrevented=e.isDefaultPrevented();var r=e.which;if(r===n.BACKSPACE&&""===i.$search.val()){
|
14 |
var o=i.$searchContainer.prev(".select2-selection__choice");if(o.length>0){var s=t.GetData(o[0],"data");i.searchRemoveChoice(s),e.preventDefault()}}});var s=document.documentMode,a=s&&s<=11;this.$selection.on("input.searchcheck",".select2-search--inline",function(e){return a?void i.$selection.off("input.search input.searchcheck"):void i.$selection.off("keyup.search")}),this.$selection.on("keyup.search input.search",".select2-search--inline",function(e){if(a&&"input"===e.type)return void i.$selection.off("input.search input.searchcheck");var t=e.which;t!=n.SHIFT&&t!=n.CTRL&&t!=n.ALT&&t!=n.TAB&&i.handleSearch(e)})},r.prototype._transferTabIndex=function(e){this.$search.attr("tabindex",this.$selection.attr("tabindex")),this.$selection.attr("tabindex","-1")},r.prototype.createPlaceholder=function(e,t){this.$search.attr("placeholder",t.text)},r.prototype.update=function(e,t){var n=this.$search[0]==document.activeElement;if(this.$search.attr("placeholder",""),e.call(this,t),this.$selection.find(".select2-selection__rendered").append(this.$searchContainer),this.resizeSearch(),n){var r=this.$element.find("[data-select2-tag]").length;r?this.$element.focus():this.$search.focus()}},r.prototype.handleSearch=function(){if(this.resizeSearch(),!this._keyUpPrevented){var e=this.$search.val();this.trigger("query",{term:e})}this._keyUpPrevented=!1},r.prototype.searchRemoveChoice=function(e,t){this.trigger("unselect",{data:t}),this.$search.val(t.text),this.handleSearch()},r.prototype.resizeSearch=function(){this.$search.css("width","25px");var e="";if(""!==this.$search.attr("placeholder"))e=this.$selection.find(".select2-selection__rendered").innerWidth();else{var t=this.$search.val().length+1;e=.75*t+"em"}this.$search.css("width",e)},r}),t.define("select2/selection/eventRelay",["jquery"],function(e){function t(){}return t.prototype.bind=function(t,n,r){var o=this,i=["open","opening","close","closing","select","selecting","unselect","unselecting","clear","clearing"],s=["opening","closing","selecting","unselecting","clearing"];t.call(this,n,r),n.on("*",function(t,n){if(e.inArray(t,i)!==-1){n=n||{};var r=e.Event("select2:"+t,{params:n});o.$element.trigger(r),e.inArray(t,s)!==-1&&(n.prevented=r.isDefaultPrevented())}})},t}),t.define("select2/translation",["jquery","require"],function(e,t){function n(e){this.dict=e||{}}return n.prototype.all=function(){return this.dict},n.prototype.get=function(e){return this.dict[e]},n.prototype.extend=function(t){this.dict=e.extend({},t.all(),this.dict)},n._cache={},n.loadPath=function(e){if(!(e in n._cache)){var r=t(e);n._cache[e]=r}return new n(n._cache[e])},n}),t.define("select2/diacritics",[],function(){var e={"Ⓐ":"A","A":"A","À":"A","Á":"A","Â":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ā":"A","Ă":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ǡ":"A","Ä":"A","Ǟ":"A","Ả":"A","Å":"A","Ǻ":"A","Ǎ":"A","Ȁ":"A","Ȃ":"A","Ạ":"A","Ậ":"A","Ặ":"A","Ḁ":"A","Ą":"A","Ⱥ":"A","Ɐ":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ǣ":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ⓑ":"B","B":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B","Ƀ":"B","Ƃ":"B","Ɓ":"B","Ⓒ":"C","C":"C","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","Ç":"C","Ḉ":"C","Ƈ":"C","Ȼ":"C","Ꜿ":"C","Ⓓ":"D","D":"D","Ḋ":"D","Ď":"D","Ḍ":"D","Ḑ":"D","Ḓ":"D","Ḏ":"D","Đ":"D","Ƌ":"D","Ɗ":"D","Ɖ":"D","Ꝺ":"D","DZ":"DZ","DŽ":"DZ","Dz":"Dz","Dž":"Dz","Ⓔ":"E","E":"E","È":"E","É":"E","Ê":"E","Ề":"E","Ế":"E","Ễ":"E","Ể":"E","Ẽ":"E","Ē":"E","Ḕ":"E","Ḗ":"E","Ĕ":"E","Ė":"E","Ë":"E","Ẻ":"E","Ě":"E","Ȅ":"E","Ȇ":"E","Ẹ":"E","Ệ":"E","Ȩ":"E","Ḝ":"E","Ę":"E","Ḙ":"E","Ḛ":"E","Ɛ":"E","Ǝ":"E","Ⓕ":"F","F":"F","Ḟ":"F","Ƒ":"F","Ꝼ":"F","Ⓖ":"G","G":"G","Ǵ":"G","Ĝ":"G","Ḡ":"G","Ğ":"G","Ġ":"G","Ǧ":"G","Ģ":"G","Ǥ":"G","Ɠ":"G","Ꞡ":"G","Ᵹ":"G","Ꝿ":"G","Ⓗ":"H","H":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","Ȟ":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","Ⱨ":"H","Ⱶ":"H","Ɥ":"H","Ⓘ":"I","I":"I","Ì":"I","Í":"I","Î":"I","Ĩ":"I","Ī":"I","Ĭ":"I","İ":"I","Ï":"I","Ḯ":"I","Ỉ":"I","Ǐ":"I","Ȉ":"I","Ȋ":"I","Ị":"I","Į":"I","Ḭ":"I","Ɨ":"I","Ⓙ":"J","J":"J","Ĵ":"J","Ɉ":"J","Ⓚ":"K","K":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Ƙ":"K","Ⱪ":"K","Ꝁ":"K","Ꝃ":"K","Ꝅ":"K","Ꞣ":"K","Ⓛ":"L","L":"L","Ŀ":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ļ":"L","Ḽ":"L","Ḻ":"L","Ł":"L","Ƚ":"L","Ɫ":"L","Ⱡ":"L","Ꝉ":"L","Ꝇ":"L","Ꞁ":"L","LJ":"LJ","Lj":"Lj","Ⓜ":"M","M":"M","Ḿ":"M","Ṁ":"M","Ṃ":"M","Ɱ":"M","Ɯ":"M","Ⓝ":"N","N":"N","Ǹ":"N","Ń":"N","Ñ":"N","Ṅ":"N","Ň":"N","Ṇ":"N","Ņ":"N","Ṋ":"N","Ṉ":"N","Ƞ":"N","Ɲ":"N","Ꞑ":"N","Ꞥ":"N","NJ":"NJ","Nj":"Nj","Ⓞ":"O","O":"O","Ò":"O","Ó":"O","Ô":"O","Ồ":"O","Ố":"O","Ỗ":"O","Ổ":"O","Õ":"O","Ṍ":"O","Ȭ":"O","Ṏ":"O","Ō":"O","Ṑ":"O","Ṓ":"O","Ŏ":"O","Ȯ":"O","Ȱ":"O","Ö":"O","Ȫ":"O","Ỏ":"O","Ő":"O","Ǒ":"O","Ȍ":"O","Ȏ":"O","Ơ":"O","Ờ":"O","Ớ":"O","Ỡ":"O","Ở":"O","Ợ":"O","Ọ":"O","Ộ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Ɔ":"O","Ɵ":"O","Ꝋ":"O","Ꝍ":"O","Ƣ":"OI","Ꝏ":"OO","Ȣ":"OU","Ⓟ":"P","P":"P","Ṕ":"P","Ṗ":"P","Ƥ":"P","Ᵽ":"P","Ꝑ":"P","Ꝓ":"P","Ꝕ":"P","Ⓠ":"Q","Q":"Q","Ꝗ":"Q","Ꝙ":"Q","Ɋ":"Q","Ⓡ":"R","R":"R","Ŕ":"R","Ṙ":"R","Ř":"R","Ȑ":"R","Ȓ":"R","Ṛ":"R","Ṝ":"R","Ŗ":"R","Ṟ":"R","Ɍ":"R","Ɽ":"R","Ꝛ":"R","Ꞧ":"R","Ꞃ":"R","Ⓢ":"S","S":"S","ẞ":"S","Ś":"S","Ṥ":"S","Ŝ":"S","Ṡ":"S","Š":"S","Ṧ":"S","Ṣ":"S","Ṩ":"S","Ș":"S","Ş":"S","Ȿ":"S","Ꞩ":"S","Ꞅ":"S","Ⓣ":"T","T":"T","Ṫ":"T","Ť":"T","Ṭ":"T","Ț":"T","Ţ":"T","Ṱ":"T","Ṯ":"T","Ŧ":"T","Ƭ":"T","Ʈ":"T","Ⱦ":"T","Ꞇ":"T","Ꜩ":"TZ","Ⓤ":"U","U":"U","Ù":"U","Ú":"U","Û":"U","Ũ":"U","Ṹ":"U","Ū":"U","Ṻ":"U","Ŭ":"U","Ü":"U","Ǜ":"U","Ǘ":"U","Ǖ":"U","Ǚ":"U","Ủ":"U","Ů":"U","Ű":"U","Ǔ":"U","Ȕ":"U","Ȗ":"U","Ư":"U","Ừ":"U","Ứ":"U","Ữ":"U","Ử":"U","Ự":"U","Ụ":"U","Ṳ":"U","Ų":"U","Ṷ":"U","Ṵ":"U","Ʉ":"U","Ⓥ":"V","V":"V","Ṽ":"V","Ṿ":"V","Ʋ":"V","Ꝟ":"V","Ʌ":"V","Ꝡ":"VY","Ⓦ":"W","W":"W","Ẁ":"W","Ẃ":"W","Ŵ":"W","Ẇ":"W","Ẅ":"W","Ẉ":"W","Ⱳ":"W","Ⓧ":"X","X":"X","Ẋ":"X","Ẍ":"X","Ⓨ":"Y","Y":"Y","Ỳ":"Y","Ý":"Y","Ŷ":"Y","Ỹ":"Y","Ȳ":"Y","Ẏ":"Y","Ÿ":"Y","Ỷ":"Y","Ỵ":"Y","Ƴ":"Y","Ɏ":"Y","Ỿ":"Y","Ⓩ":"Z","Z":"Z","Ź":"Z","Ẑ":"Z","Ż":"Z","Ž":"Z","Ẓ":"Z","Ẕ":"Z","Ƶ":"Z","Ȥ":"Z","Ɀ":"Z","Ⱬ":"Z","Ꝣ":"Z","ⓐ":"a","a":"a","ẚ":"a","à":"a","á":"a","â":"a","ầ":"a","ấ":"a","ẫ":"a","ẩ":"a","ã":"a","ā":"a","ă":"a","ằ":"a","ắ":"a","ẵ":"a","ẳ":"a","ȧ":"a","ǡ":"a","ä":"a","ǟ":"a","ả":"a","å":"a","ǻ":"a","ǎ":"a","ȁ":"a","ȃ":"a","ạ":"a","ậ":"a","ặ":"a","ḁ":"a","ą":"a","ⱥ":"a","ɐ":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","ǣ":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","ⓑ":"b","b":"b","ḃ":"b","ḅ":"b","ḇ":"b","ƀ":"b","ƃ":"b","ɓ":"b","ⓒ":"c","c":"c","ć":"c","ĉ":"c","ċ":"c","č":"c","ç":"c","ḉ":"c","ƈ":"c","ȼ":"c","ꜿ":"c","ↄ":"c","ⓓ":"d","d":"d","ḋ":"d","ď":"d","ḍ":"d","ḑ":"d","ḓ":"d","ḏ":"d","đ":"d","ƌ":"d","ɖ":"d","ɗ":"d","ꝺ":"d","dz":"dz","dž":"dz","ⓔ":"e","e":"e","è":"e","é":"e","ê":"e","ề":"e","ế":"e","ễ":"e","ể":"e","ẽ":"e","ē":"e","ḕ":"e","ḗ":"e","ĕ":"e","ė":"e","ë":"e","ẻ":"e","ě":"e","ȅ":"e","ȇ":"e","ẹ":"e","ệ":"e","ȩ":"e","ḝ":"e","ę":"e","ḙ":"e","ḛ":"e","ɇ":"e","ɛ":"e","ǝ":"e","ⓕ":"f","f":"f","ḟ":"f","ƒ":"f","ꝼ":"f","ⓖ":"g","g":"g","ǵ":"g","ĝ":"g","ḡ":"g","ğ":"g","ġ":"g","ǧ":"g","ģ":"g","ǥ":"g","ɠ":"g","ꞡ":"g","ᵹ":"g","ꝿ":"g","ⓗ":"h","h":"h","ĥ":"h","ḣ":"h","ḧ":"h","ȟ":"h","ḥ":"h","ḩ":"h","ḫ":"h","ẖ":"h","ħ":"h","ⱨ":"h","ⱶ":"h","ɥ":"h","ƕ":"hv","ⓘ":"i","i":"i","ì":"i","í":"i","î":"i","ĩ":"i","ī":"i","ĭ":"i","ï":"i","ḯ":"i","ỉ":"i","ǐ":"i","ȉ":"i","ȋ":"i","ị":"i","į":"i","ḭ":"i","ɨ":"i","ı":"i","ⓙ":"j","j":"j","ĵ":"j","ǰ":"j","ɉ":"j","ⓚ":"k","k":"k","ḱ":"k","ǩ":"k","ḳ":"k","ķ":"k","ḵ":"k","ƙ":"k","ⱪ":"k","ꝁ":"k","ꝃ":"k","ꝅ":"k","ꞣ":"k","ⓛ":"l","l":"l","ŀ":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","ſ":"l","ł":"l","ƚ":"l","ɫ":"l","ⱡ":"l","ꝉ":"l","ꞁ":"l","ꝇ":"l","lj":"lj","ⓜ":"m","m":"m","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ɯ":"m","ⓝ":"n","n":"n","ǹ":"n","ń":"n","ñ":"n","ṅ":"n","ň":"n","ṇ":"n","ņ":"n","ṋ":"n","ṉ":"n","ƞ":"n","ɲ":"n","ʼn":"n","ꞑ":"n","ꞥ":"n","nj":"nj","ⓞ":"o","o":"o","ò":"o","ó":"o","ô":"o","ồ":"o","ố":"o","ỗ":"o","ổ":"o","õ":"o","ṍ":"o","ȭ":"o","ṏ":"o","ō":"o","ṑ":"o","ṓ":"o","ŏ":"o","ȯ":"o","ȱ":"o","ö":"o","ȫ":"o","ỏ":"o","ő":"o","ǒ":"o","ȍ":"o","ȏ":"o","ơ":"o","ờ":"o","ớ":"o","ỡ":"o","ở":"o","ợ":"o","ọ":"o","ộ":"o","ǫ":"o","ǭ":"o","ø":"o","ǿ":"o","ɔ":"o","ꝋ":"o","ꝍ":"o","ɵ":"o","ƣ":"oi","ȣ":"ou","ꝏ":"oo","ⓟ":"p","p":"p","ṕ":"p","ṗ":"p","ƥ":"p","ᵽ":"p","ꝑ":"p","ꝓ":"p","ꝕ":"p","ⓠ":"q","q":"q","ɋ":"q","ꝗ":"q","ꝙ":"q","ⓡ":"r","r":"r","ŕ":"r","ṙ":"r","ř":"r","ȑ":"r","ȓ":"r","ṛ":"r","ṝ":"r","ŗ":"r","ṟ":"r","ɍ":"r","ɽ":"r","ꝛ":"r","ꞧ":"r","ꞃ":"r","ⓢ":"s","s":"s","ß":"s","ś":"s","ṥ":"s","ŝ":"s","ṡ":"s","š":"s","ṧ":"s","ṣ":"s","ṩ":"s","ș":"s","ş":"s","ȿ":"s","ꞩ":"s","ꞅ":"s","ẛ":"s","ⓣ":"t","t":"t","ṫ":"t","ẗ":"t","ť":"t","ṭ":"t","ț":"t","ţ":"t","ṱ":"t","ṯ":"t","ŧ":"t","ƭ":"t","ʈ":"t","ⱦ":"t","ꞇ":"t","ꜩ":"tz","ⓤ":"u","u":"u","ù":"u","ú":"u","û":"u","ũ":"u","ṹ":"u","ū":"u","ṻ":"u","ŭ":"u","ü":"u","ǜ":"u","ǘ":"u","ǖ":"u","ǚ":"u","ủ":"u","ů":"u","ű":"u","ǔ":"u","ȕ":"u","ȗ":"u","ư":"u","ừ":"u","ứ":"u","ữ":"u","ử":"u","ự":"u","ụ":"u","ṳ":"u","ų":"u","ṷ":"u","ṵ":"u","ʉ":"u","ⓥ":"v","v":"v","ṽ":"v","ṿ":"v","ʋ":"v","ꝟ":"v","ʌ":"v","ꝡ":"vy","ⓦ":"w","w":"w","ẁ":"w","ẃ":"w","ŵ":"w","ẇ":"w","ẅ":"w","ẘ":"w","ẉ":"w","ⱳ":"w","ⓧ":"x","x":"x","ẋ":"x","ẍ":"x","ⓨ":"y","y":"y","ỳ":"y","ý":"y","ŷ":"y","ỹ":"y","ȳ":"y","ẏ":"y","ÿ":"y","ỷ":"y","ẙ":"y","ỵ":"y","ƴ":"y","ɏ":"y","ỿ":"y","ⓩ":"z","z":"z","ź":"z","ẑ":"z","ż":"z","ž":"z","ẓ":"z","ẕ":"z","ƶ":"z","ȥ":"z","ɀ":"z","ⱬ":"z","ꝣ":"z","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Υ","Ϋ":"Υ","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ω":"ω","ς":"σ"};return e}),t.define("select2/data/base",["../utils"],function(e){function t(e,n){t.__super__.constructor.call(this)}return e.Extend(t,e.Observable),t.prototype.current=function(e){throw new Error("The `current` method must be defined in child classes.")},t.prototype.query=function(e,t){throw new Error("The `query` method must be defined in child classes.")},t.prototype.bind=function(e,t){},t.prototype.destroy=function(){},t.prototype.generateResultId=function(t,n){var r=t.id+"-result-";return r+=e.generateChars(4),r+=null!=n.id?"-"+n.id.toString():"-"+e.generateChars(4)},t}),t.define("select2/data/select",["./base","../utils","jquery"],function(e,t,n){function r(e,t){this.$element=e,this.options=t,r.__super__.constructor.call(this)}return t.Extend(r,e),r.prototype.current=function(e){var t=[],r=this;this.$element.find(":selected").each(function(){var e=n(this),o=r.item(e);t.push(o)}),e(t)},r.prototype.select=function(e){var t=this;if(e.selected=!0,n(e.element).is("option"))return e.element.selected=!0,void this.$element.trigger("change");if(this.$element.prop("multiple"))this.current(function(r){var o=[];e=[e],e.push.apply(e,r);for(var i=0;i<e.length;i++){var s=e[i].id;n.inArray(s,o)===-1&&o.push(s)}t.$element.val(o),t.$element.trigger("change")});else{var r=e.id;this.$element.val(r),this.$element.trigger("change")}},r.prototype.unselect=function(e){var t=this;if(this.$element.prop("multiple"))return e.selected=!1,n(e.element).is("option")?(e.element.selected=!1,void this.$element.trigger("change")):void this.current(function(r){for(var o=[],i=0;i<r.length;i++){var s=r[i].id;s!==e.id&&n.inArray(s,o)===-1&&o.push(s)}t.$element.val(o),t.$element.trigger("change")})},r.prototype.bind=function(e,t){var n=this;this.container=e,e.on("select",function(e){n.select(e.data)}),e.on("unselect",function(e){n.unselect(e.data)})},r.prototype.destroy=function(){this.$element.find("*").each(function(){t.RemoveData(this)})},r.prototype.query=function(e,t){var r=[],o=this,i=this.$element.children();i.each(function(){var t=n(this);if(t.is("option")||t.is("optgroup")){var i=o.item(t),s=o.matches(e,i);null!==s&&r.push(s)}}),t({results:r})},r.prototype.addOptions=function(e){t.appendMany(this.$element,e)},r.prototype.option=function(e){var r;e.children?(r=document.createElement("optgroup"),r.label=e.text):(r=document.createElement("option"),void 0!==r.textContent?r.textContent=e.text:r.innerText=e.text),void 0!==e.id&&(r.value=e.id),e.disabled&&(r.disabled=!0),e.selected&&(r.selected=!0),e.title&&(r.title=e.title);var o=n(r),i=this._normalizeItem(e);return i.element=r,t.StoreData(r,"data",i),o},r.prototype.item=function(e){var r={};if(r=t.GetData(e[0],"data"),null!=r)return r;if(e.is("option"))r={id:e.val(),text:e.text(),disabled:e.prop("disabled"),selected:e.prop("selected"),title:e.prop("title")};else if(e.is("optgroup")){r={text:e.prop("label"),children:[],title:e.prop("title")};for(var o=e.children("option"),i=[],s=0;s<o.length;s++){var a=n(o[s]),l=this.item(a);i.push(l)}r.children=i}return r=this._normalizeItem(r),r.element=e[0],t.StoreData(e[0],"data",r),r},r.prototype._normalizeItem=function(e){e!==Object(e)&&(e={id:e,text:e}),e=n.extend({},{text:""},e);var t={selected:!1,disabled:!1};return null!=e.id&&(e.id=e.id.toString()),null!=e.text&&(e.text=e.text.toString()),null==e._resultId&&e.id&&null!=this.container&&(e._resultId=this.generateResultId(this.container,e)),n.extend({},t,e)},r.prototype.matches=function(e,t){var n=this.options.get("matcher");return n(e,t)},r}),t.define("select2/data/array",["./select","../utils","jquery"],function(e,t,n){function r(e,t){var n=t.get("data")||[];r.__super__.constructor.call(this,e,t),this.addOptions(this.convertToOptions(n))}return t.Extend(r,e),r.prototype.select=function(e){var t=this.$element.find("option").filter(function(t,n){return n.value==e.id.toString()});0===t.length&&(t=this.option(e),this.addOptions(t)),r.__super__.select.call(this,e)},r.prototype.convertToOptions=function(e){function r(e){return function(){return n(this).val()==e.id}}for(var o=this,i=this.$element.find("option"),s=i.map(function(){return o.item(n(this)).id}).get(),a=[],l=0;l<e.length;l++){var c=this._normalizeItem(e[l]);if(n.inArray(c.id,s)>=0){var u=i.filter(r(c)),f=this.item(u),p=n.extend(!0,{},c,f),d=this.option(p);u.replaceWith(d)}else{var h=this.option(c);if(c.children){var m=this.convertToOptions(c.children);t.appendMany(h,m)}a.push(h)}}return a},r}),t.define("select2/data/ajax",["./array","../utils","jquery"],function(e,t,n){function r(e,t){this.ajaxOptions=this._applyDefaults(t.get("ajax")),null!=this.ajaxOptions.processResults&&(this.processResults=this.ajaxOptions.processResults),r.__super__.constructor.call(this,e,t)}return t.Extend(r,e),r.prototype._applyDefaults=function(e){var t={data:function(e){return n.extend({},e,{q:e.term})},transport:function(e,t,r){var o=n.ajax(e);return o.then(t),o.fail(r),o}};return n.extend({},t,e,!0)},r.prototype.processResults=function(e){return e},r.prototype.query=function(e,t){function r(){var r=i.transport(i,function(r){var i=o.processResults(r,e);o.options.get("debug")&&window.console&&console.error&&(i&&i.results&&n.isArray(i.results)||console.error("Select2: The AJAX results did not return an array in the `results` key of the response.")),t(i)},function(){"status"in r&&(0===r.status||"0"===r.status)||o.trigger("results:message",{message:"errorLoading"})});o._request=r}var o=this;null!=this._request&&(n.isFunction(this._request.abort)&&this._request.abort(),this._request=null);var i=n.extend({type:"GET"},this.ajaxOptions);"function"==typeof i.url&&(i.url=i.url.call(this.$element,e)),"function"==typeof i.data&&(i.data=i.data.call(this.$element,e)),this.ajaxOptions.delay&&null!=e.term?(this._queryTimeout&&window.clearTimeout(this._queryTimeout),this._queryTimeout=window.setTimeout(r,this.ajaxOptions.delay)):r()},r}),t.define("select2/data/tags",["jquery"],function(e){function t(t,n,r){var o=r.get("tags"),i=r.get("createTag");void 0!==i&&(this.createTag=i);var s=r.get("insertTag");if(void 0!==s&&(this.insertTag=s),t.call(this,n,r),e.isArray(o))for(var a=0;a<o.length;a++){var l=o[a],c=this._normalizeItem(l),u=this.option(c);this.$element.append(u)}}return t.prototype.query=function(e,t,n){function r(e,i){for(var s=e.results,a=0;a<s.length;a++){var l=s[a],c=null!=l.children&&!r({results:l.children},!0),u=(l.text||"").toUpperCase(),f=(t.term||"").toUpperCase(),p=u===f;if(p||c)return!i&&(e.data=s,void n(e))}if(i)return!0;var d=o.createTag(t);if(null!=d){var h=o.option(d);h.attr("data-select2-tag",!0),o.addOptions([h]),o.insertTag(s,d)}e.results=s,n(e)}var o=this;return this._removeOldTags(),null==t.term||null!=t.page?void e.call(this,t,n):void e.call(this,t,r)},t.prototype.createTag=function(t,n){var r=e.trim(n.term);return""===r?null:{id:r,text:r}},t.prototype.insertTag=function(e,t,n){t.unshift(n)},t.prototype._removeOldTags=function(t){var n=(this._lastTag,this.$element.find("option[data-select2-tag]"));n.each(function(){this.selected||e(this).remove()})},t}),t.define("select2/data/tokenizer",["jquery"],function(e){function t(e,t,n){var r=n.get("tokenizer");void 0!==r&&(this.tokenizer=r),e.call(this,t,n)}return t.prototype.bind=function(e,t,n){e.call(this,t,n),this.$search=t.dropdown.$search||t.selection.$search||n.find(".select2-search__field")},t.prototype.query=function(t,n,r){function o(t){var n=s._normalizeItem(t),r=s.$element.find("option").filter(function(){return e(this).val()===n.id});if(!r.length){var o=s.option(n);o.attr("data-select2-tag",!0),s._removeOldTags(),s.addOptions([o])}i(n)}function i(e){s.trigger("select",{data:e})}var s=this;n.term=n.term||"";var a=this.tokenizer(n,this.options,o);a.term!==n.term&&(this.$search.length&&(this.$search.val(a.term),this.$search.focus()),n.term=a.term),t.call(this,n,r)},t.prototype.tokenizer=function(t,n,r,o){for(var i=r.get("tokenSeparators")||[],s=n.term,a=0,l=this.createTag||function(e){return{id:e.term,text:e.term}};a<s.length;){var c=s[a];if(e.inArray(c,i)!==-1){var u=s.substr(0,a),f=e.extend({},n,{term:u}),p=l(f);null!=p?(o(p),s=s.substr(a+1)||"",a=0):a++}else a++}return{term:s}},t}),t.define("select2/data/minimumInputLength",[],function(){function e(e,t,n){this.minimumInputLength=n.get("minimumInputLength"),e.call(this,t,n)}return e.prototype.query=function(e,t,n){return t.term=t.term||"",t.term.length<this.minimumInputLength?void this.trigger("results:message",{message:"inputTooShort",args:{minimum:this.minimumInputLength,input:t.term,params:t}}):void e.call(this,t,n)},e}),t.define("select2/data/maximumInputLength",[],function(){function e(e,t,n){this.maximumInputLength=n.get("maximumInputLength"),e.call(this,t,n)}return e.prototype.query=function(e,t,n){return t.term=t.term||"",this.maximumInputLength>0&&t.term.length>this.maximumInputLength?void this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:t.term,params:t}}):void e.call(this,t,n)},e}),t.define("select2/data/maximumSelectionLength",[],function(){function e(e,t,n){this.maximumSelectionLength=n.get("maximumSelectionLength"),e.call(this,t,n)}return e.prototype.query=function(e,t,n){var r=this;this.current(function(o){var i=null!=o?o.length:0;return r.maximumSelectionLength>0&&i>=r.maximumSelectionLength?void r.trigger("results:message",{message:"maximumSelected",args:{maximum:r.maximumSelectionLength}}):void e.call(r,t,n)})},e}),t.define("select2/dropdown",["jquery","./utils"],function(e,t){function n(e,t){this.$element=e,this.options=t,n.__super__.constructor.call(this)}return t.Extend(n,t.Observable),n.prototype.render=function(){var t=e('<span class="select2-dropdown"><span class="select2-results"></span></span>');return t.attr("dir",this.options.get("dir")),this.$dropdown=t,t},n.prototype.bind=function(){},n.prototype.position=function(e,t){},n.prototype.destroy=function(){this.$dropdown.remove()},n}),t.define("select2/dropdown/search",["jquery","../utils"],function(e,t){function n(){}return n.prototype.render=function(t){var n=t.call(this),r=e('<span class="select2-search select2-search--dropdown"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="none" spellcheck="false" role="textbox" /></span>');return this.$searchContainer=r,this.$search=r.find("input"),n.prepend(r),n},n.prototype.bind=function(t,n,r){var o=this;t.call(this,n,r),this.$search.on("keydown",function(e){o.trigger("keypress",e),o._keyUpPrevented=e.isDefaultPrevented()}),this.$search.on("input",function(t){e(this).off("keyup")}),this.$search.on("keyup input",function(e){o.handleSearch(e)}),n.on("open",function(){o.$search.attr("tabindex",0),o.$search.focus(),window.setTimeout(function(){o.$search.focus()},0)}),n.on("close",function(){o.$search.attr("tabindex",-1),o.$search.val(""),o.$search.blur()}),n.on("focus",function(){n.isOpen()||o.$search.focus()}),n.on("results:all",function(e){if(null==e.query.term||""===e.query.term){var t=o.showSearch(e);t?o.$searchContainer.removeClass("select2-search--hide"):o.$searchContainer.addClass("select2-search--hide")}})},n.prototype.handleSearch=function(e){if(!this._keyUpPrevented){var t=this.$search.val();this.trigger("query",{term:t})}this._keyUpPrevented=!1},n.prototype.showSearch=function(e,t){return!0},n}),t.define("select2/dropdown/hidePlaceholder",[],function(){function e(e,t,n,r){this.placeholder=this.normalizePlaceholder(n.get("placeholder")),e.call(this,t,n,r)}return e.prototype.append=function(e,t){t.results=this.removePlaceholder(t.results),e.call(this,t)},e.prototype.normalizePlaceholder=function(e,t){return"string"==typeof t&&(t={id:"",text:t}),t},e.prototype.removePlaceholder=function(e,t){for(var n=t.slice(0),r=t.length-1;r>=0;r--){var o=t[r];this.placeholder.id===o.id&&n.splice(r,1)}return n},e}),t.define("select2/dropdown/infiniteScroll",["jquery"],function(e){function t(e,t,n,r){this.lastParams={},e.call(this,t,n,r),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return t.prototype.append=function(e,t){this.$loadingMore.remove(),this.loading=!1,e.call(this,t),this.showLoadingMore(t)&&this.$results.append(this.$loadingMore)},t.prototype.bind=function(t,n,r){var o=this;t.call(this,n,r),n.on("query",function(e){o.lastParams=e,o.loading=!0}),n.on("query:append",function(e){o.lastParams=e,o.loading=!0}),this.$results.on("scroll",function(){var t=e.contains(document.documentElement,o.$loadingMore[0]);if(!o.loading&&t){var n=o.$results.offset().top+o.$results.outerHeight(!1),r=o.$loadingMore.offset().top+o.$loadingMore.outerHeight(!1);n+50>=r&&o.loadMore()}})},t.prototype.loadMore=function(){this.loading=!0;var t=e.extend({},{page:1},this.lastParams);t.page++,this.trigger("query:append",t)},t.prototype.showLoadingMore=function(e,t){return t.pagination&&t.pagination.more},t.prototype.createLoadingMore=function(){var t=e('<li class="select2-results__option select2-results__option--load-more"role="treeitem" aria-disabled="true"></li>'),n=this.options.get("translations").get("loadingMore");return t.html(n(this.lastParams)),t},t}),t.define("select2/dropdown/attachBody",["jquery","../utils"],function(e,t){function n(t,n,r){this.$dropdownParent=r.get("dropdownParent")||e(document.body),t.call(this,n,r)}return n.prototype.bind=function(e,t,n){var r=this,o=!1;e.call(this,t,n),t.on("open",function(){r._showDropdown(),r._attachPositioningHandler(t),o||(o=!0,t.on("results:all",function(){r._positionDropdown(),r._resizeDropdown()}),t.on("results:append",function(){r._positionDropdown(),r._resizeDropdown()}))}),t.on("close",function(){r._hideDropdown(),r._detachPositioningHandler(t)}),this.$dropdownContainer.on("mousedown",function(e){e.stopPropagation()})},n.prototype.destroy=function(e){e.call(this),this.$dropdownContainer.remove()},n.prototype.position=function(e,t,n){t.attr("class",n.attr("class")),t.removeClass("select2"),t.addClass("select2-container--open"),t.css({position:"absolute",top:-999999}),this.$container=n},n.prototype.render=function(t){var n=e("<span></span>"),r=t.call(this);return n.append(r),this.$dropdownContainer=n,n},n.prototype._hideDropdown=function(e){this.$dropdownContainer.detach()},n.prototype._attachPositioningHandler=function(n,r){var o=this,i="scroll.select2."+r.id,s="resize.select2."+r.id,a="orientationchange.select2."+r.id,l=this.$container.parents().filter(t.hasScroll);l.each(function(){t.StoreData(this,"select2-scroll-position",{x:e(this).scrollLeft(),y:e(this).scrollTop()})}),l.on(i,function(n){var r=t.GetData(this,"select2-scroll-position");e(this).scrollTop(r.y)}),e(window).on(i+" "+s+" "+a,function(e){o._positionDropdown(),o._resizeDropdown()})},n.prototype._detachPositioningHandler=function(n,r){var o="scroll.select2."+r.id,i="resize.select2."+r.id,s="orientationchange.select2."+r.id,a=this.$container.parents().filter(t.hasScroll);a.off(o),e(window).off(o+" "+i+" "+s)},n.prototype._positionDropdown=function(){var t=e(window),n=this.$dropdown.hasClass("select2-dropdown--above"),r=this.$dropdown.hasClass("select2-dropdown--below"),o=null,i=this.$container.offset();i.bottom=i.top+this.$container.outerHeight(!1);var s={height:this.$container.outerHeight(!1)};s.top=i.top,s.bottom=i.top+s.height;var a={height:this.$dropdown.outerHeight(!1)},l={top:t.scrollTop(),bottom:t.scrollTop()+t.height()},c=l.top<i.top-a.height,u=l.bottom>i.bottom+a.height,f={left:i.left,top:s.bottom},p=this.$dropdownParent;"static"===p.css("position")&&(p=p.offsetParent());var d=p.offset();f.top-=d.top,f.left-=d.left,n||r||(o="below"),u||!c||n?!c&&u&&n&&(o="below"):o="above",("above"==o||n&&"below"!==o)&&(f.top=s.top-d.top-a.height),null!=o&&(this.$dropdown.removeClass("select2-dropdown--below select2-dropdown--above").addClass("select2-dropdown--"+o),this.$container.removeClass("select2-container--below select2-container--above").addClass("select2-container--"+o)),this.$dropdownContainer.css(f)},n.prototype._resizeDropdown=function(){var e={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(e.minWidth=e.width,e.position="relative",e.width="auto"),this.$dropdown.css(e)},n.prototype._showDropdown=function(e){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},n}),t.define("select2/dropdown/minimumResultsForSearch",[],function(){function e(t){for(var n=0,r=0;r<t.length;r++){var o=t[r];o.children?n+=e(o.children):n++}return n}function t(e,t,n,r){this.minimumResultsForSearch=n.get("minimumResultsForSearch"),this.minimumResultsForSearch<0&&(this.minimumResultsForSearch=1/0),e.call(this,t,n,r)}return t.prototype.showSearch=function(t,n){return!(e(n.data.results)<this.minimumResultsForSearch)&&t.call(this,n)},t}),t.define("select2/dropdown/selectOnClose",["../utils"],function(e){function t(){}return t.prototype.bind=function(e,t,n){var r=this;e.call(this,t,n),t.on("close",function(e){r._handleSelectOnClose(e)})},t.prototype._handleSelectOnClose=function(t,n){if(n&&null!=n.originalSelect2Event){var r=n.originalSelect2Event;if("select"===r._type||"unselect"===r._type)return}var o=this.getHighlightedResults();if(!(o.length<1)){var i=e.GetData(o[0],"data");null!=i.element&&i.element.selected||null==i.element&&i.selected||this.trigger("select",{data:i})}},t}),t.define("select2/dropdown/closeOnSelect",[],function(){function e(){}return e.prototype.bind=function(e,t,n){var r=this;e.call(this,t,n),t.on("select",function(e){r._selectTriggered(e)}),t.on("unselect",function(e){r._selectTriggered(e)})},e.prototype._selectTriggered=function(e,t){var n=t.originalEvent;n&&n.ctrlKey||this.trigger("close",{originalEvent:n,originalSelect2Event:t})},e}),t.define("select2/i18n/en",[],function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Please delete "+t+" character";return 1!=t&&(n+="s"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Please enter "+t+" or more characters";return n},loadingMore:function(){return"Loading more results…"},maximumSelected:function(e){var t="You can only select "+e.maximum+" item";return 1!=e.maximum&&(t+="s"),t},noResults:function(){return"No results found"},searching:function(){return"Searching…"}}}),t.define("select2/defaults",["jquery","require","./results","./selection/single","./selection/multiple","./selection/placeholder","./selection/allowClear","./selection/search","./selection/eventRelay","./utils","./translation","./diacritics","./data/select","./data/array","./data/ajax","./data/tags","./data/tokenizer","./data/minimumInputLength","./data/maximumInputLength","./data/maximumSelectionLength","./dropdown","./dropdown/search","./dropdown/hidePlaceholder","./dropdown/infiniteScroll","./dropdown/attachBody","./dropdown/minimumResultsForSearch","./dropdown/selectOnClose","./dropdown/closeOnSelect","./i18n/en"],function(e,t,n,r,o,i,s,a,l,c,u,f,p,d,h,m,g,v,y,_,b,w,x,S,k,j,E,C,P){function A(){this.reset()}A.prototype.apply=function(f){if(f=e.extend(!0,{},this.defaults,f),null==f.dataAdapter){if(null!=f.ajax?f.dataAdapter=h:null!=f.data?f.dataAdapter=d:f.dataAdapter=p,f.minimumInputLength>0&&(f.dataAdapter=c.Decorate(f.dataAdapter,v)),f.maximumInputLength>0&&(f.dataAdapter=c.Decorate(f.dataAdapter,y)),f.maximumSelectionLength>0&&(f.dataAdapter=c.Decorate(f.dataAdapter,_)),f.tags&&(f.dataAdapter=c.Decorate(f.dataAdapter,m)),null==f.tokenSeparators&&null==f.tokenizer||(f.dataAdapter=c.Decorate(f.dataAdapter,g)),null!=f.query){var P=t(f.amdBase+"compat/query");f.dataAdapter=c.Decorate(f.dataAdapter,P)}if(null!=f.initSelection){var A=t(f.amdBase+"compat/initSelection");f.dataAdapter=c.Decorate(f.dataAdapter,A)}}if(null==f.resultsAdapter&&(f.resultsAdapter=n,null!=f.ajax&&(f.resultsAdapter=c.Decorate(f.resultsAdapter,S)),null!=f.placeholder&&(f.resultsAdapter=c.Decorate(f.resultsAdapter,x)),f.selectOnClose&&(f.resultsAdapter=c.Decorate(f.resultsAdapter,E))),null==f.dropdownAdapter){if(f.multiple)f.dropdownAdapter=b;else{var O=c.Decorate(b,w);f.dropdownAdapter=O}if(0!==f.minimumResultsForSearch&&(f.dropdownAdapter=c.Decorate(f.dropdownAdapter,j)),f.closeOnSelect&&(f.dropdownAdapter=c.Decorate(f.dropdownAdapter,C)),null!=f.dropdownCssClass||null!=f.dropdownCss||null!=f.adaptDropdownCssClass){var T=t(f.amdBase+"compat/dropdownCss");f.dropdownAdapter=c.Decorate(f.dropdownAdapter,T)}f.dropdownAdapter=c.Decorate(f.dropdownAdapter,k)}if(null==f.selectionAdapter){if(f.multiple?f.selectionAdapter=o:f.selectionAdapter=r,null!=f.placeholder&&(f.selectionAdapter=c.Decorate(f.selectionAdapter,i)),f.allowClear&&(f.selectionAdapter=c.Decorate(f.selectionAdapter,s)),f.multiple&&(f.selectionAdapter=c.Decorate(f.selectionAdapter,a)),null!=f.containerCssClass||null!=f.containerCss||null!=f.adaptContainerCssClass){var L=t(f.amdBase+"compat/containerCss");f.selectionAdapter=c.Decorate(f.selectionAdapter,L)}f.selectionAdapter=c.Decorate(f.selectionAdapter,l)}if("string"==typeof f.language)if(f.language.indexOf("-")>0){var M=f.language.split("-"),I=M[0];f.language=[f.language,I]}else f.language=[f.language];if(e.isArray(f.language)){var D=new u;f.language.push("en");for(var N=f.language,$=0;$<N.length;$++){var R=N[$],H={};try{H=u.loadPath(R)}catch(F){try{R=this.defaults.amdLanguageBase+R,H=u.loadPath(R)}catch(B){f.debug&&window.console&&console.warn&&console.warn('Select2: The language file for "'+R+'" could not be automatically loaded. A fallback will be used instead.');continue}}D.extend(H)}f.translations=D}else{var q=u.loadPath(this.defaults.amdLanguageBase+"en"),z=new u(f.language);z.extend(q),f.translations=z}return f},A.prototype.reset=function(){function t(e){function t(e){return f[e]||e}return e.replace(/[^\u0000-\u007E]/g,t)}function n(r,o){if(""===e.trim(r.term))return o;if(o.children&&o.children.length>0){for(var i=e.extend(!0,{},o),s=o.children.length-1;s>=0;s--){var a=o.children[s],l=n(r,a);null==l&&i.children.splice(s,1)}return i.children.length>0?i:n(r,i)}var c=t(o.text).toUpperCase(),u=t(r.term).toUpperCase();return c.indexOf(u)>-1?o:null}this.defaults={amdBase:"./",amdLanguageBase:"./i18n/",closeOnSelect:!0,debug:!1,dropdownAutoWidth:!1,escapeMarkup:c.escapeMarkup,language:P,matcher:n,minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:0,selectOnClose:!1,sorter:function(e){return e},templateResult:function(e){return e.text},templateSelection:function(e){return e.text},theme:"default",width:"resolve"}},A.prototype.set=function(t,n){var r=e.camelCase(t),o={};o[r]=n;var i=c._convertData(o);e.extend(!0,this.defaults,i)};var O=new A;
|
15 |
-
return O}),t.define("select2/options",["require","jquery","./defaults","./utils"],function(e,t,n,r){function o(t,o){if(this.options=t,null!=o&&this.fromElement(o),this.options=n.apply(this.options),o&&o.is("input")){var i=e(this.get("amdBase")+"compat/inputData");this.options.dataAdapter=r.Decorate(this.options.dataAdapter,i)}}return o.prototype.fromElement=function(e){var n=["select2"];null==this.options.multiple&&(this.options.multiple=e.prop("multiple")),null==this.options.disabled&&(this.options.disabled=e.prop("disabled")),null==this.options.language&&(e.prop("lang")?this.options.language=e.prop("lang").toLowerCase():e.closest("[lang]").prop("lang")&&(this.options.language=e.closest("[lang]").prop("lang"))),null==this.options.dir&&(e.prop("dir")?this.options.dir=e.prop("dir"):e.closest("[dir]").prop("dir")?this.options.dir=e.closest("[dir]").prop("dir"):this.options.dir="ltr"),e.prop("disabled",this.options.disabled),e.prop("multiple",this.options.multiple),r.GetData(e[0],"select2Tags")&&(this.options.debug&&window.console&&console.warn&&console.warn('Select2: The `data-select2-tags` attribute has been changed to use the `data-data` and `data-tags="true"` attributes and will be removed in future versions of Select2.'),r.StoreData(e[0],"data",r.GetData(e[0],"select2Tags")),r.StoreData(e[0],"tags",!0)),r.GetData(e[0],"ajaxUrl")&&(this.options.debug&&window.console&&console.warn&&console.warn("Select2: The `data-ajax-url` attribute has been changed to `data-ajax--url` and support for the old attribute will be removed in future versions of Select2."),e.attr("ajax--url",r.GetData(e[0],"ajaxUrl")),r.StoreData(e[0],"ajax-Url",r.GetData(e[0],"ajaxUrl")));var o={};o=t.fn.jquery&&"1."==t.fn.jquery.substr(0,2)&&e[0].dataset?t.extend(!0,{},e[0].dataset,r.GetData(e[0])):r.GetData(e[0]);var i=t.extend(!0,{},o);i=r._convertData(i);for(var s in i)t.inArray(s,n)>-1||(t.isPlainObject(this.options[s])?t.extend(this.options[s],i[s]):this.options[s]=i[s]);return this},o.prototype.get=function(e){return this.options[e]},o.prototype.set=function(e,t){this.options[e]=t},o}),t.define("select2/core",["jquery","./options","./utils","./keys"],function(e,t,n,r){var o=function(e,r){null!=n.GetData(e[0],"select2")&&n.GetData(e[0],"select2").destroy(),this.$element=e,this.id=this._generateId(e),r=r||{},this.options=new t(r,e),o.__super__.constructor.call(this);var i=e.attr("tabindex")||0;n.StoreData(e[0],"old-tabindex",i),e.attr("tabindex","-1");var s=this.options.get("dataAdapter");this.dataAdapter=new s(e,this.options);var a=this.render();this._placeContainer(a);var l=this.options.get("selectionAdapter");this.selection=new l(e,this.options),this.$selection=this.selection.render(),this.selection.position(this.$selection,a);var c=this.options.get("dropdownAdapter");this.dropdown=new c(e,this.options),this.$dropdown=this.dropdown.render(),this.dropdown.position(this.$dropdown,a);var u=this.options.get("resultsAdapter");this.results=new u(e,this.options,this.dataAdapter),this.$results=this.results.render(),this.results.position(this.$results,this.$dropdown);var f=this;this._bindAdapters(),this._registerDomEvents(),this._registerDataEvents(),this._registerSelectionEvents(),this._registerDropdownEvents(),this._registerResultsEvents(),this._registerEvents(),this.dataAdapter.current(function(e){f.trigger("selection:update",{data:e})}),e.addClass("select2-hidden-accessible"),e.attr("aria-hidden","true"),this._syncAttributes(),n.StoreData(e[0],"select2",this),e.data("select2",this)};return n.Extend(o,n.Observable),o.prototype._generateId=function(e){var t="";return t=null!=e.attr("id")?e.attr("id"):null!=e.attr("name")?e.attr("name")+"-"+n.generateChars(2):n.generateChars(4),t=t.replace(/(:|\.|\[|\]|,)/g,""),t="select2-"+t},o.prototype._placeContainer=function(e){e.insertAfter(this.$element);var t=this._resolveWidth(this.$element,this.options.get("width"));null!=t&&e.css("width",t)},o.prototype._resolveWidth=function(e,t){var n=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;if("resolve"==t){var r=this._resolveWidth(e,"style");return null!=r?r:this._resolveWidth(e,"element")}if("element"==t){var o=e.outerWidth(!1);return o<=0?"auto":o+"px"}if("style"==t){var i=e.attr("style");if("string"!=typeof i)return null;for(var s=i.split(";"),a=0,l=s.length;a<l;a+=1){var c=s[a].replace(/\s/g,""),u=c.match(n);if(null!==u&&u.length>=1)return u[1]}return null}return t},o.prototype._bindAdapters=function(){this.dataAdapter.bind(this,this.$container),this.selection.bind(this,this.$container),this.dropdown.bind(this,this.$container),this.results.bind(this,this.$container)},o.prototype._registerDomEvents=function(){var t=this;this.$element.on("change.select2",function(){t.dataAdapter.current(function(e){t.trigger("selection:update",{data:e})})}),this.$element.on("focus.select2",function(e){t.trigger("focus",e)}),this._syncA=n.bind(this._syncAttributes,this),this._syncS=n.bind(this._syncSubtree,this),this.$element[0].attachEvent&&this.$element[0].attachEvent("onpropertychange",this._syncA);var r=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;null!=r?(this._observer=new r(function(n){e.each(n,t._syncA),e.each(n,t._syncS)}),this._observer.observe(this.$element[0],{attributes:!0,childList:!0,subtree:!1})):this.$element[0].addEventListener&&(this.$element[0].addEventListener("DOMAttrModified",t._syncA,!1),this.$element[0].addEventListener("DOMNodeInserted",t._syncS,!1),this.$element[0].addEventListener("DOMNodeRemoved",t._syncS,!1))},o.prototype._registerDataEvents=function(){var e=this;this.dataAdapter.on("*",function(t,n){e.trigger(t,n)})},o.prototype._registerSelectionEvents=function(){var t=this,n=["toggle","focus"];this.selection.on("toggle",function(){t.toggleDropdown()}),this.selection.on("focus",function(e){t.focus(e)}),this.selection.on("*",function(r,o){e.inArray(r,n)===-1&&t.trigger(r,o)})},o.prototype._registerDropdownEvents=function(){var e=this;this.dropdown.on("*",function(t,n){e.trigger(t,n)})},o.prototype._registerResultsEvents=function(){var e=this;this.results.on("*",function(t,n){e.trigger(t,n)})},o.prototype._registerEvents=function(){var e=this;this.on("open",function(){e.$container.addClass("select2-container--open")}),this.on("close",function(){e.$container.removeClass("select2-container--open")}),this.on("enable",function(){e.$container.removeClass("select2-container--disabled")}),this.on("disable",function(){e.$container.addClass("select2-container--disabled")}),this.on("blur",function(){e.$container.removeClass("select2-container--focus")}),this.on("query",function(t){e.isOpen()||e.trigger("open",{}),this.dataAdapter.query(t,function(n){e.trigger("results:all",{data:n,query:t})})}),this.on("query:append",function(t){this.dataAdapter.query(t,function(n){e.trigger("results:append",{data:n,query:t})})}),this.on("keypress",function(t){var n=t.which;e.isOpen()?n===r.ESC||n===r.TAB||n===r.UP&&t.altKey?(e.close(),t.preventDefault()):n===r.ENTER?(e.trigger("results:select",{}),t.preventDefault()):n===r.SPACE&&t.ctrlKey?(e.trigger("results:toggle",{}),t.preventDefault()):n===r.UP?(e.trigger("results:previous",{}),t.preventDefault()):n===r.DOWN&&(e.trigger("results:next",{}),t.preventDefault()):(n===r.ENTER||n===r.SPACE||n===r.DOWN&&t.altKey)&&(e.open(),t.preventDefault())})},o.prototype._syncAttributes=function(){this.options.set("disabled",this.$element.prop("disabled")),this.options.get("disabled")?(this.isOpen()&&this.close(),this.trigger("disable",{})):this.trigger("enable",{})},o.prototype._syncSubtree=function(e,t){var n=!1,r=this;if(!e||!e.target||"OPTION"===e.target.nodeName||"OPTGROUP"===e.target.nodeName){if(t)if(t.addedNodes&&t.addedNodes.length>0)for(var o=0;o<t.addedNodes.length;o++){var i=t.addedNodes[o];i.selected&&(n=!0)}else t.removedNodes&&t.removedNodes.length>0&&(n=!0);else n=!0;n&&this.dataAdapter.current(function(e){r.trigger("selection:update",{data:e})})}},o.prototype.trigger=function(e,t){var n=o.__super__.trigger,r={open:"opening",close:"closing",select:"selecting",unselect:"unselecting",clear:"clearing"};if(void 0===t&&(t={}),e in r){var i=r[e],s={prevented:!1,name:e,args:t};if(n.call(this,i,s),s.prevented)return void(t.prevented=!0)}n.call(this,e,t)},o.prototype.toggleDropdown=function(){this.options.get("disabled")||(this.isOpen()?this.close():this.open())},o.prototype.open=function(){this.isOpen()||this.trigger("query",{})},o.prototype.close=function(){this.isOpen()&&this.trigger("close",{})},o.prototype.isOpen=function(){return this.$container.hasClass("select2-container--open")},o.prototype.hasFocus=function(){return this.$container.hasClass("select2-container--focus")},o.prototype.focus=function(e){this.hasFocus()||(this.$container.addClass("select2-container--focus"),this.trigger("focus",{}))},o.prototype.enable=function(e){this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("enable")` method has been deprecated and will be removed in later Select2 versions. Use $element.prop("disabled") instead.'),null!=e&&0!==e.length||(e=[!0]);var t=!e[0];this.$element.prop("disabled",t)},o.prototype.data=function(){this.options.get("debug")&&arguments.length>0&&window.console&&console.warn&&console.warn('Select2: Data can no longer be set using `select2("data")`. You should consider setting the value instead using `$element.val()`.');var e=[];return this.dataAdapter.current(function(t){e=t}),e},o.prototype.val=function(t){if(this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("val")` method has been deprecated and will be removed in later Select2 versions. Use $element.val() instead.'),null==t||0===t.length)return this.$element.val();var n=t[0];e.isArray(n)&&(n=e.map(n,function(e){return e.toString()})),this.$element.val(n).trigger("change")},o.prototype.destroy=function(){this.$container.remove(),this.$element[0].detachEvent&&this.$element[0].detachEvent("onpropertychange",this._syncA),null!=this._observer?(this._observer.disconnect(),this._observer=null):this.$element[0].removeEventListener&&(this.$element[0].removeEventListener("DOMAttrModified",this._syncA,!1),this.$element[0].removeEventListener("DOMNodeInserted",this._syncS,!1),this.$element[0].removeEventListener("DOMNodeRemoved",this._syncS,!1)),this._syncA=null,this._syncS=null,this.$element.off(".select2"),this.$element.attr("tabindex",n.GetData(this.$element[0],"old-tabindex")),this.$element.removeClass("select2-hidden-accessible"),this.$element.attr("aria-hidden","false"),n.RemoveData(this.$element[0]),this.$element.removeData("select2"),this.dataAdapter.destroy(),this.selection.destroy(),this.dropdown.destroy(),this.results.destroy(),this.dataAdapter=null,this.selection=null,this.dropdown=null,this.results=null},o.prototype.render=function(){var t=e('<span class="select2 select2-container"><span class="selection"></span><span class="dropdown-wrapper" aria-hidden="true"></span></span>');return t.attr("dir",this.options.get("dir")),this.$container=t,this.$container.addClass("select2-container--"+this.options.get("theme")),n.StoreData(t[0],"element",this.$element),t},o}),t.define("jquery-mousewheel",["jquery"],function(e){return e}),t.define("jquery.select2",["jquery","jquery-mousewheel","./select2/core","./select2/defaults","./select2/utils"],function(e,t,n,r,o){if(null==e.fn.select2){var i=["open","close","destroy"];e.fn.select2=function(t){if(t=t||{},"object"==typeof t)return this.each(function(){var r=e.extend(!0,{},t);new n(e(this),r)}),this;if("string"==typeof t){var r,s=Array.prototype.slice.call(arguments,1);return this.each(function(){var e=o.GetData(this,"select2");null==e&&window.console&&console.error&&console.error("The select2('"+t+"') method was called on an element that is not using Select2."),r=e[t].apply(e,s)}),e.inArray(t,i)>-1?this:r}throw new Error("Invalid arguments for Select2: "+t)}}return null==e.fn.select2.defaults&&(e.fn.select2.defaults=r),n}),{define:t.define,require:t.require}}(),n=t.require("jquery.select2");return e.fn.select2.amd=t,n})},{jquery:377}],383:[function(e,t,n){"use strict";function r(e,t){if(e===t)return!0;if(null==e||null==t)return!1;if(Array.isArray(e))return Array.isArray(t)&&e.length===t.length&&e.every(function(e,n){return r(e,t[n])});var n="undefined"==typeof e?"undefined":o(e),i="undefined"==typeof t?"undefined":o(t);if(n!==i)return!1;if("object"===n){var s=e.valueOf(),a=t.valueOf();if(s!==e||a!==t)return r(s,a);var l=Object.keys(e),c=Object.keys(t);return l.length===c.length&&l.every(function(n){return r(e[n],t[n])})}return!1}n.__esModule=!0;var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};n["default"]=r,t.exports=n["default"]},{}],384:[function(e,t,n){(function(e){"use strict";var n=function(){};"production"!==e.env.NODE_ENV&&(n=function(e,t,n){var r=arguments.length;n=new Array(r>2?r-2:0);for(var o=2;o<r;o++)n[o-2]=arguments[o];if(void 0===t)throw new Error("`warning(condition, format, ...args)` requires a warning message argument");if(t.length<10||/^[s\W]*$/.test(t))throw new Error("The warning format should be able to uniquely identify this warning. Please, use a more descriptive format than: "+t);if(!e){var i=0,s="Warning: "+t.replace(/%s/g,function(){return n[i++]});"undefined"!=typeof console&&console.error(s);try{throw new Error(s)}catch(a){}}}),t.exports=n}).call(this,e("_process"))},{_process:380}],385:[function(e,t,n){(function(t){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=e("history/createBrowserHistory"),i=n(o),s="undefined"!=typeof window?window.jQuery:"undefined"!=typeof t?t.jQuery:null,a=n(s),l=e("./pages/header"),c=e("./pages/plugins"),u=e("./pages/collections"),f=e("./utils/template"),p=e("./utils/importer"),d=e("./utils/helper"),h=e("./utils/modal"),m=e("./utils/notifications"),g=e("./utils/scroller"),v=e("select2"),y=n(v);window._babelPolyfill||e("babel-polyfill");var _=function b(){var e=this;r(this,b),this.pageLoaded=function(){g.scroller.setScrollHolder(window),e.items.push(h.modal),e.items.push(l.header),e.items.push(f.template),e.items.push(d.helper),envato_elements_admin.license_activated&&(e.items.push(u.kitCollections),e.items.push(p.importer),e.items.push(m.notifications));var t=!0,n=!1,r=void 0;try{for(var o,i=e.items[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){var s=o.value;s.pageLoaded&&s.pageLoaded()}}catch(a){n=!0,r=a}finally{try{!t&&i["return"]&&i["return"]()}finally{if(n)throw r}}e.navigationListen(),e.clickListen()},this.pluginPageLoaded=function(){g.scroller.setScrollHolder(window),e.items.push(h.modal),e.items.push(c.plugins);var t=!0,n=!1,r=void 0;try{for(var o,i=e.items[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){var s=o.value;s.pageLoaded&&s.pageLoaded()}}catch(a){n=!0,r=a}finally{try{!t&&i["return"]&&i["return"]()}finally{if(n)throw r}}},this.magicButtonDone=!1,this.magicButton=function(t,n){if(!e.magicButtonDone){var r=f.template.getDom("tmpl-envato-elements__magic",{});t.append(r),g.scroller.setScrollHolder(n),p.importer.setMode("insert"),e.items.push(h.modal),e.items.push(l.header),e.items.push(f.template),e.items.push(d.helper),envato_elements_admin.license_activated&&(e.items.push(u.kitCollections),e.items.push(p.importer),e.items.push(m.notifications));var o=!0,i=!1,s=void 0;try{for(var a,c=e.items[Symbol.iterator]();!(o=(a=c.next()).done);o=!0){var v=a.value;v.pageLoaded&&v.pageLoaded()}}catch(y){i=!0,s=y}finally{try{!o&&c["return"]&&c["return"]()}finally{if(i)throw s}}e.clickListen(),e.magicButtonDone=!0}var _={navType:"main-category",categorySlug:"elementor-blocks",collectionId:!1,templateId:!1,searchParams:{},searchParamsURI:""};e.navigationEvent(_,"click")},this.clickListen=function(){var t=e;(0,a["default"])("body").off("change.envato-elements").on("change.envato-elements",".envato-elements--action-dropdown",function(n){var r=(0,a["default"])(n.target).find(":selected");r.data("nav-top")&&window.scrollTo(0,0);var o=e.getSearchParams(r.data("search")),i={navType:r.data("nav-type"),categorySlug:r.data("category-slug"),collectionId:r.data("collection-id"),templateId:r.data("template-id"),searchParams:o,searchParamsURI:JSON.stringify(o)};return t.navigationEvent(i,"click"),!1}),(0,a["default"])("body").off("click.envato-elements").on("click.envato-elements",".envato-elements--action",function(e){return!1}).on("change",".envato-elements__chktoggle-input",function(e){return(0,a["default"])(".envato-elements__chktoggle-input").each(function(){e&&e.target&&e.target!==this&&(0,a["default"])(this).prop("checked",!1)}),!1}).off("mousedown.envato-elements").on("mousedown.envato-elements",".envato-elements--action",function(n){if(n&&n.target&&!(0,a["default"])(n.target).parents(".os-scrollbar").length)switch(n.which){case 1:n.preventDefault();var r=(0,a["default"])(n.target);!r.data("nav-type")&&r.parent().data("nav-type")&&(r=r.parent()),r.data("nav-top")&&window.scrollTo(0,0);var o=e.getSearchParams(r.data("search")),i={navType:r.data("nav-type"),categorySlug:r.data("category-slug"),collectionId:r.data("collection-id"),templateId:r.data("template-id"),searchParams:o,searchParamsURI:JSON.stringify(o)};return t.navigationEvent(i,"click"),!1}})},this.navigationListen=function(){e.history=(0,i["default"])({});var t=e.history.location;e.triggerBrowserNavEvent(t,"init"),e.unlisten=e.history.listen(function(t,n){e.triggerBrowserNavEvent(t,n)})},this.getSearchParams=function(t){var n=location.search.substring(1),r=e.getQueryVariable(n,"search"),o={};return r&&(o=JSON.parse(decodeURIComponent(r)),o||(o={})),t&&("undefined"!=typeof t.pg&&(o.pg=t.pg),"undefined"!=typeof t.filters&&(o.filters=t.filters)),o},this.triggerBrowserNavEvent=function(t,n){h.modal.closeModal();var r=t.search.substring(1),o=e.getSearchParams(),i={location:t,page:e.getQueryVariable(r,"page"),navType:"category",categorySlug:e.getQueryVariable(r,"category"),collectionId:e.getQueryVariable(r,"collection_id"),templateId:e.getQueryVariable(r,"template_id"),searchParams:o,searchParamsURI:JSON.stringify(o)};i.templateId?i.navType="template":i.collectionId?i.navType="collection":i.categorySlug||"envato-elements"!==i.page||(i.categorySlug=Object.keys(envato_elements_admin.categories)[0]),e.navigationEvent(i,n)},this.navigationEvent=function(t,n){if("PUSH"!==n){(0,y["default"])(!0,a["default"]),(0,a["default"])(".js-envato-elements__select2").select2("close");var r=!0,o=!1,i=void 0;try{for(var s,l=e.items[Symbol.iterator]();!(r=(s=l.next()).done);r=!0){var c=s.value;c.navigationChange&&c.navigationChange(e,t,n)}}catch(u){o=!0,i=u}finally{try{!r&&l["return"]&&l["return"]()}finally{if(o)throw i}}}},this.getQueryVariable=function(e,t,n){for(var r=e.split("&"),o=0;o<r.length;o++){var i=r[o].split("=");if(decodeURIComponent(i[0])===t)return decodeURIComponent(i[1])}return n},this.items=[],this.history=null,this.unlisten=null};window.ElementsAdmin=new _}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./pages/collections":389,"./pages/header":390,"./pages/plugins":391,"./utils/helper":395,"./utils/importer":396,"./utils/modal":398,"./utils/notifications":399,"./utils/scroller":401,"./utils/template":402,"babel-polyfill":2,"history/createBrowserHistory":374,select2:382}],386:[function(e,t,n){(function(t){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0}),n.collectionCache=void 0;var i=e("../utils/config"),s="undefined"!=typeof window?window.jQuery:"undefined"!=typeof t?t.jQuery:null,a=r(s),l=e("../utils/template"),c=e("../utils/api"),u=e("./template"),f=e("../utils/objectCache"),p=r(f),d=e("../utils/error"),h=e("../utils/scroller"),m=e("overlayscrollbars"),g=r(m),v=e("../utils/lazyLoader"),y=(n.collectionCache=new p["default"](function(e,t,n){var r=t&&t.collectionId?t.collectionId:"loading";return"undefined"==typeof e[r]&&(e[r]=new y),n&&e[r].setParent(n),e[r].updateData(t),e[r]}),function _(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.collectionId,r=void 0!==n&&n;o(this,_),this.setParent=function(t){e.parent=t},this.getReplaceData=function(){var t=e.data;return e.parent&&(t=Object.assign({},e.parent.getReplaceData(),t)),t},this.updateData=function(t){Object.assign(e.data,e.data,t)},this.getDataFromAPI=function(){return new Promise(function(t,n){c.api.post("collection/"+e.data.categorySlug,{collection_id:e.data.collectionId}).then(function(r){r&&r.data?(e.updateData(r.data),t()):(d.error.displayError("Collection API Error",r&&"undefined"!=typeof r.error?r.error:'Sorry something went wrong. If this continues to happen please <a href="mailto:extensions@envato.com">report the bug to us</a>.'),n())},function(e){e&&"undefined"!=typeof e.code&&"rest_cookie_invalid_nonce"===e.code?(d.error.displayError("API Token Expired","Refreshing please wait..."),setTimeout(function(){window.location.reload()},500)):d.error.displayError("Collection API Error","undefined"!=typeof e.error?e.error:'Sorry something went wrong. If this continues to happen please <a href="mailto:extensions@envato.com">report the bug to us</a>.'),n()})})},this.renderCollectionFromAPI=function(){return new Promise(function(t,n){l.template.pageLoading(),i.config.state("requestedCollectionId")!==e.data.collectionId?e.getDataFromAPI().then(function(){var n=l.template.renderMainDom("tmpl-envato-elements__collections",e.getReplaceData()),r=n.find(".envato-elements__collections-content");e.$dom=l.template.getDom("tmpl-envato-elements__collections-single",e.getReplaceData()),r.append(e.$dom);var o=e.$dom.find(".envato-elements__collections-templates"),i=!0,s=!1,a=void 0;try{for(var c,f=e.data.templates[Symbol.iterator]();!(i=(c=f.next()).done);i=!0){var p=c.value;"undefined"==typeof p.collectionId&&(p.collectionId=e.data.collectionId);var d=u.templateCache.getItem(p,e);d.renderTemplateDom(o)}}catch(h){s=!0,a=h}finally{try{!i&&f["return"]&&f["return"]()}finally{if(s)throw a}}e.contentInnerScrollInit(),l.template.mainRenderFinished(),t()},function(){n()}):(l.template.mainRenderFinished(),t())})},this.renderSummaryDom=function(t){e.$container=t,e.$dom=l.template.getDom("tmpl-envato-elements__collections-single",e.getReplaceData()),e.$container.append(e.$dom);var n=e.$dom.find(".envato-elements__collections-templates"),r=!0,o=!1,i=void 0;try{for(var s,a=e.data.templates[Symbol.iterator]();!(r=(s=a.next()).done);r=!0){var c=s.value;"undefined"==typeof c.collectionId&&(c.collectionId=e.data.collectionId);var f=u.templateCache.getItem(c,e);f.renderTemplateDom(n)}}catch(p){o=!0,i=p}finally{try{!r&&a["return"]&&a["return"]()}finally{if(o)throw i}}e.contentInnerScrollInit()},this.contentInnerScrollInit=function(){if("undefined"!=typeof e.data.categorySlug)switch(e.data.categorySlug){case"elementor":case"beaver-builder":e.horizontalScrollInit();break;case"elementor-blocks":}},this.horizontalScrollInit=function(){var t=e.$dom.find(".envato-elements__collections-scroller");if(e.itemScroller){if(t.hasClass("os-host"))return;e.itemScroller.destroy(),e.itemScroller=null}e.itemScroller=(0,g["default"])(t,{className:"os-theme-thick-dark",overflowBehavior:{y:"hidden"},scrollbars:{clickScrolling:!1,autoHide:"never"},callbacks:{onScroll:function(){v.lazyLoader.checkVisible()}}}),e.$dom.find(".js-envato-elements__thumb-scroll").each(function(){var e=parseInt((0,a["default"])(this).data("thumb-height"));if(e>0&&(e=Math.ceil(e*(2/3)),e>100)){var t=(e-100)/100;this.style.WebkitTransitionDuration=this.style.transitionDuration=Math.round(1.25*t*1e3)/1e3+"s",(0,a["default"])(this).data("hover-animation-speed",this.style.WebkitTransitionDuration)}}).hover(function(){this.style.WebkitTransitionDuration=this.style.transitionDuration="0.6s"},function(){this.style.WebkitTransitionDuration=this.style.transitionDuration=(0,a["default"])(this).data("hover-animation-speed")})},this.verticalScrollInit=function(){var t=e.$dom.find(".envato-elements__collections-scroller");if(e.itemScroller){if(t.hasClass("os-host"))return;e.itemScroller.destroy(),e.itemScroller=null}e.itemScroller=(0,g["default"])(t,{className:"os-theme-thick-dark",overflowBehavior:{x:"hidden"},scrollbars:{clickScrolling:!1,autoHide:"never"},callbacks:{onScroll:function(){v.lazyLoader.checkVisible()}}}),v.lazyLoader.checkVisible()},this.openDetailView=function(t,n){var r=null,o=!0,i=!1,s=void 0;try{for(var l,c=e.data.templates[Symbol.iterator]();!(o=(l=c.next()).done);o=!0){var f=l.value;"undefined"==typeof f.collectionId&&(f.collectionId=e.data.collectionId);var p=u.templateCache.getItem(f,e);n&&n===p.data.templateId&&p.updateTemplateDom(),r||t!==!0&&t!==p.data.templateId||(r=p)}}catch(d){i=!0,s=d}finally{try{!o&&c["return"]&&c["return"]()}finally{if(i)throw s}}if(r){var m=!1;if("undefined"!=typeof e.data.categorySlug)switch(e.data.categorySlug){case"elementor":case"beaver-builder":m=!0;break;case"elementor-blocks":e.verticalScrollInit()}e.$dom.addClass("envato-elements__collections-single--open"),e.$dom.parents(".envato-elements__collections-content").first().addClass("envato-elements__collections-content--open"),h.scroller.disableScroll(e.$dom.get(0)),setTimeout(function(){(0,a["default"])(window).trigger("resize")},50),h.scroller.scrollTo(0,e.$dom[0].offsetTop-15);var g=setInterval(function(){h.scroller.scrollTo(0,e.$dom[0].offsetTop-15)},50);setTimeout(function(){clearInterval(g),(0,a["default"])(window).trigger("resize"),e.$dom.addClass("envato-elements__collections-single--opened")},500);var v=e.$dom.find(".envato-elements__collections-single-detail");r.renderHighlightedDom(v),e.itemScroller&&m&&e.itemScroller.scroll(r.$dom,400)}},this.closeDetailView=function(){h.scroller.enableScroll(),e.itemScroller&&e.itemScroller.scroll({x:0},150),(0,a["default"])(".envato-elements__collection-template-cell--active").removeClass("envato-elements__collection-template-cell--active"),e.$dom&&(e.$dom.removeClass("envato-elements__collections-single--open").removeClass("envato-elements__collections-single--opened"),e.$dom.parents(".envato-elements__collections-content").first().removeClass("envato-elements__collections-content--open"))},this.data={collectionId:r,categorySlug:"",pageTitle:"Items",collectionName:"loading",collectionUrl:"#",templates:[],templateObjects:[]},this.$dom=null,this.$container=null,this.itemScroller=null})}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../utils/api":392,"../utils/config":393,"../utils/error":394,"../utils/lazyLoader":397,"../utils/objectCache":400,"../utils/scroller":401,"../utils/template":402,"./template":388,overlayscrollbars:378}],387:[function(e,t,n){(function(t){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0}),n.collectionsCache=void 0;var a=e("../utils/config"),l=e("../utils/template"),c=e("../utils/api"),u=e("../utils/error"),f=e("./collection"),p=e("./template"),d=e("../utils/objectCache"),h=r(d),m=e("body-scroll-lock"),g="undefined"!=typeof window?window.jQuery:"undefined"!=typeof t?t.jQuery:null,v=r(g),y=(n.collectionsCache=new h["default"](function(e,t){var n=t&&t.categorySlug?t.categorySlug:"loading";return"undefined"==typeof e[n]&&("elementor-blocks"===n?e[n]=new _:e[n]=new y),e[n].updateData(t),e[n]}),function b(){var e=this;s(this,b),this.updateData=function(t){Object.assign(e.data,e.data,t)},this.updateMeta=function(t){Object.assign(e.meta,e.meta,t)},this.renderPageFromAPI=function(){return new Promise(function(t,n){l.template.pageLoading(),c.api.post("collections/"+e.data.categorySlug,{elementsSearch:e.data.searchParams}).then(function(r){if(r&&r.data){if(e.data.collections=[],e.updateData(r.data),a.config.state("requestedCategorySlug")!==e.data.categorySlug)return n();if("undefined"!=typeof r.meta&&e.updateMeta(r.meta),e.$dom=l.template.renderMainDom("tmpl-envato-elements__collections",e.getReplaceData()),e.$collectionsHolder=e.$dom.find(".envato-elements__collections-content"),e.$collectionsHolder&&e.data.collections&&e.data.collections.length){var o=!0,i=!1,s=void 0;try{for(var c,p=e.data.collections[Symbol.iterator]();!(o=(c=p.next()).done);o=!0){var d=c.value,h=f.collectionCache.getItem(d,e);h.renderSummaryDom(e.$collectionsHolder)}}catch(m){i=!0,s=m}finally{try{!o&&p["return"]&&p["return"]()}finally{if(i)throw s}}}a.config.state("currentCategorySlug",e.data.categorySlug),l.template.mainRenderFinished(),t()}else u.error.displayError("Collections Data JSON Error",r&&"undefined"!=typeof r.error?r.error:'Sorry something went wrong. If this continues to happen please <a href="mailto:extensions@envato.com">report the bug to us</a>.'),n()},function(e){e&&"undefined"!=typeof e.code&&"rest_cookie_invalid_nonce"===e.code?(u.error.displayError("API Token Expired","Refreshing please wait..."),setTimeout(function(){window.location.reload()},500)):u.error.displayError("Collections Data Error","undefined"!=typeof e.error?e.error:'Sorry something went wrong. If this continues to happen please <a href="mailto:extensions@envato.com">report the bug to us</a>.'),n()})})},this.closeCollections=function(){(0,m.clearAllBodyScrollLocks)(),e.currentlyOpen&&(e.currentlyOpen.closeDetailView(),e.currentlyOpen=null),setTimeout(function(){(0,v["default"])(window).trigger("resize")},50)},this.openCollection=function(t,n){var r=f.collectionCache.getItem({collectionId:t});r&&(!e.currentlyOpen||n&&e.currentlyOpen===r||e.closeCollections(),e.currentlyOpen=r,n?r.openDetailView(n):r.openDetailView(!0))},this.getReplaceData=function(){if(e.data.pagination=[],e.data.page_number&&e.data.total_results&&e.data.per_page&&e.data.total_results>e.data.per_page)for(var t=0;t<e.data.total_results/e.data.per_page;t++)e.data.pagination.push({pageNumber:t,pageLabel:t+1,pageCurrent:parseInt(e.data.page_number)===t+1});return e.data.meta=e.meta,e.data},this.data={categorySlug:"",pageTitle:"Items",collections:[],searchParams:{}},this.meta={},this.currentlyOpen=null}),_=function(e){function t(){s(this,t);var e=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.openCollection=function(t,n){e.$dom&&(e.currentBlock&&e.currentBlock.closeBlockPreview(e.$dom),e.currentBlock=p.templateCache.getItem({collectionId:t,templateId:n},e),e.currentBlock.loadBlockPreview(e.$dom))},e.closeCollections=function(){e.$dom&&e.currentBlock&&e.currentBlock.closeBlockPreview(e.$dom)},e.renderPageFromAPI=function(){return new Promise(function(t,n){l.template.pageLoading(),c.api.post("collections/"+e.data.categorySlug,{elementsSearch:e.data.searchParams}).then(function(r){if(r&&r.data){if(e.data.blocks=[],e.updateData(r.data),a.config.state("requestedCategorySlug")!==e.data.categorySlug)return n();if("undefined"!=typeof r.meta&&e.updateMeta(r.meta),e.$dom=l.template.renderMainDom("tmpl-envato-elements__collections",e.getReplaceData()),e.$blocksHolder=e.$dom.find(".envato-elements__collections-content"),e.$blocksHolder&&e.data.blocks&&e.data.blocks.length){var o=!0,i=!1,s=void 0;try{for(var c,f=e.data.blocks[Symbol.iterator]();!(o=(c=f.next()).done);o=!0){var d=c.value,h=l.template.getDom("tmpl-envato-elements__block-wrap",d);
|
16 |
-
e.$blocksHolder.append(h);var m=!0,g=!1,v=void 0;try{for(var y,_=d.blocks[Symbol.iterator]();!(m=(y=_.next()).done);m=!0){var b=y.value,w=p.templateCache.getItem(b,e);w.renderTemplateDom(h.find(".envato-elements__block-content"))}}catch(x){g=!0,v=x}finally{try{!m&&_["return"]&&_["return"]()}finally{if(g)throw v}}}}catch(x){i=!0,s=x}finally{try{!o&&f["return"]&&f["return"]()}finally{if(i)throw s}}}a.config.state("currentCategorySlug",e.data.categorySlug),l.template.mainRenderFinished(),t()}else u.error.displayError("Blocks Data JSON Error",r&&"undefined"!=typeof r.error?r.error:'Sorry something went wrong. If this continues to happen please <a href="mailto:extensions@envato.com">report the bug to us</a>.'),n()},function(e){e&&"undefined"!=typeof e.code&&"rest_cookie_invalid_nonce"===e.code?(u.error.displayError("API Token Expired","Refreshing please wait..."),setTimeout(function(){window.location.reload()},500)):u.error.displayError("Blocks Data Error","undefined"!=typeof e.error?e.error:'Sorry something went wrong. If this continues to happen please <a href="mailto:extensions@envato.com">report the bug to us</a>.'),n()})})},e.refreshPageFromAPI=function(){return new Promise(function(t,n){return e.$blocksHolder?void c.api.post("collections/"+e.data.categorySlug,{elementsSearch:e.data.searchParams}).then(function(r){if(r&&r.data){if(e.data.blocks=[],e.updateData(r.data),a.config.state("requestedCategorySlug")!==e.data.categorySlug)return n();if("undefined"!=typeof r.meta&&e.updateMeta(r.meta),e.$blocksHolder&&e.data.blocks&&e.data.blocks.length){var o=!0,i=!1,s=void 0;try{for(var c,f=e.data.blocks[Symbol.iterator]();!(o=(c=f.next()).done);o=!0){var d=c.value,h=!0,m=!1,g=void 0;try{for(var v,y=d.blocks[Symbol.iterator]();!(h=(v=y.next()).done);h=!0){var _=v.value,b=p.templateCache.getItem(_,e);b.updateTemplateDom()}}catch(w){m=!0,g=w}finally{try{!h&&y["return"]&&y["return"]()}finally{if(m)throw g}}}}catch(w){i=!0,s=w}finally{try{!o&&f["return"]&&f["return"]()}finally{if(i)throw s}}}l.template.mainRenderFinished(),t()}else u.error.displayError("Blocks Data JSON Error",r&&"undefined"!=typeof r.error?r.error:'Sorry something went wrong. If this continues to happen please <a href="mailto:extensions@envato.com">report the bug to us</a>.'),n()},function(e){e&&"undefined"!=typeof e.code&&"rest_cookie_invalid_nonce"===e.code?(u.error.displayError("API Token Expired","Refreshing please wait..."),setTimeout(function(){window.location.reload()},500)):u.error.displayError("Blocks Data Error","undefined"!=typeof e.error?e.error:'Sorry something went wrong. If this continues to happen please <a href="mailto:extensions@envato.com">report the bug to us</a>.'),n()}):n()})},e.currentBlock=null,e}return i(t,e),t}(y)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../utils/api":392,"../utils/config":393,"../utils/error":394,"../utils/objectCache":400,"../utils/template":402,"./collection":386,"./template":388,"body-scroll-lock":4}],388:[function(e,t,n){(function(t){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0}),n.templateCache=void 0;var i="undefined"!=typeof window?window.jQuery:"undefined"!=typeof t?t.jQuery:null,s=r(i),a=e("../utils/template"),l=e("../utils/lazyLoader"),c=e("../utils/objectCache"),u=r(c),f=e("../utils/scroller"),p=e("../utils/importer"),d=e("overlayscrollbars"),h=r(d),m=(n.templateCache=new u["default"](function(e,t,n){t&&"undefined"==typeof t.collectionId&&(console.log("Failed to find template collection"),console.log(t));var r=(t&&t.collectionId?t.collectionId:"loading")+(t&&t.templateId?t.templateId:"loading");return"undefined"==typeof e[r]&&(e[r]=new m(t)),n&&e[r].setParent(n),e[r].updateData(t),e[r]}),function g(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.templateId,r=void 0!==n&&n;o(this,g),this.setParent=function(t){t&&(e.parent=t)},this.updateData=function(t){Object.assign(e.data,e.data,t)},this.getReplaceData=function(){var t=e.data;return e.parent&&(t=Object.assign({},e.parent.getReplaceData(),{importMode:p.importer.importMode},t)),t},this.updateTemplateDom=function(){if(e.$dom){var t=a.template.getDom("tmpl-envato-elements__collection-template-cell",e.getReplaceData());e.$dom.replaceWith(t),e.$dom=t,l.lazyLoader.addLazy(e.$dom),l.lazyLoader.checkVisibleCallback()}e.$blockPreview&&e.loadBlockPreview(e.parent.$dom)},this.renderTemplateDom=function(t){e.$dom=a.template.getDom("tmpl-envato-elements__collection-template-cell",e.getReplaceData()),t.append(e.$dom),l.lazyLoader.addLazy(e.$dom)},this.renderHighlightedDom=function(t){(0,s["default"])(".envato-elements__collection-template-cell--active").removeClass("envato-elements__collection-template-cell--active"),e.$dom.addClass("envato-elements__collection-template-cell--active");var n=a.template.getDom("tmpl-envato-elements__collection-preview",e.getReplaceData());t.empty().append(n),e.verticalScroll&&(e.verticalScroll.destroy(),e.verticalScroll=null),e.verticalScroll=(0,h["default"])(t.find(".envato-elements__collection-detail-thumbnail"),{className:"os-theme-thick-dark",overflowBehavior:{x:"hidden"},scrollbars:{autoHide:"never"}})},this.loadBlockPreview=function(t){f.scroller.rememberScrollPoint(),(0,s["default"])(".envato-elements__block-preview").remove(),e.$blockPreview=a.template.getDom("tmpl-envato-elements__block-preview",e.getReplaceData()),t.addClass("--block-visible"),e.$blockPreview.insertBefore(t),setTimeout(function(){(0,s["default"])(window).trigger("resize")},50)},this.closeBlockPreview=function(t){t.removeClass("--block-visible"),(0,s["default"])(".envato-elements__block-preview").remove(),e.$blockPreview&&f.scroller.restoreScrollPoint(),e.$blockPreview=null,setTimeout(function(){(0,s["default"])(window).trigger("resize")},50)},this.data={templateId:r,templateName:"loading",templateUrl:"#",previewThumb:"#",previewThumbAspect:"100%"},this.$dom=null,this.lastScrollPos=0,this.lastImageMarginTop=0,this.verticalScroll=null,this.$blockPreview=null});n["default"]=m}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../utils/importer":396,"../utils/lazyLoader":397,"../utils/objectCache":400,"../utils/scroller":401,"../utils/template":402,overlayscrollbars:378}],389:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0}),n.kitCollections=void 0;var o=e("../utils/config"),i=e("../objects/collections"),s=(e("../objects/collection"),e("body-scroll-lock")),a=function l(){var e=this;r(this,l),this.pageLoaded=function(){},this.loadCategoryItems=function(t,n,r,s){var a=e.categories[n],l=i.collectionsCache.getItem({category:a,pageTitle:a.page_title,categorySlug:n,searchParams:r});l.closeCollections(),o.config.state("requestedCategorySlug")===n&&"collection-close"===t||(o.config.state("requestedCategorySlug",n),l.renderPageFromAPI().then(function(){s&&"function"==typeof s&&s()})["catch"](function(){}))},this.loadCollectionItems=function(t,n,r,s,a){var l=e.categories[n];if(o.config.state("requestedCategorySlug")!==n)return void e.loadCategoryItems(t,n,r,function(){e.loadCollectionItems(t,n,r,s,a)});var c=i.collectionsCache.getItem({category:l,pageTitle:l.page_title,categorySlug:n,searchParams:r});switch(o.config.state("requestedCollectionId",s),o.config.state("requestedTemplateId",a),t){case"collection":c.openCollection(s);break;case"template":c.openCollection(s,a)}},this.navigationChange=function(t,n,r){if(n&&n.categorySlug&&r&&n.navType&&"undefined"!=typeof e.categories[n.categorySlug])switch(n.navType){case"main-category":(0,s.clearAllBodyScrollLocks)(),"POP"!==r&&t.history&&t.history.push("?"+o.config.get("admin_slug")+"&category="+n.categorySlug,"history"),e.loadCategoryItems(n.navType,n.categorySlug,{});break;case"category":case"collection-close":(0,s.clearAllBodyScrollLocks)(),"POP"!==r&&t.history&&t.history.push("?"+o.config.get("admin_slug")+"&category="+n.categorySlug+"&search="+n.searchParamsURI,"history"),e.loadCategoryItems(n.navType,n.categorySlug,n.searchParams);break;case"collection":"POP"!==r&&t.history&&t.history.push("?"+o.config.get("admin_slug")+"&category="+n.categorySlug+"&collection_id="+n.collectionId+"&search="+n.searchParamsURI,"history"),e.loadCollectionItems(n.navType,n.categorySlug,n.searchParams,n.collectionId);break;case"template":"POP"!==r&&t.history&&t.history.push("?"+o.config.get("admin_slug")+"&category="+n.categorySlug+"&collection_id="+n.collectionId+"&template_id="+n.templateId+"&search="+n.searchParamsURI,"history"),e.loadCollectionItems(n.navType,n.categorySlug,n.searchParams,n.collectionId,n.templateId)}},this.categories=o.config.get("categories")};n.kitCollections=new a},{"../objects/collection":386,"../objects/collections":387,"../utils/config":393,"body-scroll-lock":4}],390:[function(e,t,n){(function(t){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0}),n.header=void 0;var i="undefined"!=typeof window?window.jQuery:"undefined"!=typeof t?t.jQuery:null,s=r(i),a=(e("../utils/config"),function l(){var e=this;o(this,l),this.pageLoaded=function(){e.$fixedHeader=(0,s["default"])(".envato-elements__wrapper--fixed"),e.setFixedHeader(),e.setSubNavOverflow(),(0,s["default"])(window).resize(function(){e.setFixedHeader(),e.setSubNavOverflow()})},this.setFixedHeader=function(){e.$fixedHeader&&e.$fixedHeader.length&&e.$fixedHeader.find(".envato-elements__header").width(e.$fixedHeader.width()).addClass("envato-elements__header--set")},this.setSubNavOverflow=function(){var e=(0,s["default"])(".envato-elements__collections-header__subnav");if(e.length){var t=e.width()-300,n=0,r=0,o=(0,s["default"])(".envato-elements__collections-header__subnav-more-item .envato-elements__chktoggle-content-inner");o.empty(),e.find(".envato-elements__collections-header__subnav-link--hidden").removeClass("envato-elements__collections-header__subnav-link--hidden"),e.children().width(function(e,t){n+=t}),e.removeClass("envato-elements__collections-header__subnav--hasmore"),(0,s["default"])(e.find(".envato-elements__collections-header__subnav-link").get().reverse()).each(function(){n>=t&&!(0,s["default"])(this).hasClass("envato-elements__collections-header__subnav-link--current")&&!(0,s["default"])(this).hasClass("envato-elements__collections-header__subnav-link--hidden")&&(n-=(0,s["default"])(this).width(),o.append((0,s["default"])(this).clone()),(0,s["default"])(this).addClass("envato-elements__collections-header__subnav-link--hidden"),r++)}),r>0&&e.addClass("envato-elements__collections-header__subnav--hasmore")}},this.navigationChange=function(e,t,n){t&&t.categorySlug&&((0,s["default"])(".envato-elements__header-menulink--current").removeClass("envato-elements__header-menulink--current"),(0,s["default"])(".envato-elements__header-menulink").each(function(){((0,s["default"])(this).data("category-slug")==t.categorySlug||(0,s["default"])(this).data("category-slugs")&&s["default"].inArray(t.categorySlug,(0,s["default"])(this).data("category-slugs"))>0)&&(0,s["default"])(this).addClass("envato-elements__header-menulink--current")}))},this.$fixedHeader=null});n.header=new a}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../utils/config":393}],391:[function(e,t,n){(function(t){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0}),n.plugins=void 0;var i=(e("../utils/config"),"undefined"!=typeof window?window.jQuery:"undefined"!=typeof t?t.jQuery:null),s=r(i),a=e("../utils/modal"),l=e("../utils/api"),c=function u(){var e=this;o(this,u),this.pageLoaded=function(){e.$deactivateButton=(0,s["default"])("#the-list").find('[data-slug="envato-elements"] span.deactivate a'),e.$deactivateButton.on("click",function(t){return t.preventDefault(),a.modal.closeModal(),a.modal.openModal("tmpl-envato-elements__plugin-feedback",{skip:e.$deactivateButton.attr("href")}),!1}),(0,s["default"])("body").on("click",".envato-elements__disable-submit",function(t){t.preventDefault();var n=(0,s["default"])(".envato-elements__disable-submit");n.width(n.width()).text("Loading...").prop("disabled",!0);var r=(0,s["default"])("input[name='elements_deactivation_reason']:checked").val();return l.api.post("feedback/submit",{answer:r,answer_text:(0,s["default"])("input[name='elements_deactivation_reason_"+r+"']").val()}).then(function(e){},function(e){})["finally"](function(){window.location.href=e.$deactivateButton.attr("href")}),!1})}};n.plugins=new c}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../utils/api":392,"../utils/config":393,"../utils/modal":398}],392:[function(e,t,n){(function(t){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0}),n.api=void 0;var i="undefined"!=typeof window?window.jQuery:"undefined"!=typeof t?t.jQuery:null,s=r(i),a=e("./config"),l=function c(){o(this,c),this.post=function(e,t){return new Promise(function(n,r){t||(t={}),t._wpnonce=a.config.get("api_nonce"),s["default"].ajax({url:a.config.get("api_url")+e,method:"POST",dataType:"json",data:t}).done(function(e){e&&"undefined"!=typeof e.success&&"undefined"==typeof e.error&&!e.success&&(e.error=!0),n(e)}).fail(function(e,t,n){var o={};try{o=JSON.parse(e.responseText)}catch(i){}0===Object.keys(o).length&&(o={error:"Sorry something went wrong. "+e.responseText}),r(o)}).always(function(){})})},this.localCache={}};n.api=new l}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./config":393}],393:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var o=function i(){var e=this;r(this,i),this.get=function(t){return"undefined"!=typeof e.config[t]&&e.config[t]},this.state=function(t,n){return"undefined"!=typeof n?(e.stateData[t]=n,n):"undefined"!=typeof e.stateData[t]&&e.stateData[t]},this.config=envato_elements_admin,this.stateData={}};n.config=new o},{}],394:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0}),n.error=void 0;var o=e("./modal"),i=e("./template"),s=function a(){r(this,a),this.pageLoaded=function(){},this.displayError=function(e,t,n){n!==!1&&(n=!0),i.template.pageFinishedLoading(),o.modal.closeModal(),o.modal.openModal("tmpl-envato-elements__error-modal",{title:e,message:t,reactivate:n})}};n.error=new s},{"./modal":398,"./template":402}],395:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0}),n.helper=void 0;var o=e("./modal"),i=function s(){var e=this;r(this,s),this.pageLoaded=function(){},this.navigationChange=function(t,n,r){n&&n.navType&&"help-modal"===n.navType?e.loadHelpModal():n&&n.navType&&"terms-modal"===n.navType&&e.loadTermsModal()},this.loadHelpModal=function(){o.modal.openModal("tmpl-envato-elements__help-modal",{})},this.loadTermsModal=function(){o.modal.openModal("tmpl-envato-elements__terms-modal",{})}};n.helper=new i},{"./modal":398}],396:[function(e,t,n){(function(t){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0}),n.importer=void 0;var i="undefined"!=typeof window?window.jQuery:"undefined"!=typeof t?t.jQuery:null,s=r(i),a=e("./api"),l=e("./template"),c=e("../objects/collection"),u=e("./config"),f=e("./error"),p=e("../objects/template"),d=e("../objects/collections"),h=function m(){var e=this;o(this,m),this.pageLoaded=function(){e.$holder=(0,s["default"])(".envato-elements__importer-wrapper"),e.importData={imports:[]},e.loadImportHistory()},this.setMode=function(t){e.importMode=t},this.navigationChange=function(t,n,r){n&&n.templateId&&n.collectionId&&n.navType&&"import-template"===n.navType?e.startBackgroundImport(n.categorySlug,n.collectionId,n.templateId):n&&n.templateId&&n.collectionId&&n.navType&&"direct-insert-template"===n.navType?e.startBackgroundDirectInsert(n.categorySlug,n.collectionId,n.templateId):n&&n.templateId&&n.collectionId&&n.navType&&"insert-template-create-page"===n.navType&&e.startBackgroundInsertCreate(n.categorySlug,n.collectionId,n.templateId)},this.startBackgroundInsertCreate=function(t,n,r){var o=(0,s["default"])('.envato-elements__create-page-name[data-template-id="'+r+'"]'),i=o.val();if(!i.length)return void f.error.displayError("Create Page","Please enter a valid Page Name and try again ",!1);if("undefined"==typeof e.pendingCreates[r]){e.pendingCreates[r]=!0,(0,s["default"])('.envato-elements-template-status[data-template-id="'+r+'"]').removeClass("envato-elements-template-status--imported").addClass("envato-elements-template-status--importing");var l=(0,s["default"])('.envato-elements-insert-button[data-template-id="'+r+'"]');l.html("Creating <span></span>").addClass("envato-elements-insert-button--inserting"),l.parents(".envato-elements__collection-template-option").addClass("..envato-elements__collection-template-option--inserting"),e.setImportStatus("Creating Page:",i),a.api.post("create/"+t+"/process",{collectionId:n,templateId:r,insertType:"create-page",pageName:i}).then(function(t){e.refreshAfterImportOrInsert(n,r,t,function(){e.setImportStatus("Page Created:",t.page_name,t.page_url),l.html("Page Created <span></span>").removeClass("envato-elements-insert-button--inserting").addClass("envato-elements-insert-button--inserted")})},function(e){})["finally"](function(){delete e.pendingCreates[r]})}},this.startBackgroundImport=function(t,n,r){if("undefined"==typeof e.pendingImports[r]){e.pendingImports[r]=!0,(0,s["default"])('.envato-elements-import-button[data-template-id="'+r+'"]').html("Importing <span></span>").removeClass("envato-elements-import-button--imported").addClass("envato-elements-import-button--importing"),(0,s["default"])('.envato-elements-template-status[data-template-id="'+r+'"]').removeClass("envato-elements-template-status--imported").addClass("envato-elements-template-status--importing");var o=p.templateCache.getItem({collectionId:n,templateId:r},e);e.setImportStatus("Importing:",o.data.templateName),a.api.post("import/"+t+"/process",{collectionId:n,templateId:r,importType:"library"}).then(function(t){e.refreshAfterImportOrInsert(n,t.templateId,t,function(){e.setImportStatus("Imported:",o.data.templateName,t.url)})},function(e){})["finally"](function(){delete e.pendingImports[r]})}},this.startBackgroundDirectInsert=function(t,n,r){if("undefined"==typeof e.pendingImports[r]){e.pendingImports[r]=!0,(0,s["default"])('.envato-elements-import-button[data-template-id="'+r+'"]').html("Importing <span></span>").removeClass("envato-elements-import-button--imported").addClass("envato-elements-import-button--importing"),(0,s["default"])('.envato-elements-template-status[data-template-id="'+r+'"]').removeClass("envato-elements-template-status--imported").addClass("envato-elements-template-status--importing");var o=p.templateCache.getItem({collectionId:n,templateId:r},e);e.setImportStatus("Inserting:",o.data.templateName),a.api.post("insert/"+t+"/process",{collectionId:n,templateId:r,insertType:"direct"}).then(function(e){if("undefined"!=typeof elementor){var t=new Backbone.Model({getTitle:function(){return"Test"}});elementor.channels.data.trigger("template:before:insert",t);for(var n=0;n<e.data.content.length;n++)elementor.getPreviewView().addChildElement(e.data.content[n]);elementor.channels.data.trigger("template:after:insert",{}),window.elementsModal.hide()}},function(e){})["finally"](function(){delete e.pendingImports[r]})}},this.getReplaceData=function(){return e.importData},this.refreshImportList=function(){var t=l.template.getDom("tmpl-envato-elements__importer",e.getReplaceData());e.$importer?e.$importer.replaceWith(t):e.$holder.append(t),e.$importer=t},this.setThumbStates=function(){if(0<e.importData.imports.length){var t=!0,n=!1,r=void 0;try{for(var o,i=e.importData.imports[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){var a=o.value;(a.imported||"undefined"!=typeof a.inserted&&a.inserted.length>0)&&(0,s["default"])('.envato-elements-template-status[data-template-id="'+a.templateId+'"]').removeClass("envato-elements-template-status--inserting").removeClass("envato-elements-template-status--importing").addClass("envato-elements-template-status--imported")}}catch(l){n=!0,r=l}finally{try{!t&&i["return"]&&i["return"]()}finally{if(n)throw r}}}},this.loadImportHistory=function(){a.api.post("import/status").then(function(t){t&&t.data&&(Object.assign(e.importData,e.importData,t.data),e.refreshImportList(),e.setThumbStates())},function(e){})},this.setImportStatus=function(e,t,n){(0,s["default"])(".envato-elements__importer-status").html("<span><strong>"+e+"</strong> "+(n?'<a href="'+n+'" target="_blank">'+t+"</a>":t)+"</span>").addClass("--active")},this.refreshAfterImportOrInsert=function(t,n,r,o){if(e.loadImportHistory(),r&&"undefined"!=typeof r.category&&"elementor-blocks"===r.category){var i=d.collectionsCache.getItem({categorySlug:r.category});i.refreshPageFromAPI().then(function(){o()})}else{var s=c.collectionCache.getItem({collectionId:t});s.getDataFromAPI().then(function(){u.config.state("requestedTemplateId")===n?s.openDetailView(n,n):s.openDetailView(null,n),o()})}},this.$holder=null,this.$importer=null,this.pendingImports={},this.pendingCreates={},this.importMode="import"};n.importer=new h}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../objects/collection":386,"../objects/collections":387,"../objects/template":388,"./api":392,"./config":393,"./error":394,"./template":402}],397:[function(e,t,n){(function(e){"use strict";function t(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0}),n.lazyLoader=void 0;var o="undefined"!=typeof window?window.jQuery:"undefined"!=typeof e?e.jQuery:null,i=t(o),s=function a(){var e=this;r(this,a),this.throttle=function(e,t){var n=!1;return function(){n||(e.call(),n=!0,setTimeout(function(){n=!1,e.call()},t))}},this.addLazy=function(t){e.lazyObjects.push(t)},this.checkVisibleCallback=function(){var t=(0,i["default"])(window).scrollTop(),n=t+(0,i["default"])(window).height(),r=(0,i["default"])(window).width();for(var o in e.lazyObjects)if(e.lazyObjects.hasOwnProperty(o))if(e.lazyObjects[o]&&document.body.contains(e.lazyObjects[o].get(0))){if(e.lazyObjects[o].hasClass("--lazyloaded"))delete e.lazyObjects[o];else if(e.lazyObjects[o]){var s=e.lazyObjects[o].offset().top,a=e.lazyObjects[o].offset().left,l=a+e.lazyObjects[o].width(),c=s+e.lazyObjects[o].height();s<=n&&c>=t&&l>0&&a<r&&(e.lazyObjects[o].find("[data-src]").each(function(){(0,i["default"])(this).css("background-image",'url("'+(0,i["default"])(this).data("src")+'")').addClass("--lazyloaded")}),delete e.lazyObjects[o])}}else delete e.lazyObjects[o]},this.checkVisible=this.throttle(this.checkVisibleCallback,150),this.lazyObjects=[],document.addEventListener("resize",this.checkVisible,!0),document.addEventListener("scroll",this.checkVisible,!0)};n.lazyLoader=new s}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],398:[function(e,t,n){(function(t){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0}),n.modal=void 0;var i="undefined"!=typeof window?window.jQuery:"undefined"!=typeof t?t.jQuery:null,s=r(i),a=e("./template"),l=function c(){var e=this;o(this,c),this.pageLoaded=function(){(0,s["default"])("body").on("click",function(t){e.modalOpen&&!(0,s["default"])(t.target).parents(".envato-elements__modal-inner-bg").length&&e.closeModal()}).on("click",".envato-elements__modal-close",function(t){return t.preventDefault(),e.closeModal(),!1})},this.closeModal=function(){e.modalOpen=!1,e.$modalHolder&&e.$modalHolder.empty(),(0,s["default"])("body").removeClass("envato-elements--modal-open")},this.openModal=function(t,n){e.$modalHolder=(0,s["default"])(".envato-elements__modal-holder"),e.$modalDom=a.template.getDom(t,n),e.$modalHolder.empty(),e.$modalHolder.append(e.$modalDom),e.modalOpen=!0,(0,s["default"])("body").addClass("envato-elements--modal-open")},this.$modalHolder=null,this.$modalDom=null,this.modalOpen=!1};n.modal=new l}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./template":402}],399:[function(e,t,n){(function(t){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0}),n.notifications=void 0;var i="undefined"!=typeof window?window.jQuery:"undefined"!=typeof t?t.jQuery:null,s=r(i),a=e("./api"),l=function c(){var e=this;o(this,c),this.pageLoaded=function(){(0,s["default"])("body").on("click",".js-envato-elements__notification-trigger",function(t){e.notificationsRead(t&&t.target?(0,s["default"])(t.target).data("unseen-notifications"):[])})},this.notificationsRead=function(e){(0,s["default"])(".js-envato-elements__notification-trigger").find(".envato-elements__header-menu-label").remove(),a.api.post("notifications/read",{ids:e}).then(function(e){},function(e){})}};n.notifications=new l}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./api":392}],400:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var o=function i(e){var t=this;r(this,i),this.getItem=function(e,n){return t.lookup(t.items,e,n)},this.items={},this.lookup=e};n["default"]=o},{}],401:[function(e,t,n){(function(t){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0}),n.scroller=void 0;var i="undefined"!=typeof window?window.jQuery:"undefined"!=typeof t?t.jQuery:null,s=r(i),a=e("body-scroll-lock"),l=e("./importer"),c=function u(){var e=this;o(this,u),this.setScrollHolder=function(t){e.scrollHolder=t},this.rememberScrollPoint=function(){e.scrollPoint=(0,s["default"])(e.scrollHolder).scrollTop()},this.restoreScrollPoint=function(){(0,s["default"])(e.scrollHolder).scrollTop(e.scrollPoint)},this.scrollTo=function(t,n){(0,s["default"])(e.scrollHolder).scrollTop(n)},this.disableScroll=function(t){"insert"===l.importer.importMode?(0,s["default"])(e.scrollHolder).addClass("--locked"):(0,a.disableBodyScroll)(t)},this.enableScroll=function(){"insert"===l.importer.importMode?(0,s["default"])(e.scrollHolder).removeClass("--locked"):(0,a.clearAllBodyScrollLocks)()},this.scrollHolder=null,this.scrollPoint=0};n.scroller=new c}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./importer":396,"body-scroll-lock":4}],402:[function(e,t,n){(function(t){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0}),n.template=void 0;var i="undefined"!=typeof window?window.jQuery:"undefined"!=typeof t?t.jQuery:null,s=r(i),a=e("handlebars"),l=r(a),c=e("../pages/header"),u=e("./importer"),f=e("./lazyLoader"),p=e("select2"),d=r(p),h=function m(){var e=this;o(this,m),this.pageLoaded=function(){e.$holder=(0,s["default"])(".js-envato-elements-content")},this.getDom=function(t,n){return"undefined"!=typeof n.categorySlug&&document.getElementById(t+"--"+n.categorySlug)&&(t=t+"--"+n.categorySlug),"undefined"==typeof e.templates[t]&&(e.templates[t]=l["default"].compile(document.getElementById(t).innerHTML)),n.contentTypeName="Template Kit",(0,s["default"])(e.templates[t](n))},this.renderMainDom=function(t,n){var r=e.getDom(t,n);return e.setMainDom(r),r},this.setMainDom=function(t){return e.$holder.empty(),e.$holder.append(t),setTimeout(c.header.setFixedHeader,100),t},this.pageLoading=function(){e.$holder.addClass("envato-elements__content-dynamic--loading")},this.pageFinishedLoading=function(){e.$holder.removeClass("envato-elements__content-dynamic--loading")},this.mainRenderFinished=function(){e.pageFinishedLoading(),u.importer.refreshImportList(),f.lazyLoader.checkVisibleCallback(),(0,d["default"])(!0,s["default"]),(0,s["default"])(".js-envato-elements__select2").each(function(){(0,s["default"])(this).select2({dropdownParent:(0,s["default"])(this).parent()})}),c.header.setSubNavOverflow()},this.$holder=null,this.templates={},l["default"].registerHelper("if_eq",function(e,t,n){return e===t?n.fn(this):n.inverse(this)}),l["default"].registerHelper("page_link",function(e,t){return e.pg=t,JSON.stringify(e)}),l["default"].registerHelper({eq:function(e,t){return e===t},ne:function(e,t){return e!==t},lt:function(e,t){return e<t},gt:function(e,t){return e>t},lte:function(e,t){return e<=t},gte:function(e,t){return e>=t},and:function(){return Array.prototype.slice.call(arguments).every(Boolean)},or:function(){return Array.prototype.slice.call(arguments,0,-1).some(Boolean)}})};n.template=new h}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../pages/header":390,"./importer":396,"./lazyLoader":397,handlebars:359,select2:382}]},{},[385]);
|
17 |
//# sourceMappingURL=app.min.js.map
|
12 |
0===y&&m.hide().show();var _=a(g),b={x:0===_.x,y:0===_.y};c.extend(u,{defaultOptions:r,autoUpdateLoop:!1,autoUpdateRecommended:!s.mO(),nativeScrollbarSize:_,nativeScrollbarIsOverlaid:b,nativeScrollbarStyling:function(){return m.addClass("os-viewport-native-scrollbars-invisible"),m.css(f,p).hide().css(f,d).show(),g[i.oH]-g[i.cH]===0&&g[i.oW]-g[i.cW]===0}(),overlayScrollbarDummySize:{x:30,y:30},msie:function(){var t,n=e.navigator.userAgent,r="indexOf",o="substring",i=n[r]("MSIE "),s=n[r]("Trident/"),a=n[r]("Edge/"),l=n[r]("rv:"),c=e.parseInt;return i>0?t=c(n[o](i+5,n[r](".",i)),10):s>0?t=c(n[o](l+3,n[r](".",l)),10):a>0&&(t=c(n[o](a+5,n[r](".",a)),10)),t}(),cssCalc:function(){var e,n,r=t.createElement("div"),o=["calc","-webkit-calc","-moz-calc","-o-calc"];for(e=0;e<o.length;++e)if(n=o[e],r.style.cssText="width:"+n+"(1px);",r.style.length)return n;return null}(),restrictedMeasuring:function(){m.css(f,p);var e={w:g[i.sW],h:g[i.sH]};m.css(f,"visible");var t={w:g[i.sW],h:g[i.sH]};return e.w-t.w!==0||e.h-t.h!==0}(),rtlScrollBehavior:function(){m.css({"overflow-y":p,"overflow-x":d,direction:"rtl"}).scrollLeft(0);var e=m.offset(),t=v.offset();m.scrollLeft(999);var n=v.offset();return{i:e.left===t.left,n:t.left-n.left===0}}(),supportTransform:o("transform"),supportTransition:o("transition"),supportPassiveEvents:function(){var t=!1;try{e.addEventListener("test",null,Object.defineProperty({},"passive",{get:function(){t=!0}}))}catch(n){}return t}(),supportResizeObserver:!!s.rO(),supportMutationObserver:!!s.mO()}),m.removeAttr(i.s).remove(),function(){function t(e,t){var n=Math.abs(e),r=Math.abs(t);return!(n===r||n+1===r||n-1===r)}function n(){var t=e.screen.deviceXDPI||0,n=e.screen.logicalXDPI||1;return e.devicePixelRatio||t/n}if(!b.x||!b.y){var r=s.wW(),o=s.wH(),i=n();c(e).on("resize",function(){if(l.all().length>0){var e=s.wW(),f=s.wH(),p=e-r,d=f-o;if(0===p&&0===d)return;var g=Math.round(e/(r/100)),v=Math.round(f/(o/100)),y=Math.abs(p),_=Math.abs(d),b=Math.abs(g),w=Math.abs(v),x=n(),S=y>2&&_>2,k=!t(b,w),j=x!==i&&i>0,E=!(S&&k&&j);E||(h.append(m),u.nativeScrollbarSize=a(m[0]),m.remove(),c.each(l.all(),function(){l.has(this)&&l.get(this).update("zoom")})),r=e,o=f,i=x}})}}()}function p(e){var t,r=this,o="autoUpdate",i=o+"Interval",a=[],l=[],u=!1,f=33,p=f,d=s.now(),h=function(){if(a.length>0&&u){t=s.rAF()(function(){h()});var e=s.now(),r=e-d;if(r>p){d=e-r%p;for(var c=f,m=0;m<a.length;m++){var g=a[m];if(g!==n){var v=g.options(),y=v[o],_=Math.max(1,v[i]),b=s.now();(y===!0||null===y)&&b-l[m]>_&&(g.update("auto"),l[m]=new Date(b+=_)),c=Math.max(1,Math.min(c,_))}}p=c}}else p=f};r.add=function(t){c.inArray(t,a)===-1&&(a.push(t),l.push(s.now()),a.length>0&&!u&&(u=!0,e.autoUpdateLoop=u,h()))},r.remove=function(r){var o=c.inArray(r,a);o>-1&&(l.splice(o,1),a.splice(o,1),0===a.length&&u&&(u=!1,e.autoUpdateLoop=u,t!==n&&(s.cAF()(t),t=-1)))}}function d(u,f,p,d){function h(e,t,n){for(var r=t.split(pr),o=0;o<r.length;o++)e[0].addEventListener(r[o],n,{passive:!0})}function m(e,t,n){for(var r=t.split(pr),o=0;o<r.length;o++)e[0].removeEventListener(r[o],n,{passive:!0})}function v(e,t){var r=3333333,a=s.rO(),l="animationstart mozAnimationStart webkitAnimationStart MSAnimationStart",u="childNodes",f=function(){e[vr](r)[gr](Ze?Ae.n?-r:Ae.i?0:r:r),t()};if(Re){var d=e.append(he(Jr+" observed")).contents()[0],h=d[Cr]=new a(f);h.observe(d)}else if(Te>9||!Oe){e.prepend(he(Jr,he({className:Xr,dir:"ltr"},he(Xr,he(Zr))+he(Xr,he({className:Zr,style:"width: 200%; height: 200%"})))));var m,g,v,y,_=e[0][u][0][u][0],b=c(_[u][1]),w=c(_[u][0]),x=c(w[0][u][0]),S=_[i.oW],k=_[i.oH],j=2,E=p.nativeScrollbarSize,C=function(){w[gr](r)[vr](r),b[gr](r)[vr](r)},P=function(){g=0,m&&(S=v,k=y,f())},A=function(e){return v=_[i.oW],y=_[i.oH],m=v!=S||y!=k,e&&m&&!g?(s.cAF()(g),g=s.rAF()(P)):e||P(),C(),e&&(s.prvD(e),s.stpP(e)),!1},O={},T={};T[Yn]=-((E.y+1)*j),T[Jn]=E.x*-j,T[Xn]=E.y*-j,T[Zn]=-((E.x+1)*j),c(_).css(T),w.on(ar,A),b.on(ar,A),e.on(l,function(){A(!1)}),O[nr]=r,O[rr]=r,x.css(O),C()}else{var L=lt[0],M=L.attachEvent,I=Te!==n;if(M)e.prepend(he(Jr)),de(e,fr+Jr)[0].attachEvent("onresize",f);else{var D=L.createElement(o.o);D.setAttribute("tabindex","-1"),D.setAttribute(i.c,Jr),D.onload=function(){var e=this.contentDocument.defaultView;e.addEventListener("resize",f),e.document.documentElement.style.display="none"},D.type="text/html",I&&e.prepend(D),D.data="about:blank",I||e.prepend(D),e.on(l,f)}}if(e[0]===ht[0]){var N=function(){var t=pt.css("direction"),n={},o=0,i=!1;return t!==Bt&&("ltr"===t?(n[Zn]=0,n[Jn]=sr,o=r):(n[Zn]=sr,n[Jn]=0,o=Ae.n?-r:Ae.i?0:r),ht.children().eq(0).css(n),e[gr](o)[vr](r),Bt=t,i=!0),i};N(),e.on(ar,function(e){return N()&&K(),s.prvD(e),s.stpP(e),!1})}}function y(e){if(Re){var t=e.contents()[0];t[Cr].disconnect(),delete t[Cr]}else ke(e.children(fr+Jr).eq(0))}function _(e){if(e!==n&&Re){var t=e.contents()[0];t[Cr].unobserve(t)}}function b(e){if(e!==n&&Re){var t=e.contents()[0];t[Cr].observe(t)}}function w(){xn&&!wn&&(_n.observe(pt[0],{attributes:!0,attributeOldValue:!0,attributeFilter:[i.i,i.c,i.s]}),bn.observe(qe?ft[0]:_t[0],{attributes:!0,attributeOldValue:!0,subtree:!qe,childList:!qe,characterData:!qe,attributeFilter:qe?["wrap","cols","rows"]:[i.i,i.c,i.s]}),wn=!0)}function x(){xn&&wn&&(_n.disconnect(),bn.disconnect(),wn=!1)}function S(){if(!et){var e=ht[0],t={w:e[i.sW],h:e[i.sH]};if(Fe){var n=ye(t,an);an=t,n&&K(!0,!1)}else an=t}}function k(){Tn&&Z(!0)}function j(){Tn&&!ut.hasClass(go)&&Z(!1)}function E(){On&&(Z(!0),clearTimeout(En),En=setTimeout(function(){On&&!Be&&Z(!1)},100))}function C(e){var t=ot.callbacks;et||(tt!==n?clearTimeout(tt):((An||On)&&Z(!0),fe()||xe(pt,$r),oe(t.onScrollStart,e)),te(!0,vt[gr]()),te(!1,vt[vr]()),oe(t.onScroll,e),tt=setTimeout(function(){Be||(P(),oe(t.onScrollStop,e))},Wn))}function P(){clearTimeout(tt),tt=n,(An||On)&&Z(!1),fe()||Se(pt,$r)}function A(){V(),Hn.update(sr)}function O(e){var t=e.keyCode;if(!ue(t)){if(0===So.length){var n=function(){V(),Hn.update(sr)};n(),Sn=setInterval(n,1e3/60)}c.inArray(t,So)===-1&&So.push(t)}}function T(e){var t=e.keyCode;if(!ue(t)){var n=c.inArray(t,So);n>-1&&So.splice(n,1),0===So.length&&(V(),Hn.update(sr),clearInterval(Sn))}}function L(){setTimeout(function(){Be||(V(),Hn.update(sr))},50)}function M(){kn=!0}function I(){kn=!1,clearInterval(Sn),So=[],V(),Hn.update(sr)}function D(e){return ft[gr](Ae.i&&dn?9999999:0),ft[vr](0),s.prvD(e),s.stpP(e),!1}function N(e){if(!et){var t=e.originalEvent||e,r=t.touches!==n;(1===s.mBtn(e)||r)&&(wn&&(In=!0,x()),ko=s.page(e),jo.w=pt[0][i.oW]-(We?0:Ve),jo.h=pt[0][i.oH]-(We?0:Ke),lt.on(jr,H).on(br,$).on(_r,R),xe(ut,go),wt.setCapture&&wt.setCapture(),s.prvD(e),s.stpP(e))}}function $(e){var t=s.page(e),n={};($n||Nn)&&(n[nr]=jo.w+t.x-ko.x),(Rn||Nn)&&(n[rr]=jo.h+t.y-ko.y),pt.css(n),s.stpP(e)}function R(e){var t=e!==n;lt.off(jr,H).off(br,$).off(_r,R),Se(ut,go),wt.releaseCapture&&wt.releaseCapture(),t&&(In&&w(),Hn.update(sr)),In=!1}function H(e){return s.prvD(e),!1}function F(){K()}function B(){var e={};return ze&&yt&&(e.w=le(yt.css(er+nr)),e.h=le(yt.css(er+rr)),e.c=ye(e,yn),e.f=!0),yn=e,e.c}function q(e,t){var r=t!==n&&null!==t?t.split(pr):ir,o=e!==n&&null!==e?e.split(pr):ir;if(r===ir&&o===ir)return!1;var i,s,a,l,u=ae(o,r),f=!1,p=mn!==n&&null!==mn?mn.split(pr):[ir],d=hn!==n&&null!==hn?hn.split(pr):[ir],h=c.inArray(vo,u),m=u[i];for(h>-1&&u.splice(h,1),i=0;i<u.length;i++)if(m=u[i],0!==m.indexOf(Or)){for(a=!0,l=!0,s=0;s<p.length;s++)if(m===p[s]){a=!1;break}for(s=0;s<d.length;s++)if(m===d[s]){l=!1;break}if(a&&l){f=!0;break}}return f}function z(e){var t=e.attributeName,n=e.target,r=e.type,s="closest";if(n===_t[0])return null===t;if("attributes"===r&&(t===i.c||t===i.s)&&!qe){if(typeof n[s]!==o.f)return!0;if(null!==n[s](fr+Jr)||null!==n[s](fr+to)||null!==n[s](fr+lo))return!1}return!0}function U(){if(et)return!1;var e,t=qe&&Mt&&!Yt?ft.val().length:0,n=!wn&&Mt&&!qe,r={};n&&(e=_t.css(or),r[or]=Ze?Jn:Zn,r[nr]=sr,_t.css(r));var o={w:pe()[i.sW]+t,h:pe()[i.sH]+t};n&&(r[or]=e,r[nr]=lr,_t.css(r));var s=B(),a=ye(o,sn)||s;return sn=o,a}function W(){if(et||wn)return!1;var e=pt.attr(i.i)||ir,t=ve(e,Xt),n=pt.attr(i.c)||ir,r=ve(n,Zt),o=pt.attr(i.s)||ir,s=ve(o,en),a=pt.is(":visible")||ir,l=ve(a,tn),c=qe?ft.attr("rows")||ir:ir,u=ve(c,nn),f=qe?ft.attr("cols")||ir:ir,p=ve(f,rn),d=qe?ft.attr("wrap")||ir:ir,h=ve(d,on);return Xt=e,r&&(r=q(Zt,n)),Zt=n,en=o,tn=a,nn=c,rn=f,on=d,t||r||s||l||u||p||h}function G(e){if(!Fe)return!0;var t=[nr,er+nr,tr+nr,Vn+Zn,Vn+Jn,Zn,Jn,"font-weight","word-spacing"],n=[Kn+Zn,Kn+Jn,Qn+Zn+nr,Qn+Jn+nr],r=[rr,er+rr,tr+rr,Vn+Yn,Vn+Xn,Yn,Xn,"line-height"],o=[Kn+Yn,Kn+Xn,Qn+Yn+nr,Qn+Xn+nr],i="s",s="v-s",a=Wt.x===i||Wt.x===s,l=Wt.y===i||Wt.y===s,c=!1,u=function(e,t){for(var n=0;n<e.length;n++)if(e[n]===t)return!0;return!1};return l&&(c=u(r,e),c||We||(c=u(o,e))),a&&!c&&(c=u(t,e),c||We||(c=u(n,e))),c}function V(){if(!et){var e,t,n,r,o=!Yt,s=zn.w-(We||qt||!Mt?0:Ke+Ye),a=zn.h-(We||qt||!It?0:Ke+Ye),l={},c=Mt||o,u=ft[0];return l[er+nr]=ir,l[er+rr]=ir,l[nr]=sr,ft.css(l),e=u[i.oW],t=c?Math.max(e,u[i.sW]-1):1,t+=Mt?Je+(We?0:o?0:Ve+Qe):0,l[nr]=Mt?t:lr,l[rr]=sr,ft.css(l),n=u[i.oH],r=Math.max(n,u[i.sH]-1),l[nr]=t,l[rr]=r,bt.css(l),l[er+nr]=s+(!We&&Mt?Ve+Qe:0),l[er+rr]=a+(!We&&It?Ke+Ye:0),ft.css(l),{ow:e,oh:n,dw:t,dh:r}}}function K(e,t,r){var o=s.now(),a=_o>0&&Fe&&o-it<_o&&!It&&!Mt;if(clearTimeout(st),a&&(yo.h=e,yo.c=t,yo.f=r,st=setTimeout(K,_o)),!(Be||a||et||Fe&&!r&&pt.is(":hidden")||"inline"===pt.css("display"))){it=o,e=e||yo.h,t=t||yo.c,r=r||yo.f,yo={},e=e!==n&&e,t=t!==n&&t,r=r!==n&&r,!Le||Ce.x&&Ce.y?Ie=we(!0,{},p.nativeScrollbarSize):(Ie.x=0,Ie.y=0),Un={x:3*(Ie.x+(Ce.x?0:3)),y:3*(Ie.y+(Ce.y?0:3))},_(ht),_(dt);var l={l:vt[gr](),t:vt[vr]()},u=ot.callbacks,f=ot.scrollbars,g=ot.textarea,y=u.onUpdated,S=u.onOverflowChanged,C=u.onOverflowAmountChanged,P=u.onDirectionChanged,A=u.onContentSizeChanged,O=u.onHostSizeChanged,T=f.visibility,L=ve(T,ln,r),M=f.autoHide,I=ve(M,cn,r),D=f.clickScrolling,$=ve(D,un,r),R=f.dragScrolling,H=ve(R,fn,r),F=ot.className,q=ve(F,hn,r),z=ot.resize,U=ve(z,pn,r)&&!ze,W=!!qe&&"off"!==ft.attr("wrap"),G=ve(W,Yt,r),Q=ot.paddingAbsolute,Y=ve(Q,qt,r),J=ot.clipAlways,re=ve(J,zt,r),se=ot.sizeAutoCapable&&!ze,ae=ve(se,Qt,r),ue=ot.nativeScrollbarsOverlaid.showNativeScrollbars,fe=ve(ue,Vt),de=ot.autoUpdate,me=ve(de,Kt),ge=ot.overflowBehavior,be=ye(ge,Wt,cr,ur,r),ke=g.dynWidth,je=ve(vn,Ee),Ee=g.dynHeight,Te=ve(gn,Ee);if(Pn="n"===M,An="s"===M,On="m"===M,Tn="l"===M,Cn=f.autoHideDelay,Ln=f.touchSupport,mn=hn,Dn="n"===z,Nn="b"===z,$n="h"===z,Rn="v"===z,dn=ot.normalizeRTL,ue=ue&&Ce.x&&Ce.y,ln=T,cn=M,un=D,fn=R,hn=F,pn=z,Yt=W,qt=Q,zt=J,Qt=se,Vt=ue,Kt=de,Wt=we(!0,{},ge),vn=ke,gn=Ee,q&&(Se(pt,mn+pr+vo),xe(pt,F!==n&&null!==F&&F.length>0?F:vo)),me&&(de===!0?(x(),d.add(Hn)):null===de&&Oe?(x(),d.add(Hn)):(d.remove(Hn),w())),ae)if(se)if(mt===n&&(mt=c(he(Qr)),gt.before(mt)),Ge)dt.show();else{dt=c(he(Yr)),mt.before(dt);var De={w:-1,h:-1};v(dt,function(){var e={w:dt[0][i.oW],h:dt[0][i.oH]};ye(e,De)&&(Fe&&It&&e.h>0||Mt&&e.w>0?K():(Fe&&!It&&0===e.h||!Mt&&0===e.w)&&K()),De=e}),Ge=!0,null!==Me&&dt.css(rr,Me+"(100% + 1px)")}else Ge&&dt.hide();r&&(ht.find("*").trigger(ar),Ge&&dt.find("*").trigger(ar));var Ne,Re=pt.css("direction"),Ue=ve(Re,Ft,r),tt=pt.css("box-sizing"),nt=ve(tt,Nt,r),rt={c:r,t:le(pt.css(Kn+Yn)),r:le(pt.css(Kn+Jn)),b:le(pt.css(Kn+Xn)),l:le(pt.css(Kn+Zn))};try{Ne=Ge?dt[0].getBoundingClientRect():null}catch(at){return}Ze="rtl"===Re,We="border-box"===tt;var lt=Ze?Zn:Jn,ct=Ze?Jn:Zn,ut=pt[0],xt=gt[0],St=!1,kt=!(!Ge||"none"===pt.css(or))&&(0===Math.round(Ne.right-Ne.left)&&(!!Q||ut[i.cW]-Ve>0));if(se&&!kt){var jt=ut[i.oW],Et=mt.css(nr);mt.css(nr,sr);var Ct=ut[i.oW];mt.css(nr,Et),St=jt!==Ct,St||(mt.css(nr,jt+1),Ct=ut[i.oW],mt.css(nr,Et),St=jt!==Ct)}var Bt=(kt||St)&&se,Xt=ve(Bt,Mt,r),Zt=!Bt&&Mt,en=!!Ge&&0===Math.round(Ne.bottom-Ne.top),tn=ve(en,It,r),nn=!en&&It,rn="-"+nr,on=Bt&&We||!We,sn=en&&We||!We,an={c:r,t:sn?le(pt.css(Qn+Yn+rn)):0,r:on?le(pt.css(Qn+Jn+rn)):0,b:sn?le(pt.css(Qn+Xn+rn)):0,l:on?le(pt.css(Qn+Zn+rn)):0},_n={c:r,t:le(pt.css(Vn+Yn)),r:le(pt.css(Vn+Jn)),b:le(pt.css(Vn+Xn)),l:le(pt.css(Vn+Zn))},bn={h:String(pt.css(tr+rr)),w:String(pt.css(tr+nr))},xn={},Sn={};if(Ve=rt.l+rt.r,Ke=rt.t+rt.b,rt.c=_e(rt,$t),Qe=an.l+an.r,Ye=an.t+an.b,an.c=_e(an,Rt),Je=_n.l+_n.r,Xe=_n.t+_n.b,_n.c=_e(_n,Ht),bn.ih=le(bn.h),bn.iw=le(bn.w),bn.ch=bn.h.indexOf("px")>-1,bn.cw=bn.w.indexOf("px")>-1,bn.c=ye(bn,Dt,r),Ft=Re,Nt=tt,Mt=Bt,It=en,$t=rt,Rt=an,Ht=_n,Dt=bn,Ue&&Ge&&dt.css(or,ct),rt.c||Ue||Y||Xt||tn||nt||ae){var jn={},En={};ie(Sn,Vn,[-rt.t,-rt.r,-rt.b,-rt.l]),Q?(ie(jn,ir,[rt.t,rt.r,rt.b,rt.l]),qe?ie(En,Kn):ie(xn,Kn)):(ie(jn,ir),qe?ie(En,Kn,[rt.t,rt.r,rt.b,rt.l]):ie(xn,Kn,[rt.t,rt.r,rt.b,rt.l])),gt.css(jn),ft.css(En)}zn={w:xt[i.oW],h:xt[i.oH]};var Mn=!!qe&&V();if(en&&(tn||Y||nt||bn.c||rt.c||an.c)?(bn.cw&&(xn[tr+rr]=bn.ch?bn.ih-(Q?Ke:0)+(We?-Ye:Ke):ir),xn[rr]=sr):(tn||Y)&&(xn[tr+rr]=ir,xn[rr]=lr),Bt&&(Xt||Y||nt||bn.c||rt.c||an.c||Ue)?(bn.cw&&(xn[tr+nr]=bn.cw?bn.iw-(Q?Ve:0)+(We?-Qe:Ve)+(Ce.y?Pe.y:0):ir),xn[nr]=sr,Sn[tr+nr]=lr):(Xt||Y)&&(xn[tr+nr]=ir,xn[nr]=lr,xn[or]=ir,Sn[tr+nr]=ir),Bt&&(bn.cw||(xn[tr+nr]=ir),Sn[nr]=qe&&ke?Mn.dw:sr,xn[nr]=sr,xn[or]=ct),en&&(bn.ch||(xn[tr+rr]=ir),Sn[rr]=qe?Ee?Mn.dh:sr:_t[0][i.cH]),se&&mt.css(Sn),_t.css(xn),xn={},Sn={},Tt=Tt||{x:!1,y:!1},e||t||Ue||nt||Y||Xt||Bt||tn||en||bn.c||fe||be||re||U||L||je||Te||G||Y||je||Te||r){var In="overflow",Bn=In+"-x",qn=In+"-y",Wn="hidden",Gn="visible",fr=He?Ce.x||Ce.y||zn.w<Un.y||zn.h<Un.x||en:en,dr={},hr=Tt.y&&Lt.ys&&!ue?Ce.y?vt.css(lt):-Ie.y:0,mr=Tt.x&&Lt.xs&&!ue?Ce.x?vt.css(Xn):-Ie.x:0;ie(dr,ir),vt.css(dr),fr&&_t.css(In,Wn);var _r=pe(),Sr=He&&!fr?vt[0]:_r,kr={w:_r[i.cW],h:_r[i.cH]},jr={w:Math.max(_r[i.sW],Sr[i.sW]),h:Math.max(_r[i.sH],Sr[i.sH])},Er={w:qe&&Mn&&!ke?Mn.ow:Bt?kr.w:jr.w,h:qe&&Mn&&!Ee?Mn.oh:en?kr.h:jr.h};dr[Xn]=nn?ir:mr,dr[lt]=Zt?ir:hr,vt.css(dr);var Cr={w:ut[i.cW],h:ut[i.cH]},Pr={w:Math.max(Er.w+(Q?Ve:0),Cr.w-Ve)-(ke&&qe&&Bt?Je+(We?0:Ve+Qe):0),h:Math.max(Er.h+(Q?Ke:0),Cr.h-Ke)};if(Pr.c=ye(Pr,Ut,r),Ut=Pr,se){(Pr.c||en||Bt)&&(Sn[nr]=Pr.w,Sn[rr]=Pr.h);var Ar=Sn[nr]+(We?Qe:-Ve),Or=Sn[rr]+(We?Ye:-Ve),Tr={};(!Bt||!Bt&&an.c)&&(Sn[nr]=Cr.w-(We?0:Ve+Qe)-1-Je),(!en||!en&&an.c)&&(Sn[rr]=Cr.h-(We?0:Ke+Ye)-1-Xe),bn.cw&&bn.iw===Ar&&(Sn[nr]=Ar+(We?0:Ve)+1),bn.ch&&bn.ih===Or&&(Sn[rr]=Or+(We?0:Ke)+1),Bt&&(kr.w<zn.w||qe&&!W)&&0===Ve&&(qe&&(Tr[nr]=le(bt.css(nr))-1),Sn[nr]-=1),en&&(kr.h<zn.h||qe)&&0===Ke&&(qe&&(Tr[rr]=le(bt.css(rr))-1),Sn[rr]-=1),Er.h>0&&(Sn[nr]=Math.max(1,Sn[nr]),Sn[rr]=Math.max(1,Sn[rr])),qe&&bt.css(Tr),mt.css(Sn)}Bt&&(xn[nr]=lr),!Bt||We||wn||(xn[or]="none"),_t.css(xn),xn={};var Lr=_r.getBoundingClientRect(),Mr={w:Math.max(_r[i.sW],Sr[i.sW]),h:Math.max(_r[i.sH],Sr[i.sH])};if(fr&&_t.css(In,ir),Lr.width){var Ir=Lr.width,Br=Lr.height,qr=.001;Mr.w+=le(Ir+qr)-Ir,Mr.h+=le(Br+qr)-Br}Mr.c=t=ye(Mr,At,r),At=Mr,Cr={w:ut[i.cW],h:ut[i.cH]},e=ye(Cr,Pt),Pt=Cr,zn={w:xt[i.oW],h:xt[i.oH]};var zr={x:"v-s"===ge.x,y:"v-s"===ge.y},Ur={x:"v-h"===ge.x,y:"v-h"===ge.y},Wr={x:"s"===ge.x,y:"s"===ge.y},Gr={x:Math.max(0,Math.round(100*(Mr.w-Cr.w+(Q?Ve:0)))/100),y:Math.max(0,Math.round(100*(Mr.h-Cr.h+(Q?Ke:0)))/100)},Vr=qe&&(0===zn.w||0===zn.h);Vr&&(Gr.x=0,Gr.y=0);var Jr={x:Gr.x>0,y:Gr.y>0},Xr={x:Jr.x,y:Jr.y};(zr.x||Ur.x)&&(Xr.x=Jr.y&&!zr.y&&!Ur.y),(zr.y||Ur.y)&&(Xr.y=Jr.x&&!zr.x&&!Ur.x),Xr.xs=!!Xr.x&&(Wr.x||zr.x),Xr.ys=!!Xr.y&&(Wr.y||zr.y);var Zr={x:Jr.x&&Xr.xs,y:Jr.y&&Xr.ys},eo=Gt;if(Gr.c=ye(Gr,Gt,cr,ur,r),Gt=Gr,Jr.c=ye(Jr,Tt,cr,ur,r),Tt=Jr,Xr.c=ye(Xr,Lt,cr,ur,r),Lt=Xr,Ce.x||Ce.y){var to=r,no={};if((Jr.x||Jr.y)&&(no.w=Ce.y&&Jr.y?Mr.w+Pe.y:ir,no.h=Ce.x&&Jr.x?Mr.h+Pe.x:ir,to=ve(no,Ot,r),Ot=no),Jr.c||Xr.c||Mr.c||Ue||Xt||tn||Bt||en||fe){var ro="px solid transparent";xn[Qn+ct]=ir,xn[Vn+ct]=ir,Ce.x&&Jr.x&&Xr.xs?(en&&(xn[Vn+Xn]=ue?ir:Pe.x),en||ue?xn[Qn+Xn]=ir:xn[Qn+Xn]=Pe.x+ro):(no.h=ir,to=!0,xn[Qn+Xn]=ir,xn[Vn+Xn]=ir),Ce.y&&Jr.y&&Xr.ys?(Bt&&(xn[Vn+lt]=ue?ir:Pe.y),ue?xn[Qn+lt]=ir:xn[Qn+lt]=Pe.y+ro):(no.w=ir,to=!0,xn[Qn+lt]=ir,xn[Vn+lt]=ir)}if(ue&&(no.w=ir,no.h=ir,to=!0),to){var oo={};oo[nr]=Xr.y?no.w:ir,oo[rr]=Xr.x?no.h:ir,yt===n&&(yt=c(he(Kr)),vt.prepend(yt)),yt.css(oo)}_t.css(xn)}var io={},jn={};if(e||Jr.c||Xr.c||Mr.c||be||nt||fe||Ue||re||tn){io[ct]=ir;var so=function(){io[Xn]=ir,Fn.h=0},ao=function(){io[lt]=ir,Fn.w=0};if(Jr.x&&Xr.xs?(io[Bn]=ar,ue?so():(io[Xn]=-(Ce.x?Pe.x:Ie.x),Fn.h=Ce.x?Pe.y:0)):(io[Bn]=ir,so()),Jr.y&&Xr.ys?(io[qn]=ar,ue?ao():(io[lt]=-(Ce.y?Pe.y:Ie.y),Fn.w=Ce.y?Pe.x:0)):(io[qn]=ir,ao()),(zn.h<Un.x||zn.w<Un.y)&&(Jr.x&&Xr.x&&!Ce.x||Jr.y&&Xr.y&&!Ce.y)?(io[Kn+Yn]=Un.x,io[Vn+Yn]=-Un.x,io[Kn+ct]=Un.y,io[Vn+ct]=-Un.y):(io[Kn+Yn]=ir,io[Vn+Yn]=ir,io[Kn+ct]=ir,io[Vn+ct]=ir),io[Kn+lt]=ir,io[Vn+lt]=ir,Jr.x&&Xr.x||Jr.y&&Xr.y||Vr?qe&&Vr&&(jn[Bn]=Wn,jn[qn]=Wn):(!J||Ur.x||zr.x||Ur.y||zr.y)&&(qe&&(jn[Bn]=ir,jn[qn]=ir),io[Bn]=Gn,io[qn]=Gn),gt.css(jn),vt.css(io),io={},(Jr.c||nt||Xt||tn)&&(!Ce.x||!Ce.y)){var lo=_t[0],ho=lo.style;ho.webkitTransform="scale(1)",ho.display="run-in";lo[i.oH];ho.display=ir,ho.webkitTransform=ir}if(fe&&ue){pt.hide();ut[i.oH];pt.show()}}if(xn={},Ue||Xt||tn)if(Ze&&Bt){var mo=_t.css(or),go=Math.round(_t.css(or,ir).css(Zn,ir).position().left);_t.css(or,mo);var bo=Math.round(_t.position().left);go!==bo&&(xn[Zn]=go)}else xn[Zn]=ir;_t.css(xn);var wo="v"===T,xo="h"===T,So="a"===T,ko=s.bind(X,0,!0,!0,Zr.x),jo=s.bind(X,0,!1,!0,Zr.y),Eo=s.bind(X,0,!0,!1,Zr.x),Co=s.bind(X,0,!1,!1,Zr.y);if(Xr.x||Xr.y?xe(pt,Rr):Se(pt,Rr),Xr.x?xe(pt,Hr):Se(pt,Hr),Xr.y?xe(pt,Fr):Se(pt,Fr),Ue&&(Ze?xe(pt,Dr):Se(pt,Dr)),ze&&xe(pt,Nr),U){var Po=function(){wt.on(yr,N)},Ao=function(){wt.off(yr,N)};Dn?(xe(pt,Nr),Se(wt,[co,uo,fo,po].join(pr)),Ao()):(Se(pt,Nr),xe(wt,co),Nn?xe(wt,uo):$n?xe(wt,fo):Rn&&xe(wt,po),Ao(),Po())}if((L||be||Xr.c||Jr.c||fe)&&(ue?fe&&(Se(pt,$r),ue&&(Eo(),Co())):So?(Zr.x?ko():Eo(),Zr.y?jo():Co()):wo?(ko(),jo()):xo&&(Eo(),Co())),I||fe){var Oo=function(e){$e?e?h(pt,br,E):(h(pt,wr,k),h(pt,xr,j)):e?pt.on(br,E):pt.on(wr,k).on(xr,j)},To=function(){$e?(m(pt,br,E),m(pt,wr,k),m(pt,xr,j)):pt.off(br,E).off(wr,k).off(xr,j)};Tn||On?(To(),Oo(On)):To(),Pn?Z(!0):Z(!1,!0)}if((e||Gr.c||tn||Xt||U||nt||Y||fe||Ue)&&(ee(!0),te(!0,l.l),ee(!1),te(!1,l.t)),$&&ne(!0,D),H&&ne(!1,R),qe&&t){var Lo=ce();if(Lo){var Mo=Jt===n||Lo.rows!==Jt.rows,Io=Lo.cR,Do=Lo.cC,No=Lo.w,$o=Lo.r,Ro=Lo.c,Ho=Lo.p,Fo=Lo.m,Bo=Fo===Ho&&kn,qo={x:W||Do!==Ro||Io!==No?-1:Gt.x,y:(W?Bo||Mo&&eo!==n&&l.t===eo.y:(Bo||Mo)&&Io===$o)?Gt.y:-1},zo=qo.x>-1,Uo=qo.y>-1;(zo||Uo)&&(Uo&&vt[vr](qo.y),zo&&(Ze&&dn&&Ae.i?vt[gr](0):vt[gr](qo.x)))}Jt=Lo}else qe||(Ze&&Ae.i&&Ce.y&&Jr.x&&dn&&(l.l+=Fn.w||0),vt[gr](l.l),vt[vr](l.t));Ue&&oe(P,{isRTL:Ze,dir:Re}),e&&oe(O,{width:Pt.w,height:Pt.h}),t&&oe(A,{width:At.w,height:At.h}),(Jr.c||Xr.c)&&oe(S,{x:Jr.x,y:Jr.y,xScrollable:Xr.xs,yScrollable:Xr.ys,clipped:Xr.x||Xr.y}),Gr.c&&oe(C,{x:Gr.x,y:Gr.y})}ze&&(Jr.c||yn.c)&&(yn.f||B(),Ce.y&&Jr.x&&_t.css(er+nr,yn.w+Pe.y),Ce.x&&Jr.y&&_t.css(er+rr,yn.h+Pe.x),yn.c=!1),b(ht),b(dt),oe(y,{forced:r})}}function Q(e){rt=we(!0,{},rt,g.v(e,g.t,!0)),ot=we(!0,{},ot,g.v(e,g.t,!1,!0))}function Y(){xt=c(he(to+pr+ho)),St=c(he(no)),kt=c(he(oo)),jt=c(he(to+pr+mo)),Et=c(he(no)),Ct=c(he(oo)),xt.append(St),St.append(kt),jt.append(Et),Et.append(Ct),gt.after(jt),gt.after(xt),De&&(xt.on(Er,function(e){e.target===xt[0]&&(ee(!0),te(!0,vt[gr]()))}),jt.on(Er,function(e){e.target===jt[0]&&(ee(!1),te(!1,vt[vr]()))})),J(!0),J(!1),wt=c(he(lo)),pt.append(wt)}function J(e){var t,r,o,i=re(e),a=i.xy,l=ar+i.LT,c="active",u=1,f=function(){u=.5},p=function(){u=1},d=function(n){var o=i.i.tl,c=i.i.hl,u=i.i.ms,f=c/2+s.page(n)[a]-r,p=(f-c/2)/(o-c),d=u*p;d=isFinite(d)?d:0,Ze&&e&&(Ae.n||!Ae.n&&!Ae.i)&&(d*=-1),vt[l](t+d),$e||s.prvD(n)},h=function(e){e=e||e.originalEvent,Se(ut,go),Se(i.h,c),Se(i.t,c),Se(i.s,c),lt.off(br,d).off(_r,h).off(Sr,m).off(kr,g).off(jr,H),p(),t=n,r=n,o!==n&&(Hn.scrollStop(),clearTimeout(o),o=n);var s=pt[0].getBoundingClientRect();e.clientX>=s.left&&e.clientX<=s.right&&e.clientY>=s.top&&e.clientY<=s.bottom||j(),(An||On)&&Z(!1)},m=function(e){16==e.keyCode&&f()},g=function(e){16==e.keyCode&&p()};i.h.on(yr,function(o){if(!et){var u=o.originalEvent||o,f=u.touches!==n;fe()||!fn||f&&!Ln||(1===s.mBtn(o)||f)&&(t=vt[l](),t=t===n?0:t,(Ze&&e&&!Ae.n||!Ze)&&(t=t<0?0:t),r=s.page(o)[a],xe(ut,go),xe(i.h,c),xe(i.s,c),lt.on(br,d).on(_r,h).on(jr,H),!Te&&Ue||s.prvD(o),s.stpP(o))}}),i.t.on(yr,function(t){if(!et){var l=t.originalEvent||t,p=l.touches!==n;if(!fe()&&un&&(!p||Ln)&&(1===s.mBtn(t)||p)){var d,v=zn[i._wh],y=i.t.offset()[i.lt],_=!0;t.shiftKey&&f();var b=function(){if(!Be){var t=i.i.ho,s=i.i.hl,a=r-y,l=200*u,c=_?Math.max(333,l):l,f={},p=Ze&&e&&(!Ae.i&&!Ae.n||dn),h=t>a;p&&(h=t<a),h?(d===n&&(d=!0),f[i.xy]="-="+v):(d===n&&(d=!1),f[i.xy]="+="+v),Hn.scrollStop(),Hn.scroll(f,l,"linear");var m=d?t<=a:t+s>=a;p&&(m=d?t+s>=a:t<=a),m?(clearTimeout(o),Hn.scrollStop(),o=n):o=setTimeout(b,c),_=!1}};r=s.page(t)[a],xe(ut,go),xe(i.t,c),xe(i.s,c),lt.on(_r,h).on(Sr,m).on(kr,g).on(jr,H),b(),s.prvD(t),s.stpP(t)}}}).hover(function(){(An||On)&&(Mn=!0,Z(!0))},function(){(An||On)&&(Mn=!1,Z(!1))}),i.s.on(yr,function(e){s.stpP(e)})}function X(e,t,n){var r=e?Lr:Mr,o=e?xt:jt;t?Se(pt,r):xe(pt,r),n?Se(o,so):xe(o,so)}function Z(e,t){if(clearTimeout(jn),e)Se(xt,ao),Se(jt,ao);else{var n="active",r=function(){if(!Mn&&!Be){var e=kt.hasClass(n)||Ct.hasClass(n);!e&&(An||On||Tn)&&xe(xt,ao),!e&&(An||On||Tn)&&xe(jt,ao)}};Cn>0&&t!==!0?jn=setTimeout(r,Cn):r()}}function ee(e){var t={},n=re(e),r=1e6,o=Math.min(1,(Pt[n._wh]-(qt?e?Ve:Ke:0))/At[n._wh]);t[n.wh]=Math.floor(100*o*r)/r+"%",fe()||n.h.css(t),n.i.hl=n.h[0]["offset"+n.WH],n.i.hlr=o}function te(e,t){var n,r,o=Ze&&e,i={},s=re(e),a="translate(",l="transform",c=vt[0][ar+s.WH]-vt[0]["client"+s.WH],u=s.i.hl,f=s.t[0]["offset"+s.WH],p=f-u,d=p;Ae.n&&o&&(c*=-1),r=t/c,r=isNaN(r)?0:Math.min(1,r),s.i.ms=c,s.i.cs=t,s.i.csr=r,d*=r,d=isNaN(d)?0:d,o&&(Ae.n||!Ae.n&&!Ae.i)&&(d=f-u-d),d=Math.max(0,d),Ne?(o&&(d=-(f-u-d)),n=e?a+d+"px, 0)":a+"0, "+d+"px)",i["-webkit-"+l]=n,i["-moz-"+l]=n,i["-ms-"+l]=n,i["-o-"+l]=n,i[l]=n):i[s.lt]=d,fe()||s.h.css(i),s.i.ho=d,s.i.tl=f}function ne(e,t){var n=t?"removeClass":"addClass",r=e?St:kt,o=e?Et:Ct,i=e?ro:io;r[n](i),o[n](i)}function re(e){return{wh:e?nr:rr,WH:e?"Width":"Height",lt:e?Zn:Yn,LT:e?"Left":"Top",xy:e?cr:ur,XY:e?"X":"Y",_wh:e?"w":"h",_lt:e?"l":"t",t:e?St:Et,h:e?kt:Ct,s:e?xt:jt,i:e?Bn:qn}}function oe(e,t){Fe&&c.isFunction(e)&&e.call(Hn,t)}function ie(e,t,r){r===n&&(r=[ir,ir,ir,ir]),e[t+Yn]=r[0],e[t+Jn]=r[1],e[t+Xn]=r[2],e[t+Zn]=r[3]}function se(t){var n="ownerDocument",r="HTMLElement",i=t&&t[n]?t[n].parentWindow||e:e;return typeof i[r]===o.o?t instanceof i[r]:t&&typeof t===o.o&&null!==t&&1===t.nodeType&&typeof t.nodeName===o.s}function ae(e,t){var n,r,o=[],i=[];for(n=0;n<e.length;n++)o[e[n]]=!0;for(n=0;n<t.length;n++)o[t[n]]?delete o[t[n]]:o[t[n]]=!0;for(r in o)i.push(r);return i}function le(t){var n=e.parseInt(t);return isNaN(n)?0:n}function ce(){var e=ft[0].selectionStart;if(e!==n){var t,r,o="length",i=ft.val(),s=i[o],a=i.split("\n"),l=a[o],c=i.substr(0,e).split("\n"),u=0,f=0,p=c[o],d=c[c[o]-1][o];for(r=0;r<a[o];r++)t=a[r][o],t>f&&(u=r+1,f=t);return{cR:p,cC:d,r:l,c:f,w:u,p:e,m:s}}}function ue(e){for(var t=0;t<xo.length;t++)if(e===xo[t])return!0;return!1}function fe(){return Vt&&Ce.x&&Ce.y}function pe(){return qe?bt[0]:_t[0]}function de(e,t){return c.prototype.find.call(e,t).eq(0)}function he(e,t){return"<div "+(e?be(e)===o.s?'class="'+e+'"':function(){var t,n="";if(c.isPlainObject(e))for(t in e)n+=("className"===t?"class":t)+'="'+e[t]+'" ';return n}():ir)+">"+(t?t:ir)+"</div>"}function me(e,t){for(var n,r=t.split(fr),i=0;i<r.length;i++){if(!e.hasOwnProperty(r[i]))return;n=e[r[i]],i<r.length&&be(n)===o.o&&(e=n)}return n}function ge(e,t,n){for(var r=t.split(fr),o=r.length,i=0,s={},a=s;i<o;i++)s=s[r[i]]=i+1<o?{}:n;c.extend(e,a,!0)}function ve(e,t,r){return r===!0?r:t===n||e!==t}function ye(e,t,r,o,i){if(i===!0)return i;if(o===n&&i===n){if(r===!0)return r;r=n}return r=r===n?"w":r,o=o===n?"h":o,t===n||(e[r]!==t[r]||e[o]!==t[o])}function _e(e,t){return t===n||(e.t!==t.t||e.r!==t.r||e.b!==t.b||e.l!==t.l)}function be(e){return c.type(e)}function we(){return c.extend.apply(this,arguments)}function xe(e,t){return c.prototype.addClass.call(e,t)}function Se(e,t){return c.prototype.removeClass.call(e,t)}function ke(e){return c.prototype.remove.call(e)}function je(e,n){nt=p.defaultOptions,Le=p.nativeScrollbarStyling,Ie=we(!0,{},p.nativeScrollbarSize),Ce=we(!0,{},p.nativeScrollbarIsOverlaid),Pe=we(!0,{},p.overlayScrollbarDummySize),Ae=we(!0,{},p.rtlScrollBehavior),Q(we(!0,{},nt,n));var r=ot.callbacks;if(Ce.x&&Ce.x&&!ot.nativeScrollbarsOverlaid.initialize)return oe(r.onInitializationWithdrawn),!1;Me=p.cssCalc,Te=p.msie,Oe=p.autoUpdateRecommended,De=p.supportTransition,Ne=p.supportTransform,$e=p.supportPassiveEvents,Re=p.supportResizeObserver,xn=p.supportMutationObserver,He=p.restrictedMeasuring,lt=c(e.ownerDocument),at=c(lt[0].defaultView||lt[0].parentWindow),ct=de(lt,"html"),ut=de(ct,"body"),ft=c(e),qe=ft.is("textarea"),ze=ft.is("body"),Ue=lt[0]!==t;var o;if(ze&&(o={},o.l=Math.max(ft[gr](),ct[gr](),at[gr]()),o.t=Math.max(ft[vr](),ct[vr](),at[vr]())),qe){ft.wrap(he(Tr)),xe(ft,Br+pr+eo),pt=ft.parent();var a={};ot.sizeAutoCapable||(a[nr]=ft.css(nr),a[rr]=ft.css(rr)),pt.css(a).wrapInner(he(Vr+pr+eo)).wrapInner(he(Ur+pr+eo)).wrapInner(he(zr+pr+eo)),_t=de(pt,fr+Vr),vt=de(pt,fr+Ur),gt=de(pt,fr+zr),bt=c(he(qr)),_t.prepend(bt),ft.on(ar,D).on("drop",L).on("focus",M).on("focusout",I),Te>9||!Oe?ft.on("input",A):ft.on(Sr,O).on(kr,T)}else xe(ft,Or),pt=ft,pt.wrapInner(he(Vr)).wrapInner(he(Ur)).wrapInner(he(zr)),_t=de(pt,fr+Vr),vt=de(pt,fr+Ur),gt=de(pt,fr+zr),_t.on(Er,function(e){Kt!==!0&&(e=e.originalEvent||e,G(e.propertyName)&&K(sr))});if(Y(),$e?h(vt,ar,C):vt.on(ar,C),Le&&xe(vt,Ce.x&&Ce.y?Gr:Wr),xn){var l,u,f,d,m,g,y=s.mO(),_=s.now();_n=new y(function(e){if(Fe&&!et){var t,n=!1;c.each(e,function(){if(t=this,l=t.target,u=t.attributeName,n=u===i.c?q(t.oldValue,l.className):u!==i.s||t.oldValue!==l.style.cssText)return!1}),n&&Hn.update(sr)}}),bn=new y(function(e){if(Fe&&!et){var t,n=!1;c.each(e,function(){return t=this,n=z(t),!n}),n&&(d=s.now(),m=It||Mt,g=function(){Be||(_=d,qe&&V(),m?Hn.update():Hn.update(sr))},clearTimeout(f),wo<=0||d-_>wo||!m?g():f=setTimeout(g,wo))}})}return ze&&(xe(ct,Ar),vt[gr](o.l),vt[vr](o.t)),ht=c(he("os-resize-observer-host")),pt.prepend(ht),v(ht,S),S(),Hn.update(sr),setTimeout(function(){De&&!Be&&xe(pt,Ir)},333),Fe=!0,oe(r.onInitialized),Fe}if(se(u)){if(l.has(u)){var Ee=l.get(u);return Ee.options(f),Ee}var Ce,Pe,Ae,Oe,Te,Le,Me,Ie,De,Ne,$e,Re,He,Fe,Be,qe,ze,Ue,We,Ge,Ve,Ke,Qe,Ye,Je,Xe,Ze,et,tt,nt,rt,ot,it,st,at,lt,ct,ut,ft,pt,dt,ht,mt,gt,vt,yt,_t,bt,wt,xt,St,kt,jt,Et,Ct,Pt,At,Ot,Tt,Lt,Mt,It,Dt,Nt,$t,Rt,Ht,Ft,Bt,qt,zt,Ut,Wt,Gt,Vt,Kt,Qt,Yt,Jt,Xt,Zt,en,tn,nn,rn,on,sn,an,ln,cn,un,fn,pn,dn,hn,mn,gn,vn,yn,_n,bn,wn,xn,Sn,kn,jn,En,Cn,Pn,An,On,Tn,Ln,Mn,In,Dn,Nn,$n,Rn,Hn=new e[r],Fn={},Bn={},qn={},zn={},Un={},Wn=175,Gn="-hidden",Vn="margin-",Kn="padding-",Qn="border-",Yn="top",Jn="right",Xn="bottom",Zn="left",er="min-",tr="max-",nr="width",rr="height",or="float",ir="",sr="auto",ar="scroll",lr="100%",cr="x",ur="y",fr=".",pr=" ",dr="scrollbar",hr="-horizontal",mr="-vertical",gr=ar+"Left",vr=ar+"Top",yr="mousedown touchstart",_r="mouseup touchend touchcancel",br="mousemove touchmove",wr="mouseenter",xr="mouseleave",Sr="keydown",kr="keyup",jr="selectstart",Er="transitionend webkitTransitionEnd oTransitionEnd",Cr="__overlayScrollbarsRO__",Pr="os-",Ar=Pr+"html",Or=Pr+"host",Tr=Or+"-textarea",Lr=Or+"-"+dr+hr+Gn,Mr=Or+"-"+dr+mr+Gn,Ir=Or+"-transition",Dr=Or+"-rtl",Nr=Or+"-resize-disabled",$r=Or+"-scrolling",Rr=Or+"-overflow",Hr=Rr+"-x",Fr=Rr+"-y",Br=Pr+"textarea",qr=Br+"-cover",zr=Pr+"padding",Ur=Pr+"viewport",Wr=Ur+"-native-scrollbars-invisible",Gr=Ur+"-native-scrollbars-overlaid",Vr=Pr+"content",Kr=Pr+"content-arrange",Qr=Pr+"content-glue",Yr=Pr+"size-auto-observer",Jr=Pr+"resize-observer",Xr=Pr+"resize-observer-item",Zr=Xr+"-final",eo=Pr+"text-inherit",to=Pr+dr,no=to+"-track",ro=no+"-off",oo=to+"-handle",io=oo+"-off",so=to+"-unusable",ao=to+"-"+sr+Gn,lo=to+"-corner",co=lo+"-resize",uo=co+"-both",fo=co+hr,po=co+mr,ho=to+hr,mo=to+mr,go=Pr+"dragging",vo=Pr+"theme-none",yo={},_o=33,bo=[],wo=11,xo=[112,113,114,115,116,117,118,119,120,121,123,33,34,37,38,39,40,16,17,18,19,20,144],So=[],ko={},jo={};return Hn.sleep=function(){et=!0},Hn.update=function(e){var t,n,r="zoom"===e,o="img",i="load";e===sr?(t=W(),n=U(),(t||n)&&K(!1,n)):r?K(!0,!0):(e=et||e,et=!1,K(!1,!1,e)),qe||r||_t.find(o).each(function(e,t){var n=s.inA(t,bo);n===-1&&(t=c(t),t.off(i,F).on(i,F))})},Hn.options=function(e,t){if(c.isEmptyObject(e)||!c.isPlainObject(e)){if(be(e)===o.s){if(arguments.length>=2){var n={};return ge(n,e,t),Q(n),void K()}return me(rt,e)}return rt}Q(e);var r=et||!1;et=!1,K(),et=r},Hn.destroy=function(){Be=!0,d.remove(Hn),x(),y(ht),Ge&&y(dt),ke(ht),mt!==n&&ke(mt),yt!==n&&ke(yt),Ge&&ke(dt),$e?(m(pt,br,E),m(pt,wr,k),m(pt,xr,j)):pt.off(br,E).off(wr,k).off(xr,j),ke(xt),ke(jt),wt&&ke(wt),Dn||R(),_t.contents().unwrap().unwrap().unwrap(),ze&&Se(ct,Ar),qe?(ft.off(ar,D).off("drop",L).off("focus",M).off("focusout",I),Te>9||!Oe?ft.off("input",A):ft.off(Sr,O).off(kr,T),ke(bt),Se(ft,Br+pr+eo).unwrap().removeAttr(i.s),ke(pt)):(Se(ft,Or),Se(pt,[Or,Nr,Dr,Lr,Mr,Ir,$r,Rr,Hr,Fr,vo,hn].join(pr)));for(var e=0;e<bo.length;e++)c(bo[e]).off("load",F);bo=n,l.rem(u),oe(ot.callbacks.onDestroyed);for(var t in Hn)delete Hn[t];Hn=n},Hn.scroll=function(t,r,s,l){if(0===arguments.length||t===n){var u=Bn,f=qn,p=dn&&Ze&&Ae.i,d=dn&&Ze&&Ae.n,h=u.cs,m=u.csr,g=u.ms;return m=p?1-m:m,h=p?g-h:h,h*=d?-1:1,g*=d?-1:1,{x:{position:h,ratio:m,max:g,handleOffset:u.ho,handleLength:u.hl,handleLengthRatio:u.hlr,trackLength:u.tl,isRTL:Ze,isRTLNormalized:dn},y:{position:f.cs,ratio:f.csr,max:f.ms,handleOffset:f.ho,handleLength:f.hl,handleLengthRatio:f.hlr,trackLength:f.tl}}}var v,y=[cr,Zn,"l"],_=[ur,Yn,"t"],b=["+=","-=","*=","/="],w={},x=be(r)===o.o,S="end",k="begin",j="center",E="nearest",C={axis:"xy",block:[k,k],margin:[0,0,0,0]},P=[cr,ur,"xy","yx"],A=[k,S,j,E],O=t.hasOwnProperty("el"),T=O?t.el:t,L=!!(T instanceof c||a)&&T instanceof a,M=!L&&se(T),I=function(e,t){for(v=0;v<t.length;v++)if(e===t[v])return!0;return!1},D=function(e){var t={};if(be(e)===o.a&&e.length>0)t.x=e[0],t.y=e[1];else if(be(e)===o.s||be(e)===o.n)t.x=e,t.y=e;else if(be(e)===o.o){e=we({},e),v=0;for(var n in e)e.hasOwnProperty(n)&&(v>2&&delete e[n],v++);var r=function(t){var n=t?y:_;for(v=0;v<n.length;v++)if(n[v]in e)return e[n[v]]};t.x=r(!0),t.y=r(!1)}return t},N=function(t,r){var i,s,a,l=t?Bn:qn,c=l.cs,u=l.ms,f=" * ",p=Ze&&t,d=p&&Ae.n&&!dn,h="replace";if(be(r)===o.s){if(r.length>2){var m=r.substr(0,2);for(v=0;v<b.length;v++)if(m===b[v]){i=b[v];break}}r=i!==n?r.substr(2):r,r=r[h](/min/g,0),r=r[h](/</g,0),r=r[h](/max/g,(d?"-":ir)+lr),r=r[h](/>/g,(d?"-":ir)+lr),r=r[h](/px/g,ir),r=r[h](/%/g,f+u*(p&&Ae.n?-1:1)/100),r=r[h](/vw/g,f+zn.w),r=r[h](/vh/g,f+zn.h),s=le(e.parseFloat(e.eval(r)).toFixed())}else be(r)===o.n&&(s=r);if(!isNaN(s)&&s!==n&&be(s)===o.n){var g=dn&&p,y=c*(g&&Ae.n?-1:1),_=g&&Ae.i,w=g&&Ae.n;switch(y=_?u-y:y,i){case"+=":a=y+s;break;case"-=":a=y-s;break;case"*=":a=y*s;break;case"/=":a=y/s;break;default:a=s}_&&(a=u-a),w&&(a*=-1),p&&Ae.n?(a=Math.max(u,a),a=Math.min(0,a)):(a=Math.min(u,a),a=Math.max(0,a)),a===c&&(a=n)}return a};if(L||M){var $=L?T:c(T);if(0===$.length)return;if(O){var R,H,F,B=t.axis,q=t.block,z=be(q),U=t.margin,W=be(U);if(z===o.s)q=[q,q];else if(z===o.a)if(H=q.length,H>2||H<1)q=n;else{for(R=!0,1===H&&(q[1]=k),v=0;v<H;v++){var G=q[v];if(be(G)!==o.s||!I(G,A)){R=!1;break}}R||(q=n)}else q=n;if(W===o.n)U=[U,U,U,U];else if(W===o.b)U=U?[le($.css(Vn+Yn)),le($.css(Vn+Jn)),le($.css(Vn+Xn)),le($.css(Vn+Zn))]:[0,0,0,0];else if(W===o.a)if(F=U.length,2!==F&&4!==F)U=n;else{for(R=!0,v=0;v<F;v++)if(be(U[v])!==o.n){R=!1;break}R?2===F&&(U=[U[0],U[1],U[0],U[1]]):U=n}else U=n;C.axis=I(B,P)?B:C.axis,C.block=q||C.block,C.margin=U||C.margin}var V=$.offset(),K=gt.offset(),Q={l:Bn.cs,t:qn.cs},Y=C.axis,J=C.block,X=C.margin,Z={x:J[0]===(Ze?k:S),y:J[1]===S},ee={x:J[0]===j,y:J[1]===j},te={x:J[0]===E,y:J[1]===E},ne={},oe=Z.x||Z.y||ee.x||ee.y||te.x||te.y;V.top-=X[0],V.left-=X[3];var ie={
|
13 |
x:Math.round(V.left-K.left+Q.l),y:Math.round(V.top-K.top+Q.t)};if(Ze&&(Ae.n||Ae.i||(ie.x=Math.round(K.left-V.left+Q.l)),Ae.n&&dn&&(ie.x*=-1),Ae.i&&dn&&(ie.x=Math.round(K.left-V.left+(Bn.ms-Q.l)))),oe){var ae,ce={};Ne?(ae=$[0].getBoundingClientRect(),ce={w:ae[nr],h:ae[rr]}):ce={w:$[0][i.oW],h:$[0][i.oH]};var ue={w:ce.w+X[3]+X[1],h:ce.h+X[0]+X[2]},fe=function(e){var t=re(e),n=t._wh,r=t.lt,o=t.xy,i=ee[o]?2:1,s=V[r]+ue[n]/2,a=K[r]+zn[n]/2;te[o]&&(ne[o]=ue[n]<=zn[n]&&V[r]>=K[r]&&V[r]+ue[n]<=K[r]+zn[n],Z[o]=ue[n]<zn[n]?s>a:s<a),(Z[o]||ee[o])&&(ie[o]-=(zn[n]/i-ue[n]/i)*(e&&Ze&&dn?-1:1))};fe(!0),fe(!1)}(Y===cr||ne.y)&&delete ie.y,(Y===ur||ne.x)&&delete ie.x,t=ie}w.x=N(!0,D(t).x),w.y=N(!1,D(t).y);var pe=w.x!==n,de=w.y!==n;if(r>0||x){var he={};if(pe&&(he[gr]=w.x),de&&(he[vr]=w.y),x)vt.animate(he,r);else{var me={duration:r,complete:l};if(be(s)===o.a){var ge={};ge[gr]=s[0],ge[vr]=s[1],me.specialEasing=ge}else me.easing=s;vt.animate(he,me)}}else pe&&vt[gr](w.x),de&&vt[vr](w.y)},Hn.scrollStop=function(e,t,n){vt.stop(e,t,n)},Hn.getElements=function(){return{target:ft[0],host:pt[0],padding:gt[0],viewport:vt[0],content:_t[0],scrollbarHorizontal:{scrollbar:xt[0],track:St[0],handle:kt[0]},scrollbarVertical:{scrollbar:jt[0],track:Et[0],handle:Ct[0]},scrollbarCorner:wt}},Hn.getState=function(e){var t=function(e){if(!c.isPlainObject(e))return e;var t=we(!0,{},e),n=function(e,n){t.hasOwnProperty(e)&&(t[n]=t[e],delete t[e])};return n("w",nr),n("h",rr),delete t.c,t},n={sleeping:t(et)||!1,autoUpdate:t(!wn),widthAuto:t(Mt),heightAuto:t(It),padding:t($t),overflowAmount:t(Gt),hideOverflow:t(Lt),hasOverflow:t(Tt),contentScrollSize:t(At),viewportSize:t(zn),hostSize:t(Pt),documentMixed:t(Ue)};return be(e)===o.s?me(n,e):n},je(u,f)?(l.add(u,Hn),Hn):void(Hn=n)}}var h,m,g=function(){var e=[o.b,o.n,o.s,o.a,o.o,o.f,o.z],t=" ",n=":",r=[o.z,o.s],i=o.b,s=o.n,a=[o.z,i],l=[o.z,o.f],u="n:none b:both h:horizontal v:vertical",f="v-h:visible-hidden v-s:visible-scroll s:scroll h:hidden",p="v:visible h:hidden a:auto",d="n:never s:scroll l:leave m:move",h={className:["os-theme-dark",r],resize:["none",u],sizeAutoCapable:[!0,i],clipAlways:[!0,i],normalizeRTL:[!0,i],paddingAbsolute:[!1,i],autoUpdate:[null,a],autoUpdateInterval:[33,s],nativeScrollbarsOverlaid:{showNativeScrollbars:[!1,i],initialize:[!0,i]},overflowBehavior:{x:["scroll",f],y:["scroll",f]},scrollbars:{visibility:["auto",p],autoHide:["never",d],autoHideDelay:[800,s],dragScrolling:[!0,i],clickScrolling:[!1,i],touchSupport:[!0,i]},textarea:{dynWidth:[!1,i],dynHeight:[!1,i]},callbacks:{onInitialized:[null,l],onInitializationWithdrawn:[null,l],onDestroyed:[null,l],onScrollStart:[null,l],onScroll:[null,l],onScrollStop:[null,l],onOverflowChanged:[null,l],onOverflowAmountChanged:[null,l],onDirectionChanged:[null,l],onContentSizeChanged:[null,l],onHostSizeChanged:[null,l],onUpdated:[null,l]}},m=function(e){var t=function(n){var r,i,s;for(r in n)n.hasOwnProperty(r)&&(i=n[r],s=c.type(i),s===o.a?n[r]=i[e?1:0]:s===o.o&&(n[r]=t(i)));return n};return t(c.extend(!0,{},h))};return{d:m(),t:m(!0),v:function(r,i,s,a,l){var u={},f=c.extend(!0,{},r),p=function(r,i,l,u){for(var f in i)if(i.hasOwnProperty(f)&&r.hasOwnProperty(f)){var d,h,m,g,v,y,_,b,w=!1,x=i[f],S=c.type(x),k=c.type(x)!==o.a?[x]:x,j=r[f],E=c.type(j),C=u?u+".":"",P='The option "'+C+f+"\" wasn't set, because",A=[],O=[];if(S===o.o)l[f]={},p(j,x,l[f],C+f),c.isEmptyObject(j)&&delete r[f];else{for(y=0;y<k.length;y++)if(v=k[y],S=c.type(v),m=S===o.s&&c.inArray(v,e)===-1)for(A.push(o.s),d=v.split(t),O=O.concat(d),_=0;_<d.length;_++){for(h=d[_].split(n),g=h[0],b=0;b<h.length;b++)if(j===h[b]){w=!0;break}if(w)break}else if(A.push(v),E===v){w=!0;break}w?l[f]=m&&a?g:j:s&&console.warn(P+" it doesn't accept the type [ "+E.toUpperCase()+' ] with the value of "'+j+'".\r\nAccepted types are: [ '+A.join(", ").toUpperCase()+" ]."+(O.length>0?"\r\nValid strings are: [ "+O.join(", ").split(n).join(", ")+" ].":"")),delete r[f]}}};return p(f,i,u),l?c.extend(!0,u,f):!c.isEmptyObject(f)&&s&&console.warn("The following options are discarded due to invalidity:\r\n"+JSON.stringify(f,null,2)),u}}}();return e[r]=function(t,o){if(0===arguments.length)return this;u();var i,s,a=[];return c.isPlainObject(o)?t&&t.length?(c.each(t,function(){i=this,i!==n&&a.push(d(i,o,h,m))}),s=a.length>1?a:a[0]):s=d(t,o,h,m):t&&(t.length&&t.length>0?(c.each(t,function(){i=l.get(this),"!"===o?i instanceof e[r]&&a.push(i):a.push(i)}),s=a.length>1?a:a[0]):s=l.get(t)),s},e[r].globals=function(){u();var e=c.extend(!0,{},h);return delete e.msie,e},e[r].defaultOptions=function(e){u();var t=h.defaultOptions;return e===n?c.extend(!0,{},t):void(h.defaultOptions=c.extend(!0,{},t,g.v(e,g.t,!0)))},e[r]}(s,c,l);return a&&a.fn&&(a.fn.overlayScrollbars=function(e){var t=this;return a.isPlainObject(e)?(a.each(t,function(){u(this,e)}),t):u(t,e)}),u})},{}],379:[function(e,t,n){(function(e){function t(e,t){for(var n=0,r=e.length-1;r>=0;r--){var o=e[r];"."===o?e.splice(r,1):".."===o?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n--;n)e.unshift("..");return e}function r(e,t){if(e.filter)return e.filter(t);for(var n=[],r=0;r<e.length;r++)t(e[r],r,e)&&n.push(e[r]);return n}var o=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,i=function(e){return o.exec(e).slice(1)};n.resolve=function(){for(var n="",o=!1,i=arguments.length-1;i>=-1&&!o;i--){var s=i>=0?arguments[i]:e.cwd();if("string"!=typeof s)throw new TypeError("Arguments to path.resolve must be strings");s&&(n=s+"/"+n,o="/"===s.charAt(0))}return n=t(r(n.split("/"),function(e){return!!e}),!o).join("/"),(o?"/":"")+n||"."},n.normalize=function(e){var o=n.isAbsolute(e),i="/"===s(e,-1);return e=t(r(e.split("/"),function(e){return!!e}),!o).join("/"),e||o||(e="."),e&&i&&(e+="/"),(o?"/":"")+e},n.isAbsolute=function(e){return"/"===e.charAt(0)},n.join=function(){var e=Array.prototype.slice.call(arguments,0);return n.normalize(r(e,function(e,t){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e}).join("/"))},n.relative=function(e,t){function r(e){for(var t=0;t<e.length&&""===e[t];t++);for(var n=e.length-1;n>=0&&""===e[n];n--);return t>n?[]:e.slice(t,n-t+1)}e=n.resolve(e).substr(1),t=n.resolve(t).substr(1);for(var o=r(e.split("/")),i=r(t.split("/")),s=Math.min(o.length,i.length),a=s,l=0;l<s;l++)if(o[l]!==i[l]){a=l;break}for(var c=[],l=a;l<o.length;l++)c.push("..");return c=c.concat(i.slice(a)),c.join("/")},n.sep="/",n.delimiter=":",n.dirname=function(e){var t=i(e),n=t[0],r=t[1];return n||r?(r&&(r=r.substr(0,r.length-1)),n+r):"."},n.basename=function(e,t){var n=i(e)[2];return t&&n.substr(-1*t.length)===t&&(n=n.substr(0,n.length-t.length)),n},n.extname=function(e){return i(e)[3]};var s="b"==="ab".substr(-1)?function(e,t,n){return e.substr(t,n)}:function(e,t,n){return t<0&&(t=e.length+t),e.substr(t,n)}}).call(this,e("_process"))},{_process:380}],380:[function(e,t,n){function r(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function i(e){if(f===setTimeout)return setTimeout(e,0);if((f===r||!f)&&setTimeout)return f=setTimeout,setTimeout(e,0);try{return f(e,0)}catch(t){try{return f.call(null,e,0)}catch(t){return f.call(this,e,0)}}}function s(e){if(p===clearTimeout)return clearTimeout(e);if((p===o||!p)&&clearTimeout)return p=clearTimeout,clearTimeout(e);try{return p(e)}catch(t){try{return p.call(null,e)}catch(t){return p.call(this,e)}}}function a(){g&&h&&(g=!1,h.length?m=h.concat(m):v=-1,m.length&&l())}function l(){if(!g){var e=i(a);g=!0;for(var t=m.length;t;){for(h=m,m=[];++v<t;)h&&h[v].run();v=-1,t=m.length}h=null,g=!1,s(e)}}function c(e,t){this.fun=e,this.array=t}function u(){}var f,p,d=t.exports={};!function(){try{f="function"==typeof setTimeout?setTimeout:r}catch(e){f=r}try{p="function"==typeof clearTimeout?clearTimeout:o}catch(e){p=o}}();var h,m=[],g=!1,v=-1;d.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];m.push(new c(e,t)),1!==m.length||g||i(l)},c.prototype.run=function(){this.fun.apply(null,this.array)},d.title="browser",d.browser=!0,d.env={},d.argv=[],d.version="",d.versions={},d.on=u,d.addListener=u,d.once=u,d.off=u,d.removeListener=u,d.removeAllListeners=u,d.emit=u,d.prependListener=u,d.prependOnceListener=u,d.listeners=function(e){return[]},d.binding=function(e){throw new Error("process.binding is not supported")},d.cwd=function(){return"/"},d.chdir=function(e){throw new Error("process.chdir is not supported")},d.umask=function(){return 0}},{}],381:[function(e,t,n){"use strict";function r(e){return"/"===e.charAt(0)}function o(e,t){for(var n=t,r=n+1,o=e.length;r<o;n+=1,r+=1)e[n]=e[r];e.pop()}function i(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=e&&e.split("/")||[],i=t&&t.split("/")||[],s=e&&r(e),a=t&&r(t),l=s||a;if(e&&r(e)?i=n:n.length&&(i.pop(),i=i.concat(n)),!i.length)return"/";var c=void 0;if(i.length){var u=i[i.length-1];c="."===u||".."===u||""===u}else c=!1;for(var f=0,p=i.length;p>=0;p--){var d=i[p];"."===d?o(i,p):".."===d?(o(i,p),f++):f&&(o(i,p),f--)}if(!l)for(;f--;f)i.unshift("..");!l||""===i[0]||i[0]&&r(i[0])||i.unshift("");var h=i.join("/");return c&&"/"!==h.substr(-1)&&(h+="/"),h}n.__esModule=!0,n["default"]=i,t.exports=n["default"]},{}],382:[function(e,t,n){!function(n){"function"==typeof define&&define.amd?define(["jquery"],n):"object"==typeof t&&t.exports?t.exports=function(t,r){return void 0===r&&(r="undefined"!=typeof window?e("jquery"):e("jquery")(t)),n(r),r}:n(jQuery)}(function(e){var t=function(){if(e&&e.fn&&e.fn.select2&&e.fn.select2.amd)var t=e.fn.select2.amd;var t;return function(){if(!t||!t.requirejs){t?n=t:t={};var e,n,r;!function(t){function o(e,t){return w.call(e,t)}function i(e,t){var n,r,o,i,s,a,l,c,u,f,p,d,h=t&&t.split("/"),m=_.map,g=m&&m["*"]||{};if(e){for(e=e.split("/"),s=e.length-1,_.nodeIdCompat&&S.test(e[s])&&(e[s]=e[s].replace(S,"")),"."===e[0].charAt(0)&&h&&(d=h.slice(0,h.length-1),e=d.concat(e)),u=0;u<e.length;u++)if(p=e[u],"."===p)e.splice(u,1),u-=1;else if(".."===p){if(0===u||1===u&&".."===e[2]||".."===e[u-1])continue;u>0&&(e.splice(u-1,2),u-=2)}e=e.join("/")}if((h||g)&&m){for(n=e.split("/"),u=n.length;u>0;u-=1){if(r=n.slice(0,u).join("/"),h)for(f=h.length;f>0;f-=1)if(o=m[h.slice(0,f).join("/")],o&&(o=o[r])){i=o,a=u;break}if(i)break;!l&&g&&g[r]&&(l=g[r],c=u)}!i&&l&&(i=l,a=c),i&&(n.splice(0,a,i),e=n.join("/"))}return e}function s(e,n){return function(){var r=x.call(arguments,0);return"string"!=typeof r[0]&&1===r.length&&r.push(null),h.apply(t,r.concat([e,n]))}}function a(e){return function(t){return i(t,e)}}function l(e){return function(t){v[e]=t}}function c(e){if(o(y,e)){var n=y[e];delete y[e],b[e]=!0,d.apply(t,n)}if(!o(v,e)&&!o(b,e))throw new Error("No "+e);return v[e]}function u(e){var t,n=e?e.indexOf("!"):-1;return n>-1&&(t=e.substring(0,n),e=e.substring(n+1,e.length)),[t,e]}function f(e){return e?u(e):[]}function p(e){return function(){return _&&_.config&&_.config[e]||{}}}var d,h,m,g,v={},y={},_={},b={},w=Object.prototype.hasOwnProperty,x=[].slice,S=/\.js$/;m=function(e,t){var n,r=u(e),o=r[0],s=t[1];return e=r[1],o&&(o=i(o,s),n=c(o)),o?e=n&&n.normalize?n.normalize(e,a(s)):i(e,s):(e=i(e,s),r=u(e),o=r[0],e=r[1],o&&(n=c(o))),{f:o?o+"!"+e:e,n:e,pr:o,p:n}},g={require:function(e){return s(e)},exports:function(e){var t=v[e];return"undefined"!=typeof t?t:v[e]={}},module:function(e){return{id:e,uri:"",exports:v[e],config:p(e)}}},d=function(e,n,r,i){var a,u,p,d,h,_,w,x=[],S=typeof r;if(i=i||e,_=f(i),"undefined"===S||"function"===S){for(n=!n.length&&r.length?["require","exports","module"]:n,h=0;h<n.length;h+=1)if(d=m(n[h],_),u=d.f,"require"===u)x[h]=g.require(e);else if("exports"===u)x[h]=g.exports(e),w=!0;else if("module"===u)a=x[h]=g.module(e);else if(o(v,u)||o(y,u)||o(b,u))x[h]=c(u);else{if(!d.p)throw new Error(e+" missing "+u);d.p.load(d.n,s(i,!0),l(u),{}),x[h]=v[u]}p=r?r.apply(v[e],x):void 0,e&&(a&&a.exports!==t&&a.exports!==v[e]?v[e]=a.exports:p===t&&w||(v[e]=p))}else e&&(v[e]=r)},e=n=h=function(e,n,r,o,i){if("string"==typeof e)return g[e]?g[e](n):c(m(e,f(n)).f);if(!e.splice){if(_=e,_.deps&&h(_.deps,_.callback),!n)return;n.splice?(e=n,n=r,r=null):e=t}return n=n||function(){},"function"==typeof r&&(r=o,o=i),o?d(t,e,n,r):setTimeout(function(){d(t,e,n,r)},4),h},h.config=function(e){return h(e)},e._defined=v,r=function(e,t,n){if("string"!=typeof e)throw new Error("See almond README: incorrect module build, no module name");t.splice||(n=t,t=[]),o(v,e)||o(y,e)||(y[e]=[e,t,n])},r.amd={jQuery:!0}}(),t.requirejs=e,t.require=n,t.define=r}}(),t.define("almond",function(){}),t.define("jquery",[],function(){var t=e||$;return null==t&&console&&console.error&&console.error("Select2: An instance of jQuery or a jQuery-compatible library was not found. Make sure that you are including jQuery before Select2 on your web page."),t}),t.define("select2/utils",["jquery"],function(e){function t(e){var t=e.prototype,n=[];for(var r in t){var o=t[r];"function"==typeof o&&"constructor"!==r&&n.push(r)}return n}var n={};n.Extend=function(e,t){function n(){this.constructor=e}var r={}.hasOwnProperty;for(var o in t)r.call(t,o)&&(e[o]=t[o]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e},n.Decorate=function(e,n){function r(){var t=Array.prototype.unshift,r=n.prototype.constructor.length,o=e.prototype.constructor;r>0&&(t.call(arguments,e.prototype.constructor),o=n.prototype.constructor),o.apply(this,arguments)}function o(){this.constructor=r}var i=t(n),s=t(e);n.displayName=e.displayName,r.prototype=new o;for(var a=0;a<s.length;a++){var l=s[a];r.prototype[l]=e.prototype[l]}for(var c=(function(e){var t=function(){};e in r.prototype&&(t=r.prototype[e]);var o=n.prototype[e];return function(){var e=Array.prototype.unshift;return e.call(arguments,t),o.apply(this,arguments)}}),u=0;u<i.length;u++){var f=i[u];r.prototype[f]=c(f)}return r};var r=function(){this.listeners={}};r.prototype.on=function(e,t){this.listeners=this.listeners||{},e in this.listeners?this.listeners[e].push(t):this.listeners[e]=[t]},r.prototype.trigger=function(e){var t=Array.prototype.slice,n=t.call(arguments,1);this.listeners=this.listeners||{},null==n&&(n=[]),0===n.length&&n.push({}),n[0]._type=e,e in this.listeners&&this.invoke(this.listeners[e],t.call(arguments,1)),"*"in this.listeners&&this.invoke(this.listeners["*"],arguments)},r.prototype.invoke=function(e,t){for(var n=0,r=e.length;n<r;n++)e[n].apply(this,t)},n.Observable=r,n.generateChars=function(e){for(var t="",n=0;n<e;n++){var r=Math.floor(36*Math.random());t+=r.toString(36)}return t},n.bind=function(e,t){return function(){e.apply(t,arguments)}},n._convertData=function(e){for(var t in e){var n=t.split("-"),r=e;if(1!==n.length){for(var o=0;o<n.length;o++){var i=n[o];i=i.substring(0,1).toLowerCase()+i.substring(1),i in r||(r[i]={}),o==n.length-1&&(r[i]=e[t]),r=r[i]}delete e[t]}}return e},n.hasScroll=function(t,n){var r=e(n),o=n.style.overflowX,i=n.style.overflowY;return(o!==i||"hidden"!==i&&"visible"!==i)&&("scroll"===o||"scroll"===i||(r.innerHeight()<n.scrollHeight||r.innerWidth()<n.scrollWidth))},n.escapeMarkup=function(e){var t={"\\":"\","&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};return"string"!=typeof e?e:String(e).replace(/[&<>"'\/\\]/g,function(e){return t[e]})},n.appendMany=function(t,n){if("1.7"===e.fn.jquery.substr(0,3)){var r=e();e.map(n,function(e){r=r.add(e)}),n=r}t.append(n)},n.__cache={};var o=0;return n.GetUniqueElementId=function(e){var t=e.getAttribute("data-select2-id");return null==t&&(e.id?(t=e.id,e.setAttribute("data-select2-id",t)):(e.setAttribute("data-select2-id",++o),t=o.toString())),t},n.StoreData=function(e,t,r){var o=n.GetUniqueElementId(e);n.__cache[o]||(n.__cache[o]={}),n.__cache[o][t]=r},n.GetData=function(t,r){var o=n.GetUniqueElementId(t);return r?n.__cache[o]&&null!=n.__cache[o][r]?n.__cache[o][r]:e(t).data(r):n.__cache[o]},n.RemoveData=function(e){var t=n.GetUniqueElementId(e);null!=n.__cache[t]&&delete n.__cache[t]},n}),t.define("select2/results",["jquery","./utils"],function(e,t){function n(e,t,r){this.$element=e,this.data=r,this.options=t,n.__super__.constructor.call(this)}return t.Extend(n,t.Observable),n.prototype.render=function(){var t=e('<ul class="select2-results__options" role="tree"></ul>');return this.options.get("multiple")&&t.attr("aria-multiselectable","true"),this.$results=t,t},n.prototype.clear=function(){this.$results.empty()},n.prototype.displayMessage=function(t){var n=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var r=e('<li role="treeitem" aria-live="assertive" class="select2-results__option"></li>'),o=this.options.get("translations").get(t.message);r.append(n(o(t.args))),r[0].className+=" select2-results__message",this.$results.append(r)},n.prototype.hideMessages=function(){this.$results.find(".select2-results__message").remove()},n.prototype.append=function(e){this.hideLoading();var t=[];if(null==e.results||0===e.results.length)return void(0===this.$results.children().length&&this.trigger("results:message",{message:"noResults"}));e.results=this.sort(e.results);for(var n=0;n<e.results.length;n++){var r=e.results[n],o=this.option(r);t.push(o)}this.$results.append(t)},n.prototype.position=function(e,t){var n=t.find(".select2-results");n.append(e)},n.prototype.sort=function(e){var t=this.options.get("sorter");return t(e)},n.prototype.highlightFirstItem=function(){var e=this.$results.find(".select2-results__option[aria-selected]"),t=e.filter("[aria-selected=true]");t.length>0?t.first().trigger("mouseenter"):e.first().trigger("mouseenter"),this.ensureHighlightVisible()},n.prototype.setClasses=function(){var n=this;this.data.current(function(r){var o=e.map(r,function(e){return e.id.toString()}),i=n.$results.find(".select2-results__option[aria-selected]");i.each(function(){var n=e(this),r=t.GetData(this,"data"),i=""+r.id;null!=r.element&&r.element.selected||null==r.element&&e.inArray(i,o)>-1?n.attr("aria-selected","true"):n.attr("aria-selected","false")})})},n.prototype.showLoading=function(e){this.hideLoading();var t=this.options.get("translations").get("searching"),n={disabled:!0,loading:!0,text:t(e)},r=this.option(n);r.className+=" loading-results",this.$results.prepend(r)},n.prototype.hideLoading=function(){this.$results.find(".loading-results").remove()},n.prototype.option=function(n){var r=document.createElement("li");r.className="select2-results__option";var o={role:"treeitem","aria-selected":"false"};n.disabled&&(delete o["aria-selected"],o["aria-disabled"]="true"),null==n.id&&delete o["aria-selected"],null!=n._resultId&&(r.id=n._resultId),n.title&&(r.title=n.title),n.children&&(o.role="group",o["aria-label"]=n.text,delete o["aria-selected"]);for(var i in o){var s=o[i];r.setAttribute(i,s)}if(n.children){var a=e(r),l=document.createElement("strong");l.className="select2-results__group";e(l);this.template(n,l);for(var c=[],u=0;u<n.children.length;u++){var f=n.children[u],p=this.option(f);c.push(p)}var d=e("<ul></ul>",{"class":"select2-results__options select2-results__options--nested"});d.append(c),a.append(l),a.append(d)}else this.template(n,r);return t.StoreData(r,"data",n),r},n.prototype.bind=function(n,r){var o=this,i=n.id+"-results";this.$results.attr("id",i),n.on("results:all",function(e){o.clear(),o.append(e.data),n.isOpen()&&(o.setClasses(),o.highlightFirstItem())}),n.on("results:append",function(e){o.append(e.data),n.isOpen()&&o.setClasses()}),n.on("query",function(e){o.hideMessages(),o.showLoading(e)}),n.on("select",function(){n.isOpen()&&(o.setClasses(),o.highlightFirstItem())}),n.on("unselect",function(){n.isOpen()&&(o.setClasses(),o.highlightFirstItem())}),n.on("open",function(){o.$results.attr("aria-expanded","true"),o.$results.attr("aria-hidden","false"),o.setClasses(),o.ensureHighlightVisible()}),n.on("close",function(){o.$results.attr("aria-expanded","false"),o.$results.attr("aria-hidden","true"),o.$results.removeAttr("aria-activedescendant")}),n.on("results:toggle",function(){var e=o.getHighlightedResults();0!==e.length&&e.trigger("mouseup")}),n.on("results:select",function(){var e=o.getHighlightedResults();if(0!==e.length){var n=t.GetData(e[0],"data");"true"==e.attr("aria-selected")?o.trigger("close",{}):o.trigger("select",{data:n})}}),n.on("results:previous",function(){var e=o.getHighlightedResults(),t=o.$results.find("[aria-selected]"),n=t.index(e);if(!(n<=0)){var r=n-1;0===e.length&&(r=0);var i=t.eq(r);i.trigger("mouseenter");var s=o.$results.offset().top,a=i.offset().top,l=o.$results.scrollTop()+(a-s);0===r?o.$results.scrollTop(0):a-s<0&&o.$results.scrollTop(l)}}),n.on("results:next",function(){var e=o.getHighlightedResults(),t=o.$results.find("[aria-selected]"),n=t.index(e),r=n+1;if(!(r>=t.length)){var i=t.eq(r);i.trigger("mouseenter");var s=o.$results.offset().top+o.$results.outerHeight(!1),a=i.offset().top+i.outerHeight(!1),l=o.$results.scrollTop()+a-s;0===r?o.$results.scrollTop(0):a>s&&o.$results.scrollTop(l)}}),n.on("results:focus",function(e){e.element.addClass("select2-results__option--highlighted")}),n.on("results:message",function(e){o.displayMessage(e)}),e.fn.mousewheel&&this.$results.on("mousewheel",function(e){var t=o.$results.scrollTop(),n=o.$results.get(0).scrollHeight-t+e.deltaY,r=e.deltaY>0&&t-e.deltaY<=0,i=e.deltaY<0&&n<=o.$results.height();r?(o.$results.scrollTop(0),e.preventDefault(),e.stopPropagation()):i&&(o.$results.scrollTop(o.$results.get(0).scrollHeight-o.$results.height()),e.preventDefault(),e.stopPropagation())}),this.$results.on("mouseup",".select2-results__option[aria-selected]",function(n){var r=e(this),i=t.GetData(this,"data");return"true"===r.attr("aria-selected")?void(o.options.get("multiple")?o.trigger("unselect",{originalEvent:n,data:i}):o.trigger("close",{})):void o.trigger("select",{originalEvent:n,data:i})}),this.$results.on("mouseenter",".select2-results__option[aria-selected]",function(n){var r=t.GetData(this,"data");o.getHighlightedResults().removeClass("select2-results__option--highlighted"),o.trigger("results:focus",{data:r,element:e(this)})})},n.prototype.getHighlightedResults=function(){var e=this.$results.find(".select2-results__option--highlighted");return e},n.prototype.destroy=function(){this.$results.remove()},n.prototype.ensureHighlightVisible=function(){var e=this.getHighlightedResults();if(0!==e.length){var t=this.$results.find("[aria-selected]"),n=t.index(e),r=this.$results.offset().top,o=e.offset().top,i=this.$results.scrollTop()+(o-r),s=o-r;i-=2*e.outerHeight(!1),n<=2?this.$results.scrollTop(0):(s>this.$results.outerHeight()||s<0)&&this.$results.scrollTop(i)}},n.prototype.template=function(t,n){var r=this.options.get("templateResult"),o=this.options.get("escapeMarkup"),i=r(t,n);null==i?n.style.display="none":"string"==typeof i?n.innerHTML=o(i):e(n).append(i)},n}),t.define("select2/keys",[],function(){var e={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46};return e}),t.define("select2/selection/base",["jquery","../utils","../keys"],function(e,t,n){function r(e,t){this.$element=e,this.options=t,r.__super__.constructor.call(this)}return t.Extend(r,t.Observable),r.prototype.render=function(){var n=e('<span class="select2-selection" role="combobox" aria-haspopup="true" aria-expanded="false"></span>');return this._tabindex=0,null!=t.GetData(this.$element[0],"old-tabindex")?this._tabindex=t.GetData(this.$element[0],"old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")),n.attr("title",this.$element.attr("title")),n.attr("tabindex",this._tabindex),this.$selection=n,n},r.prototype.bind=function(e,t){var r=this,o=(e.id+"-container",e.id+"-results");this.container=e,this.$selection.on("focus",function(e){r.trigger("focus",e)}),this.$selection.on("blur",function(e){r._handleBlur(e)}),this.$selection.on("keydown",function(e){r.trigger("keypress",e),e.which===n.SPACE&&e.preventDefault()}),e.on("results:focus",function(e){r.$selection.attr("aria-activedescendant",e.data._resultId)}),e.on("selection:update",function(e){r.update(e.data)}),e.on("open",function(){r.$selection.attr("aria-expanded","true"),r.$selection.attr("aria-owns",o),r._attachCloseHandler(e)}),e.on("close",function(){r.$selection.attr("aria-expanded","false"),r.$selection.removeAttr("aria-activedescendant"),r.$selection.removeAttr("aria-owns"),r.$selection.focus(),window.setTimeout(function(){r.$selection.focus()},0),r._detachCloseHandler(e)}),e.on("enable",function(){r.$selection.attr("tabindex",r._tabindex)}),e.on("disable",function(){r.$selection.attr("tabindex","-1")})},r.prototype._handleBlur=function(t){var n=this;window.setTimeout(function(){document.activeElement==n.$selection[0]||e.contains(n.$selection[0],document.activeElement)||n.trigger("blur",t)},1)},r.prototype._attachCloseHandler=function(n){e(document.body).on("mousedown.select2."+n.id,function(n){var r=e(n.target),o=r.closest(".select2"),i=e(".select2.select2-container--open");i.each(function(){e(this);if(this!=o[0]){var n=t.GetData(this,"element");n.select2("close")}})})},r.prototype._detachCloseHandler=function(t){e(document.body).off("mousedown.select2."+t.id)},r.prototype.position=function(e,t){var n=t.find(".selection");n.append(e)},r.prototype.destroy=function(){this._detachCloseHandler(this.container)},r.prototype.update=function(e){throw new Error("The `update` method must be defined in child classes.")},r}),t.define("select2/selection/single",["jquery","./base","../utils","../keys"],function(e,t,n,r){function o(){o.__super__.constructor.apply(this,arguments)}return n.Extend(o,t),o.prototype.render=function(){var e=o.__super__.render.call(this);return e.addClass("select2-selection--single"),e.html('<span class="select2-selection__rendered"></span><span class="select2-selection__arrow" role="presentation"><b role="presentation"></b></span>'),e},o.prototype.bind=function(e,t){var n=this;o.__super__.bind.apply(this,arguments);var r=e.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",r).attr("role","textbox").attr("aria-readonly","true"),this.$selection.attr("aria-labelledby",r),this.$selection.on("mousedown",function(e){1===e.which&&n.trigger("toggle",{originalEvent:e})}),this.$selection.on("focus",function(e){}),this.$selection.on("blur",function(e){}),e.on("focus",function(t){e.isOpen()||n.$selection.focus()})},o.prototype.clear=function(){var e=this.$selection.find(".select2-selection__rendered");e.empty(),e.removeAttr("title")},o.prototype.display=function(e,t){var n=this.options.get("templateSelection"),r=this.options.get("escapeMarkup");return r(n(e,t))},o.prototype.selectionContainer=function(){return e("<span></span>")},o.prototype.update=function(e){if(0===e.length)return void this.clear();var t=e[0],n=this.$selection.find(".select2-selection__rendered"),r=this.display(t,n);n.empty().append(r),n.attr("title",t.title||t.text)},o}),t.define("select2/selection/multiple",["jquery","./base","../utils"],function(e,t,n){function r(e,t){r.__super__.constructor.apply(this,arguments)}return n.Extend(r,t),r.prototype.render=function(){var e=r.__super__.render.call(this);return e.addClass("select2-selection--multiple"),e.html('<ul class="select2-selection__rendered"></ul>'),e},r.prototype.bind=function(t,o){var i=this;r.__super__.bind.apply(this,arguments),this.$selection.on("click",function(e){i.trigger("toggle",{originalEvent:e})}),this.$selection.on("click",".select2-selection__choice__remove",function(t){if(!i.options.get("disabled")){var r=e(this),o=r.parent(),s=n.GetData(o[0],"data");i.trigger("unselect",{originalEvent:t,data:s})}})},r.prototype.clear=function(){var e=this.$selection.find(".select2-selection__rendered");e.empty(),e.removeAttr("title")},r.prototype.display=function(e,t){var n=this.options.get("templateSelection"),r=this.options.get("escapeMarkup");return r(n(e,t))},r.prototype.selectionContainer=function(){var t=e('<li class="select2-selection__choice"><span class="select2-selection__choice__remove" role="presentation">×</span></li>');return t},r.prototype.update=function(e){if(this.clear(),0!==e.length){for(var t=[],r=0;r<e.length;r++){var o=e[r],i=this.selectionContainer(),s=this.display(o,i);i.append(s),i.attr("title",o.title||o.text),n.StoreData(i[0],"data",o),t.push(i)}var a=this.$selection.find(".select2-selection__rendered");n.appendMany(a,t)}},r}),t.define("select2/selection/placeholder",["../utils"],function(e){function t(e,t,n){this.placeholder=this.normalizePlaceholder(n.get("placeholder")),e.call(this,t,n)}return t.prototype.normalizePlaceholder=function(e,t){return"string"==typeof t&&(t={id:"",text:t}),t},t.prototype.createPlaceholder=function(e,t){var n=this.selectionContainer();return n.html(this.display(t)),n.addClass("select2-selection__placeholder").removeClass("select2-selection__choice"),n},t.prototype.update=function(e,t){var n=1==t.length&&t[0].id!=this.placeholder.id,r=t.length>1;if(r||n)return e.call(this,t);this.clear();var o=this.createPlaceholder(this.placeholder);this.$selection.find(".select2-selection__rendered").append(o)},t}),t.define("select2/selection/allowClear",["jquery","../keys","../utils"],function(e,t,n){function r(){}return r.prototype.bind=function(e,t,n){var r=this;e.call(this,t,n),null==this.placeholder&&this.options.get("debug")&&window.console&&console.error&&console.error("Select2: The `allowClear` option should be used in combination with the `placeholder` option."),this.$selection.on("mousedown",".select2-selection__clear",function(e){r._handleClear(e)}),t.on("keypress",function(e){r._handleKeyboardClear(e,t)})},r.prototype._handleClear=function(e,t){if(!this.options.get("disabled")){var r=this.$selection.find(".select2-selection__clear");if(0!==r.length){t.stopPropagation();var o=n.GetData(r[0],"data"),i=this.$element.val();this.$element.val(this.placeholder.id);var s={data:o};if(this.trigger("clear",s),s.prevented)return void this.$element.val(i);for(var a=0;a<o.length;a++)if(s={data:o[a]},this.trigger("unselect",s),s.prevented)return void this.$element.val(i);this.$element.trigger("change"),this.trigger("toggle",{})}}},r.prototype._handleKeyboardClear=function(e,n,r){r.isOpen()||n.which!=t.DELETE&&n.which!=t.BACKSPACE||this._handleClear(n)},r.prototype.update=function(t,r){if(t.call(this,r),!(this.$selection.find(".select2-selection__placeholder").length>0||0===r.length)){var o=e('<span class="select2-selection__clear">×</span>');n.StoreData(o[0],"data",r),this.$selection.find(".select2-selection__rendered").prepend(o)}},r}),t.define("select2/selection/search",["jquery","../utils","../keys"],function(e,t,n){function r(e,t,n){e.call(this,t,n)}return r.prototype.render=function(t){var n=e('<li class="select2-search select2-search--inline"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="none" spellcheck="false" role="textbox" aria-autocomplete="list" /></li>');this.$searchContainer=n,this.$search=n.find("input");var r=t.call(this);return this._transferTabIndex(),r},r.prototype.bind=function(e,r,o){var i=this;e.call(this,r,o),r.on("open",function(){i.$search.trigger("focus")}),r.on("close",function(){i.$search.val(""),i.$search.removeAttr("aria-activedescendant"),i.$search.trigger("focus")}),r.on("enable",function(){i.$search.prop("disabled",!1),i._transferTabIndex()}),r.on("disable",function(){i.$search.prop("disabled",!0)}),r.on("focus",function(e){i.$search.trigger("focus")}),r.on("results:focus",function(e){i.$search.attr("aria-activedescendant",e.id)}),this.$selection.on("focusin",".select2-search--inline",function(e){i.trigger("focus",e)}),this.$selection.on("focusout",".select2-search--inline",function(e){i._handleBlur(e)}),this.$selection.on("keydown",".select2-search--inline",function(e){e.stopPropagation(),i.trigger("keypress",e),i._keyUpPrevented=e.isDefaultPrevented();var r=e.which;if(r===n.BACKSPACE&&""===i.$search.val()){
|
14 |
var o=i.$searchContainer.prev(".select2-selection__choice");if(o.length>0){var s=t.GetData(o[0],"data");i.searchRemoveChoice(s),e.preventDefault()}}});var s=document.documentMode,a=s&&s<=11;this.$selection.on("input.searchcheck",".select2-search--inline",function(e){return a?void i.$selection.off("input.search input.searchcheck"):void i.$selection.off("keyup.search")}),this.$selection.on("keyup.search input.search",".select2-search--inline",function(e){if(a&&"input"===e.type)return void i.$selection.off("input.search input.searchcheck");var t=e.which;t!=n.SHIFT&&t!=n.CTRL&&t!=n.ALT&&t!=n.TAB&&i.handleSearch(e)})},r.prototype._transferTabIndex=function(e){this.$search.attr("tabindex",this.$selection.attr("tabindex")),this.$selection.attr("tabindex","-1")},r.prototype.createPlaceholder=function(e,t){this.$search.attr("placeholder",t.text)},r.prototype.update=function(e,t){var n=this.$search[0]==document.activeElement;if(this.$search.attr("placeholder",""),e.call(this,t),this.$selection.find(".select2-selection__rendered").append(this.$searchContainer),this.resizeSearch(),n){var r=this.$element.find("[data-select2-tag]").length;r?this.$element.focus():this.$search.focus()}},r.prototype.handleSearch=function(){if(this.resizeSearch(),!this._keyUpPrevented){var e=this.$search.val();this.trigger("query",{term:e})}this._keyUpPrevented=!1},r.prototype.searchRemoveChoice=function(e,t){this.trigger("unselect",{data:t}),this.$search.val(t.text),this.handleSearch()},r.prototype.resizeSearch=function(){this.$search.css("width","25px");var e="";if(""!==this.$search.attr("placeholder"))e=this.$selection.find(".select2-selection__rendered").innerWidth();else{var t=this.$search.val().length+1;e=.75*t+"em"}this.$search.css("width",e)},r}),t.define("select2/selection/eventRelay",["jquery"],function(e){function t(){}return t.prototype.bind=function(t,n,r){var o=this,i=["open","opening","close","closing","select","selecting","unselect","unselecting","clear","clearing"],s=["opening","closing","selecting","unselecting","clearing"];t.call(this,n,r),n.on("*",function(t,n){if(e.inArray(t,i)!==-1){n=n||{};var r=e.Event("select2:"+t,{params:n});o.$element.trigger(r),e.inArray(t,s)!==-1&&(n.prevented=r.isDefaultPrevented())}})},t}),t.define("select2/translation",["jquery","require"],function(e,t){function n(e){this.dict=e||{}}return n.prototype.all=function(){return this.dict},n.prototype.get=function(e){return this.dict[e]},n.prototype.extend=function(t){this.dict=e.extend({},t.all(),this.dict)},n._cache={},n.loadPath=function(e){if(!(e in n._cache)){var r=t(e);n._cache[e]=r}return new n(n._cache[e])},n}),t.define("select2/diacritics",[],function(){var e={"Ⓐ":"A","A":"A","À":"A","Á":"A","Â":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ā":"A","Ă":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ǡ":"A","Ä":"A","Ǟ":"A","Ả":"A","Å":"A","Ǻ":"A","Ǎ":"A","Ȁ":"A","Ȃ":"A","Ạ":"A","Ậ":"A","Ặ":"A","Ḁ":"A","Ą":"A","Ⱥ":"A","Ɐ":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ǣ":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ⓑ":"B","B":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B","Ƀ":"B","Ƃ":"B","Ɓ":"B","Ⓒ":"C","C":"C","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","Ç":"C","Ḉ":"C","Ƈ":"C","Ȼ":"C","Ꜿ":"C","Ⓓ":"D","D":"D","Ḋ":"D","Ď":"D","Ḍ":"D","Ḑ":"D","Ḓ":"D","Ḏ":"D","Đ":"D","Ƌ":"D","Ɗ":"D","Ɖ":"D","Ꝺ":"D","DZ":"DZ","DŽ":"DZ","Dz":"Dz","Dž":"Dz","Ⓔ":"E","E":"E","È":"E","É":"E","Ê":"E","Ề":"E","Ế":"E","Ễ":"E","Ể":"E","Ẽ":"E","Ē":"E","Ḕ":"E","Ḗ":"E","Ĕ":"E","Ė":"E","Ë":"E","Ẻ":"E","Ě":"E","Ȅ":"E","Ȇ":"E","Ẹ":"E","Ệ":"E","Ȩ":"E","Ḝ":"E","Ę":"E","Ḙ":"E","Ḛ":"E","Ɛ":"E","Ǝ":"E","Ⓕ":"F","F":"F","Ḟ":"F","Ƒ":"F","Ꝼ":"F","Ⓖ":"G","G":"G","Ǵ":"G","Ĝ":"G","Ḡ":"G","Ğ":"G","Ġ":"G","Ǧ":"G","Ģ":"G","Ǥ":"G","Ɠ":"G","Ꞡ":"G","Ᵹ":"G","Ꝿ":"G","Ⓗ":"H","H":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","Ȟ":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","Ⱨ":"H","Ⱶ":"H","Ɥ":"H","Ⓘ":"I","I":"I","Ì":"I","Í":"I","Î":"I","Ĩ":"I","Ī":"I","Ĭ":"I","İ":"I","Ï":"I","Ḯ":"I","Ỉ":"I","Ǐ":"I","Ȉ":"I","Ȋ":"I","Ị":"I","Į":"I","Ḭ":"I","Ɨ":"I","Ⓙ":"J","J":"J","Ĵ":"J","Ɉ":"J","Ⓚ":"K","K":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Ƙ":"K","Ⱪ":"K","Ꝁ":"K","Ꝃ":"K","Ꝅ":"K","Ꞣ":"K","Ⓛ":"L","L":"L","Ŀ":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ļ":"L","Ḽ":"L","Ḻ":"L","Ł":"L","Ƚ":"L","Ɫ":"L","Ⱡ":"L","Ꝉ":"L","Ꝇ":"L","Ꞁ":"L","LJ":"LJ","Lj":"Lj","Ⓜ":"M","M":"M","Ḿ":"M","Ṁ":"M","Ṃ":"M","Ɱ":"M","Ɯ":"M","Ⓝ":"N","N":"N","Ǹ":"N","Ń":"N","Ñ":"N","Ṅ":"N","Ň":"N","Ṇ":"N","Ņ":"N","Ṋ":"N","Ṉ":"N","Ƞ":"N","Ɲ":"N","Ꞑ":"N","Ꞥ":"N","NJ":"NJ","Nj":"Nj","Ⓞ":"O","O":"O","Ò":"O","Ó":"O","Ô":"O","Ồ":"O","Ố":"O","Ỗ":"O","Ổ":"O","Õ":"O","Ṍ":"O","Ȭ":"O","Ṏ":"O","Ō":"O","Ṑ":"O","Ṓ":"O","Ŏ":"O","Ȯ":"O","Ȱ":"O","Ö":"O","Ȫ":"O","Ỏ":"O","Ő":"O","Ǒ":"O","Ȍ":"O","Ȏ":"O","Ơ":"O","Ờ":"O","Ớ":"O","Ỡ":"O","Ở":"O","Ợ":"O","Ọ":"O","Ộ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Ɔ":"O","Ɵ":"O","Ꝋ":"O","Ꝍ":"O","Ƣ":"OI","Ꝏ":"OO","Ȣ":"OU","Ⓟ":"P","P":"P","Ṕ":"P","Ṗ":"P","Ƥ":"P","Ᵽ":"P","Ꝑ":"P","Ꝓ":"P","Ꝕ":"P","Ⓠ":"Q","Q":"Q","Ꝗ":"Q","Ꝙ":"Q","Ɋ":"Q","Ⓡ":"R","R":"R","Ŕ":"R","Ṙ":"R","Ř":"R","Ȑ":"R","Ȓ":"R","Ṛ":"R","Ṝ":"R","Ŗ":"R","Ṟ":"R","Ɍ":"R","Ɽ":"R","Ꝛ":"R","Ꞧ":"R","Ꞃ":"R","Ⓢ":"S","S":"S","ẞ":"S","Ś":"S","Ṥ":"S","Ŝ":"S","Ṡ":"S","Š":"S","Ṧ":"S","Ṣ":"S","Ṩ":"S","Ș":"S","Ş":"S","Ȿ":"S","Ꞩ":"S","Ꞅ":"S","Ⓣ":"T","T":"T","Ṫ":"T","Ť":"T","Ṭ":"T","Ț":"T","Ţ":"T","Ṱ":"T","Ṯ":"T","Ŧ":"T","Ƭ":"T","Ʈ":"T","Ⱦ":"T","Ꞇ":"T","Ꜩ":"TZ","Ⓤ":"U","U":"U","Ù":"U","Ú":"U","Û":"U","Ũ":"U","Ṹ":"U","Ū":"U","Ṻ":"U","Ŭ":"U","Ü":"U","Ǜ":"U","Ǘ":"U","Ǖ":"U","Ǚ":"U","Ủ":"U","Ů":"U","Ű":"U","Ǔ":"U","Ȕ":"U","Ȗ":"U","Ư":"U","Ừ":"U","Ứ":"U","Ữ":"U","Ử":"U","Ự":"U","Ụ":"U","Ṳ":"U","Ų":"U","Ṷ":"U","Ṵ":"U","Ʉ":"U","Ⓥ":"V","V":"V","Ṽ":"V","Ṿ":"V","Ʋ":"V","Ꝟ":"V","Ʌ":"V","Ꝡ":"VY","Ⓦ":"W","W":"W","Ẁ":"W","Ẃ":"W","Ŵ":"W","Ẇ":"W","Ẅ":"W","Ẉ":"W","Ⱳ":"W","Ⓧ":"X","X":"X","Ẋ":"X","Ẍ":"X","Ⓨ":"Y","Y":"Y","Ỳ":"Y","Ý":"Y","Ŷ":"Y","Ỹ":"Y","Ȳ":"Y","Ẏ":"Y","Ÿ":"Y","Ỷ":"Y","Ỵ":"Y","Ƴ":"Y","Ɏ":"Y","Ỿ":"Y","Ⓩ":"Z","Z":"Z","Ź":"Z","Ẑ":"Z","Ż":"Z","Ž":"Z","Ẓ":"Z","Ẕ":"Z","Ƶ":"Z","Ȥ":"Z","Ɀ":"Z","Ⱬ":"Z","Ꝣ":"Z","ⓐ":"a","a":"a","ẚ":"a","à":"a","á":"a","â":"a","ầ":"a","ấ":"a","ẫ":"a","ẩ":"a","ã":"a","ā":"a","ă":"a","ằ":"a","ắ":"a","ẵ":"a","ẳ":"a","ȧ":"a","ǡ":"a","ä":"a","ǟ":"a","ả":"a","å":"a","ǻ":"a","ǎ":"a","ȁ":"a","ȃ":"a","ạ":"a","ậ":"a","ặ":"a","ḁ":"a","ą":"a","ⱥ":"a","ɐ":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","ǣ":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","ⓑ":"b","b":"b","ḃ":"b","ḅ":"b","ḇ":"b","ƀ":"b","ƃ":"b","ɓ":"b","ⓒ":"c","c":"c","ć":"c","ĉ":"c","ċ":"c","č":"c","ç":"c","ḉ":"c","ƈ":"c","ȼ":"c","ꜿ":"c","ↄ":"c","ⓓ":"d","d":"d","ḋ":"d","ď":"d","ḍ":"d","ḑ":"d","ḓ":"d","ḏ":"d","đ":"d","ƌ":"d","ɖ":"d","ɗ":"d","ꝺ":"d","dz":"dz","dž":"dz","ⓔ":"e","e":"e","è":"e","é":"e","ê":"e","ề":"e","ế":"e","ễ":"e","ể":"e","ẽ":"e","ē":"e","ḕ":"e","ḗ":"e","ĕ":"e","ė":"e","ë":"e","ẻ":"e","ě":"e","ȅ":"e","ȇ":"e","ẹ":"e","ệ":"e","ȩ":"e","ḝ":"e","ę":"e","ḙ":"e","ḛ":"e","ɇ":"e","ɛ":"e","ǝ":"e","ⓕ":"f","f":"f","ḟ":"f","ƒ":"f","ꝼ":"f","ⓖ":"g","g":"g","ǵ":"g","ĝ":"g","ḡ":"g","ğ":"g","ġ":"g","ǧ":"g","ģ":"g","ǥ":"g","ɠ":"g","ꞡ":"g","ᵹ":"g","ꝿ":"g","ⓗ":"h","h":"h","ĥ":"h","ḣ":"h","ḧ":"h","ȟ":"h","ḥ":"h","ḩ":"h","ḫ":"h","ẖ":"h","ħ":"h","ⱨ":"h","ⱶ":"h","ɥ":"h","ƕ":"hv","ⓘ":"i","i":"i","ì":"i","í":"i","î":"i","ĩ":"i","ī":"i","ĭ":"i","ï":"i","ḯ":"i","ỉ":"i","ǐ":"i","ȉ":"i","ȋ":"i","ị":"i","į":"i","ḭ":"i","ɨ":"i","ı":"i","ⓙ":"j","j":"j","ĵ":"j","ǰ":"j","ɉ":"j","ⓚ":"k","k":"k","ḱ":"k","ǩ":"k","ḳ":"k","ķ":"k","ḵ":"k","ƙ":"k","ⱪ":"k","ꝁ":"k","ꝃ":"k","ꝅ":"k","ꞣ":"k","ⓛ":"l","l":"l","ŀ":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","ſ":"l","ł":"l","ƚ":"l","ɫ":"l","ⱡ":"l","ꝉ":"l","ꞁ":"l","ꝇ":"l","lj":"lj","ⓜ":"m","m":"m","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ɯ":"m","ⓝ":"n","n":"n","ǹ":"n","ń":"n","ñ":"n","ṅ":"n","ň":"n","ṇ":"n","ņ":"n","ṋ":"n","ṉ":"n","ƞ":"n","ɲ":"n","ʼn":"n","ꞑ":"n","ꞥ":"n","nj":"nj","ⓞ":"o","o":"o","ò":"o","ó":"o","ô":"o","ồ":"o","ố":"o","ỗ":"o","ổ":"o","õ":"o","ṍ":"o","ȭ":"o","ṏ":"o","ō":"o","ṑ":"o","ṓ":"o","ŏ":"o","ȯ":"o","ȱ":"o","ö":"o","ȫ":"o","ỏ":"o","ő":"o","ǒ":"o","ȍ":"o","ȏ":"o","ơ":"o","ờ":"o","ớ":"o","ỡ":"o","ở":"o","ợ":"o","ọ":"o","ộ":"o","ǫ":"o","ǭ":"o","ø":"o","ǿ":"o","ɔ":"o","ꝋ":"o","ꝍ":"o","ɵ":"o","ƣ":"oi","ȣ":"ou","ꝏ":"oo","ⓟ":"p","p":"p","ṕ":"p","ṗ":"p","ƥ":"p","ᵽ":"p","ꝑ":"p","ꝓ":"p","ꝕ":"p","ⓠ":"q","q":"q","ɋ":"q","ꝗ":"q","ꝙ":"q","ⓡ":"r","r":"r","ŕ":"r","ṙ":"r","ř":"r","ȑ":"r","ȓ":"r","ṛ":"r","ṝ":"r","ŗ":"r","ṟ":"r","ɍ":"r","ɽ":"r","ꝛ":"r","ꞧ":"r","ꞃ":"r","ⓢ":"s","s":"s","ß":"s","ś":"s","ṥ":"s","ŝ":"s","ṡ":"s","š":"s","ṧ":"s","ṣ":"s","ṩ":"s","ș":"s","ş":"s","ȿ":"s","ꞩ":"s","ꞅ":"s","ẛ":"s","ⓣ":"t","t":"t","ṫ":"t","ẗ":"t","ť":"t","ṭ":"t","ț":"t","ţ":"t","ṱ":"t","ṯ":"t","ŧ":"t","ƭ":"t","ʈ":"t","ⱦ":"t","ꞇ":"t","ꜩ":"tz","ⓤ":"u","u":"u","ù":"u","ú":"u","û":"u","ũ":"u","ṹ":"u","ū":"u","ṻ":"u","ŭ":"u","ü":"u","ǜ":"u","ǘ":"u","ǖ":"u","ǚ":"u","ủ":"u","ů":"u","ű":"u","ǔ":"u","ȕ":"u","ȗ":"u","ư":"u","ừ":"u","ứ":"u","ữ":"u","ử":"u","ự":"u","ụ":"u","ṳ":"u","ų":"u","ṷ":"u","ṵ":"u","ʉ":"u","ⓥ":"v","v":"v","ṽ":"v","ṿ":"v","ʋ":"v","ꝟ":"v","ʌ":"v","ꝡ":"vy","ⓦ":"w","w":"w","ẁ":"w","ẃ":"w","ŵ":"w","ẇ":"w","ẅ":"w","ẘ":"w","ẉ":"w","ⱳ":"w","ⓧ":"x","x":"x","ẋ":"x","ẍ":"x","ⓨ":"y","y":"y","ỳ":"y","ý":"y","ŷ":"y","ỹ":"y","ȳ":"y","ẏ":"y","ÿ":"y","ỷ":"y","ẙ":"y","ỵ":"y","ƴ":"y","ɏ":"y","ỿ":"y","ⓩ":"z","z":"z","ź":"z","ẑ":"z","ż":"z","ž":"z","ẓ":"z","ẕ":"z","ƶ":"z","ȥ":"z","ɀ":"z","ⱬ":"z","ꝣ":"z","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Υ","Ϋ":"Υ","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ω":"ω","ς":"σ"};return e}),t.define("select2/data/base",["../utils"],function(e){function t(e,n){t.__super__.constructor.call(this)}return e.Extend(t,e.Observable),t.prototype.current=function(e){throw new Error("The `current` method must be defined in child classes.")},t.prototype.query=function(e,t){throw new Error("The `query` method must be defined in child classes.")},t.prototype.bind=function(e,t){},t.prototype.destroy=function(){},t.prototype.generateResultId=function(t,n){var r=t.id+"-result-";return r+=e.generateChars(4),r+=null!=n.id?"-"+n.id.toString():"-"+e.generateChars(4)},t}),t.define("select2/data/select",["./base","../utils","jquery"],function(e,t,n){function r(e,t){this.$element=e,this.options=t,r.__super__.constructor.call(this)}return t.Extend(r,e),r.prototype.current=function(e){var t=[],r=this;this.$element.find(":selected").each(function(){var e=n(this),o=r.item(e);t.push(o)}),e(t)},r.prototype.select=function(e){var t=this;if(e.selected=!0,n(e.element).is("option"))return e.element.selected=!0,void this.$element.trigger("change");if(this.$element.prop("multiple"))this.current(function(r){var o=[];e=[e],e.push.apply(e,r);for(var i=0;i<e.length;i++){var s=e[i].id;n.inArray(s,o)===-1&&o.push(s)}t.$element.val(o),t.$element.trigger("change")});else{var r=e.id;this.$element.val(r),this.$element.trigger("change")}},r.prototype.unselect=function(e){var t=this;if(this.$element.prop("multiple"))return e.selected=!1,n(e.element).is("option")?(e.element.selected=!1,void this.$element.trigger("change")):void this.current(function(r){for(var o=[],i=0;i<r.length;i++){var s=r[i].id;s!==e.id&&n.inArray(s,o)===-1&&o.push(s)}t.$element.val(o),t.$element.trigger("change")})},r.prototype.bind=function(e,t){var n=this;this.container=e,e.on("select",function(e){n.select(e.data)}),e.on("unselect",function(e){n.unselect(e.data)})},r.prototype.destroy=function(){this.$element.find("*").each(function(){t.RemoveData(this)})},r.prototype.query=function(e,t){var r=[],o=this,i=this.$element.children();i.each(function(){var t=n(this);if(t.is("option")||t.is("optgroup")){var i=o.item(t),s=o.matches(e,i);null!==s&&r.push(s)}}),t({results:r})},r.prototype.addOptions=function(e){t.appendMany(this.$element,e)},r.prototype.option=function(e){var r;e.children?(r=document.createElement("optgroup"),r.label=e.text):(r=document.createElement("option"),void 0!==r.textContent?r.textContent=e.text:r.innerText=e.text),void 0!==e.id&&(r.value=e.id),e.disabled&&(r.disabled=!0),e.selected&&(r.selected=!0),e.title&&(r.title=e.title);var o=n(r),i=this._normalizeItem(e);return i.element=r,t.StoreData(r,"data",i),o},r.prototype.item=function(e){var r={};if(r=t.GetData(e[0],"data"),null!=r)return r;if(e.is("option"))r={id:e.val(),text:e.text(),disabled:e.prop("disabled"),selected:e.prop("selected"),title:e.prop("title")};else if(e.is("optgroup")){r={text:e.prop("label"),children:[],title:e.prop("title")};for(var o=e.children("option"),i=[],s=0;s<o.length;s++){var a=n(o[s]),l=this.item(a);i.push(l)}r.children=i}return r=this._normalizeItem(r),r.element=e[0],t.StoreData(e[0],"data",r),r},r.prototype._normalizeItem=function(e){e!==Object(e)&&(e={id:e,text:e}),e=n.extend({},{text:""},e);var t={selected:!1,disabled:!1};return null!=e.id&&(e.id=e.id.toString()),null!=e.text&&(e.text=e.text.toString()),null==e._resultId&&e.id&&null!=this.container&&(e._resultId=this.generateResultId(this.container,e)),n.extend({},t,e)},r.prototype.matches=function(e,t){var n=this.options.get("matcher");return n(e,t)},r}),t.define("select2/data/array",["./select","../utils","jquery"],function(e,t,n){function r(e,t){var n=t.get("data")||[];r.__super__.constructor.call(this,e,t),this.addOptions(this.convertToOptions(n))}return t.Extend(r,e),r.prototype.select=function(e){var t=this.$element.find("option").filter(function(t,n){return n.value==e.id.toString()});0===t.length&&(t=this.option(e),this.addOptions(t)),r.__super__.select.call(this,e)},r.prototype.convertToOptions=function(e){function r(e){return function(){return n(this).val()==e.id}}for(var o=this,i=this.$element.find("option"),s=i.map(function(){return o.item(n(this)).id}).get(),a=[],l=0;l<e.length;l++){var c=this._normalizeItem(e[l]);if(n.inArray(c.id,s)>=0){var u=i.filter(r(c)),f=this.item(u),p=n.extend(!0,{},c,f),d=this.option(p);u.replaceWith(d)}else{var h=this.option(c);if(c.children){var m=this.convertToOptions(c.children);t.appendMany(h,m)}a.push(h)}}return a},r}),t.define("select2/data/ajax",["./array","../utils","jquery"],function(e,t,n){function r(e,t){this.ajaxOptions=this._applyDefaults(t.get("ajax")),null!=this.ajaxOptions.processResults&&(this.processResults=this.ajaxOptions.processResults),r.__super__.constructor.call(this,e,t)}return t.Extend(r,e),r.prototype._applyDefaults=function(e){var t={data:function(e){return n.extend({},e,{q:e.term})},transport:function(e,t,r){var o=n.ajax(e);return o.then(t),o.fail(r),o}};return n.extend({},t,e,!0)},r.prototype.processResults=function(e){return e},r.prototype.query=function(e,t){function r(){var r=i.transport(i,function(r){var i=o.processResults(r,e);o.options.get("debug")&&window.console&&console.error&&(i&&i.results&&n.isArray(i.results)||console.error("Select2: The AJAX results did not return an array in the `results` key of the response.")),t(i)},function(){"status"in r&&(0===r.status||"0"===r.status)||o.trigger("results:message",{message:"errorLoading"})});o._request=r}var o=this;null!=this._request&&(n.isFunction(this._request.abort)&&this._request.abort(),this._request=null);var i=n.extend({type:"GET"},this.ajaxOptions);"function"==typeof i.url&&(i.url=i.url.call(this.$element,e)),"function"==typeof i.data&&(i.data=i.data.call(this.$element,e)),this.ajaxOptions.delay&&null!=e.term?(this._queryTimeout&&window.clearTimeout(this._queryTimeout),this._queryTimeout=window.setTimeout(r,this.ajaxOptions.delay)):r()},r}),t.define("select2/data/tags",["jquery"],function(e){function t(t,n,r){var o=r.get("tags"),i=r.get("createTag");void 0!==i&&(this.createTag=i);var s=r.get("insertTag");if(void 0!==s&&(this.insertTag=s),t.call(this,n,r),e.isArray(o))for(var a=0;a<o.length;a++){var l=o[a],c=this._normalizeItem(l),u=this.option(c);this.$element.append(u)}}return t.prototype.query=function(e,t,n){function r(e,i){for(var s=e.results,a=0;a<s.length;a++){var l=s[a],c=null!=l.children&&!r({results:l.children},!0),u=(l.text||"").toUpperCase(),f=(t.term||"").toUpperCase(),p=u===f;if(p||c)return!i&&(e.data=s,void n(e))}if(i)return!0;var d=o.createTag(t);if(null!=d){var h=o.option(d);h.attr("data-select2-tag",!0),o.addOptions([h]),o.insertTag(s,d)}e.results=s,n(e)}var o=this;return this._removeOldTags(),null==t.term||null!=t.page?void e.call(this,t,n):void e.call(this,t,r)},t.prototype.createTag=function(t,n){var r=e.trim(n.term);return""===r?null:{id:r,text:r}},t.prototype.insertTag=function(e,t,n){t.unshift(n)},t.prototype._removeOldTags=function(t){var n=(this._lastTag,this.$element.find("option[data-select2-tag]"));n.each(function(){this.selected||e(this).remove()})},t}),t.define("select2/data/tokenizer",["jquery"],function(e){function t(e,t,n){var r=n.get("tokenizer");void 0!==r&&(this.tokenizer=r),e.call(this,t,n)}return t.prototype.bind=function(e,t,n){e.call(this,t,n),this.$search=t.dropdown.$search||t.selection.$search||n.find(".select2-search__field")},t.prototype.query=function(t,n,r){function o(t){var n=s._normalizeItem(t),r=s.$element.find("option").filter(function(){return e(this).val()===n.id});if(!r.length){var o=s.option(n);o.attr("data-select2-tag",!0),s._removeOldTags(),s.addOptions([o])}i(n)}function i(e){s.trigger("select",{data:e})}var s=this;n.term=n.term||"";var a=this.tokenizer(n,this.options,o);a.term!==n.term&&(this.$search.length&&(this.$search.val(a.term),this.$search.focus()),n.term=a.term),t.call(this,n,r)},t.prototype.tokenizer=function(t,n,r,o){for(var i=r.get("tokenSeparators")||[],s=n.term,a=0,l=this.createTag||function(e){return{id:e.term,text:e.term}};a<s.length;){var c=s[a];if(e.inArray(c,i)!==-1){var u=s.substr(0,a),f=e.extend({},n,{term:u}),p=l(f);null!=p?(o(p),s=s.substr(a+1)||"",a=0):a++}else a++}return{term:s}},t}),t.define("select2/data/minimumInputLength",[],function(){function e(e,t,n){this.minimumInputLength=n.get("minimumInputLength"),e.call(this,t,n)}return e.prototype.query=function(e,t,n){return t.term=t.term||"",t.term.length<this.minimumInputLength?void this.trigger("results:message",{message:"inputTooShort",args:{minimum:this.minimumInputLength,input:t.term,params:t}}):void e.call(this,t,n)},e}),t.define("select2/data/maximumInputLength",[],function(){function e(e,t,n){this.maximumInputLength=n.get("maximumInputLength"),e.call(this,t,n)}return e.prototype.query=function(e,t,n){return t.term=t.term||"",this.maximumInputLength>0&&t.term.length>this.maximumInputLength?void this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:t.term,params:t}}):void e.call(this,t,n)},e}),t.define("select2/data/maximumSelectionLength",[],function(){function e(e,t,n){this.maximumSelectionLength=n.get("maximumSelectionLength"),e.call(this,t,n)}return e.prototype.query=function(e,t,n){var r=this;this.current(function(o){var i=null!=o?o.length:0;return r.maximumSelectionLength>0&&i>=r.maximumSelectionLength?void r.trigger("results:message",{message:"maximumSelected",args:{maximum:r.maximumSelectionLength}}):void e.call(r,t,n)})},e}),t.define("select2/dropdown",["jquery","./utils"],function(e,t){function n(e,t){this.$element=e,this.options=t,n.__super__.constructor.call(this)}return t.Extend(n,t.Observable),n.prototype.render=function(){var t=e('<span class="select2-dropdown"><span class="select2-results"></span></span>');return t.attr("dir",this.options.get("dir")),this.$dropdown=t,t},n.prototype.bind=function(){},n.prototype.position=function(e,t){},n.prototype.destroy=function(){this.$dropdown.remove()},n}),t.define("select2/dropdown/search",["jquery","../utils"],function(e,t){function n(){}return n.prototype.render=function(t){var n=t.call(this),r=e('<span class="select2-search select2-search--dropdown"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="none" spellcheck="false" role="textbox" /></span>');return this.$searchContainer=r,this.$search=r.find("input"),n.prepend(r),n},n.prototype.bind=function(t,n,r){var o=this;t.call(this,n,r),this.$search.on("keydown",function(e){o.trigger("keypress",e),o._keyUpPrevented=e.isDefaultPrevented()}),this.$search.on("input",function(t){e(this).off("keyup")}),this.$search.on("keyup input",function(e){o.handleSearch(e)}),n.on("open",function(){o.$search.attr("tabindex",0),o.$search.focus(),window.setTimeout(function(){o.$search.focus()},0)}),n.on("close",function(){o.$search.attr("tabindex",-1),o.$search.val(""),o.$search.blur()}),n.on("focus",function(){n.isOpen()||o.$search.focus()}),n.on("results:all",function(e){if(null==e.query.term||""===e.query.term){var t=o.showSearch(e);t?o.$searchContainer.removeClass("select2-search--hide"):o.$searchContainer.addClass("select2-search--hide")}})},n.prototype.handleSearch=function(e){if(!this._keyUpPrevented){var t=this.$search.val();this.trigger("query",{term:t})}this._keyUpPrevented=!1},n.prototype.showSearch=function(e,t){return!0},n}),t.define("select2/dropdown/hidePlaceholder",[],function(){function e(e,t,n,r){this.placeholder=this.normalizePlaceholder(n.get("placeholder")),e.call(this,t,n,r)}return e.prototype.append=function(e,t){t.results=this.removePlaceholder(t.results),e.call(this,t)},e.prototype.normalizePlaceholder=function(e,t){return"string"==typeof t&&(t={id:"",text:t}),t},e.prototype.removePlaceholder=function(e,t){for(var n=t.slice(0),r=t.length-1;r>=0;r--){var o=t[r];this.placeholder.id===o.id&&n.splice(r,1)}return n},e}),t.define("select2/dropdown/infiniteScroll",["jquery"],function(e){function t(e,t,n,r){this.lastParams={},e.call(this,t,n,r),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return t.prototype.append=function(e,t){this.$loadingMore.remove(),this.loading=!1,e.call(this,t),this.showLoadingMore(t)&&this.$results.append(this.$loadingMore)},t.prototype.bind=function(t,n,r){var o=this;t.call(this,n,r),n.on("query",function(e){o.lastParams=e,o.loading=!0}),n.on("query:append",function(e){o.lastParams=e,o.loading=!0}),this.$results.on("scroll",function(){var t=e.contains(document.documentElement,o.$loadingMore[0]);if(!o.loading&&t){var n=o.$results.offset().top+o.$results.outerHeight(!1),r=o.$loadingMore.offset().top+o.$loadingMore.outerHeight(!1);n+50>=r&&o.loadMore()}})},t.prototype.loadMore=function(){this.loading=!0;var t=e.extend({},{page:1},this.lastParams);t.page++,this.trigger("query:append",t)},t.prototype.showLoadingMore=function(e,t){return t.pagination&&t.pagination.more},t.prototype.createLoadingMore=function(){var t=e('<li class="select2-results__option select2-results__option--load-more"role="treeitem" aria-disabled="true"></li>'),n=this.options.get("translations").get("loadingMore");return t.html(n(this.lastParams)),t},t}),t.define("select2/dropdown/attachBody",["jquery","../utils"],function(e,t){function n(t,n,r){this.$dropdownParent=r.get("dropdownParent")||e(document.body),t.call(this,n,r)}return n.prototype.bind=function(e,t,n){var r=this,o=!1;e.call(this,t,n),t.on("open",function(){r._showDropdown(),r._attachPositioningHandler(t),o||(o=!0,t.on("results:all",function(){r._positionDropdown(),r._resizeDropdown()}),t.on("results:append",function(){r._positionDropdown(),r._resizeDropdown()}))}),t.on("close",function(){r._hideDropdown(),r._detachPositioningHandler(t)}),this.$dropdownContainer.on("mousedown",function(e){e.stopPropagation()})},n.prototype.destroy=function(e){e.call(this),this.$dropdownContainer.remove()},n.prototype.position=function(e,t,n){t.attr("class",n.attr("class")),t.removeClass("select2"),t.addClass("select2-container--open"),t.css({position:"absolute",top:-999999}),this.$container=n},n.prototype.render=function(t){var n=e("<span></span>"),r=t.call(this);return n.append(r),this.$dropdownContainer=n,n},n.prototype._hideDropdown=function(e){this.$dropdownContainer.detach()},n.prototype._attachPositioningHandler=function(n,r){var o=this,i="scroll.select2."+r.id,s="resize.select2."+r.id,a="orientationchange.select2."+r.id,l=this.$container.parents().filter(t.hasScroll);l.each(function(){t.StoreData(this,"select2-scroll-position",{x:e(this).scrollLeft(),y:e(this).scrollTop()})}),l.on(i,function(n){var r=t.GetData(this,"select2-scroll-position");e(this).scrollTop(r.y)}),e(window).on(i+" "+s+" "+a,function(e){o._positionDropdown(),o._resizeDropdown()})},n.prototype._detachPositioningHandler=function(n,r){var o="scroll.select2."+r.id,i="resize.select2."+r.id,s="orientationchange.select2."+r.id,a=this.$container.parents().filter(t.hasScroll);a.off(o),e(window).off(o+" "+i+" "+s)},n.prototype._positionDropdown=function(){var t=e(window),n=this.$dropdown.hasClass("select2-dropdown--above"),r=this.$dropdown.hasClass("select2-dropdown--below"),o=null,i=this.$container.offset();i.bottom=i.top+this.$container.outerHeight(!1);var s={height:this.$container.outerHeight(!1)};s.top=i.top,s.bottom=i.top+s.height;var a={height:this.$dropdown.outerHeight(!1)},l={top:t.scrollTop(),bottom:t.scrollTop()+t.height()},c=l.top<i.top-a.height,u=l.bottom>i.bottom+a.height,f={left:i.left,top:s.bottom},p=this.$dropdownParent;"static"===p.css("position")&&(p=p.offsetParent());var d=p.offset();f.top-=d.top,f.left-=d.left,n||r||(o="below"),u||!c||n?!c&&u&&n&&(o="below"):o="above",("above"==o||n&&"below"!==o)&&(f.top=s.top-d.top-a.height),null!=o&&(this.$dropdown.removeClass("select2-dropdown--below select2-dropdown--above").addClass("select2-dropdown--"+o),this.$container.removeClass("select2-container--below select2-container--above").addClass("select2-container--"+o)),this.$dropdownContainer.css(f)},n.prototype._resizeDropdown=function(){var e={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(e.minWidth=e.width,e.position="relative",e.width="auto"),this.$dropdown.css(e)},n.prototype._showDropdown=function(e){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},n}),t.define("select2/dropdown/minimumResultsForSearch",[],function(){function e(t){for(var n=0,r=0;r<t.length;r++){var o=t[r];o.children?n+=e(o.children):n++}return n}function t(e,t,n,r){this.minimumResultsForSearch=n.get("minimumResultsForSearch"),this.minimumResultsForSearch<0&&(this.minimumResultsForSearch=1/0),e.call(this,t,n,r)}return t.prototype.showSearch=function(t,n){return!(e(n.data.results)<this.minimumResultsForSearch)&&t.call(this,n)},t}),t.define("select2/dropdown/selectOnClose",["../utils"],function(e){function t(){}return t.prototype.bind=function(e,t,n){var r=this;e.call(this,t,n),t.on("close",function(e){r._handleSelectOnClose(e)})},t.prototype._handleSelectOnClose=function(t,n){if(n&&null!=n.originalSelect2Event){var r=n.originalSelect2Event;if("select"===r._type||"unselect"===r._type)return}var o=this.getHighlightedResults();if(!(o.length<1)){var i=e.GetData(o[0],"data");null!=i.element&&i.element.selected||null==i.element&&i.selected||this.trigger("select",{data:i})}},t}),t.define("select2/dropdown/closeOnSelect",[],function(){function e(){}return e.prototype.bind=function(e,t,n){var r=this;e.call(this,t,n),t.on("select",function(e){r._selectTriggered(e)}),t.on("unselect",function(e){r._selectTriggered(e)})},e.prototype._selectTriggered=function(e,t){var n=t.originalEvent;n&&n.ctrlKey||this.trigger("close",{originalEvent:n,originalSelect2Event:t})},e}),t.define("select2/i18n/en",[],function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Please delete "+t+" character";return 1!=t&&(n+="s"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Please enter "+t+" or more characters";return n},loadingMore:function(){return"Loading more results…"},maximumSelected:function(e){var t="You can only select "+e.maximum+" item";return 1!=e.maximum&&(t+="s"),t},noResults:function(){return"No results found"},searching:function(){return"Searching…"}}}),t.define("select2/defaults",["jquery","require","./results","./selection/single","./selection/multiple","./selection/placeholder","./selection/allowClear","./selection/search","./selection/eventRelay","./utils","./translation","./diacritics","./data/select","./data/array","./data/ajax","./data/tags","./data/tokenizer","./data/minimumInputLength","./data/maximumInputLength","./data/maximumSelectionLength","./dropdown","./dropdown/search","./dropdown/hidePlaceholder","./dropdown/infiniteScroll","./dropdown/attachBody","./dropdown/minimumResultsForSearch","./dropdown/selectOnClose","./dropdown/closeOnSelect","./i18n/en"],function(e,t,n,r,o,i,s,a,l,c,u,f,p,d,h,m,g,v,y,_,b,w,x,S,k,j,E,C,P){function A(){this.reset()}A.prototype.apply=function(f){if(f=e.extend(!0,{},this.defaults,f),null==f.dataAdapter){if(null!=f.ajax?f.dataAdapter=h:null!=f.data?f.dataAdapter=d:f.dataAdapter=p,f.minimumInputLength>0&&(f.dataAdapter=c.Decorate(f.dataAdapter,v)),f.maximumInputLength>0&&(f.dataAdapter=c.Decorate(f.dataAdapter,y)),f.maximumSelectionLength>0&&(f.dataAdapter=c.Decorate(f.dataAdapter,_)),f.tags&&(f.dataAdapter=c.Decorate(f.dataAdapter,m)),null==f.tokenSeparators&&null==f.tokenizer||(f.dataAdapter=c.Decorate(f.dataAdapter,g)),null!=f.query){var P=t(f.amdBase+"compat/query");f.dataAdapter=c.Decorate(f.dataAdapter,P)}if(null!=f.initSelection){var A=t(f.amdBase+"compat/initSelection");f.dataAdapter=c.Decorate(f.dataAdapter,A)}}if(null==f.resultsAdapter&&(f.resultsAdapter=n,null!=f.ajax&&(f.resultsAdapter=c.Decorate(f.resultsAdapter,S)),null!=f.placeholder&&(f.resultsAdapter=c.Decorate(f.resultsAdapter,x)),f.selectOnClose&&(f.resultsAdapter=c.Decorate(f.resultsAdapter,E))),null==f.dropdownAdapter){if(f.multiple)f.dropdownAdapter=b;else{var O=c.Decorate(b,w);f.dropdownAdapter=O}if(0!==f.minimumResultsForSearch&&(f.dropdownAdapter=c.Decorate(f.dropdownAdapter,j)),f.closeOnSelect&&(f.dropdownAdapter=c.Decorate(f.dropdownAdapter,C)),null!=f.dropdownCssClass||null!=f.dropdownCss||null!=f.adaptDropdownCssClass){var T=t(f.amdBase+"compat/dropdownCss");f.dropdownAdapter=c.Decorate(f.dropdownAdapter,T)}f.dropdownAdapter=c.Decorate(f.dropdownAdapter,k)}if(null==f.selectionAdapter){if(f.multiple?f.selectionAdapter=o:f.selectionAdapter=r,null!=f.placeholder&&(f.selectionAdapter=c.Decorate(f.selectionAdapter,i)),f.allowClear&&(f.selectionAdapter=c.Decorate(f.selectionAdapter,s)),f.multiple&&(f.selectionAdapter=c.Decorate(f.selectionAdapter,a)),null!=f.containerCssClass||null!=f.containerCss||null!=f.adaptContainerCssClass){var L=t(f.amdBase+"compat/containerCss");f.selectionAdapter=c.Decorate(f.selectionAdapter,L)}f.selectionAdapter=c.Decorate(f.selectionAdapter,l)}if("string"==typeof f.language)if(f.language.indexOf("-")>0){var M=f.language.split("-"),I=M[0];f.language=[f.language,I]}else f.language=[f.language];if(e.isArray(f.language)){var D=new u;f.language.push("en");for(var N=f.language,$=0;$<N.length;$++){var R=N[$],H={};try{H=u.loadPath(R)}catch(F){try{R=this.defaults.amdLanguageBase+R,H=u.loadPath(R)}catch(B){f.debug&&window.console&&console.warn&&console.warn('Select2: The language file for "'+R+'" could not be automatically loaded. A fallback will be used instead.');continue}}D.extend(H)}f.translations=D}else{var q=u.loadPath(this.defaults.amdLanguageBase+"en"),z=new u(f.language);z.extend(q),f.translations=z}return f},A.prototype.reset=function(){function t(e){function t(e){return f[e]||e}return e.replace(/[^\u0000-\u007E]/g,t)}function n(r,o){if(""===e.trim(r.term))return o;if(o.children&&o.children.length>0){for(var i=e.extend(!0,{},o),s=o.children.length-1;s>=0;s--){var a=o.children[s],l=n(r,a);null==l&&i.children.splice(s,1)}return i.children.length>0?i:n(r,i)}var c=t(o.text).toUpperCase(),u=t(r.term).toUpperCase();return c.indexOf(u)>-1?o:null}this.defaults={amdBase:"./",amdLanguageBase:"./i18n/",closeOnSelect:!0,debug:!1,dropdownAutoWidth:!1,escapeMarkup:c.escapeMarkup,language:P,matcher:n,minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:0,selectOnClose:!1,sorter:function(e){return e},templateResult:function(e){return e.text},templateSelection:function(e){return e.text},theme:"default",width:"resolve"}},A.prototype.set=function(t,n){var r=e.camelCase(t),o={};o[r]=n;var i=c._convertData(o);e.extend(!0,this.defaults,i)};var O=new A;
|
15 |
+
return O}),t.define("select2/options",["require","jquery","./defaults","./utils"],function(e,t,n,r){function o(t,o){if(this.options=t,null!=o&&this.fromElement(o),this.options=n.apply(this.options),o&&o.is("input")){var i=e(this.get("amdBase")+"compat/inputData");this.options.dataAdapter=r.Decorate(this.options.dataAdapter,i)}}return o.prototype.fromElement=function(e){var n=["select2"];null==this.options.multiple&&(this.options.multiple=e.prop("multiple")),null==this.options.disabled&&(this.options.disabled=e.prop("disabled")),null==this.options.language&&(e.prop("lang")?this.options.language=e.prop("lang").toLowerCase():e.closest("[lang]").prop("lang")&&(this.options.language=e.closest("[lang]").prop("lang"))),null==this.options.dir&&(e.prop("dir")?this.options.dir=e.prop("dir"):e.closest("[dir]").prop("dir")?this.options.dir=e.closest("[dir]").prop("dir"):this.options.dir="ltr"),e.prop("disabled",this.options.disabled),e.prop("multiple",this.options.multiple),r.GetData(e[0],"select2Tags")&&(this.options.debug&&window.console&&console.warn&&console.warn('Select2: The `data-select2-tags` attribute has been changed to use the `data-data` and `data-tags="true"` attributes and will be removed in future versions of Select2.'),r.StoreData(e[0],"data",r.GetData(e[0],"select2Tags")),r.StoreData(e[0],"tags",!0)),r.GetData(e[0],"ajaxUrl")&&(this.options.debug&&window.console&&console.warn&&console.warn("Select2: The `data-ajax-url` attribute has been changed to `data-ajax--url` and support for the old attribute will be removed in future versions of Select2."),e.attr("ajax--url",r.GetData(e[0],"ajaxUrl")),r.StoreData(e[0],"ajax-Url",r.GetData(e[0],"ajaxUrl")));var o={};o=t.fn.jquery&&"1."==t.fn.jquery.substr(0,2)&&e[0].dataset?t.extend(!0,{},e[0].dataset,r.GetData(e[0])):r.GetData(e[0]);var i=t.extend(!0,{},o);i=r._convertData(i);for(var s in i)t.inArray(s,n)>-1||(t.isPlainObject(this.options[s])?t.extend(this.options[s],i[s]):this.options[s]=i[s]);return this},o.prototype.get=function(e){return this.options[e]},o.prototype.set=function(e,t){this.options[e]=t},o}),t.define("select2/core",["jquery","./options","./utils","./keys"],function(e,t,n,r){var o=function(e,r){null!=n.GetData(e[0],"select2")&&n.GetData(e[0],"select2").destroy(),this.$element=e,this.id=this._generateId(e),r=r||{},this.options=new t(r,e),o.__super__.constructor.call(this);var i=e.attr("tabindex")||0;n.StoreData(e[0],"old-tabindex",i),e.attr("tabindex","-1");var s=this.options.get("dataAdapter");this.dataAdapter=new s(e,this.options);var a=this.render();this._placeContainer(a);var l=this.options.get("selectionAdapter");this.selection=new l(e,this.options),this.$selection=this.selection.render(),this.selection.position(this.$selection,a);var c=this.options.get("dropdownAdapter");this.dropdown=new c(e,this.options),this.$dropdown=this.dropdown.render(),this.dropdown.position(this.$dropdown,a);var u=this.options.get("resultsAdapter");this.results=new u(e,this.options,this.dataAdapter),this.$results=this.results.render(),this.results.position(this.$results,this.$dropdown);var f=this;this._bindAdapters(),this._registerDomEvents(),this._registerDataEvents(),this._registerSelectionEvents(),this._registerDropdownEvents(),this._registerResultsEvents(),this._registerEvents(),this.dataAdapter.current(function(e){f.trigger("selection:update",{data:e})}),e.addClass("select2-hidden-accessible"),e.attr("aria-hidden","true"),this._syncAttributes(),n.StoreData(e[0],"select2",this),e.data("select2",this)};return n.Extend(o,n.Observable),o.prototype._generateId=function(e){var t="";return t=null!=e.attr("id")?e.attr("id"):null!=e.attr("name")?e.attr("name")+"-"+n.generateChars(2):n.generateChars(4),t=t.replace(/(:|\.|\[|\]|,)/g,""),t="select2-"+t},o.prototype._placeContainer=function(e){e.insertAfter(this.$element);var t=this._resolveWidth(this.$element,this.options.get("width"));null!=t&&e.css("width",t)},o.prototype._resolveWidth=function(e,t){var n=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;if("resolve"==t){var r=this._resolveWidth(e,"style");return null!=r?r:this._resolveWidth(e,"element")}if("element"==t){var o=e.outerWidth(!1);return o<=0?"auto":o+"px"}if("style"==t){var i=e.attr("style");if("string"!=typeof i)return null;for(var s=i.split(";"),a=0,l=s.length;a<l;a+=1){var c=s[a].replace(/\s/g,""),u=c.match(n);if(null!==u&&u.length>=1)return u[1]}return null}return t},o.prototype._bindAdapters=function(){this.dataAdapter.bind(this,this.$container),this.selection.bind(this,this.$container),this.dropdown.bind(this,this.$container),this.results.bind(this,this.$container)},o.prototype._registerDomEvents=function(){var t=this;this.$element.on("change.select2",function(){t.dataAdapter.current(function(e){t.trigger("selection:update",{data:e})})}),this.$element.on("focus.select2",function(e){t.trigger("focus",e)}),this._syncA=n.bind(this._syncAttributes,this),this._syncS=n.bind(this._syncSubtree,this),this.$element[0].attachEvent&&this.$element[0].attachEvent("onpropertychange",this._syncA);var r=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;null!=r?(this._observer=new r(function(n){e.each(n,t._syncA),e.each(n,t._syncS)}),this._observer.observe(this.$element[0],{attributes:!0,childList:!0,subtree:!1})):this.$element[0].addEventListener&&(this.$element[0].addEventListener("DOMAttrModified",t._syncA,!1),this.$element[0].addEventListener("DOMNodeInserted",t._syncS,!1),this.$element[0].addEventListener("DOMNodeRemoved",t._syncS,!1))},o.prototype._registerDataEvents=function(){var e=this;this.dataAdapter.on("*",function(t,n){e.trigger(t,n)})},o.prototype._registerSelectionEvents=function(){var t=this,n=["toggle","focus"];this.selection.on("toggle",function(){t.toggleDropdown()}),this.selection.on("focus",function(e){t.focus(e)}),this.selection.on("*",function(r,o){e.inArray(r,n)===-1&&t.trigger(r,o)})},o.prototype._registerDropdownEvents=function(){var e=this;this.dropdown.on("*",function(t,n){e.trigger(t,n)})},o.prototype._registerResultsEvents=function(){var e=this;this.results.on("*",function(t,n){e.trigger(t,n)})},o.prototype._registerEvents=function(){var e=this;this.on("open",function(){e.$container.addClass("select2-container--open")}),this.on("close",function(){e.$container.removeClass("select2-container--open")}),this.on("enable",function(){e.$container.removeClass("select2-container--disabled")}),this.on("disable",function(){e.$container.addClass("select2-container--disabled")}),this.on("blur",function(){e.$container.removeClass("select2-container--focus")}),this.on("query",function(t){e.isOpen()||e.trigger("open",{}),this.dataAdapter.query(t,function(n){e.trigger("results:all",{data:n,query:t})})}),this.on("query:append",function(t){this.dataAdapter.query(t,function(n){e.trigger("results:append",{data:n,query:t})})}),this.on("keypress",function(t){var n=t.which;e.isOpen()?n===r.ESC||n===r.TAB||n===r.UP&&t.altKey?(e.close(),t.preventDefault()):n===r.ENTER?(e.trigger("results:select",{}),t.preventDefault()):n===r.SPACE&&t.ctrlKey?(e.trigger("results:toggle",{}),t.preventDefault()):n===r.UP?(e.trigger("results:previous",{}),t.preventDefault()):n===r.DOWN&&(e.trigger("results:next",{}),t.preventDefault()):(n===r.ENTER||n===r.SPACE||n===r.DOWN&&t.altKey)&&(e.open(),t.preventDefault())})},o.prototype._syncAttributes=function(){this.options.set("disabled",this.$element.prop("disabled")),this.options.get("disabled")?(this.isOpen()&&this.close(),this.trigger("disable",{})):this.trigger("enable",{})},o.prototype._syncSubtree=function(e,t){var n=!1,r=this;if(!e||!e.target||"OPTION"===e.target.nodeName||"OPTGROUP"===e.target.nodeName){if(t)if(t.addedNodes&&t.addedNodes.length>0)for(var o=0;o<t.addedNodes.length;o++){var i=t.addedNodes[o];i.selected&&(n=!0)}else t.removedNodes&&t.removedNodes.length>0&&(n=!0);else n=!0;n&&this.dataAdapter.current(function(e){r.trigger("selection:update",{data:e})})}},o.prototype.trigger=function(e,t){var n=o.__super__.trigger,r={open:"opening",close:"closing",select:"selecting",unselect:"unselecting",clear:"clearing"};if(void 0===t&&(t={}),e in r){var i=r[e],s={prevented:!1,name:e,args:t};if(n.call(this,i,s),s.prevented)return void(t.prevented=!0)}n.call(this,e,t)},o.prototype.toggleDropdown=function(){this.options.get("disabled")||(this.isOpen()?this.close():this.open())},o.prototype.open=function(){this.isOpen()||this.trigger("query",{})},o.prototype.close=function(){this.isOpen()&&this.trigger("close",{})},o.prototype.isOpen=function(){return this.$container.hasClass("select2-container--open")},o.prototype.hasFocus=function(){return this.$container.hasClass("select2-container--focus")},o.prototype.focus=function(e){this.hasFocus()||(this.$container.addClass("select2-container--focus"),this.trigger("focus",{}))},o.prototype.enable=function(e){this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("enable")` method has been deprecated and will be removed in later Select2 versions. Use $element.prop("disabled") instead.'),null!=e&&0!==e.length||(e=[!0]);var t=!e[0];this.$element.prop("disabled",t)},o.prototype.data=function(){this.options.get("debug")&&arguments.length>0&&window.console&&console.warn&&console.warn('Select2: Data can no longer be set using `select2("data")`. You should consider setting the value instead using `$element.val()`.');var e=[];return this.dataAdapter.current(function(t){e=t}),e},o.prototype.val=function(t){if(this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("val")` method has been deprecated and will be removed in later Select2 versions. Use $element.val() instead.'),null==t||0===t.length)return this.$element.val();var n=t[0];e.isArray(n)&&(n=e.map(n,function(e){return e.toString()})),this.$element.val(n).trigger("change")},o.prototype.destroy=function(){this.$container.remove(),this.$element[0].detachEvent&&this.$element[0].detachEvent("onpropertychange",this._syncA),null!=this._observer?(this._observer.disconnect(),this._observer=null):this.$element[0].removeEventListener&&(this.$element[0].removeEventListener("DOMAttrModified",this._syncA,!1),this.$element[0].removeEventListener("DOMNodeInserted",this._syncS,!1),this.$element[0].removeEventListener("DOMNodeRemoved",this._syncS,!1)),this._syncA=null,this._syncS=null,this.$element.off(".select2"),this.$element.attr("tabindex",n.GetData(this.$element[0],"old-tabindex")),this.$element.removeClass("select2-hidden-accessible"),this.$element.attr("aria-hidden","false"),n.RemoveData(this.$element[0]),this.$element.removeData("select2"),this.dataAdapter.destroy(),this.selection.destroy(),this.dropdown.destroy(),this.results.destroy(),this.dataAdapter=null,this.selection=null,this.dropdown=null,this.results=null},o.prototype.render=function(){var t=e('<span class="select2 select2-container"><span class="selection"></span><span class="dropdown-wrapper" aria-hidden="true"></span></span>');return t.attr("dir",this.options.get("dir")),this.$container=t,this.$container.addClass("select2-container--"+this.options.get("theme")),n.StoreData(t[0],"element",this.$element),t},o}),t.define("jquery-mousewheel",["jquery"],function(e){return e}),t.define("jquery.select2",["jquery","jquery-mousewheel","./select2/core","./select2/defaults","./select2/utils"],function(e,t,n,r,o){if(null==e.fn.select2){var i=["open","close","destroy"];e.fn.select2=function(t){if(t=t||{},"object"==typeof t)return this.each(function(){var r=e.extend(!0,{},t);new n(e(this),r)}),this;if("string"==typeof t){var r,s=Array.prototype.slice.call(arguments,1);return this.each(function(){var e=o.GetData(this,"select2");null==e&&window.console&&console.error&&console.error("The select2('"+t+"') method was called on an element that is not using Select2."),r=e[t].apply(e,s)}),e.inArray(t,i)>-1?this:r}throw new Error("Invalid arguments for Select2: "+t)}}return null==e.fn.select2.defaults&&(e.fn.select2.defaults=r),n}),{define:t.define,require:t.require}}(),n=t.require("jquery.select2");return e.fn.select2.amd=t,n})},{jquery:377}],383:[function(e,t,n){"use strict";function r(e,t){if(e===t)return!0;if(null==e||null==t)return!1;if(Array.isArray(e))return Array.isArray(t)&&e.length===t.length&&e.every(function(e,n){return r(e,t[n])});var n="undefined"==typeof e?"undefined":o(e),i="undefined"==typeof t?"undefined":o(t);if(n!==i)return!1;if("object"===n){var s=e.valueOf(),a=t.valueOf();if(s!==e||a!==t)return r(s,a);var l=Object.keys(e),c=Object.keys(t);return l.length===c.length&&l.every(function(n){return r(e[n],t[n])})}return!1}n.__esModule=!0;var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};n["default"]=r,t.exports=n["default"]},{}],384:[function(e,t,n){(function(e){"use strict";var n=function(){};"production"!==e.env.NODE_ENV&&(n=function(e,t,n){var r=arguments.length;n=new Array(r>2?r-2:0);for(var o=2;o<r;o++)n[o-2]=arguments[o];if(void 0===t)throw new Error("`warning(condition, format, ...args)` requires a warning message argument");if(t.length<10||/^[s\W]*$/.test(t))throw new Error("The warning format should be able to uniquely identify this warning. Please, use a more descriptive format than: "+t);if(!e){var i=0,s="Warning: "+t.replace(/%s/g,function(){return n[i++]});"undefined"!=typeof console&&console.error(s);try{throw new Error(s)}catch(a){}}}),t.exports=n}).call(this,e("_process"))},{_process:380}],385:[function(e,t,n){(function(t){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=e("history/createBrowserHistory"),i=n(o),s="undefined"!=typeof window?window.jQuery:"undefined"!=typeof t?t.jQuery:null,a=n(s),l=e("./pages/header"),c=e("./pages/plugins"),u=e("./pages/collections"),f=e("./utils/template"),p=e("./utils/importer"),d=e("./utils/helper"),h=e("./utils/modal"),m=e("./utils/notifications"),g=e("./utils/scroller"),v=e("select2"),y=n(v);window._babelPolyfill||e("babel-polyfill");var _=function b(){var e=this;r(this,b),this.pageLoaded=function(){g.scroller.setScrollHolder(window),e.items.push(h.modal),e.items.push(l.header),e.items.push(f.template),e.items.push(d.helper),envato_elements_admin.license_activated&&(e.items.push(u.kitCollections),e.items.push(p.importer),e.items.push(m.notifications));var t=!0,n=!1,r=void 0;try{for(var o,i=e.items[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){var s=o.value;s.pageLoaded&&s.pageLoaded()}}catch(a){n=!0,r=a}finally{try{!t&&i["return"]&&i["return"]()}finally{if(n)throw r}}e.navigationListen(),e.clickListen()},this.pluginPageLoaded=function(){g.scroller.setScrollHolder(window),e.items.push(h.modal),e.items.push(c.plugins);var t=!0,n=!1,r=void 0;try{for(var o,i=e.items[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){var s=o.value;s.pageLoaded&&s.pageLoaded()}}catch(a){n=!0,r=a}finally{try{!t&&i["return"]&&i["return"]()}finally{if(n)throw r}}},this.magicButtonDone=!1,this.magicButton=function(t,n){if(!e.magicButtonDone){var r=f.template.getDom("tmpl-envato-elements__magic",{});t.append(r),g.scroller.setScrollHolder(n),p.importer.setMode("insert"),e.items.push(h.modal),e.items.push(l.header),e.items.push(f.template),e.items.push(d.helper),envato_elements_admin.license_activated&&(e.items.push(u.kitCollections),e.items.push(p.importer),e.items.push(m.notifications));var o=!0,i=!1,s=void 0;try{for(var a,c=e.items[Symbol.iterator]();!(o=(a=c.next()).done);o=!0){var v=a.value;v.pageLoaded&&v.pageLoaded()}}catch(y){i=!0,s=y}finally{try{!o&&c["return"]&&c["return"]()}finally{if(i)throw s}}e.clickListen(),e.magicButtonDone=!0}var _={navType:"main-category",categorySlug:"elementor-blocks",collectionId:!1,templateId:!1,searchParams:{},searchParamsURI:""};e.navigationEvent(_,"click")},this.clickListen=function(){var t=e;(0,a["default"])("body").off("change.envato-elements").on("change.envato-elements",".envato-elements--action-dropdown",function(n){var r=(0,a["default"])(n.target).find(":selected");r.data("nav-top")&&window.scrollTo(0,0);var o=e.getSearchParams(r.data("search")),i={navType:r.data("nav-type"),categorySlug:r.data("category-slug"),collectionId:r.data("collection-id"),templateId:r.data("template-id"),searchParams:o,searchParamsURI:JSON.stringify(o)};return t.navigationEvent(i,"click"),!1}),(0,a["default"])("body").off("click.envato-elements").on("click.envato-elements",".envato-elements--action",function(e){return!1}).on("change",".envato-elements__chktoggle-input",function(e){return(0,a["default"])(".envato-elements__chktoggle-input").each(function(){e&&e.target&&e.target!==this&&(0,a["default"])(this).prop("checked",!1)}),!1}).off("mousedown.envato-elements").on("mousedown.envato-elements",".envato-elements--action",function(n){if(n&&n.target&&!(0,a["default"])(n.target).parents(".os-scrollbar").length)switch(n.which){case 1:n.preventDefault();var r=(0,a["default"])(n.target);!r.data("nav-type")&&r.parent().data("nav-type")&&(r=r.parent()),r.data("nav-top")&&window.scrollTo(0,0);var o=e.getSearchParams(r.data("search")),i={navType:r.data("nav-type"),categorySlug:r.data("category-slug"),collectionId:r.data("collection-id"),templateId:r.data("template-id"),searchParams:o,searchParamsURI:JSON.stringify(o)};return t.navigationEvent(i,"click"),!1}})},this.navigationListen=function(){e.history=(0,i["default"])({});var t=e.history.location;e.triggerBrowserNavEvent(t,"init"),e.unlisten=e.history.listen(function(t,n){e.triggerBrowserNavEvent(t,n)})},this.getSearchParams=function(t){var n=location.search.substring(1),r=e.getQueryVariable(n,"search"),o={};return r&&(o=JSON.parse(decodeURIComponent(r)),o||(o={})),t&&("undefined"!=typeof t.pg&&(o.pg=t.pg),"undefined"!=typeof t.filters&&(o.filters=t.filters)),o},this.triggerBrowserNavEvent=function(t,n){h.modal.closeModal();var r=t.search.substring(1),o=e.getSearchParams(),i={location:t,page:e.getQueryVariable(r,"page"),navType:"category",categorySlug:e.getQueryVariable(r,"category"),collectionId:e.getQueryVariable(r,"collection_id"),templateId:e.getQueryVariable(r,"template_id"),searchParams:o,searchParamsURI:JSON.stringify(o)};i.templateId?i.navType="template":i.collectionId?i.navType="collection":i.categorySlug||"envato-elements"!==i.page||(i.categorySlug=Object.keys(envato_elements_admin.categories)[0]),e.navigationEvent(i,n)},this.navigationEvent=function(t,n){if("PUSH"!==n){var r=(0,a["default"])(".js-envato-elements__select2");r.length>0&&((0,y["default"])(!0,a["default"]),r.select2("close"));var o=!0,i=!1,s=void 0;try{for(var l,c=e.items[Symbol.iterator]();!(o=(l=c.next()).done);o=!0){var u=l.value;u.navigationChange&&u.navigationChange(e,t,n)}}catch(f){i=!0,s=f}finally{try{!o&&c["return"]&&c["return"]()}finally{if(i)throw s}}}},this.getQueryVariable=function(e,t,n){for(var r=e.split("&"),o=0;o<r.length;o++){var i=r[o].split("=");if(decodeURIComponent(i[0])===t)return decodeURIComponent(i[1])}return n},this.items=[],this.history=null,this.unlisten=null};window.ElementsAdmin=new _}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./pages/collections":389,"./pages/header":390,"./pages/plugins":391,"./utils/helper":395,"./utils/importer":396,"./utils/modal":398,"./utils/notifications":399,"./utils/scroller":401,"./utils/template":402,"babel-polyfill":2,"history/createBrowserHistory":374,select2:382}],386:[function(e,t,n){(function(t){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0}),n.collectionCache=void 0;var i=e("../utils/config"),s="undefined"!=typeof window?window.jQuery:"undefined"!=typeof t?t.jQuery:null,a=r(s),l=e("../utils/template"),c=e("../utils/api"),u=e("./template"),f=e("../utils/objectCache"),p=r(f),d=e("../utils/error"),h=e("../utils/scroller"),m=e("overlayscrollbars"),g=r(m),v=e("../utils/lazyLoader"),y=(n.collectionCache=new p["default"](function(e,t,n){var r=t&&t.collectionId?t.collectionId:"loading";return"undefined"==typeof e[r]&&(e[r]=new y),n&&e[r].setParent(n),e[r].updateData(t),e[r]}),function _(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.collectionId,r=void 0!==n&&n;o(this,_),this.setParent=function(t){e.parent=t},this.getReplaceData=function(){var t=e.data;return e.parent&&(t=Object.assign({},e.parent.getReplaceData(),t)),t},this.updateData=function(t){Object.assign(e.data,e.data,t)},this.getDataFromAPI=function(){return new Promise(function(t,n){c.api.post("collection/"+e.data.categorySlug,{collection_id:e.data.collectionId}).then(function(r){r&&r.data?(e.updateData(r.data),t()):(d.error.displayError("Collection API Error",r&&"undefined"!=typeof r.error?r.error:'Sorry something went wrong. If this continues to happen please <a href="mailto:extensions@envato.com">report the bug to us</a>.'),n())},function(e){e&&"undefined"!=typeof e.code&&"rest_cookie_invalid_nonce"===e.code?(d.error.displayError("API Token Expired","Refreshing please wait..."),setTimeout(function(){window.location.reload()},500)):d.error.displayError("Collection API Error","undefined"!=typeof e.error?e.error:'Sorry something went wrong. If this continues to happen please <a href="mailto:extensions@envato.com">report the bug to us</a>.'),n()})})},this.renderCollectionFromAPI=function(){return new Promise(function(t,n){l.template.pageLoading(),i.config.state("requestedCollectionId")!==e.data.collectionId?e.getDataFromAPI().then(function(){var n=l.template.renderMainDom("tmpl-envato-elements__collections",e.getReplaceData()),r=n.find(".envato-elements__collections-content");e.$dom=l.template.getDom("tmpl-envato-elements__collections-single",e.getReplaceData()),r.append(e.$dom);var o=e.$dom.find(".envato-elements__collections-templates"),i=!0,s=!1,a=void 0;try{for(var c,f=e.data.templates[Symbol.iterator]();!(i=(c=f.next()).done);i=!0){var p=c.value;"undefined"==typeof p.collectionId&&(p.collectionId=e.data.collectionId);var d=u.templateCache.getItem(p,e);d.renderTemplateDom(o)}}catch(h){s=!0,a=h}finally{try{!i&&f["return"]&&f["return"]()}finally{if(s)throw a}}e.contentInnerScrollInit(),l.template.mainRenderFinished(),t()},function(){n()}):(l.template.mainRenderFinished(),t())})},this.renderSummaryDom=function(t){e.$container=t,e.$dom=l.template.getDom("tmpl-envato-elements__collections-single",e.getReplaceData()),e.$container.append(e.$dom);var n=e.$dom.find(".envato-elements__collections-templates"),r=!0,o=!1,i=void 0;try{for(var s,a=e.data.templates[Symbol.iterator]();!(r=(s=a.next()).done);r=!0){var c=s.value;"undefined"==typeof c.collectionId&&(c.collectionId=e.data.collectionId);var f=u.templateCache.getItem(c,e);f.renderTemplateDom(n)}}catch(p){o=!0,i=p}finally{try{!r&&a["return"]&&a["return"]()}finally{if(o)throw i}}e.contentInnerScrollInit()},this.contentInnerScrollInit=function(){if("undefined"!=typeof e.data.categorySlug)switch(e.data.categorySlug){case"elementor":case"beaver-builder":e.horizontalScrollInit();break;case"elementor-blocks":}},this.horizontalScrollInit=function(){var t=e.$dom.find(".envato-elements__collections-scroller");if(e.itemScroller){if(t.hasClass("os-host"))return;e.itemScroller.destroy(),e.itemScroller=null}e.itemScroller=(0,g["default"])(t,{className:"os-theme-thick-dark",overflowBehavior:{y:"hidden"},scrollbars:{clickScrolling:!1,autoHide:"never"},callbacks:{onScroll:function(){v.lazyLoader.checkVisible()}}}),e.$dom.find(".js-envato-elements__thumb-scroll").each(function(){var e=parseInt((0,a["default"])(this).data("thumb-height"));if(e>0&&(e=Math.ceil(e*(2/3)),e>100)){var t=(e-100)/100;this.style.WebkitTransitionDuration=this.style.transitionDuration=Math.round(1.25*t*1e3)/1e3+"s",(0,a["default"])(this).data("hover-animation-speed",this.style.WebkitTransitionDuration)}}).hover(function(){this.style.WebkitTransitionDuration=this.style.transitionDuration="0.6s"},function(){this.style.WebkitTransitionDuration=this.style.transitionDuration=(0,a["default"])(this).data("hover-animation-speed")})},this.verticalScrollInit=function(){var t=e.$dom.find(".envato-elements__collections-scroller");if(e.itemScroller){if(t.hasClass("os-host"))return;e.itemScroller.destroy(),e.itemScroller=null}e.itemScroller=(0,g["default"])(t,{className:"os-theme-thick-dark",overflowBehavior:{x:"hidden"},scrollbars:{clickScrolling:!1,autoHide:"never"},callbacks:{onScroll:function(){v.lazyLoader.checkVisible()}}}),v.lazyLoader.checkVisible()},this.openDetailView=function(t,n){var r=null,o=!0,i=!1,s=void 0;try{for(var l,c=e.data.templates[Symbol.iterator]();!(o=(l=c.next()).done);o=!0){var f=l.value;"undefined"==typeof f.collectionId&&(f.collectionId=e.data.collectionId);var p=u.templateCache.getItem(f,e);n&&n===p.data.templateId&&p.updateTemplateDom(),r||t!==!0&&t!==p.data.templateId||(r=p)}}catch(d){i=!0,s=d}finally{try{!o&&c["return"]&&c["return"]()}finally{if(i)throw s}}if(r){var m=!1;if("undefined"!=typeof e.data.categorySlug)switch(e.data.categorySlug){case"elementor":case"beaver-builder":m=!0;break;case"elementor-blocks":e.verticalScrollInit()}e.$dom.addClass("envato-elements__collections-single--open"),e.$dom.parents(".envato-elements__collections-content").first().addClass("envato-elements__collections-content--open"),h.scroller.disableScroll(e.$dom.get(0)),setTimeout(function(){(0,a["default"])(window).trigger("resize")},50),h.scroller.scrollTo(0,e.$dom[0].offsetTop-15);var g=setInterval(function(){h.scroller.scrollTo(0,e.$dom[0].offsetTop-15)},50);setTimeout(function(){clearInterval(g),(0,a["default"])(window).trigger("resize"),e.$dom.addClass("envato-elements__collections-single--opened")},500);var v=e.$dom.find(".envato-elements__collections-single-detail");r.renderHighlightedDom(v),e.itemScroller&&m&&e.itemScroller.scroll(r.$dom,400)}},this.closeDetailView=function(){h.scroller.enableScroll(),e.itemScroller&&e.itemScroller.scroll({x:0},150),(0,a["default"])(".envato-elements__collection-template-cell--active").removeClass("envato-elements__collection-template-cell--active"),e.$dom&&(e.$dom.removeClass("envato-elements__collections-single--open").removeClass("envato-elements__collections-single--opened"),e.$dom.parents(".envato-elements__collections-content").first().removeClass("envato-elements__collections-content--open"))},this.data={collectionId:r,categorySlug:"",pageTitle:"Items",collectionName:"loading",collectionUrl:"#",templates:[],templateObjects:[]},this.$dom=null,this.$container=null,this.itemScroller=null})}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../utils/api":392,"../utils/config":393,"../utils/error":394,"../utils/lazyLoader":397,"../utils/objectCache":400,"../utils/scroller":401,"../utils/template":402,"./template":388,overlayscrollbars:378}],387:[function(e,t,n){(function(t){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0}),n.collectionsCache=void 0;var a=e("../utils/config"),l=e("../utils/template"),c=e("../utils/api"),u=e("../utils/error"),f=e("./collection"),p=e("./template"),d=e("../utils/objectCache"),h=r(d),m=e("body-scroll-lock"),g="undefined"!=typeof window?window.jQuery:"undefined"!=typeof t?t.jQuery:null,v=r(g),y=(n.collectionsCache=new h["default"](function(e,t){var n=t&&t.categorySlug?t.categorySlug:"loading";return"undefined"==typeof e[n]&&("elementor-blocks"===n?e[n]=new _:e[n]=new y),e[n].updateData(t),e[n]}),function b(){var e=this;s(this,b),this.updateData=function(t){Object.assign(e.data,e.data,t)},this.updateMeta=function(t){Object.assign(e.meta,e.meta,t)},this.renderPageFromAPI=function(){return new Promise(function(t,n){l.template.pageLoading(),c.api.post("collections/"+e.data.categorySlug,{elementsSearch:e.data.searchParams}).then(function(r){if(r&&r.data){if(e.data.collections=[],e.updateData(r.data),a.config.state("requestedCategorySlug")!==e.data.categorySlug)return n();if("undefined"!=typeof r.meta&&e.updateMeta(r.meta),e.$dom=l.template.renderMainDom("tmpl-envato-elements__collections",e.getReplaceData()),e.$collectionsHolder=e.$dom.find(".envato-elements__collections-content"),e.$collectionsHolder&&e.data.collections&&e.data.collections.length){var o=!0,i=!1,s=void 0;try{for(var c,p=e.data.collections[Symbol.iterator]();!(o=(c=p.next()).done);o=!0){var d=c.value,h=f.collectionCache.getItem(d,e);h.renderSummaryDom(e.$collectionsHolder)}}catch(m){i=!0,s=m}finally{try{!o&&p["return"]&&p["return"]()}finally{if(i)throw s}}}a.config.state("currentCategorySlug",e.data.categorySlug),l.template.mainRenderFinished(),t()}else u.error.displayError("Collections Data JSON Error",r&&"undefined"!=typeof r.error?r.error:'Sorry something went wrong. If this continues to happen please <a href="mailto:extensions@envato.com">report the bug to us</a>.'),n()},function(e){e&&"undefined"!=typeof e.code&&"rest_cookie_invalid_nonce"===e.code?(u.error.displayError("API Token Expired","Refreshing please wait..."),setTimeout(function(){window.location.reload()},500)):u.error.displayError("Collections Data Error","undefined"!=typeof e.error?e.error:'Sorry something went wrong. If this continues to happen please <a href="mailto:extensions@envato.com">report the bug to us</a>.'),n()})})},this.closeCollections=function(){(0,m.clearAllBodyScrollLocks)(),e.currentlyOpen&&(e.currentlyOpen.closeDetailView(),e.currentlyOpen=null),setTimeout(function(){(0,v["default"])(window).trigger("resize")},50)},this.openCollection=function(t,n){var r=f.collectionCache.getItem({collectionId:t});r&&(!e.currentlyOpen||n&&e.currentlyOpen===r||e.closeCollections(),e.currentlyOpen=r,n?r.openDetailView(n):r.openDetailView(!0))},this.getReplaceData=function(){if(e.data.pagination=[],e.data.page_number&&e.data.total_results&&e.data.per_page&&e.data.total_results>e.data.per_page)for(var t=0;t<e.data.total_results/e.data.per_page;t++)e.data.pagination.push({pageNumber:t,pageLabel:t+1,pageCurrent:parseInt(e.data.page_number)===t+1});return e.data.meta=e.meta,e.data},this.data={categorySlug:"",pageTitle:"Items",collections:[],searchParams:{}},this.meta={},this.currentlyOpen=null}),_=function(e){function t(){s(this,t);var e=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.openCollection=function(t,n){e.$dom&&(e.currentBlock&&e.currentBlock.closeBlockPreview(e.$dom),e.currentBlock=p.templateCache.getItem({collectionId:t,templateId:n},e),e.currentBlock.loadBlockPreview(e.$dom))},e.closeCollections=function(){e.$dom&&e.currentBlock&&e.currentBlock.closeBlockPreview(e.$dom)},e.renderPageFromAPI=function(){return new Promise(function(t,n){l.template.pageLoading(),c.api.post("collections/"+e.data.categorySlug,{elementsSearch:e.data.searchParams}).then(function(r){if(r&&r.data){if(e.data.blocks=[],e.updateData(r.data),a.config.state("requestedCategorySlug")!==e.data.categorySlug)return n();if("undefined"!=typeof r.meta&&e.updateMeta(r.meta),e.$dom=l.template.renderMainDom("tmpl-envato-elements__collections",e.getReplaceData()),e.$blocksHolder=e.$dom.find(".envato-elements__collections-content"),e.$blocksHolder&&e.data.blocks&&e.data.blocks.length){var o=!0,i=!1,s=void 0;try{for(var c,f=e.data.blocks[Symbol.iterator]();!(o=(c=f.next()).done);o=!0){
|
16 |
+
var d=c.value,h=l.template.getDom("tmpl-envato-elements__block-wrap",d);e.$blocksHolder.append(h);var m=!0,g=!1,v=void 0;try{for(var y,_=d.blocks[Symbol.iterator]();!(m=(y=_.next()).done);m=!0){var b=y.value,w=p.templateCache.getItem(b,e);w.renderTemplateDom(h.find(".envato-elements__block-content"))}}catch(x){g=!0,v=x}finally{try{!m&&_["return"]&&_["return"]()}finally{if(g)throw v}}}}catch(x){i=!0,s=x}finally{try{!o&&f["return"]&&f["return"]()}finally{if(i)throw s}}}a.config.state("currentCategorySlug",e.data.categorySlug),l.template.mainRenderFinished(),t()}else u.error.displayError("Blocks Data JSON Error",r&&"undefined"!=typeof r.error?r.error:'Sorry something went wrong. If this continues to happen please <a href="mailto:extensions@envato.com">report the bug to us</a>.'),n()},function(e){e&&"undefined"!=typeof e.code&&"rest_cookie_invalid_nonce"===e.code?(u.error.displayError("API Token Expired","Refreshing please wait..."),setTimeout(function(){window.location.reload()},500)):u.error.displayError("Blocks Data Error","undefined"!=typeof e.error?e.error:'Sorry something went wrong. If this continues to happen please <a href="mailto:extensions@envato.com">report the bug to us</a>.'),n()})})},e.refreshPageFromAPI=function(){return new Promise(function(t,n){return e.$blocksHolder?void c.api.post("collections/"+e.data.categorySlug,{elementsSearch:e.data.searchParams}).then(function(r){if(r&&r.data){if(e.data.blocks=[],e.updateData(r.data),a.config.state("requestedCategorySlug")!==e.data.categorySlug)return n();if("undefined"!=typeof r.meta&&e.updateMeta(r.meta),e.$blocksHolder&&e.data.blocks&&e.data.blocks.length){var o=!0,i=!1,s=void 0;try{for(var c,f=e.data.blocks[Symbol.iterator]();!(o=(c=f.next()).done);o=!0){var d=c.value,h=!0,m=!1,g=void 0;try{for(var v,y=d.blocks[Symbol.iterator]();!(h=(v=y.next()).done);h=!0){var _=v.value,b=p.templateCache.getItem(_,e);b.updateTemplateDom()}}catch(w){m=!0,g=w}finally{try{!h&&y["return"]&&y["return"]()}finally{if(m)throw g}}}}catch(w){i=!0,s=w}finally{try{!o&&f["return"]&&f["return"]()}finally{if(i)throw s}}}l.template.mainRenderFinished(),t()}else u.error.displayError("Blocks Data JSON Error",r&&"undefined"!=typeof r.error?r.error:'Sorry something went wrong. If this continues to happen please <a href="mailto:extensions@envato.com">report the bug to us</a>.'),n()},function(e){e&&"undefined"!=typeof e.code&&"rest_cookie_invalid_nonce"===e.code?(u.error.displayError("API Token Expired","Refreshing please wait..."),setTimeout(function(){window.location.reload()},500)):u.error.displayError("Blocks Data Error","undefined"!=typeof e.error?e.error:'Sorry something went wrong. If this continues to happen please <a href="mailto:extensions@envato.com">report the bug to us</a>.'),n()}):n()})},e.currentBlock=null,e}return i(t,e),t}(y)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../utils/api":392,"../utils/config":393,"../utils/error":394,"../utils/objectCache":400,"../utils/template":402,"./collection":386,"./template":388,"body-scroll-lock":4}],388:[function(e,t,n){(function(t){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0}),n.templateCache=void 0;var i="undefined"!=typeof window?window.jQuery:"undefined"!=typeof t?t.jQuery:null,s=r(i),a=e("../utils/template"),l=e("../utils/lazyLoader"),c=e("../utils/objectCache"),u=r(c),f=e("../utils/scroller"),p=e("../utils/importer"),d=e("overlayscrollbars"),h=r(d),m=(n.templateCache=new u["default"](function(e,t,n){t&&"undefined"==typeof t.collectionId&&(console.log("Failed to find template collection"),console.log(t));var r=(t&&t.collectionId?t.collectionId:"loading")+(t&&t.templateId?t.templateId:"loading");return"undefined"==typeof e[r]&&(e[r]=new m(t)),n&&e[r].setParent(n),e[r].updateData(t),e[r]}),function g(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.templateId,r=void 0!==n&&n;o(this,g),this.setParent=function(t){t&&(e.parent=t)},this.updateData=function(t){Object.assign(e.data,e.data,t)},this.getReplaceData=function(){var t=e.data;return e.parent&&(t=Object.assign({},e.parent.getReplaceData(),{importMode:p.importer.importMode},t)),t},this.updateTemplateDom=function(){if(e.$dom){var t=a.template.getDom("tmpl-envato-elements__collection-template-cell",e.getReplaceData());e.$dom.replaceWith(t),e.$dom=t,l.lazyLoader.addLazy(e.$dom),l.lazyLoader.checkVisibleCallback()}e.$blockPreview&&e.loadBlockPreview(e.parent.$dom)},this.renderTemplateDom=function(t){e.$dom=a.template.getDom("tmpl-envato-elements__collection-template-cell",e.getReplaceData()),t.append(e.$dom),l.lazyLoader.addLazy(e.$dom)},this.renderHighlightedDom=function(t){(0,s["default"])(".envato-elements__collection-template-cell--active").removeClass("envato-elements__collection-template-cell--active"),e.$dom.addClass("envato-elements__collection-template-cell--active");var n=a.template.getDom("tmpl-envato-elements__collection-preview",e.getReplaceData());t.empty().append(n),e.verticalScroll&&(e.verticalScroll.destroy(),e.verticalScroll=null),e.verticalScroll=(0,h["default"])(t.find(".envato-elements__collection-detail-thumbnail"),{className:"os-theme-thick-dark",overflowBehavior:{x:"hidden"},scrollbars:{autoHide:"never"}})},this.loadBlockPreview=function(t){f.scroller.rememberScrollPoint(),(0,s["default"])(".envato-elements__block-preview").remove(),e.$blockPreview=a.template.getDom("tmpl-envato-elements__block-preview",e.getReplaceData()),t.addClass("--block-visible"),e.$blockPreview.insertBefore(t),setTimeout(function(){(0,s["default"])(window).trigger("resize")},50)},this.closeBlockPreview=function(t){t.removeClass("--block-visible"),(0,s["default"])(".envato-elements__block-preview").remove(),e.$blockPreview&&f.scroller.restoreScrollPoint(),e.$blockPreview=null,setTimeout(function(){(0,s["default"])(window).trigger("resize")},50)},this.data={templateId:r,templateName:"loading",templateUrl:"#",previewThumb:"#",previewThumbAspect:"100%"},this.$dom=null,this.lastScrollPos=0,this.lastImageMarginTop=0,this.verticalScroll=null,this.$blockPreview=null});n["default"]=m}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../utils/importer":396,"../utils/lazyLoader":397,"../utils/objectCache":400,"../utils/scroller":401,"../utils/template":402,overlayscrollbars:378}],389:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0}),n.kitCollections=void 0;var o=e("../utils/config"),i=e("../objects/collections"),s=(e("../objects/collection"),e("body-scroll-lock")),a=function l(){var e=this;r(this,l),this.pageLoaded=function(){},this.loadCategoryItems=function(t,n,r,s){var a=e.categories[n],l=i.collectionsCache.getItem({category:a,pageTitle:a.page_title,categorySlug:n,searchParams:r});l.closeCollections(),o.config.state("requestedCategorySlug")===n&&"collection-close"===t||(o.config.state("requestedCategorySlug",n),l.renderPageFromAPI().then(function(){s&&"function"==typeof s&&s()})["catch"](function(){}))},this.loadCollectionItems=function(t,n,r,s,a){var l=e.categories[n];if(o.config.state("requestedCategorySlug")!==n)return void e.loadCategoryItems(t,n,r,function(){e.loadCollectionItems(t,n,r,s,a)});var c=i.collectionsCache.getItem({category:l,pageTitle:l.page_title,categorySlug:n,searchParams:r});switch(o.config.state("requestedCollectionId",s),o.config.state("requestedTemplateId",a),t){case"collection":c.openCollection(s);break;case"template":c.openCollection(s,a)}},this.navigationChange=function(t,n,r){if(n&&n.categorySlug&&r&&n.navType&&"undefined"!=typeof e.categories[n.categorySlug])switch(n.navType){case"main-category":(0,s.clearAllBodyScrollLocks)(),"POP"!==r&&t.history&&t.history.push("?"+o.config.get("admin_slug")+"&category="+n.categorySlug,"history"),e.loadCategoryItems(n.navType,n.categorySlug,{});break;case"category":case"collection-close":(0,s.clearAllBodyScrollLocks)(),"POP"!==r&&t.history&&t.history.push("?"+o.config.get("admin_slug")+"&category="+n.categorySlug+"&search="+n.searchParamsURI,"history"),e.loadCategoryItems(n.navType,n.categorySlug,n.searchParams);break;case"collection":"POP"!==r&&t.history&&t.history.push("?"+o.config.get("admin_slug")+"&category="+n.categorySlug+"&collection_id="+n.collectionId+"&search="+n.searchParamsURI,"history"),e.loadCollectionItems(n.navType,n.categorySlug,n.searchParams,n.collectionId);break;case"template":"POP"!==r&&t.history&&t.history.push("?"+o.config.get("admin_slug")+"&category="+n.categorySlug+"&collection_id="+n.collectionId+"&template_id="+n.templateId+"&search="+n.searchParamsURI,"history"),e.loadCollectionItems(n.navType,n.categorySlug,n.searchParams,n.collectionId,n.templateId)}},this.categories=o.config.get("categories")};n.kitCollections=new a},{"../objects/collection":386,"../objects/collections":387,"../utils/config":393,"body-scroll-lock":4}],390:[function(e,t,n){(function(t){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0}),n.header=void 0;var i="undefined"!=typeof window?window.jQuery:"undefined"!=typeof t?t.jQuery:null,s=r(i),a=(e("../utils/config"),function l(){var e=this;o(this,l),this.pageLoaded=function(){e.$fixedHeader=(0,s["default"])(".envato-elements__wrapper--fixed"),e.setFixedHeader(),e.setSubNavOverflow(),(0,s["default"])(window).resize(function(){e.setFixedHeader(),e.setSubNavOverflow()})},this.setFixedHeader=function(){e.$fixedHeader&&e.$fixedHeader.length&&e.$fixedHeader.find(".envato-elements__header").width(e.$fixedHeader.width()).addClass("envato-elements__header--set")},this.setSubNavOverflow=function(){var e=(0,s["default"])(".envato-elements__collections-header__subnav");if(e.length){var t=e.width()-300,n=0,r=0,o=(0,s["default"])(".envato-elements__collections-header__subnav-more-item .envato-elements__chktoggle-content-inner");o.empty(),e.find(".envato-elements__collections-header__subnav-link--hidden").removeClass("envato-elements__collections-header__subnav-link--hidden"),e.children().width(function(e,t){n+=t}),e.removeClass("envato-elements__collections-header__subnav--hasmore"),(0,s["default"])(e.find(".envato-elements__collections-header__subnav-link").get().reverse()).each(function(){n>=t&&!(0,s["default"])(this).hasClass("envato-elements__collections-header__subnav-link--current")&&!(0,s["default"])(this).hasClass("envato-elements__collections-header__subnav-link--hidden")&&(n-=(0,s["default"])(this).width(),o.append((0,s["default"])(this).clone()),(0,s["default"])(this).addClass("envato-elements__collections-header__subnav-link--hidden"),r++)}),r>0&&e.addClass("envato-elements__collections-header__subnav--hasmore")}},this.navigationChange=function(e,t,n){t&&t.categorySlug&&((0,s["default"])(".envato-elements__header-menulink--current").removeClass("envato-elements__header-menulink--current"),(0,s["default"])(".envato-elements__header-menulink").each(function(){((0,s["default"])(this).data("category-slug")==t.categorySlug||(0,s["default"])(this).data("category-slugs")&&s["default"].inArray(t.categorySlug,(0,s["default"])(this).data("category-slugs"))>0)&&(0,s["default"])(this).addClass("envato-elements__header-menulink--current")}))},this.$fixedHeader=null});n.header=new a}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../utils/config":393}],391:[function(e,t,n){(function(t){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0}),n.plugins=void 0;var i=(e("../utils/config"),"undefined"!=typeof window?window.jQuery:"undefined"!=typeof t?t.jQuery:null),s=r(i),a=e("../utils/modal"),l=e("../utils/api"),c=function u(){var e=this;o(this,u),this.pageLoaded=function(){e.$deactivateButton=(0,s["default"])("#the-list").find('[data-slug="envato-elements"] span.deactivate a'),e.$deactivateButton.on("click",function(t){return t.preventDefault(),a.modal.closeModal(),a.modal.openModal("tmpl-envato-elements__plugin-feedback",{skip:e.$deactivateButton.attr("href")}),!1}),(0,s["default"])("body").on("click",".envato-elements__disable-submit",function(t){t.preventDefault();var n=(0,s["default"])(".envato-elements__disable-submit");n.width(n.width()).text("Loading...").prop("disabled",!0);var r=(0,s["default"])("input[name='elements_deactivation_reason']:checked").val();return l.api.post("feedback/submit",{answer:r,answer_text:(0,s["default"])("input[name='elements_deactivation_reason_"+r+"']").val()}).then(function(e){},function(e){})["finally"](function(){window.location.href=e.$deactivateButton.attr("href")}),!1})}};n.plugins=new c}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../utils/api":392,"../utils/config":393,"../utils/modal":398}],392:[function(e,t,n){(function(t){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0}),n.api=void 0;var i="undefined"!=typeof window?window.jQuery:"undefined"!=typeof t?t.jQuery:null,s=r(i),a=e("./config"),l=function c(){o(this,c),this.post=function(e,t){return new Promise(function(n,r){t||(t={}),t._wpnonce=a.config.get("api_nonce"),s["default"].ajax({url:a.config.get("api_url")+e,method:"POST",dataType:"json",data:t}).done(function(e){e&&"undefined"!=typeof e.success&&"undefined"==typeof e.error&&!e.success&&(e.error=!0),n(e)}).fail(function(e,t,n){var o={};try{o=JSON.parse(e.responseText)}catch(i){}0===Object.keys(o).length&&(o={error:"Sorry something went wrong. "+e.responseText}),r(o)}).always(function(){})})},this.localCache={}};n.api=new l}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./config":393}],393:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var o=function i(){var e=this;r(this,i),this.get=function(t){return"undefined"!=typeof e.config[t]&&e.config[t]},this.state=function(t,n){return"undefined"!=typeof n?(e.stateData[t]=n,n):"undefined"!=typeof e.stateData[t]&&e.stateData[t]},this.config=envato_elements_admin,this.stateData={}};n.config=new o},{}],394:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0}),n.error=void 0;var o=e("./modal"),i=e("./template"),s=function a(){r(this,a),this.pageLoaded=function(){},this.displayError=function(e,t,n){n!==!1&&(n=!0),i.template.pageFinishedLoading(),o.modal.closeModal(),o.modal.openModal("tmpl-envato-elements__error-modal",{title:e,message:t,reactivate:n})}};n.error=new s},{"./modal":398,"./template":402}],395:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0}),n.helper=void 0;var o=e("./modal"),i=function s(){var e=this;r(this,s),this.pageLoaded=function(){},this.navigationChange=function(t,n,r){n&&n.navType&&"help-modal"===n.navType?e.loadHelpModal():n&&n.navType&&"terms-modal"===n.navType&&e.loadTermsModal()},this.loadHelpModal=function(){o.modal.openModal("tmpl-envato-elements__help-modal",{})},this.loadTermsModal=function(){o.modal.openModal("tmpl-envato-elements__terms-modal",{})}};n.helper=new i},{"./modal":398}],396:[function(e,t,n){(function(t){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0}),n.importer=void 0;var i="undefined"!=typeof window?window.jQuery:"undefined"!=typeof t?t.jQuery:null,s=r(i),a=e("./api"),l=e("./template"),c=e("../objects/collection"),u=e("./config"),f=e("./error"),p=e("../objects/template"),d=e("../objects/collections"),h=function m(){var e=this;o(this,m),this.pageLoaded=function(){e.$holder=(0,s["default"])(".envato-elements__importer-wrapper"),e.importData={imports:[]},e.loadImportHistory()},this.setMode=function(t){e.importMode=t},this.navigationChange=function(t,n,r){n&&n.templateId&&n.collectionId&&n.navType&&"import-template"===n.navType?e.startBackgroundImport(n.categorySlug,n.collectionId,n.templateId):n&&n.templateId&&n.collectionId&&n.navType&&"direct-insert-template"===n.navType?e.startBackgroundDirectInsert(n.categorySlug,n.collectionId,n.templateId):n&&n.templateId&&n.collectionId&&n.navType&&"insert-template-create-page"===n.navType&&e.startBackgroundInsertCreate(n.categorySlug,n.collectionId,n.templateId)},this.startBackgroundInsertCreate=function(t,n,r){var o=(0,s["default"])('.envato-elements__create-page-name[data-template-id="'+r+'"]'),i=o.val();if(!i.length)return void f.error.displayError("Create Page","Please enter a valid Page Name and try again ",!1);if("undefined"==typeof e.pendingCreates[r]){e.pendingCreates[r]=!0,(0,s["default"])('.envato-elements-template-status[data-template-id="'+r+'"]').removeClass("envato-elements-template-status--imported").addClass("envato-elements-template-status--importing");var l=(0,s["default"])('.envato-elements-insert-button[data-template-id="'+r+'"]');l.html("Creating <span></span>").addClass("envato-elements-insert-button--inserting"),l.parents(".envato-elements__collection-template-option").addClass("..envato-elements__collection-template-option--inserting"),e.setImportStatus("Creating Page:",i),a.api.post("create/"+t+"/process",{collectionId:n,templateId:r,insertType:"create-page",pageName:i}).then(function(t){e.refreshAfterImportOrInsert(n,r,t,function(){e.setImportStatus("Page Created:",t.page_name,t.page_url),l.html("Page Created <span></span>").removeClass("envato-elements-insert-button--inserting").addClass("envato-elements-insert-button--inserted")})},function(e){})["finally"](function(){delete e.pendingCreates[r]})}},this.startBackgroundImport=function(t,n,r){if("undefined"==typeof e.pendingImports[r]){e.pendingImports[r]=!0,(0,s["default"])('.envato-elements-import-button[data-template-id="'+r+'"]').html("Importing <span></span>").removeClass("envato-elements-import-button--imported").addClass("envato-elements-import-button--importing"),(0,s["default"])('.envato-elements-template-status[data-template-id="'+r+'"]').removeClass("envato-elements-template-status--imported").addClass("envato-elements-template-status--importing");var o=p.templateCache.getItem({collectionId:n,templateId:r},e);e.setImportStatus("Importing:",o.data.templateName),a.api.post("import/"+t+"/process",{collectionId:n,templateId:r,importType:"library"}).then(function(t){e.refreshAfterImportOrInsert(n,t.templateId,t,function(){e.setImportStatus("Imported:",o.data.templateName,t.url)})},function(e){})["finally"](function(){delete e.pendingImports[r]})}},this.startBackgroundDirectInsert=function(t,n,r){if("undefined"==typeof e.pendingImports[r]){e.pendingImports[r]=!0,(0,s["default"])('.envato-elements-import-button[data-template-id="'+r+'"]').html("Importing <span></span>").removeClass("envato-elements-import-button--imported").addClass("envato-elements-import-button--importing"),(0,s["default"])('.envato-elements-template-status[data-template-id="'+r+'"]').removeClass("envato-elements-template-status--imported").addClass("envato-elements-template-status--importing");var o=p.templateCache.getItem({collectionId:n,templateId:r},e);e.setImportStatus("Inserting:",o.data.templateName),a.api.post("insert/"+t+"/process",{collectionId:n,templateId:r,insertType:"direct"}).then(function(e){if("undefined"!=typeof elementor){var t=new Backbone.Model({getTitle:function(){return"Test"}});elementor.channels.data.trigger("template:before:insert",t);for(var n=0;n<e.data.content.length;n++)elementor.getPreviewView().addChildElement(e.data.content[n]);elementor.channels.data.trigger("template:after:insert",{}),window.elementsModal.hide()}},function(e){})["finally"](function(){delete e.pendingImports[r]})}},this.getReplaceData=function(){return e.importData},this.refreshImportList=function(){var t=l.template.getDom("tmpl-envato-elements__importer",e.getReplaceData());e.$importer?e.$importer.replaceWith(t):e.$holder.append(t),e.$importer=t},this.setThumbStates=function(){if(0<e.importData.imports.length){var t=!0,n=!1,r=void 0;try{for(var o,i=e.importData.imports[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){var a=o.value;(a.imported||"undefined"!=typeof a.inserted&&a.inserted.length>0)&&(0,s["default"])('.envato-elements-template-status[data-template-id="'+a.templateId+'"]').removeClass("envato-elements-template-status--inserting").removeClass("envato-elements-template-status--importing").addClass("envato-elements-template-status--imported")}}catch(l){n=!0,r=l}finally{try{!t&&i["return"]&&i["return"]()}finally{if(n)throw r}}}},this.loadImportHistory=function(){a.api.post("import/status").then(function(t){t&&t.data&&(Object.assign(e.importData,e.importData,t.data),e.refreshImportList(),e.setThumbStates())},function(e){})},this.setImportStatus=function(e,t,n){(0,s["default"])(".envato-elements__importer-status").html("<span><strong>"+e+"</strong> "+(n?'<a href="'+n+'" target="_blank">'+t+"</a>":t)+"</span>").addClass("--active")},this.refreshAfterImportOrInsert=function(t,n,r,o){if(e.loadImportHistory(),r&&"undefined"!=typeof r.category&&"elementor-blocks"===r.category){var i=d.collectionsCache.getItem({categorySlug:r.category});i.refreshPageFromAPI().then(function(){o()})}else{var s=c.collectionCache.getItem({collectionId:t});s.getDataFromAPI().then(function(){u.config.state("requestedTemplateId")===n?s.openDetailView(n,n):s.openDetailView(null,n),o()})}},this.$holder=null,this.$importer=null,this.pendingImports={},this.pendingCreates={},this.importMode="import"};n.importer=new h}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../objects/collection":386,"../objects/collections":387,"../objects/template":388,"./api":392,"./config":393,"./error":394,"./template":402}],397:[function(e,t,n){(function(e){"use strict";function t(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0}),n.lazyLoader=void 0;var o="undefined"!=typeof window?window.jQuery:"undefined"!=typeof e?e.jQuery:null,i=t(o),s=function a(){var e=this;r(this,a),this.throttle=function(e,t){var n=!1;return function(){n||(e.call(),n=!0,setTimeout(function(){n=!1,e.call()},t))}},this.addLazy=function(t){e.lazyObjects.push(t)},this.checkVisibleCallback=function(){var t=(0,i["default"])(window).scrollTop(),n=t+(0,i["default"])(window).height(),r=(0,i["default"])(window).width();for(var o in e.lazyObjects)if(e.lazyObjects.hasOwnProperty(o))if(e.lazyObjects[o]&&document.body.contains(e.lazyObjects[o].get(0))){if(e.lazyObjects[o].hasClass("--lazyloaded"))delete e.lazyObjects[o];else if(e.lazyObjects[o]){var s=e.lazyObjects[o].offset().top,a=e.lazyObjects[o].offset().left,l=a+e.lazyObjects[o].width(),c=s+e.lazyObjects[o].height();s<=n&&c>=t&&l>0&&a<r&&(e.lazyObjects[o].find("[data-src]").each(function(){(0,i["default"])(this).css("background-image",'url("'+(0,i["default"])(this).data("src")+'")').addClass("--lazyloaded")}),delete e.lazyObjects[o])}}else delete e.lazyObjects[o]},this.checkVisible=this.throttle(this.checkVisibleCallback,150),this.lazyObjects=[],document.addEventListener("resize",this.checkVisible,!0),document.addEventListener("scroll",this.checkVisible,!0)};n.lazyLoader=new s}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],398:[function(e,t,n){(function(t){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0}),n.modal=void 0;var i="undefined"!=typeof window?window.jQuery:"undefined"!=typeof t?t.jQuery:null,s=r(i),a=e("./template"),l=function c(){var e=this;o(this,c),this.pageLoaded=function(){(0,s["default"])("body").on("click",function(t){e.modalOpen&&!(0,s["default"])(t.target).parents(".envato-elements__modal-inner-bg").length&&e.closeModal()}).on("click",".envato-elements__modal-close",function(t){return t.preventDefault(),e.closeModal(),!1})},this.closeModal=function(){e.modalOpen=!1,e.$modalHolder&&e.$modalHolder.empty(),(0,s["default"])("body").removeClass("envato-elements--modal-open")},this.openModal=function(t,n){e.$modalHolder=(0,s["default"])(".envato-elements__modal-holder"),e.$modalDom=a.template.getDom(t,n),e.$modalHolder.empty(),e.$modalHolder.append(e.$modalDom),e.modalOpen=!0,(0,s["default"])("body").addClass("envato-elements--modal-open")},this.$modalHolder=null,this.$modalDom=null,this.modalOpen=!1};n.modal=new l}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./template":402}],399:[function(e,t,n){(function(t){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0}),n.notifications=void 0;var i="undefined"!=typeof window?window.jQuery:"undefined"!=typeof t?t.jQuery:null,s=r(i),a=e("./api"),l=function c(){var e=this;o(this,c),this.pageLoaded=function(){(0,s["default"])("body").on("click",".js-envato-elements__notification-trigger",function(t){e.notificationsRead(t&&t.target?(0,s["default"])(t.target).data("unseen-notifications"):[])})},this.notificationsRead=function(e){(0,s["default"])(".js-envato-elements__notification-trigger").find(".envato-elements__header-menu-label").remove(),a.api.post("notifications/read",{ids:e}).then(function(e){},function(e){})}};n.notifications=new l}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./api":392}],400:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var o=function i(e){var t=this;r(this,i),this.getItem=function(e,n){return t.lookup(t.items,e,n)},this.items={},this.lookup=e};n["default"]=o},{}],401:[function(e,t,n){(function(t){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0}),n.scroller=void 0;var i="undefined"!=typeof window?window.jQuery:"undefined"!=typeof t?t.jQuery:null,s=r(i),a=e("body-scroll-lock"),l=e("./importer"),c=function u(){var e=this;o(this,u),this.setScrollHolder=function(t){e.scrollHolder=t},this.rememberScrollPoint=function(){e.scrollPoint=(0,s["default"])(e.scrollHolder).scrollTop()},this.restoreScrollPoint=function(){(0,s["default"])(e.scrollHolder).scrollTop(e.scrollPoint)},this.scrollTo=function(t,n){(0,s["default"])(e.scrollHolder).scrollTop(n)},this.disableScroll=function(t){"insert"===l.importer.importMode?(0,s["default"])(e.scrollHolder).addClass("--locked"):(0,a.disableBodyScroll)(t)},this.enableScroll=function(){"insert"===l.importer.importMode?(0,s["default"])(e.scrollHolder).removeClass("--locked"):(0,a.clearAllBodyScrollLocks)()},this.scrollHolder=null,this.scrollPoint=0};n.scroller=new c}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./importer":396,"body-scroll-lock":4}],402:[function(e,t,n){(function(t){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0}),n.template=void 0;var i="undefined"!=typeof window?window.jQuery:"undefined"!=typeof t?t.jQuery:null,s=r(i),a=e("handlebars"),l=r(a),c=e("../pages/header"),u=e("./importer"),f=e("./lazyLoader"),p=e("select2"),d=r(p),h=function m(){var e=this;o(this,m),this.pageLoaded=function(){e.$holder=(0,s["default"])(".js-envato-elements-content")},this.getDom=function(t,n){return"undefined"!=typeof n.categorySlug&&document.getElementById(t+"--"+n.categorySlug)&&(t=t+"--"+n.categorySlug),"undefined"==typeof e.templates[t]&&(e.templates[t]=l["default"].compile(document.getElementById(t).innerHTML)),n.contentTypeName="Template Kit",(0,s["default"])(e.templates[t](n))},this.renderMainDom=function(t,n){var r=e.getDom(t,n);return e.setMainDom(r),r},this.setMainDom=function(t){return e.$holder.empty(),e.$holder.append(t),setTimeout(c.header.setFixedHeader,100),t},this.pageLoading=function(){e.$holder.addClass("envato-elements__content-dynamic--loading")},this.pageFinishedLoading=function(){e.$holder.removeClass("envato-elements__content-dynamic--loading")},this.mainRenderFinished=function(){e.pageFinishedLoading(),u.importer.refreshImportList(),f.lazyLoader.checkVisibleCallback(),(0,d["default"])(!0,s["default"]),(0,s["default"])(".js-envato-elements__select2").each(function(){(0,s["default"])(this).select2({dropdownParent:(0,s["default"])(this).parent()})}),c.header.setSubNavOverflow()},this.$holder=null,this.templates={},l["default"].registerHelper("if_eq",function(e,t,n){return e===t?n.fn(this):n.inverse(this)}),l["default"].registerHelper("page_link",function(e,t){return e.pg=t,JSON.stringify(e)}),l["default"].registerHelper({eq:function(e,t){return e===t},ne:function(e,t){return e!==t},lt:function(e,t){return e<t},gt:function(e,t){return e>t},lte:function(e,t){return e<=t},gte:function(e,t){return e>=t},and:function(){return Array.prototype.slice.call(arguments).every(Boolean)},or:function(){return Array.prototype.slice.call(arguments,0,-1).some(Boolean)}})};n.template=new h}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../pages/header":390,"./importer":396,"./lazyLoader":397,handlebars:359,select2:382}]},{},[385]);
|
17 |
//# sourceMappingURL=app.min.js.map
|
envato-elements.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
* Description: Beautifully designed, Free templates, Handcrafted for popular WordPress page builders.
|
5 |
* Author: Envato
|
6 |
* Author URI: https://envato.com
|
7 |
-
* Version: 0.1.
|
8 |
* License: GPLv3 or later
|
9 |
* License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
10 |
*
|
@@ -28,7 +28,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
28 |
}
|
29 |
|
30 |
define( 'ENVATO_ELEMENTS_SLUG', 'envato-elements' );
|
31 |
-
define( 'ENVATO_ELEMENTS_VER', '0.1.
|
32 |
define( 'ENVATO_ELEMENTS_FILE', __FILE__ );
|
33 |
define( 'ENVATO_ELEMENTS_DIR', plugin_dir_path( ENVATO_ELEMENTS_FILE ) );
|
34 |
define( 'ENVATO_ELEMENTS_URI', plugins_url( '/', ENVATO_ELEMENTS_FILE ) );
|
4 |
* Description: Beautifully designed, Free templates, Handcrafted for popular WordPress page builders.
|
5 |
* Author: Envato
|
6 |
* Author URI: https://envato.com
|
7 |
+
* Version: 0.1.5
|
8 |
* License: GPLv3 or later
|
9 |
* License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
10 |
*
|
28 |
}
|
29 |
|
30 |
define( 'ENVATO_ELEMENTS_SLUG', 'envato-elements' );
|
31 |
+
define( 'ENVATO_ELEMENTS_VER', '0.1.5' );
|
32 |
define( 'ENVATO_ELEMENTS_FILE', __FILE__ );
|
33 |
define( 'ENVATO_ELEMENTS_DIR', plugin_dir_path( ENVATO_ELEMENTS_FILE ) );
|
34 |
define( 'ENVATO_ELEMENTS_URI', plugins_url( '/', ENVATO_ELEMENTS_FILE ) );
|
inc/class-elementor.php
CHANGED
@@ -27,10 +27,8 @@ class Elementor extends Base {
|
|
27 |
*/
|
28 |
public function __construct() {
|
29 |
parent::__construct();
|
30 |
-
|
31 |
-
|
32 |
-
add_action( 'elementor/preview/enqueue_styles', [ $this, 'enqueue_editor_scripts' ] );
|
33 |
-
}
|
34 |
}
|
35 |
|
36 |
/**
|
@@ -39,17 +37,18 @@ class Elementor extends Base {
|
|
39 |
* @return bool
|
40 |
*/
|
41 |
public function is_deep_integration_enabled() {
|
42 |
-
return class_exists( '\Elementor\Plugin' );
|
43 |
-
// return defined( 'ENVATO_ELEMENTS_BETA' ) && ENVATO_ELEMENTS_BETA && class_exists( '\Elementor\Plugin' );
|
44 |
}
|
45 |
|
46 |
/**
|
47 |
* Load CSS for our custom Elementor modal.
|
48 |
*/
|
49 |
public function enqueue_editor_scripts() {
|
50 |
-
|
51 |
-
|
52 |
-
|
|
|
|
|
53 |
}
|
54 |
|
55 |
|
27 |
*/
|
28 |
public function __construct() {
|
29 |
parent::__construct();
|
30 |
+
add_action( 'elementor/editor/before_enqueue_scripts', [ $this, 'enqueue_editor_scripts' ] );
|
31 |
+
add_action( 'elementor/preview/enqueue_styles', [ $this, 'enqueue_editor_scripts' ] );
|
|
|
|
|
32 |
}
|
33 |
|
34 |
/**
|
37 |
* @return bool
|
38 |
*/
|
39 |
public function is_deep_integration_enabled() {
|
40 |
+
return class_exists( '\Elementor\Plugin' ) && License::get_instance()->is_activated();
|
|
|
41 |
}
|
42 |
|
43 |
/**
|
44 |
* Load CSS for our custom Elementor modal.
|
45 |
*/
|
46 |
public function enqueue_editor_scripts() {
|
47 |
+
if ( $this->is_deep_integration_enabled() ) {
|
48 |
+
wp_enqueue_script( 'elements-elementor-modal', ENVATO_ELEMENTS_URI . 'assets/js/elementor-modal.min.js', [ 'jquery' ], ENVATO_ELEMENTS_VER );
|
49 |
+
wp_enqueue_style( 'elements-elementor-modal', ENVATO_ELEMENTS_URI . 'assets/css/elementor-modal.min.css', [], ENVATO_ELEMENTS_VER );
|
50 |
+
Plugin::get_instance()->admin_page_assets();
|
51 |
+
}
|
52 |
}
|
53 |
|
54 |
|
readme.txt
CHANGED
@@ -2,9 +2,9 @@
|
|
2 |
Contributors: envato
|
3 |
Tags: elementor, beaver builder, elements, templates
|
4 |
Requires at least: 4.6
|
5 |
-
Tested up to: 5.0.
|
6 |
Requires PHP: 5.6
|
7 |
-
Stable tag: 0.1.
|
8 |
License: GPLv3
|
9 |
License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
@@ -88,8 +88,11 @@ If you have any questions or feedback for the team, please send an email to exte
|
|
88 |
|
89 |
== Changelog ==
|
90 |
|
|
|
|
|
|
|
91 |
= 0.1.4 - 2018-12-12 =
|
92 |
-
* Feature: Envato Button
|
93 |
|
94 |
= 0.1.3 - 2018-12-12 =
|
95 |
* Fix: Settings menu link fix
|
@@ -126,4 +129,4 @@ If you have any questions or feedback for the team, please send an email to exte
|
|
126 |
* Added a 'Photos and More' page
|
127 |
|
128 |
= 0.0.6 - 2018-07-31 =
|
129 |
-
* Initial release.
|
2 |
Contributors: envato
|
3 |
Tags: elementor, beaver builder, elements, templates
|
4 |
Requires at least: 4.6
|
5 |
+
Tested up to: 5.0.2
|
6 |
Requires PHP: 5.6
|
7 |
+
Stable tag: 0.1.5
|
8 |
License: GPLv3
|
9 |
License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
88 |
|
89 |
== Changelog ==
|
90 |
|
91 |
+
= 0.1.5 - 2018-12-31 =
|
92 |
+
* Fixes: Layout improvements
|
93 |
+
|
94 |
= 0.1.4 - 2018-12-12 =
|
95 |
+
* Feature: Envato Button
|
96 |
|
97 |
= 0.1.3 - 2018-12-12 =
|
98 |
* Fix: Settings menu link fix
|
129 |
* Added a 'Photos and More' page
|
130 |
|
131 |
= 0.0.6 - 2018-07-31 =
|
132 |
+
* Initial release.
|
src/js/app/index.js
CHANGED
@@ -56,7 +56,7 @@ class Admin {
|
|
56 |
const modalContent = template.getDom( 'tmpl-envato-elements__magic', {} );
|
57 |
$contentHolder.append( modalContent );
|
58 |
scroller.setScrollHolder( $scrollHolder );
|
59 |
-
importer.setMode('insert');
|
60 |
this.items.push( modal );
|
61 |
this.items.push( header );
|
62 |
this.items.push( template );
|
@@ -213,8 +213,11 @@ class Admin {
|
|
213 |
// console.log(`action ${action} `);
|
214 |
// console.log(navVars);
|
215 |
if ( 'PUSH' !== action ) {
|
216 |
-
|
217 |
-
|
|
|
|
|
|
|
218 |
for ( var item of this.items ) {
|
219 |
item.navigationChange && item.navigationChange( this, navVars, action );
|
220 |
}
|
56 |
const modalContent = template.getDom( 'tmpl-envato-elements__magic', {} );
|
57 |
$contentHolder.append( modalContent );
|
58 |
scroller.setScrollHolder( $scrollHolder );
|
59 |
+
importer.setMode( 'insert' );
|
60 |
this.items.push( modal );
|
61 |
this.items.push( header );
|
62 |
this.items.push( template );
|
213 |
// console.log(`action ${action} `);
|
214 |
// console.log(navVars);
|
215 |
if ( 'PUSH' !== action ) {
|
216 |
+
let $select2elements = $( '.js-envato-elements__select2' );
|
217 |
+
if ( $select2elements.length > 0 ) {
|
218 |
+
select2( true, $ );
|
219 |
+
$select2elements.select2( 'close' );
|
220 |
+
}
|
221 |
for ( var item of this.items ) {
|
222 |
item.navigationChange && item.navigationChange( this, navVars, action );
|
223 |
}
|
src/scss/admin/_global.scss
CHANGED
@@ -18,6 +18,7 @@
|
|
18 |
justify-content: center;
|
19 |
flex-direction: column;
|
20 |
padding: 0 30px 0 20px;
|
|
|
21 |
img {
|
22 |
height: 22px;
|
23 |
}
|
18 |
justify-content: center;
|
19 |
flex-direction: column;
|
20 |
padding: 0 30px 0 20px;
|
21 |
+
min-height: 55px;
|
22 |
img {
|
23 |
height: 22px;
|
24 |
}
|