From 05d3eb6557b62ac9770ae6ea6a4bde326e50f118 Mon Sep 17 00:00:00 2001 From: MarioRadu Date: Tue, 23 Jul 2024 10:53:51 +0300 Subject: [PATCH 01/10] replaced annotations with attributes Signed-off-by: MarioRadu --- .github/workflows/continuous-integration.yml | 0 .github/workflows/cs-tests.yml | 47 ---------------- .github/workflows/run-tests.yml | 53 ------------------ .github/workflows/static-analysis.yml | 46 --------------- .laminas-ci/pre-run.sh | 17 ++++++ composer.json | 2 +- config/config.php | 2 +- public/js/app.js | 14 ++--- src/App/src/Common/Message.php | 3 + src/App/src/ConfigProvider.php | 14 +++-- src/App/src/Controller/LanguageController.php | 56 ++++++++----------- .../src/Middleware/RememberMeMiddleware.php | 29 +++------- .../src/Middleware/TranslatorMiddleware.php | 18 ++---- src/App/src/Service/CookieService.php | 12 +--- src/App/src/Service/RecaptchaService.php | 8 +-- src/App/src/Service/TranslateService.php | 12 ++-- src/Contact/src/ConfigProvider.php | 14 +++-- .../src/Controller/ContactController.php | 28 +++++----- .../src/Repository/MessageRepository.php | 8 ++- .../Repository/MessageRepositoryInterface.php | 2 +- src/Contact/src/Service/MessageService.php | 17 +++--- src/Page/src/ConfigProvider.php | 6 +- src/Page/src/Controller/PageController.php | 14 ++--- .../src/Adapter/AuthenticationAdapter.php | 10 +--- src/User/src/ConfigProvider.php | 16 +++--- src/User/src/Controller/AccountController.php | 22 ++++---- src/User/src/Controller/UserController.php | 32 ++++------- src/User/src/Entity/UserIdentity.php | 13 +++++ .../EventListener/UserAvatarEventListener.php | 12 +--- .../src/InputFilter/UserDetailInputFilter.php | 4 +- src/User/src/Repository/UserRepository.php | 4 +- .../src/Repository/UserRoleRepository.php | 5 +- src/User/src/Service/UserRoleService.php | 12 +--- src/User/src/Service/UserService.php | 24 ++++---- src/User/src/Service/UserServiceInterface.php | 4 +- .../Middleware/RememberMeMiddlewareTest.php | 10 +--- 36 files changed, 198 insertions(+), 392 deletions(-) create mode 100644 .github/workflows/continuous-integration.yml delete mode 100644 .github/workflows/cs-tests.yml delete mode 100644 .github/workflows/run-tests.yml delete mode 100644 .github/workflows/static-analysis.yml create mode 100755 .laminas-ci/pre-run.sh diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml new file mode 100644 index 00000000..e69de29b diff --git a/.github/workflows/cs-tests.yml b/.github/workflows/cs-tests.yml deleted file mode 100644 index 55806c6b..00000000 --- a/.github/workflows/cs-tests.yml +++ /dev/null @@ -1,47 +0,0 @@ -on: - - push - -name: Run phpcs checks - -jobs: - mutation: - name: PHP ${{ matrix.php }}-${{ matrix.os }} - - runs-on: ${{ matrix.os }} - - strategy: - matrix: - os: - - ubuntu-latest - - php: - - "8.2" - - "8.3" - - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Install PHP - uses: shivammathur/setup-php@v2 - with: - php-version: "${{ matrix.php }}" - tools: composer:v2, cs2pr - coverage: none - - - name: Determine composer cache directory - run: echo "COMPOSER_CACHE_DIR=$(composer config cache-dir)" >> $GITHUB_ENV - - - name: Cache dependencies installed with composer - uses: actions/cache@v4 - with: - path: ${{ env.COMPOSER_CACHE_DIR }} - key: php${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }} - restore-keys: | - php${{ matrix.php }}-composer- - - - name: Install dependencies with composer - run: composer install --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi - - - name: Run phpcs checks - run: vendor/bin/phpcs diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml deleted file mode 100644 index 4e84eca4..00000000 --- a/.github/workflows/run-tests.yml +++ /dev/null @@ -1,53 +0,0 @@ -on: - - push - -name: Run PHPUnit tests - -jobs: - mutation: - name: PHP ${{ matrix.php }}-${{ matrix.os }} - - runs-on: ${{ matrix.os }} - - strategy: - matrix: - os: - - ubuntu-latest - - php: - - "8.2" - - "8.3" - - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Install PHP - uses: shivammathur/setup-php@v2 - with: - php-version: "${{ matrix.php }}" - tools: composer:v2, cs2pr - coverage: none - - - name: Determine composer cache directory - run: echo "COMPOSER_CACHE_DIR=$(composer config cache-dir)" >> $GITHUB_ENV - - - name: Cache dependencies installed with composer - uses: actions/cache@v4 - with: - path: ${{ env.COMPOSER_CACHE_DIR }} - key: php${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }} - restore-keys: | - php${{ matrix.php }}-composer- - - - name: Install dependencies with composer - run: composer install --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi - - - name: Setup project - run: | - mv config/autoload/local.php.dist config/autoload/local.php - mv config/autoload/mail.local.php.dist config/autoload/mail.local.php - mv config/autoload/local.test.php.dist config/autoload/local.test.php - - - name: Run unit tests - run: vendor/bin/phpunit --testsuite=UnitTests --testdox --colors=always diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml deleted file mode 100644 index 16d3bfce..00000000 --- a/.github/workflows/static-analysis.yml +++ /dev/null @@ -1,46 +0,0 @@ -on: - - push - -name: static analysis - -jobs: - mutation: - name: PHP ${{ matrix.php }}-${{ matrix.os }} - - runs-on: ${{ matrix.os }} - - strategy: - matrix: - os: - - ubuntu-latest - - php: - - "8.2" - - "8.3" - - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Install PHP - uses: shivammathur/setup-php@v2 - with: - php-version: "${{ matrix.php }}" - tools: composer:v2, cs2pr - coverage: none - - - name: Determine composer cache directory - run: echo "COMPOSER_CACHE_DIR=$(composer config cache-dir)" >> $GITHUB_ENV - - - name: Cache dependencies installed with composer - uses: actions/cache@v4 - with: - path: ${{ env.COMPOSER_CACHE_DIR }} - key: php${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }} - restore-keys: | - php${{ matrix.php }}-composer- - - name: Install dependencies with composer - run: composer install --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi - - - name: Static analysis - run: vendor/bin/psalm --no-cache --output-format=github --show-info=false --threads=4 --php-version="${{ matrix.php }}" diff --git a/.laminas-ci/pre-run.sh b/.laminas-ci/pre-run.sh new file mode 100755 index 00000000..5939032d --- /dev/null +++ b/.laminas-ci/pre-run.sh @@ -0,0 +1,17 @@ +JOB=$3 +PHP_VERSION=$4 +COMMAND=$(echo "${JOB}" | jq -r '.command') + +echo "Running pre-run $COMMAND" + +if [[ ${COMMAND} =~ phpunit ]];then + + apt-get install php"${PHP_VERSION}"-sqlite3 + + cp config/autoload/local.php.dist config/autoload/local.php + cp config/autoload/mail.local.php.dist config/autoload/mail.local.php + cp config/autoload/local.test.php.dist config/autoload/local.test.php + + echo 'running if' + +fi \ No newline at end of file diff --git a/composer.json b/composer.json index 281a8f10..b8295924 100644 --- a/composer.json +++ b/composer.json @@ -47,7 +47,7 @@ "ext-curl": "*", "ext-gettext": "*", "ext-json": "*", - "dotkernel/dot-annotated-services": "^4.1.6", + "dotkernel/dot-dependency-injection": "^1.0.0", "dotkernel/dot-authorization": "^3.4.1", "dotkernel/dot-controller": "^3.4.3", "dotkernel/dot-data-fixtures": "^1.1.3", diff --git a/config/config.php b/config/config.php index e60695fb..e6e298ff 100644 --- a/config/config.php +++ b/config/config.php @@ -38,7 +38,7 @@ class_exists(\Mezzio\Swoole\ConfigProvider::class) \Laminas\Form\ConfigProvider::class, \Dot\Log\ConfigProvider::class, \Dot\ErrorHandler\ConfigProvider::class, - \Dot\AnnotatedServices\ConfigProvider::class, + \Dot\DependencyInjection\ConfigProvider::class, \Dot\Twig\ConfigProvider::class, \Dot\FlashMessenger\ConfigProvider::class, \Dot\Rbac\ConfigProvider::class, diff --git a/public/js/app.js b/public/js/app.js index 0d45ade1..bd26176d 100644 --- a/public/js/app.js +++ b/public/js/app.js @@ -1,23 +1,23 @@ -(()=>{var e={927:()=>{$(document).ready((function(){let e={previewTemplates:{image:'
\n
{caption}\n
\n
\n'},layoutTemplates:{footer:""},showRemove:!1,showUpload:!1,showCancel:!1,initialPreviewShowDelete:!1,dropZoneEnabled:!1,required:!1,showClose:!1,browseClass:"btn btn-default",browseLabel:"Browse",removeClass:"btn btn-default",uploadClass:"btn btn-default",allowedFileTypes:["image"],showUploadedThumbs:!1,maxFileSize:1e4,maxFilePreviewSize:1e4},t=$(".img-input"),i=t.data("url"),n=t.data("preview");e.uploadUrl=i,e.defaultPreviewContent='
\n
\n
\n
\n',t.fileinput(e);let r=document.querySelector(".kv-fileinput-caption");r.style.height="86px",r.style.marginTop="33px",t.on("fileuploaded",(function(e,t,i,n){$(this).fileinput("reset"),$(".file-preview-frame").find("img").attr("src",t.response.imageUrl)})),t.on("change",(function(){$(".img-input").fileinput("upload")}))}))},132:()=>{$(document).ready((function(){$(".open-button").on("click",(function(e){e.preventDefault();let t=$("#contact-form-container");$.ajax({type:"GET",url:"/contact/form"}).done((function(e){t.replaceWith(e),document.getElementById("contact-form-yb-frontend").style.display="block"})).fail((function(e){e.status,window.toastr.error(translateText("Something went wrong! Please try again!"))}))})),$(".cancel").on("click",(function(){document.getElementById("contact-form-yb-frontend").style.display="none"})),$("#send-expert-contact-form").on("click",(function(e){e.preventDefault();let t=$("#contact_form");$.ajax({type:"POST",url:"/contact/save-contact-message",data:$(t).serialize()}).done((function(e){"success"===e.message.type?($('input[name="email"]').val(""),$('input[name="name"]').val(""),$('textarea[name="message"]').val(""),document.getElementById("contact-form-yb-frontend").style.display="none",window.toastr.success(translateText(e.message.text))):window.toastr.error(translateText(e.message.text))})).fail((function(e){switch(e.status){case 422:let t=JSON.parse(translateText(e.responseText));window.toastr.error(t);break;case 401:let i=JSON.parse(translateText(e.responseText));redirectTo(i.redirect);break;default:window.toastr.error(translateText("Unexpected error. Please try again!"))}}))}))})),window.validateContactUsForm=function(){event.preventDefault(),$(".contactUsFormErrors").hide();var e=!0;if(!$(".g-recaptcha")[0].dataset.sitekey)return e=!1,$("#contactUsErrors").show(),$("#recaptchaSiteKeyEmpty").show(),!1;""==$("#contact_form #name").val()&&(e=!1,$("#contactUsErrors").show(),$("#contactUsEmptyName").show()),""==$("#contact_form #email").val()&&(e=!1,$("#contactUsErrors").show(),$("#contactUsEmptyEmail").show()),""==$("#contact_form #message").val()&&(e=!1,$("#contactUsErrors").show(),$("#contactUsEmptyText").show()),1==e&&grecaptcha.execute()},window.submitContactUsForm=function(){$("#contact_form").submit()}},692:()=>{$(document).ready((function(){$(document).on("click",".language-container .language-active",(function(){$(".language-list").slideToggle("fast")})),$(document).on("click",".language-container .language",(function(){let e=$(this),t=$(this).data("language-key"),i=e.find("img").attr("src");$(".language-container .language-active").find("img").attr("src",i),$(".language-list").slideToggle("fast"),$(".language-list .language").removeClass("active"),$.post("/language/change",{languageKey:t}).done((function(){e.addClass("active"),location.reload()}))}))}))},629:()=>{$(document).ready((function(){$(".collapse-menu").on("click",(function(){$(".profile-action-menu").slideToggle()}))}))},838:(e,t,i)=>{var n,r,o; +(()=>{var e={927:()=>{$(document).ready((function(){let e={previewTemplates:{image:'
\n
{caption}\n
\n
\n'},layoutTemplates:{footer:""},showRemove:!1,showUpload:!1,showCancel:!1,initialPreviewShowDelete:!1,dropZoneEnabled:!1,required:!1,showClose:!1,browseClass:"btn btn-default",browseLabel:"Browse",removeClass:"btn btn-default",uploadClass:"btn btn-default",allowedFileTypes:["image"],showUploadedThumbs:!1,maxFileSize:1e4,maxFilePreviewSize:1e4},t=$(".img-input"),i=t.data("url"),n=t.data("preview");e.uploadUrl=i,e.defaultPreviewContent='
\n
\n
\n
\n',t.fileinput(e);let r=document.querySelector(".kv-fileinput-caption");r.style.height="86px",r.style.marginTop="33px",t.on("fileuploaded",(function(e,t,i,n){$(this).fileinput("reset"),$(".file-preview-frame").find("img").attr("src",t.response.imageUrl)})),t.on("change",(function(){$(".img-input").fileinput("upload")}))}))},132:()=>{$(document).ready((function(){$(".open-button").on("click",(function(e){e.preventDefault();let t=$("#contact-form-container");$.ajax({type:"GET",url:"/contact/form"}).done((function(e){t.replaceWith(e),document.getElementById("contact-form-yb-frontend").style.display="block"})).fail((function(e){e.status,window.toastr.error(translateText("Something went wrong! Please try again!"))}))})),$(".cancel").on("click",(function(){document.getElementById("contact-form-yb-frontend").style.display="none"})),$("#send-expert-contact-form").on("click",(function(e){e.preventDefault();let t=$("#contact_form");$.ajax({type:"POST",url:"/contact/save-contact-message",data:$(t).serialize()}).done((function(e){"success"===e.message.type?($('input[name="email"]').val(""),$('input[name="name"]').val(""),$('textarea[name="message"]').val(""),document.getElementById("contact-form-yb-frontend").style.display="none",window.toastr.success(translateText(e.message.text))):window.toastr.error(translateText(e.message.text))})).fail((function(e){switch(e.status){case 422:let t=JSON.parse(translateText(e.responseText));window.toastr.error(t);break;case 401:let i=JSON.parse(translateText(e.responseText));redirectTo(i.redirect);break;default:window.toastr.error(translateText("Unexpected error. Please try again!"))}}))}))})),window.validateContactUsForm=function(){event.preventDefault(),$(".contactUsFormErrors").hide();var e=!0;if(!$(".g-recaptcha")[0].dataset.sitekey)return e=!1,$("#contactUsErrors").show(),$("#recaptchaSiteKeyEmpty").show(),!1;""==$("#contact_form #name").val()&&(e=!1,$("#contactUsErrors").show(),$("#contactUsEmptyName").show()),""==$("#contact_form #email").val()&&(e=!1,$("#contactUsErrors").show(),$("#contactUsEmptyEmail").show()),""==$("#contact_form #message").val()&&(e=!1,$("#contactUsErrors").show(),$("#contactUsEmptyText").show()),1==e&&grecaptcha.execute()},window.submitContactUsForm=function(){$("#contact_form").submit()}},692:()=>{$(document).ready((function(){$(document).on("click",".language-container .language-active",(function(){$(".language-list").slideToggle("fast")})),$(document).on("click",".language-container .language",(function(){let e=$(this),t=$(this).data("language-key"),i=e.find("img").attr("src");$(".language-container .language-active").find("img").attr("src",i),$(".language-list").slideToggle("fast"),$(".language-list .language").removeClass("active"),$.post("/language/change",{languageKey:t}).done((function(){e.addClass("active"),location.reload()}))}))}))},629:()=>{$(document).ready((function(){$(".collapse-menu").on("click",(function(){$(".profile-action-menu").slideToggle()}))}))},838:(e,t,n)=>{var r,o,s; /*! - * bootstrap-fileinput v5.5.2 + * bootstrap-fileinput v5.5.4 * http://plugins.krajee.com/file-input * * Author: Kartik Visweswaran - * Copyright: 2014 - 2022, Kartik Visweswaran, Krajee.com + * Copyright: 2014 - 2024, Kartik Visweswaran, Krajee.com * * Licensed under the BSD-3-Clause * https://github.com/kartik-v/bootstrap-fileinput/blob/master/LICENSE.md - */!function(s){"use strict";r=[i(616)],n=function(e){e.fn.fileinputLocales={},e.fn.fileinputThemes={},e.fn.fileinputBsVersion||(e.fn.fileinputBsVersion=window.bootstrap&&window.bootstrap.Alert&&window.bootstrap.Alert.VERSION||window.Alert&&window.Alert.VERSION||"3.x.x");String.prototype.setTokens=function(e){var t,i,n=this.toString();for(t in e)e.hasOwnProperty(t)&&(i=new RegExp("{"+t+"}","g"),n=n.replace(i,e[t]));return n},Array.prototype.flatMap||(Array.prototype.flatMap=function(e){return[].concat(this.map(e))});var t,i;t={FRAMES:".kv-preview-thumb",SORT_CSS:"file-sortable",INIT_FLAG:"init-",SCRIPT_SRC:document&&document.currentScript&&document.currentScript.src||null,OBJECT_PARAMS:'\n\n\n\n\n\n',DEFAULT_PREVIEW:'
\n{previewFileIcon}\n
',MODAL_ID:"kvFileinputModal",MODAL_EVENTS:["show","shown","hide","hidden","loaded"],logMessages:{ajaxError:"{status}: {error}. Error Details: {text}.",badDroppedFiles:"Error scanning dropped files!",badExifParser:"Error loading the piexif.js library. {details}",badInputType:'The input "type" must be set to "file" for initializing the "bootstrap-fileinput" plugin.',exifWarning:'To avoid this warning, either set "autoOrientImage" to "false" OR ensure you have loaded the "piexif.js" library correctly on your page before the "fileinput.js" script.',invalidChunkSize:'Invalid upload chunk size: "{chunkSize}". Resumable uploads are disabled.',invalidThumb:'Invalid thumb frame with id: "{id}".',noResumableSupport:"The browser does not support resumable or chunk uploads.",noUploadUrl:'The "uploadUrl" is not set. Ajax uploads and resumable uploads have been disabled.',retryStatus:"Retrying upload for chunk # {chunk} for {filename}... retry # {retry}.",chunkQueueError:"Could not push task to ajax pool for chunk index # {index}.",resumableMaxRetriesReached:"Maximum resumable ajax retries ({n}) reached.",resumableRetryError:"Could not retry the resumable request (try # {n})... aborting.",resumableAborting:"Aborting / cancelling the resumable request.",resumableRequestError:"Error processing resumable request. {msg}"},objUrl:window.URL||window.webkitURL,getZoomPlaceholder:function(){var e,i=t.SCRIPT_SRC,n="?kvTemp__2873389129__=";return i?(e=i.substring(0,i.lastIndexOf("/"))).substring(0,e.lastIndexOf("/")+1)+"img/loading.gif"+n:n},isBs:function(t){var i=e.trim((e.fn.fileinputBsVersion||"")+"");return t=parseInt(t,10),i?t===parseInt(i.charAt(0),10):4===t},defaultButtonCss:function(e){return"btn-default btn-"+(e?"":"outline-")+"secondary"},now:function(){return(new Date).getTime()},round:function(e){return e=parseFloat(e),isNaN(e)?0:Math.floor(Math.round(e))},getArray:function(e){var t,i=[],n=e&&e.length||0;for(t=0;t0&&(r+=(r?" ":"")+t+e.substring(0,1))})),r},debounce:function(e,t){var i;return function(){var n=arguments,r=this;clearTimeout(i),i=setTimeout((function(){e.apply(r,n)}),t)}},stopEvent:function(e){e.stopPropagation(),e.preventDefault()},getFileName:function(e){return e&&(e.fileName||e.name)||""},createObjectURL:function(e){return t.objUrl&&t.objUrl.createObjectURL&&e?t.objUrl.createObjectURL(e):""},revokeObjectURL:function(e){t.objUrl&&t.objUrl.revokeObjectURL&&e&&t.objUrl.revokeObjectURL(e)},compare:function(e,t,i){return void 0!==e&&(i?e===t:e.match(t))},isIE:function(e){var t,i;return"Microsoft Internet Explorer"===navigator.appName&&(10===e?new RegExp("msie\\s"+e,"i").test(navigator.userAgent):((t=document.createElement("div")).innerHTML="\x3c!--[if IE "+e+"]> 0&&e[0].webkitGetAsEntry())for(t=0;t=0?atob(e.split(",")[1]):decodeURIComponent(e.split(",")[1]),n=new ArrayBuffer(i.length),r=new Uint8Array(n),o=0;o>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:s+=String.fromCharCode(i);break;case 12:case 13:n=o[a++],s+=String.fromCharCode((31&i)<<6|63&n);break;case 14:n=o[a++],r=o[a++],s+=String.fromCharCode((15&i)<<12|(63&n)<<6|(63&r)<<0)}return s},isHtml:function(e){var t=document.createElement("div");t.innerHTML=e;for(var i=t.childNodes,n=i.length;n--;)if(1===i[n].nodeType)return!0;return!1},isPdf:function(e){return!t.isEmpty(e)&&(0!==(e=e.toString().trim().replace(/\n/g," ")).length&&void 0)},isSvg:function(e){return!t.isEmpty(e)&&(0!==(e=e.toString().trim().replace(/\n/g," ")).length&&(e.match(/^\s*<\?xml/i)&&(e.match(/"+t+""))},uniqId:function(){return((new Date).getTime()+Math.floor(Math.random()*Math.pow(10,15))).toString(36)},cspBuffer:{CSP_ATTRIB:"data-csp-01928735",domElementsStyles:{},stash:function(i){var n=this,r=e.parseHTML("
"+i+"
"),o=e(r);return o.find("[style]").each((function(i,r){var o=e(r),s=o[0].style,a=t.uniqId(),l={};s&&s.length&&(e(s).each((function(){l[this]=s[this]})),n.domElementsStyles[a]=l,o.removeAttr("style").attr(n.CSP_ATTRIB,a))})),o.filter("*").removeAttr("style"),(Object.values?Object.values(r):Object.keys(r).map((function(e){return r[e]}))).flatMap((function(e){return e.innerHTML})).join("")},apply:function(t){var i=this;e(t).find("["+i.CSP_ATTRIB+"]").each((function(t,n){var r=e(n),o=r.attr(i.CSP_ATTRIB),s=i.domElementsStyles[o];s&&r.css(s),r.removeAttr(i.CSP_ATTRIB)})),i.domElementsStyles={}}},setHtml:function(e,i){var n=t.cspBuffer;return e.html(n.stash(i)),n.apply(e),e},htmlEncode:function(e,t){return void 0===e?t||null:e.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")},replaceTags:function(t,i){var n=t;return i?(e.each(i,(function(e,t){"function"==typeof t&&(t=t()),n=n.split(e).join(t)})),n):n},cleanMemory:function(e){var i=e.is("img")?e.attr("src"):e.find("source").attr("src");t.revokeObjectURL(i)},findFileName:function(e){var t=e.lastIndexOf("/");return-1===t&&(t=e.lastIndexOf("\\")),e.split(e.substring(t,t+1)).pop()},checkFullScreen:function(){return document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||document.msFullscreenElement},toggleFullScreen:function(e){var i=document,n=i.documentElement,r=t.checkFullScreen();n&&e&&!r?n.requestFullscreen?n.requestFullscreen():n.msRequestFullscreen?n.msRequestFullscreen():n.mozRequestFullScreen?n.mozRequestFullScreen():n.webkitRequestFullscreen&&n.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT):r&&(i.exitFullscreen?i.exitFullscreen():i.msExitFullscreen?i.msExitFullscreen():i.mozCancelFullScreen?i.mozCancelFullScreen():i.webkitExitFullscreen&&i.webkitExitFullscreen())},moveArray:function(t,i,n,r){var o=e.extend(!0,[],t);if(r&&o.reverse(),n>=o.length)for(var s=n-o.length;1+s--;)o.push(void 0);return o.splice(n,0,o.splice(i,1)[0]),r&&o.reverse(),o},closeButton:function(e){return'"},getRotation:function(e){switch(e){case 2:return"rotateY(180deg)";case 3:return"rotate(180deg)";case 4:return"rotate(180deg) rotateY(180deg)";case 5:return"rotate(270deg) rotateY(180deg)";case 6:return"rotate(90deg)";case 7:return"rotate(90deg) rotateY(180deg)";case 8:return"rotate(270deg)";default:return""}},setTransform:function(e,t){e&&(e.style.transform=t,e.style.webkitTransform=t,e.style["-moz-transform"]=t,e.style["-ms-transform"]=t,e.style["-o-transform"]=t)},getObjectKeys:function(t){var i=[];return t&&e.each(t,(function(e){i.push(e)})),i},getObjectSize:function(e){return t.getObjectKeys(e).length},whenAll:function(i){var n,r,o,s,a,l,c=[].slice,u=1===arguments.length&&t.isArray(i)?i:c.call(arguments),d=e.Deferred(),h=0,p=u.length,f=p;for(o=s=a=Array(p),l=function(e,t,i){return function(){i!==u&&h++,d.notifyWith(t[e]=this,i[e]=c.call(arguments)),--f||d[(h?"reject":"resolve")+"With"](t,i)}},n=0;n0&&l.maxTotalFileCount10?t-10:Math.ceil(t/2),e=t;e>i;e--)r=parseFloat(s.bpsLog[e]),n++;s.bps=64*(n>0?r/n:0)}),d),o={fileId:e,started:a,elapsed:l,loaded:n,total:r,bps:s.bps,bitrate:i._getSize(s.bps,!1,i.bitRateUnits),pendingBytes:u},e?s.stats[e]=o:s.stats=o,o},exists:function(t){return-1!==e.inArray(t,i.fileManager.getIdList())},count:function(){return i.fileManager.getIdList().length},total:function(){var e=i.fileManager;return e.totalFiles||(e.totalFiles=e.count()),e.totalFiles},getTotalSize:function(){var t=i.fileManager;return t.totalSize||(t.totalSize=0,e.each(i.getFileStack(),(function(e,i){var n=parseFloat(i.size);t.totalSize+=isNaN(n)?0:n}))),t.totalSize},add:function(e,n){n||(n=i.fileManager.getId(e)),n&&(i.fileManager.stack[n]={file:e,name:t.getFileName(e),relativePath:t.getFileRelativePath(e),size:e.size,nameFmt:i._getFileName(e,""),sizeFmt:i._getSize(e.size)})},remove:function(e){var t=i._getThumbFileId(e);i.fileManager.removeFile(t)},removeFile:function(e){var t=i.fileManager;e&&(delete t.stack[e],delete t.loadedImages[e])},move:function(t,n){var r={},o=i.fileManager.stack;(t||n)&&t!==n&&(e.each(o,(function(e,i){e!==t&&(r[e]=i),e===n&&(r[t]=o[t])})),i.fileManager.stack=r)},list:function(){var t=[];return e.each(i.getFileStack(),(function(e,i){i&&i.file&&t.push(i.file)})),t},isPending:function(t){return-1===e.inArray(t,i.fileManager.filesProcessed)&&i.fileManager.exists(t)},isProcessed:function(){var t=!0,n=i.fileManager;return e.each(i.getFileStack(),(function(e){n.isPending(e)&&(t=!1)})),t},clear:function(){var e=i.fileManager;i.isDuplicateError=!1,i.isPersistentError=!1,e.totalFiles=null,e.totalSize=null,e.uploadedSize=0,e.stack={},e.errors=[],e.filesProcessed=[],e.stats={},e.bpsLog=[],e.bps=0,e.clearImages()},clearImages:function(){i.fileManager.loadedImages={},i.fileManager.totalImages=0},addImage:function(e,t){i.fileManager.loadedImages[e]=t},removeImage:function(e){delete i.fileManager.loadedImages[e]},getImageIdList:function(){return t.getObjectKeys(i.fileManager.loadedImages)},getImageCount:function(){return i.fileManager.getImageIdList().length},getId:function(e){return i._getFileId(e)},getIndex:function(e){return i.fileManager.getIdList().indexOf(e)},getThumb:function(t){var n=null;return i._getThumbs().each((function(){var r=e(this);i._getThumbFileId(r)===t&&(n=r)})),n},getThumbIndex:function(e){var t=i._getThumbFileId(e);return i.fileManager.getIndex(t)},getIdList:function(){return t.getObjectKeys(i.fileManager.stack)},getFile:function(e){return i.fileManager.stack[e]||null},getFileName:function(e,t){var n=i.fileManager.getFile(e);return n?t?n.nameFmt||"":n.name||"":""},getFirstFile:function(){var e=i.fileManager.getIdList(),t=e&&e.length?e[0]:null;return i.fileManager.getFile(t)},setFile:function(e,t){i.fileManager.getFile(e)?i.fileManager.stack[e].file=t:i.fileManager.add(t,e)},setProcessed:function(e){i.fileManager.filesProcessed.push(e)},getProgress:function(){var e=i.fileManager.total(),t=i.fileManager.filesProcessed.length;return e?Math.ceil(t/e*100):0},setProgress:function(e,t){var n=i.fileManager.getFile(e);!isNaN(t)&&n&&(n.progress=t)}}},_setUploadData:function(i,n){var r=this;e.each(n,(function(e,n){var o=r.uploadParamNames[e]||e;t.isArray(n)?i.append(o,n[0],n[1]):i.append(o,n)}))},_initResumableUpload:function(){var i,n=this,r=n.resumableUploadOptions,o=t.logMessages,s=n.fileManager;if(n.enableResumableUpload)if(!1!==r.fallback&&"function"!=typeof r.fallback&&(r.fallback=function(e){e._log(o.noResumableSupport),e.enableResumableUpload=!1}),t.hasResumableUploadSupport()||!1===r.fallback){if(!n.uploadUrl&&n.enableResumableUpload)return n._log(o.noUploadUrl),void(n.enableResumableUpload=!1);if(r.chunkSize=parseFloat(r.chunkSize),r.chunkSize<=0||isNaN(r.chunkSize))return n._log(o.invalidChunkSize,{chunkSize:r.chunkSize}),void(n.enableResumableUpload=!1);(i=n.resumableManager={init:function(e,t,o){i.logs=[],i.stack=[],i.error="",i.id=e,i.file=t.file,i.fileName=t.name,i.fileIndex=o,i.completed=!1,i.lastProgress=0,n.showPreview&&(i.$thumb=s.getThumb(e)||null,i.$progress=i.$btnDelete=null,i.$thumb&&i.$thumb.length&&(i.$progress=i.$thumb.find(".file-thumb-progress"),i.$btnDelete=i.$thumb.find(".kv-file-remove"))),i.chunkSize=r.chunkSize*n.bytesToKB,i.chunkCount=i.getTotalChunks()},setAjaxError:function(e,t,s,a){e.responseJSON&&e.responseJSON.error&&(s=e.responseJSON.error.toString()),a||(i.error=s),r.showErrorLog&&n._log(o.ajaxError,{status:e.status,error:s,text:e.responseText||""})},reset:function(){i.stack=[],i.chunksProcessed={}},setProcessed:function(t){var o,a,l=i.id,c=i.$thumb,u=i.$progress,d=c&&c.length,h={id:d?c.attr("id"):"",index:s.getIndex(l),fileId:l},p=n.resumableUploadOptions.skipErrorsAndProceed;i.completed=!0,i.lastProgress=0,d&&c.removeClass("file-uploading"),"success"===t?(s.uploadedSize+=i.file.size,n.showPreview&&(n._setProgress(101,u),n._setThumbStatus(c,"Success"),n._initUploadSuccess(i.chunksProcessed[l].data,c)),s.removeFile(l),delete i.chunksProcessed[l],n._raise("fileuploaded",[h.id,h.index,h.fileId]),s.isProcessed()&&n._setProgress(101)):"cancel"!==t&&(n.showPreview&&(n._setThumbStatus(c,"Error"),n._setPreviewError(c,!0),n._setProgress(101,u,n.msgProgressError),n._setProgress(101,n.$progress,n.msgProgressError),n.cancelling=!p),n.$errorContainer.find('li[data-file-id="'+h.fileId+'"]').length||(a={file:i.fileName,max:r.maxRetries,error:i.error},o=n.msgResumableUploadRetriesExceeded.setTokens(a),e.extend(h,a),n._showFileError(o,h,"filemaxretries"),p&&(s.removeFile(l),delete i.chunksProcessed[l],s.isProcessed()&&n._setProgress(101)))),s.isProcessed()&&i.reset()},check:function(){e.each(i.logs,(function(e,t){if(!t)return!1,!1}))},processedResumables:function(){var e,t=i.logs,n=0;if(!t||!t.length)return 0;for(e=0;ei.file.size?i.file.size:e},getTotalChunks:function(){var e=parseFloat(i.chunkSize);return!isNaN(e)&&e>0?Math.ceil(i.file.size/e):0},getProgress:function(){var e=i.processedResumables(),t=i.chunkCount;return 0===t?0:Math.ceil(e/t*100)},checkAborted:function(e){n._isAborted()&&(clearInterval(e),n.unlock())},upload:function(){var e,r=s.getIdList(),o="new";e=setInterval((function(){var a;if(i.checkAborted(e),"new"===o&&(n.lock(),o="processing",a=r.shift(),s.initStats(a),s.stack[a]&&(i.init(a,s.stack[a],s.getIndex(a)),i.processUpload())),!s.isPending(a)&&i.completed&&(o="new"),s.isProcessed()){var l=n.$preview.find(".file-preview-initial");l.length&&(t.addCss(l,t.SORT_CSS),n._initSortable()),clearInterval(e),n._clearFileInput(),n.unlock(),setTimeout((function(){var e=n.previewCache.data;e&&(n.initialPreview=e.content,n.initialPreviewConfig=e.config,n.initialPreviewThumbTags=e.tags),n._raise("filebatchuploadcomplete",[n.initialPreview,n.initialPreviewConfig,n.initialPreviewThumbTags,n._getExtraData()])}),n.processDelay)}}),n.processDelay)},uploadResumable:function(){var e,t,o=n.taskManager,s=i.chunkCount;for(t=o.addPool(i.id),e=0;er.maxRetries)return g(f.resumableMaxRetriesReached,{n:r.maxRetries}),void i.setProcessed("error");var v,_,b,y,w,x,C=h[h.slice?"slice":h.mozSlice?"mozSlice":h.webkitSlice?"webkitSlice":"slice"](u*e,u*(e+1));v=new FormData,c=s.stack[d],n._setUploadData(v,{chunkCount:i.chunkCount,chunkIndex:e,chunkSize:u,chunkSizeStart:u*e,fileBlob:[C,i.fileName],fileId:d,fileName:i.fileName,fileRelativePath:c.relativePath,fileSize:h.size,retryCount:a}),i.$progress&&i.$progress.length&&i.$progress.show(),b=function(r){_=n._getOutData(v,r),n.showPreview&&(p.hasClass("file-preview-success")||(n._setThumbStatus(p,"Loading"),t.addCss(p,"file-uploading")),m.attr("disabled",!0)),n._raise("filechunkbeforesend",[d,e,a,s,i,_])},y=function(t,c,u){if(n._isAborted())g(f.resumableAborting);else{_=n._getOutData(v,u,t);var h=n.uploadParamNames.chunkIndex||"chunkIndex",p=[d,e,a,s,i,_];t.error?(r.showErrorLog&&n._log(o.retryStatus,{retry:a+1,filename:i.fileName,chunk:e}),n._raise("filechunkerror",p),i.pushAjax(e,a+1),i.error=t.error,g(t.error)):(i.logs[t[h]]=!0,i.chunksProcessed[d]||(i.chunksProcessed[d]={}),i.chunksProcessed[d][t[h]]=!0,i.chunksProcessed[d].data=t,l.resolve.call(null,t),n._raise("filechunksuccess",p),i.check())}},w=function(t,r,o){n._isAborted()?g(f.resumableAborting):(_=n._getOutData(v,t),i.setAjaxError(t,r,o),n._raise("filechunkajaxerror",[d,e,a,s,i,_]),i.pushAjax(e,a+1),g(f.resumableRetryError,{n:a-1}))},x=function(){n._isAborted()||n._raise("filechunkcomplete",[d,e,a,s,i,n._getOutData(v)])},n._ajaxSubmit(b,y,x,w,v,d,i.fileIndex)}}}).reset()}else r.fallback(n)},_initTemplateDefaults:function(){var i,n,r,o,s,a,l,c,u,d,h,p,f,m,g,v,_,b,y,w,x,C,T,k,E,S,A,P,I,D,F,L,M,O,j,$,z,N,R,U,B,H,q,W,V=this,Z=function(e,i){return'\n"+t.DEFAULT_PREVIEW+"\n\n"},K="btn btn-sm btn-kv "+t.defaultButtonCss();i='{preview}\n
\n
\n
\n {caption}\n\n'+(t.isBs(5)?"":'
\n')+" {remove}\n {cancel}\n {pause}\n {upload}\n {browse}\n"+(t.isBs(5)?"":"
\n")+"
",n='{preview}\n
\n
\n{remove}\n{cancel}\n{upload}\n{browse}\n',r='
\n {close}
\n
\n
\n
\n
\n
\n
',s=t.closeButton("fileinput-remove"),o='',a='\n',l='',c='{icon} {label}',u='
{icon} {label}
',q=t.MODAL_ID+"Label",d='',h='\n',W='',p='
\n
\n {status}\n
\n
{stats}',H='
{pendingTime} {uploadSpeed}
',f=" ({sizeText})",m='',g='
\n \n
\n{drag}\n
',v='\n',_='',B='',b='{downloadIcon}',y='',w='{dragIcon}',x='
{indicator}
',T=(C='
\n',k=C+' title="{caption}">
\n',E="
{footer}\n{zoomCache}
\n",S="{content}\n",N=" {style}",A=Z("html","text/html"),I=Z("text","text/plain;charset=UTF-8"),$=Z("pdf","application/pdf"),P='{alt}\n",D='",F='",L='\n",M='\x3c!--suppress ALL --\x3e\n",O='\n",j='\n\n'+t.OBJECT_PARAMS+" "+t.DEFAULT_PREVIEW+"\n\n",z='
\n"+t.DEFAULT_PREVIEW+"\n
\n",R='
{zoomContent}
',U={width:"100%",height:"100%","min-height":"480px"},V._isPdfRendered()&&($=V.pdfRendererTemplate.replace("{renderer}",V._encodeURI(V.pdfRendererUrl))),V.defaults={layoutTemplates:{main1:i,main2:n,preview:r,close:s,fileIcon:o,caption:a,modalMain:d,modal:h,descriptionClose:W,progress:p,stats:H,size:f,footer:m,indicator:x,actions:g,actionDelete:v,actionRotate:B,actionUpload:_,actionDownload:b,actionZoom:y,actionDrag:w,btnDefault:l,btnLink:c,btnBrowse:u,zoomCache:R},previewMarkupTags:{tagBefore1:T,tagBefore2:k,tagAfter:E},previewContentTemplates:{generic:S,html:A,image:P,text:I,office:D,gdocs:F,video:L,audio:M,flash:O,object:j,pdf:$,other:z},allowedPreviewTypes:["image","html","text","video","audio","flash","pdf","object"],previewTemplates:{},previewSettings:{image:{width:"auto",height:"auto","max-width":"100%","max-height":"100%"},html:{width:"213px",height:"160px"},text:{width:"213px",height:"160px"},office:{width:"213px",height:"160px"},gdocs:{width:"213px",height:"160px"},video:{width:"213px",height:"160px"},audio:{width:"100%",height:"30px"},flash:{width:"213px",height:"160px"},object:{width:"213px",height:"160px"},pdf:{width:"100%",height:"160px",position:"relative"},other:{width:"213px",height:"160px"}},previewSettingsSmall:{image:{width:"auto",height:"auto","max-width":"100%","max-height":"100%"},html:{width:"100%",height:"160px"},text:{width:"100%",height:"160px"},office:{width:"100%",height:"160px"},gdocs:{width:"100%",height:"160px"},video:{width:"100%",height:"auto"},audio:{width:"100%",height:"30px"},flash:{width:"100%",height:"auto"},object:{width:"100%",height:"auto"},pdf:{width:"100%",height:"160px"},other:{width:"100%",height:"160px"}},previewZoomSettings:{image:{width:"auto",height:"auto","max-width":"100%","max-height":"100%"},html:U,text:U,office:{width:"100%",height:"100%","max-width":"100%","min-height":"480px"},gdocs:{width:"100%",height:"100%","max-width":"100%","min-height":"480px"},video:{width:"auto",height:"100%","max-width":"100%"},audio:{width:"100%",height:"30px"},flash:{width:"auto",height:"480px"},object:{width:"auto",height:"100%","max-width":"100%","min-height":"480px"},pdf:U,other:{width:"auto",height:"100%","min-height":"480px"}},mimeTypeAliases:{"video/quicktime":"video/mp4"},fileTypeSettings:{image:function(e,i){return t.compare(e,"image.*")&&!t.compare(e,/(tiff?|wmf)$/i)||t.compare(i,/\.(gif|png|jpe?g)$/i)},html:function(e,i){return t.compare(e,"text/html")||t.compare(i,/\.(htm|html)$/i)},office:function(e,i){return t.compare(e,/(word|excel|powerpoint|office)$/i)||t.compare(i,/\.(docx?|xlsx?|pptx?|pps|potx?)$/i)},gdocs:function(e,i){return t.compare(e,/(word|excel|powerpoint|office|iwork-pages|tiff?)$/i)||t.compare(i,/\.(docx?|xlsx?|pptx?|pps|potx?|rtf|ods|odt|pages|ai|dxf|ttf|tiff?|wmf|e?ps)$/i)},text:function(e,i){return t.compare(e,"text.*")||t.compare(i,/\.(xml|javascript)$/i)||t.compare(i,/\.(txt|md|nfo|ini|json|php|js|css)$/i)},video:function(e,i){return t.compare(e,"video.*")&&(t.compare(e,/(ogg|mp4|mp?g|mov|webm|3gp)$/i)||t.compare(i,/\.(og?|mp4|webm|mp?g|mov|3gp)$/i))},audio:function(e,i){return t.compare(e,"audio.*")&&(t.compare(i,/(ogg|mp3|mp?g|wav)$/i)||t.compare(i,/\.(og?|mp3|mp?g|wav)$/i))},flash:function(e,i){return t.compare(e,"application/x-shockwave-flash",!0)||t.compare(i,/\.(swf)$/i)},pdf:function(e,i){return t.compare(e,"application/pdf",!0)||t.compare(i,/\.(pdf)$/i)},object:function(){return!0},other:function(){return!0}},fileActionSettings:{showRemove:!0,showUpload:!0,showDownload:!0,showZoom:!0,showDrag:!0,showRotate:!0,removeIcon:'',removeClass:K,removeErrorClass:"btn btn-sm btn-kv btn-danger",removeTitle:"Remove file",uploadIcon:'',uploadClass:K,uploadTitle:"Upload file",uploadRetryIcon:'',uploadRetryTitle:"Retry upload",downloadIcon:'',downloadClass:K,downloadTitle:"Download file",rotateIcon:'',rotateClass:K,rotateTitle:"Rotate 90 deg. clockwise",zoomIcon:'',zoomClass:K,zoomTitle:"View Details",dragIcon:'',dragClass:"text-primary",dragTitle:"Move / Rearrange",dragSettings:{},indicatorNew:'',indicatorSuccess:'',indicatorError:'',indicatorLoading:'',indicatorPaused:'',indicatorNewTitle:"Not uploaded yet",indicatorSuccessTitle:"Uploaded",indicatorErrorTitle:"Upload Error",indicatorLoadingTitle:"Uploading …",indicatorPausedTitle:"Upload Paused"}},e.each(V.defaults,(function(t,i){"allowedPreviewTypes"!==t?V[t]=e.extend(!0,{},i,V[t]):void 0===V.allowedPreviewTypes&&(V.allowedPreviewTypes=i)})),V._initPreviewTemplates()},_initPreviewTemplates:function(){var i,n=this,r=n.previewMarkupTags,o=r.tagAfter;e.each(n.previewContentTemplates,(function(e,s){t.isEmpty(n.previewTemplates[e])&&(i=r.tagBefore2,"generic"!==e&&"image"!==e||(i=r.tagBefore1),n._isPdfRendered()&&"pdf"===e&&(i=i.replace("kv-file-content","kv-file-content kv-pdf-rendered")),n.previewTemplates[e]=i+s+o)}))},_initPreviewCache:function(){var i=this;i.previewCache={data:{},init:function(){var e=i.initialPreview;e.length>0&&!t.isArray(e)&&(e=e.split(i.initialPreviewDelimiter)),i.previewCache.data={content:e,config:i.initialPreviewConfig,tags:i.initialPreviewThumbTags}},count:function(e){return i.previewCache.data&&i.previewCache.data.content?e?i.previewCache.data.content.filter((function(e){return null!==e})).length:i.previewCache.data.content.length:0},get:function(e,n){var r,o,s,a,l,c,u,d=t.INIT_FLAG+e,h=i.previewCache.data,p=h.config[e],f=h.content[e],m=t.ifSet("previewAsData",p,i.initialPreviewAsData),g=p?{title:p.title||null,alt:p.alt||null}:{title:null,alt:null},v=function(e,n,r,o,s,a,l,c){var u=" file-preview-initial "+t.SORT_CSS+(l?" "+l:""),d=i.previewInitId+"-"+a,h=p&&p.fileId||d;return i._generatePreviewTemplate(e,n,r,o,d,h,!1,null,null,u,s,a,c,g,p&&p.zoomData||n)};return f&&f.length?(n=void 0===n||n,s=t.ifSet("type",p,i.initialPreviewFileType||"generic"),l=t.ifSet("filename",p,t.ifSet("caption",p)),c=t.ifSet("filetype",p,s),a=i.previewCache.footer(e,n,p&&p.size||null),u=t.ifSet("frameClass",p),r=m?v(s,f,l,c,a,d,u):v("generic",f,l,c,a,d,u,s).setTokens({content:h.content[e]}),h.tags.length&&h.tags[e]&&(r=t.replaceTags(r,h.tags[e])),t.isEmpty(p)||t.isEmpty(p.frameAttr)||((o=t.createElement(r)).find(".file-preview-initial").attr(p.frameAttr),r=o.html(),o.remove()),r):""},clean:function(e){e.content=t.cleanArray(e.content),e.config=t.cleanArray(e.config),e.tags=t.cleanArray(e.tags),i.previewCache.data=e},add:function(e,n,r,o){var s,a=i.previewCache.data;return e&&e.length?(s=e.length-1,t.isArray(e)||(e=e.split(i.initialPreviewDelimiter)),o&&a.content?(s=a.content.push(e[0])-1,a.config[s]=n,a.tags[s]=r):(a.content=e,a.config=n,a.tags=r),i.previewCache.clean(a),s):0},set:function(e,n,r,o){var s,a=i.previewCache.data;if(e&&e.length&&(t.isArray(e)||(e=e.split(i.initialPreviewDelimiter)),e.filter((function(e){return null!==e})).length)){if(void 0===a.content&&(a.content=[]),void 0===a.config&&(a.config=[]),void 0===a.tags&&(a.tags=[]),o){for(s=0;s"+n+": "+e)):i||r.$errorContainer.html(""),r._showFileError(e,t,"fileusererror"))},_showFileError:function(e,t,i){var n=this,r=n.$errorContainer,o=i||"fileuploaderror",s=t&&t.fileId||"",a=t&&t.id?'
  • '+e+"
  • ":"
  • "+e+"
  • ";return 0===r.find("ul").length?n._addError("
      "+a+"
    "):r.find("ul").append(a),r.fadeIn(n.fadeDelay),n._raise(o,[t,e]),n._setValidationError("file-input-new"),!0},_showError:function(e,t,i){var n=this,r=n.$errorContainer,o=i||"fileerror";return(t=t||{}).reader=n.reader,n._addError(e),r.fadeIn(n.fadeDelay),n._raise(o,[t,e]),n.isAjaxUpload||n._clearFileInput(),n._setValidationError("file-input-new"),n.$btnUpload.attr("disabled",!0),!0},_noFilesError:function(e){var t=this,i=t.minFileCount>1?t.filePlural:t.fileSingle,n=t.msgFilesTooLess.replace("{n}",t.minFileCount).replace("{files}",i),r=t.$errorContainer;n="
  • "+n+"
  • ",0===r.find("ul").length?t._addError("
      "+n+"
    "):r.find("ul").append(n),t.isError=!0,t._updateFileDetails(0),r.fadeIn(t.fadeDelay),t._raise("fileerror",[e,n]),t._clearFileInput(),t._setValidationError()},_parseError:function(t,i,n,r){var o,s,a,l=this,c=e.trim(n+"");return a=(s=i.responseJSON&&i.responseJSON.error?i.responseJSON.error.toString():"")||i.responseText,l.cancelling&&l.msgUploadAborted&&(c=l.msgUploadAborted),l.showAjaxErrorDetails&&a&&(s?c=e.trim(s+""):(o=(a=e.trim(a.replace(/\n\s*\n/g,"\n"))).length?"
    "+a+"
    ":"",c+=c?o:a)),c||(c=l.msgAjaxError.replace("{operation}",t)),l.cancelling=!1,r?""+r+": "+c:c},_parseFileType:function(e,i){var n,r,o,s=this,a=s.allowedPreviewTypes||[];if("application/text-plain"===e)return"text";for(o=0;o-1&&(i=t.split(".").pop(),n.previewFileIconSettings&&(r=n.previewFileIconSettings[i]||n.previewFileIconSettings[i.toLowerCase()]||null),n.previewFileExtSettings&&e.each(n.previewFileExtSettings,(function(e,t){n.previewFileIconSettings[e]&&t(i)&&(r=n.previewFileIconSettings[e])}))),r||n.previewFileIcon},_parseFilePreviewIcon:function(e,t){var i=this,n=i._getPreviewIcon(t),r=e;return r.indexOf("{previewFileIcon}")>-1&&(r=r.setTokens({previewFileIconClass:i.previewFileIconClass,previewFileIcon:n})),r},_raise:function(t,i){var n=this,r=e.Event(t);void 0!==i?n.$element.trigger(r,i):n.$element.trigger(r);var o=r.result,s=!1===o;if(r.isDefaultPrevented()||s)return!1;if("filebatchpreupload"===r.type&&(o||s))return n.ajaxAborted=o,!1;switch(t){case"filebatchuploadcomplete":case"filebatchuploadsuccess":case"fileuploaded":case"fileclear":case"filecleared":case"filereset":case"fileerror":case"filefoldererror":case"filecustomerror":case"filesuccessremove":break;default:n.ajaxAborted||(n.ajaxAborted=o)}return!0},_listenFullScreen:function(e){var t,i,n=this,r=n.$modal;r&&r.length&&(t=r&&r.find(".btn-kv-fullscreen"),i=r&&r.find(".btn-kv-borderless"),t.length&&i.length&&(t.removeClass("active").attr("aria-pressed","false"),i.removeClass("active").attr("aria-pressed","false"),e?t.addClass("active").attr("aria-pressed","true"):i.addClass("active").attr("aria-pressed","true"),r.hasClass("file-zoom-fullscreen")||e?n._maximizeZoomDialog():i.removeClass("active").attr("aria-pressed","false")))},_listen:function(){var i,n=this,r=n.$element,o=n.$form,s=n.$container;n._handler(r,"click",(function(e){n._initFileSelected(),r.hasClass("file-no-browse")&&(r.data("zoneClicked")?r.data("zoneClicked",!1):e.preventDefault())})),n._handler(r,"change",e.proxy(n._change,n)),n._handler(n.$caption,"paste",e.proxy(n.paste,n)),n.showBrowse&&(n._handler(n.$btnFile,"click",e.proxy(n._browse,n)),n._handler(n.$btnFile,"keypress",(function(e){13===(e.keyCode||e.which)&&(r.trigger("click"),n._browse(e))}))),n._handler(s.find(".fileinput-remove:not([disabled])"),"click",e.proxy(n.clear,n)),n._handler(s.find(".fileinput-cancel"),"click",e.proxy(n.cancel,n)),n._handler(s.find(".fileinput-pause"),"click",e.proxy(n.pause,n)),n._initDragDrop(),n._handler(o,"reset",e.proxy(n.clear,n)),n.isAjaxUpload||n._handler(o,"submit",e.proxy(n._submitForm,n)),n._handler(n.$container.find(".fileinput-upload"),"click",e.proxy(n._uploadClick,n)),n._handler(e(window),"resize",(function(){n._listenFullScreen(screen.width===window.innerWidth&&screen.height===window.innerHeight)})),i="webkitfullscreenchange mozfullscreenchange fullscreenchange MSFullscreenChange",n._handler(e(document),i,(function(){n._listenFullScreen(t.checkFullScreen())})),n.$caption.on("focus",(function(){n.$captionContainer.focus()})),n._autoFitContent(),n._initClickable(),n._refreshPreview()},_autoFitContent:function(){var t,i=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,n=this,r=i<400?n.previewSettingsSmall||n.defaults.previewSettingsSmall:n.previewSettings||n.defaults.previewSettings;e.each(r,(function(e,i){t=".file-preview-frame .file-preview-"+e,n.$preview.find(t+".kv-preview-data,"+t+" .kv-preview-data").css(i)}))},_scanDroppedItems:function(e,i,n){n=n||"";var r,o,s,a=this,l=function(e){a._log(t.logMessages.badDroppedFiles),a._log(e)};e.isFile?e.file((function(e){n&&(e.newPath=n+e.name),i.push(e)}),l):e.isDirectory&&(o=e.createReader(),(s=function(){o.readEntries((function(t){if(t&&t.length>0){for(r=0;r-1;if(n._zoneDragDropInit(i),n.isDisabled||!o)return r.effectAllowed="none",void(r.dropEffect="none");r.dropEffect="copy",n._raise("fileDragEnter",{sourceEvent:i,files:r.types.Files})&&t.addCss(n.$dropZone,"file-highlighted")},_zoneDragLeave:function(e){var t=this;t._zoneDragDropInit(e),t.isDisabled||t._raise("fileDragLeave",{sourceEvent:e})&&t.$dropZone.removeClass("file-highlighted")},_dropFiles:function(e,t){var i=this,n=i.$element;i.isAjaxUpload?i._change(e,t):(i.changeTriggered=!0,n.get(0).files=t,setTimeout((function(){i.changeTriggered=!1,n.trigger("change"+i.namespace)}),i.processDelay)),i.$dropZone.removeClass("file-highlighted")},_zoneDrop:function(e){var i,n=this,r=(n.$element,e.originalEvent.dataTransfer),o=r.files,s=r.items,a=t.getDragDropFolders(s);if(e.preventDefault(),!n.isDisabled&&!t.isEmpty(o)&&n._raise("fileDragDrop",{sourceEvent:e,files:o}))if(a>0){if(!n.isAjaxUpload)return void n._showFolderError(a);for(o=[],i=0;i0&&o>=l,u=e(i.item);c&&(o=l-1),s.initialPreview=t.moveArray(s.initialPreview,r,o,d),s.initialPreviewConfig=t.moveArray(s.initialPreviewConfig,r,o,d),s.previewCache.init(),s.getFrames(".file-preview-initial").each((function(){e(this).attr("data-fileindex",t.INIT_FLAG+a),a++})),c&&(n=s.getFrames(":not(.file-preview-initial):first")).length&&u.slideUp((function(){u.insertBefore(n).slideDown()})),s._raise("filesorted",{previewId:u.attr("id"),oldIndex:r,newIndex:o,stack:s.initialPreviewConfig})}},e.extend(!0,i,s.fileActionSettings.dragSettings),s.sortable&&s.sortable.destroy(),s.sortable=h.create(a[0],i))},_setPreviewContent:function(e){var i=this;t.setHtml(i.$preview,e),i._autoFitContent()},_initPreviewImageOrientations:function(){var t=this,i=0,n=t.canOrientImage;(t.autoOrientImageInitial||n)&&t.getFrames(".file-preview-initial").each((function(){var r,o,s,a=e(this),l=t.initialPreviewConfig[i];l&&l.exif&&l.exif.Orientation&&(s=a.attr("id"),r=a.find(">.kv-file-content img"),o=t._getZoom(s," >.kv-file-content img"),n?r.css("image-orientation",t.autoOrientImageInitial?"from-image":"none"):t.setImageOrientation(r,o,l.exif.Orientation,a)),i++}))},_initPreview:function(e){var i,n=this,r=n.initialCaption||"";if(!n.previewCache.count(!0))return n._clearPreview(),void(e?n._setCaption(r):n._initCaption());i=n.previewCache.out(),r=e&&n.initialCaption?n.initialCaption:i.caption,n._setPreviewContent(i.content),n._setInitThumbAttr(),n._setCaption(r),n._initSortable(),t.isEmpty(i.content)||n.$container.removeClass("file-input-new"),n._initPreviewImageOrientations()},_getZoomButton:function(e){var i=this,n=i.previewZoomButtonIcons[e],r=i.previewZoomButtonClasses[e],o=' title="'+(i.previewZoomButtonTitles[e]||"")+'" ',s=t.isBs(5)?"bs-":"",a=o+("close"===e?" data-"+s+'dismiss="modal" aria-hidden="true"':"");return"fullscreen"!==e&&"borderless"!==e&&"toggleheader"!==e||(a+=' data-toggle="button" aria-pressed="false" autocomplete="off"'),'"},_getModalContent:function(){var e=this;return e._getLayoutTemplate("modal").setTokens({rtl:e.rtl?" kv-rtl":"",zoomFrameClass:e.frameClass,prev:e._getZoomButton("prev"),next:e._getZoomButton("next"),rotate:e._getZoomButton("rotate"),toggleheader:e._getZoomButton("toggleheader"),fullscreen:e._getZoomButton("fullscreen"),borderless:e._getZoomButton("borderless"),close:e._getZoomButton("close")})},_listenModalEvent:function(e){var i=this,n=i.$modal,r=function(e){return{sourceEvent:e,previewId:n.data("previewId"),modal:n}};n.on(e+".bs.modal",(function(o){if("bs.modal"===o.namespace){var s=n.find(".btn-fullscreen"),a=n.find(".btn-borderless");n.data("fileinputPluginId")===i.$element.attr("id")&&i._raise("filezoom"+e,r(o)),"shown"===e&&(i._handleRotation(n,n.find(".file-zoom-detail"),n.data("angle")),a.removeClass("active").attr("aria-pressed","false"),s.removeClass("active").attr("aria-pressed","false"),n.hasClass("file-zoom-fullscreen")&&(i._maximizeZoomDialog(),t.checkFullScreen()?s.addClass("active").attr("aria-pressed","true"):a.addClass("active").attr("aria-pressed","true")))}}))},_initZoom:function(){var i,n=this,r=n._getLayoutTemplate("modalMain"),o="#"+t.MODAL_ID;r=n._setTabIndex("modal",r),n.showPreview&&(n.$modal=e(o),n.$modal&&n.$modal.length||(i=t.createElement(t.cspBuffer.stash(r)).insertAfter(n.$container),n.$modal=e(o).insertBefore(i),t.cspBuffer.apply(n.$modal),i.remove()),t.initModal(n.$modal),n.$modal.html(t.cspBuffer.stash(n._getModalContent())),t.cspBuffer.apply(n.$modal),e.each(t.MODAL_EVENTS,(function(e,t){n._listenModalEvent(t)})))},_initZoomButtons:function(){var t,i,n=this,r=n.$modal,o=r.data("previewId")||"",s=n.getFrames().toArray(),a=s.length,l=r.find(".btn-kv-prev"),c=r.find(".btn-kv-next");r.find(".btn-kv-rotate");if(s.length<2)return l.hide(),void c.hide();l.show(),c.show(),a&&(t=e(s[0]),i=e(s[a-1]),l.removeAttr("disabled"),c.removeAttr("disabled"),n.reversePreviewOrder&&([l,c]=[c,l]),t.length&&t.attr("id")===o&&l.attr("disabled",!0),i.length&&i.attr("id")===o&&c.attr("disabled",!0))},_maximizeZoomDialog:function(){var t=this.$modal,i=t.find(".modal-header:visible"),n=t.find(".modal-footer:visible"),r=t.find(".kv-zoom-body"),o=e(window).height();t.addClass("file-zoom-fullscreen"),i&&i.length&&(o-=i.outerHeight(!0)),n&&n.length&&(o-=n.outerHeight(!0)),r&&r.length&&(o-=r.outerHeight(!0)-r.height()),t.find(".kv-zoom-body").height(o)},_resizeZoomDialog:function(e){var i=this,n=i.$modal,r=n.find(".btn-kv-fullscreen"),o=n.find(".btn-kv-borderless");if(n.hasClass("file-zoom-fullscreen"))t.toggleFullScreen(!1),e?r.hasClass("active")||(n.removeClass("file-zoom-fullscreen"),i._resizeZoomDialog(!0),o.hasClass("active")&&o.removeClass("active").attr("aria-pressed","false")):r.hasClass("active")?r.removeClass("active").attr("aria-pressed","false"):(n.removeClass("file-zoom-fullscreen"),i.$modal.find(".kv-zoom-body").css("height",i.zoomModalHeight));else{if(!e)return void i._maximizeZoomDialog();t.toggleFullScreen(!0)}n.focus()},_setZoomContent:function(i,n){var r,o,s,a,l,c,u,d,h,p,f,m,g=this,v=i.attr("id"),_=g._getZoom(v),b=g.$modal,y=b.find(".btn-kv-fullscreen"),w=b.find(".btn-kv-borderless"),x=b.find(".btn-kv-toggleheader"),C=i.data("zoom");C&&(C=decodeURIComponent(C),m=_.html().replace(g.zoomPlaceholder,"").setTokens({zoomData:C}),_.html(m),i.data("zoom",""),_.attr("data-zoom",C)),o=_.attr("data-template")||"generic",s=(r=_.find(".kv-file-content")).length?r.html():"",p=i.data("caption")||g.msgZoomModalHeading,f=i.data("size")||"",d=i.data("description")||"",b.find(".kv-zoom-caption").attr("title",p).html(p),b.find(".kv-zoom-size").html(f),h=b.find(".kv-zoom-description").hide(),d&&(g.showDescriptionClose&&(d=g._getLayoutTemplate("descriptionClose").setTokens({closeIcon:g.previewZoomButtonIcons.close})+""+d),h.show().html(d),g.showDescriptionClose&&g._handler(b.find(".kv-desc-hide"),"click",(function(){e(this).parent().fadeOut("fast",(function(){b.focus()}))}))),a=b.find(".kv-zoom-body"),b.removeClass("kv-single-content"),n?(u=a.addClass("file-thumb-loading").clone().insertAfter(a),t.setHtml(a,s).hide(),u.fadeOut("fast",(function(){a.fadeIn("fast",(function(){a.removeClass("file-thumb-loading")})),u.remove()}))):t.setHtml(a,s),(c=g.previewZoomSettings[o])&&(l=a.find(".kv-preview-data"),t.addCss(l,"file-zoom-detail"),e.each(c,(function(e,t){l.css(e,t),(l.attr("width")&&"width"===e||l.attr("height")&&"height"===e)&&l.removeAttr(e)}))),b.data("previewId",v),g._handler(b.find(".btn-kv-prev"),"click",(function(){g._zoomSlideShow("prev",v)})),g._handler(b.find(".btn-kv-next"),"click",(function(){g._zoomSlideShow("next",v)})),g._handler(y,"click",(function(){g._resizeZoomDialog(!0)})),g._handler(w,"click",(function(){g._resizeZoomDialog(!1)})),g._handler(x,"click",(function(){var e,t=b.find(".modal-header"),i=b.find(".floating-buttons"),n=t.find(".kv-zoom-actions"),r=function(e){var i=g.$modal.find(".kv-zoom-body"),n=g.zoomModalHeight;b.hasClass("file-zoom-fullscreen")&&(n=i.outerHeight(!0),e||(n-=t.outerHeight(!0))),i.css("height",e?n+e:n)};t.is(":visible")?(e=t.outerHeight(!0),t.slideUp("slow",(function(){n.find(".btn").appendTo(i),r(e)}))):(i.find(".btn").appendTo(n),t.slideDown("slow",(function(){r()}))),b.focus()})),g._handler(b,"keydown",(function(t){var i,n,r=t.which||t.keyCode,o=g.processDelay+1,s=e(this).find(".btn-kv-prev"),a=e(this).find(".btn-kv-next"),l=e(this).data("previewId");[i,n]=g.rtl?[39,37]:[37,39],e.each({prev:[s,i],next:[a,n]},(function(e,t){var i=t[0],n=t[1];r===n&&i.length&&(b.focus(),i.attr("disabled")||(i.blur(),setTimeout((function(){i.focus(),g._zoomSlideShow(e,l),setTimeout((function(){i.attr("disabled")&&b.focus()}),o)}),o)))}))}))},_showModal:function(e){var i,n,r=this,o=r.$modal;e&&e.length&&(t.initModal(o),t.setHtml(o,r._getModalContent()),r._setZoomContent(e),o.removeClass("rotatable"),o.data({backdrop:!1,fileinputPluginId:r.$element.attr("id")}),o.find(".kv-zoom-body").css("height",r.zoomModalHeight),(i=e.find(".kv-file-content > :first-child")).length&&(n=i.css("transform"))&&o.find(".file-zoom-detail").css("transform",n),e.hasClass("rotatable")&&o.addClass("rotatable"),e.data("angle")&&o.data("angle",e.data("angle")),e.data("angle")||0,o.modal("show"),r._initZoomButtons(),r._initRotateZoom(e,i))},_zoomPreview:function(e){var i,n=this;if(!e.length)throw"Cannot zoom to detailed preview!";i=e.closest(t.FRAMES),n._showModal(i)},_zoomSlideShow:function(t,i){var n,r,o,s,a,l,c=this,u=c.$modal,d=u.find(".kv-zoom-actions .btn-kv-"+t),h=c.getFrames().toArray(),p=[],f=h.length;if(c.reversePreviewOrder&&(t="prev"===t?"next":"prev"),!d.attr("disabled")){for(r=0;r=f||!p[s]||((n=e(p[s])).length&&c._setZoomContent(n,t),c._initZoomButtons(),n.length&&n.hasClass("rotatable")?(a=n.data("angle")||0,u.addClass("rotatable").data("angle",a),l=n.find(".kv-file-content > :first-child"),c._initRotateZoom(n,l)):u.removeClass("rotatable").removeData("angle"),c._raise("filezoom"+t,{previewId:i,modal:c.$modal}))}},_initZoomButton:function(){var t=this;t.$preview.find(".kv-file-zoom").each((function(){var i=e(this);t._handler(i,"click",(function(){t._zoomPreview(i)}))}))},_inputFileCount:function(){return this.$element[0].files.length},_refreshPreview:function(){var t,i=this;(i._inputFileCount()||i.isAjaxUpload)&&i.showPreview&&i.isPreviewable&&(i.isAjaxUpload&&i.fileManager.count()>0?(t=e.extend(!0,[],i.getFileList()),i.fileManager.clear(),i._clearFileInput()):t=i.$element[0].files,t&&t.length&&i.readFiles(t))},_clearObjects:function(t){t.find("video audio").each((function(){this.pause(),e(this).remove()})),t.find("img object div").each((function(){e(this).remove()}))},_clearFileInput:function(){var t,i,n,r=this,o=r.$element;r._inputFileCount()&&(t=o.closest("form"),i=e(document.createElement("form")),n=e(document.createElement("div")),o.before(n),t.length?t.after(i):n.after(i),i.append(o).trigger("reset"),n.before(o).remove(),i.remove())},_resetUpload:function(){var e=this;e.uploadInitiated=!1,e.uploadStartTime=t.now(),e.uploadCache=[],e.$btnUpload.removeAttr("disabled"),e._setProgress(0),e._hideProgress(),e._resetErrors(!1),e._initAjax(),e.fileManager.clearImages(),e._resetCanvas(),e.overwriteInitial&&(e.initialPreview=[],e.initialPreviewConfig=[],e.initialPreviewThumbTags=[],e.previewCache.data={content:[],config:[],tags:[]})},_resetCanvas:function(){var e=this;e.imageCanvas&&e.imageCanvasContext&&e.imageCanvasContext.clearRect(0,0,e.imageCanvas.width,e.imageCanvas.height)},_hasInitialPreview:function(){var e=this;return!e.overwriteInitial&&e.previewCache.count(!0)},_resetPreview:function(){var i,n,r,o=this,s=o.showUploadedThumbs,a=!o.removeFromPreviewOnError,l=(s||a)&&o.isDuplicateError;o.previewCache.count(!0)?(i=o.previewCache.out(),l&&(r=t.createElement("").insertAfter(o.$container),o.getFrames().each((function(){var t=e(this);(s&&t.hasClass("file-preview-success")||a&&t.hasClass("file-preview-error"))&&r.append(t)}))),o._setPreviewContent(i.content),o._setInitThumbAttr(),n=o.initialCaption?o.initialCaption:i.caption,o._setCaption(n),l&&(r.contents().appendTo(o.$preview),r.remove())):(o._clearPreview(),o._initCaption()),o.showPreview&&(o._initZoom(),o._initSortable()),o.isDuplicateError=!1},_clearDefaultPreview:function(){this.$preview.find(".file-default-preview").remove()},_validateDefaultPreview:function(){var e=this;e.showPreview&&!t.isEmpty(e.defaultPreviewContent)&&(e._setPreviewContent('
    '+e.defaultPreviewContent+"
    "),e.$container.removeClass("file-input-new"),e._initClickable())},_resetPreviewThumbs:function(e){var t,i=this;if(e)return i._clearPreview(),void i.clearFileStack();i._hasInitialPreview()?(t=i.previewCache.out(),i._setPreviewContent(t.content),i._setInitThumbAttr(),i._setCaption(t.caption),i._initPreviewActions()):i._clearPreview()},_getLayoutTemplate:function(e){var i=this,n=i.layoutTemplates[e];return t.isEmpty(i.customLayoutTags)?n:t.replaceTags(n,i.customLayoutTags)},_getPreviewTemplate:function(e){var i=this,n=i.previewTemplates,r=n[e]||n.other;return t.isEmpty(i.customPreviewTags)?r:t.replaceTags(r,i.customPreviewTags)},_getOutData:function(e,t,i,n){var r=this;return t=t||{},i=i||{},{formdata:e,files:n=n||r.fileManager.list(),filenames:r.filenames,filescount:r.getFilesCount(),extra:r._getExtraData(),response:i,reader:r.reader,jqXHR:t}},_getMsgSelected:function(e,t){var i=this,n=1===e?i.fileSingle:i.filePlural;return e>0?i.msgSelected.replace("{n}",e).replace("{files}",n):t?i.msgProcessing:i.msgNoFilesSelected},_getFrame:function(e,i){var n=this,r=t.getFrameElement(n.$preview,e);return!n.showPreview||i||r.length||n._log(t.logMessages.invalidThumb,{id:e}),r},_getZoom:function(e,i){var n=this,r=t.getZoomElement(n.$preview,e,i);return n.showPreview&&!r.length&&n._log(t.logMessages.invalidThumb,{id:e}),r},_getThumbs:function(e){return e=e||"",this.getFrames(":not(.file-preview-initial)"+e)},_getThumbId:function(e){return this.previewInitId+"-"+e},_getExtraData:function(e,t){var i=this,n=i.uploadExtraData;return"function"==typeof i.uploadExtraData&&(n=i.uploadExtraData(e,t)),n},_initXhr:function(e,i){var n=this,r=n.fileManager,o=function(e){var o=0,s=e.total,a=e.loaded||e.position,l=r.getUploadStats(i,a,s);e.lengthComputable&&!n.enableResumableUpload&&(o=t.round(a/s*100)),i?n._setFileUploadStats(i,o,l):n._setProgress(o,null,null,n._getStats(l)),n._raise("fileajaxprogress",[l])};return e.upload&&(n.progressDelay&&(o=t.debounce(o,n.progressDelay)),e.upload.addEventListener("progress",o,!1)),e},_initAjaxSettings:function(){var t=this;t._ajaxSettings=e.extend(!0,{},t.ajaxSettings),t._ajaxDeleteSettings=e.extend(!0,{},t.ajaxDeleteSettings)},_mergeAjaxCallback:function(e,t,i){var n,r=this,o=r._ajaxSettings,s=r.mergeAjaxCallbacks;"delete"===i&&(o=r._ajaxDeleteSettings,s=r.mergeAjaxDeleteCallbacks),n=o[e],o[e]=s&&"function"==typeof n?"before"===s?function(){n.apply(this,arguments),t.apply(this,arguments)}:function(){t.apply(this,arguments),n.apply(this,arguments)}:t},_ajaxSubmit:function(t,i,n,r,o,s,a,l){var c,u,d,h=this,p=h.taskManager;h._raise("filepreajax",[o,s,a])&&(o.append("initialPreview",JSON.stringify(h.initialPreview)),o.append("initialPreviewConfig",JSON.stringify(h.initialPreviewConfig)),o.append("initialPreviewThumbTags",JSON.stringify(h.initialPreviewThumbTags)),h._initAjaxSettings(),h._mergeAjaxCallback("beforeSend",t),h._mergeAjaxCallback("success",i),h._mergeAjaxCallback("complete",n),h._mergeAjaxCallback("error",r),"function"==typeof(l=l||h.uploadUrlThumb||h.uploadUrl)&&(l=l()),"object"==typeof(d=h._getExtraData(s,a)||{})&&e.each(d,(function(e,t){o.append(e,t)})),u={xhr:function(){var t=e.ajaxSettings.xhr();return h._initXhr(t,s)},url:h._encodeURI(l),type:"POST",dataType:"json",data:o,cache:!1,processData:!1,contentType:!1},c=e.extend(!0,{},u,h._ajaxSettings),h.ajaxQueue.push(c),p.addTask(s+"-"+a,(function(){var t,i,n=this.self;t=n.ajaxQueue.shift(),i=e.ajax(t),n.ajaxRequests.push(i)})).runWithContext({self:h}))},_mergeArray:function(e,i){var n=this,r=t.cleanArray(n[e]),o=t.cleanArray(i);n[e]=r.concat(o)},_initUploadSuccess:function(i,n,r){var o,s,a,l,c,u,d,h,p,f=this;f.showPreview&&"object"==typeof i&&!e.isEmptyObject(i)?(void 0!==i.initialPreview&&i.initialPreview.length>0&&(f.hasInitData=!0,c=i.initialPreview||[],u=i.initialPreviewConfig||[],d=i.initialPreviewThumbTags||[],o=void 0===i.append||i.append,c.length>0&&!t.isArray(c)&&(c=c.split(f.initialPreviewDelimiter)),c.length&&(f._mergeArray("initialPreview",c),f._mergeArray("initialPreviewConfig",u),f._mergeArray("initialPreviewThumbTags",d)),void 0!==n?r?(h=n.attr("id"),null!==(p=f._getUploadCacheIndex(h))&&(f.uploadCache[p]={id:h,content:c[0],config:u[0]||[],tags:d[0]||[],append:o})):(a=f.previewCache.add(c[0],u[0],d[0],o),s=f.previewCache.get(a,!1),l=t.createElement(s).hide().appendTo(n),n.fadeOut("slow",(function(){var e=l.find("> .file-preview-frame");e&&e.length&&e.insertBefore(n).fadeIn("slow").css("display:inline-block"),f._initPreviewActions(),f._clearFileInput(),n.remove(),l.remove(),f._initSortable()}))):(f.previewCache.set(c,u,d,o),f._initPreview(),f._initPreviewActions())),f._resetCaption()):f._resetCaption()},_getUploadCacheIndex:function(e){var t,i=this,n=i.uploadCache.length;for(t=0;t0||!e.isEmptyObject(b.uploadExtraData),k=b.ajaxOperations.uploadThumb,E=y.getFile(n),S={id:C,index:i,fileId:n},A=b.fileManager.getFileName(n,!0),P=function(){o&&o.resolve&&o.resolve()},I=function(){o&&o.reject&&o.reject()};b.enableResumableUpload||(b.uploadInitiated=!0,b.showPreview&&(a=y.getThumb(n),h=a.find(".file-thumb-progress"),c=a.find(".kv-file-upload"),u=a.find(".kv-file-remove"),h.show()),0===w||!T||b.showPreview&&c&&c.hasClass("disabled")||b._abort(S)||(_=function(){d?y.errors.push(n):y.removeFile(n),y.setProcessed(n),y.isProcessed()&&(b.fileBatchCompleted=!0,l())},l=function(){var e;b.fileBatchCompleted&&setTimeout((function(){var i=0===y.count(),n=y.errors.length;b._updateInitialPreview(),b.unlock(i),i&&b._clearFileInput(),e=b.$preview.find(".file-preview-initial"),b.uploadAsync&&e.length&&(t.addCss(e,t.SORT_CSS),b._initSortable()),b._raise("filebatchuploadcomplete",[y.stack,b._getExtraData()]),b.retryErrorUploads&&0!==n||y.clear(),b._setProgress(101),b.ajaxAborted=!1,b.uploadInitiated=!1}),b.processDelay)},p=function(o){s=b._getOutData(x,o),y.initStats(n),b.fileBatchCompleted=!1,r||(b.ajaxAborted=!1),b.showPreview&&(a.hasClass("file-preview-success")||(b._setThumbStatus(a,"Loading"),t.addCss(a,"file-uploading")),c.attr("disabled",!0),u.attr("disabled",!0)),r||b.lock(),-1!==y.errors.indexOf(n)&&delete y.errors[n],b._raise("filepreupload",[s,C,i,b._getThumbFileId(a)]),e.extend(!0,S,s),b._abort(S)&&(o.abort(),r||(b._setThumbStatus(a,"New"),a.removeClass("file-uploading"),c.removeAttr("disabled"),u.removeAttr("disabled")),b._setProgressCancelled())},m=function(o,l,u){var p=b.showPreview&&a.attr("id")?a.attr("id"):C;s=b._getOutData(x,u,o),e.extend(!0,S,s),setTimeout((function(){t.isEmpty(o)||t.isEmpty(o.error)?(b.showPreview&&(b._setThumbStatus(a,"Success"),c.hide(),b._initUploadSuccess(o,a,r),b._setProgress(101,h)),b._raise("fileuploaded",[s,p,i,b._getThumbFileId(a)]),r?(_(),P()):b.fileManager.remove(a)):(d=!0,f=b._parseError(k,u,b.msgUploadError,b.fileManager.getFileName(n)),b._showFileError(f,S),b._setPreviewError(a,!0),b.retryErrorUploads||c.hide(),r&&(_(),P()),b._setProgress(101,b._getFrame(p).find(".file-thumb-progress"),b.msgUploadError))}),b.processDelay)},g=function(){b.showPreview&&(c.removeAttr("disabled"),u.removeAttr("disabled"),a.removeClass("file-uploading")),r?l():(b.unlock(!1),b._clearFileInput()),b._initSuccessThumbs()},v=function(t,i,o){f=b._parseError(k,t,o,b.fileManager.getFileName(n)),d=!0,setTimeout((function(){var i;r&&(_(),I()),b.fileManager.setProgress(n,100),b._setPreviewError(a,!0),b.retryErrorUploads||c.hide(),e.extend(!0,S,b._getOutData(x,t)),b._setProgress(101,b.$progress,b.msgAjaxProgressError.replace("{operation}",k)),i=b.showPreview&&a?a.find(".file-thumb-progress"):"",b._setProgress(101,i,b.msgUploadError),b._showFileError(f,S)}),b.processDelay)},b._setFileData(x,E.file,A,n),b._setUploadData(x,{fileId:n}),b._ajaxSubmit(p,m,g,v,x,n,i)))},_setFileData:function(e,t,i,n){var r=this,o=r.preProcessUpload;o&&"function"==typeof o?e.append(r.uploadFileAttr,o(n,t)):e.append(r.uploadFileAttr,t,i)},_checkBatchPreupload:function(t,i){var n=this;return!!n._raise("filebatchpreupload",[t])||(n._abort(t),i&&i.abort(),n._getThumbs().each((function(){var t=e(this),i=t.find(".kv-file-upload"),r=t.find(".kv-file-remove");t.hasClass("file-preview-loading")&&(n._setThumbStatus(t,"New"),t.removeClass("file-uploading")),i.removeAttr("disabled"),r.removeAttr("disabled")})),n._setProgressCancelled(),!1)},_uploadBatch:function(){var i,n,r,o,s,a,l=this,c=l.fileManager,u=c.total(),d={},h=u>0||!e.isEmptyObject(l.uploadExtraData),p=new FormData,f=l.ajaxOperations.uploadBatch;if(0!==u&&h&&!l._abort(d)){a=function(){l.fileManager.clear(),l._clearFileInput()},i=function(i){l.lock(),c.initStats();var n=l._getOutData(p,i);l.ajaxAborted=!1,l.showPreview&&l._getThumbs().each((function(){var i=e(this),n=i.find(".kv-file-upload"),r=i.find(".kv-file-remove");i.hasClass("file-preview-success")||(l._setThumbStatus(i,"Loading"),t.addCss(i,"file-uploading")),n.attr("disabled",!0),r.attr("disabled",!0)})),l._checkBatchPreupload(n,i)},n=function(i,n,r){var o=l._getOutData(p,r,i),c=0,u=l._getThumbs(":not(.file-preview-success)"),d=t.isEmpty(i)||t.isEmpty(i.errorkeys)?[]:i.errorkeys;t.isEmpty(i)||t.isEmpty(i.error)?(l._raise("filebatchuploadsuccess",[o]),a(),l.showPreview?(u.each((function(){var t=e(this);l._setThumbStatus(t,"Success"),t.removeClass("file-uploading"),t.find(".kv-file-upload").hide().removeAttr("disabled")})),l._initUploadSuccess(i)):l.reset(),l._setProgress(101)):(l.showPreview&&(u.each((function(){var t=e(this);t.removeClass("file-uploading"),t.find(".kv-file-upload").removeAttr("disabled"),t.find(".kv-file-remove").removeAttr("disabled"),0===d.length||-1!==e.inArray(c,d)?(l._setPreviewError(t,!0),l.retryErrorUploads||(t.find(".kv-file-upload").hide(),l.fileManager.remove(t))):(t.find(".kv-file-upload").hide(),l._setThumbStatus(t,"Success"),l.fileManager.remove(t)),t.hasClass("file-preview-error")&&!l.retryErrorUploads||c++})),l._initUploadSuccess(i)),s=l._parseError(f,r,l.msgUploadError),l._showFileError(s,o,"filebatchuploaderror"),l._setProgress(101,l.$progress,l.msgUploadError))},o=function(){l.unlock(),l._initSuccessThumbs(),l._clearFileInput(),l._raise("filebatchuploadcomplete",[l.fileManager.stack,l._getExtraData()])},r=function(t,i,n){var r=l._getOutData(p,t);s=l._parseError(f,t,n),l._showFileError(s,r,"filebatchuploaderror"),l.uploadFileCount=u-1,l.showPreview&&(l._getThumbs().each((function(){var t=e(this);t.removeClass("file-uploading"),l._getThumbFile(t)&&l._setPreviewError(t)})),l._getThumbs().removeClass("file-uploading"),l._getThumbs(" .kv-file-upload").removeAttr("disabled"),l._getThumbs(" .kv-file-delete").removeAttr("disabled"),l._setProgress(101,l.$progress,l.msgAjaxProgressError.replace("{operation}",f)))};var m=0;e.each(l.fileManager.stack,(function(e,i){t.isEmpty(i.file)||l._setFileData(p,i.file,i.nameFmt||"untitled_"+m,e),m++})),l._ajaxSubmit(i,n,o,r,p)}},_uploadExtraOnly:function(){var e,i,n,r,o,s=this,a={},l=new FormData,c=s.ajaxOperations.uploadExtra;e=function(e){s.lock();var t=s._getOutData(l,e);s._setProgress(50),a.data=t,a.xhr=e,s._checkBatchPreupload(t,e)},i=function(e,i,n){var r=s._getOutData(l,n,e);t.isEmpty(e)||t.isEmpty(e.error)?(s._raise("filebatchuploadsuccess",[r]),s._clearFileInput(),s._initUploadSuccess(e),s._setProgress(101)):(o=s._parseError(c,n,s.msgUploadError),s._showFileError(o,r,"filebatchuploaderror"))},n=function(){s.unlock(),s._clearFileInput(),s._raise("filebatchuploadcomplete",[s.fileManager.stack,s._getExtraData()])},r=function(e,t,i){var n=s._getOutData(l,e);o=s._parseError(c,e,i),a.data=n,s._showFileError(o,n,"filebatchuploaderror"),s._setProgress(101,s.$progress,s.msgAjaxProgressError.replace("{operation}",c))},s._ajaxSubmit(e,i,n,r,l)},_deleteFileIndex:function(i){var n=this,r=i.attr("data-fileindex"),o=n.reversePreviewOrder;r.substring(0,5)===t.INIT_FLAG&&(r=parseInt(r.replace(t.INIT_FLAG,"")),n.initialPreview=t.spliceArray(n.initialPreview,r,o),n.initialPreviewConfig=t.spliceArray(n.initialPreviewConfig,r,o),n.initialPreviewThumbTags=t.spliceArray(n.initialPreviewThumbTags,r,o),n.getFrames().each((function(){var i=e(this),n=i.attr("data-fileindex");n.substring(0,5)===t.INIT_FLAG&&(n=parseInt(n.replace(t.INIT_FLAG,"")))>r&&(n--,i.attr("data-fileindex",t.INIT_FLAG+n))})))},_resetCaption:function(){var e=this;setTimeout((function(){var t,i,n,r="",o=e.previewCache.count(!0),s=e.fileManager.count(),a=":not(.file-preview-success):not(.file-preview-error)",l=e.showPreview&&e.getFrames(a).length;0!==s||0!==o||l?((t=o+s)>1?r=e._getMsgSelected(t):0===s?(r="",(n=e.initialPreviewConfig[0])&&(r=n.caption||n.filename||""),r||(r=e._getMsgSelected(t))):r=(i=e.fileManager.getFirstFile())?i.nameFmt:"_",e._setCaption(r)):e.reset()}),e.processDelay)},_handleRotation:function(t,i,n){var r,o,s,a,l,c,u,d,h,p=this,f="",m=1,g=i[0],v=i.parent(),_=e("body"),b=!!_.length;b&&_.addClass("kv-overflow-hidden"),i.length&&!t.hasClass("hide-rotate")?((a=i.css("transform"))&&i.css("transform","none"),a&&i.css("transform",a),r="rotate("+(n=n||0)+"deg)",o="rotate("+(s=n%360)+"deg)",f="",90!==s&&270!==s||(m=(c=g.naturalWidth||i.outerWidth()||0)>(l=g.naturalHeight||i.outerHeight()||0)&&0!=c?(l/c).toFixed(2):1,v.length&&(d=v.height(),h=v.width(),d>m*(u=Math.min(c,h))&&(m=u>d&&0!=u?(d/u).toFixed(2):1)),1!==m&&(f=" scale("+m+")")),i.addClass("rotate-animate").css("transform",r+f),setTimeout((function(){i.removeClass("rotate-animate").css("transform",o+f),b&&_.removeClass("kv-overflow-hidden"),t.data("angle",s)}),p.fadeDelay)):b&&_.removeClass("kv-overflow-hidden")},_initRotateButton:function(){var i=this;i.getFrames(".rotatable .kv-file-rotate").each((function(){var n=e(this),r=n.closest(t.FRAMES),o=r.find(".kv-file-content > :first-child");i._handler(n,"click",(function(){var e=(r.data("angle")||0)+90;i._handleRotation(r,o,e)}))}))},_initRotateZoom:function(e,t){var i=this,n=i.$modal,r=n.find(".btn-kv-rotate"),o=e.data("angle");n.data("angle",o),r.length&&(r.off("click"),n.hasClass("rotatable")&&r.on("click",(function(){o=(n.data("angle")||0)+90,n.data("angle",o),i._handleRotation(n,n.find(".file-zoom-detail"),o),i._handleRotation(e,t,o),e.hasClass("hide-rotate")&&e.data("angle",o)})))},_initFileActions:function(){var i=this;i.showPreview&&(i._initZoomButton(),i._initRotateButton(),i.getFrames(" .kv-file-remove").each((function(){var n,r=e(this),o=r.closest(t.FRAMES),s=o.attr("id"),a=o.attr("data-fileindex");i.fileManager;i._handler(r,"click",(function(){if(!1===i._raise("filepreremove",[s,a])||!i._validateMinCount())return!1;n=o.hasClass("file-preview-error"),t.cleanMemory(o),o.fadeOut("slow",(function(){i.fileManager.remove(o),i._clearObjects(o),o.remove(),s&&n&&i.$errorContainer.find('li[data-thumb-id="'+s+'"]').fadeOut("fast",(function(){e(this).remove(),i._errorsExist()||i._resetErrors()})),i._clearFileInput(),i._resetCaption(),i._raise("fileremoved",[s,a])}))}))})),i.getFrames(" .kv-file-upload").each((function(){var n=e(this);i._handler(n,"click",(function(){var e=n.closest(t.FRAMES),r=i._getThumbFileId(e);i._hideProgress(),e.hasClass("file-preview-error")&&!i.retryErrorUploads||i._uploadSingle(i.fileManager.getIndex(r),r,!1)}))})))},_initPreviewActions:function(){var i=this,n=i.$preview,r=i.deleteExtraData||{},o=t.FRAMES+" .kv-file-remove",s=i.fileActionSettings,a=s.removeClass,l=s.removeErrorClass,c=function(){var e=i.isAjaxUpload?i.previewCache.count(!0):i._inputFileCount();i.getFrames().length||e?i._resetCaption():(i._setCaption(""),i.reset(),i.initialCaption="")};i._initZoomButton(),i._initRotateButton(),n.find(o).each((function(){var n,o,s,u,d=e(this),h=d.data("url")||i.deleteUrl,p=d.data("key"),f=i.ajaxOperations.deleteThumb;if(!t.isEmpty(h)&&void 0!==p){"function"==typeof h&&(h=h());var m,g,v,_,b,y=d.closest(t.FRAMES),w=i.previewCache.data,x=y.attr("data-fileindex");x=parseInt(x.replace(t.INIT_FLAG,"")),v=t.isEmpty(w.config)&&t.isEmpty(w.config[x])?null:w.config[x],b=t.isEmpty(v)||t.isEmpty(v.extra)?r:v.extra,_=v&&(v.filename||v.caption)||"","function"==typeof b&&(b=b()),g={id:d.attr("id"),key:p,extra:b},o=function(e){i.ajaxAborted=!1,i._raise("filepredelete",[p,e,b]),i._abort()?e.abort():(d.removeClass(l),t.addCss(y,"file-uploading"),t.addCss(d,"disabled "+a))},s=function(e,r,o){var s,u;if(!t.isEmpty(e)&&!t.isEmpty(e.error))return g.jqXHR=o,g.response=e,n=i._parseError(f,o,i.msgDeleteError,_),i._showFileError(n,g,"filedeleteerror"),y.removeClass("file-uploading"),d.removeClass("disabled "+a).addClass(l),void c();y.removeClass("file-uploading").addClass("file-deleted"),y.fadeOut("slow",(function(){x=parseInt(y.attr("data-fileindex").replace(t.INIT_FLAG,"")),i.previewCache.unset(x),i._deleteFileIndex(y),s=i.previewCache.count(!0),u=s>0?i._getMsgSelected(s):"",i._setCaption(u),i._raise("filedeleted",[p,o,b]),i._clearObjects(y),y.remove(),c()}))},u=function(e,t,n){var r=i._parseError(f,e,n,_);g.jqXHR=e,g.response={},i._showFileError(r,g,"filedeleteerror"),y.removeClass("file-uploading"),d.removeClass("disabled "+a).addClass(l),c()},i._initAjaxSettings(),i._mergeAjaxCallback("beforeSend",o,"delete"),i._mergeAjaxCallback("success",s,"delete"),i._mergeAjaxCallback("error",u,"delete"),m=e.extend(!0,{},{url:i._encodeURI(h),type:"POST",dataType:"json",data:e.extend(!0,{},{key:p},b)},i._ajaxDeleteSettings),i._handler(d,"click",(function(){if(!i._validateMinCount())return!1;i.ajaxAborted=!1,i._raise("filebeforedelete",[p,b]),i.ajaxAborted instanceof Promise?i.ajaxAborted.then((function(t){t||e.ajax(m)})):i.ajaxAborted||e.ajax(m)}))}}))},_hideFileIcon:function(){var e=this;e.overwriteInitial&&e.$captionContainer.removeClass("icon-visible")},_showFileIcon:function(){var e=this;t.addCss(e.$captionContainer,"icon-visible")},_getSize:function(t,i,n){var r,o,s=this,a=parseFloat(t),l=0,c=s.bytesToKB,u=s.fileSizeGetter,d=a;if(!e.isNumeric(t)||!e.isNumeric(a))return"";if("function"==typeof u)r=u(a);else{if(n||(n=s.sizeUnits),a>0){for(;d>=c;)d/=c,++l;n[l]||(d=a,l=0)}(o=d.toFixed(2))==d&&(o=d),r=o+" "+n[l]}return i?r:s._getLayoutTemplate("size").replace("{sizeText}",r)},_getFileType:function(e){return this.mimeTypeAliases[e]||e},_generatePreviewTemplate:function(i,n,r,o,s,a,l,c,u,d,h,p,f,m,g){var v,_,b,y,w=this,x=w.slug(r),C="",T="",k=u||r,E=k.split(".").pop().toLowerCase(),S=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,A=x,P=x,I="type-default",D=h||w._renderFileFooter(i,x,c,"auto",l),F=-1!==e.inArray(E,w.alwaysPreviewFileExtensions),L=w.preferIconicPreview&&!F,M=w.preferIconicZoomPreview&&!F,O=L?"other":i;return(v=S<400?w.previewSettingsSmall[O]||w.defaults.previewSettingsSmall[O]:w.previewSettings[O]||w.defaults.previewSettings[O])&&e.each(v,(function(e,t){T+=e+":"+t+";"})),_=function(n,l,c,u,h){var g,v=c?"zoom-"+s:s,_=w._getPreviewTemplate(n),b=(d||"")+" "+u;return w.frameClass&&(b=w.frameClass+" "+b),c&&(b=b.replace(" "+t.SORT_CSS,"")),_=w._parseFilePreviewIcon(_,r),"object"!==i||o||e.each(w.defaults.fileTypeSettings,(function(e,t){"object"!==e&&"other"!==e&&t(r,o)&&(I="type-"+e)})),t.isEmpty(m)||(void 0!==m.title&&null!==m.title&&(A=m.title),void 0!==m.alt&&null!==m.alt&&(P=A=m.alt)),g={previewId:v,caption:x,title:A,alt:P,frameClass:b,type:w._getFileType(o),fileindex:p,fileid:a||"",filename:k,typeCss:I,footer:D,data:c&&h?w.zoomPlaceholder+"{zoomData}":l,template:f||i,style:T?'style="'+T+'"':"",zoomData:h?encodeURIComponent(h):""},c&&(g.zoomCache="",g.zoomData="{zoomData}"),_.setTokens(g)},p=p||s.slice(s.lastIndexOf("-")+1),y=w.fileActionSettings.showRotate&&-1!==e.inArray(E,w.rotatableFileExtensions),w.fileActionSettings.showZoom&&(b="kv-zoom-thumb",y&&(b+=" rotatable"+(M?" hide-rotate":"")),C=_(M?"other":i,n,!0,b,g)),C="\n"+w._getLayoutTemplate("zoomCache").replace("{zoomContent}",C),"function"==typeof w.sanitizeZoomCache&&(C=w.sanitizeZoomCache(C)),b="kv-preview-thumb",y&&(b+=" rotatable"+(L||w.hideThumbnailContent||!!w.previewFileIconSettings[E]?" hide-rotate":"")),_(L?"other":i,n,!1,b,g).setTokens({zoomCache:C})},_addToPreview:function(e,i){var n,r=this;return i=t.cspBuffer.stash(i),n=r.reversePreviewOrder?e.prepend(i):e.append(i),t.cspBuffer.apply(e),n},_previewDefault:function(e,i){var n=this,r=n.$preview;if(n.showPreview){var o,s=t.getFileName(e),a=e?e.type:"",l=e.size||0,c=n._getFileName(e,""),u=!0===i&&!n.isAjaxUpload,d=t.createObjectURL(e),h=n.fileManager.getId(e),p=n._getThumbId(h);n._clearDefaultPreview(),o=n._generatePreviewTemplate("other",d,s,a,p,h,u,l),n._addToPreview(r,o),n._setThumbAttr(p,c,l),!0===i&&n.isAjaxUpload&&n._setThumbStatus(n._getFrame(p),"Error")}},_previewFile:function(e,i,n,r,o){if(this.showPreview){var s,a=this,l=t.getFileName(i),c=o.type,u=o.name,d=a._parseFileType(c,l),h=a.$preview,p=i.size||0,f="image"===d?n.target.result:r,m=a.fileManager.getId(i),g=a._getThumbId(m);s=a._generatePreviewTemplate(d,f,l,c,g,m,!1,p,o.filename),a._clearDefaultPreview(),a._addToPreview(h,s);var v=a._getFrame(g);a._validateImageOrientation(v.find("img"),i,g,m,u,c,p,f),a._setThumbAttr(g,u,p),a._initSortable()}},_setThumbAttr:function(e,t,i,n){var r=this,o=r._getFrame(e);o.length&&(i=i&&i>0?r._getSize(i):"",o.data({caption:t,size:i,description:n||""}))},_setInitThumbAttr:function(){var e,i,n,r,o,s=this,a=s.previewCache.data,l=s.previewCache.count(!0);if(0!==l)for(var c=0;c&"']/g,"_")},_updateFileDetails:function(e){var i,n,r,o,s=this,a=s.$element,l=t.isIE(9)&&t.findFileName(a.val())||a[0].files[0]&&a[0].files[0].name;i=!l&&s.fileManager.count()>0?s.fileManager.getFirstFile().nameFmt:l?s.slug(l):"_",n=s.isAjaxUpload?s.fileManager.count():e,o=s.previewCache.count(!0)+n,r=1===n?i:s._getMsgSelected(o,!s.isAjaxUpload&&!s.isError),s.isError?(s.$previewContainer.removeClass("file-thumb-loading"),s._initCapStatus(),s.$previewStatus.html(""),s.$captionContainer.removeClass("icon-visible")):s._showFileIcon(),s._setCaption(r,s.isError),s.$container.removeClass("file-input-new file-input-ajax-new"),s._raise("fileselect",[e,i]),s.previewCache.count(!0)&&s._initPreviewActions()},_setThumbStatus:function(e,i){var n=this;if(n.showPreview){var r="indicator"+i,o=r+"Title",s="file-preview-"+i.toLowerCase(),a=e.find(".file-upload-indicator"),l=n.fileActionSettings;e.removeClass("file-preview-success file-preview-error file-preview-paused file-preview-loading"),"Success"===i&&e.find(".file-drag-handle").remove(),t.setHtml(a,l[r]),a.attr("title",l[o]),e.addClass(s),"Error"!==i||n.retryErrorUploads||e.find(".kv-file-upload").attr("disabled",!0)}},_setProgressCancelled:function(){var e=this;e._setProgress(101,e.$progress,e.msgCancelled)},_setProgress:function(e,i,n,r){var o=this;if((i=i||o.$progress).length){var s,a=Math.min(e,100),l=o.progressUploadThreshold,c=e<=100?o.progressTemplate:o.progressCompleteTemplate,u=a<100?o.progressTemplate:n?o.paused?o.progressPauseTemplate:o.progressErrorTemplate:c;e>=100&&(r=""),t.isEmpty(u)||(r=r||"",s=(s=l&&a>l&&e<=100?u.setTokens({percent:l,status:o.msgUploadThreshold}):u.setTokens({percent:a,status:e>100?o.msgUploadEnd:a+"%"})).setTokens({stats:r}),t.setHtml(i,s),n&&t.setHtml(i.find('[role="progressbar"]'),n))}},_hasFiles:function(){var e=this.$element[0];return!!(e&&e.files&&e.files.length)},_setFileDropZoneTitle:function(){var e,i=this,n=i.$container.find(".file-drop-zone"),r=i.dropZoneTitle;i.isClickable&&(e=t.isEmpty(i.$element.attr("multiple"))?i.fileSingle:i.filePlural,r+=i.dropZoneClickTitle.replace("{files}",e)),n.find("."+i.dropZoneTitleClass).remove(),!i.showPreview||0===n.length||i.fileManager.count()>0||!i.dropZoneEnabled||i.previewCache.count()>0||!i.isAjaxUpload&&i._hasFiles()||(0===n.find(t.FRAMES).length&&t.isEmpty(i.defaultPreviewContent)&&n.prepend('
    '+r+"
    "),i.$container.removeClass("file-input-new"),t.addCss(i.$container,"file-input-ajax-new"))},_getStats:function(e){var i,n,r=this;return r.showUploadStats&&e&&e.bitrate?(n=r._getLayoutTemplate("stats"),i=e.elapsed&&e.bps?r.msgPendingTime.setTokens({time:t.getElapsed(Math.ceil(e.pendingBytes/e.bps))}):r.msgCalculatingTime,n.setTokens({uploadSpeed:e.bitrate,pendingTime:i})):""},_setResumableProgress:function(e,t,i){var n=this,r=n.resumableManager,o=i?r:n,s=i?i.find(".file-thumb-progress"):null;0===o.lastProgress&&(o.lastProgress=e),e0&&e._getFileCount(t-1)=d:l<=d)||(a=u["msgImage"+i+e]||'Image "{name}" has a size validation error (limit "{size}").',u._showFileError(a.setTokens({name:o,size:d,dimension:l}),s),u._setPreviewError(r),u.fileManager.remove(r),u._clearFileInput(),!1))},_getExifObj:function(e){var i,n=this,r=t.logMessages.exifWarning;if("data:image/jpeg;base64,"===e.slice(0,23)||"data:image/jpg;base64,"===e.slice(0,22)){try{i=window.piexif?window.piexif.load(e):null}catch(e){i=null,r=e&&e.message||""}return!i&&n.showExifErrorLog&&n._log(t.logMessages.badExifParser,{details:r}),i}i=null},setImageOrientation:function(i,n,r,o){var s,a,l,c=this,u=!i||!i.length,d=!n||!n.length,h=!1,p=u&&o&&"image"===o.attr("data-template");u&&d||(l="load.fileinputimageorient",p?(i=n,n=null,i.css(c.previewSettings.image),a=e(document.createElement("div")).appendTo(o.find(".kv-file-content")),s=e(document.createElement("span")).insertBefore(i),i.css("visibility","hidden").removeClass("file-zoom-detail").appendTo(a)):h=!i.is(":visible"),i.off(l).on(l,(function(){h&&(c.$preview.removeClass("hide-content"),o.find(".kv-file-content").css("visibility","hidden"));var e=i[0],l=n&&n.length?n[0]:null,u=e.offsetHeight,d=e.offsetWidth,f=t.getRotation(r);if(h&&(o.find(".kv-file-content").css("visibility","visible"),c.$preview.addClass("hide-content")),i.data("orientation",r),l&&n.data("orientation",r),r<5)return t.setTransform(e,f),void t.setTransform(l,f);var m=Math.atan(d/u),g=Math.sqrt(Math.pow(u,2)+Math.pow(d,2)),v=g?u/Math.cos(Math.PI/2+m)/g:1,_=" scale("+Math.abs(v)+")";t.setTransform(e,f+_),t.setTransform(l,f+_),p&&(i.css("visibility","visible").insertAfter(s).addClass("file-zoom-detail"),s.remove(),a.remove())})))},_validateImageOrientation:function(i,n,r,o,s,a,l,c){var u,d,h=this,p=null,f=h.autoOrientImage;if(p=h._getExifObj(c),h.canOrientImage)return i.css("image-orientation",f?"from-image":"none"),void h._validateImage(r,o,s,a,l,c,p);d=t.getZoomSelector(r," img"),(u=p?p["0th"][piexif.ImageIFD.Orientation]:null)?(h.setImageOrientation(i,e(d),u,h._getFrame(r)),h._raise("fileimageoriented",{$img:i,file:n}),h._validateImage(r,o,s,a,l,c,p)):h._validateImage(r,o,s,a,l,c,p)},_validateImage:function(e,t,i,n,r,o,s){var a,l,c,u=this,d=u.$preview,h=u._getFrame(e),p=h.attr("data-fileindex"),f=h.find("img");i=i||"Untitled",f.one("load",(function(){f.data("validated")||(f.data("validated",!0),l=h.width(),c=d.width(),l>c&&f.css("width","100%"),a={ind:p,id:e,fileId:t},setTimeout((function(){var l,c;l=u._isValidSize("Small","Width",f,h,i,a),c=u._isValidSize("Small","Height",f,h,i,a),u.resizeImage||(l=l&&u._isValidSize("Large","Width",f,h,i,a),c=c&&u._isValidSize("Large","Height",f,h,i,a)),u._raise("fileimageloaded",[e]),h.data("exif",s),l&&c&&(u.fileManager.addImage(t,{ind:p,img:f,thumb:h,pid:e,typ:n,siz:r,validated:!1,imgData:o,exifObj:s}),u._validateAllImages())}),u.processDelay))})).one("error",(function(){u._raise("fileimageloaderror",[e])}))},_validateAllImages:function(){var t,i=this,n={val:0},r=i.fileManager.getImageCount(),o=i.resizeIfSizeMoreThan;r===i.fileManager.totalImages&&(i._raise("fileimagesloaded"),i.resizeImage&&e.each(i.fileManager.loadedImages,(function(e,s){s.validated||((t=s.siz)&&t>o*i.bytesToKB&&i._getResizedImage(e,s,n,r),s.validated=!0)})))},_getResizedImage:function(i,n,r,o){var s,a,l,c,u,d,h,p,f,m=this,g=e(n.img)[0],v=g.naturalWidth,_=g.naturalHeight,b=1,y=m.maxImageWidth||v,w=m.maxImageHeight||_,x=!(!v||!_),C=m.imageCanvas,T=m.imageCanvasContext,k=n.typ,E=n.pid,S=n.ind,A=n.thumb,P=n.exifObj;if(u=function(e,t,i){m.isAjaxUpload?m._showFileError(e,t,i):m._showError(e,t,i),m._setPreviewError(A)},p={id:E,index:S,fileId:i},f=[i,E,S],(h=m.fileManager.getFile(i))&&x&&!(v<=y&&_<=w)||(x&&h&&m._raise("fileimageresized",f),r.val++,r.val===o&&m._raise("fileimagesresized"),x)){k=k||m.resizeDefaultImageType,a=v>y,l=_>w,b="width"===m.resizePreference?a?y/v:l?w/_:1:l?w/_:a?y/v:1,m._resetCanvas(),v*=b,_*=b,C.width=v,C.height=_;try{T.drawImage(g,0,0,v,_),c=C.toDataURL(k,m.resizeQuality),P&&(d=window.piexif.dump(P),c=window.piexif.insert(d,c)),s=t.dataURI2Blob(c),m.fileManager.setFile(i,s),m._raise("fileimageresized",f),r.val++,r.val===o&&m._raise("fileimagesresized",[void 0,void 0]),s instanceof Blob||u(m.msgImageResizeError,p,"fileimageresizeerror")}catch(e){r.val++,r.val===o&&m._raise("fileimagesresized",[void 0,void 0]),u(m.msgImageResizeException.replace("{errors}",e.message),p,"fileimageresizeexception")}}else u(m.msgImageResizeError,p,"fileimageresizeerror")},_showProgress:function(){var e=this;e.$progress&&e.$progress.length&&e.$progress.show()},_hideProgress:function(){var e=this;e.$progress&&e.$progress.length&&e.$progress.hide()},_initBrowse:function(e){var i=this,n=i.$element;i.showBrowse?i.$btnFile=e.find(".btn-file").append(n):(n.appendTo(e).attr("tabindex",-1),t.addCss(n,"file-no-browse"))},_initClickable:function(){var i,n,r=this;r.isClickable&&(i=r.$dropZone,r.isAjaxUpload||(n=r.$preview.find(".file-default-preview")).length&&(i=n),t.addCss(i,"clickable"),i.attr("tabindex",-1),r._handler(i,"click",(function(t){var n=e(t.target);r.$errorContainer.is(":visible")||n.parents(".file-preview-thumbnails").length&&!n.parents(".file-default-preview").length||(r.$element.data("zoneClicked",!0).trigger("click"),i.blur())})))},_initCaption:function(){var e=this,i=e.initialCaption||"";return e.overwriteInitial||t.isEmpty(i)?(e.$caption.val(""),!1):(e._setCaption(i),!0)},_setCaption:function(i,n){var r,o,s,a,l,c,u=this;if(u.$caption.length){if(u.$captionContainer.removeClass("icon-visible"),n)r=e("
    "+u.msgValidationError+"
    ").text(),(a=u.fileManager.count())?(c=u.fileManager.getFirstFile(),l=1===a&&c?c.nameFmt:u._getMsgSelected(a)):l=u._getMsgSelected(u.msgNo),o=t.isEmpty(i)?l:i,s=''+u.msgValidationErrorIcon+"";else{if(t.isEmpty(i))return void u.$caption.attr("title","");o=r=e("
    "+i+"
    ").text(),s=u._getLayoutTemplate("fileIcon")}u.$captionContainer.addClass("icon-visible"),u.$caption.attr("title",r).val(o),t.setHtml(u.$captionIcon,s)}},_createContainer:function(){var e=this,i={class:"file-input file-input-new"+(e.rtl?" kv-rtl":"")},n=t.createElement(t.cspBuffer.stash(e._renderMain()));return t.cspBuffer.apply(n),n.insertBefore(e.$element).attr(i),e._initBrowse(n),e.theme&&n.addClass("theme-"+e.theme),n},_refreshContainer:function(){var e=this,i=e.$container;e.$element.insertAfter(i),t.setHtml(i,e._renderMain()),e._initBrowse(i),e._validateDisabled()},_validateDisabled:function(){var e=this;e.$caption.attr({readonly:e.isDisabled})},_setTabIndex:function(e,t){var i=this.tabIndexConfig[e];return t.setTokens({tabIndexConfig:null==i?"":'tabindex="'+i+'"'})},_renderMain:function(){var e=this,t=e.dropZoneEnabled?" file-drop-zone":"file-drop-disabled",i=e.showClose?e._getLayoutTemplate("close"):"",n=e.showPreview?e._getLayoutTemplate("preview").setTokens({class:e.previewClass,dropClass:t}):"",r=e.isDisabled?e.captionClass+" file-caption-disabled":e.captionClass,o=e.captionTemplate.setTokens({class:r+" kv-fileinput-caption"});return o=e._setTabIndex("caption",o),e.mainTemplate.setTokens({class:e.mainClass+(!e.showBrowse&&e.showCaption?" no-browse":""),inputGroupClass:e.inputGroupClass,preview:n,close:i,caption:o,upload:e._renderButton("upload"),remove:e._renderButton("remove"),cancel:e._renderButton("cancel"),pause:e._renderButton("pause"),browse:e._renderButton("browse")})},_renderButton:function(e){var i=this,n=i._getLayoutTemplate("btnDefault"),r=i[e+"Class"],o=i[e+"Title"],s=i[e+"Icon"],a=i[e+"Label"],l=i.isDisabled?" disabled":"",c="button";switch(e){case"remove":if(!i.showRemove)return"";break;case"cancel":if(!i.showCancel)return"";r+=" kv-hidden";break;case"pause":if(!i.showPause)return"";r+=" kv-hidden";break;case"upload":if(!i.showUpload)return"";i.isAjaxUpload&&!i.isDisabled?n=i._getLayoutTemplate("btnLink").replace("{href}",i.uploadUrl):c="submit";break;case"browse":if(!i.showBrowse)return"";n=i._getLayoutTemplate("btnBrowse");break;default:return""}return n=i._setTabIndex(e,n),r+="browse"===e?" btn-file":" fileinput-"+e+" fileinput-"+e+"-button",t.isEmpty(a)||(a=' '+a+""),n.setTokens({type:c,css:r,title:o,status:l,icon:s,label:a})},_renderThumbProgress:function(){var e=this;return'
    '+e.progressInfoTemplate.setTokens({percent:101,status:e.msgUploadBegin,stats:""})+"
    "},_renderFileFooter:function(e,i,n,r,o){var s,a,l=this,c=l.fileActionSettings,u=c.showRemove,d=c.showDrag,h=c.showUpload,p=c.showRotate,f=c.showZoom,m=l._getLayoutTemplate("footer"),g=l._getLayoutTemplate("indicator"),v=o?c.indicatorError:c.indicatorNew,_=o?c.indicatorErrorTitle:c.indicatorNewTitle,b=g.setTokens({indicator:v,indicatorTitle:_});return a={type:e,caption:i,size:n=l._getSize(n),width:r,progress:"",indicator:b},l.isAjaxUpload?(a.progress=l._renderThumbProgress(),a.actions=l._renderFileActions(a,h,!1,u,p,f,d,!1,!1,!1)):a.actions=l._renderFileActions(a,!1,!1,!1,!1,f,d,!1,!1,!1),s=m.setTokens(a),s=t.replaceTags(s,l.previewThumbTags)},_renderFileActions:function(e,t,i,n,r,o,s,a,l,c,u,d,h){var p=this;if(!e.type&&u&&(e.type="image"),p.enableResumableUpload?t=!1:"function"==typeof t&&(t=t(e)),"function"==typeof i&&(i=i(e)),"function"==typeof n&&(n=n(e)),"function"==typeof o&&(o=o(e)),"function"==typeof s&&(s=s(e)),"function"==typeof r&&(r=r(e)),!(t||i||n||r||o||s))return"";var f,m=!1===l?"":' data-url="'+l+'"',g="",v="",_="",b=!1===c?"":' data-key="'+c+'"',y="",w="",x="",C=p._getLayoutTemplate("actions"),T=p.fileActionSettings,k=p.otherActionButtons.setTokens({dataKey:b,key:c}),E=a?T.removeClass+" disabled":T.removeClass;return n&&(y=p._getLayoutTemplate("actionDelete").setTokens({removeClass:E,removeIcon:T.removeIcon,removeTitle:T.removeTitle,dataUrl:m,dataKey:b,key:c})),r&&(_=p._getLayoutTemplate("actionRotate").setTokens({rotateClass:T.rotateClass,rotateIcon:T.rotateIcon,rotateTitle:T.rotateTitle})),t&&(w=p._getLayoutTemplate("actionUpload").setTokens({uploadClass:T.uploadClass,uploadIcon:T.uploadIcon,uploadTitle:T.uploadTitle})),i&&(x=(x=p._getLayoutTemplate("actionDownload").setTokens({downloadClass:T.downloadClass,downloadIcon:T.downloadIcon,downloadTitle:T.downloadTitle,downloadUrl:d||p.initialPreviewDownloadUrl})).setTokens({filename:h,key:c})),o&&(g=p._getLayoutTemplate("actionZoom").setTokens({zoomClass:T.zoomClass,zoomIcon:T.zoomIcon,zoomTitle:T.zoomTitle})),s&&u&&(f="drag-handle-init "+T.dragClass,v=p._getLayoutTemplate("actionDrag").setTokens({dragClass:f,dragTitle:T.dragTitle,dragIcon:T.dragIcon})),C.setTokens({delete:y,upload:w,download:x,rotate:_,zoom:g,drag:v,other:k})},_browse:function(e){var t=this;e&&e.isDefaultPrevented()||!t._raise("filebrowse")||(t.isError&&!t.isAjaxUpload&&t.clear(),t.focusCaptionOnBrowse&&t.$captionContainer.focus())},_change:function(i){var n=this;if(e(document.body).off("focusin.fileinput focusout.fileinput"),n.changeTriggered)n._toggleLoading("hide");else{n._toggleLoading("show");var r,o,s,a,l=n.$element,c=arguments.length>1,u=n.isAjaxUpload,d=c?arguments[1]:l[0].files,h=n.fileManager.count(),p=t.isEmpty(l.attr("multiple")),f=!u&&p?1:n.maxFileCount,m=n.maxTotalFileCount,g=m>0&&m>f,v=p&&h>0,_=function(t,i,r,o){var s=e.extend(!0,{},n._getOutData(null,{},{},d),{id:r,index:o}),a={id:r,index:o,file:i,files:d};return n.isPersistentError=!0,n._toggleLoading("hide"),u?n._showFileError(t,s):n._showError(t,a)},b=function(e,t,i){var r=i?n.msgTotalFilesTooMany:n.msgFilesTooMany;r=r.replace("{m}",t).replace("{n}",e),n.isError=_(r,null,null,null),n.$captionContainer.removeClass("icon-visible"),n._setCaption("",!0),n.$container.removeClass("file-input-new file-input-ajax-new")};if(n.reader=null,n._resetUpload(),n._hideFileIcon(),n.dropZoneEnabled&&n.$container.find(".file-drop-zone ."+n.dropZoneTitleClass).remove(),u||(d=i.target&&void 0===i.target.files?i.target.value?[{name:i.target.value.replace(/^.+\\/,"")}]:[]:i.target.files||{}),r=d,t.isEmpty(r)||0===r.length)return u||n.clear(),void n._raise("fileselectnone");if(n._resetErrors(),a=r.length,s=u?n.fileManager.count()+a:a,o=n._getFileCount(s,!g&&void 0),f>0&&o>f){if(!n.autoReplace||a>f)return void b(n.autoReplace&&a>f?a:o,f);o>f&&n._resetPreviewThumbs(u)}else{if(g&&(o=n._getFileCount(s,!0),m>0&&o>m)){if(!n.autoReplace||a>f)return void b(n.autoReplace&&a>m?a:o,m,!0);o>f&&n._resetPreviewThumbs(u)}!u||v?(n._resetPreviewThumbs(!1),v&&n.clearFileStack()):!u||0!==h||n.previewCache.count(!0)&&!n.overwriteInitial||n._resetPreviewThumbs(!0)}n.autoReplace&&n._getThumbs().each((function(){var t=e(this);(t.hasClass("file-preview-success")||t.hasClass("file-preview-error"))&&t.remove()})),n.readFiles(r),n._toggleLoading("hide")}},_abort:function(t){var i,n=this;return n.ajaxAborted&&"object"==typeof n.ajaxAborted&&void 0!==n.ajaxAborted.message?((i=e.extend(!0,{},n._getOutData(null),t)).abortData=n.ajaxAborted.data||{},i.abortMessage=n.ajaxAborted.message,n._setProgress(101,n.$progress,n.msgCancelled),n._showFileError(n.ajaxAborted.message,i,"filecustomerror"),n.cancel(),n.unlock(),!0):!!n.ajaxAborted},_resetFileStack:function(){var t=this,i=0;t._getThumbs().each((function(){var n=e(this),r=n.attr("data-fileindex"),o=n.attr("id");"-1"!==r&&-1!==r&&(t._getThumbFile(n)?n.attr({"data-fileindex":"-1"}):(n.attr({"data-fileindex":i}),i++),t._getZoom(o).attr({"data-fileindex":n.attr("data-fileindex")}))}))},_isFileSelectionValid:function(e){var t=this;return e=e||0,t.required&&!t.getFilesCount()?(t.$errorContainer.html(""),t._showFileError(t.msgFileRequired),!1):!(t.minFileCount>0&&t._getFileCount(e)g)&&(n||r||o)},addToStack:function(e,t){var i=this;i.stackIsUpdating=!0,i.fileManager.add(e,t),i._refreshPreview(),i.stackIsUpdating=!1},clearFileStack:function(){var e=this;return e.fileManager.clear(),e._initResumableUpload(),e.enableResumableUpload?(null===e.showPause&&(e.showPause=!0),null===e.showCancel&&(e.showCancel=!1)):(e.showPause=!1,null===e.showCancel&&(e.showCancel=!0)),e.$element},getFileStack:function(){return this.fileManager.stack},getFileList:function(){return this.fileManager.list()},getFilesSize:function(){return this.fileManager.getTotalSize()},getFilesCount:function(e){var t=this,i=t.isAjaxUpload?t.fileManager.count():t._inputFileCount();return e&&(i+=t.previewCache.count(!0)),t._getFileCount(i)},_initCapStatus:function(e){var t=this.$caption;t.removeClass("is-valid file-processing"),e&&("processing"===e?t.addClass("file-processing"):t.addClass("is-valid"))},_toggleLoading:function(e){var t=this;t.$previewStatus.html("hide"===e?"":t.msgProcessing),t.$container.removeClass("file-thumb-loading"),t._initCapStatus("hide"===e?"":"processing"),"hide"!==e&&(t.dropZoneEnabled&&t.$container.find(".file-drop-zone ."+t.dropZoneTitleClass).remove(),t.$container.addClass("file-thumb-loading"))},_initFileSelected:function(){var t=this,i=t.$element,n=e(document.body),r="focusin.fileinput focusout.fileinput";n.length?n.off(r).on("focusout.fileinput",(function(){t._toggleLoading("show")})).on("focusin.fileinput",(function(){setTimeout((function(){i.val()||t._setFileDropZoneTitle(),n.off(r),t._toggleLoading("hide")}),2500)})):t._toggleLoading("hide")},readFiles:function(i){this.reader=new FileReader;var n,r=this,o=r.reader,s=r.$previewContainer,a=r.$previewStatus,l=r.msgLoading,c=r.msgProgress,u=r.previewInitId,d=i.length,h=r.fileTypeSettings,p=r.allowedFileTypes,f=p?p.length:0,m=r.allowedFileExtensions,g=t.isEmpty(m)?"":m.join(", "),v=function(t,o,s,a,l){var c,u=e.extend(!0,{},r._getOutData(null,{},{},i),{id:s,index:a,fileId:l}),h={id:s,index:a,fileId:l,file:o,files:i};r._previewDefault(o,!0),c=r._getFrame(s,!0),r._toggleLoading("hide"),r.isAjaxUpload?setTimeout((function(){n(a+1)}),r.processDelay):(r.unlock(),d=0),r.removeFromPreviewOnError&&c.length?c.remove():(r._initFileActions(),c.find(".kv-file-upload").remove()),r.isPersistentError=!0,r.isError=r.isAjaxUpload?r._showFileError(t,u):r._showError(t,h),r._updateFileDetails(d)};r.fileManager.clearImages(),e.each(i,(function(e,t){var i=r.fileTypeSettings.image;i&&i(t.type)&&r.fileManager.totalImages++})),(n=function(_){var b,y=r.$errorContainer,w=r.fileManager;if(_>=d)return r.unlock(),r.duplicateErrors.length&&(b="
  • "+r.duplicateErrors.join("
  • ")+"
  • ",0===y.find("ul").length?t.setHtml(y,r.errorCloseButton+"
      "+b+"
    "):y.find("ul").append(b),y.fadeIn(r.fadeDelay),r._handler(y.find(".kv-error-close"),"click",(function(){y.fadeOut(r.fadeDelay)})),r.duplicateErrors=[]),r.isAjaxUpload?(r._raise("filebatchselected",[w.stack]),0!==w.count()||r.isError||r.reset()):r._raise("filebatchselected",[i]),s.removeClass("file-thumb-loading"),r._initCapStatus("valid"),void a.html("");r.lock(!0);var x,C,T,k,E,S,A,P,I,D,F,L,M,O,j,$,z=i[_],N=z&&z.size||0,R=r._getSize(N,!0),U=h.image,B=N/r.bytesToKB,H="",q=0,W="",V=!1,Z=0;if($=function(e){e=e||z,x=L=r._getFileId(z),C=u+"-"+x,F=t.createObjectURL(e),D=r._getFileName(z,"")},j=function(){var e=!!w.loadedImages[x],t=c.setTokens({index:_+1,files:d,percent:50,name:D});setTimeout((function(){a.html(t),r._updateFileDetails(d),r.getFilesCount(!0)>0&&r.getFrames(":visible")&&r.$dropZone.find("."+r.dropZoneTitleClass).remove(),n(_+1)}),r.processDelay),r._raise("fileloaded",[z,C,x,_,o])&&r.isAjaxUpload?e||w.add(z):e&&w.removeFile(x)},z){if($(),f>0)for(k=0;k0&&B>r.maxFileSize)return E=r.msgSizeTooLarge.setTokens({name:D,size:R,maxSize:r._getSize(r.maxFileSize*r.bytesToKB,!0)}),void v(E,z,C,_,L);if(null!==r.minFileSize&&B<=t.getNum(r.minFileSize))return E=r.msgSizeTooSmall.setTokens({name:D,size:R,minSize:r._getSize(r.minFileSize*r.bytesToKB,!0)}),void v(E,z,C,_,L);if(!t.isEmpty(p)&&t.isArray(p)){for(k=0;k0)for(t=0;t0)for(t=0;t0?n.initialCaption:"",n.$caption.attr("title","").val(i),t.addCss(n.$container,"file-input-new"),n._validateDefaultPreview()),0===n.$container.find(t.FRAMES).length&&(n._initCaption()||n.$captionContainer.removeClass("icon-visible")),n._hideFileIcon(),n.focusCaptionOnClear&&n.$captionContainer.focus(),n._setFileDropZoneTitle(),n._raise("filecleared"),n.$element},reset:function(){var e=this;if(e._raise("filereset"))return e.lastProgress=0,e._resetPreview(),e.$container.find(".fileinput-filename").text(""),t.addCss(e.$container,"file-input-new"),e.getFrames().length&&e.$container.removeClass("file-input-new"),e.clearFileStack(),e._setFileDropZoneTitle(),e.$element},disable:function(){var e=this,i=e.$container;return e.isDisabled=!0,e._raise("filedisabled"),e.$element.attr("disabled","disabled"),i.addClass("is-locked"),t.addCss(i.find(".btn-file"),"disabled"),i.find(".kv-fileinput-caption").addClass("file-caption-disabled"),i.find(".fileinput-remove, .fileinput-upload, .file-preview-frame button").attr("disabled",!0),e._initDragDrop(),e.$element},enable:function(){var e=this,t=e.$container;return e.isDisabled=!1,e._raise("fileenabled"),e.$element.removeAttr("disabled"),t.removeClass("is-locked"),t.find(".kv-fileinput-caption").removeClass("file-caption-disabled"),t.find(".fileinput-remove, .fileinput-upload, .file-preview-frame button").removeAttr("disabled"),t.find(".btn-file").removeClass("disabled"),e._initDragDrop(),e.$element},upload:function(){var i,n,r=this,o=r.fileManager,s=o.count(),a=r.taskManager,l=!e.isEmptyObject(r._getExtraData());if(o.bpsLog=[],o.bps=0,r.isAjaxUpload&&!r.isDisabled&&r._isFileSelectionValid(s)){if(r.lastProgress=0,r._resetUpload(),0!==s||l){if(r.cancelling=!1,r.uploadInitiated=!0,r._showProgress(),r.lock(),0===s&&l)return r._setProgress(2),void r._uploadExtraOnly();if(r.enableResumableUpload)return r.resume();if(r.uploadAsync||r.enableResumableUpload){if(n=r._getOutData(null),!r._checkBatchPreupload(n))return;r.fileBatchCompleted=!1,r.uploadCache=[],e.each(r.getFileStack(),(function(e){var t=r._getThumbId(e);r.uploadCache.push({id:t,content:null,config:null,tags:null,append:!0})})),r.$preview.find(".file-preview-initial").removeClass(t.SORT_CSS),r._initSortable()}if(r._setProgress(2),r.hasInitData=!1,r.uploadAsync){i=0;var c=r.ajaxPool=a.addPool(t.uniqId());return e.each(r.getFileStack(),(function(e){c.addTask(e+i,(function(t){r._uploadSingle(i,e,!0,t)})),i++})),void c.run(r.maxAjaxThreads).done((function(){r._log("Async upload batch completed successfully."),r._raise("filebatchuploadsuccess",[o.stack,r._getExtraData()])})).fail((function(){r._log("Async upload batch completed with errors."),r._raise("filebatchuploaderror",[o.stack,r._getExtraData()])}))}return r._uploadBatch(),r.$element}r._showFileError(r.msgUploadEmpty)}},destroy:function(){var t=this,i=t.$form,n=t.$container,r=t.$element,o=t.namespace;return e(document).off(o),e(window).off(o),i&&i.length&&i.off(o),t.isAjaxUpload&&t._clearFileInput(),t._cleanup(),t._initPreviewCache(),r.insertBefore(n).off(o).removeData(),n.off().remove(),r},refresh:function(i){var n=this,r=n.$element;return i="object"!=typeof i||t.isEmpty(i)?n.options:e.extend(!0,{},n.options,i),n._init(i,!0),n._listen(),r},zoom:function(e){var t=this,i=t._getFrame(e);t._showModal(i)},getExif:function(e){var t=this._getFrame(e);return t&&t.data("exif")||null},getFrames:function(i){var n,r=this;return i=i||"",n=r.$preview.find(t.FRAMES+i),r.reversePreviewOrder&&(n=e(n.get().reverse())),n},getPreview:function(){var e=this;return{content:e.initialPreview,config:e.initialPreviewConfig,tags:e.initialPreviewThumbTags}}},e.fn.fileinput=function(n){if(t.hasFileAPISupport()||t.isIE(9)){var r=Array.apply(null,arguments),o=[];switch(r.shift(),this.each((function(){var s,a=e(this),l=a.data("fileinput"),c="object"==typeof n&&n,u=c.theme||a.data("theme"),d={},h={},p=c.language||a.data("language")||e.fn.fileinput.defaults.language||"en";l||(u&&(h=e.fn.fileinputThemes[u]||{}),"en"===p||t.isEmpty(e.fn.fileinputLocales[p])||(d=e.fn.fileinputLocales[p]||{}),s=e.extend(!0,{},e.fn.fileinput.defaults,h,e.fn.fileinputLocales.en,d,c,a.data()),l=new i(this,s),a.data("fileinput",l)),"string"==typeof n&&o.push(l[n].apply(l,r))})),o.length){case 0:return this;case 1:return o[0];default:return o}}};var n='class="kv-preview-data file-preview-pdf" src="{renderer}?file={data}" {style}',r="btn btn-sm btn-kv "+t.defaultButtonCss(),o="btn "+t.defaultButtonCss();e.fn.fileinput.defaults={language:"en",bytesToKB:1024,showCaption:!0,showBrowse:!0,showPreview:!0,showRemove:!0,showUpload:!0,showUploadStats:!0,showCancel:null,showPause:null,showClose:!0,showUploadedThumbs:!0,showConsoleLogs:!1,browseOnZoneClick:!1,autoReplace:!1,showDescriptionClose:!0,autoOrientImage:function(){var e=window.navigator.userAgent,t=!!e.match(/WebKit/i);return!(!!e.match(/iP(od|ad|hone)/i)&&t&&!e.match(/CriOS/i))},autoOrientImageInitial:!0,showExifErrorLog:!1,required:!1,rtl:!1,hideThumbnailContent:!1,encodeUrl:!0,focusCaptionOnBrowse:!0,focusCaptionOnClear:!0,generateFileId:null,previewClass:"",captionClass:"",frameClass:"krajee-default",mainClass:"",inputGroupClass:"",mainTemplate:null,fileSizeGetter:null,initialCaption:"",initialPreview:[],initialPreviewDelimiter:"*$$*",initialPreviewAsData:!1,initialPreviewFileType:"image",initialPreviewConfig:[],initialPreviewThumbTags:[],previewThumbTags:{},initialPreviewShowDelete:!0,initialPreviewDownloadUrl:"",removeFromPreviewOnError:!1,deleteUrl:"",deleteExtraData:{},overwriteInitial:!0,sanitizeZoomCache:function(e){var i=t.createElement(e);return i.find("input,textarea,select,datalist,form,.file-thumbnail-footer").remove(),i.html()},previewZoomButtonIcons:{prev:'',next:'',rotate:'',toggleheader:'',fullscreen:'',borderless:'',close:''},previewZoomButtonClasses:{prev:"btn btn-default btn-outline-secondary btn-navigate",next:"btn btn-default btn-outline-secondary btn-navigate",rotate:r,toggleheader:r,fullscreen:r,borderless:r,close:r},previewTemplates:{},previewContentTemplates:{},preferIconicPreview:!1,preferIconicZoomPreview:!1,alwaysPreviewFileExtensions:[],rotatableFileExtensions:["jpg","jpeg","png","gif"],allowedFileTypes:null,allowedFileExtensions:null,allowedPreviewTypes:void 0,allowedPreviewMimeTypes:null,allowedPreviewExtensions:null,disabledPreviewTypes:void 0,disabledPreviewExtensions:["msi","exe","com","zip","rar","app","vb","scr"],disabledPreviewMimeTypes:null,defaultPreviewContent:null,customLayoutTags:{},customPreviewTags:{},previewFileIcon:'',previewFileIconClass:"file-other-icon",previewFileIconSettings:{},previewFileExtSettings:{},buttonLabelClass:"hidden-xs",browseIcon:' ',browseClass:"btn btn-primary",removeIcon:'',removeClass:o,cancelIcon:'',cancelClass:o,pauseIcon:'',pauseClass:o,uploadIcon:'',uploadClass:o,uploadUrl:null,uploadUrlThumb:null,uploadAsync:!0,uploadParamNames:{chunkCount:"chunkCount",chunkIndex:"chunkIndex",chunkSize:"chunkSize",chunkSizeStart:"chunkSizeStart",chunksUploaded:"chunksUploaded",fileBlob:"fileBlob",fileId:"fileId",fileName:"fileName",fileRelativePath:"fileRelativePath",fileSize:"fileSize",retryCount:"retryCount"},maxAjaxThreads:5,fadeDelay:800,processDelay:100,bitrateUpdateDelay:500,queueDelay:10,progressDelay:0,enableResumableUpload:!1,resumableUploadOptions:{fallback:null,testUrl:null,chunkSize:2048,maxThreads:4,maxRetries:3,showErrorLog:!0,retainErrorHistory:!1,skipErrorsAndProceed:!1},uploadExtraData:{},zoomModalHeight:485,minImageWidth:null,minImageHeight:null,maxImageWidth:null,maxImageHeight:null,resizeImage:!1,resizePreference:"width",resizeQuality:.92,resizeDefaultImageType:"image/jpeg",resizeIfSizeMoreThan:0,minFileSize:-1,maxFileSize:0,maxFilePreviewSize:25600,minFileCount:0,maxFileCount:0,maxTotalFileCount:0,validateInitialCount:!1,msgValidationErrorClass:"text-danger",msgValidationErrorIcon:' ',msgErrorClass:"file-error-message",progressThumbClass:"progress-bar progress-bar-striped active progress-bar-animated",progressClass:"progress-bar bg-success progress-bar-success progress-bar-striped active progress-bar-animated",progressInfoClass:"progress-bar bg-info progress-bar-info progress-bar-striped active progress-bar-animated",progressCompleteClass:"progress-bar bg-success progress-bar-success",progressPauseClass:"progress-bar bg-primary progress-bar-primary progress-bar-striped active progress-bar-animated",progressErrorClass:"progress-bar bg-danger progress-bar-danger",progressUploadThreshold:99,previewFileType:"image",elCaptionContainer:null,elCaptionText:null,elPreviewContainer:null,elPreviewImage:null,elPreviewStatus:null,elErrorContainer:null,errorCloseButton:void 0,slugCallback:null,dropZoneEnabled:!0,dropZoneTitleClass:"file-drop-zone-title",fileActionSettings:{},otherActionButtons:"",textEncoding:"UTF-8",preProcessUpload:null,ajaxSettings:{},ajaxDeleteSettings:{},showAjaxErrorDetails:!0,mergeAjaxCallbacks:!1,mergeAjaxDeleteCallbacks:!1,retryErrorUploads:!0,reversePreviewOrder:!1,usePdfRenderer:function(){var e=!!window.MSInputMethodContext&&!!document.documentMode;return!!navigator.userAgent.match(/(iPod|iPhone|iPad|Android)/i)||e},pdfRendererUrl:"",pdfRendererTemplate:"",tabIndexConfig:{browse:500,remove:500,upload:500,cancel:null,pause:null,modal:-1}},e.fn.fileinputLocales.en={sizeUnits:["B","KB","MB","GB","TB","PB","EB","ZB","YB"],bitRateUnits:["B/s","KB/s","MB/s","GB/s","TB/s","PB/s","EB/s","ZB/s","YB/s"],fileSingle:"file",filePlural:"files",browseLabel:"Browse …",removeLabel:"Remove",removeTitle:"Clear all unprocessed files",cancelLabel:"Cancel",cancelTitle:"Abort ongoing upload",pauseLabel:"Pause",pauseTitle:"Pause ongoing upload",uploadLabel:"Upload",uploadTitle:"Upload selected files",msgNo:"No",msgNoFilesSelected:"No files selected",msgCancelled:"Cancelled",msgPaused:"Paused",msgPlaceholder:"Select {files} ...",msgZoomModalHeading:"Detailed Preview",msgFileRequired:"You must select a file to upload.",msgSizeTooSmall:'File "{name}" ({size}) is too small and must be larger than {minSize}.',msgSizeTooLarge:'File "{name}" ({size}) exceeds maximum allowed upload size of {maxSize}.',msgFilesTooLess:"You must select at least {n} {files} to upload.",msgFilesTooMany:"Number of files selected for upload ({n}) exceeds maximum allowed limit of {m}.",msgTotalFilesTooMany:"You can upload a maximum of {m} files ({n} files detected).",msgFileNotFound:'File "{name}" not found!',msgFileSecured:'Security restrictions prevent reading the file "{name}".',msgFileNotReadable:'File "{name}" is not readable.',msgFilePreviewAborted:'File preview aborted for "{name}".',msgFilePreviewError:'An error occurred while reading the file "{name}".',msgInvalidFileName:'Invalid or unsupported characters in file name "{name}".',msgInvalidFileType:'Invalid type for file "{name}". Only "{types}" files are supported.',msgInvalidFileExtension:'Invalid extension for file "{name}". Only "{extensions}" files are supported.',msgFileTypes:{image:"image",html:"HTML",text:"text",video:"video",audio:"audio",flash:"flash",pdf:"PDF",object:"object"},msgUploadAborted:"The file upload was aborted",msgUploadThreshold:"Processing …",msgUploadBegin:"Initializing …",msgUploadEnd:"Done",msgUploadResume:"Resuming upload …",msgUploadEmpty:"No valid data available for upload.",msgUploadError:"Upload Error",msgDeleteError:"Delete Error",msgProgressError:"Error",msgValidationError:"Validation Error",msgLoading:"Loading file {index} of {files} …",msgProgress:"Loading file {index} of {files} - {name} - {percent}% completed.",msgSelected:"{n} {files} selected",msgProcessing:"Processing ...",msgFoldersNotAllowed:"Drag & drop files only! {n} folder(s) dropped were skipped.",msgImageWidthSmall:'Width of image file "{name}" must be at least {size} px (detected {dimension} px).',msgImageHeightSmall:'Height of image file "{name}" must be at least {size} px (detected {dimension} px).',msgImageWidthLarge:'Width of image file "{name}" cannot exceed {size} px (detected {dimension} px).',msgImageHeightLarge:'Height of image file "{name}" cannot exceed {size} px (detected {dimension} px).',msgImageResizeError:"Could not get the image dimensions to resize.",msgImageResizeException:"Error while resizing the image.
    {errors}
    ",msgAjaxError:"Something went wrong with the {operation} operation. Please try again later!",msgAjaxProgressError:"{operation} failed",msgDuplicateFile:'File "{name}" of same size "{size}" has already been selected earlier. Skipping duplicate selection.',msgResumableUploadRetriesExceeded:"Upload aborted beyond {max} retries for file {file}! Error Details:
    {error}
    ",msgPendingTime:"{time} remaining",msgCalculatingTime:"calculating time remaining",ajaxOperations:{deleteThumb:"file delete",uploadThumb:"file upload",uploadBatch:"batch file upload",uploadExtra:"form data upload"},dropZoneTitle:"Drag & drop files here …",dropZoneClickTitle:"
    (or click to select {files})",previewZoomButtonTitles:{prev:"View previous file",next:"View next file",rotate:"Rotate 90 deg. clockwise",toggleheader:"Toggle header",fullscreen:"Toggle full screen",borderless:"Toggle borderless mode",close:"Close detailed preview"}},e.fn.fileinput.Constructor=i,e(document).ready((function(){var t=e("input.file[type=file]");t.length&&t.fileinput()}))},void 0===(o="function"==typeof n?n.apply(t,r):n)||(e.exports=o)}()},876:(e,t,i)=>{"use strict";var n,r,o,s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a="object"===("undefined"==typeof window?"undefined":s(window)); + */!function(){"use strict";o=[n(616)],r=function(e){e.fn.fileinputLocales={},e.fn.fileinputThemes={},e.fn.fileinputBsVersion||(e.fn.fileinputBsVersion=window.bootstrap&&window.bootstrap.Alert&&window.bootstrap.Alert.VERSION||window.Alert&&window.Alert.VERSION||"3.x.x");String.prototype.setTokens=function(e){var t,i,n=this.toString();for(t in e)e.hasOwnProperty(t)&&(i=new RegExp("{"+t+"}","g"),n=n.replace(i,e[t]));return n},Array.prototype.flatMap||(Array.prototype.flatMap=function(e){return[].concat(this.map(e))});var t,n;t={FRAMES:".kv-preview-thumb",SORT_CSS:"file-sortable",INIT_FLAG:"init-",SCRIPT_SRC:document&&document.currentScript&&document.currentScript.src||null,OBJECT_PARAMS:'\n\n\n\n\n\n',DEFAULT_PREVIEW:'
    \n{previewFileIcon}\n
    ',MODAL_ID:"kvFileinputModal",MODAL_EVENTS:["show","shown","hide","hidden","loaded"],logMessages:{ajaxError:"{status}: {error}. Error Details: {text}.",badDroppedFiles:"Error scanning dropped files!",badExifParser:"Error loading the piexif.js library. {details}",badInputType:'The input "type" must be set to "file" for initializing the "bootstrap-fileinput" plugin.',exifWarning:'To avoid this warning, either set "autoOrientImage" to "false" OR ensure you have loaded the "piexif.js" library correctly on your page before the "fileinput.js" script.',invalidChunkSize:'Invalid upload chunk size: "{chunkSize}". Resumable uploads are disabled.',invalidThumb:'Invalid thumb frame with id: "{id}".',noResumableSupport:"The browser does not support resumable or chunk uploads.",noUploadUrl:'The "uploadUrl" is not set. Ajax uploads and resumable uploads have been disabled.',retryStatus:"Retrying upload for chunk # {chunk} for {filename}... retry # {retry}.",chunkQueueError:"Could not push task to ajax pool for chunk index # {index}.",resumableMaxRetriesReached:"Maximum resumable ajax retries ({n}) reached.",resumableRetryError:"Could not retry the resumable request (try # {n})... aborting.",resumableAborting:"Aborting / cancelling the resumable request.",resumableRequestError:"Error processing resumable request. {msg}"},objUrl:window.URL||window.webkitURL,getZoomPlaceholder:function(){var e,i=t.SCRIPT_SRC,n="?kvTemp__2873389129__=";return i?(e=i.substring(0,i.lastIndexOf("/"))).substring(0,e.lastIndexOf("/")+1)+"img/loading.gif"+n:n},defaultButtonCss:function(e){return"btn-default btn-"+(e?"":"outline-")+"secondary"},isBs:function(i){var n=t.trim((e.fn.fileinputBsVersion||"")+"");return i=parseInt(i,10),n?i===parseInt(n.charAt(0),10):4===i},isNumeric:function(e){return void 0!==e&&(!isNaN(parseFloat(e))&&isFinite(e))},trim:function(e){return void 0===e?"":e.toString().trim()},now:function(){return(new Date).getTime()},round:function(e){return e=parseFloat(e),isNaN(e)?0:Math.floor(Math.round(e))},getArray:function(e){var t,i=[],n=e&&e.length||0;for(t=0;t0&&(r+=(r?" ":"")+t+e.substring(0,1))})),r},debounce:function(e,t){var i;return function(){var n=arguments,r=this;clearTimeout(i),i=setTimeout((function(){e.apply(r,n)}),t)}},stopEvent:function(e){e.stopPropagation(),e.preventDefault()},getFileName:function(e){return e&&(e.fileName||e.name)||""},createObjectURL:function(e){return t.objUrl&&t.objUrl.createObjectURL&&e?t.objUrl.createObjectURL(e):""},revokeObjectURL:function(e){t.objUrl&&t.objUrl.revokeObjectURL&&e&&t.objUrl.revokeObjectURL(e)},compare:function(e,t,i){return void 0!==e&&(i?e===t:e.match(t))},isIE:function(e){var t,i;return"Microsoft Internet Explorer"===navigator.appName&&(10===e?new RegExp("msie\\s"+e,"i").test(navigator.userAgent):((t=document.createElement("div")).innerHTML="\x3c!--[if IE "+e+"]> 0&&e[0].webkitGetAsEntry())for(t=0;t=0?atob(e.split(",")[1]):decodeURIComponent(e.split(",")[1]),n=new ArrayBuffer(i.length),r=new Uint8Array(n),o=0;o>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:s+=String.fromCharCode(i);break;case 12:case 13:n=o[a++],s+=String.fromCharCode((31&i)<<6|63&n);break;case 14:n=o[a++],r=o[a++],s+=String.fromCharCode((15&i)<<12|(63&n)<<6|63&r)}return s},isSvg:function(e){return!t.isEmpty(e)&&(0!==(e=t.trim(e).replace(/\n/g," ")).length&&(e.match(/^\s*<\?xml/i)&&(e.match(/"+t+""))},uniqId:function(){return((new Date).getTime()+Math.floor(Math.random()*Math.pow(10,15))).toString(36)},cspBuffer:{CSP_ATTRIB:"data-csp-01928735",domElementsStyles:{},stash:function(i){var n=this,r=e.parseHTML("
    "+i+"
    "),o=e(r);return o.find("[style]").each((function(i,r){var o=e(r),s=o[0].style,a=t.uniqId(),l={};s&&s.length&&(e(s).each((function(){l[this]=s[this]})),n.domElementsStyles[a]=l,o.removeAttr("style").attr(n.CSP_ATTRIB,a))})),o.filter("*").removeAttr("style"),(Object.values?Object.values(r):Object.keys(r).map((function(e){return r[e]}))).flatMap((function(e){return e.innerHTML})).join("")},apply:function(t){var i=this;e(t).find("["+i.CSP_ATTRIB+"]").each((function(t,n){var r=e(n),o=r.attr(i.CSP_ATTRIB),s=i.domElementsStyles[o];s&&r.css(s),r.removeAttr(i.CSP_ATTRIB)})),i.domElementsStyles={}}},setHtml:function(e,i){var n=t.cspBuffer;return e.html(n.stash(i)),n.apply(e),e},htmlEncode:function(e,t){return void 0===e?t||null:e.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")},replaceTags:function(t,i){var n=t;return i?(e.each(i,(function(e,t){"function"==typeof t&&(t=t()),n=n.split(e).join(t)})),n):n},cleanMemory:function(e){var i=e.is("img")?e.attr("src"):e.find("source").attr("src");t.revokeObjectURL(i)},findFileName:function(e){var t=e.lastIndexOf("/");return-1===t&&(t=e.lastIndexOf("\\")),e.split(e.substring(t,t+1)).pop()},checkFullScreen:function(){return document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||document.msFullscreenElement},toggleFullScreen:function(e){var i=document,n=i.documentElement,r=t.checkFullScreen();n&&e&&!r?n.requestFullscreen?n.requestFullscreen():n.msRequestFullscreen?n.msRequestFullscreen():n.mozRequestFullScreen?n.mozRequestFullScreen():n.webkitRequestFullscreen&&n.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT):r&&(i.exitFullscreen?i.exitFullscreen():i.msExitFullscreen?i.msExitFullscreen():i.mozCancelFullScreen?i.mozCancelFullScreen():i.webkitExitFullscreen&&i.webkitExitFullscreen())},moveArray:function(t,i,n,r){var o=e.extend(!0,[],t);if(r&&o.reverse(),n>=o.length)for(var s=n-o.length;1+s--;)o.push(void 0);return o.splice(n,0,o.splice(i,1)[0]),r&&o.reverse(),o},closeButton:function(e){return'"},getRotation:function(e){switch(e){case 2:return"rotateY(180deg)";case 3:return"rotate(180deg)";case 4:return"rotate(180deg) rotateY(180deg)";case 5:return"rotate(270deg) rotateY(180deg)";case 6:return"rotate(90deg)";case 7:return"rotate(90deg) rotateY(180deg)";case 8:return"rotate(270deg)";default:return""}},setTransform:function(e,t){e&&(e.style.transform=t,e.style.webkitTransform=t,e.style["-moz-transform"]=t,e.style["-ms-transform"]=t,e.style["-o-transform"]=t)},getObjectKeys:function(t){var i=[];return t&&e.each(t,(function(e){i.push(e)})),i},getObjectSize:function(e){return t.getObjectKeys(e).length},whenAll:function(i){var n,r,o,s,a,l,c=[].slice,u=1===arguments.length&&t.isArray(i)?i:c.call(arguments),d=e.Deferred(),h=0,p=u.length,f=p;for(o=s=a=Array(p),l=function(e,t,i){return function(){i!==u&&h++,d.notifyWith(t[e]=this,i[e]=c.call(arguments)),--f||d[(h?"reject":"resolve")+"With"](t,i)}},n=0;n0&&l.maxTotalFileCount10?t-10:Math.ceil(t/2),e=t;e>i;e--)r=parseFloat(s.bpsLog[e]),n++;s.bps=64*(n>0?r/n:0)}),d),o={fileId:e,started:a,elapsed:l,loaded:n,total:r,bps:s.bps,bitrate:i._getSize(s.bps,!1,i.bitRateUnits),pendingBytes:u},e?s.stats[e]=o:s.stats=o,o},exists:function(t){return-1!==e.inArray(t,i.fileManager.getIdList())},count:function(){return i.fileManager.getIdList().length},total:function(){var e=i.fileManager;return e.totalFiles||(e.totalFiles=e.count()),e.totalFiles},getTotalSize:function(){var t=i.fileManager;return t.totalSize||(t.totalSize=0,e.each(i.getFileStack(),(function(e,i){var n=parseFloat(i.size);t.totalSize+=isNaN(n)?0:n}))),t.totalSize},add:function(e,n){n||(n=i.fileManager.getId(e)),n&&(i.fileManager.stack[n]={file:e,name:t.getFileName(e),relativePath:t.getFileRelativePath(e),size:e.size,nameFmt:i._getFileName(e,""),sizeFmt:i._getSize(e.size)})},remove:function(e){var t=i._getThumbFileId(e);i.fileManager.removeFile(t)},removeFile:function(e){var t=i.fileManager;e&&(delete t.stack[e],delete t.loadedImages[e])},move:function(t,n){var r={},o=i.fileManager.stack;(t||n)&&t!==n&&(e.each(o,(function(e,i){e!==t&&(r[e]=i),e===n&&(r[t]=o[t])})),i.fileManager.stack=r)},list:function(){var t=[];return e.each(i.getFileStack(),(function(e,i){i&&i.file&&t.push(i.file)})),t},isPending:function(t){return-1===e.inArray(t,i.fileManager.filesProcessed)&&i.fileManager.exists(t)},isProcessed:function(){var t=!0,n=i.fileManager;return e.each(i.getFileStack(),(function(e){n.isPending(e)&&(t=!1)})),t},clear:function(){var e=i.fileManager;i.isDuplicateError=!1,i.isPersistentError=!1,e.totalFiles=null,e.totalSize=null,e.uploadedSize=0,e.stack={},e.errors=[],e.filesProcessed=[],e.stats={},e.bpsLog=[],e.bps=0,e.clearImages()},clearImages:function(){i.fileManager.loadedImages={},i.fileManager.totalImages=0},addImage:function(e,t){i.fileManager.loadedImages[e]=t},removeImage:function(e){delete i.fileManager.loadedImages[e]},getImageIdList:function(){return t.getObjectKeys(i.fileManager.loadedImages)},getImageCount:function(){return i.fileManager.getImageIdList().length},getId:function(e){return i._getFileId(e)},getIndex:function(e){return i.fileManager.getIdList().indexOf(e)},getThumb:function(t){var n=null;return i._getThumbs().each((function(){var r=e(this);i._getThumbFileId(r)===t&&(n=r)})),n},getThumbIndex:function(e){var t=i._getThumbFileId(e);return i.fileManager.getIndex(t)},getIdList:function(){return t.getObjectKeys(i.fileManager.stack)},getFile:function(e){return i.fileManager.stack[e]||null},getFileName:function(e,t){var n=i.fileManager.getFile(e);return n?t?n.nameFmt||"":n.name||"":""},getFirstFile:function(){var e=i.fileManager.getIdList(),t=e&&e.length?e[0]:null;return i.fileManager.getFile(t)},setFile:function(e,t){i.fileManager.getFile(e)?i.fileManager.stack[e].file=t:i.fileManager.add(t,e)},setProcessed:function(e){i.fileManager.filesProcessed.push(e)},getProgress:function(){var e=i.fileManager.total(),t=i.fileManager.filesProcessed.length;return e?Math.ceil(t/e*100):0},setProgress:function(e,t){var n=i.fileManager.getFile(e);!isNaN(t)&&n&&(n.progress=t)}}},_setUploadData:function(i,n){var r=this;e.each(n,(function(e,n){var o=r.uploadParamNames[e]||e;t.isArray(n)?i.append(o,n[0],n[1]):i.append(o,n)}))},_initResumableUpload:function(){var i,n=this,r=n.resumableUploadOptions,o=t.logMessages,s=n.fileManager;if(n.enableResumableUpload)if(!1!==r.fallback&&"function"!=typeof r.fallback&&(r.fallback=function(e){e._log(o.noResumableSupport),e.enableResumableUpload=!1}),t.hasResumableUploadSupport()||!1===r.fallback){if(!n.uploadUrl&&n.enableResumableUpload)return n._log(o.noUploadUrl),void(n.enableResumableUpload=!1);if(r.chunkSize=parseFloat(r.chunkSize),r.chunkSize<=0||isNaN(r.chunkSize))return n._log(o.invalidChunkSize,{chunkSize:r.chunkSize}),void(n.enableResumableUpload=!1);(i=n.resumableManager={init:function(e,t,o){i.logs=[],i.stack=[],i.error="",i.id=e,i.file=t.file,i.fileName=t.name,i.fileIndex=o,i.completed=!1,i.lastProgress=0,n.showPreview&&(i.$thumb=s.getThumb(e)||null,i.$progress=i.$btnDelete=null,i.$thumb&&i.$thumb.length&&(i.$progress=i.$thumb.find(".file-thumb-progress"),i.$btnDelete=i.$thumb.find(".kv-file-remove"))),i.chunkSize=r.chunkSize*n.bytesToKB,i.chunkCount=i.getTotalChunks()},setAjaxError:function(e,t,s,a){e.responseJSON&&e.responseJSON.error&&(s=e.responseJSON.error.toString()),a||(i.error=s),r.showErrorLog&&n._log(o.ajaxError,{status:e.status,error:s,text:e.responseText||""})},reset:function(){i.stack=[],i.chunksProcessed={}},setProcessed:function(t){var o,a,l=i.id,c=i.$thumb,u=i.$progress,d=c&&c.length,h={id:d?c.attr("id"):"",index:s.getIndex(l),fileId:l},p=n.resumableUploadOptions.skipErrorsAndProceed;i.completed=!0,i.lastProgress=0,d&&c.removeClass("file-uploading"),"success"===t?(s.uploadedSize+=i.file.size,n.showPreview&&(n._setProgress(101,u),n._setThumbStatus(c,"Success"),n._initUploadSuccess(i.chunksProcessed[l].data,c)),s.removeFile(l),delete i.chunksProcessed[l],n._raise("fileuploaded",[h.id,h.index,h.fileId]),s.isProcessed()&&n._setProgress(101)):"cancel"!==t&&(n.showPreview&&(n._setThumbStatus(c,"Error"),n._setPreviewError(c,!0),n._setProgress(101,u,n.msgProgressError),n._setProgress(101,n.$progress,n.msgProgressError),n.cancelling=!p),n.$errorContainer.find('li[data-file-id="'+h.fileId+'"]').length||(a={file:i.fileName,max:r.maxRetries,error:i.error},o=n.msgResumableUploadRetriesExceeded.setTokens(a),e.extend(h,a),n._showFileError(o,h,"filemaxretries"),p&&(s.removeFile(l),delete i.chunksProcessed[l],s.isProcessed()&&n._setProgress(101)))),s.isProcessed()&&i.reset()},check:function(){e.each(i.logs,(function(e,t){if(!t)return!1}))},processedResumables:function(){var e,t=i.logs,n=0;if(!t||!t.length)return 0;for(e=0;ei.file.size?i.file.size:e},getTotalChunks:function(){var e=parseFloat(i.chunkSize);return!isNaN(e)&&e>0?Math.ceil(i.file.size/e):0},getProgress:function(){var e=i.processedResumables(),t=i.chunkCount;return 0===t?0:Math.ceil(e/t*100)},checkAborted:function(e){n._isAborted()&&(clearInterval(e),n.unlock())},upload:function(){var e,r=s.getIdList(),o="new";e=setInterval((function(){var a;if(i.checkAborted(e),"new"===o&&(n.lock(),o="processing",a=r.shift(),s.initStats(a),s.stack[a]&&(i.init(a,s.stack[a],s.getIndex(a)),i.processUpload())),!s.isPending(a)&&i.completed&&(o="new"),s.isProcessed()){var l=n.$preview.find(".file-preview-initial");l.length&&(t.addCss(l,t.SORT_CSS),n._initSortable()),clearInterval(e),n._clearFileInput(),n.unlock(),setTimeout((function(){var e=n.previewCache.data;e&&(n.initialPreview=e.content,n.initialPreviewConfig=e.config,n.initialPreviewThumbTags=e.tags),n._raise("filebatchuploadcomplete",[n.initialPreview,n.initialPreviewConfig,n.initialPreviewThumbTags,n._getExtraData()])}),n.processDelay)}}),n.processDelay)},uploadResumable:function(){var e,t,o=n.taskManager,s=i.chunkCount;for(t=o.addPool(i.id),e=0;er.maxRetries)return g(f.resumableMaxRetriesReached,{n:r.maxRetries}),void i.setProcessed("error");var v,_,b,y,w,x,C=h[h.slice?"slice":h.mozSlice?"mozSlice":h.webkitSlice?"webkitSlice":"slice"](u*e,u*(e+1));v=new FormData,c=s.stack[d],n._setUploadData(v,{chunkCount:i.chunkCount,chunkIndex:e,chunkSize:u,chunkSizeStart:u*e,fileBlob:[C,i.fileName],fileId:d,fileName:i.fileName,fileRelativePath:c.relativePath,fileSize:h.size,retryCount:a}),i.$progress&&i.$progress.length&&i.$progress.show(),b=function(r){_=n._getOutData(v,r),n.showPreview&&(p.hasClass("file-preview-success")||(n._setThumbStatus(p,"Loading"),t.addCss(p,"file-uploading")),m.attr("disabled",!0)),n._raise("filechunkbeforesend",[d,e,a,s,i,_])},y=function(t,c,u){if(n._isAborted())g(f.resumableAborting);else{_=n._getOutData(v,u,t);var h=n.uploadParamNames.chunkIndex||"chunkIndex",p=[d,e,a,s,i,_];t.error?(r.showErrorLog&&n._log(o.retryStatus,{retry:a+1,filename:i.fileName,chunk:e}),n._raise("filechunkerror",p),i.pushAjax(e,a+1),i.error=t.error,g(t.error)):(i.logs[t[h]]=!0,i.chunksProcessed[d]||(i.chunksProcessed[d]={}),i.chunksProcessed[d][t[h]]=!0,i.chunksProcessed[d].data=t,l.resolve.call(null,t),n._raise("filechunksuccess",p),i.check())}},w=function(t,r,o){n._isAborted()?g(f.resumableAborting):(_=n._getOutData(v,t),i.setAjaxError(t,r,o),n._raise("filechunkajaxerror",[d,e,a,s,i,_]),i.pushAjax(e,a+1),g(f.resumableRetryError,{n:a-1}))},x=function(){n._isAborted()||n._raise("filechunkcomplete",[d,e,a,s,i,n._getOutData(v)])},n._ajaxSubmit(b,y,x,w,v,d,i.fileIndex)}}}).reset()}else r.fallback(n)},_initTemplateDefaults:function(){var i,n,r,o,s,a,l,c,u,d,h,p,f,m,g,v,_,b,y,w,x,C,T,k,E,S,A,P,I,D,F,M,L,j,O,$,z,N,R,B,U,H,q,W,V=this,Z=function(e,i){return'\n"+t.DEFAULT_PREVIEW+"\n\n"},K="btn btn-sm btn-kv "+t.defaultButtonCss();i='{preview}\n
    \n
    \n
    \n {caption}\n\n'+(t.isBs(5)?"":'
    \n')+" {remove}\n {cancel}\n {pause}\n {upload}\n {browse}\n"+(t.isBs(5)?"":"
    \n")+"
    ",n='{preview}\n
    \n
    \n{remove}\n{cancel}\n{upload}\n{browse}\n',r='
    \n {close}
    \n
    \n
    \n
    \n
    \n
    \n
    ',s=t.closeButton("fileinput-remove"),o='',a='\n',l='',c='{icon} {label}',u='
    {icon} {label}
    ',q=t.MODAL_ID+"Label",d='',h='\n',W='',p='
    \n
    \n {status}\n
    \n
    {stats}',H='
    {pendingTime} {uploadSpeed}
    ',f=" ({sizeText})",m='',g='
    \n \n
    \n{drag}\n
    ',v='\n',_='',U='',b='{downloadIcon}',y='',w='{dragIcon}',x='
    {indicator}
    ',T=(C='
    \n',k=C+' title="{caption}">
    \n',E="
    {footer}\n{zoomCache}
    \n",S="{content}\n",N=" {style}",A=Z("html","text/html"),I=Z("text","text/plain;charset=UTF-8"),$=Z("pdf","application/pdf"),P='{alt}\n",D='",F='",M='\n",L='\x3c!--suppress ALL --\x3e\n",j='\n",O='\n\n'+t.OBJECT_PARAMS+" "+t.DEFAULT_PREVIEW+"\n\n",z='
    \n"+t.DEFAULT_PREVIEW+"\n
    \n",R='
    {zoomContent}
    ',B={width:"100%",height:"100%","min-height":"480px"},V._isPdfRendered()&&($=V.pdfRendererTemplate.replace("{renderer}",V._encodeURI(V.pdfRendererUrl))),V.defaults={layoutTemplates:{main1:i,main2:n,preview:r,close:s,fileIcon:o,caption:a,modalMain:d,modal:h,descriptionClose:W,progress:p,stats:H,size:f,footer:m,indicator:x,actions:g,actionDelete:v,actionRotate:U,actionUpload:_,actionDownload:b,actionZoom:y,actionDrag:w,btnDefault:l,btnLink:c,btnBrowse:u,zoomCache:R},previewMarkupTags:{tagBefore1:T,tagBefore2:k,tagAfter:E},previewContentTemplates:{generic:S,html:A,image:P,text:I,office:D,gdocs:F,video:M,audio:L,flash:j,object:O,pdf:$,other:z},allowedPreviewTypes:["image","html","text","video","audio","flash","pdf","object"],previewTemplates:{},previewSettings:{image:{width:"auto",height:"auto","max-width":"100%","max-height":"100%"},html:{width:"213px",height:"160px"},text:{width:"213px",height:"160px"},office:{width:"213px",height:"160px"},gdocs:{width:"213px",height:"160px"},video:{width:"213px",height:"160px"},audio:{width:"100%",height:"30px"},flash:{width:"213px",height:"160px"},object:{width:"213px",height:"160px"},pdf:{width:"100%",height:"160px",position:"relative"},other:{width:"213px",height:"160px"}},previewSettingsSmall:{image:{width:"auto",height:"auto","max-width":"100%","max-height":"100%"},html:{width:"100%",height:"160px"},text:{width:"100%",height:"160px"},office:{width:"100%",height:"160px"},gdocs:{width:"100%",height:"160px"},video:{width:"100%",height:"auto"},audio:{width:"100%",height:"30px"},flash:{width:"100%",height:"auto"},object:{width:"100%",height:"auto"},pdf:{width:"100%",height:"160px"},other:{width:"100%",height:"160px"}},previewZoomSettings:{image:{width:"auto",height:"auto","max-width":"100%","max-height":"100%"},html:B,text:B,office:{width:"100%",height:"100%","max-width":"100%","min-height":"480px"},gdocs:{width:"100%",height:"100%","max-width":"100%","min-height":"480px"},video:{width:"auto",height:"100%","max-width":"100%"},audio:{width:"100%",height:"30px"},flash:{width:"auto",height:"480px"},object:{width:"auto",height:"100%","max-width":"100%","min-height":"480px"},pdf:B,other:{width:"auto",height:"100%","min-height":"480px"}},mimeTypeAliases:{"video/quicktime":"video/mp4"},fileTypeSettings:{image:function(e,i){return t.compare(e,"image.*")&&!t.compare(e,/(tiff?|wmf)$/i)||t.compare(i,/\.(gif|png|jpe?g)$/i)},html:function(e,i){return t.compare(e,"text/html")||t.compare(i,/\.(htm|html)$/i)},office:function(e,i){return t.compare(e,/(word|excel|powerpoint|office)$/i)||t.compare(i,/\.(docx?|xlsx?|pptx?|pps|potx?)$/i)},gdocs:function(e,i){return t.compare(e,/(word|excel|powerpoint|office|iwork-pages|tiff?)$/i)||t.compare(i,/\.(docx?|xlsx?|pptx?|pps|potx?|rtf|ods|odt|pages|ai|dxf|ttf|tiff?|wmf|e?ps)$/i)},text:function(e,i){return t.compare(e,"text.*")||t.compare(i,/\.(xml|javascript)$/i)||t.compare(i,/\.(txt|md|nfo|ini|json|php|js|css)$/i)},video:function(e,i){return t.compare(e,"video.*")&&(t.compare(e,/(ogg|mp4|mp?g|mov|webm|3gp)$/i)||t.compare(i,/\.(og?|mp4|webm|mp?g|mov|3gp)$/i))},audio:function(e,i){return t.compare(e,"audio.*")&&(t.compare(i,/(ogg|mp3|mp?g|wav)$/i)||t.compare(i,/\.(og?|mp3|mp?g|wav)$/i))},flash:function(e,i){return t.compare(e,"application/x-shockwave-flash",!0)||t.compare(i,/\.(swf)$/i)},pdf:function(e,i){return t.compare(e,"application/pdf",!0)||t.compare(i,/\.(pdf)$/i)},object:function(){return!0},other:function(){return!0}},fileActionSettings:{showRemove:!0,showUpload:!0,showDownload:!0,showZoom:!0,showDrag:!0,showRotate:!0,removeIcon:'',removeClass:K,removeErrorClass:"btn btn-sm btn-kv btn-danger",removeTitle:"Remove file",uploadIcon:'',uploadClass:K,uploadTitle:"Upload file",uploadRetryIcon:'',uploadRetryTitle:"Retry upload",downloadIcon:'',downloadClass:K,downloadTitle:"Download file",rotateIcon:'',rotateClass:K,rotateTitle:"Rotate 90 deg. clockwise",zoomIcon:'',zoomClass:K,zoomTitle:"View Details",dragIcon:'',dragClass:"text-primary",dragTitle:"Move / Rearrange",dragSettings:{},indicatorNew:'',indicatorSuccess:'',indicatorError:'',indicatorLoading:'',indicatorPaused:'',indicatorNewTitle:"Not uploaded yet",indicatorSuccessTitle:"Uploaded",indicatorErrorTitle:"Upload Error",indicatorLoadingTitle:"Uploading …",indicatorPausedTitle:"Upload Paused"}},e.each(V.defaults,(function(t,i){"allowedPreviewTypes"!==t?V[t]=e.extend(!0,{},i,V[t]):void 0===V.allowedPreviewTypes&&(V.allowedPreviewTypes=i)})),V._initPreviewTemplates()},_initPreviewTemplates:function(){var i,n=this,r=n.previewMarkupTags,o=r.tagAfter;e.each(n.previewContentTemplates,(function(e,s){t.isEmpty(n.previewTemplates[e])&&(i=r.tagBefore2,"generic"!==e&&"image"!==e||(i=r.tagBefore1),n._isPdfRendered()&&"pdf"===e&&(i=i.replace("kv-file-content","kv-file-content kv-pdf-rendered")),n.previewTemplates[e]=i+s+o)}))},_initPreviewCache:function(){var i=this;i.previewCache={data:{},init:function(){var e=i.initialPreview;e.length>0&&!t.isArray(e)&&(e=e.split(i.initialPreviewDelimiter)),i.previewCache.data={content:e,config:i.initialPreviewConfig,tags:i.initialPreviewThumbTags}},count:function(e){return i.previewCache.data&&i.previewCache.data.content?e?i.previewCache.data.content.filter((function(e){return null!==e})).length:i.previewCache.data.content.length:0},get:function(e,n){var r,o,s,a,l,c,u,d=t.INIT_FLAG+e,h=i.previewCache.data,p=h.config[e],f=h.content[e],m=t.ifSet("previewAsData",p,i.initialPreviewAsData),g=p?{title:p.title||null,alt:p.alt||null}:{title:null,alt:null},v=function(e,n,r,o,s,a,l,c){var u=" file-preview-initial "+t.SORT_CSS+(l?" "+l:""),d=i.previewInitId+"-"+a,h=p&&p.fileId||d;return i._generatePreviewTemplate(e,n,r,o,d,h,!1,null,null,u,s,a,c,g,p&&p.zoomData||n)};return f&&f.length?(n=void 0===n||n,s=t.ifSet("type",p,i.initialPreviewFileType||"generic"),l=t.ifSet("filename",p,t.ifSet("caption",p)),c=t.ifSet("filetype",p,s),a=i.previewCache.footer(e,n,p&&p.size||null),u=t.ifSet("frameClass",p),r=m?v(s,f,l,c,a,d,u):v("generic",f,l,c,a,d,u,s).setTokens({content:h.content[e]}),h.tags.length&&h.tags[e]&&(r=t.replaceTags(r,h.tags[e])),t.isEmpty(p)||t.isEmpty(p.frameAttr)||(o=t.createDiv(),t.setHtml(o,r),o.find(".file-preview-initial").attr(p.frameAttr),r=o.html(),o.remove()),r):""},clean:function(e){e.content=t.cleanArray(e.content),e.config=t.cleanArray(e.config),e.tags=t.cleanArray(e.tags),i.previewCache.data=e},add:function(e,n,r,o){var s,a=i.previewCache.data;return e&&e.length?(s=e.length-1,t.isArray(e)||(e=e.split(i.initialPreviewDelimiter)),o&&a.content?(s=a.content.push(e[0])-1,a.config[s]=n,a.tags[s]=r):(a.content=e,a.config=n,a.tags=r),i.previewCache.clean(a),s):0},set:function(e,n,r,o){var s,a=i.previewCache.data;if(e&&e.length&&(t.isArray(e)||(e=e.split(i.initialPreviewDelimiter)),e.filter((function(e){return null!==e})).length)){if(void 0===a.content&&(a.content=[]),void 0===a.config&&(a.config=[]),void 0===a.tags&&(a.tags=[]),o){for(s=0;s"+n+": "+e)):i||r.$errorContainer.html(""),r._showFileError(e,t,"fileusererror"))},_showFileError:function(e,i,n){var r=this,o=r.$errorContainer,s=n||"fileuploaderror",a=i&&i.fileId||"",l=i&&i.id?'
  • '+e+"
  • ":"
  • "+e+"
  • ";return 0===o.find("ul").length?r._addError("
      "+l+"
    "):(o.find("ul").append(t.cspBuffer.stash(l)),t.cspBuffer.apply(o)),o.fadeIn(r.fadeDelay),r._raise(s,[i,e]),r._setValidationError("file-input-new"),!0},_showError:function(e,t,i){var n=this,r=n.$errorContainer,o=i||"fileerror";return(t=t||{}).reader=n.reader,n._addError(e),r.fadeIn(n.fadeDelay),n._raise(o,[t,e]),n.isAjaxUpload||n._clearFileInput(),n._setValidationError("file-input-new"),n.$btnUpload.attr("disabled",!0),!0},_noFilesError:function(e){var t=this,i=t.minFileCount>1?t.filePlural:t.fileSingle,n=t.msgFilesTooLess.replace("{n}",t.minFileCount).replace("{files}",i),r=t.$errorContainer;n="
  • "+n+"
  • ",0===r.find("ul").length?t._addError("
      "+n+"
    "):r.find("ul").append(n),t.isError=!0,t._updateFileDetails(0),r.fadeIn(t.fadeDelay),t._raise("fileerror",[e,n]),t._clearFileInput(),t._setValidationError()},_parseError:function(e,i,n,r){var o,s,a,l=this,c=t.trim(n+"");return a=(s=i.responseJSON&&i.responseJSON.error?i.responseJSON.error.toString():"")||i.responseText,l.cancelling&&l.msgUploadAborted&&(c=l.msgUploadAborted),l.showAjaxErrorDetails&&a&&(s?c=t.trim(s+""):(o=(a=t.trim(a.replace(/\n\s*\n/g,"\n"))).length?"
    "+a+"
    ":"",c+=c?o:a)),c||(c=l.msgAjaxError.replace("{operation}",e)),l.cancelling=!1,r?""+r+": "+c:c},_parseFileType:function(e,i){var n,r,o,s=this,a=s.allowedPreviewTypes||[];if("application/text-plain"===e)return"text";for(o=0;o-1&&(i=t.split(".").pop(),n.previewFileIconSettings&&(r=n.previewFileIconSettings[i]||n.previewFileIconSettings[i.toLowerCase()]||null),n.previewFileExtSettings&&e.each(n.previewFileExtSettings,(function(e,t){n.previewFileIconSettings[e]&&t(i)&&(r=n.previewFileIconSettings[e])}))),r||n.previewFileIcon},_parseFilePreviewIcon:function(e,t){var i=this,n=i._getPreviewIcon(t),r=e;return r.indexOf("{previewFileIcon}")>-1&&(r=r.setTokens({previewFileIconClass:i.previewFileIconClass,previewFileIcon:n})),r},_raise:function(t,i){var n=this,r=e.Event(t);void 0!==i?n.$element.trigger(r,i):n.$element.trigger(r);var o=r.result,s=!1===o;if(r.isDefaultPrevented()||s)return!1;if("filebatchpreupload"===r.type&&(o||s))return n.ajaxAborted=o,!1;switch(t){case"filebatchuploadcomplete":case"filebatchuploadsuccess":case"fileuploaded":case"fileclear":case"filecleared":case"filereset":case"fileerror":case"filefoldererror":case"filecustomerror":case"filesuccessremove":break;default:n.ajaxAborted||(n.ajaxAborted=o)}return!0},_listenFullScreen:function(e){var t,i,n=this,r=n.$modal;r&&r.length&&(t=r&&r.find(".btn-kv-fullscreen"),i=r&&r.find(".btn-kv-borderless"),t.length&&i.length&&(t.removeClass("active").attr("aria-pressed","false"),i.removeClass("active").attr("aria-pressed","false"),e?t.addClass("active").attr("aria-pressed","true"):i.addClass("active").attr("aria-pressed","true"),r.hasClass("file-zoom-fullscreen")||e?n._maximizeZoomDialog():i.removeClass("active").attr("aria-pressed","false")))},_listen:function(){var i,n=this,r=n.$element,o=n.$form,s=n.$container;n._handler(r,"click",(function(e){n._initFileSelected(),r.hasClass("file-no-browse")&&(r.data("zoneClicked")?r.data("zoneClicked",!1):e.preventDefault())})),n._handler(r,"change",e.proxy(n._change,n)),n._handler(n.$caption,"paste",e.proxy(n.paste,n)),n.showBrowse&&(n._handler(n.$btnFile,"click",e.proxy(n._browse,n)),n._handler(n.$btnFile,"keypress",(function(e){13===(e.keyCode||e.which)&&(r.trigger("click"),n._browse(e))}))),n._handler(s.find(".fileinput-remove:not([disabled])"),"click",e.proxy(n.clear,n)),n._handler(s.find(".fileinput-cancel"),"click",e.proxy(n.cancel,n)),n._handler(s.find(".fileinput-pause"),"click",e.proxy(n.pause,n)),n._initDragDrop(),n._handler(o,"reset",e.proxy(n.clear,n)),n.isAjaxUpload||n._handler(o,"submit",e.proxy(n._submitForm,n)),n._handler(n.$container.find(".fileinput-upload"),"click",e.proxy(n._uploadClick,n)),n._handler(e(window),"resize",(function(){n._listenFullScreen(screen.width===window.innerWidth&&screen.height===window.innerHeight)})),i="webkitfullscreenchange mozfullscreenchange fullscreenchange MSFullscreenChange",n._handler(e(document),i,(function(){n._listenFullScreen(t.checkFullScreen())})),n.$caption.on("focus",(function(){n.$captionContainer.focus()})),n._autoFitContent(),n._initClickable(),n._refreshPreview()},_autoFitContent:function(){var t,i=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,n=this,r=i<400?n.previewSettingsSmall||n.defaults.previewSettingsSmall:n.previewSettings||n.defaults.previewSettings;e.each(r,(function(e,i){t=".file-preview-frame .file-preview-"+e,n.$preview.find(t+".kv-preview-data,"+t+" .kv-preview-data").css(i)}))},_scanDroppedItems:function(e,i,n){n=n||"";var r,o,s,a=this,l=function(e){a._log(t.logMessages.badDroppedFiles),a._log(e)};e.isFile?e.file((function(e){n&&(e.newPath=n+e.name),i.push(e)}),l):e.isDirectory&&(o=e.createReader(),(s=function(){o.readEntries((function(t){if(t&&t.length>0){for(r=0;r-1;if(n._zoneDragDropInit(i),n.isDisabled||!o)return r.effectAllowed="none",void(r.dropEffect="none");r.dropEffect="copy",n._raise("fileDragEnter",{sourceEvent:i,files:r.types.Files})&&t.addCss(n.$dropZone,"file-highlighted")},_zoneDragLeave:function(e){var t=this;t._zoneDragDropInit(e),t.isDisabled||t._raise("fileDragLeave",{sourceEvent:e})&&t.$dropZone.removeClass("file-highlighted")},_dropFiles:function(e,t){var i=this,n=i.$element;i.isAjaxUpload?i._change(e,t):(i.changeTriggered=!0,n.get(0).files=t,setTimeout((function(){i.changeTriggered=!1,n.trigger("change"+i.namespace)}),i.processDelay)),i.$dropZone.removeClass("file-highlighted")},_addFilesFromSystem:function(e,n,r){var o=this,s=n.files,a=n.items,l=t.getDragDropFolders(a);if(e.preventDefault(),o.isDisabled||t.isEmpty(s)||!s.length)console.log("No valid copied files found in clipboard for pasting.");else if(o._raise(r,{sourceEvent:e,files:s}))if(l>0){if(!o.isAjaxUpload)return void o._showFolderError(l);for(s=[],i=0;i0&&o>=l,u=e(i.item);c&&(o=l-1),s.initialPreview=t.moveArray(s.initialPreview,r,o,d),s.initialPreviewConfig=t.moveArray(s.initialPreviewConfig,r,o,d),s.previewCache.init(),s.getFrames(".file-preview-initial").each((function(){e(this).attr("data-fileindex",t.INIT_FLAG+a),a++})),c&&(n=s.getFrames(":not(.file-preview-initial):first")).length&&u.slideUp((function(){u.insertBefore(n).slideDown()})),s._raise("filesorted",{previewId:u.attr("id"),oldIndex:r,newIndex:o,stack:s.initialPreviewConfig})}},e.extend(!0,i,s.fileActionSettings.dragSettings),s.sortable&&s.sortable.destroy(),s.sortable=h.create(a[0],i))},_setPreviewContent:function(e){var i=this;t.setHtml(i.$preview,e),i._autoFitContent()},_initPreviewImageOrientations:function(){var t=this,i=0,n=t.canOrientImage;(t.autoOrientImageInitial||n)&&t.getFrames(".file-preview-initial").each((function(){var r,o,s,a=e(this),l=t.initialPreviewConfig[i];l&&l.exif&&l.exif.Orientation&&(s=a.attr("id"),r=a.find(">.kv-file-content img"),o=t._getZoom(s," >.kv-file-content img"),n?r.css("image-orientation",t.autoOrientImageInitial?"from-image":"none"):t.setImageOrientation(r,o,l.exif.Orientation,a)),i++}))},_initPreview:function(e){var i,n=this,r=n.initialCaption||"";if(!n.previewCache.count(!0))return n._clearPreview(),void(e?n._setCaption(r):n._initCaption());i=n.previewCache.out(),r=e&&n.initialCaption?n.initialCaption:i.caption,n._setPreviewContent(i.content),n._setInitThumbAttr(),n._setCaption(r),n._initSortable(),t.isEmpty(i.content)||n.$container.removeClass("file-input-new"),n._initPreviewImageOrientations()},_getZoomButton:function(e){var i=this,n=i.previewZoomButtonIcons[e],r=i.previewZoomButtonClasses[e],o=' title="'+(i.previewZoomButtonTitles[e]||"")+'" ',s=t.isBs(5)?"bs-":"",a=o+("close"===e?" data-"+s+'dismiss="modal" aria-hidden="true"':"");return"fullscreen"!==e&&"borderless"!==e&&"toggleheader"!==e||(a+=' data-toggle="button" aria-pressed="false"'),'"},_getModalContent:function(){var e=this;return e._getLayoutTemplate("modal").setTokens({rtl:e.rtl?" kv-rtl":"",zoomFrameClass:e.frameClass,prev:e._getZoomButton("prev"),next:e._getZoomButton("next"),rotate:e._getZoomButton("rotate"),toggleheader:e._getZoomButton("toggleheader"),fullscreen:e._getZoomButton("fullscreen"),borderless:e._getZoomButton("borderless"),close:e._getZoomButton("close")})},_listenModalEvent:function(e){var i=this,n=i.$modal,r=function(e){return{sourceEvent:e,previewId:n.data("previewId"),modal:n}};n.on(e+".bs.modal",(function(o){if("bs.modal"===o.namespace){var s=n.find(".btn-fullscreen"),a=n.find(".btn-borderless");n.data("fileinputPluginId")===i.$element.attr("id")&&i._raise("filezoom"+e,r(o)),"shown"===e&&(i._handleRotation(n,n.find(".file-zoom-detail"),n.data("angle")),a.removeClass("active").attr("aria-pressed","false"),s.removeClass("active").attr("aria-pressed","false"),n.hasClass("file-zoom-fullscreen")&&(i._maximizeZoomDialog(),t.checkFullScreen()?s.addClass("active").attr("aria-pressed","true"):a.addClass("active").attr("aria-pressed","true")))}}))},_initZoom:function(){var i,n=this,r=n._getLayoutTemplate("modalMain"),o="#"+t.MODAL_ID;r=n._setTabIndex("modal",r),n.showPreview&&(n.$modal=e(o),n.$modal&&n.$modal.length||(i=t.createElement(t.cspBuffer.stash(r)).insertAfter(n.$container),n.$modal=e(o).insertBefore(i),t.cspBuffer.apply(n.$modal),i.remove()),t.initModal(n.$modal),n.$modal.html(t.cspBuffer.stash(n._getModalContent())),t.cspBuffer.apply(n.$modal),e.each(t.MODAL_EVENTS,(function(e,t){n._listenModalEvent(t)})))},_initZoomButtons:function(){var t,i,n=this,r=n.$modal,o=r.data("previewId")||"",s=n.getFrames().toArray(),a=s.length,l=r.find(".btn-kv-prev"),c=r.find(".btn-kv-next");r.find(".btn-kv-rotate");if(s.length<2)return l.hide(),void c.hide();l.show(),c.show(),a&&(t=e(s[0]),i=e(s[a-1]),l.removeAttr("disabled"),c.removeAttr("disabled"),n.reversePreviewOrder&&([l,c]=[c,l]),t.length&&t.attr("id")===o&&l.attr("disabled",!0),i.length&&i.attr("id")===o&&c.attr("disabled",!0))},_maximizeZoomDialog:function(){var t=this.$modal,i=t.find(".modal-header:visible"),n=t.find(".modal-footer:visible"),r=t.find(".kv-zoom-body"),o=e(window).height();t.addClass("file-zoom-fullscreen"),i&&i.length&&(o-=i.outerHeight(!0)),n&&n.length&&(o-=n.outerHeight(!0)),r&&r.length&&(o-=r.outerHeight(!0)-r.height()),t.find(".kv-zoom-body").height(o)},_resizeZoomDialog:function(e){var i=this,n=i.$modal,r=n.find(".btn-kv-fullscreen"),o=n.find(".btn-kv-borderless");if(n.hasClass("file-zoom-fullscreen"))t.toggleFullScreen(!1),e?r.hasClass("active")||(n.removeClass("file-zoom-fullscreen"),i._resizeZoomDialog(!0),o.hasClass("active")&&o.removeClass("active").attr("aria-pressed","false")):r.hasClass("active")?r.removeClass("active").attr("aria-pressed","false"):(n.removeClass("file-zoom-fullscreen"),i.$modal.find(".kv-zoom-body").css("height",i.zoomModalHeight));else{if(!e)return void i._maximizeZoomDialog();t.toggleFullScreen(!0)}n.focus()},_setZoomContent:function(i,n){var r,o,s,a,l,c,u,d,h,p,f,m,g=this,v=i.attr("id"),_=g._getZoom(v),b=g.$modal,y=b.find(".btn-kv-fullscreen"),w=b.find(".btn-kv-borderless"),x=b.find(".btn-kv-toggleheader"),C=i.data("zoom");C&&(C=decodeURIComponent(C),m=_.html().replace(g.zoomPlaceholder,"").setTokens({zoomData:C}),t.setHtml(_,m),i.data("zoom",""),_.attr("data-zoom",C)),o=_.attr("data-template")||"generic",s=(r=_.find(".kv-file-content")).length?r.html():"",p=i.data("caption")||g.msgZoomModalHeading,f=i.data("size")||"",d=i.data("description")||"",t.setHtml(b.find(".kv-zoom-caption").attr("title",p),p),t.setHtml(b.find(".kv-zoom-size"),f),h=b.find(".kv-zoom-description").hide(),d&&(g.showDescriptionClose&&(d=g._getLayoutTemplate("descriptionClose").setTokens({closeIcon:g.previewZoomButtonIcons.close})+""+d),t.setHtml(h,d).show(),g.showDescriptionClose&&g._handler(b.find(".kv-desc-hide"),"click",(function(){e(this).parent().fadeOut("fast",(function(){b.focus()}))}))),a=b.find(".kv-zoom-body"),b.removeClass("kv-single-content"),n?(u=a.addClass("file-thumb-loading").clone().insertAfter(a),t.setHtml(a,s).hide(),u.fadeOut("fast",(function(){a.fadeIn("fast",(function(){a.removeClass("file-thumb-loading")})),u.remove()}))):t.setHtml(a,s),(c=g.previewZoomSettings[o])&&(l=a.find(".kv-preview-data"),t.addCss(l,"file-zoom-detail"),e.each(c,(function(e,t){l.css(e,t),(l.attr("width")&&"width"===e||l.attr("height")&&"height"===e)&&l.removeAttr(e)}))),b.data("previewId",v),g._handler(b.find(".btn-kv-prev"),"click",(function(){g._zoomSlideShow("prev",v)})),g._handler(b.find(".btn-kv-next"),"click",(function(){g._zoomSlideShow("next",v)})),g._handler(y,"click",(function(){g._resizeZoomDialog(!0)})),g._handler(w,"click",(function(){g._resizeZoomDialog(!1)})),g._handler(x,"click",(function(){var e,t=b.find(".modal-header"),i=b.find(".floating-buttons"),n=t.find(".kv-zoom-actions"),r=function(e){var i=g.$modal.find(".kv-zoom-body"),n=g.zoomModalHeight;b.hasClass("file-zoom-fullscreen")&&(n=i.outerHeight(!0),e||(n-=t.outerHeight(!0))),i.css("height",e?n+e:n)};t.is(":visible")?(e=t.outerHeight(!0),t.slideUp("slow",(function(){n.find(".btn").appendTo(i),r(e)}))):(i.find(".btn").appendTo(n),t.slideDown("slow",(function(){r()}))),b.focus()})),g._handler(b,"keydown",(function(t){var i,n,r=t.which||t.keyCode,o=g.processDelay+1,s=e(this).find(".btn-kv-prev"),a=e(this).find(".btn-kv-next"),l=e(this).data("previewId");[i,n]=g.rtl?[39,37]:[37,39],e.each({prev:[s,i],next:[a,n]},(function(e,t){var i=t[0],n=t[1];r===n&&i.length&&(b.focus(),i.attr("disabled")||(i.blur(),setTimeout((function(){i.focus(),g._zoomSlideShow(e,l),setTimeout((function(){i.attr("disabled")&&b.focus()}),o)}),o)))}))}))},_showModal:function(e){var i,n,r=this,o=r.$modal;e&&e.length&&(t.initModal(o),t.setHtml(o,r._getModalContent()),r._setZoomContent(e),o.removeClass("rotatable"),o.data({backdrop:!1,fileinputPluginId:r.$element.attr("id")}),o.find(".kv-zoom-body").css("height",r.zoomModalHeight),(i=e.find(".kv-file-content > :first-child")).length&&(n=i.css("transform"))&&o.find(".file-zoom-detail").css("transform",n),e.hasClass("rotatable")&&o.addClass("rotatable"),e.data("angle")&&o.data("angle",e.data("angle")),e.data("angle")||0,o.modal("show"),r._initZoomButtons(),r._initRotateZoom(e,i))},_zoomPreview:function(e){var i,n=this;if(!e.length)throw"Cannot zoom to detailed preview!";i=e.closest(t.FRAMES),n._showModal(i)},_zoomSlideShow:function(t,i){var n,r,o,s,a,l,c=this,u=c.$modal,d=u.find(".kv-zoom-actions .btn-kv-"+t),h=c.getFrames().toArray(),p=[],f=h.length;if(c.reversePreviewOrder&&(t="prev"===t?"next":"prev"),!d.attr("disabled")){for(r=0;r=f||!p[s]||((n=e(p[s])).length&&c._setZoomContent(n,t),c._initZoomButtons(),n.length&&n.hasClass("rotatable")?(a=n.data("angle")||0,u.addClass("rotatable").data("angle",a),l=n.find(".kv-file-content > :first-child"),c._initRotateZoom(n,l)):u.removeClass("rotatable").removeData("angle"),c._raise("filezoom"+t,{previewId:i,modal:c.$modal}))}},_initZoomButton:function(){var t=this;t.$preview.find(".kv-file-zoom").each((function(){var i=e(this);t._handler(i,"click",(function(){t._zoomPreview(i)}))}))},_inputFileCount:function(){return this.$element[0].files.length},_refreshPreview:function(){var t,i=this;(i._inputFileCount()||i.isAjaxUpload)&&i.showPreview&&i.isPreviewable&&(i.isAjaxUpload&&i.fileManager.count()>0?(t=e.extend(!0,[],i.getFileList()),i.fileManager.clear(),i._clearFileInput()):t=i.$element[0].files,t&&t.length&&i.readFiles(t))},_clearObjects:function(t){t.find("video audio").each((function(){this.pause(),e(this).remove()})),t.find("img object div").each((function(){e(this).remove()}))},_clearFileInput:function(){var t,i,n,r=this,o=r.$element;r._inputFileCount()&&(t=o.closest("form"),i=e(document.createElement("form")),n=e(document.createElement("div")),o.before(n),t.length?t.after(i):n.after(i),i.append(o).trigger("reset"),n.before(o).remove(),i.remove())},_resetUpload:function(){var e=this;e.uploadInitiated=!1,e.uploadStartTime=t.now(),e.uploadCache=[],e.$btnUpload.removeAttr("disabled"),e._setProgress(0),e._hideProgress(),e._resetErrors(!1),e._initAjax(),e.fileManager.clearImages(),e._resetCanvas(),e.overwriteInitial&&(e.initialPreview=[],e.initialPreviewConfig=[],e.initialPreviewThumbTags=[],e.previewCache.data={content:[],config:[],tags:[]})},_resetCanvas:function(){var e=this;e.imageCanvas&&e.imageCanvasContext&&e.imageCanvasContext.clearRect(0,0,e.imageCanvas.width,e.imageCanvas.height)},_hasInitialPreview:function(){var e=this;return!e.overwriteInitial&&e.previewCache.count(!0)},_resetPreview:function(){var i,n,r,o=this,s=o.showUploadedThumbs,a=!o.removeFromPreviewOnError,l=(s||a)&&o.isDuplicateError;o.previewCache.count(!0)?(i=o.previewCache.out(),l&&(r=t.createDiv().insertAfter(o.$container),o.getFrames().each((function(){var t=e(this);(s&&t.hasClass("file-preview-success")||a&&t.hasClass("file-preview-error"))&&r.append(t)}))),o._setPreviewContent(i.content),o._setInitThumbAttr(),n=o.initialCaption?o.initialCaption:i.caption,o._setCaption(n),l&&(r.contents().appendTo(o.$preview),r.remove())):(o._clearPreview(),o._initCaption()),o.showPreview&&(o._initZoom(),o._initSortable()),o.isDuplicateError=!1},_clearDefaultPreview:function(){this.$preview.find(".file-default-preview").remove()},_validateDefaultPreview:function(){var e=this;e.showPreview&&!t.isEmpty(e.defaultPreviewContent)&&(e._setPreviewContent('
    '+e.defaultPreviewContent+"
    "),e.$container.removeClass("file-input-new"),e._initClickable())},_resetPreviewThumbs:function(e){var t,i=this;if(e)return i._clearPreview(),void i.clearFileStack();i._hasInitialPreview()?(t=i.previewCache.out(),i._setPreviewContent(t.content),i._setInitThumbAttr(),i._setCaption(t.caption),i._initPreviewActions()):i._clearPreview()},_getLayoutTemplate:function(e){var i=this,n=i.layoutTemplates[e];return t.isEmpty(i.customLayoutTags)?n:t.replaceTags(n,i.customLayoutTags)},_getPreviewTemplate:function(e){var i=this,n=i.previewTemplates,r=n[e]||n.other;return t.isEmpty(i.customPreviewTags)?r:t.replaceTags(r,i.customPreviewTags)},_getOutData:function(e,t,i,n){var r=this;return t=t||{},i=i||{},{formdata:e,files:n=n||r.fileManager.list(),filenames:r.filenames,filescount:r.getFilesCount(),extra:r._getExtraData(),response:i,reader:r.reader,jqXHR:t}},_getMsgSelected:function(e,t){var i=this,n=1===e?i.fileSingle:i.filePlural;return e>0?i.msgSelected.replace("{n}",e).replace("{files}",n):t?i.msgProcessing:i.msgNoFilesSelected},_getFrame:function(e,i){var n=this,r=t.getFrameElement(n.$preview,e);return!n.showPreview||i||r.length||n._log(t.logMessages.invalidThumb,{id:e}),r},_getZoom:function(e,i){var n=this,r=t.getZoomElement(n.$preview,e,i);return n.showPreview&&!r.length&&n._log(t.logMessages.invalidThumb,{id:e}),r},_getThumbs:function(e){return e=e||"",this.getFrames(":not(.file-preview-initial)"+e)},_getThumbId:function(e){return this.previewInitId+"-"+e},_getExtraData:function(e,t){var i=this,n=i.uploadExtraData;return"function"==typeof i.uploadExtraData&&(n=i.uploadExtraData(e,t)),n},_initXhr:function(e,i){var n=this,r=n.fileManager,o=function(e){var o=0,s=e.total,a=e.loaded||e.position,l=r.getUploadStats(i,a,s);e.lengthComputable&&!n.enableResumableUpload&&(o=t.round(a/s*100)),i?n._setFileUploadStats(i,o,l):n._setProgress(o,null,null,n._getStats(l)),n._raise("fileajaxprogress",[l])};return e.upload&&(n.progressDelay&&(o=t.debounce(o,n.progressDelay)),e.upload.addEventListener("progress",o,!1)),e},_initAjaxSettings:function(){var t=this;t._ajaxSettings=e.extend(!0,{},t.ajaxSettings),t._ajaxDeleteSettings=e.extend(!0,{},t.ajaxDeleteSettings)},_mergeAjaxCallback:function(e,t,i){var n,r=this,o=r._ajaxSettings,s=r.mergeAjaxCallbacks;"delete"===i&&(o=r._ajaxDeleteSettings,s=r.mergeAjaxDeleteCallbacks),n=o[e],o[e]=s&&"function"==typeof n?"before"===s?function(){n.apply(this,arguments),t.apply(this,arguments)}:function(){t.apply(this,arguments),n.apply(this,arguments)}:t},_ajaxSubmit:function(t,i,n,r,o,s,a,l){var c,u,d,h=this,p=h.taskManager;h._raise("filepreajax",[o,s,a])&&(o.append("initialPreview",JSON.stringify(h.initialPreview)),o.append("initialPreviewConfig",JSON.stringify(h.initialPreviewConfig)),o.append("initialPreviewThumbTags",JSON.stringify(h.initialPreviewThumbTags)),h._initAjaxSettings(),h._mergeAjaxCallback("beforeSend",t),h._mergeAjaxCallback("success",i),h._mergeAjaxCallback("complete",n),h._mergeAjaxCallback("error",r),"function"==typeof(l=l||h.uploadUrlThumb||h.uploadUrl)&&(l=l()),"object"==typeof(d=h._getExtraData(s,a)||{})&&e.each(d,(function(e,t){o.append(e,t)})),u={xhr:function(){var t=e.ajaxSettings.xhr();return h._initXhr(t,s)},url:h._encodeURI(l),type:"POST",dataType:"json",data:o,cache:!1,processData:!1,contentType:!1},c=e.extend(!0,{},u,h._ajaxSettings),h.ajaxQueue.push(c),p.addTask(s+"-"+a,(function(){var t,i,n=this.self;t=n.ajaxQueue.shift(),i=e.ajax(t),n.ajaxRequests.push(i)})).runWithContext({self:h}))},_mergeArray:function(e,i){var n=this,r=t.cleanArray(n[e]),o=t.cleanArray(i);n[e]=r.concat(o)},_initUploadSuccess:function(i,n,r){var o,s,a,l,c,u,d,h,p,f=this;f.showPreview&&"object"==typeof i&&!e.isEmptyObject(i)?(void 0!==i.initialPreview&&i.initialPreview.length>0&&(f.hasInitData=!0,c=i.initialPreview||[],u=i.initialPreviewConfig||[],d=i.initialPreviewThumbTags||[],o=void 0===i.append||i.append,c.length>0&&!t.isArray(c)&&(c=c.split(f.initialPreviewDelimiter)),c.length&&(f._mergeArray("initialPreview",c),f._mergeArray("initialPreviewConfig",u),f._mergeArray("initialPreviewThumbTags",d)),void 0!==n?r?(h=n.attr("id"),null!==(p=f._getUploadCacheIndex(h))&&(f.uploadCache[p]={id:h,content:c[0],config:u[0]||[],tags:d[0]||[],append:o})):(a=f.previewCache.add(c[0],u[0],d[0],o),s=f.previewCache.get(a,!1),l=t.createElement(t.cspBuffer.stash(s)).hide().appendTo(n),t.cspBuffer.apply(n),n.fadeOut("slow",(function(){var e=l.find("> .file-preview-frame");e&&e.length&&e.insertBefore(n).fadeIn("slow").css("display:inline-block"),f._initPreviewActions(),f._clearFileInput(),n.remove(),l.remove(),f._initSortable()}))):(f.previewCache.set(c,u,d,o),f._initPreview(),f._initPreviewActions())),f._resetCaption()):f._resetCaption()},_getUploadCacheIndex:function(e){var t,i=this,n=i.uploadCache.length;for(t=0;t0||!e.isEmptyObject(b.uploadExtraData),k=b.ajaxOperations.uploadThumb,E=y.getFile(n),S={id:C,index:i,fileId:n},A=b.fileManager.getFileName(n,!0),P=function(){o&&o.resolve&&o.resolve()},I=function(){o&&o.reject&&o.reject()};b.enableResumableUpload||(b.uploadInitiated=!0,b.showPreview&&(a=y.getThumb(n),h=a.find(".file-thumb-progress"),c=a.find(".kv-file-upload"),u=a.find(".kv-file-remove"),h.show()),0===w||!T||b.showPreview&&c&&c.hasClass("disabled")||b._abort(S)||(_=function(){d?y.errors.push(n):y.removeFile(n),y.setProcessed(n),y.isProcessed()&&(b.fileBatchCompleted=!0,l())},l=function(){var e;b.fileBatchCompleted&&setTimeout((function(){var i=0===y.count(),n=y.errors.length;b._updateInitialPreview(),b.unlock(i),i&&b._clearFileInput(),e=b.$preview.find(".file-preview-initial"),b.uploadAsync&&e.length&&(t.addCss(e,t.SORT_CSS),b._initSortable()),b._raise("filebatchuploadcomplete",[y.stack,b._getExtraData()]),b.retryErrorUploads&&0!==n||y.clear(),b._setProgress(101),b.ajaxAborted=!1,b.uploadInitiated=!1}),b.processDelay)},p=function(o){s=b._getOutData(x,o),y.initStats(n),b.fileBatchCompleted=!1,r||(b.ajaxAborted=!1),b.showPreview&&(a.hasClass("file-preview-success")||(b._setThumbStatus(a,"Loading"),t.addCss(a,"file-uploading")),c.attr("disabled",!0),u.attr("disabled",!0)),r||b.lock(),-1!==y.errors.indexOf(n)&&delete y.errors[n],b._raise("filepreupload",[s,C,i,b._getThumbFileId(a)]),e.extend(!0,S,s),b._abort(S)&&(o.abort(),r||(b._setThumbStatus(a,"New"),a.removeClass("file-uploading"),c.removeAttr("disabled"),u.removeAttr("disabled")),b._setProgressCancelled())},m=function(o,l,u){var p=b.showPreview&&a.attr("id")?a.attr("id"):C;s=b._getOutData(x,u,o),e.extend(!0,S,s),setTimeout((function(){t.isEmpty(o)||t.isEmpty(o.error)?(b.showPreview&&(b._setThumbStatus(a,"Success"),c.hide(),b._initUploadSuccess(o,a,r),b._setProgress(101,h)),b._raise("fileuploaded",[s,p,i,b._getThumbFileId(a)]),r?(_(),P()):b.fileManager.remove(a)):(d=!0,f=b._parseError(k,u,b.msgUploadError,b.fileManager.getFileName(n)),b._showFileError(f,S),b._setPreviewError(a,!0),b.retryErrorUploads||c.hide(),r&&(_(),P()),b._setProgress(101,b._getFrame(p).find(".file-thumb-progress"),b.msgUploadError))}),b.processDelay)},g=function(){b.showPreview&&(c.removeAttr("disabled"),u.removeAttr("disabled"),a.removeClass("file-uploading")),r?l():(b.unlock(!1),b._clearFileInput()),b._initSuccessThumbs()},v=function(t,i,o){f=b._parseError(k,t,o,b.fileManager.getFileName(n)),d=!0,setTimeout((function(){var i;r&&(_(),I()),b.fileManager.setProgress(n,100),b._setPreviewError(a,!0),b.retryErrorUploads||c.hide(),e.extend(!0,S,b._getOutData(x,t)),b._setProgress(101,b.$progress,b.msgAjaxProgressError.replace("{operation}",k)),i=b.showPreview&&a?a.find(".file-thumb-progress"):"",b._setProgress(101,i,b.msgUploadError),b._showFileError(f,S)}),b.processDelay)},b._setFileData(x,E.file,A,n),b._setUploadData(x,{fileId:n}),b._ajaxSubmit(p,m,g,v,x,n,i)))},_setFileData:function(e,t,i,n){var r=this,o=r.preProcessUpload;o&&"function"==typeof o?e.append(r.uploadFileAttr,o(n,t)):e.append(r.uploadFileAttr,t,i)},_checkBatchPreupload:function(t,i){var n=this;return!!n._raise("filebatchpreupload",[t])||(n._abort(t),i&&i.abort(),n._getThumbs().each((function(){var t=e(this),i=t.find(".kv-file-upload"),r=t.find(".kv-file-remove");t.hasClass("file-preview-loading")&&(n._setThumbStatus(t,"New"),t.removeClass("file-uploading")),i.removeAttr("disabled"),r.removeAttr("disabled")})),n._setProgressCancelled(),!1)},_uploadBatch:function(){var i,n,r,o,s,a,l=this,c=l.fileManager,u=c.total(),d={},h=u>0||!e.isEmptyObject(l.uploadExtraData),p=new FormData,f=l.ajaxOperations.uploadBatch;if(0!==u&&h&&!l._abort(d)){a=function(){l.fileManager.clear(),l._clearFileInput()},i=function(i){l.lock(),c.initStats();var n=l._getOutData(p,i);l.ajaxAborted=!1,l.showPreview&&l._getThumbs().each((function(){var i=e(this),n=i.find(".kv-file-upload"),r=i.find(".kv-file-remove");i.hasClass("file-preview-success")||(l._setThumbStatus(i,"Loading"),t.addCss(i,"file-uploading")),n.attr("disabled",!0),r.attr("disabled",!0)})),l._checkBatchPreupload(n,i)},n=function(i,n,r){var o=l._getOutData(p,r,i),c=0,u=l._getThumbs(":not(.file-preview-success)"),d=t.isEmpty(i)||t.isEmpty(i.errorkeys)?[]:i.errorkeys;t.isEmpty(i)||t.isEmpty(i.error)?(l._raise("filebatchuploadsuccess",[o]),a(),l.showPreview?(u.each((function(){var t=e(this);l._setThumbStatus(t,"Success"),t.removeClass("file-uploading"),t.find(".kv-file-upload").hide().removeAttr("disabled")})),l._initUploadSuccess(i)):l.reset(),l._setProgress(101)):(l.showPreview&&(u.each((function(){var t=e(this);t.removeClass("file-uploading"),t.find(".kv-file-upload").removeAttr("disabled"),t.find(".kv-file-remove").removeAttr("disabled"),0===d.length||-1!==e.inArray(c,d)?(l._setPreviewError(t,!0),l.retryErrorUploads||(t.find(".kv-file-upload").hide(),l.fileManager.remove(t))):(t.find(".kv-file-upload").hide(),l._setThumbStatus(t,"Success"),l.fileManager.remove(t)),t.hasClass("file-preview-error")&&!l.retryErrorUploads||c++})),l._initUploadSuccess(i)),s=l._parseError(f,r,l.msgUploadError),l._showFileError(s,o,"filebatchuploaderror"),l._setProgress(101,l.$progress,l.msgUploadError))},o=function(){l.unlock(),l._initSuccessThumbs(),l._clearFileInput(),l._raise("filebatchuploadcomplete",[l.fileManager.stack,l._getExtraData()])},r=function(t,i,n){var r=l._getOutData(p,t);s=l._parseError(f,t,n),l._showFileError(s,r,"filebatchuploaderror"),l.uploadFileCount=u-1,l.showPreview&&(l._getThumbs().each((function(){var t=e(this);t.removeClass("file-uploading"),l._getThumbFile(t)&&l._setPreviewError(t)})),l._getThumbs().removeClass("file-uploading"),l._getThumbs(" .kv-file-upload").removeAttr("disabled"),l._getThumbs(" .kv-file-delete").removeAttr("disabled"),l._setProgress(101,l.$progress,l.msgAjaxProgressError.replace("{operation}",f)))};var m=0;e.each(l.fileManager.stack,(function(e,i){t.isEmpty(i.file)||l._setFileData(p,i.file,i.nameFmt||"untitled_"+m,e),m++})),l._ajaxSubmit(i,n,o,r,p)}},_uploadExtraOnly:function(){var e,i,n,r,o,s=this,a={},l=new FormData,c=s.ajaxOperations.uploadExtra;e=function(e){s.lock();var t=s._getOutData(l,e);s._setProgress(50),a.data=t,a.xhr=e,s._checkBatchPreupload(t,e)},i=function(e,i,n){var r=s._getOutData(l,n,e);t.isEmpty(e)||t.isEmpty(e.error)?(s._raise("filebatchuploadsuccess",[r]),s._clearFileInput(),s._initUploadSuccess(e),s._setProgress(101)):(o=s._parseError(c,n,s.msgUploadError),s._showFileError(o,r,"filebatchuploaderror"))},n=function(){s.unlock(),s._clearFileInput(),s._raise("filebatchuploadcomplete",[s.fileManager.stack,s._getExtraData()])},r=function(e,t,i){var n=s._getOutData(l,e);o=s._parseError(c,e,i),a.data=n,s._showFileError(o,n,"filebatchuploaderror"),s._setProgress(101,s.$progress,s.msgAjaxProgressError.replace("{operation}",c))},s._ajaxSubmit(e,i,n,r,l)},_deleteFileIndex:function(i){var n=this,r=i.attr("data-fileindex"),o=n.reversePreviewOrder;r.substring(0,5)===t.INIT_FLAG&&(r=parseInt(r.replace(t.INIT_FLAG,"")),n.initialPreview=t.spliceArray(n.initialPreview,r,o),n.initialPreviewConfig=t.spliceArray(n.initialPreviewConfig,r,o),n.initialPreviewThumbTags=t.spliceArray(n.initialPreviewThumbTags,r,o),n.getFrames().each((function(){var i=e(this),n=i.attr("data-fileindex");n.substring(0,5)===t.INIT_FLAG&&(n=parseInt(n.replace(t.INIT_FLAG,"")))>r&&(n--,i.attr("data-fileindex",t.INIT_FLAG+n))})))},_resetCaption:function(){var e=this;setTimeout((function(){var t,i,n,r="",o=e.previewCache.count(!0),s=e.fileManager.count(),a=":not(.file-preview-success):not(.file-preview-error)",l=e.showPreview&&e.getFrames(a).length;0!==s||0!==o||l?((t=o+s)>1?r=e._getMsgSelected(t):0===s?(r="",(n=e.initialPreviewConfig[0])&&(r=n.caption||n.filename||""),r||(r=e._getMsgSelected(t))):r=(i=e.fileManager.getFirstFile())?i.nameFmt:"_",e._setCaption(r)):e.reset()}),e.processDelay)},_handleRotation:function(t,i,n){var r,o,s,a,l,c,u,d,h,p=this,f="",m=1,g=i[0],v=i.parent(),_=e("body"),b=!!_.length;b&&_.addClass("kv-overflow-hidden"),i.length&&!t.hasClass("hide-rotate")?((a=i.css("transform"))&&i.css("transform","none"),a&&i.css("transform",a),r="rotate("+(n=n||0)+"deg)",o="rotate("+(s=n%360)+"deg)",f="",90!==s&&270!==s||(m=(c=g.naturalWidth||i.outerWidth()||0)>(l=g.naturalHeight||i.outerHeight()||0)&&0!=c?(l/c).toFixed(2):1,v.length&&(d=v.height(),h=v.width(),d>m*(u=Math.min(c,h))&&(m=u>d&&0!=u?(d/u).toFixed(2):1)),1!==m&&(f=" scale("+m+")")),i.addClass("rotate-animate").css("transform",r+f),setTimeout((function(){i.removeClass("rotate-animate").css("transform",o+f),b&&_.removeClass("kv-overflow-hidden"),t.data("angle",s)}),p.fadeDelay)):b&&_.removeClass("kv-overflow-hidden")},_initRotateButton:function(){var i=this;i.getFrames(".rotatable .kv-file-rotate").each((function(){var n=e(this),r=n.closest(t.FRAMES),o=r.find(".kv-file-content > :first-child");i._handler(n,"click",(function(){var e=(r.data("angle")||0)+90;i._handleRotation(r,o,e)}))}))},_initRotateZoom:function(e,t){var i=this,n=i.$modal,r=n.find(".btn-kv-rotate"),o=e.data("angle");n.data("angle",o),r.length&&(r.off("click"),n.hasClass("rotatable")&&r.on("click",(function(){o=(n.data("angle")||0)+90,n.data("angle",o),i._handleRotation(n,n.find(".file-zoom-detail"),o),i._handleRotation(e,t,o),e.hasClass("hide-rotate")&&e.data("angle",o)})))},_initFileActions:function(){var i=this;i.showPreview&&(i._initZoomButton(),i._initRotateButton(),i.getFrames(" .kv-file-remove").each((function(){var n,r=e(this),o=r.closest(t.FRAMES),s=o.attr("id"),a=o.attr("data-fileindex");i.fileManager;i._handler(r,"click",(function(){if(!1===i._raise("filepreremove",[s,a])||!i._validateMinCount())return!1;n=o.hasClass("file-preview-error"),t.cleanMemory(o),o.fadeOut("slow",(function(){i.fileManager.remove(o),i._clearObjects(o),o.remove(),s&&n&&i.$errorContainer.find('li[data-thumb-id="'+s+'"]').fadeOut("fast",(function(){e(this).remove(),i._errorsExist()||i._resetErrors()})),i._clearFileInput(),i._resetCaption(),i._raise("fileremoved",[s,a])}))}))})),i.getFrames(" .kv-file-upload").each((function(){var n=e(this);i._handler(n,"click",(function(){var e=n.closest(t.FRAMES),r=i._getThumbFileId(e);i._hideProgress(),e.hasClass("file-preview-error")&&!i.retryErrorUploads||i._uploadSingle(i.fileManager.getIndex(r),r,!1)}))})))},_initPreviewActions:function(){var i=this,n=i.$preview,r=i.deleteExtraData||{},o=t.FRAMES+" .kv-file-remove",s=i.fileActionSettings,a=s.removeClass,l=s.removeErrorClass,c=function(){var e=i.isAjaxUpload?i.previewCache.count(!0):i._inputFileCount();i.getFrames().length||e?i._resetCaption():(i._setCaption(""),i.reset(),i.initialCaption="")};i._initZoomButton(),i._initRotateButton(),n.find(o).each((function(){var n,o,s,u,d=e(this),h=d.data("url")||i.deleteUrl,p=d.data("key"),f=i.ajaxOperations.deleteThumb;if(!t.isEmpty(h)&&void 0!==p){"function"==typeof h&&(h=h());var m,g,v,_,b,y=d.closest(t.FRAMES),w=i.previewCache.data,x=y.attr("data-fileindex");x=parseInt(x.replace(t.INIT_FLAG,"")),v=t.isEmpty(w.config)&&t.isEmpty(w.config[x])?null:w.config[x],b=t.isEmpty(v)||t.isEmpty(v.extra)?r:v.extra,_=v&&(v.filename||v.caption)||"","function"==typeof b&&(b=b()),g={id:d.attr("id"),key:p,extra:b},o=function(e){i.ajaxAborted=!1,i._raise("filepredelete",[p,e,b]),i._abort()?e.abort():(d.removeClass(l),t.addCss(y,"file-uploading"),t.addCss(d,"disabled "+a))},s=function(e,r,o){var s,u;if(!t.isEmpty(e)&&!t.isEmpty(e.error))return g.jqXHR=o,g.response=e,n=i._parseError(f,o,i.msgDeleteError,_),i._showFileError(n,g,"filedeleteerror"),y.removeClass("file-uploading"),d.removeClass("disabled "+a).addClass(l),void c();y.removeClass("file-uploading").addClass("file-deleted"),y.fadeOut("slow",(function(){x=parseInt(y.attr("data-fileindex").replace(t.INIT_FLAG,"")),i.previewCache.unset(x),i._deleteFileIndex(y),s=i.previewCache.count(!0),u=s>0?i._getMsgSelected(s):"",i._setCaption(u),i._raise("filedeleted",[p,o,b]),i._clearObjects(y),y.remove(),c()}))},u=function(e,t,n){var r=i._parseError(f,e,n,_);g.jqXHR=e,g.response={},i._showFileError(r,g,"filedeleteerror"),y.removeClass("file-uploading"),d.removeClass("disabled "+a).addClass(l),c()},i._initAjaxSettings(),i._mergeAjaxCallback("beforeSend",o,"delete"),i._mergeAjaxCallback("success",s,"delete"),i._mergeAjaxCallback("error",u,"delete"),m=e.extend(!0,{},{url:i._encodeURI(h),type:"POST",dataType:"json",data:e.extend(!0,{},{key:p},b)},i._ajaxDeleteSettings),i._handler(d,"click",(function(){if(!i._validateMinCount())return!1;i.ajaxAborted=!1,i._raise("filebeforedelete",[p,b]),i.ajaxAborted instanceof Promise?i.ajaxAborted.then((function(t){t||e.ajax(m)})):i.ajaxAborted||e.ajax(m)}))}}))},_hideFileIcon:function(){var e=this;e.overwriteInitial&&e.$captionContainer.removeClass("icon-visible")},_showFileIcon:function(){var e=this;t.addCss(e.$captionContainer,"icon-visible")},_getSize:function(e,i,n){var r,o,s=this,a=parseFloat(e),l=0,c=s.bytesToKB,u=s.fileSizeGetter,d=a;if(!t.isNumeric(e)||!t.isNumeric(a))return"";if("function"==typeof u)r=u(a);else{if(n||(n=s.sizeUnits),a>0){for(;d>=c;)d/=c,++l;n[l]||(d=a,l=0)}(o=d.toFixed(2))==d&&(o=d),r=o+" "+n[l]}return i?r:s._getLayoutTemplate("size").replace("{sizeText}",r)},_getFileType:function(e){return this.mimeTypeAliases[e]||e},_generatePreviewTemplate:function(i,n,r,o,s,a,l,c,u,d,h,p,f,m,g){var v,_,b,y,w=this,x=w.slug(r),C="",T="",k=u||r,E=k.split(".").pop().toLowerCase(),S=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,A=x,P=x,I="type-default",D=h||w._renderFileFooter(i,x,c,"auto",l),F=-1!==e.inArray(E,w.alwaysPreviewFileExtensions),M=w.preferIconicPreview&&!F,L=w.preferIconicZoomPreview&&!F,j=M?"other":i;return(v=S<400?w.previewSettingsSmall[j]||w.defaults.previewSettingsSmall[j]:w.previewSettings[j]||w.defaults.previewSettings[j])&&e.each(v,(function(e,t){T+=e+":"+t+";"})),_=function(n,l,c,u,h){var g,v=c?"zoom-"+s:s,_=w._getPreviewTemplate(n),b=(d||"")+" "+u;return w.frameClass&&(b=w.frameClass+" "+b),c&&(b=b.replace(" "+t.SORT_CSS,"")),_=w._parseFilePreviewIcon(_,r),"object"!==i||o||e.each(w.defaults.fileTypeSettings,(function(e,t){"object"!==e&&"other"!==e&&t(r,o)&&(I="type-"+e)})),t.isEmpty(m)||(void 0!==m.title&&null!==m.title&&(A=m.title),void 0!==m.alt&&null!==m.alt&&(P=A=m.alt)),g={previewId:v,caption:x,title:A,alt:P,frameClass:b,type:w._getFileType(o),fileindex:p,fileid:a||"",filename:k,typeCss:I,footer:D,data:c&&h?w.zoomPlaceholder+"{zoomData}":l,template:f||i,style:T?'style="'+T+'"':"",zoomData:h?encodeURIComponent(h):""},c&&(g.zoomCache="",g.zoomData="{zoomData}"),_.setTokens(g)},p=p||s.slice(s.lastIndexOf("-")+1),y=w.fileActionSettings.showRotate&&-1!==e.inArray(E,w.rotatableFileExtensions),w.fileActionSettings.showZoom&&(b="kv-zoom-thumb",y&&(b+=" rotatable"+(L?" hide-rotate":"")),C=_(L?"other":i,n,!0,b,g)),C="\n"+w._getLayoutTemplate("zoomCache").replace("{zoomContent}",C),"function"==typeof w.sanitizeZoomCache&&(C=w.sanitizeZoomCache(C)),b="kv-preview-thumb",y&&(b+=" rotatable"+(M||w.hideThumbnailContent||!!w.previewFileIconSettings[E]?" hide-rotate":"")),_(M?"other":i,n,!1,b,g).setTokens({zoomCache:C})},_addToPreview:function(e,i){var n,r=this;return i=t.cspBuffer.stash(i),n=r.reversePreviewOrder?e.prepend(i):e.append(i),t.cspBuffer.apply(e),n},_previewDefault:function(e,i){var n=this,r=n.$preview;if(n.showPreview){var o,s=t.getFileName(e),a=e?e.type:"",l=e.size||0,c=n._getFileName(e,""),u=!0===i&&!n.isAjaxUpload,d=t.createObjectURL(e),h=n.fileManager.getId(e),p=n._getThumbId(h);n._clearDefaultPreview(),o=n._generatePreviewTemplate("other",d,s,a,p,h,u,l),n._addToPreview(r,o),n._setThumbAttr(p,c,l),!0===i&&n.isAjaxUpload&&n._setThumbStatus(n._getFrame(p),"Error")}},_previewFile:function(e,i,n,r,o){if(this.showPreview){var s,a=this,l=t.getFileName(i),c=o.type,u=o.name,d=a._parseFileType(c,l),h=a.$preview,p=i.size||0,f="image"===d?n.target.result:r,m=a.fileManager.getId(i),g=a._getThumbId(m);s=a._generatePreviewTemplate(d,f,l,c,g,m,!1,p,o.filename),a._clearDefaultPreview(),a._addToPreview(h,s);var v=a._getFrame(g);a._validateImageOrientation(v.find("img"),i,g,m,u,c,p,f),a._setThumbAttr(g,u,p),a._initSortable()}},_setThumbAttr:function(e,t,i,n){var r=this,o=r._getFrame(e);o.length&&(i=i&&i>0?r._getSize(i):"",o.data({caption:t,size:i,description:n||""}))},_setInitThumbAttr:function(){var e,i,n,r,o,s=this,a=s.previewCache.data,l=s.previewCache.count(!0);if(0!==l)for(var c=0;c&"']/g,"_")},_updateFileDetails:function(e){var i,n,r,o,s=this,a=s.$element,l=t.isIE(9)&&t.findFileName(a.val())||a[0].files[0]&&a[0].files[0].name;i=!l&&s.fileManager.count()>0?s.fileManager.getFirstFile().nameFmt:l?s.slug(l):"_",n=s.isAjaxUpload?s.fileManager.count():e,o=s.previewCache.count(!0)+n,r=1===n?i:s._getMsgSelected(o,!s.isAjaxUpload&&!s.isError),s.isError?(s.$previewContainer.removeClass("file-thumb-loading"),s._initCapStatus(),s.$previewStatus.html(""),s.$captionContainer.removeClass("icon-visible")):s._showFileIcon(),s._setCaption(r,s.isError),s.$container.removeClass("file-input-new file-input-ajax-new"),s._raise("fileselect",[e,i]),s.previewCache.count(!0)&&s._initPreviewActions()},_setThumbStatus:function(e,i){var n=this;if(n.showPreview){var r="indicator"+i,o=r+"Title",s="file-preview-"+i.toLowerCase(),a=e.find(".file-upload-indicator"),l=n.fileActionSettings;e.removeClass("file-preview-success file-preview-error file-preview-paused file-preview-loading"),"Success"===i&&e.find(".file-drag-handle").remove(),t.setHtml(a,l[r]),a.attr("title",l[o]),e.addClass(s),"Error"!==i||n.retryErrorUploads||e.find(".kv-file-upload").attr("disabled",!0)}},_setProgressCancelled:function(){var e=this;e._setProgress(101,e.$progress,e.msgCancelled)},_setProgress:function(e,i,n,r){var o=this;if((i=i||o.$progress).length){var s,a=Math.min(e,100),l=o.progressUploadThreshold,c=e<=100?o.progressTemplate:o.progressCompleteTemplate,u=a<100?o.progressTemplate:n?o.paused?o.progressPauseTemplate:o.progressErrorTemplate:c;e>=100&&(r=""),t.isEmpty(u)||(r=r||"",s=(s=l&&a>l&&e<=100?u.setTokens({percent:l,status:o.msgUploadThreshold}):u.setTokens({percent:a,status:e>100?o.msgUploadEnd:a+"%"})).setTokens({stats:r}),t.setHtml(i,s),n&&t.setHtml(i.find('[role="progressbar"]'),n))}},_hasFiles:function(){var e=this.$element[0];return!!(e&&e.files&&e.files.length)},_setFileDropZoneTitle:function(){var e,i=this,n=i.$container.find(".file-drop-zone"),r=i.dropZoneTitle;i.isClickable&&(e=t.isEmpty(i.$element.attr("multiple"))?i.fileSingle:i.filePlural,r+=i.dropZoneClickTitle.replace("{files}",e)),n.find("."+i.dropZoneTitleClass).remove(),!i.showPreview||0===n.length||i.fileManager.count()>0||!i.dropZoneEnabled||i.previewCache.count()>0||!i.isAjaxUpload&&i._hasFiles()||(0===n.find(t.FRAMES).length&&t.isEmpty(i.defaultPreviewContent)&&(n.prepend(t.cspBuffer.stash('
    '+r+"
    ")),t.cspBuffer.apply(n)),i.$container.removeClass("file-input-new"),i.isAjaxUpload&&t.addCss(i.$container,"file-input-ajax-new"))},_getStats:function(e){var i,n,r=this;return r.showUploadStats&&e&&e.bitrate?(n=r._getLayoutTemplate("stats"),i=e.elapsed&&e.bps?r.msgPendingTime.setTokens({time:t.getElapsed(Math.ceil(e.pendingBytes/e.bps))}):r.msgCalculatingTime,n.setTokens({uploadSpeed:e.bitrate,pendingTime:i})):""},_setResumableProgress:function(e,t,i){var n=this,r=n.resumableManager,o=i?r:n,s=i?i.find(".file-thumb-progress"):null;0===o.lastProgress&&(o.lastProgress=e),e0&&e._getFileCount(t-1)=d:l<=d)||(a=u["msgImage"+i+e]||'Image "{name}" has a size validation error (limit "{size}").',u._showFileError(a.setTokens({name:o,size:d,dimension:l}),s),u._setPreviewError(r),u.fileManager.remove(r),u._clearFileInput(),!1))},_getExifObj:function(e){var i,n=this,r=t.logMessages.exifWarning;if("data:image/jpeg;base64,"===e.slice(0,23)||"data:image/jpg;base64,"===e.slice(0,22)){try{i=window.piexif?window.piexif.load(e):null}catch(e){i=null,r=e&&e.message||""}return!i&&n.showExifErrorLog&&n._log(t.logMessages.badExifParser,{details:r}),i}i=null},setImageOrientation:function(i,n,r,o){var s,a,l,c=this,u=!i||!i.length,d=!n||!n.length,h=!1,p=u&&o&&"image"===o.attr("data-template");u&&d||(l="load.fileinputimageorient",p?(i=n,n=null,i.css(c.previewSettings.image),a=t.createDiv().appendTo(o.find(".kv-file-content")),s=e(document.createElement("span")).insertBefore(i),i.css("visibility","hidden").removeClass("file-zoom-detail").appendTo(a)):h=!i.is(":visible"),i.off(l).on(l,(function(){h&&(c.$preview.removeClass("hide-content"),o.find(".kv-file-content").css("visibility","hidden"));var e=i[0],l=n&&n.length?n[0]:null,u=e.offsetHeight,d=e.offsetWidth,f=t.getRotation(r);if(h&&(o.find(".kv-file-content").css("visibility","visible"),c.$preview.addClass("hide-content")),i.data("orientation",r),l&&n.data("orientation",r),r<5)return t.setTransform(e,f),void t.setTransform(l,f);var m=Math.atan(d/u),g=Math.sqrt(Math.pow(u,2)+Math.pow(d,2)),v=g?u/Math.cos(Math.PI/2+m)/g:1,_=" scale("+Math.abs(v)+")";t.setTransform(e,f+_),t.setTransform(l,f+_),p&&(i.css("visibility","visible").insertAfter(s).addClass("file-zoom-detail"),s.remove(),a.remove())})))},_validateImageOrientation:function(i,n,r,o,s,a,l,c){var u,d,h=this,p=null,f=h.autoOrientImage;if(p=h._getExifObj(c),h.canOrientImage)return i.css("image-orientation",f?"from-image":"none"),void h._validateImage(r,o,s,a,l,c,p);d=t.getZoomSelector(r," img"),(u=p?p["0th"][piexif.ImageIFD.Orientation]:null)?(h.setImageOrientation(i,e(d),u,h._getFrame(r)),h._raise("fileimageoriented",{$img:i,file:n}),h._validateImage(r,o,s,a,l,c,p)):h._validateImage(r,o,s,a,l,c,p)},_validateImage:function(e,t,i,n,r,o,s){var a,l,c,u=this,d=u.$preview,h=u._getFrame(e),p=h.attr("data-fileindex"),f=h.find("img");i=i||"Untitled",f.one("load",(function(){f.data("validated")||(f.data("validated",!0),l=h.width(),c=d.width(),l>c&&f.css("width","100%"),a={ind:p,id:e,fileId:t},setTimeout((function(){var l,c;l=u._isValidSize("Small","Width",f,h,i,a),c=u._isValidSize("Small","Height",f,h,i,a),u.resizeImage||(l=l&&u._isValidSize("Large","Width",f,h,i,a),c=c&&u._isValidSize("Large","Height",f,h,i,a)),u._raise("fileimageloaded",[e]),h.data("exif",s),l&&c&&(u.fileManager.addImage(t,{ind:p,img:f,thumb:h,pid:e,typ:n,siz:r,validated:!1,imgData:o,exifObj:s}),u._validateAllImages())}),u.processDelay))})).one("error",(function(){u._raise("fileimageloaderror",[e])}))},_validateAllImages:function(){var t,i=this,n={val:0},r=i.fileManager.getImageCount(),o=i.resizeIfSizeMoreThan;r===i.fileManager.totalImages&&(i._raise("fileimagesloaded"),i.resizeImage&&e.each(i.fileManager.loadedImages,(function(e,s){s.validated||((t=s.siz)&&t>o*i.bytesToKB&&i._getResizedImage(e,s,n,r),s.validated=!0)})))},_getResizedImage:function(i,n,r,o){var s,a,l,c,u,d,h,p,f,m=this,g=e(n.img)[0],v=g.naturalWidth,_=g.naturalHeight,b=1,y=m.maxImageWidth||v,w=m.maxImageHeight||_,x=!(!v||!_),C=m.imageCanvas,T=m.imageCanvasContext,k=n.typ,E=n.pid,S=n.ind,A=n.thumb,P=n.exifObj;if(u=function(e,t,i){m.isAjaxUpload?m._showFileError(e,t,i):m._showError(e,t,i),m._setPreviewError(A)},p={id:E,index:S,fileId:i},f=[i,E,S],(h=m.fileManager.getFile(i))&&x&&!(v<=y&&_<=w)||(x&&h&&m._raise("fileimageresized",f),r.val++,r.val===o&&m._raise("fileimagesresized"),x)){k=k||m.resizeDefaultImageType,a=v>y,l=_>w,b="width"===m.resizePreference?a?y/v:l?w/_:1:l?w/_:a?y/v:1,m._resetCanvas(),v*=b,_*=b,C.width=v,C.height=_;try{T.drawImage(g,0,0,v,_),c=C.toDataURL(k,m.resizeQuality),P&&(d=window.piexif.dump(P),c=window.piexif.insert(d,c)),s=t.dataURI2Blob(c),m.fileManager.setFile(i,s),m._raise("fileimageresized",f),r.val++,r.val===o&&m._raise("fileimagesresized",[void 0,void 0]),s instanceof Blob||u(m.msgImageResizeError,p,"fileimageresizeerror")}catch(e){r.val++,r.val===o&&m._raise("fileimagesresized",[void 0,void 0]),u(m.msgImageResizeException.replace("{errors}",e.message),p,"fileimageresizeexception")}}else u(m.msgImageResizeError,p,"fileimageresizeerror")},_showProgress:function(){var e=this;e.$progress&&e.$progress.length&&e.$progress.show()},_hideProgress:function(){var e=this;e.$progress&&e.$progress.length&&e.$progress.hide()},_initBrowse:function(e){var i=this,n=i.$element;i.showBrowse?i.$btnFile=e.find(".btn-file").append(n):(n.appendTo(e).attr("tabindex",-1),t.addCss(n,"file-no-browse"))},_initClickable:function(){var i,n,r=this;r.isClickable&&(i=r.$dropZone,r.isAjaxUpload||(n=r.$preview.find(".file-default-preview")).length&&(i=n),t.addCss(i,"clickable"),i.attr("tabindex",-1),r._handler(i,"click",(function(t){var n=e(t.target);r.$errorContainer.is(":visible")||n.parents(".file-preview-thumbnails").length&&!n.parents(".file-default-preview").length||(r.$element.data("zoneClicked",!0).trigger("click"),i.blur())})))},_initCaption:function(){var e=this,i=e.initialCaption||"";return e.overwriteInitial||t.isEmpty(i)?(e.$caption.val(""),!1):(e._setCaption(i),!0)},_setCaption:function(i,n){var r,o,s,a,l,c,u=this;if(u.$caption.length){if(u.$captionContainer.removeClass("icon-visible"),n)r=e("
    "+u.msgValidationError+"
    ").text(),(a=u.fileManager.count())?(c=u.fileManager.getFirstFile(),l=1===a&&c?c.nameFmt:u._getMsgSelected(a)):l=u._getMsgSelected(u.msgNo),o=t.isEmpty(i)?l:i,s=''+u.msgValidationErrorIcon+"";else{if(t.isEmpty(i))return void u.$caption.attr("title","");o=r=e("
    "+i+"
    ").text(),s=u._getLayoutTemplate("fileIcon")}u.$captionContainer.addClass("icon-visible"),u.$caption.attr("title",r).val(o),t.setHtml(u.$captionIcon,s)}},_createContainer:function(){var e=this,i={class:"file-input file-input-new"+(e.rtl?" kv-rtl":"")},n=t.createElement(t.cspBuffer.stash(e._renderMain()));return t.cspBuffer.apply(n),n.insertBefore(e.$element).attr(i),e._initBrowse(n),e.theme&&n.addClass("theme-"+e.theme),n},_refreshContainer:function(){var e=this,i=e.$container;e.$element.insertAfter(i),t.setHtml(i,e._renderMain()),e._initBrowse(i),e._validateDisabled()},_validateDisabled:function(){var e=this;e.$caption.attr({readonly:e.isDisabled})},_setTabIndex:function(e,t){var i=this.tabIndexConfig[e];return t.setTokens({tabIndexConfig:null==i?"":'tabindex="'+i+'"'})},_renderMain:function(){var e=this,t=e.dropZoneEnabled?" file-drop-zone":"file-drop-disabled",i=e.showClose?e._getLayoutTemplate("close"):"",n=e.showPreview?e._getLayoutTemplate("preview").setTokens({class:e.previewClass,dropClass:t}):"",r=e.isDisabled?e.captionClass+" file-caption-disabled":e.captionClass,o=e.captionTemplate.setTokens({class:r+" kv-fileinput-caption"});return o=e._setTabIndex("caption",o),e.mainTemplate.setTokens({class:e.mainClass+(!e.showBrowse&&e.showCaption?" no-browse":""),inputGroupClass:e.inputGroupClass,preview:n,close:i,caption:o,upload:e._renderButton("upload"),remove:e._renderButton("remove"),cancel:e._renderButton("cancel"),pause:e._renderButton("pause"),browse:e._renderButton("browse")})},_renderButton:function(e){var i=this,n=i._getLayoutTemplate("btnDefault"),r=i[e+"Class"],o=i[e+"Title"],s=i[e+"Icon"],a=i[e+"Label"],l=i.isDisabled?" disabled":"",c="button";switch(e){case"remove":if(!i.showRemove)return"";break;case"cancel":if(!i.showCancel)return"";r+=" kv-hidden";break;case"pause":if(!i.showPause)return"";r+=" kv-hidden";break;case"upload":if(!i.showUpload)return"";i.isAjaxUpload&&!i.isDisabled?n=i._getLayoutTemplate("btnLink").replace("{href}",i.uploadUrl):c="submit";break;case"browse":if(!i.showBrowse)return"";n=i._getLayoutTemplate("btnBrowse");break;default:return""}return n=i._setTabIndex(e,n),r+="browse"===e?" btn-file":" fileinput-"+e+" fileinput-"+e+"-button",t.isEmpty(a)||(a=' '+a+""),n.setTokens({type:c,css:r,title:o,status:l,icon:s,label:a})},_renderThumbProgress:function(){var e=this;return'
    '+e.progressInfoTemplate.setTokens({percent:101,status:e.msgUploadBegin,stats:""})+"
    "},_renderFileFooter:function(e,i,n,r,o){var s,a,l=this,c=l.fileActionSettings,u=c.showRemove,d=c.showDrag,h=c.showUpload,p=c.showRotate,f=c.showZoom,m=l._getLayoutTemplate("footer"),g=l._getLayoutTemplate("indicator"),v=o?c.indicatorError:c.indicatorNew,_=o?c.indicatorErrorTitle:c.indicatorNewTitle,b=g.setTokens({indicator:v,indicatorTitle:_});return a={type:e,caption:i,size:n=l._getSize(n),width:r,progress:"",indicator:b},l.isAjaxUpload?(a.progress=l._renderThumbProgress(),a.actions=l._renderFileActions(a,h,!1,u,p,f,d,!1,!1,!1)):a.actions=l._renderFileActions(a,!1,!1,!1,!1,f,d,!1,!1,!1),s=m.setTokens(a),s=t.replaceTags(s,l.previewThumbTags)},_renderFileActions:function(e,t,i,n,r,o,s,a,l,c,u,d,h){var p=this;if(!e.type&&u&&(e.type="image"),p.enableResumableUpload?t=!1:"function"==typeof t&&(t=t(e)),"function"==typeof i&&(i=i(e)),"function"==typeof n&&(n=n(e)),"function"==typeof o&&(o=o(e)),"function"==typeof s&&(s=s(e)),"function"==typeof r&&(r=r(e)),!(t||i||n||r||o||s))return"";var f,m=!1===l?"":' data-url="'+l+'"',g="",v="",_="",b=!1===c?"":' data-key="'+c+'"',y="",w="",x="",C=p._getLayoutTemplate("actions"),T=p.fileActionSettings,k=p.otherActionButtons.setTokens({dataKey:b,key:c}),E=a?T.removeClass+" disabled":T.removeClass;return n&&(y=p._getLayoutTemplate("actionDelete").setTokens({removeClass:E,removeIcon:T.removeIcon,removeTitle:T.removeTitle,dataUrl:m,dataKey:b,key:c})),r&&(_=p._getLayoutTemplate("actionRotate").setTokens({rotateClass:T.rotateClass,rotateIcon:T.rotateIcon,rotateTitle:T.rotateTitle})),t&&(w=p._getLayoutTemplate("actionUpload").setTokens({uploadClass:T.uploadClass,uploadIcon:T.uploadIcon,uploadTitle:T.uploadTitle})),i&&(x=(x=p._getLayoutTemplate("actionDownload").setTokens({downloadClass:T.downloadClass,downloadIcon:T.downloadIcon,downloadTitle:T.downloadTitle,downloadUrl:d||p.initialPreviewDownloadUrl})).setTokens({filename:h,key:c})),o&&(g=p._getLayoutTemplate("actionZoom").setTokens({zoomClass:T.zoomClass,zoomIcon:T.zoomIcon,zoomTitle:T.zoomTitle})),s&&u&&(f="drag-handle-init "+T.dragClass,v=p._getLayoutTemplate("actionDrag").setTokens({dragClass:f,dragTitle:T.dragTitle,dragIcon:T.dragIcon})),C.setTokens({delete:y,upload:w,download:x,rotate:_,zoom:g,drag:v,other:k})},_browse:function(e){var t=this;e&&e.isDefaultPrevented()||!t._raise("filebrowse")||(t.isError&&!t.isAjaxUpload&&t.clear(),t.focusCaptionOnBrowse&&t.$captionContainer.focus())},_change:function(i){var n=this;if(e(document.body).off("focusin.fileinput focusout.fileinput"),n.changeTriggered)n._toggleLoading("hide");else{n._toggleLoading("show");var r,o,s,a,l=n.$element,c=arguments.length>1,u=n.isAjaxUpload,d=c?arguments[1]:l[0].files,h=n.fileManager.count(),p=t.isEmpty(l.attr("multiple")),f=!u&&p?1:n.maxFileCount,m=n.maxTotalFileCount,g=m>0&&m>f,v=p&&h>0,_=function(t,i,r,o){var s=e.extend(!0,{},n._getOutData(null,{},{},d),{id:r,index:o}),a={id:r,index:o,file:i,files:d};return n.isPersistentError=!0,n._toggleLoading("hide"),u?n._showFileError(t,s):n._showError(t,a)},b=function(e,t,i){var r=i?n.msgTotalFilesTooMany:n.msgFilesTooMany;r=r.replace("{m}",t).replace("{n}",e),n.isError=_(r,null,null,null),n.$captionContainer.removeClass("icon-visible"),n._setCaption("",!0),n.$container.removeClass("file-input-new file-input-ajax-new")};if(n.reader=null,n._resetUpload(),n._hideFileIcon(),n.dropZoneEnabled&&n.$container.find(".file-drop-zone ."+n.dropZoneTitleClass).remove(),u||(d=i.target&&void 0===i.target.files?i.target.value?[{name:i.target.value.replace(/^.+\\/,"")}]:[]:i.target.files||{}),r=d,t.isEmpty(r)||0===r.length)return u||n.clear(),void n._raise("fileselectnone");if(n._resetErrors(),a=r.length,s=u?n.fileManager.count()+a:a,o=n._getFileCount(s,!g&&void 0),f>0&&o>f){if(!n.autoReplace||a>f)return void b(n.autoReplace&&a>f?a:o,f);o>f&&n._resetPreviewThumbs(u)}else{if(g&&(o=n._getFileCount(s,!0),m>0&&o>m)){if(!n.autoReplace||a>f)return void b(n.autoReplace&&a>m?a:o,m,!0);o>f&&n._resetPreviewThumbs(u)}!u||v?(n._resetPreviewThumbs(!1),v&&n.clearFileStack()):!u||0!==h||n.previewCache.count(!0)&&!n.overwriteInitial||n._resetPreviewThumbs(!0)}n.autoReplace&&n._getThumbs().each((function(){var t=e(this);(t.hasClass("file-preview-success")||t.hasClass("file-preview-error"))&&t.remove()})),n.readFiles(r),n._toggleLoading("hide")}},_abort:function(t){var i,n=this;return n.ajaxAborted&&"object"==typeof n.ajaxAborted&&void 0!==n.ajaxAborted.message?((i=e.extend(!0,{},n._getOutData(null),t)).abortData=n.ajaxAborted.data||{},i.abortMessage=n.ajaxAborted.message,n._setProgress(101,n.$progress,n.msgCancelled),n._showFileError(n.ajaxAborted.message,i,"filecustomerror"),n.cancel(),n.unlock(),!0):!!n.ajaxAborted},_resetFileStack:function(){var t=this,i=0;t._getThumbs().each((function(){var n=e(this),r=n.attr("data-fileindex"),o=n.attr("id");"-1"!==r&&-1!==r&&(t._getThumbFile(n)?n.attr({"data-fileindex":"-1"}):(n.attr({"data-fileindex":i}),i++),t._getZoom(o).attr({"data-fileindex":n.attr("data-fileindex")}))}))},_isFileSelectionValid:function(e){var t=this;return e=e||0,t.required&&!t.getFilesCount()?(t.$errorContainer.html(""),t._showFileError(t.msgFileRequired),!1):!(t.minFileCount>0&&t._getFileCount(e)g)&&(n||r||o)},addToStack:function(e,t){var i=this;i.stackIsUpdating=!0,i.fileManager.add(e,t),i._refreshPreview(),i.stackIsUpdating=!1},clearFileStack:function(){var e=this;return e.fileManager.clear(),e._initResumableUpload(),e.enableResumableUpload?(null===e.showPause&&(e.showPause=!0),null===e.showCancel&&(e.showCancel=!1)):(e.showPause=!1,null===e.showCancel&&(e.showCancel=!0)),e.$element},getFileStack:function(){return this.fileManager.stack},getFileList:function(){return this.fileManager.list()},getFilesSize:function(){return this.fileManager.getTotalSize()},getFilesCount:function(e){var t=this,i=t.isAjaxUpload?t.fileManager.count():t._inputFileCount();return e&&(i+=t.previewCache.count(!0)),t._getFileCount(i)},_initCapStatus:function(e){var t=this.$caption;t.removeClass("is-valid file-processing"),e&&("processing"===e?t.addClass("file-processing"):t.addClass("is-valid"))},_toggleLoading:function(e){var i=this;t.setHtml(i.$previewStatus,"hide"===e?"":i.msgProcessing),i.$container.removeClass("file-thumb-loading"),i._initCapStatus("hide"===e?"":"processing"),"hide"!==e&&(i.dropZoneEnabled&&i.$container.find(".file-drop-zone ."+i.dropZoneTitleClass).remove(),i.$container.addClass("file-thumb-loading"))},_initFileSelected:function(){var t=this,i=t.$element,n=e(document.body),r="focusin.fileinput focusout.fileinput";n.length?n.off(r).on("focusout.fileinput",(function(){t._toggleLoading("show")})).on("focusin.fileinput",(function(){setTimeout((function(){i.val()||t._setFileDropZoneTitle(),n.off(r),t._toggleLoading("hide")}),2500)})):t._toggleLoading("hide")},readFiles:function(i){this.reader=new FileReader;var n,r=this,o=r.reader,s=r.$previewContainer,a=r.$previewStatus,l=r.msgLoading,c=r.msgProgress,u=r.previewInitId,d=i.length,h=r.fileTypeSettings,p=r.allowedFileTypes,f=p?p.length:0,m=r.allowedFileExtensions,g=t.isEmpty(m)?"":m.join(", "),v=function(t,o,s,a,l){var c,u=e.extend(!0,{},r._getOutData(null,{},{},i),{id:s,index:a,fileId:l}),h={id:s,index:a,fileId:l,file:o,files:i};Object.values(i).forEach((e=>{r._previewDefault(e,!0)})),c=r._getFrame(s,!0),r._toggleLoading("hide"),r.isAjaxUpload?setTimeout((function(){n(a+1)}),r.processDelay):(r.unlock(),d=0),r.removeFromPreviewOnError&&c.length?c.remove():(r._initFileActions(),c.find(".kv-file-upload").remove()),r.isPersistentError=!0,r.isError=r.isAjaxUpload?r._showFileError(t,u):r._showError(t,h),r._updateFileDetails(d)};r.fileManager.clearImages(),e.each(i,(function(e,t){var i=r.fileTypeSettings.image;i&&i(t.type)&&r.fileManager.totalImages++})),(n=function(_){var b,y=r.$errorContainer,w=r.fileManager;if(_>=d)return r.unlock(),r.duplicateErrors.length&&(b="
  • "+r.duplicateErrors.join("
  • ")+"
  • ",0===y.find("ul").length?t.setHtml(y,r.errorCloseButton+"
      "+b+"
    "):(y.find("ul").append(t.cspBuffer.stash(b)),t.cspBuffer.apply(y)),y.fadeIn(r.fadeDelay),r._handler(y.find(".kv-error-close"),"click",(function(){y.fadeOut(r.fadeDelay)})),r.duplicateErrors=[]),r.isAjaxUpload?(r._raise("filebatchselected",[w.stack]),0!==w.count()||r.isError||r.reset()):r._raise("filebatchselected",[i]),s.removeClass("file-thumb-loading"),r._initCapStatus("valid"),void a.html("");r.lock(!0);var x,C,T,k,E,S,A,P,I,D,F,M,L,j,O,$,z=i[_],N=z&&z.size||0,R=r._getSize(N,!0),B=h.image,U=N/r.bytesToKB,H="",q=0,W="",V=!1,Z=0;if($=function(e){e=e||z,x=M=r._getFileId(z),C=u+"-"+x,F=t.createObjectURL(e),D=r._getFileName(z,"")},O=function(){var e=!!w.loadedImages[x],i=c.setTokens({index:_+1,files:d,percent:50,name:D});setTimeout((function(){t.setHtml(a,i),r._updateFileDetails(d),r.getFilesCount(!0)>0&&r.getFrames(":visible")&&r.$dropZone.find("."+r.dropZoneTitleClass).remove(),n(_+1)}),r.processDelay),r._raise("fileloaded",[z,C,x,_,o])&&r.isAjaxUpload?e||w.add(z):e&&w.removeFile(x)},z){if($(),f>0)for(k=0;k0&&i.length>1){var X=[],Y=0;if(Object.values(i).forEach((e=>{Y+=e.size/r.bytesToKB,X.push(e.name)})),Y>r.maxMultipleFileSize)return E=r.msgMultipleSizeTooLarge.setTokens({name:X,size:r._getSize(Y,!0),maxSize:r._getSize(r.maxMultipleFileSize*r.bytesToKB,!0)}),void v(E,z,C,_,M)}else if(r.maxFileSize>0&&U>r.maxFileSize)return E=r.msgSizeTooLarge.setTokens({name:D,size:R,maxSize:r._getSize(r.maxFileSize*r.bytesToKB,!0)}),void v(E,z,C,_,M);if(null!==r.minFileSize&&U<=t.getNum(r.minFileSize))return E=r.msgSizeTooSmall.setTokens({name:D,size:R,minSize:r._getSize(r.minFileSize*r.bytesToKB,!0)}),void v(E,z,C,_,M);if(!t.isEmpty(p)&&t.isArray(p)){for(k=0;k0)for(t=0;t0)for(t=0;t0?n.initialCaption:"",n.$caption.attr("title","").val(i),t.addCss(n.$container,"file-input-new"),n._validateDefaultPreview()),0===n.$container.find(t.FRAMES).length&&(n._initCaption()||n.$captionContainer.removeClass("icon-visible")),n._hideFileIcon(),n.focusCaptionOnClear&&n.$captionContainer.focus(),n._setFileDropZoneTitle(),n._raise("filecleared"),n.$element},reset:function(){var e=this;if(e._raise("filereset"))return e.lastProgress=0,e._resetPreview(),e.$container.find(".fileinput-filename").text(""),t.addCss(e.$container,"file-input-new"),e.getFrames().length&&e.$container.removeClass("file-input-new"),e.clearFileStack(),e._setFileDropZoneTitle(),e.$element},disable:function(){var e=this,i=e.$container;return e.isDisabled=!0,e._raise("filedisabled"),e.$element.attr("disabled","disabled"),i.addClass("is-locked"),t.addCss(i.find(".btn-file"),"disabled"),i.find(".kv-fileinput-caption").addClass("file-caption-disabled"),i.find(".fileinput-remove, .fileinput-upload, .file-preview-frame button").attr("disabled",!0),e._initDragDrop(),e.$element},enable:function(){var e=this,t=e.$container;return e.isDisabled=!1,e._raise("fileenabled"),e.$element.removeAttr("disabled"),t.removeClass("is-locked"),t.find(".kv-fileinput-caption").removeClass("file-caption-disabled"),t.find(".fileinput-remove, .fileinput-upload, .file-preview-frame button").removeAttr("disabled"),t.find(".btn-file").removeClass("disabled"),e._initDragDrop(),e.$element},upload:function(){var i,n,r=this,o=r.fileManager,s=o.count(),a=r.taskManager,l=!e.isEmptyObject(r._getExtraData());if(o.bpsLog=[],o.bps=0,r.isAjaxUpload&&!r.isDisabled&&r._isFileSelectionValid(s)){if(r.lastProgress=0,r._resetUpload(),0!==s||l){if(r.cancelling=!1,r.uploadInitiated=!0,r._showProgress(),r.lock(),0===s&&l)return r._setProgress(2),void r._uploadExtraOnly();if(r.enableResumableUpload)return r.resume();if(r.uploadAsync||r.enableResumableUpload){if(n=r._getOutData(null),!r._checkBatchPreupload(n))return;r.fileBatchCompleted=!1,r.uploadCache=[],e.each(r.getFileStack(),(function(e){var t=r._getThumbId(e);r.uploadCache.push({id:t,content:null,config:null,tags:null,append:!0})})),r.$preview.find(".file-preview-initial").removeClass(t.SORT_CSS),r._initSortable()}if(r._setProgress(2),r.hasInitData=!1,r.uploadAsync){i=0;var c=r.ajaxPool=a.addPool(t.uniqId());return e.each(r.getFileStack(),(function(e){c.addTask(e+i,(function(t){r._uploadSingle(i,e,!0,t)})),i++})),void c.run(r.maxAjaxThreads).done((function(){r._log("Async upload batch completed successfully."),r._raise("filebatchuploadsuccess",[o.stack,r._getExtraData()])})).fail((function(){r._log("Async upload batch completed with errors."),r._raise("filebatchuploaderror",[o.stack,r._getExtraData()])}))}return r._uploadBatch(),r.$element}r._showFileError(r.msgUploadEmpty)}},destroy:function(){var t=this,i=t.$form,n=t.$container,r=t.$element,o=t.namespace;return e(document).off(o),e(window).off(o),i&&i.length&&i.off(o),t.isAjaxUpload&&t._clearFileInput(),t._cleanup(),t._initPreviewCache(),r.insertBefore(n).off(o).removeData(),n.off().remove(),r},refresh:function(i){var n=this,r=n.$element;return i="object"!=typeof i||t.isEmpty(i)?n.options:e.extend(!0,{},n.options,i),n._init(i,!0),n._listen(),r},zoom:function(e){var t=this,i=t._getFrame(e);t._showModal(i)},getExif:function(e){var t=this._getFrame(e);return t&&t.data("exif")||null},getFrames:function(i){var n,r=this;return i=i||"",n=r.$preview.find(t.FRAMES+i),r.reversePreviewOrder&&(n=e(n.get().reverse())),n},getPreview:function(){var e=this;return{content:e.initialPreview,config:e.initialPreviewConfig,tags:e.initialPreviewThumbTags}}},e.fn.fileinput=function(i){if(t.hasFileAPISupport()||t.isIE(9)){var r=Array.apply(null,arguments),o=[];switch(r.shift(),this.each((function(){var s={},a={};"object"==typeof i&&(s=e.extend(!0,{},e.fn.fileinput.defaults,i),a=i);var l,c=e(this),u=c.data("fileinput"),d=s.theme||c.data("theme")||e.fn.fileinput.defaults.theme,h={},p={},f=s.language||c.data("language")||e.fn.fileinput.defaults.language||"en";u||(d&&(p=e.fn.fileinputThemes[d]||{}),"en"===f||t.isEmpty(e.fn.fileinputLocales[f])||(h=e.fn.fileinputLocales[f]||{}),l=e.extend(!0,{},e.fn.fileinput.defaults,p,e.fn.fileinputLocales.en,h,a,c.data()),u=new n(this,l),c.data("fileinput",u)),"string"==typeof i&&o.push(u[i].apply(u,r))})),o.length){case 0:return this;case 1:return o[0];default:return o}}};var r='class="kv-preview-data file-preview-pdf" src="{renderer}?file={data}" {style}',o="btn btn-sm btn-kv "+t.defaultButtonCss(),s="btn "+t.defaultButtonCss();e.fn.fileinput.defaults={language:"en",bytesToKB:1024,showCaption:!0,showBrowse:!0,showPreview:!0,showRemove:!0,showUpload:!0,showUploadStats:!0,showCancel:null,showPause:null,showClose:!0,showUploadedThumbs:!0,showConsoleLogs:!1,browseOnZoneClick:!1,autoReplace:!1,showDescriptionClose:!0,autoOrientImage:function(){var e=window.navigator.userAgent,t=!!e.match(/WebKit/i);return!(!!e.match(/iP(od|ad|hone)/i)&&t&&!e.match(/CriOS/i))},autoOrientImageInitial:!0,showExifErrorLog:!1,required:!1,rtl:!1,hideThumbnailContent:!1,encodeUrl:!0,focusCaptionOnBrowse:!0,focusCaptionOnClear:!0,generateFileId:null,previewClass:"",captionClass:"",frameClass:"krajee-default",mainClass:"",inputGroupClass:"",mainTemplate:null,fileSizeGetter:null,initialCaption:"",initialPreview:[],initialPreviewDelimiter:"*$$*",initialPreviewAsData:!1,initialPreviewFileType:"image",initialPreviewConfig:[],initialPreviewThumbTags:[],previewThumbTags:{},initialPreviewShowDelete:!0,initialPreviewDownloadUrl:"",removeFromPreviewOnError:!1,deleteUrl:"",deleteExtraData:{},overwriteInitial:!0,sanitizeZoomCache:function(e){var i=t.createDiv();return t.setHtml(i,e),i.find("input,textarea,select,datalist,form,.file-thumbnail-footer").remove(),i.html()},previewZoomButtonIcons:{prev:'',next:'',rotate:'',toggleheader:'',fullscreen:'',borderless:'',close:''},previewZoomButtonClasses:{prev:"btn btn-default btn-outline-secondary btn-navigate",next:"btn btn-default btn-outline-secondary btn-navigate",rotate:o,toggleheader:o,fullscreen:o,borderless:o,close:o},previewTemplates:{},previewContentTemplates:{},preferIconicPreview:!1,preferIconicZoomPreview:!1,alwaysPreviewFileExtensions:[],rotatableFileExtensions:["jpg","jpeg","png","gif"],allowedFileTypes:null,allowedFileExtensions:null,allowedPreviewTypes:void 0,allowedPreviewMimeTypes:null,allowedPreviewExtensions:null,disabledPreviewTypes:void 0,disabledPreviewExtensions:["msi","exe","com","zip","rar","app","vb","scr"],disabledPreviewMimeTypes:null,defaultPreviewContent:null,customLayoutTags:{},customPreviewTags:{},previewFileIcon:'',previewFileIconClass:"file-other-icon",previewFileIconSettings:{},previewFileExtSettings:{},buttonLabelClass:"hidden-xs",browseIcon:' ',browseClass:"btn btn-primary",removeIcon:'',removeClass:s,cancelIcon:'',cancelClass:s,pauseIcon:'',pauseClass:s,uploadIcon:'',uploadClass:s,uploadUrl:null,uploadUrlThumb:null,uploadAsync:!0,uploadParamNames:{chunkCount:"chunkCount",chunkIndex:"chunkIndex",chunkSize:"chunkSize",chunkSizeStart:"chunkSizeStart",chunksUploaded:"chunksUploaded",fileBlob:"fileBlob",fileId:"fileId",fileName:"fileName",fileRelativePath:"fileRelativePath",fileSize:"fileSize",retryCount:"retryCount"},maxAjaxThreads:5,fadeDelay:800,processDelay:100,bitrateUpdateDelay:500,queueDelay:10,progressDelay:0,enableResumableUpload:!1,resumableUploadOptions:{fallback:null,testUrl:null,chunkSize:2048,maxThreads:4,maxRetries:3,showErrorLog:!0,retainErrorHistory:!1,skipErrorsAndProceed:!1},uploadExtraData:{},zoomModalHeight:485,minImageWidth:null,minImageHeight:null,maxImageWidth:null,maxImageHeight:null,resizeImage:!1,resizePreference:"width",resizeQuality:.92,resizeDefaultImageType:"image/jpeg",resizeIfSizeMoreThan:0,minFileSize:-1,maxFileSize:0,maxMultipleFileSize:0,maxFilePreviewSize:25600,minFileCount:0,maxFileCount:0,maxTotalFileCount:0,validateInitialCount:!1,msgValidationErrorClass:"text-danger",msgValidationErrorIcon:' ',msgErrorClass:"file-error-message",progressThumbClass:"progress-bar progress-bar-striped active progress-bar-animated",progressClass:"progress-bar bg-success progress-bar-success progress-bar-striped active progress-bar-animated",progressInfoClass:"progress-bar bg-info progress-bar-info progress-bar-striped active progress-bar-animated",progressCompleteClass:"progress-bar bg-success progress-bar-success",progressPauseClass:"progress-bar bg-primary progress-bar-primary progress-bar-striped active progress-bar-animated",progressErrorClass:"progress-bar bg-danger progress-bar-danger",progressUploadThreshold:99,previewFileType:"image",elCaptionContainer:null,elCaptionText:null,elPreviewContainer:null,elPreviewImage:null,elPreviewStatus:null,elErrorContainer:null,errorCloseButton:void 0,slugCallback:null,dropZoneEnabled:!0,dropZoneTitleClass:"file-drop-zone-title",fileActionSettings:{},otherActionButtons:"",textEncoding:"UTF-8",preProcessUpload:null,ajaxSettings:{},ajaxDeleteSettings:{},showAjaxErrorDetails:!0,mergeAjaxCallbacks:!1,mergeAjaxDeleteCallbacks:!1,retryErrorUploads:!0,reversePreviewOrder:!1,usePdfRenderer:function(){var e=!!window.MSInputMethodContext&&!!document.documentMode;return!!navigator.userAgent.match(/(iPod|iPhone|iPad|Android)/i)||e},pdfRendererUrl:"",pdfRendererTemplate:"",tabIndexConfig:{browse:500,remove:500,upload:500,cancel:null,pause:null,modal:-1}},e.fn.fileinputLocales.en={sizeUnits:["B","KB","MB","GB","TB","PB","EB","ZB","YB"],bitRateUnits:["B/s","KB/s","MB/s","GB/s","TB/s","PB/s","EB/s","ZB/s","YB/s"],fileSingle:"file",filePlural:"files",browseLabel:"Browse …",removeLabel:"Remove",removeTitle:"Clear all unprocessed files",cancelLabel:"Cancel",cancelTitle:"Abort ongoing upload",pauseLabel:"Pause",pauseTitle:"Pause ongoing upload",uploadLabel:"Upload",uploadTitle:"Upload selected files",msgNo:"No",msgNoFilesSelected:"No files selected",msgCancelled:"Cancelled",msgPaused:"Paused",msgPlaceholder:"Select {files} ...",msgZoomModalHeading:"Detailed Preview",msgFileRequired:"You must select a file to upload.",msgSizeTooSmall:'File "{name}" ({size}) is too small and must be larger than {minSize}.',msgSizeTooLarge:'File "{name}" ({size}) exceeds maximum allowed upload size of {maxSize}.',msgMultipleSizeTooLarge:'Files "{name}" ({size}) exceeds maximum allowed upload size of {maxSize}.',msgFilesTooLess:"You must select at least {n} {files} to upload.",msgFilesTooMany:"Number of files selected for upload ({n}) exceeds maximum allowed limit of {m}.",msgTotalFilesTooMany:"You can upload a maximum of {m} files ({n} files detected).",msgFileNotFound:'File "{name}" not found!',msgFileSecured:'Security restrictions prevent reading the file "{name}".',msgFileNotReadable:'File "{name}" is not readable.',msgFilePreviewAborted:'File preview aborted for "{name}".',msgFilePreviewError:'An error occurred while reading the file "{name}".',msgInvalidFileName:'Invalid or unsupported characters in file name "{name}".',msgInvalidFileType:'Invalid type for file "{name}". Only "{types}" files are supported.',msgInvalidFileExtension:'Invalid extension for file "{name}". Only "{extensions}" files are supported.',msgFileTypes:{image:"image",html:"HTML",text:"text",video:"video",audio:"audio",flash:"flash",pdf:"PDF",object:"object"},msgUploadAborted:"The file upload was aborted",msgUploadThreshold:"Processing …",msgUploadBegin:"Initializing …",msgUploadEnd:"Done",msgUploadResume:"Resuming upload …",msgUploadEmpty:"No valid data available for upload.",msgUploadError:"Upload Error",msgDeleteError:"Delete Error",msgProgressError:"Error",msgValidationError:"Validation Error",msgLoading:"Loading file {index} of {files} …",msgProgress:"Loading file {index} of {files} - {name} - {percent}% completed.",msgSelected:"{n} {files} selected",msgProcessing:"Processing ...",msgFoldersNotAllowed:"Drag & drop files only! {n} folder(s) dropped were skipped.",msgImageWidthSmall:'Width of image file "{name}" must be at least {size} px (detected {dimension} px).',msgImageHeightSmall:'Height of image file "{name}" must be at least {size} px (detected {dimension} px).',msgImageWidthLarge:'Width of image file "{name}" cannot exceed {size} px (detected {dimension} px).',msgImageHeightLarge:'Height of image file "{name}" cannot exceed {size} px (detected {dimension} px).',msgImageResizeError:"Could not get the image dimensions to resize.",msgImageResizeException:"Error while resizing the image.
    {errors}
    ",msgAjaxError:"Something went wrong with the {operation} operation. Please try again later!",msgAjaxProgressError:"{operation} failed",msgDuplicateFile:'File "{name}" of same size "{size}" has already been selected earlier. Skipping duplicate selection.',msgResumableUploadRetriesExceeded:"Upload aborted beyond {max} retries for file {file}! Error Details:
    {error}
    ",msgPendingTime:"{time} remaining",msgCalculatingTime:"calculating time remaining",ajaxOperations:{deleteThumb:"file delete",uploadThumb:"file upload",uploadBatch:"batch file upload",uploadExtra:"form data upload"},dropZoneTitle:"Drag & drop files here …",dropZoneClickTitle:"
    (or click to select {files})",previewZoomButtonTitles:{prev:"View previous file",next:"View next file",rotate:"Rotate 90 deg. clockwise",toggleheader:"Toggle header",fullscreen:"Toggle full screen",borderless:"Toggle borderless mode",close:"Close detailed preview"}},e.fn.fileinput.Constructor=n,e(document).ready((function(){var t=e("input.file[type=file]");t.length&&t.fileinput()}))},void 0===(s="function"==typeof r?r.apply(t,o):r)||(e.exports=s)}()},876:(e,t,i)=>{"use strict";var n,r,o,s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a="object"===("undefined"==typeof window?"undefined":s(window)); /*! ======================================================= VERSION 11.0.2 -========================================================= */r=[i(616)],void 0===(o="function"==typeof(n=function(e){var t,i="slider",n="bootstrapSlider";return a&&!window.console&&(window.console={}),a&&!window.console.log&&(window.console.log=function(){}),a&&!window.console.warn&&(window.console.warn=function(){}),function(e){var t=Array.prototype.slice;function i(){}function n(e){if(e){var n="undefined"==typeof console?i:function(e){console.error(e)};return e.bridget=function(e,t){r(t),o(e,t)},e.bridget}function r(t){t.prototype.option||(t.prototype.option=function(t){e.isPlainObject(t)&&(this.options=e.extend(!0,this.options,t))})}function o(i,r){e.fn[i]=function(o){if("string"==typeof o){for(var s=t.call(arguments,1),a=0,l=this.length;at.max?t.max:e},toValue:function(e){var t=e/100*(this.options.max-this.options.min),i=!0;if(this.options.ticks_positions.length>0){for(var n,r,o,a=0,l=1;l0){for(var t,i,n,r=0,o=0;o0?this.options.ticks[o-1]:0,n=o>0?this.options.ticks_positions[o-1]:0,i=this.options.ticks[o],r=this.options.ticks_positions[o];break}if(o>0)return n+(e-t)/(i-t)*(r-n)}return 100*(e-this.options.min)/(this.options.max-this.options.min)}},logarithmic:{toValue:function(e){var t=1-this.options.min,i=Math.log(this.options.min+t),n=Math.log(this.options.max+t),r=Math.exp(i+(n-i)*e/100)-t;return Math.round(r)===n?n:(r=this.options.min+Math.round((r-this.options.min)/this.options.step)*this.options.step,s.linear.getValue(r,this.options))},toPercentage:function(e){if(this.options.max===this.options.min)return 0;var t=1-this.options.min,i=Math.log(this.options.max+t),n=Math.log(this.options.min+t);return 100*(Math.log(e+t)-n)/(i-n)}}};function l(t,i){this._state={value:null,enabled:null,offset:null,size:null,percentage:null,inDrag:!1,over:!1,tickIndex:null},this.ticksCallbackMap={},this.handleCallbackMap={},"string"==typeof t?this.element=document.querySelector(t):t instanceof HTMLElement&&(this.element=t),i=i||{};for(var n=Object.keys(this.defaultOptions),r=i.hasOwnProperty("min"),o=i.hasOwnProperty("max"),a=0;a0,this.ticksAreValid||(this.options.lock_to_ticks=!1),"auto"===this.options.rtl){var u=window.getComputedStyle(this.element);this.options.rtl=null!=u?"rtl"===u.direction:"rtl"===this.element.style.direction}function d(e,t){var i="data-slider-"+t.replace(/_/g,"-"),n=e.getAttribute(i);try{return JSON.parse(n)}catch(e){return n}}"vertical"!==this.options.orientation||"top"!==this.options.tooltip_position&&"bottom"!==this.options.tooltip_position?"horizontal"!==this.options.orientation||"left"!==this.options.tooltip_position&&"right"!==this.options.tooltip_position||(this.options.tooltip_position="top"):this.options.rtl?this.options.tooltip_position="left":this.options.tooltip_position="right";var h,p,f,m,g,v=this.element.style.width,_=!1,b=this.element.parentNode;if(this.sliderElem)_=!0;else{this.sliderElem=document.createElement("div"),this.sliderElem.className="slider";var y=document.createElement("div");y.className="slider-track",(p=document.createElement("div")).className="slider-track-low",(h=document.createElement("div")).className="slider-selection",(f=document.createElement("div")).className="slider-track-high",(m=document.createElement("div")).className="slider-handle min-slider-handle",m.setAttribute("role","slider"),m.setAttribute("aria-valuemin",this.options.min),m.setAttribute("aria-valuemax",this.options.max),(g=document.createElement("div")).className="slider-handle max-slider-handle",g.setAttribute("role","slider"),g.setAttribute("aria-valuemin",this.options.min),g.setAttribute("aria-valuemax",this.options.max),y.appendChild(p),y.appendChild(h),y.appendChild(f),this.rangeHighlightElements=[];var w=this.options.rangeHighlights;if(Array.isArray(w)&&w.length>0)for(var x=0;x0){for(this.ticksContainer=document.createElement("div"),this.ticksContainer.className="slider-tick-container",a=0;a0)for(this.tickLabelContainer=document.createElement("div"),this.tickLabelContainer.className="slider-tick-label-container",a=0;a0&&(o||(this.options.max=Math.max.apply(Math,this.options.ticks)),r||(this.options.min=Math.min.apply(Math,this.options.ticks))),Array.isArray(this.options.value)?(this.options.range=!0,this._state.value=this.options.value):this.options.range?this._state.value=[this.options.value,this.options.max]:this._state.value=this.options.value,this.trackLow=p||this.trackLow,this.trackSelection=h||this.trackSelection,this.trackHigh=f||this.trackHigh,"none"===this.options.selection?(this._addClass(this.trackLow,"hide"),this._addClass(this.trackSelection,"hide"),this._addClass(this.trackHigh,"hide")):"after"!==this.options.selection&&"before"!==this.options.selection||(this._removeClass(this.trackLow,"hide"),this._removeClass(this.trackSelection,"hide"),this._removeClass(this.trackHigh,"hide")),this.handle1=m||this.handle1,this.handle2=g||this.handle2,!0===_)for(this._removeClass(this.handle1,"round triangle"),this._removeClass(this.handle2,"round triangle hide"),a=0;athis.options.min?this._state.percentage=[this._toPercentage(this._state.value[0]),this._toPercentage(this._state.value[1]),100*this.options.step/(this.options.max-this.options.min)]:this._state.percentage=[0,0,100],this._layout();var o=this.options.range?this._state.value:this._state.value[0];return this._setDataVal(o),!0===t&&this._trigger("slide",o),(Array.isArray(o)?n[0]!==o[0]||n[1]!==o[1]:n!==o)&&!0===i&&this._trigger("change",{oldValue:n,newValue:o}),this},destroy:function(){this._removeSliderEventHandlers(),this.sliderElem.parentNode.removeChild(this.sliderElem),this.element.style.display="",this._cleanUpEventCallbacksMap(),this.element.removeAttribute("data"),e&&(this._unbindJQueryEventHandlers(),r===i&&this.$element.removeData(r),this.$element.removeData(n))},disable:function(){return this._state.enabled=!1,this.handle1.removeAttribute("tabindex"),this.handle2.removeAttribute("tabindex"),this._addClass(this.sliderElem,"slider-disabled"),this._trigger("slideDisabled"),this},enable:function(){return this._state.enabled=!0,this.handle1.setAttribute("tabindex",0),this.handle2.setAttribute("tabindex",0),this._removeClass(this.sliderElem,"slider-disabled"),this._trigger("slideEnabled"),this},toggle:function(){return this._state.enabled?this.disable():this.enable(),this},isEnabled:function(){return this._state.enabled},on:function(e,t){return this._bindNonQueryEventHandler(e,t),this},off:function(t,i){e?(this.$element.off(t,i),this.$sliderElem.off(t,i)):this._unbindNonQueryEventHandler(t,i)},getAttribute:function(e){return e?this.options[e]:this.options},setAttribute:function(e,t){return this.options[e]=t,this},refresh:function(t){var o=this.getValue();return this._removeSliderEventHandlers(),l.call(this,this.element,this.options),t&&!0===t.useCurrentValue&&this.setValue(o),e&&(r===i?(e.data(this.element,i,this),e.data(this.element,n,this)):e.data(this.element,n,this)),this},relayout:function(){return this._resize(),this},_removeTooltipListener:function(e,t){this.handle1.removeEventListener(e,t,!1),this.handle2.removeEventListener(e,t,!1)},_removeSliderEventHandlers:function(){if(this.handle1.removeEventListener("keydown",this.handle1Keydown,!1),this.handle2.removeEventListener("keydown",this.handle2Keydown,!1),this.options.ticks_tooltip){for(var e=this.ticksContainer.getElementsByClassName("slider-tick"),t=0;t0&&e.options.ticks_positions[i]||e._toPercentage(e.options.ticks[i])):o=e._toPercentage(r),n.value[0]=r,n.percentage[0]=o,e._setToolTipOnMouseOver(n),e._showTooltip()};return t.addEventListener("mouseenter",n,!1),n},addMouseLeave:function(e,t){var i=function(){e._hideTooltip()};return t.addEventListener("mouseleave",i,!1),i}}},_layout:function(){var e,t,i;if(e=this.options.reversed?[100-this._state.percentage[0],this.options.range?100-this._state.percentage[1]:this._state.percentage[1]]:[this._state.percentage[0],this._state.percentage[1]],this.handle1.style[this.stylePos]=e[0]+"%",this.handle1.setAttribute("aria-valuenow",this._state.value[0]),t=this.options.formatter(this._state.value[0]),isNaN(t)?this.handle1.setAttribute("aria-valuetext",t):this.handle1.removeAttribute("aria-valuetext"),this.handle2.style[this.stylePos]=e[1]+"%",this.handle2.setAttribute("aria-valuenow",this._state.value[1]),t=this.options.formatter(this._state.value[1]),isNaN(t)?this.handle2.setAttribute("aria-valuetext",t):this.handle2.removeAttribute("aria-valuetext"),this.rangeHighlightElements.length>0&&Array.isArray(this.options.rangeHighlights)&&this.options.rangeHighlights.length>0)for(var n=0;n0){var l,c="vertical"===this.options.orientation?"height":"width";l="vertical"===this.options.orientation?"marginTop":this.options.rtl?"marginRight":"marginLeft";var u=this._state.size/(this.options.ticks.length-1);if(this.tickLabelContainer){var d=0;if(0===this.options.ticks_positions.length)"vertical"!==this.options.orientation&&(this.tickLabelContainer.style[l]=-u/2+"px"),d=this.tickLabelContainer.offsetHeight;else for(h=0;hd&&(d=this.tickLabelContainer.childNodes[h].offsetHeight);"horizontal"===this.options.orientation&&(this.sliderElem.style.marginBottom=d+"px")}for(var h=0;h=e[0]&&p<=e[1]&&this._addClass(this.ticks[h],"in-selection"):("after"===this.options.selection&&p>=e[0]||"before"===this.options.selection&&p<=e[0])&&this._addClass(this.ticks[h],"in-selection"),this.tickLabels[h]&&(this.tickLabels[h].style[c]=u+"px","vertical"!==this.options.orientation&&void 0!==this.options.ticks_positions[h]?(this.tickLabels[h].style.position="absolute",this.tickLabels[h].style[this.stylePos]=p+"%",this.tickLabels[h].style[l]=-u/2+"px"):"vertical"===this.options.orientation&&(this.options.rtl?this.tickLabels[h].style.marginRight=this.sliderElem.offsetWidth+"px":this.tickLabels[h].style.marginLeft=this.sliderElem.offsetWidth+"px",this.tickLabelContainer.style[l]=this.sliderElem.offsetWidth/2*-1+"px"),this._removeClass(this.tickLabels[h],"label-in-selection label-is-selection"),this.options.range?p>=e[0]&&p<=e[1]&&(this._addClass(this.tickLabels[h],"label-in-selection"),(p===e[0]||e[1])&&this._addClass(this.tickLabels[h],"label-is-selection")):(("after"===this.options.selection&&p>=e[0]||"before"===this.options.selection&&p<=e[0])&&this._addClass(this.tickLabels[h],"label-in-selection"),p===e[0]&&this._addClass(this.tickLabels[h],"label-is-selection")))}}if(this.options.range){i=this.options.formatter(this._state.value),this._setText(this.tooltipInner,i),this.tooltip.style[this.stylePos]=(e[1]+e[0])/2+"%";var f=this.options.formatter(this._state.value[0]);this._setText(this.tooltipInner_min,f);var m=this.options.formatter(this._state.value[1]);this._setText(this.tooltipInner_max,m),this.tooltip_min.style[this.stylePos]=e[0]+"%",this.tooltip_max.style[this.stylePos]=e[1]+"%"}else i=this.options.formatter(this._state.value[0]),this._setText(this.tooltipInner,i),this.tooltip.style[this.stylePos]=e[0]+"%";if("vertical"===this.options.orientation)this.trackLow.style.top="0",this.trackLow.style.height=Math.min(e[0],e[1])+"%",this.trackSelection.style.top=Math.min(e[0],e[1])+"%",this.trackSelection.style.height=Math.abs(e[0]-e[1])+"%",this.trackHigh.style.bottom="0",this.trackHigh.style.height=100-Math.min(e[0],e[1])-Math.abs(e[0]-e[1])+"%";else{"right"===this.stylePos?this.trackLow.style.right="0":this.trackLow.style.left="0",this.trackLow.style.width=Math.min(e[0],e[1])+"%","right"===this.stylePos?this.trackSelection.style.right=Math.min(e[0],e[1])+"%":this.trackSelection.style.left=Math.min(e[0],e[1])+"%",this.trackSelection.style.width=Math.abs(e[0]-e[1])+"%","right"===this.stylePos?this.trackHigh.style.left="0":this.trackHigh.style.right="0",this.trackHigh.style.width=100-Math.min(e[0],e[1])-Math.abs(e[0]-e[1])+"%";var g=this.tooltip_min.getBoundingClientRect(),v=this.tooltip_max.getBoundingClientRect();"bottom"===this.options.tooltip_position?g.right>v.left?(this._removeClass(this.tooltip_max,"bs-tooltip-bottom"),this._addClass(this.tooltip_max,"bs-tooltip-top"),this.tooltip_max.style.top="",this.tooltip_max.style.bottom="22px"):(this._removeClass(this.tooltip_max,"bs-tooltip-top"),this._addClass(this.tooltip_max,"bs-tooltip-bottom"),this.tooltip_max.style.top=this.tooltip_min.style.top,this.tooltip_max.style.bottom=""):g.right>v.left?(this._removeClass(this.tooltip_max,"bs-tooltip-top"),this._addClass(this.tooltip_max,"bs-tooltip-bottom"),this.tooltip_max.style.top="18px"):(this._removeClass(this.tooltip_max,"bs-tooltip-bottom"),this._addClass(this.tooltip_max,"bs-tooltip-top"),this.tooltip_max.style.top=this.tooltip_min.style.top)}},_createHighlightRange:function(e,t){return this._isHighlightRange(e,t)?e>t?{start:t,size:e-t}:{start:e,size:t-e}:null},_isHighlightRange:function(e,t){return 0<=e&&e<=100&&0<=t&&t<=100},_resize:function(e){this._state.offset=this._offset(this.sliderElem),this._state.size=this.sliderElem[this.sizePos],this._layout()},_removeProperty:function(e,t){e.style.removeProperty?e.style.removeProperty(t):e.style.removeAttribute(t)},_mousedown:function(e){if(!this._state.enabled)return!1;e.preventDefault&&e.preventDefault(),this._state.offset=this._offset(this.sliderElem),this._state.size=this.sliderElem[this.sizePos];var t=this._getPercentage(e);if(this.options.range){var i=Math.abs(this._state.percentage[0]-t),n=Math.abs(this._state.percentage[1]-t);this._state.dragged=ii?(this._state.percentage[1]=this._state.percentage[0],this._state.dragged=0):0===this._state.keyCtrl&&this._toPercentage(this._state.value[1])e&&(this._state.percentage[1]=this._state.percentage[0],this._state.keyCtrl=0,this.handle1.focus())}},_mouseup:function(e){if(!this._state.enabled)return!1;var t=this._getPercentage(e);this._adjustPercentageForRangeSliders(t),this._state.percentage[this._state.dragged]=t,this.touchCapable&&(document.removeEventListener("touchmove",this.mousemove,!1),document.removeEventListener("touchend",this.mouseup,!1)),document.removeEventListener("mousemove",this.mousemove,!1),document.removeEventListener("mouseup",this.mouseup,!1),this._state.inDrag=!1,!1===this._state.over&&this._hideTooltip();var i=this._calculateValue(!0);return this.setValue(i,!1,!0),this._trigger("slideStop",i),this._state.dragged=null,!1},_setValues:function(e,t){var i=0===e?0:100;this._state.percentage[e]!==i&&(t.data[e]=this._toValue(this._state.percentage[e]),t.data[e]=this._applyPrecision(t.data[e]))},_calculateValue:function(e){var t={};return this.options.range?(t.data=[this.options.min,this.options.max],this._setValues(0,t),this._setValues(1,t),e&&(t.data[0]=this._snapToClosestTick(t.data[0]),t.data[1]=this._snapToClosestTick(t.data[1]))):(t.data=this._toValue(this._state.percentage[0]),t.data=parseFloat(t.data),t.data=this._applyPrecision(t.data),e&&(t.data=this._snapToClosestTick(t.data))),t.data},_snapToClosestTick:function(e){for(var t=[e,1/0],i=0;i{"use strict";i.r(t),i.d(t,{Alert:()=>At,Button:()=>It,Carousel:()=>li,Collapse:()=>xi,Dropdown:()=>Zi,Modal:()=>Pn,Offcanvas:()=>Zn,Popover:()=>mr,ScrollSpy:()=>Er,Tab:()=>Xr,Toast:()=>uo,Tooltip:()=>hr});var n={};i.r(n),i.d(n,{afterMain:()=>C,afterRead:()=>y,afterWrite:()=>E,applyStyles:()=>L,arrow:()=>J,auto:()=>l,basePlacements:()=>c,beforeMain:()=>w,beforeRead:()=>_,beforeWrite:()=>T,bottom:()=>o,clippingParents:()=>h,computeStyles:()=>ne,createPopper:()=>Le,createPopperBase:()=>Fe,createPopperLite:()=>Me,detectOverflow:()=>be,end:()=>d,eventListeners:()=>oe,flip:()=>ye,hide:()=>Ce,left:()=>a,main:()=>x,modifierPhases:()=>S,offset:()=>Te,placements:()=>v,popper:()=>f,popperGenerator:()=>De,popperOffsets:()=>ke,preventOverflow:()=>Ee,read:()=>b,reference:()=>m,right:()=>s,start:()=>u,top:()=>r,variationPlacements:()=>g,viewport:()=>p,write:()=>k});var r="top",o="bottom",s="right",a="left",l="auto",c=[r,o,s,a],u="start",d="end",h="clippingParents",p="viewport",f="popper",m="reference",g=c.reduce((function(e,t){return e.concat([t+"-"+u,t+"-"+d])}),[]),v=[].concat(c,[l]).reduce((function(e,t){return e.concat([t,t+"-"+u,t+"-"+d])}),[]),_="beforeRead",b="read",y="afterRead",w="beforeMain",x="main",C="afterMain",T="beforeWrite",k="write",E="afterWrite",S=[_,b,y,w,x,C,T,k,E];function A(e){return e?(e.nodeName||"").toLowerCase():null}function P(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function I(e){return e instanceof P(e).Element||e instanceof Element}function D(e){return e instanceof P(e).HTMLElement||e instanceof HTMLElement}function F(e){return"undefined"!=typeof ShadowRoot&&(e instanceof P(e).ShadowRoot||e instanceof ShadowRoot)}const L={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var i=t.styles[e]||{},n=t.attributes[e]||{},r=t.elements[e];D(r)&&A(r)&&(Object.assign(r.style,i),Object.keys(n).forEach((function(e){var t=n[e];!1===t?r.removeAttribute(e):r.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,i={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,i.popper),t.styles=i,t.elements.arrow&&Object.assign(t.elements.arrow.style,i.arrow),function(){Object.keys(t.elements).forEach((function(e){var n=t.elements[e],r=t.attributes[e]||{},o=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:i[e]).reduce((function(e,t){return e[t]="",e}),{});D(n)&&A(n)&&(Object.assign(n.style,o),Object.keys(r).forEach((function(e){n.removeAttribute(e)})))}))}},requires:["computeStyles"]};function M(e){return e.split("-")[0]}var O=Math.max,j=Math.min,$=Math.round;function z(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map((function(e){return e.brand+"/"+e.version})).join(" "):navigator.userAgent}function N(){return!/^((?!chrome|android).)*safari/i.test(z())}function R(e,t,i){void 0===t&&(t=!1),void 0===i&&(i=!1);var n=e.getBoundingClientRect(),r=1,o=1;t&&D(e)&&(r=e.offsetWidth>0&&$(n.width)/e.offsetWidth||1,o=e.offsetHeight>0&&$(n.height)/e.offsetHeight||1);var s=(I(e)?P(e):window).visualViewport,a=!N()&&i,l=(n.left+(a&&s?s.offsetLeft:0))/r,c=(n.top+(a&&s?s.offsetTop:0))/o,u=n.width/r,d=n.height/o;return{width:u,height:d,top:c,right:l+u,bottom:c+d,left:l,x:l,y:c}}function U(e){var t=R(e),i=e.offsetWidth,n=e.offsetHeight;return Math.abs(t.width-i)<=1&&(i=t.width),Math.abs(t.height-n)<=1&&(n=t.height),{x:e.offsetLeft,y:e.offsetTop,width:i,height:n}}function B(e,t){var i=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(i&&F(i)){var n=t;do{if(n&&e.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function H(e){return P(e).getComputedStyle(e)}function q(e){return["table","td","th"].indexOf(A(e))>=0}function W(e){return((I(e)?e.ownerDocument:e.document)||window.document).documentElement}function V(e){return"html"===A(e)?e:e.assignedSlot||e.parentNode||(F(e)?e.host:null)||W(e)}function Z(e){return D(e)&&"fixed"!==H(e).position?e.offsetParent:null}function K(e){for(var t=P(e),i=Z(e);i&&q(i)&&"static"===H(i).position;)i=Z(i);return i&&("html"===A(i)||"body"===A(i)&&"static"===H(i).position)?t:i||function(e){var t=/firefox/i.test(z());if(/Trident/i.test(z())&&D(e)&&"fixed"===H(e).position)return null;var i=V(e);for(F(i)&&(i=i.host);D(i)&&["html","body"].indexOf(A(i))<0;){var n=H(i);if("none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||-1!==["transform","perspective"].indexOf(n.willChange)||t&&"filter"===n.willChange||t&&n.filter&&"none"!==n.filter)return i;i=i.parentNode}return null}(e)||t}function X(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Y(e,t,i){return O(e,j(t,i))}function Q(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function G(e,t){return t.reduce((function(t,i){return t[i]=e,t}),{})}const J={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,i=e.state,n=e.name,l=e.options,u=i.elements.arrow,d=i.modifiersData.popperOffsets,h=M(i.placement),p=X(h),f=[a,s].indexOf(h)>=0?"height":"width";if(u&&d){var m=function(e,t){return Q("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:G(e,c))}(l.padding,i),g=U(u),v="y"===p?r:a,_="y"===p?o:s,b=i.rects.reference[f]+i.rects.reference[p]-d[p]-i.rects.popper[f],y=d[p]-i.rects.reference[p],w=K(u),x=w?"y"===p?w.clientHeight||0:w.clientWidth||0:0,C=b/2-y/2,T=m[v],k=x-g[f]-m[_],E=x/2-g[f]/2+C,S=Y(T,E,k),A=p;i.modifiersData[n]=((t={})[A]=S,t.centerOffset=S-E,t)}},effect:function(e){var t=e.state,i=e.options.element,n=void 0===i?"[data-popper-arrow]":i;null!=n&&("string"!=typeof n||(n=t.elements.popper.querySelector(n)))&&B(t.elements.popper,n)&&(t.elements.arrow=n)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function ee(e){return e.split("-")[1]}var te={top:"auto",right:"auto",bottom:"auto",left:"auto"};function ie(e){var t,i=e.popper,n=e.popperRect,l=e.placement,c=e.variation,u=e.offsets,h=e.position,p=e.gpuAcceleration,f=e.adaptive,m=e.roundOffsets,g=e.isFixed,v=u.x,_=void 0===v?0:v,b=u.y,y=void 0===b?0:b,w="function"==typeof m?m({x:_,y}):{x:_,y};_=w.x,y=w.y;var x=u.hasOwnProperty("x"),C=u.hasOwnProperty("y"),T=a,k=r,E=window;if(f){var S=K(i),A="clientHeight",I="clientWidth";if(S===P(i)&&"static"!==H(S=W(i)).position&&"absolute"===h&&(A="scrollHeight",I="scrollWidth"),l===r||(l===a||l===s)&&c===d)k=o,y-=(g&&S===E&&E.visualViewport?E.visualViewport.height:S[A])-n.height,y*=p?1:-1;if(l===a||(l===r||l===o)&&c===d)T=s,_-=(g&&S===E&&E.visualViewport?E.visualViewport.width:S[I])-n.width,_*=p?1:-1}var D,F=Object.assign({position:h},f&&te),L=!0===m?function(e,t){var i=e.x,n=e.y,r=t.devicePixelRatio||1;return{x:$(i*r)/r||0,y:$(n*r)/r||0}}({x:_,y},P(i)):{x:_,y};return _=L.x,y=L.y,p?Object.assign({},F,((D={})[k]=C?"0":"",D[T]=x?"0":"",D.transform=(E.devicePixelRatio||1)<=1?"translate("+_+"px, "+y+"px)":"translate3d("+_+"px, "+y+"px, 0)",D)):Object.assign({},F,((t={})[k]=C?y+"px":"",t[T]=x?_+"px":"",t.transform="",t))}const ne={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,i=e.options,n=i.gpuAcceleration,r=void 0===n||n,o=i.adaptive,s=void 0===o||o,a=i.roundOffsets,l=void 0===a||a,c={placement:M(t.placement),variation:ee(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:r,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,ie(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:s,roundOffsets:l})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,ie(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}};var re={passive:!0};const oe={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,i=e.instance,n=e.options,r=n.scroll,o=void 0===r||r,s=n.resize,a=void 0===s||s,l=P(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&c.forEach((function(e){e.addEventListener("scroll",i.update,re)})),a&&l.addEventListener("resize",i.update,re),function(){o&&c.forEach((function(e){e.removeEventListener("scroll",i.update,re)})),a&&l.removeEventListener("resize",i.update,re)}},data:{}};var se={left:"right",right:"left",bottom:"top",top:"bottom"};function ae(e){return e.replace(/left|right|bottom|top/g,(function(e){return se[e]}))}var le={start:"end",end:"start"};function ce(e){return e.replace(/start|end/g,(function(e){return le[e]}))}function ue(e){var t=P(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function de(e){return R(W(e)).left+ue(e).scrollLeft}function he(e){var t=H(e),i=t.overflow,n=t.overflowX,r=t.overflowY;return/auto|scroll|overlay|hidden/.test(i+r+n)}function pe(e){return["html","body","#document"].indexOf(A(e))>=0?e.ownerDocument.body:D(e)&&he(e)?e:pe(V(e))}function fe(e,t){var i;void 0===t&&(t=[]);var n=pe(e),r=n===(null==(i=e.ownerDocument)?void 0:i.body),o=P(n),s=r?[o].concat(o.visualViewport||[],he(n)?n:[]):n,a=t.concat(s);return r?a:a.concat(fe(V(s)))}function me(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function ge(e,t,i){return t===p?me(function(e,t){var i=P(e),n=W(e),r=i.visualViewport,o=n.clientWidth,s=n.clientHeight,a=0,l=0;if(r){o=r.width,s=r.height;var c=N();(c||!c&&"fixed"===t)&&(a=r.offsetLeft,l=r.offsetTop)}return{width:o,height:s,x:a+de(e),y:l}}(e,i)):I(t)?function(e,t){var i=R(e,!1,"fixed"===t);return i.top=i.top+e.clientTop,i.left=i.left+e.clientLeft,i.bottom=i.top+e.clientHeight,i.right=i.left+e.clientWidth,i.width=e.clientWidth,i.height=e.clientHeight,i.x=i.left,i.y=i.top,i}(t,i):me(function(e){var t,i=W(e),n=ue(e),r=null==(t=e.ownerDocument)?void 0:t.body,o=O(i.scrollWidth,i.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),s=O(i.scrollHeight,i.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),a=-n.scrollLeft+de(e),l=-n.scrollTop;return"rtl"===H(r||i).direction&&(a+=O(i.clientWidth,r?r.clientWidth:0)-o),{width:o,height:s,x:a,y:l}}(W(e)))}function ve(e,t,i,n){var r="clippingParents"===t?function(e){var t=fe(V(e)),i=["absolute","fixed"].indexOf(H(e).position)>=0&&D(e)?K(e):e;return I(i)?t.filter((function(e){return I(e)&&B(e,i)&&"body"!==A(e)})):[]}(e):[].concat(t),o=[].concat(r,[i]),s=o[0],a=o.reduce((function(t,i){var r=ge(e,i,n);return t.top=O(r.top,t.top),t.right=j(r.right,t.right),t.bottom=j(r.bottom,t.bottom),t.left=O(r.left,t.left),t}),ge(e,s,n));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function _e(e){var t,i=e.reference,n=e.element,l=e.placement,c=l?M(l):null,h=l?ee(l):null,p=i.x+i.width/2-n.width/2,f=i.y+i.height/2-n.height/2;switch(c){case r:t={x:p,y:i.y-n.height};break;case o:t={x:p,y:i.y+i.height};break;case s:t={x:i.x+i.width,y:f};break;case a:t={x:i.x-n.width,y:f};break;default:t={x:i.x,y:i.y}}var m=c?X(c):null;if(null!=m){var g="y"===m?"height":"width";switch(h){case u:t[m]=t[m]-(i[g]/2-n[g]/2);break;case d:t[m]=t[m]+(i[g]/2-n[g]/2)}}return t}function be(e,t){void 0===t&&(t={});var i=t,n=i.placement,a=void 0===n?e.placement:n,l=i.strategy,u=void 0===l?e.strategy:l,d=i.boundary,g=void 0===d?h:d,v=i.rootBoundary,_=void 0===v?p:v,b=i.elementContext,y=void 0===b?f:b,w=i.altBoundary,x=void 0!==w&&w,C=i.padding,T=void 0===C?0:C,k=Q("number"!=typeof T?T:G(T,c)),E=y===f?m:f,S=e.rects.popper,A=e.elements[x?E:y],P=ve(I(A)?A:A.contextElement||W(e.elements.popper),g,_,u),D=R(e.elements.reference),F=_e({reference:D,element:S,strategy:"absolute",placement:a}),L=me(Object.assign({},S,F)),M=y===f?L:D,O={top:P.top-M.top+k.top,bottom:M.bottom-P.bottom+k.bottom,left:P.left-M.left+k.left,right:M.right-P.right+k.right},j=e.modifiersData.offset;if(y===f&&j){var $=j[a];Object.keys(O).forEach((function(e){var t=[s,o].indexOf(e)>=0?1:-1,i=[r,o].indexOf(e)>=0?"y":"x";O[e]+=$[i]*t}))}return O}const ye={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,i=e.options,n=e.name;if(!t.modifiersData[n]._skip){for(var d=i.mainAxis,h=void 0===d||d,p=i.altAxis,f=void 0===p||p,m=i.fallbackPlacements,_=i.padding,b=i.boundary,y=i.rootBoundary,w=i.altBoundary,x=i.flipVariations,C=void 0===x||x,T=i.allowedAutoPlacements,k=t.options.placement,E=M(k),S=m||(E===k||!C?[ae(k)]:function(e){if(M(e)===l)return[];var t=ae(e);return[ce(e),t,ce(t)]}(k)),A=[k].concat(S).reduce((function(e,i){return e.concat(M(i)===l?function(e,t){void 0===t&&(t={});var i=t,n=i.placement,r=i.boundary,o=i.rootBoundary,s=i.padding,a=i.flipVariations,l=i.allowedAutoPlacements,u=void 0===l?v:l,d=ee(n),h=d?a?g:g.filter((function(e){return ee(e)===d})):c,p=h.filter((function(e){return u.indexOf(e)>=0}));0===p.length&&(p=h);var f=p.reduce((function(t,i){return t[i]=be(e,{placement:i,boundary:r,rootBoundary:o,padding:s})[M(i)],t}),{});return Object.keys(f).sort((function(e,t){return f[e]-f[t]}))}(t,{placement:i,boundary:b,rootBoundary:y,padding:_,flipVariations:C,allowedAutoPlacements:T}):i)}),[]),P=t.rects.reference,I=t.rects.popper,D=new Map,F=!0,L=A[0],O=0;O=0,R=N?"width":"height",U=be(t,{placement:j,boundary:b,rootBoundary:y,altBoundary:w,padding:_}),B=N?z?s:a:z?o:r;P[R]>I[R]&&(B=ae(B));var H=ae(B),q=[];if(h&&q.push(U[$]<=0),f&&q.push(U[B]<=0,U[H]<=0),q.every((function(e){return e}))){L=j,F=!1;break}D.set(j,q)}if(F)for(var W=function(e){var t=A.find((function(t){var i=D.get(t);if(i)return i.slice(0,e).every((function(e){return e}))}));if(t)return L=t,"break"},V=C?3:1;V>0;V--){if("break"===W(V))break}t.placement!==L&&(t.modifiersData[n]._skip=!0,t.placement=L,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function we(e,t,i){return void 0===i&&(i={x:0,y:0}),{top:e.top-t.height-i.y,right:e.right-t.width+i.x,bottom:e.bottom-t.height+i.y,left:e.left-t.width-i.x}}function xe(e){return[r,s,o,a].some((function(t){return e[t]>=0}))}const Ce={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,i=e.name,n=t.rects.reference,r=t.rects.popper,o=t.modifiersData.preventOverflow,s=be(t,{elementContext:"reference"}),a=be(t,{altBoundary:!0}),l=we(s,n),c=we(a,r,o),u=xe(l),d=xe(c);t.modifiersData[i]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}};const Te={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,i=e.options,n=e.name,o=i.offset,l=void 0===o?[0,0]:o,c=v.reduce((function(e,i){return e[i]=function(e,t,i){var n=M(e),o=[a,r].indexOf(n)>=0?-1:1,l="function"==typeof i?i(Object.assign({},t,{placement:e})):i,c=l[0],u=l[1];return c=c||0,u=(u||0)*o,[a,s].indexOf(n)>=0?{x:u,y:c}:{x:c,y:u}}(i,t.rects,l),e}),{}),u=c[t.placement],d=u.x,h=u.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=d,t.modifiersData.popperOffsets.y+=h),t.modifiersData[n]=c}};const ke={name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,i=e.name;t.modifiersData[i]=_e({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}};const Ee={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,i=e.options,n=e.name,l=i.mainAxis,c=void 0===l||l,d=i.altAxis,h=void 0!==d&&d,p=i.boundary,f=i.rootBoundary,m=i.altBoundary,g=i.padding,v=i.tether,_=void 0===v||v,b=i.tetherOffset,y=void 0===b?0:b,w=be(t,{boundary:p,rootBoundary:f,padding:g,altBoundary:m}),x=M(t.placement),C=ee(t.placement),T=!C,k=X(x),E="x"===k?"y":"x",S=t.modifiersData.popperOffsets,A=t.rects.reference,P=t.rects.popper,I="function"==typeof y?y(Object.assign({},t.rects,{placement:t.placement})):y,D="number"==typeof I?{mainAxis:I,altAxis:I}:Object.assign({mainAxis:0,altAxis:0},I),F=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,L={x:0,y:0};if(S){if(c){var $,z="y"===k?r:a,N="y"===k?o:s,R="y"===k?"height":"width",B=S[k],H=B+w[z],q=B-w[N],W=_?-P[R]/2:0,V=C===u?A[R]:P[R],Z=C===u?-P[R]:-A[R],Q=t.elements.arrow,G=_&&Q?U(Q):{width:0,height:0},J=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},te=J[z],ie=J[N],ne=Y(0,A[R],G[R]),re=T?A[R]/2-W-ne-te-D.mainAxis:V-ne-te-D.mainAxis,oe=T?-A[R]/2+W+ne+ie+D.mainAxis:Z+ne+ie+D.mainAxis,se=t.elements.arrow&&K(t.elements.arrow),ae=se?"y"===k?se.clientTop||0:se.clientLeft||0:0,le=null!=($=null==F?void 0:F[k])?$:0,ce=B+oe-le,ue=Y(_?j(H,B+re-le-ae):H,B,_?O(q,ce):q);S[k]=ue,L[k]=ue-B}if(h){var de,he="x"===k?r:a,pe="x"===k?o:s,fe=S[E],me="y"===E?"height":"width",ge=fe+w[he],ve=fe-w[pe],_e=-1!==[r,a].indexOf(x),ye=null!=(de=null==F?void 0:F[E])?de:0,we=_e?ge:fe-A[me]-P[me]-ye+D.altAxis,xe=_e?fe+A[me]+P[me]-ye-D.altAxis:ve,Ce=_&&_e?function(e,t,i){var n=Y(e,t,i);return n>i?i:n}(we,fe,xe):Y(_?we:ge,fe,_?xe:ve);S[E]=Ce,L[E]=Ce-fe}t.modifiersData[n]=L}},requiresIfExists:["offset"]};function Se(e,t,i){void 0===i&&(i=!1);var n,r,o=D(t),s=D(t)&&function(e){var t=e.getBoundingClientRect(),i=$(t.width)/e.offsetWidth||1,n=$(t.height)/e.offsetHeight||1;return 1!==i||1!==n}(t),a=W(t),l=R(e,s,i),c={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(o||!o&&!i)&&(("body"!==A(t)||he(a))&&(c=(n=t)!==P(n)&&D(n)?{scrollLeft:(r=n).scrollLeft,scrollTop:r.scrollTop}:ue(n)),D(t)?((u=R(t,!0)).x+=t.clientLeft,u.y+=t.clientTop):a&&(u.x=de(a))),{x:l.left+c.scrollLeft-u.x,y:l.top+c.scrollTop-u.y,width:l.width,height:l.height}}function Ae(e){var t=new Map,i=new Set,n=[];function r(e){i.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!i.has(e)){var n=t.get(e);n&&r(n)}})),n.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){i.has(e.name)||r(e)})),n}var Pe={placement:"bottom",modifiers:[],strategy:"absolute"};function Ie(){for(var e=arguments.length,t=new Array(e),i=0;it.max?t.max:e},toValue:function(e){var t=e/100*(this.options.max-this.options.min),i=!0;if(this.options.ticks_positions.length>0){for(var n,r,o,a=0,l=1;l0){for(var t,i,n,r=0,o=0;o0?this.options.ticks[o-1]:0,n=o>0?this.options.ticks_positions[o-1]:0,i=this.options.ticks[o],r=this.options.ticks_positions[o];break}if(o>0)return n+(e-t)/(i-t)*(r-n)}return 100*(e-this.options.min)/(this.options.max-this.options.min)}},logarithmic:{toValue:function(e){var t=1-this.options.min,i=Math.log(this.options.min+t),n=Math.log(this.options.max+t),r=Math.exp(i+(n-i)*e/100)-t;return Math.round(r)===n?n:(r=this.options.min+Math.round((r-this.options.min)/this.options.step)*this.options.step,s.linear.getValue(r,this.options))},toPercentage:function(e){if(this.options.max===this.options.min)return 0;var t=1-this.options.min,i=Math.log(this.options.max+t),n=Math.log(this.options.min+t);return 100*(Math.log(e+t)-n)/(i-n)}}};function l(t,i){this._state={value:null,enabled:null,offset:null,size:null,percentage:null,inDrag:!1,over:!1,tickIndex:null},this.ticksCallbackMap={},this.handleCallbackMap={},"string"==typeof t?this.element=document.querySelector(t):t instanceof HTMLElement&&(this.element=t),i=i||{};for(var n=Object.keys(this.defaultOptions),r=i.hasOwnProperty("min"),o=i.hasOwnProperty("max"),a=0;a0,this.ticksAreValid||(this.options.lock_to_ticks=!1),"auto"===this.options.rtl){var u=window.getComputedStyle(this.element);this.options.rtl=null!=u?"rtl"===u.direction:"rtl"===this.element.style.direction}function d(e,t){var i="data-slider-"+t.replace(/_/g,"-"),n=e.getAttribute(i);try{return JSON.parse(n)}catch(e){return n}}"vertical"!==this.options.orientation||"top"!==this.options.tooltip_position&&"bottom"!==this.options.tooltip_position?"horizontal"!==this.options.orientation||"left"!==this.options.tooltip_position&&"right"!==this.options.tooltip_position||(this.options.tooltip_position="top"):this.options.rtl?this.options.tooltip_position="left":this.options.tooltip_position="right";var h,p,f,m,g,v=this.element.style.width,_=!1,b=this.element.parentNode;if(this.sliderElem)_=!0;else{this.sliderElem=document.createElement("div"),this.sliderElem.className="slider";var y=document.createElement("div");y.className="slider-track",(p=document.createElement("div")).className="slider-track-low",(h=document.createElement("div")).className="slider-selection",(f=document.createElement("div")).className="slider-track-high",(m=document.createElement("div")).className="slider-handle min-slider-handle",m.setAttribute("role","slider"),m.setAttribute("aria-valuemin",this.options.min),m.setAttribute("aria-valuemax",this.options.max),(g=document.createElement("div")).className="slider-handle max-slider-handle",g.setAttribute("role","slider"),g.setAttribute("aria-valuemin",this.options.min),g.setAttribute("aria-valuemax",this.options.max),y.appendChild(p),y.appendChild(h),y.appendChild(f),this.rangeHighlightElements=[];var w=this.options.rangeHighlights;if(Array.isArray(w)&&w.length>0)for(var x=0;x0){for(this.ticksContainer=document.createElement("div"),this.ticksContainer.className="slider-tick-container",a=0;a0)for(this.tickLabelContainer=document.createElement("div"),this.tickLabelContainer.className="slider-tick-label-container",a=0;a0&&(o||(this.options.max=Math.max.apply(Math,this.options.ticks)),r||(this.options.min=Math.min.apply(Math,this.options.ticks))),Array.isArray(this.options.value)?(this.options.range=!0,this._state.value=this.options.value):this.options.range?this._state.value=[this.options.value,this.options.max]:this._state.value=this.options.value,this.trackLow=p||this.trackLow,this.trackSelection=h||this.trackSelection,this.trackHigh=f||this.trackHigh,"none"===this.options.selection?(this._addClass(this.trackLow,"hide"),this._addClass(this.trackSelection,"hide"),this._addClass(this.trackHigh,"hide")):"after"!==this.options.selection&&"before"!==this.options.selection||(this._removeClass(this.trackLow,"hide"),this._removeClass(this.trackSelection,"hide"),this._removeClass(this.trackHigh,"hide")),this.handle1=m||this.handle1,this.handle2=g||this.handle2,!0===_)for(this._removeClass(this.handle1,"round triangle"),this._removeClass(this.handle2,"round triangle hide"),a=0;athis.options.min?this._state.percentage=[this._toPercentage(this._state.value[0]),this._toPercentage(this._state.value[1]),100*this.options.step/(this.options.max-this.options.min)]:this._state.percentage=[0,0,100],this._layout();var o=this.options.range?this._state.value:this._state.value[0];return this._setDataVal(o),!0===t&&this._trigger("slide",o),(Array.isArray(o)?n[0]!==o[0]||n[1]!==o[1]:n!==o)&&!0===i&&this._trigger("change",{oldValue:n,newValue:o}),this},destroy:function(){this._removeSliderEventHandlers(),this.sliderElem.parentNode.removeChild(this.sliderElem),this.element.style.display="",this._cleanUpEventCallbacksMap(),this.element.removeAttribute("data"),e&&(this._unbindJQueryEventHandlers(),r===i&&this.$element.removeData(r),this.$element.removeData(n))},disable:function(){return this._state.enabled=!1,this.handle1.removeAttribute("tabindex"),this.handle2.removeAttribute("tabindex"),this._addClass(this.sliderElem,"slider-disabled"),this._trigger("slideDisabled"),this},enable:function(){return this._state.enabled=!0,this.handle1.setAttribute("tabindex",0),this.handle2.setAttribute("tabindex",0),this._removeClass(this.sliderElem,"slider-disabled"),this._trigger("slideEnabled"),this},toggle:function(){return this._state.enabled?this.disable():this.enable(),this},isEnabled:function(){return this._state.enabled},on:function(e,t){return this._bindNonQueryEventHandler(e,t),this},off:function(t,i){e?(this.$element.off(t,i),this.$sliderElem.off(t,i)):this._unbindNonQueryEventHandler(t,i)},getAttribute:function(e){return e?this.options[e]:this.options},setAttribute:function(e,t){return this.options[e]=t,this},refresh:function(t){var o=this.getValue();return this._removeSliderEventHandlers(),l.call(this,this.element,this.options),t&&!0===t.useCurrentValue&&this.setValue(o),e&&(r===i?(e.data(this.element,i,this),e.data(this.element,n,this)):e.data(this.element,n,this)),this},relayout:function(){return this._resize(),this},_removeTooltipListener:function(e,t){this.handle1.removeEventListener(e,t,!1),this.handle2.removeEventListener(e,t,!1)},_removeSliderEventHandlers:function(){if(this.handle1.removeEventListener("keydown",this.handle1Keydown,!1),this.handle2.removeEventListener("keydown",this.handle2Keydown,!1),this.options.ticks_tooltip){for(var e=this.ticksContainer.getElementsByClassName("slider-tick"),t=0;t0&&e.options.ticks_positions[i]||e._toPercentage(e.options.ticks[i])):o=e._toPercentage(r),n.value[0]=r,n.percentage[0]=o,e._setToolTipOnMouseOver(n),e._showTooltip()};return t.addEventListener("mouseenter",n,!1),n},addMouseLeave:function(e,t){var i=function(){e._hideTooltip()};return t.addEventListener("mouseleave",i,!1),i}}},_layout:function(){var e,t,i;if(e=this.options.reversed?[100-this._state.percentage[0],this.options.range?100-this._state.percentage[1]:this._state.percentage[1]]:[this._state.percentage[0],this._state.percentage[1]],this.handle1.style[this.stylePos]=e[0]+"%",this.handle1.setAttribute("aria-valuenow",this._state.value[0]),t=this.options.formatter(this._state.value[0]),isNaN(t)?this.handle1.setAttribute("aria-valuetext",t):this.handle1.removeAttribute("aria-valuetext"),this.handle2.style[this.stylePos]=e[1]+"%",this.handle2.setAttribute("aria-valuenow",this._state.value[1]),t=this.options.formatter(this._state.value[1]),isNaN(t)?this.handle2.setAttribute("aria-valuetext",t):this.handle2.removeAttribute("aria-valuetext"),this.rangeHighlightElements.length>0&&Array.isArray(this.options.rangeHighlights)&&this.options.rangeHighlights.length>0)for(var n=0;n0){var l,c="vertical"===this.options.orientation?"height":"width";l="vertical"===this.options.orientation?"marginTop":this.options.rtl?"marginRight":"marginLeft";var u=this._state.size/(this.options.ticks.length-1);if(this.tickLabelContainer){var d=0;if(0===this.options.ticks_positions.length)"vertical"!==this.options.orientation&&(this.tickLabelContainer.style[l]=-u/2+"px"),d=this.tickLabelContainer.offsetHeight;else for(h=0;hd&&(d=this.tickLabelContainer.childNodes[h].offsetHeight);"horizontal"===this.options.orientation&&(this.sliderElem.style.marginBottom=d+"px")}for(var h=0;h=e[0]&&p<=e[1]&&this._addClass(this.ticks[h],"in-selection"):("after"===this.options.selection&&p>=e[0]||"before"===this.options.selection&&p<=e[0])&&this._addClass(this.ticks[h],"in-selection"),this.tickLabels[h]&&(this.tickLabels[h].style[c]=u+"px","vertical"!==this.options.orientation&&void 0!==this.options.ticks_positions[h]?(this.tickLabels[h].style.position="absolute",this.tickLabels[h].style[this.stylePos]=p+"%",this.tickLabels[h].style[l]=-u/2+"px"):"vertical"===this.options.orientation&&(this.options.rtl?this.tickLabels[h].style.marginRight=this.sliderElem.offsetWidth+"px":this.tickLabels[h].style.marginLeft=this.sliderElem.offsetWidth+"px",this.tickLabelContainer.style[l]=this.sliderElem.offsetWidth/2*-1+"px"),this._removeClass(this.tickLabels[h],"label-in-selection label-is-selection"),this.options.range?p>=e[0]&&p<=e[1]&&(this._addClass(this.tickLabels[h],"label-in-selection"),(p===e[0]||e[1])&&this._addClass(this.tickLabels[h],"label-is-selection")):(("after"===this.options.selection&&p>=e[0]||"before"===this.options.selection&&p<=e[0])&&this._addClass(this.tickLabels[h],"label-in-selection"),p===e[0]&&this._addClass(this.tickLabels[h],"label-is-selection")))}}if(this.options.range){i=this.options.formatter(this._state.value),this._setText(this.tooltipInner,i),this.tooltip.style[this.stylePos]=(e[1]+e[0])/2+"%";var f=this.options.formatter(this._state.value[0]);this._setText(this.tooltipInner_min,f);var m=this.options.formatter(this._state.value[1]);this._setText(this.tooltipInner_max,m),this.tooltip_min.style[this.stylePos]=e[0]+"%",this.tooltip_max.style[this.stylePos]=e[1]+"%"}else i=this.options.formatter(this._state.value[0]),this._setText(this.tooltipInner,i),this.tooltip.style[this.stylePos]=e[0]+"%";if("vertical"===this.options.orientation)this.trackLow.style.top="0",this.trackLow.style.height=Math.min(e[0],e[1])+"%",this.trackSelection.style.top=Math.min(e[0],e[1])+"%",this.trackSelection.style.height=Math.abs(e[0]-e[1])+"%",this.trackHigh.style.bottom="0",this.trackHigh.style.height=100-Math.min(e[0],e[1])-Math.abs(e[0]-e[1])+"%";else{"right"===this.stylePos?this.trackLow.style.right="0":this.trackLow.style.left="0",this.trackLow.style.width=Math.min(e[0],e[1])+"%","right"===this.stylePos?this.trackSelection.style.right=Math.min(e[0],e[1])+"%":this.trackSelection.style.left=Math.min(e[0],e[1])+"%",this.trackSelection.style.width=Math.abs(e[0]-e[1])+"%","right"===this.stylePos?this.trackHigh.style.left="0":this.trackHigh.style.right="0",this.trackHigh.style.width=100-Math.min(e[0],e[1])-Math.abs(e[0]-e[1])+"%";var g=this.tooltip_min.getBoundingClientRect(),v=this.tooltip_max.getBoundingClientRect();"bottom"===this.options.tooltip_position?g.right>v.left?(this._removeClass(this.tooltip_max,"bs-tooltip-bottom"),this._addClass(this.tooltip_max,"bs-tooltip-top"),this.tooltip_max.style.top="",this.tooltip_max.style.bottom="22px"):(this._removeClass(this.tooltip_max,"bs-tooltip-top"),this._addClass(this.tooltip_max,"bs-tooltip-bottom"),this.tooltip_max.style.top=this.tooltip_min.style.top,this.tooltip_max.style.bottom=""):g.right>v.left?(this._removeClass(this.tooltip_max,"bs-tooltip-top"),this._addClass(this.tooltip_max,"bs-tooltip-bottom"),this.tooltip_max.style.top="18px"):(this._removeClass(this.tooltip_max,"bs-tooltip-bottom"),this._addClass(this.tooltip_max,"bs-tooltip-top"),this.tooltip_max.style.top=this.tooltip_min.style.top)}},_createHighlightRange:function(e,t){return this._isHighlightRange(e,t)?e>t?{start:t,size:e-t}:{start:e,size:t-e}:null},_isHighlightRange:function(e,t){return 0<=e&&e<=100&&0<=t&&t<=100},_resize:function(e){this._state.offset=this._offset(this.sliderElem),this._state.size=this.sliderElem[this.sizePos],this._layout()},_removeProperty:function(e,t){e.style.removeProperty?e.style.removeProperty(t):e.style.removeAttribute(t)},_mousedown:function(e){if(!this._state.enabled)return!1;e.preventDefault&&e.preventDefault(),this._state.offset=this._offset(this.sliderElem),this._state.size=this.sliderElem[this.sizePos];var t=this._getPercentage(e);if(this.options.range){var i=Math.abs(this._state.percentage[0]-t),n=Math.abs(this._state.percentage[1]-t);this._state.dragged=ii?(this._state.percentage[1]=this._state.percentage[0],this._state.dragged=0):0===this._state.keyCtrl&&this._toPercentage(this._state.value[1])e&&(this._state.percentage[1]=this._state.percentage[0],this._state.keyCtrl=0,this.handle1.focus())}},_mouseup:function(e){if(!this._state.enabled)return!1;var t=this._getPercentage(e);this._adjustPercentageForRangeSliders(t),this._state.percentage[this._state.dragged]=t,this.touchCapable&&(document.removeEventListener("touchmove",this.mousemove,!1),document.removeEventListener("touchend",this.mouseup,!1)),document.removeEventListener("mousemove",this.mousemove,!1),document.removeEventListener("mouseup",this.mouseup,!1),this._state.inDrag=!1,!1===this._state.over&&this._hideTooltip();var i=this._calculateValue(!0);return this.setValue(i,!1,!0),this._trigger("slideStop",i),this._state.dragged=null,!1},_setValues:function(e,t){var i=0===e?0:100;this._state.percentage[e]!==i&&(t.data[e]=this._toValue(this._state.percentage[e]),t.data[e]=this._applyPrecision(t.data[e]))},_calculateValue:function(e){var t={};return this.options.range?(t.data=[this.options.min,this.options.max],this._setValues(0,t),this._setValues(1,t),e&&(t.data[0]=this._snapToClosestTick(t.data[0]),t.data[1]=this._snapToClosestTick(t.data[1]))):(t.data=this._toValue(this._state.percentage[0]),t.data=parseFloat(t.data),t.data=this._applyPrecision(t.data),e&&(t.data=this._snapToClosestTick(t.data))),t.data},_snapToClosestTick:function(e){for(var t=[e,1/0],i=0;i{"use strict";i.r(t),i.d(t,{Alert:()=>At,Button:()=>It,Carousel:()=>ui,Collapse:()=>Ti,Dropdown:()=>Xi,Modal:()=>Dn,Offcanvas:()=>Xn,Popover:()=>yr,ScrollSpy:()=>Dr,Tab:()=>eo,Toast:()=>go,Tooltip:()=>mr});var n={};i.r(n),i.d(n,{afterMain:()=>C,afterRead:()=>y,afterWrite:()=>E,applyStyles:()=>M,arrow:()=>J,auto:()=>l,basePlacements:()=>c,beforeMain:()=>w,beforeRead:()=>_,beforeWrite:()=>T,bottom:()=>o,clippingParents:()=>h,computeStyles:()=>ne,createPopper:()=>Me,createPopperBase:()=>Fe,createPopperLite:()=>Le,detectOverflow:()=>be,end:()=>d,eventListeners:()=>oe,flip:()=>ye,hide:()=>Ce,left:()=>a,main:()=>x,modifierPhases:()=>S,offset:()=>Te,placements:()=>v,popper:()=>f,popperGenerator:()=>De,popperOffsets:()=>ke,preventOverflow:()=>Ee,read:()=>b,reference:()=>m,right:()=>s,start:()=>u,top:()=>r,variationPlacements:()=>g,viewport:()=>p,write:()=>k});var r="top",o="bottom",s="right",a="left",l="auto",c=[r,o,s,a],u="start",d="end",h="clippingParents",p="viewport",f="popper",m="reference",g=c.reduce((function(e,t){return e.concat([t+"-"+u,t+"-"+d])}),[]),v=[].concat(c,[l]).reduce((function(e,t){return e.concat([t,t+"-"+u,t+"-"+d])}),[]),_="beforeRead",b="read",y="afterRead",w="beforeMain",x="main",C="afterMain",T="beforeWrite",k="write",E="afterWrite",S=[_,b,y,w,x,C,T,k,E];function A(e){return e?(e.nodeName||"").toLowerCase():null}function P(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function I(e){return e instanceof P(e).Element||e instanceof Element}function D(e){return e instanceof P(e).HTMLElement||e instanceof HTMLElement}function F(e){return"undefined"!=typeof ShadowRoot&&(e instanceof P(e).ShadowRoot||e instanceof ShadowRoot)}const M={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var i=t.styles[e]||{},n=t.attributes[e]||{},r=t.elements[e];D(r)&&A(r)&&(Object.assign(r.style,i),Object.keys(n).forEach((function(e){var t=n[e];!1===t?r.removeAttribute(e):r.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,i={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,i.popper),t.styles=i,t.elements.arrow&&Object.assign(t.elements.arrow.style,i.arrow),function(){Object.keys(t.elements).forEach((function(e){var n=t.elements[e],r=t.attributes[e]||{},o=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:i[e]).reduce((function(e,t){return e[t]="",e}),{});D(n)&&A(n)&&(Object.assign(n.style,o),Object.keys(r).forEach((function(e){n.removeAttribute(e)})))}))}},requires:["computeStyles"]};function L(e){return e.split("-")[0]}var j=Math.max,O=Math.min,$=Math.round;function z(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map((function(e){return e.brand+"/"+e.version})).join(" "):navigator.userAgent}function N(){return!/^((?!chrome|android).)*safari/i.test(z())}function R(e,t,i){void 0===t&&(t=!1),void 0===i&&(i=!1);var n=e.getBoundingClientRect(),r=1,o=1;t&&D(e)&&(r=e.offsetWidth>0&&$(n.width)/e.offsetWidth||1,o=e.offsetHeight>0&&$(n.height)/e.offsetHeight||1);var s=(I(e)?P(e):window).visualViewport,a=!N()&&i,l=(n.left+(a&&s?s.offsetLeft:0))/r,c=(n.top+(a&&s?s.offsetTop:0))/o,u=n.width/r,d=n.height/o;return{width:u,height:d,top:c,right:l+u,bottom:c+d,left:l,x:l,y:c}}function B(e){var t=R(e),i=e.offsetWidth,n=e.offsetHeight;return Math.abs(t.width-i)<=1&&(i=t.width),Math.abs(t.height-n)<=1&&(n=t.height),{x:e.offsetLeft,y:e.offsetTop,width:i,height:n}}function U(e,t){var i=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(i&&F(i)){var n=t;do{if(n&&e.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function H(e){return P(e).getComputedStyle(e)}function q(e){return["table","td","th"].indexOf(A(e))>=0}function W(e){return((I(e)?e.ownerDocument:e.document)||window.document).documentElement}function V(e){return"html"===A(e)?e:e.assignedSlot||e.parentNode||(F(e)?e.host:null)||W(e)}function Z(e){return D(e)&&"fixed"!==H(e).position?e.offsetParent:null}function K(e){for(var t=P(e),i=Z(e);i&&q(i)&&"static"===H(i).position;)i=Z(i);return i&&("html"===A(i)||"body"===A(i)&&"static"===H(i).position)?t:i||function(e){var t=/firefox/i.test(z());if(/Trident/i.test(z())&&D(e)&&"fixed"===H(e).position)return null;var i=V(e);for(F(i)&&(i=i.host);D(i)&&["html","body"].indexOf(A(i))<0;){var n=H(i);if("none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||-1!==["transform","perspective"].indexOf(n.willChange)||t&&"filter"===n.willChange||t&&n.filter&&"none"!==n.filter)return i;i=i.parentNode}return null}(e)||t}function X(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Y(e,t,i){return j(e,O(t,i))}function Q(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function G(e,t){return t.reduce((function(t,i){return t[i]=e,t}),{})}const J={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,i=e.state,n=e.name,l=e.options,u=i.elements.arrow,d=i.modifiersData.popperOffsets,h=L(i.placement),p=X(h),f=[a,s].indexOf(h)>=0?"height":"width";if(u&&d){var m=function(e,t){return Q("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:G(e,c))}(l.padding,i),g=B(u),v="y"===p?r:a,_="y"===p?o:s,b=i.rects.reference[f]+i.rects.reference[p]-d[p]-i.rects.popper[f],y=d[p]-i.rects.reference[p],w=K(u),x=w?"y"===p?w.clientHeight||0:w.clientWidth||0:0,C=b/2-y/2,T=m[v],k=x-g[f]-m[_],E=x/2-g[f]/2+C,S=Y(T,E,k),A=p;i.modifiersData[n]=((t={})[A]=S,t.centerOffset=S-E,t)}},effect:function(e){var t=e.state,i=e.options.element,n=void 0===i?"[data-popper-arrow]":i;null!=n&&("string"!=typeof n||(n=t.elements.popper.querySelector(n)))&&U(t.elements.popper,n)&&(t.elements.arrow=n)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function ee(e){return e.split("-")[1]}var te={top:"auto",right:"auto",bottom:"auto",left:"auto"};function ie(e){var t,i=e.popper,n=e.popperRect,l=e.placement,c=e.variation,u=e.offsets,h=e.position,p=e.gpuAcceleration,f=e.adaptive,m=e.roundOffsets,g=e.isFixed,v=u.x,_=void 0===v?0:v,b=u.y,y=void 0===b?0:b,w="function"==typeof m?m({x:_,y}):{x:_,y};_=w.x,y=w.y;var x=u.hasOwnProperty("x"),C=u.hasOwnProperty("y"),T=a,k=r,E=window;if(f){var S=K(i),A="clientHeight",I="clientWidth";if(S===P(i)&&"static"!==H(S=W(i)).position&&"absolute"===h&&(A="scrollHeight",I="scrollWidth"),l===r||(l===a||l===s)&&c===d)k=o,y-=(g&&S===E&&E.visualViewport?E.visualViewport.height:S[A])-n.height,y*=p?1:-1;if(l===a||(l===r||l===o)&&c===d)T=s,_-=(g&&S===E&&E.visualViewport?E.visualViewport.width:S[I])-n.width,_*=p?1:-1}var D,F=Object.assign({position:h},f&&te),M=!0===m?function(e,t){var i=e.x,n=e.y,r=t.devicePixelRatio||1;return{x:$(i*r)/r||0,y:$(n*r)/r||0}}({x:_,y},P(i)):{x:_,y};return _=M.x,y=M.y,p?Object.assign({},F,((D={})[k]=C?"0":"",D[T]=x?"0":"",D.transform=(E.devicePixelRatio||1)<=1?"translate("+_+"px, "+y+"px)":"translate3d("+_+"px, "+y+"px, 0)",D)):Object.assign({},F,((t={})[k]=C?y+"px":"",t[T]=x?_+"px":"",t.transform="",t))}const ne={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,i=e.options,n=i.gpuAcceleration,r=void 0===n||n,o=i.adaptive,s=void 0===o||o,a=i.roundOffsets,l=void 0===a||a,c={placement:L(t.placement),variation:ee(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:r,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,ie(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:s,roundOffsets:l})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,ie(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}};var re={passive:!0};const oe={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,i=e.instance,n=e.options,r=n.scroll,o=void 0===r||r,s=n.resize,a=void 0===s||s,l=P(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&c.forEach((function(e){e.addEventListener("scroll",i.update,re)})),a&&l.addEventListener("resize",i.update,re),function(){o&&c.forEach((function(e){e.removeEventListener("scroll",i.update,re)})),a&&l.removeEventListener("resize",i.update,re)}},data:{}};var se={left:"right",right:"left",bottom:"top",top:"bottom"};function ae(e){return e.replace(/left|right|bottom|top/g,(function(e){return se[e]}))}var le={start:"end",end:"start"};function ce(e){return e.replace(/start|end/g,(function(e){return le[e]}))}function ue(e){var t=P(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function de(e){return R(W(e)).left+ue(e).scrollLeft}function he(e){var t=H(e),i=t.overflow,n=t.overflowX,r=t.overflowY;return/auto|scroll|overlay|hidden/.test(i+r+n)}function pe(e){return["html","body","#document"].indexOf(A(e))>=0?e.ownerDocument.body:D(e)&&he(e)?e:pe(V(e))}function fe(e,t){var i;void 0===t&&(t=[]);var n=pe(e),r=n===(null==(i=e.ownerDocument)?void 0:i.body),o=P(n),s=r?[o].concat(o.visualViewport||[],he(n)?n:[]):n,a=t.concat(s);return r?a:a.concat(fe(V(s)))}function me(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function ge(e,t,i){return t===p?me(function(e,t){var i=P(e),n=W(e),r=i.visualViewport,o=n.clientWidth,s=n.clientHeight,a=0,l=0;if(r){o=r.width,s=r.height;var c=N();(c||!c&&"fixed"===t)&&(a=r.offsetLeft,l=r.offsetTop)}return{width:o,height:s,x:a+de(e),y:l}}(e,i)):I(t)?function(e,t){var i=R(e,!1,"fixed"===t);return i.top=i.top+e.clientTop,i.left=i.left+e.clientLeft,i.bottom=i.top+e.clientHeight,i.right=i.left+e.clientWidth,i.width=e.clientWidth,i.height=e.clientHeight,i.x=i.left,i.y=i.top,i}(t,i):me(function(e){var t,i=W(e),n=ue(e),r=null==(t=e.ownerDocument)?void 0:t.body,o=j(i.scrollWidth,i.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),s=j(i.scrollHeight,i.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),a=-n.scrollLeft+de(e),l=-n.scrollTop;return"rtl"===H(r||i).direction&&(a+=j(i.clientWidth,r?r.clientWidth:0)-o),{width:o,height:s,x:a,y:l}}(W(e)))}function ve(e,t,i,n){var r="clippingParents"===t?function(e){var t=fe(V(e)),i=["absolute","fixed"].indexOf(H(e).position)>=0&&D(e)?K(e):e;return I(i)?t.filter((function(e){return I(e)&&U(e,i)&&"body"!==A(e)})):[]}(e):[].concat(t),o=[].concat(r,[i]),s=o[0],a=o.reduce((function(t,i){var r=ge(e,i,n);return t.top=j(r.top,t.top),t.right=O(r.right,t.right),t.bottom=O(r.bottom,t.bottom),t.left=j(r.left,t.left),t}),ge(e,s,n));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function _e(e){var t,i=e.reference,n=e.element,l=e.placement,c=l?L(l):null,h=l?ee(l):null,p=i.x+i.width/2-n.width/2,f=i.y+i.height/2-n.height/2;switch(c){case r:t={x:p,y:i.y-n.height};break;case o:t={x:p,y:i.y+i.height};break;case s:t={x:i.x+i.width,y:f};break;case a:t={x:i.x-n.width,y:f};break;default:t={x:i.x,y:i.y}}var m=c?X(c):null;if(null!=m){var g="y"===m?"height":"width";switch(h){case u:t[m]=t[m]-(i[g]/2-n[g]/2);break;case d:t[m]=t[m]+(i[g]/2-n[g]/2)}}return t}function be(e,t){void 0===t&&(t={});var i=t,n=i.placement,a=void 0===n?e.placement:n,l=i.strategy,u=void 0===l?e.strategy:l,d=i.boundary,g=void 0===d?h:d,v=i.rootBoundary,_=void 0===v?p:v,b=i.elementContext,y=void 0===b?f:b,w=i.altBoundary,x=void 0!==w&&w,C=i.padding,T=void 0===C?0:C,k=Q("number"!=typeof T?T:G(T,c)),E=y===f?m:f,S=e.rects.popper,A=e.elements[x?E:y],P=ve(I(A)?A:A.contextElement||W(e.elements.popper),g,_,u),D=R(e.elements.reference),F=_e({reference:D,element:S,strategy:"absolute",placement:a}),M=me(Object.assign({},S,F)),L=y===f?M:D,j={top:P.top-L.top+k.top,bottom:L.bottom-P.bottom+k.bottom,left:P.left-L.left+k.left,right:L.right-P.right+k.right},O=e.modifiersData.offset;if(y===f&&O){var $=O[a];Object.keys(j).forEach((function(e){var t=[s,o].indexOf(e)>=0?1:-1,i=[r,o].indexOf(e)>=0?"y":"x";j[e]+=$[i]*t}))}return j}const ye={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,i=e.options,n=e.name;if(!t.modifiersData[n]._skip){for(var d=i.mainAxis,h=void 0===d||d,p=i.altAxis,f=void 0===p||p,m=i.fallbackPlacements,_=i.padding,b=i.boundary,y=i.rootBoundary,w=i.altBoundary,x=i.flipVariations,C=void 0===x||x,T=i.allowedAutoPlacements,k=t.options.placement,E=L(k),S=m||(E===k||!C?[ae(k)]:function(e){if(L(e)===l)return[];var t=ae(e);return[ce(e),t,ce(t)]}(k)),A=[k].concat(S).reduce((function(e,i){return e.concat(L(i)===l?function(e,t){void 0===t&&(t={});var i=t,n=i.placement,r=i.boundary,o=i.rootBoundary,s=i.padding,a=i.flipVariations,l=i.allowedAutoPlacements,u=void 0===l?v:l,d=ee(n),h=d?a?g:g.filter((function(e){return ee(e)===d})):c,p=h.filter((function(e){return u.indexOf(e)>=0}));0===p.length&&(p=h);var f=p.reduce((function(t,i){return t[i]=be(e,{placement:i,boundary:r,rootBoundary:o,padding:s})[L(i)],t}),{});return Object.keys(f).sort((function(e,t){return f[e]-f[t]}))}(t,{placement:i,boundary:b,rootBoundary:y,padding:_,flipVariations:C,allowedAutoPlacements:T}):i)}),[]),P=t.rects.reference,I=t.rects.popper,D=new Map,F=!0,M=A[0],j=0;j=0,R=N?"width":"height",B=be(t,{placement:O,boundary:b,rootBoundary:y,altBoundary:w,padding:_}),U=N?z?s:a:z?o:r;P[R]>I[R]&&(U=ae(U));var H=ae(U),q=[];if(h&&q.push(B[$]<=0),f&&q.push(B[U]<=0,B[H]<=0),q.every((function(e){return e}))){M=O,F=!1;break}D.set(O,q)}if(F)for(var W=function(e){var t=A.find((function(t){var i=D.get(t);if(i)return i.slice(0,e).every((function(e){return e}))}));if(t)return M=t,"break"},V=C?3:1;V>0;V--){if("break"===W(V))break}t.placement!==M&&(t.modifiersData[n]._skip=!0,t.placement=M,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function we(e,t,i){return void 0===i&&(i={x:0,y:0}),{top:e.top-t.height-i.y,right:e.right-t.width+i.x,bottom:e.bottom-t.height+i.y,left:e.left-t.width-i.x}}function xe(e){return[r,s,o,a].some((function(t){return e[t]>=0}))}const Ce={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,i=e.name,n=t.rects.reference,r=t.rects.popper,o=t.modifiersData.preventOverflow,s=be(t,{elementContext:"reference"}),a=be(t,{altBoundary:!0}),l=we(s,n),c=we(a,r,o),u=xe(l),d=xe(c);t.modifiersData[i]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}};const Te={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,i=e.options,n=e.name,o=i.offset,l=void 0===o?[0,0]:o,c=v.reduce((function(e,i){return e[i]=function(e,t,i){var n=L(e),o=[a,r].indexOf(n)>=0?-1:1,l="function"==typeof i?i(Object.assign({},t,{placement:e})):i,c=l[0],u=l[1];return c=c||0,u=(u||0)*o,[a,s].indexOf(n)>=0?{x:u,y:c}:{x:c,y:u}}(i,t.rects,l),e}),{}),u=c[t.placement],d=u.x,h=u.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=d,t.modifiersData.popperOffsets.y+=h),t.modifiersData[n]=c}};const ke={name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,i=e.name;t.modifiersData[i]=_e({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}};const Ee={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,i=e.options,n=e.name,l=i.mainAxis,c=void 0===l||l,d=i.altAxis,h=void 0!==d&&d,p=i.boundary,f=i.rootBoundary,m=i.altBoundary,g=i.padding,v=i.tether,_=void 0===v||v,b=i.tetherOffset,y=void 0===b?0:b,w=be(t,{boundary:p,rootBoundary:f,padding:g,altBoundary:m}),x=L(t.placement),C=ee(t.placement),T=!C,k=X(x),E="x"===k?"y":"x",S=t.modifiersData.popperOffsets,A=t.rects.reference,P=t.rects.popper,I="function"==typeof y?y(Object.assign({},t.rects,{placement:t.placement})):y,D="number"==typeof I?{mainAxis:I,altAxis:I}:Object.assign({mainAxis:0,altAxis:0},I),F=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,M={x:0,y:0};if(S){if(c){var $,z="y"===k?r:a,N="y"===k?o:s,R="y"===k?"height":"width",U=S[k],H=U+w[z],q=U-w[N],W=_?-P[R]/2:0,V=C===u?A[R]:P[R],Z=C===u?-P[R]:-A[R],Q=t.elements.arrow,G=_&&Q?B(Q):{width:0,height:0},J=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},te=J[z],ie=J[N],ne=Y(0,A[R],G[R]),re=T?A[R]/2-W-ne-te-D.mainAxis:V-ne-te-D.mainAxis,oe=T?-A[R]/2+W+ne+ie+D.mainAxis:Z+ne+ie+D.mainAxis,se=t.elements.arrow&&K(t.elements.arrow),ae=se?"y"===k?se.clientTop||0:se.clientLeft||0:0,le=null!=($=null==F?void 0:F[k])?$:0,ce=U+oe-le,ue=Y(_?O(H,U+re-le-ae):H,U,_?j(q,ce):q);S[k]=ue,M[k]=ue-U}if(h){var de,he="x"===k?r:a,pe="x"===k?o:s,fe=S[E],me="y"===E?"height":"width",ge=fe+w[he],ve=fe-w[pe],_e=-1!==[r,a].indexOf(x),ye=null!=(de=null==F?void 0:F[E])?de:0,we=_e?ge:fe-A[me]-P[me]-ye+D.altAxis,xe=_e?fe+A[me]+P[me]-ye-D.altAxis:ve,Ce=_&&_e?function(e,t,i){var n=Y(e,t,i);return n>i?i:n}(we,fe,xe):Y(_?we:ge,fe,_?xe:ve);S[E]=Ce,M[E]=Ce-fe}t.modifiersData[n]=M}},requiresIfExists:["offset"]};function Se(e,t,i){void 0===i&&(i=!1);var n,r,o=D(t),s=D(t)&&function(e){var t=e.getBoundingClientRect(),i=$(t.width)/e.offsetWidth||1,n=$(t.height)/e.offsetHeight||1;return 1!==i||1!==n}(t),a=W(t),l=R(e,s,i),c={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(o||!o&&!i)&&(("body"!==A(t)||he(a))&&(c=(n=t)!==P(n)&&D(n)?{scrollLeft:(r=n).scrollLeft,scrollTop:r.scrollTop}:ue(n)),D(t)?((u=R(t,!0)).x+=t.clientLeft,u.y+=t.clientTop):a&&(u.x=de(a))),{x:l.left+c.scrollLeft-u.x,y:l.top+c.scrollTop-u.y,width:l.width,height:l.height}}function Ae(e){var t=new Map,i=new Set,n=[];function r(e){i.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!i.has(e)){var n=t.get(e);n&&r(n)}})),n.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){i.has(e.name)||r(e)})),n}var Pe={placement:"bottom",modifiers:[],strategy:"absolute"};function Ie(){for(var e=arguments.length,t=new Array(e),i=0;iOe.has(e)&&Oe.get(e).get(t)||null,remove(e,t){if(!Oe.has(e))return;const i=Oe.get(e);i.delete(t),0===i.size&&Oe.delete(e)}},$e="transitionend",ze=e=>(e&&window.CSS&&window.CSS.escape&&(e=e.replace(/#([^\s"#']+)/g,((e,t)=>`#${CSS.escape(t)}`))),e),Ne=e=>{e.dispatchEvent(new Event($e))},Re=e=>!(!e||"object"!=typeof e)&&(void 0!==e.jquery&&(e=e[0]),void 0!==e.nodeType),Ue=e=>Re(e)?e.jquery?e[0]:e:"string"==typeof e&&e.length>0?document.querySelector(ze(e)):null,Be=e=>{if(!Re(e)||0===e.getClientRects().length)return!1;const t="visible"===getComputedStyle(e).getPropertyValue("visibility"),i=e.closest("details:not([open])");if(!i)return t;if(i!==e){const t=e.closest("summary");if(t&&t.parentNode!==i)return!1;if(null===t)return!1}return t},He=e=>!e||e.nodeType!==Node.ELEMENT_NODE||(!!e.classList.contains("disabled")||(void 0!==e.disabled?e.disabled:e.hasAttribute("disabled")&&"false"!==e.getAttribute("disabled"))),qe=e=>{if(!document.documentElement.attachShadow)return null;if("function"==typeof e.getRootNode){const t=e.getRootNode();return t instanceof ShadowRoot?t:null}return e instanceof ShadowRoot?e:e.parentNode?qe(e.parentNode):null},We=()=>{},Ve=e=>{e.offsetHeight},Ze=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,Ke=[],Xe=()=>"rtl"===document.documentElement.dir,Ye=e=>{var t;t=()=>{const t=Ze();if(t){const i=e.NAME,n=t.fn[i];t.fn[i]=e.jQueryInterface,t.fn[i].Constructor=e,t.fn[i].noConflict=()=>(t.fn[i]=n,e.jQueryInterface)}},"loading"===document.readyState?(Ke.length||document.addEventListener("DOMContentLoaded",(()=>{for(const e of Ke)e()})),Ke.push(t)):t()},Qe=(e,t=[],i=e)=>"function"==typeof e?e(...t):i,Ge=(e,t,i=!0)=>{if(!i)return void Qe(e);const n=(e=>{if(!e)return 0;let{transitionDuration:t,transitionDelay:i}=window.getComputedStyle(e);const n=Number.parseFloat(t),r=Number.parseFloat(i);return n||r?(t=t.split(",")[0],i=i.split(",")[0],1e3*(Number.parseFloat(t)+Number.parseFloat(i))):0})(t)+5;let r=!1;const o=({target:i})=>{i===t&&(r=!0,t.removeEventListener($e,o),Qe(e))};t.addEventListener($e,o),setTimeout((()=>{r||Ne(t)}),n)},Je=(e,t,i,n)=>{const r=e.length;let o=e.indexOf(t);return-1===o?!i&&n?e[r-1]:e[0]:(o+=i?1:-1,n&&(o=(o+r)%r),e[Math.max(0,Math.min(o,r-1))])},et=/[^.]*(?=\..*)\.|.*/,tt=/\..*/,it=/::\d+$/,nt={};let rt=1;const ot={mouseenter:"mouseover",mouseleave:"mouseout"},st=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function at(e,t){return t&&`${t}::${rt++}`||e.uidEvent||rt++}function lt(e){const t=at(e);return e.uidEvent=t,nt[t]=nt[t]||{},nt[t]}function ct(e,t,i=null){return Object.values(e).find((e=>e.callable===t&&e.delegationSelector===i))}function ut(e,t,i){const n="string"==typeof t,r=n?i:t||i;let o=ft(e);return st.has(o)||(o=e),[n,r,o]}function dt(e,t,i,n,r){if("string"!=typeof t||!e)return;let[o,s,a]=ut(t,i,n);if(t in ot){const e=e=>function(t){if(!t.relatedTarget||t.relatedTarget!==t.delegateTarget&&!t.delegateTarget.contains(t.relatedTarget))return e.call(this,t)};s=e(s)}const l=lt(e),c=l[a]||(l[a]={}),u=ct(c,s,o?i:null);if(u)return void(u.oneOff=u.oneOff&&r);const d=at(s,t.replace(et,"")),h=o?function(e,t,i){return function n(r){const o=e.querySelectorAll(t);for(let{target:s}=r;s&&s!==this;s=s.parentNode)for(const a of o)if(a===s)return gt(r,{delegateTarget:s}),n.oneOff&&mt.off(e,r.type,t,i),i.apply(s,[r])}}(e,i,s):function(e,t){return function i(n){return gt(n,{delegateTarget:e}),i.oneOff&&mt.off(e,n.type,t),t.apply(e,[n])}}(e,s);h.delegationSelector=o?i:null,h.callable=s,h.oneOff=r,h.uidEvent=d,c[d]=h,e.addEventListener(a,h,o)}function ht(e,t,i,n,r){const o=ct(t[i],n,r);o&&(e.removeEventListener(i,o,Boolean(r)),delete t[i][o.uidEvent])}function pt(e,t,i,n){const r=t[i]||{};for(const[o,s]of Object.entries(r))o.includes(n)&&ht(e,t,i,s.callable,s.delegationSelector)}function ft(e){return e=e.replace(tt,""),ot[e]||e}const mt={on(e,t,i,n){dt(e,t,i,n,!1)},one(e,t,i,n){dt(e,t,i,n,!0)},off(e,t,i,n){if("string"!=typeof t||!e)return;const[r,o,s]=ut(t,i,n),a=s!==t,l=lt(e),c=l[s]||{},u=t.startsWith(".");if(void 0===o){if(u)for(const i of Object.keys(l))pt(e,l,i,t.slice(1));for(const[i,n]of Object.entries(c)){const r=i.replace(it,"");a&&!t.includes(r)||ht(e,l,s,n.callable,n.delegationSelector)}}else{if(!Object.keys(c).length)return;ht(e,l,s,o,r?i:null)}},trigger(e,t,i){if("string"!=typeof t||!e)return null;const n=Ze();let r=null,o=!0,s=!0,a=!1;t!==ft(t)&&n&&(r=n.Event(t,i),n(e).trigger(r),o=!r.isPropagationStopped(),s=!r.isImmediatePropagationStopped(),a=r.isDefaultPrevented());const l=gt(new Event(t,{bubbles:o,cancelable:!0}),i);return a&&l.preventDefault(),s&&e.dispatchEvent(l),l.defaultPrevented&&r&&r.preventDefault(),l}};function gt(e,t={}){for(const[i,n]of Object.entries(t))try{e[i]=n}catch(t){Object.defineProperty(e,i,{configurable:!0,get:()=>n})}return e}function vt(e){if("true"===e)return!0;if("false"===e)return!1;if(e===Number(e).toString())return Number(e);if(""===e||"null"===e)return null;if("string"!=typeof e)return e;try{return JSON.parse(decodeURIComponent(e))}catch(t){return e}}function _t(e){return e.replace(/[A-Z]/g,(e=>`-${e.toLowerCase()}`))}const bt={setDataAttribute(e,t,i){e.setAttribute(`data-bs-${_t(t)}`,i)},removeDataAttribute(e,t){e.removeAttribute(`data-bs-${_t(t)}`)},getDataAttributes(e){if(!e)return{};const t={},i=Object.keys(e.dataset).filter((e=>e.startsWith("bs")&&!e.startsWith("bsConfig")));for(const n of i){let i=n.replace(/^bs/,"");i=i.charAt(0).toLowerCase()+i.slice(1,i.length),t[i]=vt(e.dataset[n])}return t},getDataAttribute:(e,t)=>vt(e.getAttribute(`data-bs-${_t(t)}`))};class yt{static get Default(){return{}}static get DefaultType(){return{}}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}_getConfig(e){return e=this._mergeConfigObj(e),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}_configAfterMerge(e){return e}_mergeConfigObj(e,t){const i=Re(t)?bt.getDataAttribute(t,"config"):{};return{...this.constructor.Default,..."object"==typeof i?i:{},...Re(t)?bt.getDataAttributes(t):{},..."object"==typeof e?e:{}}}_typeCheckConfig(e,t=this.constructor.DefaultType){for(const[n,r]of Object.entries(t)){const t=e[n],o=Re(t)?"element":null==(i=t)?`${i}`:Object.prototype.toString.call(i).match(/\s([a-z]+)/i)[1].toLowerCase();if(!new RegExp(r).test(o))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${n}" provided type "${o}" but expected type "${r}".`)}var i}}class wt extends yt{constructor(e,t){super(),(e=Ue(e))&&(this._element=e,this._config=this._getConfig(t),je.set(this._element,this.constructor.DATA_KEY,this))}dispose(){je.remove(this._element,this.constructor.DATA_KEY),mt.off(this._element,this.constructor.EVENT_KEY);for(const e of Object.getOwnPropertyNames(this))this[e]=null}_queueCallback(e,t,i=!0){Ge(e,t,i)}_getConfig(e){return e=this._mergeConfigObj(e,this._element),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}static getInstance(e){return je.get(Ue(e),this.DATA_KEY)}static getOrCreateInstance(e,t={}){return this.getInstance(e)||new this(e,"object"==typeof t?t:null)}static get VERSION(){return"5.3.3"}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(e){return`${e}${this.EVENT_KEY}`}}const xt=e=>{let t=e.getAttribute("data-bs-target");if(!t||"#"===t){let i=e.getAttribute("href");if(!i||!i.includes("#")&&!i.startsWith("."))return null;i.includes("#")&&!i.startsWith("#")&&(i=`#${i.split("#")[1]}`),t=i&&"#"!==i?i.trim():null}return t?t.split(",").map((e=>ze(e))).join(","):null},Ct={find:(e,t=document.documentElement)=>[].concat(...Element.prototype.querySelectorAll.call(t,e)),findOne:(e,t=document.documentElement)=>Element.prototype.querySelector.call(t,e),children:(e,t)=>[].concat(...e.children).filter((e=>e.matches(t))),parents(e,t){const i=[];let n=e.parentNode.closest(t);for(;n;)i.push(n),n=n.parentNode.closest(t);return i},prev(e,t){let i=e.previousElementSibling;for(;i;){if(i.matches(t))return[i];i=i.previousElementSibling}return[]},next(e,t){let i=e.nextElementSibling;for(;i;){if(i.matches(t))return[i];i=i.nextElementSibling}return[]},focusableChildren(e){const t=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map((e=>`${e}:not([tabindex^="-"])`)).join(",");return this.find(t,e).filter((e=>!He(e)&&Be(e)))},getSelectorFromElement(e){const t=xt(e);return t&&Ct.findOne(t)?t:null},getElementFromSelector(e){const t=xt(e);return t?Ct.findOne(t):null},getMultipleElementsFromSelector(e){const t=xt(e);return t?Ct.find(t):[]}},Tt=(e,t="hide")=>{const i=`click.dismiss${e.EVENT_KEY}`,n=e.NAME;mt.on(document,i,`[data-bs-dismiss="${n}"]`,(function(i){if(["A","AREA"].includes(this.tagName)&&i.preventDefault(),He(this))return;const r=Ct.getElementFromSelector(this)||this.closest(`.${n}`);e.getOrCreateInstance(r)[t]()}))},kt=".bs.alert",Et=`close${kt}`,St=`closed${kt}`;class At extends wt{static get NAME(){return"alert"}close(){if(mt.trigger(this._element,Et).defaultPrevented)return;this._element.classList.remove("show");const e=this._element.classList.contains("fade");this._queueCallback((()=>this._destroyElement()),this._element,e)}_destroyElement(){this._element.remove(),mt.trigger(this._element,St),this.dispose()}static jQueryInterface(e){return this.each((function(){const t=At.getOrCreateInstance(this);if("string"==typeof e){if(void 0===t[e]||e.startsWith("_")||"constructor"===e)throw new TypeError(`No method named "${e}"`);t[e](this)}}))}}Tt(At,"close"),Ye(At);const Pt='[data-bs-toggle="button"]';class It extends wt{static get NAME(){return"button"}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle("active"))}static jQueryInterface(e){return this.each((function(){const t=It.getOrCreateInstance(this);"toggle"===e&&t[e]()}))}}mt.on(document,"click.bs.button.data-api",Pt,(e=>{e.preventDefault();const t=e.target.closest(Pt);It.getOrCreateInstance(t).toggle()})),Ye(It);const Dt=".bs.swipe",Ft=`touchstart${Dt}`,Lt=`touchmove${Dt}`,Mt=`touchend${Dt}`,Ot=`pointerdown${Dt}`,jt=`pointerup${Dt}`,$t={endCallback:null,leftCallback:null,rightCallback:null},zt={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"};class Nt extends yt{constructor(e,t){super(),this._element=e,e&&Nt.isSupported()&&(this._config=this._getConfig(t),this._deltaX=0,this._supportPointerEvents=Boolean(window.PointerEvent),this._initEvents())}static get Default(){return $t}static get DefaultType(){return zt}static get NAME(){return"swipe"}dispose(){mt.off(this._element,Dt)}_start(e){this._supportPointerEvents?this._eventIsPointerPenTouch(e)&&(this._deltaX=e.clientX):this._deltaX=e.touches[0].clientX}_end(e){this._eventIsPointerPenTouch(e)&&(this._deltaX=e.clientX-this._deltaX),this._handleSwipe(),Qe(this._config.endCallback)}_move(e){this._deltaX=e.touches&&e.touches.length>1?0:e.touches[0].clientX-this._deltaX}_handleSwipe(){const e=Math.abs(this._deltaX);if(e<=40)return;const t=e/this._deltaX;this._deltaX=0,t&&Qe(t>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){this._supportPointerEvents?(mt.on(this._element,Ot,(e=>this._start(e))),mt.on(this._element,jt,(e=>this._end(e))),this._element.classList.add("pointer-event")):(mt.on(this._element,Ft,(e=>this._start(e))),mt.on(this._element,Lt,(e=>this._move(e))),mt.on(this._element,Mt,(e=>this._end(e))))}_eventIsPointerPenTouch(e){return this._supportPointerEvents&&("pen"===e.pointerType||"touch"===e.pointerType)}static isSupported(){return"ontouchstart"in document.documentElement||navigator.maxTouchPoints>0}}const Rt=".bs.carousel",Ut=".data-api",Bt="next",Ht="prev",qt="left",Wt="right",Vt=`slide${Rt}`,Zt=`slid${Rt}`,Kt=`keydown${Rt}`,Xt=`mouseenter${Rt}`,Yt=`mouseleave${Rt}`,Qt=`dragstart${Rt}`,Gt=`load${Rt}${Ut}`,Jt=`click${Rt}${Ut}`,ei="carousel",ti="active",ii=".active",ni=".carousel-item",ri=ii+ni,oi={ArrowLeft:Wt,ArrowRight:qt},si={interval:5e3,keyboard:!0,pause:"hover",ride:!1,touch:!0,wrap:!0},ai={interval:"(number|boolean)",keyboard:"boolean",pause:"(string|boolean)",ride:"(boolean|string)",touch:"boolean",wrap:"boolean"};class li extends wt{constructor(e,t){super(e,t),this._interval=null,this._activeElement=null,this._isSliding=!1,this.touchTimeout=null,this._swipeHelper=null,this._indicatorsElement=Ct.findOne(".carousel-indicators",this._element),this._addEventListeners(),this._config.ride===ei&&this.cycle()}static get Default(){return si}static get DefaultType(){return ai}static get NAME(){return"carousel"}next(){this._slide(Bt)}nextWhenVisible(){!document.hidden&&Be(this._element)&&this.next()}prev(){this._slide(Ht)}pause(){this._isSliding&&Ne(this._element),this._clearInterval()}cycle(){this._clearInterval(),this._updateInterval(),this._interval=setInterval((()=>this.nextWhenVisible()),this._config.interval)}_maybeEnableCycle(){this._config.ride&&(this._isSliding?mt.one(this._element,Zt,(()=>this.cycle())):this.cycle())}to(e){const t=this._getItems();if(e>t.length-1||e<0)return;if(this._isSliding)return void mt.one(this._element,Zt,(()=>this.to(e)));const i=this._getItemIndex(this._getActive());if(i===e)return;const n=e>i?Bt:Ht;this._slide(n,t[e])}dispose(){this._swipeHelper&&this._swipeHelper.dispose(),super.dispose()}_configAfterMerge(e){return e.defaultInterval=e.interval,e}_addEventListeners(){this._config.keyboard&&mt.on(this._element,Kt,(e=>this._keydown(e))),"hover"===this._config.pause&&(mt.on(this._element,Xt,(()=>this.pause())),mt.on(this._element,Yt,(()=>this._maybeEnableCycle()))),this._config.touch&&Nt.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(const e of Ct.find(".carousel-item img",this._element))mt.on(e,Qt,(e=>e.preventDefault()));const e={leftCallback:()=>this._slide(this._directionToOrder(qt)),rightCallback:()=>this._slide(this._directionToOrder(Wt)),endCallback:()=>{"hover"===this._config.pause&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout((()=>this._maybeEnableCycle()),500+this._config.interval))}};this._swipeHelper=new Nt(this._element,e)}_keydown(e){if(/input|textarea/i.test(e.target.tagName))return;const t=oi[e.key];t&&(e.preventDefault(),this._slide(this._directionToOrder(t)))}_getItemIndex(e){return this._getItems().indexOf(e)}_setActiveIndicatorElement(e){if(!this._indicatorsElement)return;const t=Ct.findOne(ii,this._indicatorsElement);t.classList.remove(ti),t.removeAttribute("aria-current");const i=Ct.findOne(`[data-bs-slide-to="${e}"]`,this._indicatorsElement);i&&(i.classList.add(ti),i.setAttribute("aria-current","true"))}_updateInterval(){const e=this._activeElement||this._getActive();if(!e)return;const t=Number.parseInt(e.getAttribute("data-bs-interval"),10);this._config.interval=t||this._config.defaultInterval}_slide(e,t=null){if(this._isSliding)return;const i=this._getActive(),n=e===Bt,r=t||Je(this._getItems(),i,n,this._config.wrap);if(r===i)return;const o=this._getItemIndex(r),s=t=>mt.trigger(this._element,t,{relatedTarget:r,direction:this._orderToDirection(e),from:this._getItemIndex(i),to:o});if(s(Vt).defaultPrevented)return;if(!i||!r)return;const a=Boolean(this._interval);this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(o),this._activeElement=r;const l=n?"carousel-item-start":"carousel-item-end",c=n?"carousel-item-next":"carousel-item-prev";r.classList.add(c),Ve(r),i.classList.add(l),r.classList.add(l);this._queueCallback((()=>{r.classList.remove(l,c),r.classList.add(ti),i.classList.remove(ti,c,l),this._isSliding=!1,s(Zt)}),i,this._isAnimated()),a&&this.cycle()}_isAnimated(){return this._element.classList.contains("slide")}_getActive(){return Ct.findOne(ri,this._element)}_getItems(){return Ct.find(ni,this._element)}_clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}_directionToOrder(e){return Xe()?e===qt?Ht:Bt:e===qt?Bt:Ht}_orderToDirection(e){return Xe()?e===Ht?qt:Wt:e===Ht?Wt:qt}static jQueryInterface(e){return this.each((function(){const t=li.getOrCreateInstance(this,e);if("number"!=typeof e){if("string"==typeof e){if(void 0===t[e]||e.startsWith("_")||"constructor"===e)throw new TypeError(`No method named "${e}"`);t[e]()}}else t.to(e)}))}}mt.on(document,Jt,"[data-bs-slide], [data-bs-slide-to]",(function(e){const t=Ct.getElementFromSelector(this);if(!t||!t.classList.contains(ei))return;e.preventDefault();const i=li.getOrCreateInstance(t),n=this.getAttribute("data-bs-slide-to");return n?(i.to(n),void i._maybeEnableCycle()):"next"===bt.getDataAttribute(this,"slide")?(i.next(),void i._maybeEnableCycle()):(i.prev(),void i._maybeEnableCycle())})),mt.on(window,Gt,(()=>{const e=Ct.find('[data-bs-ride="carousel"]');for(const t of e)li.getOrCreateInstance(t)})),Ye(li);const ci=".bs.collapse",ui=`show${ci}`,di=`shown${ci}`,hi=`hide${ci}`,pi=`hidden${ci}`,fi=`click${ci}.data-api`,mi="show",gi="collapse",vi="collapsing",_i=`:scope .${gi} .${gi}`,bi='[data-bs-toggle="collapse"]',yi={parent:null,toggle:!0},wi={parent:"(null|element)",toggle:"boolean"};class xi extends wt{constructor(e,t){super(e,t),this._isTransitioning=!1,this._triggerArray=[];const i=Ct.find(bi);for(const e of i){const t=Ct.getSelectorFromElement(e),i=Ct.find(t).filter((e=>e===this._element));null!==t&&i.length&&this._triggerArray.push(e)}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return yi}static get DefaultType(){return wi}static get NAME(){return"collapse"}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let e=[];if(this._config.parent&&(e=this._getFirstLevelChildren(".collapse.show, .collapse.collapsing").filter((e=>e!==this._element)).map((e=>xi.getOrCreateInstance(e,{toggle:!1})))),e.length&&e[0]._isTransitioning)return;if(mt.trigger(this._element,ui).defaultPrevented)return;for(const t of e)t.hide();const t=this._getDimension();this._element.classList.remove(gi),this._element.classList.add(vi),this._element.style[t]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const i=`scroll${t[0].toUpperCase()+t.slice(1)}`;this._queueCallback((()=>{this._isTransitioning=!1,this._element.classList.remove(vi),this._element.classList.add(gi,mi),this._element.style[t]="",mt.trigger(this._element,di)}),this._element,!0),this._element.style[t]=`${this._element[i]}px`}hide(){if(this._isTransitioning||!this._isShown())return;if(mt.trigger(this._element,hi).defaultPrevented)return;const e=this._getDimension();this._element.style[e]=`${this._element.getBoundingClientRect()[e]}px`,Ve(this._element),this._element.classList.add(vi),this._element.classList.remove(gi,mi);for(const e of this._triggerArray){const t=Ct.getElementFromSelector(e);t&&!this._isShown(t)&&this._addAriaAndCollapsedClass([e],!1)}this._isTransitioning=!0;this._element.style[e]="",this._queueCallback((()=>{this._isTransitioning=!1,this._element.classList.remove(vi),this._element.classList.add(gi),mt.trigger(this._element,pi)}),this._element,!0)}_isShown(e=this._element){return e.classList.contains(mi)}_configAfterMerge(e){return e.toggle=Boolean(e.toggle),e.parent=Ue(e.parent),e}_getDimension(){return this._element.classList.contains("collapse-horizontal")?"width":"height"}_initializeChildren(){if(!this._config.parent)return;const e=this._getFirstLevelChildren(bi);for(const t of e){const e=Ct.getElementFromSelector(t);e&&this._addAriaAndCollapsedClass([t],this._isShown(e))}}_getFirstLevelChildren(e){const t=Ct.find(_i,this._config.parent);return Ct.find(e,this._config.parent).filter((e=>!t.includes(e)))}_addAriaAndCollapsedClass(e,t){if(e.length)for(const i of e)i.classList.toggle("collapsed",!t),i.setAttribute("aria-expanded",t)}static jQueryInterface(e){const t={};return"string"==typeof e&&/show|hide/.test(e)&&(t.toggle=!1),this.each((function(){const i=xi.getOrCreateInstance(this,t);if("string"==typeof e){if(void 0===i[e])throw new TypeError(`No method named "${e}"`);i[e]()}}))}}mt.on(document,fi,bi,(function(e){("A"===e.target.tagName||e.delegateTarget&&"A"===e.delegateTarget.tagName)&&e.preventDefault();for(const e of Ct.getMultipleElementsFromSelector(this))xi.getOrCreateInstance(e,{toggle:!1}).toggle()})),Ye(xi);const Ci="dropdown",Ti=".bs.dropdown",ki=".data-api",Ei="ArrowUp",Si="ArrowDown",Ai=`hide${Ti}`,Pi=`hidden${Ti}`,Ii=`show${Ti}`,Di=`shown${Ti}`,Fi=`click${Ti}${ki}`,Li=`keydown${Ti}${ki}`,Mi=`keyup${Ti}${ki}`,Oi="show",ji='[data-bs-toggle="dropdown"]:not(.disabled):not(:disabled)',$i=`${ji}.${Oi}`,zi=".dropdown-menu",Ni=Xe()?"top-end":"top-start",Ri=Xe()?"top-start":"top-end",Ui=Xe()?"bottom-end":"bottom-start",Bi=Xe()?"bottom-start":"bottom-end",Hi=Xe()?"left-start":"right-start",qi=Xe()?"right-start":"left-start",Wi={autoClose:!0,boundary:"clippingParents",display:"dynamic",offset:[0,2],popperConfig:null,reference:"toggle"},Vi={autoClose:"(boolean|string)",boundary:"(string|element)",display:"string",offset:"(array|string|function)",popperConfig:"(null|object|function)",reference:"(string|element|object)"};class Zi extends wt{constructor(e,t){super(e,t),this._popper=null,this._parent=this._element.parentNode,this._menu=Ct.next(this._element,zi)[0]||Ct.prev(this._element,zi)[0]||Ct.findOne(zi,this._parent),this._inNavbar=this._detectNavbar()}static get Default(){return Wi}static get DefaultType(){return Vi}static get NAME(){return Ci}toggle(){return this._isShown()?this.hide():this.show()}show(){if(He(this._element)||this._isShown())return;const e={relatedTarget:this._element};if(!mt.trigger(this._element,Ii,e).defaultPrevented){if(this._createPopper(),"ontouchstart"in document.documentElement&&!this._parent.closest(".navbar-nav"))for(const e of[].concat(...document.body.children))mt.on(e,"mouseover",We);this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.add(Oi),this._element.classList.add(Oi),mt.trigger(this._element,Di,e)}}hide(){if(He(this._element)||!this._isShown())return;const e={relatedTarget:this._element};this._completeHide(e)}dispose(){this._popper&&this._popper.destroy(),super.dispose()}update(){this._inNavbar=this._detectNavbar(),this._popper&&this._popper.update()}_completeHide(e){if(!mt.trigger(this._element,Ai,e).defaultPrevented){if("ontouchstart"in document.documentElement)for(const e of[].concat(...document.body.children))mt.off(e,"mouseover",We);this._popper&&this._popper.destroy(),this._menu.classList.remove(Oi),this._element.classList.remove(Oi),this._element.setAttribute("aria-expanded","false"),bt.removeDataAttribute(this._menu,"popper"),mt.trigger(this._element,Pi,e)}}_getConfig(e){if("object"==typeof(e=super._getConfig(e)).reference&&!Re(e.reference)&&"function"!=typeof e.reference.getBoundingClientRect)throw new TypeError(`${Ci.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);return e}_createPopper(){if(void 0===n)throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org)");let e=this._element;"parent"===this._config.reference?e=this._parent:Re(this._config.reference)?e=Ue(this._config.reference):"object"==typeof this._config.reference&&(e=this._config.reference);const t=this._getPopperConfig();this._popper=Le(e,this._menu,t)}_isShown(){return this._menu.classList.contains(Oi)}_getPlacement(){const e=this._parent;if(e.classList.contains("dropend"))return Hi;if(e.classList.contains("dropstart"))return qi;if(e.classList.contains("dropup-center"))return"top";if(e.classList.contains("dropdown-center"))return"bottom";const t="end"===getComputedStyle(this._menu).getPropertyValue("--bs-position").trim();return e.classList.contains("dropup")?t?Ri:Ni:t?Bi:Ui}_detectNavbar(){return null!==this._element.closest(".navbar")}_getOffset(){const{offset:e}=this._config;return"string"==typeof e?e.split(",").map((e=>Number.parseInt(e,10))):"function"==typeof e?t=>e(t,this._element):e}_getPopperConfig(){const e={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return(this._inNavbar||"static"===this._config.display)&&(bt.setDataAttribute(this._menu,"popper","static"),e.modifiers=[{name:"applyStyles",enabled:!1}]),{...e,...Qe(this._config.popperConfig,[e])}}_selectMenuItem({key:e,target:t}){const i=Ct.find(".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",this._menu).filter((e=>Be(e)));i.length&&Je(i,t,e===Si,!i.includes(t)).focus()}static jQueryInterface(e){return this.each((function(){const t=Zi.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===t[e])throw new TypeError(`No method named "${e}"`);t[e]()}}))}static clearMenus(e){if(2===e.button||"keyup"===e.type&&"Tab"!==e.key)return;const t=Ct.find($i);for(const i of t){const t=Zi.getInstance(i);if(!t||!1===t._config.autoClose)continue;const n=e.composedPath(),r=n.includes(t._menu);if(n.includes(t._element)||"inside"===t._config.autoClose&&!r||"outside"===t._config.autoClose&&r)continue;if(t._menu.contains(e.target)&&("keyup"===e.type&&"Tab"===e.key||/input|select|option|textarea|form/i.test(e.target.tagName)))continue;const o={relatedTarget:t._element};"click"===e.type&&(o.clickEvent=e),t._completeHide(o)}}static dataApiKeydownHandler(e){const t=/input|textarea/i.test(e.target.tagName),i="Escape"===e.key,n=[Ei,Si].includes(e.key);if(!n&&!i)return;if(t&&!i)return;e.preventDefault();const r=this.matches(ji)?this:Ct.prev(this,ji)[0]||Ct.next(this,ji)[0]||Ct.findOne(ji,e.delegateTarget.parentNode),o=Zi.getOrCreateInstance(r);if(n)return e.stopPropagation(),o.show(),void o._selectMenuItem(e);o._isShown()&&(e.stopPropagation(),o.hide(),r.focus())}}mt.on(document,Li,ji,Zi.dataApiKeydownHandler),mt.on(document,Li,zi,Zi.dataApiKeydownHandler),mt.on(document,Fi,Zi.clearMenus),mt.on(document,Mi,Zi.clearMenus),mt.on(document,Fi,ji,(function(e){e.preventDefault(),Zi.getOrCreateInstance(this).toggle()})),Ye(Zi);const Ki="backdrop",Xi="show",Yi=`mousedown.bs.${Ki}`,Qi={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},Gi={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"};class Ji extends yt{constructor(e){super(),this._config=this._getConfig(e),this._isAppended=!1,this._element=null}static get Default(){return Qi}static get DefaultType(){return Gi}static get NAME(){return Ki}show(e){if(!this._config.isVisible)return void Qe(e);this._append();const t=this._getElement();this._config.isAnimated&&Ve(t),t.classList.add(Xi),this._emulateAnimation((()=>{Qe(e)}))}hide(e){this._config.isVisible?(this._getElement().classList.remove(Xi),this._emulateAnimation((()=>{this.dispose(),Qe(e)}))):Qe(e)}dispose(){this._isAppended&&(mt.off(this._element,Yi),this._element.remove(),this._isAppended=!1)}_getElement(){if(!this._element){const e=document.createElement("div");e.className=this._config.className,this._config.isAnimated&&e.classList.add("fade"),this._element=e}return this._element}_configAfterMerge(e){return e.rootElement=Ue(e.rootElement),e}_append(){if(this._isAppended)return;const e=this._getElement();this._config.rootElement.append(e),mt.on(e,Yi,(()=>{Qe(this._config.clickCallback)})),this._isAppended=!0}_emulateAnimation(e){Ge(e,this._getElement(),this._config.isAnimated)}}const en=".bs.focustrap",tn=`focusin${en}`,nn=`keydown.tab${en}`,rn="backward",on={autofocus:!0,trapElement:null},sn={autofocus:"boolean",trapElement:"element"};class an extends yt{constructor(e){super(),this._config=this._getConfig(e),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return on}static get DefaultType(){return sn}static get NAME(){return"focustrap"}activate(){this._isActive||(this._config.autofocus&&this._config.trapElement.focus(),mt.off(document,en),mt.on(document,tn,(e=>this._handleFocusin(e))),mt.on(document,nn,(e=>this._handleKeydown(e))),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,mt.off(document,en))}_handleFocusin(e){const{trapElement:t}=this._config;if(e.target===document||e.target===t||t.contains(e.target))return;const i=Ct.focusableChildren(t);0===i.length?t.focus():this._lastTabNavDirection===rn?i[i.length-1].focus():i[0].focus()}_handleKeydown(e){"Tab"===e.key&&(this._lastTabNavDirection=e.shiftKey?rn:"forward")}}const ln=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",cn=".sticky-top",un="padding-right",dn="margin-right";class hn{constructor(){this._element=document.body}getWidth(){const e=document.documentElement.clientWidth;return Math.abs(window.innerWidth-e)}hide(){const e=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,un,(t=>t+e)),this._setElementAttributes(ln,un,(t=>t+e)),this._setElementAttributes(cn,dn,(t=>t-e))}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,un),this._resetElementAttributes(ln,un),this._resetElementAttributes(cn,dn)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(e,t,i){const n=this.getWidth();this._applyManipulationCallback(e,(e=>{if(e!==this._element&&window.innerWidth>e.clientWidth+n)return;this._saveInitialAttribute(e,t);const r=window.getComputedStyle(e).getPropertyValue(t);e.style.setProperty(t,`${i(Number.parseFloat(r))}px`)}))}_saveInitialAttribute(e,t){const i=e.style.getPropertyValue(t);i&&bt.setDataAttribute(e,t,i)}_resetElementAttributes(e,t){this._applyManipulationCallback(e,(e=>{const i=bt.getDataAttribute(e,t);null!==i?(bt.removeDataAttribute(e,t),e.style.setProperty(t,i)):e.style.removeProperty(t)}))}_applyManipulationCallback(e,t){if(Re(e))t(e);else for(const i of Ct.find(e,this._element))t(i)}}const pn=".bs.modal",fn=`hide${pn}`,mn=`hidePrevented${pn}`,gn=`hidden${pn}`,vn=`show${pn}`,_n=`shown${pn}`,bn=`resize${pn}`,yn=`click.dismiss${pn}`,wn=`mousedown.dismiss${pn}`,xn=`keydown.dismiss${pn}`,Cn=`click${pn}.data-api`,Tn="modal-open",kn="show",En="modal-static",Sn={backdrop:!0,focus:!0,keyboard:!0},An={backdrop:"(boolean|string)",focus:"boolean",keyboard:"boolean"};class Pn extends wt{constructor(e,t){super(e,t),this._dialog=Ct.findOne(".modal-dialog",this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new hn,this._addEventListeners()}static get Default(){return Sn}static get DefaultType(){return An}static get NAME(){return"modal"}toggle(e){return this._isShown?this.hide():this.show(e)}show(e){if(this._isShown||this._isTransitioning)return;mt.trigger(this._element,vn,{relatedTarget:e}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add(Tn),this._adjustDialog(),this._backdrop.show((()=>this._showElement(e))))}hide(){if(!this._isShown||this._isTransitioning)return;mt.trigger(this._element,fn).defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._element.classList.remove(kn),this._queueCallback((()=>this._hideModal()),this._element,this._isAnimated()))}dispose(){mt.off(window,pn),mt.off(this._dialog,pn),this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new Ji({isVisible:Boolean(this._config.backdrop),isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new an({trapElement:this._element})}_showElement(e){document.body.contains(this._element)||document.body.append(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0;const t=Ct.findOne(".modal-body",this._dialog);t&&(t.scrollTop=0),Ve(this._element),this._element.classList.add(kn);this._queueCallback((()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,mt.trigger(this._element,_n,{relatedTarget:e})}),this._dialog,this._isAnimated())}_addEventListeners(){mt.on(this._element,xn,(e=>{"Escape"===e.key&&(this._config.keyboard?this.hide():this._triggerBackdropTransition())})),mt.on(window,bn,(()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()})),mt.on(this._element,wn,(e=>{mt.one(this._element,yn,(t=>{this._element===e.target&&this._element===t.target&&("static"!==this._config.backdrop?this._config.backdrop&&this.hide():this._triggerBackdropTransition())}))}))}_hideModal(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._backdrop.hide((()=>{document.body.classList.remove(Tn),this._resetAdjustments(),this._scrollBar.reset(),mt.trigger(this._element,gn)}))}_isAnimated(){return this._element.classList.contains("fade")}_triggerBackdropTransition(){if(mt.trigger(this._element,mn).defaultPrevented)return;const e=this._element.scrollHeight>document.documentElement.clientHeight,t=this._element.style.overflowY;"hidden"===t||this._element.classList.contains(En)||(e||(this._element.style.overflowY="hidden"),this._element.classList.add(En),this._queueCallback((()=>{this._element.classList.remove(En),this._queueCallback((()=>{this._element.style.overflowY=t}),this._dialog)}),this._dialog),this._element.focus())}_adjustDialog(){const e=this._element.scrollHeight>document.documentElement.clientHeight,t=this._scrollBar.getWidth(),i=t>0;if(i&&!e){const e=Xe()?"paddingLeft":"paddingRight";this._element.style[e]=`${t}px`}if(!i&&e){const e=Xe()?"paddingRight":"paddingLeft";this._element.style[e]=`${t}px`}}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(e,t){return this.each((function(){const i=Pn.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===i[e])throw new TypeError(`No method named "${e}"`);i[e](t)}}))}}mt.on(document,Cn,'[data-bs-toggle="modal"]',(function(e){const t=Ct.getElementFromSelector(this);["A","AREA"].includes(this.tagName)&&e.preventDefault(),mt.one(t,vn,(e=>{e.defaultPrevented||mt.one(t,gn,(()=>{Be(this)&&this.focus()}))}));const i=Ct.findOne(".modal.show");i&&Pn.getInstance(i).hide();Pn.getOrCreateInstance(t).toggle(this)})),Tt(Pn),Ye(Pn);const In=".bs.offcanvas",Dn=".data-api",Fn=`load${In}${Dn}`,Ln="show",Mn="showing",On="hiding",jn=".offcanvas.show",$n=`show${In}`,zn=`shown${In}`,Nn=`hide${In}`,Rn=`hidePrevented${In}`,Un=`hidden${In}`,Bn=`resize${In}`,Hn=`click${In}${Dn}`,qn=`keydown.dismiss${In}`,Wn={backdrop:!0,keyboard:!0,scroll:!1},Vn={backdrop:"(boolean|string)",keyboard:"boolean",scroll:"boolean"};class Zn extends wt{constructor(e,t){super(e,t),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get Default(){return Wn}static get DefaultType(){return Vn}static get NAME(){return"offcanvas"}toggle(e){return this._isShown?this.hide():this.show(e)}show(e){if(this._isShown)return;if(mt.trigger(this._element,$n,{relatedTarget:e}).defaultPrevented)return;this._isShown=!0,this._backdrop.show(),this._config.scroll||(new hn).hide(),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(Mn);this._queueCallback((()=>{this._config.scroll&&!this._config.backdrop||this._focustrap.activate(),this._element.classList.add(Ln),this._element.classList.remove(Mn),mt.trigger(this._element,zn,{relatedTarget:e})}),this._element,!0)}hide(){if(!this._isShown)return;if(mt.trigger(this._element,Nn).defaultPrevented)return;this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.add(On),this._backdrop.hide();this._queueCallback((()=>{this._element.classList.remove(Ln,On),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._config.scroll||(new hn).reset(),mt.trigger(this._element,Un)}),this._element,!0)}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_initializeBackDrop(){const e=Boolean(this._config.backdrop);return new Ji({className:"offcanvas-backdrop",isVisible:e,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:e?()=>{"static"!==this._config.backdrop?this.hide():mt.trigger(this._element,Rn)}:null})}_initializeFocusTrap(){return new an({trapElement:this._element})}_addEventListeners(){mt.on(this._element,qn,(e=>{"Escape"===e.key&&(this._config.keyboard?this.hide():mt.trigger(this._element,Rn))}))}static jQueryInterface(e){return this.each((function(){const t=Zn.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===t[e]||e.startsWith("_")||"constructor"===e)throw new TypeError(`No method named "${e}"`);t[e](this)}}))}}mt.on(document,Hn,'[data-bs-toggle="offcanvas"]',(function(e){const t=Ct.getElementFromSelector(this);if(["A","AREA"].includes(this.tagName)&&e.preventDefault(),He(this))return;mt.one(t,Un,(()=>{Be(this)&&this.focus()}));const i=Ct.findOne(jn);i&&i!==t&&Zn.getInstance(i).hide();Zn.getOrCreateInstance(t).toggle(this)})),mt.on(window,Fn,(()=>{for(const e of Ct.find(jn))Zn.getOrCreateInstance(e).show()})),mt.on(window,Bn,(()=>{for(const e of Ct.find("[aria-modal][class*=show][class*=offcanvas-]"))"fixed"!==getComputedStyle(e).position&&Zn.getOrCreateInstance(e).hide()})),Tt(Zn),Ye(Zn);const Kn={"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],dd:[],div:[],dl:[],dt:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},Xn=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),Yn=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i,Qn=(e,t)=>{const i=e.nodeName.toLowerCase();return t.includes(i)?!Xn.has(i)||Boolean(Yn.test(e.nodeValue)):t.filter((e=>e instanceof RegExp)).some((e=>e.test(i)))};const Gn={allowList:Kn,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:"
    "},Jn={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"},er={entry:"(string|element|function|null)",selector:"(string|element)"};class tr extends yt{constructor(e){super(),this._config=this._getConfig(e)}static get Default(){return Gn}static get DefaultType(){return Jn}static get NAME(){return"TemplateFactory"}getContent(){return Object.values(this._config.content).map((e=>this._resolvePossibleFunction(e))).filter(Boolean)}hasContent(){return this.getContent().length>0}changeContent(e){return this._checkContent(e),this._config.content={...this._config.content,...e},this}toHtml(){const e=document.createElement("div");e.innerHTML=this._maybeSanitize(this._config.template);for(const[t,i]of Object.entries(this._config.content))this._setContent(e,i,t);const t=e.children[0],i=this._resolvePossibleFunction(this._config.extraClass);return i&&t.classList.add(...i.split(" ")),t}_typeCheckConfig(e){super._typeCheckConfig(e),this._checkContent(e.content)}_checkContent(e){for(const[t,i]of Object.entries(e))super._typeCheckConfig({selector:t,entry:i},er)}_setContent(e,t,i){const n=Ct.findOne(i,e);n&&((t=this._resolvePossibleFunction(t))?Re(t)?this._putElementInTemplate(Ue(t),n):this._config.html?n.innerHTML=this._maybeSanitize(t):n.textContent=t:n.remove())}_maybeSanitize(e){return this._config.sanitize?function(e,t,i){if(!e.length)return e;if(i&&"function"==typeof i)return i(e);const n=(new window.DOMParser).parseFromString(e,"text/html"),r=[].concat(...n.body.querySelectorAll("*"));for(const e of r){const i=e.nodeName.toLowerCase();if(!Object.keys(t).includes(i)){e.remove();continue}const n=[].concat(...e.attributes),r=[].concat(t["*"]||[],t[i]||[]);for(const t of n)Qn(t,r)||e.removeAttribute(t.nodeName)}return n.body.innerHTML}(e,this._config.allowList,this._config.sanitizeFn):e}_resolvePossibleFunction(e){return Qe(e,[this])}_putElementInTemplate(e,t){if(this._config.html)return t.innerHTML="",void t.append(e);t.textContent=e.textContent}}const ir=new Set(["sanitize","allowList","sanitizeFn"]),nr="fade",rr="show",or=".modal",sr="hide.bs.modal",ar="hover",lr="focus",cr={AUTO:"auto",TOP:"top",RIGHT:Xe()?"left":"right",BOTTOM:"bottom",LEFT:Xe()?"right":"left"},ur={allowList:Kn,animation:!0,boundary:"clippingParents",container:!1,customClass:"",delay:0,fallbackPlacements:["top","right","bottom","left"],html:!1,offset:[0,6],placement:"top",popperConfig:null,sanitize:!0,sanitizeFn:null,selector:!1,template:'',title:"",trigger:"hover focus"},dr={allowList:"object",animation:"boolean",boundary:"(string|element)",container:"(string|element|boolean)",customClass:"(string|function)",delay:"(number|object)",fallbackPlacements:"array",html:"boolean",offset:"(array|string|function)",placement:"(string|function)",popperConfig:"(null|object|function)",sanitize:"boolean",sanitizeFn:"(null|function)",selector:"(string|boolean)",template:"string",title:"(string|element|function)",trigger:"string"};class hr extends wt{constructor(e,t){if(void 0===n)throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");super(e,t),this._isEnabled=!0,this._timeout=0,this._isHovered=null,this._activeTrigger={},this._popper=null,this._templateFactory=null,this._newContent=null,this.tip=null,this._setListeners(),this._config.selector||this._fixTitle()}static get Default(){return ur}static get DefaultType(){return dr}static get NAME(){return"tooltip"}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(){this._isEnabled&&(this._activeTrigger.click=!this._activeTrigger.click,this._isShown()?this._leave():this._enter())}dispose(){clearTimeout(this._timeout),mt.off(this._element.closest(or),sr,this._hideModalHandler),this._element.getAttribute("data-bs-original-title")&&this._element.setAttribute("title",this._element.getAttribute("data-bs-original-title")),this._disposePopper(),super.dispose()}show(){if("none"===this._element.style.display)throw new Error("Please use show on visible elements");if(!this._isWithContent()||!this._isEnabled)return;const e=mt.trigger(this._element,this.constructor.eventName("show")),t=(qe(this._element)||this._element.ownerDocument.documentElement).contains(this._element);if(e.defaultPrevented||!t)return;this._disposePopper();const i=this._getTipElement();this._element.setAttribute("aria-describedby",i.getAttribute("id"));const{container:n}=this._config;if(this._element.ownerDocument.documentElement.contains(this.tip)||(n.append(i),mt.trigger(this._element,this.constructor.eventName("inserted"))),this._popper=this._createPopper(i),i.classList.add(rr),"ontouchstart"in document.documentElement)for(const e of[].concat(...document.body.children))mt.on(e,"mouseover",We);this._queueCallback((()=>{mt.trigger(this._element,this.constructor.eventName("shown")),!1===this._isHovered&&this._leave(),this._isHovered=!1}),this.tip,this._isAnimated())}hide(){if(!this._isShown())return;if(mt.trigger(this._element,this.constructor.eventName("hide")).defaultPrevented)return;if(this._getTipElement().classList.remove(rr),"ontouchstart"in document.documentElement)for(const e of[].concat(...document.body.children))mt.off(e,"mouseover",We);this._activeTrigger.click=!1,this._activeTrigger[lr]=!1,this._activeTrigger[ar]=!1,this._isHovered=null;this._queueCallback((()=>{this._isWithActiveTrigger()||(this._isHovered||this._disposePopper(),this._element.removeAttribute("aria-describedby"),mt.trigger(this._element,this.constructor.eventName("hidden")))}),this.tip,this._isAnimated())}update(){this._popper&&this._popper.update()}_isWithContent(){return Boolean(this._getTitle())}_getTipElement(){return this.tip||(this.tip=this._createTipElement(this._newContent||this._getContentForTemplate())),this.tip}_createTipElement(e){const t=this._getTemplateFactory(e).toHtml();if(!t)return null;t.classList.remove(nr,rr),t.classList.add(`bs-${this.constructor.NAME}-auto`);const i=(e=>{do{e+=Math.floor(1e6*Math.random())}while(document.getElementById(e));return e})(this.constructor.NAME).toString();return t.setAttribute("id",i),this._isAnimated()&&t.classList.add(nr),t}setContent(e){this._newContent=e,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(e){return this._templateFactory?this._templateFactory.changeContent(e):this._templateFactory=new tr({...this._config,content:e,extraClass:this._resolvePossibleFunction(this._config.customClass)}),this._templateFactory}_getContentForTemplate(){return{".tooltip-inner":this._getTitle()}}_getTitle(){return this._resolvePossibleFunction(this._config.title)||this._element.getAttribute("data-bs-original-title")}_initializeOnDelegatedTarget(e){return this.constructor.getOrCreateInstance(e.delegateTarget,this._getDelegateConfig())}_isAnimated(){return this._config.animation||this.tip&&this.tip.classList.contains(nr)}_isShown(){return this.tip&&this.tip.classList.contains(rr)}_createPopper(e){const t=Qe(this._config.placement,[this,e,this._element]),i=cr[t.toUpperCase()];return Le(this._element,e,this._getPopperConfig(i))}_getOffset(){const{offset:e}=this._config;return"string"==typeof e?e.split(",").map((e=>Number.parseInt(e,10))):"function"==typeof e?t=>e(t,this._element):e}_resolvePossibleFunction(e){return Qe(e,[this._element])}_getPopperConfig(e){const t={placement:e,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"preSetPlacement",enabled:!0,phase:"beforeMain",fn:e=>{this._getTipElement().setAttribute("data-popper-placement",e.state.placement)}}]};return{...t,...Qe(this._config.popperConfig,[t])}}_setListeners(){const e=this._config.trigger.split(" ");for(const t of e)if("click"===t)mt.on(this._element,this.constructor.eventName("click"),this._config.selector,(e=>{this._initializeOnDelegatedTarget(e).toggle()}));else if("manual"!==t){const e=t===ar?this.constructor.eventName("mouseenter"):this.constructor.eventName("focusin"),i=t===ar?this.constructor.eventName("mouseleave"):this.constructor.eventName("focusout");mt.on(this._element,e,this._config.selector,(e=>{const t=this._initializeOnDelegatedTarget(e);t._activeTrigger["focusin"===e.type?lr:ar]=!0,t._enter()})),mt.on(this._element,i,this._config.selector,(e=>{const t=this._initializeOnDelegatedTarget(e);t._activeTrigger["focusout"===e.type?lr:ar]=t._element.contains(e.relatedTarget),t._leave()}))}this._hideModalHandler=()=>{this._element&&this.hide()},mt.on(this._element.closest(or),sr,this._hideModalHandler)}_fixTitle(){const e=this._element.getAttribute("title");e&&(this._element.getAttribute("aria-label")||this._element.textContent.trim()||this._element.setAttribute("aria-label",e),this._element.setAttribute("data-bs-original-title",e),this._element.removeAttribute("title"))}_enter(){this._isShown()||this._isHovered?this._isHovered=!0:(this._isHovered=!0,this._setTimeout((()=>{this._isHovered&&this.show()}),this._config.delay.show))}_leave(){this._isWithActiveTrigger()||(this._isHovered=!1,this._setTimeout((()=>{this._isHovered||this.hide()}),this._config.delay.hide))}_setTimeout(e,t){clearTimeout(this._timeout),this._timeout=setTimeout(e,t)}_isWithActiveTrigger(){return Object.values(this._activeTrigger).includes(!0)}_getConfig(e){const t=bt.getDataAttributes(this._element);for(const e of Object.keys(t))ir.has(e)&&delete t[e];return e={...t,..."object"==typeof e&&e?e:{}},e=this._mergeConfigObj(e),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}_configAfterMerge(e){return e.container=!1===e.container?document.body:Ue(e.container),"number"==typeof e.delay&&(e.delay={show:e.delay,hide:e.delay}),"number"==typeof e.title&&(e.title=e.title.toString()),"number"==typeof e.content&&(e.content=e.content.toString()),e}_getDelegateConfig(){const e={};for(const[t,i]of Object.entries(this._config))this.constructor.Default[t]!==i&&(e[t]=i);return e.selector=!1,e.trigger="manual",e}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null),this.tip&&(this.tip.remove(),this.tip=null)}static jQueryInterface(e){return this.each((function(){const t=hr.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===t[e])throw new TypeError(`No method named "${e}"`);t[e]()}}))}}Ye(hr);const pr={...hr.Default,content:"",offset:[0,8],placement:"right",template:'',trigger:"click"},fr={...hr.DefaultType,content:"(null|string|element|function)"};class mr extends hr{static get Default(){return pr}static get DefaultType(){return fr}static get NAME(){return"popover"}_isWithContent(){return this._getTitle()||this._getContent()}_getContentForTemplate(){return{".popover-header":this._getTitle(),".popover-body":this._getContent()}}_getContent(){return this._resolvePossibleFunction(this._config.content)}static jQueryInterface(e){return this.each((function(){const t=mr.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===t[e])throw new TypeError(`No method named "${e}"`);t[e]()}}))}}Ye(mr);const gr=".bs.scrollspy",vr=`activate${gr}`,_r=`click${gr}`,br=`load${gr}.data-api`,yr="active",wr="[href]",xr=".nav-link",Cr=`${xr}, .nav-item > ${xr}, .list-group-item`,Tr={offset:null,rootMargin:"0px 0px -25%",smoothScroll:!1,target:null,threshold:[.1,.5,1]},kr={offset:"(number|null)",rootMargin:"string",smoothScroll:"boolean",target:"element",threshold:"array"};class Er extends wt{constructor(e,t){super(e,t),this._targetLinks=new Map,this._observableSections=new Map,this._rootElement="visible"===getComputedStyle(this._element).overflowY?null:this._element,this._activeTarget=null,this._observer=null,this._previousScrollData={visibleEntryTop:0,parentScrollTop:0},this.refresh()}static get Default(){return Tr}static get DefaultType(){return kr}static get NAME(){return"scrollspy"}refresh(){this._initializeTargetsAndObservables(),this._maybeEnableSmoothScroll(),this._observer?this._observer.disconnect():this._observer=this._getNewObserver();for(const e of this._observableSections.values())this._observer.observe(e)}dispose(){this._observer.disconnect(),super.dispose()}_configAfterMerge(e){return e.target=Ue(e.target)||document.body,e.rootMargin=e.offset?`${e.offset}px 0px -30%`:e.rootMargin,"string"==typeof e.threshold&&(e.threshold=e.threshold.split(",").map((e=>Number.parseFloat(e)))),e}_maybeEnableSmoothScroll(){this._config.smoothScroll&&(mt.off(this._config.target,_r),mt.on(this._config.target,_r,wr,(e=>{const t=this._observableSections.get(e.target.hash);if(t){e.preventDefault();const i=this._rootElement||window,n=t.offsetTop-this._element.offsetTop;if(i.scrollTo)return void i.scrollTo({top:n,behavior:"smooth"});i.scrollTop=n}})))}_getNewObserver(){const e={root:this._rootElement,threshold:this._config.threshold,rootMargin:this._config.rootMargin};return new IntersectionObserver((e=>this._observerCallback(e)),e)}_observerCallback(e){const t=e=>this._targetLinks.get(`#${e.target.id}`),i=e=>{this._previousScrollData.visibleEntryTop=e.target.offsetTop,this._process(t(e))},n=(this._rootElement||document.documentElement).scrollTop,r=n>=this._previousScrollData.parentScrollTop;this._previousScrollData.parentScrollTop=n;for(const o of e){if(!o.isIntersecting){this._activeTarget=null,this._clearActiveClass(t(o));continue}const e=o.target.offsetTop>=this._previousScrollData.visibleEntryTop;if(r&&e){if(i(o),!n)return}else r||e||i(o)}}_initializeTargetsAndObservables(){this._targetLinks=new Map,this._observableSections=new Map;const e=Ct.find(wr,this._config.target);for(const t of e){if(!t.hash||He(t))continue;const e=Ct.findOne(decodeURI(t.hash),this._element);Be(e)&&(this._targetLinks.set(decodeURI(t.hash),t),this._observableSections.set(t.hash,e))}}_process(e){this._activeTarget!==e&&(this._clearActiveClass(this._config.target),this._activeTarget=e,e.classList.add(yr),this._activateParents(e),mt.trigger(this._element,vr,{relatedTarget:e}))}_activateParents(e){if(e.classList.contains("dropdown-item"))Ct.findOne(".dropdown-toggle",e.closest(".dropdown")).classList.add(yr);else for(const t of Ct.parents(e,".nav, .list-group"))for(const e of Ct.prev(t,Cr))e.classList.add(yr)}_clearActiveClass(e){e.classList.remove(yr);const t=Ct.find(`${wr}.${yr}`,e);for(const e of t)e.classList.remove(yr)}static jQueryInterface(e){return this.each((function(){const t=Er.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===t[e]||e.startsWith("_")||"constructor"===e)throw new TypeError(`No method named "${e}"`);t[e]()}}))}}mt.on(window,br,(()=>{for(const e of Ct.find('[data-bs-spy="scroll"]'))Er.getOrCreateInstance(e)})),Ye(Er);const Sr=".bs.tab",Ar=`hide${Sr}`,Pr=`hidden${Sr}`,Ir=`show${Sr}`,Dr=`shown${Sr}`,Fr=`click${Sr}`,Lr=`keydown${Sr}`,Mr=`load${Sr}`,Or="ArrowLeft",jr="ArrowRight",$r="ArrowUp",zr="ArrowDown",Nr="Home",Rr="End",Ur="active",Br="fade",Hr="show",qr=".dropdown-toggle",Wr=`:not(${qr})`,Vr='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',Zr=`${`.nav-link${Wr}, .list-group-item${Wr}, [role="tab"]${Wr}`}, ${Vr}`,Kr=`.${Ur}[data-bs-toggle="tab"], .${Ur}[data-bs-toggle="pill"], .${Ur}[data-bs-toggle="list"]`;class Xr extends wt{constructor(e){super(e),this._parent=this._element.closest('.list-group, .nav, [role="tablist"]'),this._parent&&(this._setInitialAttributes(this._parent,this._getChildren()),mt.on(this._element,Lr,(e=>this._keydown(e))))}static get NAME(){return"tab"}show(){const e=this._element;if(this._elemIsActive(e))return;const t=this._getActiveElem(),i=t?mt.trigger(t,Ar,{relatedTarget:e}):null;mt.trigger(e,Ir,{relatedTarget:t}).defaultPrevented||i&&i.defaultPrevented||(this._deactivate(t,e),this._activate(e,t))}_activate(e,t){if(!e)return;e.classList.add(Ur),this._activate(Ct.getElementFromSelector(e));this._queueCallback((()=>{"tab"===e.getAttribute("role")?(e.removeAttribute("tabindex"),e.setAttribute("aria-selected",!0),this._toggleDropDown(e,!0),mt.trigger(e,Dr,{relatedTarget:t})):e.classList.add(Hr)}),e,e.classList.contains(Br))}_deactivate(e,t){if(!e)return;e.classList.remove(Ur),e.blur(),this._deactivate(Ct.getElementFromSelector(e));this._queueCallback((()=>{"tab"===e.getAttribute("role")?(e.setAttribute("aria-selected",!1),e.setAttribute("tabindex","-1"),this._toggleDropDown(e,!1),mt.trigger(e,Pr,{relatedTarget:t})):e.classList.remove(Hr)}),e,e.classList.contains(Br))}_keydown(e){if(![Or,jr,$r,zr,Nr,Rr].includes(e.key))return;e.stopPropagation(),e.preventDefault();const t=this._getChildren().filter((e=>!He(e)));let i;if([Nr,Rr].includes(e.key))i=t[e.key===Nr?0:t.length-1];else{const n=[jr,zr].includes(e.key);i=Je(t,e.target,n,!0)}i&&(i.focus({preventScroll:!0}),Xr.getOrCreateInstance(i).show())}_getChildren(){return Ct.find(Zr,this._parent)}_getActiveElem(){return this._getChildren().find((e=>this._elemIsActive(e)))||null}_setInitialAttributes(e,t){this._setAttributeIfNotExists(e,"role","tablist");for(const e of t)this._setInitialAttributesOnChild(e)}_setInitialAttributesOnChild(e){e=this._getInnerElement(e);const t=this._elemIsActive(e),i=this._getOuterElement(e);e.setAttribute("aria-selected",t),i!==e&&this._setAttributeIfNotExists(i,"role","presentation"),t||e.setAttribute("tabindex","-1"),this._setAttributeIfNotExists(e,"role","tab"),this._setInitialAttributesOnTargetPanel(e)}_setInitialAttributesOnTargetPanel(e){const t=Ct.getElementFromSelector(e);t&&(this._setAttributeIfNotExists(t,"role","tabpanel"),e.id&&this._setAttributeIfNotExists(t,"aria-labelledby",`${e.id}`))}_toggleDropDown(e,t){const i=this._getOuterElement(e);if(!i.classList.contains("dropdown"))return;const n=(e,n)=>{const r=Ct.findOne(e,i);r&&r.classList.toggle(n,t)};n(qr,Ur),n(".dropdown-menu",Hr),i.setAttribute("aria-expanded",t)}_setAttributeIfNotExists(e,t,i){e.hasAttribute(t)||e.setAttribute(t,i)}_elemIsActive(e){return e.classList.contains(Ur)}_getInnerElement(e){return e.matches(Zr)?e:Ct.findOne(Zr,e)}_getOuterElement(e){return e.closest(".nav-item, .list-group-item")||e}static jQueryInterface(e){return this.each((function(){const t=Xr.getOrCreateInstance(this);if("string"==typeof e){if(void 0===t[e]||e.startsWith("_")||"constructor"===e)throw new TypeError(`No method named "${e}"`);t[e]()}}))}}mt.on(document,Fr,Vr,(function(e){["A","AREA"].includes(this.tagName)&&e.preventDefault(),He(this)||Xr.getOrCreateInstance(this).show()})),mt.on(window,Mr,(()=>{for(const e of Ct.find(Kr))Xr.getOrCreateInstance(e)})),Ye(Xr);const Yr=".bs.toast",Qr=`mouseover${Yr}`,Gr=`mouseout${Yr}`,Jr=`focusin${Yr}`,eo=`focusout${Yr}`,to=`hide${Yr}`,io=`hidden${Yr}`,no=`show${Yr}`,ro=`shown${Yr}`,oo="hide",so="show",ao="showing",lo={animation:"boolean",autohide:"boolean",delay:"number"},co={animation:!0,autohide:!0,delay:5e3};class uo extends wt{constructor(e,t){super(e,t),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get Default(){return co}static get DefaultType(){return lo}static get NAME(){return"toast"}show(){if(mt.trigger(this._element,no).defaultPrevented)return;this._clearTimeout(),this._config.animation&&this._element.classList.add("fade");this._element.classList.remove(oo),Ve(this._element),this._element.classList.add(so,ao),this._queueCallback((()=>{this._element.classList.remove(ao),mt.trigger(this._element,ro),this._maybeScheduleHide()}),this._element,this._config.animation)}hide(){if(!this.isShown())return;if(mt.trigger(this._element,to).defaultPrevented)return;this._element.classList.add(ao),this._queueCallback((()=>{this._element.classList.add(oo),this._element.classList.remove(ao,so),mt.trigger(this._element,io)}),this._element,this._config.animation)}dispose(){this._clearTimeout(),this.isShown()&&this._element.classList.remove(so),super.dispose()}isShown(){return this._element.classList.contains(so)}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout((()=>{this.hide()}),this._config.delay)))}_onInteraction(e,t){switch(e.type){case"mouseover":case"mouseout":this._hasMouseInteraction=t;break;case"focusin":case"focusout":this._hasKeyboardInteraction=t}if(t)return void this._clearTimeout();const i=e.relatedTarget;this._element===i||this._element.contains(i)||this._maybeScheduleHide()}_setListeners(){mt.on(this._element,Qr,(e=>this._onInteraction(e,!0))),mt.on(this._element,Gr,(e=>this._onInteraction(e,!1))),mt.on(this._element,Jr,(e=>this._onInteraction(e,!0))),mt.on(this._element,eo,(e=>this._onInteraction(e,!1)))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(e){return this.each((function(){const t=uo.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===t[e])throw new TypeError(`No method named "${e}"`);t[e](this)}}))}}Tt(uo),Ye(uo)},518:(e,t,i)=>{var n,r,o; +const je=new Map,Oe={set(e,t,i){je.has(e)||je.set(e,new Map);const n=je.get(e);n.has(t)||0===n.size?n.set(t,i):console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(n.keys())[0]}.`)},get:(e,t)=>je.has(e)&&je.get(e).get(t)||null,remove(e,t){if(!je.has(e))return;const i=je.get(e);i.delete(t),0===i.size&&je.delete(e)}},$e="transitionend",ze=e=>(e&&window.CSS&&window.CSS.escape&&(e=e.replace(/#([^\s"#']+)/g,((e,t)=>`#${CSS.escape(t)}`))),e),Ne=e=>{e.dispatchEvent(new Event($e))},Re=e=>!(!e||"object"!=typeof e)&&(void 0!==e.jquery&&(e=e[0]),void 0!==e.nodeType),Be=e=>Re(e)?e.jquery?e[0]:e:"string"==typeof e&&e.length>0?document.querySelector(ze(e)):null,Ue=e=>{if(!Re(e)||0===e.getClientRects().length)return!1;const t="visible"===getComputedStyle(e).getPropertyValue("visibility"),i=e.closest("details:not([open])");if(!i)return t;if(i!==e){const t=e.closest("summary");if(t&&t.parentNode!==i)return!1;if(null===t)return!1}return t},He=e=>!e||e.nodeType!==Node.ELEMENT_NODE||(!!e.classList.contains("disabled")||(void 0!==e.disabled?e.disabled:e.hasAttribute("disabled")&&"false"!==e.getAttribute("disabled"))),qe=e=>{if(!document.documentElement.attachShadow)return null;if("function"==typeof e.getRootNode){const t=e.getRootNode();return t instanceof ShadowRoot?t:null}return e instanceof ShadowRoot?e:e.parentNode?qe(e.parentNode):null},We=()=>{},Ve=e=>{e.offsetHeight},Ze=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,Ke=[],Xe=()=>"rtl"===document.documentElement.dir,Ye=e=>{var t;t=()=>{const t=Ze();if(t){const i=e.NAME,n=t.fn[i];t.fn[i]=e.jQueryInterface,t.fn[i].Constructor=e,t.fn[i].noConflict=()=>(t.fn[i]=n,e.jQueryInterface)}},"loading"===document.readyState?(Ke.length||document.addEventListener("DOMContentLoaded",(()=>{for(const e of Ke)e()})),Ke.push(t)):t()},Qe=(e,t=[],i=e)=>"function"==typeof e?e(...t):i,Ge=(e,t,i=!0)=>{if(!i)return void Qe(e);const n=(e=>{if(!e)return 0;let{transitionDuration:t,transitionDelay:i}=window.getComputedStyle(e);const n=Number.parseFloat(t),r=Number.parseFloat(i);return n||r?(t=t.split(",")[0],i=i.split(",")[0],1e3*(Number.parseFloat(t)+Number.parseFloat(i))):0})(t)+5;let r=!1;const o=({target:i})=>{i===t&&(r=!0,t.removeEventListener($e,o),Qe(e))};t.addEventListener($e,o),setTimeout((()=>{r||Ne(t)}),n)},Je=(e,t,i,n)=>{const r=e.length;let o=e.indexOf(t);return-1===o?!i&&n?e[r-1]:e[0]:(o+=i?1:-1,n&&(o=(o+r)%r),e[Math.max(0,Math.min(o,r-1))])},et=/[^.]*(?=\..*)\.|.*/,tt=/\..*/,it=/::\d+$/,nt={};let rt=1;const ot={mouseenter:"mouseover",mouseleave:"mouseout"},st=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function at(e,t){return t&&`${t}::${rt++}`||e.uidEvent||rt++}function lt(e){const t=at(e);return e.uidEvent=t,nt[t]=nt[t]||{},nt[t]}function ct(e,t,i=null){return Object.values(e).find((e=>e.callable===t&&e.delegationSelector===i))}function ut(e,t,i){const n="string"==typeof t,r=n?i:t||i;let o=ft(e);return st.has(o)||(o=e),[n,r,o]}function dt(e,t,i,n,r){if("string"!=typeof t||!e)return;let[o,s,a]=ut(t,i,n);if(t in ot){const e=e=>function(t){if(!t.relatedTarget||t.relatedTarget!==t.delegateTarget&&!t.delegateTarget.contains(t.relatedTarget))return e.call(this,t)};s=e(s)}const l=lt(e),c=l[a]||(l[a]={}),u=ct(c,s,o?i:null);if(u)return void(u.oneOff=u.oneOff&&r);const d=at(s,t.replace(et,"")),h=o?function(e,t,i){return function n(r){const o=e.querySelectorAll(t);for(let{target:s}=r;s&&s!==this;s=s.parentNode)for(const a of o)if(a===s)return gt(r,{delegateTarget:s}),n.oneOff&&mt.off(e,r.type,t,i),i.apply(s,[r])}}(e,i,s):function(e,t){return function i(n){return gt(n,{delegateTarget:e}),i.oneOff&&mt.off(e,n.type,t),t.apply(e,[n])}}(e,s);h.delegationSelector=o?i:null,h.callable=s,h.oneOff=r,h.uidEvent=d,c[d]=h,e.addEventListener(a,h,o)}function ht(e,t,i,n,r){const o=ct(t[i],n,r);o&&(e.removeEventListener(i,o,Boolean(r)),delete t[i][o.uidEvent])}function pt(e,t,i,n){const r=t[i]||{};for(const[o,s]of Object.entries(r))o.includes(n)&&ht(e,t,i,s.callable,s.delegationSelector)}function ft(e){return e=e.replace(tt,""),ot[e]||e}const mt={on(e,t,i,n){dt(e,t,i,n,!1)},one(e,t,i,n){dt(e,t,i,n,!0)},off(e,t,i,n){if("string"!=typeof t||!e)return;const[r,o,s]=ut(t,i,n),a=s!==t,l=lt(e),c=l[s]||{},u=t.startsWith(".");if(void 0===o){if(u)for(const i of Object.keys(l))pt(e,l,i,t.slice(1));for(const[i,n]of Object.entries(c)){const r=i.replace(it,"");a&&!t.includes(r)||ht(e,l,s,n.callable,n.delegationSelector)}}else{if(!Object.keys(c).length)return;ht(e,l,s,o,r?i:null)}},trigger(e,t,i){if("string"!=typeof t||!e)return null;const n=Ze();let r=null,o=!0,s=!0,a=!1;t!==ft(t)&&n&&(r=n.Event(t,i),n(e).trigger(r),o=!r.isPropagationStopped(),s=!r.isImmediatePropagationStopped(),a=r.isDefaultPrevented());const l=gt(new Event(t,{bubbles:o,cancelable:!0}),i);return a&&l.preventDefault(),s&&e.dispatchEvent(l),l.defaultPrevented&&r&&r.preventDefault(),l}};function gt(e,t={}){for(const[i,n]of Object.entries(t))try{e[i]=n}catch(t){Object.defineProperty(e,i,{configurable:!0,get:()=>n})}return e}function vt(e){if("true"===e)return!0;if("false"===e)return!1;if(e===Number(e).toString())return Number(e);if(""===e||"null"===e)return null;if("string"!=typeof e)return e;try{return JSON.parse(decodeURIComponent(e))}catch(t){return e}}function _t(e){return e.replace(/[A-Z]/g,(e=>`-${e.toLowerCase()}`))}const bt={setDataAttribute(e,t,i){e.setAttribute(`data-bs-${_t(t)}`,i)},removeDataAttribute(e,t){e.removeAttribute(`data-bs-${_t(t)}`)},getDataAttributes(e){if(!e)return{};const t={},i=Object.keys(e.dataset).filter((e=>e.startsWith("bs")&&!e.startsWith("bsConfig")));for(const n of i){let i=n.replace(/^bs/,"");i=i.charAt(0).toLowerCase()+i.slice(1,i.length),t[i]=vt(e.dataset[n])}return t},getDataAttribute:(e,t)=>vt(e.getAttribute(`data-bs-${_t(t)}`))};class yt{static get Default(){return{}}static get DefaultType(){return{}}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}_getConfig(e){return e=this._mergeConfigObj(e),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}_configAfterMerge(e){return e}_mergeConfigObj(e,t){const i=Re(t)?bt.getDataAttribute(t,"config"):{};return{...this.constructor.Default,..."object"==typeof i?i:{},...Re(t)?bt.getDataAttributes(t):{},..."object"==typeof e?e:{}}}_typeCheckConfig(e,t=this.constructor.DefaultType){for(const[n,r]of Object.entries(t)){const t=e[n],o=Re(t)?"element":null==(i=t)?`${i}`:Object.prototype.toString.call(i).match(/\s([a-z]+)/i)[1].toLowerCase();if(!new RegExp(r).test(o))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${n}" provided type "${o}" but expected type "${r}".`)}var i}}class wt extends yt{constructor(e,t){super(),(e=Be(e))&&(this._element=e,this._config=this._getConfig(t),Oe.set(this._element,this.constructor.DATA_KEY,this))}dispose(){Oe.remove(this._element,this.constructor.DATA_KEY),mt.off(this._element,this.constructor.EVENT_KEY);for(const e of Object.getOwnPropertyNames(this))this[e]=null}_queueCallback(e,t,i=!0){Ge(e,t,i)}_getConfig(e){return e=this._mergeConfigObj(e,this._element),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}static getInstance(e){return Oe.get(Be(e),this.DATA_KEY)}static getOrCreateInstance(e,t={}){return this.getInstance(e)||new this(e,"object"==typeof t?t:null)}static get VERSION(){return"5.3.3"}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(e){return`${e}${this.EVENT_KEY}`}}const xt=e=>{let t=e.getAttribute("data-bs-target");if(!t||"#"===t){let i=e.getAttribute("href");if(!i||!i.includes("#")&&!i.startsWith("."))return null;i.includes("#")&&!i.startsWith("#")&&(i=`#${i.split("#")[1]}`),t=i&&"#"!==i?i.trim():null}return t?t.split(",").map((e=>ze(e))).join(","):null},Ct={find:(e,t=document.documentElement)=>[].concat(...Element.prototype.querySelectorAll.call(t,e)),findOne:(e,t=document.documentElement)=>Element.prototype.querySelector.call(t,e),children:(e,t)=>[].concat(...e.children).filter((e=>e.matches(t))),parents(e,t){const i=[];let n=e.parentNode.closest(t);for(;n;)i.push(n),n=n.parentNode.closest(t);return i},prev(e,t){let i=e.previousElementSibling;for(;i;){if(i.matches(t))return[i];i=i.previousElementSibling}return[]},next(e,t){let i=e.nextElementSibling;for(;i;){if(i.matches(t))return[i];i=i.nextElementSibling}return[]},focusableChildren(e){const t=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map((e=>`${e}:not([tabindex^="-"])`)).join(",");return this.find(t,e).filter((e=>!He(e)&&Ue(e)))},getSelectorFromElement(e){const t=xt(e);return t&&Ct.findOne(t)?t:null},getElementFromSelector(e){const t=xt(e);return t?Ct.findOne(t):null},getMultipleElementsFromSelector(e){const t=xt(e);return t?Ct.find(t):[]}},Tt=(e,t="hide")=>{const i=`click.dismiss${e.EVENT_KEY}`,n=e.NAME;mt.on(document,i,`[data-bs-dismiss="${n}"]`,(function(i){if(["A","AREA"].includes(this.tagName)&&i.preventDefault(),He(this))return;const r=Ct.getElementFromSelector(this)||this.closest(`.${n}`);e.getOrCreateInstance(r)[t]()}))},kt=".bs.alert",Et=`close${kt}`,St=`closed${kt}`;class At extends wt{static get NAME(){return"alert"}close(){if(mt.trigger(this._element,Et).defaultPrevented)return;this._element.classList.remove("show");const e=this._element.classList.contains("fade");this._queueCallback((()=>this._destroyElement()),this._element,e)}_destroyElement(){this._element.remove(),mt.trigger(this._element,St),this.dispose()}static jQueryInterface(e){return this.each((function(){const t=At.getOrCreateInstance(this);if("string"==typeof e){if(void 0===t[e]||e.startsWith("_")||"constructor"===e)throw new TypeError(`No method named "${e}"`);t[e](this)}}))}}Tt(At,"close"),Ye(At);const Pt='[data-bs-toggle="button"]';class It extends wt{static get NAME(){return"button"}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle("active"))}static jQueryInterface(e){return this.each((function(){const t=It.getOrCreateInstance(this);"toggle"===e&&t[e]()}))}}mt.on(document,"click.bs.button.data-api",Pt,(e=>{e.preventDefault();const t=e.target.closest(Pt);It.getOrCreateInstance(t).toggle()})),Ye(It);const Dt=".bs.swipe",Ft=`touchstart${Dt}`,Mt=`touchmove${Dt}`,Lt=`touchend${Dt}`,jt=`pointerdown${Dt}`,Ot=`pointerup${Dt}`,$t={endCallback:null,leftCallback:null,rightCallback:null},zt={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"};class Nt extends yt{constructor(e,t){super(),this._element=e,e&&Nt.isSupported()&&(this._config=this._getConfig(t),this._deltaX=0,this._supportPointerEvents=Boolean(window.PointerEvent),this._initEvents())}static get Default(){return $t}static get DefaultType(){return zt}static get NAME(){return"swipe"}dispose(){mt.off(this._element,Dt)}_start(e){this._supportPointerEvents?this._eventIsPointerPenTouch(e)&&(this._deltaX=e.clientX):this._deltaX=e.touches[0].clientX}_end(e){this._eventIsPointerPenTouch(e)&&(this._deltaX=e.clientX-this._deltaX),this._handleSwipe(),Qe(this._config.endCallback)}_move(e){this._deltaX=e.touches&&e.touches.length>1?0:e.touches[0].clientX-this._deltaX}_handleSwipe(){const e=Math.abs(this._deltaX);if(e<=40)return;const t=e/this._deltaX;this._deltaX=0,t&&Qe(t>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){this._supportPointerEvents?(mt.on(this._element,jt,(e=>this._start(e))),mt.on(this._element,Ot,(e=>this._end(e))),this._element.classList.add("pointer-event")):(mt.on(this._element,Ft,(e=>this._start(e))),mt.on(this._element,Mt,(e=>this._move(e))),mt.on(this._element,Lt,(e=>this._end(e))))}_eventIsPointerPenTouch(e){return this._supportPointerEvents&&("pen"===e.pointerType||"touch"===e.pointerType)}static isSupported(){return"ontouchstart"in document.documentElement||navigator.maxTouchPoints>0}}const Rt=".bs.carousel",Bt=".data-api",Ut="ArrowLeft",Ht="ArrowRight",qt="next",Wt="prev",Vt="left",Zt="right",Kt=`slide${Rt}`,Xt=`slid${Rt}`,Yt=`keydown${Rt}`,Qt=`mouseenter${Rt}`,Gt=`mouseleave${Rt}`,Jt=`dragstart${Rt}`,ei=`load${Rt}${Bt}`,ti=`click${Rt}${Bt}`,ii="carousel",ni="active",ri=".active",oi=".carousel-item",si=ri+oi,ai={[Ut]:Zt,[Ht]:Vt},li={interval:5e3,keyboard:!0,pause:"hover",ride:!1,touch:!0,wrap:!0},ci={interval:"(number|boolean)",keyboard:"boolean",pause:"(string|boolean)",ride:"(boolean|string)",touch:"boolean",wrap:"boolean"};class ui extends wt{constructor(e,t){super(e,t),this._interval=null,this._activeElement=null,this._isSliding=!1,this.touchTimeout=null,this._swipeHelper=null,this._indicatorsElement=Ct.findOne(".carousel-indicators",this._element),this._addEventListeners(),this._config.ride===ii&&this.cycle()}static get Default(){return li}static get DefaultType(){return ci}static get NAME(){return"carousel"}next(){this._slide(qt)}nextWhenVisible(){!document.hidden&&Ue(this._element)&&this.next()}prev(){this._slide(Wt)}pause(){this._isSliding&&Ne(this._element),this._clearInterval()}cycle(){this._clearInterval(),this._updateInterval(),this._interval=setInterval((()=>this.nextWhenVisible()),this._config.interval)}_maybeEnableCycle(){this._config.ride&&(this._isSliding?mt.one(this._element,Xt,(()=>this.cycle())):this.cycle())}to(e){const t=this._getItems();if(e>t.length-1||e<0)return;if(this._isSliding)return void mt.one(this._element,Xt,(()=>this.to(e)));const i=this._getItemIndex(this._getActive());if(i===e)return;const n=e>i?qt:Wt;this._slide(n,t[e])}dispose(){this._swipeHelper&&this._swipeHelper.dispose(),super.dispose()}_configAfterMerge(e){return e.defaultInterval=e.interval,e}_addEventListeners(){this._config.keyboard&&mt.on(this._element,Yt,(e=>this._keydown(e))),"hover"===this._config.pause&&(mt.on(this._element,Qt,(()=>this.pause())),mt.on(this._element,Gt,(()=>this._maybeEnableCycle()))),this._config.touch&&Nt.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(const e of Ct.find(".carousel-item img",this._element))mt.on(e,Jt,(e=>e.preventDefault()));const e={leftCallback:()=>this._slide(this._directionToOrder(Vt)),rightCallback:()=>this._slide(this._directionToOrder(Zt)),endCallback:()=>{"hover"===this._config.pause&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout((()=>this._maybeEnableCycle()),500+this._config.interval))}};this._swipeHelper=new Nt(this._element,e)}_keydown(e){if(/input|textarea/i.test(e.target.tagName))return;const t=ai[e.key];t&&(e.preventDefault(),this._slide(this._directionToOrder(t)))}_getItemIndex(e){return this._getItems().indexOf(e)}_setActiveIndicatorElement(e){if(!this._indicatorsElement)return;const t=Ct.findOne(ri,this._indicatorsElement);t.classList.remove(ni),t.removeAttribute("aria-current");const i=Ct.findOne(`[data-bs-slide-to="${e}"]`,this._indicatorsElement);i&&(i.classList.add(ni),i.setAttribute("aria-current","true"))}_updateInterval(){const e=this._activeElement||this._getActive();if(!e)return;const t=Number.parseInt(e.getAttribute("data-bs-interval"),10);this._config.interval=t||this._config.defaultInterval}_slide(e,t=null){if(this._isSliding)return;const i=this._getActive(),n=e===qt,r=t||Je(this._getItems(),i,n,this._config.wrap);if(r===i)return;const o=this._getItemIndex(r),s=t=>mt.trigger(this._element,t,{relatedTarget:r,direction:this._orderToDirection(e),from:this._getItemIndex(i),to:o});if(s(Kt).defaultPrevented)return;if(!i||!r)return;const a=Boolean(this._interval);this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(o),this._activeElement=r;const l=n?"carousel-item-start":"carousel-item-end",c=n?"carousel-item-next":"carousel-item-prev";r.classList.add(c),Ve(r),i.classList.add(l),r.classList.add(l);this._queueCallback((()=>{r.classList.remove(l,c),r.classList.add(ni),i.classList.remove(ni,c,l),this._isSliding=!1,s(Xt)}),i,this._isAnimated()),a&&this.cycle()}_isAnimated(){return this._element.classList.contains("slide")}_getActive(){return Ct.findOne(si,this._element)}_getItems(){return Ct.find(oi,this._element)}_clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}_directionToOrder(e){return Xe()?e===Vt?Wt:qt:e===Vt?qt:Wt}_orderToDirection(e){return Xe()?e===Wt?Vt:Zt:e===Wt?Zt:Vt}static jQueryInterface(e){return this.each((function(){const t=ui.getOrCreateInstance(this,e);if("number"!=typeof e){if("string"==typeof e){if(void 0===t[e]||e.startsWith("_")||"constructor"===e)throw new TypeError(`No method named "${e}"`);t[e]()}}else t.to(e)}))}}mt.on(document,ti,"[data-bs-slide], [data-bs-slide-to]",(function(e){const t=Ct.getElementFromSelector(this);if(!t||!t.classList.contains(ii))return;e.preventDefault();const i=ui.getOrCreateInstance(t),n=this.getAttribute("data-bs-slide-to");return n?(i.to(n),void i._maybeEnableCycle()):"next"===bt.getDataAttribute(this,"slide")?(i.next(),void i._maybeEnableCycle()):(i.prev(),void i._maybeEnableCycle())})),mt.on(window,ei,(()=>{const e=Ct.find('[data-bs-ride="carousel"]');for(const t of e)ui.getOrCreateInstance(t)})),Ye(ui);const di=".bs.collapse",hi=`show${di}`,pi=`shown${di}`,fi=`hide${di}`,mi=`hidden${di}`,gi=`click${di}.data-api`,vi="show",_i="collapse",bi="collapsing",yi=`:scope .${_i} .${_i}`,wi='[data-bs-toggle="collapse"]',xi={parent:null,toggle:!0},Ci={parent:"(null|element)",toggle:"boolean"};class Ti extends wt{constructor(e,t){super(e,t),this._isTransitioning=!1,this._triggerArray=[];const i=Ct.find(wi);for(const e of i){const t=Ct.getSelectorFromElement(e),i=Ct.find(t).filter((e=>e===this._element));null!==t&&i.length&&this._triggerArray.push(e)}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return xi}static get DefaultType(){return Ci}static get NAME(){return"collapse"}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let e=[];if(this._config.parent&&(e=this._getFirstLevelChildren(".collapse.show, .collapse.collapsing").filter((e=>e!==this._element)).map((e=>Ti.getOrCreateInstance(e,{toggle:!1})))),e.length&&e[0]._isTransitioning)return;if(mt.trigger(this._element,hi).defaultPrevented)return;for(const t of e)t.hide();const t=this._getDimension();this._element.classList.remove(_i),this._element.classList.add(bi),this._element.style[t]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const i=`scroll${t[0].toUpperCase()+t.slice(1)}`;this._queueCallback((()=>{this._isTransitioning=!1,this._element.classList.remove(bi),this._element.classList.add(_i,vi),this._element.style[t]="",mt.trigger(this._element,pi)}),this._element,!0),this._element.style[t]=`${this._element[i]}px`}hide(){if(this._isTransitioning||!this._isShown())return;if(mt.trigger(this._element,fi).defaultPrevented)return;const e=this._getDimension();this._element.style[e]=`${this._element.getBoundingClientRect()[e]}px`,Ve(this._element),this._element.classList.add(bi),this._element.classList.remove(_i,vi);for(const e of this._triggerArray){const t=Ct.getElementFromSelector(e);t&&!this._isShown(t)&&this._addAriaAndCollapsedClass([e],!1)}this._isTransitioning=!0;this._element.style[e]="",this._queueCallback((()=>{this._isTransitioning=!1,this._element.classList.remove(bi),this._element.classList.add(_i),mt.trigger(this._element,mi)}),this._element,!0)}_isShown(e=this._element){return e.classList.contains(vi)}_configAfterMerge(e){return e.toggle=Boolean(e.toggle),e.parent=Be(e.parent),e}_getDimension(){return this._element.classList.contains("collapse-horizontal")?"width":"height"}_initializeChildren(){if(!this._config.parent)return;const e=this._getFirstLevelChildren(wi);for(const t of e){const e=Ct.getElementFromSelector(t);e&&this._addAriaAndCollapsedClass([t],this._isShown(e))}}_getFirstLevelChildren(e){const t=Ct.find(yi,this._config.parent);return Ct.find(e,this._config.parent).filter((e=>!t.includes(e)))}_addAriaAndCollapsedClass(e,t){if(e.length)for(const i of e)i.classList.toggle("collapsed",!t),i.setAttribute("aria-expanded",t)}static jQueryInterface(e){const t={};return"string"==typeof e&&/show|hide/.test(e)&&(t.toggle=!1),this.each((function(){const i=Ti.getOrCreateInstance(this,t);if("string"==typeof e){if(void 0===i[e])throw new TypeError(`No method named "${e}"`);i[e]()}}))}}mt.on(document,gi,wi,(function(e){("A"===e.target.tagName||e.delegateTarget&&"A"===e.delegateTarget.tagName)&&e.preventDefault();for(const e of Ct.getMultipleElementsFromSelector(this))Ti.getOrCreateInstance(e,{toggle:!1}).toggle()})),Ye(Ti);const ki="dropdown",Ei=".bs.dropdown",Si=".data-api",Ai="ArrowUp",Pi="ArrowDown",Ii=`hide${Ei}`,Di=`hidden${Ei}`,Fi=`show${Ei}`,Mi=`shown${Ei}`,Li=`click${Ei}${Si}`,ji=`keydown${Ei}${Si}`,Oi=`keyup${Ei}${Si}`,$i="show",zi='[data-bs-toggle="dropdown"]:not(.disabled):not(:disabled)',Ni=`${zi}.${$i}`,Ri=".dropdown-menu",Bi=Xe()?"top-end":"top-start",Ui=Xe()?"top-start":"top-end",Hi=Xe()?"bottom-end":"bottom-start",qi=Xe()?"bottom-start":"bottom-end",Wi=Xe()?"left-start":"right-start",Vi=Xe()?"right-start":"left-start",Zi={autoClose:!0,boundary:"clippingParents",display:"dynamic",offset:[0,2],popperConfig:null,reference:"toggle"},Ki={autoClose:"(boolean|string)",boundary:"(string|element)",display:"string",offset:"(array|string|function)",popperConfig:"(null|object|function)",reference:"(string|element|object)"};class Xi extends wt{constructor(e,t){super(e,t),this._popper=null,this._parent=this._element.parentNode,this._menu=Ct.next(this._element,Ri)[0]||Ct.prev(this._element,Ri)[0]||Ct.findOne(Ri,this._parent),this._inNavbar=this._detectNavbar()}static get Default(){return Zi}static get DefaultType(){return Ki}static get NAME(){return ki}toggle(){return this._isShown()?this.hide():this.show()}show(){if(He(this._element)||this._isShown())return;const e={relatedTarget:this._element};if(!mt.trigger(this._element,Fi,e).defaultPrevented){if(this._createPopper(),"ontouchstart"in document.documentElement&&!this._parent.closest(".navbar-nav"))for(const e of[].concat(...document.body.children))mt.on(e,"mouseover",We);this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.add($i),this._element.classList.add($i),mt.trigger(this._element,Mi,e)}}hide(){if(He(this._element)||!this._isShown())return;const e={relatedTarget:this._element};this._completeHide(e)}dispose(){this._popper&&this._popper.destroy(),super.dispose()}update(){this._inNavbar=this._detectNavbar(),this._popper&&this._popper.update()}_completeHide(e){if(!mt.trigger(this._element,Ii,e).defaultPrevented){if("ontouchstart"in document.documentElement)for(const e of[].concat(...document.body.children))mt.off(e,"mouseover",We);this._popper&&this._popper.destroy(),this._menu.classList.remove($i),this._element.classList.remove($i),this._element.setAttribute("aria-expanded","false"),bt.removeDataAttribute(this._menu,"popper"),mt.trigger(this._element,Di,e)}}_getConfig(e){if("object"==typeof(e=super._getConfig(e)).reference&&!Re(e.reference)&&"function"!=typeof e.reference.getBoundingClientRect)throw new TypeError(`${ki.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);return e}_createPopper(){if(void 0===n)throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org)");let e=this._element;"parent"===this._config.reference?e=this._parent:Re(this._config.reference)?e=Be(this._config.reference):"object"==typeof this._config.reference&&(e=this._config.reference);const t=this._getPopperConfig();this._popper=Me(e,this._menu,t)}_isShown(){return this._menu.classList.contains($i)}_getPlacement(){const e=this._parent;if(e.classList.contains("dropend"))return Wi;if(e.classList.contains("dropstart"))return Vi;if(e.classList.contains("dropup-center"))return"top";if(e.classList.contains("dropdown-center"))return"bottom";const t="end"===getComputedStyle(this._menu).getPropertyValue("--bs-position").trim();return e.classList.contains("dropup")?t?Ui:Bi:t?qi:Hi}_detectNavbar(){return null!==this._element.closest(".navbar")}_getOffset(){const{offset:e}=this._config;return"string"==typeof e?e.split(",").map((e=>Number.parseInt(e,10))):"function"==typeof e?t=>e(t,this._element):e}_getPopperConfig(){const e={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return(this._inNavbar||"static"===this._config.display)&&(bt.setDataAttribute(this._menu,"popper","static"),e.modifiers=[{name:"applyStyles",enabled:!1}]),{...e,...Qe(this._config.popperConfig,[e])}}_selectMenuItem({key:e,target:t}){const i=Ct.find(".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",this._menu).filter((e=>Ue(e)));i.length&&Je(i,t,e===Pi,!i.includes(t)).focus()}static jQueryInterface(e){return this.each((function(){const t=Xi.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===t[e])throw new TypeError(`No method named "${e}"`);t[e]()}}))}static clearMenus(e){if(2===e.button||"keyup"===e.type&&"Tab"!==e.key)return;const t=Ct.find(Ni);for(const i of t){const t=Xi.getInstance(i);if(!t||!1===t._config.autoClose)continue;const n=e.composedPath(),r=n.includes(t._menu);if(n.includes(t._element)||"inside"===t._config.autoClose&&!r||"outside"===t._config.autoClose&&r)continue;if(t._menu.contains(e.target)&&("keyup"===e.type&&"Tab"===e.key||/input|select|option|textarea|form/i.test(e.target.tagName)))continue;const o={relatedTarget:t._element};"click"===e.type&&(o.clickEvent=e),t._completeHide(o)}}static dataApiKeydownHandler(e){const t=/input|textarea/i.test(e.target.tagName),i="Escape"===e.key,n=[Ai,Pi].includes(e.key);if(!n&&!i)return;if(t&&!i)return;e.preventDefault();const r=this.matches(zi)?this:Ct.prev(this,zi)[0]||Ct.next(this,zi)[0]||Ct.findOne(zi,e.delegateTarget.parentNode),o=Xi.getOrCreateInstance(r);if(n)return e.stopPropagation(),o.show(),void o._selectMenuItem(e);o._isShown()&&(e.stopPropagation(),o.hide(),r.focus())}}mt.on(document,ji,zi,Xi.dataApiKeydownHandler),mt.on(document,ji,Ri,Xi.dataApiKeydownHandler),mt.on(document,Li,Xi.clearMenus),mt.on(document,Oi,Xi.clearMenus),mt.on(document,Li,zi,(function(e){e.preventDefault(),Xi.getOrCreateInstance(this).toggle()})),Ye(Xi);const Yi="backdrop",Qi="show",Gi=`mousedown.bs.${Yi}`,Ji={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},en={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"};class tn extends yt{constructor(e){super(),this._config=this._getConfig(e),this._isAppended=!1,this._element=null}static get Default(){return Ji}static get DefaultType(){return en}static get NAME(){return Yi}show(e){if(!this._config.isVisible)return void Qe(e);this._append();const t=this._getElement();this._config.isAnimated&&Ve(t),t.classList.add(Qi),this._emulateAnimation((()=>{Qe(e)}))}hide(e){this._config.isVisible?(this._getElement().classList.remove(Qi),this._emulateAnimation((()=>{this.dispose(),Qe(e)}))):Qe(e)}dispose(){this._isAppended&&(mt.off(this._element,Gi),this._element.remove(),this._isAppended=!1)}_getElement(){if(!this._element){const e=document.createElement("div");e.className=this._config.className,this._config.isAnimated&&e.classList.add("fade"),this._element=e}return this._element}_configAfterMerge(e){return e.rootElement=Be(e.rootElement),e}_append(){if(this._isAppended)return;const e=this._getElement();this._config.rootElement.append(e),mt.on(e,Gi,(()=>{Qe(this._config.clickCallback)})),this._isAppended=!0}_emulateAnimation(e){Ge(e,this._getElement(),this._config.isAnimated)}}const nn=".bs.focustrap",rn=`focusin${nn}`,on=`keydown.tab${nn}`,sn="backward",an={autofocus:!0,trapElement:null},ln={autofocus:"boolean",trapElement:"element"};class cn extends yt{constructor(e){super(),this._config=this._getConfig(e),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return an}static get DefaultType(){return ln}static get NAME(){return"focustrap"}activate(){this._isActive||(this._config.autofocus&&this._config.trapElement.focus(),mt.off(document,nn),mt.on(document,rn,(e=>this._handleFocusin(e))),mt.on(document,on,(e=>this._handleKeydown(e))),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,mt.off(document,nn))}_handleFocusin(e){const{trapElement:t}=this._config;if(e.target===document||e.target===t||t.contains(e.target))return;const i=Ct.focusableChildren(t);0===i.length?t.focus():this._lastTabNavDirection===sn?i[i.length-1].focus():i[0].focus()}_handleKeydown(e){"Tab"===e.key&&(this._lastTabNavDirection=e.shiftKey?sn:"forward")}}const un=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",dn=".sticky-top",hn="padding-right",pn="margin-right";class fn{constructor(){this._element=document.body}getWidth(){const e=document.documentElement.clientWidth;return Math.abs(window.innerWidth-e)}hide(){const e=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,hn,(t=>t+e)),this._setElementAttributes(un,hn,(t=>t+e)),this._setElementAttributes(dn,pn,(t=>t-e))}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,hn),this._resetElementAttributes(un,hn),this._resetElementAttributes(dn,pn)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(e,t,i){const n=this.getWidth();this._applyManipulationCallback(e,(e=>{if(e!==this._element&&window.innerWidth>e.clientWidth+n)return;this._saveInitialAttribute(e,t);const r=window.getComputedStyle(e).getPropertyValue(t);e.style.setProperty(t,`${i(Number.parseFloat(r))}px`)}))}_saveInitialAttribute(e,t){const i=e.style.getPropertyValue(t);i&&bt.setDataAttribute(e,t,i)}_resetElementAttributes(e,t){this._applyManipulationCallback(e,(e=>{const i=bt.getDataAttribute(e,t);null!==i?(bt.removeDataAttribute(e,t),e.style.setProperty(t,i)):e.style.removeProperty(t)}))}_applyManipulationCallback(e,t){if(Re(e))t(e);else for(const i of Ct.find(e,this._element))t(i)}}const mn=".bs.modal",gn=`hide${mn}`,vn=`hidePrevented${mn}`,_n=`hidden${mn}`,bn=`show${mn}`,yn=`shown${mn}`,wn=`resize${mn}`,xn=`click.dismiss${mn}`,Cn=`mousedown.dismiss${mn}`,Tn=`keydown.dismiss${mn}`,kn=`click${mn}.data-api`,En="modal-open",Sn="show",An="modal-static",Pn={backdrop:!0,focus:!0,keyboard:!0},In={backdrop:"(boolean|string)",focus:"boolean",keyboard:"boolean"};class Dn extends wt{constructor(e,t){super(e,t),this._dialog=Ct.findOne(".modal-dialog",this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new fn,this._addEventListeners()}static get Default(){return Pn}static get DefaultType(){return In}static get NAME(){return"modal"}toggle(e){return this._isShown?this.hide():this.show(e)}show(e){if(this._isShown||this._isTransitioning)return;mt.trigger(this._element,bn,{relatedTarget:e}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add(En),this._adjustDialog(),this._backdrop.show((()=>this._showElement(e))))}hide(){if(!this._isShown||this._isTransitioning)return;mt.trigger(this._element,gn).defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._element.classList.remove(Sn),this._queueCallback((()=>this._hideModal()),this._element,this._isAnimated()))}dispose(){mt.off(window,mn),mt.off(this._dialog,mn),this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new tn({isVisible:Boolean(this._config.backdrop),isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new cn({trapElement:this._element})}_showElement(e){document.body.contains(this._element)||document.body.append(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0;const t=Ct.findOne(".modal-body",this._dialog);t&&(t.scrollTop=0),Ve(this._element),this._element.classList.add(Sn);this._queueCallback((()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,mt.trigger(this._element,yn,{relatedTarget:e})}),this._dialog,this._isAnimated())}_addEventListeners(){mt.on(this._element,Tn,(e=>{"Escape"===e.key&&(this._config.keyboard?this.hide():this._triggerBackdropTransition())})),mt.on(window,wn,(()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()})),mt.on(this._element,Cn,(e=>{mt.one(this._element,xn,(t=>{this._element===e.target&&this._element===t.target&&("static"!==this._config.backdrop?this._config.backdrop&&this.hide():this._triggerBackdropTransition())}))}))}_hideModal(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._backdrop.hide((()=>{document.body.classList.remove(En),this._resetAdjustments(),this._scrollBar.reset(),mt.trigger(this._element,_n)}))}_isAnimated(){return this._element.classList.contains("fade")}_triggerBackdropTransition(){if(mt.trigger(this._element,vn).defaultPrevented)return;const e=this._element.scrollHeight>document.documentElement.clientHeight,t=this._element.style.overflowY;"hidden"===t||this._element.classList.contains(An)||(e||(this._element.style.overflowY="hidden"),this._element.classList.add(An),this._queueCallback((()=>{this._element.classList.remove(An),this._queueCallback((()=>{this._element.style.overflowY=t}),this._dialog)}),this._dialog),this._element.focus())}_adjustDialog(){const e=this._element.scrollHeight>document.documentElement.clientHeight,t=this._scrollBar.getWidth(),i=t>0;if(i&&!e){const e=Xe()?"paddingLeft":"paddingRight";this._element.style[e]=`${t}px`}if(!i&&e){const e=Xe()?"paddingRight":"paddingLeft";this._element.style[e]=`${t}px`}}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(e,t){return this.each((function(){const i=Dn.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===i[e])throw new TypeError(`No method named "${e}"`);i[e](t)}}))}}mt.on(document,kn,'[data-bs-toggle="modal"]',(function(e){const t=Ct.getElementFromSelector(this);["A","AREA"].includes(this.tagName)&&e.preventDefault(),mt.one(t,bn,(e=>{e.defaultPrevented||mt.one(t,_n,(()=>{Ue(this)&&this.focus()}))}));const i=Ct.findOne(".modal.show");i&&Dn.getInstance(i).hide();Dn.getOrCreateInstance(t).toggle(this)})),Tt(Dn),Ye(Dn);const Fn=".bs.offcanvas",Mn=".data-api",Ln=`load${Fn}${Mn}`,jn="show",On="showing",$n="hiding",zn=".offcanvas.show",Nn=`show${Fn}`,Rn=`shown${Fn}`,Bn=`hide${Fn}`,Un=`hidePrevented${Fn}`,Hn=`hidden${Fn}`,qn=`resize${Fn}`,Wn=`click${Fn}${Mn}`,Vn=`keydown.dismiss${Fn}`,Zn={backdrop:!0,keyboard:!0,scroll:!1},Kn={backdrop:"(boolean|string)",keyboard:"boolean",scroll:"boolean"};class Xn extends wt{constructor(e,t){super(e,t),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get Default(){return Zn}static get DefaultType(){return Kn}static get NAME(){return"offcanvas"}toggle(e){return this._isShown?this.hide():this.show(e)}show(e){if(this._isShown)return;if(mt.trigger(this._element,Nn,{relatedTarget:e}).defaultPrevented)return;this._isShown=!0,this._backdrop.show(),this._config.scroll||(new fn).hide(),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(On);this._queueCallback((()=>{this._config.scroll&&!this._config.backdrop||this._focustrap.activate(),this._element.classList.add(jn),this._element.classList.remove(On),mt.trigger(this._element,Rn,{relatedTarget:e})}),this._element,!0)}hide(){if(!this._isShown)return;if(mt.trigger(this._element,Bn).defaultPrevented)return;this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.add($n),this._backdrop.hide();this._queueCallback((()=>{this._element.classList.remove(jn,$n),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._config.scroll||(new fn).reset(),mt.trigger(this._element,Hn)}),this._element,!0)}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_initializeBackDrop(){const e=Boolean(this._config.backdrop);return new tn({className:"offcanvas-backdrop",isVisible:e,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:e?()=>{"static"!==this._config.backdrop?this.hide():mt.trigger(this._element,Un)}:null})}_initializeFocusTrap(){return new cn({trapElement:this._element})}_addEventListeners(){mt.on(this._element,Vn,(e=>{"Escape"===e.key&&(this._config.keyboard?this.hide():mt.trigger(this._element,Un))}))}static jQueryInterface(e){return this.each((function(){const t=Xn.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===t[e]||e.startsWith("_")||"constructor"===e)throw new TypeError(`No method named "${e}"`);t[e](this)}}))}}mt.on(document,Wn,'[data-bs-toggle="offcanvas"]',(function(e){const t=Ct.getElementFromSelector(this);if(["A","AREA"].includes(this.tagName)&&e.preventDefault(),He(this))return;mt.one(t,Hn,(()=>{Ue(this)&&this.focus()}));const i=Ct.findOne(zn);i&&i!==t&&Xn.getInstance(i).hide();Xn.getOrCreateInstance(t).toggle(this)})),mt.on(window,Ln,(()=>{for(const e of Ct.find(zn))Xn.getOrCreateInstance(e).show()})),mt.on(window,qn,(()=>{for(const e of Ct.find("[aria-modal][class*=show][class*=offcanvas-]"))"fixed"!==getComputedStyle(e).position&&Xn.getOrCreateInstance(e).hide()})),Tt(Xn),Ye(Xn);const Yn={"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],dd:[],div:[],dl:[],dt:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},Qn=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),Gn=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i,Jn=(e,t)=>{const i=e.nodeName.toLowerCase();return t.includes(i)?!Qn.has(i)||Boolean(Gn.test(e.nodeValue)):t.filter((e=>e instanceof RegExp)).some((e=>e.test(i)))};const er={allowList:Yn,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:"
    "},tr={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"},ir={entry:"(string|element|function|null)",selector:"(string|element)"};class nr extends yt{constructor(e){super(),this._config=this._getConfig(e)}static get Default(){return er}static get DefaultType(){return tr}static get NAME(){return"TemplateFactory"}getContent(){return Object.values(this._config.content).map((e=>this._resolvePossibleFunction(e))).filter(Boolean)}hasContent(){return this.getContent().length>0}changeContent(e){return this._checkContent(e),this._config.content={...this._config.content,...e},this}toHtml(){const e=document.createElement("div");e.innerHTML=this._maybeSanitize(this._config.template);for(const[t,i]of Object.entries(this._config.content))this._setContent(e,i,t);const t=e.children[0],i=this._resolvePossibleFunction(this._config.extraClass);return i&&t.classList.add(...i.split(" ")),t}_typeCheckConfig(e){super._typeCheckConfig(e),this._checkContent(e.content)}_checkContent(e){for(const[t,i]of Object.entries(e))super._typeCheckConfig({selector:t,entry:i},ir)}_setContent(e,t,i){const n=Ct.findOne(i,e);n&&((t=this._resolvePossibleFunction(t))?Re(t)?this._putElementInTemplate(Be(t),n):this._config.html?n.innerHTML=this._maybeSanitize(t):n.textContent=t:n.remove())}_maybeSanitize(e){return this._config.sanitize?function(e,t,i){if(!e.length)return e;if(i&&"function"==typeof i)return i(e);const n=(new window.DOMParser).parseFromString(e,"text/html"),r=[].concat(...n.body.querySelectorAll("*"));for(const e of r){const i=e.nodeName.toLowerCase();if(!Object.keys(t).includes(i)){e.remove();continue}const n=[].concat(...e.attributes),r=[].concat(t["*"]||[],t[i]||[]);for(const t of n)Jn(t,r)||e.removeAttribute(t.nodeName)}return n.body.innerHTML}(e,this._config.allowList,this._config.sanitizeFn):e}_resolvePossibleFunction(e){return Qe(e,[this])}_putElementInTemplate(e,t){if(this._config.html)return t.innerHTML="",void t.append(e);t.textContent=e.textContent}}const rr=new Set(["sanitize","allowList","sanitizeFn"]),or="fade",sr="show",ar=".tooltip-inner",lr=".modal",cr="hide.bs.modal",ur="hover",dr="focus",hr={AUTO:"auto",TOP:"top",RIGHT:Xe()?"left":"right",BOTTOM:"bottom",LEFT:Xe()?"right":"left"},pr={allowList:Yn,animation:!0,boundary:"clippingParents",container:!1,customClass:"",delay:0,fallbackPlacements:["top","right","bottom","left"],html:!1,offset:[0,6],placement:"top",popperConfig:null,sanitize:!0,sanitizeFn:null,selector:!1,template:'',title:"",trigger:"hover focus"},fr={allowList:"object",animation:"boolean",boundary:"(string|element)",container:"(string|element|boolean)",customClass:"(string|function)",delay:"(number|object)",fallbackPlacements:"array",html:"boolean",offset:"(array|string|function)",placement:"(string|function)",popperConfig:"(null|object|function)",sanitize:"boolean",sanitizeFn:"(null|function)",selector:"(string|boolean)",template:"string",title:"(string|element|function)",trigger:"string"};class mr extends wt{constructor(e,t){if(void 0===n)throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");super(e,t),this._isEnabled=!0,this._timeout=0,this._isHovered=null,this._activeTrigger={},this._popper=null,this._templateFactory=null,this._newContent=null,this.tip=null,this._setListeners(),this._config.selector||this._fixTitle()}static get Default(){return pr}static get DefaultType(){return fr}static get NAME(){return"tooltip"}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(){this._isEnabled&&(this._activeTrigger.click=!this._activeTrigger.click,this._isShown()?this._leave():this._enter())}dispose(){clearTimeout(this._timeout),mt.off(this._element.closest(lr),cr,this._hideModalHandler),this._element.getAttribute("data-bs-original-title")&&this._element.setAttribute("title",this._element.getAttribute("data-bs-original-title")),this._disposePopper(),super.dispose()}show(){if("none"===this._element.style.display)throw new Error("Please use show on visible elements");if(!this._isWithContent()||!this._isEnabled)return;const e=mt.trigger(this._element,this.constructor.eventName("show")),t=(qe(this._element)||this._element.ownerDocument.documentElement).contains(this._element);if(e.defaultPrevented||!t)return;this._disposePopper();const i=this._getTipElement();this._element.setAttribute("aria-describedby",i.getAttribute("id"));const{container:n}=this._config;if(this._element.ownerDocument.documentElement.contains(this.tip)||(n.append(i),mt.trigger(this._element,this.constructor.eventName("inserted"))),this._popper=this._createPopper(i),i.classList.add(sr),"ontouchstart"in document.documentElement)for(const e of[].concat(...document.body.children))mt.on(e,"mouseover",We);this._queueCallback((()=>{mt.trigger(this._element,this.constructor.eventName("shown")),!1===this._isHovered&&this._leave(),this._isHovered=!1}),this.tip,this._isAnimated())}hide(){if(!this._isShown())return;if(mt.trigger(this._element,this.constructor.eventName("hide")).defaultPrevented)return;if(this._getTipElement().classList.remove(sr),"ontouchstart"in document.documentElement)for(const e of[].concat(...document.body.children))mt.off(e,"mouseover",We);this._activeTrigger.click=!1,this._activeTrigger[dr]=!1,this._activeTrigger[ur]=!1,this._isHovered=null;this._queueCallback((()=>{this._isWithActiveTrigger()||(this._isHovered||this._disposePopper(),this._element.removeAttribute("aria-describedby"),mt.trigger(this._element,this.constructor.eventName("hidden")))}),this.tip,this._isAnimated())}update(){this._popper&&this._popper.update()}_isWithContent(){return Boolean(this._getTitle())}_getTipElement(){return this.tip||(this.tip=this._createTipElement(this._newContent||this._getContentForTemplate())),this.tip}_createTipElement(e){const t=this._getTemplateFactory(e).toHtml();if(!t)return null;t.classList.remove(or,sr),t.classList.add(`bs-${this.constructor.NAME}-auto`);const i=(e=>{do{e+=Math.floor(1e6*Math.random())}while(document.getElementById(e));return e})(this.constructor.NAME).toString();return t.setAttribute("id",i),this._isAnimated()&&t.classList.add(or),t}setContent(e){this._newContent=e,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(e){return this._templateFactory?this._templateFactory.changeContent(e):this._templateFactory=new nr({...this._config,content:e,extraClass:this._resolvePossibleFunction(this._config.customClass)}),this._templateFactory}_getContentForTemplate(){return{[ar]:this._getTitle()}}_getTitle(){return this._resolvePossibleFunction(this._config.title)||this._element.getAttribute("data-bs-original-title")}_initializeOnDelegatedTarget(e){return this.constructor.getOrCreateInstance(e.delegateTarget,this._getDelegateConfig())}_isAnimated(){return this._config.animation||this.tip&&this.tip.classList.contains(or)}_isShown(){return this.tip&&this.tip.classList.contains(sr)}_createPopper(e){const t=Qe(this._config.placement,[this,e,this._element]),i=hr[t.toUpperCase()];return Me(this._element,e,this._getPopperConfig(i))}_getOffset(){const{offset:e}=this._config;return"string"==typeof e?e.split(",").map((e=>Number.parseInt(e,10))):"function"==typeof e?t=>e(t,this._element):e}_resolvePossibleFunction(e){return Qe(e,[this._element])}_getPopperConfig(e){const t={placement:e,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"preSetPlacement",enabled:!0,phase:"beforeMain",fn:e=>{this._getTipElement().setAttribute("data-popper-placement",e.state.placement)}}]};return{...t,...Qe(this._config.popperConfig,[t])}}_setListeners(){const e=this._config.trigger.split(" ");for(const t of e)if("click"===t)mt.on(this._element,this.constructor.eventName("click"),this._config.selector,(e=>{this._initializeOnDelegatedTarget(e).toggle()}));else if("manual"!==t){const e=t===ur?this.constructor.eventName("mouseenter"):this.constructor.eventName("focusin"),i=t===ur?this.constructor.eventName("mouseleave"):this.constructor.eventName("focusout");mt.on(this._element,e,this._config.selector,(e=>{const t=this._initializeOnDelegatedTarget(e);t._activeTrigger["focusin"===e.type?dr:ur]=!0,t._enter()})),mt.on(this._element,i,this._config.selector,(e=>{const t=this._initializeOnDelegatedTarget(e);t._activeTrigger["focusout"===e.type?dr:ur]=t._element.contains(e.relatedTarget),t._leave()}))}this._hideModalHandler=()=>{this._element&&this.hide()},mt.on(this._element.closest(lr),cr,this._hideModalHandler)}_fixTitle(){const e=this._element.getAttribute("title");e&&(this._element.getAttribute("aria-label")||this._element.textContent.trim()||this._element.setAttribute("aria-label",e),this._element.setAttribute("data-bs-original-title",e),this._element.removeAttribute("title"))}_enter(){this._isShown()||this._isHovered?this._isHovered=!0:(this._isHovered=!0,this._setTimeout((()=>{this._isHovered&&this.show()}),this._config.delay.show))}_leave(){this._isWithActiveTrigger()||(this._isHovered=!1,this._setTimeout((()=>{this._isHovered||this.hide()}),this._config.delay.hide))}_setTimeout(e,t){clearTimeout(this._timeout),this._timeout=setTimeout(e,t)}_isWithActiveTrigger(){return Object.values(this._activeTrigger).includes(!0)}_getConfig(e){const t=bt.getDataAttributes(this._element);for(const e of Object.keys(t))rr.has(e)&&delete t[e];return e={...t,..."object"==typeof e&&e?e:{}},e=this._mergeConfigObj(e),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}_configAfterMerge(e){return e.container=!1===e.container?document.body:Be(e.container),"number"==typeof e.delay&&(e.delay={show:e.delay,hide:e.delay}),"number"==typeof e.title&&(e.title=e.title.toString()),"number"==typeof e.content&&(e.content=e.content.toString()),e}_getDelegateConfig(){const e={};for(const[t,i]of Object.entries(this._config))this.constructor.Default[t]!==i&&(e[t]=i);return e.selector=!1,e.trigger="manual",e}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null),this.tip&&(this.tip.remove(),this.tip=null)}static jQueryInterface(e){return this.each((function(){const t=mr.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===t[e])throw new TypeError(`No method named "${e}"`);t[e]()}}))}}Ye(mr);const gr=".popover-header",vr=".popover-body",_r={...mr.Default,content:"",offset:[0,8],placement:"right",template:'',trigger:"click"},br={...mr.DefaultType,content:"(null|string|element|function)"};class yr extends mr{static get Default(){return _r}static get DefaultType(){return br}static get NAME(){return"popover"}_isWithContent(){return this._getTitle()||this._getContent()}_getContentForTemplate(){return{[gr]:this._getTitle(),[vr]:this._getContent()}}_getContent(){return this._resolvePossibleFunction(this._config.content)}static jQueryInterface(e){return this.each((function(){const t=yr.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===t[e])throw new TypeError(`No method named "${e}"`);t[e]()}}))}}Ye(yr);const wr=".bs.scrollspy",xr=`activate${wr}`,Cr=`click${wr}`,Tr=`load${wr}.data-api`,kr="active",Er="[href]",Sr=".nav-link",Ar=`${Sr}, .nav-item > ${Sr}, .list-group-item`,Pr={offset:null,rootMargin:"0px 0px -25%",smoothScroll:!1,target:null,threshold:[.1,.5,1]},Ir={offset:"(number|null)",rootMargin:"string",smoothScroll:"boolean",target:"element",threshold:"array"};class Dr extends wt{constructor(e,t){super(e,t),this._targetLinks=new Map,this._observableSections=new Map,this._rootElement="visible"===getComputedStyle(this._element).overflowY?null:this._element,this._activeTarget=null,this._observer=null,this._previousScrollData={visibleEntryTop:0,parentScrollTop:0},this.refresh()}static get Default(){return Pr}static get DefaultType(){return Ir}static get NAME(){return"scrollspy"}refresh(){this._initializeTargetsAndObservables(),this._maybeEnableSmoothScroll(),this._observer?this._observer.disconnect():this._observer=this._getNewObserver();for(const e of this._observableSections.values())this._observer.observe(e)}dispose(){this._observer.disconnect(),super.dispose()}_configAfterMerge(e){return e.target=Be(e.target)||document.body,e.rootMargin=e.offset?`${e.offset}px 0px -30%`:e.rootMargin,"string"==typeof e.threshold&&(e.threshold=e.threshold.split(",").map((e=>Number.parseFloat(e)))),e}_maybeEnableSmoothScroll(){this._config.smoothScroll&&(mt.off(this._config.target,Cr),mt.on(this._config.target,Cr,Er,(e=>{const t=this._observableSections.get(e.target.hash);if(t){e.preventDefault();const i=this._rootElement||window,n=t.offsetTop-this._element.offsetTop;if(i.scrollTo)return void i.scrollTo({top:n,behavior:"smooth"});i.scrollTop=n}})))}_getNewObserver(){const e={root:this._rootElement,threshold:this._config.threshold,rootMargin:this._config.rootMargin};return new IntersectionObserver((e=>this._observerCallback(e)),e)}_observerCallback(e){const t=e=>this._targetLinks.get(`#${e.target.id}`),i=e=>{this._previousScrollData.visibleEntryTop=e.target.offsetTop,this._process(t(e))},n=(this._rootElement||document.documentElement).scrollTop,r=n>=this._previousScrollData.parentScrollTop;this._previousScrollData.parentScrollTop=n;for(const o of e){if(!o.isIntersecting){this._activeTarget=null,this._clearActiveClass(t(o));continue}const e=o.target.offsetTop>=this._previousScrollData.visibleEntryTop;if(r&&e){if(i(o),!n)return}else r||e||i(o)}}_initializeTargetsAndObservables(){this._targetLinks=new Map,this._observableSections=new Map;const e=Ct.find(Er,this._config.target);for(const t of e){if(!t.hash||He(t))continue;const e=Ct.findOne(decodeURI(t.hash),this._element);Ue(e)&&(this._targetLinks.set(decodeURI(t.hash),t),this._observableSections.set(t.hash,e))}}_process(e){this._activeTarget!==e&&(this._clearActiveClass(this._config.target),this._activeTarget=e,e.classList.add(kr),this._activateParents(e),mt.trigger(this._element,xr,{relatedTarget:e}))}_activateParents(e){if(e.classList.contains("dropdown-item"))Ct.findOne(".dropdown-toggle",e.closest(".dropdown")).classList.add(kr);else for(const t of Ct.parents(e,".nav, .list-group"))for(const e of Ct.prev(t,Ar))e.classList.add(kr)}_clearActiveClass(e){e.classList.remove(kr);const t=Ct.find(`${Er}.${kr}`,e);for(const e of t)e.classList.remove(kr)}static jQueryInterface(e){return this.each((function(){const t=Dr.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===t[e]||e.startsWith("_")||"constructor"===e)throw new TypeError(`No method named "${e}"`);t[e]()}}))}}mt.on(window,Tr,(()=>{for(const e of Ct.find('[data-bs-spy="scroll"]'))Dr.getOrCreateInstance(e)})),Ye(Dr);const Fr=".bs.tab",Mr=`hide${Fr}`,Lr=`hidden${Fr}`,jr=`show${Fr}`,Or=`shown${Fr}`,$r=`click${Fr}`,zr=`keydown${Fr}`,Nr=`load${Fr}`,Rr="ArrowLeft",Br="ArrowRight",Ur="ArrowUp",Hr="ArrowDown",qr="Home",Wr="End",Vr="active",Zr="fade",Kr="show",Xr=".dropdown-toggle",Yr=`:not(${Xr})`,Qr='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',Gr=`${`.nav-link${Yr}, .list-group-item${Yr}, [role="tab"]${Yr}`}, ${Qr}`,Jr=`.${Vr}[data-bs-toggle="tab"], .${Vr}[data-bs-toggle="pill"], .${Vr}[data-bs-toggle="list"]`;class eo extends wt{constructor(e){super(e),this._parent=this._element.closest('.list-group, .nav, [role="tablist"]'),this._parent&&(this._setInitialAttributes(this._parent,this._getChildren()),mt.on(this._element,zr,(e=>this._keydown(e))))}static get NAME(){return"tab"}show(){const e=this._element;if(this._elemIsActive(e))return;const t=this._getActiveElem(),i=t?mt.trigger(t,Mr,{relatedTarget:e}):null;mt.trigger(e,jr,{relatedTarget:t}).defaultPrevented||i&&i.defaultPrevented||(this._deactivate(t,e),this._activate(e,t))}_activate(e,t){if(!e)return;e.classList.add(Vr),this._activate(Ct.getElementFromSelector(e));this._queueCallback((()=>{"tab"===e.getAttribute("role")?(e.removeAttribute("tabindex"),e.setAttribute("aria-selected",!0),this._toggleDropDown(e,!0),mt.trigger(e,Or,{relatedTarget:t})):e.classList.add(Kr)}),e,e.classList.contains(Zr))}_deactivate(e,t){if(!e)return;e.classList.remove(Vr),e.blur(),this._deactivate(Ct.getElementFromSelector(e));this._queueCallback((()=>{"tab"===e.getAttribute("role")?(e.setAttribute("aria-selected",!1),e.setAttribute("tabindex","-1"),this._toggleDropDown(e,!1),mt.trigger(e,Lr,{relatedTarget:t})):e.classList.remove(Kr)}),e,e.classList.contains(Zr))}_keydown(e){if(![Rr,Br,Ur,Hr,qr,Wr].includes(e.key))return;e.stopPropagation(),e.preventDefault();const t=this._getChildren().filter((e=>!He(e)));let i;if([qr,Wr].includes(e.key))i=t[e.key===qr?0:t.length-1];else{const n=[Br,Hr].includes(e.key);i=Je(t,e.target,n,!0)}i&&(i.focus({preventScroll:!0}),eo.getOrCreateInstance(i).show())}_getChildren(){return Ct.find(Gr,this._parent)}_getActiveElem(){return this._getChildren().find((e=>this._elemIsActive(e)))||null}_setInitialAttributes(e,t){this._setAttributeIfNotExists(e,"role","tablist");for(const e of t)this._setInitialAttributesOnChild(e)}_setInitialAttributesOnChild(e){e=this._getInnerElement(e);const t=this._elemIsActive(e),i=this._getOuterElement(e);e.setAttribute("aria-selected",t),i!==e&&this._setAttributeIfNotExists(i,"role","presentation"),t||e.setAttribute("tabindex","-1"),this._setAttributeIfNotExists(e,"role","tab"),this._setInitialAttributesOnTargetPanel(e)}_setInitialAttributesOnTargetPanel(e){const t=Ct.getElementFromSelector(e);t&&(this._setAttributeIfNotExists(t,"role","tabpanel"),e.id&&this._setAttributeIfNotExists(t,"aria-labelledby",`${e.id}`))}_toggleDropDown(e,t){const i=this._getOuterElement(e);if(!i.classList.contains("dropdown"))return;const n=(e,n)=>{const r=Ct.findOne(e,i);r&&r.classList.toggle(n,t)};n(Xr,Vr),n(".dropdown-menu",Kr),i.setAttribute("aria-expanded",t)}_setAttributeIfNotExists(e,t,i){e.hasAttribute(t)||e.setAttribute(t,i)}_elemIsActive(e){return e.classList.contains(Vr)}_getInnerElement(e){return e.matches(Gr)?e:Ct.findOne(Gr,e)}_getOuterElement(e){return e.closest(".nav-item, .list-group-item")||e}static jQueryInterface(e){return this.each((function(){const t=eo.getOrCreateInstance(this);if("string"==typeof e){if(void 0===t[e]||e.startsWith("_")||"constructor"===e)throw new TypeError(`No method named "${e}"`);t[e]()}}))}}mt.on(document,$r,Qr,(function(e){["A","AREA"].includes(this.tagName)&&e.preventDefault(),He(this)||eo.getOrCreateInstance(this).show()})),mt.on(window,Nr,(()=>{for(const e of Ct.find(Jr))eo.getOrCreateInstance(e)})),Ye(eo);const to=".bs.toast",io=`mouseover${to}`,no=`mouseout${to}`,ro=`focusin${to}`,oo=`focusout${to}`,so=`hide${to}`,ao=`hidden${to}`,lo=`show${to}`,co=`shown${to}`,uo="hide",ho="show",po="showing",fo={animation:"boolean",autohide:"boolean",delay:"number"},mo={animation:!0,autohide:!0,delay:5e3};class go extends wt{constructor(e,t){super(e,t),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get Default(){return mo}static get DefaultType(){return fo}static get NAME(){return"toast"}show(){if(mt.trigger(this._element,lo).defaultPrevented)return;this._clearTimeout(),this._config.animation&&this._element.classList.add("fade");this._element.classList.remove(uo),Ve(this._element),this._element.classList.add(ho,po),this._queueCallback((()=>{this._element.classList.remove(po),mt.trigger(this._element,co),this._maybeScheduleHide()}),this._element,this._config.animation)}hide(){if(!this.isShown())return;if(mt.trigger(this._element,so).defaultPrevented)return;this._element.classList.add(po),this._queueCallback((()=>{this._element.classList.add(uo),this._element.classList.remove(po,ho),mt.trigger(this._element,ao)}),this._element,this._config.animation)}dispose(){this._clearTimeout(),this.isShown()&&this._element.classList.remove(ho),super.dispose()}isShown(){return this._element.classList.contains(ho)}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout((()=>{this.hide()}),this._config.delay)))}_onInteraction(e,t){switch(e.type){case"mouseover":case"mouseout":this._hasMouseInteraction=t;break;case"focusin":case"focusout":this._hasKeyboardInteraction=t}if(t)return void this._clearTimeout();const i=e.relatedTarget;this._element===i||this._element.contains(i)||this._maybeScheduleHide()}_setListeners(){mt.on(this._element,io,(e=>this._onInteraction(e,!0))),mt.on(this._element,no,(e=>this._onInteraction(e,!1))),mt.on(this._element,ro,(e=>this._onInteraction(e,!0))),mt.on(this._element,oo,(e=>this._onInteraction(e,!1)))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(e){return this.each((function(){const t=go.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===t[e])throw new TypeError(`No method named "${e}"`);t[e](this)}}))}}Tt(go),Ye(go)},518:(e,t,i)=>{var n,r,o; /*! * jQuery Mousewheel 3.1.13 * @@ -34,4 +34,4 @@ const Oe=new Map,je={set(e,t,i){Oe.has(e)||Oe.set(e,new Map);const n=Oe.get(e);n * https://jquery.org/license * * Date: 2023-08-28T13:37Z - */!function(t,i){"use strict";"object"==typeof e.exports?e.exports=t.document?i(t,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return i(e)}:i(t)}("undefined"!=typeof window?window:this,(function(n,r){"use strict";var o=[],s=Object.getPrototypeOf,a=o.slice,l=o.flat?function(e){return o.flat.call(e)}:function(e){return o.concat.apply([],e)},c=o.push,u=o.indexOf,d={},h=d.toString,p=d.hasOwnProperty,f=p.toString,m=f.call(Object),g={},v=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},_=function(e){return null!=e&&e===e.window},b=n.document,y={type:!0,src:!0,nonce:!0,noModule:!0};function w(e,t,i){var n,r,o=(i=i||b).createElement("script");if(o.text=e,t)for(n in y)(r=t[n]||t.getAttribute&&t.getAttribute(n))&&o.setAttribute(n,r);i.head.appendChild(o).parentNode.removeChild(o)}function x(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?d[h.call(e)]||"object":typeof e}var C="3.7.1",T=/HTML$/i,k=function(e,t){return new k.fn.init(e,t)};function E(e){var t=!!e&&"length"in e&&e.length,i=x(e);return!v(e)&&!_(e)&&("array"===i||0===t||"number"==typeof t&&t>0&&t-1 in e)}function S(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}k.fn=k.prototype={jquery:C,constructor:k,length:0,toArray:function(){return a.call(this)},get:function(e){return null==e?a.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=k.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return k.each(this,e)},map:function(e){return this.pushStack(k.map(this,(function(t,i){return e.call(t,i,t)})))},slice:function(){return this.pushStack(a.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(k.grep(this,(function(e,t){return(t+1)%2})))},odd:function(){return this.pushStack(k.grep(this,(function(e,t){return t%2})))},eq:function(e){var t=this.length,i=+e+(e<0?t:0);return this.pushStack(i>=0&&i+~]|"+D+")"+D+"*"),U=new RegExp(D+"|>"),B=new RegExp($),H=new RegExp("^"+L+"$"),q={ID:new RegExp("^#("+L+")"),CLASS:new RegExp("^\\.("+L+")"),TAG:new RegExp("^("+L+"|[*])"),ATTR:new RegExp("^"+M),PSEUDO:new RegExp("^"+$),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+D+"*(even|odd|(([+-]|)(\\d*)n|)"+D+"*(?:([+-]|)"+D+"*(\\d+)|))"+D+"*\\)|)","i"),bool:new RegExp("^(?:"+E+")$","i"),needsContext:new RegExp("^"+D+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+D+"*((?:-\\d)?\\d*)"+D+"*\\)|)(?=[^-]|$)","i")},W=/^(?:input|select|textarea|button)$/i,V=/^h\d$/i,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,K=/[+~]/,X=new RegExp("\\\\[\\da-fA-F]{1,6}"+D+"?|\\\\([^\\r\\n\\f])","g"),Y=function(e,t){var i="0x"+e.slice(1)-65536;return t||(i<0?String.fromCharCode(i+65536):String.fromCharCode(i>>10|55296,1023&i|56320))},Q=function(){le()},G=he((function(e){return!0===e.disabled&&S(e,"fieldset")}),{dir:"parentNode",next:"legend"});try{m.apply(o=a.call(O.childNodes),O.childNodes),o[O.childNodes.length].nodeType}catch(e){m={apply:function(e,t){j.apply(e,a.call(t))},call:function(e){j.apply(e,a.call(arguments,1))}}}function J(e,t,i,n){var r,o,s,a,c,u,p,f=t&&t.ownerDocument,_=t?t.nodeType:9;if(i=i||[],"string"!=typeof e||!e||1!==_&&9!==_&&11!==_)return i;if(!n&&(le(t),t=t||l,d)){if(11!==_&&(c=Z.exec(e)))if(r=c[1]){if(9===_){if(!(s=t.getElementById(r)))return i;if(s.id===r)return m.call(i,s),i}else if(f&&(s=f.getElementById(r))&&J.contains(t,s)&&s.id===r)return m.call(i,s),i}else{if(c[2])return m.apply(i,t.getElementsByTagName(e)),i;if((r=c[3])&&t.getElementsByClassName)return m.apply(i,t.getElementsByClassName(r)),i}if(!(C[e+" "]||h&&h.test(e))){if(p=e,f=t,1===_&&(U.test(e)||R.test(e))){for((f=K.test(e)&&ae(t.parentNode)||t)==t&&g.scope||((a=t.getAttribute("id"))?a=k.escapeSelector(a):t.setAttribute("id",a=v)),o=(u=ue(e)).length;o--;)u[o]=(a?"#"+a:":scope")+" "+de(u[o]);p=u.join(",")}try{return m.apply(i,f.querySelectorAll(p)),i}catch(t){C(e,!0)}finally{a===v&&t.removeAttribute("id")}}}return _e(e.replace(F,"$1"),t,i,n)}function ee(){var e=[];return function i(n,r){return e.push(n+" ")>t.cacheLength&&delete i[e.shift()],i[n+" "]=r}}function te(e){return e[v]=!0,e}function ie(e){var t=l.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function ne(e){return function(t){return S(t,"input")&&t.type===e}}function re(e){return function(t){return(S(t,"input")||S(t,"button"))&&t.type===e}}function oe(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&G(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function se(e){return te((function(t){return t=+t,te((function(i,n){for(var r,o=e([],i.length,t),s=o.length;s--;)i[r=o[s]]&&(i[r]=!(n[r]=i[r]))}))}))}function ae(e){return e&&void 0!==e.getElementsByTagName&&e}function le(e){var i,n=e?e.ownerDocument||e:O;return n!=l&&9===n.nodeType&&n.documentElement?(c=(l=n).documentElement,d=!k.isXMLDoc(l),f=c.matches||c.webkitMatchesSelector||c.msMatchesSelector,c.msMatchesSelector&&O!=l&&(i=l.defaultView)&&i.top!==i&&i.addEventListener("unload",Q),g.getById=ie((function(e){return c.appendChild(e).id=k.expando,!l.getElementsByName||!l.getElementsByName(k.expando).length})),g.disconnectedMatch=ie((function(e){return f.call(e,"*")})),g.scope=ie((function(){return l.querySelectorAll(":scope")})),g.cssHas=ie((function(){try{return l.querySelector(":has(*,:jqfake)"),!1}catch(e){return!0}})),g.getById?(t.filter.ID=function(e){var t=e.replace(X,Y);return function(e){return e.getAttribute("id")===t}},t.find.ID=function(e,t){if(void 0!==t.getElementById&&d){var i=t.getElementById(e);return i?[i]:[]}}):(t.filter.ID=function(e){var t=e.replace(X,Y);return function(e){var i=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return i&&i.value===t}},t.find.ID=function(e,t){if(void 0!==t.getElementById&&d){var i,n,r,o=t.getElementById(e);if(o){if((i=o.getAttributeNode("id"))&&i.value===e)return[o];for(r=t.getElementsByName(e),n=0;o=r[n++];)if((i=o.getAttributeNode("id"))&&i.value===e)return[o]}return[]}}),t.find.TAG=function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):t.querySelectorAll(e)},t.find.CLASS=function(e,t){if(void 0!==t.getElementsByClassName&&d)return t.getElementsByClassName(e)},h=[],ie((function(e){var t;c.appendChild(e).innerHTML="",e.querySelectorAll("[selected]").length||h.push("\\["+D+"*(?:value|"+E+")"),e.querySelectorAll("[id~="+v+"-]").length||h.push("~="),e.querySelectorAll("a#"+v+"+*").length||h.push(".#.+[+~]"),e.querySelectorAll(":checked").length||h.push(":checked"),(t=l.createElement("input")).setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),c.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&h.push(":enabled",":disabled"),(t=l.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||h.push("\\["+D+"*name"+D+"*="+D+"*(?:''|\"\")")})),g.cssHas||h.push(":has"),h=h.length&&new RegExp(h.join("|")),T=function(e,t){if(e===t)return s=!0,0;var i=!e.compareDocumentPosition-!t.compareDocumentPosition;return i||(1&(i=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!g.sortDetached&&t.compareDocumentPosition(e)===i?e===l||e.ownerDocument==O&&J.contains(O,e)?-1:t===l||t.ownerDocument==O&&J.contains(O,t)?1:r?u.call(r,e)-u.call(r,t):0:4&i?-1:1)},l):l}for(e in J.matches=function(e,t){return J(e,null,null,t)},J.matchesSelector=function(e,t){if(le(e),d&&!C[t+" "]&&(!h||!h.test(t)))try{var i=f.call(e,t);if(i||g.disconnectedMatch||e.document&&11!==e.document.nodeType)return i}catch(e){C(t,!0)}return J(t,l,null,[e]).length>0},J.contains=function(e,t){return(e.ownerDocument||e)!=l&&le(e),k.contains(e,t)},J.attr=function(e,i){(e.ownerDocument||e)!=l&&le(e);var n=t.attrHandle[i.toLowerCase()],r=n&&p.call(t.attrHandle,i.toLowerCase())?n(e,i,!d):void 0;return void 0!==r?r:e.getAttribute(i)},J.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},k.uniqueSort=function(e){var t,i=[],n=0,o=0;if(s=!g.sortStable,r=!g.sortStable&&a.call(e,0),P.call(e,T),s){for(;t=e[o++];)t===e[o]&&(n=i.push(o));for(;n--;)I.call(e,i[n],1)}return r=null,e},k.fn.uniqueSort=function(){return this.pushStack(k.uniqueSort(a.apply(this)))},t=k.expr={cacheLength:50,createPseudo:te,match:q,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(X,Y),e[3]=(e[3]||e[4]||e[5]||"").replace(X,Y),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||J.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&J.error(e[0]),e},PSEUDO:function(e){var t,i=!e[6]&&e[2];return q.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":i&&B.test(i)&&(t=ue(i,!0))&&(t=i.indexOf(")",i.length-t)-i.length)&&(e[0]=e[0].slice(0,t),e[2]=i.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(X,Y).toLowerCase();return"*"===e?function(){return!0}:function(e){return S(e,t)}},CLASS:function(e){var t=y[e+" "];return t||(t=new RegExp("(^|"+D+")"+e+"("+D+"|$)"))&&y(e,(function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")}))},ATTR:function(e,t,i){return function(n){var r=J.attr(n,e);return null==r?"!="===t:!t||(r+="","="===t?r===i:"!="===t?r!==i:"^="===t?i&&0===r.indexOf(i):"*="===t?i&&r.indexOf(i)>-1:"$="===t?i&&r.slice(-i.length)===i:"~="===t?(" "+r.replace(z," ")+" ").indexOf(i)>-1:"|="===t&&(r===i||r.slice(0,i.length+1)===i+"-"))}},CHILD:function(e,t,i,n,r){var o="nth"!==e.slice(0,3),s="last"!==e.slice(-4),a="of-type"===t;return 1===n&&0===r?function(e){return!!e.parentNode}:function(t,i,l){var c,u,d,h,p,f=o!==s?"nextSibling":"previousSibling",m=t.parentNode,g=a&&t.nodeName.toLowerCase(),b=!l&&!a,y=!1;if(m){if(o){for(;f;){for(d=t;d=d[f];)if(a?S(d,g):1===d.nodeType)return!1;p=f="only"===e&&!p&&"nextSibling"}return!0}if(p=[s?m.firstChild:m.lastChild],s&&b){for(y=(h=(c=(u=m[v]||(m[v]={}))[e]||[])[0]===_&&c[1])&&c[2],d=h&&m.childNodes[h];d=++h&&d&&d[f]||(y=h=0)||p.pop();)if(1===d.nodeType&&++y&&d===t){u[e]=[_,h,y];break}}else if(b&&(y=h=(c=(u=t[v]||(t[v]={}))[e]||[])[0]===_&&c[1]),!1===y)for(;(d=++h&&d&&d[f]||(y=h=0)||p.pop())&&(!(a?S(d,g):1===d.nodeType)||!++y||(b&&((u=d[v]||(d[v]={}))[e]=[_,y]),d!==t)););return(y-=r)===n||y%n==0&&y/n>=0}}},PSEUDO:function(e,i){var n,r=t.pseudos[e]||t.setFilters[e.toLowerCase()]||J.error("unsupported pseudo: "+e);return r[v]?r(i):r.length>1?(n=[e,e,"",i],t.setFilters.hasOwnProperty(e.toLowerCase())?te((function(e,t){for(var n,o=r(e,i),s=o.length;s--;)e[n=u.call(e,o[s])]=!(t[n]=o[s])})):function(e){return r(e,0,n)}):r}},pseudos:{not:te((function(e){var t=[],i=[],n=ve(e.replace(F,"$1"));return n[v]?te((function(e,t,i,r){for(var o,s=n(e,null,r,[]),a=e.length;a--;)(o=s[a])&&(e[a]=!(t[a]=o))})):function(e,r,o){return t[0]=e,n(t,null,o,i),t[0]=null,!i.pop()}})),has:te((function(e){return function(t){return J(e,t).length>0}})),contains:te((function(e){return e=e.replace(X,Y),function(t){return(t.textContent||k.text(t)).indexOf(e)>-1}})),lang:te((function(e){return H.test(e||"")||J.error("unsupported lang: "+e),e=e.replace(X,Y).toLowerCase(),function(t){var i;do{if(i=d?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(i=i.toLowerCase())===e||0===i.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}})),target:function(e){var t=n.location&&n.location.hash;return t&&t.slice(1)===e.id},root:function(e){return e===c},focus:function(e){return e===function(){try{return l.activeElement}catch(e){}}()&&l.hasFocus()&&!!(e.type||e.href||~e.tabIndex)},enabled:oe(!1),disabled:oe(!0),checked:function(e){return S(e,"input")&&!!e.checked||S(e,"option")&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!t.pseudos.empty(e)},header:function(e){return V.test(e.nodeName)},input:function(e){return W.test(e.nodeName)},button:function(e){return S(e,"input")&&"button"===e.type||S(e,"button")},text:function(e){var t;return S(e,"input")&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:se((function(){return[0]})),last:se((function(e,t){return[t-1]})),eq:se((function(e,t,i){return[i<0?i+t:i]})),even:se((function(e,t){for(var i=0;it?t:i;--n>=0;)e.push(n);return e})),gt:se((function(e,t,i){for(var n=i<0?i+t:i;++n1?function(t,i,n){for(var r=e.length;r--;)if(!e[r](t,i,n))return!1;return!0}:e[0]}function fe(e,t,i,n,r){for(var o,s=[],a=0,l=e.length,c=null!=t;a-1&&(o[c]=!(s[c]=h))}}else p=fe(p===s?p.splice(v,p.length):p),r?r(null,s,p,l):m.apply(s,p)}))}function ge(e){for(var n,r,o,s=e.length,a=t.relative[e[0].type],l=a||t.relative[" "],c=a?1:0,d=he((function(e){return e===n}),l,!0),h=he((function(e){return u.call(n,e)>-1}),l,!0),p=[function(e,t,r){var o=!a&&(r||t!=i)||((n=t).nodeType?d(e,t,r):h(e,t,r));return n=null,o}];c1&&pe(p),c>1&&de(e.slice(0,c-1).concat({value:" "===e[c-2].type?"*":""})).replace(F,"$1"),r,c0,o=e.length>0,s=function(s,a,c,u,h){var p,f,g,v=0,b="0",y=s&&[],w=[],x=i,C=s||o&&t.find.TAG("*",h),T=_+=null==x?1:Math.random()||.1,E=C.length;for(h&&(i=a==l||a||h);b!==E&&null!=(p=C[b]);b++){if(o&&p){for(f=0,a||p.ownerDocument==l||(le(p),c=!d);g=e[f++];)if(g(p,a||l,c)){m.call(u,p);break}h&&(_=T)}r&&((p=!g&&p)&&v--,s&&y.push(p))}if(v+=b,r&&b!==v){for(f=0;g=n[f++];)g(y,w,a,c);if(s){if(v>0)for(;b--;)y[b]||w[b]||(w[b]=A.call(u));w=fe(w)}m.apply(u,w),h&&!s&&w.length>0&&v+n.length>1&&k.uniqueSort(u)}return h&&(_=T,i=x),y};return r?te(s):s}(s,o)),a.selector=e}return a}function _e(e,i,n,r){var o,s,a,l,c,u="function"==typeof e&&e,h=!r&&ue(e=u.selector||e);if(n=n||[],1===h.length){if((s=h[0]=h[0].slice(0)).length>2&&"ID"===(a=s[0]).type&&9===i.nodeType&&d&&t.relative[s[1].type]){if(!(i=(t.find.ID(a.matches[0].replace(X,Y),i)||[])[0]))return n;u&&(i=i.parentNode),e=e.slice(s.shift().value.length)}for(o=q.needsContext.test(e)?0:s.length;o--&&(a=s[o],!t.relative[l=a.type]);)if((c=t.find[l])&&(r=c(a.matches[0].replace(X,Y),K.test(s[0].type)&&ae(i.parentNode)||i))){if(s.splice(o,1),!(e=r.length&&de(s)))return m.apply(n,r),n;break}}return(u||ve(e,h))(r,i,!d,n,!i||K.test(e)&&ae(i.parentNode)||i),n}ce.prototype=t.filters=t.pseudos,t.setFilters=new ce,g.sortStable=v.split("").sort(T).join("")===v,le(),g.sortDetached=ie((function(e){return 1&e.compareDocumentPosition(l.createElement("fieldset"))})),k.find=J,k.expr[":"]=k.expr.pseudos,k.unique=k.uniqueSort,J.compile=ve,J.select=_e,J.setDocument=le,J.tokenize=ue,J.escape=k.escapeSelector,J.getText=k.text,J.isXML=k.isXMLDoc,J.selectors=k.expr,J.support=k.support,J.uniqueSort=k.uniqueSort}();var $=function(e,t,i){for(var n=[],r=void 0!==i;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(r&&k(e).is(i))break;n.push(e)}return n},z=function(e,t){for(var i=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&i.push(e);return i},N=k.expr.match.needsContext,R=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function U(e,t,i){return v(t)?k.grep(e,(function(e,n){return!!t.call(e,n,e)!==i})):t.nodeType?k.grep(e,(function(e){return e===t!==i})):"string"!=typeof t?k.grep(e,(function(e){return u.call(t,e)>-1!==i})):k.filter(t,e,i)}k.filter=function(e,t,i){var n=t[0];return i&&(e=":not("+e+")"),1===t.length&&1===n.nodeType?k.find.matchesSelector(n,e)?[n]:[]:k.find.matches(e,k.grep(t,(function(e){return 1===e.nodeType})))},k.fn.extend({find:function(e){var t,i,n=this.length,r=this;if("string"!=typeof e)return this.pushStack(k(e).filter((function(){for(t=0;t1?k.uniqueSort(i):i},filter:function(e){return this.pushStack(U(this,e||[],!1))},not:function(e){return this.pushStack(U(this,e||[],!0))},is:function(e){return!!U(this,"string"==typeof e&&N.test(e)?k(e):e||[],!1).length}});var B,H=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(k.fn.init=function(e,t,i){var n,r;if(!e)return this;if(i=i||B,"string"==typeof e){if(!(n="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:H.exec(e))||!n[1]&&t)return!t||t.jquery?(t||i).find(e):this.constructor(t).find(e);if(n[1]){if(t=t instanceof k?t[0]:t,k.merge(this,k.parseHTML(n[1],t&&t.nodeType?t.ownerDocument||t:b,!0)),R.test(n[1])&&k.isPlainObject(t))for(n in t)v(this[n])?this[n](t[n]):this.attr(n,t[n]);return this}return(r=b.getElementById(n[2]))&&(this[0]=r,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):v(e)?void 0!==i.ready?i.ready(e):e(k):k.makeArray(e,this)}).prototype=k.fn,B=k(b);var q=/^(?:parents|prev(?:Until|All))/,W={children:!0,contents:!0,next:!0,prev:!0};function V(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}k.fn.extend({has:function(e){var t=k(e,this),i=t.length;return this.filter((function(){for(var e=0;e-1:1===i.nodeType&&k.find.matchesSelector(i,e))){o.push(i);break}return this.pushStack(o.length>1?k.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?u.call(k(e),this[0]):u.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(k.uniqueSort(k.merge(this.get(),k(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),k.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return $(e,"parentNode")},parentsUntil:function(e,t,i){return $(e,"parentNode",i)},next:function(e){return V(e,"nextSibling")},prev:function(e){return V(e,"previousSibling")},nextAll:function(e){return $(e,"nextSibling")},prevAll:function(e){return $(e,"previousSibling")},nextUntil:function(e,t,i){return $(e,"nextSibling",i)},prevUntil:function(e,t,i){return $(e,"previousSibling",i)},siblings:function(e){return z((e.parentNode||{}).firstChild,e)},children:function(e){return z(e.firstChild)},contents:function(e){return null!=e.contentDocument&&s(e.contentDocument)?e.contentDocument:(S(e,"template")&&(e=e.content||e),k.merge([],e.childNodes))}},(function(e,t){k.fn[e]=function(i,n){var r=k.map(this,t,i);return"Until"!==e.slice(-5)&&(n=i),n&&"string"==typeof n&&(r=k.filter(n,r)),this.length>1&&(W[e]||k.uniqueSort(r),q.test(e)&&r.reverse()),this.pushStack(r)}}));var Z=/[^\x20\t\r\n\f]+/g;function K(e){return e}function X(e){throw e}function Y(e,t,i,n){var r;try{e&&v(r=e.promise)?r.call(e).done(t).fail(i):e&&v(r=e.then)?r.call(e,t,i):t.apply(void 0,[e].slice(n))}catch(e){i.apply(void 0,[e])}}k.Callbacks=function(e){e="string"==typeof e?function(e){var t={};return k.each(e.match(Z)||[],(function(e,i){t[i]=!0})),t}(e):k.extend({},e);var t,i,n,r,o=[],s=[],a=-1,l=function(){for(r=r||e.once,n=t=!0;s.length;a=-1)for(i=s.shift();++a-1;)o.splice(i,1),i<=a&&a--})),this},has:function(e){return e?k.inArray(e,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return r=s=[],o=i="",this},disabled:function(){return!o},lock:function(){return r=s=[],i||t||(o=i=""),this},locked:function(){return!!r},fireWith:function(e,i){return r||(i=[e,(i=i||[]).slice?i.slice():i],s.push(i),t||l()),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!n}};return c},k.extend({Deferred:function(e){var t=[["notify","progress",k.Callbacks("memory"),k.Callbacks("memory"),2],["resolve","done",k.Callbacks("once memory"),k.Callbacks("once memory"),0,"resolved"],["reject","fail",k.Callbacks("once memory"),k.Callbacks("once memory"),1,"rejected"]],i="pending",r={state:function(){return i},always:function(){return o.done(arguments).fail(arguments),this},catch:function(e){return r.then(null,e)},pipe:function(){var e=arguments;return k.Deferred((function(i){k.each(t,(function(t,n){var r=v(e[n[4]])&&e[n[4]];o[n[1]]((function(){var e=r&&r.apply(this,arguments);e&&v(e.promise)?e.promise().progress(i.notify).done(i.resolve).fail(i.reject):i[n[0]+"With"](this,r?[e]:arguments)}))})),e=null})).promise()},then:function(e,i,r){var o=0;function s(e,t,i,r){return function(){var a=this,l=arguments,c=function(){var n,c;if(!(e=o&&(i!==X&&(a=void 0,l=[n]),t.rejectWith(a,l))}};e?u():(k.Deferred.getErrorHook?u.error=k.Deferred.getErrorHook():k.Deferred.getStackHook&&(u.error=k.Deferred.getStackHook()),n.setTimeout(u))}}return k.Deferred((function(n){t[0][3].add(s(0,n,v(r)?r:K,n.notifyWith)),t[1][3].add(s(0,n,v(e)?e:K)),t[2][3].add(s(0,n,v(i)?i:X))})).promise()},promise:function(e){return null!=e?k.extend(e,r):r}},o={};return k.each(t,(function(e,n){var s=n[2],a=n[5];r[n[1]]=s.add,a&&s.add((function(){i=a}),t[3-e][2].disable,t[3-e][3].disable,t[0][2].lock,t[0][3].lock),s.add(n[3].fire),o[n[0]]=function(){return o[n[0]+"With"](this===o?void 0:this,arguments),this},o[n[0]+"With"]=s.fireWith})),r.promise(o),e&&e.call(o,o),o},when:function(e){var t=arguments.length,i=t,n=Array(i),r=a.call(arguments),o=k.Deferred(),s=function(e){return function(i){n[e]=this,r[e]=arguments.length>1?a.call(arguments):i,--t||o.resolveWith(n,r)}};if(t<=1&&(Y(e,o.done(s(i)).resolve,o.reject,!t),"pending"===o.state()||v(r[i]&&r[i].then)))return o.then();for(;i--;)Y(r[i],s(i),o.reject);return o.promise()}});var Q=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;k.Deferred.exceptionHook=function(e,t){n.console&&n.console.warn&&e&&Q.test(e.name)&&n.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},k.readyException=function(e){n.setTimeout((function(){throw e}))};var G=k.Deferred();function J(){b.removeEventListener("DOMContentLoaded",J),n.removeEventListener("load",J),k.ready()}k.fn.ready=function(e){return G.then(e).catch((function(e){k.readyException(e)})),this},k.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--k.readyWait:k.isReady)||(k.isReady=!0,!0!==e&&--k.readyWait>0||G.resolveWith(b,[k]))}}),k.ready.then=G.then,"complete"===b.readyState||"loading"!==b.readyState&&!b.documentElement.doScroll?n.setTimeout(k.ready):(b.addEventListener("DOMContentLoaded",J),n.addEventListener("load",J));var ee=function(e,t,i,n,r,o,s){var a=0,l=e.length,c=null==i;if("object"===x(i))for(a in r=!0,i)ee(e,t,a,i[a],!0,o,s);else if(void 0!==n&&(r=!0,v(n)||(s=!0),c&&(s?(t.call(e,n),t=null):(c=t,t=function(e,t,i){return c.call(k(e),i)})),t))for(;a1,null,!0)},removeData:function(e){return this.each((function(){le.remove(this,e)}))}}),k.extend({queue:function(e,t,i){var n;if(e)return t=(t||"fx")+"queue",n=ae.get(e,t),i&&(!n||Array.isArray(i)?n=ae.access(e,t,k.makeArray(i)):n.push(i)),n||[]},dequeue:function(e,t){t=t||"fx";var i=k.queue(e,t),n=i.length,r=i.shift(),o=k._queueHooks(e,t);"inprogress"===r&&(r=i.shift(),n--),r&&("fx"===t&&i.unshift("inprogress"),delete o.stop,r.call(e,(function(){k.dequeue(e,t)}),o)),!n&&o&&o.empty.fire()},_queueHooks:function(e,t){var i=t+"queueHooks";return ae.get(e,i)||ae.access(e,i,{empty:k.Callbacks("once memory").add((function(){ae.remove(e,[t+"queue",i])}))})}}),k.fn.extend({queue:function(e,t){var i=2;return"string"!=typeof e&&(t=e,e="fx",i--),arguments.length\x20\t\r\n\f]*)/i,Se=/^$|^module$|\/(?:java|ecma)script/i;Ce=b.createDocumentFragment().appendChild(b.createElement("div")),(Te=b.createElement("input")).setAttribute("type","radio"),Te.setAttribute("checked","checked"),Te.setAttribute("name","t"),Ce.appendChild(Te),g.checkClone=Ce.cloneNode(!0).cloneNode(!0).lastChild.checked,Ce.innerHTML="",g.noCloneChecked=!!Ce.cloneNode(!0).lastChild.defaultValue,Ce.innerHTML="",g.option=!!Ce.lastChild;var Ae={thead:[1,"","
    "],col:[2,"","
    "],tr:[2,"","
    "],td:[3,"","
    "],_default:[0,"",""]};function Pe(e,t){var i;return i=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&S(e,t)?k.merge([e],i):i}function Ie(e,t){for(var i=0,n=e.length;i",""]);var De=/<|&#?\w+;/;function Fe(e,t,i,n,r){for(var o,s,a,l,c,u,d=t.createDocumentFragment(),h=[],p=0,f=e.length;p-1)r&&r.push(o);else if(c=ge(o),s=Pe(d.appendChild(o),"script"),c&&Ie(s),i)for(u=0;o=s[u++];)Se.test(o.type||"")&&i.push(o);return d}var Le=/^([^.]*)(?:\.(.+)|)/;function Me(){return!0}function Oe(){return!1}function je(e,t,i,n,r,o){var s,a;if("object"==typeof t){for(a in"string"!=typeof i&&(n=n||i,i=void 0),t)je(e,a,i,n,t[a],o);return e}if(null==n&&null==r?(r=i,n=i=void 0):null==r&&("string"==typeof i?(r=n,n=void 0):(r=n,n=i,i=void 0)),!1===r)r=Oe;else if(!r)return e;return 1===o&&(s=r,r=function(e){return k().off(e),s.apply(this,arguments)},r.guid=s.guid||(s.guid=k.guid++)),e.each((function(){k.event.add(this,t,r,n,i)}))}function $e(e,t,i){i?(ae.set(e,t,!1),k.event.add(e,t,{namespace:!1,handler:function(e){var i,n=ae.get(this,t);if(1&e.isTrigger&&this[t]){if(n)(k.event.special[t]||{}).delegateType&&e.stopPropagation();else if(n=a.call(arguments),ae.set(this,t,n),this[t](),i=ae.get(this,t),ae.set(this,t,!1),n!==i)return e.stopImmediatePropagation(),e.preventDefault(),i}else n&&(ae.set(this,t,k.event.trigger(n[0],n.slice(1),this)),e.stopPropagation(),e.isImmediatePropagationStopped=Me)}})):void 0===ae.get(e,t)&&k.event.add(e,t,Me)}k.event={global:{},add:function(e,t,i,n,r){var o,s,a,l,c,u,d,h,p,f,m,g=ae.get(e);if(oe(e))for(i.handler&&(i=(o=i).handler,r=o.selector),r&&k.find.matchesSelector(me,r),i.guid||(i.guid=k.guid++),(l=g.events)||(l=g.events=Object.create(null)),(s=g.handle)||(s=g.handle=function(t){return void 0!==k&&k.event.triggered!==t.type?k.event.dispatch.apply(e,arguments):void 0}),c=(t=(t||"").match(Z)||[""]).length;c--;)p=m=(a=Le.exec(t[c])||[])[1],f=(a[2]||"").split(".").sort(),p&&(d=k.event.special[p]||{},p=(r?d.delegateType:d.bindType)||p,d=k.event.special[p]||{},u=k.extend({type:p,origType:m,data:n,handler:i,guid:i.guid,selector:r,needsContext:r&&k.expr.match.needsContext.test(r),namespace:f.join(".")},o),(h=l[p])||((h=l[p]=[]).delegateCount=0,d.setup&&!1!==d.setup.call(e,n,f,s)||e.addEventListener&&e.addEventListener(p,s)),d.add&&(d.add.call(e,u),u.handler.guid||(u.handler.guid=i.guid)),r?h.splice(h.delegateCount++,0,u):h.push(u),k.event.global[p]=!0)},remove:function(e,t,i,n,r){var o,s,a,l,c,u,d,h,p,f,m,g=ae.hasData(e)&&ae.get(e);if(g&&(l=g.events)){for(c=(t=(t||"").match(Z)||[""]).length;c--;)if(p=m=(a=Le.exec(t[c])||[])[1],f=(a[2]||"").split(".").sort(),p){for(d=k.event.special[p]||{},h=l[p=(n?d.delegateType:d.bindType)||p]||[],a=a[2]&&new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"),s=o=h.length;o--;)u=h[o],!r&&m!==u.origType||i&&i.guid!==u.guid||a&&!a.test(u.namespace)||n&&n!==u.selector&&("**"!==n||!u.selector)||(h.splice(o,1),u.selector&&h.delegateCount--,d.remove&&d.remove.call(e,u));s&&!h.length&&(d.teardown&&!1!==d.teardown.call(e,f,g.handle)||k.removeEvent(e,p,g.handle),delete l[p])}else for(p in l)k.event.remove(e,p+t[c],i,n,!0);k.isEmptyObject(l)&&ae.remove(e,"handle events")}},dispatch:function(e){var t,i,n,r,o,s,a=new Array(arguments.length),l=k.event.fix(e),c=(ae.get(this,"events")||Object.create(null))[l.type]||[],u=k.event.special[l.type]||{};for(a[0]=l,t=1;t=1))for(;c!==this;c=c.parentNode||this)if(1===c.nodeType&&("click"!==e.type||!0!==c.disabled)){for(o=[],s={},i=0;i-1:k.find(r,this,null,[c]).length),s[r]&&o.push(n);o.length&&a.push({elem:c,handlers:o})}return c=this,l\s*$/g;function Ue(e,t){return S(e,"table")&&S(11!==t.nodeType?t:t.firstChild,"tr")&&k(e).children("tbody")[0]||e}function Be(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function He(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function qe(e,t){var i,n,r,o,s,a;if(1===t.nodeType){if(ae.hasData(e)&&(a=ae.get(e).events))for(r in ae.remove(t,"handle events"),a)for(i=0,n=a[r].length;i1&&"string"==typeof f&&!g.checkClone&&Ne.test(f))return e.each((function(r){var o=e.eq(r);m&&(t[0]=f.call(this,r,o.html())),Ve(o,t,i,n)}));if(h&&(o=(r=Fe(t,e[0].ownerDocument,!1,e,n)).firstChild,1===r.childNodes.length&&(r=o),o||n)){for(a=(s=k.map(Pe(r,"script"),Be)).length;d0&&Ie(s,!l&&Pe(e,"script")),a},cleanData:function(e){for(var t,i,n,r=k.event.special,o=0;void 0!==(i=e[o]);o++)if(oe(i)){if(t=i[ae.expando]){if(t.events)for(n in t.events)r[n]?k.event.remove(i,n):k.removeEvent(i,n,t.handle);i[ae.expando]=void 0}i[le.expando]&&(i[le.expando]=void 0)}}}),k.fn.extend({detach:function(e){return Ze(this,e,!0)},remove:function(e){return Ze(this,e)},text:function(e){return ee(this,(function(e){return void 0===e?k.text(this):this.empty().each((function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)}))}),null,e,arguments.length)},append:function(){return Ve(this,arguments,(function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Ue(this,e).appendChild(e)}))},prepend:function(){return Ve(this,arguments,(function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Ue(this,e);t.insertBefore(e,t.firstChild)}}))},before:function(){return Ve(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this)}))},after:function(){return Ve(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)}))},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(k.cleanData(Pe(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map((function(){return k.clone(this,e,t)}))},html:function(e){return ee(this,(function(e){var t=this[0]||{},i=0,n=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!ze.test(e)&&!Ae[(Ee.exec(e)||["",""])[1].toLowerCase()]){e=k.htmlPrefilter(e);try{for(;i=0&&(l+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-l-a-.5))||0),l+c}function ut(e,t,i){var n=Ye(e),r=(!g.boxSizingReliable()||i)&&"border-box"===k.css(e,"boxSizing",!1,n),o=r,s=Je(e,t,n),a="offset"+t[0].toUpperCase()+t.slice(1);if(Ke.test(s)){if(!i)return s;s="auto"}return(!g.boxSizingReliable()&&r||!g.reliableTrDimensions()&&S(e,"tr")||"auto"===s||!parseFloat(s)&&"inline"===k.css(e,"display",!1,n))&&e.getClientRects().length&&(r="border-box"===k.css(e,"boxSizing",!1,n),(o=a in e)&&(s=e[a])),(s=parseFloat(s)||0)+ct(e,t,i||(r?"border":"content"),o,n,s)+"px"}function dt(e,t,i,n,r){return new dt.prototype.init(e,t,i,n,r)}k.extend({cssHooks:{opacity:{get:function(e,t){if(t){var i=Je(e,"opacity");return""===i?"1":i}}}},cssNumber:{animationIterationCount:!0,aspectRatio:!0,borderImageSlice:!0,columnCount:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,scale:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeMiterlimit:!0,strokeOpacity:!0},cssProps:{},style:function(e,t,i,n){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var r,o,s,a=re(t),l=Xe.test(t),c=e.style;if(l||(t=rt(a)),s=k.cssHooks[t]||k.cssHooks[a],void 0===i)return s&&"get"in s&&void 0!==(r=s.get(e,!1,n))?r:c[t];"string"===(o=typeof i)&&(r=pe.exec(i))&&r[1]&&(i=be(e,t,r),o="number"),null!=i&&i==i&&("number"!==o||l||(i+=r&&r[3]||(k.cssNumber[a]?"":"px")),g.clearCloneStyle||""!==i||0!==t.indexOf("background")||(c[t]="inherit"),s&&"set"in s&&void 0===(i=s.set(e,i,n))||(l?c.setProperty(t,i):c[t]=i))}},css:function(e,t,i,n){var r,o,s,a=re(t);return Xe.test(t)||(t=rt(a)),(s=k.cssHooks[t]||k.cssHooks[a])&&"get"in s&&(r=s.get(e,!0,i)),void 0===r&&(r=Je(e,t,n)),"normal"===r&&t in at&&(r=at[t]),""===i||i?(o=parseFloat(r),!0===i||isFinite(o)?o||0:r):r}}),k.each(["height","width"],(function(e,t){k.cssHooks[t]={get:function(e,i,n){if(i)return!ot.test(k.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?ut(e,t,n):Qe(e,st,(function(){return ut(e,t,n)}))},set:function(e,i,n){var r,o=Ye(e),s=!g.scrollboxSize()&&"absolute"===o.position,a=(s||n)&&"border-box"===k.css(e,"boxSizing",!1,o),l=n?ct(e,t,n,a,o):0;return a&&s&&(l-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(o[t])-ct(e,t,"border",!1,o)-.5)),l&&(r=pe.exec(i))&&"px"!==(r[3]||"px")&&(e.style[t]=i,i=k.css(e,t)),lt(0,i,l)}}})),k.cssHooks.marginLeft=et(g.reliableMarginLeft,(function(e,t){if(t)return(parseFloat(Je(e,"marginLeft"))||e.getBoundingClientRect().left-Qe(e,{marginLeft:0},(function(){return e.getBoundingClientRect().left})))+"px"})),k.each({margin:"",padding:"",border:"Width"},(function(e,t){k.cssHooks[e+t]={expand:function(i){for(var n=0,r={},o="string"==typeof i?i.split(" "):[i];n<4;n++)r[e+fe[n]+t]=o[n]||o[n-2]||o[0];return r}},"margin"!==e&&(k.cssHooks[e+t].set=lt)})),k.fn.extend({css:function(e,t){return ee(this,(function(e,t,i){var n,r,o={},s=0;if(Array.isArray(t)){for(n=Ye(e),r=t.length;s1)}}),k.Tween=dt,dt.prototype={constructor:dt,init:function(e,t,i,n,r,o){this.elem=e,this.prop=i,this.easing=r||k.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=n,this.unit=o||(k.cssNumber[i]?"":"px")},cur:function(){var e=dt.propHooks[this.prop];return e&&e.get?e.get(this):dt.propHooks._default.get(this)},run:function(e){var t,i=dt.propHooks[this.prop];return this.options.duration?this.pos=t=k.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),i&&i.set?i.set(this):dt.propHooks._default.set(this),this}},dt.prototype.init.prototype=dt.prototype,dt.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=k.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){k.fx.step[e.prop]?k.fx.step[e.prop](e):1!==e.elem.nodeType||!k.cssHooks[e.prop]&&null==e.elem.style[rt(e.prop)]?e.elem[e.prop]=e.now:k.style(e.elem,e.prop,e.now+e.unit)}}},dt.propHooks.scrollTop=dt.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},k.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},k.fx=dt.prototype.init,k.fx.step={};var ht,pt,ft=/^(?:toggle|show|hide)$/,mt=/queueHooks$/;function gt(){pt&&(!1===b.hidden&&n.requestAnimationFrame?n.requestAnimationFrame(gt):n.setTimeout(gt,k.fx.interval),k.fx.tick())}function vt(){return n.setTimeout((function(){ht=void 0})),ht=Date.now()}function _t(e,t){var i,n=0,r={height:e};for(t=t?1:0;n<4;n+=2-t)r["margin"+(i=fe[n])]=r["padding"+i]=e;return t&&(r.opacity=r.width=e),r}function bt(e,t,i){for(var n,r=(yt.tweeners[t]||[]).concat(yt.tweeners["*"]),o=0,s=r.length;o1)},removeAttr:function(e){return this.each((function(){k.removeAttr(this,e)}))}}),k.extend({attr:function(e,t,i){var n,r,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===e.getAttribute?k.prop(e,t,i):(1===o&&k.isXMLDoc(e)||(r=k.attrHooks[t.toLowerCase()]||(k.expr.match.bool.test(t)?wt:void 0)),void 0!==i?null===i?void k.removeAttr(e,t):r&&"set"in r&&void 0!==(n=r.set(e,i,t))?n:(e.setAttribute(t,i+""),i):r&&"get"in r&&null!==(n=r.get(e,t))?n:null==(n=k.find.attr(e,t))?void 0:n)},attrHooks:{type:{set:function(e,t){if(!g.radioValue&&"radio"===t&&S(e,"input")){var i=e.value;return e.setAttribute("type",t),i&&(e.value=i),t}}}},removeAttr:function(e,t){var i,n=0,r=t&&t.match(Z);if(r&&1===e.nodeType)for(;i=r[n++];)e.removeAttribute(i)}}),wt={set:function(e,t,i){return!1===t?k.removeAttr(e,i):e.setAttribute(i,i),i}},k.each(k.expr.match.bool.source.match(/\w+/g),(function(e,t){var i=xt[t]||k.find.attr;xt[t]=function(e,t,n){var r,o,s=t.toLowerCase();return n||(o=xt[s],xt[s]=r,r=null!=i(e,t,n)?s:null,xt[s]=o),r}}));var Ct=/^(?:input|select|textarea|button)$/i,Tt=/^(?:a|area)$/i;function kt(e){return(e.match(Z)||[]).join(" ")}function Et(e){return e.getAttribute&&e.getAttribute("class")||""}function St(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(Z)||[]}k.fn.extend({prop:function(e,t){return ee(this,k.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each((function(){delete this[k.propFix[e]||e]}))}}),k.extend({prop:function(e,t,i){var n,r,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&k.isXMLDoc(e)||(t=k.propFix[t]||t,r=k.propHooks[t]),void 0!==i?r&&"set"in r&&void 0!==(n=r.set(e,i,t))?n:e[t]=i:r&&"get"in r&&null!==(n=r.get(e,t))?n:e[t]},propHooks:{tabIndex:{get:function(e){var t=k.find.attr(e,"tabindex");return t?parseInt(t,10):Ct.test(e.nodeName)||Tt.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),g.optSelected||(k.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),k.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){k.propFix[this.toLowerCase()]=this})),k.fn.extend({addClass:function(e){var t,i,n,r,o,s;return v(e)?this.each((function(t){k(this).addClass(e.call(this,t,Et(this)))})):(t=St(e)).length?this.each((function(){if(n=Et(this),i=1===this.nodeType&&" "+kt(n)+" "){for(o=0;o-1;)i=i.replace(" "+r+" "," ");s=kt(i),n!==s&&this.setAttribute("class",s)}})):this:this.attr("class","")},toggleClass:function(e,t){var i,n,r,o,s=typeof e,a="string"===s||Array.isArray(e);return v(e)?this.each((function(i){k(this).toggleClass(e.call(this,i,Et(this),t),t)})):"boolean"==typeof t&&a?t?this.addClass(e):this.removeClass(e):(i=St(e),this.each((function(){if(a)for(o=k(this),r=0;r-1)return!0;return!1}});var At=/\r/g;k.fn.extend({val:function(e){var t,i,n,r=this[0];return arguments.length?(n=v(e),this.each((function(i){var r;1===this.nodeType&&(null==(r=n?e.call(this,i,k(this).val()):e)?r="":"number"==typeof r?r+="":Array.isArray(r)&&(r=k.map(r,(function(e){return null==e?"":e+""}))),(t=k.valHooks[this.type]||k.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,r,"value")||(this.value=r))}))):r?(t=k.valHooks[r.type]||k.valHooks[r.nodeName.toLowerCase()])&&"get"in t&&void 0!==(i=t.get(r,"value"))?i:"string"==typeof(i=r.value)?i.replace(At,""):null==i?"":i:void 0}}),k.extend({valHooks:{option:{get:function(e){var t=k.find.attr(e,"value");return null!=t?t:kt(k.text(e))}},select:{get:function(e){var t,i,n,r=e.options,o=e.selectedIndex,s="select-one"===e.type,a=s?null:[],l=s?o+1:r.length;for(n=o<0?l:s?o:0;n-1)&&(i=!0);return i||(e.selectedIndex=-1),o}}}}),k.each(["radio","checkbox"],(function(){k.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=k.inArray(k(e).val(),t)>-1}},g.checkOn||(k.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}));var Pt=n.location,It={guid:Date.now()},Dt=/\?/;k.parseXML=function(e){var t,i;if(!e||"string"!=typeof e)return null;try{t=(new n.DOMParser).parseFromString(e,"text/xml")}catch(e){}return i=t&&t.getElementsByTagName("parsererror")[0],t&&!i||k.error("Invalid XML: "+(i?k.map(i.childNodes,(function(e){return e.textContent})).join("\n"):e)),t};var Ft=/^(?:focusinfocus|focusoutblur)$/,Lt=function(e){e.stopPropagation()};k.extend(k.event,{trigger:function(e,t,i,r){var o,s,a,l,c,u,d,h,f=[i||b],m=p.call(e,"type")?e.type:e,g=p.call(e,"namespace")?e.namespace.split("."):[];if(s=h=a=i=i||b,3!==i.nodeType&&8!==i.nodeType&&!Ft.test(m+k.event.triggered)&&(m.indexOf(".")>-1&&(g=m.split("."),m=g.shift(),g.sort()),c=m.indexOf(":")<0&&"on"+m,(e=e[k.expando]?e:new k.Event(m,"object"==typeof e&&e)).isTrigger=r?2:3,e.namespace=g.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+g.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=i),t=null==t?[e]:k.makeArray(t,[e]),d=k.event.special[m]||{},r||!d.trigger||!1!==d.trigger.apply(i,t))){if(!r&&!d.noBubble&&!_(i)){for(l=d.delegateType||m,Ft.test(l+m)||(s=s.parentNode);s;s=s.parentNode)f.push(s),a=s;a===(i.ownerDocument||b)&&f.push(a.defaultView||a.parentWindow||n)}for(o=0;(s=f[o++])&&!e.isPropagationStopped();)h=s,e.type=o>1?l:d.bindType||m,(u=(ae.get(s,"events")||Object.create(null))[e.type]&&ae.get(s,"handle"))&&u.apply(s,t),(u=c&&s[c])&&u.apply&&oe(s)&&(e.result=u.apply(s,t),!1===e.result&&e.preventDefault());return e.type=m,r||e.isDefaultPrevented()||d._default&&!1!==d._default.apply(f.pop(),t)||!oe(i)||c&&v(i[m])&&!_(i)&&((a=i[c])&&(i[c]=null),k.event.triggered=m,e.isPropagationStopped()&&h.addEventListener(m,Lt),i[m](),e.isPropagationStopped()&&h.removeEventListener(m,Lt),k.event.triggered=void 0,a&&(i[c]=a)),e.result}},simulate:function(e,t,i){var n=k.extend(new k.Event,i,{type:e,isSimulated:!0});k.event.trigger(n,null,t)}}),k.fn.extend({trigger:function(e,t){return this.each((function(){k.event.trigger(e,t,this)}))},triggerHandler:function(e,t){var i=this[0];if(i)return k.event.trigger(e,t,i,!0)}});var Mt=/\[\]$/,Ot=/\r?\n/g,jt=/^(?:submit|button|image|reset|file)$/i,$t=/^(?:input|select|textarea|keygen)/i;function zt(e,t,i,n){var r;if(Array.isArray(t))k.each(t,(function(t,r){i||Mt.test(e)?n(e,r):zt(e+"["+("object"==typeof r&&null!=r?t:"")+"]",r,i,n)}));else if(i||"object"!==x(t))n(e,t);else for(r in t)zt(e+"["+r+"]",t[r],i,n)}k.param=function(e,t){var i,n=[],r=function(e,t){var i=v(t)?t():t;n[n.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==i?"":i)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!k.isPlainObject(e))k.each(e,(function(){r(this.name,this.value)}));else for(i in e)zt(i,e[i],t,r);return n.join("&")},k.fn.extend({serialize:function(){return k.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var e=k.prop(this,"elements");return e?k.makeArray(e):this})).filter((function(){var e=this.type;return this.name&&!k(this).is(":disabled")&&$t.test(this.nodeName)&&!jt.test(e)&&(this.checked||!ke.test(e))})).map((function(e,t){var i=k(this).val();return null==i?null:Array.isArray(i)?k.map(i,(function(e){return{name:t.name,value:e.replace(Ot,"\r\n")}})):{name:t.name,value:i.replace(Ot,"\r\n")}})).get()}});var Nt=/%20/g,Rt=/#.*$/,Ut=/([?&])_=[^&]*/,Bt=/^(.*?):[ \t]*([^\r\n]*)$/gm,Ht=/^(?:GET|HEAD)$/,qt=/^\/\//,Wt={},Vt={},Zt="*/".concat("*"),Kt=b.createElement("a");function Xt(e){return function(t,i){"string"!=typeof t&&(i=t,t="*");var n,r=0,o=t.toLowerCase().match(Z)||[];if(v(i))for(;n=o[r++];)"+"===n[0]?(n=n.slice(1)||"*",(e[n]=e[n]||[]).unshift(i)):(e[n]=e[n]||[]).push(i)}}function Yt(e,t,i,n){var r={},o=e===Vt;function s(a){var l;return r[a]=!0,k.each(e[a]||[],(function(e,a){var c=a(t,i,n);return"string"!=typeof c||o||r[c]?o?!(l=c):void 0:(t.dataTypes.unshift(c),s(c),!1)})),l}return s(t.dataTypes[0])||!r["*"]&&s("*")}function Qt(e,t){var i,n,r=k.ajaxSettings.flatOptions||{};for(i in t)void 0!==t[i]&&((r[i]?e:n||(n={}))[i]=t[i]);return n&&k.extend(!0,e,n),e}Kt.href=Pt.href,k.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Pt.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(Pt.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Zt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":k.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Qt(Qt(e,k.ajaxSettings),t):Qt(k.ajaxSettings,e)},ajaxPrefilter:Xt(Wt),ajaxTransport:Xt(Vt),ajax:function(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var i,r,o,s,a,l,c,u,d,h,p=k.ajaxSetup({},t),f=p.context||p,m=p.context&&(f.nodeType||f.jquery)?k(f):k.event,g=k.Deferred(),v=k.Callbacks("once memory"),_=p.statusCode||{},y={},w={},x="canceled",C={readyState:0,getResponseHeader:function(e){var t;if(c){if(!s)for(s={};t=Bt.exec(o);)s[t[1].toLowerCase()+" "]=(s[t[1].toLowerCase()+" "]||[]).concat(t[2]);t=s[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return c?o:null},setRequestHeader:function(e,t){return null==c&&(e=w[e.toLowerCase()]=w[e.toLowerCase()]||e,y[e]=t),this},overrideMimeType:function(e){return null==c&&(p.mimeType=e),this},statusCode:function(e){var t;if(e)if(c)C.always(e[C.status]);else for(t in e)_[t]=[_[t],e[t]];return this},abort:function(e){var t=e||x;return i&&i.abort(t),T(0,t),this}};if(g.promise(C),p.url=((e||p.url||Pt.href)+"").replace(qt,Pt.protocol+"//"),p.type=t.method||t.type||p.method||p.type,p.dataTypes=(p.dataType||"*").toLowerCase().match(Z)||[""],null==p.crossDomain){l=b.createElement("a");try{l.href=p.url,l.href=l.href,p.crossDomain=Kt.protocol+"//"+Kt.host!=l.protocol+"//"+l.host}catch(e){p.crossDomain=!0}}if(p.data&&p.processData&&"string"!=typeof p.data&&(p.data=k.param(p.data,p.traditional)),Yt(Wt,p,t,C),c)return C;for(d in(u=k.event&&p.global)&&0==k.active++&&k.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!Ht.test(p.type),r=p.url.replace(Rt,""),p.hasContent?p.data&&p.processData&&0===(p.contentType||"").indexOf("application/x-www-form-urlencoded")&&(p.data=p.data.replace(Nt,"+")):(h=p.url.slice(r.length),p.data&&(p.processData||"string"==typeof p.data)&&(r+=(Dt.test(r)?"&":"?")+p.data,delete p.data),!1===p.cache&&(r=r.replace(Ut,"$1"),h=(Dt.test(r)?"&":"?")+"_="+It.guid+++h),p.url=r+h),p.ifModified&&(k.lastModified[r]&&C.setRequestHeader("If-Modified-Since",k.lastModified[r]),k.etag[r]&&C.setRequestHeader("If-None-Match",k.etag[r])),(p.data&&p.hasContent&&!1!==p.contentType||t.contentType)&&C.setRequestHeader("Content-Type",p.contentType),C.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+Zt+"; q=0.01":""):p.accepts["*"]),p.headers)C.setRequestHeader(d,p.headers[d]);if(p.beforeSend&&(!1===p.beforeSend.call(f,C,p)||c))return C.abort();if(x="abort",v.add(p.complete),C.done(p.success),C.fail(p.error),i=Yt(Vt,p,t,C)){if(C.readyState=1,u&&m.trigger("ajaxSend",[C,p]),c)return C;p.async&&p.timeout>0&&(a=n.setTimeout((function(){C.abort("timeout")}),p.timeout));try{c=!1,i.send(y,T)}catch(e){if(c)throw e;T(-1,e)}}else T(-1,"No Transport");function T(e,t,s,l){var d,h,b,y,w,x=t;c||(c=!0,a&&n.clearTimeout(a),i=void 0,o=l||"",C.readyState=e>0?4:0,d=e>=200&&e<300||304===e,s&&(y=function(e,t,i){for(var n,r,o,s,a=e.contents,l=e.dataTypes;"*"===l[0];)l.shift(),void 0===n&&(n=e.mimeType||t.getResponseHeader("Content-Type"));if(n)for(r in a)if(a[r]&&a[r].test(n)){l.unshift(r);break}if(l[0]in i)o=l[0];else{for(r in i){if(!l[0]||e.converters[r+" "+l[0]]){o=r;break}s||(s=r)}o=o||s}if(o)return o!==l[0]&&l.unshift(o),i[o]}(p,C,s)),!d&&k.inArray("script",p.dataTypes)>-1&&k.inArray("json",p.dataTypes)<0&&(p.converters["text script"]=function(){}),y=function(e,t,i,n){var r,o,s,a,l,c={},u=e.dataTypes.slice();if(u[1])for(s in e.converters)c[s.toLowerCase()]=e.converters[s];for(o=u.shift();o;)if(e.responseFields[o]&&(i[e.responseFields[o]]=t),!l&&n&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=o,o=u.shift())if("*"===o)o=l;else if("*"!==l&&l!==o){if(!(s=c[l+" "+o]||c["* "+o]))for(r in c)if((a=r.split(" "))[1]===o&&(s=c[l+" "+a[0]]||c["* "+a[0]])){!0===s?s=c[r]:!0!==c[r]&&(o=a[0],u.unshift(a[1]));break}if(!0!==s)if(s&&e.throws)t=s(t);else try{t=s(t)}catch(e){return{state:"parsererror",error:s?e:"No conversion from "+l+" to "+o}}}return{state:"success",data:t}}(p,y,C,d),d?(p.ifModified&&((w=C.getResponseHeader("Last-Modified"))&&(k.lastModified[r]=w),(w=C.getResponseHeader("etag"))&&(k.etag[r]=w)),204===e||"HEAD"===p.type?x="nocontent":304===e?x="notmodified":(x=y.state,h=y.data,d=!(b=y.error))):(b=x,!e&&x||(x="error",e<0&&(e=0))),C.status=e,C.statusText=(t||x)+"",d?g.resolveWith(f,[h,x,C]):g.rejectWith(f,[C,x,b]),C.statusCode(_),_=void 0,u&&m.trigger(d?"ajaxSuccess":"ajaxError",[C,p,d?h:b]),v.fireWith(f,[C,x]),u&&(m.trigger("ajaxComplete",[C,p]),--k.active||k.event.trigger("ajaxStop")))}return C},getJSON:function(e,t,i){return k.get(e,t,i,"json")},getScript:function(e,t){return k.get(e,void 0,t,"script")}}),k.each(["get","post"],(function(e,t){k[t]=function(e,i,n,r){return v(i)&&(r=r||n,n=i,i=void 0),k.ajax(k.extend({url:e,type:t,dataType:r,data:i,success:n},k.isPlainObject(e)&&e))}})),k.ajaxPrefilter((function(e){var t;for(t in e.headers)"content-type"===t.toLowerCase()&&(e.contentType=e.headers[t]||"")})),k._evalUrl=function(e,t,i){return k.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(e){k.globalEval(e,t,i)}})},k.fn.extend({wrapAll:function(e){var t;return this[0]&&(v(e)&&(e=e.call(this[0])),t=k(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map((function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e})).append(this)),this},wrapInner:function(e){return v(e)?this.each((function(t){k(this).wrapInner(e.call(this,t))})):this.each((function(){var t=k(this),i=t.contents();i.length?i.wrapAll(e):t.append(e)}))},wrap:function(e){var t=v(e);return this.each((function(i){k(this).wrapAll(t?e.call(this,i):e)}))},unwrap:function(e){return this.parent(e).not("body").each((function(){k(this).replaceWith(this.childNodes)})),this}}),k.expr.pseudos.hidden=function(e){return!k.expr.pseudos.visible(e)},k.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},k.ajaxSettings.xhr=function(){try{return new n.XMLHttpRequest}catch(e){}};var Gt={0:200,1223:204},Jt=k.ajaxSettings.xhr();g.cors=!!Jt&&"withCredentials"in Jt,g.ajax=Jt=!!Jt,k.ajaxTransport((function(e){var t,i;if(g.cors||Jt&&!e.crossDomain)return{send:function(r,o){var s,a=e.xhr();if(a.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(s in e.xhrFields)a[s]=e.xhrFields[s];for(s in e.mimeType&&a.overrideMimeType&&a.overrideMimeType(e.mimeType),e.crossDomain||r["X-Requested-With"]||(r["X-Requested-With"]="XMLHttpRequest"),r)a.setRequestHeader(s,r[s]);t=function(e){return function(){t&&(t=i=a.onload=a.onerror=a.onabort=a.ontimeout=a.onreadystatechange=null,"abort"===e?a.abort():"error"===e?"number"!=typeof a.status?o(0,"error"):o(a.status,a.statusText):o(Gt[a.status]||a.status,a.statusText,"text"!==(a.responseType||"text")||"string"!=typeof a.responseText?{binary:a.response}:{text:a.responseText},a.getAllResponseHeaders()))}},a.onload=t(),i=a.onerror=a.ontimeout=t("error"),void 0!==a.onabort?a.onabort=i:a.onreadystatechange=function(){4===a.readyState&&n.setTimeout((function(){t&&i()}))},t=t("abort");try{a.send(e.hasContent&&e.data||null)}catch(e){if(t)throw e}},abort:function(){t&&t()}}})),k.ajaxPrefilter((function(e){e.crossDomain&&(e.contents.script=!1)})),k.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return k.globalEval(e),e}}}),k.ajaxPrefilter("script",(function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")})),k.ajaxTransport("script",(function(e){var t,i;if(e.crossDomain||e.scriptAttrs)return{send:function(n,r){t=k("