Version Description
Download this release
Release Info
Developer | nko |
Plugin | Visual Portfolio, Photo Gallery & Post Grid |
Version | 2.2.0 |
Comparing to | |
See all releases |
Code changes from version 2.1.0 to 2.2.0
- assets/admin/css/elementor-rtl.min.css +1 -0
- assets/admin/css/style-rtl.min.css +5 -0
- assets/admin/css/style.min.css +1 -1
- assets/admin/js/elementor.js +1 -1
- assets/admin/js/elementor.min.js +2 -2
- assets/admin/js/mce-dropdown.js +1 -1
- assets/admin/js/script.js +1 -14
- assets/admin/js/script.min.js +2 -2
- assets/admin/js/vc-frontend.js +1 -1
- assets/css/layout-grid-rtl.min.css +1 -0
- assets/css/layout-grid.min.css +1 -1
- assets/css/layout-justified-rtl.min.css +1 -0
- assets/css/layout-masonry-rtl.min.css +1 -0
- assets/css/layout-masonry.min.css +1 -1
- assets/css/layout-slider-rtl.min.css +1 -0
- assets/css/layout-slider.min.css +1 -1
- assets/css/layout-tiles-rtl.min.css +1 -0
- assets/css/layout-tiles.min.css +1 -1
- assets/css/main-rtl.min.css +1 -0
- assets/css/main.min.css +1 -1
- assets/css/noscript-rtl.min.css +1 -0
- assets/css/popup-fancybox-rtl.min.css +1 -0
- assets/css/popup-photoswipe-rtl.min.css +1 -0
- assets/css/theme-twentyfifteen-rtl.min.css +1 -0
- assets/css/theme-twentynineteen-rtl.min.css +1 -0
- assets/css/theme-twentyseventeen-rtl.min.css +1 -0
- assets/css/theme-twentysixteen-rtl.min.css +1 -0
- assets/css/theme-twentytwenty-rtl.min.css +1 -0
- assets/js/main.js +8 -0
- assets/js/main.min.js +1 -1
- assets/js/plugin-isotope.js +2 -0
- assets/js/plugin-isotope.min.js +1 -1
- assets/js/preview.js +1 -1
- assets/vendor/flickr-justified-gallery/fjGallery.js +1133 -1242
- assets/vendor/flickr-justified-gallery/fjGallery.min.js +9 -8
- assets/vendor/flickr-justified-gallery/fjGallery.min.js.map +1 -1
- class-visual-portfolio.php +8 -1
- classes/class-admin.php +15 -10
- classes/class-assets.php +12 -12
- classes/class-controls.php +2 -0
- classes/class-custom-post-meta.php +132 -22
- classes/class-custom-post-type.php +20 -2
- classes/class-elementor-widget.php +20 -8
- classes/class-get-portfolio.php +21 -12
- classes/class-gutenberg.php +22 -2
- classes/class-migration.php +1 -1
- classes/class-preview.php +1 -1
- classes/class-supported-themes.php +3 -1
- classes/class-tinymce.php +1 -1
- classes/class-vc.php +1 -1
- gutenberg/components/controls-render/index.js +1 -0
- gutenberg/components/gallery-control/index.js +65 -61
- gutenberg/components/iframe-preview/index.js +1 -1
- gutenberg/custom-post-meta.js +2 -0
- gutenberg/custom-post-meta.min.js +1 -0
- gutenberg/custom-post-meta/image-focal-point.js +99 -0
- gutenberg/custom-post-meta/video.js +189 -0
- gutenberg/extensions/block-id.js +2 -2
- gutenberg/index.min.js +2 -3
assets/admin/css/elementor-rtl.min.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
.visual-portfolio-elementor-preview{position:relative;overflow:hidden;pointer-events:none}.visual-portfolio-elementor-preview iframe{max-width:none;min-height:20px}
|
assets/admin/css/style-rtl.min.css
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*!
|
2 |
+
* Name : Visual Portfolio
|
3 |
+
* Version : @@plugin_version
|
4 |
+
* Author : nK https://nkdev.info
|
5 |
+
*/.dashicons-visual-portfolio,.mce-widget .mce-i-visual-portfolio{background-image:url("../images/icon.svg");background-repeat:no-repeat;background-position:center center;background-size:18px;opacity:.6}.mce-widget .mce-i-visual-portfolio{background-image:url("../images/icon-mce.svg");opacity:1}.menu-top.current .dashicons-visual-portfolio,.menu-top:hover .dashicons-visual-portfolio,.wp-has-current-submenu .dashicons-visual-portfolio{opacity:1}.vc_element-icon[data-is-container="true"].icon-visual-portfolio,.vc_element-icon.icon-visual-portfolio{background-position:50% 50%}.vc_element-icon.icon-visual-portfolio,.vc_control-visual-portfolio{position:relative;overflow:hidden;background-image:url("../images/icon-vc.png");background-position:50% 50%;background-size:cover;border-radius:3px}.vc_add-element-container .icon-visual-portfolio{position:absolute}.vc_control-visual-portfolio{display:inline-block;width:18px;height:18px;margin:0 2px;cursor:pointer}.vc_controls-row .vc_control-visual-portfolio{float:left;margin:4px}.vc_control-visual-portfolio-overlay{position:absolute;top:0;left:0;bottom:0;right:0;z-index:2}.vp-row{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-flex:0;-ms-flex:0 1 auto;flex:0 1 auto;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-sizing:border-box;box-sizing:border-box;margin-left:-15px;margin-right:-15px}.vp-col-1,.vp-col-2,.vp-col-3,.vp-col-4,.vp-col-5,.vp-col-6,.vp-col-7,.vp-col-8,.vp-col-9,.vp-col-10,.vp-col-11,.vp-col-12{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;-webkit-box-sizing:border-box;box-sizing:border-box;padding-left:15px;padding-right:15px}.vp-col-1{-ms-flex-preferred-size:8.33333%;flex-basis:8.33333%;max-width:8.33333%}.vp-col-2{-ms-flex-preferred-size:16.66667%;flex-basis:16.66667%;max-width:16.66667%}.vp-col-3{-ms-flex-preferred-size:25%;flex-basis:25%;max-width:25%}.vp-col-4{-ms-flex-preferred-size:33.33333%;flex-basis:33.33333%;max-width:33.33333%}.vp-col-5{-ms-flex-preferred-size:41.66667%;flex-basis:41.66667%;max-width:41.66667%}.vp-col-6{-ms-flex-preferred-size:50%;flex-basis:50%;max-width:50%}.vp-col-7{-ms-flex-preferred-size:58.33333%;flex-basis:58.33333%;max-width:58.33333%}.vp-col-8{-ms-flex-preferred-size:66.66667%;flex-basis:66.66667%;max-width:66.66667%}.vp-col-9{-ms-flex-preferred-size:75%;flex-basis:75%;max-width:75%}.vp-col-10{-ms-flex-preferred-size:83.33333%;flex-basis:83.33333%;max-width:83.33333%}.vp-col-11{-ms-flex-preferred-size:91.66667%;flex-basis:91.66667%;max-width:91.66667%}.vp-col-12{-ms-flex-preferred-size:100%;flex-basis:100%;max-width:100%}.vp-col-clearfix{-ms-flex-preferred-size:100%;flex-basis:100%;max-width:100%}.vp-col-clearfix .vp-control-html{margin-bottom:0}.vp-oembed-preview{position:relative;width:100%;padding-top:56.25%;color:#a2a2a2;background-color:#f1f1f1;border:1px solid #e8e8e8}.vp-oembed-preview::after{content:"\f126";position:absolute;display:block;top:50%;right:50%;width:20px;height:20px;margin-top:-10px;margin-right:-10px;font-family:dashicons;font-size:20px;font-style:normal;font-weight:400;line-height:1;text-align:center;text-decoration:inherit;z-index:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.vp-oembed-preview>iframe{position:absolute;top:0;right:0;width:100%;height:100%;z-index:2}.vpf-meta-video-panel>.components-panel__body-title .components-panel__icon{-webkit-box-ordinal-group:0;-ms-flex-order:-1;order:-1;margin-left:10px;margin-right:0}.vpf-meta-image-focal-point-panel>.components-panel__body-title .components-panel__icon{-webkit-box-ordinal-group:0;-ms-flex-order:-1;order:-1;margin-left:10px;margin-right:0}.vpf-meta-image-focal-point-panel .components-focal-point-picker_position-display-container .components-base-control__label{max-width:100%}.vpf-meta-image-focal-point-panel .components-focal-point-picker_position-display-container .components-base-control{margin-bottom:0}.vp-input{width:100%}.vp-portfolio__thumbnail{position:relative;display:block;max-width:70px;padding-top:100%;overflow:hidden;border-radius:3px}.vp-portfolio__thumbnail img{position:absolute;display:block;top:0;right:0;width:100%;height:100%;-o-object-fit:cover;object-fit:cover}.vp-portfolio__thumbnail:empty{background-color:#f1f1f1;border:1px solid #e8e8e8}.vp-portfolio__thumbnail:empty,.vp-portfolio__thumbnail:empty:hover,.vp-portfolio__thumbnail:empty:active,.vp-portfolio__thumbnail:empty:focus{color:#a2a2a2}.vp-portfolio__thumbnail:empty::after{content:"\f128";position:absolute;display:block;top:50%;right:50%;width:20px;height:20px;margin-top:-10px;margin-right:-10px;font-family:dashicons;font-size:20px;font-style:normal;font-weight:400;line-height:1;text-align:center;text-decoration:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.wp-list-table th.column-portfolio_post_thumbs{width:70px}.wp-list-table th.column-vp_lists_post_icon{width:28px}.wp-list-table th.column-vp_lists_post_shortcode{width:250px}@media screen and (max-width: 782px){.wp-list-table th.column-portfolio_post_thumbs,.wp-list-table th.column-vp_lists_post_icon{display:none}.wp-list-table tr:not(.inline-edit-row):not(.no-items) td.column-portfolio_post_thumbs,.wp-list-table tr:not(.inline-edit-row):not(.no-items) td.column-vp_lists_post_icon{float:right;width:70px !important;min-width:70px}.wp-list-table tr:not(.inline-edit-row):not(.no-items) td.column-vp_lists_post_icon{width:40px !important}.wp-list-table tr:not(.inline-edit-row):not(.no-items) td.column-portfolio_post_thumbs::before{content:none}.wp-list-table tr:not(.inline-edit-row):not(.no-items) td.column-title{overflow:hidden;clear:left}}.vp-portfolio-list__icon{position:relative;display:block;max-width:70px;padding-top:100%;overflow:hidden;color:inherit;color:#868686;background-color:#f1f1f1;border:1px solid #e8e8e8;border-radius:3px}.vp-portfolio-list__icon:hover,.vp-portfolio-list__icon:active,.vp-portfolio-list__icon:focus{color:#5f5f5f}.vp-portfolio-list__icon svg{position:absolute;display:block;top:15%;right:15%;width:70%;height:70%;-o-object-fit:cover;object-fit:cover}.portfolio_page_visual-portfolio-settings .vpf-settings-control-pro>td{pointer-events:none;opacity:.5}.portfolio_page_visual-portfolio-settings .vpf-settings-control-pro>th{position:relative;padding-left:50px}.portfolio_page_visual-portfolio-settings .vpf-settings-control-pro>th label::after{content:"PRO";position:absolute;display:block;top:30px;left:10px;padding:.2em .8em;font-size:.8em;color:#fff;background-color:#2540cc;border-radius:1em;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%)}.vpf-settings-control-pro,.vpf-control-wrap-pro_note{display:none}
|
assets/admin/css/style.min.css
CHANGED
@@ -2,4 +2,4 @@
|
|
2 |
* Name : Visual Portfolio
|
3 |
* Version : @@plugin_version
|
4 |
* Author : nK https://nkdev.info
|
5 |
-
*/.dashicons-visual-portfolio,.mce-widget .mce-i-visual-portfolio{background-image:url("../images/icon.svg");background-repeat:no-repeat;background-position:center center;background-size:18px;opacity:.6}.mce-widget .mce-i-visual-portfolio{background-image:url("../images/icon-mce.svg");opacity:1}.menu-top.current .dashicons-visual-portfolio,.menu-top:hover .dashicons-visual-portfolio,.wp-has-current-submenu .dashicons-visual-portfolio{opacity:1}.vc_element-icon[data-is-container="true"].icon-visual-portfolio,.vc_element-icon.icon-visual-portfolio{background-position:50% 50%}.vc_element-icon.icon-visual-portfolio,.vc_control-visual-portfolio{position:relative;overflow:hidden;background-image:url("../images/icon-vc.png");background-position:50% 50%;background-size:cover;border-radius:3px}.vc_add-element-container .icon-visual-portfolio{position:absolute}.vc_control-visual-portfolio{display:inline-block;width:18px;height:18px;margin:0 2px;cursor:pointer}.vc_controls-row .vc_control-visual-portfolio{float:right;margin:4px}.vc_control-visual-portfolio-overlay{position:absolute;top:0;right:0;bottom:0;left:0;z-index:2}.vp-row{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-flex:0;-ms-flex:0 1 auto;flex:0 1 auto;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-sizing:border-box;box-sizing:border-box;margin-right:-15px;margin-left:-15px}.vp-col-1,.vp-col-2,.vp-col-3,.vp-col-4,.vp-col-5,.vp-col-6,.vp-col-7,.vp-col-8,.vp-col-9,.vp-col-10,.vp-col-11,.vp-col-12{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;-webkit-box-sizing:border-box;box-sizing:border-box;padding-right:15px;padding-left:15px}.vp-col-1{-ms-flex-preferred-size:8.33333%;flex-basis:8.33333%;max-width:8.33333%}.vp-col-2{-ms-flex-preferred-size:16.66667%;flex-basis:16.66667%;max-width:16.66667%}.vp-col-3{-ms-flex-preferred-size:25%;flex-basis:25%;max-width:25%}.vp-col-4{-ms-flex-preferred-size:33.33333%;flex-basis:33.33333%;max-width:33.33333%}.vp-col-5{-ms-flex-preferred-size:41.66667%;flex-basis:41.66667%;max-width:41.66667%}.vp-col-6{-ms-flex-preferred-size:50%;flex-basis:50%;max-width:50%}.vp-col-7{-ms-flex-preferred-size:58.33333%;flex-basis:58.33333%;max-width:58.33333%}.vp-col-8{-ms-flex-preferred-size:66.66667%;flex-basis:66.66667%;max-width:66.66667%}.vp-col-9{-ms-flex-preferred-size:75%;flex-basis:75%;max-width:75%}.vp-col-10{-ms-flex-preferred-size:83.33333%;flex-basis:83.33333%;max-width:83.33333%}.vp-col-11{-ms-flex-preferred-size:91.66667%;flex-basis:91.66667%;max-width:91.66667%}.vp-col-12{-ms-flex-preferred-size:100%;flex-basis:100%;max-width:100%}.vp-col-clearfix{-ms-flex-preferred-size:100%;flex-basis:100%;max-width:100%}.vp-col-clearfix .vp-control-html{margin-bottom:0}.vp-oembed-preview{position:relative;width:100%;padding-top:56.25%;color:#a2a2a2;background-color:#f1f1f1;border:1px solid #e8e8e8}.vp-oembed-preview::after{content:"\f126";position:absolute;display:block;top:50%;left:50%;width:20px;height:20px;margin-top:-10px;margin-left:-10px;font-family:dashicons;font-size:20px;font-style:normal;font-weight:400;line-height:1;text-align:center;text-decoration:inherit;z-index:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.vp-oembed-preview>iframe{position:absolute;top:0;left:0;width:100%;height:100%;z-index:2}.vp-input{width:100%}.vp-portfolio__thumbnail{position:relative;display:block;max-width:70px;padding-top:100%;overflow:hidden;border-radius:3px}.vp-portfolio__thumbnail img{position:absolute;display:block;top:0;left:0;width:100%;height:100%;-o-object-fit:cover;object-fit:cover}.vp-portfolio__thumbnail:empty{background-color:#f1f1f1;border:1px solid #e8e8e8}.vp-portfolio__thumbnail:empty,.vp-portfolio__thumbnail:empty:hover,.vp-portfolio__thumbnail:empty:active,.vp-portfolio__thumbnail:empty:focus{color:#a2a2a2}.vp-portfolio__thumbnail:empty::after{content:"\f128";position:absolute;display:block;top:50%;left:50%;width:20px;height:20px;margin-top:-10px;margin-left:-10px;font-family:dashicons;font-size:20px;font-style:normal;font-weight:400;line-height:1;text-align:center;text-decoration:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.wp-list-table th.column-portfolio_post_thumbs{width:70px}.wp-list-table th.column-vp_lists_post_icon{width:28px}.wp-list-table th.column-vp_lists_post_shortcode{width:250px}@media screen and (max-width: 782px){.wp-list-table th.column-portfolio_post_thumbs,.wp-list-table th.column-vp_lists_post_icon{display:none}.wp-list-table tr:not(.inline-edit-row):not(.no-items) td.column-portfolio_post_thumbs,.wp-list-table tr:not(.inline-edit-row):not(.no-items) td.column-vp_lists_post_icon{float:left;width:70px !important;min-width:70px}.wp-list-table tr:not(.inline-edit-row):not(.no-items) td.column-vp_lists_post_icon{width:40px !important}.wp-list-table tr:not(.inline-edit-row):not(.no-items) td.column-portfolio_post_thumbs::before{content:none}.wp-list-table tr:not(.inline-edit-row):not(.no-items) td.column-title{overflow:hidden;clear:right}}.vp-portfolio-list__icon{position:relative;display:block;max-width:70px;padding-top:100%;overflow:hidden;color:inherit;color:#868686;background-color:#f1f1f1;border:1px solid #e8e8e8;border-radius:3px}.vp-portfolio-list__icon:hover,.vp-portfolio-list__icon:active,.vp-portfolio-list__icon:focus{color:#5f5f5f}.vp-portfolio-list__icon svg{position:absolute;display:block;top:15%;left:15%;width:70%;height:70%;-o-object-fit:cover;object-fit:cover}.portfolio_page_visual-portfolio-settings .vpf-settings-control-pro>td{pointer-events:none;opacity:.5}.portfolio_page_visual-portfolio-settings .vpf-settings-control-pro>th{position:relative;padding-right:50px}.portfolio_page_visual-portfolio-settings .vpf-settings-control-pro>th label::after{content:"PRO";position:absolute;display:block;top:30px;right:10px;padding:.2em .8em;font-size:.8em;color:#fff;background-color:#2540cc;border-radius:1em;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%)}.vpf-settings-control-pro,.vpf-control-wrap-pro_note{display:none}
|
2 |
* Name : Visual Portfolio
|
3 |
* Version : @@plugin_version
|
4 |
* Author : nK https://nkdev.info
|
5 |
+
*/.dashicons-visual-portfolio,.mce-widget .mce-i-visual-portfolio{background-image:url("../images/icon.svg");background-repeat:no-repeat;background-position:center center;background-size:18px;opacity:.6}.mce-widget .mce-i-visual-portfolio{background-image:url("../images/icon-mce.svg");opacity:1}.menu-top.current .dashicons-visual-portfolio,.menu-top:hover .dashicons-visual-portfolio,.wp-has-current-submenu .dashicons-visual-portfolio{opacity:1}.vc_element-icon[data-is-container="true"].icon-visual-portfolio,.vc_element-icon.icon-visual-portfolio{background-position:50% 50%}.vc_element-icon.icon-visual-portfolio,.vc_control-visual-portfolio{position:relative;overflow:hidden;background-image:url("../images/icon-vc.png");background-position:50% 50%;background-size:cover;border-radius:3px}.vc_add-element-container .icon-visual-portfolio{position:absolute}.vc_control-visual-portfolio{display:inline-block;width:18px;height:18px;margin:0 2px;cursor:pointer}.vc_controls-row .vc_control-visual-portfolio{float:right;margin:4px}.vc_control-visual-portfolio-overlay{position:absolute;top:0;right:0;bottom:0;left:0;z-index:2}.vp-row{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-flex:0;-ms-flex:0 1 auto;flex:0 1 auto;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-sizing:border-box;box-sizing:border-box;margin-right:-15px;margin-left:-15px}.vp-col-1,.vp-col-2,.vp-col-3,.vp-col-4,.vp-col-5,.vp-col-6,.vp-col-7,.vp-col-8,.vp-col-9,.vp-col-10,.vp-col-11,.vp-col-12{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;-webkit-box-sizing:border-box;box-sizing:border-box;padding-right:15px;padding-left:15px}.vp-col-1{-ms-flex-preferred-size:8.33333%;flex-basis:8.33333%;max-width:8.33333%}.vp-col-2{-ms-flex-preferred-size:16.66667%;flex-basis:16.66667%;max-width:16.66667%}.vp-col-3{-ms-flex-preferred-size:25%;flex-basis:25%;max-width:25%}.vp-col-4{-ms-flex-preferred-size:33.33333%;flex-basis:33.33333%;max-width:33.33333%}.vp-col-5{-ms-flex-preferred-size:41.66667%;flex-basis:41.66667%;max-width:41.66667%}.vp-col-6{-ms-flex-preferred-size:50%;flex-basis:50%;max-width:50%}.vp-col-7{-ms-flex-preferred-size:58.33333%;flex-basis:58.33333%;max-width:58.33333%}.vp-col-8{-ms-flex-preferred-size:66.66667%;flex-basis:66.66667%;max-width:66.66667%}.vp-col-9{-ms-flex-preferred-size:75%;flex-basis:75%;max-width:75%}.vp-col-10{-ms-flex-preferred-size:83.33333%;flex-basis:83.33333%;max-width:83.33333%}.vp-col-11{-ms-flex-preferred-size:91.66667%;flex-basis:91.66667%;max-width:91.66667%}.vp-col-12{-ms-flex-preferred-size:100%;flex-basis:100%;max-width:100%}.vp-col-clearfix{-ms-flex-preferred-size:100%;flex-basis:100%;max-width:100%}.vp-col-clearfix .vp-control-html{margin-bottom:0}.vp-oembed-preview{position:relative;width:100%;padding-top:56.25%;color:#a2a2a2;background-color:#f1f1f1;border:1px solid #e8e8e8}.vp-oembed-preview::after{content:"\f126";position:absolute;display:block;top:50%;left:50%;width:20px;height:20px;margin-top:-10px;margin-left:-10px;font-family:dashicons;font-size:20px;font-style:normal;font-weight:400;line-height:1;text-align:center;text-decoration:inherit;z-index:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.vp-oembed-preview>iframe{position:absolute;top:0;left:0;width:100%;height:100%;z-index:2}.vpf-meta-video-panel>.components-panel__body-title .components-panel__icon{-webkit-box-ordinal-group:0;-ms-flex-order:-1;order:-1;margin-right:10px;margin-left:0}.vpf-meta-image-focal-point-panel>.components-panel__body-title .components-panel__icon{-webkit-box-ordinal-group:0;-ms-flex-order:-1;order:-1;margin-right:10px;margin-left:0}.vpf-meta-image-focal-point-panel .components-focal-point-picker_position-display-container .components-base-control__label{max-width:100%}.vpf-meta-image-focal-point-panel .components-focal-point-picker_position-display-container .components-base-control{margin-bottom:0}.vp-input{width:100%}.vp-portfolio__thumbnail{position:relative;display:block;max-width:70px;padding-top:100%;overflow:hidden;border-radius:3px}.vp-portfolio__thumbnail img{position:absolute;display:block;top:0;left:0;width:100%;height:100%;-o-object-fit:cover;object-fit:cover}.vp-portfolio__thumbnail:empty{background-color:#f1f1f1;border:1px solid #e8e8e8}.vp-portfolio__thumbnail:empty,.vp-portfolio__thumbnail:empty:hover,.vp-portfolio__thumbnail:empty:active,.vp-portfolio__thumbnail:empty:focus{color:#a2a2a2}.vp-portfolio__thumbnail:empty::after{content:"\f128";position:absolute;display:block;top:50%;left:50%;width:20px;height:20px;margin-top:-10px;margin-left:-10px;font-family:dashicons;font-size:20px;font-style:normal;font-weight:400;line-height:1;text-align:center;text-decoration:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.wp-list-table th.column-portfolio_post_thumbs{width:70px}.wp-list-table th.column-vp_lists_post_icon{width:28px}.wp-list-table th.column-vp_lists_post_shortcode{width:250px}@media screen and (max-width: 782px){.wp-list-table th.column-portfolio_post_thumbs,.wp-list-table th.column-vp_lists_post_icon{display:none}.wp-list-table tr:not(.inline-edit-row):not(.no-items) td.column-portfolio_post_thumbs,.wp-list-table tr:not(.inline-edit-row):not(.no-items) td.column-vp_lists_post_icon{float:left;width:70px !important;min-width:70px}.wp-list-table tr:not(.inline-edit-row):not(.no-items) td.column-vp_lists_post_icon{width:40px !important}.wp-list-table tr:not(.inline-edit-row):not(.no-items) td.column-portfolio_post_thumbs::before{content:none}.wp-list-table tr:not(.inline-edit-row):not(.no-items) td.column-title{overflow:hidden;clear:right}}.vp-portfolio-list__icon{position:relative;display:block;max-width:70px;padding-top:100%;overflow:hidden;color:inherit;color:#868686;background-color:#f1f1f1;border:1px solid #e8e8e8;border-radius:3px}.vp-portfolio-list__icon:hover,.vp-portfolio-list__icon:active,.vp-portfolio-list__icon:focus{color:#5f5f5f}.vp-portfolio-list__icon svg{position:absolute;display:block;top:15%;left:15%;width:70%;height:70%;-o-object-fit:cover;object-fit:cover}.portfolio_page_visual-portfolio-settings .vpf-settings-control-pro>td{pointer-events:none;opacity:.5}.portfolio_page_visual-portfolio-settings .vpf-settings-control-pro>th{position:relative;padding-right:50px}.portfolio_page_visual-portfolio-settings .vpf-settings-control-pro>th label::after{content:"PRO";position:absolute;display:block;top:30px;right:10px;padding:.2em .8em;font-size:.8em;color:#fff;background-color:#2540cc;border-radius:1em;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%)}.vpf-settings-control-pro,.vpf-control-wrap-pro_note{display:none}
|
assets/admin/js/elementor.js
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
* Additional js for Elementor
|
3 |
*
|
4 |
* Name : Visual Portfolio
|
5 |
-
* Version : 2.
|
6 |
* Author : nK https://nkdev.info
|
7 |
*/
|
8 |
import { throttle } from 'throttle-debounce';
|
2 |
* Additional js for Elementor
|
3 |
*
|
4 |
* Name : Visual Portfolio
|
5 |
+
* Version : 2.2.0
|
6 |
* Author : nK https://nkdev.info
|
7 |
*/
|
8 |
import { throttle } from 'throttle-debounce';
|
assets/admin/js/elementor.min.js
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
-
!function(e){var n={};function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:r})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var i in e)t.d(r,i,function(n){return e[n]}.bind(null,i));return r},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="",t(t.s=254)}({254:function(e,n,t){e.exports=t(255)},255:function(e,n,t){"use strict";t.r(n);var r=t(
|
2 |
/*!
|
3 |
* Additional js for Elementor
|
4 |
*
|
5 |
* Name : Visual Portfolio
|
6 |
* Version : @@plugin_version
|
7 |
* Author : nK https://nkdev.info
|
8 |
-
*/a(window).on("elementor/frontend/init",(function(e){if(u){var n=e.target;f.on("resize",Object(r.b)(300,t)),o.hooks.addAction("frontend/element_ready/visual-portfolio.default",(function(e){var n=a(e).find(".visual-portfolio-elementor-preview"),r=n.find("iframe"),i=n.attr("data-id"),o="".concat(u.preview_url+(u.preview_url.split("?")[1]?"&":"?"),"vp_preview_frame=true&vp_preview_type=elementor&vp_preview_frame_id=").concat(i);r.attr("src",o),a.fn.iFrameResize&&r.iFrameResize({onInit:function(){t()}})}))}function t(){var e=n.jQuery(n.document).width();n.jQuery.find(".visual-portfolio-elementor-preview iframe").forEach((function(n){var t=a(n),r=t.parent().width();t.css({width:e}),n.iFrameResizer&&(n.iFrameResizer.sendMessage({name:"resize",width:r}),n.iFrameResizer.resize())}))}}))},
|
1 |
+
!function(e){var n={};function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:r})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var i in e)t.d(r,i,function(n){return e[n]}.bind(null,i));return r},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="",t(t.s=254)}({254:function(e,n,t){e.exports=t(255)},255:function(e,n,t){"use strict";t.r(n);var r=t(3),i=window,o=i.elementorFrontend,u=i.VPAdminElementorVariables,a=window.jQuery,f=a(window);
|
2 |
/*!
|
3 |
* Additional js for Elementor
|
4 |
*
|
5 |
* Name : Visual Portfolio
|
6 |
* Version : @@plugin_version
|
7 |
* Author : nK https://nkdev.info
|
8 |
+
*/a(window).on("elementor/frontend/init",(function(e){if(u){var n=e.target;f.on("resize",Object(r.b)(300,t)),o.hooks.addAction("frontend/element_ready/visual-portfolio.default",(function(e){var n=a(e).find(".visual-portfolio-elementor-preview"),r=n.find("iframe"),i=n.attr("data-id"),o="".concat(u.preview_url+(u.preview_url.split("?")[1]?"&":"?"),"vp_preview_frame=true&vp_preview_type=elementor&vp_preview_frame_id=").concat(i);r.attr("src",o),a.fn.iFrameResize&&r.iFrameResize({onInit:function(){t()}})}))}function t(){var e=n.jQuery(n.document).width();n.jQuery.find(".visual-portfolio-elementor-preview iframe").forEach((function(n){var t=a(n),r=t.parent().width();t.css({width:e}),n.iFrameResizer&&(n.iFrameResizer.sendMessage({name:"resize",width:r}),n.iFrameResizer.resize())}))}}))},3:function(e,n,t){"use strict";function r(e,n,t,r){var i,o=!1,u=0;function a(){i&&clearTimeout(i)}function f(){var f=this,c=Date.now()-u,d=arguments;function l(){u=Date.now(),t.apply(f,d)}function s(){i=void 0}o||(r&&!i&&l(),a(),void 0===r&&c>e?l():!0!==n&&(i=setTimeout(r?s:l,void 0===r?e-c:e)))}return"boolean"!=typeof n&&(r=t,t=n,n=void 0),f.cancel=function(){a(),o=!0},f}function i(e,n,t){return void 0===t?r(e,n,!1):r(e,t,!1!==n)}t.d(n,"b",(function(){return r})),t.d(n,"a",(function(){return i}))}});
|
assets/admin/js/mce-dropdown.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
/*!
|
2 |
* Name : Visual Portfolio
|
3 |
-
* Version : 2.
|
4 |
* Author : nK https://nkdev.info
|
5 |
*/
|
6 |
const {
|
1 |
/*!
|
2 |
* Name : Visual Portfolio
|
3 |
+
* Version : 2.2.0
|
4 |
* Author : nK https://nkdev.info
|
5 |
*/
|
6 |
const {
|
assets/admin/js/script.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
/*!
|
2 |
* Name : Visual Portfolio
|
3 |
-
* Version : 2.
|
4 |
* Author : nK https://nkdev.info
|
5 |
*/
|
6 |
import { debounce } from 'throttle-debounce';
|
@@ -42,19 +42,6 @@ if ( $videoMetabox.length ) {
|
|
42 |
toggleVideoMetabox( $videoFormatCheckbox.is( ':checked' ) );
|
43 |
} );
|
44 |
}
|
45 |
-
|
46 |
-
// Gutenberg.
|
47 |
-
if ( wp.data && wp.data.subscribe ) {
|
48 |
-
const {
|
49 |
-
getCurrentPostAttribute,
|
50 |
-
getEditedPostAttribute,
|
51 |
-
} = wp.data.select( 'core/editor' );
|
52 |
-
|
53 |
-
wp.data.subscribe( () => {
|
54 |
-
const format = getEditedPostAttribute( 'format' ) || getCurrentPostAttribute( 'format' );
|
55 |
-
toggleVideoMetabox( 'video' === format );
|
56 |
-
} );
|
57 |
-
}
|
58 |
}
|
59 |
|
60 |
let oembedAjax = null;
|
1 |
/*!
|
2 |
* Name : Visual Portfolio
|
3 |
+
* Version : 2.2.0
|
4 |
* Author : nK https://nkdev.info
|
5 |
*/
|
6 |
import { debounce } from 'throttle-debounce';
|
42 |
toggleVideoMetabox( $videoFormatCheckbox.is( ':checked' ) );
|
43 |
} );
|
44 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
45 |
}
|
46 |
|
47 |
let oembedAjax = null;
|
assets/admin/js/script.min.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
-
!function(t){var
|
2 |
/*!
|
3 |
* Name : Visual Portfolio
|
4 |
* Version : @@plugin_version
|
5 |
* Author : nK https://nkdev.info
|
6 |
-
*/l.on("focus",'[name="vp_list_shortcode"], [name="vp_filter_shortcode"], [name="vp_sort_shortcode"]',(function(){this.select()})),l.on("click",".vp-onclick-selection",(function(){window.getSelection().selectAllChildren(this)}));var d=r("#vp_format_video"),f=r("#post-format-video"),
|
1 |
+
!function(t){var n={};function e(o){if(n[o])return n[o].exports;var i=n[o]={i:o,l:!1,exports:{}};return t[o].call(i.exports,i,i.exports,e),i.l=!0,i.exports}e.m=t,e.c=n,e.d=function(t,n,o){e.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:o})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,n){if(1&n&&(t=e(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(e.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var i in t)e.d(o,i,function(n){return t[n]}.bind(null,i));return o},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},e.p="",e(e.s=260)}({260:function(t,n,e){t.exports=e(261)},261:function(t,n,e){"use strict";e.r(n);var o=e(3),i=window,r=i.jQuery,a=i.ajaxurl,u=i.VPAdminVariables,c=i.Tooltip,l=r("body");
|
2 |
/*!
|
3 |
* Name : Visual Portfolio
|
4 |
* Version : @@plugin_version
|
5 |
* Author : nK https://nkdev.info
|
6 |
+
*/l.on("focus",'[name="vp_list_shortcode"], [name="vp_filter_shortcode"], [name="vp_sort_shortcode"]',(function(){this.select()})),l.on("click",".vp-onclick-selection",(function(){window.getSelection().selectAllChildren(this)}));var d=r("#vp_format_video"),f=r("#post-format-video"),p=null;function s(t){null!==p&&p===t||(p=t,d[t?"show":"hide"]())}d.length&&f.length&&(s(f.is(":checked")),l.on("change","[name=post_format]",(function(){s(f.is(":checked"))})));var v=null,h=function(t){v=r.ajax({url:a,method:"POST",dataType:"json",data:{action:"vp_find_oembed",q:t.val(),nonce:u.nonce},complete:function(n){var e=n.responseJSON;e&&void 0!==e.html&&t.next(".vp-oembed-preview").html(e.html)}})};h=Object(o.a)(300,h),l.on("change input",'.vp-input[name="_vp_format_video_url"]',(function(){null!==v&&v.abort();var t=r(this);t.next(".vp-oembed-preview").html(""),h(t)})),void 0!==c&&r('[data-hint]:not([data-hint=""]):not([data-hint="false"])').each((function(){var t=r(this);new window.Tooltip(this,{placement:t.attr("data-hint-place")||"top",title:t.attr("data-hint"),container:r("body")[0],boundariesElement:"viewport"})}))},3:function(t,n,e){"use strict";function o(t,n,e,o){var i,r=!1,a=0;function u(){i&&clearTimeout(i)}function c(){var c=this,l=Date.now()-a,d=arguments;function f(){a=Date.now(),e.apply(c,d)}function p(){i=void 0}r||(o&&!i&&f(),u(),void 0===o&&l>t?f():!0!==n&&(i=setTimeout(o?p:f,void 0===o?t-l:t)))}return"boolean"!=typeof n&&(o=e,e=n,n=void 0),c.cancel=function(){u(),r=!0},c}function i(t,n,e){return void 0===e?o(t,n,!1):o(t,e,!1!==n)}e.d(n,"b",(function(){return o})),e.d(n,"a",(function(){return i}))}});
|
assets/admin/js/vc-frontend.js
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
* Additional js for frontend VC
|
3 |
*
|
4 |
* Name : Visual Portfolio
|
5 |
-
* Version : 2.
|
6 |
* Author : nK https://nkdev.info
|
7 |
*/
|
8 |
const {
|
2 |
* Additional js for frontend VC
|
3 |
*
|
4 |
* Name : Visual Portfolio
|
5 |
+
* Version : 2.2.0
|
6 |
* Author : nK https://nkdev.info
|
7 |
*/
|
8 |
const {
|
assets/css/layout-grid-rtl.min.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
[data-vp-grid-images-aspect-ratio*=":"] .vp-portfolio__item-img img,[data-vp-grid-images-aspect-ratio*=":"] .vp-portfolio__item-img{position:absolute;top:0;left:0;bottom:0;right:0}[data-vp-grid-images-aspect-ratio*=":"] .vp-portfolio__item-img-wrap{position:relative;display:block;overflow:hidden}[data-vp-grid-images-aspect-ratio*=":"] .vp-portfolio__item-img-wrap::before{content:"";display:block;padding-top:56%}[data-vp-grid-images-aspect-ratio*=":"] .vp-portfolio__item-img img{width:100%;height:100%;-o-object-fit:var(--vp-images__object-fit);object-fit:var(--vp-images__object-fit);-o-object-position:var(--vp-images__object-position);object-position:var(--vp-images__object-position);font-family:"object-fit: cover; object-position: 50% 50%;"}
|
assets/css/layout-grid.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
[data-vp-grid-images-aspect-ratio*=":"] .vp-portfolio__item-img img,[data-vp-grid-images-aspect-ratio*=":"] .vp-portfolio__item-img{position:absolute;top:0;right:0;bottom:0;left:0}[data-vp-grid-images-aspect-ratio*=":"] .vp-portfolio__item-img-wrap{position:relative;display:block;overflow:hidden}[data-vp-grid-images-aspect-ratio*=":"] .vp-portfolio__item-img-wrap::before{content:"";display:block;padding-top:56%}[data-vp-grid-images-aspect-ratio*=":"] .vp-portfolio__item-img img{width:100%;height:100%;-o-object-fit:
|
1 |
+
[data-vp-grid-images-aspect-ratio*=":"] .vp-portfolio__item-img img,[data-vp-grid-images-aspect-ratio*=":"] .vp-portfolio__item-img{position:absolute;top:0;right:0;bottom:0;left:0}[data-vp-grid-images-aspect-ratio*=":"] .vp-portfolio__item-img-wrap{position:relative;display:block;overflow:hidden}[data-vp-grid-images-aspect-ratio*=":"] .vp-portfolio__item-img-wrap::before{content:"";display:block;padding-top:56%}[data-vp-grid-images-aspect-ratio*=":"] .vp-portfolio__item-img img{width:100%;height:100%;-o-object-fit:var(--vp-images__object-fit);object-fit:var(--vp-images__object-fit);-o-object-position:var(--vp-images__object-position);object-position:var(--vp-images__object-position);font-family:"object-fit: cover; object-position: 50% 50%;"}
|
assets/css/layout-justified-rtl.min.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
.vp-portfolio{--vp-justified__transition-duration: var(--vp-interactive__transition-duration);--vp-justified__transition-easing: var(--vp-interactive__transition-easing)}[data-vp-layout="justified"] .vp-portfolio__items{-webkit-transition:var(--vp-justified__transition-duration) height var(--vp-justified__transition-easing);-o-transition:var(--vp-justified__transition-duration) height var(--vp-justified__transition-easing);transition:var(--vp-justified__transition-duration) height var(--vp-justified__transition-easing);will-change:height}[data-vp-layout="justified"] .vp-portfolio__item-wrap{float:right;top:0;right:0;-webkit-transition:var(--vp-justified__transition-duration) transform var(--vp-justified__transition-easing),var(--vp-justified__transition-duration) width var(--vp-justified__transition-easing),var(--vp-justified__transition-duration) height var(--vp-justified__transition-easing);-o-transition:var(--vp-justified__transition-duration) transform var(--vp-justified__transition-easing),var(--vp-justified__transition-duration) width var(--vp-justified__transition-easing),var(--vp-justified__transition-duration) height var(--vp-justified__transition-easing);transition:var(--vp-justified__transition-duration) transform var(--vp-justified__transition-easing),var(--vp-justified__transition-duration) width var(--vp-justified__transition-easing),var(--vp-justified__transition-duration) height var(--vp-justified__transition-easing);will-change:transform, width, height}
|
assets/css/layout-masonry-rtl.min.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
[data-vp-masonry-images-aspect-ratio*=":"] .vp-portfolio__item-img img,[data-vp-masonry-images-aspect-ratio*=":"] .vp-portfolio__item-img{position:absolute;top:0;left:0;bottom:0;right:0}[data-vp-masonry-images-aspect-ratio*=":"] .vp-portfolio__item-img-wrap{position:relative;display:block;overflow:hidden}[data-vp-masonry-images-aspect-ratio*=":"] .vp-portfolio__item-img-wrap::before{content:"";display:block;padding-top:56%}[data-vp-masonry-images-aspect-ratio*=":"] .vp-portfolio__item-img img{width:100%;height:100%;-o-object-fit:var(--vp-images__object-fit);object-fit:var(--vp-images__object-fit);-o-object-position:var(--vp-images__object-position);object-position:var(--vp-images__object-position);font-family:"object-fit: cover; object-position: 50% 50%;"}
|
assets/css/layout-masonry.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
[data-vp-masonry-images-aspect-ratio*=":"] .vp-portfolio__item-img img,[data-vp-masonry-images-aspect-ratio*=":"] .vp-portfolio__item-img{position:absolute;top:0;right:0;bottom:0;left:0}[data-vp-masonry-images-aspect-ratio*=":"] .vp-portfolio__item-img-wrap{position:relative;display:block;overflow:hidden}[data-vp-masonry-images-aspect-ratio*=":"] .vp-portfolio__item-img-wrap::before{content:"";display:block;padding-top:56%}[data-vp-masonry-images-aspect-ratio*=":"] .vp-portfolio__item-img img{width:100%;height:100%;-o-object-fit:
|
1 |
+
[data-vp-masonry-images-aspect-ratio*=":"] .vp-portfolio__item-img img,[data-vp-masonry-images-aspect-ratio*=":"] .vp-portfolio__item-img{position:absolute;top:0;right:0;bottom:0;left:0}[data-vp-masonry-images-aspect-ratio*=":"] .vp-portfolio__item-img-wrap{position:relative;display:block;overflow:hidden}[data-vp-masonry-images-aspect-ratio*=":"] .vp-portfolio__item-img-wrap::before{content:"";display:block;padding-top:56%}[data-vp-masonry-images-aspect-ratio*=":"] .vp-portfolio__item-img img{width:100%;height:100%;-o-object-fit:var(--vp-images__object-fit);object-fit:var(--vp-images__object-fit);-o-object-position:var(--vp-images__object-position);object-position:var(--vp-images__object-position);font-family:"object-fit: cover; object-position: 50% 50%;"}
|
assets/css/layout-slider-rtl.min.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
.vp-portfolio{--vp-layout-slider--arrows__width: 2em;--vp-layout-slider--arrows__height: 2em;--vp-layout-slider--arrows__offset: 10px;--vp-layout-slider--arrows__compensation: 10px;--vp-layout-slider--arrows__color: var(--vp-color-gray);--vp-layout-slider--arrows__background-color: #fff;--vp-layout-slider--arrows__border-radius: 50%;--vp-layout-slider--arrows__box-shadow: 0 0 7px 2px rgba(0, 0, 0, .04);--vp-layout-slider--arrows__opacity: .5;--vp-layout-slider--arrows-hover__box-shadow: 0 2px 15px 2px rgba(0, 0, 0, .04);--vp-layout-slider--arrows-hover__opacity: 1;--vp-layout-slider--bullets__margin-top: 2em;--vp-layout-slider--bullets__width: .4em;--vp-layout-slider--bullets__height: .4em;--vp-layout-slider--bullets__gap: .4em;--vp-layout-slider--bullets__compensation: 4px;--vp-layout-slider--bullets__background-color: currentColor;--vp-layout-slider--bullets__border-radius: 50%;--vp-layout-slider--bullets__opacity: .2;--vp-layout-slider--bullets-hover__opacity: .5;--vp-layout-slider--bullets-active__opacity: 1;--vp-layout-slider--thumbnails__opacity: .5;--vp-layout-slider--thumbnails-hover__opacity: 1;--vp-layout-slider--thumbnails-active__opacity: 1;--vp-layout-slider__transition-duration: var(--vp-interactive__transition-duration);--vp-layout-slider__transition-easing: var(--vp-interactive__transition-easing)}[data-vp-layout="slider"] .vp-portfolio__item-img-wrap,[data-vp-layout="slider"] .vp-portfolio__thumbnail-img-wrap{position:relative;display:block;overflow:hidden}[data-vp-layout="slider"] .vp-portfolio__item-img-wrap::before,[data-vp-layout="slider"] .vp-portfolio__thumbnail-img-wrap::before{content:"";display:block}[data-vp-layout="slider"] .vp-portfolio__item-img img,[data-vp-layout="slider"] .vp-portfolio__thumbnail-img img{-o-object-fit:var(--vp-images__object-fit);object-fit:var(--vp-images__object-fit);-o-object-position:var(--vp-images__object-position);object-position:var(--vp-images__object-position);font-family:"object-fit: cover; object-position: 50% 50%;"}[data-vp-layout="slider"] .vp-portfolio__items-arrow{position:absolute;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;top:50%;width:var(--vp-layout-slider--arrows__width);height:var(--vp-layout-slider--arrows__height);margin-top:calc(-1 * var(--vp-layout-slider--arrows__height) / 2);color:var(--vp-layout-slider--arrow__color);cursor:pointer;background-color:var(--vp-layout-slider--arrows__background-color);border-radius:var(--vp-layout-slider--arrows__border-radius);-webkit-box-shadow:var(--vp-layout-slider--arrows__box-shadow);box-shadow:var(--vp-layout-slider--arrows__box-shadow);opacity:var(--vp-layout-slider--arrows__opacity);-webkit-transition:var(--vp-layout-slider__transition-duration) opacity var(--vp-layout-slider__transition-easing),var(--vp-layout-slider__transition-duration) box-shadow var(--vp-layout-slider__transition-easing);-o-transition:var(--vp-layout-slider__transition-duration) opacity var(--vp-layout-slider__transition-easing),var(--vp-layout-slider__transition-duration) box-shadow var(--vp-layout-slider__transition-easing);transition:var(--vp-layout-slider__transition-duration) opacity var(--vp-layout-slider__transition-easing),var(--vp-layout-slider__transition-duration) box-shadow var(--vp-layout-slider__transition-easing);will-change:opacity, box-shadow;z-index:1}[data-vp-layout="slider"] .vp-portfolio__items-arrow::after{content:"";position:absolute;display:block;top:calc(-1 * var(--vp-layout-slider--arrows__compensation));left:calc(-1 * var(--vp-layout-slider--arrows__compensation));bottom:calc(-1 * var(--vp-layout-slider--arrows__compensation));right:calc(-1 * var(--vp-layout-slider--arrows__compensation))}[data-vp-layout="slider"] .vp-portfolio__items-arrow:hover{-webkit-box-shadow:var(--vp-layout-slider--arrows-hover__box-shadow);box-shadow:var(--vp-layout-slider--arrows-hover__box-shadow);opacity:var(--vp-layout-slider--arrows-hover__opacity)}[data-vp-layout="slider"] .vp-portfolio__items-arrow svg{-webkit-transform:scaleX(-1);-ms-transform:scaleX(-1);transform:scaleX(-1)}[data-vp-layout="slider"] .vp-portfolio__items-arrow-prev{right:var(--vp-layout-slider--arrows__offset)}[data-vp-layout="slider"] .vp-portfolio__items-arrow-next{left:var(--vp-layout-slider--arrows__offset)}[data-vp-layout="slider"][data-vp-slider-bullets="true"] .vp-portfolio__items-wrap{padding-bottom:var(--vp-layout-slider--bullets__margin-top)}[data-vp-layout="slider"][data-vp-slider-bullets="true"] .vp-portfolio__items-wrap .vp-portfolio__items-arrow{-webkit-transform:translateY(calc(var(--vp-layout-slider--bullets__margin-top) / -2));-ms-transform:translateY(calc(var(--vp-layout-slider--bullets__margin-top) / -2));transform:translateY(calc(var(--vp-layout-slider--bullets__margin-top) / -2))}[data-vp-layout="slider"] .vp-portfolio__items-bullets{position:absolute;bottom:0;text-align:center;z-index:1}[data-vp-layout="slider"] .vp-portfolio__items-bullets.swiper-pagination-bullets-dynamic{font-size:1em}[data-vp-layout="slider"] .vp-portfolio__items-bullets>.swiper-pagination-bullet{position:relative;width:var(--vp-layout-slider--bullets__width);height:var(--vp-layout-slider--bullets__height);margin:0 calc(var(--vp-layout-slider--bullets__gap) / 2);cursor:pointer;background-color:var(--vp-layout-slider--bullets__background-color);border-radius:var(--vp-layout-slider--bullets__border-radius);opacity:var(--vp-layout-slider--bullets__opacity);-webkit-transition:var(--vp-layout-slider__transition-duration) opacity var(--vp-layout-slider__transition-easing);-o-transition:var(--vp-layout-slider__transition-duration) opacity var(--vp-layout-slider__transition-easing);transition:var(--vp-layout-slider__transition-duration) opacity var(--vp-layout-slider__transition-easing);will-change:opacity}[data-vp-layout="slider"] .vp-portfolio__items-bullets>.swiper-pagination-bullet:hover,[data-vp-layout="slider"] .vp-portfolio__items-bullets>.swiper-pagination-bullet:focus{opacity:var(--vp-layout-slider--bullets-hover__opacity)}[data-vp-layout="slider"] .vp-portfolio__items-bullets>.swiper-pagination-bullet.swiper-pagination-bullet-active{opacity:var(--vp-layout-slider--bullets-active__opacity)}[data-vp-layout="slider"] .vp-portfolio__items-bullets>.swiper-pagination-bullet::after{content:"";position:absolute;display:block;top:calc(-1 * var(--vp-layout-slider--bullets__compensation));left:calc(-1 * var(--vp-layout-slider--bullets__compensation));bottom:calc(-1 * var(--vp-layout-slider--bullets__compensation));right:calc(-1 * var(--vp-layout-slider--bullets__compensation))}[data-vp-layout="slider"] .vp-portfolio__thumbnails-wrap .vp-portfolio__thumbnail-wrap{cursor:pointer;opacity:var(--vp-layout-slider--thumbnails__opacity);-webkit-transition:var(--vp-layout-slider__transition-duration) opacity;-o-transition:var(--vp-layout-slider__transition-duration) opacity;transition:var(--vp-layout-slider__transition-duration) opacity}[data-vp-layout="slider"] .vp-portfolio__thumbnails-wrap .vp-portfolio__thumbnail-wrap:hover,[data-vp-layout="slider"] .vp-portfolio__thumbnails-wrap .vp-portfolio__thumbnail-wrap:focus{opacity:var(--vp-layout-slider--thumbnails-hover__opacity)}[data-vp-layout="slider"] .vp-portfolio__thumbnails-wrap .vp-portfolio__thumbnail-wrap.swiper-slide-thumb-active{opacity:var(--vp-layout-slider--thumbnails-active__opacity)}
|
assets/css/layout-slider.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.vp-portfolio{--vp-layout-slider--arrows__width: 2em;--vp-layout-slider--arrows__height: 2em;--vp-layout-slider--arrows__offset: 10px;--vp-layout-slider--arrows__compensation: 10px;--vp-layout-slider--arrows__color: var(--vp-color-gray);--vp-layout-slider--arrows__background-color: #fff;--vp-layout-slider--arrows__border-radius: 50%;--vp-layout-slider--arrows__box-shadow: 0 0 7px 2px rgba(0, 0, 0, .04);--vp-layout-slider--arrows__opacity: .5;--vp-layout-slider--arrows-hover__box-shadow: 0 2px 15px 2px rgba(0, 0, 0, .04);--vp-layout-slider--arrows-hover__opacity: 1;--vp-layout-slider--bullets__margin-top: 2em;--vp-layout-slider--bullets__width: .4em;--vp-layout-slider--bullets__height: .4em;--vp-layout-slider--bullets__gap: .4em;--vp-layout-slider--bullets__compensation: 4px;--vp-layout-slider--bullets__background-color: currentColor;--vp-layout-slider--bullets__border-radius: 50%;--vp-layout-slider--bullets__opacity: .2;--vp-layout-slider--bullets-hover__opacity: .5;--vp-layout-slider--bullets-active__opacity: 1;--vp-layout-slider--thumbnails__opacity: .5;--vp-layout-slider--thumbnails-hover__opacity: 1;--vp-layout-slider--thumbnails-active__opacity: 1;--vp-layout-slider__transition-duration: var(--vp-interactive__transition-duration);--vp-layout-slider__transition-easing: var(--vp-interactive__transition-easing)}[data-vp-layout="slider"] .vp-portfolio__item-img-wrap,[data-vp-layout="slider"] .vp-portfolio__thumbnail-img-wrap{position:relative;display:block;overflow:hidden}[data-vp-layout="slider"] .vp-portfolio__item-img-wrap::before,[data-vp-layout="slider"] .vp-portfolio__thumbnail-img-wrap::before{content:"";display:block}[data-vp-layout="slider"] .vp-portfolio__item-img img,[data-vp-layout="slider"] .vp-portfolio__thumbnail-img img{-o-object-fit:
|
1 |
+
.vp-portfolio{--vp-layout-slider--arrows__width: 2em;--vp-layout-slider--arrows__height: 2em;--vp-layout-slider--arrows__offset: 10px;--vp-layout-slider--arrows__compensation: 10px;--vp-layout-slider--arrows__color: var(--vp-color-gray);--vp-layout-slider--arrows__background-color: #fff;--vp-layout-slider--arrows__border-radius: 50%;--vp-layout-slider--arrows__box-shadow: 0 0 7px 2px rgba(0, 0, 0, .04);--vp-layout-slider--arrows__opacity: .5;--vp-layout-slider--arrows-hover__box-shadow: 0 2px 15px 2px rgba(0, 0, 0, .04);--vp-layout-slider--arrows-hover__opacity: 1;--vp-layout-slider--bullets__margin-top: 2em;--vp-layout-slider--bullets__width: .4em;--vp-layout-slider--bullets__height: .4em;--vp-layout-slider--bullets__gap: .4em;--vp-layout-slider--bullets__compensation: 4px;--vp-layout-slider--bullets__background-color: currentColor;--vp-layout-slider--bullets__border-radius: 50%;--vp-layout-slider--bullets__opacity: .2;--vp-layout-slider--bullets-hover__opacity: .5;--vp-layout-slider--bullets-active__opacity: 1;--vp-layout-slider--thumbnails__opacity: .5;--vp-layout-slider--thumbnails-hover__opacity: 1;--vp-layout-slider--thumbnails-active__opacity: 1;--vp-layout-slider__transition-duration: var(--vp-interactive__transition-duration);--vp-layout-slider__transition-easing: var(--vp-interactive__transition-easing)}[data-vp-layout="slider"] .vp-portfolio__item-img-wrap,[data-vp-layout="slider"] .vp-portfolio__thumbnail-img-wrap{position:relative;display:block;overflow:hidden}[data-vp-layout="slider"] .vp-portfolio__item-img-wrap::before,[data-vp-layout="slider"] .vp-portfolio__thumbnail-img-wrap::before{content:"";display:block}[data-vp-layout="slider"] .vp-portfolio__item-img img,[data-vp-layout="slider"] .vp-portfolio__thumbnail-img img{-o-object-fit:var(--vp-images__object-fit);object-fit:var(--vp-images__object-fit);-o-object-position:var(--vp-images__object-position);object-position:var(--vp-images__object-position);font-family:"object-fit: cover; object-position: 50% 50%;"}[data-vp-layout="slider"] .vp-portfolio__items-arrow{position:absolute;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;top:50%;width:var(--vp-layout-slider--arrows__width);height:var(--vp-layout-slider--arrows__height);margin-top:calc(-1 * var(--vp-layout-slider--arrows__height) / 2);color:var(--vp-layout-slider--arrow__color);cursor:pointer;background-color:var(--vp-layout-slider--arrows__background-color);border-radius:var(--vp-layout-slider--arrows__border-radius);-webkit-box-shadow:var(--vp-layout-slider--arrows__box-shadow);box-shadow:var(--vp-layout-slider--arrows__box-shadow);opacity:var(--vp-layout-slider--arrows__opacity);-webkit-transition:var(--vp-layout-slider__transition-duration) opacity var(--vp-layout-slider__transition-easing),var(--vp-layout-slider__transition-duration) box-shadow var(--vp-layout-slider__transition-easing);-o-transition:var(--vp-layout-slider__transition-duration) opacity var(--vp-layout-slider__transition-easing),var(--vp-layout-slider__transition-duration) box-shadow var(--vp-layout-slider__transition-easing);transition:var(--vp-layout-slider__transition-duration) opacity var(--vp-layout-slider__transition-easing),var(--vp-layout-slider__transition-duration) box-shadow var(--vp-layout-slider__transition-easing);will-change:opacity, box-shadow;z-index:1}[data-vp-layout="slider"] .vp-portfolio__items-arrow::after{content:"";position:absolute;display:block;top:calc(-1 * var(--vp-layout-slider--arrows__compensation));right:calc(-1 * var(--vp-layout-slider--arrows__compensation));bottom:calc(-1 * var(--vp-layout-slider--arrows__compensation));left:calc(-1 * var(--vp-layout-slider--arrows__compensation))}[data-vp-layout="slider"] .vp-portfolio__items-arrow:hover{-webkit-box-shadow:var(--vp-layout-slider--arrows-hover__box-shadow);box-shadow:var(--vp-layout-slider--arrows-hover__box-shadow);opacity:var(--vp-layout-slider--arrows-hover__opacity)}[data-vp-layout="slider"] .vp-portfolio__items-arrow-prev{left:var(--vp-layout-slider--arrows__offset)}[data-vp-layout="slider"] .vp-portfolio__items-arrow-next{right:var(--vp-layout-slider--arrows__offset)}[data-vp-layout="slider"][data-vp-slider-bullets="true"] .vp-portfolio__items-wrap{padding-bottom:var(--vp-layout-slider--bullets__margin-top)}[data-vp-layout="slider"][data-vp-slider-bullets="true"] .vp-portfolio__items-wrap .vp-portfolio__items-arrow{-webkit-transform:translateY(calc(var(--vp-layout-slider--bullets__margin-top) / -2));-ms-transform:translateY(calc(var(--vp-layout-slider--bullets__margin-top) / -2));transform:translateY(calc(var(--vp-layout-slider--bullets__margin-top) / -2))}[data-vp-layout="slider"] .vp-portfolio__items-bullets{position:absolute;bottom:0;text-align:center;z-index:1}[data-vp-layout="slider"] .vp-portfolio__items-bullets.swiper-pagination-bullets-dynamic{font-size:1em}[data-vp-layout="slider"] .vp-portfolio__items-bullets>.swiper-pagination-bullet{position:relative;width:var(--vp-layout-slider--bullets__width);height:var(--vp-layout-slider--bullets__height);margin:0 calc(var(--vp-layout-slider--bullets__gap) / 2);cursor:pointer;background-color:var(--vp-layout-slider--bullets__background-color);border-radius:var(--vp-layout-slider--bullets__border-radius);opacity:var(--vp-layout-slider--bullets__opacity);-webkit-transition:var(--vp-layout-slider__transition-duration) opacity var(--vp-layout-slider__transition-easing);-o-transition:var(--vp-layout-slider__transition-duration) opacity var(--vp-layout-slider__transition-easing);transition:var(--vp-layout-slider__transition-duration) opacity var(--vp-layout-slider__transition-easing);will-change:opacity}[data-vp-layout="slider"] .vp-portfolio__items-bullets>.swiper-pagination-bullet:hover,[data-vp-layout="slider"] .vp-portfolio__items-bullets>.swiper-pagination-bullet:focus{opacity:var(--vp-layout-slider--bullets-hover__opacity)}[data-vp-layout="slider"] .vp-portfolio__items-bullets>.swiper-pagination-bullet.swiper-pagination-bullet-active{opacity:var(--vp-layout-slider--bullets-active__opacity)}[data-vp-layout="slider"] .vp-portfolio__items-bullets>.swiper-pagination-bullet::after{content:"";position:absolute;display:block;top:calc(-1 * var(--vp-layout-slider--bullets__compensation));right:calc(-1 * var(--vp-layout-slider--bullets__compensation));bottom:calc(-1 * var(--vp-layout-slider--bullets__compensation));left:calc(-1 * var(--vp-layout-slider--bullets__compensation))}[data-vp-layout="slider"] .vp-portfolio__thumbnails-wrap .vp-portfolio__thumbnail-wrap{cursor:pointer;opacity:var(--vp-layout-slider--thumbnails__opacity);-webkit-transition:var(--vp-layout-slider__transition-duration) opacity;-o-transition:var(--vp-layout-slider__transition-duration) opacity;transition:var(--vp-layout-slider__transition-duration) opacity}[data-vp-layout="slider"] .vp-portfolio__thumbnails-wrap .vp-portfolio__thumbnail-wrap:hover,[data-vp-layout="slider"] .vp-portfolio__thumbnails-wrap .vp-portfolio__thumbnail-wrap:focus{opacity:var(--vp-layout-slider--thumbnails-hover__opacity)}[data-vp-layout="slider"] .vp-portfolio__thumbnails-wrap .vp-portfolio__thumbnail-wrap.swiper-slide-thumb-active{opacity:var(--vp-layout-slider--thumbnails-active__opacity)}
|
assets/css/layout-tiles-rtl.min.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
[data-vp-layout="tiles"] .vp-portfolio__item-img img,[data-vp-layout="tiles"] .vp-portfolio__item-img{position:absolute;top:0;left:0;bottom:0;right:0}[data-vp-layout="tiles"] .vp-portfolio__item-img-wrap{position:relative;display:block;overflow:hidden}[data-vp-layout="tiles"] .vp-portfolio__item-img-wrap::before{content:"";display:block;padding-top:56%}[data-vp-layout="tiles"] .vp-portfolio__item-img img{width:100%;height:100%;-o-object-fit:var(--vp-images__object-fit);object-fit:var(--vp-images__object-fit);-o-object-position:var(--vp-images__object-position);object-position:var(--vp-images__object-position);font-family:"object-fit: cover; object-position: 50% 50%;"}
|
assets/css/layout-tiles.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
[data-vp-layout="tiles"] .vp-portfolio__item-img img,[data-vp-layout="tiles"] .vp-portfolio__item-img{position:absolute;top:0;right:0;bottom:0;left:0}[data-vp-layout="tiles"] .vp-portfolio__item-img-wrap{position:relative;display:block;overflow:hidden}[data-vp-layout="tiles"] .vp-portfolio__item-img-wrap::before{content:"";display:block;padding-top:56%}[data-vp-layout="tiles"] .vp-portfolio__item-img img{width:100%;height:100%;-o-object-fit:
|
1 |
+
[data-vp-layout="tiles"] .vp-portfolio__item-img img,[data-vp-layout="tiles"] .vp-portfolio__item-img{position:absolute;top:0;right:0;bottom:0;left:0}[data-vp-layout="tiles"] .vp-portfolio__item-img-wrap{position:relative;display:block;overflow:hidden}[data-vp-layout="tiles"] .vp-portfolio__item-img-wrap::before{content:"";display:block;padding-top:56%}[data-vp-layout="tiles"] .vp-portfolio__item-img img{width:100%;height:100%;-o-object-fit:var(--vp-images__object-fit);object-fit:var(--vp-images__object-fit);-o-object-position:var(--vp-images__object-position);object-position:var(--vp-images__object-position);font-family:"object-fit: cover; object-position: 50% 50%;"}
|
assets/css/main-rtl.min.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
:root{--vp-color-brand: #2540cc;--vp-color-gray: #6c7781;--vp-color-gray-darken: #4b4b4b;--vp-color-gray-light: #e8e8e8;--vp-color-gray-lighten: #f7f7f7;--vp-border-radius: 5px;--vp-transition-duration: .3s;--vp-transition-easing: ease-in-out;--vp-interactive__transition-duration: .2s;--vp-interactive__transition-easing: ease-in-out}.vp-portfolio{--vp-wrap__min-height: 114px;--vp-elements__gap: 20px;--vp-images__object-fit: cover;--vp-images__object-position: 50% 50%;--vp-images-lazy__background: linear-gradient(-70deg, rgba(140, 140, 140, 0) 42%, rgba(140, 140, 140, .05) 50%, rgba(140, 140, 140, 0) 58%);--vp-images-lazy__background-color: rgba(140, 140, 140, .05);--vp-images-lazy__animation-duration: 3s}.vp-spinner{--vp-spinner__color: currentColor;--vp-spinner__size: 20px;--vp-spinner__border-size: 2px;--vp-spinner__speed: .3s;--vp-spinner--background__color: var(--vp-spinner__color);--vp-spinner--background__opacity: .3}.vp-portfolio{position:relative;min-height:var(--vp-wrap__min-height)}.vp-portfolio,.vp-portfolio *{-webkit-box-sizing:border-box;box-sizing:border-box}.vp-portfolio__items{-webkit-transition:var(--vp-transition-duration) height var(--vp-transition-easing),var(--vp-transition-duration) transform var(--vp-transition-easing);-o-transition:var(--vp-transition-duration) height var(--vp-transition-easing),var(--vp-transition-duration) transform var(--vp-transition-easing);transition:var(--vp-transition-duration) height var(--vp-transition-easing),var(--vp-transition-duration) transform var(--vp-transition-easing);will-change:height, transform}.vp-portfolio::after,.vp-portfolio__items::after{content:"";display:block;clear:both}.vp-portfolio__items-wrap,.vp-portfolio__thumbnails-wrap,.vp-portfolio__filter-wrap,.vp-portfolio__sort-wrap,.vp-portfolio__pagination-wrap,.vp-portfolio__item{position:relative;overflow:hidden}.vp-portfolio__items-wrap,.vp-portfolio__thumbnails-wrap,.vp-portfolio__layout-elements{margin-bottom:var(--vp-elements__gap);visibility:hidden;opacity:0;-webkit-transition:var(--vp-transition-duration) opacity,var(--vp-transition-duration) visibility;-o-transition:var(--vp-transition-duration) opacity,var(--vp-transition-duration) visibility;transition:var(--vp-transition-duration) opacity,var(--vp-transition-duration) visibility;will-change:opacity, visibility}.vp-portfolio>:last-child{margin-bottom:0}.vp-portfolio__item-wrap{position:relative;float:right;width:33.333%}.vp-svg-icon{display:inline-block;width:1em;height:1em;overflow:visible;font-size:inherit;vertical-align:-.125em}.vp-screen-reader-text{position:absolute !important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);word-break:normal;word-wrap:normal !important;border:0;-webkit-clip-path:inset(50%);clip-path:inset(50%)}.vp-screen-reader-text:focus{display:block;top:5px;left:5px;width:auto;height:auto;padding:15px 23px 14px;clip:auto !important;font-size:14px;font-size:.875rem;font-weight:700;line-height:normal;color:var(--vp-color-brand);text-decoration:none;background-color:#f1f1f1;border-radius:3px;-webkit-box-shadow:0 0 2px 2px rgba(0,0,0,0.6);box-shadow:0 0 2px 2px rgba(0,0,0,0.6);-webkit-clip-path:none;clip-path:none;z-index:100000}[data-vp-layout]:not([data-vp-layout="slider"]) .vp-portfolio__item-wrap{padding:0 !important;margin:0 !important}[data-vp-layout="slider"] .vp-portfolio__item-wrap{float:none;padding:0 !important;margin-top:0 !important;margin-bottom:0 !important;margin-right:0 !important}.vp-portfolio__item .vp-portfolio__item-img img,.vp-portfolio__item .vp-portfolio__item-img a,.vp-portfolio__item .vp-portfolio__thumbnail-img img{display:block;width:100%;height:auto}.vp-portfolio__item-img,.vp-portfolio__thumbnail-img{position:relative}.vp-portfolio__layout-elements{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;margin-top:calc(-1 * var(--vp-elements__gap));margin-right:calc(-1 * var(--vp-elements__gap))}.vp-portfolio__layout-elements>*{margin-top:var(--vp-elements__gap);margin-right:var(--vp-elements__gap)}.vp-portfolio__layout-elements-align-left{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start}.vp-portfolio__layout-elements-align-center{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.vp-portfolio__layout-elements-align-right{-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end}.vp-portfolio__layout-elements-align-between{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.vp-portfolio figure.vp-portfolio__item{margin:0}[class^="wp-block-"]:not(.wp-block-gallery) figcaption.vp-portfolio__item-meta,.vp-portfolio figcaption.vp-portfolio__item-meta{margin-bottom:0;font-style:inherit}.vp-portfolio__preloader-wrap{visibility:visible;opacity:1;-webkit-transition:var(--vp-transition-duration) opacity,var(--vp-transition-duration) visibility;-o-transition:var(--vp-transition-duration) opacity,var(--vp-transition-duration) visibility;transition:var(--vp-transition-duration) opacity,var(--vp-transition-duration) visibility;will-change:opacity, visibility}.vp-portfolio__preloader{position:absolute;right:50%;width:23px;height:24px;margin-top:45px;margin-right:-11px;-webkit-animation:vp-preloader 2s linear infinite;animation:vp-preloader 2s linear infinite}.vp-portfolio__preloader span{position:absolute;display:block;top:0;right:0;width:10px;height:7px;background-color:#8a8a8a}.vp-portfolio__preloader span:nth-of-type(1){height:14px}.vp-portfolio__preloader span:nth-of-type(2){right:12px}.vp-portfolio__preloader span:nth-of-type(3){top:16px}.vp-portfolio__preloader span:nth-of-type(4){top:9px;right:12px;height:14px}@-webkit-keyframes vp-preloader{0%,100%{opacity:.5}40%,60%{opacity:1}}@keyframes vp-preloader{0%,100%{opacity:.5}40%,60%{opacity:1}}.vp-portfolio.vp-portfolio__ready{min-height:initial}.vp-portfolio.vp-portfolio__ready .vp-portfolio__items-wrap,.vp-portfolio.vp-portfolio__ready .vp-portfolio__thumbnails-wrap,.vp-portfolio.vp-portfolio__ready .vp-portfolio__layout-elements{visibility:visible;opacity:1}.vp-portfolio.vp-portfolio__ready .vp-portfolio__preloader-wrap{visibility:hidden;opacity:0}.vp-portfolio.vp-portfolio__ready .vp-portfolio__preloader-wrap .vp-portfolio__preloader{-webkit-animation:none;animation:none}.vp-single-filter.vp-single-filter__ready .vp-portfolio__filter-wrap{visibility:visible;opacity:1}.vp-single-sort.vp-single-sort__ready .vp-portfolio__sort-wrap{visibility:visible;opacity:1}.vp-portfolio.vp-portfolio__loading::before{content:"";position:absolute;display:block;top:0;left:0;bottom:0;right:0;z-index:1}.vp-portfolio.vp-portfolio__loading .vp-portfolio__items-wrap,.vp-portfolio.vp-portfolio__loading .vp-portfolio__thumbnails-wrap,.vp-portfolio.vp-portfolio__loading .vp-portfolio__layout-elements{opacity:.5}.vp-portfolio__item-popup{display:none}img.visual-portfolio-lazyload{opacity:1;-webkit-transition:var(--vp-transition-duration) opacity;-o-transition:var(--vp-transition-duration) opacity;transition:var(--vp-transition-duration) opacity;will-change:opacity}.vp-portfolio__item-img::before,.vp-portfolio__thumbnail-img::before{content:"";position:absolute;top:0;left:0;bottom:0;right:0;background:var(--vp-images-lazy__background);background-color:var(--vp-images-lazy__background-color);background-position:100% 50%;background-size:500% 100%;-webkit-transition:var(--vp-transition-duration) var(--vp-transition-duration) opacity,var(--vp-transition-duration) var(--vp-transition-duration) visibility;-o-transition:var(--vp-transition-duration) var(--vp-transition-duration) opacity,var(--vp-transition-duration) var(--vp-transition-duration) visibility;transition:var(--vp-transition-duration) var(--vp-transition-duration) opacity,var(--vp-transition-duration) var(--vp-transition-duration) visibility}.vp-portfolio__item-img-lazyloading::before,.vp-portfolio__thumbnail-img-lazyloading::before{visibility:visible;opacity:1;-webkit-transition:none;-o-transition:none;transition:none;-webkit-animation:vp-lazyload-placeholder var(--vp-images-lazy__animation-duration) linear infinite;animation:vp-lazyload-placeholder var(--vp-images-lazy__animation-duration) linear infinite}.vp-portfolio__item-img-lazyloading img.visual-portfolio-lazyload,.vp-portfolio__thumbnail-img-lazyloading img.visual-portfolio-lazyload{opacity:0}@-webkit-keyframes vp-lazyload-placeholder{0%,80%{background-position:0% 50%}100%{background-position:100% 50%}}@keyframes vp-lazyload-placeholder{0%,80%{background-position:0% 50%}100%{background-position:100% 50%}}.vp-spinner{position:relative;display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:var(--vp-spinner__size);height:var(--vp-spinner__size);text-indent:-9999em;border:var(--vp-spinner__border-size) solid transparent;border-right:var(--vp-spinner__border-size) solid var(--vp-spinner__color);border-radius:50%;-webkit-animation:vp-spinner var(--vp-spinner__speed) infinite linear;animation:vp-spinner var(--vp-spinner__speed) infinite linear}.vp-spinner::after{content:"";position:absolute;display:block;top:calc(-1 * var(--vp-spinner__border-size));left:calc(-1 * var(--vp-spinner__border-size));bottom:calc(-1 * var(--vp-spinner__border-size));right:calc(-1 * var(--vp-spinner__border-size));border:var(--vp-spinner__border-size) solid var(--vp-spinner--background__color);border-radius:50%;opacity:var(--vp-spinner--background__opacity)}@-webkit-keyframes vp-spinner{100%{-webkit-transform:rotate(-360deg);transform:rotate(-360deg)}}@keyframes vp-spinner{100%{-webkit-transform:rotate(-360deg);transform:rotate(-360deg)}}
|
assets/css/main.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
:root{--vp-color-brand: #2540cc;--vp-color-gray: #6c7781;--vp-color-gray-darken: #4b4b4b;--vp-color-gray-light: #e8e8e8;--vp-color-gray-lighten: #f7f7f7;--vp-border-radius: 5px;--vp-transition-duration: .3s;--vp-transition-easing: ease-in-out;--vp-interactive__transition-duration: .2s;--vp-interactive__transition-easing: ease-in-out}.vp-portfolio{--vp-wrap__min-height: 114px;--vp-elements__gap: 20px;--vp-images-lazy__background: linear-gradient(-70deg, rgba(140, 140, 140, 0) 42%, rgba(140, 140, 140, .05) 50%, rgba(140, 140, 140, 0) 58%);--vp-images-lazy__background-color: rgba(140, 140, 140, .05);--vp-images-lazy__animation-duration: 3s}.vp-spinner{--vp-spinner__color: currentColor;--vp-spinner__size: 20px;--vp-spinner__border-size: 2px;--vp-spinner__speed: .3s;--vp-spinner--background__color: var(--vp-spinner__color);--vp-spinner--background__opacity: .3}.vp-portfolio{position:relative;min-height:var(--vp-wrap__min-height)}.vp-portfolio,.vp-portfolio *{-webkit-box-sizing:border-box;box-sizing:border-box}.vp-portfolio__items{-webkit-transition:var(--vp-transition-duration) height var(--vp-transition-easing),var(--vp-transition-duration) transform var(--vp-transition-easing);-o-transition:var(--vp-transition-duration) height var(--vp-transition-easing),var(--vp-transition-duration) transform var(--vp-transition-easing);transition:var(--vp-transition-duration) height var(--vp-transition-easing),var(--vp-transition-duration) transform var(--vp-transition-easing);will-change:height, transform}.vp-portfolio::after,.vp-portfolio__items::after{content:"";display:block;clear:both}.vp-portfolio__items-wrap,.vp-portfolio__thumbnails-wrap,.vp-portfolio__filter-wrap,.vp-portfolio__sort-wrap,.vp-portfolio__pagination-wrap,.vp-portfolio__item{position:relative;overflow:hidden}.vp-portfolio__items-wrap,.vp-portfolio__thumbnails-wrap,.vp-portfolio__layout-elements{margin-bottom:var(--vp-elements__gap);visibility:hidden;opacity:0;-webkit-transition:var(--vp-transition-duration) opacity,var(--vp-transition-duration) visibility;-o-transition:var(--vp-transition-duration) opacity,var(--vp-transition-duration) visibility;transition:var(--vp-transition-duration) opacity,var(--vp-transition-duration) visibility;will-change:opacity, visibility}.vp-portfolio>:last-child{margin-bottom:0}.vp-portfolio__item-wrap{position:relative;float:left;width:33.333%}.vp-svg-icon{display:inline-block;width:1em;height:1em;overflow:visible;font-size:inherit;vertical-align:-.125em}.vp-screen-reader-text{position:absolute !important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);word-break:normal;word-wrap:normal !important;border:0;-webkit-clip-path:inset(50%);clip-path:inset(50%)}.vp-screen-reader-text:focus{display:block;top:5px;right:5px;width:auto;height:auto;padding:15px 23px 14px;clip:auto !important;font-size:14px;font-size:.875rem;font-weight:700;line-height:normal;color:var(--vp-color-brand);text-decoration:none;background-color:#f1f1f1;border-radius:3px;-webkit-box-shadow:0 0 2px 2px rgba(0,0,0,0.6);box-shadow:0 0 2px 2px rgba(0,0,0,0.6);-webkit-clip-path:none;clip-path:none;z-index:100000}[data-vp-layout]:not([data-vp-layout="slider"]) .vp-portfolio__item-wrap{padding:0 !important;margin:0 !important}[data-vp-layout="slider"] .vp-portfolio__item-wrap{float:none;padding:0 !important;margin-top:0 !important;margin-bottom:0 !important;margin-left:0 !important}.vp-portfolio__item .vp-portfolio__item-img img,.vp-portfolio__item .vp-portfolio__item-img a,.vp-portfolio__item .vp-portfolio__thumbnail-img img{display:block;width:100%;height:auto}.vp-portfolio__item-img,.vp-portfolio__thumbnail-img{position:relative}.vp-portfolio__layout-elements{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;margin-top:calc(-1 * var(--vp-elements__gap));margin-left:calc(-1 * var(--vp-elements__gap))}.vp-portfolio__layout-elements>*{margin-top:var(--vp-elements__gap);margin-left:var(--vp-elements__gap)}.vp-portfolio__layout-elements-align-left{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start}.vp-portfolio__layout-elements-align-center{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.vp-portfolio__layout-elements-align-right{-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end}.vp-portfolio__layout-elements-align-between{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.vp-portfolio figure.vp-portfolio__item{margin:0}[class^="wp-block-"]:not(.wp-block-gallery) figcaption.vp-portfolio__item-meta,.vp-portfolio figcaption.vp-portfolio__item-meta{margin-bottom:0;font-style:inherit}.vp-portfolio__preloader-wrap{visibility:visible;opacity:1;-webkit-transition:var(--vp-transition-duration) opacity,var(--vp-transition-duration) visibility;-o-transition:var(--vp-transition-duration) opacity,var(--vp-transition-duration) visibility;transition:var(--vp-transition-duration) opacity,var(--vp-transition-duration) visibility;will-change:opacity, visibility}.vp-portfolio__preloader{position:absolute;left:50%;width:23px;height:24px;margin-top:45px;margin-left:-11px;-webkit-animation:vp-preloader 2s linear infinite;animation:vp-preloader 2s linear infinite}.vp-portfolio__preloader span{position:absolute;display:block;top:0;left:0;width:10px;height:7px;background-color:#8a8a8a}.vp-portfolio__preloader span:nth-of-type(1){height:14px}.vp-portfolio__preloader span:nth-of-type(2){left:12px}.vp-portfolio__preloader span:nth-of-type(3){top:16px}.vp-portfolio__preloader span:nth-of-type(4){top:9px;left:12px;height:14px}@-webkit-keyframes vp-preloader{0%,100%{opacity:.5}40%,60%{opacity:1}}@keyframes vp-preloader{0%,100%{opacity:.5}40%,60%{opacity:1}}.vp-portfolio.vp-portfolio__ready{min-height:initial}.vp-portfolio.vp-portfolio__ready .vp-portfolio__items-wrap,.vp-portfolio.vp-portfolio__ready .vp-portfolio__thumbnails-wrap,.vp-portfolio.vp-portfolio__ready .vp-portfolio__layout-elements{visibility:visible;opacity:1}.vp-portfolio.vp-portfolio__ready .vp-portfolio__preloader-wrap{visibility:hidden;opacity:0}.vp-portfolio.vp-portfolio__ready .vp-portfolio__preloader-wrap .vp-portfolio__preloader{-webkit-animation:none;animation:none}.vp-single-filter.vp-single-filter__ready .vp-portfolio__filter-wrap{visibility:visible;opacity:1}.vp-single-sort.vp-single-sort__ready .vp-portfolio__sort-wrap{visibility:visible;opacity:1}.vp-portfolio.vp-portfolio__loading::before{content:"";position:absolute;display:block;top:0;right:0;bottom:0;left:0;z-index:1}.vp-portfolio.vp-portfolio__loading .vp-portfolio__items-wrap,.vp-portfolio.vp-portfolio__loading .vp-portfolio__thumbnails-wrap,.vp-portfolio.vp-portfolio__loading .vp-portfolio__layout-elements{opacity:.5}.vp-portfolio__item-popup{display:none}img.visual-portfolio-lazyload{opacity:1;-webkit-transition:var(--vp-transition-duration) opacity;-o-transition:var(--vp-transition-duration) opacity;transition:var(--vp-transition-duration) opacity;will-change:opacity}.vp-portfolio__item-img::before,.vp-portfolio__thumbnail-img::before{content:"";position:absolute;top:0;right:0;bottom:0;left:0;background:var(--vp-images-lazy__background);background-color:var(--vp-images-lazy__background-color);background-position:0% 50%;background-size:500% 100%;-webkit-transition:var(--vp-transition-duration) var(--vp-transition-duration) opacity,var(--vp-transition-duration) var(--vp-transition-duration) visibility;-o-transition:var(--vp-transition-duration) var(--vp-transition-duration) opacity,var(--vp-transition-duration) var(--vp-transition-duration) visibility;transition:var(--vp-transition-duration) var(--vp-transition-duration) opacity,var(--vp-transition-duration) var(--vp-transition-duration) visibility}.vp-portfolio__item-img-lazyloading::before,.vp-portfolio__thumbnail-img-lazyloading::before{visibility:visible;opacity:1;-webkit-transition:none;-o-transition:none;transition:none;-webkit-animation:vp-lazyload-placeholder var(--vp-images-lazy__animation-duration) linear infinite;animation:vp-lazyload-placeholder var(--vp-images-lazy__animation-duration) linear infinite}.vp-portfolio__item-img-lazyloading img.visual-portfolio-lazyload,.vp-portfolio__thumbnail-img-lazyloading img.visual-portfolio-lazyload{opacity:0}@-webkit-keyframes vp-lazyload-placeholder{0%,80%{background-position:100% 50%}100%{background-position:0% 50%}}@keyframes vp-lazyload-placeholder{0%,80%{background-position:100% 50%}100%{background-position:0% 50%}}.vp-spinner{position:relative;display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:var(--vp-spinner__size);height:var(--vp-spinner__size);text-indent:-9999em;border:var(--vp-spinner__border-size) solid transparent;border-left:var(--vp-spinner__border-size) solid var(--vp-spinner__color);border-radius:50%;-webkit-animation:vp-spinner var(--vp-spinner__speed) infinite linear;animation:vp-spinner var(--vp-spinner__speed) infinite linear}.vp-spinner::after{content:"";position:absolute;display:block;top:calc(-1 * var(--vp-spinner__border-size));right:calc(-1 * var(--vp-spinner__border-size));bottom:calc(-1 * var(--vp-spinner__border-size));left:calc(-1 * var(--vp-spinner__border-size));border:var(--vp-spinner__border-size) solid var(--vp-spinner--background__color);border-radius:50%;opacity:var(--vp-spinner--background__opacity)}@-webkit-keyframes vp-spinner{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes vp-spinner{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}
|
1 |
+
:root{--vp-color-brand: #2540cc;--vp-color-gray: #6c7781;--vp-color-gray-darken: #4b4b4b;--vp-color-gray-light: #e8e8e8;--vp-color-gray-lighten: #f7f7f7;--vp-border-radius: 5px;--vp-transition-duration: .3s;--vp-transition-easing: ease-in-out;--vp-interactive__transition-duration: .2s;--vp-interactive__transition-easing: ease-in-out}.vp-portfolio{--vp-wrap__min-height: 114px;--vp-elements__gap: 20px;--vp-images__object-fit: cover;--vp-images__object-position: 50% 50%;--vp-images-lazy__background: linear-gradient(-70deg, rgba(140, 140, 140, 0) 42%, rgba(140, 140, 140, .05) 50%, rgba(140, 140, 140, 0) 58%);--vp-images-lazy__background-color: rgba(140, 140, 140, .05);--vp-images-lazy__animation-duration: 3s}.vp-spinner{--vp-spinner__color: currentColor;--vp-spinner__size: 20px;--vp-spinner__border-size: 2px;--vp-spinner__speed: .3s;--vp-spinner--background__color: var(--vp-spinner__color);--vp-spinner--background__opacity: .3}.vp-portfolio{position:relative;min-height:var(--vp-wrap__min-height)}.vp-portfolio,.vp-portfolio *{-webkit-box-sizing:border-box;box-sizing:border-box}.vp-portfolio__items{-webkit-transition:var(--vp-transition-duration) height var(--vp-transition-easing),var(--vp-transition-duration) transform var(--vp-transition-easing);-o-transition:var(--vp-transition-duration) height var(--vp-transition-easing),var(--vp-transition-duration) transform var(--vp-transition-easing);transition:var(--vp-transition-duration) height var(--vp-transition-easing),var(--vp-transition-duration) transform var(--vp-transition-easing);will-change:height, transform}.vp-portfolio::after,.vp-portfolio__items::after{content:"";display:block;clear:both}.vp-portfolio__items-wrap,.vp-portfolio__thumbnails-wrap,.vp-portfolio__filter-wrap,.vp-portfolio__sort-wrap,.vp-portfolio__pagination-wrap,.vp-portfolio__item{position:relative;overflow:hidden}.vp-portfolio__items-wrap,.vp-portfolio__thumbnails-wrap,.vp-portfolio__layout-elements{margin-bottom:var(--vp-elements__gap);visibility:hidden;opacity:0;-webkit-transition:var(--vp-transition-duration) opacity,var(--vp-transition-duration) visibility;-o-transition:var(--vp-transition-duration) opacity,var(--vp-transition-duration) visibility;transition:var(--vp-transition-duration) opacity,var(--vp-transition-duration) visibility;will-change:opacity, visibility}.vp-portfolio>:last-child{margin-bottom:0}.vp-portfolio__item-wrap{position:relative;float:left;width:33.333%}.vp-svg-icon{display:inline-block;width:1em;height:1em;overflow:visible;font-size:inherit;vertical-align:-.125em}.vp-screen-reader-text{position:absolute !important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);word-break:normal;word-wrap:normal !important;border:0;-webkit-clip-path:inset(50%);clip-path:inset(50%)}.vp-screen-reader-text:focus{display:block;top:5px;right:5px;width:auto;height:auto;padding:15px 23px 14px;clip:auto !important;font-size:14px;font-size:.875rem;font-weight:700;line-height:normal;color:var(--vp-color-brand);text-decoration:none;background-color:#f1f1f1;border-radius:3px;-webkit-box-shadow:0 0 2px 2px rgba(0,0,0,0.6);box-shadow:0 0 2px 2px rgba(0,0,0,0.6);-webkit-clip-path:none;clip-path:none;z-index:100000}[data-vp-layout]:not([data-vp-layout="slider"]) .vp-portfolio__item-wrap{padding:0 !important;margin:0 !important}[data-vp-layout="slider"] .vp-portfolio__item-wrap{float:none;padding:0 !important;margin-top:0 !important;margin-bottom:0 !important;margin-left:0 !important}.vp-portfolio__item .vp-portfolio__item-img img,.vp-portfolio__item .vp-portfolio__item-img a,.vp-portfolio__item .vp-portfolio__thumbnail-img img{display:block;width:100%;height:auto}.vp-portfolio__item-img,.vp-portfolio__thumbnail-img{position:relative}.vp-portfolio__layout-elements{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;margin-top:calc(-1 * var(--vp-elements__gap));margin-left:calc(-1 * var(--vp-elements__gap))}.vp-portfolio__layout-elements>*{margin-top:var(--vp-elements__gap);margin-left:var(--vp-elements__gap)}.vp-portfolio__layout-elements-align-left{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start}.vp-portfolio__layout-elements-align-center{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.vp-portfolio__layout-elements-align-right{-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end}.vp-portfolio__layout-elements-align-between{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.vp-portfolio figure.vp-portfolio__item{margin:0}[class^="wp-block-"]:not(.wp-block-gallery) figcaption.vp-portfolio__item-meta,.vp-portfolio figcaption.vp-portfolio__item-meta{margin-bottom:0;font-style:inherit}.vp-portfolio__preloader-wrap{visibility:visible;opacity:1;-webkit-transition:var(--vp-transition-duration) opacity,var(--vp-transition-duration) visibility;-o-transition:var(--vp-transition-duration) opacity,var(--vp-transition-duration) visibility;transition:var(--vp-transition-duration) opacity,var(--vp-transition-duration) visibility;will-change:opacity, visibility}.vp-portfolio__preloader{position:absolute;left:50%;width:23px;height:24px;margin-top:45px;margin-left:-11px;-webkit-animation:vp-preloader 2s linear infinite;animation:vp-preloader 2s linear infinite}.vp-portfolio__preloader span{position:absolute;display:block;top:0;left:0;width:10px;height:7px;background-color:#8a8a8a}.vp-portfolio__preloader span:nth-of-type(1){height:14px}.vp-portfolio__preloader span:nth-of-type(2){left:12px}.vp-portfolio__preloader span:nth-of-type(3){top:16px}.vp-portfolio__preloader span:nth-of-type(4){top:9px;left:12px;height:14px}@-webkit-keyframes vp-preloader{0%,100%{opacity:.5}40%,60%{opacity:1}}@keyframes vp-preloader{0%,100%{opacity:.5}40%,60%{opacity:1}}.vp-portfolio.vp-portfolio__ready{min-height:initial}.vp-portfolio.vp-portfolio__ready .vp-portfolio__items-wrap,.vp-portfolio.vp-portfolio__ready .vp-portfolio__thumbnails-wrap,.vp-portfolio.vp-portfolio__ready .vp-portfolio__layout-elements{visibility:visible;opacity:1}.vp-portfolio.vp-portfolio__ready .vp-portfolio__preloader-wrap{visibility:hidden;opacity:0}.vp-portfolio.vp-portfolio__ready .vp-portfolio__preloader-wrap .vp-portfolio__preloader{-webkit-animation:none;animation:none}.vp-single-filter.vp-single-filter__ready .vp-portfolio__filter-wrap{visibility:visible;opacity:1}.vp-single-sort.vp-single-sort__ready .vp-portfolio__sort-wrap{visibility:visible;opacity:1}.vp-portfolio.vp-portfolio__loading::before{content:"";position:absolute;display:block;top:0;right:0;bottom:0;left:0;z-index:1}.vp-portfolio.vp-portfolio__loading .vp-portfolio__items-wrap,.vp-portfolio.vp-portfolio__loading .vp-portfolio__thumbnails-wrap,.vp-portfolio.vp-portfolio__loading .vp-portfolio__layout-elements{opacity:.5}.vp-portfolio__item-popup{display:none}img.visual-portfolio-lazyload{opacity:1;-webkit-transition:var(--vp-transition-duration) opacity;-o-transition:var(--vp-transition-duration) opacity;transition:var(--vp-transition-duration) opacity;will-change:opacity}.vp-portfolio__item-img::before,.vp-portfolio__thumbnail-img::before{content:"";position:absolute;top:0;right:0;bottom:0;left:0;background:var(--vp-images-lazy__background);background-color:var(--vp-images-lazy__background-color);background-position:0% 50%;background-size:500% 100%;-webkit-transition:var(--vp-transition-duration) var(--vp-transition-duration) opacity,var(--vp-transition-duration) var(--vp-transition-duration) visibility;-o-transition:var(--vp-transition-duration) var(--vp-transition-duration) opacity,var(--vp-transition-duration) var(--vp-transition-duration) visibility;transition:var(--vp-transition-duration) var(--vp-transition-duration) opacity,var(--vp-transition-duration) var(--vp-transition-duration) visibility}.vp-portfolio__item-img-lazyloading::before,.vp-portfolio__thumbnail-img-lazyloading::before{visibility:visible;opacity:1;-webkit-transition:none;-o-transition:none;transition:none;-webkit-animation:vp-lazyload-placeholder var(--vp-images-lazy__animation-duration) linear infinite;animation:vp-lazyload-placeholder var(--vp-images-lazy__animation-duration) linear infinite}.vp-portfolio__item-img-lazyloading img.visual-portfolio-lazyload,.vp-portfolio__thumbnail-img-lazyloading img.visual-portfolio-lazyload{opacity:0}@-webkit-keyframes vp-lazyload-placeholder{0%,80%{background-position:100% 50%}100%{background-position:0% 50%}}@keyframes vp-lazyload-placeholder{0%,80%{background-position:100% 50%}100%{background-position:0% 50%}}.vp-spinner{position:relative;display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:var(--vp-spinner__size);height:var(--vp-spinner__size);text-indent:-9999em;border:var(--vp-spinner__border-size) solid transparent;border-left:var(--vp-spinner__border-size) solid var(--vp-spinner__color);border-radius:50%;-webkit-animation:vp-spinner var(--vp-spinner__speed) infinite linear;animation:vp-spinner var(--vp-spinner__speed) infinite linear}.vp-spinner::after{content:"";position:absolute;display:block;top:calc(-1 * var(--vp-spinner__border-size));right:calc(-1 * var(--vp-spinner__border-size));bottom:calc(-1 * var(--vp-spinner__border-size));left:calc(-1 * var(--vp-spinner__border-size));border:var(--vp-spinner__border-size) solid var(--vp-spinner--background__color);border-radius:50%;opacity:var(--vp-spinner--background__opacity)}@-webkit-keyframes vp-spinner{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes vp-spinner{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}
|
assets/css/noscript-rtl.min.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
.vp-portfolio__preloader-wrap{display:none}.vp-portfolio__items-wrap,.vp-portfolio__filter-wrap,.vp-portfolio__sort-wrap,.vp-portfolio__pagination-wrap{visibility:visible;opacity:1}.vp-portfolio__item .vp-portfolio__item-img noscript+img{display:none}.vp-portfolio__thumbnails-wrap{display:none}
|
assets/css/popup-fancybox-rtl.min.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
.vp-pswp,.vp-fancybox{--vp-popup__z-index: 1500}.vp-fancybox{z-index:var(--vp-popup__z-index)}body.admin-bar .vp-fancybox{top:32px;height:calc(100% - 32px)}@media screen and (max-width: 782px){body.admin-bar .vp-fancybox{top:42px;height:calc(100% - 42px)}}@media screen and (max-width: 600px){body.admin-bar .vp-fancybox{top:0;height:100%}}.vp-fancybox .fancybox-caption__body{font-size:12px;color:#fff}.vp-fancybox .fancybox-caption__body h3{color:inherit}.vp-fancybox .fancybox-caption__body a{color:inherit}.vp-fancybox .fancybox-caption__body a:hover{opacity:.8}.vp-fancybox .fancybox-caption__body .vp-portfolio__item-meta-title{margin-top:0;margin-bottom:3px;font-size:14px;color:inherit}.vp-fancybox .fancybox-caption__body .vp-portfolio__item-meta-title a{text-decoration:none}
|
assets/css/popup-photoswipe-rtl.min.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
.vp-pswp,.vp-fancybox{--vp-popup__z-index: 1500}.vp-pswp{z-index:var(--vp-popup__z-index)}body.admin-bar .vp-pswp{top:32px;height:calc(100% - 32px)}@media screen and (max-width: 782px){body.admin-bar .vp-pswp{top:42px;height:calc(100% - 42px)}}@media screen and (max-width: 600px){body.admin-bar .vp-pswp{top:0;height:100%}}.vp-pswp .pswp__caption{background-color:rgba(0,0,0,0.75)}.vp-pswp .pswp__caption>div{max-width:600px;font-size:12px;color:#fff}.vp-pswp .pswp__caption h3{color:inherit}.vp-pswp .pswp__caption a{color:inherit}.vp-pswp .pswp__caption a:hover{opacity:.8}.vp-pswp .pswp__caption .vp-portfolio__item-meta-title{margin-top:0;margin-bottom:3px;font-size:14px;color:inherit}.vp-pswp .pswp__caption .vp-portfolio__item-meta-title a{text-decoration:none}.vp-pswp .pswp__preloader{position:absolute;left:0;bottom:0;z-index:1}.vp-pswp .vp-pswp-video{position:relative;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;width:100%;max-width:1920px;height:100%;margin:0 auto;line-height:0;text-align:right;vertical-align:middle;z-index:1045}.vp-pswp .vp-pswp-video>div{position:relative;width:100%;height:0;padding-bottom:56.25%}.vp-pswp .vp-pswp-video>div iframe{position:absolute;top:0;right:0;width:100%;height:100%;margin:0}.vp-pswp .vp-pswp-video>div video{width:100% !important;height:auto !important;margin:0}
|
assets/css/theme-twentyfifteen-rtl.min.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
.entry-content .vp-portfolio__item-meta-title{margin-top:0}.vp-preview-body{background:none}.vp-filter__item,.vp-sort__item,.vp-sort select,.vp-portfolio__item-meta-category,.vp-pagination__item{font-family:"Noto Sans", sans-serif}.entry-content .vp-portfolio__item-meta-title a,.entry-content .vp-filter__item a,.entry-content .vp-sort__item a,.entry-content .vp-portfolio__item-meta-category a,.entry-content .vp-pagination__item a,.entry-content .vp-portfolio__item-img a{border:none}.wp-block-visual-portfolio[class^="wp-block-"].vp-portfolio__items-style-fade figcaption,.wp-block-visual-portfolio[class^="wp-block-"].vp-portfolio__items-style-fly figcaption{padding:0}
|
assets/css/theme-twentynineteen-rtl.min.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
.entry .entry-content .vp-portfolio a{text-decoration:none}.entry-content .vp-portfolio__item-meta-title{margin-top:0}.vp-portfolio__item-meta-title::before{content:none}.vp-filter__item,.vp-sort__item,.vp-sort select,.vp-portfolio__item-meta-category,.vp-pagination__item{font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif}
|
assets/css/theme-twentyseventeen-rtl.min.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
.entry-content .vp-portfolio a,.entry-content .vp-portfolio a:hover,.entry-content .vp-portfolio a:focus{-webkit-box-shadow:none;box-shadow:none}.entry-content .vp-portfolio__item-meta-title{padding-top:0;font-family:"Libre Franklin", "Helvetica Neue", helvetica, arial, sans-serif;font-weight:600}.wp-block-visual-portfolio[class^="wp-block-"]:not(.wp-block-gallery) figcaption{margin-bottom:0;font-style:inherit;text-align:center}.vp-portfolio__items-style-fade .vp-portfolio__item-meta:hover,.vp-portfolio__items-style-fade .vp-portfolio__item-meta:focus,.vp-portfolio__items-style-fly .vp-portfolio__item-meta:hover,.vp-portfolio__items-style-fly .vp-portfolio__item-meta:focus{color:inherit}
|
assets/css/theme-twentysixteen-rtl.min.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
.vp-preview-body{background:none}.entry-content .vp-portfolio__item-meta-title{margin-top:0}.vp-portfolio__item-meta-title,.vp-filter__item,.vp-sort__item,.vp-sort select,.vp-portfolio__item-meta-category,.vp-pagination__item{font-family:Montserrat, "Helvetica Neue", sans-serif}
|
assets/css/theme-twentytwenty-rtl.min.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
.entry-content .vp-portfolio__item-meta-title{margin-top:0}.vp-portfolio__item figcaption{margin-top:0}.vp-preview-body{background:none}.vp-filter__item,.vp-sort__item,.vp-sort select,.vp-portfolio__item-meta-category,.vp-pagination__item{font-family:"Inter var", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, sans-serif}.vp-filter__style-default{--vp-filter-default--items__font-size: .7em}.vp-filter__style-minimal{--vp-filter-minimal--items__font-size: .7em}.vp-filter__style-dropdown{--vp-filter-dropdown--items__font-size: .7em}.vp-sort__style-default{--vp-sort-default--items__font-size: .7em}.vp-sort__style-minimal{--vp-sort-minimal--items__font-size: .7em}.vp-sort__style-dropdown{--vp-sort-dropdown--items__font-size: .7em}.vp-pagination__style-default{--vp-pagination-default--items__font-size: .7em}.vp-pagination__style-minimal{--vp-pagination-minimal--items__font-size: .7em}
|
assets/js/main.js
CHANGED
@@ -465,6 +465,14 @@ class VP {
|
|
465 |
stretch();
|
466 |
}
|
467 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
468 |
// on filter click
|
469 |
self.$filter.on( `click${ evp }`, '.vp-filter .vp-filter__item a', function( e ) {
|
470 |
e.preventDefault();
|
465 |
stretch();
|
466 |
}
|
467 |
|
468 |
+
// add helper focus class
|
469 |
+
self.$item.on( `focus${ evp }`, '.vp-portfolio__item a', function() {
|
470 |
+
$( this ).closest( '.vp-portfolio__item' ).addClass( 'vp-portfolio__item-focus' );
|
471 |
+
} );
|
472 |
+
self.$item.on( `blur${ evp }`, '.vp-portfolio__item a', function() {
|
473 |
+
$( this ).closest( '.vp-portfolio__item' ).removeClass( 'vp-portfolio__item-focus' );
|
474 |
+
} );
|
475 |
+
|
476 |
// on filter click
|
477 |
self.$filter.on( `click${ evp }`, '.vp-filter .vp-filter__item a', function( e ) {
|
478 |
e.preventDefault();
|
assets/js/main.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(t){var i={};function e(o){if(i[o])return i[o].exports;var n=i[o]={i:o,l:!1,exports:{}};return t[o].call(n.exports,n,n.exports,e),n.l=!0,n.exports}e.m=t,e.c=i,e.d=function(t,i,o){e.o(t,i)||Object.defineProperty(t,i,{enumerable:!0,get:o})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,i){if(1&i&&(t=e(t)),8&i)return t;if(4&i&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(e.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&i&&"string"!=typeof t)for(var n in t)e.d(o,n,function(i){return t[i]}.bind(null,n));return o},e.n=function(t){var i=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(i,"a",i),i},e.o=function(t,i){return Object.prototype.hasOwnProperty.call(t,i)},e.p="",e(e.s=235)}({18:function(t,i){function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var o;o=function(){return this}();try{o=o||new Function("return this")()}catch(t){"object"===("undefined"==typeof window?"undefined":e(window))&&(o=window)}t.exports=o},217:function(t,i,e){var o=e(237),n=o.requestAnimationFrame||o.webkitRequestAnimationFrame||o.mozRequestAnimationFrame||function(t){var i=+new Date,e=Math.max(0,16-(i-s)),o=setTimeout(t,e);return s=i,o},s=+new Date;var a=o.cancelAnimationFrame||o.webkitCancelAnimationFrame||o.mozCancelAnimationFrame||clearTimeout;Function.prototype.bind&&(n=n.bind(o),a=a.bind(o)),(t.exports=n).cancel=a},235:function(t,i,e){t.exports=e(236)},236:function(t,i,e){"use strict";e.r(i);var o=e(4),n=e(217),s=e.n(n);function a(t){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function r(t,i){for(var e=0;e<i.length;e++){var o=i[e];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}var l=window,c=l.jQuery,f=l.VPData,d=l.objectFitImages,p=f.__,v=c(window);function u(){if("function"==typeof window.Event)window.dispatchEvent(new window.Event("resize"));else{var t=window.document.createEvent("UIEvents");t.initUIEvent("resize",!0,!1,window,0),window.dispatchEvent(t)}}void 0!==d&&(d(".vp-portfolio img:not(.visual-portfolio-lazyload)"),c(document).on("lazybeforeunveil",(function(t){var i=c(t.target);i.hasClass("visual-portfolio-lazyload")&&i.one("load",(function(){d(i[0])}))})));var h={},m=!1,y=!1;function g(){if(clearTimeout(y),m){var t=c(".vp-portfolio__ready");if(t.length){var i=!1;t.each((function(){var t=this.vpf;if(t){var e=h[t.uid]||"none";h[t.uid]=null===this.offsetParent?"hidden":"visible","hidden"===e&&"visible"===h[t.uid]&&(i=!0)}})),i&&u()}else m=!1;y=setTimeout(g,500)}}c(document).on("inited.vpf",(function(t){"vpf"===t.namespace&&(m=!0,g())}));var _=function(){function t(i,e){!function(t,i){if(!(t instanceof i))throw new TypeError("Cannot call a class as a function")}(this,t);this.$item=i;for(var o=i[0].className.split(/\s+/),n=0;n<o.length;n+=1)o[n]&&/^vp-uid-/.test(o[n])&&(this.uid=o[n].replace(/^vp-uid-/,"")),o[n]&&/^vp-id-/.test(o[n])&&(this.id=o[n].replace(/^vp-id-/,""));this.uid?(this.href=window.location.href,this.$items_wrap=i.find(".vp-portfolio__items"),this.$slider_thumbnails_wrap=i.find(".vp-portfolio__thumbnails"),this.$pagination=i.find(".vp-portfolio__pagination-wrap"),this.$filter=i.find(".vp-portfolio__filter-wrap"),this.$sort=i.find(".vp-portfolio__sort-wrap"),this.id&&(this.$filter=this.$filter.add(".vp-single-filter.vp-id-".concat(this.id," .vp-portfolio__filter-wrap"))),this.id&&(this.$sort=this.$sort.add(".vp-single-sort.vp-id-".concat(this.id," .vp-portfolio__sort-wrap"))),this.userOptions=e,this.firstRun=!0,this.init()):console.error(p.couldnt_retrieve_vp)}var i,e,o;return i=t,(e=[{key:"emitEvent",value:function(t,i){i=i?[this].concat(i):[this],this.$item.trigger("".concat(t,".vpf"),i),this.$item.trigger("".concat(t,".vpf-uid-").concat(this.uid),i)}},{key:"init",value:function(){this.firstRun||this.destroy(),this.destroyed=!1,this.removeNoscriptTags(this.$items_wrap),this.initOptions(),this.initEvents(),this.prepareLazyLoad(),this.initLayout(),this.initCustomColors(),this.emitEvent("init"),this.$item.addClass("vp-portfolio__ready"),this.id&&(c(".vp-single-filter.vp-id-".concat(this.id)).addClass("vp-single-filter__ready"),c(".vp-single-sort.vp-id-".concat(this.id)).addClass("vp-single-sort__ready")),this.resized(),this.imagesLoaded(),this.emitEvent("inited"),this.firstRun=!1}},{key:"isPreview",value:function(){return!!this.$item.closest("#vp_preview").length}},{key:"resized",value:function(){u(),this.emitEvent("resized")}},{key:"imagesLoaded",value:function(){var t=this;this.$items_wrap.imagesLoaded&&this.$items_wrap.imagesLoaded((function(){t.emitEvent("imagesLoaded")}))}},{key:"destroy",value:function(){this.$item.removeClass("vp-portfolio__ready"),this.id&&(c(".vp-single-filter.vp-id-".concat(this.id)).removeClass("vp-single-filter__ready"),c(".vp-single-sort.vp-id-".concat(this.id)).removeClass("vp-single-sort__ready")),this.destroyEvents(),this.removeStyle(),this.renderStyle(),this.emitEvent("destroy"),this.destroyed=!0}},{key:"addStyle",value:function(t,i,e){e=e||"";var o=this.uid;this.stylesList||(this.stylesList={}),void 0===this.stylesList[o]&&(this.stylesList[o]={}),void 0===this.stylesList[o][e]&&(this.stylesList[o][e]={}),void 0===this.stylesList[o][e][t]&&(this.stylesList[o][e][t]={}),this.stylesList[o][e][t]=c.extend(this.stylesList[o][e][t],i),this.emitEvent("addStyle",[t,i,e,this.stylesList])}},{key:"removeStyle",value:function(t,i,e){e=e||"";var o=this.uid;this.stylesList||(this.stylesList={}),void 0===this.stylesList[o]||t||(this.stylesList[o]={}),void 0!==this.stylesList[o]&&void 0!==this.stylesList[o][e]&&void 0!==this.stylesList[o][e][t]&&t&&delete this.stylesList[o][e][t],this.emitEvent("removeStyle",[t,i,this.stylesList])}},{key:"renderStyle",value:function(){var t=this,i=t.uid,e="";t.stylesList||(t.stylesList={}),void 0!==t.stylesList[i]&&Object.keys(t.stylesList[i]).forEach((function(o){o&&(e+="@media ".concat(o," {")),Object.keys(t.stylesList[i][o]).forEach((function(n){e+=".vp-uid-".concat(i," ").concat(n," {"),Object.keys(t.stylesList[i][o][n]).forEach((function(s){e+="".concat(s,":").concat(t.stylesList[i][o][n][s],";")})),e+="}"})),o&&(e+="}")}));var o=c("#vp-style-".concat(i));o.length||(o=c("<style>").attr("id","vp-style-".concat(i)).appendTo("head")),o.html(e),t.emitEvent("renderStyle",[e,t.stylesList,o])}},{key:"firstToLowerCase",value:function(t){return t.substr(0,1).toLowerCase()+t.substr(1)}},{key:"initOptions",value:function(t){var i=this;i.defaults={layout:"tile",itemsGap:0,pagination:"load-more"},t&&(i.userOptions=t);var e=i.$item[0].dataset,o={};Object.keys(e).forEach((function(t){t&&"vp"===t.substring(0,2)&&(o[i.firstToLowerCase(t.substring(2))]=e[t])})),i.options=c.extend({},i.defaults,o,i.userOptions),i.emitEvent("initOptions")}},{key:"initEvents",value:function(){var t,i=this,e=".vpf-uid-".concat(i.uid);function o(){var t=i.$item[0].getBoundingClientRect(),e=t.left,o=window.innerWidth-t.right,n=parseFloat(i.$item.css("margin-left")||0),s=parseFloat(i.$item.css("margin-right")||0);i.$item.css({"margin-left":n-e,"margin-right":s-o})}function n(){var e=i.$item[0].getBoundingClientRect();0<e.bottom&&e.bottom-250<=window.innerHeight&&i.loadNewItems(i.options.nextPageUrl,!1,(function(){clearTimeout(t),t=setTimeout((function(){n()}),300)}))}i.$item.hasClass("vp-portfolio__stretch")&&!i.isPreview()&&(v.on("load".concat(e," resize").concat(e," orientationchange").concat(e),(function(){o()})),o()),i.$filter.on("click".concat(e),".vp-filter .vp-filter__item a",(function(t){t.preventDefault();var e=c(this);i.loading||e.closest(".vp-filter__item").addClass("vp-filter__item-active").siblings().removeClass("vp-filter__item-active"),i.loadNewItems(e.attr("href"),!0)})),i.$sort.on("click".concat(e),".vp-sort .vp-sort__item a",(function(t){t.preventDefault();var e=c(this);i.loading||e.closest(".vp-sort__item").addClass("vp-sort__item-active").siblings().removeClass("vp-sort__item-active"),i.loadNewItems(e.attr("href"),!0)})),i.$filter.add(i.$sort).on("change".concat(e),".vp-filter select, .vp-sort select",(function(){var t=c(this),e=t.val(),o=t.find('[value="'.concat(e,'"]'));o.length&&i.loadNewItems(o.attr("data-vp-url"),!0)})),i.$item.on("click".concat(e),".vp-pagination .vp-pagination__item a",(function(t){t.preventDefault();var e=c(this),o=e.closest(".vp-pagination");if((!o.hasClass("vp-pagination__no-more")||"paged"===i.options.pagination)&&(i.loadNewItems(e.attr("href"),"paged"===i.options.pagination),"paged"===i.options.pagination&&o.hasClass("vp-pagination__scroll-top"))){var n=c("#wpadminbar"),s=window.pageYOffset||document.documentElement.scrollTop,a=i.$item.offset().top;o.attr("data-vp-pagination-scroll-top")&&(a-=parseInt(o.attr("data-vp-pagination-scroll-top"),10)||0),n.length&&"fixed"===n.css("position")&&(a-=n.outerHeight()),s>(a=Math.max(0,a))&&window.scrollTo({top:a,behavior:"smooth"})}})),i.$item.on("click".concat(e),".vp-portfolio__items .vp-portfolio__item-meta-category a",(function(t){t.preventDefault(),t.stopPropagation(),i.loadNewItems(c(this).attr("href"),!0)})),"infinite"===i.options.pagination&&(v.on("load".concat(e," scroll").concat(e," resize").concat(e," orientationchange").concat(e),(function(){clearTimeout(t),t=setTimeout((function(){n()}),60)})),n()),i.$item.on("transitionend".concat(e),".vp-portfolio__items",(function(t){t.currentTarget===t.target&&i.resized()})),i.emitEvent("initEvents")}},{key:"destroyEvents",value:function(){var t=".vpf-uid-".concat(this.uid);this.$item.off(t),this.$filter.off(t),this.$sort.off(t),v.off(t),this.emitEvent("destroyEvents")}},{key:"prepareLazyLoad",value:function(){var t=window.lazySizes&&window.lazySizes.cfg?window.lazySizes.cfg:window.lazySizesConfig;if(t){var i={"data-vpf-src":t.srcAttr,"data-vpf-sizes":t.sizesAttr,"data-vpf-srcset":t.srcsetAttr};this.$items_wrap.add(this.$slider_thumbnails_wrap).find(".visual-portfolio-lazyload:not(.".concat(t.lazyClass,")")).each((function(){var e=c(this);Object.keys(i).forEach((function(t){i[t]&&t!==i[t]&&e.attr(t)&&(e.attr(i[t],e.attr(t)),e.removeAttr(t))})),e.addClass(t.lazyClass)}))}}},{key:"removeNoscriptTags",value:function(t){t.find("noscript").remove()}},{key:"initLayout",value:function(){this.emitEvent("initLayout"),this.renderStyle()}},{key:"initCustomColors",value:function(){var t=this;t.$item.find("[data-vp-bg-color]").each((function(){var i=c(this).attr("data-vp-bg-color");t.addStyle('[data-vp-bg-color="'.concat(i,'"]'),{"background-color":"".concat(i," !important")})})),t.$item.find("[data-vp-text-color]").each((function(){var i=c(this).attr("data-vp-text-color");t.addStyle('[data-vp-text-color="'.concat(i,'"]'),{color:"".concat(i," !important")})})),t.renderStyle(),t.emitEvent("initCustomColors")}},{key:"addItems",value:function(t,i,e){this.removeNoscriptTags(t),this.emitEvent("addItems",[t,i,e])}},{key:"removeItems",value:function(t){this.emitEvent("removeItems",[t])}},{key:"loadNewItems",value:function(t,i,e){var o=this;if(!o.loading&&t&&o.href!==t){var n={method:"POST",url:t,complete:function(n){var s=n.responseText;o.href=t,o.replaceItems(s,i,e)}};o.loading=!0,o.$item.addClass("vp-portfolio__loading"),o.emitEvent("startLoadingNewItems",[t,n]),c.ajax(n)}}},{key:"replaceItems",value:function(t,i,e){if(t){t=t.replace("<body",'<body><div id="vp-infinite-load-body"').replace("</body>","</div></body>");var o=c(t).filter("#vp-infinite-load-body"),n=o.find(".vp-portfolio.vp-uid-".concat(this.uid));if(n.length){var s=n.find(".vp-portfolio__items").html();n.hasClass("vp-portfolio-not-found")?(this.$item.find(".vp-portfolio__items-wrap").before(n.find(".vp-notice").clone()),this.$item.addClass("vp-portfolio-not-found")):(this.$item.find(".vp-notice").remove(),this.$item.removeClass("vp-portfolio-not-found")),this.$filter.length&&this.$filter.each((function(){var t=c(this),i="";i=t.parent().hasClass("vp-single-filter")?o.find('[class="'.concat(t.parent().attr("class").replace(" vp-single-filter__ready",""),'"] .vp-portfolio__filter-wrap')).html():n.find(".vp-portfolio__filter-wrap").html(),t.html(i)})),this.$sort.length&&this.$sort.each((function(){var t=c(this),i="";i=t.parent().hasClass("vp-single-sort")?o.find('[class="'.concat(t.parent().attr("class").replace(" vp-single-sort__ready",""),'"] .vp-portfolio__sort-wrap')).html():n.find(".vp-portfolio__sort-wrap").html(),t.html(i)})),this.$pagination.length&&this.$pagination.html(n.find(".vp-portfolio__pagination-wrap").html()),this.addItems(c(s),i,n),this.emitEvent("loadedNewItems",[n,i,t]),e&&e()}var a=n.attr("data-vp-next-page-url");this.options.nextPageUrl=a,this.$item.attr("data-vp-next-page-url",a),this.$item.removeClass("vp-portfolio__loading"),this.loading=!1,this.emitEvent("endLoadingNewItems"),this.prepareLazyLoad(),this.imagesLoaded(),this.initCustomColors()}}}])&&r(i.prototype,e),o&&r(i,o),t}();c(document).on("lazybeforeunveil",(function(t){var i=c(t.target);i.hasClass("visual-portfolio-lazyload")&&(i.closest(".vp-portfolio__item-img").addClass("vp-portfolio__item-img-lazyloading"),i.closest(".vp-portfolio__thumbnail-img").addClass("vp-portfolio__thumbnail-img-lazyloading"))})),c(document).on("lazyloaded",(function(t){var i=c(t.target);i.hasClass("visual-portfolio-lazyload")&&(i.closest(".vp-portfolio__item-img-lazyloading").removeClass("vp-portfolio__item-img-lazyloading"),i.closest(".vp-portfolio__thumbnail-img-lazyloading").removeClass("vp-portfolio__thumbnail-img-lazyloading"))})),c(".elementor").length&&c(document).on("init.vpf addItems.vpf",(function(t,i){"vpf"===t.namespace&&i.$item.find(".vp-portfolio__item a").each((function(){/\.(png|jpe?g|gif|svg)(\?.*)?$/i.test(this.href)&&c(this).attr("data-elementor-open-lightbox","no")}))})),c(document).trigger("extendClass.vpf",[_]);var w=function(t){for(var i=arguments.length,e=new Array(i>1?i-1:0),o=1;o<i;o++)e[o-1]=arguments[o];var n;return this.each((function(){if(void 0===n)if("object"===a(t)||void 0===t)this.vpf||(this.vpf=new _(c(this),t));else if(this.vpf){var i;n=(i=this.vpf)[t].apply(i,e)}})),void 0!==n?n:this};w.constructor=_;var b=c.fn.vpf;c.fn.vpf=w,c.fn.vpf.noConflict=function(){return c.fn.vpf=b,this},c(".vp-portfolio").vpf(),c((function(){c(".vp-portfolio").vpf()}));var $=Object(o.b)(200,(function(){s()((function(){c(".vp-portfolio:not(.vp-portfolio__ready)").vpf()}))}));window.MutationObserver?new window.MutationObserver($).observe(document.documentElement,{childList:!0,subtree:!0}):c(document).on("DOMContentLoaded DOMNodeInserted load",(function(){$()}))},237:function(t,i,e){(function(i){var e;e="undefined"!=typeof window?window:void 0!==i?i:"undefined"!=typeof self?self:{},t.exports=e}).call(this,e(18))},4:function(t,i,e){"use strict";function o(t,i,e,o){var n,s=!1,a=0;function r(){n&&clearTimeout(n)}function l(){var l=this,c=Date.now()-a,f=arguments;function d(){a=Date.now(),e.apply(l,f)}function p(){n=void 0}s||(o&&!n&&d(),r(),void 0===o&&c>t?d():!0!==i&&(n=setTimeout(o?p:d,void 0===o?t-c:t)))}return"boolean"!=typeof i&&(o=e,e=i,i=void 0),l.cancel=function(){r(),s=!0},l}function n(t,i,e){return void 0===e?o(t,i,!1):o(t,e,!1!==i)}e.d(i,"b",(function(){return o})),e.d(i,"a",(function(){return n}))}});
|
1 |
+
!function(t){var i={};function e(o){if(i[o])return i[o].exports;var n=i[o]={i:o,l:!1,exports:{}};return t[o].call(n.exports,n,n.exports,e),n.l=!0,n.exports}e.m=t,e.c=i,e.d=function(t,i,o){e.o(t,i)||Object.defineProperty(t,i,{enumerable:!0,get:o})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,i){if(1&i&&(t=e(t)),8&i)return t;if(4&i&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(e.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&i&&"string"!=typeof t)for(var n in t)e.d(o,n,function(i){return t[i]}.bind(null,n));return o},e.n=function(t){var i=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(i,"a",i),i},e.o=function(t,i){return Object.prototype.hasOwnProperty.call(t,i)},e.p="",e(e.s=235)}({18:function(t,i){function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var o;o=function(){return this}();try{o=o||new Function("return this")()}catch(t){"object"===("undefined"==typeof window?"undefined":e(window))&&(o=window)}t.exports=o},217:function(t,i,e){var o=e(237),n=o.requestAnimationFrame||o.webkitRequestAnimationFrame||o.mozRequestAnimationFrame||function(t){var i=+new Date,e=Math.max(0,16-(i-s)),o=setTimeout(t,e);return s=i,o},s=+new Date;var a=o.cancelAnimationFrame||o.webkitCancelAnimationFrame||o.mozCancelAnimationFrame||clearTimeout;Function.prototype.bind&&(n=n.bind(o),a=a.bind(o)),(t.exports=n).cancel=a},235:function(t,i,e){t.exports=e(236)},236:function(t,i,e){"use strict";e.r(i);var o=e(3),n=e(217),s=e.n(n);function a(t){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function r(t,i){for(var e=0;e<i.length;e++){var o=i[e];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}var l=window,c=l.jQuery,f=l.VPData,p=l.objectFitImages,d=f.__,v=c(window);function u(){if("function"==typeof window.Event)window.dispatchEvent(new window.Event("resize"));else{var t=window.document.createEvent("UIEvents");t.initUIEvent("resize",!0,!1,window,0),window.dispatchEvent(t)}}void 0!==p&&(p(".vp-portfolio img:not(.visual-portfolio-lazyload)"),c(document).on("lazybeforeunveil",(function(t){var i=c(t.target);i.hasClass("visual-portfolio-lazyload")&&i.one("load",(function(){p(i[0])}))})));var m={},h=!1,y=!1;function g(){if(clearTimeout(y),h){var t=c(".vp-portfolio__ready");if(t.length){var i=!1;t.each((function(){var t=this.vpf;if(t){var e=m[t.uid]||"none";m[t.uid]=null===this.offsetParent?"hidden":"visible","hidden"===e&&"visible"===m[t.uid]&&(i=!0)}})),i&&u()}else h=!1;y=setTimeout(g,500)}}c(document).on("inited.vpf",(function(t){"vpf"===t.namespace&&(h=!0,g())}));var _=function(){function t(i,e){!function(t,i){if(!(t instanceof i))throw new TypeError("Cannot call a class as a function")}(this,t);this.$item=i;for(var o=i[0].className.split(/\s+/),n=0;n<o.length;n+=1)o[n]&&/^vp-uid-/.test(o[n])&&(this.uid=o[n].replace(/^vp-uid-/,"")),o[n]&&/^vp-id-/.test(o[n])&&(this.id=o[n].replace(/^vp-id-/,""));this.uid?(this.href=window.location.href,this.$items_wrap=i.find(".vp-portfolio__items"),this.$slider_thumbnails_wrap=i.find(".vp-portfolio__thumbnails"),this.$pagination=i.find(".vp-portfolio__pagination-wrap"),this.$filter=i.find(".vp-portfolio__filter-wrap"),this.$sort=i.find(".vp-portfolio__sort-wrap"),this.id&&(this.$filter=this.$filter.add(".vp-single-filter.vp-id-".concat(this.id," .vp-portfolio__filter-wrap"))),this.id&&(this.$sort=this.$sort.add(".vp-single-sort.vp-id-".concat(this.id," .vp-portfolio__sort-wrap"))),this.userOptions=e,this.firstRun=!0,this.init()):console.error(d.couldnt_retrieve_vp)}var i,e,o;return i=t,(e=[{key:"emitEvent",value:function(t,i){i=i?[this].concat(i):[this],this.$item.trigger("".concat(t,".vpf"),i),this.$item.trigger("".concat(t,".vpf-uid-").concat(this.uid),i)}},{key:"init",value:function(){this.firstRun||this.destroy(),this.destroyed=!1,this.removeNoscriptTags(this.$items_wrap),this.initOptions(),this.initEvents(),this.prepareLazyLoad(),this.initLayout(),this.initCustomColors(),this.emitEvent("init"),this.$item.addClass("vp-portfolio__ready"),this.id&&(c(".vp-single-filter.vp-id-".concat(this.id)).addClass("vp-single-filter__ready"),c(".vp-single-sort.vp-id-".concat(this.id)).addClass("vp-single-sort__ready")),this.resized(),this.imagesLoaded(),this.emitEvent("inited"),this.firstRun=!1}},{key:"isPreview",value:function(){return!!this.$item.closest("#vp_preview").length}},{key:"resized",value:function(){u(),this.emitEvent("resized")}},{key:"imagesLoaded",value:function(){var t=this;this.$items_wrap.imagesLoaded&&this.$items_wrap.imagesLoaded((function(){t.emitEvent("imagesLoaded")}))}},{key:"destroy",value:function(){this.$item.removeClass("vp-portfolio__ready"),this.id&&(c(".vp-single-filter.vp-id-".concat(this.id)).removeClass("vp-single-filter__ready"),c(".vp-single-sort.vp-id-".concat(this.id)).removeClass("vp-single-sort__ready")),this.destroyEvents(),this.removeStyle(),this.renderStyle(),this.emitEvent("destroy"),this.destroyed=!0}},{key:"addStyle",value:function(t,i,e){e=e||"";var o=this.uid;this.stylesList||(this.stylesList={}),void 0===this.stylesList[o]&&(this.stylesList[o]={}),void 0===this.stylesList[o][e]&&(this.stylesList[o][e]={}),void 0===this.stylesList[o][e][t]&&(this.stylesList[o][e][t]={}),this.stylesList[o][e][t]=c.extend(this.stylesList[o][e][t],i),this.emitEvent("addStyle",[t,i,e,this.stylesList])}},{key:"removeStyle",value:function(t,i,e){e=e||"";var o=this.uid;this.stylesList||(this.stylesList={}),void 0===this.stylesList[o]||t||(this.stylesList[o]={}),void 0!==this.stylesList[o]&&void 0!==this.stylesList[o][e]&&void 0!==this.stylesList[o][e][t]&&t&&delete this.stylesList[o][e][t],this.emitEvent("removeStyle",[t,i,this.stylesList])}},{key:"renderStyle",value:function(){var t=this,i=t.uid,e="";t.stylesList||(t.stylesList={}),void 0!==t.stylesList[i]&&Object.keys(t.stylesList[i]).forEach((function(o){o&&(e+="@media ".concat(o," {")),Object.keys(t.stylesList[i][o]).forEach((function(n){e+=".vp-uid-".concat(i," ").concat(n," {"),Object.keys(t.stylesList[i][o][n]).forEach((function(s){e+="".concat(s,":").concat(t.stylesList[i][o][n][s],";")})),e+="}"})),o&&(e+="}")}));var o=c("#vp-style-".concat(i));o.length||(o=c("<style>").attr("id","vp-style-".concat(i)).appendTo("head")),o.html(e),t.emitEvent("renderStyle",[e,t.stylesList,o])}},{key:"firstToLowerCase",value:function(t){return t.substr(0,1).toLowerCase()+t.substr(1)}},{key:"initOptions",value:function(t){var i=this;i.defaults={layout:"tile",itemsGap:0,pagination:"load-more"},t&&(i.userOptions=t);var e=i.$item[0].dataset,o={};Object.keys(e).forEach((function(t){t&&"vp"===t.substring(0,2)&&(o[i.firstToLowerCase(t.substring(2))]=e[t])})),i.options=c.extend({},i.defaults,o,i.userOptions),i.emitEvent("initOptions")}},{key:"initEvents",value:function(){var t,i=this,e=".vpf-uid-".concat(i.uid);function o(){var t=i.$item[0].getBoundingClientRect(),e=t.left,o=window.innerWidth-t.right,n=parseFloat(i.$item.css("margin-left")||0),s=parseFloat(i.$item.css("margin-right")||0);i.$item.css({"margin-left":n-e,"margin-right":s-o})}function n(){var e=i.$item[0].getBoundingClientRect();0<e.bottom&&e.bottom-250<=window.innerHeight&&i.loadNewItems(i.options.nextPageUrl,!1,(function(){clearTimeout(t),t=setTimeout((function(){n()}),300)}))}i.$item.hasClass("vp-portfolio__stretch")&&!i.isPreview()&&(v.on("load".concat(e," resize").concat(e," orientationchange").concat(e),(function(){o()})),o()),i.$item.on("focus".concat(e),".vp-portfolio__item a",(function(){c(this).closest(".vp-portfolio__item").addClass("vp-portfolio__item-focus")})),i.$item.on("blur".concat(e),".vp-portfolio__item a",(function(){c(this).closest(".vp-portfolio__item").removeClass("vp-portfolio__item-focus")})),i.$filter.on("click".concat(e),".vp-filter .vp-filter__item a",(function(t){t.preventDefault();var e=c(this);i.loading||e.closest(".vp-filter__item").addClass("vp-filter__item-active").siblings().removeClass("vp-filter__item-active"),i.loadNewItems(e.attr("href"),!0)})),i.$sort.on("click".concat(e),".vp-sort .vp-sort__item a",(function(t){t.preventDefault();var e=c(this);i.loading||e.closest(".vp-sort__item").addClass("vp-sort__item-active").siblings().removeClass("vp-sort__item-active"),i.loadNewItems(e.attr("href"),!0)})),i.$filter.add(i.$sort).on("change".concat(e),".vp-filter select, .vp-sort select",(function(){var t=c(this),e=t.val(),o=t.find('[value="'.concat(e,'"]'));o.length&&i.loadNewItems(o.attr("data-vp-url"),!0)})),i.$item.on("click".concat(e),".vp-pagination .vp-pagination__item a",(function(t){t.preventDefault();var e=c(this),o=e.closest(".vp-pagination");if((!o.hasClass("vp-pagination__no-more")||"paged"===i.options.pagination)&&(i.loadNewItems(e.attr("href"),"paged"===i.options.pagination),"paged"===i.options.pagination&&o.hasClass("vp-pagination__scroll-top"))){var n=c("#wpadminbar"),s=window.pageYOffset||document.documentElement.scrollTop,a=i.$item.offset().top;o.attr("data-vp-pagination-scroll-top")&&(a-=parseInt(o.attr("data-vp-pagination-scroll-top"),10)||0),n.length&&"fixed"===n.css("position")&&(a-=n.outerHeight()),s>(a=Math.max(0,a))&&window.scrollTo({top:a,behavior:"smooth"})}})),i.$item.on("click".concat(e),".vp-portfolio__items .vp-portfolio__item-meta-category a",(function(t){t.preventDefault(),t.stopPropagation(),i.loadNewItems(c(this).attr("href"),!0)})),"infinite"===i.options.pagination&&(v.on("load".concat(e," scroll").concat(e," resize").concat(e," orientationchange").concat(e),(function(){clearTimeout(t),t=setTimeout((function(){n()}),60)})),n()),i.$item.on("transitionend".concat(e),".vp-portfolio__items",(function(t){t.currentTarget===t.target&&i.resized()})),i.emitEvent("initEvents")}},{key:"destroyEvents",value:function(){var t=".vpf-uid-".concat(this.uid);this.$item.off(t),this.$filter.off(t),this.$sort.off(t),v.off(t),this.emitEvent("destroyEvents")}},{key:"prepareLazyLoad",value:function(){var t=window.lazySizes&&window.lazySizes.cfg?window.lazySizes.cfg:window.lazySizesConfig;if(t){var i={"data-vpf-src":t.srcAttr,"data-vpf-sizes":t.sizesAttr,"data-vpf-srcset":t.srcsetAttr};this.$items_wrap.add(this.$slider_thumbnails_wrap).find(".visual-portfolio-lazyload:not(.".concat(t.lazyClass,")")).each((function(){var e=c(this);Object.keys(i).forEach((function(t){i[t]&&t!==i[t]&&e.attr(t)&&(e.attr(i[t],e.attr(t)),e.removeAttr(t))})),e.addClass(t.lazyClass)}))}}},{key:"removeNoscriptTags",value:function(t){t.find("noscript").remove()}},{key:"initLayout",value:function(){this.emitEvent("initLayout"),this.renderStyle()}},{key:"initCustomColors",value:function(){var t=this;t.$item.find("[data-vp-bg-color]").each((function(){var i=c(this).attr("data-vp-bg-color");t.addStyle('[data-vp-bg-color="'.concat(i,'"]'),{"background-color":"".concat(i," !important")})})),t.$item.find("[data-vp-text-color]").each((function(){var i=c(this).attr("data-vp-text-color");t.addStyle('[data-vp-text-color="'.concat(i,'"]'),{color:"".concat(i," !important")})})),t.renderStyle(),t.emitEvent("initCustomColors")}},{key:"addItems",value:function(t,i,e){this.removeNoscriptTags(t),this.emitEvent("addItems",[t,i,e])}},{key:"removeItems",value:function(t){this.emitEvent("removeItems",[t])}},{key:"loadNewItems",value:function(t,i,e){var o=this;if(!o.loading&&t&&o.href!==t){var n={method:"POST",url:t,complete:function(n){var s=n.responseText;o.href=t,o.replaceItems(s,i,e)}};o.loading=!0,o.$item.addClass("vp-portfolio__loading"),o.emitEvent("startLoadingNewItems",[t,n]),c.ajax(n)}}},{key:"replaceItems",value:function(t,i,e){if(t){t=t.replace("<body",'<body><div id="vp-infinite-load-body"').replace("</body>","</div></body>");var o=c(t).filter("#vp-infinite-load-body"),n=o.find(".vp-portfolio.vp-uid-".concat(this.uid));if(n.length){var s=n.find(".vp-portfolio__items").html();n.hasClass("vp-portfolio-not-found")?(this.$item.find(".vp-portfolio__items-wrap").before(n.find(".vp-notice").clone()),this.$item.addClass("vp-portfolio-not-found")):(this.$item.find(".vp-notice").remove(),this.$item.removeClass("vp-portfolio-not-found")),this.$filter.length&&this.$filter.each((function(){var t=c(this),i="";i=t.parent().hasClass("vp-single-filter")?o.find('[class="'.concat(t.parent().attr("class").replace(" vp-single-filter__ready",""),'"] .vp-portfolio__filter-wrap')).html():n.find(".vp-portfolio__filter-wrap").html(),t.html(i)})),this.$sort.length&&this.$sort.each((function(){var t=c(this),i="";i=t.parent().hasClass("vp-single-sort")?o.find('[class="'.concat(t.parent().attr("class").replace(" vp-single-sort__ready",""),'"] .vp-portfolio__sort-wrap')).html():n.find(".vp-portfolio__sort-wrap").html(),t.html(i)})),this.$pagination.length&&this.$pagination.html(n.find(".vp-portfolio__pagination-wrap").html()),this.addItems(c(s),i,n),this.emitEvent("loadedNewItems",[n,i,t]),e&&e()}var a=n.attr("data-vp-next-page-url");this.options.nextPageUrl=a,this.$item.attr("data-vp-next-page-url",a),this.$item.removeClass("vp-portfolio__loading"),this.loading=!1,this.emitEvent("endLoadingNewItems"),this.prepareLazyLoad(),this.imagesLoaded(),this.initCustomColors()}}}])&&r(i.prototype,e),o&&r(i,o),t}();c(document).on("lazybeforeunveil",(function(t){var i=c(t.target);i.hasClass("visual-portfolio-lazyload")&&(i.closest(".vp-portfolio__item-img").addClass("vp-portfolio__item-img-lazyloading"),i.closest(".vp-portfolio__thumbnail-img").addClass("vp-portfolio__thumbnail-img-lazyloading"))})),c(document).on("lazyloaded",(function(t){var i=c(t.target);i.hasClass("visual-portfolio-lazyload")&&(i.closest(".vp-portfolio__item-img-lazyloading").removeClass("vp-portfolio__item-img-lazyloading"),i.closest(".vp-portfolio__thumbnail-img-lazyloading").removeClass("vp-portfolio__thumbnail-img-lazyloading"))})),c(".elementor").length&&c(document).on("init.vpf addItems.vpf",(function(t,i){"vpf"===t.namespace&&i.$item.find(".vp-portfolio__item a").each((function(){/\.(png|jpe?g|gif|svg)(\?.*)?$/i.test(this.href)&&c(this).attr("data-elementor-open-lightbox","no")}))})),c(document).trigger("extendClass.vpf",[_]);var w=function(t){for(var i=arguments.length,e=new Array(i>1?i-1:0),o=1;o<i;o++)e[o-1]=arguments[o];var n;return this.each((function(){if(void 0===n)if("object"===a(t)||void 0===t)this.vpf||(this.vpf=new _(c(this),t));else if(this.vpf){var i;n=(i=this.vpf)[t].apply(i,e)}})),void 0!==n?n:this};w.constructor=_;var b=c.fn.vpf;c.fn.vpf=w,c.fn.vpf.noConflict=function(){return c.fn.vpf=b,this},c(".vp-portfolio").vpf(),c((function(){c(".vp-portfolio").vpf()}));var $=Object(o.b)(200,(function(){s()((function(){c(".vp-portfolio:not(.vp-portfolio__ready)").vpf()}))}));window.MutationObserver?new window.MutationObserver($).observe(document.documentElement,{childList:!0,subtree:!0}):c(document).on("DOMContentLoaded DOMNodeInserted load",(function(){$()}))},237:function(t,i,e){(function(i){var e;e="undefined"!=typeof window?window:void 0!==i?i:"undefined"!=typeof self?self:{},t.exports=e}).call(this,e(18))},3:function(t,i,e){"use strict";function o(t,i,e,o){var n,s=!1,a=0;function r(){n&&clearTimeout(n)}function l(){var l=this,c=Date.now()-a,f=arguments;function p(){a=Date.now(),e.apply(l,f)}function d(){n=void 0}s||(o&&!n&&p(),r(),void 0===o&&c>t?p():!0!==i&&(n=setTimeout(o?d:p,void 0===o?t-c:t)))}return"boolean"!=typeof i&&(o=e,e=i,i=void 0),l.cancel=function(){r(),s=!0},l}function n(t,i,e){return void 0===e?o(t,i,!1):o(t,e,!1!==i)}e.d(i,"b",(function(){return o})),e.d(i,"a",(function(){return n}))}});
|
assets/js/plugin-isotope.js
CHANGED
@@ -20,6 +20,7 @@ $doc.on( 'extendClass.vpf', ( event, VP ) => {
|
|
20 |
*/
|
21 |
VP.prototype.initIsotope = function( options ) {
|
22 |
const self = this;
|
|
|
23 |
|
24 |
if ( self.$items_wrap.isotope && ( 'tiles' === self.options.layout || 'masonry' === self.options.layout || 'grid' === self.options.layout ) ) {
|
25 |
const initOptions = options || {
|
@@ -30,6 +31,7 @@ $doc.on( 'extendClass.vpf', ( event, VP ) => {
|
|
30 |
// },
|
31 |
transitionDuration: '0.3s',
|
32 |
percentPosition: true,
|
|
|
33 |
};
|
34 |
|
35 |
self.emitEvent( 'beforeInitIsotope', [ options ] );
|
20 |
*/
|
21 |
VP.prototype.initIsotope = function( options ) {
|
22 |
const self = this;
|
23 |
+
const isRtl = 'rtl' === getComputedStyle( self.$items_wrap[ 0 ] ).direction;
|
24 |
|
25 |
if ( self.$items_wrap.isotope && ( 'tiles' === self.options.layout || 'masonry' === self.options.layout || 'grid' === self.options.layout ) ) {
|
26 |
const initOptions = options || {
|
31 |
// },
|
32 |
transitionDuration: '0.3s',
|
33 |
percentPosition: true,
|
34 |
+
originLeft: ! isRtl,
|
35 |
};
|
36 |
|
37 |
self.emitEvent( 'beforeInitIsotope', [ options ] );
|
assets/js/plugin-isotope.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(t){var
|
1 |
+
!function(t){var e={};function o(i){if(e[i])return e[i].exports;var n=e[i]={i:i,l:!1,exports:{}};return t[i].call(n.exports,n,n.exports,o),n.l=!0,n.exports}o.m=t,o.c=e,o.d=function(t,e,i){o.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},o.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.t=function(t,e){if(1&e&&(t=o(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(o.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)o.d(i,n,function(e){return t[e]}.bind(null,n));return i},o.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(e,"a",e),e},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.p="",o(o.s=244)}({244:function(t,e,o){t.exports=o(245)},245:function(t,e,o){"use strict";o.r(e);var i=o(3),n=window.jQuery,r=n(document);r.on("extendClass.vpf",(function(t,e){"vpf"===t.namespace&&(e.prototype.initIsotope=function(t){var e="rtl"===getComputedStyle(this.$items_wrap[0]).direction;if(this.$items_wrap.isotope&&("tiles"===this.options.layout||"masonry"===this.options.layout||"grid"===this.options.layout)){var o=t||{itemSelector:".vp-portfolio__item-wrap",layoutMode:"grid"===this.options.layout?"fitRows":"masonry",transitionDuration:"0.3s",percentPosition:!0,originLeft:!e};this.emitEvent("beforeInitIsotope",[t]),this.$items_wrap.isotope(o),this.emitEvent("initIsotope",[t])}},e.prototype.destroyIsotope=function(){this.$items_wrap.data("isotope")&&(this.$items_wrap.isotope("destroy"),this.emitEvent("destroyIsotope"))})})),r.on("addItems.vpf",(function(t,e,o,i){if("vpf"===t.namespace&&e.$items_wrap.data("isotope")){if(i){var n=e.$items_wrap.find(".vp-portfolio__item-wrap");e.$items_wrap.isotope("remove",n),e.$items_wrap.prepend(o).isotope("prepended",o)}else e.$items_wrap.append(o).isotope("appended",o);setTimeout((function(){e.initIsotope("layout")}),0)}})),r.on("removeItems.vpf",(function(t,e,o){"vpf"===t.namespace&&(e.$items_wrap.data("isotope")&&e.$items_wrap.isotope("remove",o))})),r.on("init.vpf",(function(t,e){"vpf"===t.namespace&&e.initIsotope()})),r.on("imagesLoaded.vpf",(function(t,e){"vpf"===t.namespace&&e.initIsotope("layout")})),r.on("destroy.vpf",(function(t,e){"vpf"===t.namespace&&e.destroyIsotope()})),r.on("vc-full-width-row",Object(i.a)(150,(function(t,e){n(e).find(".vp-portfolio").each((function(){this.vpf&&this.vpf.initIsotope&&(this.vpf.$items_wrap.data("isotope")&&this.vpf.initIsotope("layout"))}))})))},3:function(t,e,o){"use strict";function i(t,e,o,i){var n,r=!1,p=0;function s(){n&&clearTimeout(n)}function a(){var a=this,u=Date.now()-p,f=arguments;function c(){p=Date.now(),o.apply(a,f)}function d(){n=void 0}r||(i&&!n&&c(),s(),void 0===i&&u>t?c():!0!==e&&(n=setTimeout(i?d:c,void 0===i?t-u:t)))}return"boolean"!=typeof e&&(i=o,o=e,e=void 0),a.cancel=function(){s(),r=!0},a}function n(t,e,o){return void 0===o?i(t,e,!1):i(t,o,!1!==e)}o.d(e,"b",(function(){return i})),o.d(e,"a",(function(){return n}))}});
|
assets/js/preview.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
/*!
|
2 |
* Name : Visual Portfolio
|
3 |
-
* Version : 2.
|
4 |
* Author : nK https://nkdev.info
|
5 |
*/
|
6 |
const $ = window.jQuery;
|
1 |
/*!
|
2 |
* Name : Visual Portfolio
|
3 |
+
* Version : 2.2.0
|
4 |
* Author : nK https://nkdev.info
|
5 |
*/
|
6 |
const $ = window.jQuery;
|
assets/vendor/flickr-justified-gallery/fjGallery.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
/*!
|
2 |
* Name : Flickr's Justified Gallery [fjGallery]
|
3 |
-
* Version : 1.0.
|
4 |
* Author : nK <https://nkdev.info>
|
5 |
* GitHub : https://github.com/nk-o/flickr-justified-gallery
|
6 |
*/
|
@@ -42,14 +42,34 @@
|
|
42 |
/******/ // define getter function for harmony exports
|
43 |
/******/ __webpack_require__.d = function(exports, name, getter) {
|
44 |
/******/ if(!__webpack_require__.o(exports, name)) {
|
45 |
-
/******/ Object.defineProperty(exports, name, {
|
46 |
-
/******/ configurable: false,
|
47 |
-
/******/ enumerable: true,
|
48 |
-
/******/ get: getter
|
49 |
-
/******/ });
|
50 |
/******/ }
|
51 |
/******/ };
|
52 |
/******/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
53 |
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
54 |
/******/ __webpack_require__.n = function(module) {
|
55 |
/******/ var getter = module && module.__esModule ?
|
@@ -65,937 +85,875 @@
|
|
65 |
/******/ // __webpack_public_path__
|
66 |
/******/ __webpack_require__.p = "";
|
67 |
/******/
|
|
|
68 |
/******/ // Load entry module and return exports
|
69 |
-
/******/ return __webpack_require__(__webpack_require__.s =
|
70 |
/******/ })
|
71 |
/************************************************************************/
|
72 |
/******/ ([
|
73 |
/* 0 */
|
74 |
/***/ (function(module, exports, __webpack_require__) {
|
75 |
|
76 |
-
|
77 |
-
/* WEBPACK VAR INJECTION */(function(global) {
|
78 |
|
79 |
-
var win;
|
80 |
-
|
81 |
-
if (typeof window !== "undefined") {
|
82 |
-
win = window;
|
83 |
-
} else if (typeof global !== "undefined") {
|
84 |
-
win = global;
|
85 |
-
} else if (typeof self !== "undefined") {
|
86 |
-
win = self;
|
87 |
-
} else {
|
88 |
-
win = {};
|
89 |
-
}
|
90 |
-
|
91 |
-
module.exports = win;
|
92 |
-
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
|
93 |
|
94 |
/***/ }),
|
95 |
/* 1 */
|
96 |
-
/***/ (function(module,
|
97 |
|
98 |
"use strict";
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
* @repository https://github.com/yeikos/js.merge
|
107 |
-
|
108 |
-
* Copyright 2014 yeikos - MIT license
|
109 |
-
* https://raw.github.com/yeikos/js.merge/master/LICENSE
|
110 |
-
*/
|
111 |
-
|
112 |
-
;(function (isNode) {
|
113 |
-
|
114 |
-
/**
|
115 |
-
* Merge one or more objects
|
116 |
-
* @param bool? clone
|
117 |
-
* @param mixed,... arguments
|
118 |
-
* @return object
|
119 |
-
*/
|
120 |
-
|
121 |
-
var Public = function Public(clone) {
|
122 |
-
|
123 |
-
return merge(clone === true, false, arguments);
|
124 |
-
},
|
125 |
-
publicName = 'merge';
|
126 |
-
|
127 |
-
/**
|
128 |
-
* Merge two or more objects recursively
|
129 |
-
* @param bool? clone
|
130 |
-
* @param mixed,... arguments
|
131 |
-
* @return object
|
132 |
-
*/
|
133 |
-
|
134 |
-
Public.recursive = function (clone) {
|
135 |
-
|
136 |
-
return merge(clone === true, true, arguments);
|
137 |
-
};
|
138 |
-
|
139 |
-
/**
|
140 |
-
* Clone the input removing any reference
|
141 |
-
* @param mixed input
|
142 |
-
* @return mixed
|
143 |
-
*/
|
144 |
-
|
145 |
-
Public.clone = function (input) {
|
146 |
-
|
147 |
-
var output = input,
|
148 |
-
type = typeOf(input),
|
149 |
-
index,
|
150 |
-
size;
|
151 |
-
|
152 |
-
if (type === 'array') {
|
153 |
-
|
154 |
-
output = [];
|
155 |
-
size = input.length;
|
156 |
|
157 |
-
for (index = 0; index < size; ++index) {
|
158 |
|
159 |
-
output[index] = Public.clone(input[index]);
|
160 |
-
}
|
161 |
-
} else if (type === 'object') {
|
162 |
|
163 |
-
|
164 |
|
165 |
-
|
|
|
166 |
|
167 |
-
|
168 |
-
|
169 |
-
|
|
|
170 |
|
171 |
-
return output;
|
172 |
-
};
|
173 |
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
* @param mixed extend
|
178 |
-
* @return mixed
|
179 |
-
*/
|
180 |
|
181 |
-
|
|
|
|
|
182 |
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
if (typeOf(base[key]) === 'object' && typeOf(extend[key]) === 'object') {
|
188 |
-
|
189 |
-
base[key] = merge_recursive(base[key], extend[key]);
|
190 |
-
} else {
|
191 |
-
|
192 |
-
base[key] = extend[key];
|
193 |
-
}
|
194 |
-
}
|
195 |
-
|
196 |
-
return base;
|
197 |
-
}
|
198 |
-
|
199 |
-
/**
|
200 |
-
* Merge two or more objects
|
201 |
-
* @param bool clone
|
202 |
-
* @param bool recursive
|
203 |
-
* @param array argv
|
204 |
-
* @return object
|
205 |
-
*/
|
206 |
-
|
207 |
-
function merge(clone, recursive, argv) {
|
208 |
-
|
209 |
-
var result = argv[0],
|
210 |
-
size = argv.length;
|
211 |
-
|
212 |
-
if (clone || typeOf(result) !== 'object') result = {};
|
213 |
-
|
214 |
-
for (var index = 0; index < size; ++index) {
|
215 |
-
|
216 |
-
var item = argv[index],
|
217 |
-
type = typeOf(item);
|
218 |
-
|
219 |
-
if (type !== 'object') continue;
|
220 |
-
|
221 |
-
for (var key in item) {
|
222 |
-
|
223 |
-
var sitem = clone ? Public.clone(item[key]) : item[key];
|
224 |
|
225 |
-
if (recursive) {
|
226 |
|
227 |
-
|
228 |
-
} else {
|
229 |
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
|
235 |
-
|
236 |
-
|
|
|
|
|
237 |
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
*/
|
245 |
|
246 |
-
|
247 |
|
248 |
-
|
249 |
-
|
250 |
|
251 |
-
|
|
|
|
|
|
|
|
|
252 |
|
253 |
-
module.exports = Public;
|
254 |
-
} else {
|
255 |
|
256 |
-
|
257 |
-
|
258 |
-
})
|
259 |
-
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(8)(module)))
|
260 |
|
261 |
/***/ }),
|
262 |
/* 2 */
|
263 |
-
/***/ (function(module, exports
|
264 |
-
|
265 |
-
"use strict";
|
266 |
-
|
267 |
|
268 |
module.exports = function (callback) {
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
}
|
282 |
};
|
283 |
|
284 |
/***/ }),
|
285 |
/* 3 */
|
286 |
/***/ (function(module, exports, __webpack_require__) {
|
287 |
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
/***/ }),
|
292 |
-
/* 4 */
|
293 |
-
/***/ (function(module, exports, __webpack_require__) {
|
294 |
-
|
295 |
-
"use strict";
|
296 |
-
|
297 |
-
|
298 |
-
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
|
299 |
-
|
300 |
-
var _liteReady = __webpack_require__(2);
|
301 |
-
|
302 |
-
var _liteReady2 = _interopRequireDefault(_liteReady);
|
303 |
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
// no conflict
|
313 |
-
var oldPlugin = _global.window.fjGallery;
|
314 |
-
_global.window.fjGallery = _fjGallery2.default;
|
315 |
-
_global.window.fjGallery.noConflict = function () {
|
316 |
-
_global.window.fjGallery = oldPlugin;
|
317 |
-
return this;
|
318 |
-
};
|
319 |
-
|
320 |
-
// jQuery support
|
321 |
-
if (typeof _global.jQuery !== 'undefined') {
|
322 |
-
// add data to jQuery .data('fjGallery')
|
323 |
-
var oldInit = _global.window.fjGallery.constructor.prototype.init;
|
324 |
-
_global.window.fjGallery.constructor.prototype.init = function () {
|
325 |
-
this.jQcontainer = (0, _global.jQuery)(this.$container);
|
326 |
-
this.jQcontainer.data('fjGallery', this);
|
327 |
-
if (oldInit) {
|
328 |
-
oldInit.call(this);
|
329 |
-
}
|
330 |
-
};
|
331 |
-
|
332 |
-
// remove data from jQuery .data('fjGallery')
|
333 |
-
var oldDestroy = _global.window.fjGallery.constructor.prototype.destroy;
|
334 |
-
_global.window.fjGallery.constructor.prototype.destroy = function () {
|
335 |
-
if (this.jQcontainer) {
|
336 |
-
this.jQcontainer.removeData('fjGallery');
|
337 |
-
}
|
338 |
-
if (oldDestroy) {
|
339 |
-
oldDestroy.call(this);
|
340 |
-
}
|
341 |
-
};
|
342 |
-
|
343 |
-
var jQueryPlugin = function jQueryPlugin() {
|
344 |
-
var args = arguments || [];
|
345 |
-
Array.prototype.unshift.call(args, this);
|
346 |
-
var res = _fjGallery2.default.apply(_global.window, args);
|
347 |
-
return (typeof res === 'undefined' ? 'undefined' : _typeof(res)) !== 'object' ? res : this;
|
348 |
-
};
|
349 |
-
jQueryPlugin.constructor = _fjGallery2.default.constructor;
|
350 |
-
|
351 |
-
// no conflict
|
352 |
-
var oldJqPlugin = _global.jQuery.fn.fjGallery;
|
353 |
-
_global.jQuery.fn.fjGallery = jQueryPlugin;
|
354 |
-
_global.jQuery.fn.fjGallery.noConflict = function () {
|
355 |
-
_global.jQuery.fn.fjGallery = oldJqPlugin;
|
356 |
-
return this;
|
357 |
-
};
|
358 |
}
|
359 |
|
360 |
-
|
361 |
-
|
362 |
-
(0, _fjGallery2.default)(document.querySelectorAll('.fj-gallery'));
|
363 |
-
});
|
364 |
|
365 |
/***/ }),
|
366 |
-
/*
|
367 |
-
/***/ (function(module, exports
|
368 |
-
|
369 |
-
"use strict";
|
370 |
-
|
371 |
|
372 |
-
|
373 |
|
374 |
-
var g;
|
375 |
|
376 |
-
// This works in non-strict mode
|
377 |
g = function () {
|
378 |
-
|
379 |
}();
|
380 |
|
381 |
try {
|
382 |
-
|
383 |
-
|
384 |
} catch (e) {
|
385 |
-
|
386 |
-
|
387 |
-
}
|
388 |
-
|
389 |
-
// g can still be undefined, but nothing to do about it...
|
390 |
// We return undefined, instead of nothing here, so it's
|
391 |
// easier to handle this case. if(!global) { ...}
|
392 |
|
|
|
393 |
module.exports = g;
|
394 |
|
395 |
/***/ }),
|
396 |
-
/*
|
397 |
-
/***/ (function(module,
|
398 |
|
399 |
"use strict";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
400 |
|
|
|
401 |
|
402 |
-
Object.defineProperty(
|
403 |
-
value: true
|
404 |
-
});
|
405 |
-
|
406 |
-
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
|
407 |
-
|
408 |
-
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
409 |
-
|
410 |
-
var _throttle = __webpack_require__(7);
|
411 |
-
|
412 |
-
var _throttle2 = _interopRequireDefault(_throttle);
|
413 |
-
|
414 |
-
var _merge = __webpack_require__(1);
|
415 |
-
|
416 |
-
var _merge2 = _interopRequireDefault(_merge);
|
417 |
-
|
418 |
-
var _liteReady = __webpack_require__(2);
|
419 |
-
|
420 |
-
var _liteReady2 = _interopRequireDefault(_liteReady);
|
421 |
-
|
422 |
-
var _rafl = __webpack_require__(9);
|
423 |
-
|
424 |
-
var _rafl2 = _interopRequireDefault(_rafl);
|
425 |
|
426 |
-
|
427 |
|
428 |
-
var _justifiedLayout2 = _interopRequireDefault(_justifiedLayout);
|
429 |
|
430 |
-
var _global = __webpack_require__(0);
|
431 |
|
432 |
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
433 |
|
434 |
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
435 |
|
436 |
-
// list with all fjGallery instances
|
437 |
// need to render all in one scroll/resize event
|
|
|
438 |
var fjGalleryList = [];
|
439 |
|
440 |
function updateFjGallery() {
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
});
|
445 |
});
|
|
|
446 |
}
|
447 |
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
(
|
452 |
-
|
453 |
-
});
|
454 |
-
|
455 |
-
// get image dimensions
|
456 |
// thanks https://gist.github.com/dimsemenov/5382856
|
457 |
-
function getImgDemensions(img, cb) {
|
458 |
-
var interval = void 0;
|
459 |
-
var hasSize = false;
|
460 |
-
var addedListeners = false;
|
461 |
-
|
462 |
-
var onHasSize = function onHasSize() {
|
463 |
-
if (hasSize) {
|
464 |
-
cb(hasSize);
|
465 |
-
return;
|
466 |
-
}
|
467 |
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
cb(hasSize);
|
473 |
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
};
|
480 |
-
var onLoaded = function onLoaded() {
|
481 |
-
onHasSize();
|
482 |
-
};
|
483 |
-
var onError = function onError() {
|
484 |
-
onHasSize();
|
485 |
-
};
|
486 |
-
var checkSize = function checkSize() {
|
487 |
-
if (img.naturalWidth > 0) {
|
488 |
-
onHasSize();
|
489 |
-
}
|
490 |
-
};
|
491 |
-
var addListeners = function addListeners() {
|
492 |
-
addedListeners = true;
|
493 |
-
img.addEventListener('load', onLoaded);
|
494 |
-
img.addEventListener('error', onError);
|
495 |
-
};
|
496 |
-
var removeListeners = function removeListeners() {
|
497 |
-
addedListeners = false;
|
498 |
-
img.removeEventListener('load', onLoaded);
|
499 |
-
img.removeEventListener('error', onError);
|
500 |
-
};
|
501 |
|
502 |
-
|
|
|
|
|
|
|
|
|
|
|
503 |
|
504 |
-
if (
|
505 |
-
|
506 |
-
|
507 |
}
|
508 |
-
}
|
509 |
|
510 |
-
var
|
|
|
|
|
511 |
|
512 |
-
|
|
|
|
|
513 |
|
514 |
-
var
|
515 |
-
|
516 |
-
|
517 |
-
|
518 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
519 |
|
520 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
521 |
|
522 |
-
|
|
|
|
|
523 |
|
524 |
-
|
|
|
525 |
|
526 |
-
|
527 |
-
|
528 |
-
|
529 |
-
|
530 |
-
|
531 |
-
rowHeightTolerance: 0.25, // [0, 1]
|
532 |
-
resizeThrottle: 200,
|
533 |
|
534 |
-
|
535 |
-
|
536 |
-
|
537 |
-
onAppendImages: null, // function() {}
|
538 |
-
onBeforeJustify: null, // function() {}
|
539 |
-
onJustify: null // function() {}
|
540 |
-
};
|
541 |
|
542 |
-
|
543 |
-
|
544 |
-
|
545 |
-
|
546 |
-
|
547 |
-
|
548 |
-
|
549 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
550 |
});
|
|
|
551 |
|
552 |
-
|
553 |
-
|
554 |
-
|
555 |
-
// throttle for resize
|
556 |
-
self.resize = (0, _throttle2.default)(self.options.resizeThrottle, self.resize);
|
557 |
|
558 |
-
|
559 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
560 |
|
561 |
-
|
562 |
-
|
563 |
-
|
564 |
-
_createClass(fjGallery, [{
|
565 |
-
key: 'css',
|
566 |
-
value: function css(el, styles) {
|
567 |
-
if (typeof styles === 'string') {
|
568 |
-
return _global.window.getComputedStyle(el).getPropertyValue(styles);
|
569 |
-
}
|
570 |
-
|
571 |
-
// add transform property with vendor prefix
|
572 |
-
if (styles.transform) {
|
573 |
-
styles['-webkit-transform'] = styles.transform;
|
574 |
-
}
|
575 |
|
576 |
-
Object.keys(styles).forEach(function (key) {
|
577 |
-
el.style[key] = styles[key];
|
578 |
-
});
|
579 |
-
return el;
|
580 |
-
}
|
581 |
|
582 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
583 |
|
584 |
-
|
585 |
-
|
586 |
-
|
587 |
-
|
588 |
-
updateFjGallery();
|
589 |
-
}
|
590 |
|
591 |
-
|
|
|
592 |
|
593 |
-
|
594 |
-
|
595 |
-
value: function removeFromFjGalleryList() {
|
596 |
-
var self = this;
|
597 |
|
598 |
-
|
599 |
-
|
600 |
-
|
601 |
-
}
|
602 |
-
});
|
603 |
-
}
|
604 |
-
}, {
|
605 |
-
key: 'init',
|
606 |
-
value: function init() {
|
607 |
-
var self = this;
|
608 |
|
609 |
-
|
|
|
|
|
|
|
|
|
610 |
|
611 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
612 |
|
613 |
-
// call onInit event
|
614 |
-
if (self.options.onInit) {
|
615 |
-
self.options.onInit.call(self);
|
616 |
-
}
|
617 |
-
}
|
618 |
|
619 |
-
|
620 |
-
|
621 |
-
|
622 |
-
|
623 |
-
value: function appendImages($images) {
|
624 |
-
var self = this;
|
625 |
-
|
626 |
-
// check if jQuery
|
627 |
-
if (_global.window.jQuery && $images instanceof _global.window.jQuery) {
|
628 |
-
$images = $images.get();
|
629 |
-
}
|
630 |
-
|
631 |
-
if (!$images || !$images.length) {
|
632 |
-
return;
|
633 |
-
}
|
634 |
-
|
635 |
-
$images.forEach(function ($item) {
|
636 |
-
// if $images is jQuery, for some reason in this array there is undefined item, that not a DOM,
|
637 |
-
// so we need to check for $item.querySelector.
|
638 |
-
if ($item && !$item.fjGalleryImage && $item.querySelector) {
|
639 |
-
var $image = $item.querySelector(self.options.imageSelector);
|
640 |
-
|
641 |
-
if ($image) {
|
642 |
-
$item.fjGalleryImage = self;
|
643 |
-
var data = {
|
644 |
-
$item: $item,
|
645 |
-
$image: $image,
|
646 |
-
width: parseFloat($image.getAttribute('width')) || false,
|
647 |
-
height: parseFloat($image.getAttribute('height')) || false,
|
648 |
-
loadSizes: function loadSizes() {
|
649 |
-
var itemData = this;
|
650 |
-
getImgDemensions($image, function (dimensions) {
|
651 |
-
if (itemData.width !== dimensions.width || itemData.height !== dimensions.height) {
|
652 |
-
itemData.width = dimensions.width;
|
653 |
-
itemData.height = dimensions.height;
|
654 |
-
self.resize();
|
655 |
-
}
|
656 |
-
});
|
657 |
-
}
|
658 |
-
};
|
659 |
-
data.loadSizes();
|
660 |
-
|
661 |
-
self.images.push(data);
|
662 |
-
}
|
663 |
-
}
|
664 |
-
});
|
665 |
-
|
666 |
-
// call onAppendImages event
|
667 |
-
if (self.options.onAppendImages) {
|
668 |
-
self.options.onAppendImages.call(self, [$images]);
|
669 |
-
}
|
670 |
-
|
671 |
-
self.justify();
|
672 |
-
}
|
673 |
|
674 |
-
// justify images
|
675 |
-
|
676 |
-
}, {
|
677 |
-
key: 'justify',
|
678 |
-
value: function justify() {
|
679 |
-
var self = this;
|
680 |
-
var justifyArray = [];
|
681 |
-
|
682 |
-
// call onBeforeJustify event
|
683 |
-
if (self.options.onBeforeJustify) {
|
684 |
-
self.options.onBeforeJustify.call(self);
|
685 |
-
}
|
686 |
-
|
687 |
-
self.images.forEach(function (data) {
|
688 |
-
if (data.width && data.height) {
|
689 |
-
justifyArray.push(data.width / data.height);
|
690 |
-
}
|
691 |
-
});
|
692 |
-
|
693 |
-
var justifiedData = (0, _justifiedLayout2.default)(justifyArray, {
|
694 |
-
containerWidth: self.$container.getBoundingClientRect().width,
|
695 |
-
containerPadding: {
|
696 |
-
top: parseFloat(self.css(self.$container, 'padding-top')) || 0,
|
697 |
-
right: parseFloat(self.css(self.$container, 'padding-right')) || 0,
|
698 |
-
bottom: parseFloat(self.css(self.$container, 'padding-bottom')) || 0,
|
699 |
-
left: parseFloat(self.css(self.$container, 'padding-left')) || 0
|
700 |
-
},
|
701 |
-
boxSpacing: self.options.gutter,
|
702 |
-
targetRowHeight: self.options.rowHeight,
|
703 |
-
targetRowHeightTolerance: self.options.rowHeightTolerance
|
704 |
-
});
|
705 |
-
|
706 |
-
self.css(self.$container, {
|
707 |
-
height: justifiedData.containerHeight + 'px'
|
708 |
-
});
|
709 |
-
|
710 |
-
var i = 0;
|
711 |
-
self.images.forEach(function (data) {
|
712 |
-
if (data.width && data.height) {
|
713 |
-
self.css(data.$item, {
|
714 |
-
position: 'absolute',
|
715 |
-
transform: 'translateX(' + justifiedData.boxes[i].left + 'px) translateY(' + justifiedData.boxes[i].top + 'px) translateZ(0)',
|
716 |
-
width: justifiedData.boxes[i].width + 'px',
|
717 |
-
height: justifiedData.boxes[i].height + 'px'
|
718 |
-
});
|
719 |
-
i++;
|
720 |
-
}
|
721 |
-
});
|
722 |
-
|
723 |
-
// call onJustify event
|
724 |
-
if (self.options.onJustify) {
|
725 |
-
self.options.onJustify.call(self);
|
726 |
-
}
|
727 |
-
}
|
728 |
|
729 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
730 |
|
731 |
-
}, {
|
732 |
-
key: 'updateOptions',
|
733 |
-
value: function updateOptions(options) {
|
734 |
-
var self = this;
|
735 |
-
self.options = (0, _merge2.default)({}, self.options, options);
|
736 |
-
self.justify();
|
737 |
-
}
|
738 |
-
}, {
|
739 |
-
key: 'destroy',
|
740 |
-
value: function destroy() {
|
741 |
-
var self = this;
|
742 |
-
|
743 |
-
self.removeFromFjGalleryList();
|
744 |
-
|
745 |
-
// call onDestroy event
|
746 |
-
if (self.options.onDestroy) {
|
747 |
-
self.options.onDestroy.call(self);
|
748 |
-
}
|
749 |
-
|
750 |
-
// remove styles.
|
751 |
-
self.css(self.$container, {
|
752 |
-
height: ''
|
753 |
-
});
|
754 |
-
self.images.forEach(function (data) {
|
755 |
-
self.css(data.$item, {
|
756 |
-
position: '',
|
757 |
-
transform: '',
|
758 |
-
width: '',
|
759 |
-
height: ''
|
760 |
-
});
|
761 |
-
});
|
762 |
|
763 |
-
|
764 |
-
|
765 |
-
|
766 |
-
|
767 |
|
768 |
-
|
769 |
-
|
770 |
-
}
|
771 |
-
}, {
|
772 |
-
key: 'resize',
|
773 |
-
value: function resize() {
|
774 |
-
var self = this;
|
775 |
|
776 |
-
|
777 |
-
|
778 |
-
}
|
779 |
|
780 |
-
return fjGallery;
|
781 |
-
}();
|
782 |
|
783 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
784 |
|
785 |
|
786 |
-
|
787 |
-
|
788 |
-
// thanks: http://stackoverflow.com/questions/384286/javascript-isdom-how-do-you-check-if-a-javascript-object-is-a-dom-object
|
789 |
-
if ((typeof HTMLElement === 'undefined' ? 'undefined' : _typeof(HTMLElement)) === 'object' ? items instanceof HTMLElement : items && (typeof items === 'undefined' ? 'undefined' : _typeof(items)) === 'object' && items !== null && items.nodeType === 1 && typeof items.nodeName === 'string') {
|
790 |
-
items = [items];
|
791 |
}
|
792 |
|
793 |
-
|
794 |
-
|
795 |
-
|
796 |
-
|
797 |
-
|
798 |
-
|
799 |
-
for (k; k < len; k++) {
|
800 |
-
if ((typeof options === 'undefined' ? 'undefined' : _typeof(options)) === 'object' || typeof options === 'undefined') {
|
801 |
-
if (!items[k].fjGallery) {
|
802 |
-
// eslint-disable-next-line new-cap
|
803 |
-
items[k].fjGallery = new fjGallery(items[k], options);
|
804 |
-
}
|
805 |
-
} else if (items[k].fjGallery) {
|
806 |
-
// eslint-disable-next-line prefer-spread
|
807 |
-
ret = items[k].fjGallery[options].apply(items[k].fjGallery, args);
|
808 |
-
}
|
809 |
-
if (typeof ret !== 'undefined') {
|
810 |
-
return ret;
|
811 |
-
}
|
812 |
}
|
813 |
|
814 |
-
|
815 |
-
|
816 |
-
|
817 |
-
|
818 |
-
|
819 |
-
|
820 |
-
|
821 |
-
|
822 |
-
|
823 |
-
|
824 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
825 |
|
|
|
826 |
|
827 |
-
|
|
|
|
|
828 |
|
829 |
/**
|
830 |
-
*
|
831 |
-
*
|
|
|
832 |
*
|
833 |
-
* @param {
|
834 |
-
* @param {
|
835 |
-
*
|
836 |
-
*
|
837 |
-
*
|
838 |
-
*
|
839 |
-
* to `callback` when the throttled-function is executed.
|
840 |
-
* @param {Boolean} debounceMode If `debounceMode` is true (at begin), schedule `clear` to execute after `delay` ms. If `debounceMode` is false (at end),
|
841 |
-
* schedule `callback` to execute after `delay` ms.
|
842 |
*
|
843 |
-
* @
|
844 |
*/
|
845 |
-
module.exports = function (delay, noTrailing, callback, debounceMode) {
|
846 |
-
|
847 |
-
// After wrapper has stopped being called, this timeout ensures that
|
848 |
-
// `callback` is executed at the proper times in `throttle` and `end`
|
849 |
-
// debounce modes.
|
850 |
-
var timeoutID;
|
851 |
-
|
852 |
-
// Keep track of the last time `callback` was executed.
|
853 |
-
var lastExec = 0;
|
854 |
-
|
855 |
-
// `noTrailing` defaults to falsy.
|
856 |
-
if (typeof noTrailing !== 'boolean') {
|
857 |
-
debounceMode = callback;
|
858 |
-
callback = noTrailing;
|
859 |
-
noTrailing = undefined;
|
860 |
-
}
|
861 |
-
|
862 |
-
// The `wrapper` function encapsulates all of the throttling / debouncing
|
863 |
-
// functionality and when executed will limit the rate at which `callback`
|
864 |
-
// is executed.
|
865 |
-
function wrapper() {
|
866 |
-
|
867 |
-
var self = this;
|
868 |
-
var elapsed = Number(new Date()) - lastExec;
|
869 |
-
var args = arguments;
|
870 |
-
|
871 |
-
// Execute `callback` and update the `lastExec` timestamp.
|
872 |
-
function exec() {
|
873 |
-
lastExec = Number(new Date());
|
874 |
-
callback.apply(self, args);
|
875 |
-
}
|
876 |
-
|
877 |
-
// If `debounceMode` is true (at begin) this is used to clear the flag
|
878 |
-
// to allow future `callback` executions.
|
879 |
-
function clear() {
|
880 |
-
timeoutID = undefined;
|
881 |
-
}
|
882 |
-
|
883 |
-
if (debounceMode && !timeoutID) {
|
884 |
-
// Since `wrapper` is being called for the first time and
|
885 |
-
// `debounceMode` is true (at begin), execute `callback`.
|
886 |
-
exec();
|
887 |
-
}
|
888 |
-
|
889 |
-
// Clear any existing timeout.
|
890 |
-
if (timeoutID) {
|
891 |
-
clearTimeout(timeoutID);
|
892 |
-
}
|
893 |
-
|
894 |
-
if (debounceMode === undefined && elapsed > delay) {
|
895 |
-
// In throttle mode, if `delay` time has been exceeded, execute
|
896 |
-
// `callback`.
|
897 |
-
exec();
|
898 |
-
} else if (noTrailing !== true) {
|
899 |
-
// In trailing throttle mode, since `delay` time has not been
|
900 |
-
// exceeded, schedule `callback` to execute `delay` ms after most
|
901 |
-
// recent execution.
|
902 |
-
//
|
903 |
-
// If `debounceMode` is true (at begin), schedule `clear` to execute
|
904 |
-
// after `delay` ms.
|
905 |
-
//
|
906 |
-
// If `debounceMode` is false (at end), schedule `callback` to
|
907 |
-
// execute after `delay` ms.
|
908 |
-
timeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay);
|
909 |
-
}
|
910 |
-
}
|
911 |
-
|
912 |
-
// Return the wrapper function.
|
913 |
-
return wrapper;
|
914 |
-
};
|
915 |
|
916 |
-
/***/ }),
|
917 |
-
/* 8 */
|
918 |
-
/***/ (function(module, exports, __webpack_require__) {
|
919 |
|
920 |
-
|
|
|
|
|
921 |
|
922 |
|
923 |
-
module.exports = function (module) {
|
924 |
-
if (!module.webpackPolyfill) {
|
925 |
-
module.deprecate = function () {};
|
926 |
-
module.paths = [];
|
927 |
-
// module.parent = undefined by default
|
928 |
-
if (!module.children) module.children = [];
|
929 |
-
Object.defineProperty(module, "loaded", {
|
930 |
-
enumerable: true,
|
931 |
-
get: function get() {
|
932 |
-
return module.l;
|
933 |
-
}
|
934 |
-
});
|
935 |
-
Object.defineProperty(module, "id", {
|
936 |
-
enumerable: true,
|
937 |
-
get: function get() {
|
938 |
-
return module.i;
|
939 |
-
}
|
940 |
-
});
|
941 |
-
module.webpackPolyfill = 1;
|
942 |
-
}
|
943 |
-
return module;
|
944 |
-
};
|
945 |
|
946 |
/***/ }),
|
947 |
-
/*
|
948 |
/***/ (function(module, exports, __webpack_require__) {
|
949 |
|
950 |
-
"
|
951 |
-
|
952 |
|
953 |
-
|
|
|
|
|
|
|
954 |
|
955 |
-
|
956 |
-
*
|
957 |
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
958 |
|
959 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
960 |
|
961 |
-
|
962 |
-
|
963 |
-
|
964 |
-
|
965 |
-
|
966 |
-
|
967 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
968 |
|
969 |
-
|
970 |
-
|
971 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
972 |
|
973 |
-
|
|
|
|
|
974 |
|
975 |
-
|
976 |
-
|
977 |
-
|
978 |
-
}
|
979 |
|
980 |
-
|
981 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
982 |
|
983 |
/***/ }),
|
984 |
-
/*
|
985 |
/***/ (function(module, exports, __webpack_require__) {
|
986 |
|
987 |
"use strict";
|
988 |
/*!
|
989 |
-
* Copyright
|
990 |
* Licensed under the terms of the MIT license. Please see LICENSE file in the project root for terms.
|
991 |
* @license
|
992 |
*/
|
993 |
|
994 |
|
995 |
-
|
996 |
-
|
997 |
-
Row = __webpack_require__(11);
|
998 |
-
|
999 |
/**
|
1000 |
* Create a new, empty row.
|
1001 |
*
|
@@ -1005,32 +963,30 @@ var merge = __webpack_require__(1),
|
|
1005 |
* @return A new, empty row of the type specified by this layout.
|
1006 |
*/
|
1007 |
|
|
|
1008 |
function createNewRow(layoutConfig, layoutData) {
|
|
|
1009 |
|
1010 |
-
|
1011 |
-
|
1012 |
-
|
1013 |
-
|
1014 |
-
|
1015 |
-
|
1016 |
-
|
1017 |
-
|
1018 |
-
|
1019 |
-
|
1020 |
-
|
1021 |
-
|
1022 |
-
|
1023 |
-
|
1024 |
-
|
1025 |
-
|
1026 |
-
|
1027 |
-
|
1028 |
-
|
1029 |
-
isBreakoutRow: isBreakoutRow,
|
1030 |
-
widowLayoutStyle: layoutConfig.widowLayoutStyle
|
1031 |
-
});
|
1032 |
}
|
1033 |
-
|
1034 |
/**
|
1035 |
* Add a completed row to the layout.
|
1036 |
* Note: the row must have already been completed.
|
@@ -1042,17 +998,15 @@ function createNewRow(layoutConfig, layoutData) {
|
|
1042 |
* @return {Array} Each item added to the row.
|
1043 |
*/
|
1044 |
|
1045 |
-
function addRow(layoutConfig, layoutData, row) {
|
1046 |
|
1047 |
-
|
1048 |
-
|
1049 |
|
1050 |
-
|
1051 |
-
layoutData._containerHeight += row.height + layoutConfig.boxSpacing.vertical;
|
1052 |
|
1053 |
-
|
|
|
1054 |
}
|
1055 |
-
|
1056 |
/**
|
1057 |
* Calculate the current layout for all items in the list that require layout.
|
1058 |
* "Layout" means geometry: position within container and size
|
@@ -1064,105 +1018,95 @@ function addRow(layoutConfig, layoutData, row) {
|
|
1064 |
* @return {Object} The newly-calculated layout, containing the new container height, and lists of layout items
|
1065 |
*/
|
1066 |
|
|
|
1067 |
function computeLayout(layoutConfig, layoutData, itemLayoutData) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1068 |
|
1069 |
-
var laidOutItems = [],
|
1070 |
-
itemAdded,
|
1071 |
-
currentRow,
|
1072 |
-
nextToLastRowHeight;
|
1073 |
-
|
1074 |
-
// Apply forced aspect ratio if specified, and set a flag.
|
1075 |
-
if (layoutConfig.forceAspectRatio) {
|
1076 |
-
itemLayoutData.forEach(function (itemData) {
|
1077 |
-
itemData.forcedAspectRatio = true;
|
1078 |
-
itemData.aspectRatio = layoutConfig.forceAspectRatio;
|
1079 |
-
});
|
1080 |
-
}
|
1081 |
-
|
1082 |
-
// Loop through the items
|
1083 |
-
itemLayoutData.some(function (itemData, i) {
|
1084 |
-
|
1085 |
-
if (isNaN(itemData.aspectRatio)) {
|
1086 |
-
throw new Error("Item " + i + " has an invalid aspect ratio");
|
1087 |
-
}
|
1088 |
-
|
1089 |
-
// If not currently building up a row, make a new one.
|
1090 |
-
if (!currentRow) {
|
1091 |
-
currentRow = createNewRow(layoutConfig, layoutData);
|
1092 |
-
}
|
1093 |
-
|
1094 |
-
// Attempt to add item to the current row.
|
1095 |
-
itemAdded = currentRow.addItem(itemData);
|
1096 |
-
|
1097 |
-
if (currentRow.isLayoutComplete()) {
|
1098 |
-
|
1099 |
-
// Row is filled; add it and start a new one
|
1100 |
-
laidOutItems = laidOutItems.concat(addRow(layoutConfig, layoutData, currentRow));
|
1101 |
-
|
1102 |
-
if (layoutData._rows.length >= layoutConfig.maxNumRows) {
|
1103 |
-
currentRow = null;
|
1104 |
-
return true;
|
1105 |
-
}
|
1106 |
-
|
1107 |
-
currentRow = createNewRow(layoutConfig, layoutData);
|
1108 |
-
|
1109 |
-
// Item was rejected; add it to its own row
|
1110 |
-
if (!itemAdded) {
|
1111 |
-
|
1112 |
-
itemAdded = currentRow.addItem(itemData);
|
1113 |
-
|
1114 |
-
if (currentRow.isLayoutComplete()) {
|
1115 |
-
|
1116 |
-
// If the rejected item fills a row on its own, add the row and start another new one
|
1117 |
-
laidOutItems = laidOutItems.concat(addRow(layoutConfig, layoutData, currentRow));
|
1118 |
-
if (layoutData._rows.length >= layoutConfig.maxNumRows) {
|
1119 |
-
currentRow = null;
|
1120 |
-
return true;
|
1121 |
-
}
|
1122 |
-
currentRow = createNewRow(layoutConfig, layoutData);
|
1123 |
-
}
|
1124 |
-
}
|
1125 |
-
}
|
1126 |
-
});
|
1127 |
-
|
1128 |
-
// Handle any leftover content (orphans) depending on where they lie
|
1129 |
-
// in this layout update, and in the total content set.
|
1130 |
-
if (currentRow && currentRow.getItems().length && layoutConfig.showWidows) {
|
1131 |
-
|
1132 |
-
// Last page of all content or orphan suppression is suppressed; lay out orphans.
|
1133 |
-
if (layoutData._rows.length) {
|
1134 |
-
|
1135 |
-
// Only Match previous row's height if it exists and it isn't a breakout row
|
1136 |
-
if (layoutData._rows[layoutData._rows.length - 1].isBreakoutRow) {
|
1137 |
-
nextToLastRowHeight = layoutData._rows[layoutData._rows.length - 1].targetRowHeight;
|
1138 |
-
} else {
|
1139 |
-
nextToLastRowHeight = layoutData._rows[layoutData._rows.length - 1].height;
|
1140 |
-
}
|
1141 |
-
|
1142 |
-
currentRow.forceComplete(false, nextToLastRowHeight);
|
1143 |
-
} else {
|
1144 |
-
|
1145 |
-
// ...else use target height if there is no other row height to reference.
|
1146 |
-
currentRow.forceComplete(false);
|
1147 |
-
}
|
1148 |
-
|
1149 |
-
laidOutItems = laidOutItems.concat(addRow(layoutConfig, layoutData, currentRow));
|
1150 |
-
layoutConfig._widowCount = currentRow.getItems().length;
|
1151 |
-
}
|
1152 |
-
|
1153 |
-
// We need to clean up the bottom container padding
|
1154 |
-
// First remove the height added for box spacing
|
1155 |
-
layoutData._containerHeight = layoutData._containerHeight - layoutConfig.boxSpacing.vertical;
|
1156 |
-
// Then add our bottom container padding
|
1157 |
-
layoutData._containerHeight = layoutData._containerHeight + layoutConfig.containerPadding.bottom;
|
1158 |
-
|
1159 |
-
return {
|
1160 |
-
containerHeight: layoutData._containerHeight,
|
1161 |
-
widowCount: layoutConfig._widowCount,
|
1162 |
-
boxes: layoutData._layoutItems
|
1163 |
-
};
|
1164 |
-
}
|
1165 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1166 |
/**
|
1167 |
* Takes in a bunch of box data and config. Returns
|
1168 |
* geometry to lay them out in a justified view.
|
@@ -1172,79 +1116,71 @@ function computeLayout(layoutConfig, layoutData, itemLayoutData) {
|
|
1172 |
* @return {Array} A list of aspect ratios
|
1173 |
*/
|
1174 |
|
|
|
1175 |
module.exports = function (input, config) {
|
1176 |
-
|
1177 |
-
|
1178 |
-
|
1179 |
-
|
1180 |
-
|
1181 |
-
|
1182 |
-
|
1183 |
-
|
1184 |
-
|
1185 |
-
|
1186 |
-
|
1187 |
-
|
1188 |
-
|
1189 |
-
|
1190 |
-
|
1191 |
-
|
1192 |
-
|
1193 |
-
|
1194 |
-
|
1195 |
-
|
1196 |
-
|
1197 |
-
|
1198 |
-
|
1199 |
-
|
1200 |
-
|
1201 |
-
|
1202 |
-
|
1203 |
-
|
1204 |
-
|
1205 |
-
|
1206 |
-
|
1207 |
-
|
1208 |
-
|
1209 |
-
|
1210 |
-
|
1211 |
-
|
1212 |
-
|
1213 |
-
|
1214 |
-
|
1215 |
-
|
1216 |
-
|
1217 |
-
|
1218 |
-
|
1219 |
-
|
1220 |
-
|
1221 |
-
|
1222 |
-
|
1223 |
-
|
1224 |
-
|
1225 |
-
|
1226 |
-
|
1227 |
-
} else {
|
1228 |
-
return { aspectRatio: item };
|
1229 |
-
}
|
1230 |
-
}));
|
1231 |
};
|
1232 |
|
1233 |
/***/ }),
|
1234 |
-
/*
|
1235 |
/***/ (function(module, exports, __webpack_require__) {
|
1236 |
|
1237 |
-
"use strict";
|
1238 |
-
|
1239 |
-
|
1240 |
/*!
|
1241 |
-
* Copyright
|
1242 |
* Licensed under the terms of the MIT license. Please see LICENSE file in the project root for terms.
|
1243 |
* @license
|
1244 |
*/
|
1245 |
-
|
1246 |
-
var merge = __webpack_require__(1);
|
1247 |
-
|
1248 |
/**
|
1249 |
* Row
|
1250 |
* Wrapper for each row in a justified layout.
|
@@ -1265,294 +1201,249 @@ var merge = __webpack_require__(1);
|
|
1265 |
* @constructor
|
1266 |
*/
|
1267 |
|
1268 |
-
var Row = module.exports = function (params) {
|
1269 |
|
1270 |
-
|
1271 |
-
|
|
|
1272 |
|
1273 |
-
|
1274 |
-
this.left = params.left;
|
1275 |
|
1276 |
-
|
1277 |
-
this.width = params.width;
|
1278 |
|
1279 |
-
|
1280 |
-
this.spacing = params.spacing;
|
1281 |
|
1282 |
-
|
1283 |
-
|
1284 |
-
|
1285 |
-
|
1286 |
-
this.maxAspectRatio = this.width / params.targetRowHeight * (1 + params.targetRowHeightTolerance);
|
1287 |
|
1288 |
-
|
1289 |
-
|
1290 |
-
this.edgeCaseMaxRowHeight = params.edgeCaseMaxRowHeight;
|
1291 |
|
1292 |
-
|
1293 |
-
this.widowLayoutStyle = params.widowLayoutStyle;
|
1294 |
|
1295 |
-
|
1296 |
-
this.isBreakoutRow = params.isBreakoutRow;
|
1297 |
|
1298 |
-
|
1299 |
-
this.items = [];
|
1300 |
|
1301 |
-
|
1302 |
-
this.height = 0;
|
1303 |
};
|
1304 |
|
1305 |
Row.prototype = {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1306 |
|
1307 |
-
|
1308 |
-
|
1309 |
-
|
1310 |
-
|
1311 |
-
|
1312 |
-
|
1313 |
-
|
1314 |
-
|
1315 |
-
|
1316 |
-
|
1317 |
-
|
1318 |
-
|
1319 |
-
|
1320 |
-
|
1321 |
-
|
1322 |
-
|
1323 |
-
|
1324 |
-
|
1325 |
-
|
1326 |
-
|
1327 |
-
|
1328 |
-
|
1329 |
-
|
1330 |
-
|
1331 |
-
|
1332 |
-
|
1333 |
-
|
1334 |
-
|
1335 |
-
|
1336 |
-
|
1337 |
-
|
1338 |
-
|
1339 |
-
|
1340 |
-
|
1341 |
-
|
1342 |
-
|
1343 |
-
|
1344 |
-
|
1345 |
-
|
1346 |
-
|
1347 |
-
|
1348 |
-
|
1349 |
-
|
1350 |
-
|
1351 |
-
|
1352 |
-
|
1353 |
-
|
1354 |
-
|
1355 |
-
|
1356 |
-
|
1357 |
-
|
1358 |
-
|
1359 |
-
|
1360 |
-
|
1361 |
-
|
1362 |
-
|
1363 |
-
|
1364 |
-
|
1365 |
-
|
1366 |
-
|
1367 |
-
|
1368 |
-
|
1369 |
-
|
1370 |
-
|
1371 |
-
|
1372 |
-
|
1373 |
-
|
1374 |
-
|
1375 |
-
|
1376 |
-
|
1377 |
-
|
1378 |
-
|
1379 |
-
|
1380 |
-
|
1381 |
-
|
1382 |
-
|
1383 |
-
|
1384 |
-
|
1385 |
-
|
1386 |
-
|
1387 |
-
|
1388 |
-
|
1389 |
-
|
1390 |
-
|
1391 |
-
|
1392 |
-
|
1393 |
-
|
1394 |
-
|
1395 |
-
|
1396 |
-
|
1397 |
-
|
1398 |
-
|
1399 |
-
|
1400 |
-
|
1401 |
-
|
1402 |
-
|
1403 |
-
|
1404 |
-
|
1405 |
-
|
1406 |
-
|
1407 |
-
|
1408 |
-
|
1409 |
-
|
1410 |
-
|
1411 |
-
|
1412 |
-
|
1413 |
-
|
1414 |
-
|
1415 |
-
|
1416 |
-
|
1417 |
-
|
1418 |
-
|
1419 |
-
|
1420 |
-
|
1421 |
-
|
1422 |
-
|
1423 |
-
|
1424 |
-
|
1425 |
-
|
1426 |
-
|
1427 |
-
|
1428 |
-
|
1429 |
-
|
1430 |
-
|
1431 |
-
|
1432 |
-
|
1433 |
-
|
1434 |
-
|
1435 |
-
|
1436 |
-
|
1437 |
-
|
1438 |
-
|
1439 |
-
|
1440 |
-
|
1441 |
-
|
1442 |
-
|
1443 |
-
|
1444 |
-
|
1445 |
-
|
1446 |
-
|
1447 |
-
|
1448 |
-
|
1449 |
-
|
1450 |
-
|
1451 |
-
|
1452 |
-
|
1453 |
-
|
1454 |
-
|
1455 |
-
|
1456 |
-
|
1457 |
-
|
1458 |
-
|
1459 |
-
|
1460 |
-
|
1461 |
-
|
1462 |
-
|
1463 |
-
|
1464 |
-
|
1465 |
-
|
1466 |
-
|
1467 |
-
|
1468 |
-
|
1469 |
-
|
1470 |
-
|
1471 |
-
|
1472 |
-
|
1473 |
-
|
1474 |
-
|
1475 |
-
|
1476 |
-
|
1477 |
-
// If specified, ensure items fill row and distribute error
|
1478 |
-
// caused by rounding width and height across all items.
|
1479 |
-
if (widowLayoutStyle === 'justify') {
|
1480 |
-
|
1481 |
-
itemWidthSum -= this.spacing + this.left;
|
1482 |
-
|
1483 |
-
errorWidthPerItem = (itemWidthSum - this.width) / this.items.length;
|
1484 |
-
roundedCumulativeErrors = this.items.map(function (item, i) {
|
1485 |
-
return Math.round((i + 1) * errorWidthPerItem);
|
1486 |
-
});
|
1487 |
-
|
1488 |
-
if (this.items.length === 1) {
|
1489 |
-
|
1490 |
-
// For rows with only one item, adjust item width to fill row.
|
1491 |
-
singleItemGeometry = this.items[0];
|
1492 |
-
singleItemGeometry.width -= Math.round(errorWidthPerItem);
|
1493 |
-
} else {
|
1494 |
-
|
1495 |
-
// For rows with multiple items, adjust item width and shift items to fill the row,
|
1496 |
-
// while maintaining equal spacing between items in the row.
|
1497 |
-
this.items.forEach(function (item, i) {
|
1498 |
-
if (i > 0) {
|
1499 |
-
item.left -= roundedCumulativeErrors[i - 1];
|
1500 |
-
item.width -= roundedCumulativeErrors[i] - roundedCumulativeErrors[i - 1];
|
1501 |
-
} else {
|
1502 |
-
item.width -= roundedCumulativeErrors[i];
|
1503 |
-
}
|
1504 |
-
});
|
1505 |
-
}
|
1506 |
-
} else if (widowLayoutStyle === 'center') {
|
1507 |
-
|
1508 |
-
// Center widows
|
1509 |
-
centerOffset = (this.width - itemWidthSum) / 2;
|
1510 |
-
|
1511 |
-
this.items.forEach(function (item) {
|
1512 |
-
item.left += centerOffset + this.spacing;
|
1513 |
-
}, this);
|
1514 |
-
}
|
1515 |
-
},
|
1516 |
-
|
1517 |
-
/**
|
1518 |
-
* Force completion of row layout with current items.
|
1519 |
-
*
|
1520 |
-
* @method forceComplete
|
1521 |
-
* @param fitToWidth {Boolean} Stretch current items to fill the row width.
|
1522 |
-
* This will likely result in padding.
|
1523 |
-
* @param fitToWidth {Number}
|
1524 |
-
*/
|
1525 |
-
|
1526 |
-
forceComplete: function forceComplete(fitToWidth, rowHeight) {
|
1527 |
-
|
1528 |
-
// TODO Handle fitting to width
|
1529 |
-
// var rowWidthWithoutSpacing = this.width - (this.items.length - 1) * this.spacing,
|
1530 |
-
// currentAspectRatio = this.items.reduce(function (sum, item) {
|
1531 |
-
// return sum + item.aspectRatio;
|
1532 |
-
// }, 0);
|
1533 |
-
|
1534 |
-
if (typeof rowHeight === 'number') {
|
1535 |
-
|
1536 |
-
this.completeLayout(rowHeight, this.widowLayoutStyle);
|
1537 |
-
} else {
|
1538 |
-
|
1539 |
-
// Complete using target row height.
|
1540 |
-
this.completeLayout(this.targetRowHeight, this.widowLayoutStyle);
|
1541 |
-
}
|
1542 |
-
},
|
1543 |
-
|
1544 |
-
/**
|
1545 |
-
* Return layout data for items within row.
|
1546 |
-
* Note: returns actual list, not a copy.
|
1547 |
-
*
|
1548 |
-
* @method getItems
|
1549 |
-
* @return Layout data for items within row.
|
1550 |
-
*/
|
1551 |
-
|
1552 |
-
getItems: function getItems() {
|
1553 |
-
return this.items;
|
1554 |
-
}
|
1555 |
-
|
1556 |
};
|
1557 |
|
1558 |
/***/ })
|
1 |
/*!
|
2 |
* Name : Flickr's Justified Gallery [fjGallery]
|
3 |
+
* Version : 1.0.3
|
4 |
* Author : nK <https://nkdev.info>
|
5 |
* GitHub : https://github.com/nk-o/flickr-justified-gallery
|
6 |
*/
|
42 |
/******/ // define getter function for harmony exports
|
43 |
/******/ __webpack_require__.d = function(exports, name, getter) {
|
44 |
/******/ if(!__webpack_require__.o(exports, name)) {
|
45 |
+
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
|
|
|
|
|
|
|
|
|
46 |
/******/ }
|
47 |
/******/ };
|
48 |
/******/
|
49 |
+
/******/ // define __esModule on exports
|
50 |
+
/******/ __webpack_require__.r = function(exports) {
|
51 |
+
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
52 |
+
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
53 |
+
/******/ }
|
54 |
+
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
55 |
+
/******/ };
|
56 |
+
/******/
|
57 |
+
/******/ // create a fake namespace object
|
58 |
+
/******/ // mode & 1: value is a module id, require it
|
59 |
+
/******/ // mode & 2: merge all properties of value into the ns
|
60 |
+
/******/ // mode & 4: return value when already ns object
|
61 |
+
/******/ // mode & 8|1: behave like require
|
62 |
+
/******/ __webpack_require__.t = function(value, mode) {
|
63 |
+
/******/ if(mode & 1) value = __webpack_require__(value);
|
64 |
+
/******/ if(mode & 8) return value;
|
65 |
+
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
|
66 |
+
/******/ var ns = Object.create(null);
|
67 |
+
/******/ __webpack_require__.r(ns);
|
68 |
+
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
|
69 |
+
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
|
70 |
+
/******/ return ns;
|
71 |
+
/******/ };
|
72 |
+
/******/
|
73 |
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
74 |
/******/ __webpack_require__.n = function(module) {
|
75 |
/******/ var getter = module && module.__esModule ?
|
85 |
/******/ // __webpack_public_path__
|
86 |
/******/ __webpack_require__.p = "";
|
87 |
/******/
|
88 |
+
/******/
|
89 |
/******/ // Load entry module and return exports
|
90 |
+
/******/ return __webpack_require__(__webpack_require__.s = 0);
|
91 |
/******/ })
|
92 |
/************************************************************************/
|
93 |
/******/ ([
|
94 |
/* 0 */
|
95 |
/***/ (function(module, exports, __webpack_require__) {
|
96 |
|
97 |
+
module.exports = __webpack_require__(1);
|
|
|
98 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
99 |
|
100 |
/***/ }),
|
101 |
/* 1 */
|
102 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
103 |
|
104 |
"use strict";
|
105 |
+
__webpack_require__.r(__webpack_exports__);
|
106 |
+
/* harmony import */ var lite_ready__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
|
107 |
+
/* harmony import */ var lite_ready__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lite_ready__WEBPACK_IMPORTED_MODULE_0__);
|
108 |
+
/* harmony import */ var global__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3);
|
109 |
+
/* harmony import */ var global__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(global__WEBPACK_IMPORTED_MODULE_1__);
|
110 |
+
/* harmony import */ var _fjGallery_esm__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(5);
|
111 |
+
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
112 |
|
|
|
113 |
|
|
|
|
|
|
|
114 |
|
115 |
+
// no conflict
|
116 |
|
117 |
+
var oldPlugin = global__WEBPACK_IMPORTED_MODULE_1__["window"].fjGallery;
|
118 |
+
global__WEBPACK_IMPORTED_MODULE_1__["window"].fjGallery = _fjGallery_esm__WEBPACK_IMPORTED_MODULE_2__["default"];
|
119 |
|
120 |
+
global__WEBPACK_IMPORTED_MODULE_1__["window"].fjGallery.noConflict = function () {
|
121 |
+
global__WEBPACK_IMPORTED_MODULE_1__["window"].fjGallery = oldPlugin;
|
122 |
+
return this;
|
123 |
+
}; // jQuery support
|
124 |
|
|
|
|
|
125 |
|
126 |
+
if (typeof global__WEBPACK_IMPORTED_MODULE_1__["jQuery"] !== 'undefined') {
|
127 |
+
// add data to jQuery .data('fjGallery')
|
128 |
+
var oldInit = global__WEBPACK_IMPORTED_MODULE_1__["window"].fjGallery.constructor.prototype.init;
|
|
|
|
|
|
|
129 |
|
130 |
+
global__WEBPACK_IMPORTED_MODULE_1__["window"].fjGallery.constructor.prototype.init = function () {
|
131 |
+
this.jQcontainer = Object(global__WEBPACK_IMPORTED_MODULE_1__["jQuery"])(this.$container);
|
132 |
+
this.jQcontainer.data('fjGallery', this);
|
133 |
|
134 |
+
if (oldInit) {
|
135 |
+
oldInit.call(this);
|
136 |
+
}
|
137 |
+
}; // remove data from jQuery .data('fjGallery')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
138 |
|
|
|
139 |
|
140 |
+
var oldDestroy = global__WEBPACK_IMPORTED_MODULE_1__["window"].fjGallery.constructor.prototype.destroy;
|
|
|
141 |
|
142 |
+
global__WEBPACK_IMPORTED_MODULE_1__["window"].fjGallery.constructor.prototype.destroy = function () {
|
143 |
+
if (this.jQcontainer) {
|
144 |
+
this.jQcontainer.removeData('fjGallery');
|
145 |
+
}
|
146 |
|
147 |
+
if (oldDestroy) {
|
148 |
+
oldDestroy.call(this);
|
149 |
+
}
|
150 |
+
};
|
151 |
|
152 |
+
var jQueryPlugin = function jQueryPlugin() {
|
153 |
+
var args = arguments || [];
|
154 |
+
Array.prototype.unshift.call(args, this);
|
155 |
+
var res = _fjGallery_esm__WEBPACK_IMPORTED_MODULE_2__["default"].apply(global__WEBPACK_IMPORTED_MODULE_1__["window"], args);
|
156 |
+
return _typeof(res) !== 'object' ? res : this;
|
157 |
+
};
|
|
|
158 |
|
159 |
+
jQueryPlugin.constructor = _fjGallery_esm__WEBPACK_IMPORTED_MODULE_2__["default"].constructor; // no conflict
|
160 |
|
161 |
+
var oldJqPlugin = global__WEBPACK_IMPORTED_MODULE_1__["jQuery"].fn.fjGallery;
|
162 |
+
global__WEBPACK_IMPORTED_MODULE_1__["jQuery"].fn.fjGallery = jQueryPlugin;
|
163 |
|
164 |
+
global__WEBPACK_IMPORTED_MODULE_1__["jQuery"].fn.fjGallery.noConflict = function () {
|
165 |
+
global__WEBPACK_IMPORTED_MODULE_1__["jQuery"].fn.fjGallery = oldJqPlugin;
|
166 |
+
return this;
|
167 |
+
};
|
168 |
+
} // .fj-gallery initialization
|
169 |
|
|
|
|
|
170 |
|
171 |
+
lite_ready__WEBPACK_IMPORTED_MODULE_0___default()(function () {
|
172 |
+
Object(_fjGallery_esm__WEBPACK_IMPORTED_MODULE_2__["default"])(document.querySelectorAll('.fj-gallery'));
|
173 |
+
});
|
|
|
174 |
|
175 |
/***/ }),
|
176 |
/* 2 */
|
177 |
+
/***/ (function(module, exports) {
|
|
|
|
|
|
|
178 |
|
179 |
module.exports = function (callback) {
|
180 |
+
if (document.readyState === 'complete' || document.readyState === 'interactive') {
|
181 |
+
// Already ready or interactive, execute callback
|
182 |
+
callback.call();
|
183 |
+
} else if (document.attachEvent) {
|
184 |
+
// Old browsers
|
185 |
+
document.attachEvent('onreadystatechange', function () {
|
186 |
+
if (document.readyState === 'interactive') callback.call();
|
187 |
+
});
|
188 |
+
} else if (document.addEventListener) {
|
189 |
+
// Modern browsers
|
190 |
+
document.addEventListener('DOMContentLoaded', callback);
|
191 |
+
}
|
|
|
192 |
};
|
193 |
|
194 |
/***/ }),
|
195 |
/* 3 */
|
196 |
/***/ (function(module, exports, __webpack_require__) {
|
197 |
|
198 |
+
/* WEBPACK VAR INJECTION */(function(global) {var win;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
199 |
|
200 |
+
if (typeof window !== "undefined") {
|
201 |
+
win = window;
|
202 |
+
} else if (typeof global !== "undefined") {
|
203 |
+
win = global;
|
204 |
+
} else if (typeof self !== "undefined") {
|
205 |
+
win = self;
|
206 |
+
} else {
|
207 |
+
win = {};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
208 |
}
|
209 |
|
210 |
+
module.exports = win;
|
211 |
+
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(4)))
|
|
|
|
|
212 |
|
213 |
/***/ }),
|
214 |
+
/* 4 */
|
215 |
+
/***/ (function(module, exports) {
|
|
|
|
|
|
|
216 |
|
217 |
+
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
218 |
|
219 |
+
var g; // This works in non-strict mode
|
220 |
|
|
|
221 |
g = function () {
|
222 |
+
return this;
|
223 |
}();
|
224 |
|
225 |
try {
|
226 |
+
// This works if eval is allowed (see CSP)
|
227 |
+
g = g || new Function("return this")();
|
228 |
} catch (e) {
|
229 |
+
// This works if the window reference is available
|
230 |
+
if ((typeof window === "undefined" ? "undefined" : _typeof(window)) === "object") g = window;
|
231 |
+
} // g can still be undefined, but nothing to do about it...
|
|
|
|
|
232 |
// We return undefined, instead of nothing here, so it's
|
233 |
// easier to handle this case. if(!global) { ...}
|
234 |
|
235 |
+
|
236 |
module.exports = g;
|
237 |
|
238 |
/***/ }),
|
239 |
+
/* 5 */
|
240 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
241 |
|
242 |
"use strict";
|
243 |
+
__webpack_require__.r(__webpack_exports__);
|
244 |
+
/* harmony import */ var throttle_debounce__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6);
|
245 |
+
/* harmony import */ var merge__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7);
|
246 |
+
/* harmony import */ var merge__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(merge__WEBPACK_IMPORTED_MODULE_1__);
|
247 |
+
/* harmony import */ var lite_ready__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(2);
|
248 |
+
/* harmony import */ var lite_ready__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lite_ready__WEBPACK_IMPORTED_MODULE_2__);
|
249 |
+
/* harmony import */ var justified_layout__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(9);
|
250 |
+
/* harmony import */ var justified_layout__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(justified_layout__WEBPACK_IMPORTED_MODULE_3__);
|
251 |
+
/* harmony import */ var global__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(3);
|
252 |
+
/* harmony import */ var global__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(global__WEBPACK_IMPORTED_MODULE_4__);
|
253 |
+
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
254 |
|
255 |
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
256 |
|
257 |
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
258 |
|
259 |
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
260 |
|
|
|
261 |
|
|
|
262 |
|
|
|
263 |
|
|
|
264 |
|
265 |
+
// list with all fjGallery instances
|
266 |
// need to render all in one scroll/resize event
|
267 |
+
|
268 |
var fjGalleryList = [];
|
269 |
|
270 |
function updateFjGallery() {
|
271 |
+
global__WEBPACK_IMPORTED_MODULE_4__["window"].requestAnimationFrame(function () {
|
272 |
+
fjGalleryList.forEach(function (item) {
|
273 |
+
item.resize();
|
|
|
274 |
});
|
275 |
+
});
|
276 |
}
|
277 |
|
278 |
+
global__WEBPACK_IMPORTED_MODULE_4__["window"].addEventListener('resize', updateFjGallery);
|
279 |
+
global__WEBPACK_IMPORTED_MODULE_4__["window"].addEventListener('orientationchange', updateFjGallery);
|
280 |
+
global__WEBPACK_IMPORTED_MODULE_4__["window"].addEventListener('load', updateFjGallery);
|
281 |
+
lite_ready__WEBPACK_IMPORTED_MODULE_2___default()(function () {
|
282 |
+
updateFjGallery();
|
283 |
+
}); // get image dimensions
|
|
|
|
|
284 |
// thanks https://gist.github.com/dimsemenov/5382856
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
285 |
|
286 |
+
function getImgDimensions(img, cb) {
|
287 |
+
var interval;
|
288 |
+
var hasSize = false;
|
289 |
+
var addedListeners = false;
|
|
|
290 |
|
291 |
+
var onHasSize = function onHasSize() {
|
292 |
+
if (hasSize) {
|
293 |
+
cb(hasSize);
|
294 |
+
return;
|
295 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
296 |
|
297 |
+
hasSize = {
|
298 |
+
width: img.naturalWidth,
|
299 |
+
height: img.naturalHeight
|
300 |
+
};
|
301 |
+
cb(hasSize);
|
302 |
+
clearInterval(interval);
|
303 |
|
304 |
+
if (addedListeners) {
|
305 |
+
// eslint-disable-next-line no-use-before-define
|
306 |
+
removeListeners();
|
307 |
}
|
308 |
+
};
|
309 |
|
310 |
+
var onLoaded = function onLoaded() {
|
311 |
+
onHasSize();
|
312 |
+
};
|
313 |
|
314 |
+
var onError = function onError() {
|
315 |
+
onHasSize();
|
316 |
+
};
|
317 |
|
318 |
+
var checkSize = function checkSize() {
|
319 |
+
if (img.naturalWidth > 0) {
|
320 |
+
onHasSize();
|
321 |
+
}
|
322 |
+
};
|
323 |
+
|
324 |
+
var addListeners = function addListeners() {
|
325 |
+
addedListeners = true;
|
326 |
+
img.addEventListener('load', onLoaded);
|
327 |
+
img.addEventListener('error', onError);
|
328 |
+
};
|
329 |
+
|
330 |
+
var removeListeners = function removeListeners() {
|
331 |
+
addedListeners = false;
|
332 |
+
img.removeEventListener('load', onLoaded);
|
333 |
+
img.removeEventListener('error', onError);
|
334 |
+
};
|
335 |
+
|
336 |
+
checkSize();
|
337 |
+
|
338 |
+
if (!hasSize) {
|
339 |
+
addListeners();
|
340 |
+
interval = setInterval(checkSize, 100);
|
341 |
+
}
|
342 |
+
}
|
343 |
|
344 |
+
var instanceID = 0; // fjGallery class
|
345 |
+
|
346 |
+
var fjGallery = /*#__PURE__*/function () {
|
347 |
+
function fjGallery(container, userOptions) {
|
348 |
+
_classCallCheck(this, fjGallery);
|
349 |
+
|
350 |
+
var self = this;
|
351 |
+
self.instanceID = instanceID++;
|
352 |
+
self.$container = container;
|
353 |
+
self.images = [];
|
354 |
+
self.defaults = {
|
355 |
+
itemSelector: '.fj-gallery-item',
|
356 |
+
imageSelector: 'img',
|
357 |
+
gutter: 10,
|
358 |
+
// supports object like `{ horizontal: 10, vertical: 10 }`.
|
359 |
+
rowHeight: 320,
|
360 |
+
rowHeightTolerance: 0.25,
|
361 |
+
// [0, 1]
|
362 |
+
resizeThrottle: 200,
|
363 |
+
isRtl: self.css(self.$container, 'direction') === 'rtl',
|
364 |
+
// events
|
365 |
+
onInit: null,
|
366 |
+
// function() {}
|
367 |
+
onDestroy: null,
|
368 |
+
// function() {}
|
369 |
+
onAppendImages: null,
|
370 |
+
// function() {}
|
371 |
+
onBeforeJustify: null,
|
372 |
+
// function() {}
|
373 |
+
onJustify: null // function() {}
|
374 |
+
|
375 |
+
}; // prepare data-options
|
376 |
+
|
377 |
+
var dataOptions = self.$container.dataset || {};
|
378 |
+
var pureDataOptions = {};
|
379 |
+
Object.keys(dataOptions).forEach(function (key) {
|
380 |
+
var loweCaseOption = key.substr(0, 1).toLowerCase() + key.substr(1);
|
381 |
+
|
382 |
+
if (loweCaseOption && typeof self.defaults[loweCaseOption] !== 'undefined') {
|
383 |
+
pureDataOptions[loweCaseOption] = dataOptions[key];
|
384 |
+
}
|
385 |
+
});
|
386 |
+
self.options = merge__WEBPACK_IMPORTED_MODULE_1___default()({}, self.defaults, pureDataOptions, userOptions);
|
387 |
+
self.pureOptions = merge__WEBPACK_IMPORTED_MODULE_1___default()({}, self.options); // throttle for resize
|
388 |
+
|
389 |
+
self.resize = Object(throttle_debounce__WEBPACK_IMPORTED_MODULE_0__["throttle"])(self.options.resizeThrottle, self.resize);
|
390 |
+
self.init();
|
391 |
+
} // add styles to element
|
392 |
+
|
393 |
+
|
394 |
+
_createClass(fjGallery, [{
|
395 |
+
key: "css",
|
396 |
+
value: function css(el, styles) {
|
397 |
+
if (typeof styles === 'string') {
|
398 |
+
return global__WEBPACK_IMPORTED_MODULE_4__["window"].getComputedStyle(el).getPropertyValue(styles);
|
399 |
+
} // add transform property with vendor prefix
|
400 |
+
|
401 |
+
|
402 |
+
if (styles.transform) {
|
403 |
+
styles['-webkit-transform'] = styles.transform;
|
404 |
+
}
|
405 |
+
|
406 |
+
Object.keys(styles).forEach(function (key) {
|
407 |
+
el.style[key] = styles[key];
|
408 |
+
});
|
409 |
+
return el;
|
410 |
+
} // add to fjGallery instances list
|
411 |
+
|
412 |
+
}, {
|
413 |
+
key: "addToFjGalleryList",
|
414 |
+
value: function addToFjGalleryList() {
|
415 |
+
fjGalleryList.push(this);
|
416 |
+
updateFjGallery();
|
417 |
+
} // remove from fjGallery instances list
|
418 |
+
|
419 |
+
}, {
|
420 |
+
key: "removeFromFjGalleryList",
|
421 |
+
value: function removeFromFjGalleryList() {
|
422 |
+
var self = this;
|
423 |
+
fjGalleryList.forEach(function (item, key) {
|
424 |
+
if (item.instanceID === self.instanceID) {
|
425 |
+
fjGalleryList.splice(key, 1);
|
426 |
+
}
|
427 |
+
});
|
428 |
+
}
|
429 |
+
}, {
|
430 |
+
key: "init",
|
431 |
+
value: function init() {
|
432 |
+
var self = this;
|
433 |
+
self.appendImages(self.$container.querySelectorAll(self.options.itemSelector));
|
434 |
+
self.addToFjGalleryList(); // call onInit event
|
435 |
+
|
436 |
+
if (self.options.onInit) {
|
437 |
+
self.options.onInit.call(self);
|
438 |
+
}
|
439 |
+
} // append images
|
440 |
+
|
441 |
+
}, {
|
442 |
+
key: "appendImages",
|
443 |
+
value: function appendImages($images) {
|
444 |
+
var self = this; // check if jQuery
|
445 |
+
|
446 |
+
if (global__WEBPACK_IMPORTED_MODULE_4__["window"].jQuery && $images instanceof global__WEBPACK_IMPORTED_MODULE_4__["window"].jQuery) {
|
447 |
+
$images = $images.get();
|
448 |
+
}
|
449 |
+
|
450 |
+
if (!$images || !$images.length) {
|
451 |
+
return;
|
452 |
+
}
|
453 |
+
|
454 |
+
$images.forEach(function ($item) {
|
455 |
+
// if $images is jQuery, for some reason in this array there is undefined item, that not a DOM,
|
456 |
+
// so we need to check for $item.querySelector.
|
457 |
+
if ($item && !$item.fjGalleryImage && $item.querySelector) {
|
458 |
+
var $image = $item.querySelector(self.options.imageSelector);
|
459 |
+
|
460 |
+
if ($image) {
|
461 |
+
$item.fjGalleryImage = self;
|
462 |
+
var data = {
|
463 |
+
$item: $item,
|
464 |
+
$image: $image,
|
465 |
+
width: parseFloat($image.getAttribute('width')) || false,
|
466 |
+
height: parseFloat($image.getAttribute('height')) || false,
|
467 |
+
loadSizes: function loadSizes() {
|
468 |
+
var itemData = this;
|
469 |
+
getImgDimensions($image, function (dimensions) {
|
470 |
+
if (itemData.width !== dimensions.width || itemData.height !== dimensions.height) {
|
471 |
+
itemData.width = dimensions.width;
|
472 |
+
itemData.height = dimensions.height;
|
473 |
+
self.resize();
|
474 |
+
}
|
475 |
+
});
|
476 |
+
}
|
477 |
+
};
|
478 |
+
data.loadSizes();
|
479 |
+
self.images.push(data);
|
480 |
+
}
|
481 |
+
}
|
482 |
+
}); // call onAppendImages event
|
483 |
|
484 |
+
if (self.options.onAppendImages) {
|
485 |
+
self.options.onAppendImages.call(self, [$images]);
|
486 |
+
}
|
487 |
|
488 |
+
self.justify();
|
489 |
+
} // justify images
|
490 |
|
491 |
+
}, {
|
492 |
+
key: "justify",
|
493 |
+
value: function justify() {
|
494 |
+
var self = this;
|
495 |
+
var justifyArray = []; // call onBeforeJustify event
|
|
|
|
|
496 |
|
497 |
+
if (self.options.onBeforeJustify) {
|
498 |
+
self.options.onBeforeJustify.call(self);
|
499 |
+
}
|
|
|
|
|
|
|
|
|
500 |
|
501 |
+
self.images.forEach(function (data) {
|
502 |
+
if (data.width && data.height) {
|
503 |
+
justifyArray.push(data.width / data.height);
|
504 |
+
}
|
505 |
+
});
|
506 |
+
var justifiedData = justified_layout__WEBPACK_IMPORTED_MODULE_3___default()(justifyArray, {
|
507 |
+
containerWidth: self.$container.getBoundingClientRect().width,
|
508 |
+
containerPadding: {
|
509 |
+
top: parseFloat(self.css(self.$container, 'padding-top')) || 0,
|
510 |
+
right: parseFloat(self.css(self.$container, 'padding-right')) || 0,
|
511 |
+
bottom: parseFloat(self.css(self.$container, 'padding-bottom')) || 0,
|
512 |
+
left: parseFloat(self.css(self.$container, 'padding-left')) || 0
|
513 |
+
},
|
514 |
+
boxSpacing: self.options.gutter,
|
515 |
+
targetRowHeight: self.options.rowHeight,
|
516 |
+
targetRowHeightTolerance: self.options.rowHeightTolerance
|
517 |
+
});
|
518 |
+
self.css(self.$container, {
|
519 |
+
height: "".concat(justifiedData.containerHeight, "px")
|
520 |
+
});
|
521 |
+
var i = 0;
|
522 |
+
self.images.forEach(function (data) {
|
523 |
+
if (data.width && data.height) {
|
524 |
+
self.css(data.$item, {
|
525 |
+
position: 'absolute',
|
526 |
+
transform: "translateX(".concat((self.options.isRtl ? -1 : 1) * justifiedData.boxes[i].left, "px) translateY(").concat(justifiedData.boxes[i].top, "px) translateZ(0)"),
|
527 |
+
width: "".concat(justifiedData.boxes[i].width, "px"),
|
528 |
+
height: "".concat(justifiedData.boxes[i].height, "px")
|
529 |
+
});
|
530 |
+
i++;
|
531 |
+
}
|
532 |
+
}); // call onJustify event
|
533 |
+
|
534 |
+
if (self.options.onJustify) {
|
535 |
+
self.options.onJustify.call(self);
|
536 |
+
}
|
537 |
+
} // update options and resize gallery items
|
538 |
+
|
539 |
+
}, {
|
540 |
+
key: "updateOptions",
|
541 |
+
value: function updateOptions(options) {
|
542 |
+
var self = this;
|
543 |
+
self.options = merge__WEBPACK_IMPORTED_MODULE_1___default()({}, self.options, options);
|
544 |
+
self.justify();
|
545 |
+
}
|
546 |
+
}, {
|
547 |
+
key: "destroy",
|
548 |
+
value: function destroy() {
|
549 |
+
var self = this;
|
550 |
+
self.removeFromFjGalleryList(); // call onDestroy event
|
551 |
+
|
552 |
+
if (self.options.onDestroy) {
|
553 |
+
self.options.onDestroy.call(self);
|
554 |
+
} // remove styles.
|
555 |
+
|
556 |
+
|
557 |
+
self.css(self.$container, {
|
558 |
+
height: ''
|
559 |
+
});
|
560 |
+
self.images.forEach(function (data) {
|
561 |
+
self.css(data.$item, {
|
562 |
+
position: '',
|
563 |
+
transform: '',
|
564 |
+
width: '',
|
565 |
+
height: ''
|
566 |
});
|
567 |
+
}); // delete fjGalleryImage instance from images
|
568 |
|
569 |
+
self.images.forEach(function (val) {
|
570 |
+
delete val.$item.fjGalleryImage;
|
571 |
+
}); // delete fjGallery instance from container
|
|
|
|
|
572 |
|
573 |
+
delete self.$container.fjGallery;
|
574 |
}
|
575 |
+
}, {
|
576 |
+
key: "resize",
|
577 |
+
value: function resize() {
|
578 |
+
var self = this;
|
579 |
+
self.justify();
|
580 |
+
}
|
581 |
+
}]);
|
582 |
|
583 |
+
return fjGallery;
|
584 |
+
}(); // global definition
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
585 |
|
|
|
|
|
|
|
|
|
|
|
586 |
|
587 |
+
var plugin = function plugin(items) {
|
588 |
+
// check for dom element
|
589 |
+
// thanks: http://stackoverflow.com/questions/384286/javascript-isdom-how-do-you-check-if-a-javascript-object-is-a-dom-object
|
590 |
+
if ((typeof HTMLElement === "undefined" ? "undefined" : _typeof(HTMLElement)) === 'object' ? items instanceof HTMLElement : items && _typeof(items) === 'object' && items !== null && items.nodeType === 1 && typeof items.nodeName === 'string') {
|
591 |
+
items = [items];
|
592 |
+
}
|
593 |
+
|
594 |
+
var options = arguments[1];
|
595 |
+
var args = Array.prototype.slice.call(arguments, 2);
|
596 |
+
var len = items.length;
|
597 |
+
var k = 0;
|
598 |
+
var ret;
|
599 |
+
|
600 |
+
for (k; k < len; k++) {
|
601 |
+
if (_typeof(options) === 'object' || typeof options === 'undefined') {
|
602 |
+
if (!items[k].fjGallery) {
|
603 |
+
// eslint-disable-next-line new-cap
|
604 |
+
items[k].fjGallery = new fjGallery(items[k], options);
|
605 |
+
}
|
606 |
+
} else if (items[k].fjGallery) {
|
607 |
+
// eslint-disable-next-line prefer-spread
|
608 |
+
ret = items[k].fjGallery[options].apply(items[k].fjGallery, args);
|
609 |
+
}
|
610 |
|
611 |
+
if (typeof ret !== 'undefined') {
|
612 |
+
return ret;
|
613 |
+
}
|
614 |
+
}
|
|
|
|
|
615 |
|
616 |
+
return items;
|
617 |
+
};
|
618 |
|
619 |
+
plugin.constructor = fjGallery;
|
620 |
+
/* harmony default export */ __webpack_exports__["default"] = (plugin);
|
|
|
|
|
621 |
|
622 |
+
/***/ }),
|
623 |
+
/* 6 */
|
624 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
625 |
|
626 |
+
"use strict";
|
627 |
+
__webpack_require__.r(__webpack_exports__);
|
628 |
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "debounce", function() { return debounce; });
|
629 |
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "throttle", function() { return throttle; });
|
630 |
+
/* eslint-disable no-undefined,no-param-reassign,no-shadow */
|
631 |
|
632 |
+
/**
|
633 |
+
* Throttle execution of a function. Especially useful for rate limiting
|
634 |
+
* execution of handlers on events like resize and scroll.
|
635 |
+
*
|
636 |
+
* @param {number} delay - A zero-or-greater delay in milliseconds. For event callbacks, values around 100 or 250 (or even higher) are most useful.
|
637 |
+
* @param {boolean} [noTrailing] - Optional, defaults to false. If noTrailing is true, callback will only execute every `delay` milliseconds while the
|
638 |
+
* throttled-function is being called. If noTrailing is false or unspecified, callback will be executed one final time
|
639 |
+
* after the last throttled-function call. (After the throttled-function has not been called for `delay` milliseconds,
|
640 |
+
* the internal counter is reset).
|
641 |
+
* @param {Function} callback - A function to be executed after delay milliseconds. The `this` context and all arguments are passed through, as-is,
|
642 |
+
* to `callback` when the throttled-function is executed.
|
643 |
+
* @param {boolean} [debounceMode] - If `debounceMode` is true (at begin), schedule `clear` to execute after `delay` ms. If `debounceMode` is false (at end),
|
644 |
+
* schedule `callback` to execute after `delay` ms.
|
645 |
+
*
|
646 |
+
* @returns {Function} A new, throttled, function.
|
647 |
+
*/
|
648 |
+
function throttle(delay, noTrailing, callback, debounceMode) {
|
649 |
+
/*
|
650 |
+
* After wrapper has stopped being called, this timeout ensures that
|
651 |
+
* `callback` is executed at the proper times in `throttle` and `end`
|
652 |
+
* debounce modes.
|
653 |
+
*/
|
654 |
+
var timeoutID;
|
655 |
+
var cancelled = false; // Keep track of the last time `callback` was executed.
|
656 |
+
|
657 |
+
var lastExec = 0; // Function to clear existing timeout
|
658 |
+
|
659 |
+
function clearExistingTimeout() {
|
660 |
+
if (timeoutID) {
|
661 |
+
clearTimeout(timeoutID);
|
662 |
+
}
|
663 |
+
} // Function to cancel next exec
|
664 |
|
|
|
|
|
|
|
|
|
|
|
665 |
|
666 |
+
function cancel() {
|
667 |
+
clearExistingTimeout();
|
668 |
+
cancelled = true;
|
669 |
+
} // `noTrailing` defaults to falsy.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
670 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
671 |
|
672 |
+
if (typeof noTrailing !== 'boolean') {
|
673 |
+
debounceMode = callback;
|
674 |
+
callback = noTrailing;
|
675 |
+
noTrailing = undefined;
|
676 |
+
}
|
677 |
+
/*
|
678 |
+
* The `wrapper` function encapsulates all of the throttling / debouncing
|
679 |
+
* functionality and when executed will limit the rate at which `callback`
|
680 |
+
* is executed.
|
681 |
+
*/
|
682 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
683 |
|
684 |
+
function wrapper() {
|
685 |
+
for (var _len = arguments.length, arguments_ = new Array(_len), _key = 0; _key < _len; _key++) {
|
686 |
+
arguments_[_key] = arguments[_key];
|
687 |
+
}
|
688 |
|
689 |
+
var self = this;
|
690 |
+
var elapsed = Date.now() - lastExec;
|
|
|
|
|
|
|
|
|
|
|
691 |
|
692 |
+
if (cancelled) {
|
693 |
+
return;
|
694 |
+
} // Execute `callback` and update the `lastExec` timestamp.
|
695 |
|
|
|
|
|
696 |
|
697 |
+
function exec() {
|
698 |
+
lastExec = Date.now();
|
699 |
+
callback.apply(self, arguments_);
|
700 |
+
}
|
701 |
+
/*
|
702 |
+
* If `debounceMode` is true (at begin) this is used to clear the flag
|
703 |
+
* to allow future `callback` executions.
|
704 |
+
*/
|
705 |
|
706 |
|
707 |
+
function clear() {
|
708 |
+
timeoutID = undefined;
|
|
|
|
|
|
|
709 |
}
|
710 |
|
711 |
+
if (debounceMode && !timeoutID) {
|
712 |
+
/*
|
713 |
+
* Since `wrapper` is being called for the first time and
|
714 |
+
* `debounceMode` is true (at begin), execute `callback`.
|
715 |
+
*/
|
716 |
+
exec();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
717 |
}
|
718 |
|
719 |
+
clearExistingTimeout();
|
720 |
+
|
721 |
+
if (debounceMode === undefined && elapsed > delay) {
|
722 |
+
/*
|
723 |
+
* In throttle mode, if `delay` time has been exceeded, execute
|
724 |
+
* `callback`.
|
725 |
+
*/
|
726 |
+
exec();
|
727 |
+
} else if (noTrailing !== true) {
|
728 |
+
/*
|
729 |
+
* In trailing throttle mode, since `delay` time has not been
|
730 |
+
* exceeded, schedule `callback` to execute `delay` ms after most
|
731 |
+
* recent execution.
|
732 |
+
*
|
733 |
+
* If `debounceMode` is true (at begin), schedule `clear` to execute
|
734 |
+
* after `delay` ms.
|
735 |
+
*
|
736 |
+
* If `debounceMode` is false (at end), schedule `callback` to
|
737 |
+
* execute after `delay` ms.
|
738 |
+
*/
|
739 |
+
timeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay);
|
740 |
+
}
|
741 |
+
}
|
742 |
|
743 |
+
wrapper.cancel = cancel; // Return the wrapper function.
|
744 |
|
745 |
+
return wrapper;
|
746 |
+
}
|
747 |
+
/* eslint-disable no-undefined */
|
748 |
|
749 |
/**
|
750 |
+
* Debounce execution of a function. Debouncing, unlike throttling,
|
751 |
+
* guarantees that a function is only executed a single time, either at the
|
752 |
+
* very beginning of a series of calls, or at the very end.
|
753 |
*
|
754 |
+
* @param {number} delay - A zero-or-greater delay in milliseconds. For event callbacks, values around 100 or 250 (or even higher) are most useful.
|
755 |
+
* @param {boolean} [atBegin] - Optional, defaults to false. If atBegin is false or unspecified, callback will only be executed `delay` milliseconds
|
756 |
+
* after the last debounced-function call. If atBegin is true, callback will be executed only at the first debounced-function call.
|
757 |
+
* (After the throttled-function has not been called for `delay` milliseconds, the internal counter is reset).
|
758 |
+
* @param {Function} callback - A function to be executed after delay milliseconds. The `this` context and all arguments are passed through, as-is,
|
759 |
+
* to `callback` when the debounced-function is executed.
|
|
|
|
|
|
|
760 |
*
|
761 |
+
* @returns {Function} A new, debounced function.
|
762 |
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
763 |
|
|
|
|
|
|
|
764 |
|
765 |
+
function debounce(delay, atBegin, callback) {
|
766 |
+
return callback === undefined ? throttle(delay, atBegin, false) : throttle(delay, callback, atBegin !== false);
|
767 |
+
}
|
768 |
|
769 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
770 |
|
771 |
/***/ }),
|
772 |
+
/* 7 */
|
773 |
/***/ (function(module, exports, __webpack_require__) {
|
774 |
|
775 |
+
/* WEBPACK VAR INJECTION */(function(module) {function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
|
776 |
|
777 |
+
/*!
|
778 |
+
* @name JavaScript/NodeJS Merge v1.2.1
|
779 |
+
* @author yeikos
|
780 |
+
* @repository https://github.com/yeikos/js.merge
|
781 |
|
782 |
+
* Copyright 2014 yeikos - MIT license
|
783 |
+
* https://raw.github.com/yeikos/js.merge/master/LICENSE
|
784 |
*/
|
785 |
+
;
|
786 |
+
|
787 |
+
(function (isNode) {
|
788 |
+
/**
|
789 |
+
* Merge one or more objects
|
790 |
+
* @param bool? clone
|
791 |
+
* @param mixed,... arguments
|
792 |
+
* @return object
|
793 |
+
*/
|
794 |
+
var Public = function Public(clone) {
|
795 |
+
return merge(clone === true, false, arguments);
|
796 |
+
},
|
797 |
+
publicName = 'merge';
|
798 |
+
/**
|
799 |
+
* Merge two or more objects recursively
|
800 |
+
* @param bool? clone
|
801 |
+
* @param mixed,... arguments
|
802 |
+
* @return object
|
803 |
+
*/
|
804 |
+
|
805 |
+
|
806 |
+
Public.recursive = function (clone) {
|
807 |
+
return merge(clone === true, true, arguments);
|
808 |
+
};
|
809 |
+
/**
|
810 |
+
* Clone the input removing any reference
|
811 |
+
* @param mixed input
|
812 |
+
* @return mixed
|
813 |
+
*/
|
814 |
+
|
815 |
+
|
816 |
+
Public.clone = function (input) {
|
817 |
+
var output = input,
|
818 |
+
type = typeOf(input),
|
819 |
+
index,
|
820 |
+
size;
|
821 |
+
|
822 |
+
if (type === 'array') {
|
823 |
+
output = [];
|
824 |
+
size = input.length;
|
825 |
+
|
826 |
+
for (index = 0; index < size; ++index) {
|
827 |
+
output[index] = Public.clone(input[index]);
|
828 |
+
}
|
829 |
+
} else if (type === 'object') {
|
830 |
+
output = {};
|
831 |
+
|
832 |
+
for (index in input) {
|
833 |
+
output[index] = Public.clone(input[index]);
|
834 |
+
}
|
835 |
+
}
|
836 |
|
837 |
+
return output;
|
838 |
+
};
|
839 |
+
/**
|
840 |
+
* Merge two objects recursively
|
841 |
+
* @param mixed input
|
842 |
+
* @param mixed extend
|
843 |
+
* @return mixed
|
844 |
+
*/
|
845 |
+
|
846 |
+
|
847 |
+
function merge_recursive(base, extend) {
|
848 |
+
if (typeOf(base) !== 'object') return extend;
|
849 |
+
|
850 |
+
for (var key in extend) {
|
851 |
+
if (typeOf(base[key]) === 'object' && typeOf(extend[key]) === 'object') {
|
852 |
+
base[key] = merge_recursive(base[key], extend[key]);
|
853 |
+
} else {
|
854 |
+
base[key] = extend[key];
|
855 |
+
}
|
856 |
+
}
|
857 |
|
858 |
+
return base;
|
859 |
+
}
|
860 |
+
/**
|
861 |
+
* Merge two or more objects
|
862 |
+
* @param bool clone
|
863 |
+
* @param bool recursive
|
864 |
+
* @param array argv
|
865 |
+
* @return object
|
866 |
+
*/
|
867 |
+
|
868 |
+
|
869 |
+
function merge(clone, recursive, argv) {
|
870 |
+
var result = argv[0],
|
871 |
+
size = argv.length;
|
872 |
+
if (clone || typeOf(result) !== 'object') result = {};
|
873 |
+
|
874 |
+
for (var index = 0; index < size; ++index) {
|
875 |
+
var item = argv[index],
|
876 |
+
type = typeOf(item);
|
877 |
+
if (type !== 'object') continue;
|
878 |
+
|
879 |
+
for (var key in item) {
|
880 |
+
if (key === '__proto__') continue;
|
881 |
+
var sitem = clone ? Public.clone(item[key]) : item[key];
|
882 |
+
|
883 |
+
if (recursive) {
|
884 |
+
result[key] = merge_recursive(result[key], sitem);
|
885 |
+
} else {
|
886 |
+
result[key] = sitem;
|
887 |
+
}
|
888 |
+
}
|
889 |
+
}
|
890 |
|
891 |
+
return result;
|
892 |
+
}
|
893 |
+
/**
|
894 |
+
* Get type of variable
|
895 |
+
* @param mixed input
|
896 |
+
* @return string
|
897 |
+
*
|
898 |
+
* @see http://jsperf.com/typeofvar
|
899 |
+
*/
|
900 |
+
|
901 |
+
|
902 |
+
function typeOf(input) {
|
903 |
+
return {}.toString.call(input).slice(8, -1).toLowerCase();
|
904 |
+
}
|
905 |
+
|
906 |
+
if (isNode) {
|
907 |
+
module.exports = Public;
|
908 |
+
} else {
|
909 |
+
window[publicName] = Public;
|
910 |
+
}
|
911 |
+
})(( false ? undefined : _typeof(module)) === 'object' && module && _typeof(module.exports) === 'object' && module.exports);
|
912 |
+
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(8)(module)))
|
913 |
|
914 |
+
/***/ }),
|
915 |
+
/* 8 */
|
916 |
+
/***/ (function(module, exports) {
|
917 |
|
918 |
+
module.exports = function (module) {
|
919 |
+
if (!module.webpackPolyfill) {
|
920 |
+
module.deprecate = function () {};
|
|
|
921 |
|
922 |
+
module.paths = []; // module.parent = undefined by default
|
923 |
+
|
924 |
+
if (!module.children) module.children = [];
|
925 |
+
Object.defineProperty(module, "loaded", {
|
926 |
+
enumerable: true,
|
927 |
+
get: function get() {
|
928 |
+
return module.l;
|
929 |
+
}
|
930 |
+
});
|
931 |
+
Object.defineProperty(module, "id", {
|
932 |
+
enumerable: true,
|
933 |
+
get: function get() {
|
934 |
+
return module.i;
|
935 |
+
}
|
936 |
+
});
|
937 |
+
module.webpackPolyfill = 1;
|
938 |
+
}
|
939 |
+
|
940 |
+
return module;
|
941 |
+
};
|
942 |
|
943 |
/***/ }),
|
944 |
+
/* 9 */
|
945 |
/***/ (function(module, exports, __webpack_require__) {
|
946 |
|
947 |
"use strict";
|
948 |
/*!
|
949 |
+
* Copyright 2019 SmugMug, Inc.
|
950 |
* Licensed under the terms of the MIT license. Please see LICENSE file in the project root for terms.
|
951 |
* @license
|
952 |
*/
|
953 |
|
954 |
|
955 |
+
var merge = __webpack_require__(7),
|
956 |
+
Row = __webpack_require__(10);
|
|
|
|
|
957 |
/**
|
958 |
* Create a new, empty row.
|
959 |
*
|
963 |
* @return A new, empty row of the type specified by this layout.
|
964 |
*/
|
965 |
|
966 |
+
|
967 |
function createNewRow(layoutConfig, layoutData) {
|
968 |
+
var isBreakoutRow; // Work out if this is a full width breakout row
|
969 |
|
970 |
+
if (layoutConfig.fullWidthBreakoutRowCadence !== false) {
|
971 |
+
if ((layoutData._rows.length + 1) % layoutConfig.fullWidthBreakoutRowCadence === 0) {
|
972 |
+
isBreakoutRow = true;
|
973 |
+
}
|
974 |
+
}
|
975 |
+
|
976 |
+
return new Row({
|
977 |
+
top: layoutData._containerHeight,
|
978 |
+
left: layoutConfig.containerPadding.left,
|
979 |
+
width: layoutConfig.containerWidth - layoutConfig.containerPadding.left - layoutConfig.containerPadding.right,
|
980 |
+
spacing: layoutConfig.boxSpacing.horizontal,
|
981 |
+
targetRowHeight: layoutConfig.targetRowHeight,
|
982 |
+
targetRowHeightTolerance: layoutConfig.targetRowHeightTolerance,
|
983 |
+
edgeCaseMinRowHeight: 0.5 * layoutConfig.targetRowHeight,
|
984 |
+
edgeCaseMaxRowHeight: 2 * layoutConfig.targetRowHeight,
|
985 |
+
rightToLeft: false,
|
986 |
+
isBreakoutRow: isBreakoutRow,
|
987 |
+
widowLayoutStyle: layoutConfig.widowLayoutStyle
|
988 |
+
});
|
|
|
|
|
|
|
989 |
}
|
|
|
990 |
/**
|
991 |
* Add a completed row to the layout.
|
992 |
* Note: the row must have already been completed.
|
998 |
* @return {Array} Each item added to the row.
|
999 |
*/
|
1000 |
|
|
|
1001 |
|
1002 |
+
function addRow(layoutConfig, layoutData, row) {
|
1003 |
+
layoutData._rows.push(row);
|
1004 |
|
1005 |
+
layoutData._layoutItems = layoutData._layoutItems.concat(row.getItems()); // Increment the container height
|
|
|
1006 |
|
1007 |
+
layoutData._containerHeight += row.height + layoutConfig.boxSpacing.vertical;
|
1008 |
+
return row.items;
|
1009 |
}
|
|
|
1010 |
/**
|
1011 |
* Calculate the current layout for all items in the list that require layout.
|
1012 |
* "Layout" means geometry: position within container and size
|
1018 |
* @return {Object} The newly-calculated layout, containing the new container height, and lists of layout items
|
1019 |
*/
|
1020 |
|
1021 |
+
|
1022 |
function computeLayout(layoutConfig, layoutData, itemLayoutData) {
|
1023 |
+
var laidOutItems = [],
|
1024 |
+
itemAdded,
|
1025 |
+
currentRow,
|
1026 |
+
nextToLastRowHeight; // Apply forced aspect ratio if specified, and set a flag.
|
1027 |
+
|
1028 |
+
if (layoutConfig.forceAspectRatio) {
|
1029 |
+
itemLayoutData.forEach(function (itemData) {
|
1030 |
+
itemData.forcedAspectRatio = true;
|
1031 |
+
itemData.aspectRatio = layoutConfig.forceAspectRatio;
|
1032 |
+
});
|
1033 |
+
} // Loop through the items
|
1034 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1035 |
|
1036 |
+
itemLayoutData.some(function (itemData, i) {
|
1037 |
+
if (isNaN(itemData.aspectRatio)) {
|
1038 |
+
throw new Error("Item " + i + " has an invalid aspect ratio");
|
1039 |
+
} // If not currently building up a row, make a new one.
|
1040 |
+
|
1041 |
+
|
1042 |
+
if (!currentRow) {
|
1043 |
+
currentRow = createNewRow(layoutConfig, layoutData);
|
1044 |
+
} // Attempt to add item to the current row.
|
1045 |
+
|
1046 |
+
|
1047 |
+
itemAdded = currentRow.addItem(itemData);
|
1048 |
+
|
1049 |
+
if (currentRow.isLayoutComplete()) {
|
1050 |
+
// Row is filled; add it and start a new one
|
1051 |
+
laidOutItems = laidOutItems.concat(addRow(layoutConfig, layoutData, currentRow));
|
1052 |
+
|
1053 |
+
if (layoutData._rows.length >= layoutConfig.maxNumRows) {
|
1054 |
+
currentRow = null;
|
1055 |
+
return true;
|
1056 |
+
}
|
1057 |
+
|
1058 |
+
currentRow = createNewRow(layoutConfig, layoutData); // Item was rejected; add it to its own row
|
1059 |
+
|
1060 |
+
if (!itemAdded) {
|
1061 |
+
itemAdded = currentRow.addItem(itemData);
|
1062 |
+
|
1063 |
+
if (currentRow.isLayoutComplete()) {
|
1064 |
+
// If the rejected item fills a row on its own, add the row and start another new one
|
1065 |
+
laidOutItems = laidOutItems.concat(addRow(layoutConfig, layoutData, currentRow));
|
1066 |
+
|
1067 |
+
if (layoutData._rows.length >= layoutConfig.maxNumRows) {
|
1068 |
+
currentRow = null;
|
1069 |
+
return true;
|
1070 |
+
}
|
1071 |
+
|
1072 |
+
currentRow = createNewRow(layoutConfig, layoutData);
|
1073 |
+
}
|
1074 |
+
}
|
1075 |
+
}
|
1076 |
+
}); // Handle any leftover content (orphans) depending on where they lie
|
1077 |
+
// in this layout update, and in the total content set.
|
1078 |
+
|
1079 |
+
if (currentRow && currentRow.getItems().length && layoutConfig.showWidows) {
|
1080 |
+
// Last page of all content or orphan suppression is suppressed; lay out orphans.
|
1081 |
+
if (layoutData._rows.length) {
|
1082 |
+
// Only Match previous row's height if it exists and it isn't a breakout row
|
1083 |
+
if (layoutData._rows[layoutData._rows.length - 1].isBreakoutRow) {
|
1084 |
+
nextToLastRowHeight = layoutData._rows[layoutData._rows.length - 1].targetRowHeight;
|
1085 |
+
} else {
|
1086 |
+
nextToLastRowHeight = layoutData._rows[layoutData._rows.length - 1].height;
|
1087 |
+
}
|
1088 |
+
|
1089 |
+
currentRow.forceComplete(false, nextToLastRowHeight);
|
1090 |
+
} else {
|
1091 |
+
// ...else use target height if there is no other row height to reference.
|
1092 |
+
currentRow.forceComplete(false);
|
1093 |
+
}
|
1094 |
+
|
1095 |
+
laidOutItems = laidOutItems.concat(addRow(layoutConfig, layoutData, currentRow));
|
1096 |
+
layoutConfig._widowCount = currentRow.getItems().length;
|
1097 |
+
} // We need to clean up the bottom container padding
|
1098 |
+
// First remove the height added for box spacing
|
1099 |
+
|
1100 |
+
|
1101 |
+
layoutData._containerHeight = layoutData._containerHeight - layoutConfig.boxSpacing.vertical; // Then add our bottom container padding
|
1102 |
+
|
1103 |
+
layoutData._containerHeight = layoutData._containerHeight + layoutConfig.containerPadding.bottom;
|
1104 |
+
return {
|
1105 |
+
containerHeight: layoutData._containerHeight,
|
1106 |
+
widowCount: layoutConfig._widowCount,
|
1107 |
+
boxes: layoutData._layoutItems
|
1108 |
+
};
|
1109 |
+
}
|
1110 |
/**
|
1111 |
* Takes in a bunch of box data and config. Returns
|
1112 |
* geometry to lay them out in a justified view.
|
1116 |
* @return {Array} A list of aspect ratios
|
1117 |
*/
|
1118 |
|
1119 |
+
|
1120 |
module.exports = function (input, config) {
|
1121 |
+
var layoutConfig = {};
|
1122 |
+
var layoutData = {}; // Defaults
|
1123 |
+
|
1124 |
+
var defaults = {
|
1125 |
+
containerWidth: 1060,
|
1126 |
+
containerPadding: 10,
|
1127 |
+
boxSpacing: 10,
|
1128 |
+
targetRowHeight: 320,
|
1129 |
+
targetRowHeightTolerance: 0.25,
|
1130 |
+
maxNumRows: Number.POSITIVE_INFINITY,
|
1131 |
+
forceAspectRatio: false,
|
1132 |
+
showWidows: true,
|
1133 |
+
fullWidthBreakoutRowCadence: false,
|
1134 |
+
widowLayoutStyle: 'left'
|
1135 |
+
};
|
1136 |
+
var containerPadding = {};
|
1137 |
+
var boxSpacing = {};
|
1138 |
+
config = config || {}; // Merge defaults and config passed in
|
1139 |
+
|
1140 |
+
layoutConfig = merge(defaults, config); // Sort out padding and spacing values
|
1141 |
+
|
1142 |
+
containerPadding.top = !isNaN(parseFloat(layoutConfig.containerPadding.top)) ? layoutConfig.containerPadding.top : layoutConfig.containerPadding;
|
1143 |
+
containerPadding.right = !isNaN(parseFloat(layoutConfig.containerPadding.right)) ? layoutConfig.containerPadding.right : layoutConfig.containerPadding;
|
1144 |
+
containerPadding.bottom = !isNaN(parseFloat(layoutConfig.containerPadding.bottom)) ? layoutConfig.containerPadding.bottom : layoutConfig.containerPadding;
|
1145 |
+
containerPadding.left = !isNaN(parseFloat(layoutConfig.containerPadding.left)) ? layoutConfig.containerPadding.left : layoutConfig.containerPadding;
|
1146 |
+
boxSpacing.horizontal = !isNaN(parseFloat(layoutConfig.boxSpacing.horizontal)) ? layoutConfig.boxSpacing.horizontal : layoutConfig.boxSpacing;
|
1147 |
+
boxSpacing.vertical = !isNaN(parseFloat(layoutConfig.boxSpacing.vertical)) ? layoutConfig.boxSpacing.vertical : layoutConfig.boxSpacing;
|
1148 |
+
layoutConfig.containerPadding = containerPadding;
|
1149 |
+
layoutConfig.boxSpacing = boxSpacing; // Local
|
1150 |
+
|
1151 |
+
layoutData._layoutItems = [];
|
1152 |
+
layoutData._awakeItems = [];
|
1153 |
+
layoutData._inViewportItems = [];
|
1154 |
+
layoutData._leadingOrphans = [];
|
1155 |
+
layoutData._trailingOrphans = [];
|
1156 |
+
layoutData._containerHeight = layoutConfig.containerPadding.top;
|
1157 |
+
layoutData._rows = [];
|
1158 |
+
layoutData._orphans = [];
|
1159 |
+
layoutConfig._widowCount = 0; // Convert widths and heights to aspect ratios if we need to
|
1160 |
+
|
1161 |
+
return computeLayout(layoutConfig, layoutData, input.map(function (item) {
|
1162 |
+
if (item.width && item.height) {
|
1163 |
+
return {
|
1164 |
+
aspectRatio: item.width / item.height
|
1165 |
+
};
|
1166 |
+
} else {
|
1167 |
+
return {
|
1168 |
+
aspectRatio: item
|
1169 |
+
};
|
1170 |
+
}
|
1171 |
+
}));
|
|
|
|
|
|
|
|
|
1172 |
};
|
1173 |
|
1174 |
/***/ }),
|
1175 |
+
/* 10 */
|
1176 |
/***/ (function(module, exports, __webpack_require__) {
|
1177 |
|
|
|
|
|
|
|
1178 |
/*!
|
1179 |
+
* Copyright 2019 SmugMug, Inc.
|
1180 |
* Licensed under the terms of the MIT license. Please see LICENSE file in the project root for terms.
|
1181 |
* @license
|
1182 |
*/
|
1183 |
+
var merge = __webpack_require__(7);
|
|
|
|
|
1184 |
/**
|
1185 |
* Row
|
1186 |
* Wrapper for each row in a justified layout.
|
1201 |
* @constructor
|
1202 |
*/
|
1203 |
|
|
|
1204 |
|
1205 |
+
var Row = module.exports = function (params) {
|
1206 |
+
// Top of row, relative to container
|
1207 |
+
this.top = params.top; // Left side of row relative to container (equal to container left padding)
|
1208 |
|
1209 |
+
this.left = params.left; // Width of row, not including container padding
|
|
|
1210 |
|
1211 |
+
this.width = params.width; // Horizontal spacing between items
|
|
|
1212 |
|
1213 |
+
this.spacing = params.spacing; // Row height calculation values
|
|
|
1214 |
|
1215 |
+
this.targetRowHeight = params.targetRowHeight;
|
1216 |
+
this.targetRowHeightTolerance = params.targetRowHeightTolerance;
|
1217 |
+
this.minAspectRatio = this.width / params.targetRowHeight * (1 - params.targetRowHeightTolerance);
|
1218 |
+
this.maxAspectRatio = this.width / params.targetRowHeight * (1 + params.targetRowHeightTolerance); // Edge case row height minimum/maximum
|
|
|
1219 |
|
1220 |
+
this.edgeCaseMinRowHeight = params.edgeCaseMinRowHeight;
|
1221 |
+
this.edgeCaseMaxRowHeight = params.edgeCaseMaxRowHeight; // Widow layout direction
|
|
|
1222 |
|
1223 |
+
this.widowLayoutStyle = params.widowLayoutStyle; // Full width breakout rows
|
|
|
1224 |
|
1225 |
+
this.isBreakoutRow = params.isBreakoutRow; // Store layout data for each item in row
|
|
|
1226 |
|
1227 |
+
this.items = []; // Height remains at 0 until it's been calculated
|
|
|
1228 |
|
1229 |
+
this.height = 0;
|
|
|
1230 |
};
|
1231 |
|
1232 |
Row.prototype = {
|
1233 |
+
/**
|
1234 |
+
* Attempt to add a single item to the row.
|
1235 |
+
* This is the heart of the justified algorithm.
|
1236 |
+
* This method is direction-agnostic; it deals only with sizes, not positions.
|
1237 |
+
*
|
1238 |
+
* If the item fits in the row, without pushing row height beyond min/max tolerance,
|
1239 |
+
* the item is added and the method returns true.
|
1240 |
+
*
|
1241 |
+
* If the item leaves row height too high, there may be room to scale it down and add another item.
|
1242 |
+
* In this case, the item is added and the method returns true, but the row is incomplete.
|
1243 |
+
*
|
1244 |
+
* If the item leaves row height too short, there are too many items to fit within tolerance.
|
1245 |
+
* The method will either accept or reject the new item, favoring the resulting row height closest to within tolerance.
|
1246 |
+
* If the item is rejected, left/right padding will be required to fit the row height within tolerance;
|
1247 |
+
* if the item is accepted, top/bottom cropping will be required to fit the row height within tolerance.
|
1248 |
+
*
|
1249 |
+
* @method addItem
|
1250 |
+
* @param itemData {Object} Item layout data, containing item aspect ratio.
|
1251 |
+
* @return {Boolean} True if successfully added; false if rejected.
|
1252 |
+
*/
|
1253 |
+
addItem: function addItem(itemData) {
|
1254 |
+
var newItems = this.items.concat(itemData),
|
1255 |
+
// Calculate aspect ratios for items only; exclude spacing
|
1256 |
+
rowWidthWithoutSpacing = this.width - (newItems.length - 1) * this.spacing,
|
1257 |
+
newAspectRatio = newItems.reduce(function (sum, item) {
|
1258 |
+
return sum + item.aspectRatio;
|
1259 |
+
}, 0),
|
1260 |
+
targetAspectRatio = rowWidthWithoutSpacing / this.targetRowHeight,
|
1261 |
+
previousRowWidthWithoutSpacing,
|
1262 |
+
previousAspectRatio,
|
1263 |
+
previousTargetAspectRatio; // Handle big full-width breakout photos if we're doing them
|
1264 |
+
|
1265 |
+
if (this.isBreakoutRow) {
|
1266 |
+
// Only do it if there's no other items in this row
|
1267 |
+
if (this.items.length === 0) {
|
1268 |
+
// Only go full width if this photo is a square or landscape
|
1269 |
+
if (itemData.aspectRatio >= 1) {
|
1270 |
+
// Close out the row with a full width photo
|
1271 |
+
this.items.push(itemData);
|
1272 |
+
this.completeLayout(rowWidthWithoutSpacing / itemData.aspectRatio, 'justify');
|
1273 |
+
return true;
|
1274 |
+
}
|
1275 |
+
}
|
1276 |
+
}
|
1277 |
|
1278 |
+
if (newAspectRatio < this.minAspectRatio) {
|
1279 |
+
// New aspect ratio is too narrow / scaled row height is too tall.
|
1280 |
+
// Accept this item and leave row open for more items.
|
1281 |
+
this.items.push(merge(itemData));
|
1282 |
+
return true;
|
1283 |
+
} else if (newAspectRatio > this.maxAspectRatio) {
|
1284 |
+
// New aspect ratio is too wide / scaled row height will be too short.
|
1285 |
+
// Accept item if the resulting aspect ratio is closer to target than it would be without the item.
|
1286 |
+
// NOTE: Any row that falls into this block will require cropping/padding on individual items.
|
1287 |
+
if (this.items.length === 0) {
|
1288 |
+
// When there are no existing items, force acceptance of the new item and complete the layout.
|
1289 |
+
// This is the pano special case.
|
1290 |
+
this.items.push(merge(itemData));
|
1291 |
+
this.completeLayout(rowWidthWithoutSpacing / newAspectRatio, 'justify');
|
1292 |
+
return true;
|
1293 |
+
} // Calculate width/aspect ratio for row before adding new item
|
1294 |
+
|
1295 |
+
|
1296 |
+
previousRowWidthWithoutSpacing = this.width - (this.items.length - 1) * this.spacing;
|
1297 |
+
previousAspectRatio = this.items.reduce(function (sum, item) {
|
1298 |
+
return sum + item.aspectRatio;
|
1299 |
+
}, 0);
|
1300 |
+
previousTargetAspectRatio = previousRowWidthWithoutSpacing / this.targetRowHeight;
|
1301 |
+
|
1302 |
+
if (Math.abs(newAspectRatio - targetAspectRatio) > Math.abs(previousAspectRatio - previousTargetAspectRatio)) {
|
1303 |
+
// Row with new item is us farther away from target than row without; complete layout and reject item.
|
1304 |
+
this.completeLayout(previousRowWidthWithoutSpacing / previousAspectRatio, 'justify');
|
1305 |
+
return false;
|
1306 |
+
} else {
|
1307 |
+
// Row with new item is us closer to target than row without;
|
1308 |
+
// accept the new item and complete the row layout.
|
1309 |
+
this.items.push(merge(itemData));
|
1310 |
+
this.completeLayout(rowWidthWithoutSpacing / newAspectRatio, 'justify');
|
1311 |
+
return true;
|
1312 |
+
}
|
1313 |
+
} else {
|
1314 |
+
// New aspect ratio / scaled row height is within tolerance;
|
1315 |
+
// accept the new item and complete the row layout.
|
1316 |
+
this.items.push(merge(itemData));
|
1317 |
+
this.completeLayout(rowWidthWithoutSpacing / newAspectRatio, 'justify');
|
1318 |
+
return true;
|
1319 |
+
}
|
1320 |
+
},
|
1321 |
+
|
1322 |
+
/**
|
1323 |
+
* Check if a row has completed its layout.
|
1324 |
+
*
|
1325 |
+
* @method isLayoutComplete
|
1326 |
+
* @return {Boolean} True if complete; false if not.
|
1327 |
+
*/
|
1328 |
+
isLayoutComplete: function isLayoutComplete() {
|
1329 |
+
return this.height > 0;
|
1330 |
+
},
|
1331 |
+
|
1332 |
+
/**
|
1333 |
+
* Set row height and compute item geometry from that height.
|
1334 |
+
* Will justify items within the row unless instructed not to.
|
1335 |
+
*
|
1336 |
+
* @method completeLayout
|
1337 |
+
* @param newHeight {Number} Set row height to this value.
|
1338 |
+
* @param widowLayoutStyle {String} How should widows display? Supported: left | justify | center
|
1339 |
+
*/
|
1340 |
+
completeLayout: function completeLayout(newHeight, widowLayoutStyle) {
|
1341 |
+
var itemWidthSum = this.left,
|
1342 |
+
rowWidthWithoutSpacing = this.width - (this.items.length - 1) * this.spacing,
|
1343 |
+
clampedToNativeRatio,
|
1344 |
+
clampedHeight,
|
1345 |
+
errorWidthPerItem,
|
1346 |
+
roundedCumulativeErrors,
|
1347 |
+
singleItemGeometry,
|
1348 |
+
centerOffset; // Justify unless explicitly specified otherwise.
|
1349 |
+
|
1350 |
+
if (typeof widowLayoutStyle === 'undefined' || ['justify', 'center', 'left'].indexOf(widowLayoutStyle) < 0) {
|
1351 |
+
widowLayoutStyle = 'left';
|
1352 |
+
} // Clamp row height to edge case minimum/maximum.
|
1353 |
+
|
1354 |
+
|
1355 |
+
clampedHeight = Math.max(this.edgeCaseMinRowHeight, Math.min(newHeight, this.edgeCaseMaxRowHeight));
|
1356 |
+
|
1357 |
+
if (newHeight !== clampedHeight) {
|
1358 |
+
// If row height was clamped, the resulting row/item aspect ratio will be off,
|
1359 |
+
// so force it to fit the width (recalculate aspectRatio to match clamped height).
|
1360 |
+
// NOTE: this will result in cropping/padding commensurate to the amount of clamping.
|
1361 |
+
this.height = clampedHeight;
|
1362 |
+
clampedToNativeRatio = rowWidthWithoutSpacing / clampedHeight / (rowWidthWithoutSpacing / newHeight);
|
1363 |
+
} else {
|
1364 |
+
// If not clamped, leave ratio at 1.0.
|
1365 |
+
this.height = newHeight;
|
1366 |
+
clampedToNativeRatio = 1.0;
|
1367 |
+
} // Compute item geometry based on newHeight.
|
1368 |
+
|
1369 |
+
|
1370 |
+
this.items.forEach(function (item) {
|
1371 |
+
item.top = this.top;
|
1372 |
+
item.width = item.aspectRatio * this.height * clampedToNativeRatio;
|
1373 |
+
item.height = this.height; // Left-to-right.
|
1374 |
+
// TODO right to left
|
1375 |
+
// item.left = this.width - itemWidthSum - item.width;
|
1376 |
+
|
1377 |
+
item.left = itemWidthSum; // Increment width.
|
1378 |
+
|
1379 |
+
itemWidthSum += item.width + this.spacing;
|
1380 |
+
}, this); // If specified, ensure items fill row and distribute error
|
1381 |
+
// caused by rounding width and height across all items.
|
1382 |
+
|
1383 |
+
if (widowLayoutStyle === 'justify') {
|
1384 |
+
itemWidthSum -= this.spacing + this.left;
|
1385 |
+
errorWidthPerItem = (itemWidthSum - this.width) / this.items.length;
|
1386 |
+
roundedCumulativeErrors = this.items.map(function (item, i) {
|
1387 |
+
return Math.round((i + 1) * errorWidthPerItem);
|
1388 |
+
});
|
1389 |
+
|
1390 |
+
if (this.items.length === 1) {
|
1391 |
+
// For rows with only one item, adjust item width to fill row.
|
1392 |
+
singleItemGeometry = this.items[0];
|
1393 |
+
singleItemGeometry.width -= Math.round(errorWidthPerItem);
|
1394 |
+
} else {
|
1395 |
+
// For rows with multiple items, adjust item width and shift items to fill the row,
|
1396 |
+
// while maintaining equal spacing between items in the row.
|
1397 |
+
this.items.forEach(function (item, i) {
|
1398 |
+
if (i > 0) {
|
1399 |
+
item.left -= roundedCumulativeErrors[i - 1];
|
1400 |
+
item.width -= roundedCumulativeErrors[i] - roundedCumulativeErrors[i - 1];
|
1401 |
+
} else {
|
1402 |
+
item.width -= roundedCumulativeErrors[i];
|
1403 |
+
}
|
1404 |
+
});
|
1405 |
+
}
|
1406 |
+
} else if (widowLayoutStyle === 'center') {
|
1407 |
+
// Center widows
|
1408 |
+
centerOffset = (this.width - itemWidthSum) / 2;
|
1409 |
+
this.items.forEach(function (item) {
|
1410 |
+
item.left += centerOffset + this.spacing;
|
1411 |
+
}, this);
|
1412 |
+
}
|
1413 |
+
},
|
1414 |
+
|
1415 |
+
/**
|
1416 |
+
* Force completion of row layout with current items.
|
1417 |
+
*
|
1418 |
+
* @method forceComplete
|
1419 |
+
* @param fitToWidth {Boolean} Stretch current items to fill the row width.
|
1420 |
+
* This will likely result in padding.
|
1421 |
+
* @param fitToWidth {Number}
|
1422 |
+
*/
|
1423 |
+
forceComplete: function forceComplete(fitToWidth, rowHeight) {
|
1424 |
+
// TODO Handle fitting to width
|
1425 |
+
// var rowWidthWithoutSpacing = this.width - (this.items.length - 1) * this.spacing,
|
1426 |
+
// currentAspectRatio = this.items.reduce(function (sum, item) {
|
1427 |
+
// return sum + item.aspectRatio;
|
1428 |
+
// }, 0);
|
1429 |
+
if (typeof rowHeight === 'number') {
|
1430 |
+
this.completeLayout(rowHeight, this.widowLayoutStyle);
|
1431 |
+
} else {
|
1432 |
+
// Complete using target row height.
|
1433 |
+
this.completeLayout(this.targetRowHeight, this.widowLayoutStyle);
|
1434 |
+
}
|
1435 |
+
},
|
1436 |
+
|
1437 |
+
/**
|
1438 |
+
* Return layout data for items within row.
|
1439 |
+
* Note: returns actual list, not a copy.
|
1440 |
+
*
|
1441 |
+
* @method getItems
|
1442 |
+
* @return Layout data for items within row.
|
1443 |
+
*/
|
1444 |
+
getItems: function getItems() {
|
1445 |
+
return this.items;
|
1446 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1447 |
};
|
1448 |
|
1449 |
/***/ })
|
assets/vendor/flickr-justified-gallery/fjGallery.min.js
CHANGED
@@ -1,25 +1,26 @@
|
|
1 |
/*!
|
2 |
* Name : Flickr's Justified Gallery [fjGallery]
|
3 |
-
* Version : 1.0.
|
4 |
* Author : nK <https://nkdev.info>
|
5 |
* GitHub : https://github.com/nk-o/flickr-justified-gallery
|
6 |
-
*/!function(o){var
|
7 |
/*!
|
8 |
-
* @name JavaScript/NodeJS Merge v1.2.
|
9 |
* @author yeikos
|
10 |
* @repository https://github.com/yeikos/js.merge
|
11 |
|
12 |
* Copyright 2014 yeikos - MIT license
|
13 |
* https://raw.github.com/yeikos/js.merge/master/LICENSE
|
14 |
-
|
15 |
/*!
|
16 |
-
* Copyright
|
17 |
* Licensed under the terms of the MIT license. Please see LICENSE file in the project root for terms.
|
18 |
* @license
|
19 |
-
*/var p=o(
|
20 |
/*!
|
21 |
-
* Copyright
|
22 |
* Licensed under the terms of the MIT license. Please see LICENSE file in the project root for terms.
|
23 |
* @license
|
24 |
-
*/
|
|
|
25 |
//# sourceMappingURL=fjGallery.min.js.map
|
1 |
/*!
|
2 |
* Name : Flickr's Justified Gallery [fjGallery]
|
3 |
+
* Version : 1.0.3
|
4 |
* Author : nK <https://nkdev.info>
|
5 |
* GitHub : https://github.com/nk-o/flickr-justified-gallery
|
6 |
+
*/!function(o){var n={};function i(t){if(n[t])return n[t].exports;var e=n[t]={i:t,l:!1,exports:{}};return o[t].call(e.exports,e,e.exports,i),e.l=!0,e.exports}i.m=o,i.c=n,i.d=function(t,e,o){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(i.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)i.d(o,n,function(t){return e[t]}.bind(null,n));return o},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=0)}([function(t,e,o){t.exports=o(1)},function(t,e,o){"use strict";o.r(e);var n=o(2),i=o.n(n),r=o(3),a=o(5);function s(t){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var c,l,u,h,f=r.window.fjGallery;r.window.fjGallery=a.default,r.window.fjGallery.noConflict=function(){return r.window.fjGallery=f,this},void 0!==r.jQuery&&(c=r.window.fjGallery.constructor.prototype.init,r.window.fjGallery.constructor.prototype.init=function(){this.jQcontainer=Object(r.jQuery)(this.$container),this.jQcontainer.data("fjGallery",this),c&&c.call(this)},l=r.window.fjGallery.constructor.prototype.destroy,r.window.fjGallery.constructor.prototype.destroy=function(){this.jQcontainer&&this.jQcontainer.removeData("fjGallery"),l&&l.call(this)},(u=function(){var t=arguments||[];Array.prototype.unshift.call(t,this);var e=a.default.apply(r.window,t);return"object"!==s(e)?e:this}).constructor=a.default.constructor,h=r.jQuery.fn.fjGallery,r.jQuery.fn.fjGallery=u,r.jQuery.fn.fjGallery.noConflict=function(){return r.jQuery.fn.fjGallery=h,this}),i()(function(){Object(a.default)(document.querySelectorAll(".fj-gallery"))})},function(t,e){t.exports=function(t){"complete"===document.readyState||"interactive"===document.readyState?t.call():document.attachEvent?document.attachEvent("onreadystatechange",function(){"interactive"===document.readyState&&t.call()}):document.addEventListener&&document.addEventListener("DOMContentLoaded",t)}},function(o,t,e){(function(t){var e="undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:{};o.exports=e}).call(this,e(4))},function(t,e){function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"===("undefined"==typeof window?"undefined":o(window))&&(n=window)}t.exports=n},function(t,e,o){"use strict";o.r(e);var a=o(6),n=o(7),s=o.n(n),i=o(2),r=o.n(i),c=o(9),l=o.n(c),u=o(3);function h(t){return(h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function f(t,e){for(var o=0;o<e.length;o++){var n=e[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var d=[];function p(){u.window.requestAnimationFrame(function(){d.forEach(function(t){t.resize()})})}u.window.addEventListener("resize",p),u.window.addEventListener("orientationchange",p),u.window.addEventListener("load",p),r()(function(){p()});function g(t,e){("object"===("undefined"==typeof HTMLElement?"undefined":h(HTMLElement))?t instanceof HTMLElement:t&&"object"===h(t)&&null!==t&&1===t.nodeType&&"string"==typeof t.nodeName)&&(t=[t]);for(var o,n=e,i=Array.prototype.slice.call(arguments,2),r=t.length,a=0;a<r;a++)if("object"===h(n)||void 0===n?t[a].fjGallery||(t[a].fjGallery=new w(t[a],n)):t[a].fjGallery&&(o=t[a].fjGallery[n].apply(t[a].fjGallery,i)),void 0!==o)return o;return t}var y=0,w=function(){function r(t,e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,r);var o=this;o.instanceID=y++,o.$container=t,o.images=[],o.defaults={itemSelector:".fj-gallery-item",imageSelector:"img",gutter:10,rowHeight:320,rowHeightTolerance:.25,resizeThrottle:200,isRtl:"rtl"===o.css(o.$container,"direction"),onInit:null,onDestroy:null,onAppendImages:null,onBeforeJustify:null,onJustify:null};var n=o.$container.dataset||{},i={};Object.keys(n).forEach(function(t){var e=t.substr(0,1).toLowerCase()+t.substr(1);e&&void 0!==o.defaults[e]&&(i[e]=n[t])}),o.options=s()({},o.defaults,i,e),o.pureOptions=s()({},o.options),o.resize=Object(a.throttle)(o.options.resizeThrottle,o.resize),o.init()}var t,e,o;return t=r,(e=[{key:"css",value:function(e,o){return"string"==typeof o?u.window.getComputedStyle(e).getPropertyValue(o):(o.transform&&(o["-webkit-transform"]=o.transform),Object.keys(o).forEach(function(t){e.style[t]=o[t]}),e)}},{key:"addToFjGalleryList",value:function(){d.push(this),p()}},{key:"removeFromFjGalleryList",value:function(){var o=this;d.forEach(function(t,e){t.instanceID===o.instanceID&&d.splice(e,1)})}},{key:"init",value:function(){var t=this;t.appendImages(t.$container.querySelectorAll(t.options.itemSelector)),t.addToFjGalleryList(),t.options.onInit&&t.options.onInit.call(t)}},{key:"appendImages",value:function(t){var f=this;u.window.jQuery&&t instanceof u.window.jQuery&&(t=t.get()),t&&t.length&&(t.forEach(function(t){var h,e;!t||t.fjGalleryImage||!t.querySelector||(h=t.querySelector(f.options.imageSelector))&&(t.fjGalleryImage=f,(e={$item:t,$image:h,width:parseFloat(h.getAttribute("width"))||!1,height:parseFloat(h.getAttribute("height"))||!1,loadSizes:function(){var t,e,o,n,i,r,a=this;function s(){n?e(n):(n={width:t.naturalWidth,height:t.naturalHeight},e(n),clearInterval(o),i&&r())}function c(){s()}function l(){s()}function u(){0<t.naturalWidth&&s()}t=h,i=n=!(e=function(t){a.width===t.width&&a.height===t.height||(a.width=t.width,a.height=t.height,f.resize())}),r=function(){i=!1,t.removeEventListener("load",c),t.removeEventListener("error",l)},u(),n||(i=!0,t.addEventListener("load",c),t.addEventListener("error",l),o=setInterval(u,100))}}).loadSizes(),f.images.push(e))}),f.options.onAppendImages&&f.options.onAppendImages.call(f,[t]),f.justify())}},{key:"justify",value:function(){var e=this,o=[];e.options.onBeforeJustify&&e.options.onBeforeJustify.call(e),e.images.forEach(function(t){t.width&&t.height&&o.push(t.width/t.height)});var n=l()(o,{containerWidth:e.$container.getBoundingClientRect().width,containerPadding:{top:parseFloat(e.css(e.$container,"padding-top"))||0,right:parseFloat(e.css(e.$container,"padding-right"))||0,bottom:parseFloat(e.css(e.$container,"padding-bottom"))||0,left:parseFloat(e.css(e.$container,"padding-left"))||0},boxSpacing:e.options.gutter,targetRowHeight:e.options.rowHeight,targetRowHeightTolerance:e.options.rowHeightTolerance});e.css(e.$container,{height:"".concat(n.containerHeight,"px")});var i=0;e.images.forEach(function(t){t.width&&t.height&&(e.css(t.$item,{position:"absolute",transform:"translateX(".concat((e.options.isRtl?-1:1)*n.boxes[i].left,"px) translateY(").concat(n.boxes[i].top,"px) translateZ(0)"),width:"".concat(n.boxes[i].width,"px"),height:"".concat(n.boxes[i].height,"px")}),i++)}),e.options.onJustify&&e.options.onJustify.call(e)}},{key:"updateOptions",value:function(t){this.options=s()({},this.options,t),this.justify()}},{key:"destroy",value:function(){var e=this;e.removeFromFjGalleryList(),e.options.onDestroy&&e.options.onDestroy.call(e),e.css(e.$container,{height:""}),e.images.forEach(function(t){e.css(t.$item,{position:"",transform:"",width:"",height:""})}),e.images.forEach(function(t){delete t.$item.fjGalleryImage}),delete e.$container.fjGallery}},{key:"resize",value:function(){this.justify()}}])&&f(t.prototype,e),o&&f(t,o),r}();g.constructor=w,e.default=g},function(t,e,o){"use strict";function n(a,s,c,l){var u,h=!1,f=0;function d(){u&&clearTimeout(u)}function t(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];var n=this,i=Date.now()-f;function r(){f=Date.now(),c.apply(n,e)}h||(l&&!u&&r(),d(),void 0===l&&a<i?r():!0!==s&&(u=setTimeout(l?function(){u=void 0}:r,void 0===l?a-i:a)))}return"boolean"!=typeof s&&(l=c,c=s,s=void 0),t.cancel=function(){d(),h=!0},t}function i(t,e,o){return void 0===o?n(t,e,!1):n(t,o,!1!==e)}o.r(e),o.d(e,"debounce",function(){return i}),o.d(e,"throttle",function(){return n})},function(t,e,o){(function(t){function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}
|
7 |
/*!
|
8 |
+
* @name JavaScript/NodeJS Merge v1.2.1
|
9 |
* @author yeikos
|
10 |
* @repository https://github.com/yeikos/js.merge
|
11 |
|
12 |
* Copyright 2014 yeikos - MIT license
|
13 |
* https://raw.github.com/yeikos/js.merge/master/LICENSE
|
14 |
+
*/function o(t,e,o){var n=o[0],i=o.length;!t&&"object"===l(n)||(n={});for(var r=0;r<i;++r){var a,s=o[r];if("object"===l(s))for(var c in s){"__proto__"!==c&&(a=t?u.clone(s[c]):s[c],n[c]=e?function t(e,o){if("object"!==l(e))return o;for(var n in o)"object"===l(e[n])&&"object"===l(o[n])?e[n]=t(e[n],o[n]):e[n]=o[n];return e}(n[c],a):a)}}return n}function l(t){return{}.toString.call(t).slice(8,-1).toLowerCase()}var n,u;n="object"===e(t)&&t&&"object"===e(t.exports)&&t.exports,(u=function(t){return o(!0===t,!1,arguments)}).recursive=function(t){return o(!0===t,!0,arguments)},u.clone=function(t){var e,o,n=t,i=l(t);if("array"===i)for(n=[],o=t.length,e=0;e<o;++e)n[e]=u.clone(t[e]);else if("object"===i)for(e in n={},t)n[e]=u.clone(t[e]);return n},n?t.exports=u:window.merge=u}).call(this,o(8)(t))},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,o){"use strict";
|
15 |
/*!
|
16 |
+
* Copyright 2019 SmugMug, Inc.
|
17 |
* Licensed under the terms of the MIT license. Please see LICENSE file in the project root for terms.
|
18 |
* @license
|
19 |
+
*/var p=o(7),n=o(10);function g(t,e){var o;return!1!==t.fullWidthBreakoutRowCadence&&(e._rows.length+1)%t.fullWidthBreakoutRowCadence==0&&(o=!0),new n({top:e._containerHeight,left:t.containerPadding.left,width:t.containerWidth-t.containerPadding.left-t.containerPadding.right,spacing:t.boxSpacing.horizontal,targetRowHeight:t.targetRowHeight,targetRowHeightTolerance:t.targetRowHeightTolerance,edgeCaseMinRowHeight:.5*t.targetRowHeight,edgeCaseMaxRowHeight:2*t.targetRowHeight,rightToLeft:!1,isBreakoutRow:o,widowLayoutStyle:t.widowLayoutStyle})}function y(t,e,o){return e._rows.push(o),e._layoutItems=e._layoutItems.concat(o.getItems()),e._containerHeight+=o.height+t.boxSpacing.vertical,o.items}t.exports=function(t,e){var o,n,i,r,a,s,c,l={},u={},h={containerWidth:1060,containerPadding:10,boxSpacing:10,targetRowHeight:320,targetRowHeightTolerance:.25,maxNumRows:Number.POSITIVE_INFINITY,forceAspectRatio:!1,showWidows:!0,fullWidthBreakoutRowCadence:!1,widowLayoutStyle:"left"},f={},d={},l=p(h,e=e||{});return f.top=isNaN(parseFloat(l.containerPadding.top))?l.containerPadding:l.containerPadding.top,f.right=isNaN(parseFloat(l.containerPadding.right))?l.containerPadding:l.containerPadding.right,f.bottom=isNaN(parseFloat(l.containerPadding.bottom))?l.containerPadding:l.containerPadding.bottom,f.left=isNaN(parseFloat(l.containerPadding.left))?l.containerPadding:l.containerPadding.left,d.horizontal=isNaN(parseFloat(l.boxSpacing.horizontal))?l.boxSpacing:l.boxSpacing.horizontal,d.vertical=isNaN(parseFloat(l.boxSpacing.vertical))?l.boxSpacing:l.boxSpacing.vertical,l.containerPadding=f,l.boxSpacing=d,u._layoutItems=[],u._awakeItems=[],u._inViewportItems=[],u._leadingOrphans=[],u._trailingOrphans=[],u._containerHeight=l.containerPadding.top,u._rows=[],u._orphans=[],l._widowCount=0,o=l,n=u,i=t.map(function(t){return t.width&&t.height?{aspectRatio:t.width/t.height}:{aspectRatio:t}}),c=[],o.forceAspectRatio&&i.forEach(function(t){t.forcedAspectRatio=!0,t.aspectRatio=o.forceAspectRatio}),i.some(function(t,e){if(isNaN(t.aspectRatio))throw new Error("Item "+e+" has an invalid aspect ratio");if(a=a||g(o,n),r=a.addItem(t),a.isLayoutComplete()){if(c=c.concat(y(o,n,a)),n._rows.length>=o.maxNumRows)return!(a=null);if(a=g(o,n),!r&&(r=a.addItem(t),a.isLayoutComplete())){if(c=c.concat(y(o,n,a)),n._rows.length>=o.maxNumRows)return!(a=null);a=g(o,n)}}}),a&&a.getItems().length&&o.showWidows&&(n._rows.length?(s=n._rows[n._rows.length-1].isBreakoutRow?n._rows[n._rows.length-1].targetRowHeight:n._rows[n._rows.length-1].height,a.forceComplete(!1,s)):a.forceComplete(!1),c=c.concat(y(o,n,a)),o._widowCount=a.getItems().length),n._containerHeight=n._containerHeight-o.boxSpacing.vertical,n._containerHeight=n._containerHeight+o.containerPadding.bottom,{containerHeight:n._containerHeight,widowCount:o._widowCount,boxes:n._layoutItems}}},function(t,e,o){
|
20 |
/*!
|
21 |
+
* Copyright 2019 SmugMug, Inc.
|
22 |
* Licensed under the terms of the MIT license. Please see LICENSE file in the project root for terms.
|
23 |
* @license
|
24 |
+
*/
|
25 |
+
var c=o(7);(t.exports=function(t){this.top=t.top,this.left=t.left,this.width=t.width,this.spacing=t.spacing,this.targetRowHeight=t.targetRowHeight,this.targetRowHeightTolerance=t.targetRowHeightTolerance,this.minAspectRatio=this.width/t.targetRowHeight*(1-t.targetRowHeightTolerance),this.maxAspectRatio=this.width/t.targetRowHeight*(1+t.targetRowHeightTolerance),this.edgeCaseMinRowHeight=t.edgeCaseMinRowHeight,this.edgeCaseMaxRowHeight=t.edgeCaseMaxRowHeight,this.widowLayoutStyle=t.widowLayoutStyle,this.isBreakoutRow=t.isBreakoutRow,this.items=[],this.height=0}).prototype={addItem:function(t){var e,o,n,i=this.items.concat(t),r=this.width-(i.length-1)*this.spacing,a=i.reduce(function(t,e){return t+e.aspectRatio},0),s=r/this.targetRowHeight;return this.isBreakoutRow&&0===this.items.length&&1<=t.aspectRatio?(this.items.push(t),this.completeLayout(r/t.aspectRatio,"justify"),!0):a<this.minAspectRatio?(this.items.push(c(t)),!0):!(a>this.maxAspectRatio)||0===this.items.length?(this.items.push(c(t)),this.completeLayout(r/a,"justify"),!0):(e=this.width-(this.items.length-1)*this.spacing,o=this.items.reduce(function(t,e){return t+e.aspectRatio},0),n=e/this.targetRowHeight,Math.abs(a-s)>Math.abs(o-n)?(this.completeLayout(e/o,"justify"),!1):(this.items.push(c(t)),this.completeLayout(r/a,"justify"),!0))},isLayoutComplete:function(){return 0<this.height},completeLayout:function(t,e){var o,n,i,r,a,s=this.left,c=this.width-(this.items.length-1)*this.spacing;(void 0===e||["justify","center","left"].indexOf(e)<0)&&(e="left"),n=Math.max(this.edgeCaseMinRowHeight,Math.min(t,this.edgeCaseMaxRowHeight)),o=t!==n?c/(this.height=n)/(c/t):(this.height=t,1),this.items.forEach(function(t){t.top=this.top,t.width=t.aspectRatio*this.height*o,t.height=this.height,t.left=s,s+=t.width+this.spacing},this),"justify"===e?(s-=this.spacing+this.left,i=(s-this.width)/this.items.length,r=this.items.map(function(t,e){return Math.round((e+1)*i)}),1===this.items.length?this.items[0].width-=Math.round(i):this.items.forEach(function(t,e){0<e?(t.left-=r[e-1],t.width-=r[e]-r[e-1]):t.width-=r[e]})):"center"===e&&(a=(this.width-s)/2,this.items.forEach(function(t){t.left+=a+this.spacing},this))},forceComplete:function(t,e){"number"==typeof e?this.completeLayout(e,this.widowLayoutStyle):this.completeLayout(this.targetRowHeight,this.widowLayoutStyle)},getItems:function(){return this.items}}}]);
|
26 |
//# sourceMappingURL=fjGallery.min.js.map
|
assets/vendor/flickr-justified-gallery/fjGallery.min.js.map
CHANGED
@@ -1 +1 @@
|
|
1 |
-
{"version":3,"sources":["fjGallery.js"],"names":["modules","installedModules","__webpack_require__","moduleId","exports","module","i","l","call","m","c","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","n","__esModule","object","property","prototype","hasOwnProperty","p","s","global","win","window","self","_typeof","Symbol","iterator","obj","constructor","isNode","Public","clone","merge","arguments","merge_recursive","base","extend","typeOf","key","recursive","argv","result","size","length","index","item","sitem","input","toString","slice","toLowerCase","output","type","callback","document","readyState","attachEvent","addEventListener","_liteReady2","_interopRequireDefault","_global","_fjGallery2","default","oldPlugin","fjGallery","noConflict","this","jQuery","oldInit","init","jQcontainer","$container","data","oldDestroy","destroy","removeData","jQueryPlugin","args","Array","unshift","res","apply","oldJqPlugin","fn","querySelectorAll","g","Function","eval","e","value","_createClass","defineProperties","target","props","descriptor","writable","Constructor","protoProps","staticProps","_throttle2","_merge2","_rafl2","_justifiedLayout2","fjGalleryList","updateFjGallery","forEach","resize","instanceID","container","userOptions","instance","TypeError","_classCallCheck","images","defaults","itemSelector","imageSelector","gutter","rowHeight","rowHeightTolerance","resizeThrottle","onInit","onDestroy","onAppendImages","onBeforeJustify","onJustify","dataOptions","dataset","pureDataOptions","keys","loweCaseOption","substr","options","pureOptions","el","styles","getComputedStyle","getPropertyValue","transform","style","push","splice","appendImages","addToFjGalleryList","$images","$item","fjGalleryImage","querySelector","$image","width","parseFloat","getAttribute","height","loadSizes","img","cb","interval","hasSize","addedListeners","onHasSize","onLoaded","onError","checkSize","removeListeners","itemData","dimensions","naturalWidth","naturalHeight","clearInterval","removeEventListener","setInterval","justify","justifyArray","justifiedData","containerWidth","getBoundingClientRect","containerPadding","top","css","right","bottom","left","boxSpacing","targetRowHeight","targetRowHeightTolerance","containerHeight","position","boxes","removeFromFjGalleryList","val","plugin","items","HTMLElement","nodeType","nodeName","len","k","ret","delay","noTrailing","debounceMode","timeoutID","lastExec","undefined","elapsed","Number","Date","exec","clearTimeout","setTimeout","webpackPolyfill","deprecate","paths","children","request","requestAnimationFrame","webkitRequestAnimationFrame","mozRequestAnimationFrame","curr","ms","Math","max","prev","req","cancel","cancelAnimationFrame","webkitCancelAnimationFrame","mozCancelAnimationFrame","bind","Row","createNewRow","layoutConfig","layoutData","isBreakoutRow","fullWidthBreakoutRowCadence","_rows","_containerHeight","spacing","horizontal","edgeCaseMinRowHeight","edgeCaseMaxRowHeight","rightToLeft","widowLayoutStyle","addRow","row","_layoutItems","concat","getItems","vertical","config","itemLayoutData","itemAdded","currentRow","nextToLastRowHeight","laidOutItems","maxNumRows","POSITIVE_INFINITY","forceAspectRatio","showWidows","isNaN","_awakeItems","_inViewportItems","_leadingOrphans","_trailingOrphans","_orphans","_widowCount","map","aspectRatio","forcedAspectRatio","some","Error","addItem","isLayoutComplete","forceComplete","widowCount","params","minAspectRatio","maxAspectRatio","previousRowWidthWithoutSpacing","previousAspectRatio","previousTargetAspectRatio","newItems","rowWidthWithoutSpacing","newAspectRatio","reduce","sum","targetAspectRatio","completeLayout","abs","newHeight","clampedToNativeRatio","clampedHeight","errorWidthPerItem","roundedCumulativeErrors","centerOffset","itemWidthSum","indexOf","min","round","fitToWidth"],"mappings":";;;;;IAAA,SAAAA,GAEA,IAAAC,EAAA,GAGA,SAAAC,EAAAC,GAGA,GAAAF,EAAAE,GACA,OAAAF,EAAAE,GAAAC,QAGA,IAAAC,EAAAJ,EAAAE,GAAA,CACAG,EAAAH,EACAI,GAAA,EACAH,QAAA,IAUA,OANAJ,EAAAG,GAAAK,KAAAH,EAAAD,QAAAC,EAAAA,EAAAD,QAAAF,GAGAG,EAAAE,GAAA,EAGAF,EAAAD,QAKAF,EAAAO,EAAAT,EAGAE,EAAAQ,EAAAT,EAGAC,EAAAS,EAAA,SAAAP,EAAAQ,EAAAC,GACAX,EAAAY,EAAAV,EAAAQ,IACAG,OAAAC,eAAAZ,EAAAQ,EAAA,CACAK,cAAA,EACAC,YAAA,EACAC,IAAAN,KAMAX,EAAAkB,EAAA,SAAAf,GACA,IAAAQ,EAAAR,GAAAA,EAAAgB,WACA,WAAA,OAAAhB,EAAA,SACA,WAAA,OAAAA,GAEA,OADAH,EAAAS,EAAAE,EAAA,IAAAA,GACAA,GAIAX,EAAAY,EAAA,SAAAQ,EAAAC,GAAA,OAAAR,OAAAS,UAAAC,eAAAjB,KAAAc,EAAAC,IAGArB,EAAAwB,EAAA,GAGAxB,EAAAA,EAAAyB,EAAA,GA9DA,CAiEA,CAEA,SAAAtB,EAAAD,EAAAF,GAEA,cACA,SAAA0B,GAEA,IAAAC,EAGAA,EADA,oBAAAC,OACAA,YACA,IAAAF,EACAA,EACA,oBAAAG,KACAA,KAEA,GAGA1B,EAAAD,QAAAyB,IACArB,KAAAJ,EAAAF,EAAA,KAIA,SAAAG,EAAAD,EAAAF,GAEA,cACA,SAAAG,GAEA,IAAA2B,EAAA,mBAAAC,QAAA,iBAAAA,OAAAC,SAAA,SAAAC,GAAA,cAAAA,GAAA,SAAAA,GAAA,OAAAA,GAAA,mBAAAF,QAAAE,EAAAC,cAAAH,QAAAE,IAAAF,OAAAT,UAAA,gBAAAW;;;;;;;;IAWA,SAAAE,GASA,IAAAC,EAAA,SAAAC,GAEA,OAAAC,GAAA,IAAAD,GAAA,EAAAE,YA0DA,SAAAC,EAAAC,EAAAC,GAEA,GAAA,WAAAC,EAAAF,GAAA,OAAAC,EAEA,IAAA,IAAAE,KAAAF,EAEA,WAAAC,EAAAF,EAAAG,KAAA,WAAAD,EAAAD,EAAAE,IAEAH,EAAAG,GAAAJ,EAAAC,EAAAG,GAAAF,EAAAE,IAGAH,EAAAG,GAAAF,EAAAE,GAIA,OAAAH,EAWA,SAAAH,EAAAD,EAAAQ,EAAAC,GAEA,IAAAC,EAAAD,EAAA,GACAE,EAAAF,EAAAG,QAEAZ,GAAA,WAAAM,EAAAI,MAAAA,EAAA,IAEA,IAAA,IAAAG,EAAA,EAAAA,EAAAF,IAAAE,EAAA,CAEA,IAAAC,EAAAL,EAAAI,GAGA,GAAA,WAFAP,EAAAQ,GAIA,IAAA,IAAAP,KAAAO,EAAA,CAEA,IAAAC,EAAAf,EAAAD,EAAAC,MAAAc,EAAAP,IAAAO,EAAAP,GAIAG,EAAAH,GAFAC,EAEAL,EAAAO,EAAAH,GAAAQ,GAGAA,GAKA,OAAAL,EAWA,SAAAJ,EAAAU,GAEA,MAAA,GAAAC,SAAAhD,KAAA+C,GAAAE,MAAA,GAAA,GAAAC,cAlHApB,EAAAS,UAAA,SAAAR,GAEA,OAAAC,GAAA,IAAAD,GAAA,EAAAE,YASAH,EAAAC,MAAA,SAAAgB,GAEA,IAEAH,EACAF,EAHAS,EAAAJ,EACAK,EAAAf,EAAAU,GAIA,GAAA,UAAAK,EAKA,IAHAD,EAAA,GACAT,EAAAK,EAAAJ,OAEAC,EAAA,EAAAA,EAAAF,IAAAE,EAEAO,EAAAP,GAAAd,EAAAC,MAAAgB,EAAAH,SAEA,GAAA,WAAAQ,EAIA,IAAAR,KAFAO,EAAA,GAEAJ,EAEAI,EAAAP,GAAAd,EAAAC,MAAAgB,EAAAH,IAIA,OAAAO,GAgFAtB,EAEAhC,EAAAD,QAAAkC,EAGAR,OAAA,MAAAQ,EAhJA,CAkJA,WAAAN,EAAA3B,IAAAA,GAAA,WAAA2B,EAAA3B,EAAAD,UAAAC,EAAAD,WACAI,KAAAJ,EAAAF,EAAA,EAAAA,CAAAG,KAIA,SAAAA,EAAAD,EAAAF,GAEA,aAGAG,EAAAD,QAAA,SAAAyD,GAEA,aAAAC,SAAAC,YAAA,gBAAAD,SAAAC,WAEAF,EAAArD,OACAsD,SAAAE,YAEAF,SAAAE,YAAA,qBAAA,WACA,gBAAAF,SAAAC,YAAAF,EAAArD,SAEAsD,SAAAG,kBAEAH,SAAAG,iBAAA,mBAAAJ,KAMA,SAAAxD,EAAAD,EAAAF,GAEAG,EAAAD,QAAAF,EAAA,IAKA,SAAAG,EAAAD,EAAAF,GAEA,aAGA,IAAA8B,EAAA,mBAAAC,QAAA,iBAAAA,OAAAC,SAAA,SAAAC,GAAA,cAAAA,GAAA,SAAAA,GAAA,OAAAA,GAAA,mBAAAF,QAAAE,EAAAC,cAAAH,QAAAE,IAAAF,OAAAT,UAAA,gBAAAW,GAIA+B,EAAAC,EAFAjE,EAAA,IAIAkE,EAAAlE,EAAA,GAIAmE,EAAAF,EAFAjE,EAAA,IAIA,SAAAiE,EAAAhC,GAAA,OAAAA,GAAAA,EAAAd,WAAAc,EAAA,CAAAmC,QAAAnC,GAGA,IAAAoC,EAAAH,EAAAtC,OAAA0C,UAQA,GAPAJ,EAAAtC,OAAA0C,UAAAH,EAAAC,QACAF,EAAAtC,OAAA0C,UAAAC,WAAA,WAEA,OADAL,EAAAtC,OAAA0C,UAAAD,EACAG,WAIA,IAAAN,EAAAO,OAAA,CAEA,IAAAC,EAAAR,EAAAtC,OAAA0C,UAAApC,YAAAZ,UAAAqD,KACAT,EAAAtC,OAAA0C,UAAApC,YAAAZ,UAAAqD,KAAA,WACAH,KAAAI,aAAA,EAAAV,EAAAO,QAAAD,KAAAK,YACAL,KAAAI,YAAAE,KAAA,YAAAN,MACAE,GACAA,EAAApE,KAAAkE,OAKA,IAAAO,EAAAb,EAAAtC,OAAA0C,UAAApC,YAAAZ,UAAA0D,QACAd,EAAAtC,OAAA0C,UAAApC,YAAAZ,UAAA0D,QAAA,WACAR,KAAAI,aACAJ,KAAAI,YAAAK,WAAA,aAEAF,GACAA,EAAAzE,KAAAkE,OAIA,IAAAU,EAAA,WACA,IAAAC,EAAA5C,WAAA,GACA6C,MAAA9D,UAAA+D,QAAA/E,KAAA6E,EAAAX,MACA,IAAAc,EAAAnB,EAAAC,QAAAmB,MAAArB,EAAAtC,OAAAuD,GACA,MAAA,iBAAA,IAAAG,EAAA,YAAAxD,EAAAwD,IAAAA,EAAAd,MAEAU,EAAAhD,YAAAiC,EAAAC,QAAAlC,YAGA,IAAAsD,EAAAtB,EAAAO,OAAAgB,GAAAnB,UACAJ,EAAAO,OAAAgB,GAAAnB,UAAAY,EACAhB,EAAAO,OAAAgB,GAAAnB,UAAAC,WAAA,WAEA,OADAL,EAAAO,OAAAgB,GAAAnB,UAAAkB,EACAhB,OAKA,EAAAR,EAAAI,SAAA,YACA,EAAAD,EAAAC,SAAAR,SAAA8B,iBAAA,mBAKA,SAAAvF,EAAAD,EAAAF,GAEA,aAGA,IAEA2F,EAFA7D,EAAA,mBAAAC,QAAA,iBAAAA,OAAAC,SAAA,SAAAC,GAAA,cAAAA,GAAA,SAAAA,GAAA,OAAAA,GAAA,mBAAAF,QAAAE,EAAAC,cAAAH,QAAAE,IAAAF,OAAAT,UAAA,gBAAAW,GAKA0D,EAAA,WACA,OAAAnB,KADA,GAIA,IAEAmB,EAAAA,GAAAC,SAAA,cAAAA,KAAA,EAAAC,MAAA,QACA,MAAAC,GAEA,YAAA,oBAAAlE,OAAA,YAAAE,EAAAF,WAAA+D,EAAA/D,QAOAzB,EAAAD,QAAAyF,GAIA,SAAAxF,EAAAD,EAAAF,GAEA,aAGAa,OAAAC,eAAAZ,EAAA,aAAA,CACA6F,OAAA,IAGA,IAAAjE,EAAA,mBAAAC,QAAA,iBAAAA,OAAAC,SAAA,SAAAC,GAAA,cAAAA,GAAA,SAAAA,GAAA,OAAAA,GAAA,mBAAAF,QAAAE,EAAAC,cAAAH,QAAAE,IAAAF,OAAAT,UAAA,gBAAAW,GAEA+D,EAAA,WAAA,SAAAC,EAAAC,EAAAC,GAAA,IAAA,IAAA/F,EAAA,EAAAA,EAAA+F,EAAAlD,OAAA7C,IAAA,CAAA,IAAAgG,EAAAD,EAAA/F,GAAAgG,EAAApF,WAAAoF,EAAApF,aAAA,EAAAoF,EAAArF,cAAA,EAAA,UAAAqF,IAAAA,EAAAC,UAAA,GAAAxF,OAAAC,eAAAoF,EAAAE,EAAAxD,IAAAwD,IAAA,OAAA,SAAAE,EAAAC,EAAAC,GAAA,OAAAD,GAAAN,EAAAK,EAAAhF,UAAAiF,GAAAC,GAAAP,EAAAK,EAAAE,GAAAF,GAAA,GAIAG,EAAAxC,EAFAjE,EAAA,IAMA0G,EAAAzC,EAFAjE,EAAA,IAMAgE,EAAAC,EAFAjE,EAAA,IAMA2G,EAAA1C,EAFAjE,EAAA,IAMA4G,EAAA3C,EAFAjE,EAAA,KAIAkE,EAAAlE,EAAA,GAEA,SAAAiE,EAAAhC,GAAA,OAAAA,GAAAA,EAAAd,WAAAc,EAAA,CAAAmC,QAAAnC,GAMA,IAAA4E,EAAA,GAEA,SAAAC,KACA,EAAAH,EAAAvC,SAAA,WACAyC,EAAAE,QAAA,SAAA5D,GACAA,EAAA6D,aAKA9C,EAAAtC,OAAAmC,iBAAA,SAAA+C,GACA5C,EAAAtC,OAAAmC,iBAAA,oBAAA+C,GACA5C,EAAAtC,OAAAmC,iBAAA,OAAA+C,IACA,EAAA9C,EAAAI,SAAA,WACA0C,MA0DA,IAAAG,EAAA,EAIA3C,EAAA,WACA,SAAAA,EAAA4C,EAAAC,IAjFA,SAAAC,EAAAd,GAAA,KAAAc,aAAAd,GAAA,MAAA,IAAAe,UAAA,qCAkFAC,CAAA9C,KAAAF,GAEA,IAAAzC,EAAA2C,KAEA3C,EAAAoF,WAAAA,IAEApF,EAAAgD,WAAAqC,EAEArF,EAAA0F,OAAA,GAEA1F,EAAA2F,SAAA,CACAC,aAAA,mBACAC,cAAA,MACAC,OAAA,GACAC,UAAA,IACAC,mBAAA,IACAC,eAAA,IAGAC,OAAA,KACAC,UAAA,KACAC,eAAA,KACAC,gBAAA,KACAC,UAAA,MAIA,IAAAC,EAAAvG,EAAAgD,WAAAwD,SAAA,GACAC,EAAA,GACAzH,OAAA0H,KAAAH,GAAArB,QAAA,SAAAnE,GACA,IAAA4F,EAAA5F,EAAA6F,OAAA,EAAA,GAAAjF,cAAAZ,EAAA6F,OAAA,GACAD,QAAA,IAAA3G,EAAA2F,SAAAgB,KACAF,EAAAE,GAAAJ,EAAAxF,MAIAf,EAAA6G,SAAA,EAAAhC,EAAAtC,SAAA,GAAAvC,EAAA2F,SAAAc,EAAAnB,GACAtF,EAAA8G,aAAA,EAAAjC,EAAAtC,SAAA,GAAAvC,EAAA6G,SAGA7G,EAAAmF,QAAA,EAAAP,EAAArC,SAAAvC,EAAA6G,QAAAZ,eAAAjG,EAAAmF,QAEAnF,EAAA8C,OA8NA,OAxNAqB,EAAA1B,EAAA,CAAA,CACA1B,IAAA,MACAmD,MAAA,SAAA6C,EAAAC,GACA,MAAA,iBAAAA,EACA3E,EAAAtC,OAAAkH,iBAAAF,GAAAG,iBAAAF,IAIAA,EAAAG,YACAH,EAAA,qBAAAA,EAAAG,WAGAnI,OAAA0H,KAAAM,GAAA9B,QAAA,SAAAnE,GACAgG,EAAAK,MAAArG,GAAAiG,EAAAjG,KAEAgG,KAKA,CACAhG,IAAA,qBACAmD,MAAA,WACAc,EAAAqC,KAAA1E,MACAsC,MAKA,CACAlE,IAAA,0BACAmD,MAAA,WACA,IAAAlE,EAAA2C,KAEAqC,EAAAE,QAAA,SAAA5D,EAAAP,GACAO,EAAA8D,aAAApF,EAAAoF,YACAJ,EAAAsC,OAAAvG,EAAA,OAIA,CACAA,IAAA,OACAmD,MAAA,WACA,IAAAlE,EAAA2C,KAEA3C,EAAAuH,aAAAvH,EAAAgD,WAAAa,iBAAA7D,EAAA6G,QAAAjB,eAEA5F,EAAAwH,qBAGAxH,EAAA6G,QAAAX,QACAlG,EAAA6G,QAAAX,OAAAzH,KAAAuB,KAMA,CACAe,IAAA,eACAmD,MAAA,SAAAuD,GACA,IAAAzH,EAAA2C,KAGAN,EAAAtC,OAAA6C,QAAA6E,aAAApF,EAAAtC,OAAA6C,SACA6E,EAAAA,EAAArI,OAGAqI,GAAAA,EAAArG,SAIAqG,EAAAvC,QAAA,SAAAwC,GAGA,GAAAA,IAAAA,EAAAC,gBAAAD,EAAAE,cAAA,CACA,IAAAC,EAAAH,EAAAE,cAAA5H,EAAA6G,QAAAhB,eAEA,GAAAgC,EAAA,CACAH,EAAAC,eAAA3H,EACA,IAAAiD,EAAA,CACAyE,MAAAA,EACAG,OAAAA,EACAC,MAAAC,WAAAF,EAAAG,aAAA,YAAA,EACAC,OAAAF,WAAAF,EAAAG,aAAA,aAAA,EACAE,UAAA,WACA,IAhMAC,EAAAC,EACAC,EACAC,EACAC,EAEAC,EAkBAC,EAGAC,EAGAC,EAUAC,EAyJAC,EAAAlG,KAhMAwF,EAiMAN,EAhMAQ,OAAA,EAEAE,EADAD,IAFAF,EAiMA,SAAAU,GACAD,EAAAf,QAAAgB,EAAAhB,OAAAe,EAAAZ,SAAAa,EAAAb,SACAY,EAAAf,MAAAgB,EAAAhB,MACAe,EAAAZ,OAAAa,EAAAb,OACAjI,EAAAmF,YAhMAqD,EAAA,WACAF,EACAF,EAAAE,IAIAA,EAAA,CACAR,MAAAK,EAAAY,aACAd,OAAAE,EAAAa,eAEAZ,EAAAE,GAEAW,cAAAZ,GACAE,GAEAK,MAGAH,EAAA,WACAD,KAEAE,EAAA,WACAF,KAYAI,EAAA,WACAL,GAAA,EACAJ,EAAAe,oBAAA,OAAAT,GACAN,EAAAe,oBAAA,QAAAR,KAbAC,EAAA,WACA,EAAAR,EAAAY,cACAP,QAgBAF,IAZAC,GAAA,EACAJ,EAAAjG,iBAAA,OAAAuG,GACAN,EAAAjG,iBAAA,QAAAwG,GAYAL,EAAAc,YAAAR,EAAA,QAyJA1F,EAAAiF,YAEAlI,EAAA0F,OAAA2B,KAAApE,OAMAjD,EAAA6G,QAAAT,gBACApG,EAAA6G,QAAAT,eAAA3H,KAAAuB,EAAA,CAAAyH,IAGAzH,EAAAoJ,aAKA,CACArI,IAAA,UACAmD,MAAA,WACA,IAAAlE,EAAA2C,KACA0G,EAAA,GAGArJ,EAAA6G,QAAAR,iBACArG,EAAA6G,QAAAR,gBAAA5H,KAAAuB,GAGAA,EAAA0F,OAAAR,QAAA,SAAAjC,GACAA,EAAA6E,OAAA7E,EAAAgF,QACAoB,EAAAhC,KAAApE,EAAA6E,MAAA7E,EAAAgF,UAIA,IAAAqB,GAAA,EAAAvE,EAAAxC,SAAA8G,EAAA,CACAE,eAAAvJ,EAAAgD,WAAAwG,wBAAA1B,MACA2B,iBAAA,CACAC,IAAA3B,WAAA/H,EAAA2J,IAAA3J,EAAAgD,WAAA,iBAAA,EACA4G,MAAA7B,WAAA/H,EAAA2J,IAAA3J,EAAAgD,WAAA,mBAAA,EACA6G,OAAA9B,WAAA/H,EAAA2J,IAAA3J,EAAAgD,WAAA,oBAAA,EACA8G,KAAA/B,WAAA/H,EAAA2J,IAAA3J,EAAAgD,WAAA,kBAAA,GAEA+G,WAAA/J,EAAA6G,QAAAf,OACAkE,gBAAAhK,EAAA6G,QAAAd,UACAkE,yBAAAjK,EAAA6G,QAAAb,qBAGAhG,EAAA2J,IAAA3J,EAAAgD,WAAA,CACAiF,OAAAqB,EAAAY,gBAAA,OAGA,IAAA3L,EAAA,EACAyB,EAAA0F,OAAAR,QAAA,SAAAjC,GACAA,EAAA6E,OAAA7E,EAAAgF,SACAjI,EAAA2J,IAAA1G,EAAAyE,MAAA,CACAyC,SAAA,WACAhD,UAAA,cAAAmC,EAAAc,MAAA7L,GAAAuL,KAAA,kBAAAR,EAAAc,MAAA7L,GAAAmL,IAAA,oBACA5B,MAAAwB,EAAAc,MAAA7L,GAAAuJ,MAAA,KACAG,OAAAqB,EAAAc,MAAA7L,GAAA0J,OAAA,OAEA1J,OAKAyB,EAAA6G,QAAAP,WACAtG,EAAA6G,QAAAP,UAAA7H,KAAAuB,KAMA,CACAe,IAAA,gBACAmD,MAAA,SAAA2C,GACAlE,KACAkE,SAAA,EAAAhC,EAAAtC,SAAA,GADAI,KACAkE,QAAAA,GADAlE,KAEAyG,YAEA,CACArI,IAAA,UACAmD,MAAA,WACA,IAAAlE,EAAA2C,KAEA3C,EAAAqK,0BAGArK,EAAA6G,QAAAV,WACAnG,EAAA6G,QAAAV,UAAA1H,KAAAuB,GAIAA,EAAA2J,IAAA3J,EAAAgD,WAAA,CACAiF,OAAA,KAEAjI,EAAA0F,OAAAR,QAAA,SAAAjC,GACAjD,EAAA2J,IAAA1G,EAAAyE,MAAA,CACAyC,SAAA,GACAhD,UAAA,GACAW,MAAA,GACAG,OAAA,OAKAjI,EAAA0F,OAAAR,QAAA,SAAAoF,UACAA,EAAA5C,MAAAC,wBAIA3H,EAAAgD,WAAAP,YAEA,CACA1B,IAAA,SACAmD,MAAA,WACAvB,KAEAyG,cAIA3G,EA1QA,GAgRA8H,EAAA,SAAAC,IAGA,YAAA,oBAAAC,YAAA,YAAAxK,EAAAwK,cAAAD,aAAAC,YAAAD,GAAA,iBAAA,IAAAA,EAAA,YAAAvK,EAAAuK,KAAA,OAAAA,GAAA,IAAAA,EAAAE,UAAA,iBAAAF,EAAAG,YACAH,EAAA,CAAAA,IASA,IANA,IAAA3D,EAAAnG,UAAA,GACA4C,EAAAC,MAAA9D,UAAAiC,MAAAjD,KAAAiC,UAAA,GACAkK,EAAAJ,EAAApJ,OACAyJ,EAAA,EACAC,OAAA,EAEAD,EAAAD,EAAAC,IAUA,GATA,iBAAA,IAAAhE,EAAA,YAAA5G,EAAA4G,UAAA,IAAAA,EACA2D,EAAAK,GAAApI,YAEA+H,EAAAK,GAAApI,UAAA,IAAAA,EAAA+H,EAAAK,GAAAhE,IAEA2D,EAAAK,GAAApI,YAEAqI,EAAAN,EAAAK,GAAApI,UAAAoE,GAAAnD,MAAA8G,EAAAK,GAAApI,UAAAa,SAEA,IAAAwH,EACA,OAAAA,EAIA,OAAAN,GAEAD,EAAAlK,YAAAoC,EAEApE,EAAAkE,QAAAgI,GAIA,SAAAjM,EAAAD,EAAAF,GAEA,aAqBAG,EAAAD,QAAA,SAAA0M,EAAAC,EAAAlJ,EAAAmJ,GAKA,IAAAC,EAGAC,EAAA,EA4DA,MAzDA,kBAAAH,IACAC,EAAAnJ,EACAA,EAAAkJ,EACAA,OAAAI,GAMA,WAEA,IAAApL,EAAA2C,KACA0I,EAAAC,OAAA,IAAAC,MAAAJ,EACA7H,EAAA5C,UAGA,SAAA8K,IACAL,EAAAG,OAAA,IAAAC,MACAzJ,EAAA4B,MAAA1D,EAAAsD,GASA2H,IAAAC,GAGAM,IAIAN,GACAO,aAAAP,QAGAE,IAAAH,GAAAF,EAAAM,EAGAG,KACA,IAAAR,IAUAE,EAAAQ,WAAAT,EA7BA,WACAC,OAAAE,GA4BAI,OAAAJ,IAAAH,EAAAF,EAAAM,EAAAN,OAUA,SAAAzM,EAAAD,EAAAF,GAEA,aAGAG,EAAAD,QAAA,SAAAC,GAoBA,OAnBAA,EAAAqN,kBACArN,EAAAsN,UAAA,aACAtN,EAAAuN,MAAA,GAEAvN,EAAAwN,WAAAxN,EAAAwN,SAAA,IACA9M,OAAAC,eAAAX,EAAA,SAAA,CACAa,YAAA,EACAC,IAAA,WACA,OAAAd,EAAAE,KAGAQ,OAAAC,eAAAX,EAAA,KAAA,CACAa,YAAA,EACAC,IAAA,WACA,OAAAd,EAAAC,KAGAD,EAAAqN,gBAAA,GAEArN,IAKA,SAAAA,EAAAD,EAAAF,GAEA,aAGA,IAAA0B,EAAA1B,EAAA,GAMA4N,EAAAlM,EAAAmM,uBAAAnM,EAAAoM,6BAAApM,EAAAqM,0BAGA,SAAAtI,GACA,IAAAuI,GAAA,IAAAZ,KACAa,EAAAC,KAAAC,IAAA,EAAA,IAAAH,EAAAI,IACAC,EAAAd,WAAA9H,EAAAwI,GACA,OAAAG,EAAAJ,EAAAK,GALAD,GAAA,IAAAhB,KAYA,IAAAkB,EAAA5M,EAAA6M,sBAAA7M,EAAA8M,4BAAA9M,EAAA+M,yBAAAnB,aAEA1H,SAAAtE,UAAAoN,OACAd,EAAAA,EAAAc,KAAAhN,GACA4M,EAAAA,EAAAI,KAAAhN,KAGAvB,EAAAD,QAAA0N,GACAU,OAAAA,GAIA,SAAAnO,EAAAD,EAAAF,GAEA;;;;;GASA,IAAAsC,EAAAtC,EAAA,GACA2O,EAAA3O,EAAA,IAWA,SAAA4O,EAAAC,EAAAC,GAEA,IAAAC,EASA,OANA,IAAAF,EAAAG,8BACAF,EAAAG,MAAAhM,OAAA,GAAA4L,EAAAG,6BAAA,IACAD,GAAA,GAIA,IAAAJ,EAAA,CACApD,IAAAuD,EAAAI,iBACAvD,KAAAkD,EAAAvD,iBAAAK,KACAhC,MAAAkF,EAAAzD,eAAAyD,EAAAvD,iBAAAK,KAAAkD,EAAAvD,iBAAAG,MACA0D,QAAAN,EAAAjD,WAAAwD,WACAvD,gBAAAgD,EAAAhD,gBACAC,yBAAA+C,EAAA/C,yBACAuD,qBAAA,GAAAR,EAAAhD,gBACAyD,qBAAA,EAAAT,EAAAhD,gBACA0D,aAAA,EACAR,cAAAA,EACAS,iBAAAX,EAAAW,mBAeA,SAAAC,EAAAZ,EAAAC,EAAAY,GAQA,OANAZ,EAAAG,MAAA/F,KAAAwG,GACAZ,EAAAa,aAAAb,EAAAa,aAAAC,OAAAF,EAAAG,YAGAf,EAAAI,kBAAAQ,EAAA5F,OAAA+E,EAAAjD,WAAAkE,SAEAJ,EAAArD,MA0HAlM,EAAAD,QAAA,SAAAmD,EAAA0M,GACA,IA7GAlB,EAAAC,EAAAkB,EAGAC,EACAC,EACAC,EAHAC,EA2GAvB,EAAA,GACAC,EAAA,GAGAtH,EAAA,CACA4D,eAAA,KACAE,iBAAA,GACAM,WAAA,GACAC,gBAAA,IACAC,yBAAA,IACAuE,WAAAlD,OAAAmD,kBACAC,kBAAA,EACAC,YAAA,EACAxB,6BAAA,EACAQ,iBAAA,QAGAlE,EAAA,GACAM,EAAA,GA8BA,OAzBAiD,EAAAvM,EAAAkF,EAHAuI,EAAAA,GAAA,IAMAzE,EAAAC,IAAAkF,MAAA7G,WAAAiF,EAAAvD,iBAAAC,MAAAsD,EAAAvD,iBAAAuD,EAAAvD,iBAAAC,IACAD,EAAAG,MAAAgF,MAAA7G,WAAAiF,EAAAvD,iBAAAG,QAAAoD,EAAAvD,iBAAAuD,EAAAvD,iBAAAG,MACAH,EAAAI,OAAA+E,MAAA7G,WAAAiF,EAAAvD,iBAAAI,SAAAmD,EAAAvD,iBAAAuD,EAAAvD,iBAAAI,OACAJ,EAAAK,KAAA8E,MAAA7G,WAAAiF,EAAAvD,iBAAAK,OAAAkD,EAAAvD,iBAAAuD,EAAAvD,iBAAAK,KACAC,EAAAwD,WAAAqB,MAAA7G,WAAAiF,EAAAjD,WAAAwD,aAAAP,EAAAjD,WAAAiD,EAAAjD,WAAAwD,WACAxD,EAAAkE,SAAAW,MAAA7G,WAAAiF,EAAAjD,WAAAkE,WAAAjB,EAAAjD,WAAAiD,EAAAjD,WAAAkE,SAEAjB,EAAAvD,iBAAAA,EACAuD,EAAAjD,WAAAA,EAGAkD,EAAAa,aAAA,GACAb,EAAA4B,YAAA,GACA5B,EAAA6B,iBAAA,GACA7B,EAAA8B,gBAAA,GACA9B,EAAA+B,iBAAA,GACA/B,EAAAI,iBAAAL,EAAAvD,iBAAAC,IACAuD,EAAAG,MAAA,GACAH,EAAAgC,SAAA,GACAjC,EAAAkC,YAAA,EA1JAlC,EA6JAA,EA7JAC,EA6JAA,EA7JAkB,EA6JA3M,EAAA2N,IAAA,SAAA7N,GACA,OAAAA,EAAAwG,OAAAxG,EAAA2G,OACA,CAAAmH,YAAA9N,EAAAwG,MAAAxG,EAAA2G,QAEA,CAAAmH,YAAA9N,KA/JAiN,EAAA,GAMAvB,EAAA0B,kBACAP,EAAAjJ,QAAA,SAAA2D,GACAA,EAAAwG,mBAAA,EACAxG,EAAAuG,YAAApC,EAAA0B,mBAKAP,EAAAmB,KAAA,SAAAzG,EAAAtK,GAEA,GAAAqQ,MAAA/F,EAAAuG,aACA,MAAA,IAAAG,MAAA,QAAAhR,EAAA,gCAWA,GAPA8P,IACAA,EAAAtB,EAAAC,EAAAC,IAIAmB,EAAAC,EAAAmB,QAAA3G,GAEAwF,EAAAoB,mBAAA,CAKA,GAFAlB,EAAAA,EAAAR,OAAAH,EAAAZ,EAAAC,EAAAoB,IAEApB,EAAAG,MAAAhM,QAAA4L,EAAAwB,WAEA,QADAH,EAAA,MAOA,GAHAA,EAAAtB,EAAAC,EAAAC,IAGAmB,IAEAA,EAAAC,EAAAmB,QAAA3G,GAEAwF,EAAAoB,oBAAA,CAIA,GADAlB,EAAAA,EAAAR,OAAAH,EAAAZ,EAAAC,EAAAoB,IACApB,EAAAG,MAAAhM,QAAA4L,EAAAwB,WAEA,QADAH,EAAA,MAGAA,EAAAtB,EAAAC,EAAAC,OAQAoB,GAAAA,EAAAL,WAAA5M,QAAA4L,EAAA2B,aAGA1B,EAAAG,MAAAhM,QAIAkN,EADArB,EAAAG,MAAAH,EAAAG,MAAAhM,OAAA,GAAA8L,cACAD,EAAAG,MAAAH,EAAAG,MAAAhM,OAAA,GAAA4I,gBAEAiD,EAAAG,MAAAH,EAAAG,MAAAhM,OAAA,GAAA6G,OAGAoG,EAAAqB,eAAA,EAAApB,IAIAD,EAAAqB,eAAA,GAGAnB,EAAAA,EAAAR,OAAAH,EAAAZ,EAAAC,EAAAoB,IACArB,EAAAkC,YAAAb,EAAAL,WAAA5M,QAKA6L,EAAAI,iBAAAJ,EAAAI,iBAAAL,EAAAjD,WAAAkE,SAEAhB,EAAAI,iBAAAJ,EAAAI,iBAAAL,EAAAvD,iBAAAI,OAEA,CACAK,gBAAA+C,EAAAI,iBACAsC,WAAA3C,EAAAkC,YACA9E,MAAA6C,EAAAa,gBAyEA,SAAAxP,EAAAD,EAAAF,GAEA;;;;;GASA,IAAAsC,EAAAtC,EAAA,IAsBAG,EAAAD,QAAA,SAAAuR,GAGAjN,KAAA+G,IAAAkG,EAAAlG,IAGA/G,KAAAmH,KAAA8F,EAAA9F,KAGAnH,KAAAmF,MAAA8H,EAAA9H,MAGAnF,KAAA2K,QAAAsC,EAAAtC,QAGA3K,KAAAqH,gBAAA4F,EAAA5F,gBACArH,KAAAsH,yBAAA2F,EAAA3F,yBACAtH,KAAAkN,eAAAlN,KAAAmF,MAAA8H,EAAA5F,iBAAA,EAAA4F,EAAA3F,0BACAtH,KAAAmN,eAAAnN,KAAAmF,MAAA8H,EAAA5F,iBAAA,EAAA4F,EAAA3F,0BAGAtH,KAAA6K,qBAAAoC,EAAApC,qBACA7K,KAAA8K,qBAAAmC,EAAAnC,qBAGA9K,KAAAgL,iBAAAiC,EAAAjC,iBAGAhL,KAAAuK,cAAA0C,EAAA1C,cAGAvK,KAAA6H,MAAA,GAGA7H,KAAAsF,OAAA,IAGAxI,UAAA,CAuBA+P,QAAA,SAAA3G,GAEA,IAQAkH,EACAC,EACAC,EAVAC,EAAAvN,KAAA6H,MAAAuD,OAAAlF,GAGAsH,EAAAxN,KAAAmF,OAAAoI,EAAA9O,OAAA,GAAAuB,KAAA2K,QACA8C,EAAAF,EAAAG,OAAA,SAAAC,EAAAhP,GACA,OAAAgP,EAAAhP,EAAA8N,aACA,GACAmB,EAAAJ,EAAAxN,KAAAqH,gBAMA,OAAArH,KAAAuK,eAEA,IAAAvK,KAAA6H,MAAApJ,QAEA,GAAAyH,EAAAuG,aAEAzM,KAAA6H,MAAAnD,KAAAwB,GACAlG,KAAA6N,eAAAL,EAAAtH,EAAAuG,YAAA,YACA,GAKAgB,EAAAzN,KAAAkN,gBAKAlN,KAAA6H,MAAAnD,KAAA5G,EAAAoI,KACA,GACAuH,EAAAzN,KAAAmN,eAMA,IAAAnN,KAAA6H,MAAApJ,QAIAuB,KAAA6H,MAAAnD,KAAA5G,EAAAoI,IACAlG,KAAA6N,eAAAL,EAAAC,EAAA,YACA,IAIAL,EAAApN,KAAAmF,OAAAnF,KAAA6H,MAAApJ,OAAA,GAAAuB,KAAA2K,QACA0C,EAAArN,KAAA6H,MAAA6F,OAAA,SAAAC,EAAAhP,GACA,OAAAgP,EAAAhP,EAAA8N,aACA,GACAa,EAAAF,EAAApN,KAAAqH,gBAEAqC,KAAAoE,IAAAL,EAAAG,GAAAlE,KAAAoE,IAAAT,EAAAC,IAGAtN,KAAA6N,eAAAT,EAAAC,EAAA,YACA,IAKArN,KAAA6H,MAAAnD,KAAA5G,EAAAoI,IACAlG,KAAA6N,eAAAL,EAAAC,EAAA,YACA,KAMAzN,KAAA6H,MAAAnD,KAAA5G,EAAAoI,IACAlG,KAAA6N,eAAAL,EAAAC,EAAA,YACA,IAWAX,iBAAA,WACA,OAAA,EAAA9M,KAAAsF,QAYAuI,eAAA,SAAAE,EAAA/C,GAEA,IAEAgD,EACAC,EACAC,EACAC,EAEAC,EAPAC,EAAArO,KAAAmH,KACAqG,EAAAxN,KAAAmF,OAAAnF,KAAA6H,MAAApJ,OAAA,GAAAuB,KAAA2K,cASA,IAAAK,GAAA,CAAA,UAAA,SAAA,QAAAsD,QAAAtD,GAAA,KACAA,EAAA,QAMA+C,KAFAE,EAAAvE,KAAAC,IAAA3J,KAAA6K,qBAAAnB,KAAA6E,IAAAR,EAAA/N,KAAA8K,yBAOA9K,KAAAsF,OAAA2I,EACAD,EAAAR,EAAAS,GAAAT,EAAAO,KAIA/N,KAAAsF,OAAAyI,EACAC,EAAA,GAIAhO,KAAA6H,MAAAtF,QAAA,SAAA5D,GAEAA,EAAAoI,IAAA/G,KAAA+G,IACApI,EAAAwG,MAAAxG,EAAA8N,YAAAzM,KAAAsF,OAAA0I,EACArP,EAAA2G,OAAAtF,KAAAsF,OAKA3G,EAAAwI,KAAAkH,EAGAA,GAAA1P,EAAAwG,MAAAnF,KAAA2K,SACA3K,MAIA,YAAAgL,GAEAqD,GAAArO,KAAA2K,QAAA3K,KAAAmH,KAEA+G,GAAAG,EAAArO,KAAAmF,OAAAnF,KAAA6H,MAAApJ,OACA0P,EAAAnO,KAAA6H,MAAA2E,IAAA,SAAA7N,EAAA/C,GACA,OAAA8N,KAAA8E,OAAA5S,EAAA,GAAAsS,KAGA,IAAAlO,KAAA6H,MAAApJ,OAGAuB,KAAA6H,MAAA,GACA1C,OAAAuE,KAAA8E,MAAAN,GAKAlO,KAAA6H,MAAAtF,QAAA,SAAA5D,EAAA/C,GACA,EAAAA,GACA+C,EAAAwI,MAAAgH,EAAAvS,EAAA,GACA+C,EAAAwG,OAAAgJ,EAAAvS,GAAAuS,EAAAvS,EAAA,IAEA+C,EAAAwG,OAAAgJ,EAAAvS,MAIA,WAAAoP,IAGAoD,GAAApO,KAAAmF,MAAAkJ,GAAA,EAEArO,KAAA6H,MAAAtF,QAAA,SAAA5D,GACAA,EAAAwI,MAAAiH,EAAApO,KAAA2K,SACA3K,QAaA+M,cAAA,SAAA0B,EAAArL,GAQA,iBAAAA,EAEApD,KAAA6N,eAAAzK,EAAApD,KAAAgL,kBAIAhL,KAAA6N,eAAA7N,KAAAqH,gBAAArH,KAAAgL,mBAYAK,SAAA,WACA,OAAArL,KAAA6H","file":"fjGallery.min.js","sourcesContent":["/*!\n * Name : Flickr's Justified Gallery [fjGallery]\n * Version : 1.0.2\n * Author : nK <https://nkdev.info>\n * GitHub : https://github.com/nk-o/flickr-justified-gallery\n */\n/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 3);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* WEBPACK VAR INJECTION */(function(global) {\n\nvar win;\n\nif (typeof window !== \"undefined\") {\n win = window;\n} else if (typeof global !== \"undefined\") {\n win = global;\n} else if (typeof self !== \"undefined\") {\n win = self;\n} else {\n win = {};\n}\n\nmodule.exports = win;\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* WEBPACK VAR INJECTION */(function(module) {\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\n/*!\r\n * @name JavaScript/NodeJS Merge v1.2.0\r\n * @author yeikos\r\n * @repository https://github.com/yeikos/js.merge\r\n\r\n * Copyright 2014 yeikos - MIT license\r\n * https://raw.github.com/yeikos/js.merge/master/LICENSE\r\n */\n\n;(function (isNode) {\n\n\t/**\r\n * Merge one or more objects \r\n * @param bool? clone\r\n * @param mixed,... arguments\r\n * @return object\r\n */\n\n\tvar Public = function Public(clone) {\n\n\t\treturn merge(clone === true, false, arguments);\n\t},\n\t publicName = 'merge';\n\n\t/**\r\n * Merge two or more objects recursively \r\n * @param bool? clone\r\n * @param mixed,... arguments\r\n * @return object\r\n */\n\n\tPublic.recursive = function (clone) {\n\n\t\treturn merge(clone === true, true, arguments);\n\t};\n\n\t/**\r\n * Clone the input removing any reference\r\n * @param mixed input\r\n * @return mixed\r\n */\n\n\tPublic.clone = function (input) {\n\n\t\tvar output = input,\n\t\t type = typeOf(input),\n\t\t index,\n\t\t size;\n\n\t\tif (type === 'array') {\n\n\t\t\toutput = [];\n\t\t\tsize = input.length;\n\n\t\t\tfor (index = 0; index < size; ++index) {\n\n\t\t\t\toutput[index] = Public.clone(input[index]);\n\t\t\t}\n\t\t} else if (type === 'object') {\n\n\t\t\toutput = {};\n\n\t\t\tfor (index in input) {\n\n\t\t\t\toutput[index] = Public.clone(input[index]);\n\t\t\t}\n\t\t}\n\n\t\treturn output;\n\t};\n\n\t/**\r\n * Merge two objects recursively\r\n * @param mixed input\r\n * @param mixed extend\r\n * @return mixed\r\n */\n\n\tfunction merge_recursive(base, extend) {\n\n\t\tif (typeOf(base) !== 'object') return extend;\n\n\t\tfor (var key in extend) {\n\n\t\t\tif (typeOf(base[key]) === 'object' && typeOf(extend[key]) === 'object') {\n\n\t\t\t\tbase[key] = merge_recursive(base[key], extend[key]);\n\t\t\t} else {\n\n\t\t\t\tbase[key] = extend[key];\n\t\t\t}\n\t\t}\n\n\t\treturn base;\n\t}\n\n\t/**\r\n * Merge two or more objects\r\n * @param bool clone\r\n * @param bool recursive\r\n * @param array argv\r\n * @return object\r\n */\n\n\tfunction merge(clone, recursive, argv) {\n\n\t\tvar result = argv[0],\n\t\t size = argv.length;\n\n\t\tif (clone || typeOf(result) !== 'object') result = {};\n\n\t\tfor (var index = 0; index < size; ++index) {\n\n\t\t\tvar item = argv[index],\n\t\t\t type = typeOf(item);\n\n\t\t\tif (type !== 'object') continue;\n\n\t\t\tfor (var key in item) {\n\n\t\t\t\tvar sitem = clone ? Public.clone(item[key]) : item[key];\n\n\t\t\t\tif (recursive) {\n\n\t\t\t\t\tresult[key] = merge_recursive(result[key], sitem);\n\t\t\t\t} else {\n\n\t\t\t\t\tresult[key] = sitem;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\t}\n\n\t/**\r\n * Get type of variable\r\n * @param mixed input\r\n * @return string\r\n *\r\n * @see http://jsperf.com/typeofvar\r\n */\n\n\tfunction typeOf(input) {\n\n\t\treturn {}.toString.call(input).slice(8, -1).toLowerCase();\n\t}\n\n\tif (isNode) {\n\n\t\tmodule.exports = Public;\n\t} else {\n\n\t\twindow[publicName] = Public;\n\t}\n})(( false ? 'undefined' : _typeof(module)) === 'object' && module && _typeof(module.exports) === 'object' && module.exports);\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(8)(module)))\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nmodule.exports = function (callback) {\n\n\tif (document.readyState === 'complete' || document.readyState === 'interactive') {\n\t\t// Already ready or interactive, execute callback\n\t\tcallback.call();\n\t} else if (document.attachEvent) {\n\t\t// Old browsers\n\t\tdocument.attachEvent('onreadystatechange', function () {\n\t\t\tif (document.readyState === 'interactive') callback.call();\n\t\t});\n\t} else if (document.addEventListener) {\n\t\t// Modern browsers\n\t\tdocument.addEventListener('DOMContentLoaded', callback);\n\t}\n};\n\n/***/ }),\n/* 3 */\n/***/ (function(module, exports, __webpack_require__) {\n\nmodule.exports = __webpack_require__(4);\n\n\n/***/ }),\n/* 4 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _liteReady = __webpack_require__(2);\n\nvar _liteReady2 = _interopRequireDefault(_liteReady);\n\nvar _global = __webpack_require__(0);\n\nvar _fjGallery = __webpack_require__(6);\n\nvar _fjGallery2 = _interopRequireDefault(_fjGallery);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n// no conflict\nvar oldPlugin = _global.window.fjGallery;\n_global.window.fjGallery = _fjGallery2.default;\n_global.window.fjGallery.noConflict = function () {\n _global.window.fjGallery = oldPlugin;\n return this;\n};\n\n// jQuery support\nif (typeof _global.jQuery !== 'undefined') {\n // add data to jQuery .data('fjGallery')\n var oldInit = _global.window.fjGallery.constructor.prototype.init;\n _global.window.fjGallery.constructor.prototype.init = function () {\n this.jQcontainer = (0, _global.jQuery)(this.$container);\n this.jQcontainer.data('fjGallery', this);\n if (oldInit) {\n oldInit.call(this);\n }\n };\n\n // remove data from jQuery .data('fjGallery')\n var oldDestroy = _global.window.fjGallery.constructor.prototype.destroy;\n _global.window.fjGallery.constructor.prototype.destroy = function () {\n if (this.jQcontainer) {\n this.jQcontainer.removeData('fjGallery');\n }\n if (oldDestroy) {\n oldDestroy.call(this);\n }\n };\n\n var jQueryPlugin = function jQueryPlugin() {\n var args = arguments || [];\n Array.prototype.unshift.call(args, this);\n var res = _fjGallery2.default.apply(_global.window, args);\n return (typeof res === 'undefined' ? 'undefined' : _typeof(res)) !== 'object' ? res : this;\n };\n jQueryPlugin.constructor = _fjGallery2.default.constructor;\n\n // no conflict\n var oldJqPlugin = _global.jQuery.fn.fjGallery;\n _global.jQuery.fn.fjGallery = jQueryPlugin;\n _global.jQuery.fn.fjGallery.noConflict = function () {\n _global.jQuery.fn.fjGallery = oldJqPlugin;\n return this;\n };\n}\n\n// .fj-gallery initialization\n(0, _liteReady2.default)(function () {\n (0, _fjGallery2.default)(document.querySelectorAll('.fj-gallery'));\n});\n\n/***/ }),\n/* 5 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar g;\n\n// This works in non-strict mode\ng = function () {\n\treturn this;\n}();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || Function(\"return this\")() || (1, eval)(\"this\");\n} catch (e) {\n\t// This works if the window reference is available\n\tif ((typeof window === \"undefined\" ? \"undefined\" : _typeof(window)) === \"object\") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n\n/***/ }),\n/* 6 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _throttle = __webpack_require__(7);\n\nvar _throttle2 = _interopRequireDefault(_throttle);\n\nvar _merge = __webpack_require__(1);\n\nvar _merge2 = _interopRequireDefault(_merge);\n\nvar _liteReady = __webpack_require__(2);\n\nvar _liteReady2 = _interopRequireDefault(_liteReady);\n\nvar _rafl = __webpack_require__(9);\n\nvar _rafl2 = _interopRequireDefault(_rafl);\n\nvar _justifiedLayout = __webpack_require__(10);\n\nvar _justifiedLayout2 = _interopRequireDefault(_justifiedLayout);\n\nvar _global = __webpack_require__(0);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n// list with all fjGallery instances\n// need to render all in one scroll/resize event\nvar fjGalleryList = [];\n\nfunction updateFjGallery() {\n (0, _rafl2.default)(function () {\n fjGalleryList.forEach(function (item) {\n item.resize();\n });\n });\n}\n\n_global.window.addEventListener('resize', updateFjGallery);\n_global.window.addEventListener('orientationchange', updateFjGallery);\n_global.window.addEventListener('load', updateFjGallery);\n(0, _liteReady2.default)(function () {\n updateFjGallery();\n});\n\n// get image dimensions\n// thanks https://gist.github.com/dimsemenov/5382856\nfunction getImgDemensions(img, cb) {\n var interval = void 0;\n var hasSize = false;\n var addedListeners = false;\n\n var onHasSize = function onHasSize() {\n if (hasSize) {\n cb(hasSize);\n return;\n }\n\n hasSize = {\n width: img.naturalWidth,\n height: img.naturalHeight\n };\n cb(hasSize);\n\n clearInterval(interval);\n if (addedListeners) {\n // eslint-disable-next-line no-use-before-define\n removeListeners();\n }\n };\n var onLoaded = function onLoaded() {\n onHasSize();\n };\n var onError = function onError() {\n onHasSize();\n };\n var checkSize = function checkSize() {\n if (img.naturalWidth > 0) {\n onHasSize();\n }\n };\n var addListeners = function addListeners() {\n addedListeners = true;\n img.addEventListener('load', onLoaded);\n img.addEventListener('error', onError);\n };\n var removeListeners = function removeListeners() {\n addedListeners = false;\n img.removeEventListener('load', onLoaded);\n img.removeEventListener('error', onError);\n };\n\n checkSize();\n\n if (!hasSize) {\n addListeners();\n interval = setInterval(checkSize, 100);\n }\n}\n\nvar instanceID = 0;\n\n// fjGallery class\n\nvar fjGallery = function () {\n function fjGallery(container, userOptions) {\n _classCallCheck(this, fjGallery);\n\n var self = this;\n\n self.instanceID = instanceID++;\n\n self.$container = container;\n\n self.images = [];\n\n self.defaults = {\n itemSelector: '.fj-gallery-item',\n imageSelector: 'img',\n gutter: 10, // supports object like `{ horizontal: 10, vertical: 10 }`.\n rowHeight: 320,\n rowHeightTolerance: 0.25, // [0, 1]\n resizeThrottle: 200,\n\n // events\n onInit: null, // function() {}\n onDestroy: null, // function() {}\n onAppendImages: null, // function() {}\n onBeforeJustify: null, // function() {}\n onJustify: null // function() {}\n };\n\n // prepare data-options\n var dataOptions = self.$container.dataset || {};\n var pureDataOptions = {};\n Object.keys(dataOptions).forEach(function (key) {\n var loweCaseOption = key.substr(0, 1).toLowerCase() + key.substr(1);\n if (loweCaseOption && typeof self.defaults[loweCaseOption] !== 'undefined') {\n pureDataOptions[loweCaseOption] = dataOptions[key];\n }\n });\n\n self.options = (0, _merge2.default)({}, self.defaults, pureDataOptions, userOptions);\n self.pureOptions = (0, _merge2.default)({}, self.options);\n\n // throttle for resize\n self.resize = (0, _throttle2.default)(self.options.resizeThrottle, self.resize);\n\n self.init();\n }\n\n // add styles to element\n\n\n _createClass(fjGallery, [{\n key: 'css',\n value: function css(el, styles) {\n if (typeof styles === 'string') {\n return _global.window.getComputedStyle(el).getPropertyValue(styles);\n }\n\n // add transform property with vendor prefix\n if (styles.transform) {\n styles['-webkit-transform'] = styles.transform;\n }\n\n Object.keys(styles).forEach(function (key) {\n el.style[key] = styles[key];\n });\n return el;\n }\n\n // add to fjGallery instances list\n\n }, {\n key: 'addToFjGalleryList',\n value: function addToFjGalleryList() {\n fjGalleryList.push(this);\n updateFjGallery();\n }\n\n // remove from fjGallery instances list\n\n }, {\n key: 'removeFromFjGalleryList',\n value: function removeFromFjGalleryList() {\n var self = this;\n\n fjGalleryList.forEach(function (item, key) {\n if (item.instanceID === self.instanceID) {\n fjGalleryList.splice(key, 1);\n }\n });\n }\n }, {\n key: 'init',\n value: function init() {\n var self = this;\n\n self.appendImages(self.$container.querySelectorAll(self.options.itemSelector));\n\n self.addToFjGalleryList();\n\n // call onInit event\n if (self.options.onInit) {\n self.options.onInit.call(self);\n }\n }\n\n // append images\n\n }, {\n key: 'appendImages',\n value: function appendImages($images) {\n var self = this;\n\n // check if jQuery\n if (_global.window.jQuery && $images instanceof _global.window.jQuery) {\n $images = $images.get();\n }\n\n if (!$images || !$images.length) {\n return;\n }\n\n $images.forEach(function ($item) {\n // if $images is jQuery, for some reason in this array there is undefined item, that not a DOM,\n // so we need to check for $item.querySelector.\n if ($item && !$item.fjGalleryImage && $item.querySelector) {\n var $image = $item.querySelector(self.options.imageSelector);\n\n if ($image) {\n $item.fjGalleryImage = self;\n var data = {\n $item: $item,\n $image: $image,\n width: parseFloat($image.getAttribute('width')) || false,\n height: parseFloat($image.getAttribute('height')) || false,\n loadSizes: function loadSizes() {\n var itemData = this;\n getImgDemensions($image, function (dimensions) {\n if (itemData.width !== dimensions.width || itemData.height !== dimensions.height) {\n itemData.width = dimensions.width;\n itemData.height = dimensions.height;\n self.resize();\n }\n });\n }\n };\n data.loadSizes();\n\n self.images.push(data);\n }\n }\n });\n\n // call onAppendImages event\n if (self.options.onAppendImages) {\n self.options.onAppendImages.call(self, [$images]);\n }\n\n self.justify();\n }\n\n // justify images\n\n }, {\n key: 'justify',\n value: function justify() {\n var self = this;\n var justifyArray = [];\n\n // call onBeforeJustify event\n if (self.options.onBeforeJustify) {\n self.options.onBeforeJustify.call(self);\n }\n\n self.images.forEach(function (data) {\n if (data.width && data.height) {\n justifyArray.push(data.width / data.height);\n }\n });\n\n var justifiedData = (0, _justifiedLayout2.default)(justifyArray, {\n containerWidth: self.$container.getBoundingClientRect().width,\n containerPadding: {\n top: parseFloat(self.css(self.$container, 'padding-top')) || 0,\n right: parseFloat(self.css(self.$container, 'padding-right')) || 0,\n bottom: parseFloat(self.css(self.$container, 'padding-bottom')) || 0,\n left: parseFloat(self.css(self.$container, 'padding-left')) || 0\n },\n boxSpacing: self.options.gutter,\n targetRowHeight: self.options.rowHeight,\n targetRowHeightTolerance: self.options.rowHeightTolerance\n });\n\n self.css(self.$container, {\n height: justifiedData.containerHeight + 'px'\n });\n\n var i = 0;\n self.images.forEach(function (data) {\n if (data.width && data.height) {\n self.css(data.$item, {\n position: 'absolute',\n transform: 'translateX(' + justifiedData.boxes[i].left + 'px) translateY(' + justifiedData.boxes[i].top + 'px) translateZ(0)',\n width: justifiedData.boxes[i].width + 'px',\n height: justifiedData.boxes[i].height + 'px'\n });\n i++;\n }\n });\n\n // call onJustify event\n if (self.options.onJustify) {\n self.options.onJustify.call(self);\n }\n }\n\n // update options and resize gallery items\n\n }, {\n key: 'updateOptions',\n value: function updateOptions(options) {\n var self = this;\n self.options = (0, _merge2.default)({}, self.options, options);\n self.justify();\n }\n }, {\n key: 'destroy',\n value: function destroy() {\n var self = this;\n\n self.removeFromFjGalleryList();\n\n // call onDestroy event\n if (self.options.onDestroy) {\n self.options.onDestroy.call(self);\n }\n\n // remove styles.\n self.css(self.$container, {\n height: ''\n });\n self.images.forEach(function (data) {\n self.css(data.$item, {\n position: '',\n transform: '',\n width: '',\n height: ''\n });\n });\n\n // delete fjGalleryImage instance from images\n self.images.forEach(function (val) {\n delete val.$item.fjGalleryImage;\n });\n\n // delete fjGallery instance from container\n delete self.$container.fjGallery;\n }\n }, {\n key: 'resize',\n value: function resize() {\n var self = this;\n\n self.justify();\n }\n }]);\n\n return fjGallery;\n}();\n\n// global definition\n\n\nvar plugin = function plugin(items) {\n // check for dom element\n // thanks: http://stackoverflow.com/questions/384286/javascript-isdom-how-do-you-check-if-a-javascript-object-is-a-dom-object\n if ((typeof HTMLElement === 'undefined' ? 'undefined' : _typeof(HTMLElement)) === 'object' ? items instanceof HTMLElement : items && (typeof items === 'undefined' ? 'undefined' : _typeof(items)) === 'object' && items !== null && items.nodeType === 1 && typeof items.nodeName === 'string') {\n items = [items];\n }\n\n var options = arguments[1];\n var args = Array.prototype.slice.call(arguments, 2);\n var len = items.length;\n var k = 0;\n var ret = void 0;\n\n for (k; k < len; k++) {\n if ((typeof options === 'undefined' ? 'undefined' : _typeof(options)) === 'object' || typeof options === 'undefined') {\n if (!items[k].fjGallery) {\n // eslint-disable-next-line new-cap\n items[k].fjGallery = new fjGallery(items[k], options);\n }\n } else if (items[k].fjGallery) {\n // eslint-disable-next-line prefer-spread\n ret = items[k].fjGallery[options].apply(items[k].fjGallery, args);\n }\n if (typeof ret !== 'undefined') {\n return ret;\n }\n }\n\n return items;\n};\nplugin.constructor = fjGallery;\n\nexports.default = plugin;\n\n/***/ }),\n/* 7 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\n/* eslint-disable no-undefined,no-param-reassign,no-shadow */\n\n/**\n * Throttle execution of a function. Especially useful for rate limiting\n * execution of handlers on events like resize and scroll.\n *\n * @param {Number} delay A zero-or-greater delay in milliseconds. For event callbacks, values around 100 or 250 (or even higher) are most useful.\n * @param {Boolean} noTrailing Optional, defaults to false. If noTrailing is true, callback will only execute every `delay` milliseconds while the\n * throttled-function is being called. If noTrailing is false or unspecified, callback will be executed one final time\n * after the last throttled-function call. (After the throttled-function has not been called for `delay` milliseconds,\n * the internal counter is reset)\n * @param {Function} callback A function to be executed after delay milliseconds. The `this` context and all arguments are passed through, as-is,\n * to `callback` when the throttled-function is executed.\n * @param {Boolean} debounceMode If `debounceMode` is true (at begin), schedule `clear` to execute after `delay` ms. If `debounceMode` is false (at end),\n * schedule `callback` to execute after `delay` ms.\n *\n * @return {Function} A new, throttled, function.\n */\nmodule.exports = function (delay, noTrailing, callback, debounceMode) {\n\n\t// After wrapper has stopped being called, this timeout ensures that\n\t// `callback` is executed at the proper times in `throttle` and `end`\n\t// debounce modes.\n\tvar timeoutID;\n\n\t// Keep track of the last time `callback` was executed.\n\tvar lastExec = 0;\n\n\t// `noTrailing` defaults to falsy.\n\tif (typeof noTrailing !== 'boolean') {\n\t\tdebounceMode = callback;\n\t\tcallback = noTrailing;\n\t\tnoTrailing = undefined;\n\t}\n\n\t// The `wrapper` function encapsulates all of the throttling / debouncing\n\t// functionality and when executed will limit the rate at which `callback`\n\t// is executed.\n\tfunction wrapper() {\n\n\t\tvar self = this;\n\t\tvar elapsed = Number(new Date()) - lastExec;\n\t\tvar args = arguments;\n\n\t\t// Execute `callback` and update the `lastExec` timestamp.\n\t\tfunction exec() {\n\t\t\tlastExec = Number(new Date());\n\t\t\tcallback.apply(self, args);\n\t\t}\n\n\t\t// If `debounceMode` is true (at begin) this is used to clear the flag\n\t\t// to allow future `callback` executions.\n\t\tfunction clear() {\n\t\t\ttimeoutID = undefined;\n\t\t}\n\n\t\tif (debounceMode && !timeoutID) {\n\t\t\t// Since `wrapper` is being called for the first time and\n\t\t\t// `debounceMode` is true (at begin), execute `callback`.\n\t\t\texec();\n\t\t}\n\n\t\t// Clear any existing timeout.\n\t\tif (timeoutID) {\n\t\t\tclearTimeout(timeoutID);\n\t\t}\n\n\t\tif (debounceMode === undefined && elapsed > delay) {\n\t\t\t// In throttle mode, if `delay` time has been exceeded, execute\n\t\t\t// `callback`.\n\t\t\texec();\n\t\t} else if (noTrailing !== true) {\n\t\t\t// In trailing throttle mode, since `delay` time has not been\n\t\t\t// exceeded, schedule `callback` to execute `delay` ms after most\n\t\t\t// recent execution.\n\t\t\t//\n\t\t\t// If `debounceMode` is true (at begin), schedule `clear` to execute\n\t\t\t// after `delay` ms.\n\t\t\t//\n\t\t\t// If `debounceMode` is false (at end), schedule `callback` to\n\t\t\t// execute after `delay` ms.\n\t\t\ttimeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay);\n\t\t}\n\t}\n\n\t// Return the wrapper function.\n\treturn wrapper;\n};\n\n/***/ }),\n/* 8 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nmodule.exports = function (module) {\n\tif (!module.webpackPolyfill) {\n\t\tmodule.deprecate = function () {};\n\t\tmodule.paths = [];\n\t\t// module.parent = undefined by default\n\t\tif (!module.children) module.children = [];\n\t\tObject.defineProperty(module, \"loaded\", {\n\t\t\tenumerable: true,\n\t\t\tget: function get() {\n\t\t\t\treturn module.l;\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(module, \"id\", {\n\t\t\tenumerable: true,\n\t\t\tget: function get() {\n\t\t\t\treturn module.i;\n\t\t\t}\n\t\t});\n\t\tmodule.webpackPolyfill = 1;\n\t}\n\treturn module;\n};\n\n/***/ }),\n/* 9 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar global = __webpack_require__(0);\n\n/**\n * `requestAnimationFrame()`\n */\n\nvar request = global.requestAnimationFrame || global.webkitRequestAnimationFrame || global.mozRequestAnimationFrame || fallback;\n\nvar prev = +new Date();\nfunction fallback(fn) {\n var curr = +new Date();\n var ms = Math.max(0, 16 - (curr - prev));\n var req = setTimeout(fn, ms);\n return prev = curr, req;\n}\n\n/**\n * `cancelAnimationFrame()`\n */\n\nvar cancel = global.cancelAnimationFrame || global.webkitCancelAnimationFrame || global.mozCancelAnimationFrame || clearTimeout;\n\nif (Function.prototype.bind) {\n request = request.bind(global);\n cancel = cancel.bind(global);\n}\n\nexports = module.exports = request;\nexports.cancel = cancel;\n\n/***/ }),\n/* 10 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/*!\n * Copyright 2016 Yahoo Inc.\n * Licensed under the terms of the MIT license. Please see LICENSE file in the project root for terms.\n * @license\n */\n\n\n\nvar merge = __webpack_require__(1),\n Row = __webpack_require__(11);\n\n/**\n * Create a new, empty row.\n *\n * @method createNewRow\n * @param layoutConfig {Object} The layout configuration\n * @param layoutData {Object} The current state of the layout\n * @return A new, empty row of the type specified by this layout.\n */\n\nfunction createNewRow(layoutConfig, layoutData) {\n\n\tvar isBreakoutRow;\n\n\t// Work out if this is a full width breakout row\n\tif (layoutConfig.fullWidthBreakoutRowCadence !== false) {\n\t\tif ((layoutData._rows.length + 1) % layoutConfig.fullWidthBreakoutRowCadence === 0) {\n\t\t\tisBreakoutRow = true;\n\t\t}\n\t}\n\n\treturn new Row({\n\t\ttop: layoutData._containerHeight,\n\t\tleft: layoutConfig.containerPadding.left,\n\t\twidth: layoutConfig.containerWidth - layoutConfig.containerPadding.left - layoutConfig.containerPadding.right,\n\t\tspacing: layoutConfig.boxSpacing.horizontal,\n\t\ttargetRowHeight: layoutConfig.targetRowHeight,\n\t\ttargetRowHeightTolerance: layoutConfig.targetRowHeightTolerance,\n\t\tedgeCaseMinRowHeight: 0.5 * layoutConfig.targetRowHeight,\n\t\tedgeCaseMaxRowHeight: 2 * layoutConfig.targetRowHeight,\n\t\trightToLeft: false,\n\t\tisBreakoutRow: isBreakoutRow,\n\t\twidowLayoutStyle: layoutConfig.widowLayoutStyle\n\t});\n}\n\n/**\n * Add a completed row to the layout.\n * Note: the row must have already been completed.\n *\n * @method addRow\n * @param layoutConfig {Object} The layout configuration\n * @param layoutData {Object} The current state of the layout\n * @param row {Row} The row to add.\n * @return {Array} Each item added to the row.\n */\n\nfunction addRow(layoutConfig, layoutData, row) {\n\n\tlayoutData._rows.push(row);\n\tlayoutData._layoutItems = layoutData._layoutItems.concat(row.getItems());\n\n\t// Increment the container height\n\tlayoutData._containerHeight += row.height + layoutConfig.boxSpacing.vertical;\n\n\treturn row.items;\n}\n\n/**\n * Calculate the current layout for all items in the list that require layout.\n * \"Layout\" means geometry: position within container and size\n *\n * @method computeLayout\n * @param layoutConfig {Object} The layout configuration\n * @param layoutData {Object} The current state of the layout\n * @param itemLayoutData {Array} Array of items to lay out, with data required to lay out each item\n * @return {Object} The newly-calculated layout, containing the new container height, and lists of layout items\n */\n\nfunction computeLayout(layoutConfig, layoutData, itemLayoutData) {\n\n\tvar laidOutItems = [],\n\t itemAdded,\n\t currentRow,\n\t nextToLastRowHeight;\n\n\t// Apply forced aspect ratio if specified, and set a flag.\n\tif (layoutConfig.forceAspectRatio) {\n\t\titemLayoutData.forEach(function (itemData) {\n\t\t\titemData.forcedAspectRatio = true;\n\t\t\titemData.aspectRatio = layoutConfig.forceAspectRatio;\n\t\t});\n\t}\n\n\t// Loop through the items\n\titemLayoutData.some(function (itemData, i) {\n\n\t\tif (isNaN(itemData.aspectRatio)) {\n\t\t\tthrow new Error(\"Item \" + i + \" has an invalid aspect ratio\");\n\t\t}\n\n\t\t// If not currently building up a row, make a new one.\n\t\tif (!currentRow) {\n\t\t\tcurrentRow = createNewRow(layoutConfig, layoutData);\n\t\t}\n\n\t\t// Attempt to add item to the current row.\n\t\titemAdded = currentRow.addItem(itemData);\n\n\t\tif (currentRow.isLayoutComplete()) {\n\n\t\t\t// Row is filled; add it and start a new one\n\t\t\tlaidOutItems = laidOutItems.concat(addRow(layoutConfig, layoutData, currentRow));\n\n\t\t\tif (layoutData._rows.length >= layoutConfig.maxNumRows) {\n\t\t\t\tcurrentRow = null;\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tcurrentRow = createNewRow(layoutConfig, layoutData);\n\n\t\t\t// Item was rejected; add it to its own row\n\t\t\tif (!itemAdded) {\n\n\t\t\t\titemAdded = currentRow.addItem(itemData);\n\n\t\t\t\tif (currentRow.isLayoutComplete()) {\n\n\t\t\t\t\t// If the rejected item fills a row on its own, add the row and start another new one\n\t\t\t\t\tlaidOutItems = laidOutItems.concat(addRow(layoutConfig, layoutData, currentRow));\n\t\t\t\t\tif (layoutData._rows.length >= layoutConfig.maxNumRows) {\n\t\t\t\t\t\tcurrentRow = null;\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\tcurrentRow = createNewRow(layoutConfig, layoutData);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t});\n\n\t// Handle any leftover content (orphans) depending on where they lie\n\t// in this layout update, and in the total content set.\n\tif (currentRow && currentRow.getItems().length && layoutConfig.showWidows) {\n\n\t\t// Last page of all content or orphan suppression is suppressed; lay out orphans.\n\t\tif (layoutData._rows.length) {\n\n\t\t\t// Only Match previous row's height if it exists and it isn't a breakout row\n\t\t\tif (layoutData._rows[layoutData._rows.length - 1].isBreakoutRow) {\n\t\t\t\tnextToLastRowHeight = layoutData._rows[layoutData._rows.length - 1].targetRowHeight;\n\t\t\t} else {\n\t\t\t\tnextToLastRowHeight = layoutData._rows[layoutData._rows.length - 1].height;\n\t\t\t}\n\n\t\t\tcurrentRow.forceComplete(false, nextToLastRowHeight);\n\t\t} else {\n\n\t\t\t// ...else use target height if there is no other row height to reference.\n\t\t\tcurrentRow.forceComplete(false);\n\t\t}\n\n\t\tlaidOutItems = laidOutItems.concat(addRow(layoutConfig, layoutData, currentRow));\n\t\tlayoutConfig._widowCount = currentRow.getItems().length;\n\t}\n\n\t// We need to clean up the bottom container padding\n\t// First remove the height added for box spacing\n\tlayoutData._containerHeight = layoutData._containerHeight - layoutConfig.boxSpacing.vertical;\n\t// Then add our bottom container padding\n\tlayoutData._containerHeight = layoutData._containerHeight + layoutConfig.containerPadding.bottom;\n\n\treturn {\n\t\tcontainerHeight: layoutData._containerHeight,\n\t\twidowCount: layoutConfig._widowCount,\n\t\tboxes: layoutData._layoutItems\n\t};\n}\n\n/**\n * Takes in a bunch of box data and config. Returns\n * geometry to lay them out in a justified view.\n *\n * @method covertSizesToAspectRatios\n * @param sizes {Array} Array of objects with widths and heights\n * @return {Array} A list of aspect ratios\n */\n\nmodule.exports = function (input, config) {\n\tvar layoutConfig = {};\n\tvar layoutData = {};\n\n\t// Defaults\n\tvar defaults = {\n\t\tcontainerWidth: 1060,\n\t\tcontainerPadding: 10,\n\t\tboxSpacing: 10,\n\t\ttargetRowHeight: 320,\n\t\ttargetRowHeightTolerance: 0.25,\n\t\tmaxNumRows: Number.POSITIVE_INFINITY,\n\t\tforceAspectRatio: false,\n\t\tshowWidows: true,\n\t\tfullWidthBreakoutRowCadence: false,\n\t\twidowLayoutStyle: 'left'\n\t};\n\n\tvar containerPadding = {};\n\tvar boxSpacing = {};\n\n\tconfig = config || {};\n\n\t// Merge defaults and config passed in\n\tlayoutConfig = merge(defaults, config);\n\n\t// Sort out padding and spacing values\n\tcontainerPadding.top = !isNaN(parseFloat(layoutConfig.containerPadding.top)) ? layoutConfig.containerPadding.top : layoutConfig.containerPadding;\n\tcontainerPadding.right = !isNaN(parseFloat(layoutConfig.containerPadding.right)) ? layoutConfig.containerPadding.right : layoutConfig.containerPadding;\n\tcontainerPadding.bottom = !isNaN(parseFloat(layoutConfig.containerPadding.bottom)) ? layoutConfig.containerPadding.bottom : layoutConfig.containerPadding;\n\tcontainerPadding.left = !isNaN(parseFloat(layoutConfig.containerPadding.left)) ? layoutConfig.containerPadding.left : layoutConfig.containerPadding;\n\tboxSpacing.horizontal = !isNaN(parseFloat(layoutConfig.boxSpacing.horizontal)) ? layoutConfig.boxSpacing.horizontal : layoutConfig.boxSpacing;\n\tboxSpacing.vertical = !isNaN(parseFloat(layoutConfig.boxSpacing.vertical)) ? layoutConfig.boxSpacing.vertical : layoutConfig.boxSpacing;\n\n\tlayoutConfig.containerPadding = containerPadding;\n\tlayoutConfig.boxSpacing = boxSpacing;\n\n\t// Local\n\tlayoutData._layoutItems = [];\n\tlayoutData._awakeItems = [];\n\tlayoutData._inViewportItems = [];\n\tlayoutData._leadingOrphans = [];\n\tlayoutData._trailingOrphans = [];\n\tlayoutData._containerHeight = layoutConfig.containerPadding.top;\n\tlayoutData._rows = [];\n\tlayoutData._orphans = [];\n\tlayoutConfig._widowCount = 0;\n\n\t// Convert widths and heights to aspect ratios if we need to\n\treturn computeLayout(layoutConfig, layoutData, input.map(function (item) {\n\t\tif (item.width && item.height) {\n\t\t\treturn { aspectRatio: item.width / item.height };\n\t\t} else {\n\t\t\treturn { aspectRatio: item };\n\t\t}\n\t}));\n};\n\n/***/ }),\n/* 11 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\n/*!\n * Copyright 2016 Yahoo Inc.\n * Licensed under the terms of the MIT license. Please see LICENSE file in the project root for terms.\n * @license\n */\n\nvar merge = __webpack_require__(1);\n\n/**\n * Row\n * Wrapper for each row in a justified layout.\n * Stores relevant values and provides methods for calculating layout of individual rows.\n *\n * @param {Object} layoutConfig - The same as that passed\n * @param {Object} Initialization parameters. The following are all required:\n * @param params.top {Number} Top of row, relative to container\n * @param params.left {Number} Left side of row relative to container (equal to container left padding)\n * @param params.width {Number} Width of row, not including container padding\n * @param params.spacing {Number} Horizontal spacing between items\n * @param params.targetRowHeight {Number} Layout algorithm will aim for this row height\n * @param params.targetRowHeightTolerance {Number} Row heights may vary +/- (`targetRowHeight` x `targetRowHeightTolerance`)\n * @param params.edgeCaseMinRowHeight {Number} Absolute minimum row height for edge cases that cannot be resolved within tolerance.\n * @param params.edgeCaseMaxRowHeight {Number} Absolute maximum row height for edge cases that cannot be resolved within tolerance.\n * @param params.isBreakoutRow {Boolean} Is this row in particular one of those breakout rows? Always false if it's not that kind of photo list\n * @param params.widowLayoutStyle {String} If widows are visible, how should they be laid out?\n * @constructor\n */\n\nvar Row = module.exports = function (params) {\n\n\t// Top of row, relative to container\n\tthis.top = params.top;\n\n\t// Left side of row relative to container (equal to container left padding)\n\tthis.left = params.left;\n\n\t// Width of row, not including container padding\n\tthis.width = params.width;\n\n\t// Horizontal spacing between items\n\tthis.spacing = params.spacing;\n\n\t// Row height calculation values\n\tthis.targetRowHeight = params.targetRowHeight;\n\tthis.targetRowHeightTolerance = params.targetRowHeightTolerance;\n\tthis.minAspectRatio = this.width / params.targetRowHeight * (1 - params.targetRowHeightTolerance);\n\tthis.maxAspectRatio = this.width / params.targetRowHeight * (1 + params.targetRowHeightTolerance);\n\n\t// Edge case row height minimum/maximum\n\tthis.edgeCaseMinRowHeight = params.edgeCaseMinRowHeight;\n\tthis.edgeCaseMaxRowHeight = params.edgeCaseMaxRowHeight;\n\n\t// Widow layout direction\n\tthis.widowLayoutStyle = params.widowLayoutStyle;\n\n\t// Full width breakout rows\n\tthis.isBreakoutRow = params.isBreakoutRow;\n\n\t// Store layout data for each item in row\n\tthis.items = [];\n\n\t// Height remains at 0 until it's been calculated\n\tthis.height = 0;\n};\n\nRow.prototype = {\n\n\t/**\n * Attempt to add a single item to the row.\n * This is the heart of the justified algorithm.\n * This method is direction-agnostic; it deals only with sizes, not positions.\n *\n * If the item fits in the row, without pushing row height beyond min/max tolerance,\n * the item is added and the method returns true.\n *\n * If the item leaves row height too high, there may be room to scale it down and add another item.\n * In this case, the item is added and the method returns true, but the row is incomplete.\n *\n * If the item leaves row height too short, there are too many items to fit within tolerance.\n * The method will either accept or reject the new item, favoring the resulting row height closest to within tolerance.\n * If the item is rejected, left/right padding will be required to fit the row height within tolerance;\n * if the item is accepted, top/bottom cropping will be required to fit the row height within tolerance.\n *\n * @method addItem\n * @param itemData {Object} Item layout data, containing item aspect ratio.\n * @return {Boolean} True if successfully added; false if rejected.\n */\n\n\taddItem: function addItem(itemData) {\n\n\t\tvar newItems = this.items.concat(itemData),\n\n\t\t// Calculate aspect ratios for items only; exclude spacing\n\t\trowWidthWithoutSpacing = this.width - (newItems.length - 1) * this.spacing,\n\t\t newAspectRatio = newItems.reduce(function (sum, item) {\n\t\t\treturn sum + item.aspectRatio;\n\t\t}, 0),\n\t\t targetAspectRatio = rowWidthWithoutSpacing / this.targetRowHeight,\n\t\t previousRowWidthWithoutSpacing,\n\t\t previousAspectRatio,\n\t\t previousTargetAspectRatio;\n\n\t\t// Handle big full-width breakout photos if we're doing them\n\t\tif (this.isBreakoutRow) {\n\t\t\t// Only do it if there's no other items in this row\n\t\t\tif (this.items.length === 0) {\n\t\t\t\t// Only go full width if this photo is a square or landscape\n\t\t\t\tif (itemData.aspectRatio >= 1) {\n\t\t\t\t\t// Close out the row with a full width photo\n\t\t\t\t\tthis.items.push(itemData);\n\t\t\t\t\tthis.completeLayout(rowWidthWithoutSpacing / itemData.aspectRatio, 'justify');\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (newAspectRatio < this.minAspectRatio) {\n\n\t\t\t// New aspect ratio is too narrow / scaled row height is too tall.\n\t\t\t// Accept this item and leave row open for more items.\n\n\t\t\tthis.items.push(merge(itemData));\n\t\t\treturn true;\n\t\t} else if (newAspectRatio > this.maxAspectRatio) {\n\n\t\t\t// New aspect ratio is too wide / scaled row height will be too short.\n\t\t\t// Accept item if the resulting aspect ratio is closer to target than it would be without the item.\n\t\t\t// NOTE: Any row that falls into this block will require cropping/padding on individual items.\n\n\t\t\tif (this.items.length === 0) {\n\n\t\t\t\t// When there are no existing items, force acceptance of the new item and complete the layout.\n\t\t\t\t// This is the pano special case.\n\t\t\t\tthis.items.push(merge(itemData));\n\t\t\t\tthis.completeLayout(rowWidthWithoutSpacing / newAspectRatio, 'justify');\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\t// Calculate width/aspect ratio for row before adding new item\n\t\t\tpreviousRowWidthWithoutSpacing = this.width - (this.items.length - 1) * this.spacing;\n\t\t\tpreviousAspectRatio = this.items.reduce(function (sum, item) {\n\t\t\t\treturn sum + item.aspectRatio;\n\t\t\t}, 0);\n\t\t\tpreviousTargetAspectRatio = previousRowWidthWithoutSpacing / this.targetRowHeight;\n\n\t\t\tif (Math.abs(newAspectRatio - targetAspectRatio) > Math.abs(previousAspectRatio - previousTargetAspectRatio)) {\n\n\t\t\t\t// Row with new item is us farther away from target than row without; complete layout and reject item.\n\t\t\t\tthis.completeLayout(previousRowWidthWithoutSpacing / previousAspectRatio, 'justify');\n\t\t\t\treturn false;\n\t\t\t} else {\n\n\t\t\t\t// Row with new item is us closer to target than row without;\n\t\t\t\t// accept the new item and complete the row layout.\n\t\t\t\tthis.items.push(merge(itemData));\n\t\t\t\tthis.completeLayout(rowWidthWithoutSpacing / newAspectRatio, 'justify');\n\t\t\t\treturn true;\n\t\t\t}\n\t\t} else {\n\n\t\t\t// New aspect ratio / scaled row height is within tolerance;\n\t\t\t// accept the new item and complete the row layout.\n\t\t\tthis.items.push(merge(itemData));\n\t\t\tthis.completeLayout(rowWidthWithoutSpacing / newAspectRatio, 'justify');\n\t\t\treturn true;\n\t\t}\n\t},\n\n\t/**\n * Check if a row has completed its layout.\n *\n * @method isLayoutComplete\n * @return {Boolean} True if complete; false if not.\n */\n\n\tisLayoutComplete: function isLayoutComplete() {\n\t\treturn this.height > 0;\n\t},\n\n\t/**\n * Set row height and compute item geometry from that height.\n * Will justify items within the row unless instructed not to.\n *\n * @method completeLayout\n * @param newHeight {Number} Set row height to this value.\n * @param widowLayoutStyle {String} How should widows display? Supported: left | justify | center\n */\n\n\tcompleteLayout: function completeLayout(newHeight, widowLayoutStyle) {\n\n\t\tvar itemWidthSum = this.left,\n\t\t rowWidthWithoutSpacing = this.width - (this.items.length - 1) * this.spacing,\n\t\t clampedToNativeRatio,\n\t\t clampedHeight,\n\t\t errorWidthPerItem,\n\t\t roundedCumulativeErrors,\n\t\t singleItemGeometry,\n\t\t centerOffset;\n\n\t\t// Justify unless explicitly specified otherwise.\n\t\tif (typeof widowLayoutStyle === 'undefined' || ['justify', 'center', 'left'].indexOf(widowLayoutStyle) < 0) {\n\t\t\twidowLayoutStyle = 'left';\n\t\t}\n\n\t\t// Clamp row height to edge case minimum/maximum.\n\t\tclampedHeight = Math.max(this.edgeCaseMinRowHeight, Math.min(newHeight, this.edgeCaseMaxRowHeight));\n\n\t\tif (newHeight !== clampedHeight) {\n\n\t\t\t// If row height was clamped, the resulting row/item aspect ratio will be off,\n\t\t\t// so force it to fit the width (recalculate aspectRatio to match clamped height).\n\t\t\t// NOTE: this will result in cropping/padding commensurate to the amount of clamping.\n\t\t\tthis.height = clampedHeight;\n\t\t\tclampedToNativeRatio = rowWidthWithoutSpacing / clampedHeight / (rowWidthWithoutSpacing / newHeight);\n\t\t} else {\n\n\t\t\t// If not clamped, leave ratio at 1.0.\n\t\t\tthis.height = newHeight;\n\t\t\tclampedToNativeRatio = 1.0;\n\t\t}\n\n\t\t// Compute item geometry based on newHeight.\n\t\tthis.items.forEach(function (item) {\n\n\t\t\titem.top = this.top;\n\t\t\titem.width = item.aspectRatio * this.height * clampedToNativeRatio;\n\t\t\titem.height = this.height;\n\n\t\t\t// Left-to-right.\n\t\t\t// TODO right to left\n\t\t\t// item.left = this.width - itemWidthSum - item.width;\n\t\t\titem.left = itemWidthSum;\n\n\t\t\t// Increment width.\n\t\t\titemWidthSum += item.width + this.spacing;\n\t\t}, this);\n\n\t\t// If specified, ensure items fill row and distribute error\n\t\t// caused by rounding width and height across all items.\n\t\tif (widowLayoutStyle === 'justify') {\n\n\t\t\titemWidthSum -= this.spacing + this.left;\n\n\t\t\terrorWidthPerItem = (itemWidthSum - this.width) / this.items.length;\n\t\t\troundedCumulativeErrors = this.items.map(function (item, i) {\n\t\t\t\treturn Math.round((i + 1) * errorWidthPerItem);\n\t\t\t});\n\n\t\t\tif (this.items.length === 1) {\n\n\t\t\t\t// For rows with only one item, adjust item width to fill row.\n\t\t\t\tsingleItemGeometry = this.items[0];\n\t\t\t\tsingleItemGeometry.width -= Math.round(errorWidthPerItem);\n\t\t\t} else {\n\n\t\t\t\t// For rows with multiple items, adjust item width and shift items to fill the row,\n\t\t\t\t// while maintaining equal spacing between items in the row.\n\t\t\t\tthis.items.forEach(function (item, i) {\n\t\t\t\t\tif (i > 0) {\n\t\t\t\t\t\titem.left -= roundedCumulativeErrors[i - 1];\n\t\t\t\t\t\titem.width -= roundedCumulativeErrors[i] - roundedCumulativeErrors[i - 1];\n\t\t\t\t\t} else {\n\t\t\t\t\t\titem.width -= roundedCumulativeErrors[i];\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t} else if (widowLayoutStyle === 'center') {\n\n\t\t\t// Center widows\n\t\t\tcenterOffset = (this.width - itemWidthSum) / 2;\n\n\t\t\tthis.items.forEach(function (item) {\n\t\t\t\titem.left += centerOffset + this.spacing;\n\t\t\t}, this);\n\t\t}\n\t},\n\n\t/**\n * Force completion of row layout with current items.\n *\n * @method forceComplete\n * @param fitToWidth {Boolean} Stretch current items to fill the row width.\n * This will likely result in padding.\n * @param fitToWidth {Number}\n */\n\n\tforceComplete: function forceComplete(fitToWidth, rowHeight) {\n\n\t\t// TODO Handle fitting to width\n\t\t// var rowWidthWithoutSpacing = this.width - (this.items.length - 1) * this.spacing,\n\t\t// \tcurrentAspectRatio = this.items.reduce(function (sum, item) {\n\t\t// \t\treturn sum + item.aspectRatio;\n\t\t// \t}, 0);\n\n\t\tif (typeof rowHeight === 'number') {\n\n\t\t\tthis.completeLayout(rowHeight, this.widowLayoutStyle);\n\t\t} else {\n\n\t\t\t// Complete using target row height.\n\t\t\tthis.completeLayout(this.targetRowHeight, this.widowLayoutStyle);\n\t\t}\n\t},\n\n\t/**\n * Return layout data for items within row.\n * Note: returns actual list, not a copy.\n *\n * @method getItems\n * @return Layout data for items within row.\n */\n\n\tgetItems: function getItems() {\n\t\treturn this.items;\n\t}\n\n};\n\n/***/ })\n/******/ ]);"]}
|
1 |
+
{"version":3,"sources":["fjGallery.js"],"names":["modules","installedModules","__webpack_require__","moduleId","exports","module","i","l","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","__webpack_exports__","lite_ready__WEBPACK_IMPORTED_MODULE_0__","lite_ready__WEBPACK_IMPORTED_MODULE_0___default","global__WEBPACK_IMPORTED_MODULE_1__","_fjGallery_esm__WEBPACK_IMPORTED_MODULE_2__","_typeof","obj","iterator","constructor","oldInit","oldDestroy","jQueryPlugin","oldJqPlugin","oldPlugin","fjGallery","noConflict","this","init","jQcontainer","$container","data","destroy","removeData","args","arguments","Array","unshift","res","apply","fn","document","querySelectorAll","callback","readyState","attachEvent","addEventListener","global","win","window","self","g","Function","e","throttle_debounce__WEBPACK_IMPORTED_MODULE_0__","merge__WEBPACK_IMPORTED_MODULE_1__","merge__WEBPACK_IMPORTED_MODULE_1___default","lite_ready__WEBPACK_IMPORTED_MODULE_2__","lite_ready__WEBPACK_IMPORTED_MODULE_2___default","justified_layout__WEBPACK_IMPORTED_MODULE_3__","justified_layout__WEBPACK_IMPORTED_MODULE_3___default","global__WEBPACK_IMPORTED_MODULE_4__","_defineProperties","target","props","length","descriptor","configurable","writable","fjGalleryList","updateFjGallery","requestAnimationFrame","forEach","item","resize","plugin","items","HTMLElement","nodeType","nodeName","ret","options","slice","len","k","instanceID","container","userOptions","instance","Constructor","TypeError","_classCallCheck","images","defaults","itemSelector","imageSelector","gutter","rowHeight","rowHeightTolerance","resizeThrottle","isRtl","css","onInit","onDestroy","onAppendImages","onBeforeJustify","onJustify","dataOptions","dataset","pureDataOptions","keys","loweCaseOption","substr","toLowerCase","pureOptions","protoProps","staticProps","el","styles","getComputedStyle","getPropertyValue","transform","style","push","splice","appendImages","addToFjGalleryList","$images","jQuery","$item","$image","fjGalleryImage","querySelector","width","parseFloat","getAttribute","height","loadSizes","img","cb","interval","hasSize","addedListeners","removeListeners","itemData","onHasSize","naturalWidth","naturalHeight","clearInterval","onLoaded","onError","checkSize","dimensions","removeEventListener","setInterval","justify","justifyArray","justifiedData","containerWidth","getBoundingClientRect","containerPadding","top","right","bottom","left","boxSpacing","targetRowHeight","targetRowHeightTolerance","concat","containerHeight","position","boxes","removeFromFjGalleryList","val","throttle","delay","noTrailing","debounceMode","timeoutID","cancelled","lastExec","clearExistingTimeout","clearTimeout","wrapper","_len","arguments_","_key","elapsed","Date","now","exec","undefined","setTimeout","cancel","debounce","atBegin","merge","clone","recursive","argv","result","size","typeOf","index","sitem","Public","merge_recursive","base","extend","input","toString","isNode","output","type","webpackPolyfill","deprecate","paths","children","Row","createNewRow","layoutConfig","layoutData","isBreakoutRow","fullWidthBreakoutRowCadence","_rows","_containerHeight","spacing","horizontal","edgeCaseMinRowHeight","edgeCaseMaxRowHeight","rightToLeft","widowLayoutStyle","addRow","row","_layoutItems","getItems","vertical","config","itemLayoutData","itemAdded","currentRow","nextToLastRowHeight","laidOutItems","maxNumRows","Number","POSITIVE_INFINITY","forceAspectRatio","showWidows","isNaN","_awakeItems","_inViewportItems","_leadingOrphans","_trailingOrphans","_orphans","_widowCount","map","aspectRatio","forcedAspectRatio","some","Error","addItem","isLayoutComplete","forceComplete","widowCount","params","minAspectRatio","maxAspectRatio","previousRowWidthWithoutSpacing","previousAspectRatio","previousTargetAspectRatio","newItems","rowWidthWithoutSpacing","newAspectRatio","reduce","sum","targetAspectRatio","completeLayout","Math","abs","newHeight","clampedToNativeRatio","clampedHeight","errorWidthPerItem","roundedCumulativeErrors","centerOffset","itemWidthSum","indexOf","max","min","round","fitToWidth"],"mappings":";;;;;IAAA,SAAAA,GAEA,IAAAC,EAAA,GAGA,SAAAC,EAAAC,GAGA,GAAAF,EAAAE,GACA,OAAAF,EAAAE,GAAAC,QAGA,IAAAC,EAAAJ,EAAAE,GAAA,CACAG,EAAAH,EACAI,GAAA,EACAH,QAAA,IAUA,OANAJ,EAAAG,GAAAK,KAAAH,EAAAD,QAAAC,EAAAA,EAAAD,QAAAF,GAGAG,EAAAE,GAAA,EAGAF,EAAAD,QAKAF,EAAAO,EAAAT,EAGAE,EAAAQ,EAAAT,EAGAC,EAAAS,EAAA,SAAAP,EAAAQ,EAAAC,GACAX,EAAAY,EAAAV,EAAAQ,IACAG,OAAAC,eAAAZ,EAAAQ,EAAA,CAAAK,YAAA,EAAAC,IAAAL,KAKAX,EAAAiB,EAAA,SAAAf,GACA,oBAAAgB,QAAAA,OAAAC,aACAN,OAAAC,eAAAZ,EAAAgB,OAAAC,YAAA,CAAAC,MAAA,WAEAP,OAAAC,eAAAZ,EAAA,aAAA,CAAAkB,OAAA,KAQApB,EAAAqB,EAAA,SAAAD,EAAAE,GAEA,GADA,EAAAA,IAAAF,EAAApB,EAAAoB,IACA,EAAAE,EAAA,OAAAF,EACA,GAAA,EAAAE,GAAA,iBAAAF,GAAAA,GAAAA,EAAAG,WAAA,OAAAH,EACA,IAAAI,EAAAX,OAAAY,OAAA,MAGA,GAFAzB,EAAAiB,EAAAO,GACAX,OAAAC,eAAAU,EAAA,UAAA,CAAAT,YAAA,EAAAK,MAAAA,IACA,EAAAE,GAAA,iBAAAF,EAAA,IAAA,IAAAM,KAAAN,EAAApB,EAAAS,EAAAe,EAAAE,EAAA,SAAAA,GAAA,OAAAN,EAAAM,IAAAC,KAAA,KAAAD,IACA,OAAAF,GAIAxB,EAAA4B,EAAA,SAAAzB,GACA,IAAAQ,EAAAR,GAAAA,EAAAoB,WACA,WAAA,OAAApB,EAAA,SACA,WAAA,OAAAA,GAEA,OADAH,EAAAS,EAAAE,EAAA,IAAAA,GACAA,GAIAX,EAAAY,EAAA,SAAAiB,EAAAC,GAAA,OAAAjB,OAAAkB,UAAAC,eAAA1B,KAAAuB,EAAAC,IAGA9B,EAAAiC,EAAA,GAIAjC,EAAAA,EAAAkC,EAAA,GAnFA,CAsFA,CAEA,SAAA/B,EAAAD,EAAAF,GAEAG,EAAAD,QAAAF,EAAA,IAKA,SAAAG,EAAAgC,EAAAnC,gBAGAA,EAAAiB,EAAAkB,GACA,IAAAC,EAAApC,EAAA,GACAqC,EAAArC,EAAA4B,EAAAQ,GACAE,EAAAtC,EAAA,GAEAuC,EAAAvC,EAAA,GACA,SAAAwC,EAAAC,GAAA,OAAAD,EAAA,mBAAAtB,QAAA,iBAAAA,OAAAwB,SAAA,SAAAD,GAAA,cAAAA,GAAA,SAAAA,GAAA,OAAAA,GAAA,mBAAAvB,QAAAuB,EAAAE,cAAAzB,QAAAuB,IAAAvB,OAAAa,UAAA,gBAAAU,IAAAA,GAMA,IAWAG,EAYAC,EAYAC,EASAC,EA5CAC,EAAAV,EAAA,OAAAW,UACAX,EAAA,OAAAW,UAAAV,EAAA,QAEAD,EAAA,OAAAW,UAAAC,WAAA,WAEA,OADAZ,EAAA,OAAAW,UAAAD,EACAG,WAIA,IAAAb,EAAA,SAEAM,EAAAN,EAAA,OAAAW,UAAAN,YAAAZ,UAAAqB,KAEAd,EAAA,OAAAW,UAAAN,YAAAZ,UAAAqB,KAAA,WACAD,KAAAE,YAAAxC,OAAAyB,EAAA,OAAAzB,CAAAsC,KAAAG,YACAH,KAAAE,YAAAE,KAAA,YAAAJ,MAEAP,GACAA,EAAAtC,KAAA6C,OAKAN,EAAAP,EAAA,OAAAW,UAAAN,YAAAZ,UAAAyB,QAEAlB,EAAA,OAAAW,UAAAN,YAAAZ,UAAAyB,QAAA,WACAL,KAAAE,aACAF,KAAAE,YAAAI,WAAA,aAGAZ,GACAA,EAAAvC,KAAA6C,QAIAL,EAAA,WACA,IAAAY,EAAAC,WAAA,GACAC,MAAA7B,UAAA8B,QAAAvD,KAAAoD,EAAAP,MACA,IAAAW,EAAAvB,EAAA,QAAAwB,MAAAzB,EAAA,OAAAoB,GACA,MAAA,WAAAlB,EAAAsB,GAAAA,EAAAX,OAGAR,YAAAJ,EAAA,QAAAI,YAEAI,EAAAT,EAAA,OAAA0B,GAAAf,UACAX,EAAA,OAAA0B,GAAAf,UAAAH,EAEAR,EAAA,OAAA0B,GAAAf,UAAAC,WAAA,WAEA,OADAZ,EAAA,OAAA0B,GAAAf,UAAAF,EACAI,OAKAd,GAAAA,CAAA,WACAxB,OAAA0B,EAAA,QAAA1B,CAAAoD,SAAAC,iBAAA,mBAKA,SAAA/D,EAAAD,GAEAC,EAAAD,QAAA,SAAAiE,GACA,aAAAF,SAAAG,YAAA,gBAAAH,SAAAG,WAEAD,EAAA7D,OACA2D,SAAAI,YAEAJ,SAAAI,YAAA,qBAAA,WACA,gBAAAJ,SAAAG,YAAAD,EAAA7D,SAEA2D,SAAAK,kBAEAL,SAAAK,iBAAA,mBAAAH,KAMA,SAAAhE,EAAAD,EAAAF,IAEA,SAAAuE,GAAA,IAGAC,EADA,oBAAAC,OACAA,YACA,IAAAF,EACAA,EACA,oBAAAG,KACAA,KAEA,GAGAvE,EAAAD,QAAAsE,IACAlE,KAAA6C,KAAAnD,EAAA,KAIA,SAAAG,EAAAD,GAEA,SAAAsC,EAAAC,GAAA,OAAAD,EAAA,mBAAAtB,QAAA,iBAAAA,OAAAwB,SAAA,SAAAD,GAAA,cAAAA,GAAA,SAAAA,GAAA,OAAAA,GAAA,mBAAAvB,QAAAuB,EAAAE,cAAAzB,QAAAuB,IAAAvB,OAAAa,UAAA,gBAAAU,IAAAA,GAEA,IAEAkC,EAAA,WACA,OAAAxB,KADA,GAIA,IAEAwB,EAAAA,GAAA,IAAAC,SAAA,cAAA,GACA,MAAAC,GAEA,YAAA,oBAAAJ,OAAA,YAAAjC,EAAAiC,WAAAE,EAAAF,QAMAtE,EAAAD,QAAAyE,GAIA,SAAAxE,EAAAgC,EAAAnC,gBAGAA,EAAAiB,EAAAkB,GACA,IAAA2C,EAAA9E,EAAA,GACA+E,EAAA/E,EAAA,GACAgF,EAAAhF,EAAA4B,EAAAmD,GACAE,EAAAjF,EAAA,GACAkF,EAAAlF,EAAA4B,EAAAqD,GACAE,EAAAnF,EAAA,GACAoF,EAAApF,EAAA4B,EAAAuD,GACAE,EAAArF,EAAA,GAEA,SAAAwC,EAAAC,GAAA,OAAAD,EAAA,mBAAAtB,QAAA,iBAAAA,OAAAwB,SAAA,SAAAD,GAAA,cAAAA,GAAA,SAAAA,GAAA,OAAAA,GAAA,mBAAAvB,QAAAuB,EAAAE,cAAAzB,QAAAuB,IAAAvB,OAAAa,UAAA,gBAAAU,IAAAA,GAIA,SAAA6C,EAAAC,EAAAC,GAAA,IAAA,IAAApF,EAAA,EAAAA,EAAAoF,EAAAC,OAAArF,IAAA,CAAA,IAAAsF,EAAAF,EAAApF,GAAAsF,EAAA3E,WAAA2E,EAAA3E,aAAA,EAAA2E,EAAAC,cAAA,EAAA,UAAAD,IAAAA,EAAAE,UAAA,GAAA/E,OAAAC,eAAAyE,EAAAG,EAAAhE,IAAAgE,IAWA,IAAAG,EAAA,GAEA,SAAAC,IACAT,EAAA,OAAAU,sBAAA,WACAF,EAAAG,QAAA,SAAAC,GACAA,EAAAC,aAKAb,EAAA,OAAAf,iBAAA,SAAAwB,GACAT,EAAA,OAAAf,iBAAA,oBAAAwB,GACAT,EAAA,OAAAf,iBAAA,OAAAwB,GACAZ,GAAAA,CAAA,WACAY,MAiTA,SAAAK,EAAAC,EAAA,IAGA,YAAA,oBAAAC,YAAA,YAAA7D,EAAA6D,cAAAD,aAAAC,YAAAD,GAAA,WAAA5D,EAAA4D,IAAA,OAAAA,GAAA,IAAAA,EAAAE,UAAA,iBAAAF,EAAAG,YACAH,EAAA,CAAAA,IASA,IANA,IAIAI,EAJAC,EAPA,EAQA/C,EAAAE,MAAA7B,UAAA2E,MAAApG,KAAAqD,UAAA,GACAgD,EAAAP,EAAAX,OACAmB,EAAA,EAGAA,EAAAD,EAAAC,IAWA,GAVA,WAAApE,EAAAiE,SAAA,IAAAA,EACAL,EAAAQ,GAAA3D,YAEAmD,EAAAQ,GAAA3D,UAAA,IAAAA,EAAAmD,EAAAQ,GAAAH,IAEAL,EAAAQ,GAAA3D,YAEAuD,EAAAJ,EAAAQ,GAAA3D,UAAAwD,GAAA1C,MAAAqC,EAAAQ,GAAA3D,UAAAS,SAGA,IAAA8C,EACA,OAAAA,EAIA,OAAAJ,EAhRA,IAAAS,EAAA,EAEA5D,EAAA,WACA,SAAAA,EAAA6D,EAAAC,IA5FA,SAAAC,EAAAC,GAAA,KAAAD,aAAAC,GAAA,MAAA,IAAAC,UAAA,qCA6FAC,CAAAhE,KAAAF,GAEA,IAAAyB,EAAAvB,KACAuB,EAAAmC,WAAAA,IACAnC,EAAApB,WAAAwD,EACApC,EAAA0C,OAAA,GACA1C,EAAA2C,SAAA,CACAC,aAAA,mBACAC,cAAA,MACAC,OAAA,GAEAC,UAAA,IACAC,mBAAA,IAEAC,eAAA,IACAC,MAAA,QAAAlD,EAAAmD,IAAAnD,EAAApB,WAAA,aAEAwE,OAAA,KAEAC,UAAA,KAEAC,eAAA,KAEAC,gBAAA,KAEAC,UAAA,MAIA,IAAAC,EAAAzD,EAAApB,WAAA8E,SAAA,GACAC,EAAA,GACAxH,OAAAyH,KAAAH,GAAAnC,QAAA,SAAAtE,GACA,IAAA6G,EAAA7G,EAAA8G,OAAA,EAAA,GAAAC,cAAA/G,EAAA8G,OAAA,GAEAD,QAAA,IAAA7D,EAAA2C,SAAAkB,KACAF,EAAAE,GAAAJ,EAAAzG,MAGAgD,EAAA+B,QAAAzB,GAAAA,CAAA,GAAAN,EAAA2C,SAAAgB,EAAAtB,GACArC,EAAAgE,YAAA1D,GAAAA,CAAA,GAAAN,EAAA+B,SAEA/B,EAAAwB,OAAArF,OAAAiE,EAAA,SAAAjE,CAAA6D,EAAA+B,QAAAkB,eAAAjD,EAAAwB,QACAxB,EAAAtB,OAnIA,IAAA6D,EAAA0B,EAAAC,EAoUA,OApUA3B,EAuIAhE,GAvIA0F,EAuIA,CAAA,CACAjH,IAAA,MACAN,MAAA,SAAAyH,EAAAC,GACA,MAAA,iBAAAA,EACAzD,EAAA,OAAA0D,iBAAAF,GAAAG,iBAAAF,IAIAA,EAAAG,YACAH,EAAA,qBAAAA,EAAAG,WAGApI,OAAAyH,KAAAQ,GAAA9C,QAAA,SAAAtE,GACAmH,EAAAK,MAAAxH,GAAAoH,EAAApH,KAEAmH,KAGA,CACAnH,IAAA,qBACAN,MAAA,WACAyE,EAAAsD,KAAAhG,MACA2C,MAGA,CACApE,IAAA,0BACAN,MAAA,WACA,IAAAsD,EAAAvB,KACA0C,EAAAG,QAAA,SAAAC,EAAAvE,GACAuE,EAAAY,aAAAnC,EAAAmC,YACAhB,EAAAuD,OAAA1H,EAAA,OAIA,CACAA,IAAA,OACAN,MAAA,WACA,IAAAsD,EAAAvB,KACAuB,EAAA2E,aAAA3E,EAAApB,WAAAY,iBAAAQ,EAAA+B,QAAAa,eACA5C,EAAA4E,qBAEA5E,EAAA+B,QAAAqB,QACApD,EAAA+B,QAAAqB,OAAAxH,KAAAoE,KAIA,CACAhD,IAAA,eACAN,MAAA,SAAAmI,GACA,IAAA7E,EAAAvB,KAEAkC,EAAA,OAAAmE,QAAAD,aAAAlE,EAAA,OAAAmE,SACAD,EAAAA,EAAAvI,OAGAuI,GAAAA,EAAA9D,SAIA8D,EAAAvD,QAAA,SAAAyD,GAGA,IACAC,EAIAnG,GALAkG,GAAAA,EAAAE,iBAAAF,EAAAG,gBACAF,EAAAD,EAAAG,cAAAlF,EAAA+B,QAAAc,kBAGAkC,EAAAE,eAAAjF,GACAnB,EAAA,CACAkG,MAAAA,EACAC,OAAAA,EACAG,MAAAC,WAAAJ,EAAAK,aAAA,YAAA,EACAC,OAAAF,WAAAJ,EAAAK,aAAA,aAAA,EACAE,UAAA,WACA,IAtLAC,EAAAC,EACAC,EACAC,EACAC,EAyCAC,EA0IAC,EAAArH,KAjLA,SAAAsH,IACAJ,EACAF,EAAAE,IAIAA,EAAA,CACAR,MAAAK,EAAAQ,aACAV,OAAAE,EAAAS,eAEAR,EAAAE,GACAO,cAAAR,GAEAE,GAEAC,KAIA,SAAAM,IACAJ,IAGA,SAAAK,IACAL,IAGA,SAAAM,IACA,EAAAb,EAAAQ,cACAD,IAlCAP,EAuLAR,EApLAY,EADAD,IAFAF,EAuLA,SAAAa,GACAR,EAAAX,QAAAmB,EAAAnB,OAAAW,EAAAR,SAAAgB,EAAAhB,SACAQ,EAAAX,MAAAmB,EAAAnB,MACAW,EAAAR,OAAAgB,EAAAhB,OACAtF,EAAAwB,YA/IAqE,EAAA,WACAD,GAAA,EACAJ,EAAAe,oBAAA,OAAAJ,GACAX,EAAAe,oBAAA,QAAAH,IAGAC,IAEAV,IAbAC,GAAA,EACAJ,EAAA5F,iBAAA,OAAAuG,GACAX,EAAA5F,iBAAA,QAAAwG,GAaAV,EAAAc,YAAAH,EAAA,SA0IAd,YACAvF,EAAA0C,OAAA+B,KAAA5F,MAKAmB,EAAA+B,QAAAuB,gBACAtD,EAAA+B,QAAAuB,eAAA1H,KAAAoE,EAAA,CAAA6E,IAGA7E,EAAAyG,aAGA,CACAzJ,IAAA,UACAN,MAAA,WACA,IAAAsD,EAAAvB,KACAiI,EAAA,GAEA1G,EAAA+B,QAAAwB,iBACAvD,EAAA+B,QAAAwB,gBAAA3H,KAAAoE,GAGAA,EAAA0C,OAAApB,QAAA,SAAAzC,GACAA,EAAAsG,OAAAtG,EAAAyG,QACAoB,EAAAjC,KAAA5F,EAAAsG,MAAAtG,EAAAyG,UAGA,IAAAqB,EAAAjG,GAAAA,CAAAgG,EAAA,CACAE,eAAA5G,EAAApB,WAAAiI,wBAAA1B,MACA2B,iBAAA,CACAC,IAAA3B,WAAApF,EAAAmD,IAAAnD,EAAApB,WAAA,iBAAA,EACAoI,MAAA5B,WAAApF,EAAAmD,IAAAnD,EAAApB,WAAA,mBAAA,EACAqI,OAAA7B,WAAApF,EAAAmD,IAAAnD,EAAApB,WAAA,oBAAA,EACAsI,KAAA9B,WAAApF,EAAAmD,IAAAnD,EAAApB,WAAA,kBAAA,GAEAuI,WAAAnH,EAAA+B,QAAAe,OACAsE,gBAAApH,EAAA+B,QAAAgB,UACAsE,yBAAArH,EAAA+B,QAAAiB,qBAEAhD,EAAAmD,IAAAnD,EAAApB,WAAA,CACA0G,OAAA,GAAAgC,OAAAX,EAAAY,gBAAA,QAEA,IAAA7L,EAAA,EACAsE,EAAA0C,OAAApB,QAAA,SAAAzC,GACAA,EAAAsG,OAAAtG,EAAAyG,SACAtF,EAAAmD,IAAAtE,EAAAkG,MAAA,CACAyC,SAAA,WACAjD,UAAA,cAAA+C,QAAAtH,EAAA+B,QAAAmB,OAAA,EAAA,GAAAyD,EAAAc,MAAA/L,GAAAwL,KAAA,mBAAAI,OAAAX,EAAAc,MAAA/L,GAAAqL,IAAA,qBACA5B,MAAA,GAAAmC,OAAAX,EAAAc,MAAA/L,GAAAyJ,MAAA,MACAG,OAAA,GAAAgC,OAAAX,EAAAc,MAAA/L,GAAA4J,OAAA,QAEA5J,OAIAsE,EAAA+B,QAAAyB,WACAxD,EAAA+B,QAAAyB,UAAA5H,KAAAoE,KAIA,CACAhD,IAAA,gBACAN,MAAA,SAAAqF,GACAtD,KACAsD,QAAAzB,GAAAA,CAAA,GADA7B,KACAsD,QAAAA,GADAtD,KAEAgI,YAEA,CACAzJ,IAAA,UACAN,MAAA,WACA,IAAAsD,EAAAvB,KACAuB,EAAA0H,0BAEA1H,EAAA+B,QAAAsB,WACArD,EAAA+B,QAAAsB,UAAAzH,KAAAoE,GAIAA,EAAAmD,IAAAnD,EAAApB,WAAA,CACA0G,OAAA,KAEAtF,EAAA0C,OAAApB,QAAA,SAAAzC,GACAmB,EAAAmD,IAAAtE,EAAAkG,MAAA,CACAyC,SAAA,GACAjD,UAAA,GACAY,MAAA,GACAG,OAAA,OAIAtF,EAAA0C,OAAApB,QAAA,SAAAqG,UACAA,EAAA5C,MAAAE,wBAGAjF,EAAApB,WAAAL,YAEA,CACAvB,IAAA,SACAN,MAAA,WACA+B,KACAgI,eAhUA7F,EAAA2B,EAAAlF,UAAA4G,GAAAC,GAAAtD,EAAA2B,EAAA2B,GAoUA3F,EA7OA,GAiRAkD,EAAAxD,YAAAM,EACAd,EAAA,QAAA,GAIA,SAAAhC,EAAAgC,EAAAnC,gBAwBA,SAAAsM,EAAAC,EAAAC,EAAArI,EAAAsI,GAMA,IAAAC,EACAC,GAAA,EAEAC,EAAA,EAEA,SAAAC,IACAH,GACAI,aAAAJ,GAuBA,SAAAK,IACA,IAAA,IAAAC,EAAArJ,UAAA8B,OAAAwH,EAAA,IAAArJ,MAAAoJ,GAAAE,EAAA,EAAAA,EAAAF,EAAAE,IACAD,EAAAC,GAAAvJ,UAAAuJ,GAGA,IAAAxI,EAAAvB,KACAgK,EAAAC,KAAAC,MAAAT,EAOA,SAAAU,IACAV,EAAAQ,KAAAC,MACAlJ,EAAAJ,MAAAW,EAAAuI,GAPAN,IAmBAF,IAAAC,GAKAY,IAGAT,SAEAU,IAAAd,GAAAF,EAAAY,EAKAG,KACA,IAAAd,IAYAE,EAAAc,WAAAf,EAhCA,WACAC,OAAAa,GA+BAD,OAAAC,IAAAd,EAAAF,EAAAY,EAAAZ,KAMA,MAzEA,kBAAAC,IACAC,EAAAtI,EACAA,EAAAqI,EACAA,OAAAe,GAoEAR,EAAAU,OA7EA,WACAZ,IACAF,GAAA,GA6EAI,EAoBA,SAAAW,EAAAnB,EAAAoB,EAAAxJ,GACA,YAAAoJ,IAAApJ,EAAAmI,EAAAC,EAAAoB,GAAA,GAAArB,EAAAC,EAAApI,GAAA,IAAAwJ,GA3IA3N,EAAAiB,EAAAkB,GACAnC,EAAAS,EAAA0B,EAAA,WAAA,WAAA,OAAAuL,IACA1N,EAAAS,EAAA0B,EAAA,WAAA,WAAA,OAAAmK,KAgJA,SAAAnM,EAAAD,EAAAF,IAEA,SAAAG,GAAA,SAAAqC,EAAAC,GAAA,OAAAD,EAAA,mBAAAtB,QAAA,iBAAAA,OAAAwB,SAAA,SAAAD,GAAA,cAAAA,GAAA,SAAAA,GAAA,OAAAA,GAAA,mBAAAvB,QAAAuB,EAAAE,cAAAzB,QAAAuB,IAAAvB,OAAAa,UAAA,gBAAAU,IAAAA;;;;;;;;GA8FA,SAAAmL,EAAAC,EAAAC,EAAAC,GACA,IAAAC,EAAAD,EAAA,GACAE,EAAAF,EAAAtI,QACAoI,GAAA,WAAAK,EAAAF,KAAAA,EAAA,IAEA,IAAA,IAAAG,EAAA,EAAAA,EAAAF,IAAAE,EAAA,CACA,IAMAC,EANAnI,EAAA8H,EAAAI,GAEA,GAAA,WADAD,EAAAjI,GAGA,IAAA,IAAAvE,KAAAuE,EAAA,CACA,cAAAvE,IACA0M,EAAAP,EAAAQ,EAAAR,MAAA5H,EAAAvE,IAAAuE,EAAAvE,GAGAsM,EAAAtM,GADAoM,EApCA,SAAAQ,EAAAC,EAAAC,GACA,GAAA,WAAAN,EAAAK,GAAA,OAAAC,EAEA,IAAA,IAAA9M,KAAA8M,EACA,WAAAN,EAAAK,EAAA7M,KAAA,WAAAwM,EAAAM,EAAA9M,IACA6M,EAAA7M,GAAA4M,EAAAC,EAAA7M,GAAA8M,EAAA9M,IAEA6M,EAAA7M,GAAA8M,EAAA9M,GAIA,OAAA6M,EA0BAD,CAAAN,EAAAtM,GAAA0M,GAEAA,IAKA,OAAAJ,EAWA,SAAAE,EAAAO,GACA,MAAA,GAAAC,SAAApO,KAAAmO,GAAA/H,MAAA,GAAA,GAAA+B,cApHA,IAAAkG,EAOAN,EAPAM,EA4HA,WAAAnM,EAAArC,IAAAA,GAAA,WAAAqC,EAAArC,EAAAD,UAAAC,EAAAD,SArHAmO,EAAA,SAAAR,GACA,OAAAD,GAAA,IAAAC,GAAA,EAAAlK,aAWAmK,UAAA,SAAAD,GACA,OAAAD,GAAA,IAAAC,GAAA,EAAAlK,YASA0K,EAAAR,MAAA,SAAAY,GACA,IAEAN,EACAF,EAHAW,EAAAH,EACAI,EAAAX,EAAAO,GAIA,GAAA,UAAAI,EAIA,IAHAD,EAAA,GACAX,EAAAQ,EAAAhJ,OAEA0I,EAAA,EAAAA,EAAAF,IAAAE,EACAS,EAAAT,GAAAE,EAAAR,MAAAY,EAAAN,SAEA,GAAA,WAAAU,EAGA,IAAAV,KAFAS,EAAA,GAEAH,EACAG,EAAAT,GAAAE,EAAAR,MAAAY,EAAAN,IAIA,OAAAS,GAqEAD,EACAxO,EAAAD,QAAAmO,EAEA5J,OAAA,MAAA4J,IAGA/N,KAAA6C,KAAAnD,EAAA,EAAAA,CAAAG,KAIA,SAAAA,EAAAD,GAEAC,EAAAD,QAAA,SAAAC,GAsBA,OArBAA,EAAA2O,kBACA3O,EAAA4O,UAAA,aAEA5O,EAAA6O,MAAA,GAEA7O,EAAA8O,WAAA9O,EAAA8O,SAAA,IACApO,OAAAC,eAAAX,EAAA,SAAA,CACAY,YAAA,EACAC,IAAA,WACA,OAAAb,EAAAE,KAGAQ,OAAAC,eAAAX,EAAA,KAAA,CACAY,YAAA,EACAC,IAAA,WACA,OAAAb,EAAAC,KAGAD,EAAA2O,gBAAA,GAGA3O,IAKA,SAAAA,EAAAD,EAAAF;;;;;GAUA,IAAA4N,EAAA5N,EAAA,GACAkP,EAAAlP,EAAA,IAWA,SAAAmP,EAAAC,EAAAC,GACA,IAAAC,EAQA,OANA,IAAAF,EAAAG,8BACAF,EAAAG,MAAA/J,OAAA,GAAA2J,EAAAG,6BAAA,IACAD,GAAA,GAIA,IAAAJ,EAAA,CACAzD,IAAA4D,EAAAI,iBACA7D,KAAAwD,EAAA5D,iBAAAI,KACA/B,MAAAuF,EAAA9D,eAAA8D,EAAA5D,iBAAAI,KAAAwD,EAAA5D,iBAAAE,MACAgE,QAAAN,EAAAvD,WAAA8D,WACA7D,gBAAAsD,EAAAtD,gBACAC,yBAAAqD,EAAArD,yBACA6D,qBAAA,GAAAR,EAAAtD,gBACA+D,qBAAA,EAAAT,EAAAtD,gBACAgE,aAAA,EACAR,cAAAA,EACAS,iBAAAX,EAAAW,mBAeA,SAAAC,EAAAZ,EAAAC,EAAAY,GAMA,OALAZ,EAAAG,MAAArG,KAAA8G,GAEAZ,EAAAa,aAAAb,EAAAa,aAAAlE,OAAAiE,EAAAE,YAEAd,EAAAI,kBAAAQ,EAAAjG,OAAAoF,EAAAvD,WAAAuE,SACAH,EAAA7J,MAgHAjG,EAAAD,QAAA,SAAAuO,EAAA4B,GACA,IAnGAjB,EAAAC,EAAAiB,EAEAC,EACAC,EACAC,EAHAC,EAkGAtB,EAAA,GACAC,EAAA,GAEAhI,EAAA,CACAiE,eAAA,KACAE,iBAAA,GACAK,WAAA,GACAC,gBAAA,IACAC,yBAAA,IACA4E,WAAAC,OAAAC,kBACAC,kBAAA,EACAC,YAAA,EACAxB,6BAAA,EACAQ,iBAAA,QAEAvE,EAAA,GACAK,EAAA,GAGAuD,EAAAxB,EAAAvG,EAFAgJ,EAAAA,GAAA,IAuBA,OAnBA7E,EAAAC,IAAAuF,MAAAlH,WAAAsF,EAAA5D,iBAAAC,MAAA2D,EAAA5D,iBAAA4D,EAAA5D,iBAAAC,IACAD,EAAAE,MAAAsF,MAAAlH,WAAAsF,EAAA5D,iBAAAE,QAAA0D,EAAA5D,iBAAA4D,EAAA5D,iBAAAE,MACAF,EAAAG,OAAAqF,MAAAlH,WAAAsF,EAAA5D,iBAAAG,SAAAyD,EAAA5D,iBAAA4D,EAAA5D,iBAAAG,OACAH,EAAAI,KAAAoF,MAAAlH,WAAAsF,EAAA5D,iBAAAI,OAAAwD,EAAA5D,iBAAA4D,EAAA5D,iBAAAI,KACAC,EAAA8D,WAAAqB,MAAAlH,WAAAsF,EAAAvD,WAAA8D,aAAAP,EAAAvD,WAAAuD,EAAAvD,WAAA8D,WACA9D,EAAAuE,SAAAY,MAAAlH,WAAAsF,EAAAvD,WAAAuE,WAAAhB,EAAAvD,WAAAuD,EAAAvD,WAAAuE,SACAhB,EAAA5D,iBAAAA,EACA4D,EAAAvD,WAAAA,EAEAwD,EAAAa,aAAA,GACAb,EAAA4B,YAAA,GACA5B,EAAA6B,iBAAA,GACA7B,EAAA8B,gBAAA,GACA9B,EAAA+B,iBAAA,GACA/B,EAAAI,iBAAAL,EAAA5D,iBAAAC,IACA4D,EAAAG,MAAA,GACAH,EAAAgC,SAAA,GACAjC,EAAAkC,YAAA,EAzIAlC,EA2IAA,EA3IAC,EA2IAA,EA3IAiB,EA2IA7B,EAAA8C,IAAA,SAAAtL,GACA,OAAAA,EAAA4D,OAAA5D,EAAA+D,OACA,CACAwH,YAAAvL,EAAA4D,MAAA5D,EAAA+D,QAGA,CACAwH,YAAAvL,KAjJAyK,EAAA,GAKAtB,EAAA0B,kBACAR,EAAAtK,QAAA,SAAAwE,GACAA,EAAAiH,mBAAA,EACAjH,EAAAgH,YAAApC,EAAA0B,mBAKAR,EAAAoB,KAAA,SAAAlH,EAAApK,GACA,GAAA4Q,MAAAxG,EAAAgH,aACA,MAAA,IAAAG,MAAA,QAAAvR,EAAA,gCAWA,GANAoQ,EADAA,GACArB,EAAAC,EAAAC,GAIAkB,EAAAC,EAAAoB,QAAApH,GAEAgG,EAAAqB,mBAAA,CAIA,GAFAnB,EAAAA,EAAA1E,OAAAgE,EAAAZ,EAAAC,EAAAmB,IAEAnB,EAAAG,MAAA/J,QAAA2J,EAAAuB,WAEA,QADAH,EAAA,MAMA,GAFAA,EAAArB,EAAAC,EAAAC,IAEAkB,IACAA,EAAAC,EAAAoB,QAAApH,GAEAgG,EAAAqB,oBAAA,CAIA,GAFAnB,EAAAA,EAAA1E,OAAAgE,EAAAZ,EAAAC,EAAAmB,IAEAnB,EAAAG,MAAA/J,QAAA2J,EAAAuB,WAEA,QADAH,EAAA,MAIAA,EAAArB,EAAAC,EAAAC,OAOAmB,GAAAA,EAAAL,WAAA1K,QAAA2J,EAAA2B,aAEA1B,EAAAG,MAAA/J,QAGAgL,EADApB,EAAAG,MAAAH,EAAAG,MAAA/J,OAAA,GAAA6J,cACAD,EAAAG,MAAAH,EAAAG,MAAA/J,OAAA,GAAAqG,gBAEAuD,EAAAG,MAAAH,EAAAG,MAAA/J,OAAA,GAAAuE,OAGAwG,EAAAsB,eAAA,EAAArB,IAGAD,EAAAsB,eAAA,GAGApB,EAAAA,EAAA1E,OAAAgE,EAAAZ,EAAAC,EAAAmB,IACApB,EAAAkC,YAAAd,EAAAL,WAAA1K,QAKA4J,EAAAI,iBAAAJ,EAAAI,iBAAAL,EAAAvD,WAAAuE,SAEAf,EAAAI,iBAAAJ,EAAAI,iBAAAL,EAAA5D,iBAAAG,OACA,CACAM,gBAAAoD,EAAAI,iBACAsC,WAAA3C,EAAAkC,YACAnF,MAAAkD,EAAAa,gBAqEA,SAAA/P,EAAAD,EAAAF;;;;;;AAOA,IAAA4N,EAAA5N,EAAA,IAsBAG,EAAAD,QAAA,SAAA8R,GAEA7O,KAAAsI,IAAAuG,EAAAvG,IAEAtI,KAAAyI,KAAAoG,EAAApG,KAEAzI,KAAA0G,MAAAmI,EAAAnI,MAEA1G,KAAAuM,QAAAsC,EAAAtC,QAEAvM,KAAA2I,gBAAAkG,EAAAlG,gBACA3I,KAAA4I,yBAAAiG,EAAAjG,yBACA5I,KAAA8O,eAAA9O,KAAA0G,MAAAmI,EAAAlG,iBAAA,EAAAkG,EAAAjG,0BACA5I,KAAA+O,eAAA/O,KAAA0G,MAAAmI,EAAAlG,iBAAA,EAAAkG,EAAAjG,0BAEA5I,KAAAyM,qBAAAoC,EAAApC,qBACAzM,KAAA0M,qBAAAmC,EAAAnC,qBAEA1M,KAAA4M,iBAAAiC,EAAAjC,iBAEA5M,KAAAmM,cAAA0C,EAAA1C,cAEAnM,KAAAiD,MAAA,GAEAjD,KAAA6G,OAAA,IAGAjI,UAAA,CAqBA6P,QAAA,SAAApH,GACA,IAOA2H,EACAC,EACAC,EATAC,EAAAnP,KAAAiD,MAAA4F,OAAAxB,GAEA+H,EAAApP,KAAA0G,OAAAyI,EAAA7M,OAAA,GAAAtC,KAAAuM,QACA8C,EAAAF,EAAAG,OAAA,SAAAC,EAAAzM,GACA,OAAAyM,EAAAzM,EAAAuL,aACA,GACAmB,EAAAJ,EAAApP,KAAA2I,gBAKA,OAAA3I,KAAAmM,eAEA,IAAAnM,KAAAiD,MAAAX,QAEA,GAAA+E,EAAAgH,aAEArO,KAAAiD,MAAA+C,KAAAqB,GACArH,KAAAyP,eAAAL,EAAA/H,EAAAgH,YAAA,YACA,GAKAgB,EAAArP,KAAA8O,gBAGA9O,KAAAiD,MAAA+C,KAAAyE,EAAApD,KACA,KACAgI,EAAArP,KAAA+O,iBAIA,IAAA/O,KAAAiD,MAAAX,QA6BAtC,KAAAiD,MAAA+C,KAAAyE,EAAApD,IACArH,KAAAyP,eAAAL,EAAAC,EAAA,YACA,IAtBAL,EAAAhP,KAAA0G,OAAA1G,KAAAiD,MAAAX,OAAA,GAAAtC,KAAAuM,QACA0C,EAAAjP,KAAAiD,MAAAqM,OAAA,SAAAC,EAAAzM,GACA,OAAAyM,EAAAzM,EAAAuL,aACA,GACAa,EAAAF,EAAAhP,KAAA2I,gBAEA+G,KAAAC,IAAAN,EAAAG,GAAAE,KAAAC,IAAAV,EAAAC,IAEAlP,KAAAyP,eAAAT,EAAAC,EAAA,YACA,IAIAjP,KAAAiD,MAAA+C,KAAAyE,EAAApD,IACArH,KAAAyP,eAAAL,EAAAC,EAAA,YACA,KAiBAX,iBAAA,WACA,OAAA,EAAA1O,KAAA6G,QAWA4I,eAAA,SAAAG,EAAAhD,GACA,IAEAiD,EACAC,EACAC,EACAC,EAEAC,EAPAC,EAAAlQ,KAAAyI,KACA2G,EAAApP,KAAA0G,OAAA1G,KAAAiD,MAAAX,OAAA,GAAAtC,KAAAuM,cAQA,IAAAK,GAAA,CAAA,UAAA,SAAA,QAAAuD,QAAAvD,GAAA,KACAA,EAAA,QAIAkD,EAAAJ,KAAAU,IAAApQ,KAAAyM,qBAAAiD,KAAAW,IAAAT,EAAA5P,KAAA0M,uBAOAmD,EALAD,IAAAE,EAKAV,GADApP,KAAA6G,OAAAiJ,IACAV,EAAAQ,IAGA5P,KAAA6G,OAAA+I,EACA,GAIA5P,KAAAiD,MAAAJ,QAAA,SAAAC,GACAA,EAAAwF,IAAAtI,KAAAsI,IACAxF,EAAA4D,MAAA5D,EAAAuL,YAAArO,KAAA6G,OAAAgJ,EACA/M,EAAA+D,OAAA7G,KAAA6G,OAIA/D,EAAA2F,KAAAyH,EAEAA,GAAApN,EAAA4D,MAAA1G,KAAAuM,SACAvM,MAGA,YAAA4M,GACAsD,GAAAlQ,KAAAuM,QAAAvM,KAAAyI,KACAsH,GAAAG,EAAAlQ,KAAA0G,OAAA1G,KAAAiD,MAAAX,OACA0N,EAAAhQ,KAAAiD,MAAAmL,IAAA,SAAAtL,EAAA7F,GACA,OAAAyS,KAAAY,OAAArT,EAAA,GAAA8S,KAGA,IAAA/P,KAAAiD,MAAAX,OAEAtC,KAAAiD,MAAA,GACAyD,OAAAgJ,KAAAY,MAAAP,GAIA/P,KAAAiD,MAAAJ,QAAA,SAAAC,EAAA7F,GACA,EAAAA,GACA6F,EAAA2F,MAAAuH,EAAA/S,EAAA,GACA6F,EAAA4D,OAAAsJ,EAAA/S,GAAA+S,EAAA/S,EAAA,IAEA6F,EAAA4D,OAAAsJ,EAAA/S,MAIA,WAAA2P,IAEAqD,GAAAjQ,KAAA0G,MAAAwJ,GAAA,EACAlQ,KAAAiD,MAAAJ,QAAA,SAAAC,GACAA,EAAA2F,MAAAwH,EAAAjQ,KAAAuM,SACAvM,QAYA2O,cAAA,SAAA4B,EAAAjM,GAMA,iBAAAA,EACAtE,KAAAyP,eAAAnL,EAAAtE,KAAA4M,kBAGA5M,KAAAyP,eAAAzP,KAAA2I,gBAAA3I,KAAA4M,mBAWAI,SAAA,WACA,OAAAhN,KAAAiD","file":"fjGallery.min.js","sourcesContent":["/*!\n * Name : Flickr's Justified Gallery [fjGallery]\n * Version : 1.0.3\n * Author : nK <https://nkdev.info>\n * GitHub : https://github.com/nk-o/flickr-justified-gallery\n */\n/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// define __esModule on exports\n/******/ \t__webpack_require__.r = function(exports) {\n/******/ \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n/******/ \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n/******/ \t\t}\n/******/ \t\tObject.defineProperty(exports, '__esModule', { value: true });\n/******/ \t};\n/******/\n/******/ \t// create a fake namespace object\n/******/ \t// mode & 1: value is a module id, require it\n/******/ \t// mode & 2: merge all properties of value into the ns\n/******/ \t// mode & 4: return value when already ns object\n/******/ \t// mode & 8|1: behave like require\n/******/ \t__webpack_require__.t = function(value, mode) {\n/******/ \t\tif(mode & 1) value = __webpack_require__(value);\n/******/ \t\tif(mode & 8) return value;\n/******/ \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n/******/ \t\tvar ns = Object.create(null);\n/******/ \t\t__webpack_require__.r(ns);\n/******/ \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n/******/ \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n/******/ \t\treturn ns;\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports, __webpack_require__) {\n\nmodule.exports = __webpack_require__(1);\n\n\n/***/ }),\n/* 1 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var lite_ready__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);\n/* harmony import */ var lite_ready__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lite_ready__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var global__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3);\n/* harmony import */ var global__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(global__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _fjGallery_esm__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(5);\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n\n\n // no conflict\n\nvar oldPlugin = global__WEBPACK_IMPORTED_MODULE_1__[\"window\"].fjGallery;\nglobal__WEBPACK_IMPORTED_MODULE_1__[\"window\"].fjGallery = _fjGallery_esm__WEBPACK_IMPORTED_MODULE_2__[\"default\"];\n\nglobal__WEBPACK_IMPORTED_MODULE_1__[\"window\"].fjGallery.noConflict = function () {\n global__WEBPACK_IMPORTED_MODULE_1__[\"window\"].fjGallery = oldPlugin;\n return this;\n}; // jQuery support\n\n\nif (typeof global__WEBPACK_IMPORTED_MODULE_1__[\"jQuery\"] !== 'undefined') {\n // add data to jQuery .data('fjGallery')\n var oldInit = global__WEBPACK_IMPORTED_MODULE_1__[\"window\"].fjGallery.constructor.prototype.init;\n\n global__WEBPACK_IMPORTED_MODULE_1__[\"window\"].fjGallery.constructor.prototype.init = function () {\n this.jQcontainer = Object(global__WEBPACK_IMPORTED_MODULE_1__[\"jQuery\"])(this.$container);\n this.jQcontainer.data('fjGallery', this);\n\n if (oldInit) {\n oldInit.call(this);\n }\n }; // remove data from jQuery .data('fjGallery')\n\n\n var oldDestroy = global__WEBPACK_IMPORTED_MODULE_1__[\"window\"].fjGallery.constructor.prototype.destroy;\n\n global__WEBPACK_IMPORTED_MODULE_1__[\"window\"].fjGallery.constructor.prototype.destroy = function () {\n if (this.jQcontainer) {\n this.jQcontainer.removeData('fjGallery');\n }\n\n if (oldDestroy) {\n oldDestroy.call(this);\n }\n };\n\n var jQueryPlugin = function jQueryPlugin() {\n var args = arguments || [];\n Array.prototype.unshift.call(args, this);\n var res = _fjGallery_esm__WEBPACK_IMPORTED_MODULE_2__[\"default\"].apply(global__WEBPACK_IMPORTED_MODULE_1__[\"window\"], args);\n return _typeof(res) !== 'object' ? res : this;\n };\n\n jQueryPlugin.constructor = _fjGallery_esm__WEBPACK_IMPORTED_MODULE_2__[\"default\"].constructor; // no conflict\n\n var oldJqPlugin = global__WEBPACK_IMPORTED_MODULE_1__[\"jQuery\"].fn.fjGallery;\n global__WEBPACK_IMPORTED_MODULE_1__[\"jQuery\"].fn.fjGallery = jQueryPlugin;\n\n global__WEBPACK_IMPORTED_MODULE_1__[\"jQuery\"].fn.fjGallery.noConflict = function () {\n global__WEBPACK_IMPORTED_MODULE_1__[\"jQuery\"].fn.fjGallery = oldJqPlugin;\n return this;\n };\n} // .fj-gallery initialization\n\n\nlite_ready__WEBPACK_IMPORTED_MODULE_0___default()(function () {\n Object(_fjGallery_esm__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(document.querySelectorAll('.fj-gallery'));\n});\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports) {\n\nmodule.exports = function (callback) {\n if (document.readyState === 'complete' || document.readyState === 'interactive') {\n // Already ready or interactive, execute callback\n callback.call();\n } else if (document.attachEvent) {\n // Old browsers\n document.attachEvent('onreadystatechange', function () {\n if (document.readyState === 'interactive') callback.call();\n });\n } else if (document.addEventListener) {\n // Modern browsers\n document.addEventListener('DOMContentLoaded', callback);\n }\n};\n\n/***/ }),\n/* 3 */\n/***/ (function(module, exports, __webpack_require__) {\n\n/* WEBPACK VAR INJECTION */(function(global) {var win;\n\nif (typeof window !== \"undefined\") {\n win = window;\n} else if (typeof global !== \"undefined\") {\n win = global;\n} else if (typeof self !== \"undefined\") {\n win = self;\n} else {\n win = {};\n}\n\nmodule.exports = win;\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(4)))\n\n/***/ }),\n/* 4 */\n/***/ (function(module, exports) {\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nvar g; // This works in non-strict mode\n\ng = function () {\n return this;\n}();\n\ntry {\n // This works if eval is allowed (see CSP)\n g = g || new Function(\"return this\")();\n} catch (e) {\n // This works if the window reference is available\n if ((typeof window === \"undefined\" ? \"undefined\" : _typeof(window)) === \"object\") g = window;\n} // g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\n\nmodule.exports = g;\n\n/***/ }),\n/* 5 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var throttle_debounce__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6);\n/* harmony import */ var merge__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7);\n/* harmony import */ var merge__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(merge__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var lite_ready__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(2);\n/* harmony import */ var lite_ready__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lite_ready__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var justified_layout__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(9);\n/* harmony import */ var justified_layout__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(justified_layout__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var global__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(3);\n/* harmony import */ var global__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(global__WEBPACK_IMPORTED_MODULE_4__);\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\n\n\n\n\n // list with all fjGallery instances\n// need to render all in one scroll/resize event\n\nvar fjGalleryList = [];\n\nfunction updateFjGallery() {\n global__WEBPACK_IMPORTED_MODULE_4__[\"window\"].requestAnimationFrame(function () {\n fjGalleryList.forEach(function (item) {\n item.resize();\n });\n });\n}\n\nglobal__WEBPACK_IMPORTED_MODULE_4__[\"window\"].addEventListener('resize', updateFjGallery);\nglobal__WEBPACK_IMPORTED_MODULE_4__[\"window\"].addEventListener('orientationchange', updateFjGallery);\nglobal__WEBPACK_IMPORTED_MODULE_4__[\"window\"].addEventListener('load', updateFjGallery);\nlite_ready__WEBPACK_IMPORTED_MODULE_2___default()(function () {\n updateFjGallery();\n}); // get image dimensions\n// thanks https://gist.github.com/dimsemenov/5382856\n\nfunction getImgDimensions(img, cb) {\n var interval;\n var hasSize = false;\n var addedListeners = false;\n\n var onHasSize = function onHasSize() {\n if (hasSize) {\n cb(hasSize);\n return;\n }\n\n hasSize = {\n width: img.naturalWidth,\n height: img.naturalHeight\n };\n cb(hasSize);\n clearInterval(interval);\n\n if (addedListeners) {\n // eslint-disable-next-line no-use-before-define\n removeListeners();\n }\n };\n\n var onLoaded = function onLoaded() {\n onHasSize();\n };\n\n var onError = function onError() {\n onHasSize();\n };\n\n var checkSize = function checkSize() {\n if (img.naturalWidth > 0) {\n onHasSize();\n }\n };\n\n var addListeners = function addListeners() {\n addedListeners = true;\n img.addEventListener('load', onLoaded);\n img.addEventListener('error', onError);\n };\n\n var removeListeners = function removeListeners() {\n addedListeners = false;\n img.removeEventListener('load', onLoaded);\n img.removeEventListener('error', onError);\n };\n\n checkSize();\n\n if (!hasSize) {\n addListeners();\n interval = setInterval(checkSize, 100);\n }\n}\n\nvar instanceID = 0; // fjGallery class\n\nvar fjGallery = /*#__PURE__*/function () {\n function fjGallery(container, userOptions) {\n _classCallCheck(this, fjGallery);\n\n var self = this;\n self.instanceID = instanceID++;\n self.$container = container;\n self.images = [];\n self.defaults = {\n itemSelector: '.fj-gallery-item',\n imageSelector: 'img',\n gutter: 10,\n // supports object like `{ horizontal: 10, vertical: 10 }`.\n rowHeight: 320,\n rowHeightTolerance: 0.25,\n // [0, 1]\n resizeThrottle: 200,\n isRtl: self.css(self.$container, 'direction') === 'rtl',\n // events\n onInit: null,\n // function() {}\n onDestroy: null,\n // function() {}\n onAppendImages: null,\n // function() {}\n onBeforeJustify: null,\n // function() {}\n onJustify: null // function() {}\n\n }; // prepare data-options\n\n var dataOptions = self.$container.dataset || {};\n var pureDataOptions = {};\n Object.keys(dataOptions).forEach(function (key) {\n var loweCaseOption = key.substr(0, 1).toLowerCase() + key.substr(1);\n\n if (loweCaseOption && typeof self.defaults[loweCaseOption] !== 'undefined') {\n pureDataOptions[loweCaseOption] = dataOptions[key];\n }\n });\n self.options = merge__WEBPACK_IMPORTED_MODULE_1___default()({}, self.defaults, pureDataOptions, userOptions);\n self.pureOptions = merge__WEBPACK_IMPORTED_MODULE_1___default()({}, self.options); // throttle for resize\n\n self.resize = Object(throttle_debounce__WEBPACK_IMPORTED_MODULE_0__[\"throttle\"])(self.options.resizeThrottle, self.resize);\n self.init();\n } // add styles to element\n\n\n _createClass(fjGallery, [{\n key: \"css\",\n value: function css(el, styles) {\n if (typeof styles === 'string') {\n return global__WEBPACK_IMPORTED_MODULE_4__[\"window\"].getComputedStyle(el).getPropertyValue(styles);\n } // add transform property with vendor prefix\n\n\n if (styles.transform) {\n styles['-webkit-transform'] = styles.transform;\n }\n\n Object.keys(styles).forEach(function (key) {\n el.style[key] = styles[key];\n });\n return el;\n } // add to fjGallery instances list\n\n }, {\n key: \"addToFjGalleryList\",\n value: function addToFjGalleryList() {\n fjGalleryList.push(this);\n updateFjGallery();\n } // remove from fjGallery instances list\n\n }, {\n key: \"removeFromFjGalleryList\",\n value: function removeFromFjGalleryList() {\n var self = this;\n fjGalleryList.forEach(function (item, key) {\n if (item.instanceID === self.instanceID) {\n fjGalleryList.splice(key, 1);\n }\n });\n }\n }, {\n key: \"init\",\n value: function init() {\n var self = this;\n self.appendImages(self.$container.querySelectorAll(self.options.itemSelector));\n self.addToFjGalleryList(); // call onInit event\n\n if (self.options.onInit) {\n self.options.onInit.call(self);\n }\n } // append images\n\n }, {\n key: \"appendImages\",\n value: function appendImages($images) {\n var self = this; // check if jQuery\n\n if (global__WEBPACK_IMPORTED_MODULE_4__[\"window\"].jQuery && $images instanceof global__WEBPACK_IMPORTED_MODULE_4__[\"window\"].jQuery) {\n $images = $images.get();\n }\n\n if (!$images || !$images.length) {\n return;\n }\n\n $images.forEach(function ($item) {\n // if $images is jQuery, for some reason in this array there is undefined item, that not a DOM,\n // so we need to check for $item.querySelector.\n if ($item && !$item.fjGalleryImage && $item.querySelector) {\n var $image = $item.querySelector(self.options.imageSelector);\n\n if ($image) {\n $item.fjGalleryImage = self;\n var data = {\n $item: $item,\n $image: $image,\n width: parseFloat($image.getAttribute('width')) || false,\n height: parseFloat($image.getAttribute('height')) || false,\n loadSizes: function loadSizes() {\n var itemData = this;\n getImgDimensions($image, function (dimensions) {\n if (itemData.width !== dimensions.width || itemData.height !== dimensions.height) {\n itemData.width = dimensions.width;\n itemData.height = dimensions.height;\n self.resize();\n }\n });\n }\n };\n data.loadSizes();\n self.images.push(data);\n }\n }\n }); // call onAppendImages event\n\n if (self.options.onAppendImages) {\n self.options.onAppendImages.call(self, [$images]);\n }\n\n self.justify();\n } // justify images\n\n }, {\n key: \"justify\",\n value: function justify() {\n var self = this;\n var justifyArray = []; // call onBeforeJustify event\n\n if (self.options.onBeforeJustify) {\n self.options.onBeforeJustify.call(self);\n }\n\n self.images.forEach(function (data) {\n if (data.width && data.height) {\n justifyArray.push(data.width / data.height);\n }\n });\n var justifiedData = justified_layout__WEBPACK_IMPORTED_MODULE_3___default()(justifyArray, {\n containerWidth: self.$container.getBoundingClientRect().width,\n containerPadding: {\n top: parseFloat(self.css(self.$container, 'padding-top')) || 0,\n right: parseFloat(self.css(self.$container, 'padding-right')) || 0,\n bottom: parseFloat(self.css(self.$container, 'padding-bottom')) || 0,\n left: parseFloat(self.css(self.$container, 'padding-left')) || 0\n },\n boxSpacing: self.options.gutter,\n targetRowHeight: self.options.rowHeight,\n targetRowHeightTolerance: self.options.rowHeightTolerance\n });\n self.css(self.$container, {\n height: \"\".concat(justifiedData.containerHeight, \"px\")\n });\n var i = 0;\n self.images.forEach(function (data) {\n if (data.width && data.height) {\n self.css(data.$item, {\n position: 'absolute',\n transform: \"translateX(\".concat((self.options.isRtl ? -1 : 1) * justifiedData.boxes[i].left, \"px) translateY(\").concat(justifiedData.boxes[i].top, \"px) translateZ(0)\"),\n width: \"\".concat(justifiedData.boxes[i].width, \"px\"),\n height: \"\".concat(justifiedData.boxes[i].height, \"px\")\n });\n i++;\n }\n }); // call onJustify event\n\n if (self.options.onJustify) {\n self.options.onJustify.call(self);\n }\n } // update options and resize gallery items\n\n }, {\n key: \"updateOptions\",\n value: function updateOptions(options) {\n var self = this;\n self.options = merge__WEBPACK_IMPORTED_MODULE_1___default()({}, self.options, options);\n self.justify();\n }\n }, {\n key: \"destroy\",\n value: function destroy() {\n var self = this;\n self.removeFromFjGalleryList(); // call onDestroy event\n\n if (self.options.onDestroy) {\n self.options.onDestroy.call(self);\n } // remove styles.\n\n\n self.css(self.$container, {\n height: ''\n });\n self.images.forEach(function (data) {\n self.css(data.$item, {\n position: '',\n transform: '',\n width: '',\n height: ''\n });\n }); // delete fjGalleryImage instance from images\n\n self.images.forEach(function (val) {\n delete val.$item.fjGalleryImage;\n }); // delete fjGallery instance from container\n\n delete self.$container.fjGallery;\n }\n }, {\n key: \"resize\",\n value: function resize() {\n var self = this;\n self.justify();\n }\n }]);\n\n return fjGallery;\n}(); // global definition\n\n\nvar plugin = function plugin(items) {\n // check for dom element\n // thanks: http://stackoverflow.com/questions/384286/javascript-isdom-how-do-you-check-if-a-javascript-object-is-a-dom-object\n if ((typeof HTMLElement === \"undefined\" ? \"undefined\" : _typeof(HTMLElement)) === 'object' ? items instanceof HTMLElement : items && _typeof(items) === 'object' && items !== null && items.nodeType === 1 && typeof items.nodeName === 'string') {\n items = [items];\n }\n\n var options = arguments[1];\n var args = Array.prototype.slice.call(arguments, 2);\n var len = items.length;\n var k = 0;\n var ret;\n\n for (k; k < len; k++) {\n if (_typeof(options) === 'object' || typeof options === 'undefined') {\n if (!items[k].fjGallery) {\n // eslint-disable-next-line new-cap\n items[k].fjGallery = new fjGallery(items[k], options);\n }\n } else if (items[k].fjGallery) {\n // eslint-disable-next-line prefer-spread\n ret = items[k].fjGallery[options].apply(items[k].fjGallery, args);\n }\n\n if (typeof ret !== 'undefined') {\n return ret;\n }\n }\n\n return items;\n};\n\nplugin.constructor = fjGallery;\n/* harmony default export */ __webpack_exports__[\"default\"] = (plugin);\n\n/***/ }),\n/* 6 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"debounce\", function() { return debounce; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"throttle\", function() { return throttle; });\n/* eslint-disable no-undefined,no-param-reassign,no-shadow */\n\n/**\n * Throttle execution of a function. Especially useful for rate limiting\n * execution of handlers on events like resize and scroll.\n *\n * @param {number} delay - A zero-or-greater delay in milliseconds. For event callbacks, values around 100 or 250 (or even higher) are most useful.\n * @param {boolean} [noTrailing] - Optional, defaults to false. If noTrailing is true, callback will only execute every `delay` milliseconds while the\n * throttled-function is being called. If noTrailing is false or unspecified, callback will be executed one final time\n * after the last throttled-function call. (After the throttled-function has not been called for `delay` milliseconds,\n * the internal counter is reset).\n * @param {Function} callback - A function to be executed after delay milliseconds. The `this` context and all arguments are passed through, as-is,\n * to `callback` when the throttled-function is executed.\n * @param {boolean} [debounceMode] - If `debounceMode` is true (at begin), schedule `clear` to execute after `delay` ms. If `debounceMode` is false (at end),\n * schedule `callback` to execute after `delay` ms.\n *\n * @returns {Function} A new, throttled, function.\n */\nfunction throttle(delay, noTrailing, callback, debounceMode) {\n /*\n * After wrapper has stopped being called, this timeout ensures that\n * `callback` is executed at the proper times in `throttle` and `end`\n * debounce modes.\n */\n var timeoutID;\n var cancelled = false; // Keep track of the last time `callback` was executed.\n\n var lastExec = 0; // Function to clear existing timeout\n\n function clearExistingTimeout() {\n if (timeoutID) {\n clearTimeout(timeoutID);\n }\n } // Function to cancel next exec\n\n\n function cancel() {\n clearExistingTimeout();\n cancelled = true;\n } // `noTrailing` defaults to falsy.\n\n\n if (typeof noTrailing !== 'boolean') {\n debounceMode = callback;\n callback = noTrailing;\n noTrailing = undefined;\n }\n /*\n * The `wrapper` function encapsulates all of the throttling / debouncing\n * functionality and when executed will limit the rate at which `callback`\n * is executed.\n */\n\n\n function wrapper() {\n for (var _len = arguments.length, arguments_ = new Array(_len), _key = 0; _key < _len; _key++) {\n arguments_[_key] = arguments[_key];\n }\n\n var self = this;\n var elapsed = Date.now() - lastExec;\n\n if (cancelled) {\n return;\n } // Execute `callback` and update the `lastExec` timestamp.\n\n\n function exec() {\n lastExec = Date.now();\n callback.apply(self, arguments_);\n }\n /*\n * If `debounceMode` is true (at begin) this is used to clear the flag\n * to allow future `callback` executions.\n */\n\n\n function clear() {\n timeoutID = undefined;\n }\n\n if (debounceMode && !timeoutID) {\n /*\n * Since `wrapper` is being called for the first time and\n * `debounceMode` is true (at begin), execute `callback`.\n */\n exec();\n }\n\n clearExistingTimeout();\n\n if (debounceMode === undefined && elapsed > delay) {\n /*\n * In throttle mode, if `delay` time has been exceeded, execute\n * `callback`.\n */\n exec();\n } else if (noTrailing !== true) {\n /*\n * In trailing throttle mode, since `delay` time has not been\n * exceeded, schedule `callback` to execute `delay` ms after most\n * recent execution.\n *\n * If `debounceMode` is true (at begin), schedule `clear` to execute\n * after `delay` ms.\n *\n * If `debounceMode` is false (at end), schedule `callback` to\n * execute after `delay` ms.\n */\n timeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay);\n }\n }\n\n wrapper.cancel = cancel; // Return the wrapper function.\n\n return wrapper;\n}\n/* eslint-disable no-undefined */\n\n/**\n * Debounce execution of a function. Debouncing, unlike throttling,\n * guarantees that a function is only executed a single time, either at the\n * very beginning of a series of calls, or at the very end.\n *\n * @param {number} delay - A zero-or-greater delay in milliseconds. For event callbacks, values around 100 or 250 (or even higher) are most useful.\n * @param {boolean} [atBegin] - Optional, defaults to false. If atBegin is false or unspecified, callback will only be executed `delay` milliseconds\n * after the last debounced-function call. If atBegin is true, callback will be executed only at the first debounced-function call.\n * (After the throttled-function has not been called for `delay` milliseconds, the internal counter is reset).\n * @param {Function} callback - A function to be executed after delay milliseconds. The `this` context and all arguments are passed through, as-is,\n * to `callback` when the debounced-function is executed.\n *\n * @returns {Function} A new, debounced function.\n */\n\n\nfunction debounce(delay, atBegin, callback) {\n return callback === undefined ? throttle(delay, atBegin, false) : throttle(delay, callback, atBegin !== false);\n}\n\n\n\n/***/ }),\n/* 7 */\n/***/ (function(module, exports, __webpack_require__) {\n\n/* WEBPACK VAR INJECTION */(function(module) {function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n/*!\r\n * @name JavaScript/NodeJS Merge v1.2.1\r\n * @author yeikos\r\n * @repository https://github.com/yeikos/js.merge\r\n\r\n * Copyright 2014 yeikos - MIT license\r\n * https://raw.github.com/yeikos/js.merge/master/LICENSE\r\n */\n;\n\n(function (isNode) {\n /**\r\n * Merge one or more objects \r\n * @param bool? clone\r\n * @param mixed,... arguments\r\n * @return object\r\n */\n var Public = function Public(clone) {\n return merge(clone === true, false, arguments);\n },\n publicName = 'merge';\n /**\r\n * Merge two or more objects recursively \r\n * @param bool? clone\r\n * @param mixed,... arguments\r\n * @return object\r\n */\n\n\n Public.recursive = function (clone) {\n return merge(clone === true, true, arguments);\n };\n /**\r\n * Clone the input removing any reference\r\n * @param mixed input\r\n * @return mixed\r\n */\n\n\n Public.clone = function (input) {\n var output = input,\n type = typeOf(input),\n index,\n size;\n\n if (type === 'array') {\n output = [];\n size = input.length;\n\n for (index = 0; index < size; ++index) {\n output[index] = Public.clone(input[index]);\n }\n } else if (type === 'object') {\n output = {};\n\n for (index in input) {\n output[index] = Public.clone(input[index]);\n }\n }\n\n return output;\n };\n /**\r\n * Merge two objects recursively\r\n * @param mixed input\r\n * @param mixed extend\r\n * @return mixed\r\n */\n\n\n function merge_recursive(base, extend) {\n if (typeOf(base) !== 'object') return extend;\n\n for (var key in extend) {\n if (typeOf(base[key]) === 'object' && typeOf(extend[key]) === 'object') {\n base[key] = merge_recursive(base[key], extend[key]);\n } else {\n base[key] = extend[key];\n }\n }\n\n return base;\n }\n /**\r\n * Merge two or more objects\r\n * @param bool clone\r\n * @param bool recursive\r\n * @param array argv\r\n * @return object\r\n */\n\n\n function merge(clone, recursive, argv) {\n var result = argv[0],\n size = argv.length;\n if (clone || typeOf(result) !== 'object') result = {};\n\n for (var index = 0; index < size; ++index) {\n var item = argv[index],\n type = typeOf(item);\n if (type !== 'object') continue;\n\n for (var key in item) {\n if (key === '__proto__') continue;\n var sitem = clone ? Public.clone(item[key]) : item[key];\n\n if (recursive) {\n result[key] = merge_recursive(result[key], sitem);\n } else {\n result[key] = sitem;\n }\n }\n }\n\n return result;\n }\n /**\r\n * Get type of variable\r\n * @param mixed input\r\n * @return string\r\n *\r\n * @see http://jsperf.com/typeofvar\r\n */\n\n\n function typeOf(input) {\n return {}.toString.call(input).slice(8, -1).toLowerCase();\n }\n\n if (isNode) {\n module.exports = Public;\n } else {\n window[publicName] = Public;\n }\n})(( false ? undefined : _typeof(module)) === 'object' && module && _typeof(module.exports) === 'object' && module.exports);\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(8)(module)))\n\n/***/ }),\n/* 8 */\n/***/ (function(module, exports) {\n\nmodule.exports = function (module) {\n if (!module.webpackPolyfill) {\n module.deprecate = function () {};\n\n module.paths = []; // module.parent = undefined by default\n\n if (!module.children) module.children = [];\n Object.defineProperty(module, \"loaded\", {\n enumerable: true,\n get: function get() {\n return module.l;\n }\n });\n Object.defineProperty(module, \"id\", {\n enumerable: true,\n get: function get() {\n return module.i;\n }\n });\n module.webpackPolyfill = 1;\n }\n\n return module;\n};\n\n/***/ }),\n/* 9 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/*!\n * Copyright 2019 SmugMug, Inc.\n * Licensed under the terms of the MIT license. Please see LICENSE file in the project root for terms.\n * @license\n */\n\n\nvar merge = __webpack_require__(7),\n Row = __webpack_require__(10);\n/**\n * Create a new, empty row.\n *\n * @method createNewRow\n * @param layoutConfig {Object} The layout configuration\n * @param layoutData {Object} The current state of the layout\n * @return A new, empty row of the type specified by this layout.\n */\n\n\nfunction createNewRow(layoutConfig, layoutData) {\n var isBreakoutRow; // Work out if this is a full width breakout row\n\n if (layoutConfig.fullWidthBreakoutRowCadence !== false) {\n if ((layoutData._rows.length + 1) % layoutConfig.fullWidthBreakoutRowCadence === 0) {\n isBreakoutRow = true;\n }\n }\n\n return new Row({\n top: layoutData._containerHeight,\n left: layoutConfig.containerPadding.left,\n width: layoutConfig.containerWidth - layoutConfig.containerPadding.left - layoutConfig.containerPadding.right,\n spacing: layoutConfig.boxSpacing.horizontal,\n targetRowHeight: layoutConfig.targetRowHeight,\n targetRowHeightTolerance: layoutConfig.targetRowHeightTolerance,\n edgeCaseMinRowHeight: 0.5 * layoutConfig.targetRowHeight,\n edgeCaseMaxRowHeight: 2 * layoutConfig.targetRowHeight,\n rightToLeft: false,\n isBreakoutRow: isBreakoutRow,\n widowLayoutStyle: layoutConfig.widowLayoutStyle\n });\n}\n/**\n * Add a completed row to the layout.\n * Note: the row must have already been completed.\n *\n * @method addRow\n * @param layoutConfig {Object} The layout configuration\n * @param layoutData {Object} The current state of the layout\n * @param row {Row} The row to add.\n * @return {Array} Each item added to the row.\n */\n\n\nfunction addRow(layoutConfig, layoutData, row) {\n layoutData._rows.push(row);\n\n layoutData._layoutItems = layoutData._layoutItems.concat(row.getItems()); // Increment the container height\n\n layoutData._containerHeight += row.height + layoutConfig.boxSpacing.vertical;\n return row.items;\n}\n/**\n * Calculate the current layout for all items in the list that require layout.\n * \"Layout\" means geometry: position within container and size\n *\n * @method computeLayout\n * @param layoutConfig {Object} The layout configuration\n * @param layoutData {Object} The current state of the layout\n * @param itemLayoutData {Array} Array of items to lay out, with data required to lay out each item\n * @return {Object} The newly-calculated layout, containing the new container height, and lists of layout items\n */\n\n\nfunction computeLayout(layoutConfig, layoutData, itemLayoutData) {\n var laidOutItems = [],\n itemAdded,\n currentRow,\n nextToLastRowHeight; // Apply forced aspect ratio if specified, and set a flag.\n\n if (layoutConfig.forceAspectRatio) {\n itemLayoutData.forEach(function (itemData) {\n itemData.forcedAspectRatio = true;\n itemData.aspectRatio = layoutConfig.forceAspectRatio;\n });\n } // Loop through the items\n\n\n itemLayoutData.some(function (itemData, i) {\n if (isNaN(itemData.aspectRatio)) {\n throw new Error(\"Item \" + i + \" has an invalid aspect ratio\");\n } // If not currently building up a row, make a new one.\n\n\n if (!currentRow) {\n currentRow = createNewRow(layoutConfig, layoutData);\n } // Attempt to add item to the current row.\n\n\n itemAdded = currentRow.addItem(itemData);\n\n if (currentRow.isLayoutComplete()) {\n // Row is filled; add it and start a new one\n laidOutItems = laidOutItems.concat(addRow(layoutConfig, layoutData, currentRow));\n\n if (layoutData._rows.length >= layoutConfig.maxNumRows) {\n currentRow = null;\n return true;\n }\n\n currentRow = createNewRow(layoutConfig, layoutData); // Item was rejected; add it to its own row\n\n if (!itemAdded) {\n itemAdded = currentRow.addItem(itemData);\n\n if (currentRow.isLayoutComplete()) {\n // If the rejected item fills a row on its own, add the row and start another new one\n laidOutItems = laidOutItems.concat(addRow(layoutConfig, layoutData, currentRow));\n\n if (layoutData._rows.length >= layoutConfig.maxNumRows) {\n currentRow = null;\n return true;\n }\n\n currentRow = createNewRow(layoutConfig, layoutData);\n }\n }\n }\n }); // Handle any leftover content (orphans) depending on where they lie\n // in this layout update, and in the total content set.\n\n if (currentRow && currentRow.getItems().length && layoutConfig.showWidows) {\n // Last page of all content or orphan suppression is suppressed; lay out orphans.\n if (layoutData._rows.length) {\n // Only Match previous row's height if it exists and it isn't a breakout row\n if (layoutData._rows[layoutData._rows.length - 1].isBreakoutRow) {\n nextToLastRowHeight = layoutData._rows[layoutData._rows.length - 1].targetRowHeight;\n } else {\n nextToLastRowHeight = layoutData._rows[layoutData._rows.length - 1].height;\n }\n\n currentRow.forceComplete(false, nextToLastRowHeight);\n } else {\n // ...else use target height if there is no other row height to reference.\n currentRow.forceComplete(false);\n }\n\n laidOutItems = laidOutItems.concat(addRow(layoutConfig, layoutData, currentRow));\n layoutConfig._widowCount = currentRow.getItems().length;\n } // We need to clean up the bottom container padding\n // First remove the height added for box spacing\n\n\n layoutData._containerHeight = layoutData._containerHeight - layoutConfig.boxSpacing.vertical; // Then add our bottom container padding\n\n layoutData._containerHeight = layoutData._containerHeight + layoutConfig.containerPadding.bottom;\n return {\n containerHeight: layoutData._containerHeight,\n widowCount: layoutConfig._widowCount,\n boxes: layoutData._layoutItems\n };\n}\n/**\n * Takes in a bunch of box data and config. Returns\n * geometry to lay them out in a justified view.\n *\n * @method covertSizesToAspectRatios\n * @param sizes {Array} Array of objects with widths and heights\n * @return {Array} A list of aspect ratios\n */\n\n\nmodule.exports = function (input, config) {\n var layoutConfig = {};\n var layoutData = {}; // Defaults\n\n var defaults = {\n containerWidth: 1060,\n containerPadding: 10,\n boxSpacing: 10,\n targetRowHeight: 320,\n targetRowHeightTolerance: 0.25,\n maxNumRows: Number.POSITIVE_INFINITY,\n forceAspectRatio: false,\n showWidows: true,\n fullWidthBreakoutRowCadence: false,\n widowLayoutStyle: 'left'\n };\n var containerPadding = {};\n var boxSpacing = {};\n config = config || {}; // Merge defaults and config passed in\n\n layoutConfig = merge(defaults, config); // Sort out padding and spacing values\n\n containerPadding.top = !isNaN(parseFloat(layoutConfig.containerPadding.top)) ? layoutConfig.containerPadding.top : layoutConfig.containerPadding;\n containerPadding.right = !isNaN(parseFloat(layoutConfig.containerPadding.right)) ? layoutConfig.containerPadding.right : layoutConfig.containerPadding;\n containerPadding.bottom = !isNaN(parseFloat(layoutConfig.containerPadding.bottom)) ? layoutConfig.containerPadding.bottom : layoutConfig.containerPadding;\n containerPadding.left = !isNaN(parseFloat(layoutConfig.containerPadding.left)) ? layoutConfig.containerPadding.left : layoutConfig.containerPadding;\n boxSpacing.horizontal = !isNaN(parseFloat(layoutConfig.boxSpacing.horizontal)) ? layoutConfig.boxSpacing.horizontal : layoutConfig.boxSpacing;\n boxSpacing.vertical = !isNaN(parseFloat(layoutConfig.boxSpacing.vertical)) ? layoutConfig.boxSpacing.vertical : layoutConfig.boxSpacing;\n layoutConfig.containerPadding = containerPadding;\n layoutConfig.boxSpacing = boxSpacing; // Local\n\n layoutData._layoutItems = [];\n layoutData._awakeItems = [];\n layoutData._inViewportItems = [];\n layoutData._leadingOrphans = [];\n layoutData._trailingOrphans = [];\n layoutData._containerHeight = layoutConfig.containerPadding.top;\n layoutData._rows = [];\n layoutData._orphans = [];\n layoutConfig._widowCount = 0; // Convert widths and heights to aspect ratios if we need to\n\n return computeLayout(layoutConfig, layoutData, input.map(function (item) {\n if (item.width && item.height) {\n return {\n aspectRatio: item.width / item.height\n };\n } else {\n return {\n aspectRatio: item\n };\n }\n }));\n};\n\n/***/ }),\n/* 10 */\n/***/ (function(module, exports, __webpack_require__) {\n\n/*!\n * Copyright 2019 SmugMug, Inc.\n * Licensed under the terms of the MIT license. Please see LICENSE file in the project root for terms.\n * @license\n */\nvar merge = __webpack_require__(7);\n/**\n * Row\n * Wrapper for each row in a justified layout.\n * Stores relevant values and provides methods for calculating layout of individual rows.\n *\n * @param {Object} layoutConfig - The same as that passed\n * @param {Object} Initialization parameters. The following are all required:\n * @param params.top {Number} Top of row, relative to container\n * @param params.left {Number} Left side of row relative to container (equal to container left padding)\n * @param params.width {Number} Width of row, not including container padding\n * @param params.spacing {Number} Horizontal spacing between items\n * @param params.targetRowHeight {Number} Layout algorithm will aim for this row height\n * @param params.targetRowHeightTolerance {Number} Row heights may vary +/- (`targetRowHeight` x `targetRowHeightTolerance`)\n * @param params.edgeCaseMinRowHeight {Number} Absolute minimum row height for edge cases that cannot be resolved within tolerance.\n * @param params.edgeCaseMaxRowHeight {Number} Absolute maximum row height for edge cases that cannot be resolved within tolerance.\n * @param params.isBreakoutRow {Boolean} Is this row in particular one of those breakout rows? Always false if it's not that kind of photo list\n * @param params.widowLayoutStyle {String} If widows are visible, how should they be laid out?\n * @constructor\n */\n\n\nvar Row = module.exports = function (params) {\n // Top of row, relative to container\n this.top = params.top; // Left side of row relative to container (equal to container left padding)\n\n this.left = params.left; // Width of row, not including container padding\n\n this.width = params.width; // Horizontal spacing between items\n\n this.spacing = params.spacing; // Row height calculation values\n\n this.targetRowHeight = params.targetRowHeight;\n this.targetRowHeightTolerance = params.targetRowHeightTolerance;\n this.minAspectRatio = this.width / params.targetRowHeight * (1 - params.targetRowHeightTolerance);\n this.maxAspectRatio = this.width / params.targetRowHeight * (1 + params.targetRowHeightTolerance); // Edge case row height minimum/maximum\n\n this.edgeCaseMinRowHeight = params.edgeCaseMinRowHeight;\n this.edgeCaseMaxRowHeight = params.edgeCaseMaxRowHeight; // Widow layout direction\n\n this.widowLayoutStyle = params.widowLayoutStyle; // Full width breakout rows\n\n this.isBreakoutRow = params.isBreakoutRow; // Store layout data for each item in row\n\n this.items = []; // Height remains at 0 until it's been calculated\n\n this.height = 0;\n};\n\nRow.prototype = {\n /**\n * Attempt to add a single item to the row.\n * This is the heart of the justified algorithm.\n * This method is direction-agnostic; it deals only with sizes, not positions.\n *\n * If the item fits in the row, without pushing row height beyond min/max tolerance,\n * the item is added and the method returns true.\n *\n * If the item leaves row height too high, there may be room to scale it down and add another item.\n * In this case, the item is added and the method returns true, but the row is incomplete.\n *\n * If the item leaves row height too short, there are too many items to fit within tolerance.\n * The method will either accept or reject the new item, favoring the resulting row height closest to within tolerance.\n * If the item is rejected, left/right padding will be required to fit the row height within tolerance;\n * if the item is accepted, top/bottom cropping will be required to fit the row height within tolerance.\n *\n * @method addItem\n * @param itemData {Object} Item layout data, containing item aspect ratio.\n * @return {Boolean} True if successfully added; false if rejected.\n */\n addItem: function addItem(itemData) {\n var newItems = this.items.concat(itemData),\n // Calculate aspect ratios for items only; exclude spacing\n rowWidthWithoutSpacing = this.width - (newItems.length - 1) * this.spacing,\n newAspectRatio = newItems.reduce(function (sum, item) {\n return sum + item.aspectRatio;\n }, 0),\n targetAspectRatio = rowWidthWithoutSpacing / this.targetRowHeight,\n previousRowWidthWithoutSpacing,\n previousAspectRatio,\n previousTargetAspectRatio; // Handle big full-width breakout photos if we're doing them\n\n if (this.isBreakoutRow) {\n // Only do it if there's no other items in this row\n if (this.items.length === 0) {\n // Only go full width if this photo is a square or landscape\n if (itemData.aspectRatio >= 1) {\n // Close out the row with a full width photo\n this.items.push(itemData);\n this.completeLayout(rowWidthWithoutSpacing / itemData.aspectRatio, 'justify');\n return true;\n }\n }\n }\n\n if (newAspectRatio < this.minAspectRatio) {\n // New aspect ratio is too narrow / scaled row height is too tall.\n // Accept this item and leave row open for more items.\n this.items.push(merge(itemData));\n return true;\n } else if (newAspectRatio > this.maxAspectRatio) {\n // New aspect ratio is too wide / scaled row height will be too short.\n // Accept item if the resulting aspect ratio is closer to target than it would be without the item.\n // NOTE: Any row that falls into this block will require cropping/padding on individual items.\n if (this.items.length === 0) {\n // When there are no existing items, force acceptance of the new item and complete the layout.\n // This is the pano special case.\n this.items.push(merge(itemData));\n this.completeLayout(rowWidthWithoutSpacing / newAspectRatio, 'justify');\n return true;\n } // Calculate width/aspect ratio for row before adding new item\n\n\n previousRowWidthWithoutSpacing = this.width - (this.items.length - 1) * this.spacing;\n previousAspectRatio = this.items.reduce(function (sum, item) {\n return sum + item.aspectRatio;\n }, 0);\n previousTargetAspectRatio = previousRowWidthWithoutSpacing / this.targetRowHeight;\n\n if (Math.abs(newAspectRatio - targetAspectRatio) > Math.abs(previousAspectRatio - previousTargetAspectRatio)) {\n // Row with new item is us farther away from target than row without; complete layout and reject item.\n this.completeLayout(previousRowWidthWithoutSpacing / previousAspectRatio, 'justify');\n return false;\n } else {\n // Row with new item is us closer to target than row without;\n // accept the new item and complete the row layout.\n this.items.push(merge(itemData));\n this.completeLayout(rowWidthWithoutSpacing / newAspectRatio, 'justify');\n return true;\n }\n } else {\n // New aspect ratio / scaled row height is within tolerance;\n // accept the new item and complete the row layout.\n this.items.push(merge(itemData));\n this.completeLayout(rowWidthWithoutSpacing / newAspectRatio, 'justify');\n return true;\n }\n },\n\n /**\n * Check if a row has completed its layout.\n *\n * @method isLayoutComplete\n * @return {Boolean} True if complete; false if not.\n */\n isLayoutComplete: function isLayoutComplete() {\n return this.height > 0;\n },\n\n /**\n * Set row height and compute item geometry from that height.\n * Will justify items within the row unless instructed not to.\n *\n * @method completeLayout\n * @param newHeight {Number} Set row height to this value.\n * @param widowLayoutStyle {String} How should widows display? Supported: left | justify | center\n */\n completeLayout: function completeLayout(newHeight, widowLayoutStyle) {\n var itemWidthSum = this.left,\n rowWidthWithoutSpacing = this.width - (this.items.length - 1) * this.spacing,\n clampedToNativeRatio,\n clampedHeight,\n errorWidthPerItem,\n roundedCumulativeErrors,\n singleItemGeometry,\n centerOffset; // Justify unless explicitly specified otherwise.\n\n if (typeof widowLayoutStyle === 'undefined' || ['justify', 'center', 'left'].indexOf(widowLayoutStyle) < 0) {\n widowLayoutStyle = 'left';\n } // Clamp row height to edge case minimum/maximum.\n\n\n clampedHeight = Math.max(this.edgeCaseMinRowHeight, Math.min(newHeight, this.edgeCaseMaxRowHeight));\n\n if (newHeight !== clampedHeight) {\n // If row height was clamped, the resulting row/item aspect ratio will be off,\n // so force it to fit the width (recalculate aspectRatio to match clamped height).\n // NOTE: this will result in cropping/padding commensurate to the amount of clamping.\n this.height = clampedHeight;\n clampedToNativeRatio = rowWidthWithoutSpacing / clampedHeight / (rowWidthWithoutSpacing / newHeight);\n } else {\n // If not clamped, leave ratio at 1.0.\n this.height = newHeight;\n clampedToNativeRatio = 1.0;\n } // Compute item geometry based on newHeight.\n\n\n this.items.forEach(function (item) {\n item.top = this.top;\n item.width = item.aspectRatio * this.height * clampedToNativeRatio;\n item.height = this.height; // Left-to-right.\n // TODO right to left\n // item.left = this.width - itemWidthSum - item.width;\n\n item.left = itemWidthSum; // Increment width.\n\n itemWidthSum += item.width + this.spacing;\n }, this); // If specified, ensure items fill row and distribute error\n // caused by rounding width and height across all items.\n\n if (widowLayoutStyle === 'justify') {\n itemWidthSum -= this.spacing + this.left;\n errorWidthPerItem = (itemWidthSum - this.width) / this.items.length;\n roundedCumulativeErrors = this.items.map(function (item, i) {\n return Math.round((i + 1) * errorWidthPerItem);\n });\n\n if (this.items.length === 1) {\n // For rows with only one item, adjust item width to fill row.\n singleItemGeometry = this.items[0];\n singleItemGeometry.width -= Math.round(errorWidthPerItem);\n } else {\n // For rows with multiple items, adjust item width and shift items to fill the row,\n // while maintaining equal spacing between items in the row.\n this.items.forEach(function (item, i) {\n if (i > 0) {\n item.left -= roundedCumulativeErrors[i - 1];\n item.width -= roundedCumulativeErrors[i] - roundedCumulativeErrors[i - 1];\n } else {\n item.width -= roundedCumulativeErrors[i];\n }\n });\n }\n } else if (widowLayoutStyle === 'center') {\n // Center widows\n centerOffset = (this.width - itemWidthSum) / 2;\n this.items.forEach(function (item) {\n item.left += centerOffset + this.spacing;\n }, this);\n }\n },\n\n /**\n * Force completion of row layout with current items.\n *\n * @method forceComplete\n * @param fitToWidth {Boolean} Stretch current items to fill the row width.\n * This will likely result in padding.\n * @param fitToWidth {Number}\n */\n forceComplete: function forceComplete(fitToWidth, rowHeight) {\n // TODO Handle fitting to width\n // var rowWidthWithoutSpacing = this.width - (this.items.length - 1) * this.spacing,\n // \tcurrentAspectRatio = this.items.reduce(function (sum, item) {\n // \t\treturn sum + item.aspectRatio;\n // \t}, 0);\n if (typeof rowHeight === 'number') {\n this.completeLayout(rowHeight, this.widowLayoutStyle);\n } else {\n // Complete using target row height.\n this.completeLayout(this.targetRowHeight, this.widowLayoutStyle);\n }\n },\n\n /**\n * Return layout data for items within row.\n * Note: returns actual list, not a copy.\n *\n * @method getItems\n * @return Layout data for items within row.\n */\n getItems: function getItems() {\n return this.items;\n }\n};\n\n/***/ })\n/******/ ]);"]}
|
class-visual-portfolio.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* Plugin Name: Visual Portfolio
|
4 |
* Description: Portfolio post type with visual editor
|
5 |
-
* Version: 2.
|
6 |
* Author: nK
|
7 |
* Author URI: https://nkdev.info
|
8 |
* License: GPLv2 or later
|
@@ -263,10 +263,12 @@ class Visual_Portfolio {
|
|
263 |
*/
|
264 |
public function include_template_style( $handle, $template_name, $deps = array(), $ver = false, $media = 'all' ) {
|
265 |
$template = $this->find_template_styles( $template_name );
|
|
|
266 |
|
267 |
// maybe find minified style.
|
268 |
if ( ! $template ) {
|
269 |
$template = $this->find_template_styles( $template_name . '.min' );
|
|
|
270 |
}
|
271 |
|
272 |
// Allow 3rd party plugin filter template file from their plugin.
|
@@ -274,6 +276,11 @@ class Visual_Portfolio {
|
|
274 |
|
275 |
if ( $template ) {
|
276 |
wp_enqueue_style( $handle, $template, $deps, $ver, $media );
|
|
|
|
|
|
|
|
|
|
|
277 |
}
|
278 |
}
|
279 |
|
2 |
/**
|
3 |
* Plugin Name: Visual Portfolio
|
4 |
* Description: Portfolio post type with visual editor
|
5 |
+
* Version: 2.2.0
|
6 |
* Author: nK
|
7 |
* Author URI: https://nkdev.info
|
8 |
* License: GPLv2 or later
|
263 |
*/
|
264 |
public function include_template_style( $handle, $template_name, $deps = array(), $ver = false, $media = 'all' ) {
|
265 |
$template = $this->find_template_styles( $template_name );
|
266 |
+
$is_min = false;
|
267 |
|
268 |
// maybe find minified style.
|
269 |
if ( ! $template ) {
|
270 |
$template = $this->find_template_styles( $template_name . '.min' );
|
271 |
+
$is_min = true;
|
272 |
}
|
273 |
|
274 |
// Allow 3rd party plugin filter template file from their plugin.
|
276 |
|
277 |
if ( $template ) {
|
278 |
wp_enqueue_style( $handle, $template, $deps, $ver, $media );
|
279 |
+
wp_style_add_data( $handle, 'rtl', 'replace' );
|
280 |
+
|
281 |
+
if ( $template ) {
|
282 |
+
wp_style_add_data( $handle, 'suffix', '.min' );
|
283 |
+
}
|
284 |
}
|
285 |
}
|
286 |
|
classes/class-admin.php
CHANGED
@@ -37,9 +37,11 @@ class Visual_Portfolio_Admin {
|
|
37 |
'nonce' => wp_create_nonce( 'vp-ajax-nonce' ),
|
38 |
);
|
39 |
|
40 |
-
wp_enqueue_script( 'visual-portfolio-admin', visual_portfolio()->plugin_url . 'assets/admin/js/script.min.js', array( 'jquery', 'wp-data' ), '2.
|
41 |
-
wp_enqueue_style( 'visual-portfolio-admin', visual_portfolio()->plugin_url . 'assets/admin/css/style.min.css', '', '2.1.0' );
|
42 |
wp_localize_script( 'visual-portfolio-admin', 'VPAdminVariables', $data_init );
|
|
|
|
|
|
|
43 |
}
|
44 |
|
45 |
/**
|
@@ -51,8 +53,10 @@ class Visual_Portfolio_Admin {
|
|
51 |
);
|
52 |
|
53 |
if ( 'vp_lists' === get_post_type() ) {
|
54 |
-
wp_enqueue_script( 'visual-portfolio-saved-layouts', visual_portfolio()->plugin_url . 'gutenberg/layouts-editor.min.js', array( 'jquery' ), '2.
|
55 |
-
wp_enqueue_style( 'visual-portfolio-saved-layouts', visual_portfolio()->plugin_url . 'gutenberg/layouts-editor.min.css', '', '2.
|
|
|
|
|
56 |
|
57 |
$block_data = Visual_Portfolio_Get::get_options( array( 'id' => get_the_ID() ) );
|
58 |
|
@@ -1112,8 +1116,9 @@ class Visual_Portfolio_Admin {
|
|
1112 |
'type' => 'gallery',
|
1113 |
'name' => 'images',
|
1114 |
'setup_wizard' => true,
|
|
|
1115 |
'image_controls' => array(
|
1116 |
-
'title'
|
1117 |
'type' => 'text',
|
1118 |
'label' => esc_html__( 'Title', 'visual-portfolio' ),
|
1119 |
'condition' => array(
|
@@ -1135,13 +1140,13 @@ class Visual_Portfolio_Admin {
|
|
1135 |
),
|
1136 |
),
|
1137 |
),
|
1138 |
-
'categories'
|
1139 |
'type' => 'select',
|
1140 |
'label' => esc_html__( 'Categories', 'visual-portfolio' ),
|
1141 |
'multiple' => true,
|
1142 |
'creatable' => true,
|
1143 |
),
|
1144 |
-
'format'
|
1145 |
'type' => 'select',
|
1146 |
'label' => esc_html__( 'Format', 'visual-portfolio' ),
|
1147 |
'default' => 'standard',
|
@@ -1150,7 +1155,7 @@ class Visual_Portfolio_Admin {
|
|
1150 |
'video' => esc_html__( 'Video', 'visual-portfolio' ),
|
1151 |
),
|
1152 |
),
|
1153 |
-
'video_url'
|
1154 |
'type' => 'text',
|
1155 |
'label' => esc_html__( 'Video URL', 'visual-portfolio' ),
|
1156 |
'placeholder' => esc_html__( 'https://...', 'visual-portfolio' ),
|
@@ -1161,7 +1166,7 @@ class Visual_Portfolio_Admin {
|
|
1161 |
),
|
1162 |
),
|
1163 |
),
|
1164 |
-
'url'
|
1165 |
'type' => 'text',
|
1166 |
'label' => esc_html__( 'URL', 'visual-portfolio' ),
|
1167 |
'description' => esc_html__( 'By default used full image url, you can use custom one', 'visual-portfolio' ),
|
@@ -1172,7 +1177,7 @@ class Visual_Portfolio_Admin {
|
|
1172 |
'label' => esc_html__( 'Author Name', 'visual-portfolio' ),
|
1173 |
'default' => '',
|
1174 |
),
|
1175 |
-
'author_url'
|
1176 |
'type' => 'text',
|
1177 |
'label' => esc_html__( 'Author URL', 'visual-portfolio' ),
|
1178 |
'default' => '',
|
37 |
'nonce' => wp_create_nonce( 'vp-ajax-nonce' ),
|
38 |
);
|
39 |
|
40 |
+
wp_enqueue_script( 'visual-portfolio-admin', visual_portfolio()->plugin_url . 'assets/admin/js/script.min.js', array( 'jquery', 'wp-data' ), '2.2.0', true );
|
|
|
41 |
wp_localize_script( 'visual-portfolio-admin', 'VPAdminVariables', $data_init );
|
42 |
+
wp_enqueue_style( 'visual-portfolio-admin', visual_portfolio()->plugin_url . 'assets/admin/css/style.min.css', '', '2.2.0' );
|
43 |
+
wp_style_add_data( 'visual-portfolio-admin', 'rtl', 'replace' );
|
44 |
+
wp_style_add_data( 'visual-portfolio-admin', 'suffix', '.min' );
|
45 |
}
|
46 |
|
47 |
/**
|
53 |
);
|
54 |
|
55 |
if ( 'vp_lists' === get_post_type() ) {
|
56 |
+
wp_enqueue_script( 'visual-portfolio-saved-layouts', visual_portfolio()->plugin_url . 'gutenberg/layouts-editor.min.js', array( 'jquery' ), '2.2.0', true );
|
57 |
+
wp_enqueue_style( 'visual-portfolio-saved-layouts', visual_portfolio()->plugin_url . 'gutenberg/layouts-editor.min.css', '', '2.2.0' );
|
58 |
+
wp_style_add_data( 'visual-portfolio-saved-layouts', 'rtl', 'replace' );
|
59 |
+
wp_style_add_data( 'visual-portfolio-saved-layouts', 'suffix', '.min' );
|
60 |
|
61 |
$block_data = Visual_Portfolio_Get::get_options( array( 'id' => get_the_ID() ) );
|
62 |
|
1116 |
'type' => 'gallery',
|
1117 |
'name' => 'images',
|
1118 |
'setup_wizard' => true,
|
1119 |
+
'focal_point' => true,
|
1120 |
'image_controls' => array(
|
1121 |
+
'title' => array(
|
1122 |
'type' => 'text',
|
1123 |
'label' => esc_html__( 'Title', 'visual-portfolio' ),
|
1124 |
'condition' => array(
|
1140 |
),
|
1141 |
),
|
1142 |
),
|
1143 |
+
'categories' => array(
|
1144 |
'type' => 'select',
|
1145 |
'label' => esc_html__( 'Categories', 'visual-portfolio' ),
|
1146 |
'multiple' => true,
|
1147 |
'creatable' => true,
|
1148 |
),
|
1149 |
+
'format' => array(
|
1150 |
'type' => 'select',
|
1151 |
'label' => esc_html__( 'Format', 'visual-portfolio' ),
|
1152 |
'default' => 'standard',
|
1155 |
'video' => esc_html__( 'Video', 'visual-portfolio' ),
|
1156 |
),
|
1157 |
),
|
1158 |
+
'video_url' => array(
|
1159 |
'type' => 'text',
|
1160 |
'label' => esc_html__( 'Video URL', 'visual-portfolio' ),
|
1161 |
'placeholder' => esc_html__( 'https://...', 'visual-portfolio' ),
|
1166 |
),
|
1167 |
),
|
1168 |
),
|
1169 |
+
'url' => array(
|
1170 |
'type' => 'text',
|
1171 |
'label' => esc_html__( 'URL', 'visual-portfolio' ),
|
1172 |
'description' => esc_html__( 'By default used full image url, you can use custom one', 'visual-portfolio' ),
|
1177 |
'label' => esc_html__( 'Author Name', 'visual-portfolio' ),
|
1178 |
'default' => '',
|
1179 |
),
|
1180 |
+
'author_url' => array(
|
1181 |
'type' => 'text',
|
1182 |
'label' => esc_html__( 'Author URL', 'visual-portfolio' ),
|
1183 |
'default' => '',
|
classes/class-assets.php
CHANGED
@@ -241,17 +241,15 @@ class Visual_Portfolio_Assets {
|
|
241 |
}
|
242 |
|
243 |
// Dynamic styles.
|
244 |
-
|
|
|
|
|
245 |
|
246 |
-
|
247 |
-
|
|
|
248 |
|
249 |
-
|
250 |
-
wp_enqueue_style( $controls_css_handle );
|
251 |
-
wp_add_inline_style( $controls_css_handle, $dynamic_styles );
|
252 |
-
|
253 |
-
self::store_used_assets( $controls_css_handle, true, 'style' );
|
254 |
-
}
|
255 |
|
256 |
do_action( 'vpf_after_assets_enqueue', $options, $options['id'] );
|
257 |
}
|
@@ -294,7 +292,7 @@ class Visual_Portfolio_Assets {
|
|
294 |
|
295 |
// fjGallery.
|
296 |
if ( apply_filters( 'vpf_enqueue_plugin_flickr_justified_gallery', true ) ) {
|
297 |
-
wp_register_script( 'flickr-justified-gallery', visual_portfolio()->plugin_url . 'assets/vendor/flickr-justified-gallery/fjGallery.min.js', array( 'jquery' ), '1.0.
|
298 |
}
|
299 |
|
300 |
// Object Fit Images.
|
@@ -371,7 +369,9 @@ class Visual_Portfolio_Assets {
|
|
371 |
);
|
372 |
|
373 |
foreach ( $vp_styles as $name => $data ) {
|
374 |
-
wp_register_style( $name, visual_portfolio()->plugin_url . $data[0], $data[1], '2.
|
|
|
|
|
375 |
}
|
376 |
|
377 |
// Visual Portfolio JS.
|
@@ -477,7 +477,7 @@ class Visual_Portfolio_Assets {
|
|
477 |
);
|
478 |
|
479 |
foreach ( $vp_scripts as $name => $data ) {
|
480 |
-
wp_register_script( $name, visual_portfolio()->plugin_url . $data[0], $data[1], '2.
|
481 |
}
|
482 |
|
483 |
do_action( 'vpf_after_assets_register' );
|
241 |
}
|
242 |
|
243 |
// Dynamic styles.
|
244 |
+
// Always add it even if no custom CSS available to better render dynamic styles in preview.
|
245 |
+
$dynamic_styles = Visual_Portfolio_Controls_Dynamic_CSS::get( $options );
|
246 |
+
$controls_css_handle = 'vp-dynamic-styles-' . $options['id'];
|
247 |
|
248 |
+
wp_register_style( $controls_css_handle, false, array(), '2.2.0' );
|
249 |
+
wp_enqueue_style( $controls_css_handle );
|
250 |
+
wp_add_inline_style( $controls_css_handle, $dynamic_styles ? $dynamic_styles : ' ' );
|
251 |
|
252 |
+
self::store_used_assets( $controls_css_handle, true, 'style' );
|
|
|
|
|
|
|
|
|
|
|
253 |
|
254 |
do_action( 'vpf_after_assets_enqueue', $options, $options['id'] );
|
255 |
}
|
292 |
|
293 |
// fjGallery.
|
294 |
if ( apply_filters( 'vpf_enqueue_plugin_flickr_justified_gallery', true ) ) {
|
295 |
+
wp_register_script( 'flickr-justified-gallery', visual_portfolio()->plugin_url . 'assets/vendor/flickr-justified-gallery/fjGallery.min.js', array( 'jquery' ), '1.0.3', true );
|
296 |
}
|
297 |
|
298 |
// Object Fit Images.
|
369 |
);
|
370 |
|
371 |
foreach ( $vp_styles as $name => $data ) {
|
372 |
+
wp_register_style( $name, visual_portfolio()->plugin_url . $data[0], $data[1], '2.2.0' );
|
373 |
+
wp_style_add_data( $name, 'rtl', 'replace' );
|
374 |
+
wp_style_add_data( $name, 'suffix', '.min' );
|
375 |
}
|
376 |
|
377 |
// Visual Portfolio JS.
|
477 |
);
|
478 |
|
479 |
foreach ( $vp_scripts as $name => $data ) {
|
480 |
+
wp_register_script( $name, visual_portfolio()->plugin_url . $data[0], $data[1], '2.2.0', true );
|
481 |
}
|
482 |
|
483 |
do_action( 'vpf_after_assets_register' );
|
classes/class-controls.php
CHANGED
@@ -71,6 +71,8 @@ class Visual_Portfolio_Controls {
|
|
71 |
'code_placeholder' => '',
|
72 |
// elements selector.
|
73 |
'locations' => array(),
|
|
|
|
|
74 |
|
75 |
// hint.
|
76 |
'hint' => false,
|
71 |
'code_placeholder' => '',
|
72 |
// elements selector.
|
73 |
'locations' => array(),
|
74 |
+
// gallery.
|
75 |
+
'focal_point' => false,
|
76 |
|
77 |
// hint.
|
78 |
'hint' => false,
|
classes/class-custom-post-meta.php
CHANGED
@@ -19,6 +19,7 @@ class Visual_Portfolio_Custom_Post_Meta {
|
|
19 |
public static function init() {
|
20 |
// add post formats.
|
21 |
add_action( 'after_setup_theme', array( __CLASS__, 'add_video_post_format' ), 99 );
|
|
|
22 |
add_action( 'add_meta_boxes', array( __CLASS__, 'add_post_format_metaboxes' ), 1 );
|
23 |
add_action( 'save_post', array( __CLASS__, 'save_post_format_metaboxes' ) );
|
24 |
add_action( 'save_post', array( __CLASS__, 'update_words_count' ) );
|
@@ -26,23 +27,17 @@ class Visual_Portfolio_Custom_Post_Meta {
|
|
26 |
}
|
27 |
|
28 |
/**
|
29 |
-
*
|
30 |
*
|
31 |
-
* @
|
32 |
*/
|
33 |
-
public static function
|
34 |
-
|
35 |
-
|
|
|
36 |
}
|
37 |
|
38 |
-
|
39 |
-
|
40 |
-
// fallback.
|
41 |
-
if ( ! $video_url ) {
|
42 |
-
$video_url = get_post_meta( $post_id, 'video_url', true );
|
43 |
-
}
|
44 |
-
|
45 |
-
return $video_url;
|
46 |
}
|
47 |
|
48 |
/**
|
@@ -50,6 +45,7 @@ class Visual_Portfolio_Custom_Post_Meta {
|
|
50 |
*/
|
51 |
public static function add_video_post_format() {
|
52 |
global $_wp_theme_features;
|
|
|
53 |
$formats = array( 'video' );
|
54 |
|
55 |
// Add existing formats.
|
@@ -61,22 +57,92 @@ class Visual_Portfolio_Custom_Post_Meta {
|
|
61 |
add_theme_support( 'post-formats', $formats );
|
62 |
}
|
63 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
64 |
/**
|
65 |
* Add post format metaboxes.
|
66 |
*
|
67 |
* @param string $post_type post type.
|
68 |
*/
|
69 |
public static function add_post_format_metaboxes( $post_type ) {
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
);
|
79 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
80 |
}
|
81 |
|
82 |
/**
|
@@ -165,6 +231,50 @@ class Visual_Portfolio_Custom_Post_Meta {
|
|
165 |
}
|
166 |
}
|
167 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
168 |
/**
|
169 |
* Update views count.
|
170 |
*
|
19 |
public static function init() {
|
20 |
// add post formats.
|
21 |
add_action( 'after_setup_theme', array( __CLASS__, 'add_video_post_format' ), 99 );
|
22 |
+
add_action( 'init', array( __CLASS__, 'register_post_meta' ) );
|
23 |
add_action( 'add_meta_boxes', array( __CLASS__, 'add_post_format_metaboxes' ), 1 );
|
24 |
add_action( 'save_post', array( __CLASS__, 'save_post_format_metaboxes' ) );
|
25 |
add_action( 'save_post', array( __CLASS__, 'update_words_count' ) );
|
27 |
}
|
28 |
|
29 |
/**
|
30 |
+
* Check if current page is gutenberg.
|
31 |
*
|
32 |
+
* @return boolean
|
33 |
*/
|
34 |
+
public static function is_gutenberg() {
|
35 |
+
$current_screen = get_current_screen();
|
36 |
+
if ( method_exists( $current_screen, 'is_block_editor' ) && $current_screen->is_block_editor() ) {
|
37 |
+
return true;
|
38 |
}
|
39 |
|
40 |
+
return false;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
41 |
}
|
42 |
|
43 |
/**
|
45 |
*/
|
46 |
public static function add_video_post_format() {
|
47 |
global $_wp_theme_features;
|
48 |
+
|
49 |
$formats = array( 'video' );
|
50 |
|
51 |
// Add existing formats.
|
57 |
add_theme_support( 'post-formats', $formats );
|
58 |
}
|
59 |
|
60 |
+
/**
|
61 |
+
* Register post meta.
|
62 |
+
*/
|
63 |
+
public static function register_post_meta() {
|
64 |
+
$post_type_names = array_keys( get_post_types() );
|
65 |
+
foreach ( $post_type_names as $post_type ) {
|
66 |
+
// Register meta for all post types.
|
67 |
+
register_meta(
|
68 |
+
'post',
|
69 |
+
'_vp_format_video_url',
|
70 |
+
array(
|
71 |
+
'object_subtype' => $post_type,
|
72 |
+
'type' => 'string',
|
73 |
+
'single' => true,
|
74 |
+
'show_in_rest' => true,
|
75 |
+
'auth_callback' => array( __CLASS__, 'rest_auth' ),
|
76 |
+
)
|
77 |
+
);
|
78 |
+
register_meta(
|
79 |
+
'post',
|
80 |
+
'_vp_image_focal_point',
|
81 |
+
array(
|
82 |
+
'object_subtype' => $post_type,
|
83 |
+
'type' => 'object',
|
84 |
+
'single' => true,
|
85 |
+
'show_in_rest' => array(
|
86 |
+
'schema' => array(
|
87 |
+
'type' => 'object',
|
88 |
+
'properties' => array(
|
89 |
+
'x' => array(
|
90 |
+
'type' => 'string',
|
91 |
+
),
|
92 |
+
'y' => array(
|
93 |
+
'type' => 'string',
|
94 |
+
),
|
95 |
+
),
|
96 |
+
),
|
97 |
+
),
|
98 |
+
'auth_callback' => array( __CLASS__, 'rest_auth' ),
|
99 |
+
)
|
100 |
+
);
|
101 |
+
|
102 |
+
// Add support for 'custom-fields' to work in Gutenberg.
|
103 |
+
add_post_type_support( $post_type, 'custom-fields' );
|
104 |
+
}
|
105 |
+
}
|
106 |
+
|
107 |
+
/**
|
108 |
+
* Determines REST API authentication.
|
109 |
+
*
|
110 |
+
* @param bool $allowed Whether it is allowed.
|
111 |
+
* @param string $meta_key The meta key being checked.
|
112 |
+
* @param int $post_id The post ID being checked.
|
113 |
+
* @param int $user_id The user ID being checked.
|
114 |
+
* @param string $cap The current capability.
|
115 |
+
* @param array $caps All capabilities.
|
116 |
+
* @return bool Whether the user can do it.
|
117 |
+
*/
|
118 |
+
public static function rest_auth( $allowed, $meta_key, $post_id, $user_id, $cap, $caps ) {
|
119 |
+
return user_can( $user_id, 'edit_post', $post_id );
|
120 |
+
}
|
121 |
+
|
122 |
/**
|
123 |
* Add post format metaboxes.
|
124 |
*
|
125 |
* @param string $post_type post type.
|
126 |
*/
|
127 |
public static function add_post_format_metaboxes( $post_type ) {
|
128 |
+
// Prevent if Gutenberg enabled.
|
129 |
+
if ( self::is_gutenberg() ) {
|
130 |
+
return;
|
131 |
+
}
|
132 |
+
|
133 |
+
// Prevent if no Video post format supported.
|
134 |
+
if ( ! post_type_supports( $post_type, 'post-formats' ) ) {
|
135 |
+
return;
|
|
|
136 |
}
|
137 |
+
|
138 |
+
add_meta_box(
|
139 |
+
'vp_format_video',
|
140 |
+
esc_html__( 'Video', 'visual-portfolio' ),
|
141 |
+
array( __CLASS__, 'add_video_format_metabox' ),
|
142 |
+
null,
|
143 |
+
'side',
|
144 |
+
'default'
|
145 |
+
);
|
146 |
}
|
147 |
|
148 |
/**
|
231 |
}
|
232 |
}
|
233 |
|
234 |
+
/**
|
235 |
+
* Get video format URL.
|
236 |
+
*
|
237 |
+
* @param int $post_id The post ID.
|
238 |
+
*/
|
239 |
+
public static function get_video_format_url( $post_id ) {
|
240 |
+
if ( ! $post_id ) {
|
241 |
+
$post_id = get_the_ID();
|
242 |
+
}
|
243 |
+
|
244 |
+
$video_url = get_post_meta( $post_id, '_vp_format_video_url', true );
|
245 |
+
|
246 |
+
// fallback.
|
247 |
+
if ( ! $video_url ) {
|
248 |
+
$video_url = get_post_meta( $post_id, 'video_url', true );
|
249 |
+
}
|
250 |
+
|
251 |
+
return $video_url;
|
252 |
+
}
|
253 |
+
|
254 |
+
/**
|
255 |
+
* Get featured image focal point.
|
256 |
+
*
|
257 |
+
* @param int $post_id The post ID.
|
258 |
+
*/
|
259 |
+
public static function get_featured_image_focal_point( $post_id ) {
|
260 |
+
if ( ! $post_id ) {
|
261 |
+
$post_id = get_the_ID();
|
262 |
+
}
|
263 |
+
|
264 |
+
$focal_point = get_post_meta( $post_id, '_vp_image_focal_point', true );
|
265 |
+
|
266 |
+
if (
|
267 |
+
! isset( $focal_point ) ||
|
268 |
+
empty( $focal_point ) ||
|
269 |
+
! isset( $focal_point['x'] ) || ! isset( $focal_point['y'] ) ||
|
270 |
+
( '0.5' === $focal_point['x'] && '0.5' === $focal_point['y'] )
|
271 |
+
) {
|
272 |
+
return null;
|
273 |
+
}
|
274 |
+
|
275 |
+
return $focal_point;
|
276 |
+
}
|
277 |
+
|
278 |
/**
|
279 |
* Update views count.
|
280 |
*
|
classes/class-custom-post-type.php
CHANGED
@@ -42,6 +42,9 @@ class Visual_Portfolio_Custom_Post_Type {
|
|
42 |
add_action( 'classic_editor_enabled_editors_for_post_type', array( $this, 'vp_lists_classic_plugin_force_gutenberg' ), 150, 2 );
|
43 |
add_action( 'use_block_editor_for_post_type', array( $this, 'vp_lists_classic_plugin_force_gutenberg_2' ), 150, 2 );
|
44 |
|
|
|
|
|
|
|
45 |
// highlight admin menu items.
|
46 |
add_action( 'admin_menu', array( $this, 'admin_menu' ), 12 );
|
47 |
|
@@ -241,7 +244,7 @@ class Visual_Portfolio_Custom_Post_Type {
|
|
241 |
if ( ! is_blog_installed() ) {
|
242 |
return;
|
243 |
}
|
244 |
-
if ( get_option( 'visual_portfolio_updated_caps' ) === '2.
|
245 |
return;
|
246 |
}
|
247 |
|
@@ -318,7 +321,7 @@ class Visual_Portfolio_Custom_Post_Type {
|
|
318 |
$wp_roles->add_cap( 'administrator', $cap );
|
319 |
}
|
320 |
|
321 |
-
update_option( 'visual_portfolio_updated_caps', '2.
|
322 |
}
|
323 |
|
324 |
/**
|
@@ -523,6 +526,21 @@ class Visual_Portfolio_Custom_Post_Type {
|
|
523 |
return true;
|
524 |
}
|
525 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
526 |
/**
|
527 |
* Add Admin Page
|
528 |
*/
|
42 |
add_action( 'classic_editor_enabled_editors_for_post_type', array( $this, 'vp_lists_classic_plugin_force_gutenberg' ), 150, 2 );
|
43 |
add_action( 'use_block_editor_for_post_type', array( $this, 'vp_lists_classic_plugin_force_gutenberg_2' ), 150, 2 );
|
44 |
|
45 |
+
// force enable Gutenberg in 'vp_lists' for users with disabled option "Visual Editor".
|
46 |
+
add_filter( 'user_can_richedit', array( $this, 'vp_lists_user_can_richedit_force' ) );
|
47 |
+
|
48 |
// highlight admin menu items.
|
49 |
add_action( 'admin_menu', array( $this, 'admin_menu' ), 12 );
|
50 |
|
244 |
if ( ! is_blog_installed() ) {
|
245 |
return;
|
246 |
}
|
247 |
+
if ( get_option( 'visual_portfolio_updated_caps' ) === '2.2.0' ) {
|
248 |
return;
|
249 |
}
|
250 |
|
321 |
$wp_roles->add_cap( 'administrator', $cap );
|
322 |
}
|
323 |
|
324 |
+
update_option( 'visual_portfolio_updated_caps', '2.2.0' );
|
325 |
}
|
326 |
|
327 |
/**
|
526 |
return true;
|
527 |
}
|
528 |
|
529 |
+
/**
|
530 |
+
* Force enable Gutenberg in 'vp_lists' for users with disabled option "Visual Editor".
|
531 |
+
*
|
532 |
+
* @param boolean $enabled Rich edit enabled.
|
533 |
+
*/
|
534 |
+
public function vp_lists_user_can_richedit_force( $enabled ) {
|
535 |
+
global $post_type;
|
536 |
+
|
537 |
+
if ( isset( $post_type ) && 'vp_lists' !== $post_type ) {
|
538 |
+
return $enabled;
|
539 |
+
}
|
540 |
+
|
541 |
+
return true;
|
542 |
+
}
|
543 |
+
|
544 |
/**
|
545 |
* Add Admin Page
|
546 |
*/
|
classes/class-elementor-widget.php
CHANGED
@@ -20,13 +20,24 @@ class Visual_Portfolio_Elementor_Widget extends \Elementor\Widget_Base {
|
|
20 |
* @param null|array $args default widget args.
|
21 |
*/
|
22 |
public function __construct( $data = array(), $args = null ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
parent::__construct( $data, $args );
|
24 |
|
25 |
if ( $this->is_preview_mode() ) {
|
26 |
wp_register_script( 'iframe-resizer', visual_portfolio()->plugin_url . 'assets/vendor/iframe-resizer/iframeResizer.min.js', '', '4.2.1', true );
|
27 |
-
wp_register_script( 'visual-portfolio-elementor', visual_portfolio()->plugin_url . 'assets/admin/js/elementor.min.js', array( 'elementor-frontend', 'iframe-resizer', 'jquery' ), '2.
|
28 |
|
29 |
-
wp_register_style( 'visual-portfolio-elementor', visual_portfolio()->plugin_url . 'assets/admin/css/elementor.min.css', array(), '2.
|
|
|
|
|
30 |
}
|
31 |
}
|
32 |
|
@@ -140,7 +151,7 @@ class Visual_Portfolio_Elementor_Widget extends \Elementor\Widget_Base {
|
|
140 |
);
|
141 |
|
142 |
$this->add_control(
|
143 |
-
'
|
144 |
array(
|
145 |
'label' => esc_html__( 'Select Layout', 'visual-portfolio' ),
|
146 |
'type' => \Elementor\Controls_Manager::SELECT2,
|
@@ -160,13 +171,14 @@ class Visual_Portfolio_Elementor_Widget extends \Elementor\Widget_Base {
|
|
160 |
protected function render() {
|
161 |
$settings = array_merge(
|
162 |
array(
|
163 |
-
'
|
164 |
-
'class'
|
165 |
),
|
166 |
$this->get_settings()
|
167 |
);
|
168 |
|
169 |
-
|
|
|
170 |
return;
|
171 |
}
|
172 |
|
@@ -175,7 +187,7 @@ class Visual_Portfolio_Elementor_Widget extends \Elementor\Widget_Base {
|
|
175 |
'wrapper',
|
176 |
array(
|
177 |
'class' => 'visual-portfolio-elementor-preview',
|
178 |
-
'data-id' => $settings['
|
179 |
)
|
180 |
);
|
181 |
}
|
@@ -190,7 +202,7 @@ class Visual_Portfolio_Elementor_Widget extends \Elementor\Widget_Base {
|
|
190 |
<?php if ( $this->is_preview_mode() ) : ?>
|
191 |
<iframe allowtransparency="true"></iframe>
|
192 |
<?php else : ?>
|
193 |
-
<?php echo do_shortcode( '[visual_portfolio id="' . esc_attr( $settings['
|
194 |
<?php endif; ?>
|
195 |
</div>
|
196 |
<?php
|
20 |
* @param null|array $args default widget args.
|
21 |
*/
|
22 |
public function __construct( $data = array(), $args = null ) {
|
23 |
+
// Migrate from old 'id' control to new 'saved_id'.
|
24 |
+
if ( isset( $data['settings']['id'] ) ) {
|
25 |
+
if ( $data['settings']['id'] && ( ! isset( $data['settings']['saved_id'] ) || ! $data['settings']['saved_id'] ) ) {
|
26 |
+
$data['settings']['saved_id'] = $data['settings']['id'];
|
27 |
+
}
|
28 |
+
|
29 |
+
unset( $data['settings']['id'] );
|
30 |
+
}
|
31 |
+
|
32 |
parent::__construct( $data, $args );
|
33 |
|
34 |
if ( $this->is_preview_mode() ) {
|
35 |
wp_register_script( 'iframe-resizer', visual_portfolio()->plugin_url . 'assets/vendor/iframe-resizer/iframeResizer.min.js', '', '4.2.1', true );
|
36 |
+
wp_register_script( 'visual-portfolio-elementor', visual_portfolio()->plugin_url . 'assets/admin/js/elementor.min.js', array( 'elementor-frontend', 'iframe-resizer', 'jquery' ), '2.2.0', true );
|
37 |
|
38 |
+
wp_register_style( 'visual-portfolio-elementor', visual_portfolio()->plugin_url . 'assets/admin/css/elementor.min.css', array(), '2.2.0' );
|
39 |
+
wp_style_add_data( 'visual-portfolio-elementor', 'rtl', 'replace' );
|
40 |
+
wp_style_add_data( 'visual-portfolio-elementor', 'suffix', '.min' );
|
41 |
}
|
42 |
}
|
43 |
|
151 |
);
|
152 |
|
153 |
$this->add_control(
|
154 |
+
'saved_id',
|
155 |
array(
|
156 |
'label' => esc_html__( 'Select Layout', 'visual-portfolio' ),
|
157 |
'type' => \Elementor\Controls_Manager::SELECT2,
|
171 |
protected function render() {
|
172 |
$settings = array_merge(
|
173 |
array(
|
174 |
+
'saved_id' => false,
|
175 |
+
'class' => '',
|
176 |
),
|
177 |
$this->get_settings()
|
178 |
);
|
179 |
|
180 |
+
// No saved layout selected.
|
181 |
+
if ( ! $settings['saved_id'] ) {
|
182 |
return;
|
183 |
}
|
184 |
|
187 |
'wrapper',
|
188 |
array(
|
189 |
'class' => 'visual-portfolio-elementor-preview',
|
190 |
+
'data-id' => $settings['saved_id'],
|
191 |
)
|
192 |
);
|
193 |
}
|
202 |
<?php if ( $this->is_preview_mode() ) : ?>
|
203 |
<iframe allowtransparency="true"></iframe>
|
204 |
<?php else : ?>
|
205 |
+
<?php echo do_shortcode( '[visual_portfolio id="' . esc_attr( $settings['saved_id'] ) . '"]' ); ?>
|
206 |
<?php endif; ?>
|
207 |
</div>
|
208 |
<?php
|
classes/class-get-portfolio.php
CHANGED
@@ -557,17 +557,18 @@ class Visual_Portfolio_Get {
|
|
557 |
array_merge(
|
558 |
$each_item_args,
|
559 |
array(
|
560 |
-
'uid'
|
561 |
-
'url'
|
562 |
-
'title'
|
563 |
-
'format'
|
564 |
-
'published_time'
|
565 |
-
'filter'
|
566 |
-
'image_id'
|
567 |
-
'
|
568 |
-
'
|
569 |
-
'
|
570 |
-
'
|
|
|
571 |
)
|
572 |
),
|
573 |
$img
|
@@ -645,6 +646,7 @@ class Visual_Portfolio_Get {
|
|
645 |
'published_time' => get_the_date( 'Y-m-d H:i:s', $the_post ),
|
646 |
'filter' => implode( ',', $filter_values ),
|
647 |
'image_id' => 'attachment' === get_post_type() ? get_the_ID() : get_post_thumbnail_id( get_the_ID() ),
|
|
|
648 |
'categories' => $categories,
|
649 |
'comments_count' => get_comments_number( get_the_ID() ),
|
650 |
'comments_url' => get_comments_link( get_the_ID() ),
|
@@ -1750,9 +1752,16 @@ class Visual_Portfolio_Get {
|
|
1750 |
|
1751 |
// Tag Name.
|
1752 |
$tag_name = $is_posts ? 'article' : 'div';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1753 |
?>
|
1754 |
|
1755 |
-
<<?php echo esc_attr( $tag_name ); ?>
|
1756 |
<?php self::item_popup_data( $args ); ?>
|
1757 |
<figure class="vp-portfolio__item">
|
1758 |
<?php
|
557 |
array_merge(
|
558 |
$each_item_args,
|
559 |
array(
|
560 |
+
'uid' => isset( $img['uid'] ) && $img['uid'] ? $img['uid'] : '',
|
561 |
+
'url' => isset( $img['url'] ) && $img['url'] ? $img['url'] : wp_get_attachment_image_url( $img['id'], $img_size_popup ),
|
562 |
+
'title' => isset( $img['title'] ) && $img['title'] ? $img['title'] : '',
|
563 |
+
'format' => isset( $img['format'] ) && $img['format'] ? $img['format'] : 'standard',
|
564 |
+
'published_time' => isset( $img['published_time'] ) && $img['published_time'] ? $img['published_time'] : '',
|
565 |
+
'filter' => implode( ',', $filter_values ),
|
566 |
+
'image_id' => intval( $img['id'] ),
|
567 |
+
'focal_point' => isset( $img['focalPoint'] ) && $img['focalPoint'] ? $img['focalPoint'] : '',
|
568 |
+
'allow_popup' => ! isset( $img['url'] ) || ! $img['url'],
|
569 |
+
'categories' => $categories,
|
570 |
+
'author' => isset( $img['author'] ) && $img['author'] ? $img['author'] : '',
|
571 |
+
'author_url' => isset( $img['author'] ) && isset( $img['author_url'] ) && $img['author'] && $img['author_url'] ? $img['author_url'] : '',
|
572 |
)
|
573 |
),
|
574 |
$img
|
646 |
'published_time' => get_the_date( 'Y-m-d H:i:s', $the_post ),
|
647 |
'filter' => implode( ',', $filter_values ),
|
648 |
'image_id' => 'attachment' === get_post_type() ? get_the_ID() : get_post_thumbnail_id( get_the_ID() ),
|
649 |
+
'focal_point' => Visual_Portfolio_Custom_Post_Meta::get_featured_image_focal_point( get_the_ID() ),
|
650 |
'categories' => $categories,
|
651 |
'comments_count' => get_comments_number( get_the_ID() ),
|
652 |
'comments_url' => get_comments_link( get_the_ID() ),
|
1752 |
|
1753 |
// Tag Name.
|
1754 |
$tag_name = $is_posts ? 'article' : 'div';
|
1755 |
+
|
1756 |
+
$tag_attributes = 'class="' . esc_attr( $args['class'] ) . '" data-vp-filter="' . esc_attr( $args['filter'] ) . '"';
|
1757 |
+
|
1758 |
+
if ( $args['focal_point'] && ! empty( $args['focal_point'] ) ) {
|
1759 |
+
$tag_attributes .= ' style="--vp-images__object-position: ' . esc_attr( 100 * $args['focal_point']['x'] ) . '% ' . esc_attr( 100 * $args['focal_point']['y'] ) . '%;"';
|
1760 |
+
}
|
1761 |
+
|
1762 |
?>
|
1763 |
|
1764 |
+
<<?php echo esc_attr( $tag_name ); ?> <?php echo $tag_attributes; // phpcs:ignore ?>>
|
1765 |
<?php self::item_popup_data( $args ); ?>
|
1766 |
<figure class="vp-portfolio__item">
|
1767 |
<?php
|
classes/class-gutenberg.php
CHANGED
@@ -160,19 +160,22 @@ class Visual_Portfolio_Gutenberg_Block {
|
|
160 |
* Enqueue script for Gutenberg editor
|
161 |
*/
|
162 |
public function enqueue_block_editor_assets() {
|
|
|
163 |
wp_enqueue_script(
|
164 |
'visual-portfolio-gutenberg',
|
165 |
plugins_url( '../gutenberg/index.min.js', __FILE__ ),
|
166 |
array( 'wp-editor', 'wp-i18n', 'wp-element', 'wp-components', 'jquery' ),
|
167 |
-
'2.
|
168 |
true
|
169 |
);
|
170 |
wp_enqueue_style(
|
171 |
'visual-portfolio-gutenberg',
|
172 |
plugins_url( '../gutenberg/style.min.css', __FILE__ ),
|
173 |
array(),
|
174 |
-
'2.
|
175 |
);
|
|
|
|
|
176 |
|
177 |
wp_localize_script(
|
178 |
'visual-portfolio-gutenberg',
|
@@ -183,6 +186,23 @@ class Visual_Portfolio_Gutenberg_Block {
|
|
183 |
'controls_categories' => Visual_Portfolio_Controls::get_registered_categories(),
|
184 |
)
|
185 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
186 |
}
|
187 |
}
|
188 |
new Visual_Portfolio_Gutenberg_Block();
|
160 |
* Enqueue script for Gutenberg editor
|
161 |
*/
|
162 |
public function enqueue_block_editor_assets() {
|
163 |
+
// Block.
|
164 |
wp_enqueue_script(
|
165 |
'visual-portfolio-gutenberg',
|
166 |
plugins_url( '../gutenberg/index.min.js', __FILE__ ),
|
167 |
array( 'wp-editor', 'wp-i18n', 'wp-element', 'wp-components', 'jquery' ),
|
168 |
+
'2.2.0',
|
169 |
true
|
170 |
);
|
171 |
wp_enqueue_style(
|
172 |
'visual-portfolio-gutenberg',
|
173 |
plugins_url( '../gutenberg/style.min.css', __FILE__ ),
|
174 |
array(),
|
175 |
+
'2.2.0'
|
176 |
);
|
177 |
+
wp_style_add_data( 'visual-portfolio-gutenberg', 'rtl', 'replace' );
|
178 |
+
wp_style_add_data( 'visual-portfolio-gutenberg', 'suffix', '.min' );
|
179 |
|
180 |
wp_localize_script(
|
181 |
'visual-portfolio-gutenberg',
|
186 |
'controls_categories' => Visual_Portfolio_Controls::get_registered_categories(),
|
187 |
)
|
188 |
);
|
189 |
+
|
190 |
+
// Meta.
|
191 |
+
wp_enqueue_script(
|
192 |
+
'visual-portfolio-gutenberg-custom-post-meta',
|
193 |
+
plugins_url( '../gutenberg/custom-post-meta.min.js', __FILE__ ),
|
194 |
+
array( 'wp-editor', 'wp-i18n', 'wp-element', 'wp-components', 'wp-plugins', 'jquery' ),
|
195 |
+
'2.2.0',
|
196 |
+
true
|
197 |
+
);
|
198 |
+
|
199 |
+
wp_localize_script(
|
200 |
+
'visual-portfolio-gutenberg-custom-post-meta',
|
201 |
+
'VPGutenbergMetaVariables',
|
202 |
+
array(
|
203 |
+
'nonce' => wp_create_nonce( 'vp-ajax-nonce' ),
|
204 |
+
)
|
205 |
+
);
|
206 |
}
|
207 |
}
|
208 |
new Visual_Portfolio_Gutenberg_Block();
|
classes/class-migration.php
CHANGED
@@ -18,7 +18,7 @@ class Visual_Portfolio_Migrations {
|
|
18 |
*
|
19 |
* @var string
|
20 |
*/
|
21 |
-
protected $version = '2.
|
22 |
|
23 |
/**
|
24 |
* Initial version.
|
18 |
*
|
19 |
* @var string
|
20 |
*/
|
21 |
+
protected $version = '2.2.0';
|
22 |
|
23 |
/**
|
24 |
* Initial version.
|
classes/class-preview.php
CHANGED
@@ -174,7 +174,7 @@ class Visual_Portfolio_Preview {
|
|
174 |
|
175 |
// Enqueue assets.
|
176 |
wp_enqueue_script( 'iframe-resizer-content', visual_portfolio()->plugin_url . 'assets/vendor/iframe-resizer/iframeResizer.contentWindow.min.js', array(), '4.2.10', true );
|
177 |
-
wp_enqueue_script( 'visual-portfolio-preview', visual_portfolio()->plugin_url . 'assets/js/preview.js', array( 'jquery', 'iframe-resizer-content' ), '2.
|
178 |
|
179 |
// Post data for script.
|
180 |
wp_localize_script(
|
174 |
|
175 |
// Enqueue assets.
|
176 |
wp_enqueue_script( 'iframe-resizer-content', visual_portfolio()->plugin_url . 'assets/vendor/iframe-resizer/iframeResizer.contentWindow.min.js', array(), '4.2.10', true );
|
177 |
+
wp_enqueue_script( 'visual-portfolio-preview', visual_portfolio()->plugin_url . 'assets/js/preview.js', array( 'jquery', 'iframe-resizer-content' ), '2.2.0', true );
|
178 |
|
179 |
// Post data for script.
|
180 |
wp_localize_script(
|
classes/class-supported-themes.php
CHANGED
@@ -68,7 +68,9 @@ class Visual_Portfolio_Supported_Themes {
|
|
68 |
public function wp_enqueue_scripts() {
|
69 |
$theme_compat = $this->get_theme_compatibility_style();
|
70 |
if ( $theme_compat ) {
|
71 |
-
wp_enqueue_style( $theme_compat['name'], $theme_compat['url'], array(), '2.
|
|
|
|
|
72 |
}
|
73 |
}
|
74 |
}
|
68 |
public function wp_enqueue_scripts() {
|
69 |
$theme_compat = $this->get_theme_compatibility_style();
|
70 |
if ( $theme_compat ) {
|
71 |
+
wp_enqueue_style( $theme_compat['name'], $theme_compat['url'], array(), '2.2.0' );
|
72 |
+
wp_style_add_data( $theme_compat['name'], 'rtl', 'replace' );
|
73 |
+
wp_style_add_data( $theme_compat['name'], 'suffix', '.min' );
|
74 |
}
|
75 |
}
|
76 |
}
|
classes/class-tinymce.php
CHANGED
@@ -70,7 +70,7 @@ class Visual_Portfolio_TinyMCE {
|
|
70 |
return;
|
71 |
}
|
72 |
|
73 |
-
wp_enqueue_script( 'visual-portfolio-tinymce-localize', visual_portfolio()->plugin_url . 'assets/admin/js/mce-localize.min.js', array(), '2.
|
74 |
wp_localize_script( 'visual-portfolio-tinymce-localize', 'VPTinyMCEOptions', $data_tiny_mce );
|
75 |
}
|
76 |
}
|
70 |
return;
|
71 |
}
|
72 |
|
73 |
+
wp_enqueue_script( 'visual-portfolio-tinymce-localize', visual_portfolio()->plugin_url . 'assets/admin/js/mce-localize.min.js', array(), '2.2.0', true );
|
74 |
wp_localize_script( 'visual-portfolio-tinymce-localize', 'VPTinyMCEOptions', $data_tiny_mce );
|
75 |
}
|
76 |
}
|
classes/class-vc.php
CHANGED
@@ -35,7 +35,7 @@ class Visual_Portfolio_VC {
|
|
35 |
*/
|
36 |
public function admin_enqueue_scripts( $page ) {
|
37 |
if ( 'post.php' === $page || 'post-new.php' === $page ) {
|
38 |
-
wp_enqueue_script( 'visual-portfolio-vc-frontend', visual_portfolio()->plugin_url . 'assets/admin/js/vc-frontend.min.js', array( 'jquery' ), '2.
|
39 |
}
|
40 |
}
|
41 |
|
35 |
*/
|
36 |
public function admin_enqueue_scripts( $page ) {
|
37 |
if ( 'post.php' === $page || 'post-new.php' === $page ) {
|
38 |
+
wp_enqueue_script( 'visual-portfolio-vc-frontend', visual_portfolio()->plugin_url . 'assets/admin/js/vc-frontend.min.js', array( 'jquery' ), '2.2.0', true );
|
39 |
}
|
40 |
}
|
41 |
|
gutenberg/components/controls-render/index.js
CHANGED
@@ -293,6 +293,7 @@ ControlsRender.Control = function( props ) {
|
|
293 |
renderControl = (
|
294 |
<GalleryControl
|
295 |
imageControls={ props.image_controls }
|
|
|
296 |
attributes={ attributes }
|
297 |
name={ props.name }
|
298 |
value={ controlVal }
|
293 |
renderControl = (
|
294 |
<GalleryControl
|
295 |
imageControls={ props.image_controls }
|
296 |
+
focalPoint={ props.focal_point }
|
297 |
attributes={ attributes }
|
298 |
name={ props.name }
|
299 |
value={ controlVal }
|
gutenberg/components/gallery-control/index.js
CHANGED
@@ -30,6 +30,7 @@ const {
|
|
30 |
const {
|
31 |
Button,
|
32 |
Dropdown,
|
|
|
33 |
withNotices,
|
34 |
} = wp.components;
|
35 |
|
@@ -39,7 +40,6 @@ const {
|
|
39 |
} = wp.compose;
|
40 |
|
41 |
const {
|
42 |
-
MediaPlaceholder,
|
43 |
MediaUpload,
|
44 |
} = wp.blockEditor;
|
45 |
|
@@ -69,6 +69,7 @@ const SortableItem = SortableElement( ( props ) => {
|
|
69 |
imageControls,
|
70 |
controlName,
|
71 |
attributes,
|
|
|
72 |
isSetupWizard,
|
73 |
} = props;
|
74 |
|
@@ -111,6 +112,24 @@ const SortableItem = SortableElement( ( props ) => {
|
|
111 |
) }
|
112 |
renderContent={ () => (
|
113 |
<div className="vpf-component-gallery-control-item-dropdown">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
114 |
{ Object.keys( imageControls ).map( ( name ) => {
|
115 |
const newCondition = [];
|
116 |
|
@@ -167,6 +186,7 @@ const SortableList = SortableContainer( ( props ) => {
|
|
167 |
imageControls,
|
168 |
controlName,
|
169 |
attributes,
|
|
|
170 |
isSetupWizard,
|
171 |
prepareImages,
|
172 |
} = props;
|
@@ -185,6 +205,7 @@ const SortableList = SortableContainer( ( props ) => {
|
|
185 |
imageControls={ imageControls }
|
186 |
controlName={ controlName }
|
187 |
attributes={ attributes }
|
|
|
188 |
isSetupWizard={ isSetupWizard }
|
189 |
/>
|
190 |
) ) }
|
@@ -210,6 +231,9 @@ const SortableList = SortableContainer( ( props ) => {
|
|
210 |
<svg width="24" height="24" xmlns="http://www.w3.org/2000/svg" viewBox="-2 -2 24 24" role="img" aria-hidden="true" focusable="false">
|
211 |
<path d="M10 1c-5 0-9 4-9 9s4 9 9 9 9-4 9-9-4-9-9-9zm0 16c-3.9 0-7-3.1-7-7s3.1-7 7-7 7 3.1 7 7-3.1 7-7 7zm1-11H9v3H6v2h3v3h2v-3h3V9h-3V6zM10 1c-5 0-9 4-9 9s4 9 9 9 9-4 9-9-4-9-9-9zm0 16c-3.9 0-7-3.1-7-7s3.1-7 7-7 7 3.1 7 7-3.1 7-7 7zm1-11H9v3H6v2h3v3h2v-3h3V9h-3V6z" />
|
212 |
</svg>
|
|
|
|
|
|
|
213 |
</Button>
|
214 |
) }
|
215 |
/>
|
@@ -280,7 +304,7 @@ class GalleryControl extends Component {
|
|
280 |
name: controlName,
|
281 |
value,
|
282 |
onChange,
|
283 |
-
|
284 |
isSetupWizard,
|
285 |
} = this.props;
|
286 |
|
@@ -288,65 +312,45 @@ class GalleryControl extends Component {
|
|
288 |
|
289 |
return (
|
290 |
<div className="vpf-component-gallery-control">
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
axis="xy"
|
331 |
-
distance="3"
|
332 |
-
onSortEnd={ ( { oldIndex, newIndex } ) => {
|
333 |
-
const newImages = arrayMove( [ ...filteredValue ], oldIndex, newIndex );
|
334 |
-
onChange( newImages );
|
335 |
-
} }
|
336 |
-
helperClass="vpf-component-gallery-control-items-sortable"
|
337 |
-
helperContainer={ () => {
|
338 |
-
if ( self.sortRef && self.sortRef.current && self.sortRef.current.container ) {
|
339 |
-
return self.sortRef.current.container;
|
340 |
-
}
|
341 |
-
|
342 |
-
// sometimes container ref disappears, so we can find dom element manually.
|
343 |
-
return document.body;
|
344 |
-
} }
|
345 |
-
/>
|
346 |
-
</Fragment>
|
347 |
-
) }
|
348 |
-
/>
|
349 |
-
) : '' }
|
350 |
</div>
|
351 |
);
|
352 |
}
|
30 |
const {
|
31 |
Button,
|
32 |
Dropdown,
|
33 |
+
FocalPointPicker,
|
34 |
withNotices,
|
35 |
} = wp.components;
|
36 |
|
40 |
} = wp.compose;
|
41 |
|
42 |
const {
|
|
|
43 |
MediaUpload,
|
44 |
} = wp.blockEditor;
|
45 |
|
69 |
imageControls,
|
70 |
controlName,
|
71 |
attributes,
|
72 |
+
focalPoint,
|
73 |
isSetupWizard,
|
74 |
} = props;
|
75 |
|
112 |
) }
|
113 |
renderContent={ () => (
|
114 |
<div className="vpf-component-gallery-control-item-dropdown">
|
115 |
+
{ focalPoint ? (
|
116 |
+
<FocalPointPicker
|
117 |
+
url={ img.imgThumbnailUrl || img.imgUrl }
|
118 |
+
value={ img.focalPoint }
|
119 |
+
onChange={ ( val ) => {
|
120 |
+
const newImages = [ ...items ];
|
121 |
+
|
122 |
+
if ( newImages[ idx ] ) {
|
123 |
+
newImages[ idx ] = {
|
124 |
+
...newImages[ idx ],
|
125 |
+
focalPoint: val,
|
126 |
+
};
|
127 |
+
|
128 |
+
onChange( newImages );
|
129 |
+
}
|
130 |
+
} }
|
131 |
+
/>
|
132 |
+
) : '' }
|
133 |
{ Object.keys( imageControls ).map( ( name ) => {
|
134 |
const newCondition = [];
|
135 |
|
186 |
imageControls,
|
187 |
controlName,
|
188 |
attributes,
|
189 |
+
focalPoint,
|
190 |
isSetupWizard,
|
191 |
prepareImages,
|
192 |
} = props;
|
205 |
imageControls={ imageControls }
|
206 |
controlName={ controlName }
|
207 |
attributes={ attributes }
|
208 |
+
focalPoint={ focalPoint }
|
209 |
isSetupWizard={ isSetupWizard }
|
210 |
/>
|
211 |
) ) }
|
231 |
<svg width="24" height="24" xmlns="http://www.w3.org/2000/svg" viewBox="-2 -2 24 24" role="img" aria-hidden="true" focusable="false">
|
232 |
<path d="M10 1c-5 0-9 4-9 9s4 9 9 9 9-4 9-9-4-9-9-9zm0 16c-3.9 0-7-3.1-7-7s3.1-7 7-7 7 3.1 7 7-3.1 7-7 7zm1-11H9v3H6v2h3v3h2v-3h3V9h-3V6zM10 1c-5 0-9 4-9 9s4 9 9 9 9-4 9-9-4-9-9-9zm0 16c-3.9 0-7-3.1-7-7s3.1-7 7-7 7 3.1 7 7-3.1 7-7 7zm1-11H9v3H6v2h3v3h2v-3h3V9h-3V6z" />
|
233 |
</svg>
|
234 |
+
<span>
|
235 |
+
{ __( 'Add Images', 'visual-portfolio' ) }
|
236 |
+
</span>
|
237 |
</Button>
|
238 |
) }
|
239 |
/>
|
304 |
name: controlName,
|
305 |
value,
|
306 |
onChange,
|
307 |
+
focalPoint,
|
308 |
isSetupWizard,
|
309 |
} = this.props;
|
310 |
|
312 |
|
313 |
return (
|
314 |
<div className="vpf-component-gallery-control">
|
315 |
+
<MediaUpload
|
316 |
+
onSelect={ ( images ) => {
|
317 |
+
this.setState( { hasError: false } );
|
318 |
+
onChange( this.prepareImages( images ) );
|
319 |
+
} }
|
320 |
+
allowedTypes={ ALLOWED_MEDIA_TYPES }
|
321 |
+
multiple
|
322 |
+
value={ filteredValue && Object.keys( filteredValue ).length ? filteredValue.map( ( img ) => img.id ) : [] }
|
323 |
+
render={ () => (
|
324 |
+
<Fragment>
|
325 |
+
<SortableList
|
326 |
+
ref={ self.sortRef }
|
327 |
+
items={ filteredValue }
|
328 |
+
onChange={ onChange }
|
329 |
+
imageControls={ imageControls }
|
330 |
+
controlName={ controlName }
|
331 |
+
attributes={ attributes }
|
332 |
+
focalPoint={ focalPoint }
|
333 |
+
isSetupWizard={ isSetupWizard }
|
334 |
+
prepareImages={ self.prepareImages }
|
335 |
+
axis="xy"
|
336 |
+
distance="3"
|
337 |
+
onSortEnd={ ( { oldIndex, newIndex } ) => {
|
338 |
+
const newImages = arrayMove( [ ...filteredValue ], oldIndex, newIndex );
|
339 |
+
onChange( newImages );
|
340 |
+
} }
|
341 |
+
helperClass="vpf-component-gallery-control-items-sortable"
|
342 |
+
helperContainer={ () => {
|
343 |
+
if ( self.sortRef && self.sortRef.current && self.sortRef.current.container ) {
|
344 |
+
return self.sortRef.current.container;
|
345 |
+
}
|
346 |
+
|
347 |
+
// sometimes container ref disappears, so we can find dom element manually.
|
348 |
+
return document.body;
|
349 |
+
} }
|
350 |
+
/>
|
351 |
+
</Fragment>
|
352 |
+
) }
|
353 |
+
/>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
354 |
</div>
|
355 |
);
|
356 |
}
|
gutenberg/components/iframe-preview/index.js
CHANGED
@@ -68,7 +68,7 @@ export default class IframePreview extends Component {
|
|
68 |
iframeResizer( {
|
69 |
interval: 10,
|
70 |
checkOrigin: false,
|
71 |
-
|
72 |
// select current block on click message.
|
73 |
if ( 'clicked' === message ) {
|
74 |
wp.data.dispatch( 'core/editor' ).selectBlock( clientId );
|
68 |
iframeResizer( {
|
69 |
interval: 10,
|
70 |
checkOrigin: false,
|
71 |
+
onMessage( { message } ) {
|
72 |
// select current block on click message.
|
73 |
if ( 'clicked' === message ) {
|
74 |
wp.data.dispatch( 'core/editor' ).selectBlock( clientId );
|
gutenberg/custom-post-meta.js
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
1 |
+
import './custom-post-meta/video';
|
2 |
+
import './custom-post-meta/image-focal-point';
|
gutenberg/custom-post-meta.min.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
!function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=264)}({264:function(e,t,n){e.exports=n(273)},265:function(e,t){function n(e){return(n="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})(e)}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function u(e,t){return!t||"object"!==n(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function a(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var l=wp.i18n.__,f=wp.compose,p=f.withInstanceId,s=f.compose,m=wp.data,d=m.withSelect,b=m.withDispatch,y=wp.element.Component,h=wp.components,v=h.PanelRow,w=h.FocalPointPicker,g=wp.editPost.PluginDocumentSettingPanel,_=wp.plugins.registerPlugin,P=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&i(e,t)}(m,e);var t,n,f,p,s=(t=m,function(){var e,n=c(t);if(a()){var o=c(this).constructor;e=Reflect.construct(n,arguments,o)}else e=n.apply(this,arguments);return u(this,e)});function m(){return o(this,m),s.apply(this,arguments)}return n=m,(f=[{key:"render",value:function(){var e=this.props,t=e.getMeta,n=e.getThumbnail,o=e.updateMeta,r=n();if(!r||!r.source_url)return"";var i=t("_vp_image_focal_point");return i&&i.x&&i.y||(i={x:"0.5",y:"0.5"}),wp.element.createElement(g,{name:"VPImageFocalPoint",title:l("Featured Image Focal Point","@@text_domain"),icon:wp.element.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},wp.element.createElement("rect",{x:"0.75",y:"0.75",width:"18.5",height:"18.5",rx:"1.25",stroke:"currentColor",strokeWidth:"1.5",fill:"transparent"}),wp.element.createElement("path",{d:"M1 15.5L6 12L10 14L14.5 10L19 13",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",fill:"transparent"})),className:"vpf-meta-image-focal-point-panel"},wp.element.createElement(v,null,wp.element.createElement("p",{className:"description"},l("Focal point will be used in Visual Portfolio layouts only.","@@text_domain"))),wp.element.createElement(v,null,wp.element.createElement(w,{url:r.source_url,value:i,onChange:function(e){o("_vp_image_focal_point",e)}})))}}])&&r(n.prototype,f),p&&r(n,p),m}(y);_("vp-image-focal-point",{render:s([d((function(e){return{getMeta:function(t){return(e("core/editor").getEditedPostAttribute("meta")||{})[t]},getThumbnail:function(){var t=e("core/editor").getEditedPostAttribute("featured_media");return t?e("core").getMedia(t):null}}})),b((function(e){return{updateMeta:function(t,n){var o,r,i;e("core/editor").editPost({meta:(o={},r=t,i=n,r in o?Object.defineProperty(o,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):o[r]=i,o)})}}})),p])(P)})},273:function(e,t,n){"use strict";n.r(t);var o=n(3);function r(e){return(r="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})(e)}function i(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function a(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?c(e):t}function c(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function l(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var p=wp.i18n.__,s=wp.compose,m=s.withInstanceId,d=s.compose,b=wp.data,y=b.withSelect,h=b.withDispatch,v=wp.element.Component,w=wp.components,g=w.PanelRow,_=w.TextControl,P=wp.editPost.PluginDocumentSettingPanel,O=wp.plugins.registerPlugin,j=window,x=j.jQuery,E=j.ajaxurl,S=j.VPGutenbergMetaVariables,C=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&u(e,t)}(d,e);var t,n,r,s,m=(t=d,function(){var e,n=f(t);if(l()){var o=f(this).constructor;e=Reflect.construct(n,arguments,o)}else e=n.apply(this,arguments);return a(this,e)});function d(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,d),(t=m.call(this,e)).state={oembedQuery:"",oembedHTML:""},t.maybePrepareOembed=Object(o.a)(300,t.maybePrepareOembed.bind(c(t))),t}return n=d,(r=[{key:"componentDidMount",value:function(){this.maybePrepareOembed()}},{key:"componentDidUpdate",value:function(){this.maybePrepareOembed()}},{key:"maybePrepareOembed",value:function(){var e=this,t=this.state,n=t.oembedQuery,o=t.oembedHTML,r=this.props,i=r.getMeta;if("video"===(0,r.getPostFormat)()){var u=i("_vp_format_video_url");n!==u&&(this.oembedAjax&&this.oembedAjax.abort&&this.oembedAjax.abort(),n||!o?this.oembedAjax=x.ajax({url:E,method:"POST",dataType:"json",data:{action:"vp_find_oembed",q:u,nonce:S.nonce},complete:function(t){var n=t.responseJSON,o={oembedQuery:u,oembedHTML:""};n&&void 0!==n.html&&(o.oembedHTML=n.html),e.setState(o),e.oembedAjax=null}}):this.setState({oembedHTML:""}))}}},{key:"render",value:function(){var e=this.props,t=e.getMeta,n=e.getPostFormat,o=e.updateMeta,r=this.state.oembedHTML;return"video"!==n()?"":wp.element.createElement(P,{name:"VPVideo",title:p("Video","@@text_domain"),icon:wp.element.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},wp.element.createElement("path",{d:"M19.25 10C19.25 15.1086 15.1086 19.25 10 19.25C4.89137 19.25 0.75 15.1086 0.75 10C0.75 4.89137 4.89137 0.75 10 0.75C15.1086 0.75 19.25 4.89137 19.25 10Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",fill:"transparent"}),wp.element.createElement("path",{d:"M8 12.6326V7.36671C8.00011 7.30082 8.01856 7.23618 8.05342 7.17955C8.08828 7.12293 8.13826 7.0764 8.19812 7.04485C8.25798 7.0133 8.32552 6.99789 8.39367 7.00023C8.46181 7.00257 8.52805 7.02258 8.58544 7.05816L12.8249 9.69035C12.8786 9.72358 12.9228 9.76933 12.9534 9.82337C12.984 9.87742 13 9.93803 13 9.99963C13 10.0612 12.984 10.1218 12.9534 10.1759C12.9228 10.2299 12.8786 10.2757 12.8249 10.3089L8.58544 12.9418C8.52805 12.9774 8.46181 12.9974 8.39367 12.9998C8.32552 13.0021 8.25798 12.9867 8.19812 12.9551C8.13826 12.9236 8.08828 12.8771 8.05342 12.8204C8.01856 12.7638 8.00011 12.6992 8 12.6333V12.6326Z",fill:"currentColor"})),className:"vpf-meta-video-panel"},wp.element.createElement(g,null,wp.element.createElement("p",{className:"description"},p("Video will be used in Visual Portfolio layouts only.","@@text_domain"))),wp.element.createElement(g,null,wp.element.createElement(_,{label:p("Video URL","@@text_domain"),value:t("_vp_format_video_url")||"",onChange:function(e){o("_vp_format_video_url",e)},type:"url",placeholder:"https://"})),wp.element.createElement(g,null,wp.element.createElement("div",{className:"vp-oembed-preview",dangerouslySetInnerHTML:{__html:r}})))}}])&&i(n.prototype,r),s&&i(n,s),d}(v);O("vp-video",{render:d([y((function(e){return{getMeta:function(t){return(e("core/editor").getEditedPostAttribute("meta")||{})[t]},getPostFormat:function(){return e("core/editor").getEditedPostAttribute("format")}}})),h((function(e){return{updateMeta:function(t,n){var o,r,i;e("core/editor").editPost({meta:(o={},r=t,i=n,r in o?Object.defineProperty(o,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):o[r]=i,o)})}}})),m])(C)});n(265)},3:function(e,t,n){"use strict";function o(e,t,n,o){var r,i=!1,u=0;function a(){r&&clearTimeout(r)}function c(){var c=this,l=Date.now()-u,f=arguments;function p(){u=Date.now(),n.apply(c,f)}function s(){r=void 0}i||(o&&!r&&p(),a(),void 0===o&&l>e?p():!0!==t&&(r=setTimeout(o?s:p,void 0===o?e-l:e)))}return"boolean"!=typeof t&&(o=n,n=t,t=void 0),c.cancel=function(){a(),i=!0},c}function r(e,t,n){return void 0===n?o(e,t,!1):o(e,n,!1!==t)}n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return r}))}});
|
gutenberg/custom-post-meta/image-focal-point.js
ADDED
@@ -0,0 +1,99 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* WordPress Dependencies
|
3 |
+
*/
|
4 |
+
const { __ } = wp.i18n;
|
5 |
+
|
6 |
+
const { withInstanceId, compose } = wp.compose;
|
7 |
+
|
8 |
+
const { withSelect, withDispatch } = wp.data;
|
9 |
+
|
10 |
+
const { Component } = wp.element;
|
11 |
+
|
12 |
+
const {
|
13 |
+
PanelRow,
|
14 |
+
FocalPointPicker,
|
15 |
+
} = wp.components;
|
16 |
+
|
17 |
+
const {
|
18 |
+
PluginDocumentSettingPanel,
|
19 |
+
} = wp.editPost;
|
20 |
+
|
21 |
+
const { registerPlugin } = wp.plugins;
|
22 |
+
|
23 |
+
/**
|
24 |
+
* Component
|
25 |
+
*/
|
26 |
+
class VpImageFocalPointComponent extends Component {
|
27 |
+
render() {
|
28 |
+
const {
|
29 |
+
getMeta,
|
30 |
+
getThumbnail,
|
31 |
+
updateMeta,
|
32 |
+
} = this.props;
|
33 |
+
|
34 |
+
const thumbnailData = getThumbnail();
|
35 |
+
|
36 |
+
if ( ! thumbnailData || ! thumbnailData.source_url ) {
|
37 |
+
return '';
|
38 |
+
}
|
39 |
+
|
40 |
+
let focalPoint = getMeta( '_vp_image_focal_point' );
|
41 |
+
if ( ! focalPoint || ! focalPoint.x || ! focalPoint.y ) {
|
42 |
+
focalPoint = {
|
43 |
+
x: '0.5',
|
44 |
+
y: '0.5',
|
45 |
+
};
|
46 |
+
}
|
47 |
+
|
48 |
+
return (
|
49 |
+
<PluginDocumentSettingPanel
|
50 |
+
name="VPImageFocalPoint"
|
51 |
+
title={ __( 'Featured Image Focal Point', 'visual-portfolio' ) }
|
52 |
+
icon={ (
|
53 |
+
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
54 |
+
<rect x="0.75" y="0.75" width="18.5" height="18.5" rx="1.25" stroke="currentColor" strokeWidth="1.5" fill="transparent" />
|
55 |
+
<path d="M1 15.5L6 12L10 14L14.5 10L19 13" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" fill="transparent" />
|
56 |
+
</svg>
|
57 |
+
) }
|
58 |
+
className="vpf-meta-image-focal-point-panel"
|
59 |
+
>
|
60 |
+
<PanelRow>
|
61 |
+
<p className="description">{ __( 'Focal point will be used in Visual Portfolio layouts only.', 'visual-portfolio' ) }</p>
|
62 |
+
</PanelRow>
|
63 |
+
<PanelRow>
|
64 |
+
<FocalPointPicker
|
65 |
+
url={ thumbnailData.source_url }
|
66 |
+
value={ focalPoint }
|
67 |
+
onChange={ ( val ) => {
|
68 |
+
updateMeta( '_vp_image_focal_point', val );
|
69 |
+
} }
|
70 |
+
/>
|
71 |
+
</PanelRow>
|
72 |
+
</PluginDocumentSettingPanel>
|
73 |
+
);
|
74 |
+
}
|
75 |
+
}
|
76 |
+
|
77 |
+
const VpImageFocalPoint = compose( [
|
78 |
+
withSelect( ( select ) => ( {
|
79 |
+
getMeta( name ) {
|
80 |
+
const meta = select( 'core/editor' ).getEditedPostAttribute( 'meta' ) || {};
|
81 |
+
return meta[ name ];
|
82 |
+
},
|
83 |
+
getThumbnail() {
|
84 |
+
const featuredImageId = select( 'core/editor' ).getEditedPostAttribute( 'featured_media' );
|
85 |
+
|
86 |
+
return featuredImageId ? select( 'core' ).getMedia( featuredImageId ) : null;
|
87 |
+
},
|
88 |
+
} ) ),
|
89 |
+
withDispatch( ( dispatch ) => ( {
|
90 |
+
updateMeta( name, val ) {
|
91 |
+
dispatch( 'core/editor' ).editPost( { meta: { [ name ]: val } } );
|
92 |
+
},
|
93 |
+
} ) ),
|
94 |
+
withInstanceId,
|
95 |
+
] )( VpImageFocalPointComponent );
|
96 |
+
|
97 |
+
registerPlugin( 'vp-image-focal-point', {
|
98 |
+
render: VpImageFocalPoint,
|
99 |
+
} );
|
gutenberg/custom-post-meta/video.js
ADDED
@@ -0,0 +1,189 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* External Dependencies
|
3 |
+
*/
|
4 |
+
import { debounce } from 'throttle-debounce';
|
5 |
+
|
6 |
+
/**
|
7 |
+
* WordPress Dependencies
|
8 |
+
*/
|
9 |
+
const { __ } = wp.i18n;
|
10 |
+
|
11 |
+
const { withInstanceId, compose } = wp.compose;
|
12 |
+
|
13 |
+
const { withSelect, withDispatch } = wp.data;
|
14 |
+
|
15 |
+
const { Component } = wp.element;
|
16 |
+
|
17 |
+
const {
|
18 |
+
PanelRow,
|
19 |
+
TextControl,
|
20 |
+
} = wp.components;
|
21 |
+
|
22 |
+
const {
|
23 |
+
PluginDocumentSettingPanel,
|
24 |
+
} = wp.editPost;
|
25 |
+
|
26 |
+
const { registerPlugin } = wp.plugins;
|
27 |
+
|
28 |
+
const {
|
29 |
+
jQuery: $,
|
30 |
+
ajaxurl,
|
31 |
+
VPGutenbergMetaVariables,
|
32 |
+
} = window;
|
33 |
+
|
34 |
+
/**
|
35 |
+
* Component
|
36 |
+
*/
|
37 |
+
class VpVideoComponent extends Component {
|
38 |
+
constructor( props ) {
|
39 |
+
super( props );
|
40 |
+
|
41 |
+
this.state = {
|
42 |
+
oembedQuery: '',
|
43 |
+
oembedHTML: '',
|
44 |
+
};
|
45 |
+
|
46 |
+
this.maybePrepareOembed = debounce( 300, this.maybePrepareOembed.bind( this ) );
|
47 |
+
}
|
48 |
+
|
49 |
+
componentDidMount() {
|
50 |
+
this.maybePrepareOembed();
|
51 |
+
}
|
52 |
+
|
53 |
+
componentDidUpdate() {
|
54 |
+
this.maybePrepareOembed();
|
55 |
+
}
|
56 |
+
|
57 |
+
/**
|
58 |
+
* Prepare oEmbed HTML.
|
59 |
+
*/
|
60 |
+
maybePrepareOembed() {
|
61 |
+
const {
|
62 |
+
oembedQuery,
|
63 |
+
oembedHTML,
|
64 |
+
} = this.state;
|
65 |
+
|
66 |
+
const {
|
67 |
+
getMeta,
|
68 |
+
getPostFormat,
|
69 |
+
} = this.props;
|
70 |
+
|
71 |
+
if ( 'video' !== getPostFormat() ) {
|
72 |
+
return;
|
73 |
+
}
|
74 |
+
|
75 |
+
const videoUrl = getMeta( '_vp_format_video_url' );
|
76 |
+
|
77 |
+
if ( oembedQuery === videoUrl ) {
|
78 |
+
return;
|
79 |
+
}
|
80 |
+
|
81 |
+
// Abort AJAX.
|
82 |
+
if ( this.oembedAjax && this.oembedAjax.abort ) {
|
83 |
+
this.oembedAjax.abort();
|
84 |
+
}
|
85 |
+
|
86 |
+
if ( ! oembedQuery && oembedHTML ) {
|
87 |
+
this.setState( {
|
88 |
+
oembedHTML: '',
|
89 |
+
} );
|
90 |
+
return;
|
91 |
+
}
|
92 |
+
|
93 |
+
this.oembedAjax = $.ajax( {
|
94 |
+
url: ajaxurl,
|
95 |
+
method: 'POST',
|
96 |
+
dataType: 'json',
|
97 |
+
data: {
|
98 |
+
action: 'vp_find_oembed',
|
99 |
+
q: videoUrl,
|
100 |
+
nonce: VPGutenbergMetaVariables.nonce,
|
101 |
+
},
|
102 |
+
complete: ( data ) => {
|
103 |
+
const json = data.responseJSON;
|
104 |
+
const newState = {
|
105 |
+
oembedQuery: videoUrl,
|
106 |
+
oembedHTML: '',
|
107 |
+
};
|
108 |
+
|
109 |
+
if ( json && 'undefined' !== typeof json.html ) {
|
110 |
+
newState.oembedHTML = json.html;
|
111 |
+
}
|
112 |
+
this.setState( newState );
|
113 |
+
|
114 |
+
this.oembedAjax = null;
|
115 |
+
},
|
116 |
+
} );
|
117 |
+
}
|
118 |
+
|
119 |
+
render() {
|
120 |
+
const {
|
121 |
+
getMeta,
|
122 |
+
getPostFormat,
|
123 |
+
updateMeta,
|
124 |
+
} = this.props;
|
125 |
+
|
126 |
+
const {
|
127 |
+
oembedHTML,
|
128 |
+
} = this.state;
|
129 |
+
|
130 |
+
if ( 'video' !== getPostFormat() ) {
|
131 |
+
return '';
|
132 |
+
}
|
133 |
+
|
134 |
+
return (
|
135 |
+
<PluginDocumentSettingPanel
|
136 |
+
name="VPVideo"
|
137 |
+
title={ __( 'Video', 'visual-portfolio' ) }
|
138 |
+
icon={ (
|
139 |
+
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
140 |
+
<path d="M19.25 10C19.25 15.1086 15.1086 19.25 10 19.25C4.89137 19.25 0.75 15.1086 0.75 10C0.75 4.89137 4.89137 0.75 10 0.75C15.1086 0.75 19.25 4.89137 19.25 10Z" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" fill="transparent" />
|
141 |
+
<path d="M8 12.6326V7.36671C8.00011 7.30082 8.01856 7.23618 8.05342 7.17955C8.08828 7.12293 8.13826 7.0764 8.19812 7.04485C8.25798 7.0133 8.32552 6.99789 8.39367 7.00023C8.46181 7.00257 8.52805 7.02258 8.58544 7.05816L12.8249 9.69035C12.8786 9.72358 12.9228 9.76933 12.9534 9.82337C12.984 9.87742 13 9.93803 13 9.99963C13 10.0612 12.984 10.1218 12.9534 10.1759C12.9228 10.2299 12.8786 10.2757 12.8249 10.3089L8.58544 12.9418C8.52805 12.9774 8.46181 12.9974 8.39367 12.9998C8.32552 13.0021 8.25798 12.9867 8.19812 12.9551C8.13826 12.9236 8.08828 12.8771 8.05342 12.8204C8.01856 12.7638 8.00011 12.6992 8 12.6333V12.6326Z" fill="currentColor" />
|
142 |
+
</svg>
|
143 |
+
) }
|
144 |
+
className="vpf-meta-video-panel"
|
145 |
+
>
|
146 |
+
<PanelRow>
|
147 |
+
<p className="description">{ __( 'Video will be used in Visual Portfolio layouts only.', 'visual-portfolio' ) }</p>
|
148 |
+
</PanelRow>
|
149 |
+
<PanelRow>
|
150 |
+
<TextControl
|
151 |
+
label={ __( 'Video URL', 'visual-portfolio' ) }
|
152 |
+
value={ getMeta( '_vp_format_video_url' ) || '' }
|
153 |
+
onChange={ ( val ) => {
|
154 |
+
updateMeta( '_vp_format_video_url', val );
|
155 |
+
} }
|
156 |
+
type="url"
|
157 |
+
placeholder="https://"
|
158 |
+
/>
|
159 |
+
</PanelRow>
|
160 |
+
<PanelRow>
|
161 |
+
{ /* eslint-disable-next-line react/no-danger */ }
|
162 |
+
<div className="vp-oembed-preview" dangerouslySetInnerHTML={ { __html: oembedHTML } } />
|
163 |
+
</PanelRow>
|
164 |
+
</PluginDocumentSettingPanel>
|
165 |
+
);
|
166 |
+
}
|
167 |
+
}
|
168 |
+
|
169 |
+
const VpVideo = compose( [
|
170 |
+
withSelect( ( select ) => ( {
|
171 |
+
getMeta( name ) {
|
172 |
+
const meta = select( 'core/editor' ).getEditedPostAttribute( 'meta' ) || {};
|
173 |
+
return meta[ name ];
|
174 |
+
},
|
175 |
+
getPostFormat() {
|
176 |
+
return select( 'core/editor' ).getEditedPostAttribute( 'format' );
|
177 |
+
},
|
178 |
+
} ) ),
|
179 |
+
withDispatch( ( dispatch ) => ( {
|
180 |
+
updateMeta( name, val ) {
|
181 |
+
dispatch( 'core/editor' ).editPost( { meta: { [ name ]: val } } );
|
182 |
+
},
|
183 |
+
} ) ),
|
184 |
+
withInstanceId,
|
185 |
+
] )( VpVideoComponent );
|
186 |
+
|
187 |
+
registerPlugin( 'vp-video', {
|
188 |
+
render: VpVideo,
|
189 |
+
} );
|
gutenberg/extensions/block-id.js
CHANGED
@@ -48,8 +48,8 @@ const withUniqueBlockId = createHigherOrderComponent( ( BlockEdit ) => {
|
|
48 |
} = this.props;
|
49 |
|
50 |
// fix duplicated classes after block clone.
|
51 |
-
if ( clientId && attributes.
|
52 |
-
usedIds[ attributes.
|
53 |
}
|
54 |
|
55 |
this.maybeCreateBlockId = this.maybeCreateBlockId.bind( this );
|
48 |
} = this.props;
|
49 |
|
50 |
// fix duplicated classes after block clone.
|
51 |
+
if ( clientId && attributes.block_id && 'undefined' === typeof usedIds[ attributes.block_id ] ) {
|
52 |
+
usedIds[ attributes.block_id ] = clientId;
|
53 |
}
|
54 |
|
55 |
this.maybeCreateBlockId = this.maybeCreateBlockId.bind( this );
|
gutenberg/index.min.js
CHANGED
@@ -1,14 +1,14 @@
|
|
1 |
-
!function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=
|
2 |
/*!
|
3 |
Copyright (c) 2017 Jed Watson.
|
4 |
Licensed under the MIT License (MIT), see
|
5 |
http://jedwatson.github.io/classnames
|
6 |
-
*/!function(){"use strict";var o=function(){function e(){}function t(e,t){for(var n=t.length,r=0;r<n;++r)o(e,t[r])}e.prototype=Object.create(null);var n={}.hasOwnProperty;var r=/\s+/;function o(e,o){if(o){var s=i(o);"string"===s?function(e,t){for(var n=t.split(r),i=n.length,o=0;o<i;++o)e[n[o]]=!0}(e,o):Array.isArray(o)?t(e,o):"object"===s?function(e,t){for(var r in t)n.call(t,r)&&(e[r]=!!t[r])}(e,o):"number"===s&&function(e,t){e[t]=!0}(e,o)}}return function(){for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=new e;t(o,r);var s=[];for(var a in o)o[a]&&s.push(a);return s.join(" ")}}();e.exports?(o.default=o,e.exports=o):"object"===i(n(44))&&n(44)?void 0===(r=function(){return o}.apply(t,[]))||(e.exports=r):window.classNames=o}()},function(e,t,n){function r(e){return(r="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})(e)}var i=n(53),o="object"==("undefined"==typeof self?"undefined":r(self))&&self&&self.Object===Object&&self,s=i||o||Function("return this")();e.exports=s},function(e,t,n){"use strict";function r(e,t,n,r){var i,o=!1,s=0;function a(){i&&clearTimeout(i)}function l(){var l=this,c=Date.now()-s,u=arguments;function h(){s=Date.now(),n.apply(l,u)}function d(){i=void 0}o||(r&&!i&&h(),a(),void 0===r&&c>e?h():!0!==t&&(i=setTimeout(r?d:h,void 0===r?e-c:e)))}return"boolean"!=typeof t&&(r=n,n=t,t=void 0),l.cancel=function(){a(),o=!0},l}function i(e,t,n){return void 0===n?r(e,t,!1):r(e,n,!1!==t)}n.d(t,"b",(function(){return r})),n.d(t,"a",(function(){return i}))},function(e,t){e.exports=ReactDOM},function(e,t){function n(e){return(n="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})(e)}e.exports=function(e){var t=n(e);return null!=e&&("object"==t||"function"==t)}},function(e,t,n){"use strict";e.exports=function(e,t,n,r,i,o,s,a){if(!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,r,i,o,s,a],u=0;(l=new Error(t.replace(/%s/g,(function(){return c[u++]})))).name="Invariant Violation"}throw l.framesToPop=1,l}}},function(e,t,n){var r=n(101),i=n(106);e.exports=function(e,t){var n=i(e,t);return r(n)?n:void 0}},function(e,t){function n(e){return(n="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})(e)}e.exports=function(e){return null!=e&&"object"==n(e)}},function(e,t){var n=Array.isArray;e.exports=n},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,n){var r=n(14),i=n(102),o=n(103),s=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":s&&s in Object(e)?i(e):o(e)}},function(e,t,n){var r=n(31),i=n(50);e.exports=function(e,t,n,o){var s=!n;n||(n={});for(var a=-1,l=t.length;++a<l;){var c=t[a],u=o?o(n[c],e[c],c,n,e):void 0;void 0===u&&(u=e[c]),s?i(n,c,u):r(n,c,u)}return n}},function(e,t,n){var r=n(3).Symbol;e.exports=r},function(e,t,n){"use strict";function r(e){return(r="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})(e)}Object.defineProperty(t,"__esModule",{value:!0});var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(0),a=c(s),l=c(n(1));function c(e){return e&&e.__esModule?e:{default:e}}var u={position:"absolute",top:0,left:0,visibility:"hidden",height:0,overflow:"scroll",whiteSpace:"pre"},h=["extraWidth","injectStyles","inputClassName","inputRef","inputStyle","minWidth","onAutosize","placeholderIsMinWidth"],d=function(e,t){t.style.fontSize=e.fontSize,t.style.fontFamily=e.fontFamily,t.style.fontWeight=e.fontWeight,t.style.fontStyle=e.fontStyle,t.style.letterSpacing=e.letterSpacing,t.style.textTransform=e.textTransform},p=!("undefined"==typeof window||!window.navigator)&&/MSIE |Trident\/|Edge\//.test(window.navigator.userAgent),f=function(){return p?"_"+Math.random().toString(36).substr(2,12):void 0},m=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==r(t)&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.inputRef=function(e){n.input=e,"function"==typeof n.props.inputRef&&n.props.inputRef(e)},n.placeHolderSizerRef=function(e){n.placeHolderSizer=e},n.sizerRef=function(e){n.sizer=e},n.state={inputWidth:e.minWidth,inputId:e.id||f()},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+r(t));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"componentDidMount",value:function(){this.mounted=!0,this.copyInputStyles(),this.updateInputWidth()}},{key:"UNSAFE_componentWillReceiveProps",value:function(e){var t=e.id;t!==this.props.id&&this.setState({inputId:t||f()})}},{key:"componentDidUpdate",value:function(e,t){t.inputWidth!==this.state.inputWidth&&"function"==typeof this.props.onAutosize&&this.props.onAutosize(this.state.inputWidth),this.updateInputWidth()}},{key:"componentWillUnmount",value:function(){this.mounted=!1}},{key:"copyInputStyles",value:function(){if(this.mounted&&window.getComputedStyle){var e=this.input&&window.getComputedStyle(this.input);e&&(d(e,this.sizer),this.placeHolderSizer&&d(e,this.placeHolderSizer))}}},{key:"updateInputWidth",value:function(){if(this.mounted&&this.sizer&&void 0!==this.sizer.scrollWidth){var e=void 0;e=this.props.placeholder&&(!this.props.value||this.props.value&&this.props.placeholderIsMinWidth)?Math.max(this.sizer.scrollWidth,this.placeHolderSizer.scrollWidth)+2:this.sizer.scrollWidth+2,(e+="number"===this.props.type&&void 0===this.props.extraWidth?16:parseInt(this.props.extraWidth)||0)<this.props.minWidth&&(e=this.props.minWidth),e!==this.state.inputWidth&&this.setState({inputWidth:e})}}},{key:"getInput",value:function(){return this.input}},{key:"focus",value:function(){this.input.focus()}},{key:"blur",value:function(){this.input.blur()}},{key:"select",value:function(){this.input.select()}},{key:"renderStyles",value:function(){var e=this.props.injectStyles;return p&&e?a.default.createElement("style",{dangerouslySetInnerHTML:{__html:"input#"+this.state.inputId+"::-ms-clear {display: none;}"}}):null}},{key:"render",value:function(){var e=[this.props.defaultValue,this.props.value,""].reduce((function(e,t){return null!=e?e:t})),t=i({},this.props.style);t.display||(t.display="inline-block");var n=i({boxSizing:"content-box",width:this.state.inputWidth+"px"},this.props.inputStyle),r=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(this.props,[]);return function(e){h.forEach((function(t){return delete e[t]}))}(r),r.className=this.props.inputClassName,r.id=this.state.inputId,r.style=n,a.default.createElement("div",{className:this.props.className,style:t},this.renderStyles(),a.default.createElement("input",i({},r,{ref:this.inputRef})),a.default.createElement("div",{ref:this.sizerRef,style:u},e),this.props.placeholder?a.default.createElement("div",{ref:this.placeHolderSizerRef,style:u},this.props.placeholder):null)}}]),t}(s.Component);m.propTypes={className:l.default.string,defaultValue:l.default.any,extraWidth:l.default.oneOfType([l.default.number,l.default.string]),id:l.default.string,injectStyles:l.default.bool,inputClassName:l.default.string,inputRef:l.default.func,inputStyle:l.default.object,minWidth:l.default.oneOfType([l.default.number,l.default.string]),onAutosize:l.default.func,onChange:l.default.func,placeholder:l.default.string,placeholderIsMinWidth:l.default.bool,style:l.default.object,value:l.default.any},m.defaultProps={minWidth:1,injectStyles:!0},t.default=m},function(e,t,n){"use strict";var r=n(0);function i(){return(i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var o=r.createElement("rect",{width:100,height:100,rx:50,fill:"currentColor"}),s=r.createElement("path",{d:"M57.531 69.5L70.244 33H58.447L47 69.5h10.531z",fill:"url(#icon-gutenberg_svg__paint0_linear)"}),a=r.createElement("path",{d:"M42.713 69.5L30 33h11.797l11.447 36.5H42.713z",fill:"#fff"}),l=r.createElement("defs",null,r.createElement("linearGradient",{id:"icon-gutenberg_svg__paint0_linear",x1:64.5,y1:33,x2:33,y2:77,gradientUnits:"userSpaceOnUse"},r.createElement("stop",{stopColor:"#fff"}),r.createElement("stop",{offset:1,stopColor:"#fff",stopOpacity:0})));t.a=function(e){return r.createElement("svg",i({width:100,height:100,viewBox:"0 0 100 100",fill:"none"},e),o,s,a,l)}},function(e,t,n){"use strict";function r(e,t){var n=t[e];if(void 0===n&&/[\[\.]/g.test(e)){var r=e.split("."),i=[];if(r&&r.length&&(r.forEach((function(e){if(/[\[]/g.test(e)){var t=e.split(/[\[\]]/g);t&&t.length&&t.forEach((function(e){""!==e&&("".concat(parseInt(e,10))===e?i.push(parseInt(e,10)):i.push(e))}))}else i.push(e)})),i.length)){var o=t;i.forEach((function(e){o=o&&void 0!==o[e]?o[e]:void 0})),n=o}}return n}n.d(t,"a",(function(){return r}))},function(e,t){function n(e){return(n="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})(e)}var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(e){"object"===("undefined"==typeof window?"undefined":n(window))&&(r=window)}e.exports=r},function(e,t,n){var r=n(52),i=n(58);e.exports=function(e){return null!=e&&i(e.length)&&!r(e)}},function(e,t){var n=Object.prototype;e.exports=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||n)}},function(e,t,n){var r=n(60),i=n(119),o=n(19);e.exports=function(e){return o(e)?r(e):i(e)}},function(e,t,n){function r(e){return(r="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})(e)}var i=n(12),o=n(9);e.exports=function(e){return"symbol"==r(e)||o(e)&&"[object Symbol]"==i(e)}},function(e,t,n){var r=n(138),i=n(139),o=n(140),s=n(141),a=n(142);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}l.prototype.clear=r,l.prototype.delete=i,l.prototype.get=o,l.prototype.has=s,l.prototype.set=a,e.exports=l},function(e,t,n){var r=n(32);e.exports=function(e,t){for(var n=e.length;n--;)if(r(e[n][0],t))return n;return-1}},function(e,t,n){var r=n(8)(Object,"create");e.exports=r},function(e,t,n){var r=n(156);e.exports=function(e,t){var n=e.__data__;return r(t)?n["string"==typeof t?"string":"hash"]:n.map}},,function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(17);function i(e,t,n){var r=!0;switch(t){case"==":r=e==n;break;case"===":r=e===n;break;case"!=":r=e!=n;break;case"!==":r=e!==n;break;case"*=":r=-1!==e.indexOf(n);break;case">=":r=e>=n;break;case"<=":r=e<=n;break;case">":r=e>n;break;case"<":r=e<n;break;case"&&":case"AND":r=e&&n;break;case"||":case"OR":r=e||n;break;default:r=e}return r}function o(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"AND",s="AND"===n,a=s?"OR":"AND";return e.forEach((function(e){if(Array.isArray(e)&&!e.control)s=i(s,n,o(e,t,a));else if(e.control){var l=Object(r.a)(e.control,t),c=e.operator||"==",u=void 0!==e.value?e.value:"true";"true"===l?l=!0:"false"===l&&(l=!1),"true"===u?u=!0:"false"===u&&(u=!1),s=i(s,n,i(l,c,u))}})),s}},function(e,t,n){var r,i;"undefined"!=typeof window&&window,void 0===(i="function"==typeof(r=function(){"use strict";function e(){}var t=e.prototype;return t.on=function(e,t){if(e&&t){var n=this._events=this._events||{},r=n[e]=n[e]||[];return-1==r.indexOf(t)&&r.push(t),this}},t.once=function(e,t){if(e&&t){this.on(e,t);var n=this._onceEvents=this._onceEvents||{};return(n[e]=n[e]||{})[t]=!0,this}},t.off=function(e,t){var n=this._events&&this._events[e];if(n&&n.length){var r=n.indexOf(t);return-1!=r&&n.splice(r,1),this}},t.emitEvent=function(e,t){var n=this._events&&this._events[e];if(n&&n.length){n=n.slice(0),t=t||[];for(var r=this._onceEvents&&this._onceEvents[e],i=0;i<n.length;i++){var o=n[i];r&&r[o]&&(this.off(e,o),delete r[o]),o.apply(this,t)}return this}},t.allOff=function(){delete this._events,delete this._onceEvents},e})?r.call(t,n,t,e):r)||(e.exports=i)},function(e,t,n){var r,i;function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}
|
7 |
/*!
|
8 |
* getSize v2.0.3
|
9 |
* measure size of elements
|
10 |
* MIT license
|
11 |
-
*/window,void 0===(i="function"==typeof(r=function(){"use strict";function e(e){var t=parseFloat(e);return-1==e.indexOf("%")&&!isNaN(t)&&t}var t="undefined"==typeof console?function(){}:function(e){console.error(e)},n=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"],r=n.length;function i(e){var n=getComputedStyle(e);return n||t("Style returned "+n+". Are you running this code in a hidden iframe on Firefox? See https://bit.ly/getsizebug1"),n}var s,a=!1;function l(t){if(function(){if(!a){a=!0;var t=document.createElement("div");t.style.width="200px",t.style.padding="1px 2px 3px 4px",t.style.borderStyle="solid",t.style.borderWidth="1px 2px 3px 4px",t.style.boxSizing="border-box";var n=document.body||document.documentElement;n.appendChild(t);var r=i(t);s=200==Math.round(e(r.width)),l.isBoxSizeOuter=s,n.removeChild(t)}}(),"string"==typeof t&&(t=document.querySelector(t)),t&&"object"==o(t)&&t.nodeType){var c=i(t);if("none"==c.display)return function(){for(var e={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},t=0;t<r;t++)e[n[t]]=0;return e}();var u={};u.width=t.offsetWidth,u.height=t.offsetHeight;for(var h=u.isBorderBox="border-box"==c.boxSizing,d=0;d<r;d++){var p=n[d],f=c[p],m=parseFloat(f);u[p]=isNaN(m)?0:m}var g=u.paddingLeft+u.paddingRight,v=u.paddingTop+u.paddingBottom,b=u.marginLeft+u.marginRight,y=u.marginTop+u.marginBottom,w=u.borderLeftWidth+u.borderRightWidth,k=u.borderTopWidth+u.borderBottomWidth,x=h&&s,S=e(c.width);!1!==S&&(u.width=S+(x?0:g+w));var E=e(c.height);return!1!==E&&(u.height=E+(x?0:v+k)),u.innerWidth=u.width-(g+w),u.innerHeight=u.height-(v+k),u.outerWidth=u.width+b,u.outerHeight=u.height+y,u}}return l})?r.call(t,n,t,e):r)||(e.exports=i)},function(e,t,n){var r=n(50),i=n(32),o=Object.prototype.hasOwnProperty;e.exports=function(e,t,n){var s=e[t];o.call(e,t)&&i(s,n)&&(void 0!==n||t in e)||r(e,t,n)}},function(e,t){e.exports=function(e,t){return e===t||e!=e&&t!=t}},function(e,t){e.exports=function(e){return function(t){return e(t)}}},function(e,t,n){(function(e){function r(e){return(r="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})(e)}var i=n(53),o="object"==r(t)&&t&&!t.nodeType&&t,s=o&&"object"==r(e)&&e&&!e.nodeType&&e,a=s&&s.exports===o&&i.process,l=function(){try{var e=s&&s.require&&s.require("util").types;return e||a&&a.binding&&a.binding("util")}catch(e){}}();e.exports=l}).call(this,n(11)(e))},function(e,t,n){var r=n(8)(n(3),"Map");e.exports=r},function(e,t,n){var r=n(168),i=n(69),o=Object.prototype.propertyIsEnumerable,s=Object.getOwnPropertySymbols,a=s?function(e){return null==e?[]:(e=Object(e),r(s(e),(function(t){return o.call(e,t)})))}:i;e.exports=a},function(e,t){e.exports=function(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}},function(e,t,n){var r=n(63)(Object.getPrototypeOf,Object);e.exports=r},function(e,t,n){var r=n(171),i=n(35),o=n(172),s=n(173),a=n(174),l=n(12),c=n(54),u=c(r),h=c(i),d=c(o),p=c(s),f=c(a),m=l;(r&&"[object DataView]"!=m(new r(new ArrayBuffer(1)))||i&&"[object Map]"!=m(new i)||o&&"[object Promise]"!=m(o.resolve())||s&&"[object Set]"!=m(new s)||a&&"[object WeakMap]"!=m(new a))&&(m=function(e){var t=l(e),n="[object Object]"==t?e.constructor:void 0,r=n?c(n):"";if(r)switch(r){case u:return"[object DataView]";case h:return"[object Map]";case d:return"[object Promise]";case p:return"[object Set]";case f:return"[object WeakMap]"}return t}),e.exports=m},function(e,t,n){var r=n(177);e.exports=function(e){var t=new e.constructor(e.byteLength);return new r(t).set(new r(e)),t}},function(e,t,n){var r=n(10),i=n(189),o=n(190),s=n(193);e.exports=function(e,t){return r(e)?e:i(e,t)?[e]:o(s(e))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return pn}));var r=n(4),i=n(0),o=n.n(i),s=n(76),a=n.n(s);var l=function(){function e(e){this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.before=null}var t=e.prototype;return t.insert=function(e){if(this.ctr%(this.isSpeedy?65e3:1)==0){var t,n=function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t}(this);t=0===this.tags.length?this.before:this.tags[this.tags.length-1].nextSibling,this.container.insertBefore(n,t),this.tags.push(n)}var r=this.tags[this.tags.length-1];if(this.isSpeedy){var i=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(r);try{var o=105===e.charCodeAt(1)&&64===e.charCodeAt(0);i.insertRule(e,o?0:i.cssRules.length)}catch(e){0}}else r.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach((function(e){return e.parentNode.removeChild(e)})),this.tags=[],this.ctr=0},e}();function c(e){return(c="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})(e)}var u=function(e){function t(e,t,r){var i=t.trim().split(m);t=i;var o=i.length,s=e.length;switch(s){case 0:case 1:var a=0;for(e=0===s?"":e[0]+" ";a<o;++a)t[a]=n(e,t[a],r).trim();break;default:var l=a=0;for(t=[];a<o;++a)for(var c=0;c<s;++c)t[l++]=n(e[c]+" ",i[a],r).trim()}return t}function n(e,t,n){var r=t.charCodeAt(0);switch(33>r&&(r=(t=t.trim()).charCodeAt(0)),r){case 38:return t.replace(g,"$1"+e.trim());case 58:return e.trim()+t.replace(g,"$1"+e.trim());default:if(0<1*n&&0<t.indexOf("\f"))return t.replace(g,(58===e.charCodeAt(0)?"":"$1")+e.trim())}return e+t}function r(e,t,n,o){var s=e+";",a=2*t+3*n+4*o;if(944===a){e=s.indexOf(":",9)+1;var l=s.substring(e,s.length-1).trim();return l=s.substring(0,e).trim()+l+";",1===O||2===O&&i(l,1)?"-webkit-"+l+l:l}if(0===O||2===O&&!i(s,1))return s;switch(a){case 1015:return 97===s.charCodeAt(10)?"-webkit-"+s+s:s;case 951:return 116===s.charCodeAt(3)?"-webkit-"+s+s:s;case 963:return 110===s.charCodeAt(5)?"-webkit-"+s+s:s;case 1009:if(100!==s.charCodeAt(4))break;case 969:case 942:return"-webkit-"+s+s;case 978:return"-webkit-"+s+"-moz-"+s+s;case 1019:case 983:return"-webkit-"+s+"-moz-"+s+"-ms-"+s+s;case 883:if(45===s.charCodeAt(8))return"-webkit-"+s+s;if(0<s.indexOf("image-set(",11))return s.replace(C,"$1-webkit-$2")+s;break;case 932:if(45===s.charCodeAt(4))switch(s.charCodeAt(5)){case 103:return"-webkit-box-"+s.replace("-grow","")+"-webkit-"+s+"-ms-"+s.replace("grow","positive")+s;case 115:return"-webkit-"+s+"-ms-"+s.replace("shrink","negative")+s;case 98:return"-webkit-"+s+"-ms-"+s.replace("basis","preferred-size")+s}return"-webkit-"+s+"-ms-"+s+s;case 964:return"-webkit-"+s+"-ms-flex-"+s+s;case 1023:if(99!==s.charCodeAt(8))break;return"-webkit-box-pack"+(l=s.substring(s.indexOf(":",15)).replace("flex-","").replace("space-between","justify"))+"-webkit-"+s+"-ms-flex-pack"+l+s;case 1005:return p.test(s)?s.replace(d,":-webkit-")+s.replace(d,":-moz-")+s:s;case 1e3:switch(t=(l=s.substring(13).trim()).indexOf("-")+1,l.charCodeAt(0)+l.charCodeAt(t)){case 226:l=s.replace(w,"tb");break;case 232:l=s.replace(w,"tb-rl");break;case 220:l=s.replace(w,"lr");break;default:return s}return"-webkit-"+s+"-ms-"+l+s;case 1017:if(-1===s.indexOf("sticky",9))break;case 975:switch(t=(s=e).length-10,a=(l=(33===s.charCodeAt(t)?s.substring(0,t):s).substring(e.indexOf(":",7)+1).trim()).charCodeAt(0)+(0|l.charCodeAt(7))){case 203:if(111>l.charCodeAt(8))break;case 115:s=s.replace(l,"-webkit-"+l)+";"+s;break;case 207:case 102:s=s.replace(l,"-webkit-"+(102<a?"inline-":"")+"box")+";"+s.replace(l,"-webkit-"+l)+";"+s.replace(l,"-ms-"+l+"box")+";"+s}return s+";";case 938:if(45===s.charCodeAt(5))switch(s.charCodeAt(6)){case 105:return l=s.replace("-items",""),"-webkit-"+s+"-webkit-box-"+l+"-ms-flex-"+l+s;case 115:return"-webkit-"+s+"-ms-flex-item-"+s.replace(S,"")+s;default:return"-webkit-"+s+"-ms-flex-line-pack"+s.replace("align-content","").replace(S,"")+s}break;case 973:case 989:if(45!==s.charCodeAt(3)||122===s.charCodeAt(4))break;case 931:case 953:if(!0===_.test(e))return 115===(l=e.substring(e.indexOf(":")+1)).charCodeAt(0)?r(e.replace("stretch","fill-available"),t,n,o).replace(":fill-available",":stretch"):s.replace(l,"-webkit-"+l)+s.replace(l,"-moz-"+l.replace("fill-",""))+s;break;case 962:if(s="-webkit-"+s+(102===s.charCodeAt(5)?"-ms-"+s:"")+s,211===n+o&&105===s.charCodeAt(13)&&0<s.indexOf("transform",10))return s.substring(0,s.indexOf(";",27)+1).replace(f,"$1-webkit-$2")+s}return s}function i(e,t){var n=e.indexOf(1===t?":":"{"),r=e.substring(0,3!==t?n:10);return n=e.substring(n+1,e.length-1),j(2!==t?r:r.replace(E,"$1"),n,t)}function o(e,t){var n=r(t,t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2));return n!==t+";"?n.replace(x," or ($1)").substring(4):"("+t+")"}function s(e,t,n,r,i,o,s,a,c,u){for(var h,d=0,p=t;d<M;++d)switch(h=$[d].call(l,e,p,n,r,i,o,s,a,c,u)){case void 0:case!1:case!0:case null:break;default:p=h}if(p!==t)return p}function a(e){return void 0!==(e=e.prefix)&&(j=null,e?"function"!=typeof e?O=1:(O=2,j=e):O=0),a}function l(e,n){var a=e;if(33>a.charCodeAt(0)&&(a=a.trim()),a=[a],0<M){var l=s(-1,n,a,a,L,T,0,0,0,0);void 0!==l&&"string"==typeof l&&(n=l)}var c=function e(n,a,l,c,d){for(var p,f,m,g,w,x=0,S=0,E=0,_=0,C=0,$=0,j=m=p=0,I=0,N=0,F=0,D=0,W=l.length,z=W-1,B="",V="",H="",U="";I<W;){if(f=l.charCodeAt(I),I===z&&0!==S+_+E+x&&(0!==S&&(f=47===S?10:47),_=E=x=0,W++,z++),0===S+_+E+x){if(I===z&&(0<N&&(B=B.replace(h,"")),0<B.trim().length)){switch(f){case 32:case 9:case 59:case 13:case 10:break;default:B+=l.charAt(I)}f=59}switch(f){case 123:for(p=(B=B.trim()).charCodeAt(0),m=1,D=++I;I<W;){switch(f=l.charCodeAt(I)){case 123:m++;break;case 125:m--;break;case 47:switch(f=l.charCodeAt(I+1)){case 42:case 47:e:{for(j=I+1;j<z;++j)switch(l.charCodeAt(j)){case 47:if(42===f&&42===l.charCodeAt(j-1)&&I+2!==j){I=j+1;break e}break;case 10:if(47===f){I=j+1;break e}}I=j}}break;case 91:f++;case 40:f++;case 34:case 39:for(;I++<z&&l.charCodeAt(I)!==f;);}if(0===m)break;I++}switch(m=l.substring(D,I),0===p&&(p=(B=B.replace(u,"").trim()).charCodeAt(0)),p){case 64:switch(0<N&&(B=B.replace(h,"")),f=B.charCodeAt(1)){case 100:case 109:case 115:case 45:N=a;break;default:N=R}if(D=(m=e(a,N,m,f,d+1)).length,0<M&&(w=s(3,m,N=t(R,B,F),a,L,T,D,f,d,c),B=N.join(""),void 0!==w&&0===(D=(m=w.trim()).length)&&(f=0,m="")),0<D)switch(f){case 115:B=B.replace(k,o);case 100:case 109:case 45:m=B+"{"+m+"}";break;case 107:m=(B=B.replace(v,"$1 $2"))+"{"+m+"}",m=1===O||2===O&&i("@"+m,3)?"@-webkit-"+m+"@"+m:"@"+m;break;default:m=B+m,112===c&&(V+=m,m="")}else m="";break;default:m=e(a,t(a,B,F),m,c,d+1)}H+=m,m=F=N=j=p=0,B="",f=l.charCodeAt(++I);break;case 125:case 59:if(1<(D=(B=(0<N?B.replace(h,""):B).trim()).length))switch(0===j&&(p=B.charCodeAt(0),45===p||96<p&&123>p)&&(D=(B=B.replace(" ",":")).length),0<M&&void 0!==(w=s(1,B,a,n,L,T,V.length,c,d,c))&&0===(D=(B=w.trim()).length)&&(B="\0\0"),p=B.charCodeAt(0),f=B.charCodeAt(1),p){case 0:break;case 64:if(105===f||99===f){U+=B+l.charAt(I);break}default:58!==B.charCodeAt(D-1)&&(V+=r(B,p,f,B.charCodeAt(2)))}F=N=j=p=0,B="",f=l.charCodeAt(++I)}}switch(f){case 13:case 10:47===S?S=0:0===1+p&&107!==c&&0<B.length&&(N=1,B+="\0"),0<M*P&&s(0,B,a,n,L,T,V.length,c,d,c),T=1,L++;break;case 59:case 125:if(0===S+_+E+x){T++;break}default:switch(T++,g=l.charAt(I),f){case 9:case 32:if(0===_+x+S)switch(C){case 44:case 58:case 9:case 32:g="";break;default:32!==f&&(g=" ")}break;case 0:g="\\0";break;case 12:g="\\f";break;case 11:g="\\v";break;case 38:0===_+S+x&&(N=F=1,g="\f"+g);break;case 108:if(0===_+S+x+A&&0<j)switch(I-j){case 2:112===C&&58===l.charCodeAt(I-3)&&(A=C);case 8:111===$&&(A=$)}break;case 58:0===_+S+x&&(j=I);break;case 44:0===S+E+_+x&&(N=1,g+="\r");break;case 34:case 39:0===S&&(_=_===f?0:0===_?f:_);break;case 91:0===_+S+E&&x++;break;case 93:0===_+S+E&&x--;break;case 41:0===_+S+x&&E--;break;case 40:if(0===_+S+x){if(0===p)switch(2*C+3*$){case 533:break;default:p=1}E++}break;case 64:0===S+E+_+x+j+m&&(m=1);break;case 42:case 47:if(!(0<_+x+E))switch(S){case 0:switch(2*f+3*l.charCodeAt(I+1)){case 235:S=47;break;case 220:D=I,S=42}break;case 42:47===f&&42===C&&D+2!==I&&(33===l.charCodeAt(D+2)&&(V+=l.substring(D,I+1)),g="",S=0)}}0===S&&(B+=g)}$=C,C=f,I++}if(0<(D=V.length)){if(N=a,0<M&&(void 0!==(w=s(2,V,N,n,L,T,D,c,d,c))&&0===(V=w).length))return U+V+H;if(V=N.join(",")+"{"+V+"}",0!=O*A){switch(2!==O||i(V,2)||(A=0),A){case 111:V=V.replace(y,":-moz-$1")+V;break;case 112:V=V.replace(b,"::-webkit-input-$1")+V.replace(b,"::-moz-$1")+V.replace(b,":-ms-input-$1")+V}A=0}}return U+V+H}(R,a,n,0,0);return 0<M&&(void 0!==(l=s(-2,c,a,a,L,T,c.length,0,0,0))&&(c=l)),"",A=0,T=L=1,c}var u=/^\0+/g,h=/[\0\r\f]/g,d=/: */g,p=/zoo|gra/,f=/([,: ])(transform)/g,m=/,\r+?/g,g=/([\t\r\n ])*\f?&/g,v=/@(k\w+)\s*(\S*)\s*/,b=/::(place)/g,y=/:(read-only)/g,w=/[svh]\w+-[tblr]{2}/,k=/\(\s*(.*)\s*\)/g,x=/([\s\S]*?);/g,S=/-self|flex-/g,E=/[^]*?(:[rp][el]a[\w-]+)[^]*/,_=/stretch|:\s*\w+\-(?:conte|avail)/,C=/([^-])(image-set\()/,T=1,L=1,A=0,O=1,R=[],$=[],M=0,j=null,P=0;return l.use=function e(t){switch(t){case void 0:case null:M=$.length=0;break;default:if("function"==typeof t)$[M++]=t;else if("object"===c(t))for(var n=0,r=t.length;n<r;++n)e(t[n]);else P=0|!!t}return e},l.set=a,void 0!==e&&a(e),l};function h(e){e&&d.current.insert(e+"}")}var d={current:null},p=function(e,t,n,r,i,o,s,a,l,c){switch(e){case 1:switch(t.charCodeAt(0)){case 64:return d.current.insert(t+";"),"";case 108:if(98===t.charCodeAt(2))return""}break;case 2:if(0===a)return t+"/*|*/";break;case 3:switch(a){case 102:case 112:return d.current.insert(n[0]+t),"";default:return t+(0===c?"/*|*/":"")}case-2:t.split("/*|*/}").forEach(h)}},f=function(e){void 0===e&&(e={});var t,n=e.key||"css";void 0!==e.prefix&&(t={prefix:e.prefix});var r=new u(t);var i,o={};i=e.container||document.head;var s,a=document.querySelectorAll("style[data-emotion-"+n+"]");Array.prototype.forEach.call(a,(function(e){e.getAttribute("data-emotion-"+n).split(" ").forEach((function(e){o[e]=!0})),e.parentNode!==i&&i.appendChild(e)})),r.use(e.stylisPlugins)(p),s=function(e,t,n,i){var o=t.name;d.current=n,r(e,t.styles),i&&(c.inserted[o]=!0)};var c={key:n,sheet:new l({key:n,container:i,nonce:e.nonce,speedy:e.speedy}),nonce:e.nonce,inserted:o,registered:{},insert:s};return c};function m(e,t,n){var r="";return n.split(" ").forEach((function(n){void 0!==e[n]?t.push(e[n]):r+=n+" "})),r}var g=function(e,t,n){var r=e.key+"-"+t.name;if(!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles),void 0===e.inserted[t.name]){var i=t;do{e.insert("."+r,i,e.sheet,!0);i=i.next}while(void 0!==i)}};var v=function(e){for(var t,n=0,r=0,i=e.length;i>=4;++r,i-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(i){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)},b={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function y(e){return(y="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})(e)}var w=/[A-Z]|^ms/g,k=/_EMO_([^_]+?)_([^]*?)_EMO_/g,x=function(e){return 45===e.charCodeAt(1)},S=function(e){return null!=e&&"boolean"!=typeof e},E=function(e){var t={};return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}((function(e){return x(e)?e:e.replace(w,"-$&").toLowerCase()})),_=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(k,(function(e,t,n){return T={name:t,styles:n,next:T},t}))}return 1===b[e]||x(e)||"number"!=typeof t||0===t?t:t+"px"};function C(e,t,n,r){if(null==n)return"";if(void 0!==n.__emotion_styles)return n;switch(y(n)){case"boolean":return"";case"object":if(1===n.anim)return T={name:n.name,styles:n.styles,next:T},n.name;if(void 0!==n.styles){var i=n.next;if(void 0!==i)for(;void 0!==i;)T={name:i.name,styles:i.styles,next:T},i=i.next;return n.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=C(e,t,n[i],!1);else for(var o in n){var s=n[o];if("object"!==y(s))null!=t&&void 0!==t[s]?r+=o+"{"+t[s]+"}":S(s)&&(r+=E(o)+":"+_(o,s)+";");else if(!Array.isArray(s)||"string"!=typeof s[0]||null!=t&&void 0!==t[s[0]]){var a=C(e,t,s,!1);switch(o){case"animation":case"animationName":r+=E(o)+":"+a+";";break;default:r+=o+"{"+a+"}"}}else for(var l=0;l<s.length;l++)S(s[l])&&(r+=E(o)+":"+_(o,s[l])+";")}return r}(e,t,n);case"function":if(void 0!==e){var o=T,s=n(e);return T=o,C(e,t,s,r)}break;case"string":}if(null==t)return n;var a=t[n];return void 0===a||r?n:a}var T,L=/label:\s*([^\s;\n{]+)\s*;/g;var A=function(e,t,n){if(1===e.length&&"object"===y(e[0])&&null!==e[0]&&void 0!==e[0].styles)return e[0];var r=!0,i="";T=void 0;var o=e[0];null==o||void 0===o.raw?(r=!1,i+=C(n,t,o,!1)):i+=o[0];for(var s=1;s<e.length;s++)i+=C(n,t,e[s],46===i.charCodeAt(i.length-1)),r&&(i+=o[s]);L.lastIndex=0;for(var a,l="";null!==(a=L.exec(i));)l+="-"+a[1];return{name:v(i)+l,styles:i,next:T}};var O=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return A(t)};function R(e){return(R="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})(e)}var $=Object(i.createContext)("undefined"!=typeof HTMLElement?f():null),M=Object(i.createContext)({}),j=$.Provider,P=function(e){return Object(i.forwardRef)((function(t,n){return Object(i.createElement)($.Consumer,null,(function(r){return e(t,r,n)}))}))},I="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",N=Object.prototype.hasOwnProperty,F=function(e,t,n,r){var o=null===n?t.css:t.css(n);"string"==typeof o&&void 0!==e.registered[o]&&(o=e.registered[o]);var s=t[I],a=[o],l="";"string"==typeof t.className?l=m(e.registered,a,t.className):null!=t.className&&(l=t.className+" ");var c=A(a);g(e,c,"string"==typeof s);l+=e.key+"-"+c.name;var u={};for(var h in t)N.call(t,h)&&"css"!==h&&h!==I&&(u[h]=t[h]);return u.ref=r,u.className=l,Object(i.createElement)(s,u)},D=P((function(e,t,n){return"function"==typeof e.css?Object(i.createElement)(M.Consumer,null,(function(r){return F(t,e,r,n)})):F(t,e,null,n)}));var W=function(e,t){var n=arguments;if(null==t||!N.call(t,"css"))return i.createElement.apply(void 0,n);var r=n.length,o=new Array(r);o[0]=D;var s={};for(var a in t)N.call(t,a)&&(s[a]=t[a]);s[I]=e,o[1]=s;for(var l=2;l<r;l++)o[l]=n[l];return i.createElement.apply(null,o)},z=(i.Component,function e(t){for(var n=t.length,r=0,i="";r<n;r++){var o=t[r];if(null!=o){var s=void 0;switch(R(o)){case"boolean":break;case"object":if(Array.isArray(o))s=e(o);else for(var a in s="",o)o[a]&&a&&(s&&(s+=" "),s+=a);break;default:s=o}s&&(i&&(i+=" "),i+=s)}}return i});function B(e,t,n){var r=[],i=m(e,r,n);return r.length<2?n:i+t(r)}var V=P((function(e,t){return Object(i.createElement)(M.Consumer,null,(function(n){var r=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i=A(n,t.registered);return g(t,i,!1),t.key+"-"+i.name},i={css:r,cx:function(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return B(t.registered,r,z(n))},theme:n},o=e.children(i);return!0,o}))})),H=n(5),U=n(1),G=n.n(U);function q(e){return(q="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})(e)}var K=function(){};function Y(e,t){return t?"-"===t[0]?e+t:e+"__"+t:e}function X(e,t,n){var r=[n];if(t&&e)for(var i in t)t.hasOwnProperty(i)&&t[i]&&r.push(""+Y(e,i));return r.filter((function(e){return e})).map((function(e){return String(e).trim()})).join(" ")}var J=function(e){return Array.isArray(e)?e.filter(Boolean):"object"===q(e)&&null!==e?[e]:[]};function Q(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function Z(e){return Q(e)?window.pageYOffset:e.scrollTop}function ee(e,t){Q(e)?window.scrollTo(0,t):e.scrollTop=t}function te(e,t,n,r){void 0===n&&(n=200),void 0===r&&(r=K);var i=Z(e),o=t-i,s=0;!function t(){var a,l=o*((a=(a=s+=10)/n-1)*a*a+1)+i;ee(e,l),s<n?window.requestAnimationFrame(t):r(e)}()}function ne(){try{return document.createEvent("TouchEvent"),!0}catch(e){return!1}}var re=n(15),ie=n.n(re);function oe(e){return(oe="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})(e)}function se(){return(se=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function ae(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function le(e){var t=e.maxHeight,n=e.menuEl,r=e.minHeight,i=e.placement,o=e.shouldScroll,s=e.isFixedPosition,a=e.theme.spacing,l=function(e){var t=getComputedStyle(e),n="absolute"===t.position,r=/(auto|scroll)/,i=document.documentElement;if("fixed"===t.position)return i;for(var o=e;o=o.parentElement;)if(t=getComputedStyle(o),(!n||"static"!==t.position)&&r.test(t.overflow+t.overflowY+t.overflowX))return o;return i}(n),c={placement:"bottom",maxHeight:t};if(!n||!n.offsetParent)return c;var u=l.getBoundingClientRect().height,h=n.getBoundingClientRect(),d=h.bottom,p=h.height,f=h.top,m=n.offsetParent.getBoundingClientRect().top,g=window.innerHeight,v=Z(l),b=parseInt(getComputedStyle(n).marginBottom,10),y=parseInt(getComputedStyle(n).marginTop,10),w=m-y,k=g-f,x=w+v,S=u-v-f,E=d-g+v+b,_=v+f-y;switch(i){case"auto":case"bottom":if(k>=p)return{placement:"bottom",maxHeight:t};if(S>=p&&!s)return o&&te(l,E,160),{placement:"bottom",maxHeight:t};if(!s&&S>=r||s&&k>=r)return o&&te(l,E,160),{placement:"bottom",maxHeight:s?k-b:S-b};if("auto"===i||s){var C=t,T=s?w:x;return T>=r&&(C=Math.min(T-b-a.controlHeight,t)),{placement:"top",maxHeight:C}}if("bottom"===i)return ee(l,E),{placement:"bottom",maxHeight:t};break;case"top":if(w>=p)return{placement:"top",maxHeight:t};if(x>=p&&!s)return o&&te(l,_,160),{placement:"top",maxHeight:t};if(!s&&x>=r||s&&w>=r){var L=t;return(!s&&x>=r||s&&w>=r)&&(L=s?w-y:x-y),o&&te(l,_,160),{placement:"top",maxHeight:L}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'+i+'".')}return c}var ce=function(e){return"auto"===e?"bottom":e},ue=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=e.call.apply(e,[this].concat(r))||this).state={maxHeight:t.props.maxMenuHeight,placement:null},t.getPlacement=function(e){var n=t.props,r=n.minMenuHeight,i=n.maxMenuHeight,o=n.menuPlacement,s=n.menuPosition,a=n.menuShouldScrollIntoView,l=n.theme,c=t.context.getPortalPlacement;if(e){var u="fixed"===s,h=le({maxHeight:i,menuEl:e,minHeight:r,placement:o,shouldScroll:a&&!u,isFixedPosition:u,theme:l});c&&c(h),t.setState(h)}},t.getUpdatedProps=function(){var e=t.props.menuPlacement,n=t.state.placement||ce(e);return se({},t.props,{placement:n,maxHeight:t.state.maxHeight})},t}return ae(t,e),t.prototype.render=function(){return(0,this.props.children)({ref:this.getPlacement,placerProps:this.getUpdatedProps()})},t}(i.Component);ue.contextTypes={getPortalPlacement:G.a.func};var he=function(e){var t=e.theme,n=t.spacing.baseUnit;return{color:t.colors.neutral40,padding:2*n+"px "+3*n+"px",textAlign:"center"}},de=he,pe=he,fe=function(e){var t=e.children,n=e.className,r=e.cx,i=e.getStyles,o=e.innerProps;return W("div",se({css:i("noOptionsMessage",e),className:r({"menu-notice":!0,"menu-notice--no-options":!0},n)},o),t)};fe.defaultProps={children:"No options"};var me=function(e){var t=e.children,n=e.className,r=e.cx,i=e.getStyles,o=e.innerProps;return W("div",se({css:i("loadingMessage",e),className:r({"menu-notice":!0,"menu-notice--loading":!0},n)},o),t)};me.defaultProps={children:"Loading..."};var ge=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=e.call.apply(e,[this].concat(r))||this).state={placement:null},t.getPortalPlacement=function(e){var n=e.placement;n!==ce(t.props.menuPlacement)&&t.setState({placement:n})},t}ae(t,e);var n=t.prototype;return n.getChildContext=function(){return{getPortalPlacement:this.getPortalPlacement}},n.render=function(){var e=this.props,t=e.appendTo,n=e.children,r=e.controlElement,i=e.menuPlacement,o=e.menuPosition,s=e.getStyles,a="fixed"===o;if(!t&&!a||!r)return null;var l=this.state.placement||ce(i),c=function(e){var t=e.getBoundingClientRect();return{bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width}}(r),u=a?0:window.pageYOffset,h=c[l]+u,d=W("div",{css:s("menuPortal",{offset:h,position:o,rect:c})},n);return t?Object(H.createPortal)(d,t):d},t}(i.Component);ge.childContextTypes={getPortalPlacement:G.a.func};var ve=Array.isArray,be=Object.keys,ye=Object.prototype.hasOwnProperty;function we(e,t){try{return function e(t,n){if(t===n)return!0;if(t&&n&&"object"==oe(t)&&"object"==oe(n)){var r,i,o,s=ve(t),a=ve(n);if(s&&a){if((i=t.length)!=n.length)return!1;for(r=i;0!=r--;)if(!e(t[r],n[r]))return!1;return!0}if(s!=a)return!1;var l=t instanceof Date,c=n instanceof Date;if(l!=c)return!1;if(l&&c)return t.getTime()==n.getTime();var u=t instanceof RegExp,h=n instanceof RegExp;if(u!=h)return!1;if(u&&h)return t.toString()==n.toString();var d=be(t);if((i=d.length)!==be(n).length)return!1;for(r=i;0!=r--;)if(!ye.call(n,d[r]))return!1;for(r=i;0!=r--;)if(!("_owner"===(o=d[r])&&t.$$typeof||e(t[o],n[o])))return!1;return!0}return t!=t&&n!=n}(e,t)}catch(e){if(e.message&&e.message.match(/stack|recursion/i))return console.warn("Warning: react-fast-compare does not handle circular references.",e.name,e.message),!1;throw e}}function ke(){return(ke=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function xe(){var e=function(e,t){t||(t=e.slice(0));return e.raw=t,e}(["\n 0%, 80%, 100% { opacity: 0; }\n 40% { opacity: 1; }\n"]);return xe=function(){return e},e}function Se(){return(Se=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var Ee={name:"19bqh2r",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0;"},_e=function(e){var t=e.size,n=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,["size"]);return W("svg",Se({height:t,width:t,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:Ee},n))},Ce=function(e){return W(_e,Se({size:20},e),W("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},Te=function(e){return W(_e,Se({size:20},e),W("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},Le=function(e){var t=e.isFocused,n=e.theme,r=n.spacing.baseUnit,i=n.colors;return{label:"indicatorContainer",color:t?i.neutral60:i.neutral20,display:"flex",padding:2*r,transition:"color 150ms",":hover":{color:t?i.neutral80:i.neutral40}}},Ae=Le,Oe=Le,Re=function(){var e=O.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}(xe()),$e=function(e){var t=e.delay,n=e.offset;return W("span",{css:O({animation:Re+" 1s ease-in-out "+t+"ms infinite;",backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:n?"1em":null,height:"1em",verticalAlign:"top",width:"1em"},"")})},Me=function(e){var t=e.className,n=e.cx,r=e.getStyles,i=e.innerProps,o=e.isRtl;return W("div",Se({},i,{css:r("loadingIndicator",e),className:n({indicator:!0,"loading-indicator":!0},t)}),W($e,{delay:0,offset:o}),W($e,{delay:160,offset:!0}),W($e,{delay:320,offset:!o}))};function je(){return(je=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}Me.defaultProps={size:4};function Pe(){return(Pe=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Ie(){return(Ie=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var Ne=function(e){return{label:"input",background:0,border:0,fontSize:"inherit",opacity:e?0:1,outline:0,padding:0,color:"inherit"}};function Fe(){return(Fe=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var De=function(e){var t=e.children,n=e.innerProps;return W("div",n,t)},We=De,ze=De;var Be=function(e){var t=e.children,n=e.className,r=e.components,i=e.cx,o=e.data,s=e.getStyles,a=e.innerProps,l=e.isDisabled,c=e.removeProps,u=e.selectProps,h=r.Container,d=r.Label,p=r.Remove;return W(V,null,(function(r){var f=r.css,m=r.cx;return W(h,{data:o,innerProps:Fe({},a,{className:m(f(s("multiValue",e)),i({"multi-value":!0,"multi-value--is-disabled":l},n))}),selectProps:u},W(d,{data:o,innerProps:{className:m(f(s("multiValueLabel",e)),i({"multi-value__label":!0},n))},selectProps:u},t),W(p,{data:o,innerProps:Fe({className:m(f(s("multiValueRemove",e)),i({"multi-value__remove":!0},n))},c),selectProps:u}))}))};function Ve(){return(Ve=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}Be.defaultProps={cropWithEllipsis:!0};function He(){return(He=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Ue(){return(Ue=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Ge(){return(Ge=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var qe={ClearIndicator:function(e){var t=e.children,n=e.className,r=e.cx,i=e.getStyles,o=e.innerProps;return W("div",Se({},o,{css:i("clearIndicator",e),className:r({indicator:!0,"clear-indicator":!0},n)}),t||W(Ce,null))},Control:function(e){var t=e.children,n=e.cx,r=e.getStyles,i=e.className,o=e.isDisabled,s=e.isFocused,a=e.innerRef,l=e.innerProps,c=e.menuIsOpen;return W("div",je({ref:a,css:r("control",e),className:n({control:!0,"control--is-disabled":o,"control--is-focused":s,"control--menu-is-open":c},i)},l),t)},DropdownIndicator:function(e){var t=e.children,n=e.className,r=e.cx,i=e.getStyles,o=e.innerProps;return W("div",Se({},o,{css:i("dropdownIndicator",e),className:r({indicator:!0,"dropdown-indicator":!0},n)}),t||W(Te,null))},DownChevron:Te,CrossIcon:Ce,Group:function(e){var t=e.children,n=e.className,r=e.cx,i=e.getStyles,o=e.Heading,s=e.headingProps,a=e.label,l=e.theme,c=e.selectProps;return W("div",{css:i("group",e),className:r({group:!0},n)},W(o,Pe({},s,{selectProps:c,theme:l,getStyles:i,cx:r}),a),W("div",null,t))},GroupHeading:function(e){var t=e.className,n=e.cx,r=e.getStyles,i=e.theme,o=(e.selectProps,function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,["className","cx","getStyles","theme","selectProps"]));return W("div",Pe({css:r("groupHeading",Pe({theme:i},o)),className:n({"group-heading":!0},t)},o))},IndicatorsContainer:function(e){var t=e.children,n=e.className,r=e.cx,i=e.getStyles;return W("div",{css:i("indicatorsContainer",e),className:r({indicators:!0},n)},t)},IndicatorSeparator:function(e){var t=e.className,n=e.cx,r=e.getStyles,i=e.innerProps;return W("span",Se({},i,{css:r("indicatorSeparator",e),className:n({"indicator-separator":!0},t)}))},Input:function(e){var t=e.className,n=e.cx,r=e.getStyles,i=e.innerRef,o=e.isHidden,s=e.isDisabled,a=e.theme,l=(e.selectProps,function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,["className","cx","getStyles","innerRef","isHidden","isDisabled","theme","selectProps"]));return W("div",{css:r("input",Ie({theme:a},l))},W(ie.a,Ie({className:n({input:!0},t),inputRef:i,inputStyle:Ne(o),disabled:s},l)))},LoadingIndicator:Me,Menu:function(e){var t=e.children,n=e.className,r=e.cx,i=e.getStyles,o=e.innerRef,s=e.innerProps;return W("div",se({css:i("menu",e),className:r({menu:!0},n)},s,{ref:o}),t)},MenuList:function(e){var t=e.children,n=e.className,r=e.cx,i=e.getStyles,o=e.isMulti,s=e.innerRef;return W("div",{css:i("menuList",e),className:r({"menu-list":!0,"menu-list--is-multi":o},n),ref:s},t)},MenuPortal:ge,LoadingMessage:me,NoOptionsMessage:fe,MultiValue:Be,MultiValueContainer:We,MultiValueLabel:ze,MultiValueRemove:function(e){var t=e.children,n=e.innerProps;return W("div",n,t||W(Ce,{size:14}))},Option:function(e){var t=e.children,n=e.className,r=e.cx,i=e.getStyles,o=e.isDisabled,s=e.isFocused,a=e.isSelected,l=e.innerRef,c=e.innerProps;return W("div",Ve({css:i("option",e),className:r({option:!0,"option--is-disabled":o,"option--is-focused":s,"option--is-selected":a},n),ref:l},c),t)},Placeholder:function(e){var t=e.children,n=e.className,r=e.cx,i=e.getStyles,o=e.innerProps;return W("div",He({css:i("placeholder",e),className:r({placeholder:!0},n)},o),t)},SelectContainer:function(e){var t=e.children,n=e.className,r=e.cx,i=e.getStyles,o=e.innerProps,s=e.isDisabled,a=e.isRtl;return W("div",ke({css:i("container",e),className:r({"--is-disabled":s,"--is-rtl":a},n)},o),t)},SingleValue:function(e){var t=e.children,n=e.className,r=e.cx,i=e.getStyles,o=e.isDisabled,s=e.innerProps;return W("div",Ue({css:i("singleValue",e),className:r({"single-value":!0,"single-value--is-disabled":o},n)},s),t)},ValueContainer:function(e){var t=e.children,n=e.className,r=e.cx,i=e.isMulti,o=e.getStyles,s=e.hasValue;return W("div",{css:o("valueContainer",e),className:r({"value-container":!0,"value-container--is-multi":i,"value-container--has-value":s},n)},t)}};function Ke(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}var Ye=function(e,t){var n;void 0===t&&(t=Ke);var r,i=[],o=!1;return function(){for(var s=[],a=0;a<arguments.length;a++)s[a]=arguments[a];return o&&n===this&&t(s,i)||(r=e.apply(this,s),o=!0,n=this,i=s),r}},Xe=[{base:"A",letters:/[\u0041\u24B6\uFF21\u00C0\u00C1\u00C2\u1EA6\u1EA4\u1EAA\u1EA8\u00C3\u0100\u0102\u1EB0\u1EAE\u1EB4\u1EB2\u0226\u01E0\u00C4\u01DE\u1EA2\u00C5\u01FA\u01CD\u0200\u0202\u1EA0\u1EAC\u1EB6\u1E00\u0104\u023A\u2C6F]/g},{base:"AA",letters:/[\uA732]/g},{base:"AE",letters:/[\u00C6\u01FC\u01E2]/g},{base:"AO",letters:/[\uA734]/g},{base:"AU",letters:/[\uA736]/g},{base:"AV",letters:/[\uA738\uA73A]/g},{base:"AY",letters:/[\uA73C]/g},{base:"B",letters:/[\u0042\u24B7\uFF22\u1E02\u1E04\u1E06\u0243\u0182\u0181]/g},{base:"C",letters:/[\u0043\u24B8\uFF23\u0106\u0108\u010A\u010C\u00C7\u1E08\u0187\u023B\uA73E]/g},{base:"D",letters:/[\u0044\u24B9\uFF24\u1E0A\u010E\u1E0C\u1E10\u1E12\u1E0E\u0110\u018B\u018A\u0189\uA779]/g},{base:"DZ",letters:/[\u01F1\u01C4]/g},{base:"Dz",letters:/[\u01F2\u01C5]/g},{base:"E",letters:/[\u0045\u24BA\uFF25\u00C8\u00C9\u00CA\u1EC0\u1EBE\u1EC4\u1EC2\u1EBC\u0112\u1E14\u1E16\u0114\u0116\u00CB\u1EBA\u011A\u0204\u0206\u1EB8\u1EC6\u0228\u1E1C\u0118\u1E18\u1E1A\u0190\u018E]/g},{base:"F",letters:/[\u0046\u24BB\uFF26\u1E1E\u0191\uA77B]/g},{base:"G",letters:/[\u0047\u24BC\uFF27\u01F4\u011C\u1E20\u011E\u0120\u01E6\u0122\u01E4\u0193\uA7A0\uA77D\uA77E]/g},{base:"H",letters:/[\u0048\u24BD\uFF28\u0124\u1E22\u1E26\u021E\u1E24\u1E28\u1E2A\u0126\u2C67\u2C75\uA78D]/g},{base:"I",letters:/[\u0049\u24BE\uFF29\u00CC\u00CD\u00CE\u0128\u012A\u012C\u0130\u00CF\u1E2E\u1EC8\u01CF\u0208\u020A\u1ECA\u012E\u1E2C\u0197]/g},{base:"J",letters:/[\u004A\u24BF\uFF2A\u0134\u0248]/g},{base:"K",letters:/[\u004B\u24C0\uFF2B\u1E30\u01E8\u1E32\u0136\u1E34\u0198\u2C69\uA740\uA742\uA744\uA7A2]/g},{base:"L",letters:/[\u004C\u24C1\uFF2C\u013F\u0139\u013D\u1E36\u1E38\u013B\u1E3C\u1E3A\u0141\u023D\u2C62\u2C60\uA748\uA746\uA780]/g},{base:"LJ",letters:/[\u01C7]/g},{base:"Lj",letters:/[\u01C8]/g},{base:"M",letters:/[\u004D\u24C2\uFF2D\u1E3E\u1E40\u1E42\u2C6E\u019C]/g},{base:"N",letters:/[\u004E\u24C3\uFF2E\u01F8\u0143\u00D1\u1E44\u0147\u1E46\u0145\u1E4A\u1E48\u0220\u019D\uA790\uA7A4]/g},{base:"NJ",letters:/[\u01CA]/g},{base:"Nj",letters:/[\u01CB]/g},{base:"O",letters:/[\u004F\u24C4\uFF2F\u00D2\u00D3\u00D4\u1ED2\u1ED0\u1ED6\u1ED4\u00D5\u1E4C\u022C\u1E4E\u014C\u1E50\u1E52\u014E\u022E\u0230\u00D6\u022A\u1ECE\u0150\u01D1\u020C\u020E\u01A0\u1EDC\u1EDA\u1EE0\u1EDE\u1EE2\u1ECC\u1ED8\u01EA\u01EC\u00D8\u01FE\u0186\u019F\uA74A\uA74C]/g},{base:"OI",letters:/[\u01A2]/g},{base:"OO",letters:/[\uA74E]/g},{base:"OU",letters:/[\u0222]/g},{base:"P",letters:/[\u0050\u24C5\uFF30\u1E54\u1E56\u01A4\u2C63\uA750\uA752\uA754]/g},{base:"Q",letters:/[\u0051\u24C6\uFF31\uA756\uA758\u024A]/g},{base:"R",letters:/[\u0052\u24C7\uFF32\u0154\u1E58\u0158\u0210\u0212\u1E5A\u1E5C\u0156\u1E5E\u024C\u2C64\uA75A\uA7A6\uA782]/g},{base:"S",letters:/[\u0053\u24C8\uFF33\u1E9E\u015A\u1E64\u015C\u1E60\u0160\u1E66\u1E62\u1E68\u0218\u015E\u2C7E\uA7A8\uA784]/g},{base:"T",letters:/[\u0054\u24C9\uFF34\u1E6A\u0164\u1E6C\u021A\u0162\u1E70\u1E6E\u0166\u01AC\u01AE\u023E\uA786]/g},{base:"TZ",letters:/[\uA728]/g},{base:"U",letters:/[\u0055\u24CA\uFF35\u00D9\u00DA\u00DB\u0168\u1E78\u016A\u1E7A\u016C\u00DC\u01DB\u01D7\u01D5\u01D9\u1EE6\u016E\u0170\u01D3\u0214\u0216\u01AF\u1EEA\u1EE8\u1EEE\u1EEC\u1EF0\u1EE4\u1E72\u0172\u1E76\u1E74\u0244]/g},{base:"V",letters:/[\u0056\u24CB\uFF36\u1E7C\u1E7E\u01B2\uA75E\u0245]/g},{base:"VY",letters:/[\uA760]/g},{base:"W",letters:/[\u0057\u24CC\uFF37\u1E80\u1E82\u0174\u1E86\u1E84\u1E88\u2C72]/g},{base:"X",letters:/[\u0058\u24CD\uFF38\u1E8A\u1E8C]/g},{base:"Y",letters:/[\u0059\u24CE\uFF39\u1EF2\u00DD\u0176\u1EF8\u0232\u1E8E\u0178\u1EF6\u1EF4\u01B3\u024E\u1EFE]/g},{base:"Z",letters:/[\u005A\u24CF\uFF3A\u0179\u1E90\u017B\u017D\u1E92\u1E94\u01B5\u0224\u2C7F\u2C6B\uA762]/g},{base:"a",letters:/[\u0061\u24D0\uFF41\u1E9A\u00E0\u00E1\u00E2\u1EA7\u1EA5\u1EAB\u1EA9\u00E3\u0101\u0103\u1EB1\u1EAF\u1EB5\u1EB3\u0227\u01E1\u00E4\u01DF\u1EA3\u00E5\u01FB\u01CE\u0201\u0203\u1EA1\u1EAD\u1EB7\u1E01\u0105\u2C65\u0250]/g},{base:"aa",letters:/[\uA733]/g},{base:"ae",letters:/[\u00E6\u01FD\u01E3]/g},{base:"ao",letters:/[\uA735]/g},{base:"au",letters:/[\uA737]/g},{base:"av",letters:/[\uA739\uA73B]/g},{base:"ay",letters:/[\uA73D]/g},{base:"b",letters:/[\u0062\u24D1\uFF42\u1E03\u1E05\u1E07\u0180\u0183\u0253]/g},{base:"c",letters:/[\u0063\u24D2\uFF43\u0107\u0109\u010B\u010D\u00E7\u1E09\u0188\u023C\uA73F\u2184]/g},{base:"d",letters:/[\u0064\u24D3\uFF44\u1E0B\u010F\u1E0D\u1E11\u1E13\u1E0F\u0111\u018C\u0256\u0257\uA77A]/g},{base:"dz",letters:/[\u01F3\u01C6]/g},{base:"e",letters:/[\u0065\u24D4\uFF45\u00E8\u00E9\u00EA\u1EC1\u1EBF\u1EC5\u1EC3\u1EBD\u0113\u1E15\u1E17\u0115\u0117\u00EB\u1EBB\u011B\u0205\u0207\u1EB9\u1EC7\u0229\u1E1D\u0119\u1E19\u1E1B\u0247\u025B\u01DD]/g},{base:"f",letters:/[\u0066\u24D5\uFF46\u1E1F\u0192\uA77C]/g},{base:"g",letters:/[\u0067\u24D6\uFF47\u01F5\u011D\u1E21\u011F\u0121\u01E7\u0123\u01E5\u0260\uA7A1\u1D79\uA77F]/g},{base:"h",letters:/[\u0068\u24D7\uFF48\u0125\u1E23\u1E27\u021F\u1E25\u1E29\u1E2B\u1E96\u0127\u2C68\u2C76\u0265]/g},{base:"hv",letters:/[\u0195]/g},{base:"i",letters:/[\u0069\u24D8\uFF49\u00EC\u00ED\u00EE\u0129\u012B\u012D\u00EF\u1E2F\u1EC9\u01D0\u0209\u020B\u1ECB\u012F\u1E2D\u0268\u0131]/g},{base:"j",letters:/[\u006A\u24D9\uFF4A\u0135\u01F0\u0249]/g},{base:"k",letters:/[\u006B\u24DA\uFF4B\u1E31\u01E9\u1E33\u0137\u1E35\u0199\u2C6A\uA741\uA743\uA745\uA7A3]/g},{base:"l",letters:/[\u006C\u24DB\uFF4C\u0140\u013A\u013E\u1E37\u1E39\u013C\u1E3D\u1E3B\u017F\u0142\u019A\u026B\u2C61\uA749\uA781\uA747]/g},{base:"lj",letters:/[\u01C9]/g},{base:"m",letters:/[\u006D\u24DC\uFF4D\u1E3F\u1E41\u1E43\u0271\u026F]/g},{base:"n",letters:/[\u006E\u24DD\uFF4E\u01F9\u0144\u00F1\u1E45\u0148\u1E47\u0146\u1E4B\u1E49\u019E\u0272\u0149\uA791\uA7A5]/g},{base:"nj",letters:/[\u01CC]/g},{base:"o",letters:/[\u006F\u24DE\uFF4F\u00F2\u00F3\u00F4\u1ED3\u1ED1\u1ED7\u1ED5\u00F5\u1E4D\u022D\u1E4F\u014D\u1E51\u1E53\u014F\u022F\u0231\u00F6\u022B\u1ECF\u0151\u01D2\u020D\u020F\u01A1\u1EDD\u1EDB\u1EE1\u1EDF\u1EE3\u1ECD\u1ED9\u01EB\u01ED\u00F8\u01FF\u0254\uA74B\uA74D\u0275]/g},{base:"oi",letters:/[\u01A3]/g},{base:"ou",letters:/[\u0223]/g},{base:"oo",letters:/[\uA74F]/g},{base:"p",letters:/[\u0070\u24DF\uFF50\u1E55\u1E57\u01A5\u1D7D\uA751\uA753\uA755]/g},{base:"q",letters:/[\u0071\u24E0\uFF51\u024B\uA757\uA759]/g},{base:"r",letters:/[\u0072\u24E1\uFF52\u0155\u1E59\u0159\u0211\u0213\u1E5B\u1E5D\u0157\u1E5F\u024D\u027D\uA75B\uA7A7\uA783]/g},{base:"s",letters:/[\u0073\u24E2\uFF53\u00DF\u015B\u1E65\u015D\u1E61\u0161\u1E67\u1E63\u1E69\u0219\u015F\u023F\uA7A9\uA785\u1E9B]/g},{base:"t",letters:/[\u0074\u24E3\uFF54\u1E6B\u1E97\u0165\u1E6D\u021B\u0163\u1E71\u1E6F\u0167\u01AD\u0288\u2C66\uA787]/g},{base:"tz",letters:/[\uA729]/g},{base:"u",letters:/[\u0075\u24E4\uFF55\u00F9\u00FA\u00FB\u0169\u1E79\u016B\u1E7B\u016D\u00FC\u01DC\u01D8\u01D6\u01DA\u1EE7\u016F\u0171\u01D4\u0215\u0217\u01B0\u1EEB\u1EE9\u1EEF\u1EED\u1EF1\u1EE5\u1E73\u0173\u1E77\u1E75\u0289]/g},{base:"v",letters:/[\u0076\u24E5\uFF56\u1E7D\u1E7F\u028B\uA75F\u028C]/g},{base:"vy",letters:/[\uA761]/g},{base:"w",letters:/[\u0077\u24E6\uFF57\u1E81\u1E83\u0175\u1E87\u1E85\u1E98\u1E89\u2C73]/g},{base:"x",letters:/[\u0078\u24E7\uFF58\u1E8B\u1E8D]/g},{base:"y",letters:/[\u0079\u24E8\uFF59\u1EF3\u00FD\u0177\u1EF9\u0233\u1E8F\u00FF\u1EF7\u1E99\u1EF5\u01B4\u024F\u1EFF]/g},{base:"z",letters:/[\u007A\u24E9\uFF5A\u017A\u1E91\u017C\u017E\u1E93\u1E95\u01B6\u0225\u0240\u2C6C\uA763]/g}],Je=function(e){for(var t=0;t<Xe.length;t++)e=e.replace(Xe[t].letters,Xe[t].base);return e};function Qe(){return(Qe=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var Ze=function(e){return e.replace(/^\s+|\s+$/g,"")},et=function(e){return e.label+" "+e.value};function tt(){return(tt=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var nt={name:"1laao21-a11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap;"},rt=function(e){return W("span",tt({css:nt},e))};function it(){return(it=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function ot(e){e.in,e.out,e.onExited,e.appear,e.enter,e.exit;var t=e.innerRef,n=(e.emotion,function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,["in","out","onExited","appear","enter","exit","innerRef","emotion"]));return W("input",it({ref:t},n,{css:O({label:"dummyInput",background:0,border:0,fontSize:"inherit",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(0)"},"")}))}var st=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.componentDidMount=function(){this.props.innerRef(Object(H.findDOMNode)(this))},i.componentWillUnmount=function(){this.props.innerRef(null)},i.render=function(){return this.props.children},r}(i.Component),at=["boxSizing","height","overflow","paddingRight","position"],lt={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function ct(e){e.preventDefault()}function ut(e){e.stopPropagation()}function ht(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;0===e?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function dt(){return"ontouchstart"in window||navigator.maxTouchPoints}var pt=!(!window.document||!window.document.createElement),ft=0,mt=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=e.call.apply(e,[this].concat(r))||this).originalStyles={},t.listenerOptions={capture:!1,passive:!1},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.componentDidMount=function(){var e=this;if(pt){var t=this.props,n=t.accountForScrollbars,r=t.touchScrollTarget,i=document.body,o=i&&i.style;if(n&&at.forEach((function(t){var n=o&&o[t];e.originalStyles[t]=n})),n&&ft<1){var s=parseInt(this.originalStyles.paddingRight,10)||0,a=document.body?document.body.clientWidth:0,l=window.innerWidth-a+s||0;Object.keys(lt).forEach((function(e){var t=lt[e];o&&(o[e]=t)})),o&&(o.paddingRight=l+"px")}i&&dt()&&(i.addEventListener("touchmove",ct,this.listenerOptions),r&&(r.addEventListener("touchstart",ht,this.listenerOptions),r.addEventListener("touchmove",ut,this.listenerOptions))),ft+=1}},i.componentWillUnmount=function(){var e=this;if(pt){var t=this.props,n=t.accountForScrollbars,r=t.touchScrollTarget,i=document.body,o=i&&i.style;ft=Math.max(ft-1,0),n&&ft<1&&at.forEach((function(t){var n=e.originalStyles[t];o&&(o[t]=n)})),i&&dt()&&(i.removeEventListener("touchmove",ct,this.listenerOptions),r&&(r.removeEventListener("touchstart",ht,this.listenerOptions),r.removeEventListener("touchmove",ut,this.listenerOptions)))}},i.render=function(){return null},r}(i.Component);mt.defaultProps={accountForScrollbars:!0};var gt={name:"1dsbpcp",styles:"position:fixed;left:0;bottom:0;right:0;top:0;"},vt=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=e.call.apply(e,[this].concat(r))||this).state={touchScrollTarget:null},t.getScrollTarget=function(e){e!==t.state.touchScrollTarget&&t.setState({touchScrollTarget:e})},t.blurSelectInput=function(){document.activeElement&&document.activeElement.blur()},t}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r.prototype.render=function(){var e=this.props,t=e.children,n=e.isEnabled,r=this.state.touchScrollTarget;return n?W("div",null,W("div",{onClick:this.blurSelectInput,css:gt}),W(st,{innerRef:this.getScrollTarget},t),r?W(mt,{touchScrollTarget:r}):null):t},r}(i.PureComponent);var bt=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=e.call.apply(e,[this].concat(r))||this).isBottom=!1,t.isTop=!1,t.scrollTarget=void 0,t.touchStart=void 0,t.cancelScroll=function(e){e.preventDefault(),e.stopPropagation()},t.handleEventDelta=function(e,n){var r=t.props,i=r.onBottomArrive,o=r.onBottomLeave,s=r.onTopArrive,a=r.onTopLeave,l=t.scrollTarget,c=l.scrollTop,u=l.scrollHeight,h=l.clientHeight,d=t.scrollTarget,p=n>0,f=u-h-c,m=!1;f>n&&t.isBottom&&(o&&o(e),t.isBottom=!1),p&&t.isTop&&(a&&a(e),t.isTop=!1),p&&n>f?(i&&!t.isBottom&&i(e),d.scrollTop=u,m=!0,t.isBottom=!0):!p&&-n>c&&(s&&!t.isTop&&s(e),d.scrollTop=0,m=!0,t.isTop=!0),m&&t.cancelScroll(e)},t.onWheel=function(e){t.handleEventDelta(e,e.deltaY)},t.onTouchStart=function(e){t.touchStart=e.changedTouches[0].clientY},t.onTouchMove=function(e){var n=t.touchStart-e.changedTouches[0].clientY;t.handleEventDelta(e,n)},t.getScrollTarget=function(e){t.scrollTarget=e},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.componentDidMount=function(){this.startListening(this.scrollTarget)},i.componentWillUnmount=function(){this.stopListening(this.scrollTarget)},i.startListening=function(e){e&&("function"==typeof e.addEventListener&&e.addEventListener("wheel",this.onWheel,!1),"function"==typeof e.addEventListener&&e.addEventListener("touchstart",this.onTouchStart,!1),"function"==typeof e.addEventListener&&e.addEventListener("touchmove",this.onTouchMove,!1))},i.stopListening=function(e){"function"==typeof e.removeEventListener&&e.removeEventListener("wheel",this.onWheel,!1),"function"==typeof e.removeEventListener&&e.removeEventListener("touchstart",this.onTouchStart,!1),"function"==typeof e.removeEventListener&&e.removeEventListener("touchmove",this.onTouchMove,!1)},i.render=function(){return o.a.createElement(st,{innerRef:this.getScrollTarget},this.props.children)},r}(i.Component);function yt(e){var t=e.isEnabled,n=void 0===t||t,r=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,["isEnabled"]);return n?o.a.createElement(bt,r):r.children}var wt=function(e,t){void 0===t&&(t={});var n=t,r=n.isSearchable,i=n.isMulti,o=n.label,s=n.isDisabled;switch(e){case"menu":return"Use Up and Down to choose options"+(s?"":", press Enter to select the currently focused option")+", press Escape to exit the menu, press Tab to select the option and exit the menu.";case"input":return(o||"Select")+" is focused "+(r?",type to refine list":"")+", press Down to open the menu, "+(i?" press left to focus selected values":"");case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value"}},kt=function(e,t){var n=t.value,r=t.isDisabled;if(n)switch(e){case"deselect-option":case"pop-value":case"remove-value":return"option "+n+", deselected.";case"select-option":return r?"option "+n+" is disabled. Select another option.":"option "+n+", selected."}},xt=function(e){return!!e.isDisabled};var St={clearIndicator:Oe,container:function(e){var t=e.isDisabled;return{label:"container",direction:e.isRtl?"rtl":null,pointerEvents:t?"none":null,position:"relative"}},control:function(e){var t=e.isDisabled,n=e.isFocused,r=e.theme,i=r.colors,o=r.borderRadius,s=r.spacing;return{label:"control",alignItems:"center",backgroundColor:t?i.neutral5:i.neutral0,borderColor:t?i.neutral10:n?i.primary:i.neutral20,borderRadius:o,borderStyle:"solid",borderWidth:1,boxShadow:n?"0 0 0 1px "+i.primary:null,cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:s.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms","&:hover":{borderColor:n?i.primary:i.neutral30}}},dropdownIndicator:Ae,group:function(e){var t=e.theme.spacing;return{paddingBottom:2*t.baseUnit,paddingTop:2*t.baseUnit}},groupHeading:function(e){var t=e.theme.spacing;return{label:"group",color:"#999",cursor:"default",display:"block",fontSize:"75%",fontWeight:"500",marginBottom:"0.25em",paddingLeft:3*t.baseUnit,paddingRight:3*t.baseUnit,textTransform:"uppercase"}},indicatorsContainer:function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},indicatorSeparator:function(e){var t=e.isDisabled,n=e.theme,r=n.spacing.baseUnit,i=n.colors;return{label:"indicatorSeparator",alignSelf:"stretch",backgroundColor:t?i.neutral10:i.neutral20,marginBottom:2*r,marginTop:2*r,width:1}},input:function(e){var t=e.isDisabled,n=e.theme,r=n.spacing,i=n.colors;return{margin:r.baseUnit/2,paddingBottom:r.baseUnit/2,paddingTop:r.baseUnit/2,visibility:t?"hidden":"visible",color:i.neutral80}},loadingIndicator:function(e){var t=e.isFocused,n=e.size,r=e.theme,i=r.colors,o=r.spacing.baseUnit;return{label:"loadingIndicator",color:t?i.neutral60:i.neutral20,display:"flex",padding:2*o,transition:"color 150ms",alignSelf:"center",fontSize:n,lineHeight:1,marginRight:n,textAlign:"center",verticalAlign:"middle"}},loadingMessage:pe,menu:function(e){var t,n=e.placement,r=e.theme,i=r.borderRadius,o=r.spacing,s=r.colors;return(t={label:"menu"})[function(e){return e?{bottom:"top",top:"bottom"}[e]:"bottom"}(n)]="100%",t.backgroundColor=s.neutral0,t.borderRadius=i,t.boxShadow="0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",t.marginBottom=o.menuGutter,t.marginTop=o.menuGutter,t.position="absolute",t.width="100%",t.zIndex=1,t},menuList:function(e){var t=e.maxHeight,n=e.theme.spacing.baseUnit;return{maxHeight:t,overflowY:"auto",paddingBottom:n,paddingTop:n,position:"relative",WebkitOverflowScrolling:"touch"}},menuPortal:function(e){var t=e.rect,n=e.offset,r=e.position;return{left:t.left,position:r,top:n,width:t.width,zIndex:1}},multiValue:function(e){var t=e.theme,n=t.spacing,r=t.borderRadius;return{label:"multiValue",backgroundColor:t.colors.neutral10,borderRadius:r/2,display:"flex",margin:n.baseUnit/2,minWidth:0}},multiValueLabel:function(e){var t=e.theme,n=t.borderRadius,r=t.colors,i=e.cropWithEllipsis;return{borderRadius:n/2,color:r.neutral80,fontSize:"85%",overflow:"hidden",padding:3,paddingLeft:6,textOverflow:i?"ellipsis":null,whiteSpace:"nowrap"}},multiValueRemove:function(e){var t=e.theme,n=t.spacing,r=t.borderRadius,i=t.colors;return{alignItems:"center",borderRadius:r/2,backgroundColor:e.isFocused&&i.dangerLight,display:"flex",paddingLeft:n.baseUnit,paddingRight:n.baseUnit,":hover":{backgroundColor:i.dangerLight,color:i.danger}}},noOptionsMessage:de,option:function(e){var t=e.isDisabled,n=e.isFocused,r=e.isSelected,i=e.theme,o=i.spacing,s=i.colors;return{label:"option",backgroundColor:r?s.primary:n?s.primary25:"transparent",color:t?s.neutral20:r?s.neutral0:"inherit",cursor:"default",display:"block",fontSize:"inherit",padding:2*o.baseUnit+"px "+3*o.baseUnit+"px",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)",":active":{backgroundColor:!t&&(r?s.primary:s.primary50)}}},placeholder:function(e){var t=e.theme,n=t.spacing;return{label:"placeholder",color:t.colors.neutral50,marginLeft:n.baseUnit/2,marginRight:n.baseUnit/2,position:"absolute",top:"50%",transform:"translateY(-50%)"}},singleValue:function(e){var t=e.isDisabled,n=e.theme,r=n.spacing,i=n.colors;return{label:"singleValue",color:t?i.neutral40:i.neutral80,marginLeft:r.baseUnit/2,marginRight:r.baseUnit/2,maxWidth:"calc(100% - "+2*r.baseUnit+"px)",overflow:"hidden",position:"absolute",textOverflow:"ellipsis",whiteSpace:"nowrap",top:"50%",transform:"translateY(-50%)"}},valueContainer:function(e){var t=e.theme.spacing;return{alignItems:"center",display:"flex",flex:1,flexWrap:"wrap",padding:t.baseUnit/2+"px "+2*t.baseUnit+"px",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"}}};var Et={borderRadius:4,colors:{primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},spacing:{baseUnit:4,controlHeight:38,menuGutter:8}};function _t(){return(_t=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Ct(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var Tt,Lt={backspaceRemovesValue:!0,blurInputOnSelect:ne(),captureMenuScroll:!ne(),closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:function(e,t){var n=Qe({ignoreCase:!0,ignoreAccents:!0,stringify:et,trim:!0,matchFrom:"any"},Tt),r=n.ignoreCase,i=n.ignoreAccents,o=n.stringify,s=n.trim,a=n.matchFrom,l=s?Ze(t):t,c=s?Ze(o(e)):o(e);return r&&(l=l.toLowerCase(),c=c.toLowerCase()),i&&(l=Je(l),c=Je(c)),"start"===a?c.substr(0,l.length)===l:c.indexOf(l)>-1},formatGroupLabel:function(e){return e.label},getOptionLabel:function(e){return e.label},getOptionValue:function(e){return e.value},isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:xt,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!function(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch(e){return!1}}(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var t=e.count;return t+" result"+(1!==t?"s":"")+" available"},styles:{},tabIndex:"0",tabSelectsValue:!0},At=1,Ot=function(e){var t,n;function r(t){var n;(n=e.call(this,t)||this).state={ariaLiveSelection:"",ariaLiveContext:"",focusedOption:null,focusedValue:null,inputIsHidden:!1,isFocused:!1,menuOptions:{render:[],focusable:[]},selectValue:[]},n.blockOptionHover=!1,n.isComposing=!1,n.clearFocusValueOnUpdate=!1,n.commonProps=void 0,n.components=void 0,n.hasGroups=!1,n.initialTouchX=0,n.initialTouchY=0,n.inputIsHiddenAfterUpdate=void 0,n.instancePrefix="",n.openAfterFocus=!1,n.scrollToFocusedOptionOnUpdate=!1,n.userIsDragging=void 0,n.controlRef=null,n.getControlRef=function(e){n.controlRef=e},n.focusedOptionRef=null,n.getFocusedOptionRef=function(e){n.focusedOptionRef=e},n.menuListRef=null,n.getMenuListRef=function(e){n.menuListRef=e},n.inputRef=null,n.getInputRef=function(e){n.inputRef=e},n.cacheComponents=function(e){n.components=Ge({},qe,{components:e}.components)},n.focus=n.focusInput,n.blur=n.blurInput,n.onChange=function(e,t){var r=n.props;(0,r.onChange)(e,_t({},t,{name:r.name}))},n.setValue=function(e,t,r){void 0===t&&(t="set-value");var i=n.props,o=i.closeMenuOnSelect,s=i.isMulti;n.onInputChange("",{action:"set-value"}),o&&(n.inputIsHiddenAfterUpdate=!s,n.onMenuClose()),n.clearFocusValueOnUpdate=!0,n.onChange(e,{action:t,option:r})},n.selectOption=function(e){var t=n.props,r=t.blurInputOnSelect,i=t.isMulti,o=n.state.selectValue;if(i)if(n.isOptionSelected(e,o)){var s=n.getOptionValue(e);n.setValue(o.filter((function(e){return n.getOptionValue(e)!==s})),"deselect-option",e),n.announceAriaLiveSelection({event:"deselect-option",context:{value:n.getOptionLabel(e)}})}else n.isOptionDisabled(e,o)?n.announceAriaLiveSelection({event:"select-option",context:{value:n.getOptionLabel(e),isDisabled:!0}}):(n.setValue([].concat(o,[e]),"select-option",e),n.announceAriaLiveSelection({event:"select-option",context:{value:n.getOptionLabel(e)}}));else n.isOptionDisabled(e,o)?n.announceAriaLiveSelection({event:"select-option",context:{value:n.getOptionLabel(e),isDisabled:!0}}):(n.setValue(e,"select-option"),n.announceAriaLiveSelection({event:"select-option",context:{value:n.getOptionLabel(e)}}));r&&n.blurInput()},n.removeValue=function(e){var t=n.state.selectValue,r=n.getOptionValue(e),i=t.filter((function(e){return n.getOptionValue(e)!==r}));n.onChange(i.length?i:null,{action:"remove-value",removedValue:e}),n.announceAriaLiveSelection({event:"remove-value",context:{value:e?n.getOptionLabel(e):""}}),n.focusInput()},n.clearValue=function(){var e=n.props.isMulti;n.onChange(e?[]:null,{action:"clear"})},n.popValue=function(){var e=n.state.selectValue,t=e[e.length-1],r=e.slice(0,e.length-1);n.announceAriaLiveSelection({event:"pop-value",context:{value:t?n.getOptionLabel(t):""}}),n.onChange(r.length?r:null,{action:"pop-value",removedValue:t})},n.getOptionLabel=function(e){return n.props.getOptionLabel(e)},n.getOptionValue=function(e){return n.props.getOptionValue(e)},n.getStyles=function(e,t){var r=St[e](t);r.boxSizing="border-box";var i=n.props.styles[e];return i?i(r,t):r},n.getElementId=function(e){return n.instancePrefix+"-"+e},n.getActiveDescendentId=function(){var e=n.props.menuIsOpen,t=n.state,r=t.menuOptions,i=t.focusedOption;if(i&&e){var o=r.focusable.indexOf(i),s=r.render[o];return s&&s.key}},n.announceAriaLiveSelection=function(e){var t=e.event,r=e.context;n.setState({ariaLiveSelection:kt(t,r)})},n.announceAriaLiveContext=function(e){var t=e.event,r=e.context;n.setState({ariaLiveContext:wt(t,_t({},r,{label:n.props["aria-label"]}))})},n.onMenuMouseDown=function(e){0===e.button&&(e.stopPropagation(),e.preventDefault(),n.focusInput())},n.onMenuMouseMove=function(e){n.blockOptionHover=!1},n.onControlMouseDown=function(e){var t=n.props.openMenuOnClick;n.state.isFocused?n.props.menuIsOpen?"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&n.onMenuClose():t&&n.openMenu("first"):(t&&(n.openAfterFocus=!0),n.focusInput()),"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&e.preventDefault()},n.onDropdownIndicatorMouseDown=function(e){if(!(e&&"mousedown"===e.type&&0!==e.button||n.props.isDisabled)){var t=n.props,r=t.isMulti,i=t.menuIsOpen;n.focusInput(),i?(n.inputIsHiddenAfterUpdate=!r,n.onMenuClose()):n.openMenu("first"),e.preventDefault(),e.stopPropagation()}},n.onClearIndicatorMouseDown=function(e){e&&"mousedown"===e.type&&0!==e.button||(n.clearValue(),e.stopPropagation(),n.openAfterFocus=!1,"touchend"===e.type?n.focusInput():setTimeout((function(){return n.focusInput()})))},n.onScroll=function(e){"boolean"==typeof n.props.closeMenuOnScroll?e.target instanceof HTMLElement&&Q(e.target)&&n.props.onMenuClose():"function"==typeof n.props.closeMenuOnScroll&&n.props.closeMenuOnScroll(e)&&n.props.onMenuClose()},n.onCompositionStart=function(){n.isComposing=!0},n.onCompositionEnd=function(){n.isComposing=!1},n.onTouchStart=function(e){var t=e.touches.item(0);t&&(n.initialTouchX=t.clientX,n.initialTouchY=t.clientY,n.userIsDragging=!1)},n.onTouchMove=function(e){var t=e.touches.item(0);if(t){var r=Math.abs(t.clientX-n.initialTouchX),i=Math.abs(t.clientY-n.initialTouchY);n.userIsDragging=r>5||i>5}},n.onTouchEnd=function(e){n.userIsDragging||(n.controlRef&&!n.controlRef.contains(e.target)&&n.menuListRef&&!n.menuListRef.contains(e.target)&&n.blurInput(),n.initialTouchX=0,n.initialTouchY=0)},n.onControlTouchEnd=function(e){n.userIsDragging||n.onControlMouseDown(e)},n.onClearIndicatorTouchEnd=function(e){n.userIsDragging||n.onClearIndicatorMouseDown(e)},n.onDropdownIndicatorTouchEnd=function(e){n.userIsDragging||n.onDropdownIndicatorMouseDown(e)},n.handleInputChange=function(e){var t=e.currentTarget.value;n.inputIsHiddenAfterUpdate=!1,n.onInputChange(t,{action:"input-change"}),n.onMenuOpen()},n.onInputFocus=function(e){var t=n.props,r=t.isSearchable,i=t.isMulti;n.props.onFocus&&n.props.onFocus(e),n.inputIsHiddenAfterUpdate=!1,n.announceAriaLiveContext({event:"input",context:{isSearchable:r,isMulti:i}}),n.setState({isFocused:!0}),(n.openAfterFocus||n.props.openMenuOnFocus)&&n.openMenu("first"),n.openAfterFocus=!1},n.onInputBlur=function(e){n.menuListRef&&n.menuListRef.contains(document.activeElement)?n.inputRef.focus():(n.props.onBlur&&n.props.onBlur(e),n.onInputChange("",{action:"input-blur"}),n.onMenuClose(),n.setState({focusedValue:null,isFocused:!1}))},n.onOptionHover=function(e){n.blockOptionHover||n.state.focusedOption===e||n.setState({focusedOption:e})},n.shouldHideSelectedOptions=function(){var e=n.props,t=e.hideSelectedOptions,r=e.isMulti;return void 0===t?r:t},n.onKeyDown=function(e){var t=n.props,r=t.isMulti,i=t.backspaceRemovesValue,o=t.escapeClearsValue,s=t.inputValue,a=t.isClearable,l=t.isDisabled,c=t.menuIsOpen,u=t.onKeyDown,h=t.tabSelectsValue,d=t.openMenuOnFocus,p=n.state,f=p.focusedOption,m=p.focusedValue,g=p.selectValue;if(!(l||"function"==typeof u&&(u(e),e.defaultPrevented))){switch(n.blockOptionHover=!0,e.key){case"ArrowLeft":if(!r||s)return;n.focusValue("previous");break;case"ArrowRight":if(!r||s)return;n.focusValue("next");break;case"Delete":case"Backspace":if(s)return;if(m)n.removeValue(m);else{if(!i)return;r?n.popValue():a&&n.clearValue()}break;case"Tab":if(n.isComposing)return;if(e.shiftKey||!c||!h||!f||d&&n.isOptionSelected(f,g))return;n.selectOption(f);break;case"Enter":if(229===e.keyCode)break;if(c){if(!f)return;if(n.isComposing)return;n.selectOption(f);break}return;case"Escape":c?(n.inputIsHiddenAfterUpdate=!1,n.onInputChange("",{action:"menu-close"}),n.onMenuClose()):a&&o&&n.clearValue();break;case" ":if(s)return;if(!c){n.openMenu("first");break}if(!f)return;n.selectOption(f);break;case"ArrowUp":c?n.focusOption("up"):n.openMenu("last");break;case"ArrowDown":c?n.focusOption("down"):n.openMenu("first");break;case"PageUp":if(!c)return;n.focusOption("pageup");break;case"PageDown":if(!c)return;n.focusOption("pagedown");break;case"Home":if(!c)return;n.focusOption("first");break;case"End":if(!c)return;n.focusOption("last");break;default:return}e.preventDefault()}},n.buildMenuOptions=function(e,t){var r=e.inputValue,i=void 0===r?"":r,o=e.options,s=function(e,r){var o=n.isOptionDisabled(e,t),s=n.isOptionSelected(e,t),a=n.getOptionLabel(e),l=n.getOptionValue(e);if(!(n.shouldHideSelectedOptions()&&s||!n.filterOption({label:a,value:l,data:e},i))){var c=o?void 0:function(){return n.onOptionHover(e)},u=o?void 0:function(){return n.selectOption(e)},h=n.getElementId("option")+"-"+r;return{innerProps:{id:h,onClick:u,onMouseMove:c,onMouseOver:c,tabIndex:-1},data:e,isDisabled:o,isSelected:s,key:h,label:a,type:"option",value:l}}};return o.reduce((function(e,t,r){if(t.options){n.hasGroups||(n.hasGroups=!0);var i=t.options.map((function(t,n){var i=s(t,r+"-"+n);return i&&e.focusable.push(t),i})).filter(Boolean);if(i.length){var o=n.getElementId("group")+"-"+r;e.render.push({type:"group",key:o,data:t,options:i})}}else{var a=s(t,""+r);a&&(e.render.push(a),e.focusable.push(t))}return e}),{render:[],focusable:[]})};var r=t.value;n.cacheComponents=Ye(n.cacheComponents,we).bind(Ct(Ct(n))),n.cacheComponents(t.components),n.instancePrefix="react-select-"+(n.props.instanceId||++At);var i=J(r);n.buildMenuOptions=Ye(n.buildMenuOptions,(function(e,t){var n=e,r=n[0],i=n[1],o=t,s=o[0];return we(i,o[1])&&we(r.inputValue,s.inputValue)&&we(r.options,s.options)})).bind(Ct(Ct(n)));var o=t.menuIsOpen?n.buildMenuOptions(t,i):{render:[],focusable:[]};return n.state.menuOptions=o,n.state.selectValue=i,n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.componentDidMount=function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput()},i.UNSAFE_componentWillReceiveProps=function(e){var t=this.props,n=t.options,r=t.value,i=t.menuIsOpen,o=t.inputValue;if(this.cacheComponents(e.components),e.value!==r||e.options!==n||e.menuIsOpen!==i||e.inputValue!==o){var s=J(e.value),a=e.menuIsOpen?this.buildMenuOptions(e,s):{render:[],focusable:[]},l=this.getNextFocusedValue(s),c=this.getNextFocusedOption(a.focusable);this.setState({menuOptions:a,selectValue:s,focusedOption:c,focusedValue:l})}null!=this.inputIsHiddenAfterUpdate&&(this.setState({inputIsHidden:this.inputIsHiddenAfterUpdate}),delete this.inputIsHiddenAfterUpdate)},i.componentDidUpdate=function(e){var t,n,r,i,o,s=this.props,a=s.isDisabled,l=s.menuIsOpen,c=this.state.isFocused;(c&&!a&&e.isDisabled||c&&l&&!e.menuIsOpen)&&this.focusInput(),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(t=this.menuListRef,n=this.focusedOptionRef,r=t.getBoundingClientRect(),i=n.getBoundingClientRect(),o=n.offsetHeight/3,i.bottom+o>r.bottom?ee(t,Math.min(n.offsetTop+n.clientHeight-t.offsetHeight+o,t.scrollHeight)):i.top-o<r.top&&ee(t,Math.max(n.offsetTop-o,0)),this.scrollToFocusedOptionOnUpdate=!1)},i.componentWillUnmount=function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)},i.onMenuOpen=function(){this.props.onMenuOpen()},i.onMenuClose=function(){var e=this.props,t=e.isSearchable,n=e.isMulti;this.announceAriaLiveContext({event:"input",context:{isSearchable:t,isMulti:n}}),this.onInputChange("",{action:"menu-close"}),this.props.onMenuClose()},i.onInputChange=function(e,t){this.props.onInputChange(e,t)},i.focusInput=function(){this.inputRef&&this.inputRef.focus()},i.blurInput=function(){this.inputRef&&this.inputRef.blur()},i.openMenu=function(e){var t=this,n=this.state,r=n.selectValue,i=n.isFocused,o=this.buildMenuOptions(this.props,r),s=this.props.isMulti,a="first"===e?0:o.focusable.length-1;if(!s){var l=o.focusable.indexOf(r[0]);l>-1&&(a=l)}this.scrollToFocusedOptionOnUpdate=!(i&&this.menuListRef),this.inputIsHiddenAfterUpdate=!1,this.setState({menuOptions:o,focusedValue:null,focusedOption:o.focusable[a]},(function(){t.onMenuOpen(),t.announceAriaLiveContext({event:"menu"})}))},i.focusValue=function(e){var t=this.props,n=t.isMulti,r=t.isSearchable,i=this.state,o=i.selectValue,s=i.focusedValue;if(n){this.setState({focusedOption:null});var a=o.indexOf(s);s||(a=-1,this.announceAriaLiveContext({event:"value"}));var l=o.length-1,c=-1;if(o.length){switch(e){case"previous":c=0===a?0:-1===a?l:a-1;break;case"next":a>-1&&a<l&&(c=a+1)}-1===c&&this.announceAriaLiveContext({event:"input",context:{isSearchable:r,isMulti:n}}),this.setState({inputIsHidden:-1!==c,focusedValue:o[c]})}}},i.focusOption=function(e){void 0===e&&(e="first");var t=this.props.pageSize,n=this.state,r=n.focusedOption,i=n.menuOptions.focusable;if(i.length){var o=0,s=i.indexOf(r);r||(s=-1,this.announceAriaLiveContext({event:"menu"})),"up"===e?o=s>0?s-1:i.length-1:"down"===e?o=(s+1)%i.length:"pageup"===e?(o=s-t)<0&&(o=0):"pagedown"===e?(o=s+t)>i.length-1&&(o=i.length-1):"last"===e&&(o=i.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:i[o],focusedValue:null}),this.announceAriaLiveContext({event:"menu",context:{isDisabled:xt(i[o])}})}},i.getTheme=function(){return this.props.theme?"function"==typeof this.props.theme?this.props.theme(Et):_t({},Et,this.props.theme):Et},i.getCommonProps=function(){var e=this.clearValue,t=this.getStyles,n=this.setValue,r=this.selectOption,i=this.props,o=i.classNamePrefix,s=i.isMulti,a=i.isRtl,l=i.options,c=this.state.selectValue,u=this.hasValue();return{cx:X.bind(null,o),clearValue:e,getStyles:t,getValue:function(){return c},hasValue:u,isMulti:s,isRtl:a,options:l,selectOption:r,setValue:n,selectProps:i,theme:this.getTheme()}},i.getNextFocusedValue=function(e){if(this.clearFocusValueOnUpdate)return this.clearFocusValueOnUpdate=!1,null;var t=this.state,n=t.focusedValue,r=t.selectValue.indexOf(n);if(r>-1){if(e.indexOf(n)>-1)return n;if(r<e.length)return e[r]}return null},i.getNextFocusedOption=function(e){var t=this.state.focusedOption;return t&&e.indexOf(t)>-1?t:e[0]},i.hasValue=function(){return this.state.selectValue.length>0},i.hasOptions=function(){return!!this.state.menuOptions.render.length},i.countOptions=function(){return this.state.menuOptions.focusable.length},i.isClearable=function(){var e=this.props,t=e.isClearable,n=e.isMulti;return void 0===t?n:t},i.isOptionDisabled=function(e,t){return"function"==typeof this.props.isOptionDisabled&&this.props.isOptionDisabled(e,t)},i.isOptionSelected=function(e,t){var n=this;if(t.indexOf(e)>-1)return!0;if("function"==typeof this.props.isOptionSelected)return this.props.isOptionSelected(e,t);var r=this.getOptionValue(e);return t.some((function(e){return n.getOptionValue(e)===r}))},i.filterOption=function(e,t){return!this.props.filterOption||this.props.filterOption(e,t)},i.formatOptionLabel=function(e,t){if("function"==typeof this.props.formatOptionLabel){var n=this.props.inputValue,r=this.state.selectValue;return this.props.formatOptionLabel(e,{context:t,inputValue:n,selectValue:r})}return this.getOptionLabel(e)},i.formatGroupLabel=function(e){return this.props.formatGroupLabel(e)},i.startListeningComposition=function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))},i.stopListeningComposition=function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))},i.startListeningToTouch=function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))},i.stopListeningToTouch=function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))},i.constructAriaLiveMessage=function(){var e=this.state,t=e.ariaLiveContext,n=e.selectValue,r=e.focusedValue,i=e.focusedOption,o=this.props,s=o.options,a=o.menuIsOpen,l=o.inputValue,c=o.screenReaderStatus;return(r?function(e){var t=e.focusedValue,n=e.getOptionLabel,r=e.selectValue;return"value "+n(t)+" focused, "+(r.indexOf(t)+1)+" of "+r.length+"."}({focusedValue:r,getOptionLabel:this.getOptionLabel,selectValue:n}):"")+" "+(i&&a?function(e){var t=e.focusedOption,n=e.getOptionLabel,r=e.options;return"option "+n(t)+" focused"+(t.isDisabled?" disabled":"")+", "+(r.indexOf(t)+1)+" of "+r.length+"."}({focusedOption:i,getOptionLabel:this.getOptionLabel,options:s}):"")+" "+function(e){var t=e.inputValue;return e.screenReaderMessage+(t?" for search term "+t:"")+"."}({inputValue:l,screenReaderMessage:c({count:this.countOptions()})})+" "+t},i.renderInput=function(){var e=this.props,t=e.isDisabled,n=e.isSearchable,r=e.inputId,i=e.inputValue,s=e.tabIndex,a=this.components.Input,l=this.state.inputIsHidden,c=r||this.getElementId("input"),u={"aria-autocomplete":"list","aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"]};if(!n)return o.a.createElement(ot,_t({id:c,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:K,onFocus:this.onInputFocus,readOnly:!0,disabled:t,tabIndex:s,value:""},u));var h=this.commonProps,d=h.cx,p=h.theme,f=h.selectProps;return o.a.createElement(a,_t({autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",cx:d,getStyles:this.getStyles,id:c,innerRef:this.getInputRef,isDisabled:t,isHidden:l,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,selectProps:f,spellCheck:"false",tabIndex:s,theme:p,type:"text",value:i},u))},i.renderPlaceholderOrValue=function(){var e=this,t=this.components,n=t.MultiValue,r=t.MultiValueContainer,i=t.MultiValueLabel,s=t.MultiValueRemove,a=t.SingleValue,l=t.Placeholder,c=this.commonProps,u=this.props,h=u.controlShouldRenderValue,d=u.isDisabled,p=u.isMulti,f=u.inputValue,m=u.placeholder,g=this.state,v=g.selectValue,b=g.focusedValue,y=g.isFocused;if(!this.hasValue()||!h)return f?null:o.a.createElement(l,_t({},c,{key:"placeholder",isDisabled:d,isFocused:y}),m);if(p)return v.map((function(t,a){var l=t===b;return o.a.createElement(n,_t({},c,{components:{Container:r,Label:i,Remove:s},isFocused:l,isDisabled:d,key:e.getOptionValue(t),index:a,removeProps:{onClick:function(){return e.removeValue(t)},onTouchEnd:function(){return e.removeValue(t)},onMouseDown:function(e){e.preventDefault(),e.stopPropagation()}},data:t}),e.formatOptionLabel(t,"value"))}));if(f)return null;var w=v[0];return o.a.createElement(a,_t({},c,{data:w,isDisabled:d}),this.formatOptionLabel(w,"value"))},i.renderClearIndicator=function(){var e=this.components.ClearIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,i=n.isLoading,s=this.state.isFocused;if(!this.isClearable()||!e||r||!this.hasValue()||i)return null;var a={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return o.a.createElement(e,_t({},t,{innerProps:a,isFocused:s}))},i.renderLoadingIndicator=function(){var e=this.components.LoadingIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,i=n.isLoading,s=this.state.isFocused;if(!e||!i)return null;return o.a.createElement(e,_t({},t,{innerProps:{"aria-hidden":"true"},isDisabled:r,isFocused:s}))},i.renderIndicatorSeparator=function(){var e=this.components,t=e.DropdownIndicator,n=e.IndicatorSeparator;if(!t||!n)return null;var r=this.commonProps,i=this.props.isDisabled,s=this.state.isFocused;return o.a.createElement(n,_t({},r,{isDisabled:i,isFocused:s}))},i.renderDropdownIndicator=function(){var e=this.components.DropdownIndicator;if(!e)return null;var t=this.commonProps,n=this.props.isDisabled,r=this.state.isFocused,i={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return o.a.createElement(e,_t({},t,{innerProps:i,isDisabled:n,isFocused:r}))},i.renderMenu=function(){var e=this,t=this.components,n=t.Group,r=t.GroupHeading,i=t.Menu,s=t.MenuList,a=t.MenuPortal,l=t.LoadingMessage,c=t.NoOptionsMessage,u=t.Option,h=this.commonProps,d=this.state,p=d.focusedOption,f=d.menuOptions,m=this.props,g=m.captureMenuScroll,v=m.inputValue,b=m.isLoading,y=m.loadingMessage,w=m.minMenuHeight,k=m.maxMenuHeight,x=m.menuIsOpen,S=m.menuPlacement,E=m.menuPosition,_=m.menuPortalTarget,C=m.menuShouldBlockScroll,T=m.menuShouldScrollIntoView,L=m.noOptionsMessage,A=m.onMenuScrollToTop,O=m.onMenuScrollToBottom;if(!x)return null;var R,$=function(t){var n=p===t.data;return t.innerRef=n?e.getFocusedOptionRef:void 0,o.a.createElement(u,_t({},h,t,{isFocused:n}),e.formatOptionLabel(t.data,"menu"))};if(this.hasOptions())R=f.render.map((function(t){if("group"===t.type){t.type;var i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(t,["type"]),s=t.key+"-heading";return o.a.createElement(n,_t({},h,i,{Heading:r,headingProps:{id:s},label:e.formatGroupLabel(t.data)}),t.options.map((function(e){return $(e)})))}if("option"===t.type)return $(t)}));else if(b){var M=y({inputValue:v});if(null===M)return null;R=o.a.createElement(l,h,M)}else{var j=L({inputValue:v});if(null===j)return null;R=o.a.createElement(c,h,j)}var P={minMenuHeight:w,maxMenuHeight:k,menuPlacement:S,menuPosition:E,menuShouldScrollIntoView:T},I=o.a.createElement(ue,_t({},h,P),(function(t){var n=t.ref,r=t.placerProps,a=r.placement,l=r.maxHeight;return o.a.createElement(i,_t({},h,P,{innerRef:n,innerProps:{onMouseDown:e.onMenuMouseDown,onMouseMove:e.onMenuMouseMove},isLoading:b,placement:a}),o.a.createElement(yt,{isEnabled:g,onTopArrive:A,onBottomArrive:O},o.a.createElement(vt,{isEnabled:C},o.a.createElement(s,_t({},h,{innerRef:e.getMenuListRef,isLoading:b,maxHeight:l}),R))))}));return _||"fixed"===E?o.a.createElement(a,_t({},h,{appendTo:_,controlElement:this.controlRef,menuPlacement:S,menuPosition:E}),I):I},i.renderFormField=function(){var e=this,t=this.props,n=t.delimiter,r=t.isDisabled,i=t.isMulti,s=t.name,a=this.state.selectValue;if(s&&!r){if(i){if(n){var l=a.map((function(t){return e.getOptionValue(t)})).join(n);return o.a.createElement("input",{name:s,type:"hidden",value:l})}var c=a.length>0?a.map((function(t,n){return o.a.createElement("input",{key:"i-"+n,name:s,type:"hidden",value:e.getOptionValue(t)})})):o.a.createElement("input",{name:s,type:"hidden"});return o.a.createElement("div",null,c)}var u=a[0]?this.getOptionValue(a[0]):"";return o.a.createElement("input",{name:s,type:"hidden",value:u})}},i.renderLiveRegion=function(){return this.state.isFocused?o.a.createElement(rt,{"aria-live":"polite"},o.a.createElement("p",{id:"aria-selection-event"}," ",this.state.ariaLiveSelection),o.a.createElement("p",{id:"aria-context"}," ",this.constructAriaLiveMessage())):null},i.render=function(){var e=this.components,t=e.Control,n=e.IndicatorsContainer,r=e.SelectContainer,i=e.ValueContainer,s=this.props,a=s.className,l=s.id,c=s.isDisabled,u=s.menuIsOpen,h=this.state.isFocused,d=this.commonProps=this.getCommonProps();return o.a.createElement(r,_t({},d,{className:a,innerProps:{id:l,onKeyDown:this.onKeyDown},isDisabled:c,isFocused:h}),this.renderLiveRegion(),o.a.createElement(t,_t({},d,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:c,isFocused:h,menuIsOpen:u}),o.a.createElement(i,_t({},d,{isDisabled:c}),this.renderPlaceholderOrValue(),this.renderInput()),o.a.createElement(n,_t({},d,{isDisabled:c}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())},r}(i.Component);function Rt(){return(Rt=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}Ot.defaultProps=Lt;var $t={defaultInputValue:"",defaultMenuIsOpen:!1,defaultValue:null},Mt=function(e){var t,n;return n=t=function(t){var n,r;function i(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).select=void 0,e.state={inputValue:void 0!==e.props.inputValue?e.props.inputValue:e.props.defaultInputValue,menuIsOpen:void 0!==e.props.menuIsOpen?e.props.menuIsOpen:e.props.defaultMenuIsOpen,value:void 0!==e.props.value?e.props.value:e.props.defaultValue},e.onChange=function(t,n){e.callProp("onChange",t,n),e.setState({value:t})},e.onInputChange=function(t,n){var r=e.callProp("onInputChange",t,n);e.setState({inputValue:void 0!==r?r:t})},e.onMenuOpen=function(){e.callProp("onMenuOpen"),e.setState({menuIsOpen:!0})},e.onMenuClose=function(){e.callProp("onMenuClose"),e.setState({menuIsOpen:!1})},e}r=t,(n=i).prototype=Object.create(r.prototype),n.prototype.constructor=n,n.__proto__=r;var s=i.prototype;return s.focus=function(){this.select.focus()},s.blur=function(){this.select.blur()},s.getProp=function(e){return void 0!==this.props[e]?this.props[e]:this.state[e]},s.callProp=function(e){if("function"==typeof this.props[e]){for(var t,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return(t=this.props)[e].apply(t,r)}},s.render=function(){var t=this,n=this.props,r=(n.defaultInputValue,n.defaultMenuIsOpen,n.defaultValue,function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(n,["defaultInputValue","defaultMenuIsOpen","defaultValue"]));return o.a.createElement(e,Rt({},r,{ref:function(e){t.select=e},inputValue:this.getProp("inputValue"),menuIsOpen:this.getProp("menuIsOpen"),onChange:this.onChange,onInputChange:this.onInputChange,onMenuClose:this.onMenuClose,onMenuOpen:this.onMenuOpen,value:this.getProp("value")}))},i}(i.Component),t.defaultProps=$t,n};i.Component;var jt=Mt(Ot);function Pt(){return(Pt=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var It,Nt,Ft,Dt={cacheOptions:!1,defaultOptions:!1,filterOption:null,isLoading:!1},Wt=Mt(Ot),zt=(It=Wt,Ft=Nt=function(e){var t,n;function r(t){var n;return(n=e.call(this)||this).select=void 0,n.lastRequest=void 0,n.mounted=!1,n.optionsCache={},n.handleInputChange=function(e,t){var r=n.props,i=r.cacheOptions,o=function(e,t,n){if(n){var r=n(e,t);if("string"==typeof r)return r}return e}(e,t,r.onInputChange);if(!o)return delete n.lastRequest,void n.setState({inputValue:"",loadedInputValue:"",loadedOptions:[],isLoading:!1,passEmptyOptions:!1});if(i&&n.optionsCache[o])n.setState({inputValue:o,loadedInputValue:o,loadedOptions:n.optionsCache[o],isLoading:!1,passEmptyOptions:!1});else{var s=n.lastRequest={};n.setState({inputValue:o,isLoading:!0,passEmptyOptions:!n.state.loadedInputValue},(function(){n.loadOptions(o,(function(e){n.mounted&&(e&&(n.optionsCache[o]=e),s===n.lastRequest&&(delete n.lastRequest,n.setState({isLoading:!1,loadedInputValue:o,loadedOptions:e||[],passEmptyOptions:!1})))}))}))}return o},n.state={defaultOptions:Array.isArray(t.defaultOptions)?t.defaultOptions:void 0,inputValue:void 0!==t.inputValue?t.inputValue:"",isLoading:!0===t.defaultOptions,loadedOptions:[],passEmptyOptions:!1},n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.componentDidMount=function(){var e=this;this.mounted=!0;var t=this.props.defaultOptions,n=this.state.inputValue;!0===t&&this.loadOptions(n,(function(t){if(e.mounted){var n=!!e.lastRequest;e.setState({defaultOptions:t||[],isLoading:n})}}))},i.UNSAFE_componentWillReceiveProps=function(e){e.cacheOptions!==this.props.cacheOptions&&(this.optionsCache={}),e.defaultOptions!==this.props.defaultOptions&&this.setState({defaultOptions:Array.isArray(e.defaultOptions)?e.defaultOptions:void 0})},i.componentWillUnmount=function(){this.mounted=!1},i.focus=function(){this.select.focus()},i.blur=function(){this.select.blur()},i.loadOptions=function(e,t){var n=this.props.loadOptions;if(!n)return t();var r=n(e,t);r&&"function"==typeof r.then&&r.then(t,(function(){return t()}))},i.render=function(){var e=this,t=this.props,n=(t.loadOptions,t.isLoading),r=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(t,["loadOptions","isLoading"]),i=this.state,s=i.defaultOptions,a=i.inputValue,l=i.isLoading,c=i.loadedInputValue,u=i.loadedOptions,h=i.passEmptyOptions?[]:a&&c?u:s||[];return o.a.createElement(It,Pt({},r,{ref:function(t){e.select=t},options:h,isLoading:l||n,onInputChange:this.handleInputChange}))},r}(i.Component),Nt.defaultProps=Dt,Ft);function Bt(){return(Bt=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var Vt=function(e,t){void 0===e&&(e="");var n=String(e).toLowerCase(),r=String(t.value).toLowerCase(),i=String(t.label).toLowerCase();return r===n||i===n},Ht=Bt({allowCreateWhileLoading:!1,createOptionPosition:"last"},{formatCreateLabel:function(e){return'Create "'+e+'"'},isValidNewOption:function(e,t,n){return!(!e||t.some((function(t){return Vt(e,t)}))||n.some((function(t){return Vt(e,t)})))},getNewOptionData:function(e,t){return{label:t,value:e,__isNew__:!0}}}),Ut=Mt(function(e){var t,n;return n=t=function(t){var n,r;function i(e){var n;(n=t.call(this,e)||this).select=void 0,n.onChange=function(e,t){var r=n.props,i=r.getNewOptionData,o=r.inputValue,s=r.isMulti,a=r.onChange,l=r.onCreateOption,c=r.value,u=r.name;if("select-option"!==t.action)return a(e,t);var h=n.state.newOption,d=Array.isArray(e)?e:[e];if(d[d.length-1]!==h)a(e,t);else if(l)l(o);else{var p=i(o,o),f={action:"create-option",name:u};a(s?[].concat(J(c),[p]):p,f)}};var r=e.options||[];return n.state={newOption:void 0,options:r},n}r=t,(n=i).prototype=Object.create(r.prototype),n.prototype.constructor=n,n.__proto__=r;var s=i.prototype;return s.UNSAFE_componentWillReceiveProps=function(e){var t=e.allowCreateWhileLoading,n=e.createOptionPosition,r=e.formatCreateLabel,i=e.getNewOptionData,o=e.inputValue,s=e.isLoading,a=e.isValidNewOption,l=e.value,c=e.options||[],u=this.state.newOption;u=a(o,J(l),c)?i(o,r(o)):void 0,this.setState({newOption:u,options:!t&&s||!u?c:"first"===n?[u].concat(c):[].concat(c,[u])})},s.focus=function(){this.select.focus()},s.blur=function(){this.select.blur()},s.render=function(){var t=this,n=this.state.options;return o.a.createElement(e,Bt({},this.props,{ref:function(e){t.select=e},options:n,onChange:this.onChange}))},i}(i.Component),t.defaultProps=Ht,n}(Ot));function Gt(e){return(Gt="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})(e)}function qt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Kt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Yt(e,t){return(Yt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Xt(e,t){return!t||"object"!==Gt(t)&&"function"!=typeof t?Jt(e):t}function Jt(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Qt(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function Zt(e){return(Zt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function en(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function tn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?en(Object(n),!0).forEach((function(t){nn(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):en(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function nn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var rn=qe.Option,on=window,sn=on.jQuery,an=on.ajaxurl,ln=on.VPGutenbergVariables,cn=wp.i18n.__,un=wp.element.Component,hn={control:function(e,t){return tn(tn(tn({},e),{},{cursor:"pointer",minHeight:30},t.isFocused&&!t.isDisabled?{borderColor:"#007cba"}:{borderColor:"#7e8993","&:hover":{borderColor:"#7e8993"}}),t.isFocused?{boxShadow:"0 0 0 1px #007cba","&:hover":{borderColor:"#007cba"}}:{})},valueContainer:function(e){return tn(tn({},e),{},{padding:"0 8px"})},input:function(e){return tn(tn({},e),{},{margin:0,height:30,paddingTop:0,paddingBottom:0,input:{boxShadow:"none !important"}})},dropdownIndicator:function(e){return tn(tn({},e),{},{padding:5,color:"#555555","&:hover":{color:"#555555"},svg:{width:17,height:17}})},clearIndicator:function(e){return tn(tn({},e),{},{padding:5,svg:{width:15,height:15}})},indicatorSeparator:function(){return!1},multiValue:function(e){return tn(tn({},e),{},{padding:"2px 3px",borderRadius:4,backgroundColor:"#555d66"})},multiValueLabel:function(e){return tn(tn({},e),{},{padding:0,color:"#fff"})},multiValueRemove:function(e){return tn(tn({},e),{},{padding:0,marginLeft:5,color:"#adadad",svg:{width:10,height:10}})},option:function(e,t){return tn(tn(tn({},e),{},{display:"flex",alignItems:"center",padding:"4px 10px"},t.isFocused?{backgroundColor:"#efefef"}:{}),t.isSelected?{backgroundColor:"#007cba"}:{})},menu:function(e){return tn(tn({},e),{},{zIndex:2})}},dn={},pn=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Yt(e,t)}(a,e);var t,n,i,o,s=(t=a,function(){var e,n=Zt(t);if(Qt()){var r=Zt(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return Xt(this,e)});function a(){var e;qt(this,a);for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];var o=(e=s.call.apply(s,[this].concat(n))).props.callback;return e.state={options:{},ajaxStatus:!!o},e.getOptions=e.getOptions.bind(Jt(e)),e.getDefaultValue=e.getDefaultValue.bind(Jt(e)),e.findValueData=e.findValueData.bind(Jt(e)),e.requestAjax=e.requestAjax.bind(Jt(e)),e.requestAjaxDebounce=Object(r.a)(300,e.requestAjax),e}return n=a,(i=[{key:"componentDidMount",value:function(){var e=this;this.props.callback&&this.requestAjax({},(function(t){t.options&&e.setState({options:t.options})}))}},{key:"getOptions",value:function(){var e=this.props.controlName;return dn[e]?dn[e]:Object.keys(this.state.options).length?this.state.options:this.props.options}},{key:"getDefaultValue",value:function(){var e=this,t=this.props,n=t.value,r=t.isMultiple,i=null;if(r){if(!n&&"string"!=typeof n||!n.length)return i;i=[],n.forEach((function(t){i.push(e.findValueData(t))}))}else{if(!n&&"string"!=typeof n)return i;i=this.findValueData(n)}return i}},{key:"findValueData",value:function(e){var t={value:e,label:e},n=this.getOptions();return n&&Object.keys(n).forEach((function(r){var i=n[r];r===e&&("string"==typeof i?t.label=i:t=i)})),t}},{key:"requestAjax",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0,r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=this.props,o=i.controlName,s=i.attributes;if(!this.isAJAXinProgress){this.isAJAXinProgress=!0,r&&this.setState({ajaxStatus:"progress"});var a=tn({action:"vp_dynamic_control_callback",nonce:ln.nonce,vp_control_name:o,vp_attributes:s},t);sn.ajax({url:an,method:"POST",dataType:"json",data:a,complete:function(t){var i=t.responseJSON;n&&i.response&&(i.response.options&&(dn[o]=tn(tn({},dn[o]),i.response.options)),n(i.response)),r&&e.setState({ajaxStatus:!0}),e.isAJAXinProgress=!1}})}}},{key:"prepareOptions",value:function(e){return Object.keys(e||{}).map((function(t){var n=e[t];return"object"===Gt(n)?{value:n.value,label:n.label}:{value:t,label:e[t]}}))}},{key:"render",value:function(){var e=this,t=this.props,n=t.onChange,r=t.isMultiple,i=t.isSearchable,o=t.isCreatable,s=t.callback,a=this.state.ajaxStatus,l=!!s&&i,c=a&&"progress"===a,u={className:"vpf-component-select",styles:hn,components:{Option:function(e){var t=e.data;return wp.element.createElement(rn,e,void 0!==t.img?wp.element.createElement("div",{className:"vpf-component-select-option-img"},t.img?wp.element.createElement("img",{src:t.img,alt:t.label}):""):"",wp.element.createElement("span",{className:"vpf-component-select-option-label"},t.label),t.category?wp.element.createElement("div",{className:"vpf-component-select-option-category"},t.category):"")}},value:this.getDefaultValue(),options:this.prepareOptions(this.getOptions()),onChange:function(e){if(r)if(Array.isArray(e)){var t=[];e.forEach((function(e){t.push(e?e.value:"")})),n(t)}else n([]);else n(e?e.value:"")},isMulti:r,isSearchable:i,isLoading:c,isClearable:!1,placeholder:cn(i?"Type to search...":"Select...","@@text_domain")};return o?(u.placeholder=cn("Type and press Enter...","@@text_domain"),u.isSearchable=!0,wp.element.createElement(Ut,u)):l?(u.loadOptions=function(t,n){e.requestAjaxDebounce({q:t},(function(e){var t=[];e&&e.options&&Object.keys(e.options).forEach((function(n){t.push(e.options[n])})),n(t.length?t:null)}),!1)},u.cacheOptions=!0,u.defaultOptions=u.options,delete u.options,delete u.isLoading,wp.element.createElement(zt,u)):wp.element.createElement(jt,u)}}])&&Kt(n.prototype,i),o&&Kt(n,o),a}(un)},function(e,t,n){"use strict";n.d(t,"a",(function(){return $}));n(210);var r=n(4),i=n(77),o=n.n(i),s=n(2),a=n.n(s),l=n(28),c=window.VPGutenbergVariables.controls;function u(e){var t="",n="";if(void 0!==e.block_id&&e.block_id?n=e.block_id:void 0!==e.id&&e.id&&(n=e.id),!n)return t;if(n=".vp-id-".concat(n),Object.keys(c).forEach((function(r){var i=c[r];void 0!==i.style&&i.style&&void 0!==i.condition&&i.condition.length&&Object(l.a)(i.condition,e)&&i.style.forEach((function(r){t+=function(e,t,n){var r="";return e&&void 0!==t&&""!==t&&null!==t&&void 0!==n.property?(void 0!==n.mask&&(t=n.mask.replace("$",t)),void 0!==n.element&&/\$/g.test(n.element)?e=n.element.replace("$",e):e+=void 0!==n.element?" ".concat(n.element):"",r="".concat(e," { ").concat(n.property,": ").concat(t,"; } ")):r}(n,e[i.name],r)}))})),void 0!==e.custom_css&&e.custom_css){var r=e.custom_css;r=(r=r.replace(/selector/g,n)).replace(/<\//g,"</"),t+=r}return t}function h(e){return(h="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})(e)}function d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?d(Object(n),!0).forEach((function(t){f(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function f(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function m(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function g(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function v(e,t){return(v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function b(e,t){return!t||"object"!==h(t)&&"function"!=typeof t?y(e):t}function y(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function w(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function k(e){return(k=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var x=window.jQuery,S=window.VPAdminGutenbergVariables,E=wp.hooks,_=E.applyFilters,C=E.addFilter,T=wp.element,L=T.Component,A=T.Fragment,O=T.createRef,R=wp.components.Spinner,$=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&v(e,t)}(d,e);var t,n,i,s,l=(t=d,function(){var e,n=k(t);if(w()){var r=k(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return b(this,e)});function d(){var e;m(this,d);for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return(e=l.call.apply(l,[this].concat(n))).state={attributes:p({},e.props.attributes),loading:!0},e.frameRef=O(),e.formRef=O(),e.maybeAttributesChanged=e.maybeAttributesChanged.bind(y(e)),e.onFrameLoad=e.onFrameLoad.bind(y(e)),e.maybeReload=e.maybeReload.bind(y(e)),e.maybeReloadDebounce=Object(r.a)(300,e.maybeReload.bind(y(e))),e.maybeResizePreviews=e.maybeResizePreviews.bind(y(e)),e.maybeResizePreviewsThrottle=Object(r.b)(100,e.maybeResizePreviews),e.printInput=e.printInput.bind(y(e)),e}return n=d,(i=[{key:"componentDidMount",value:function(){var e=this.props.clientId;o()({interval:10,checkOrigin:!1,messageCallback:function(t){"clicked"===t.message&&(wp.data.dispatch("core/editor").selectBlock(e),window.focus())}},this.frameRef.current),this.frameRef.current.addEventListener("load",this.onFrameLoad),window.addEventListener("resize",this.maybeResizePreviewsThrottle),this.maybeReload()}},{key:"componentDidUpdate",value:function(){this.maybeAttributesChanged()}},{key:"componentWillUnmount",value:function(){this.frameRef.current.removeEventListener("load",this.onFrameLoad),window.removeEventListener("resize",this.maybeResizePreviewsThrottle),this.frameRef.current.iframeResizer&&this.frameRef.current.iframeResizer.removeListeners()}},{key:"onFrameLoad",value:function(e){this.frameWindow=e.target.contentWindow,this.frameJQuery=e.target.contentWindow.jQuery,this.$framePortfolio=this.frameJQuery(".vp-portfolio"),this.maybeResizePreviews(),this.setState({loading:!1})}},{key:"maybeAttributesChanged",value:function(){var e=this;if(!this.busyReload){this.busyReload=!0;var t=this.props.attributes,n=this.state.attributes,r=this.frameRef.current,i={};if(Object.keys(t).forEach((function(e){var r=t[e];void 0!==n[e]&&n[e]===r||(i[e]=r)})),Object.keys(i).length){var o=!0;Object.keys(i).forEach((function(e){var t;o=o&&!(void 0!==c[t=e]&&void 0!==c[t].style&&c[t].style.length)}));var s=_("vpf.editor.changed-attributes",{attributes:i,reload:o,$frame:this.frameRef.current,frameWindow:this.frameWindow,frameJQuery:this.frameJQuery,$framePortfolio:this.$framePortfolio});s.reload||(s.frameWindow&&s.frameWindow.vp_preview_post_data&&(s.frameWindow.vp_preview_post_data[s.name]=s.value),r.iFrameResizer&&t.block_id&&r.iFrameResizer.sendMessage({name:"dynamic-css",blockId:t.block_id,styles:u(t)})),this.setState({attributes:p(p({},n),s.attributes)},(function(){s.reload&&e.maybeReloadDebounce(),e.busyReload=!1}))}else this.busyReload=!1}}},{key:"maybeReload",value:function(){this.setState({loading:!0}),this.formRef.current.submit()}},{key:"maybeResizePreviews",value:function(){var e=x(".editor-styles-wrapper").width();if(e&&this.frameRef.current){var t=this.frameRef.current,n=x(t),r=n.closest(".visual-portfolio-gutenberg-preview-inner"),i=n.closest(".visual-portfolio-gutenberg-preview").width();r.css({width:e}),t.iFrameResizer&&(t.iFrameResizer.sendMessage({name:"resize",width:i}),t.iFrameResizer.resize())}}},{key:"printInput",value:function(e,t){var n=this,r={key:e,type:"text",name:e,value:t};if("number"==typeof t)r.type="number";else if("boolean"==typeof t)r.type="number",r.value=t?1:0;else if("object"===h(t)&&null!==t)return wp.element.createElement(A,null,Object.keys(t).map((function(r){return n.printInput("".concat(e,"[").concat(r,"]"),t[r])})));return wp.element.createElement("input",r)}},{key:"render",value:function(){var e=this,t=this.props.clientId,n=this.state,r=n.attributes,i=n.loading,o=r.id,s=r.content_source;return wp.element.createElement("div",{className:a()("visual-portfolio-gutenberg-preview",i?"visual-portfolio-gutenberg-preview-loading":"")},wp.element.createElement("div",{className:"visual-portfolio-gutenberg-preview-inner"},wp.element.createElement("form",{action:S.preview_url,target:"vpf-preview-".concat(t),method:"POST",style:{display:"none"},ref:this.formRef},wp.element.createElement("input",{type:"hidden",name:"vp_preview_frame",value:"true"}),wp.element.createElement("input",{type:"hidden",name:"vp_preview_type",value:"gutenberg"}),"saved"===s?wp.element.createElement("input",{type:"text",name:"vp_id",value:o}):wp.element.createElement(A,null,wp.element.createElement("input",{type:"hidden",name:"vp_content_source",value:s}),Object.keys(r).map((function(t){var n=r[t];return e.printInput("vp_".concat(t),n)})))),wp.element.createElement("iframe",{title:"vp-preview",id:"vpf-preview-".concat(t),name:"vpf-preview-".concat(t),allowtransparency:"true",ref:this.frameRef})),i?wp.element.createElement(R,null):"")}}])&&g(n.prototype,i),s&&g(n,s),d}(L);C("vpf.editor.changed-attributes","vpf/editor/changed-attributes/live-reload",(function(e){if(!e.$framePortfolio)return e;var t=!1;return Object.keys(e.attributes).forEach((function(n){var r=e.attributes[n];switch(n){case"tiles_type":case"masonry_columns":case"masonry_images_aspect_ratio":case"grid_columns":case"grid_images_aspect_ratio":case"justified_row_height":case"justified_row_height_tolerance":case"slider_effect":case"slider_speed":case"slider_autoplay":case"slider_autoplay_hover_pause":case"slider_centered_slides":case"slider_loop":case"slider_free_mode":case"slider_free_mode_sticky":case"slider_bullets_dynamic":case"items_gap":e.$framePortfolio.attr("data-vp-".concat(n.replace(/_/g,"-")),r),e.$framePortfolio.vpf("init");break;case"items_style_default__align":case"items_style_fade__align":case"items_style_fly__align":case"items_style_emerge__align":var i="";["left","center","right","top-left","top-center","top-right","bottom-left","bottom-center","bottom-right"].forEach((function(e){i+="".concat(i?" ":"","vp-portfolio__item-align-").concat(e)})),e.$framePortfolio.find(".vp-portfolio__item-overlay").removeClass(i).addClass("vp-portfolio__item-align-".concat(r));break;case"filter_align":e.$framePortfolio.find(".vp-filter").removeClass("vp-filter__align-center vp-filter__align-left vp-filter__align-right").addClass("vp-filter__align-".concat(r));break;case"sort_align":e.$framePortfolio.find(".vp-sort").removeClass("vp-sort__align-center vp-sort__align-left vp-sort__align-right").addClass("vp-sort__align-".concat(r));break;case"pagination_align":e.$framePortfolio.find(".vp-pagination").removeClass("vp-pagination__align-center vp-pagination__align-left vp-pagination__align-right").addClass("vp-pagination__align-".concat(r));break;case"list_name":case"stretch":case"custom_css":break;default:t=t||e.reload}})),p(p({},e),{},{reload:t})}))},function(e,t){(function(t){e.exports=t}).call(this,{})},function(e,t,n){(function(e,n){function r(e){return(r="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})(e)}var i="[object Arguments]",o="[object Map]",s="[object Object]",a="[object Set]",l=/^\[object .+?Constructor\]$/,c=/^(?:0|[1-9]\d*)$/,u={};u["[object Float32Array]"]=u["[object Float64Array]"]=u["[object Int8Array]"]=u["[object Int16Array]"]=u["[object Int32Array]"]=u["[object Uint8Array]"]=u["[object Uint8ClampedArray]"]=u["[object Uint16Array]"]=u["[object Uint32Array]"]=!0,u[i]=u["[object Array]"]=u["[object ArrayBuffer]"]=u["[object Boolean]"]=u["[object DataView]"]=u["[object Date]"]=u["[object Error]"]=u["[object Function]"]=u[o]=u["[object Number]"]=u[s]=u["[object RegExp]"]=u[a]=u["[object String]"]=u["[object WeakMap]"]=!1;var h="object"==(void 0===e?"undefined":r(e))&&e&&e.Object===Object&&e,d="object"==("undefined"==typeof self?"undefined":r(self))&&self&&self.Object===Object&&self,p=h||d||Function("return this")(),f="object"==r(t)&&t&&!t.nodeType&&t,m=f&&"object"==r(n)&&n&&!n.nodeType&&n,g=m&&m.exports===f,v=g&&h.process,b=function(){try{return v&&v.binding&&v.binding("util")}catch(e){}}(),y=b&&b.isTypedArray;function w(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function k(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function x(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}var S,E,_,C=Array.prototype,T=Function.prototype,L=Object.prototype,A=p["__core-js_shared__"],O=T.toString,R=L.hasOwnProperty,$=(S=/[^.]+$/.exec(A&&A.keys&&A.keys.IE_PROTO||""))?"Symbol(src)_1."+S:"",M=L.toString,j=RegExp("^"+O.call(R).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),P=g?p.Buffer:void 0,I=p.Symbol,N=p.Uint8Array,F=L.propertyIsEnumerable,D=C.splice,W=I?I.toStringTag:void 0,z=Object.getOwnPropertySymbols,B=P?P.isBuffer:void 0,V=(E=Object.keys,_=Object,function(e){return E(_(e))}),H=be(p,"DataView"),U=be(p,"Map"),G=be(p,"Promise"),q=be(p,"Set"),K=be(p,"WeakMap"),Y=be(Object,"create"),X=xe(H),J=xe(U),Q=xe(G),Z=xe(q),ee=xe(K),te=I?I.prototype:void 0,ne=te?te.valueOf:void 0;function re(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function ie(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function oe(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function se(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new oe;++t<n;)this.add(e[t])}function ae(e){var t=this.__data__=new ie(e);this.size=t.size}function le(e,t){var n=_e(e),r=!n&&Ee(e),i=!n&&!r&&Ce(e),o=!n&&!r&&!i&&Re(e),s=n||r||i||o,a=s?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],l=a.length;for(var c in e)!t&&!R.call(e,c)||s&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||ke(c,l))||a.push(c);return a}function ce(e,t){for(var n=e.length;n--;)if(Se(e[n][0],t))return n;return-1}function ue(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":W&&W in Object(e)?function(e){var t=R.call(e,W),n=e[W];try{e[W]=void 0;var r=!0}catch(e){}var i=M.call(e);r&&(t?e[W]=n:delete e[W]);return i}(e):function(e){return M.call(e)}(e)}function he(e){return Oe(e)&&ue(e)==i}function de(e,t,n,r,l){return e===t||(null==e||null==t||!Oe(e)&&!Oe(t)?e!=e&&t!=t:function(e,t,n,r,l,c){var u=_e(e),h=_e(t),d=u?"[object Array]":we(e),p=h?"[object Array]":we(t),f=(d=d==i?s:d)==s,m=(p=p==i?s:p)==s,g=d==p;if(g&&Ce(e)){if(!Ce(t))return!1;u=!0,f=!1}if(g&&!f)return c||(c=new ae),u||Re(e)?me(e,t,n,r,l,c):function(e,t,n,r,i,s,l){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!s(new N(e),new N(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Se(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case o:var c=k;case a:var u=1&r;if(c||(c=x),e.size!=t.size&&!u)return!1;var h=l.get(e);if(h)return h==t;r|=2,l.set(e,t);var d=me(c(e),c(t),r,i,s,l);return l.delete(e),d;case"[object Symbol]":if(ne)return ne.call(e)==ne.call(t)}return!1}(e,t,d,n,r,l,c);if(!(1&n)){var v=f&&R.call(e,"__wrapped__"),b=m&&R.call(t,"__wrapped__");if(v||b){var y=v?e.value():e,w=b?t.value():t;return c||(c=new ae),l(y,w,n,r,c)}}if(!g)return!1;return c||(c=new ae),function(e,t,n,r,i,o){var s=1&n,a=ge(e),l=a.length,c=ge(t).length;if(l!=c&&!s)return!1;var u=l;for(;u--;){var h=a[u];if(!(s?h in t:R.call(t,h)))return!1}var d=o.get(e);if(d&&o.get(t))return d==t;var p=!0;o.set(e,t),o.set(t,e);var f=s;for(;++u<l;){h=a[u];var m=e[h],g=t[h];if(r)var v=s?r(g,m,h,t,e,o):r(m,g,h,e,t,o);if(!(void 0===v?m===g||i(m,g,n,r,o):v)){p=!1;break}f||(f="constructor"==h)}if(p&&!f){var b=e.constructor,y=t.constructor;b==y||!("constructor"in e)||!("constructor"in t)||"function"==typeof b&&b instanceof b&&"function"==typeof y&&y instanceof y||(p=!1)}return o.delete(e),o.delete(t),p}(e,t,n,r,l,c)}(e,t,n,r,de,l))}function pe(e){return!(!Ae(e)||function(e){return!!$&&$ in e}(e))&&(Te(e)?j:l).test(xe(e))}function fe(e){if(!function(e){var t=e&&e.constructor,n="function"==typeof t&&t.prototype||L;return e===n}(e))return V(e);var t=[];for(var n in Object(e))R.call(e,n)&&"constructor"!=n&&t.push(n);return t}function me(e,t,n,r,i,o){var s=1&n,a=e.length,l=t.length;if(a!=l&&!(s&&l>a))return!1;var c=o.get(e);if(c&&o.get(t))return c==t;var u=-1,h=!0,d=2&n?new se:void 0;for(o.set(e,t),o.set(t,e);++u<a;){var p=e[u],f=t[u];if(r)var m=s?r(f,p,u,t,e,o):r(p,f,u,e,t,o);if(void 0!==m){if(m)continue;h=!1;break}if(d){if(!w(t,(function(e,t){if(s=t,!d.has(s)&&(p===e||i(p,e,n,r,o)))return d.push(t);var s}))){h=!1;break}}else if(p!==f&&!i(p,f,n,r,o)){h=!1;break}}return o.delete(e),o.delete(t),h}function ge(e){return function(e,t,n){var r=t(e);return _e(e)?r:function(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}(r,n(e))}(e,$e,ye)}function ve(e,t){var n=e.__data__;return function(e){var t=r(e);return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?n["string"==typeof t?"string":"hash"]:n.map}function be(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return pe(n)?n:void 0}re.prototype.clear=function(){this.__data__=Y?Y(null):{},this.size=0},re.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},re.prototype.get=function(e){var t=this.__data__;if(Y){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return R.call(t,e)?t[e]:void 0},re.prototype.has=function(e){var t=this.__data__;return Y?void 0!==t[e]:R.call(t,e)},re.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Y&&void 0===t?"__lodash_hash_undefined__":t,this},ie.prototype.clear=function(){this.__data__=[],this.size=0},ie.prototype.delete=function(e){var t=this.__data__,n=ce(t,e);return!(n<0)&&(n==t.length-1?t.pop():D.call(t,n,1),--this.size,!0)},ie.prototype.get=function(e){var t=this.__data__,n=ce(t,e);return n<0?void 0:t[n][1]},ie.prototype.has=function(e){return ce(this.__data__,e)>-1},ie.prototype.set=function(e,t){var n=this.__data__,r=ce(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},oe.prototype.clear=function(){this.size=0,this.__data__={hash:new re,map:new(U||ie),string:new re}},oe.prototype.delete=function(e){var t=ve(this,e).delete(e);return this.size-=t?1:0,t},oe.prototype.get=function(e){return ve(this,e).get(e)},oe.prototype.has=function(e){return ve(this,e).has(e)},oe.prototype.set=function(e,t){var n=ve(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},se.prototype.add=se.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},se.prototype.has=function(e){return this.__data__.has(e)},ae.prototype.clear=function(){this.__data__=new ie,this.size=0},ae.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},ae.prototype.get=function(e){return this.__data__.get(e)},ae.prototype.has=function(e){return this.__data__.has(e)},ae.prototype.set=function(e,t){var n=this.__data__;if(n instanceof ie){var r=n.__data__;if(!U||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new oe(r)}return n.set(e,t),this.size=n.size,this};var ye=z?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var s=e[n];t(s,n,e)&&(o[i++]=s)}return o}(z(e),(function(t){return F.call(e,t)})))}:function(){return[]},we=ue;function ke(e,t){return!!(t=null==t?9007199254740991:t)&&("number"==typeof e||c.test(e))&&e>-1&&e%1==0&&e<t}function xe(e){if(null!=e){try{return O.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Se(e,t){return e===t||e!=e&&t!=t}(H&&"[object DataView]"!=we(new H(new ArrayBuffer(1)))||U&&we(new U)!=o||G&&"[object Promise]"!=we(G.resolve())||q&&we(new q)!=a||K&&"[object WeakMap]"!=we(new K))&&(we=function(e){var t=ue(e),n=t==s?e.constructor:void 0,r=n?xe(n):"";if(r)switch(r){case X:return"[object DataView]";case J:return o;case Q:return"[object Promise]";case Z:return a;case ee:return"[object WeakMap]"}return t});var Ee=he(function(){return arguments}())?he:function(e){return Oe(e)&&R.call(e,"callee")&&!F.call(e,"callee")},_e=Array.isArray;var Ce=B||function(){return!1};function Te(e){if(!Ae(e))return!1;var t=ue(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Le(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}function Ae(e){var t=r(e);return null!=e&&("object"==t||"function"==t)}function Oe(e){return null!=e&&"object"==r(e)}var Re=y?function(e){return function(t){return e(t)}}(y):function(e){return Oe(e)&&Le(e.length)&&!!u[ue(e)]};function $e(e){return function(e){return null!=e&&Le(e.length)&&!Te(e)}(e)?le(e):fe(e)}n.exports=function(e,t){return de(e,t)}}).call(this,n(18),n(11)(e))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.editorOptions=["minLines","maxLines","readOnly","highlightActiveLine","tabSize","enableBasicAutocompletion","enableLiveAutocompletion","enableSnippets"];t.editorEvents=["onChange","onFocus","onInput","onBlur","onCopy","onPaste","onSelectionChange","onCursorChange","onScroll","handleOptions","updateRef"];t.getAceInstance=function(){var e;return window.ace?(e=window.ace).acequire=window.ace.require||window.ace.acequire:e=n(47),e};t.debounce=function(e,t){var n=null;return function(){var r=this,i=arguments;clearTimeout(n),n=setTimeout((function(){e.apply(r,i)}),t)}}},function(e,t,n){(function(e){function r(e){return(r="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})(e)}!function(){var e=function(){return this}();e||"undefined"==typeof window||(e=window);var t=function e(t,n,r){"string"==typeof t?(2==arguments.length&&(r=n),e.modules[t]||(e.payloads[t]=r,e.modules[t]=null)):e.original?e.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace())};t.modules={},t.payloads={};var n,r,i=function(e,t,n){if("string"==typeof t){var r=s(e,t);if(null!=r)return n&&n(),r}else if("[object Array]"===Object.prototype.toString.call(t)){for(var i=[],a=0,l=t.length;a<l;++a){var c=s(e,t[a]);if(null==c&&o.original)return;i.push(c)}return n&&n.apply(null,i)||!0}},o=function e(t,n){var r=i("",t,n);return null==r&&e.original?e.original.apply(this,arguments):r},s=function(e,n){n=function e(t,n){if(-1!==n.indexOf("!")){var r=n.split("!");return e(t,r[0])+"!"+e(t,r[1])}if("."==n.charAt(0))for(n=t.split("/").slice(0,-1).join("/")+"/"+n;-1!==n.indexOf(".")&&i!=n;){var i=n;n=n.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}return n}(e,n);var r=t.modules[n];if(!r){if("function"==typeof(r=t.payloads[n])){var o={},s={id:n,uri:"",exports:o,packaged:!0};o=r((function(e,t){return i(n,e,t)}),o,s)||s.exports,t.modules[n]=o,delete t.payloads[n]}r=t.modules[n]=o||r}return r};r=e,(n="ace")&&(e[n]||(e[n]={}),r=e[n]),r.define&&r.define.packaged||(t.original=r.define,r.define=t,r.define.packaged=!0),r.require&&r.require.packaged||(o.original=r.require,r.require=o,r.require.packaged=!0)}(),ace.define("ace/lib/regexp",["require","exports","module"],(function(e,t,n){"use strict";var r,i={exec:RegExp.prototype.exec,test:RegExp.prototype.test,match:String.prototype.match,replace:String.prototype.replace,split:String.prototype.split},o=void 0===i.exec.call(/()??/,"")[1],s=(r=/^/g,i.test.call(r,""),!r.lastIndex);function a(e){return(e.global?"g":"")+(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.extended?"x":"")+(e.sticky?"y":"")}function l(e,t,n){if(Array.prototype.indexOf)return e.indexOf(t,n);for(var r=n||0;r<e.length;r++)if(e[r]===t)return r;return-1}s&&o||(RegExp.prototype.exec=function(e){var t,n,r=i.exec.apply(this,arguments);if("string"==typeof e&&r){if(!o&&r.length>1&&l(r,"")>-1&&(n=RegExp(this.source,i.replace.call(a(this),"g","")),i.replace.call(e.slice(r.index),n,(function(){for(var e=1;e<arguments.length-2;e++)void 0===arguments[e]&&(r[e]=void 0)}))),this._xregexp&&this._xregexp.captureNames)for(var c=1;c<r.length;c++)(t=this._xregexp.captureNames[c-1])&&(r[t]=r[c]);!s&&this.global&&!r[0].length&&this.lastIndex>r.index&&this.lastIndex--}return r},s||(RegExp.prototype.test=function(e){var t=i.exec.call(this,e);return t&&this.global&&!t[0].length&&this.lastIndex>t.index&&this.lastIndex--,!!t}))})),ace.define("ace/lib/es5-shim",["require","exports","module"],(function(e,t,n){function i(){}Function.prototype.bind||(Function.prototype.bind=function(e){var t=this;if("function"!=typeof t)throw new TypeError("Function.prototype.bind called on incompatible "+t);var n=p.call(arguments,1),r=function r(){if(this instanceof r){var i=t.apply(this,n.concat(p.call(arguments)));return Object(i)===i?i:this}return t.apply(e,n.concat(p.call(arguments)))};return t.prototype&&(i.prototype=t.prototype,r.prototype=new i,i.prototype=null),r});var o,s,a,l,c,u=Function.prototype.call,h=Array.prototype,d=Object.prototype,p=h.slice,f=u.bind(d.toString),m=u.bind(d.hasOwnProperty);if((c=m(d,"__defineGetter__"))&&(o=u.bind(d.__defineGetter__),s=u.bind(d.__defineSetter__),a=u.bind(d.__lookupGetter__),l=u.bind(d.__lookupSetter__)),2!=[1,2].splice(0).length)if(function(){function e(e){var t=new Array(e+2);return t[0]=t[1]=0,t}var t,n=[];if(n.splice.apply(n,e(20)),n.splice.apply(n,e(26)),t=n.length,n.splice(5,0,"XXX"),n.length,t+1==n.length)return!0}()){var g=Array.prototype.splice;Array.prototype.splice=function(e,t){return arguments.length?g.apply(this,[void 0===e?0:e,void 0===t?this.length-e:t].concat(p.call(arguments,2))):[]}}else Array.prototype.splice=function(e,t){var n=this.length;e>0?e>n&&(e=n):null==e?e=0:e<0&&(e=Math.max(n+e,0)),e+t<n||(t=n-e);var r=this.slice(e,e+t),i=p.call(arguments,2),o=i.length;if(e===n)o&&this.push.apply(this,i);else{var s=Math.min(t,n-e),a=e+s,l=a+o-s,c=n-a,u=n-s;if(l<a)for(var h=0;h<c;++h)this[l+h]=this[a+h];else if(l>a)for(h=c;h--;)this[l+h]=this[a+h];if(o&&e===u)this.length=u,this.push.apply(this,i);else for(this.length=u+o,h=0;h<o;++h)this[e+h]=i[h]}return r};Array.isArray||(Array.isArray=function(e){return"[object Array]"==f(e)});var v,b,y=Object("a"),w="a"!=y[0]||!(0 in y);if(Array.prototype.forEach||(Array.prototype.forEach=function(e){var t=M(this),n=w&&"[object String]"==f(this)?this.split(""):t,r=arguments[1],i=-1,o=n.length>>>0;if("[object Function]"!=f(e))throw new TypeError;for(;++i<o;)i in n&&e.call(r,n[i],i,t)}),Array.prototype.map||(Array.prototype.map=function(e){var t=M(this),n=w&&"[object String]"==f(this)?this.split(""):t,r=n.length>>>0,i=Array(r),o=arguments[1];if("[object Function]"!=f(e))throw new TypeError(e+" is not a function");for(var s=0;s<r;s++)s in n&&(i[s]=e.call(o,n[s],s,t));return i}),Array.prototype.filter||(Array.prototype.filter=function(e){var t,n=M(this),r=w&&"[object String]"==f(this)?this.split(""):n,i=r.length>>>0,o=[],s=arguments[1];if("[object Function]"!=f(e))throw new TypeError(e+" is not a function");for(var a=0;a<i;a++)a in r&&(t=r[a],e.call(s,t,a,n)&&o.push(t));return o}),Array.prototype.every||(Array.prototype.every=function(e){var t=M(this),n=w&&"[object String]"==f(this)?this.split(""):t,r=n.length>>>0,i=arguments[1];if("[object Function]"!=f(e))throw new TypeError(e+" is not a function");for(var o=0;o<r;o++)if(o in n&&!e.call(i,n[o],o,t))return!1;return!0}),Array.prototype.some||(Array.prototype.some=function(e){var t=M(this),n=w&&"[object String]"==f(this)?this.split(""):t,r=n.length>>>0,i=arguments[1];if("[object Function]"!=f(e))throw new TypeError(e+" is not a function");for(var o=0;o<r;o++)if(o in n&&e.call(i,n[o],o,t))return!0;return!1}),Array.prototype.reduce||(Array.prototype.reduce=function(e){var t=M(this),n=w&&"[object String]"==f(this)?this.split(""):t,r=n.length>>>0;if("[object Function]"!=f(e))throw new TypeError(e+" is not a function");if(!r&&1==arguments.length)throw new TypeError("reduce of empty array with no initial value");var i,o=0;if(arguments.length>=2)i=arguments[1];else for(;;){if(o in n){i=n[o++];break}if(++o>=r)throw new TypeError("reduce of empty array with no initial value")}for(;o<r;o++)o in n&&(i=e.call(void 0,i,n[o],o,t));return i}),Array.prototype.reduceRight||(Array.prototype.reduceRight=function(e){var t=M(this),n=w&&"[object String]"==f(this)?this.split(""):t,r=n.length>>>0;if("[object Function]"!=f(e))throw new TypeError(e+" is not a function");if(!r&&1==arguments.length)throw new TypeError("reduceRight of empty array with no initial value");var i,o=r-1;if(arguments.length>=2)i=arguments[1];else for(;;){if(o in n){i=n[o--];break}if(--o<0)throw new TypeError("reduceRight of empty array with no initial value")}do{o in this&&(i=e.call(void 0,i,n[o],o,t))}while(o--);return i}),Array.prototype.indexOf&&-1==[0,1].indexOf(1,2)||(Array.prototype.indexOf=function(e){var t=w&&"[object String]"==f(this)?this.split(""):M(this),n=t.length>>>0;if(!n)return-1;var r=0;for(arguments.length>1&&(r=$(arguments[1])),r=r>=0?r:Math.max(0,n+r);r<n;r++)if(r in t&&t[r]===e)return r;return-1}),Array.prototype.lastIndexOf&&-1==[0,1].lastIndexOf(0,-3)||(Array.prototype.lastIndexOf=function(e){var t=w&&"[object String]"==f(this)?this.split(""):M(this),n=t.length>>>0;if(!n)return-1;var r=n-1;for(arguments.length>1&&(r=Math.min(r,$(arguments[1]))),r=r>=0?r:n-Math.abs(r);r>=0;r--)if(r in t&&e===t[r])return r;return-1}),Object.getPrototypeOf||(Object.getPrototypeOf=function(e){return e.__proto__||(e.constructor?e.constructor.prototype:d)}),!Object.getOwnPropertyDescriptor){Object.getOwnPropertyDescriptor=function(e,t){if("object"!=r(e)&&"function"!=typeof e||null===e)throw new TypeError("Object.getOwnPropertyDescriptor called on a non-object: "+e);if(m(e,t)){var n;if(n={enumerable:!0,configurable:!0},c){var i=e.__proto__;e.__proto__=d;var o=a(e,t),s=l(e,t);if(e.__proto__=i,o||s)return o&&(n.get=o),s&&(n.set=s),n}return n.value=e[t],n}}}(Object.getOwnPropertyNames||(Object.getOwnPropertyNames=function(e){return Object.keys(e)}),Object.create)||(v=null===Object.prototype.__proto__?function(){return{__proto__:null}}:function(){var e={};for(var t in e)e[t]=null;return e.constructor=e.hasOwnProperty=e.propertyIsEnumerable=e.isPrototypeOf=e.toLocaleString=e.toString=e.valueOf=e.__proto__=null,e},Object.create=function(e,t){var n;if(null===e)n=v();else{if("object"!=r(e))throw new TypeError("typeof prototype["+r(e)+"] != 'object'");var i=function(){};i.prototype=e,(n=new i).__proto__=e}return void 0!==t&&Object.defineProperties(n,t),n});function k(e){try{return Object.defineProperty(e,"sentinel",{}),"sentinel"in e}catch(e){}}if(Object.defineProperty){var x=k({}),S="undefined"==typeof document||k(document.createElement("div"));if(!x||!S)var E=Object.defineProperty}if(!Object.defineProperty||E){Object.defineProperty=function(e,t,n){if("object"!=r(e)&&"function"!=typeof e||null===e)throw new TypeError("Object.defineProperty called on non-object: "+e);if("object"!=r(n)&&"function"!=typeof n||null===n)throw new TypeError("Property description must be an object: "+n);if(E)try{return E.call(Object,e,t,n)}catch(e){}if(m(n,"value"))if(c&&(a(e,t)||l(e,t))){var i=e.__proto__;e.__proto__=d,delete e[t],e[t]=n.value,e.__proto__=i}else e[t]=n.value;else{if(!c)throw new TypeError("getters & setters can not be defined on this javascript engine");m(n,"get")&&o(e,t,n.get),m(n,"set")&&s(e,t,n.set)}return e}}Object.defineProperties||(Object.defineProperties=function(e,t){for(var n in t)m(t,n)&&Object.defineProperty(e,n,t[n]);return e}),Object.seal||(Object.seal=function(e){return e}),Object.freeze||(Object.freeze=function(e){return e});try{Object.freeze((function(){}))}catch(e){Object.freeze=(b=Object.freeze,function(e){return"function"==typeof e?e:b(e)})}if(Object.preventExtensions||(Object.preventExtensions=function(e){return e}),Object.isSealed||(Object.isSealed=function(e){return!1}),Object.isFrozen||(Object.isFrozen=function(e){return!1}),Object.isExtensible||(Object.isExtensible=function(e){if(Object(e)===e)throw new TypeError;for(var t="";m(e,t);)t+="?";e[t]=!0;var n=m(e,t);return delete e[t],n}),!Object.keys){var _=!0,C=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],T=C.length;for(var L in{toString:null})_=!1;Object.keys=function(e){if("object"!=r(e)&&"function"!=typeof e||null===e)throw new TypeError("Object.keys called on a non-object");var t=[];for(var n in e)m(e,n)&&t.push(n);if(_)for(var i=0,o=T;i<o;i++){var s=C[i];m(e,s)&&t.push(s)}return t}}Date.now||(Date.now=function(){return(new Date).getTime()});var A="\t\n\v\f\r \u2028\u2029\ufeff";if(!String.prototype.trim){A="["+A+"]";var O=new RegExp("^"+A+A+"*"),R=new RegExp(A+A+"*$");String.prototype.trim=function(){return String(this).replace(O,"").replace(R,"")}}function $(e){return(e=+e)!=e?e=0:0!==e&&e!==1/0&&e!==-1/0&&(e=(e>0||-1)*Math.floor(Math.abs(e))),e}var M=function(e){if(null==e)throw new TypeError("can't convert "+e+" to object");return Object(e)}})),ace.define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/regexp","ace/lib/es5-shim"],(function(e,t,n){"use strict";e("./regexp"),e("./es5-shim"),"undefined"==typeof Element||Element.prototype.remove||Object.defineProperty(Element.prototype,"remove",{enumerable:!1,writable:!0,configurable:!0,value:function(){this.parentNode&&this.parentNode.removeChild(this)}})})),ace.define("ace/lib/useragent",["require","exports","module"],(function(e,t,n){"use strict";t.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},t.getOS=function(){return t.isMac?t.OS.MAC:t.isLinux?t.OS.LINUX:t.OS.WINDOWS};var i="object"==("undefined"==typeof navigator?"undefined":r(navigator))?navigator:{},o=(/mac|win|linux/i.exec(i.platform)||["other"])[0].toLowerCase(),s=i.userAgent||"",a=i.appName||"";t.isWin="win"==o,t.isMac="mac"==o,t.isLinux="linux"==o,t.isIE="Microsoft Internet Explorer"==a||a.indexOf("MSAppHost")>=0?parseFloat((s.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((s.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),t.isOldIE=t.isIE&&t.isIE<9,t.isGecko=t.isMozilla=s.match(/ Gecko\/\d+/),t.isOpera="object"==("undefined"==typeof opera?"undefined":r(opera))&&"[object Opera]"==Object.prototype.toString.call(window.opera),t.isWebKit=parseFloat(s.split("WebKit/")[1])||void 0,t.isChrome=parseFloat(s.split(" Chrome/")[1])||void 0,t.isEdge=parseFloat(s.split(" Edge/")[1])||void 0,t.isAIR=s.indexOf("AdobeAIR")>=0,t.isAndroid=s.indexOf("Android")>=0,t.isChromeOS=s.indexOf(" CrOS ")>=0,t.isIOS=/iPad|iPhone|iPod/.test(s)&&!window.MSStream,t.isIOS&&(t.isMac=!0),t.isMobile=t.isIOS||t.isAndroid})),ace.define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],(function(e,t,n){"use strict";var i=e("./useragent");if(t.buildDom=function e(t,n,i){if("string"==typeof t&&t){var o=document.createTextNode(t);return n&&n.appendChild(o),o}if(!Array.isArray(t))return t&&t.appendChild&&n&&n.appendChild(t),t;if("string"!=typeof t[0]||!t[0]){for(var s=[],a=0;a<t.length;a++){var l=e(t[a],n,i);l&&s.push(l)}return s}var c=document.createElement(t[0]),u=t[1],h=1;u&&"object"==r(u)&&!Array.isArray(u)&&(h=2);for(a=h;a<t.length;a++)e(t[a],c,i);return 2==h&&Object.keys(u).forEach((function(e){var t=u[e];"class"===e?c.className=Array.isArray(t)?t.join(" "):t:"function"==typeof t||"value"==e||"$"==e[0]?c[e]=t:"ref"===e?i&&(i[t]=c):null!=t&&c.setAttribute(e,t)})),n&&n.appendChild(c),c},t.getDocumentHead=function(e){return e||(e=document),e.head||e.getElementsByTagName("head")[0]||e.documentElement},t.createElement=function(e,t){return document.createElementNS?document.createElementNS(t||"http://www.w3.org/1999/xhtml",e):document.createElement(e)},t.removeChildren=function(e){e.innerHTML=""},t.createTextNode=function(e,t){return(t?t.ownerDocument:document).createTextNode(e)},t.createFragment=function(e){return(e?e.ownerDocument:document).createDocumentFragment()},t.hasCssClass=function(e,t){return-1!==(e.className+"").split(/\s+/g).indexOf(t)},t.addCssClass=function(e,n){t.hasCssClass(e,n)||(e.className+=" "+n)},t.removeCssClass=function(e,t){for(var n=e.className.split(/\s+/g);;){var r=n.indexOf(t);if(-1==r)break;n.splice(r,1)}e.className=n.join(" ")},t.toggleCssClass=function(e,t){for(var n=e.className.split(/\s+/g),r=!0;;){var i=n.indexOf(t);if(-1==i)break;r=!1,n.splice(i,1)}return r&&n.push(t),e.className=n.join(" "),r},t.setCssClass=function(e,n,r){r?t.addCssClass(e,n):t.removeCssClass(e,n)},t.hasCssString=function(e,t){var n,r=0;if(n=(t=t||document).querySelectorAll("style"))for(;r<n.length;)if(n[r++].id===e)return!0},t.importCssString=function(e,n,r){var i=r;r&&r.getRootNode&&(i=r.getRootNode())&&i!=r||(i=document);var o=i.ownerDocument||i;if(n&&t.hasCssString(n,i))return null;n&&(e+="\n/*# sourceURL=ace/css/"+n+" */");var s=t.createElement("style");s.appendChild(o.createTextNode(e)),n&&(s.id=n),i==o&&(i=t.getDocumentHead(o)),i.insertBefore(s,i.firstChild)},t.importCssStylsheet=function(e,n){t.buildDom(["link",{rel:"stylesheet",href:e}],t.getDocumentHead(n))},t.scrollbarWidth=function(e){var n=t.createElement("ace_inner");n.style.width="100%",n.style.minWidth="0px",n.style.height="200px",n.style.display="block";var r=t.createElement("ace_outer"),i=r.style;i.position="absolute",i.left="-10000px",i.overflow="hidden",i.width="200px",i.minWidth="0px",i.height="150px",i.display="block",r.appendChild(n);var o=e.documentElement;o.appendChild(r);var s=n.offsetWidth;i.overflow="scroll";var a=n.offsetWidth;return s==a&&(a=r.clientWidth),o.removeChild(r),s-a},"undefined"==typeof document&&(t.importCssString=function(){}),t.computedStyle=function(e,t){return window.getComputedStyle(e,"")||{}},t.setStyle=function(e,t,n){e[t]!==n&&(e[t]=n)},t.HAS_CSS_ANIMATION=!1,t.HAS_CSS_TRANSFORMS=!1,t.HI_DPI=!i.isWin||"undefined"!=typeof window&&window.devicePixelRatio>=1.5,"undefined"!=typeof document){var o=document.createElement("div");t.HI_DPI&&void 0!==o.style.transform&&(t.HAS_CSS_TRANSFORMS=!0),i.isEdge||void 0===o.style.animationName||(t.HAS_CSS_ANIMATION=!0),o=null}t.HAS_CSS_TRANSFORMS?t.translate=function(e,t,n){e.style.transform="translate("+Math.round(t)+"px, "+Math.round(n)+"px)"}:t.translate=function(e,t,n){e.style.top=Math.round(n)+"px",e.style.left=Math.round(t)+"px"}})),ace.define("ace/lib/oop",["require","exports","module"],(function(e,t,n){"use strict";t.inherits=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})},t.mixin=function(e,t){for(var n in t)e[n]=t[n];return e},t.implement=function(e,n){t.mixin(e,n)}})),ace.define("ace/lib/keys",["require","exports","module","ace/lib/oop"],(function(e,t,n){"use strict";var r=e("./oop"),i=function(){var e,t,n={MODIFIER_KEYS:{16:"Shift",17:"Ctrl",18:"Alt",224:"Meta",91:"MetaLeft",92:"MetaRight",93:"ContextMenu"},KEY_MODS:{ctrl:1,alt:2,option:2,shift:4,super:8,meta:8,command:8,cmd:8,control:1},FUNCTION_KEYS:{8:"Backspace",9:"Tab",13:"Return",19:"Pause",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"Print",45:"Insert",46:"Delete",96:"Numpad0",97:"Numpad1",98:"Numpad2",99:"Numpad3",100:"Numpad4",101:"Numpad5",102:"Numpad6",103:"Numpad7",104:"Numpad8",105:"Numpad9","-13":"NumpadEnter",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"Numlock",145:"Scrolllock"},PRINTABLE_KEYS:{32:" ",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",61:"=",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",107:"+",109:"-",110:".",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",111:"/",106:"*"}};for(t in n.FUNCTION_KEYS)e=n.FUNCTION_KEYS[t].toLowerCase(),n[e]=parseInt(t,10);for(t in n.PRINTABLE_KEYS)e=n.PRINTABLE_KEYS[t].toLowerCase(),n[e]=parseInt(t,10);return r.mixin(n,n.MODIFIER_KEYS),r.mixin(n,n.PRINTABLE_KEYS),r.mixin(n,n.FUNCTION_KEYS),n.enter=n.return,n.escape=n.esc,n.del=n.delete,n[173]="-",function(){for(var e=["cmd","ctrl","alt","shift"],t=Math.pow(2,e.length);t--;)n.KEY_MODS[t]=e.filter((function(e){return t&n.KEY_MODS[e]})).join("-")+"-"}(),n.KEY_MODS[0]="",n.KEY_MODS[-1]="input-",n}();r.mixin(t,i),t.keyCodeToString=function(e){var t=i[e];return"string"!=typeof t&&(t=String.fromCharCode(e)),t.toLowerCase()}})),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],(function(e,t,n){"use strict";var i,o=e("./keys"),s=e("./useragent"),a=null,l=0;function c(){return null==i&&function(){i=!1;try{document.createComment("").addEventListener("test",(function(){}),{get passive(){i={passive:!1}}})}catch(e){}}(),i}function u(e,t,n){this.elem=e,this.type=t,this.callback=n}u.prototype.destroy=function(){d(this.elem,this.type,this.callback),this.elem=this.type=this.callback=void 0};var h=t.addListener=function(e,t,n,r){e.addEventListener(t,n,c()),r&&r.$toDestroy.push(new u(e,t,n))},d=t.removeListener=function(e,t,n){e.removeEventListener(t,n,c())};t.stopEvent=function(e){return t.stopPropagation(e),t.preventDefault(e),!1},t.stopPropagation=function(e){e.stopPropagation&&e.stopPropagation()},t.preventDefault=function(e){e.preventDefault&&e.preventDefault()},t.getButton=function(e){return"dblclick"==e.type?0:"contextmenu"==e.type||s.isMac&&e.ctrlKey&&!e.altKey&&!e.shiftKey?2:e.button},t.capture=function(e,t,n){function r(e){t&&t(e),n&&n(e),d(document,"mousemove",t),d(document,"mouseup",r),d(document,"dragstart",r)}return h(document,"mousemove",t),h(document,"mouseup",r),h(document,"dragstart",r),r},t.addMouseWheelListener=function(e,t,n){"onmousewheel"in e?h(e,"mousewheel",(function(e){void 0!==e.wheelDeltaX?(e.wheelX=-e.wheelDeltaX/8,e.wheelY=-e.wheelDeltaY/8):(e.wheelX=0,e.wheelY=-e.wheelDelta/8),t(e)}),n):"onwheel"in e?h(e,"wheel",(function(e){switch(e.deltaMode){case e.DOM_DELTA_PIXEL:e.wheelX=.35*e.deltaX||0,e.wheelY=.35*e.deltaY||0;break;case e.DOM_DELTA_LINE:case e.DOM_DELTA_PAGE:e.wheelX=5*(e.deltaX||0),e.wheelY=5*(e.deltaY||0)}t(e)}),n):h(e,"DOMMouseScroll",(function(e){e.axis&&e.axis==e.HORIZONTAL_AXIS?(e.wheelX=5*(e.detail||0),e.wheelY=0):(e.wheelX=0,e.wheelY=5*(e.detail||0)),t(e)}),n)},t.addMultiMouseDownListener=function(e,n,r,i,o){var a,l,c,u=0,d={2:"dblclick",3:"tripleclick",4:"quadclick"};function p(e){if(0!==t.getButton(e)?u=0:e.detail>1?++u>4&&(u=1):u=1,s.isIE){var o=Math.abs(e.clientX-a)>5||Math.abs(e.clientY-l)>5;c&&!o||(u=1),c&&clearTimeout(c),c=setTimeout((function(){c=null}),n[u-1]||600),1==u&&(a=e.clientX,l=e.clientY)}if(e._clicks=u,r[i]("mousedown",e),u>4)u=0;else if(u>1)return r[i](d[u],e)}Array.isArray(e)||(e=[e]),e.forEach((function(e){h(e,"mousedown",p,o)}))};var p=function(e){return 0|(e.ctrlKey?1:0)|(e.altKey?2:0)|(e.shiftKey?4:0)|(e.metaKey?8:0)};function f(e,t,n){var r=p(t);if(!s.isMac&&a){if(t.getModifierState&&(t.getModifierState("OS")||t.getModifierState("Win"))&&(r|=8),a.altGr){if(3==(3&r))return;a.altGr=0}if(18===n||17===n){var i="location"in t?t.location:t.keyLocation;if(17===n&&1===i)1==a[n]&&(l=t.timeStamp);else if(18===n&&3===r&&2===i){t.timeStamp-l<50&&(a.altGr=!0)}}}if((n in o.MODIFIER_KEYS&&(n=-1),!r&&13===n)&&(3===(i="location"in t?t.location:t.keyLocation)&&(e(t,r,-n),t.defaultPrevented)))return;if(s.isChromeOS&&8&r){if(e(t,r,n),t.defaultPrevented)return;r&=-9}return!!(r||n in o.FUNCTION_KEYS||n in o.PRINTABLE_KEYS)&&e(t,r,n)}function m(){a=Object.create(null)}if(t.getModifierString=function(e){return o.KEY_MODS[p(e)]},t.addCommandKeyListener=function(e,n,r){if(s.isOldGecko||s.isOpera&&!("KeyboardEvent"in window)){var i=null;h(e,"keydown",(function(e){i=e.keyCode}),r),h(e,"keypress",(function(e){return f(n,e,i)}),r)}else{var o=null;h(e,"keydown",(function(e){a[e.keyCode]=(a[e.keyCode]||0)+1;var t=f(n,e,e.keyCode);return o=e.defaultPrevented,t}),r),h(e,"keypress",(function(e){o&&(e.ctrlKey||e.altKey||e.shiftKey||e.metaKey)&&(t.stopEvent(e),o=null)}),r),h(e,"keyup",(function(e){a[e.keyCode]=null}),r),a||(m(),h(window,"focus",m))}},"object"==("undefined"==typeof window?"undefined":r(window))&&window.postMessage&&!s.isOldIE){var g=1;t.nextTick=function(e,n){n=n||window;var r="zero-timeout-message-"+g++;h(n,"message",(function i(o){o.data==r&&(t.stopPropagation(o),d(n,"message",i),e())})),n.postMessage(r,"*")}}t.$idleBlocked=!1,t.onIdle=function(e,n){return setTimeout((function n(){t.$idleBlocked?setTimeout(n,100):e()}),n)},t.$idleBlockId=null,t.blockIdle=function(e){t.$idleBlockId&&clearTimeout(t.$idleBlockId),t.$idleBlocked=!0,t.$idleBlockId=setTimeout((function(){t.$idleBlocked=!1}),e||100)},t.nextFrame="object"==("undefined"==typeof window?"undefined":r(window))&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),t.nextFrame?t.nextFrame=t.nextFrame.bind(window):t.nextFrame=function(e){setTimeout(e,17)}})),ace.define("ace/range",["require","exports","module"],(function(e,t,n){"use strict";var i=function(e,t,n,r){this.start={row:e,column:t},this.end={row:n,column:r}};(function(){this.isEqual=function(e){return this.start.row===e.start.row&&this.end.row===e.end.row&&this.start.column===e.start.column&&this.end.column===e.end.column},this.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},this.contains=function(e,t){return 0==this.compare(e,t)},this.compareRange=function(e){var t,n=e.end,r=e.start;return 1==(t=this.compare(n.row,n.column))?1==(t=this.compare(r.row,r.column))?2:0==t?1:0:-1==t?-2:-1==(t=this.compare(r.row,r.column))?-1:1==t?42:0},this.comparePoint=function(e){return this.compare(e.row,e.column)},this.containsRange=function(e){return 0==this.comparePoint(e.start)&&0==this.comparePoint(e.end)},this.intersects=function(e){var t=this.compareRange(e);return-1==t||0==t||1==t},this.isEnd=function(e,t){return this.end.row==e&&this.end.column==t},this.isStart=function(e,t){return this.start.row==e&&this.start.column==t},this.setStart=function(e,t){"object"==r(e)?(this.start.column=e.column,this.start.row=e.row):(this.start.row=e,this.start.column=t)},this.setEnd=function(e,t){"object"==r(e)?(this.end.column=e.column,this.end.row=e.row):(this.end.row=e,this.end.column=t)},this.inside=function(e,t){return 0==this.compare(e,t)&&(!this.isEnd(e,t)&&!this.isStart(e,t))},this.insideStart=function(e,t){return 0==this.compare(e,t)&&!this.isEnd(e,t)},this.insideEnd=function(e,t){return 0==this.compare(e,t)&&!this.isStart(e,t)},this.compare=function(e,t){return this.isMultiLine()||e!==this.start.row?e<this.start.row?-1:e>this.end.row?1:this.start.row===e?t>=this.start.column?0:-1:this.end.row===e?t<=this.end.column?0:1:0:t<this.start.column?-1:t>this.end.column?1:0},this.compareStart=function(e,t){return this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.compareEnd=function(e,t){return this.end.row==e&&this.end.column==t?1:this.compare(e,t)},this.compareInside=function(e,t){return this.end.row==e&&this.end.column==t?1:this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.clipRows=function(e,t){if(this.end.row>t)var n={row:t+1,column:0};else if(this.end.row<e)n={row:e,column:0};if(this.start.row>t)var r={row:t+1,column:0};else if(this.start.row<e)r={row:e,column:0};return i.fromPoints(r||this.start,n||this.end)},this.extend=function(e,t){var n=this.compare(e,t);if(0==n)return this;if(-1==n)var r={row:e,column:t};else var o={row:e,column:t};return i.fromPoints(r||this.start,o||this.end)},this.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},this.isMultiLine=function(){return this.start.row!==this.end.row},this.clone=function(){return i.fromPoints(this.start,this.end)},this.collapseRows=function(){return 0==this.end.column?new i(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new i(this.start.row,0,this.end.row,0)},this.toScreenRange=function(e){var t=e.documentToScreenPosition(this.start),n=e.documentToScreenPosition(this.end);return new i(t.row,t.column,n.row,n.column)},this.moveBy=function(e,t){this.start.row+=e,this.start.column+=t,this.end.row+=e,this.end.column+=t}}).call(i.prototype),i.fromPoints=function(e,t){return new i(e.row,e.column,t.row,t.column)},i.comparePoints=function(e,t){return e.row-t.row||e.column-t.column},i.comparePoints=function(e,t){return e.row-t.row||e.column-t.column},t.Range=i})),ace.define("ace/lib/lang",["require","exports","module"],(function(e,t,n){"use strict";t.last=function(e){return e[e.length-1]},t.stringReverse=function(e){return e.split("").reverse().join("")},t.stringRepeat=function(e,t){for(var n="";t>0;)1&t&&(n+=e),(t>>=1)&&(e+=e);return n};var i=/^\s\s*/,o=/\s\s*$/;t.stringTrimLeft=function(e){return e.replace(i,"")},t.stringTrimRight=function(e){return e.replace(o,"")},t.copyObject=function(e){var t={};for(var n in e)t[n]=e[n];return t},t.copyArray=function(e){for(var t=[],n=0,i=e.length;n<i;n++)e[n]&&"object"==r(e[n])?t[n]=this.copyObject(e[n]):t[n]=e[n];return t},t.deepCopy=function e(t){if("object"!==r(t)||!t)return t;var n;if(Array.isArray(t)){n=[];for(var i=0;i<t.length;i++)n[i]=e(t[i]);return n}if("[object Object]"!==Object.prototype.toString.call(t))return t;for(var i in n={},t)n[i]=e(t[i]);return n},t.arrayToMap=function(e){for(var t={},n=0;n<e.length;n++)t[e[n]]=1;return t},t.createMap=function(e){var t=Object.create(null);for(var n in e)t[n]=e[n];return t},t.arrayRemove=function(e,t){for(var n=0;n<=e.length;n++)t===e[n]&&e.splice(n,1)},t.escapeRegExp=function(e){return e.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},t.escapeHTML=function(e){return(""+e).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<")},t.getMatchOffsets=function(e,t){var n=[];return e.replace(t,(function(e){n.push({offset:arguments[arguments.length-2],length:e.length})})),n},t.deferredCall=function(e){var t=null,n=function(){t=null,e()},r=function e(r){return e.cancel(),t=setTimeout(n,r||0),e};return r.schedule=r,r.call=function(){return this.cancel(),e(),r},r.cancel=function(){return clearTimeout(t),t=null,r},r.isPending=function(){return t},r},t.delayedCall=function(e,t){var n=null,r=function(){n=null,e()},i=function(e){null==n&&(n=setTimeout(r,e||t))};return i.delay=function(e){n&&clearTimeout(n),n=setTimeout(r,e||t)},i.schedule=i,i.call=function(){this.cancel(),e()},i.cancel=function(){n&&clearTimeout(n),n=null},i.isPending=function(){return n},i}})),ace.define("ace/clipboard",["require","exports","module"],(function(e,t,n){"use strict";var r;n.exports={lineMode:!1,pasteCancelled:function(){return!!(r&&r>Date.now()-50)||(r=!1)},cancel:function(){r=Date.now()}}})),ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/clipboard","ace/lib/keys"],(function(e,t,n){"use strict";var r=e("../lib/event"),i=e("../lib/useragent"),o=e("../lib/dom"),s=e("../lib/lang"),a=e("../clipboard"),l=i.isChrome<18,c=i.isIE,u=i.isChrome>63,h=e("../lib/keys"),d=h.KEY_MODS,p=i.isIOS,f=p?/\s/:/\n/,m=i.isMobile;t.TextInput=function(e,t){var n=o.createElement("textarea");n.className="ace_text-input",n.setAttribute("wrap","off"),n.setAttribute("autocorrect","off"),n.setAttribute("autocapitalize","off"),n.setAttribute("spellcheck",!1),n.style.opacity="0",e.insertBefore(n,e.firstChild);var g=!1,v=!1,b=!1,y=!1,w="";m||(n.style.fontSize="1px");var k=!1,x=!1,S="",E=0,_=0,C=0;try{var T=document.activeElement===n}catch(e){}r.addListener(n,"blur",(function(e){x||(t.onBlur(e),T=!1)}),t),r.addListener(n,"focus",(function(e){if(!x){if(T=!0,i.isEdge)try{if(!document.hasFocus())return}catch(e){}t.onFocus(e),i.isEdge?setTimeout(L):L()}}),t),this.$focusScroll=!1,this.focus=function(){if(w||u||"browser"==this.$focusScroll)return n.focus({preventScroll:!0});var e=n.style.top;n.style.position="fixed",n.style.top="0px";try{var t=0!=n.getBoundingClientRect().top}catch(e){return}var r=[];if(t)for(var i=n.parentElement;i&&1==i.nodeType;)r.push(i),i.setAttribute("ace_nocontext",!0),i=!i.parentElement&&i.getRootNode?i.getRootNode().host:i.parentElement;n.focus({preventScroll:!0}),t&&r.forEach((function(e){e.removeAttribute("ace_nocontext")})),setTimeout((function(){n.style.position="","0px"==n.style.top&&(n.style.top=e)}),0)},this.blur=function(){n.blur()},this.isFocused=function(){return T},t.on("beforeEndOperation",(function(){var e=t.curOp,r=e&&e.command&&e.command.name;if("insertstring"!=r){var i=r&&(e.docChanged||e.selectionChanged);b&&i&&(S=n.value="",D()),L()}}));var L=p?function(e){if(T&&(!g||e)&&!y){e||(e="");var r="\n ab"+e+"cde fg\n";r!=n.value&&(n.value=S=r);var i=4+(e.length||(t.selection.isEmpty()?0:1));4==E&&_==i||n.setSelectionRange(4,i),E=4,_=i}}:function(){if(!b&&!y&&(T||O)){b=!0;var e=0,r=0,i="";if(t.session){var o=t.selection,s=o.getRange(),a=o.cursor.row;if(e=s.start.column,r=s.end.column,i=t.session.getLine(a),s.start.row!=a){var l=t.session.getLine(a-1);e=s.start.row<a-1?0:e,r+=l.length+1,i=l+"\n"+i}else if(s.end.row!=a){var c=t.session.getLine(a+1);r=s.end.row>a+1?c.length:r,r+=i.length+1,i=i+"\n"+c}else m&&a>0&&(i="\n"+i,r+=1,e+=1);i.length>400&&(e<400&&r<400?i=i.slice(0,400):(i="\n",e=0,r=1))}var u=i+"\n\n";if(u!=S&&(n.value=S=u,E=_=u.length),O&&(E=n.selectionStart,_=n.selectionEnd),_!=r||E!=e||n.selectionEnd!=_)try{n.setSelectionRange(e,r),E=e,_=r}catch(e){}b=!1}};this.resetSelection=L,T&&t.onFocus();var A=null;this.setInputHandler=function(e){A=e},this.getInputHandler=function(){return A};var O=!1,R=function(e,r){if(O&&(O=!1),v)return L(),e&&t.onPaste(e),v=!1,"";for(var i=n.selectionStart,o=n.selectionEnd,s=E,a=S.length-_,l=e,c=e.length-i,u=e.length-o,h=0;s>0&&S[h]==e[h];)h++,s--;for(l=l.slice(h),h=1;a>0&&S.length-h>E-1&&S[S.length-h]==e[e.length-h];)h++,a--;c-=h-1,u-=h-1;var d=l.length-h+1;return d<0&&(s=-d,d=0),l=l.slice(0,d),r||l||c||s||a||u?(y=!0,l&&!s&&!a&&!c&&!u||k?t.onTextInput(l):t.onTextInput(l,{extendLeft:s,extendRight:a,restoreStart:c,restoreEnd:u}),y=!1,S=e,E=i,_=o,C=u,l):""},$=function(e){if(b)return F();if(e&&e.inputType){if("historyUndo"==e.inputType)return t.execCommand("undo");if("historyRedo"==e.inputType)return t.execCommand("redo")}var r=n.value,i=R(r,!0);(r.length>500||f.test(i)||m&&E<1&&E==_)&&L()},M=function e(t,n,r){var i=t.clipboardData||window.clipboardData;if(i&&!l){var o=c||r?"Text":"text/plain";try{return n?!1!==i.setData(o,n):i.getData(o)}catch(t){if(!r)return e(t,n,!0)}}},j=function(e,i){var o=t.getCopyText();if(!o)return r.preventDefault(e);M(e,o)?(p&&(L(o),g=o,setTimeout((function(){g=!1}),10)),i?t.onCut():t.onCopy(),r.preventDefault(e)):(g=!0,n.value=o,n.select(),setTimeout((function(){g=!1,L(),i?t.onCut():t.onCopy()})))},P=function(e){j(e,!0)},I=function(e){j(e,!1)},N=function(e){var o=M(e);a.pasteCancelled()||("string"==typeof o?(o&&t.onPaste(o,e),i.isIE&&setTimeout(L),r.preventDefault(e)):(n.value="",v=!0))};r.addCommandKeyListener(n,t.onCommandKey.bind(t),t),r.addListener(n,"select",(function(e){b||(g?g=!1:!function(e){return 0===e.selectionStart&&e.selectionEnd>=S.length&&e.value===S&&S&&e.selectionEnd!==_}(n)?m&&n.selectionStart!=E&&L():(t.selectAll(),L()))}),t),r.addListener(n,"input",$,t),r.addListener(n,"cut",P,t),r.addListener(n,"copy",I,t),r.addListener(n,"paste",N,t),"oncut"in n&&"oncopy"in n&&"onpaste"in n||r.addListener(e,"keydown",(function(e){if((!i.isMac||e.metaKey)&&e.ctrlKey)switch(e.keyCode){case 67:I(e);break;case 86:N(e);break;case 88:P(e)}}),t);var F=function(){if(b&&t.onCompositionUpdate&&!t.$readOnly){if(k)return W();if(b.useTextareaForIME)t.onCompositionUpdate(n.value);else{var e=n.value;R(e),b.markerRange&&(b.context&&(b.markerRange.start.column=b.selectionStart=b.context.compositionStartOffset),b.markerRange.end.column=b.markerRange.start.column+_-b.selectionStart+C)}}},D=function(e){t.onCompositionEnd&&!t.$readOnly&&(b=!1,t.onCompositionEnd(),t.off("mousedown",W),e&&$())};function W(){x=!0,n.blur(),n.focus(),x=!1}var z,B=s.delayedCall(F,50).schedule.bind(null,null);function V(){clearTimeout(z),z=setTimeout((function(){w&&(n.style.cssText=w,w=""),t.renderer.$isMousePressed=!1,t.renderer.$keepTextAreaAtCursor&&t.renderer.$moveTextAreaToCursor()}),0)}r.addListener(n,"compositionstart",(function(e){if(!b&&t.onCompositionStart&&!t.$readOnly&&(b={},!k)){e.data&&(b.useTextareaForIME=!1),setTimeout(F,0),t._signal("compositionStart"),t.on("mousedown",W);var r=t.getSelectionRange();r.end.row=r.start.row,r.end.column=r.start.column,b.markerRange=r,b.selectionStart=E,t.onCompositionStart(b),b.useTextareaForIME?(S=n.value="",E=0,_=0):(n.msGetInputContext&&(b.context=n.msGetInputContext()),n.getInputContext&&(b.context=n.getInputContext()))}}),t),r.addListener(n,"compositionupdate",F,t),r.addListener(n,"keyup",(function(e){27==e.keyCode&&n.value.length<n.selectionStart&&(b||(S=n.value),E=_=-1,L()),B()}),t),r.addListener(n,"keydown",B,t),r.addListener(n,"compositionend",D,t),this.getElement=function(){return n},this.setCommandMode=function(e){k=e,n.readOnly=!1},this.setReadOnly=function(e){k||(n.readOnly=e)},this.setCopyWithEmptySelection=function(e){},this.onContextMenu=function(e){O=!0,L(),t._emit("nativecontextmenu",{target:t,domEvent:e}),this.moveToMouse(e,!0)},this.moveToMouse=function(e,s){w||(w=n.style.cssText),n.style.cssText=(s?"z-index:100000;":"")+(i.isIE?"opacity:0.1;":"")+"text-indent: -"+(E+_)*t.renderer.characterWidth*.5+"px;";var a=t.container.getBoundingClientRect(),l=o.computedStyle(t.container),c=a.top+(parseInt(l.borderTopWidth)||0),u=a.left+(parseInt(a.borderLeftWidth)||0),h=a.bottom-c-n.clientHeight-2,d=function(e){o.translate(n,e.clientX-u-2,Math.min(e.clientY-c-2,h))};d(e),"mousedown"==e.type&&(t.renderer.$isMousePressed=!0,clearTimeout(z),i.isWin&&r.capture(t.container,d,V))},this.onContextMenuClose=V;var H=function(e){t.textInput.onContextMenu(e),V()};r.addListener(n,"mouseup",H,t),r.addListener(n,"mousedown",(function(e){e.preventDefault(),V()}),t),r.addListener(t.renderer.scroller,"contextmenu",H,t),r.addListener(n,"contextmenu",H,t),p&&function(e,t,n){var r=null,i=!1;n.addEventListener("keydown",(function(e){r&&clearTimeout(r),i=!0}),!0),n.addEventListener("keyup",(function(e){r=setTimeout((function(){i=!1}),100)}),!0);var o=function(e){if(document.activeElement===n&&!(i||b||t.$mouseHandler.isMousePressed||g)){var r=n.selectionStart,o=n.selectionEnd,s=null,a=0;if(0==r?s=h.up:1==r?s=h.home:o>_&&"\n"==S[o]?s=h.end:r<E&&" "==S[r-1]?(s=h.left,a=d.option):r<E||r==E&&_!=E&&r==o?s=h.left:o>_&&S.slice(0,o).split("\n").length>2?s=h.down:o>_&&" "==S[o-1]?(s=h.right,a=d.option):(o>_||o==_&&_!=E&&r==o)&&(s=h.right),r!==o&&(a|=d.shift),s){if(!t.onCommandKey({},a,s)&&t.commands){s=h.keyCodeToString(s);var l=t.commands.findKeyCommand(a,s);l&&t.execCommand(l)}E=r,_=o,L("")}}};document.addEventListener("selectionchange",o),t.on("destroy",(function(){document.removeEventListener("selectionchange",o)}))}(0,t,n)},t.$setUserAgentForTests=function(e,t){m=e,p=t}})),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],(function(e,t,n){"use strict";var r=e("../lib/useragent");function i(e){e.$clickSelection=null;var t=e.editor;t.setDefaultHandler("mousedown",this.onMouseDown.bind(e)),t.setDefaultHandler("dblclick",this.onDoubleClick.bind(e)),t.setDefaultHandler("tripleclick",this.onTripleClick.bind(e)),t.setDefaultHandler("quadclick",this.onQuadClick.bind(e)),t.setDefaultHandler("mousewheel",this.onMouseWheel.bind(e));["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"].forEach((function(t){e[t]=this[t]}),this),e.selectByLines=this.extendSelectionBy.bind(e,"getLineRange"),e.selectByWords=this.extendSelectionBy.bind(e,"getWordRange")}function o(e,t){if(e.start.row==e.end.row)var n=2*t.column-e.start.column-e.end.column;else if(e.start.row!=e.end.row-1||e.start.column||e.end.column)n=2*t.row-e.start.row-e.end.row;else var n=t.column-4;return n<0?{cursor:e.start,anchor:e.end}:{cursor:e.end,anchor:e.start}}(function(){this.onMouseDown=function(e){var t=e.inSelection(),n=e.getDocumentPosition();this.mousedownEvent=e;var i=this.editor,o=e.getButton();return 0!==o?((i.getSelectionRange().isEmpty()||1==o)&&i.selection.moveToPosition(n),void(2==o&&(i.textInput.onContextMenu(e.domEvent),r.isMozilla||e.preventDefault()))):(this.mousedownEvent.time=Date.now(),!t||i.isFocused()||(i.focus(),!this.$focusTimeout||this.$clickSelection||i.inMultiSelectMode)?(this.captureMouse(e),this.startSelect(n,e.domEvent._clicks>1),e.preventDefault()):(this.setState("focusWait"),void this.captureMouse(e)))},this.startSelect=function(e,t){e=e||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var n=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?n.selection.selectToPosition(e):t||n.selection.moveToPosition(e),t||this.select(),n.renderer.scroller.setCapture&&n.renderer.scroller.setCapture(),n.setStyle("ace_selecting"),this.setState("select"))},this.select=function(){var e,t=this.editor,n=t.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var r=this.$clickSelection.comparePoint(n);if(-1==r)e=this.$clickSelection.end;else if(1==r)e=this.$clickSelection.start;else{var i=o(this.$clickSelection,n);n=i.cursor,e=i.anchor}t.selection.setSelectionAnchor(e.row,e.column)}t.selection.selectToPosition(n),t.renderer.scrollCursorIntoView()},this.extendSelectionBy=function(e){var t,n=this.editor,r=n.renderer.screenToTextCoordinates(this.x,this.y),i=n.selection[e](r.row,r.column);if(this.$clickSelection){var s=this.$clickSelection.comparePoint(i.start),a=this.$clickSelection.comparePoint(i.end);if(-1==s&&a<=0)t=this.$clickSelection.end,i.end.row==r.row&&i.end.column==r.column||(r=i.start);else if(1==a&&s>=0)t=this.$clickSelection.start,i.start.row==r.row&&i.start.column==r.column||(r=i.end);else if(-1==s&&1==a)r=i.end,t=i.start;else{var l=o(this.$clickSelection,r);r=l.cursor,t=l.anchor}n.selection.setSelectionAnchor(t.row,t.column)}n.selection.selectToPosition(r),n.renderer.scrollCursorIntoView()},this.selectEnd=this.selectAllEnd=this.selectByWordsEnd=this.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting"),this.editor.renderer.scroller.releaseCapture&&this.editor.renderer.scroller.releaseCapture()},this.focusWait=function(){var e,t,n,r,i=(e=this.mousedownEvent.x,t=this.mousedownEvent.y,n=this.x,r=this.y,Math.sqrt(Math.pow(n-e,2)+Math.pow(r-t,2))),o=Date.now();(i>0||o-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},this.onDoubleClick=function(e){var t=e.getDocumentPosition(),n=this.editor,r=n.session.getBracketRange(t);r?(r.isEmpty()&&(r.start.column--,r.end.column++),this.setState("select")):(r=n.selection.getWordRange(t.row,t.column),this.setState("selectByWords")),this.$clickSelection=r,this.select()},this.onTripleClick=function(e){var t=e.getDocumentPosition(),n=this.editor;this.setState("selectByLines");var r=n.getSelectionRange();r.isMultiLine()&&r.contains(t.row,t.column)?(this.$clickSelection=n.selection.getLineRange(r.start.row),this.$clickSelection.end=n.selection.getLineRange(r.end.row).end):this.$clickSelection=n.selection.getLineRange(t.row),this.select()},this.onQuadClick=function(e){var t=this.editor;t.selectAll(),this.$clickSelection=t.getSelectionRange(),this.setState("selectAll")},this.onMouseWheel=function(e){if(!e.getAccelKey()){e.getShiftKey()&&e.wheelY&&!e.wheelX&&(e.wheelX=e.wheelY,e.wheelY=0);var t=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var n=this.$lastScroll,r=e.domEvent.timeStamp,i=r-n.t,o=i?e.wheelX/i:n.vx,s=i?e.wheelY/i:n.vy;i<550&&(o=(o+n.vx)/2,s=(s+n.vy)/2);var a=Math.abs(o/s),l=!1;if(a>=1&&t.renderer.isScrollableBy(e.wheelX*e.speed,0)&&(l=!0),a<=1&&t.renderer.isScrollableBy(0,e.wheelY*e.speed)&&(l=!0),l)n.allowed=r;else if(r-n.allowed<550){Math.abs(o)<=1.5*Math.abs(n.vx)&&Math.abs(s)<=1.5*Math.abs(n.vy)?(l=!0,n.allowed=r):n.allowed=0}return n.t=r,n.vx=o,n.vy=s,l?(t.renderer.scrollBy(e.wheelX*e.speed,e.wheelY*e.speed),e.stop()):void 0}}}).call(i.prototype),t.DefaultHandlers=i})),ace.define("ace/tooltip",["require","exports","module","ace/lib/oop","ace/lib/dom"],(function(e,t,n){"use strict";e("./lib/oop");var r=e("./lib/dom");function i(e){this.isOpen=!1,this.$element=null,this.$parentNode=e}(function(){this.$init=function(){return this.$element=r.createElement("div"),this.$element.className="ace_tooltip",this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},this.getElement=function(){return this.$element||this.$init()},this.setText=function(e){this.getElement().textContent=e},this.setHtml=function(e){this.getElement().innerHTML=e},this.setPosition=function(e,t){this.getElement().style.left=e+"px",this.getElement().style.top=t+"px"},this.setClassName=function(e){r.addCssClass(this.getElement(),e)},this.show=function(e,t,n){null!=e&&this.setText(e),null!=t&&null!=n&&this.setPosition(t,n),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},this.hide=function(){this.isOpen&&(this.getElement().style.display="none",this.isOpen=!1)},this.getHeight=function(){return this.getElement().offsetHeight},this.getWidth=function(){return this.getElement().offsetWidth},this.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)}}).call(i.prototype),t.Tooltip=i})),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event","ace/tooltip"],(function(e,t,n){"use strict";var r=e("../lib/dom"),i=e("../lib/oop"),o=e("../lib/event"),s=e("../tooltip").Tooltip;function a(e){s.call(this,e)}i.inherits(a,s),function(){this.setPosition=function(e,t){var n=window.innerWidth||document.documentElement.clientWidth,r=window.innerHeight||document.documentElement.clientHeight,i=this.getWidth(),o=this.getHeight();(e+=15)+i>n&&(e-=e+i-n),(t+=15)+o>r&&(t-=20+o),s.prototype.setPosition.call(this,e,t)}}.call(a.prototype),t.GutterHandler=function(e){var t,n,i,s=e.editor,l=s.renderer.$gutterLayer,c=new a(s.container);function u(){t&&(t=clearTimeout(t)),i&&(c.hide(),i=null,s._signal("hideGutterTooltip",c),s.off("mousewheel",u))}function h(e){c.setPosition(e.x,e.y)}e.editor.setDefaultHandler("guttermousedown",(function(t){if(s.isFocused()&&0==t.getButton()&&"foldWidgets"!=l.getRegion(t)){var n=t.getDocumentPosition().row,r=s.session.selection;if(t.getShiftKey())r.selectTo(n,0);else{if(2==t.domEvent.detail)return s.selectAll(),t.preventDefault();e.$clickSelection=s.selection.getLineRange(n)}return e.setState("selectByLines"),e.captureMouse(t),t.preventDefault()}})),e.editor.setDefaultHandler("guttermousemove",(function(o){var a=o.domEvent.target||o.domEvent.srcElement;if(r.hasCssClass(a,"ace_fold-widget"))return u();i&&e.$tooltipFollowsMouse&&h(o),n=o,t||(t=setTimeout((function(){t=null,n&&!e.isMousePressed?function(){var t=n.getDocumentPosition().row,r=l.$annotations[t];if(!r)return u();if(t==s.session.getLength()){var o=s.renderer.pixelToScreenCoordinates(0,n.y).row,a=n.$pos;if(o>s.session.documentToScreenRow(a.row,a.column))return u()}if(i!=r)if(i=r.text.join("<br/>"),c.setHtml(i),c.show(),s._signal("showGutterTooltip",c),s.on("mousewheel",u),e.$tooltipFollowsMouse)h(n);else{var d=n.domEvent.target.getBoundingClientRect(),p=c.getElement().style;p.left=d.right+"px",p.top=d.bottom+"px"}}():u()}),50))})),o.addListener(s.renderer.$gutter,"mouseout",(function(e){n=null,i&&!t&&(t=setTimeout((function(){t=null,u()}),50))}),s),s.on("changeSession",u)}})),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],(function(e,t,n){"use strict";var r=e("../lib/event"),i=e("../lib/useragent"),o=t.MouseEvent=function(e,t){this.domEvent=e,this.editor=t,this.x=this.clientX=e.clientX,this.y=this.clientY=e.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1};(function(){this.stopPropagation=function(){r.stopPropagation(this.domEvent),this.propagationStopped=!0},this.preventDefault=function(){r.preventDefault(this.domEvent),this.defaultPrevented=!0},this.stop=function(){this.stopPropagation(),this.preventDefault()},this.getDocumentPosition=function(){return this.$pos||(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY)),this.$pos},this.inSelection=function(){if(null!==this.$inSelection)return this.$inSelection;var e=this.editor.getSelectionRange();if(e.isEmpty())this.$inSelection=!1;else{var t=this.getDocumentPosition();this.$inSelection=e.contains(t.row,t.column)}return this.$inSelection},this.getButton=function(){return r.getButton(this.domEvent)},this.getShiftKey=function(){return this.domEvent.shiftKey},this.getAccelKey=i.isMac?function(){return this.domEvent.metaKey}:function(){return this.domEvent.ctrlKey}}).call(o.prototype)})),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],(function(e,t,n){"use strict";var r=e("../lib/dom"),i=e("../lib/event"),o=e("../lib/useragent");function s(e){var t=e.editor,n=r.createElement("img");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",o.isOpera&&(n.style.cssText="width:1px;height:1px;position:fixed;top:0;left:0;z-index:2147483647;opacity:0;");["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"].forEach((function(t){e[t]=this[t]}),this),t.on("mousedown",this.onMouseDown.bind(e));var s,l,c,u,h,d,p,f,m,g,v,b=t.container,y=0;function w(){var e=d;(function(e,n){var r=Date.now(),i=!n||e.row!=n.row,o=!n||e.column!=n.column;!g||i||o?(t.moveCursorToPosition(e),g=r,v={x:l,y:c}):a(v.x,v.y,l,c)>5?g=null:r-g>=200&&(t.renderer.scrollCursorIntoView(),g=null)})(d=t.renderer.screenToTextCoordinates(l,c),e),function(e,n){var r=Date.now(),i=t.renderer.layerConfig.lineHeight,o=t.renderer.layerConfig.characterWidth,s=t.renderer.scroller.getBoundingClientRect(),a={x:{left:l-s.left,right:s.right-l},y:{top:c-s.top,bottom:s.bottom-c}},u=Math.min(a.x.left,a.x.right),h=Math.min(a.y.top,a.y.bottom),d={row:e.row,column:e.column};u/o<=2&&(d.column+=a.x.left<a.x.right?-3:2),h/i<=1&&(d.row+=a.y.top<a.y.bottom?-1:1);var p=e.row!=d.row,f=e.column!=d.column,g=!n||e.row!=n.row;p||f&&!g?m?r-m>=200&&t.renderer.scrollCursorIntoView(d):m=r:m=null}(d,e)}function k(){h=t.selection.toOrientedRange(),s=t.session.addMarker(h,"ace_selection",t.getSelectionStyle()),t.clearSelection(),t.isFocused()&&t.renderer.$cursorLayer.setBlinking(!1),clearInterval(u),w(),u=setInterval(w,20),y=0,i.addListener(document,"mousemove",E)}function x(){clearInterval(u),t.session.removeMarker(s),s=null,t.selection.fromOrientedRange(h),t.isFocused()&&!f&&t.$resetCursorStyle(),h=null,d=null,y=0,m=null,g=null,i.removeListener(document,"mousemove",E)}this.onDragStart=function(e){if(this.cancelDrag||!b.draggable){var r=this;return setTimeout((function(){r.startSelect(),r.captureMouse(e)}),0),e.preventDefault()}h=t.getSelectionRange();var i=e.dataTransfer;i.effectAllowed=t.getReadOnly()?"copy":"copyMove",o.isOpera&&(t.container.appendChild(n),n.scrollTop=0),i.setDragImage&&i.setDragImage(n,0,0),o.isOpera&&t.container.removeChild(n),i.clearData(),i.setData("Text",t.session.getTextRange()),f=!0,this.setState("drag")},this.onDragEnd=function(e){if(b.draggable=!1,f=!1,this.setState(null),!t.getReadOnly()){var n=e.dataTransfer.dropEffect;p||"move"!=n||t.session.remove(t.getSelectionRange()),t.$resetCursorStyle()}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(e){if(!t.getReadOnly()&&_(e.dataTransfer))return l=e.clientX,c=e.clientY,s||k(),y++,e.dataTransfer.dropEffect=p=C(e),i.preventDefault(e)},this.onDragOver=function(e){if(!t.getReadOnly()&&_(e.dataTransfer))return l=e.clientX,c=e.clientY,s||(k(),y++),null!==S&&(S=null),e.dataTransfer.dropEffect=p=C(e),i.preventDefault(e)},this.onDragLeave=function(e){if(--y<=0&&s)return x(),p=null,i.preventDefault(e)},this.onDrop=function(e){if(d){var n=e.dataTransfer;if(f)switch(p){case"move":h=h.contains(d.row,d.column)?{start:d,end:d}:t.moveText(h,d);break;case"copy":h=t.moveText(h,d,!0)}else{var r=n.getData("Text");h={start:d,end:t.session.insert(d,r)},t.focus(),p=null}return x(),i.preventDefault(e)}},i.addListener(b,"dragstart",this.onDragStart.bind(e),t),i.addListener(b,"dragend",this.onDragEnd.bind(e),t),i.addListener(b,"dragenter",this.onDragEnter.bind(e),t),i.addListener(b,"dragover",this.onDragOver.bind(e),t),i.addListener(b,"dragleave",this.onDragLeave.bind(e),t),i.addListener(b,"drop",this.onDrop.bind(e),t);var S=null;function E(){null==S&&(S=setTimeout((function(){null!=S&&s&&x()}),20))}function _(e){var t=e.types;return!t||Array.prototype.some.call(t,(function(e){return"text/plain"==e||"Text"==e}))}function C(e){var t=["copy","copymove","all","uninitialized"],n=o.isMac?e.altKey:e.ctrlKey,r="uninitialized";try{r=e.dataTransfer.effectAllowed.toLowerCase()}catch(e){}var i="none";return n&&t.indexOf(r)>=0?i="copy":["move","copymove","linkmove","all","uninitialized"].indexOf(r)>=0?i="move":t.indexOf(r)>=0&&(i="copy"),i}}function a(e,t,n,r){return Math.sqrt(Math.pow(n-e,2)+Math.pow(r-t,2))}(function(){this.dragWait=function(){Date.now()-this.mousedownEvent.time>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){this.editor.container.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(e){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var e=this.editor;e.container.draggable=!0,e.renderer.$cursorLayer.setBlinking(!1),e.setStyle("ace_dragging");var t=o.isWin?"default":"move";e.renderer.setCursorStyle(t),this.setState("dragReady")},this.onMouseDrag=function(e){var t=this.editor.container;o.isIE&&"dragReady"==this.state&&(a(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y)>3&&t.dragDrop());"dragWait"===this.state&&(a(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y)>0&&(t.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition())))},this.onMouseDown=function(e){if(this.$dragEnabled){this.mousedownEvent=e;var t=this.editor,n=e.inSelection(),r=e.getButton();if(1===(e.domEvent.detail||1)&&0===r&&n){if(e.editor.inMultiSelectMode&&(e.getAccelKey()||e.getShiftKey()))return;this.mousedownEvent.time=Date.now();var i=e.domEvent.target||e.domEvent.srcElement;if("unselectable"in i&&(i.unselectable="on"),t.getDragDelay()){if(o.isWebKit)this.cancelDrag=!0,t.container.draggable=!0;this.setState("dragWait")}else this.startDrag();this.captureMouse(e,this.onMouseDrag.bind(this)),e.defaultPrevented=!0}}}}).call(s.prototype),t.DragdropHandler=s})),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],(function(e,t,n){"use strict";var r=e("./mouse_event").MouseEvent,i=e("../lib/event"),o=e("../lib/dom");t.addTouchListeners=function(e,t){var n,s,a,l,c,u,h,d,p,f="scroll",m=0,g=0,v=0,b=0;function y(){var e=window.navigator&&window.navigator.clipboard,n=!1,r=function(r){var i,s,a=r.target.getAttribute("action");if("more"==a||!n)return n=!n,i=t.getCopyText(),s=t.session.getUndoManager().hasUndo(),void p.replaceChild(o.buildDom(n?["span",!i&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],i&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],i&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],e&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],s&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],["span",{class:"ace_mobile-button",action:"find"},"Find"],["span",{class:"ace_mobile-button",action:"openCommandPallete"},"Pallete"]]:["span"]),p.firstChild);"paste"==a?e.readText().then((function(e){t.execCommand(a,e)})):a&&("cut"!=a&&"copy"!=a||(e?e.writeText(t.getCopyText()):document.execCommand("copy")),t.execCommand(a)),p.firstChild.style.display="none",n=!1,"openCommandPallete"!=a&&t.focus()};p=o.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(e){f="menu",e.stopPropagation(),e.preventDefault(),t.textInput.focus()},ontouchend:function(e){e.stopPropagation(),e.preventDefault(),r(e)},onclick:r},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],t.container)}function w(){p||y();var e=t.selection.cursor,n=t.renderer.textToScreenCoordinates(e.row,e.column),r=t.container.getBoundingClientRect();p.style.top=n.pageY-r.top-3+"px",p.style.right="10px",p.style.display="",p.firstChild.style.display="none",t.on("input",k)}function k(e){p&&(p.style.display="none"),t.off("input",k)}function x(){c=null,clearTimeout(c);var e=t.selection.getRange(),n=e.contains(h.row,h.column);!e.isEmpty()&&n||(t.selection.moveToPosition(h),t.selection.selectWord()),f="wait",w()}i.addListener(e,"contextmenu",(function(e){d&&t.textInput.getElement().focus()}),t),i.addListener(e,"touchstart",(function(e){var i=e.touches;if(c||i.length>1)return clearTimeout(c),c=null,a=-1,void(f="zoom");d=t.$mouseHandler.isMousePressed=!0;var o=t.renderer.layerConfig.lineHeight,u=t.renderer.layerConfig.lineHeight,p=e.timeStamp;l=p;var y=i[0],w=y.clientX,k=y.clientY;Math.abs(n-w)+Math.abs(s-k)>o&&(a=-1),n=e.clientX=w,s=e.clientY=k,v=b=0;var S=new r(e,t);if(h=S.getDocumentPosition(),p-a<500&&1==i.length&&!m)g++,e.preventDefault(),e.button=0,function(){c=null,clearTimeout(c),t.selection.moveToPosition(h);var e=g>=2?t.selection.getLineRange(h.row):t.session.getBracketRange(h);e&&!e.isEmpty()?t.selection.setRange(e):t.selection.selectWord(),f="wait"}();else{g=0;var E=t.selection.cursor,_=t.selection.isEmpty()?E:t.selection.anchor,C=t.renderer.$cursorLayer.getPixelPosition(E,!0),T=t.renderer.$cursorLayer.getPixelPosition(_,!0),L=t.renderer.scroller.getBoundingClientRect(),A=function(e,t){return(e/=u)*e+(t=t/o-.75)*t};if(e.clientX<L.left)return void(f="zoom");var O=A(e.clientX-L.left-C.left,e.clientY-L.top-C.top),R=A(e.clientX-L.left-T.left,e.clientY-L.top-T.top);O<3.5&&R<3.5&&(f=O>R?"cursor":"anchor"),f=R<3.5?"anchor":O<3.5?"cursor":"scroll",c=setTimeout(x,450)}a=p}),t),i.addListener(e,"touchend",(function(e){d=t.$mouseHandler.isMousePressed=!1,u&&clearInterval(u),"zoom"==f?(f="",m=0):c?(t.selection.moveToPosition(h),m=0,w()):"scroll"==f?(m+=60,u=setInterval((function(){m--<=0&&(clearInterval(u),u=null),Math.abs(v)<.01&&(v=0),Math.abs(b)<.01&&(b=0),m<20&&(v*=.9),m<20&&(b*=.9);var e=t.session.getScrollTop();t.renderer.scrollBy(10*v,10*b),e==t.session.getScrollTop()&&(m=0)}),10),k()):w(),clearTimeout(c),c=null}),t),i.addListener(e,"touchmove",(function(e){c&&(clearTimeout(c),c=null);var i=e.touches;if(!(i.length>1||"zoom"==f)){var o=i[0],a=n-o.clientX,u=s-o.clientY;if("wait"==f){if(!(a*a+u*u>4))return e.preventDefault();f="cursor"}n=o.clientX,s=o.clientY,e.clientX=o.clientX,e.clientY=o.clientY;var h=e.timeStamp,d=h-l;if(l=h,"scroll"==f){var p=new r(e,t);p.speed=1,p.wheelX=a,p.wheelY=u,10*Math.abs(a)<Math.abs(u)&&(a=0),10*Math.abs(u)<Math.abs(a)&&(u=0),0!=d&&(v=a/d,b=u/d),t._emit("mousewheel",p),p.propagationStopped||(v=b=0)}else{var m=new r(e,t).getDocumentPosition();"cursor"==f?t.selection.moveCursorToPosition(m):"anchor"==f&&t.selection.setSelectionAnchor(m.row,m.column),t.renderer.scrollCursorIntoView(m),e.preventDefault()}}}),t)}})),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],(function(e,t,n){"use strict";var r=e("./dom");t.get=function(e,t){var n=new XMLHttpRequest;n.open("GET",e,!0),n.onreadystatechange=function(){4===n.readyState&&t(n.responseText)},n.send(null)},t.loadScript=function(e,t){var n=r.getDocumentHead(),i=document.createElement("script");i.src=e,n.appendChild(i),i.onload=i.onreadystatechange=function(e,n){!n&&i.readyState&&"loaded"!=i.readyState&&"complete"!=i.readyState||(i=i.onload=i.onreadystatechange=null,n||t())}},t.qualifyURL=function(e){var t=document.createElement("a");return t.href=e,t.href}})),ace.define("ace/lib/event_emitter",["require","exports","module"],(function(e,t,n){"use strict";var i={},o=function(){this.propagationStopped=!0},s=function(){this.defaultPrevented=!0};i._emit=i._dispatchEvent=function(e,t){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var n=this._eventRegistry[e]||[],i=this._defaultHandlers[e];if(n.length||i){"object"==r(t)&&t||(t={}),t.type||(t.type=e),t.stopPropagation||(t.stopPropagation=o),t.preventDefault||(t.preventDefault=s),n=n.slice();for(var a=0;a<n.length&&(n[a](t,this),!t.propagationStopped);a++);return i&&!t.defaultPrevented?i(t,this):void 0}},i._signal=function(e,t){var n=(this._eventRegistry||{})[e];if(n){n=n.slice();for(var r=0;r<n.length;r++)n[r](t,this)}},i.once=function(e,t){var n=this;if(this.on(e,(function r(){n.off(e,r),t.apply(null,arguments)})),!t)return new Promise((function(e){t=e}))},i.setDefaultHandler=function(e,t){var n=this._defaultHandlers;if(n||(n=this._defaultHandlers={_disabled_:{}}),n[e]){var r=n[e],i=n._disabled_[e];i||(n._disabled_[e]=i=[]),i.push(r);var o=i.indexOf(t);-1!=o&&i.splice(o,1)}n[e]=t},i.removeDefaultHandler=function(e,t){var n=this._defaultHandlers;if(n){var r=n._disabled_[e];if(n[e]==t)r&&this.setDefaultHandler(e,r.pop());else if(r){var i=r.indexOf(t);-1!=i&&r.splice(i,1)}}},i.on=i.addEventListener=function(e,t,n){this._eventRegistry=this._eventRegistry||{};var r=this._eventRegistry[e];return r||(r=this._eventRegistry[e]=[]),-1==r.indexOf(t)&&r[n?"unshift":"push"](t),t},i.off=i.removeListener=i.removeEventListener=function(e,t){this._eventRegistry=this._eventRegistry||{};var n=this._eventRegistry[e];if(n){var r=n.indexOf(t);-1!==r&&n.splice(r,1)}},i.removeAllListeners=function(e){e||(this._eventRegistry=this._defaultHandlers=void 0),this._eventRegistry&&(this._eventRegistry[e]=void 0),this._defaultHandlers&&(this._defaultHandlers[e]=void 0)},t.EventEmitter=i})),ace.define("ace/lib/app_config",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],(function(e,t,n){var i=e("./oop"),o=e("./event_emitter").EventEmitter,s={setOptions:function(e){Object.keys(e).forEach((function(t){this.setOption(t,e[t])}),this)},getOptions:function(e){var t={};if(e)Array.isArray(e)||(t=e,e=Object.keys(t));else{var n=this.$options;e=Object.keys(n).filter((function(e){return!n[e].hidden}))}return e.forEach((function(e){t[e]=this.getOption(e)}),this),t},setOption:function(e,t){if(this["$"+e]!==t){var n=this.$options[e];if(!n)return a('misspelled option "'+e+'"');if(n.forwardTo)return this[n.forwardTo]&&this[n.forwardTo].setOption(e,t);n.handlesSet||(this["$"+e]=t),n&&n.set&&n.set.call(this,t)}},getOption:function(e){var t=this.$options[e];return t?t.forwardTo?this[t.forwardTo]&&this[t.forwardTo].getOption(e):t&&t.get?t.get.call(this):this["$"+e]:a('misspelled option "'+e+'"')}};function a(e){"undefined"!=typeof console&&console.warn&&console.warn.apply(console,arguments)}function l(e,t){var n=new Error(e);n.data=t,"object"==("undefined"==typeof console?"undefined":r(console))&&console.error&&console.error(n),setTimeout((function(){throw n}))}var c=function(){this.$defaultOptions={}};(function(){i.implement(this,o),this.defineOptions=function(e,t,n){return e.$options||(this.$defaultOptions[t]=e.$options={}),Object.keys(n).forEach((function(t){var r=n[t];"string"==typeof r&&(r={forwardTo:r}),r.name||(r.name=t),e.$options[r.name]=r,"initialValue"in r&&(e["$"+r.name]=r.initialValue)})),i.implement(e,s),this},this.resetOptions=function(e){Object.keys(e.$options).forEach((function(t){var n=e.$options[t];"value"in n&&e.setOption(t,n.value)}))},this.setDefaultValue=function(e,t,n){if(!e){for(e in this.$defaultOptions)if(this.$defaultOptions[e][t])break;if(!this.$defaultOptions[e][t])return!1}var r=this.$defaultOptions[e]||(this.$defaultOptions[e]={});r[t]&&(r.forwardTo?this.setDefaultValue(r.forwardTo,t,n):r[t].value=n)},this.setDefaultValues=function(e,t){Object.keys(t).forEach((function(n){this.setDefaultValue(e,n,t[n])}),this)},this.warn=a,this.reportError=l}).call(c.prototype),t.AppConfig=c})),ace.define("ace/config",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/lib/net","ace/lib/app_config"],(function(e,t,r){var i=e("./lib/lang"),o=(e("./lib/oop"),e("./lib/net")),s=e("./lib/app_config").AppConfig;r.exports=t=new s;var a=function(){return this||"undefined"!=typeof window&&window}(),l={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{},loadWorkerFromBlob:!0,sharedPopups:!1};t.get=function(e){if(!l.hasOwnProperty(e))throw new Error("Unknown config key: "+e);return l[e]},t.set=function(e,t){if(l.hasOwnProperty(e))l[e]=t;else if(0==this.setDefaultValue("",e,t))throw new Error("Unknown config key: "+e)},t.all=function(){return i.copyObject(l)},t.$modes={},t.moduleUrl=function(e,t){if(l.$moduleUrls[e])return l.$moduleUrls[e];var n=e.split("/"),r="snippets"==(t=t||n[n.length-2]||"")?"/":"-",i=n[n.length-1];if("worker"==t&&"-"==r){var o=new RegExp("^"+t+"[\\-_]|[\\-_]"+t+"$","g");i=i.replace(o,"")}(!i||i==t)&&n.length>1&&(i=n[n.length-2]);var s=l[t+"Path"];return null==s?s=l.basePath:"/"==r&&(t=r=""),s&&"/"!=s.slice(-1)&&(s+="/"),s+t+r+i+this.get("suffix")},t.setModuleUrl=function(e,t){return l.$moduleUrls[e]=t},t.$loading={},t.loadModule=function(n,r){var i,s;Array.isArray(n)&&(s=n[0],n=n[1]);try{i=e(n)}catch(e){}if(i&&!t.$loading[n])return r&&r(i);if(t.$loading[n]||(t.$loading[n]=[]),t.$loading[n].push(r),!(t.$loading[n].length>1)){var a=function(){e([n],(function(e){t._emit("load.module",{name:n,module:e});var r=t.$loading[n];t.$loading[n]=null,r.forEach((function(t){t&&t(e)}))}))};if(!t.get("packaged"))return a();o.loadScript(t.moduleUrl(n,s),a),c()}};var c=function(){l.basePath||l.workerPath||l.modePath||l.themePath||Object.keys(l.$moduleUrls).length||(console.error("Unable to infer path to ace from script src,","use ace.config.set('basePath', 'path') to enable dynamic loading of modes and themes","or with webpack use ace/webpack-resolver"),c=function(){})};function u(i){if(a&&a.document){l.packaged=i||e.packaged||r.packaged||a.define&&n(48).packaged;for(var o,s={},c="",u=document.currentScript||document._currentScript,h=(u&&u.ownerDocument||document).getElementsByTagName("script"),d=0;d<h.length;d++){var p=h[d],f=p.src||p.getAttribute("src");if(f){for(var m=p.attributes,g=0,v=m.length;g<v;g++){var b=m[g];0===b.name.indexOf("data-ace-")&&(s[(o=b.name.replace(/^data-ace-/,""),o.replace(/-(.)/g,(function(e,t){return t.toUpperCase()})))]=b.value)}var y=f.match(/^(.*)\/ace(\-\w+)?\.js(\?|$)/);y&&(c=y[1])}}for(var w in c&&(s.base=s.base||c,s.packaged=!0),s.basePath=s.base,s.workerPath=s.workerPath||s.base,s.modePath=s.modePath||s.base,s.themePath=s.themePath||s.base,delete s.base,s)void 0!==s[w]&&t.set(w,s[w])}}u(!0),t.init=u,t.version="1.4.10"})),ace.define("ace/mouse/mouse_handler",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/mouse/default_handlers","ace/mouse/default_gutter_handler","ace/mouse/mouse_event","ace/mouse/dragdrop_handler","ace/mouse/touch_handler","ace/config"],(function(e,t,n){"use strict";var r=e("../lib/event"),i=e("../lib/useragent"),o=e("./default_handlers").DefaultHandlers,s=e("./default_gutter_handler").GutterHandler,a=e("./mouse_event").MouseEvent,l=e("./dragdrop_handler").DragdropHandler,c=e("./touch_handler").addTouchListeners,u=e("../config"),h=function(e){var t=this;this.editor=e,new o(this),new s(this),new l(this);var n=function(t){(!document.hasFocus||!document.hasFocus()||!e.isFocused()&&document.activeElement==(e.textInput&&e.textInput.getElement()))&&window.focus(),e.focus()},a=e.renderer.getMouseEventTarget();r.addListener(a,"click",this.onMouseEvent.bind(this,"click"),e),r.addListener(a,"mousemove",this.onMouseMove.bind(this,"mousemove"),e),r.addMultiMouseDownListener([a,e.renderer.scrollBarV&&e.renderer.scrollBarV.inner,e.renderer.scrollBarH&&e.renderer.scrollBarH.inner,e.textInput&&e.textInput.getElement()].filter(Boolean),[400,300,250],this,"onMouseEvent",e),r.addMouseWheelListener(e.container,this.onMouseWheel.bind(this,"mousewheel"),e),c(e.container,e);var u=e.renderer.$gutter;r.addListener(u,"mousedown",this.onMouseEvent.bind(this,"guttermousedown"),e),r.addListener(u,"click",this.onMouseEvent.bind(this,"gutterclick"),e),r.addListener(u,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick"),e),r.addListener(u,"mousemove",this.onMouseEvent.bind(this,"guttermousemove"),e),r.addListener(a,"mousedown",n,e),r.addListener(u,"mousedown",n,e),i.isIE&&e.renderer.scrollBarV&&(r.addListener(e.renderer.scrollBarV.element,"mousedown",n,e),r.addListener(e.renderer.scrollBarH.element,"mousedown",n,e)),e.on("mousemove",(function(n){if(!t.state&&!t.$dragDelay&&t.$dragEnabled){var r=e.renderer.screenToTextCoordinates(n.x,n.y),i=e.session.selection.getRange(),o=e.renderer;!i.isEmpty()&&i.insideStart(r.row,r.column)?o.setCursorStyle("default"):o.setCursorStyle("")}}),e)};(function(){this.onMouseEvent=function(e,t){this.editor._emit(e,new a(t,this.editor))},this.onMouseMove=function(e,t){var n=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;n&&n.length&&this.editor._emit(e,new a(t,this.editor))},this.onMouseWheel=function(e,t){var n=new a(t,this.editor);n.speed=2*this.$scrollSpeed,n.wheelX=t.wheelX,n.wheelY=t.wheelY,this.editor._emit(e,n)},this.setState=function(e){this.state=e},this.captureMouse=function(e,t){this.x=e.x,this.y=e.y,this.isMousePressed=!0;var n=this.editor,o=this.editor.renderer;o.$isMousePressed=!0;var s=this,l=function(e){if(e){if(i.isWebKit&&!e.which&&s.releaseMouse)return s.releaseMouse();s.x=e.clientX,s.y=e.clientY,t&&t(e),s.mouseEvent=new a(e,s.editor),s.$mouseMoved=!0}},c=function(e){n.off("beforeEndOperation",h),clearInterval(d),u(),s[s.state+"End"]&&s[s.state+"End"](e),s.state="",s.isMousePressed=o.$isMousePressed=!1,o.$keepTextAreaAtCursor&&o.$moveTextAreaToCursor(),s.$onCaptureMouseMove=s.releaseMouse=null,e&&s.onMouseEvent("mouseup",e),n.endOperation()},u=function(){s[s.state]&&s[s.state](),s.$mouseMoved=!1};if(i.isOldIE&&"dblclick"==e.domEvent.type)return setTimeout((function(){c(e)}));var h=function(e){s.releaseMouse&&n.curOp.command.name&&n.curOp.selectionChanged&&(s[s.state+"End"]&&s[s.state+"End"](),s.state="",s.releaseMouse())};n.on("beforeEndOperation",h),n.startOperation({command:{name:"mouse"}}),s.$onCaptureMouseMove=l,s.releaseMouse=r.capture(this.editor.container,l,c);var d=setInterval(u,20)},this.releaseMouse=null,this.cancelContextMenu=function(){var e=function(t){t&&t.domEvent&&"contextmenu"!=t.domEvent.type||(this.editor.off("nativecontextmenu",e),t&&t.domEvent&&r.stopEvent(t.domEvent))}.bind(this);setTimeout(e,10),this.editor.on("nativecontextmenu",e)}}).call(h.prototype),u.defineOptions(h.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:i.isMac?150:0},dragEnabled:{initialValue:!0},focusTimeout:{initialValue:0},tooltipFollowsMouse:{initialValue:!0}}),t.MouseHandler=h})),ace.define("ace/mouse/fold_handler",["require","exports","module","ace/lib/dom"],(function(e,t,n){"use strict";var r=e("../lib/dom");t.FoldHandler=function(e){e.on("click",(function(t){var n=t.getDocumentPosition(),i=e.session,o=i.getFoldAt(n.row,n.column,1);o&&(t.getAccelKey()?i.removeFold(o):i.expandFold(o),t.stop());var s=t.domEvent&&t.domEvent.target;s&&r.hasCssClass(s,"ace_inline_button")&&r.hasCssClass(s,"ace_toggle_wrap")&&(i.setOption("wrap",!i.getUseWrapMode()),e.renderer.scrollCursorIntoView())})),e.on("gutterclick",(function(t){if("foldWidgets"==e.renderer.$gutterLayer.getRegion(t)){var n=t.getDocumentPosition().row,r=e.session;r.foldWidgets&&r.foldWidgets[n]&&e.session.onFoldWidgetClick(n,t),e.isFocused()||e.focus(),t.stop()}})),e.on("gutterdblclick",(function(t){if("foldWidgets"==e.renderer.$gutterLayer.getRegion(t)){var n=t.getDocumentPosition().row,r=e.session,i=r.getParentFoldRangeData(n,!0),o=i.range||i.firstRange;if(o){n=o.start.row;var s=r.getFoldAt(n,r.getLine(n).length,1);s?r.removeFold(s):(r.addFold("...",o),e.renderer.scrollCursorIntoView({row:o.start.row,column:0}))}t.stop()}}))}})),ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],(function(e,t,n){"use strict";var r=e("../lib/keys"),i=e("../lib/event"),o=function(e){this.$editor=e,this.$data={editor:e},this.$handlers=[],this.setDefaultHandler(e.commands)};(function(){this.setDefaultHandler=function(e){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=e,this.addKeyboardHandler(e,0)},this.setKeyboardHandler=function(e){var t=this.$handlers;if(t[t.length-1]!=e){for(;t[t.length-1]&&t[t.length-1]!=this.$defaultHandler;)this.removeKeyboardHandler(t[t.length-1]);this.addKeyboardHandler(e,1)}},this.addKeyboardHandler=function(e,t){if(e){"function"!=typeof e||e.handleKeyboard||(e.handleKeyboard=e);var n=this.$handlers.indexOf(e);-1!=n&&this.$handlers.splice(n,1),null==t?this.$handlers.push(e):this.$handlers.splice(t,0,e),-1==n&&e.attach&&e.attach(this.$editor)}},this.removeKeyboardHandler=function(e){var t=this.$handlers.indexOf(e);return-1!=t&&(this.$handlers.splice(t,1),e.detach&&e.detach(this.$editor),!0)},this.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},this.getStatusText=function(){var e=this.$data,t=e.editor;return this.$handlers.map((function(n){return n.getStatusText&&n.getStatusText(t,e)||""})).filter(Boolean).join(" ")},this.$callKeyboardHandlers=function(e,t,n,r){for(var o,s=!1,a=this.$editor.commands,l=this.$handlers.length;l--&&!((o=this.$handlers[l].handleKeyboard(this.$data,e,t,n,r))&&o.command&&((s="null"==o.command||a.exec(o.command,this.$editor,o.args,r))&&r&&-1!=e&&1!=o.passEvent&&1!=o.command.passEvent&&i.stopEvent(r),s)););return s||-1!=e||(o={command:"insertstring"},s=a.exec("insertstring",this.$editor,t)),s&&this.$editor._signal&&this.$editor._signal("keyboardActivity",o),s},this.onCommandKey=function(e,t,n){var i=r.keyCodeToString(n);return this.$callKeyboardHandlers(t,i,n,e)},this.onTextInput=function(e){return this.$callKeyboardHandlers(-1,e)}}).call(o.prototype),t.KeyBinding=o})),ace.define("ace/lib/bidiutil",["require","exports","module"],(function(e,t,n){"use strict";var r=0,i=0,o=!1,s=!1,a=!1,l=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],c=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],u=[18,18,18,18,18,18,18,18,18,6,5,6,8,5,18,18,18,18,18,18,18,18,18,18,18,18,18,18,5,5,5,6,8,4,4,11,11,11,4,4,4,4,4,10,9,10,9,9,2,2,2,2,2,2,2,2,2,2,9,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,18,18,18,18,18,18,5,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,9,4,11,11,11,11,4,4,4,4,0,4,4,18,4,4,11,11,2,2,4,0,4,4,4,2,0,4,4,4,4,4],h=[8,8,8,8,8,8,8,8,8,8,8,18,18,18,0,1,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,8,5,13,14,15,16,17,9,11,11,11,11,11,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,9,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,8];function d(e,t,n){if(!(i<e))if(1!=e||1!=r||s)for(var o,a,l,c,u=n.length,h=0;h<u;){if(t[h]>=e){for(o=h+1;o<u&&t[o]>=e;)o++;for(a=h,l=o-1;a<l;a++,l--)c=n[a],n[a]=n[l],n[l]=c;h=o}h++}else n.reverse()}function p(e,t,n,i){var l,c,u,h,d=t[i];switch(d){case 0:case 1:o=!1;case 4:case 3:return d;case 2:return o?3:2;case 7:return o=!0,!0,1;case 8:return 4;case 9:return i<1||i+1>=t.length||2!=(l=n[i-1])&&3!=l||2!=(c=t[i+1])&&3!=c?4:(o&&(c=3),c==l?c:4);case 10:return 2==(l=i>0?n[i-1]:5)&&i+1<t.length&&2==t[i+1]?2:4;case 11:if(i>0&&2==n[i-1])return 2;if(o)return 4;for(h=i+1,u=t.length;h<u&&11==t[h];)h++;return h<u&&2==t[h]?2:4;case 12:for(u=t.length,h=i+1;h<u&&12==t[h];)h++;if(h<u){var p=e[i],f=p>=1425&&p<=2303||64286==p;if(l=t[h],f&&(1==l||7==l))return 1}return i<1||5==(l=t[i-1])?4:n[i-1];case 5:return o=!1,s=!0,r;case 6:return a=!0,4;case 13:case 14:case 16:case 17:case 15:o=!1;case 18:return 4}}function f(e){var t=e.charCodeAt(0),n=t>>8;return 0==n?t>191?0:u[t]:5==n?/[\u0591-\u05f4]/.test(e)?1:0:6==n?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(e)?12:/[\u0660-\u0669\u066b-\u066c]/.test(e)?3:1642==t?11:/[\u06f0-\u06f9]/.test(e)?2:7:32==n&&t<=8287?h[255&t]:254==n&&t>=65136?7:4}t.L=0,t.R=1,t.EN=2,t.ON_R=3,t.AN=4,t.R_H=5,t.B=6,t.RLE=7,t.DOT="·",t.doBidiReorder=function(e,n,u){if(e.length<2)return{};var h=e.split(""),m=new Array(h.length),g=new Array(h.length),v=[];r=u?1:0,function(e,t,n,u){var h=r?c:l,d=null,m=null,g=null,v=0,b=null,y=-1,w=null,k=null,x=[];if(!u)for(w=0,u=[];w<n;w++)u[w]=f(e[w]);for(i=r,o=!1,!1,s=!1,a=!1,k=0;k<n;k++){if(d=v,x[k]=m=p(e,u,x,k),b=240&(v=h[d][m]),v&=15,t[k]=g=h[v][5],b>0)if(16==b){for(w=y;w<k;w++)t[w]=1;y=-1}else y=-1;if(h[v][6])-1==y&&(y=k);else if(y>-1){for(w=y;w<k;w++)t[w]=g;y=-1}5==u[k]&&(t[k]=0),i|=g}if(a)for(w=0;w<n;w++)if(6==u[w]){t[w]=r;for(var S=w-1;S>=0&&8==u[S];S--)t[S]=r}}(h,v,h.length,n);for(var b=0;b<m.length;m[b]=b,b++);d(2,v,m),d(1,v,m);for(b=0;b<m.length-1;b++)3===n[b]?v[b]=t.AN:1===v[b]&&(n[b]>7&&n[b]<13||4===n[b]||18===n[b])?v[b]=t.ON_R:b>0&&"ل"===h[b-1]&&/\u0622|\u0623|\u0625|\u0627/.test(h[b])&&(v[b-1]=v[b]=t.R_H,b++);h[h.length-1]===t.DOT&&(v[h.length-1]=t.B),""===h[0]&&(v[0]=t.RLE);for(b=0;b<m.length;b++)g[b]=v[m[b]];return{logicalFromVisual:m,bidiLevels:g}},t.hasBidiCharacters=function(e,t){for(var n=!1,r=0;r<e.length;r++)t[r]=f(e.charAt(r)),n||1!=t[r]&&7!=t[r]&&3!=t[r]||(n=!0);return n},t.getVisualFromLogicalIdx=function(e,t){for(var n=0;n<t.logicalFromVisual.length;n++)if(t.logicalFromVisual[n]==e)return n;return 0}})),ace.define("ace/bidihandler",["require","exports","module","ace/lib/bidiutil","ace/lib/lang"],(function(e,t,n){"use strict";var r=e("./lib/bidiutil"),i=e("./lib/lang"),o=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\u202B]/,s=function(e){this.session=e,this.bidiMap={},this.currentRow=null,this.bidiUtil=r,this.charWidths=[],this.EOL="¬",this.showInvisibles=!0,this.isRtlDir=!1,this.$isRtl=!1,this.line="",this.wrapIndent=0,this.EOF="¶",this.RLE="",this.contentWidth=0,this.fontMetrics=null,this.rtlLineOffset=0,this.wrapOffset=0,this.isMoveLeftOperation=!1,this.seenBidi=o.test(e.getValue())};(function(){this.isBidiRow=function(e,t,n){return!!this.seenBidi&&(e!==this.currentRow&&(this.currentRow=e,this.updateRowLine(t,n),this.updateBidiMap()),this.bidiMap.bidiLevels)},this.onChange=function(e){this.seenBidi?this.currentRow=null:"insert"==e.action&&o.test(e.lines.join("\n"))&&(this.seenBidi=!0,this.currentRow=null)},this.getDocumentRow=function(){var e=0,t=this.session.$screenRowCache;if(t.length){var n=this.session.$getRowCacheIndex(t,this.currentRow);n>=0&&(e=this.session.$docRowCache[n])}return e},this.getSplitIndex=function(){var e=0,t=this.session.$screenRowCache;if(t.length)for(var n,r=this.session.$getRowCacheIndex(t,this.currentRow);this.currentRow-e>0&&(n=this.session.$getRowCacheIndex(t,this.currentRow-e-1))===r;)r=n,e++;else e=this.currentRow;return e},this.updateRowLine=function(e,t){void 0===e&&(e=this.getDocumentRow());var n=e===this.session.getLength()-1?this.EOF:this.EOL;if(this.wrapIndent=0,this.line=this.session.getLine(e),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,this.session.$useWrapMode){var o=this.session.$wrapData[e];o&&(void 0===t&&(t=this.getSplitIndex()),t>0&&o.length?(this.wrapIndent=o.indent,this.wrapOffset=this.wrapIndent*this.charWidths[r.L],this.line=t<o.length?this.line.substring(o[t-1],o[t]):this.line.substring(o[o.length-1])):this.line=this.line.substring(0,o[t])),t==o.length&&(this.line+=this.showInvisibles?n:r.DOT)}else this.line+=this.showInvisibles?n:r.DOT;var s,a=this.session,l=0;this.line=this.line.replace(/\t|[\u1100-\u2029, \u202F-\uFFE6]/g,(function(e,t){return"\t"===e||a.isFullWidth(e.charCodeAt(0))?(s="\t"===e?a.getScreenTabSize(t+l):2,l+=s-1,i.stringRepeat(r.DOT,s)):e})),this.isRtlDir&&(this.fontMetrics.$main.textContent=this.line.charAt(this.line.length-1)==r.DOT?this.line.substr(0,this.line.length-1):this.line,this.rtlLineOffset=this.contentWidth-this.fontMetrics.$main.getBoundingClientRect().width)},this.updateBidiMap=function(){var e=[];r.hasBidiCharacters(this.line,e)||this.isRtlDir?this.bidiMap=r.doBidiReorder(this.line,e,this.isRtlDir):this.bidiMap={}},this.markAsDirty=function(){this.currentRow=null},this.updateCharacterWidths=function(e){if(this.characterWidth!==e.$characterSize.width){this.fontMetrics=e;var t=this.characterWidth=e.$characterSize.width,n=e.$measureCharWidth("ה");this.charWidths[r.L]=this.charWidths[r.EN]=this.charWidths[r.ON_R]=t,this.charWidths[r.R]=this.charWidths[r.AN]=n,this.charWidths[r.R_H]=.45*n,this.charWidths[r.B]=this.charWidths[r.RLE]=0,this.currentRow=null}},this.setShowInvisibles=function(e){this.showInvisibles=e,this.currentRow=null},this.setEolChar=function(e){this.EOL=e},this.setContentWidth=function(e){this.contentWidth=e},this.isRtlLine=function(e){return!!this.$isRtl||(null!=e?this.session.getLine(e).charAt(0)==this.RLE:this.isRtlDir)},this.setRtlDirection=function(e,t){for(var n=e.getCursorPosition(),r=e.selection.getSelectionAnchor().row;r<=n.row;r++)t||e.session.getLine(r).charAt(0)!==e.session.$bidiHandler.RLE?t&&e.session.getLine(r).charAt(0)!==e.session.$bidiHandler.RLE&&e.session.doc.insert({column:0,row:r},e.session.$bidiHandler.RLE):e.session.doc.removeInLine(r,0,1)},this.getPosLeft=function(e){e-=this.wrapIndent;var t=this.line.charAt(0)===this.RLE?1:0,n=e>t?this.session.getOverwrite()?e:e-1:t,i=r.getVisualFromLogicalIdx(n,this.bidiMap),o=this.bidiMap.bidiLevels,s=0;!this.session.getOverwrite()&&e<=t&&o[i]%2!=0&&i++;for(var a=0;a<i;a++)s+=this.charWidths[o[a]];return!this.session.getOverwrite()&&e>t&&o[i]%2==0&&(s+=this.charWidths[o[i]]),this.wrapIndent&&(s+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(s+=this.rtlLineOffset),s},this.getSelections=function(e,t){var n,r=this.bidiMap,i=r.bidiLevels,o=[],s=0,a=Math.min(e,t)-this.wrapIndent,l=Math.max(e,t)-this.wrapIndent,c=!1,u=!1,h=0;this.wrapIndent&&(s+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var d,p=0;p<i.length;p++)d=r.logicalFromVisual[p],n=i[p],(c=d>=a&&d<l)&&!u?h=s:!c&&u&&o.push({left:h,width:s-h}),s+=this.charWidths[n],u=c;if(c&&p===i.length&&o.push({left:h,width:s-h}),this.isRtlDir)for(var f=0;f<o.length;f++)o[f].left+=this.rtlLineOffset;return o},this.offsetToCol=function(e){this.isRtlDir&&(e-=this.rtlLineOffset);var t=0,n=(e=Math.max(e,0),0),r=0,i=this.bidiMap.bidiLevels,o=this.charWidths[i[r]];for(this.wrapIndent&&(e-=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);e>n+o/2;){if(n+=o,r===i.length-1){o=0;break}o=this.charWidths[i[++r]]}return r>0&&i[r-1]%2!=0&&i[r]%2==0?(e<n&&r--,t=this.bidiMap.logicalFromVisual[r]):r>0&&i[r-1]%2==0&&i[r]%2!=0?t=1+(e>n?this.bidiMap.logicalFromVisual[r]:this.bidiMap.logicalFromVisual[r-1]):this.isRtlDir&&r===i.length-1&&0===o&&i[r-1]%2==0||!this.isRtlDir&&0===r&&i[r]%2!=0?t=1+this.bidiMap.logicalFromVisual[r]:(r>0&&i[r-1]%2!=0&&0!==o&&r--,t=this.bidiMap.logicalFromVisual[r]),0===t&&this.isRtlDir&&t++,t+this.wrapIndent}}).call(s.prototype),t.BidiHandler=s})),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],(function(e,t,n){"use strict";var r=e("./lib/oop"),i=e("./lib/lang"),o=e("./lib/event_emitter").EventEmitter,s=e("./range").Range,a=function(e){this.session=e,this.doc=e.getDocument(),this.clearSelection(),this.cursor=this.lead=this.doc.createAnchor(0,0),this.anchor=this.doc.createAnchor(0,0),this.$silent=!1;var t=this;this.cursor.on("change",(function(e){t.$cursorChanged=!0,t.$silent||t._emit("changeCursor"),t.$isEmpty||t.$silent||t._emit("changeSelection"),t.$keepDesiredColumnOnChange||e.old.column==e.value.column||(t.$desiredColumn=null)})),this.anchor.on("change",(function(){t.$anchorChanged=!0,t.$isEmpty||t.$silent||t._emit("changeSelection")}))};(function(){r.implement(this,o),this.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},this.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},this.getCursor=function(){return this.lead.getPosition()},this.setSelectionAnchor=function(e,t){this.$isEmpty=!1,this.anchor.setPosition(e,t)},this.getAnchor=this.getSelectionAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},this.getSelectionLead=function(){return this.lead.getPosition()},this.isBackwards=function(){var e=this.anchor,t=this.lead;return e.row>t.row||e.row==t.row&&e.column>t.column},this.getRange=function(){var e=this.anchor,t=this.lead;return this.$isEmpty?s.fromPoints(t,t):this.isBackwards()?s.fromPoints(t,e):s.fromPoints(e,t)},this.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},this.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},this.setRange=this.setSelectionRange=function(e,t){var n=t?e.end:e.start,r=t?e.start:e.end;this.$setSelection(n.row,n.column,r.row,r.column)},this.$setSelection=function(e,t,n,r){if(!this.$silent){var i=this.$isEmpty,o=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(e,t),this.cursor.setPosition(n,r),this.$isEmpty=!s.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||i!=this.$isEmpty||o)&&this._emit("changeSelection")}},this.$moveSelection=function(e){var t=this.lead;this.$isEmpty&&this.setSelectionAnchor(t.row,t.column),e.call(this)},this.selectTo=function(e,t){this.$moveSelection((function(){this.moveCursorTo(e,t)}))},this.selectToPosition=function(e){this.$moveSelection((function(){this.moveCursorToPosition(e)}))},this.moveTo=function(e,t){this.clearSelection(),this.moveCursorTo(e,t)},this.moveToPosition=function(e){this.clearSelection(),this.moveCursorToPosition(e)},this.selectUp=function(){this.$moveSelection(this.moveCursorUp)},this.selectDown=function(){this.$moveSelection(this.moveCursorDown)},this.selectRight=function(){this.$moveSelection(this.moveCursorRight)},this.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},this.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},this.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},this.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},this.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},this.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},this.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},this.getWordRange=function(e,t){if(void 0===t){var n=e||this.lead;e=n.row,t=n.column}return this.session.getWordRange(e,t)},this.selectWord=function(){this.setSelectionRange(this.getWordRange())},this.selectAWord=function(){var e=this.getCursor(),t=this.session.getAWordRange(e.row,e.column);this.setSelectionRange(t)},this.getLineRange=function(e,t){var n,r="number"==typeof e?e:this.lead.row,i=this.session.getFoldLine(r);return i?(r=i.start.row,n=i.end.row):n=r,!0===t?new s(r,0,n,this.session.getLine(n).length):new s(r,0,n+1,0)},this.selectLine=function(){this.setSelectionRange(this.getLineRange())},this.moveCursorUp=function(){this.moveCursorBy(-1,0)},this.moveCursorDown=function(){this.moveCursorBy(1,0)},this.wouldMoveIntoSoftTab=function(e,t,n){var r=e.column,i=e.column+t;return n<0&&(r=e.column-t,i=e.column),this.session.isTabStop(e)&&this.doc.getLine(e.row).slice(r,i).split(" ").length-1==t},this.moveCursorLeft=function(){var e,t=this.lead.getPosition();if(e=this.session.getFoldAt(t.row,t.column,-1))this.moveCursorTo(e.start.row,e.start.column);else if(0===t.column)t.row>0&&this.moveCursorTo(t.row-1,this.doc.getLine(t.row-1).length);else{var n=this.session.getTabSize();this.wouldMoveIntoSoftTab(t,n,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-n):this.moveCursorBy(0,-1)}},this.moveCursorRight=function(){var e,t=this.lead.getPosition();if(e=this.session.getFoldAt(t.row,t.column,1))this.moveCursorTo(e.end.row,e.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row<this.doc.getLength()-1&&this.moveCursorTo(this.lead.row+1,0);else{var n=this.session.getTabSize();t=this.lead;this.wouldMoveIntoSoftTab(t,n,1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,n):this.moveCursorBy(0,1)}},this.moveCursorLineStart=function(){var e=this.lead.row,t=this.lead.column,n=this.session.documentToScreenRow(e,t),r=this.session.screenToDocumentPosition(n,0),i=this.session.getDisplayLine(e,null,r.row,r.column).match(/^\s*/);i[0].length==t||this.session.$useEmacsStyleLineStart||(r.column+=i[0].length),this.moveCursorToPosition(r)},this.moveCursorLineEnd=function(){var e=this.lead,t=this.session.getDocumentLastRowColumnPosition(e.row,e.column);if(this.lead.column==t.column){var n=this.session.getLine(t.row);if(t.column==n.length){var r=n.search(/\s+$/);r>0&&(t.column=r)}}this.moveCursorTo(t.row,t.column)},this.moveCursorFileEnd=function(){var e=this.doc.getLength()-1,t=this.doc.getLine(e).length;this.moveCursorTo(e,t)},this.moveCursorFileStart=function(){this.moveCursorTo(0,0)},this.moveCursorLongWordRight=function(){var e=this.lead.row,t=this.lead.column,n=this.doc.getLine(e),r=n.substring(t);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var i=this.session.getFoldAt(e,t,1);if(i)this.moveCursorTo(i.end.row,i.end.column);else{if(this.session.nonTokenRe.exec(r)&&(t+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,r=n.substring(t)),t>=n.length)return this.moveCursorTo(e,n.length),this.moveCursorRight(),void(e<this.doc.getLength()-1&&this.moveCursorWordRight());this.session.tokenRe.exec(r)&&(t+=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(e,t)}},this.moveCursorLongWordLeft=function(){var e,t=this.lead.row,n=this.lead.column;if(e=this.session.getFoldAt(t,n,-1))this.moveCursorTo(e.start.row,e.start.column);else{var r=this.session.getFoldStringAt(t,n,-1);null==r&&(r=this.doc.getLine(t).substring(0,n));var o=i.stringReverse(r);if(this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0,this.session.nonTokenRe.exec(o)&&(n-=this.session.nonTokenRe.lastIndex,o=o.slice(this.session.nonTokenRe.lastIndex),this.session.nonTokenRe.lastIndex=0),n<=0)return this.moveCursorTo(t,0),this.moveCursorLeft(),void(t>0&&this.moveCursorWordLeft());this.session.tokenRe.exec(o)&&(n-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(t,n)}},this.$shortWordEndIndex=function(e){var t,n=0,r=/\s/,i=this.session.tokenRe;if(i.lastIndex=0,this.session.tokenRe.exec(e))n=this.session.tokenRe.lastIndex;else{for(;(t=e[n])&&r.test(t);)n++;if(n<1)for(i.lastIndex=0;(t=e[n])&&!i.test(t);)if(i.lastIndex=0,n++,r.test(t)){if(n>2){n--;break}for(;(t=e[n])&&r.test(t);)n++;if(n>2)break}}return i.lastIndex=0,n},this.moveCursorShortWordRight=function(){var e=this.lead.row,t=this.lead.column,n=this.doc.getLine(e),r=n.substring(t),i=this.session.getFoldAt(e,t,1);if(i)return this.moveCursorTo(i.end.row,i.end.column);if(t==n.length){var o=this.doc.getLength();do{e++,r=this.doc.getLine(e)}while(e<o&&/^\s*$/.test(r));/^\s+/.test(r)||(r=""),t=0}var s=this.$shortWordEndIndex(r);this.moveCursorTo(e,t+s)},this.moveCursorShortWordLeft=function(){var e,t=this.lead.row,n=this.lead.column;if(e=this.session.getFoldAt(t,n,-1))return this.moveCursorTo(e.start.row,e.start.column);var r=this.session.getLine(t).substring(0,n);if(0===n){do{t--,r=this.doc.getLine(t)}while(t>0&&/^\s*$/.test(r));n=r.length,/\s+$/.test(r)||(r="")}var o=i.stringReverse(r),s=this.$shortWordEndIndex(o);return this.moveCursorTo(t,n-s)},this.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},this.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},this.moveCursorBy=function(e,t){var n,r=this.session.documentToScreenPosition(this.lead.row,this.lead.column);if(0===t&&(0!==e&&(this.session.$bidiHandler.isBidiRow(r.row,this.lead.row)?(n=this.session.$bidiHandler.getPosLeft(r.column),r.column=Math.round(n/this.session.$bidiHandler.charWidths[0])):n=r.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?r.column=this.$desiredColumn:this.$desiredColumn=r.column),0!=e&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var i=this.session.lineWidgets[this.lead.row];e<0?e-=i.rowsAbove||0:e>0&&(e+=i.rowCount-(i.rowsAbove||0))}var o=this.session.screenToDocumentPosition(r.row+e,r.column,n);0!==e&&0===t&&o.row===this.lead.row&&(o.column,this.lead.column),this.moveCursorTo(o.row,o.column+t,0===t)},this.moveCursorToPosition=function(e){this.moveCursorTo(e.row,e.column)},this.moveCursorTo=function(e,t,n){var r=this.session.getFoldAt(e,t,1);r&&(e=r.start.row,t=r.start.column),this.$keepDesiredColumnOnChange=!0;var i=this.session.getLine(e);/[\uDC00-\uDFFF]/.test(i.charAt(t))&&i.charAt(t-1)&&(this.lead.row==e&&this.lead.column==t+1?t-=1:t+=1),this.lead.setPosition(e,t),this.$keepDesiredColumnOnChange=!1,n||(this.$desiredColumn=null)},this.moveCursorToScreen=function(e,t,n){var r=this.session.screenToDocumentPosition(e,t);this.moveCursorTo(r.row,r.column,n)},this.detach=function(){this.lead.detach(),this.anchor.detach(),this.session=this.doc=null},this.fromOrientedRange=function(e){this.setSelectionRange(e,e.cursor==e.start),this.$desiredColumn=e.desiredColumn||this.$desiredColumn},this.toOrientedRange=function(e){var t=this.getRange();return e?(e.start.column=t.start.column,e.start.row=t.start.row,e.end.column=t.end.column,e.end.row=t.end.row):e=t,e.cursor=this.isBackwards()?e.start:e.end,e.desiredColumn=this.$desiredColumn,e},this.getRangeOfMovements=function(e){var t=this.getCursor();try{e(this);var n=this.getCursor();return s.fromPoints(t,n)}catch(e){return s.fromPoints(t,t)}finally{this.moveCursorToPosition(t)}},this.toJSON=function(){if(this.rangeCount)var e=this.ranges.map((function(e){var t=e.clone();return t.isBackwards=e.cursor==e.start,t}));else(e=this.getRange()).isBackwards=this.isBackwards();return e},this.fromJSON=function(e){if(null==e.start){if(this.rangeList&&e.length>1){this.toSingleRange(e[0]);for(var t=e.length;t--;){var n=s.fromPoints(e[t].start,e[t].end);e[t].isBackwards&&(n.cursor=n.start),this.addRange(n,!0)}return}e=e[0]}this.rangeList&&this.toSingleRange(e),this.setSelectionRange(e,e.isBackwards)},this.isEqual=function(e){if((e.length||this.rangeCount)&&e.length!=this.rangeCount)return!1;if(!e.length||!this.ranges)return this.getRange().isEqual(e);for(var t=this.ranges.length;t--;)if(!this.ranges[t].isEqual(e[t]))return!1;return!0}}).call(a.prototype),t.Selection=a})),ace.define("ace/tokenizer",["require","exports","module","ace/config"],(function(e,t,n){"use strict";var r=e("./config"),i=2e3,o=function(e){for(var t in this.states=e,this.regExps={},this.matchMappings={},this.states){for(var n=this.states[t],r=[],i=0,o=this.matchMappings[t]={defaultToken:"text"},s="g",a=[],l=0;l<n.length;l++){var c=n[l];if(c.defaultToken&&(o.defaultToken=c.defaultToken),c.caseInsensitive&&(s="gi"),null!=c.regex){c.regex instanceof RegExp&&(c.regex=c.regex.toString().slice(1,-1));var u=c.regex,h=new RegExp("(?:("+u+")|(.))").exec("a").length-2;Array.isArray(c.token)?1==c.token.length||1==h?c.token=c.token[0]:h-1!=c.token.length?(this.reportError("number of classes and regexp groups doesn't match",{rule:c,groupCount:h-1}),c.token=c.token[0]):(c.tokenArray=c.token,c.token=null,c.onMatch=this.$arrayTokens):"function"!=typeof c.token||c.onMatch||(c.onMatch=h>1?this.$applyToken:c.token),h>1&&(/\\\d/.test(c.regex)?u=c.regex.replace(/\\([0-9]+)/g,(function(e,t){return"\\"+(parseInt(t,10)+i+1)})):(h=1,u=this.removeCapturingGroups(c.regex)),c.splitRegex||"string"==typeof c.token||a.push(c)),o[i]=l,i+=h,r.push(u),c.onMatch||(c.onMatch=null)}}r.length||(o[0]=0,r.push("$")),a.forEach((function(e){e.splitRegex=this.createSplitterRegexp(e.regex,s)}),this),this.regExps[t]=new RegExp("("+r.join(")|(")+")|($)",s)}};(function(){this.$setMaxTokenCount=function(e){i=0|e},this.$applyToken=function(e){var t=this.splitRegex.exec(e).slice(1),n=this.token.apply(this,t);if("string"==typeof n)return[{type:n,value:e}];for(var r=[],i=0,o=n.length;i<o;i++)t[i]&&(r[r.length]={type:n[i],value:t[i]});return r},this.$arrayTokens=function(e){if(!e)return[];var t=this.splitRegex.exec(e);if(!t)return"text";for(var n=[],r=this.tokenArray,i=0,o=r.length;i<o;i++)t[i+1]&&(n[n.length]={type:r[i],value:t[i+1]});return n},this.removeCapturingGroups=function(e){return e.replace(/\\.|\[(?:\\.|[^\\\]])*|\(\?[:=!]|(\()/g,(function(e,t){return t?"(?:":e}))},this.createSplitterRegexp=function(e,t){if(-1!=e.indexOf("(?=")){var n=0,r=!1,i={};e.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,(function(e,t,o,s,a,l){return r?r="]"!=a:a?r=!0:s?(n==i.stack&&(i.end=l+1,i.stack=-1),n--):o&&(n++,1!=o.length&&(i.stack=n,i.start=l)),e})),null!=i.end&&/^\)*$/.test(e.substr(i.end))&&(e=e.substring(0,i.start)+e.substr(i.end))}return"^"!=e.charAt(0)&&(e="^"+e),"$"!=e.charAt(e.length-1)&&(e+="$"),new RegExp(e,(t||"").replace("g",""))},this.getLineTokens=function(e,t){if(t&&"string"!=typeof t){var n=t.slice(0);"#tmp"===(t=n[0])&&(n.shift(),t=n.shift())}else n=[];var r=t||"start",o=this.states[r];o||(r="start",o=this.states[r]);var s=this.matchMappings[r],a=this.regExps[r];a.lastIndex=0;for(var l,c=[],u=0,h=0,d={type:null,value:""};l=a.exec(e);){var p=s.defaultToken,f=null,m=l[0],g=a.lastIndex;if(g-m.length>u){var v=e.substring(u,g-m.length);d.type==p?d.value+=v:(d.type&&c.push(d),d={type:p,value:v})}for(var b=0;b<l.length-2;b++)if(void 0!==l[b+1]){p=(f=o[s[b]]).onMatch?f.onMatch(m,r,n,e):f.token,f.next&&(r="string"==typeof f.next?f.next:f.next(r,n),(o=this.states[r])||(this.reportError("state doesn't exist",r),r="start",o=this.states[r]),s=this.matchMappings[r],u=g,(a=this.regExps[r]).lastIndex=g),f.consumeLineEnd&&(u=g);break}if(m)if("string"==typeof p)f&&!1===f.merge||d.type!==p?(d.type&&c.push(d),d={type:p,value:m}):d.value+=m;else if(p){d.type&&c.push(d),d={type:null,value:""};for(b=0;b<p.length;b++)c.push(p[b])}if(u==e.length)break;if(u=g,h++>i){for(h>2*e.length&&this.reportError("infinite loop with in ace tokenizer",{startState:t,line:e});u<e.length;)d.type&&c.push(d),d={value:e.substring(u,u+=500),type:"overflow"};r="start",n=[];break}}return d.type&&c.push(d),n.length>1&&n[0]!==r&&n.unshift("#tmp",r),{tokens:c,state:n.length?n:r}},this.reportError=r.reportError}).call(o.prototype),t.Tokenizer=o})),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/lang"],(function(e,t,n){"use strict";var r=e("../lib/lang"),i=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}};(function(){this.addRules=function(e,t){if(t)for(var n in e){for(var r=e[n],i=0;i<r.length;i++){var o=r[i];(o.next||o.onMatch)&&("string"==typeof o.next&&0!==o.next.indexOf(t)&&(o.next=t+o.next),o.nextState&&0!==o.nextState.indexOf(t)&&(o.nextState=t+o.nextState))}this.$rules[t+n]=r}else for(var n in e)this.$rules[n]=e[n]},this.getRules=function(){return this.$rules},this.embedRules=function(e,t,n,i,o){var s="function"==typeof e?(new e).getRules():e;if(i)for(var a=0;a<i.length;a++)i[a]=t+i[a];else for(var l in i=[],s)i.push(t+l);if(this.addRules(s,t),n){var c=Array.prototype[o?"push":"unshift"];for(a=0;a<i.length;a++)c.apply(this.$rules[i[a]],r.deepCopy(n))}this.$embeds||(this.$embeds=[]),this.$embeds.push(t)},this.getEmbeds=function(){return this.$embeds};var e=function(e,t){return("start"!=e||t.length)&&t.unshift(this.nextState,e),this.nextState},t=function(e,t){return t.shift(),t.shift()||"start"};this.normalizeRules=function(){var n=0,r=this.$rules;Object.keys(r).forEach((function i(o){var s=r[o];s.processed=!0;for(var a=0;a<s.length;a++){var l=s[a],c=null;Array.isArray(l)&&(c=l,l={}),!l.regex&&l.start&&(l.regex=l.start,l.next||(l.next=[]),l.next.push({defaultToken:l.token},{token:l.token+".end",regex:l.end||l.start,next:"pop"}),l.token=l.token+".start",l.push=!0);var u=l.next||l.push;if(u&&Array.isArray(u)){var h=l.stateName;h||("string"!=typeof(h=l.token)&&(h=h[0]||""),r[h]&&(h+=n++)),r[h]=u,l.next=h,i(h)}else"pop"==u&&(l.next=t);if(l.push&&(l.nextState=l.next||l.push,l.next=e,delete l.push),l.rules)for(var d in l.rules)r[d]?r[d].push&&r[d].push.apply(r[d],l.rules[d]):r[d]=l.rules[d];var p="string"==typeof l?l:l.include;if(p&&(c=Array.isArray(p)?p.map((function(e){return r[e]})):r[p]),c){var f=[a,1].concat(c);l.noEscape&&(f=f.filter((function(e){return!e.next}))),s.splice.apply(s,f),a--}l.keywordMap&&(l.token=this.createKeywordMapper(l.keywordMap,l.defaultToken||"text",l.caseInsensitive),delete l.defaultToken)}}),this)},this.createKeywordMapper=function(e,t,n,r){var i=Object.create(null);return Object.keys(e).forEach((function(t){var o=e[t];n&&(o=o.toLowerCase());for(var s=o.split(r||"|"),a=s.length;a--;)i[s[a]]=t})),Object.getPrototypeOf(i)&&(i.__proto__=null),this.$keywordList=Object.keys(i),e=null,n?function(e){return i[e.toLowerCase()]||t}:function(e){return i[e]||t}},this.getKeywords=function(){return this.$keywords}}).call(i.prototype),t.TextHighlightRules=i})),ace.define("ace/mode/behaviour",["require","exports","module"],(function(e,t,n){"use strict";var r=function(){this.$behaviours={}};(function(){this.add=function(e,t,n){switch(void 0){case this.$behaviours:this.$behaviours={};case this.$behaviours[e]:this.$behaviours[e]={}}this.$behaviours[e][t]=n},this.addBehaviours=function(e){for(var t in e)for(var n in e[t])this.add(t,n,e[t][n])},this.remove=function(e){this.$behaviours&&this.$behaviours[e]&&delete this.$behaviours[e]},this.inherit=function(e,t){if("function"==typeof e)var n=(new e).getBehaviours(t);else n=e.getBehaviours(t);this.addBehaviours(n)},this.getBehaviours=function(e){if(e){for(var t={},n=0;n<e.length;n++)this.$behaviours[e[n]]&&(t[e[n]]=this.$behaviours[e[n]]);return t}return this.$behaviours}}).call(r.prototype),t.Behaviour=r})),ace.define("ace/token_iterator",["require","exports","module","ace/range"],(function(e,t,n){"use strict";var r=e("./range").Range,i=function(e,t,n){this.$session=e,this.$row=t,this.$rowTokens=e.getTokens(t);var r=e.getTokenAt(t,n);this.$tokenIndex=r?r.index:-1};(function(){this.stepBackward=function(){for(this.$tokenIndex-=1;this.$tokenIndex<0;){if(this.$row-=1,this.$row<0)return this.$row=0,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=this.$rowTokens.length-1}return this.$rowTokens[this.$tokenIndex]},this.stepForward=function(){var e;for(this.$tokenIndex+=1;this.$tokenIndex>=this.$rowTokens.length;){if(this.$row+=1,e||(e=this.$session.getLength()),this.$row>=e)return this.$row=e-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},this.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},this.getCurrentTokenRow=function(){return this.$row},this.getCurrentTokenColumn=function(){var e=this.$rowTokens,t=this.$tokenIndex,n=e[t].start;if(void 0!==n)return n;for(n=0;t>0;)n+=e[t-=1].value.length;return n},this.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},this.getCurrentTokenRange=function(){var e=this.$rowTokens[this.$tokenIndex],t=this.getCurrentTokenColumn();return new r(this.$row,t,this.$row,t+e.value.length)}}).call(i.prototype),t.TokenIterator=i})),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],(function(e,t,n){"use strict";var r,i=e("../../lib/oop"),o=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,a=e("../../lib/lang"),l=["text","paren.rparen","rparen","paren","punctuation.operator"],c=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],u={},h={'"':'"',"'":"'"},d=function(e){var t=-1;if(e.multiSelect&&(t=e.selection.index,u.rangeCount!=e.multiSelect.rangeCount&&(u={rangeCount:e.multiSelect.rangeCount})),u[t])return r=u[t];r=u[t]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},p=function(e,t,n,r){var i=e.end.row-e.start.row;return{text:n+t+r,selection:[0,e.start.column+1,i,e.end.column+(i?0:1)]}},f=function e(t){this.add("braces","insertion",(function(n,i,o,s,l){var c=o.getCursorPosition(),u=s.doc.getLine(c.row);if("{"==l){d(o);var h=o.getSelectionRange(),f=s.doc.getTextRange(h);if(""!==f&&"{"!==f&&o.getWrapBehavioursEnabled())return p(h,f,"{","}");if(e.isSaneInsertion(o,s))return/[\]\}\)]/.test(u[c.column])||o.inMultiSelectMode||t&&t.braces?(e.recordAutoInsert(o,s,"}"),{text:"{}",selection:[1,1]}):(e.recordMaybeInsert(o,s,"{"),{text:"{",selection:[1,1]})}else if("}"==l){if(d(o),"}"==u.substring(c.column,c.column+1))if(null!==s.$findOpeningBracket("}",{column:c.column+1,row:c.row})&&e.isAutoInsertedClosing(c,u,l))return e.popAutoInsertedClosing(),{text:"",selection:[1,1]}}else{if("\n"==l||"\r\n"==l){d(o);var m="";if(e.isMaybeInsertedClosing(c,u)&&(m=a.stringRepeat("}",r.maybeInsertedBrackets),e.clearMaybeInsertedClosing()),"}"===u.substring(c.column,c.column+1)){var g=s.findMatchingBracket({row:c.row,column:c.column+1},"}");if(!g)return null;var v=this.$getIndent(s.getLine(g.row))}else{if(!m)return void e.clearMaybeInsertedClosing();v=this.$getIndent(u)}var b=v+s.getTabString();return{text:"\n"+b+"\n"+v+m,selection:[1,b.length,1,b.length]}}e.clearMaybeInsertedClosing()}})),this.add("braces","deletion",(function(e,t,n,i,o){var s=i.doc.getTextRange(o);if(!o.isMultiLine()&&"{"==s){if(d(n),"}"==i.doc.getLine(o.start.row).substring(o.end.column,o.end.column+1))return o.end.column++,o;r.maybeInsertedBrackets--}})),this.add("parens","insertion",(function(t,n,r,i,o){if("("==o){d(r);var s=r.getSelectionRange(),a=i.doc.getTextRange(s);if(""!==a&&r.getWrapBehavioursEnabled())return p(s,a,"(",")");if(e.isSaneInsertion(r,i))return e.recordAutoInsert(r,i,")"),{text:"()",selection:[1,1]}}else if(")"==o){d(r);var l=r.getCursorPosition(),c=i.doc.getLine(l.row);if(")"==c.substring(l.column,l.column+1))if(null!==i.$findOpeningBracket(")",{column:l.column+1,row:l.row})&&e.isAutoInsertedClosing(l,c,o))return e.popAutoInsertedClosing(),{text:"",selection:[1,1]}}})),this.add("parens","deletion",(function(e,t,n,r,i){var o=r.doc.getTextRange(i);if(!i.isMultiLine()&&"("==o&&(d(n),")"==r.doc.getLine(i.start.row).substring(i.start.column+1,i.start.column+2)))return i.end.column++,i})),this.add("brackets","insertion",(function(t,n,r,i,o){if("["==o){d(r);var s=r.getSelectionRange(),a=i.doc.getTextRange(s);if(""!==a&&r.getWrapBehavioursEnabled())return p(s,a,"[","]");if(e.isSaneInsertion(r,i))return e.recordAutoInsert(r,i,"]"),{text:"[]",selection:[1,1]}}else if("]"==o){d(r);var l=r.getCursorPosition(),c=i.doc.getLine(l.row);if("]"==c.substring(l.column,l.column+1))if(null!==i.$findOpeningBracket("]",{column:l.column+1,row:l.row})&&e.isAutoInsertedClosing(l,c,o))return e.popAutoInsertedClosing(),{text:"",selection:[1,1]}}})),this.add("brackets","deletion",(function(e,t,n,r,i){var o=r.doc.getTextRange(i);if(!i.isMultiLine()&&"["==o&&(d(n),"]"==r.doc.getLine(i.start.row).substring(i.start.column+1,i.start.column+2)))return i.end.column++,i})),this.add("string_dquotes","insertion",(function(e,t,n,r,i){var o=r.$mode.$quotes||h;if(1==i.length&&o[i]){if(this.lineCommentStart&&-1!=this.lineCommentStart.indexOf(i))return;d(n);var s=i,a=n.getSelectionRange(),l=r.doc.getTextRange(a);if(!(""===l||1==l.length&&o[l])&&n.getWrapBehavioursEnabled())return p(a,l,s,s);if(!l){var c=n.getCursorPosition(),u=r.doc.getLine(c.row),f=u.substring(c.column-1,c.column),m=u.substring(c.column,c.column+1),g=r.getTokenAt(c.row,c.column),v=r.getTokenAt(c.row,c.column+1);if("\\"==f&&g&&/escape/.test(g.type))return null;var b,y=g&&/string|escape/.test(g.type),w=!v||/string|escape/.test(v.type);if(m==s)(b=y!==w)&&/string\.end/.test(v.type)&&(b=!1);else{if(y&&!w)return null;if(y&&w)return null;var k=r.$mode.tokenRe;k.lastIndex=0;var x=k.test(f);k.lastIndex=0;var S=k.test(f);if(x||S)return null;if(m&&!/[\s;,.})\]\\]/.test(m))return null;var E=u[c.column-2];if(f==s&&(E==s||k.test(E)))return null;b=!0}return{text:b?s+s:"",selection:[1,1]}}}})),this.add("string_dquotes","deletion",(function(e,t,n,r,i){var o=r.$mode.$quotes||h,s=r.doc.getTextRange(i);if(!i.isMultiLine()&&o.hasOwnProperty(s)&&(d(n),r.doc.getLine(i.start.row).substring(i.start.column+1,i.start.column+2)==s))return i.end.column++,i}))};f.isSaneInsertion=function(e,t){var n=e.getCursorPosition(),r=new s(t,n.row,n.column);if(!this.$matchTokenType(r.getCurrentToken()||"text",l)){if(/[)}\]]/.test(e.session.getLine(n.row)[n.column]))return!0;var i=new s(t,n.row,n.column+1);if(!this.$matchTokenType(i.getCurrentToken()||"text",l))return!1}return r.stepForward(),r.getCurrentTokenRow()!==n.row||this.$matchTokenType(r.getCurrentToken()||"text",c)},f.$matchTokenType=function(e,t){return t.indexOf(e.type||e)>-1},f.recordAutoInsert=function(e,t,n){var i=e.getCursorPosition(),o=t.doc.getLine(i.row);this.isAutoInsertedClosing(i,o,r.autoInsertedLineEnd[0])||(r.autoInsertedBrackets=0),r.autoInsertedRow=i.row,r.autoInsertedLineEnd=n+o.substr(i.column),r.autoInsertedBrackets++},f.recordMaybeInsert=function(e,t,n){var i=e.getCursorPosition(),o=t.doc.getLine(i.row);this.isMaybeInsertedClosing(i,o)||(r.maybeInsertedBrackets=0),r.maybeInsertedRow=i.row,r.maybeInsertedLineStart=o.substr(0,i.column)+n,r.maybeInsertedLineEnd=o.substr(i.column),r.maybeInsertedBrackets++},f.isAutoInsertedClosing=function(e,t,n){return r.autoInsertedBrackets>0&&e.row===r.autoInsertedRow&&n===r.autoInsertedLineEnd[0]&&t.substr(e.column)===r.autoInsertedLineEnd},f.isMaybeInsertedClosing=function(e,t){return r.maybeInsertedBrackets>0&&e.row===r.maybeInsertedRow&&t.substr(e.column)===r.maybeInsertedLineEnd&&t.substr(0,e.column)==r.maybeInsertedLineStart},f.popAutoInsertedClosing=function(){r.autoInsertedLineEnd=r.autoInsertedLineEnd.substr(1),r.autoInsertedBrackets--},f.clearMaybeInsertedClosing=function(){r&&(r.maybeInsertedBrackets=0,r.maybeInsertedRow=-1)},i.inherits(f,o),t.CstyleBehaviour=f})),ace.define("ace/unicode",["require","exports","module"],(function(e,t,n){"use strict";for(var r=[48,9,8,25,5,0,2,25,48,0,11,0,5,0,6,22,2,30,2,457,5,11,15,4,8,0,2,0,18,116,2,1,3,3,9,0,2,2,2,0,2,19,2,82,2,138,2,4,3,155,12,37,3,0,8,38,10,44,2,0,2,1,2,1,2,0,9,26,6,2,30,10,7,61,2,9,5,101,2,7,3,9,2,18,3,0,17,58,3,100,15,53,5,0,6,45,211,57,3,18,2,5,3,11,3,9,2,1,7,6,2,2,2,7,3,1,3,21,2,6,2,0,4,3,3,8,3,1,3,3,9,0,5,1,2,4,3,11,16,2,2,5,5,1,3,21,2,6,2,1,2,1,2,1,3,0,2,4,5,1,3,2,4,0,8,3,2,0,8,15,12,2,2,8,2,2,2,21,2,6,2,1,2,4,3,9,2,2,2,2,3,0,16,3,3,9,18,2,2,7,3,1,3,21,2,6,2,1,2,4,3,8,3,1,3,2,9,1,5,1,2,4,3,9,2,0,17,1,2,5,4,2,2,3,4,1,2,0,2,1,4,1,4,2,4,11,5,4,4,2,2,3,3,0,7,0,15,9,18,2,2,7,2,2,2,22,2,9,2,4,4,7,2,2,2,3,8,1,2,1,7,3,3,9,19,1,2,7,2,2,2,22,2,9,2,4,3,8,2,2,2,3,8,1,8,0,2,3,3,9,19,1,2,7,2,2,2,22,2,15,4,7,2,2,2,3,10,0,9,3,3,9,11,5,3,1,2,17,4,23,2,8,2,0,3,6,4,0,5,5,2,0,2,7,19,1,14,57,6,14,2,9,40,1,2,0,3,1,2,0,3,0,7,3,2,6,2,2,2,0,2,0,3,1,2,12,2,2,3,4,2,0,2,5,3,9,3,1,35,0,24,1,7,9,12,0,2,0,2,0,5,9,2,35,5,19,2,5,5,7,2,35,10,0,58,73,7,77,3,37,11,42,2,0,4,328,2,3,3,6,2,0,2,3,3,40,2,3,3,32,2,3,3,6,2,0,2,3,3,14,2,56,2,3,3,66,5,0,33,15,17,84,13,619,3,16,2,25,6,74,22,12,2,6,12,20,12,19,13,12,2,2,2,1,13,51,3,29,4,0,5,1,3,9,34,2,3,9,7,87,9,42,6,69,11,28,4,11,5,11,11,39,3,4,12,43,5,25,7,10,38,27,5,62,2,28,3,10,7,9,14,0,89,75,5,9,18,8,13,42,4,11,71,55,9,9,4,48,83,2,2,30,14,230,23,280,3,5,3,37,3,5,3,7,2,0,2,0,2,0,2,30,3,52,2,6,2,0,4,2,2,6,4,3,3,5,5,12,6,2,2,6,67,1,20,0,29,0,14,0,17,4,60,12,5,0,4,11,18,0,5,0,3,9,2,0,4,4,7,0,2,0,2,0,2,3,2,10,3,3,6,4,5,0,53,1,2684,46,2,46,2,132,7,6,15,37,11,53,10,0,17,22,10,6,2,6,2,6,2,6,2,6,2,6,2,6,2,6,2,31,48,0,470,1,36,5,2,4,6,1,5,85,3,1,3,2,2,89,2,3,6,40,4,93,18,23,57,15,513,6581,75,20939,53,1164,68,45,3,268,4,27,21,31,3,13,13,1,2,24,9,69,11,1,38,8,3,102,3,1,111,44,25,51,13,68,12,9,7,23,4,0,5,45,3,35,13,28,4,64,15,10,39,54,10,13,3,9,7,22,4,1,5,66,25,2,227,42,2,1,3,9,7,11171,13,22,5,48,8453,301,3,61,3,105,39,6,13,4,6,11,2,12,2,4,2,0,2,1,2,1,2,107,34,362,19,63,3,53,41,11,5,15,17,6,13,1,25,2,33,4,2,134,20,9,8,25,5,0,2,25,12,88,4,5,3,5,3,5,3,2],i=0,o=[],s=0;s<r.length;s+=2)o.push(i+=r[s]),r[s+1]&&o.push(45,i+=r[s+1]);t.wordChars=String.fromCharCode.apply(null,o)})),ace.define("ace/mode/text",["require","exports","module","ace/config","ace/tokenizer","ace/mode/text_highlight_rules","ace/mode/behaviour/cstyle","ace/unicode","ace/lib/lang","ace/token_iterator","ace/range"],(function(e,t,n){"use strict";var i=e("../config"),o=e("../tokenizer").Tokenizer,s=e("./text_highlight_rules").TextHighlightRules,a=e("./behaviour/cstyle").CstyleBehaviour,l=e("../unicode"),c=e("../lib/lang"),u=e("../token_iterator").TokenIterator,h=e("../range").Range,d=function(){this.HighlightRules=s};(function(){this.$defaultBehaviour=new a,this.tokenRe=new RegExp("^["+l.wordChars+"\\$_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+l.wordChars+"\\$_]|\\s])+","g"),this.getTokenizer=function(){return this.$tokenizer||(this.$highlightRules=this.$highlightRules||new this.HighlightRules(this.$highlightRuleConfig),this.$tokenizer=new o(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="",this.toggleCommentLines=function(e,t,n,r){var i=t.doc,o=!0,s=!0,a=1/0,l=t.getTabSize(),u=!1;if(this.lineCommentStart){if(Array.isArray(this.lineCommentStart))m=this.lineCommentStart.map(c.escapeRegExp).join("|"),p=this.lineCommentStart[0];else m=c.escapeRegExp(this.lineCommentStart),p=this.lineCommentStart;m=new RegExp("^(\\s*)(?:"+m+") ?"),u=t.getUseSoftTabs();b=function(e,t){var n=e.match(m);if(n){var r=n[1].length,o=n[0].length;d(e,r,o)||" "!=n[0][o-1]||o--,i.removeInLine(t,r,o)}};var h=p+" ",d=(v=function(e,t){o&&!/\S/.test(e)||(d(e,a,a)?i.insertInLine({row:t,column:a},h):i.insertInLine({row:t,column:a},p))},y=function(e,t){return m.test(e)},function(e,t,n){for(var r=0;t--&&" "==e.charAt(t);)r++;if(r%l!=0)return!1;for(r=0;" "==e.charAt(n++);)r++;return l>2?r%l!=l-1:r%l==0})}else{if(!this.blockComment)return!1;var p=this.blockComment.start,f=this.blockComment.end,m=new RegExp("^(\\s*)(?:"+c.escapeRegExp(p)+")"),g=new RegExp("(?:"+c.escapeRegExp(f)+")\\s*$"),v=function(e,t){y(e,t)||o&&!/\S/.test(e)||(i.insertInLine({row:t,column:e.length},f),i.insertInLine({row:t,column:a},p))},b=function(e,t){var n;(n=e.match(g))&&i.removeInLine(t,e.length-n[0].length,e.length),(n=e.match(m))&&i.removeInLine(t,n[1].length,n[0].length)},y=function(e,n){if(m.test(e))return!0;for(var r=t.getTokens(n),i=0;i<r.length;i++)if("comment"===r[i].type)return!0}}function w(e){for(var t=n;t<=r;t++)e(i.getLine(t),t)}var k=1/0;w((function(e,t){var n=e.search(/\S/);-1!==n?(n<a&&(a=n),s&&!y(e,t)&&(s=!1)):k>e.length&&(k=e.length)})),a==1/0&&(a=k,o=!1,s=!1),u&&a%l!=0&&(a=Math.floor(a/l)*l),w(s?b:v)},this.toggleBlockComment=function(e,t,n,r){var i=this.blockComment;if(i){!i.start&&i[0]&&(i=i[0]);var o,s,a=(m=new u(t,r.row,r.column)).getCurrentToken(),l=(t.selection,t.selection.toOrientedRange());if(a&&/comment/.test(a.type)){for(var c,d;a&&/comment/.test(a.type);){if(-1!=(g=a.value.indexOf(i.start))){var p=m.getCurrentTokenRow(),f=m.getCurrentTokenColumn()+g;c=new h(p,f,p,f+i.start.length);break}a=m.stepBackward()}var m;for(a=(m=new u(t,r.row,r.column)).getCurrentToken();a&&/comment/.test(a.type);){var g;if(-1!=(g=a.value.indexOf(i.end))){p=m.getCurrentTokenRow(),f=m.getCurrentTokenColumn()+g;d=new h(p,f,p,f+i.end.length);break}a=m.stepForward()}d&&t.remove(d),c&&(t.remove(c),o=c.start.row,s=-i.start.length)}else s=i.start.length,o=n.start.row,t.insert(n.end,i.end),t.insert(n.start,i.start);l.start.row==o&&(l.start.column+=s),l.end.row==o&&(l.end.column+=s),t.selection.fromOrientedRange(l)}},this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.checkOutdent=function(e,t,n){return!1},this.autoOutdent=function(e,t,n){},this.$getIndent=function(e){return e.match(/^\s*/)[0]},this.createWorker=function(e){return null},this.createModeDelegates=function(e){for(var t in this.$embeds=[],this.$modes={},e)if(e[t]){var n=e[t],r=n.prototype.$id,o=i.$modes[r];o||(i.$modes[r]=o=new n),i.$modes[t]||(i.$modes[t]=o),this.$embeds.push(t),this.$modes[t]=o}var s=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"];for(t=0;t<s.length;t++)!function(e){var n=s[t],r=e[n];e[s[t]]=function(){return this.$delegator(n,arguments,r)}}(this)},this.$delegator=function(e,t,n){var r=t[0]||"start";if("string"!=typeof r){if(Array.isArray(r[2])){var i=r[2][r[2].length-1];if(s=this.$modes[i])return s[e].apply(s,[r[1]].concat([].slice.call(t,1)))}r=r[0]||"start"}for(var o=0;o<this.$embeds.length;o++)if(this.$modes[this.$embeds[o]]){var s,a=r.split(this.$embeds[o]);if(!a[0]&&a[1])return t[0]=a[1],(s=this.$modes[this.$embeds[o]])[e].apply(s,t)}var l=n.apply(this,t);return n?l:void 0},this.transformAction=function(e,t,n,r,i){if(this.$behaviour){var o=this.$behaviour.getBehaviours();for(var s in o)if(o[s][t]){var a=o[s][t].apply(this,arguments);if(a)return a}}},this.getKeywords=function(e){if(!this.completionKeywords){var t=this.$tokenizer.rules,n=[];for(var i in t)for(var o=t[i],s=0,a=o.length;s<a;s++)if("string"==typeof o[s].token)/keyword|support|storage/.test(o[s].token)&&n.push(o[s].regex);else if("object"===r(o[s].token))for(var l=0,c=o[s].token.length;l<c;l++)if(/keyword|support|storage/.test(o[s].token[l])){i=o[s].regex.match(/\(.+?\)/g)[l];n.push(i.substr(1,i.length-2))}this.completionKeywords=n}return e?n.concat(this.$keywordList||[]):this.$keywordList},this.$createKeywordList=function(){return this.$highlightRules||this.getTokenizer(),this.$keywordList=this.$highlightRules.$keywordList||[]},this.getCompletions=function(e,t,n,r){return(this.$keywordList||this.$createKeywordList()).map((function(e){return{name:e,value:e,score:0,meta:"keyword"}}))},this.$id="ace/mode/text"}).call(d.prototype),t.Mode=d})),ace.define("ace/apply_delta",["require","exports","module"],(function(e,t,n){"use strict";t.applyDelta=function(e,t,n){var r=t.start.row,i=t.start.column,o=e[r]||"";switch(t.action){case"insert":if(1===t.lines.length)e[r]=o.substring(0,i)+t.lines[0]+o.substring(i);else{var s=[r,1].concat(t.lines);e.splice.apply(e,s),e[r]=o.substring(0,i)+e[r],e[r+t.lines.length-1]+=o.substring(i)}break;case"remove":var a=t.end.column,l=t.end.row;r===l?e[r]=o.substring(0,i)+o.substring(a):e.splice(r,l-r+1,o.substring(0,i)+e[l].substring(a))}}})),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],(function(e,t,n){"use strict";var r=e("./lib/oop"),i=e("./lib/event_emitter").EventEmitter,o=t.Anchor=function(e,t,n){this.$onChange=this.onChange.bind(this),this.attach(e),void 0===n?this.setPosition(t.row,t.column):this.setPosition(t,n)};(function(){function e(e,t,n){var r=n?e.column<=t.column:e.column<t.column;return e.row<t.row||e.row==t.row&&r}r.implement(this,i),this.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},this.getDocument=function(){return this.document},this.$insertRight=!1,this.onChange=function(t){if(!(t.start.row==t.end.row&&t.start.row!=this.row||t.start.row>this.row)){var n=function(t,n,r){var i="insert"==t.action,o=(i?1:-1)*(t.end.row-t.start.row),s=(i?1:-1)*(t.end.column-t.start.column),a=t.start,l=i?a:t.end;if(e(n,a,r))return{row:n.row,column:n.column};if(e(l,n,!r))return{row:n.row+o,column:n.column+(n.row==l.row?s:0)};return{row:a.row,column:a.column}}(t,{row:this.row,column:this.column},this.$insertRight);this.setPosition(n.row,n.column,!0)}},this.setPosition=function(e,t,n){var r;if(r=n?{row:e,column:t}:this.$clipPositionToDocument(e,t),this.row!=r.row||this.column!=r.column){var i={row:this.row,column:this.column};this.row=r.row,this.column=r.column,this._signal("change",{old:i,value:r})}},this.detach=function(){this.document.off("change",this.$onChange)},this.attach=function(e){this.document=e||this.document,this.document.on("change",this.$onChange)},this.$clipPositionToDocument=function(e,t){var n={};return e>=this.document.getLength()?(n.row=Math.max(0,this.document.getLength()-1),n.column=this.document.getLine(n.row).length):e<0?(n.row=0,n.column=0):(n.row=e,n.column=Math.min(this.document.getLine(n.row).length,Math.max(0,t))),t<0&&(n.column=0),n}}).call(o.prototype)})),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],(function(e,t,n){"use strict";var r=e("./lib/oop"),i=e("./apply_delta").applyDelta,o=e("./lib/event_emitter").EventEmitter,s=e("./range").Range,a=e("./anchor").Anchor,l=function(e){this.$lines=[""],0===e.length?this.$lines=[""]:Array.isArray(e)?this.insertMergedLines({row:0,column:0},e):this.insert({row:0,column:0},e)};(function(){r.implement(this,o),this.setValue=function(e){var t=this.getLength()-1;this.remove(new s(0,0,t,this.getLine(t).length)),this.insert({row:0,column:0},e)},this.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},this.createAnchor=function(e,t){return new a(this,e,t)},0==="aaa".split(/a/).length?this.$split=function(e){return e.replace(/\r\n|\r/g,"\n").split("\n")}:this.$split=function(e){return e.split(/\r\n|\r|\n/)},this.$detectNewLine=function(e){var t=e.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=t?t[1]:"\n",this._signal("changeNewLineMode")},this.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return"\r\n";case"unix":return"\n";default:return this.$autoNewLine||"\n"}},this.$autoNewLine="",this.$newLineMode="auto",this.setNewLineMode=function(e){this.$newLineMode!==e&&(this.$newLineMode=e,this._signal("changeNewLineMode"))},this.getNewLineMode=function(){return this.$newLineMode},this.isNewLine=function(e){return"\r\n"==e||"\r"==e||"\n"==e},this.getLine=function(e){return this.$lines[e]||""},this.getLines=function(e,t){return this.$lines.slice(e,t+1)},this.getAllLines=function(){return this.getLines(0,this.getLength())},this.getLength=function(){return this.$lines.length},this.getTextRange=function(e){return this.getLinesForRange(e).join(this.getNewLineCharacter())},this.getLinesForRange=function(e){var t;if(e.start.row===e.end.row)t=[this.getLine(e.start.row).substring(e.start.column,e.end.column)];else{(t=this.getLines(e.start.row,e.end.row))[0]=(t[0]||"").substring(e.start.column);var n=t.length-1;e.end.row-e.start.row==n&&(t[n]=t[n].substring(0,e.end.column))}return t},this.insertLines=function(e,t){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(e,t)},this.removeLines=function(e,t){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(e,t)},this.insertNewLine=function(e){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(e,["",""])},this.insert=function(e,t){return this.getLength()<=1&&this.$detectNewLine(t),this.insertMergedLines(e,this.$split(t))},this.insertInLine=function(e,t){var n=this.clippedPos(e.row,e.column),r=this.pos(e.row,e.column+t.length);return this.applyDelta({start:n,end:r,action:"insert",lines:[t]},!0),this.clonePos(r)},this.clippedPos=function(e,t){var n=this.getLength();void 0===e?e=n:e<0?e=0:e>=n&&(e=n-1,t=void 0);var r=this.getLine(e);return null==t&&(t=r.length),{row:e,column:t=Math.min(Math.max(t,0),r.length)}},this.clonePos=function(e){return{row:e.row,column:e.column}},this.pos=function(e,t){return{row:e,column:t}},this.$clipPosition=function(e){var t=this.getLength();return e.row>=t?(e.row=Math.max(0,t-1),e.column=this.getLine(t-1).length):(e.row=Math.max(0,e.row),e.column=Math.min(Math.max(e.column,0),this.getLine(e.row).length)),e},this.insertFullLines=function(e,t){var n=0;(e=Math.min(Math.max(e,0),this.getLength()))<this.getLength()?(t=t.concat([""]),n=0):(t=[""].concat(t),e--,n=this.$lines[e].length),this.insertMergedLines({row:e,column:n},t)},this.insertMergedLines=function(e,t){var n=this.clippedPos(e.row,e.column),r={row:n.row+t.length-1,column:(1==t.length?n.column:0)+t[t.length-1].length};return this.applyDelta({start:n,end:r,action:"insert",lines:t}),this.clonePos(r)},this.remove=function(e){var t=this.clippedPos(e.start.row,e.start.column),n=this.clippedPos(e.end.row,e.end.column);return this.applyDelta({start:t,end:n,action:"remove",lines:this.getLinesForRange({start:t,end:n})}),this.clonePos(t)},this.removeInLine=function(e,t,n){var r=this.clippedPos(e,t),i=this.clippedPos(e,n);return this.applyDelta({start:r,end:i,action:"remove",lines:this.getLinesForRange({start:r,end:i})},!0),this.clonePos(r)},this.removeFullLines=function(e,t){e=Math.min(Math.max(0,e),this.getLength()-1);var n=(t=Math.min(Math.max(0,t),this.getLength()-1))==this.getLength()-1&&e>0,r=t<this.getLength()-1,i=n?e-1:e,o=n?this.getLine(i).length:0,a=r?t+1:t,l=r?0:this.getLine(a).length,c=new s(i,o,a,l),u=this.$lines.slice(e,t+1);return this.applyDelta({start:c.start,end:c.end,action:"remove",lines:this.getLinesForRange(c)}),u},this.removeNewLine=function(e){e<this.getLength()-1&&e>=0&&this.applyDelta({start:this.pos(e,this.getLine(e).length),end:this.pos(e+1,0),action:"remove",lines:["",""]})},this.replace=function(e,t){return e instanceof s||(e=s.fromPoints(e.start,e.end)),0===t.length&&e.isEmpty()?e.start:t==this.getTextRange(e)?e.end:(this.remove(e),t?this.insert(e.start,t):e.start)},this.applyDeltas=function(e){for(var t=0;t<e.length;t++)this.applyDelta(e[t])},this.revertDeltas=function(e){for(var t=e.length-1;t>=0;t--)this.revertDelta(e[t])},this.applyDelta=function(e,t){var n="insert"==e.action;(n?e.lines.length<=1&&!e.lines[0]:!s.comparePoints(e.start,e.end))||(n&&e.lines.length>2e4?this.$splitAndapplyLargeDelta(e,2e4):(i(this.$lines,e,t),this._signal("change",e)))},this.$safeApplyDelta=function(e){var t=this.$lines.length;("remove"==e.action&&e.start.row<t&&e.end.row<t||"insert"==e.action&&e.start.row<=t)&&this.applyDelta(e)},this.$splitAndapplyLargeDelta=function(e,t){for(var n=e.lines,r=n.length-t+1,i=e.start.row,o=e.start.column,s=0,a=0;s<r;s=a){a+=t-1;var l=n.slice(s,a);l.push(""),this.applyDelta({start:this.pos(i+s,o),end:this.pos(i+a,o=0),action:e.action,lines:l},!0)}e.lines=n.slice(s),e.start.row=i+s,e.start.column=o,this.applyDelta(e,!0)},this.revertDelta=function(e){this.$safeApplyDelta({start:this.clonePos(e.start),end:this.clonePos(e.end),action:"insert"==e.action?"remove":"insert",lines:e.lines.slice()})},this.indexToPosition=function(e,t){for(var n=this.$lines||this.getAllLines(),r=this.getNewLineCharacter().length,i=t||0,o=n.length;i<o;i++)if((e-=n[i].length+r)<0)return{row:i,column:e+n[i].length+r};return{row:o-1,column:e+n[o-1].length+r}},this.positionToIndex=function(e,t){for(var n=this.$lines||this.getAllLines(),r=this.getNewLineCharacter().length,i=0,o=Math.min(e.row,n.length),s=t||0;s<o;++s)i+=n[s].length+r;return i+e.column}}).call(l.prototype),t.Document=l})),ace.define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],(function(e,t,n){"use strict";var r=e("./lib/oop"),i=e("./lib/event_emitter").EventEmitter,o=function(e,t){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.tokenizer=e;var n=this;this.$worker=function(){if(n.running){for(var e=new Date,t=n.currentLine,r=-1,i=n.doc,o=t;n.lines[t];)t++;var s=i.getLength(),a=0;for(n.running=!1;t<s;){n.$tokenizeRow(t),r=t;do{t++}while(n.lines[t]);if(++a%5==0&&new Date-e>20){n.running=setTimeout(n.$worker,20);break}}n.currentLine=t,-1==r&&(r=t),o<=r&&n.fireUpdateEvent(o,r)}}};(function(){r.implement(this,i),this.setTokenizer=function(e){this.tokenizer=e,this.lines=[],this.states=[],this.start(0)},this.setDocument=function(e){this.doc=e,this.lines=[],this.states=[],this.stop()},this.fireUpdateEvent=function(e,t){var n={first:e,last:t};this._signal("update",{data:n})},this.start=function(e){this.currentLine=Math.min(e||0,this.currentLine,this.doc.getLength()),this.lines.splice(this.currentLine,this.lines.length),this.states.splice(this.currentLine,this.states.length),this.stop(),this.running=setTimeout(this.$worker,700)},this.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},this.$updateOnChange=function(e){var t=e.start.row,n=e.end.row-t;if(0===n)this.lines[t]=null;else if("remove"==e.action)this.lines.splice(t,n+1,null),this.states.splice(t,n+1,null);else{var r=Array(n+1);r.unshift(t,1),this.lines.splice.apply(this.lines,r),this.states.splice.apply(this.states,r)}this.currentLine=Math.min(t,this.currentLine,this.doc.getLength()),this.stop()},this.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},this.getTokens=function(e){return this.lines[e]||this.$tokenizeRow(e)},this.getState=function(e){return this.currentLine==e&&this.$tokenizeRow(e),this.states[e]||"start"},this.$tokenizeRow=function(e){var t=this.doc.getLine(e),n=this.states[e-1],r=this.tokenizer.getLineTokens(t,n,e);return this.states[e]+""!=r.state+""?(this.states[e]=r.state,this.lines[e+1]=null,this.currentLine>e+1&&(this.currentLine=e+1)):this.currentLine==e&&(this.currentLine=e+1),this.lines[e]=r.tokens}}).call(o.prototype),t.BackgroundTokenizer=o})),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],(function(e,t,n){"use strict";var r=e("./lib/lang"),i=(e("./lib/oop"),e("./range").Range),o=function(e,t,n){this.setRegexp(e),this.clazz=t,this.type=n||"text"};(function(){this.MAX_RANGES=500,this.setRegexp=function(e){this.regExp+""!=e+""&&(this.regExp=e,this.cache=[])},this.update=function(e,t,n,o){if(this.regExp)for(var s=o.firstRow,a=o.lastRow,l=s;l<=a;l++){var c=this.cache[l];null==c&&((c=r.getMatchOffsets(n.getLine(l),this.regExp)).length>this.MAX_RANGES&&(c=c.slice(0,this.MAX_RANGES)),c=c.map((function(e){return new i(l,e.offset,l,e.offset+e.length)})),this.cache[l]=c.length?c:"");for(var u=c.length;u--;)t.drawSingleLineMarker(e,c[u].toScreenRange(n),this.clazz,o)}}}).call(o.prototype),t.SearchHighlight=o})),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],(function(e,t,n){"use strict";var r=e("../range").Range;function i(e,t){this.foldData=e,Array.isArray(t)?this.folds=t:t=this.folds=[t];var n=t[t.length-1];this.range=new r(t[0].start.row,t[0].start.column,n.end.row,n.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach((function(e){e.setFoldLine(this)}),this)}(function(){this.shiftRow=function(e){this.start.row+=e,this.end.row+=e,this.folds.forEach((function(t){t.start.row+=e,t.end.row+=e}))},this.addFold=function(e){if(e.sameRow){if(e.start.row<this.startRow||e.endRow>this.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(e),this.folds.sort((function(e,t){return-e.range.compareEnd(t.start.row,t.start.column)})),this.range.compareEnd(e.start.row,e.start.column)>0?(this.end.row=e.end.row,this.end.column=e.end.column):this.range.compareStart(e.end.row,e.end.column)<0&&(this.start.row=e.start.row,this.start.column=e.start.column)}else if(e.start.row==this.end.row)this.folds.push(e),this.end.row=e.end.row,this.end.column=e.end.column;else{if(e.end.row!=this.start.row)throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");this.folds.unshift(e),this.start.row=e.start.row,this.start.column=e.start.column}e.foldLine=this},this.containsRow=function(e){return e>=this.start.row&&e<=this.end.row},this.walk=function(e,t,n){var r,i,o=0,s=this.folds,a=!0;null==t&&(t=this.end.row,n=this.end.column);for(var l=0;l<s.length;l++){if(-1==(i=(r=s[l]).range.compareStart(t,n)))return void e(null,t,n,o,a);if(!e(null,r.start.row,r.start.column,o,a)&&e(r.placeholder,r.start.row,r.start.column,o)||0===i)return;a=!r.sameRow,o=r.end.column}e(null,t,n,o,a)},this.getNextFoldTo=function(e,t){for(var n,r,i=0;i<this.folds.length;i++){if(-1==(r=(n=this.folds[i]).range.compareEnd(e,t)))return{fold:n,kind:"after"};if(0===r)return{fold:n,kind:"inside"}}return null},this.addRemoveChars=function(e,t,n){var r,i,o=this.getNextFoldTo(e,t);if(o)if(r=o.fold,"inside"==o.kind&&r.start.column!=t&&r.start.row!=e)window.console&&window.console.log(e,t,r);else if(r.start.row==e){var s=(i=this.folds).indexOf(r);for(0===s&&(this.start.column+=n);s<i.length;s++){if((r=i[s]).start.column+=n,!r.sameRow)return;r.end.column+=n}this.end.column+=n}},this.split=function(e,t){var n=this.getNextFoldTo(e,t);if(!n||"inside"==n.kind)return null;var r=n.fold,o=this.folds,s=this.foldData,a=o.indexOf(r),l=o[a-1];this.end.row=l.end.row,this.end.column=l.end.column;var c=new i(s,o=o.splice(a,o.length-a));return s.splice(s.indexOf(this)+1,0,c),c},this.merge=function(e){for(var t=e.folds,n=0;n<t.length;n++)this.addFold(t[n]);var r=this.foldData;r.splice(r.indexOf(e),1)},this.toString=function(){var e=[this.range.toString()+": ["];return this.folds.forEach((function(t){e.push(" "+t.toString())})),e.push("]"),e.join("\n")},this.idxToPosition=function(e){for(var t=0,n=0;n<this.folds.length;n++){var r=this.folds[n];if((e-=r.start.column-t)<0)return{row:r.start.row,column:r.start.column+e};if((e-=r.placeholder.length)<0)return r.start;t=r.end.column}return{row:this.end.row,column:this.end.column+e}}}).call(i.prototype),t.FoldLine=i})),ace.define("ace/range_list",["require","exports","module","ace/range"],(function(e,t,n){"use strict";var r=e("./range").Range.comparePoints,i=function(){this.ranges=[],this.$bias=1};(function(){this.comparePoints=r,this.pointIndex=function(e,t,n){for(var i=this.ranges,o=n||0;o<i.length;o++){var s=i[o],a=r(e,s.end);if(!(a>0)){var l=r(e,s.start);return 0===a?t&&0!==l?-o-2:o:l>0||0===l&&!t?o:-o-1}}return-o-1},this.add=function(e){var t=!e.isEmpty(),n=this.pointIndex(e.start,t);n<0&&(n=-n-1);var r=this.pointIndex(e.end,t,n);return r<0?r=-r-1:r++,this.ranges.splice(n,r-n,e)},this.addList=function(e){for(var t=[],n=e.length;n--;)t.push.apply(t,this.add(e[n]));return t},this.substractPoint=function(e){var t=this.pointIndex(e);if(t>=0)return this.ranges.splice(t,1)},this.merge=function(){for(var e,t=[],n=this.ranges,i=(n=n.sort((function(e,t){return r(e.start,t.start)})))[0],o=1;o<n.length;o++){e=i,i=n[o];var s=r(e.end,i.start);s<0||(0!=s||e.isEmpty()||i.isEmpty())&&(r(e.end,i.end)<0&&(e.end.row=i.end.row,e.end.column=i.end.column),n.splice(o,1),t.push(i),i=e,o--)}return this.ranges=n,t},this.contains=function(e,t){return this.pointIndex({row:e,column:t})>=0},this.containsPoint=function(e){return this.pointIndex(e)>=0},this.rangeAtPoint=function(e){var t=this.pointIndex(e);if(t>=0)return this.ranges[t]},this.clipRows=function(e,t){var n=this.ranges;if(n[0].start.row>t||n[n.length-1].start.row<e)return[];var r=this.pointIndex({row:e,column:0});r<0&&(r=-r-1);var i=this.pointIndex({row:t,column:0},r);i<0&&(i=-i-1);for(var o=[],s=r;s<i;s++)o.push(n[s]);return o},this.removeAll=function(){return this.ranges.splice(0,this.ranges.length)},this.attach=function(e){this.session&&this.detach(),this.session=e,this.onChange=this.$onChange.bind(this),this.session.on("change",this.onChange)},this.detach=function(){this.session&&(this.session.removeListener("change",this.onChange),this.session=null)},this.$onChange=function(e){for(var t=e.start,n=e.end,r=t.row,i=n.row,o=this.ranges,s=0,a=o.length;s<a;s++){if((u=o[s]).end.row>=r)break}if("insert"==e.action)for(var l=i-r,c=-t.column+n.column;s<a;s++){if((u=o[s]).start.row>r)break;if(u.start.row==r&&u.start.column>=t.column&&(u.start.column==t.column&&this.$bias<=0||(u.start.column+=c,u.start.row+=l)),u.end.row==r&&u.end.column>=t.column){if(u.end.column==t.column&&this.$bias<0)continue;u.end.column==t.column&&c>0&&s<a-1&&u.end.column>u.start.column&&u.end.column==o[s+1].start.column&&(u.end.column-=c),u.end.column+=c,u.end.row+=l}}else for(l=r-i,c=t.column-n.column;s<a;s++){if((u=o[s]).start.row>i)break;u.end.row<i&&(r<u.end.row||r==u.end.row&&t.column<u.end.column)?(u.end.row=r,u.end.column=t.column):u.end.row==i?u.end.column<=n.column?(l||u.end.column>t.column)&&(u.end.column=t.column,u.end.row=t.row):(u.end.column+=c,u.end.row+=l):u.end.row>i&&(u.end.row+=l),u.start.row<i&&(r<u.start.row||r==u.start.row&&t.column<u.start.column)?(u.start.row=r,u.start.column=t.column):u.start.row==i?u.start.column<=n.column?(l||u.start.column>t.column)&&(u.start.column=t.column,u.start.row=t.row):(u.start.column+=c,u.start.row+=l):u.start.row>i&&(u.start.row+=l)}if(0!=l&&s<a)for(;s<a;s++){var u;(u=o[s]).start.row+=l,u.end.row+=l}}}).call(i.prototype),t.RangeList=i})),ace.define("ace/edit_session/fold",["require","exports","module","ace/range_list","ace/lib/oop"],(function(e,t,n){"use strict";var r=e("../range_list").RangeList,i=e("../lib/oop"),o=t.Fold=function(e,t){this.foldLine=null,this.placeholder=t,this.range=e,this.start=e.start,this.end=e.end,this.sameRow=e.start.row==e.end.row,this.subFolds=this.ranges=[]};function s(e,t){e.row-=t.row,0==e.row&&(e.column-=t.column)}function a(e,t){0==e.row&&(e.column+=t.column),e.row+=t.row}i.inherits(o,r),function(){this.toString=function(){return'"'+this.placeholder+'" '+this.range.toString()},this.setFoldLine=function(e){this.foldLine=e,this.subFolds.forEach((function(t){t.setFoldLine(e)}))},this.clone=function(){var e=this.range.clone(),t=new o(e,this.placeholder);return this.subFolds.forEach((function(e){t.subFolds.push(e.clone())})),t.collapseChildren=this.collapseChildren,t},this.addSubFold=function(e){if(!this.range.isEqual(e)){var t,n;t=e,n=this.start,s(t.start,n),s(t.end,n);for(var r=e.start.row,i=e.start.column,o=0,a=-1;o<this.subFolds.length&&1==(a=this.subFolds[o].range.compare(r,i));o++);var l=this.subFolds[o],c=0;if(0==a){if(l.range.containsRange(e))return l.addSubFold(e);c=1}r=e.range.end.row,i=e.range.end.column;var u=o;for(a=-1;u<this.subFolds.length&&1==(a=this.subFolds[u].range.compare(r,i));u++);0==a&&u++;for(var h=this.subFolds.splice(o,u-o,e),d=0==a?h.length-1:h.length,p=c;p<d;p++)e.addSubFold(h[p]);return e.setFoldLine(this.foldLine),e}},this.restoreRange=function(e){return function(e,t){a(e.start,t),a(e.end,t)}(e,this.start)}}.call(o.prototype)})),ace.define("ace/edit_session/folding",["require","exports","module","ace/range","ace/edit_session/fold_line","ace/edit_session/fold","ace/token_iterator"],(function(e,t,n){"use strict";var r=e("../range").Range,i=e("./fold_line").FoldLine,o=e("./fold").Fold,s=e("../token_iterator").TokenIterator;t.Folding=function(){this.getFoldAt=function(e,t,n){var r=this.getFoldLine(e);if(!r)return null;for(var i=r.folds,o=0;o<i.length;o++){var s=i[o].range;if(s.contains(e,t)){if(1==n&&s.isEnd(e,t)&&!s.isEmpty())continue;if(-1==n&&s.isStart(e,t)&&!s.isEmpty())continue;return i[o]}}},this.getFoldsInRange=function(e){var t=e.start,n=e.end,r=this.$foldData,i=[];t.column+=1,n.column-=1;for(var o=0;o<r.length;o++){var s=r[o].range.compareRange(e);if(2!=s){if(-2==s)break;for(var a=r[o].folds,l=0;l<a.length;l++){var c=a[l];if(-2==(s=c.range.compareRange(e)))break;if(2!=s){if(42==s)break;i.push(c)}}}}return t.column-=1,n.column+=1,i},this.getFoldsInRangeList=function(e){if(Array.isArray(e)){var t=[];e.forEach((function(e){t=t.concat(this.getFoldsInRange(e))}),this)}else t=this.getFoldsInRange(e);return t},this.getAllFolds=function(){for(var e=[],t=this.$foldData,n=0;n<t.length;n++)for(var r=0;r<t[n].folds.length;r++)e.push(t[n].folds[r]);return e},this.getFoldStringAt=function(e,t,n,r){if(!(r=r||this.getFoldLine(e)))return null;for(var i,o,s={end:{column:0}},a=0;a<r.folds.length;a++){var l=(o=r.folds[a]).range.compareEnd(e,t);if(-1==l){i=this.getLine(o.start.row).substring(s.end.column,o.start.column);break}if(0===l)return null;s=o}return i||(i=this.getLine(o.start.row).substring(s.end.column)),-1==n?i.substring(0,t-s.end.column):1==n?i.substring(t-s.end.column):i},this.getFoldLine=function(e,t){var n=this.$foldData,r=0;for(t&&(r=n.indexOf(t)),-1==r&&(r=0);r<n.length;r++){var i=n[r];if(i.start.row<=e&&i.end.row>=e)return i;if(i.end.row>e)return null}return null},this.getNextFoldLine=function(e,t){var n=this.$foldData,r=0;for(t&&(r=n.indexOf(t)),-1==r&&(r=0);r<n.length;r++){var i=n[r];if(i.end.row>=e)return i}return null},this.getFoldedRowCount=function(e,t){for(var n=this.$foldData,r=t-e+1,i=0;i<n.length;i++){var o=n[i],s=o.end.row,a=o.start.row;if(s>=t){a<t&&(a>=e?r-=t-a:r=0);break}s>=e&&(r-=a>=e?s-a:s-e+1)}return r},this.$addFoldLine=function(e){return this.$foldData.push(e),this.$foldData.sort((function(e,t){return e.start.row-t.start.row})),e},this.addFold=function(e,t){var n,r=this.$foldData,s=!1;e instanceof o?n=e:(n=new o(t,e)).collapseChildren=t.collapseChildren,this.$clipRangeToDocument(n.range);var a=n.start.row,l=n.start.column,c=n.end.row,u=n.end.column,h=this.getFoldAt(a,l,1),d=this.getFoldAt(c,u,-1);if(h&&d==h)return h.addSubFold(n);h&&!h.range.isStart(a,l)&&this.removeFold(h),d&&!d.range.isEnd(c,u)&&this.removeFold(d);var p=this.getFoldsInRange(n.range);p.length>0&&(this.removeFolds(p),p.forEach((function(e){n.addSubFold(e)})));for(var f=0;f<r.length;f++){var m=r[f];if(c==m.start.row){m.addFold(n),s=!0;break}if(a==m.end.row){if(m.addFold(n),s=!0,!n.sameRow){var g=r[f+1];if(g&&g.start.row==c){m.merge(g);break}}break}if(c<=m.start.row)break}return s||(m=this.$addFoldLine(new i(this.$foldData,n))),this.$useWrapMode?this.$updateWrapData(m.start.row,m.start.row):this.$updateRowLengthCache(m.start.row,m.start.row),this.$modified=!0,this._signal("changeFold",{data:n,action:"add"}),n},this.addFolds=function(e){e.forEach((function(e){this.addFold(e)}),this)},this.removeFold=function(e){var t=e.foldLine,n=t.start.row,r=t.end.row,i=this.$foldData,o=t.folds;if(1==o.length)i.splice(i.indexOf(t),1);else if(t.range.isEnd(e.end.row,e.end.column))o.pop(),t.end.row=o[o.length-1].end.row,t.end.column=o[o.length-1].end.column;else if(t.range.isStart(e.start.row,e.start.column))o.shift(),t.start.row=o[0].start.row,t.start.column=o[0].start.column;else if(e.sameRow)o.splice(o.indexOf(e),1);else{var s=t.split(e.start.row,e.start.column);(o=s.folds).shift(),s.start.row=o[0].start.row,s.start.column=o[0].start.column}this.$updating||(this.$useWrapMode?this.$updateWrapData(n,r):this.$updateRowLengthCache(n,r)),this.$modified=!0,this._signal("changeFold",{data:e,action:"remove"})},this.removeFolds=function(e){for(var t=[],n=0;n<e.length;n++)t.push(e[n]);t.forEach((function(e){this.removeFold(e)}),this),this.$modified=!0},this.expandFold=function(e){this.removeFold(e),e.subFolds.forEach((function(t){e.restoreRange(t),this.addFold(t)}),this),e.collapseChildren>0&&this.foldAll(e.start.row+1,e.end.row,e.collapseChildren-1),e.subFolds=[]},this.expandFolds=function(e){e.forEach((function(e){this.expandFold(e)}),this)},this.unfold=function(e,t){var n,i;if(null==e?(n=new r(0,0,this.getLength(),0),t=!0):n="number"==typeof e?new r(e,0,e,this.getLine(e).length):"row"in e?r.fromPoints(e,e):e,i=this.getFoldsInRangeList(n),t)this.removeFolds(i);else for(var o=i;o.length;)this.expandFolds(o),o=this.getFoldsInRangeList(n);if(i.length)return i},this.isRowFolded=function(e,t){return!!this.getFoldLine(e,t)},this.getRowFoldEnd=function(e,t){var n=this.getFoldLine(e,t);return n?n.end.row:e},this.getRowFoldStart=function(e,t){var n=this.getFoldLine(e,t);return n?n.start.row:e},this.getFoldDisplayLine=function(e,t,n,r,i){null==r&&(r=e.start.row),null==i&&(i=0),null==t&&(t=e.end.row),null==n&&(n=this.getLine(t).length);var o=this.doc,s="";return e.walk((function(e,t,n,a){if(!(t<r)){if(t==r){if(n<i)return;a=Math.max(i,a)}s+=null!=e?e:o.getLine(t).substring(a,n)}}),t,n),s},this.getDisplayLine=function(e,t,n,r){var i,o=this.getFoldLine(e);return o?this.getFoldDisplayLine(o,e,t,n,r):(i=this.doc.getLine(e)).substring(r||0,t||i.length)},this.$cloneFoldData=function(){var e=[];return e=this.$foldData.map((function(t){var n=t.folds.map((function(e){return e.clone()}));return new i(e,n)}))},this.toggleFold=function(e){var t,n,r=this.selection.getRange();if(r.isEmpty()){var i=r.start;if(t=this.getFoldAt(i.row,i.column))return void this.expandFold(t);(n=this.findMatchingBracket(i))?1==r.comparePoint(n)?r.end=n:(r.start=n,r.start.column++,r.end.column--):(n=this.findMatchingBracket({row:i.row,column:i.column+1}))?(1==r.comparePoint(n)?r.end=n:r.start=n,r.start.column++):r=this.getCommentFoldRange(i.row,i.column)||r}else{var o=this.getFoldsInRange(r);if(e&&o.length)return void this.expandFolds(o);1==o.length&&(t=o[0])}if(t||(t=this.getFoldAt(r.start.row,r.start.column)),t&&t.range.toString()==r.toString())this.expandFold(t);else{var s="...";if(!r.isMultiLine()){if((s=this.getTextRange(r)).length<4)return;s=s.trim().substring(0,2)+".."}this.addFold(s,r)}},this.getCommentFoldRange=function(e,t,n){var i=new s(this,e,t),o=i.getCurrentToken(),a=o.type;if(o&&/^comment|string/.test(a)){"comment"==(a=a.match(/comment|string/)[0])&&(a+="|doc-start");var l=new RegExp(a),c=new r;if(1!=n){do{o=i.stepBackward()}while(o&&l.test(o.type));i.stepForward()}if(c.start.row=i.getCurrentTokenRow(),c.start.column=i.getCurrentTokenColumn()+2,i=new s(this,e,t),-1!=n){var u=-1;do{if(o=i.stepForward(),-1==u){var h=this.getState(i.$row);l.test(h)||(u=i.$row)}else if(i.$row>u)break}while(o&&l.test(o.type));o=i.stepBackward()}else o=i.getCurrentToken();return c.end.row=i.getCurrentTokenRow(),c.end.column=i.getCurrentTokenColumn()+o.value.length-2,c}},this.foldAll=function(e,t,n){null==n&&(n=1e5);var r=this.foldWidgets;if(r){t=t||this.getLength();for(var i=e=e||0;i<t;i++)if(null==r[i]&&(r[i]=this.getFoldWidget(i)),"start"==r[i]){var o=this.getFoldWidgetRange(i);if(o&&o.isMultiLine()&&o.end.row<=t&&o.start.row>=e){i=o.end.row;try{var s=this.addFold("...",o);s&&(s.collapseChildren=n)}catch(e){}}}}},this.$foldStyles={manual:1,markbegin:1,markbeginend:1},this.$foldStyle="markbegin",this.setFoldStyle=function(e){if(!this.$foldStyles[e])throw new Error("invalid fold style: "+e+"["+Object.keys(this.$foldStyles).join(", ")+"]");if(this.$foldStyle!=e){this.$foldStyle=e,"manual"==e&&this.unfold();var t=this.$foldMode;this.$setFolding(null),this.$setFolding(t)}},this.$setFolding=function(e){this.$foldMode!=e&&(this.$foldMode=e,this.off("change",this.$updateFoldWidgets),this.off("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets),this._signal("changeAnnotation"),e&&"manual"!=this.$foldStyle?(this.foldWidgets=[],this.getFoldWidget=e.getFoldWidget.bind(e,this,this.$foldStyle),this.getFoldWidgetRange=e.getFoldWidgetRange.bind(e,this,this.$foldStyle),this.$updateFoldWidgets=this.updateFoldWidgets.bind(this),this.$tokenizerUpdateFoldWidgets=this.tokenizerUpdateFoldWidgets.bind(this),this.on("change",this.$updateFoldWidgets),this.on("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets)):this.foldWidgets=null)},this.getParentFoldRangeData=function(e,t){var n=this.foldWidgets;if(!n||t&&n[e])return{};for(var r,i=e-1;i>=0;){var o=n[i];if(null==o&&(o=n[i]=this.getFoldWidget(i)),"start"==o){var s=this.getFoldWidgetRange(i);if(r||(r=s),s&&s.end.row>=e)break}i--}return{range:-1!==i&&s,firstRange:r}},this.onFoldWidgetClick=function(e,t){var n={children:(t=t.domEvent).shiftKey,all:t.ctrlKey||t.metaKey,siblings:t.altKey};if(!this.$toggleFoldWidget(e,n)){var r=t.target||t.srcElement;r&&/ace_fold-widget/.test(r.className)&&(r.className+=" ace_invalid")}},this.$toggleFoldWidget=function(e,t){if(this.getFoldWidget){var n=this.getFoldWidget(e),r=this.getLine(e),i="end"===n?-1:1,o=this.getFoldAt(e,-1===i?0:r.length,i);if(o)return t.children||t.all?this.removeFold(o):this.expandFold(o),o;var s=this.getFoldWidgetRange(e,!0);if(s&&!s.isMultiLine()&&(o=this.getFoldAt(s.start.row,s.start.column,1))&&s.isEqual(o.range))return this.removeFold(o),o;if(t.siblings){var a=this.getParentFoldRangeData(e);if(a.range)var l=a.range.start.row+1,c=a.range.end.row;this.foldAll(l,c,t.all?1e4:0)}else t.children?(c=s?s.end.row:this.getLength(),this.foldAll(e+1,c,t.all?1e4:0)):s&&(t.all&&(s.collapseChildren=1e4),this.addFold("...",s));return s}},this.toggleFoldWidget=function(e){var t=this.selection.getCursor().row;t=this.getRowFoldStart(t);var n=this.$toggleFoldWidget(t,{});if(!n){var r=this.getParentFoldRangeData(t,!0);if(n=r.range||r.firstRange){t=n.start.row;var i=this.getFoldAt(t,this.getLine(t).length,1);i?this.removeFold(i):this.addFold("...",n)}}},this.updateFoldWidgets=function(e){var t=e.start.row,n=e.end.row-t;if(0===n)this.foldWidgets[t]=null;else if("remove"==e.action)this.foldWidgets.splice(t,n+1,null);else{var r=Array(n+1);r.unshift(t,1),this.foldWidgets.splice.apply(this.foldWidgets,r)}},this.tokenizerUpdateFoldWidgets=function(e){var t=e.data;t.first!=t.last&&this.foldWidgets.length>t.first&&this.foldWidgets.splice(t.first,this.foldWidgets.length)}}})),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],(function(e,t,n){"use strict";var r=e("../token_iterator").TokenIterator,i=e("../range").Range;t.BracketMatch=function(){this.findMatchingBracket=function(e,t){if(0==e.column)return null;var n=t||this.getLine(e.row).charAt(e.column-1);if(""==n)return null;var r=n.match(/([\(\[\{])|([\)\]\}])/);return r?r[1]?this.$findClosingBracket(r[1],e):this.$findOpeningBracket(r[2],e):null},this.getBracketRange=function(e){var t,n=this.getLine(e.row),r=!0,o=n.charAt(e.column-1),s=o&&o.match(/([\(\[\{])|([\)\]\}])/);if(s||(o=n.charAt(e.column),e={row:e.row,column:e.column+1},s=o&&o.match(/([\(\[\{])|([\)\]\}])/),r=!1),!s)return null;if(s[1]){if(!(a=this.$findClosingBracket(s[1],e)))return null;t=i.fromPoints(e,a),r||(t.end.column++,t.start.column--),t.cursor=t.end}else{var a;if(!(a=this.$findOpeningBracket(s[2],e)))return null;t=i.fromPoints(a,e),r||(t.start.column++,t.end.column--),t.cursor=t.start}return t},this.getMatchingBracketRanges=function(e){var t=this.getLine(e.row),n=t.charAt(e.column-1),r=n&&n.match(/([\(\[\{])|([\)\]\}])/);if(r||(n=t.charAt(e.column),e={row:e.row,column:e.column+1},r=n&&n.match(/([\(\[\{])|([\)\]\}])/)),!r)return null;var o=new i(e.row,e.column-1,e.row,e.column),s=r[1]?this.$findClosingBracket(r[1],e):this.$findOpeningBracket(r[2],e);return s?[o,new i(s.row,s.column,s.row,s.column+1)]:[o]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(e,t,n){var i=this.$brackets[e],o=1,s=new r(this,t.row,t.column),a=s.getCurrentToken();if(a||(a=s.stepForward()),a){n||(n=new RegExp("(\\.?"+a.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)")+")+"));for(var l=t.column-s.getCurrentTokenColumn()-2,c=a.value;;){for(;l>=0;){var u=c.charAt(l);if(u==i){if(0==(o-=1))return{row:s.getCurrentTokenRow(),column:l+s.getCurrentTokenColumn()}}else u==e&&(o+=1);l-=1}do{a=s.stepBackward()}while(a&&!n.test(a.type));if(null==a)break;l=(c=a.value).length-1}return null}},this.$findClosingBracket=function(e,t,n){var i=this.$brackets[e],o=1,s=new r(this,t.row,t.column),a=s.getCurrentToken();if(a||(a=s.stepForward()),a){n||(n=new RegExp("(\\.?"+a.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)")+")+"));for(var l=t.column-s.getCurrentTokenColumn();;){for(var c=a.value,u=c.length;l<u;){var h=c.charAt(l);if(h==i){if(0==(o-=1))return{row:s.getCurrentTokenRow(),column:l+s.getCurrentTokenColumn()}}else h==e&&(o+=1);l+=1}do{a=s.stepForward()}while(a&&!n.test(a.type));if(null==a)break;l=0}return null}}}})),ace.define("ace/edit_session",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/bidihandler","ace/config","ace/lib/event_emitter","ace/selection","ace/mode/text","ace/range","ace/document","ace/background_tokenizer","ace/search_highlight","ace/edit_session/folding","ace/edit_session/bracket_match"],(function(e,t,n){"use strict";var i=e("./lib/oop"),o=e("./lib/lang"),s=e("./bidihandler").BidiHandler,a=e("./config"),l=e("./lib/event_emitter").EventEmitter,c=e("./selection").Selection,u=e("./mode/text").Mode,h=e("./range").Range,d=e("./document").Document,p=e("./background_tokenizer").BackgroundTokenizer,f=e("./search_highlight").SearchHighlight,m=function e(t,n){this.$breakpoints=[],this.$decorations=[],this.$frontMarkers={},this.$backMarkers={},this.$markerId=1,this.$undoSelect=!0,this.$foldData=[],this.id="session"+ ++e.$uid,this.$foldData.toString=function(){return this.join("\n")},this.on("changeFold",this.onChangeFold.bind(this)),this.$onChange=this.onChange.bind(this),"object"==r(t)&&t.getLine||(t=new d(t)),this.setDocument(t),this.selection=new c(this),this.$bidiHandler=new s(this),a.resetOptions(this),this.setMode(n),a._signal("session",this)};m.$uid=0,function(){i.implement(this,l),this.setDocument=function(e){this.doc&&this.doc.removeListener("change",this.$onChange),this.doc=e,e.on("change",this.$onChange),this.bgTokenizer&&this.bgTokenizer.setDocument(this.getDocument()),this.resetCaches()},this.getDocument=function(){return this.doc},this.$resetRowCache=function(e){if(!e)return this.$docRowCache=[],void(this.$screenRowCache=[]);var t=this.$docRowCache.length,n=this.$getRowCacheIndex(this.$docRowCache,e)+1;t>n&&(this.$docRowCache.splice(n,t),this.$screenRowCache.splice(n,t))},this.$getRowCacheIndex=function(e,t){for(var n=0,r=e.length-1;n<=r;){var i=n+r>>1,o=e[i];if(t>o)n=i+1;else{if(!(t<o))return i;r=i-1}}return n-1},this.resetCaches=function(){this.$modified=!0,this.$wrapData=[],this.$rowLengthCache=[],this.$resetRowCache(0),this.bgTokenizer&&this.bgTokenizer.start(0)},this.onChangeFold=function(e){var t=e.data;this.$resetRowCache(t.start.row)},this.onChange=function(e){this.$modified=!0,this.$bidiHandler.onChange(e),this.$resetRowCache(e.start.row);var t=this.$updateInternalDataOnChange(e);!this.$fromUndo&&this.$undoManager&&(t&&t.length&&(this.$undoManager.add({action:"removeFolds",folds:t},this.mergeUndoDeltas),this.mergeUndoDeltas=!0),this.$undoManager.add(e,this.mergeUndoDeltas),this.mergeUndoDeltas=!0,this.$informUndoManager.schedule()),this.bgTokenizer&&this.bgTokenizer.$updateOnChange(e),this._signal("change",e)},this.setValue=function(e){this.doc.setValue(e),this.selection.moveTo(0,0),this.$resetRowCache(0),this.setUndoManager(this.$undoManager),this.getUndoManager().reset()},this.getValue=this.toString=function(){return this.doc.getValue()},this.getSelection=function(){return this.selection},this.getState=function(e){return this.bgTokenizer.getState(e)},this.getTokens=function(e){return this.bgTokenizer.getTokens(e)},this.getTokenAt=function(e,t){var n,r=this.bgTokenizer.getTokens(e),i=0;if(null==t){var o=r.length-1;i=this.getLine(e).length}else for(o=0;o<r.length&&!((i+=r[o].value.length)>=t);o++);return(n=r[o])?(n.index=o,n.start=i-n.value.length,n):null},this.setUndoManager=function(e){if(this.$undoManager=e,this.$informUndoManager&&this.$informUndoManager.cancel(),e){var t=this;e.addSession(this),this.$syncInformUndoManager=function(){t.$informUndoManager.cancel(),t.mergeUndoDeltas=!1},this.$informUndoManager=o.delayedCall(this.$syncInformUndoManager)}else this.$syncInformUndoManager=function(){}},this.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},this.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},this.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},this.getTabString=function(){return this.getUseSoftTabs()?o.stringRepeat(" ",this.getTabSize()):"\t"},this.setUseSoftTabs=function(e){this.setOption("useSoftTabs",e)},this.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},this.setTabSize=function(e){this.setOption("tabSize",e)},this.getTabSize=function(){return this.$tabSize},this.isTabStop=function(e){return this.$useSoftTabs&&e.column%this.$tabSize==0},this.setNavigateWithinSoftTabs=function(e){this.setOption("navigateWithinSoftTabs",e)},this.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},this.$overwrite=!1,this.setOverwrite=function(e){this.setOption("overwrite",e)},this.getOverwrite=function(){return this.$overwrite},this.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},this.addGutterDecoration=function(e,t){this.$decorations[e]||(this.$decorations[e]=""),this.$decorations[e]+=" "+t,this._signal("changeBreakpoint",{})},this.removeGutterDecoration=function(e,t){this.$decorations[e]=(this.$decorations[e]||"").replace(" "+t,""),this._signal("changeBreakpoint",{})},this.getBreakpoints=function(){return this.$breakpoints},this.setBreakpoints=function(e){this.$breakpoints=[];for(var t=0;t<e.length;t++)this.$breakpoints[e[t]]="ace_breakpoint";this._signal("changeBreakpoint",{})},this.clearBreakpoints=function(){this.$breakpoints=[],this._signal("changeBreakpoint",{})},this.setBreakpoint=function(e,t){void 0===t&&(t="ace_breakpoint"),t?this.$breakpoints[e]=t:delete this.$breakpoints[e],this._signal("changeBreakpoint",{})},this.clearBreakpoint=function(e){delete this.$breakpoints[e],this._signal("changeBreakpoint",{})},this.addMarker=function(e,t,n,r){var i=this.$markerId++,o={range:e,type:n||"line",renderer:"function"==typeof n?n:null,clazz:t,inFront:!!r,id:i};return r?(this.$frontMarkers[i]=o,this._signal("changeFrontMarker")):(this.$backMarkers[i]=o,this._signal("changeBackMarker")),i},this.addDynamicMarker=function(e,t){if(e.update){var n=this.$markerId++;return e.id=n,e.inFront=!!t,t?(this.$frontMarkers[n]=e,this._signal("changeFrontMarker")):(this.$backMarkers[n]=e,this._signal("changeBackMarker")),e}},this.removeMarker=function(e){var t=this.$frontMarkers[e]||this.$backMarkers[e];t&&(delete(t.inFront?this.$frontMarkers:this.$backMarkers)[e],this._signal(t.inFront?"changeFrontMarker":"changeBackMarker"))},this.getMarkers=function(e){return e?this.$frontMarkers:this.$backMarkers},this.highlight=function(e){if(!this.$searchHighlight){var t=new f(null,"ace_selected-word","text");this.$searchHighlight=this.addDynamicMarker(t)}this.$searchHighlight.setRegexp(e)},this.highlightLines=function(e,t,n,r){"number"!=typeof t&&(n=t,t=e),n||(n="ace_step");var i=new h(e,0,t,1/0);return i.id=this.addMarker(i,n,"fullLine",r),i},this.setAnnotations=function(e){this.$annotations=e,this._signal("changeAnnotation",{})},this.getAnnotations=function(){return this.$annotations||[]},this.clearAnnotations=function(){this.setAnnotations([])},this.$detectNewLine=function(e){var t=e.match(/^.*?(\r?\n)/m);this.$autoNewLine=t?t[1]:"\n"},this.getWordRange=function(e,t){var n=this.getLine(e),r=!1;if(t>0&&(r=!!n.charAt(t-1).match(this.tokenRe)),r||(r=!!n.charAt(t).match(this.tokenRe)),r)var i=this.tokenRe;else if(/^\s+$/.test(n.slice(t-1,t+1)))i=/\s/;else i=this.nonTokenRe;var o=t;if(o>0){do{o--}while(o>=0&&n.charAt(o).match(i));o++}for(var s=t;s<n.length&&n.charAt(s).match(i);)s++;return new h(e,o,e,s)},this.getAWordRange=function(e,t){for(var n=this.getWordRange(e,t),r=this.getLine(n.end.row);r.charAt(n.end.column).match(/[ \t]/);)n.end.column+=1;return n},this.setNewLineMode=function(e){this.doc.setNewLineMode(e)},this.getNewLineMode=function(){return this.doc.getNewLineMode()},this.setUseWorker=function(e){this.setOption("useWorker",e)},this.getUseWorker=function(){return this.$useWorker},this.onReloadTokenizer=function(e){var t=e.data;this.bgTokenizer.start(t.first),this._signal("tokenizerUpdate",e)},this.$modes=a.$modes,this.$mode=null,this.$modeId=null,this.setMode=function(e,t){if(e&&"object"===r(e)){if(e.getTokenizer)return this.$onChangeMode(e);var n=e,i=n.path}else i=e||"ace/mode/text";if(this.$modes["ace/mode/text"]||(this.$modes["ace/mode/text"]=new u),this.$modes[i]&&!n)return this.$onChangeMode(this.$modes[i]),void(t&&t());this.$modeId=i,a.loadModule(["mode",i],function(e){if(this.$modeId!==i)return t&&t();this.$modes[i]&&!n?this.$onChangeMode(this.$modes[i]):e&&e.Mode&&(e=new e.Mode(n),n||(this.$modes[i]=e,e.$id=i),this.$onChangeMode(e)),t&&t()}.bind(this)),this.$mode||this.$onChangeMode(this.$modes["ace/mode/text"],!0)},this.$onChangeMode=function(e,t){if(t||(this.$modeId=e.$id),this.$mode!==e){var n=this.$mode;this.$mode=e,this.$stopWorker(),this.$useWorker&&this.$startWorker();var r=e.getTokenizer();if(void 0!==r.on){var i=this.onReloadTokenizer.bind(this);r.on("update",i)}if(this.bgTokenizer)this.bgTokenizer.setTokenizer(r);else{this.bgTokenizer=new p(r);var o=this;this.bgTokenizer.on("update",(function(e){o._signal("tokenizerUpdate",e)}))}this.bgTokenizer.setDocument(this.getDocument()),this.tokenRe=e.tokenRe,this.nonTokenRe=e.nonTokenRe,t||(e.attachToSession&&e.attachToSession(this),this.$options.wrapMethod.set.call(this,this.$wrapMethod),this.$setFolding(e.foldingRules),this.bgTokenizer.start(0),this._emit("changeMode",{oldMode:n,mode:e}))}},this.$stopWorker=function(){this.$worker&&(this.$worker.terminate(),this.$worker=null)},this.$startWorker=function(){try{this.$worker=this.$mode.createWorker(this)}catch(e){a.warn("Could not load worker",e),this.$worker=null}},this.getMode=function(){return this.$mode},this.$scrollTop=0,this.setScrollTop=function(e){this.$scrollTop===e||isNaN(e)||(this.$scrollTop=e,this._signal("changeScrollTop",e))},this.getScrollTop=function(){return this.$scrollTop},this.$scrollLeft=0,this.setScrollLeft=function(e){this.$scrollLeft===e||isNaN(e)||(this.$scrollLeft=e,this._signal("changeScrollLeft",e))},this.getScrollLeft=function(){return this.$scrollLeft},this.getScreenWidth=function(){return this.$computeWidth(),this.lineWidgets?Math.max(this.getLineWidgetMaxWidth(),this.screenWidth):this.screenWidth},this.getLineWidgetMaxWidth=function(){if(null!=this.lineWidgetsWidth)return this.lineWidgetsWidth;var e=0;return this.lineWidgets.forEach((function(t){t&&t.screenWidth>e&&(e=t.screenWidth)})),this.lineWidgetWidth=e},this.$computeWidth=function(e){if(this.$modified||e){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var t=this.doc.getAllLines(),n=this.$rowLengthCache,r=0,i=0,o=this.$foldData[i],s=o?o.start.row:1/0,a=t.length,l=0;l<a;l++){if(l>s){if((l=o.end.row+1)>=a)break;s=(o=this.$foldData[i++])?o.start.row:1/0}null==n[l]&&(n[l]=this.$getStringScreenWidth(t[l])[0]),n[l]>r&&(r=n[l])}this.screenWidth=r}},this.getLine=function(e){return this.doc.getLine(e)},this.getLines=function(e,t){return this.doc.getLines(e,t)},this.getLength=function(){return this.doc.getLength()},this.getTextRange=function(e){return this.doc.getTextRange(e||this.selection.getRange())},this.insert=function(e,t){return this.doc.insert(e,t)},this.remove=function(e){return this.doc.remove(e)},this.removeFullLines=function(e,t){return this.doc.removeFullLines(e,t)},this.undoChanges=function(e,t){if(e.length){this.$fromUndo=!0;for(var n=e.length-1;-1!=n;n--){var r=e[n];"insert"==r.action||"remove"==r.action?this.doc.revertDelta(r):r.folds&&this.addFolds(r.folds)}!t&&this.$undoSelect&&(e.selectionBefore?this.selection.fromJSON(e.selectionBefore):this.selection.setRange(this.$getUndoSelection(e,!0))),this.$fromUndo=!1}},this.redoChanges=function(e,t){if(e.length){this.$fromUndo=!0;for(var n=0;n<e.length;n++){var r=e[n];"insert"!=r.action&&"remove"!=r.action||this.doc.$safeApplyDelta(r)}!t&&this.$undoSelect&&(e.selectionAfter?this.selection.fromJSON(e.selectionAfter):this.selection.setRange(this.$getUndoSelection(e,!1))),this.$fromUndo=!1}},this.setUndoSelect=function(e){this.$undoSelect=e},this.$getUndoSelection=function(e,t){function n(e){return t?"insert"!==e.action:"insert"===e.action}for(var r,i,o=0;o<e.length;o++){var s=e[o];s.start&&(r?n(s)?(i=s.start,-1==r.compare(i.row,i.column)&&r.setStart(i),i=s.end,1==r.compare(i.row,i.column)&&r.setEnd(i)):(i=s.start,-1==r.compare(i.row,i.column)&&(r=h.fromPoints(s.start,s.start))):r=n(s)?h.fromPoints(s.start,s.end):h.fromPoints(s.start,s.start))}return r},this.replace=function(e,t){return this.doc.replace(e,t)},this.moveText=function(e,t,n){var r=this.getTextRange(e),i=this.getFoldsInRange(e),o=h.fromPoints(t,t);if(!n){this.remove(e);var s=e.start.row-e.end.row;(c=s?-e.end.column:e.start.column-e.end.column)&&(o.start.row==e.end.row&&o.start.column>e.end.column&&(o.start.column+=c),o.end.row==e.end.row&&o.end.column>e.end.column&&(o.end.column+=c)),s&&o.start.row>=e.end.row&&(o.start.row+=s,o.end.row+=s)}if(o.end=this.insert(o.start,r),i.length){var a=e.start,l=o.start,c=(s=l.row-a.row,l.column-a.column);this.addFolds(i.map((function(e){return(e=e.clone()).start.row==a.row&&(e.start.column+=c),e.end.row==a.row&&(e.end.column+=c),e.start.row+=s,e.end.row+=s,e})))}return o},this.indentRows=function(e,t,n){n=n.replace(/\t/g,this.getTabString());for(var r=e;r<=t;r++)this.doc.insertInLine({row:r,column:0},n)},this.outdentRows=function(e){for(var t=e.collapseRows(),n=new h(0,0,0,0),r=this.getTabSize(),i=t.start.row;i<=t.end.row;++i){var o=this.getLine(i);n.start.row=i,n.end.row=i;for(var s=0;s<r&&" "==o.charAt(s);++s);s<r&&"\t"==o.charAt(s)?(n.start.column=s,n.end.column=s+1):(n.start.column=0,n.end.column=s),this.remove(n)}},this.$moveLines=function(e,t,n){if(e=this.getRowFoldStart(e),t=this.getRowFoldEnd(t),n<0){if((i=this.getRowFoldStart(e+n))<0)return 0;var r=i-e}else if(n>0){var i;if((i=this.getRowFoldEnd(t+n))>this.doc.getLength()-1)return 0;r=i-t}else{e=this.$clipRowToDocument(e);r=(t=this.$clipRowToDocument(t))-e+1}var o=new h(e,0,t,Number.MAX_VALUE),s=this.getFoldsInRange(o).map((function(e){return(e=e.clone()).start.row+=r,e.end.row+=r,e})),a=0==n?this.doc.getLines(e,t):this.doc.removeFullLines(e,t);return this.doc.insertFullLines(e+r,a),s.length&&this.addFolds(s),r},this.moveLinesUp=function(e,t){return this.$moveLines(e,t,-1)},this.moveLinesDown=function(e,t){return this.$moveLines(e,t,1)},this.duplicateLines=function(e,t){return this.$moveLines(e,t,0)},this.$clipRowToDocument=function(e){return Math.max(0,Math.min(e,this.doc.getLength()-1))},this.$clipColumnToRow=function(e,t){return t<0?0:Math.min(this.doc.getLine(e).length,t)},this.$clipPositionToDocument=function(e,t){if(t=Math.max(0,t),e<0)e=0,t=0;else{var n=this.doc.getLength();e>=n?(e=n-1,t=this.doc.getLine(n-1).length):t=Math.min(this.doc.getLine(e).length,t)}return{row:e,column:t}},this.$clipRangeToDocument=function(e){e.start.row<0?(e.start.row=0,e.start.column=0):e.start.column=this.$clipColumnToRow(e.start.row,e.start.column);var t=this.doc.getLength()-1;return e.end.row>t?(e.end.row=t,e.end.column=this.doc.getLine(t).length):e.end.column=this.$clipColumnToRow(e.end.row,e.end.column),e},this.$wrapLimit=80,this.$useWrapMode=!1,this.$wrapLimitRange={min:null,max:null},this.setUseWrapMode=function(e){if(e!=this.$useWrapMode){if(this.$useWrapMode=e,this.$modified=!0,this.$resetRowCache(0),e){var t=this.getLength();this.$wrapData=Array(t),this.$updateWrapData(0,t-1)}this._signal("changeWrapMode")}},this.getUseWrapMode=function(){return this.$useWrapMode},this.setWrapLimitRange=function(e,t){this.$wrapLimitRange.min===e&&this.$wrapLimitRange.max===t||(this.$wrapLimitRange={min:e,max:t},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},this.adjustWrapLimit=function(e,t){var n=this.$wrapLimitRange;n.max<0&&(n={min:t,max:t});var r=this.$constrainWrapLimit(e,n.min,n.max);return r!=this.$wrapLimit&&r>1&&(this.$wrapLimit=r,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0)},this.$constrainWrapLimit=function(e,t,n){return t&&(e=Math.max(t,e)),n&&(e=Math.min(n,e)),e},this.getWrapLimit=function(){return this.$wrapLimit},this.setWrapLimit=function(e){this.setWrapLimitRange(e,e)},this.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},this.$updateInternalDataOnChange=function(e){var t=this.$useWrapMode,n=e.action,r=e.start,i=e.end,o=r.row,s=i.row,a=s-o,l=null;if(this.$updating=!0,0!=a)if("remove"===n){this[t?"$wrapData":"$rowLengthCache"].splice(o,a);var c=this.$foldData;l=this.getFoldsInRange(e),this.removeFolds(l);var u=0;if(m=this.getFoldLine(i.row)){m.addRemoveChars(i.row,i.column,r.column-i.column),m.shiftRow(-a);var h=this.getFoldLine(o);h&&h!==m&&(h.merge(m),m=h),u=c.indexOf(m)+1}for(;u<c.length;u++){(m=c[u]).start.row>=i.row&&m.shiftRow(-a)}s=o}else{var d=Array(a);d.unshift(o,0);var p=t?this.$wrapData:this.$rowLengthCache;p.splice.apply(p,d);c=this.$foldData,u=0;if(m=this.getFoldLine(o)){var f=m.range.compareInside(r.row,r.column);0==f?(m=m.split(r.row,r.column))&&(m.shiftRow(a),m.addRemoveChars(s,0,i.column-r.column)):-1==f&&(m.addRemoveChars(o,0,i.column-r.column),m.shiftRow(a)),u=c.indexOf(m)+1}for(;u<c.length;u++){var m;(m=c[u]).start.row>=o&&m.shiftRow(a)}}else a=Math.abs(e.start.column-e.end.column),"remove"===n&&(l=this.getFoldsInRange(e),this.removeFolds(l),a=-a),(m=this.getFoldLine(o))&&m.addRemoveChars(o,r.column,a);return t&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,t?this.$updateWrapData(o,s):this.$updateRowLengthCache(o,s),l},this.$updateRowLengthCache=function(e,t,n){this.$rowLengthCache[e]=null,this.$rowLengthCache[t]=null},this.$updateWrapData=function(n,r){var i,o,s=this.doc.getAllLines(),a=this.getTabSize(),l=this.$wrapData,c=this.$wrapLimit,u=n;for(r=Math.min(r,s.length-1);u<=r;)(o=this.getFoldLine(u,o))?(i=[],o.walk(function(n,r,o,a){var l;if(null!=n){(l=this.$getDisplayTokens(n,i.length))[0]=e;for(var c=1;c<l.length;c++)l[c]=t}else l=this.$getDisplayTokens(s[r].substring(a,o),i.length);i=i.concat(l)}.bind(this),o.end.row,s[o.end.row].length+1),l[o.start.row]=this.$computeWrapSplits(i,c,a),u=o.end.row+1):(i=this.$getDisplayTokens(s[u]),l[u]=this.$computeWrapSplits(i,c,a),u++)};var e=3,t=4;function n(e){return!(e<4352)&&(e>=4352&&e<=4447||e>=4515&&e<=4519||e>=4602&&e<=4607||e>=9001&&e<=9002||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12283||e>=12288&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12589||e>=12593&&e<=12686||e>=12688&&e<=12730||e>=12736&&e<=12771||e>=12784&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=13054||e>=13056&&e<=19903||e>=19968&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=55216&&e<=55238||e>=55243&&e<=55291||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=65281&&e<=65376||e>=65504&&e<=65510)}this.$computeWrapSplits=function(n,r,i){if(0==n.length)return[];var o=[],s=n.length,a=0,l=0,c=this.$wrapAsCode,u=this.$indentedSoftWrap,h=r<=Math.max(2*i,8)||!1===u?0:Math.floor(r/2);function d(e){for(var t=e-a,r=a;r<e;r++){var s=n[r];12!==s&&2!==s||(t-=1)}o.length||(p=function(){var e=0;if(0===h)return e;if(u)for(var t=0;t<n.length;t++){var r=n[t];if(10==r)e+=1;else{if(11!=r){if(12==r)continue;break}e+=i}}return c&&!1!==u&&(e+=i),Math.min(e,h)}(),o.indent=p),l+=t,o.push(l),a=e}for(var p=0;s-a>r-p;){var f=a+r-p;if(n[f-1]>=10&&n[f]>=10)d(f);else if(n[f]!=e&&n[f]!=t){for(var m=Math.max(f-(r-(r>>2)),a-1);f>m&&n[f]<e;)f--;if(c){for(;f>m&&n[f]<e;)f--;for(;f>m&&9==n[f];)f--}else for(;f>m&&n[f]<10;)f--;f>m?d(++f):(2==n[f=a+r]&&f--,d(f-p))}else{for(;f!=a-1&&n[f]!=e;f--);if(f>a){d(f);continue}for(f=a+r;f<n.length&&n[f]==t;f++);if(f==n.length)break;d(f)}}return o},this.$getDisplayTokens=function(e,t){var r,i=[];t=t||0;for(var o=0;o<e.length;o++){var s=e.charCodeAt(o);if(9==s){r=this.getScreenTabSize(i.length+t),i.push(11);for(var a=1;a<r;a++)i.push(12)}else 32==s?i.push(10):s>39&&s<48||s>57&&s<64?i.push(9):s>=4352&&n(s)?i.push(1,2):i.push(1)}return i},this.$getStringScreenWidth=function(e,t,r){if(0==t)return[0,0];var i,o;for(null==t&&(t=1/0),r=r||0,o=0;o<e.length&&(9==(i=e.charCodeAt(o))?r+=this.getScreenTabSize(r):i>=4352&&n(i)?r+=2:r+=1,!(r>t));o++);return[r,o]},this.lineWidgets=null,this.getRowLength=function(e){var t=1;return this.lineWidgets&&(t+=this.lineWidgets[e]&&this.lineWidgets[e].rowCount||0),this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+t:t},this.getRowLineCount=function(e){return this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+1:1},this.getRowWrapIndent=function(e){if(this.$useWrapMode){var t=this.screenToDocumentPosition(e,Number.MAX_VALUE),n=this.$wrapData[t.row];return n.length&&n[0]<t.column?n.indent:0}return 0},this.getScreenLastRowColumn=function(e){var t=this.screenToDocumentPosition(e,Number.MAX_VALUE);return this.documentToScreenColumn(t.row,t.column)},this.getDocumentLastRowColumn=function(e,t){var n=this.documentToScreenRow(e,t);return this.getScreenLastRowColumn(n)},this.getDocumentLastRowColumnPosition=function(e,t){var n=this.documentToScreenRow(e,t);return this.screenToDocumentPosition(n,Number.MAX_VALUE/10)},this.getRowSplitData=function(e){return this.$useWrapMode?this.$wrapData[e]:void 0},this.getScreenTabSize=function(e){return this.$tabSize-(e%this.$tabSize|0)},this.screenToDocumentRow=function(e,t){return this.screenToDocumentPosition(e,t).row},this.screenToDocumentColumn=function(e,t){return this.screenToDocumentPosition(e,t).column},this.screenToDocumentPosition=function(e,t,n){if(e<0)return{row:0,column:0};var r,i,o=0,s=0,a=0,l=0,c=this.$screenRowCache,u=this.$getRowCacheIndex(c,e),h=c.length;if(h&&u>=0){a=c[u],o=this.$docRowCache[u];var d=e>c[h-1]}else d=!h;for(var p=this.getLength()-1,f=this.getNextFoldLine(o),m=f?f.start.row:1/0;a<=e&&!(a+(l=this.getRowLength(o))>e||o>=p);)a+=l,++o>m&&(o=f.end.row+1,m=(f=this.getNextFoldLine(o,f))?f.start.row:1/0),d&&(this.$docRowCache.push(o),this.$screenRowCache.push(a));if(f&&f.start.row<=o)r=this.getFoldDisplayLine(f),o=f.start.row;else{if(a+l<=e||o>p)return{row:p,column:this.getLine(p).length};r=this.getLine(o),f=null}var g=0,v=Math.floor(e-a);if(this.$useWrapMode){var b=this.$wrapData[o];b&&(i=b[v],v>0&&b.length&&(g=b.indent,s=b[v-1]||b[b.length-1],r=r.substring(s)))}return void 0!==n&&this.$bidiHandler.isBidiRow(a+v,o,v)&&(t=this.$bidiHandler.offsetToCol(n)),s+=this.$getStringScreenWidth(r,t-g)[1],this.$useWrapMode&&s>=i&&(s=i-1),f?f.idxToPosition(s):{row:o,column:s}},this.documentToScreenPosition=function(e,t){if(void 0===t)var n=this.$clipPositionToDocument(e.row,e.column);else n=this.$clipPositionToDocument(e,t);e=n.row,t=n.column;var r,i=0,o=null;(r=this.getFoldAt(e,t,1))&&(e=r.start.row,t=r.start.column);var s,a=0,l=this.$docRowCache,c=this.$getRowCacheIndex(l,e),u=l.length;if(u&&c>=0){a=l[c],i=this.$screenRowCache[c];var h=e>l[u-1]}else h=!u;for(var d=this.getNextFoldLine(a),p=d?d.start.row:1/0;a<e;){if(a>=p){if((s=d.end.row+1)>e)break;p=(d=this.getNextFoldLine(s,d))?d.start.row:1/0}else s=a+1;i+=this.getRowLength(a),a=s,h&&(this.$docRowCache.push(a),this.$screenRowCache.push(i))}var f="";d&&a>=p?(f=this.getFoldDisplayLine(d,e,t),o=d.start.row):(f=this.getLine(e).substring(0,t),o=e);var m=0;if(this.$useWrapMode){var g=this.$wrapData[o];if(g){for(var v=0;f.length>=g[v];)i++,v++;f=f.substring(g[v-1]||0,f.length),m=v>0?g.indent:0}}return this.lineWidgets&&this.lineWidgets[a]&&this.lineWidgets[a].rowsAbove&&(i+=this.lineWidgets[a].rowsAbove),{row:i,column:m+this.$getStringScreenWidth(f)[0]}},this.documentToScreenColumn=function(e,t){return this.documentToScreenPosition(e,t).column},this.documentToScreenRow=function(e,t){return this.documentToScreenPosition(e,t).row},this.getScreenLength=function(){var e=0,t=null;if(this.$useWrapMode)for(var n=this.$wrapData.length,r=0,i=(a=0,(t=this.$foldData[a++])?t.start.row:1/0);r<n;){var o=this.$wrapData[r];e+=o?o.length+1:1,++r>i&&(r=t.end.row+1,i=(t=this.$foldData[a++])?t.start.row:1/0)}else{e=this.getLength();for(var s=this.$foldData,a=0;a<s.length;a++)e-=(t=s[a]).end.row-t.start.row}return this.lineWidgets&&(e+=this.$getWidgetScreenLength()),e},this.$setFontMetrics=function(e){this.$enableVarChar&&(this.$getStringScreenWidth=function(t,n,r){if(0===n)return[0,0];var i,o;for(n||(n=1/0),r=r||0,o=0;o<t.length&&!((r+="\t"===(i=t.charAt(o))?this.getScreenTabSize(r):e.getCharacterWidth(i))>n);o++);return[r,o]})},this.destroy=function(){this.bgTokenizer&&(this.bgTokenizer.setDocument(null),this.bgTokenizer=null),this.$stopWorker(),this.removeAllListeners(),this.selection.detach()},this.isFullWidth=n}.call(m.prototype),e("./edit_session/folding").Folding.call(m.prototype),e("./edit_session/bracket_match").BracketMatch.call(m.prototype),a.defineOptions(m.prototype,"session",{wrap:{set:function(e){if(e&&"off"!=e?"free"==e?e=!0:"printMargin"==e?e=-1:"string"==typeof e&&(e=parseInt(e,10)||!1):e=!1,this.$wrap!=e)if(this.$wrap=e,e){var t="number"==typeof e?e:null;this.setWrapLimitRange(t,t),this.setUseWrapMode(!0)}else this.setUseWrapMode(!1)},get:function(){return this.getUseWrapMode()?-1==this.$wrap?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(e){(e="auto"==e?"text"!=this.$mode.type:"text"!=e)!=this.$wrapAsCode&&(this.$wrapAsCode=e,this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0)))},initialValue:"auto"},indentedSoftWrap:{set:function(){this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0))},initialValue:!0},firstLineNumber:{set:function(){this._signal("changeBreakpoint")},initialValue:1},useWorker:{set:function(e){this.$useWorker=e,this.$stopWorker(),e&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(e){(e=parseInt(e))>0&&this.$tabSize!==e&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=e,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(e){this.setFoldStyle(e)},handlesSet:!0},overwrite:{set:function(e){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(e){this.doc.setNewLineMode(e)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(e){this.setMode(e)},get:function(){return this.$modeId},handlesSet:!0}}),t.EditSession=m})),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],(function(e,t,n){"use strict";var r=e("./lib/lang"),i=e("./lib/oop"),o=e("./range").Range,s=function(){this.$options={}};(function(){this.set=function(e){return i.mixin(this.$options,e),this},this.getOptions=function(){return r.copyObject(this.$options)},this.setOptions=function(e){this.$options=e},this.find=function(e){var t=this.$options,n=this.$matchIterator(e,t);if(!n)return!1;var r=null;return n.forEach((function(e,n,i,s){return r=new o(e,n,i,s),!(n==s&&t.start&&t.start.start&&0!=t.skipCurrent&&r.isEqual(t.start))||(r=null,!1)})),r},this.findAll=function(e){var t=this.$options;if(!t.needle)return[];this.$assembleRegExp(t);var n=t.range,i=n?e.getLines(n.start.row,n.end.row):e.doc.getAllLines(),s=[],a=t.re;if(t.$isMultiLine){var l,c=a.length,u=i.length-c;e:for(var h=a.offset||0;h<=u;h++){for(var d=0;d<c;d++)if(-1==i[h+d].search(a[d]))continue e;var p=i[h],f=i[h+c-1],m=p.length-p.match(a[0])[0].length,g=f.match(a[c-1])[0].length;l&&l.end.row===h&&l.end.column>m||(s.push(l=new o(h,m,h+c-1,g)),c>2&&(h=h+c-2))}}else for(var v=0;v<i.length;v++){var b=r.getMatchOffsets(i[v],a);for(d=0;d<b.length;d++){var y=b[d];s.push(new o(v,y.offset,v,y.offset+y.length))}}if(n){var w=n.start.column,k=n.start.column;for(v=0,d=s.length-1;v<d&&s[v].start.column<w&&s[v].start.row==n.start.row;)v++;for(;v<d&&s[d].end.column>k&&s[d].end.row==n.end.row;)d--;for(s=s.slice(v,d+1),v=0,d=s.length;v<d;v++)s[v].start.row+=n.start.row,s[v].end.row+=n.start.row}return s},this.replace=function(e,t){var n=this.$options,r=this.$assembleRegExp(n);if(n.$isMultiLine)return t;if(r){var i=r.exec(e);if(!i||i[0].length!=e.length)return null;if(t=e.replace(r,t),n.preserveCase){t=t.split("");for(var o=Math.min(e.length,e.length);o--;){var s=e[o];s&&s.toLowerCase()!=s?t[o]=t[o].toUpperCase():t[o]=t[o].toLowerCase()}t=t.join("")}return t}},this.$assembleRegExp=function(e,t){if(e.needle instanceof RegExp)return e.re=e.needle;var n=e.needle;if(!e.needle)return e.re=!1;e.regExp||(n=r.escapeRegExp(n)),e.wholeWord&&(n=function(e,t){function n(e){return/\w/.test(e)||t.regExp?"\\b":""}return n(e[0])+e+n(e[e.length-1])}(n,e));var i=e.caseSensitive?"gm":"gmi";if(e.$isMultiLine=!t&&/[\n\r]/.test(n),e.$isMultiLine)return e.re=this.$assembleMultilineRegExp(n,i);try{var o=new RegExp(n,i)}catch(e){o=!1}return e.re=o},this.$assembleMultilineRegExp=function(e,t){for(var n=e.replace(/\r\n|\r|\n/g,"$\n^").split("\n"),r=[],i=0;i<n.length;i++)try{r.push(new RegExp(n[i],t))}catch(e){return!1}return r},this.$matchIterator=function(e,t){var n=this.$assembleRegExp(t);if(!n)return!1;var r=1==t.backwards,i=0!=t.skipCurrent,o=t.range,s=t.start;s||(s=o?o[r?"end":"start"]:e.selection.getRange()),s.start&&(s=s[i!=r?"end":"start"]);var a=o?o.start.row:0,l=o?o.end.row:e.getLength()-1;if(r)var c=function(e){var n=s.row;if(!h(n,s.column,e)){for(n--;n>=a;n--)if(h(n,Number.MAX_VALUE,e))return;if(0!=t.wrap)for(n=l,a=s.row;n>=a;n--)if(h(n,Number.MAX_VALUE,e))return}};else c=function(e){var n=s.row;if(!h(n,s.column,e)){for(n+=1;n<=l;n++)if(h(n,0,e))return;if(0!=t.wrap)for(n=a,l=s.row;n<=l;n++)if(h(n,0,e))return}};if(t.$isMultiLine)var u=n.length,h=function(t,i,o){var s=r?t-u+1:t;if(!(s<0)){var a=e.getLine(s),l=a.search(n[0]);if(!(!r&&l<i||-1===l)){for(var c=1;c<u;c++)if(-1==(a=e.getLine(s+c)).search(n[c]))return;var h=a.match(n[u-1])[0].length;if(!(r&&h>i))return!!o(s,l,s+u-1,h)||void 0}}};else if(r)h=function(t,r,i){var o,s=e.getLine(t),a=[],l=0;for(n.lastIndex=0;o=n.exec(s);){var c=o[0].length;if(l=o.index,!c){if(l>=s.length)break;n.lastIndex=l+=1}if(o.index+c>r)break;a.push(o.index,c)}for(var u=a.length-1;u>=0;u-=2){var h=a[u-1];if(i(t,h,t,h+(c=a[u])))return!0}};else h=function(t,r,i){var o,s,a=e.getLine(t);for(n.lastIndex=r;s=n.exec(a);){var l=s[0].length;if(i(t,o=s.index,t,o+l))return!0;if(!l&&(n.lastIndex=o+=1,o>=a.length))return!1}};return{forEach:c}}}).call(s.prototype),t.Search=s})),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],(function(e,t,n){"use strict";var i=e("../lib/keys"),o=e("../lib/useragent"),s=i.KEY_MODS;function a(e,t){this.platform=t||(o.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(e),this.$singleCommand=!0}function l(e,t){a.call(this,e,t),this.$singleCommand=!1}l.prototype=a.prototype,function(){function e(e){return"object"==r(e)&&e.bindKey&&e.bindKey.position||(e.isDefault?-100:0)}this.addCommand=function(e){this.commands[e.name]&&this.removeCommand(e),this.commands[e.name]=e,e.bindKey&&this._buildKeyHash(e)},this.removeCommand=function(e,t){var n=e&&("string"==typeof e?e:e.name);e=this.commands[n],t||delete this.commands[n];var r=this.commandKeyBinding;for(var i in r){var o=r[i];if(o==e)delete r[i];else if(Array.isArray(o)){var s=o.indexOf(e);-1!=s&&(o.splice(s,1),1==o.length&&(r[i]=o[0]))}}},this.bindKey=function(e,t,n){if("object"==r(e)&&e&&(null==n&&(n=e.position),e=e[this.platform]),e)return"function"==typeof t?this.addCommand({exec:t,bindKey:e,name:t.name||e}):void e.split("|").forEach((function(e){var r="";if(-1!=e.indexOf(" ")){var i=e.split(/\s+/);e=i.pop(),i.forEach((function(e){var t=this.parseKeys(e),n=s[t.hashId]+t.key;r+=(r?" ":"")+n,this._addCommandToBinding(r,"chainKeys")}),this),r+=" "}var o=this.parseKeys(e),a=s[o.hashId]+o.key;this._addCommandToBinding(r+a,t,n)}),this)},this._addCommandToBinding=function(t,n,r){var i,o=this.commandKeyBinding;if(n)if(!o[t]||this.$singleCommand)o[t]=n;else{Array.isArray(o[t])?-1!=(i=o[t].indexOf(n))&&o[t].splice(i,1):o[t]=[o[t]],"number"!=typeof r&&(r=e(n));var s=o[t];for(i=0;i<s.length;i++){if(e(s[i])>r)break}s.splice(i,0,n)}else delete o[t]},this.addCommands=function(e){e&&Object.keys(e).forEach((function(t){var n=e[t];if(n){if("string"==typeof n)return this.bindKey(n,t);"function"==typeof n&&(n={exec:n}),"object"===r(n)&&(n.name||(n.name=t),this.addCommand(n))}}),this)},this.removeCommands=function(e){Object.keys(e).forEach((function(t){this.removeCommand(e[t])}),this)},this.bindKeys=function(e){Object.keys(e).forEach((function(t){this.bindKey(t,e[t])}),this)},this._buildKeyHash=function(e){this.bindKey(e.bindKey,e)},this.parseKeys=function(e){var t=e.toLowerCase().split(/[\-\+]([\-\+])?/).filter((function(e){return e})),n=t.pop(),r=i[n];if(i.FUNCTION_KEYS[r])n=i.FUNCTION_KEYS[r].toLowerCase();else{if(!t.length)return{key:n,hashId:-1};if(1==t.length&&"shift"==t[0])return{key:n.toUpperCase(),hashId:-1}}for(var o=0,s=t.length;s--;){var a=i.KEY_MODS[t[s]];if(null==a)return"undefined"!=typeof console&&console.error("invalid modifier "+t[s]+" in "+e),!1;o|=a}return{key:n,hashId:o}},this.findKeyCommand=function(e,t){var n=s[e]+t;return this.commandKeyBinding[n]},this.handleKeyboard=function(e,t,n,r){if(!(r<0)){var i=s[t]+n,o=this.commandKeyBinding[i];return e.$keyChain&&(e.$keyChain+=" "+i,o=this.commandKeyBinding[e.$keyChain]||o),!o||"chainKeys"!=o&&"chainKeys"!=o[o.length-1]?(e.$keyChain&&(t&&4!=t||1!=n.length?(-1==t||r>0)&&(e.$keyChain=""):e.$keyChain=e.$keyChain.slice(0,-i.length-1)),{command:o}):(e.$keyChain=e.$keyChain||i,{command:"null"})}},this.getStatusText=function(e,t){return t.$keyChain||""}}.call(a.prototype),t.HashHandler=a,t.MultiHashHandler=l})),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],(function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../keyboard/hash_handler").MultiHashHandler,o=e("../lib/event_emitter").EventEmitter,s=function(e,t){i.call(this,t,e),this.byName=this.commands,this.setDefaultHandler("exec",(function(e){return e.command.exec(e.editor,e.args||{})}))};r.inherits(s,i),function(){r.implement(this,o),this.exec=function(e,t,n){if(Array.isArray(e)){for(var r=e.length;r--;)if(this.exec(e[r],t,n))return!0;return!1}if("string"==typeof e&&(e=this.commands[e]),!e)return!1;if(t&&t.$readOnly&&!e.readOnly)return!1;if(0!=this.$checkCommandState&&e.isAvailable&&!e.isAvailable(t))return!1;var i={editor:t,command:e,args:n};return i.returnValue=this._emit("exec",i),this._signal("afterExec",i),!1!==i.returnValue},this.toggleRecording=function(e){if(!this.$inReplay)return e&&e._emit("changeStatus"),this.recording?(this.macro.pop(),this.off("exec",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.$addCommandToMacro||(this.$addCommandToMacro=function(e){this.macro.push([e.command,e.args])}.bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},this.replay=function(e){if(!this.$inReplay&&this.macro){if(this.recording)return this.toggleRecording(e);try{this.$inReplay=!0,this.macro.forEach((function(t){"string"==typeof t?this.exec(t,e):this.exec(t[0],e,t[1])}),this)}finally{this.$inReplay=!1}}},this.trimMacro=function(e){return e.map((function(e){return"string"!=typeof e[0]&&(e[0]=e[0].name),e[1]||(e=e[0]),e}))}}.call(s.prototype),t.CommandManager=s})),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],(function(e,t,n){"use strict";var r=e("../lib/lang"),i=e("../config"),o=e("../range").Range;function s(e,t){return{win:e,mac:t}}t.commands=[{name:"showSettingsMenu",bindKey:s("Ctrl-,","Command-,"),exec:function(e){i.loadModule("ace/ext/settings_menu",(function(t){t.init(e),e.showSettingsMenu()}))},readOnly:!0},{name:"goToNextError",bindKey:s("Alt-E","F4"),exec:function(e){i.loadModule("./ext/error_marker",(function(t){t.showErrorMarker(e,1)}))},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",bindKey:s("Alt-Shift-E","Shift-F4"),exec:function(e){i.loadModule("./ext/error_marker",(function(t){t.showErrorMarker(e,-1)}))},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:s("Ctrl-A","Command-A"),exec:function(e){e.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:s(null,"Ctrl-L"),exec:function(e){e.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:s("Ctrl-L","Command-L"),exec:function(e,t){"number"!=typeof t||isNaN(t)||e.gotoLine(t),e.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:s("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(e){e.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:s("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(e){e.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",bindKey:s("F2","F2"),exec:function(e){e.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",bindKey:s("Alt-F2","Alt-F2"),exec:function(e){e.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:s(null,"Ctrl-Command-Option-0"),exec:function(e){e.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:s("Alt-0","Command-Option-0"),exec:function(e){e.session.foldAll(),e.session.unfold(e.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:s("Alt-Shift-0","Command-Option-Shift-0"),exec:function(e){e.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:s("Ctrl-K","Command-G"),exec:function(e){e.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:s("Ctrl-Shift-K","Command-Shift-G"),exec:function(e){e.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:s("Alt-K","Ctrl-G"),exec:function(e){e.selection.isEmpty()?e.selection.selectWord():e.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:s("Alt-Shift-K","Ctrl-Shift-G"),exec:function(e){e.selection.isEmpty()?e.selection.selectWord():e.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:s("Ctrl-F","Command-F"),exec:function(e){i.loadModule("ace/ext/searchbox",(function(t){t.Search(e)}))},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(e){e.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:s("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(e){e.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",description:"Go to start",bindKey:s("Ctrl-Home","Command-Home|Command-Up"),exec:function(e){e.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",description:"Select up",bindKey:s("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(e){e.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:s("Up","Up|Ctrl-P"),exec:function(e,t){e.navigateUp(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",description:"Select to end",bindKey:s("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(e){e.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",description:"Go to end",bindKey:s("Ctrl-End","Command-End|Command-Down"),exec:function(e){e.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",description:"Select down",bindKey:s("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(e){e.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:s("Down","Down|Ctrl-N"),exec:function(e,t){e.navigateDown(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:s("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(e){e.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:s("Ctrl-Left","Option-Left"),exec:function(e){e.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:s("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(e){e.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",description:"Go to line start",bindKey:s("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(e){e.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:s("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(e){e.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:s("Left","Left|Ctrl-B"),exec:function(e,t){e.navigateLeft(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:s("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(e){e.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:s("Ctrl-Right","Option-Right"),exec:function(e){e.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:s("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(e){e.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",description:"Go to line end",bindKey:s("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(e){e.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:s("Shift-Right","Shift-Right"),exec:function(e){e.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:s("Right","Right|Ctrl-F"),exec:function(e,t){e.navigateRight(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(e){e.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:s(null,"Option-PageDown"),exec:function(e){e.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:s("PageDown","PageDown|Ctrl-V"),exec:function(e){e.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(e){e.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:s(null,"Option-PageUp"),exec:function(e){e.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(e){e.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:s("Ctrl-Up",null),exec:function(e){e.renderer.scrollBy(0,-2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:s("Ctrl-Down",null),exec:function(e){e.renderer.scrollBy(0,2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(e){e.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(e){e.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:s("Ctrl-Alt-E","Command-Option-E"),exec:function(e){e.commands.toggleRecording(e)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:s("Ctrl-Shift-E","Command-Shift-E"),exec:function(e){e.commands.replay(e)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:s("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(e){e.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:s("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(e){e.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:s("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(e){e.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",description:"Pass keys to browser",bindKey:s(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",description:"Copy",exec:function(e){},readOnly:!0},{name:"cut",description:"Cut",exec:function(e){var t=e.$copyWithEmptySelection&&e.selection.isEmpty()?e.selection.getLineRange():e.selection.getRange();e._emit("cut",t),t.isEmpty()||e.session.remove(t),e.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(e,t){e.$handlePaste(t)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:s("Ctrl-D","Command-D"),exec:function(e){e.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:s("Ctrl-Shift-D","Command-Shift-D"),exec:function(e){e.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:s("Ctrl-Alt-S","Command-Alt-S"),exec:function(e){e.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:s("Ctrl-/","Command-/"),exec:function(e){e.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:s("Ctrl-Shift-/","Command-Shift-/"),exec:function(e){e.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:s("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(e){e.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:s("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(e){e.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:s("Ctrl-H","Command-Option-F"),exec:function(e){i.loadModule("ace/ext/searchbox",(function(t){t.Search(e,!0)}))}},{name:"undo",description:"Undo",bindKey:s("Ctrl-Z","Command-Z"),exec:function(e){e.undo()}},{name:"redo",description:"Redo",bindKey:s("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(e){e.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:s("Alt-Shift-Up","Command-Option-Up"),exec:function(e){e.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:s("Alt-Up","Option-Up"),exec:function(e){e.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:s("Alt-Shift-Down","Command-Option-Down"),exec:function(e){e.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:s("Alt-Down","Option-Down"),exec:function(e){e.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:s("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(e){e.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:s("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(e){e.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:s("Shift-Delete",null),exec:function(e){if(!e.selection.isEmpty())return!1;e.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:s("Alt-Backspace","Command-Backspace"),exec:function(e){e.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:s("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(e){e.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:s("Ctrl-Shift-Backspace",null),exec:function(e){var t=e.selection.getRange();t.start.column=0,e.session.remove(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:s("Ctrl-Shift-Delete",null),exec:function(e){var t=e.selection.getRange();t.end.column=Number.MAX_VALUE,e.session.remove(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:s("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(e){e.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:s("Ctrl-Delete","Alt-Delete"),exec:function(e){e.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:s("Shift-Tab","Shift-Tab"),exec:function(e){e.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:s("Tab","Tab"),exec:function(e){e.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:s("Ctrl-[","Ctrl-["),exec:function(e){e.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:s("Ctrl-]","Ctrl-]"),exec:function(e){e.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(e,t){e.insert(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(e,t){e.insert(r.stringRepeat(t.text||"",t.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:s(null,"Ctrl-O"),exec:function(e){e.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:s("Alt-Shift-X","Ctrl-T"),exec:function(e){e.transposeLetters()},multiSelectAction:function(e){e.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:s("Ctrl-U","Ctrl-U"),exec:function(e){e.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:s("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(e){e.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:s(null,null),exec:function(e){e.autoIndent()},multiSelectAction:"forEachLine",scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:s("Ctrl-Shift-L","Command-Shift-L"),exec:function(e){var t=e.selection.getRange();t.start.column=t.end.column=0,t.end.row++,e.selection.setRange(t,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"joinlines",description:"Join lines",bindKey:s(null,null),exec:function(e){for(var t=e.selection.isBackwards(),n=t?e.selection.getSelectionLead():e.selection.getSelectionAnchor(),i=t?e.selection.getSelectionAnchor():e.selection.getSelectionLead(),s=e.session.doc.getLine(n.row).length,a=e.session.doc.getTextRange(e.selection.getRange()).replace(/\n\s*/," ").length,l=e.session.doc.getLine(n.row),c=n.row+1;c<=i.row+1;c++){var u=r.stringTrimLeft(r.stringTrimRight(e.session.doc.getLine(c)));0!==u.length&&(u=" "+u),l+=u}i.row+1<e.session.doc.getLength()-1&&(l+=e.session.doc.getNewLineCharacter()),e.clearSelection(),e.session.doc.replace(new o(n.row,0,i.row+2,0),l),a>0?(e.selection.moveCursorTo(n.row,n.column),e.selection.selectTo(n.row,n.column+a)):(s=e.session.doc.getLine(n.row).length>s?s+1:s,e.selection.moveCursorTo(n.row,s))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:s(null,null),exec:function(e){var t=e.session.doc.getLength()-1,n=e.session.doc.getLine(t).length,r=e.selection.rangeList.ranges,i=[];r.length<1&&(r=[e.selection.getRange()]);for(var s=0;s<r.length;s++)s==r.length-1&&(r[s].end.row===t&&r[s].end.column===n||i.push(new o(r[s].end.row,r[s].end.column,t,n))),0===s?0===r[s].start.row&&0===r[s].start.column||i.push(new o(0,0,r[s].start.row,r[s].start.column)):i.push(new o(r[s-1].end.row,r[s-1].end.column,r[s].start.row,r[s].start.column));e.exitMultiSelectMode(),e.clearSelection();for(s=0;s<i.length;s++)e.selection.addRange(i[s],!1)},readOnly:!0,scrollIntoView:"none"},{name:"addLineAfter",exec:function(e){e.selection.clearSelection(),e.navigateLineEnd(),e.insert("\n")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"addLineBefore",exec:function(e){e.selection.clearSelection();var t=e.getCursorPosition();e.selection.moveTo(t.row-1,Number.MAX_VALUE),e.insert("\n"),0===t.row&&e.navigateUp()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"openCommandPallete",description:"Open command pallete",bindKey:s("F1","F1"),exec:function(e){e.prompt({$type:"commands"})},readOnly:!0},{name:"modeSelect",description:"Change language mode...",bindKey:s(null,null),exec:function(e){e.prompt({$type:"modes"})},readOnly:!0}]})),ace.define("ace/editor",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/keyboard/textinput","ace/mouse/mouse_handler","ace/mouse/fold_handler","ace/keyboard/keybinding","ace/edit_session","ace/search","ace/range","ace/lib/event_emitter","ace/commands/command_manager","ace/commands/default_commands","ace/config","ace/token_iterator","ace/clipboard"],(function(e,t,n){"use strict";e("./lib/fixoldbrowsers");var i=e("./lib/oop"),o=e("./lib/dom"),s=e("./lib/lang"),a=e("./lib/useragent"),l=e("./keyboard/textinput").TextInput,c=e("./mouse/mouse_handler").MouseHandler,u=e("./mouse/fold_handler").FoldHandler,h=e("./keyboard/keybinding").KeyBinding,d=e("./edit_session").EditSession,p=e("./search").Search,f=e("./range").Range,m=e("./lib/event_emitter").EventEmitter,g=e("./commands/command_manager").CommandManager,v=e("./commands/default_commands").commands,b=e("./config"),y=e("./token_iterator").TokenIterator,w=e("./clipboard"),k=function e(t,n,i){this.$toDestroy=[];var o=t.getContainerElement();this.container=o,this.renderer=t,this.id="editor"+ ++e.$uid,this.commands=new g(a.isMac?"mac":"win",v),"object"==("undefined"==typeof document?"undefined":r(document))&&(this.textInput=new l(t.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new c(this),new u(this)),this.keyBinding=new h(this),this.$search=(new p).set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=s.delayedCall(function(){this._signal("input",{}),this.session&&this.session.bgTokenizer&&this.session.bgTokenizer.scheduleStart()}.bind(this)),this.on("change",(function(e,t){t._$emitInputEvent.schedule(31)})),this.setSession(n||i&&i.session||new d("")),b.resetOptions(this),i&&this.setOptions(i),b._signal("editor",this)};k.$uid=0,function(){i.implement(this,m),this.$initOperationListeners=function(){this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0),this.$opResetTimer=s.delayedCall(this.endOperation.bind(this,!0)),this.on("change",function(){this.curOp||(this.startOperation(),this.curOp.selectionBefore=this.$lastSel),this.curOp.docChanged=!0}.bind(this),!0),this.on("changeSelection",function(){this.curOp||(this.startOperation(),this.curOp.selectionBefore=this.$lastSel),this.curOp.selectionChanged=!0}.bind(this),!0)},this.curOp=null,this.prevOp={},this.startOperation=function(e){if(this.curOp){if(!e||this.curOp.command)return;this.prevOp=this.curOp}e||(this.previousCommand=null,e={}),this.$opResetTimer.schedule(),this.curOp=this.session.curOp={command:e.command||{},args:e.args,scrollTop:this.renderer.scrollTop},this.curOp.selectionBefore=this.selection.toJSON()},this.endOperation=function(e){if(this.curOp&&this.session){if(e&&!1===e.returnValue||!this.session)return this.curOp=null;if(1==e&&this.curOp.command&&"mouse"==this.curOp.command.name)return;if(this._signal("beforeEndOperation"),!this.curOp)return;var t=this.curOp.command,n=t&&t.scrollIntoView;if(n){switch(n){case"center-animate":n="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var r=this.selection.getRange(),i=this.renderer.layerConfig;(r.start.row>=i.lastRow||r.end.row<=i.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead)}"animate"==n&&this.renderer.animateScrolling(this.curOp.scrollTop)}var o=this.selection.toJSON();this.curOp.selectionAfter=o,this.$lastSel=this.selection.toJSON(),this.session.getUndoManager().addSelection(o),this.prevOp=this.curOp,this.curOp=null}},this.$mergeableCommands=["backspace","del","insertstring"],this.$historyTracker=function(e){if(this.$mergeUndoDeltas){var t=this.prevOp,n=this.$mergeableCommands,r=t.command&&e.command.name==t.command.name;if("insertstring"==e.command.name){var i=e.args;void 0===this.mergeNextCommand&&(this.mergeNextCommand=!0),r=r&&this.mergeNextCommand&&(!/\s/.test(i)||/\s/.test(t.args)),this.mergeNextCommand=!0}else r=r&&-1!==n.indexOf(e.command.name);"always"!=this.$mergeUndoDeltas&&Date.now()-this.sequenceStartTime>2e3&&(r=!1),r?this.session.mergeUndoDeltas=!0:-1!==n.indexOf(e.command.name)&&(this.sequenceStartTime=Date.now())}},this.setKeyboardHandler=function(e,t){if(e&&"string"==typeof e&&"ace"!=e){this.$keybindingId=e;var n=this;b.loadModule(["keybinding",e],(function(r){n.$keybindingId==e&&n.keyBinding.setKeyboardHandler(r&&r.handler),t&&t()}))}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(e),t&&t()},this.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},this.setSession=function(e){if(this.session!=e){this.curOp&&this.endOperation(),this.curOp={};var t=this.session;if(t){this.session.off("change",this.$onDocumentChange),this.session.off("changeMode",this.$onChangeMode),this.session.off("tokenizerUpdate",this.$onTokenizerUpdate),this.session.off("changeTabSize",this.$onChangeTabSize),this.session.off("changeWrapLimit",this.$onChangeWrapLimit),this.session.off("changeWrapMode",this.$onChangeWrapMode),this.session.off("changeFold",this.$onChangeFold),this.session.off("changeFrontMarker",this.$onChangeFrontMarker),this.session.off("changeBackMarker",this.$onChangeBackMarker),this.session.off("changeBreakpoint",this.$onChangeBreakpoint),this.session.off("changeAnnotation",this.$onChangeAnnotation),this.session.off("changeOverwrite",this.$onCursorChange),this.session.off("changeScrollTop",this.$onScrollTopChange),this.session.off("changeScrollLeft",this.$onScrollLeftChange);var n=this.session.getSelection();n.off("changeCursor",this.$onCursorChange),n.off("changeSelection",this.$onSelectionChange)}this.session=e,e?(this.$onDocumentChange=this.onDocumentChange.bind(this),e.on("change",this.$onDocumentChange),this.renderer.setSession(e),this.$onChangeMode=this.onChangeMode.bind(this),e.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),e.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),e.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),e.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),e.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),e.on("changeFold",this.$onChangeFold),this.$onChangeFrontMarker=this.onChangeFrontMarker.bind(this),this.session.on("changeFrontMarker",this.$onChangeFrontMarker),this.$onChangeBackMarker=this.onChangeBackMarker.bind(this),this.session.on("changeBackMarker",this.$onChangeBackMarker),this.$onChangeBreakpoint=this.onChangeBreakpoint.bind(this),this.session.on("changeBreakpoint",this.$onChangeBreakpoint),this.$onChangeAnnotation=this.onChangeAnnotation.bind(this),this.session.on("changeAnnotation",this.$onChangeAnnotation),this.$onCursorChange=this.onCursorChange.bind(this),this.session.on("changeOverwrite",this.$onCursorChange),this.$onScrollTopChange=this.onScrollTopChange.bind(this),this.session.on("changeScrollTop",this.$onScrollTopChange),this.$onScrollLeftChange=this.onScrollLeftChange.bind(this),this.session.on("changeScrollLeft",this.$onScrollLeftChange),this.selection=e.getSelection(),this.selection.on("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.onChangeMode(),this.onCursorChange(),this.onScrollTopChange(),this.onScrollLeftChange(),this.onSelectionChange(),this.onChangeFrontMarker(),this.onChangeBackMarker(),this.onChangeBreakpoint(),this.onChangeAnnotation(),this.session.getUseWrapMode()&&this.renderer.adjustWrapLimit(),this.renderer.updateFull()):(this.selection=null,this.renderer.setSession(e)),this._signal("changeSession",{session:e,oldSession:t}),this.curOp=null,t&&t._signal("changeEditor",{oldEditor:this}),e&&e._signal("changeEditor",{editor:this}),e&&e.bgTokenizer&&e.bgTokenizer.scheduleStart()}},this.getSession=function(){return this.session},this.setValue=function(e,t){return this.session.doc.setValue(e),t?1==t?this.navigateFileEnd():-1==t&&this.navigateFileStart():this.selectAll(),e},this.getValue=function(){return this.session.getValue()},this.getSelection=function(){return this.selection},this.resize=function(e){this.renderer.onResize(e)},this.setTheme=function(e,t){this.renderer.setTheme(e,t)},this.getTheme=function(){return this.renderer.getTheme()},this.setStyle=function(e){this.renderer.setStyle(e)},this.unsetStyle=function(e){this.renderer.unsetStyle(e)},this.getFontSize=function(){return this.getOption("fontSize")||o.computedStyle(this.container).fontSize},this.setFontSize=function(e){this.setOption("fontSize",e)},this.$highlightBrackets=function(){if(!this.$highlightPending){var e=this;this.$highlightPending=!0,setTimeout((function(){e.$highlightPending=!1;var t=e.session;if(t&&t.bgTokenizer){t.$bracketHighlight&&(t.$bracketHighlight.markerIds.forEach((function(e){t.removeMarker(e)})),t.$bracketHighlight=null);var n=t.getMatchingBracketRanges(e.getCursorPosition());if(!n&&t.$mode.getMatching&&(n=t.$mode.getMatching(e.session)),n){var r="ace_bracket";Array.isArray(n)?1==n.length&&(r="ace_error_bracket"):n=[n],2==n.length&&(0==f.comparePoints(n[0].end,n[1].start)?n=[f.fromPoints(n[0].start,n[1].end)]:0==f.comparePoints(n[0].start,n[1].end)&&(n=[f.fromPoints(n[1].start,n[0].end)])),t.$bracketHighlight={ranges:n,markerIds:n.map((function(e){return t.addMarker(e,r,"text")}))}}}}),50)}},this.$highlightTags=function(){if(!this.$highlightTagPending){var e=this;this.$highlightTagPending=!0,setTimeout((function(){e.$highlightTagPending=!1;var t=e.session;if(t&&t.bgTokenizer){var n=e.getCursorPosition(),r=new y(e.session,n.row,n.column),i=r.getCurrentToken();if(!i||!/\b(?:tag-open|tag-name)/.test(i.type))return t.removeMarker(t.$tagHighlight),void(t.$tagHighlight=null);if(-1==i.type.indexOf("tag-open")||(i=r.stepForward())){var o=i.value,s=0,a=r.stepBackward();if("<"==a.value)do{a=i,(i=r.stepForward())&&i.value===o&&-1!==i.type.indexOf("tag-name")&&("<"===a.value?s++:"</"===a.value&&s--)}while(i&&s>=0);else{do{i=a,a=r.stepBackward(),i&&i.value===o&&-1!==i.type.indexOf("tag-name")&&("<"===a.value?s++:"</"===a.value&&s--)}while(a&&s<=0);r.stepForward()}if(!i)return t.removeMarker(t.$tagHighlight),void(t.$tagHighlight=null);var l=r.getCurrentTokenRow(),c=r.getCurrentTokenColumn(),u=new f(l,c,l,c+i.value.length),h=t.$backMarkers[t.$tagHighlight];t.$tagHighlight&&null!=h&&0!==u.compareRange(h.range)&&(t.removeMarker(t.$tagHighlight),t.$tagHighlight=null),t.$tagHighlight||(t.$tagHighlight=t.addMarker(u,"ace_bracket","text"))}}}),50)}},this.focus=function(){var e=this;setTimeout((function(){e.isFocused()||e.textInput.focus()})),this.textInput.focus()},this.isFocused=function(){return this.textInput.isFocused()},this.blur=function(){this.textInput.blur()},this.onFocus=function(e){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",e))},this.onBlur=function(e){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",e))},this.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$highlightTags(),this.$updateHighlightActiveLine()},this.onDocumentChange=function(e){var t=this.session.$useWrapMode,n=e.start.row==e.end.row?e.end.row:1/0;this.renderer.updateLines(e.start.row,n,t),this._signal("change",e),this.$cursorChange()},this.onTokenizerUpdate=function(e){var t=e.data;this.renderer.updateLines(t.first,t.last)},this.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},this.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},this.onCursorChange=function(){this.$cursorChange(),this._signal("changeSelection")},this.$updateHighlightActiveLine=function(){var e,t=this.getSession();if(this.$highlightActiveLine&&("line"==this.$selectionStyle&&this.selection.isMultiLine()||(e=this.getCursorPosition()),this.renderer.theme&&this.renderer.theme.$selectionColorConflict&&!this.selection.isEmpty()&&(e=!1),!this.renderer.$maxLines||1!==this.session.getLength()||this.renderer.$minLines>1||(e=!1)),t.$highlightLineMarker&&!e)t.removeMarker(t.$highlightLineMarker.id),t.$highlightLineMarker=null;else if(!t.$highlightLineMarker&&e){var n=new f(e.row,e.column,e.row,1/0);n.id=t.addMarker(n,"ace_active-line","screenLine"),t.$highlightLineMarker=n}else e&&(t.$highlightLineMarker.start.row=e.row,t.$highlightLineMarker.end.row=e.row,t.$highlightLineMarker.start.column=e.column,t._signal("changeBackMarker"))},this.onSelectionChange=function(e){var t=this.session;if(t.$selectionMarker&&t.removeMarker(t.$selectionMarker),t.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var n=this.selection.getRange(),r=this.getSelectionStyle();t.$selectionMarker=t.addMarker(n,"ace_selection",r)}var i=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(i),this._signal("changeSelection")},this.$getSelectionHighLightRegexp=function(){var e=this.session,t=this.getSelectionRange();if(!t.isEmpty()&&!t.isMultiLine()){var n=t.start.column,r=t.end.column,i=e.getLine(t.start.row),o=i.substring(n,r);if(!(o.length>5e3)&&/[\w\d]/.test(o)){var s=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:o}),a=i.substring(n-1,r+1);if(s.test(a))return s}}},this.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},this.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},this.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},this.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},this.onChangeMode=function(e){this.renderer.updateText(),this._emit("changeMode",e)},this.onChangeWrapLimit=function(){this.renderer.updateFull()},this.onChangeWrapMode=function(){this.renderer.onResize(!0)},this.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},this.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},this.getCopyText=function(){var e=this.getSelectedText(),t=this.session.doc.getNewLineCharacter(),n=!1;if(!e&&this.$copyWithEmptySelection){n=!0;for(var r=this.selection.getAllRanges(),i=0;i<r.length;i++){var o=r[i];i&&r[i-1].start.row==o.start.row||(e+=this.session.getLine(o.start.row)+t)}}var s={text:e};return this._signal("copy",s),w.lineMode=n?s.text:"",s.text},this.onCopy=function(){this.commands.exec("copy",this)},this.onCut=function(){this.commands.exec("cut",this)},this.onPaste=function(e,t){var n={text:e,event:t};this.commands.exec("paste",this,n)},this.$handlePaste=function(e){"string"==typeof e&&(e={text:e}),this._signal("paste",e);var t=e.text,n=t==w.lineMode,r=this.session;if(!this.inMultiSelectMode||this.inVirtualSelectionMode)n?r.insert({row:this.selection.lead.row,column:0},t):this.insert(t);else if(n)this.selection.rangeList.ranges.forEach((function(e){r.insert({row:e.start.row,column:0},t)}));else{var i=t.split(/\r\n|\r|\n/),o=this.selection.rangeList.ranges,s=!(2!=i.length||i[0]&&i[1]);if(i.length!=o.length||s)return this.commands.exec("insertstring",this,t);for(var a=o.length;a--;){var l=o[a];l.isEmpty()||r.remove(l),r.insert(l.start,i[a])}}},this.execCommand=function(e,t){return this.commands.exec(e,this,t)},this.insert=function(e,t){var n=this.session,r=n.getMode(),i=this.getCursorPosition();if(this.getBehavioursEnabled()&&!t){var o=r.transformAction(n.getState(i.row),"insertion",this,n,e);o&&(e!==o.text&&(this.inVirtualSelectionMode||(this.session.mergeUndoDeltas=!1,this.mergeNextCommand=!1)),e=o.text)}if("\t"==e&&(e=this.session.getTabString()),this.selection.isEmpty()){if(this.session.getOverwrite()&&-1==e.indexOf("\n")){(s=new f.fromPoints(i,i)).end.column+=e.length,this.session.remove(s)}}else{var s=this.getSelectionRange();i=this.session.remove(s),this.clearSelection()}if("\n"==e||"\r\n"==e){var a=n.getLine(i.row);if(i.column>a.search(/\S|$/)){var l=a.substr(i.column).search(/\S|$/);n.doc.removeInLine(i.row,i.column,i.column+l)}}this.clearSelection();var c=i.column,u=n.getState(i.row),h=(a=n.getLine(i.row),r.checkOutdent(u,a,e));if(n.insert(i,e),o&&o.selection&&(2==o.selection.length?this.selection.setSelectionRange(new f(i.row,c+o.selection[0],i.row,c+o.selection[1])):this.selection.setSelectionRange(new f(i.row+o.selection[0],o.selection[1],i.row+o.selection[2],o.selection[3]))),this.$enableAutoIndent){if(n.getDocument().isNewLine(e)){var d=r.getNextLineIndent(u,a.slice(0,i.column),n.getTabString());n.insert({row:i.row+1,column:0},d)}h&&r.autoOutdent(u,n,i.row)}},this.autoIndent=function(){var e,t,n=this.session,r=n.getMode();if(this.selection.isEmpty())e=0,t=n.doc.getLength()-1;else{var i=this.getSelectionRange();e=i.start.row,t=i.end.row}for(var o,s,a,l="",c="",u="",h=n.getTabString(),d=e;d<=t;d++)d>0&&(l=n.getState(d-1),c=n.getLine(d-1),u=r.getNextLineIndent(l,c,h)),o=n.getLine(d),u!==(s=r.$getIndent(o))&&(s.length>0&&(a=new f(d,0,d,s.length),n.remove(a)),u.length>0&&n.insert({row:d,column:0},u)),r.autoOutdent(l,n,d)},this.onTextInput=function(e,t){if(!t)return this.keyBinding.onTextInput(e);this.startOperation({command:{name:"insertstring"}});var n=this.applyComposition.bind(this,e,t);this.selection.rangeCount?this.forEachSelection(n):n(),this.endOperation()},this.applyComposition=function(e,t){var n;(t.extendLeft||t.extendRight)&&((n=this.selection.getRange()).start.column-=t.extendLeft,n.end.column+=t.extendRight,n.start.column<0&&(n.start.row--,n.start.column+=this.session.getLine(n.start.row).length+1),this.selection.setRange(n),e||n.isEmpty()||this.remove());(!e&&this.selection.isEmpty()||this.insert(e,!0),t.restoreStart||t.restoreEnd)&&((n=this.selection.getRange()).start.column-=t.restoreStart,n.end.column-=t.restoreEnd,this.selection.setRange(n))},this.onCommandKey=function(e,t,n){return this.keyBinding.onCommandKey(e,t,n)},this.setOverwrite=function(e){this.session.setOverwrite(e)},this.getOverwrite=function(){return this.session.getOverwrite()},this.toggleOverwrite=function(){this.session.toggleOverwrite()},this.setScrollSpeed=function(e){this.setOption("scrollSpeed",e)},this.getScrollSpeed=function(){return this.getOption("scrollSpeed")},this.setDragDelay=function(e){this.setOption("dragDelay",e)},this.getDragDelay=function(){return this.getOption("dragDelay")},this.setSelectionStyle=function(e){this.setOption("selectionStyle",e)},this.getSelectionStyle=function(){return this.getOption("selectionStyle")},this.setHighlightActiveLine=function(e){this.setOption("highlightActiveLine",e)},this.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},this.setHighlightGutterLine=function(e){this.setOption("highlightGutterLine",e)},this.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},this.setHighlightSelectedWord=function(e){this.setOption("highlightSelectedWord",e)},this.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},this.setAnimatedScroll=function(e){this.renderer.setAnimatedScroll(e)},this.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},this.setShowInvisibles=function(e){this.renderer.setShowInvisibles(e)},this.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},this.setDisplayIndentGuides=function(e){this.renderer.setDisplayIndentGuides(e)},this.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},this.setShowPrintMargin=function(e){this.renderer.setShowPrintMargin(e)},this.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},this.setPrintMarginColumn=function(e){this.renderer.setPrintMarginColumn(e)},this.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},this.setReadOnly=function(e){this.setOption("readOnly",e)},this.getReadOnly=function(){return this.getOption("readOnly")},this.setBehavioursEnabled=function(e){this.setOption("behavioursEnabled",e)},this.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},this.setWrapBehavioursEnabled=function(e){this.setOption("wrapBehavioursEnabled",e)},this.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},this.setShowFoldWidgets=function(e){this.setOption("showFoldWidgets",e)},this.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},this.setFadeFoldWidgets=function(e){this.setOption("fadeFoldWidgets",e)},this.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},this.remove=function(e){this.selection.isEmpty()&&("left"==e?this.selection.selectLeft():this.selection.selectRight());var t=this.getSelectionRange();if(this.getBehavioursEnabled()){var n=this.session,r=n.getState(t.start.row),i=n.getMode().transformAction(r,"deletion",this,n,t);if(0===t.end.column){var o=n.getTextRange(t);if("\n"==o[o.length-1]){var s=n.getLine(t.end.row);/^\s+$/.test(s)&&(t.end.column=s.length)}}i&&(t=i)}this.session.remove(t),this.clearSelection()},this.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var e=this.getSelectionRange();e.start.column==e.end.column&&e.start.row==e.end.row&&(e.end.column=0,e.end.row++),this.session.remove(e),this.clearSelection()},this.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var e=this.getCursorPosition();this.insert("\n"),this.moveCursorToPosition(e)},this.transposeLetters=function(){if(this.selection.isEmpty()){var e=this.getCursorPosition(),t=e.column;if(0!==t){var n,r,i=this.session.getLine(e.row);t<i.length?(n=i.charAt(t)+i.charAt(t-1),r=new f(e.row,t-1,e.row,t+1)):(n=i.charAt(t-1)+i.charAt(t-2),r=new f(e.row,t-2,e.row,t)),this.session.replace(r,n),this.session.selection.moveToPosition(r.end)}}},this.toLowerCase=function(){var e=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var t=this.getSelectionRange(),n=this.session.getTextRange(t);this.session.replace(t,n.toLowerCase()),this.selection.setSelectionRange(e)},this.toUpperCase=function(){var e=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var t=this.getSelectionRange(),n=this.session.getTextRange(t);this.session.replace(t,n.toUpperCase()),this.selection.setSelectionRange(e)},this.indent=function(){var e=this.session,t=this.getSelectionRange();if(!(t.start.row<t.end.row)){if(t.start.column<t.end.column){var n=e.getTextRange(t);if(!/^\s+$/.test(n)){u=this.$getSelectedRows();return void e.indentRows(u.first,u.last,"\t")}}var r=e.getLine(t.start.row),i=t.start,o=e.getTabSize(),a=e.documentToScreenColumn(i.row,i.column);if(this.session.getUseSoftTabs())var l=o-a%o,c=s.stringRepeat(" ",l);else{for(l=a%o;" "==r[t.start.column-1]&&l;)t.start.column--,l--;this.selection.setSelectionRange(t),c="\t"}return this.insert(c)}var u=this.$getSelectedRows();e.indentRows(u.first,u.last,"\t")},this.blockIndent=function(){var e=this.$getSelectedRows();this.session.indentRows(e.first,e.last,"\t")},this.blockOutdent=function(){var e=this.session.getSelection();this.session.outdentRows(e.getRange())},this.sortLines=function(){for(var e=this.$getSelectedRows(),t=this.session,n=[],r=e.first;r<=e.last;r++)n.push(t.getLine(r));n.sort((function(e,t){return e.toLowerCase()<t.toLowerCase()?-1:e.toLowerCase()>t.toLowerCase()?1:0}));var i=new f(0,0,0,0);for(r=e.first;r<=e.last;r++){var o=t.getLine(r);i.start.row=r,i.end.row=r,i.end.column=o.length,t.replace(i,n[r-e.first])}},this.toggleCommentLines=function(){var e=this.session.getState(this.getCursorPosition().row),t=this.$getSelectedRows();this.session.getMode().toggleCommentLines(e,this.session,t.first,t.last)},this.toggleBlockComment=function(){var e=this.getCursorPosition(),t=this.session.getState(e.row),n=this.getSelectionRange();this.session.getMode().toggleBlockComment(t,this.session,n,e)},this.getNumberAt=function(e,t){var n=/[\-]?[0-9]+(?:\.[0-9]+)?/g;n.lastIndex=0;for(var r=this.session.getLine(e);n.lastIndex<t;){var i=n.exec(r);if(i.index<=t&&i.index+i[0].length>=t)return{value:i[0],start:i.index,end:i.index+i[0].length}}return null},this.modifyNumber=function(e){var t=this.selection.getCursor().row,n=this.selection.getCursor().column,r=new f(t,n-1,t,n),i=this.session.getTextRange(r);if(!isNaN(parseFloat(i))&&isFinite(i)){var o=this.getNumberAt(t,n);if(o){var s=o.value.indexOf(".")>=0?o.start+o.value.indexOf(".")+1:o.end,a=o.start+o.value.length-s,l=parseFloat(o.value);l*=Math.pow(10,a),s!==o.end&&n<s?e*=Math.pow(10,o.end-n-1):e*=Math.pow(10,o.end-n),l+=e;var c=(l/=Math.pow(10,a)).toFixed(a),u=new f(t,o.start,t,o.end);this.session.replace(u,c),this.moveCursorTo(t,Math.max(o.start+1,n+c.length-o.value.length))}}else this.toggleWord()},this.$toggleWordPairs=[["first","last"],["true","false"],["yes","no"],["width","height"],["top","bottom"],["right","left"],["on","off"],["x","y"],["get","set"],["max","min"],["horizontal","vertical"],["show","hide"],["add","remove"],["up","down"],["before","after"],["even","odd"],["in","out"],["inside","outside"],["next","previous"],["increase","decrease"],["attach","detach"],["&&","||"],["==","!="]],this.toggleWord=function(){var e=this.selection.getCursor().row,t=this.selection.getCursor().column;this.selection.selectWord();var n=this.getSelectedText(),r=this.selection.getWordRange().start.column,i=n.replace(/([a-z]+|[A-Z]+)(?=[A-Z_]|$)/g,"$1 ").split(/\s/),o=t-r-1;o<0&&(o=0);var a=0,l=0,c=this;n.match(/[A-Za-z0-9_]+/)&&i.forEach((function(t,i){l=a+t.length,o>=a&&o<=l&&(n=t,c.selection.clearSelection(),c.moveCursorTo(e,a+r),c.selection.selectTo(e,l+r)),a=l}));for(var u,h=this.$toggleWordPairs,d=0;d<h.length;d++)for(var p=h[d],f=0;f<=1;f++){var m=+!f,g=n.match(new RegExp("^\\s?_?("+s.escapeRegExp(p[f])+")\\s?$","i"));if(g)n.match(new RegExp("([_]|^|\\s)("+s.escapeRegExp(g[1])+")($|\\s)","g"))&&(u=n.replace(new RegExp(s.escapeRegExp(p[f]),"i"),(function(e){var t=p[m];return e.toUpperCase()==e?t=t.toUpperCase():e.charAt(0).toUpperCase()==e.charAt(0)&&(t=t.substr(0,0)+p[m].charAt(0).toUpperCase()+t.substr(1)),t})),this.insert(u),u="")}},this.removeLines=function(){var e=this.$getSelectedRows();this.session.removeFullLines(e.first,e.last),this.clearSelection()},this.duplicateSelection=function(){var e=this.selection,t=this.session,n=e.getRange(),r=e.isBackwards();if(n.isEmpty()){var i=n.start.row;t.duplicateLines(i,i)}else{var o=r?n.start:n.end,s=t.insert(o,t.getTextRange(n),!1);n.start=o,n.end=s,e.setSelectionRange(n,r)}},this.moveLinesDown=function(){this.$moveLines(1,!1)},this.moveLinesUp=function(){this.$moveLines(-1,!1)},this.moveText=function(e,t,n){return this.session.moveText(e,t,n)},this.copyLinesUp=function(){this.$moveLines(-1,!0)},this.copyLinesDown=function(){this.$moveLines(1,!0)},this.$moveLines=function(e,t){var n,r,i=this.selection;if(!i.inMultiSelectMode||this.inVirtualSelectionMode){var o=i.toOrientedRange();n=this.$getSelectedRows(o),r=this.session.$moveLines(n.first,n.last,t?0:e),t&&-1==e&&(r=0),o.moveBy(r,0),i.fromOrientedRange(o)}else{var s=i.rangeList.ranges;i.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var a=0,l=0,c=s.length,u=0;u<c;u++){var h=u;s[u].moveBy(a,0);for(var d=(n=this.$getSelectedRows(s[u])).first,p=n.last;++u<c;){l&&s[u].moveBy(l,0);var f=this.$getSelectedRows(s[u]);if(t&&f.first!=p)break;if(!t&&f.first>p+1)break;p=f.last}for(u--,a=this.session.$moveLines(d,p,t?0:e),t&&-1==e&&(h=u+1);h<=u;)s[h].moveBy(a,0),h++;t||(a=0),l+=a}i.fromOrientedRange(i.ranges[0]),i.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},this.$getSelectedRows=function(e){return e=(e||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(e.start.row),last:this.session.getRowFoldEnd(e.end.row)}},this.onCompositionStart=function(e){this.renderer.showComposition(e)},this.onCompositionUpdate=function(e){this.renderer.setCompositionText(e)},this.onCompositionEnd=function(){this.renderer.hideComposition()},this.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},this.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},this.isRowVisible=function(e){return e>=this.getFirstVisibleRow()&&e<=this.getLastVisibleRow()},this.isRowFullyVisible=function(e){return e>=this.renderer.getFirstFullyVisibleRow()&&e<=this.renderer.getLastFullyVisibleRow()},this.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},this.$moveByPage=function(e,t){var n=this.renderer,r=this.renderer.layerConfig,i=e*Math.floor(r.height/r.lineHeight);!0===t?this.selection.$moveSelection((function(){this.moveCursorBy(i,0)})):!1===t&&(this.selection.moveCursorBy(i,0),this.selection.clearSelection());var o=n.scrollTop;n.scrollBy(0,i*r.lineHeight),null!=t&&n.scrollCursorIntoView(null,.5),n.animateScrolling(o)},this.selectPageDown=function(){this.$moveByPage(1,!0)},this.selectPageUp=function(){this.$moveByPage(-1,!0)},this.gotoPageDown=function(){this.$moveByPage(1,!1)},this.gotoPageUp=function(){this.$moveByPage(-1,!1)},this.scrollPageDown=function(){this.$moveByPage(1)},this.scrollPageUp=function(){this.$moveByPage(-1)},this.scrollToRow=function(e){this.renderer.scrollToRow(e)},this.scrollToLine=function(e,t,n,r){this.renderer.scrollToLine(e,t,n,r)},this.centerSelection=function(){var e=this.getSelectionRange(),t={row:Math.floor(e.start.row+(e.end.row-e.start.row)/2),column:Math.floor(e.start.column+(e.end.column-e.start.column)/2)};this.renderer.alignCursor(t,.5)},this.getCursorPosition=function(){return this.selection.getCursor()},this.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},this.getSelectionRange=function(){return this.selection.getRange()},this.selectAll=function(){this.selection.selectAll()},this.clearSelection=function(){this.selection.clearSelection()},this.moveCursorTo=function(e,t){this.selection.moveCursorTo(e,t)},this.moveCursorToPosition=function(e){this.selection.moveCursorToPosition(e)},this.jumpToMatching=function(e,t){var n=this.getCursorPosition(),r=new y(this.session,n.row,n.column),i=r.getCurrentToken(),o=i||r.stepForward();if(o){var s,a,l=!1,c={},u=n.column-o.start,h={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(o.value.match(/[{}()\[\]]/g)){for(;u<o.value.length&&!l;u++)if(h[o.value[u]])switch(a=h[o.value[u]]+"."+o.type.replace("rparen","lparen"),isNaN(c[a])&&(c[a]=0),o.value[u]){case"(":case"[":case"{":c[a]++;break;case")":case"]":case"}":c[a]--,-1===c[a]&&(s="bracket",l=!0)}}else-1!==o.type.indexOf("tag-name")&&(isNaN(c[o.value])&&(c[o.value]=0),"<"===i.value?c[o.value]++:"</"===i.value&&c[o.value]--,-1===c[o.value]&&(s="tag",l=!0));l||(i=o,o=r.stepForward(),u=0)}while(o&&!l);if(s){var d,p;if("bracket"===s)(d=this.session.getBracketRange(n))||(p=(d=new f(r.getCurrentTokenRow(),r.getCurrentTokenColumn()+u-1,r.getCurrentTokenRow(),r.getCurrentTokenColumn()+u-1)).start,(t||p.row===n.row&&Math.abs(p.column-n.column)<2)&&(d=this.session.getBracketRange(p)));else if("tag"===s){if(!o||-1===o.type.indexOf("tag-name"))return;var m=o.value;if(0===(d=new f(r.getCurrentTokenRow(),r.getCurrentTokenColumn()-2,r.getCurrentTokenRow(),r.getCurrentTokenColumn()-2)).compare(n.row,n.column)){l=!1;do{o=i,(i=r.stepBackward())&&(-1!==i.type.indexOf("tag-close")&&d.setEnd(r.getCurrentTokenRow(),r.getCurrentTokenColumn()+1),o.value===m&&-1!==o.type.indexOf("tag-name")&&("<"===i.value?c[m]++:"</"===i.value&&c[m]--,0===c[m]&&(l=!0)))}while(i&&!l)}o&&o.type.indexOf("tag-name")&&(p=d.start).row==n.row&&Math.abs(p.column-n.column)<2&&(p=d.end)}(p=d&&d.cursor||p)&&(e?d&&t?this.selection.setRange(d):d&&d.isEqual(this.getSelectionRange())?this.clearSelection():this.selection.selectTo(p.row,p.column):this.selection.moveTo(p.row,p.column))}}},this.gotoLine=function(e,t,n){this.selection.clearSelection(),this.session.unfold({row:e-1,column:t||0}),this.exitMultiSelectMode&&this.exitMultiSelectMode(),this.moveCursorTo(e-1,t||0),this.isRowFullyVisible(e-1)||this.scrollToLine(e-1,!0,n)},this.navigateTo=function(e,t){this.selection.moveTo(e,t)},this.navigateUp=function(e){if(this.selection.isMultiLine()&&!this.selection.isBackwards()){var t=this.selection.anchor.getPosition();return this.moveCursorToPosition(t)}this.selection.clearSelection(),this.selection.moveCursorBy(-e||-1,0)},this.navigateDown=function(e){if(this.selection.isMultiLine()&&this.selection.isBackwards()){var t=this.selection.anchor.getPosition();return this.moveCursorToPosition(t)}this.selection.clearSelection(),this.selection.moveCursorBy(e||1,0)},this.navigateLeft=function(e){if(this.selection.isEmpty())for(e=e||1;e--;)this.selection.moveCursorLeft();else{var t=this.getSelectionRange().start;this.moveCursorToPosition(t)}this.clearSelection()},this.navigateRight=function(e){if(this.selection.isEmpty())for(e=e||1;e--;)this.selection.moveCursorRight();else{var t=this.getSelectionRange().end;this.moveCursorToPosition(t)}this.clearSelection()},this.navigateLineStart=function(){this.selection.moveCursorLineStart(),this.clearSelection()},this.navigateLineEnd=function(){this.selection.moveCursorLineEnd(),this.clearSelection()},this.navigateFileEnd=function(){this.selection.moveCursorFileEnd(),this.clearSelection()},this.navigateFileStart=function(){this.selection.moveCursorFileStart(),this.clearSelection()},this.navigateWordRight=function(){this.selection.moveCursorWordRight(),this.clearSelection()},this.navigateWordLeft=function(){this.selection.moveCursorWordLeft(),this.clearSelection()},this.replace=function(e,t){t&&this.$search.set(t);var n=this.$search.find(this.session),r=0;return n?(this.$tryReplace(n,e)&&(r=1),this.selection.setSelectionRange(n),this.renderer.scrollSelectionIntoView(n.start,n.end),r):r},this.replaceAll=function(e,t){t&&this.$search.set(t);var n=this.$search.findAll(this.session),r=0;if(!n.length)return r;var i=this.getSelectionRange();this.selection.moveTo(0,0);for(var o=n.length-1;o>=0;--o)this.$tryReplace(n[o],e)&&r++;return this.selection.setSelectionRange(i),r},this.$tryReplace=function(e,t){var n=this.session.getTextRange(e);return null!==(t=this.$search.replace(n,t))?(e.end=this.session.replace(e,t),e):null},this.getLastSearchOptions=function(){return this.$search.getOptions()},this.find=function(e,t,n){t||(t={}),"string"==typeof e||e instanceof RegExp?t.needle=e:"object"==r(e)&&i.mixin(t,e);var o=this.selection.getRange();null==t.needle&&((e=this.session.getTextRange(o)||this.$search.$options.needle)||(o=this.session.getWordRange(o.start.row,o.start.column),e=this.session.getTextRange(o)),this.$search.set({needle:e})),this.$search.set(t),t.start||this.$search.set({start:o});var s=this.$search.find(this.session);return t.preventScroll?s:s?(this.revealRange(s,n),s):(t.backwards?o.start=o.end:o.end=o.start,void this.selection.setRange(o))},this.findNext=function(e,t){this.find({skipCurrent:!0,backwards:!1},e,t)},this.findPrevious=function(e,t){this.find(e,{skipCurrent:!0,backwards:!0},t)},this.revealRange=function(e,t){this.session.unfold(e),this.selection.setSelectionRange(e);var n=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(e.start,e.end,.5),!1!==t&&this.renderer.animateScrolling(n)},this.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},this.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},this.destroy=function(){this.$toDestroy&&(this.$toDestroy.forEach((function(e){e.destroy()})),this.$toDestroy=null),this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy(),this._$emitInputEvent&&this._$emitInputEvent.cancel(),this.removeAllListeners()},this.setAutoScrollEditorIntoView=function(e){if(e){var t,n=this,r=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var i=this.$scrollAnchor;i.style.cssText="position:absolute",this.container.insertBefore(i,this.container.firstChild);var o=this.on("changeSelection",(function(){r=!0})),s=this.renderer.on("beforeRender",(function(){r&&(t=n.renderer.container.getBoundingClientRect())})),a=this.renderer.on("afterRender",(function(){if(r&&t&&(n.isFocused()||n.searchBox&&n.searchBox.isFocused())){var e=n.renderer,o=e.$cursorLayer.$pixelPos,s=e.layerConfig,a=o.top-s.offset;null!=(r=o.top>=0&&a+t.top<0||!(o.top<s.height&&o.top+t.top+s.lineHeight>window.innerHeight)&&null)&&(i.style.top=a+"px",i.style.left=o.left+"px",i.style.height=s.lineHeight+"px",i.scrollIntoView(r)),r=t=null}}));this.setAutoScrollEditorIntoView=function(e){e||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",o),this.renderer.off("afterRender",a),this.renderer.off("beforeRender",s))}}},this.$resetCursorStyle=function(){var e=this.$cursorStyle||"ace",t=this.renderer.$cursorLayer;t&&(t.setSmoothBlinking(/smooth/.test(e)),t.isBlinking=!this.$readOnly&&"wide"!=e,o.setCssClass(t.element,"ace_slim-cursors",/slim/.test(e)))},this.prompt=function(e,t,n){var r=this;b.loadModule("./ext/prompt",(function(i){i.prompt(r,e,t,n)}))}}.call(k.prototype),b.defineOptions(k.prototype,"editor",{selectionStyle:{set:function(e){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:e})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(e){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(e){this.textInput.setReadOnly(e),this.$resetCursorStyle()},initialValue:!1},copyWithEmptySelection:{set:function(e){this.textInput.setCopyWithEmptySelection(e)},initialValue:!1},cursorStyle:{set:function(e){this.$resetCursorStyle()},values:["ace","slim","smooth","wide"],initialValue:"ace"},mergeUndoDeltas:{values:[!1,!0,"always"],initialValue:!0},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},enableAutoIndent:{initialValue:!0},autoScrollEditorIntoView:{set:function(e){this.setAutoScrollEditorIntoView(e)}},keyboardHandler:{set:function(e){this.setKeyboardHandler(e)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(e){this.session.setValue(e)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(e){this.setSession(e)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(e){this.renderer.$gutterLayer.setShowLineNumbers(e),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),e&&this.$relativeLineNumbers?x.attach(this):x.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(e){this.$showLineNumbers&&e?x.attach(this):x.detach(this)}},placeholder:{set:function(e){this.$updatePlaceholder||(this.$updatePlaceholder=function(){var e=this.session&&(this.renderer.$composition||this.getValue());if(e&&this.renderer.placeholderNode)this.renderer.off("afterRender",this.$updatePlaceholder),o.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null;else if(e||this.renderer.placeholderNode)!e&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||"");else{this.renderer.on("afterRender",this.$updatePlaceholder),o.addCssClass(this.container,"ace_hasPlaceholder");var t=o.createElement("div");t.className="ace_placeholder",t.textContent=this.$placeholder||"",this.renderer.placeholderNode=t,this.renderer.content.appendChild(this.renderer.placeholderNode)}}.bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",displayIndentGuides:"renderer",showGutter:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",hasCssTransforms:"renderer",maxPixelHeight:"renderer",useTextareaForIME:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimeout:"$mouseHandler",tooltipFollowsMouse:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",navigateWithinSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"});var x={getText:function(e,t){return(Math.abs(e.selection.lead.row-t)||t+1+(t<9?"·":""))+""},getWidth:function(e,t,n){return Math.max(t.toString().length,(n.lastRow+1).toString().length,2)*n.characterWidth},update:function(e,t){t.renderer.$loop.schedule(t.renderer.CHANGE_GUTTER)},attach:function(e){e.renderer.$gutterLayer.$renderer=this,e.on("changeSelection",this.update),this.update(null,e)},detach:function(e){e.renderer.$gutterLayer.$renderer==this&&(e.renderer.$gutterLayer.$renderer=null),e.off("changeSelection",this.update),this.update(null,e)}};t.Editor=k})),ace.define("ace/undomanager",["require","exports","module","ace/range"],(function(e,t,n){"use strict";var r=function(){this.$maxRev=0,this.$fromUndo=!1,this.reset()};(function(){this.addSession=function(e){this.$session=e},this.add=function(e,t,n){this.$fromUndo||e!=this.$lastDelta&&(this.$keepRedoStack||(this.$redoStack.length=0),!1!==t&&this.lastDeltas||(this.lastDeltas=[],this.$undoStack.push(this.lastDeltas),e.id=this.$rev=++this.$maxRev),"remove"!=e.action&&"insert"!=e.action||(this.$lastDelta=e),this.lastDeltas.push(e))},this.addSelection=function(e,t){this.selections.push({value:e,rev:t||this.$rev})},this.startNewGroup=function(){return this.lastDeltas=null,this.$rev},this.markIgnored=function(e,t){null==t&&(t=this.$rev+1);for(var n=this.$undoStack,r=n.length;r--;){var i=n[r][0];if(i.id<=e)break;i.id<t&&(i.ignore=!0)}this.lastDeltas=null},this.getSelection=function(e,t){for(var n=this.selections,r=n.length;r--;){var i=n[r];if(i.rev<e)return t&&(i=n[r+1]),i}},this.getRevision=function(){return this.$rev},this.getDeltas=function(e,t){null==t&&(t=this.$rev+1);for(var n=this.$undoStack,r=null,i=0,o=n.length;o--;){var s=n[o][0];if(s.id<t&&!r&&(r=o+1),s.id<=e){i=o+1;break}}return n.slice(i,r)},this.getChangedRanges=function(e,t){null==t&&(t=this.$rev+1)},this.getChangedLines=function(e,t){null==t&&(t=this.$rev+1)},this.undo=function(e,t){this.lastDeltas=null;var n=this.$undoStack;if(function(e,t){for(var n=t;n--;){var r=e[n];if(r&&!r[0].ignore){for(;n<t-1;){var i=u(e[n],e[n+1]);e[n]=i[0],e[n+1]=i[1],n++}return!0}}}(n,n.length)){e||(e=this.$session),this.$redoStackBaseRev!==this.$rev&&this.$redoStack.length&&(this.$redoStack=[]),this.$fromUndo=!0;var r=n.pop(),i=null;return r&&(i=e.undoChanges(r,t),this.$redoStack.push(r),this.$syncRev()),this.$fromUndo=!1,i}},this.redo=function(e,t){if(this.lastDeltas=null,e||(e=this.$session),this.$fromUndo=!0,this.$redoStackBaseRev!=this.$rev){var n=this.getDeltas(this.$redoStackBaseRev,this.$rev+1);!function(e,t){for(var n=0;n<t.length;n++)for(var r=t[n],i=0;i<r.length;i++)m(e,r[i])}(this.$redoStack,n),this.$redoStackBaseRev=this.$rev,this.$redoStack.forEach((function(e){e[0].id=++this.$maxRev}),this)}var r=this.$redoStack.pop(),i=null;return r&&(i=e.redoChanges(r,t),this.$undoStack.push(r),this.$syncRev()),this.$fromUndo=!1,i},this.$syncRev=function(){var e=this.$undoStack,t=e[e.length-1],n=t&&t[0].id||0;this.$redoStackBaseRev=n,this.$rev=n},this.reset=function(){this.lastDeltas=null,this.$lastDelta=null,this.$undoStack=[],this.$redoStack=[],this.$rev=0,this.mark=0,this.$redoStackBaseRev=this.$rev,this.selections=[]},this.canUndo=function(){return this.$undoStack.length>0},this.canRedo=function(){return this.$redoStack.length>0},this.bookmark=function(e){null==e&&(e=this.$rev),this.mark=e},this.isAtBookmark=function(){return this.$rev===this.mark},this.toJSON=function(){},this.fromJSON=function(){},this.hasUndo=this.canUndo,this.hasRedo=this.canRedo,this.isClean=this.isAtBookmark,this.markClean=this.bookmark,this.$prettyPrint=function(e){return e?a(e):a(this.$undoStack)+"\n---\n"+a(this.$redoStack)}}).call(r.prototype);var i=e("./range").Range,o=i.comparePoints;i.comparePoints;function s(e){return{row:e.row,column:e.column}}function a(e){if(e=e||this,Array.isArray(e))return e.map(a).join("\n");var t="";return e.action?(t="insert"==e.action?"+":"-",t+="["+e.lines+"]"):e.value&&(t=Array.isArray(e.value)?e.value.map(l).join("\n"):l(e.value)),e.start&&(t+=l(e)),(e.id||e.rev)&&(t+="\t("+(e.id||e.rev)+")"),t}function l(e){return e.start.row+":"+e.start.column+"=>"+e.end.row+":"+e.end.column}function c(e,t){var n="insert"==e.action,r="insert"==t.action;if(n&&r)if(o(t.start,e.end)>=0)d(t,e,-1);else{if(!(o(t.start,e.start)<=0))return null;d(e,t,1)}else if(n&&!r)if(o(t.start,e.end)>=0)d(t,e,-1);else{if(!(o(t.end,e.start)<=0))return null;d(e,t,-1)}else if(!n&&r)if(o(t.start,e.start)>=0)d(t,e,1);else{if(!(o(t.start,e.start)<=0))return null;d(e,t,1)}else if(!n&&!r)if(o(t.start,e.start)>=0)d(t,e,1);else{if(!(o(t.end,e.start)<=0))return null;d(e,t,-1)}return[t,e]}function u(e,t){for(var n=e.length;n--;)for(var r=0;r<t.length;r++)if(!c(e[n],t[r])){for(;n<e.length;){for(;r--;)c(t[r],e[n]);r=t.length,n++}return[e,t]}return e.selectionBefore=t.selectionBefore=e.selectionAfter=t.selectionAfter=null,[t,e]}function h(e,t){var n="insert"==e.action,r="insert"==t.action;if(n&&r)o(e.start,t.start)<0?d(t,e,1):d(e,t,1);else if(n&&!r)o(e.start,t.end)>=0?d(e,t,-1):(o(e.start,t.start)<=0||d(e,i.fromPoints(t.start,e.start),-1),d(t,e,1));else if(!n&&r)o(t.start,e.end)>=0?d(t,e,-1):(o(t.start,e.start)<=0||d(t,i.fromPoints(e.start,t.start),-1),d(e,t,1));else if(!n&&!r)if(o(t.start,e.end)>=0)d(t,e,-1);else{var s,a;if(!(o(t.end,e.start)<=0))return o(e.start,t.start)<0&&(s=e,e=f(e,t.start)),o(e.end,t.end)>0&&(a=f(e,t.end)),p(t.end,e.start,e.end,-1),a&&!s&&(e.lines=a.lines,e.start=a.start,e.end=a.end,a=e),[t,s,a].filter(Boolean);d(e,t,-1)}return[t,e]}function d(e,t,n){p(e.start,t.start,t.end,n),p(e.end,t.start,t.end,n)}function p(e,t,n,r){e.row==(1==r?t:n).row&&(e.column+=r*(n.column-t.column)),e.row+=r*(n.row-t.row)}function f(e,t){var n=e.lines,r=e.end;e.end=s(t);var i=e.end.row-e.start.row,o=n.splice(i,n.length),a=i?t.column:t.column-e.start.column;return n.push(o[0].substring(0,a)),o[0]=o[0].substr(a),{start:s(t),end:r,lines:o,action:e.action}}function m(e,t){t=function(e){return{start:s(e.start),end:s(e.end),action:e.action,lines:e.lines.slice()}}(t);for(var n=e.length;n--;){for(var r=e[n],i=0;i<r.length;i++){var o=h(r[i],t);t=o[0],2!=o.length&&(o[2]?(r.splice(i+1,1,o[1],o[2]),i++):o[1]||(r.splice(i,1),i--))}r.length||e.splice(n,1)}return e}t.UndoManager=r})),ace.define("ace/layer/lines",["require","exports","module","ace/lib/dom"],(function(e,t,n){"use strict";var r=e("../lib/dom"),i=function(e,t){this.element=e,this.canvasHeight=t||5e5,this.element.style.height=2*this.canvasHeight+"px",this.cells=[],this.cellCache=[],this.$offsetCoefficient=0};(function(){this.moveContainer=function(e){r.translate(this.element,0,-e.firstRowScreen*e.lineHeight%this.canvasHeight-e.offset*this.$offsetCoefficient)},this.pageChanged=function(e,t){return Math.floor(e.firstRowScreen*e.lineHeight/this.canvasHeight)!==Math.floor(t.firstRowScreen*t.lineHeight/this.canvasHeight)},this.computeLineTop=function(e,t,n){var r=t.firstRowScreen*t.lineHeight,i=Math.floor(r/this.canvasHeight);return n.documentToScreenRow(e,0)*t.lineHeight-i*this.canvasHeight},this.computeLineHeight=function(e,t,n){return t.lineHeight*n.getRowLineCount(e)},this.getLength=function(){return this.cells.length},this.get=function(e){return this.cells[e]},this.shift=function(){this.$cacheCell(this.cells.shift())},this.pop=function(){this.$cacheCell(this.cells.pop())},this.push=function(e){if(Array.isArray(e)){this.cells.push.apply(this.cells,e);for(var t=r.createFragment(this.element),n=0;n<e.length;n++)t.appendChild(e[n].element);this.element.appendChild(t)}else this.cells.push(e),this.element.appendChild(e.element)},this.unshift=function(e){if(Array.isArray(e)){this.cells.unshift.apply(this.cells,e);for(var t=r.createFragment(this.element),n=0;n<e.length;n++)t.appendChild(e[n].element);this.element.firstChild?this.element.insertBefore(t,this.element.firstChild):this.element.appendChild(t)}else this.cells.unshift(e),this.element.insertAdjacentElement("afterbegin",e.element)},this.last=function(){return this.cells.length?this.cells[this.cells.length-1]:null},this.$cacheCell=function(e){e&&(e.element.remove(),this.cellCache.push(e))},this.createCell=function(e,t,n,i){var o=this.cellCache.pop();if(!o){var s=r.createElement("div");i&&i(s),this.element.appendChild(s),o={element:s,text:"",row:e}}return o.row=e,o}}).call(i.prototype),t.Lines=i})),ace.define("ace/layer/gutter",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/layer/lines"],(function(e,t,n){"use strict";var r=e("../lib/dom"),i=e("../lib/oop"),o=e("../lib/lang"),s=e("../lib/event_emitter").EventEmitter,a=e("./lines").Lines,l=function(e){this.element=r.createElement("div"),this.element.className="ace_layer ace_gutter-layer",e.appendChild(this.element),this.setShowFoldWidgets(this.$showFoldWidgets),this.gutterWidth=0,this.$annotations=[],this.$updateAnnotations=this.$updateAnnotations.bind(this),this.$lines=new a(this.element),this.$lines.$offsetCoefficient=1};function c(e){var t=document.createTextNode("");e.appendChild(t);var n=r.createElement("span");return e.appendChild(n),e}(function(){i.implement(this,s),this.setSession=function(e){this.session&&this.session.off("change",this.$updateAnnotations),this.session=e,e&&e.on("change",this.$updateAnnotations)},this.addGutterDecoration=function(e,t){window.console&&console.warn&&console.warn("deprecated use session.addGutterDecoration"),this.session.addGutterDecoration(e,t)},this.removeGutterDecoration=function(e,t){window.console&&console.warn&&console.warn("deprecated use session.removeGutterDecoration"),this.session.removeGutterDecoration(e,t)},this.setAnnotations=function(e){this.$annotations=[];for(var t=0;t<e.length;t++){var n=e[t],r=n.row,i=this.$annotations[r];i||(i=this.$annotations[r]={text:[]});var s=n.text;s=s?o.escapeHTML(s):n.html||"",-1===i.text.indexOf(s)&&i.text.push(s);var a=n.type;"error"==a?i.className=" ace_error":"warning"==a&&" ace_error"!=i.className?i.className=" ace_warning":"info"!=a||i.className||(i.className=" ace_info")}},this.$updateAnnotations=function(e){if(this.$annotations.length){var t=e.start.row,n=e.end.row-t;if(0===n);else if("remove"==e.action)this.$annotations.splice(t,n+1,null);else{var r=new Array(n+1);r.unshift(t,1),this.$annotations.splice.apply(this.$annotations,r)}}},this.update=function(e){this.config=e;var t=this.session,n=e.firstRow,r=Math.min(e.lastRow+e.gutterOffset,t.getLength()-1);this.oldLastRow=r,this.config=e,this.$lines.moveContainer(e),this.$updateCursorRow();for(var i=t.getNextFoldLine(n),o=i?i.start.row:1/0,s=null,a=-1,l=n;;){if(l>o&&(l=i.end.row+1,o=(i=t.getNextFoldLine(l,i))?i.start.row:1/0),l>r){for(;this.$lines.getLength()>a+1;)this.$lines.pop();break}(s=this.$lines.get(++a))?s.row=l:(s=this.$lines.createCell(l,e,this.session,c),this.$lines.push(s)),this.$renderCell(s,e,i,l),l++}this._signal("afterRender"),this.$updateGutterWidth(e)},this.$updateGutterWidth=function(e){var t=this.session,n=t.gutterRenderer||this.$renderer,r=t.$firstLineNumber,i=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||t.$useWrapMode)&&(i=t.getLength()+r-1);var o=n?n.getWidth(t,i,e):i.toString().length*e.characterWidth,s=this.$padding||this.$computePadding();(o+=s.left+s.right)===this.gutterWidth||isNaN(o)||(this.gutterWidth=o,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",o))},this.$updateCursorRow=function(){if(this.$highlightGutterLine){var e=this.session.selection.getCursor();this.$cursorRow!==e.row&&(this.$cursorRow=e.row)}},this.updateLineHighlight=function(){if(this.$highlightGutterLine){var e=this.session.selection.cursor.row;if(this.$cursorRow=e,!this.$cursorCell||this.$cursorCell.row!=e){this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ",""));var t=this.$lines.cells;this.$cursorCell=null;for(var n=0;n<t.length;n++){var r=t[n];if(r.row>=this.$cursorRow){if(r.row>this.$cursorRow){var i=this.session.getFoldLine(this.$cursorRow);if(!(n>0&&i&&i.start.row==t[n-1].row))break;r=t[n-1]}r.element.className="ace_gutter-active-line "+r.element.className,this.$cursorCell=r;break}}}}},this.scrollLines=function(e){var t=this.config;if(this.config=e,this.$updateCursorRow(),this.$lines.pageChanged(t,e))return this.update(e);this.$lines.moveContainer(e);var n=Math.min(e.lastRow+e.gutterOffset,this.session.getLength()-1),r=this.oldLastRow;if(this.oldLastRow=n,!t||r<e.firstRow)return this.update(e);if(n<t.firstRow)return this.update(e);if(t.firstRow<e.firstRow)for(var i=this.session.getFoldedRowCount(t.firstRow,e.firstRow-1);i>0;i--)this.$lines.shift();if(r>n)for(i=this.session.getFoldedRowCount(n+1,r);i>0;i--)this.$lines.pop();e.firstRow<t.firstRow&&this.$lines.unshift(this.$renderLines(e,e.firstRow,t.firstRow-1)),n>r&&this.$lines.push(this.$renderLines(e,r+1,n)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(e)},this.$renderLines=function(e,t,n){for(var r=[],i=t,o=this.session.getNextFoldLine(i),s=o?o.start.row:1/0;i>s&&(i=o.end.row+1,s=(o=this.session.getNextFoldLine(i,o))?o.start.row:1/0),!(i>n);){var a=this.$lines.createCell(i,e,this.session,c);this.$renderCell(a,e,o,i),r.push(a),i++}return r},this.$renderCell=function(e,t,n,i){var o=e.element,s=this.session,a=o.childNodes[0],l=o.childNodes[1],c=s.$firstLineNumber,u=s.$breakpoints,h=s.$decorations,d=s.gutterRenderer||this.$renderer,p=this.$showFoldWidgets&&s.foldWidgets,f=n?n.start.row:Number.MAX_VALUE,m="ace_gutter-cell ";if(this.$highlightGutterLine&&(i==this.$cursorRow||n&&i<this.$cursorRow&&i>=f&&this.$cursorRow<=n.end.row)&&(m+="ace_gutter-active-line ",this.$cursorCell!=e&&(this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ","")),this.$cursorCell=e)),u[i]&&(m+=u[i]),h[i]&&(m+=h[i]),this.$annotations[i]&&(m+=this.$annotations[i].className),o.className!=m&&(o.className=m),p){var g=p[i];null==g&&(g=p[i]=s.getFoldWidget(i))}if(g){m="ace_fold-widget ace_"+g;"start"==g&&i==f&&i<n.end.row?m+=" ace_closed":m+=" ace_open",l.className!=m&&(l.className=m);var v=t.lineHeight+"px";r.setStyle(l.style,"height",v),r.setStyle(l.style,"display","inline-block")}else l&&r.setStyle(l.style,"display","none");var b=(d?d.getText(s,i):i+c).toString();return b!==a.data&&(a.data=b),r.setStyle(e.element.style,"height",this.$lines.computeLineHeight(i,t,s)+"px"),r.setStyle(e.element.style,"top",this.$lines.computeLineTop(i,t,s)+"px"),e.text=b,e},this.$fixedWidth=!1,this.$highlightGutterLine=!0,this.$renderer="",this.setHighlightGutterLine=function(e){this.$highlightGutterLine=e},this.$showLineNumbers=!0,this.$renderer="",this.setShowLineNumbers=function(e){this.$renderer=!e&&{getWidth:function(){return 0},getText:function(){return""}}},this.getShowLineNumbers=function(){return this.$showLineNumbers},this.$showFoldWidgets=!0,this.setShowFoldWidgets=function(e){e?r.addCssClass(this.element,"ace_folding-enabled"):r.removeCssClass(this.element,"ace_folding-enabled"),this.$showFoldWidgets=e,this.$padding=null},this.getShowFoldWidgets=function(){return this.$showFoldWidgets},this.$computePadding=function(){if(!this.element.firstChild)return{left:0,right:0};var e=r.computedStyle(this.element.firstChild);return this.$padding={},this.$padding.left=(parseInt(e.borderLeftWidth)||0)+(parseInt(e.paddingLeft)||0)+1,this.$padding.right=(parseInt(e.borderRightWidth)||0)+(parseInt(e.paddingRight)||0),this.$padding},this.getRegion=function(e){var t=this.$padding||this.$computePadding(),n=this.element.getBoundingClientRect();return e.x<t.left+n.left?"markers":this.$showFoldWidgets&&e.x>n.right-t.right?"foldWidgets":void 0}}).call(l.prototype),t.Gutter=l})),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],(function(e,t,n){"use strict";var r=e("../range").Range,i=e("../lib/dom"),o=function(e){this.element=i.createElement("div"),this.element.className="ace_layer ace_marker-layer",e.appendChild(this.element)};(function(){this.$padding=0,this.setPadding=function(e){this.$padding=e},this.setSession=function(e){this.session=e},this.setMarkers=function(e){this.markers=e},this.elt=function(e,t){var n=-1!=this.i&&this.element.childNodes[this.i];n?this.i++:(n=document.createElement("div"),this.element.appendChild(n),this.i=-1),n.style.cssText=t,n.className=e},this.update=function(e){if(e){var t;for(var n in this.config=e,this.i=0,this.markers){var r=this.markers[n];if(r.range){var i=r.range.clipRows(e.firstRow,e.lastRow);if(!i.isEmpty())if(i=i.toScreenRange(this.session),r.renderer){var o=this.$getTop(i.start.row,e),s=this.$padding+i.start.column*e.characterWidth;r.renderer(t,i,s,o,e)}else"fullLine"==r.type?this.drawFullLineMarker(t,i,r.clazz,e):"screenLine"==r.type?this.drawScreenLineMarker(t,i,r.clazz,e):i.isMultiLine()?"text"==r.type?this.drawTextMarker(t,i,r.clazz,e):this.drawMultiLineMarker(t,i,r.clazz,e):this.drawSingleLineMarker(t,i,r.clazz+" ace_start ace_br15",e)}else r.update(t,this,this.session,e)}if(-1!=this.i)for(;this.i<this.element.childElementCount;)this.element.removeChild(this.element.lastChild)}},this.$getTop=function(e,t){return(e-t.firstRowScreen)*t.lineHeight},this.drawTextMarker=function(e,t,n,i,o){for(var s=this.session,a=t.start.row,l=t.end.row,c=a,u=0,h=0,d=s.getScreenLastRowColumn(c),p=new r(c,t.start.column,c,h);c<=l;c++)p.start.row=p.end.row=c,p.start.column=c==a?t.start.column:s.getRowWrapIndent(c),p.end.column=d,u=h,h=d,d=c+1<l?s.getScreenLastRowColumn(c+1):c==l?0:t.end.column,this.drawSingleLineMarker(e,p,n+(c==a?" ace_start":"")+" ace_br"+((c==a||c==a+1&&t.start.column?1:0)|(u<h?2:0)|(h>d?4:0)|(c==l?8:0)),i,c==l?0:1,o)},this.drawMultiLineMarker=function(e,t,n,r,i){var o=this.$padding,s=r.lineHeight,a=this.$getTop(t.start.row,r),l=o+t.start.column*r.characterWidth;(i=i||"",this.session.$bidiHandler.isBidiRow(t.start.row))?((c=t.clone()).end.row=c.start.row,c.end.column=this.session.getLine(c.start.row).length,this.drawBidiSingleLineMarker(e,c,n+" ace_br1 ace_start",r,null,i)):this.elt(n+" ace_br1 ace_start","height:"+s+"px;right:0;top:"+a+"px;left:"+l+"px;"+(i||""));if(this.session.$bidiHandler.isBidiRow(t.end.row)){var c;(c=t.clone()).start.row=c.end.row,c.start.column=0,this.drawBidiSingleLineMarker(e,c,n+" ace_br12",r,null,i)}else{a=this.$getTop(t.end.row,r);var u=t.end.column*r.characterWidth;this.elt(n+" ace_br12","height:"+s+"px;width:"+u+"px;top:"+a+"px;left:"+o+"px;"+(i||""))}if(!((s=(t.end.row-t.start.row-1)*r.lineHeight)<=0)){a=this.$getTop(t.start.row+1,r);var h=(t.start.column?1:0)|(t.end.column?0:8);this.elt(n+(h?" ace_br"+h:""),"height:"+s+"px;right:0;top:"+a+"px;left:"+o+"px;"+(i||""))}},this.drawSingleLineMarker=function(e,t,n,r,i,o){if(this.session.$bidiHandler.isBidiRow(t.start.row))return this.drawBidiSingleLineMarker(e,t,n,r,i,o);var s=r.lineHeight,a=(t.end.column+(i||0)-t.start.column)*r.characterWidth,l=this.$getTop(t.start.row,r),c=this.$padding+t.start.column*r.characterWidth;this.elt(n,"height:"+s+"px;width:"+a+"px;top:"+l+"px;left:"+c+"px;"+(o||""))},this.drawBidiSingleLineMarker=function(e,t,n,r,i,o){var s=r.lineHeight,a=this.$getTop(t.start.row,r),l=this.$padding;this.session.$bidiHandler.getSelections(t.start.column,t.end.column).forEach((function(e){this.elt(n,"height:"+s+"px;width:"+e.width+(i||0)+"px;top:"+a+"px;left:"+(l+e.left)+"px;"+(o||""))}),this)},this.drawFullLineMarker=function(e,t,n,r,i){var o=this.$getTop(t.start.row,r),s=r.lineHeight;t.start.row!=t.end.row&&(s+=this.$getTop(t.end.row,r)-o),this.elt(n,"height:"+s+"px;top:"+o+"px;left:0;right:0;"+(i||""))},this.drawScreenLineMarker=function(e,t,n,r,i){var o=this.$getTop(t.start.row,r),s=r.lineHeight;this.elt(n,"height:"+s+"px;top:"+o+"px;left:0;right:0;"+(i||""))}}).call(o.prototype),t.Marker=o})),ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/layer/lines","ace/lib/event_emitter"],(function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/dom"),o=e("../lib/lang"),s=e("./lines").Lines,a=e("../lib/event_emitter").EventEmitter,l=function(e){this.dom=i,this.element=this.dom.createElement("div"),this.element.className="ace_layer ace_text-layer",e.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this),this.$lines=new s(this.element)};(function(){r.implement(this,a),this.EOF_CHAR="¶",this.EOL_CHAR_LF="¬",this.EOL_CHAR_CRLF="¤",this.EOL_CHAR=this.EOL_CHAR_LF,this.TAB_CHAR="—",this.SPACE_CHAR="·",this.$padding=0,this.MAX_LINE_LENGTH=1e4,this.$updateEolChar=function(){var e=this.session.doc,t="\n"==e.getNewLineCharacter()&&"windows"!=e.getNewLineMode()?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=t)return this.EOL_CHAR=t,!0},this.setPadding=function(e){this.$padding=e,this.element.style.margin="0 "+e+"px"},this.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},this.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},this.$setFontMetrics=function(e){this.$fontMetrics=e,this.$fontMetrics.on("changeCharacterSize",function(e){this._signal("changeCharacterSize",e)}.bind(this)),this.$pollSizeChanges()},this.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},this.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},this.setSession=function(e){this.session=e,e&&this.$computeTabString()},this.showInvisibles=!1,this.showSpaces=!1,this.showTabs=!1,this.showEOL=!1,this.setShowInvisibles=function(e){return this.showInvisibles!=e&&(this.showInvisibles=e,"string"==typeof e?(this.showSpaces=/tab/i.test(e),this.showTabs=/space/i.test(e),this.showEOL=/eol/i.test(e)):this.showSpaces=this.showTabs=this.showEOL=e,this.$computeTabString(),!0)},this.displayIndentGuides=!0,this.setDisplayIndentGuides=function(e){return this.displayIndentGuides!=e&&(this.displayIndentGuides=e,this.$computeTabString(),!0)},this.$tabStrings=[],this.onChangeTabSize=this.$computeTabString=function(){var e=this.session.getTabSize();this.tabSize=e;for(var t=this.$tabStrings=[0],n=1;n<e+1;n++){if(this.showTabs)(r=this.dom.createElement("span")).className="ace_invisible ace_invisible_tab",r.textContent=o.stringRepeat(this.TAB_CHAR,n),t.push(r);else t.push(this.dom.createTextNode(o.stringRepeat(" ",n),this.element))}if(this.displayIndentGuides){this.$indentGuideRe=/\s\S| \t|\t |\s$/;var r,i=this.showSpaces?" ace_invisible ace_invisible_space":"",s=this.showSpaces?o.stringRepeat(this.SPACE_CHAR,this.tabSize):o.stringRepeat(" ",this.tabSize),a=this.showTabs?" ace_invisible ace_invisible_tab":"",l=this.showTabs?o.stringRepeat(this.TAB_CHAR,this.tabSize):s;(r=this.dom.createElement("span")).className="ace_indent-guide"+i,r.textContent=s,this.$tabStrings[" "]=r,(r=this.dom.createElement("span")).className="ace_indent-guide"+a,r.textContent=l,this.$tabStrings["\t"]=r}},this.updateLines=function(e,t,n){if(this.config.lastRow!=e.lastRow||this.config.firstRow!=e.firstRow)return this.update(e);this.config=e;for(var r=Math.max(t,e.firstRow),i=Math.min(n,e.lastRow),o=this.element.childNodes,s=0,a=e.firstRow;a<r;a++){if(l=this.session.getFoldLine(a)){if(l.containsRow(r)){r=l.start.row;break}a=l.end.row}s++}for(var l,c=!1,u=(a=r,(l=this.session.getNextFoldLine(a))?l.start.row:1/0);a>u&&(a=l.end.row+1,u=(l=this.session.getNextFoldLine(a,l))?l.start.row:1/0),!(a>i);){var h=o[s++];if(h){this.dom.removeChildren(h),this.$renderLine(h,a,a==u&&l),c&&(h.style.top=this.$lines.computeLineTop(a,e,this.session)+"px");var d=e.lineHeight*this.session.getRowLength(a)+"px";h.style.height!=d&&(c=!0,h.style.height=d)}a++}if(c)for(;s<this.$lines.cells.length;){var p=this.$lines.cells[s++];p.element.style.top=this.$lines.computeLineTop(p.row,e,this.session)+"px"}},this.scrollLines=function(e){var t=this.config;if(this.config=e,this.$lines.pageChanged(t,e))return this.update(e);this.$lines.moveContainer(e);var n=e.lastRow,r=t?t.lastRow:-1;if(!t||r<e.firstRow)return this.update(e);if(n<t.firstRow)return this.update(e);if(!t||t.lastRow<e.firstRow)return this.update(e);if(e.lastRow<t.firstRow)return this.update(e);if(t.firstRow<e.firstRow)for(var i=this.session.getFoldedRowCount(t.firstRow,e.firstRow-1);i>0;i--)this.$lines.shift();if(t.lastRow>e.lastRow)for(i=this.session.getFoldedRowCount(e.lastRow+1,t.lastRow);i>0;i--)this.$lines.pop();e.firstRow<t.firstRow&&this.$lines.unshift(this.$renderLinesFragment(e,e.firstRow,t.firstRow-1)),e.lastRow>t.lastRow&&this.$lines.push(this.$renderLinesFragment(e,t.lastRow+1,e.lastRow))},this.$renderLinesFragment=function(e,t,n){for(var r=[],o=t,s=this.session.getNextFoldLine(o),a=s?s.start.row:1/0;o>a&&(o=s.end.row+1,a=(s=this.session.getNextFoldLine(o,s))?s.start.row:1/0),!(o>n);){var l=this.$lines.createCell(o,e,this.session),c=l.element;this.dom.removeChildren(c),i.setStyle(c.style,"height",this.$lines.computeLineHeight(o,e,this.session)+"px"),i.setStyle(c.style,"top",this.$lines.computeLineTop(o,e,this.session)+"px"),this.$renderLine(c,o,o==a&&s),this.$useLineGroups()?c.className="ace_line_group":c.className="ace_line",r.push(l),o++}return r},this.update=function(e){this.$lines.moveContainer(e),this.config=e;for(var t=e.firstRow,n=e.lastRow,r=this.$lines;r.getLength();)r.pop();r.push(this.$renderLinesFragment(e,t,n))},this.$textToken={text:!0,rparen:!0,lparen:!0},this.$renderToken=function(e,t,n,r){for(var i,s=/(\t)|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\uFEFF\uFFF9-\uFFFC]+)|(\u3000)|([\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3001-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]|[\uD800-\uDBFF][\uDC00-\uDFFF])/g,a=this.dom.createFragment(this.element),l=0;i=s.exec(r);){var c=i[1],u=i[2],h=i[3],d=i[4],p=i[5];if(this.showSpaces||!u){var f=l!=i.index?r.slice(l,i.index):"";if(l=i.index+i[0].length,f&&a.appendChild(this.dom.createTextNode(f,this.element)),c){var m=this.session.getScreenTabSize(t+i.index);a.appendChild(this.$tabStrings[m].cloneNode(!0)),t+=m-1}else if(u){if(this.showSpaces)(v=this.dom.createElement("span")).className="ace_invisible ace_invisible_space",v.textContent=o.stringRepeat(this.SPACE_CHAR,u.length),a.appendChild(v);else a.appendChild(this.com.createTextNode(u,this.element))}else if(h){(v=this.dom.createElement("span")).className="ace_invisible ace_invisible_space ace_invalid",v.textContent=o.stringRepeat(this.SPACE_CHAR,h.length),a.appendChild(v)}else if(d){t+=1,(v=this.dom.createElement("span")).style.width=2*this.config.characterWidth+"px",v.className=this.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",v.textContent=this.showSpaces?this.SPACE_CHAR:d,a.appendChild(v)}else if(p){t+=1,(v=this.dom.createElement("span")).style.width=2*this.config.characterWidth+"px",v.className="ace_cjk",v.textContent=p,a.appendChild(v)}}}if(a.appendChild(this.dom.createTextNode(l?r.slice(l):r,this.element)),this.$textToken[n.type])e.appendChild(a);else{var g="ace_"+n.type.replace(/\./g," ace_"),v=this.dom.createElement("span");"fold"==n.type&&(v.style.width=n.value.length*this.config.characterWidth+"px"),v.className=g,v.appendChild(a),e.appendChild(v)}return t+r.length},this.renderIndentGuide=function(e,t,n){var r=t.search(this.$indentGuideRe);if(r<=0||r>=n)return t;if(" "==t[0]){for(var i=(r-=r%this.tabSize)/this.tabSize,o=0;o<i;o++)e.appendChild(this.$tabStrings[" "].cloneNode(!0));return t.substr(r)}if("\t"==t[0]){for(o=0;o<r;o++)e.appendChild(this.$tabStrings["\t"].cloneNode(!0));return t.substr(r)}return t},this.$createLineElement=function(e){var t=this.dom.createElement("div");return t.className="ace_line",t.style.height=this.config.lineHeight+"px",t},this.$renderWrappedLine=function(e,t,n){var r=0,i=0,s=n[0],a=0,l=this.$createLineElement();e.appendChild(l);for(var c=0;c<t.length;c++){var u=t[c],h=u.value;if(0==c&&this.displayIndentGuides){if(r=h.length,!(h=this.renderIndentGuide(l,h,s)))continue;r-=h.length}if(r+h.length<s)a=this.$renderToken(l,a,u,h),r+=h.length;else{for(;r+h.length>=s;)a=this.$renderToken(l,a,u,h.substring(0,s-r)),h=h.substring(s-r),r=s,l=this.$createLineElement(),e.appendChild(l),l.appendChild(this.dom.createTextNode(o.stringRepeat(" ",n.indent),this.element)),a=0,s=n[++i]||Number.MAX_VALUE;0!=h.length&&(r+=h.length,a=this.$renderToken(l,a,u,h))}}n[n.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(l,a,null,"",!0)},this.$renderSimpleLine=function(e,t){var n=0,r=t[0],i=r.value;this.displayIndentGuides&&(i=this.renderIndentGuide(e,i)),i&&(n=this.$renderToken(e,n,r,i));for(var o=1;o<t.length;o++){if(n+(i=(r=t[o]).value).length>this.MAX_LINE_LENGTH)return this.$renderOverflowMessage(e,n,r,i);n=this.$renderToken(e,n,r,i)}},this.$renderOverflowMessage=function(e,t,n,r,i){n&&this.$renderToken(e,t,n,r.slice(0,this.MAX_LINE_LENGTH-t));var o=this.dom.createElement("span");o.className="ace_inline_button ace_keyword ace_toggle_wrap",o.textContent=i?"<hide>":"<click to see more...>",e.appendChild(o)},this.$renderLine=function(e,t,n){if(n||0==n||(n=this.session.getFoldLine(t)),n)var r=this.$getFoldLineTokens(t,n);else r=this.session.getTokens(t);var i=e;if(r.length){var o=this.session.getRowSplitData(t);if(o&&o.length){this.$renderWrappedLine(e,r,o);i=e.lastChild}else{i=e;this.$useLineGroups()&&(i=this.$createLineElement(),e.appendChild(i)),this.$renderSimpleLine(i,r)}}else this.$useLineGroups()&&(i=this.$createLineElement(),e.appendChild(i));if(this.showEOL&&i){n&&(t=n.end.row);var s=this.dom.createElement("span");s.className="ace_invisible ace_invisible_eol",s.textContent=t==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,i.appendChild(s)}},this.$getFoldLineTokens=function(e,t){var n=this.session,r=[];var i=n.getTokens(e);return t.walk((function(e,t,o,s,a){null!=e?r.push({type:"fold",value:e}):(a&&(i=n.getTokens(t)),i.length&&function(e,t,n){for(var i=0,o=0;o+e[i].value.length<t;)if(o+=e[i].value.length,++i==e.length)return;for(o!=t&&((s=e[i].value.substring(t-o)).length>n-t&&(s=s.substring(0,n-t)),r.push({type:e[i].type,value:s}),o=t+s.length,i+=1);o<n&&i<e.length;){var s;(s=e[i].value).length+o>n?r.push({type:e[i].type,value:s.substring(0,n-o)}):r.push(e[i]),o+=s.length,i+=1}}(i,s,o))}),t.end.row,this.session.getLine(t.end.row).length),r},this.$useLineGroups=function(){return this.session.getUseWrapMode()},this.destroy=function(){}}).call(l.prototype),t.Text=l})),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],(function(e,t,n){"use strict";var r=e("../lib/dom"),i=function(e){this.element=r.createElement("div"),this.element.className="ace_layer ace_cursor-layer",e.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),r.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)};(function(){this.$updateOpacity=function(e){for(var t=this.cursors,n=t.length;n--;)r.setStyle(t[n].style,"opacity",e?"":"0")},this.$startCssAnimation=function(){for(var e=this.cursors,t=e.length;t--;)e[t].style.animationDuration=this.blinkInterval+"ms";setTimeout(function(){r.addCssClass(this.element,"ace_animate-blinking")}.bind(this))},this.$stopCssAnimation=function(){r.removeCssClass(this.element,"ace_animate-blinking")},this.$padding=0,this.setPadding=function(e){this.$padding=e},this.setSession=function(e){this.session=e},this.setBlinking=function(e){e!=this.isBlinking&&(this.isBlinking=e,this.restartTimer())},this.setBlinkInterval=function(e){e!=this.blinkInterval&&(this.blinkInterval=e,this.restartTimer())},this.setSmoothBlinking=function(e){e!=this.smoothBlinking&&(this.smoothBlinking=e,r.setCssClass(this.element,"ace_smooth-blinking",e),this.$updateCursors(!0),this.restartTimer())},this.addCursor=function(){var e=r.createElement("div");return e.className="ace_cursor",this.element.appendChild(e),this.cursors.push(e),e},this.removeCursor=function(){if(this.cursors.length>1){var e=this.cursors.pop();return e.parentNode.removeChild(e),e}},this.hideCursor=function(){this.isVisible=!1,r.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},this.showCursor=function(){this.isVisible=!0,r.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},this.restartTimer=function(){var e=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&r.removeCssClass(this.element,"ace_smooth-blinking"),e(!0),this.isBlinking&&this.blinkInterval&&this.isVisible)if(this.smoothBlinking&&setTimeout(function(){r.addCssClass(this.element,"ace_smooth-blinking")}.bind(this)),r.HAS_CSS_ANIMATION)this.$startCssAnimation();else{var t=function(){this.timeoutId=setTimeout((function(){e(!1)}),.6*this.blinkInterval)}.bind(this);this.intervalId=setInterval((function(){e(!0),t()}),this.blinkInterval),t()}else this.$stopCssAnimation()},this.getPixelPosition=function(e,t){if(!this.config||!this.session)return{left:0,top:0};e||(e=this.session.selection.getCursor());var n=this.session.documentToScreenPosition(e);return{left:this.$padding+(this.session.$bidiHandler.isBidiRow(n.row,e.row)?this.session.$bidiHandler.getPosLeft(n.column):n.column*this.config.characterWidth),top:(n.row-(t?this.config.firstRowScreen:0))*this.config.lineHeight}},this.isCursorInView=function(e,t){return e.top>=0&&e.top<t.maxHeight},this.update=function(e){this.config=e;var t=this.session.$selectionMarkers,n=0,i=0;void 0!==t&&0!==t.length||(t=[{cursor:null}]);n=0;for(var o=t.length;n<o;n++){var s=this.getPixelPosition(t[n].cursor,!0);if(!((s.top>e.height+e.offset||s.top<0)&&n>1)){var a=this.cursors[i++]||this.addCursor(),l=a.style;this.drawCursor?this.drawCursor(a,s,e,t[n],this.session):this.isCursorInView(s,e)?(r.setStyle(l,"display","block"),r.translate(a,s.left,s.top),r.setStyle(l,"width",Math.round(e.characterWidth)+"px"),r.setStyle(l,"height",e.lineHeight+"px")):r.setStyle(l,"display","none")}}for(;this.cursors.length>i;)this.removeCursor();var c=this.session.getOverwrite();this.$setOverwrite(c),this.$pixelPos=s,this.restartTimer()},this.drawCursor=null,this.$setOverwrite=function(e){e!=this.overwrite&&(this.overwrite=e,e?r.addCssClass(this.element,"ace_overwrite-cursors"):r.removeCssClass(this.element,"ace_overwrite-cursors"))},this.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)}}).call(i.prototype),t.Cursor=i})),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],(function(e,t,n){"use strict";var r=e("./lib/oop"),i=e("./lib/dom"),o=e("./lib/event"),s=e("./lib/event_emitter").EventEmitter,a=function(e){this.element=i.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+this.classSuffix,this.inner=i.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent=" ",this.element.appendChild(this.inner),e.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,o.addListener(this.element,"scroll",this.onScroll.bind(this)),o.addListener(this.element,"mousedown",o.preventDefault)};(function(){r.implement(this,s),this.setVisible=function(e){this.element.style.display=e?"":"none",this.isVisible=e,this.coeff=1}}).call(a.prototype);var l=function(e,t){a.call(this,e),this.scrollTop=0,this.scrollHeight=0,t.$scrollbarWidth=this.width=i.scrollbarWidth(e.ownerDocument),this.inner.style.width=this.element.style.width=(this.width||15)+5+"px",this.$minWidth=0};r.inherits(l,a),function(){this.classSuffix="-v",this.onScroll=function(){if(!this.skipEvent){if(this.scrollTop=this.element.scrollTop,1!=this.coeff){var e=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-e)/(this.coeff-e)}this._emit("scroll",{data:this.scrollTop})}this.skipEvent=!1},this.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},this.setHeight=function(e){this.element.style.height=e+"px"},this.setInnerHeight=this.setScrollHeight=function(e){this.scrollHeight=e,e>32768?(this.coeff=32768/e,e=32768):1!=this.coeff&&(this.coeff=1),this.inner.style.height=e+"px"},this.setScrollTop=function(e){this.scrollTop!=e&&(this.skipEvent=!0,this.scrollTop=e,this.element.scrollTop=e*this.coeff)}}.call(l.prototype);var c=function(e,t){a.call(this,e),this.scrollLeft=0,this.height=t.$scrollbarWidth,this.inner.style.height=this.element.style.height=(this.height||15)+5+"px"};r.inherits(c,a),function(){this.classSuffix="-h",this.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},this.getHeight=function(){return this.isVisible?this.height:0},this.setWidth=function(e){this.element.style.width=e+"px"},this.setInnerWidth=function(e){this.inner.style.width=e+"px"},this.setScrollWidth=function(e){this.inner.style.width=e+"px"},this.setScrollLeft=function(e){this.scrollLeft!=e&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=e)}}.call(c.prototype),t.ScrollBar=l,t.ScrollBarV=l,t.ScrollBarH=c,t.VScrollBar=l,t.HScrollBar=c})),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],(function(e,t,n){"use strict";var r=e("./lib/event"),i=function(e,t){this.onRender=e,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=t||window;var n=this;this._flush=function(e){n.pending=!1;var t=n.changes;if(t&&(r.blockIdle(100),n.changes=0,n.onRender(t)),n.changes){if(n.$recursionLimit--<0)return;n.schedule()}else n.$recursionLimit=2}};(function(){this.schedule=function(e){this.changes=this.changes|e,this.changes&&!this.pending&&(r.nextFrame(this._flush),this.pending=!0)},this.clear=function(e){var t=this.changes;return this.changes=0,t}}).call(i.prototype),t.RenderLoop=i})),ace.define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/lib/useragent","ace/lib/event_emitter"],(function(e,t,n){var r=e("../lib/oop"),i=e("../lib/dom"),o=e("../lib/lang"),s=e("../lib/event"),a=e("../lib/useragent"),l=e("../lib/event_emitter").EventEmitter,c="function"==typeof ResizeObserver,u=200,h=t.FontMetrics=function(e){this.el=i.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=i.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=i.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),e.appendChild(this.el),this.$measureNode.textContent=o.stringRepeat("X",256),this.$characterSize={width:0,height:0},c?this.$addObserver():this.checkForSizeChanges()};(function(){r.implement(this,l),this.$characterSize={width:0,height:0},this.$setMeasureNodeStyles=function(e,t){e.width=e.height="auto",e.left=e.top="0px",e.visibility="hidden",e.position="absolute",e.whiteSpace="pre",a.isIE<8?e["font-family"]="inherit":e.font="inherit",e.overflow=t?"hidden":"visible"},this.checkForSizeChanges=function(e){if(void 0===e&&(e=this.$measureSizes()),e&&(this.$characterSize.width!==e.width||this.$characterSize.height!==e.height)){this.$measureNode.style.fontWeight="bold";var t=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=e,this.charSizes=Object.create(null),this.allowBoldFonts=t&&t.width===e.width&&t.height===e.height,this._emit("changeCharacterSize",{data:e})}},this.$addObserver=function(){var e=this;this.$observer=new window.ResizeObserver((function(t){e.checkForSizeChanges()})),this.$observer.observe(this.$measureNode)},this.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var e=this;return this.$pollSizeChangesTimer=s.onIdle((function t(){e.checkForSizeChanges(),s.onIdle(t,500)}),500)},this.setPolling=function(e){e?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},this.$measureSizes=function(e){var t={height:(e||this.$measureNode).clientHeight,width:(e||this.$measureNode).clientWidth/256};return 0===t.width||0===t.height?null:t},this.$measureCharWidth=function(e){return this.$main.textContent=o.stringRepeat(e,256),this.$main.getBoundingClientRect().width/256},this.getCharacterWidth=function(e){var t=this.charSizes[e];return void 0===t&&(t=this.charSizes[e]=this.$measureCharWidth(e)/this.$characterSize.width),t},this.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},this.$getZoom=function e(t){return t?(window.getComputedStyle(t).zoom||1)*e(t.parentElement):1},this.$initTransformMeasureNodes=function(){var e=function(e,t){return["div",{style:"position: absolute;top:"+e+"px;left:"+t+"px;"}]};this.els=i.buildDom([e(0,0),e(u,0),e(0,u),e(u,u)],this.el)},this.transformCoordinates=function(e,t){e&&(e=o(1/this.$getZoom(this.el),e));function n(e,t,n){var r=e[1]*t[0]-e[0]*t[1];return[(-t[1]*n[0]+t[0]*n[1])/r,(+e[1]*n[0]-e[0]*n[1])/r]}function r(e,t){return[e[0]-t[0],e[1]-t[1]]}function i(e,t){return[e[0]+t[0],e[1]+t[1]]}function o(e,t){return[e*t[0],e*t[1]]}function s(e){var t=e.getBoundingClientRect();return[t.left,t.top]}this.els||this.$initTransformMeasureNodes();var a=s(this.els[0]),l=s(this.els[1]),c=s(this.els[2]),h=s(this.els[3]),d=n(r(h,l),r(h,c),r(i(l,c),i(h,a))),p=o(1+d[0],r(l,a)),f=o(1+d[1],r(c,a));if(t){var m=t,g=d[0]*m[0]/u+d[1]*m[1]/u+1,v=i(o(m[0],p),o(m[1],f));return i(o(1/g/u,v),a)}var b=r(e,a),y=n(r(p,o(d[0],b)),r(f,o(d[1],b)),b);return o(u,y)}}).call(h.prototype)})),ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/config","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter","ace/lib/useragent"],(function(e,t,n){"use strict";var r=e("./lib/oop"),i=e("./lib/dom"),o=e("./config"),s=e("./layer/gutter").Gutter,a=e("./layer/marker").Marker,l=e("./layer/text").Text,c=e("./layer/cursor").Cursor,u=e("./scrollbar").HScrollBar,h=e("./scrollbar").VScrollBar,d=e("./renderloop").RenderLoop,p=e("./layer/font_metrics").FontMetrics,f=e("./lib/event_emitter").EventEmitter,m='.ace_br1 {border-top-left-radius : 3px;}.ace_br2 {border-top-right-radius : 3px;}.ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;}.ace_br4 {border-bottom-right-radius: 3px;}.ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;}.ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;}.ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;}.ace_br8 {border-bottom-left-radius : 3px;}.ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;}.ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;}.ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_editor {position: relative;overflow: hidden;padding: 0;font: 12px/normal \'Monaco\', \'Menlo\', \'Ubuntu Mono\', \'Consolas\', \'source-code-pro\', monospace;direction: ltr;text-align: left;-webkit-tap-highlight-color: rgba(0, 0, 0, 0);}.ace_scroller {position: absolute;overflow: hidden;top: 0;bottom: 0;background-color: inherit;-ms-user-select: none;-moz-user-select: none;-webkit-user-select: none;user-select: none;cursor: text;}.ace_content {position: absolute;box-sizing: border-box;min-width: 100%;contain: style size layout;font-variant-ligatures: no-common-ligatures;}.ace_dragging .ace_scroller:before{position: absolute;top: 0;left: 0;right: 0;bottom: 0;content: \'\';background: rgba(250, 250, 250, 0.01);z-index: 1000;}.ace_dragging.ace_dark .ace_scroller:before{background: rgba(0, 0, 0, 0.01);}.ace_selecting, .ace_selecting * {cursor: text !important;}.ace_gutter {position: absolute;overflow : hidden;width: auto;top: 0;bottom: 0;left: 0;cursor: default;z-index: 4;-ms-user-select: none;-moz-user-select: none;-webkit-user-select: none;user-select: none;contain: style size layout;}.ace_gutter-active-line {position: absolute;left: 0;right: 0;}.ace_scroller.ace_scroll-left {box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;}.ace_gutter-cell {position: absolute;top: 0;left: 0;right: 0;padding-left: 19px;padding-right: 6px;background-repeat: no-repeat;}.ace_gutter-cell.ace_error {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAABOFBMVEX/////////QRswFAb/Ui4wFAYwFAYwFAaWGAfDRymzOSH/PxswFAb/SiUwFAYwFAbUPRvjQiDllog5HhHdRybsTi3/Tyv9Tir+Syj/UC3////XurebMBIwFAb/RSHbPx/gUzfdwL3kzMivKBAwFAbbvbnhPx66NhowFAYwFAaZJg8wFAaxKBDZurf/RB6mMxb/SCMwFAYwFAbxQB3+RB4wFAb/Qhy4Oh+4QifbNRcwFAYwFAYwFAb/QRzdNhgwFAYwFAbav7v/Uy7oaE68MBK5LxLewr/r2NXewLswFAaxJw4wFAbkPRy2PyYwFAaxKhLm1tMwFAazPiQwFAaUGAb/QBrfOx3bvrv/VC/maE4wFAbRPBq6MRO8Qynew8Dp2tjfwb0wFAbx6eju5+by6uns4uH9/f36+vr/GkHjAAAAYnRSTlMAGt+64rnWu/bo8eAA4InH3+DwoN7j4eLi4xP99Nfg4+b+/u9B/eDs1MD1mO7+4PHg2MXa347g7vDizMLN4eG+Pv7i5evs/v79yu7S3/DV7/498Yv24eH+4ufQ3Ozu/v7+y13sRqwAAADLSURBVHjaZc/XDsFgGIBhtDrshlitmk2IrbHFqL2pvXf/+78DPokj7+Fz9qpU/9UXJIlhmPaTaQ6QPaz0mm+5gwkgovcV6GZzd5JtCQwgsxoHOvJO15kleRLAnMgHFIESUEPmawB9ngmelTtipwwfASilxOLyiV5UVUyVAfbG0cCPHig+GBkzAENHS0AstVF6bacZIOzgLmxsHbt2OecNgJC83JERmePUYq8ARGkJx6XtFsdddBQgZE2nPR6CICZhawjA4Fb/chv+399kfR+MMMDGOQAAAABJRU5ErkJggg==");background-repeat: no-repeat;background-position: 2px center;}.ace_gutter-cell.ace_warning {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAmVBMVEX///8AAAD///8AAAAAAABPSzb/5sAAAAB/blH/73z/ulkAAAAAAAD85pkAAAAAAAACAgP/vGz/rkDerGbGrV7/pkQICAf////e0IsAAAD/oED/qTvhrnUAAAD/yHD/njcAAADuv2r/nz//oTj/p064oGf/zHAAAAA9Nir/tFIAAAD/tlTiuWf/tkIAAACynXEAAAAAAAAtIRW7zBpBAAAAM3RSTlMAABR1m7RXO8Ln31Z36zT+neXe5OzooRDfn+TZ4p3h2hTf4t3k3ucyrN1K5+Xaks52Sfs9CXgrAAAAjklEQVR42o3PbQ+CIBQFYEwboPhSYgoYunIqqLn6/z8uYdH8Vmdnu9vz4WwXgN/xTPRD2+sgOcZjsge/whXZgUaYYvT8QnuJaUrjrHUQreGczuEafQCO/SJTufTbroWsPgsllVhq3wJEk2jUSzX3CUEDJC84707djRc5MTAQxoLgupWRwW6UB5fS++NV8AbOZgnsC7BpEAAAAABJRU5ErkJggg==");background-position: 2px center;}.ace_gutter-cell.ace_info {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=");background-position: 2px center;}.ace_dark .ace_gutter-cell.ace_info {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC");}.ace_scrollbar {contain: strict;position: absolute;right: 0;bottom: 0;z-index: 6;}.ace_scrollbar-inner {position: absolute;cursor: text;left: 0;top: 0;}.ace_scrollbar-v{overflow-x: hidden;overflow-y: scroll;top: 0;}.ace_scrollbar-h {overflow-x: scroll;overflow-y: hidden;left: 0;}.ace_print-margin {position: absolute;height: 100%;}.ace_text-input {position: absolute;z-index: 0;width: 0.5em;height: 1em;opacity: 0;background: transparent;-moz-appearance: none;appearance: none;border: none;resize: none;outline: none;overflow: hidden;font: inherit;padding: 0 1px;margin: 0 -1px;contain: strict;-ms-user-select: text;-moz-user-select: text;-webkit-user-select: text;user-select: text;white-space: pre!important;}.ace_text-input.ace_composition {background: transparent;color: inherit;z-index: 1000;opacity: 1;}.ace_composition_placeholder { color: transparent }.ace_composition_marker { border-bottom: 1px solid;position: absolute;border-radius: 0;margin-top: 1px;}[ace_nocontext=true] {transform: none!important;filter: none!important;clip-path: none!important;mask : none!important;contain: none!important;perspective: none!important;mix-blend-mode: initial!important;z-index: auto;}.ace_layer {z-index: 1;position: absolute;overflow: hidden;word-wrap: normal;white-space: pre;height: 100%;width: 100%;box-sizing: border-box;pointer-events: none;}.ace_gutter-layer {position: relative;width: auto;text-align: right;pointer-events: auto;height: 1000000px;contain: style size layout;}.ace_text-layer {font: inherit !important;position: absolute;height: 1000000px;width: 1000000px;contain: style size layout;}.ace_text-layer > .ace_line, .ace_text-layer > .ace_line_group {contain: style size layout;position: absolute;top: 0;left: 0;right: 0;}.ace_hidpi .ace_text-layer,.ace_hidpi .ace_gutter-layer,.ace_hidpi .ace_content,.ace_hidpi .ace_gutter {contain: strict;will-change: transform;}.ace_hidpi .ace_text-layer > .ace_line, .ace_hidpi .ace_text-layer > .ace_line_group {contain: strict;}.ace_cjk {display: inline-block;text-align: center;}.ace_cursor-layer {z-index: 4;}.ace_cursor {z-index: 4;position: absolute;box-sizing: border-box;border-left: 2px solid;transform: translatez(0);}.ace_multiselect .ace_cursor {border-left-width: 1px;}.ace_slim-cursors .ace_cursor {border-left-width: 1px;}.ace_overwrite-cursors .ace_cursor {border-left-width: 0;border-bottom: 1px solid;}.ace_hidden-cursors .ace_cursor {opacity: 0.2;}.ace_hasPlaceholder .ace_hidden-cursors .ace_cursor {opacity: 0;}.ace_smooth-blinking .ace_cursor {transition: opacity 0.18s;}.ace_animate-blinking .ace_cursor {animation-duration: 1000ms;animation-timing-function: step-end;animation-name: blink-ace-animate;animation-iteration-count: infinite;}.ace_animate-blinking.ace_smooth-blinking .ace_cursor {animation-duration: 1000ms;animation-timing-function: ease-in-out;animation-name: blink-ace-animate-smooth;}@keyframes blink-ace-animate {from, to { opacity: 1; }60% { opacity: 0; }}@keyframes blink-ace-animate-smooth {from, to { opacity: 1; }45% { opacity: 1; }60% { opacity: 0; }85% { opacity: 0; }}.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {position: absolute;z-index: 3;}.ace_marker-layer .ace_selection {position: absolute;z-index: 5;}.ace_marker-layer .ace_bracket {position: absolute;z-index: 6;}.ace_marker-layer .ace_error_bracket {position: absolute;border-bottom: 1px solid #DE5555;border-radius: 0;}.ace_marker-layer .ace_active-line {position: absolute;z-index: 2;}.ace_marker-layer .ace_selected-word {position: absolute;z-index: 4;box-sizing: border-box;}.ace_line .ace_fold {box-sizing: border-box;display: inline-block;height: 11px;margin-top: -2px;vertical-align: middle;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=");background-repeat: no-repeat, repeat-x;background-position: center center, top left;color: transparent;border: 1px solid black;border-radius: 2px;cursor: pointer;pointer-events: auto;}.ace_dark .ace_fold {}.ace_fold:hover{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC");}.ace_tooltip {background-color: #FFF;background-image: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.1));border: 1px solid gray;border-radius: 1px;box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);color: black;max-width: 100%;padding: 3px 4px;position: fixed;z-index: 999999;box-sizing: border-box;cursor: default;white-space: pre;word-wrap: break-word;line-height: normal;font-style: normal;font-weight: normal;letter-spacing: normal;pointer-events: none;}.ace_folding-enabled > .ace_gutter-cell {padding-right: 13px;}.ace_fold-widget {box-sizing: border-box;margin: 0 -12px 0 1px;display: none;width: 11px;vertical-align: top;background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");background-repeat: no-repeat;background-position: center;border-radius: 3px;border: 1px solid transparent;cursor: pointer;}.ace_folding-enabled .ace_fold-widget {display: inline-block; }.ace_fold-widget.ace_end {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");}.ace_fold-widget.ace_closed {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");}.ace_fold-widget:hover {border: 1px solid rgba(0, 0, 0, 0.3);background-color: rgba(255, 255, 255, 0.2);box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);}.ace_fold-widget:active {border: 1px solid rgba(0, 0, 0, 0.4);background-color: rgba(0, 0, 0, 0.05);box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);}.ace_dark .ace_fold-widget {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");}.ace_dark .ace_fold-widget.ace_end {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");}.ace_dark .ace_fold-widget.ace_closed {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");}.ace_dark .ace_fold-widget:hover {box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);background-color: rgba(255, 255, 255, 0.1);}.ace_dark .ace_fold-widget:active {box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);}.ace_inline_button {border: 1px solid lightgray;display: inline-block;margin: -1px 8px;padding: 0 5px;pointer-events: auto;cursor: pointer;}.ace_inline_button:hover {border-color: gray;background: rgba(200,200,200,0.2);display: inline-block;pointer-events: auto;}.ace_fold-widget.ace_invalid {background-color: #FFB4B4;border-color: #DE5555;}.ace_fade-fold-widgets .ace_fold-widget {transition: opacity 0.4s ease 0.05s;opacity: 0;}.ace_fade-fold-widgets:hover .ace_fold-widget {transition: opacity 0.05s ease 0.05s;opacity:1;}.ace_underline {text-decoration: underline;}.ace_bold {font-weight: bold;}.ace_nobold .ace_bold {font-weight: normal;}.ace_italic {font-style: italic;}.ace_error-marker {background-color: rgba(255, 0, 0,0.2);position: absolute;z-index: 9;}.ace_highlight-marker {background-color: rgba(255, 255, 0,0.2);position: absolute;z-index: 8;}.ace_mobile-menu {position: absolute;line-height: 1.5;border-radius: 4px;-ms-user-select: none;-moz-user-select: none;-webkit-user-select: none;user-select: none;background: white;box-shadow: 1px 3px 2px grey;border: 1px solid #dcdcdc;color: black;}.ace_dark > .ace_mobile-menu {background: #333;color: #ccc;box-shadow: 1px 3px 2px grey;border: 1px solid #444;}.ace_mobile-button {padding: 2px;cursor: pointer;overflow: hidden;}.ace_mobile-button:hover {background-color: #eee;opacity:1;}.ace_mobile-button:active {background-color: #ddd;}.ace_placeholder {font-family: arial;transform: scale(0.9);transform-origin: left;white-space: pre;opacity: 0.7;margin: 0 10px;}',g=e("./lib/useragent"),v=g.isIE;i.importCssString(m,"ace_editor.css");var b=function(e,t){var n=this;this.container=e||i.createElement("div"),i.addCssClass(this.container,"ace_editor"),i.HI_DPI&&i.addCssClass(this.container,"ace_hidpi"),this.setTheme(t),this.$gutter=i.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden",!0),this.scroller=i.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=i.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new s(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new a(this.content);var r=this.$textLayer=new l(this.content);this.canvas=r.element,this.$markerFront=new a(this.content),this.$cursorLayer=new c(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new h(this.container,this),this.scrollBarH=new u(this.container,this),this.scrollBarV.on("scroll",(function(e){n.$scrollAnimation||n.session.setScrollTop(e.data-n.scrollMargin.top)})),this.scrollBarH.on("scroll",(function(e){n.$scrollAnimation||n.session.setScrollLeft(e.data-n.scrollMargin.left)})),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new p(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.on("changeCharacterSize",(function(e){n.updateCharacterSize(),n.onResize(!0,n.gutterWidth,n.$size.width,n.$size.height),n._signal("changeCharacterSize",e)})),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0,$dirty:!0},this.layerConfig={width:1,padding:0,firstRow:0,firstRowScreen:0,lastRow:0,lineHeight:0,characterWidth:0,minHeight:1,maxHeight:1,offset:0,height:1,gutterOffset:1},this.scrollMargin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.margin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.$keepTextAreaAtCursor=!g.isIOS,this.$loop=new d(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),o.resetOptions(this),o._signal("renderer",this)};(function(){this.CHANGE_CURSOR=1,this.CHANGE_MARKER=2,this.CHANGE_GUTTER=4,this.CHANGE_SCROLL=8,this.CHANGE_LINES=16,this.CHANGE_TEXT=32,this.CHANGE_SIZE=64,this.CHANGE_MARKER_BACK=128,this.CHANGE_MARKER_FRONT=256,this.CHANGE_FULL=512,this.CHANGE_H_SCROLL=1024,r.implement(this,f),this.updateCharacterSize=function(){this.$textLayer.allowBoldFonts!=this.$allowBoldFonts&&(this.$allowBoldFonts=this.$textLayer.allowBoldFonts,this.setStyle("ace_nobold",!this.$allowBoldFonts)),this.layerConfig.characterWidth=this.characterWidth=this.$textLayer.getCharacterWidth(),this.layerConfig.lineHeight=this.lineHeight=this.$textLayer.getLineHeight(),this.$updatePrintMargin(),i.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},this.setSession=function(e){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=e,e&&this.scrollMargin.top&&e.getScrollTop()<=0&&e.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(e),this.$markerBack.setSession(e),this.$markerFront.setSession(e),this.$gutterLayer.setSession(e),this.$textLayer.setSession(e),e&&(this.$loop.schedule(this.CHANGE_FULL),this.session.$setFontMetrics(this.$fontMetrics),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.onChangeNewLineMode=this.onChangeNewLineMode.bind(this),this.onChangeNewLineMode(),this.session.doc.on("changeNewLineMode",this.onChangeNewLineMode))},this.updateLines=function(e,t,n){if(void 0===t&&(t=1/0),this.$changedLines?(this.$changedLines.firstRow>e&&(this.$changedLines.firstRow=e),this.$changedLines.lastRow<t&&(this.$changedLines.lastRow=t)):this.$changedLines={firstRow:e,lastRow:t},this.$changedLines.lastRow<this.layerConfig.firstRow){if(!n)return;this.$changedLines.lastRow=this.layerConfig.lastRow}this.$changedLines.firstRow>this.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},this.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},this.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},this.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},this.updateFull=function(e){e?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},this.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},this.$changes=0,this.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},this.onResize=function(e,t,n,r){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=e?1:0;var i=this.container;r||(r=i.clientHeight||i.scrollHeight),n||(n=i.clientWidth||i.scrollWidth);var o=this.$updateCachedSize(e,t,n,r);if(!this.$size.scrollerHeight||!n&&!r)return this.resizing=0;e&&(this.$gutterLayer.$padding=null),e?this.$renderChanges(o|this.$changes,!0):this.$loop.schedule(o|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarV.scrollLeft=this.scrollBarV.scrollTop=null}},this.$updateCachedSize=function(e,t,n,r){r-=this.$extraHeight||0;var o=0,s=this.$size,a={width:s.width,height:s.height,scrollerHeight:s.scrollerHeight,scrollerWidth:s.scrollerWidth};if(r&&(e||s.height!=r)&&(s.height=r,o|=this.CHANGE_SIZE,s.scrollerHeight=s.height,this.$horizScroll&&(s.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",o|=this.CHANGE_SCROLL),n&&(e||s.width!=n)){o|=this.CHANGE_SIZE,s.width=n,null==t&&(t=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=t,i.setStyle(this.scrollBarH.element.style,"left",t+"px"),i.setStyle(this.scroller.style,"left",t+this.margin.left+"px"),s.scrollerWidth=Math.max(0,n-t-this.scrollBarV.getWidth()-this.margin.h),i.setStyle(this.$gutter.style,"left",this.margin.left+"px");var l=this.scrollBarV.getWidth()+"px";i.setStyle(this.scrollBarH.element.style,"right",l),i.setStyle(this.scroller.style,"right",l),i.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||e)&&(o|=this.CHANGE_FULL)}return s.$dirty=!n||!r,o&&this._signal("resize",a),o},this.onGutterResize=function(e){var t=this.$showGutter?e:0;t!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,t,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()||this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):this.$computeLayerConfig()},this.adjustWrapLimit=function(){var e=this.$size.scrollerWidth-2*this.$padding,t=Math.floor(e/this.characterWidth);return this.session.adjustWrapLimit(t,this.$showPrintMargin&&this.$printMarginColumn)},this.setAnimatedScroll=function(e){this.setOption("animatedScroll",e)},this.getAnimatedScroll=function(){return this.$animatedScroll},this.setShowInvisibles=function(e){this.setOption("showInvisibles",e),this.session.$bidiHandler.setShowInvisibles(e)},this.getShowInvisibles=function(){return this.getOption("showInvisibles")},this.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},this.setDisplayIndentGuides=function(e){this.setOption("displayIndentGuides",e)},this.setShowPrintMargin=function(e){this.setOption("showPrintMargin",e)},this.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},this.setPrintMarginColumn=function(e){this.setOption("printMarginColumn",e)},this.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},this.getShowGutter=function(){return this.getOption("showGutter")},this.setShowGutter=function(e){return this.setOption("showGutter",e)},this.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},this.setFadeFoldWidgets=function(e){this.setOption("fadeFoldWidgets",e)},this.setHighlightGutterLine=function(e){this.setOption("highlightGutterLine",e)},this.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},this.$updatePrintMargin=function(){if(this.$showPrintMargin||this.$printMarginEl){if(!this.$printMarginEl){var e=i.createElement("div");e.className="ace_layer ace_print-margin-layer",this.$printMarginEl=i.createElement("div"),this.$printMarginEl.className="ace_print-margin",e.appendChild(this.$printMarginEl),this.content.insertBefore(e,this.content.firstChild)}var t=this.$printMarginEl.style;t.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",t.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&-1==this.session.$wrap&&this.adjustWrapLimit()}},this.getContainerElement=function(){return this.container},this.getMouseEventTarget=function(){return this.scroller},this.getTextAreaContainer=function(){return this.container},this.$moveTextAreaToCursor=function(){if(!this.$isMousePressed){var e=this.textarea.style,t=this.$composition;if(this.$keepTextAreaAtCursor||t){var n=this.$cursorLayer.$pixelPos;if(n){t&&t.markerRange&&(n=this.$cursorLayer.getPixelPosition(t.markerRange.start,!0));var r=this.layerConfig,o=n.top,s=n.left;o-=r.offset;var a=t&&t.useTextareaForIME?this.lineHeight:v?0:1;if(o<0||o>r.height-a)i.translate(this.textarea,0,0);else{var l=1,c=this.$size.height-a;if(t)if(t.useTextareaForIME){var u=this.textarea.value;l=this.characterWidth*this.session.$getStringScreenWidth(u)[0]}else o+=this.lineHeight+2;else o+=this.lineHeight;(s-=this.scrollLeft)>this.$size.scrollerWidth-l&&(s=this.$size.scrollerWidth-l),s+=this.gutterWidth+this.margin.left,i.setStyle(e,"height",a+"px"),i.setStyle(e,"width",l+"px"),i.translate(this.textarea,Math.min(s,this.$size.scrollerWidth-l),Math.min(o,c))}}}else i.translate(this.textarea,-100,0)}},this.getFirstVisibleRow=function(){return this.layerConfig.firstRow},this.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(0===this.layerConfig.offset?0:1)},this.getLastFullyVisibleRow=function(){var e=this.layerConfig,t=e.lastRow;return this.session.documentToScreenRow(t,0)*e.lineHeight-this.session.getScrollTop()>e.height-e.lineHeight?t-1:t},this.getLastVisibleRow=function(){return this.layerConfig.lastRow},this.$padding=null,this.setPadding=function(e){this.$padding=e,this.$textLayer.setPadding(e),this.$cursorLayer.setPadding(e),this.$markerFront.setPadding(e),this.$markerBack.setPadding(e),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},this.setScrollMargin=function(e,t,n,r){var i=this.scrollMargin;i.top=0|e,i.bottom=0|t,i.right=0|r,i.left=0|n,i.v=i.top+i.bottom,i.h=i.left+i.right,i.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-i.top),this.updateFull()},this.setMargin=function(e,t,n,r){var i=this.margin;i.top=0|e,i.bottom=0|t,i.right=0|r,i.left=0|n,i.v=i.top+i.bottom,i.h=i.left+i.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},this.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},this.setHScrollBarAlwaysVisible=function(e){this.setOption("hScrollBarAlwaysVisible",e)},this.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},this.setVScrollBarAlwaysVisible=function(e){this.setOption("vScrollBarAlwaysVisible",e)},this.$updateScrollBarV=function(){var e=this.layerConfig.maxHeight,t=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(e-=(t-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>e-t&&(e=this.scrollTop+t,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(e+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},this.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},this.$frozen=!1,this.freeze=function(){this.$frozen=!0},this.unfreeze=function(){this.$frozen=!1},this.$renderChanges=function(e,t){if(this.$changes&&(e|=this.$changes,this.$changes=0),this.session&&this.container.offsetWidth&&!this.$frozen&&(e||t)){if(this.$size.$dirty)return this.$changes|=e,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",e),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var n=this.layerConfig;if(e&this.CHANGE_FULL||e&this.CHANGE_SIZE||e&this.CHANGE_TEXT||e&this.CHANGE_LINES||e&this.CHANGE_SCROLL||e&this.CHANGE_H_SCROLL){if(e|=this.$computeLayerConfig()|this.$loop.clear(),n.firstRow!=this.layerConfig.firstRow&&n.firstRowScreen==this.layerConfig.firstRowScreen){var r=this.scrollTop+(n.firstRow-this.layerConfig.firstRow)*this.lineHeight;r>0&&(this.scrollTop=r,e|=this.CHANGE_SCROLL,e|=this.$computeLayerConfig()|this.$loop.clear())}n=this.layerConfig,this.$updateScrollBarV(),e&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),i.translate(this.content,-this.scrollLeft,-n.offset);var o=n.width+2*this.$padding+"px",s=n.minHeight+"px";i.setStyle(this.content.style,"width",o),i.setStyle(this.content.style,"height",s)}if(e&this.CHANGE_H_SCROLL&&(i.translate(this.content,-this.scrollLeft,-n.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller":"ace_scroller ace_scroll-left"),e&this.CHANGE_FULL)return this.$changedLines=null,this.$textLayer.update(n),this.$showGutter&&this.$gutterLayer.update(n),this.$markerBack.update(n),this.$markerFront.update(n),this.$cursorLayer.update(n),this.$moveTextAreaToCursor(),void this._signal("afterRender",e);if(e&this.CHANGE_SCROLL)return this.$changedLines=null,e&this.CHANGE_TEXT||e&this.CHANGE_LINES?this.$textLayer.update(n):this.$textLayer.scrollLines(n),this.$showGutter&&(e&this.CHANGE_GUTTER||e&this.CHANGE_LINES?this.$gutterLayer.update(n):this.$gutterLayer.scrollLines(n)),this.$markerBack.update(n),this.$markerFront.update(n),this.$cursorLayer.update(n),this.$moveTextAreaToCursor(),void this._signal("afterRender",e);e&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(n),this.$showGutter&&this.$gutterLayer.update(n)):e&this.CHANGE_LINES?(this.$updateLines()||e&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(n):e&this.CHANGE_TEXT||e&this.CHANGE_GUTTER?this.$showGutter&&this.$gutterLayer.update(n):e&this.CHANGE_CURSOR&&this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(n),e&this.CHANGE_CURSOR&&(this.$cursorLayer.update(n),this.$moveTextAreaToCursor()),e&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(n),e&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(n),this._signal("afterRender",e)}else this.$changes|=e},this.$autosize=function(){var e=this.session.getScreenLength()*this.lineHeight,t=this.$maxLines*this.lineHeight,n=Math.min(t,Math.max((this.$minLines||1)*this.lineHeight,e))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(n+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&n>this.$maxPixelHeight&&(n=this.$maxPixelHeight);var r=!(n<=2*this.lineHeight)&&e>t;if(n!=this.desiredHeight||this.$size.height!=this.desiredHeight||r!=this.$vScroll){r!=this.$vScroll&&(this.$vScroll=r,this.scrollBarV.setVisible(r));var i=this.container.clientWidth;this.container.style.height=n+"px",this.$updateCachedSize(!0,this.$gutterWidth,i,n),this.desiredHeight=n,this._signal("autosize")}},this.$computeLayerConfig=function(){var e=this.session,t=this.$size,n=t.height<=2*this.lineHeight,r=this.session.getScreenLength()*this.lineHeight,i=this.$getLongestLine(),o=!n&&(this.$hScrollBarAlwaysVisible||t.scrollerWidth-i-2*this.$padding<0),s=this.$horizScroll!==o;s&&(this.$horizScroll=o,this.scrollBarH.setVisible(o));var a=this.$vScroll;this.$maxLines&&this.lineHeight>1&&this.$autosize();var l=t.scrollerHeight+this.lineHeight,c=!this.$maxLines&&this.$scrollPastEnd?(t.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;r+=c;var u=this.scrollMargin;this.session.setScrollTop(Math.max(-u.top,Math.min(this.scrollTop,r-t.scrollerHeight+u.bottom))),this.session.setScrollLeft(Math.max(-u.left,Math.min(this.scrollLeft,i+2*this.$padding-t.scrollerWidth+u.right)));var h=!n&&(this.$vScrollBarAlwaysVisible||t.scrollerHeight-r+c<0||this.scrollTop>u.top),d=a!==h;d&&(this.$vScroll=h,this.scrollBarV.setVisible(h));var p,f,m=this.scrollTop%this.lineHeight,g=Math.ceil(l/this.lineHeight)-1,v=Math.max(0,Math.round((this.scrollTop-m)/this.lineHeight)),b=v+g,y=this.lineHeight;v=e.screenToDocumentRow(v,0);var w=e.getFoldLine(v);w&&(v=w.start.row),p=e.documentToScreenRow(v,0),f=e.getRowLength(v)*y,b=Math.min(e.screenToDocumentRow(b,0),e.getLength()-1),l=t.scrollerHeight+e.getRowLength(b)*y+f,m=this.scrollTop-p*y;var k=0;return(this.layerConfig.width!=i||s)&&(k=this.CHANGE_H_SCROLL),(s||d)&&(k|=this.$updateCachedSize(!0,this.gutterWidth,t.width,t.height),this._signal("scrollbarVisibilityChanged"),d&&(i=this.$getLongestLine())),this.layerConfig={width:i,padding:this.$padding,firstRow:v,firstRowScreen:p,lastRow:b,lineHeight:y,characterWidth:this.characterWidth,minHeight:l,maxHeight:r,offset:m,gutterOffset:y?Math.max(0,Math.ceil((m+t.height-t.scrollerHeight)/y)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(i-this.$padding),k},this.$updateLines=function(){if(this.$changedLines){var e=this.$changedLines.firstRow,t=this.$changedLines.lastRow;this.$changedLines=null;var n=this.layerConfig;if(!(e>n.lastRow+1||t<n.firstRow))return t===1/0?(this.$showGutter&&this.$gutterLayer.update(n),void this.$textLayer.update(n)):(this.$textLayer.updateLines(n,e,t),!0)}},this.$getLongestLine=function(){var e=this.session.getScreenWidth();return this.showInvisibles&&!this.session.$useWrapMode&&(e+=1),this.$textLayer&&e>this.$textLayer.MAX_LINE_LENGTH&&(e=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(e*this.characterWidth))},this.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},this.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},this.addGutterDecoration=function(e,t){this.$gutterLayer.addGutterDecoration(e,t)},this.removeGutterDecoration=function(e,t){this.$gutterLayer.removeGutterDecoration(e,t)},this.updateBreakpoints=function(e){this.$loop.schedule(this.CHANGE_GUTTER)},this.setAnnotations=function(e){this.$gutterLayer.setAnnotations(e),this.$loop.schedule(this.CHANGE_GUTTER)},this.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},this.hideCursor=function(){this.$cursorLayer.hideCursor()},this.showCursor=function(){this.$cursorLayer.showCursor()},this.scrollSelectionIntoView=function(e,t,n){this.scrollCursorIntoView(e,n),this.scrollCursorIntoView(t,n)},this.scrollCursorIntoView=function(e,t,n){if(0!==this.$size.scrollerHeight){var r=this.$cursorLayer.getPixelPosition(e),i=r.left,o=r.top,s=n&&n.top||0,a=n&&n.bottom||0,l=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;l+s>o?(t&&l+s>o+this.lineHeight&&(o-=t*this.$size.scrollerHeight),0===o&&(o=-this.scrollMargin.top),this.session.setScrollTop(o)):l+this.$size.scrollerHeight-a<o+this.lineHeight&&(t&&l+this.$size.scrollerHeight-a<o-this.lineHeight&&(o+=t*this.$size.scrollerHeight),this.session.setScrollTop(o+this.lineHeight+a-this.$size.scrollerHeight));var c=this.scrollLeft;c>i?(i<this.$padding+2*this.layerConfig.characterWidth&&(i=-this.scrollMargin.left),this.session.setScrollLeft(i)):c+this.$size.scrollerWidth<i+this.characterWidth?this.session.setScrollLeft(Math.round(i+this.characterWidth-this.$size.scrollerWidth)):c<=this.$padding&&i-c<this.characterWidth&&this.session.setScrollLeft(0)}},this.getScrollTop=function(){return this.session.getScrollTop()},this.getScrollLeft=function(){return this.session.getScrollLeft()},this.getScrollTopRow=function(){return this.scrollTop/this.lineHeight},this.getScrollBottomRow=function(){return Math.max(0,Math.floor((this.scrollTop+this.$size.scrollerHeight)/this.lineHeight)-1)},this.scrollToRow=function(e){this.session.setScrollTop(e*this.lineHeight)},this.alignCursor=function(e,t){"number"==typeof e&&(e={row:e,column:0});var n=this.$cursorLayer.getPixelPosition(e),r=this.$size.scrollerHeight-this.lineHeight,i=n.top-r*(t||0);return this.session.setScrollTop(i),i},this.STEPS=8,this.$calcSteps=function(e,t){var n,r,i=0,o=this.STEPS,s=[];for(i=0;i<o;++i)s.push((n=i/this.STEPS,r=e,(t-e)*(Math.pow(n-1,3)+1)+r));return s},this.scrollToLine=function(e,t,n,r){var i=this.$cursorLayer.getPixelPosition({row:e,column:0}).top;t&&(i-=this.$size.scrollerHeight/2);var o=this.scrollTop;this.session.setScrollTop(i),!1!==n&&this.animateScrolling(o,r)},this.animateScrolling=function(e,t){var n=this.scrollTop;if(this.$animatedScroll){var r=this;if(e!=n){if(this.$scrollAnimation){var i=this.$scrollAnimation.steps;if(i.length&&(e=i[0])==n)return}var o=r.$calcSteps(e,n);this.$scrollAnimation={from:e,to:n,steps:o},clearInterval(this.$timer),r.session.setScrollTop(o.shift()),r.session.$scrollTop=n,this.$timer=setInterval((function(){if(!r.session)return clearInterval(r.$timer);o.length?(r.session.setScrollTop(o.shift()),r.session.$scrollTop=n):null!=n?(r.session.$scrollTop=-1,r.session.setScrollTop(n),n=null):(r.$timer=clearInterval(r.$timer),r.$scrollAnimation=null,t&&t())}),10)}}},this.scrollToY=function(e){this.scrollTop!==e&&(this.$loop.schedule(this.CHANGE_SCROLL),this.scrollTop=e)},this.scrollToX=function(e){this.scrollLeft!==e&&(this.scrollLeft=e),this.$loop.schedule(this.CHANGE_H_SCROLL)},this.scrollTo=function(e,t){this.session.setScrollTop(t),this.session.setScrollLeft(t)},this.scrollBy=function(e,t){t&&this.session.setScrollTop(this.session.getScrollTop()+t),e&&this.session.setScrollLeft(this.session.getScrollLeft()+e)},this.isScrollableBy=function(e,t){return t<0&&this.session.getScrollTop()>=1-this.scrollMargin.top||(t>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||(e<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||(e>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right||void 0)))},this.pixelToScreenCoordinates=function(e,t){var n;if(this.$hasCssTransforms){n={top:0,left:0};var r=this.$fontMetrics.transformCoordinates([e,t]);e=r[1]-this.gutterWidth-this.margin.left,t=r[0]}else n=this.scroller.getBoundingClientRect();var i=e+this.scrollLeft-n.left-this.$padding,o=i/this.characterWidth,s=Math.floor((t+this.scrollTop-n.top)/this.lineHeight),a=this.$blockCursor?Math.floor(o):Math.round(o);return{row:s,column:a,side:o-a>0?1:-1,offsetX:i}},this.screenToTextCoordinates=function(e,t){var n;if(this.$hasCssTransforms){n={top:0,left:0};var r=this.$fontMetrics.transformCoordinates([e,t]);e=r[1]-this.gutterWidth-this.margin.left,t=r[0]}else n=this.scroller.getBoundingClientRect();var i=e+this.scrollLeft-n.left-this.$padding,o=i/this.characterWidth,s=this.$blockCursor?Math.floor(o):Math.round(o),a=Math.floor((t+this.scrollTop-n.top)/this.lineHeight);return this.session.screenToDocumentPosition(a,Math.max(s,0),i)},this.textToScreenCoordinates=function(e,t){var n=this.scroller.getBoundingClientRect(),r=this.session.documentToScreenPosition(e,t),i=this.$padding+(this.session.$bidiHandler.isBidiRow(r.row,e)?this.session.$bidiHandler.getPosLeft(r.column):Math.round(r.column*this.characterWidth)),o=r.row*this.lineHeight;return{pageX:n.left+i-this.scrollLeft,pageY:n.top+o-this.scrollTop}},this.visualizeFocus=function(){i.addCssClass(this.container,"ace_focus")},this.visualizeBlur=function(){i.removeCssClass(this.container,"ace_focus")},this.showComposition=function(e){this.$composition=e,e.cssText||(e.cssText=this.textarea.style.cssText),null==e.useTextareaForIME&&(e.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(i.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):e.markerId=this.session.addMarker(e.markerRange,"ace_composition_marker","text")},this.setCompositionText=function(e){var t=this.session.selection.cursor;this.addToken(e,"composition_placeholder",t.row,t.column),this.$moveTextAreaToCursor()},this.hideComposition=function(){if(this.$composition){this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),i.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText;var e=this.session.selection.cursor;this.removeExtraToken(e.row,e.column),this.$composition=null,this.$cursorLayer.element.style.display=""}},this.addToken=function(e,t,n,r){var i=this.session;i.bgTokenizer.lines[n]=null;var o={type:t,value:e},s=i.getTokens(n);if(null==r)s.push(o);else for(var a=0,l=0;l<s.length;l++){var c=s[l];if(r<=(a+=c.value.length)){var u=c.value.length-(a-r),h=c.value.slice(0,u),d=c.value.slice(u);s.splice(l,1,{type:c.type,value:h},o,{type:c.type,value:d});break}}this.updateLines(n,n)},this.removeExtraToken=function(e,t){this.updateLines(e,e)},this.setTheme=function(e,t){var n=this;if(this.$themeId=e,n._dispatchEvent("themeChange",{theme:e}),e&&"string"!=typeof e)s(e);else{var r=e||this.$options.theme.initialValue;o.loadModule(["theme",r],s)}function s(r){if(n.$themeId!=e)return t&&t();if(!r||!r.cssClass)throw new Error("couldn't load module "+e+" or it didn't call define");r.$id&&(n.$themeId=r.$id),i.importCssString(r.cssText,r.cssClass,n.container),n.theme&&i.removeCssClass(n.container,n.theme.cssClass);var o="padding"in r?r.padding:"padding"in(n.theme||{})?4:n.$padding;n.$padding&&o!=n.$padding&&n.setPadding(o),n.$theme=r.cssClass,n.theme=r,i.addCssClass(n.container,r.cssClass),i.setCssClass(n.container,"ace_dark",r.isDark),n.$size&&(n.$size.width=0,n.$updateSizeAsync()),n._dispatchEvent("themeLoaded",{theme:r}),t&&t()}},this.getTheme=function(){return this.$themeId},this.setStyle=function(e,t){i.setCssClass(this.container,e,!1!==t)},this.unsetStyle=function(e){i.removeCssClass(this.container,e)},this.setCursorStyle=function(e){i.setStyle(this.scroller.style,"cursor",e)},this.setMouseCursor=function(e){i.setStyle(this.scroller.style,"cursor",e)},this.attachToShadowRoot=function(){i.importCssString(m,"ace_editor.css",this.container)},this.destroy=function(){this.freeze(),this.$fontMetrics.destroy(),this.$cursorLayer.destroy(),this.removeAllListeners(),this.container.textContent=""}}).call(b.prototype),o.defineOptions(b.prototype,"renderer",{animatedScroll:{initialValue:!1},showInvisibles:{set:function(e){this.$textLayer.setShowInvisibles(e)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!1},showPrintMargin:{set:function(){this.$updatePrintMargin()},initialValue:!0},printMarginColumn:{set:function(){this.$updatePrintMargin()},initialValue:80},printMargin:{set:function(e){"number"==typeof e&&(this.$printMarginColumn=e),this.$showPrintMargin=!!e,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(e){this.$gutter.style.display=e?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},fadeFoldWidgets:{set:function(e){i.setCssClass(this.$gutter,"ace_fade-fold-widgets",e)},initialValue:!1},showFoldWidgets:{set:function(e){this.$gutterLayer.setShowFoldWidgets(e),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(e){this.$textLayer.setDisplayIndentGuides(e)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightGutterLine:{set:function(e){this.$gutterLayer.setHighlightGutterLine(e),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},hScrollBarAlwaysVisible:{set:function(e){this.$hScrollBarAlwaysVisible&&this.$horizScroll||this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(e){this.$vScrollBarAlwaysVisible&&this.$vScroll||this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(e){"number"==typeof e&&(e+="px"),this.container.style.fontSize=e,this.updateFontSize()},initialValue:12},fontFamily:{set:function(e){this.container.style.fontFamily=e,this.updateFontSize()}},maxLines:{set:function(e){this.updateFull()}},minLines:{set:function(e){this.$minLines<562949953421311||(this.$minLines=0),this.updateFull()}},maxPixelHeight:{set:function(e){this.updateFull()},initialValue:0},scrollPastEnd:{set:function(e){e=+e||0,this.$scrollPastEnd!=e&&(this.$scrollPastEnd=e,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(e){this.$gutterLayer.$fixedWidth=!!e,this.$loop.schedule(this.CHANGE_GUTTER)}},theme:{set:function(e){this.setTheme(e)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0},hasCssTransforms:{},useTextareaForIME:{initialValue:!g.isMobile&&!g.isIE}}),t.VirtualRenderer=b})),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],(function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/net"),o=e("../lib/event_emitter").EventEmitter,s=e("../config");function a(e){if("undefined"==typeof Worker)return{postMessage:function(){},terminate:function(){}};if(s.get("loadWorkerFromBlob")){var t=function(e){var t="importScripts('"+i.qualifyURL(e)+"');";try{return new Blob([t],{type:"application/javascript"})}catch(e){var n=new(window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder);return n.append(t),n.getBlob("application/javascript")}}(e),n=(window.URL||window.webkitURL).createObjectURL(t);return new Worker(n)}return new Worker(e)}var l=function(e){e.postMessage||(e=this.$createWorkerFromOldConfig.apply(this,arguments)),this.$worker=e,this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.onMessage=this.onMessage.bind(this),this.callbackId=1,this.callbacks={},this.$worker.onmessage=this.onMessage};(function(){r.implement(this,o),this.$createWorkerFromOldConfig=function(t,n,r,i,o){if(e.nameToUrl&&!e.toUrl&&(e.toUrl=e.nameToUrl),s.get("packaged")||!e.toUrl)i=i||s.moduleUrl(n,"worker");else{var l=this.$normalizePath;i=i||l(e.toUrl("ace/worker/worker.js",null,"_"));var c={};t.forEach((function(t){c[t]=l(e.toUrl(t,null,"_").replace(/(\.js)?(\?.*)?$/,""))}))}return this.$worker=a(i),o&&this.send("importScripts",o),this.$worker.postMessage({init:!0,tlns:c,module:n,classname:r}),this.$worker},this.onMessage=function(e){var t=e.data;switch(t.type){case"event":this._signal(t.name,{data:t.data});break;case"call":var n=this.callbacks[t.id];n&&(n(t.data),delete this.callbacks[t.id]);break;case"error":this.reportError(t.data);break;case"log":window.console&&console.log&&console.log.apply(console,t.data)}},this.reportError=function(e){window.console&&console.error&&console.error(e)},this.$normalizePath=function(e){return i.qualifyURL(e)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(e,t){this.$worker.postMessage({command:e,args:t})},this.call=function(e,t,n){if(n){var r=this.callbackId++;this.callbacks[r]=n,t.push(r)}this.send(e,t)},this.emit=function(e,t){try{t.data&&t.data.err&&(t.data.err={message:t.data.err.message,stack:t.data.err.stack,code:t.data.err.code}),this.$worker.postMessage({event:e,data:{data:t.data}})}catch(e){console.error(e.stack)}},this.attachToDocument=function(e){this.$doc&&this.terminate(),this.$doc=e,this.call("setValue",[e.getValue()]),e.on("change",this.changeListener)},this.changeListener=function(e){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),"insert"==e.action?this.deltaQueue.push(e.start,e.lines):this.deltaQueue.push(e.start,e.end)},this.$sendDeltaQueue=function(){var e=this.deltaQueue;e&&(this.deltaQueue=null,e.length>50&&e.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:e}))}}).call(l.prototype);t.UIWorkerClient=function(e,t,n){var r=null,i=!1,a=Object.create(o),c=[],u=new l({messageBuffer:c,terminate:function(){},postMessage:function(e){c.push(e),r&&(i?setTimeout(h):h())}});u.setEmitSync=function(e){i=e};var h=function(){var e=c.shift();e.command?r[e.command].apply(r,e.args):e.event&&a._signal(e.event,e.data)};return a.postMessage=function(e){u.onMessage({data:e})},a.callback=function(e,t){this.postMessage({type:"call",id:t,data:e})},a.emit=function(e,t){this.postMessage({type:"event",name:e,data:t})},s.loadModule(["worker",t],(function(e){for(r=new e[n](a);c.length;)h()})),u},t.WorkerClient=l,t.createWorker=a})),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],(function(e,t,n){"use strict";var r=e("./range").Range,i=e("./lib/event_emitter").EventEmitter,o=e("./lib/oop"),s=function(e,t,n,r,i,o){var s=this;this.length=t,this.session=e,this.doc=e.getDocument(),this.mainClass=i,this.othersClass=o,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate),this.$others=r,this.$onCursorChange=function(){setTimeout((function(){s.onCursorChange()}))},this.$pos=n;var a=e.getUndoManager().$undoStack||e.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=a.length,this.setup(),e.selection.on("changeCursor",this.$onCursorChange)};(function(){o.implement(this,i),this.setup=function(){var e=this,t=this.doc,n=this.session;this.selectionBefore=n.selection.toJSON(),n.selection.inMultiSelectMode&&n.selection.toSingleRange(),this.pos=t.createAnchor(this.$pos.row,this.$pos.column);var i=this.pos;i.$insertRight=!0,i.detach(),i.markerId=n.addMarker(new r(i.row,i.column,i.row,i.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach((function(n){var r=t.createAnchor(n.row,n.column);r.$insertRight=!0,r.detach(),e.others.push(r)})),n.setUndoSelect(!1)},this.showOtherMarkers=function(){if(!this.othersActive){var e=this.session,t=this;this.othersActive=!0,this.others.forEach((function(n){n.markerId=e.addMarker(new r(n.row,n.column,n.row,n.column+t.length),t.othersClass,null,!1)}))}},this.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var e=0;e<this.others.length;e++)this.session.removeMarker(this.others[e].markerId)}},this.onUpdate=function(e){if(this.$updating)return this.updateAnchors(e);var t=e;if(t.start.row===t.end.row&&t.start.row===this.pos.row){this.$updating=!0;var n="insert"===e.action?t.end.column-t.start.column:t.start.column-t.end.column,i=t.start.column>=this.pos.column&&t.start.column<=this.pos.column+this.length+1,o=t.start.column-this.pos.column;if(this.updateAnchors(e),i&&(this.length+=n),i&&!this.session.$fromUndo)if("insert"===e.action)for(var s=this.others.length-1;s>=0;s--){var a={row:(l=this.others[s]).row,column:l.column+o};this.doc.insertMergedLines(a,e.lines)}else if("remove"===e.action)for(s=this.others.length-1;s>=0;s--){var l;a={row:(l=this.others[s]).row,column:l.column+o};this.doc.remove(new r(a.row,a.column,a.row,a.column-n))}this.$updating=!1,this.updateMarkers()}},this.updateAnchors=function(e){this.pos.onChange(e);for(var t=this.others.length;t--;)this.others[t].onChange(e);this.updateMarkers()},this.updateMarkers=function(){if(!this.$updating){var e=this,t=this.session,n=function(n,i){t.removeMarker(n.markerId),n.markerId=t.addMarker(new r(n.row,n.column,n.row,n.column+e.length),i,null,!1)};n(this.pos,this.mainClass);for(var i=this.others.length;i--;)n(this.others[i],this.othersClass)}},this.onCursorChange=function(e){if(!this.$updating&&this.session){var t=this.session.selection.getCursor();t.row===this.pos.row&&t.column>=this.pos.column&&t.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",e)):(this.hideOtherMarkers(),this._emit("cursorLeave",e))}},this.detach=function(){this.session.removeMarker(this.pos&&this.pos.markerId),this.hideOtherMarkers(),this.doc.off("change",this.$onUpdate),this.session.selection.off("changeCursor",this.$onCursorChange),this.session.setUndoSelect(!0),this.session=null},this.cancel=function(){if(-1!==this.$undoStackDepth){for(var e=this.session.getUndoManager(),t=(e.$undoStack||e.$undostack).length-this.$undoStackDepth,n=0;n<t;n++)e.undo(this.session,!0);this.selectionBefore&&this.session.selection.fromJSON(this.selectionBefore)}}}).call(s.prototype),t.PlaceHolder=s})),ace.define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event","ace/lib/useragent"],(function(e,t,n){var r=e("../lib/event"),i=e("../lib/useragent");function o(e,t){return e.row==t.row&&e.column==t.column}t.onMouseDown=function(e){var t=e.domEvent,n=t.altKey,s=t.shiftKey,a=t.ctrlKey,l=e.getAccelKey(),c=e.getButton();if(a&&i.isMac&&(c=t.button),e.editor.inMultiSelectMode&&2==c)e.editor.textInput.onContextMenu(e.domEvent);else if(a||n||l){if(0===c){var u,h=e.editor,d=h.selection,p=h.inMultiSelectMode,f=e.getDocumentPosition(),m=d.getCursor(),g=e.inSelection()||d.isEmpty()&&o(f,m),v=e.x,b=e.y,y=h.session,w=h.renderer.pixelToScreenCoordinates(v,b),k=w;if(h.$mouseHandler.$enableJumpToDef)a&&n||l&&n?u=s?"block":"add":n&&h.$blockSelectEnabled&&(u="block");else if(l&&!n){if(u="add",!p&&s)return}else n&&h.$blockSelectEnabled&&(u="block");if(u&&i.isMac&&t.ctrlKey&&h.$mouseHandler.cancelContextMenu(),"add"==u){if(!p&&g)return;if(!p){var x=d.toOrientedRange();h.addSelectionMarker(x)}var S=d.rangeList.rangeAtPoint(f);h.inVirtualSelectionMode=!0,s&&(S=null,x=d.ranges[0]||x,h.removeSelectionMarker(x)),h.once("mouseup",(function(){var e=d.toOrientedRange();S&&e.isEmpty()&&o(S.cursor,e.cursor)?d.substractPoint(e.cursor):(s?d.substractPoint(x.cursor):x&&(h.removeSelectionMarker(x),d.addRange(x)),d.addRange(e)),h.inVirtualSelectionMode=!1}))}else if("block"==u){var E;e.stop(),h.inVirtualSelectionMode=!0;var _=[],C=function(){var e=h.renderer.pixelToScreenCoordinates(v,b),t=y.screenToDocumentPosition(e.row,e.column,e.offsetX);o(k,e)&&o(t,d.lead)||(k=e,h.selection.moveToPosition(t),h.renderer.scrollCursorIntoView(),h.removeSelectionMarkers(_),_=d.rectangularRangeBlock(k,w),h.$mouseHandler.$clickSelection&&1==_.length&&_[0].isEmpty()&&(_[0]=h.$mouseHandler.$clickSelection.clone()),_.forEach(h.addSelectionMarker,h),h.updateSelectionMarkers())};p&&!l?d.toSingleRange():!p&&l&&(E=d.toOrientedRange(),h.addSelectionMarker(E)),s?w=y.documentToScreenPosition(d.lead):d.moveToPosition(f),k={row:-1,column:-1};var T=C;r.capture(h.container,(function(e){v=e.clientX,b=e.clientY}),(function(e){C(),clearInterval(L),h.removeSelectionMarkers(_),_.length||(_=[d.toOrientedRange()]),E&&(h.removeSelectionMarker(E),d.toSingleRange(E));for(var t=0;t<_.length;t++)d.addRange(_[t]);h.inVirtualSelectionMode=!1,h.$mouseHandler.$clickSelection=null}));var L=setInterval((function(){T()}),20);return e.preventDefault()}}}else 0===c&&e.editor.inMultiSelectMode&&e.editor.exitMultiSelectMode()}})),ace.define("ace/commands/multi_select_commands",["require","exports","module","ace/keyboard/hash_handler"],(function(e,t,n){t.defaultCommands=[{name:"addCursorAbove",description:"Add cursor above",exec:function(e){e.selectMoreLines(-1)},bindKey:{win:"Ctrl-Alt-Up",mac:"Ctrl-Alt-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelow",description:"Add cursor below",exec:function(e){e.selectMoreLines(1)},bindKey:{win:"Ctrl-Alt-Down",mac:"Ctrl-Alt-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorAboveSkipCurrent",description:"Add cursor above (skip current)",exec:function(e){e.selectMoreLines(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Up",mac:"Ctrl-Alt-Shift-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelowSkipCurrent",description:"Add cursor below (skip current)",exec:function(e){e.selectMoreLines(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Down",mac:"Ctrl-Alt-Shift-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreBefore",description:"Select more before",exec:function(e){e.selectMore(-1)},bindKey:{win:"Ctrl-Alt-Left",mac:"Ctrl-Alt-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreAfter",description:"Select more after",exec:function(e){e.selectMore(1)},bindKey:{win:"Ctrl-Alt-Right",mac:"Ctrl-Alt-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextBefore",description:"Select next before",exec:function(e){e.selectMore(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Left",mac:"Ctrl-Alt-Shift-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextAfter",description:"Select next after",exec:function(e){e.selectMore(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Right",mac:"Ctrl-Alt-Shift-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"toggleSplitSelectionIntoLines",description:"Split into lines",exec:function(e){e.multiSelect.rangeCount>1?e.multiSelect.joinSelections():e.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(e){e.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(e){e.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(e){e.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],t.multiSelectCommands=[{name:"singleSelection",description:"Single selection",bindKey:"esc",exec:function(e){e.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(e){return e&&e.inMultiSelectMode}}];var r=e("../keyboard/hash_handler").HashHandler;t.keyboardHandler=new r(t.multiSelectCommands)})),ace.define("ace/multi_select",["require","exports","module","ace/range_list","ace/range","ace/selection","ace/mouse/multi_select_handler","ace/lib/event","ace/lib/lang","ace/commands/multi_select_commands","ace/search","ace/edit_session","ace/editor","ace/config"],(function(e,t,n){var r=e("./range_list").RangeList,i=e("./range").Range,o=e("./selection").Selection,s=e("./mouse/multi_select_handler").onMouseDown,a=e("./lib/event"),l=e("./lib/lang"),c=e("./commands/multi_select_commands");t.commands=c.defaultCommands.concat(c.multiSelectCommands);var u=new(0,e("./search").Search);var h=e("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(h.prototype),function(){this.ranges=null,this.rangeList=null,this.addRange=function(e,t){if(e){if(!this.inMultiSelectMode&&0===this.rangeCount){var n=this.toOrientedRange();if(this.rangeList.add(n),this.rangeList.add(e),2!=this.rangeList.ranges.length)return this.rangeList.removeAll(),t||this.fromOrientedRange(e);this.rangeList.removeAll(),this.rangeList.add(n),this.$onAddRange(n)}e.cursor||(e.cursor=e.end);var r=this.rangeList.add(e);return this.$onAddRange(e),r.length&&this.$onRemoveRange(r),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),t||this.fromOrientedRange(e)}},this.toSingleRange=function(e){e=e||this.ranges[0];var t=this.rangeList.removeAll();t.length&&this.$onRemoveRange(t),e&&this.fromOrientedRange(e)},this.substractPoint=function(e){var t=this.rangeList.substractPoint(e);if(t)return this.$onRemoveRange(t),t[0]},this.mergeOverlappingRanges=function(){var e=this.rangeList.merge();e.length&&this.$onRemoveRange(e)},this.$onAddRange=function(e){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(e),this._signal("addRange",{range:e})},this.$onRemoveRange=function(e){if(this.rangeCount=this.rangeList.ranges.length,1==this.rangeCount&&this.inMultiSelectMode){var t=this.rangeList.ranges.pop();e.push(t),this.rangeCount=0}for(var n=e.length;n--;){var r=this.ranges.indexOf(e[n]);this.ranges.splice(r,1)}this._signal("removeRange",{ranges:e}),0===this.rangeCount&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),(t=t||this.ranges[0])&&!t.isEqual(this.getRange())&&this.fromOrientedRange(t)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new r,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var e=this.ranges.length?this.ranges:[this.getRange()],t=[],n=0;n<e.length;n++){var r=e[n],o=r.start.row,s=r.end.row;if(o===s)t.push(r.clone());else{for(t.push(new i(o,r.start.column,o,this.session.getLine(o).length));++o<s;)t.push(this.getLineRange(o,!0));t.push(new i(s,0,s,r.end.column))}0!=n||this.isBackwards()||(t=t.reverse())}this.toSingleRange();for(n=t.length;n--;)this.addRange(t[n])},this.joinSelections=function(){var e=this.rangeList.ranges,t=e[e.length-1],n=i.fromPoints(e[0].start,t.end);this.toSingleRange(),this.setSelectionRange(n,t.cursor==t.start)},this.toggleBlockSelection=function(){if(this.rangeCount>1){var e=this.rangeList.ranges,t=e[e.length-1],n=i.fromPoints(e[0].start,t.end);this.toSingleRange(),this.setSelectionRange(n,t.cursor==t.start)}else{var r=this.session.documentToScreenPosition(this.cursor),o=this.session.documentToScreenPosition(this.anchor);this.rectangularRangeBlock(r,o).forEach(this.addRange,this)}},this.rectangularRangeBlock=function(e,t,n){var r=[],o=e.column<t.column;if(o)var s=e.column,a=t.column,l=e.offsetX,c=t.offsetX;else s=t.column,a=e.column,l=t.offsetX,c=e.offsetX;var u,h,d,p=e.row<t.row;if(p)var f=e.row,m=t.row;else f=t.row,m=e.row;s<0&&(s=0),f<0&&(f=0),f==m&&(n=!0);for(var g=f;g<=m;g++){var v=i.fromPoints(this.session.screenToDocumentPosition(g,s,l),this.session.screenToDocumentPosition(g,a,c));if(v.isEmpty()){if(u&&(h=v.end,d=u,h.row==d.row&&h.column==d.column))break;u=v.end}v.cursor=o?v.start:v.end,r.push(v)}if(p&&r.reverse(),!n){for(var b=r.length-1;r[b].isEmpty()&&b>0;)b--;if(b>0)for(var y=0;r[y].isEmpty();)y++;for(var w=b;w>=y;w--)r[w].isEmpty()&&r.splice(w,1)}return r}}.call(o.prototype);var d=e("./editor").Editor;function p(e){e.$multiselectOnSessionChange||(e.$onAddRange=e.$onAddRange.bind(e),e.$onRemoveRange=e.$onRemoveRange.bind(e),e.$onMultiSelect=e.$onMultiSelect.bind(e),e.$onSingleSelect=e.$onSingleSelect.bind(e),e.$multiselectOnSessionChange=t.onSessionChange.bind(e),e.$checkMultiselectChange=e.$checkMultiselectChange.bind(e),e.$multiselectOnSessionChange(e),e.on("changeSession",e.$multiselectOnSessionChange),e.on("mousedown",s),e.commands.addCommands(c.defaultCommands),function(e){if(!e.textInput)return;var t=e.textInput.getElement(),n=!1;function r(t){n&&(e.renderer.setMouseCursor(""),n=!1)}a.addListener(t,"keydown",(function(t){var i=18==t.keyCode&&!(t.ctrlKey||t.shiftKey||t.metaKey);e.$blockSelectEnabled&&i?n||(e.renderer.setMouseCursor("crosshair"),n=!0):n&&r()}),e),a.addListener(t,"keyup",r,e),a.addListener(t,"blur",r,e)}(e))}(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(e){e.cursor||(e.cursor=e.end);var t=this.getSelectionStyle();return e.marker=this.session.addMarker(e,"ace_selection",t),this.session.$selectionMarkers.push(e),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,e},this.removeSelectionMarker=function(e){if(e.marker){this.session.removeMarker(e.marker);var t=this.session.$selectionMarkers.indexOf(e);-1!=t&&this.session.$selectionMarkers.splice(t,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(e){for(var t=this.session.$selectionMarkers,n=e.length;n--;){var r=e[n];if(r.marker){this.session.removeMarker(r.marker);var i=t.indexOf(r);-1!=i&&t.splice(i,1)}}this.session.selectionMarkerCount=t.length},this.$onAddRange=function(e){this.addSelectionMarker(e.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(e){this.removeSelectionMarkers(e.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(e){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(c.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(e){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(c.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(e){var t=e.command,n=e.editor;if(n.multiSelect){if(t.multiSelectAction)"forEach"==t.multiSelectAction?r=n.forEachSelection(t,e.args):"forEachLine"==t.multiSelectAction?r=n.forEachSelection(t,e.args,!0):"single"==t.multiSelectAction?(n.exitMultiSelectMode(),r=t.exec(n,e.args||{})):r=t.multiSelectAction(n,e.args||{});else{var r=t.exec(n,e.args||{});n.multiSelect.addRange(n.multiSelect.toOrientedRange()),n.multiSelect.mergeOverlappingRanges()}return r}},this.forEachSelection=function(e,t,n){if(!this.inVirtualSelectionMode){var r,i=n&&n.keepOrder,s=1==n||n&&n.$byLines,a=this.session,l=this.selection,c=l.rangeList,u=(i?l:c).ranges;if(!u.length)return e.exec?e.exec(this,t||{}):e(this,t||{});var h=l._eventRegistry;l._eventRegistry={};var d=new o(a);this.inVirtualSelectionMode=!0;for(var p=u.length;p--;){if(s)for(;p>0&&u[p].start.row==u[p-1].end.row;)p--;d.fromOrientedRange(u[p]),d.index=p,this.selection=a.selection=d;var f=e.exec?e.exec(this,t||{}):e(this,t||{});r||void 0===f||(r=f),d.toOrientedRange(u[p])}d.detach(),this.selection=a.selection=l,this.inVirtualSelectionMode=!1,l._eventRegistry=h,l.mergeOverlappingRanges(),l.ranges[0]&&l.fromOrientedRange(l.ranges[0]);var m=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),m&&m.from==m.to&&this.renderer.animateScrolling(m.from),r}},this.exitMultiSelectMode=function(){this.inMultiSelectMode&&!this.inVirtualSelectionMode&&this.multiSelect.toSingleRange()},this.getSelectedText=function(){var e="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var t=this.multiSelect.rangeList.ranges,n=[],r=0;r<t.length;r++)n.push(this.session.getTextRange(t[r]));var i=this.session.getDocument().getNewLineCharacter();(e=n.join(i)).length==(n.length-1)*i.length&&(e="")}else this.selection.isEmpty()||(e=this.session.getTextRange(this.getSelectionRange()));return e},this.$checkMultiselectChange=function(e,t){if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){var n=this.multiSelect.ranges[0];if(this.multiSelect.isEmpty()&&t==this.multiSelect.anchor)return;var r=t==this.multiSelect.anchor?n.cursor==n.start?n.end:n.start:n.cursor;r.row!=t.row||this.session.$clipPositionToDocument(r.row,r.column).column!=t.column?this.multiSelect.toSingleRange(this.multiSelect.toOrientedRange()):this.multiSelect.mergeOverlappingRanges()}},this.findAll=function(e,t,n){if((t=t||{}).needle=e||t.needle,null==t.needle){var r=this.selection.isEmpty()?this.selection.getWordRange():this.selection.getRange();t.needle=this.session.getTextRange(r)}this.$search.set(t);var i=this.$search.findAll(this.session);if(!i.length)return 0;var o=this.multiSelect;n||o.toSingleRange(i[0]);for(var s=i.length;s--;)o.addRange(i[s],!0);return r&&o.rangeList.rangeAtPoint(r.start)&&o.addRange(r,!0),i.length},this.selectMoreLines=function(e,t){var n=this.selection.toOrientedRange(),r=n.cursor==n.end,o=this.session.documentToScreenPosition(n.cursor);this.selection.$desiredColumn&&(o.column=this.selection.$desiredColumn);var s,a=this.session.screenToDocumentPosition(o.row+e,o.column);if(n.isEmpty())c=a;else var l=this.session.documentToScreenPosition(r?n.end:n.start),c=this.session.screenToDocumentPosition(l.row+e,l.column);r?(s=i.fromPoints(a,c)).cursor=s.start:(s=i.fromPoints(c,a)).cursor=s.end;if(s.desiredColumn=o.column,this.selection.inMultiSelectMode){if(t)var u=n.cursor}else this.selection.addRange(n);this.selection.addRange(s),u&&this.selection.substractPoint(u)},this.transposeSelections=function(e){for(var t=this.session,n=t.multiSelect,r=n.ranges,i=r.length;i--;){if((a=r[i]).isEmpty()){var o=t.getWordRange(a.start.row,a.start.column);a.start.row=o.start.row,a.start.column=o.start.column,a.end.row=o.end.row,a.end.column=o.end.column}}n.mergeOverlappingRanges();var s=[];for(i=r.length;i--;){var a=r[i];s.unshift(t.getTextRange(a))}e<0?s.unshift(s.pop()):s.push(s.shift());for(i=r.length;i--;){o=(a=r[i]).clone();t.replace(a,s[i]),a.start.row=o.start.row,a.start.column=o.start.column}n.fromOrientedRange(n.ranges[0])},this.selectMore=function(e,t,n){var r=this.session,i=r.multiSelect.toOrientedRange();if(!i.isEmpty()||((i=r.getWordRange(i.start.row,i.start.column)).cursor=-1==e?i.start:i.end,this.multiSelect.addRange(i),!n)){var o=r.getTextRange(i),s=function(e,t,n){return u.$options.wrap=!0,u.$options.needle=t,u.$options.backwards=-1==n,u.find(e)}(r,o,e);s&&(s.cursor=-1==e?s.start:s.end,this.session.unfold(s),this.multiSelect.addRange(s),this.renderer.scrollCursorIntoView(null,.5)),t&&this.multiSelect.substractPoint(i.cursor)}},this.alignCursors=function(){var e=this.session,t=e.multiSelect,n=t.ranges,r=-1,o=n.filter((function(e){if(e.cursor.row==r)return!0;r=e.cursor.row}));if(n.length&&o.length!=n.length-1){o.forEach((function(e){t.substractPoint(e.cursor)}));var s=0,a=1/0,c=n.map((function(t){var n=t.cursor,r=e.getLine(n.row).substr(n.column).search(/\S/g);return-1==r&&(r=0),n.column>s&&(s=n.column),r<a&&(a=r),r}));n.forEach((function(t,n){var r=t.cursor,o=s-r.column,u=c[n]-a;o>u?e.insert(r,l.stringRepeat(" ",o-u)):e.remove(new i(r.row,r.column,r.row,r.column-o+u)),t.start.column=t.end.column=s,t.start.row=t.end.row=r.row,t.cursor=t.end})),t.fromOrientedRange(n[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}else{var u=this.selection.getRange(),h=u.start.row,d=u.end.row,p=h==d;if(p){var f,m=this.session.getLength();do{f=this.session.getLine(d)}while(/[=:]/.test(f)&&++d<m);do{f=this.session.getLine(h)}while(/[=:]/.test(f)&&--h>0);h<0&&(h=0),d>=m&&(d=m-1)}var g=this.session.removeFullLines(h,d);g=this.$reAlignText(g,p),this.session.insert({row:h,column:0},g.join("\n")+"\n"),p||(u.start.column=0,u.end.column=g[g.length-1].length),this.selection.setRange(u)}},this.$reAlignText=function(e,t){var n,r,i,o=!0,s=!0;return e.map((function(e){var t=e.match(/(\s*)(.*?)(\s*)([=:].*)/);return t?null==n?(n=t[1].length,r=t[2].length,i=t[3].length,t):(n+r+i!=t[1].length+t[2].length+t[3].length&&(s=!1),n!=t[1].length&&(o=!1),n>t[1].length&&(n=t[1].length),r<t[2].length&&(r=t[2].length),i>t[3].length&&(i=t[3].length),t):[e]})).map(t?c:o?s?function(e){return e[2]?a(n+r-e[2].length)+e[2]+a(i)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}:c:function(e){return e[2]?a(n)+e[2]+a(i)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]});function a(e){return l.stringRepeat(" ",e)}function c(e){return e[2]?a(n)+e[2]+a(r-e[2].length+i)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}}}).call(d.prototype),t.onSessionChange=function(e){var t=e.session;t&&!t.multiSelect&&(t.$selectionMarkers=[],t.selection.$initRangeList(),t.multiSelect=t.selection),this.multiSelect=t&&t.multiSelect;var n=e.oldSession;n&&(n.multiSelect.off("addRange",this.$onAddRange),n.multiSelect.off("removeRange",this.$onRemoveRange),n.multiSelect.off("multiSelect",this.$onMultiSelect),n.multiSelect.off("singleSelect",this.$onSingleSelect),n.multiSelect.lead.off("change",this.$checkMultiselectChange),n.multiSelect.anchor.off("change",this.$checkMultiselectChange)),t&&(t.multiSelect.on("addRange",this.$onAddRange),t.multiSelect.on("removeRange",this.$onRemoveRange),t.multiSelect.on("multiSelect",this.$onMultiSelect),t.multiSelect.on("singleSelect",this.$onSingleSelect),t.multiSelect.lead.on("change",this.$checkMultiselectChange),t.multiSelect.anchor.on("change",this.$checkMultiselectChange)),t&&this.inMultiSelectMode!=t.selection.inMultiSelectMode&&(t.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())},t.MultiSelect=p,e("./config").defineOptions(d.prototype,"editor",{enableMultiselect:{set:function(e){p(this),e?(this.on("changeSession",this.$multiselectOnSessionChange),this.on("mousedown",s)):(this.off("changeSession",this.$multiselectOnSessionChange),this.off("mousedown",s))},value:!0},enableBlockSelect:{set:function(e){this.$blockSelectEnabled=e},value:!0}})})),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],(function(e,t,n){"use strict";var r=e("../../range").Range,i=t.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);return this.foldingStartMarker.test(r)?"start":"markbeginend"==t&&this.foldingStopMarker&&this.foldingStopMarker.test(r)?"end":""},this.getFoldWidgetRange=function(e,t,n){return null},this.indentationBlock=function(e,t,n){var i=/\S/,o=e.getLine(t),s=o.search(i);if(-1!=s){for(var a=n||o.length,l=e.getLength(),c=t,u=t;++t<l;){var h=e.getLine(t).search(i);if(-1!=h){if(h<=s){var d=e.getTokenAt(t,0);if(!d||"string"!==d.type)break}u=t}}if(u>c){var p=e.getLine(u).length;return new r(c,a,u,p)}}},this.openingBracketBlock=function(e,t,n,i,o){var s={row:n,column:i+1},a=e.$findClosingBracket(t,s,o);if(a){var l=e.foldWidgets[a.row];return null==l&&(l=e.getFoldWidget(a.row)),"start"==l&&a.row>s.row&&(a.row--,a.column=e.getLine(a.row).length),r.fromPoints(s,a)}},this.closingBracketBlock=function(e,t,n,i,o){var s={row:n,column:i},a=e.$findOpeningBracket(t,s);if(a)return a.column++,s.column--,r.fromPoints(a,s)}}).call(i.prototype)})),ace.define("ace/theme/textmate",["require","exports","module","ace/lib/dom"],(function(e,t,n){"use strict";t.isDark=!1,t.cssClass="ace-tm",t.cssText='.ace-tm .ace_gutter {background: #f0f0f0;color: #333;}.ace-tm .ace_print-margin {width: 1px;background: #e8e8e8;}.ace-tm .ace_fold {background-color: #6B72E6;}.ace-tm {background-color: #FFFFFF;color: black;}.ace-tm .ace_cursor {color: black;}.ace-tm .ace_invisible {color: rgb(191, 191, 191);}.ace-tm .ace_storage,.ace-tm .ace_keyword {color: blue;}.ace-tm .ace_constant {color: rgb(197, 6, 11);}.ace-tm .ace_constant.ace_buildin {color: rgb(88, 72, 246);}.ace-tm .ace_constant.ace_language {color: rgb(88, 92, 246);}.ace-tm .ace_constant.ace_library {color: rgb(6, 150, 14);}.ace-tm .ace_invalid {background-color: rgba(255, 0, 0, 0.1);color: red;}.ace-tm .ace_support.ace_function {color: rgb(60, 76, 114);}.ace-tm .ace_support.ace_constant {color: rgb(6, 150, 14);}.ace-tm .ace_support.ace_type,.ace-tm .ace_support.ace_class {color: rgb(109, 121, 222);}.ace-tm .ace_keyword.ace_operator {color: rgb(104, 118, 135);}.ace-tm .ace_string {color: rgb(3, 106, 7);}.ace-tm .ace_comment {color: rgb(76, 136, 107);}.ace-tm .ace_comment.ace_doc {color: rgb(0, 102, 255);}.ace-tm .ace_comment.ace_doc.ace_tag {color: rgb(128, 159, 191);}.ace-tm .ace_constant.ace_numeric {color: rgb(0, 0, 205);}.ace-tm .ace_variable {color: rgb(49, 132, 149);}.ace-tm .ace_xml-pe {color: rgb(104, 104, 91);}.ace-tm .ace_entity.ace_name.ace_function {color: #0000A2;}.ace-tm .ace_heading {color: rgb(12, 7, 255);}.ace-tm .ace_list {color:rgb(185, 6, 144);}.ace-tm .ace_meta.ace_tag {color:rgb(0, 22, 142);}.ace-tm .ace_string.ace_regex {color: rgb(255, 0, 0)}.ace-tm .ace_marker-layer .ace_selection {background: rgb(181, 213, 255);}.ace-tm.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px white;}.ace-tm .ace_marker-layer .ace_step {background: rgb(252, 255, 0);}.ace-tm .ace_marker-layer .ace_stack {background: rgb(164, 229, 101);}.ace-tm .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid rgb(192, 192, 192);}.ace-tm .ace_marker-layer .ace_active-line {background: rgba(0, 0, 0, 0.07);}.ace-tm .ace_gutter-active-line {background-color : #dcdcdc;}.ace-tm .ace_marker-layer .ace_selected-word {background: rgb(250, 250, 255);border: 1px solid rgb(200, 200, 250);}.ace-tm .ace_indent-guide {background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;}',t.$id="ace/theme/textmate",e("../lib/dom").importCssString(t.cssText,t.cssClass)})),ace.define("ace/line_widgets",["require","exports","module","ace/lib/dom"],(function(e,t,n){"use strict";var r=e("./lib/dom");function i(e){this.session=e,this.session.widgetManager=this,this.session.getRowLength=this.getRowLength,this.session.$getWidgetScreenLength=this.$getWidgetScreenLength,this.updateOnChange=this.updateOnChange.bind(this),this.renderWidgets=this.renderWidgets.bind(this),this.measureWidgets=this.measureWidgets.bind(this),this.session._changedWidgets=[],this.$onChangeEditor=this.$onChangeEditor.bind(this),this.session.on("change",this.updateOnChange),this.session.on("changeFold",this.updateOnFold),this.session.on("changeEditor",this.$onChangeEditor)}(function(){this.getRowLength=function(e){var t;return t=this.lineWidgets&&this.lineWidgets[e]&&this.lineWidgets[e].rowCount||0,this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+1+t:1+t},this.$getWidgetScreenLength=function(){var e=0;return this.lineWidgets.forEach((function(t){t&&t.rowCount&&!t.hidden&&(e+=t.rowCount)})),e},this.$onChangeEditor=function(e){this.attach(e.editor)},this.attach=function(e){e&&e.widgetManager&&e.widgetManager!=this&&e.widgetManager.detach(),this.editor!=e&&(this.detach(),this.editor=e,e&&(e.widgetManager=this,e.renderer.on("beforeRender",this.measureWidgets),e.renderer.on("afterRender",this.renderWidgets)))},this.detach=function(e){var t=this.editor;if(t){this.editor=null,t.widgetManager=null,t.renderer.off("beforeRender",this.measureWidgets),t.renderer.off("afterRender",this.renderWidgets);var n=this.session.lineWidgets;n&&n.forEach((function(e){e&&e.el&&e.el.parentNode&&(e._inDocument=!1,e.el.parentNode.removeChild(e.el))}))}},this.updateOnFold=function(e,t){var n=t.lineWidgets;if(n&&e.action){for(var r=e.data,i=r.start.row,o=r.end.row,s="add"==e.action,a=i+1;a<o;a++)n[a]&&(n[a].hidden=s);n[o]&&(s?n[i]?n[o].hidden=s:n[i]=n[o]:(n[i]==n[o]&&(n[i]=void 0),n[o].hidden=s))}},this.updateOnChange=function(e){var t=this.session.lineWidgets;if(t){var n=e.start.row,r=e.end.row-n;if(0===r);else if("remove"==e.action){var i=t.splice(n+1,r);!t[n]&&i[i.length-1]&&(t[n]=i.pop()),i.forEach((function(e){e&&this.removeLineWidget(e)}),this),this.$updateRows()}else{var o=new Array(r);t[n]&&null!=t[n].column&&e.start.column>t[n].column&&n++,o.unshift(n,0),t.splice.apply(t,o),this.$updateRows()}}},this.$updateRows=function(){var e=this.session.lineWidgets;if(e){var t=!0;e.forEach((function(e,n){if(e)for(t=!1,e.row=n;e.$oldWidget;)e.$oldWidget.row=n,e=e.$oldWidget})),t&&(this.session.lineWidgets=null)}},this.$registerLineWidget=function(e){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var t=this.session.lineWidgets[e.row];return t&&(e.$oldWidget=t,t.el&&t.el.parentNode&&(t.el.parentNode.removeChild(t.el),t._inDocument=!1)),this.session.lineWidgets[e.row]=e,e},this.addLineWidget=function(e){if(this.$registerLineWidget(e),e.session=this.session,!this.editor)return e;var t=this.editor.renderer;e.html&&!e.el&&(e.el=r.createElement("div"),e.el.innerHTML=e.html),e.el&&(r.addCssClass(e.el,"ace_lineWidgetContainer"),e.el.style.position="absolute",e.el.style.zIndex=5,t.container.appendChild(e.el),e._inDocument=!0,e.coverGutter||(e.el.style.zIndex=3),null==e.pixelHeight&&(e.pixelHeight=e.el.offsetHeight)),null==e.rowCount&&(e.rowCount=e.pixelHeight/t.layerConfig.lineHeight);var n=this.session.getFoldAt(e.row,0);if(e.$fold=n,n){var i=this.session.lineWidgets;e.row!=n.end.row||i[n.start.row]?e.hidden=!0:i[n.start.row]=e}return this.session._emit("changeFold",{data:{start:{row:e.row}}}),this.$updateRows(),this.renderWidgets(null,t),this.onWidgetChanged(e),e},this.removeLineWidget=function(e){if(e._inDocument=!1,e.session=null,e.el&&e.el.parentNode&&e.el.parentNode.removeChild(e.el),e.editor&&e.editor.destroy)try{e.editor.destroy()}catch(e){}if(this.session.lineWidgets){var t=this.session.lineWidgets[e.row];if(t==e)this.session.lineWidgets[e.row]=e.$oldWidget,e.$oldWidget&&this.onWidgetChanged(e.$oldWidget);else for(;t;){if(t.$oldWidget==e){t.$oldWidget=e.$oldWidget;break}t=t.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:e.row}}}),this.$updateRows()},this.getWidgetsAtRow=function(e){for(var t=this.session.lineWidgets,n=t&&t[e],r=[];n;)r.push(n),n=n.$oldWidget;return r},this.onWidgetChanged=function(e){this.session._changedWidgets.push(e),this.editor&&this.editor.renderer.updateFull()},this.measureWidgets=function(e,t){var n=this.session._changedWidgets,r=t.layerConfig;if(n&&n.length){for(var i=1/0,o=0;o<n.length;o++){var s=n[o];if(s&&s.el&&s.session==this.session){if(!s._inDocument){if(this.session.lineWidgets[s.row]!=s)continue;s._inDocument=!0,t.container.appendChild(s.el)}s.h=s.el.offsetHeight,s.fixedWidth||(s.w=s.el.offsetWidth,s.screenWidth=Math.ceil(s.w/r.characterWidth));var a=s.h/r.lineHeight;s.coverLine&&(a-=this.session.getRowLineCount(s.row))<0&&(a=0),s.rowCount!=a&&(s.rowCount=a,s.row<i&&(i=s.row))}}i!=1/0&&(this.session._emit("changeFold",{data:{start:{row:i}}}),this.session.lineWidgetWidth=null),this.session._changedWidgets=[]}},this.renderWidgets=function(e,t){var n=t.layerConfig,r=this.session.lineWidgets;if(r){for(var i=Math.min(this.firstRow,n.firstRow),o=Math.max(this.lastRow,n.lastRow,r.length);i>0&&!r[i];)i--;this.firstRow=n.firstRow,this.lastRow=n.lastRow,t.$cursorLayer.config=n;for(var s=i;s<=o;s++){var a=r[s];if(a&&a.el)if(a.hidden)a.el.style.top=-100-(a.pixelHeight||0)+"px";else{a._inDocument||(a._inDocument=!0,t.container.appendChild(a.el));var l=t.$cursorLayer.getPixelPosition({row:s,column:0},!0).top;a.coverLine||(l+=n.lineHeight*this.session.getRowLineCount(a.row)),a.el.style.top=l-n.offset+"px";var c=a.coverGutter?0:t.gutterWidth;a.fixedWidth||(c-=t.scrollLeft),a.el.style.left=c+"px",a.fullWidth&&a.screenWidth&&(a.el.style.minWidth=n.width+2*n.padding+"px"),a.fixedWidth?a.el.style.right=t.scrollBar.getWidth()+"px":a.el.style.right=""}}}}}).call(i.prototype),t.LineWidgets=i})),ace.define("ace/ext/error_marker",["require","exports","module","ace/line_widgets","ace/lib/dom","ace/range"],(function(e,t,n){"use strict";var r=e("../line_widgets").LineWidgets,i=e("../lib/dom"),o=e("../range").Range;t.showErrorMarker=function(e,t){var n=e.session;n.widgetManager||(n.widgetManager=new r(n),n.widgetManager.attach(e));var s=e.getCursorPosition(),a=s.row,l=n.widgetManager.getWidgetsAtRow(a).filter((function(e){return"errorMarker"==e.type}))[0];l?l.destroy():a-=t;var c,u=function(e,t,n){var r=e.getAnnotations().sort(o.comparePoints);if(r.length){var i=function(e,t,n){for(var r=0,i=e.length-1;r<=i;){var o=r+i>>1,s=n(t,e[o]);if(s>0)r=o+1;else{if(!(s<0))return o;i=o-1}}return-(r+1)}(r,{row:t,column:-1},o.comparePoints);i<0&&(i=-i-1),i>=r.length?i=n>0?0:r.length-1:0===i&&n<0&&(i=r.length-1);var s=r[i];if(s&&n){if(s.row===t){do{s=r[i+=n]}while(s&&s.row===t);if(!s)return r.slice()}var a=[];t=s.row;do{a[n<0?"unshift":"push"](s),s=r[i+=n]}while(s&&s.row==t);return a.length&&a}}}(n,a,t);if(u){var h=u[0];s.column=(h.pos&&"number"!=typeof h.column?h.pos.sc:h.column)||0,s.row=h.row,c=e.renderer.$gutterLayer.$annotations[s.row]}else{if(l)return;c={text:["Looks good!"],className:"ace_ok"}}e.session.unfold(s.row),e.selection.moveToPosition(s);var d={row:s.row,fixedWidth:!0,coverGutter:!0,el:i.createElement("div"),type:"errorMarker"},p=d.el.appendChild(i.createElement("div")),f=d.el.appendChild(i.createElement("div"));f.className="error_widget_arrow "+c.className;var m=e.renderer.$cursorLayer.getPixelPosition(s).left;f.style.left=m+e.renderer.gutterWidth-5+"px",d.el.className="error_widget_wrapper",p.className="error_widget "+c.className,p.innerHTML=c.text.join("<br>"),p.appendChild(i.createElement("div"));var g=function(e,t,n){if(0===t&&("esc"===n||"return"===n))return d.destroy(),{command:"null"}};d.destroy=function(){e.$mouseHandler.isMousePressed||(e.keyBinding.removeKeyboardHandler(g),n.widgetManager.removeLineWidget(d),e.off("changeSelection",d.destroy),e.off("changeSession",d.destroy),e.off("mouseup",d.destroy),e.off("change",d.destroy))},e.keyBinding.addKeyboardHandler(g),e.on("changeSelection",d.destroy),e.on("changeSession",d.destroy),e.on("mouseup",d.destroy),e.on("change",d.destroy),e.session.widgetManager.addLineWidget(d),d.el.onmousedown=e.focus.bind(e),e.renderer.scrollCursorIntoView(null,.5,{bottom:d.el.offsetHeight})},i.importCssString(" .error_widget_wrapper { background: inherit; color: inherit; border:none } .error_widget { border-top: solid 2px; border-bottom: solid 2px; margin: 5px 0; padding: 10px 40px; white-space: pre-wrap; } .error_widget.ace_error, .error_widget_arrow.ace_error{ border-color: #ff5a5a } .error_widget.ace_warning, .error_widget_arrow.ace_warning{ border-color: #F1D817 } .error_widget.ace_info, .error_widget_arrow.ace_info{ border-color: #5a5a5a } .error_widget.ace_ok, .error_widget_arrow.ace_ok{ border-color: #5aaa5a } .error_widget_arrow { position: absolute; border: solid 5px; border-top-color: transparent!important; border-right-color: transparent!important; border-left-color: transparent!important; top: -5px; }","")})),ace.define("ace/ace",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/dom","ace/lib/event","ace/range","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/multi_select","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config"],(function(e,t,r){"use strict";e("./lib/fixoldbrowsers");var i=e("./lib/dom"),o=e("./lib/event"),s=e("./range").Range,a=e("./editor").Editor,l=e("./edit_session").EditSession,c=e("./undomanager").UndoManager,u=e("./virtual_renderer").VirtualRenderer;e("./worker/worker_client"),e("./keyboard/hash_handler"),e("./placeholder"),e("./multi_select"),e("./mode/folding/fold_mode"),e("./theme/textmate"),e("./ext/error_marker"),t.config=e("./config"),t.require=e,t.define=n(48),t.edit=function(e,n){if("string"==typeof e){var r=e;if(!(e=document.getElementById(r)))throw new Error("ace.edit can't find div #"+r)}if(e&&e.env&&e.env.editor instanceof a)return e.env.editor;var s="";if(e&&/input|textarea/i.test(e.tagName)){var l=e;s=l.value,e=i.createElement("pre"),l.parentNode.replaceChild(e,l)}else e&&(s=e.textContent,e.innerHTML="");var c=t.createEditSession(s),h=new a(new u(e),c,n),d={document:c,editor:h,onResize:h.resize.bind(h,null)};return l&&(d.textarea=l),o.addListener(window,"resize",d.onResize),h.on("destroy",(function(){o.removeListener(window,"resize",d.onResize),d.editor.container.env=null})),h.container.env=h.env=d,h},t.createEditSession=function(e,t){var n=new l(e,t);return n.setUndoManager(new c),n},t.Range=s,t.Editor=a,t.EditSession=l,t.UndoManager=c,t.VirtualRenderer=u,t.version=t.config.version})),ace.require(["ace/ace"],(function(n){for(var i in n&&(n.config.init(!0),n.define=ace.define),window.ace||(window.ace=n),n)n.hasOwnProperty(i)&&(window.ace[i]=n[i]);window.ace.default=window.ace,"object"==r(e)&&"object"==r(t)&&e&&(e.exports=window.ace)}))}).call(this,n(11)(e))},function(e,t){e.exports=function(){throw new Error("define cannot be used indirect")}},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__assign||function(){return(o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var s=n(46),a=s.getAceInstance(),l=n(47),c=n(83),u=n(1),h=n(0),d=n(45),p=n(84),f=function(e){function t(t){var n=e.call(this,t)||this;return s.editorEvents.forEach((function(e){n[e]=n[e].bind(n)})),n.debounce=s.debounce,n}return i(t,e),t.prototype.componentDidMount=function(){var e=this,t=this.props,n=t.className,r=t.onBeforeLoad,i=t.mode,o=t.focus,l=t.theme,u=t.fontSize,h=t.value,d=t.defaultValue,f=t.cursorStart,m=t.showGutter,g=t.wrapEnabled,v=t.showPrintMargin,b=t.scrollMargin,y=void 0===b?[0,0,0,0]:b,w=t.keyboardHandler,k=t.onLoad,x=t.commands,S=t.annotations,E=t.markers,_=t.splits;this.editor=a.edit(this.refEditor),this.editor.setTheme("ace/theme/"+l),r&&r(a);var C=Object.keys(this.props.editorProps),T=new c.Split(this.editor.container,"ace/theme/"+l,_);this.editor.env.split=T,this.splitEditor=T.getEditor(0),this.split=T,this.editor.setShowPrintMargin(!1),this.editor.renderer.setShowGutter(!1);var L=this.splitEditor.$options;this.props.debounceChangePeriod&&(this.onChange=this.debounce(this.onChange,this.props.debounceChangePeriod)),T.forEach((function(t,n){for(var r=0;r<C.length;r++)t[C[r]]=e.props.editorProps[C[r]];var o=p(d,n),c=p(h,n,"");t.session.setUndoManager(new a.UndoManager),t.setTheme("ace/theme/"+l),t.renderer.setScrollMargin(y[0],y[1],y[2],y[3]),t.getSession().setMode("ace/mode/"+i),t.setFontSize(u),t.renderer.setShowGutter(m),t.getSession().setUseWrapMode(g),t.setShowPrintMargin(v),t.on("focus",e.onFocus),t.on("blur",e.onBlur),t.on("input",e.onInput),t.on("copy",e.onCopy),t.on("paste",e.onPaste),t.on("change",e.onChange),t.getSession().selection.on("changeSelection",e.onSelectionChange),t.getSession().selection.on("changeCursor",e.onCursorChange),t.session.on("changeScrollTop",e.onScroll),t.setValue(void 0===o?c:o,f);var b=p(S,n,[]),k=p(E,n,[]);t.getSession().setAnnotations(b),k&&k.length>0&&e.handleMarkers(k,t);for(r=0;r<s.editorOptions.length;r++){var _=s.editorOptions[r];L.hasOwnProperty(_)?t.setOption(_,e.props[_]):e.props[_]&&console.warn("ReaceAce: editor option "+_+" was activated but not found. Did you need to import a related tool or did you possibly mispell the option?")}e.handleOptions(e.props,t),Array.isArray(x)&&x.forEach((function(e){"string"==typeof e.exec?t.commands.bindKey(e.bindKey,e.exec):t.commands.addCommand(e)})),w&&t.setKeyboardHandler("ace/keyboard/"+w)})),n&&(this.refEditor.className+=" "+n),o&&this.splitEditor.focus();var A=this.editor.env.split;A.setOrientation("below"===this.props.orientation?A.BELOW:A.BESIDE),A.resize(!0),k&&k(A)},t.prototype.componentDidUpdate=function(e){var t=this,n=e,r=this.props,i=this.editor.env.split;if(r.splits!==n.splits&&i.setSplits(r.splits),r.orientation!==n.orientation&&i.setOrientation("below"===r.orientation?i.BELOW:i.BESIDE),i.forEach((function(e,i){r.mode!==n.mode&&e.getSession().setMode("ace/mode/"+r.mode),r.keyboardHandler!==n.keyboardHandler&&(r.keyboardHandler?e.setKeyboardHandler("ace/keyboard/"+r.keyboardHandler):e.setKeyboardHandler(null)),r.fontSize!==n.fontSize&&e.setFontSize(r.fontSize),r.wrapEnabled!==n.wrapEnabled&&e.getSession().setUseWrapMode(r.wrapEnabled),r.showPrintMargin!==n.showPrintMargin&&e.setShowPrintMargin(r.showPrintMargin),r.showGutter!==n.showGutter&&e.renderer.setShowGutter(r.showGutter);for(var o=0;o<s.editorOptions.length;o++){var a=s.editorOptions[o];r[a]!==n[a]&&e.setOption(a,r[a])}d(r.setOptions,n.setOptions)||t.handleOptions(r,e);var l=p(r.value,i,"");if(e.getValue()!==l){t.silent=!0;var c=e.session.selection.toJSON();e.setValue(l,r.cursorStart),e.session.selection.fromJSON(c),t.silent=!1}var u=p(r.annotations,i,[]),h=p(n.annotations,i,[]);d(u,h)||e.getSession().setAnnotations(u);var f=p(r.markers,i,[]),m=p(n.markers,i,[]);!d(f,m)&&Array.isArray(f)&&t.handleMarkers(f,e)})),r.className!==n.className){var o=this.refEditor.className.trim().split(" ");n.className.trim().split(" ").forEach((function(e){var t=o.indexOf(e);o.splice(t,1)})),this.refEditor.className=" "+r.className+" "+o.join(" ")}r.theme!==n.theme&&i.setTheme("ace/theme/"+r.theme),r.focus&&!n.focus&&this.splitEditor.focus(),r.height===this.props.height&&r.width===this.props.width||this.editor.resize()},t.prototype.componentWillUnmount=function(){this.editor.destroy(),this.editor=null},t.prototype.onChange=function(e){if(this.props.onChange&&!this.silent){var t=[];this.editor.env.split.forEach((function(e){t.push(e.getValue())})),this.props.onChange(t,e)}},t.prototype.onSelectionChange=function(e){if(this.props.onSelectionChange){var t=[];this.editor.env.split.forEach((function(e){t.push(e.getSelection())})),this.props.onSelectionChange(t,e)}},t.prototype.onCursorChange=function(e){if(this.props.onCursorChange){var t=[];this.editor.env.split.forEach((function(e){t.push(e.getSelection())})),this.props.onCursorChange(t,e)}},t.prototype.onFocus=function(e){this.props.onFocus&&this.props.onFocus(e)},t.prototype.onInput=function(e){this.props.onInput&&this.props.onInput(e)},t.prototype.onBlur=function(e){this.props.onBlur&&this.props.onBlur(e)},t.prototype.onCopy=function(e){this.props.onCopy&&this.props.onCopy(e)},t.prototype.onPaste=function(e){this.props.onPaste&&this.props.onPaste(e)},t.prototype.onScroll=function(){this.props.onScroll&&this.props.onScroll(this.editor)},t.prototype.handleOptions=function(e,t){for(var n=Object.keys(e.setOptions),r=0;r<n.length;r++)t.setOption(n[r],e.setOptions[n[r]])},t.prototype.handleMarkers=function(e,t){var n=t.getSession().getMarkers(!0);for(var r in n)n.hasOwnProperty(r)&&t.getSession().removeMarker(n[r].id);for(var r in n=t.getSession().getMarkers(!1))n.hasOwnProperty(r)&&t.getSession().removeMarker(n[r].id);e.forEach((function(e){var n=e.startRow,r=e.startCol,i=e.endRow,o=e.endCol,s=e.className,a=e.type,c=e.inFront,u=void 0!==c&&c,h=new l.Range(n,r,i,o);t.getSession().addMarker(h,s,a,u)}))},t.prototype.updateRef=function(e){this.refEditor=e},t.prototype.render=function(){var e=this.props,t=e.name,n=e.width,r=e.height,i=e.style,s=o({width:n,height:r},i);return h.createElement("div",{ref:this.updateRef,id:t,style:s})},t.propTypes={className:u.string,debounceChangePeriod:u.number,defaultValue:u.arrayOf(u.string),focus:u.bool,fontSize:u.oneOfType([u.number,u.string]),height:u.string,mode:u.string,name:u.string,onBlur:u.func,onChange:u.func,onCopy:u.func,onFocus:u.func,onInput:u.func,onLoad:u.func,onPaste:u.func,onScroll:u.func,orientation:u.string,showGutter:u.bool,splits:u.number,theme:u.string,value:u.arrayOf(u.string),width:u.string,onSelectionChange:u.func,onCursorChange:u.func,onBeforeLoad:u.func,minLines:u.number,maxLines:u.number,readOnly:u.bool,highlightActiveLine:u.bool,tabSize:u.number,showPrintMargin:u.bool,cursorStart:u.number,editorProps:u.object,setOptions:u.object,style:u.object,scrollMargin:u.array,annotations:u.array,markers:u.array,keyboardHandler:u.string,wrapEnabled:u.bool,enableBasicAutocompletion:u.oneOfType([u.bool,u.array]),enableLiveAutocompletion:u.oneOfType([u.bool,u.array]),commands:u.array},t.defaultProps={name:"ace-editor",focus:!1,orientation:"beside",splits:2,mode:"",theme:"",height:"500px",width:"500px",value:[],fontSize:12,showGutter:!0,onChange:null,onPaste:null,onLoad:null,onScroll:null,minLines:null,maxLines:null,readOnly:!1,highlightActiveLine:!0,showPrintMargin:!0,tabSize:4,cursorStart:1,editorProps:{},style:{},scrollMargin:[0,0,0,0],setOptions:{},wrapEnabled:!1,enableBasicAutocompletion:!1,enableLiveAutocompletion:!1},t}(h.Component);t.default=f},function(e,t,n){var r=n(51);e.exports=function(e,t,n){"__proto__"==t&&r?r(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}},function(e,t,n){var r=n(8),i=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=i},function(e,t,n){var r=n(12),i=n(6);e.exports=function(e){if(!i(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},function(e,t,n){(function(t){function n(e){return(n="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})(e)}var r="object"==(void 0===t?"undefined":n(t))&&t&&t.Object===Object&&t;e.exports=r}).call(this,n(18))},function(e,t){var n=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return n.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},function(e,t){e.exports=function(e){return e}},function(e,t,n){var r=n(109),i=Math.max;e.exports=function(e,t,n){return t=i(void 0===t?e.length-1:t,0),function(){for(var o=arguments,s=-1,a=i(o.length-t,0),l=Array(a);++s<a;)l[s]=o[t+s];s=-1;for(var c=Array(t+1);++s<t;)c[s]=o[s];return c[t]=n(l),r(e,this,c)}}},function(e,t,n){var r=n(110),i=n(112)(r);e.exports=i},function(e,t){e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},function(e,t){function n(e){return(n="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})(e)}var r=/^(?:0|[1-9]\d*)$/;e.exports=function(e,t){var i=n(e);return!!(t=null==t?9007199254740991:t)&&("number"==i||"symbol"!=i&&r.test(e))&&e>-1&&e%1==0&&e<t}},function(e,t,n){var r=n(114),i=n(61),o=n(10),s=n(62),a=n(59),l=n(117),c=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=o(e),u=!n&&i(e),h=!n&&!u&&s(e),d=!n&&!u&&!h&&l(e),p=n||u||h||d,f=p?r(e.length,String):[],m=f.length;for(var g in e)!t&&!c.call(e,g)||p&&("length"==g||h&&("offset"==g||"parent"==g)||d&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||a(g,m))||f.push(g);return f}},function(e,t,n){var r=n(115),i=n(9),o=Object.prototype,s=o.hasOwnProperty,a=o.propertyIsEnumerable,l=r(function(){return arguments}())?r:function(e){return i(e)&&s.call(e,"callee")&&!a.call(e,"callee")};e.exports=l},function(e,t,n){(function(e){function r(e){return(r="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})(e)}var i=n(3),o=n(116),s="object"==r(t)&&t&&!t.nodeType&&t,a=s&&"object"==r(e)&&e&&!e.nodeType&&e,l=a&&a.exports===s?i.Buffer:void 0,c=(l?l.isBuffer:void 0)||o;e.exports=c}).call(this,n(11)(e))},function(e,t){e.exports=function(e,t){return function(n){return e(t(n))}}},function(e,t,n){"use strict";(e.exports={}).forEach=function(e,t){for(var n=0;n<e.length;n++){var r=t(e[n]);if(r)return r}}},function(e,t,n){"use strict";var r=e.exports={};r.isIE=function(e){return(-1!==(t=navigator.userAgent.toLowerCase()).indexOf("msie")||-1!==t.indexOf("trident")||-1!==t.indexOf(" edge/"))&&(!e||e===function(){var e=3,t=document.createElement("div"),n=t.getElementsByTagName("i");do{t.innerHTML="\x3c!--[if gt IE "+ ++e+"]><i></i><![endif]--\x3e"}while(n[0]);return e>4?e:void 0}());var t},r.isLegacyOpera=function(){return!!window.opera}},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}},function(e,t,n){var r=n(148),i=n(155),o=n(157),s=n(158),a=n(159);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}l.prototype.clear=r,l.prototype.delete=i,l.prototype.get=o,l.prototype.has=s,l.prototype.set=a,e.exports=l},function(e,t,n){var r=n(60),i=n(163),o=n(19);e.exports=function(e){return o(e)?r(e,!0):i(e)}},function(e,t){e.exports=function(){return[]}},function(e,t,n){var r=n(37),i=n(38),o=n(36),s=n(69),a=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)r(t,o(e)),e=i(e);return t}:s;e.exports=a},function(e,t,n){var r=n(37),i=n(10);e.exports=function(e,t,n){var o=t(e);return i(e)?o:r(o,n(e))}},function(e,t,n){var r=n(71),i=n(70),o=n(68);e.exports=function(e){return r(e,o,i)}},function(e,t,n){var r=n(22);e.exports=function(e){if("string"==typeof e||r(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(79),i=n(82);t.diff=i.default;var o=n(49);t.split=o.default,t.default=r.default},function(e,t,n){var r="undefined"!=typeof window,i=r?window.Masonry||n(94):null,o=r?n(99):null,s=n(100),a=n(121),l=n(132),c=n(135),u=n(1),h=n(0),d=n(205),p={enableResizableChildren:u.bool,disableImagesLoaded:u.bool,onImagesLoaded:u.func,updateOnEachImageLoad:u.bool,options:u.object,imagesLoadedOptions:u.object,elementType:u.string,onLayoutComplete:u.func,onRemoveComplete:u.func},f=d({masonry:!1,erd:void 0,latestKnownDomChildren:[],displayName:"MasonryComponent",imagesLoadedCancelRef:void 0,propTypes:p,getDefaultProps:function(){return{enableResizableChildren:!1,disableImagesLoaded:!1,updateOnEachImageLoad:!1,options:{},imagesLoadedOptions:{},className:"",elementType:"div",onLayoutComplete:function(){},onRemoveComplete:function(){}}},initializeMasonry:function(e){this.masonry&&!e||(this.masonry=new i(this.masonryContainer,this.props.options),this.props.onLayoutComplete&&this.masonry.on("layoutComplete",this.props.onLayoutComplete),this.props.onRemoveComplete&&this.masonry.on("removeComplete",this.props.onRemoveComplete),this.latestKnownDomChildren=this.getCurrentDomChildren())},getCurrentDomChildren:function(){var e=this.masonryContainer,t=this.props.options.itemSelector?e.querySelectorAll(this.props.options.itemSelector):e.children;return Array.prototype.slice.call(t)},diffDomChildren:function(){var e=!1,t=this.latestKnownDomChildren.filter((function(e){return!!e.parentNode}));t.length!==this.latestKnownDomChildren.length&&(e=!0);var n=this.getCurrentDomChildren(),r=t.filter((function(e){return!~n.indexOf(e)})),i=n.filter((function(e){return!~t.indexOf(e)})),o=0,s=i.filter((function(e){var t=o===n.indexOf(e);return t&&o++,t})),a=i.filter((function(e){return-1===s.indexOf(e)})),l=[];return 0===r.length&&(l=t.filter((function(e,t){return t!==n.indexOf(e)}))),this.latestKnownDomChildren=n,{old:t,new:n,removed:r,appended:a,prepended:s,moved:l,forceItemReload:e}},performLayout:function(){var e=this.diffDomChildren(),t=e.forceItemReload||e.moved.length>0;e.removed.length>0&&(this.props.enableResizableChildren&&e.removed.forEach(this.erd.removeAllListeners,this.erd),this.masonry.remove(e.removed),t=!0),e.appended.length>0&&(this.masonry.appended(e.appended),0===e.prepended.length&&(t=!0),this.props.enableResizableChildren&&e.appended.forEach(this.listenToElementResize,this)),e.prepended.length>0&&(this.masonry.prepended(e.prepended),this.props.enableResizableChildren&&e.prepended.forEach(this.listenToElementResize,this)),t&&this.masonry.reloadItems(),this.masonry.layout()},derefImagesLoaded:function(){this.imagesLoadedCancelRef(),this.imagesLoadedCancelRef=void 0},imagesLoaded:function(){if(!this.props.disableImagesLoaded){this.imagesLoadedCancelRef&&this.derefImagesLoaded();var e=this.props.updateOnEachImageLoad?"progress":"always",t=l(function(e){this.props.onImagesLoaded&&this.props.onImagesLoaded(e),this.masonry.layout()}.bind(this),100),n=o(this.masonryContainer,this.props.imagesLoadedOptions).on(e,t);this.imagesLoadedCancelRef=function(){n.off(e,t),t.cancel()}}},initializeResizableChildren:function(){this.props.enableResizableChildren&&(this.erd=a({strategy:"scroll"}),this.latestKnownDomChildren.forEach(this.listenToElementResize,this))},listenToElementResize:function(e){this.erd.listenTo(e,function(){this.masonry.layout()}.bind(this))},destroyErd:function(){this.erd&&this.latestKnownDomChildren.forEach(this.erd.uninstall,this.erd)},componentDidMount:function(){this.initializeMasonry(),this.initializeResizableChildren(),this.imagesLoaded()},componentDidUpdate:function(){this.performLayout(),this.imagesLoaded()},componentWillUnmount:function(){this.destroyErd(),this.props.onLayoutComplete&&this.masonry.off("layoutComplete",this.props.onLayoutComplete),this.props.onRemoveComplete&&this.masonry.off("removeComplete",this.props.onRemoveComplete),this.imagesLoadedCancelRef&&this.derefImagesLoaded(),this.masonry.destroy()},setRef:function(e){this.masonryContainer=e},render:function(){var e=c(this.props,Object.keys(p));return h.createElement(this.props.elementType,s({},e,{ref:this.setRef}),this.props.children)}});e.exports=f,e.exports.default=f},function(e,t){e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}},function(e,t,n){var r,i,o;function s(e){return(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})(e)}!function(n){if("undefined"!=typeof window){var a,l=0,c=!1,u=!1,h="message".length,d="[iFrameSizer]",p=d.length,f=null,m=window.requestAnimationFrame,g={max:1,scroll:1,bodyScroll:1,documentElementScroll:1},v={},b=null,y={autoResize:!0,bodyBackground:null,bodyMargin:null,bodyMarginV1:8,bodyPadding:null,checkOrigin:!0,inPageLinks:!1,enablePublicMethods:!0,heightCalculationMethod:"bodyOffset",id:"iFrameResizer",interval:32,log:!1,maxHeight:1/0,maxWidth:1/0,minHeight:0,minWidth:0,resizeFrom:"parent",scrolling:!1,sizeHeight:!0,sizeWidth:!1,warningTimeout:5e3,tolerance:0,widthCalculationMethod:"scroll",onClose:function(){return!0},onClosed:function(){},onInit:function(){},onMessage:function(){L("onMessage function not defined")},onResized:function(){},onScroll:function(){return!0}},w={};window.jQuery&&((a=window.jQuery).fn?a.fn.iFrameResize||(a.fn.iFrameResize=function(e){return this.filter("iframe").each((function(t,n){B(n,e)})).end()}):T("","Unable to bind to jQuery, it is not fully loaded.")),i=[],void 0===(o="function"==typeof(r=q)?r.apply(t,i):r)||(e.exports=o),window.iFrameResize=window.iFrameResize||q()}function k(){return window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver}function x(e,t,n){e.addEventListener(t,n,!1)}function S(e,t,n){e.removeEventListener(t,n,!1)}function E(e){return d+"["+function(e){var t="Host page: "+e;return window.top!==window.self&&(t=window.parentIFrame&&window.parentIFrame.getId?window.parentIFrame.getId()+": "+e:"Nested host page: "+e),t}(e)+"]"}function _(e){return v[e]?v[e].log:c}function C(e,t){A("log",e,t,_(e))}function T(e,t){A("info",e,t,_(e))}function L(e,t){A("warn",e,t,!0)}function A(e,t,n,r){!0===r&&"object"===s(window.console)&&console[e](E(t),n)}function O(e){function t(){i("Height"),i("Width"),D((function(){F(A),P(O),u("onResized",A)}),A,"init")}function n(e){return"border-box"!==e.boxSizing?0:(e.paddingTop?parseInt(e.paddingTop,10):0)+(e.paddingBottom?parseInt(e.paddingBottom,10):0)}function r(e){return"border-box"!==e.boxSizing?0:(e.borderTopWidth?parseInt(e.borderTopWidth,10):0)+(e.borderBottomWidth?parseInt(e.borderBottomWidth,10):0)}function i(e){var t=Number(v[O]["max"+e]),n=Number(v[O]["min"+e]),r=e.toLowerCase(),i=Number(A[r]);C(O,"Checking "+r+" is in range "+n+"-"+t),i<n&&(i=n,C(O,"Set "+r+" to min value")),i>t&&(i=t,C(O,"Set "+r+" to max value")),A[r]=""+i}function o(e){return _.substr(_.indexOf(":")+h+e)}function s(e,t){var n,r,i;n=function(){var n,r;W("Send Page Info","pageInfo:"+(n=document.body.getBoundingClientRect(),r=A.iframe.getBoundingClientRect(),JSON.stringify({iframeHeight:r.height,iframeWidth:r.width,clientHeight:Math.max(document.documentElement.clientHeight,window.innerHeight||0),clientWidth:Math.max(document.documentElement.clientWidth,window.innerWidth||0),offsetTop:parseInt(r.top-n.top,10),offsetLeft:parseInt(r.left-n.left,10),scrollTop:window.pageYOffset,scrollLeft:window.pageXOffset,documentHeight:document.documentElement.clientHeight,documentWidth:document.documentElement.clientWidth,windowHeight:window.innerHeight,windowWidth:window.innerWidth})),e,t)},r=32,w[i=t]||(w[i]=setTimeout((function(){w[i]=null,n()}),r))}function a(e){var t=e.getBoundingClientRect();return j(O),{x:Math.floor(Number(t.left)+Number(f.x)),y:Math.floor(Number(t.top)+Number(f.y))}}function l(e){var t=e?a(A.iframe):{x:0,y:0},n={x:Number(A.width)+t.x,y:Number(A.height)+t.y};C(O,"Reposition requested from iFrame (offset x:"+t.x+" y:"+t.y+")"),window.top!==window.self?window.parentIFrame?window.parentIFrame["scrollTo"+(e?"Offset":"")](n.x,n.y):L(O,"Unable to scroll to requested position, window.parentIFrame not found"):(f=n,c(),C(O,"--"))}function c(){!1!==u("onScroll",f)?P(O):I()}function u(e,t){return R(O,e,t)}var m,g,b,y,k,E,_=e.data,A={},O=null;"[iFrameResizerChild]Ready"===_?function(){for(var e in v)W("iFrame requested init",z(e),v[e].iframe,e)}():d===(""+_).substr(0,p)&&_.substr(p).split(":")[0]in v?(b=_.substr(p).split(":"),y=b[1]?parseInt(b[1],10):0,k=v[b[0]]&&v[b[0]].iframe,E=getComputedStyle(k),A={iframe:k,id:b[0],height:y+n(E)+r(E),width:b[2],type:b[3]},O=A.id,v[O]&&(v[O].loaded=!0),(g=A.type in{true:1,false:1,undefined:1})&&C(O,"Ignoring init message from meta parent page"),!g&&function(e){var t=!0;return v[e]||(t=!1,L(A.type+" No settings for "+e+". Message was: "+_)),t}(O)&&(C(O,"Received: "+_),m=!0,null===A.iframe&&(L(O,"IFrame ("+A.id+") not found"),m=!1),m&&function(){var t,n=e.origin,r=v[O]&&v[O].checkOrigin;if(r&&""+n!="null"&&!(r.constructor===Array?function(){var e=0,t=!1;for(C(O,"Checking connection is from allowed list of origins: "+r);e<r.length;e++)if(r[e]===n){t=!0;break}return t}():(t=v[O]&&v[O].remoteHost,C(O,"Checking connection is from: "+t),n===t)))throw new Error("Unexpected message received from: "+n+" for "+A.iframe.id+". Message was: "+e.data+". This error can be disabled by setting the checkOrigin: false option or by providing of array of trusted domains.");return!0}()&&function(){switch(v[O]&&v[O].firstRun&&v[O]&&(v[O].firstRun=!1),A.type){case"close":M(A.iframe);break;case"message":d=o(6),C(O,"onMessage passed: {iframe: "+A.iframe.id+", message: "+d+"}"),u("onMessage",{iframe:A.iframe,message:JSON.parse(d)}),C(O,"--");break;case"autoResize":v[O].autoResize=JSON.parse(o(9));break;case"scrollTo":l(!1);break;case"scrollToOffset":l(!0);break;case"pageInfo":s(v[O]&&v[O].iframe,O),function(){function e(e,r){function i(){v[n]?s(v[n].iframe,n):t()}["scroll","resize"].forEach((function(t){C(n,e+t+" listener for sendPageInfo"),r(window,t,i)}))}function t(){e("Remove ",S)}var n=O;e("Add ",x),v[n]&&(v[n].stopPageInfo=t)}();break;case"pageInfoStop":v[O]&&v[O].stopPageInfo&&(v[O].stopPageInfo(),delete v[O].stopPageInfo);break;case"inPageLink":e=o(9),r=e.split("#")[1]||"",i=decodeURIComponent(r),(h=document.getElementById(i)||document.getElementsByName(i)[0])?(n=a(h),C(O,"Moving to in page link (#"+r+") at x: "+n.x+" y: "+n.y),f={x:n.x,y:n.y},c(),C(O,"--")):window.top!==window.self?window.parentIFrame?window.parentIFrame.moveToAnchor(r):C(O,"In page link #"+r+" not found and window.parentIFrame not found"):C(O,"In page link #"+r+" not found");break;case"reset":N(A);break;case"init":t(),u("onInit",A.iframe);break;default:t()}var e,n,r,i,h,d}())):T(O,"Ignored: "+_)}function R(e,t,n){var r=null,i=null;if(v[e]){if("function"!=typeof(r=v[e][t]))throw new TypeError(t+" on iFrame["+e+"] is not a function");i=r(n)}return i}function $(e){var t=e.id;delete v[t]}function M(e){var t=e.id;if(!1!==R(t,"onClose",t)){C(t,"Removing iFrame: "+t);try{e.parentNode&&e.parentNode.removeChild(e)}catch(e){L(e)}R(t,"onClosed",t),C(t,"--"),$(e)}else C(t,"Close iframe cancelled by onClose event")}function j(e){null===f&&C(e,"Get page position: "+(f={x:void 0!==window.pageXOffset?window.pageXOffset:document.documentElement.scrollLeft,y:void 0!==window.pageYOffset?window.pageYOffset:document.documentElement.scrollTop}).x+","+f.y)}function P(e){null!==f&&(window.scrollTo(f.x,f.y),C(e,"Set page position: "+f.x+","+f.y),I())}function I(){f=null}function N(e){C(e.id,"Size reset requested by "+("init"===e.type?"host page":"iFrame")),j(e.id),D((function(){F(e),W("reset","reset",e.iframe,e.id)}),e,"reset")}function F(e){function t(t){u||"0"!==e[t]||(u=!0,C(r,"Hidden iFrame detected, creating visibility listener"),function(){function e(){Object.keys(v).forEach((function(e){!function(e){function t(t){return"0px"===(v[e]&&v[e].iframe.style[t])}v[e]&&null!==v[e].iframe.offsetParent&&(t("height")||t("width"))&&W("Visibility change","resize",v[e].iframe,e)}(e)}))}function t(t){C("window","Mutation observed: "+t[0].target+" "+t[0].type),V(e,16)}var n=k();n&&(r=document.querySelector("body"),new n(t).observe(r,{attributes:!0,attributeOldValue:!1,characterData:!0,characterDataOldValue:!1,childList:!0,subtree:!0}));var r}())}function n(n){!function(t){e.id?(e.iframe.style[t]=e[t]+"px",C(e.id,"IFrame ("+r+") "+t+" set to "+e[t]+"px")):C("undefined","messageData id not set")}(n),t(n)}var r=e.iframe.id;v[r]&&(v[r].sizeHeight&&n("height"),v[r].sizeWidth&&n("width"))}function D(e,t,n){n!==t.type&&m&&!window.jasmine?(C(t.id,"Requesting animation frame"),m(e)):e()}function W(e,t,n,r,i){var o,s=!1;r=r||n.id,v[r]&&(n&&"contentWindow"in n&&null!==n.contentWindow?(o=v[r]&&v[r].targetOrigin,C(r,"["+e+"] Sending msg to iframe["+r+"] ("+t+") targetOrigin: "+o),n.contentWindow.postMessage(d+t,o)):L(r,"["+e+"] IFrame("+r+") not found"),i&&v[r]&&v[r].warningTimeout&&(v[r].msgTimeout=setTimeout((function(){!v[r]||v[r].loaded||s||(s=!0,L(r,"IFrame has not responded within "+v[r].warningTimeout/1e3+" seconds. Check iFrameResizer.contentWindow.js has been loaded in iFrame. This message can be ignored if everything is working, or you can set the warningTimeout option to a higher value or zero to suppress this warning."))}),v[r].warningTimeout)))}function z(e){return e+":"+v[e].bodyMarginV1+":"+v[e].sizeWidth+":"+v[e].log+":"+v[e].interval+":"+v[e].enablePublicMethods+":"+v[e].autoResize+":"+v[e].bodyMargin+":"+v[e].heightCalculationMethod+":"+v[e].bodyBackground+":"+v[e].bodyPadding+":"+v[e].tolerance+":"+v[e].inPageLinks+":"+v[e].resizeFrom+":"+v[e].widthCalculationMethod}function B(e,t){function n(e){var t=e.split("Callback");if(2===t.length){var n="on"+t[0].charAt(0).toUpperCase()+t[0].slice(1);this[n]=this[e],delete this[e],L(o,"Deprecated: '"+e+"' has been renamed '"+n+"'. The old method will be removed in the next major version.")}}var r,i,o=function(n){var r;return""===n&&(e.id=(r=t&&t.id||y.id+l++,null!==document.getElementById(r)&&(r+=l++),n=r),c=(t||{}).log,C(n,"Added missing iframe ID: "+n+" ("+e.src+")")),n}(e.id);o in v&&"iFrameResizer"in e?L(o,"Ignored iFrame, already setup."):(!function(t){var r;t=t||{},v[o]={firstRun:!0,iframe:e,remoteHost:e.src&&e.src.split("/").slice(0,3).join("/")},function(e){if("object"!==s(e))throw new TypeError("Options is not an object")}(t),Object.keys(t).forEach(n,t),function(e){for(var t in y)Object.prototype.hasOwnProperty.call(y,t)&&(v[o][t]=Object.prototype.hasOwnProperty.call(e,t)?e[t]:y[t])}(t),v[o]&&(v[o].targetOrigin=!0===v[o].checkOrigin?""===(r=v[o].remoteHost)||null!==r.match(/^(about:blank|javascript:|file:\/\/)/)?"*":r:"*")}(t),function(){switch(C(o,"IFrame scrolling "+(v[o]&&v[o].scrolling?"enabled":"disabled")+" for "+o),e.style.overflow=!1===(v[o]&&v[o].scrolling)?"hidden":"auto",v[o]&&v[o].scrolling){case"omit":break;case!0:e.scrolling="yes";break;case!1:e.scrolling="no";break;default:e.scrolling=v[o]?v[o].scrolling:"no"}}(),function(){function t(t){1/0!==v[o][t]&&0!==v[o][t]&&(e.style[t]=v[o][t]+"px",C(o,"Set "+t+" = "+v[o][t]+"px"))}function n(e){if(v[o]["min"+e]>v[o]["max"+e])throw new Error("Value for min"+e+" can not be greater than max"+e)}n("Height"),n("Width"),t("maxHeight"),t("minHeight"),t("maxWidth"),t("minWidth")}(),"number"!=typeof(v[o]&&v[o].bodyMargin)&&"0"!==(v[o]&&v[o].bodyMargin)||(v[o].bodyMarginV1=v[o].bodyMargin,v[o].bodyMargin=v[o].bodyMargin+"px"),r=z(o),(i=k())&&function(t){e.parentNode&&new t((function(t){t.forEach((function(t){Array.prototype.slice.call(t.removedNodes).forEach((function(t){t===e&&M(e)}))}))})).observe(e.parentNode,{childList:!0})}(i),x(e,"load",(function(){var t,n;W("iFrame.onload",r,e,void 0,!0),t=v[o]&&v[o].firstRun,n=v[o]&&v[o].heightCalculationMethod in g,!t&&n&&N({iframe:e,height:0,width:0,type:"init"})})),W("init",r,e,void 0,!0),v[o]&&(v[o].iframe.iFrameResizer={close:M.bind(null,v[o].iframe),removeListeners:$.bind(null,v[o].iframe),resize:W.bind(null,"Window resize","resize",v[o].iframe),moveToAnchor:function(e){W("Move to anchor","moveToAnchor:"+e,v[o].iframe,o)},sendMessage:function(e){W("Send Message","message:"+(e=JSON.stringify(e)),v[o].iframe,o)}}))}function V(e,t){null===b&&(b=setTimeout((function(){b=null,e()}),t))}function H(){"hidden"!==document.visibilityState&&(C("document","Trigger event: Visiblity change"),V((function(){U("Tab Visable","resize")}),16))}function U(e,t){Object.keys(v).forEach((function(n){(function(e){return v[e]&&"parent"===v[e].resizeFrom&&v[e].autoResize&&!v[e].firstRun})(n)&&W(e,t,v[n].iframe,n)}))}function G(){x(window,"message",O),x(window,"resize",(function(){var e;C("window","Trigger event: "+(e="resize")),V((function(){U("Window "+e,"resize")}),16)})),x(document,"visibilitychange",H),x(document,"-webkit-visibilitychange",H)}function q(){function e(e,n){n&&(!function(){if(!n.tagName)throw new TypeError("Object is not a valid DOM element");if("IFRAME"!==n.tagName.toUpperCase())throw new TypeError("Expected <IFRAME> tag, found <"+n.tagName+">")}(),B(n,e),t.push(n))}var t;return function(){var e,t=["moz","webkit","o","ms"];for(e=0;e<t.length&&!m;e+=1)m=window[t[e]+"RequestAnimationFrame"];m?m=m.bind(window):C("setup","RequestAnimationFrame not supported")}(),G(),function(n,r){switch(t=[],function(e){e&&e.enablePublicMethods&&L("enablePublicMethods option has been removed, public methods are now always available in the iFrame")}(n),s(r)){case"undefined":case"string":Array.prototype.forEach.call(document.querySelectorAll(r||"iframe"),e.bind(void 0,n));break;case"object":e(n,r);break;default:throw new TypeError("Unexpected data type ("+s(r)+")")}return t}}}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return Ho}));var r=n(2),i=n.n(r),o=n(16);function s(e){return(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})(e)}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){c(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function d(e,t){return(d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function p(e,t){return!t||"object"!==s(t)&&"function"!=typeof t?f(e):t}function f(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function m(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function g(e){return(g=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var v=window,b=v.jQuery,y=v.ajaxurl,w=v.VPGutenbergVariables,k=wp.element,x=k.Component,S=k.RawHTML,E=wp.components,_=E.Button,C=E.Spinner,T={},L=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&d(e,t)}(a,e);var t,n,r,o,s=(t=a,function(){var e,n=g(t);if(m()){var r=g(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return p(this,e)});function a(){var e;u(this,a);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=(e=s.call.apply(s,[this].concat(n))).props.callback;return e.state={options:l({},e.props.options),ajaxStatus:!!i},T[e.props.controlName]=l({},e.props.options),e.requestAjax=e.requestAjax.bind(f(e)),e}return n=a,(r=[{key:"componentDidMount",value:function(){var e=this;this.props.callback&&this.requestAjax({},(function(t){t.options&&e.setState({options:t.options})}))}},{key:"requestAjax",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0,r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=this.props,o=i.controlName,s=i.attributes;if(!this.isAJAXinProgress){this.isAJAXinProgress=!0,r&&this.setState({ajaxStatus:"progress"});var a=l({action:"vp_dynamic_control_callback",nonce:w.nonce,vp_control_name:o,vp_attributes:s},t);b.ajax({url:y,method:"POST",dataType:"json",data:a,complete:function(t){var i=t.responseJSON;n&&i.response&&(i.response.options&&(T[o]=l(l({},T[o]),i.response.options)),n(i.response)),r&&e.setState({ajaxStatus:!0}),e.isAJAXinProgress=!1}})}}},{key:"render",value:function(){var e=this.props,t=e.value,n=e.onChange,r=this.state,o=r.options,s=r.ajaxStatus;return s&&"progress"===s?wp.element.createElement("div",{className:"vpf-component-icon-selector"},wp.element.createElement(C,null)):wp.element.createElement("div",{className:"vpf-component-icon-selector"},Object.keys(o||{}).map((function(e){var r=o[e];return wp.element.createElement(_,{key:"icon-selector-".concat(r.title,"-").concat(r.value),onClick:function(){return n(r.value)},className:i()("vpf-component-icon-selector-item",t===r.value?"vpf-component-icon-selector-item-active":"",r.className)},r.icon?wp.element.createElement(S,null,r.icon):"",r.title?wp.element.createElement("span",null,r.title):"")})))}}])&&h(n.prototype,r),o&&h(n,o),a}(x),A=n(74),O=n.n(A);n(86),n(88),n(90),n(91),n(92),n(93);function R(e){return(R="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})(e)}function $(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function M(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function j(e,t){return(j=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function P(e,t){return!t||"object"!==R(t)&&"function"!=typeof t?I(e):t}function I(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function N(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function F(e){return(F=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var D=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&j(e,t)}(s,e);var t,n,r,i,o=(t=s,function(){var e,n=F(t);if(N()){var r=F(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return P(this,e)});function s(){var e;$(this,s);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=o.call.apply(o,[this].concat(n))).state={codePlaceholder:e.props.codePlaceholder},e.maybeRemovePlaceholder=e.maybeRemovePlaceholder.bind(I(e)),e}return n=s,(r=[{key:"componentDidMount",value:function(){this.maybeRemovePlaceholder()}},{key:"maybeRemovePlaceholder",value:function(){var e=this.props.value,t=this.state.codePlaceholder;e&&t&&this.setState({codePlaceholder:""})}},{key:"render",value:function(){var e=this,t=this.props,n=t.value,r=t.onChange,i=t.mode,o=t.maxLines,s=t.minLines,a=this.state.codePlaceholder;return wp.element.createElement(O.a,{className:"vpf-component-code-editor",theme:"textmate",onLoad:function(e){e.renderer.setScrollMargin(16,16,16,16),e.renderer.setPadding(16)},fontSize:12,showPrintMargin:!0,showGutter:!0,highlightActiveLine:!1,width:"100%",setOptions:{enableBasicAutocompletion:!0,enableLiveAutocompletion:!0,enableSnippets:!0,showLineNumbers:!0,printMargin:!1,tabSize:2},editorProps:{$blockScrolling:1/0},value:n||a,onChange:function(t){r(t===a?"":t),e.maybeRemovePlaceholder()},mode:i,maxLines:o,minLines:s})}}])&&M(n.prototype,r),i&&M(n,i),s}(wp.element.Component),W=n(75),z=n.n(W),B=wp.element.useEffect;function V(e){var t=e.children;return B((function(){var e=document.createElement("style");return e.innerHTML=t,document.body.appendChild(e),function(){return document.body.removeChild(e)}}),[t]),null}function H(e){return(H="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})(e)}function U(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function G(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function q(e,t){return(q=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function K(e,t){return!t||"object"!==H(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Y(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function X(e){return(X=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var J=wp.element,Q=J.Component,Z=J.Fragment,ee=wp.components,te=ee.Button,ne=ee.Modal,re=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&q(e,t)}(s,e);var t,n,r,i,o=(t=s,function(){var e,n=X(t);if(Y()){var r=X(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return K(this,e)});function s(){var e;U(this,s);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=o.call.apply(o,[this].concat(n))).state={isOpened:!1},e}return n=s,(r=[{key:"render",value:function(){var e=this,t=this.props,n=t.children,r=t.modalTitle,i=t.buttonLabel,o=this.state.isOpened;return wp.element.createElement(Z,null,wp.element.createElement(te,{isSecondary:!0,onClick:function(){return e.setState({isOpened:!o})}},i),o?wp.element.createElement(ne,{title:r,onRequestClose:function(){return e.setState({isOpened:!o})}},n):"")}}])&&G(n.prototype,r),i&&G(n,i),s}(Q);function ie(e){return(ie="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})(e)}function oe(e){return function(e){if(Array.isArray(e))return se(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return se(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return se(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function se(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ae(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function le(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ce(e,t){return(ce=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ue(e,t){return!t||"object"!==ie(t)&&"function"!=typeof t?he(e):t}function he(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function de(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function pe(e){return(pe=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var fe=wp.i18n.__,me=wp.element,ge=me.Component,ve=me.Fragment,be=wp.components.Button,ye=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ce(e,t)}(a,e);var t,n,r,o,s=(t=a,function(){var e,n=pe(t);if(de()){var r=pe(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return ue(this,e)});function a(){var e;ae(this,a);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=s.call.apply(s,[this].concat(n))).renderPreview=e.renderPreview.bind(he(e)),e}return n=a,(r=[{key:"renderPreview",value:function(e){var t=e.split(/[:|]/),n='[data-tiles-preview="'.concat(e,'"]'),r="";void 0===t[t.length-1]||t[t.length-1]||t.pop();var i=parseInt(t[0],10)||1;if(t.shift(),r+="".concat(n," .vpf-tiles-preview-item-wrap { width: ").concat(100/i,"%; }"),t&&t.length)for(var o=0;o<t.length;o+=1){var s=t[o].split(","),a=parseFloat(s[0])||1,l=parseFloat(s[1])||1,c=".vpf-tiles-preview-item-wrap";1<t.length&&(c+=":nth-of-type(".concat(t.length,"n+").concat(o+1,")")),a&&1!==a&&(r+="".concat(n," ").concat(c," { width: ").concat(100*a/i,"%; }")),r+="".concat(n," ").concat(c," .vpf-tiles-preview-item::after { padding-top: ").concat(100*l,"%; }")}return wp.element.createElement(ve,null,wp.element.createElement(z.a,{elementType:"div","data-tiles-preview":e,options:{transitionDuration:0}},Array.apply(void 0,oe(Array(4*i))).map((function(e){return wp.element.createElement("div",{key:e,className:"vpf-tiles-preview-item-wrap"},wp.element.createElement("div",{className:"vpf-tiles-preview-item"}))}))),wp.element.createElement(V,null,r))}},{key:"render",value:function(){var e=this,t=this.props,n=t.value,r=t.options,o=t.onChange;return wp.element.createElement(ve,null,wp.element.createElement("div",{className:"vpf-component-tiles-selector"},wp.element.createElement(re,{modalTitle:fe("Tiles","@@text_domain"),buttonLabel:fe("Edit Tiles","@@text_domain")},wp.element.createElement("div",{className:"vpf-component-tiles-selector-items"},r.map((function(t){return wp.element.createElement(be,{key:t.value,onClick:function(){return o(t.value)},className:i()("vpf-tiles-preview-button",n===t.value?"vpf-tiles-preview-button-active":"")},e.renderPreview(t.value))})))),wp.element.createElement("div",{className:"vpf-tiles-preview-button"},this.renderPreview(n))))}}])&&le(n.prototype,r),o&&le(n,o),a}(ge);function we(e){return(we="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})(e)}function ke(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function xe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Se(e,t){return(Se=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ee(e,t){return!t||"object"!==we(t)&&"function"!=typeof t?_e(e):t}function _e(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ce(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function Te(e){return(Te=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Le=wp.element.Component,Ae=wp.components.Toolbar,Oe={left:wp.element.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},wp.element.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M19 4H1V5.22222H19V4ZM11.2857 8.88889H1V10.1111H11.2857V8.88889ZM1 13.7778H13.8571V15H1V13.7778Z",fill:"currentColor"})),center:wp.element.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},wp.element.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.57286 13.7778H16.43V15H3.57286V13.7778Z",fill:"currentColor"}),wp.element.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.14 8.88889H4.85429V10.1111H15.14V8.88889Z",fill:"currentColor"}),wp.element.createElement("path",{d:"M1 4H19V5.22222H1V4Z",fill:"currentColor"})),right:wp.element.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},wp.element.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1 4H19V5.22222H1V4ZM8.71429 8.88889H19V10.1111H8.71429V8.88889ZM19 13.7778H6.14286V15H19V13.7778Z",fill:"currentColor"}))},Re={top:wp.element.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},wp.element.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.4046 6.087L10 5.67517L9.59543 6.087L6.16686 9.587L6.976 10.413L9.42857 7.90817V17H10.5714V7.90817L13.024 10.413L13.8331 9.587L10.4046 6.087V6.087ZM18 4.16667V3H2V4.16667H18Z",fill:"currentColor"})),center:wp.element.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},wp.element.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10 7.98287L10.4046 7.58575L12.6903 5.33575L11.8811 4.53925L10.5714 5.82963V1H9.42857V5.82963L8.11886 4.53925L7.30971 5.33575L9.59543 7.58575L10 7.98287ZM10 12.0171L10.4046 12.4142L12.6903 14.6642L11.8811 15.4608L10.5714 14.1704V19H9.42857V14.1704L8.11886 15.4608L7.30971 14.6642L9.59543 12.4142L10 12.0171ZM2 10.5625H18V9.4375H2V10.5625Z",fill:"currentColor"})),bottom:wp.element.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},wp.element.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.4046 13.913L10 14.3248L9.59543 13.913L6.16686 10.413L6.976 9.587L9.42857 12.0918V3H10.5714V12.0918L13.024 9.587L13.8331 10.413L10.4046 13.913V13.913ZM18 15.8333V17H2V15.8333H18Z",fill:"currentColor"}))},$e=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Se(e,t)}(s,e);var t,n,r,i,o=(t=s,function(){var e,n=Te(t);if(Ce()){var r=Te(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return Ee(this,e)});function s(){var e;ke(this,s);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=o.call.apply(o,[this].concat(n))).getAlignObject=e.getAlignObject.bind(_e(e)),e.getAlignString=e.getAlignString.bind(_e(e)),e}return n=s,(r=[{key:"getAlignObject",value:function(){var e="center",t="center",n=this.props.value.split("-");return n[1]?(n[0]&&(t=n[0]),n[1]&&(e=n[1])):n[0]&&(e=n[0]),{h:e,v:t}}},{key:"getAlignString",value:function(e,t){return this.props.extended?"".concat(t&&"center"!==t?"".concat(t,"-"):"").concat(e):e}},{key:"render",value:function(){var e=this,t=this.props,n=t.extended,r=t.onChange,i=this.getAlignObject(),o=[];return Object.keys(Oe).forEach((function(t){o.push({icon:Oe[t],title:"".concat(n?"Horizontal ":"").concat(t.charAt(0).toUpperCase()+t.slice(1)),onClick:function(){return r(e.getAlignString(t,i.v))},isActive:i.h===t})})),n&&(o.push({className:"vpf-component-align-control-separator"}),Object.keys(Re).forEach((function(t){o.push({icon:Re[t],title:"Vertical ".concat(t.charAt(0).toUpperCase()+t.slice(1)),onClick:function(){return r(e.getAlignString(i.h,t))},isActive:i.v===t})}))),wp.element.createElement("div",{className:"vpf-component-align-control"},wp.element.createElement(Ae,{controls:o}))}}])&&xe(n.prototype,r),i&&xe(n,i),s}(Le);function Me(e){return(Me="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})(e)}function je(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Pe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ie(e,t){return(Ie=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ne(e,t){return!t||"object"!==Me(t)&&"function"!=typeof t?Fe(e):t}function Fe(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function De(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function We(e){return(We=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var ze=wp.i18n.__,Be=wp.element.Component,Ve=wp.components,He=Ve.SelectControl,Ue=Ve.TextControl,Ge={"":ze("Auto","@@text_domain"),"16:9":ze("Wide 16:9","@@text_domain"),"21:9":ze("Ultra Wide 21:9","@@text_domain"),"4:3":ze("TV 4:3","@@text_domain"),"3:2":ze("Classic Film 3:2","@@text_domain"),custom:ze("Custom","@@text_domain")},qe=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ie(e,t)}(s,e);var t,n,r,i,o=(t=s,function(){var e,n=We(t);if(De()){var r=We(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return Ne(this,e)});function s(){var e;je(this,s);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=o.call.apply(o,[this].concat(n))).state={isCustom:void 0===Ge[e.props.value]},e.updatePart=e.updatePart.bind(Fe(e)),e}return n=s,(r=[{key:"parseParts",value:function(e){var t="",n="";if(e&&/:/g.test(e)){var r=e.split(":");t=r[0],n=r[1]}return[t,n]}},{key:"updatePart",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=this.props,r=n.value,i=n.onChange,o=this.parseParts(r);e&&o[0]&&o[1]&&(t?o[0]=e:o[1]=e,i("".concat(o[0],":").concat(o[1])))}},{key:"render",value:function(){var e=this,t=this.props,n=t.value,r=t.onChange,i=this.state.isCustom,o=this.parseParts(n);return wp.element.createElement("div",{className:"vpf-component-aspect-ratio"},wp.element.createElement(He,{value:i?"custom":n,onChange:function(t){"custom"===t?e.setState({isCustom:!0}):(e.setState({isCustom:!1}),r(t))},options:Object.keys(Ge).map((function(e){return{label:Ge[e],value:e}}))}),i?wp.element.createElement("div",{className:"vpf-component-aspect-ratio-custom"},wp.element.createElement(Ue,{label:ze("Width","@@text_domain"),type:"number",value:o[0],onChange:function(t){return e.updatePart(t,!0)}}),wp.element.createElement(Ue,{label:ze("Height","@@text_domain"),type:"number",value:o[1],onChange:function(t){return e.updatePart(t,!1)}})):"")}}])&&Pe(n.prototype,r),i&&Pe(n,i),s}(Be),Ke=n(42);function Ye(e){return(Ye="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})(e)}function Xe(e){return function(e){if(Array.isArray(e))return Je(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return Je(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Je(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Je(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Qe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ze(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Qe(Object(n),!0).forEach((function(t){et(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Qe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function et(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tt(){return(tt=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function nt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function rt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function it(e,t){return(it=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ot(e,t){return!t||"object"!==Ye(t)&&"function"!=typeof t?st(e):t}function st(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function at(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function lt(e){return(lt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var ct=wp.i18n.__,ut=wp.element,ht=ut.Component,dt=ut.Fragment,pt=wp.components,ft=pt.PanelBody,mt=pt.Button,gt=pt.DropdownMenu,vt=pt.Dropdown,bt=pt.Toolbar,yt=pt.BaseControl,wt={left:wp.element.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},wp.element.createElement("rect",{x:"0.75",y:"0.75",width:"18.5",height:"18.5",rx:"3.25",fill:"transparent",stroke:"currentColor",strokeWidth:"1.5"}),wp.element.createElement("line",{x1:"4.5",y1:"4.5",x2:"4.5",y2:"15.5",fill:"transparent",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round"}),wp.element.createElement("line",{x1:"9.5",y1:"4.5",x2:"9.5",y2:"15.5",fill:"transparent",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round"})),center:wp.element.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},wp.element.createElement("rect",{x:"0.75",y:"0.75",width:"18.5",height:"18.5",rx:"3.25",fill:"transparent",stroke:"currentColor",strokeWidth:"1.5"}),wp.element.createElement("line",{x1:"7.5",y1:"4.5",x2:"7.5",y2:"15.5",fill:"transparent",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round"}),wp.element.createElement("line",{x1:"12.5",y1:"4.5",x2:"12.5",y2:"15.5",fill:"transparent",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round"})),right:wp.element.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},wp.element.createElement("rect",{x:"0.75",y:"0.75",width:"18.5",height:"18.5",rx:"3.25",fill:"transparent",stroke:"currentColor",strokeWidth:"1.5"}),wp.element.createElement("line",{x1:"15.5",y1:"15.5",x2:"15.5",y2:"4.5",fill:"transparent",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round"}),wp.element.createElement("line",{x1:"10.5",y1:"15.5",x2:"10.5",y2:"4.5",fill:"transparent",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round"})),between:wp.element.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},wp.element.createElement("rect",{x:"0.75",y:"0.75",width:"18.5",height:"18.5",rx:"3.25",fill:"transparent",stroke:"currentColor",strokeWidth:"1.5"}),wp.element.createElement("line",{x1:"15.5",y1:"15.5",x2:"15.5",y2:"4.5",fill:"transparent",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round"}),wp.element.createElement("line",{x1:"4.5",y1:"15.5",x2:"4.5",y2:"4.5",fill:"transparent",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round"}))},kt=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&it(e,t)}(a,e);var t,n,r,o,s=(t=a,function(){var e,n=lt(t);if(at()){var r=lt(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return ot(this,e)});function a(){var e;nt(this,a);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=s.call.apply(s,[this].concat(n))).getLocationData=e.getLocationData.bind(st(e)),e.renderOptions=e.renderOptions.bind(st(e)),e.renderLocation=e.renderLocation.bind(st(e)),e.renderAlignSettings=e.renderAlignSettings.bind(st(e)),e}return n=a,(r=[{key:"getLocationData",value:function(e){var t=this.props,n=t.options,r=t.locations,i=t.value,o=r[e]&&r[e].title||!1,s=i[e]&&i[e].elements?i[e].elements:[],a=!(!i[e]||!i[e].align)&&i[e].align,l=r[e]&&r[e].align?r[e].align:[],c={};return Object.keys(n).forEach((function(t){var r=n[t];r.allowed_locations&&-1===r.allowed_locations.indexOf(e)||-1!==s.indexOf(t)||(c[t]=r)})),{title:o,elements:s,align:a,availableAlign:l,availableElements:c}}},{key:"renderOptions",value:function(e){var t=this.props,n=t.value,r=t.onChange,i=t.options,o=t.props,s=this.getLocationData(e),a=[];return s.elements.length&&s.elements.forEach((function(t){a.push(wp.element.createElement(vt,{key:t,renderToggle:function(e){var n=e.isOpen,r=e.onToggle;return wp.element.createElement("button",{type:"button","aria-expanded":n,className:"vpf-component-elements-selector-control-location-options-item",onClick:r},i[t]?i[t].title:t,wp.element.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},wp.element.createElement("path",{d:"M8 4L14 10L8 16",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})))},renderContent:function(){return wp.element.createElement(dt,null,i[t]&&i[t].category?wp.element.createElement(To,tt({},o,{category:i[t].category,categoryToggle:!1})):"",wp.element.createElement(ft,null,wp.element.createElement(yt,{label:ct("Remove","@@text_domain")},wp.element.createElement("br",null),wp.element.createElement(mt,{isSecondary:!0,isSmall:!0,onClick:function(){window.confirm(ct("Are you sure you want to remove the element?","@@text_domain"))&&r(Ze(Ze({},n),{},et({},e,Ze(Ze({},n[e]),{},{elements:s.elements.filter((function(e){return e!==t}))}))))}},ct("Remove Element","@@text_domain")))))}}))})),a}},{key:"renderAlignSettings",value:function(e){var t=this.props,n=t.value,r=t.onChange,i=this.getLocationData(e),o=[];return i.availableAlign.length&&i.availableAlign.forEach((function(t){o.push({icon:wt[t],title:"".concat(t.charAt(0).toUpperCase()+t.slice(1)),onClick:function(){r(Ze(Ze({},n),{},et({},e,Ze(Ze({},n[e]),{},{align:t}))))},isActive:!!i.align&&i.align===t})})),o.length?wp.element.createElement(vt,{renderToggle:function(e){var t=e.isOpen,n=e.onToggle;return wp.element.createElement("button",{type:"button","aria-expanded":t,className:"vpf-component-elements-selector-control-location-options-item",onClick:n},i.align&&wt[i.align]?wt[i.align]:wt.center)},renderContent:function(){return wp.element.createElement(ft,null,wp.element.createElement(yt,{label:ct("Align","@@text_domain")},wp.element.createElement(bt,{controls:o})))}}):""}},{key:"renderLocation",value:function(e){var t=this.props,n=t.value,r=t.onChange,o=this.getLocationData(e),s=o.availableElements;return wp.element.createElement("div",{key:e,className:"vpf-component-elements-selector-control-location"},o.title?wp.element.createElement("div",{className:"vpf-component-elements-selector-control-location-title"},o.title):"",o.availableAlign.length?wp.element.createElement("div",{className:"vpf-component-elements-selector-control-location-align"},this.renderAlignSettings(e)):"",wp.element.createElement("div",{className:i()("vpf-component-elements-selector-control-location-options",o.align?"vpf-component-elements-selector-control-location-options-".concat(o.align):"")},this.renderOptions(e),Object.keys(s).length?wp.element.createElement(gt,{className:"vpf-component-elements-selector-control-location-options-add-button",position:"bottom",icon:wp.element.createElement("svg",{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24",role:"img","aria-hidden":"true",focusable:"false"},wp.element.createElement("path",{d:"M10 1c-5 0-9 4-9 9s4 9 9 9 9-4 9-9-4-9-9-9zm0 16c-3.9 0-7-3.1-7-7s3.1-7 7-7 7 3.1 7 7-3.1 7-7 7zm1-11H9v3H6v2h3v3h2v-3h3V9h-3V6zM10 1c-5 0-9 4-9 9s4 9 9 9 9-4 9-9-4-9-9-9zm0 16c-3.9 0-7-3.1-7-7s3.1-7 7-7 7 3.1 7 7-3.1 7-7 7zm1-11H9v3H6v2h3v3h2v-3h3V9h-3V6z"})),controls:Object.keys(s).map((function(t){return{title:wp.element.createElement(dt,null,s[t].title,s[t].is_pro?wp.element.createElement("span",{className:"vpf-component-elements-selector-control-location-options-title-pro"},ct("PRO","@@text_domain")):""),onClick:function(){if(!s[t].is_pro){var i=Xe(o.elements);-1===i.indexOf(t)&&(i.push(t),r(Ze(Ze({},n),{},et({},e,Ze(Ze({},n[e]),{},{elements:i})))))}}}}))}):""))}},{key:"render",value:function(){var e=this,t=this.props.locations;return wp.element.createElement("div",{className:"vpf-component-elements-selector-control"},Object.keys(t).map((function(t){return e.renderLocation(t)})))}}])&&rt(n.prototype,r),o&&rt(n,o),a}(ht);function xt(){return(xt=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function St(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Et(e,t){if(e){if("string"==typeof e)return St(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?St(e,t):void 0}}function _t(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,i=!1,o=void 0;try{for(var s,a=e[Symbol.iterator]();!(r=(s=a.next()).done)&&(n.push(s.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==a.return||a.return()}finally{if(i)throw o}}return n}}(e,t)||Et(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ct(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Tt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Ct(e,t,n[t])}))}return e}function Lt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function At(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ot(e,t,n){return t&&At(e.prototype,t),n&&At(e,n),e}function Rt(e){return(Rt="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})(e)}function $t(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Mt(e,t){return!t||"object"!==Rt(t)&&"function"!=typeof t?$t(e):t}function jt(e){return(jt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Pt(e,t){return(Pt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function It(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Pt(e,t)}var Nt=n(0),Ft=n(1),Dt=n.n(Ft),Wt=n(5),zt=n(7),Bt=n.n(zt);function Vt(e){return function(e){if(Array.isArray(e))return St(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||Et(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var Ht=function(){function e(){Lt(this,e),Ct(this,"refs",{})}return Ot(e,[{key:"add",value:function(e,t){this.refs[e]||(this.refs[e]=[]),this.refs[e].push(t)}},{key:"remove",value:function(e,t){var n=this.getIndex(e,t);-1!==n&&this.refs[e].splice(n,1)}},{key:"isActive",value:function(){return this.active}},{key:"getActive",value:function(){var e=this;return this.refs[this.active.collection].find((function(t){return t.node.sortableInfo.index==e.active.index}))}},{key:"getIndex",value:function(e,t){return this.refs[e].indexOf(t)}},{key:"getOrderedRefs",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.active.collection;return this.refs[e].sort(Ut)}}]),e}();function Ut(e,t){return e.node.sortableInfo.index-t.node.sortableInfo.index}function Gt(e,t){return Object.keys(e).reduce((function(n,r){return-1===t.indexOf(r)&&(n[r]=e[r]),n}),{})}var qt={end:["touchend","touchcancel","mouseup"],move:["touchmove","mousemove"],start:["touchstart","mousedown"]},Kt=function(){if("undefined"==typeof window||"undefined"==typeof document)return"";var e=window.getComputedStyle(document.documentElement,"")||["-moz-hidden-iframe"],t=(Array.prototype.slice.call(e).join("").match(/-(moz|webkit|ms)-/)||""===e.OLink&&["","o"])[1];switch(t){case"ms":return"ms";default:return t&&t.length?t[0].toUpperCase()+t.substr(1):""}}();function Yt(e,t){Object.keys(t).forEach((function(n){e.style[n]=t[n]}))}function Xt(e,t){e.style["".concat(Kt,"Transform")]=null==t?"":"translate3d(".concat(t.x,"px,").concat(t.y,"px,0)")}function Jt(e,t){e.style["".concat(Kt,"TransitionDuration")]=null==t?"":"".concat(t,"ms")}function Qt(e,t){for(;e;){if(t(e))return e;e=e.parentNode}return null}function Zt(e,t,n){return Math.max(e,Math.min(n,t))}function en(e){return"px"===e.substr(-2)?parseFloat(e):0}function tn(e){var t=window.getComputedStyle(e);return{bottom:en(t.marginBottom),left:en(t.marginLeft),right:en(t.marginRight),top:en(t.marginTop)}}function nn(e,t){var n=t.displayName||t.name;return n?"".concat(e,"(").concat(n,")"):e}function rn(e,t){var n=e.getBoundingClientRect();return{top:n.top+t.top,left:n.left+t.left}}function on(e){return e.touches&&e.touches.length?{x:e.touches[0].pageX,y:e.touches[0].pageY}:e.changedTouches&&e.changedTouches.length?{x:e.changedTouches[0].pageX,y:e.changedTouches[0].pageY}:{x:e.pageX,y:e.pageY}}function sn(e){return e.touches&&e.touches.length||e.changedTouches&&e.changedTouches.length}function an(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{left:0,top:0};if(e){var r={left:n.left+e.offsetLeft,top:n.top+e.offsetTop};return e.parentNode===t?r:an(e.parentNode,t,r)}}function ln(e,t,n){return e<n&&e>t?e-1:e>n&&e<t?e+1:e}function cn(e){var t=e.lockOffset,n=e.width,r=e.height,i=t,o=t,s="px";if("string"==typeof t){var a=/^[+-]?\d*(?:\.\d*)?(px|%)$/.exec(t);Bt()(null!==a,'lockOffset value should be a number or a string of a number followed by "px" or "%". Given %s',t),i=parseFloat(t),o=parseFloat(t),s=a[1]}return Bt()(isFinite(i)&&isFinite(o),"lockOffset value should be a finite. Given %s",t),"%"===s&&(i=i*n/100,o=o*r/100),{x:i,y:o}}function un(e){var t=e.height,n=e.width,r=e.lockOffset,i=Array.isArray(r)?r:[r,r];Bt()(2===i.length,"lockOffset prop of SortableContainer should be a single value or an array of exactly two values. Given %s",r);var o=_t(i,2),s=o[0],a=o[1];return[cn({height:t,lockOffset:s,width:n}),cn({height:t,lockOffset:a,width:n})]}function hn(e){return e instanceof HTMLElement?function(e){var t=window.getComputedStyle(e),n=/(auto|scroll)/;return["overflow","overflowX","overflowY"].find((function(e){return n.test(t[e])}))}(e)?e:hn(e.parentNode):null}function dn(e){var t=window.getComputedStyle(e);return"grid"===t.display?{x:en(t.gridColumnGap),y:en(t.gridRowGap)}:{x:0,y:0}}var pn=27,fn=32,mn=37,gn=38,vn=39,bn=40,yn="A",wn="BUTTON",kn="CANVAS",xn="INPUT",Sn="OPTION",En="TEXTAREA",_n="SELECT";function Cn(e){var t="input, textarea, select, canvas, [contenteditable]",n=e.querySelectorAll(t),r=e.cloneNode(!0);return Vt(r.querySelectorAll(t)).forEach((function(e,t){("file"!==e.type&&(e.value=n[t].value),"radio"===e.type&&e.name&&(e.name="__sortableClone__".concat(e.name)),e.tagName===kn&&n[t].width>0&&n[t].height>0)&&e.getContext("2d").drawImage(n[t],0,0)})),r}function Tn(e){return null!=e.sortableHandle}var Ln=function(){function e(t,n){Lt(this,e),this.container=t,this.onScrollCallback=n}return Ot(e,[{key:"clear",value:function(){null!=this.interval&&(clearInterval(this.interval),this.interval=null)}},{key:"update",value:function(e){var t=this,n=e.translate,r=e.minTranslate,i=e.maxTranslate,o=e.width,s=e.height,a={x:0,y:0},l={x:1,y:1},c=10,u=10,h=this.container,d=h.scrollTop,p=h.scrollLeft,f=h.scrollHeight,m=h.scrollWidth,g=0===d,v=f-d-h.clientHeight==0,b=0===p,y=m-p-h.clientWidth==0;n.y>=i.y-s/2&&!v?(a.y=1,l.y=u*Math.abs((i.y-s/2-n.y)/s)):n.x>=i.x-o/2&&!y?(a.x=1,l.x=c*Math.abs((i.x-o/2-n.x)/o)):n.y<=r.y+s/2&&!g?(a.y=-1,l.y=u*Math.abs((n.y-s/2-r.y)/s)):n.x<=r.x+o/2&&!b&&(a.x=-1,l.x=c*Math.abs((n.x-o/2-r.x)/o)),this.interval&&(this.clear(),this.isAutoScrolling=!1),0===a.x&&0===a.y||(this.interval=setInterval((function(){t.isAutoScrolling=!0;var e={left:l.x*a.x,top:l.y*a.y};t.container.scrollTop+=e.top,t.container.scrollLeft+=e.left,t.onScrollCallback(e)}),5))}}]),e}();var An={axis:Dt.a.oneOf(["x","y","xy"]),contentWindow:Dt.a.any,disableAutoscroll:Dt.a.bool,distance:Dt.a.number,getContainer:Dt.a.func,getHelperDimensions:Dt.a.func,helperClass:Dt.a.string,helperContainer:Dt.a.oneOfType([Dt.a.func,"undefined"==typeof HTMLElement?Dt.a.any:Dt.a.instanceOf(HTMLElement)]),hideSortableGhost:Dt.a.bool,keyboardSortingTransitionDuration:Dt.a.number,lockAxis:Dt.a.string,lockOffset:Dt.a.oneOfType([Dt.a.number,Dt.a.string,Dt.a.arrayOf(Dt.a.oneOfType([Dt.a.number,Dt.a.string]))]),lockToContainerEdges:Dt.a.bool,onSortEnd:Dt.a.func,onSortMove:Dt.a.func,onSortOver:Dt.a.func,onSortStart:Dt.a.func,pressDelay:Dt.a.number,pressThreshold:Dt.a.number,keyCodes:Dt.a.shape({lift:Dt.a.arrayOf(Dt.a.number),drop:Dt.a.arrayOf(Dt.a.number),cancel:Dt.a.arrayOf(Dt.a.number),up:Dt.a.arrayOf(Dt.a.number),down:Dt.a.arrayOf(Dt.a.number)}),shouldCancelStart:Dt.a.func,transitionDuration:Dt.a.number,updateBeforeSortStart:Dt.a.func,useDragHandle:Dt.a.bool,useWindowAsScrollContainer:Dt.a.bool},On={lift:[fn],drop:[fn],cancel:[pn],up:[gn,mn],down:[bn,vn]},Rn={axis:"y",disableAutoscroll:!1,distance:0,getHelperDimensions:function(e){var t=e.node;return{height:t.offsetHeight,width:t.offsetWidth}},hideSortableGhost:!0,lockOffset:"50%",lockToContainerEdges:!1,pressDelay:0,pressThreshold:5,keyCodes:On,shouldCancelStart:function(e){return-1!==[xn,En,_n,Sn,wn].indexOf(e.target.tagName)||!!Qt(e.target,(function(e){return"true"===e.contentEditable}))},transitionDuration:300,useWindowAsScrollContainer:!1},$n=Object.keys(An);function Mn(e){Bt()(!(e.distance&&e.pressDelay),"Attempted to set both `pressDelay` and `distance` on SortableContainer, you may only use one or the other, not both at the same time.")}function jn(e,t){try{var n=e()}catch(e){return t(!0,e)}return n&&n.then?n.then(t.bind(null,!1),t.bind(null,!0)):t(!1,value)}var Pn={index:Dt.a.number.isRequired,collection:Dt.a.oneOfType([Dt.a.number,Dt.a.string]),disabled:Dt.a.bool},In=Object.keys(Pn);function Nn(e){return(Nn="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})(e)}function Fn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Dn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Wn(e,t){return(Wn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function zn(e,t){return!t||"object"!==Nn(t)&&"function"!=typeof t?Bn(e):t}function Bn(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Vn(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function Hn(e){return(Hn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Un(){return(Un=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Gn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function qn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Gn(Object(n),!0).forEach((function(t){Kn(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Gn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Kn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Yn(e){return function(e){if(Array.isArray(e))return Xn(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return Xn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Xn(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Xn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Jn=wp.i18n.__,Qn=wp.hooks.addFilter,Zn=wp.element,er=Zn.Fragment,tr=Zn.Component,nr=Zn.createRef,rr=wp.components,ir=rr.Button,or=rr.Dropdown,sr=rr.withNotices,ar=wp.compose,lr=ar.compose,cr=ar.withInstanceId,ur=wp.blockEditor,hr=ur.MediaPlaceholder,dr=ur.MediaUpload,pr=["image"];var fr=function(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{withRef:!1};return n=t=function(t){function n(){return Lt(this,n),Mt(this,jt(n).apply(this,arguments))}return It(n,t),Ot(n,[{key:"componentDidMount",value:function(){this.register()}},{key:"componentDidUpdate",value:function(e){this.node&&(e.index!==this.props.index&&(this.node.sortableInfo.index=this.props.index),e.disabled!==this.props.disabled&&(this.node.sortableInfo.disabled=this.props.disabled)),e.collection!==this.props.collection&&(this.unregister(e.collection),this.register())}},{key:"componentWillUnmount",value:function(){this.unregister()}},{key:"register",value:function(){var e=this.props,t=e.collection,n=e.disabled,r=e.index,i=Object(Wt.findDOMNode)(this);i.sortableInfo={collection:t,disabled:n,index:r,manager:this.context.manager},this.node=i,this.ref={node:i},this.context.manager.add(t,this.ref)}},{key:"unregister",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props.collection;this.context.manager.remove(e,this.ref)}},{key:"getWrappedInstance",value:function(){return Bt()(r.withRef,"To access the wrapped instance, you need to pass in {withRef: true} as the second argument of the SortableElement() call"),this.refs.wrappedInstance}},{key:"render",value:function(){var t=r.withRef?"wrappedInstance":null;return Object(Nt.createElement)(e,xt({ref:t},Gt(this.props,In)))}}]),n}(Nt.Component),Ct(t,"displayName",nn("sortableElement",e)),Ct(t,"contextTypes",{manager:Dt.a.object.isRequired}),Ct(t,"propTypes",Pn),Ct(t,"defaultProps",{collection:0}),n}((function(e){var t=e.img,n=e.items,r=e.idx,i=e.onChange,o=e.imageControls,s=e.controlName,a=e.attributes,l=e.isSetupWizard;return wp.element.createElement(or,{key:"".concat(t.id||t.imgThumbnailUrl||t.imgUrl,"-").concat(r),position:"bottom center",className:"vpf-component-gallery-control-item",renderToggle:function(e){var o=e.isOpen,s=e.onToggle;return wp.element.createElement(er,null,wp.element.createElement(ir,{className:"vpf-component-gallery-control-item-button",onClick:s,"aria-expanded":o},wp.element.createElement("img",{src:t.imgThumbnailUrl||t.imgUrl,alt:t.alt||t.imgThumbnailUrl||t.imgUrl}),wp.element.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},wp.element.createElement("circle",{cx:"12",cy:"12",r:"3"}),wp.element.createElement("path",{d:"M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"}))),wp.element.createElement(ir,{className:"vpf-component-gallery-control-item-remove",onClick:function(){var e=Yn(n);e[r]&&(e.splice(r,1),i(e))}},wp.element.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},wp.element.createElement("path",{d:"M3.5 5.5H7.5M16.5 5.5H12.5M12.5 5.5V2.5H7.5V5.5M12.5 5.5H7.5M5 8.5L6 17H14L15 8.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",fill:"transparent"}))))},renderContent:function(){return wp.element.createElement("div",{className:"vpf-component-gallery-control-item-dropdown"},Object.keys(o).map((function(e){var c=[],u="".concat(s,"[").concat(r,"].").concat(e);return o[e].condition.length&&o[e].condition.forEach((function(e){var t=qn({},e);t.control&&/SELF/g.test(t.control)&&(t.control=t.control.replace(/SELF/g,"".concat(s,"[").concat(r,"]"))),c.push(t)})),wp.element.createElement(To.Control,Un({key:"".concat(t.id||t.imgThumbnailUrl||t.imgUrl,"-").concat(r,"-").concat(e),attributes:a,onChange:function(t){var o=Yn(n);o[r]&&(o[r]=qn(qn({},o[r]),{},Kn({},e,t)),i(o))}},o[e],{name:u,value:t[e],condition:c,isSetupWizard:l}))})))}})})),mr=function(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{withRef:!1};return n=t=function(t){function n(e){var t;return Lt(this,n),Ct($t($t(t=Mt(this,jt(n).call(this,e)))),"state",{}),Ct($t($t(t)),"handleStart",(function(e){var n=t.props,r=n.distance,i=n.shouldCancelStart;if(2!==e.button&&!i(e)){t.touched=!0,t.position=on(e);var o=Qt(e.target,(function(e){return null!=e.sortableInfo}));if(o&&o.sortableInfo&&t.nodeIsChild(o)&&!t.state.sorting){var s=t.props.useDragHandle,a=o.sortableInfo,l=a.index,c=a.collection;if(a.disabled)return;if(s&&!Qt(e.target,Tn))return;t.manager.active={collection:c,index:l},sn(e)||e.target.tagName!==yn||e.preventDefault(),r||(0===t.props.pressDelay?t.handlePress(e):t.pressTimer=setTimeout((function(){return t.handlePress(e)}),t.props.pressDelay))}}})),Ct($t($t(t)),"nodeIsChild",(function(e){return e.sortableInfo.manager===t.manager})),Ct($t($t(t)),"handleMove",(function(e){var n=t.props,r=n.distance,i=n.pressThreshold;if(!t.state.sorting&&t.touched&&!t._awaitingUpdateBeforeSortStart){var o=on(e),s={x:t.position.x-o.x,y:t.position.y-o.y},a=Math.abs(s.x)+Math.abs(s.y);t.delta=s,r||i&&!(a>=i)?r&&a>=r&&t.manager.isActive()&&t.handlePress(e):(clearTimeout(t.cancelTimer),t.cancelTimer=setTimeout(t.cancel,0))}})),Ct($t($t(t)),"handleEnd",(function(){t.touched=!1,t.cancel()})),Ct($t($t(t)),"cancel",(function(){var e=t.props.distance;t.state.sorting||(e||clearTimeout(t.pressTimer),t.manager.active=null)})),Ct($t($t(t)),"handlePress",(function(e){try{var n=t.manager.getActive(),r=function(){if(n){var r=function(){var n=d.sortableInfo.index,r=tn(d),i=dn(t.container),c=t.scrollContainer.getBoundingClientRect(),m=s({index:n,node:d,collection:p});if(t.node=d,t.margin=r,t.gridGap=i,t.width=m.width,t.height=m.height,t.marginOffset={x:t.margin.left+t.margin.right+t.gridGap.x,y:Math.max(t.margin.top,t.margin.bottom,t.gridGap.y)},t.boundingClientRect=d.getBoundingClientRect(),t.containerBoundingRect=c,t.index=n,t.newIndex=n,t.axis={x:o.indexOf("x")>=0,y:o.indexOf("y")>=0},t.offsetEdge=an(d,t.container),t.initialOffset=on(f?Tt({},e,{pageX:t.boundingClientRect.left,pageY:t.boundingClientRect.top}):e),t.initialScroll={left:t.scrollContainer.scrollLeft,top:t.scrollContainer.scrollTop},t.initialWindowScroll={left:window.pageXOffset,top:window.pageYOffset},t.helper=t.helperContainer.appendChild(Cn(d)),Yt(t.helper,{boxSizing:"border-box",height:"".concat(t.height,"px"),left:"".concat(t.boundingClientRect.left-r.left,"px"),pointerEvents:"none",position:"fixed",top:"".concat(t.boundingClientRect.top-r.top,"px"),width:"".concat(t.width,"px")}),f&&t.helper.focus(),l&&(t.sortableGhost=d,Yt(d,{opacity:0,visibility:"hidden"})),t.minTranslate={},t.maxTranslate={},f){var g=h?{top:0,left:0,width:t.contentWindow.innerWidth,height:t.contentWindow.innerHeight}:t.containerBoundingRect,v=g.top,b=g.left,y=g.width,w=v+g.height,k=b+y;t.axis.x&&(t.minTranslate.x=b-t.boundingClientRect.left,t.maxTranslate.x=k-(t.boundingClientRect.left+t.width)),t.axis.y&&(t.minTranslate.y=v-t.boundingClientRect.top,t.maxTranslate.y=w-(t.boundingClientRect.top+t.height))}else t.axis.x&&(t.minTranslate.x=(h?0:c.left)-t.boundingClientRect.left-t.width/2,t.maxTranslate.x=(h?t.contentWindow.innerWidth:c.left+c.width)-t.boundingClientRect.left-t.width/2),t.axis.y&&(t.minTranslate.y=(h?0:c.top)-t.boundingClientRect.top-t.height/2,t.maxTranslate.y=(h?t.contentWindow.innerHeight:c.top+c.height)-t.boundingClientRect.top-t.height/2);a&&a.split(" ").forEach((function(e){return t.helper.classList.add(e)})),t.listenerNode=e.touches?d:t.contentWindow,f?(t.listenerNode.addEventListener("wheel",t.handleKeyEnd,!0),t.listenerNode.addEventListener("mousedown",t.handleKeyEnd,!0),t.listenerNode.addEventListener("keydown",t.handleKeyDown)):(qt.move.forEach((function(e){return t.listenerNode.addEventListener(e,t.handleSortMove,!1)})),qt.end.forEach((function(e){return t.listenerNode.addEventListener(e,t.handleSortEnd,!1)}))),t.setState({sorting:!0,sortingIndex:n}),u&&u({node:d,index:n,collection:p,isKeySorting:f,nodes:t.manager.getOrderedRefs(),helper:t.helper},e),f&&t.keyMove(0)},i=t.props,o=i.axis,s=i.getHelperDimensions,a=i.helperClass,l=i.hideSortableGhost,c=i.updateBeforeSortStart,u=i.onSortStart,h=i.useWindowAsScrollContainer,d=n.node,p=n.collection,f=t.manager.isKeySorting,m=function(){if("function"==typeof c){t._awaitingUpdateBeforeSortStart=!0;var n=jn((function(){var t=d.sortableInfo.index;return Promise.resolve(c({collection:p,index:t,node:d,isKeySorting:f},e)).then((function(){}))}),(function(e,n){if(t._awaitingUpdateBeforeSortStart=!1,e)throw n;return n}));if(n&&n.then)return n.then((function(){}))}}();return m&&m.then?m.then(r):r()}}();return Promise.resolve(r&&r.then?r.then((function(){})):void 0)}catch(e){return Promise.reject(e)}})),Ct($t($t(t)),"handleSortMove",(function(e){var n=t.props.onSortMove;"function"==typeof e.preventDefault&&e.preventDefault(),t.updateHelperPosition(e),t.animateNodes(),t.autoscroll(),n&&n(e)})),Ct($t($t(t)),"handleSortEnd",(function(e){var n=t.props,r=n.hideSortableGhost,i=n.onSortEnd,o=t.manager,s=o.active.collection,a=o.isKeySorting,l=t.manager.getOrderedRefs();t.listenerNode&&(a?(t.listenerNode.removeEventListener("wheel",t.handleKeyEnd,!0),t.listenerNode.removeEventListener("mousedown",t.handleKeyEnd,!0),t.listenerNode.removeEventListener("keydown",t.handleKeyDown)):(qt.move.forEach((function(e){return t.listenerNode.removeEventListener(e,t.handleSortMove)})),qt.end.forEach((function(e){return t.listenerNode.removeEventListener(e,t.handleSortEnd)})))),t.helper.parentNode.removeChild(t.helper),r&&t.sortableGhost&&Yt(t.sortableGhost,{opacity:"",visibility:""});for(var c=0,u=l.length;c<u;c++){var h=l[c],d=h.node;h.edgeOffset=null,h.boundingClientRect=null,Xt(d,null),Jt(d,null),h.translate=null}t.autoScroller.clear(),t.manager.active=null,t.manager.isKeySorting=!1,t.setState({sorting:!1,sortingIndex:null}),"function"==typeof i&&i({collection:s,newIndex:t.newIndex,oldIndex:t.index,isKeySorting:a,nodes:l},e),t.touched=!1})),Ct($t($t(t)),"autoscroll",(function(){var e=t.props.disableAutoscroll,n=t.manager.isKeySorting;if(e)t.autoScroller.clear();else{if(n){var r=Tt({},t.translate),i=0,o=0;return t.axis.x&&(r.x=Math.min(t.maxTranslate.x,Math.max(t.minTranslate.x,t.translate.x)),i=t.translate.x-r.x),t.axis.y&&(r.y=Math.min(t.maxTranslate.y,Math.max(t.minTranslate.y,t.translate.y)),o=t.translate.y-r.y),t.translate=r,Xt(t.helper,t.translate),t.scrollContainer.scrollLeft+=i,void(t.scrollContainer.scrollTop+=o)}t.autoScroller.update({height:t.height,maxTranslate:t.maxTranslate,minTranslate:t.minTranslate,translate:t.translate,width:t.width})}})),Ct($t($t(t)),"onAutoScroll",(function(e){t.translate.x+=e.left,t.translate.y+=e.top,t.animateNodes()})),Ct($t($t(t)),"handleKeyDown",(function(e){var n=e.keyCode,r=t.props,i=r.shouldCancelStart,o=r.keyCodes,s=Tt({},On,void 0===o?{}:o);t.manager.active&&!t.manager.isKeySorting||!(t.manager.active||s.lift.includes(n)&&!i(e)&&t.isValidSortingTarget(e))||(e.stopPropagation(),e.preventDefault(),s.lift.includes(n)&&!t.manager.active?t.keyLift(e):s.drop.includes(n)&&t.manager.active?t.keyDrop(e):s.cancel.includes(n)?(t.newIndex=t.manager.active.index,t.keyDrop(e)):s.up.includes(n)?t.keyMove(-1):s.down.includes(n)&&t.keyMove(1))})),Ct($t($t(t)),"keyLift",(function(e){var n=e.target,r=Qt(n,(function(e){return null!=e.sortableInfo})).sortableInfo,i=r.index,o=r.collection;t.initialFocusedNode=n,t.manager.isKeySorting=!0,t.manager.active={index:i,collection:o},t.handlePress(e)})),Ct($t($t(t)),"keyMove",(function(e){var n=t.manager.getOrderedRefs(),r=n[n.length-1].node.sortableInfo.index,i=t.newIndex+e,o=t.newIndex;if(!(i<0||i>r)){t.prevIndex=o,t.newIndex=i;var s=ln(t.newIndex,t.prevIndex,t.index),a=n.find((function(e){return e.node.sortableInfo.index===s})),l=a.node,c=t.containerScrollDelta,u=a.boundingClientRect||rn(l,c),h=a.translate||{x:0,y:0},d=u.top+h.y-c.top,p=u.left+h.x-c.left,f=o<i,m=f&&t.axis.x?l.offsetWidth-t.width:0,g=f&&t.axis.y?l.offsetHeight-t.height:0;t.handleSortMove({pageX:p+m,pageY:d+g,ignoreTransition:0===e})}})),Ct($t($t(t)),"keyDrop",(function(e){t.handleSortEnd(e),t.initialFocusedNode&&t.initialFocusedNode.focus()})),Ct($t($t(t)),"handleKeyEnd",(function(e){t.manager.active&&t.keyDrop(e)})),Ct($t($t(t)),"isValidSortingTarget",(function(e){var n=t.props.useDragHandle,r=e.target,i=Qt(r,(function(e){return null!=e.sortableInfo}));return i&&i.sortableInfo&&!i.sortableInfo.disabled&&(n?Tn(r):r.sortableInfo)})),Mn(e),t.manager=new Ht,t.events={end:t.handleEnd,move:t.handleMove,start:t.handleStart},t}return It(n,t),Ot(n,[{key:"getChildContext",value:function(){return{manager:this.manager}}},{key:"componentDidMount",value:function(){var e=this,t=this.props.useWindowAsScrollContainer,n=this.getContainer();Promise.resolve(n).then((function(n){e.container=n,e.document=e.container.ownerDocument||document;var r=e.props.contentWindow||e.document.defaultView||window;e.contentWindow="function"==typeof r?r():r,e.scrollContainer=t?e.document.scrollingElement||e.document.documentElement:hn(e.container)||e.container,e.autoScroller=new Ln(e.scrollContainer,e.onAutoScroll),Object.keys(e.events).forEach((function(t){return qt[t].forEach((function(n){return e.container.addEventListener(n,e.events[t],!1)}))})),e.container.addEventListener("keydown",e.handleKeyDown)}))}},{key:"componentWillUnmount",value:function(){var e=this;this.helper&&this.helper.parentNode&&this.helper.parentNode.removeChild(this.helper),this.container&&(Object.keys(this.events).forEach((function(t){return qt[t].forEach((function(n){return e.container.removeEventListener(n,e.events[t])}))})),this.container.removeEventListener("keydown",this.handleKeyDown))}},{key:"updateHelperPosition",value:function(e){var t=this.props,n=t.lockAxis,r=t.lockOffset,i=t.lockToContainerEdges,o=t.transitionDuration,s=t.keyboardSortingTransitionDuration,a=void 0===s?o:s,l=this.manager.isKeySorting,c=e.ignoreTransition,u=on(e),h={x:u.x-this.initialOffset.x,y:u.y-this.initialOffset.y};if(h.y-=window.pageYOffset-this.initialWindowScroll.top,h.x-=window.pageXOffset-this.initialWindowScroll.left,this.translate=h,i){var d=_t(un({height:this.height,lockOffset:r,width:this.width}),2),p=d[0],f=d[1],m={x:this.width/2-p.x,y:this.height/2-p.y},g={x:this.width/2-f.x,y:this.height/2-f.y};h.x=Zt(this.minTranslate.x+m.x,this.maxTranslate.x-g.x,h.x),h.y=Zt(this.minTranslate.y+m.y,this.maxTranslate.y-g.y,h.y)}"x"===n?h.y=0:"y"===n&&(h.x=0),l&&a&&!c&&Jt(this.helper,a),Xt(this.helper,h)}},{key:"animateNodes",value:function(){var e=this.props,t=e.transitionDuration,n=e.hideSortableGhost,r=e.onSortOver,i=this.containerScrollDelta,o=this.windowScrollDelta,s=this.manager.getOrderedRefs(),a=this.offsetEdge.left+this.translate.x+i.left,l=this.offsetEdge.top+this.translate.y+i.top,c=this.manager.isKeySorting,u=this.newIndex;this.newIndex=null;for(var h=0,d=s.length;h<d;h++){var p=s[h].node,f=p.sortableInfo.index,m=p.offsetWidth,g=p.offsetHeight,v={height:this.height>g?g/2:this.height/2,width:this.width>m?m/2:this.width/2},b=c&&f>this.index&&f<=u,y=c&&f<this.index&&f>=u,w={x:0,y:0},k=s[h].edgeOffset;k||(k=an(p,this.container),s[h].edgeOffset=k,c&&(s[h].boundingClientRect=rn(p,i)));var x=h<s.length-1&&s[h+1],S=h>0&&s[h-1];x&&!x.edgeOffset&&(x.edgeOffset=an(x.node,this.container),c&&(x.boundingClientRect=rn(x.node,i))),f!==this.index?(t&&Jt(p,t),this.axis.x?this.axis.y?y||f<this.index&&(a+o.left-v.width<=k.left&&l+o.top<=k.top+v.height||l+o.top+v.height<=k.top)?(w.x=this.width+this.marginOffset.x,k.left+w.x>this.containerBoundingRect.width-v.width&&x&&(w.x=x.edgeOffset.left-k.left,w.y=x.edgeOffset.top-k.top),null===this.newIndex&&(this.newIndex=f)):(b||f>this.index&&(a+o.left+v.width>=k.left&&l+o.top+v.height>=k.top||l+o.top+v.height>=k.top+g))&&(w.x=-(this.width+this.marginOffset.x),k.left+w.x<this.containerBoundingRect.left+v.width&&S&&(w.x=S.edgeOffset.left-k.left,w.y=S.edgeOffset.top-k.top),this.newIndex=f):b||f>this.index&&a+o.left+v.width>=k.left?(w.x=-(this.width+this.marginOffset.x),this.newIndex=f):(y||f<this.index&&a+o.left<=k.left+v.width)&&(w.x=this.width+this.marginOffset.x,null==this.newIndex&&(this.newIndex=f)):this.axis.y&&(b||f>this.index&&l+o.top+v.height>=k.top?(w.y=-(this.height+this.marginOffset.y),this.newIndex=f):(y||f<this.index&&l+o.top<=k.top+v.height)&&(w.y=this.height+this.marginOffset.y,null==this.newIndex&&(this.newIndex=f))),Xt(p,w),s[h].translate=w):n&&(this.sortableGhost=p,Yt(p,{opacity:0,visibility:"hidden"}))}null==this.newIndex&&(this.newIndex=this.index),c&&(this.newIndex=u);var E=c?this.prevIndex:u;r&&this.newIndex!==E&&r({collection:this.manager.active.collection,index:this.index,newIndex:this.newIndex,oldIndex:E,isKeySorting:c,nodes:s,helper:this.helper})}},{key:"getWrappedInstance",value:function(){return Bt()(r.withRef,"To access the wrapped instance, you need to pass in {withRef: true} as the second argument of the SortableContainer() call"),this.refs.wrappedInstance}},{key:"getContainer",value:function(){var e=this.props.getContainer;return"function"!=typeof e?Object(Wt.findDOMNode)(this):e(r.withRef?this.getWrappedInstance():void 0)}},{key:"render",value:function(){var t=r.withRef?"wrappedInstance":null;return Object(Nt.createElement)(e,xt({ref:t},Gt(this.props,$n)))}},{key:"helperContainer",get:function(){var e=this.props.helperContainer;return"function"==typeof e?e():this.props.helperContainer||this.document.body}},{key:"containerScrollDelta",get:function(){return this.props.useWindowAsScrollContainer?{left:0,top:0}:{left:this.scrollContainer.scrollLeft-this.initialScroll.left,top:this.scrollContainer.scrollTop-this.initialScroll.top}}},{key:"windowScrollDelta",get:function(){return{left:this.contentWindow.pageXOffset-this.initialWindowScroll.left,top:this.contentWindow.pageYOffset-this.initialWindowScroll.top}}}]),n}(Nt.Component),Ct(t,"displayName",nn("sortableList",e)),Ct(t,"defaultProps",Rn),Ct(t,"propTypes",An),Ct(t,"childContextTypes",{manager:Dt.a.object.isRequired}),n}((function(e){var t=e.items,n=e.onChange,r=e.imageControls,i=e.controlName,o=e.attributes,s=e.isSetupWizard,a=e.prepareImages;return wp.element.createElement("div",{className:"vpf-component-gallery-control-items"},t.map((function(e,a){return wp.element.createElement(fr,{key:"lzb-constructor-controls-items-sortable-".concat(e.id,"-").concat(a),index:a,img:e,idx:a,items:t,onChange:n,imageControls:r,controlName:i,attributes:o,isSetupWizard:s})})),wp.element.createElement(dr,{multiple:!0,onSelect:function(e){n([].concat(Yn(t),Yn(a(e))))},allowedTypes:pr,value:!1,render:function(e){var t=e.open;return wp.element.createElement(ir,{className:"vpf-component-gallery-control-item-add",onClick:function(e){e.stopPropagation(),t()}},wp.element.createElement("svg",{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24",role:"img","aria-hidden":"true",focusable:"false"},wp.element.createElement("path",{d:"M10 1c-5 0-9 4-9 9s4 9 9 9 9-4 9-9-4-9-9-9zm0 16c-3.9 0-7-3.1-7-7s3.1-7 7-7 7 3.1 7 7-3.1 7-7 7zm1-11H9v3H6v2h3v3h2v-3h3V9h-3V6zM10 1c-5 0-9 4-9 9s4 9 9 9 9-4 9-9-4-9-9-9zm0 16c-3.9 0-7-3.1-7-7s3.1-7 7-7 7 3.1 7 7-3.1 7-7 7zm1-11H9v3H6v2h3v3h2v-3h3V9h-3V6z"})))}}))})),gr=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Wn(e,t)}(s,e);var t,n,r,i,o=(t=s,function(){var e,n=Hn(t);if(Vn()){var r=Hn(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return zn(this,e)});function s(){var e;Fn(this,s);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=o.call.apply(o,[this].concat(n))).state={hasError:!1},e.sortRef=nr(),e.onUploadError=e.onUploadError.bind(Bn(e)),e}return n=s,(r=[{key:"onUploadError",value:function(e){var t=this.props.noticeOperations;t.removeAllNotices(),t.createErrorNotice(e)}},{key:"prepareImages",value:function(e){var t=[];return e&&e.length&&e.forEach((function(e){var n={id:e.id,imgUrl:e.url,imgThumbnailUrl:e.url};e.sizes&&e.sizes.thumbnail&&e.sizes.thumbnail.url?n.imgThumbnailUrl=e.sizes.thumbnail.url:e.sizes&&e.sizes.medium&&e.sizes.medium.url?n.imgThumbnailUrl=e.sizes.medium.url:e.sizes&&e.sizes.large&&e.sizes.large.url&&(n.imgThumbnailUrl=e.sizes.large.url),e.title&&(n.title=e.title),e.description&&(n.description=e.description),t.push(n)})),t}},{key:"render",value:function(){var e=this,t=this,n=this.props,r=n.imageControls,i=n.attributes,o=n.name,s=n.value,a=n.onChange,l=n.noticeUI,c=n.isSetupWizard,u=s.filter((function(e){return e.id}));return wp.element.createElement("div",{className:"vpf-component-gallery-control"},u&&Object.keys(u).length?"":wp.element.createElement(hr,{icon:wp.element.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",role:"img",ariaHidden:"true",focusable:"false"},wp.element.createElement("path",{d:"M20 4v12H8V4h12m0-2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-8.5 9.67l1.69 2.26 2.48-3.1L19 15H9zM2 6v14c0 1.1.9 2 2 2h14v-2H4V6H2z"})),labels:{title:Jn("Images","@@text_domain"),instructions:Jn("Drag images, upload new ones or select files from your library.","@@text_domain")},onSelect:function(t){e.setState({hasError:!1}),a(e.prepareImages(t))},accept:"image/*",allowedTypes:pr,multiple:!0,onError:this.onUploadError,notices:l,disableMaxUploadErrorMessages:!0}),u&&Object.keys(u).length?wp.element.createElement(dr,{onSelect:function(t){e.setState({hasError:!1}),a(e.prepareImages(t))},allowedTypes:pr,multiple:!0,value:u.map((function(e){return e.id})),render:function(){return wp.element.createElement(er,null,wp.element.createElement(mr,{ref:t.sortRef,items:u,onChange:a,imageControls:r,controlName:o,attributes:i,isSetupWizard:c,prepareImages:t.prepareImages,axis:"xy",distance:"3",onSortEnd:function(e){var t=e.oldIndex,n=e.newIndex,r=function(e,t,n){if(n>=e.length)for(var r=n-e.length+1;r;)r-=1,e.push(void 0);return e.splice(n,0,e.splice(t,1)[0]),e}(Yn(u),t,n);a(r)},helperClass:"vpf-component-gallery-control-items-sortable",helperContainer:function(){return t.sortRef&&t.sortRef.current&&t.sortRef.current.container?t.sortRef.current.container:document.body}}))}}):"")}}])&&Dn(n.prototype,r),i&&Dn(n,i),s}(tr),vr=lr([cr,sr])(gr);function br(e){return(br="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})(e)}function yr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function wr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function kr(e,t){return(kr=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function xr(e,t){return!t||"object"!==br(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Sr(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function Er(e){return(Er=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Qn("vpf.editor.controls-render-data","vpf/editor/controls-render-data/images-categories-suggestions",(function(e){if("images"===e.name){var t=[];e.attributes.images&&e.attributes.images.length&&e.attributes.images.forEach((function(e){e.categories&&e.categories.length&&e.categories.forEach((function(e){-1===t.indexOf(e)&&t.push(e)}))})),t.length&&e.image_controls&&e.image_controls.categories&&e.image_controls.categories.options&&(e.image_controls.categories.options=t.map((function(e){return{label:e,value:e}})))}return e}));var _r=wp.components.ColorPicker,Cr=wp.element.Component,Tr=wp.i18n.__,Lr=wp.components,Ar=Lr.Dropdown,Or=Lr.Tooltip,Rr=Lr.BaseControl,$r=wp.blockEditor.ColorPalette,Mr=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&kr(e,t)}(a,e);var t,n,r,o,s=(t=a,function(){var e,n=Er(t);if(Sr()){var r=Er(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return xr(this,e)});function a(){var e;yr(this,a);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=s.call.apply(s,[this].concat(n))).state={keyForPalette:e.props.value,keyForPicker:e.props.value},e}return n=a,(r=[{key:"render",value:function(){var e=this,t=this.props,n=t.value,r=t.onChange,o=t.alpha,s=void 0!==o&&o,a=t.colorPalette,l=void 0===a||a,c=t.hint,u=void 0===c?Tr("Custom Color Picker","@@text_domain"):c,h=t.afterDropdownContent;return wp.element.createElement(Ar,{className:i()("components-color-palette__item-wrapper components-circular-option-picker__option-wrapper",n?"":"components-color-palette__custom-color"),contentClassName:"components-color-palette__picker",renderToggle:function(e){var t=e.isOpen,r=e.onToggle;return wp.element.createElement(Or,{text:u},wp.element.createElement("button",{type:"button","aria-expanded":t,className:"components-color-palette__item components-circular-option-picker__option",onClick:r,"aria-label":u,style:{color:n||""}},wp.element.createElement("span",{className:"components-color-palette__custom-color-gradient"})))},renderContent:function(){return wp.element.createElement("div",{className:"vpf-component-color-picker"},wp.element.createElement(_r,{color:n,onChangeComplete:function(t){var n;if(void 0===t.rgb||1===t.rgb.a)n=t.hex;else{var i=t.rgb,o=i.r,s=i.g,a=i.b,l=i.a;n="rgba(".concat(o,", ").concat(s,", ").concat(a,", ").concat(l,")")}r(n||""),e.setState({keyForPalette:n})},disableAlpha:!s,key:e.state.keyForPicker}),l?wp.element.createElement(Rr,{label:Tr("Color Palette","@@text_domain"),className:"vpf-component-color-picker-palette"},wp.element.createElement($r,{value:n,onChange:function(t){r(t||""),e.setState({keyForPicker:t})},disableCustomColors:!0,key:e.state.keyForPalette})):"",h||"")}})}}])&&wr(n.prototype,r),o&&wr(n,o),a}(Cr);function jr(e){return(jr="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})(e)}function Pr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ir(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Nr(e,t){return(Nr=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Fr(e,t){return!t||"object"!==jr(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Dr(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function Wr(e){return(Wr=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var zr=wp.element.Component,Br=wp.i18n.__,Vr=wp.date,Hr=Vr.__experimentalGetSettings,Ur=Vr.dateI18n,Gr=wp.components,qr=Gr.Dropdown,Kr=Gr.Button,Yr=Gr.DatePicker,Xr=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Nr(e,t)}(s,e);var t,n,r,i,o=(t=s,function(){var e,n=Wr(t);if(Dr()){var r=Wr(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return Fr(this,e)});function s(){return Pr(this,s),o.apply(this,arguments)}return n=s,(r=[{key:"render",value:function(){var e=this.props,t=e.value,n=e.onChange,r=Hr().formats.datetime||"F j, Y";return wp.element.createElement(qr,{renderToggle:function(e){var n=e.onToggle;return wp.element.createElement(Kr,{isSecondary:!0,isSmall:!0,onClick:n},t?Ur(r,t):Br("Select Date","@@text_domain"))},renderContent:function(){return wp.element.createElement("div",{className:"components-datetime vpf-component-date-picker"},wp.element.createElement(Yr,{currentDate:t,onChange:n}),t?wp.element.createElement(Kr,{isSecondary:!0,isSmall:!0,onClick:function(){n("")}},Br("Reset Date","@@text_domain")):"")}})}}])&&Ir(n.prototype,r),i&&Ir(n,i),s}(zr);function Jr(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{l(r.next(e))}catch(e){o(e)}}function a(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){e.done?i(e.value):new n((function(t){t(e.value)})).then(s,a)}l((r=r.apply(e,t||[])).next())}))}function Qr(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}}var Zr=["text/plain","text/html"],ei=function(){(console.warn||console.log).call(arguments)}.bind(console,"[clipboard-polyfill]"),ti=!0,ni=function(){function e(){this.m={}}return e.prototype.setData=function(e,t){ti&&-1===Zr.indexOf(e)&&ei("Unknown data type: "+e,"Call clipboard.suppressWarnings() to suppress this warning."),this.m[e]=t},e.prototype.getData=function(e){return this.m[e]},e.prototype.forEach=function(e){for(var t in this.m)e(this.m[t],t)},e}(),ri=function(e){},ii=!0,oi=function(){(console.warn||console.log).apply(console,arguments)}.bind("[clipboard-polyfill]"),si="text/plain";function ai(e){return Jr(this,void 0,void 0,(function(){var t;return Qr(this,(function(n){if(ii&&!e.getData(si)&&oi("clipboard.write() was called without a `text/plain` data type. On some platforms, this may result in an empty clipboard. Call clipboard.suppressWarnings() to suppress this warning."),mi()){if(function(e){var t=e.getData(si);if(void 0!==t)return window.clipboardData.setData("Text",t);throw new Error("No `text/plain` value was specified.")}(e))return[2];throw new Error("Copying failed, possibly because the user rejected it.")}if(ui(e))return ri("regular execCopy worked"),[2];if(navigator.userAgent.indexOf("Edge")>-1)return ri('UA "Edge" => assuming success'),[2];if(hi(document.body,e))return ri("copyUsingTempSelection worked"),[2];if(function(e){var t=document.createElement("div");t.setAttribute("style","-webkit-user-select: text !important"),t.textContent="temporary element",document.body.appendChild(t);var n=hi(t,e);return document.body.removeChild(t),n}(e))return ri("copyUsingTempElem worked"),[2];i
|
1 |
+
!function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=266)}([function(e,t){e.exports=React},function(e,t,n){e.exports=n(80)()},function(e,t,n){var r;function i(e){return(i="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})(e)}
|
2 |
/*!
|
3 |
Copyright (c) 2017 Jed Watson.
|
4 |
Licensed under the MIT License (MIT), see
|
5 |
http://jedwatson.github.io/classnames
|
6 |
+
*/!function(){"use strict";var o=function(){function e(){}function t(e,t){for(var n=t.length,r=0;r<n;++r)o(e,t[r])}e.prototype=Object.create(null);var n={}.hasOwnProperty;var r=/\s+/;function o(e,o){if(o){var s=i(o);"string"===s?function(e,t){for(var n=t.split(r),i=n.length,o=0;o<i;++o)e[n[o]]=!0}(e,o):Array.isArray(o)?t(e,o):"object"===s?function(e,t){for(var r in t)n.call(t,r)&&(e[r]=!!t[r])}(e,o):"number"===s&&function(e,t){e[t]=!0}(e,o)}}return function(){for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=new e;t(o,r);var s=[];for(var a in o)o[a]&&s.push(a);return s.join(" ")}}();e.exports?(o.default=o,e.exports=o):"object"===i(n(44))&&n(44)?void 0===(r=function(){return o}.apply(t,[]))||(e.exports=r):window.classNames=o}()},function(e,t,n){"use strict";function r(e,t,n,r){var i,o=!1,s=0;function a(){i&&clearTimeout(i)}function l(){var l=this,c=Date.now()-s,u=arguments;function h(){s=Date.now(),n.apply(l,u)}function d(){i=void 0}o||(r&&!i&&h(),a(),void 0===r&&c>e?h():!0!==t&&(i=setTimeout(r?d:h,void 0===r?e-c:e)))}return"boolean"!=typeof t&&(r=n,n=t,t=void 0),l.cancel=function(){a(),o=!0},l}function i(e,t,n){return void 0===n?r(e,t,!1):r(e,n,!1!==t)}n.d(t,"b",(function(){return r})),n.d(t,"a",(function(){return i}))},function(e,t,n){function r(e){return(r="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})(e)}var i=n(53),o="object"==("undefined"==typeof self?"undefined":r(self))&&self&&self.Object===Object&&self,s=i||o||Function("return this")();e.exports=s},function(e,t){e.exports=ReactDOM},function(e,t){function n(e){return(n="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})(e)}e.exports=function(e){var t=n(e);return null!=e&&("object"==t||"function"==t)}},function(e,t,n){"use strict";e.exports=function(e,t,n,r,i,o,s,a){if(!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,r,i,o,s,a],u=0;(l=new Error(t.replace(/%s/g,(function(){return c[u++]})))).name="Invariant Violation"}throw l.framesToPop=1,l}}},function(e,t,n){var r=n(101),i=n(106);e.exports=function(e,t){var n=i(e,t);return r(n)?n:void 0}},function(e,t){function n(e){return(n="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})(e)}e.exports=function(e){return null!=e&&"object"==n(e)}},function(e,t){var n=Array.isArray;e.exports=n},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,n){var r=n(14),i=n(102),o=n(103),s=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":s&&s in Object(e)?i(e):o(e)}},function(e,t,n){var r=n(31),i=n(50);e.exports=function(e,t,n,o){var s=!n;n||(n={});for(var a=-1,l=t.length;++a<l;){var c=t[a],u=o?o(n[c],e[c],c,n,e):void 0;void 0===u&&(u=e[c]),s?i(n,c,u):r(n,c,u)}return n}},function(e,t,n){var r=n(4).Symbol;e.exports=r},function(e,t,n){"use strict";function r(e){return(r="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})(e)}Object.defineProperty(t,"__esModule",{value:!0});var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(0),a=c(s),l=c(n(1));function c(e){return e&&e.__esModule?e:{default:e}}var u={position:"absolute",top:0,left:0,visibility:"hidden",height:0,overflow:"scroll",whiteSpace:"pre"},h=["extraWidth","injectStyles","inputClassName","inputRef","inputStyle","minWidth","onAutosize","placeholderIsMinWidth"],d=function(e,t){t.style.fontSize=e.fontSize,t.style.fontFamily=e.fontFamily,t.style.fontWeight=e.fontWeight,t.style.fontStyle=e.fontStyle,t.style.letterSpacing=e.letterSpacing,t.style.textTransform=e.textTransform},p=!("undefined"==typeof window||!window.navigator)&&/MSIE |Trident\/|Edge\//.test(window.navigator.userAgent),f=function(){return p?"_"+Math.random().toString(36).substr(2,12):void 0},m=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==r(t)&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.inputRef=function(e){n.input=e,"function"==typeof n.props.inputRef&&n.props.inputRef(e)},n.placeHolderSizerRef=function(e){n.placeHolderSizer=e},n.sizerRef=function(e){n.sizer=e},n.state={inputWidth:e.minWidth,inputId:e.id||f()},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+r(t));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"componentDidMount",value:function(){this.mounted=!0,this.copyInputStyles(),this.updateInputWidth()}},{key:"UNSAFE_componentWillReceiveProps",value:function(e){var t=e.id;t!==this.props.id&&this.setState({inputId:t||f()})}},{key:"componentDidUpdate",value:function(e,t){t.inputWidth!==this.state.inputWidth&&"function"==typeof this.props.onAutosize&&this.props.onAutosize(this.state.inputWidth),this.updateInputWidth()}},{key:"componentWillUnmount",value:function(){this.mounted=!1}},{key:"copyInputStyles",value:function(){if(this.mounted&&window.getComputedStyle){var e=this.input&&window.getComputedStyle(this.input);e&&(d(e,this.sizer),this.placeHolderSizer&&d(e,this.placeHolderSizer))}}},{key:"updateInputWidth",value:function(){if(this.mounted&&this.sizer&&void 0!==this.sizer.scrollWidth){var e=void 0;e=this.props.placeholder&&(!this.props.value||this.props.value&&this.props.placeholderIsMinWidth)?Math.max(this.sizer.scrollWidth,this.placeHolderSizer.scrollWidth)+2:this.sizer.scrollWidth+2,(e+="number"===this.props.type&&void 0===this.props.extraWidth?16:parseInt(this.props.extraWidth)||0)<this.props.minWidth&&(e=this.props.minWidth),e!==this.state.inputWidth&&this.setState({inputWidth:e})}}},{key:"getInput",value:function(){return this.input}},{key:"focus",value:function(){this.input.focus()}},{key:"blur",value:function(){this.input.blur()}},{key:"select",value:function(){this.input.select()}},{key:"renderStyles",value:function(){var e=this.props.injectStyles;return p&&e?a.default.createElement("style",{dangerouslySetInnerHTML:{__html:"input#"+this.state.inputId+"::-ms-clear {display: none;}"}}):null}},{key:"render",value:function(){var e=[this.props.defaultValue,this.props.value,""].reduce((function(e,t){return null!=e?e:t})),t=i({},this.props.style);t.display||(t.display="inline-block");var n=i({boxSizing:"content-box",width:this.state.inputWidth+"px"},this.props.inputStyle),r=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(this.props,[]);return function(e){h.forEach((function(t){return delete e[t]}))}(r),r.className=this.props.inputClassName,r.id=this.state.inputId,r.style=n,a.default.createElement("div",{className:this.props.className,style:t},this.renderStyles(),a.default.createElement("input",i({},r,{ref:this.inputRef})),a.default.createElement("div",{ref:this.sizerRef,style:u},e),this.props.placeholder?a.default.createElement("div",{ref:this.placeHolderSizerRef,style:u},this.props.placeholder):null)}}]),t}(s.Component);m.propTypes={className:l.default.string,defaultValue:l.default.any,extraWidth:l.default.oneOfType([l.default.number,l.default.string]),id:l.default.string,injectStyles:l.default.bool,inputClassName:l.default.string,inputRef:l.default.func,inputStyle:l.default.object,minWidth:l.default.oneOfType([l.default.number,l.default.string]),onAutosize:l.default.func,onChange:l.default.func,placeholder:l.default.string,placeholderIsMinWidth:l.default.bool,style:l.default.object,value:l.default.any},m.defaultProps={minWidth:1,injectStyles:!0},t.default=m},function(e,t,n){"use strict";var r=n(0);function i(){return(i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var o=r.createElement("rect",{width:100,height:100,rx:50,fill:"currentColor"}),s=r.createElement("path",{d:"M57.531 69.5L70.244 33H58.447L47 69.5h10.531z",fill:"url(#icon-gutenberg_svg__paint0_linear)"}),a=r.createElement("path",{d:"M42.713 69.5L30 33h11.797l11.447 36.5H42.713z",fill:"#fff"}),l=r.createElement("defs",null,r.createElement("linearGradient",{id:"icon-gutenberg_svg__paint0_linear",x1:64.5,y1:33,x2:33,y2:77,gradientUnits:"userSpaceOnUse"},r.createElement("stop",{stopColor:"#fff"}),r.createElement("stop",{offset:1,stopColor:"#fff",stopOpacity:0})));t.a=function(e){return r.createElement("svg",i({width:100,height:100,viewBox:"0 0 100 100",fill:"none"},e),o,s,a,l)}},function(e,t,n){"use strict";function r(e,t){var n=t[e];if(void 0===n&&/[\[\.]/g.test(e)){var r=e.split("."),i=[];if(r&&r.length&&(r.forEach((function(e){if(/[\[]/g.test(e)){var t=e.split(/[\[\]]/g);t&&t.length&&t.forEach((function(e){""!==e&&("".concat(parseInt(e,10))===e?i.push(parseInt(e,10)):i.push(e))}))}else i.push(e)})),i.length)){var o=t;i.forEach((function(e){o=o&&void 0!==o[e]?o[e]:void 0})),n=o}}return n}n.d(t,"a",(function(){return r}))},function(e,t){function n(e){return(n="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})(e)}var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(e){"object"===("undefined"==typeof window?"undefined":n(window))&&(r=window)}e.exports=r},function(e,t,n){var r=n(52),i=n(58);e.exports=function(e){return null!=e&&i(e.length)&&!r(e)}},function(e,t){var n=Object.prototype;e.exports=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||n)}},function(e,t,n){var r=n(60),i=n(119),o=n(19);e.exports=function(e){return o(e)?r(e):i(e)}},function(e,t,n){function r(e){return(r="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})(e)}var i=n(12),o=n(9);e.exports=function(e){return"symbol"==r(e)||o(e)&&"[object Symbol]"==i(e)}},function(e,t,n){var r=n(138),i=n(139),o=n(140),s=n(141),a=n(142);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}l.prototype.clear=r,l.prototype.delete=i,l.prototype.get=o,l.prototype.has=s,l.prototype.set=a,e.exports=l},function(e,t,n){var r=n(32);e.exports=function(e,t){for(var n=e.length;n--;)if(r(e[n][0],t))return n;return-1}},function(e,t,n){var r=n(8)(Object,"create");e.exports=r},function(e,t,n){var r=n(156);e.exports=function(e,t){var n=e.__data__;return r(t)?n["string"==typeof t?"string":"hash"]:n.map}},,function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(17);function i(e,t,n){var r=!0;switch(t){case"==":r=e==n;break;case"===":r=e===n;break;case"!=":r=e!=n;break;case"!==":r=e!==n;break;case"*=":r=-1!==e.indexOf(n);break;case">=":r=e>=n;break;case"<=":r=e<=n;break;case">":r=e>n;break;case"<":r=e<n;break;case"&&":case"AND":r=e&&n;break;case"||":case"OR":r=e||n;break;default:r=e}return r}function o(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"AND",s="AND"===n,a=s?"OR":"AND";return e.forEach((function(e){if(Array.isArray(e)&&!e.control)s=i(s,n,o(e,t,a));else if(e.control){var l=Object(r.a)(e.control,t),c=e.operator||"==",u=void 0!==e.value?e.value:"true";"true"===l?l=!0:"false"===l&&(l=!1),"true"===u?u=!0:"false"===u&&(u=!1),s=i(s,n,i(l,c,u))}})),s}},function(e,t,n){var r,i;"undefined"!=typeof window&&window,void 0===(i="function"==typeof(r=function(){"use strict";function e(){}var t=e.prototype;return t.on=function(e,t){if(e&&t){var n=this._events=this._events||{},r=n[e]=n[e]||[];return-1==r.indexOf(t)&&r.push(t),this}},t.once=function(e,t){if(e&&t){this.on(e,t);var n=this._onceEvents=this._onceEvents||{};return(n[e]=n[e]||{})[t]=!0,this}},t.off=function(e,t){var n=this._events&&this._events[e];if(n&&n.length){var r=n.indexOf(t);return-1!=r&&n.splice(r,1),this}},t.emitEvent=function(e,t){var n=this._events&&this._events[e];if(n&&n.length){n=n.slice(0),t=t||[];for(var r=this._onceEvents&&this._onceEvents[e],i=0;i<n.length;i++){var o=n[i];r&&r[o]&&(this.off(e,o),delete r[o]),o.apply(this,t)}return this}},t.allOff=function(){delete this._events,delete this._onceEvents},e})?r.call(t,n,t,e):r)||(e.exports=i)},function(e,t,n){var r,i;function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}
|
7 |
/*!
|
8 |
* getSize v2.0.3
|
9 |
* measure size of elements
|
10 |
* MIT license
|
|