Version Description
Revised Gallery Templates
Download this release
Release Info
Developer | Icegram |
Plugin | Popups, Welcome Bar, Optins and Lead Generation Plugin – Icegram |
Version | 1.10.28 |
Comparing to | |
See all releases |
Code changes from version 1.10.27 to 1.10.28
- assets/css/admin.css +22 -0
- assets/css/admin.min.css +1 -1
- assets/images/analytics.png +0 -0
- assets/images/cta-new-tab.png +0 -0
- assets/images/exit-intent-feild.png +0 -0
- assets/images/exit-intent-label.png +0 -0
- assets/js/admin.js +1 -1
- assets/js/admin.min.js +1 -1
- classes/feedback.php +29 -0
- classes/feedback/assets/css/animate.min.css +11 -0
- classes/feedback/assets/css/emoji.css +42 -0
- classes/feedback/assets/css/star-rating.css +52 -0
- classes/feedback/assets/css/sweetalert2.css +1453 -0
- classes/feedback/assets/js/sweetalert2.js +2765 -0
- classes/feedback/class-ig-feedback-v-1-0-1.php +840 -0
- classes/feedback/class-ig-tracker-v-1-0-1.php +191 -0
- classes/ig-upsale-admin.php +49 -0
- icegram.php +15 -3
- readme.txt +8 -2
assets/css/admin.css
CHANGED
@@ -1213,4 +1213,26 @@ input[type="submit"].alt:hover,
|
|
1213 |
}
|
1214 |
.message_row .option_title{
|
1215 |
text-decoration: underline;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1216 |
}
|
1213 |
}
|
1214 |
.message_row .option_title{
|
1215 |
text-decoration: underline;
|
1216 |
+
}
|
1217 |
+
|
1218 |
+
|
1219 |
+
#campaign_stats_upsale .handlediv, #campaign_stats_upsale .ui-sortable-handle{
|
1220 |
+
display: none;
|
1221 |
+
}
|
1222 |
+
#campaign_stats_upsale{
|
1223 |
+
background: transparent;
|
1224 |
+
border: none;
|
1225 |
+
box-shadow: none;
|
1226 |
+
}
|
1227 |
+
#campaign_stats_upsale .inside{
|
1228 |
+
padding-left:0;
|
1229 |
+
}
|
1230 |
+
#campaign_stats_upsale .inside img{
|
1231 |
+
width: 100%;
|
1232 |
+
}
|
1233 |
+
.ig_bt_upsale{
|
1234 |
+
margin-left: -1em;
|
1235 |
+
}
|
1236 |
+
.ig_cta_upsale img{
|
1237 |
+
margin-left: 23.5%;
|
1238 |
}
|
assets/css/admin.min.css
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
.shortcode_description.light,.shortcode_description:before{content:"\f348"}.actions,.help_tip{text-decoration:none}#postdivrich{display:none}#ig-admin-tabs .wp-picker-container{display:inline-block}.ig_preview_button{display:none;padding:10px 10px 0}.campaign_target_rules_panel .options_group{border-bottom:1px dashed #D3D3D3}.campaign_target_rules_panel .options_group:last-child{border-bottom-style:none}.campaign_target_rules_panel .options_group .form-field .options_header{display:inline-block;width:30%;vertical-align:top}.campaign_target_rules_panel .options_group p label input[type=checkbox],.campaign_target_rules_panel .options_group p label input[type=radio]{width:0}.campaign_target_rules_panel .options_group p label input[type=date]{width:auto;margin-left:10px}.user_roles p label input[type=checkbox],.user_roles p label input[type=radio]{margin-left:3px}.campaign_target_rules_panel .options_group .form-field #icegram_messages{width:300px;text-align:center}.empty_campaign{margin:1em;font-style:italic}.handle em{font-weight:400;font-size:85%;margin-left:1em;color:#777}h3 .chosen-container{font-weight:500}.thickbox_edit_message{padding:0 1em;border-bottom:1px solid #D3D3D3}.messages-list-sortable{margin-top:30px}.messages_list_table{font-size:1em;width:100%;border-collapse:separate;border-spacing:3px}th.message_header{text-align:center!important}.message_title{text-align:left}.message_headline{text-align:left;padding-left:1.2em}.action_links,.message_seconds{width:75px!important;text-align:center}.message_seconds input{text-align:right}.message-row .seconds-text{width:40px!important;text-align:center}.message-sort-placeholder{background-color:#D3D3D3}.device{width:auto;line-height:5em;vertical-align:baseline}.device:after{font-family:dashicons;font-size:3em}.device input{position:relative;left:2.5em;top:1.5em}.admin_field_icon{display:inline-block;-webkit-font-smoothing:antialiased;width:18px;height:18px;font:400 18px/1 dashicons;color:#888;vertical-align:text-top;margin:0 2px}.shortcode_description.light{color:#777}.campaign_shortcode{display:inline-block;width:45%;color:#777}.campaign_shortcode.light{border:1px dashed #CCC;padding-left:.6%;padding-right:.2%}.campaign_shortcode.light code{color:#777}label[for=device_mobile]{margin-left:-2em}label[for=device_mobile]:after{content:"\f470"}label[for=device_tablet]:after{content:"\f471"}label[for=device_laptop]:after{content:"\f472"}.date_picker:after{content:"\f145";position:relative;top:5px;font:400 20px/1 dashicons;vertical-align:top}.date_picker{margin-left:1em}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;appearance:none;margin:0}.date-picker{max-width:15%}.campaign_target_rules_panel .options_group .messages-list .form-field .message_header{width:75px!important;text-align:right}.disable{-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=30)";filter:alpha(opacity=30);opacity:.3}.enable{-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";filter:alpha(opacity=100);opacity:1}.message_edit:after{content:"\f464"}.message_delete:after{content:"\f158"}.actions:after{font-family:dashicons;font-size:1.4em}.actions{color:#444;padding-right:3px;cursor:pointer}.actions:hover{-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=70)";filter:alpha(opacity=70);opacity:.7}.action_links{vertical-align:middle}.message_header_label{color:#fff;text-align:center;font-size:.7em!important;margin:0!important;padding:3px 5px;cursor:auto;text-transform:uppercase}.message_header_label.ig_unknown{color:#343232;border:1px solid #000}.message_label{float:left;width:25%;padding:0}.message_field{width:65%;display:inline-block}.message_field.message_custom_css,.message_field.message_custom_js{font-family:Consolas,Monaco,monospace;font-size:12px}.message_image_button .image-buttons-icon{margin:0 2px}.message_image_button .image-buttons-icon:before{content:"\f128"}.message_headline_button,.message_image_button{vertical-align:top!important}.message_headline_button .headline-buttons-icon{margin:2px}.message_headline_button .headline-buttons-icon:before{content:"\f130"}.help_tip:after{content:"\f223"}.help_tip{float:right;margin:4px 0;cursor:help}.chosen-container{width:65%!important}.message_row.position{height:110px}.location-selector input[type=radio]:checked+label span{background-color:#2ea2cc}.location-selector{width:128px;height:115px;position:absolute;display:block;margin-left:24.3%;background-image:url(../images/desktop.png);background-position:0 -19px}.location-selector .location{background-color:#ddd;cursor:pointer;position:absolute}.location-selector .location:hover{background-color:#ccc}.location-selector .location.bottom,.location-selector .location.middle,.location-selector .location.top{height:14%;width:14%;right:42%}.location-selector .location.top{top:13px}.location-selector .location.middle{top:30%}.location-selector .location.bottom{bottom:43px}.location-selector .location.left,.location-selector .location.right{height:14%;width:14%;margin-left:0;margin-right:0}.location-selector .location.right{right:15px}.location-selector .location.left{left:15px}.wp-editor-container{margin-left:25%}.message-setting-fields #message_title,.message-setting-fields #upload_image{width:58%}.wp-editor-container span .mceLayout{width:50%}#edit-slug-box,#ui-datepicker-div,#wp-admin-bar-view,.empty_campaign,.location-selector input[type=radio]{display:none}#the-list .message_thumbnail img{max-width:200px;max-height:100px}#icegram_messages+.chosen-container-single .chosen-search input[type=text]{width:100%!important}.message_theme+.chosen-container.chosen-container .chosen-results{max-height:30em!important}.message_theme+.chosen-container-single .chosen-single span{background-repeat:no-repeat!important;background-position:100% 50%!important}.message_theme+.chosen-container .chosen-results li{margin:0 0 2% 2%;background-position:.5em 2em!important;-webkit-background-size:95%!important;background-size:95%!important;border:2px solid #EEE!important;font-weight:700!important;display:inline-block!important;text-align:center!important;background-repeat:no-repeat!important}.message_theme+.chosen-container .chosen-results li.highlighted{color:#000!important;border:2px solid #2ea2cc!important;background-color:#EAEFFF!important}#tiptip_holder{display:none;position:absolute;top:0;left:0;z-index:99999}#tiptip_holder.tip_top{padding-bottom:5px}#tiptip_holder.tip_top #tiptip_arrow_inner{margin-top:-7px;margin-left:-6px;border-top-color:#464646}#tiptip_holder.tip_bottom{padding-top:5px}#tiptip_holder.tip_bottom #tiptip_arrow_inner{margin-top:-5px;margin-left:-6px;border-bottom-color:#464646}#tiptip_holder.tip_right{padding-left:5px}#tiptip_holder.tip_right #tiptip_arrow_inner{margin-top:-6px;margin-left:-5px;border-right-color:#464646}#tiptip_holder.tip_left{padding-right:5px}#tiptip_holder.tip_left #tiptip_arrow_inner{margin-top:-6px;margin-left:-7px;border-left-color:#464646}#tiptip_content,.chart-tooltip{font-size:11px;color:#fff;padding:.5em;background:#464646;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-shadow:1px 1px 3px rgba(0,0,0,.1);-moz-box-shadow:1px 1px 3px rgba(0,0,0,.1);box-shadow:1px 1px 3px rgba(0,0,0,.1);text-align:center;max-width:150px}#tiptip_content code,.chart-tooltip code{background:#888;padding:1px}#tiptip_arrow,#tiptip_arrow_inner{position:absolute;border-color:transparent;border-style:solid;border-width:6px;height:0;width:0}input.sm_text_field,table#icegram_post_query_table,table#icegram_post_query_table tr td{padding:5px}#icegram_post_query_table label{font-weight:700}.icegram-dashicons:before{position:relative;font-family:dashicons;font-style:normal;vertical-align:middle;font-size:2em}.about-wrap .icegram-badge,.icegram-support{position:absolute;top:0}.about-wrap.icegram h2{color:#3754a8;padding-top:19px;font-weight:600}.icegram-dashicons-testimonial h4{font-size:1.5em}.icegram-badge{background:url(../images/icegram-logo-branding-64-white.png) center 24px no-repeat #3754a8;color:#FFF;font-size:12px;text-align:center;font-weight:600;margin:5px 0 0;padding-top:120px;height:24px;display:inline-block;width:150px;text-rendering:optimizeLegibility;-moz-box-shadow:0 1px 3px rgba(0,0,0,.2);-webkit-box-shadow:0 1px 3px rgba(0,0,0,.2);box-shadow:0 1px 3px rgba(0,0,0,.2)}.icegram-support{font-size:14px;color:#000;margin:178px 0 0;height:10px;width:180px;text-rendering:optimizeLegibility;right:0;text-align:right}.upgrade_page,.upgrade_page h1{text-align:center}.icegram-contact-us{font-size:20px;line-height:1.5em;font-weight:800;margin-right:20px}.feature-section.col>div{position:relative;width:29.95%;margin-right:4.999999999%;float:left}.about-wrap.icegram .feature-section{display:block!important}.about-wrap [class$=col] .last-feature{margin-right:0}form[name=klawoo_subscribe]{margin-right:150px}form[name=klawoo_subscribe] input[name=email]{width:20em}.icegram-contact-us a{color:#3754a8}.upgrade_page h1{font-size:2.3em;color:#333;padding:1em;font-weight:700}.upgrade_page table{border-collapse:collapse;border:1px solid #d3d3d3;font-size:1.3em;margin:0 auto}.upgrade_page tr{padding:0}.upgrade_page td,.upgrade_page th{border-right:1px solid #d3d3d3;line-height:1.5;vertical-align:top;padding:.5em}.upgrade_page th{font-size:1.2em;padding-bottom:0}.upgrade_page td{padding:.5em 1em}.feat_list{text-align:left;font-size:1em}.td_data{padding-top:1em}.plan_title{font-size:1.4em;display:block;width:100%;margin-bottom:-.2em}.plan_price{color:#0e74b2;font-size:1.8em;font-weight:400}.sm_hr{position:relative}.sm_hr:before{position:absolute;content:'';width:80%;left:10%;border-bottom:1px dashed #d3d3d3}.td_list_icon{font-size:1.2em;color:#11772d;margin-right:.3em}.upgrade_page .button-primary{text-shadow:none;font-size:1.15em!important;line-height:1em!important;height:2.5em!important;padding:.75em 1.5em!important}#popup_container{width:550px;background-color:#FFF;margin:0 auto;padding:.5em 1em 1em}#popup_container input[value=ig_vertical]{margin-left:3%}#popup_container select{width:30%}#popup_container #embed_howto_link{float:right;font-size:.8em;font-weight:400}.campaign_target_rules_panel .messages_list_table p.inline{display:block;margin:1em 0}.campaign_target_rules_panel .form-field .delete-url:before{font-family:dashicons;content:"\f182";cursor:pointer}.campaign_target_rules_panel .form-field .url_input_field{width:65%!important}.campaign_target_rules_panel #valid-field{margin-left:92%}.campaign_target_rules_panel #valid-field.error{font-family:dashicons;font-size:1.5em;color:red;vertical-align:middle;display:inline-block;-webkit-font-smoothing:antialiased;cursor:help}.campaign_target_rules_panel #valid-field.error:after{content:"\f223"}.campaign_target_rules_panel #add-url-icon:after{font-family:dashicons;content:"\f132";vertical-align:middle}.message_colors_options_container p{margin-top:.3em!important;margin-bottom:.3em!important}.message_colors_options_container p span.message_label{font-size:12px;margin-top:2px}.message-setting-fields .chosen-container-single .chosen-single{z-index:initial!important}.message-setting-fields .chosen-container-single.chosen-single div b{background:url(../images/chosen-sprite.png) 0 2px no-repeat!important}.ig_get_more,.message_animation+.chosen-container .chosen-results li.ig_get_more,.message_theme+.chosen-container .chosen-results li.ig_get_more{height:1.5em!important;background:rgba(255,231,180,.47)!important;border:1px dashed #b40000!important;line-height:1.5em;color:maroon!important;border-radius:.5em;width:92%!important}.message_animation+.chosen-container .chosen-results li.ig_get_more{height:1em!important;line-height:1em;margin-bottom:.1em;text-align:center}.message_animation+.chosen-container .chosen-results li.ig_get_more:after,.message_theme+.chosen-container .chosen-results li.ig_get_more:after{content:" \2192"}.message_animation+.chosen-container .chosen-results li.ig_get_more:focus,.message_animation+.chosen-container .chosen-results li.ig_get_more:hover,.message_theme+.chosen-container .chosen-results li.ig_get_more:focus,.message_theme+.chosen-container .chosen-results li.ig_get_more:hover{box-shadow:inset 0 0 1.5em rgba(253,214,131,.62)}.message_form_options{width:75%;margin-left:25%}.message_form_options label.message_label{display:none}.message_form_options textarea{resize:none;width:86%}.message_form_options p>div.form_radio_group{width:86%}.message_form_options span.message_label{width:100%}.message_form_options .form_inline_shortcode{margin-left:0;margin-top:1em;position:relative;width:inherit}.message_form_html_original{font-family:Consolas,Monaco,monospace;font-size:.8em}.form_radio_group .location{display:inline-block;width:97px;height:94px;padding:3px 3px 0;margin-right:.8em;border:1px solid transparent}.form_radio_group .location label{background:url(../images/from_layouts.png) no-repeat;display:block;width:95px;height:100px;border:1px solid transparent}.form_radio_group .location:hover{border:1px solid #2EA2CC}#message_form_style+.chosen-container-single .chosen-single{height:6em!important}#message_form_style+.chosen-container-single .chosen-single span{background-size:9em!important;line-height:6em!important;background-repeat:no-repeat;background-position:100% 50%!important}#message_form_style+.chosen-container .chosen-results li{width:43%!important;height:10em!important;margin:0 0 2% 2%;-webkit-background-size:95%!important;background-size:100%!important;border:2px solid #EEE!important;font-weight:700!important;display:inline-block!important;text-align:center!important;background-repeat:no-repeat!important;background-position:0 100%!important;color:transparent}#message_form_style+.chosen-container .chosen-results li.highlighted{color:transparent!important;border:2px solid #2ea2cc!important;background-color:#EAEFFF!important}.message_form_options .chosen-container{width:86%!important}.feature-section.col.two-col>div{width:45.95%}.feature-section.col img{width:150px;border:none}.feature-section.col p{margin-bottom:1.5em}.about-wrap.icegram{max-width:100%}.about-wrap.icegram h2{margin-bottom:.5em}.about-wrap .feature-section h4{margin-top:.4em}.about-header .about-text{margin-top:0;margin-bottom:1.5em}.changelog .about-text{margin-bottom:0;margin-top:1.5em}.about-wrap .icegram-badge{right:1.3em;color:#3754a8;background-color:transparent;padding-top:100px;box-shadow:none;-webkit-box-shadow:none;background-image:url(../images/icegram-logo-branding-64.png)}.about-header .wrap{background-color:#fff;border-top:1px dotted #ddd}.about-header .wrap table{margin-top:.5em}.about-header th{font-size:1.1em;color:inherit;width:170px}.about-header{background-color:#FFF;padding:1em 1em .5em;-webkit-box-shadow:0 0 7px 0 rgba(0,0,0,.2);box-shadow:0 0 7px 0 rgba(0,0,0,.2)}.icegram-support{padding-right:1em;margin-top:140px}.icegram-actions a,.icegram-actions a:active{vertical-align:middle!important;font-size:1.15em;color:#3754a8}.icegram-actions .button-primary{text-shadow:none;font-size:1.15em!important;line-height:1em!important;height:2.5em!important;padding:.75em 1.5em!important;background:#038703!important;border-color:#038703!important}.icegram-actions .button-primary:active,.icegram-actions .button-primary:focus,.icegram-actions .button-primary:hover,.icegram-actions .button-primary:visited{color:#fff;background:#038703!important;-webkit-box-shadow:inset 0 2px 0 #038703!important;box-shadow:inset 0 2px 0 #038703!important}.icegram-dashicons:before{margin-right:.1em}#ig-admin-tabs{padding-top:0}#ig-admin-tabs a:focus{box-shadow:none}.ig-admin-tabs-nav{padding:0 15px 0 10px;margin:0}.ig-admin-tabs-nav li{display:inline-block;list-style:none;border:1px solid #aaa;padding:0;margin:0 4px -1px;background-color:#eee}#ig-admin-tabs .ig-admin-nav-last{background-color:#d6e3ef}#ig-admin-tabs .ig-admin-nav-last:hover{background-color:#c5daef}#ig-admin-tabs .ig-admin-nav-last.current,.ig-admin-tabs-nav li.current,.ig-admin-tabs-nav li.current:hover,.ig-admin-tabs-nav li:hover{background-color:#FFF;border:1px solid #aaa;border-bottom:1px solid #fff;color:#444}.ig-admin-tabs-nav li.current{border-bottom:1px solid #fff;z-index:5;color:#444}.ig-admin-tabs-nav li a{padding:6px 10px;font-size:14px;font-weight:400;line-height:30px;color:#333;text-decoration:none}.ig-admin-tabs-nav li.current a{text-decoration:none!important;font-weight:700}.ig-admin-tabs-nav li a:hover{color:#333}#ig-admin-tabs .ig-admin-tab{background-color:#FFF;border:1px solid #aaa;padding:16px;display:none}.message_label.sub_option_label{width:10%;padding-top:.3em}.message_label.sub_option_label+.message_field{width:62%}.message_alt_cta_container{margin-bottom:2em}.message_row .ig_admin_hr{border-top:1px dashed rgba(0,0,0,.2);width:75%;display:block;margin:.5em 0 .5em 25%}.message_row .option_title{text-decoration:underline}/*! jQuery UI - v1.11.0 - 2014-07-18
|
2 |
* http://jqueryui.com
|
3 |
* Includes: core.css, draggable.css, resizable.css, selectable.css, sortable.css, accordion.css, autocomplete.css, button.css, datepicker.css, dialog.css, menu.css, progressbar.css, selectmenu.css, slider.css, spinner.css, tabs.css, tooltip.css, theme.css
|
4 |
* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Verdana%2CArial%2Csans-serif&fwDefault=normal&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=cccccc&bgTextureHeader=highlight_soft&bgImgOpacityHeader=75&borderColorHeader=aaaaaa&fcHeader=222222&iconColorHeader=222222&bgColorContent=ffffff&bgTextureContent=flat&bgImgOpacityContent=75&borderColorContent=aaaaaa&fcContent=222222&iconColorContent=222222&bgColorDefault=e6e6e6&bgTextureDefault=glass&bgImgOpacityDefault=75&borderColorDefault=d3d3d3&fcDefault=555555&iconColorDefault=888888&bgColorHover=dadada&bgTextureHover=glass&bgImgOpacityHover=75&borderColorHover=999999&fcHover=212121&iconColorHover=454545&bgColorActive=ffffff&bgTextureActive=glass&bgImgOpacityActive=65&borderColorActive=aaaaaa&fcActive=212121&iconColorActive=454545&bgColorHighlight=fbf9ee&bgTextureHighlight=glass&bgImgOpacityHighlight=55&borderColorHighlight=fcefa1&fcHighlight=363636&iconColorHighlight=2e83ff&bgColorError=fef1ec&bgTextureError=glass&bgImgOpacityError=95&borderColorError=cd0a0a&fcError=cd0a0a&iconColorError=cd0a0a&bgColorOverlay=aaaaaa&bgTextureOverlay=flat&bgImgOpacityOverlay=0&opacityOverlay=30&bgColorShadow=aaaaaa&bgTextureShadow=flat&bgImgOpacityShadow=0&opacityShadow=30&thicknessShadow=8px&offsetTopShadow=-8px&offsetLeftShadow=-8px&cornerRadiusShadow=8px
|
1 |
+
.shortcode_description.light,.shortcode_description:before{content:"\f348"}.actions,.help_tip{text-decoration:none}#postdivrich{display:none}#ig-admin-tabs .wp-picker-container{display:inline-block}.ig_preview_button{display:none;padding:10px 10px 0}.campaign_target_rules_panel .options_group{border-bottom:1px dashed #D3D3D3}.campaign_target_rules_panel .options_group:last-child{border-bottom-style:none}.campaign_target_rules_panel .options_group .form-field .options_header{display:inline-block;width:30%;vertical-align:top}.campaign_target_rules_panel .options_group p label input[type=checkbox],.campaign_target_rules_panel .options_group p label input[type=radio]{width:0}.campaign_target_rules_panel .options_group p label input[type=date]{width:auto;margin-left:10px}.user_roles p label input[type=checkbox],.user_roles p label input[type=radio]{margin-left:3px}.campaign_target_rules_panel .options_group .form-field #icegram_messages{width:300px;text-align:center}.empty_campaign{margin:1em;font-style:italic}.handle em{font-weight:400;font-size:85%;margin-left:1em;color:#777}h3 .chosen-container{font-weight:500}.thickbox_edit_message{padding:0 1em;border-bottom:1px solid #D3D3D3}.messages-list-sortable{margin-top:30px}.messages_list_table{font-size:1em;width:100%;border-collapse:separate;border-spacing:3px}th.message_header{text-align:center!important}.message_title{text-align:left}.message_headline{text-align:left;padding-left:1.2em}.action_links,.message_seconds{width:75px!important;text-align:center}.message_seconds input{text-align:right}.message-row .seconds-text{width:40px!important;text-align:center}.message-sort-placeholder{background-color:#D3D3D3}.device{width:auto;line-height:5em;vertical-align:baseline}.device:after{font-family:dashicons;font-size:3em}.device input{position:relative;left:2.5em;top:1.5em}.admin_field_icon{display:inline-block;-webkit-font-smoothing:antialiased;width:18px;height:18px;font:400 18px/1 dashicons;color:#888;vertical-align:text-top;margin:0 2px}.shortcode_description.light{color:#777}.campaign_shortcode{display:inline-block;width:45%;color:#777}.campaign_shortcode.light{border:1px dashed #CCC;padding-left:.6%;padding-right:.2%}.campaign_shortcode.light code{color:#777}label[for=device_mobile]{margin-left:-2em}label[for=device_mobile]:after{content:"\f470"}label[for=device_tablet]:after{content:"\f471"}label[for=device_laptop]:after{content:"\f472"}.date_picker:after{content:"\f145";position:relative;top:5px;font:400 20px/1 dashicons;vertical-align:top}.date_picker{margin-left:1em}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;appearance:none;margin:0}.date-picker{max-width:15%}.campaign_target_rules_panel .options_group .messages-list .form-field .message_header{width:75px!important;text-align:right}.disable{-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=30)";filter:alpha(opacity=30);opacity:.3}.enable{-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";filter:alpha(opacity=100);opacity:1}.message_edit:after{content:"\f464"}.message_delete:after{content:"\f158"}.actions:after{font-family:dashicons;font-size:1.4em}.actions{color:#444;padding-right:3px;cursor:pointer}.actions:hover{-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=70)";filter:alpha(opacity=70);opacity:.7}.action_links{vertical-align:middle}.message_header_label{color:#fff;text-align:center;font-size:.7em!important;margin:0!important;padding:3px 5px;cursor:auto;text-transform:uppercase}.message_header_label.ig_unknown{color:#343232;border:1px solid #000}.message_label{float:left;width:25%;padding:0}.message_field{width:65%;display:inline-block}.message_field.message_custom_css,.message_field.message_custom_js{font-family:Consolas,Monaco,monospace;font-size:12px}.message_image_button .image-buttons-icon{margin:0 2px}.message_image_button .image-buttons-icon:before{content:"\f128"}.message_headline_button,.message_image_button{vertical-align:top!important}.message_headline_button .headline-buttons-icon{margin:2px}.message_headline_button .headline-buttons-icon:before{content:"\f130"}.help_tip:after{content:"\f223"}.help_tip{float:right;margin:4px 0;cursor:help}.chosen-container{width:65%!important}.message_row.position{height:110px}.location-selector input[type=radio]:checked+label span{background-color:#2ea2cc}.location-selector{width:128px;height:115px;position:absolute;display:block;margin-left:24.3%;background-image:url(../images/desktop.png);background-position:0 -19px}.location-selector .location{background-color:#ddd;cursor:pointer;position:absolute}.location-selector .location:hover{background-color:#ccc}.location-selector .location.bottom,.location-selector .location.middle,.location-selector .location.top{height:14%;width:14%;right:42%}.location-selector .location.top{top:13px}.location-selector .location.middle{top:30%}.location-selector .location.bottom{bottom:43px}.location-selector .location.left,.location-selector .location.right{height:14%;width:14%;margin-left:0;margin-right:0}.location-selector .location.right{right:15px}.location-selector .location.left{left:15px}.wp-editor-container{margin-left:25%}.message-setting-fields #message_title,.message-setting-fields #upload_image{width:58%}.wp-editor-container span .mceLayout{width:50%}#edit-slug-box,#ui-datepicker-div,#wp-admin-bar-view,.empty_campaign,.location-selector input[type=radio]{display:none}#the-list .message_thumbnail img{max-width:200px;max-height:100px}#icegram_messages+.chosen-container-single .chosen-search input[type=text]{width:100%!important}.message_theme+.chosen-container.chosen-container .chosen-results{max-height:30em!important}.message_theme+.chosen-container-single .chosen-single span{background-repeat:no-repeat!important;background-position:100% 50%!important}.message_theme+.chosen-container .chosen-results li{margin:0 0 2% 2%;background-position:.5em 2em!important;-webkit-background-size:95%!important;background-size:95%!important;border:2px solid #EEE!important;font-weight:700!important;display:inline-block!important;text-align:center!important;background-repeat:no-repeat!important}.message_theme+.chosen-container .chosen-results li.highlighted{color:#000!important;border:2px solid #2ea2cc!important;background-color:#EAEFFF!important}#tiptip_holder{display:none;position:absolute;top:0;left:0;z-index:99999}#tiptip_holder.tip_top{padding-bottom:5px}#tiptip_holder.tip_top #tiptip_arrow_inner{margin-top:-7px;margin-left:-6px;border-top-color:#464646}#tiptip_holder.tip_bottom{padding-top:5px}#tiptip_holder.tip_bottom #tiptip_arrow_inner{margin-top:-5px;margin-left:-6px;border-bottom-color:#464646}#tiptip_holder.tip_right{padding-left:5px}#tiptip_holder.tip_right #tiptip_arrow_inner{margin-top:-6px;margin-left:-5px;border-right-color:#464646}#tiptip_holder.tip_left{padding-right:5px}#tiptip_holder.tip_left #tiptip_arrow_inner{margin-top:-6px;margin-left:-7px;border-left-color:#464646}#tiptip_content,.chart-tooltip{font-size:11px;color:#fff;padding:.5em;background:#464646;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-shadow:1px 1px 3px rgba(0,0,0,.1);-moz-box-shadow:1px 1px 3px rgba(0,0,0,.1);box-shadow:1px 1px 3px rgba(0,0,0,.1);text-align:center;max-width:150px}#tiptip_content code,.chart-tooltip code{background:#888;padding:1px}#tiptip_arrow,#tiptip_arrow_inner{position:absolute;border-color:transparent;border-style:solid;border-width:6px;height:0;width:0}input.sm_text_field,table#icegram_post_query_table,table#icegram_post_query_table tr td{padding:5px}#icegram_post_query_table label{font-weight:700}.icegram-dashicons:before{position:relative;font-family:dashicons;font-style:normal;vertical-align:middle;font-size:2em}.about-wrap .icegram-badge,.icegram-support{position:absolute;top:0}.about-wrap.icegram h2{color:#3754a8;padding-top:19px;font-weight:600}.icegram-dashicons-testimonial h4{font-size:1.5em}.icegram-badge{background:url(../images/icegram-logo-branding-64-white.png) center 24px no-repeat #3754a8;color:#FFF;font-size:12px;text-align:center;font-weight:600;margin:5px 0 0;padding-top:120px;height:24px;display:inline-block;width:150px;text-rendering:optimizeLegibility;-moz-box-shadow:0 1px 3px rgba(0,0,0,.2);-webkit-box-shadow:0 1px 3px rgba(0,0,0,.2);box-shadow:0 1px 3px rgba(0,0,0,.2)}.icegram-support{font-size:14px;color:#000;margin:178px 0 0;height:10px;width:180px;text-rendering:optimizeLegibility;right:0;text-align:right}.upgrade_page,.upgrade_page h1{text-align:center}.icegram-contact-us{font-size:20px;line-height:1.5em;font-weight:800;margin-right:20px}.feature-section.col>div{position:relative;width:29.95%;margin-right:4.999999999%;float:left}.about-wrap.icegram .feature-section{display:block!important}.about-wrap [class$=col] .last-feature{margin-right:0}form[name=klawoo_subscribe]{margin-right:150px}form[name=klawoo_subscribe] input[name=email]{width:20em}.icegram-contact-us a{color:#3754a8}.upgrade_page h1{font-size:2.3em;color:#333;padding:1em;font-weight:700}.upgrade_page table{border-collapse:collapse;border:1px solid #d3d3d3;font-size:1.3em;margin:0 auto}.upgrade_page tr{padding:0}.upgrade_page td,.upgrade_page th{border-right:1px solid #d3d3d3;line-height:1.5;vertical-align:top;padding:.5em}.upgrade_page th{font-size:1.2em;padding-bottom:0}.upgrade_page td{padding:.5em 1em}.feat_list{text-align:left;font-size:1em}.td_data{padding-top:1em}.plan_title{font-size:1.4em;display:block;width:100%;margin-bottom:-.2em}.plan_price{color:#0e74b2;font-size:1.8em;font-weight:400}.sm_hr{position:relative}.sm_hr:before{position:absolute;content:'';width:80%;left:10%;border-bottom:1px dashed #d3d3d3}.td_list_icon{font-size:1.2em;color:#11772d;margin-right:.3em}.upgrade_page .button-primary{text-shadow:none;font-size:1.15em!important;line-height:1em!important;height:2.5em!important;padding:.75em 1.5em!important}#popup_container{width:550px;background-color:#FFF;margin:0 auto;padding:.5em 1em 1em}#popup_container input[value=ig_vertical]{margin-left:3%}#popup_container select{width:30%}#popup_container #embed_howto_link{float:right;font-size:.8em;font-weight:400}.campaign_target_rules_panel .messages_list_table p.inline{display:block;margin:1em 0}.campaign_target_rules_panel .form-field .delete-url:before{font-family:dashicons;content:"\f182";cursor:pointer}.campaign_target_rules_panel .form-field .url_input_field{width:65%!important}.campaign_target_rules_panel #valid-field{margin-left:92%}.campaign_target_rules_panel #valid-field.error{font-family:dashicons;font-size:1.5em;color:red;vertical-align:middle;display:inline-block;-webkit-font-smoothing:antialiased;cursor:help}.campaign_target_rules_panel #valid-field.error:after{content:"\f223"}.campaign_target_rules_panel #add-url-icon:after{font-family:dashicons;content:"\f132";vertical-align:middle}.message_colors_options_container p{margin-top:.3em!important;margin-bottom:.3em!important}.message_colors_options_container p span.message_label{font-size:12px;margin-top:2px}.message-setting-fields .chosen-container-single .chosen-single{z-index:initial!important}.message-setting-fields .chosen-container-single.chosen-single div b{background:url(../images/chosen-sprite.png) 0 2px no-repeat!important}.ig_get_more,.message_animation+.chosen-container .chosen-results li.ig_get_more,.message_theme+.chosen-container .chosen-results li.ig_get_more{height:1.5em!important;background:rgba(255,231,180,.47)!important;border:1px dashed #b40000!important;line-height:1.5em;color:maroon!important;border-radius:.5em;width:92%!important}.message_animation+.chosen-container .chosen-results li.ig_get_more{height:1em!important;line-height:1em;margin-bottom:.1em;text-align:center}.message_animation+.chosen-container .chosen-results li.ig_get_more:after,.message_theme+.chosen-container .chosen-results li.ig_get_more:after{content:" \2192"}.message_animation+.chosen-container .chosen-results li.ig_get_more:focus,.message_animation+.chosen-container .chosen-results li.ig_get_more:hover,.message_theme+.chosen-container .chosen-results li.ig_get_more:focus,.message_theme+.chosen-container .chosen-results li.ig_get_more:hover{box-shadow:inset 0 0 1.5em rgba(253,214,131,.62)}.message_form_options{width:75%;margin-left:25%}.message_form_options label.message_label{display:none}.message_form_options textarea{resize:none;width:86%}.message_form_options p>div.form_radio_group{width:86%}.message_form_options span.message_label{width:100%}.message_form_options .form_inline_shortcode{margin-left:0;margin-top:1em;position:relative;width:inherit}.message_form_html_original{font-family:Consolas,Monaco,monospace;font-size:.8em}.form_radio_group .location{display:inline-block;width:97px;height:94px;padding:3px 3px 0;margin-right:.8em;border:1px solid transparent}.form_radio_group .location label{background:url(../images/from_layouts.png) no-repeat;display:block;width:95px;height:100px;border:1px solid transparent}.form_radio_group .location:hover{border:1px solid #2EA2CC}#message_form_style+.chosen-container-single .chosen-single{height:6em!important}#message_form_style+.chosen-container-single .chosen-single span{background-size:9em!important;line-height:6em!important;background-repeat:no-repeat;background-position:100% 50%!important}#message_form_style+.chosen-container .chosen-results li{width:43%!important;height:10em!important;margin:0 0 2% 2%;-webkit-background-size:95%!important;background-size:100%!important;border:2px solid #EEE!important;font-weight:700!important;display:inline-block!important;text-align:center!important;background-repeat:no-repeat!important;background-position:0 100%!important;color:transparent}#message_form_style+.chosen-container .chosen-results li.highlighted{color:transparent!important;border:2px solid #2ea2cc!important;background-color:#EAEFFF!important}.message_form_options .chosen-container{width:86%!important}.feature-section.col.two-col>div{width:45.95%}.feature-section.col img{width:150px;border:none}.feature-section.col p{margin-bottom:1.5em}.about-wrap.icegram{max-width:100%}.about-wrap.icegram h2{margin-bottom:.5em}.about-wrap .feature-section h4{margin-top:.4em}.about-header .about-text{margin-top:0;margin-bottom:1.5em}.changelog .about-text{margin-bottom:0;margin-top:1.5em}.about-wrap .icegram-badge{right:1.3em;color:#3754a8;background-color:transparent;padding-top:100px;box-shadow:none;-webkit-box-shadow:none;background-image:url(../images/icegram-logo-branding-64.png)}.about-header .wrap{background-color:#fff;border-top:1px dotted #ddd}.about-header .wrap table{margin-top:.5em}.about-header th{font-size:1.1em;color:inherit;width:170px}.about-header{background-color:#FFF;padding:1em 1em .5em;-webkit-box-shadow:0 0 7px 0 rgba(0,0,0,.2);box-shadow:0 0 7px 0 rgba(0,0,0,.2)}.icegram-support{padding-right:1em;margin-top:140px}.icegram-actions a,.icegram-actions a:active{vertical-align:middle!important;font-size:1.15em;color:#3754a8}.icegram-actions .button-primary{text-shadow:none;font-size:1.15em!important;line-height:1em!important;height:2.5em!important;padding:.75em 1.5em!important;background:#038703!important;border-color:#038703!important}.icegram-actions .button-primary:active,.icegram-actions .button-primary:focus,.icegram-actions .button-primary:hover,.icegram-actions .button-primary:visited{color:#fff;background:#038703!important;-webkit-box-shadow:inset 0 2px 0 #038703!important;box-shadow:inset 0 2px 0 #038703!important}.icegram-dashicons:before{margin-right:.1em}#ig-admin-tabs{padding-top:0}#ig-admin-tabs a:focus{box-shadow:none}.ig-admin-tabs-nav{padding:0 15px 0 10px;margin:0}.ig-admin-tabs-nav li{display:inline-block;list-style:none;border:1px solid #aaa;padding:0;margin:0 4px -1px;background-color:#eee}#ig-admin-tabs .ig-admin-nav-last{background-color:#d6e3ef}#ig-admin-tabs .ig-admin-nav-last:hover{background-color:#c5daef}#ig-admin-tabs .ig-admin-nav-last.current,.ig-admin-tabs-nav li.current,.ig-admin-tabs-nav li.current:hover,.ig-admin-tabs-nav li:hover{background-color:#FFF;border:1px solid #aaa;border-bottom:1px solid #fff;color:#444}.ig-admin-tabs-nav li.current{border-bottom:1px solid #fff;z-index:5;color:#444}.ig-admin-tabs-nav li a{padding:6px 10px;font-size:14px;font-weight:400;line-height:30px;color:#333;text-decoration:none}.ig-admin-tabs-nav li.current a{text-decoration:none!important;font-weight:700}.ig-admin-tabs-nav li a:hover{color:#333}#ig-admin-tabs .ig-admin-tab{background-color:#FFF;border:1px solid #aaa;padding:16px;display:none}.message_label.sub_option_label{width:10%;padding-top:.3em}.message_label.sub_option_label+.message_field{width:62%}.message_alt_cta_container{margin-bottom:2em}.message_row .ig_admin_hr{border-top:1px dashed rgba(0,0,0,.2);width:75%;display:block;margin:.5em 0 .5em 25%}.message_row .option_title{text-decoration:underline}#campaign_stats_upsale .handlediv,#campaign_stats_upsale .ui-sortable-handle{display:none}#campaign_stats_upsale{background:0 0;border:none;box-shadow:none}#campaign_stats_upsale .inside{padding-left:0}#campaign_stats_upsale .inside img{width:100%}.ig_bt_upsale{margin-left:-1em}.ig_cta_upsale img{margin-left:23.5%}/*! jQuery UI - v1.11.0 - 2014-07-18
|
2 |
* http://jqueryui.com
|
3 |
* Includes: core.css, draggable.css, resizable.css, selectable.css, sortable.css, accordion.css, autocomplete.css, button.css, datepicker.css, dialog.css, menu.css, progressbar.css, selectmenu.css, slider.css, spinner.css, tabs.css, tooltip.css, theme.css
|
4 |
* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Verdana%2CArial%2Csans-serif&fwDefault=normal&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=cccccc&bgTextureHeader=highlight_soft&bgImgOpacityHeader=75&borderColorHeader=aaaaaa&fcHeader=222222&iconColorHeader=222222&bgColorContent=ffffff&bgTextureContent=flat&bgImgOpacityContent=75&borderColorContent=aaaaaa&fcContent=222222&iconColorContent=222222&bgColorDefault=e6e6e6&bgTextureDefault=glass&bgImgOpacityDefault=75&borderColorDefault=d3d3d3&fcDefault=555555&iconColorDefault=888888&bgColorHover=dadada&bgTextureHover=glass&bgImgOpacityHover=75&borderColorHover=999999&fcHover=212121&iconColorHover=454545&bgColorActive=ffffff&bgTextureActive=glass&bgImgOpacityActive=65&borderColorActive=aaaaaa&fcActive=212121&iconColorActive=454545&bgColorHighlight=fbf9ee&bgTextureHighlight=glass&bgImgOpacityHighlight=55&borderColorHighlight=fcefa1&fcHighlight=363636&iconColorHighlight=2e83ff&bgColorError=fef1ec&bgTextureError=glass&bgImgOpacityError=95&borderColorError=cd0a0a&fcError=cd0a0a&iconColorError=cd0a0a&bgColorOverlay=aaaaaa&bgTextureOverlay=flat&bgImgOpacityOverlay=0&opacityOverlay=30&bgColorShadow=aaaaaa&bgTextureShadow=flat&bgImgOpacityShadow=0&opacityShadow=30&thicknessShadow=8px&offsetTopShadow=-8px&offsetLeftShadow=-8px&cornerRadiusShadow=8px
|
assets/images/analytics.png
ADDED
Binary file
|
assets/images/cta-new-tab.png
ADDED
Binary file
|
assets/images/exit-intent-feild.png
ADDED
Binary file
|
assets/images/exit-intent-label.png
ADDED
Binary file
|
assets/js/admin.js
CHANGED
@@ -67,7 +67,7 @@ jQuery(function() {
|
|
67 |
}
|
68 |
// show gallery first:end
|
69 |
|
70 |
-
jQuery('#ig-admin-tabs').on('click', '.ig-admin-tabs-nav li', function(event) {
|
71 |
event.preventDefault();
|
72 |
if(!jQuery(this).hasClass('ig-admin-nav-notab')){
|
73 |
tabs.find('.ig-admin-tabs-nav li').not(this).removeClass('current');
|
67 |
}
|
68 |
// show gallery first:end
|
69 |
|
70 |
+
jQuery('#ig-admin-tabs').on('click', '.ig-admin-tabs-nav li:not(".ig-admin-nav-upsale")', function(event) {
|
71 |
event.preventDefault();
|
72 |
if(!jQuery(this).hasClass('ig-admin-nav-notab')){
|
73 |
tabs.find('.ig-admin-tabs-nav li').not(this).removeClass('current');
|
assets/js/admin.min.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
/* Chosen v1.1.0 | (c) 2011-2013 by Harvest | MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md */
|
2 |
!function(){var a,AbstractChosen,Chosen,SelectParser,b,c={}.hasOwnProperty,d=function(a,b){function d(){this.constructor=a}for(var e in b)c.call(b,e)&&(a[e]=b[e]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a};SelectParser=function(){function SelectParser(){this.options_index=0,this.parsed=[]}return SelectParser.prototype.add_node=function(a){return"OPTGROUP"===a.nodeName.toUpperCase()?this.add_group(a):this.add_option(a)},SelectParser.prototype.add_group=function(a){var b,c,d,e,f,g;for(b=this.parsed.length,this.parsed.push({array_index:b,group:!0,label:this.escapeExpression(a.label),children:0,disabled:a.disabled}),f=a.childNodes,g=[],d=0,e=f.length;e>d;d++)c=f[d],g.push(this.add_option(c,b,a.disabled));return g},SelectParser.prototype.add_option=function(a,b,c){return"OPTION"===a.nodeName.toUpperCase()?(""!==a.text?(null!=b&&(this.parsed[b].children+=1),this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,value:a.value,text:a.text,html:a.innerHTML,selected:a.selected,disabled:c===!0?c:a.disabled,group_array_index:b,classes:a.className,style:a.style.cssText})):this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,empty:!0}),this.options_index+=1):void 0},SelectParser.prototype.escapeExpression=function(a){var b,c;return null==a||a===!1?"":/[\&\<\>\"\'\`]/.test(a)?(b={"<":"<",">":">",'"':""","'":"'","`":"`"},c=/&(?!\w+;)|[\<\>\"\'\`]/g,a.replace(c,function(a){return b[a]||"&"})):a},SelectParser}(),SelectParser.select_to_array=function(a){var b,c,d,e,f;for(c=new SelectParser,f=a.childNodes,d=0,e=f.length;e>d;d++)b=f[d],c.add_node(b);return c.parsed},AbstractChosen=function(){function AbstractChosen(a,b){this.form_field=a,this.options=null!=b?b:{},AbstractChosen.browser_is_supported()&&(this.is_multiple=this.form_field.multiple,this.set_default_text(),this.set_default_values(),this.setup(),this.set_up_html(),this.register_observers())}return AbstractChosen.prototype.set_default_values=function(){var a=this;return this.click_test_action=function(b){return a.test_active_click(b)},this.activate_action=function(b){return a.activate_field(b)},this.active_field=!1,this.mouse_on_container=!1,this.results_showing=!1,this.result_highlighted=null,this.allow_single_deselect=null!=this.options.allow_single_deselect&&null!=this.form_field.options[0]&&""===this.form_field.options[0].text?this.options.allow_single_deselect:!1,this.disable_search_threshold=this.options.disable_search_threshold||0,this.disable_search=this.options.disable_search||!1,this.enable_split_word_search=null!=this.options.enable_split_word_search?this.options.enable_split_word_search:!0,this.group_search=null!=this.options.group_search?this.options.group_search:!0,this.search_contains=this.options.search_contains||!1,this.single_backstroke_delete=null!=this.options.single_backstroke_delete?this.options.single_backstroke_delete:!0,this.max_selected_options=this.options.max_selected_options||1/0,this.inherit_select_classes=this.options.inherit_select_classes||!1,this.display_selected_options=null!=this.options.display_selected_options?this.options.display_selected_options:!0,this.display_disabled_options=null!=this.options.display_disabled_options?this.options.display_disabled_options:!0},AbstractChosen.prototype.set_default_text=function(){return this.default_text=this.form_field.getAttribute("data-placeholder")?this.form_field.getAttribute("data-placeholder"):this.is_multiple?this.options.placeholder_text_multiple||this.options.placeholder_text||AbstractChosen.default_multiple_text:this.options.placeholder_text_single||this.options.placeholder_text||AbstractChosen.default_single_text,this.results_none_found=this.form_field.getAttribute("data-no_results_text")||this.options.no_results_text||AbstractChosen.default_no_result_text},AbstractChosen.prototype.mouse_enter=function(){return this.mouse_on_container=!0},AbstractChosen.prototype.mouse_leave=function(){return this.mouse_on_container=!1},AbstractChosen.prototype.input_focus=function(){var a=this;if(this.is_multiple){if(!this.active_field)return setTimeout(function(){return a.container_mousedown()},50)}else if(!this.active_field)return this.activate_field()},AbstractChosen.prototype.input_blur=function(){var a=this;return this.mouse_on_container?void 0:(this.active_field=!1,setTimeout(function(){return a.blur_test()},100))},AbstractChosen.prototype.results_option_build=function(a){var b,c,d,e,f;for(b="",f=this.results_data,d=0,e=f.length;e>d;d++)c=f[d],b+=c.group?this.result_add_group(c):this.result_add_option(c),(null!=a?a.first:void 0)&&(c.selected&&this.is_multiple?this.choice_build(c):c.selected&&!this.is_multiple&&this.single_set_selected_text(c.text));return b},AbstractChosen.prototype.result_add_option=function(a){var b,c;return a.search_match?this.include_option_in_results(a)?(b=[],a.disabled||a.selected&&this.is_multiple||b.push("active-result"),!a.disabled||a.selected&&this.is_multiple||b.push("disabled-result"),a.selected&&b.push("result-selected"),null!=a.group_array_index&&b.push("group-option"),""!==a.classes&&b.push(a.classes),c=document.createElement("li"),c.className=b.join(" "),c.style.cssText=a.style,c.setAttribute("data-option-array-index",a.array_index),c.innerHTML=a.search_text,this.outerHTML(c)):"":""},AbstractChosen.prototype.result_add_group=function(a){var b;return a.search_match||a.group_match?a.active_options>0?(b=document.createElement("li"),b.className="group-result",b.innerHTML=a.search_text,this.outerHTML(b)):"":""},AbstractChosen.prototype.results_update_field=function(){return this.set_default_text(),this.is_multiple||this.results_reset_cleanup(),this.result_clear_highlight(),this.results_build(),this.results_showing?this.winnow_results():void 0},AbstractChosen.prototype.reset_single_select_options=function(){var a,b,c,d,e;for(d=this.results_data,e=[],b=0,c=d.length;c>b;b++)a=d[b],a.selected?e.push(a.selected=!1):e.push(void 0);return e},AbstractChosen.prototype.results_toggle=function(){return this.results_showing?this.results_hide():this.results_show()},AbstractChosen.prototype.results_search=function(){return this.results_showing?this.winnow_results():this.results_show()},AbstractChosen.prototype.winnow_results=function(){var a,b,c,d,e,f,g,h,i,j,k,l,m;for(this.no_results_clear(),e=0,g=this.get_search_text(),a=g.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),d=this.search_contains?"":"^",c=new RegExp(d+a,"i"),j=new RegExp(a,"i"),m=this.results_data,k=0,l=m.length;l>k;k++)b=m[k],b.search_match=!1,f=null,this.include_option_in_results(b)&&(b.group&&(b.group_match=!1,b.active_options=0),null!=b.group_array_index&&this.results_data[b.group_array_index]&&(f=this.results_data[b.group_array_index],0===f.active_options&&f.search_match&&(e+=1),f.active_options+=1),(!b.group||this.group_search)&&(b.search_text=b.group?b.label:b.html,b.search_match=this.search_string_match(b.search_text,c),b.search_match&&!b.group&&(e+=1),b.search_match?(g.length&&(h=b.search_text.search(j),i=b.search_text.substr(0,h+g.length)+"</em>"+b.search_text.substr(h+g.length),b.search_text=i.substr(0,h)+"<em>"+i.substr(h)),null!=f&&(f.group_match=!0)):null!=b.group_array_index&&this.results_data[b.group_array_index].search_match&&(b.search_match=!0)));return this.result_clear_highlight(),1>e&&g.length?(this.update_results_content(""),this.no_results(g)):(this.update_results_content(this.results_option_build()),this.winnow_results_set_highlight())},AbstractChosen.prototype.search_string_match=function(a,b){var c,d,e,f;if(b.test(a))return!0;if(this.enable_split_word_search&&(a.indexOf(" ")>=0||0===a.indexOf("["))&&(d=a.replace(/\[|\]/g,"").split(" "),d.length))for(e=0,f=d.length;f>e;e++)if(c=d[e],b.test(c))return!0},AbstractChosen.prototype.choices_count=function(){var a,b,c,d;if(null!=this.selected_option_count)return this.selected_option_count;for(this.selected_option_count=0,d=this.form_field.options,b=0,c=d.length;c>b;b++)a=d[b],a.selected&&(this.selected_option_count+=1);return this.selected_option_count},AbstractChosen.prototype.choices_click=function(a){return a.preventDefault(),this.results_showing||this.is_disabled?void 0:this.results_show()},AbstractChosen.prototype.keyup_checker=function(a){var b,c;switch(b=null!=(c=a.which)?c:a.keyCode,this.search_field_scale(),b){case 8:if(this.is_multiple&&this.backstroke_length<1&&this.choices_count()>0)return this.keydown_backstroke();if(!this.pending_backstroke)return this.result_clear_highlight(),this.results_search();break;case 13:if(a.preventDefault(),this.results_showing)return this.result_select(a);break;case 27:return this.results_showing&&this.results_hide(),!0;case 9:case 38:case 40:case 16:case 91:case 17:break;default:return this.results_search()}},AbstractChosen.prototype.clipboard_event_checker=function(){var a=this;return setTimeout(function(){return a.results_search()},50)},AbstractChosen.prototype.container_width=function(){return null!=this.options.width?this.options.width:""+this.form_field.offsetWidth+"px"},AbstractChosen.prototype.include_option_in_results=function(a){return this.is_multiple&&!this.display_selected_options&&a.selected?!1:!this.display_disabled_options&&a.disabled?!1:a.empty?!1:!0},AbstractChosen.prototype.search_results_touchstart=function(a){return this.touch_started=!0,this.search_results_mouseover(a)},AbstractChosen.prototype.search_results_touchmove=function(a){return this.touch_started=!1,this.search_results_mouseout(a)},AbstractChosen.prototype.search_results_touchend=function(a){return this.touch_started?this.search_results_mouseup(a):void 0},AbstractChosen.prototype.outerHTML=function(a){var b;return a.outerHTML?a.outerHTML:(b=document.createElement("div"),b.appendChild(a),b.innerHTML)},AbstractChosen.browser_is_supported=function(){return"Microsoft Internet Explorer"===window.navigator.appName?document.documentMode>=8:/iP(od|hone)/i.test(window.navigator.userAgent)?!1:/Android/i.test(window.navigator.userAgent)&&/Mobile/i.test(window.navigator.userAgent)?!1:!0},AbstractChosen.default_multiple_text="Select Some Options",AbstractChosen.default_single_text="Select an Option",AbstractChosen.default_no_result_text="No results match",AbstractChosen}(),a=jQuery,a.fn.extend({chosen:function(b){return AbstractChosen.browser_is_supported()?this.each(function(){var c,d;c=a(this),d=c.data("chosen"),"destroy"===b&&d?d.destroy():d||c.data("chosen",new Chosen(this,b))}):this}}),Chosen=function(c){function Chosen(){return b=Chosen.__super__.constructor.apply(this,arguments)}return d(Chosen,c),Chosen.prototype.setup=function(){return this.form_field_jq=a(this.form_field),this.current_selectedIndex=this.form_field.selectedIndex,this.is_rtl=this.form_field_jq.hasClass("chosen-rtl")},Chosen.prototype.set_up_html=function(){var b,c;return b=["chosen-container"],b.push("chosen-container-"+(this.is_multiple?"multi":"single")),this.inherit_select_classes&&this.form_field.className&&b.push(this.form_field.className),this.is_rtl&&b.push("chosen-rtl"),c={"class":b.join(" "),style:"width: "+this.container_width()+";",title:this.form_field.title},this.form_field.id.length&&(c.id=this.form_field.id.replace(/[^\w]/g,"_")+"_chosen"),this.container=a("<div />",c),this.is_multiple?this.container.html('<ul class="chosen-choices"><li class="search-field"><input type="text" value="'+this.default_text+'" class="default" autocomplete="off" style="width:25px;" /></li></ul><div class="chosen-drop"><ul class="chosen-results"></ul></div>'):this.container.html('<a class="chosen-single chosen-default" tabindex="-1"><span>'+this.default_text+'</span><div><b></b></div></a><div class="chosen-drop"><div class="chosen-search"><input type="text" autocomplete="off" /></div><ul class="chosen-results"></ul></div>'),this.form_field_jq.hide().after(this.container),this.dropdown=this.container.find("div.chosen-drop").first(),this.search_field=this.container.find("input").first(),this.search_results=this.container.find("ul.chosen-results").first(),this.search_field_scale(),this.search_no_results=this.container.find("li.no-results").first(),this.is_multiple?(this.search_choices=this.container.find("ul.chosen-choices").first(),this.search_container=this.container.find("li.search-field").first()):(this.search_container=this.container.find("div.chosen-search").first(),this.selected_item=this.container.find(".chosen-single").first()),this.results_build(),this.set_tab_index(),this.set_label_behavior(),this.form_field_jq.trigger("chosen:ready",{chosen:this})},Chosen.prototype.register_observers=function(){var a=this;return this.container.bind("mousedown.chosen",function(b){a.container_mousedown(b)}),this.container.bind("mouseup.chosen",function(b){a.container_mouseup(b)}),this.container.bind("mouseenter.chosen",function(b){a.mouse_enter(b)}),this.container.bind("mouseleave.chosen",function(b){a.mouse_leave(b)}),this.search_results.bind("mouseup.chosen",function(b){a.search_results_mouseup(b)}),this.search_results.bind("mouseover.chosen",function(b){a.search_results_mouseover(b)}),this.search_results.bind("mouseout.chosen",function(b){a.search_results_mouseout(b)}),this.search_results.bind("mousewheel.chosen DOMMouseScroll.chosen",function(b){a.search_results_mousewheel(b)}),this.search_results.bind("touchstart.chosen",function(b){a.search_results_touchstart(b)}),this.search_results.bind("touchmove.chosen",function(b){a.search_results_touchmove(b)}),this.search_results.bind("touchend.chosen",function(b){a.search_results_touchend(b)}),this.form_field_jq.bind("chosen:updated.chosen",function(b){a.results_update_field(b)}),this.form_field_jq.bind("chosen:activate.chosen",function(b){a.activate_field(b)}),this.form_field_jq.bind("chosen:open.chosen",function(b){a.container_mousedown(b)}),this.form_field_jq.bind("chosen:close.chosen",function(b){a.input_blur(b)}),this.search_field.bind("blur.chosen",function(b){a.input_blur(b)}),this.search_field.bind("keyup.chosen",function(b){a.keyup_checker(b)}),this.search_field.bind("keydown.chosen",function(b){a.keydown_checker(b)}),this.search_field.bind("focus.chosen",function(b){a.input_focus(b)}),this.search_field.bind("cut.chosen",function(b){a.clipboard_event_checker(b)}),this.search_field.bind("paste.chosen",function(b){a.clipboard_event_checker(b)}),this.is_multiple?this.search_choices.bind("click.chosen",function(b){a.choices_click(b)}):this.container.bind("click.chosen",function(a){a.preventDefault()})},Chosen.prototype.destroy=function(){return a(this.container[0].ownerDocument).unbind("click.chosen",this.click_test_action),this.search_field[0].tabIndex&&(this.form_field_jq[0].tabIndex=this.search_field[0].tabIndex),this.container.remove(),this.form_field_jq.removeData("chosen"),this.form_field_jq.show()},Chosen.prototype.search_field_disabled=function(){return this.is_disabled=this.form_field_jq[0].disabled,this.is_disabled?(this.container.addClass("chosen-disabled"),this.search_field[0].disabled=!0,this.is_multiple||this.selected_item.unbind("focus.chosen",this.activate_action),this.close_field()):(this.container.removeClass("chosen-disabled"),this.search_field[0].disabled=!1,this.is_multiple?void 0:this.selected_item.bind("focus.chosen",this.activate_action))},Chosen.prototype.container_mousedown=function(b){return this.is_disabled||(b&&"mousedown"===b.type&&!this.results_showing&&b.preventDefault(),null!=b&&a(b.target).hasClass("search-choice-close"))?void 0:(this.active_field?this.is_multiple||!b||a(b.target)[0]!==this.selected_item[0]&&!a(b.target).parents("a.chosen-single").length||(b.preventDefault(),this.results_toggle()):(this.is_multiple&&this.search_field.val(""),a(this.container[0].ownerDocument).bind("click.chosen",this.click_test_action),this.results_show()),this.activate_field())},Chosen.prototype.container_mouseup=function(a){return"ABBR"!==a.target.nodeName||this.is_disabled?void 0:this.results_reset(a)},Chosen.prototype.search_results_mousewheel=function(a){var b;return a.originalEvent&&(b=-a.originalEvent.wheelDelta||a.originalEvent.detail),null!=b?(a.preventDefault(),"DOMMouseScroll"===a.type&&(b=40*b),this.search_results.scrollTop(b+this.search_results.scrollTop())):void 0},Chosen.prototype.blur_test=function(){return!this.active_field&&this.container.hasClass("chosen-container-active")?this.close_field():void 0},Chosen.prototype.close_field=function(){return a(this.container[0].ownerDocument).unbind("click.chosen",this.click_test_action),this.active_field=!1,this.results_hide(),this.container.removeClass("chosen-container-active"),this.clear_backstroke(),this.show_search_field_default(),this.search_field_scale()},Chosen.prototype.activate_field=function(){return this.container.addClass("chosen-container-active"),this.active_field=!0,this.search_field.val(this.search_field.val()),this.search_field.focus()},Chosen.prototype.test_active_click=function(b){var c;return c=a(b.target).closest(".chosen-container"),c.length&&this.container[0]===c[0]?this.active_field=!0:this.close_field()},Chosen.prototype.results_build=function(){return this.parsing=!0,this.selected_option_count=null,this.results_data=SelectParser.select_to_array(this.form_field),this.is_multiple?this.search_choices.find("li.search-choice").remove():this.is_multiple||(this.single_set_selected_text(),this.disable_search||this.form_field.options.length<=this.disable_search_threshold?(this.search_field[0].readOnly=!0,this.container.addClass("chosen-container-single-nosearch")):(this.search_field[0].readOnly=!1,this.container.removeClass("chosen-container-single-nosearch"))),this.update_results_content(this.results_option_build({first:!0})),this.search_field_disabled(),this.show_search_field_default(),this.search_field_scale(),this.parsing=!1},Chosen.prototype.result_do_highlight=function(a){var b,c,d,e,f;if(a.length){if(this.result_clear_highlight(),this.result_highlight=a,this.result_highlight.addClass("highlighted"),d=parseInt(this.search_results.css("maxHeight"),10),f=this.search_results.scrollTop(),e=d+f,c=this.result_highlight.position().top+this.search_results.scrollTop(),b=c+this.result_highlight.outerHeight(),b>=e)return this.search_results.scrollTop(b-d>0?b-d:0);if(f>c)return this.search_results.scrollTop(c)}},Chosen.prototype.result_clear_highlight=function(){return this.result_highlight&&this.result_highlight.removeClass("highlighted"),this.result_highlight=null},Chosen.prototype.results_show=function(){return this.is_multiple&&this.max_selected_options<=this.choices_count()?(this.form_field_jq.trigger("chosen:maxselected",{chosen:this}),!1):(this.container.addClass("chosen-with-drop"),this.results_showing=!0,this.search_field.focus(),this.search_field.val(this.search_field.val()),this.winnow_results(),this.form_field_jq.trigger("chosen:showing_dropdown",{chosen:this}))},Chosen.prototype.update_results_content=function(a){return this.search_results.html(a)},Chosen.prototype.results_hide=function(){return this.results_showing&&(this.result_clear_highlight(),this.container.removeClass("chosen-with-drop"),this.form_field_jq.trigger("chosen:hiding_dropdown",{chosen:this})),this.results_showing=!1},Chosen.prototype.set_tab_index=function(){var a;return this.form_field.tabIndex?(a=this.form_field.tabIndex,this.form_field.tabIndex=-1,this.search_field[0].tabIndex=a):void 0},Chosen.prototype.set_label_behavior=function(){var b=this;return this.form_field_label=this.form_field_jq.parents("label"),!this.form_field_label.length&&this.form_field.id.length&&(this.form_field_label=a("label[for='"+this.form_field.id+"']")),this.form_field_label.length>0?this.form_field_label.bind("click.chosen",function(a){return b.is_multiple?b.container_mousedown(a):b.activate_field()}):void 0},Chosen.prototype.show_search_field_default=function(){return this.is_multiple&&this.choices_count()<1&&!this.active_field?(this.search_field.val(this.default_text),this.search_field.addClass("default")):(this.search_field.val(""),this.search_field.removeClass("default"))},Chosen.prototype.search_results_mouseup=function(b){var c;return c=a(b.target).hasClass("active-result")?a(b.target):a(b.target).parents(".active-result").first(),c.length?(this.result_highlight=c,this.result_select(b),this.search_field.focus()):void 0},Chosen.prototype.search_results_mouseover=function(b){var c;return c=a(b.target).hasClass("active-result")?a(b.target):a(b.target).parents(".active-result").first(),c?this.result_do_highlight(c):void 0},Chosen.prototype.search_results_mouseout=function(b){return a(b.target).hasClass("active-result")?this.result_clear_highlight():void 0},Chosen.prototype.choice_build=function(b){var c,d,e=this;return c=a("<li />",{"class":"search-choice"}).html("<span>"+b.html+"</span>"),b.disabled?c.addClass("search-choice-disabled"):(d=a("<a />",{"class":"search-choice-close","data-option-array-index":b.array_index}),d.bind("click.chosen",function(a){return e.choice_destroy_link_click(a)}),c.append(d)),this.search_container.before(c)},Chosen.prototype.choice_destroy_link_click=function(b){return b.preventDefault(),b.stopPropagation(),this.is_disabled?void 0:this.choice_destroy(a(b.target))},Chosen.prototype.choice_destroy=function(a){return this.result_deselect(a[0].getAttribute("data-option-array-index"))?(this.show_search_field_default(),this.is_multiple&&this.choices_count()>0&&this.search_field.val().length<1&&this.results_hide(),a.parents("li").first().remove(),this.search_field_scale()):void 0},Chosen.prototype.results_reset=function(){return this.reset_single_select_options(),this.form_field.options[0].selected=!0,this.single_set_selected_text(),this.show_search_field_default(),this.results_reset_cleanup(),this.form_field_jq.trigger("change"),this.active_field?this.results_hide():void 0},Chosen.prototype.results_reset_cleanup=function(){return this.current_selectedIndex=this.form_field.selectedIndex,this.selected_item.find("abbr").remove()},Chosen.prototype.result_select=function(a){var b,c;return this.result_highlight?(b=this.result_highlight,this.result_clear_highlight(),this.is_multiple&&this.max_selected_options<=this.choices_count()?(this.form_field_jq.trigger("chosen:maxselected",{chosen:this}),!1):(this.is_multiple?b.removeClass("active-result"):this.reset_single_select_options(),c=this.results_data[b[0].getAttribute("data-option-array-index")],c.selected=!0,this.form_field.options[c.options_index].selected=!0,this.selected_option_count=null,this.is_multiple?this.choice_build(c):this.single_set_selected_text(c.text),(a.metaKey||a.ctrlKey)&&this.is_multiple||this.results_hide(),this.search_field.val(""),(this.is_multiple||this.form_field.selectedIndex!==this.current_selectedIndex)&&this.form_field_jq.trigger("change",{selected:this.form_field.options[c.options_index].value}),this.current_selectedIndex=this.form_field.selectedIndex,this.search_field_scale())):void 0},Chosen.prototype.single_set_selected_text=function(a){return null==a&&(a=this.default_text),a===this.default_text?this.selected_item.addClass("chosen-default"):(this.single_deselect_control_build(),this.selected_item.removeClass("chosen-default")),this.selected_item.find("span").text(a)},Chosen.prototype.result_deselect=function(a){var b;return b=this.results_data[a],this.form_field.options[b.options_index].disabled?!1:(b.selected=!1,this.form_field.options[b.options_index].selected=!1,this.selected_option_count=null,this.result_clear_highlight(),this.results_showing&&this.winnow_results(),this.form_field_jq.trigger("change",{deselected:this.form_field.options[b.options_index].value}),this.search_field_scale(),!0)},Chosen.prototype.single_deselect_control_build=function(){return this.allow_single_deselect?(this.selected_item.find("abbr").length||this.selected_item.find("span").first().after('<abbr class="search-choice-close"></abbr>'),this.selected_item.addClass("chosen-single-with-deselect")):void 0},Chosen.prototype.get_search_text=function(){return this.search_field.val()===this.default_text?"":a("<div/>").text(a.trim(this.search_field.val())).html()},Chosen.prototype.winnow_results_set_highlight=function(){var a,b;return b=this.is_multiple?[]:this.search_results.find(".result-selected.active-result"),a=b.length?b.first():this.search_results.find(".active-result").first(),null!=a?this.result_do_highlight(a):void 0},Chosen.prototype.no_results=function(b){var c;return c=a('<li class="no-results">'+this.results_none_found+' "<span></span>"</li>'),c.find("span").first().html(b),this.search_results.append(c),this.form_field_jq.trigger("chosen:no_results",{chosen:this})},Chosen.prototype.no_results_clear=function(){return this.search_results.find(".no-results").remove()},Chosen.prototype.keydown_arrow=function(){var a;return this.results_showing&&this.result_highlight?(a=this.result_highlight.nextAll("li.active-result").first())?this.result_do_highlight(a):void 0:this.results_show()},Chosen.prototype.keyup_arrow=function(){var a;return this.results_showing||this.is_multiple?this.result_highlight?(a=this.result_highlight.prevAll("li.active-result"),a.length?this.result_do_highlight(a.first()):(this.choices_count()>0&&this.results_hide(),this.result_clear_highlight())):void 0:this.results_show()},Chosen.prototype.keydown_backstroke=function(){var a;return this.pending_backstroke?(this.choice_destroy(this.pending_backstroke.find("a").first()),this.clear_backstroke()):(a=this.search_container.siblings("li.search-choice").last(),a.length&&!a.hasClass("search-choice-disabled")?(this.pending_backstroke=a,this.single_backstroke_delete?this.keydown_backstroke():this.pending_backstroke.addClass("search-choice-focus")):void 0)},Chosen.prototype.clear_backstroke=function(){return this.pending_backstroke&&this.pending_backstroke.removeClass("search-choice-focus"),this.pending_backstroke=null},Chosen.prototype.keydown_checker=function(a){var b,c;switch(b=null!=(c=a.which)?c:a.keyCode,this.search_field_scale(),8!==b&&this.pending_backstroke&&this.clear_backstroke(),b){case 8:this.backstroke_length=this.search_field.val().length;break;case 9:this.results_showing&&!this.is_multiple&&this.result_select(a),this.mouse_on_container=!1;break;case 13:a.preventDefault();break;case 38:a.preventDefault(),this.keyup_arrow();break;case 40:a.preventDefault(),this.keydown_arrow()}},Chosen.prototype.search_field_scale=function(){var b,c,d,e,f,g,h,i,j;if(this.is_multiple){for(d=0,h=0,f="position:absolute; left: -1000px; top: -1000px; display:none;",g=["font-size","font-style","font-weight","font-family","line-height","text-transform","letter-spacing"],i=0,j=g.length;j>i;i++)e=g[i],f+=e+":"+this.search_field.css(e)+";";return b=a("<div />",{style:f}),b.text(this.search_field.val()),a("body").append(b),h=b.width()+25,b.remove(),c=this.container.outerWidth(),h>c-10&&(h=c-10),this.search_field.css({width:h+"px"})}},Chosen}(AbstractChosen)}.call(this);;// Generated by CoffeeScript 1.3.1
|
3 |
-
(function(e){return e.fn.ajaxChosen=function(t,n){var r,i,s,o;t==null&&(t={});n==null&&(n=function(){});i={minTermLength:3,afterTypeDelay:500,jsonTermKey:"term"};o=this;r=null;s=e.extend({},i,t);this.chosen();return this.each(function(){return e(this).next(".chosen-container").find(".search-field > input, .chosen-search > input").bind("keyup",function(){var t,i,u,a;a=e.trim(e(this).attr("value"));i=a.length<s.minTermLength?"Keep typing...":"Looking for '"+a+"'";o.next(".chosen-container").find(".no-results").text(i);if(a===e(this).data("prevVal"))return!1;e(this).data("prevVal",a);this.timer&&clearTimeout(this.timer);if(a.length<s.minTermLength)return!1;t=e(this);s.data==null&&(s.data={});s.data[s.jsonTermKey]=a;s.dataCallback!=null&&(s.data=s.dataCallback(s.data));u=s.success;s.success=function(r){var i,s;if(r==null)return;s=[];o.find("option").each(function(){return e(this).is(":selected")?s.push(e(this).val()+"-"+e(this).text()):e(this).remove()});i=n(r);e.each(i,function(t,n){if(e.inArray(t+"-"+n,s)===-1)return e("<option />").attr("value",t).html(n).appendTo(o)});o.trigger("chosen:updated");u!=null&&u(r);t.attr("value",a);return t.css("width","auto")};return this.timer=setTimeout(function(){r&&r.abort();return r=e.ajax(s)},s.afterTypeDelay)})})}})(jQuery);;jQuery(function(){function a(a){var b=jQuery(a).find(".message_type").val();jQuery(a).closest(".message-edit-row").prev().find(".message_header_label").text(b).removeClass().addClass("message_header_label ig_"+b);var c=jQuery(a).find(".message_row.ig_"+b).find(".message_theme").val(),d=jQuery(a).find(".message_row.ig_"+b).find("#message_form_style").val(),e=jQuery(a).find("#message_theme_ig_"+b).find("."+c).attr("style"),f=jQuery(a).find("#message_form_style").find("."+d).attr("style");jQuery(a).find(".message_row, .location").hide(),jQuery(a).find(".ig_"+b).show(),jQuery(a).find(".message_row.ig_"+b).find(".message_theme").next().find(".chosen-single span").attr("style",e),jQuery(a).find(".message_row.ig_"+b).find("#message_form_style").next().find(".chosen-single span").attr("style",f).text(function(){return jQuery(this).text().substr(0,jQuery(this).text().indexOf(" "))||jQuery(this).text()}),"block"!==jQuery(a).find(".message_body").parent().css("display")?jQuery(a).find(".message_body").parent().next(".wp-editor-wrap").hide():jQuery(a).find(".message_body").parent().next(".wp-editor-wrap").show(),jQuery(a).find(".message_form_layout:checked").is(":visible")||jQuery(a).find(".message_form_layout:visible").first().prop("checked",!0),1==jQuery(a).find(".show_form_options").prop("checked")&&jQuery(a).find(".message_link").parent().hide(),jQuery(".message_form_layout").change()}function b(a,c,d){var e=Math.floor(Math.random()*(d-c+1))+c;return e==a?b(e,c,d):e}function c(){var a='<span><label class="options_header"><span id="valid-field"> </span></label> <input type="text" class="url_input_field" data-option="local_url" name="campaign_target_rules[local_urls][]" value="'+e+'*"/><span class="delete-url"></span></span>';return a}function d(){0==jQuery(".message-row").length?jQuery(".empty_campaign").show():jQuery(".empty_campaign").hide()}var e=icegram_writepanel_params.home_url;jQuery(document).ready(function(){var c=jQuery("#ig-admin-tabs");c.find(".ig-admin-nav-main").addClass("current"),c.find("#ig-admin-tab-main").show(),"post-new-php"===adminpage&&jQuery("#wpbody").on("click","#ig-add-new-campaign",function(){jQuery("#poststuff").css("position","static"),jQuery("#postbox-container-1 #side-sortables").removeClass("empty-container").addClass("gal-toggled"),jQuery(".gallery-heading, .ig-gallery-wrap").hide(),jQuery(".postbox-container").show(),jQuery(".wrap h1.wp-heading-inline").not(".gallery-heading").show(),jQuery(".ig-gallery-wrap").siblings().not(".gallery-heading").show(),jQuery(".postbox-container").siblings().show()}),jQuery("#ig-admin-tabs").on("click",".ig-admin-tabs-nav li",function(a){a.preventDefault(),jQuery(this).hasClass("ig-admin-nav-notab")||(c.find(".ig-admin-tabs-nav li").not(this).removeClass("current"),jQuery(".ig-admin-tab").fadeOut("fast"),jQuery(jQuery(this).addClass("current").find("a").attr("href")).fadeIn("fast"),jQuery(this).hasClass("new-variation")&&(jQuery(this).removeClass("current"),jQuery(".ig-admin-nav-variations").addClass("current")))});var e=window.send_to_editor,f=jQuery(".ig_preview_button");jQuery("#submitdiv .submitbox #minor-publishing-actions").after(f),f.fadeIn("fast"),jQuery(".color-field").wpColorPicker().each(function(a){var b=jQuery(this).data("color-label")||"";""!==b&&jQuery(this).closest(".wp-picker-container").find("a.wp-color-result").attr("title",b)}),jQuery(".campaign_data, #message-settings").on("change",".show_color_options",function(){jQuery(this).closest("p").next(".message_colors_options_container").toggle(!this.checked)}).change(),d(),jQuery(".message_edit:first").trigger("click"),this_data=jQuery(".message_type").closest(".message-setting-fields");for(var g=0;g<this_data.length;g++)a(this_data[g]);jQuery(".campaign_data, #message-settings").on("change",".message_theme",function(a){var b=jQuery(a.target).parents(".message-setting-fields"),c=jQuery(b).find(".message_type").val(),d=jQuery(b).find(".message_row.ig_"+c).find(".message_theme").val(),e=jQuery(b).find("#message_theme_ig_"+c).find("."+d).attr("style");jQuery(b).find(".message_row.ig_"+c).find(".message_theme").next().find(".chosen-single span").attr("style",e)}),jQuery(".campaign_data, #message-settings").on("change",".rainmaker_form_list",function(a){"null"!==(jQuery(a.target).val()||"null")&&jQuery(a.target).parent().siblings(".message_form_html_original").hide()}),jQuery(".campaign_data, #message-settings").on("click",".message_image_button",function(a){var b=this;return window.send_to_editor=function(a){imgurl=jQuery("img",a).attr("src"),jQuery(b).parent().find("#upload_image").val(imgurl),tb_remove(),window.send_to_editor=e},!1}),jQuery(".campaign_data, #message-settings").on("click",".message_headline_button",function(){var a=jQuery(this).prev().attr("data-headline"),c=icegram_writepanel_params.available_headlines.length,d=b(a,0,c),e=icegram_writepanel_params.available_headlines[d];jQuery(this).prev().val(e)}),jQuery(".tips, .help_tip").tipTip({attribute:"data-tip"}),jQuery("span.test_class").hover(function(){jQuery(this).next().show()},function(){jQuery(this).next().hide()}),jQuery(".campaign_data .handle, .campaign_data .handlediv").unbind("click"),jQuery(".campaign_data .handlediv").hide(),jQuery("#poststuff").on("click","#publish",function(a){jQuery(".campaign_data").find(".message_header_label.ig_unknown").length&&(alert("Please select Message type"),a.preventDefault())})}),jQuery(".campaign_data, #message-settings").on("click",".message_delete",function(){jQuery(this).parent().parent().next().remove(),jQuery(this).parent().parent().remove(),d()}),jQuery(".campaign_data, #message-settings").on("click",".message_edit",function(){jQuery(this).parent().parent().next().toggle(),jQuery(this).parent().parent().find(".message-title-text, .message-title-input").toggle()}),jQuery(".campaign_data, #message-settings").on("click",".embed_form_code_toggle",function(){jQuery(this).parent().parent().siblings(".message_form_html_original").toggle()}),jQuery(".campaign_data, #message-settings").on("change",".message-title-input",function(){jQuery(this).prev().text(jQuery(this).val())}),jQuery("select.ajax_chosen_select_messages").ajaxChosen({type:"GET",url:icegram_writepanel_params.ajax_url,dataType:"json",afterTypeDelay:100,data:{action:"icegram_json_search_messages",security:icegram_writepanel_params.search_message_nonce}},function(a){var b={};return jQuery.each(a,function(a,c){b[a]=c}),b}),jQuery(".campaign_data, #message-settings").on("change",".show_form_options",function(a){var b=jQuery(this).closest("p");if(jQuery(b).siblings(".message_form_options").slideToggle(this.checked),this.checked)jQuery(b).closest(".thickbox_edit_message").find(".message_link").parent().hide(),jQuery(b).siblings("p.cta-actions").find("select option").removeAttr("disabled"),jQuery(b).siblings("p.cta-actions").find("select").find('option[value="url"], option[value="hide"], option[value="cta_another_message"]').attr("disabled",!0).attr("selected",!1).end().find('option[value="form"]').attr("selected",!0).trigger("change"),jQuery(b).siblings(".message_form_options").find(".message_form_layout").change();else{jQuery(b).siblings("p.cta-actions").find("select option").removeAttr("disabled");var c=jQuery(b).siblings(".message_form_options").siblings(".wp-editor-wrap").find(".wp-editor-area"),d=jQuery(c).val().trim().replace("[ig_form]","");jQuery(c).val(d),jQuery(b).closest(".thickbox_edit_message").find(".message_link").parent().show()}}).change(),jQuery(".campaign_data, #message-settings").on("change",".message_form_style",function(a){var b=jQuery(a.target).parents(".message-setting-fields"),c=jQuery(b).find("#message_form_style").val(),d=jQuery(b).find("#message_form_style").find("."+c).attr("style");jQuery(b).find(".message_form_style").next().find(".chosen-single span").attr("style",d).text(function(){return jQuery(this).text().substr(0,jQuery(this).text().indexOf(" "))||jQuery(this).text()})}),jQuery(".campaign_data, #message-settings").on("change",".message_form_layout ",function(){if(jQuery(this).is(":visible")){var a=this,b=jQuery(this).closest(".message_form_options").siblings(".wp-editor-wrap").find(".wp-editor-area"),c=jQuery(b).val().trim();jQuery(a).closest(".form_radio_group").siblings(".form_inline_shortcode").hide(),jQuery(a).closest(".form_radio_group").siblings(".message_form_color").show(),jQuery(a).is(":checked")&&jQuery(a).closest(".message_form_options").prev("p.message_form_options_check").find(".show_form_options").is(":checked")&&("inline"==jQuery(a).val()?(-1==c.indexOf("[ig_form]")&&(c+="[ig_form]"),jQuery(a).closest(".form_radio_group").siblings(".message_form_color, .form_inline_shortcode").toggle()):"inline"!=jQuery(a).val()&&(c=c.replace("[ig_form]",""))),jQuery(b).val(c)}}),jQuery(".campaign_data, #message-settings").on("blur",".message_form_html_original",function(a){var b=this,c=jQuery("<div/>").html(jQuery(b).val()).find("input[type=submit], button, input[type=button]").not("*:disabled");if(c.length>0){var d=jQuery(c[c.length-1]),e=d.is("button")?d.not("br, span, div").text():d.val();jQuery(b).closest(".message_form_options").siblings("p").find("#message_label").val(e.trim())}}),jQuery(".campaign_data, #message-settings").on("change",".show_custom_code_options",function(a){var b=jQuery(this).closest("p");jQuery(b).siblings(".message_custom_code_options").slideToggle(this.checked)}),jQuery(".ajax_chosen_select_messages").chosen(),jQuery(".campaign_data, #message-settings").on("change",".ajax_chosen_select_messages",function(){var b={},c=jQuery("#ig-admin-tabs li.current").attr("variation_id");"undefined"!=typeof c&&jQuery.extend(b,{selected_tab:c});var e=jQuery.extend({},tinyMCEPreInit.mceInit.content),f=jQuery.extend({},tinyMCEPreInit.qtInit.content),g=jQuery(this).parent().siblings(".campaign_target_rules_panel");"undefined"!=typeof g&&(b.parent_campaign_box=g);var h=jQuery(g).find(".message-row").length,i=jQuery(this).val();return""==i?void jQuery(".ajax_chosen_select_messages").val("").trigger("chosen:updated"):(jQuery(".message-edit-row").hide(),jQuery(".message-title-text").show(),jQuery(".message-title-input").hide(),void jQuery.ajax({type:"POST",url:icegram_writepanel_params.ajax_url,dataType:"json",data:{action:"get_message_action_row",message_id:i,row:h},success:function(c){if(h++,jQuery(g).find(".messages-list .messages_list_table tbody").append(c.main),jQuery(".color-field").wpColorPicker().each(function(a){var b=jQuery(this).data("color-label")||"";""!==b&&jQuery(this).closest(".wp-picker-container").find("a.wp-color-result").attr("title",b)}),jQuery(".campaign_data, #message-settings").on("change",".show_color_options",function(){jQuery(this).closest("p").next(".message_colors_options_container").toggle(!this.checked)}).change(),a(jQuery("#"+c.id)),jQuery(".ajax_chosen_select_messages").val("").trigger("chosen:updated"),jQuery(".campaign_data, #message-settings").find(".message_theme").append('<option value="ig_get_more_theme" class="ig_get_more">Get more Themes</option>'),jQuery(".campaign_data, #message-settings").find(".message_animation").append('<option value="ig_get_more_animation" class="ig_get_more">Get more Animations</option>'),jQuery("select.icegram_chosen_page").chosen({disable_search_threshold:10}),d(),jQuery(".message-setting-fields").trigger("change"),jQuery(".tips, .help_tip").tipTip({attribute:"data-tip"}),"undefined"==typeof tinyMCEPreInit.mceInit["edit"+c.id]){for(_prop in e)"string"==typeof e[_prop]&&"content_css"!==_prop&&(e[_prop]=e[_prop].replace(new RegExp("content","g"),"edit"+c.id));tinyMCEPreInit.mceInit["edit"+c.id]=e}if("undefined"==typeof tinyMCEPreInit.qtInit["edit"+c.id]){for(_prop in f)"string"==typeof f[_prop]&&"content_css"!==_prop&&(f[_prop]=f[_prop].replace(new RegExp("content","g"),"edit"+c.id));tinyMCEPreInit.qtInit["edit"+c.id]=f}tinyMCE.init({id:tinyMCEPreInit.mceInit["edit"+c.id]}),quicktags({id:"edit"+c.id}),QTags._buttonsInit(),jQuery("#wp-edit"+c.id+"-wrap").hasClass("tmce-active")?jQuery("#edit"+c.id+"-tmce").click():jQuery("#edit"+c.id+"-html").click(),jQuery(window).trigger("icegram_message_added_ajax",[b])}}))}),jQuery(".campaign_target_rules").on("click","#add_local_url_row",function(a){a.preventDefault();var b=c();jQuery(".local_url").find(".url_input_field").length?jQuery(b).insertAfter(jQuery(".local_url").find(".url_input_field").last().parent("span")):jQuery(b).insertBefore(jQuery(".local_url").find("#add_local_url_row_label"))}),jQuery(".campaign_target_rules").on("click",".delete-url",function(a){jQuery(this).parent().remove()}),jQuery(document).on("click",".campaign_preview",function(a){a.preventDefault(),tinyMCE.triggerSave(),params=jQuery("#post").serializeArray(),params.push({name:"action",value:"save_campaign_preview"}),jQuery.ajax({type:"POST",async:!1,url:icegram_writepanel_params.ajax_url,data:params,success:function(a){""!=a&&window.open(a,"preview_window")}})}),jQuery(".campaign_data, #message-settings").find(".message_theme").append('<option value="ig_get_more_theme" class="ig_get_more">Get more themes</option>'),jQuery(".campaign_data, #message-settings").find(".message_animation").append('<option value="ig_get_more_animation" class="ig_get_more">Get more Animations</option>'),jQuery(".campaign_data, #message-settings").on("change",".message_theme, .message_animation",function(){"ig_get_more_theme"==jQuery(this).val()&&window.open("https://www.icegram.com/product-category/themes-addons/?utm_source=icegram&utm_medium=admin&utm_campaign=theme_packs"),"ig_get_more_animation"==jQuery(this).val()&&window.open("https://www.icegram.com/animation-effects/?utm_source=icegram&utm_medium=admin&utm_campaign=animation_pack")}),jQuery("select.icegram_chosen_page").chosen({disable_search_threshold:10}),jQuery("input#users_logged_in, input#users_all ,input#users_not_logged_in").on("change",function(){"logged_in"==jQuery(this).val()?(jQuery("select#users_roles").parent("p").show(),jQuery("#users_roles_chosen").find("input").trigger("click")):jQuery("select#users_roles").parent("p").hide()}),jQuery(".schedule_rule").on("change",function(){"when_schedule"==jQuery(this).attr("id")?jQuery("#date_picker").show():jQuery("#date_picker").hide()}),jQuery("input#where_other_page").on("change",function(){jQuery("select#where_page_id").parent("p").slideToggle(),jQuery(this).is(":checked")&&jQuery("#where_page_id_chosen").find("input").trigger("click")}),jQuery("input#where_sitewide").on("change",function(){jQuery("select#exclude_page_id").parent("p").slideToggle()}),jQuery("input#where_local_url").on("change",function(){jQuery(".local_url").slideToggle()}),jQuery(".date-picker").datepicker({dateFormat:"yy-mm-dd",defaultDate:0,showOtherMonths:!0,selectOtherMonths:!0,changeMonth:!0,changeYear:!0,showButtonPanel:!1,beforeShow:function(a,b){jQuery("#ui-datepicker-div").addClass("ig-date-picker")}}),jQuery(".campaign_target_rules").on("focusout","input.url_input_field",function(){var a=this;if(jQuery(a).parent().find("span#valid-field").removeClass("error"),"undefine"!==jQuery(a).data("option")&&"local_url"==jQuery(a).data("option")&&"*"!=jQuery(a).val()){var b=a.value;if(b.indexOf(e)<0)return void jQuery(a).val(e+b)}})});;/*
|
4 |
* TipTip
|
5 |
* Copyright 2010 Drew Wilson
|
6 |
* www.drewwilson.com
|
1 |
/* Chosen v1.1.0 | (c) 2011-2013 by Harvest | MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md */
|
2 |
!function(){var a,AbstractChosen,Chosen,SelectParser,b,c={}.hasOwnProperty,d=function(a,b){function d(){this.constructor=a}for(var e in b)c.call(b,e)&&(a[e]=b[e]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a};SelectParser=function(){function SelectParser(){this.options_index=0,this.parsed=[]}return SelectParser.prototype.add_node=function(a){return"OPTGROUP"===a.nodeName.toUpperCase()?this.add_group(a):this.add_option(a)},SelectParser.prototype.add_group=function(a){var b,c,d,e,f,g;for(b=this.parsed.length,this.parsed.push({array_index:b,group:!0,label:this.escapeExpression(a.label),children:0,disabled:a.disabled}),f=a.childNodes,g=[],d=0,e=f.length;e>d;d++)c=f[d],g.push(this.add_option(c,b,a.disabled));return g},SelectParser.prototype.add_option=function(a,b,c){return"OPTION"===a.nodeName.toUpperCase()?(""!==a.text?(null!=b&&(this.parsed[b].children+=1),this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,value:a.value,text:a.text,html:a.innerHTML,selected:a.selected,disabled:c===!0?c:a.disabled,group_array_index:b,classes:a.className,style:a.style.cssText})):this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,empty:!0}),this.options_index+=1):void 0},SelectParser.prototype.escapeExpression=function(a){var b,c;return null==a||a===!1?"":/[\&\<\>\"\'\`]/.test(a)?(b={"<":"<",">":">",'"':""","'":"'","`":"`"},c=/&(?!\w+;)|[\<\>\"\'\`]/g,a.replace(c,function(a){return b[a]||"&"})):a},SelectParser}(),SelectParser.select_to_array=function(a){var b,c,d,e,f;for(c=new SelectParser,f=a.childNodes,d=0,e=f.length;e>d;d++)b=f[d],c.add_node(b);return c.parsed},AbstractChosen=function(){function AbstractChosen(a,b){this.form_field=a,this.options=null!=b?b:{},AbstractChosen.browser_is_supported()&&(this.is_multiple=this.form_field.multiple,this.set_default_text(),this.set_default_values(),this.setup(),this.set_up_html(),this.register_observers())}return AbstractChosen.prototype.set_default_values=function(){var a=this;return this.click_test_action=function(b){return a.test_active_click(b)},this.activate_action=function(b){return a.activate_field(b)},this.active_field=!1,this.mouse_on_container=!1,this.results_showing=!1,this.result_highlighted=null,this.allow_single_deselect=null!=this.options.allow_single_deselect&&null!=this.form_field.options[0]&&""===this.form_field.options[0].text?this.options.allow_single_deselect:!1,this.disable_search_threshold=this.options.disable_search_threshold||0,this.disable_search=this.options.disable_search||!1,this.enable_split_word_search=null!=this.options.enable_split_word_search?this.options.enable_split_word_search:!0,this.group_search=null!=this.options.group_search?this.options.group_search:!0,this.search_contains=this.options.search_contains||!1,this.single_backstroke_delete=null!=this.options.single_backstroke_delete?this.options.single_backstroke_delete:!0,this.max_selected_options=this.options.max_selected_options||1/0,this.inherit_select_classes=this.options.inherit_select_classes||!1,this.display_selected_options=null!=this.options.display_selected_options?this.options.display_selected_options:!0,this.display_disabled_options=null!=this.options.display_disabled_options?this.options.display_disabled_options:!0},AbstractChosen.prototype.set_default_text=function(){return this.default_text=this.form_field.getAttribute("data-placeholder")?this.form_field.getAttribute("data-placeholder"):this.is_multiple?this.options.placeholder_text_multiple||this.options.placeholder_text||AbstractChosen.default_multiple_text:this.options.placeholder_text_single||this.options.placeholder_text||AbstractChosen.default_single_text,this.results_none_found=this.form_field.getAttribute("data-no_results_text")||this.options.no_results_text||AbstractChosen.default_no_result_text},AbstractChosen.prototype.mouse_enter=function(){return this.mouse_on_container=!0},AbstractChosen.prototype.mouse_leave=function(){return this.mouse_on_container=!1},AbstractChosen.prototype.input_focus=function(){var a=this;if(this.is_multiple){if(!this.active_field)return setTimeout(function(){return a.container_mousedown()},50)}else if(!this.active_field)return this.activate_field()},AbstractChosen.prototype.input_blur=function(){var a=this;return this.mouse_on_container?void 0:(this.active_field=!1,setTimeout(function(){return a.blur_test()},100))},AbstractChosen.prototype.results_option_build=function(a){var b,c,d,e,f;for(b="",f=this.results_data,d=0,e=f.length;e>d;d++)c=f[d],b+=c.group?this.result_add_group(c):this.result_add_option(c),(null!=a?a.first:void 0)&&(c.selected&&this.is_multiple?this.choice_build(c):c.selected&&!this.is_multiple&&this.single_set_selected_text(c.text));return b},AbstractChosen.prototype.result_add_option=function(a){var b,c;return a.search_match?this.include_option_in_results(a)?(b=[],a.disabled||a.selected&&this.is_multiple||b.push("active-result"),!a.disabled||a.selected&&this.is_multiple||b.push("disabled-result"),a.selected&&b.push("result-selected"),null!=a.group_array_index&&b.push("group-option"),""!==a.classes&&b.push(a.classes),c=document.createElement("li"),c.className=b.join(" "),c.style.cssText=a.style,c.setAttribute("data-option-array-index",a.array_index),c.innerHTML=a.search_text,this.outerHTML(c)):"":""},AbstractChosen.prototype.result_add_group=function(a){var b;return a.search_match||a.group_match?a.active_options>0?(b=document.createElement("li"),b.className="group-result",b.innerHTML=a.search_text,this.outerHTML(b)):"":""},AbstractChosen.prototype.results_update_field=function(){return this.set_default_text(),this.is_multiple||this.results_reset_cleanup(),this.result_clear_highlight(),this.results_build(),this.results_showing?this.winnow_results():void 0},AbstractChosen.prototype.reset_single_select_options=function(){var a,b,c,d,e;for(d=this.results_data,e=[],b=0,c=d.length;c>b;b++)a=d[b],a.selected?e.push(a.selected=!1):e.push(void 0);return e},AbstractChosen.prototype.results_toggle=function(){return this.results_showing?this.results_hide():this.results_show()},AbstractChosen.prototype.results_search=function(){return this.results_showing?this.winnow_results():this.results_show()},AbstractChosen.prototype.winnow_results=function(){var a,b,c,d,e,f,g,h,i,j,k,l,m;for(this.no_results_clear(),e=0,g=this.get_search_text(),a=g.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),d=this.search_contains?"":"^",c=new RegExp(d+a,"i"),j=new RegExp(a,"i"),m=this.results_data,k=0,l=m.length;l>k;k++)b=m[k],b.search_match=!1,f=null,this.include_option_in_results(b)&&(b.group&&(b.group_match=!1,b.active_options=0),null!=b.group_array_index&&this.results_data[b.group_array_index]&&(f=this.results_data[b.group_array_index],0===f.active_options&&f.search_match&&(e+=1),f.active_options+=1),(!b.group||this.group_search)&&(b.search_text=b.group?b.label:b.html,b.search_match=this.search_string_match(b.search_text,c),b.search_match&&!b.group&&(e+=1),b.search_match?(g.length&&(h=b.search_text.search(j),i=b.search_text.substr(0,h+g.length)+"</em>"+b.search_text.substr(h+g.length),b.search_text=i.substr(0,h)+"<em>"+i.substr(h)),null!=f&&(f.group_match=!0)):null!=b.group_array_index&&this.results_data[b.group_array_index].search_match&&(b.search_match=!0)));return this.result_clear_highlight(),1>e&&g.length?(this.update_results_content(""),this.no_results(g)):(this.update_results_content(this.results_option_build()),this.winnow_results_set_highlight())},AbstractChosen.prototype.search_string_match=function(a,b){var c,d,e,f;if(b.test(a))return!0;if(this.enable_split_word_search&&(a.indexOf(" ")>=0||0===a.indexOf("["))&&(d=a.replace(/\[|\]/g,"").split(" "),d.length))for(e=0,f=d.length;f>e;e++)if(c=d[e],b.test(c))return!0},AbstractChosen.prototype.choices_count=function(){var a,b,c,d;if(null!=this.selected_option_count)return this.selected_option_count;for(this.selected_option_count=0,d=this.form_field.options,b=0,c=d.length;c>b;b++)a=d[b],a.selected&&(this.selected_option_count+=1);return this.selected_option_count},AbstractChosen.prototype.choices_click=function(a){return a.preventDefault(),this.results_showing||this.is_disabled?void 0:this.results_show()},AbstractChosen.prototype.keyup_checker=function(a){var b,c;switch(b=null!=(c=a.which)?c:a.keyCode,this.search_field_scale(),b){case 8:if(this.is_multiple&&this.backstroke_length<1&&this.choices_count()>0)return this.keydown_backstroke();if(!this.pending_backstroke)return this.result_clear_highlight(),this.results_search();break;case 13:if(a.preventDefault(),this.results_showing)return this.result_select(a);break;case 27:return this.results_showing&&this.results_hide(),!0;case 9:case 38:case 40:case 16:case 91:case 17:break;default:return this.results_search()}},AbstractChosen.prototype.clipboard_event_checker=function(){var a=this;return setTimeout(function(){return a.results_search()},50)},AbstractChosen.prototype.container_width=function(){return null!=this.options.width?this.options.width:""+this.form_field.offsetWidth+"px"},AbstractChosen.prototype.include_option_in_results=function(a){return this.is_multiple&&!this.display_selected_options&&a.selected?!1:!this.display_disabled_options&&a.disabled?!1:a.empty?!1:!0},AbstractChosen.prototype.search_results_touchstart=function(a){return this.touch_started=!0,this.search_results_mouseover(a)},AbstractChosen.prototype.search_results_touchmove=function(a){return this.touch_started=!1,this.search_results_mouseout(a)},AbstractChosen.prototype.search_results_touchend=function(a){return this.touch_started?this.search_results_mouseup(a):void 0},AbstractChosen.prototype.outerHTML=function(a){var b;return a.outerHTML?a.outerHTML:(b=document.createElement("div"),b.appendChild(a),b.innerHTML)},AbstractChosen.browser_is_supported=function(){return"Microsoft Internet Explorer"===window.navigator.appName?document.documentMode>=8:/iP(od|hone)/i.test(window.navigator.userAgent)?!1:/Android/i.test(window.navigator.userAgent)&&/Mobile/i.test(window.navigator.userAgent)?!1:!0},AbstractChosen.default_multiple_text="Select Some Options",AbstractChosen.default_single_text="Select an Option",AbstractChosen.default_no_result_text="No results match",AbstractChosen}(),a=jQuery,a.fn.extend({chosen:function(b){return AbstractChosen.browser_is_supported()?this.each(function(){var c,d;c=a(this),d=c.data("chosen"),"destroy"===b&&d?d.destroy():d||c.data("chosen",new Chosen(this,b))}):this}}),Chosen=function(c){function Chosen(){return b=Chosen.__super__.constructor.apply(this,arguments)}return d(Chosen,c),Chosen.prototype.setup=function(){return this.form_field_jq=a(this.form_field),this.current_selectedIndex=this.form_field.selectedIndex,this.is_rtl=this.form_field_jq.hasClass("chosen-rtl")},Chosen.prototype.set_up_html=function(){var b,c;return b=["chosen-container"],b.push("chosen-container-"+(this.is_multiple?"multi":"single")),this.inherit_select_classes&&this.form_field.className&&b.push(this.form_field.className),this.is_rtl&&b.push("chosen-rtl"),c={"class":b.join(" "),style:"width: "+this.container_width()+";",title:this.form_field.title},this.form_field.id.length&&(c.id=this.form_field.id.replace(/[^\w]/g,"_")+"_chosen"),this.container=a("<div />",c),this.is_multiple?this.container.html('<ul class="chosen-choices"><li class="search-field"><input type="text" value="'+this.default_text+'" class="default" autocomplete="off" style="width:25px;" /></li></ul><div class="chosen-drop"><ul class="chosen-results"></ul></div>'):this.container.html('<a class="chosen-single chosen-default" tabindex="-1"><span>'+this.default_text+'</span><div><b></b></div></a><div class="chosen-drop"><div class="chosen-search"><input type="text" autocomplete="off" /></div><ul class="chosen-results"></ul></div>'),this.form_field_jq.hide().after(this.container),this.dropdown=this.container.find("div.chosen-drop").first(),this.search_field=this.container.find("input").first(),this.search_results=this.container.find("ul.chosen-results").first(),this.search_field_scale(),this.search_no_results=this.container.find("li.no-results").first(),this.is_multiple?(this.search_choices=this.container.find("ul.chosen-choices").first(),this.search_container=this.container.find("li.search-field").first()):(this.search_container=this.container.find("div.chosen-search").first(),this.selected_item=this.container.find(".chosen-single").first()),this.results_build(),this.set_tab_index(),this.set_label_behavior(),this.form_field_jq.trigger("chosen:ready",{chosen:this})},Chosen.prototype.register_observers=function(){var a=this;return this.container.bind("mousedown.chosen",function(b){a.container_mousedown(b)}),this.container.bind("mouseup.chosen",function(b){a.container_mouseup(b)}),this.container.bind("mouseenter.chosen",function(b){a.mouse_enter(b)}),this.container.bind("mouseleave.chosen",function(b){a.mouse_leave(b)}),this.search_results.bind("mouseup.chosen",function(b){a.search_results_mouseup(b)}),this.search_results.bind("mouseover.chosen",function(b){a.search_results_mouseover(b)}),this.search_results.bind("mouseout.chosen",function(b){a.search_results_mouseout(b)}),this.search_results.bind("mousewheel.chosen DOMMouseScroll.chosen",function(b){a.search_results_mousewheel(b)}),this.search_results.bind("touchstart.chosen",function(b){a.search_results_touchstart(b)}),this.search_results.bind("touchmove.chosen",function(b){a.search_results_touchmove(b)}),this.search_results.bind("touchend.chosen",function(b){a.search_results_touchend(b)}),this.form_field_jq.bind("chosen:updated.chosen",function(b){a.results_update_field(b)}),this.form_field_jq.bind("chosen:activate.chosen",function(b){a.activate_field(b)}),this.form_field_jq.bind("chosen:open.chosen",function(b){a.container_mousedown(b)}),this.form_field_jq.bind("chosen:close.chosen",function(b){a.input_blur(b)}),this.search_field.bind("blur.chosen",function(b){a.input_blur(b)}),this.search_field.bind("keyup.chosen",function(b){a.keyup_checker(b)}),this.search_field.bind("keydown.chosen",function(b){a.keydown_checker(b)}),this.search_field.bind("focus.chosen",function(b){a.input_focus(b)}),this.search_field.bind("cut.chosen",function(b){a.clipboard_event_checker(b)}),this.search_field.bind("paste.chosen",function(b){a.clipboard_event_checker(b)}),this.is_multiple?this.search_choices.bind("click.chosen",function(b){a.choices_click(b)}):this.container.bind("click.chosen",function(a){a.preventDefault()})},Chosen.prototype.destroy=function(){return a(this.container[0].ownerDocument).unbind("click.chosen",this.click_test_action),this.search_field[0].tabIndex&&(this.form_field_jq[0].tabIndex=this.search_field[0].tabIndex),this.container.remove(),this.form_field_jq.removeData("chosen"),this.form_field_jq.show()},Chosen.prototype.search_field_disabled=function(){return this.is_disabled=this.form_field_jq[0].disabled,this.is_disabled?(this.container.addClass("chosen-disabled"),this.search_field[0].disabled=!0,this.is_multiple||this.selected_item.unbind("focus.chosen",this.activate_action),this.close_field()):(this.container.removeClass("chosen-disabled"),this.search_field[0].disabled=!1,this.is_multiple?void 0:this.selected_item.bind("focus.chosen",this.activate_action))},Chosen.prototype.container_mousedown=function(b){return this.is_disabled||(b&&"mousedown"===b.type&&!this.results_showing&&b.preventDefault(),null!=b&&a(b.target).hasClass("search-choice-close"))?void 0:(this.active_field?this.is_multiple||!b||a(b.target)[0]!==this.selected_item[0]&&!a(b.target).parents("a.chosen-single").length||(b.preventDefault(),this.results_toggle()):(this.is_multiple&&this.search_field.val(""),a(this.container[0].ownerDocument).bind("click.chosen",this.click_test_action),this.results_show()),this.activate_field())},Chosen.prototype.container_mouseup=function(a){return"ABBR"!==a.target.nodeName||this.is_disabled?void 0:this.results_reset(a)},Chosen.prototype.search_results_mousewheel=function(a){var b;return a.originalEvent&&(b=-a.originalEvent.wheelDelta||a.originalEvent.detail),null!=b?(a.preventDefault(),"DOMMouseScroll"===a.type&&(b=40*b),this.search_results.scrollTop(b+this.search_results.scrollTop())):void 0},Chosen.prototype.blur_test=function(){return!this.active_field&&this.container.hasClass("chosen-container-active")?this.close_field():void 0},Chosen.prototype.close_field=function(){return a(this.container[0].ownerDocument).unbind("click.chosen",this.click_test_action),this.active_field=!1,this.results_hide(),this.container.removeClass("chosen-container-active"),this.clear_backstroke(),this.show_search_field_default(),this.search_field_scale()},Chosen.prototype.activate_field=function(){return this.container.addClass("chosen-container-active"),this.active_field=!0,this.search_field.val(this.search_field.val()),this.search_field.focus()},Chosen.prototype.test_active_click=function(b){var c;return c=a(b.target).closest(".chosen-container"),c.length&&this.container[0]===c[0]?this.active_field=!0:this.close_field()},Chosen.prototype.results_build=function(){return this.parsing=!0,this.selected_option_count=null,this.results_data=SelectParser.select_to_array(this.form_field),this.is_multiple?this.search_choices.find("li.search-choice").remove():this.is_multiple||(this.single_set_selected_text(),this.disable_search||this.form_field.options.length<=this.disable_search_threshold?(this.search_field[0].readOnly=!0,this.container.addClass("chosen-container-single-nosearch")):(this.search_field[0].readOnly=!1,this.container.removeClass("chosen-container-single-nosearch"))),this.update_results_content(this.results_option_build({first:!0})),this.search_field_disabled(),this.show_search_field_default(),this.search_field_scale(),this.parsing=!1},Chosen.prototype.result_do_highlight=function(a){var b,c,d,e,f;if(a.length){if(this.result_clear_highlight(),this.result_highlight=a,this.result_highlight.addClass("highlighted"),d=parseInt(this.search_results.css("maxHeight"),10),f=this.search_results.scrollTop(),e=d+f,c=this.result_highlight.position().top+this.search_results.scrollTop(),b=c+this.result_highlight.outerHeight(),b>=e)return this.search_results.scrollTop(b-d>0?b-d:0);if(f>c)return this.search_results.scrollTop(c)}},Chosen.prototype.result_clear_highlight=function(){return this.result_highlight&&this.result_highlight.removeClass("highlighted"),this.result_highlight=null},Chosen.prototype.results_show=function(){return this.is_multiple&&this.max_selected_options<=this.choices_count()?(this.form_field_jq.trigger("chosen:maxselected",{chosen:this}),!1):(this.container.addClass("chosen-with-drop"),this.results_showing=!0,this.search_field.focus(),this.search_field.val(this.search_field.val()),this.winnow_results(),this.form_field_jq.trigger("chosen:showing_dropdown",{chosen:this}))},Chosen.prototype.update_results_content=function(a){return this.search_results.html(a)},Chosen.prototype.results_hide=function(){return this.results_showing&&(this.result_clear_highlight(),this.container.removeClass("chosen-with-drop"),this.form_field_jq.trigger("chosen:hiding_dropdown",{chosen:this})),this.results_showing=!1},Chosen.prototype.set_tab_index=function(){var a;return this.form_field.tabIndex?(a=this.form_field.tabIndex,this.form_field.tabIndex=-1,this.search_field[0].tabIndex=a):void 0},Chosen.prototype.set_label_behavior=function(){var b=this;return this.form_field_label=this.form_field_jq.parents("label"),!this.form_field_label.length&&this.form_field.id.length&&(this.form_field_label=a("label[for='"+this.form_field.id+"']")),this.form_field_label.length>0?this.form_field_label.bind("click.chosen",function(a){return b.is_multiple?b.container_mousedown(a):b.activate_field()}):void 0},Chosen.prototype.show_search_field_default=function(){return this.is_multiple&&this.choices_count()<1&&!this.active_field?(this.search_field.val(this.default_text),this.search_field.addClass("default")):(this.search_field.val(""),this.search_field.removeClass("default"))},Chosen.prototype.search_results_mouseup=function(b){var c;return c=a(b.target).hasClass("active-result")?a(b.target):a(b.target).parents(".active-result").first(),c.length?(this.result_highlight=c,this.result_select(b),this.search_field.focus()):void 0},Chosen.prototype.search_results_mouseover=function(b){var c;return c=a(b.target).hasClass("active-result")?a(b.target):a(b.target).parents(".active-result").first(),c?this.result_do_highlight(c):void 0},Chosen.prototype.search_results_mouseout=function(b){return a(b.target).hasClass("active-result")?this.result_clear_highlight():void 0},Chosen.prototype.choice_build=function(b){var c,d,e=this;return c=a("<li />",{"class":"search-choice"}).html("<span>"+b.html+"</span>"),b.disabled?c.addClass("search-choice-disabled"):(d=a("<a />",{"class":"search-choice-close","data-option-array-index":b.array_index}),d.bind("click.chosen",function(a){return e.choice_destroy_link_click(a)}),c.append(d)),this.search_container.before(c)},Chosen.prototype.choice_destroy_link_click=function(b){return b.preventDefault(),b.stopPropagation(),this.is_disabled?void 0:this.choice_destroy(a(b.target))},Chosen.prototype.choice_destroy=function(a){return this.result_deselect(a[0].getAttribute("data-option-array-index"))?(this.show_search_field_default(),this.is_multiple&&this.choices_count()>0&&this.search_field.val().length<1&&this.results_hide(),a.parents("li").first().remove(),this.search_field_scale()):void 0},Chosen.prototype.results_reset=function(){return this.reset_single_select_options(),this.form_field.options[0].selected=!0,this.single_set_selected_text(),this.show_search_field_default(),this.results_reset_cleanup(),this.form_field_jq.trigger("change"),this.active_field?this.results_hide():void 0},Chosen.prototype.results_reset_cleanup=function(){return this.current_selectedIndex=this.form_field.selectedIndex,this.selected_item.find("abbr").remove()},Chosen.prototype.result_select=function(a){var b,c;return this.result_highlight?(b=this.result_highlight,this.result_clear_highlight(),this.is_multiple&&this.max_selected_options<=this.choices_count()?(this.form_field_jq.trigger("chosen:maxselected",{chosen:this}),!1):(this.is_multiple?b.removeClass("active-result"):this.reset_single_select_options(),c=this.results_data[b[0].getAttribute("data-option-array-index")],c.selected=!0,this.form_field.options[c.options_index].selected=!0,this.selected_option_count=null,this.is_multiple?this.choice_build(c):this.single_set_selected_text(c.text),(a.metaKey||a.ctrlKey)&&this.is_multiple||this.results_hide(),this.search_field.val(""),(this.is_multiple||this.form_field.selectedIndex!==this.current_selectedIndex)&&this.form_field_jq.trigger("change",{selected:this.form_field.options[c.options_index].value}),this.current_selectedIndex=this.form_field.selectedIndex,this.search_field_scale())):void 0},Chosen.prototype.single_set_selected_text=function(a){return null==a&&(a=this.default_text),a===this.default_text?this.selected_item.addClass("chosen-default"):(this.single_deselect_control_build(),this.selected_item.removeClass("chosen-default")),this.selected_item.find("span").text(a)},Chosen.prototype.result_deselect=function(a){var b;return b=this.results_data[a],this.form_field.options[b.options_index].disabled?!1:(b.selected=!1,this.form_field.options[b.options_index].selected=!1,this.selected_option_count=null,this.result_clear_highlight(),this.results_showing&&this.winnow_results(),this.form_field_jq.trigger("change",{deselected:this.form_field.options[b.options_index].value}),this.search_field_scale(),!0)},Chosen.prototype.single_deselect_control_build=function(){return this.allow_single_deselect?(this.selected_item.find("abbr").length||this.selected_item.find("span").first().after('<abbr class="search-choice-close"></abbr>'),this.selected_item.addClass("chosen-single-with-deselect")):void 0},Chosen.prototype.get_search_text=function(){return this.search_field.val()===this.default_text?"":a("<div/>").text(a.trim(this.search_field.val())).html()},Chosen.prototype.winnow_results_set_highlight=function(){var a,b;return b=this.is_multiple?[]:this.search_results.find(".result-selected.active-result"),a=b.length?b.first():this.search_results.find(".active-result").first(),null!=a?this.result_do_highlight(a):void 0},Chosen.prototype.no_results=function(b){var c;return c=a('<li class="no-results">'+this.results_none_found+' "<span></span>"</li>'),c.find("span").first().html(b),this.search_results.append(c),this.form_field_jq.trigger("chosen:no_results",{chosen:this})},Chosen.prototype.no_results_clear=function(){return this.search_results.find(".no-results").remove()},Chosen.prototype.keydown_arrow=function(){var a;return this.results_showing&&this.result_highlight?(a=this.result_highlight.nextAll("li.active-result").first())?this.result_do_highlight(a):void 0:this.results_show()},Chosen.prototype.keyup_arrow=function(){var a;return this.results_showing||this.is_multiple?this.result_highlight?(a=this.result_highlight.prevAll("li.active-result"),a.length?this.result_do_highlight(a.first()):(this.choices_count()>0&&this.results_hide(),this.result_clear_highlight())):void 0:this.results_show()},Chosen.prototype.keydown_backstroke=function(){var a;return this.pending_backstroke?(this.choice_destroy(this.pending_backstroke.find("a").first()),this.clear_backstroke()):(a=this.search_container.siblings("li.search-choice").last(),a.length&&!a.hasClass("search-choice-disabled")?(this.pending_backstroke=a,this.single_backstroke_delete?this.keydown_backstroke():this.pending_backstroke.addClass("search-choice-focus")):void 0)},Chosen.prototype.clear_backstroke=function(){return this.pending_backstroke&&this.pending_backstroke.removeClass("search-choice-focus"),this.pending_backstroke=null},Chosen.prototype.keydown_checker=function(a){var b,c;switch(b=null!=(c=a.which)?c:a.keyCode,this.search_field_scale(),8!==b&&this.pending_backstroke&&this.clear_backstroke(),b){case 8:this.backstroke_length=this.search_field.val().length;break;case 9:this.results_showing&&!this.is_multiple&&this.result_select(a),this.mouse_on_container=!1;break;case 13:a.preventDefault();break;case 38:a.preventDefault(),this.keyup_arrow();break;case 40:a.preventDefault(),this.keydown_arrow()}},Chosen.prototype.search_field_scale=function(){var b,c,d,e,f,g,h,i,j;if(this.is_multiple){for(d=0,h=0,f="position:absolute; left: -1000px; top: -1000px; display:none;",g=["font-size","font-style","font-weight","font-family","line-height","text-transform","letter-spacing"],i=0,j=g.length;j>i;i++)e=g[i],f+=e+":"+this.search_field.css(e)+";";return b=a("<div />",{style:f}),b.text(this.search_field.val()),a("body").append(b),h=b.width()+25,b.remove(),c=this.container.outerWidth(),h>c-10&&(h=c-10),this.search_field.css({width:h+"px"})}},Chosen}(AbstractChosen)}.call(this);;// Generated by CoffeeScript 1.3.1
|
3 |
+
(function(e){return e.fn.ajaxChosen=function(t,n){var r,i,s,o;t==null&&(t={});n==null&&(n=function(){});i={minTermLength:3,afterTypeDelay:500,jsonTermKey:"term"};o=this;r=null;s=e.extend({},i,t);this.chosen();return this.each(function(){return e(this).next(".chosen-container").find(".search-field > input, .chosen-search > input").bind("keyup",function(){var t,i,u,a;a=e.trim(e(this).attr("value"));i=a.length<s.minTermLength?"Keep typing...":"Looking for '"+a+"'";o.next(".chosen-container").find(".no-results").text(i);if(a===e(this).data("prevVal"))return!1;e(this).data("prevVal",a);this.timer&&clearTimeout(this.timer);if(a.length<s.minTermLength)return!1;t=e(this);s.data==null&&(s.data={});s.data[s.jsonTermKey]=a;s.dataCallback!=null&&(s.data=s.dataCallback(s.data));u=s.success;s.success=function(r){var i,s;if(r==null)return;s=[];o.find("option").each(function(){return e(this).is(":selected")?s.push(e(this).val()+"-"+e(this).text()):e(this).remove()});i=n(r);e.each(i,function(t,n){if(e.inArray(t+"-"+n,s)===-1)return e("<option />").attr("value",t).html(n).appendTo(o)});o.trigger("chosen:updated");u!=null&&u(r);t.attr("value",a);return t.css("width","auto")};return this.timer=setTimeout(function(){r&&r.abort();return r=e.ajax(s)},s.afterTypeDelay)})})}})(jQuery);;jQuery(function(){function a(a){var b=jQuery(a).find(".message_type").val();jQuery(a).closest(".message-edit-row").prev().find(".message_header_label").text(b).removeClass().addClass("message_header_label ig_"+b);var c=jQuery(a).find(".message_row.ig_"+b).find(".message_theme").val(),d=jQuery(a).find(".message_row.ig_"+b).find("#message_form_style").val(),e=jQuery(a).find("#message_theme_ig_"+b).find("."+c).attr("style"),f=jQuery(a).find("#message_form_style").find("."+d).attr("style");jQuery(a).find(".message_row, .location").hide(),jQuery(a).find(".ig_"+b).show(),jQuery(a).find(".message_row.ig_"+b).find(".message_theme").next().find(".chosen-single span").attr("style",e),jQuery(a).find(".message_row.ig_"+b).find("#message_form_style").next().find(".chosen-single span").attr("style",f).text(function(){return jQuery(this).text().substr(0,jQuery(this).text().indexOf(" "))||jQuery(this).text()}),"block"!==jQuery(a).find(".message_body").parent().css("display")?jQuery(a).find(".message_body").parent().next(".wp-editor-wrap").hide():jQuery(a).find(".message_body").parent().next(".wp-editor-wrap").show(),jQuery(a).find(".message_form_layout:checked").is(":visible")||jQuery(a).find(".message_form_layout:visible").first().prop("checked",!0),1==jQuery(a).find(".show_form_options").prop("checked")&&jQuery(a).find(".message_link").parent().hide(),jQuery(".message_form_layout").change()}function b(a,c,d){var e=Math.floor(Math.random()*(d-c+1))+c;return e==a?b(e,c,d):e}function c(){var a='<span><label class="options_header"><span id="valid-field"> </span></label> <input type="text" class="url_input_field" data-option="local_url" name="campaign_target_rules[local_urls][]" value="'+e+'*"/><span class="delete-url"></span></span>';return a}function d(){0==jQuery(".message-row").length?jQuery(".empty_campaign").show():jQuery(".empty_campaign").hide()}var e=icegram_writepanel_params.home_url;jQuery(document).ready(function(){var c=jQuery("#ig-admin-tabs");c.find(".ig-admin-nav-main").addClass("current"),c.find("#ig-admin-tab-main").show(),"post-new-php"===adminpage&&jQuery("#wpbody").on("click","#ig-add-new-campaign",function(){jQuery("#poststuff").css("position","static"),jQuery("#postbox-container-1 #side-sortables").removeClass("empty-container").addClass("gal-toggled"),jQuery(".gallery-heading, .ig-gallery-wrap").hide(),jQuery(".postbox-container").show(),jQuery(".wrap h1.wp-heading-inline").not(".gallery-heading").show(),jQuery(".ig-gallery-wrap").siblings().not(".gallery-heading").show(),jQuery(".postbox-container").siblings().show()}),jQuery("#ig-admin-tabs").on("click",'.ig-admin-tabs-nav li:not(".ig-admin-nav-upsale")',function(a){a.preventDefault(),jQuery(this).hasClass("ig-admin-nav-notab")||(c.find(".ig-admin-tabs-nav li").not(this).removeClass("current"),jQuery(".ig-admin-tab").fadeOut("fast"),jQuery(jQuery(this).addClass("current").find("a").attr("href")).fadeIn("fast"),jQuery(this).hasClass("new-variation")&&(jQuery(this).removeClass("current"),jQuery(".ig-admin-nav-variations").addClass("current")))});var e=window.send_to_editor,f=jQuery(".ig_preview_button");jQuery("#submitdiv .submitbox #minor-publishing-actions").after(f),f.fadeIn("fast"),jQuery(".color-field").wpColorPicker().each(function(a){var b=jQuery(this).data("color-label")||"";""!==b&&jQuery(this).closest(".wp-picker-container").find("a.wp-color-result").attr("title",b)}),jQuery(".campaign_data, #message-settings").on("change",".show_color_options",function(){jQuery(this).closest("p").next(".message_colors_options_container").toggle(!this.checked)}).change(),d(),jQuery(".message_edit:first").trigger("click"),this_data=jQuery(".message_type").closest(".message-setting-fields");for(var g=0;g<this_data.length;g++)a(this_data[g]);jQuery(".campaign_data, #message-settings").on("change",".message_theme",function(a){var b=jQuery(a.target).parents(".message-setting-fields"),c=jQuery(b).find(".message_type").val(),d=jQuery(b).find(".message_row.ig_"+c).find(".message_theme").val(),e=jQuery(b).find("#message_theme_ig_"+c).find("."+d).attr("style");jQuery(b).find(".message_row.ig_"+c).find(".message_theme").next().find(".chosen-single span").attr("style",e)}),jQuery(".campaign_data, #message-settings").on("change",".rainmaker_form_list",function(a){"null"!==(jQuery(a.target).val()||"null")&&jQuery(a.target).parent().siblings(".message_form_html_original").hide()}),jQuery(".campaign_data, #message-settings").on("click",".message_image_button",function(a){var b=this;return window.send_to_editor=function(a){imgurl=jQuery("img",a).attr("src"),jQuery(b).parent().find("#upload_image").val(imgurl),tb_remove(),window.send_to_editor=e},!1}),jQuery(".campaign_data, #message-settings").on("click",".message_headline_button",function(){var a=jQuery(this).prev().attr("data-headline"),c=icegram_writepanel_params.available_headlines.length,d=b(a,0,c),e=icegram_writepanel_params.available_headlines[d];jQuery(this).prev().val(e)}),jQuery(".tips, .help_tip").tipTip({attribute:"data-tip"}),jQuery("span.test_class").hover(function(){jQuery(this).next().show()},function(){jQuery(this).next().hide()}),jQuery(".campaign_data .handle, .campaign_data .handlediv").unbind("click"),jQuery(".campaign_data .handlediv").hide(),jQuery("#poststuff").on("click","#publish",function(a){jQuery(".campaign_data").find(".message_header_label.ig_unknown").length&&(alert("Please select Message type"),a.preventDefault())})}),jQuery(".campaign_data, #message-settings").on("click",".message_delete",function(){jQuery(this).parent().parent().next().remove(),jQuery(this).parent().parent().remove(),d()}),jQuery(".campaign_data, #message-settings").on("click",".message_edit",function(){jQuery(this).parent().parent().next().toggle(),jQuery(this).parent().parent().find(".message-title-text, .message-title-input").toggle()}),jQuery(".campaign_data, #message-settings").on("click",".embed_form_code_toggle",function(){jQuery(this).parent().parent().siblings(".message_form_html_original").toggle()}),jQuery(".campaign_data, #message-settings").on("change",".message-title-input",function(){jQuery(this).prev().text(jQuery(this).val())}),jQuery("select.ajax_chosen_select_messages").ajaxChosen({type:"GET",url:icegram_writepanel_params.ajax_url,dataType:"json",afterTypeDelay:100,data:{action:"icegram_json_search_messages",security:icegram_writepanel_params.search_message_nonce}},function(a){var b={};return jQuery.each(a,function(a,c){b[a]=c}),b}),jQuery(".campaign_data, #message-settings").on("change",".show_form_options",function(a){var b=jQuery(this).closest("p");if(jQuery(b).siblings(".message_form_options").slideToggle(this.checked),this.checked)jQuery(b).closest(".thickbox_edit_message").find(".message_link").parent().hide(),jQuery(b).siblings("p.cta-actions").find("select option").removeAttr("disabled"),jQuery(b).siblings("p.cta-actions").find("select").find('option[value="url"], option[value="hide"], option[value="cta_another_message"]').attr("disabled",!0).attr("selected",!1).end().find('option[value="form"]').attr("selected",!0).trigger("change"),jQuery(b).siblings(".message_form_options").find(".message_form_layout").change();else{jQuery(b).siblings("p.cta-actions").find("select option").removeAttr("disabled");var c=jQuery(b).siblings(".message_form_options").siblings(".wp-editor-wrap").find(".wp-editor-area"),d=jQuery(c).val().trim().replace("[ig_form]","");jQuery(c).val(d),jQuery(b).closest(".thickbox_edit_message").find(".message_link").parent().show()}}).change(),jQuery(".campaign_data, #message-settings").on("change",".message_form_style",function(a){var b=jQuery(a.target).parents(".message-setting-fields"),c=jQuery(b).find("#message_form_style").val(),d=jQuery(b).find("#message_form_style").find("."+c).attr("style");jQuery(b).find(".message_form_style").next().find(".chosen-single span").attr("style",d).text(function(){return jQuery(this).text().substr(0,jQuery(this).text().indexOf(" "))||jQuery(this).text()})}),jQuery(".campaign_data, #message-settings").on("change",".message_form_layout ",function(){if(jQuery(this).is(":visible")){var a=this,b=jQuery(this).closest(".message_form_options").siblings(".wp-editor-wrap").find(".wp-editor-area"),c=jQuery(b).val().trim();jQuery(a).closest(".form_radio_group").siblings(".form_inline_shortcode").hide(),jQuery(a).closest(".form_radio_group").siblings(".message_form_color").show(),jQuery(a).is(":checked")&&jQuery(a).closest(".message_form_options").prev("p.message_form_options_check").find(".show_form_options").is(":checked")&&("inline"==jQuery(a).val()?(-1==c.indexOf("[ig_form]")&&(c+="[ig_form]"),jQuery(a).closest(".form_radio_group").siblings(".message_form_color, .form_inline_shortcode").toggle()):"inline"!=jQuery(a).val()&&(c=c.replace("[ig_form]",""))),jQuery(b).val(c)}}),jQuery(".campaign_data, #message-settings").on("blur",".message_form_html_original",function(a){var b=this,c=jQuery("<div/>").html(jQuery(b).val()).find("input[type=submit], button, input[type=button]").not("*:disabled");if(c.length>0){var d=jQuery(c[c.length-1]),e=d.is("button")?d.not("br, span, div").text():d.val();jQuery(b).closest(".message_form_options").siblings("p").find("#message_label").val(e.trim())}}),jQuery(".campaign_data, #message-settings").on("change",".show_custom_code_options",function(a){var b=jQuery(this).closest("p");jQuery(b).siblings(".message_custom_code_options").slideToggle(this.checked)}),jQuery(".ajax_chosen_select_messages").chosen(),jQuery(".campaign_data, #message-settings").on("change",".ajax_chosen_select_messages",function(){var b={},c=jQuery("#ig-admin-tabs li.current").attr("variation_id");"undefined"!=typeof c&&jQuery.extend(b,{selected_tab:c});var e=jQuery.extend({},tinyMCEPreInit.mceInit.content),f=jQuery.extend({},tinyMCEPreInit.qtInit.content),g=jQuery(this).parent().siblings(".campaign_target_rules_panel");"undefined"!=typeof g&&(b.parent_campaign_box=g);var h=jQuery(g).find(".message-row").length,i=jQuery(this).val();return""==i?void jQuery(".ajax_chosen_select_messages").val("").trigger("chosen:updated"):(jQuery(".message-edit-row").hide(),jQuery(".message-title-text").show(),jQuery(".message-title-input").hide(),void jQuery.ajax({type:"POST",url:icegram_writepanel_params.ajax_url,dataType:"json",data:{action:"get_message_action_row",message_id:i,row:h},success:function(c){if(h++,jQuery(g).find(".messages-list .messages_list_table tbody").append(c.main),jQuery(".color-field").wpColorPicker().each(function(a){var b=jQuery(this).data("color-label")||"";""!==b&&jQuery(this).closest(".wp-picker-container").find("a.wp-color-result").attr("title",b)}),jQuery(".campaign_data, #message-settings").on("change",".show_color_options",function(){jQuery(this).closest("p").next(".message_colors_options_container").toggle(!this.checked)}).change(),a(jQuery("#"+c.id)),jQuery(".ajax_chosen_select_messages").val("").trigger("chosen:updated"),jQuery(".campaign_data, #message-settings").find(".message_theme").append('<option value="ig_get_more_theme" class="ig_get_more">Get more Themes</option>'),jQuery(".campaign_data, #message-settings").find(".message_animation").append('<option value="ig_get_more_animation" class="ig_get_more">Get more Animations</option>'),jQuery("select.icegram_chosen_page").chosen({disable_search_threshold:10}),d(),jQuery(".message-setting-fields").trigger("change"),jQuery(".tips, .help_tip").tipTip({attribute:"data-tip"}),"undefined"==typeof tinyMCEPreInit.mceInit["edit"+c.id]){for(_prop in e)"string"==typeof e[_prop]&&"content_css"!==_prop&&(e[_prop]=e[_prop].replace(new RegExp("content","g"),"edit"+c.id));tinyMCEPreInit.mceInit["edit"+c.id]=e}if("undefined"==typeof tinyMCEPreInit.qtInit["edit"+c.id]){for(_prop in f)"string"==typeof f[_prop]&&"content_css"!==_prop&&(f[_prop]=f[_prop].replace(new RegExp("content","g"),"edit"+c.id));tinyMCEPreInit.qtInit["edit"+c.id]=f}tinyMCE.init({id:tinyMCEPreInit.mceInit["edit"+c.id]}),quicktags({id:"edit"+c.id}),QTags._buttonsInit(),jQuery("#wp-edit"+c.id+"-wrap").hasClass("tmce-active")?jQuery("#edit"+c.id+"-tmce").click():jQuery("#edit"+c.id+"-html").click(),jQuery(window).trigger("icegram_message_added_ajax",[b])}}))}),jQuery(".campaign_target_rules").on("click","#add_local_url_row",function(a){a.preventDefault();var b=c();jQuery(".local_url").find(".url_input_field").length?jQuery(b).insertAfter(jQuery(".local_url").find(".url_input_field").last().parent("span")):jQuery(b).insertBefore(jQuery(".local_url").find("#add_local_url_row_label"))}),jQuery(".campaign_target_rules").on("click",".delete-url",function(a){jQuery(this).parent().remove()}),jQuery(document).on("click",".campaign_preview",function(a){a.preventDefault(),tinyMCE.triggerSave(),params=jQuery("#post").serializeArray(),params.push({name:"action",value:"save_campaign_preview"}),jQuery.ajax({type:"POST",async:!1,url:icegram_writepanel_params.ajax_url,data:params,success:function(a){""!=a&&window.open(a,"preview_window")}})}),jQuery(".campaign_data, #message-settings").find(".message_theme").append('<option value="ig_get_more_theme" class="ig_get_more">Get more themes</option>'),jQuery(".campaign_data, #message-settings").find(".message_animation").append('<option value="ig_get_more_animation" class="ig_get_more">Get more Animations</option>'),jQuery(".campaign_data, #message-settings").on("change",".message_theme, .message_animation",function(){"ig_get_more_theme"==jQuery(this).val()&&window.open("https://www.icegram.com/product-category/themes-addons/?utm_source=icegram&utm_medium=admin&utm_campaign=theme_packs"),"ig_get_more_animation"==jQuery(this).val()&&window.open("https://www.icegram.com/animation-effects/?utm_source=icegram&utm_medium=admin&utm_campaign=animation_pack")}),jQuery("select.icegram_chosen_page").chosen({disable_search_threshold:10}),jQuery("input#users_logged_in, input#users_all ,input#users_not_logged_in").on("change",function(){"logged_in"==jQuery(this).val()?(jQuery("select#users_roles").parent("p").show(),jQuery("#users_roles_chosen").find("input").trigger("click")):jQuery("select#users_roles").parent("p").hide()}),jQuery(".schedule_rule").on("change",function(){"when_schedule"==jQuery(this).attr("id")?jQuery("#date_picker").show():jQuery("#date_picker").hide()}),jQuery("input#where_other_page").on("change",function(){jQuery("select#where_page_id").parent("p").slideToggle(),jQuery(this).is(":checked")&&jQuery("#where_page_id_chosen").find("input").trigger("click")}),jQuery("input#where_sitewide").on("change",function(){jQuery("select#exclude_page_id").parent("p").slideToggle()}),jQuery("input#where_local_url").on("change",function(){jQuery(".local_url").slideToggle()}),jQuery(".date-picker").datepicker({dateFormat:"yy-mm-dd",defaultDate:0,showOtherMonths:!0,selectOtherMonths:!0,changeMonth:!0,changeYear:!0,showButtonPanel:!1,beforeShow:function(a,b){jQuery("#ui-datepicker-div").addClass("ig-date-picker")}}),jQuery(".campaign_target_rules").on("focusout","input.url_input_field",function(){var a=this;if(jQuery(a).parent().find("span#valid-field").removeClass("error"),"undefine"!==jQuery(a).data("option")&&"local_url"==jQuery(a).data("option")&&"*"!=jQuery(a).val()){var b=a.value;if(b.indexOf(e)<0)return void jQuery(a).val(e+b)}})});;/*
|
4 |
* TipTip
|
5 |
* Copyright 2010 Drew Wilson
|
6 |
* www.drewwilson.com
|
classes/feedback.php
ADDED
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Get additional system & plugin specific information for feedback
|
5 |
+
*
|
6 |
+
*/
|
7 |
+
if ( ! function_exists( 'ig_get_additional_info' ) ) {
|
8 |
+
|
9 |
+
/**
|
10 |
+
* Get TLWP specific information
|
11 |
+
*
|
12 |
+
* @param $additional_info
|
13 |
+
* @param bool $system_info
|
14 |
+
*
|
15 |
+
* @return mixed
|
16 |
+
*
|
17 |
+
* @since 1.5.17
|
18 |
+
*/
|
19 |
+
function ig_get_additional_info( $additional_info, $system_info = false ) {
|
20 |
+
global $icegram;
|
21 |
+
$additional_info['version'] = $icegram->version;
|
22 |
+
|
23 |
+
return $additional_info;
|
24 |
+
|
25 |
+
}
|
26 |
+
|
27 |
+
}
|
28 |
+
|
29 |
+
add_filter( 'ig_additional_feedback_meta_info', 'ig_get_additional_info', 10, 2 );
|
classes/feedback/assets/css/animate.min.css
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
@charset "UTF-8";
|
2 |
+
|
3 |
+
/*!
|
4 |
+
* animate.css -http://daneden.me/animate
|
5 |
+
* Version - 3.6.0
|
6 |
+
* Licensed under the MIT license - http://opensource.org/licenses/MIT
|
7 |
+
*
|
8 |
+
* Copyright (c) 2018 Daniel Eden
|
9 |
+
*/
|
10 |
+
|
11 |
+
.animated{-webkit-animation-duration:1s;animation-duration:1s;-webkit-animation-fill-mode:both;animation-fill-mode:both}.animated.infinite{-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite}@-webkit-keyframes bounce{0%,20%,53%,80%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1);-webkit-transform:translateZ(0);transform:translateZ(0)}40%,43%{-webkit-animation-timing-function:cubic-bezier(.755,.05,.855,.06);animation-timing-function:cubic-bezier(.755,.05,.855,.06);-webkit-transform:translate3d(0,-30px,0);transform:translate3d(0,-30px,0)}70%{-webkit-animation-timing-function:cubic-bezier(.755,.05,.855,.06);animation-timing-function:cubic-bezier(.755,.05,.855,.06);-webkit-transform:translate3d(0,-15px,0);transform:translate3d(0,-15px,0)}90%{-webkit-transform:translate3d(0,-4px,0);transform:translate3d(0,-4px,0)}}@keyframes bounce{0%,20%,53%,80%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1);-webkit-transform:translateZ(0);transform:translateZ(0)}40%,43%{-webkit-animation-timing-function:cubic-bezier(.755,.05,.855,.06);animation-timing-function:cubic-bezier(.755,.05,.855,.06);-webkit-transform:translate3d(0,-30px,0);transform:translate3d(0,-30px,0)}70%{-webkit-animation-timing-function:cubic-bezier(.755,.05,.855,.06);animation-timing-function:cubic-bezier(.755,.05,.855,.06);-webkit-transform:translate3d(0,-15px,0);transform:translate3d(0,-15px,0)}90%{-webkit-transform:translate3d(0,-4px,0);transform:translate3d(0,-4px,0)}}.bounce{-webkit-animation-name:bounce;animation-name:bounce;-webkit-transform-origin:center bottom;transform-origin:center bottom}@-webkit-keyframes flash{0%,50%,to{opacity:1}25%,75%{opacity:0}}@keyframes flash{0%,50%,to{opacity:1}25%,75%{opacity:0}}.flash{-webkit-animation-name:flash;animation-name:flash}@-webkit-keyframes pulse{0%{-webkit-transform:scaleX(1);transform:scaleX(1)}50%{-webkit-transform:scale3d(1.05,1.05,1.05);transform:scale3d(1.05,1.05,1.05)}to{-webkit-transform:scaleX(1);transform:scaleX(1)}}@keyframes pulse{0%{-webkit-transform:scaleX(1);transform:scaleX(1)}50%{-webkit-transform:scale3d(1.05,1.05,1.05);transform:scale3d(1.05,1.05,1.05)}to{-webkit-transform:scaleX(1);transform:scaleX(1)}}.pulse{-webkit-animation-name:pulse;animation-name:pulse}@-webkit-keyframes rubberBand{0%{-webkit-transform:scaleX(1);transform:scaleX(1)}30%{-webkit-transform:scale3d(1.25,.75,1);transform:scale3d(1.25,.75,1)}40%{-webkit-transform:scale3d(.75,1.25,1);transform:scale3d(.75,1.25,1)}50%{-webkit-transform:scale3d(1.15,.85,1);transform:scale3d(1.15,.85,1)}65%{-webkit-transform:scale3d(.95,1.05,1);transform:scale3d(.95,1.05,1)}75%{-webkit-transform:scale3d(1.05,.95,1);transform:scale3d(1.05,.95,1)}to{-webkit-transform:scaleX(1);transform:scaleX(1)}}@keyframes rubberBand{0%{-webkit-transform:scaleX(1);transform:scaleX(1)}30%{-webkit-transform:scale3d(1.25,.75,1);transform:scale3d(1.25,.75,1)}40%{-webkit-transform:scale3d(.75,1.25,1);transform:scale3d(.75,1.25,1)}50%{-webkit-transform:scale3d(1.15,.85,1);transform:scale3d(1.15,.85,1)}65%{-webkit-transform:scale3d(.95,1.05,1);transform:scale3d(.95,1.05,1)}75%{-webkit-transform:scale3d(1.05,.95,1);transform:scale3d(1.05,.95,1)}to{-webkit-transform:scaleX(1);transform:scaleX(1)}}.rubberBand{-webkit-animation-name:rubberBand;animation-name:rubberBand}@-webkit-keyframes shake{0%,to{-webkit-transform:translateZ(0);transform:translateZ(0)}10%,30%,50%,70%,90%{-webkit-transform:translate3d(-10px,0,0);transform:translate3d(-10px,0,0)}20%,40%,60%,80%{-webkit-transform:translate3d(10px,0,0);transform:translate3d(10px,0,0)}}@keyframes shake{0%,to{-webkit-transform:translateZ(0);transform:translateZ(0)}10%,30%,50%,70%,90%{-webkit-transform:translate3d(-10px,0,0);transform:translate3d(-10px,0,0)}20%,40%,60%,80%{-webkit-transform:translate3d(10px,0,0);transform:translate3d(10px,0,0)}}.shake{-webkit-animation-name:shake;animation-name:shake}@-webkit-keyframes headShake{0%{-webkit-transform:translateX(0);transform:translateX(0)}6.5%{-webkit-transform:translateX(-6px) rotateY(-9deg);transform:translateX(-6px) rotateY(-9deg)}18.5%{-webkit-transform:translateX(5px) rotateY(7deg);transform:translateX(5px) rotateY(7deg)}31.5%{-webkit-transform:translateX(-3px) rotateY(-5deg);transform:translateX(-3px) rotateY(-5deg)}43.5%{-webkit-transform:translateX(2px) rotateY(3deg);transform:translateX(2px) rotateY(3deg)}50%{-webkit-transform:translateX(0);transform:translateX(0)}}@keyframes headShake{0%{-webkit-transform:translateX(0);transform:translateX(0)}6.5%{-webkit-transform:translateX(-6px) rotateY(-9deg);transform:translateX(-6px) rotateY(-9deg)}18.5%{-webkit-transform:translateX(5px) rotateY(7deg);transform:translateX(5px) rotateY(7deg)}31.5%{-webkit-transform:translateX(-3px) rotateY(-5deg);transform:translateX(-3px) rotateY(-5deg)}43.5%{-webkit-transform:translateX(2px) rotateY(3deg);transform:translateX(2px) rotateY(3deg)}50%{-webkit-transform:translateX(0);transform:translateX(0)}}.headShake{-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out;-webkit-animation-name:headShake;animation-name:headShake}@-webkit-keyframes swing{20%{-webkit-transform:rotate(15deg);transform:rotate(15deg)}40%{-webkit-transform:rotate(-10deg);transform:rotate(-10deg)}60%{-webkit-transform:rotate(5deg);transform:rotate(5deg)}80%{-webkit-transform:rotate(-5deg);transform:rotate(-5deg)}to{-webkit-transform:rotate(0deg);transform:rotate(0deg)}}@keyframes swing{20%{-webkit-transform:rotate(15deg);transform:rotate(15deg)}40%{-webkit-transform:rotate(-10deg);transform:rotate(-10deg)}60%{-webkit-transform:rotate(5deg);transform:rotate(5deg)}80%{-webkit-transform:rotate(-5deg);transform:rotate(-5deg)}to{-webkit-transform:rotate(0deg);transform:rotate(0deg)}}.swing{-webkit-transform-origin:top center;transform-origin:top center;-webkit-animation-name:swing;animation-name:swing}@-webkit-keyframes tada{0%{-webkit-transform:scaleX(1);transform:scaleX(1)}10%,20%{-webkit-transform:scale3d(.9,.9,.9) rotate(-3deg);transform:scale3d(.9,.9,.9) rotate(-3deg)}30%,50%,70%,90%{-webkit-transform:scale3d(1.1,1.1,1.1) rotate(3deg);transform:scale3d(1.1,1.1,1.1) rotate(3deg)}40%,60%,80%{-webkit-transform:scale3d(1.1,1.1,1.1) rotate(-3deg);transform:scale3d(1.1,1.1,1.1) rotate(-3deg)}to{-webkit-transform:scaleX(1);transform:scaleX(1)}}@keyframes tada{0%{-webkit-transform:scaleX(1);transform:scaleX(1)}10%,20%{-webkit-transform:scale3d(.9,.9,.9) rotate(-3deg);transform:scale3d(.9,.9,.9) rotate(-3deg)}30%,50%,70%,90%{-webkit-transform:scale3d(1.1,1.1,1.1) rotate(3deg);transform:scale3d(1.1,1.1,1.1) rotate(3deg)}40%,60%,80%{-webkit-transform:scale3d(1.1,1.1,1.1) rotate(-3deg);transform:scale3d(1.1,1.1,1.1) rotate(-3deg)}to{-webkit-transform:scaleX(1);transform:scaleX(1)}}.tada{-webkit-animation-name:tada;animation-name:tada}@-webkit-keyframes wobble{0%{-webkit-transform:translateZ(0);transform:translateZ(0)}15%{-webkit-transform:translate3d(-25%,0,0) rotate(-5deg);transform:translate3d(-25%,0,0) rotate(-5deg)}30%{-webkit-transform:translate3d(20%,0,0) rotate(3deg);transform:translate3d(20%,0,0) rotate(3deg)}45%{-webkit-transform:translate3d(-15%,0,0) rotate(-3deg);transform:translate3d(-15%,0,0) rotate(-3deg)}60%{-webkit-transform:translate3d(10%,0,0) rotate(2deg);transform:translate3d(10%,0,0) rotate(2deg)}75%{-webkit-transform:translate3d(-5%,0,0) rotate(-1deg);transform:translate3d(-5%,0,0) rotate(-1deg)}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes wobble{0%{-webkit-transform:translateZ(0);transform:translateZ(0)}15%{-webkit-transform:translate3d(-25%,0,0) rotate(-5deg);transform:translate3d(-25%,0,0) rotate(-5deg)}30%{-webkit-transform:translate3d(20%,0,0) rotate(3deg);transform:translate3d(20%,0,0) rotate(3deg)}45%{-webkit-transform:translate3d(-15%,0,0) rotate(-3deg);transform:translate3d(-15%,0,0) rotate(-3deg)}60%{-webkit-transform:translate3d(10%,0,0) rotate(2deg);transform:translate3d(10%,0,0) rotate(2deg)}75%{-webkit-transform:translate3d(-5%,0,0) rotate(-1deg);transform:translate3d(-5%,0,0) rotate(-1deg)}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}.wobble{-webkit-animation-name:wobble;animation-name:wobble}@-webkit-keyframes jello{0%,11.1%,to{-webkit-transform:translateZ(0);transform:translateZ(0)}22.2%{-webkit-transform:skewX(-12.5deg) skewY(-12.5deg);transform:skewX(-12.5deg) skewY(-12.5deg)}33.3%{-webkit-transform:skewX(6.25deg) skewY(6.25deg);transform:skewX(6.25deg) skewY(6.25deg)}44.4%{-webkit-transform:skewX(-3.125deg) skewY(-3.125deg);transform:skewX(-3.125deg) skewY(-3.125deg)}55.5%{-webkit-transform:skewX(1.5625deg) skewY(1.5625deg);transform:skewX(1.5625deg) skewY(1.5625deg)}66.6%{-webkit-transform:skewX(-.78125deg) skewY(-.78125deg);transform:skewX(-.78125deg) skewY(-.78125deg)}77.7%{-webkit-transform:skewX(.390625deg) skewY(.390625deg);transform:skewX(.390625deg) skewY(.390625deg)}88.8%{-webkit-transform:skewX(-.1953125deg) skewY(-.1953125deg);transform:skewX(-.1953125deg) skewY(-.1953125deg)}}@keyframes jello{0%,11.1%,to{-webkit-transform:translateZ(0);transform:translateZ(0)}22.2%{-webkit-transform:skewX(-12.5deg) skewY(-12.5deg);transform:skewX(-12.5deg) skewY(-12.5deg)}33.3%{-webkit-transform:skewX(6.25deg) skewY(6.25deg);transform:skewX(6.25deg) skewY(6.25deg)}44.4%{-webkit-transform:skewX(-3.125deg) skewY(-3.125deg);transform:skewX(-3.125deg) skewY(-3.125deg)}55.5%{-webkit-transform:skewX(1.5625deg) skewY(1.5625deg);transform:skewX(1.5625deg) skewY(1.5625deg)}66.6%{-webkit-transform:skewX(-.78125deg) skewY(-.78125deg);transform:skewX(-.78125deg) skewY(-.78125deg)}77.7%{-webkit-transform:skewX(.390625deg) skewY(.390625deg);transform:skewX(.390625deg) skewY(.390625deg)}88.8%{-webkit-transform:skewX(-.1953125deg) skewY(-.1953125deg);transform:skewX(-.1953125deg) skewY(-.1953125deg)}}.jello{-webkit-animation-name:jello;animation-name:jello;-webkit-transform-origin:center;transform-origin:center}@-webkit-keyframes bounceIn{0%,20%,40%,60%,80%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}20%{-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}40%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}60%{opacity:1;-webkit-transform:scale3d(1.03,1.03,1.03);transform:scale3d(1.03,1.03,1.03)}80%{-webkit-transform:scale3d(.97,.97,.97);transform:scale3d(.97,.97,.97)}to{opacity:1;-webkit-transform:scaleX(1);transform:scaleX(1)}}@keyframes bounceIn{0%,20%,40%,60%,80%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}20%{-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}40%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}60%{opacity:1;-webkit-transform:scale3d(1.03,1.03,1.03);transform:scale3d(1.03,1.03,1.03)}80%{-webkit-transform:scale3d(.97,.97,.97);transform:scale3d(.97,.97,.97)}to{opacity:1;-webkit-transform:scaleX(1);transform:scaleX(1)}}.bounceIn{-webkit-animation-duration:.75s;animation-duration:.75s;-webkit-animation-name:bounceIn;animation-name:bounceIn}@-webkit-keyframes bounceInDown{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(0,-3000px,0);transform:translate3d(0,-3000px,0)}60%{opacity:1;-webkit-transform:translate3d(0,25px,0);transform:translate3d(0,25px,0)}75%{-webkit-transform:translate3d(0,-10px,0);transform:translate3d(0,-10px,0)}90%{-webkit-transform:translate3d(0,5px,0);transform:translate3d(0,5px,0)}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes bounceInDown{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(0,-3000px,0);transform:translate3d(0,-3000px,0)}60%{opacity:1;-webkit-transform:translate3d(0,25px,0);transform:translate3d(0,25px,0)}75%{-webkit-transform:translate3d(0,-10px,0);transform:translate3d(0,-10px,0)}90%{-webkit-transform:translate3d(0,5px,0);transform:translate3d(0,5px,0)}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}.bounceInDown{-webkit-animation-name:bounceInDown;animation-name:bounceInDown}@-webkit-keyframes bounceInLeft{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(-3000px,0,0);transform:translate3d(-3000px,0,0)}60%{opacity:1;-webkit-transform:translate3d(25px,0,0);transform:translate3d(25px,0,0)}75%{-webkit-transform:translate3d(-10px,0,0);transform:translate3d(-10px,0,0)}90%{-webkit-transform:translate3d(5px,0,0);transform:translate3d(5px,0,0)}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes bounceInLeft{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(-3000px,0,0);transform:translate3d(-3000px,0,0)}60%{opacity:1;-webkit-transform:translate3d(25px,0,0);transform:translate3d(25px,0,0)}75%{-webkit-transform:translate3d(-10px,0,0);transform:translate3d(-10px,0,0)}90%{-webkit-transform:translate3d(5px,0,0);transform:translate3d(5px,0,0)}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}.bounceInLeft{-webkit-animation-name:bounceInLeft;animation-name:bounceInLeft}@-webkit-keyframes bounceInRight{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(3000px,0,0);transform:translate3d(3000px,0,0)}60%{opacity:1;-webkit-transform:translate3d(-25px,0,0);transform:translate3d(-25px,0,0)}75%{-webkit-transform:translate3d(10px,0,0);transform:translate3d(10px,0,0)}90%{-webkit-transform:translate3d(-5px,0,0);transform:translate3d(-5px,0,0)}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes bounceInRight{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(3000px,0,0);transform:translate3d(3000px,0,0)}60%{opacity:1;-webkit-transform:translate3d(-25px,0,0);transform:translate3d(-25px,0,0)}75%{-webkit-transform:translate3d(10px,0,0);transform:translate3d(10px,0,0)}90%{-webkit-transform:translate3d(-5px,0,0);transform:translate3d(-5px,0,0)}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}.bounceInRight{-webkit-animation-name:bounceInRight;animation-name:bounceInRight}@-webkit-keyframes bounceInUp{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(0,3000px,0);transform:translate3d(0,3000px,0)}60%{opacity:1;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}75%{-webkit-transform:translate3d(0,10px,0);transform:translate3d(0,10px,0)}90%{-webkit-transform:translate3d(0,-5px,0);transform:translate3d(0,-5px,0)}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes bounceInUp{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(0,3000px,0);transform:translate3d(0,3000px,0)}60%{opacity:1;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}75%{-webkit-transform:translate3d(0,10px,0);transform:translate3d(0,10px,0)}90%{-webkit-transform:translate3d(0,-5px,0);transform:translate3d(0,-5px,0)}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}.bounceInUp{-webkit-animation-name:bounceInUp;animation-name:bounceInUp}@-webkit-keyframes bounceOut{20%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}50%,55%{opacity:1;-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}to{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}}@keyframes bounceOut{20%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}50%,55%{opacity:1;-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}to{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}}.bounceOut{-webkit-animation-duration:.75s;animation-duration:.75s;-webkit-animation-name:bounceOut;animation-name:bounceOut}@-webkit-keyframes bounceOutDown{20%{-webkit-transform:translate3d(0,10px,0);transform:translate3d(0,10px,0)}40%,45%{opacity:1;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}to{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}}@keyframes bounceOutDown{20%{-webkit-transform:translate3d(0,10px,0);transform:translate3d(0,10px,0)}40%,45%{opacity:1;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}to{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}}.bounceOutDown{-webkit-animation-name:bounceOutDown;animation-name:bounceOutDown}@-webkit-keyframes bounceOutLeft{20%{opacity:1;-webkit-transform:translate3d(20px,0,0);transform:translate3d(20px,0,0)}to{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}}@keyframes bounceOutLeft{20%{opacity:1;-webkit-transform:translate3d(20px,0,0);transform:translate3d(20px,0,0)}to{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}}.bounceOutLeft{-webkit-animation-name:bounceOutLeft;animation-name:bounceOutLeft}@-webkit-keyframes bounceOutRight{20%{opacity:1;-webkit-transform:translate3d(-20px,0,0);transform:translate3d(-20px,0,0)}to{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}}@keyframes bounceOutRight{20%{opacity:1;-webkit-transform:translate3d(-20px,0,0);transform:translate3d(-20px,0,0)}to{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}}.bounceOutRight{-webkit-animation-name:bounceOutRight;animation-name:bounceOutRight}@-webkit-keyframes bounceOutUp{20%{-webkit-transform:translate3d(0,-10px,0);transform:translate3d(0,-10px,0)}40%,45%{opacity:1;-webkit-transform:translate3d(0,20px,0);transform:translate3d(0,20px,0)}to{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}}@keyframes bounceOutUp{20%{-webkit-transform:translate3d(0,-10px,0);transform:translate3d(0,-10px,0)}40%,45%{opacity:1;-webkit-transform:translate3d(0,20px,0);transform:translate3d(0,20px,0)}to{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}}.bounceOutUp{-webkit-animation-name:bounceOutUp;animation-name:bounceOutUp}@-webkit-keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.fadeIn{-webkit-animation-name:fadeIn;animation-name:fadeIn}@-webkit-keyframes fadeInDown{0%{opacity:0;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes fadeInDown{0%{opacity:0;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}.fadeInDown{-webkit-animation-name:fadeInDown;animation-name:fadeInDown}@-webkit-keyframes fadeInDownBig{0%{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes fadeInDownBig{0%{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}.fadeInDownBig{-webkit-animation-name:fadeInDownBig;animation-name:fadeInDownBig}@-webkit-keyframes fadeInLeft{0%{opacity:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes fadeInLeft{0%{opacity:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}.fadeInLeft{-webkit-animation-name:fadeInLeft;animation-name:fadeInLeft}@-webkit-keyframes fadeInLeftBig{0%{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes fadeInLeftBig{0%{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}.fadeInLeftBig{-webkit-animation-name:fadeInLeftBig;animation-name:fadeInLeftBig}@-webkit-keyframes fadeInRight{0%{opacity:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes fadeInRight{0%{opacity:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}.fadeInRight{-webkit-animation-name:fadeInRight;animation-name:fadeInRight}@-webkit-keyframes fadeInRightBig{0%{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes fadeInRightBig{0%{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}.fadeInRightBig{-webkit-animation-name:fadeInRightBig;animation-name:fadeInRightBig}@-webkit-keyframes fadeInUp{0%{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes fadeInUp{0%{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}.fadeInUp{-webkit-animation-name:fadeInUp;animation-name:fadeInUp}@-webkit-keyframes fadeInUpBig{0%{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes fadeInUpBig{0%{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}.fadeInUpBig{-webkit-animation-name:fadeInUpBig;animation-name:fadeInUpBig}@-webkit-keyframes fadeOut{0%{opacity:1}to{opacity:0}}@keyframes fadeOut{0%{opacity:1}to{opacity:0}}.fadeOut{-webkit-animation-name:fadeOut;animation-name:fadeOut}@-webkit-keyframes fadeOutDown{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}@keyframes fadeOutDown{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}.fadeOutDown{-webkit-animation-name:fadeOutDown;animation-name:fadeOutDown}@-webkit-keyframes fadeOutDownBig{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}}@keyframes fadeOutDownBig{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}}.fadeOutDownBig{-webkit-animation-name:fadeOutDownBig;animation-name:fadeOutDownBig}@-webkit-keyframes fadeOutLeft{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}@keyframes fadeOutLeft{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}.fadeOutLeft{-webkit-animation-name:fadeOutLeft;animation-name:fadeOutLeft}@-webkit-keyframes fadeOutLeftBig{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}}@keyframes fadeOutLeftBig{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}}.fadeOutLeftBig{-webkit-animation-name:fadeOutLeftBig;animation-name:fadeOutLeftBig}@-webkit-keyframes fadeOutRight{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}@keyframes fadeOutRight{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}.fadeOutRight{-webkit-animation-name:fadeOutRight;animation-name:fadeOutRight}@-webkit-keyframes fadeOutRightBig{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}}@keyframes fadeOutRightBig{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}}.fadeOutRightBig{-webkit-animation-name:fadeOutRightBig;animation-name:fadeOutRightBig}@-webkit-keyframes fadeOutUp{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}@keyframes fadeOutUp{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}.fadeOutUp{-webkit-animation-name:fadeOutUp;animation-name:fadeOutUp}@-webkit-keyframes fadeOutUpBig{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}}@keyframes fadeOutUpBig{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}}.fadeOutUpBig{-webkit-animation-name:fadeOutUpBig;animation-name:fadeOutUpBig}@-webkit-keyframes flip{0%{-webkit-transform:perspective(400px) rotateY(-1turn);transform:perspective(400px) rotateY(-1turn);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}40%{-webkit-transform:perspective(400px) translateZ(150px) rotateY(-190deg);transform:perspective(400px) translateZ(150px) rotateY(-190deg);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}50%{-webkit-transform:perspective(400px) translateZ(150px) rotateY(-170deg);transform:perspective(400px) translateZ(150px) rotateY(-170deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}80%{-webkit-transform:perspective(400px) scale3d(.95,.95,.95);transform:perspective(400px) scale3d(.95,.95,.95);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}to{-webkit-transform:perspective(400px);transform:perspective(400px);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}}@keyframes flip{0%{-webkit-transform:perspective(400px) rotateY(-1turn);transform:perspective(400px) rotateY(-1turn);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}40%{-webkit-transform:perspective(400px) translateZ(150px) rotateY(-190deg);transform:perspective(400px) translateZ(150px) rotateY(-190deg);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}50%{-webkit-transform:perspective(400px) translateZ(150px) rotateY(-170deg);transform:perspective(400px) translateZ(150px) rotateY(-170deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}80%{-webkit-transform:perspective(400px) scale3d(.95,.95,.95);transform:perspective(400px) scale3d(.95,.95,.95);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}to{-webkit-transform:perspective(400px);transform:perspective(400px);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}}.animated.flip{-webkit-backface-visibility:visible;backface-visibility:visible;-webkit-animation-name:flip;animation-name:flip}@-webkit-keyframes flipInX{0%{-webkit-transform:perspective(400px) rotateX(90deg);transform:perspective(400px) rotateX(90deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotateX(-20deg);transform:perspective(400px) rotateX(-20deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotateX(10deg);transform:perspective(400px) rotateX(10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotateX(-5deg);transform:perspective(400px) rotateX(-5deg)}to{-webkit-transform:perspective(400px);transform:perspective(400px)}}@keyframes flipInX{0%{-webkit-transform:perspective(400px) rotateX(90deg);transform:perspective(400px) rotateX(90deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotateX(-20deg);transform:perspective(400px) rotateX(-20deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotateX(10deg);transform:perspective(400px) rotateX(10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotateX(-5deg);transform:perspective(400px) rotateX(-5deg)}to{-webkit-transform:perspective(400px);transform:perspective(400px)}}.flipInX{-webkit-backface-visibility:visible!important;backface-visibility:visible!important;-webkit-animation-name:flipInX;animation-name:flipInX}@-webkit-keyframes flipInY{0%{-webkit-transform:perspective(400px) rotateY(90deg);transform:perspective(400px) rotateY(90deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotateY(-20deg);transform:perspective(400px) rotateY(-20deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotateY(10deg);transform:perspective(400px) rotateY(10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotateY(-5deg);transform:perspective(400px) rotateY(-5deg)}to{-webkit-transform:perspective(400px);transform:perspective(400px)}}@keyframes flipInY{0%{-webkit-transform:perspective(400px) rotateY(90deg);transform:perspective(400px) rotateY(90deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotateY(-20deg);transform:perspective(400px) rotateY(-20deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotateY(10deg);transform:perspective(400px) rotateY(10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotateY(-5deg);transform:perspective(400px) rotateY(-5deg)}to{-webkit-transform:perspective(400px);transform:perspective(400px)}}.flipInY{-webkit-backface-visibility:visible!important;backface-visibility:visible!important;-webkit-animation-name:flipInY;animation-name:flipInY}@-webkit-keyframes flipOutX{0%{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotateX(-20deg);transform:perspective(400px) rotateX(-20deg);opacity:1}to{-webkit-transform:perspective(400px) rotateX(90deg);transform:perspective(400px) rotateX(90deg);opacity:0}}@keyframes flipOutX{0%{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotateX(-20deg);transform:perspective(400px) rotateX(-20deg);opacity:1}to{-webkit-transform:perspective(400px) rotateX(90deg);transform:perspective(400px) rotateX(90deg);opacity:0}}.flipOutX{-webkit-animation-duration:.75s;animation-duration:.75s;-webkit-animation-name:flipOutX;animation-name:flipOutX;-webkit-backface-visibility:visible!important;backface-visibility:visible!important}@-webkit-keyframes flipOutY{0%{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotateY(-15deg);transform:perspective(400px) rotateY(-15deg);opacity:1}to{-webkit-transform:perspective(400px) rotateY(90deg);transform:perspective(400px) rotateY(90deg);opacity:0}}@keyframes flipOutY{0%{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotateY(-15deg);transform:perspective(400px) rotateY(-15deg);opacity:1}to{-webkit-transform:perspective(400px) rotateY(90deg);transform:perspective(400px) rotateY(90deg);opacity:0}}.flipOutY{-webkit-animation-duration:.75s;animation-duration:.75s;-webkit-backface-visibility:visible!important;backface-visibility:visible!important;-webkit-animation-name:flipOutY;animation-name:flipOutY}@-webkit-keyframes lightSpeedIn{0%{-webkit-transform:translate3d(100%,0,0) skewX(-30deg);transform:translate3d(100%,0,0) skewX(-30deg);opacity:0}60%{-webkit-transform:skewX(20deg);transform:skewX(20deg);opacity:1}80%{-webkit-transform:skewX(-5deg);transform:skewX(-5deg);opacity:1}to{-webkit-transform:translateZ(0);transform:translateZ(0);opacity:1}}@keyframes lightSpeedIn{0%{-webkit-transform:translate3d(100%,0,0) skewX(-30deg);transform:translate3d(100%,0,0) skewX(-30deg);opacity:0}60%{-webkit-transform:skewX(20deg);transform:skewX(20deg);opacity:1}80%{-webkit-transform:skewX(-5deg);transform:skewX(-5deg);opacity:1}to{-webkit-transform:translateZ(0);transform:translateZ(0);opacity:1}}.lightSpeedIn{-webkit-animation-name:lightSpeedIn;animation-name:lightSpeedIn;-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}@-webkit-keyframes lightSpeedOut{0%{opacity:1}to{-webkit-transform:translate3d(100%,0,0) skewX(30deg);transform:translate3d(100%,0,0) skewX(30deg);opacity:0}}@keyframes lightSpeedOut{0%{opacity:1}to{-webkit-transform:translate3d(100%,0,0) skewX(30deg);transform:translate3d(100%,0,0) skewX(30deg);opacity:0}}.lightSpeedOut{-webkit-animation-name:lightSpeedOut;animation-name:lightSpeedOut;-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}@-webkit-keyframes rotateIn{0%{-webkit-transform-origin:center;transform-origin:center;-webkit-transform:rotate(-200deg);transform:rotate(-200deg);opacity:0}to{-webkit-transform-origin:center;transform-origin:center;-webkit-transform:translateZ(0);transform:translateZ(0);opacity:1}}@keyframes rotateIn{0%{-webkit-transform-origin:center;transform-origin:center;-webkit-transform:rotate(-200deg);transform:rotate(-200deg);opacity:0}to{-webkit-transform-origin:center;transform-origin:center;-webkit-transform:translateZ(0);transform:translateZ(0);opacity:1}}.rotateIn{-webkit-animation-name:rotateIn;animation-name:rotateIn}@-webkit-keyframes rotateInDownLeft{0%{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate(-45deg);transform:rotate(-45deg);opacity:0}to{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:translateZ(0);transform:translateZ(0);opacity:1}}@keyframes rotateInDownLeft{0%{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate(-45deg);transform:rotate(-45deg);opacity:0}to{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:translateZ(0);transform:translateZ(0);opacity:1}}.rotateInDownLeft{-webkit-animation-name:rotateInDownLeft;animation-name:rotateInDownLeft}@-webkit-keyframes rotateInDownRight{0%{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate(45deg);transform:rotate(45deg);opacity:0}to{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:translateZ(0);transform:translateZ(0);opacity:1}}@keyframes rotateInDownRight{0%{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate(45deg);transform:rotate(45deg);opacity:0}to{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:translateZ(0);transform:translateZ(0);opacity:1}}.rotateInDownRight{-webkit-animation-name:rotateInDownRight;animation-name:rotateInDownRight}@-webkit-keyframes rotateInUpLeft{0%{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate(45deg);transform:rotate(45deg);opacity:0}to{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:translateZ(0);transform:translateZ(0);opacity:1}}@keyframes rotateInUpLeft{0%{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate(45deg);transform:rotate(45deg);opacity:0}to{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:translateZ(0);transform:translateZ(0);opacity:1}}.rotateInUpLeft{-webkit-animation-name:rotateInUpLeft;animation-name:rotateInUpLeft}@-webkit-keyframes rotateInUpRight{0%{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate(-90deg);transform:rotate(-90deg);opacity:0}to{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:translateZ(0);transform:translateZ(0);opacity:1}}@keyframes rotateInUpRight{0%{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate(-90deg);transform:rotate(-90deg);opacity:0}to{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:translateZ(0);transform:translateZ(0);opacity:1}}.rotateInUpRight{-webkit-animation-name:rotateInUpRight;animation-name:rotateInUpRight}@-webkit-keyframes rotateOut{0%{-webkit-transform-origin:center;transform-origin:center;opacity:1}to{-webkit-transform-origin:center;transform-origin:center;-webkit-transform:rotate(200deg);transform:rotate(200deg);opacity:0}}@keyframes rotateOut{0%{-webkit-transform-origin:center;transform-origin:center;opacity:1}to{-webkit-transform-origin:center;transform-origin:center;-webkit-transform:rotate(200deg);transform:rotate(200deg);opacity:0}}.rotateOut{-webkit-animation-name:rotateOut;animation-name:rotateOut}@-webkit-keyframes rotateOutDownLeft{0%{-webkit-transform-origin:left bottom;transform-origin:left bottom;opacity:1}to{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate(45deg);transform:rotate(45deg);opacity:0}}@keyframes rotateOutDownLeft{0%{-webkit-transform-origin:left bottom;transform-origin:left bottom;opacity:1}to{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate(45deg);transform:rotate(45deg);opacity:0}}.rotateOutDownLeft{-webkit-animation-name:rotateOutDownLeft;animation-name:rotateOutDownLeft}@-webkit-keyframes rotateOutDownRight{0%{-webkit-transform-origin:right bottom;transform-origin:right bottom;opacity:1}to{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate(-45deg);transform:rotate(-45deg);opacity:0}}@keyframes rotateOutDownRight{0%{-webkit-transform-origin:right bottom;transform-origin:right bottom;opacity:1}to{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate(-45deg);transform:rotate(-45deg);opacity:0}}.rotateOutDownRight{-webkit-animation-name:rotateOutDownRight;animation-name:rotateOutDownRight}@-webkit-keyframes rotateOutUpLeft{0%{-webkit-transform-origin:left bottom;transform-origin:left bottom;opacity:1}to{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate(-45deg);transform:rotate(-45deg);opacity:0}}@keyframes rotateOutUpLeft{0%{-webkit-transform-origin:left bottom;transform-origin:left bottom;opacity:1}to{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate(-45deg);transform:rotate(-45deg);opacity:0}}.rotateOutUpLeft{-webkit-animation-name:rotateOutUpLeft;animation-name:rotateOutUpLeft}@-webkit-keyframes rotateOutUpRight{0%{-webkit-transform-origin:right bottom;transform-origin:right bottom;opacity:1}to{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate(90deg);transform:rotate(90deg);opacity:0}}@keyframes rotateOutUpRight{0%{-webkit-transform-origin:right bottom;transform-origin:right bottom;opacity:1}to{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate(90deg);transform:rotate(90deg);opacity:0}}.rotateOutUpRight{-webkit-animation-name:rotateOutUpRight;animation-name:rotateOutUpRight}@-webkit-keyframes hinge{0%{-webkit-transform-origin:top left;transform-origin:top left;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}20%,60%{-webkit-transform:rotate(80deg);transform:rotate(80deg);-webkit-transform-origin:top left;transform-origin:top left;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}40%,80%{-webkit-transform:rotate(60deg);transform:rotate(60deg);-webkit-transform-origin:top left;transform-origin:top left;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out;opacity:1}to{-webkit-transform:translate3d(0,700px,0);transform:translate3d(0,700px,0);opacity:0}}@keyframes hinge{0%{-webkit-transform-origin:top left;transform-origin:top left;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}20%,60%{-webkit-transform:rotate(80deg);transform:rotate(80deg);-webkit-transform-origin:top left;transform-origin:top left;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}40%,80%{-webkit-transform:rotate(60deg);transform:rotate(60deg);-webkit-transform-origin:top left;transform-origin:top left;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out;opacity:1}to{-webkit-transform:translate3d(0,700px,0);transform:translate3d(0,700px,0);opacity:0}}.hinge{-webkit-animation-duration:2s;animation-duration:2s;-webkit-animation-name:hinge;animation-name:hinge}@-webkit-keyframes jackInTheBox{0%{opacity:0;-webkit-transform:scale(.1) rotate(30deg);transform:scale(.1) rotate(30deg);-webkit-transform-origin:center bottom;transform-origin:center bottom}50%{-webkit-transform:rotate(-10deg);transform:rotate(-10deg)}70%{-webkit-transform:rotate(3deg);transform:rotate(3deg)}to{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}@keyframes jackInTheBox{0%{opacity:0;-webkit-transform:scale(.1) rotate(30deg);transform:scale(.1) rotate(30deg);-webkit-transform-origin:center bottom;transform-origin:center bottom}50%{-webkit-transform:rotate(-10deg);transform:rotate(-10deg)}70%{-webkit-transform:rotate(3deg);transform:rotate(3deg)}to{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}.jackInTheBox{-webkit-animation-name:jackInTheBox;animation-name:jackInTheBox}@-webkit-keyframes rollIn{0%{opacity:0;-webkit-transform:translate3d(-100%,0,0) rotate(-120deg);transform:translate3d(-100%,0,0) rotate(-120deg)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes rollIn{0%{opacity:0;-webkit-transform:translate3d(-100%,0,0) rotate(-120deg);transform:translate3d(-100%,0,0) rotate(-120deg)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}.rollIn{-webkit-animation-name:rollIn;animation-name:rollIn}@-webkit-keyframes rollOut{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(100%,0,0) rotate(120deg);transform:translate3d(100%,0,0) rotate(120deg)}}@keyframes rollOut{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(100%,0,0) rotate(120deg);transform:translate3d(100%,0,0) rotate(120deg)}}.rollOut{-webkit-animation-name:rollOut;animation-name:rollOut}@-webkit-keyframes zoomIn{0%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}50%{opacity:1}}@keyframes zoomIn{0%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}50%{opacity:1}}.zoomIn{-webkit-animation-name:zoomIn;animation-name:zoomIn}@-webkit-keyframes zoomInDown{0%{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,-1000px,0);transform:scale3d(.1,.1,.1) translate3d(0,-1000px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,60px,0);transform:scale3d(.475,.475,.475) translate3d(0,60px,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomInDown{0%{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,-1000px,0);transform:scale3d(.1,.1,.1) translate3d(0,-1000px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,60px,0);transform:scale3d(.475,.475,.475) translate3d(0,60px,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}.zoomInDown{-webkit-animation-name:zoomInDown;animation-name:zoomInDown}@-webkit-keyframes zoomInLeft{0%{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(-1000px,0,0);transform:scale3d(.1,.1,.1) translate3d(-1000px,0,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(10px,0,0);transform:scale3d(.475,.475,.475) translate3d(10px,0,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomInLeft{0%{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(-1000px,0,0);transform:scale3d(.1,.1,.1) translate3d(-1000px,0,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(10px,0,0);transform:scale3d(.475,.475,.475) translate3d(10px,0,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}.zoomInLeft{-webkit-animation-name:zoomInLeft;animation-name:zoomInLeft}@-webkit-keyframes zoomInRight{0%{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(1000px,0,0);transform:scale3d(.1,.1,.1) translate3d(1000px,0,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(-10px,0,0);transform:scale3d(.475,.475,.475) translate3d(-10px,0,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomInRight{0%{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(1000px,0,0);transform:scale3d(.1,.1,.1) translate3d(1000px,0,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(-10px,0,0);transform:scale3d(.475,.475,.475) translate3d(-10px,0,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}.zoomInRight{-webkit-animation-name:zoomInRight;animation-name:zoomInRight}@-webkit-keyframes zoomInUp{0%{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,1000px,0);transform:scale3d(.1,.1,.1) translate3d(0,1000px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomInUp{0%{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,1000px,0);transform:scale3d(.1,.1,.1) translate3d(0,1000px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}.zoomInUp{-webkit-animation-name:zoomInUp;animation-name:zoomInUp}@-webkit-keyframes zoomOut{0%{opacity:1}50%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}to{opacity:0}}@keyframes zoomOut{0%{opacity:1}50%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}to{opacity:0}}.zoomOut{-webkit-animation-name:zoomOut;animation-name:zoomOut}@-webkit-keyframes zoomOutDown{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}to{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,2000px,0);transform:scale3d(.1,.1,.1) translate3d(0,2000px,0);-webkit-transform-origin:center bottom;transform-origin:center bottom;-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomOutDown{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}to{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,2000px,0);transform:scale3d(.1,.1,.1) translate3d(0,2000px,0);-webkit-transform-origin:center bottom;transform-origin:center bottom;-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}.zoomOutDown{-webkit-animation-name:zoomOutDown;animation-name:zoomOutDown}@-webkit-keyframes zoomOutLeft{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(42px,0,0);transform:scale3d(.475,.475,.475) translate3d(42px,0,0)}to{opacity:0;-webkit-transform:scale(.1) translate3d(-2000px,0,0);transform:scale(.1) translate3d(-2000px,0,0);-webkit-transform-origin:left center;transform-origin:left center}}@keyframes zoomOutLeft{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(42px,0,0);transform:scale3d(.475,.475,.475) translate3d(42px,0,0)}to{opacity:0;-webkit-transform:scale(.1) translate3d(-2000px,0,0);transform:scale(.1) translate3d(-2000px,0,0);-webkit-transform-origin:left center;transform-origin:left center}}.zoomOutLeft{-webkit-animation-name:zoomOutLeft;animation-name:zoomOutLeft}@-webkit-keyframes zoomOutRight{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(-42px,0,0);transform:scale3d(.475,.475,.475) translate3d(-42px,0,0)}to{opacity:0;-webkit-transform:scale(.1) translate3d(2000px,0,0);transform:scale(.1) translate3d(2000px,0,0);-webkit-transform-origin:right center;transform-origin:right center}}@keyframes zoomOutRight{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(-42px,0,0);transform:scale3d(.475,.475,.475) translate3d(-42px,0,0)}to{opacity:0;-webkit-transform:scale(.1) translate3d(2000px,0,0);transform:scale(.1) translate3d(2000px,0,0);-webkit-transform-origin:right center;transform-origin:right center}}.zoomOutRight{-webkit-animation-name:zoomOutRight;animation-name:zoomOutRight}@-webkit-keyframes zoomOutUp{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,60px,0);transform:scale3d(.475,.475,.475) translate3d(0,60px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}to{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,-2000px,0);transform:scale3d(.1,.1,.1) translate3d(0,-2000px,0);-webkit-transform-origin:center bottom;transform-origin:center bottom;-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomOutUp{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,60px,0);transform:scale3d(.475,.475,.475) translate3d(0,60px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}to{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,-2000px,0);transform:scale3d(.1,.1,.1) translate3d(0,-2000px,0);-webkit-transform-origin:center bottom;transform-origin:center bottom;-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}.zoomOutUp{-webkit-animation-name:zoomOutUp;animation-name:zoomOutUp}@-webkit-keyframes slideInDown{0%{-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0);visibility:visible}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes slideInDown{0%{-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0);visibility:visible}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}.slideInDown{-webkit-animation-name:slideInDown;animation-name:slideInDown}@-webkit-keyframes slideInLeft{0%{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0);visibility:visible}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes slideInLeft{0%{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0);visibility:visible}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}.slideInLeft{-webkit-animation-name:slideInLeft;animation-name:slideInLeft}@-webkit-keyframes slideInRight{0%{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0);visibility:visible}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes slideInRight{0%{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0);visibility:visible}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}.slideInRight{-webkit-animation-name:slideInRight;animation-name:slideInRight}@-webkit-keyframes slideInUp{0%{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0);visibility:visible}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes slideInUp{0%{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0);visibility:visible}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}.slideInUp{-webkit-animation-name:slideInUp;animation-name:slideInUp}@-webkit-keyframes slideOutDown{0%{-webkit-transform:translateZ(0);transform:translateZ(0)}to{visibility:hidden;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}@keyframes slideOutDown{0%{-webkit-transform:translateZ(0);transform:translateZ(0)}to{visibility:hidden;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}.slideOutDown{-webkit-animation-name:slideOutDown;animation-name:slideOutDown}@-webkit-keyframes slideOutLeft{0%{-webkit-transform:translateZ(0);transform:translateZ(0)}to{visibility:hidden;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}@keyframes slideOutLeft{0%{-webkit-transform:translateZ(0);transform:translateZ(0)}to{visibility:hidden;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}.slideOutLeft{-webkit-animation-name:slideOutLeft;animation-name:slideOutLeft}@-webkit-keyframes slideOutRight{0%{-webkit-transform:translateZ(0);transform:translateZ(0)}to{visibility:hidden;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}@keyframes slideOutRight{0%{-webkit-transform:translateZ(0);transform:translateZ(0)}to{visibility:hidden;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}.slideOutRight{-webkit-animation-name:slideOutRight;animation-name:slideOutRight}@-webkit-keyframes slideOutUp{0%{-webkit-transform:translateZ(0);transform:translateZ(0)}to{visibility:hidden;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}@keyframes slideOutUp{0%{-webkit-transform:translateZ(0);transform:translateZ(0)}to{visibility:hidden;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}.slideOutUp{-webkit-animation-name:slideOutUp;animation-name:slideOutUp}
|
classes/feedback/assets/css/emoji.css
ADDED
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*shows the stars side by side, centered, and in reverse order than the HMTL*/
|
2 |
+
.emoji {
|
3 |
+
display: flex;
|
4 |
+
flex-direction: row-reverse;
|
5 |
+
justify-content: center;
|
6 |
+
}
|
7 |
+
|
8 |
+
/*hides the radio buttons*/
|
9 |
+
.emoji > input {
|
10 |
+
display: none;
|
11 |
+
}
|
12 |
+
|
13 |
+
|
14 |
+
|
15 |
+
/*style the empty stars, sets position:relative as base for pseudo-elements*/
|
16 |
+
.emoji > label {
|
17 |
+
position: relative;
|
18 |
+
width: 1.1em;
|
19 |
+
font-size: 2em;
|
20 |
+
color: #FFD700;
|
21 |
+
cursor: pointer;
|
22 |
+
}
|
23 |
+
|
24 |
+
/*overlays a filled start character on the selected element and all previous siblings*/
|
25 |
+
.ig-emoji.active {
|
26 |
+
border: 1px solid black;
|
27 |
+
}
|
28 |
+
|
29 |
+
#emoji-info {
|
30 |
+
font-size: 14px;
|
31 |
+
height: 15px;
|
32 |
+
}
|
33 |
+
|
34 |
+
@media only screen and (max-width: 600px) {
|
35 |
+
h1 {
|
36 |
+
font-size: 14px;
|
37 |
+
}
|
38 |
+
|
39 |
+
p {
|
40 |
+
font-size: 12px;
|
41 |
+
}
|
42 |
+
}
|
classes/feedback/assets/css/star-rating.css
ADDED
@@ -0,0 +1,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*shows the stars side by side, centered, and in reverse order than the HMTL*/
|
2 |
+
.rating {
|
3 |
+
display: flex;
|
4 |
+
flex-direction: row-reverse;
|
5 |
+
justify-content: center;
|
6 |
+
}
|
7 |
+
|
8 |
+
/*hides the radio buttons*/
|
9 |
+
.rating > input{ display:none;}
|
10 |
+
|
11 |
+
/*style the empty stars, sets position:relative as base for pseudo-elements*/
|
12 |
+
.rating > label {
|
13 |
+
position: relative;
|
14 |
+
width: 1.1em;
|
15 |
+
font-size: 2em;
|
16 |
+
color: #FFD700;
|
17 |
+
cursor: pointer;
|
18 |
+
}
|
19 |
+
|
20 |
+
/* sets filled star pseudo-elements */
|
21 |
+
.rating > label::before{
|
22 |
+
content: "\2605";
|
23 |
+
position: absolute;
|
24 |
+
opacity: 0;
|
25 |
+
}
|
26 |
+
/*overlays a filled start character to the hovered element and all previous siblings*/
|
27 |
+
.rating > label:hover:before,
|
28 |
+
.rating > label:hover ~ label:before {
|
29 |
+
opacity: 1 !important;
|
30 |
+
}
|
31 |
+
|
32 |
+
/*overlays a filled start character on the selected element and all previous siblings*/
|
33 |
+
.rating > input:checked ~ label:before{
|
34 |
+
opacity:1;
|
35 |
+
}
|
36 |
+
|
37 |
+
/*when an element is selected and pointer re-enters the rating container, selected rate and siblings get semi transparent, as reminder of current selection*/
|
38 |
+
.rating:hover > input:checked ~ label:before{ opacity: 0.4; }
|
39 |
+
|
40 |
+
.rating > input[type=radio]:checked+label:before {
|
41 |
+
color: #FFD700;
|
42 |
+
}
|
43 |
+
|
44 |
+
.ig-feedback-title {
|
45 |
+
font-size: 20px;
|
46 |
+
line-height: 1.5em;
|
47 |
+
margin: 0em 0;
|
48 |
+
}
|
49 |
+
@media only screen and (max-width: 600px) {
|
50 |
+
h1{font-size: 14px;}
|
51 |
+
p{font-size: 12px;}
|
52 |
+
}
|
classes/feedback/assets/css/sweetalert2.css
ADDED
@@ -0,0 +1,1453 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
@charset "UTF-8";
|
2 |
+
@-webkit-keyframes swal2-show {
|
3 |
+
0% {
|
4 |
+
-webkit-transform: scale(0.7);
|
5 |
+
transform: scale(0.7);
|
6 |
+
}
|
7 |
+
45% {
|
8 |
+
-webkit-transform: scale(1.05);
|
9 |
+
transform: scale(1.05);
|
10 |
+
}
|
11 |
+
80% {
|
12 |
+
-webkit-transform: scale(0.95);
|
13 |
+
transform: scale(0.95);
|
14 |
+
}
|
15 |
+
100% {
|
16 |
+
-webkit-transform: scale(1);
|
17 |
+
transform: scale(1);
|
18 |
+
}
|
19 |
+
}
|
20 |
+
@keyframes swal2-show {
|
21 |
+
0% {
|
22 |
+
-webkit-transform: scale(0.7);
|
23 |
+
transform: scale(0.7);
|
24 |
+
}
|
25 |
+
45% {
|
26 |
+
-webkit-transform: scale(1.05);
|
27 |
+
transform: scale(1.05);
|
28 |
+
}
|
29 |
+
80% {
|
30 |
+
-webkit-transform: scale(0.95);
|
31 |
+
transform: scale(0.95);
|
32 |
+
}
|
33 |
+
100% {
|
34 |
+
-webkit-transform: scale(1);
|
35 |
+
transform: scale(1);
|
36 |
+
}
|
37 |
+
}
|
38 |
+
@-webkit-keyframes swal2-hide {
|
39 |
+
0% {
|
40 |
+
-webkit-transform: scale(1);
|
41 |
+
transform: scale(1);
|
42 |
+
opacity: 1;
|
43 |
+
}
|
44 |
+
100% {
|
45 |
+
-webkit-transform: scale(0.5);
|
46 |
+
transform: scale(0.5);
|
47 |
+
opacity: 0;
|
48 |
+
}
|
49 |
+
}
|
50 |
+
@keyframes swal2-hide {
|
51 |
+
0% {
|
52 |
+
-webkit-transform: scale(1);
|
53 |
+
transform: scale(1);
|
54 |
+
opacity: 1;
|
55 |
+
}
|
56 |
+
100% {
|
57 |
+
-webkit-transform: scale(0.5);
|
58 |
+
transform: scale(0.5);
|
59 |
+
opacity: 0;
|
60 |
+
}
|
61 |
+
}
|
62 |
+
@-webkit-keyframes swal2-animate-success-line-tip {
|
63 |
+
0% {
|
64 |
+
top: 1.1875em;
|
65 |
+
left: 0.0625em;
|
66 |
+
width: 0;
|
67 |
+
}
|
68 |
+
54% {
|
69 |
+
top: 1.0625em;
|
70 |
+
left: 0.125em;
|
71 |
+
width: 0;
|
72 |
+
}
|
73 |
+
70% {
|
74 |
+
top: 2.1875em;
|
75 |
+
left: -0.375em;
|
76 |
+
width: 3.125em;
|
77 |
+
}
|
78 |
+
84% {
|
79 |
+
top: 3em;
|
80 |
+
left: 1.3125em;
|
81 |
+
width: 1.0625em;
|
82 |
+
}
|
83 |
+
100% {
|
84 |
+
top: 2.8125em;
|
85 |
+
left: 0.875em;
|
86 |
+
width: 1.5625em;
|
87 |
+
}
|
88 |
+
}
|
89 |
+
@keyframes swal2-animate-success-line-tip {
|
90 |
+
0% {
|
91 |
+
top: 1.1875em;
|
92 |
+
left: 0.0625em;
|
93 |
+
width: 0;
|
94 |
+
}
|
95 |
+
54% {
|
96 |
+
top: 1.0625em;
|
97 |
+
left: 0.125em;
|
98 |
+
width: 0;
|
99 |
+
}
|
100 |
+
70% {
|
101 |
+
top: 2.1875em;
|
102 |
+
left: -0.375em;
|
103 |
+
width: 3.125em;
|
104 |
+
}
|
105 |
+
84% {
|
106 |
+
top: 3em;
|
107 |
+
left: 1.3125em;
|
108 |
+
width: 1.0625em;
|
109 |
+
}
|
110 |
+
100% {
|
111 |
+
top: 2.8125em;
|
112 |
+
left: 0.875em;
|
113 |
+
width: 1.5625em;
|
114 |
+
}
|
115 |
+
}
|
116 |
+
@-webkit-keyframes swal2-animate-success-line-long {
|
117 |
+
0% {
|
118 |
+
top: 3.375em;
|
119 |
+
right: 2.875em;
|
120 |
+
width: 0;
|
121 |
+
}
|
122 |
+
65% {
|
123 |
+
top: 3.375em;
|
124 |
+
right: 2.875em;
|
125 |
+
width: 0;
|
126 |
+
}
|
127 |
+
84% {
|
128 |
+
top: 2.1875em;
|
129 |
+
right: 0;
|
130 |
+
width: 3.4375em;
|
131 |
+
}
|
132 |
+
100% {
|
133 |
+
top: 2.375em;
|
134 |
+
right: 0.5em;
|
135 |
+
width: 2.9375em;
|
136 |
+
}
|
137 |
+
}
|
138 |
+
@keyframes swal2-animate-success-line-long {
|
139 |
+
0% {
|
140 |
+
top: 3.375em;
|
141 |
+
right: 2.875em;
|
142 |
+
width: 0;
|
143 |
+
}
|
144 |
+
65% {
|
145 |
+
top: 3.375em;
|
146 |
+
right: 2.875em;
|
147 |
+
width: 0;
|
148 |
+
}
|
149 |
+
84% {
|
150 |
+
top: 2.1875em;
|
151 |
+
right: 0;
|
152 |
+
width: 3.4375em;
|
153 |
+
}
|
154 |
+
100% {
|
155 |
+
top: 2.375em;
|
156 |
+
right: 0.5em;
|
157 |
+
width: 2.9375em;
|
158 |
+
}
|
159 |
+
}
|
160 |
+
@-webkit-keyframes swal2-rotate-success-circular-line {
|
161 |
+
0% {
|
162 |
+
-webkit-transform: rotate(-45deg);
|
163 |
+
transform: rotate(-45deg);
|
164 |
+
}
|
165 |
+
5% {
|
166 |
+
-webkit-transform: rotate(-45deg);
|
167 |
+
transform: rotate(-45deg);
|
168 |
+
}
|
169 |
+
12% {
|
170 |
+
-webkit-transform: rotate(-405deg);
|
171 |
+
transform: rotate(-405deg);
|
172 |
+
}
|
173 |
+
100% {
|
174 |
+
-webkit-transform: rotate(-405deg);
|
175 |
+
transform: rotate(-405deg);
|
176 |
+
}
|
177 |
+
}
|
178 |
+
@keyframes swal2-rotate-success-circular-line {
|
179 |
+
0% {
|
180 |
+
-webkit-transform: rotate(-45deg);
|
181 |
+
transform: rotate(-45deg);
|
182 |
+
}
|
183 |
+
5% {
|
184 |
+
-webkit-transform: rotate(-45deg);
|
185 |
+
transform: rotate(-45deg);
|
186 |
+
}
|
187 |
+
12% {
|
188 |
+
-webkit-transform: rotate(-405deg);
|
189 |
+
transform: rotate(-405deg);
|
190 |
+
}
|
191 |
+
100% {
|
192 |
+
-webkit-transform: rotate(-405deg);
|
193 |
+
transform: rotate(-405deg);
|
194 |
+
}
|
195 |
+
}
|
196 |
+
@-webkit-keyframes swal2-animate-error-x-mark {
|
197 |
+
0% {
|
198 |
+
margin-top: 1.625em;
|
199 |
+
-webkit-transform: scale(0.4);
|
200 |
+
transform: scale(0.4);
|
201 |
+
opacity: 0;
|
202 |
+
}
|
203 |
+
50% {
|
204 |
+
margin-top: 1.625em;
|
205 |
+
-webkit-transform: scale(0.4);
|
206 |
+
transform: scale(0.4);
|
207 |
+
opacity: 0;
|
208 |
+
}
|
209 |
+
80% {
|
210 |
+
margin-top: -0.375em;
|
211 |
+
-webkit-transform: scale(1.15);
|
212 |
+
transform: scale(1.15);
|
213 |
+
}
|
214 |
+
100% {
|
215 |
+
margin-top: 0;
|
216 |
+
-webkit-transform: scale(1);
|
217 |
+
transform: scale(1);
|
218 |
+
opacity: 1;
|
219 |
+
}
|
220 |
+
}
|
221 |
+
@keyframes swal2-animate-error-x-mark {
|
222 |
+
0% {
|
223 |
+
margin-top: 1.625em;
|
224 |
+
-webkit-transform: scale(0.4);
|
225 |
+
transform: scale(0.4);
|
226 |
+
opacity: 0;
|
227 |
+
}
|
228 |
+
50% {
|
229 |
+
margin-top: 1.625em;
|
230 |
+
-webkit-transform: scale(0.4);
|
231 |
+
transform: scale(0.4);
|
232 |
+
opacity: 0;
|
233 |
+
}
|
234 |
+
80% {
|
235 |
+
margin-top: -0.375em;
|
236 |
+
-webkit-transform: scale(1.15);
|
237 |
+
transform: scale(1.15);
|
238 |
+
}
|
239 |
+
100% {
|
240 |
+
margin-top: 0;
|
241 |
+
-webkit-transform: scale(1);
|
242 |
+
transform: scale(1);
|
243 |
+
opacity: 1;
|
244 |
+
}
|
245 |
+
}
|
246 |
+
@-webkit-keyframes swal2-animate-error-icon {
|
247 |
+
0% {
|
248 |
+
-webkit-transform: rotateX(100deg);
|
249 |
+
transform: rotateX(100deg);
|
250 |
+
opacity: 0;
|
251 |
+
}
|
252 |
+
100% {
|
253 |
+
-webkit-transform: rotateX(0deg);
|
254 |
+
transform: rotateX(0deg);
|
255 |
+
opacity: 1;
|
256 |
+
}
|
257 |
+
}
|
258 |
+
@keyframes swal2-animate-error-icon {
|
259 |
+
0% {
|
260 |
+
-webkit-transform: rotateX(100deg);
|
261 |
+
transform: rotateX(100deg);
|
262 |
+
opacity: 0;
|
263 |
+
}
|
264 |
+
100% {
|
265 |
+
-webkit-transform: rotateX(0deg);
|
266 |
+
transform: rotateX(0deg);
|
267 |
+
opacity: 1;
|
268 |
+
}
|
269 |
+
}
|
270 |
+
body.swal2-toast-shown .swal2-container {
|
271 |
+
background-color: transparent;
|
272 |
+
}
|
273 |
+
body.swal2-toast-shown .swal2-container.swal2-shown {
|
274 |
+
background-color: transparent;
|
275 |
+
}
|
276 |
+
body.swal2-toast-shown .swal2-container.swal2-top {
|
277 |
+
top: 0;
|
278 |
+
right: auto;
|
279 |
+
bottom: auto;
|
280 |
+
left: 50%;
|
281 |
+
-webkit-transform: translateX(-50%);
|
282 |
+
transform: translateX(-50%);
|
283 |
+
}
|
284 |
+
body.swal2-toast-shown .swal2-container.swal2-top-end, body.swal2-toast-shown .swal2-container.swal2-top-right {
|
285 |
+
top: 0;
|
286 |
+
right: 0;
|
287 |
+
bottom: auto;
|
288 |
+
left: auto;
|
289 |
+
}
|
290 |
+
body.swal2-toast-shown .swal2-container.swal2-top-start, body.swal2-toast-shown .swal2-container.swal2-top-left {
|
291 |
+
top: 0;
|
292 |
+
right: auto;
|
293 |
+
bottom: auto;
|
294 |
+
left: 0;
|
295 |
+
}
|
296 |
+
body.swal2-toast-shown .swal2-container.swal2-center-start, body.swal2-toast-shown .swal2-container.swal2-center-left {
|
297 |
+
top: 50%;
|
298 |
+
right: auto;
|
299 |
+
bottom: auto;
|
300 |
+
left: 0;
|
301 |
+
-webkit-transform: translateY(-50%);
|
302 |
+
transform: translateY(-50%);
|
303 |
+
}
|
304 |
+
body.swal2-toast-shown .swal2-container.swal2-center {
|
305 |
+
top: 50%;
|
306 |
+
right: auto;
|
307 |
+
bottom: auto;
|
308 |
+
left: 50%;
|
309 |
+
-webkit-transform: translate(-50%, -50%);
|
310 |
+
transform: translate(-50%, -50%);
|
311 |
+
}
|
312 |
+
body.swal2-toast-shown .swal2-container.swal2-center-end, body.swal2-toast-shown .swal2-container.swal2-center-right {
|
313 |
+
top: 50%;
|
314 |
+
right: 0;
|
315 |
+
bottom: auto;
|
316 |
+
left: auto;
|
317 |
+
-webkit-transform: translateY(-50%);
|
318 |
+
transform: translateY(-50%);
|
319 |
+
}
|
320 |
+
body.swal2-toast-shown .swal2-container.swal2-bottom-start, body.swal2-toast-shown .swal2-container.swal2-bottom-left {
|
321 |
+
top: auto;
|
322 |
+
right: auto;
|
323 |
+
bottom: 0;
|
324 |
+
left: 0;
|
325 |
+
}
|
326 |
+
body.swal2-toast-shown .swal2-container.swal2-bottom {
|
327 |
+
top: auto;
|
328 |
+
right: auto;
|
329 |
+
bottom: 0;
|
330 |
+
left: 50%;
|
331 |
+
-webkit-transform: translateX(-50%);
|
332 |
+
transform: translateX(-50%);
|
333 |
+
}
|
334 |
+
body.swal2-toast-shown .swal2-container.swal2-bottom-end, body.swal2-toast-shown .swal2-container.swal2-bottom-right {
|
335 |
+
top: auto;
|
336 |
+
right: 0;
|
337 |
+
bottom: 0;
|
338 |
+
left: auto;
|
339 |
+
}
|
340 |
+
body.swal2-toast-column .swal2-toast {
|
341 |
+
flex-direction: column;
|
342 |
+
align-items: stretch;
|
343 |
+
}
|
344 |
+
body.swal2-toast-column .swal2-toast .swal2-actions {
|
345 |
+
flex: 1;
|
346 |
+
align-self: stretch;
|
347 |
+
height: 2.2em;
|
348 |
+
margin-top: 0.3125em;
|
349 |
+
}
|
350 |
+
body.swal2-toast-column .swal2-toast .swal2-loading {
|
351 |
+
justify-content: center;
|
352 |
+
}
|
353 |
+
body.swal2-toast-column .swal2-toast .swal2-input {
|
354 |
+
height: 2em;
|
355 |
+
margin: 0.3125em auto;
|
356 |
+
font-size: 1em;
|
357 |
+
}
|
358 |
+
body.swal2-toast-column .swal2-toast .swal2-validation-message {
|
359 |
+
font-size: 1em;
|
360 |
+
}
|
361 |
+
|
362 |
+
.swal2-popup.swal2-toast {
|
363 |
+
flex-direction: row;
|
364 |
+
align-items: center;
|
365 |
+
width: auto;
|
366 |
+
padding: 0.625em;
|
367 |
+
overflow-y: hidden;
|
368 |
+
box-shadow: 0 0 0.625em #d9d9d9;
|
369 |
+
}
|
370 |
+
.swal2-popup.swal2-toast .swal2-header {
|
371 |
+
flex-direction: row;
|
372 |
+
}
|
373 |
+
.swal2-popup.swal2-toast .swal2-title {
|
374 |
+
flex-grow: 1;
|
375 |
+
justify-content: flex-start;
|
376 |
+
margin: 0 0.6em;
|
377 |
+
font-size: 1em;
|
378 |
+
}
|
379 |
+
.swal2-popup.swal2-toast .swal2-footer {
|
380 |
+
margin: 0.5em 0 0;
|
381 |
+
padding: 0.5em 0 0;
|
382 |
+
font-size: 0.8em;
|
383 |
+
}
|
384 |
+
.swal2-popup.swal2-toast .swal2-close {
|
385 |
+
position: initial;
|
386 |
+
width: 0.8em;
|
387 |
+
height: 0.8em;
|
388 |
+
line-height: 0.8;
|
389 |
+
}
|
390 |
+
.swal2-popup.swal2-toast .swal2-content {
|
391 |
+
justify-content: flex-start;
|
392 |
+
font-size: 1em;
|
393 |
+
}
|
394 |
+
.swal2-popup.swal2-toast .swal2-icon {
|
395 |
+
width: 2em;
|
396 |
+
min-width: 2em;
|
397 |
+
height: 2em;
|
398 |
+
margin: 0;
|
399 |
+
}
|
400 |
+
.swal2-popup.swal2-toast .swal2-icon::before {
|
401 |
+
display: flex;
|
402 |
+
align-items: center;
|
403 |
+
font-size: 2em;
|
404 |
+
font-weight: bold;
|
405 |
+
}
|
406 |
+
@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
|
407 |
+
.swal2-popup.swal2-toast .swal2-icon::before {
|
408 |
+
font-size: 0.25em;
|
409 |
+
}
|
410 |
+
}
|
411 |
+
.swal2-popup.swal2-toast .swal2-icon.swal2-success .swal2-success-ring {
|
412 |
+
width: 2em;
|
413 |
+
height: 2em;
|
414 |
+
}
|
415 |
+
.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line] {
|
416 |
+
top: 0.875em;
|
417 |
+
width: 1.375em;
|
418 |
+
}
|
419 |
+
.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left] {
|
420 |
+
left: 0.3125em;
|
421 |
+
}
|
422 |
+
.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right] {
|
423 |
+
right: 0.3125em;
|
424 |
+
}
|
425 |
+
.swal2-popup.swal2-toast .swal2-actions {
|
426 |
+
height: auto;
|
427 |
+
margin: 0 0.3125em;
|
428 |
+
}
|
429 |
+
.swal2-popup.swal2-toast .swal2-styled {
|
430 |
+
margin: 0 0.3125em;
|
431 |
+
padding: 0.3125em 0.625em;
|
432 |
+
font-size: 1em;
|
433 |
+
}
|
434 |
+
.swal2-popup.swal2-toast .swal2-styled:focus {
|
435 |
+
box-shadow: 0 0 0 0.0625em #fff, 0 0 0 0.125em rgba(50, 100, 150, 0.4);
|
436 |
+
}
|
437 |
+
.swal2-popup.swal2-toast .swal2-success {
|
438 |
+
border-color: #a5dc86;
|
439 |
+
}
|
440 |
+
.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line] {
|
441 |
+
position: absolute;
|
442 |
+
width: 1.6em;
|
443 |
+
height: 3em;
|
444 |
+
-webkit-transform: rotate(45deg);
|
445 |
+
transform: rotate(45deg);
|
446 |
+
border-radius: 50%;
|
447 |
+
}
|
448 |
+
.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=left] {
|
449 |
+
top: -0.8em;
|
450 |
+
left: -0.5em;
|
451 |
+
-webkit-transform: rotate(-45deg);
|
452 |
+
transform: rotate(-45deg);
|
453 |
+
-webkit-transform-origin: 2em 2em;
|
454 |
+
transform-origin: 2em 2em;
|
455 |
+
border-radius: 4em 0 0 4em;
|
456 |
+
}
|
457 |
+
.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=right] {
|
458 |
+
top: -0.25em;
|
459 |
+
left: 0.9375em;
|
460 |
+
-webkit-transform-origin: 0 1.5em;
|
461 |
+
transform-origin: 0 1.5em;
|
462 |
+
border-radius: 0 4em 4em 0;
|
463 |
+
}
|
464 |
+
.swal2-popup.swal2-toast .swal2-success .swal2-success-ring {
|
465 |
+
width: 2em;
|
466 |
+
height: 2em;
|
467 |
+
}
|
468 |
+
.swal2-popup.swal2-toast .swal2-success .swal2-success-fix {
|
469 |
+
top: 0;
|
470 |
+
left: 0.4375em;
|
471 |
+
width: 0.4375em;
|
472 |
+
height: 2.6875em;
|
473 |
+
}
|
474 |
+
.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line] {
|
475 |
+
height: 0.3125em;
|
476 |
+
}
|
477 |
+
.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=tip] {
|
478 |
+
top: 1.125em;
|
479 |
+
left: 0.1875em;
|
480 |
+
width: 0.75em;
|
481 |
+
}
|
482 |
+
.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=long] {
|
483 |
+
top: 0.9375em;
|
484 |
+
right: 0.1875em;
|
485 |
+
width: 1.375em;
|
486 |
+
}
|
487 |
+
.swal2-popup.swal2-toast.swal2-show {
|
488 |
+
-webkit-animation: swal2-toast-show 0.5s;
|
489 |
+
animation: swal2-toast-show 0.5s;
|
490 |
+
}
|
491 |
+
.swal2-popup.swal2-toast.swal2-hide {
|
492 |
+
-webkit-animation: swal2-toast-hide 0.1s forwards;
|
493 |
+
animation: swal2-toast-hide 0.1s forwards;
|
494 |
+
}
|
495 |
+
.swal2-popup.swal2-toast .swal2-animate-success-icon .swal2-success-line-tip {
|
496 |
+
-webkit-animation: swal2-toast-animate-success-line-tip 0.75s;
|
497 |
+
animation: swal2-toast-animate-success-line-tip 0.75s;
|
498 |
+
}
|
499 |
+
.swal2-popup.swal2-toast .swal2-animate-success-icon .swal2-success-line-long {
|
500 |
+
-webkit-animation: swal2-toast-animate-success-line-long 0.75s;
|
501 |
+
animation: swal2-toast-animate-success-line-long 0.75s;
|
502 |
+
}
|
503 |
+
|
504 |
+
@-webkit-keyframes swal2-toast-show {
|
505 |
+
0% {
|
506 |
+
-webkit-transform: translateY(-0.625em) rotateZ(2deg);
|
507 |
+
transform: translateY(-0.625em) rotateZ(2deg);
|
508 |
+
}
|
509 |
+
33% {
|
510 |
+
-webkit-transform: translateY(0) rotateZ(-2deg);
|
511 |
+
transform: translateY(0) rotateZ(-2deg);
|
512 |
+
}
|
513 |
+
66% {
|
514 |
+
-webkit-transform: translateY(0.3125em) rotateZ(2deg);
|
515 |
+
transform: translateY(0.3125em) rotateZ(2deg);
|
516 |
+
}
|
517 |
+
100% {
|
518 |
+
-webkit-transform: translateY(0) rotateZ(0);
|
519 |
+
transform: translateY(0) rotateZ(0);
|
520 |
+
}
|
521 |
+
}
|
522 |
+
|
523 |
+
@keyframes swal2-toast-show {
|
524 |
+
0% {
|
525 |
+
-webkit-transform: translateY(-0.625em) rotateZ(2deg);
|
526 |
+
transform: translateY(-0.625em) rotateZ(2deg);
|
527 |
+
}
|
528 |
+
33% {
|
529 |
+
-webkit-transform: translateY(0) rotateZ(-2deg);
|
530 |
+
transform: translateY(0) rotateZ(-2deg);
|
531 |
+
}
|
532 |
+
66% {
|
533 |
+
-webkit-transform: translateY(0.3125em) rotateZ(2deg);
|
534 |
+
transform: translateY(0.3125em) rotateZ(2deg);
|
535 |
+
}
|
536 |
+
100% {
|
537 |
+
-webkit-transform: translateY(0) rotateZ(0);
|
538 |
+
transform: translateY(0) rotateZ(0);
|
539 |
+
}
|
540 |
+
}
|
541 |
+
@-webkit-keyframes swal2-toast-hide {
|
542 |
+
100% {
|
543 |
+
-webkit-transform: rotateZ(1deg);
|
544 |
+
transform: rotateZ(1deg);
|
545 |
+
opacity: 0;
|
546 |
+
}
|
547 |
+
}
|
548 |
+
@keyframes swal2-toast-hide {
|
549 |
+
100% {
|
550 |
+
-webkit-transform: rotateZ(1deg);
|
551 |
+
transform: rotateZ(1deg);
|
552 |
+
opacity: 0;
|
553 |
+
}
|
554 |
+
}
|
555 |
+
@-webkit-keyframes swal2-toast-animate-success-line-tip {
|
556 |
+
0% {
|
557 |
+
top: 0.5625em;
|
558 |
+
left: 0.0625em;
|
559 |
+
width: 0;
|
560 |
+
}
|
561 |
+
54% {
|
562 |
+
top: 0.125em;
|
563 |
+
left: 0.125em;
|
564 |
+
width: 0;
|
565 |
+
}
|
566 |
+
70% {
|
567 |
+
top: 0.625em;
|
568 |
+
left: -0.25em;
|
569 |
+
width: 1.625em;
|
570 |
+
}
|
571 |
+
84% {
|
572 |
+
top: 1.0625em;
|
573 |
+
left: 0.75em;
|
574 |
+
width: 0.5em;
|
575 |
+
}
|
576 |
+
100% {
|
577 |
+
top: 1.125em;
|
578 |
+
left: 0.1875em;
|
579 |
+
width: 0.75em;
|
580 |
+
}
|
581 |
+
}
|
582 |
+
@keyframes swal2-toast-animate-success-line-tip {
|
583 |
+
0% {
|
584 |
+
top: 0.5625em;
|
585 |
+
left: 0.0625em;
|
586 |
+
width: 0;
|
587 |
+
}
|
588 |
+
54% {
|
589 |
+
top: 0.125em;
|
590 |
+
left: 0.125em;
|
591 |
+
width: 0;
|
592 |
+
}
|
593 |
+
70% {
|
594 |
+
top: 0.625em;
|
595 |
+
left: -0.25em;
|
596 |
+
width: 1.625em;
|
597 |
+
}
|
598 |
+
84% {
|
599 |
+
top: 1.0625em;
|
600 |
+
left: 0.75em;
|
601 |
+
width: 0.5em;
|
602 |
+
}
|
603 |
+
100% {
|
604 |
+
top: 1.125em;
|
605 |
+
left: 0.1875em;
|
606 |
+
width: 0.75em;
|
607 |
+
}
|
608 |
+
}
|
609 |
+
@-webkit-keyframes swal2-toast-animate-success-line-long {
|
610 |
+
0% {
|
611 |
+
top: 1.625em;
|
612 |
+
right: 1.375em;
|
613 |
+
width: 0;
|
614 |
+
}
|
615 |
+
65% {
|
616 |
+
top: 1.25em;
|
617 |
+
right: 0.9375em;
|
618 |
+
width: 0;
|
619 |
+
}
|
620 |
+
84% {
|
621 |
+
top: 0.9375em;
|
622 |
+
right: 0;
|
623 |
+
width: 1.125em;
|
624 |
+
}
|
625 |
+
100% {
|
626 |
+
top: 0.9375em;
|
627 |
+
right: 0.1875em;
|
628 |
+
width: 1.375em;
|
629 |
+
}
|
630 |
+
}
|
631 |
+
@keyframes swal2-toast-animate-success-line-long {
|
632 |
+
0% {
|
633 |
+
top: 1.625em;
|
634 |
+
right: 1.375em;
|
635 |
+
width: 0;
|
636 |
+
}
|
637 |
+
65% {
|
638 |
+
top: 1.25em;
|
639 |
+
right: 0.9375em;
|
640 |
+
width: 0;
|
641 |
+
}
|
642 |
+
84% {
|
643 |
+
top: 0.9375em;
|
644 |
+
right: 0;
|
645 |
+
width: 1.125em;
|
646 |
+
}
|
647 |
+
100% {
|
648 |
+
top: 0.9375em;
|
649 |
+
right: 0.1875em;
|
650 |
+
width: 1.375em;
|
651 |
+
}
|
652 |
+
}
|
653 |
+
body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) {
|
654 |
+
overflow: hidden;
|
655 |
+
}
|
656 |
+
body.swal2-height-auto {
|
657 |
+
height: auto !important;
|
658 |
+
}
|
659 |
+
body.swal2-no-backdrop .swal2-shown {
|
660 |
+
top: auto;
|
661 |
+
right: auto;
|
662 |
+
bottom: auto;
|
663 |
+
left: auto;
|
664 |
+
max-width: calc(100% - 0.625em * 2);
|
665 |
+
background-color: transparent;
|
666 |
+
}
|
667 |
+
body.swal2-no-backdrop .swal2-shown > .swal2-modal {
|
668 |
+
box-shadow: 0 0 10px rgba(0, 0, 0, 0.4);
|
669 |
+
}
|
670 |
+
body.swal2-no-backdrop .swal2-shown.swal2-top {
|
671 |
+
top: 0;
|
672 |
+
left: 50%;
|
673 |
+
-webkit-transform: translateX(-50%);
|
674 |
+
transform: translateX(-50%);
|
675 |
+
}
|
676 |
+
body.swal2-no-backdrop .swal2-shown.swal2-top-start, body.swal2-no-backdrop .swal2-shown.swal2-top-left {
|
677 |
+
top: 0;
|
678 |
+
left: 0;
|
679 |
+
}
|
680 |
+
body.swal2-no-backdrop .swal2-shown.swal2-top-end, body.swal2-no-backdrop .swal2-shown.swal2-top-right {
|
681 |
+
top: 0;
|
682 |
+
right: 0;
|
683 |
+
}
|
684 |
+
body.swal2-no-backdrop .swal2-shown.swal2-center {
|
685 |
+
top: 50%;
|
686 |
+
left: 50%;
|
687 |
+
-webkit-transform: translate(-50%, -50%);
|
688 |
+
transform: translate(-50%, -50%);
|
689 |
+
}
|
690 |
+
body.swal2-no-backdrop .swal2-shown.swal2-center-start, body.swal2-no-backdrop .swal2-shown.swal2-center-left {
|
691 |
+
top: 50%;
|
692 |
+
left: 0;
|
693 |
+
-webkit-transform: translateY(-50%);
|
694 |
+
transform: translateY(-50%);
|
695 |
+
}
|
696 |
+
body.swal2-no-backdrop .swal2-shown.swal2-center-end, body.swal2-no-backdrop .swal2-shown.swal2-center-right {
|
697 |
+
top: 50%;
|
698 |
+
right: 0;
|
699 |
+
-webkit-transform: translateY(-50%);
|
700 |
+
transform: translateY(-50%);
|
701 |
+
}
|
702 |
+
body.swal2-no-backdrop .swal2-shown.swal2-bottom {
|
703 |
+
bottom: 0;
|
704 |
+
left: 50%;
|
705 |
+
-webkit-transform: translateX(-50%);
|
706 |
+
transform: translateX(-50%);
|
707 |
+
}
|
708 |
+
body.swal2-no-backdrop .swal2-shown.swal2-bottom-start, body.swal2-no-backdrop .swal2-shown.swal2-bottom-left {
|
709 |
+
bottom: 0;
|
710 |
+
left: 0;
|
711 |
+
}
|
712 |
+
body.swal2-no-backdrop .swal2-shown.swal2-bottom-end, body.swal2-no-backdrop .swal2-shown.swal2-bottom-right {
|
713 |
+
right: 0;
|
714 |
+
bottom: 0;
|
715 |
+
}
|
716 |
+
|
717 |
+
.swal2-container {
|
718 |
+
display: flex;
|
719 |
+
position: fixed;
|
720 |
+
/*z-index: 1060;*/
|
721 |
+
z-index: 999999;
|
722 |
+
top: 0;
|
723 |
+
right: 0;
|
724 |
+
bottom: 0;
|
725 |
+
left: 0;
|
726 |
+
flex-direction: row;
|
727 |
+
align-items: center;
|
728 |
+
justify-content: center;
|
729 |
+
padding: 0.625em;
|
730 |
+
overflow-x: hidden;
|
731 |
+
background-color: transparent;
|
732 |
+
-webkit-overflow-scrolling: touch;
|
733 |
+
}
|
734 |
+
.swal2-container.swal2-top {
|
735 |
+
align-items: flex-start;
|
736 |
+
}
|
737 |
+
.swal2-container.swal2-top-start, .swal2-container.swal2-top-left {
|
738 |
+
align-items: flex-start;
|
739 |
+
justify-content: flex-start;
|
740 |
+
}
|
741 |
+
.swal2-container.swal2-top-end, .swal2-container.swal2-top-right {
|
742 |
+
align-items: flex-start;
|
743 |
+
justify-content: flex-end;
|
744 |
+
}
|
745 |
+
.swal2-container.swal2-center {
|
746 |
+
align-items: center;
|
747 |
+
}
|
748 |
+
.swal2-container.swal2-center-start, .swal2-container.swal2-center-left {
|
749 |
+
align-items: center;
|
750 |
+
justify-content: flex-start;
|
751 |
+
}
|
752 |
+
.swal2-container.swal2-center-end, .swal2-container.swal2-center-right {
|
753 |
+
align-items: center;
|
754 |
+
justify-content: flex-end;
|
755 |
+
}
|
756 |
+
.swal2-container.swal2-bottom {
|
757 |
+
align-items: flex-end;
|
758 |
+
}
|
759 |
+
.swal2-container.swal2-bottom-start, .swal2-container.swal2-bottom-left {
|
760 |
+
align-items: flex-end;
|
761 |
+
justify-content: flex-start;
|
762 |
+
}
|
763 |
+
.swal2-container.swal2-bottom-end, .swal2-container.swal2-bottom-right {
|
764 |
+
align-items: flex-end;
|
765 |
+
justify-content: flex-end;
|
766 |
+
}
|
767 |
+
.swal2-container.swal2-bottom > :first-child, .swal2-container.swal2-bottom-start > :first-child, .swal2-container.swal2-bottom-left > :first-child, .swal2-container.swal2-bottom-end > :first-child, .swal2-container.swal2-bottom-right > :first-child {
|
768 |
+
margin-top: auto;
|
769 |
+
}
|
770 |
+
.swal2-container.swal2-grow-fullscreen > .swal2-modal {
|
771 |
+
display: flex !important;
|
772 |
+
flex: 1;
|
773 |
+
align-self: stretch;
|
774 |
+
justify-content: center;
|
775 |
+
}
|
776 |
+
.swal2-container.swal2-grow-row > .swal2-modal {
|
777 |
+
display: flex !important;
|
778 |
+
flex: 1;
|
779 |
+
align-content: center;
|
780 |
+
justify-content: center;
|
781 |
+
}
|
782 |
+
.swal2-container.swal2-grow-column {
|
783 |
+
flex: 1;
|
784 |
+
flex-direction: column;
|
785 |
+
}
|
786 |
+
.swal2-container.swal2-grow-column.swal2-top, .swal2-container.swal2-grow-column.swal2-center, .swal2-container.swal2-grow-column.swal2-bottom {
|
787 |
+
align-items: center;
|
788 |
+
}
|
789 |
+
.swal2-container.swal2-grow-column.swal2-top-start, .swal2-container.swal2-grow-column.swal2-center-start, .swal2-container.swal2-grow-column.swal2-bottom-start, .swal2-container.swal2-grow-column.swal2-top-left, .swal2-container.swal2-grow-column.swal2-center-left, .swal2-container.swal2-grow-column.swal2-bottom-left {
|
790 |
+
align-items: flex-start;
|
791 |
+
}
|
792 |
+
.swal2-container.swal2-grow-column.swal2-top-end, .swal2-container.swal2-grow-column.swal2-center-end, .swal2-container.swal2-grow-column.swal2-bottom-end, .swal2-container.swal2-grow-column.swal2-top-right, .swal2-container.swal2-grow-column.swal2-center-right, .swal2-container.swal2-grow-column.swal2-bottom-right {
|
793 |
+
align-items: flex-end;
|
794 |
+
}
|
795 |
+
.swal2-container.swal2-grow-column > .swal2-modal {
|
796 |
+
display: flex !important;
|
797 |
+
flex: 1;
|
798 |
+
align-content: center;
|
799 |
+
justify-content: center;
|
800 |
+
}
|
801 |
+
.swal2-container:not(.swal2-top):not(.swal2-top-start):not(.swal2-top-end):not(.swal2-top-left):not(.swal2-top-right):not(.swal2-center-start):not(.swal2-center-end):not(.swal2-center-left):not(.swal2-center-right):not(.swal2-bottom):not(.swal2-bottom-start):not(.swal2-bottom-end):not(.swal2-bottom-left):not(.swal2-bottom-right):not(.swal2-grow-fullscreen) > .swal2-modal {
|
802 |
+
margin: auto;
|
803 |
+
}
|
804 |
+
@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
|
805 |
+
.swal2-container .swal2-modal {
|
806 |
+
margin: 0 !important;
|
807 |
+
}
|
808 |
+
}
|
809 |
+
.swal2-container.swal2-fade {
|
810 |
+
transition: background-color 0.1s;
|
811 |
+
}
|
812 |
+
.swal2-container.swal2-shown {
|
813 |
+
background-color: rgba(0, 0, 0, 0.4);
|
814 |
+
}
|
815 |
+
|
816 |
+
.swal2-popup {
|
817 |
+
display: none;
|
818 |
+
position: relative;
|
819 |
+
box-sizing: border-box;
|
820 |
+
flex-direction: column;
|
821 |
+
justify-content: center;
|
822 |
+
width: 32em;
|
823 |
+
max-width: 100%;
|
824 |
+
padding: 1.25em;
|
825 |
+
border: none;
|
826 |
+
border-radius: 0.3125em;
|
827 |
+
background: #fff;
|
828 |
+
font-family: inherit;
|
829 |
+
font-size: 1rem;
|
830 |
+
}
|
831 |
+
.swal2-popup:focus {
|
832 |
+
outline: none;
|
833 |
+
}
|
834 |
+
.swal2-popup.swal2-loading {
|
835 |
+
overflow-y: hidden;
|
836 |
+
}
|
837 |
+
|
838 |
+
.swal2-header {
|
839 |
+
display: flex;
|
840 |
+
flex-direction: column;
|
841 |
+
align-items: center;
|
842 |
+
}
|
843 |
+
|
844 |
+
.swal2-title {
|
845 |
+
position: relative;
|
846 |
+
max-width: 100%;
|
847 |
+
margin: 0 0 0.4em;
|
848 |
+
padding: 0;
|
849 |
+
color: #595959;
|
850 |
+
font-size: 1.875em;
|
851 |
+
font-weight: 600;
|
852 |
+
text-align: center;
|
853 |
+
text-transform: none;
|
854 |
+
word-wrap: break-word;
|
855 |
+
}
|
856 |
+
|
857 |
+
.swal2-actions {
|
858 |
+
z-index: 1;
|
859 |
+
flex-wrap: wrap;
|
860 |
+
align-items: center;
|
861 |
+
justify-content: center;
|
862 |
+
width: 100%;
|
863 |
+
margin: 1.25em auto 0;
|
864 |
+
}
|
865 |
+
.swal2-actions:not(.swal2-loading) .swal2-styled[disabled] {
|
866 |
+
opacity: 0.4;
|
867 |
+
}
|
868 |
+
.swal2-actions:not(.swal2-loading) .swal2-styled:hover {
|
869 |
+
background-image: linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.1));
|
870 |
+
}
|
871 |
+
.swal2-actions:not(.swal2-loading) .swal2-styled:active {
|
872 |
+
background-image: linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2));
|
873 |
+
}
|
874 |
+
.swal2-actions.swal2-loading .swal2-styled.swal2-confirm {
|
875 |
+
box-sizing: border-box;
|
876 |
+
width: 2.5em;
|
877 |
+
height: 2.5em;
|
878 |
+
margin: 0.46875em;
|
879 |
+
padding: 0;
|
880 |
+
-webkit-animation: swal2-rotate-loading 1.5s linear 0s infinite normal;
|
881 |
+
animation: swal2-rotate-loading 1.5s linear 0s infinite normal;
|
882 |
+
border: 0.25em solid transparent;
|
883 |
+
border-radius: 100%;
|
884 |
+
border-color: transparent;
|
885 |
+
background-color: transparent !important;
|
886 |
+
color: transparent;
|
887 |
+
cursor: default;
|
888 |
+
-webkit-user-select: none;
|
889 |
+
-moz-user-select: none;
|
890 |
+
-ms-user-select: none;
|
891 |
+
user-select: none;
|
892 |
+
}
|
893 |
+
.swal2-actions.swal2-loading .swal2-styled.swal2-cancel {
|
894 |
+
margin-right: 30px;
|
895 |
+
margin-left: 30px;
|
896 |
+
}
|
897 |
+
.swal2-actions.swal2-loading :not(.swal2-styled).swal2-confirm::after {
|
898 |
+
content: "";
|
899 |
+
display: inline-block;
|
900 |
+
width: 15px;
|
901 |
+
height: 15px;
|
902 |
+
margin-left: 5px;
|
903 |
+
-webkit-animation: swal2-rotate-loading 1.5s linear 0s infinite normal;
|
904 |
+
animation: swal2-rotate-loading 1.5s linear 0s infinite normal;
|
905 |
+
border: 3px solid #999999;
|
906 |
+
border-radius: 50%;
|
907 |
+
border-right-color: transparent;
|
908 |
+
box-shadow: 1px 1px 1px #fff;
|
909 |
+
}
|
910 |
+
|
911 |
+
.swal2-styled {
|
912 |
+
margin: 0.3125em;
|
913 |
+
padding: 0.625em 2em;
|
914 |
+
box-shadow: none;
|
915 |
+
font-weight: 500;
|
916 |
+
}
|
917 |
+
.swal2-styled:not([disabled]) {
|
918 |
+
cursor: pointer;
|
919 |
+
}
|
920 |
+
.swal2-styled.swal2-confirm {
|
921 |
+
border: 0;
|
922 |
+
border-radius: 0.25em;
|
923 |
+
background: initial;
|
924 |
+
background-color: #3085d6;
|
925 |
+
color: #fff;
|
926 |
+
font-size: 1.0625em;
|
927 |
+
}
|
928 |
+
.swal2-styled.swal2-cancel {
|
929 |
+
border: 0;
|
930 |
+
border-radius: 0.25em;
|
931 |
+
background: initial;
|
932 |
+
background-color: #aaa;
|
933 |
+
color: #fff;
|
934 |
+
font-size: 1.0625em;
|
935 |
+
}
|
936 |
+
.swal2-styled:focus {
|
937 |
+
outline: none;
|
938 |
+
box-shadow: 0 0 0 2px #fff, 0 0 0 4px rgba(50, 100, 150, 0.4);
|
939 |
+
}
|
940 |
+
.swal2-styled::-moz-focus-inner {
|
941 |
+
border: 0;
|
942 |
+
}
|
943 |
+
|
944 |
+
.swal2-footer {
|
945 |
+
justify-content: center;
|
946 |
+
margin: 1.25em 0 0;
|
947 |
+
padding: 1em 0 0;
|
948 |
+
border-top: 1px solid #eee;
|
949 |
+
color: #545454;
|
950 |
+
font-size: 1em;
|
951 |
+
}
|
952 |
+
|
953 |
+
.swal2-image {
|
954 |
+
max-width: 100%;
|
955 |
+
margin: 1.25em auto;
|
956 |
+
}
|
957 |
+
|
958 |
+
.swal2-close {
|
959 |
+
position: absolute;
|
960 |
+
top: 0;
|
961 |
+
right: 0;
|
962 |
+
justify-content: center;
|
963 |
+
width: 1.2em;
|
964 |
+
height: 1.2em;
|
965 |
+
padding: 0;
|
966 |
+
overflow: hidden;
|
967 |
+
transition: color 0.1s ease-out;
|
968 |
+
border: none;
|
969 |
+
border-radius: 0;
|
970 |
+
outline: initial;
|
971 |
+
background: transparent;
|
972 |
+
color: #cccccc;
|
973 |
+
font-family: serif;
|
974 |
+
font-size: 2.5em;
|
975 |
+
line-height: 1.2;
|
976 |
+
cursor: pointer;
|
977 |
+
}
|
978 |
+
.swal2-close:hover {
|
979 |
+
-webkit-transform: none;
|
980 |
+
transform: none;
|
981 |
+
background: transparent;
|
982 |
+
color: #f27474;
|
983 |
+
}
|
984 |
+
|
985 |
+
> .swal2-input,
|
986 |
+
> .swal2-file,
|
987 |
+
> .swal2-textarea,
|
988 |
+
> .swal2-select,
|
989 |
+
> .swal2-radio,
|
990 |
+
> .swal2-checkbox {
|
991 |
+
display: none;
|
992 |
+
}
|
993 |
+
|
994 |
+
.swal2-content {
|
995 |
+
z-index: 1;
|
996 |
+
justify-content: center;
|
997 |
+
margin: 0;
|
998 |
+
padding: 0;
|
999 |
+
color: #545454;
|
1000 |
+
font-size: 1.125em;
|
1001 |
+
font-weight: 300;
|
1002 |
+
line-height: normal;
|
1003 |
+
word-wrap: break-word;
|
1004 |
+
}
|
1005 |
+
|
1006 |
+
#swal2-content {
|
1007 |
+
text-align: center;
|
1008 |
+
}
|
1009 |
+
|
1010 |
+
.swal2-input,
|
1011 |
+
.swal2-file,
|
1012 |
+
.swal2-textarea,
|
1013 |
+
.swal2-select,
|
1014 |
+
.swal2-radio,
|
1015 |
+
.swal2-checkbox {
|
1016 |
+
margin: 1em auto;
|
1017 |
+
}
|
1018 |
+
|
1019 |
+
.swal2-input,
|
1020 |
+
.swal2-file,
|
1021 |
+
.swal2-textarea {
|
1022 |
+
box-sizing: border-box;
|
1023 |
+
width: 100%;
|
1024 |
+
transition: border-color 0.3s, box-shadow 0.3s;
|
1025 |
+
border: 1px solid #d9d9d9;
|
1026 |
+
border-radius: 0.1875em;
|
1027 |
+
background: inherit;
|
1028 |
+
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.06);
|
1029 |
+
color: inherit;
|
1030 |
+
font-size: 1.125em;
|
1031 |
+
}
|
1032 |
+
.swal2-input.swal2-inputerror,
|
1033 |
+
.swal2-file.swal2-inputerror,
|
1034 |
+
.swal2-textarea.swal2-inputerror {
|
1035 |
+
border-color: #f27474 !important;
|
1036 |
+
box-shadow: 0 0 2px #f27474 !important;
|
1037 |
+
}
|
1038 |
+
.swal2-input:focus,
|
1039 |
+
.swal2-file:focus,
|
1040 |
+
.swal2-textarea:focus {
|
1041 |
+
border: 1px solid #b4dbed;
|
1042 |
+
outline: none;
|
1043 |
+
box-shadow: 0 0 3px #c4e6f5;
|
1044 |
+
}
|
1045 |
+
.swal2-input::-webkit-input-placeholder,
|
1046 |
+
.swal2-file::-webkit-input-placeholder,
|
1047 |
+
.swal2-textarea::-webkit-input-placeholder {
|
1048 |
+
color: #cccccc;
|
1049 |
+
}
|
1050 |
+
.swal2-input::-moz-placeholder,
|
1051 |
+
.swal2-file::-moz-placeholder,
|
1052 |
+
.swal2-textarea::-moz-placeholder {
|
1053 |
+
color: #cccccc;
|
1054 |
+
}
|
1055 |
+
.swal2-input:-ms-input-placeholder,
|
1056 |
+
.swal2-file:-ms-input-placeholder,
|
1057 |
+
.swal2-textarea:-ms-input-placeholder {
|
1058 |
+
color: #cccccc;
|
1059 |
+
}
|
1060 |
+
.swal2-input::-ms-input-placeholder,
|
1061 |
+
.swal2-file::-ms-input-placeholder,
|
1062 |
+
.swal2-textarea::-ms-input-placeholder {
|
1063 |
+
color: #cccccc;
|
1064 |
+
}
|
1065 |
+
.swal2-input::placeholder,
|
1066 |
+
.swal2-file::placeholder,
|
1067 |
+
.swal2-textarea::placeholder {
|
1068 |
+
color: #cccccc;
|
1069 |
+
}
|
1070 |
+
|
1071 |
+
.swal2-range {
|
1072 |
+
margin: 1em auto;
|
1073 |
+
background: inherit;
|
1074 |
+
}
|
1075 |
+
.swal2-range input {
|
1076 |
+
width: 80%;
|
1077 |
+
}
|
1078 |
+
.swal2-range output {
|
1079 |
+
width: 20%;
|
1080 |
+
color: inherit;
|
1081 |
+
font-weight: 600;
|
1082 |
+
text-align: center;
|
1083 |
+
}
|
1084 |
+
.swal2-range input,
|
1085 |
+
.swal2-range output {
|
1086 |
+
height: 2.625em;
|
1087 |
+
padding: 0;
|
1088 |
+
font-size: 1.125em;
|
1089 |
+
line-height: 2.625em;
|
1090 |
+
}
|
1091 |
+
|
1092 |
+
.swal2-input {
|
1093 |
+
height: 2.625em;
|
1094 |
+
padding: 0 0.75em;
|
1095 |
+
}
|
1096 |
+
.swal2-input[type=number] {
|
1097 |
+
max-width: 10em;
|
1098 |
+
}
|
1099 |
+
|
1100 |
+
.swal2-file {
|
1101 |
+
background: inherit;
|
1102 |
+
font-size: 1.125em;
|
1103 |
+
}
|
1104 |
+
|
1105 |
+
.swal2-textarea {
|
1106 |
+
height: 6.75em;
|
1107 |
+
padding: 0.75em;
|
1108 |
+
}
|
1109 |
+
|
1110 |
+
.swal2-select {
|
1111 |
+
min-width: 50%;
|
1112 |
+
max-width: 100%;
|
1113 |
+
padding: 0.375em 0.625em;
|
1114 |
+
background: inherit;
|
1115 |
+
color: inherit;
|
1116 |
+
font-size: 1.125em;
|
1117 |
+
}
|
1118 |
+
|
1119 |
+
.swal2-radio,
|
1120 |
+
.swal2-checkbox {
|
1121 |
+
align-items: center;
|
1122 |
+
justify-content: center;
|
1123 |
+
background: inherit;
|
1124 |
+
color: inherit;
|
1125 |
+
}
|
1126 |
+
.swal2-radio label,
|
1127 |
+
.swal2-checkbox label {
|
1128 |
+
margin: 0 0.6em;
|
1129 |
+
font-size: 1.125em;
|
1130 |
+
}
|
1131 |
+
.swal2-radio input,
|
1132 |
+
.swal2-checkbox input {
|
1133 |
+
margin: 0 0.4em;
|
1134 |
+
}
|
1135 |
+
|
1136 |
+
.swal2-validation-message {
|
1137 |
+
display: none;
|
1138 |
+
align-items: center;
|
1139 |
+
justify-content: center;
|
1140 |
+
padding: 0.625em;
|
1141 |
+
overflow: hidden;
|
1142 |
+
background: #f0f0f0;
|
1143 |
+
color: #666666;
|
1144 |
+
font-size: 1em;
|
1145 |
+
font-weight: 300;
|
1146 |
+
}
|
1147 |
+
.swal2-validation-message::before {
|
1148 |
+
content: "!";
|
1149 |
+
display: inline-block;
|
1150 |
+
width: 1.5em;
|
1151 |
+
min-width: 1.5em;
|
1152 |
+
height: 1.5em;
|
1153 |
+
margin: 0 0.625em;
|
1154 |
+
zoom: normal;
|
1155 |
+
border-radius: 50%;
|
1156 |
+
background-color: #f27474;
|
1157 |
+
color: #fff;
|
1158 |
+
font-weight: 600;
|
1159 |
+
line-height: 1.5em;
|
1160 |
+
text-align: center;
|
1161 |
+
}
|
1162 |
+
|
1163 |
+
@supports (-ms-accelerator: true) {
|
1164 |
+
.swal2-range input {
|
1165 |
+
width: 100% !important;
|
1166 |
+
}
|
1167 |
+
.swal2-range output {
|
1168 |
+
display: none;
|
1169 |
+
}
|
1170 |
+
}
|
1171 |
+
@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
|
1172 |
+
.swal2-range input {
|
1173 |
+
width: 100% !important;
|
1174 |
+
}
|
1175 |
+
.swal2-range output {
|
1176 |
+
display: none;
|
1177 |
+
}
|
1178 |
+
}
|
1179 |
+
@-moz-document url-prefix() {
|
1180 |
+
.swal2-close:focus {
|
1181 |
+
outline: 2px solid rgba(50, 100, 150, 0.4);
|
1182 |
+
}
|
1183 |
+
}
|
1184 |
+
.swal2-icon {
|
1185 |
+
position: relative;
|
1186 |
+
box-sizing: content-box;
|
1187 |
+
justify-content: center;
|
1188 |
+
width: 5em;
|
1189 |
+
height: 5em;
|
1190 |
+
margin: 1.25em auto 1.875em;
|
1191 |
+
zoom: normal;
|
1192 |
+
border: 0.25em solid transparent;
|
1193 |
+
border-radius: 50%;
|
1194 |
+
line-height: 5em;
|
1195 |
+
cursor: default;
|
1196 |
+
-webkit-user-select: none;
|
1197 |
+
-moz-user-select: none;
|
1198 |
+
-ms-user-select: none;
|
1199 |
+
user-select: none;
|
1200 |
+
}
|
1201 |
+
.swal2-icon::before {
|
1202 |
+
display: flex;
|
1203 |
+
align-items: center;
|
1204 |
+
height: 92%;
|
1205 |
+
font-size: 3.75em;
|
1206 |
+
}
|
1207 |
+
.swal2-icon.swal2-error {
|
1208 |
+
border-color: #f27474;
|
1209 |
+
}
|
1210 |
+
.swal2-icon.swal2-error .swal2-x-mark {
|
1211 |
+
position: relative;
|
1212 |
+
flex-grow: 1;
|
1213 |
+
}
|
1214 |
+
.swal2-icon.swal2-error [class^=swal2-x-mark-line] {
|
1215 |
+
display: block;
|
1216 |
+
position: absolute;
|
1217 |
+
top: 2.3125em;
|
1218 |
+
width: 2.9375em;
|
1219 |
+
height: 0.3125em;
|
1220 |
+
border-radius: 0.125em;
|
1221 |
+
background-color: #f27474;
|
1222 |
+
}
|
1223 |
+
.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left] {
|
1224 |
+
left: 1.0625em;
|
1225 |
+
-webkit-transform: rotate(45deg);
|
1226 |
+
transform: rotate(45deg);
|
1227 |
+
}
|
1228 |
+
.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right] {
|
1229 |
+
right: 1em;
|
1230 |
+
-webkit-transform: rotate(-45deg);
|
1231 |
+
transform: rotate(-45deg);
|
1232 |
+
}
|
1233 |
+
.swal2-icon.swal2-warning {
|
1234 |
+
border-color: #facea8;
|
1235 |
+
color: #f8bb86;
|
1236 |
+
}
|
1237 |
+
.swal2-icon.swal2-warning::before {
|
1238 |
+
content: "!";
|
1239 |
+
}
|
1240 |
+
.swal2-icon.swal2-info {
|
1241 |
+
border-color: #9de0f6;
|
1242 |
+
color: #3fc3ee;
|
1243 |
+
}
|
1244 |
+
.swal2-icon.swal2-info::before {
|
1245 |
+
content: "i";
|
1246 |
+
}
|
1247 |
+
.swal2-icon.swal2-question {
|
1248 |
+
border-color: #c9dae1;
|
1249 |
+
color: #87adbd;
|
1250 |
+
}
|
1251 |
+
.swal2-icon.swal2-question::before {
|
1252 |
+
content: "?";
|
1253 |
+
}
|
1254 |
+
.swal2-icon.swal2-question.swal2-arabic-question-mark::before {
|
1255 |
+
content: "؟";
|
1256 |
+
}
|
1257 |
+
.swal2-icon.swal2-success {
|
1258 |
+
border-color: #a5dc86;
|
1259 |
+
}
|
1260 |
+
.swal2-icon.swal2-success [class^=swal2-success-circular-line] {
|
1261 |
+
position: absolute;
|
1262 |
+
width: 3.75em;
|
1263 |
+
height: 7.5em;
|
1264 |
+
-webkit-transform: rotate(45deg);
|
1265 |
+
transform: rotate(45deg);
|
1266 |
+
border-radius: 50%;
|
1267 |
+
}
|
1268 |
+
.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=left] {
|
1269 |
+
top: -0.4375em;
|
1270 |
+
left: -2.0635em;
|
1271 |
+
-webkit-transform: rotate(-45deg);
|
1272 |
+
transform: rotate(-45deg);
|
1273 |
+
-webkit-transform-origin: 3.75em 3.75em;
|
1274 |
+
transform-origin: 3.75em 3.75em;
|
1275 |
+
border-radius: 7.5em 0 0 7.5em;
|
1276 |
+
}
|
1277 |
+
.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=right] {
|
1278 |
+
top: -0.6875em;
|
1279 |
+
left: 1.875em;
|
1280 |
+
-webkit-transform: rotate(-45deg);
|
1281 |
+
transform: rotate(-45deg);
|
1282 |
+
-webkit-transform-origin: 0 3.75em;
|
1283 |
+
transform-origin: 0 3.75em;
|
1284 |
+
border-radius: 0 7.5em 7.5em 0;
|
1285 |
+
}
|
1286 |
+
.swal2-icon.swal2-success .swal2-success-ring {
|
1287 |
+
position: absolute;
|
1288 |
+
z-index: 2;
|
1289 |
+
top: -0.25em;
|
1290 |
+
left: -0.25em;
|
1291 |
+
box-sizing: content-box;
|
1292 |
+
width: 100%;
|
1293 |
+
height: 100%;
|
1294 |
+
border: 0.25em solid rgba(165, 220, 134, 0.3);
|
1295 |
+
border-radius: 50%;
|
1296 |
+
}
|
1297 |
+
.swal2-icon.swal2-success .swal2-success-fix {
|
1298 |
+
position: absolute;
|
1299 |
+
z-index: 1;
|
1300 |
+
top: 0.5em;
|
1301 |
+
left: 1.625em;
|
1302 |
+
width: 0.4375em;
|
1303 |
+
height: 5.625em;
|
1304 |
+
-webkit-transform: rotate(-45deg);
|
1305 |
+
transform: rotate(-45deg);
|
1306 |
+
}
|
1307 |
+
.swal2-icon.swal2-success [class^=swal2-success-line] {
|
1308 |
+
display: block;
|
1309 |
+
position: absolute;
|
1310 |
+
z-index: 2;
|
1311 |
+
height: 0.3125em;
|
1312 |
+
border-radius: 0.125em;
|
1313 |
+
background-color: #a5dc86;
|
1314 |
+
}
|
1315 |
+
.swal2-icon.swal2-success [class^=swal2-success-line][class$=tip] {
|
1316 |
+
top: 2.875em;
|
1317 |
+
left: 0.875em;
|
1318 |
+
width: 1.5625em;
|
1319 |
+
-webkit-transform: rotate(45deg);
|
1320 |
+
transform: rotate(45deg);
|
1321 |
+
}
|
1322 |
+
.swal2-icon.swal2-success [class^=swal2-success-line][class$=long] {
|
1323 |
+
top: 2.375em;
|
1324 |
+
right: 0.5em;
|
1325 |
+
width: 2.9375em;
|
1326 |
+
-webkit-transform: rotate(-45deg);
|
1327 |
+
transform: rotate(-45deg);
|
1328 |
+
}
|
1329 |
+
|
1330 |
+
.swal2-progress-steps {
|
1331 |
+
align-items: center;
|
1332 |
+
margin: 0 0 1.25em;
|
1333 |
+
padding: 0;
|
1334 |
+
background: inherit;
|
1335 |
+
font-weight: 600;
|
1336 |
+
}
|
1337 |
+
.swal2-progress-steps li {
|
1338 |
+
display: inline-block;
|
1339 |
+
position: relative;
|
1340 |
+
}
|
1341 |
+
.swal2-progress-steps .swal2-progress-step {
|
1342 |
+
z-index: 20;
|
1343 |
+
width: 2em;
|
1344 |
+
height: 2em;
|
1345 |
+
border-radius: 2em;
|
1346 |
+
background: #3085d6;
|
1347 |
+
color: #fff;
|
1348 |
+
line-height: 2em;
|
1349 |
+
text-align: center;
|
1350 |
+
}
|
1351 |
+
.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step {
|
1352 |
+
background: #3085d6;
|
1353 |
+
}
|
1354 |
+
.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step ~ .swal2-progress-step {
|
1355 |
+
background: #add8e6;
|
1356 |
+
color: #fff;
|
1357 |
+
}
|
1358 |
+
.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step ~ .swal2-progress-step-line {
|
1359 |
+
background: #add8e6;
|
1360 |
+
}
|
1361 |
+
.swal2-progress-steps .swal2-progress-step-line {
|
1362 |
+
z-index: 10;
|
1363 |
+
width: 2.5em;
|
1364 |
+
height: 0.4em;
|
1365 |
+
margin: 0 -1px;
|
1366 |
+
background: #3085d6;
|
1367 |
+
}
|
1368 |
+
|
1369 |
+
[class^=swal2] {
|
1370 |
+
-webkit-tap-highlight-color: transparent;
|
1371 |
+
}
|
1372 |
+
|
1373 |
+
.swal2-show {
|
1374 |
+
-webkit-animation: swal2-show 0.3s;
|
1375 |
+
animation: swal2-show 0.3s;
|
1376 |
+
}
|
1377 |
+
.swal2-show.swal2-noanimation {
|
1378 |
+
-webkit-animation: none;
|
1379 |
+
animation: none;
|
1380 |
+
}
|
1381 |
+
|
1382 |
+
.swal2-hide {
|
1383 |
+
-webkit-animation: swal2-hide 0.15s forwards;
|
1384 |
+
animation: swal2-hide 0.15s forwards;
|
1385 |
+
}
|
1386 |
+
.swal2-hide.swal2-noanimation {
|
1387 |
+
-webkit-animation: none;
|
1388 |
+
animation: none;
|
1389 |
+
}
|
1390 |
+
|
1391 |
+
.swal2-rtl .swal2-close {
|
1392 |
+
right: auto;
|
1393 |
+
left: 0;
|
1394 |
+
}
|
1395 |
+
|
1396 |
+
.swal2-animate-success-icon .swal2-success-line-tip {
|
1397 |
+
-webkit-animation: swal2-animate-success-line-tip 0.75s;
|
1398 |
+
animation: swal2-animate-success-line-tip 0.75s;
|
1399 |
+
}
|
1400 |
+
.swal2-animate-success-icon .swal2-success-line-long {
|
1401 |
+
-webkit-animation: swal2-animate-success-line-long 0.75s;
|
1402 |
+
animation: swal2-animate-success-line-long 0.75s;
|
1403 |
+
}
|
1404 |
+
.swal2-animate-success-icon .swal2-success-circular-line-right {
|
1405 |
+
-webkit-animation: swal2-rotate-success-circular-line 4.25s ease-in;
|
1406 |
+
animation: swal2-rotate-success-circular-line 4.25s ease-in;
|
1407 |
+
}
|
1408 |
+
|
1409 |
+
.swal2-animate-error-icon {
|
1410 |
+
-webkit-animation: swal2-animate-error-icon 0.5s;
|
1411 |
+
animation: swal2-animate-error-icon 0.5s;
|
1412 |
+
}
|
1413 |
+
.swal2-animate-error-icon .swal2-x-mark {
|
1414 |
+
-webkit-animation: swal2-animate-error-x-mark 0.5s;
|
1415 |
+
animation: swal2-animate-error-x-mark 0.5s;
|
1416 |
+
}
|
1417 |
+
|
1418 |
+
@-webkit-keyframes swal2-rotate-loading {
|
1419 |
+
0% {
|
1420 |
+
-webkit-transform: rotate(0deg);
|
1421 |
+
transform: rotate(0deg);
|
1422 |
+
}
|
1423 |
+
100% {
|
1424 |
+
-webkit-transform: rotate(360deg);
|
1425 |
+
transform: rotate(360deg);
|
1426 |
+
}
|
1427 |
+
}
|
1428 |
+
|
1429 |
+
@keyframes swal2-rotate-loading {
|
1430 |
+
0% {
|
1431 |
+
-webkit-transform: rotate(0deg);
|
1432 |
+
transform: rotate(0deg);
|
1433 |
+
}
|
1434 |
+
100% {
|
1435 |
+
-webkit-transform: rotate(360deg);
|
1436 |
+
transform: rotate(360deg);
|
1437 |
+
}
|
1438 |
+
}
|
1439 |
+
@media print {
|
1440 |
+
body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) {
|
1441 |
+
overflow-y: scroll !important;
|
1442 |
+
}
|
1443 |
+
body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) > [aria-hidden=true] {
|
1444 |
+
display: none;
|
1445 |
+
}
|
1446 |
+
body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) .swal2-container {
|
1447 |
+
position: initial !important;
|
1448 |
+
}
|
1449 |
+
}
|
1450 |
+
|
1451 |
+
.ig-powered-by {
|
1452 |
+
font-size: 12px;
|
1453 |
+
}
|
classes/feedback/assets/js/sweetalert2.js
ADDED
@@ -0,0 +1,2765 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*!
|
2 |
+
* sweetalert2 v8.11.1
|
3 |
+
* Released under the MIT License.
|
4 |
+
*/
|
5 |
+
(function (global, factory) {
|
6 |
+
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
7 |
+
typeof define === 'function' && define.amd ? define(factory) :
|
8 |
+
(global.Sweetalert2 = factory());
|
9 |
+
}(this, (function () { 'use strict';
|
10 |
+
|
11 |
+
function _typeof(obj) {
|
12 |
+
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
13 |
+
_typeof = function (obj) {
|
14 |
+
return typeof obj;
|
15 |
+
};
|
16 |
+
} else {
|
17 |
+
_typeof = function (obj) {
|
18 |
+
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
19 |
+
};
|
20 |
+
}
|
21 |
+
|
22 |
+
return _typeof(obj);
|
23 |
+
}
|
24 |
+
|
25 |
+
function _classCallCheck(instance, Constructor) {
|
26 |
+
if (!(instance instanceof Constructor)) {
|
27 |
+
throw new TypeError("Cannot call a class as a function");
|
28 |
+
}
|
29 |
+
}
|
30 |
+
|
31 |
+
function _defineProperties(target, props) {
|
32 |
+
for (var i = 0; i < props.length; i++) {
|
33 |
+
var descriptor = props[i];
|
34 |
+
descriptor.enumerable = descriptor.enumerable || false;
|
35 |
+
descriptor.configurable = true;
|
36 |
+
if ("value" in descriptor) descriptor.writable = true;
|
37 |
+
Object.defineProperty(target, descriptor.key, descriptor);
|
38 |
+
}
|
39 |
+
}
|
40 |
+
|
41 |
+
function _createClass(Constructor, protoProps, staticProps) {
|
42 |
+
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
43 |
+
if (staticProps) _defineProperties(Constructor, staticProps);
|
44 |
+
return Constructor;
|
45 |
+
}
|
46 |
+
|
47 |
+
function _extends() {
|
48 |
+
_extends = Object.assign || function (target) {
|
49 |
+
for (var i = 1; i < arguments.length; i++) {
|
50 |
+
var source = arguments[i];
|
51 |
+
|
52 |
+
for (var key in source) {
|
53 |
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
54 |
+
target[key] = source[key];
|
55 |
+
}
|
56 |
+
}
|
57 |
+
}
|
58 |
+
|
59 |
+
return target;
|
60 |
+
};
|
61 |
+
|
62 |
+
return _extends.apply(this, arguments);
|
63 |
+
}
|
64 |
+
|
65 |
+
function _inherits(subClass, superClass) {
|
66 |
+
if (typeof superClass !== "function" && superClass !== null) {
|
67 |
+
throw new TypeError("Super expression must either be null or a function");
|
68 |
+
}
|
69 |
+
|
70 |
+
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
71 |
+
constructor: {
|
72 |
+
value: subClass,
|
73 |
+
writable: true,
|
74 |
+
configurable: true
|
75 |
+
}
|
76 |
+
});
|
77 |
+
if (superClass) _setPrototypeOf(subClass, superClass);
|
78 |
+
}
|
79 |
+
|
80 |
+
function _getPrototypeOf(o) {
|
81 |
+
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
|
82 |
+
return o.__proto__ || Object.getPrototypeOf(o);
|
83 |
+
};
|
84 |
+
return _getPrototypeOf(o);
|
85 |
+
}
|
86 |
+
|
87 |
+
function _setPrototypeOf(o, p) {
|
88 |
+
_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
|
89 |
+
o.__proto__ = p;
|
90 |
+
return o;
|
91 |
+
};
|
92 |
+
|
93 |
+
return _setPrototypeOf(o, p);
|
94 |
+
}
|
95 |
+
|
96 |
+
function isNativeReflectConstruct() {
|
97 |
+
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
98 |
+
if (Reflect.construct.sham) return false;
|
99 |
+
if (typeof Proxy === "function") return true;
|
100 |
+
|
101 |
+
try {
|
102 |
+
Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));
|
103 |
+
return true;
|
104 |
+
} catch (e) {
|
105 |
+
return false;
|
106 |
+
}
|
107 |
+
}
|
108 |
+
|
109 |
+
function _construct(Parent, args, Class) {
|
110 |
+
if (isNativeReflectConstruct()) {
|
111 |
+
_construct = Reflect.construct;
|
112 |
+
} else {
|
113 |
+
_construct = function _construct(Parent, args, Class) {
|
114 |
+
var a = [null];
|
115 |
+
a.push.apply(a, args);
|
116 |
+
var Constructor = Function.bind.apply(Parent, a);
|
117 |
+
var instance = new Constructor();
|
118 |
+
if (Class) _setPrototypeOf(instance, Class.prototype);
|
119 |
+
return instance;
|
120 |
+
};
|
121 |
+
}
|
122 |
+
|
123 |
+
return _construct.apply(null, arguments);
|
124 |
+
}
|
125 |
+
|
126 |
+
function _assertThisInitialized(self) {
|
127 |
+
if (self === void 0) {
|
128 |
+
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
129 |
+
}
|
130 |
+
|
131 |
+
return self;
|
132 |
+
}
|
133 |
+
|
134 |
+
function _possibleConstructorReturn(self, call) {
|
135 |
+
if (call && (typeof call === "object" || typeof call === "function")) {
|
136 |
+
return call;
|
137 |
+
}
|
138 |
+
|
139 |
+
return _assertThisInitialized(self);
|
140 |
+
}
|
141 |
+
|
142 |
+
function _superPropBase(object, property) {
|
143 |
+
while (!Object.prototype.hasOwnProperty.call(object, property)) {
|
144 |
+
object = _getPrototypeOf(object);
|
145 |
+
if (object === null) break;
|
146 |
+
}
|
147 |
+
|
148 |
+
return object;
|
149 |
+
}
|
150 |
+
|
151 |
+
function _get(target, property, receiver) {
|
152 |
+
if (typeof Reflect !== "undefined" && Reflect.get) {
|
153 |
+
_get = Reflect.get;
|
154 |
+
} else {
|
155 |
+
_get = function _get(target, property, receiver) {
|
156 |
+
var base = _superPropBase(target, property);
|
157 |
+
|
158 |
+
if (!base) return;
|
159 |
+
var desc = Object.getOwnPropertyDescriptor(base, property);
|
160 |
+
|
161 |
+
if (desc.get) {
|
162 |
+
return desc.get.call(receiver);
|
163 |
+
}
|
164 |
+
|
165 |
+
return desc.value;
|
166 |
+
};
|
167 |
+
}
|
168 |
+
|
169 |
+
return _get(target, property, receiver || target);
|
170 |
+
}
|
171 |
+
|
172 |
+
var consolePrefix = 'SweetAlert2:';
|
173 |
+
/**
|
174 |
+
* Filter the unique values into a new array
|
175 |
+
* @param arr
|
176 |
+
*/
|
177 |
+
|
178 |
+
var uniqueArray = function uniqueArray(arr) {
|
179 |
+
var result = [];
|
180 |
+
|
181 |
+
for (var i = 0; i < arr.length; i++) {
|
182 |
+
if (result.indexOf(arr[i]) === -1) {
|
183 |
+
result.push(arr[i]);
|
184 |
+
}
|
185 |
+
}
|
186 |
+
|
187 |
+
return result;
|
188 |
+
};
|
189 |
+
/**
|
190 |
+
* Returns the array ob object values (Object.values isn't supported in IE11)
|
191 |
+
* @param obj
|
192 |
+
*/
|
193 |
+
|
194 |
+
var objectValues = function objectValues(obj) {
|
195 |
+
return Object.keys(obj).map(function (key) {
|
196 |
+
return obj[key];
|
197 |
+
});
|
198 |
+
};
|
199 |
+
/**
|
200 |
+
* Convert NodeList to Array
|
201 |
+
* @param nodeList
|
202 |
+
*/
|
203 |
+
|
204 |
+
var toArray = function toArray(nodeList) {
|
205 |
+
return Array.prototype.slice.call(nodeList);
|
206 |
+
};
|
207 |
+
/**
|
208 |
+
* Standardise console warnings
|
209 |
+
* @param message
|
210 |
+
*/
|
211 |
+
|
212 |
+
var warn = function warn(message) {
|
213 |
+
console.warn("".concat(consolePrefix, " ").concat(message));
|
214 |
+
};
|
215 |
+
/**
|
216 |
+
* Standardise console errors
|
217 |
+
* @param message
|
218 |
+
*/
|
219 |
+
|
220 |
+
var error = function error(message) {
|
221 |
+
console.error("".concat(consolePrefix, " ").concat(message));
|
222 |
+
};
|
223 |
+
/**
|
224 |
+
* Private global state for `warnOnce`
|
225 |
+
* @type {Array}
|
226 |
+
* @private
|
227 |
+
*/
|
228 |
+
|
229 |
+
var previousWarnOnceMessages = [];
|
230 |
+
/**
|
231 |
+
* Show a console warning, but only if it hasn't already been shown
|
232 |
+
* @param message
|
233 |
+
*/
|
234 |
+
|
235 |
+
var warnOnce = function warnOnce(message) {
|
236 |
+
if (!(previousWarnOnceMessages.indexOf(message) !== -1)) {
|
237 |
+
previousWarnOnceMessages.push(message);
|
238 |
+
warn(message);
|
239 |
+
}
|
240 |
+
};
|
241 |
+
/**
|
242 |
+
* Show a one-time console warning about deprecated params/methods
|
243 |
+
*/
|
244 |
+
|
245 |
+
var warnAboutDepreation = function warnAboutDepreation(deprecatedParam, useInstead) {
|
246 |
+
warnOnce("\"".concat(deprecatedParam, "\" is deprecated and will be removed in the next major release. Please use \"").concat(useInstead, "\" instead."));
|
247 |
+
};
|
248 |
+
/**
|
249 |
+
* If `arg` is a function, call it (with no arguments or context) and return the result.
|
250 |
+
* Otherwise, just pass the value through
|
251 |
+
* @param arg
|
252 |
+
*/
|
253 |
+
|
254 |
+
var callIfFunction = function callIfFunction(arg) {
|
255 |
+
return typeof arg === 'function' ? arg() : arg;
|
256 |
+
};
|
257 |
+
var isPromise = function isPromise(arg) {
|
258 |
+
return arg && Promise.resolve(arg) === arg;
|
259 |
+
};
|
260 |
+
|
261 |
+
var DismissReason = Object.freeze({
|
262 |
+
cancel: 'cancel',
|
263 |
+
backdrop: 'backdrop',
|
264 |
+
close: 'close',
|
265 |
+
esc: 'esc',
|
266 |
+
timer: 'timer'
|
267 |
+
});
|
268 |
+
|
269 |
+
var argsToParams = function argsToParams(args) {
|
270 |
+
var params = {};
|
271 |
+
|
272 |
+
switch (_typeof(args[0])) {
|
273 |
+
case 'object':
|
274 |
+
_extends(params, args[0]);
|
275 |
+
|
276 |
+
break;
|
277 |
+
|
278 |
+
default:
|
279 |
+
['title', 'html', 'type'].forEach(function (name, index) {
|
280 |
+
switch (_typeof(args[index])) {
|
281 |
+
case 'string':
|
282 |
+
params[name] = args[index];
|
283 |
+
break;
|
284 |
+
|
285 |
+
case 'undefined':
|
286 |
+
break;
|
287 |
+
|
288 |
+
default:
|
289 |
+
error("Unexpected type of ".concat(name, "! Expected \"string\", got ").concat(_typeof(args[index])));
|
290 |
+
}
|
291 |
+
});
|
292 |
+
}
|
293 |
+
|
294 |
+
return params;
|
295 |
+
};
|
296 |
+
|
297 |
+
var swalPrefix = 'swal2-';
|
298 |
+
var prefix = function prefix(items) {
|
299 |
+
var result = {};
|
300 |
+
|
301 |
+
for (var i in items) {
|
302 |
+
result[items[i]] = swalPrefix + items[i];
|
303 |
+
}
|
304 |
+
|
305 |
+
return result;
|
306 |
+
};
|
307 |
+
var swalClasses = prefix(['container', 'shown', 'height-auto', 'iosfix', 'popup', 'modal', 'no-backdrop', 'toast', 'toast-shown', 'toast-column', 'fade', 'show', 'hide', 'noanimation', 'close', 'title', 'header', 'content', 'actions', 'confirm', 'cancel', 'footer', 'icon', 'image', 'input', 'file', 'range', 'select', 'radio', 'checkbox', 'label', 'textarea', 'inputerror', 'validation-message', 'progress-steps', 'active-progress-step', 'progress-step', 'progress-step-line', 'loading', 'styled', 'top', 'top-start', 'top-end', 'top-left', 'top-right', 'center', 'center-start', 'center-end', 'center-left', 'center-right', 'bottom', 'bottom-start', 'bottom-end', 'bottom-left', 'bottom-right', 'grow-row', 'grow-column', 'grow-fullscreen', 'rtl']);
|
308 |
+
var iconTypes = prefix(['success', 'warning', 'info', 'question', 'error']);
|
309 |
+
|
310 |
+
var states = {
|
311 |
+
previousBodyPadding: null
|
312 |
+
};
|
313 |
+
var hasClass = function hasClass(elem, className) {
|
314 |
+
return elem.classList.contains(className);
|
315 |
+
};
|
316 |
+
var applyCustomClass = function applyCustomClass(elem, customClass, className) {
|
317 |
+
// Clean up previous custom classes
|
318 |
+
toArray(elem.classList).forEach(function (className) {
|
319 |
+
if (!(objectValues(swalClasses).indexOf(className) !== -1) && !(objectValues(iconTypes).indexOf(className) !== -1)) {
|
320 |
+
elem.classList.remove(className);
|
321 |
+
}
|
322 |
+
});
|
323 |
+
|
324 |
+
if (customClass && customClass[className]) {
|
325 |
+
addClass(elem, customClass[className]);
|
326 |
+
}
|
327 |
+
};
|
328 |
+
function getInput(content, inputType) {
|
329 |
+
if (!inputType) {
|
330 |
+
return null;
|
331 |
+
}
|
332 |
+
|
333 |
+
switch (inputType) {
|
334 |
+
case 'select':
|
335 |
+
case 'textarea':
|
336 |
+
case 'file':
|
337 |
+
return getChildByClass(content, swalClasses[inputType]);
|
338 |
+
|
339 |
+
case 'checkbox':
|
340 |
+
return content.querySelector(".".concat(swalClasses.checkbox, " input"));
|
341 |
+
|
342 |
+
case 'radio':
|
343 |
+
return content.querySelector(".".concat(swalClasses.radio, " input:checked")) || content.querySelector(".".concat(swalClasses.radio, " input:first-child"));
|
344 |
+
|
345 |
+
case 'range':
|
346 |
+
return content.querySelector(".".concat(swalClasses.range, " input"));
|
347 |
+
|
348 |
+
default:
|
349 |
+
return getChildByClass(content, swalClasses.input);
|
350 |
+
}
|
351 |
+
}
|
352 |
+
var focusInput = function focusInput(input) {
|
353 |
+
input.focus(); // place cursor at end of text in text input
|
354 |
+
|
355 |
+
if (input.type !== 'file') {
|
356 |
+
// http://stackoverflow.com/a/2345915
|
357 |
+
var val = input.value;
|
358 |
+
input.value = '';
|
359 |
+
input.value = val;
|
360 |
+
}
|
361 |
+
};
|
362 |
+
var toggleClass = function toggleClass(target, classList, condition) {
|
363 |
+
if (!target || !classList) {
|
364 |
+
return;
|
365 |
+
}
|
366 |
+
|
367 |
+
if (typeof classList === 'string') {
|
368 |
+
classList = classList.split(/\s+/).filter(Boolean);
|
369 |
+
}
|
370 |
+
|
371 |
+
classList.forEach(function (className) {
|
372 |
+
if (target.forEach) {
|
373 |
+
target.forEach(function (elem) {
|
374 |
+
condition ? elem.classList.add(className) : elem.classList.remove(className);
|
375 |
+
});
|
376 |
+
} else {
|
377 |
+
condition ? target.classList.add(className) : target.classList.remove(className);
|
378 |
+
}
|
379 |
+
});
|
380 |
+
};
|
381 |
+
var addClass = function addClass(target, classList) {
|
382 |
+
toggleClass(target, classList, true);
|
383 |
+
};
|
384 |
+
var removeClass = function removeClass(target, classList) {
|
385 |
+
toggleClass(target, classList, false);
|
386 |
+
};
|
387 |
+
var getChildByClass = function getChildByClass(elem, className) {
|
388 |
+
for (var i = 0; i < elem.childNodes.length; i++) {
|
389 |
+
if (hasClass(elem.childNodes[i], className)) {
|
390 |
+
return elem.childNodes[i];
|
391 |
+
}
|
392 |
+
}
|
393 |
+
};
|
394 |
+
var applyNumericalStyle = function applyNumericalStyle(elem, property, value) {
|
395 |
+
if (value || parseInt(value) === 0) {
|
396 |
+
elem.style[property] = typeof value === 'number' ? value + 'px' : value;
|
397 |
+
} else {
|
398 |
+
elem.style.removeProperty(property);
|
399 |
+
}
|
400 |
+
};
|
401 |
+
var show = function show(elem) {
|
402 |
+
var display = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'flex';
|
403 |
+
elem.style.opacity = '';
|
404 |
+
elem.style.display = display;
|
405 |
+
};
|
406 |
+
var hide = function hide(elem) {
|
407 |
+
elem.style.opacity = '';
|
408 |
+
elem.style.display = 'none';
|
409 |
+
};
|
410 |
+
var toggle = function toggle(elem, condition, display) {
|
411 |
+
condition ? show(elem, display) : hide(elem);
|
412 |
+
}; // borrowed from jquery $(elem).is(':visible') implementation
|
413 |
+
|
414 |
+
var isVisible = function isVisible(elem) {
|
415 |
+
return !!(elem && (elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length));
|
416 |
+
}; // borrowed from https://stackoverflow.com/a/46352119
|
417 |
+
|
418 |
+
var hasCssAnimation = function hasCssAnimation(elem) {
|
419 |
+
var style = window.getComputedStyle(elem);
|
420 |
+
var animDuration = parseFloat(style.getPropertyValue('animation-duration') || '0');
|
421 |
+
var transDuration = parseFloat(style.getPropertyValue('transition-duration') || '0');
|
422 |
+
return animDuration > 0 || transDuration > 0;
|
423 |
+
};
|
424 |
+
var contains = function contains(haystack, needle) {
|
425 |
+
if (typeof haystack.contains === 'function') {
|
426 |
+
return haystack.contains(needle);
|
427 |
+
}
|
428 |
+
};
|
429 |
+
|
430 |
+
var getContainer = function getContainer() {
|
431 |
+
return document.body.querySelector('.' + swalClasses.container);
|
432 |
+
};
|
433 |
+
var elementBySelector = function elementBySelector(selectorString) {
|
434 |
+
var container = getContainer();
|
435 |
+
return container ? container.querySelector(selectorString) : null;
|
436 |
+
};
|
437 |
+
|
438 |
+
var elementByClass = function elementByClass(className) {
|
439 |
+
return elementBySelector('.' + className);
|
440 |
+
};
|
441 |
+
|
442 |
+
var getPopup = function getPopup() {
|
443 |
+
return elementByClass(swalClasses.popup);
|
444 |
+
};
|
445 |
+
var getIcons = function getIcons() {
|
446 |
+
var popup = getPopup();
|
447 |
+
return toArray(popup.querySelectorAll('.' + swalClasses.icon));
|
448 |
+
};
|
449 |
+
var getIcon = function getIcon() {
|
450 |
+
var visibleIcon = getIcons().filter(function (icon) {
|
451 |
+
return isVisible(icon);
|
452 |
+
});
|
453 |
+
return visibleIcon.length ? visibleIcon[0] : null;
|
454 |
+
};
|
455 |
+
var getTitle = function getTitle() {
|
456 |
+
return elementByClass(swalClasses.title);
|
457 |
+
};
|
458 |
+
var getContent = function getContent() {
|
459 |
+
return elementByClass(swalClasses.content);
|
460 |
+
};
|
461 |
+
var getImage = function getImage() {
|
462 |
+
return elementByClass(swalClasses.image);
|
463 |
+
};
|
464 |
+
var getProgressSteps = function getProgressSteps() {
|
465 |
+
return elementByClass(swalClasses['progress-steps']);
|
466 |
+
};
|
467 |
+
var getValidationMessage = function getValidationMessage() {
|
468 |
+
return elementByClass(swalClasses['validation-message']);
|
469 |
+
};
|
470 |
+
var getConfirmButton = function getConfirmButton() {
|
471 |
+
return elementBySelector('.' + swalClasses.actions + ' .' + swalClasses.confirm);
|
472 |
+
};
|
473 |
+
var getCancelButton = function getCancelButton() {
|
474 |
+
return elementBySelector('.' + swalClasses.actions + ' .' + swalClasses.cancel);
|
475 |
+
};
|
476 |
+
var getActions = function getActions() {
|
477 |
+
return elementByClass(swalClasses.actions);
|
478 |
+
};
|
479 |
+
var getHeader = function getHeader() {
|
480 |
+
return elementByClass(swalClasses.header);
|
481 |
+
};
|
482 |
+
var getFooter = function getFooter() {
|
483 |
+
return elementByClass(swalClasses.footer);
|
484 |
+
};
|
485 |
+
var getCloseButton = function getCloseButton() {
|
486 |
+
return elementByClass(swalClasses.close);
|
487 |
+
};
|
488 |
+
var getFocusableElements = function getFocusableElements() {
|
489 |
+
var focusableElementsWithTabindex = toArray(getPopup().querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])')) // sort according to tabindex
|
490 |
+
.sort(function (a, b) {
|
491 |
+
a = parseInt(a.getAttribute('tabindex'));
|
492 |
+
b = parseInt(b.getAttribute('tabindex'));
|
493 |
+
|
494 |
+
if (a > b) {
|
495 |
+
return 1;
|
496 |
+
} else if (a < b) {
|
497 |
+
return -1;
|
498 |
+
}
|
499 |
+
|
500 |
+
return 0;
|
501 |
+
}); // https://github.com/jkup/focusable/blob/master/index.js
|
502 |
+
|
503 |
+
var otherFocusableElements = toArray(getPopup().querySelectorAll('a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, [tabindex="0"], [contenteditable], audio[controls], video[controls]')).filter(function (el) {
|
504 |
+
return el.getAttribute('tabindex') !== '-1';
|
505 |
+
});
|
506 |
+
return uniqueArray(focusableElementsWithTabindex.concat(otherFocusableElements)).filter(function (el) {
|
507 |
+
return isVisible(el);
|
508 |
+
});
|
509 |
+
};
|
510 |
+
var isModal = function isModal() {
|
511 |
+
return !isToast() && !document.body.classList.contains(swalClasses['no-backdrop']);
|
512 |
+
};
|
513 |
+
var isToast = function isToast() {
|
514 |
+
return document.body.classList.contains(swalClasses['toast-shown']);
|
515 |
+
};
|
516 |
+
var isLoading = function isLoading() {
|
517 |
+
return getPopup().hasAttribute('data-loading');
|
518 |
+
};
|
519 |
+
|
520 |
+
// Detect Node env
|
521 |
+
var isNodeEnv = function isNodeEnv() {
|
522 |
+
return typeof window === 'undefined' || typeof document === 'undefined';
|
523 |
+
};
|
524 |
+
|
525 |
+
var sweetHTML = "\n <div aria-labelledby=\"".concat(swalClasses.title, "\" aria-describedby=\"").concat(swalClasses.content, "\" class=\"").concat(swalClasses.popup, "\" tabindex=\"-1\">\n <div class=\"").concat(swalClasses.header, "\">\n <ul class=\"").concat(swalClasses['progress-steps'], "\"></ul>\n <div class=\"").concat(swalClasses.icon, " ").concat(iconTypes.error, "\">\n <span class=\"swal2-x-mark\"><span class=\"swal2-x-mark-line-left\"></span><span class=\"swal2-x-mark-line-right\"></span></span>\n </div>\n <div class=\"").concat(swalClasses.icon, " ").concat(iconTypes.question, "\"></div>\n <div class=\"").concat(swalClasses.icon, " ").concat(iconTypes.warning, "\"></div>\n <div class=\"").concat(swalClasses.icon, " ").concat(iconTypes.info, "\"></div>\n <div class=\"").concat(swalClasses.icon, " ").concat(iconTypes.success, "\">\n <div class=\"swal2-success-circular-line-left\"></div>\n <span class=\"swal2-success-line-tip\"></span> <span class=\"swal2-success-line-long\"></span>\n <div class=\"swal2-success-ring\"></div> <div class=\"swal2-success-fix\"></div>\n <div class=\"swal2-success-circular-line-right\"></div>\n </div>\n <img class=\"").concat(swalClasses.image, "\" />\n <h2 class=\"").concat(swalClasses.title, "\" id=\"").concat(swalClasses.title, "\"></h2>\n <button type=\"button\" class=\"").concat(swalClasses.close, "\">×</button>\n </div>\n <div class=\"").concat(swalClasses.content, "\">\n <div id=\"").concat(swalClasses.content, "\"></div>\n <input class=\"").concat(swalClasses.input, "\" />\n <input type=\"file\" class=\"").concat(swalClasses.file, "\" />\n <div class=\"").concat(swalClasses.range, "\">\n <input type=\"range\" />\n <output></output>\n </div>\n <select class=\"").concat(swalClasses.select, "\"></select>\n <div class=\"").concat(swalClasses.radio, "\"></div>\n <label for=\"").concat(swalClasses.checkbox, "\" class=\"").concat(swalClasses.checkbox, "\">\n <input type=\"checkbox\" />\n <span class=\"").concat(swalClasses.label, "\"></span>\n </label>\n <textarea class=\"").concat(swalClasses.textarea, "\"></textarea>\n <div class=\"").concat(swalClasses['validation-message'], "\" id=\"").concat(swalClasses['validation-message'], "\"></div>\n </div>\n <div class=\"").concat(swalClasses.actions, "\">\n <button type=\"button\" class=\"").concat(swalClasses.confirm, "\">OK</button>\n <button type=\"button\" class=\"").concat(swalClasses.cancel, "\">Cancel</button>\n </div>\n <div class=\"").concat(swalClasses.footer, "\">\n </div>\n </div>\n").replace(/(^|\n)\s*/g, '');
|
526 |
+
|
527 |
+
var resetOldContainer = function resetOldContainer() {
|
528 |
+
var oldContainer = getContainer();
|
529 |
+
|
530 |
+
if (!oldContainer) {
|
531 |
+
return;
|
532 |
+
}
|
533 |
+
|
534 |
+
oldContainer.parentNode.removeChild(oldContainer);
|
535 |
+
removeClass([document.documentElement, document.body], [swalClasses['no-backdrop'], swalClasses['toast-shown'], swalClasses['has-column']]);
|
536 |
+
};
|
537 |
+
|
538 |
+
var oldInputVal; // IE11 workaround, see #1109 for details
|
539 |
+
|
540 |
+
var resetValidationMessage = function resetValidationMessage(e) {
|
541 |
+
if (Swal.isVisible() && oldInputVal !== e.target.value) {
|
542 |
+
Swal.resetValidationMessage();
|
543 |
+
}
|
544 |
+
|
545 |
+
oldInputVal = e.target.value;
|
546 |
+
};
|
547 |
+
|
548 |
+
var addInputChangeListeners = function addInputChangeListeners() {
|
549 |
+
var content = getContent();
|
550 |
+
var input = getChildByClass(content, swalClasses.input);
|
551 |
+
var file = getChildByClass(content, swalClasses.file);
|
552 |
+
var range = content.querySelector(".".concat(swalClasses.range, " input"));
|
553 |
+
var rangeOutput = content.querySelector(".".concat(swalClasses.range, " output"));
|
554 |
+
var select = getChildByClass(content, swalClasses.select);
|
555 |
+
var checkbox = content.querySelector(".".concat(swalClasses.checkbox, " input"));
|
556 |
+
var textarea = getChildByClass(content, swalClasses.textarea);
|
557 |
+
input.oninput = resetValidationMessage;
|
558 |
+
file.onchange = resetValidationMessage;
|
559 |
+
select.onchange = resetValidationMessage;
|
560 |
+
checkbox.onchange = resetValidationMessage;
|
561 |
+
textarea.oninput = resetValidationMessage;
|
562 |
+
|
563 |
+
range.oninput = function (e) {
|
564 |
+
resetValidationMessage(e);
|
565 |
+
rangeOutput.value = range.value;
|
566 |
+
};
|
567 |
+
|
568 |
+
range.onchange = function (e) {
|
569 |
+
resetValidationMessage(e);
|
570 |
+
range.nextSibling.value = range.value;
|
571 |
+
};
|
572 |
+
};
|
573 |
+
|
574 |
+
var getTarget = function getTarget(target) {
|
575 |
+
return typeof target === 'string' ? document.querySelector(target) : target;
|
576 |
+
};
|
577 |
+
|
578 |
+
var setupAccessibility = function setupAccessibility(params) {
|
579 |
+
var popup = getPopup();
|
580 |
+
popup.setAttribute('role', params.toast ? 'alert' : 'dialog');
|
581 |
+
popup.setAttribute('aria-live', params.toast ? 'polite' : 'assertive');
|
582 |
+
|
583 |
+
if (!params.toast) {
|
584 |
+
popup.setAttribute('aria-modal', 'true');
|
585 |
+
}
|
586 |
+
};
|
587 |
+
|
588 |
+
var setupRTL = function setupRTL(targetElement) {
|
589 |
+
if (window.getComputedStyle(targetElement).direction === 'rtl') {
|
590 |
+
addClass(getContainer(), swalClasses.rtl);
|
591 |
+
}
|
592 |
+
};
|
593 |
+
/*
|
594 |
+
* Add modal + backdrop to DOM
|
595 |
+
*/
|
596 |
+
|
597 |
+
|
598 |
+
var init = function init(params) {
|
599 |
+
// Clean up the old popup container if it exists
|
600 |
+
resetOldContainer();
|
601 |
+
/* istanbul ignore if */
|
602 |
+
|
603 |
+
if (isNodeEnv()) {
|
604 |
+
error('SweetAlert2 requires document to initialize');
|
605 |
+
return;
|
606 |
+
}
|
607 |
+
|
608 |
+
var container = document.createElement('div');
|
609 |
+
container.className = swalClasses.container;
|
610 |
+
container.innerHTML = sweetHTML;
|
611 |
+
var targetElement = getTarget(params.target);
|
612 |
+
targetElement.appendChild(container);
|
613 |
+
setupAccessibility(params);
|
614 |
+
setupRTL(targetElement);
|
615 |
+
addInputChangeListeners();
|
616 |
+
};
|
617 |
+
|
618 |
+
var parseHtmlToContainer = function parseHtmlToContainer(param, target) {
|
619 |
+
// DOM element
|
620 |
+
if (param instanceof HTMLElement) {
|
621 |
+
target.appendChild(param); // JQuery element(s)
|
622 |
+
} else if (_typeof(param) === 'object') {
|
623 |
+
handleJqueryElem(target, param); // Plain string
|
624 |
+
} else if (param) {
|
625 |
+
target.innerHTML = param;
|
626 |
+
}
|
627 |
+
};
|
628 |
+
|
629 |
+
var handleJqueryElem = function handleJqueryElem(target, elem) {
|
630 |
+
target.innerHTML = '';
|
631 |
+
|
632 |
+
if (0 in elem) {
|
633 |
+
for (var i = 0; i in elem; i++) {
|
634 |
+
target.appendChild(elem[i].cloneNode(true));
|
635 |
+
}
|
636 |
+
} else {
|
637 |
+
target.appendChild(elem.cloneNode(true));
|
638 |
+
}
|
639 |
+
};
|
640 |
+
|
641 |
+
var animationEndEvent = function () {
|
642 |
+
// Prevent run in Node env
|
643 |
+
|
644 |
+
/* istanbul ignore if */
|
645 |
+
if (isNodeEnv()) {
|
646 |
+
return false;
|
647 |
+
}
|
648 |
+
|
649 |
+
var testEl = document.createElement('div');
|
650 |
+
var transEndEventNames = {
|
651 |
+
'WebkitAnimation': 'webkitAnimationEnd',
|
652 |
+
'OAnimation': 'oAnimationEnd oanimationend',
|
653 |
+
'animation': 'animationend'
|
654 |
+
};
|
655 |
+
|
656 |
+
for (var i in transEndEventNames) {
|
657 |
+
if (transEndEventNames.hasOwnProperty(i) && typeof testEl.style[i] !== 'undefined') {
|
658 |
+
return transEndEventNames[i];
|
659 |
+
}
|
660 |
+
}
|
661 |
+
|
662 |
+
return false;
|
663 |
+
}();
|
664 |
+
|
665 |
+
// Measure width of scrollbar
|
666 |
+
// https://github.com/twbs/bootstrap/blob/master/js/modal.js#L279-L286
|
667 |
+
var measureScrollbar = function measureScrollbar() {
|
668 |
+
var supportsTouch = 'ontouchstart' in window || navigator.msMaxTouchPoints;
|
669 |
+
|
670 |
+
if (supportsTouch) {
|
671 |
+
return 0;
|
672 |
+
}
|
673 |
+
|
674 |
+
var scrollDiv = document.createElement('div');
|
675 |
+
scrollDiv.style.width = '50px';
|
676 |
+
scrollDiv.style.height = '50px';
|
677 |
+
scrollDiv.style.overflow = 'scroll';
|
678 |
+
document.body.appendChild(scrollDiv);
|
679 |
+
var scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth;
|
680 |
+
document.body.removeChild(scrollDiv);
|
681 |
+
return scrollbarWidth;
|
682 |
+
};
|
683 |
+
|
684 |
+
function handleButtonsStyling(confirmButton, cancelButton, params) {
|
685 |
+
addClass([confirmButton, cancelButton], swalClasses.styled); // Buttons background colors
|
686 |
+
|
687 |
+
if (params.confirmButtonColor) {
|
688 |
+
confirmButton.style.backgroundColor = params.confirmButtonColor;
|
689 |
+
}
|
690 |
+
|
691 |
+
if (params.cancelButtonColor) {
|
692 |
+
cancelButton.style.backgroundColor = params.cancelButtonColor;
|
693 |
+
} // Loading state
|
694 |
+
|
695 |
+
|
696 |
+
var confirmButtonBackgroundColor = window.getComputedStyle(confirmButton).getPropertyValue('background-color');
|
697 |
+
confirmButton.style.borderLeftColor = confirmButtonBackgroundColor;
|
698 |
+
confirmButton.style.borderRightColor = confirmButtonBackgroundColor;
|
699 |
+
}
|
700 |
+
|
701 |
+
function renderButton(button, buttonType, params) {
|
702 |
+
toggle(button, params['showC' + buttonType.substring(1) + 'Button'], 'inline-block');
|
703 |
+
button.innerHTML = params[buttonType + 'ButtonText']; // Set caption text
|
704 |
+
|
705 |
+
button.setAttribute('aria-label', params[buttonType + 'ButtonAriaLabel']); // ARIA label
|
706 |
+
// Add buttons custom classes
|
707 |
+
|
708 |
+
button.className = swalClasses[buttonType];
|
709 |
+
applyCustomClass(button, params.customClass, buttonType + 'Button');
|
710 |
+
addClass(button, params[buttonType + 'ButtonClass']);
|
711 |
+
}
|
712 |
+
|
713 |
+
var renderActions = function renderActions(instance, params) {
|
714 |
+
var actions = getActions();
|
715 |
+
var confirmButton = getConfirmButton();
|
716 |
+
var cancelButton = getCancelButton(); // Actions (buttons) wrapper
|
717 |
+
|
718 |
+
if (!params.showConfirmButton && !params.showCancelButton) {
|
719 |
+
hide(actions);
|
720 |
+
} else {
|
721 |
+
show(actions);
|
722 |
+
} // Custom class
|
723 |
+
|
724 |
+
|
725 |
+
applyCustomClass(actions, params.customClass, 'actions'); // Render confirm button
|
726 |
+
|
727 |
+
renderButton(confirmButton, 'confirm', params); // render Cancel Button
|
728 |
+
|
729 |
+
renderButton(cancelButton, 'cancel', params);
|
730 |
+
|
731 |
+
if (params.buttonsStyling) {
|
732 |
+
handleButtonsStyling(confirmButton, cancelButton, params);
|
733 |
+
} else {
|
734 |
+
removeClass([confirmButton, cancelButton], swalClasses.styled);
|
735 |
+
confirmButton.style.backgroundColor = confirmButton.style.borderLeftColor = confirmButton.style.borderRightColor = '';
|
736 |
+
cancelButton.style.backgroundColor = cancelButton.style.borderLeftColor = cancelButton.style.borderRightColor = '';
|
737 |
+
}
|
738 |
+
};
|
739 |
+
|
740 |
+
function handleBackdropParam(container, backdrop) {
|
741 |
+
if (typeof backdrop === 'string') {
|
742 |
+
container.style.background = backdrop;
|
743 |
+
} else if (!backdrop) {
|
744 |
+
addClass([document.documentElement, document.body], swalClasses['no-backdrop']);
|
745 |
+
}
|
746 |
+
}
|
747 |
+
|
748 |
+
function handlePositionParam(container, position) {
|
749 |
+
if (position in swalClasses) {
|
750 |
+
addClass(container, swalClasses[position]);
|
751 |
+
} else {
|
752 |
+
warn('The "position" parameter is not valid, defaulting to "center"');
|
753 |
+
addClass(container, swalClasses.center);
|
754 |
+
}
|
755 |
+
}
|
756 |
+
|
757 |
+
function handleGrowParam(container, grow) {
|
758 |
+
if (grow && typeof grow === 'string') {
|
759 |
+
var growClass = 'grow-' + grow;
|
760 |
+
|
761 |
+
if (growClass in swalClasses) {
|
762 |
+
addClass(container, swalClasses[growClass]);
|
763 |
+
}
|
764 |
+
}
|
765 |
+
}
|
766 |
+
|
767 |
+
var renderContainer = function renderContainer(instance, params) {
|
768 |
+
var container = getContainer();
|
769 |
+
|
770 |
+
if (!container) {
|
771 |
+
return;
|
772 |
+
}
|
773 |
+
|
774 |
+
handleBackdropParam(container, params.backdrop);
|
775 |
+
|
776 |
+
if (!params.backdrop && params.allowOutsideClick) {
|
777 |
+
warn('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`');
|
778 |
+
}
|
779 |
+
|
780 |
+
handlePositionParam(container, params.position);
|
781 |
+
handleGrowParam(container, params.grow); // Custom class
|
782 |
+
|
783 |
+
applyCustomClass(container, params.customClass, 'container');
|
784 |
+
|
785 |
+
if (params.customContainerClass) {
|
786 |
+
// @deprecated
|
787 |
+
addClass(container, params.customContainerClass);
|
788 |
+
}
|
789 |
+
};
|
790 |
+
|
791 |
+
/**
|
792 |
+
* This module containts `WeakMap`s for each effectively-"private property" that a `Swal` has.
|
793 |
+
* For example, to set the private property "foo" of `this` to "bar", you can `privateProps.foo.set(this, 'bar')`
|
794 |
+
* This is the approach that Babel will probably take to implement private methods/fields
|
795 |
+
* https://github.com/tc39/proposal-private-methods
|
796 |
+
* https://github.com/babel/babel/pull/7555
|
797 |
+
* Once we have the changes from that PR in Babel, and our core class fits reasonable in *one module*
|
798 |
+
* then we can use that language feature.
|
799 |
+
*/
|
800 |
+
var privateProps = {
|
801 |
+
promise: new WeakMap(),
|
802 |
+
innerParams: new WeakMap(),
|
803 |
+
domCache: new WeakMap()
|
804 |
+
};
|
805 |
+
|
806 |
+
var renderInput = function renderInput(instance, params) {
|
807 |
+
var innerParams = privateProps.innerParams.get(instance);
|
808 |
+
var rerender = !innerParams || params.input !== innerParams.input;
|
809 |
+
var content = getContent();
|
810 |
+
var inputTypes = ['input', 'file', 'range', 'select', 'radio', 'checkbox', 'textarea'];
|
811 |
+
|
812 |
+
for (var i = 0; i < inputTypes.length; i++) {
|
813 |
+
var inputClass = swalClasses[inputTypes[i]];
|
814 |
+
var inputContainer = getChildByClass(content, inputClass); // set attributes
|
815 |
+
|
816 |
+
setAttributes(inputTypes[i], params.inputAttributes); // set class
|
817 |
+
|
818 |
+
setClass(inputContainer, inputClass, params);
|
819 |
+
rerender && hide(inputContainer);
|
820 |
+
}
|
821 |
+
|
822 |
+
if (!params.input) {
|
823 |
+
return;
|
824 |
+
}
|
825 |
+
|
826 |
+
if (!renderInputType[params.input]) {
|
827 |
+
return error("Unexpected type of input! Expected \"text\", \"email\", \"password\", \"number\", \"tel\", \"select\", \"radio\", \"checkbox\", \"textarea\", \"file\" or \"url\", got \"".concat(params.input, "\""));
|
828 |
+
}
|
829 |
+
|
830 |
+
if (rerender) {
|
831 |
+
var input = renderInputType[params.input](params);
|
832 |
+
show(input);
|
833 |
+
}
|
834 |
+
};
|
835 |
+
|
836 |
+
var removeAttributes = function removeAttributes(input) {
|
837 |
+
for (var i = 0; i < input.attributes.length; i++) {
|
838 |
+
var attrName = input.attributes[i].name;
|
839 |
+
|
840 |
+
if (!(['type', 'value', 'style'].indexOf(attrName) !== -1)) {
|
841 |
+
input.removeAttribute(attrName);
|
842 |
+
}
|
843 |
+
}
|
844 |
+
};
|
845 |
+
|
846 |
+
var setAttributes = function setAttributes(inputType, inputAttributes) {
|
847 |
+
var input = getInput(getContent(), inputType);
|
848 |
+
|
849 |
+
if (!input) {
|
850 |
+
return;
|
851 |
+
}
|
852 |
+
|
853 |
+
removeAttributes(input);
|
854 |
+
|
855 |
+
for (var attr in inputAttributes) {
|
856 |
+
// Do not set a placeholder for <input type="range">
|
857 |
+
// it'll crash Edge, #1298
|
858 |
+
if (inputType === 'range' && attr === 'placeholder') {
|
859 |
+
continue;
|
860 |
+
}
|
861 |
+
|
862 |
+
input.setAttribute(attr, inputAttributes[attr]);
|
863 |
+
}
|
864 |
+
};
|
865 |
+
|
866 |
+
var setClass = function setClass(inputContainer, inputClass, params) {
|
867 |
+
inputContainer.className = inputClass;
|
868 |
+
|
869 |
+
if (params.inputClass) {
|
870 |
+
addClass(inputContainer, params.inputClass);
|
871 |
+
}
|
872 |
+
|
873 |
+
if (params.customClass) {
|
874 |
+
addClass(inputContainer, params.customClass.input);
|
875 |
+
}
|
876 |
+
};
|
877 |
+
|
878 |
+
var setInputPlaceholder = function setInputPlaceholder(input, params) {
|
879 |
+
if (!input.placeholder || params.inputPlaceholder) {
|
880 |
+
input.placeholder = params.inputPlaceholder;
|
881 |
+
}
|
882 |
+
};
|
883 |
+
|
884 |
+
var renderInputType = {};
|
885 |
+
|
886 |
+
renderInputType.text = renderInputType.email = renderInputType.password = renderInputType.number = renderInputType.tel = renderInputType.url = function (params) {
|
887 |
+
var input = getChildByClass(getContent(), swalClasses.input);
|
888 |
+
|
889 |
+
if (typeof params.inputValue === 'string' || typeof params.inputValue === 'number') {
|
890 |
+
input.value = params.inputValue;
|
891 |
+
} else if (!isPromise(params.inputValue)) {
|
892 |
+
warn("Unexpected type of inputValue! Expected \"string\", \"number\" or \"Promise\", got \"".concat(_typeof(params.inputValue), "\""));
|
893 |
+
}
|
894 |
+
|
895 |
+
setInputPlaceholder(input, params);
|
896 |
+
input.type = params.input;
|
897 |
+
return input;
|
898 |
+
};
|
899 |
+
|
900 |
+
renderInputType.file = function (params) {
|
901 |
+
var input = getChildByClass(getContent(), swalClasses.file);
|
902 |
+
setInputPlaceholder(input, params);
|
903 |
+
input.type = params.input;
|
904 |
+
return input;
|
905 |
+
};
|
906 |
+
|
907 |
+
renderInputType.range = function (params) {
|
908 |
+
var range = getChildByClass(getContent(), swalClasses.range);
|
909 |
+
var rangeInput = range.querySelector('input');
|
910 |
+
var rangeOutput = range.querySelector('output');
|
911 |
+
rangeInput.value = params.inputValue;
|
912 |
+
rangeInput.type = params.input;
|
913 |
+
rangeOutput.value = params.inputValue;
|
914 |
+
return range;
|
915 |
+
};
|
916 |
+
|
917 |
+
renderInputType.select = function (params) {
|
918 |
+
var select = getChildByClass(getContent(), swalClasses.select);
|
919 |
+
select.innerHTML = '';
|
920 |
+
|
921 |
+
if (params.inputPlaceholder) {
|
922 |
+
var placeholder = document.createElement('option');
|
923 |
+
placeholder.innerHTML = params.inputPlaceholder;
|
924 |
+
placeholder.value = '';
|
925 |
+
placeholder.disabled = true;
|
926 |
+
placeholder.selected = true;
|
927 |
+
select.appendChild(placeholder);
|
928 |
+
}
|
929 |
+
|
930 |
+
return select;
|
931 |
+
};
|
932 |
+
|
933 |
+
renderInputType.radio = function () {
|
934 |
+
var radio = getChildByClass(getContent(), swalClasses.radio);
|
935 |
+
radio.innerHTML = '';
|
936 |
+
return radio;
|
937 |
+
};
|
938 |
+
|
939 |
+
renderInputType.checkbox = function (params) {
|
940 |
+
var checkbox = getChildByClass(getContent(), swalClasses.checkbox);
|
941 |
+
var checkboxInput = getInput(getContent(), 'checkbox');
|
942 |
+
checkboxInput.type = 'checkbox';
|
943 |
+
checkboxInput.value = 1;
|
944 |
+
checkboxInput.id = swalClasses.checkbox;
|
945 |
+
checkboxInput.checked = Boolean(params.inputValue);
|
946 |
+
var label = checkbox.querySelector('span');
|
947 |
+
label.innerHTML = params.inputPlaceholder;
|
948 |
+
return checkbox;
|
949 |
+
};
|
950 |
+
|
951 |
+
renderInputType.textarea = function (params) {
|
952 |
+
var textarea = getChildByClass(getContent(), swalClasses.textarea);
|
953 |
+
textarea.value = params.inputValue;
|
954 |
+
setInputPlaceholder(textarea, params);
|
955 |
+
return textarea;
|
956 |
+
};
|
957 |
+
|
958 |
+
var renderContent = function renderContent(instance, params) {
|
959 |
+
var content = getContent().querySelector('#' + swalClasses.content); // Content as HTML
|
960 |
+
|
961 |
+
if (params.html) {
|
962 |
+
parseHtmlToContainer(params.html, content);
|
963 |
+
show(content, 'block'); // Content as plain text
|
964 |
+
} else if (params.text) {
|
965 |
+
content.textContent = params.text;
|
966 |
+
show(content, 'block'); // No content
|
967 |
+
} else {
|
968 |
+
hide(content);
|
969 |
+
}
|
970 |
+
|
971 |
+
renderInput(instance, params); // Custom class
|
972 |
+
|
973 |
+
applyCustomClass(getContent(), params.customClass, 'content');
|
974 |
+
};
|
975 |
+
|
976 |
+
var renderFooter = function renderFooter(instance, params) {
|
977 |
+
var footer = getFooter();
|
978 |
+
toggle(footer, params.footer);
|
979 |
+
|
980 |
+
if (params.footer) {
|
981 |
+
parseHtmlToContainer(params.footer, footer);
|
982 |
+
} // Custom class
|
983 |
+
|
984 |
+
|
985 |
+
applyCustomClass(footer, params.customClass, 'footer');
|
986 |
+
};
|
987 |
+
|
988 |
+
var renderCloseButton = function renderCloseButton(instance, params) {
|
989 |
+
var closeButton = getCloseButton(); // Custom class
|
990 |
+
|
991 |
+
applyCustomClass(closeButton, params.customClass, 'closeButton');
|
992 |
+
toggle(closeButton, params.showCloseButton);
|
993 |
+
closeButton.setAttribute('aria-label', params.closeButtonAriaLabel);
|
994 |
+
};
|
995 |
+
|
996 |
+
var renderIcon = function renderIcon(instance, params) {
|
997 |
+
var innerParams = privateProps.innerParams.get(instance); // if the icon with the given type already rendered,
|
998 |
+
// apply the custom class without re-rendering the icon
|
999 |
+
|
1000 |
+
if (innerParams && params.type === innerParams.type && getIcon()) {
|
1001 |
+
applyCustomClass(getIcon(), params.customClass, 'icon');
|
1002 |
+
return;
|
1003 |
+
}
|
1004 |
+
|
1005 |
+
hideAllIcons();
|
1006 |
+
|
1007 |
+
if (!params.type) {
|
1008 |
+
return;
|
1009 |
+
}
|
1010 |
+
|
1011 |
+
adjustSuccessIconBackgoundColor();
|
1012 |
+
|
1013 |
+
if (Object.keys(iconTypes).indexOf(params.type) !== -1) {
|
1014 |
+
var icon = elementBySelector(".".concat(swalClasses.icon, ".").concat(iconTypes[params.type]));
|
1015 |
+
show(icon); // Custom class
|
1016 |
+
|
1017 |
+
applyCustomClass(icon, params.customClass, 'icon'); // Animate icon
|
1018 |
+
|
1019 |
+
toggleClass(icon, "swal2-animate-".concat(params.type, "-icon"), params.animation);
|
1020 |
+
} else {
|
1021 |
+
error("Unknown type! Expected \"success\", \"error\", \"warning\", \"info\" or \"question\", got \"".concat(params.type, "\""));
|
1022 |
+
}
|
1023 |
+
};
|
1024 |
+
|
1025 |
+
var hideAllIcons = function hideAllIcons() {
|
1026 |
+
var icons = getIcons();
|
1027 |
+
|
1028 |
+
for (var i = 0; i < icons.length; i++) {
|
1029 |
+
hide(icons[i]);
|
1030 |
+
}
|
1031 |
+
}; // Adjust success icon background color to match the popup background color
|
1032 |
+
|
1033 |
+
|
1034 |
+
var adjustSuccessIconBackgoundColor = function adjustSuccessIconBackgoundColor() {
|
1035 |
+
var popup = getPopup();
|
1036 |
+
var popupBackgroundColor = window.getComputedStyle(popup).getPropertyValue('background-color');
|
1037 |
+
var successIconParts = popup.querySelectorAll('[class^=swal2-success-circular-line], .swal2-success-fix');
|
1038 |
+
|
1039 |
+
for (var i = 0; i < successIconParts.length; i++) {
|
1040 |
+
successIconParts[i].style.backgroundColor = popupBackgroundColor;
|
1041 |
+
}
|
1042 |
+
};
|
1043 |
+
|
1044 |
+
var renderImage = function renderImage(instance, params) {
|
1045 |
+
var image = getImage();
|
1046 |
+
|
1047 |
+
if (!params.imageUrl) {
|
1048 |
+
return hide(image);
|
1049 |
+
}
|
1050 |
+
|
1051 |
+
show(image); // Src, alt
|
1052 |
+
|
1053 |
+
image.setAttribute('src', params.imageUrl);
|
1054 |
+
image.setAttribute('alt', params.imageAlt); // Width, height
|
1055 |
+
|
1056 |
+
applyNumericalStyle(image, 'width', params.imageWidth);
|
1057 |
+
applyNumericalStyle(image, 'height', params.imageHeight); // Class
|
1058 |
+
|
1059 |
+
image.className = swalClasses.image;
|
1060 |
+
applyCustomClass(image, params.customClass, 'image');
|
1061 |
+
|
1062 |
+
if (params.imageClass) {
|
1063 |
+
addClass(image, params.imageClass);
|
1064 |
+
}
|
1065 |
+
};
|
1066 |
+
|
1067 |
+
var createStepElement = function createStepElement(step) {
|
1068 |
+
var stepEl = document.createElement('li');
|
1069 |
+
addClass(stepEl, swalClasses['progress-step']);
|
1070 |
+
stepEl.innerHTML = step;
|
1071 |
+
return stepEl;
|
1072 |
+
};
|
1073 |
+
|
1074 |
+
var createLineElement = function createLineElement(params) {
|
1075 |
+
var lineEl = document.createElement('li');
|
1076 |
+
addClass(lineEl, swalClasses['progress-step-line']);
|
1077 |
+
|
1078 |
+
if (params.progressStepsDistance) {
|
1079 |
+
lineEl.style.width = params.progressStepsDistance;
|
1080 |
+
}
|
1081 |
+
|
1082 |
+
return lineEl;
|
1083 |
+
};
|
1084 |
+
|
1085 |
+
var renderProgressSteps = function renderProgressSteps(instance, params) {
|
1086 |
+
var progressStepsContainer = getProgressSteps();
|
1087 |
+
|
1088 |
+
if (!params.progressSteps || params.progressSteps.length === 0) {
|
1089 |
+
return hide(progressStepsContainer);
|
1090 |
+
}
|
1091 |
+
|
1092 |
+
show(progressStepsContainer);
|
1093 |
+
progressStepsContainer.innerHTML = '';
|
1094 |
+
var currentProgressStep = parseInt(params.currentProgressStep === null ? Swal.getQueueStep() : params.currentProgressStep);
|
1095 |
+
|
1096 |
+
if (currentProgressStep >= params.progressSteps.length) {
|
1097 |
+
warn('Invalid currentProgressStep parameter, it should be less than progressSteps.length ' + '(currentProgressStep like JS arrays starts from 0)');
|
1098 |
+
}
|
1099 |
+
|
1100 |
+
params.progressSteps.forEach(function (step, index) {
|
1101 |
+
var stepEl = createStepElement(step);
|
1102 |
+
progressStepsContainer.appendChild(stepEl);
|
1103 |
+
|
1104 |
+
if (index === currentProgressStep) {
|
1105 |
+
addClass(stepEl, swalClasses['active-progress-step']);
|
1106 |
+
}
|
1107 |
+
|
1108 |
+
if (index !== params.progressSteps.length - 1) {
|
1109 |
+
var lineEl = createLineElement(step);
|
1110 |
+
progressStepsContainer.appendChild(lineEl);
|
1111 |
+
}
|
1112 |
+
});
|
1113 |
+
};
|
1114 |
+
|
1115 |
+
var renderTitle = function renderTitle(instance, params) {
|
1116 |
+
var title = getTitle();
|
1117 |
+
toggle(title, params.title || params.titleText);
|
1118 |
+
|
1119 |
+
if (params.title) {
|
1120 |
+
parseHtmlToContainer(params.title, title);
|
1121 |
+
}
|
1122 |
+
|
1123 |
+
if (params.titleText) {
|
1124 |
+
title.innerText = params.titleText;
|
1125 |
+
} // Custom class
|
1126 |
+
|
1127 |
+
|
1128 |
+
applyCustomClass(title, params.customClass, 'title');
|
1129 |
+
};
|
1130 |
+
|
1131 |
+
var renderHeader = function renderHeader(instance, params) {
|
1132 |
+
var header = getHeader(); // Custom class
|
1133 |
+
|
1134 |
+
applyCustomClass(header, params.customClass, 'header'); // Progress steps
|
1135 |
+
|
1136 |
+
renderProgressSteps(instance, params); // Icon
|
1137 |
+
|
1138 |
+
renderIcon(instance, params); // Image
|
1139 |
+
|
1140 |
+
renderImage(instance, params); // Title
|
1141 |
+
|
1142 |
+
renderTitle(instance, params); // Close button
|
1143 |
+
|
1144 |
+
renderCloseButton(instance, params);
|
1145 |
+
};
|
1146 |
+
|
1147 |
+
var renderPopup = function renderPopup(instance, params) {
|
1148 |
+
var popup = getPopup(); // Width
|
1149 |
+
|
1150 |
+
applyNumericalStyle(popup, 'width', params.width); // Padding
|
1151 |
+
|
1152 |
+
applyNumericalStyle(popup, 'padding', params.padding); // Background
|
1153 |
+
|
1154 |
+
if (params.background) {
|
1155 |
+
popup.style.background = params.background;
|
1156 |
+
} // Default Class
|
1157 |
+
|
1158 |
+
|
1159 |
+
popup.className = swalClasses.popup;
|
1160 |
+
|
1161 |
+
if (params.toast) {
|
1162 |
+
addClass([document.documentElement, document.body], swalClasses['toast-shown']);
|
1163 |
+
addClass(popup, swalClasses.toast);
|
1164 |
+
} else {
|
1165 |
+
addClass(popup, swalClasses.modal);
|
1166 |
+
} // Custom class
|
1167 |
+
|
1168 |
+
|
1169 |
+
applyCustomClass(popup, params.customClass, 'popup');
|
1170 |
+
|
1171 |
+
if (typeof params.customClass === 'string') {
|
1172 |
+
addClass(popup, params.customClass);
|
1173 |
+
} // CSS animation
|
1174 |
+
|
1175 |
+
|
1176 |
+
toggleClass(popup, swalClasses.noanimation, !params.animation);
|
1177 |
+
};
|
1178 |
+
|
1179 |
+
var render = function render(instance, params) {
|
1180 |
+
renderPopup(instance, params);
|
1181 |
+
renderContainer(instance, params);
|
1182 |
+
renderHeader(instance, params);
|
1183 |
+
renderContent(instance, params);
|
1184 |
+
renderActions(instance, params);
|
1185 |
+
renderFooter(instance, params);
|
1186 |
+
};
|
1187 |
+
|
1188 |
+
/*
|
1189 |
+
* Global function to determine if SweetAlert2 popup is shown
|
1190 |
+
*/
|
1191 |
+
|
1192 |
+
var isVisible$1 = function isVisible$$1() {
|
1193 |
+
return isVisible(getPopup());
|
1194 |
+
};
|
1195 |
+
/*
|
1196 |
+
* Global function to click 'Confirm' button
|
1197 |
+
*/
|
1198 |
+
|
1199 |
+
var clickConfirm = function clickConfirm() {
|
1200 |
+
return getConfirmButton() && getConfirmButton().click();
|
1201 |
+
};
|
1202 |
+
/*
|
1203 |
+
* Global function to click 'Cancel' button
|
1204 |
+
*/
|
1205 |
+
|
1206 |
+
var clickCancel = function clickCancel() {
|
1207 |
+
return getCancelButton() && getCancelButton().click();
|
1208 |
+
};
|
1209 |
+
|
1210 |
+
function fire() {
|
1211 |
+
var Swal = this;
|
1212 |
+
|
1213 |
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
1214 |
+
args[_key] = arguments[_key];
|
1215 |
+
}
|
1216 |
+
|
1217 |
+
return _construct(Swal, args);
|
1218 |
+
}
|
1219 |
+
|
1220 |
+
/**
|
1221 |
+
* Returns an extended version of `Swal` containing `params` as defaults.
|
1222 |
+
* Useful for reusing Swal configuration.
|
1223 |
+
*
|
1224 |
+
* For example:
|
1225 |
+
*
|
1226 |
+
* Before:
|
1227 |
+
* const textPromptOptions = { input: 'text', showCancelButton: true }
|
1228 |
+
* const {value: firstName} = await Swal.fire({ ...textPromptOptions, title: 'What is your first name?' })
|
1229 |
+
* const {value: lastName} = await Swal.fire({ ...textPromptOptions, title: 'What is your last name?' })
|
1230 |
+
*
|
1231 |
+
* After:
|
1232 |
+
* const TextPrompt = Swal.mixin({ input: 'text', showCancelButton: true })
|
1233 |
+
* const {value: firstName} = await TextPrompt('What is your first name?')
|
1234 |
+
* const {value: lastName} = await TextPrompt('What is your last name?')
|
1235 |
+
*
|
1236 |
+
* @param mixinParams
|
1237 |
+
*/
|
1238 |
+
function mixin(mixinParams) {
|
1239 |
+
var MixinSwal =
|
1240 |
+
/*#__PURE__*/
|
1241 |
+
function (_this) {
|
1242 |
+
_inherits(MixinSwal, _this);
|
1243 |
+
|
1244 |
+
function MixinSwal() {
|
1245 |
+
_classCallCheck(this, MixinSwal);
|
1246 |
+
|
1247 |
+
return _possibleConstructorReturn(this, _getPrototypeOf(MixinSwal).apply(this, arguments));
|
1248 |
+
}
|
1249 |
+
|
1250 |
+
_createClass(MixinSwal, [{
|
1251 |
+
key: "_main",
|
1252 |
+
value: function _main(params) {
|
1253 |
+
return _get(_getPrototypeOf(MixinSwal.prototype), "_main", this).call(this, _extends({}, mixinParams, params));
|
1254 |
+
}
|
1255 |
+
}]);
|
1256 |
+
|
1257 |
+
return MixinSwal;
|
1258 |
+
}(this);
|
1259 |
+
|
1260 |
+
return MixinSwal;
|
1261 |
+
}
|
1262 |
+
|
1263 |
+
// private global state for the queue feature
|
1264 |
+
var currentSteps = [];
|
1265 |
+
/*
|
1266 |
+
* Global function for chaining sweetAlert popups
|
1267 |
+
*/
|
1268 |
+
|
1269 |
+
var queue = function queue(steps) {
|
1270 |
+
var Swal = this;
|
1271 |
+
currentSteps = steps;
|
1272 |
+
|
1273 |
+
var resetAndResolve = function resetAndResolve(resolve, value) {
|
1274 |
+
currentSteps = [];
|
1275 |
+
document.body.removeAttribute('data-swal2-queue-step');
|
1276 |
+
resolve(value);
|
1277 |
+
};
|
1278 |
+
|
1279 |
+
var queueResult = [];
|
1280 |
+
return new Promise(function (resolve) {
|
1281 |
+
(function step(i, callback) {
|
1282 |
+
if (i < currentSteps.length) {
|
1283 |
+
document.body.setAttribute('data-swal2-queue-step', i);
|
1284 |
+
Swal.fire(currentSteps[i]).then(function (result) {
|
1285 |
+
if (typeof result.value !== 'undefined') {
|
1286 |
+
queueResult.push(result.value);
|
1287 |
+
step(i + 1, callback);
|
1288 |
+
} else {
|
1289 |
+
resetAndResolve(resolve, {
|
1290 |
+
dismiss: result.dismiss
|
1291 |
+
});
|
1292 |
+
}
|
1293 |
+
});
|
1294 |
+
} else {
|
1295 |
+
resetAndResolve(resolve, {
|
1296 |
+
value: queueResult
|
1297 |
+
});
|
1298 |
+
}
|
1299 |
+
})(0);
|
1300 |
+
});
|
1301 |
+
};
|
1302 |
+
/*
|
1303 |
+
* Global function for getting the index of current popup in queue
|
1304 |
+
*/
|
1305 |
+
|
1306 |
+
var getQueueStep = function getQueueStep() {
|
1307 |
+
return document.body.getAttribute('data-swal2-queue-step');
|
1308 |
+
};
|
1309 |
+
/*
|
1310 |
+
* Global function for inserting a popup to the queue
|
1311 |
+
*/
|
1312 |
+
|
1313 |
+
var insertQueueStep = function insertQueueStep(step, index) {
|
1314 |
+
if (index && index < currentSteps.length) {
|
1315 |
+
return currentSteps.splice(index, 0, step);
|
1316 |
+
}
|
1317 |
+
|
1318 |
+
return currentSteps.push(step);
|
1319 |
+
};
|
1320 |
+
/*
|
1321 |
+
* Global function for deleting a popup from the queue
|
1322 |
+
*/
|
1323 |
+
|
1324 |
+
var deleteQueueStep = function deleteQueueStep(index) {
|
1325 |
+
if (typeof currentSteps[index] !== 'undefined') {
|
1326 |
+
currentSteps.splice(index, 1);
|
1327 |
+
}
|
1328 |
+
};
|
1329 |
+
|
1330 |
+
/**
|
1331 |
+
* Show spinner instead of Confirm button and disable Cancel button
|
1332 |
+
*/
|
1333 |
+
|
1334 |
+
var showLoading = function showLoading() {
|
1335 |
+
var popup = getPopup();
|
1336 |
+
|
1337 |
+
if (!popup) {
|
1338 |
+
Swal.fire('');
|
1339 |
+
}
|
1340 |
+
|
1341 |
+
popup = getPopup();
|
1342 |
+
var actions = getActions();
|
1343 |
+
var confirmButton = getConfirmButton();
|
1344 |
+
var cancelButton = getCancelButton();
|
1345 |
+
show(actions);
|
1346 |
+
show(confirmButton);
|
1347 |
+
addClass([popup, actions], swalClasses.loading);
|
1348 |
+
confirmButton.disabled = true;
|
1349 |
+
cancelButton.disabled = true;
|
1350 |
+
popup.setAttribute('data-loading', true);
|
1351 |
+
popup.setAttribute('aria-busy', true);
|
1352 |
+
popup.focus();
|
1353 |
+
};
|
1354 |
+
|
1355 |
+
var RESTORE_FOCUS_TIMEOUT = 100;
|
1356 |
+
|
1357 |
+
var globalState = {};
|
1358 |
+
var focusPreviousActiveElement = function focusPreviousActiveElement() {
|
1359 |
+
if (globalState.previousActiveElement && globalState.previousActiveElement.focus) {
|
1360 |
+
globalState.previousActiveElement.focus();
|
1361 |
+
globalState.previousActiveElement = null;
|
1362 |
+
} else if (document.body) {
|
1363 |
+
document.body.focus();
|
1364 |
+
}
|
1365 |
+
}; // Restore previous active (focused) element
|
1366 |
+
|
1367 |
+
|
1368 |
+
var restoreActiveElement = function restoreActiveElement() {
|
1369 |
+
return new Promise(function (resolve) {
|
1370 |
+
var x = window.scrollX;
|
1371 |
+
var y = window.scrollY;
|
1372 |
+
globalState.restoreFocusTimeout = setTimeout(function () {
|
1373 |
+
focusPreviousActiveElement();
|
1374 |
+
resolve();
|
1375 |
+
}, RESTORE_FOCUS_TIMEOUT); // issues/900
|
1376 |
+
|
1377 |
+
if (typeof x !== 'undefined' && typeof y !== 'undefined') {
|
1378 |
+
// IE doesn't have scrollX/scrollY support
|
1379 |
+
window.scrollTo(x, y);
|
1380 |
+
}
|
1381 |
+
});
|
1382 |
+
};
|
1383 |
+
|
1384 |
+
/**
|
1385 |
+
* If `timer` parameter is set, returns number of milliseconds of timer remained.
|
1386 |
+
* Otherwise, returns undefined.
|
1387 |
+
*/
|
1388 |
+
|
1389 |
+
var getTimerLeft = function getTimerLeft() {
|
1390 |
+
return globalState.timeout && globalState.timeout.getTimerLeft();
|
1391 |
+
};
|
1392 |
+
/**
|
1393 |
+
* Stop timer. Returns number of milliseconds of timer remained.
|
1394 |
+
* If `timer` parameter isn't set, returns undefined.
|
1395 |
+
*/
|
1396 |
+
|
1397 |
+
var stopTimer = function stopTimer() {
|
1398 |
+
return globalState.timeout && globalState.timeout.stop();
|
1399 |
+
};
|
1400 |
+
/**
|
1401 |
+
* Resume timer. Returns number of milliseconds of timer remained.
|
1402 |
+
* If `timer` parameter isn't set, returns undefined.
|
1403 |
+
*/
|
1404 |
+
|
1405 |
+
var resumeTimer = function resumeTimer() {
|
1406 |
+
return globalState.timeout && globalState.timeout.start();
|
1407 |
+
};
|
1408 |
+
/**
|
1409 |
+
* Resume timer. Returns number of milliseconds of timer remained.
|
1410 |
+
* If `timer` parameter isn't set, returns undefined.
|
1411 |
+
*/
|
1412 |
+
|
1413 |
+
var toggleTimer = function toggleTimer() {
|
1414 |
+
var timer = globalState.timeout;
|
1415 |
+
return timer && (timer.running ? timer.stop() : timer.start());
|
1416 |
+
};
|
1417 |
+
/**
|
1418 |
+
* Increase timer. Returns number of milliseconds of an updated timer.
|
1419 |
+
* If `timer` parameter isn't set, returns undefined.
|
1420 |
+
*/
|
1421 |
+
|
1422 |
+
var increaseTimer = function increaseTimer(n) {
|
1423 |
+
return globalState.timeout && globalState.timeout.increase(n);
|
1424 |
+
};
|
1425 |
+
/**
|
1426 |
+
* Check if timer is running. Returns true if timer is running
|
1427 |
+
* or false if timer is paused or stopped.
|
1428 |
+
* If `timer` parameter isn't set, returns undefined
|
1429 |
+
*/
|
1430 |
+
|
1431 |
+
var isTimerRunning = function isTimerRunning() {
|
1432 |
+
return globalState.timeout && globalState.timeout.isRunning();
|
1433 |
+
};
|
1434 |
+
|
1435 |
+
var defaultParams = {
|
1436 |
+
title: '',
|
1437 |
+
titleText: '',
|
1438 |
+
text: '',
|
1439 |
+
html: '',
|
1440 |
+
footer: '',
|
1441 |
+
type: null,
|
1442 |
+
toast: false,
|
1443 |
+
customClass: '',
|
1444 |
+
customContainerClass: '',
|
1445 |
+
target: 'body',
|
1446 |
+
backdrop: true,
|
1447 |
+
animation: true,
|
1448 |
+
heightAuto: true,
|
1449 |
+
allowOutsideClick: true,
|
1450 |
+
allowEscapeKey: true,
|
1451 |
+
allowEnterKey: true,
|
1452 |
+
stopKeydownPropagation: true,
|
1453 |
+
keydownListenerCapture: false,
|
1454 |
+
showConfirmButton: true,
|
1455 |
+
showCancelButton: false,
|
1456 |
+
preConfirm: null,
|
1457 |
+
confirmButtonText: 'OK',
|
1458 |
+
confirmButtonAriaLabel: '',
|
1459 |
+
confirmButtonColor: null,
|
1460 |
+
confirmButtonClass: '',
|
1461 |
+
cancelButtonText: 'Cancel',
|
1462 |
+
cancelButtonAriaLabel: '',
|
1463 |
+
cancelButtonColor: null,
|
1464 |
+
cancelButtonClass: '',
|
1465 |
+
buttonsStyling: true,
|
1466 |
+
reverseButtons: false,
|
1467 |
+
focusConfirm: true,
|
1468 |
+
focusCancel: false,
|
1469 |
+
showCloseButton: false,
|
1470 |
+
closeButtonAriaLabel: 'Close this dialog',
|
1471 |
+
showLoaderOnConfirm: false,
|
1472 |
+
imageUrl: null,
|
1473 |
+
imageWidth: null,
|
1474 |
+
imageHeight: null,
|
1475 |
+
imageAlt: '',
|
1476 |
+
imageClass: '',
|
1477 |
+
timer: null,
|
1478 |
+
width: null,
|
1479 |
+
padding: null,
|
1480 |
+
background: null,
|
1481 |
+
input: null,
|
1482 |
+
inputPlaceholder: '',
|
1483 |
+
inputValue: '',
|
1484 |
+
inputOptions: {},
|
1485 |
+
inputAutoTrim: true,
|
1486 |
+
inputClass: '',
|
1487 |
+
inputAttributes: {},
|
1488 |
+
inputValidator: null,
|
1489 |
+
validationMessage: null,
|
1490 |
+
grow: false,
|
1491 |
+
position: 'center',
|
1492 |
+
progressSteps: [],
|
1493 |
+
currentProgressStep: null,
|
1494 |
+
progressStepsDistance: null,
|
1495 |
+
onBeforeOpen: null,
|
1496 |
+
onAfterClose: null,
|
1497 |
+
onOpen: null,
|
1498 |
+
onClose: null,
|
1499 |
+
scrollbarPadding: true
|
1500 |
+
};
|
1501 |
+
var updatableParams = ['title', 'titleText', 'text', 'html', 'type', 'customClass', 'showConfirmButton', 'showCancelButton', 'confirmButtonText', 'confirmButtonAriaLabel', 'confirmButtonColor', 'confirmButtonClass', 'cancelButtonText', 'cancelButtonAriaLabel', 'cancelButtonColor', 'cancelButtonClass', 'buttonsStyling', 'reverseButtons', 'imageUrl', 'imageWidth', 'imageHeigth', 'imageAlt', 'imageClass', 'progressSteps', 'currentProgressStep'];
|
1502 |
+
var deprecatedParams = {
|
1503 |
+
customContainerClass: 'customClass',
|
1504 |
+
confirmButtonClass: 'customClass',
|
1505 |
+
cancelButtonClass: 'customClass',
|
1506 |
+
imageClass: 'customClass',
|
1507 |
+
inputClass: 'customClass'
|
1508 |
+
};
|
1509 |
+
var toastIncompatibleParams = ['allowOutsideClick', 'allowEnterKey', 'backdrop', 'focusConfirm', 'focusCancel', 'heightAuto', 'keydownListenerCapture'];
|
1510 |
+
/**
|
1511 |
+
* Is valid parameter
|
1512 |
+
* @param {String} paramName
|
1513 |
+
*/
|
1514 |
+
|
1515 |
+
var isValidParameter = function isValidParameter(paramName) {
|
1516 |
+
return defaultParams.hasOwnProperty(paramName);
|
1517 |
+
};
|
1518 |
+
/**
|
1519 |
+
* Is valid parameter for Swal.update() method
|
1520 |
+
* @param {String} paramName
|
1521 |
+
*/
|
1522 |
+
|
1523 |
+
var isUpdatableParameter = function isUpdatableParameter(paramName) {
|
1524 |
+
return updatableParams.indexOf(paramName) !== -1;
|
1525 |
+
};
|
1526 |
+
/**
|
1527 |
+
* Is deprecated parameter
|
1528 |
+
* @param {String} paramName
|
1529 |
+
*/
|
1530 |
+
|
1531 |
+
var isDeprecatedParameter = function isDeprecatedParameter(paramName) {
|
1532 |
+
return deprecatedParams[paramName];
|
1533 |
+
};
|
1534 |
+
|
1535 |
+
var checkIfParamIsValid = function checkIfParamIsValid(param) {
|
1536 |
+
if (!isValidParameter(param)) {
|
1537 |
+
warn("Unknown parameter \"".concat(param, "\""));
|
1538 |
+
}
|
1539 |
+
};
|
1540 |
+
|
1541 |
+
var checkIfToastParamIsValid = function checkIfToastParamIsValid(param) {
|
1542 |
+
if (toastIncompatibleParams.indexOf(param) !== -1) {
|
1543 |
+
warn("The parameter \"".concat(param, "\" is incompatible with toasts"));
|
1544 |
+
}
|
1545 |
+
};
|
1546 |
+
|
1547 |
+
var checkIfParamIsDeprecated = function checkIfParamIsDeprecated(param) {
|
1548 |
+
if (isDeprecatedParameter(param)) {
|
1549 |
+
warnAboutDepreation(param, isDeprecatedParameter(param));
|
1550 |
+
}
|
1551 |
+
};
|
1552 |
+
/**
|
1553 |
+
* Show relevant warnings for given params
|
1554 |
+
*
|
1555 |
+
* @param params
|
1556 |
+
*/
|
1557 |
+
|
1558 |
+
|
1559 |
+
var showWarningsForParams = function showWarningsForParams(params) {
|
1560 |
+
for (var param in params) {
|
1561 |
+
checkIfParamIsValid(param);
|
1562 |
+
|
1563 |
+
if (params.toast) {
|
1564 |
+
checkIfToastParamIsValid(param);
|
1565 |
+
}
|
1566 |
+
|
1567 |
+
checkIfParamIsDeprecated();
|
1568 |
+
}
|
1569 |
+
};
|
1570 |
+
|
1571 |
+
|
1572 |
+
|
1573 |
+
var staticMethods = Object.freeze({
|
1574 |
+
isValidParameter: isValidParameter,
|
1575 |
+
isUpdatableParameter: isUpdatableParameter,
|
1576 |
+
isDeprecatedParameter: isDeprecatedParameter,
|
1577 |
+
argsToParams: argsToParams,
|
1578 |
+
isVisible: isVisible$1,
|
1579 |
+
clickConfirm: clickConfirm,
|
1580 |
+
clickCancel: clickCancel,
|
1581 |
+
getContainer: getContainer,
|
1582 |
+
getPopup: getPopup,
|
1583 |
+
getTitle: getTitle,
|
1584 |
+
getContent: getContent,
|
1585 |
+
getImage: getImage,
|
1586 |
+
getIcon: getIcon,
|
1587 |
+
getIcons: getIcons,
|
1588 |
+
getCloseButton: getCloseButton,
|
1589 |
+
getActions: getActions,
|
1590 |
+
getConfirmButton: getConfirmButton,
|
1591 |
+
getCancelButton: getCancelButton,
|
1592 |
+
getHeader: getHeader,
|
1593 |
+
getFooter: getFooter,
|
1594 |
+
getFocusableElements: getFocusableElements,
|
1595 |
+
getValidationMessage: getValidationMessage,
|
1596 |
+
isLoading: isLoading,
|
1597 |
+
fire: fire,
|
1598 |
+
mixin: mixin,
|
1599 |
+
queue: queue,
|
1600 |
+
getQueueStep: getQueueStep,
|
1601 |
+
insertQueueStep: insertQueueStep,
|
1602 |
+
deleteQueueStep: deleteQueueStep,
|
1603 |
+
showLoading: showLoading,
|
1604 |
+
enableLoading: showLoading,
|
1605 |
+
getTimerLeft: getTimerLeft,
|
1606 |
+
stopTimer: stopTimer,
|
1607 |
+
resumeTimer: resumeTimer,
|
1608 |
+
toggleTimer: toggleTimer,
|
1609 |
+
increaseTimer: increaseTimer,
|
1610 |
+
isTimerRunning: isTimerRunning
|
1611 |
+
});
|
1612 |
+
|
1613 |
+
/**
|
1614 |
+
* Enables buttons and hide loader.
|
1615 |
+
*/
|
1616 |
+
|
1617 |
+
function hideLoading() {
|
1618 |
+
var innerParams = privateProps.innerParams.get(this);
|
1619 |
+
var domCache = privateProps.domCache.get(this);
|
1620 |
+
|
1621 |
+
if (!innerParams.showConfirmButton) {
|
1622 |
+
hide(domCache.confirmButton);
|
1623 |
+
|
1624 |
+
if (!innerParams.showCancelButton) {
|
1625 |
+
hide(domCache.actions);
|
1626 |
+
}
|
1627 |
+
}
|
1628 |
+
|
1629 |
+
removeClass([domCache.popup, domCache.actions], swalClasses.loading);
|
1630 |
+
domCache.popup.removeAttribute('aria-busy');
|
1631 |
+
domCache.popup.removeAttribute('data-loading');
|
1632 |
+
domCache.confirmButton.disabled = false;
|
1633 |
+
domCache.cancelButton.disabled = false;
|
1634 |
+
}
|
1635 |
+
|
1636 |
+
function getInput$1(instance) {
|
1637 |
+
var innerParams = privateProps.innerParams.get(instance || this);
|
1638 |
+
var domCache = privateProps.domCache.get(instance || this);
|
1639 |
+
return getInput(domCache.content, innerParams.input);
|
1640 |
+
}
|
1641 |
+
|
1642 |
+
var fixScrollbar = function fixScrollbar() {
|
1643 |
+
// for queues, do not do this more than once
|
1644 |
+
if (states.previousBodyPadding !== null) {
|
1645 |
+
return;
|
1646 |
+
} // if the body has overflow
|
1647 |
+
|
1648 |
+
|
1649 |
+
if (document.body.scrollHeight > window.innerHeight) {
|
1650 |
+
// add padding so the content doesn't shift after removal of scrollbar
|
1651 |
+
states.previousBodyPadding = parseInt(window.getComputedStyle(document.body).getPropertyValue('padding-right'));
|
1652 |
+
document.body.style.paddingRight = states.previousBodyPadding + measureScrollbar() + 'px';
|
1653 |
+
}
|
1654 |
+
};
|
1655 |
+
var undoScrollbar = function undoScrollbar() {
|
1656 |
+
if (states.previousBodyPadding !== null) {
|
1657 |
+
document.body.style.paddingRight = states.previousBodyPadding + 'px';
|
1658 |
+
states.previousBodyPadding = null;
|
1659 |
+
}
|
1660 |
+
};
|
1661 |
+
|
1662 |
+
/* istanbul ignore next */
|
1663 |
+
|
1664 |
+
var iOSfix = function iOSfix() {
|
1665 |
+
var iOS = /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream;
|
1666 |
+
|
1667 |
+
if (iOS && !hasClass(document.body, swalClasses.iosfix)) {
|
1668 |
+
var offset = document.body.scrollTop;
|
1669 |
+
document.body.style.top = offset * -1 + 'px';
|
1670 |
+
addClass(document.body, swalClasses.iosfix);
|
1671 |
+
}
|
1672 |
+
};
|
1673 |
+
/* istanbul ignore next */
|
1674 |
+
|
1675 |
+
var undoIOSfix = function undoIOSfix() {
|
1676 |
+
if (hasClass(document.body, swalClasses.iosfix)) {
|
1677 |
+
var offset = parseInt(document.body.style.top, 10);
|
1678 |
+
removeClass(document.body, swalClasses.iosfix);
|
1679 |
+
document.body.style.top = '';
|
1680 |
+
document.body.scrollTop = offset * -1;
|
1681 |
+
}
|
1682 |
+
};
|
1683 |
+
|
1684 |
+
var isIE11 = function isIE11() {
|
1685 |
+
return !!window.MSInputMethodContext && !!document.documentMode;
|
1686 |
+
}; // Fix IE11 centering sweetalert2/issues/933
|
1687 |
+
|
1688 |
+
/* istanbul ignore next */
|
1689 |
+
|
1690 |
+
|
1691 |
+
var fixVerticalPositionIE = function fixVerticalPositionIE() {
|
1692 |
+
var container = getContainer();
|
1693 |
+
var popup = getPopup();
|
1694 |
+
container.style.removeProperty('align-items');
|
1695 |
+
|
1696 |
+
if (popup.offsetTop < 0) {
|
1697 |
+
container.style.alignItems = 'flex-start';
|
1698 |
+
}
|
1699 |
+
};
|
1700 |
+
/* istanbul ignore next */
|
1701 |
+
|
1702 |
+
|
1703 |
+
var IEfix = function IEfix() {
|
1704 |
+
if (typeof window !== 'undefined' && isIE11()) {
|
1705 |
+
fixVerticalPositionIE();
|
1706 |
+
window.addEventListener('resize', fixVerticalPositionIE);
|
1707 |
+
}
|
1708 |
+
};
|
1709 |
+
/* istanbul ignore next */
|
1710 |
+
|
1711 |
+
var undoIEfix = function undoIEfix() {
|
1712 |
+
if (typeof window !== 'undefined' && isIE11()) {
|
1713 |
+
window.removeEventListener('resize', fixVerticalPositionIE);
|
1714 |
+
}
|
1715 |
+
};
|
1716 |
+
|
1717 |
+
// Adding aria-hidden="true" to elements outside of the active modal dialog ensures that
|
1718 |
+
// elements not within the active modal dialog will not be surfaced if a user opens a screen
|
1719 |
+
// reader’s list of elements (headings, form controls, landmarks, etc.) in the document.
|
1720 |
+
|
1721 |
+
var setAriaHidden = function setAriaHidden() {
|
1722 |
+
var bodyChildren = toArray(document.body.children);
|
1723 |
+
bodyChildren.forEach(function (el) {
|
1724 |
+
if (el === getContainer() || contains(el, getContainer())) {
|
1725 |
+
return;
|
1726 |
+
}
|
1727 |
+
|
1728 |
+
if (el.hasAttribute('aria-hidden')) {
|
1729 |
+
el.setAttribute('data-previous-aria-hidden', el.getAttribute('aria-hidden'));
|
1730 |
+
}
|
1731 |
+
|
1732 |
+
el.setAttribute('aria-hidden', 'true');
|
1733 |
+
});
|
1734 |
+
};
|
1735 |
+
var unsetAriaHidden = function unsetAriaHidden() {
|
1736 |
+
var bodyChildren = toArray(document.body.children);
|
1737 |
+
bodyChildren.forEach(function (el) {
|
1738 |
+
if (el.hasAttribute('data-previous-aria-hidden')) {
|
1739 |
+
el.setAttribute('aria-hidden', el.getAttribute('data-previous-aria-hidden'));
|
1740 |
+
el.removeAttribute('data-previous-aria-hidden');
|
1741 |
+
} else {
|
1742 |
+
el.removeAttribute('aria-hidden');
|
1743 |
+
}
|
1744 |
+
});
|
1745 |
+
};
|
1746 |
+
|
1747 |
+
/**
|
1748 |
+
* This module containts `WeakMap`s for each effectively-"private property" that a `Swal` has.
|
1749 |
+
* For example, to set the private property "foo" of `this` to "bar", you can `privateProps.foo.set(this, 'bar')`
|
1750 |
+
* This is the approach that Babel will probably take to implement private methods/fields
|
1751 |
+
* https://github.com/tc39/proposal-private-methods
|
1752 |
+
* https://github.com/babel/babel/pull/7555
|
1753 |
+
* Once we have the changes from that PR in Babel, and our core class fits reasonable in *one module*
|
1754 |
+
* then we can use that language feature.
|
1755 |
+
*/
|
1756 |
+
var privateMethods = {
|
1757 |
+
swalPromiseResolve: new WeakMap()
|
1758 |
+
};
|
1759 |
+
|
1760 |
+
/*
|
1761 |
+
* Instance method to close sweetAlert
|
1762 |
+
*/
|
1763 |
+
|
1764 |
+
function removePopupAndResetState(container, isToast, onAfterClose) {
|
1765 |
+
if (isToast) {
|
1766 |
+
triggerOnAfterClose(onAfterClose);
|
1767 |
+
} else {
|
1768 |
+
restoreActiveElement().then(function () {
|
1769 |
+
return triggerOnAfterClose(onAfterClose);
|
1770 |
+
});
|
1771 |
+
globalState.keydownTarget.removeEventListener('keydown', globalState.keydownHandler, {
|
1772 |
+
capture: globalState.keydownListenerCapture
|
1773 |
+
});
|
1774 |
+
globalState.keydownHandlerAdded = false;
|
1775 |
+
} // Unset globalState props so GC will dispose globalState (#1569)
|
1776 |
+
|
1777 |
+
|
1778 |
+
delete globalState.keydownHandler;
|
1779 |
+
delete globalState.keydownTarget;
|
1780 |
+
|
1781 |
+
if (container.parentNode) {
|
1782 |
+
container.parentNode.removeChild(container);
|
1783 |
+
}
|
1784 |
+
|
1785 |
+
removeBodyClasses();
|
1786 |
+
|
1787 |
+
if (isModal()) {
|
1788 |
+
undoScrollbar();
|
1789 |
+
undoIOSfix();
|
1790 |
+
undoIEfix();
|
1791 |
+
unsetAriaHidden();
|
1792 |
+
}
|
1793 |
+
}
|
1794 |
+
|
1795 |
+
function removeBodyClasses() {
|
1796 |
+
removeClass([document.documentElement, document.body], [swalClasses.shown, swalClasses['height-auto'], swalClasses['no-backdrop'], swalClasses['toast-shown'], swalClasses['toast-column']]);
|
1797 |
+
}
|
1798 |
+
|
1799 |
+
function swalCloseEventFinished(popup, container, isToast, onAfterClose) {
|
1800 |
+
popup.removeEventListener(animationEndEvent, swalCloseEventFinished);
|
1801 |
+
|
1802 |
+
if (hasClass(popup, swalClasses.hide)) {
|
1803 |
+
removePopupAndResetState(container, isToast, onAfterClose);
|
1804 |
+
} // Unset WeakMaps so GC will be able to dispose them (#1569)
|
1805 |
+
|
1806 |
+
|
1807 |
+
unsetWeakMaps(privateProps);
|
1808 |
+
unsetWeakMaps(privateMethods);
|
1809 |
+
}
|
1810 |
+
|
1811 |
+
function close(resolveValue) {
|
1812 |
+
var container = getContainer();
|
1813 |
+
var popup = getPopup();
|
1814 |
+
|
1815 |
+
if (!popup || hasClass(popup, swalClasses.hide)) {
|
1816 |
+
return;
|
1817 |
+
}
|
1818 |
+
|
1819 |
+
var innerParams = privateProps.innerParams.get(this);
|
1820 |
+
var swalPromiseResolve = privateMethods.swalPromiseResolve.get(this);
|
1821 |
+
var onClose = innerParams.onClose;
|
1822 |
+
var onAfterClose = innerParams.onAfterClose;
|
1823 |
+
removeClass(popup, swalClasses.show);
|
1824 |
+
addClass(popup, swalClasses.hide); // If animation is supported, animate
|
1825 |
+
|
1826 |
+
if (animationEndEvent && hasCssAnimation(popup)) {
|
1827 |
+
popup.addEventListener(animationEndEvent, swalCloseEventFinished.bind(null, popup, container, isToast(), onAfterClose));
|
1828 |
+
} else {
|
1829 |
+
// Otherwise, remove immediately
|
1830 |
+
removePopupAndResetState(container, isToast(), onAfterClose);
|
1831 |
+
}
|
1832 |
+
|
1833 |
+
if (onClose !== null && typeof onClose === 'function') {
|
1834 |
+
onClose(popup);
|
1835 |
+
} // Resolve Swal promise
|
1836 |
+
|
1837 |
+
|
1838 |
+
swalPromiseResolve(resolveValue || {}); // Unset this.params so GC will dispose it (#1569)
|
1839 |
+
|
1840 |
+
delete this.params;
|
1841 |
+
}
|
1842 |
+
|
1843 |
+
var unsetWeakMaps = function unsetWeakMaps(obj) {
|
1844 |
+
for (var i in obj) {
|
1845 |
+
obj[i] = new WeakMap();
|
1846 |
+
}
|
1847 |
+
};
|
1848 |
+
|
1849 |
+
var triggerOnAfterClose = function triggerOnAfterClose(onAfterClose) {
|
1850 |
+
if (onAfterClose !== null && typeof onAfterClose === 'function') {
|
1851 |
+
setTimeout(function () {
|
1852 |
+
onAfterClose();
|
1853 |
+
});
|
1854 |
+
}
|
1855 |
+
};
|
1856 |
+
|
1857 |
+
function setButtonsDisabled(instance, buttons, disabled) {
|
1858 |
+
var domCache = privateProps.domCache.get(instance);
|
1859 |
+
buttons.forEach(function (button) {
|
1860 |
+
domCache[button].disabled = disabled;
|
1861 |
+
});
|
1862 |
+
}
|
1863 |
+
|
1864 |
+
function setInputDisabled(input, disabled) {
|
1865 |
+
if (!input) {
|
1866 |
+
return false;
|
1867 |
+
}
|
1868 |
+
|
1869 |
+
if (input.type === 'radio') {
|
1870 |
+
var radiosContainer = input.parentNode.parentNode;
|
1871 |
+
var radios = radiosContainer.querySelectorAll('input');
|
1872 |
+
|
1873 |
+
for (var i = 0; i < radios.length; i++) {
|
1874 |
+
radios[i].disabled = disabled;
|
1875 |
+
}
|
1876 |
+
} else {
|
1877 |
+
input.disabled = disabled;
|
1878 |
+
}
|
1879 |
+
}
|
1880 |
+
|
1881 |
+
function enableButtons() {
|
1882 |
+
setButtonsDisabled(this, ['confirmButton', 'cancelButton'], false);
|
1883 |
+
}
|
1884 |
+
function disableButtons() {
|
1885 |
+
setButtonsDisabled(this, ['confirmButton', 'cancelButton'], true);
|
1886 |
+
} // @deprecated
|
1887 |
+
|
1888 |
+
function enableConfirmButton() {
|
1889 |
+
warnAboutDepreation('Swal.disableConfirmButton()', "Swal.getConfirmButton().removeAttribute('disabled')");
|
1890 |
+
setButtonsDisabled(this, ['confirmButton'], false);
|
1891 |
+
} // @deprecated
|
1892 |
+
|
1893 |
+
function disableConfirmButton() {
|
1894 |
+
warnAboutDepreation('Swal.enableConfirmButton()', "Swal.getConfirmButton().setAttribute('disabled', '')");
|
1895 |
+
setButtonsDisabled(this, ['confirmButton'], true);
|
1896 |
+
}
|
1897 |
+
function enableInput() {
|
1898 |
+
return setInputDisabled(this.getInput(), false);
|
1899 |
+
}
|
1900 |
+
function disableInput() {
|
1901 |
+
return setInputDisabled(this.getInput(), true);
|
1902 |
+
}
|
1903 |
+
|
1904 |
+
function showValidationMessage(error) {
|
1905 |
+
var domCache = privateProps.domCache.get(this);
|
1906 |
+
domCache.validationMessage.innerHTML = error;
|
1907 |
+
var popupComputedStyle = window.getComputedStyle(domCache.popup);
|
1908 |
+
domCache.validationMessage.style.marginLeft = "-".concat(popupComputedStyle.getPropertyValue('padding-left'));
|
1909 |
+
domCache.validationMessage.style.marginRight = "-".concat(popupComputedStyle.getPropertyValue('padding-right'));
|
1910 |
+
show(domCache.validationMessage);
|
1911 |
+
var input = this.getInput();
|
1912 |
+
|
1913 |
+
if (input) {
|
1914 |
+
input.setAttribute('aria-invalid', true);
|
1915 |
+
input.setAttribute('aria-describedBy', swalClasses['validation-message']);
|
1916 |
+
focusInput(input);
|
1917 |
+
addClass(input, swalClasses.inputerror);
|
1918 |
+
}
|
1919 |
+
} // Hide block with validation message
|
1920 |
+
|
1921 |
+
function resetValidationMessage$1() {
|
1922 |
+
var domCache = privateProps.domCache.get(this);
|
1923 |
+
|
1924 |
+
if (domCache.validationMessage) {
|
1925 |
+
hide(domCache.validationMessage);
|
1926 |
+
}
|
1927 |
+
|
1928 |
+
var input = this.getInput();
|
1929 |
+
|
1930 |
+
if (input) {
|
1931 |
+
input.removeAttribute('aria-invalid');
|
1932 |
+
input.removeAttribute('aria-describedBy');
|
1933 |
+
removeClass(input, swalClasses.inputerror);
|
1934 |
+
}
|
1935 |
+
}
|
1936 |
+
|
1937 |
+
function getProgressSteps$1() {
|
1938 |
+
warnAboutDepreation('Swal.getProgressSteps()', "const swalInstance = Swal.fire({progressSteps: ['1', '2', '3']}); const progressSteps = swalInstance.params.progressSteps");
|
1939 |
+
var innerParams = privateProps.innerParams.get(this);
|
1940 |
+
return innerParams.progressSteps;
|
1941 |
+
}
|
1942 |
+
function setProgressSteps(progressSteps) {
|
1943 |
+
warnAboutDepreation('Swal.setProgressSteps()', 'Swal.update()');
|
1944 |
+
var innerParams = privateProps.innerParams.get(this);
|
1945 |
+
|
1946 |
+
var updatedParams = _extends({}, innerParams, {
|
1947 |
+
progressSteps: progressSteps
|
1948 |
+
});
|
1949 |
+
|
1950 |
+
renderProgressSteps(this, updatedParams);
|
1951 |
+
privateProps.innerParams.set(this, updatedParams);
|
1952 |
+
}
|
1953 |
+
function showProgressSteps() {
|
1954 |
+
var domCache = privateProps.domCache.get(this);
|
1955 |
+
show(domCache.progressSteps);
|
1956 |
+
}
|
1957 |
+
function hideProgressSteps() {
|
1958 |
+
var domCache = privateProps.domCache.get(this);
|
1959 |
+
hide(domCache.progressSteps);
|
1960 |
+
}
|
1961 |
+
|
1962 |
+
var Timer =
|
1963 |
+
/*#__PURE__*/
|
1964 |
+
function () {
|
1965 |
+
function Timer(callback, delay) {
|
1966 |
+
_classCallCheck(this, Timer);
|
1967 |
+
|
1968 |
+
this.callback = callback;
|
1969 |
+
this.remaining = delay;
|
1970 |
+
this.running = false;
|
1971 |
+
this.start();
|
1972 |
+
}
|
1973 |
+
|
1974 |
+
_createClass(Timer, [{
|
1975 |
+
key: "start",
|
1976 |
+
value: function start() {
|
1977 |
+
if (!this.running) {
|
1978 |
+
this.running = true;
|
1979 |
+
this.started = new Date();
|
1980 |
+
this.id = setTimeout(this.callback, this.remaining);
|
1981 |
+
}
|
1982 |
+
|
1983 |
+
return this.remaining;
|
1984 |
+
}
|
1985 |
+
}, {
|
1986 |
+
key: "stop",
|
1987 |
+
value: function stop() {
|
1988 |
+
if (this.running) {
|
1989 |
+
this.running = false;
|
1990 |
+
clearTimeout(this.id);
|
1991 |
+
this.remaining -= new Date() - this.started;
|
1992 |
+
}
|
1993 |
+
|
1994 |
+
return this.remaining;
|
1995 |
+
}
|
1996 |
+
}, {
|
1997 |
+
key: "increase",
|
1998 |
+
value: function increase(n) {
|
1999 |
+
var running = this.running;
|
2000 |
+
|
2001 |
+
if (running) {
|
2002 |
+
this.stop();
|
2003 |
+
}
|
2004 |
+
|
2005 |
+
this.remaining += n;
|
2006 |
+
|
2007 |
+
if (running) {
|
2008 |
+
this.start();
|
2009 |
+
}
|
2010 |
+
|
2011 |
+
return this.remaining;
|
2012 |
+
}
|
2013 |
+
}, {
|
2014 |
+
key: "getTimerLeft",
|
2015 |
+
value: function getTimerLeft() {
|
2016 |
+
if (this.running) {
|
2017 |
+
this.stop();
|
2018 |
+
this.start();
|
2019 |
+
}
|
2020 |
+
|
2021 |
+
return this.remaining;
|
2022 |
+
}
|
2023 |
+
}, {
|
2024 |
+
key: "isRunning",
|
2025 |
+
value: function isRunning() {
|
2026 |
+
return this.running;
|
2027 |
+
}
|
2028 |
+
}]);
|
2029 |
+
|
2030 |
+
return Timer;
|
2031 |
+
}();
|
2032 |
+
|
2033 |
+
var defaultInputValidators = {
|
2034 |
+
email: function email(string, validationMessage) {
|
2035 |
+
return /^[a-zA-Z0-9.+_-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]{2,24}$/.test(string) ? Promise.resolve() : Promise.resolve(validationMessage ? validationMessage : 'Invalid email address');
|
2036 |
+
},
|
2037 |
+
url: function url(string, validationMessage) {
|
2038 |
+
// taken from https://stackoverflow.com/a/3809435 with a small change from #1306
|
2039 |
+
return /^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{2,256}\.[a-z]{2,63}\b([-a-zA-Z0-9@:%_+.~#?&/=]*)$/.test(string) ? Promise.resolve() : Promise.resolve(validationMessage ? validationMessage : 'Invalid URL');
|
2040 |
+
}
|
2041 |
+
};
|
2042 |
+
|
2043 |
+
/**
|
2044 |
+
* Set type, text and actions on popup
|
2045 |
+
*
|
2046 |
+
* @param params
|
2047 |
+
* @returns {boolean}
|
2048 |
+
*/
|
2049 |
+
|
2050 |
+
function setParameters(params) {
|
2051 |
+
// Use default `inputValidator` for supported input types if not provided
|
2052 |
+
if (!params.inputValidator) {
|
2053 |
+
Object.keys(defaultInputValidators).forEach(function (key) {
|
2054 |
+
if (params.input === key) {
|
2055 |
+
params.inputValidator = defaultInputValidators[key];
|
2056 |
+
}
|
2057 |
+
});
|
2058 |
+
} // showLoaderOnConfirm && preConfirm
|
2059 |
+
|
2060 |
+
|
2061 |
+
if (params.showLoaderOnConfirm && !params.preConfirm) {
|
2062 |
+
warn('showLoaderOnConfirm is set to true, but preConfirm is not defined.\n' + 'showLoaderOnConfirm should be used together with preConfirm, see usage example:\n' + 'https://sweetalert2.github.io/#ajax-request');
|
2063 |
+
} // params.animation will be actually used in renderPopup.js
|
2064 |
+
// but in case when params.animation is a function, we need to call that function
|
2065 |
+
// before popup (re)initialization, so it'll be possible to check Swal.isVisible()
|
2066 |
+
// inside the params.animation function
|
2067 |
+
|
2068 |
+
|
2069 |
+
params.animation = callIfFunction(params.animation); // Determine if the custom target element is valid
|
2070 |
+
|
2071 |
+
if (!params.target || typeof params.target === 'string' && !document.querySelector(params.target) || typeof params.target !== 'string' && !params.target.appendChild) {
|
2072 |
+
warn('Target parameter is not valid, defaulting to "body"');
|
2073 |
+
params.target = 'body';
|
2074 |
+
} // Replace newlines with <br> in title
|
2075 |
+
|
2076 |
+
|
2077 |
+
if (typeof params.title === 'string') {
|
2078 |
+
params.title = params.title.split('\n').join('<br />');
|
2079 |
+
}
|
2080 |
+
|
2081 |
+
var oldPopup = getPopup();
|
2082 |
+
var targetElement = typeof params.target === 'string' ? document.querySelector(params.target) : params.target;
|
2083 |
+
|
2084 |
+
if (!oldPopup || // If the model target has changed, refresh the popup
|
2085 |
+
oldPopup && targetElement && oldPopup.parentNode !== targetElement.parentNode) {
|
2086 |
+
init(params);
|
2087 |
+
}
|
2088 |
+
}
|
2089 |
+
|
2090 |
+
function swalOpenAnimationFinished(popup, container) {
|
2091 |
+
popup.removeEventListener(animationEndEvent, swalOpenAnimationFinished);
|
2092 |
+
container.style.overflowY = 'auto';
|
2093 |
+
}
|
2094 |
+
/**
|
2095 |
+
* Open popup, add necessary classes and styles, fix scrollbar
|
2096 |
+
*
|
2097 |
+
* @param {Array} params
|
2098 |
+
*/
|
2099 |
+
|
2100 |
+
|
2101 |
+
var openPopup = function openPopup(params) {
|
2102 |
+
var container = getContainer();
|
2103 |
+
var popup = getPopup();
|
2104 |
+
|
2105 |
+
if (params.onBeforeOpen !== null && typeof params.onBeforeOpen === 'function') {
|
2106 |
+
params.onBeforeOpen(popup);
|
2107 |
+
}
|
2108 |
+
|
2109 |
+
if (params.animation) {
|
2110 |
+
addClass(popup, swalClasses.show);
|
2111 |
+
addClass(container, swalClasses.fade);
|
2112 |
+
}
|
2113 |
+
|
2114 |
+
show(popup); // scrolling is 'hidden' until animation is done, after that 'auto'
|
2115 |
+
|
2116 |
+
if (animationEndEvent && hasCssAnimation(popup)) {
|
2117 |
+
container.style.overflowY = 'hidden';
|
2118 |
+
popup.addEventListener(animationEndEvent, swalOpenAnimationFinished.bind(null, popup, container));
|
2119 |
+
} else {
|
2120 |
+
container.style.overflowY = 'auto';
|
2121 |
+
}
|
2122 |
+
|
2123 |
+
addClass([document.documentElement, document.body, container], swalClasses.shown);
|
2124 |
+
|
2125 |
+
if (params.heightAuto && params.backdrop && !params.toast) {
|
2126 |
+
addClass([document.documentElement, document.body], swalClasses['height-auto']);
|
2127 |
+
}
|
2128 |
+
|
2129 |
+
if (isModal()) {
|
2130 |
+
if (params.scrollbarPadding) {
|
2131 |
+
fixScrollbar();
|
2132 |
+
}
|
2133 |
+
|
2134 |
+
iOSfix();
|
2135 |
+
IEfix();
|
2136 |
+
setAriaHidden(); // sweetalert2/issues/1247
|
2137 |
+
|
2138 |
+
setTimeout(function () {
|
2139 |
+
container.scrollTop = 0;
|
2140 |
+
});
|
2141 |
+
}
|
2142 |
+
|
2143 |
+
if (!isToast() && !globalState.previousActiveElement) {
|
2144 |
+
globalState.previousActiveElement = document.activeElement;
|
2145 |
+
}
|
2146 |
+
|
2147 |
+
if (params.onOpen !== null && typeof params.onOpen === 'function') {
|
2148 |
+
setTimeout(function () {
|
2149 |
+
params.onOpen(popup);
|
2150 |
+
});
|
2151 |
+
}
|
2152 |
+
};
|
2153 |
+
|
2154 |
+
var _this = undefined;
|
2155 |
+
|
2156 |
+
var handleInputOptions = function handleInputOptions(instance, params) {
|
2157 |
+
var content = getContent();
|
2158 |
+
|
2159 |
+
var processInputOptions = function processInputOptions(inputOptions) {
|
2160 |
+
return populateInputOptions[params.input](content, formatInputOptions(inputOptions), params);
|
2161 |
+
};
|
2162 |
+
|
2163 |
+
if (isPromise(params.inputOptions)) {
|
2164 |
+
showLoading();
|
2165 |
+
params.inputOptions.then(function (inputOptions) {
|
2166 |
+
instance.hideLoading();
|
2167 |
+
processInputOptions(inputOptions);
|
2168 |
+
});
|
2169 |
+
} else if (_typeof(params.inputOptions) === 'object') {
|
2170 |
+
processInputOptions(params.inputOptions);
|
2171 |
+
} else {
|
2172 |
+
error("Unexpected type of inputOptions! Expected object, Map or Promise, got ".concat(_typeof(params.inputOptions)));
|
2173 |
+
}
|
2174 |
+
};
|
2175 |
+
var handleInputValue = function handleInputValue(instance, params) {
|
2176 |
+
var input = instance.getInput();
|
2177 |
+
hide(input);
|
2178 |
+
params.inputValue.then(function (inputValue) {
|
2179 |
+
input.value = params.input === 'number' ? parseFloat(inputValue) || 0 : inputValue + '';
|
2180 |
+
show(input);
|
2181 |
+
input.focus();
|
2182 |
+
instance.hideLoading();
|
2183 |
+
})["catch"](function (err) {
|
2184 |
+
error('Error in inputValue promise: ' + err);
|
2185 |
+
input.value = '';
|
2186 |
+
show(input);
|
2187 |
+
input.focus();
|
2188 |
+
|
2189 |
+
_this.hideLoading();
|
2190 |
+
});
|
2191 |
+
};
|
2192 |
+
var populateInputOptions = {
|
2193 |
+
select: function select(content, inputOptions, params) {
|
2194 |
+
var select = getChildByClass(content, swalClasses.select);
|
2195 |
+
inputOptions.forEach(function (inputOption) {
|
2196 |
+
var optionValue = inputOption[0];
|
2197 |
+
var optionLabel = inputOption[1];
|
2198 |
+
var option = document.createElement('option');
|
2199 |
+
option.value = optionValue;
|
2200 |
+
option.innerHTML = optionLabel;
|
2201 |
+
|
2202 |
+
if (params.inputValue.toString() === optionValue.toString()) {
|
2203 |
+
option.selected = true;
|
2204 |
+
}
|
2205 |
+
|
2206 |
+
select.appendChild(option);
|
2207 |
+
});
|
2208 |
+
select.focus();
|
2209 |
+
},
|
2210 |
+
radio: function radio(content, inputOptions, params) {
|
2211 |
+
var radio = getChildByClass(content, swalClasses.radio);
|
2212 |
+
inputOptions.forEach(function (inputOption) {
|
2213 |
+
var radioValue = inputOption[0];
|
2214 |
+
var radioLabel = inputOption[1];
|
2215 |
+
var radioInput = document.createElement('input');
|
2216 |
+
var radioLabelElement = document.createElement('label');
|
2217 |
+
radioInput.type = 'radio';
|
2218 |
+
radioInput.name = swalClasses.radio;
|
2219 |
+
radioInput.value = radioValue;
|
2220 |
+
|
2221 |
+
if (params.inputValue.toString() === radioValue.toString()) {
|
2222 |
+
radioInput.checked = true;
|
2223 |
+
}
|
2224 |
+
|
2225 |
+
var label = document.createElement('span');
|
2226 |
+
label.innerHTML = radioLabel;
|
2227 |
+
label.className = swalClasses.label;
|
2228 |
+
radioLabelElement.appendChild(radioInput);
|
2229 |
+
radioLabelElement.appendChild(label);
|
2230 |
+
radio.appendChild(radioLabelElement);
|
2231 |
+
});
|
2232 |
+
var radios = radio.querySelectorAll('input');
|
2233 |
+
|
2234 |
+
if (radios.length) {
|
2235 |
+
radios[0].focus();
|
2236 |
+
}
|
2237 |
+
}
|
2238 |
+
/**
|
2239 |
+
* Converts `inputOptions` into an array of `[value, label]`s
|
2240 |
+
* @param inputOptions
|
2241 |
+
*/
|
2242 |
+
|
2243 |
+
};
|
2244 |
+
|
2245 |
+
var formatInputOptions = function formatInputOptions(inputOptions) {
|
2246 |
+
var result = [];
|
2247 |
+
|
2248 |
+
if (typeof Map !== 'undefined' && inputOptions instanceof Map) {
|
2249 |
+
inputOptions.forEach(function (value, key) {
|
2250 |
+
result.push([key, value]);
|
2251 |
+
});
|
2252 |
+
} else {
|
2253 |
+
Object.keys(inputOptions).forEach(function (key) {
|
2254 |
+
result.push([key, inputOptions[key]]);
|
2255 |
+
});
|
2256 |
+
}
|
2257 |
+
|
2258 |
+
return result;
|
2259 |
+
};
|
2260 |
+
|
2261 |
+
function _main(userParams) {
|
2262 |
+
var _this = this;
|
2263 |
+
|
2264 |
+
showWarningsForParams(userParams);
|
2265 |
+
|
2266 |
+
var innerParams = _extends({}, defaultParams, userParams);
|
2267 |
+
|
2268 |
+
setParameters(innerParams);
|
2269 |
+
Object.freeze(innerParams); // clear the previous timer
|
2270 |
+
|
2271 |
+
if (globalState.timeout) {
|
2272 |
+
globalState.timeout.stop();
|
2273 |
+
delete globalState.timeout;
|
2274 |
+
} // clear the restore focus timeout
|
2275 |
+
|
2276 |
+
|
2277 |
+
clearTimeout(globalState.restoreFocusTimeout);
|
2278 |
+
var domCache = {
|
2279 |
+
popup: getPopup(),
|
2280 |
+
container: getContainer(),
|
2281 |
+
content: getContent(),
|
2282 |
+
actions: getActions(),
|
2283 |
+
confirmButton: getConfirmButton(),
|
2284 |
+
cancelButton: getCancelButton(),
|
2285 |
+
closeButton: getCloseButton(),
|
2286 |
+
validationMessage: getValidationMessage(),
|
2287 |
+
progressSteps: getProgressSteps()
|
2288 |
+
};
|
2289 |
+
privateProps.domCache.set(this, domCache);
|
2290 |
+
render(this, innerParams);
|
2291 |
+
privateProps.innerParams.set(this, innerParams);
|
2292 |
+
var constructor = this.constructor;
|
2293 |
+
return new Promise(function (resolve) {
|
2294 |
+
// functions to handle all closings/dismissals
|
2295 |
+
var succeedWith = function succeedWith(value) {
|
2296 |
+
_this.closePopup({
|
2297 |
+
value: value
|
2298 |
+
});
|
2299 |
+
};
|
2300 |
+
|
2301 |
+
var dismissWith = function dismissWith(dismiss) {
|
2302 |
+
_this.closePopup({
|
2303 |
+
dismiss: dismiss
|
2304 |
+
});
|
2305 |
+
};
|
2306 |
+
|
2307 |
+
privateMethods.swalPromiseResolve.set(_this, resolve); // Close on timer
|
2308 |
+
|
2309 |
+
if (innerParams.timer) {
|
2310 |
+
globalState.timeout = new Timer(function () {
|
2311 |
+
dismissWith('timer');
|
2312 |
+
delete globalState.timeout;
|
2313 |
+
}, innerParams.timer);
|
2314 |
+
} // Get the value of the popup input
|
2315 |
+
|
2316 |
+
|
2317 |
+
var getInputValue = function getInputValue() {
|
2318 |
+
var input = _this.getInput();
|
2319 |
+
|
2320 |
+
if (!input) {
|
2321 |
+
return null;
|
2322 |
+
}
|
2323 |
+
|
2324 |
+
switch (innerParams.input) {
|
2325 |
+
case 'checkbox':
|
2326 |
+
return input.checked ? 1 : 0;
|
2327 |
+
|
2328 |
+
case 'radio':
|
2329 |
+
return input.checked ? input.value : null;
|
2330 |
+
|
2331 |
+
case 'file':
|
2332 |
+
return input.files.length ? input.files[0] : null;
|
2333 |
+
|
2334 |
+
default:
|
2335 |
+
return innerParams.inputAutoTrim ? input.value.trim() : input.value;
|
2336 |
+
}
|
2337 |
+
}; // input autofocus
|
2338 |
+
|
2339 |
+
|
2340 |
+
if (innerParams.input) {
|
2341 |
+
setTimeout(function () {
|
2342 |
+
var input = _this.getInput();
|
2343 |
+
|
2344 |
+
if (input) {
|
2345 |
+
focusInput(input);
|
2346 |
+
}
|
2347 |
+
}, 0);
|
2348 |
+
}
|
2349 |
+
|
2350 |
+
var confirm = function confirm(value) {
|
2351 |
+
if (innerParams.showLoaderOnConfirm) {
|
2352 |
+
constructor.showLoading(); // TODO: make showLoading an *instance* method
|
2353 |
+
}
|
2354 |
+
|
2355 |
+
if (innerParams.preConfirm) {
|
2356 |
+
_this.resetValidationMessage();
|
2357 |
+
|
2358 |
+
var preConfirmPromise = Promise.resolve().then(function () {
|
2359 |
+
return innerParams.preConfirm(value, innerParams.validationMessage);
|
2360 |
+
});
|
2361 |
+
preConfirmPromise.then(function (preConfirmValue) {
|
2362 |
+
if (isVisible(domCache.validationMessage) || preConfirmValue === false) {
|
2363 |
+
_this.hideLoading();
|
2364 |
+
} else {
|
2365 |
+
succeedWith(typeof preConfirmValue === 'undefined' ? value : preConfirmValue);
|
2366 |
+
}
|
2367 |
+
});
|
2368 |
+
} else {
|
2369 |
+
succeedWith(value);
|
2370 |
+
}
|
2371 |
+
}; // Mouse interactions
|
2372 |
+
|
2373 |
+
|
2374 |
+
var onButtonEvent = function onButtonEvent(e) {
|
2375 |
+
var target = e.target;
|
2376 |
+
var confirmButton = domCache.confirmButton,
|
2377 |
+
cancelButton = domCache.cancelButton;
|
2378 |
+
var targetedConfirm = confirmButton && (confirmButton === target || confirmButton.contains(target));
|
2379 |
+
var targetedCancel = cancelButton && (cancelButton === target || cancelButton.contains(target));
|
2380 |
+
|
2381 |
+
switch (e.type) {
|
2382 |
+
case 'click':
|
2383 |
+
// Clicked 'confirm'
|
2384 |
+
if (targetedConfirm) {
|
2385 |
+
_this.disableButtons();
|
2386 |
+
|
2387 |
+
if (innerParams.input) {
|
2388 |
+
var inputValue = getInputValue();
|
2389 |
+
|
2390 |
+
if (innerParams.inputValidator) {
|
2391 |
+
_this.disableInput();
|
2392 |
+
|
2393 |
+
var validationPromise = Promise.resolve().then(function () {
|
2394 |
+
return innerParams.inputValidator(inputValue, innerParams.validationMessage);
|
2395 |
+
});
|
2396 |
+
validationPromise.then(function (validationMessage) {
|
2397 |
+
_this.enableButtons();
|
2398 |
+
|
2399 |
+
_this.enableInput();
|
2400 |
+
|
2401 |
+
if (validationMessage) {
|
2402 |
+
_this.showValidationMessage(validationMessage);
|
2403 |
+
} else {
|
2404 |
+
confirm(inputValue);
|
2405 |
+
}
|
2406 |
+
});
|
2407 |
+
} else if (!_this.getInput().checkValidity()) {
|
2408 |
+
_this.enableButtons();
|
2409 |
+
|
2410 |
+
_this.showValidationMessage(innerParams.validationMessage);
|
2411 |
+
} else {
|
2412 |
+
confirm(inputValue);
|
2413 |
+
}
|
2414 |
+
} else {
|
2415 |
+
confirm(true);
|
2416 |
+
} // Clicked 'cancel'
|
2417 |
+
|
2418 |
+
} else if (targetedCancel) {
|
2419 |
+
_this.disableButtons();
|
2420 |
+
|
2421 |
+
dismissWith(constructor.DismissReason.cancel);
|
2422 |
+
}
|
2423 |
+
|
2424 |
+
break;
|
2425 |
+
|
2426 |
+
default:
|
2427 |
+
}
|
2428 |
+
};
|
2429 |
+
|
2430 |
+
var buttons = domCache.popup.querySelectorAll('button');
|
2431 |
+
|
2432 |
+
for (var i = 0; i < buttons.length; i++) {
|
2433 |
+
buttons[i].onclick = onButtonEvent;
|
2434 |
+
buttons[i].onmouseover = onButtonEvent;
|
2435 |
+
buttons[i].onmouseout = onButtonEvent;
|
2436 |
+
buttons[i].onmousedown = onButtonEvent;
|
2437 |
+
} // Closing popup by close button
|
2438 |
+
|
2439 |
+
|
2440 |
+
domCache.closeButton.onclick = function () {
|
2441 |
+
dismissWith(constructor.DismissReason.close);
|
2442 |
+
};
|
2443 |
+
|
2444 |
+
if (innerParams.toast) {
|
2445 |
+
// Closing popup by internal click
|
2446 |
+
domCache.popup.onclick = function () {
|
2447 |
+
if (innerParams.showConfirmButton || innerParams.showCancelButton || innerParams.showCloseButton || innerParams.input) {
|
2448 |
+
return;
|
2449 |
+
}
|
2450 |
+
|
2451 |
+
dismissWith(constructor.DismissReason.close);
|
2452 |
+
};
|
2453 |
+
} else {
|
2454 |
+
var ignoreOutsideClick = false; // Ignore click events that had mousedown on the popup but mouseup on the container
|
2455 |
+
// This can happen when the user drags a slider
|
2456 |
+
|
2457 |
+
domCache.popup.onmousedown = function () {
|
2458 |
+
domCache.container.onmouseup = function (e) {
|
2459 |
+
domCache.container.onmouseup = undefined; // We only check if the mouseup target is the container because usually it doesn't
|
2460 |
+
// have any other direct children aside of the popup
|
2461 |
+
|
2462 |
+
if (e.target === domCache.container) {
|
2463 |
+
ignoreOutsideClick = true;
|
2464 |
+
}
|
2465 |
+
};
|
2466 |
+
}; // Ignore click events that had mousedown on the container but mouseup on the popup
|
2467 |
+
|
2468 |
+
|
2469 |
+
domCache.container.onmousedown = function () {
|
2470 |
+
domCache.popup.onmouseup = function (e) {
|
2471 |
+
domCache.popup.onmouseup = undefined; // We also need to check if the mouseup target is a child of the popup
|
2472 |
+
|
2473 |
+
if (e.target === domCache.popup || domCache.popup.contains(e.target)) {
|
2474 |
+
ignoreOutsideClick = true;
|
2475 |
+
}
|
2476 |
+
};
|
2477 |
+
};
|
2478 |
+
|
2479 |
+
domCache.container.onclick = function (e) {
|
2480 |
+
if (ignoreOutsideClick) {
|
2481 |
+
ignoreOutsideClick = false;
|
2482 |
+
return;
|
2483 |
+
}
|
2484 |
+
|
2485 |
+
if (e.target !== domCache.container) {
|
2486 |
+
return;
|
2487 |
+
}
|
2488 |
+
|
2489 |
+
if (callIfFunction(innerParams.allowOutsideClick)) {
|
2490 |
+
dismissWith(constructor.DismissReason.backdrop);
|
2491 |
+
}
|
2492 |
+
};
|
2493 |
+
} // Reverse buttons (Confirm on the right side)
|
2494 |
+
|
2495 |
+
|
2496 |
+
if (innerParams.reverseButtons) {
|
2497 |
+
domCache.confirmButton.parentNode.insertBefore(domCache.cancelButton, domCache.confirmButton);
|
2498 |
+
} else {
|
2499 |
+
domCache.confirmButton.parentNode.insertBefore(domCache.confirmButton, domCache.cancelButton);
|
2500 |
+
} // Focus handling
|
2501 |
+
|
2502 |
+
|
2503 |
+
var setFocus = function setFocus(index, increment) {
|
2504 |
+
var focusableElements = getFocusableElements(innerParams.focusCancel); // search for visible elements and select the next possible match
|
2505 |
+
|
2506 |
+
for (var _i = 0; _i < focusableElements.length; _i++) {
|
2507 |
+
index = index + increment; // rollover to first item
|
2508 |
+
|
2509 |
+
if (index === focusableElements.length) {
|
2510 |
+
index = 0; // go to last item
|
2511 |
+
} else if (index === -1) {
|
2512 |
+
index = focusableElements.length - 1;
|
2513 |
+
}
|
2514 |
+
|
2515 |
+
return focusableElements[index].focus();
|
2516 |
+
} // no visible focusable elements, focus the popup
|
2517 |
+
|
2518 |
+
|
2519 |
+
domCache.popup.focus();
|
2520 |
+
};
|
2521 |
+
|
2522 |
+
var keydownHandler = function keydownHandler(e, innerParams) {
|
2523 |
+
if (innerParams.stopKeydownPropagation) {
|
2524 |
+
e.stopPropagation();
|
2525 |
+
}
|
2526 |
+
|
2527 |
+
var arrowKeys = ['ArrowLeft', 'ArrowRight', 'ArrowUp', 'ArrowDown', 'Left', 'Right', 'Up', 'Down' // IE11
|
2528 |
+
];
|
2529 |
+
|
2530 |
+
if (e.key === 'Enter' && !e.isComposing) {
|
2531 |
+
if (e.target && _this.getInput() && e.target.outerHTML === _this.getInput().outerHTML) {
|
2532 |
+
if (['textarea', 'file'].indexOf(innerParams.input) !== -1) {
|
2533 |
+
return; // do not submit
|
2534 |
+
}
|
2535 |
+
|
2536 |
+
constructor.clickConfirm();
|
2537 |
+
e.preventDefault();
|
2538 |
+
} // TAB
|
2539 |
+
|
2540 |
+
} else if (e.key === 'Tab') {
|
2541 |
+
var targetElement = e.target;
|
2542 |
+
var focusableElements = getFocusableElements(innerParams.focusCancel);
|
2543 |
+
var btnIndex = -1;
|
2544 |
+
|
2545 |
+
for (var _i2 = 0; _i2 < focusableElements.length; _i2++) {
|
2546 |
+
if (targetElement === focusableElements[_i2]) {
|
2547 |
+
btnIndex = _i2;
|
2548 |
+
break;
|
2549 |
+
}
|
2550 |
+
}
|
2551 |
+
|
2552 |
+
if (!e.shiftKey) {
|
2553 |
+
// Cycle to the next button
|
2554 |
+
setFocus(btnIndex, 1);
|
2555 |
+
} else {
|
2556 |
+
// Cycle to the prev button
|
2557 |
+
setFocus(btnIndex, -1);
|
2558 |
+
}
|
2559 |
+
|
2560 |
+
e.stopPropagation();
|
2561 |
+
e.preventDefault(); // ARROWS - switch focus between buttons
|
2562 |
+
} else if (arrowKeys.indexOf(e.key) !== -1) {
|
2563 |
+
// focus Cancel button if Confirm button is currently focused
|
2564 |
+
if (document.activeElement === domCache.confirmButton && isVisible(domCache.cancelButton)) {
|
2565 |
+
domCache.cancelButton.focus(); // and vice versa
|
2566 |
+
} else if (document.activeElement === domCache.cancelButton && isVisible(domCache.confirmButton)) {
|
2567 |
+
domCache.confirmButton.focus();
|
2568 |
+
} // ESC
|
2569 |
+
|
2570 |
+
} else if ((e.key === 'Escape' || e.key === 'Esc') && callIfFunction(innerParams.allowEscapeKey) === true) {
|
2571 |
+
e.preventDefault();
|
2572 |
+
dismissWith(constructor.DismissReason.esc);
|
2573 |
+
}
|
2574 |
+
};
|
2575 |
+
|
2576 |
+
if (globalState.keydownTarget && globalState.keydownHandlerAdded) {
|
2577 |
+
globalState.keydownTarget.removeEventListener('keydown', globalState.keydownHandler, {
|
2578 |
+
capture: globalState.keydownListenerCapture
|
2579 |
+
});
|
2580 |
+
globalState.keydownHandlerAdded = false;
|
2581 |
+
}
|
2582 |
+
|
2583 |
+
if (!innerParams.toast) {
|
2584 |
+
globalState.keydownHandler = function (e) {
|
2585 |
+
return keydownHandler(e, innerParams);
|
2586 |
+
};
|
2587 |
+
|
2588 |
+
globalState.keydownTarget = innerParams.keydownListenerCapture ? window : domCache.popup;
|
2589 |
+
globalState.keydownListenerCapture = innerParams.keydownListenerCapture;
|
2590 |
+
globalState.keydownTarget.addEventListener('keydown', globalState.keydownHandler, {
|
2591 |
+
capture: globalState.keydownListenerCapture
|
2592 |
+
});
|
2593 |
+
globalState.keydownHandlerAdded = true;
|
2594 |
+
}
|
2595 |
+
|
2596 |
+
_this.enableButtons();
|
2597 |
+
|
2598 |
+
_this.hideLoading();
|
2599 |
+
|
2600 |
+
_this.resetValidationMessage();
|
2601 |
+
|
2602 |
+
if (innerParams.toast && (innerParams.input || innerParams.footer || innerParams.showCloseButton)) {
|
2603 |
+
addClass(document.body, swalClasses['toast-column']);
|
2604 |
+
} else {
|
2605 |
+
removeClass(document.body, swalClasses['toast-column']);
|
2606 |
+
} // inputOptions, inputValue
|
2607 |
+
|
2608 |
+
|
2609 |
+
if (innerParams.input === 'select' || innerParams.input === 'radio') {
|
2610 |
+
handleInputOptions(_this, innerParams);
|
2611 |
+
} else if (['text', 'email', 'number', 'tel', 'textarea'].indexOf(innerParams.input) !== -1 && isPromise(innerParams.inputValue)) {
|
2612 |
+
handleInputValue(_this, innerParams);
|
2613 |
+
}
|
2614 |
+
|
2615 |
+
openPopup(innerParams);
|
2616 |
+
|
2617 |
+
if (!innerParams.toast) {
|
2618 |
+
if (!callIfFunction(innerParams.allowEnterKey)) {
|
2619 |
+
if (document.activeElement && typeof document.activeElement.blur === 'function') {
|
2620 |
+
document.activeElement.blur();
|
2621 |
+
}
|
2622 |
+
} else if (innerParams.focusCancel && isVisible(domCache.cancelButton)) {
|
2623 |
+
domCache.cancelButton.focus();
|
2624 |
+
} else if (innerParams.focusConfirm && isVisible(domCache.confirmButton)) {
|
2625 |
+
domCache.confirmButton.focus();
|
2626 |
+
} else {
|
2627 |
+
setFocus(-1, 1);
|
2628 |
+
}
|
2629 |
+
} // fix scroll
|
2630 |
+
|
2631 |
+
|
2632 |
+
domCache.container.scrollTop = 0;
|
2633 |
+
});
|
2634 |
+
}
|
2635 |
+
|
2636 |
+
/**
|
2637 |
+
* Updates popup parameters.
|
2638 |
+
*/
|
2639 |
+
|
2640 |
+
function update(params) {
|
2641 |
+
var validUpdatableParams = {}; // assign valid params from `params` to `defaults`
|
2642 |
+
|
2643 |
+
Object.keys(params).forEach(function (param) {
|
2644 |
+
if (Swal.isUpdatableParameter(param)) {
|
2645 |
+
validUpdatableParams[param] = params[param];
|
2646 |
+
} else {
|
2647 |
+
warn("Invalid parameter to update: \"".concat(param, "\". Updatable params are listed here: https://github.com/sweetalert2/sweetalert2/blob/master/src/utils/params.js"));
|
2648 |
+
}
|
2649 |
+
});
|
2650 |
+
var innerParams = privateProps.innerParams.get(this);
|
2651 |
+
|
2652 |
+
var updatedParams = _extends({}, innerParams, validUpdatableParams);
|
2653 |
+
|
2654 |
+
render(this, updatedParams);
|
2655 |
+
privateProps.innerParams.set(this, updatedParams);
|
2656 |
+
Object.defineProperties(this, {
|
2657 |
+
params: {
|
2658 |
+
value: _extends({}, this.params, params),
|
2659 |
+
writable: false,
|
2660 |
+
enumerable: true
|
2661 |
+
}
|
2662 |
+
});
|
2663 |
+
}
|
2664 |
+
|
2665 |
+
|
2666 |
+
|
2667 |
+
var instanceMethods = Object.freeze({
|
2668 |
+
hideLoading: hideLoading,
|
2669 |
+
disableLoading: hideLoading,
|
2670 |
+
getInput: getInput$1,
|
2671 |
+
close: close,
|
2672 |
+
closePopup: close,
|
2673 |
+
closeModal: close,
|
2674 |
+
closeToast: close,
|
2675 |
+
enableButtons: enableButtons,
|
2676 |
+
disableButtons: disableButtons,
|
2677 |
+
enableConfirmButton: enableConfirmButton,
|
2678 |
+
disableConfirmButton: disableConfirmButton,
|
2679 |
+
enableInput: enableInput,
|
2680 |
+
disableInput: disableInput,
|
2681 |
+
showValidationMessage: showValidationMessage,
|
2682 |
+
resetValidationMessage: resetValidationMessage$1,
|
2683 |
+
getProgressSteps: getProgressSteps$1,
|
2684 |
+
setProgressSteps: setProgressSteps,
|
2685 |
+
showProgressSteps: showProgressSteps,
|
2686 |
+
hideProgressSteps: hideProgressSteps,
|
2687 |
+
_main: _main,
|
2688 |
+
update: update
|
2689 |
+
});
|
2690 |
+
|
2691 |
+
var currentInstance; // SweetAlert constructor
|
2692 |
+
|
2693 |
+
function SweetAlert() {
|
2694 |
+
// Prevent run in Node env
|
2695 |
+
|
2696 |
+
/* istanbul ignore if */
|
2697 |
+
if (typeof window === 'undefined') {
|
2698 |
+
return;
|
2699 |
+
} // Check for the existence of Promise
|
2700 |
+
|
2701 |
+
/* istanbul ignore if */
|
2702 |
+
|
2703 |
+
|
2704 |
+
if (typeof Promise === 'undefined') {
|
2705 |
+
error('This package requires a Promise library, please include a shim to enable it in this browser (See: https://github.com/sweetalert2/sweetalert2/wiki/Migration-from-SweetAlert-to-SweetAlert2#1-ie-support)');
|
2706 |
+
}
|
2707 |
+
|
2708 |
+
currentInstance = this;
|
2709 |
+
|
2710 |
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
2711 |
+
args[_key] = arguments[_key];
|
2712 |
+
}
|
2713 |
+
|
2714 |
+
var outerParams = Object.freeze(this.constructor.argsToParams(args));
|
2715 |
+
Object.defineProperties(this, {
|
2716 |
+
params: {
|
2717 |
+
value: outerParams,
|
2718 |
+
writable: false,
|
2719 |
+
enumerable: true,
|
2720 |
+
configurable: true
|
2721 |
+
}
|
2722 |
+
});
|
2723 |
+
|
2724 |
+
var promise = this._main(this.params);
|
2725 |
+
|
2726 |
+
privateProps.promise.set(this, promise);
|
2727 |
+
} // `catch` cannot be the name of a module export, so we define our thenable methods here instead
|
2728 |
+
|
2729 |
+
|
2730 |
+
SweetAlert.prototype.then = function (onFulfilled) {
|
2731 |
+
var promise = privateProps.promise.get(this);
|
2732 |
+
return promise.then(onFulfilled);
|
2733 |
+
};
|
2734 |
+
|
2735 |
+
SweetAlert.prototype["finally"] = function (onFinally) {
|
2736 |
+
var promise = privateProps.promise.get(this);
|
2737 |
+
return promise["finally"](onFinally);
|
2738 |
+
}; // Assign instance methods from src/instanceMethods/*.js to prototype
|
2739 |
+
|
2740 |
+
|
2741 |
+
_extends(SweetAlert.prototype, instanceMethods); // Assign static methods from src/staticMethods/*.js to constructor
|
2742 |
+
|
2743 |
+
|
2744 |
+
_extends(SweetAlert, staticMethods); // Proxy to instance methods to constructor, for now, for backwards compatibility
|
2745 |
+
|
2746 |
+
|
2747 |
+
Object.keys(instanceMethods).forEach(function (key) {
|
2748 |
+
SweetAlert[key] = function () {
|
2749 |
+
if (currentInstance) {
|
2750 |
+
var _currentInstance;
|
2751 |
+
|
2752 |
+
return (_currentInstance = currentInstance)[key].apply(_currentInstance, arguments);
|
2753 |
+
}
|
2754 |
+
};
|
2755 |
+
});
|
2756 |
+
SweetAlert.DismissReason = DismissReason;
|
2757 |
+
SweetAlert.version = '8.11.1';
|
2758 |
+
|
2759 |
+
var Swal = SweetAlert;
|
2760 |
+
Swal["default"] = Swal;
|
2761 |
+
|
2762 |
+
return Swal;
|
2763 |
+
|
2764 |
+
})));
|
2765 |
+
if (typeof window !== 'undefined' && window.Sweetalert2){ window.swal = window.sweetAlert = window.Swal = window.SweetAlert = window.Sweetalert2}
|
classes/feedback/class-ig-feedback-v-1-0-1.php
ADDED
@@ -0,0 +1,840 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* IG Feedback
|
4 |
+
*
|
5 |
+
* The IG Feedback class adds functionality to get quick interactive feedback from users.
|
6 |
+
* There are different types of feedabck widget like Stars, Emoji, Thubms Up/ Down, Number etc.
|
7 |
+
*
|
8 |
+
* @class IG_Feedback
|
9 |
+
* @package feedback
|
10 |
+
* @copyright Copyright (c) 2019, Icegram
|
11 |
+
* @license https://opensource.org/licenses/gpl-license GNU Public License
|
12 |
+
* @since 1.0.0
|
13 |
+
*/
|
14 |
+
|
15 |
+
defined( 'ABSPATH' ) || exit;
|
16 |
+
|
17 |
+
if ( ! class_exists( 'IG_Feedback_V_1_0_1' ) ) {
|
18 |
+
/**
|
19 |
+
* Icegram Deactivation Survey.
|
20 |
+
*
|
21 |
+
* This prompts the user for more details when they deactivate the plugin.
|
22 |
+
*
|
23 |
+
* @version 1.0
|
24 |
+
* @package Icegram
|
25 |
+
* @author Malay Ladu
|
26 |
+
* @license GPL-2.0+
|
27 |
+
* @copyright Copyright (c) 2019
|
28 |
+
*/
|
29 |
+
class IG_Feedback_V_1_0_1 {
|
30 |
+
|
31 |
+
/**
|
32 |
+
* The API URL where we will send feedback data.
|
33 |
+
*
|
34 |
+
* @since 1.0.0
|
35 |
+
* @var string
|
36 |
+
*/
|
37 |
+
public $api_url = 'https://api.icegram.com/store/feedback/'; // Production
|
38 |
+
|
39 |
+
/**
|
40 |
+
* Name for this plugin.
|
41 |
+
*
|
42 |
+
* @since 1.0.0
|
43 |
+
* @var string
|
44 |
+
*/
|
45 |
+
public $name;
|
46 |
+
|
47 |
+
/**
|
48 |
+
* Unique slug for this plugin.
|
49 |
+
*
|
50 |
+
* @since 1.0.0
|
51 |
+
* @var string
|
52 |
+
*/
|
53 |
+
public $plugin;
|
54 |
+
|
55 |
+
/**
|
56 |
+
* Unique slug for this plugin.
|
57 |
+
*
|
58 |
+
* @since 1.0.0
|
59 |
+
* @var string
|
60 |
+
*/
|
61 |
+
public $ajax_action;
|
62 |
+
|
63 |
+
/**
|
64 |
+
* Plugin Abbreviation
|
65 |
+
*
|
66 |
+
* @since 1.0.0
|
67 |
+
* @var string
|
68 |
+
*/
|
69 |
+
public $plugin_abbr;
|
70 |
+
|
71 |
+
/**
|
72 |
+
* Enable/Disable Dev Mode
|
73 |
+
* @var bool
|
74 |
+
*/
|
75 |
+
public $is_dev_mode = true;
|
76 |
+
|
77 |
+
/**
|
78 |
+
* Set feedback event
|
79 |
+
*
|
80 |
+
* @var string
|
81 |
+
*/
|
82 |
+
public $event_prefix;
|
83 |
+
|
84 |
+
/**
|
85 |
+
*
|
86 |
+
*/
|
87 |
+
public $footer = '<span class="ig-powered-by">Made With 💜 by <a href="https://www.icegram.com/" target="_blank">Icegram</a></span>';
|
88 |
+
|
89 |
+
/**
|
90 |
+
* Primary class constructor.
|
91 |
+
*
|
92 |
+
* @param string $name Plugin name.
|
93 |
+
* @param string $plugin Plugin slug.
|
94 |
+
*
|
95 |
+
* @since 1.0.0
|
96 |
+
*/
|
97 |
+
public function __construct( $name = '', $plugin = '', $plugin_abbr = 'ig_fb', $event_prefix = 'igfb.', $is_dev_mode = false ) {
|
98 |
+
|
99 |
+
$this->name = $name;
|
100 |
+
$this->plugin = $plugin;
|
101 |
+
$this->plugin_abbr = $plugin_abbr;
|
102 |
+
$this->event_prefix = $event_prefix;
|
103 |
+
$this->ajax_action = $this->plugin_abbr . '_submit-feedback';
|
104 |
+
$this->is_dev_mode = $is_dev_mode;
|
105 |
+
|
106 |
+
// Don't run deactivation survey on dev sites.
|
107 |
+
if ( ! $this->can_show_feedback_widget() ) {
|
108 |
+
return;
|
109 |
+
}
|
110 |
+
|
111 |
+
add_action( 'wp_ajax_' . $this->ajax_action, array( $this, 'submit_feedback' ) );
|
112 |
+
|
113 |
+
add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_styles' ) );
|
114 |
+
add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
|
115 |
+
}
|
116 |
+
|
117 |
+
public function render_deactivate_feedback() {
|
118 |
+
add_action( 'admin_print_scripts', array( $this, 'js' ), 20 );
|
119 |
+
add_action( 'admin_print_scripts', array( $this, 'css' ) );
|
120 |
+
add_action( 'admin_footer', array( $this, 'modal' ) );
|
121 |
+
}
|
122 |
+
|
123 |
+
/**
|
124 |
+
* Load Javascripts
|
125 |
+
*
|
126 |
+
* @since 1.0.1
|
127 |
+
*/
|
128 |
+
public function enqueue_scripts() {
|
129 |
+
wp_enqueue_script( 'sweetalert', plugin_dir_url( __FILE__ ) . 'assets/js/sweetalert2.js', array( 'jquery' ) );
|
130 |
+
}
|
131 |
+
|
132 |
+
/**
|
133 |
+
* Load Styles
|
134 |
+
*
|
135 |
+
* @since 1.0.1
|
136 |
+
*/
|
137 |
+
public function enqueue_styles() {
|
138 |
+
wp_register_style( 'sweetalert', plugin_dir_url( __FILE__ ) . 'assets/css/sweetalert2.css' );
|
139 |
+
wp_enqueue_style( 'sweetalert' );
|
140 |
+
|
141 |
+
wp_register_style( 'animate', plugin_dir_url( __FILE__ ) . 'assets/css/animate.min.css' );
|
142 |
+
wp_enqueue_style( 'animate' );
|
143 |
+
|
144 |
+
wp_register_style( 'ig-feedback-star-rating', plugin_dir_url( __FILE__ ) . 'assets/css/star-rating.css' );
|
145 |
+
wp_enqueue_style( 'ig-feedback-star-rating' );
|
146 |
+
|
147 |
+
wp_register_style( 'ig-feedback-emoji', plugin_dir_url( __FILE__ ) . 'assets/css/emoji.css' );
|
148 |
+
wp_enqueue_style( 'ig-feedback-emoji' );
|
149 |
+
}
|
150 |
+
|
151 |
+
public function render_widget( $params = array() ) {
|
152 |
+
|
153 |
+
$default_params = array(
|
154 |
+
'event' => 'feedback',
|
155 |
+
'title' => 'How do you rate ' . $this->plugin,
|
156 |
+
'position' => 'top-end',
|
157 |
+
'width' => 300,
|
158 |
+
'set_transient' => true,
|
159 |
+
'allowOutsideClick' => false,
|
160 |
+
'allowEscapeKey' => true,
|
161 |
+
'showCloseButton' => true,
|
162 |
+
'confirmButtonText' => __( 'Ok', 'email-subscribers' ),
|
163 |
+
'backdrop' => true
|
164 |
+
);
|
165 |
+
|
166 |
+
$params = wp_parse_args( $params, $default_params );
|
167 |
+
|
168 |
+
$title = $params['title'];
|
169 |
+
$slug = sanitize_title( $title );
|
170 |
+
$event = $this->event_prefix . $params['event'];
|
171 |
+
$html = ! empty( $params['html'] ) ? $params['html'] : '';
|
172 |
+
|
173 |
+
?>
|
174 |
+
|
175 |
+
<script>
|
176 |
+
|
177 |
+
function doSend(rating, details) {
|
178 |
+
|
179 |
+
var data = {
|
180 |
+
action: '<?php echo $this->ajax_action; ?>',
|
181 |
+
feedback: {
|
182 |
+
type: '<?php echo $params['type']; ?>',
|
183 |
+
slug: '<?php echo $slug; ?>',
|
184 |
+
title: '<?php echo esc_js( $title ); ?>',
|
185 |
+
value: rating,
|
186 |
+
details: details
|
187 |
+
},
|
188 |
+
|
189 |
+
event: '<?php echo $event; ?>',
|
190 |
+
|
191 |
+
// Add additional information
|
192 |
+
misc: {
|
193 |
+
plugin: '<?php echo $this->plugin; ?>',
|
194 |
+
plugin_abbr: '<?php echo $this->plugin_abbr; ?>',
|
195 |
+
is_dev_mode: '<?php echo $this->is_dev_mode; ?>',
|
196 |
+
set_transient: '<?php echo $params['set_transient']; ?>'
|
197 |
+
//system_info: enable_system_info
|
198 |
+
}
|
199 |
+
};
|
200 |
+
|
201 |
+
return jQuery.post(ajaxurl, data);
|
202 |
+
}
|
203 |
+
|
204 |
+
Swal.mixin({
|
205 |
+
footer: '<?php echo $this->footer; ?>',
|
206 |
+
position: '<?php echo $params['position']; ?>',
|
207 |
+
width: <?php echo $params['width']; ?>,
|
208 |
+
animation: false,
|
209 |
+
focusConfirm: false,
|
210 |
+
allowEscapeKey: '<?php echo $params['allowEscapeKey']; ?>',
|
211 |
+
showCloseButton: '<?php echo $params['showCloseButton']; ?>',
|
212 |
+
allowOutsideClick: '<?php echo $params['allowOutsideClick']; ?>',
|
213 |
+
showLoaderOnConfirm: true,
|
214 |
+
confirmButtonText: '<?php echo $params['confirmButtonText']; ?>',
|
215 |
+
backdrop: '<?php echo (int) $params['backdrop']; ?>'
|
216 |
+
}).queue([
|
217 |
+
{
|
218 |
+
title: '<p class="ig-feedback-title"><?php echo esc_js( $params['title'] ); ?></p>',
|
219 |
+
html: '<?php echo $html; ?>',
|
220 |
+
customClass: {
|
221 |
+
popup: 'animated fadeInUpBig'
|
222 |
+
},
|
223 |
+
onOpen: () => {
|
224 |
+
var clicked = false;
|
225 |
+
var selectedReaction = '';
|
226 |
+
jQuery('.ig-emoji').hover(function () {
|
227 |
+
reaction = jQuery(this).attr('data-reaction');
|
228 |
+
jQuery('#emoji-info').text(reaction);
|
229 |
+
}, function () {
|
230 |
+
if (!clicked) {
|
231 |
+
jQuery('#emoji-info').text('');
|
232 |
+
} else {
|
233 |
+
jQuery('#emoji-info').text(selectedReaction);
|
234 |
+
}
|
235 |
+
});
|
236 |
+
|
237 |
+
jQuery('.ig-emoji').on('click', function () {
|
238 |
+
clicked = true;
|
239 |
+
jQuery('.ig-emoji').removeClass('active');
|
240 |
+
jQuery(this).addClass('active');
|
241 |
+
selectedReaction = jQuery(this).attr('data-reaction');
|
242 |
+
jQuery('#emoji-info').text(reaction);
|
243 |
+
});
|
244 |
+
},
|
245 |
+
preConfirm: () => {
|
246 |
+
|
247 |
+
var rating = jQuery("input[name='rating']:checked").val();
|
248 |
+
var details = '';
|
249 |
+
|
250 |
+
if (rating === undefined) {
|
251 |
+
Swal.showValidationMessage('Please give your input');
|
252 |
+
return;
|
253 |
+
}
|
254 |
+
|
255 |
+
return doSend(rating, details);
|
256 |
+
}
|
257 |
+
},
|
258 |
+
|
259 |
+
]).then(response => {
|
260 |
+
|
261 |
+
if (response.hasOwnProperty('value')) {
|
262 |
+
|
263 |
+
Swal.fire({
|
264 |
+
type: 'success',
|
265 |
+
width: <?php echo $params['width']; ?>,
|
266 |
+
title: "Thank You!",
|
267 |
+
showConfirmButton: false,
|
268 |
+
position: '<?php echo $params['position']; ?>',
|
269 |
+
timer: 1500,
|
270 |
+
animation: false
|
271 |
+
});
|
272 |
+
|
273 |
+
}
|
274 |
+
});
|
275 |
+
</script>
|
276 |
+
<?php
|
277 |
+
}
|
278 |
+
|
279 |
+
/**
|
280 |
+
* Render star feedback widget
|
281 |
+
*
|
282 |
+
* @param array $params
|
283 |
+
*
|
284 |
+
* @since 1.0.1
|
285 |
+
*/
|
286 |
+
public function render_stars( $params = array() ) {
|
287 |
+
|
288 |
+
ob_start();
|
289 |
+
|
290 |
+
?>
|
291 |
+
|
292 |
+
<div class="rating">
|
293 |
+
<!--elements are in reversed order, to allow "previous sibling selectors" in CSS-->
|
294 |
+
<input class="ratings" type="radio" name="rating" value="5" id="5"><label for="5">☆</label>
|
295 |
+
<input class="ratings" type="radio" name="rating" value="4" id="4"><label for="4">☆</label>
|
296 |
+
<input class="ratings" type="radio" name="rating" value="3" id="3"><label for="3">☆</label>
|
297 |
+
<input class="ratings" type="radio" name="rating" value="2" id="2"><label for="2">☆</label>
|
298 |
+
<input class="ratings" type="radio" name="rating" value="1" id="1"><label for="1">☆</label>
|
299 |
+
</div>
|
300 |
+
|
301 |
+
<?php
|
302 |
+
|
303 |
+
$html = str_replace( array( "\r", "\n" ), '', trim( ob_get_clean() ) );
|
304 |
+
|
305 |
+
$params['html'] = $html;
|
306 |
+
|
307 |
+
$this->render_widget( $params );
|
308 |
+
}
|
309 |
+
|
310 |
+
/**
|
311 |
+
* Render Emoji Widget
|
312 |
+
*
|
313 |
+
* @param array $params
|
314 |
+
*
|
315 |
+
* @since 1.0.1
|
316 |
+
*/
|
317 |
+
public function render_emoji( $params = array() ) {
|
318 |
+
|
319 |
+
ob_start();
|
320 |
+
|
321 |
+
?>
|
322 |
+
|
323 |
+
<div class="emoji">
|
324 |
+
<!--elements are in reversed order, to allow "previous sibling selectors" in CSS-->
|
325 |
+
<input class="emojis" type="radio" name="rating" value="love" id="5"/><label for="5" class="ig-emoji" data-reaction="Love">😍</label>
|
326 |
+
<input class="emojis" type="radio" name="rating" value="smile" id="4"/><label for="4" class="ig-emoji" data-reaction="Smile">😊</label>
|
327 |
+
<input class="emojis" type="radio" name="rating" value="neutral" id="3"/><label for="3" class="ig-emoji" data-reaction="Neutral">😐</label>
|
328 |
+
<input class="emojis" type="radio" name="rating" value="sad" id="1"/><label for="2" class="ig-emoji" data-reaction="Sad">😠</label>
|
329 |
+
<input class="emojis" type="radio" name="rating" value="angry" id="1"/><label for="1" class="ig-emoji" data-reaction="Angry">😡</label>
|
330 |
+
</div>
|
331 |
+
<div id="emoji-info"></div>
|
332 |
+
|
333 |
+
<?php
|
334 |
+
|
335 |
+
$html = str_replace( array( "\r", "\n" ), '', trim( ob_get_clean() ) );
|
336 |
+
|
337 |
+
$params['html'] = $html;
|
338 |
+
|
339 |
+
$this->render_widget( $params );
|
340 |
+
|
341 |
+
}
|
342 |
+
|
343 |
+
/**
|
344 |
+
* Get Feedback API url
|
345 |
+
*
|
346 |
+
* @param $is_dev_mode
|
347 |
+
*
|
348 |
+
* @return string
|
349 |
+
*
|
350 |
+
* @since 1.0.1
|
351 |
+
*/
|
352 |
+
public function get_api_url( $is_dev_mode ) {
|
353 |
+
|
354 |
+
if ( $is_dev_mode ) {
|
355 |
+
$this->api_url = 'http://192.168.0.130:9094/store/feedback/';
|
356 |
+
}
|
357 |
+
|
358 |
+
return $this->api_url;
|
359 |
+
}
|
360 |
+
|
361 |
+
/**
|
362 |
+
* Deactivation Survey javascript.
|
363 |
+
*
|
364 |
+
* @since 1.0.0
|
365 |
+
*/
|
366 |
+
public function js() {
|
367 |
+
|
368 |
+
if ( ! $this->is_plugin_page() ) {
|
369 |
+
return;
|
370 |
+
}
|
371 |
+
|
372 |
+
$title = 'Why are you deactivating Email Subscribers?';
|
373 |
+
$slug = sanitize_title( $title );
|
374 |
+
$event = $this->event_prefix . 'plugin.deactivation';
|
375 |
+
|
376 |
+
?>
|
377 |
+
<script type="text/javascript">
|
378 |
+
jQuery(function ($) {
|
379 |
+
var $deactivateLink = $('#the-list').find('[data-slug="<?php echo $this->plugin; ?>"] span.deactivate a'),
|
380 |
+
$overlay = $('#ig-deactivate-survey-<?php echo $this->plugin; ?>'),
|
381 |
+
$form = $overlay.find('form'),
|
382 |
+
formOpen = false;
|
383 |
+
// Plugin listing table deactivate link.
|
384 |
+
$deactivateLink.on('click', function (event) {
|
385 |
+
event.preventDefault();
|
386 |
+
$overlay.css('display', 'table');
|
387 |
+
formOpen = true;
|
388 |
+
$form.find('.ig-deactivate-survey-option:first-of-type input[type=radio]').focus();
|
389 |
+
});
|
390 |
+
// Survey radio option selected.
|
391 |
+
$form.on('change', 'input[type=radio]', function (event) {
|
392 |
+
event.preventDefault();
|
393 |
+
$form.find('input[type=text], .error').hide();
|
394 |
+
$form.find('.ig-deactivate-survey-option').removeClass('selected');
|
395 |
+
$(this).closest('.ig-deactivate-survey-option').addClass('selected').find('input[type=text]').show();
|
396 |
+
});
|
397 |
+
// Survey Skip & Deactivate.
|
398 |
+
$form.on('click', '.ig-deactivate-survey-deactivate', function (event) {
|
399 |
+
event.preventDefault();
|
400 |
+
location.href = $deactivateLink.attr('href');
|
401 |
+
});
|
402 |
+
// Survey submit.
|
403 |
+
$form.submit(function (event) {
|
404 |
+
event.preventDefault();
|
405 |
+
if (!$form.find('input[type=radio]:checked').val()) {
|
406 |
+
$form.find('.ig-deactivate-survey-footer').prepend('<span class="error"><?php echo esc_js( __( 'Please select an option', 'email-subscribers' ) ); ?></span>');
|
407 |
+
return;
|
408 |
+
}
|
409 |
+
|
410 |
+
var data = {
|
411 |
+
action: '<?php echo $this->ajax_action; ?>',
|
412 |
+
feedback: {
|
413 |
+
type: 'radio',
|
414 |
+
title: '<?php echo $title; ?>',
|
415 |
+
slug: '<?php echo $slug; ?>',
|
416 |
+
value: $form.find('.selected input[type=radio]').attr('data-option-slug'),
|
417 |
+
details: $form.find('.selected input[type=text]').val()
|
418 |
+
},
|
419 |
+
|
420 |
+
event: '<?php echo $event; ?>',
|
421 |
+
|
422 |
+
// Add additional information
|
423 |
+
misc: {
|
424 |
+
plugin: '<?php echo $this->plugin; ?>',
|
425 |
+
plugin_abbr: '<?php echo $this->plugin_abbr; ?>',
|
426 |
+
is_dev_mode: '<?php echo $this->is_dev_mode; ?>',
|
427 |
+
set_cookie: ''
|
428 |
+
}
|
429 |
+
};
|
430 |
+
|
431 |
+
var submitSurvey = $.post(ajaxurl, data);
|
432 |
+
submitSurvey.always(function () {
|
433 |
+
location.href = $deactivateLink.attr('href');
|
434 |
+
});
|
435 |
+
});
|
436 |
+
// Exit key closes survey when open.
|
437 |
+
$(document).keyup(function (event) {
|
438 |
+
if (27 === event.keyCode && formOpen) {
|
439 |
+
$overlay.hide();
|
440 |
+
formOpen = false;
|
441 |
+
$deactivateLink.focus();
|
442 |
+
}
|
443 |
+
});
|
444 |
+
});
|
445 |
+
</script>
|
446 |
+
<?php
|
447 |
+
}
|
448 |
+
|
449 |
+
/**
|
450 |
+
* Survey CSS.
|
451 |
+
*
|
452 |
+
* @since 1.0.0
|
453 |
+
*/
|
454 |
+
public function css() {
|
455 |
+
|
456 |
+
if ( ! $this->is_plugin_page() ) {
|
457 |
+
return;
|
458 |
+
}
|
459 |
+
?>
|
460 |
+
<style type="text/css">
|
461 |
+
.ig-deactivate-survey-modal {
|
462 |
+
display: none;
|
463 |
+
table-layout: fixed;
|
464 |
+
position: fixed;
|
465 |
+
z-index: 9999;
|
466 |
+
width: 100%;
|
467 |
+
height: 100%;
|
468 |
+
text-align: center;
|
469 |
+
font-size: 14px;
|
470 |
+
top: 0;
|
471 |
+
left: 0;
|
472 |
+
background: rgba(0, 0, 0, 0.8);
|
473 |
+
}
|
474 |
+
|
475 |
+
.ig-deactivate-survey-wrap {
|
476 |
+
display: table-cell;
|
477 |
+
vertical-align: middle;
|
478 |
+
}
|
479 |
+
|
480 |
+
.ig-deactivate-survey {
|
481 |
+
background-color: #fff;
|
482 |
+
max-width: 550px;
|
483 |
+
margin: 0 auto;
|
484 |
+
padding: 30px;
|
485 |
+
text-align: left;
|
486 |
+
}
|
487 |
+
|
488 |
+
.ig-deactivate-survey .error {
|
489 |
+
display: block;
|
490 |
+
color: red;
|
491 |
+
margin: 0 0 10px 0;
|
492 |
+
}
|
493 |
+
|
494 |
+
.ig-deactivate-survey-title {
|
495 |
+
display: block;
|
496 |
+
font-size: 18px;
|
497 |
+
font-weight: 700;
|
498 |
+
text-transform: uppercase;
|
499 |
+
border-bottom: 1px solid #ddd;
|
500 |
+
padding: 0 0 18px 0;
|
501 |
+
margin: 0 0 18px 0;
|
502 |
+
}
|
503 |
+
|
504 |
+
.ig-deactivate-survey-title span {
|
505 |
+
color: #999;
|
506 |
+
margin-right: 10px;
|
507 |
+
}
|
508 |
+
|
509 |
+
.ig-deactivate-survey-desc {
|
510 |
+
display: block;
|
511 |
+
font-weight: 600;
|
512 |
+
margin: 0 0 18px 0;
|
513 |
+
}
|
514 |
+
|
515 |
+
.ig-deactivate-survey-option {
|
516 |
+
margin: 0 0 10px 0;
|
517 |
+
}
|
518 |
+
|
519 |
+
.ig-deactivate-survey-option-input {
|
520 |
+
margin-right: 10px !important;
|
521 |
+
}
|
522 |
+
|
523 |
+
.ig-deactivate-survey-option-details {
|
524 |
+
display: none;
|
525 |
+
width: 90%;
|
526 |
+
margin: 10px 0 0 30px;
|
527 |
+
}
|
528 |
+
|
529 |
+
.ig-deactivate-survey-footer {
|
530 |
+
margin-top: 18px;
|
531 |
+
}
|
532 |
+
|
533 |
+
.ig-deactivate-survey-deactivate {
|
534 |
+
float: right;
|
535 |
+
font-size: 13px;
|
536 |
+
color: #ccc;
|
537 |
+
text-decoration: none;
|
538 |
+
padding-top: 7px;
|
539 |
+
}
|
540 |
+
</style>
|
541 |
+
<?php
|
542 |
+
}
|
543 |
+
|
544 |
+
/**
|
545 |
+
* Survey modal.
|
546 |
+
*
|
547 |
+
* @since 1.0.0
|
548 |
+
*/
|
549 |
+
public function modal() {
|
550 |
+
|
551 |
+
if ( ! $this->is_plugin_page() ) {
|
552 |
+
return;
|
553 |
+
}
|
554 |
+
|
555 |
+
$options = array(
|
556 |
+
1 => array(
|
557 |
+
'title' => esc_html__( 'I no longer need the plugin', 'email-subscribers' ),
|
558 |
+
'slug' => 'i-no-longer-need-the-plugin'
|
559 |
+
),
|
560 |
+
2 => array(
|
561 |
+
'title' => esc_html__( 'I\'m switching to a different plugin', 'email-subscribers' ),
|
562 |
+
'slug' => 'i-am-switching-to-a-different-plugin',
|
563 |
+
'details' => esc_html__( 'Please share which plugin', 'email-subscribers' ),
|
564 |
+
),
|
565 |
+
3 => array(
|
566 |
+
'title' => esc_html__( 'I couldn\'t get the plugin to work', 'email-subscribers' ),
|
567 |
+
'slug' => 'i-could-not-get-the-plugin-to-work'
|
568 |
+
),
|
569 |
+
4 => array(
|
570 |
+
'title' => esc_html__( 'It\'s a temporary deactivation', 'email-subscribers' ),
|
571 |
+
'slug' => 'it-is-a-temporary-deactivation'
|
572 |
+
),
|
573 |
+
5 => array(
|
574 |
+
'title' => esc_html__( 'Other', 'email-subscribers' ),
|
575 |
+
'slug' => 'other',
|
576 |
+
'details' => esc_html__( 'Please share the reason', 'email-subscribers' ),
|
577 |
+
),
|
578 |
+
);
|
579 |
+
?>
|
580 |
+
<div class="ig-deactivate-survey-modal" id="ig-deactivate-survey-<?php echo $this->plugin; ?>">
|
581 |
+
<div class="ig-deactivate-survey-wrap">
|
582 |
+
<form class="ig-deactivate-survey" method="post">
|
583 |
+
<span class="ig-deactivate-survey-title"><span class="dashicons dashicons-testimonial"></span><?php echo ' ' . esc_html__( 'Quick Feedback', 'email-subscribers' ); ?></span>
|
584 |
+
<span class="ig-deactivate-survey-desc"><?php echo sprintf( esc_html__( 'If you have a moment, please share why you are deactivating %s:', 'email-subscribers' ), $this->name ); ?></span>
|
585 |
+
<div class="ig-deactivate-survey-options">
|
586 |
+
<?php foreach ( $options as $id => $option ) : ?>
|
587 |
+
<div class="ig-deactivate-survey-option">
|
588 |
+
<label for="ig-deactivate-survey-option-<?php echo $this->plugin; ?>-<?php echo $id; ?>" class="ig-deactivate-survey-option-label">
|
589 |
+
<input id="ig-deactivate-survey-option-<?php echo $this->plugin; ?>-<?php echo $id; ?>" class="ig-deactivate-survey-option-input" type="radio" name="code" value="<?php echo $id; ?>" data-option-slug="<?php echo $option['slug']; ?>"/>
|
590 |
+
<span class="ig-deactivate-survey-option-reason"><?php echo $option['title']; ?></span>
|
591 |
+
</label>
|
592 |
+
<?php if ( ! empty( $option['details'] ) ) : ?>
|
593 |
+
<input class="ig-deactivate-survey-option-details" type="text" placeholder="<?php echo $option['details']; ?>"/>
|
594 |
+
<?php endif; ?>
|
595 |
+
</div>
|
596 |
+
<?php endforeach; ?>
|
597 |
+
</div>
|
598 |
+
<div class="ig-deactivate-survey-footer">
|
599 |
+
<button type="submit" class="ig-deactivate-survey-submit button button-primary button-large"><?php echo sprintf( esc_html__( 'Submit %s Deactivate', 'email-subscribers' ), '&' ); ?></button>
|
600 |
+
<a href="#" class="ig-deactivate-survey-deactivate"><?php echo sprintf( esc_html__( 'Skip %s Deactivate', 'email-subscribers' ), '&' ); ?></a>
|
601 |
+
</div>
|
602 |
+
</form>
|
603 |
+
</div>
|
604 |
+
</div>
|
605 |
+
<?php
|
606 |
+
}
|
607 |
+
|
608 |
+
/**
|
609 |
+
* Can we show feedback widget in this environment
|
610 |
+
*
|
611 |
+
* @return bool
|
612 |
+
*/
|
613 |
+
public function can_show_feedback_widget() {
|
614 |
+
|
615 |
+
// Is development mode? Enable it.
|
616 |
+
if ( $this->is_dev_mode ) {
|
617 |
+
return true;
|
618 |
+
}
|
619 |
+
|
620 |
+
// Don't show on dev setup if dev mode is off.
|
621 |
+
if ( $this->is_dev_url() ) {
|
622 |
+
return false;
|
623 |
+
}
|
624 |
+
|
625 |
+
return true;
|
626 |
+
}
|
627 |
+
|
628 |
+
/**
|
629 |
+
* Checks if current admin screen is the plugins page.
|
630 |
+
*
|
631 |
+
* @return bool
|
632 |
+
* @since 1.0.0
|
633 |
+
*/
|
634 |
+
public function is_plugin_page() {
|
635 |
+
|
636 |
+
$screen = function_exists( 'get_current_screen' ) ? get_current_screen() : false;
|
637 |
+
if ( empty( $screen ) ) {
|
638 |
+
return false;
|
639 |
+
}
|
640 |
+
|
641 |
+
return ( ! empty( $screen->id ) && in_array( $screen->id, array( 'plugins', 'plugins-network' ), true ) );
|
642 |
+
}
|
643 |
+
|
644 |
+
|
645 |
+
/**
|
646 |
+
* Checks if current site is a development one.
|
647 |
+
*
|
648 |
+
* @return bool
|
649 |
+
*
|
650 |
+
* @since 1.0.0
|
651 |
+
*/
|
652 |
+
public function is_dev_url() {
|
653 |
+
|
654 |
+
$url = network_site_url( '/' );
|
655 |
+
$is_local_url = false;
|
656 |
+
|
657 |
+
// Trim it up
|
658 |
+
$url = strtolower( trim( $url ) );
|
659 |
+
|
660 |
+
// Need to get the host...so let's add the scheme so we can use parse_url
|
661 |
+
if ( false === strpos( $url, 'http://' ) && false === strpos( $url, 'https://' ) ) {
|
662 |
+
$url = 'http://' . $url;
|
663 |
+
}
|
664 |
+
$url_parts = parse_url( $url );
|
665 |
+
$host = ! empty( $url_parts['host'] ) ? $url_parts['host'] : false;
|
666 |
+
if ( ! empty( $url ) && ! empty( $host ) ) {
|
667 |
+
if ( false !== ip2long( $host ) ) {
|
668 |
+
if ( ! filter_var( $host, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE ) ) {
|
669 |
+
$is_local_url = true;
|
670 |
+
}
|
671 |
+
} elseif ( 'localhost' === $host ) {
|
672 |
+
$is_local_url = true;
|
673 |
+
}
|
674 |
+
|
675 |
+
$tlds_to_check = array( '.dev', '.local', ':8888' );
|
676 |
+
foreach ( $tlds_to_check as $tld ) {
|
677 |
+
if ( false !== strpos( $host, $tld ) ) {
|
678 |
+
$is_local_url = true;
|
679 |
+
continue;
|
680 |
+
}
|
681 |
+
|
682 |
+
}
|
683 |
+
if ( substr_count( $host, '.' ) > 1 ) {
|
684 |
+
$subdomains_to_check = array( 'dev.', '*.staging.', 'beta.', 'test.' );
|
685 |
+
foreach ( $subdomains_to_check as $subdomain ) {
|
686 |
+
$subdomain = str_replace( '.', '(.)', $subdomain );
|
687 |
+
$subdomain = str_replace( array( '*', '(.)' ), '(.*)', $subdomain );
|
688 |
+
if ( preg_match( '/^(' . $subdomain . ')/', $host ) ) {
|
689 |
+
$is_local_url = true;
|
690 |
+
continue;
|
691 |
+
}
|
692 |
+
}
|
693 |
+
}
|
694 |
+
}
|
695 |
+
|
696 |
+
return $is_local_url;
|
697 |
+
}
|
698 |
+
|
699 |
+
/**
|
700 |
+
* Store plugin feedback data into option
|
701 |
+
*
|
702 |
+
* @param $plugin_abbr
|
703 |
+
* @param $event
|
704 |
+
* @param $data
|
705 |
+
*
|
706 |
+
* @since 1.0.1
|
707 |
+
*/
|
708 |
+
public function set_feedback_data( $plugin_abbr, $event, $data ) {
|
709 |
+
|
710 |
+
$feedback_option = $plugin_abbr . '_feedback_data';
|
711 |
+
|
712 |
+
$feedback_data = maybe_unserialize( get_option( $feedback_option, array() ) );
|
713 |
+
|
714 |
+
$data['created_on'] = gmdate( 'Y-m-d H:i:s' );
|
715 |
+
|
716 |
+
$feedback_data[ $event ][] = $data;
|
717 |
+
|
718 |
+
update_option( $feedback_option, $feedback_data );
|
719 |
+
|
720 |
+
}
|
721 |
+
|
722 |
+
/**
|
723 |
+
* Get plugin feedback data
|
724 |
+
*
|
725 |
+
* @param $plugin_abbr
|
726 |
+
*
|
727 |
+
* @return mixed|void
|
728 |
+
*
|
729 |
+
* @since 1.0.1
|
730 |
+
*/
|
731 |
+
public function get_feedback_data( $plugin_abbr ) {
|
732 |
+
|
733 |
+
$feedback_option = $plugin_abbr . '_feedback_data';
|
734 |
+
|
735 |
+
return get_option( $feedback_option, array() );
|
736 |
+
}
|
737 |
+
|
738 |
+
/**
|
739 |
+
* Get event specific feedback data
|
740 |
+
*
|
741 |
+
* @param $plugin_abbr
|
742 |
+
* @param $event
|
743 |
+
*
|
744 |
+
* @return array|mixed
|
745 |
+
*/
|
746 |
+
public function get_event_feedback_data( $plugin_abbr, $event ) {
|
747 |
+
|
748 |
+
$feedback_data = $this->get_feedback_data( $plugin_abbr );
|
749 |
+
|
750 |
+
$event_feedback_data = ! empty( $feedback_data[ $event ] ) ? $feedback_data[ $event ] : array();
|
751 |
+
|
752 |
+
return $event_feedback_data;
|
753 |
+
}
|
754 |
+
|
755 |
+
/**
|
756 |
+
* Set event into transient
|
757 |
+
*
|
758 |
+
* @param $event
|
759 |
+
* @param int $expiry in days
|
760 |
+
*/
|
761 |
+
public function set_event_transient( $event, $expiry = 45 ) {
|
762 |
+
set_transient( $event, 1, time() + ( 86400 * $expiry ) );
|
763 |
+
}
|
764 |
+
|
765 |
+
/**
|
766 |
+
* Check whether event transient is set or not.
|
767 |
+
*
|
768 |
+
* @param $event
|
769 |
+
*
|
770 |
+
* @return bool
|
771 |
+
*
|
772 |
+
* @since 1.0.1
|
773 |
+
*/
|
774 |
+
public function is_event_transient_set( $event ) {
|
775 |
+
return get_transient( $event );
|
776 |
+
}
|
777 |
+
|
778 |
+
/**
|
779 |
+
* Hook to ajax_action
|
780 |
+
*
|
781 |
+
* Send feedback to server
|
782 |
+
*/
|
783 |
+
function submit_feedback() {
|
784 |
+
|
785 |
+
$data = ! empty( $_POST ) ? $_POST : array();
|
786 |
+
|
787 |
+
$data['site'] = esc_url( home_url() );
|
788 |
+
|
789 |
+
$plugin = ! empty( $data['misc']['plugin'] ) ? $data['misc']['plugin'] : 'ig_feedback';
|
790 |
+
$plugin_abbr = ! empty( $data['misc']['plugin_abbr'] ) ? $data['misc']['plugin_abbr'] : 'ig_feedback';
|
791 |
+
$is_dev_mode = ! empty( $data['misc']['is_dev_mode'] ) ? $data['misc']['is_dev_mode'] : false;
|
792 |
+
$set_transient = ! empty( $data['misc']['set_transient'] ) ? $data['misc']['set_transient'] : false;
|
793 |
+
$system_info = ! empty( $data['misc']['system_info'] ) ? $data['misc']['system_info'] : false;
|
794 |
+
|
795 |
+
unset( $data['misc'] );
|
796 |
+
|
797 |
+
$meta_info = array(
|
798 |
+
'plugin' => sanitize_key( $plugin ),
|
799 |
+
'locale' => get_locale(),
|
800 |
+
'wp_version' => get_bloginfo( 'version' )
|
801 |
+
);
|
802 |
+
|
803 |
+
$additional_info = array();
|
804 |
+
$additional_info = apply_filters( $plugin_abbr . '_additional_feedback_meta_info', $additional_info, $system_info ); // Get Additional meta information
|
805 |
+
|
806 |
+
if ( is_array( $additional_info ) && count( $additional_info ) > 0 ) {
|
807 |
+
$meta_info = $meta_info + $additional_info;
|
808 |
+
}
|
809 |
+
|
810 |
+
$data['meta'] = $meta_info;
|
811 |
+
|
812 |
+
$data = wp_unslash( $data );
|
813 |
+
|
814 |
+
$args = array(
|
815 |
+
'timeout' => 15,
|
816 |
+
'sslverify' => false,
|
817 |
+
'body' => $data,
|
818 |
+
'blocking' => false
|
819 |
+
);
|
820 |
+
|
821 |
+
$this->set_feedback_data( $plugin_abbr, $data['event'], $data['feedback'] );
|
822 |
+
|
823 |
+
// Set Cookie
|
824 |
+
if ( $set_transient ) {
|
825 |
+
$this->set_event_transient( $data['event'] );
|
826 |
+
}
|
827 |
+
|
828 |
+
$response = wp_remote_post( $this->get_api_url( $is_dev_mode ), $args );
|
829 |
+
|
830 |
+
$result['status'] = 'success';
|
831 |
+
if ( $response instanceof WP_Error ) {
|
832 |
+
$error_message = $response->get_error_message();
|
833 |
+
$result['status'] = 'error';
|
834 |
+
$result['message'] = $error_message;
|
835 |
+
}
|
836 |
+
|
837 |
+
die( json_encode( $result ) );
|
838 |
+
}
|
839 |
+
}
|
840 |
+
} // End if().
|
classes/feedback/class-ig-tracker-v-1-0-1.php
ADDED
@@ -0,0 +1,191 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
4 |
+
exit; // Exit if accessed directly.
|
5 |
+
}
|
6 |
+
|
7 |
+
if ( ! class_exists( 'IG_Tracker_V_1_0_1' ) ) {
|
8 |
+
|
9 |
+
/**
|
10 |
+
* Icegram tracker.
|
11 |
+
*
|
12 |
+
* Icegram tracker handler class is responsible for sending anonymous plugin
|
13 |
+
* data to Icegram servers for users that actively allowed data tracking.
|
14 |
+
*
|
15 |
+
* @since 1.0.0
|
16 |
+
*/
|
17 |
+
class IG_Tracker_V_1_0_1 {
|
18 |
+
|
19 |
+
/**
|
20 |
+
* Get Active, Inactive or all plugins info
|
21 |
+
*
|
22 |
+
* @return array
|
23 |
+
*
|
24 |
+
* @since 1.0.0
|
25 |
+
*/
|
26 |
+
public static function get_plugins( $status = 'all', $details = false ) {
|
27 |
+
|
28 |
+
$plugins = array(
|
29 |
+
'active_plugins' => array(),
|
30 |
+
'inactive_plugins' => array()
|
31 |
+
);
|
32 |
+
|
33 |
+
$all_plugins = get_plugins();
|
34 |
+
$active_plugins = get_option( 'active_plugins', array() );
|
35 |
+
|
36 |
+
if ( is_multisite() ) {
|
37 |
+
$sitewide_activated_plugins = array_keys( get_site_option( 'active_sitewide_plugins', array() ) );
|
38 |
+
$active_plugins = ! empty( $active_plugins ) ? array_merge( $sitewide_activated_plugins, $active_plugins ) : $sitewide_activated_plugins;
|
39 |
+
}
|
40 |
+
|
41 |
+
$i = 0;
|
42 |
+
foreach ( $all_plugins as $plugin_path => $plugin ) {
|
43 |
+
// If the plugin isn't active, don't show it.
|
44 |
+
if ( in_array( $plugin_path, $active_plugins ) ) {
|
45 |
+
$slug = 'active_plugins';
|
46 |
+
} else {
|
47 |
+
$slug = 'inactive_plugins';
|
48 |
+
}
|
49 |
+
|
50 |
+
if ( $details ) {
|
51 |
+
|
52 |
+
$plugin_data = array(
|
53 |
+
'name' => $plugin['Name'],
|
54 |
+
'version' => $plugin['Version'],
|
55 |
+
'author' => $plugin['Author'],
|
56 |
+
'author_uri' => $plugin['AuthorURI'],
|
57 |
+
'plugin_uri' => $plugin['PluginURI']
|
58 |
+
);
|
59 |
+
|
60 |
+
$plugins[ $slug ][ $plugin_path ] = $plugin_data;
|
61 |
+
} else {
|
62 |
+
$plugins[ $slug ][] = $plugin_path;
|
63 |
+
}
|
64 |
+
}
|
65 |
+
|
66 |
+
if ( 'active' === $status ) {
|
67 |
+
return $plugins['active_plugins'];
|
68 |
+
} elseif ( 'inactive' === $status ) {
|
69 |
+
return $plugins['inactive_plugins'];
|
70 |
+
} elseif('all' === $status) {
|
71 |
+
return array_merge($plugins['active_plugins'], $plugins['inactive_plugins']);
|
72 |
+
}
|
73 |
+
}
|
74 |
+
|
75 |
+
/**
|
76 |
+
* Get Active Plugins
|
77 |
+
*
|
78 |
+
* @param bool $details
|
79 |
+
*
|
80 |
+
* @return array
|
81 |
+
*
|
82 |
+
* @since 1.0.0
|
83 |
+
*/
|
84 |
+
public static function get_active_plugins( $details = false ) {
|
85 |
+
return self::get_plugins( 'active', $details );
|
86 |
+
}
|
87 |
+
|
88 |
+
/**
|
89 |
+
* Get Inactive plugins
|
90 |
+
*
|
91 |
+
* @param bool $details
|
92 |
+
*
|
93 |
+
* @return array
|
94 |
+
*
|
95 |
+
* @since 1.0.0
|
96 |
+
*/
|
97 |
+
public static function get_inactive_plugins( $details = false ) {
|
98 |
+
return self::get_plugins( 'inactive', $details );
|
99 |
+
}
|
100 |
+
|
101 |
+
/**
|
102 |
+
* Get Current Theme Info
|
103 |
+
*
|
104 |
+
* @return array
|
105 |
+
*
|
106 |
+
* @since 1.0.0
|
107 |
+
*/
|
108 |
+
public static function get_current_theme_info() {
|
109 |
+
$current_theme = array();
|
110 |
+
if ( function_exists( 'wp_get_theme' ) ) {
|
111 |
+
$theme_data = wp_get_theme();
|
112 |
+
$current_theme = array(
|
113 |
+
'name' => $theme_data->get( 'Name' ),
|
114 |
+
'version' => $theme_data->get( 'Version' ),
|
115 |
+
'author' => $theme_data->get( 'Author' ),
|
116 |
+
'author_uri' => $theme_data->get( 'AuthorURI' )
|
117 |
+
);
|
118 |
+
} elseif ( function_exists( 'get_theme_data' ) ) {
|
119 |
+
$theme_data = get_theme_data( get_stylesheet_directory() . '/style.css' );
|
120 |
+
$current_theme = array(
|
121 |
+
'name' => $theme_data['Name'],
|
122 |
+
'version' => $theme_data['Version'],
|
123 |
+
'author' => $theme_data['Author'],
|
124 |
+
'author_uri' => $theme_data['AuthorURI']
|
125 |
+
);
|
126 |
+
}
|
127 |
+
|
128 |
+
return $current_theme;
|
129 |
+
}
|
130 |
+
|
131 |
+
/**
|
132 |
+
* Get server info
|
133 |
+
*
|
134 |
+
* @return array
|
135 |
+
*
|
136 |
+
* @since 1.0.0
|
137 |
+
*/
|
138 |
+
public static function get_server_info() {
|
139 |
+
global $wpdb;
|
140 |
+
|
141 |
+
$server_info = array(
|
142 |
+
'php_version' => PHP_VERSION,
|
143 |
+
'mysql_version' => $wpdb->db_version(),
|
144 |
+
'web_server_info' => $_SERVER['SERVER_SOFTWARE'],
|
145 |
+
'user_agent' => $_SERVER['HTTP_USER_AGENT'],
|
146 |
+
'php_memory_limit' => ini_get( 'memory_limit' ),
|
147 |
+
'php_post_max_size' => ini_get( 'post_max_size' ),
|
148 |
+
'php_upload_max_file_size' => ini_get( 'upload_max_filesize' ),
|
149 |
+
'php_max_execution_time' => ini_get( 'max_execution_time' ),
|
150 |
+
'session' => isset( $_SESSION ) ? 'enabled' : 'disabled',
|
151 |
+
'session_name' => esc_html( ini_get( 'session.name' ) ),
|
152 |
+
'cookie_path' => esc_html( ini_get( 'session.cookie_path' ) ),
|
153 |
+
'session_save_path' => esc_html( ini_get( 'session.save_path' ) ),
|
154 |
+
'use_cookies' => ini_get( 'session.use_cookies' ) ? 'on' : 'off',
|
155 |
+
'use_only_cookies' => ini_get( 'session.use_only_cookies' ) ? 'on' : 'off',
|
156 |
+
'ssl_support_extension_loaded' => extension_loaded( 'openssl' ) ? 'yes' : 'no',
|
157 |
+
'mb_string_extension_loaded' => extension_loaded( 'mbstring' ) ? 'yes' : 'no',
|
158 |
+
);
|
159 |
+
|
160 |
+
return $server_info;
|
161 |
+
}
|
162 |
+
|
163 |
+
/**
|
164 |
+
* Get WordPress information
|
165 |
+
*
|
166 |
+
* @return array
|
167 |
+
*
|
168 |
+
* @since 1.0.0
|
169 |
+
*/
|
170 |
+
public static function get_wp_info() {
|
171 |
+
global $wpdb;
|
172 |
+
|
173 |
+
$wp_info = array(
|
174 |
+
'site_url' => site_url(),
|
175 |
+
'home_url' => home_url(),
|
176 |
+
'wp_version' => get_bloginfo( 'version' ),
|
177 |
+
'permalink_structure' => get_option( 'permalink_structure' ),
|
178 |
+
'multisite' => is_multisite() ? 'yes' : 'no',
|
179 |
+
'wp_debug' => defined( 'WP_DEBUG' ) ? ( WP_DEBUG ? 'enabled' : 'disabled' ) : '',
|
180 |
+
'display_errors' => ( ini_get( 'display_errors' ) ) ? 'on' : 'off',
|
181 |
+
'wp_table_prefix' => $wpdb->prefix,
|
182 |
+
'wp_db_charset_Collate' => $wpdb->get_charset_collate(),
|
183 |
+
'wp_memory_limit' => ( size_format( (int) WP_MEMORY_LIMIT * 1048576 ) ),
|
184 |
+
'wp_upload_size' => ( size_format( wp_max_upload_size() ) ),
|
185 |
+
'filesystem_method' => get_filesystem_method(),
|
186 |
+
);
|
187 |
+
|
188 |
+
return $wp_info;
|
189 |
+
}
|
190 |
+
}
|
191 |
+
}
|
classes/ig-upsale-admin.php
ADDED
@@ -0,0 +1,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
if ( !defined( 'ABSPATH' ) ) exit;
|
3 |
+
/**
|
4 |
+
* Icegram Compatibility class with other plugins
|
5 |
+
*/
|
6 |
+
if ( !class_exists( 'Icegram_upsale' ) ) {
|
7 |
+
class Icegram_upsale {
|
8 |
+
function __construct() {
|
9 |
+
add_action( 'add_meta_boxes', array( &$this, 'add_campaigns_analytics_metaboxes' ), 0 );
|
10 |
+
add_filter( 'icegram_campaign_tabs', array( &$this, 'add_upsale_tab' ), 10, 1 );
|
11 |
+
add_action('icegram_after_message_settings', array($this,'display_bt_upsale'),10,2);
|
12 |
+
add_filter('icegram_message_field_link' ,array(&$this, 'display_cta_upsale'));
|
13 |
+
}
|
14 |
+
|
15 |
+
function add_campaigns_analytics_metaboxes(){
|
16 |
+
add_meta_box( 'campaign_stats_upsale', __( 'Statistics', 'icegram' ), array( &$this, 'print_campaign_image' ), 'ig_campaign', 'normal', 'high' );
|
17 |
+
}
|
18 |
+
|
19 |
+
function print_campaign_image(){
|
20 |
+
global $icegram;
|
21 |
+
?>
|
22 |
+
<a href="https://www.icegram.com/analytics/?utm_source=in_app&utm_medium=analytics&utm_campaign=ig_upsale" target="blank"><img src="<?php echo $icegram->plugin_url ?>/assets/images/analytics.png"/></a>
|
23 |
+
<?php
|
24 |
+
}
|
25 |
+
|
26 |
+
function add_upsale_tab( $tabs ){
|
27 |
+
$tabs['nav']['upsale'] = '<li class="ig-admin-nav-upsale ig-admin-nav-notab"><a href="https://www.icegram.com/split-testing/?utm_source=in_app&utm_medium=split-testing&utm_campaign=ig_upsale" target="blank">Split testing<span style="font-size: 0.8em; margin-left: 0.3em; padding: 2px; background: #e66060; color: #fff; border-radius: 2px; ">Premium</span></a></li>';
|
28 |
+
return $tabs;
|
29 |
+
}
|
30 |
+
|
31 |
+
function display_bt_upsale( $message_id, $message_data ){
|
32 |
+
global $icegram;
|
33 |
+
?>
|
34 |
+
<label class="message_label"><a class="ig_bt_upsale" href="https://www.icegram.com/exit-intent-optins/?utm_source=in_app&utm_medium=exit-intent&utm_campaign=ig_upsale" target="blank"><img src="<?php echo $icegram->plugin_url ?>/assets/images/exit-intent-label.png"/></a></label>
|
35 |
+
<a class="ig_bt_upsale" href="https://www.icegram.com/exit-intent-optins/?utm_source=in_app&utm_medium=exit-intent&utm_campaign=ig_upsale" target="blank"><img src="<?php echo $icegram->plugin_url ?>/assets/images/exit-intent-feild.png"/></a>
|
36 |
+
<?php
|
37 |
+
}
|
38 |
+
|
39 |
+
function display_cta_upsale( $params ){
|
40 |
+
global $icegram;
|
41 |
+
?>
|
42 |
+
<a class="ig_cta_upsale" href="https://www.icegram.com/cta-actions/?utm_source=in_app&utm_medium==cta&utm_campaign=ig_upsale" target="blank"><img src="<?php echo $icegram->plugin_url ?>/assets/images/cta-new-tab.png"/></a>
|
43 |
+
<?php
|
44 |
+
return $params;
|
45 |
+
}
|
46 |
+
|
47 |
+
}
|
48 |
+
$icegram_upsale = new Icegram_upsale();
|
49 |
+
}
|
icegram.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: Icegram - Popups, Optins, CTAs & lot more...
|
4 |
* Plugin URI: https://www.icegram.com/
|
5 |
* Description: All in one solution to inspire, convert and engage your audiences. Action bars, Popup windows, Messengers, Toast notifications and more. Awesome themes and powerful rules.
|
6 |
-
* Version: 1.10.
|
7 |
* Author: icegram
|
8 |
* Author URI: https://www.icegram.com/
|
9 |
* Copyright (c) 2014-16 Icegram
|
@@ -33,14 +33,22 @@ class Icegram {
|
|
33 |
public static $current_page_id;
|
34 |
|
35 |
function __construct() {
|
36 |
-
$
|
|
|
|
|
37 |
$this->shortcode_instances = array();
|
38 |
$this->mode = 'local';
|
39 |
$this->plugin_url = untrailingslashit( plugins_url( '/', __FILE__ ) );
|
40 |
$this->plugin_path = untrailingslashit( plugin_dir_path( __FILE__ ) );
|
41 |
$this->include_classes();
|
42 |
$this->cache_compatibility = get_option('icegram_cache_compatibility', 'no');
|
43 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
44 |
if( is_admin() && current_user_can( 'edit_posts' ) ) {
|
45 |
$ig_campaign_admin = Icegram_Campaign_Admin::getInstance();
|
46 |
$ig_message_admin = Icegram_Message_Admin::getInstance();
|
@@ -1237,6 +1245,10 @@ class Icegram {
|
|
1237 |
foreach ( $classes as $file ) {
|
1238 |
// Files with 'admin' in their name are included only for admin section
|
1239 |
if ( is_file( $file ) && ( (strpos($file, '-admin') >= 0 && is_admin()) || (strpos($file, '-admin') === false) ) ) {
|
|
|
|
|
|
|
|
|
1240 |
include_once $file;
|
1241 |
}
|
1242 |
}
|
3 |
* Plugin Name: Icegram - Popups, Optins, CTAs & lot more...
|
4 |
* Plugin URI: https://www.icegram.com/
|
5 |
* Description: All in one solution to inspire, convert and engage your audiences. Action bars, Popup windows, Messengers, Toast notifications and more. Awesome themes and powerful rules.
|
6 |
+
* Version: 1.10.28
|
7 |
* Author: icegram
|
8 |
* Author URI: https://www.icegram.com/
|
9 |
* Copyright (c) 2014-16 Icegram
|
33 |
public static $current_page_id;
|
34 |
|
35 |
function __construct() {
|
36 |
+
global $ig_feedback;
|
37 |
+
|
38 |
+
$this->version = "1.10.28";
|
39 |
$this->shortcode_instances = array();
|
40 |
$this->mode = 'local';
|
41 |
$this->plugin_url = untrailingslashit( plugins_url( '/', __FILE__ ) );
|
42 |
$this->plugin_path = untrailingslashit( plugin_dir_path( __FILE__ ) );
|
43 |
$this->include_classes();
|
44 |
$this->cache_compatibility = get_option('icegram_cache_compatibility', 'no');
|
45 |
+
if( is_admin() ){
|
46 |
+
require_once('classes/feedback/class-ig-tracker-v-1-0-1.php');
|
47 |
+
require_once('classes/feedback/class-ig-feedback-v-1-0-1.php');
|
48 |
+
require_once('classes/feedback.php');
|
49 |
+
$ig_feedback = new IG_Feedback_V_1_0_1( 'Icegram', 'icegram', 'ig', 'igfree.', false );
|
50 |
+
$ig_feedback->render_deactivate_feedback();
|
51 |
+
}
|
52 |
if( is_admin() && current_user_can( 'edit_posts' ) ) {
|
53 |
$ig_campaign_admin = Icegram_Campaign_Admin::getInstance();
|
54 |
$ig_message_admin = Icegram_Message_Admin::getInstance();
|
1245 |
foreach ( $classes as $file ) {
|
1246 |
// Files with 'admin' in their name are included only for admin section
|
1247 |
if ( is_file( $file ) && ( (strpos($file, '-admin') >= 0 && is_admin()) || (strpos($file, '-admin') === false) ) ) {
|
1248 |
+
$all_active_plugins = IG_Tracker_V_1_0_1::get_active_plugins();
|
1249 |
+
if( (strpos($file, 'ig-upsale-admin.php') !== false ) && in_array('icegram-engage/icegram-engage.php', $all_active_plugins)){
|
1250 |
+
continue;
|
1251 |
+
}
|
1252 |
include_once $file;
|
1253 |
}
|
1254 |
}
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: icegram, storeapps, niravmehta, sandhyam, putler
|
|
3 |
Donate link: https://www.icegram.com/
|
4 |
Tags: popup, wordpress popups,Exit-popup, optin-popup, popups, hellobar, optin, lead capture, form, marketing, notification, messenger, targeting, monster, ninja ,wordpress lead generation, wordpress lightbox optin, wordpress lightbox optin form, wordpress lightbox optins, wordpress mobile optin forms, wordpress mobile popup, wordpress mobile popups, wordpress optin form, wordpress overlay popup, wordpress popup, wordpress popup form, wordpress popup plugin, wordpress popup solution, wordpress popups , popups, subscribe, wp popups, optin bars, action grabber, promotion, popup message, leads, lists, builder, action bar, floating bar, footer bar, hellobar alternative, pop over, Popup plugin, aweber, campaign monitor, constant contact, email list, exit-intent, onclick popup, analytics, Hubspot, popup ads, pop-up, Mailing list pop-up, re-targeting, Animation,Popups with Animation ,Responsive Popup, split testing, AB testing
|
5 |
Requires at least: 3.9
|
6 |
-
Tested up to: 5.
|
7 |
-
Stable tag: 1.10.
|
8 |
License: GPLv3
|
9 |
|
10 |
The best WP popup plugin that let's you create a popup within seconds. Customize popup, target popups to show offers, email signups, social buttons etc and instantly increase conversions on your website.
|
@@ -217,6 +217,9 @@ Contact Us, provide as much detail of the problem as you can. We will try to sol
|
|
217 |
5. Target your Icegram message using these display rules
|
218 |
|
219 |
== Upgrade Notice ==
|
|
|
|
|
|
|
220 |
= 1.10.27 =
|
221 |
Bug Fix release
|
222 |
|
@@ -456,6 +459,9 @@ Initial Release
|
|
456 |
|
457 |
|
458 |
== Changelog ==
|
|
|
|
|
|
|
459 |
= 1.10.27 =
|
460 |
* Fix: Fixed gallery not loading issue
|
461 |
|
3 |
Donate link: https://www.icegram.com/
|
4 |
Tags: popup, wordpress popups,Exit-popup, optin-popup, popups, hellobar, optin, lead capture, form, marketing, notification, messenger, targeting, monster, ninja ,wordpress lead generation, wordpress lightbox optin, wordpress lightbox optin form, wordpress lightbox optins, wordpress mobile optin forms, wordpress mobile popup, wordpress mobile popups, wordpress optin form, wordpress overlay popup, wordpress popup, wordpress popup form, wordpress popup plugin, wordpress popup solution, wordpress popups , popups, subscribe, wp popups, optin bars, action grabber, promotion, popup message, leads, lists, builder, action bar, floating bar, footer bar, hellobar alternative, pop over, Popup plugin, aweber, campaign monitor, constant contact, email list, exit-intent, onclick popup, analytics, Hubspot, popup ads, pop-up, Mailing list pop-up, re-targeting, Animation,Popups with Animation ,Responsive Popup, split testing, AB testing
|
5 |
Requires at least: 3.9
|
6 |
+
Tested up to: 5.2.1
|
7 |
+
Stable tag: 1.10.28
|
8 |
License: GPLv3
|
9 |
|
10 |
The best WP popup plugin that let's you create a popup within seconds. Customize popup, target popups to show offers, email signups, social buttons etc and instantly increase conversions on your website.
|
217 |
5. Target your Icegram message using these display rules
|
218 |
|
219 |
== Upgrade Notice ==
|
220 |
+
= 1.10.28 =
|
221 |
+
Revised Gallery Templates
|
222 |
+
|
223 |
= 1.10.27 =
|
224 |
Bug Fix release
|
225 |
|
459 |
|
460 |
|
461 |
== Changelog ==
|
462 |
+
= 1.10.28 =
|
463 |
+
* Enhancement: Revised Gallery templates
|
464 |
+
|
465 |
= 1.10.27 =
|
466 |
* Fix: Fixed gallery not loading issue
|
467 |
|