if(!function(n){var t=navigator.userAgent;n.HTMLPictureElement&&/ecko/.test(t)&&t.match(/rv\:(\d+)/)&&RegExp.$1<45&&addEventListener("resize",function(){var r,u=document.createElement("source"),e=function(n){var i,r,t=n.parentNode;"PICTURE"===t.nodeName.toUpperCase()?(i=u.cloneNode(),t.insertBefore(i,t.firstElementChild),setTimeout(function(){t.removeChild(i)})):(!n._pfLastSize||n.offsetWidth>n._pfLastSize)&&(n._pfLastSize=n.offsetWidth,r=n.sizes,n.sizes+=",100vw",setTimeout(function(){n.sizes=r}))},o=function(){for(var t=document.querySelectorAll("picture > img, img[srcset][sizes]"),n=0;n<t.length;n++)e(t[n])},t=function(){clearTimeout(r);r=setTimeout(o,99)},i=n.matchMedia&&matchMedia("(orientation: landscape)"),f=function(){t();i&&i.addListener&&i.addListener(t)};return u.srcset="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",/^[c|i]|d$/.test(document.readyState||"")?f():document.addEventListener("DOMContentLoaded",f),t}())}(window),function(n,t,i){"use strict";function v(n){return" "===n||"\t"===n||"\n"===n||"\f"===n||"\r"===n}function wt(t,i){var r=new n.Image;return r.onerror=function(){o[t]=!1;f()},r.onload=function(){o[t]=1===r.width;f()},r.src=i,"pending"}function bt(){w=!1;a=n.devicePixelRatio;h={};b={};r.DPR=a||1;u.width=Math.max(n.innerWidth||0,e.clientWidth);u.height=Math.max(n.innerHeight||0,e.clientHeight);u.vw=u.width/100;u.vh=u.height/100;y=[u.height,u.width,a].join("-");u.em=r.getEmValue();u.rem=u.em}function kt(n,t,i,r){var f,o,e,u;return"saveData"===p.algorithm?n>2.7?u=i+1:(o=t-i,f=Math.pow(n-.6,1.5),e=o*f,r&&(e+=.1*f),u=n+e):u=i>1?Math.sqrt(n*t):n,u>i}function dt(n){var i,t=r.getSet(n),u=!1;"pending"!==t&&(u=y,t&&(i=r.setRes(t),r.applySetCandidate(i,n)));n[r.ns].evaled=u}function gt(n,t){return n.res-t.res}function ni(n,t,i){var u;return!i&&t&&(i=n[r.ns].sets,i=i&&i[i.length-1]),u=et(t,i),u&&(t=r.makeUrl(t),n[r.ns].curSrc=t,n[r.ns].curCan=u,u.res||ft(u,u.set.sizes)),u}function et(n,t){var i,f,u;if(n&&t)for(u=r.parseSet(t),n=r.makeUrl(n),i=0;i<u.length;i++)if(n===r.makeUrl(u[i].url)){f=u[i];break}return f}function ti(n,t){for(var i,f,o=n.getElementsByTagName("source"),u=0,e=o.length;e>u;u++)i=o[u],i[r.ns]=!0,f=i.getAttribute("srcset"),f&&t.push({srcset:f,media:i.getAttribute("media"),type:i.getAttribute("type"),sizes:i.getAttribute("sizes")})}function ii(n,t){function h(t){var i,r=t.exec(n.substring(e));if(r)return(i=r[0],e+=i.length,i)}function o(){for(var u,r,e,h,v,o,l,y,n=!1,i={},a=0;a<f.length;a++)h=f[a],v=h[h.length-1],o=h.substring(0,h.length-1),l=parseInt(o,10),y=parseFloat(o),vt.test(o)&&"w"===v?((u||r)&&(n=!0),0===l?n=!0:u=l):vi.test(o)&&"x"===v?((u||r||e)&&(n=!0),0>y?n=!0:r=y):vt.test(o)&&"h"===v?((e||r)&&(n=!0),0===l?n=!0:e=l):n=!0;n||(i.url=s,u&&(i.w=u),r&&(i.d=r),e&&(i.h=e),e||r||u||(i.d=1),1===i.d&&(t.has1x=!0),i.set=t,c.push(i))}function l(){for(h(hi),i="",u="in descriptor";;){if(r=n.charAt(e),"in descriptor"===u)if(v(r))i&&(f.push(i),i="",u="after descriptor");else{if(","===r)return e+=1,i&&f.push(i),void o();if("("===r)i+=r,u="in parens";else{if(""===r)return i&&f.push(i),void o();i+=r}}else if("in parens"===u)if(")"===r)i+=r,u="in descriptor";else{if(""===r)return f.push(i),void o();i+=r}else if("after descriptor"===u&&!v(r)){if(""===r)return void o();u="in descriptor";e-=1}e+=1}}for(var s,f,i,u,r,a=n.length,e=0,c=[];;){if(h(ci),e>=a)return c;s=h(li);f=[];","===s.slice(-1)?(s=s.replace(ai,""),o()):l()}}function ri(n){function s(n){function u(){r&&(f.push(r),r="")}function s(){f[0]&&(h.push(f),f=[])}for(var i,r="",f=[],h=[],e=0,t=0,o=!1;;){if(i=n.charAt(t),""===i)return u(),s(),h;if(o){if("*"===i&&"/"===n[t+1]){o=!1;t+=2;u();continue}t+=1}else{if(v(i)){if(n.charAt(t-1)&&v(n.charAt(t-1))||!r){t+=1;continue}if(0===e){u();t+=1;continue}i=" "}else if("("===i)e+=1;else if(")"===i)e-=1;else{if(","===i){u();s();t+=1;continue}if("/"===i&&"*"===n.charAt(t+1)){o=!0;t+=2;continue}}r+=i;t+=1}}}function h(n){return c.test(n)&&parseFloat(n)>=0?!0:l.test(n)?!0:"0"===n||"-0"===n||"+0"===n?!0:!1}var i,u,e,t,f,o,c=/^(?:[+-]?[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?(?:ch|cm|em|ex|in|mm|pc|pt|px|rem|vh|vmin|vmax|vw)$/i,l=/^calc\((?:[0-9a-z \.\+\-\*\/\(\)]+)\)$/i;for(u=s(n),e=u.length,i=0;e>i;i++)if((t=u[i],f=t[t.length-1],h(f))&&((o=f,t.pop(),0===t.length)||(t=t.join(" "),r.matchesMedia(t))))return o;return"100vw"}t.createElement("picture");var ui,c,ot,y,r={},k=!1,l=function(){},s=t.createElement("img"),d=s.getAttribute,st=s.setAttribute,ht=s.removeAttribute,e=t.documentElement,o={},p={algorithm:""},g="data-pfsrc",ct=g+"set",nt=navigator.userAgent,fi=/rident/.test(nt)||/ecko/.test(nt)&&nt.match(/rv\:(\d+)/)&&RegExp.$1>35,tt="currentSrc",ei=/\s+\+?\d+(e\d+)?w/,oi=/(\([^)]+\))?\s*(.+)/,it=n.picturefillCFG,si="position:absolute;left:0;visibility:hidden;display:block;padding:0;border:none;font-size:1em;width:1em;overflow:hidden;clip:rect(0px, 0px, 0px, 0px)",lt="font-size:100%!important;",w=!0,h={},b={},a=n.devicePixelRatio,u={px:1,"in":96},at=t.createElement("a"),rt=!1,hi=/^[ \t\n\r\u000c]+/,ci=/^[, \t\n\r\u000c]+/,li=/^[^ \t\n\r\u000c]+/,ai=/[,]+$/,vt=/^\d+$/,vi=/^-?(?:[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?$/,yt=function(n,t,i,r){n.addEventListener?n.addEventListener(t,i,r||!1):n.attachEvent&&n.attachEvent("on"+t,i)},ut=function(n){var t={};return function(i){return i in t||(t[i]=n(i)),t[i]}},pt=function(){var n=/^([\d\.]+)(em|vw|px)$/,t=function(){for(var n=arguments,t=0,i=n[0];++t in n;)i=i.replace(n[t],n[++t]);return i},i=ut(function(n){return"return "+t((n||"").toLowerCase(),/\band\b/g,"&&",/,/g,"||",/min-([a-z-\s]+):/g,"e.$1>=",/max-([a-z-\s]+):/g,"e.$1<=",/calc([^)]+)/g,"($1)",/(\d+[\.]*[\d]*)([a-z]+)/g,"($1 * e.$2)",/^(?!(e.[a-z]|[0-9\.&=|><\+\-\*\(\)\/])).*/gi,"")+";"});return function(t,r){var f;if(!(t in h))if(h[t]=!1,r&&(f=t.match(n)))h[t]=f[1]*u[f[2]];else try{h[t]=new Function("e",i(t))(u)}catch(e){}return h[t]}}(),ft=function(n,t){return n.w?(n.cWidth=r.calcListLength(t||"100vw"),n.res=n.w/n.cWidth):n.res=n.d,n},f=function(n){if(k){var f,u,e,i=n||{};if(i.elements&&1===i.elements.nodeType&&("IMG"===i.elements.nodeName.toUpperCase()?i.elements=[i.elements]:(i.context=i.elements,i.elements=null)),f=i.elements||r.qsa(i.context||t,i.reevaluate||i.reselect?r.sel:r.selShort),e=f.length){for(r.setupRun(i),rt=!0,u=0;e>u;u++)r.fillImg(f[u],i);r.teardownRun(i)}}};for(ui=n.console&&console.warn?function(n){console.warn(n)}:l,(tt in s)||(tt="src"),o["image/jpeg"]=!0,o["image/gif"]=!0,o["image/png"]=!0,o["image/svg+xml"]=t.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#Image","1.1"),r.ns=("pf"+(new Date).getTime()).substr(0,9),r.supSrcset=("srcset"in s),r.supSizes=("sizes"in s),r.supPicture=!!n.HTMLPictureElement,r.supSrcset&&r.supPicture&&!r.supSizes&&!function(n){s.srcset="data:,a";n.src="data:,a";r.supSrcset=s.complete===n.complete;r.supPicture=r.supSrcset&&r.supPicture}(t.createElement("img")),r.supSrcset&&!r.supSizes?!function(){var i="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",n=t.createElement("img"),u=function(){var t=n.width;2===t&&(r.supSizes=!0);ot=r.supSrcset&&!r.supSizes;k=!0;setTimeout(f)};n.onload=u;n.onerror=u;n.setAttribute("sizes","9px");n.srcset=i+" 1w,data:image/gif;base64,R0lGODlhAgABAPAAAP///wAAACH5BAAAAAAALAAAAAACAAEAAAICBAoAOw== 9w";n.src=i}():k=!0,r.selShort="picture>img,img[srcset]",r.sel=r.selShort,r.cfg=p,r.DPR=a||1,r.u=u,r.types=o,r.setSize=l,r.makeUrl=ut(function(n){return at.href=n,at.href}),r.qsa=function(n,t){return"querySelector"in n?n.querySelectorAll(t):[]},r.matchesMedia=function(){return r.matchesMedia=n.matchMedia&&(matchMedia("(min-width: 0.1em)")||{}).matches?function(n){return!n||matchMedia(n).matches}:r.mMQ,r.matchesMedia.apply(this,arguments)},r.mMQ=function(n){return n?pt(n):!0},r.calcLength=function(n){var t=pt(n,!0)||!1;return 0>t&&(t=!1),t},r.supportsType=function(n){return n?o[n]:!0},r.parseSize=ut(function(n){var t=(n||"").match(oi);return{media:t&&t[1],length:t&&t[2]}}),r.parseSet=function(n){return n.cands||(n.cands=ii(n.srcset,n)),n.cands},r.getEmValue=function(){var n;if(!c&&(n=t.body)){var i=t.createElement("div"),r=e.style.cssText,u=n.style.cssText;i.style.cssText=si;e.style.cssText=lt;n.style.cssText=lt;n.appendChild(i);c=i.offsetWidth;n.removeChild(i);c=parseFloat(c,10);e.style.cssText=r;n.style.cssText=u}return c||16},r.calcListLength=function(n){if(!(n in b)||p.uT){var t=r.calcLength(ri(n));b[n]=t?t:u.width}return b[n]},r.setRes=function(n){var t,i,u;if(n)for(t=r.parseSet(n),i=0,u=t.length;u>i;i++)ft(t[i],n.sizes);return t},r.setRes.res=ft,r.applySetCandidate=function(n,t){if(n.length){var f,e,o,l,i,s,u,a,v,h=t[r.ns],c=r.DPR;if(s=h.curSrc||t[tt],u=h.curCan||ni(t,s,n[0].set),u&&u.set===n[0].set&&(v=fi&&!t.complete&&u.res-.1>c,v||(u.cached=!0,u.res>=c&&(i=u))),!i)for(n.sort(gt),l=n.length,i=n[l-1],e=0;l>e;e++)if(f=n[e],f.res>=c){o=e-1;i=n[o]&&(v||s!==r.makeUrl(f.url))&&kt(n[o].res,f.res,c,n[o].cached)?n[o]:f;break}i&&(a=r.makeUrl(i.url),h.curSrc=a,h.curCan=i,a!==s&&r.setSrc(t,i),r.setSize(t))}},r.setSrc=function(n,t){var i;n.src=t.url;"image/svg+xml"===t.set.type&&(i=n.style.width,n.style.width=n.offsetWidth+1+"px",n.offsetWidth+1&&(n.style.width=i))},r.getSet=function(n){for(var t,u,f=!1,e=n[r.ns].sets,i=0;i<e.length&&!f;i++)if(t=e[i],t.srcset&&r.matchesMedia(t.media)&&(u=r.supportsType(t.type))){"pending"===u&&(t=u);f=t;break}return f},r.parseSets=function(n,t,u){var o,e,s,h,c=t&&"PICTURE"===t.nodeName.toUpperCase(),f=n[r.ns];(f.src===i||u.src)&&(f.src=d.call(n,"src"),f.src?st.call(n,g,f.src):ht.call(n,g));(f.srcset===i||u.srcset||!r.supSrcset||n.srcset)&&(o=d.call(n,"srcset"),f.srcset=o,h=!0);f.sets=[];c&&(f.pic=!0,ti(t,f.sets));f.srcset?(e={srcset:f.srcset,sizes:d.call(n,"sizes")},f.sets.push(e),s=(ot||f.src)&&ei.test(f.srcset||""),s||!f.src||et(f.src,e)||e.has1x||(e.srcset+=", "+f.src,e.cands.push({url:f.src,d:1,set:e}))):f.src&&f.sets.push({srcset:f.src,sizes:null});f.curCan=null;f.curSrc=i;f.supported=!(c||e&&!r.supSrcset||s&&!r.supSizes);h&&r.supSrcset&&!f.supported&&(o?(st.call(n,ct,o),n.srcset=""):ht.call(n,ct));f.supported&&!f.srcset&&(!f.src&&n.src||n.src!==r.makeUrl(f.src))&&(null===f.src?n.removeAttribute("src"):n.src=f.src);f.parsed=!0},r.fillImg=function(n,t){var i,u=t.reselect||t.reevaluate;n[r.ns]||(n[r.ns]={});i=n[r.ns];(u||i.evaled!==y)&&((!i.parsed||t.reevaluate)&&r.parseSets(n,n.parentNode,t),i.supported?i.evaled=y:dt(n))},r.setupRun=function(){(!rt||w||a!==n.devicePixelRatio)&&bt()},r.supPicture?(f=l,r.fillImg=l):!function(){var i,h=n.attachEvent?/d$|^c/:/d$|^c|^i/,f=function(){var n=t.readyState||"";o=setTimeout(f,"loading"===n?200:999);t.body&&(r.fillImgs(),i=i||h.test(n),i&&clearTimeout(o))},o=setTimeout(f,t.body?9:99),c=function(n,t){var i,r,u=function(){var f=new Date-r;t>f?i=setTimeout(u,t-f):(i=null,n())};return function(){r=new Date;i||(i=setTimeout(u,t))}},s=e.clientHeight,l=function(){w=Math.max(n.innerWidth||0,e.clientWidth)!==u.width||e.clientHeight!==s;s=e.clientHeight;w&&r.fillImgs()};yt(n,"resize",c(l,99));yt(t,"readystatechange",f)}(),r.picturefill=f,r.fillImgs=f,r.teardownRun=l,f._=r,n.picturefillCFG={pf:r,push:function(n){var t=n.shift();"function"==typeof r[t]?r[t].apply(r,n):(p[t]=n[0],rt&&r.fillImgs({reselect:!0}))}};it&&it.length;)n.picturefillCFG.push(it.shift());n.picturefill=f;"object"==typeof module&&"object"==typeof module.exports?module.exports=f:"function"==typeof define&&define.amd&&define("picturefill",function(){return f});r.supPicture||(o["image/webp"]=wt("image/webp","data:image/webp;base64,UklGRkoAAABXRUJQVlA4WAoAAAAQAAAAAAAAAAAAQUxQSAwAAAABBxAR/Q9ERP8DAABWUDggGAAAADABAJ0BKgEAAQADADQlpAADcAD++/1QAA=="))}(window,document),!function(n,t){"function"==typeof define&&define.amd?define([],function(){return n.svg4everybody=t()}):"object"==typeof module&&module.exports?module.exports=t():n.svg4everybody=t()}(this,function(){function n(n,t,i){var r,u,f;if(i){for(r=document.createDocumentFragment(),u=!t.hasAttribute("viewBox")&&i.getAttribute("viewBox"),u&&t.setAttribute("viewBox",u),f=i.cloneNode(!0);f.childNodes.length;)r.appendChild(f.firstChild);n.appendChild(r)}}function t(t){t.onreadystatechange=function(){if(4===t.readyState){var i=t._cachedDocument;i||(i=t._cachedDocument=document.implementation.createHTMLDocument(""),i.body.innerHTML=t.responseText,t._cachedTarget={});t._embeds.splice(0).map(function(r){var u=t._cachedTarget[r.id];u||(u=t._cachedTarget[r.id]=i.getElementById(r.id));n(r.parent,r.svg,u)})}};t.onreadystatechange()}function i(i){function o(){for(var v,i,a=0;a<f.length;){var c=f[a],y=c.parentNode,p=r(y);if(p){if(v=c.getAttribute("xlink:href")||c.getAttribute("href"),!v&&u.attributeName&&(v=c.getAttribute(u.attributeName)),e)if(!u.validate||u.validate(v,p,c)){y.removeChild(c);var b=v.split("#"),w=b.shift(),k=b.join("#");w.length?(i=s[w],i||(i=s[w]=new XMLHttpRequest,i.open("GET",w),i.send(),i._embeds=[]),i._embeds.push({parent:y,svg:p,id:k}),t(i)):n(y,p,document.getElementById(k))}else++a,++h}else++a}(!f.length||f.length-h>0)&&l(o,67)}var e,u=Object(i),c=window.top!==window.self;e="polyfill"in u?u.polyfill:/\bTrident\/[567]\b|\bMSIE (?:9|10)\.0\b/.test(navigator.userAgent)||(navigator.userAgent.match(/\bEdge\/12\.(\d+)\b/)||[])[1]<10547||(navigator.userAgent.match(/\bAppleWebKit\/(\d+)\b/)||[])[1]<537||/\bEdge\/.(\d+)\b/.test(navigator.userAgent)&&c;var s={},l=window.requestAnimationFrame||setTimeout,f=document.getElementsByTagName("use"),h=0;e&&o()}function r(n){for(var t=n;"svg"!==t.nodeName.toLowerCase()&&(t=t.parentNode););return t}return i}),!function(n,t){var i=t(n,n.document);n.lazySizes=i;"object"==typeof module&&module.exports&&(module.exports=i)}(window,function(n,t){"use strict";if(t.getElementsByClassName){var h,i,f=t.documentElement,e=n.Date,et=n.HTMLPictureElement,o="addEventListener",r="getAttribute",s=n[o],u=n.setTimeout,ot=n.requestAnimationFrame||u,y=n.requestIdleCallback,it=/^picture$/i,st=["load","error","lazyincluded","_lazyloaded"],p={},ht=Array.prototype.forEach,w=function(n,t){return p[t]||(p[t]=new RegExp("(\\s|^)"+t+"(\\s|$)")),p[t].test(n[r]("class")||"")&&p[t]},b=function(n,t){w(n,t)||n.setAttribute("class",(n[r]("class")||"").trim()+" "+t)},g=function(n,t){var i;(i=w(n,t))&&n.setAttribute("class",(n[r]("class")||"").replace(i," "))},c=function(n,t,i){var r=i?o:"removeEventListener";i&&c(n,t);st.forEach(function(i){n[r](i,t)})},l=function(n,i,r,u,f){var e=t.createEvent("CustomEvent");return r||(r={}),r.instance=h,e.initCustomEvent(i,!u,!f,r),n.dispatchEvent(e),e},nt=function(t,r){var u;!et&&(u=n.picturefill||i.pf)?u({reevaluate:!0,elements:[t]}):r&&r.src&&(t.src=r.src)},a=function(n,t){return(getComputedStyle(n,null)||{})[t]},rt=function(n,t,r){for(r=r||n.offsetWidth;r<i.minSize&&t&&!n._lazysizesWidth;)r=t.offsetWidth,t=t.parentNode;return r},v=function(){var n,i,r=[],s=[],f=r,e=function(){var t=f;for(f=r.length?s:r,n=!0,i=!1;t.length;)t.shift()();n=!1},o=function(r,o){n&&!o?r.apply(this,arguments):(f.push(r),i||(i=!0,(t.hidden?u:ot)(e)))};return o._lsFlush=e,o}(),k=function(n,t){return t?function(){v(n)}:function(){var t=this,i=arguments;v(function(){n.apply(t,i)})}},ct=function(n){var i,f=0,h=125,r=666,t=r,o=function(){i=!1;f=e.now();n()},s=y?function(){y(o,{timeout:t});t!==r&&(t=r)}:k(function(){u(o)},!0);return function(n){var r;(n=n===!0)&&(t=44);i||(i=!0,r=h-(e.now()-f),0>r&&(r=0),n||9>r&&y?s():u(s,r))}},ut=function(n){var t,r,i=99,f=function(){t=null;n()},o=function(){var n=e.now()-r;i>n?u(o,i-n):(y||f)(f)};return function(){r=e.now();t||(t=u(o,i))}},ft=function(){var at,rt,gt,ft,ni,ti,ii,et,ot,st,lt,kt,vt,dt,ei=/^img$/i,oi=/^iframe$/i,si="onscroll"in n&&!/glebot/.test(navigator.userAgent),hi=0,yt=0,p=0,d=-1,pt=function(n){p--;n&&n.target&&c(n.target,pt);(!n||0>p||!n.target)&&(p=0)},ci=function(n,i){var u,r=n,e="hidden"==a(t.body,"visibility")||"hidden"!=a(n,"visibility");for(et-=i,lt+=i,ot-=i,st+=i;e&&(r=r.offsetParent)&&r!=t.body&&r!=f;)e=(a(r,"opacity")||1)>0,e&&"visible"!=a(r,"overflow")&&(u=r.getBoundingClientRect(),e=st>u.left&&ot<u.right&&lt>u.top-1&&et<u.bottom+1);return e},ri=function(){var y,n,o,s,l,e,v,c,w,u=h.elements;if((ft=i.loadMode)&&8>p&&(y=u.length)){for(n=0,d++,null==vt&&(("expand"in i)||(i.expand=f.clientHeight>500&&f.clientWidth>500?500:370),kt=i.expand,vt=kt*i.expFactor),vt>yt&&1>p&&d>2&&ft>2&&!t.hidden?(yt=vt,d=0):yt=ft>1&&d>1&&6>p?kt:hi;y>n;n++)if(u[n]&&!u[n]._lazyRace)if(si)if((c=u[n][r]("data-expand"))&&(e=1*c)||(e=yt),w!==e&&(ti=innerWidth+e*dt,ii=innerHeight+e,v=-1*e,w=e),o=u[n].getBoundingClientRect(),(lt=o.bottom)>=v&&(et=o.top)<=ii&&(st=o.right)>=v*dt&&(ot=o.left)<=ti&&(lt||st||ot||et)&&(i.loadHidden||"hidden"!=a(u[n],"visibility"))&&(rt&&3>p&&!c&&(3>ft||4>d)||ci(u[n],e))){if(wt(u[n]),l=!0,p>9)break}else!l&&rt&&!s&&4>p&&4>d&&ft>2&&(at[0]||i.preloadAfterLoad)&&(at[0]||!c&&(lt||st||ot||et||"auto"!=u[n][r](i.sizesAttr)))&&(s=at[0]||u[n]);else wt(u[n]);s&&!l&&wt(s)}},y=ct(ri),ui=function(n){b(n.target,i.loadedClass);g(n.target,i.loadingClass);c(n.target,fi);l(n.target,"lazyloaded")},li=k(ui),fi=function(n){li({target:n.target})},ai=function(n,t){try{n.contentWindow.location.replace(t)}catch(i){n.src=t}},vi=function(n){var t,u=n[r](i.srcsetAttr);(t=i.customMedia[n[r]("data-media")||n[r]("media")])&&n.setAttribute("media",t);u&&n.setAttribute("srcset",u)},yi=k(function(n,t,f,e,o){var s,h,y,a,w,k;(w=l(n,"lazybeforeunveil",t)).defaultPrevented||(e&&(f?b(n,i.autosizesClass):n.setAttribute("sizes",e)),h=n[r](i.srcsetAttr),s=n[r](i.srcAttr),o&&(y=n.parentNode,a=y&&it.test(y.nodeName||"")),k=t.firesLoad||"src"in n&&(h||s||a),w={target:n},k&&(c(n,pt,!0),clearTimeout(gt),gt=u(pt,2500),b(n,i.loadingClass),c(n,fi,!0)),a&&ht.call(y.getElementsByTagName("source"),vi),h?n.setAttribute("srcset",h):s&&!a&&(oi.test(n.nodeName)?ai(n,s):n.src=s),o&&(h||a)&&nt(n,{src:s}));n._lazyRace&&delete n._lazyRace;g(n,i.lazyClass);v(function(){(!k||n.complete&&n.naturalWidth>1)&&(k?pt(w):p--,ui(w))},!0)}),wt=function(n){var f,t=ei.test(n.nodeName),e=t&&(n[r](i.sizesAttr)||n[r]("sizes")),u="auto"==e;(u||!rt)&&t&&(n[r]("src")||n.srcset)&&!n.complete&&!w(n,i.errorClass)||(f=l(n,"lazyunveilread").detail,u&&tt.updateElem(n,!0,n.offsetWidth),n._lazyRace=!0,p++,yi(n,f,u,e,t))},bt=function(){if(!rt){if(e.now()-ni<999)return void u(bt,999);var n=ut(function(){i.loadMode=3;y()});rt=!0;i.loadMode=3;y();s("scroll",function(){3==i.loadMode&&(i.loadMode=2);n()},!0)}};return{_:function(){ni=e.now();h.elements=t.getElementsByClassName(i.lazyClass);at=t.getElementsByClassName(i.lazyClass+" "+i.preloadClass);dt=i.hFac;s("scroll",y,!0);s("resize",y,!0);n.MutationObserver?new MutationObserver(y).observe(f,{childList:!0,subtree:!0,attributes:!0}):(f[o]("DOMNodeInserted",y,!0),f[o]("DOMAttrModified",y,!0),setInterval(y,999));s("hashchange",y,!0);["focus","mouseover","click","load","transitionend","animationend","webkitAnimationEnd"].forEach(function(n){t[o](n,y,!0)});/d$|^c/.test(t.readyState)?bt():(s("load",bt),t[o]("DOMContentLoaded",y),u(bt,2e4));h.elements.length?(ri(),v._lsFlush()):y()},checkElems:y,unveil:wt}}(),tt=function(){var n,f=k(function(n,t,i,r){var f,u,e;if(n._lazysizesWidth=r,r+="px",n.setAttribute("sizes",r),it.test(t.nodeName||""))for(f=t.getElementsByTagName("source"),u=0,e=f.length;e>u;u++)f[u].setAttribute("sizes",r);i.detail.dataAttr||nt(n,i.detail)}),r=function(n,t,i){var r,u=n.parentNode;u&&(i=rt(n,u,i),r=l(n,"lazybeforesizes",{width:i,dataAttr:!!t}),r.defaultPrevented||(i=r.detail.width,i&&i!==n._lazysizesWidth&&f(n,u,r,i)))},e=function(){var t,i=n.length;if(i)for(t=0;i>t;t++)r(n[t])},u=ut(e);return{_:function(){n=t.getElementsByClassName(i.autosizesClass);s("resize",u)},checkElems:u,updateElem:r}}(),d=function(){d.i||(d.i=!0,tt._(),ft._())};return function(){var t,r={lazyClass:"lazyload",loadedClass:"lazyloaded",loadingClass:"lazyloading",preloadClass:"lazypreload",errorClass:"lazyerror",autosizesClass:"lazyautosizes",srcAttr:"data-src",srcsetAttr:"data-srcset",sizesAttr:"data-sizes",minSize:40,customMedia:{},init:!0,expFactor:1.5,hFac:.8,loadMode:2,loadHidden:!0};i=n.lazySizesConfig||n.lazysizesConfig||{};for(t in r)t in i||(i[t]=r[t]);n.lazySizesConfig=i;u(function(){i.init&&d()})}(),h={cfg:i,autoSizer:tt,loader:ft,init:d,uP:nt,aC:b,rC:g,hC:w,fire:l,gW:rt,rAF:v}}}),!function(n,t){function v(n,t,r){var e=n.children(),o=!1,u,s,f;for(n.empty(),u=0,s=e.length;s>u;u++){if(f=e.eq(u),n.append(f),r&&n.append(r),i(n,t)){f.remove();o=!0;break}r&&r.detach()}return o}function f(t,r,u,e,o){var s=!1,h="a, table, thead, tbody, tfoot, tr, col, colgroup, object, embed, param, ol, ul, dl, blockquote, select, optgroup, option, textarea, script, style",c="script, .dotdotdot-keep";return t.contents().detach().each(function(){var a=this,l=n(a);if("undefined"==typeof a)return!0;if(l.is(c))t.append(l);else{if(s)return!0;t.append(l);!o||l.is(e.after)||l.find(e.after).length||t[t.is(h)?"after":"append"](o);i(u,e)&&(s=3==a.nodeType?y(l,r,u,e,o):f(l,r,u,e,o));s||o&&o.detach()}}),r.addClass("is-truncated"),s}function y(t,f,o,h,c){var l=t[0],nt,k,d,tt;if(!l)return!1;var y=s(l),it=-1!==y.indexOf(" ")?" ":"　",p="letter"==h.wrap?"":it,a=y.split(p),g=-1,w=-1,b=0,v=a.length-1;for(h.fallbackToLetter&&0==b&&0==v&&(p="",a=y.split(p),v=a.length-1);v>=b&&(0!=b||0!=v);){if(nt=Math.floor((b+v)/2),nt==w)break;w=nt;u(l,a.slice(0,w+1).join(p)+h.ellipsis);o.children().each(function(){n(this).toggle().toggle()});i(o,h)?(v=w,h.fallbackToLetter&&0==b&&0==v&&(p="",a=a[0].split(p),g=-1,w=-1,b=0,v=a.length-1)):(g=w,b=w)}return-1==g||1==a.length&&0==a[0].length?(k=t.parent(),t.detach(),d=c&&c.closest(k).length?c.length:0,(k.contents().length>d?l=r(k.contents().eq(-1-d),f):(l=r(k,f,!0),d||k.detach()),l&&(y=e(s(l),h),u(l,y),d&&c))&&(tt=c.parent(),n(l).parent().append(c),n.trim(tt.html())||tt.remove())):(y=e(a.slice(0,g+1).join(p),h),u(l,y)),!0}function i(n,t){return n.innerHeight()>t.maxHeight}function e(t,i){for(;n.inArray(t.slice(-1),i.lastCharacter.remove)>-1;)t=t.slice(0,-1);return n.inArray(t.slice(-1),i.lastCharacter.noEllipsis)<0&&(t+=i.ellipsis),t}function o(n){return{width:n.innerWidth(),height:n.innerHeight()}}function u(n,t){n.innerText?n.innerText=t:n.nodeValue?n.nodeValue=t:n.textContent&&(n.textContent=t)}function s(n){return n.innerText?n.innerText:n.nodeValue?n.nodeValue:n.textContent?n.textContent:""}function h(n){do n=n.previousSibling;while(n&&1!==n.nodeType&&3!==n.nodeType);return n}function r(t,i,u){var f,e=t&&t[0];if(e){if(!u){if(3===e.nodeType)return e;if(n.trim(t.text()))return r(t.contents().last(),i)}for(f=h(e);!f;){if(t=t.parent(),t.is(i)||!t.length)return!1;f=h(t[0])}if(f)return r(n(f),i)}return!1}function p(t,i){return t?"string"==typeof t?(t=n(t,i),t.length?t:!1):t.jquery?t:!1:!1}function w(n){for(var t,r=n.innerHeight(),u=["paddingTop","paddingBottom"],i=0,f=u.length;f>i;i++)t=parseInt(n.css(u[i]),10),isNaN(t)&&(t=0),r-=t;return r}var c,l,a;n.fn.dotdotdot||(n.fn.dotdotdot=function(t){var r,h;if(0==this.length)return n.fn.dotdotdot.debug('No element found for "'+this.selector+'".'),this;if(this.length>1)return this.each(function(){n(this).dotdotdot(t)});r=this;h=r.contents();r.data("dotdotdot")&&r.trigger("destroy.dot");r.data("dotdotdot-style",r.attr("style")||"");r.css("word-wrap","break-word");"nowrap"===r.css("white-space")&&r.css("white-space","normal");r.bind_events=function(){return r.bind("update.dot",function(t,o){switch(r.removeClass("is-truncated"),t.preventDefault(),t.stopPropagation(),typeof u.height){case"number":u.maxHeight=u.height;break;case"function":u.maxHeight=u.height.call(r[0]);break;default:u.maxHeight=w(r)}u.maxHeight+=u.tolerance;"undefined"!=typeof o&&(("string"==typeof o||"nodeType"in o&&1===o.nodeType)&&(o=n("<div />").append(o).contents()),o instanceof n&&(h=o));s=r.wrapInner('<div class="dotdotdot" />').children();s.contents().detach().end().append(h.clone(!0)).find("br").replaceWith("  <br />  ").end().css({height:"auto",width:"auto",border:"none",padding:0,margin:0});var c=!1,l=!1;return e.afterElement&&(c=e.afterElement.clone(!0),c.show(),e.afterElement.detach()),i(s,u)&&(l="children"==u.wrap?v(s,u,c):f(s,r,s,u,c)),s.replaceWith(s.contents()),s=null,n.isFunction(u.callback)&&u.callback.call(r[0],l,h),e.isTruncated=l,l}).bind("isTruncated.dot",function(n,t){return n.preventDefault(),n.stopPropagation(),"function"==typeof t&&t.call(r[0],e.isTruncated),e.isTruncated}).bind("originalContent.dot",function(n,t){return n.preventDefault(),n.stopPropagation(),"function"==typeof t&&t.call(r[0],h),h}).bind("destroy.dot",function(n){n.preventDefault();n.stopPropagation();r.unwatch().unbind_events().contents().detach().end().append(h).attr("style",r.data("dotdotdot-style")||"").removeClass("is-truncated").data("dotdotdot",!1)}),r};r.unbind_events=function(){return r.unbind(".dot"),r};r.watch=function(){if(r.unwatch(),"window"==u.watch){var t=n(window),i=t.width(),f=t.height();t.bind("resize.dot"+e.dotId,function(){i==t.width()&&f==t.height()&&u.windowResizeFix||(i=t.width(),f=t.height(),l&&clearInterval(l),l=setTimeout(function(){r.trigger("update.dot")},100))})}else a=o(r),l=setInterval(function(){if(r.is(":visible")){var n=o(r);a.width==n.width&&a.height==n.height||(r.trigger("update.dot"),a=n)}},500);return r};r.unwatch=function(){return n(window).unbind("resize.dot"+e.dotId),l&&clearInterval(l),r};var u=n.extend(!0,{},n.fn.dotdotdot.defaults,t),e={},a={},l=null,s=null;return u.lastCharacter.remove instanceof Array||(u.lastCharacter.remove=n.fn.dotdotdot.defaultArrays.lastCharacter.remove),u.lastCharacter.noEllipsis instanceof Array||(u.lastCharacter.noEllipsis=n.fn.dotdotdot.defaultArrays.lastCharacter.noEllipsis),e.afterElement=p(u.after,r),e.isTruncated=!1,e.dotId=c++,r.data("dotdotdot",!0).bind_events().trigger("update.dot"),u.watch&&r.watch(),r},n.fn.dotdotdot.defaults={ellipsis:"... ",wrap:"word",fallbackToLetter:!0,lastCharacter:{},tolerance:0,callback:null,after:null,height:null,watch:!1,windowResizeFix:!0},n.fn.dotdotdot.defaultArrays={lastCharacter:{remove:[" ","　",",",";",".","!","?"],noEllipsis:[]}},n.fn.dotdotdot.debug=function(){},c=1,l=n.fn.html,n.fn.html=function(i){return i!=t&&!n.isFunction(i)&&this.data("dotdotdot")?this.trigger("update",[i]):l.apply(this,arguments)},a=n.fn.text,n.fn.text=function(i){return i!=t&&!n.isFunction(i)&&this.data("dotdotdot")?(i=n("<div />").text(i).html(),this.trigger("update",[i])):a.apply(this,arguments)})}(jQuery),jQuery(document).ready(function(n){n(".dot-ellipsis").each(function(){var r=n(this).hasClass("dot-resize-update"),u=n(this).hasClass("dot-timer-update"),i=0,f=n(this).attr("class").split(/\s+/),t;n.each(f,function(n,t){var r=t.match(/^dot-height-(\d+)$/);null!==r&&(i=Number(r[1]))});t={};u&&(t.watch=!0);r&&(t.watch="window");i>0&&(t.height=i);n(this).dotdotdot(t)})}),jQuery(window).on("load",function(){jQuery(".dot-ellipsis.dot-load-update").trigger("update.dot")}),!function(n,t){"function"==typeof define&&define.amd?define(["jquery"],function(n){return t(n)}):"object"==typeof module&&module.exports?module.exports=t(require("jquery")):t(n.jQuery)}(this,function(n){!function(n){"use strict";function f(t){return n.each([{re:/[\xC0-\xC6]/g,ch:"A"},{re:/[\xE0-\xE6]/g,ch:"a"},{re:/[\xC8-\xCB]/g,ch:"E"},{re:/[\xE8-\xEB]/g,ch:"e"},{re:/[\xCC-\xCF]/g,ch:"I"},{re:/[\xEC-\xEF]/g,ch:"i"},{re:/[\xD2-\xD6]/g,ch:"O"},{re:/[\xF2-\xF6]/g,ch:"o"},{re:/[\xD9-\xDC]/g,ch:"U"},{re:/[\xF9-\xFC]/g,ch:"u"},{re:/[\xC7-\xE7]/g,ch:"c"},{re:/[\xD1]/g,ch:"N"},{re:/[\xF1]/g,ch:"n"}],function(){t=t?t.replace(this.re,this.ch):""}),t}function e(i){var f=arguments,r=i,u,e;return[].shift.apply(f),e=this.each(function(){var o=n(this),i,e,s,h;if(o.is("select")){if(i=o.data("selectpicker"),e="object"==typeof r&&r,i){if(e)for(s in e)e.hasOwnProperty(s)&&(i.options[s]=e[s])}else h=n.extend({},t.DEFAULTS,n.fn.selectpicker.defaults||{},o.data(),e),h.template=n.extend({},t.DEFAULTS.template,n.fn.selectpicker.defaults?n.fn.selectpicker.defaults.template:{},o.data().template,e.template),o.data("selectpicker",i=new t(this,h));"string"==typeof r&&(u=i[r]instanceof Function?i[r].apply(i,f):i.options[r])}}),"undefined"!=typeof u?u:e}var i,r,s;String.prototype.includes||!function(){var i={}.toString,n=function(){try{var n={},t=Object.defineProperty,i=t(n,n,n)&&t}catch(n){}return i}(),r="".indexOf,t=function(n){var u,s;if(null==this)throw new TypeError;if(u=String(this),n&&"[object RegExp]"==i.call(n))throw new TypeError;var f=u.length,e=String(n),h=e.length,o=arguments.length>1?arguments[1]:void 0,t=o?Number(o):0;return t!=t&&(t=0),s=Math.min(Math.max(t,0),f),!(h+s>f)&&r.call(u,e,t)!=-1};n?n(String.prototype,"includes",{value:t,configurable:!0,writable:!0}):String.prototype.includes=t}();String.prototype.startsWith||!function(){var n=function(){try{var n={},t=Object.defineProperty,i=t(n,n,n)&&t}catch(n){}return i}(),i={}.toString,t=function(n){var u,f,r;if(null==this)throw new TypeError;if(u=String(this),n&&"[object RegExp]"==i.call(n))throw new TypeError;var e=u.length,o=String(n),s=o.length,h=arguments.length>1?arguments[1]:void 0,t=h?Number(h):0;if(t!=t&&(t=0),f=Math.min(Math.max(t,0),e),s+f>e)return!1;for(r=-1;++r<s;)if(u.charCodeAt(f+r)!=o.charCodeAt(r))return!1;return!0};n?n(String.prototype,"startsWith",{value:t,configurable:!0,writable:!0}):String.prototype.startsWith=t}();Object.keys||(Object.keys=function(n,t,i){i=[];for(t in n)i.hasOwnProperty.call(n,t)&&i.push(t);return i});i={useDefault:!1,_set:n.valHooks.select.set};n.valHooks.select.set=function(t,r){return r&&!i.useDefault&&n(t).data("selected",!0),i._set.apply(this,arguments)};r=null;n.fn.triggerNative=function(n){var t,i=this[0];i.dispatchEvent?("function"==typeof Event?t=new Event(n,{bubbles:!0}):(t=document.createEvent("Event"),t.initEvent(n,!0,!1)),i.dispatchEvent(t)):i.fireEvent?(t=document.createEventObject(),t.eventType=n,i.fireEvent("on"+n,t)):this.trigger(n)};n.expr.pseudos.icontains=function(t,i,r){var u=n(t),f=(u.data("tokens")||u.text()).toString().toUpperCase();return f.includes(r[3].toUpperCase())};n.expr.pseudos.ibegins=function(t,i,r){var u=n(t),f=(u.data("tokens")||u.text()).toString().toUpperCase();return f.startsWith(r[3].toUpperCase())};n.expr.pseudos.aicontains=function(t,i,r){var u=n(t),f=(u.data("tokens")||u.data("normalizedText")||u.text()).toString().toUpperCase();return f.includes(r[3].toUpperCase())};n.expr.pseudos.aibegins=function(t,i,r){var u=n(t),f=(u.data("tokens")||u.data("normalizedText")||u.text()).toString().toUpperCase();return f.startsWith(r[3].toUpperCase())};var o=function(n){var i=function(t){return n[t]},t="(?:"+Object.keys(n).join("|")+")",r=RegExp(t),u=RegExp(t,"g");return function(n){return n=null==n?"":""+n,r.test(n)?n.replace(u,i):n}},u=o({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"}),h=o({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#x27;":"'","&#x60;":"`"}),t=function(r,u){i.useDefault||(n.valHooks.select.set=i._set,i.useDefault=!0);this.$element=n(r);this.$newElement=null;this.$button=null;this.$menu=null;this.$lis=null;this.options=u;null===this.options.title&&(this.options.title=this.$element.attr("title"));var f=this.options.windowPadding;"number"==typeof f&&(this.options.windowPadding=[f,f,f,f]);this.val=t.prototype.val;this.render=t.prototype.render;this.refresh=t.prototype.refresh;this.setStyle=t.prototype.setStyle;this.selectAll=t.prototype.selectAll;this.deselectAll=t.prototype.deselectAll;this.destroy=t.prototype.destroy;this.remove=t.prototype.remove;this.show=t.prototype.show;this.hide=t.prototype.hide;this.init()};t.VERSION="1.12.1";t.DEFAULTS={noneSelectedText:"Nothing selected",noneResultsText:"No results matched {0}",countSelectedText:function(n){return 1==n?"{0} item selected":"{0} items selected"},maxOptionsText:function(n,t){return[1==n?"Limit reached ({n} item max)":"Limit reached ({n} items max)",1==t?"Group limit reached ({n} item max)":"Group limit reached ({n} items max)"]},selectAllText:"Select All",deselectAllText:"Deselect All",doneButton:!1,doneButtonText:"Close",multipleSeparator:", ",styleBase:"btn",style:"btn-default",size:"auto",title:null,selectedTextFormat:"values",width:!1,container:!1,hideDisabled:!1,showSubtext:!1,showIcon:!0,showContent:!0,dropupAuto:!0,header:!1,liveSearch:!1,liveSearchPlaceholder:null,liveSearchNormalize:!1,liveSearchStyle:"contains",actionsBox:!1,iconBase:"glyphicon",tickIcon:"glyphicon-ok",showTick:!1,template:{caret:'<span class="caret"><\/span>'},maxOptions:!1,mobile:!1,selectOnTab:!1,dropdownAlignRight:!1,windowPadding:0};t.prototype={constructor:t,init:function(){var t=this,i=this.$element.attr("id");this.$element.addClass("bs-select-hidden");this.liObj={};this.multiple=this.$element.prop("multiple");this.autofocus=this.$element.prop("autofocus");this.$newElement=this.createView();this.$element.after(this.$newElement).appendTo(this.$newElement);this.$button=this.$newElement.children("button");this.$menu=this.$newElement.children(".dropdown-menu");this.$menuInner=this.$menu.children(".inner");this.$searchbox=this.$menu.find("input");this.$element.removeClass("bs-select-hidden");this.options.dropdownAlignRight===!0&&this.$menu.addClass("dropdown-menu-right");"undefined"!=typeof i&&(this.$button.attr("data-id",i),n('label[for="'+i+'"]').click(function(n){n.preventDefault();t.$button.focus()}));this.checkDisabled();this.clickListener();this.options.liveSearch&&this.liveSearchListener();this.render();this.setStyle();this.setWidth();this.options.container&&this.selectPosition();this.$menu.data("this",this);this.$newElement.data("this",this);this.options.mobile&&this.mobile();this.$newElement.on({"hide.bs.dropdown":function(n){t.$menuInner.attr("aria-expanded",!1);t.$element.trigger("hide.bs.select",n)},"hidden.bs.dropdown":function(n){t.$element.trigger("hidden.bs.select",n)},"show.bs.dropdown":function(n){t.$menuInner.attr("aria-expanded",!0);t.$element.trigger("show.bs.select",n)},"shown.bs.dropdown":function(n){t.$element.trigger("shown.bs.select",n)}});t.$element[0].hasAttribute("required")&&this.$element.on("invalid",function(){t.$button.addClass("bs-invalid").focus();t.$element.on({"focus.bs.select":function(){t.$button.focus();t.$element.off("focus.bs.select")},"shown.bs.select":function(){t.$element.val(t.$element.val()).off("shown.bs.select")},"rendered.bs.select":function(){this.validity.valid&&t.$button.removeClass("bs-invalid");t.$element.off("rendered.bs.select")}})});setTimeout(function(){t.$element.trigger("loaded.bs.select")})},createDropdown:function(){var t=this.multiple||this.options.showTick?" show-tick":"",i=this.$element.parent().hasClass("input-group")?" input-group-btn":"",r=this.autofocus?" autofocus":"",f=this.options.header?'<div class="popover-title"><button type="button" class="close" aria-hidden="true">&times;<\/button>'+this.options.header+"<\/div>":"",e=this.options.liveSearch?'<div class="bs-searchbox"><input type="text" class="form-control" autocomplete="off"'+(null===this.options.liveSearchPlaceholder?"":' placeholder="'+u(this.options.liveSearchPlaceholder)+'"')+' role="textbox" aria-label="Search"><\/div>':"",o=this.multiple&&this.options.actionsBox?'<div class="bs-actionsbox"><div class="btn-group btn-group-sm btn-block"><button type="button" class="actions-btn bs-select-all btn btn-default">'+this.options.selectAllText+'<\/button><button type="button" class="actions-btn bs-deselect-all btn btn-default">'+this.options.deselectAllText+"<\/button><\/div><\/div>":"",s=this.multiple&&this.options.doneButton?'<div class="bs-donebutton"><div class="btn-group btn-block"><button type="button" class="btn btn-sm btn-default">'+this.options.doneButtonText+"<\/button><\/div><\/div>":"",h='<div class="btn-group bootstrap-select'+t+i+'"><button type="button" class="'+this.options.styleBase+' dropdown-toggle" data-toggle="dropdown"'+r+' role="button"><span class="filter-option pull-left"><\/span>&nbsp;<span class="bs-caret">'+this.options.template.caret+'<\/span><\/button><div class="dropdown-menu open" role="combobox">'+f+e+o+'<ul class="dropdown-menu inner" role="listbox" aria-expanded="false"><\/ul>'+s+"<\/div><\/div>";return n(h)},createView:function(){var n=this.createDropdown(),t=this.createLi();return n.find("ul")[0].innerHTML=t,n},reloadLi:function(){var n=this.createLi();this.$menuInner[0].innerHTML=n},createLi:function(){var t=this,i=[],o=0,s=document.createElement("option"),r=-1,e=function(n,t,i,r){return"<li"+("undefined"!=typeof i&""!==i?' class="'+i+'"':"")+("undefined"!=typeof t&null!==t?' data-original-index="'+t+'"':"")+("undefined"!=typeof r&null!==r?'data-optgroup="'+r+'"':"")+">"+n+"<\/li>"},c=function(i,r,e,o){return'<a tabindex="0"'+("undefined"!=typeof r?' class="'+r+'"':"")+(e?' style="'+e+'"':"")+(t.options.liveSearchNormalize?' data-normalized-text="'+f(u(n(i).html()))+'"':"")+("undefined"!=typeof o||null!==o?' data-tokens="'+o+'"':"")+' role="option">'+i+'<span class="'+t.options.iconBase+" "+t.options.tickIcon+' check-mark"><\/span><\/a>'},h,l;return!this.options.title||this.multiple||(r--,this.$element.find(".bs-title-option").length)||(h=this.$element[0],s.className="bs-title-option",s.innerHTML=this.options.title,s.value="",h.insertBefore(s,h.firstChild),l=n(h.options[h.selectedIndex]),void 0===l.attr("selected")&&void 0===this.$element.data("selected")&&(s.selected=!0)),this.$element.find("option").each(function(f){var s=n(this),tt,it,p,w,l,ut,b,ft;if(r++,!s.hasClass("bs-title-option")){var k=this.className||"",d=this.style.cssText,a=s.data("content")?s.data("content"):s.html(),g=s.data("tokens")?s.data("tokens"):null,ot="undefined"!=typeof s.data("subtext")?'<small class="text-muted">'+s.data("subtext")+"<\/small>":"",v="undefined"!=typeof s.data("icon")?'<span class="'+t.options.iconBase+" "+s.data("icon")+'"><\/span> ':"",h=s.parent(),nt="OPTGROUP"===h[0].tagName,et=nt&&h[0].disabled,y=this.disabled||et;if(""!==v&&y&&(v="<span>"+v+"<\/span>"),t.options.hideDisabled&&(y&&!nt||et))return void r--;if(s.data("content")||(a=v+'<span class="text">'+a+ot+"<\/span>"),nt&&s.data("divider")!==!0){if(t.options.hideDisabled&&y&&(void 0===h.data("allOptionsDisabled")&&(tt=h.children(),h.data("allOptionsDisabled",tt.filter(":disabled").length===tt.length)),h.data("allOptionsDisabled")))return void r--;if(it=" "+h[0].className||"",0===s.index()){o+=1;var rt=h[0].label,st="undefined"!=typeof h.data("subtext")?'<small class="text-muted">'+h.data("subtext")+"<\/small>":"",ht=h.data("icon")?'<span class="'+t.options.iconBase+" "+h.data("icon")+'"><\/span> ':"";rt=ht+'<span class="text">'+u(rt)+st+"<\/span>";0!==f&&i.length>0&&(r++,i.push(e("",null,"divider",o+"div")));r++;i.push(e(rt,null,"dropdown-header"+it,o))}if(t.options.hideDisabled&&y)return void r--;i.push(e(c(a,"opt "+k+it,d,g),f,"",o))}else if(s.data("divider")===!0)i.push(e("",f,"divider"));else if(s.data("hidden")===!0)i.push(e(c(a,k,d,g),f,"hidden is-hidden"));else{if(p=this.previousElementSibling&&"OPTGROUP"===this.previousElementSibling.tagName,!p&&t.options.hideDisabled)for(w=n(this).prevAll(),l=0;l<w.length;l++)if("OPTGROUP"===w[l].tagName){for(ut=0,b=0;b<l;b++)ft=w[b],(ft.disabled||n(ft).data("hidden")===!0)&&ut++;ut===l&&(p=!0);break}p&&(r++,i.push(e("",null,"divider",o+"div")));i.push(e(c(a,k,d,g),f))}t.liObj[f]=r}}),this.multiple||0!==this.$element.find("option:selected").length||this.options.title||this.$element.find("option").eq(0).prop("selected",!0).attr("selected","selected"),i.join("")},findLis:function(){return null==this.$lis&&(this.$lis=this.$menu.find("li")),this.$lis},render:function(t){var o,i=this,r,u,f,e,s;t!==!1&&this.$element.find("option").each(function(n){var t=i.findLis().eq(i.liObj[n]);i.setDisabled(n,this.disabled||"OPTGROUP"===this.parentNode.tagName&&this.parentNode.disabled,t);i.setSelected(n,this.selected,t)});this.togglePlaceholder();this.tabIndex();r=this.$element.find("option").map(function(){if(this.selected){if(i.options.hideDisabled&&(this.disabled||"OPTGROUP"===this.parentNode.tagName&&this.parentNode.disabled))return;var r,t=n(this),u=t.data("icon")&&i.options.showIcon?'<i class="'+i.options.iconBase+" "+t.data("icon")+'"><\/i> ':"";return r=i.options.showSubtext&&t.data("subtext")&&!i.multiple?' <small class="text-muted">'+t.data("subtext")+"<\/small>":"","undefined"!=typeof t.attr("title")?t.attr("title"):t.data("content")&&i.options.showContent?t.data("content").toString():u+t.html()+r}}).toArray();u=this.multiple?r.join(this.options.multipleSeparator):r[0];this.multiple&&this.options.selectedTextFormat.indexOf("count")>-1&&(f=this.options.selectedTextFormat.split(">"),(f.length>1&&r.length>f[1]||1==f.length&&r.length>=2)&&(o=this.options.hideDisabled?", [disabled]":"",e=this.$element.find("option").not('[data-divider="true"], [data-hidden="true"]'+o).length,s="function"==typeof this.options.countSelectedText?this.options.countSelectedText(r.length,e):this.options.countSelectedText,u=s.replace("{0}",r.length.toString()).replace("{1}",e.toString())));void 0==this.options.title&&(this.options.title=this.$element.attr("title"));"static"==this.options.selectedTextFormat&&(u=this.options.title);u||(u="undefined"!=typeof this.options.title?this.options.title:this.options.noneSelectedText);this.$button.attr("title",h(n.trim(u.replace(/<[^>]*>?/g,""))));this.$button.children(".filter-option").html(u);this.$element.trigger("rendered.bs.select")},setStyle:function(n,t){this.$element.attr("class")&&this.$newElement.addClass(this.$element.attr("class").replace(/selectpicker|mobile-device|bs-select-hidden|validate\[.*\]/gi,""));var i=n?n:this.options.style;"add"==t?this.$button.addClass(i):"remove"==t?this.$button.removeClass(i):(this.$button.removeClass(this.options.style),this.$button.addClass(i))},liHeight:function(t){var y;if(t||this.options.size!==!1&&!this.sizeInfo){var e=document.createElement("div"),u=document.createElement("div"),o=document.createElement("ul"),l=document.createElement("li"),w=document.createElement("li"),a=document.createElement("a"),v=document.createElement("span"),s=this.options.header&&this.$menu.find(".popover-title").length>0?this.$menu.find(".popover-title")[0].cloneNode(!0):null,f=this.options.liveSearch?document.createElement("div"):null,h=this.options.actionsBox&&this.multiple&&this.$menu.find(".bs-actionsbox").length>0?this.$menu.find(".bs-actionsbox")[0].cloneNode(!0):null,c=this.options.doneButton&&this.multiple&&this.$menu.find(".bs-donebutton").length>0?this.$menu.find(".bs-donebutton")[0].cloneNode(!0):null;(v.className="text",e.className=this.$menu[0].parentNode.className+" open",u.className="dropdown-menu open",o.className="dropdown-menu inner",l.className="divider",v.appendChild(document.createTextNode("Inner text")),a.appendChild(v),w.appendChild(a),o.appendChild(w),o.appendChild(l),s&&u.appendChild(s),f)&&(y=document.createElement("span"),f.className="bs-searchbox",y.className="form-control",f.appendChild(y),u.appendChild(f));h&&u.appendChild(h);u.appendChild(o);c&&u.appendChild(c);e.appendChild(u);document.body.appendChild(e);var b=a.offsetHeight,k=s?s.offsetHeight:0,d=f?f.offsetHeight:0,g=h?h.offsetHeight:0,nt=c?c.offsetHeight:0,tt=n(l).outerHeight(!0),i="function"==typeof getComputedStyle&&getComputedStyle(u),r=i?null:n(u),p={vert:parseInt(i?i.paddingTop:r.css("paddingTop"))+parseInt(i?i.paddingBottom:r.css("paddingBottom"))+parseInt(i?i.borderTopWidth:r.css("borderTopWidth"))+parseInt(i?i.borderBottomWidth:r.css("borderBottomWidth")),horiz:parseInt(i?i.paddingLeft:r.css("paddingLeft"))+parseInt(i?i.paddingRight:r.css("paddingRight"))+parseInt(i?i.borderLeftWidth:r.css("borderLeftWidth"))+parseInt(i?i.borderRightWidth:r.css("borderRightWidth"))},it={vert:p.vert+parseInt(i?i.marginTop:r.css("marginTop"))+parseInt(i?i.marginBottom:r.css("marginBottom"))+2,horiz:p.horiz+parseInt(i?i.marginLeft:r.css("marginLeft"))+parseInt(i?i.marginRight:r.css("marginRight"))+2};document.body.removeChild(e);this.sizeInfo={liHeight:b,headerHeight:k,searchHeight:d,actionsHeight:g,doneButtonHeight:nt,dividerHeight:tt,menuPadding:p,menuExtras:it}}},setSize:function(){var l,rt,ut;if(this.findLis(),this.liHeight(),this.options.header&&this.$menu.css("padding-top",0),this.options.size!==!1){var r,k,f,a,e,s,h,v,i=this,t=this.$menu,d=this.$menuInner,o=n(window),ft=this.$newElement[0].offsetHeight,g=this.$newElement[0].offsetWidth,nt=this.sizeInfo.liHeight,y=this.sizeInfo.headerHeight,p=this.sizeInfo.searchHeight,w=this.sizeInfo.actionsHeight,b=this.sizeInfo.doneButtonHeight,et=this.sizeInfo.dividerHeight,c=this.sizeInfo.menuPadding,u=this.sizeInfo.menuExtras,tt=this.options.hideDisabled?".disabled":"",it=function(){var t,f=i.$newElement.offset(),u=n(i.options.container),r;i.options.container&&!u.is("body")?(t=u.offset(),t.top+=parseInt(u.css("borderTopWidth")),t.left+=parseInt(u.css("borderLeftWidth"))):t={top:0,left:0};r=i.options.windowPadding;e=f.top-t.top-o.scrollTop();s=o.height()-e-ft-t.top-r[2];h=f.left-t.left-o.scrollLeft();v=o.width()-h-g-t.left-r[1];e-=r[0];h-=r[3]};(it(),"auto"===this.options.size)?(l=function(){var o,tt=function(t,i){return function(r){return i?r.classList?r.classList.contains(t):n(r).hasClass(t):!(r.classList?r.classList.contains(t):n(r).hasClass(t))}},rt=i.$menuInner[0].getElementsByTagName("li"),l=Array.prototype.filter?Array.prototype.filter.call(rt,tt("hidden",!1)):i.$lis.not(".hidden"),ut=Array.prototype.filter?Array.prototype.filter.call(l,tt("dropdown-header",!0)):l.filter(".dropdown-header");it();r=s-u.vert;k=v-u.horiz;i.options.container?(t.data("height")||t.data("height",t.height()),f=t.data("height"),t.data("width")||t.data("width",t.width()),a=t.data("width")):(f=t.height(),a=t.width());i.options.dropupAuto&&i.$newElement.toggleClass("dropup",e>s&&r-u.vert<f);i.$newElement.hasClass("dropup")&&(r=e-u.vert);"auto"===i.options.dropdownAlignRight&&t.toggleClass("dropdown-menu-right",h>v&&k-u.horiz<a-g);o=l.length+ut.length>3?3*nt+u.vert-2:0;t.css({"max-height":r+"px",overflow:"hidden","min-height":o+y+p+w+b+"px"});d.css({"max-height":r-y-p-w-b-c.vert+"px","overflow-y":"auto","min-height":Math.max(o-c.vert,0)+"px"})},l(),this.$searchbox.off("input.getSize propertychange.getSize").on("input.getSize propertychange.getSize",l),o.off("resize.getSize scroll.getSize").on("resize.getSize scroll.getSize",l)):this.options.size&&"auto"!=this.options.size&&this.$lis.not(tt).length>this.options.size&&(rt=this.$lis.not(".divider").not(tt).children().slice(0,this.options.size).last().parent().index(),ut=this.$lis.slice(0,rt+1).filter(".divider").length,r=nt*this.options.size+ut*et+c.vert,i.options.container?(t.data("height")||t.data("height",t.height()),f=t.data("height")):f=t.height(),i.options.dropupAuto&&this.$newElement.toggleClass("dropup",e>s&&r-u.vert<f),t.css({"max-height":r+y+p+w+b+"px",overflow:"hidden","min-height":""}),d.css({"max-height":r-c.vert+"px","overflow-y":"auto","min-height":""}))}},setWidth:function(){if("auto"===this.options.width){this.$menu.css("min-width","0");var n=this.$menu.parent().clone().appendTo("body"),t=this.options.container?this.$newElement.clone().appendTo("body"):n,i=n.children(".dropdown-menu").outerWidth(),r=t.css("width","auto").children("button").outerWidth();n.remove();t.remove();this.$newElement.css("width",Math.max(i,r)+"px")}else"fit"===this.options.width?(this.$menu.css("min-width",""),this.$newElement.css("width","").addClass("fit-width")):this.options.width?(this.$menu.css("min-width",""),this.$newElement.css("width",this.options.width)):(this.$menu.css("min-width",""),this.$newElement.css("width",""));this.$newElement.hasClass("fit-width")&&"fit"!==this.options.width&&this.$newElement.removeClass("fit-width")},selectPosition:function(){this.$bsContainer=n('<div class="bs-container" />');var u,i,f,t=this,r=n(this.options.container),e=function(n){t.$bsContainer.addClass(n.attr("class").replace(/form-control|fit-width/gi,"")).toggleClass("dropup",n.hasClass("dropup"));u=n.offset();r.is("body")?i={top:0,left:0}:(i=r.offset(),i.top+=parseInt(r.css("borderTopWidth"))-r.scrollTop(),i.left+=parseInt(r.css("borderLeftWidth"))-r.scrollLeft());f=n.hasClass("dropup")?0:n[0].offsetHeight;t.$bsContainer.css({top:u.top-i.top+f,left:u.left-i.left,width:n[0].offsetWidth})};this.$button.on("click",function(){var i=n(this);t.isDisabled()||(e(t.$newElement),t.$bsContainer.appendTo(t.options.container).toggleClass("open",!i.hasClass("open")).append(t.$menu))});n(window).on("resize scroll",function(){e(t.$newElement)});this.$element.on("hide.bs.select",function(){t.$menu.data("height",t.$menu.height());t.$bsContainer.detach()})},setSelected:function(n,t,i){i||(this.togglePlaceholder(),i=this.findLis().eq(this.liObj[n]));i.toggleClass("selected",t).find("a").attr("aria-selected",t)},setDisabled:function(n,t,i){i||(i=this.findLis().eq(this.liObj[n]));t?i.addClass("disabled").children("a").attr("href","#").attr("tabindex",-1).attr("aria-disabled",!0):i.removeClass("disabled").children("a").removeAttr("href").attr("tabindex",0).attr("aria-disabled",!1)},isDisabled:function(){return this.$element[0].disabled},checkDisabled:function(){var n=this;this.isDisabled()?(this.$newElement.addClass("disabled"),this.$button.addClass("disabled").attr("tabindex",-1).attr("aria-disabled",!0)):(this.$button.hasClass("disabled")&&(this.$newElement.removeClass("disabled"),this.$button.removeClass("disabled").attr("aria-disabled",!1)),this.$button.attr("tabindex")!=-1||this.$element.data("tabindex")||this.$button.removeAttr("tabindex"));this.$button.click(function(){return!n.isDisabled()})},togglePlaceholder:function(){var n=this.$element.val();this.$button.toggleClass("bs-placeholder",null===n||""===n||n.constructor===Array&&0===n.length)},tabIndex:function(){this.$element.data("tabindex")!==this.$element.attr("tabindex")&&this.$element.attr("tabindex")!==-98&&"-98"!==this.$element.attr("tabindex")&&(this.$element.data("tabindex",this.$element.attr("tabindex")),this.$button.attr("tabindex",this.$element.data("tabindex")));this.$element.attr("tabindex",-98)},clickListener:function(){var t=this,i=n(document);i.data("spaceSelect",!1);this.$button.on("keyup",function(n){/(32)/.test(n.keyCode.toString(10))&&i.data("spaceSelect")&&(n.preventDefault(),i.data("spaceSelect",!1))});this.$button.on("click",function(){t.setSize()});this.$element.on("shown.bs.select",function(){var i,n;if(t.options.liveSearch||t.multiple){if(!t.multiple){if(i=t.liObj[t.$element[0].selectedIndex],"number"!=typeof i||t.options.size===!1)return;n=t.$lis.eq(i)[0].offsetTop-t.$menuInner[0].offsetTop;n=n-t.$menuInner[0].offsetHeight/2+t.sizeInfo.liHeight/2;t.$menuInner[0].scrollTop=n}}else t.$menuInner.find(".selected a").focus()});this.$menuInner.on("click","li a",function(i){var h=n(this),o=h.parent().data("originalIndex"),nt=t.$element.val(),tt=t.$element.prop("selectedIndex"),a=!0,p,w,g;if(t.multiple&&1!==t.options.maxOptions&&i.stopPropagation(),i.preventDefault(),!t.isDisabled()&&!h.parent().hasClass("disabled")){var c=t.$element.find("option"),e=c.eq(o),v=e.prop("selected"),y=e.parent("optgroup"),u=t.options.maxOptions,f=y.data("maxOptions")||!1;if(t.multiple){if((e.prop("selected",!v),t.setSelected(o,!v),h.blur(),u!==!1||f!==!1)&&(p=u<c.filter(":selected").length,w=f<y.find("option:selected").length,u&&p||f&&w))if(u&&1==u)c.prop("selected",!1),e.prop("selected",!0),t.$menuInner.find(".selected").removeClass("selected"),t.setSelected(o,!0);else if(f&&1==f)y.find("option:selected").prop("selected",!1),e.prop("selected",!0),g=h.parent().data("optgroup"),t.$menuInner.find('[data-optgroup="'+g+'"]').removeClass("selected"),t.setSelected(o,!0);else{var b="string"==typeof t.options.maxOptionsText?[t.options.maxOptionsText,t.options.maxOptionsText]:t.options.maxOptionsText,s="function"==typeof b?b(u,f):b,k=s[0].replace("{n}",u),d=s[1].replace("{n}",f),l=n('<div class="notify"><\/div>');s[2]&&(k=k.replace("{var}",s[2][u>1?0:1]),d=d.replace("{var}",s[2][f>1?0:1]));e.prop("selected",!1);t.$menu.append(l);u&&p&&(l.append(n("<div>"+k+"<\/div>")),a=!1,t.$element.trigger("maxReached.bs.select"));f&&w&&(l.append(n("<div>"+d+"<\/div>")),a=!1,t.$element.trigger("maxReachedGrp.bs.select"));setTimeout(function(){t.setSelected(o,!1)},10);l.delay(750).fadeOut(300,function(){n(this).remove()})}}else c.prop("selected",!1),e.prop("selected",!0),t.$menuInner.find(".selected").removeClass("selected").find("a").attr("aria-selected",!1),t.setSelected(o,!0);!t.multiple||t.multiple&&1===t.options.maxOptions?t.$button.focus():t.options.liveSearch&&t.$searchbox.focus();a&&(nt!=t.$element.val()&&t.multiple||tt!=t.$element.prop("selectedIndex")&&!t.multiple)&&(r=[o,e.prop("selected"),v],t.$element.triggerNative("change"))}});this.$menu.on("click","li.disabled a, .popover-title, .popover-title :not(.close)",function(i){i.currentTarget==this&&(i.preventDefault(),i.stopPropagation(),t.options.liveSearch&&!n(i.target).hasClass("close")?t.$searchbox.focus():t.$button.focus())});this.$menuInner.on("click",".divider, .dropdown-header",function(n){n.preventDefault();n.stopPropagation();t.options.liveSearch?t.$searchbox.focus():t.$button.focus()});this.$menu.on("click",".popover-title .close",function(){t.$button.click()});this.$searchbox.on("click",function(n){n.stopPropagation()});this.$menu.on("click",".actions-btn",function(i){t.options.liveSearch?t.$searchbox.focus():t.$button.focus();i.preventDefault();i.stopPropagation();n(this).hasClass("bs-select-all")?t.selectAll():t.deselectAll()});this.$element.change(function(){t.render(!1);t.$element.trigger("changed.bs.select",r);r=null})},liveSearchListener:function(){var t=this,i=n('<li class="no-results"><\/li>');this.$button.on("click.dropdown.data-api",function(){t.$menuInner.find(".active").removeClass("active");t.$searchbox.val()&&(t.$searchbox.val(""),t.$lis.not(".is-hidden").removeClass("hidden"),i.parent().length&&i.remove());t.multiple||t.$menuInner.find(".selected").addClass("active");setTimeout(function(){t.$searchbox.focus()},10)});this.$searchbox.on("click.dropdown.data-api focus.dropdown.data-api touchend.dropdown.data-api",function(n){n.stopPropagation()});this.$searchbox.on("input propertychange",function(){var o,e,r,s;(t.$lis.not(".is-hidden").removeClass("hidden"),t.$lis.filter(".active").removeClass("active"),i.remove(),t.$searchbox.val())&&(e=t.$lis.not(".is-hidden, .divider, .dropdown-header"),(o=t.options.liveSearchNormalize?e.not(":a"+t._searchStyle()+'("'+f(t.$searchbox.val())+'")'):e.not(":"+t._searchStyle()+'("'+t.$searchbox.val()+'")'),o.length===e.length)?(i.html(t.options.noneResultsText.replace("{0}",'"'+u(t.$searchbox.val())+'"')),t.$menuInner.append(i),t.$lis.addClass("hidden")):(o.addClass("hidden"),s=t.$lis.not(".hidden"),s.each(function(t){var i=n(this);i.hasClass("divider")?void 0===r?i.addClass("hidden"):(r&&r.addClass("hidden"),r=i):i.hasClass("dropdown-header")&&s.eq(t+1).data("optgroup")!==i.data("optgroup")?i.addClass("hidden"):r=null}),r&&r.addClass("hidden"),e.not(".hidden").first().addClass("active")))})},_searchStyle:function(){return{begins:"ibegins",startsWith:"ibegins"}[this.options.liveSearchStyle]||"icontains"},val:function(n){return"undefined"!=typeof n?(this.$element.val(n),this.render(),this.$element):this.$element.val()},changeAll:function(t){var r,f;if(this.multiple){"undefined"==typeof t&&(t=!0);this.findLis();var e=this.$element.find("option"),i=this.$lis.not(".divider, .dropdown-header, .disabled, .hidden"),o=i.length,u=[];if(t){if(i.filter(".selected").length===i.length)return}else if(0===i.filter(".selected").length)return;for(i.toggleClass("selected",t),r=0;r<o;r++)f=i[r].getAttribute("data-original-index"),u[u.length]=e.eq(f)[0];n(u).prop("selected",t);this.render(!1);this.togglePlaceholder();this.$element.triggerNative("change")}},selectAll:function(){return this.changeAll(!0)},deselectAll:function(){return this.changeAll(!1)},toggle:function(n){n=n||window.event;n&&n.stopPropagation();this.$button.trigger("click")},keydown:function(t){var r,u,h,l,a,p,w,k,s,e=n(this),v=e.is("input")?e.parent().parent():e.parent(),i=v.data("this"),c=":not(.disabled, .hidden, .dropdown-header, .divider)",b={32:" ",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9"},o,g,y,d;if(i.options.liveSearch&&(v=e.parent().parent()),i.options.container&&(v=i.$menu),r=n('[role="listbox"] li',v),s=i.$newElement.hasClass("open"),!s&&(t.keyCode>=48&&t.keyCode<=57||t.keyCode>=96&&t.keyCode<=105||t.keyCode>=65&&t.keyCode<=90))return i.options.container?i.$button.trigger("click"):(i.setSize(),i.$menu.parent().addClass("open"),s=!0),void i.$searchbox.focus();(i.options.liveSearch&&(/(^9$|27)/.test(t.keyCode.toString(10))&&s&&(t.preventDefault(),t.stopPropagation(),i.$menuInner.click(),i.$button.focus()),r=n('[role="listbox"] li'+c,v),e.val()||/(38|40)/.test(t.keyCode.toString(10))||0===r.filter(".active").length&&(r=i.$menuInner.find("li"),r=i.options.liveSearchNormalize?r.filter(":a"+i._searchStyle()+"("+f(b[t.keyCode])+")"):r.filter(":"+i._searchStyle()+"("+b[t.keyCode]+")"))),r.length)&&(/(38|40)/.test(t.keyCode.toString(10))?(u=r.index(r.find("a").filter(":focus").parent()),l=r.filter(c).first().index(),a=r.filter(c).last().index(),h=r.eq(u).nextAll(c).eq(0).index(),p=r.eq(u).prevAll(c).eq(0).index(),w=r.eq(h).prevAll(c).eq(0).index(),i.options.liveSearch&&(r.each(function(t){n(this).hasClass("disabled")||n(this).data("index",t)}),u=r.index(r.filter(".active")),l=r.first().data("index"),a=r.last().data("index"),h=r.eq(u).nextAll().eq(0).data("index"),p=r.eq(u).prevAll().eq(0).data("index"),w=r.eq(h).prevAll().eq(0).data("index")),k=e.data("prevIndex"),38==t.keyCode?(i.options.liveSearch&&u--,u!=w&&u>p&&(u=p),u<l&&(u=l),u==k&&(u=a)):40==t.keyCode&&(i.options.liveSearch&&u++,u==-1&&(u=0),u!=w&&u<h&&(u=h),u>a&&(u=a),u==k&&(u=l)),e.data("prevIndex",u),i.options.liveSearch?(t.preventDefault(),e.hasClass("dropdown-toggle")||(r.removeClass("active").eq(u).addClass("active").children("a").focus(),e.focus())):r.eq(u).children("a").focus()):e.is("input")||(y=[],r.each(function(){n(this).hasClass("disabled")||n.trim(n(this).children("a").text().toLowerCase()).substring(0,1)==b[t.keyCode]&&y.push(n(this).index())}),o=n(document).data("keycount"),o++,n(document).data("keycount",o),g=n.trim(n(":focus").text().toLowerCase()).substring(0,1),g!=b[t.keyCode]?(o=1,n(document).data("keycount",o)):o>=y.length&&(n(document).data("keycount",0),o>y.length&&(o=1)),r.eq(y[o-1]).children("a").focus()),(/(13|32)/.test(t.keyCode.toString(10))||/(^9$)/.test(t.keyCode.toString(10))&&i.options.selectOnTab)&&s&&((/(32)/.test(t.keyCode.toString(10))||t.preventDefault(),i.options.liveSearch)?/(32)/.test(t.keyCode.toString(10))||(i.$menuInner.find(".active a").click(),e.focus()):(d=n(":focus"),d.click(),d.focus(),t.preventDefault(),n(document).data("spaceSelect",!0)),n(document).data("keycount",0)),(/(^9$|27)/.test(t.keyCode.toString(10))&&s&&(i.multiple||i.options.liveSearch)||/(27)/.test(t.keyCode.toString(10))&&!s)&&(i.$menu.parent().removeClass("open"),i.options.container&&i.$newElement.removeClass("open"),i.$button.focus()))},mobile:function(){this.$element.addClass("mobile-device")},refresh:function(){this.$lis=null;this.liObj={};this.reloadLi();this.render();this.checkDisabled();this.liHeight(!0);this.setStyle();this.setWidth();this.$lis&&this.$searchbox.trigger("propertychange");this.$element.trigger("refreshed.bs.select")},hide:function(){this.$newElement.hide()},show:function(){this.$newElement.show()},remove:function(){this.$newElement.remove();this.$element.remove()},destroy:function(){this.$newElement.before(this.$element).remove();this.$bsContainer?this.$bsContainer.remove():this.$menu.remove();this.$element.off(".bs.select").removeData("selectpicker").removeClass("bs-select-hidden selectpicker")}};s=n.fn.selectpicker;n.fn.selectpicker=e;n.fn.selectpicker.Constructor=t;n.fn.selectpicker.noConflict=function(){return n.fn.selectpicker=s,this};n(document).data("keycount",0).on("keydown.bs.select",'.bootstrap-select [data-toggle=dropdown], .bootstrap-select [role="listbox"], .bs-searchbox input',t.prototype.keydown).on("focusin.modal",'.bootstrap-select [data-toggle=dropdown], .bootstrap-select [role="listbox"], .bs-searchbox input',function(n){n.stopPropagation()});n(window).on("load.bs.select.data-api",function(){n(".selectpicker").each(function(){var t=n(this);e.call(t,t.data())})})}(n)}),"undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(n){"use strict";var t=n.fn.jquery.split(" ")[0].split(".");if(t[0]<2&&t[1]<9||1==t[0]&&9==t[1]&&t[2]<1||t[0]>3)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4");}(jQuery);+function(n){"use strict";function t(){var i=document.createElement("bootstrap"),n={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var t in n)if(void 0!==i.style[t])return{end:n[t]};return!1}n.fn.emulateTransitionEnd=function(t){var i=!1,u=this,r;n(this).one("bsTransitionEnd",function(){i=!0});return r=function(){i||n(u).trigger(n.support.transition.end)},setTimeout(r,t),this};n(function(){n.support.transition=t();n.support.transition&&(n.event.special.bsTransitionEnd={bindType:n.support.transition.end,delegateType:n.support.transition.end,handle:function(t){if(n(t.target).is(this))return t.handleObj.handler.apply(this,arguments)}})})}(jQuery);+function(n){"use strict";function u(i){return this.each(function(){var r=n(this),u=r.data("bs.alert");u||r.data("bs.alert",u=new t(this));"string"==typeof i&&u[i].call(r)})}var i='[data-dismiss="alert"]',t=function(t){n(t).on("click",i,this.close)},r;t.VERSION="3.3.7";t.TRANSITION_DURATION=150;t.prototype.close=function(i){function e(){r.detach().trigger("closed.bs.alert").remove()}var f=n(this),u=f.attr("data-target"),r;u||(u=f.attr("href"),u=u&&u.replace(/.*(?=#[^\s]*$)/,""));r=n("#"===u?[]:u);i&&i.preventDefault();r.length||(r=f.closest(".alert"));r.trigger(i=n.Event("close.bs.alert"));i.isDefaultPrevented()||(r.removeClass("in"),n.support.transition&&r.hasClass("fade")?r.one("bsTransitionEnd",e).emulateTransitionEnd(t.TRANSITION_DURATION):e())};r=n.fn.alert;n.fn.alert=u;n.fn.alert.Constructor=t;n.fn.alert.noConflict=function(){return n.fn.alert=r,this};n(document).on("click.bs.alert.data-api",i,t.prototype.close)}(jQuery);+function(n){"use strict";function i(i){return this.each(function(){var u=n(this),r=u.data("bs.button"),f="object"==typeof i&&i;r||u.data("bs.button",r=new t(this,f));"toggle"==i?r.toggle():i&&r.setState(i)})}var t=function(i,r){this.$element=n(i);this.options=n.extend({},t.DEFAULTS,r);this.isLoading=!1},r;t.VERSION="3.3.7";t.DEFAULTS={loadingText:"loading..."};t.prototype.setState=function(t){var i="disabled",r=this.$element,f=r.is("input")?"val":"html",u=r.data();t+="Text";null==u.resetText&&r.data("resetText",r[f]());setTimeout(n.proxy(function(){r[f](null==u[t]?this.options[t]:u[t]);"loadingText"==t?(this.isLoading=!0,r.addClass(i).attr(i,i).prop(i,!0)):this.isLoading&&(this.isLoading=!1,r.removeClass(i).removeAttr(i).prop(i,!1))},this),0)};t.prototype.toggle=function(){var t=!0,i=this.$element.closest('[data-toggle="buttons"]'),n;i.length?(n=this.$element.find("input"),"radio"==n.prop("type")?(n.prop("checked")&&(t=!1),i.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==n.prop("type")&&(n.prop("checked")!==this.$element.hasClass("active")&&(t=!1),this.$element.toggleClass("active")),n.prop("checked",this.$element.hasClass("active")),t&&n.trigger("change")):(this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active"))};r=n.fn.button;n.fn.button=i;n.fn.button.Constructor=t;n.fn.button.noConflict=function(){return n.fn.button=r,this};n(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(t){var r=n(t.target).closest(".btn");i.call(r,"toggle");n(t.target).is('input[type="radio"], input[type="checkbox"]')||(t.preventDefault(),r.is("input,button")?r.trigger("focus"):r.find("input:visible,button:visible").first().trigger("focus"))}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(t){n(t.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(t.type))})}(jQuery);+function(n){"use strict";function i(i){return this.each(function(){var u=n(this),r=u.data("bs.carousel"),f=n.extend({},t.DEFAULTS,u.data(),"object"==typeof i&&i),e="string"==typeof i?i:f.slide;r||u.data("bs.carousel",r=new t(this,f));"number"==typeof i?r.to(i):e?r[e]():f.interval&&r.pause().cycle()})}var t=function(t,i){this.$element=n(t);this.$indicators=this.$element.find(".carousel-indicators");this.options=i;this.paused=null;this.sliding=null;this.interval=null;this.$active=null;this.$items=null;this.options.keyboard&&this.$element.on("keydown.bs.carousel",n.proxy(this.keydown,this));"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",n.proxy(this.pause,this)).on("mouseleave.bs.carousel",n.proxy(this.cycle,this))},u,r;t.VERSION="3.3.7";t.TRANSITION_DURATION=600;t.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0};t.prototype.keydown=function(n){if(!/input|textarea/i.test(n.target.tagName)){switch(n.which){case 37:this.prev();break;case 39:this.next();break;default:return}n.preventDefault()}};t.prototype.cycle=function(t){return t||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(n.proxy(this.next,this),this.options.interval)),this};t.prototype.getItemIndex=function(n){return this.$items=n.parent().children(".item"),this.$items.index(n||this.$active)};t.prototype.getItemForDirection=function(n,t){var i=this.getItemIndex(t),f="prev"==n&&0===i||"next"==n&&i==this.$items.length-1,r,u;return f&&!this.options.wrap?t:(r="prev"==n?-1:1,u=(i+r)%this.$items.length,this.$items.eq(u))};t.prototype.to=function(n){var i=this,t=this.getItemIndex(this.$active=this.$element.find(".item.active"));if(!(n>this.$items.length-1||n<0))return this.sliding?this.$element.one("slid.bs.carousel",function(){i.to(n)}):t==n?this.pause().cycle():this.slide(n>t?"next":"prev",this.$items.eq(n))};t.prototype.pause=function(t){return t||(this.paused=!0),this.$element.find(".next, .prev").length&&n.support.transition&&(this.$element.trigger(n.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this};t.prototype.next=function(){if(!this.sliding)return this.slide("next")};t.prototype.prev=function(){if(!this.sliding)return this.slide("prev")};t.prototype.slide=function(i,r){var e=this.$element.find(".item.active"),u=r||this.getItemForDirection(i,e),l=this.interval,f="next"==i?"left":"right",a=this,o,s,h,c;return u.hasClass("active")?this.sliding=!1:(o=u[0],s=n.Event("slide.bs.carousel",{relatedTarget:o,direction:f}),(this.$element.trigger(s),!s.isDefaultPrevented())?((this.sliding=!0,l&&this.pause(),this.$indicators.length)&&(this.$indicators.find(".active").removeClass("active"),h=n(this.$indicators.children()[this.getItemIndex(u)]),h&&h.addClass("active")),c=n.Event("slid.bs.carousel",{relatedTarget:o,direction:f}),n.support.transition&&this.$element.hasClass("slide")?(u.addClass(i),u[0].offsetWidth,e.addClass(f),u.addClass(f),e.one("bsTransitionEnd",function(){u.removeClass([i,f].join(" ")).addClass("active");e.removeClass(["active",f].join(" "));a.sliding=!1;setTimeout(function(){a.$element.trigger(c)},0)}).emulateTransitionEnd(t.TRANSITION_DURATION)):(e.removeClass("active"),u.addClass("active"),this.sliding=!1,this.$element.trigger(c)),l&&this.cycle(),this):void 0)};u=n.fn.carousel;n.fn.carousel=i;n.fn.carousel.Constructor=t;n.fn.carousel.noConflict=function(){return n.fn.carousel=u,this};r=function(t){var o,r=n(this),u=n(r.attr("data-target")||(o=r.attr("href"))&&o.replace(/.*(?=#[^\s]+$)/,"")),e,f;u.hasClass("carousel")&&(e=n.extend({},u.data(),r.data()),f=r.attr("data-slide-to"),f&&(e.interval=!1),i.call(u,e),f&&u.data("bs.carousel").to(f),t.preventDefault())};n(document).on("click.bs.carousel.data-api","[data-slide]",r).on("click.bs.carousel.data-api","[data-slide-to]",r);n(window).on("load",function(){n('[data-ride="carousel"]').each(function(){var t=n(this);i.call(t,t.data())})})}(jQuery);+function(n){"use strict";function r(t){var i,r=t.attr("data-target")||(i=t.attr("href"))&&i.replace(/.*(?=#[^\s]+$)/,"");return n(r)}function i(i){return this.each(function(){var u=n(this),r=u.data("bs.collapse"),f=n.extend({},t.DEFAULTS,u.data(),"object"==typeof i&&i);!r&&f.toggle&&/show|hide/.test(i)&&(f.toggle=!1);r||u.data("bs.collapse",r=new t(this,f));"string"==typeof i&&r[i]()})}var t=function(i,r){this.$element=n(i);this.options=n.extend({},t.DEFAULTS,r);this.$trigger=n('[data-toggle="collapse"][href="#'+i.id+'"],[data-toggle="collapse"][data-target="#'+i.id+'"]');this.transitioning=null;this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger);this.options.toggle&&this.toggle()},u;t.VERSION="3.3.7";t.TRANSITION_DURATION=350;t.DEFAULTS={toggle:!0};t.prototype.dimension=function(){var n=this.$element.hasClass("width");return n?"width":"height"};t.prototype.show=function(){var f,r,e,u,o,s;if(!this.transitioning&&!this.$element.hasClass("in")&&(r=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing"),!(r&&r.length&&(f=r.data("bs.collapse"),f&&f.transitioning))&&(e=n.Event("show.bs.collapse"),this.$element.trigger(e),!e.isDefaultPrevented()))){if(r&&r.length&&(i.call(r,"hide"),f||r.data("bs.collapse",null)),u=this.dimension(),this.$element.removeClass("collapse").addClass("collapsing")[u](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1,o=function(){this.$element.removeClass("collapsing").addClass("collapse in")[u]("");this.transitioning=0;this.$element.trigger("shown.bs.collapse")},!n.support.transition)return o.call(this);s=n.camelCase(["scroll",u].join("-"));this.$element.one("bsTransitionEnd",n.proxy(o,this)).emulateTransitionEnd(t.TRANSITION_DURATION)[u](this.$element[0][s])}};t.prototype.hide=function(){var r,i,u;if(!this.transitioning&&this.$element.hasClass("in")&&(r=n.Event("hide.bs.collapse"),this.$element.trigger(r),!r.isDefaultPrevented()))return i=this.dimension(),this.$element[i](this.$element[i]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1,u=function(){this.transitioning=0;this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")},n.support.transition?void this.$element[i](0).one("bsTransitionEnd",n.proxy(u,this)).emulateTransitionEnd(t.TRANSITION_DURATION):u.call(this)};t.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};t.prototype.getParent=function(){return n(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(n.proxy(function(t,i){var u=n(i);this.addAriaAndCollapsedClass(r(u),u)},this)).end()};t.prototype.addAriaAndCollapsedClass=function(n,t){var i=n.hasClass("in");n.attr("aria-expanded",i);t.toggleClass("collapsed",!i).attr("aria-expanded",i)};u=n.fn.collapse;n.fn.collapse=i;n.fn.collapse.Constructor=t;n.fn.collapse.noConflict=function(){return n.fn.collapse=u,this};n(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(t){var u=n(this);u.attr("data-target")||t.preventDefault();var f=r(u),e=f.data("bs.collapse"),o=e?"toggle":u.data();i.call(f,o)})}(jQuery);+function(n){"use strict";function r(t){var i=t.attr("data-target"),r;return i||(i=t.attr("href"),i=i&&/#[A-Za-z]/.test(i)&&i.replace(/.*(?=#[^\s]*$)/,"")),r=i&&n(i),r&&r.length?r:t.parent()}function u(t){t&&3===t.which||(n(o).remove(),n(i).each(function(){var u=n(this),i=r(u),f={relatedTarget:this};i.hasClass("open")&&(t&&"click"==t.type&&/input|textarea/i.test(t.target.tagName)&&n.contains(i[0],t.target)||(i.trigger(t=n.Event("hide.bs.dropdown",f)),t.isDefaultPrevented()||(u.attr("aria-expanded","false"),i.removeClass("open").trigger(n.Event("hidden.bs.dropdown",f)))))}))}function e(i){return this.each(function(){var r=n(this),u=r.data("bs.dropdown");u||r.data("bs.dropdown",u=new t(this));"string"==typeof i&&u[i].call(r)})}var o=".dropdown-backdrop",i='[data-toggle="dropdown"]',t=function(t){n(t).on("click.bs.dropdown",this.toggle)},f;t.VERSION="3.3.7";t.prototype.toggle=function(t){var f=n(this),i,o,e;if(!f.is(".disabled, :disabled")){if(i=r(f),o=i.hasClass("open"),u(),!o){if("ontouchstart"in document.documentElement&&!i.closest(".navbar-nav").length&&n(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(n(this)).on("click",u),e={relatedTarget:this},i.trigger(t=n.Event("show.bs.dropdown",e)),t.isDefaultPrevented())return;f.trigger("focus").attr("aria-expanded","true");i.toggleClass("open").trigger(n.Event("shown.bs.dropdown",e))}return!1}};t.prototype.keydown=function(t){var e,o,s,h,f,u;if(/(38|40|27|32)/.test(t.which)&&!/input|textarea/i.test(t.target.tagName)&&(e=n(this),t.preventDefault(),t.stopPropagation(),!e.is(".disabled, :disabled"))){if(o=r(e),s=o.hasClass("open"),!s&&27!=t.which||s&&27==t.which)return 27==t.which&&o.find(i).trigger("focus"),e.trigger("click");h=" li:not(.disabled):visible a";f=o.find(".dropdown-menu"+h);f.length&&(u=f.index(t.target),38==t.which&&u>0&&u--,40==t.which&&u<f.length-1&&u++,~u||(u=0),f.eq(u).trigger("focus"))}};f=n.fn.dropdown;n.fn.dropdown=e;n.fn.dropdown.Constructor=t;n.fn.dropdown.noConflict=function(){return n.fn.dropdown=f,this};n(document).on("click.bs.dropdown.data-api",u).on("click.bs.dropdown.data-api",".dropdown form",function(n){n.stopPropagation()}).on("click.bs.dropdown.data-api",i,t.prototype.toggle).on("keydown.bs.dropdown.data-api",i,t.prototype.keydown).on("keydown.bs.dropdown.data-api",".dropdown-menu",t.prototype.keydown)}(jQuery);+function(n){"use strict";function i(i,r){return this.each(function(){var f=n(this),u=f.data("bs.modal"),e=n.extend({},t.DEFAULTS,f.data(),"object"==typeof i&&i);u||f.data("bs.modal",u=new t(this,e));"string"==typeof i?u[i](r):e.show&&u.show(r)})}var t=function(t,i){this.options=i;this.$body=n(document.body);this.$element=n(t);this.$dialog=this.$element.find(".modal-dialog");this.$backdrop=null;this.isShown=null;this.originalBodyPad=null;this.scrollbarWidth=0;this.ignoreBackdropClick=!1;this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,n.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))},r;t.VERSION="3.3.7";t.TRANSITION_DURATION=300;t.BACKDROP_TRANSITION_DURATION=150;t.DEFAULTS={backdrop:!0,keyboard:!0,show:!0};t.prototype.toggle=function(n){return this.isShown?this.hide():this.show(n)};t.prototype.show=function(i){var r=this,u=n.Event("show.bs.modal",{relatedTarget:i});this.$element.trigger(u);this.isShown||u.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.setScrollbar(),this.$body.addClass("modal-open"),this.escape(),this.resize(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',n.proxy(this.hide,this)),this.$dialog.on("mousedown.dismiss.bs.modal",function(){r.$element.one("mouseup.dismiss.bs.modal",function(t){n(t.target).is(r.$element)&&(r.ignoreBackdropClick=!0)})}),this.backdrop(function(){var f=n.support.transition&&r.$element.hasClass("fade"),u;r.$element.parent().length||r.$element.appendTo(r.$body);r.$element.show().scrollTop(0);r.adjustDialog();f&&r.$element[0].offsetWidth;r.$element.addClass("in");r.enforceFocus();u=n.Event("shown.bs.modal",{relatedTarget:i});f?r.$dialog.one("bsTransitionEnd",function(){r.$element.trigger("focus").trigger(u)}).emulateTransitionEnd(t.TRANSITION_DURATION):r.$element.trigger("focus").trigger(u)}))};t.prototype.hide=function(i){i&&i.preventDefault();i=n.Event("hide.bs.modal");this.$element.trigger(i);this.isShown&&!i.isDefaultPrevented()&&(this.isShown=!1,this.escape(),this.resize(),n(document).off("focusin.bs.modal"),this.$element.removeClass("in").off("click.dismiss.bs.modal").off("mouseup.dismiss.bs.modal"),this.$dialog.off("mousedown.dismiss.bs.modal"),n.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",n.proxy(this.hideModal,this)).emulateTransitionEnd(t.TRANSITION_DURATION):this.hideModal())};t.prototype.enforceFocus=function(){n(document).off("focusin.bs.modal").on("focusin.bs.modal",n.proxy(function(n){document===n.target||this.$element[0]===n.target||this.$element.has(n.target).length||this.$element.trigger("focus")},this))};t.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keydown.dismiss.bs.modal",n.proxy(function(n){27==n.which&&this.hide()},this)):this.isShown||this.$element.off("keydown.dismiss.bs.modal")};t.prototype.resize=function(){this.isShown?n(window).on("resize.bs.modal",n.proxy(this.handleUpdate,this)):n(window).off("resize.bs.modal")};t.prototype.hideModal=function(){var n=this;this.$element.hide();this.backdrop(function(){n.$body.removeClass("modal-open");n.resetAdjustments();n.resetScrollbar();n.$element.trigger("hidden.bs.modal")})};t.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove();this.$backdrop=null};t.prototype.backdrop=function(i){var e=this,f=this.$element.hasClass("fade")?"fade":"",r,u;if(this.isShown&&this.options.backdrop){if(r=n.support.transition&&f,this.$backdrop=n(document.createElement("div")).addClass("modal-backdrop "+f).appendTo(this.$body),this.$element.on("click.dismiss.bs.modal",n.proxy(function(n){return this.ignoreBackdropClick?void(this.ignoreBackdropClick=!1):void(n.target===n.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus():this.hide()))},this)),r&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!i)return;r?this.$backdrop.one("bsTransitionEnd",i).emulateTransitionEnd(t.BACKDROP_TRANSITION_DURATION):i()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),u=function(){e.removeBackdrop();i&&i()},n.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",u).emulateTransitionEnd(t.BACKDROP_TRANSITION_DURATION):u()):i&&i()};t.prototype.handleUpdate=function(){this.adjustDialog()};t.prototype.adjustDialog=function(){var n=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&n?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!n?this.scrollbarWidth:""})};t.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})};t.prototype.checkScrollbar=function(){var n=window.innerWidth,t;n||(t=document.documentElement.getBoundingClientRect(),n=t.right-Math.abs(t.left));this.bodyIsOverflowing=document.body.clientWidth<n;this.scrollbarWidth=this.measureScrollbar()};t.prototype.setScrollbar=function(){var n=parseInt(this.$body.css("padding-right")||0,10);this.originalBodyPad=document.body.style.paddingRight||"";this.bodyIsOverflowing&&this.$body.css("padding-right",n+this.scrollbarWidth)};t.prototype.resetScrollbar=function(){this.$body.css("padding-right",this.originalBodyPad)};t.prototype.measureScrollbar=function(){var n=document.createElement("div"),t;return n.className="modal-scrollbar-measure",this.$body.append(n),t=n.offsetWidth-n.clientWidth,this.$body[0].removeChild(n),t};r=n.fn.modal;n.fn.modal=i;n.fn.modal.Constructor=t;n.fn.modal.noConflict=function(){return n.fn.modal=r,this};n(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(t){var r=n(this),f=r.attr("href"),u=n(r.attr("data-target")||f&&f.replace(/.*(?=#[^\s]+$)/,"")),e=u.data("bs.modal")?"toggle":n.extend({remote:!/#/.test(f)&&f},u.data(),r.data());r.is("a")&&t.preventDefault();u.one("show.bs.modal",function(n){n.isDefaultPrevented()||u.one("hidden.bs.modal",function(){r.is(":visible")&&r.trigger("focus")})});i.call(u,e,this)})}(jQuery);+function(n){"use strict";function r(i){return this.each(function(){var u=n(this),r=u.data("bs.tooltip"),f="object"==typeof i&&i;!r&&/destroy|hide/.test(i)||(r||u.data("bs.tooltip",r=new t(this,f)),"string"==typeof i&&r[i]())})}var t=function(n,t){this.type=null;this.options=null;this.enabled=null;this.timeout=null;this.hoverState=null;this.$element=null;this.inState=null;this.init("tooltip",n,t)},i;t.VERSION="3.3.7";t.TRANSITION_DURATION=150;t.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"><\/div><div class="tooltip-inner"><\/div><\/div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}};t.prototype.init=function(t,i,r){var f,e,u,o,s;if(this.enabled=!0,this.type=t,this.$element=n(i),this.options=this.getOptions(r),this.$viewport=this.options.viewport&&n(n.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(f=this.options.trigger.split(" "),e=f.length;e--;)if(u=f[e],"click"==u)this.$element.on("click."+this.type,this.options.selector,n.proxy(this.toggle,this));else"manual"!=u&&(o="hover"==u?"mouseenter":"focusin",s="hover"==u?"mouseleave":"focusout",this.$element.on(o+"."+this.type,this.options.selector,n.proxy(this.enter,this)),this.$element.on(s+"."+this.type,this.options.selector,n.proxy(this.leave,this)));this.options.selector?this._options=n.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()};t.prototype.getDefaults=function(){return t.DEFAULTS};t.prototype.getOptions=function(t){return t=n.extend({},this.getDefaults(),this.$element.data(),t),t.delay&&"number"==typeof t.delay&&(t.delay={show:t.delay,hide:t.delay}),t};t.prototype.getDelegateOptions=function(){var t={},i=this.getDefaults();return this._options&&n.each(this._options,function(n,r){i[n]!=r&&(t[n]=r)}),t};t.prototype.enter=function(t){var i=t instanceof this.constructor?t:n(t.currentTarget).data("bs."+this.type);return i||(i=new this.constructor(t.currentTarget,this.getDelegateOptions()),n(t.currentTarget).data("bs."+this.type,i)),t instanceof n.Event&&(i.inState["focusin"==t.type?"focus":"hover"]=!0),i.tip().hasClass("in")||"in"==i.hoverState?void(i.hoverState="in"):(clearTimeout(i.timeout),i.hoverState="in",i.options.delay&&i.options.delay.show?void(i.timeout=setTimeout(function(){"in"==i.hoverState&&i.show()},i.options.delay.show)):i.show())};t.prototype.isInStateTrue=function(){for(var n in this.inState)if(this.inState[n])return!0;return!1};t.prototype.leave=function(t){var i=t instanceof this.constructor?t:n(t.currentTarget).data("bs."+this.type);if(i||(i=new this.constructor(t.currentTarget,this.getDelegateOptions()),n(t.currentTarget).data("bs."+this.type,i)),t instanceof n.Event&&(i.inState["focusout"==t.type?"focus":"hover"]=!1),!i.isInStateTrue())return clearTimeout(i.timeout),i.hoverState="out",i.options.delay&&i.options.delay.hide?void(i.timeout=setTimeout(function(){"out"==i.hoverState&&i.hide()},i.options.delay.hide)):i.hide()};t.prototype.show=function(){var c=n.Event("show.bs."+this.type),l,p,e,w,h;if(this.hasContent()&&this.enabled){if(this.$element.trigger(c),l=n.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]),c.isDefaultPrevented()||!l)return;var u=this,r=this.tip(),a=this.getUID(this.type);this.setContent();r.attr("id",a);this.$element.attr("aria-describedby",a);this.options.animation&&r.addClass("fade");var i="function"==typeof this.options.placement?this.options.placement.call(this,r[0],this.$element[0]):this.options.placement,v=/\s?auto?\s?/i,y=v.test(i);y&&(i=i.replace(v,"")||"top");r.detach().css({top:0,left:0,display:"block"}).addClass(i).data("bs."+this.type,this);this.options.container?r.appendTo(this.options.container):r.insertAfter(this.$element);this.$element.trigger("inserted.bs."+this.type);var f=this.getPosition(),o=r[0].offsetWidth,s=r[0].offsetHeight;y&&(p=i,e=this.getPosition(this.$viewport),i="bottom"==i&&f.bottom+s>e.bottom?"top":"top"==i&&f.top-s<e.top?"bottom":"right"==i&&f.right+o>e.width?"left":"left"==i&&f.left-o<e.left?"right":i,r.removeClass(p).addClass(i));w=this.getCalculatedOffset(i,f,o,s);this.applyPlacement(w,i);h=function(){var n=u.hoverState;u.$element.trigger("shown.bs."+u.type);u.hoverState=null;"out"==n&&u.leave(u)};n.support.transition&&this.$tip.hasClass("fade")?r.one("bsTransitionEnd",h).emulateTransitionEnd(t.TRANSITION_DURATION):h()}};t.prototype.applyPlacement=function(t,i){var r=this.tip(),l=r[0].offsetWidth,e=r[0].offsetHeight,o=parseInt(r.css("margin-top"),10),s=parseInt(r.css("margin-left"),10),h,f,u;isNaN(o)&&(o=0);isNaN(s)&&(s=0);t.top+=o;t.left+=s;n.offset.setOffset(r[0],n.extend({using:function(n){r.css({top:Math.round(n.top),left:Math.round(n.left)})}},t),0);r.addClass("in");h=r[0].offsetWidth;f=r[0].offsetHeight;"top"==i&&f!=e&&(t.top=t.top+e-f);u=this.getViewportAdjustedDelta(i,t,h,f);u.left?t.left+=u.left:t.top+=u.top;var c=/top|bottom/.test(i),a=c?2*u.left-l+h:2*u.top-e+f,v=c?"offsetWidth":"offsetHeight";r.offset(t);this.replaceArrow(a,r[0][v],c)};t.prototype.replaceArrow=function(n,t,i){this.arrow().css(i?"left":"top",50*(1-n/t)+"%").css(i?"top":"left","")};t.prototype.setContent=function(){var n=this.tip(),t=this.getTitle();n.find(".tooltip-inner")[this.options.html?"html":"text"](t);n.removeClass("fade in top bottom left right")};t.prototype.hide=function(i){function f(){"in"!=r.hoverState&&u.detach();r.$element&&r.$element.removeAttr("aria-describedby").trigger("hidden.bs."+r.type);i&&i()}var r=this,u=n(this.$tip),e=n.Event("hide.bs."+this.type);if(this.$element.trigger(e),!e.isDefaultPrevented())return u.removeClass("in"),n.support.transition&&u.hasClass("fade")?u.one("bsTransitionEnd",f).emulateTransitionEnd(t.TRANSITION_DURATION):f(),this.hoverState=null,this};t.prototype.fixTitle=function(){var n=this.$element;(n.attr("title")||"string"!=typeof n.attr("data-original-title"))&&n.attr("data-original-title",n.attr("title")||"").attr("title","")};t.prototype.hasContent=function(){return this.getTitle()};t.prototype.getPosition=function(t){t=t||this.$element;var r=t[0],u="BODY"==r.tagName,i=r.getBoundingClientRect();null==i.width&&(i=n.extend({},i,{width:i.right-i.left,height:i.bottom-i.top}));var f=window.SVGElement&&r instanceof window.SVGElement,e=u?{top:0,left:0}:f?null:t.offset(),o={scroll:u?document.documentElement.scrollTop||document.body.scrollTop:t.scrollTop()},s=u?{width:n(window).width(),height:n(window).height()}:null;return n.extend({},i,o,s,e)};t.prototype.getCalculatedOffset=function(n,t,i,r){return"bottom"==n?{top:t.top+t.height,left:t.left+t.width/2-i/2}:"top"==n?{top:t.top-r,left:t.left+t.width/2-i/2}:"left"==n?{top:t.top+t.height/2-r/2,left:t.left-i}:{top:t.top+t.height/2-r/2,left:t.left+t.width}};t.prototype.getViewportAdjustedDelta=function(n,t,i,r){var f={top:0,left:0},e,u,o,s,h,c;return this.$viewport?(e=this.options.viewport&&this.options.viewport.padding||0,u=this.getPosition(this.$viewport),/right|left/.test(n)?(o=t.top-e-u.scroll,s=t.top+e-u.scroll+r,o<u.top?f.top=u.top-o:s>u.top+u.height&&(f.top=u.top+u.height-s)):(h=t.left-e,c=t.left+e+i,h<u.left?f.left=u.left-h:c>u.right&&(f.left=u.left+u.width-c)),f):f};t.prototype.getTitle=function(){var t=this.$element,n=this.options;return t.attr("data-original-title")||("function"==typeof n.title?n.title.call(t[0]):n.title)};t.prototype.getUID=function(n){do n+=~~(1e6*Math.random());while(document.getElementById(n));return n};t.prototype.tip=function(){if(!this.$tip&&(this.$tip=n(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip};t.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")};t.prototype.enable=function(){this.enabled=!0};t.prototype.disable=function(){this.enabled=!1};t.prototype.toggleEnabled=function(){this.enabled=!this.enabled};t.prototype.toggle=function(t){var i=this;t&&(i=n(t.currentTarget).data("bs."+this.type),i||(i=new this.constructor(t.currentTarget,this.getDelegateOptions()),n(t.currentTarget).data("bs."+this.type,i)));t?(i.inState.click=!i.inState.click,i.isInStateTrue()?i.enter(i):i.leave(i)):i.tip().hasClass("in")?i.leave(i):i.enter(i)};t.prototype.destroy=function(){var n=this;clearTimeout(this.timeout);this.hide(function(){n.$element.off("."+n.type).removeData("bs."+n.type);n.$tip&&n.$tip.detach();n.$tip=null;n.$arrow=null;n.$viewport=null;n.$element=null})};i=n.fn.tooltip;n.fn.tooltip=r;n.fn.tooltip.Constructor=t;n.fn.tooltip.noConflict=function(){return n.fn.tooltip=i,this}}(jQuery);+function(n){"use strict";function r(i){return this.each(function(){var u=n(this),r=u.data("bs.popover"),f="object"==typeof i&&i;!r&&/destroy|hide/.test(i)||(r||u.data("bs.popover",r=new t(this,f)),"string"==typeof i&&r[i]())})}var t=function(n,t){this.init("popover",n,t)},i;if(!n.fn.tooltip)throw new Error("Popover requires tooltip.js");t.VERSION="3.3.7";t.DEFAULTS=n.extend({},n.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"><\/div><h3 class="popover-title"><\/h3><div class="popover-content"><\/div><\/div>'});t.prototype=n.extend({},n.fn.tooltip.Constructor.prototype);t.prototype.constructor=t;t.prototype.getDefaults=function(){return t.DEFAULTS};t.prototype.setContent=function(){var n=this.tip(),i=this.getTitle(),t=this.getContent();n.find(".popover-title")[this.options.html?"html":"text"](i);n.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof t?"html":"append":"text"](t);n.removeClass("fade top bottom left right in");n.find(".popover-title").html()||n.find(".popover-title").hide()};t.prototype.hasContent=function(){return this.getTitle()||this.getContent()};t.prototype.getContent=function(){var t=this.$element,n=this.options;return t.attr("data-content")||("function"==typeof n.content?n.content.call(t[0]):n.content)};t.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};i=n.fn.popover;n.fn.popover=r;n.fn.popover.Constructor=t;n.fn.popover.noConflict=function(){return n.fn.popover=i,this}}(jQuery);+function(n){"use strict";function t(i,r){this.$body=n(document.body);this.$scrollElement=n(n(i).is(document.body)?window:i);this.options=n.extend({},t.DEFAULTS,r);this.selector=(this.options.target||"")+" .nav li > a";this.offsets=[];this.targets=[];this.activeTarget=null;this.scrollHeight=0;this.$scrollElement.on("scroll.bs.scrollspy",n.proxy(this.process,this));this.refresh();this.process()}function i(i){return this.each(function(){var u=n(this),r=u.data("bs.scrollspy"),f="object"==typeof i&&i;r||u.data("bs.scrollspy",r=new t(this,f));"string"==typeof i&&r[i]()})}t.VERSION="3.3.7";t.DEFAULTS={offset:10};t.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)};t.prototype.refresh=function(){var t=this,i="offset",r=0;this.offsets=[];this.targets=[];this.scrollHeight=this.getScrollHeight();n.isWindow(this.$scrollElement[0])||(i="position",r=this.$scrollElement.scrollTop());this.$body.find(this.selector).map(function(){var f=n(this),u=f.data("target")||f.attr("href"),t=/^#./.test(u)&&n(u);return t&&t.length&&t.is(":visible")&&[[t[i]().top+r,u]]||null}).sort(function(n,t){return n[0]-t[0]}).each(function(){t.offsets.push(this[0]);t.targets.push(this[1])})};t.prototype.process=function(){var n,i=this.$scrollElement.scrollTop()+this.options.offset,f=this.getScrollHeight(),e=this.options.offset+f-this.$scrollElement.height(),t=this.offsets,r=this.targets,u=this.activeTarget;if(this.scrollHeight!=f&&this.refresh(),i>=e)return u!=(n=r[r.length-1])&&this.activate(n);if(u&&i<t[0])return this.activeTarget=null,this.clear();for(n=t.length;n--;)u!=r[n]&&i>=t[n]&&(void 0===t[n+1]||i<t[n+1])&&this.activate(r[n])};t.prototype.activate=function(t){this.activeTarget=t;this.clear();var r=this.selector+'[data-target="'+t+'"],'+this.selector+'[href="'+t+'"]',i=n(r).parents("li").addClass("active");i.parent(".dropdown-menu").length&&(i=i.closest("li.dropdown").addClass("active"));i.trigger("activate.bs.scrollspy")};t.prototype.clear=function(){n(this.selector).parentsUntil(this.options.target,".active").removeClass("active")};var r=n.fn.scrollspy;n.fn.scrollspy=i;n.fn.scrollspy.Constructor=t;n.fn.scrollspy.noConflict=function(){return n.fn.scrollspy=r,this};n(window).on("load.bs.scrollspy.data-api",function(){n('[data-spy="scroll"]').each(function(){var t=n(this);i.call(t,t.data())})})}(jQuery);+function(n){"use strict";function r(i){return this.each(function(){var u=n(this),r=u.data("bs.tab");r||u.data("bs.tab",r=new t(this));"string"==typeof i&&r[i]()})}var t=function(t){this.element=n(t)},u,i;t.VERSION="3.3.7";t.TRANSITION_DURATION=150;t.prototype.show=function(){var t=this.element,f=t.closest("ul:not(.dropdown-menu)"),i=t.data("target"),u;if(i||(i=t.attr("href"),i=i&&i.replace(/.*(?=#[^\s]*$)/,"")),!t.parent("li").hasClass("active")){var r=f.find(".active:last a"),e=n.Event("hide.bs.tab",{relatedTarget:t[0]}),o=n.Event("show.bs.tab",{relatedTarget:r[0]});(r.trigger(e),t.trigger(o),o.isDefaultPrevented()||e.isDefaultPrevented())||(u=n(i),this.activate(t.closest("li"),f),this.activate(u,u.parent(),function(){r.trigger({type:"hidden.bs.tab",relatedTarget:t[0]});t.trigger({type:"shown.bs.tab",relatedTarget:r[0]})}))}};t.prototype.activate=function(i,r,u){function e(){f.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1);i.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0);o?(i[0].offsetWidth,i.addClass("in")):i.removeClass("fade");i.parent(".dropdown-menu").length&&i.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0);u&&u()}var f=r.find("> .active"),o=u&&n.support.transition&&(f.length&&f.hasClass("fade")||!!r.find("> .fade").length);f.length&&o?f.one("bsTransitionEnd",e).emulateTransitionEnd(t.TRANSITION_DURATION):e();f.removeClass("in")};u=n.fn.tab;n.fn.tab=r;n.fn.tab.Constructor=t;n.fn.tab.noConflict=function(){return n.fn.tab=u,this};i=function(t){t.preventDefault();r.call(n(this),"show")};n(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',i).on("click.bs.tab.data-api",'[data-toggle="pill"]',i)}(jQuery);+function(n){"use strict";function i(i){return this.each(function(){var u=n(this),r=u.data("bs.affix"),f="object"==typeof i&&i;r||u.data("bs.affix",r=new t(this,f));"string"==typeof i&&r[i]()})}var t=function(i,r){this.options=n.extend({},t.DEFAULTS,r);this.$target=n(this.options.target).on("scroll.bs.affix.data-api",n.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",n.proxy(this.checkPositionWithEventLoop,this));this.$element=n(i);this.affixed=null;this.unpin=null;this.pinnedOffset=null;this.checkPosition()},r;t.VERSION="3.3.7";t.RESET="affix affix-top affix-bottom";t.DEFAULTS={offset:0,target:window};t.prototype.getState=function(n,t,i,r){var u=this.$target.scrollTop(),f=this.$element.offset(),e=this.$target.height();if(null!=i&&"top"==this.affixed)return u<i&&"top";if("bottom"==this.affixed)return null!=i?!(u+this.unpin<=f.top)&&"bottom":!(u+e<=n-r)&&"bottom";var o=null==this.affixed,s=o?u:f.top,h=o?e:t;return null!=i&&u<=i?"top":null!=r&&s+h>=n-r&&"bottom"};t.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(t.RESET).addClass("affix");var n=this.$target.scrollTop(),i=this.$element.offset();return this.pinnedOffset=i.top-n};t.prototype.checkPositionWithEventLoop=function(){setTimeout(n.proxy(this.checkPosition,this),1)};t.prototype.checkPosition=function(){var i,e,o;if(this.$element.is(":visible")){var s=this.$element.height(),r=this.options.offset,f=r.top,u=r.bottom,h=Math.max(n(document).height(),n(document.body).height());if("object"!=typeof r&&(u=f=r),"function"==typeof f&&(f=r.top(this.$element)),"function"==typeof u&&(u=r.bottom(this.$element)),i=this.getState(h,s,f,u),this.affixed!=i){if(null!=this.unpin&&this.$element.css("top",""),e="affix"+(i?"-"+i:""),o=n.Event(e+".bs.affix"),this.$element.trigger(o),o.isDefaultPrevented())return;this.affixed=i;this.unpin="bottom"==i?this.getPinnedOffset():null;this.$element.removeClass(t.RESET).addClass(e).trigger(e.replace("affix","affixed")+".bs.affix")}"bottom"==i&&this.$element.offset({top:h-s-u})}};r=n.fn.affix;n.fn.affix=i;n.fn.affix.Constructor=t;n.fn.affix.noConflict=function(){return n.fn.affix=r,this};n(window).on("load",function(){n('[data-spy="affix"]').each(function(){var r=n(this),t=r.data();t.offset=t.offset||{};null!=t.offsetBottom&&(t.offset.bottom=t.offsetBottom);null!=t.offsetTop&&(t.offset.top=t.offsetTop);i.call(r,t)})})}(jQuery);!function(n,t){void 0===n&&void 0!==window&&(n=window);"function"==typeof define&&define.amd?define(["jquery"],function(n){return t(n)}):"object"==typeof module&&module.exports?module.exports=t(require("jquery")):t(n.jQuery)}(this,function(n){!function(n){"use strict";function ni(t,i){var r=t.nodeName.toLowerCase();if(-1!==n.inArray(r,i))return-1===n.inArray(r,kt)||Boolean(t.nodeValue.match(dt)||t.nodeValue.match(gt));for(var f=n(i).filter(function(n,t){return t instanceof RegExp}),u=0,e=f.length;u<e;u++)if(r.match(f[u]))return!0;return!1}function g(n,t,i){var r,e,s;if(i&&"function"==typeof i)return i(n);for(var l=Object.keys(t),u=0,a=n.length;u<a;u++)for(var h=n[u].querySelectorAll("*"),f=0,v=h.length;f<v;f++)if(r=h[f],e=r.nodeName.toLowerCase(),-1!==l.indexOf(e))for(var c=[].slice.call(r.attributes),y=[].concat(t["*"]||[],t[e]||[]),o=0,p=c.length;o<p;o++)s=c[o],ni(s,y)||r.removeAttribute(s.nodeName);else r.parentNode.removeChild(r)}function ut(n){var r,u,i;if(null==this)throw new TypeError;if(r=String(this),n&&"[object RegExp]"==nt.call(n))throw new TypeError;var f=r.length,e=String(n),o=e.length,s=1<arguments.length?arguments[1]:void 0,t=s?Number(s):0;if(t!=t&&(t=0),u=Math.min(Math.max(t,0),f),f<o+u)return!1;for(i=-1;++i<o;)if(r.charCodeAt(u+i)!=e.charCodeAt(i))return!1;return!0}function ft(n,t){var i,u=n.selectedOptions,f=[],r,e;if(t){for(r=0,e=u.length;r<e;r++)(i=u[r]).disabled||"OPTGROUP"===i.parentNode.tagName&&i.parentNode.disabled||f.push(i);return f}return u}function l(n,t){for(var i,r=[],f=t||n.selectedOptions,u=0,e=f.length;u<e;u++)(i=f[u]).disabled||"OPTGROUP"===i.parentNode.tagName&&i.parentNode.disabled||r.push(i.value);return n.multiple?r:r.length?r[0]:null}function ot(n,t,i,r){for(var e,u,o=["display","subtext","tokens"],s=!1,f=0;f<o.length;f++)if(e=o[f],u=n[e],u&&(u=u.toString(),"display"===e&&(u=u.replace(/<[^>]+>/g,"")),r&&(u=st(u)),u=u.toUpperCase(),s="contains"===i?0<=u.indexOf(t):u.startsWith(t)))break;return s}function e(n){return parseInt(n,10)||0}function ui(n){return ti[n]}function st(n){return(n=n.toString())&&n.replace(ii,ui).replace(ri,"")}function fi(n){return p[n]}function yt(i){var s,h=arguments,r=i,e,o,c;if([].shift.apply(h),!f.success){try{f.full=(n.fn.dropdown.Constructor.VERSION||"").split(" ")[0].split(".")}catch(i){u.BootstrapVersion?f.full=u.BootstrapVersion.split(" ")[0].split("."):(f.full=[f.major,"0","0"],console.warn("There was an issue retrieving Bootstrap's version. Ensure Bootstrap is being loaded before bootstrap-select and there is no namespace collision. If loading Bootstrap asynchronously, the version may need to be manually specified via $.fn.selectpicker.Constructor.BootstrapVersion.",i))}f.major=f.full[0];f.success=!0}if("4"===f.major)for(e=[],u.DEFAULTS.style===t.BUTTONCLASS&&e.push({name:"style",className:"BUTTONCLASS"}),u.DEFAULTS.iconBase===t.ICONBASE&&e.push({name:"iconBase",className:"ICONBASE"}),u.DEFAULTS.tickIcon===t.TICKICON&&e.push({name:"tickIcon",className:"TICKICON"}),t.DIVIDER="dropdown-divider",t.SHOW="show",t.BUTTONCLASS="btn-light",t.POPOVERHEADER="popover-header",t.ICONBASE="",t.TICKICON="bs-ok-default",o=0;o<e.length;o++)i=e[o],u.DEFAULTS[i.name]=t[i.className];return c=this.each(function(){var e=n(this),t,i,o,f,c,l;if(e.is("select")){if(t=e.data("selectpicker"),i="object"==typeof r&&r,t){if(i)for(o in i)Object.prototype.hasOwnProperty.call(i,o)&&(t.options[o]=i[o])}else{f=e.data();for(c in f)Object.prototype.hasOwnProperty.call(f,c)&&-1!==n.inArray(c,bt)&&delete f[c];l=n.extend({},u.DEFAULTS,n.fn.selectpicker.defaults||{},f,i);l.template=n.extend({},u.DEFAULTS.template,n.fn.selectpicker.defaults?n.fn.selectpicker.defaults.template:{},f.template,i.template);e.data("selectpicker",t=new u(this,l))}"string"==typeof r&&(s=t[r]instanceof Function?t[r].apply(t,h):t.options[r])}}),void 0!==s?s:c}function wt(){if(n.fn.dropdown)return(n.fn.dropdown.Constructor._dataApiKeydownHandler||n.fn.dropdown.Constructor.prototype.keydown).apply(this,arguments)}var bt=["sanitize","whiteList","sanitizeFn"],kt=["background","cite","href","itemtype","longdesc","poster","src","xlink:href"],dt=/^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi,gt=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+/]+=*$/i,y,nt,h,tt,it,rt,c,s,et,p,w,ht,ct,a,pt;"classList"in document.createElement("_")||function(t){var r;if("Element"in t){var u="classList",e="prototype",f=t.Element[e],i=Object,o=function(){var t=n(this);return{add:function(n){return n=Array.prototype.slice.call(arguments).join(" "),t.addClass(n)},remove:function(n){return n=Array.prototype.slice.call(arguments).join(" "),t.removeClass(n)},toggle:function(n,i){return t.toggleClass(n,i)},contains:function(n){return t.hasClass(n)}}};if(i.defineProperty){r={get:o,enumerable:!0,configurable:!0};try{i.defineProperty(f,u,r)}catch(t){void 0!==t.number&&-2146823252!==t.number||(r.enumerable=!1,i.defineProperty(f,u,r))}}else i[e].__defineGetter__&&f.__defineGetter__(u,o)}}(window);h=document.createElement("_");(h.classList.add("c1","c2"),h.classList.contains("c2"))||(tt=DOMTokenList.prototype.add,it=DOMTokenList.prototype.remove,DOMTokenList.prototype.add=function(){Array.prototype.forEach.call(arguments,tt.bind(this))},DOMTokenList.prototype.remove=function(){Array.prototype.forEach.call(arguments,it.bind(this))});(h.classList.toggle("c3",!1),h.classList.contains("c3"))&&(rt=DOMTokenList.prototype.toggle,DOMTokenList.prototype.toggle=function(n,t){return 1 in arguments&&!this.contains(n)==!t?t:rt.call(this,n)});h=null;String.prototype.startsWith||(y=function(){try{var n={},t=Object.defineProperty,i=t(n,n,n)&&t}catch(n){}return i}(),nt={}.toString,y?y(String.prototype,"startsWith",{value:ut,configurable:!0,writable:!0}):String.prototype.startsWith=ut);Object.keys||(Object.keys=function(n,t,i){for(t in i=[],n)i.hasOwnProperty.call(n,t)&&i.push(t);return i});HTMLSelectElement&&!HTMLSelectElement.prototype.hasOwnProperty("selectedOptions")&&Object.defineProperty(HTMLSelectElement.prototype,"selectedOptions",{get:function(){return this.querySelectorAll(":checked")}});c={useDefault:!1,_set:n.valHooks.select.set};n.valHooks.select.set=function(t,i){return i&&!c.useDefault&&n(t).data("selected",!0),c._set.apply(this,arguments)};s=null;et=function(){try{return new Event("change"),!0}catch(n){return!1}}();n.fn.triggerNative=function(n){var t,i=this[0];i.dispatchEvent?(et?t=new Event(n,{bubbles:!0}):(t=document.createEvent("Event")).initEvent(n,!0,!1),i.dispatchEvent(t)):i.fireEvent?((t=document.createEventObject()).eventType=n,i.fireEvent("on"+n,t)):this.trigger(n)};var ti={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","Ĳ":"IJ","ĳ":"ij","Œ":"Oe","œ":"oe","ŉ":"'n","ſ":"s"},ii=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ri=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\u1ab0-\\u1aff\\u1dc0-\\u1dff]","g");a=(p={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},w="(?:"+Object.keys(p).join("|")+")",ht=RegExp(w),ct=RegExp(w,"g"),function(n){return n=null==n?"":""+n,ht.test(n)?n.replace(ct,fi):n});var ei={32:" ",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",65:"A",66:"B",67:"C",68:"D",69:"E",70:"F",71:"G",72:"H",73:"I",74:"J",75:"K",76:"L",77:"M",78:"N",79:"O",80:"P",81:"Q",82:"R",83:"S",84:"T",85:"U",86:"V",87:"W",88:"X",89:"Y",90:"Z",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9"},lt=27,oi=13,v=32,b=9,k=38,d=40,f={success:!1,major:"3"};try{f.full=(n.fn.dropdown.Constructor.VERSION||"").split(" ")[0].split(".");f.major=f.full[0];f.success=!0}catch(e){}var at=0,r=".bs.select",t={DISABLED:"disabled",DIVIDER:"divider",SHOW:"open",DROPUP:"dropup",MENU:"dropdown-menu",MENURIGHT:"dropdown-menu-right",MENULEFT:"dropdown-menu-left",BUTTONCLASS:"btn-default",POPOVERHEADER:"popover-title",ICONBASE:"glyphicon",TICKICON:"glyphicon-ok"},vt={MENU:"."+t.MENU},i={div:document.createElement("div"),span:document.createElement("span"),i:document.createElement("i"),subtext:document.createElement("small"),a:document.createElement("a"),li:document.createElement("li"),whitespace:document.createTextNode(" "),fragment:document.createDocumentFragment()};i.noResults=i.li.cloneNode(!1);i.noResults.className="no-results";i.a.setAttribute("role","option");i.a.className="dropdown-item";i.subtext.className="text-muted";i.text=i.span.cloneNode(!1);i.text.className="text";i.checkMark=i.span.cloneNode(!1);var si=new RegExp(k+"|"+d),hi=new RegExp("^"+b+"$|"+lt),o={li:function(n,t,r){var u=i.li.cloneNode(!1);return n&&(1===n.nodeType||11===n.nodeType?u.appendChild(n):u.innerHTML=n),void 0!==t&&""!==t&&(u.className=t),null!=r&&u.classList.add("optgroup-"+r),u},a:function(n,t,r){var u=i.a.cloneNode(!0);return n&&(11===n.nodeType?u.appendChild(n):u.insertAdjacentHTML("beforeend",n)),void 0!==t&&""!==t&&u.classList.add.apply(u.classList,t.split(/\s+/)),r&&u.setAttribute("style",r),u},text:function(n,t){var u,f,r=i.text.cloneNode(!1),e;if(n.content?r.innerHTML=n.content:((r.textContent=n.text,n.icon)&&(e=i.whitespace.cloneNode(!1),(f=(!0===t?i.i:i.span).cloneNode(!1)).className=this.options.iconBase+" "+n.icon,i.fragment.appendChild(f),i.fragment.appendChild(e)),n.subtext&&((u=i.subtext.cloneNode(!1)).textContent=n.subtext,r.appendChild(u))),!0===t)for(;0<r.childNodes.length;)i.fragment.appendChild(r.childNodes[0]);else i.fragment.appendChild(r);return i.fragment},label:function(n){var r,u,t=i.text.cloneNode(!1),f;return(t.innerHTML=n.display,n.icon)&&(f=i.whitespace.cloneNode(!1),(u=i.span.cloneNode(!1)).className=this.options.iconBase+" "+n.icon,i.fragment.appendChild(u),i.fragment.appendChild(f)),n.subtext&&((r=i.subtext.cloneNode(!1)).textContent=n.subtext,t.appendChild(r)),i.fragment.appendChild(t),i.fragment}},u=function(t,i){var f=this,r;c.useDefault||(n.valHooks.select.set=c._set,c.useDefault=!0);this.$element=n(t);this.$newElement=null;this.$button=null;this.$menu=null;this.options=i;this.selectpicker={main:{},search:{},current:{},view:{},isSearching:!1,keydown:{keyHistory:"",resetKeyHistory:{start:function(){return setTimeout(function(){f.selectpicker.keydown.keyHistory=""},800)}}}};this.sizeInfo={};null===this.options.title&&(this.options.title=this.$element.attr("title"));r=this.options.windowPadding;"number"==typeof r&&(this.options.windowPadding=[r,r,r,r]);this.val=u.prototype.val;this.render=u.prototype.render;this.refresh=u.prototype.refresh;this.setStyle=u.prototype.setStyle;this.selectAll=u.prototype.selectAll;this.deselectAll=u.prototype.deselectAll;this.destroy=u.prototype.destroy;this.remove=u.prototype.remove;this.show=u.prototype.show;this.hide=u.prototype.hide;this.init()};u.VERSION="1.13.18";u.DEFAULTS={noneSelectedText:"Nothing selected",noneResultsText:"No results matched {0}",countSelectedText:function(n){return 1==n?"{0} item selected":"{0} items selected"},maxOptionsText:function(n,t){return[1==n?"Limit reached ({n} item max)":"Limit reached ({n} items max)",1==t?"Group limit reached ({n} item max)":"Group limit reached ({n} items max)"]},selectAllText:"Select All",deselectAllText:"Deselect All",doneButton:!1,doneButtonText:"Close",multipleSeparator:", ",styleBase:"btn",style:t.BUTTONCLASS,size:"auto",title:null,selectedTextFormat:"values",width:!1,container:!1,hideDisabled:!1,showSubtext:!1,showIcon:!0,showContent:!0,dropupAuto:!0,header:!1,liveSearch:!1,liveSearchPlaceholder:null,liveSearchNormalize:!1,liveSearchStyle:"contains",actionsBox:!1,iconBase:t.ICONBASE,tickIcon:t.TICKICON,showTick:!1,template:{caret:'<span class="caret"><\/span>'},maxOptions:!1,mobile:!1,selectOnTab:!1,dropdownAlignRight:!1,windowPadding:0,virtualScroll:600,display:!1,sanitize:!0,sanitizeFn:null,whiteList:{"*":["class","dir","id","lang","role","tabindex","style",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]}};u.prototype={constructor:u,init:function(){var n=this,f=this.$element.attr("id"),i=this.$element[0],u=i.form;at++;this.selectId="bs-select-"+at;i.classList.add("bs-select-hidden");this.multiple=this.$element.prop("multiple");this.autofocus=this.$element.prop("autofocus");i.classList.contains("show-tick")&&(this.options.showTick=!0);this.$newElement=this.createDropdown();this.buildData();this.$element.after(this.$newElement).prependTo(this.$newElement);u&&null===i.form&&(u.id||(u.id="form-"+this.selectId),i.setAttribute("form",u.id));this.$button=this.$newElement.children("button");this.$menu=this.$newElement.children(vt.MENU);this.$menuInner=this.$menu.children(".inner");this.$searchbox=this.$menu.find("input");i.classList.remove("bs-select-hidden");!0===this.options.dropdownAlignRight&&this.$menu[0].classList.add(t.MENURIGHT);void 0!==f&&this.$button.attr("data-id",f);this.checkDisabled();this.clickListener();this.options.liveSearch?(this.liveSearchListener(),this.focusedParent=this.$searchbox[0]):this.focusedParent=this.$menuInner[0];this.setStyle();this.render();this.setWidth();this.options.container?this.selectPosition():this.$element.on("hide"+r,function(){if(n.isVirtual()){var t=n.$menuInner[0],i=t.firstChild.cloneNode(!1);t.replaceChild(i,t.firstChild);t.scrollTop=0}});this.$menu.data("this",this);this.$newElement.data("this",this);this.options.mobile&&this.mobile();this.$newElement.on({"hide.bs.dropdown":function(t){n.$element.trigger("hide"+r,t)},"hidden.bs.dropdown":function(t){n.$element.trigger("hidden"+r,t)},"show.bs.dropdown":function(t){n.$element.trigger("show"+r,t)},"shown.bs.dropdown":function(t){n.$element.trigger("shown"+r,t)}});i.hasAttribute("required")&&this.$element.on("invalid"+r,function(){n.$button[0].classList.add("bs-invalid");n.$element.on("shown"+r+".invalid",function(){n.$element.val(n.$element.val()).off("shown"+r+".invalid")}).on("rendered"+r,function(){this.validity.valid&&n.$button[0].classList.remove("bs-invalid");n.$element.off("rendered"+r)});n.$button.on("blur"+r,function(){n.$element.trigger("focus").trigger("blur");n.$button.off("blur"+r)})});setTimeout(function(){n.buildList();n.$element.trigger("loaded"+r)})},createDropdown:function(){var h=this.multiple||this.options.showTick?" show-tick":"",c=this.multiple?' aria-multiselectable="true"':"",i="",l=this.autofocus?" autofocus":"";f.major<4&&this.$element.parent().hasClass("input-group")&&(i=" input-group-btn");var r,u="",e="",o="",s="";return this.options.header&&(u='<div class="'+t.POPOVERHEADER+'"><button type="button" class="close" aria-hidden="true">&times;<\/button>'+this.options.header+"<\/div>"),this.options.liveSearch&&(e='<div class="bs-searchbox"><input type="search" class="form-control" autocomplete="off"'+(null===this.options.liveSearchPlaceholder?"":' placeholder="'+a(this.options.liveSearchPlaceholder)+'"')+' role="combobox" aria-label="Search" aria-controls="'+this.selectId+'" aria-autocomplete="list"><\/div>'),this.multiple&&this.options.actionsBox&&(o='<div class="bs-actionsbox"><div class="btn-group btn-group-sm btn-block"><button type="button" class="actions-btn bs-select-all btn '+t.BUTTONCLASS+'">'+this.options.selectAllText+'<\/button><button type="button" class="actions-btn bs-deselect-all btn '+t.BUTTONCLASS+'">'+this.options.deselectAllText+"<\/button><\/div><\/div>"),this.multiple&&this.options.doneButton&&(s='<div class="bs-donebutton"><div class="btn-group btn-block"><button type="button" class="btn btn-sm '+t.BUTTONCLASS+'">'+this.options.doneButtonText+"<\/button><\/div><\/div>"),r='<div class="dropdown bootstrap-select'+h+i+'"><button type="button" tabindex="-1" class="'+this.options.styleBase+' dropdown-toggle" '+("static"===this.options.display?'data-display="static"':"")+'data-toggle="dropdown"'+l+' role="combobox" aria-owns="'+this.selectId+'" aria-haspopup="listbox" aria-expanded="false"><div class="filter-option"><div class="filter-option-inner"><div class="filter-option-inner-inner"><\/div><\/div> <\/div>'+("4"===f.major?"":'<span class="bs-caret">'+this.options.template.caret+"<\/span>")+'<\/button><div class="'+t.MENU+" "+("4"===f.major?"":t.SHOW)+'">'+u+e+o+'<div class="inner '+t.SHOW+'" role="listbox" id="'+this.selectId+'" tabindex="-1" '+c+'><ul class="'+t.MENU+" inner "+("4"===f.major?t.SHOW:"")+'" role="presentation"><\/ul><\/div>'+s+"<\/div><\/div>",n(r)},setPositionData:function(){var t,n,i;for(this.selectpicker.view.canHighlight=[],this.selectpicker.view.size=0,this.selectpicker.view.firstHighlightIndex=!1,t=0;t<this.selectpicker.current.data.length;t++)n=this.selectpicker.current.data[t],i=!0,"divider"===n.type?(i=!1,n.height=this.sizeInfo.dividerHeight):"optgroup-label"===n.type?(i=!1,n.height=this.sizeInfo.dropdownHeaderHeight):n.height=this.sizeInfo.liHeight,n.disabled&&(i=!1),this.selectpicker.view.canHighlight.push(i),i&&(this.selectpicker.view.size++,n.posinset=this.selectpicker.view.size,!1===this.selectpicker.view.firstHighlightIndex&&(this.selectpicker.view.firstHighlightIndex=t)),n.position=(0===t?0:this.selectpicker.current.data[t-1].position)+n.height},isVirtual:function(){return!1!==this.options.virtualScroll&&this.selectpicker.main.elements.length>=this.options.virtualScroll||!0===this.options.virtualScroll},createView:function(i,u,f){function a(n,t){var c,l,rt,ut,s,b,ft,et,f=e.selectpicker.current.elements.length,k=[],ot=!0,o=e.isVirtual(),r,a,at,vt,w,nt,tt,it,yt,h;for(e.selectpicker.view.scrollTop=n,c=Math.ceil(e.sizeInfo.menuInnerHeight/e.sizeInfo.liHeight*1.5),l=Math.round(f/c)||1,r=0;r<l;r++){if(a=(r+1)*c,r===l-1&&(a=f),k[r]=[r*c+(r?1:0),a],!f)break;void 0===s&&n-1<=e.selectpicker.current.data[a-1].position-e.sizeInfo.menuInnerHeight&&(s=r)}if(void 0===s&&(s=0),b=[e.selectpicker.view.position0,e.selectpicker.view.position1],rt=Math.max(0,s-1),ut=Math.min(l-1,s+1),e.selectpicker.view.position0=!1===o?0:Math.max(0,k[rt][0])||0,e.selectpicker.view.position1=!1===o?f:Math.min(f,k[ut][1])||0,ft=b[0]!==e.selectpicker.view.position0||b[1]!==e.selectpicker.view.position1,void 0!==e.activeIndex&&(y=e.selectpicker.main.elements[e.prevActiveIndex],p=e.selectpicker.main.elements[e.activeIndex],v=e.selectpicker.main.elements[e.selectedIndex],t&&(e.activeIndex!==e.selectedIndex&&e.defocusItem(p),e.activeIndex=void 0),e.activeIndex&&e.activeIndex!==e.selectedIndex&&e.defocusItem(v)),void 0!==e.prevActiveIndex&&e.prevActiveIndex!==e.activeIndex&&e.prevActiveIndex!==e.selectedIndex&&e.defocusItem(y),(t||ft)&&(et=e.selectpicker.view.visibleElements?e.selectpicker.view.visibleElements.slice():[],e.selectpicker.view.visibleElements=!1===o?e.selectpicker.current.elements:e.selectpicker.current.elements.slice(e.selectpicker.view.position0,e.selectpicker.view.position1),e.setOptionStatus(),(i||!1===o&&t)&&(ot=!function(n,t){return n.length===t.length&&n.every(function(n,i){return n===t[i]})}(et,e.selectpicker.view.visibleElements)),(t||!0===o)&&ot)){var st,ht,u=e.$menuInner[0],ct=document.createDocumentFragment(),pt=u.firstChild.cloneNode(!1),lt=e.selectpicker.view.visibleElements,d=[];for(u.replaceChild(pt,u.firstChild),r=0,at=lt.length;r<at;r++)nt=lt[r],e.options.sanitize&&(vt=nt.lastChild)&&(w=e.selectpicker.current.data[r+e.selectpicker.view.position0])&&w.content&&!w.sanitized&&(d.push(vt),w.sanitized=!0),ct.appendChild(nt);(e.options.sanitize&&d.length&&g(d,e.options.whiteList,e.options.sanitizeFn),!0===o?(st=0===e.selectpicker.view.position0?0:e.selectpicker.current.data[e.selectpicker.view.position0-1].position,ht=e.selectpicker.view.position1>f-1?0:e.selectpicker.current.data[f-1].position-e.selectpicker.current.data[e.selectpicker.view.position1-1].position,u.firstChild.style.marginTop=st+"px",u.firstChild.style.marginBottom=ht+"px"):(u.firstChild.style.marginTop=0,u.firstChild.style.marginBottom=0),u.firstChild.appendChild(ct),!0===o&&e.sizeInfo.hasScrollBar)&&(tt=u.firstChild.offsetWidth,t&&tt<e.sizeInfo.menuInnerInnerWidth&&e.sizeInfo.totalMenuWidth>e.sizeInfo.selectWidth?u.firstChild.style.minWidth=e.sizeInfo.menuInnerInnerWidth+"px":tt>e.sizeInfo.menuInnerInnerWidth&&(e.$menu[0].style.minWidth=0,it=u.firstChild.offsetWidth,it>e.sizeInfo.menuInnerInnerWidth&&(e.sizeInfo.menuInnerInnerWidth=it,u.firstChild.style.minWidth=e.sizeInfo.menuInnerInnerWidth+"px"),e.$menu[0].style.minWidth=""))}(e.prevActiveIndex=e.activeIndex,e.options.liveSearch)?i&&t&&(h=0,e.selectpicker.view.canHighlight[h]||(h=1+e.selectpicker.view.canHighlight.slice(1).indexOf(!0)),yt=e.selectpicker.view.visibleElements[h],e.defocusItem(e.selectpicker.view.currentActive),e.activeIndex=(e.selectpicker.current.data[h]||{}).index,e.focusItem(yt)):e.$menuInner.trigger("focus")}var v,y,e=this,o=0,p=[],s,h,c,l;(this.selectpicker.isSearching=i,this.selectpicker.current=i?this.selectpicker.search:this.selectpicker.main,this.setPositionData(),u)&&(f?o=this.$menuInner[0].scrollTop:e.multiple||(s=e.$element[0],h=(s.options[s.selectedIndex]||{}).liIndex,"number"==typeof h&&!1!==e.options.size&&(c=e.selectpicker.main.data[h],l=c&&c.position,l&&(o=l-(e.sizeInfo.menuInnerHeight+e.sizeInfo.liHeight)/2))));a(o,!0);this.$menuInner.off("scroll.createView").on("scroll.createView",function(n,t){e.noScroll||a(this.scrollTop,t);e.noScroll=!1});n(window).off("resize"+r+"."+this.selectId+".createView").on("resize"+r+"."+this.selectId+".createView",function(){e.$newElement.hasClass(t.SHOW)&&a(e.$menuInner[0].scrollTop)})},focusItem:function(n,t,i){if(n){t=t||this.selectpicker.main.data[this.activeIndex];var r=n.firstChild;r&&(r.setAttribute("aria-setsize",this.selectpicker.view.size),r.setAttribute("aria-posinset",t.posinset),!0!==i&&(this.focusedParent.setAttribute("aria-activedescendant",r.id),n.classList.add("active"),r.classList.add("active")))}},defocusItem:function(n){n&&(n.classList.remove("active"),n.firstChild&&n.firstChild.classList.remove("active"))},setPlaceholder:function(){var i=this,r=!1;if(this.options.title&&!this.multiple){this.selectpicker.view.titleOption||(this.selectpicker.view.titleOption=document.createElement("option"));r=!0;var n=this.$element[0],u=!1,f=!this.selectpicker.view.titleOption.parentNode,e=n.selectedIndex,o=n.options[e],t=window.performance&&window.performance.getEntriesByType("navigation"),s=t&&t.length?"back_forward"!==t[0].type:2!==window.performance.navigation.type;f&&(this.selectpicker.view.titleOption.className="bs-title-option",this.selectpicker.view.titleOption.value="",u=!o||0===e&&!1===o.defaultSelected&&void 0===this.$element.data("selected"));!f&&0===this.selectpicker.view.titleOption.index||n.insertBefore(this.selectpicker.view.titleOption,n.firstChild);u&&s?n.selectedIndex=0:"complete"!==document.readyState&&window.addEventListener("pageshow",function(){i.selectpicker.view.displayedValue!==n.value&&i.render()})}return r},buildData:function(){function f(t){var i=n[n.length-1];i&&"divider"===i.type&&(i.optID||t.optID)||((t=t||{}).type="divider",n.push(t))}function s(t,i){if((i=i||{}).divider="true"===t.getAttribute("data-divider"),i.divider)f({optID:i.optID});else{var u=n.length,e=t.style.cssText,o=e?a(e):"",r=(t.className||"")+(i.optgroupClass||"");i.optID&&(r="opt "+r);i.optionClass=r.trim();i.inlineStyle=o;i.text=t.textContent;i.content=t.getAttribute("data-content");i.tokens=t.getAttribute("data-tokens");i.subtext=t.getAttribute("data-subtext");i.icon=t.getAttribute("data-icon");t.liIndex=u;i.display=i.content||i.text;i.type="option";i.index=u;i.option=t;i.selected=!!t.selected;i.disabled=i.disabled||!!t.disabled;n.push(i)}}function c(t,r){var e=r[t],b=!(t-1<o)&&r[t-1],k=r[t+1],l=e.querySelectorAll("option"+u),y,p,h,c,v,w;if(l.length){for(h={display:a(e.label),subtext:e.getAttribute("data-subtext"),icon:e.getAttribute("data-icon"),type:"optgroup-label",optgroupClass:" "+(e.className||"")},i++,b&&f({optID:i}),h.optID=i,n.push(h),c=0,v=l.length;c<v;c++)w=l[c],0===c&&(p=(y=n.length-1)+v),s(w,{headerIndex:y,lastIndex:p,optID:h.optID,optgroupClass:h.optgroupClass,disabled:e.disabled});k&&f({optID:i})}}var u=':not([hidden]):not([data-hidden="true"])',n=[],i=0,o=this.setPlaceholder()?1:0,r,h,t,e;for(this.options.hideDisabled&&(u+=":not(:disabled)"),r=this.$element[0].querySelectorAll("select > *"+u),h=r.length,t=o;t<h;t++)e=r[t],"OPTGROUP"!==e.tagName?s(e,{}):c(t,r);this.selectpicker.main.data=this.selectpicker.current.data=n},buildList:function(){function h(i){var u,f=0;switch(i.type){case"divider":u=o.li(!1,t.DIVIDER,i.optID?i.optID+"div":void 0);break;case"option":(u=o.li(o.a(o.text.call(n,i),i.optionClass,i.inlineStyle),"",i.optID)).firstChild&&(u.firstChild.id=n.selectId+"-"+i.index);break;case"optgroup-label":u=o.li(o.label.call(n,i),"dropdown-header"+i.optgroupClass,i.optID)}i.element=u;r.push(u);i.display&&(f+=i.display.length);i.subtext&&(f+=i.subtext.length);i.icon&&(f+=1);e<f&&(e=f,n.selectpicker.view.widestOption=r[r.length-1])}var n=this,f=this.selectpicker.main.data,r=[],e=0,s,u;for((n.options.showTick||n.multiple)&&!i.checkMark.parentNode&&(i.checkMark.className=this.options.iconBase+" "+n.options.tickIcon+" check-mark",i.a.appendChild(i.checkMark)),s=f.length,u=0;u<s;u++)h(f[u]);this.selectpicker.main.elements=this.selectpicker.current.elements=r},findLis:function(){return this.$menuInner.find(".inner > li")},render:function(){var b,t=this,y=this.$element[0],rt=this.setPlaceholder()&&0===y.selectedIndex,a=ft(y,this.options.hideDisabled),u=a.length,e=this.$button[0],k=e.querySelector(".filter-option-inner-inner"),ut=document.createTextNode(this.options.multipleSeparator),n=i.fragment.cloneNode(!1),tt=!1,s,v,d,it,nt,w;if(e.classList.toggle("bs-placeholder",t.multiple?!u:!l(y,a)),t.multiple||1!==a.length||(t.selectpicker.view.displayedValue=l(y,a)),"static"===this.options.selectedTextFormat)n=o.text.call(this,{text:this.options.title},!0);else if(!1===(this.multiple&&-1!==this.options.selectedTextFormat.indexOf("count")&&1<u&&(1<(b=this.options.selectedTextFormat.split(">")).length&&u>b[1]||1===b.length&&2<=u))){if(!rt){for(s=0;s<u&&s<50;s++){var p=a[s],h=this.selectpicker.main.data[p.liIndex],c={};this.multiple&&0<s&&n.appendChild(ut.cloneNode(!1));p.title?c.text=p.title:h&&(h.content&&t.options.showContent?(c.content=h.content.toString(),tt=!0):(t.options.showIcon&&(c.icon=h.icon),t.options.showSubtext&&!t.multiple&&h.subtext&&(c.subtext=" "+h.subtext),c.text=p.textContent.trim()));n.appendChild(o.text.call(this,c,!0))}49<u&&n.appendChild(document.createTextNode("..."))}}else v=':not([hidden]):not([data-hidden="true"]):not([data-divider="true"])',this.options.hideDisabled&&(v+=":not(:disabled)"),d=this.$element[0].querySelectorAll("select > option"+v+", optgroup"+v+" option"+v).length,it="function"==typeof this.options.countSelectedText?this.options.countSelectedText(u,d):this.options.countSelectedText,n=o.text.call(this,{text:it.replace("{0}",u.toString()).replace("{1}",d.toString())},!0);(null==this.options.title&&(this.options.title=this.$element.attr("title")),n.childNodes.length||(n=o.text.call(this,{text:void 0!==this.options.title?this.options.title:this.options.noneSelectedText},!0)),e.title=n.textContent.replace(/<[^>]*>?/g,"").trim(),this.options.sanitize&&tt&&g([n],t.options.whiteList,t.options.sanitizeFn),k.innerHTML="",k.appendChild(n),f.major<4&&this.$newElement[0].classList.contains("bs3-has-addon"))&&(nt=e.querySelector(".filter-expand"),w=k.cloneNode(!0),w.className="filter-expand",nt?e.replaceChild(w,nt):e.appendChild(w));this.$element.trigger("rendered"+r)},setStyle:function(n,t){var u,i=this.$button[0],r=this.$newElement[0],e=this.options.style.trim();this.$element.attr("class")&&this.$newElement.addClass(this.$element.attr("class").replace(/selectpicker|mobile-device|bs-select-hidden|validate\[.*\]/gi,""));f.major<4&&(r.classList.add("bs3"),r.parentNode.classList&&r.parentNode.classList.contains("input-group")&&(r.previousElementSibling||r.nextElementSibling)&&(r.previousElementSibling||r.nextElementSibling).classList.contains("input-group-addon")&&r.classList.add("bs3-has-addon"));u=n?n.trim():e;"add"==t?u&&i.classList.add.apply(i.classList,u.split(" ")):"remove"==t?u&&i.classList.remove.apply(i.classList,u.split(" ")):(e&&i.classList.remove.apply(i.classList,e.split(" ")),u&&i.classList.add.apply(i.classList,u.split(" ")))},liHeight:function(r){var d,it,rt;if(r||!1!==this.options.size&&!Object.keys(this.sizeInfo).length){var l,a=i.div.cloneNode(!1),o=i.div.cloneNode(!1),y=i.div.cloneNode(!1),h=document.createElement("ul"),nt=i.li.cloneNode(!1),v=i.li.cloneNode(!1),tt=i.a.cloneNode(!1),p=i.span.cloneNode(!1),w=this.options.header&&0<this.$menu.find("."+t.POPOVERHEADER).length?this.$menu.find("."+t.POPOVERHEADER)[0].cloneNode(!0):null,c=this.options.liveSearch?i.div.cloneNode(!1):null,b=this.options.actionsBox&&this.multiple&&0<this.$menu.find(".bs-actionsbox").length?this.$menu.find(".bs-actionsbox")[0].cloneNode(!0):null,k=this.options.doneButton&&this.multiple&&0<this.$menu.find(".bs-donebutton").length?this.$menu.find(".bs-donebutton")[0].cloneNode(!0):null,ft=this.$element.find("option")[0];if(this.sizeInfo.selectWidth=this.$newElement[0].offsetWidth,p.className="text",tt.className="dropdown-item "+(ft?ft.className:""),a.className=this.$menu[0].parentNode.className+" "+t.SHOW,a.style.width=0,"auto"===this.options.width&&(o.style.minWidth=0),o.className=t.MENU+" "+t.SHOW,y.className="inner "+t.SHOW,h.className=t.MENU+" inner "+("4"===f.major?t.SHOW:""),nt.className=t.DIVIDER,v.className="dropdown-header",p.appendChild(document.createTextNode("​")),this.selectpicker.current.data.length){for(d=0;d<this.selectpicker.current.data.length;d++)if(it=this.selectpicker.current.data[d],"option"===it.type){l=it.element;break}}else l=i.li.cloneNode(!1),tt.appendChild(p),l.appendChild(tt);(v.appendChild(p.cloneNode(!0)),this.selectpicker.view.widestOption&&h.appendChild(this.selectpicker.view.widestOption.cloneNode(!0)),h.appendChild(l),h.appendChild(nt),h.appendChild(v),w&&o.appendChild(w),c)&&(rt=document.createElement("input"),c.className="bs-searchbox",rt.className="form-control",c.appendChild(rt),o.appendChild(c));b&&o.appendChild(b);y.appendChild(h);o.appendChild(y);k&&o.appendChild(k);a.appendChild(o);document.body.appendChild(a);var et,ot=l.offsetHeight,st=v?v.offsetHeight:0,ht=w?w.offsetHeight:0,ct=c?c.offsetHeight:0,lt=b?b.offsetHeight:0,at=k?k.offsetHeight:0,vt=n(nt).outerHeight(!0),u=!!window.getComputedStyle&&window.getComputedStyle(o),ut=o.offsetWidth,s=u?null:n(o),g={vert:e(u?u.paddingTop:s.css("paddingTop"))+e(u?u.paddingBottom:s.css("paddingBottom"))+e(u?u.borderTopWidth:s.css("borderTopWidth"))+e(u?u.borderBottomWidth:s.css("borderBottomWidth")),horiz:e(u?u.paddingLeft:s.css("paddingLeft"))+e(u?u.paddingRight:s.css("paddingRight"))+e(u?u.borderLeftWidth:s.css("borderLeftWidth"))+e(u?u.borderRightWidth:s.css("borderRightWidth"))},yt={vert:g.vert+e(u?u.marginTop:s.css("marginTop"))+e(u?u.marginBottom:s.css("marginBottom"))+2,horiz:g.horiz+e(u?u.marginLeft:s.css("marginLeft"))+e(u?u.marginRight:s.css("marginRight"))+2};y.style.overflowY="scroll";et=o.offsetWidth-ut;document.body.removeChild(a);this.sizeInfo.liHeight=ot;this.sizeInfo.dropdownHeaderHeight=st;this.sizeInfo.headerHeight=ht;this.sizeInfo.searchHeight=ct;this.sizeInfo.actionsHeight=lt;this.sizeInfo.doneButtonHeight=at;this.sizeInfo.dividerHeight=vt;this.sizeInfo.menuPadding=g;this.sizeInfo.menuExtras=yt;this.sizeInfo.menuWidth=ut;this.sizeInfo.menuInnerInnerWidth=ut-g.horiz;this.sizeInfo.totalMenuWidth=this.sizeInfo.menuWidth;this.sizeInfo.scrollBarWidth=et;this.sizeInfo.selectHeight=this.$newElement[0].offsetHeight;this.setPositionData()}},getSelectPosition:function(){var t,u=n(window),f=this.$newElement.offset(),i=n(this.options.container),r;this.options.container&&i.length&&!i.is("body")?((t=i.offset()).top+=parseInt(i.css("borderTopWidth")),t.left+=parseInt(i.css("borderLeftWidth"))):t={top:0,left:0};r=this.options.windowPadding;this.sizeInfo.selectOffsetTop=f.top-t.top-u.scrollTop();this.sizeInfo.selectOffsetBot=u.height()-this.sizeInfo.selectOffsetTop-this.sizeInfo.selectHeight-t.top-r[2];this.sizeInfo.selectOffsetLeft=f.left-t.left-u.scrollLeft();this.sizeInfo.selectOffsetRight=u.width()-this.sizeInfo.selectOffsetLeft-this.sizeInfo.selectWidth-t.left-r[1];this.sizeInfo.selectOffsetTop-=r[0];this.sizeInfo.selectOffsetLeft-=r[3]},setMenuSize:function(){var f;this.getSelectPosition();var r,n,e,o,s,h,y,u,b=this.sizeInfo.selectWidth,p=this.sizeInfo.liHeight,c=this.sizeInfo.headerHeight,l=this.sizeInfo.searchHeight,a=this.sizeInfo.actionsHeight,v=this.sizeInfo.doneButtonHeight,k=this.sizeInfo.dividerHeight,i=this.sizeInfo.menuPadding,w=0;if(this.options.dropupAuto&&(y=p*this.selectpicker.current.elements.length+i.vert,u=this.sizeInfo.selectOffsetTop-this.sizeInfo.selectOffsetBot>this.sizeInfo.menuExtras.vert&&y+this.sizeInfo.menuExtras.vert+50>this.sizeInfo.selectOffsetBot,!0===this.selectpicker.isSearching&&(u=this.selectpicker.dropup),this.$newElement.toggleClass(t.DROPUP,u),this.selectpicker.dropup=u),"auto"===this.options.size)o=3<this.selectpicker.current.elements.length?3*this.sizeInfo.liHeight+this.sizeInfo.menuExtras.vert-2:0,n=this.sizeInfo.selectOffsetBot-this.sizeInfo.menuExtras.vert,e=o+c+l+a+v,h=Math.max(o-i.vert,0),this.$newElement.hasClass(t.DROPUP)&&(n=this.sizeInfo.selectOffsetTop-this.sizeInfo.menuExtras.vert),r=(s=n)-c-l-a-v-i.vert;else if(this.options.size&&"auto"!=this.options.size&&this.selectpicker.current.elements.length>this.options.size){for(f=0;f<this.options.size;f++)"divider"===this.selectpicker.current.data[f].type&&w++;r=(n=p*this.options.size+w*k+i.vert)-i.vert;s=n+c+l+a+v;e=h=""}this.$menu.css({"max-height":s+"px",overflow:"hidden","min-height":e+"px"});this.$menuInner.css({"max-height":r+"px","overflow-y":"auto","min-height":h+"px"});this.sizeInfo.menuInnerHeight=Math.max(r,1);this.selectpicker.current.data.length&&this.selectpicker.current.data[this.selectpicker.current.data.length-1].position>this.sizeInfo.menuInnerHeight&&(this.sizeInfo.hasScrollBar=!0,this.sizeInfo.totalMenuWidth=this.sizeInfo.menuWidth+this.sizeInfo.scrollBarWidth);"auto"===this.options.dropdownAlignRight&&this.$menu.toggleClass(t.MENURIGHT,this.sizeInfo.selectOffsetLeft>this.sizeInfo.selectOffsetRight&&this.sizeInfo.selectOffsetRight<this.sizeInfo.totalMenuWidth-b);this.dropdown&&this.dropdown._popper&&this.dropdown._popper.update()},setSize:function(t){if(this.liHeight(t),this.options.header&&this.$menu.css("padding-top",0),!1!==this.options.size){var i=this,u=n(window);this.setMenuSize();this.options.liveSearch&&this.$searchbox.off("input.setMenuSize propertychange.setMenuSize").on("input.setMenuSize propertychange.setMenuSize",function(){return i.setMenuSize()});"auto"===this.options.size?u.off("resize"+r+"."+this.selectId+".setMenuSize scroll"+r+"."+this.selectId+".setMenuSize").on("resize"+r+"."+this.selectId+".setMenuSize scroll"+r+"."+this.selectId+".setMenuSize",function(){return i.setMenuSize()}):this.options.size&&"auto"!=this.options.size&&this.selectpicker.current.elements.length>this.options.size&&u.off("resize"+r+"."+this.selectId+".setMenuSize scroll"+r+"."+this.selectId+".setMenuSize")}this.createView(!1,!0,t)},setWidth:function(){var n=this;"auto"===this.options.width?requestAnimationFrame(function(){n.$menu.css("min-width","0");n.$element.on("loaded"+r,function(){n.liHeight();n.setMenuSize();var t=n.$newElement.clone().appendTo("body"),i=t.css("width","auto").children("button").outerWidth();t.remove();n.sizeInfo.selectWidth=Math.max(n.sizeInfo.totalMenuWidth,i);n.$newElement.css("width",n.sizeInfo.selectWidth+"px")})}):"fit"===this.options.width?(this.$menu.css("min-width",""),this.$newElement.css("width","").addClass("fit-width")):this.options.width?(this.$menu.css("min-width",""),this.$newElement.css("width",this.options.width)):(this.$menu.css("min-width",""),this.$newElement.css("width",""));this.$newElement.hasClass("fit-width")&&"fit"!==this.options.width&&this.$newElement[0].classList.remove("fit-width")},selectPosition:function(){function s(r){var s={},c=i.options.display||!!n.fn.dropdown.Constructor.Default&&n.fn.dropdown.Constructor.Default.display;i.$bsContainer.addClass(r.attr("class").replace(/form-control|fit-width/gi,"")).toggleClass(t.DROPUP,r.hasClass(t.DROPUP));o=r.offset();u.is("body")?e={top:0,left:0}:((e=u.offset()).top+=parseInt(u.css("borderTopWidth"))-u.scrollTop(),e.left+=parseInt(u.css("borderLeftWidth"))-u.scrollLeft());h=r.hasClass(t.DROPUP)?0:r[0].offsetHeight;(f.major<4||"static"===c)&&(s.top=o.top-e.top+h,s.left=o.left-e.left);s.width=r[0].offsetWidth;i.$bsContainer.css(s)}this.$bsContainer=n('<div class="bs-container" />');var o,e,h,i=this,u=n(this.options.container);this.$button.on("click.bs.dropdown.data-api",function(){i.isDisabled()||(s(i.$newElement),i.$bsContainer.appendTo(i.options.container).toggleClass(t.SHOW,!i.$button.hasClass(t.SHOW)).append(i.$menu))});n(window).off("resize"+r+"."+this.selectId+" scroll"+r+"."+this.selectId).on("resize"+r+"."+this.selectId+" scroll"+r+"."+this.selectId,function(){i.$newElement.hasClass(t.SHOW)&&s(i.$newElement)});this.$element.on("hide"+r,function(){i.$menu.data("height",i.$menu.height());i.$bsContainer.detach()})},setOptionStatus:function(n){var t=this,r,i,u;if(t.noScroll=!1,t.selectpicker.view.visibleElements&&t.selectpicker.view.visibleElements.length)for(r=0;r<t.selectpicker.view.visibleElements.length;r++)i=t.selectpicker.current.data[r+t.selectpicker.view.position0],u=i.option,u&&(!0!==n&&t.setDisabled(i.index,i.disabled),t.setSelected(i.index,u.selected))},setSelected:function(n,t){var u,i,r=this.selectpicker.main.elements[n],f=this.selectpicker.main.data[n],e=void 0!==this.activeIndex,o=this.activeIndex===n||t&&!this.multiple&&!e;f.selected=t;i=r.firstChild;t&&(this.selectedIndex=n);r.classList.toggle("selected",t);o?(this.focusItem(r,f),this.selectpicker.view.currentActive=r,this.activeIndex=n):this.defocusItem(r);i&&(i.classList.toggle("selected",t),t?i.setAttribute("aria-selected",!0):this.multiple?i.setAttribute("aria-selected",!1):i.removeAttribute("aria-selected"));o||e||!t||void 0===this.prevActiveIndex||(u=this.selectpicker.main.elements[this.prevActiveIndex],this.defocusItem(u))},setDisabled:function(n,i){var r,u=this.selectpicker.main.elements[n];this.selectpicker.main.data[n].disabled=i;r=u.firstChild;u.classList.toggle(t.DISABLED,i);r&&("4"===f.major&&r.classList.toggle(t.DISABLED,i),i?(r.setAttribute("aria-disabled",i),r.setAttribute("tabindex",-1)):(r.removeAttribute("aria-disabled"),r.setAttribute("tabindex",0)))},isDisabled:function(){return this.$element[0].disabled},checkDisabled:function(){this.isDisabled()?(this.$newElement[0].classList.add(t.DISABLED),this.$button.addClass(t.DISABLED).attr("aria-disabled",!0)):this.$button[0].classList.contains(t.DISABLED)&&(this.$newElement[0].classList.remove(t.DISABLED),this.$button.removeClass(t.DISABLED).attr("aria-disabled",!1))},clickListener:function(){function e(){i.options.liveSearch?i.$searchbox.trigger("focus"):i.$menuInner.trigger("focus")}function o(){i.dropdown&&i.dropdown._popper&&i.dropdown._popper.state.isCreated?e():requestAnimationFrame(o)}var i=this,u=n(document);u.data("spaceSelect",!1);this.$button.on("keyup",function(n){/(32)/.test(n.keyCode.toString(10))&&u.data("spaceSelect")&&(n.preventDefault(),u.data("spaceSelect",!1))});this.$newElement.on("show.bs.dropdown",function(){3<f.major&&!i.dropdown&&(i.dropdown=i.$button.data("bs.dropdown"),i.dropdown._menu=i.$menu[0])});this.$button.on("click.bs.dropdown.data-api",function(){i.$newElement.hasClass(t.SHOW)||i.setSize()});this.$element.on("shown"+r,function(){i.$menuInner[0].scrollTop!==i.selectpicker.view.scrollTop&&(i.$menuInner[0].scrollTop=i.selectpicker.view.scrollTop);3<f.major?requestAnimationFrame(o):e()});this.$menuInner.on("mouseenter","li a",function(){var n=this.parentElement,t=i.isVirtual()?i.selectpicker.view.position0:0,r=Array.prototype.indexOf.call(n.parentElement.children,n),u=i.selectpicker.current.data[r+t];i.focusItem(n,u,!0)});this.$menuInner.on("click","li a",function(u,f){var rt=n(this),c=i.$element[0],lt=i.isVirtual()?i.selectpicker.view.position0:0,ut=i.selectpicker.current.data[rt.parent().index()+lt],a=ut.index,at=l(c),et=c.selectedIndex,ot=c.options[et],w=!0,k,d,p,g;if(i.multiple&&1!==i.options.maxOptions&&u.stopPropagation(),u.preventDefault(),!i.isDisabled()&&!rt.parent().hasClass(t.DISABLED)){var h=ut.option,st=n(h),ht=h.selected,b=st.parent("optgroup"),ct=b.find("option"),e=i.options.maxOptions,o=b.data("maxOptions")||!1;if(a===i.activeIndex&&(f=!0),f||(i.prevActiveIndex=i.activeIndex,i.activeIndex=void 0),i.multiple){if((h.selected=!ht,i.setSelected(a,!ht),i.focusedParent.focus(),!1!==e||!1!==o)&&(k=e<ft(c).length,d=o<b.find("option:selected").length,e&&k||o&&d))if(e&&1==e)c.selectedIndex=-1,h.selected=!0,i.setOptionStatus(!0);else if(o&&1==o){for(p=0;p<ct.length;p++)g=ct[p],g.selected=!1,i.setSelected(g.liIndex,!1);h.selected=!0;i.setSelected(a,!0)}else{var nt="string"==typeof i.options.maxOptionsText?[i.options.maxOptionsText,i.options.maxOptionsText]:i.options.maxOptionsText,v="function"==typeof nt?nt(e,o):nt,tt=v[0].replace("{n}",e),it=v[1].replace("{n}",o),y=n('<div class="notify"><\/div>');v[2]&&(tt=tt.replace("{var}",v[2][1<e?0:1]),it=it.replace("{var}",v[2][1<o?0:1]));h.selected=!1;i.$menu.append(y);e&&k&&(y.append(n("<div>"+tt+"<\/div>")),w=!1,i.$element.trigger("maxReached"+r));o&&d&&(y.append(n("<div>"+it+"<\/div>")),w=!1,i.$element.trigger("maxReachedGrp"+r));setTimeout(function(){i.setSelected(a,!1)},10);y[0].classList.add("fadeOut");setTimeout(function(){y.remove()},1050)}}else ot&&(ot.selected=!1),h.selected=!0,i.setSelected(a,!0);!i.multiple||i.multiple&&1===i.options.maxOptions?i.$button.trigger("focus"):i.options.liveSearch&&i.$searchbox.trigger("focus");w&&(!i.multiple&&et===c.selectedIndex||(s=[h.index,st.prop("selected"),at],i.$element.triggerNative("change")))}});this.$menu.on("click","li."+t.DISABLED+" a, ."+t.POPOVERHEADER+", ."+t.POPOVERHEADER+" :not(.close)",function(t){t.currentTarget==this&&(t.preventDefault(),t.stopPropagation(),i.options.liveSearch&&!n(t.target).hasClass("close")?i.$searchbox.trigger("focus"):i.$button.trigger("focus"))});this.$menuInner.on("click",".divider, .dropdown-header",function(n){n.preventDefault();n.stopPropagation();i.options.liveSearch?i.$searchbox.trigger("focus"):i.$button.trigger("focus")});this.$menu.on("click","."+t.POPOVERHEADER+" .close",function(){i.$button.trigger("click")});this.$searchbox.on("click",function(n){n.stopPropagation()});this.$menu.on("click",".actions-btn",function(t){i.options.liveSearch?i.$searchbox.trigger("focus"):i.$button.trigger("focus");t.preventDefault();t.stopPropagation();n(this).hasClass("bs-select-all")?i.selectAll():i.deselectAll()});this.$button.on("focus"+r,function(n){var t=i.$element[0].getAttribute("tabindex");void 0!==t&&n.originalEvent&&n.originalEvent.isTrusted&&(this.setAttribute("tabindex",t),i.$element[0].setAttribute("tabindex",-1),i.selectpicker.view.tabindex=t)}).on("blur"+r,function(n){void 0!==i.selectpicker.view.tabindex&&n.originalEvent&&n.originalEvent.isTrusted&&(i.$element[0].setAttribute("tabindex",i.selectpicker.view.tabindex),this.setAttribute("tabindex",-1),i.selectpicker.view.tabindex=void 0)});this.$element.on("change"+r,function(){i.render();i.$element.trigger("changed"+r,s);s=null}).on("focus"+r,function(){i.options.mobile||i.$button[0].focus()})},liveSearchListener:function(){var n=this;this.$button.on("click.bs.dropdown.data-api",function(){n.$searchbox.val()&&(n.$searchbox.val(""),n.selectpicker.search.previousValue=void 0)});this.$searchbox.on("click.bs.dropdown.data-api focus.bs.dropdown.data-api touchend.bs.dropdown.data-api",function(n){n.stopPropagation()});this.$searchbox.on("input propertychange",function(){var e=n.$searchbox[0].value,t,r,h;if(n.selectpicker.search.elements=[],n.selectpicker.search.data=[],e){var o=[],s=e.toUpperCase(),u={},f=[],y=n._searchStyle(),c=n.options.liveSearchNormalize;for(c&&(s=st(s)),t=0;t<n.selectpicker.main.data.length;t++)r=n.selectpicker.main.data[t],u[t]||(u[t]=ot(r,s,y,c)),u[t]&&void 0!==r.headerIndex&&-1===f.indexOf(r.headerIndex)&&(0<r.headerIndex&&(u[r.headerIndex-1]=!0,f.push(r.headerIndex-1)),u[r.headerIndex]=!0,f.push(r.headerIndex),u[r.lastIndex+1]=!0),u[t]&&"optgroup-label"!==r.type&&f.push(t);for(t=0,h=f.length;t<h;t++){var l=f[t],p=f[t-1],v=(r=n.selectpicker.main.data[l],n.selectpicker.main.data[p]);("divider"!==r.type||"divider"===r.type&&v&&"divider"!==v.type&&h-1!==t)&&(n.selectpicker.search.data.push(r),o.push(n.selectpicker.main.elements[l]))}n.activeIndex=void 0;n.noScroll=!0;n.$menuInner.scrollTop(0);n.selectpicker.search.elements=o;n.createView(!0),function(n,t){n.length||(i.noResults.innerHTML=this.options.noneResultsText.replace("{0}",'"'+a(t)+'"'),this.$menuInner[0].firstChild.appendChild(i.noResults))}.call(n,o,e)}else n.selectpicker.search.previousValue&&(n.$menuInner.scrollTop(0),n.createView(!1));n.selectpicker.search.previousValue=e})},_searchStyle:function(){return this.options.liveSearchStyle||"contains"},val:function(n){var i=this.$element[0],f,u;return void 0===n?this.$element.val():(f=l(i),(s=[null,null,f],this.$element.val(n).trigger("changed"+r,s),this.$newElement.hasClass(t.SHOW))&&(this.multiple?this.setOptionStatus(!0):(u=(i.options[i.selectedIndex]||{}).liIndex,"number"==typeof u&&(this.setSelected(this.selectedIndex,!1),this.setSelected(u,!0)))),this.render(),s=null,this.$element)},changeAll:function(n){var t,u;if(this.multiple){void 0===n&&(n=!0);var i=this.$element[0],f=0,e=0,h=l(i);i.classList.add("bs-select-hidden");for(var r=0,o=this.selectpicker.current.data,c=o.length;r<c;r++)t=o[r],u=t.option,u&&!t.disabled&&"divider"!==t.type&&(t.selected&&f++,!0===(u.selected=n)&&e++);i.classList.remove("bs-select-hidden");f!==e&&(this.setOptionStatus(),s=[null,null,h],this.$element.triggerNative("change"))}},selectAll:function(){return this.changeAll(!0)},deselectAll:function(){return this.changeAll(!1)},toggle:function(n){(n=n||window.event)&&n.stopPropagation();this.$button.trigger("click.bs.dropdown.data-api")},keydown:function(i){var u,tt,f,o,a,s=n(this),ft=s.hasClass("dropdown-toggle"),r=(ft?s.closest(".dropdown"):s.closest(vt.MENU)).data("this"),p=r.findLis(),w=!1,it=i.which===b&&!ft&&!r.options.selectOnTab,et=si.test(i.which)||it,nt=r.$menuInner[0].scrollTop,e=!0===r.isVirtual()?r.selectpicker.view.position0:0,h,rt,y,c,g,ut,l;if(!(112<=i.which&&i.which<=123))if((tt=r.$newElement.hasClass(t.SHOW))||!(et||48<=i.which&&i.which<=57||96<=i.which&&i.which<=105||65<=i.which&&i.which<=90)||(r.$button.trigger("click.bs.dropdown.data-api"),!r.options.liveSearch)){if(i.which===lt&&tt&&(i.preventDefault(),r.$button.trigger("click.bs.dropdown.data-api").trigger("focus")),et){if(!p.length)return;-1!==(u=(f=r.selectpicker.main.elements[r.activeIndex])?Array.prototype.indexOf.call(f.parentElement.children,f):-1)&&r.defocusItem(f);i.which===k?(-1!==u&&u--,u+e<0&&(u+=p.length),r.selectpicker.view.canHighlight[u+e]||-1==(u=r.selectpicker.view.canHighlight.slice(0,u+e).lastIndexOf(!0)-e)&&(u=p.length-1)):i.which!==d&&!it||(++u+e>=r.selectpicker.view.canHighlight.length&&(u=r.selectpicker.view.firstHighlightIndex),r.selectpicker.view.canHighlight[u+e]||(u=u+1+r.selectpicker.view.canHighlight.slice(u+e+1).indexOf(!0)));i.preventDefault();h=e+u;i.which===k?0===e&&u===p.length-1?(r.$menuInner[0].scrollTop=r.$menuInner[0].scrollHeight,h=r.selectpicker.current.elements.length-1):w=(a=(o=r.selectpicker.current.data[h]).position-o.height)<nt:i.which!==d&&!it||(u===r.selectpicker.view.firstHighlightIndex?(r.$menuInner[0].scrollTop=0,h=r.selectpicker.view.firstHighlightIndex):w=nt<(a=(o=r.selectpicker.current.data[h]).position-r.sizeInfo.menuInnerHeight));f=r.selectpicker.current.elements[h];r.activeIndex=r.selectpicker.current.data[h].index;r.focusItem(f);r.selectpicker.view.currentActive=f;w&&(r.$menuInner[0].scrollTop=a);r.options.liveSearch?r.$searchbox.trigger("focus"):s.trigger("focus")}else if(!s.is("input")&&!hi.test(i.which)||i.which===v&&r.selectpicker.keydown.keyHistory){for(c=[],i.preventDefault(),r.selectpicker.keydown.keyHistory+=ei[i.which],r.selectpicker.keydown.resetKeyHistory.cancel&&clearTimeout(r.selectpicker.keydown.resetKeyHistory.cancel),r.selectpicker.keydown.resetKeyHistory.cancel=r.selectpicker.keydown.resetKeyHistory.start(),y=r.selectpicker.keydown.keyHistory,/^(.)\1+$/.test(y)&&(y=y.charAt(0)),g=0;g<r.selectpicker.current.data.length;g++)ut=r.selectpicker.current.data[g],ot(ut,y,"startsWith",!0)&&r.selectpicker.view.canHighlight[g]&&c.push(ut.index);c.length&&(l=0,p.removeClass("active").find("a").removeClass("active"),1===y.length&&(-1===(l=c.indexOf(r.activeIndex))||l===c.length-1?l=0:l++),rt=c[l],w=0<nt-(o=r.selectpicker.main.data[rt]).position?(a=o.position-o.height,!0):(a=o.position-r.sizeInfo.menuInnerHeight,o.position>nt+r.sizeInfo.menuInnerHeight),f=r.selectpicker.main.elements[rt],r.activeIndex=c[l],r.focusItem(f),f&&f.firstChild.focus(),w&&(r.$menuInner[0].scrollTop=a),s.trigger("focus"))}tt&&(i.which===v&&!r.selectpicker.keydown.keyHistory||i.which===oi||i.which===b&&r.options.selectOnTab)&&(i.which!==v&&i.preventDefault(),r.options.liveSearch&&i.which===v||(r.$menuInner.find(".active a").trigger("click",!0),s.trigger("focus"),r.options.liveSearch||(i.preventDefault(),n(document).data("spaceSelect",!0))))}else r.$searchbox.trigger("focus")},mobile:function(){this.options.mobile=!0;this.$element[0].classList.add("mobile-device")},refresh:function(){var t=n.extend({},this.options,this.$element.data());this.options=t;this.checkDisabled();this.buildData();this.setStyle();this.render();this.buildList();this.setWidth();this.setSize(!0);this.$element.trigger("refreshed"+r)},hide:function(){this.$newElement.hide()},show:function(){this.$newElement.show()},remove:function(){this.$newElement.remove();this.$element.remove()},destroy:function(){this.$newElement.before(this.$element).remove();this.$bsContainer?this.$bsContainer.remove():this.$menu.remove();this.selectpicker.view.titleOption&&this.selectpicker.view.titleOption.parentNode&&this.selectpicker.view.titleOption.parentNode.removeChild(this.selectpicker.view.titleOption);this.$element.off(r).removeData("selectpicker").removeClass("bs-select-hidden selectpicker");n(window).off(r+"."+this.selectId)}};pt=n.fn.selectpicker;n.fn.selectpicker=yt;n.fn.selectpicker.Constructor=u;n.fn.selectpicker.noConflict=function(){return n.fn.selectpicker=pt,this};n(document).off("keydown.bs.dropdown.data-api").on("keydown.bs.dropdown.data-api",':not(.bootstrap-select) > [data-toggle="dropdown"]',wt).on("keydown.bs.dropdown.data-api",":not(.bootstrap-select) > .dropdown-menu",wt).on("keydown"+r,'.bootstrap-select [data-toggle="dropdown"], .bootstrap-select [role="listbox"], .bootstrap-select .bs-searchbox input',u.prototype.keydown).on("focusin.modal",'.bootstrap-select [data-toggle="dropdown"], .bootstrap-select [role="listbox"], .bootstrap-select .bs-searchbox input',function(n){n.stopPropagation()});n(window).on("load"+r+".data-api",function(){n(".selectpicker").each(function(){var t=n(this);yt.call(t,t.data())})})}(n)})